Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apps/hub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"@corbits/url-path": "workspace:*",
"@corbits/webhook-triggers": "workspace:*",
"@corbits/workflow-catalog": "workspace:*",
"@corbits/workflow-freeze": "workspace:*",
"@corbits/workflow-source": "workspace:*",
"@intx/authz": "0.3.0",
"@intx/crypto": "0.3.0",
Expand Down
38 changes: 24 additions & 14 deletions apps/hub/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,10 @@ import {
import { createConnectGithubRoutes } from "@corbits/workflow-catalog/connect-github-routes";
import { createTemplateBlockRoutes } from "@corbits/workflow-catalog/template-block-routes";
import { createWorkflowDetailRoute } from "@corbits/workflow-catalog/detail-route";
import { renderWorkflowSourceTree } from "@corbits/workflow-source";
import { freezeInertWorkflowDefinition } from "@corbits/workflow-freeze";
import {
renderWorkflowSourceTree,
WORKFLOW_SOURCE_ENTRY,
} from "@corbits/workflow-source";
import {
createDrizzleDraftStore,
createDrizzleRoutineStore,
Expand Down Expand Up @@ -2550,11 +2552,13 @@ export async function createHub(config: HubConfig) {
},
}),
);
// Template block workflows (CL-6405): the instantiate path's
// `deployBlockWorkflow` port lands here — the same source-form
// materialization pattern (asset + `@corbits/workflow-source` tree +
// `freezeInertWorkflowDefinition`) applied to a template's referenced
// block definition (`code-review` today).
// Template block workflows (CL-6405, cut over to native deploy in
// CL-7364): the instantiate path's `deployBlockWorkflow` port lands
// here — the same source-form materialization pattern (asset +
// `@corbits/workflow-source` tree) applied to a template's referenced
// block definition (`code-review` today), now deployed through the
// same `workflowDeployer` the agent-authored deploy path above uses
// rather than a hub-local inert freeze.
app.route(
`${TENANT_PREFIX}/template-blocks`,
createTemplateBlockRoutes({
Expand Down Expand Up @@ -2610,7 +2614,7 @@ export async function createHub(config: HubConfig) {
assetId = shell.id;
}

await assetService.populateAsset({
const { commitSha } = await assetService.populateAsset({
assetId,
ref: DEFAULT_ASSET_REF,
principal: { kind: "hub" },
Expand All @@ -2623,14 +2627,20 @@ export async function createHub(config: HubConfig) {
},
});

// Freeze, not a bare ensure: without the frozen wire projection
// the block's definition can never launch (CL-6439, the same
// disease CL-6447 fixed for the Agents page create path).
const { definitionId } = await freezeInertWorkflowDefinition(db, {
// Native deploy, not a hub-local inert freeze (CL-7364): the same
// `workflowDeployer` the agent-authored deploy path above drives,
// so a template block's definition goes through the real
// bundle → sidecar probe → capability walk → gate → freeze
// pipeline instead of a hub-side shortcut.
const result = await workflowDeployer.deploy({
tenantId,
principalId,
assetId,
workflowJson,
assetName,
commitSha,
entry: WORKFLOW_SOURCE_ENTRY,
});
return { id: definitionId, created: true };
return { id: result.definitionAssetId, created: true };
},
}),
);
Expand Down
38 changes: 12 additions & 26 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/AGENTS-PAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ description) and definition (system prompt, model) and posts to
`@corbits/assistant-workflow` and `@corbits/chat`'s workbench host produce,
parametrized instead of fixed — and renders it as a source codebase
(`@corbits/workflow-source`'s `renderWorkflowSourceTree`), never a bare
`workflow.json` envelope.
`workflow.json` envelope. `workflow.json` is retired; nothing writes it.
2. Creates a `workflow`-kind asset and writes that source tree into it
in-process (`AssetService.populateAsset` — no git subprocess), which
produces a commit.
Expand Down
2 changes: 1 addition & 1 deletion docs/workflow-definition-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ and no update path.

Spread: `packages/agent-directory` (7 files), `apps/hub/src/index.ts` (12 sites),
`packages/chat/src/platform-adapter.ts` (7), plus `folded-runs`,
`folded-run-one-shot`, `webhook-triggers`, `evals`, `workflow-freeze`,
`folded-run-one-shot`, `webhook-triggers`, `evals`,
`routine-launcher`, `skills-mount`.

## What a prototype migration surfaced
Expand Down
98 changes: 0 additions & 98 deletions docs/workflow-freeze-vs-probe-gate.md

This file was deleted.

Loading
Loading