CL-6499: Seed Scout and Jimmy as workbench-template participants - #240
Merged
Conversation
…te route A template-driven create (Scout, Jimmy) needs to pin tool packages the same way a hand-authored definition never has to; these tests state the route's expected behavior ahead of adding the field.
…n route A person hand-authoring an agent through a form has no affordance for typing a tool-package pin, but a template-driven create does need one (Scout's memory/web-search/artifact tools, Jimmy's Giphy search) — this adds an optional, name-only field, scoped to @corbits packages, that a programmatic caller can set and the form never sees.
States the expected shape ahead of adding the templates and their request wiring: a due-diligence bench creates Scout (never Myra a second time), a default-teammates bench creates Jimmy the same way, neither blocks on a connection, and re-instantiating either is a no-op skip rather than a duplicate.
…ants Adds two templates the "new workbench" picker can offer: due-diligence (Myra + Scout) and default-teammates (Myra + Jimmy). Both agents are standalone chat participants with no block workflow of their own, so `WorkbenchTemplateParticipant.blockAssetName` becomes optional rather than every participant needing one to reference. `instantiateWorkbenchTemplate`'s create-request lookup was hardcoded to the code-review reviewer roster; it now also resolves Scout's and Jimmy's own definitions into the same agent-directory create-request shape, tool-package pins included, so their creation goes through exactly the mechanism the code-review reviewers already use — same idempotency check (skip a handle that already exists), same "never recreate Myra" rule, and no required connection blocks either bench (Exa is a keyless MCP preset; Jimmy's own tool degrades to a "connect Giphy" reply rather than failing). Depends on #234 (@corbits/jimmy-agent) and #235 (@corbits/scout-agent) merging first — this package now depends on both by name.
Both packages pin themselves in their own toolPackagePins (Scout's
artifact save/list tools, Jimmy's gif_search) — without an entry here
that self-pin can never resolve to a real tarball or a tool:* grant.
Note for review: registering @corbits/scout-agent here surfaces a real
defect in it, not introduced by this change — its artifact-tool bundle
id ("@corbits/scout-agent/artifacts") combined with
"scout_list_recent_artifacts" produces a 71-char qualified tool name,
over this package's own 64-char OpenAI-compatible cap
(tool-name-limits.test.ts). That needs a fix on the Scout side (a
shorter bundle id or tool name) before this package's suite is green
with Scout's directory present.
3 tasks
…ays clean The template catalog is browser-reachable and imported each agent package's index, which re-exports tool bodies that import defineTool from @intx/agent — whose module graph reaches node:path. Jimmy's plain-data identity moves to its own module and Scout's already-clean definition gets a subpath, so the catalog imports identity without pulling tool bodies.
# Conflicts: # bun.lock
# Conflicts: # bun.lock
…l-name cap @corbits/scout-agent's list_recent_artifacts tool, qualified with its bundle id, encodes to 65 chars on the wire — one over the 64-char OpenAI-compatible cap tool-registry-publish's tool-name-limits suite enforces. These tests assert the shorter list_artifacts name instead.
Fixes the structural and build-test CI failures: the qualified name "@corbits/scout-agent/artifacts:list_recent_artifacts" encodes to 65 chars on the wire, one over the 64-char OpenAI-compatible cap every corbits tool package is checked against. Shortening the tool name (rather than the bundle id) keeps the fix scoped to this one bundle.
Asserts the "connect Giphy" result carries {kind: "missing-credential",
connectorId: "giphy"} in its detail field, not just a plain error
string.
…etail Jimmy's Giphy tool degraded to a plain error string when no Giphy credential was bound. It now also carries the missing-credential-detail wire shape (@corbits/connections' contract), so the chat orchestrator renders a real "Connect Giphy" card instead of dead-ending on text. The shape is reproduced locally rather than imported, matching @corbits/github-tools' own convention: no dependency on the connections package is needed to produce it, only the orchestrator needs to parse it.
Jimmy is not a "kind of workbench" — he's a single teammate, not a research bench or a code-review bench. Per the owner's own framing, he should be an agent that's easy to add to any workbench, not a picker entry that mints a whole new room. The due-diligence template (Scout) stays: it's a genuine kind of workbench, modeled on code-review's own template shape. jimmyAgentRequest() and instantiateWorkbenchTemplate's participant lookup keep resolving his handle, so a future template naming him still works with no new plumbing — only the picker entry is gone. Jimmy's actual create path moves to chat-ui's invite dialog (next commits).
Covers quickCreateJimmy's request shape and the InviteAgentDialog's "Add Jimmy" row: it appears only when Jimmy is absent from the tenant's invitable list, and clicking it creates and then invites him through the same onInvite seam every other row uses.
Jimmy is no longer seeded through a workbench template (previous commit), so this is his one remaining create path: InviteAgentDialog now offers a quick-create row whenever the tenant's invitable list is missing his handle. Clicking it calls quickCreateJimmy (the same one-shot POST /agent-definitions a template's participant create used to go through, using jimmyAgentRequest()'s own request shape) and then invites the created definition through the dialog's existing onInvite seam — reusing its loading/error/close handling as-is. @corbits/workflow-catalog moves from a devDependency to a runtime one: jimmyAgentRequest() is now called from production code (api.ts), not just tests.
Records that Jimmy installs via chat-ui's "Add Jimmy" row rather than a template, and that his "not connected" result now carries the missing-credential-detail contract — while being explicit that a real "Connect Giphy" flow still needs a CONNECTOR_REGISTRY entry and a query-param credential-provider plugin, neither of which exist yet.
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.
Summary
Wires
@corbits/scout-agent(#235) and@corbits/jimmy-agent(#234) into the repo's existing agent-availability mechanisms, per the owner's clarified product shape:due-diligence("Research & due diligence"), modeled directly oncode-review's own template shape: Myra plus a standalone chat-agent participant, no block workflow of its own, Exa offered but never required.@corbits/chat-ui'sInviteAgentDialog: an "Add Jimmy" quick-create row appears whenever the tenant hasn't created him yet, and one click creates his real agent-directory definition (the same one-shotPOST /agent-definitionsa template's participant create goes through) and invites him into the open workbench.What changed and why
packages/agent-directory—POST /agent-definitionsgained an optionaltoolPackagePinsfield (name-only,@corbits/*scoped), needed by both Scout's template create and Jimmy's quick-create.packages/workflow-catalog:WorkbenchTemplateParticipant.blockAssetNameis optional (Scout has no block of its own).instantiateWorkbenchTemplateresolves Scout's (and, for forward-compat, Jimmy's) definition into the create-request shape viaparticipant-agent-requests.ts.DUE_DILIGENCE_TEMPLATEis registered inWORKBENCH_TEMPLATES.DEFAULT_TEAMMATES_TEMPLATEhas been removed — Jimmy is no longer offered in the "new workbench" picker.packages/chat-ui—InviteAgentDialoggained an "Add Jimmy" quick-create row (quickCreateJimmyinapi.ts), shown whenever Jimmy's handle is absent from the tenant's invitable list. Clicking it creates his definition and invites him in one flow, reusing the dialog's existing loading/error/close handling.packages/jimmy-agent—gif_search's "not connected" result now also carries themissing-credential-detailwire contract (@corbits/connections), so the chat orchestrator renders a real "Connect Giphy" card instead of a plain error string. Note: clicking that card still can't complete a connection today — nogiphyentry exists inCONNECTOR_REGISTRY, and none of the three existing credential-provider plugins put a secret on the query string the way Giphy's API requires. That gap is unchanged from Port Jimmy as @corbits/jimmy-agent #234 and stays flagged as follow-up work in the package's own README.packages/scout-agent— renamedlist_recent_artifactstolist_artifacts: qualified with its bundle id, the longer name encoded to 65 chars on the wire, one over the 64-char OpenAI-compatible tool-name captool-registry-publishenforces. This was the root cause of bothstructuralandbuild-testCI failures.packages/tool-registry-publish—@corbits/scout-agentand@corbits/jimmy-agentregistered inCORBITS_TOOL_PACKAGE_DIRS.What the owner does to see each
@scout(or/scout) is addressable in that bench, and tenant-wide afterward (listInvitableDefinitionshas no per-bench scoping).Jimmy is not present automatically in every workbench with zero clicks — building that would mean deploying a non-block agent-directory participant through the onboarding/tenant-provisioning pipeline, which is shaped entirely around workflow-asset deployments today (
DEFAULT_WORKFLOWS), not direct agent-directory creates, and carries a large, sensitive existing test surface (~1200 lines) that a hasty change there risks breaking. The quick-create row is the honest, scoped alternative: one obvious click, in any bench, rather than a silent background change to the sign-in path.Test plan
packages/workflow-catalog:bun test(94 pass),bun run typecheckcleanpackages/chat-ui:bun test(654 pass),bun run typecheckcleanpackages/jimmy-agent:bun test(6 pass)packages/scout-agent:bun test(15 pass)packages/tool-registry-publish:bun test(61 pass, was 1 fail)apps/web:bun run typecheckcleanbun run check:structuralclean