Skip to content

feat(desktop): start thread-bound remote sessions from mentions - #1

Draft
tee8z wants to merge 1 commit into
dev-2884-sandbox-providerfrom
dev-2884-pilot-launch-taylor-signing
Draft

tee8z wants to merge 1 commit into
dev-2884-sandbox-providerfrom
dev-2884-pilot-launch-taylor-signing

Conversation

@tee8z

@tee8z tee8z commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

A sandbox agent must start in the thread where its owner mentioned it. The desktop starts agents without any thread information. This PR passes the published mention's channel and canonical thread root to the agent start, and native deploy binds them into the provider configuration.

sequenceDiagram
    participant C as useMentionSendFlow
    participant R as Relay
    participant S as useDetachedAgentStart
    participant N as deploy_to_provider (Tauri)
    participant P as Kubernetes provider
    C->>R: Publish the mention
    R-->>C: Published event (id, tags)
    C->>S: Start agent with publishedRemoteSession(event, channel)
    alt Sandbox agent and no thread scope
        S-->>C: Error toast, no start
    else Thread scope present or not a Sandbox agent
        S->>N: Start with sessionScope
        N->>N: Take the per-agent deploy lock and rebuild the payload
        N->>N: bind_sandbox_scope sets sandbox and identity_policy (sandbox: true only)
        N->>P: deploy
    end
Loading
  • usesThreadSandbox selects agents with provider kubernetes and sandbox: true. A saved deployed status never skips the start for these agents.
  • The thread root is the reply's root, or the message itself. It must be a lowercase 64-character event ID.
  • In-flight start deduplication includes the thread scope, so two threads start two sessions.
  • Provider config fields accept JSON objects and arrays, with at most 4 nesting levels, 64 array entries, and 20 fields per object. Secret-like keys are refused at every depth.

Stack

Position 6 of 20 in the DEV-2884 Buzz stack. Base: #12. Next: #13.

Validation

  • pnpm typecheck, pnpm check (Biome, px-text, pubkey truncation), and pnpm check:file-sizes: pass. Biome reports the same 3 warnings as the base.
  • pnpm test: 6,822 passed and 160 jsdom passed, 0 failed.
  • cargo fmt --check in desktop/src-tauri: pass.
  • This layer's tree is identical to the previous single-commit PR head (e4e9cd8b9).

Limits

  • The Tauri Rust (provider_deploy.rs, backend.rs) is not compiler-checked locally. The glib-sys build needs GLib/GIO development libraries that this machine lacks.
  • Buzz AGENTS.md requires a human to test the change before it leaves draft.

@tee8z
tee8z force-pushed the dev-2884-pilot-launch-taylor-signing branch from edf7204 to 7f4a18f Compare October 8, 2026 21:08
@tee8z tee8z self-assigned this Oct 8, 2026
@tee8z tee8z changed the title feat(kubernetes): support bounded restrictive owner-bound pilot feat(kubernetes): add remote agent controls Oct 8, 2026
@tee8z
tee8z force-pushed the dev-2884-pilot-launch-taylor-signing branch from 7f4a18f to 1a1278a Compare October 9, 2026 01:12
@tee8z tee8z changed the title feat(kubernetes): add remote agent controls feat(agents): add thread-bound Agent Sandbox sessions Oct 9, 2026
@tee8z
tee8z force-pushed the dev-2884-pilot-launch-taylor-signing branch from 1a1278a to f2548d8 Compare October 9, 2026 01:47
@tee8z
tee8z added this pull request to stack #5 October 9, 2026 17:12
@tee8z
tee8z force-pushed the dev-2884-pilot-launch-taylor-signing branch 2 times, most recently from e4e9cd8 to 45f3fb2 Compare October 19, 2026 20:52
@tee8z
tee8z removed this pull request from stack #5 October 19, 2026 20:53
@tee8z
tee8z changed the base branch from main to dev-2884-sandbox-provider October 19, 2026 20:53
@tee8z tee8z changed the title feat(agents): add thread-bound Agent Sandbox sessions feat(desktop): start thread-bound remote sessions from mentions Oct 19, 2026
@tee8z
tee8z added this pull request to stack #22 October 19, 2026 20:56
After a mention is published, pass its channel and canonical thread root to
the detached agent start. For a Kubernetes provider with `sandbox: true`,
native deploy binds that thread scope and the verified owner after the
deployment lock, and refuses to start without a thread. Provider config
fields accept bounded, nested JSON objects and arrays.

Signed-off-by: Tee8z <tee8z@protonmail.com>
@tee8z
tee8z force-pushed the dev-2884-pilot-launch-taylor-signing branch from 45f3fb2 to 02826c5 Compare October 19, 2026 23:28
@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

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