From c9010a024f71a8fde6ca7fb1b4edc7209d25d425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=A9=98?= Date: Mon, 18 May 2026 12:54:00 +0000 Subject: [PATCH 1/2] fix: remove cas list, add title to schemas MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove uwf cas list (CAS grows unbounded, listing all hashes is useless) - Add title to Workflow/StartNode/StepNode schemas so schema list shows names 小橘 🍊(NEKO Team) --- packages/cli-uwf/src/cli.ts | 9 --------- packages/uwf-protocol/src/schemas.ts | 3 +++ 2 files changed, 3 insertions(+), 9 deletions(-) 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/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: { -- 2.43.0 From b304f65876b698b19b39e9b08623336c5cefc9db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=A9=98?= Date: Mon, 18 May 2026 13:03:40 +0000 Subject: [PATCH 2/2] feat: auto-set outputSchema title from role name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When uwf workflow put processes inline JSON Schema for a role, auto-inject title=roleName if not already set. Makes uwf cas schema list show meaningful names like 'planner', 'coder' instead of (unnamed). 小橘 🍊(NEKO Team) --- packages/cli-uwf/src/commands/workflow.ts | 6 ++++++ 1 file changed, 6 insertions(+) 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] = { -- 2.43.0