@glrs-dev/cli 2.0.0 → 2.0.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
CHANGED
|
@@ -22,8 +22,8 @@ import {
|
|
|
22
22
|
flag as flag2,
|
|
23
23
|
option as option3,
|
|
24
24
|
optional as optional3,
|
|
25
|
-
positional
|
|
26
|
-
restPositionals,
|
|
25
|
+
positional,
|
|
26
|
+
restPositionals as restPositionals2,
|
|
27
27
|
string as string2,
|
|
28
28
|
subcommands as subcommands2,
|
|
29
29
|
run
|
|
@@ -642,7 +642,8 @@ var configureCmd = command({
|
|
|
642
642
|
});
|
|
643
643
|
|
|
644
644
|
// src/pilot/cli/scope.ts
|
|
645
|
-
import { command as command2,
|
|
645
|
+
import { command as command2, restPositionals, string } from "cmd-ts";
|
|
646
|
+
import { input as input2 } from "@inquirer/prompts";
|
|
646
647
|
|
|
647
648
|
// src/pilot/scope.ts
|
|
648
649
|
import * as fs5 from "fs";
|
|
@@ -887,11 +888,10 @@ async function runScopePhase(opts) {
|
|
|
887
888
|
closeDb();
|
|
888
889
|
try {
|
|
889
890
|
const { spawn: spawn2 } = await import("child_process");
|
|
890
|
-
const
|
|
891
|
-
fs5.writeFileSync(promptPath, scoperPrompt, "utf8");
|
|
891
|
+
const scoperPrompt2 = buildScopePrompt({ goal, scopePath, workflowId });
|
|
892
892
|
const child = spawn2(
|
|
893
893
|
"opencode",
|
|
894
|
-
["--agent", "pilot-scoper", "--prompt",
|
|
894
|
+
["--agent", "pilot-scoper", "--prompt", scoperPrompt2],
|
|
895
895
|
{
|
|
896
896
|
stdio: "inherit",
|
|
897
897
|
// TUI takes over the terminal
|
|
@@ -903,10 +903,6 @@ async function runScopePhase(opts) {
|
|
|
903
903
|
child.on("close", (code) => resolve2(code ?? 1));
|
|
904
904
|
child.on("error", () => resolve2(1));
|
|
905
905
|
});
|
|
906
|
-
try {
|
|
907
|
-
fs5.unlinkSync(promptPath);
|
|
908
|
-
} catch {
|
|
909
|
-
}
|
|
910
906
|
if (exitCode !== 0) {
|
|
911
907
|
return {
|
|
912
908
|
ok: false,
|
|
@@ -999,14 +995,29 @@ var scopeCmd = command2({
|
|
|
999
995
|
name: "scope",
|
|
1000
996
|
description: "Start a new pilot workflow with interactive scoping. Produces scope.json for `pilot go`.",
|
|
1001
997
|
args: {
|
|
1002
|
-
|
|
998
|
+
goalWords: restPositionals({
|
|
1003
999
|
type: string,
|
|
1004
1000
|
displayName: "goal",
|
|
1005
|
-
description:
|
|
1001
|
+
description: "What you want to build (optional \u2014 will prompt if not provided)"
|
|
1006
1002
|
})
|
|
1007
1003
|
},
|
|
1008
|
-
handler: async ({
|
|
1004
|
+
handler: async ({ goalWords }) => {
|
|
1009
1005
|
const cwd = process.cwd();
|
|
1006
|
+
let goal = goalWords.join(" ").trim();
|
|
1007
|
+
if (!goal) {
|
|
1008
|
+
if (!process.stdin.isTTY) {
|
|
1009
|
+
process.stderr.write("pilot scope: no goal provided and not running in a TTY.\n");
|
|
1010
|
+
process.stderr.write(' Usage: pilot scope "<what you want to build>"\n');
|
|
1011
|
+
process.exit(1);
|
|
1012
|
+
}
|
|
1013
|
+
goal = await input2({
|
|
1014
|
+
message: "What do you want to build?"
|
|
1015
|
+
});
|
|
1016
|
+
if (!goal.trim()) {
|
|
1017
|
+
process.stderr.write("pilot scope: goal cannot be empty.\n");
|
|
1018
|
+
process.exit(1);
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1010
1021
|
console.log(`
|
|
1011
1022
|
\x1B[1mPilot v2 \u2014 Scope phase\x1B[0m`);
|
|
1012
1023
|
console.log(`Goal: ${goal}
|
|
@@ -2293,7 +2304,7 @@ var planCheckCmd = command6({
|
|
|
2293
2304
|
type: optional3(string2),
|
|
2294
2305
|
description: "Structural validation; exits 1 if any item is invalid."
|
|
2295
2306
|
}),
|
|
2296
|
-
rest:
|
|
2307
|
+
rest: restPositionals2({
|
|
2297
2308
|
type: string2,
|
|
2298
2309
|
displayName: "plan-path",
|
|
2299
2310
|
description: "Path to a plan markdown file. Required unless --run / --check is given."
|
|
@@ -2531,7 +2531,7 @@ import { join as join10 } from "path";
|
|
|
2531
2531
|
var APP_KEY = "A-US-3617699429";
|
|
2532
2532
|
var ENDPOINT = "https://us.aptabase.com/api/v0/event";
|
|
2533
2533
|
var PKG_NAME = "@glrs-dev/harness-plugin-opencode";
|
|
2534
|
-
var PKG_VERSION = true ? "2.0.
|
|
2534
|
+
var PKG_VERSION = true ? "2.0.1" : "dev";
|
|
2535
2535
|
var DISABLED = process.env.HARNESS_OPENCODE_TELEMETRY === "0" || process.env.HARNESS_OPENCODE_TELEMETRY === "false" || process.env.DO_NOT_TRACK === "1" || process.env.CI === "true";
|
|
2536
2536
|
var SESSION_ID = randomUUID();
|
|
2537
2537
|
function getInstallId() {
|