@gh-symphony/cli 0.0.20 → 0.0.22

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.
Files changed (40) hide show
  1. package/README.md +66 -2
  2. package/dist/chunk-2TSM3INR.js +1085 -0
  3. package/dist/chunk-2UW7NQLX.js +684 -0
  4. package/dist/{chunk-MVRF7BES.js → chunk-36KYEDEO.js} +10 -1
  5. package/dist/{chunk-TILHWBP6.js → chunk-C67H3OUL.js} +239 -36
  6. package/dist/{chunk-C7G7RJ4G.js → chunk-DDL4BWSL.js} +1 -1
  7. package/dist/{chunk-XN5ABWZ6.js → chunk-DFLXHNYQ.js} +26 -30
  8. package/dist/{chunk-EKKT5USP.js → chunk-E7HYEEZD.js} +487 -133
  9. package/dist/chunk-EEQQWTXS.js +3257 -0
  10. package/dist/chunk-GDE6FYN4.js +26 -0
  11. package/dist/{chunk-Y6TYJMNT.js → chunk-GSX2FV3M.js} +10 -16
  12. package/dist/{chunk-RN2PACNV.js → chunk-HMLBBZNY.js} +731 -75
  13. package/dist/{chunk-5NV3LSAJ.js → chunk-IWFX2FMA.js} +5 -1
  14. package/dist/{chunk-HZVDTAPS.js → chunk-PUDXVBSN.js} +1549 -1458
  15. package/dist/{chunk-ROGRTUFI.js → chunk-QIRE2VXS.js} +14 -3
  16. package/dist/{chunk-3AWF54PI.js → chunk-ZHOKYUO3.js} +394 -42
  17. package/dist/{config-cmd-DNXNL26Z.js → config-cmd-Z3A7V6NC.js} +1 -1
  18. package/dist/{doctor-IYHCFXOZ.js → doctor-EJUMPBMW.js} +105 -40
  19. package/dist/index.js +112 -24
  20. package/dist/{init-KZT6YNOH.js → init-54HMKNYI.js} +8 -3
  21. package/dist/{logs-6JKKYDGJ.js → logs-GTZ4U5JE.js} +2 -2
  22. package/dist/project-RMYMZSFV.js +25 -0
  23. package/dist/{recover-5KQI7WH5.js → recover-LTLKMTRX.js} +7 -5
  24. package/dist/repo-WI7GF6XQ.js +749 -0
  25. package/dist/{run-ETC5UTRA.js → run-IHN3ZL35.js} +21 -7
  26. package/dist/{setup-VWB7RZUQ.js → setup-TZJSM3QV.js} +53 -14
  27. package/dist/start-RTAHQMR2.js +19 -0
  28. package/dist/status-F4D52OVK.js +12 -0
  29. package/dist/stop-MDKMJPVR.js +10 -0
  30. package/dist/{upgrade-3YNF3VKY.js → upgrade-O33S2SJK.js} +2 -2
  31. package/dist/{version-NUBTTOG7.js → version-CW54Q7BK.js} +1 -1
  32. package/dist/worker-entry.js +848 -693
  33. package/dist/{workflow-TBIFY5MO.js → workflow-L3KT6HB7.js} +177 -11
  34. package/package.json +4 -2
  35. package/dist/chunk-M3IFVLQS.js +0 -1155
  36. package/dist/project-UUVHS3ZR.js +0 -22
  37. package/dist/repo-HDDE7OUI.js +0 -321
  38. package/dist/start-ENFLZUI6.js +0 -16
  39. package/dist/status-QSCFVGRQ.js +0 -11
  40. package/dist/stop-7MFCBQVW.js +0 -9
@@ -1,16 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "./chunk-HZVDTAPS.js";
5
- import "./chunk-M3IFVLQS.js";
4
+ } from "./chunk-PUDXVBSN.js";
5
+ import "./chunk-2UW7NQLX.js";
6
+ import "./chunk-2TSM3INR.js";
7
+ import "./chunk-EEQQWTXS.js";
6
8
  import {
7
9
  resolveRuntimeRoot
8
- } from "./chunk-5NV3LSAJ.js";
10
+ } from "./chunk-IWFX2FMA.js";
9
11
  import {
10
12
  handleMissingManagedProjectConfig,
11
13
  resolveManagedProjectConfig
12
- } from "./chunk-C7G7RJ4G.js";
13
- import "./chunk-ROGRTUFI.js";
14
+ } from "./chunk-DDL4BWSL.js";
15
+ import "./chunk-QIRE2VXS.js";
14
16
 
15
17
  // src/commands/run.ts
16
18
  function parseRunArgs(args) {
@@ -70,10 +72,22 @@ var handler = async (args, options) => {
70
72
  const runtimeRoot = resolveRuntimeRoot(options.configDir);
71
73
  const projectId = projectConfig.projectId;
72
74
  const [repoSpec] = parsed.issue.split("#");
73
- if (repoSpec && !projectConfig.repositories.some((r) => `${r.owner}/${r.name}` === repoSpec)) {
75
+ const configuredRepos = [
76
+ ...projectConfig.repository ? [projectConfig.repository] : [],
77
+ ...projectConfig.repositories ?? []
78
+ ].filter((repository) => repository.owner && repository.name).map((repository) => `${repository.owner}/${repository.name}`);
79
+ const configuredRepoSet = new Set(configuredRepos);
80
+ if (configuredRepoSet.size === 0) {
81
+ process.stderr.write(
82
+ "No repository is configured in this project. Run 'gh-symphony repo add owner/name' first.\n"
83
+ );
84
+ process.exitCode = 1;
85
+ return;
86
+ }
87
+ if (repoSpec && !configuredRepoSet.has(repoSpec)) {
74
88
  process.stderr.write(
75
89
  `Repository "${repoSpec}" is not configured in this project.
76
- Configured repos: ${projectConfig.repositories.map((r) => `${r.owner}/${r.name}`).join(", ")}
90
+ Configured repo: ${configuredRepos.join(", ")}
77
91
  `
78
92
  );
79
93
  process.exitCode = 1;
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  promptProjectRegistrationOptions,
4
4
  renderProjectRegistrationSummary
5
- } from "./chunk-3AWF54PI.js";
5
+ } from "./chunk-ZHOKYUO3.js";
6
6
  import {
7
7
  abortIfCancelled,
8
8
  buildAutomaticStateMappings,
@@ -10,15 +10,17 @@ import {
10
10
  planWorkflowArtifacts,
11
11
  promptStateMappings,
12
12
  renderDryRunPreview,
13
+ resolvePriorityField,
13
14
  resolveStatusField,
14
15
  validateStateMapping,
15
16
  writeConfig,
16
17
  writeEcosystem,
17
18
  writeWorkflowPlan
18
- } from "./chunk-RN2PACNV.js";
19
- import "./chunk-EKKT5USP.js";
20
- import "./chunk-HZVDTAPS.js";
21
- import "./chunk-M3IFVLQS.js";
19
+ } from "./chunk-HMLBBZNY.js";
20
+ import "./chunk-E7HYEEZD.js";
21
+ import "./chunk-PUDXVBSN.js";
22
+ import "./chunk-2UW7NQLX.js";
23
+ import "./chunk-2TSM3INR.js";
22
24
  import {
23
25
  GhAuthError,
24
26
  GitHubScopeError,
@@ -29,13 +31,15 @@ import {
29
31
  getProjectDetail,
30
32
  listUserProjects,
31
33
  validateToken
32
- } from "./chunk-TILHWBP6.js";
33
- import "./chunk-XN5ABWZ6.js";
34
- import "./chunk-MVRF7BES.js";
35
- import "./chunk-5NV3LSAJ.js";
36
- import "./chunk-Y6TYJMNT.js";
37
- import "./chunk-C7G7RJ4G.js";
38
- import "./chunk-ROGRTUFI.js";
34
+ } from "./chunk-C67H3OUL.js";
35
+ import "./chunk-EEQQWTXS.js";
36
+ import "./chunk-DFLXHNYQ.js";
37
+ import "./chunk-36KYEDEO.js";
38
+ import "./chunk-IWFX2FMA.js";
39
+ import "./chunk-GSX2FV3M.js";
40
+ import "./chunk-GDE6FYN4.js";
41
+ import "./chunk-DDL4BWSL.js";
42
+ import "./chunk-QIRE2VXS.js";
39
43
 
40
44
  // src/commands/setup.ts
41
45
  import * as p from "@clack/prompts";
@@ -205,6 +209,13 @@ async function runNonInteractive(flags, options) {
205
209
  return;
206
210
  }
207
211
  const mappings = buildAutomaticStateMappings(statusField);
212
+ const { field: priorityField, ambiguous: ambiguousPriorityFields } = resolvePriorityField(projectDetail, statusField);
213
+ if (ambiguousPriorityFields.length > 0) {
214
+ process.stderr.write(
215
+ `Warning: Multiple priority-like single-select fields found (${ambiguousPriorityFields.map((field) => `"${field.name}"`).join(", ")}). Skipping tracker.priority_field in non-interactive mode.
216
+ `
217
+ );
218
+ }
208
219
  const workflowValidation = validateStateMapping(mappings);
209
220
  if (!workflowValidation.valid) {
210
221
  process.stderr.write(
@@ -221,6 +232,7 @@ Run setup without --non-interactive for manual mapping.
221
232
  outputPath: workflowPath,
222
233
  projectDetail,
223
234
  statusField,
235
+ priorityField,
224
236
  mappings,
225
237
  runtime: "codex",
226
238
  skipSkills: flags.skipSkills,
@@ -231,6 +243,7 @@ Run setup without --non-interactive for manual mapping.
231
243
  cwd: process.cwd(),
232
244
  projectDetail,
233
245
  statusField,
246
+ priorityField,
234
247
  runtime: "codex",
235
248
  skipSkills: flags.skipSkills,
236
249
  skipContext: flags.skipContext
@@ -335,8 +348,9 @@ async function runInteractive(flags, options) {
335
348
  process.exitCode = 1;
336
349
  return;
337
350
  }
351
+ const priorityResolution = resolvePriorityField(projectDetail, statusField);
338
352
  const mappings = await promptStateMappings(statusField, {
339
- stepLabel: "Step 2/3"
353
+ stepLabel: priorityResolution.ambiguous.length > 0 ? "Step 2/4" : "Step 2/3"
340
354
  });
341
355
  const workflowValidation = validateStateMapping(mappings);
342
356
  if (!workflowValidation.valid) {
@@ -350,6 +364,29 @@ async function runInteractive(flags, options) {
350
364
  for (const warning of workflowValidation.warnings) {
351
365
  p.log.warn(` \u26A0 ${warning}`);
352
366
  }
367
+ const priorityField = priorityResolution.ambiguous.length > 0 ? await (async () => {
368
+ const selectedId = await abortIfCancelled(
369
+ p.select({
370
+ message: "Step 3/4 \u2014 Multiple GitHub Project priority fields look plausible. Select the one Symphony should use:",
371
+ options: [
372
+ ...priorityResolution.ambiguous.map((field) => ({
373
+ value: field.id,
374
+ label: field.name,
375
+ hint: `${field.options.length} option${field.options.length === 1 ? "" : "s"}`
376
+ })),
377
+ {
378
+ value: "__skip_priority_field__",
379
+ label: "Skip priority-aware dispatch",
380
+ hint: "Leave tracker.priority_field unset"
381
+ }
382
+ ]
383
+ })
384
+ );
385
+ if (selectedId === "__skip_priority_field__") {
386
+ return null;
387
+ }
388
+ return priorityResolution.ambiguous.find((field) => field.id === selectedId) ?? null;
389
+ })() : priorityResolution.field;
353
390
  const {
354
391
  assignedOnly: promptAssignedOnly,
355
392
  selectedRepos,
@@ -357,7 +394,7 @@ async function runInteractive(flags, options) {
357
394
  } = await promptProjectRegistrationOptions({
358
395
  projectDetail,
359
396
  defaultWorkspaceDir: flags.workspaceDir ?? join(options.configDir, "workspaces"),
360
- assignedOnlyMessage: "Step 3/3 \u2014 Only process issues assigned to the authenticated GitHub user?",
397
+ assignedOnlyMessage: `${priorityResolution.ambiguous.length > 0 ? "Step 4/4" : "Step 3/3"} \u2014 Only process issues assigned to the authenticated GitHub user?`,
361
398
  assignedOnlyInitialValue: flags.assignedOnly
362
399
  });
363
400
  const assignedOnly = flags.assignedOnly || promptAssignedOnly;
@@ -367,6 +404,7 @@ async function runInteractive(flags, options) {
367
404
  outputPath: workflowPath,
368
405
  projectDetail,
369
406
  statusField,
407
+ priorityField,
370
408
  mappings,
371
409
  runtime: "codex",
372
410
  skipSkills: flags.skipSkills,
@@ -403,6 +441,7 @@ async function runInteractive(flags, options) {
403
441
  cwd: process.cwd(),
404
442
  projectDetail,
405
443
  statusField,
444
+ priorityField,
406
445
  runtime: "codex",
407
446
  skipSkills: flags.skipSkills,
408
447
  skipContext: flags.skipContext
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ shutdownForegroundOrchestrator,
4
+ start_default
5
+ } from "./chunk-E7HYEEZD.js";
6
+ import "./chunk-PUDXVBSN.js";
7
+ import "./chunk-2UW7NQLX.js";
8
+ import "./chunk-2TSM3INR.js";
9
+ import "./chunk-C67H3OUL.js";
10
+ import "./chunk-EEQQWTXS.js";
11
+ import "./chunk-36KYEDEO.js";
12
+ import "./chunk-IWFX2FMA.js";
13
+ import "./chunk-GDE6FYN4.js";
14
+ import "./chunk-DDL4BWSL.js";
15
+ import "./chunk-QIRE2VXS.js";
16
+ export {
17
+ start_default as default,
18
+ shutdownForegroundOrchestrator
19
+ };
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ status_default
4
+ } from "./chunk-DFLXHNYQ.js";
5
+ import "./chunk-36KYEDEO.js";
6
+ import "./chunk-IWFX2FMA.js";
7
+ import "./chunk-GDE6FYN4.js";
8
+ import "./chunk-DDL4BWSL.js";
9
+ import "./chunk-QIRE2VXS.js";
10
+ export {
11
+ status_default as default
12
+ };
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ stop_default
4
+ } from "./chunk-GSX2FV3M.js";
5
+ import "./chunk-GDE6FYN4.js";
6
+ import "./chunk-DDL4BWSL.js";
7
+ import "./chunk-QIRE2VXS.js";
8
+ export {
9
+ stop_default as default
10
+ };
@@ -16,8 +16,8 @@ function execFileAsync(file, args, execFileImpl = execFileCallback) {
16
16
  });
17
17
  }
18
18
  function resolveCurrentCliVersion() {
19
- if ("0.0.20".length > 0) {
20
- return "0.0.20";
19
+ if ("0.0.22".length > 0) {
20
+ return "0.0.22";
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.0.20";
5
+ const version = "0.0.22";
6
6
  if (options.json) {
7
7
  process.stdout.write(JSON.stringify({ version }) + "\n");
8
8
  } else {