@gh-symphony/cli 0.0.18 → 0.0.20
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 +85 -14
- package/dist/{project-O57C32WF.js → chunk-3AWF54PI.js} +104 -90
- package/dist/{chunk-ZYYY55WB.js → chunk-EKKT5USP.js} +74 -23
- package/dist/{chunk-LZE6YUSB.js → chunk-HZVDTAPS.js} +32 -72
- package/dist/{chunk-5YLETHMR.js → chunk-RN2PACNV.js} +345 -169
- package/dist/{chunk-62L6QQE6.js → chunk-TILHWBP6.js} +277 -1
- package/dist/{config-cmd-AZ7POMAA.js → config-cmd-DNXNL26Z.js} +3 -1
- package/dist/doctor-IYHCFXOZ.js +1126 -0
- package/dist/index.js +144 -18
- package/dist/init-KZT6YNOH.js +33 -0
- package/dist/project-UUVHS3ZR.js +22 -0
- package/dist/{recover-UGUTQTWA.js → recover-5KQI7WH5.js} +2 -2
- package/dist/repo-HDDE7OUI.js +321 -0
- package/dist/{run-5H2R6CHB.js → run-ETC5UTRA.js} +2 -2
- package/dist/setup-VWB7RZUQ.js +431 -0
- package/dist/{start-5JGGJIMC.js → start-ENFLZUI6.js} +4 -4
- package/dist/upgrade-3YNF3VKY.js +165 -0
- package/dist/{version-N7YXKG6V.js → version-NUBTTOG7.js} +1 -1
- package/dist/worker-entry.js +71 -193
- package/dist/workflow-TBIFY5MO.js +497 -0
- package/package.json +2 -2
- package/dist/chunk-7UBUBSMH.js +0 -134
- package/dist/doctor-3QT5CZN4.js +0 -532
- package/dist/init-E432UZ32.js +0 -18
- package/dist/repo-R3XBIVAX.js +0 -121
- package/dist/{chunk-OL73UN2X.js → chunk-M3IFVLQS.js} +77 -77
|
@@ -405,6 +405,83 @@ function matchOptionalSection(markdown, heading) {
|
|
|
405
405
|
return match?.[1]?.trim() ?? null;
|
|
406
406
|
}
|
|
407
407
|
|
|
408
|
+
// ../core/dist/workflow/render.js
|
|
409
|
+
import { Liquid, ParseError, RenderError, TokenizationError, UndefinedVariableError } from "liquidjs";
|
|
410
|
+
function buildPromptVariables(issue, options) {
|
|
411
|
+
return {
|
|
412
|
+
issue: {
|
|
413
|
+
id: issue.id,
|
|
414
|
+
identifier: issue.identifier,
|
|
415
|
+
number: issue.number,
|
|
416
|
+
title: issue.title,
|
|
417
|
+
description: issue.description,
|
|
418
|
+
priority: issue.priority,
|
|
419
|
+
url: issue.url,
|
|
420
|
+
state: issue.state,
|
|
421
|
+
labels: issue.labels,
|
|
422
|
+
blocked_by: issue.blockedBy,
|
|
423
|
+
branch_name: issue.branchName,
|
|
424
|
+
created_at: issue.createdAt,
|
|
425
|
+
updated_at: issue.updatedAt,
|
|
426
|
+
repository: `${issue.repository.owner}/${issue.repository.name}`
|
|
427
|
+
},
|
|
428
|
+
attempt: options.attempt
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
var STRICT_LIQUID_ENGINE = new Liquid({
|
|
432
|
+
strictVariables: true,
|
|
433
|
+
strictFilters: true,
|
|
434
|
+
ownPropertyOnly: true
|
|
435
|
+
});
|
|
436
|
+
function renderPrompt(template, variables, options = {}) {
|
|
437
|
+
const strict = options.strict ?? true;
|
|
438
|
+
if (!strict) {
|
|
439
|
+
return renderLegacyPrompt(template, variables);
|
|
440
|
+
}
|
|
441
|
+
try {
|
|
442
|
+
return STRICT_LIQUID_ENGINE.parseAndRenderSync(template, variables);
|
|
443
|
+
} catch (error) {
|
|
444
|
+
throw normalizeTemplateError(error);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
function normalizeTemplateError(error) {
|
|
448
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
449
|
+
if (error instanceof UndefinedVariableError || error instanceof RenderError || error instanceof ParseError && message.startsWith("undefined filter:")) {
|
|
450
|
+
return new Error(`template_render_error: ${message}`, { cause: error });
|
|
451
|
+
}
|
|
452
|
+
if (error instanceof ParseError || error instanceof TokenizationError) {
|
|
453
|
+
return new Error(`template_parse_error: ${message}`, { cause: error });
|
|
454
|
+
}
|
|
455
|
+
return new Error(`template_render_error: ${message}`, { cause: error });
|
|
456
|
+
}
|
|
457
|
+
function flattenVariables(obj, prefix = "") {
|
|
458
|
+
const result = /* @__PURE__ */ new Map();
|
|
459
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
460
|
+
const fullKey = prefix ? `${prefix}.${key}` : key;
|
|
461
|
+
if (value !== null && typeof value === "object" && !Array.isArray(value)) {
|
|
462
|
+
for (const [nestedKey, nestedValue] of flattenVariables(value, fullKey)) {
|
|
463
|
+
result.set(nestedKey, nestedValue);
|
|
464
|
+
}
|
|
465
|
+
} else {
|
|
466
|
+
result.set(fullKey, value);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
return result;
|
|
470
|
+
}
|
|
471
|
+
function renderLegacyPrompt(template, variables) {
|
|
472
|
+
const flatVars = flattenVariables(variables);
|
|
473
|
+
return template.replace(/\{\{([a-zA-Z_][a-zA-Z0-9_.]*)\}\}/g, (match, key) => {
|
|
474
|
+
const value = flatVars.get(key);
|
|
475
|
+
if (value === void 0) {
|
|
476
|
+
return match;
|
|
477
|
+
}
|
|
478
|
+
if (value === null) {
|
|
479
|
+
return "";
|
|
480
|
+
}
|
|
481
|
+
return String(value);
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
|
|
408
485
|
// ../core/dist/contracts/status-surface.js
|
|
409
486
|
var WORKFLOW_EXECUTION_PHASES = [
|
|
410
487
|
"planning",
|
|
@@ -606,83 +683,6 @@ function toWorkflowResolution(workflowPath, workflow, metadata) {
|
|
|
606
683
|
};
|
|
607
684
|
}
|
|
608
685
|
|
|
609
|
-
// ../core/dist/workflow/render.js
|
|
610
|
-
import { Liquid, ParseError, RenderError, TokenizationError, UndefinedVariableError } from "liquidjs";
|
|
611
|
-
function buildPromptVariables(issue, options) {
|
|
612
|
-
return {
|
|
613
|
-
issue: {
|
|
614
|
-
id: issue.id,
|
|
615
|
-
identifier: issue.identifier,
|
|
616
|
-
number: issue.number,
|
|
617
|
-
title: issue.title,
|
|
618
|
-
description: issue.description,
|
|
619
|
-
priority: issue.priority,
|
|
620
|
-
url: issue.url,
|
|
621
|
-
state: issue.state,
|
|
622
|
-
labels: issue.labels,
|
|
623
|
-
blocked_by: issue.blockedBy,
|
|
624
|
-
branch_name: issue.branchName,
|
|
625
|
-
created_at: issue.createdAt,
|
|
626
|
-
updated_at: issue.updatedAt,
|
|
627
|
-
repository: `${issue.repository.owner}/${issue.repository.name}`
|
|
628
|
-
},
|
|
629
|
-
attempt: options.attempt
|
|
630
|
-
};
|
|
631
|
-
}
|
|
632
|
-
var STRICT_LIQUID_ENGINE = new Liquid({
|
|
633
|
-
strictVariables: true,
|
|
634
|
-
strictFilters: true,
|
|
635
|
-
ownPropertyOnly: true
|
|
636
|
-
});
|
|
637
|
-
function renderPrompt(template, variables, options = {}) {
|
|
638
|
-
const strict = options.strict ?? true;
|
|
639
|
-
if (!strict) {
|
|
640
|
-
return renderLegacyPrompt(template, variables);
|
|
641
|
-
}
|
|
642
|
-
try {
|
|
643
|
-
return STRICT_LIQUID_ENGINE.parseAndRenderSync(template, variables);
|
|
644
|
-
} catch (error) {
|
|
645
|
-
throw normalizeTemplateError(error);
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
function normalizeTemplateError(error) {
|
|
649
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
650
|
-
if (error instanceof UndefinedVariableError || error instanceof RenderError || error instanceof ParseError && message.startsWith("undefined filter:")) {
|
|
651
|
-
return new Error(`template_render_error: ${message}`, { cause: error });
|
|
652
|
-
}
|
|
653
|
-
if (error instanceof ParseError || error instanceof TokenizationError) {
|
|
654
|
-
return new Error(`template_parse_error: ${message}`, { cause: error });
|
|
655
|
-
}
|
|
656
|
-
return new Error(`template_render_error: ${message}`, { cause: error });
|
|
657
|
-
}
|
|
658
|
-
function flattenVariables(obj, prefix = "") {
|
|
659
|
-
const result = /* @__PURE__ */ new Map();
|
|
660
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
661
|
-
const fullKey = prefix ? `${prefix}.${key}` : key;
|
|
662
|
-
if (value !== null && typeof value === "object" && !Array.isArray(value)) {
|
|
663
|
-
for (const [nestedKey, nestedValue] of flattenVariables(value, fullKey)) {
|
|
664
|
-
result.set(nestedKey, nestedValue);
|
|
665
|
-
}
|
|
666
|
-
} else {
|
|
667
|
-
result.set(fullKey, value);
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
return result;
|
|
671
|
-
}
|
|
672
|
-
function renderLegacyPrompt(template, variables) {
|
|
673
|
-
const flatVars = flattenVariables(variables);
|
|
674
|
-
return template.replace(/\{\{([a-zA-Z_][a-zA-Z0-9_.]*)\}\}/g, (match, key) => {
|
|
675
|
-
const value = flatVars.get(key);
|
|
676
|
-
if (value === void 0) {
|
|
677
|
-
return match;
|
|
678
|
-
}
|
|
679
|
-
if (value === null) {
|
|
680
|
-
return "";
|
|
681
|
-
}
|
|
682
|
-
return String(value);
|
|
683
|
-
});
|
|
684
|
-
}
|
|
685
|
-
|
|
686
686
|
// ../core/dist/workflow/exit-classification.js
|
|
687
687
|
function classifySessionExit(params) {
|
|
688
688
|
if (params.userInputRequired) {
|