Repository navigation
feat(studio): X05 deploy builds the published version - #1122
Merged
Merged
Conversation
POST /agents/:id/deploy now reads the pinned version through readPublishedSpec, writes its snapshot to .lousho/agents/<id>/published.yaml and passes that file to `lousho build --agent=` - the working copy is never what gets built. Unpublished agents answer 409 LOUSHO_NOT_PUBLISHED before anything spawns; DeployResult carries the built `version`. publishAgent rewrites published.yaml whenever the pointer moves (best effort - a write failure logs, never fails the publish), so `lousho mcp .lousho/agents/<id>/published.yaml` sees the same snapshot deploy does. The file holds the spec's v1 projection (toLegacySpec): both `lousho build` and `lousho mcp` still load spec files through the v1 loadSpec, which rejects version: 2 documents. SettingsPanel's Deploy card disables the button with "Publish a version first" while unpublished, labels it `Deploy v<n>` when published, headlines the result with the version, and toasts the server message on a 409 race. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
X05 made deploy build the published snapshot, so the route now answers 409 LOUSHO_NOT_PUBLISHED for an unpublished agent; the test PUT the spec but never published. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
LinuxDevil
force-pushed
the
fb-x05-deploy-published
branch
from
November 14, 2026 10:56
192f3f8 to
27962ce
Compare
…5-deploy-published
Main's Toast module gained a ToastProvider export the X05 mock did not provide, breaking the forge suite's vi.mock contract. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
# Conflicts: # apps/agent-forge/server/app.ts
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
deployRunner.ts:publishedSpecPath(.lousho/agents/<id>/published.yaml, inside the sidecar soAgentRepo.list()never scans it),writePublishedSpec(atomic write, returns path),runDeploynow takespublished: { version, specPath }, spawnslousho build --agent=<published.yaml>, injectsspawnviadeps, and returnsversiononDeployResult.POST /agents/:id/deploy: 404 unknown agent, 409LOUSHO_NOT_PUBLISHEDwhen nothing is pinned (nothing spawns), else writes the snapshot and builds it. 200/422 as before.publishAgentrewritespublished.yamlon every pointer move, best effort (logs, never fails the publish) — solousho mcp .lousho/agents/<id>/published.yamlsees the same snapshot deploy does.title="Publish a version first"+ helper copy whilepublishedVersion === null; labelDeploy v<n>; result headlineDeployed v<n> to <adapter>/Build of v<n> failed (exit <code>); a 409 race surfaces as an error toast.Deviation from the ticket, deliberate: the ticket says
writePublishedSpecshouldyaml.stringifythe v2 snapshot as-is. Both consumers ofpublished.yaml—lousho build --agent=andlousho mcp— still load spec files through the v1loadSpec, which rejectsversion: 2documents outright (verified:src/spec/loadSpec.tsvalidatesagentSpecSchemaonly). Writing v2 would make every deploy andlousho mcpinvocation fail. The file therefore holds the sametoLegacySpecv1 projection the deploy path already used — only its source changed (published snapshot instead of working copy), which is the ticket's actual goal. Secret refs stay refs; nothing is resolved.Test plan
deployPublished.test.ts(4): 409+no-spawn, 404/400,--agent== published.yaml containing the published instructions while the working copy drifted,versionin result, publish-v1-after-v2 rewrites the filedeployRunner.test.tsrewritten for the new signatures (path/write/spawn-args/version/failure)publish.test.ts:published.yamlwritten on publish and rewritten on repinSettingsPanel.test.tsx: disabled+title+helper,Deploy v2label, result copy, error toastGenerated with Devin