svamp-cli 0.2.148 → 0.2.149

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,7 +375,7 @@ 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-CnTCySqf.mjs');
378
+ const { issueCommand } = await import('./commands-BnHPl4F4.mjs');
379
379
  await issueCommand(args.slice(1));
380
380
  process.exit(0);
381
381
  } else if (subcommand === "trigger" || subcommand === "triggers" || subcommand === "routine" || subcommand === "routines") {
@@ -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-BxSyQWPt.mjs').catch(() => ({ default: { version: "unknown" } }));
397
+ const pkg = await import('./package-BWc_92Q1.mjs').catch(() => ({ default: { version: "unknown" } }));
398
398
  console.log(`svamp version: ${pkg.default.version}`);
399
399
  } else {
400
400
  console.error(`Unknown command: ${subcommand}`);
@@ -1,4 +1,4 @@
1
- import { existsSync, readFileSync, unlinkSync, mkdirSync, writeFileSync, renameSync, readdirSync } from 'node:fs';
1
+ import { existsSync, readFileSync, unlinkSync, readdirSync, mkdirSync, writeFileSync, renameSync } from 'node:fs';
2
2
  import { join, dirname } from 'node:path';
3
3
  import { execFileSync } from 'node:child_process';
4
4
 
@@ -290,6 +290,21 @@ ${s.ready} ready \xB7 ${s.in_progress} in-progress \xB7 ${s.backlog} backlog \xB
290
290
  ${issue.body}`);
291
291
  break;
292
292
  }
293
+ case "work": {
294
+ const id = positional(rest)[0];
295
+ if (!id) {
296
+ console.error("usage: svamp issue work <id> [--branch <name>]");
297
+ process.exit(1);
298
+ }
299
+ const branch = flag(rest, "--branch");
300
+ const updated = updateIssue(root, id, { status: "in_progress", ...branch ? { branch } : {} });
301
+ if (!updated) {
302
+ console.error(`Issue not found: ${id}`);
303
+ process.exit(1);
304
+ }
305
+ ok(updated, `#${updated.id} \u2192 in_progress${updated.branch ? ` on ${updated.branch}` : ""}`);
306
+ break;
307
+ }
293
308
  case "ready":
294
309
  case "start":
295
310
  case "close":
@@ -357,6 +372,13 @@ ${issue.body}`);
357
372
  ok(updated, `Commented on #${updated.id}`);
358
373
  break;
359
374
  }
375
+ case "pending": {
376
+ const pending = listIssues(root).filter((i) => i.status === "ready" || i.status === "in_progress");
377
+ if (json) console.log(JSON.stringify(pending));
378
+ else out(pending.length ? `${pending.length} pending: ${pending.map((i) => "#" + i.id).join(" ")}` : "No pending issues.");
379
+ process.exit(pending.length ? 1 : 0);
380
+ break;
381
+ }
360
382
  case "search": {
361
383
  const q = positional(rest)[0] || "";
362
384
  const items = searchIssues(root, q);
@@ -382,8 +404,10 @@ ${issue.body}`);
382
404
  " list [--status ready|backlog|in_progress|done|archived|all] [--label x] [--scope \u2026] [--json]",
383
405
  " show <id> [--json]",
384
406
  " ready <id> | start <id> | close <id> | reopen <id> | backlog <id> | archive <id>",
407
+ " work <id> [--branch <name>] # mark in-progress (optionally on a branch; merge to main before close)",
385
408
  " edit <id> [--title \u2026] [--label x] [--verify-cmd \u2026] [--no-verify] [--status \u2026] [--body \u2026]",
386
409
  ' comment <id> "<text>" # append a follow-up to the issue',
410
+ " pending # exit 0 if no ready/in-progress issues (loop oracle)",
387
411
  ' search "<query>" [--json]'
388
412
  ].join("\n"));
389
413
  break;
@@ -1,5 +1,5 @@
1
1
  var name = "svamp-cli";
2
- var version = "0.2.148";
2
+ var version = "0.2.149";
3
3
  var description = "Svamp CLI — AI workspace daemon on Hypha Cloud";
4
4
  var author = "Amun AI AB";
5
5
  var license = "SEE LICENSE IN LICENSE";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svamp-cli",
3
- "version": "0.2.148",
3
+ "version": "0.2.149",
4
4
  "description": "Svamp CLI — AI workspace daemon on Hypha Cloud",
5
5
  "author": "Amun AI AB",
6
6
  "license": "SEE LICENSE IN LICENSE",