Skip to content

Deploy Myra-authored assets through the native source pipeline (CL-7361) - #553

Merged
TheGreatAxios merged 7 commits into
cl-7360-authoring-toolfrom
cl-7361-native-deploy
Sep 2, 2026
Merged

Deploy Myra-authored assets through the native source pipeline (CL-7361)#553
TheGreatAxios merged 7 commits into
cl-7360-authoring-toolfrom
cl-7361-native-deploy

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a run-authenticated POST /api/workflow-workflow-authoring/:assetId/deploy route to @corbits/agent-workflow-authoring, gated by an own-tenant asset check plus a real workflow:*/create authorization check.
  • The route resolves the tenant's inference sources server-side (resolveDefinitionSources, falling back to the tenant's catalog default model) — an agent never supplies or sees a provider secret — then calls a WorkflowDeployer apps/hub injects, which wraps the exact sessionService.deployWorkflowFromSource call (withDeploySourceRecording included) the native tenant-session /workflows/deployments route's non-exclusive branch makes. No install/probe/gate/freeze logic is reimplemented.
  • Adds the workflow_deploy tool to @corbits/workflow-authoring-tools (bumped to 0.0.2, pin updated in workflows/assistant/src/index.ts), the only tool in the bundle carrying approval: "ask" — a human must approve before an agent-authored workflow becomes selectable as a routine target.
  • Fails closed with typed error envelopes: not_found (asset/commit missing), invalid (rejected package/definition), unavailable (sidecar unreachable, 502), forbidden (403).

Linear: https://linear.app/abklabs/issue/CL-7361

Not done (by design)

CL-7362 owns the preview/probe-only step from docs/workflow-model.md's "Deploy approval for agent-authored workflows". Until that lands, workflow_deploy's parked approval snapshot is the tool call's own arguments (asset id, commit sha, entry) — a human sees what will be deployed, not yet the probed capability/grant surface it will hold.

Test plan

  • bun test packages/agent-workflow-authoring packages/workflow-authoring-tools
  • bunx tsc --noEmit -p packages/agent-workflow-authoring
  • bunx tsc --noEmit -p packages/workflow-authoring-tools
  • bunx tsc --noEmit -p apps/hub
  • bun run check:tool-package-pins
  • bun run scripts/checks/report-error.ts

Resolves CL-7361

@TheGreatAxios
TheGreatAxios force-pushed the cl-7361-native-deploy branch 2 times, most recently from 4ca89eb to 8e3902f Compare September 2, 2026 08:32
A create or PATCH-carried retarget now must clear the same two gates
before it is persisted: resolveLaunchableDefinition must resolve the
asset, and the acting principal must be authorized for
workflow-definition:<id>/read — the same verb listRoutineTargets
already checks per row. A denial is a typed 403 alongside the
existing 400/404/409 target envelopes, on both the tenant-session and
Myra's workflow-run-authenticated routine surfaces.

Also routes a pre-existing catch in postRoutineEnabledNotice through
reportError, since this change's diff now touches that line and
check:report-error requires it.
…ine (CL-7361)

Add a run-authenticated POST /:assetId/deploy route to
agent-workflow-authoring that resolves the tenant's inference sources
server-side and calls the same sessionService.deployWorkflowFromSource
the native /workflows/deployments route drives, via a WorkflowDeployer
apps/hub injects. Add the workflow_deploy tool (approval: "ask") to
workflow-authoring-tools so a human approves before an agent-authored
workflow becomes a routine target.
Replace the "not yet built" deploy seam in workflow-source-authoring.md
with the run-authenticated /:assetId/deploy route and workflow_deploy
tool now in place; the probe-preview step stays CL-7362's.
@TheGreatAxios
TheGreatAxios marked this pull request as ready for review September 2, 2026 11:09
@TheGreatAxios
TheGreatAxios merged commit b8419f5 into main Sep 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant