@gh-symphony/cli 0.1.3 → 0.1.4
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/{chunk-PG332ZS4.js → chunk-DW63WPRE.js} +1 -1
- package/dist/{chunk-PEZUBHWJ.js → chunk-E7OCBNB2.js} +76 -8
- package/dist/{chunk-WCOIVNHH.js → chunk-EWTMSDCE.js} +3154 -224
- package/dist/{chunk-NESHTYXQ.js → chunk-HT3FAJAO.js} +3 -3
- package/dist/{chunk-2YF7PQUC.js → chunk-RHLUIMBN.js} +1 -1
- package/dist/{chunk-HQ7A3C7K.js → chunk-YIARPBOR.js} +1 -1
- package/dist/{doctor-2AXHIEAP.js → doctor-I32MANQ4.js} +4 -4
- package/dist/index.js +6 -6
- package/dist/{repo-SUXYT4OK.js → repo-IH6UWE4H.js} +10 -11
- package/dist/{setup-UBHOMXUG.js → setup-UJC2WYHQ.js} +3 -3
- package/dist/{upgrade-355SQJ5P.js → upgrade-XYHCUGHT.js} +2 -2
- package/dist/{version-4ILSDZQH.js → version-B2AYYGLM.js} +1 -1
- package/dist/worker-entry.js +43 -3
- package/dist/{workflow-S6YSZPQT.js → workflow-WSXHMO5B.js} +4 -4
- package/package.json +5 -5
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
workflow_init_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RHLUIMBN.js";
|
|
5
5
|
import {
|
|
6
6
|
fetchGithubProjectIssueByRepositoryAndNumber,
|
|
7
7
|
inspectManagedProjectSelection
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YIARPBOR.js";
|
|
9
9
|
import {
|
|
10
10
|
GitHubApiError,
|
|
11
11
|
createClient,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
buildPromptVariables,
|
|
19
19
|
parseWorkflowMarkdown,
|
|
20
20
|
renderPrompt
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-EWTMSDCE.js";
|
|
22
22
|
|
|
23
23
|
// src/commands/workflow.ts
|
|
24
24
|
import { readFile } from "fs/promises";
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
parseIssueReference,
|
|
4
4
|
readGitHubProjectBinding,
|
|
5
5
|
renderIssueWorkflowPreview
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-HT3FAJAO.js";
|
|
7
|
+
import "./chunk-RHLUIMBN.js";
|
|
8
8
|
import {
|
|
9
9
|
fetchGithubProjectIssueByRepositoryAndNumber,
|
|
10
10
|
fetchGithubProjectIssues,
|
|
11
11
|
inspectManagedProjectSelection
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YIARPBOR.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveRuntimeRoot
|
|
15
15
|
} from "./chunk-6I753NYO.js";
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
resolveClaudeCommandBinary,
|
|
35
35
|
resolveRuntimeCommandBinary,
|
|
36
36
|
runClaudePreflight
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-EWTMSDCE.js";
|
|
38
38
|
import "./chunk-WOVNN5NW.js";
|
|
39
39
|
|
|
40
40
|
// src/commands/doctor.ts
|
package/dist/index.js
CHANGED
|
@@ -414,13 +414,13 @@ function createRemovedCommandHandler(message) {
|
|
|
414
414
|
|
|
415
415
|
// src/index.ts
|
|
416
416
|
var COMMANDS = {
|
|
417
|
-
workflow: () => import("./workflow-
|
|
418
|
-
setup: () => import("./setup-
|
|
419
|
-
doctor: () => import("./doctor-
|
|
420
|
-
upgrade: () => import("./upgrade-
|
|
421
|
-
repo: () => import("./repo-
|
|
417
|
+
workflow: () => import("./workflow-WSXHMO5B.js"),
|
|
418
|
+
setup: () => import("./setup-UJC2WYHQ.js"),
|
|
419
|
+
doctor: () => import("./doctor-I32MANQ4.js"),
|
|
420
|
+
upgrade: () => import("./upgrade-XYHCUGHT.js"),
|
|
421
|
+
repo: () => import("./repo-IH6UWE4H.js"),
|
|
422
422
|
config: () => import("./config-cmd-2ADPUYWA.js"),
|
|
423
|
-
version: () => import("./version-
|
|
423
|
+
version: () => import("./version-B2AYYGLM.js")
|
|
424
424
|
};
|
|
425
425
|
function addGlobalOptions(command) {
|
|
426
426
|
return command.option("--config <dir>", "Config directory").addOption(new Option("--config-dir <dir>").hideHelp()).option("-v, --verbose", "Enable verbose output").option("--json", "Output in JSON format").option("--no-color", "Disable color output");
|
|
@@ -14,17 +14,17 @@ import {
|
|
|
14
14
|
stripAnsi,
|
|
15
15
|
yellow
|
|
16
16
|
} from "./chunk-MVRF7BES.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-E7OCBNB2.js";
|
|
18
18
|
import {
|
|
19
19
|
initRepoRuntime,
|
|
20
20
|
parseRepoRuntimeFlags
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-DW63WPRE.js";
|
|
22
22
|
import {
|
|
23
23
|
findGithubProjectIssue,
|
|
24
24
|
handleMissingManagedProjectConfig,
|
|
25
25
|
resolveManagedProjectConfig,
|
|
26
26
|
resolveTrackerAdapter
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-YIARPBOR.js";
|
|
28
28
|
import {
|
|
29
29
|
resolveRepoRuntimeRoot,
|
|
30
30
|
resolveRuntimeRoot
|
|
@@ -57,13 +57,14 @@ import {
|
|
|
57
57
|
parseRecentEvents,
|
|
58
58
|
readEnvFile,
|
|
59
59
|
readJsonFile,
|
|
60
|
+
redactObservabilitySecrets,
|
|
60
61
|
renderPrompt,
|
|
61
62
|
resolveIssueWorkspaceDirectory,
|
|
62
63
|
resolveWorkflowRuntimeCommand,
|
|
63
64
|
resolveWorkflowRuntimeTimeouts,
|
|
64
65
|
safeReadDir,
|
|
65
66
|
scheduleRetryAt
|
|
66
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-EWTMSDCE.js";
|
|
67
68
|
import {
|
|
68
69
|
daemonPidPath,
|
|
69
70
|
httpStatusPath,
|
|
@@ -779,10 +780,7 @@ var OrchestratorFsStore = class {
|
|
|
779
780
|
);
|
|
780
781
|
}
|
|
781
782
|
async saveProjectStatus(status) {
|
|
782
|
-
await writeJsonFile2(
|
|
783
|
-
join3(this.projectDir(), "status.json"),
|
|
784
|
-
status
|
|
785
|
-
);
|
|
783
|
+
await writeJsonFile2(join3(this.projectDir(), "status.json"), status);
|
|
786
784
|
}
|
|
787
785
|
async loadProjectStatus(projectId) {
|
|
788
786
|
return await readJsonFile(
|
|
@@ -812,11 +810,12 @@ var OrchestratorFsStore = class {
|
|
|
812
810
|
async saveRun(run) {
|
|
813
811
|
await writeJsonFile2(
|
|
814
812
|
join3(this.runDir(run.runId, run.projectId), "run.json"),
|
|
815
|
-
run
|
|
813
|
+
redactObservabilitySecrets(run)
|
|
816
814
|
);
|
|
817
815
|
}
|
|
818
816
|
async appendRunEvent(runId, event) {
|
|
819
|
-
const
|
|
817
|
+
const redactedEvent = redactObservabilitySecrets(event);
|
|
818
|
+
const resolvedProjectId = "projectId" in redactedEvent && typeof redactedEvent.projectId === "string" ? redactedEvent.projectId : void 0;
|
|
820
819
|
const runDirectory = resolvedProjectId !== void 0 ? this.runDir(runId, resolvedProjectId) : await this.findRunDir(runId);
|
|
821
820
|
if (!runDirectory) {
|
|
822
821
|
throw new Error(
|
|
@@ -825,7 +824,7 @@ var OrchestratorFsStore = class {
|
|
|
825
824
|
}
|
|
826
825
|
const path = join3(runDirectory, "events.ndjson");
|
|
827
826
|
const resolvedPath = resolve2(path);
|
|
828
|
-
const serializedEvent = JSON.stringify(
|
|
827
|
+
const serializedEvent = JSON.stringify(redactedEvent) + "\n";
|
|
829
828
|
await mkdir2(dirname(path), { recursive: true });
|
|
830
829
|
await appendFile(path, serializedEvent, {
|
|
831
830
|
encoding: "utf8",
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
validateStateMapping,
|
|
11
11
|
writeEcosystem,
|
|
12
12
|
writeWorkflowPlan
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-RHLUIMBN.js";
|
|
14
14
|
import {
|
|
15
15
|
initRepoRuntime
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-DW63WPRE.js";
|
|
17
17
|
import "./chunk-6I753NYO.js";
|
|
18
18
|
import {
|
|
19
19
|
GhAuthError,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
listUserProjects,
|
|
27
27
|
validateToken
|
|
28
28
|
} from "./chunk-Z3NZOPLZ.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-EWTMSDCE.js";
|
|
30
30
|
import "./chunk-WOVNN5NW.js";
|
|
31
31
|
|
|
32
32
|
// src/commands/setup.ts
|
|
@@ -16,8 +16,8 @@ function execFileAsync(file, args, execFileImpl = execFileCallback) {
|
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
function resolveCurrentCliVersion() {
|
|
19
|
-
if ("0.1.
|
|
20
|
-
return "0.1.
|
|
19
|
+
if ("0.1.4".length > 0) {
|
|
20
|
+
return "0.1.4";
|
|
21
21
|
}
|
|
22
22
|
const pkg = JSON.parse(
|
|
23
23
|
readFileSync(new URL("../../package.json", import.meta.url), "utf8")
|
package/dist/worker-entry.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
normalizeCodexRuntimeEvents,
|
|
7
7
|
prepareCodexRuntimePlan,
|
|
8
8
|
resolveLocalRuntimeLaunchConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-E7OCBNB2.js";
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_AGENT_INPUT_REQUIRED_REASON,
|
|
12
12
|
classifySessionExit,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
resolveClaudeCommandBinary,
|
|
18
18
|
resolveWorkflowRuntimeCommand,
|
|
19
19
|
runClaudePreflight
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-EWTMSDCE.js";
|
|
21
21
|
|
|
22
22
|
// ../worker/src/index.ts
|
|
23
23
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -297,6 +297,9 @@ function resolveWorkerRuntimeRoute(workflow) {
|
|
|
297
297
|
function resolveClaudePreflightAuthMode(workflow) {
|
|
298
298
|
return workflow.runtime?.isolation.bare === true ? "api-key-required" : "local-or-api-key";
|
|
299
299
|
}
|
|
300
|
+
function shouldExposeLinearGraphQLTool(workflow, env = process.env) {
|
|
301
|
+
return workflow.tracker.kind === "linear" || env.SYMPHONY_TRACKER_KIND === "linear" || env.SYMPHONY_TRACKER_ADAPTER === "linear";
|
|
302
|
+
}
|
|
300
303
|
|
|
301
304
|
// ../worker/src/thread-resume.ts
|
|
302
305
|
var DEFAULT_CONTINUATION_GUIDANCE = "Continue working on the issue. Review your progress and complete any remaining tasks.";
|
|
@@ -765,6 +768,13 @@ async function startAssignedRun() {
|
|
|
765
768
|
}
|
|
766
769
|
const config = resolveLocalRuntimeLaunchConfig(launcherEnv);
|
|
767
770
|
config.agentCommand = resolveWorkflowRuntimeCommand(workflow);
|
|
771
|
+
config.enableLinearGraphqlTool = shouldExposeLinearGraphQLTool(
|
|
772
|
+
workflow,
|
|
773
|
+
launcherEnv
|
|
774
|
+
);
|
|
775
|
+
config.linearApiKey = launcherEnv.LINEAR_API_KEY;
|
|
776
|
+
config.linearAuthorization = launcherEnv.LINEAR_AUTHORIZATION;
|
|
777
|
+
config.linearGraphqlUrl = launcherEnv.LINEAR_GRAPHQL_URL;
|
|
768
778
|
const plan = await prepareCodexRuntimePlan(config);
|
|
769
779
|
childProcess = launchCodexAppServer(plan);
|
|
770
780
|
runtimeState.status = "running";
|
|
@@ -946,7 +956,15 @@ async function runNonCodexRuntimeAdapterLifecycle(workflow, env) {
|
|
|
946
956
|
async function spawnNonCodexRuntimeTurn(adapter, runtimeKind, renderedPrompt, env) {
|
|
947
957
|
if (runtimeKind === "claude-print") {
|
|
948
958
|
return await adapter.spawnTurn({
|
|
949
|
-
messages: [
|
|
959
|
+
messages: [
|
|
960
|
+
{
|
|
961
|
+
type: "user",
|
|
962
|
+
message: {
|
|
963
|
+
role: "user",
|
|
964
|
+
content: [{ type: "text", text: renderedPrompt }]
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
],
|
|
950
968
|
cwd: env.WORKING_DIRECTORY,
|
|
951
969
|
env
|
|
952
970
|
});
|
|
@@ -1007,8 +1025,30 @@ function isNonCodexTurnFailure(result) {
|
|
|
1007
1025
|
return result.result !== "success";
|
|
1008
1026
|
}
|
|
1009
1027
|
function describeNonCodexTurnFailure(result) {
|
|
1028
|
+
const stderrSummary = extractRuntimeStderrSummary(result);
|
|
1029
|
+
if (stderrSummary) {
|
|
1030
|
+
return result.errorMessage ?? `${result.command} exited with ${result.signal ?? result.exitCode ?? "unknown"}: ${stderrSummary}`;
|
|
1031
|
+
}
|
|
1010
1032
|
return result.errorMessage ?? `${result.command} exited with ${result.signal ?? result.exitCode ?? "unknown"}`;
|
|
1011
1033
|
}
|
|
1034
|
+
function extractRuntimeStderrSummary(result) {
|
|
1035
|
+
if ("stderr" in result) {
|
|
1036
|
+
return summarizeRuntimeStderr(result.stderr);
|
|
1037
|
+
}
|
|
1038
|
+
if ("records" in result) {
|
|
1039
|
+
return summarizeRuntimeStderr(
|
|
1040
|
+
result.records.filter((record) => record.stream === "stderr").map((record) => record.line || record.parseError).filter((line) => Boolean(line)).join("\n")
|
|
1041
|
+
);
|
|
1042
|
+
}
|
|
1043
|
+
return null;
|
|
1044
|
+
}
|
|
1045
|
+
function summarizeRuntimeStderr(stderr) {
|
|
1046
|
+
const lines = stderr.split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0);
|
|
1047
|
+
if (lines.length === 0) {
|
|
1048
|
+
return null;
|
|
1049
|
+
}
|
|
1050
|
+
return lines.slice(-3).join(" | ").slice(0, 1e3);
|
|
1051
|
+
}
|
|
1012
1052
|
async function exitWorkerStartupFailure(message) {
|
|
1013
1053
|
runtimeState.status = "failed";
|
|
1014
1054
|
runtimeState.runPhase = "failed";
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
resetWorkflowCommandDependenciesForTest,
|
|
7
7
|
setWorkflowCommandDependenciesForTest,
|
|
8
8
|
workflow_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-HT3FAJAO.js";
|
|
10
|
+
import "./chunk-RHLUIMBN.js";
|
|
11
|
+
import "./chunk-YIARPBOR.js";
|
|
12
12
|
import "./chunk-Z3NZOPLZ.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-EWTMSDCE.js";
|
|
14
14
|
import "./chunk-WOVNN5NW.js";
|
|
15
15
|
export {
|
|
16
16
|
workflow_default as default,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gh-symphony/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "hojinzs",
|
|
6
6
|
"description": "Interactive CLI for GitHub Symphony orchestration",
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"tsup": "^8.5.1",
|
|
44
|
-
"@gh-symphony/control-plane": "0.0.15",
|
|
45
|
-
"@gh-symphony/dashboard": "0.0.14",
|
|
46
44
|
"@gh-symphony/core": "0.0.14",
|
|
45
|
+
"@gh-symphony/control-plane": "0.0.15",
|
|
47
46
|
"@gh-symphony/orchestrator": "0.0.14",
|
|
48
|
-
"@gh-symphony/
|
|
47
|
+
"@gh-symphony/dashboard": "0.0.14",
|
|
49
48
|
"@gh-symphony/runtime-claude": "0.0.14",
|
|
50
|
-
"@gh-symphony/tracker-github": "0.0.14"
|
|
49
|
+
"@gh-symphony/tracker-github": "0.0.14",
|
|
50
|
+
"@gh-symphony/worker": "0.0.14"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "tsup",
|