// MAINTENANCE: This string must be kept in sync with the actual uwf CLI commands. // Update whenever commands are added, removed, or their signatures change. export function generateCliReference(): string { return `# uwf CLI Reference ## Setup \`\`\` uwf setup # interactive setup wizard uwf setup --provider --base-url \\ --api-key --model # non-interactive setup [--agent ] # optional: default agent alias \`\`\` ## Workflow Commands \`\`\` uwf workflow add # register a workflow from YAML file uwf workflow show # show workflow by name or CAS hash uwf workflow list # list all registered workflows \`\`\` ## Thread Commands \`\`\` uwf thread start -p # create a thread (no execution) uwf thread exec # execute one moderator→agent→extract cycle [--agent ] # override agent command [-c, --count ] # run multiple steps (default: 1) [--background] # run in background uwf thread show # show thread head pointer uwf thread list # list active threads (idle + running) [--all] # include completed/cancelled/suspended [--status ] # filter: idle, running, suspended, completed, cancelled, active uwf thread read # render thread context as markdown [--quota ] # max output characters (default 32000) [--before ] # load steps before this hash (exclusive) [--start] # include start step in output uwf thread stop # stop background execution (keep thread active) uwf thread cancel # cancel thread (stop + move to history) \`\`\` ## Step Commands \`\`\` uwf step list # list all steps in a thread uwf step show # show details of a specific step uwf step fork # fork a thread from a specific step \`\`\` ## CAS Commands Use the \`ocas\` CLI for direct CAS operations (\`~/.ocas/\` store, shared with \`uwf\`): \`\`\` ocas get # read a CAS node (type + payload) [--timestamp] # include timestamp in output ocas put # store a node, print its hash # : JSON file path or inline JSON string ocas has # check if a hash exists ocas refs # list direct CAS references from a node ocas walk # recursive traversal from a node ocas reindex # rebuild type index from all CAS nodes ocas schema list # list all registered schemas ocas schema get # show a schema by its type hash \`\`\` ## Log Commands \`\`\` uwf log list # list log files with sizes uwf log show # show all log entries [--thread ] # filter by thread ID [--process ] # filter by process ID [--date ] # filter by date uwf log clean --before # delete log files before given date \`\`\` ## Global Options \`\`\` uwf --format # output format: json (default) or yaml uwf -V, --version # print version \`\`\` ## Key Concepts - **Workflow**: YAML definition with roles, conditions, and a routing graph; stored as a CAS node identified by its XXH64 hash. - **Thread**: A running instance of a workflow; points to a chain of CAS step nodes. - **Step**: One moderator→agent→extract cycle; stored as a CAS node with output + detail refs. - **Turn**: Agent-internal interaction (within a single step); stored per-turn in the detail node. - **CAS**: Content-addressable store; every artifact (workflows, steps, details, turns) is hashed. `; }