Repository navigation
feat(hub): publish a folder's AI agents with their project - #12490
Conversation
A saved AI agent is an `ai_agent` resource, and the Hub bundle shipped every
resource as an empty stub: a project built around an agent reached the Hub with
the agent's tools and without the agent.
- The publish screen lists a folder's agents as items. An agent is bundled like
the one-step flow a run makes of it, so the scripts its tools run come along
and its `$res:` references (provider, tools' fixed inputs) are relocated by
the same code as a flow's. Its deploy identity and sharing switches stay here.
- Agents are synced as a set after the items (`POST /hub/agents`).
- Its demo is a conversation: "Record conversation" chats with the agent in a
conversation of its own, one run per message, and saves each turn with its
run (`POST /hub/projects/{slug}/agent_recording`).
- Installing a project recreates its agents after the resource stubs they
point at.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Deploying windmill with
|
| Latest commit: |
7d62eb4
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f3348d90.windmill.pages.dev |
| Branch Preview URL: | https://tl-hub-publish-agents.windmill.pages.dev |
The Folders table counted a saved agent among the resources, so a folder built around an agent showed nothing that said so. Agents get their own column, and the resources count is the credentials and other resources only. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Widening the shared layout's item kind broke the workspace deploy screen, which passes that kind on. The layout already draws an agent as a resource row it is told about (isAgent): the publish screen now uses that, and the layout is unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Hub renders recorded agent conversations with the same components as the AI Sessions share page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Claude finished @tristantr's task in 2m 10s —— View job cc @tristantr Should address issues before merging: each recorded turn repeats the earlier turns' tool calls ( FindingsP1: a recorded turn repeats the tool calls of earlier turns. P2: AGENTS.md says not to call P2: raw Checked, no issue found
AGENTS.md complianceThe two P2s above are the only violations I found. The new Test coverage
Manual verification still needed: With a model key, open "Record conversation" on an agent and send two messages, each of which calls a tool. The second turn should list only its own tool calls. Save it, and the Hub page should replay both turns. Then install the published project into another folder through the import wizard. The agent should be created with its tools pointing at the retargeted scripts and its provider pointing at the retargeted stub. Both of these paths are listed as "Not tested" in the PR description. |
- readAgentTurn reads the messages after the turn's own user message: a run with memory returns the whole conversation, so turn N repeated the tools of turns 1..N-1. Covered by a two-turn test. - randomUUID from $lib/utils/uuid instead of crypto.randomUUID, which is missing on instances served over plain http. - The record drawer's message box uses TextInput instead of a raw textarea. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pi ReviewGood to merge The three findings from my prior pass are all resolved in
Considered and dismissed
Test coverage
Manual verification still needed
|
Codex Reviewcc @tristantr Should address issues before merging: MCP resource dependencies omitted, agent-only variables omitted, background tool calls omitted; nit: deprecated Button sizing. [P1] MCP resource dependencies omitted — Publishing an agent with an MCP tool omits that tool’s resource dependency. [P1] Agent-only variables omitted — The new agent retargeting uses a map built through [P1] Background tool calls omitted — A background tool’s completion is emitted as a [P2] Deprecated Button sizing — Both new conversation-recording buttons pass Test coverageThe added frontend tests cover agent bundling/retargeting and ordinary current-turn parsing. Add small pure-logic regression cases for the three functional findings above. No new backend unit or proxy integration tests are included. The package-export and OpenAPI configuration changes do not require automated tests. I ran read-only, in-memory checks against the pinned production TypeScript, reproducing the three functional findings and confirming ordinary two-turn parsing. I did not run Vitest, Rust tests or the application. The author reports publish/draft and renderer checks; full conversation recording and agent installation remain untested. Before merge, publish an agent using an MCP resource and a variable-backed tool input, install it into a different folder, configure its dependencies and run it successfully. Record two messages including a background tool call, then save and reopen the Hub demo. Each turn should retain exactly its own tool calls. |
- extractAgentRefs and rewriteAgentValue read an MCP tool's resource_path, which the flow walker skips, so its resource is stubbed and relocated instead of left pointing at the publisher's path. - collectExportVarPaths visits agents, so a variable only an agent uses is relocated on retarget and gets its placeholder on install. - readAgentTurn ignores the user messages that carry a background tool's result (tagged with agent_action) when finding the turn's start, so a turn that waits on a background tool keeps its call. - The record buttons use unifiedSize instead of the deprecated size. Tests for each. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Codex review addressed in b713d28:
A regression test for each (137 pass in |
Codex Reviewcc @tristantr Should address issues before merging: nested MCP dependencies omitted, linked agent tools not relocated. [P1] Nested MCP dependencies omitted — The added MCP handling visits only the agent’s immediate tools. A supported nested AI-agent tool can itself contain MCP tools, which the delegated flow walker also skips. Against the pinned source, bundling such an agent emitted only its model stub and retained [P1] Linked agent tools not relocated — Delegating to The earlier top-level MCP, agent-only variable, background-call boundary and Button-sizing findings are addressed. Test coverageFrontend tests cover the earlier regressions, but miss both nested dependency cases above. I executed 65 existing No new backend unit or proxy integration tests are included. The package-export and OpenAPI configuration changes need no separate unit tests. I did not run Rust tests or the application. Before merge, publish an agent containing both a nested MCP tool and a linked saved-agent tool, install into another folder, configure the generated stubs and successfully invoke both tools. Full conversation recording remains to be exercised with a model credential: record two messages including a background tool call, save, and reopen the Hub demo to confirm each turn retains its own calls. |
Pi Reviewcc @tristantr Mergeable, but should ideally address nits: silent agent-list error swallow in I re-reviewed the full diff against the prior rounds. The three Codex findings (MCP resource dependencies, agent-only variables, background tool calls) and the two earlier nits ( FindingsP2 — silent swallow of a genuine agent-list failure, made harmful by the full-set sync — this.#listAllPages((p) =>
ResourceService.listResource({ workspace, resourceType: 'ai_agent', ...p })
).catch(() => [])The comment claims the catch is there so "a workspace without the type lists none rather than failing the whole load", but that rationale doesn't match reality: Considered and dismissed
Test coverage
Manual verification still needed before merge: with a model key, open "Record conversation" on an agent and send two messages, at least one of which triggers a background tool; each turn should retain exactly its own tool calls, and saving should produce a Hub demo that replays per-turn. Publish an agent whose tools use an MCP resource and a |
- The flow walker reads, on every aiagent step or tool, the saved agent it links to (`agent`) and its MCP tools' `resource_path`, and the rewriter relocates both keeping their prefix. This covers agents nested as tools and flows with agent steps, not only an agent's own tools. - A referenced `ai_agent` resource is pulled into the bundle as an agent, so a linked agent from another folder ships whole instead of as an empty stub. - The agent list no longer swallows failures: agents sync as a full set, so publishing without them would have removed them from the Hub. Tests for the nested MCP tool, the linked agent's retarget and the linked agent from outside the folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Latest Codex and Pi findings addressed in 3f76368:
Tests for each (140 pass in |
Codex Reviewcc @tristantr Should address issues before merging: linked-tool input resources omitted, resource-backed brain fields omitted. [P1] Linked-tool input resources omitted — A saved agent can contain a linked agent tool whose [P1] Resource-backed brain fields omitted —
Test coverageI executed 68 existing The author reports 140 passing Before merge, publish an agent containing a linked tool with a resource-backed input override and a resource-backed output schema. Install into another folder, fill the generated stubs, and confirm both references resolve there during a successful run. With a model credential, record two conversational turns including a background tool call, save the recording, and reopen the Hub demo. Each turn should retain its own answer and tool calls. |
Pi Reviewcc @tristantr Mergeable, but should ideally address nits: stale doc comments in The four prior review rounds are fully addressed in the latest commits, and a fresh pass over the full diff turned up no remaining functional or security issues. One P2 nit remains. FindingsP2 — doc comments not updated for the new agent/MCP extraction — Two function-level doc comments now describe less than the code does:
Both are the same class of stale comment the diff otherwise carefully updated elsewhere ( Considered and dismissed
Test coverage
Manual verification still needed: with a model key, open "Record conversation" on an agent, send two messages that each call a tool (including one background tool call), save, and reopen the Hub demo — each turn should retain exactly its own tool calls and the Hub page should replay the conversation via the exported components. Separately, install a project that ships an agent into a different folder and confirm its provider/tool |
Bundling
- A saved agent is read unvalidated and its tools nest, so references are no
longer looked up field by field. One walk over the whole value serves
extraction, rewriting and the install check: whole-string $res: values,
$res: tokens in rawscript content, and the shapes that name things by path
({type: script|flow, path}, {type: aiagent, agent}, {tool_type: mcp,
resource_path}) wherever they sit. Covers tool_inputs, output_schema and
any key added later.
- Inputs are read as the worker reads them: a static value is data (only
whole-string refs count), a JavaScript expr is never resolved. Only on real
input entries, so nothing can be hidden beside them from the install check.
- Prose holding a $res: token mid-sentence is no longer a reference.
- enabled_tools follows an MCP server to its new path.
- An agent named by a trigger is shipped whole like one an item references.
Recording
- An agent parked on an approval or a question is detected and its run
cancelled with a clear message; closing the drawer or disposing the session
cancels the run in flight.
- Turns no longer keep the whole run: it names who ran it and holds the agent
as the workspace stores it. Structured-output calls are not shown as tools;
web searches are.
- Send is disabled while saving; a failed message is handed back to retype; a
save does not close another agent's drawer.
- The empty agent sync ignores only a 404.
Backend: agent_recording requires the recording key (null clears). OpenAPI:
agents is required in folder usage.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Addressed in f12a0c7, aiming to close the class rather than the next instance:
212 tests pass in |
Codex ReviewGood to merge The previous findings are addressed. I found no further confident functional, security, performance, or AGENTS.md issues in the final diff. Test coverageAll 76 Frontend regression tests cover dependency extraction, relocation, bundling, and turn parsing; component tests are unnecessary. No new Rust unit or integration tests cover the proxy routes or folder-count query. Package-export and OpenAPI configuration changes need no separate unit tests. Before merge, publish an agent using nested MCP tools, linked agents, resource-backed inputs/schema, and variables. Install it into another folder, configure its stubs, and confirm successful execution through the relocated dependencies. With a model credential, record two conversational turns including a background tool call, save, and reopen the Hub demo. Each turn should retain its own answer and calls. Also confirm closing the drawer cancels an active run and an approval/question produces the cancellation message. |
Pi ReviewGood to merge I re-reviewed the full diff (base Considered and dismissed
Test coverage
Manual verification still needed before merge: with a model credential, open "Record conversation" on an agent and send two messages (one using a background tool), save, and confirm the Hub page replays each turn with exactly its own tool calls; and install a project that ships an agent (ideally one with an MCP tool or a resource-backed input/schema) through the import wizard into a different folder, fill the generated stubs, and run it successfully. The PR body already flags both as untested, so these remain the only unexercised paths. |
| {turn.user_message} | ||
| </div> | ||
| </div> | ||
| {#if turn.tool_calls.length > 0} |
There was a problem hiding this comment.
Request: draw the recorder with the same chat components as the Hub replay
The recorder draws the conversation with its own markup: bubbles, plus one chip per tool showing only its name. The Hub draws the saved recording with Windmill's read-only AI chat components (AIChatMessage, ToolGroupDisplay, readOnlyChatViewHost), which this PR exports for that purpose. That causes two problems:
- The person recording can't see what gets published. Each saved
AgentTurnkeeps every tool call'sargsandresult, and on the Hub page a visitor can expand a tool call to read them. The recorder shows only the tool name. The component's doc comment says "the recorder sees the answers and the tools called before keeping it", but a tool result goes to the Hub without anyone having seen it. Tool results are the part most likely to carry data the publisher didn't mean to share, such as a customer record a lookup tool returned. - The same conversation looks different on the two sides, so the recorder isn't a preview of the demo.
Suggestion: the components live in this repo, so AgentRecordSession can render them directly. The conversion from AgentTurn[] to DisplayMessage[] exists today only on the Hub side (AgentView.svelte in windmillhub). If it moves here, next to readAgentTurn, and gets exported, both sides share one mapping, and the recorder shows the same expandable tool calls a visitor will see.
There was a problem hiding this comment.
Done in ce668e3. The recorder now draws the conversation with a new recording/AgentRecordingTranscript.svelte (AIChatMessage, ToolGroupDisplay, readOnlyChatViewHost), so each tool call expands on its arguments and result before anything is saved. The AgentTurn[] to DisplayMessage[] mapping moved here as recording/agentRecording.ts; both are exported from the package. The Hub page (windmillhub#237) still has its own copy until the package release it is waiting on; it will switch to these two in the same bump.
Guilhem-lm
left a comment
There was a problem hiding this comment.
A few more points from a review of the head commit. The first is a bug; the other three are cleanup requests.
| // An agent is the one resource a project ships whole: its prompt, model and tools are the | ||
| // product, and it holds no credential, only `$res:` references to stubs created above. | ||
| // Never overwrites: a path collision is reported as a failed item, like a stub's. | ||
| function importAgent(workspace: string, a: ExportItem): Promise<unknown> { |
There was a problem hiding this comment.
[P2] Bug: install keeps the identity switches that publish strips.
On publish, fetchItem drops on_behalf_of, run_on_behalf_of and slack_anyone because they "belong to this workspace and never leave it". The Hub stores an agent's value whole (projects/[slug]/agents/+server.ts only runs the secret scan), and importAgent writes a.value as it comes. A project published through the Hub API, rather than through this screen, can therefore carry run_on_behalf_of: true and slack_anyone: true.
I checked the backend half locally: creating an ai_agent resource with {run_on_behalf_of: true, slack_anyone: true, on_behalf_of: "u/someone_else"} stores run_on_behalf_of: true, slack_anyone: true, on_behalf_of: "u/admin". resolve_agent_on_behalf_of drops the shipped identity and binds the agent to the installer, or to the folder's default when there is one. From then on, anyone who can read the agent runs its tools, inline code included, as the installer. With slack_anyone on, so can anyone in a Slack channel the agent is shared to.
Suggested fix: drop the same three keys in importAgent. Ideally one exported list would serve publish and install; the backend strips the same three keys in agent_runs.rs:211.
There was a problem hiding this comment.
Fixed in ce668e3. importAgent now drops the three keys through withoutAgentWorkspaceKeys (in projectBundle.ts), the same helper publish uses, so there is one list. Thanks for checking the backend half.
| } | ||
|
|
||
| /** The call a structured answer is given through: the answer itself, not a tool of the agent. */ | ||
| const STRUCTURED_OUTPUT_CALL = /^structured_output(_\d+)?$/ |
There was a problem hiding this comment.
[P2] Request: build readAgentTurn on parseAgentResult, and keep one copy of this regex.
STRUCTURED_OUTPUT_CALLis a verbatim copy offlows/conversations/flowChatViewHost.svelte.ts:255. If the worker changes how it names the structured-output call, one copy gets updated and the other doesn't.readAgentTurnreadsresult.messagesasany[].$lib/components/aiAgentResult.tsalready hasparseAgentResultand theAgentMessage/AgentActiontypes for this result.- It's a pure function inside the 2000-line session module, so
readAgentTurn.test.tsimports the whole session ($lib/gen, toast, stores) to test it.
Moving it next to parseAgentResult, built on top of it, with the regex exported once, would fix all three. The test would move with it.
There was a problem hiding this comment.
Done in ce668e3. readAgentTurn lives in aiAgentResult.ts, built on parseAgentResult and the AgentMessage types; STRUCTURED_OUTPUT_CALL is exported from there and flowChatViewHost imports it. The tests moved into aiAgentResult.test.ts.
| if (!v || typeof v !== 'object') continue | ||
| if (v.type === 'script' && typeof v.path === 'string') add('script', v.path) | ||
| if (v.type === 'flow' && typeof v.path === 'string') add('flow', v.path) | ||
| if (v.type === 'aiagent') { |
There was a problem hiding this comment.
[P2] Request: one place that recognises the agent shapes.
walkAgentConfig's doc says one walk serves both reading and rewriting "so the two cannot disagree". The flow path still recognises the same shapes by hand, twice: a linked agent, the MCP resource_path loop over v.tools, and enabled_tools. Here in extractFlowRefs, and again in rewriteFlowValue (around line 554). The two agree today, but this is the kind of read/rewrite pair the walk was meant to replace. Passing the step's agent part (agent, tools, tool_inputs) through collectAgentConfigRefs / rewriteAgentConfig would leave one definition of each shape.
Two smaller comment points in the same file:
- The doc block at lines 109-132 runs to about 24 lines and sits on
type AgentRefResolverrather than onwalkAgentConfig. AGENTS.md asks for each invariant stated once, in at most 4 lines, where someone would break it. extractAgentRefssays "seecollectAgentConfigRefs", butcollectAgentConfigRefshas no doc comment.
There was a problem hiding this comment.
Done in ce668e3. extractFlowRefs and rewriteFlowValue now hand the step's agent part (agent, its MCP tools, tool_inputs, enabled_tools) to collectAgentConfigRefs / rewriteAgentConfig via agentStepConfig; module tools stay with the flow walk. The doc block is cut down and sits on walkAgentConfig, and extractAgentRefs points there.
| recording: Option<Option<serde_json::Value>>, | ||
| } | ||
|
|
||
| fn deserialize_explicit_recording<'de, D: Deserializer<'de>>( |
There was a problem hiding this comment.
[P2] Request: make deserialize_explicit generic instead of copying it.
This copies deserialize_explicit (line 392) with only the type changed. A generic version serves both, and any later double-Option field:
fn deserialize_explicit<'de, T: Deserialize<'de>, D: Deserializer<'de>>(
d: D,
) -> Result<Option<Option<T>>, D::Error> {
Option::<T>::deserialize(d).map(Some)
}There was a problem hiding this comment.
Done in ce668e3: deserialize_explicit is generic and serves both fields.
…agent walk - importAgent drops on_behalf_of, run_on_behalf_of and slack_anyone, through the same helper as publish: an export written through the Hub API could otherwise bind the agent to whoever installs it. - The recorder draws the conversation with AgentRecordingTranscript, the AI chat's read-only components, so tool arguments and results are seen before they are saved. The component and the turns-to-messages mapping are exported for the Hub page to use the same ones. - readAgentTurn moves to aiAgentResult.ts on top of parseAgentResult; STRUCTURED_OUTPUT_CALL has one copy. - The flow walker hands an aiagent step's agent part to walkAgentConfig instead of recognising the shapes itself; comments trimmed. - deserialize_explicit is generic. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codex ReviewGood to merge The previous findings are addressed. I found no further confident bugs, security issues, performance regressions, or AGENTS.md violations at Test coverageAll 77 Frontend tests cover dependency extraction, relocation, bundling, identity-key removal, and turn parsing; component tests are unnecessary. No new Rust unit or proxy integration tests cover the backend changes. Package-export and OpenAPI configuration changes need no separate tests. Manual verification remains: publish an agent with nested MCP tools, linked agents, resource-backed inputs/schema, and variables; install into another folder, configure its dependencies, and run it successfully. With a model credential, record two turns including a background tool call, save, and reopen the Hub demo to verify answers, calls, arguments, and results. Confirm closing the drawer cancels an active run and an approval/question produces the cancellation message. |
Pi ReviewGood to merge I re-reviewed the full diff (base Considered and dismissed
Test coverage
Manual verification still neededPublish a folder containing an agent with a linked saved-agent tool, an MCP tool, a resource-backed input override and a |
The record drawer embeds FlowChat as the agent page's Chat tab does (new conversation, no sidebar), so the recorder uses the same composer, transcript, tool cards and approval/question handling. Saving reads each answered message off its completed run with readAgentTurn; failed or unfinished runs are left out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/review |
|
Claude finished @tristantr's task in 2m 26s —— View job cc @tristantr Mergeable, but should ideally address nits: Save drops a still-running message without saying so, no memory-off warning in the recorder. This pass focuses on FindingsP2: Save drops a message that is still being answered, without telling the recorder. P2: no warning for an agent without managed memory. Checked in the new commit, no issue found
AGENTS.md complianceI found no violation in the new commit. Comments state constraints, and the buttons use Test coverage
Manual verification still needed: with a model key, open "Record conversation" on an agent and send two messages, one that calls a tool and one that triggers an approval. Answer the approval in the drawer. Each message should run in a new conversation, which later shows up in the agent page's chat list. Save once both have answered: the Hub page should replay both turns, each with only its own tool calls. Separately, send a message and press Save before it answers, and check what the recorder is told. As before, installing a project that ships an agent into another folder through the import wizard is still unexercised. |
Pi Reviewcc @tristantr Mergeable, but should ideally address nits: in-flight agent run is no longer cancelled when the record drawer closes. The prior rounds are all resolved; the only new issue is in the final commit FindingsP2 — closing the record drawer (or disposing the session) leaves an in-flight agent run running, orphaned from the recording —
It is also orphaned from the recording's point of view: Considered and dismissed
Test coverage
Manual verification still needed: with a model credential, open "Record conversation" on an agent, send a message that runs for a while (or parks on an approval/question), then close the drawer before it completes and confirm the run is cancelled rather than continuing to completion in the background. Then complete a two-message recording end to end, save, and confirm the Hub demo replays each turn's own answer and tool calls. |
Codex Reviewcc @tristantr Should address issues before merging: existing-resource setup breaks imported agents. [P1] Existing-resource setup breaks imported agents — The new agent import leaves provider/tool references pointing at the project’s resource stubs, but setup’s “use an existing resource” operation never scans or rewrites agents. Test coverageAll 105 existing Frontend logic has regression coverage; add a case for reusing an imported agent’s credential. Component tests are unnecessary. The backend proxy/count changes have no new unit or integration tests. Package exports and OpenAPI configuration need no separate tests. Before merge, import an agent project, reuse an existing provider/MCP resource during setup, and confirm the agent runs through the replacement. Also record two conversational turns, including a background tool call, then save and reopen the Hub demo to verify its answers and tool calls. |
- "Use an existing resource" now sees saved agents: each ai_agent resource is read, those in the project have their resource references moved (provider, MCP servers, tool inputs) with the run identity preserved, and any reference left unmoved, outside the project or unreadable keeps the stub. Before, the stub could be deleted under an agent still reading it. - Closing the record drawer or disposing the session cancels the run in flight, which the chat stops following but does not stop. - Saving waits for the message being answered instead of leaving it out, and says how many failed messages were left out. - The recorder warns when the agent keeps no managed memory. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Addressed in c3426ba:
|
Codex Reviewcc @tristantr Should address issues before merging: resource reuse disables nested MCP tools; closing during run submission leaves the job running. [P1] Resource reuse disables nested MCP tools — The new helper calls [P1] Closing during run submission leaves the job running — Cancellation only sees IDs already in Test coverageAll 128 existing Frontend coverage misses the two cases above; component tests are unnecessary. The backend proxy/count changes have no new unit or integration tests. Package-export and OpenAPI configuration changes need no separate unit tests. Frontend dependencies and application servers were unavailable; I did not run Vitest, Rust tests, or the application. Import an agent project into another folder, select an existing MCP resource during setup, and confirm a nested agent with an explicit tool selection can still invoke that server. With a model credential, record two turns including a background tool call and an approval, then save and reopen the Hub demo. Also delay the run-start response and close the drawer before it returns; verify the resulting job is cancelled. |
Pi ReviewGood to merge I focused on the latest commit FindingsNone. Considered and dismissed
Test coverage
Manual verification still neededWith a model credential, open "Record conversation" on an agent with managed memory, send two messages (including one that calls a tool and one that parks on an approval), answer the approval, then save: the Hub demo should replay both turns with only their own tool calls, and closing the drawer mid-run should stop the run (no further tool calls/token spend). Separately, import a project that ships an agent using a provider and an MCP tool, choose "use an existing resource" during setup, and confirm the agent's references point at the replacement and a successful run. These paths remain unexercised end-to-end, as the PR body notes. |
- rewriteAgentResourceRefs goes through rewriteAgentConfig, so the enabled_tools entry naming an MCP server follows it when an existing resource replaces the stub. The worker matches names exactly and dropped the server otherwise. - A run whose id comes back after the record drawer closed is cancelled: it was not tracked yet when the close looked for a run to stop. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Both Codex P1s addressed in 3e08ea3:
|
Pi ReviewGood to merge I reviewed the full diff (base The two latest fixes, verified
Considered and dismissed
Test coverage
Manual verification still needed: with a model credential, record two conversational turns including a background tool call and an approval/question, answer it in the drawer, save, and reopen the Hub demo to confirm each turn keeps only its own answer and tool calls. Separately, import an agent project into another folder, choose an existing MCP resource during setup, and confirm a nested agent with an explicit tool selection still invokes that server. Also delay the run-start response and close the drawer before it returns, verifying the resulting job is cancelled (the fix just added for that path). Installing a project that ships an agent through the import wizard remains unexercised. |
Codex ReviewGood to merge Both findings from the previous Codex review are addressed. I found no new confident bugs, security issues, performance regressions, or AGENTS.md violations at Test coverageAll 72 The new regression covers nested MCP selection during resource reuse. Svelte component tests are unnecessary. The backend proxy/count changes have no new Rust unit or integration tests. Package exports and OpenAPI configuration need no separate tests. Frontend dependencies were unavailable; I did not run Vitest, Rust tests, or the application. Manual verification remains: publish an agent project, import it into another folder, select an existing MCP resource during setup, and confirm a nested agent with an explicit tool selection can invoke that server. With a model credential, record two turns including a background tool call and an approval, answer the approval, then save and reopen the Hub demo. Confirm both turns retain their answers and tool calls. Delay a run-start response and close the drawer before it returns; verify the resulting job is cancelled. |
Pi ReviewGood to merge The head Considered and dismissed
Test coverage
Manual verification still outstanding (not blocking, and unchanged from the last round): with a model credential, record two conversational turns including a background tool call and an approval, save, and reopen the Hub demo to confirm each turn retains its own answer and tool calls; and import an agent project into another folder, select an existing MCP/provider resource during setup, and confirm the agent runs through the relocated references. |
Codex ReviewGood to merge No new confident bugs, security issues, performance regressions, or AGENTS.md violations found at Test coverageFrontend pure-logic tests cover agent dependency extraction, relocation, identity stripping, resource reuse, and conversation parsing. Component tests are unnecessary. The focused Vitest command could not run because frontend dependencies are absent (
Before merge, publish an agent project, import it into another folder, reuse an existing provider/MCP resource during setup, and confirm nested agents retain their selected MCP tools and execute successfully. With a model credential, record two turns including a background tool call and an approval, answer the approval, then save and reopen the Hub demo. Confirm both turns retain their answers and calls. Also close the drawer while a run-start response is delayed and confirm the returned job is cancelled. |
Problem
A saved AI agent is an
ai_agentresource, and the Hub bundle ships every resource as an empty stub. Publishing a folder built around an agent sent the agent's tool scripts and not the agent: the publish screen did not even list it.What this changes
$res:references (provider, tools' fixed inputs) are relocated by the same code as a flow's. An agent the bundle ships is not also turned into a stub. Its deploy identity (on_behalf_of) and sharing switches stay in the workspace.POST /hub/agents).runAgentwith a freshmemory_id), and saves the turns, each with its run as aFlowRecording(POST /hub/projects/{slug}/agent_recording).@windmill-labs/components: exports the read-only AI chat components (AIChatMessage,ToolGroupDisplay,ChatTypingIndicator,chatViewHost,readOnlyChatViewHost,toolGroups,shared), so the Hub draws a recorded agent conversation like the AI Sessions share page.hub_publish.rs; the folder usage query counts agents.Needs the Hub side: windmill-labs/windmillhub#237. Against a Hub without it, a folder with no agent publishes as before. The Hub renders conversations with the components exported here, so it needs a package release that includes this PR.
Tested
workspaceSettings).svelte-check: no error in the changed files.Not tested
Notes
🤖 Generated with Claude Code