Repository navigation
feat(client): manage imported agents from Settings - #85
Jacksondr5 merged 13 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
3edb0f6 to
0136636
Compare
0136636 to
ef60657
Compare
ef60657 to
e144154
Compare
e9de0a9 to
4f84fa7
Compare
|
Closing: the two subagent label helpers existed only to feed the Agents panel restyle in #86, which is dropped from this stack to keep upstream rebases clean. The branch is kept as a pass-through pointing at #84's tip so #118 keeps a correct base; GitHub's stack feature refuses base changes through the API. |
272c15e to
cc49038
Compare
cc49038 to
9af806b
Compare
tyler-barton-horizon
left a comment
There was a problem hiding this comment.
Found one functional issue in the stack review:
Settings exposes the destructive remove action for every persona row, including bundled examples, and the server-side complete removal records the id in removed-source-agent-personas.json before deleting any imported override. That makes the agent disappear from future catalogs. The docs say users can restore by using Import -> Agent file with the original definition, but imports only accept .yaml/.yml while the bundled examples in this stack are shipped as JSON (apps/server/src/j5/agents/examples/*.json).
So removing a bundled agent like scout or builder is effectively irreversible from Settings unless the user manually converts/recreates YAML or edits environment state. That feels like a one-way door in a normal Settings workflow.
Suggested fixes: add an explicit Restore/Reset action for removed source/bundled agents, hide/remove-disable the trash action for bundled examples until restore exists, or ship supported YAML copies of the bundled definitions and point the docs at that supported restore path.
I checked the existing Bryant-stack comments before posting this. The earlier #75 review themes appear addressed in the combined stack, and I did not see this specific issue already raised.
|
Thanks for the catch, Tyler. Agreed it was a one-way door once imports went YAML-only. Fixed in 789a499cf with an explicit Restore action:
Zero new upstream-file lines: the RPC rides the J5 group that is already merged into |
requested a followup review after pushing a new commit.
2969c37 to
95cfbff
Compare
…wned files Web and mobile now read the persona library through J5 atoms instantiated in src/j5/agents/agentPersonaAtoms.ts, the assignment lock controls move into J5 components that the composers render with one conditional, and the mobile library screen draws its own header row so the shared SettingsSection stays at its upstream shape. FORK.md rows point at the new locations. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The web file picker accepts only YAML, the mobile picker test uses YAML names, and the user, operations, product, and FORK docs describe the YAML-only import and source-folder behavior. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Removing a bundled or folder-loaded agent used to be reversible only by importing its original file, which YAML-only imports made impossible for the compiled-in examples. The catalog now lists excluded source definitions as removed entries, a restoreSourceAgentPersona RPC in the J5 group clears the exclusion, and both settings screens show Restore in place of the trash for those rows. Docs describe the new path. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A Create agent button beside Import opens a dialog (web) or sheet (mobile) for a name, stable ID, description, markdown instructions, runtime policy, and primary/fallback models. The server builds a version-1 definition with a declared Response artifact and stores it as an imported agent, so it is editable, switchable, and removable like any import. The route and policy fields are shared with the edit dialogs. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ttings The edit dialog and sheet load an agent's instructions on open and save them with the other fields. Every listed agent, including bundled examples and removed sources, gains a more menu with Duplicate as personal agent, which prefills the create dialog with a fresh ID, and Export YAML, which downloads or shares the definition. A new read RPC in the J5 group serves all three. The handoff fields acceptedInput, inputArtifacts, and outputArtifact are now optional in the definition schema, so personal agents carry no synthetic artifact. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Every catalog entry now carries its content digest, so the assignment lock controls on web and mobile compare the thread's launch snapshot with the current library and show a Changed badge with the remedy when they differ. Legacy snapshots without a digest and agents no longer listed show nothing. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…nvironment Three saved-agent library enhancements, all in the J5 module and the J5 settings screens, with no new upstream touches. Usage: a getAgentPersonaUsage RPC aggregates tasks, runs, completed and failed counts, mean completed-run duration, provider-reported tokens, last launch, and the resolved routes per agent from the existing thread, run, and provider-turn projections through json_extract on payload_json. Nothing is persisted. Each row in Settings shows the summary once the agent has launched a task. Library sources: catalog entries carry an origin (bundled, imported, or the source folder file), shown as a badge. A Library sources section lists the configured folders with existence and definition counts, adds and removes them by rewriting agent-personas.json through setAgentPersonaLibraryFolders, and surfaces two read-only git nudges (uncommitted changes, remote ahead) plus an open-in-editor action on web. The server only runs git status. Copy to environment: the row's more menu imports the agent's YAML into another connected environment through the existing import and conflict flow. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
95cfbff to
a56b373
Compare
Users can import portable JSON or YAML agents from an individual file or a folder into the selected environment, then edit, enable, disable, or remove the imported copies in Settings. Duplicate imports ask which agents to replace, preserving skipped copies and existing on/off settings.
The Import menu sits beside Scoped agents. Compact rows show availability beside the name, with edit and destructive trash controls; action feedback uses toasts. The editor changes only the imported copy. Model menus show only signed-in, enabled providers with available models; hovering opens their models to the side. Model and reasoning pickers sit side by side. Reasoning stays separate and offers every reasoning option advertised by the selected model; unrelated edits preserve existing values. Assigned tasks retain their saved persona and fixed model route in both composers.
Web and desktop share the Settings UI; mobile provides native file/folder pickers, replacement toggles, and editing. The rebase preserves upstream's new composer behavior and semantic mobile theme classes, and keeps editor actions visible while fields scroll.
Validation
UI evidence
Before: published original stack UI. After: rebased imported-agent Settings UI. Additional images show the editor and per-agent replacement choices.
Current editor: signed-in provider submenus and side-by-side model/reasoning controls. The earlier editor image above shows the previous layout.
Reasoning menu before restoring all options:
Reasoning menu after restoring all options:
Merge order
Part of GitHub stack
120. Merge from bottom to top:#75 → #76 → #78 → #79 → #80 → #81 → #83 → #82 → #85 → #118
Stack rebuilt 2026-09-09 (stack pingdotgg#120): #84 and #86 were dropped, and fork-boundary refactors moved the persona RPCs, guards, and client wiring into J5-owned files. Review threads were preserved.
Generated with GPT-6 using the Codex desktop app.
2026-09-10 additions: a Create agent button beside Import authors a personal agent (name, stable ID, description, markdown instructions, runtime policy, primary/fallback models) stored as an imported definition, on web and mobile; and removed example or folder agents now stay listed as Removed with a Restore action (Tyler's review finding). Both ride the existing J5 RPC group with no new upstream files.
Later on 2026-09-10: the edit dialog and sheet now load and save instructions; every row gains a more menu with Duplicate as personal agent (prefilled create dialog with a fresh ID, the way to build on a bundled example) and Export YAML; and
acceptedInput,inputArtifacts, andoutputArtifactare optional in the definition schema so personal agents carry no synthetic artifact. One new read RPC in the J5 group serves all three.Also on 2026-09-10: every catalog entry carries its content digest, and the assignment lock controls on web and mobile show a Changed badge when a thread's launch snapshot no longer matches the current definition (roadmap item 4).
Later on 2026-09-10 (roadmap items 1, 2, 4, 5, then 7, 8, 9): editing instructions in the app through a
readAgentPersonaRPC, Duplicate as personal agent and Export YAML, a Changed drift badge on locked threads, and optional handoff-artifact fields for personal agents. The final pass adds a per-agent usage line (tasks, runs, completed/failed, mean duration, provider-reported tokens, last launch, resolved routes) aggregated on request from the existing thread, run, and provider-turn projections; an origin badge plus a Library sources section that lists, adds, and removes folders inagent-personas.jsonwith read-only git nudges (uncommitted changes, remote ahead) and open-in-editor on web; and Copy to environment in the row menu. Three more methods on the J5 RPC group, no new upstream touches. Verified with the server J5 suite (88 tests), client-runtime (39), web (22), and mobile (4), plus typecheck and lint on every touched package.2026-09-11: Add folder in Library sources opens a folder picker that browses the environment's filesystem through the existing filesystem browse RPC (web dialog, mobile sheet) instead of a typed path field; the resolved absolute path is what gets saved.