Repository navigation
feat(studio): L07 export an agent as YAML or as a bundle - #1071
Merged
Merged
Conversation
GET /agents/:id/export?format=yaml serves the working-copy spec as a
text/yaml attachment; format=bundle serves a lousho.agent-bundle JSON
with the spec, labels, the prompt-registry text spec.promptRef names
and the eval datasets it gates on - each pulled from the observe daemon
with an 8s deadline, degrading to a X-Lousho-Export-Warnings header
rather than failing when the daemon cannot serve a piece. Secret values
never appear: the spec only ever holds { env }/{ secret } references.
The header overflow menu's Export YAML now downloads through the route
(client-side serializeSpec is gone for it) and gains Export bundle;
warnings surface as warning toasts, failures as error toasts.
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
GET /agents/:id/export?format=yamldownloads the working-copy spec astext/yaml(<id>.yaml);format=bundledownloads alousho.agent-bundleJSON (<id>.lousho-agent.json) with spec, labels, the prompt-registry textspec.promptRefnames, and the eval datasets it gates on.observeTarget()+daemonHeaders(), 8s deadline): daemon down/404 degrades to anX-Lousho-Export-Warningsheader (URI-encoded JSON string[]) instead of failing the download. Secret values never appear - the spec only holds{ env }/{ secret }references.AgentBundlewire type;exportYaml/buildBundle/registerExportRoutesinserver/lifecycle/export.ts(workspace seam: repo viaworkspaceOf(req)).runtimeClient.downloadExportreadsContent-Dispositionfilename + warnings header; the header overflow menu's Export YAML now goes through the route and gains Export bundle (FileDown/Package icons); warnings toast one per line, failures toastExport failed: <message>.downloadYamlhelper.Test plan
npm run test:server --workspace apps/agent-forge- export.test.ts: 7 tests (yaml round-trip headers/content, bundle with prompt+labels+evals, daemon-down warning header, failing dataset warning, no promptRef/evals, 400/404, secret value absent) - all passnpx vitest run --root apps/agent-forge AgentActionsMenu exportMenu importExport- 15 tests pass (menu items call downloadExport with right format, warning/error toasts, filename downloads)npm run typecheck+npm run typecheck:server --workspace apps/agent-forge- cleannpx eslinton changed files - cleannpx fallow audit --base origin/main- no issues in 10 changed files{ secret: 'GITHUB_TOKEN' }valueghp_exampleabsent from both exportsGenerated with Devin