Port Jimmy as @corbits/jimmy-agent - #234
Merged
Merged
Conversation
Ports the agent half only — system prompt, tool declaration and the Giphy search tool body — from the scout repo. Slack dispatch and the interactive shuffle/cancel state machine stay behind; the credential binds host-side through the existing connector machinery.
7 tasks
# Conflicts: # bun.lock
3 tasks
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.
Ports Jimmy from the scout repo into workbench as a self-contained agent package:
@corbits/jimmy-agentcarries the system prompt, the tool declaration, and the Giphy search tool body — the portable half of the agent, percorbitsdev/examples'defineAgent/createAgentsplit.Ported vs. deferred
gif-search-tool.ts, fromscout/packages/jimmy/src/giphy-search.ts), and the system prompt/agent shape (agent.ts, fromindex.ts'sjimmyPackage), trimmed to one tool call and one reply./gif//jimmySlack slash commands, and the 4-up picker + shuffle/cancel signal machine (scout/workflows/jimmy) — built for Slack's interactive buttons, no workbench-chat equivalent exists yet.CredentialCapability.resolve("giphy")seam every tool package in this repo uses (see@corbits/web-search-tools) — never a bare env var, never hardcoded. A missing/unbound credential returns a "connect Giphy"isErrorresult, never a silent empty reply or a thrown error.What is NOT yet wired (correction to this PR's earlier description)
Two integration steps remain before
@Jimmy//jimmyactually resolves in workbench chat — this package alone does not make that happen:giphyconnector exists yet.packages/connections/src/registry.ts'sCONNECTOR_REGISTRYhas nogiphyentry, and none of the three existing credential-provider plugins (http,http-raw-authorization,http-x-api-key) put the secret on the query string the way Giphy's/v1/gifs/searchendpoint requires — a fourth plugin (mirroringhttp-x-api-key-provider.ts, query param instead of header) is the missing piece. Until it lands,gif_searchalways returns the connect prompt.packages/chat'slistInvitableDefinitions(platform-adapter.ts) only returnsworkflowDefinitionrows withstatus: "deployed"for a tenant — that's what makes a name resolvable as@name//name(@corbits/commands'createWorkflowCommandPluginderives one command per invitable definition automatically). This PR ships theAgentDefinitiononly; it does not add awf_jimmyworkflow wrapper (the shape@corbits/code-review-workflowuses over@corbits/code-review's definition) or deploy one to any tenant. Both are needed before@Jimmyresolves to anything in chat.Verification
bun testinpackages/jimmy-agent— 6 pass: a stubbed Giphy response returns a GIF CDN URL; an unbound/absent credential returns the "connect Giphy" error rather than throwing or replying empty.bun run typecheckin-package passes. Repo-rootcheck:packages,check:licenses,check:tool-package-pinsall pass. Repo-rootbun run check/ lint were not run locally (dev-machine memory pressure running many concurrent worktree checks) — left to CI on this PR.