@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.
@@ -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-PLBG7TZA.js";
17
+ } from "./chunk-GL55AKBI.js";
16
18
  import {
17
19
  initRepoRuntime
18
- } from "./chunk-DLZ2XHWY.js";
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-BOM2BYZQ.js";
31
- import "./chunk-3SKN5L3I.js";
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 = KNOWN_REQUIRED_SCOPES.filter((s) => !currentSet.has(s));
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/3 \u2014 Select a GitHub Project board:",
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("gh CLI\uAC00 \uC124\uCE58\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. https://cli.github.com \uC5D0\uC11C \uC124\uCE58\uD558\uC138\uC694.");
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("gh auth login --scopes repo,read:org,project \uB97C \uC2E4\uD589\uD558\uC138\uC694.");
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("gh auth refresh --scopes repo,read:org,project \uB97C \uC2E4\uD589\uD558\uC138\uC694.");
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/3"
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 3/3"
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(`Setup saved for ${runtime.repository.owner}/${runtime.repository.name}.`);
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.2.4".length > 0) {
20
- return "0.2.4";
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")
@@ -2,7 +2,7 @@
2
2
 
3
3
  // src/commands/version.ts
4
4
  var handler = async (_args, options) => {
5
- const version = "0.2.4";
5
+ const version = "0.3.0";
6
6
  if (options.json) {
7
7
  process.stdout.write(JSON.stringify({ version }) + "\n");
8
8
  } else {
@@ -6,7 +6,7 @@ import {
6
6
  normalizeCodexRuntimeEvents,
7
7
  prepareCodexRuntimePlan,
8
8
  resolveLocalRuntimeLaunchConfig
9
- } from "./chunk-FAU72YC2.js";
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-3SKN5L3I.js";
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, blockerCheckStates, activeStates } = input;
29
+ const { issueState, planningStates, activeStates } = input;
30
30
  if (!issueState) {
31
31
  return null;
32
32
  }
33
- if (blockerCheckStates.includes(issueState)) {
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
- blockerCheckStates: workflow.lifecycle.blockerCheckStates,
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-7Z7WYGDL.js";
10
- import "./chunk-PLBG7TZA.js";
11
- import "./chunk-NRABQNAX.js";
12
- import "./chunk-FAU72YC2.js";
13
- import "./chunk-BOM2BYZQ.js";
14
- import "./chunk-3SKN5L3I.js";
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.2.4",
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/orchestrator": "0.0.14",
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
  },