Skip to content

Let Myra author a workflow code package into a hub asset (CL-7360) - #552

Merged
TheGreatAxios merged 6 commits into
cl-7358-target-editfrom
cl-7360-authoring-tool
Sep 2, 2026
Merged

TheGreatAxios merged 6 commits into
cl-7358-target-editfrom
cl-7360-authoring-tool

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

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

What

  • @corbits/agent-workflow-authoring: trust-boundary validation of the source tree (validateWorkflowSourceTree: repo-relative paths, no ../.git/backslashes, secret-like names refused, package.json must declare an interchange.workflow entry the tree carries, per-file/tree/count caps), optional expectedHeadSha on republish (409 + currentHeadSha), and GET /api/workflow-workflow-authoring/:assetId/source authorized asset:<id>/read. Head sha and tree reads go through RepoStore.resolveRef / openCommittedReads: AssetService exposes neither the head sha nor subtree listing.
  • New @corbits/workflow-authoring-tools (0.0.1): workflow_author, workflow_republish, workflow_source_read; no approval: "ask". Registered in tool-registry-publish, pinned in ASSISTANT_TOOL_PACKAGE_PINS, hubWorkflowAuthoringUrl threaded in the sidecar step env, offered in the hub inventory.
  • Docs: docs/workflow-source-authoring.md seams list; README for the new package.

Notes

  • Bundle id is @corbits/workflow_authoring/wf (not the package name) so <id>:<tool> fits the 64-char OpenAI wire cap after encodeToolName.
  • expectedHeadSha is read-then-write (writeTree has no CAS); republish is additive (no root clearPrefix). Both documented as remaining seams.
  • request_capability stays self-definition only by design (the route 403s any other definitionId); not changed here.
  • Full bun run check was not run to completion after the last lint fix (budget cut); typecheck, targeted tests, eslint on the touched packages, check:tool-package-pins, and check:tsconfig-references pass.

Resolves CL-7360

@TheGreatAxios
TheGreatAxios changed the base branch from cl-7349-contracts to cl-7358-target-edit September 2, 2026 07:45
@TheGreatAxios
TheGreatAxios force-pushed the cl-7360-authoring-tool branch 2 times, most recently from 13d3d3c to d590642 Compare September 2, 2026 09:12
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.
…dSha, source read, and the authoring tool bundle
agent-workflow-authoring: validate the source tree at the trust boundary
(repo-relative paths, no secret-like names, package.json with an
interchange.workflow entry the tree carries, size caps), honor an
optional expectedHeadSha on republish (409 with the current head), and
add GET /:assetId/source authorized as asset:<id>/read.

workflow-authoring-tools: a new @intx/agent bundle (workflow_author,
workflow_republish, workflow_source_read) over those run-authenticated
routes, published to the corbits-tools registry, pinned by the
assistant, threaded hubWorkflowAuthoringUrl in the sidecar step env,
and offered in the hub's tool-package inventory.
@TheGreatAxios
TheGreatAxios marked this pull request as ready for review September 2, 2026 11:09
@TheGreatAxios
TheGreatAxios merged commit f029e24 into main Sep 2, 2026
13 of 14 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