Repository navigation
feat(guide): Scout — the named first teammate that sets up your local agents - #935
Merged
Merged
Conversation
… agents (ADR-020) Three asks from Sam's morning session, one coherent slice: Scout (the Cindy-in-Raft decision): displayName flips Guide → Scout; agentName stays 'guide' (stable identity key). @scout resolves via the mention map's displaySlug index; @guide keeps working via the bare-name rule. Frontend handle preference for opaque-token agents becomes displayName slug → agentName. rename-guide-to-scout.ts migrates the two DB name sources for existing rows; the signup opener introduces Scout by name. connect_local_agent (new approval actionType): Scout proposes a BYO seat; approval creates the ephemeral registry row + installation OWNED BY THE USER (ADR-006 shape, #609 foreign-name guard at propose AND execute), then the card links to the connect page with ?pod=&name= prefilled. The runtime token is never minted on this path — credentials stay a human-in-browser act, and no payload field ever carries one. An existing own install is success (identity continuity), not failure. commonly_agent_status (new native tool) + agentStateService: ONE derivation of proof-of-life (heartbeats ∪ runs ∪ token use — extracted from the pod-agents route, which now consumes it) and ONE bucket vocabulary: active/idle/stale/never-connected/ready ('ready' is the honest word for native agents — the #915 lesson). Scout answers 'is my agent connected?' from the same truth the roster shows. The #915 regression suite caught a real extraction bug (named-export buildAgentUsername) before it shipped. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8
Sam: the persona/package name split for the flagship agent is a permanent
two-name tax ('guide' leaking in payloads, handles, envelope keys), and
pre-GTM is the only cheap moment to fix it — 3 installs, one a real
user's. Renamed while it costs a migration script instead of a regret.
- manifest guide.ts → scout.ts, agentName 'scout' (exports scoutApp;
apps.ts + authController import sites updated)
- migrate-guide-to-scout.ts: users (username guide-* → scout-*,
botMetadata, PG resync) + installations + MEMORY ENVELOPES (identity
continuity — the renamed agent finds its memory exactly where it left
it) + registry (delete-not-rename when the boot seeder already minted
the scout row) + flagged approvals (pending cards must execute against
the renamed install; resolved rows stay as honest audit) + runs
(lastActiveAt continuity) + pending events. Exact-'Guide' displayName
match only, so a user's own rename survives. --dry supported.
- MENTION_ALIASES scout:['guide'] — the real user onboarded under @guide;
their muscle memory and every old @guide in history keep landing.
- chat author snapshots stay frozen (history is never rewritten).
No dead window: the native runtime reads installation.config, so old rows
keep answering between deploy and migration. Order: deploy → migrate →
refresh-native-agent-configs.
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8
Contributor
Author
|
Second commit ( |
…orkspace-membership lookup Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8
lilyshen0722
added a commit
that referenced
this pull request
Aug 13, 2026
…obbered — every pod page crashed (#936) P0, caught live in post-deploy browser verification. #935's activity derivation was written as a NEW file at backend/services/agentStateService.ts — a path where the #891 mention-honesty service already lived. Its same-named test sat at the same test path, so the clobber also buried the suite that would have caught it, and CI stayed green. Live effect: the /:podId/agent-states route called MY deriveAgentState(lastActiveAt, runtimeType) with (installation, tokens, callerId), returned bare 'stale' strings, and the typeahead useMemo crashed the ENTIRE pod page on s.agentName.toLowerCase(). - restore agentStateService.ts + its test verbatim from #910 - re-add the activity pieces in the SAME file under non-colliding names: collectPodAgentActivity + deriveActivityBucket (tool + roster call sites updated); activity tests live in agentStateService.activity.test.js - V2PodChat: the honesty surface promises 'silence over a wrong dot' — that now includes malformed payloads; shape-guard the map so a bad backend degrades to no-dots, never an error boundary Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8 Co-authored-by: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What (Sam's three morning asks, one slice)
1. The Guide is now Scout
The Cindy-in-Raft decision.
displayNameflips Guide → Scout everywhere human-facing;agentNamestays'guide'— it's the stable identity key (memory envelopes, AGENT_TYPES, manifests, starter tasks). Handles: @scout resolves via the mention map's existingdisplaySlugindex, @guide keeps working via the bare-agentName rule; the frontend handle preference for opaque-token agents becomes displayName slug → agentName (moltbot handles like @aria untouched — pinned both directions in tests). The signup opener now introduces Scout by name.rename-guide-to-scout.tsmigrates the two DB name sources for existing rows (only rows still named exactly "Guide" — user renames survive).2. Scout sets up local agents —
connect_local_agentactionTypeScout proposes; the owner approves; the executor creates the seat owned by the user (ephemeral registry row + installation, ADR-006 self-serve shape) and the approved card deep-links to the connect page with
?pod=&name=prefilled.The D1 line, drawn deliberately: the executor creates the seat only. The runtime token is never minted on this path — the connect page force-rotates on issue, in the user's own browser session, exactly as today. No payload field ever carries a credential (chat history is member-readable and dual-store mirrored). Pinned by test:
JSON.stringify(executionResult)must not match/token/i.Guards: #609 foreign-name check at propose time (Scout gets an immediate error, picks a new name) and re-checked at execute time (state can change between propose and approve). Existing own install = success (
alreadyInstalled), matching the BYO page's identity-continuity behavior.3.
commonly_agent_status+agentStateService(Raft P4)One derivation of proof-of-life — heartbeats ∪ AgentRuns ∪ token lastUsedAt — extracted from the pod-agents route, which now consumes it (no copy left behind). One bucket vocabulary:
active / idle / stale / never-connected / ready—readyis the honest word for native agents (the #915 lesson: they have no connection to make). Scout answers "is my agent connected?" from the same truth the roster shows, and its prompt maps each bucket to the action that fixes it.Proof
buildAgentUsernamedropped the token source during extraction) — fixed before shipPost-merge: deploy →
rename-guide-to-scout.ts+refresh-native-agent-configs.tson dev → live E2E (ask Scout to set up a seat, approve, land on prefilled connect page).🤖 Generated with Claude Code
https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8