svamp-cli 0.2.180 → 0.2.181
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs
CHANGED
|
@@ -375,11 +375,11 @@ async function main() {
|
|
|
375
375
|
}), machineId);
|
|
376
376
|
process.exit(0);
|
|
377
377
|
} else if (subcommand === "issue" || subcommand === "issues") {
|
|
378
|
-
const { issueCommand } = await import('./commands-
|
|
378
|
+
const { issueCommand } = await import('./commands-klb9OsmV.mjs');
|
|
379
379
|
await issueCommand(args.slice(1));
|
|
380
380
|
process.exit(0);
|
|
381
381
|
} else if (subcommand === "workflow" || subcommand === "workflows") {
|
|
382
|
-
const { workflowCommand } = await import('./commands-
|
|
382
|
+
const { workflowCommand } = await import('./commands-DUTReua3.mjs');
|
|
383
383
|
await workflowCommand(args.slice(1));
|
|
384
384
|
process.exit(0);
|
|
385
385
|
} else if (subcommand === "wise-agent" || subcommand === "wise") {
|
|
@@ -394,7 +394,7 @@ async function main() {
|
|
|
394
394
|
} else if (!subcommand || subcommand === "start") {
|
|
395
395
|
await handleInteractiveCommand();
|
|
396
396
|
} else if (subcommand === "--version" || subcommand === "-v") {
|
|
397
|
-
const pkg = await import('./package-
|
|
397
|
+
const pkg = await import('./package-D4USifdR.mjs').catch(() => ({ default: { version: "unknown" } }));
|
|
398
398
|
console.log(`svamp version: ${pkg.default.version}`);
|
|
399
399
|
} else {
|
|
400
400
|
console.error(`Unknown command: ${subcommand}`);
|
|
@@ -138,6 +138,20 @@ async function workflowCommand(args) {
|
|
|
138
138
|
console.log(`\u2713 workflow "${wf.name}" completed.`);
|
|
139
139
|
break;
|
|
140
140
|
}
|
|
141
|
+
case "guide": {
|
|
142
|
+
console.log([
|
|
143
|
+
"CREATE an automation WORKFLOW from a request (GitHub-Actions-style, .svamp/workflows/<name>.yaml):",
|
|
144
|
+
" svamp workflow add <kebab-name> \\",
|
|
145
|
+
' [--on schedule --cron "<expr>" | --on dispatch | --on channel <name> | --on issue <labels>] \\',
|
|
146
|
+
' --run "<shell/svamp command>" [--run "<cmd2>"]...',
|
|
147
|
+
" - A step is any shell or svamp command. To start a self-verifying loop on a schedule:",
|
|
148
|
+
` --run "svamp session loop <session-id> '<task>' --until '<done criteria>' [--max N]"`,
|
|
149
|
+
` - To message/prompt a session: --run "svamp session send <id> '<text>'" (use the owner id, or "." in an owned workflow).`,
|
|
150
|
+
" - Multiple --cron flags = multiple schedules. Pick a short kebab-case name.",
|
|
151
|
+
" Then reply with a one-line summary of the workflow you created."
|
|
152
|
+
].join("\n"));
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
141
155
|
case "help":
|
|
142
156
|
case void 0:
|
|
143
157
|
case "--help":
|
|
@@ -149,6 +163,7 @@ async function workflowCommand(args) {
|
|
|
149
163
|
' [--cron "0 9 * * 1-5"] [--channel <name>] [--issue ready,closed,labeled]',
|
|
150
164
|
" list | show <name> | remove <name>",
|
|
151
165
|
" run <name> # execute the workflow's run-only steps now",
|
|
166
|
+
' guide # the "create a workflow from a request" procedure (so triggers can stay short)',
|
|
152
167
|
"",
|
|
153
168
|
"Each step is a shell command \u2014 every verb is a `svamp` CLI call, e.g.",
|
|
154
169
|
' svamp workflow add nightly --on schedule --cron "0 2 * * *" \\',
|
|
@@ -308,6 +308,43 @@ ${tail}
|
|
|
308
308
|
for (const i of items) out(fmtIssue(i));
|
|
309
309
|
break;
|
|
310
310
|
}
|
|
311
|
+
case "guide": {
|
|
312
|
+
const topic = positional(rest)[0];
|
|
313
|
+
if (topic === "triage") {
|
|
314
|
+
out([
|
|
315
|
+
"TRIAGE an issue \u2014 turn a raw user post into a fully-specified, actionable issue:",
|
|
316
|
+
" 1. Read it: svamp issue show <id> (the user's original text is preserved separately)",
|
|
317
|
+
" 2. Triage it:",
|
|
318
|
+
' svamp issue triage <id> --title "<concise title>" [--label <tag>]... \\',
|
|
319
|
+
` [--inline | --crew] [--verify-cmd "<pass/fail cmd>" | --verify "<how we know it's done>"] \\`,
|
|
320
|
+
' [--body "<expanded description>"]',
|
|
321
|
+
" - inline = work it in this session; crew = isolated worktree child.",
|
|
322
|
+
" - verify-cmd = a real pass/fail command (oracle); --verify = an agent/human criterion.",
|
|
323
|
+
" 3. SPLIT if the post bundles several independent asks: `svamp issue add` a new issue for",
|
|
324
|
+
" each extra piece (carry over the relevant context) and triage each; keep the original as the primary.",
|
|
325
|
+
" 4. If it implies running on a schedule/event, also `svamp workflow add` it.",
|
|
326
|
+
" Then reply with a one-line summary."
|
|
327
|
+
].join("\n"));
|
|
328
|
+
} else if (topic === "work") {
|
|
329
|
+
out([
|
|
330
|
+
"WORK the ready issues in THIS session's backlog (your own + shared project items; leave other",
|
|
331
|
+
"sessions' private items alone). List: svamp issue list --status ready --session <id>.",
|
|
332
|
+
" TRIAGE FIRST any \u25B3triage (untriaged) issue \u2014 see `svamp issue guide triage`.",
|
|
333
|
+
" For each issue:",
|
|
334
|
+
" 1. On pickup: svamp issue work <id> (status \u2192 in_progress; live status reflects the work).",
|
|
335
|
+
' 2. As you go: leave substantive `svamp issue comment <id> "\u2026"` notes \u2014 decisions, takeaways, blockers.',
|
|
336
|
+
" 3. Before closing: VERIFY with evidence \u2014 run its verify-cmd; for verify:agent cite the files/commit",
|
|
337
|
+
" that resolve it in a summary comment. Post the summary, THEN `svamp issue close <id>`.",
|
|
338
|
+
" NEVER close an issue that isn't genuinely resolved.",
|
|
339
|
+
" CONVERGE TO MAIN: if an issue used an isolated branch/worktree, merge it back to `main` (and remove",
|
|
340
|
+
" the worktree) BEFORE closing \u2014 never leave unmerged branches.",
|
|
341
|
+
" Keep going until `svamp issue pending --session <id>` is empty."
|
|
342
|
+
].join("\n"));
|
|
343
|
+
} else {
|
|
344
|
+
out("usage: svamp issue guide <triage|work>");
|
|
345
|
+
}
|
|
346
|
+
break;
|
|
347
|
+
}
|
|
311
348
|
case "help":
|
|
312
349
|
case void 0:
|
|
313
350
|
case "--help":
|
|
@@ -317,14 +354,16 @@ ${tail}
|
|
|
317
354
|
"",
|
|
318
355
|
' add ["<title>"] [--ready] [--label x] [--verify-cmd "cmd"] [--scope project|session] [--body "\u2026"]',
|
|
319
356
|
" # title optional \u2014 if omitted, the first line of --body becomes the title",
|
|
320
|
-
" list [--status ready|
|
|
357
|
+
" list [--status ready|in_progress|archived|all] [--label x] [--scope \u2026] [--session <id>] [--json]",
|
|
321
358
|
" show <id> [--json]",
|
|
322
|
-
" ready <id> |
|
|
359
|
+
" ready <id> | close <id> (\u2192 archived) | reopen <id> | archive <id> # lifecycle: ready \u2192 in_progress \u2192 archived",
|
|
323
360
|
" work <id> [--branch <name>] # mark in-progress (optionally on a branch; merge to main before close)",
|
|
361
|
+
" triage <id> [--title \u2026] [--label x] [--inline|--crew] [--verify-cmd \u2026|--verify \u2026] [--body \u2026]",
|
|
324
362
|
" edit <id> [--title \u2026] [--label x] [--verify-cmd \u2026] [--no-verify] [--status \u2026] [--body \u2026]",
|
|
325
363
|
' comment <id> "<text>" # append a follow-up to the issue',
|
|
326
|
-
" pending
|
|
327
|
-
' search "<query>" [--json]'
|
|
364
|
+
" pending [--session <id>] # exit 0 if no actionable (ready/in_progress) issues \u2014 the loop oracle",
|
|
365
|
+
' search "<query>" [--json]',
|
|
366
|
+
" guide <triage|work> # the triage / work-loop procedure (so triggers can stay short)"
|
|
328
367
|
].join("\n"));
|
|
329
368
|
break;
|
|
330
369
|
default:
|