Skip to content

Fold workflow-source and workflow-deploy-source into @corbits/workflows (CL-7373) - #564

Open
TheGreatAxios wants to merge 8 commits into
cl-7364-cleanupfrom
cl-7373-fold-workflows
Open

Fold workflow-source and workflow-deploy-source into @corbits/workflows (CL-7373)#564
TheGreatAxios wants to merge 8 commits into
cl-7364-cleanupfrom
cl-7373-fold-workflows

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

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

Summary

Folds three tiny packages into one, @corbits/workflows, replacing:

  • packages/workflow-source./source
  • packages/workflow-deploy-source./deploy-source
  • packages/agent-workflow-authoring./authoring

Also moves definition-lifecycle.ts, definition-detail.ts, and
detail-route.ts out of packages/workflow-catalog into ./detail,
since the detail route depends on ./deploy-source and belongs beside
it. packages/workflow-catalog (templates/blocks) and every *-tools
package are otherwise untouched.

Server code imports @corbits/workflows; browser code imports the new
@corbits/workflows/client subpath (registered in
check:browser-safe-subpaths' ENTRIES) for the source constants, the
definition-detail wire schema, and the pure lifecycle derivation —
apps/web's workflow detail page now reads from there instead of
@corbits/workflow-catalog.

Every importer (apps/hub, apps/web, apps/sidecar, hub-client,
agent-directory, agent-runtime, chat, workflow-catalog, scripts,
docs) moves to the new paths. @corbits/workflows's ./deploy-source
keeps its existing Postgres schema/table name (workflow_deploy_source)
and migration id (0001_workflow_deploy_source) unchanged, so an
existing database never re-runs those migrations.
packages/workflow-authoring-tools needs no import-path change — it
only calls the authoring HTTP surface (/api/workflow-workflow-authoring)
by URL, which is unchanged.

Left out deliberately:

  • packages/workflow-catalog (templates/blocks) — untouched per scope.
  • The *-tools packages — untouched per scope.
  • A couple of pre-existing, order-dependent test failures
    (packages/agent-directory/test/routes.integration.test.ts,
    packages/chat/test/routes.test.ts) that reproduce identically on
    the unmodified base branch — unrelated to this fold.

Test plan

  • bun run typecheck
  • bun run check:licenses
  • bun run check:browser-safe-subpaths
  • bun run scripts/generate-tsconfig-references.ts --check
  • bun test packages/workflows (91 pass, DB-gated suites included)
  • bun test on directly-touched importer packages (agent-directory,
    hub-client, agent-runtime, workflow-catalog, chat)

Resolves CL-7373

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.
…oring into @corbits/workflows (CL-7373)

Three tiny packages collapse into one with clearer subpath boundaries:
./source (the two-file source-tree renderer/reader), ./deploy-source
(the durable deploy-source record), ./detail (the definition detail
route + lifecycle derivation, moved out of workflow-catalog), and
./authoring (agent-authored workflow registry/routes). Server code
imports @corbits/workflows; browser code imports the new
@corbits/workflows/client subpath (registered in
check:browser-safe-subpaths' ENTRIES) for the source constants, the
definition-detail wire schema, and the pure lifecycle derivation.

Every importer moves to the new paths; the deploy-source migration
ledger keeps its existing schema/table/migration names so an existing
database never re-runs them. workflow-authoring-tools needs no import
change — it only calls the authoring HTTP surface by URL, which is
unchanged. workflow-catalog and the *-tools packages are untouched.
@TheGreatAxios
TheGreatAxios marked this pull request as ready for review September 2, 2026 11:09
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