@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.
- package/CHANGELOG.md +8 -0
- package/dist/{chunk-EM4MJBOD.js → chunk-2AZKRWC6.js} +4 -4
- package/dist/{chunk-UXBOTMDY.js → chunk-2P3ETOT2.js} +2 -2
- package/dist/chunk-2VMFXAJH.js +795 -0
- package/dist/chunk-5ZVUFNCP.js +140 -0
- package/dist/{chunk-W37UX3U2.js → chunk-6Y27RQQL.js} +2 -2
- package/dist/{chunk-RZWOWTKF.js → chunk-EKNRKZWR.js} +4 -4
- package/dist/{chunk-YGNDPKIW.js → chunk-HQUCVJ4G.js} +3 -1
- package/dist/{chunk-OABVEBWW.js → chunk-MBEVC327.js} +1 -1
- package/dist/{chunk-MIWZLETC.js → chunk-MCM47HH4.js} +1 -1
- package/dist/{chunk-F3AFRUT2.js → chunk-PTIO556V.js} +2 -2
- package/dist/{chunk-E2UNZIZT.js → chunk-R2WXQ54P.js} +1 -1
- package/dist/{chunk-I2KUXY3I.js → chunk-SMDIOB5B.js} +2 -2
- package/dist/{chunk-SPULDN7P.js → chunk-YY7EWHMA.js} +5 -3
- package/dist/cli.js +31 -20
- package/dist/commands/autopilot-interactive.d.ts +89 -0
- package/dist/commands/autopilot-interactive.js +248 -0
- package/dist/commands/autopilot-raw.d.ts +1 -0
- package/dist/commands/autopilot-raw.js +368 -0
- package/dist/commands/autopilot-tui.d.ts +7 -0
- package/dist/commands/autopilot-tui.js +7 -0
- package/dist/commands/autopilot.d.ts +39 -0
- package/dist/commands/autopilot.js +395 -0
- package/dist/commands/cleanup.js +3 -3
- package/dist/commands/create.js +4 -4
- package/dist/commands/dashboard.d.ts +3 -0
- package/dist/commands/dashboard.js +1549 -0
- package/dist/commands/debrief.d.ts +57 -0
- package/dist/commands/debrief.js +9 -0
- package/dist/commands/delete.js +3 -3
- package/dist/commands/go.js +2 -2
- package/dist/commands/list.js +3 -3
- package/dist/commands/loop.d.ts +42 -0
- package/dist/commands/loop.js +133 -0
- package/dist/commands/plan-picker.d.ts +15 -0
- package/dist/commands/plan-picker.js +76 -0
- package/dist/commands/scoper.d.ts +54 -0
- package/dist/{vendor/harness-opencode/dist/scoper-S77SOK7X.js → commands/scoper.js} +30 -15
- package/dist/commands/switch.js +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/lib/auto-update.js +1 -1
- package/dist/lib/config.d.ts +3 -2
- package/dist/lib/config.js +1 -1
- package/dist/lib/registry.d.ts +2 -0
- package/dist/lib/registry.js +1 -1
- package/dist/lib/worktree.js +3 -3
- package/dist/node_modules/@glrs-dev/adapter-opencode/dist/index.d.ts +261 -0
- package/dist/node_modules/@glrs-dev/adapter-opencode/dist/index.js +488 -0
- package/dist/node_modules/@glrs-dev/adapter-opencode/package.json +8 -0
- package/dist/node_modules/@glrs-dev/autopilot/dist/auto-ship-LCT6LIH7.js +7 -0
- package/dist/node_modules/@glrs-dev/autopilot/dist/changeset-generator-DG3MVWVV.js +15 -0
- package/dist/node_modules/@glrs-dev/autopilot/dist/chunk-7OSEI5TF.js +249 -0
- package/dist/node_modules/@glrs-dev/autopilot/dist/chunk-E7PWTRFO.js +91 -0
- package/dist/node_modules/@glrs-dev/autopilot/dist/chunk-M2ZVBPWL.js +101 -0
- package/dist/node_modules/@glrs-dev/autopilot/dist/chunk-Q4ULU6ER.js +68 -0
- package/dist/node_modules/@glrs-dev/autopilot/dist/chunk-VITL2Z45.js +2772 -0
- package/dist/node_modules/@glrs-dev/autopilot/dist/chunk-ZNJWARTM.js +449 -0
- package/dist/node_modules/@glrs-dev/autopilot/dist/index.d.ts +1765 -0
- package/dist/node_modules/@glrs-dev/autopilot/dist/index.js +688 -0
- package/dist/node_modules/@glrs-dev/autopilot/dist/logger-UITJGIZE.js +8 -0
- package/dist/node_modules/@glrs-dev/autopilot/dist/loop-session-XKL3NHUA.js +8 -0
- package/dist/node_modules/@glrs-dev/autopilot/dist/plan-enrichment-D3RPJR2J.js +14 -0
- package/dist/node_modules/@glrs-dev/autopilot/package.json +8 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/plan.md +7 -0
- package/dist/vendor/harness-opencode/dist/chunk-GILWWWMB.js +66 -0
- package/dist/vendor/harness-opencode/dist/cli.js +335 -639
- package/dist/vendor/harness-opencode/dist/index.js +35 -8
- package/dist/vendor/harness-opencode/dist/plugin-check-GJRD2OK6.js +14 -0
- package/dist/vendor/harness-opencode/package.json +1 -1
- package/package.json +14 -6
- package/dist/vendor/harness-opencode/dist/autopilot/prompt-template.md +0 -104
- package/dist/vendor/harness-opencode/dist/chunk-GCWHRUOK.js +0 -259
- package/dist/vendor/harness-opencode/dist/chunk-MJSMBY2Y.js +0 -87
- package/dist/vendor/harness-opencode/dist/chunk-NIFAVPNN.js +0 -544
- package/dist/vendor/harness-opencode/dist/loop-session-J35NILUZ.js +0 -30
- package/dist/vendor/harness-opencode/dist/opencode-server-KPCDFYAX.js +0 -22
- package/dist/vendor/harness-opencode/dist/plan-parser-TMHEKT22.js +0 -6
- package/dist/vendor/harness-opencode/dist/plan-session-7VS32P52.js +0 -117
|
@@ -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
|
+
};
|