@gh-symphony/cli 0.0.20 → 0.0.21
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/README.md +30 -2
- package/dist/chunk-A67CMOYE.js +684 -0
- package/dist/{chunk-TILHWBP6.js → chunk-C67H3OUL.js} +239 -36
- package/dist/{chunk-RN2PACNV.js → chunk-JN3TQVFV.js} +721 -74
- package/dist/{chunk-EKKT5USP.js → chunk-KY6WKH66.js} +437 -101
- package/dist/{chunk-HZVDTAPS.js → chunk-MYVJ6HK4.js} +943 -1182
- package/dist/{chunk-M3IFVLQS.js → chunk-QEONJ5DZ.js} +978 -72
- package/dist/{chunk-3AWF54PI.js → chunk-S6VIK4FF.js} +59 -31
- package/dist/chunk-SXGT7LOF.js +1060 -0
- package/dist/{doctor-IYHCFXOZ.js → doctor-4HBRICHP.js} +102 -37
- package/dist/index.js +38 -17
- package/dist/{init-KZT6YNOH.js → init-HZ3JEDGQ.js} +7 -2
- package/dist/{project-UUVHS3ZR.js → project-25NQ4J4Y.js} +8 -6
- package/dist/{recover-5KQI7WH5.js → recover-L3MJHHDA.js} +4 -2
- package/dist/{repo-HDDE7OUI.js → repo-TDCWQR6P.js} +72 -14
- package/dist/{run-ETC5UTRA.js → run-XJQ6BF7U.js} +4 -2
- package/dist/{setup-VWB7RZUQ.js → setup-B2SVLW2R.js} +46 -8
- package/dist/{start-ENFLZUI6.js → start-I2CC7BLW.js} +6 -4
- package/dist/{upgrade-3YNF3VKY.js → upgrade-OJXPZRYE.js} +2 -2
- package/dist/{version-NUBTTOG7.js → version-TBDCTKDO.js} +1 -1
- package/dist/worker-entry.js +489 -690
- package/dist/{workflow-TBIFY5MO.js → workflow-BLJH2HC3.js} +176 -10
- package/package.json +3 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
promptProjectRegistrationOptions,
|
|
4
4
|
renderProjectRegistrationSummary
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-S6VIK4FF.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-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-JN3TQVFV.js";
|
|
20
|
+
import "./chunk-KY6WKH66.js";
|
|
21
|
+
import "./chunk-MYVJ6HK4.js";
|
|
22
|
+
import "./chunk-A67CMOYE.js";
|
|
23
|
+
import "./chunk-SXGT7LOF.js";
|
|
22
24
|
import {
|
|
23
25
|
GhAuthError,
|
|
24
26
|
GitHubScopeError,
|
|
@@ -29,7 +31,8 @@ import {
|
|
|
29
31
|
getProjectDetail,
|
|
30
32
|
listUserProjects,
|
|
31
33
|
validateToken
|
|
32
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-C67H3OUL.js";
|
|
35
|
+
import "./chunk-QEONJ5DZ.js";
|
|
33
36
|
import "./chunk-XN5ABWZ6.js";
|
|
34
37
|
import "./chunk-MVRF7BES.js";
|
|
35
38
|
import "./chunk-5NV3LSAJ.js";
|
|
@@ -205,6 +208,13 @@ async function runNonInteractive(flags, options) {
|
|
|
205
208
|
return;
|
|
206
209
|
}
|
|
207
210
|
const mappings = buildAutomaticStateMappings(statusField);
|
|
211
|
+
const { field: priorityField, ambiguous: ambiguousPriorityFields } = resolvePriorityField(projectDetail, statusField);
|
|
212
|
+
if (ambiguousPriorityFields.length > 0) {
|
|
213
|
+
process.stderr.write(
|
|
214
|
+
`Warning: Multiple priority-like single-select fields found (${ambiguousPriorityFields.map((field) => `"${field.name}"`).join(", ")}). Skipping tracker.priority_field in non-interactive mode.
|
|
215
|
+
`
|
|
216
|
+
);
|
|
217
|
+
}
|
|
208
218
|
const workflowValidation = validateStateMapping(mappings);
|
|
209
219
|
if (!workflowValidation.valid) {
|
|
210
220
|
process.stderr.write(
|
|
@@ -221,6 +231,7 @@ Run setup without --non-interactive for manual mapping.
|
|
|
221
231
|
outputPath: workflowPath,
|
|
222
232
|
projectDetail,
|
|
223
233
|
statusField,
|
|
234
|
+
priorityField,
|
|
224
235
|
mappings,
|
|
225
236
|
runtime: "codex",
|
|
226
237
|
skipSkills: flags.skipSkills,
|
|
@@ -231,6 +242,7 @@ Run setup without --non-interactive for manual mapping.
|
|
|
231
242
|
cwd: process.cwd(),
|
|
232
243
|
projectDetail,
|
|
233
244
|
statusField,
|
|
245
|
+
priorityField,
|
|
234
246
|
runtime: "codex",
|
|
235
247
|
skipSkills: flags.skipSkills,
|
|
236
248
|
skipContext: flags.skipContext
|
|
@@ -335,8 +347,9 @@ async function runInteractive(flags, options) {
|
|
|
335
347
|
process.exitCode = 1;
|
|
336
348
|
return;
|
|
337
349
|
}
|
|
350
|
+
const priorityResolution = resolvePriorityField(projectDetail, statusField);
|
|
338
351
|
const mappings = await promptStateMappings(statusField, {
|
|
339
|
-
stepLabel: "Step 2/3"
|
|
352
|
+
stepLabel: priorityResolution.ambiguous.length > 0 ? "Step 2/4" : "Step 2/3"
|
|
340
353
|
});
|
|
341
354
|
const workflowValidation = validateStateMapping(mappings);
|
|
342
355
|
if (!workflowValidation.valid) {
|
|
@@ -350,6 +363,29 @@ async function runInteractive(flags, options) {
|
|
|
350
363
|
for (const warning of workflowValidation.warnings) {
|
|
351
364
|
p.log.warn(` \u26A0 ${warning}`);
|
|
352
365
|
}
|
|
366
|
+
const priorityField = priorityResolution.ambiguous.length > 0 ? await (async () => {
|
|
367
|
+
const selectedId = await abortIfCancelled(
|
|
368
|
+
p.select({
|
|
369
|
+
message: "Step 3/4 \u2014 Multiple GitHub Project priority fields look plausible. Select the one Symphony should use:",
|
|
370
|
+
options: [
|
|
371
|
+
...priorityResolution.ambiguous.map((field) => ({
|
|
372
|
+
value: field.id,
|
|
373
|
+
label: field.name,
|
|
374
|
+
hint: `${field.options.length} option${field.options.length === 1 ? "" : "s"}`
|
|
375
|
+
})),
|
|
376
|
+
{
|
|
377
|
+
value: "__skip_priority_field__",
|
|
378
|
+
label: "Skip priority-aware dispatch",
|
|
379
|
+
hint: "Leave tracker.priority_field unset"
|
|
380
|
+
}
|
|
381
|
+
]
|
|
382
|
+
})
|
|
383
|
+
);
|
|
384
|
+
if (selectedId === "__skip_priority_field__") {
|
|
385
|
+
return null;
|
|
386
|
+
}
|
|
387
|
+
return priorityResolution.ambiguous.find((field) => field.id === selectedId) ?? null;
|
|
388
|
+
})() : priorityResolution.field;
|
|
353
389
|
const {
|
|
354
390
|
assignedOnly: promptAssignedOnly,
|
|
355
391
|
selectedRepos,
|
|
@@ -357,7 +393,7 @@ async function runInteractive(flags, options) {
|
|
|
357
393
|
} = await promptProjectRegistrationOptions({
|
|
358
394
|
projectDetail,
|
|
359
395
|
defaultWorkspaceDir: flags.workspaceDir ?? join(options.configDir, "workspaces"),
|
|
360
|
-
assignedOnlyMessage: "Step 3/3 \u2014 Only process issues assigned to the authenticated GitHub user
|
|
396
|
+
assignedOnlyMessage: `${priorityResolution.ambiguous.length > 0 ? "Step 4/4" : "Step 3/3"} \u2014 Only process issues assigned to the authenticated GitHub user?`,
|
|
361
397
|
assignedOnlyInitialValue: flags.assignedOnly
|
|
362
398
|
});
|
|
363
399
|
const assignedOnly = flags.assignedOnly || promptAssignedOnly;
|
|
@@ -367,6 +403,7 @@ async function runInteractive(flags, options) {
|
|
|
367
403
|
outputPath: workflowPath,
|
|
368
404
|
projectDetail,
|
|
369
405
|
statusField,
|
|
406
|
+
priorityField,
|
|
370
407
|
mappings,
|
|
371
408
|
runtime: "codex",
|
|
372
409
|
skipSkills: flags.skipSkills,
|
|
@@ -403,6 +440,7 @@ async function runInteractive(flags, options) {
|
|
|
403
440
|
cwd: process.cwd(),
|
|
404
441
|
projectDetail,
|
|
405
442
|
statusField,
|
|
443
|
+
priorityField,
|
|
406
444
|
runtime: "codex",
|
|
407
445
|
skipSkills: flags.skipSkills,
|
|
408
446
|
skipContext: flags.skipContext
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
shutdownForegroundOrchestrator,
|
|
4
4
|
start_default
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-KY6WKH66.js";
|
|
6
|
+
import "./chunk-MYVJ6HK4.js";
|
|
7
|
+
import "./chunk-A67CMOYE.js";
|
|
8
|
+
import "./chunk-SXGT7LOF.js";
|
|
9
|
+
import "./chunk-C67H3OUL.js";
|
|
10
|
+
import "./chunk-QEONJ5DZ.js";
|
|
9
11
|
import "./chunk-MVRF7BES.js";
|
|
10
12
|
import "./chunk-5NV3LSAJ.js";
|
|
11
13
|
import "./chunk-C7G7RJ4G.js";
|
|
@@ -16,8 +16,8 @@ function execFileAsync(file, args, execFileImpl = execFileCallback) {
|
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
function resolveCurrentCliVersion() {
|
|
19
|
-
if ("0.0.
|
|
20
|
-
return "0.0.
|
|
19
|
+
if ("0.0.21".length > 0) {
|
|
20
|
+
return "0.0.21";
|
|
21
21
|
}
|
|
22
22
|
const pkg = JSON.parse(
|
|
23
23
|
readFileSync(new URL("../../package.json", import.meta.url), "utf8")
|