Skip to content

feat(rust): smooth-operator local-flavor seams (LocalTokenVerifier, builder auth/tools, widget serving)#108

Merged
brentrager merged 3 commits into
mainfrom
smooth-local-flavor-rebased
Jun 25, 2026
Merged

feat(rust): smooth-operator local-flavor seams (LocalTokenVerifier, builder auth/tools, widget serving)#108
brentrager merged 3 commits into
mainfrom
smooth-local-flavor-rebased

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

Lands the local deployment-flavor seams the smooth daemon needs to run the operator in-process (closes th-845d79 on merge — the daemon repoints its path-deps off the worktree). Rebased onto current main (HITL + tool-call + citations + auth-verifier all landed since the branch base) — clean rebase, no conflicts.

The 4 seams (Rust reference):

  1. LocalTokenVerifier — shared-secret AuthVerifier (constant-time, fail-closed), exported from the crate root (auth.rs, lib.rs).
  2. LocalServerBuilder::auth(Arc<dyn AuthVerifier>) — install a verifier on the local flavor (was hardcoded NoAuthVerifier).
  3. LocalServerBuilder::tools(Arc<dyn ToolProvider>) — reuses feat: agent injection seams — custom tools + per-org persona #68's existing ToolProvider/AppState::with_tools seam (NOT a parallel extra_tools field — avoids the collision, as coordinated).
  4. Widget servingLocalServerBuilder::serve_widget(token) + AppState::with_widget; router mounts / (host page, token injected) + /chat-widget.iife.js; vendored prebuilt widget bundle under assets/. Off by default (K8s/Lambda never mount it).

All additive — default behavior unchanged. Verified on current main: server + auth-crate suites green, local-flavor tests pass, fmt + clippy clean.

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: cd9898d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

brentrager and others added 3 commits June 25, 2026 15:16
The smooth daemon runs the operator's LOCAL deployment flavor in-process. This
adds the seams it needs, rebased onto main (drops the earlier bespoke
extra_tools seam in favor of #68's ToolProvider — no collision):

- LocalTokenVerifier (auth.rs): shared-secret AuthVerifier, constant-time,
  fail-closed; gates stray local processes without the JWT/IdP machinery. Rides
  the same ?token= / send_message.token slot. Exported.
- LocalServerBuilder::auth(Arc<dyn AuthVerifier>) — install a verifier (was
  hardcoded NoAuthVerifier).
- LocalServerBuilder::tools(Arc<dyn ToolProvider>) — install a host ToolProvider
  (#68's seam) so the runner merges its per-turn tools; the daemon passes an
  OS-sandboxed shell + egress provider.
- Widget serving: LocalServerBuilder::serve_widget(token) + AppState::with_widget
  + router mounts / (host page, token JSON-injected) and /chat-widget.iife.js.
  Vendored the prebuilt @smooai/smooth-operator widget bundle under assets/. Off
  by default — K8s/Lambda never mount it.

Tests: LocalTokenVerifier accept/reject; builder auth/tools/widget seams thread
into AppState; router mounts the widget routes; widget off by default. 96 server
+ 44 auth tests pass; clippy/fmt clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016wBikCFJyoowRokiWK5rX1
@brentrager brentrager force-pushed the smooth-local-flavor-rebased branch from 1675162 to cd9898d Compare June 25, 2026 19:18
@brentrager brentrager merged commit 89fe392 into main Jun 25, 2026
1 check passed
brentrager added a commit that referenced this pull request Jun 25, 2026
…smoke drift) (#111)

sync-versions.mjs stamped every published member Cargo.toml [package] version on a
release but never touched rust/Cargo.lock — so the lockfile pinned the OLD versions
and cargo build --locked (kind-deploy-smoke + every release cargo publish) refused
to build until someone hand-synced it (bit #85, #108). Now the script also stamps
the lock: bump the version of each [[package]] whose name is one of the lockstep
published members (NOT -core, NOT the non-published lambda/examples at 0.1.0).
Verified by simulating a 1.8.0 release → toml + lock advance together → --locked
builds; lambda stays 0.1.0, core stays 0.14.1.


Claude-Session: https://claude.ai/code/session_01U7Mn93HpqhSgEmX6tRdPAv

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant