diff --git a/packages/cli-uwf/src/cli.ts b/packages/cli-uwf/src/cli.ts index c05e79e..0b97562 100755 --- a/packages/cli-uwf/src/cli.ts +++ b/packages/cli-uwf/src/cli.ts @@ -15,7 +15,6 @@ import { cmdCasCat, cmdCasGet, cmdCasHas, - cmdCasList, cmdCasPut, cmdCasRefs, cmdCasSchemaGet, @@ -222,14 +221,6 @@ cas runAction(() => cmdCasHas(storageRoot, hash)); }); -cas - .command("list") - .description("List all CAS hashes") - .action(() => { - const storageRoot = resolveStorageRoot(); - runAction(() => cmdCasList(storageRoot)); - }); - cas .command("refs") .description("List direct CAS references from a node") diff --git a/packages/cli-uwf/src/commands/workflow.ts b/packages/cli-uwf/src/commands/workflow.ts index 3ebf39b..6dae47d 100644 --- a/packages/cli-uwf/src/commands/workflow.ts +++ b/packages/cli-uwf/src/commands/workflow.ts @@ -44,6 +44,7 @@ function isJsonSchema(value: unknown): value is JSONSchema { async function resolveOutputSchemaRef( uwf: UwfStore, + roleName: string, outputSchema: string | JSONSchema, ): Promise { if (typeof outputSchema === "string") { @@ -58,6 +59,10 @@ async function resolveOutputSchemaRef( if (!isJsonSchema(outputSchema)) { fail("outputSchema must be a cas_ref string or JSON Schema object"); } + // Auto-set title from role name if not already present + if (outputSchema.title === undefined) { + outputSchema = { ...outputSchema, title: roleName }; + } return putSchema(uwf.store, outputSchema); } @@ -69,6 +74,7 @@ async function materializeWorkflowPayload( for (const [roleName, role] of Object.entries(raw.roles)) { const outputSchema = await resolveOutputSchemaRef( uwf, + `${raw.name}.${roleName}`, role.outputSchema as string | JSONSchema, ); roles[roleName] = { diff --git a/packages/uwf-protocol/src/schemas.ts b/packages/uwf-protocol/src/schemas.ts index 7f7bfc5..08cf28c 100644 --- a/packages/uwf-protocol/src/schemas.ts +++ b/packages/uwf-protocol/src/schemas.ts @@ -32,6 +32,7 @@ const TRANSITION: JSONSchema = { }; export const WORKFLOW_SCHEMA: JSONSchema = { + title: "Workflow", type: "object", required: ["name", "description", "roles", "conditions", "graph"], properties: { @@ -57,6 +58,7 @@ export const WORKFLOW_SCHEMA: JSONSchema = { }; export const START_NODE_SCHEMA: JSONSchema = { + title: "StartNode", type: "object", required: ["workflow", "prompt"], properties: { @@ -67,6 +69,7 @@ export const START_NODE_SCHEMA: JSONSchema = { }; export const STEP_NODE_SCHEMA: JSONSchema = { + title: "StepNode", type: "object", required: ["start", "prev", "role", "output", "detail", "agent"], properties: {