refactor(cli): group commands by noun-verb pattern (RFC #54)
Phase 1: workflow subcommand group (add/list/show/rm/history/rollback) Phase 2: thread subcommand group (run/list/show/rm/fork/ps/kill/live/pause/resume) Phase 3: cas gc + top-level aliases + deprecation warnings for old flat commands - Follow existing CAS_SUBCOMMAND_TABLE pattern for workflow and thread groups - Top-level 'run' and 'live' stay as shortcuts (no deprecation) - Old flat commands print deprecation warning then delegate - Update usage string to show grouped format - Update tests to use new grouped syntax
This commit is contained in:
@@ -250,13 +250,16 @@ describe("cli thread commands", () => {
|
||||
|
||||
test("cli entrypoint dispatches threads / ps (spawn)", () => {
|
||||
const env = { ...process.env, UNCAGED_WORKFLOW_STORAGE_ROOT: storageRoot };
|
||||
const threads = spawnSync(process.execPath, [cliEntryPath, "threads"], {
|
||||
const threads = spawnSync(process.execPath, [cliEntryPath, "thread", "list"], {
|
||||
env,
|
||||
encoding: "utf8",
|
||||
});
|
||||
expect(threads.status).toBe(0);
|
||||
|
||||
const ps = spawnSync(process.execPath, [cliEntryPath, "ps"], { env, encoding: "utf8" });
|
||||
const ps = spawnSync(process.execPath, [cliEntryPath, "thread", "ps"], {
|
||||
env,
|
||||
encoding: "utf8",
|
||||
});
|
||||
expect(ps.status).toBe(0);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user