@glrs-dev/cli 2.3.0 → 2.4.1

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.
Files changed (79) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{chunk-EM4MJBOD.js → chunk-2AZKRWC6.js} +4 -4
  3. package/dist/{chunk-UXBOTMDY.js → chunk-2P3ETOT2.js} +2 -2
  4. package/dist/chunk-2VMFXAJH.js +795 -0
  5. package/dist/chunk-5ZVUFNCP.js +140 -0
  6. package/dist/{chunk-W37UX3U2.js → chunk-6Y27RQQL.js} +2 -2
  7. package/dist/{chunk-RZWOWTKF.js → chunk-EKNRKZWR.js} +4 -4
  8. package/dist/{chunk-YGNDPKIW.js → chunk-HQUCVJ4G.js} +3 -1
  9. package/dist/{chunk-OABVEBWW.js → chunk-MBEVC327.js} +1 -1
  10. package/dist/{chunk-MIWZLETC.js → chunk-MCM47HH4.js} +1 -1
  11. package/dist/{chunk-F3AFRUT2.js → chunk-PTIO556V.js} +2 -2
  12. package/dist/{chunk-E2UNZIZT.js → chunk-R2WXQ54P.js} +1 -1
  13. package/dist/{chunk-I2KUXY3I.js → chunk-SMDIOB5B.js} +2 -2
  14. package/dist/{chunk-SPULDN7P.js → chunk-YY7EWHMA.js} +5 -3
  15. package/dist/cli.js +31 -20
  16. package/dist/commands/autopilot-interactive.d.ts +89 -0
  17. package/dist/commands/autopilot-interactive.js +248 -0
  18. package/dist/commands/autopilot-raw.d.ts +1 -0
  19. package/dist/commands/autopilot-raw.js +368 -0
  20. package/dist/commands/autopilot-tui.d.ts +7 -0
  21. package/dist/commands/autopilot-tui.js +7 -0
  22. package/dist/commands/autopilot.d.ts +39 -0
  23. package/dist/commands/autopilot.js +395 -0
  24. package/dist/commands/cleanup.js +3 -3
  25. package/dist/commands/create.js +4 -4
  26. package/dist/commands/dashboard.d.ts +3 -0
  27. package/dist/commands/dashboard.js +1549 -0
  28. package/dist/commands/debrief.d.ts +57 -0
  29. package/dist/commands/debrief.js +9 -0
  30. package/dist/commands/delete.js +3 -3
  31. package/dist/commands/go.js +2 -2
  32. package/dist/commands/list.js +3 -3
  33. package/dist/commands/loop.d.ts +42 -0
  34. package/dist/commands/loop.js +133 -0
  35. package/dist/commands/plan-picker.d.ts +15 -0
  36. package/dist/commands/plan-picker.js +76 -0
  37. package/dist/commands/scoper.d.ts +54 -0
  38. package/dist/{vendor/harness-opencode/dist/scoper-S77SOK7X.js → commands/scoper.js} +30 -15
  39. package/dist/commands/switch.js +3 -3
  40. package/dist/index.d.ts +2 -2
  41. package/dist/index.js +1 -1
  42. package/dist/lib/auto-update.js +1 -1
  43. package/dist/lib/config.d.ts +3 -2
  44. package/dist/lib/config.js +1 -1
  45. package/dist/lib/registry.d.ts +2 -0
  46. package/dist/lib/registry.js +1 -1
  47. package/dist/lib/worktree.js +3 -3
  48. package/dist/node_modules/@glrs-dev/adapter-opencode/dist/index.d.ts +261 -0
  49. package/dist/node_modules/@glrs-dev/adapter-opencode/dist/index.js +488 -0
  50. package/dist/node_modules/@glrs-dev/adapter-opencode/package.json +8 -0
  51. package/dist/node_modules/@glrs-dev/autopilot/dist/auto-ship-LCT6LIH7.js +7 -0
  52. package/dist/node_modules/@glrs-dev/autopilot/dist/changeset-generator-DG3MVWVV.js +15 -0
  53. package/dist/node_modules/@glrs-dev/autopilot/dist/chunk-7OSEI5TF.js +249 -0
  54. package/dist/node_modules/@glrs-dev/autopilot/dist/chunk-E7PWTRFO.js +91 -0
  55. package/dist/node_modules/@glrs-dev/autopilot/dist/chunk-M2ZVBPWL.js +101 -0
  56. package/dist/node_modules/@glrs-dev/autopilot/dist/chunk-Q4ULU6ER.js +68 -0
  57. package/dist/node_modules/@glrs-dev/autopilot/dist/chunk-VITL2Z45.js +2772 -0
  58. package/dist/node_modules/@glrs-dev/autopilot/dist/chunk-ZNJWARTM.js +449 -0
  59. package/dist/node_modules/@glrs-dev/autopilot/dist/index.d.ts +1765 -0
  60. package/dist/node_modules/@glrs-dev/autopilot/dist/index.js +688 -0
  61. package/dist/node_modules/@glrs-dev/autopilot/dist/logger-UITJGIZE.js +8 -0
  62. package/dist/node_modules/@glrs-dev/autopilot/dist/loop-session-XKL3NHUA.js +8 -0
  63. package/dist/node_modules/@glrs-dev/autopilot/dist/plan-enrichment-D3RPJR2J.js +14 -0
  64. package/dist/node_modules/@glrs-dev/autopilot/package.json +8 -0
  65. package/dist/vendor/harness-opencode/dist/agents/prompts/plan.md +7 -0
  66. package/dist/vendor/harness-opencode/dist/chunk-GILWWWMB.js +66 -0
  67. package/dist/vendor/harness-opencode/dist/cli.js +335 -639
  68. package/dist/vendor/harness-opencode/dist/index.js +35 -8
  69. package/dist/vendor/harness-opencode/dist/plugin-check-GJRD2OK6.js +14 -0
  70. package/dist/vendor/harness-opencode/package.json +1 -1
  71. package/package.json +14 -6
  72. package/dist/vendor/harness-opencode/dist/autopilot/prompt-template.md +0 -104
  73. package/dist/vendor/harness-opencode/dist/chunk-GCWHRUOK.js +0 -259
  74. package/dist/vendor/harness-opencode/dist/chunk-MJSMBY2Y.js +0 -87
  75. package/dist/vendor/harness-opencode/dist/chunk-NIFAVPNN.js +0 -544
  76. package/dist/vendor/harness-opencode/dist/loop-session-J35NILUZ.js +0 -30
  77. package/dist/vendor/harness-opencode/dist/opencode-server-KPCDFYAX.js +0 -22
  78. package/dist/vendor/harness-opencode/dist/plan-parser-TMHEKT22.js +0 -6
  79. package/dist/vendor/harness-opencode/dist/plan-session-7VS32P52.js +0 -117
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@glrs-dev/autopilot",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts"
8
+ }
@@ -104,9 +104,16 @@ Multi-file plan template:
104
104
 
105
105
  ## Acceptance criteria
106
106
 
107
+ Each item in the plan-state fence **must** include a `files:` field listing every file the item touches. For each file entry, provide the path (with `(NEW)` if the file does not yet exist) and a one-sentence `Change:` description. This gives the executor file-level specificity without requiring codebase exploration.
108
+
107
109
  \`\`\`plan-state
108
110
  - [ ] id: a1
109
111
  intent: <item>
112
+ files:
113
+ - <path/to/file> (NEW)
114
+ Change: <one sentence describing what to create or modify>
115
+ - <path/to/other-file>
116
+ Change: <one sentence>
110
117
  tests:
111
118
  - <path>::"<name>"
112
119
  verify: <command>
@@ -0,0 +1,66 @@
1
+ // src/cli/plugin-check.ts
2
+ import * as fs from "fs";
3
+ import * as path from "path";
4
+ import * as os from "os";
5
+ import { select, checkbox, confirm } from "@inquirer/prompts";
6
+ var PLUGIN_NAME = "@glrs-dev/harness-plugin-opencode";
7
+ function getOpencodeConfigPath() {
8
+ const configHome = process.env["XDG_CONFIG_HOME"] ?? path.join(os.homedir(), ".config");
9
+ return path.join(configHome, "opencode", "opencode.json");
10
+ }
11
+ function isPluginInstalled() {
12
+ const configPath = getOpencodeConfigPath();
13
+ if (!fs.existsSync(configPath)) return false;
14
+ try {
15
+ const config = JSON.parse(fs.readFileSync(configPath, "utf8"));
16
+ const plugins = Array.isArray(config.plugin) ? config.plugin : [];
17
+ return plugins.some((p) => {
18
+ const name = typeof p === "string" ? p : Array.isArray(p) ? p[0] : null;
19
+ return name === PLUGIN_NAME || String(name ?? "").startsWith(`${PLUGIN_NAME}@`);
20
+ });
21
+ } catch {
22
+ return false;
23
+ }
24
+ }
25
+ async function promptYesNo(question) {
26
+ if (!process.stdin.isTTY) return false;
27
+ return confirm({ message: question, default: false });
28
+ }
29
+ async function promptChoice(question, choices, defaultIndex = 0) {
30
+ if (!process.stdin.isTTY) return defaultIndex;
31
+ const answer = await select({
32
+ message: question,
33
+ choices: choices.map((label, i) => ({
34
+ name: label,
35
+ value: i
36
+ })),
37
+ default: defaultIndex
38
+ });
39
+ return answer;
40
+ }
41
+ async function promptMulti(question, choices) {
42
+ if (!process.stdin.isTTY) {
43
+ const defaults = /* @__PURE__ */ new Set();
44
+ choices.forEach((c, i) => {
45
+ if (c.defaultOn) defaults.add(i);
46
+ });
47
+ return defaults;
48
+ }
49
+ const answers = await checkbox({
50
+ message: question,
51
+ choices: choices.map((c, i) => ({
52
+ name: c.label,
53
+ value: i,
54
+ checked: c.defaultOn
55
+ }))
56
+ });
57
+ return new Set(answers);
58
+ }
59
+
60
+ export {
61
+ getOpencodeConfigPath,
62
+ isPluginInstalled,
63
+ promptYesNo,
64
+ promptChoice,
65
+ promptMulti
66
+ };