@gh-symphony/cli 0.2.4 → 0.3.0
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-DLZ2XHWY.js → chunk-2ZIPQ7ZS.js} +1 -1
- package/dist/{chunk-3SKN5L3I.js → chunk-5HQLPZR5.js} +15 -6
- package/dist/{chunk-FAU72YC2.js → chunk-A7EFL6EJ.js} +1 -1
- package/dist/{chunk-PLBG7TZA.js → chunk-GL55AKBI.js} +169 -33
- package/dist/{chunk-7Z7WYGDL.js → chunk-GTNWFVFU.js} +9 -5
- package/dist/{chunk-BOM2BYZQ.js → chunk-SMNIGNS3.js} +106 -11
- package/dist/{chunk-NRABQNAX.js → chunk-VHEGRYK7.js} +3 -2
- package/dist/{doctor-MD4MD6SZ.js → doctor-3IIM4UYS.js} +6 -6
- package/dist/index.js +7 -7
- package/dist/{repo-CK2IDMZF.js → repo-SLK4DDXH.js} +198 -13
- package/dist/{setup-KZ3U53PY.js → setup-G5VYN6FV.js} +33 -13
- package/dist/{upgrade-2WPPOUZL.js → upgrade-BXIHAENU.js} +2 -2
- package/dist/{version-Z2T42H5M.js → version-MC2KSPJB.js} +1 -1
- package/dist/worker-entry.js +5 -5
- package/dist/{workflow-7Y6GTV2C.js → workflow-4OFPSVZ3.js} +6 -6
- package/package.json +3 -3
|
@@ -4,22 +4,25 @@ import {
|
|
|
4
4
|
buildAutomaticStateMappings,
|
|
5
5
|
collectPriorityLabelNames,
|
|
6
6
|
planWorkflowArtifacts,
|
|
7
|
+
promptBlockerCheck,
|
|
7
8
|
promptPriorityConfig,
|
|
8
9
|
promptStateMappings,
|
|
9
10
|
renderDryRunPreview,
|
|
10
11
|
resolvePriorityField,
|
|
11
12
|
resolveStatusField,
|
|
13
|
+
toWorkflowLifecycleConfig,
|
|
12
14
|
validateStateMapping,
|
|
13
15
|
writeEcosystem,
|
|
14
16
|
writeWorkflowPlan
|
|
15
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GL55AKBI.js";
|
|
16
18
|
import {
|
|
17
19
|
initRepoRuntime
|
|
18
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2ZIPQ7ZS.js";
|
|
19
21
|
import "./chunk-RZ3WO7OV.js";
|
|
20
22
|
import {
|
|
21
23
|
GhAuthError,
|
|
22
24
|
GitHubScopeError,
|
|
25
|
+
REQUIRED_GH_SCOPES,
|
|
23
26
|
checkRequiredScopes,
|
|
24
27
|
createClient,
|
|
25
28
|
ensureGhAuth,
|
|
@@ -27,14 +30,13 @@ import {
|
|
|
27
30
|
getProjectDetail,
|
|
28
31
|
listUserProjects,
|
|
29
32
|
validateToken
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
33
|
+
} from "./chunk-SMNIGNS3.js";
|
|
34
|
+
import "./chunk-5HQLPZR5.js";
|
|
32
35
|
import "./chunk-4ICDSQCJ.js";
|
|
33
36
|
|
|
34
37
|
// src/commands/setup.ts
|
|
35
38
|
import * as p from "@clack/prompts";
|
|
36
39
|
import { resolve } from "path";
|
|
37
|
-
var KNOWN_REQUIRED_SCOPES = ["repo", "read:org", "project"];
|
|
38
40
|
function parseSetupFlags(args) {
|
|
39
41
|
const flags = {
|
|
40
42
|
nonInteractive: false,
|
|
@@ -74,7 +76,7 @@ function displayScopeError(error, retryCommand) {
|
|
|
74
76
|
`Token is missing required scope${plural}: ${error.requiredScopes.join(", ")}`
|
|
75
77
|
);
|
|
76
78
|
const currentSet = new Set(error.currentScopes.map((s) => s.toLowerCase()));
|
|
77
|
-
const scopesToAdd =
|
|
79
|
+
const scopesToAdd = REQUIRED_GH_SCOPES.filter((s) => !currentSet.has(s));
|
|
78
80
|
const scopeArg = scopesToAdd.length > 0 ? scopesToAdd.join(",") : error.requiredScopes.join(",");
|
|
79
81
|
p.note(
|
|
80
82
|
`gh auth refresh --scopes ${scopeArg}
|
|
@@ -106,7 +108,7 @@ async function selectProjectSummary(client) {
|
|
|
106
108
|
}
|
|
107
109
|
const selectedProjectId = await abortIfCancelled(
|
|
108
110
|
p.select({
|
|
109
|
-
message: "Step 1/
|
|
111
|
+
message: "Step 1/4 \u2014 Select a GitHub Project board:",
|
|
110
112
|
options: projects.map((project) => ({
|
|
111
113
|
value: project.id,
|
|
112
114
|
label: `${project.owner.login}/${project.title}`,
|
|
@@ -283,11 +285,17 @@ async function runInteractive(flags, _options) {
|
|
|
283
285
|
authSpinner.stop("Authentication failed.");
|
|
284
286
|
if (error instanceof GhAuthError) {
|
|
285
287
|
if (error.code === "not_installed") {
|
|
286
|
-
p.log.error(
|
|
288
|
+
p.log.error(
|
|
289
|
+
"gh CLI\uAC00 \uC124\uCE58\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. https://cli.github.com \uC5D0\uC11C \uC124\uCE58\uD558\uC138\uC694."
|
|
290
|
+
);
|
|
287
291
|
} else if (error.code === "not_authenticated") {
|
|
288
|
-
p.log.error(
|
|
292
|
+
p.log.error(
|
|
293
|
+
"gh auth login --scopes repo,read:org,project \uB97C \uC2E4\uD589\uD558\uC138\uC694."
|
|
294
|
+
);
|
|
289
295
|
} else if (error.code === "missing_scopes") {
|
|
290
|
-
p.log.error(
|
|
296
|
+
p.log.error(
|
|
297
|
+
"gh auth refresh --scopes repo,read:org,project \uB97C \uC2E4\uD589\uD558\uC138\uC694."
|
|
298
|
+
);
|
|
291
299
|
} else {
|
|
292
300
|
p.log.error(error.message);
|
|
293
301
|
}
|
|
@@ -339,7 +347,7 @@ async function runInteractive(flags, _options) {
|
|
|
339
347
|
projectDetail.linkedRepositories
|
|
340
348
|
);
|
|
341
349
|
const mappings = await promptStateMappings(statusField, {
|
|
342
|
-
stepLabel: "Step 2/
|
|
350
|
+
stepLabel: "Step 2/4"
|
|
343
351
|
});
|
|
344
352
|
const workflowValidation = validateStateMapping(mappings);
|
|
345
353
|
if (!workflowValidation.valid) {
|
|
@@ -353,10 +361,18 @@ async function runInteractive(flags, _options) {
|
|
|
353
361
|
for (const warning of workflowValidation.warnings) {
|
|
354
362
|
p.log.warn(` \u26A0 ${warning}`);
|
|
355
363
|
}
|
|
364
|
+
const lifecycleBase = toWorkflowLifecycleConfig(statusField.name, mappings);
|
|
365
|
+
const blockerCheckStates = await promptBlockerCheck(lifecycleBase, {
|
|
366
|
+
stepLabel: "Step 3/4"
|
|
367
|
+
});
|
|
368
|
+
const lifecycle = toWorkflowLifecycleConfig(statusField.name, mappings, {
|
|
369
|
+
blockerCheckStates,
|
|
370
|
+
planningStates: blockerCheckStates
|
|
371
|
+
});
|
|
356
372
|
const { priority, priorityField } = await promptPriorityConfig({
|
|
357
373
|
priorityResolution,
|
|
358
374
|
labelNames: priorityLabelNames,
|
|
359
|
-
stepLabel: "Step
|
|
375
|
+
stepLabel: "Step 4/4"
|
|
360
376
|
});
|
|
361
377
|
const workflowPath = resolve(flags.output ?? "WORKFLOW.md");
|
|
362
378
|
const { workflowPlan, ecosystemPlan } = await planWorkflowArtifacts({
|
|
@@ -368,6 +384,7 @@ async function runInteractive(flags, _options) {
|
|
|
368
384
|
priority,
|
|
369
385
|
includePriorityTemplates: priority.source === "disabled",
|
|
370
386
|
mappings,
|
|
387
|
+
lifecycle,
|
|
371
388
|
runtime: "codex",
|
|
372
389
|
skipSkills: flags.skipSkills,
|
|
373
390
|
skipContext: flags.skipContext
|
|
@@ -400,6 +417,7 @@ async function runInteractive(flags, _options) {
|
|
|
400
417
|
statusField,
|
|
401
418
|
priorityField,
|
|
402
419
|
priority,
|
|
420
|
+
lifecycle,
|
|
403
421
|
includePriorityTemplates: priority.source === "disabled",
|
|
404
422
|
runtime: "codex",
|
|
405
423
|
skipSkills: flags.skipSkills,
|
|
@@ -409,7 +427,9 @@ async function runInteractive(flags, _options) {
|
|
|
409
427
|
repoDir: process.cwd(),
|
|
410
428
|
workflowFile: workflowPath
|
|
411
429
|
});
|
|
412
|
-
writeSpinner.stop(
|
|
430
|
+
writeSpinner.stop(
|
|
431
|
+
`Setup saved for ${runtime.repository.owner}/${runtime.repository.name}.`
|
|
432
|
+
);
|
|
413
433
|
} catch (error) {
|
|
414
434
|
writeSpinner.stop("Setup failed.");
|
|
415
435
|
p.log.error(error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16,8 +16,8 @@ function execFileAsync(file, args, execFileImpl = execFileCallback) {
|
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
function resolveCurrentCliVersion() {
|
|
19
|
-
if ("0.
|
|
20
|
-
return "0.
|
|
19
|
+
if ("0.3.0".length > 0) {
|
|
20
|
+
return "0.3.0";
|
|
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-A7EFL6EJ.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-5HQLPZR5.js";
|
|
21
21
|
|
|
22
22
|
// ../worker/src/index.ts
|
|
23
23
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -26,11 +26,11 @@ import { join as join2 } from "path";
|
|
|
26
26
|
|
|
27
27
|
// ../worker/src/execution-phase.ts
|
|
28
28
|
function resolveInitialExecutionPhase(input) {
|
|
29
|
-
const { issueState,
|
|
29
|
+
const { issueState, planningStates, activeStates } = input;
|
|
30
30
|
if (!issueState) {
|
|
31
31
|
return null;
|
|
32
32
|
}
|
|
33
|
-
if (
|
|
33
|
+
if (planningStates.includes(issueState)) {
|
|
34
34
|
return "planning";
|
|
35
35
|
}
|
|
36
36
|
if (activeStates.includes(issueState)) {
|
|
@@ -788,7 +788,7 @@ async function startAssignedRun() {
|
|
|
788
788
|
}
|
|
789
789
|
runtimeState.executionPhase = resolveInitialExecutionPhase({
|
|
790
790
|
issueState: runtimeState.run?.state,
|
|
791
|
-
|
|
791
|
+
planningStates: workflow.lifecycle.planningStates,
|
|
792
792
|
activeStates: workflow.lifecycle.activeStates
|
|
793
793
|
});
|
|
794
794
|
runtimeState.runPhase = "launching_agent";
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
resetWorkflowCommandDependenciesForTest,
|
|
7
7
|
setWorkflowCommandDependenciesForTest,
|
|
8
8
|
workflow_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-GTNWFVFU.js";
|
|
10
|
+
import "./chunk-GL55AKBI.js";
|
|
11
|
+
import "./chunk-VHEGRYK7.js";
|
|
12
|
+
import "./chunk-A7EFL6EJ.js";
|
|
13
|
+
import "./chunk-SMNIGNS3.js";
|
|
14
|
+
import "./chunk-5HQLPZR5.js";
|
|
15
15
|
import "./chunk-4ICDSQCJ.js";
|
|
16
16
|
export {
|
|
17
17
|
workflow_default as default,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gh-symphony/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "hojinzs",
|
|
6
6
|
"description": "Interactive CLI for GitHub Symphony orchestration",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"tsup": "^8.5.1",
|
|
44
|
-
"@gh-symphony/control-plane": "0.0.15",
|
|
45
44
|
"@gh-symphony/core": "0.0.14",
|
|
46
|
-
"@gh-symphony/
|
|
45
|
+
"@gh-symphony/control-plane": "0.0.15",
|
|
47
46
|
"@gh-symphony/dashboard": "0.0.14",
|
|
48
47
|
"@gh-symphony/runtime-claude": "0.0.14",
|
|
48
|
+
"@gh-symphony/orchestrator": "0.0.14",
|
|
49
49
|
"@gh-symphony/worker": "0.0.14",
|
|
50
50
|
"@gh-symphony/tracker-github": "0.0.14"
|
|
51
51
|
},
|