poe-code 3.0.114 → 3.0.116-beta.1
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 +13 -13
- package/dist/cli/command-not-found.js +3 -1
- package/dist/cli/command-not-found.js.map +1 -1
- package/dist/cli/commands/pipeline.js +24 -1
- package/dist/cli/commands/pipeline.js.map +1 -1
- package/dist/cli/commands/ralph.js +241 -62
- package/dist/cli/commands/ralph.js.map +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/commands/version.js.map +1 -1
- package/dist/cli/program.js +6 -1
- package/dist/cli/program.js.map +1 -1
- package/dist/index.js +1192 -750
- package/dist/index.js.map +4 -4
- package/dist/providers/claude-code.js +24 -24
- package/dist/providers/claude-code.js.map +1 -1
- package/dist/providers/codex.js +28 -28
- package/dist/providers/codex.js.map +2 -2
- package/dist/providers/kimi.js +24 -24
- package/dist/providers/kimi.js.map +1 -1
- package/dist/providers/opencode.js +28 -28
- package/dist/providers/opencode.js.map +2 -2
- package/dist/providers/poe-agent.js.map +1 -1
- package/dist/sdk/pipeline.d.ts +1 -0
- package/dist/sdk/pipeline.js +1 -0
- package/dist/sdk/pipeline.js.map +1 -1
- package/dist/sdk/ralph.d.ts +1 -1
- package/dist/sdk/ralph.js.map +1 -1
- package/dist/services/config.d.ts +30 -0
- package/dist/services/config.js +17 -1
- package/dist/services/config.js.map +1 -1
- package/dist/templates/pipeline/SKILL_plan.md +5 -6
- package/dist/tools/label-generator.js +1 -1
- package/dist/utils/command-checks.d.ts +1 -1
- package/dist/utils/command-checks.js +1 -1
- package/dist/utils/execution-context.js +5 -5
- package/dist/utils/execution-context.js.map +1 -1
- package/package.json +41 -41
package/dist/index.js
CHANGED
|
@@ -891,16 +891,16 @@ function getConfigFormat(pathOrFormat) {
|
|
|
891
891
|
}
|
|
892
892
|
return formatRegistry[formatName];
|
|
893
893
|
}
|
|
894
|
-
function detectFormat(
|
|
895
|
-
const ext = getExtension(
|
|
894
|
+
function detectFormat(path29) {
|
|
895
|
+
const ext = getExtension(path29);
|
|
896
896
|
return extensionMap[ext];
|
|
897
897
|
}
|
|
898
|
-
function getExtension(
|
|
899
|
-
const lastDot =
|
|
898
|
+
function getExtension(path29) {
|
|
899
|
+
const lastDot = path29.lastIndexOf(".");
|
|
900
900
|
if (lastDot === -1) {
|
|
901
901
|
return "";
|
|
902
902
|
}
|
|
903
|
-
return
|
|
903
|
+
return path29.slice(lastDot).toLowerCase();
|
|
904
904
|
}
|
|
905
905
|
var formatRegistry, extensionMap;
|
|
906
906
|
var init_formats = __esm({
|
|
@@ -1750,6 +1750,61 @@ var init_store = __esm({
|
|
|
1750
1750
|
});
|
|
1751
1751
|
|
|
1752
1752
|
// packages/poe-code-config/src/resolve.ts
|
|
1753
|
+
function resolveScope(schema, fileValues, env = {}) {
|
|
1754
|
+
const resolved = {};
|
|
1755
|
+
for (const key of Object.keys(schema)) {
|
|
1756
|
+
const field = schema[key];
|
|
1757
|
+
const envValue = resolveEnvValue(field, env);
|
|
1758
|
+
const fileValue = resolveFileValue(field, fileValues?.[key]);
|
|
1759
|
+
resolved[key] = envValue ?? fileValue ?? field.default;
|
|
1760
|
+
}
|
|
1761
|
+
return resolved;
|
|
1762
|
+
}
|
|
1763
|
+
function resolveEnvValue(field, env) {
|
|
1764
|
+
if (!field.env) {
|
|
1765
|
+
return void 0;
|
|
1766
|
+
}
|
|
1767
|
+
const raw = env[field.env];
|
|
1768
|
+
if (raw === void 0) {
|
|
1769
|
+
return void 0;
|
|
1770
|
+
}
|
|
1771
|
+
return coerceValue(field, raw);
|
|
1772
|
+
}
|
|
1773
|
+
function resolveFileValue(field, value) {
|
|
1774
|
+
return coerceValue(field, value);
|
|
1775
|
+
}
|
|
1776
|
+
function coerceValue(field, value) {
|
|
1777
|
+
switch (field.type) {
|
|
1778
|
+
case "string":
|
|
1779
|
+
return typeof value === "string" ? value : void 0;
|
|
1780
|
+
case "number":
|
|
1781
|
+
return coerceNumber(value);
|
|
1782
|
+
case "boolean":
|
|
1783
|
+
return coerceBoolean(value);
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
function coerceNumber(value) {
|
|
1787
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
1788
|
+
return value;
|
|
1789
|
+
}
|
|
1790
|
+
if (typeof value !== "string" || value.length === 0) {
|
|
1791
|
+
return void 0;
|
|
1792
|
+
}
|
|
1793
|
+
const parsed = Number(value);
|
|
1794
|
+
return Number.isNaN(parsed) ? void 0 : parsed;
|
|
1795
|
+
}
|
|
1796
|
+
function coerceBoolean(value) {
|
|
1797
|
+
if (typeof value === "boolean") {
|
|
1798
|
+
return value;
|
|
1799
|
+
}
|
|
1800
|
+
if (value === "true" || value === "1") {
|
|
1801
|
+
return true;
|
|
1802
|
+
}
|
|
1803
|
+
if (value === "false" || value === "0") {
|
|
1804
|
+
return false;
|
|
1805
|
+
}
|
|
1806
|
+
return void 0;
|
|
1807
|
+
}
|
|
1753
1808
|
var init_resolve = __esm({
|
|
1754
1809
|
"packages/poe-code-config/src/resolve.ts"() {
|
|
1755
1810
|
"use strict";
|
|
@@ -1900,38 +1955,38 @@ import { createTwoFilesPatch } from "diff";
|
|
|
1900
1955
|
import chalk from "chalk";
|
|
1901
1956
|
function createDryRunFileSystem(base, recorder) {
|
|
1902
1957
|
const proxy = {
|
|
1903
|
-
async readFile(
|
|
1958
|
+
async readFile(path29, encoding) {
|
|
1904
1959
|
if (encoding) {
|
|
1905
|
-
return base.readFile(
|
|
1960
|
+
return base.readFile(path29, encoding);
|
|
1906
1961
|
}
|
|
1907
|
-
return base.readFile(
|
|
1962
|
+
return base.readFile(path29);
|
|
1908
1963
|
},
|
|
1909
|
-
async writeFile(
|
|
1910
|
-
const previousContent = await tryReadText(base,
|
|
1964
|
+
async writeFile(path29, data, options) {
|
|
1965
|
+
const previousContent = await tryReadText(base, path29);
|
|
1911
1966
|
const nextContent = formatData(data, options?.encoding);
|
|
1912
1967
|
recorder.record({
|
|
1913
1968
|
type: "writeFile",
|
|
1914
|
-
path:
|
|
1969
|
+
path: path29,
|
|
1915
1970
|
nextContent,
|
|
1916
1971
|
previousContent
|
|
1917
1972
|
});
|
|
1918
1973
|
},
|
|
1919
|
-
async mkdir(
|
|
1920
|
-
recorder.record({ type: "mkdir", path:
|
|
1974
|
+
async mkdir(path29, options) {
|
|
1975
|
+
recorder.record({ type: "mkdir", path: path29, options });
|
|
1921
1976
|
},
|
|
1922
|
-
async stat(
|
|
1923
|
-
return base.stat(
|
|
1977
|
+
async stat(path29) {
|
|
1978
|
+
return base.stat(path29);
|
|
1924
1979
|
},
|
|
1925
|
-
async unlink(
|
|
1926
|
-
recorder.record({ type: "unlink", path:
|
|
1980
|
+
async unlink(path29) {
|
|
1981
|
+
recorder.record({ type: "unlink", path: path29 });
|
|
1927
1982
|
},
|
|
1928
|
-
async readdir(
|
|
1929
|
-
return base.readdir(
|
|
1983
|
+
async readdir(path29) {
|
|
1984
|
+
return base.readdir(path29);
|
|
1930
1985
|
}
|
|
1931
1986
|
};
|
|
1932
1987
|
if (typeof base.rm === "function") {
|
|
1933
|
-
proxy.rm = async (
|
|
1934
|
-
recorder.record({ type: "rm", path:
|
|
1988
|
+
proxy.rm = async (path29, options) => {
|
|
1989
|
+
recorder.record({ type: "rm", path: path29, options });
|
|
1935
1990
|
};
|
|
1936
1991
|
}
|
|
1937
1992
|
if (typeof base.copyFile === "function") {
|
|
@@ -2021,8 +2076,8 @@ function describeWriteChange(previous, next) {
|
|
|
2021
2076
|
}
|
|
2022
2077
|
return "update";
|
|
2023
2078
|
}
|
|
2024
|
-
function renderWriteCommand(
|
|
2025
|
-
const command = `cat > ${
|
|
2079
|
+
function renderWriteCommand(path29, change) {
|
|
2080
|
+
const command = `cat > ${path29}`;
|
|
2026
2081
|
if (change === "create") {
|
|
2027
2082
|
return renderOperationCommand(command, chalk.green, "# create");
|
|
2028
2083
|
}
|
|
@@ -2184,9 +2239,9 @@ function redactTomlLine(line) {
|
|
|
2184
2239
|
}
|
|
2185
2240
|
return line;
|
|
2186
2241
|
}
|
|
2187
|
-
async function tryReadText(base,
|
|
2242
|
+
async function tryReadText(base, path29) {
|
|
2188
2243
|
try {
|
|
2189
|
-
return await base.readFile(
|
|
2244
|
+
return await base.readFile(path29, "utf8");
|
|
2190
2245
|
} catch (error2) {
|
|
2191
2246
|
if (isNotFound(error2)) {
|
|
2192
2247
|
return null;
|
|
@@ -3141,36 +3196,36 @@ var init_colors = __esm({
|
|
|
3141
3196
|
"packages/design-system/src/tokens/colors.ts"() {
|
|
3142
3197
|
"use strict";
|
|
3143
3198
|
dark = {
|
|
3144
|
-
header: (
|
|
3145
|
-
divider: (
|
|
3146
|
-
prompt: (
|
|
3147
|
-
number: (
|
|
3148
|
-
intro: (
|
|
3199
|
+
header: (text3) => chalk2.magentaBright.bold(text3),
|
|
3200
|
+
divider: (text3) => chalk2.dim(text3),
|
|
3201
|
+
prompt: (text3) => chalk2.cyan(text3),
|
|
3202
|
+
number: (text3) => chalk2.cyanBright(text3),
|
|
3203
|
+
intro: (text3) => chalk2.bgMagenta.white(` Poe - ${text3} `),
|
|
3149
3204
|
resolvedSymbol: chalk2.magenta("\u25C7"),
|
|
3150
3205
|
errorSymbol: chalk2.red("\u25A0"),
|
|
3151
|
-
accent: (
|
|
3152
|
-
muted: (
|
|
3153
|
-
success: (
|
|
3154
|
-
warning: (
|
|
3155
|
-
error: (
|
|
3156
|
-
info: (
|
|
3157
|
-
badge: (
|
|
3206
|
+
accent: (text3) => chalk2.cyan(text3),
|
|
3207
|
+
muted: (text3) => chalk2.dim(text3),
|
|
3208
|
+
success: (text3) => chalk2.green(text3),
|
|
3209
|
+
warning: (text3) => chalk2.yellow(text3),
|
|
3210
|
+
error: (text3) => chalk2.red(text3),
|
|
3211
|
+
info: (text3) => chalk2.magenta(text3),
|
|
3212
|
+
badge: (text3) => chalk2.bgYellow.black(` ${text3} `)
|
|
3158
3213
|
};
|
|
3159
3214
|
light = {
|
|
3160
|
-
header: (
|
|
3161
|
-
divider: (
|
|
3162
|
-
prompt: (
|
|
3163
|
-
number: (
|
|
3164
|
-
intro: (
|
|
3215
|
+
header: (text3) => chalk2.hex("#a200ff").bold(text3),
|
|
3216
|
+
divider: (text3) => chalk2.hex("#666666")(text3),
|
|
3217
|
+
prompt: (text3) => chalk2.hex("#006699").bold(text3),
|
|
3218
|
+
number: (text3) => chalk2.hex("#0077cc").bold(text3),
|
|
3219
|
+
intro: (text3) => chalk2.bgHex("#a200ff").white(` Poe - ${text3} `),
|
|
3165
3220
|
resolvedSymbol: chalk2.hex("#a200ff")("\u25C7"),
|
|
3166
3221
|
errorSymbol: chalk2.hex("#cc0000")("\u25A0"),
|
|
3167
|
-
accent: (
|
|
3168
|
-
muted: (
|
|
3169
|
-
success: (
|
|
3170
|
-
warning: (
|
|
3171
|
-
error: (
|
|
3172
|
-
info: (
|
|
3173
|
-
badge: (
|
|
3222
|
+
accent: (text3) => chalk2.hex("#006699").bold(text3),
|
|
3223
|
+
muted: (text3) => chalk2.hex("#666666")(text3),
|
|
3224
|
+
success: (text3) => chalk2.hex("#008800")(text3),
|
|
3225
|
+
warning: (text3) => chalk2.hex("#cc6600")(text3),
|
|
3226
|
+
error: (text3) => chalk2.hex("#cc0000")(text3),
|
|
3227
|
+
info: (text3) => chalk2.hex("#a200ff")(text3),
|
|
3228
|
+
badge: (text3) => chalk2.bgHex("#cc6600").white(` ${text3} `)
|
|
3174
3229
|
};
|
|
3175
3230
|
}
|
|
3176
3231
|
});
|
|
@@ -3189,11 +3244,11 @@ var init_typography = __esm({
|
|
|
3189
3244
|
"packages/design-system/src/tokens/typography.ts"() {
|
|
3190
3245
|
"use strict";
|
|
3191
3246
|
typography = {
|
|
3192
|
-
bold: (
|
|
3193
|
-
dim: (
|
|
3194
|
-
italic: (
|
|
3195
|
-
underline: (
|
|
3196
|
-
strikethrough: (
|
|
3247
|
+
bold: (text3) => chalk3.bold(text3),
|
|
3248
|
+
dim: (text3) => chalk3.dim(text3),
|
|
3249
|
+
italic: (text3) => chalk3.italic(text3),
|
|
3250
|
+
underline: (text3) => chalk3.underline(text3),
|
|
3251
|
+
strikethrough: (text3) => chalk3.strikethrough(text3)
|
|
3197
3252
|
};
|
|
3198
3253
|
}
|
|
3199
3254
|
});
|
|
@@ -3324,6 +3379,12 @@ var init_text = __esm({
|
|
|
3324
3379
|
badge(content) {
|
|
3325
3380
|
const theme = getTheme();
|
|
3326
3381
|
return theme.badge(content);
|
|
3382
|
+
},
|
|
3383
|
+
selectLabel(label, detail) {
|
|
3384
|
+
if (!detail) {
|
|
3385
|
+
return label;
|
|
3386
|
+
}
|
|
3387
|
+
return `${label} ${typography.dim("\u2014")} ${typography.dim(detail)}`;
|
|
3327
3388
|
}
|
|
3328
3389
|
};
|
|
3329
3390
|
}
|
|
@@ -3576,20 +3637,20 @@ var init_table = __esm({
|
|
|
3576
3637
|
|
|
3577
3638
|
// packages/design-system/src/acp/components.ts
|
|
3578
3639
|
import chalk7 from "chalk";
|
|
3579
|
-
function truncate(
|
|
3580
|
-
if (
|
|
3581
|
-
if (maxLength <= 3) return
|
|
3582
|
-
return `${
|
|
3640
|
+
function truncate(text3, maxLength) {
|
|
3641
|
+
if (text3.length <= maxLength) return text3;
|
|
3642
|
+
if (maxLength <= 3) return text3.slice(0, maxLength);
|
|
3643
|
+
return `${text3.slice(0, maxLength - 3)}...`;
|
|
3583
3644
|
}
|
|
3584
3645
|
function colorForKind(kind) {
|
|
3585
|
-
return KIND_COLORS[kind] ?? ((
|
|
3646
|
+
return KIND_COLORS[kind] ?? ((text3) => chalk7.dim(text3));
|
|
3586
3647
|
}
|
|
3587
3648
|
function writeLine(line) {
|
|
3588
3649
|
process.stdout.write(`${line}
|
|
3589
3650
|
`);
|
|
3590
3651
|
}
|
|
3591
|
-
function renderAgentMessage(
|
|
3592
|
-
writeLine(`${AGENT_PREFIX}${
|
|
3652
|
+
function renderAgentMessage(text3) {
|
|
3653
|
+
writeLine(`${AGENT_PREFIX}${text3}`);
|
|
3593
3654
|
}
|
|
3594
3655
|
function renderToolStart(kind, title) {
|
|
3595
3656
|
const color = colorForKind(kind);
|
|
@@ -3599,8 +3660,8 @@ function renderToolComplete(kind) {
|
|
|
3599
3660
|
const color = colorForKind(kind);
|
|
3600
3661
|
writeLine(color(` \u2713 ${kind}`));
|
|
3601
3662
|
}
|
|
3602
|
-
function renderReasoning(
|
|
3603
|
-
writeLine(chalk7.dim(` \u2713 ${truncate(
|
|
3663
|
+
function renderReasoning(text3) {
|
|
3664
|
+
writeLine(chalk7.dim(` \u2713 ${truncate(text3, 80)}`));
|
|
3604
3665
|
}
|
|
3605
3666
|
function renderUsage(tokens) {
|
|
3606
3667
|
const cached3 = typeof tokens.cached === "number" && tokens.cached > 0 ? ` (${tokens.cached} cached)` : "";
|
|
@@ -3628,12 +3689,12 @@ var init_components = __esm({
|
|
|
3628
3689
|
"packages/design-system/src/acp/components.ts"() {
|
|
3629
3690
|
"use strict";
|
|
3630
3691
|
KIND_COLORS = {
|
|
3631
|
-
exec: (
|
|
3632
|
-
edit: (
|
|
3633
|
-
read: (
|
|
3634
|
-
search: (
|
|
3635
|
-
think: (
|
|
3636
|
-
other: (
|
|
3692
|
+
exec: (text3) => chalk7.yellow(text3),
|
|
3693
|
+
edit: (text3) => chalk7.magenta(text3),
|
|
3694
|
+
read: (text3) => chalk7.cyan(text3),
|
|
3695
|
+
search: (text3) => chalk7.blue(text3),
|
|
3696
|
+
think: (text3) => chalk7.dim(text3),
|
|
3697
|
+
other: (text3) => chalk7.dim(text3)
|
|
3637
3698
|
};
|
|
3638
3699
|
AGENT_PREFIX = `${chalk7.green.bold("\u2713")} agent: `;
|
|
3639
3700
|
}
|
|
@@ -3703,7 +3764,7 @@ function note2(message, title) {
|
|
|
3703
3764
|
async function select2(opts) {
|
|
3704
3765
|
return clack.select(opts);
|
|
3705
3766
|
}
|
|
3706
|
-
async function
|
|
3767
|
+
async function promptText(opts) {
|
|
3707
3768
|
return clack.text(opts);
|
|
3708
3769
|
}
|
|
3709
3770
|
async function confirm2(opts) {
|
|
@@ -3891,7 +3952,9 @@ ${stack}` : message;
|
|
|
3891
3952
|
);
|
|
3892
3953
|
return;
|
|
3893
3954
|
default:
|
|
3894
|
-
writeLine2(
|
|
3955
|
+
writeLine2(
|
|
3956
|
+
typeof text.muted === "function" ? text.muted(event.event) : event.event
|
|
3957
|
+
);
|
|
3895
3958
|
return;
|
|
3896
3959
|
}
|
|
3897
3960
|
}
|
|
@@ -3921,10 +3984,10 @@ var init_renderer = __esm({
|
|
|
3921
3984
|
});
|
|
3922
3985
|
|
|
3923
3986
|
// packages/agent-spawn/src/adapters/utils.ts
|
|
3924
|
-
function truncate2(
|
|
3925
|
-
if (
|
|
3926
|
-
if (maxLength <= 3) return
|
|
3927
|
-
return `${
|
|
3987
|
+
function truncate2(text3, maxLength) {
|
|
3988
|
+
if (text3.length <= maxLength) return text3;
|
|
3989
|
+
if (maxLength <= 3) return text3.slice(0, maxLength);
|
|
3990
|
+
return `${text3.slice(0, maxLength - 3)}...`;
|
|
3928
3991
|
}
|
|
3929
3992
|
function isNonEmptyString(value) {
|
|
3930
3993
|
return typeof value === "string" && value.length > 0;
|
|
@@ -4028,21 +4091,21 @@ async function* adaptClaude(lines) {
|
|
|
4028
4091
|
if (blockType !== "tool_result") continue;
|
|
4029
4092
|
const kind = toolKindsById.get(item.tool_use_id);
|
|
4030
4093
|
toolKindsById.delete(item.tool_use_id);
|
|
4031
|
-
let
|
|
4094
|
+
let path29;
|
|
4032
4095
|
if (typeof item.content === "string") {
|
|
4033
|
-
|
|
4096
|
+
path29 = item.content;
|
|
4034
4097
|
} else {
|
|
4035
4098
|
try {
|
|
4036
|
-
|
|
4099
|
+
path29 = JSON.stringify(item.content);
|
|
4037
4100
|
} catch {
|
|
4038
|
-
|
|
4101
|
+
path29 = String(item.content);
|
|
4039
4102
|
}
|
|
4040
4103
|
}
|
|
4041
4104
|
yield {
|
|
4042
4105
|
event: "tool_complete",
|
|
4043
4106
|
id: item.tool_use_id,
|
|
4044
4107
|
kind,
|
|
4045
|
-
path:
|
|
4108
|
+
path: path29
|
|
4046
4109
|
};
|
|
4047
4110
|
}
|
|
4048
4111
|
}
|
|
@@ -4154,9 +4217,9 @@ async function* adaptCodex(lines) {
|
|
|
4154
4217
|
continue;
|
|
4155
4218
|
}
|
|
4156
4219
|
if (itemType === "reasoning") {
|
|
4157
|
-
const
|
|
4158
|
-
if (!
|
|
4159
|
-
yield { event: "reasoning", text:
|
|
4220
|
+
const text3 = isNonEmptyString(item.text) ? item.text : isNonEmptyString(item.content) ? item.content : isNonEmptyString(item.summary) ? item.summary : void 0;
|
|
4221
|
+
if (!text3) continue;
|
|
4222
|
+
yield { event: "reasoning", text: text3 };
|
|
4160
4223
|
continue;
|
|
4161
4224
|
}
|
|
4162
4225
|
if (!isNonEmptyString(item.id)) continue;
|
|
@@ -4164,10 +4227,10 @@ async function* adaptCodex(lines) {
|
|
|
4164
4227
|
const kindFromStart = toolKindById.get(item.id);
|
|
4165
4228
|
const kind = kindFromStart ?? (itemType === "command_execution" ? "exec" : itemType === "file_edit" ? "edit" : "other");
|
|
4166
4229
|
const titleFromEvent = isNonEmptyString(item.path) ? item.path : itemType === "mcp_tool_call" ? `${isNonEmptyString(item.server) ? item.server : "unknown"}.${isNonEmptyString(item.tool) ? item.tool : "unknown"}` : void 0;
|
|
4167
|
-
const
|
|
4230
|
+
const path29 = titleFromEvent ?? toolTitleById.get(item.id) ?? "";
|
|
4168
4231
|
toolTitleById.delete(item.id);
|
|
4169
4232
|
toolKindById.delete(item.id);
|
|
4170
|
-
yield { event: "tool_complete", id: item.id, kind, path:
|
|
4233
|
+
yield { event: "tool_complete", id: item.id, kind, path: path29 };
|
|
4171
4234
|
}
|
|
4172
4235
|
}
|
|
4173
4236
|
}
|
|
@@ -4410,13 +4473,21 @@ function chunkToString(chunk) {
|
|
|
4410
4473
|
}
|
|
4411
4474
|
async function* readLines(stream) {
|
|
4412
4475
|
let buffer = "";
|
|
4413
|
-
|
|
4476
|
+
const pushChunk = (chunk) => {
|
|
4414
4477
|
buffer += chunkToString(chunk);
|
|
4415
4478
|
while (true) {
|
|
4416
4479
|
const newlineIndex = buffer.indexOf("\n");
|
|
4417
4480
|
if (newlineIndex === -1) break;
|
|
4418
|
-
|
|
4481
|
+
const line = buffer.slice(0, newlineIndex);
|
|
4419
4482
|
buffer = buffer.slice(newlineIndex + 1);
|
|
4483
|
+
lines.push(line);
|
|
4484
|
+
}
|
|
4485
|
+
};
|
|
4486
|
+
const lines = [];
|
|
4487
|
+
for await (const chunk of stream) {
|
|
4488
|
+
pushChunk(chunk);
|
|
4489
|
+
while (lines.length > 0) {
|
|
4490
|
+
yield lines.shift();
|
|
4420
4491
|
}
|
|
4421
4492
|
}
|
|
4422
4493
|
if (buffer.length > 0) {
|
|
@@ -4480,7 +4551,8 @@ function spawnStreaming(options) {
|
|
|
4480
4551
|
if (options.args && options.args.length > 0) {
|
|
4481
4552
|
args.push(...options.args);
|
|
4482
4553
|
}
|
|
4483
|
-
const
|
|
4554
|
+
const spawnImpl = options.spawnImpl ?? spawnChildProcess3;
|
|
4555
|
+
const child = spawnImpl(binaryName, args, {
|
|
4484
4556
|
cwd: options.cwd,
|
|
4485
4557
|
stdio: ["pipe", "pipe", "pipe"]
|
|
4486
4558
|
});
|
|
@@ -4491,6 +4563,45 @@ function spawnStreaming(options) {
|
|
|
4491
4563
|
};
|
|
4492
4564
|
options.signal?.addEventListener("abort", onAbort, { once: true });
|
|
4493
4565
|
const result = { stdout: "", stderr: "", exitCode: 1 };
|
|
4566
|
+
const done = new Promise((resolve, reject) => {
|
|
4567
|
+
let settled = false;
|
|
4568
|
+
const settleRejected = (error2) => {
|
|
4569
|
+
if (settled) return;
|
|
4570
|
+
settled = true;
|
|
4571
|
+
options.signal?.removeEventListener("abort", onAbort);
|
|
4572
|
+
reject(error2);
|
|
4573
|
+
};
|
|
4574
|
+
const settleResolved = (code) => {
|
|
4575
|
+
if (settled) return;
|
|
4576
|
+
settled = true;
|
|
4577
|
+
options.signal?.removeEventListener("abort", onAbort);
|
|
4578
|
+
result.exitCode = code ?? 1;
|
|
4579
|
+
resolve(result);
|
|
4580
|
+
};
|
|
4581
|
+
child.once("error", (error2) => {
|
|
4582
|
+
if (aborted2) {
|
|
4583
|
+
settleRejected(createAbortError2());
|
|
4584
|
+
return;
|
|
4585
|
+
}
|
|
4586
|
+
settleRejected(error2);
|
|
4587
|
+
});
|
|
4588
|
+
child.once("close", (code) => {
|
|
4589
|
+
if (aborted2) {
|
|
4590
|
+
settleRejected(createAbortError2());
|
|
4591
|
+
return;
|
|
4592
|
+
}
|
|
4593
|
+
settleResolved(code);
|
|
4594
|
+
});
|
|
4595
|
+
if (typeof child.exitCode === "number") {
|
|
4596
|
+
queueMicrotask(() => {
|
|
4597
|
+
if (aborted2) {
|
|
4598
|
+
settleRejected(createAbortError2());
|
|
4599
|
+
return;
|
|
4600
|
+
}
|
|
4601
|
+
settleResolved(child.exitCode);
|
|
4602
|
+
});
|
|
4603
|
+
}
|
|
4604
|
+
});
|
|
4494
4605
|
child.stderr.setEncoding("utf8");
|
|
4495
4606
|
child.stderr.on("data", (chunk) => {
|
|
4496
4607
|
result.stderr += chunk;
|
|
@@ -4506,25 +4617,6 @@ function spawnStreaming(options) {
|
|
|
4506
4617
|
yield output;
|
|
4507
4618
|
}
|
|
4508
4619
|
})();
|
|
4509
|
-
const done = new Promise((resolve, reject) => {
|
|
4510
|
-
child.on("error", (error2) => {
|
|
4511
|
-
options.signal?.removeEventListener("abort", onAbort);
|
|
4512
|
-
if (aborted2) {
|
|
4513
|
-
reject(createAbortError2());
|
|
4514
|
-
return;
|
|
4515
|
-
}
|
|
4516
|
-
reject(error2);
|
|
4517
|
-
});
|
|
4518
|
-
child.on("close", (code) => {
|
|
4519
|
-
options.signal?.removeEventListener("abort", onAbort);
|
|
4520
|
-
if (aborted2) {
|
|
4521
|
-
reject(createAbortError2());
|
|
4522
|
-
return;
|
|
4523
|
-
}
|
|
4524
|
-
result.exitCode = code ?? 1;
|
|
4525
|
-
resolve(result);
|
|
4526
|
-
});
|
|
4527
|
-
});
|
|
4528
4620
|
return { events, done };
|
|
4529
4621
|
}
|
|
4530
4622
|
var init_spawn2 = __esm({
|
|
@@ -4580,11 +4672,11 @@ function updateSessionFromEvent(ctx, event, toolCallsById) {
|
|
|
4580
4672
|
return;
|
|
4581
4673
|
}
|
|
4582
4674
|
if (event.event === "agent_message") {
|
|
4583
|
-
const
|
|
4584
|
-
if (!
|
|
4675
|
+
const text3 = readString(event.text);
|
|
4676
|
+
if (!text3 || !ctx.sessionResult) {
|
|
4585
4677
|
return;
|
|
4586
4678
|
}
|
|
4587
|
-
ctx.sessionResult.messages.push(
|
|
4679
|
+
ctx.sessionResult.messages.push(text3);
|
|
4588
4680
|
ctx.sessionResult.output = ctx.sessionResult.messages.join("\n");
|
|
4589
4681
|
return;
|
|
4590
4682
|
}
|
|
@@ -4616,7 +4708,7 @@ function updateSessionFromEvent(ctx, event, toolCallsById) {
|
|
|
4616
4708
|
}
|
|
4617
4709
|
const id = readString(event.id);
|
|
4618
4710
|
const kind = readString(event.kind);
|
|
4619
|
-
const
|
|
4711
|
+
const path29 = readString(event.path);
|
|
4620
4712
|
let toolCall = id ? toolCallsById.get(id) : void 0;
|
|
4621
4713
|
if (!toolCall) {
|
|
4622
4714
|
toolCall = {};
|
|
@@ -4631,8 +4723,8 @@ function updateSessionFromEvent(ctx, event, toolCallsById) {
|
|
|
4631
4723
|
if (kind) {
|
|
4632
4724
|
toolCall.kind = kind;
|
|
4633
4725
|
}
|
|
4634
|
-
if (
|
|
4635
|
-
toolCall.path =
|
|
4726
|
+
if (path29) {
|
|
4727
|
+
toolCall.path = path29;
|
|
4636
4728
|
}
|
|
4637
4729
|
}
|
|
4638
4730
|
var sessionCapture;
|
|
@@ -5590,9 +5682,9 @@ async function exchangeCodeForApiKey(params) {
|
|
|
5590
5682
|
body: body.toString()
|
|
5591
5683
|
});
|
|
5592
5684
|
if (!response.ok) {
|
|
5593
|
-
const
|
|
5594
|
-
const description = parseErrorDescription(
|
|
5595
|
-
throw new Error(description ?? `Token exchange failed (${response.status}): ${
|
|
5685
|
+
const text3 = await response.text();
|
|
5686
|
+
const description = parseErrorDescription(text3);
|
|
5687
|
+
throw new Error(description ?? `Token exchange failed (${response.status}): ${text3}`);
|
|
5596
5688
|
}
|
|
5597
5689
|
const data = await response.json();
|
|
5598
5690
|
if (typeof data.api_key !== "string" || data.api_key.length === 0) {
|
|
@@ -5603,9 +5695,9 @@ async function exchangeCodeForApiKey(params) {
|
|
|
5603
5695
|
expiresIn: typeof data.api_key_expires_in === "number" ? data.api_key_expires_in : null
|
|
5604
5696
|
};
|
|
5605
5697
|
}
|
|
5606
|
-
function parseErrorDescription(
|
|
5698
|
+
function parseErrorDescription(text3) {
|
|
5607
5699
|
try {
|
|
5608
|
-
const data = JSON.parse(
|
|
5700
|
+
const data = JSON.parse(text3);
|
|
5609
5701
|
if (typeof data.error_description === "string") {
|
|
5610
5702
|
return data.error_description;
|
|
5611
5703
|
}
|
|
@@ -5616,8 +5708,8 @@ function parseErrorDescription(text4) {
|
|
|
5616
5708
|
}
|
|
5617
5709
|
return null;
|
|
5618
5710
|
}
|
|
5619
|
-
function escapeHtml(
|
|
5620
|
-
return
|
|
5711
|
+
function escapeHtml(text3) {
|
|
5712
|
+
return text3.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
5621
5713
|
}
|
|
5622
5714
|
function buildSuccessPage(landingPage) {
|
|
5623
5715
|
const title = landingPage?.title ?? "Connected to Poe";
|
|
@@ -5878,8 +5970,8 @@ var init_errors = __esm({
|
|
|
5878
5970
|
|
|
5879
5971
|
// src/cli/logger.ts
|
|
5880
5972
|
import chalk11 from "chalk";
|
|
5881
|
-
function wrapText(
|
|
5882
|
-
const words =
|
|
5973
|
+
function wrapText(text3, maxWidth) {
|
|
5974
|
+
const words = text3.split(" ");
|
|
5883
5975
|
const lines = [];
|
|
5884
5976
|
let currentLine = "";
|
|
5885
5977
|
for (const word of words) {
|
|
@@ -6630,21 +6722,21 @@ function createSdkContainer(options) {
|
|
|
6630
6722
|
});
|
|
6631
6723
|
loggerFactory.setErrorLogger(errorLogger);
|
|
6632
6724
|
const asyncFs = {
|
|
6633
|
-
readFile: ((
|
|
6725
|
+
readFile: ((path29, encoding) => {
|
|
6634
6726
|
if (encoding) {
|
|
6635
|
-
return fs2.readFile(
|
|
6727
|
+
return fs2.readFile(path29, encoding);
|
|
6636
6728
|
}
|
|
6637
|
-
return fs2.readFile(
|
|
6729
|
+
return fs2.readFile(path29);
|
|
6638
6730
|
}),
|
|
6639
|
-
writeFile: (
|
|
6640
|
-
mkdir: (
|
|
6731
|
+
writeFile: (path29, data, opts) => fs2.writeFile(path29, data, opts),
|
|
6732
|
+
mkdir: (path29, opts) => fs2.mkdir(path29, opts).then(() => {
|
|
6641
6733
|
}),
|
|
6642
|
-
stat: (
|
|
6643
|
-
rm: (
|
|
6644
|
-
unlink: (
|
|
6645
|
-
readdir: (
|
|
6734
|
+
stat: (path29) => fs2.stat(path29),
|
|
6735
|
+
rm: (path29, opts) => fs2.rm(path29, opts),
|
|
6736
|
+
unlink: (path29) => fs2.unlink(path29),
|
|
6737
|
+
readdir: (path29) => fs2.readdir(path29),
|
|
6646
6738
|
copyFile: (src, dest) => fs2.copyFile(src, dest),
|
|
6647
|
-
chmod: (
|
|
6739
|
+
chmod: (path29, mode) => fs2.chmod(path29, mode)
|
|
6648
6740
|
};
|
|
6649
6741
|
const contextFactory = createCommandContextFactory({ fs: asyncFs });
|
|
6650
6742
|
const authFs = {
|
|
@@ -7189,16 +7281,46 @@ async function scanPlansDir(fs3, plansDir, displayPrefix) {
|
|
|
7189
7281
|
}
|
|
7190
7282
|
return candidates;
|
|
7191
7283
|
}
|
|
7192
|
-
async function listPlanCandidates(fs3, cwd, homeDir) {
|
|
7284
|
+
async function listPlanCandidates(fs3, cwd, homeDir, planDirectory) {
|
|
7285
|
+
const customDir = planDirectory?.trim();
|
|
7286
|
+
const candidates = customDir ? await scanCustomPlanDir(fs3, customDir, cwd, homeDir) : await scanDefaultPlanDirs(fs3, cwd, homeDir);
|
|
7287
|
+
candidates.sort((left, right) => left.path.localeCompare(right.path));
|
|
7288
|
+
return candidates;
|
|
7289
|
+
}
|
|
7290
|
+
async function scanCustomPlanDir(fs3, planDirectory, cwd, homeDir) {
|
|
7291
|
+
const absoluteDir = resolveAbsoluteDirectory(planDirectory, cwd, homeDir);
|
|
7292
|
+
return scanPlansDir(fs3, absoluteDir, planDirectory);
|
|
7293
|
+
}
|
|
7294
|
+
async function scanDefaultPlanDirs(fs3, cwd, homeDir) {
|
|
7193
7295
|
const projectDir = path13.join(cwd, ".poe-code", "pipeline", "plans");
|
|
7194
7296
|
const globalDir = path13.join(homeDir, ".poe-code", "pipeline", "plans");
|
|
7195
7297
|
const [projectCandidates, globalCandidates] = await Promise.all([
|
|
7196
7298
|
scanPlansDir(fs3, projectDir, ".poe-code/pipeline/plans"),
|
|
7197
7299
|
scanPlansDir(fs3, globalDir, "~/.poe-code/pipeline/plans")
|
|
7198
7300
|
]);
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
|
|
7301
|
+
return [...projectCandidates, ...globalCandidates];
|
|
7302
|
+
}
|
|
7303
|
+
function resolveAbsoluteDirectory(dir, cwd, homeDir) {
|
|
7304
|
+
if (dir.startsWith("~/")) {
|
|
7305
|
+
return path13.join(homeDir, dir.slice(2));
|
|
7306
|
+
}
|
|
7307
|
+
return path13.isAbsolute(dir) ? dir : path13.resolve(cwd, dir);
|
|
7308
|
+
}
|
|
7309
|
+
async function resolvePlanDirectory(options) {
|
|
7310
|
+
const customDir = options.planDirectory?.trim();
|
|
7311
|
+
if (customDir) {
|
|
7312
|
+
return resolveAbsoluteDirectory(customDir, options.cwd, options.homeDir);
|
|
7313
|
+
}
|
|
7314
|
+
const fs3 = options.fs ?? createDefaultFs();
|
|
7315
|
+
const projectDir = path13.join(options.cwd, ".poe-code");
|
|
7316
|
+
try {
|
|
7317
|
+
const stat8 = await fs3.stat(projectDir);
|
|
7318
|
+
if (stat8.isDirectory()) {
|
|
7319
|
+
return path13.join(options.cwd, ".poe-code", "pipeline", "plans");
|
|
7320
|
+
}
|
|
7321
|
+
} catch {
|
|
7322
|
+
}
|
|
7323
|
+
return path13.join(options.homeDir, ".poe-code", "pipeline", "plans");
|
|
7202
7324
|
}
|
|
7203
7325
|
function resolveAbsolutePlanPath(planPath, cwd, homeDir) {
|
|
7204
7326
|
if (planPath.startsWith("~/")) {
|
|
@@ -7222,7 +7344,7 @@ async function resolvePlanPath(options) {
|
|
|
7222
7344
|
await ensurePlanExists(fs3, options.cwd, config2.planPath);
|
|
7223
7345
|
return config2.planPath;
|
|
7224
7346
|
}
|
|
7225
|
-
const candidates = await listPlanCandidates(fs3, options.cwd, options.homeDir);
|
|
7347
|
+
const candidates = await listPlanCandidates(fs3, options.cwd, options.homeDir, options.planDirectory);
|
|
7226
7348
|
if (candidates.length >= 1) {
|
|
7227
7349
|
if (options.assumeYes) {
|
|
7228
7350
|
return candidates[0].path;
|
|
@@ -7507,6 +7629,7 @@ async function runPipeline(options) {
|
|
|
7507
7629
|
cwd: options.cwd,
|
|
7508
7630
|
homeDir: options.homeDir,
|
|
7509
7631
|
plan: options.plan,
|
|
7632
|
+
planDirectory: options.planDirectory,
|
|
7510
7633
|
assumeYes: options.assumeYes,
|
|
7511
7634
|
fs: fs3,
|
|
7512
7635
|
selectPlan: options.selectPlan,
|
|
@@ -7755,51 +7878,134 @@ var init_pipeline2 = __esm({
|
|
|
7755
7878
|
init_src8();
|
|
7756
7879
|
init_src6();
|
|
7757
7880
|
await init_spawn3();
|
|
7881
|
+
init_src8();
|
|
7758
7882
|
}
|
|
7759
7883
|
});
|
|
7760
7884
|
|
|
7761
7885
|
// packages/ralph/src/frontmatter/frontmatter.ts
|
|
7762
|
-
import {
|
|
7886
|
+
import { parse as parse6, stringify } from "yaml";
|
|
7763
7887
|
function parseFrontmatter(content) {
|
|
7764
|
-
const defaults = { status: "pending", iteration: 0 };
|
|
7765
7888
|
if (!content.startsWith(`${FENCE}
|
|
7766
7889
|
`)) {
|
|
7767
|
-
return {
|
|
7890
|
+
return {
|
|
7891
|
+
data: createDefaultFrontmatter(),
|
|
7892
|
+
body: content
|
|
7893
|
+
};
|
|
7768
7894
|
}
|
|
7769
7895
|
const closingIndex = content.indexOf(`
|
|
7770
7896
|
${FENCE}
|
|
7771
7897
|
`, FENCE.length);
|
|
7772
7898
|
if (closingIndex === -1) {
|
|
7773
|
-
return {
|
|
7899
|
+
return {
|
|
7900
|
+
data: createDefaultFrontmatter(),
|
|
7901
|
+
body: content
|
|
7902
|
+
};
|
|
7774
7903
|
}
|
|
7775
7904
|
const yamlBlock = content.slice(FENCE.length + 1, closingIndex);
|
|
7776
7905
|
const body = content.slice(closingIndex + FENCE.length + 2);
|
|
7777
7906
|
const parsed = parse6(yamlBlock);
|
|
7778
7907
|
return {
|
|
7779
|
-
data:
|
|
7780
|
-
status: isValidStatus(parsed?.status) ? parsed.status : defaults.status,
|
|
7781
|
-
iteration: typeof parsed?.iteration === "number" ? parsed.iteration : defaults.iteration
|
|
7782
|
-
},
|
|
7908
|
+
data: parseFrontmatterData(parsed),
|
|
7783
7909
|
body
|
|
7784
7910
|
};
|
|
7785
7911
|
}
|
|
7786
7912
|
function writeFrontmatter(data, body) {
|
|
7787
|
-
const
|
|
7913
|
+
const serialized = {
|
|
7914
|
+
...data.agent !== void 0 ? { agent: data.agent } : {},
|
|
7915
|
+
...data.iterations !== void 0 ? { iterations: data.iterations } : {},
|
|
7916
|
+
status: {
|
|
7917
|
+
state: data.status.state,
|
|
7918
|
+
iteration: data.status.iteration
|
|
7919
|
+
}
|
|
7920
|
+
};
|
|
7921
|
+
const yaml = stringify(serialized).trimEnd();
|
|
7788
7922
|
return `${FENCE}
|
|
7789
7923
|
${yaml}
|
|
7790
7924
|
${FENCE}
|
|
7791
7925
|
${body}`;
|
|
7792
7926
|
}
|
|
7793
|
-
function
|
|
7794
|
-
return
|
|
7795
|
-
|
|
7796
|
-
|
|
7927
|
+
function createDefaultFrontmatter() {
|
|
7928
|
+
return {
|
|
7929
|
+
status: {
|
|
7930
|
+
state: DEFAULT_STATUS.state,
|
|
7931
|
+
iteration: DEFAULT_STATUS.iteration
|
|
7932
|
+
}
|
|
7933
|
+
};
|
|
7797
7934
|
}
|
|
7798
|
-
|
|
7935
|
+
function parseFrontmatterData(value) {
|
|
7936
|
+
const defaults = createDefaultFrontmatter();
|
|
7937
|
+
const parsed = isRecord4(value) ? value : void 0;
|
|
7938
|
+
const parsedStatus = isRecord4(parsed?.status) ? parsed.status : void 0;
|
|
7939
|
+
const state = parsePlanStatus(parsedStatus?.state) ?? parseLegacyStatus(parsed?.status) ?? defaults.status.state;
|
|
7940
|
+
const iteration = parseNonNegativeInteger(parsedStatus?.iteration) ?? parseNonNegativeInteger(parsed?.iteration) ?? defaults.status.iteration;
|
|
7941
|
+
const agent2 = parseAgent(parsed?.agent);
|
|
7942
|
+
const iterations = parsePositiveInteger(parsed?.iterations);
|
|
7943
|
+
return {
|
|
7944
|
+
...agent2 !== void 0 ? { agent: agent2 } : {},
|
|
7945
|
+
...iterations !== void 0 ? { iterations } : {},
|
|
7946
|
+
status: {
|
|
7947
|
+
state,
|
|
7948
|
+
iteration
|
|
7949
|
+
}
|
|
7950
|
+
};
|
|
7951
|
+
}
|
|
7952
|
+
function parseAgent(value) {
|
|
7953
|
+
if (typeof value === "string") {
|
|
7954
|
+
const trimmed = value.trim();
|
|
7955
|
+
return trimmed.length > 0 ? trimmed : void 0;
|
|
7956
|
+
}
|
|
7957
|
+
if (!Array.isArray(value)) {
|
|
7958
|
+
return void 0;
|
|
7959
|
+
}
|
|
7960
|
+
if (value.length === 0) {
|
|
7961
|
+
return [];
|
|
7962
|
+
}
|
|
7963
|
+
const agents = [];
|
|
7964
|
+
for (const item of value) {
|
|
7965
|
+
if (typeof item !== "string") {
|
|
7966
|
+
return void 0;
|
|
7967
|
+
}
|
|
7968
|
+
const trimmed = item.trim();
|
|
7969
|
+
if (trimmed.length === 0) {
|
|
7970
|
+
return void 0;
|
|
7971
|
+
}
|
|
7972
|
+
agents.push(trimmed);
|
|
7973
|
+
}
|
|
7974
|
+
return agents;
|
|
7975
|
+
}
|
|
7976
|
+
function parsePlanStatus(value) {
|
|
7977
|
+
if (value === "open" || value === "in_progress" || value === "completed") {
|
|
7978
|
+
return value;
|
|
7979
|
+
}
|
|
7980
|
+
return void 0;
|
|
7981
|
+
}
|
|
7982
|
+
function parseLegacyStatus(value) {
|
|
7983
|
+
if (value === "in_progress" || value === "completed") {
|
|
7984
|
+
return value;
|
|
7985
|
+
}
|
|
7986
|
+
if (value === "open" || value === "pending" || value === "cancelled" || value === "overbake_abort") {
|
|
7987
|
+
return "open";
|
|
7988
|
+
}
|
|
7989
|
+
return void 0;
|
|
7990
|
+
}
|
|
7991
|
+
function parseNonNegativeInteger(value) {
|
|
7992
|
+
return typeof value === "number" && Number.isInteger(value) && value >= 0 ? value : void 0;
|
|
7993
|
+
}
|
|
7994
|
+
function parsePositiveInteger(value) {
|
|
7995
|
+
return typeof value === "number" && Number.isInteger(value) && value >= 1 ? value : void 0;
|
|
7996
|
+
}
|
|
7997
|
+
function isRecord4(value) {
|
|
7998
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7999
|
+
}
|
|
8000
|
+
var FENCE, DEFAULT_STATUS;
|
|
7799
8001
|
var init_frontmatter = __esm({
|
|
7800
8002
|
"packages/ralph/src/frontmatter/frontmatter.ts"() {
|
|
7801
8003
|
"use strict";
|
|
7802
8004
|
FENCE = "---";
|
|
8005
|
+
DEFAULT_STATUS = {
|
|
8006
|
+
state: "open",
|
|
8007
|
+
iteration: 0
|
|
8008
|
+
};
|
|
7803
8009
|
}
|
|
7804
8010
|
});
|
|
7805
8011
|
|
|
@@ -7854,23 +8060,39 @@ async function scanDir(fs3, absoluteDir, displayDir) {
|
|
|
7854
8060
|
}
|
|
7855
8061
|
async function discoverDocs(options) {
|
|
7856
8062
|
const fs3 = options.fs ?? createDefaultFs4();
|
|
8063
|
+
const customDir = options.planDirectory?.trim();
|
|
8064
|
+
const docs = customDir ? await scanCustomDir(fs3, customDir, options.cwd, options.homeDir) : await scanDefaultDirs(fs3, options.cwd, options.homeDir);
|
|
8065
|
+
return docs.sort((left, right) => {
|
|
8066
|
+
const leftName = path15.basename(left.displayPath).toLowerCase();
|
|
8067
|
+
const rightName = path15.basename(right.displayPath).toLowerCase();
|
|
8068
|
+
return leftName === rightName ? left.displayPath.localeCompare(right.displayPath) : leftName.localeCompare(rightName);
|
|
8069
|
+
});
|
|
8070
|
+
}
|
|
8071
|
+
async function scanCustomDir(fs3, planDirectory, cwd, homeDir) {
|
|
8072
|
+
const absoluteDir = resolveAbsoluteDirectory2(planDirectory, cwd, homeDir);
|
|
8073
|
+
const displayDir = planDirectory;
|
|
8074
|
+
return scanDir(fs3, absoluteDir, displayDir);
|
|
8075
|
+
}
|
|
8076
|
+
async function scanDefaultDirs(fs3, cwd, homeDir) {
|
|
7857
8077
|
const [localDocs, globalDocs] = await Promise.all([
|
|
7858
8078
|
scanDir(
|
|
7859
8079
|
fs3,
|
|
7860
|
-
path15.join(
|
|
8080
|
+
path15.join(cwd, ".poe-code", "ralph", "plans"),
|
|
7861
8081
|
".poe-code/ralph/plans"
|
|
7862
8082
|
),
|
|
7863
8083
|
scanDir(
|
|
7864
8084
|
fs3,
|
|
7865
|
-
path15.join(
|
|
8085
|
+
path15.join(homeDir, ".poe-code", "ralph", "plans"),
|
|
7866
8086
|
"~/.poe-code/ralph/plans"
|
|
7867
8087
|
)
|
|
7868
8088
|
]);
|
|
7869
|
-
return [...localDocs, ...globalDocs]
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
|
|
8089
|
+
return [...localDocs, ...globalDocs];
|
|
8090
|
+
}
|
|
8091
|
+
function resolveAbsoluteDirectory2(dir, cwd, homeDir) {
|
|
8092
|
+
if (dir.startsWith("~/")) {
|
|
8093
|
+
return path15.join(homeDir, dir.slice(2));
|
|
8094
|
+
}
|
|
8095
|
+
return path15.isAbsolute(dir) ? dir : path15.resolve(cwd, dir);
|
|
7874
8096
|
}
|
|
7875
8097
|
var init_discovery2 = __esm({
|
|
7876
8098
|
"packages/ralph/src/discovery/discovery.ts"() {
|
|
@@ -7878,37 +8100,6 @@ var init_discovery2 = __esm({
|
|
|
7878
8100
|
}
|
|
7879
8101
|
});
|
|
7880
8102
|
|
|
7881
|
-
// packages/ralph/src/overbaking/detector.ts
|
|
7882
|
-
var OverbakingDetector;
|
|
7883
|
-
var init_detector = __esm({
|
|
7884
|
-
"packages/ralph/src/overbaking/detector.ts"() {
|
|
7885
|
-
"use strict";
|
|
7886
|
-
OverbakingDetector = class {
|
|
7887
|
-
threshold;
|
|
7888
|
-
consecutiveFailures = 0;
|
|
7889
|
-
constructor(threshold) {
|
|
7890
|
-
this.threshold = threshold;
|
|
7891
|
-
}
|
|
7892
|
-
record(_success) {
|
|
7893
|
-
if (_success) {
|
|
7894
|
-
this.consecutiveFailures = 0;
|
|
7895
|
-
return {
|
|
7896
|
-
consecutiveFailures: 0,
|
|
7897
|
-
overbaked: false,
|
|
7898
|
-
shouldWarn: false
|
|
7899
|
-
};
|
|
7900
|
-
}
|
|
7901
|
-
this.consecutiveFailures += 1;
|
|
7902
|
-
return {
|
|
7903
|
-
consecutiveFailures: this.consecutiveFailures,
|
|
7904
|
-
overbaked: this.consecutiveFailures >= this.threshold,
|
|
7905
|
-
shouldWarn: this.consecutiveFailures === this.threshold
|
|
7906
|
-
};
|
|
7907
|
-
}
|
|
7908
|
-
};
|
|
7909
|
-
}
|
|
7910
|
-
});
|
|
7911
|
-
|
|
7912
8103
|
// packages/ralph/src/run/ralph.ts
|
|
7913
8104
|
import path16 from "node:path";
|
|
7914
8105
|
import * as fsPromises5 from "node:fs/promises";
|
|
@@ -7921,27 +8112,31 @@ async function runRalph(options) {
|
|
|
7921
8112
|
if (!Number.isInteger(options.maxIterations) || options.maxIterations < 1) {
|
|
7922
8113
|
throw new Error("maxIterations must be a positive integer.");
|
|
7923
8114
|
}
|
|
7924
|
-
const
|
|
7925
|
-
if (!Number.isInteger(threshold) || threshold < 1) {
|
|
7926
|
-
throw new Error("maxFailures must be a positive integer.");
|
|
7927
|
-
}
|
|
8115
|
+
const agents = normalizeAgents(options.agent);
|
|
7928
8116
|
const absoluteDocPath = resolveAbsoluteDocPath(
|
|
7929
8117
|
options.docPath,
|
|
7930
8118
|
options.cwd,
|
|
7931
8119
|
options.homeDir
|
|
7932
8120
|
);
|
|
7933
8121
|
const rawContent = await fs3.readFile(absoluteDocPath, "utf8");
|
|
7934
|
-
const { body: prompt } = parseFrontmatter(rawContent);
|
|
7935
|
-
const detector = new OverbakingDetector(threshold);
|
|
8122
|
+
const { data: frontmatter, body: prompt } = parseFrontmatter(rawContent);
|
|
7936
8123
|
const startTime = Date.now();
|
|
7937
8124
|
let iterationsCompleted = 0;
|
|
7938
|
-
await updateFrontmatter(
|
|
8125
|
+
await updateFrontmatter(
|
|
8126
|
+
fs3,
|
|
8127
|
+
absoluteDocPath,
|
|
8128
|
+
prompt,
|
|
8129
|
+
frontmatter,
|
|
8130
|
+
"in_progress",
|
|
8131
|
+
0
|
|
8132
|
+
);
|
|
7939
8133
|
async function finalize2(stopReason) {
|
|
7940
8134
|
const status = stopReasonToStatus(stopReason);
|
|
7941
8135
|
await updateFrontmatter(
|
|
7942
8136
|
fs3,
|
|
7943
8137
|
absoluteDocPath,
|
|
7944
8138
|
prompt,
|
|
8139
|
+
frontmatter,
|
|
7945
8140
|
status,
|
|
7946
8141
|
iterationsCompleted
|
|
7947
8142
|
);
|
|
@@ -7958,12 +8153,13 @@ async function runRalph(options) {
|
|
|
7958
8153
|
try {
|
|
7959
8154
|
for (let iteration = 1; iteration <= options.maxIterations; iteration += 1) {
|
|
7960
8155
|
assertNotAborted2(options.signal);
|
|
7961
|
-
|
|
8156
|
+
const currentAgent = agents[(iteration - 1) % agents.length];
|
|
8157
|
+
options.onIterationStart?.(iteration, options.maxIterations, currentAgent);
|
|
7962
8158
|
const iterationStart = Date.now();
|
|
7963
8159
|
let result;
|
|
7964
8160
|
try {
|
|
7965
8161
|
result = await runAgent({
|
|
7966
|
-
agent:
|
|
8162
|
+
agent: currentAgent,
|
|
7967
8163
|
prompt,
|
|
7968
8164
|
cwd: options.cwd,
|
|
7969
8165
|
...options.model ? { model: options.model } : {},
|
|
@@ -7981,6 +8177,7 @@ async function runRalph(options) {
|
|
|
7981
8177
|
fs3,
|
|
7982
8178
|
absoluteDocPath,
|
|
7983
8179
|
prompt,
|
|
8180
|
+
frontmatter,
|
|
7984
8181
|
"in_progress",
|
|
7985
8182
|
iterationsCompleted
|
|
7986
8183
|
);
|
|
@@ -7989,21 +8186,6 @@ async function runRalph(options) {
|
|
|
7989
8186
|
Date.now() - iterationStart,
|
|
7990
8187
|
success2
|
|
7991
8188
|
);
|
|
7992
|
-
const overbake = detector.record(success2);
|
|
7993
|
-
if (!overbake.shouldWarn) {
|
|
7994
|
-
continue;
|
|
7995
|
-
}
|
|
7996
|
-
options.onOverbakeWarning?.(
|
|
7997
|
-
overbake.consecutiveFailures,
|
|
7998
|
-
threshold
|
|
7999
|
-
);
|
|
8000
|
-
const action = options.promptOverbake ? await options.promptOverbake({
|
|
8001
|
-
consecutiveFailures: overbake.consecutiveFailures,
|
|
8002
|
-
threshold
|
|
8003
|
-
}) : "abort";
|
|
8004
|
-
if (action === "abort") {
|
|
8005
|
-
return finalize2("overbake_abort");
|
|
8006
|
-
}
|
|
8007
8189
|
}
|
|
8008
8190
|
} catch (error2) {
|
|
8009
8191
|
if (isAbortError2(error2)) {
|
|
@@ -8031,6 +8213,23 @@ function createDefaultFs5() {
|
|
|
8031
8213
|
rename: fsPromises5.rename
|
|
8032
8214
|
};
|
|
8033
8215
|
}
|
|
8216
|
+
function normalizeAgents(agent2) {
|
|
8217
|
+
if (typeof agent2 === "string") {
|
|
8218
|
+
const trimmed = agent2.trim();
|
|
8219
|
+
if (trimmed.length === 0) {
|
|
8220
|
+
throw new Error("agent must contain at least one entry.");
|
|
8221
|
+
}
|
|
8222
|
+
return [trimmed];
|
|
8223
|
+
}
|
|
8224
|
+
if (agent2.length === 0) {
|
|
8225
|
+
throw new Error("agent must contain at least one entry.");
|
|
8226
|
+
}
|
|
8227
|
+
const agents = agent2.map((entry) => entry.trim());
|
|
8228
|
+
if (agents.some((entry) => entry.length === 0)) {
|
|
8229
|
+
throw new Error("agent entries must be non-empty strings.");
|
|
8230
|
+
}
|
|
8231
|
+
return agents;
|
|
8232
|
+
}
|
|
8034
8233
|
function resolveAbsoluteDocPath(docPath, cwd, homeDir) {
|
|
8035
8234
|
if (docPath.startsWith("~/")) {
|
|
8036
8235
|
return path16.join(homeDir, docPath.slice(2));
|
|
@@ -8051,8 +8250,18 @@ function createAbortError4() {
|
|
|
8051
8250
|
function isAbortError2(error2) {
|
|
8052
8251
|
return error2 instanceof Error && error2.name === "AbortError";
|
|
8053
8252
|
}
|
|
8054
|
-
async function updateFrontmatter(fs3, absoluteDocPath, body,
|
|
8055
|
-
const content = writeFrontmatter(
|
|
8253
|
+
async function updateFrontmatter(fs3, absoluteDocPath, body, frontmatter, state, iteration) {
|
|
8254
|
+
const content = writeFrontmatter(
|
|
8255
|
+
{
|
|
8256
|
+
...frontmatter.agent !== void 0 ? { agent: frontmatter.agent } : {},
|
|
8257
|
+
...frontmatter.iterations !== void 0 ? { iterations: frontmatter.iterations } : {},
|
|
8258
|
+
status: {
|
|
8259
|
+
state,
|
|
8260
|
+
iteration
|
|
8261
|
+
}
|
|
8262
|
+
},
|
|
8263
|
+
body
|
|
8264
|
+
);
|
|
8056
8265
|
await fs3.writeFile(absoluteDocPath, content);
|
|
8057
8266
|
}
|
|
8058
8267
|
async function archivePlan2(fs3, absoluteDocPath) {
|
|
@@ -8067,16 +8276,13 @@ function stopReasonToStatus(stopReason) {
|
|
|
8067
8276
|
case "completed":
|
|
8068
8277
|
case "max_iterations":
|
|
8069
8278
|
return "completed";
|
|
8070
|
-
case "overbake_abort":
|
|
8071
|
-
return "overbake_abort";
|
|
8072
8279
|
case "cancelled":
|
|
8073
|
-
return "
|
|
8280
|
+
return "open";
|
|
8074
8281
|
}
|
|
8075
8282
|
}
|
|
8076
8283
|
var init_ralph = __esm({
|
|
8077
8284
|
"packages/ralph/src/run/ralph.ts"() {
|
|
8078
8285
|
"use strict";
|
|
8079
|
-
init_detector();
|
|
8080
8286
|
init_frontmatter();
|
|
8081
8287
|
}
|
|
8082
8288
|
});
|
|
@@ -8087,7 +8293,6 @@ var init_src9 = __esm({
|
|
|
8087
8293
|
"use strict";
|
|
8088
8294
|
init_frontmatter();
|
|
8089
8295
|
init_discovery2();
|
|
8090
|
-
init_detector();
|
|
8091
8296
|
init_ralph();
|
|
8092
8297
|
}
|
|
8093
8298
|
});
|
|
@@ -8175,20 +8380,20 @@ async function readErrorBody(response) {
|
|
|
8175
8380
|
return void 0;
|
|
8176
8381
|
}
|
|
8177
8382
|
try {
|
|
8178
|
-
const
|
|
8179
|
-
return
|
|
8383
|
+
const text3 = await response.text();
|
|
8384
|
+
return text3?.trim() || void 0;
|
|
8180
8385
|
} catch {
|
|
8181
8386
|
return void 0;
|
|
8182
8387
|
}
|
|
8183
8388
|
}
|
|
8184
8389
|
function extractTextContent(data) {
|
|
8185
|
-
if (!
|
|
8390
|
+
if (!isRecord5(data)) return void 0;
|
|
8186
8391
|
const choices = data.choices;
|
|
8187
8392
|
if (!Array.isArray(choices) || choices.length === 0) return void 0;
|
|
8188
8393
|
const first = choices[0];
|
|
8189
|
-
if (!
|
|
8394
|
+
if (!isRecord5(first)) return void 0;
|
|
8190
8395
|
const message = first.message;
|
|
8191
|
-
if (!
|
|
8396
|
+
if (!isRecord5(message)) return void 0;
|
|
8192
8397
|
return typeof message.content === "string" ? message.content : void 0;
|
|
8193
8398
|
}
|
|
8194
8399
|
function extractMediaFromCompletion(data) {
|
|
@@ -8196,14 +8401,14 @@ function extractMediaFromCompletion(data) {
|
|
|
8196
8401
|
if (!content) return {};
|
|
8197
8402
|
try {
|
|
8198
8403
|
const parsed = JSON.parse(content);
|
|
8199
|
-
if (
|
|
8404
|
+
if (isRecord5(parsed) && typeof parsed.url === "string") {
|
|
8200
8405
|
return {
|
|
8201
8406
|
url: parsed.url,
|
|
8202
8407
|
mimeType: typeof parsed.mimeType === "string" ? parsed.mimeType : void 0,
|
|
8203
8408
|
data: typeof parsed.data === "string" ? parsed.data : void 0
|
|
8204
8409
|
};
|
|
8205
8410
|
}
|
|
8206
|
-
if (
|
|
8411
|
+
if (isRecord5(parsed) && typeof parsed.data === "string") {
|
|
8207
8412
|
return {
|
|
8208
8413
|
data: parsed.data,
|
|
8209
8414
|
mimeType: typeof parsed.mimeType === "string" ? parsed.mimeType : void 0
|
|
@@ -8237,7 +8442,7 @@ function isValidUrl(value) {
|
|
|
8237
8442
|
return false;
|
|
8238
8443
|
}
|
|
8239
8444
|
}
|
|
8240
|
-
function
|
|
8445
|
+
function isRecord5(value) {
|
|
8241
8446
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
8242
8447
|
}
|
|
8243
8448
|
var init_llm_client = __esm({
|
|
@@ -8876,8 +9081,8 @@ function resourceNotFound(resource) {
|
|
|
8876
9081
|
`Resource not found: ${resource}`
|
|
8877
9082
|
);
|
|
8878
9083
|
}
|
|
8879
|
-
function assertAbsolutePath(
|
|
8880
|
-
if (!isAbsolute(
|
|
9084
|
+
function assertAbsolutePath(path29) {
|
|
9085
|
+
if (!isAbsolute(path29)) {
|
|
8881
9086
|
throw invalidParams('"path" must be an absolute path');
|
|
8882
9087
|
}
|
|
8883
9088
|
}
|
|
@@ -9563,9 +9768,9 @@ function collectErrors(toolCalls, additionalErrors) {
|
|
|
9563
9768
|
}
|
|
9564
9769
|
if (additionalErrors) {
|
|
9565
9770
|
for (const message of additionalErrors) {
|
|
9566
|
-
const
|
|
9567
|
-
if (
|
|
9568
|
-
errors.push({ message:
|
|
9771
|
+
const text3 = toNonEmptyString(message);
|
|
9772
|
+
if (text3) {
|
|
9773
|
+
errors.push({ message: text3 });
|
|
9569
9774
|
}
|
|
9570
9775
|
}
|
|
9571
9776
|
}
|
|
@@ -10699,10 +10904,10 @@ async function fileExists(fs3, filePath) {
|
|
|
10699
10904
|
return false;
|
|
10700
10905
|
}
|
|
10701
10906
|
}
|
|
10702
|
-
function countOccurrences(
|
|
10907
|
+
function countOccurrences(text3, search) {
|
|
10703
10908
|
let count = 0;
|
|
10704
10909
|
let index = 0;
|
|
10705
|
-
while ((index =
|
|
10910
|
+
while ((index = text3.indexOf(search, index)) !== -1) {
|
|
10706
10911
|
count += 1;
|
|
10707
10912
|
index += search.length;
|
|
10708
10913
|
}
|
|
@@ -13910,8 +14115,8 @@ function createInMemoryAcpTransport2(options) {
|
|
|
13910
14115
|
if (!session) {
|
|
13911
14116
|
throw new Error(`Unknown session "${request.sessionId}".`);
|
|
13912
14117
|
}
|
|
13913
|
-
const
|
|
13914
|
-
await session.sendMessage(
|
|
14118
|
+
const promptText2 = toPromptText2(request.prompt);
|
|
14119
|
+
await session.sendMessage(promptText2, {
|
|
13915
14120
|
onSessionUpdate: (legacyUpdate) => {
|
|
13916
14121
|
const normalizedUpdate = normalizeSessionUpdate(legacyUpdate);
|
|
13917
14122
|
const handlers2 = notificationHandlers.get("session/update");
|
|
@@ -14348,7 +14553,7 @@ function parseLegacyConfigDocument(raw) {
|
|
|
14348
14553
|
}
|
|
14349
14554
|
}
|
|
14350
14555
|
function normalizeLegacyConfigDocument(value) {
|
|
14351
|
-
if (!
|
|
14556
|
+
if (!isRecord6(value)) {
|
|
14352
14557
|
return {};
|
|
14353
14558
|
}
|
|
14354
14559
|
const document = {};
|
|
@@ -14362,12 +14567,12 @@ function normalizeLegacyConfigDocument(value) {
|
|
|
14362
14567
|
return document;
|
|
14363
14568
|
}
|
|
14364
14569
|
function normalizeConfiguredServices(value) {
|
|
14365
|
-
if (!
|
|
14570
|
+
if (!isRecord6(value)) {
|
|
14366
14571
|
return {};
|
|
14367
14572
|
}
|
|
14368
14573
|
const entries = {};
|
|
14369
14574
|
for (const [key, entry] of Object.entries(value)) {
|
|
14370
|
-
if (!
|
|
14575
|
+
if (!isRecord6(entry)) {
|
|
14371
14576
|
continue;
|
|
14372
14577
|
}
|
|
14373
14578
|
entries[key] = normalizeConfiguredServiceMetadata({
|
|
@@ -14386,10 +14591,10 @@ function createInvalidBackupPath2(filePath) {
|
|
|
14386
14591
|
const baseName = path21.basename(filePath);
|
|
14387
14592
|
return path21.join(directory, `${baseName}.invalid-${createTimestamp()}.json`);
|
|
14388
14593
|
}
|
|
14389
|
-
function
|
|
14594
|
+
function isRecord6(value) {
|
|
14390
14595
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
14391
14596
|
}
|
|
14392
|
-
var coreConfigScope, knownConfigScopes, CORE_SCOPE, configuredServicesScope, EMPTY_DOCUMENT3;
|
|
14597
|
+
var coreConfigScope, ralphConfigScope, pipelineConfigScope, knownConfigScopes, CORE_SCOPE, configuredServicesScope, EMPTY_DOCUMENT3;
|
|
14393
14598
|
var init_config3 = __esm({
|
|
14394
14599
|
"src/services/config.ts"() {
|
|
14395
14600
|
"use strict";
|
|
@@ -14409,7 +14614,23 @@ var init_config3 = __esm({
|
|
|
14409
14614
|
doc: "Poe API base URL"
|
|
14410
14615
|
}
|
|
14411
14616
|
});
|
|
14412
|
-
|
|
14617
|
+
ralphConfigScope = defineScope("ralph", {
|
|
14618
|
+
plan_directory: {
|
|
14619
|
+
type: "string",
|
|
14620
|
+
default: "",
|
|
14621
|
+
env: "POE_RALPH_PLAN_DIRECTORY",
|
|
14622
|
+
doc: "Custom directory for Ralph plan documents"
|
|
14623
|
+
}
|
|
14624
|
+
});
|
|
14625
|
+
pipelineConfigScope = defineScope("pipeline", {
|
|
14626
|
+
plan_directory: {
|
|
14627
|
+
type: "string",
|
|
14628
|
+
default: "",
|
|
14629
|
+
env: "POE_PIPELINE_PLAN_DIRECTORY",
|
|
14630
|
+
doc: "Custom directory for Pipeline plan files"
|
|
14631
|
+
}
|
|
14632
|
+
});
|
|
14633
|
+
knownConfigScopes = [coreConfigScope, ralphConfigScope, pipelineConfigScope];
|
|
14413
14634
|
CORE_SCOPE = coreConfigScope.scope;
|
|
14414
14635
|
configuredServicesScope = "configured_services";
|
|
14415
14636
|
EMPTY_DOCUMENT3 = `${JSON.stringify({}, null, 2)}
|
|
@@ -14652,19 +14873,19 @@ function registerSpawnCommand(program, container, options = {}) {
|
|
|
14652
14873
|
const extraServices = options.extraServices ?? [];
|
|
14653
14874
|
const serviceList = [...spawnServices, ...extraServices];
|
|
14654
14875
|
const serviceDescription = `Agent to spawn${formatServiceList(serviceList)}`;
|
|
14655
|
-
program.command("spawn").description("Run a single prompt through a configured agent CLI.").option("--model <model>", "Model identifier override passed to the agent CLI").option("-C, --cwd <path>", "Working directory for the agent CLI").option("--stdin", "Read the prompt from stdin").option("-i, --interactive", "Launch the agent in interactive TUI mode").option("--mode <mode>", "Permission mode: yolo | edit | read (default: yolo)").option("--mcp-config <json>", "MCP server config JSON: {name: {command, args?, env?}}").argument("<agent>", serviceDescription).argument("[prompt]", "Prompt text to send (or '-' / stdin)").argument("[agentArgs...]", "Additional arguments forwarded to the agent CLI").action(async function(service,
|
|
14876
|
+
program.command("spawn").description("Run a single prompt through a configured agent CLI.").option("--model <model>", "Model identifier override passed to the agent CLI").option("-C, --cwd <path>", "Working directory for the agent CLI").option("--stdin", "Read the prompt from stdin").option("-i, --interactive", "Launch the agent in interactive TUI mode").option("--mode <mode>", "Permission mode: yolo | edit | read (default: yolo)").option("--mcp-config <json>", "MCP server config JSON: {name: {command, args?, env?}}").argument("<agent>", serviceDescription).argument("[prompt]", "Prompt text to send (or '-' / stdin)").argument("[agentArgs...]", "Additional arguments forwarded to the agent CLI").action(async function(service, promptText2, agentArgs = []) {
|
|
14656
14877
|
const flags = resolveCommandFlags(program);
|
|
14657
14878
|
const commandOptions = this.opts();
|
|
14658
14879
|
const mcpServers = parseMcpSpawnConfig2(commandOptions.mcpConfig);
|
|
14659
14880
|
const cwdOverride = resolveSpawnWorkingDirectory2(container.env.cwd, commandOptions.cwd);
|
|
14660
14881
|
const wantsStdinFlag = commandOptions.stdin === true;
|
|
14661
|
-
const shouldReadFromStdin = wantsStdinFlag ||
|
|
14662
|
-
const forwardedArgs = wantsStdinFlag ? [...
|
|
14882
|
+
const shouldReadFromStdin = wantsStdinFlag || promptText2 === "-" || !promptText2 && !process.stdin.isTTY;
|
|
14883
|
+
const forwardedArgs = wantsStdinFlag ? [...promptText2 ? [promptText2] : [], ...agentArgs] : agentArgs;
|
|
14663
14884
|
if (wantsStdinFlag) {
|
|
14664
|
-
|
|
14885
|
+
promptText2 = void 0;
|
|
14665
14886
|
}
|
|
14666
|
-
if (
|
|
14667
|
-
|
|
14887
|
+
if (promptText2 === "-") {
|
|
14888
|
+
promptText2 = void 0;
|
|
14668
14889
|
}
|
|
14669
14890
|
if (commandOptions.interactive) {
|
|
14670
14891
|
const adapter2 = resolveServiceAdapter(container, service);
|
|
@@ -14685,7 +14906,7 @@ function registerSpawnCommand(program, container, options = {}) {
|
|
|
14685
14906
|
commandOptions.model
|
|
14686
14907
|
);
|
|
14687
14908
|
const result = await spawnInteractive(canonicalService2, {
|
|
14688
|
-
prompt:
|
|
14909
|
+
prompt: promptText2 ?? "",
|
|
14689
14910
|
args: forwardedArgs,
|
|
14690
14911
|
model: model2,
|
|
14691
14912
|
mode: commandOptions.mode,
|
|
@@ -14695,18 +14916,18 @@ function registerSpawnCommand(program, container, options = {}) {
|
|
|
14695
14916
|
process.exitCode = result.exitCode;
|
|
14696
14917
|
return;
|
|
14697
14918
|
}
|
|
14698
|
-
if (!
|
|
14919
|
+
if (!promptText2 && shouldReadFromStdin) {
|
|
14699
14920
|
const chunks = [];
|
|
14700
14921
|
for await (const chunk of process.stdin) {
|
|
14701
14922
|
chunks.push(chunk);
|
|
14702
14923
|
}
|
|
14703
|
-
|
|
14924
|
+
promptText2 = Buffer.concat(chunks).toString("utf8").trim();
|
|
14704
14925
|
}
|
|
14705
|
-
if (!
|
|
14926
|
+
if (!promptText2) {
|
|
14706
14927
|
throw new Error("No prompt provided via argument or stdin");
|
|
14707
14928
|
}
|
|
14708
14929
|
const directSpawnOptions = {
|
|
14709
|
-
prompt:
|
|
14930
|
+
prompt: promptText2,
|
|
14710
14931
|
args: forwardedArgs,
|
|
14711
14932
|
model: commandOptions.model,
|
|
14712
14933
|
mode: commandOptions.mode,
|
|
@@ -15325,26 +15546,26 @@ var init_research = __esm({
|
|
|
15325
15546
|
function registerResearchCommand(program, container) {
|
|
15326
15547
|
const spawnServices = container.registry.list().filter((service) => typeof service.spawn === "function" || getSpawnConfig(service.name)).map((service) => service.name);
|
|
15327
15548
|
const serviceDescription = `Agent to research with${formatServiceList(spawnServices)}`;
|
|
15328
|
-
program.command("research").description("Research a codebase using a coding agent.").option("--agent <agent>", serviceDescription).option("--model <model>", "Model identifier override passed to the agent CLI").option("--mode <mode>", "Permission mode: yolo | edit | read (default: read)").option("-C, --cwd <path>", "Working directory override").option("--path <path>", "Local directory to research").option("--github <repo>", "Clone and research a GitHub repo").option("--stdin", "Read the prompt from stdin").option("--keep", "Keep the cloned repo when using --github").argument("[prompt]", "Prompt text to send (or '-' / stdin)").argument("[agentArgs...]", "Additional arguments forwarded to the agent CLI").action(async function(
|
|
15549
|
+
program.command("research").description("Research a codebase using a coding agent.").option("--agent <agent>", serviceDescription).option("--model <model>", "Model identifier override passed to the agent CLI").option("--mode <mode>", "Permission mode: yolo | edit | read (default: read)").option("-C, --cwd <path>", "Working directory override").option("--path <path>", "Local directory to research").option("--github <repo>", "Clone and research a GitHub repo").option("--stdin", "Read the prompt from stdin").option("--keep", "Keep the cloned repo when using --github").argument("[prompt]", "Prompt text to send (or '-' / stdin)").argument("[agentArgs...]", "Additional arguments forwarded to the agent CLI").action(async function(promptText2, agentArgs = []) {
|
|
15329
15550
|
const flags = resolveCommandFlags(program);
|
|
15330
15551
|
const commandOptions = this.opts();
|
|
15331
15552
|
const wantsStdinFlag = commandOptions.stdin === true;
|
|
15332
|
-
const shouldReadFromStdin = wantsStdinFlag ||
|
|
15333
|
-
const forwardedArgs = wantsStdinFlag ? [...
|
|
15553
|
+
const shouldReadFromStdin = wantsStdinFlag || promptText2 === "-" || !promptText2 && !process.stdin.isTTY;
|
|
15554
|
+
const forwardedArgs = wantsStdinFlag ? [...promptText2 ? [promptText2] : [], ...agentArgs] : agentArgs;
|
|
15334
15555
|
if (wantsStdinFlag) {
|
|
15335
|
-
|
|
15556
|
+
promptText2 = void 0;
|
|
15336
15557
|
}
|
|
15337
|
-
if (
|
|
15338
|
-
|
|
15558
|
+
if (promptText2 === "-") {
|
|
15559
|
+
promptText2 = void 0;
|
|
15339
15560
|
}
|
|
15340
|
-
if (!
|
|
15561
|
+
if (!promptText2 && shouldReadFromStdin) {
|
|
15341
15562
|
const chunks = [];
|
|
15342
15563
|
for await (const chunk of process.stdin) {
|
|
15343
15564
|
chunks.push(chunk);
|
|
15344
15565
|
}
|
|
15345
|
-
|
|
15566
|
+
promptText2 = Buffer.concat(chunks).toString("utf8").trim();
|
|
15346
15567
|
}
|
|
15347
|
-
if (!
|
|
15568
|
+
if (!promptText2) {
|
|
15348
15569
|
throw new Error("No prompt provided via argument or stdin");
|
|
15349
15570
|
}
|
|
15350
15571
|
const resolvedAgent = await resolveResearchAgent({
|
|
@@ -15364,7 +15585,7 @@ function registerResearchCommand(program, container) {
|
|
|
15364
15585
|
});
|
|
15365
15586
|
try {
|
|
15366
15587
|
const { events, result } = await research(container, {
|
|
15367
|
-
prompt:
|
|
15588
|
+
prompt: promptText2,
|
|
15368
15589
|
agent: canonicalService,
|
|
15369
15590
|
agentLabel: adapter.label,
|
|
15370
15591
|
model,
|
|
@@ -16945,8 +17166,8 @@ var init_file = __esm({
|
|
|
16945
17166
|
const isText = isTextMimeType(mimeType);
|
|
16946
17167
|
return new _File(data, mimeType, isText);
|
|
16947
17168
|
}
|
|
16948
|
-
static fromText(
|
|
16949
|
-
return new _File(
|
|
17169
|
+
static fromText(text3, mimeType = "text/plain") {
|
|
17170
|
+
return new _File(text3, mimeType, true);
|
|
16950
17171
|
}
|
|
16951
17172
|
static fromBase64(base643, mimeType) {
|
|
16952
17173
|
const data = Buffer.from(base643, "base64");
|
|
@@ -16956,18 +17177,18 @@ var init_file = __esm({
|
|
|
16956
17177
|
toContentBlock() {
|
|
16957
17178
|
const uri = this.name ? `file:///${this.name}` : "file:///data";
|
|
16958
17179
|
if (this.isText) {
|
|
16959
|
-
let
|
|
17180
|
+
let text3;
|
|
16960
17181
|
if (typeof this.data === "string") {
|
|
16961
|
-
|
|
17182
|
+
text3 = this.data;
|
|
16962
17183
|
} else {
|
|
16963
|
-
|
|
17184
|
+
text3 = new TextDecoder("utf-8").decode(this.data);
|
|
16964
17185
|
}
|
|
16965
17186
|
return {
|
|
16966
17187
|
type: "resource",
|
|
16967
17188
|
resource: {
|
|
16968
17189
|
uri,
|
|
16969
17190
|
mimeType: this.mimeType,
|
|
16970
|
-
text:
|
|
17191
|
+
text: text3
|
|
16971
17192
|
}
|
|
16972
17193
|
};
|
|
16973
17194
|
} else {
|
|
@@ -17663,8 +17884,8 @@ var init_parseUtil = __esm({
|
|
|
17663
17884
|
init_errors3();
|
|
17664
17885
|
init_en();
|
|
17665
17886
|
makeIssue = (params) => {
|
|
17666
|
-
const { data, path:
|
|
17667
|
-
const fullPath = [...
|
|
17887
|
+
const { data, path: path29, errorMaps, issueData } = params;
|
|
17888
|
+
const fullPath = [...path29, ...issueData.path || []];
|
|
17668
17889
|
const fullIssue = {
|
|
17669
17890
|
...issueData,
|
|
17670
17891
|
path: fullPath
|
|
@@ -17944,11 +18165,11 @@ var init_types4 = __esm({
|
|
|
17944
18165
|
init_parseUtil();
|
|
17945
18166
|
init_util();
|
|
17946
18167
|
ParseInputLazyPath = class {
|
|
17947
|
-
constructor(parent, value,
|
|
18168
|
+
constructor(parent, value, path29, key) {
|
|
17948
18169
|
this._cachedPath = [];
|
|
17949
18170
|
this.parent = parent;
|
|
17950
18171
|
this.data = value;
|
|
17951
|
-
this._path =
|
|
18172
|
+
this._path = path29;
|
|
17952
18173
|
this._key = key;
|
|
17953
18174
|
}
|
|
17954
18175
|
get path() {
|
|
@@ -21452,10 +21673,10 @@ function mergeDefs(...defs) {
|
|
|
21452
21673
|
function cloneDef(schema) {
|
|
21453
21674
|
return mergeDefs(schema._zod.def);
|
|
21454
21675
|
}
|
|
21455
|
-
function getElementAtPath(obj,
|
|
21456
|
-
if (!
|
|
21676
|
+
function getElementAtPath(obj, path29) {
|
|
21677
|
+
if (!path29)
|
|
21457
21678
|
return obj;
|
|
21458
|
-
return
|
|
21679
|
+
return path29.reduce((acc, key) => acc?.[key], obj);
|
|
21459
21680
|
}
|
|
21460
21681
|
function promiseAllObject(promisesObj) {
|
|
21461
21682
|
const keys = Object.keys(promisesObj);
|
|
@@ -21767,11 +21988,11 @@ function aborted(x, startIndex = 0) {
|
|
|
21767
21988
|
}
|
|
21768
21989
|
return false;
|
|
21769
21990
|
}
|
|
21770
|
-
function prefixIssues(
|
|
21991
|
+
function prefixIssues(path29, issues) {
|
|
21771
21992
|
return issues.map((iss) => {
|
|
21772
21993
|
var _a2;
|
|
21773
21994
|
(_a2 = iss).path ?? (_a2.path = []);
|
|
21774
|
-
iss.path.unshift(
|
|
21995
|
+
iss.path.unshift(path29);
|
|
21775
21996
|
return iss;
|
|
21776
21997
|
});
|
|
21777
21998
|
}
|
|
@@ -30536,212 +30757,9 @@ var init_protocol = __esm({
|
|
|
30536
30757
|
}
|
|
30537
30758
|
});
|
|
30538
30759
|
|
|
30539
|
-
// node_modules/ajv
|
|
30540
|
-
var require_formats = __commonJS({
|
|
30541
|
-
"node_modules/ajv-formats/dist/formats.js"(exports) {
|
|
30542
|
-
"use strict";
|
|
30543
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30544
|
-
exports.formatNames = exports.fastFormats = exports.fullFormats = void 0;
|
|
30545
|
-
function fmtDef(validate, compare) {
|
|
30546
|
-
return { validate, compare };
|
|
30547
|
-
}
|
|
30548
|
-
exports.fullFormats = {
|
|
30549
|
-
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
30550
|
-
date: fmtDef(date4, compareDate),
|
|
30551
|
-
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
30552
|
-
time: fmtDef(getTime(true), compareTime),
|
|
30553
|
-
"date-time": fmtDef(getDateTime(true), compareDateTime),
|
|
30554
|
-
"iso-time": fmtDef(getTime(), compareIsoTime),
|
|
30555
|
-
"iso-date-time": fmtDef(getDateTime(), compareIsoDateTime),
|
|
30556
|
-
// duration: https://tools.ietf.org/html/rfc3339#appendix-A
|
|
30557
|
-
duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,
|
|
30558
|
-
uri,
|
|
30559
|
-
"uri-reference": /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
|
|
30560
|
-
// uri-template: https://tools.ietf.org/html/rfc6570
|
|
30561
|
-
"uri-template": /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,
|
|
30562
|
-
// For the source: https://gist.github.com/dperini/729294
|
|
30563
|
-
// For test cases: https://mathiasbynens.be/demo/url-regex
|
|
30564
|
-
url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,
|
|
30565
|
-
email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
|
|
30566
|
-
hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,
|
|
30567
|
-
// optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
|
|
30568
|
-
ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,
|
|
30569
|
-
ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
|
|
30570
|
-
regex,
|
|
30571
|
-
// uuid: http://tools.ietf.org/html/rfc4122
|
|
30572
|
-
uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,
|
|
30573
|
-
// JSON-pointer: https://tools.ietf.org/html/rfc6901
|
|
30574
|
-
// uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
|
|
30575
|
-
"json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/,
|
|
30576
|
-
"json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,
|
|
30577
|
-
// relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
|
|
30578
|
-
"relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,
|
|
30579
|
-
// the following formats are used by the openapi specification: https://spec.openapis.org/oas/v3.0.0#data-types
|
|
30580
|
-
// byte: https://github.com/miguelmota/is-base64
|
|
30581
|
-
byte,
|
|
30582
|
-
// signed 32 bit integer
|
|
30583
|
-
int32: { type: "number", validate: validateInt32 },
|
|
30584
|
-
// signed 64 bit integer
|
|
30585
|
-
int64: { type: "number", validate: validateInt64 },
|
|
30586
|
-
// C-type float
|
|
30587
|
-
float: { type: "number", validate: validateNumber },
|
|
30588
|
-
// C-type double
|
|
30589
|
-
double: { type: "number", validate: validateNumber },
|
|
30590
|
-
// hint to the UI to hide input strings
|
|
30591
|
-
password: true,
|
|
30592
|
-
// unchecked string payload
|
|
30593
|
-
binary: true
|
|
30594
|
-
};
|
|
30595
|
-
exports.fastFormats = {
|
|
30596
|
-
...exports.fullFormats,
|
|
30597
|
-
date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
|
|
30598
|
-
time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime),
|
|
30599
|
-
"date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime),
|
|
30600
|
-
"iso-time": fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoTime),
|
|
30601
|
-
"iso-date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoDateTime),
|
|
30602
|
-
// uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
|
|
30603
|
-
uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,
|
|
30604
|
-
"uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
|
|
30605
|
-
// email (sources from jsen validator):
|
|
30606
|
-
// http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
|
|
30607
|
-
// http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')
|
|
30608
|
-
email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i
|
|
30609
|
-
};
|
|
30610
|
-
exports.formatNames = Object.keys(exports.fullFormats);
|
|
30611
|
-
function isLeapYear(year) {
|
|
30612
|
-
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
30613
|
-
}
|
|
30614
|
-
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
|
30615
|
-
var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
30616
|
-
function date4(str) {
|
|
30617
|
-
const matches = DATE.exec(str);
|
|
30618
|
-
if (!matches)
|
|
30619
|
-
return false;
|
|
30620
|
-
const year = +matches[1];
|
|
30621
|
-
const month = +matches[2];
|
|
30622
|
-
const day = +matches[3];
|
|
30623
|
-
return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]);
|
|
30624
|
-
}
|
|
30625
|
-
function compareDate(d1, d2) {
|
|
30626
|
-
if (!(d1 && d2))
|
|
30627
|
-
return void 0;
|
|
30628
|
-
if (d1 > d2)
|
|
30629
|
-
return 1;
|
|
30630
|
-
if (d1 < d2)
|
|
30631
|
-
return -1;
|
|
30632
|
-
return 0;
|
|
30633
|
-
}
|
|
30634
|
-
var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
|
|
30635
|
-
function getTime(strictTimeZone) {
|
|
30636
|
-
return function time3(str) {
|
|
30637
|
-
const matches = TIME.exec(str);
|
|
30638
|
-
if (!matches)
|
|
30639
|
-
return false;
|
|
30640
|
-
const hr = +matches[1];
|
|
30641
|
-
const min = +matches[2];
|
|
30642
|
-
const sec = +matches[3];
|
|
30643
|
-
const tz = matches[4];
|
|
30644
|
-
const tzSign = matches[5] === "-" ? -1 : 1;
|
|
30645
|
-
const tzH = +(matches[6] || 0);
|
|
30646
|
-
const tzM = +(matches[7] || 0);
|
|
30647
|
-
if (tzH > 23 || tzM > 59 || strictTimeZone && !tz)
|
|
30648
|
-
return false;
|
|
30649
|
-
if (hr <= 23 && min <= 59 && sec < 60)
|
|
30650
|
-
return true;
|
|
30651
|
-
const utcMin = min - tzM * tzSign;
|
|
30652
|
-
const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0);
|
|
30653
|
-
return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61;
|
|
30654
|
-
};
|
|
30655
|
-
}
|
|
30656
|
-
function compareTime(s1, s2) {
|
|
30657
|
-
if (!(s1 && s2))
|
|
30658
|
-
return void 0;
|
|
30659
|
-
const t1 = (/* @__PURE__ */ new Date("2020-01-01T" + s1)).valueOf();
|
|
30660
|
-
const t2 = (/* @__PURE__ */ new Date("2020-01-01T" + s2)).valueOf();
|
|
30661
|
-
if (!(t1 && t2))
|
|
30662
|
-
return void 0;
|
|
30663
|
-
return t1 - t2;
|
|
30664
|
-
}
|
|
30665
|
-
function compareIsoTime(t1, t2) {
|
|
30666
|
-
if (!(t1 && t2))
|
|
30667
|
-
return void 0;
|
|
30668
|
-
const a1 = TIME.exec(t1);
|
|
30669
|
-
const a2 = TIME.exec(t2);
|
|
30670
|
-
if (!(a1 && a2))
|
|
30671
|
-
return void 0;
|
|
30672
|
-
t1 = a1[1] + a1[2] + a1[3];
|
|
30673
|
-
t2 = a2[1] + a2[2] + a2[3];
|
|
30674
|
-
if (t1 > t2)
|
|
30675
|
-
return 1;
|
|
30676
|
-
if (t1 < t2)
|
|
30677
|
-
return -1;
|
|
30678
|
-
return 0;
|
|
30679
|
-
}
|
|
30680
|
-
var DATE_TIME_SEPARATOR = /t|\s/i;
|
|
30681
|
-
function getDateTime(strictTimeZone) {
|
|
30682
|
-
const time3 = getTime(strictTimeZone);
|
|
30683
|
-
return function date_time(str) {
|
|
30684
|
-
const dateTime = str.split(DATE_TIME_SEPARATOR);
|
|
30685
|
-
return dateTime.length === 2 && date4(dateTime[0]) && time3(dateTime[1]);
|
|
30686
|
-
};
|
|
30687
|
-
}
|
|
30688
|
-
function compareDateTime(dt1, dt2) {
|
|
30689
|
-
if (!(dt1 && dt2))
|
|
30690
|
-
return void 0;
|
|
30691
|
-
const d1 = new Date(dt1).valueOf();
|
|
30692
|
-
const d2 = new Date(dt2).valueOf();
|
|
30693
|
-
if (!(d1 && d2))
|
|
30694
|
-
return void 0;
|
|
30695
|
-
return d1 - d2;
|
|
30696
|
-
}
|
|
30697
|
-
function compareIsoDateTime(dt1, dt2) {
|
|
30698
|
-
if (!(dt1 && dt2))
|
|
30699
|
-
return void 0;
|
|
30700
|
-
const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);
|
|
30701
|
-
const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR);
|
|
30702
|
-
const res = compareDate(d1, d2);
|
|
30703
|
-
if (res === void 0)
|
|
30704
|
-
return void 0;
|
|
30705
|
-
return res || compareTime(t1, t2);
|
|
30706
|
-
}
|
|
30707
|
-
var NOT_URI_FRAGMENT = /\/|:/;
|
|
30708
|
-
var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
|
30709
|
-
function uri(str) {
|
|
30710
|
-
return NOT_URI_FRAGMENT.test(str) && URI.test(str);
|
|
30711
|
-
}
|
|
30712
|
-
var BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
|
|
30713
|
-
function byte(str) {
|
|
30714
|
-
BYTE.lastIndex = 0;
|
|
30715
|
-
return BYTE.test(str);
|
|
30716
|
-
}
|
|
30717
|
-
var MIN_INT32 = -(2 ** 31);
|
|
30718
|
-
var MAX_INT32 = 2 ** 31 - 1;
|
|
30719
|
-
function validateInt32(value) {
|
|
30720
|
-
return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32;
|
|
30721
|
-
}
|
|
30722
|
-
function validateInt64(value) {
|
|
30723
|
-
return Number.isInteger(value);
|
|
30724
|
-
}
|
|
30725
|
-
function validateNumber() {
|
|
30726
|
-
return true;
|
|
30727
|
-
}
|
|
30728
|
-
var Z_ANCHOR = /[^\\]\\Z/;
|
|
30729
|
-
function regex(str) {
|
|
30730
|
-
if (Z_ANCHOR.test(str))
|
|
30731
|
-
return false;
|
|
30732
|
-
try {
|
|
30733
|
-
new RegExp(str);
|
|
30734
|
-
return true;
|
|
30735
|
-
} catch (e) {
|
|
30736
|
-
return false;
|
|
30737
|
-
}
|
|
30738
|
-
}
|
|
30739
|
-
}
|
|
30740
|
-
});
|
|
30741
|
-
|
|
30742
|
-
// node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.js
|
|
30760
|
+
// node_modules/ajv/dist/compile/codegen/code.js
|
|
30743
30761
|
var require_code = __commonJS({
|
|
30744
|
-
"node_modules/ajv
|
|
30762
|
+
"node_modules/ajv/dist/compile/codegen/code.js"(exports) {
|
|
30745
30763
|
"use strict";
|
|
30746
30764
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30747
30765
|
exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
|
|
@@ -30893,9 +30911,9 @@ var require_code = __commonJS({
|
|
|
30893
30911
|
}
|
|
30894
30912
|
});
|
|
30895
30913
|
|
|
30896
|
-
// node_modules/ajv
|
|
30914
|
+
// node_modules/ajv/dist/compile/codegen/scope.js
|
|
30897
30915
|
var require_scope = __commonJS({
|
|
30898
|
-
"node_modules/ajv
|
|
30916
|
+
"node_modules/ajv/dist/compile/codegen/scope.js"(exports) {
|
|
30899
30917
|
"use strict";
|
|
30900
30918
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30901
30919
|
exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;
|
|
@@ -31038,9 +31056,9 @@ var require_scope = __commonJS({
|
|
|
31038
31056
|
}
|
|
31039
31057
|
});
|
|
31040
31058
|
|
|
31041
|
-
// node_modules/ajv
|
|
31059
|
+
// node_modules/ajv/dist/compile/codegen/index.js
|
|
31042
31060
|
var require_codegen = __commonJS({
|
|
31043
|
-
"node_modules/ajv
|
|
31061
|
+
"node_modules/ajv/dist/compile/codegen/index.js"(exports) {
|
|
31044
31062
|
"use strict";
|
|
31045
31063
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31046
31064
|
exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0;
|
|
@@ -31758,9 +31776,9 @@ var require_codegen = __commonJS({
|
|
|
31758
31776
|
}
|
|
31759
31777
|
});
|
|
31760
31778
|
|
|
31761
|
-
// node_modules/ajv
|
|
31779
|
+
// node_modules/ajv/dist/compile/util.js
|
|
31762
31780
|
var require_util = __commonJS({
|
|
31763
|
-
"node_modules/ajv
|
|
31781
|
+
"node_modules/ajv/dist/compile/util.js"(exports) {
|
|
31764
31782
|
"use strict";
|
|
31765
31783
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31766
31784
|
exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;
|
|
@@ -31925,9 +31943,9 @@ var require_util = __commonJS({
|
|
|
31925
31943
|
}
|
|
31926
31944
|
});
|
|
31927
31945
|
|
|
31928
|
-
// node_modules/ajv
|
|
31946
|
+
// node_modules/ajv/dist/compile/names.js
|
|
31929
31947
|
var require_names = __commonJS({
|
|
31930
|
-
"node_modules/ajv
|
|
31948
|
+
"node_modules/ajv/dist/compile/names.js"(exports) {
|
|
31931
31949
|
"use strict";
|
|
31932
31950
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31933
31951
|
var codegen_1 = require_codegen();
|
|
@@ -31964,9 +31982,9 @@ var require_names = __commonJS({
|
|
|
31964
31982
|
}
|
|
31965
31983
|
});
|
|
31966
31984
|
|
|
31967
|
-
// node_modules/ajv
|
|
31985
|
+
// node_modules/ajv/dist/compile/errors.js
|
|
31968
31986
|
var require_errors = __commonJS({
|
|
31969
|
-
"node_modules/ajv
|
|
31987
|
+
"node_modules/ajv/dist/compile/errors.js"(exports) {
|
|
31970
31988
|
"use strict";
|
|
31971
31989
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31972
31990
|
exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;
|
|
@@ -32086,9 +32104,9 @@ var require_errors = __commonJS({
|
|
|
32086
32104
|
}
|
|
32087
32105
|
});
|
|
32088
32106
|
|
|
32089
|
-
// node_modules/ajv
|
|
32107
|
+
// node_modules/ajv/dist/compile/validate/boolSchema.js
|
|
32090
32108
|
var require_boolSchema = __commonJS({
|
|
32091
|
-
"node_modules/ajv
|
|
32109
|
+
"node_modules/ajv/dist/compile/validate/boolSchema.js"(exports) {
|
|
32092
32110
|
"use strict";
|
|
32093
32111
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32094
32112
|
exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0;
|
|
@@ -32137,9 +32155,9 @@ var require_boolSchema = __commonJS({
|
|
|
32137
32155
|
}
|
|
32138
32156
|
});
|
|
32139
32157
|
|
|
32140
|
-
// node_modules/ajv
|
|
32158
|
+
// node_modules/ajv/dist/compile/rules.js
|
|
32141
32159
|
var require_rules = __commonJS({
|
|
32142
|
-
"node_modules/ajv
|
|
32160
|
+
"node_modules/ajv/dist/compile/rules.js"(exports) {
|
|
32143
32161
|
"use strict";
|
|
32144
32162
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32145
32163
|
exports.getRules = exports.isJSONType = void 0;
|
|
@@ -32168,9 +32186,9 @@ var require_rules = __commonJS({
|
|
|
32168
32186
|
}
|
|
32169
32187
|
});
|
|
32170
32188
|
|
|
32171
|
-
// node_modules/ajv
|
|
32189
|
+
// node_modules/ajv/dist/compile/validate/applicability.js
|
|
32172
32190
|
var require_applicability = __commonJS({
|
|
32173
|
-
"node_modules/ajv
|
|
32191
|
+
"node_modules/ajv/dist/compile/validate/applicability.js"(exports) {
|
|
32174
32192
|
"use strict";
|
|
32175
32193
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32176
32194
|
exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0;
|
|
@@ -32191,9 +32209,9 @@ var require_applicability = __commonJS({
|
|
|
32191
32209
|
}
|
|
32192
32210
|
});
|
|
32193
32211
|
|
|
32194
|
-
// node_modules/ajv
|
|
32212
|
+
// node_modules/ajv/dist/compile/validate/dataType.js
|
|
32195
32213
|
var require_dataType = __commonJS({
|
|
32196
|
-
"node_modules/ajv
|
|
32214
|
+
"node_modules/ajv/dist/compile/validate/dataType.js"(exports) {
|
|
32197
32215
|
"use strict";
|
|
32198
32216
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32199
32217
|
exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;
|
|
@@ -32375,9 +32393,9 @@ var require_dataType = __commonJS({
|
|
|
32375
32393
|
}
|
|
32376
32394
|
});
|
|
32377
32395
|
|
|
32378
|
-
// node_modules/ajv
|
|
32396
|
+
// node_modules/ajv/dist/compile/validate/defaults.js
|
|
32379
32397
|
var require_defaults = __commonJS({
|
|
32380
|
-
"node_modules/ajv
|
|
32398
|
+
"node_modules/ajv/dist/compile/validate/defaults.js"(exports) {
|
|
32381
32399
|
"use strict";
|
|
32382
32400
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32383
32401
|
exports.assignDefaults = void 0;
|
|
@@ -32412,9 +32430,9 @@ var require_defaults = __commonJS({
|
|
|
32412
32430
|
}
|
|
32413
32431
|
});
|
|
32414
32432
|
|
|
32415
|
-
// node_modules/ajv
|
|
32433
|
+
// node_modules/ajv/dist/vocabularies/code.js
|
|
32416
32434
|
var require_code2 = __commonJS({
|
|
32417
|
-
"node_modules/ajv
|
|
32435
|
+
"node_modules/ajv/dist/vocabularies/code.js"(exports) {
|
|
32418
32436
|
"use strict";
|
|
32419
32437
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32420
32438
|
exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0;
|
|
@@ -32545,9 +32563,9 @@ var require_code2 = __commonJS({
|
|
|
32545
32563
|
}
|
|
32546
32564
|
});
|
|
32547
32565
|
|
|
32548
|
-
// node_modules/ajv
|
|
32566
|
+
// node_modules/ajv/dist/compile/validate/keyword.js
|
|
32549
32567
|
var require_keyword = __commonJS({
|
|
32550
|
-
"node_modules/ajv
|
|
32568
|
+
"node_modules/ajv/dist/compile/validate/keyword.js"(exports) {
|
|
32551
32569
|
"use strict";
|
|
32552
32570
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32553
32571
|
exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0;
|
|
@@ -32663,9 +32681,9 @@ var require_keyword = __commonJS({
|
|
|
32663
32681
|
}
|
|
32664
32682
|
});
|
|
32665
32683
|
|
|
32666
|
-
// node_modules/ajv
|
|
32684
|
+
// node_modules/ajv/dist/compile/validate/subschema.js
|
|
32667
32685
|
var require_subschema = __commonJS({
|
|
32668
|
-
"node_modules/ajv
|
|
32686
|
+
"node_modules/ajv/dist/compile/validate/subschema.js"(exports) {
|
|
32669
32687
|
"use strict";
|
|
32670
32688
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32671
32689
|
exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0;
|
|
@@ -32781,9 +32799,9 @@ var require_fast_deep_equal = __commonJS({
|
|
|
32781
32799
|
}
|
|
32782
32800
|
});
|
|
32783
32801
|
|
|
32784
|
-
// node_modules/
|
|
32802
|
+
// node_modules/json-schema-traverse/index.js
|
|
32785
32803
|
var require_json_schema_traverse = __commonJS({
|
|
32786
|
-
"node_modules/
|
|
32804
|
+
"node_modules/json-schema-traverse/index.js"(exports, module) {
|
|
32787
32805
|
"use strict";
|
|
32788
32806
|
var traverse = module.exports = function(schema, opts, cb) {
|
|
32789
32807
|
if (typeof opts == "function") {
|
|
@@ -32869,9 +32887,9 @@ var require_json_schema_traverse = __commonJS({
|
|
|
32869
32887
|
}
|
|
32870
32888
|
});
|
|
32871
32889
|
|
|
32872
|
-
// node_modules/ajv
|
|
32890
|
+
// node_modules/ajv/dist/compile/resolve.js
|
|
32873
32891
|
var require_resolve = __commonJS({
|
|
32874
|
-
"node_modules/ajv
|
|
32892
|
+
"node_modules/ajv/dist/compile/resolve.js"(exports) {
|
|
32875
32893
|
"use strict";
|
|
32876
32894
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32877
32895
|
exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0;
|
|
@@ -33025,9 +33043,9 @@ var require_resolve = __commonJS({
|
|
|
33025
33043
|
}
|
|
33026
33044
|
});
|
|
33027
33045
|
|
|
33028
|
-
// node_modules/ajv
|
|
33046
|
+
// node_modules/ajv/dist/compile/validate/index.js
|
|
33029
33047
|
var require_validate = __commonJS({
|
|
33030
|
-
"node_modules/ajv
|
|
33048
|
+
"node_modules/ajv/dist/compile/validate/index.js"(exports) {
|
|
33031
33049
|
"use strict";
|
|
33032
33050
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33033
33051
|
exports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0;
|
|
@@ -33533,9 +33551,9 @@ var require_validate = __commonJS({
|
|
|
33533
33551
|
}
|
|
33534
33552
|
});
|
|
33535
33553
|
|
|
33536
|
-
// node_modules/ajv
|
|
33554
|
+
// node_modules/ajv/dist/runtime/validation_error.js
|
|
33537
33555
|
var require_validation_error = __commonJS({
|
|
33538
|
-
"node_modules/ajv
|
|
33556
|
+
"node_modules/ajv/dist/runtime/validation_error.js"(exports) {
|
|
33539
33557
|
"use strict";
|
|
33540
33558
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33541
33559
|
var ValidationError2 = class extends Error {
|
|
@@ -33549,9 +33567,9 @@ var require_validation_error = __commonJS({
|
|
|
33549
33567
|
}
|
|
33550
33568
|
});
|
|
33551
33569
|
|
|
33552
|
-
// node_modules/ajv
|
|
33570
|
+
// node_modules/ajv/dist/compile/ref_error.js
|
|
33553
33571
|
var require_ref_error = __commonJS({
|
|
33554
|
-
"node_modules/ajv
|
|
33572
|
+
"node_modules/ajv/dist/compile/ref_error.js"(exports) {
|
|
33555
33573
|
"use strict";
|
|
33556
33574
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33557
33575
|
var resolve_1 = require_resolve();
|
|
@@ -33566,9 +33584,9 @@ var require_ref_error = __commonJS({
|
|
|
33566
33584
|
}
|
|
33567
33585
|
});
|
|
33568
33586
|
|
|
33569
|
-
// node_modules/ajv
|
|
33587
|
+
// node_modules/ajv/dist/compile/index.js
|
|
33570
33588
|
var require_compile = __commonJS({
|
|
33571
|
-
"node_modules/ajv
|
|
33589
|
+
"node_modules/ajv/dist/compile/index.js"(exports) {
|
|
33572
33590
|
"use strict";
|
|
33573
33591
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33574
33592
|
exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;
|
|
@@ -33790,9 +33808,9 @@ var require_compile = __commonJS({
|
|
|
33790
33808
|
}
|
|
33791
33809
|
});
|
|
33792
33810
|
|
|
33793
|
-
// node_modules/ajv
|
|
33811
|
+
// node_modules/ajv/dist/refs/data.json
|
|
33794
33812
|
var require_data = __commonJS({
|
|
33795
|
-
"node_modules/ajv
|
|
33813
|
+
"node_modules/ajv/dist/refs/data.json"(exports, module) {
|
|
33796
33814
|
module.exports = {
|
|
33797
33815
|
$id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
|
|
33798
33816
|
description: "Meta-schema for $data reference (JSON AnySchema extension proposal)",
|
|
@@ -33932,8 +33950,8 @@ var require_utils = __commonJS({
|
|
|
33932
33950
|
}
|
|
33933
33951
|
return ind;
|
|
33934
33952
|
}
|
|
33935
|
-
function removeDotSegments(
|
|
33936
|
-
let input =
|
|
33953
|
+
function removeDotSegments(path29) {
|
|
33954
|
+
let input = path29;
|
|
33937
33955
|
const output = [];
|
|
33938
33956
|
let nextSlash = -1;
|
|
33939
33957
|
let len = 0;
|
|
@@ -34132,8 +34150,8 @@ var require_schemes = __commonJS({
|
|
|
34132
34150
|
wsComponent.secure = void 0;
|
|
34133
34151
|
}
|
|
34134
34152
|
if (wsComponent.resourceName) {
|
|
34135
|
-
const [
|
|
34136
|
-
wsComponent.path =
|
|
34153
|
+
const [path29, query] = wsComponent.resourceName.split("?");
|
|
34154
|
+
wsComponent.path = path29 && path29 !== "/" ? path29 : void 0;
|
|
34137
34155
|
wsComponent.query = query;
|
|
34138
34156
|
wsComponent.resourceName = void 0;
|
|
34139
34157
|
}
|
|
@@ -34531,9 +34549,9 @@ var require_fast_uri = __commonJS({
|
|
|
34531
34549
|
}
|
|
34532
34550
|
});
|
|
34533
34551
|
|
|
34534
|
-
// node_modules/ajv
|
|
34552
|
+
// node_modules/ajv/dist/runtime/uri.js
|
|
34535
34553
|
var require_uri = __commonJS({
|
|
34536
|
-
"node_modules/ajv
|
|
34554
|
+
"node_modules/ajv/dist/runtime/uri.js"(exports) {
|
|
34537
34555
|
"use strict";
|
|
34538
34556
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34539
34557
|
var uri = require_fast_uri();
|
|
@@ -34542,9 +34560,9 @@ var require_uri = __commonJS({
|
|
|
34542
34560
|
}
|
|
34543
34561
|
});
|
|
34544
34562
|
|
|
34545
|
-
// node_modules/ajv
|
|
34563
|
+
// node_modules/ajv/dist/core.js
|
|
34546
34564
|
var require_core = __commonJS({
|
|
34547
|
-
"node_modules/ajv
|
|
34565
|
+
"node_modules/ajv/dist/core.js"(exports) {
|
|
34548
34566
|
"use strict";
|
|
34549
34567
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34550
34568
|
exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
|
|
@@ -34934,7 +34952,7 @@ var require_core = __commonJS({
|
|
|
34934
34952
|
errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) {
|
|
34935
34953
|
if (!errors || errors.length === 0)
|
|
34936
34954
|
return "No errors";
|
|
34937
|
-
return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((
|
|
34955
|
+
return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text3, msg) => text3 + separator + msg);
|
|
34938
34956
|
}
|
|
34939
34957
|
$dataMetaSchema(metaSchema, keywordsJsonPointers) {
|
|
34940
34958
|
const rules = this.RULES.all;
|
|
@@ -35153,9 +35171,9 @@ var require_core = __commonJS({
|
|
|
35153
35171
|
}
|
|
35154
35172
|
});
|
|
35155
35173
|
|
|
35156
|
-
// node_modules/ajv
|
|
35174
|
+
// node_modules/ajv/dist/vocabularies/core/id.js
|
|
35157
35175
|
var require_id = __commonJS({
|
|
35158
|
-
"node_modules/ajv
|
|
35176
|
+
"node_modules/ajv/dist/vocabularies/core/id.js"(exports) {
|
|
35159
35177
|
"use strict";
|
|
35160
35178
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35161
35179
|
var def = {
|
|
@@ -35168,9 +35186,9 @@ var require_id = __commonJS({
|
|
|
35168
35186
|
}
|
|
35169
35187
|
});
|
|
35170
35188
|
|
|
35171
|
-
// node_modules/ajv
|
|
35189
|
+
// node_modules/ajv/dist/vocabularies/core/ref.js
|
|
35172
35190
|
var require_ref = __commonJS({
|
|
35173
|
-
"node_modules/ajv
|
|
35191
|
+
"node_modules/ajv/dist/vocabularies/core/ref.js"(exports) {
|
|
35174
35192
|
"use strict";
|
|
35175
35193
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35176
35194
|
exports.callRef = exports.getValidate = void 0;
|
|
@@ -35290,9 +35308,9 @@ var require_ref = __commonJS({
|
|
|
35290
35308
|
}
|
|
35291
35309
|
});
|
|
35292
35310
|
|
|
35293
|
-
// node_modules/ajv
|
|
35311
|
+
// node_modules/ajv/dist/vocabularies/core/index.js
|
|
35294
35312
|
var require_core2 = __commonJS({
|
|
35295
|
-
"node_modules/ajv
|
|
35313
|
+
"node_modules/ajv/dist/vocabularies/core/index.js"(exports) {
|
|
35296
35314
|
"use strict";
|
|
35297
35315
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35298
35316
|
var id_1 = require_id();
|
|
@@ -35311,9 +35329,9 @@ var require_core2 = __commonJS({
|
|
|
35311
35329
|
}
|
|
35312
35330
|
});
|
|
35313
35331
|
|
|
35314
|
-
// node_modules/ajv
|
|
35332
|
+
// node_modules/ajv/dist/vocabularies/validation/limitNumber.js
|
|
35315
35333
|
var require_limitNumber = __commonJS({
|
|
35316
|
-
"node_modules/ajv
|
|
35334
|
+
"node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports) {
|
|
35317
35335
|
"use strict";
|
|
35318
35336
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35319
35337
|
var codegen_1 = require_codegen();
|
|
@@ -35343,9 +35361,9 @@ var require_limitNumber = __commonJS({
|
|
|
35343
35361
|
}
|
|
35344
35362
|
});
|
|
35345
35363
|
|
|
35346
|
-
// node_modules/ajv
|
|
35364
|
+
// node_modules/ajv/dist/vocabularies/validation/multipleOf.js
|
|
35347
35365
|
var require_multipleOf = __commonJS({
|
|
35348
|
-
"node_modules/ajv
|
|
35366
|
+
"node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports) {
|
|
35349
35367
|
"use strict";
|
|
35350
35368
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35351
35369
|
var codegen_1 = require_codegen();
|
|
@@ -35371,9 +35389,9 @@ var require_multipleOf = __commonJS({
|
|
|
35371
35389
|
}
|
|
35372
35390
|
});
|
|
35373
35391
|
|
|
35374
|
-
// node_modules/ajv
|
|
35392
|
+
// node_modules/ajv/dist/runtime/ucs2length.js
|
|
35375
35393
|
var require_ucs2length = __commonJS({
|
|
35376
|
-
"node_modules/ajv
|
|
35394
|
+
"node_modules/ajv/dist/runtime/ucs2length.js"(exports) {
|
|
35377
35395
|
"use strict";
|
|
35378
35396
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35379
35397
|
function ucs2length(str) {
|
|
@@ -35397,9 +35415,9 @@ var require_ucs2length = __commonJS({
|
|
|
35397
35415
|
}
|
|
35398
35416
|
});
|
|
35399
35417
|
|
|
35400
|
-
// node_modules/ajv
|
|
35418
|
+
// node_modules/ajv/dist/vocabularies/validation/limitLength.js
|
|
35401
35419
|
var require_limitLength = __commonJS({
|
|
35402
|
-
"node_modules/ajv
|
|
35420
|
+
"node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports) {
|
|
35403
35421
|
"use strict";
|
|
35404
35422
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35405
35423
|
var codegen_1 = require_codegen();
|
|
@@ -35429,9 +35447,9 @@ var require_limitLength = __commonJS({
|
|
|
35429
35447
|
}
|
|
35430
35448
|
});
|
|
35431
35449
|
|
|
35432
|
-
// node_modules/ajv
|
|
35450
|
+
// node_modules/ajv/dist/vocabularies/validation/pattern.js
|
|
35433
35451
|
var require_pattern = __commonJS({
|
|
35434
|
-
"node_modules/ajv
|
|
35452
|
+
"node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports) {
|
|
35435
35453
|
"use strict";
|
|
35436
35454
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35437
35455
|
var code_1 = require_code2();
|
|
@@ -35466,9 +35484,9 @@ var require_pattern = __commonJS({
|
|
|
35466
35484
|
}
|
|
35467
35485
|
});
|
|
35468
35486
|
|
|
35469
|
-
// node_modules/ajv
|
|
35487
|
+
// node_modules/ajv/dist/vocabularies/validation/limitProperties.js
|
|
35470
35488
|
var require_limitProperties = __commonJS({
|
|
35471
|
-
"node_modules/ajv
|
|
35489
|
+
"node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports) {
|
|
35472
35490
|
"use strict";
|
|
35473
35491
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35474
35492
|
var codegen_1 = require_codegen();
|
|
@@ -35495,9 +35513,9 @@ var require_limitProperties = __commonJS({
|
|
|
35495
35513
|
}
|
|
35496
35514
|
});
|
|
35497
35515
|
|
|
35498
|
-
// node_modules/ajv
|
|
35516
|
+
// node_modules/ajv/dist/vocabularies/validation/required.js
|
|
35499
35517
|
var require_required = __commonJS({
|
|
35500
|
-
"node_modules/ajv
|
|
35518
|
+
"node_modules/ajv/dist/vocabularies/validation/required.js"(exports) {
|
|
35501
35519
|
"use strict";
|
|
35502
35520
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35503
35521
|
var code_1 = require_code2();
|
|
@@ -35577,9 +35595,9 @@ var require_required = __commonJS({
|
|
|
35577
35595
|
}
|
|
35578
35596
|
});
|
|
35579
35597
|
|
|
35580
|
-
// node_modules/ajv
|
|
35598
|
+
// node_modules/ajv/dist/vocabularies/validation/limitItems.js
|
|
35581
35599
|
var require_limitItems = __commonJS({
|
|
35582
|
-
"node_modules/ajv
|
|
35600
|
+
"node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports) {
|
|
35583
35601
|
"use strict";
|
|
35584
35602
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35585
35603
|
var codegen_1 = require_codegen();
|
|
@@ -35606,9 +35624,9 @@ var require_limitItems = __commonJS({
|
|
|
35606
35624
|
}
|
|
35607
35625
|
});
|
|
35608
35626
|
|
|
35609
|
-
// node_modules/ajv
|
|
35627
|
+
// node_modules/ajv/dist/runtime/equal.js
|
|
35610
35628
|
var require_equal = __commonJS({
|
|
35611
|
-
"node_modules/ajv
|
|
35629
|
+
"node_modules/ajv/dist/runtime/equal.js"(exports) {
|
|
35612
35630
|
"use strict";
|
|
35613
35631
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35614
35632
|
var equal = require_fast_deep_equal();
|
|
@@ -35617,9 +35635,9 @@ var require_equal = __commonJS({
|
|
|
35617
35635
|
}
|
|
35618
35636
|
});
|
|
35619
35637
|
|
|
35620
|
-
// node_modules/ajv
|
|
35638
|
+
// node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
|
|
35621
35639
|
var require_uniqueItems = __commonJS({
|
|
35622
|
-
"node_modules/ajv
|
|
35640
|
+
"node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports) {
|
|
35623
35641
|
"use strict";
|
|
35624
35642
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35625
35643
|
var dataType_1 = require_dataType();
|
|
@@ -35684,9 +35702,9 @@ var require_uniqueItems = __commonJS({
|
|
|
35684
35702
|
}
|
|
35685
35703
|
});
|
|
35686
35704
|
|
|
35687
|
-
// node_modules/ajv
|
|
35705
|
+
// node_modules/ajv/dist/vocabularies/validation/const.js
|
|
35688
35706
|
var require_const = __commonJS({
|
|
35689
|
-
"node_modules/ajv
|
|
35707
|
+
"node_modules/ajv/dist/vocabularies/validation/const.js"(exports) {
|
|
35690
35708
|
"use strict";
|
|
35691
35709
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35692
35710
|
var codegen_1 = require_codegen();
|
|
@@ -35713,9 +35731,9 @@ var require_const = __commonJS({
|
|
|
35713
35731
|
}
|
|
35714
35732
|
});
|
|
35715
35733
|
|
|
35716
|
-
// node_modules/ajv
|
|
35734
|
+
// node_modules/ajv/dist/vocabularies/validation/enum.js
|
|
35717
35735
|
var require_enum = __commonJS({
|
|
35718
|
-
"node_modules/ajv
|
|
35736
|
+
"node_modules/ajv/dist/vocabularies/validation/enum.js"(exports) {
|
|
35719
35737
|
"use strict";
|
|
35720
35738
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35721
35739
|
var codegen_1 = require_codegen();
|
|
@@ -35762,9 +35780,9 @@ var require_enum = __commonJS({
|
|
|
35762
35780
|
}
|
|
35763
35781
|
});
|
|
35764
35782
|
|
|
35765
|
-
// node_modules/ajv
|
|
35783
|
+
// node_modules/ajv/dist/vocabularies/validation/index.js
|
|
35766
35784
|
var require_validation = __commonJS({
|
|
35767
|
-
"node_modules/ajv
|
|
35785
|
+
"node_modules/ajv/dist/vocabularies/validation/index.js"(exports) {
|
|
35768
35786
|
"use strict";
|
|
35769
35787
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35770
35788
|
var limitNumber_1 = require_limitNumber();
|
|
@@ -35800,9 +35818,9 @@ var require_validation = __commonJS({
|
|
|
35800
35818
|
}
|
|
35801
35819
|
});
|
|
35802
35820
|
|
|
35803
|
-
// node_modules/ajv
|
|
35821
|
+
// node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
|
|
35804
35822
|
var require_additionalItems = __commonJS({
|
|
35805
|
-
"node_modules/ajv
|
|
35823
|
+
"node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports) {
|
|
35806
35824
|
"use strict";
|
|
35807
35825
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35808
35826
|
exports.validateAdditionalItems = void 0;
|
|
@@ -35853,9 +35871,9 @@ var require_additionalItems = __commonJS({
|
|
|
35853
35871
|
}
|
|
35854
35872
|
});
|
|
35855
35873
|
|
|
35856
|
-
// node_modules/ajv
|
|
35874
|
+
// node_modules/ajv/dist/vocabularies/applicator/items.js
|
|
35857
35875
|
var require_items = __commonJS({
|
|
35858
|
-
"node_modules/ajv
|
|
35876
|
+
"node_modules/ajv/dist/vocabularies/applicator/items.js"(exports) {
|
|
35859
35877
|
"use strict";
|
|
35860
35878
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35861
35879
|
exports.validateTuple = void 0;
|
|
@@ -35910,9 +35928,9 @@ var require_items = __commonJS({
|
|
|
35910
35928
|
}
|
|
35911
35929
|
});
|
|
35912
35930
|
|
|
35913
|
-
// node_modules/ajv
|
|
35931
|
+
// node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
|
|
35914
35932
|
var require_prefixItems = __commonJS({
|
|
35915
|
-
"node_modules/ajv
|
|
35933
|
+
"node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports) {
|
|
35916
35934
|
"use strict";
|
|
35917
35935
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35918
35936
|
var items_1 = require_items();
|
|
@@ -35927,9 +35945,9 @@ var require_prefixItems = __commonJS({
|
|
|
35927
35945
|
}
|
|
35928
35946
|
});
|
|
35929
35947
|
|
|
35930
|
-
// node_modules/ajv
|
|
35948
|
+
// node_modules/ajv/dist/vocabularies/applicator/items2020.js
|
|
35931
35949
|
var require_items2020 = __commonJS({
|
|
35932
|
-
"node_modules/ajv
|
|
35950
|
+
"node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports) {
|
|
35933
35951
|
"use strict";
|
|
35934
35952
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35935
35953
|
var codegen_1 = require_codegen();
|
|
@@ -35962,9 +35980,9 @@ var require_items2020 = __commonJS({
|
|
|
35962
35980
|
}
|
|
35963
35981
|
});
|
|
35964
35982
|
|
|
35965
|
-
// node_modules/ajv
|
|
35983
|
+
// node_modules/ajv/dist/vocabularies/applicator/contains.js
|
|
35966
35984
|
var require_contains = __commonJS({
|
|
35967
|
-
"node_modules/ajv
|
|
35985
|
+
"node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports) {
|
|
35968
35986
|
"use strict";
|
|
35969
35987
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35970
35988
|
var codegen_1 = require_codegen();
|
|
@@ -36056,9 +36074,9 @@ var require_contains = __commonJS({
|
|
|
36056
36074
|
}
|
|
36057
36075
|
});
|
|
36058
36076
|
|
|
36059
|
-
// node_modules/ajv
|
|
36077
|
+
// node_modules/ajv/dist/vocabularies/applicator/dependencies.js
|
|
36060
36078
|
var require_dependencies = __commonJS({
|
|
36061
|
-
"node_modules/ajv
|
|
36079
|
+
"node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports) {
|
|
36062
36080
|
"use strict";
|
|
36063
36081
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36064
36082
|
exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0;
|
|
@@ -36150,9 +36168,9 @@ var require_dependencies = __commonJS({
|
|
|
36150
36168
|
}
|
|
36151
36169
|
});
|
|
36152
36170
|
|
|
36153
|
-
// node_modules/ajv
|
|
36171
|
+
// node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
|
|
36154
36172
|
var require_propertyNames = __commonJS({
|
|
36155
|
-
"node_modules/ajv
|
|
36173
|
+
"node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports) {
|
|
36156
36174
|
"use strict";
|
|
36157
36175
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36158
36176
|
var codegen_1 = require_codegen();
|
|
@@ -36193,9 +36211,9 @@ var require_propertyNames = __commonJS({
|
|
|
36193
36211
|
}
|
|
36194
36212
|
});
|
|
36195
36213
|
|
|
36196
|
-
// node_modules/ajv
|
|
36214
|
+
// node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
|
|
36197
36215
|
var require_additionalProperties = __commonJS({
|
|
36198
|
-
"node_modules/ajv
|
|
36216
|
+
"node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports) {
|
|
36199
36217
|
"use strict";
|
|
36200
36218
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36201
36219
|
var code_1 = require_code2();
|
|
@@ -36299,9 +36317,9 @@ var require_additionalProperties = __commonJS({
|
|
|
36299
36317
|
}
|
|
36300
36318
|
});
|
|
36301
36319
|
|
|
36302
|
-
// node_modules/ajv
|
|
36320
|
+
// node_modules/ajv/dist/vocabularies/applicator/properties.js
|
|
36303
36321
|
var require_properties = __commonJS({
|
|
36304
|
-
"node_modules/ajv
|
|
36322
|
+
"node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports) {
|
|
36305
36323
|
"use strict";
|
|
36306
36324
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36307
36325
|
var validate_1 = require_validate();
|
|
@@ -36357,9 +36375,9 @@ var require_properties = __commonJS({
|
|
|
36357
36375
|
}
|
|
36358
36376
|
});
|
|
36359
36377
|
|
|
36360
|
-
// node_modules/ajv
|
|
36378
|
+
// node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
|
|
36361
36379
|
var require_patternProperties = __commonJS({
|
|
36362
|
-
"node_modules/ajv
|
|
36380
|
+
"node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports) {
|
|
36363
36381
|
"use strict";
|
|
36364
36382
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36365
36383
|
var code_1 = require_code2();
|
|
@@ -36431,9 +36449,9 @@ var require_patternProperties = __commonJS({
|
|
|
36431
36449
|
}
|
|
36432
36450
|
});
|
|
36433
36451
|
|
|
36434
|
-
// node_modules/ajv
|
|
36452
|
+
// node_modules/ajv/dist/vocabularies/applicator/not.js
|
|
36435
36453
|
var require_not = __commonJS({
|
|
36436
|
-
"node_modules/ajv
|
|
36454
|
+
"node_modules/ajv/dist/vocabularies/applicator/not.js"(exports) {
|
|
36437
36455
|
"use strict";
|
|
36438
36456
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36439
36457
|
var util_1 = require_util();
|
|
@@ -36462,9 +36480,9 @@ var require_not = __commonJS({
|
|
|
36462
36480
|
}
|
|
36463
36481
|
});
|
|
36464
36482
|
|
|
36465
|
-
// node_modules/ajv
|
|
36483
|
+
// node_modules/ajv/dist/vocabularies/applicator/anyOf.js
|
|
36466
36484
|
var require_anyOf = __commonJS({
|
|
36467
|
-
"node_modules/ajv
|
|
36485
|
+
"node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports) {
|
|
36468
36486
|
"use strict";
|
|
36469
36487
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36470
36488
|
var code_1 = require_code2();
|
|
@@ -36479,9 +36497,9 @@ var require_anyOf = __commonJS({
|
|
|
36479
36497
|
}
|
|
36480
36498
|
});
|
|
36481
36499
|
|
|
36482
|
-
// node_modules/ajv
|
|
36500
|
+
// node_modules/ajv/dist/vocabularies/applicator/oneOf.js
|
|
36483
36501
|
var require_oneOf = __commonJS({
|
|
36484
|
-
"node_modules/ajv
|
|
36502
|
+
"node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports) {
|
|
36485
36503
|
"use strict";
|
|
36486
36504
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36487
36505
|
var codegen_1 = require_codegen();
|
|
@@ -36537,9 +36555,9 @@ var require_oneOf = __commonJS({
|
|
|
36537
36555
|
}
|
|
36538
36556
|
});
|
|
36539
36557
|
|
|
36540
|
-
// node_modules/ajv
|
|
36558
|
+
// node_modules/ajv/dist/vocabularies/applicator/allOf.js
|
|
36541
36559
|
var require_allOf = __commonJS({
|
|
36542
|
-
"node_modules/ajv
|
|
36560
|
+
"node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports) {
|
|
36543
36561
|
"use strict";
|
|
36544
36562
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36545
36563
|
var util_1 = require_util();
|
|
@@ -36564,9 +36582,9 @@ var require_allOf = __commonJS({
|
|
|
36564
36582
|
}
|
|
36565
36583
|
});
|
|
36566
36584
|
|
|
36567
|
-
// node_modules/ajv
|
|
36585
|
+
// node_modules/ajv/dist/vocabularies/applicator/if.js
|
|
36568
36586
|
var require_if = __commonJS({
|
|
36569
|
-
"node_modules/ajv
|
|
36587
|
+
"node_modules/ajv/dist/vocabularies/applicator/if.js"(exports) {
|
|
36570
36588
|
"use strict";
|
|
36571
36589
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36572
36590
|
var codegen_1 = require_codegen();
|
|
@@ -36633,9 +36651,9 @@ var require_if = __commonJS({
|
|
|
36633
36651
|
}
|
|
36634
36652
|
});
|
|
36635
36653
|
|
|
36636
|
-
// node_modules/ajv
|
|
36654
|
+
// node_modules/ajv/dist/vocabularies/applicator/thenElse.js
|
|
36637
36655
|
var require_thenElse = __commonJS({
|
|
36638
|
-
"node_modules/ajv
|
|
36656
|
+
"node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports) {
|
|
36639
36657
|
"use strict";
|
|
36640
36658
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36641
36659
|
var util_1 = require_util();
|
|
@@ -36651,9 +36669,9 @@ var require_thenElse = __commonJS({
|
|
|
36651
36669
|
}
|
|
36652
36670
|
});
|
|
36653
36671
|
|
|
36654
|
-
// node_modules/ajv
|
|
36672
|
+
// node_modules/ajv/dist/vocabularies/applicator/index.js
|
|
36655
36673
|
var require_applicator = __commonJS({
|
|
36656
|
-
"node_modules/ajv
|
|
36674
|
+
"node_modules/ajv/dist/vocabularies/applicator/index.js"(exports) {
|
|
36657
36675
|
"use strict";
|
|
36658
36676
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36659
36677
|
var additionalItems_1 = require_additionalItems();
|
|
@@ -36699,9 +36717,9 @@ var require_applicator = __commonJS({
|
|
|
36699
36717
|
}
|
|
36700
36718
|
});
|
|
36701
36719
|
|
|
36702
|
-
// node_modules/ajv
|
|
36720
|
+
// node_modules/ajv/dist/vocabularies/format/format.js
|
|
36703
36721
|
var require_format = __commonJS({
|
|
36704
|
-
"node_modules/ajv
|
|
36722
|
+
"node_modules/ajv/dist/vocabularies/format/format.js"(exports) {
|
|
36705
36723
|
"use strict";
|
|
36706
36724
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36707
36725
|
var codegen_1 = require_codegen();
|
|
@@ -36789,9 +36807,9 @@ var require_format = __commonJS({
|
|
|
36789
36807
|
}
|
|
36790
36808
|
});
|
|
36791
36809
|
|
|
36792
|
-
// node_modules/ajv
|
|
36810
|
+
// node_modules/ajv/dist/vocabularies/format/index.js
|
|
36793
36811
|
var require_format2 = __commonJS({
|
|
36794
|
-
"node_modules/ajv
|
|
36812
|
+
"node_modules/ajv/dist/vocabularies/format/index.js"(exports) {
|
|
36795
36813
|
"use strict";
|
|
36796
36814
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36797
36815
|
var format_1 = require_format();
|
|
@@ -36800,9 +36818,9 @@ var require_format2 = __commonJS({
|
|
|
36800
36818
|
}
|
|
36801
36819
|
});
|
|
36802
36820
|
|
|
36803
|
-
// node_modules/ajv
|
|
36821
|
+
// node_modules/ajv/dist/vocabularies/metadata.js
|
|
36804
36822
|
var require_metadata = __commonJS({
|
|
36805
|
-
"node_modules/ajv
|
|
36823
|
+
"node_modules/ajv/dist/vocabularies/metadata.js"(exports) {
|
|
36806
36824
|
"use strict";
|
|
36807
36825
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36808
36826
|
exports.contentVocabulary = exports.metadataVocabulary = void 0;
|
|
@@ -36823,9 +36841,9 @@ var require_metadata = __commonJS({
|
|
|
36823
36841
|
}
|
|
36824
36842
|
});
|
|
36825
36843
|
|
|
36826
|
-
// node_modules/ajv
|
|
36844
|
+
// node_modules/ajv/dist/vocabularies/draft7.js
|
|
36827
36845
|
var require_draft7 = __commonJS({
|
|
36828
|
-
"node_modules/ajv
|
|
36846
|
+
"node_modules/ajv/dist/vocabularies/draft7.js"(exports) {
|
|
36829
36847
|
"use strict";
|
|
36830
36848
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36831
36849
|
var core_1 = require_core2();
|
|
@@ -36845,9 +36863,9 @@ var require_draft7 = __commonJS({
|
|
|
36845
36863
|
}
|
|
36846
36864
|
});
|
|
36847
36865
|
|
|
36848
|
-
// node_modules/ajv
|
|
36866
|
+
// node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
36849
36867
|
var require_types = __commonJS({
|
|
36850
|
-
"node_modules/ajv
|
|
36868
|
+
"node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports) {
|
|
36851
36869
|
"use strict";
|
|
36852
36870
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36853
36871
|
exports.DiscrError = void 0;
|
|
@@ -36859,9 +36877,9 @@ var require_types = __commonJS({
|
|
|
36859
36877
|
}
|
|
36860
36878
|
});
|
|
36861
36879
|
|
|
36862
|
-
// node_modules/ajv
|
|
36880
|
+
// node_modules/ajv/dist/vocabularies/discriminator/index.js
|
|
36863
36881
|
var require_discriminator = __commonJS({
|
|
36864
|
-
"node_modules/ajv
|
|
36882
|
+
"node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports) {
|
|
36865
36883
|
"use strict";
|
|
36866
36884
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36867
36885
|
var codegen_1 = require_codegen();
|
|
@@ -36964,9 +36982,9 @@ var require_discriminator = __commonJS({
|
|
|
36964
36982
|
}
|
|
36965
36983
|
});
|
|
36966
36984
|
|
|
36967
|
-
// node_modules/ajv
|
|
36985
|
+
// node_modules/ajv/dist/refs/json-schema-draft-07.json
|
|
36968
36986
|
var require_json_schema_draft_07 = __commonJS({
|
|
36969
|
-
"node_modules/ajv
|
|
36987
|
+
"node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports, module) {
|
|
36970
36988
|
module.exports = {
|
|
36971
36989
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
36972
36990
|
$id: "http://json-schema.org/draft-07/schema#",
|
|
@@ -37121,9 +37139,9 @@ var require_json_schema_draft_07 = __commonJS({
|
|
|
37121
37139
|
}
|
|
37122
37140
|
});
|
|
37123
37141
|
|
|
37124
|
-
// node_modules/ajv
|
|
37142
|
+
// node_modules/ajv/dist/ajv.js
|
|
37125
37143
|
var require_ajv = __commonJS({
|
|
37126
|
-
"node_modules/ajv
|
|
37144
|
+
"node_modules/ajv/dist/ajv.js"(exports, module) {
|
|
37127
37145
|
"use strict";
|
|
37128
37146
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37129
37147
|
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;
|
|
@@ -37191,6 +37209,209 @@ var require_ajv = __commonJS({
|
|
|
37191
37209
|
}
|
|
37192
37210
|
});
|
|
37193
37211
|
|
|
37212
|
+
// node_modules/ajv-formats/dist/formats.js
|
|
37213
|
+
var require_formats = __commonJS({
|
|
37214
|
+
"node_modules/ajv-formats/dist/formats.js"(exports) {
|
|
37215
|
+
"use strict";
|
|
37216
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37217
|
+
exports.formatNames = exports.fastFormats = exports.fullFormats = void 0;
|
|
37218
|
+
function fmtDef(validate, compare) {
|
|
37219
|
+
return { validate, compare };
|
|
37220
|
+
}
|
|
37221
|
+
exports.fullFormats = {
|
|
37222
|
+
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
37223
|
+
date: fmtDef(date4, compareDate),
|
|
37224
|
+
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
37225
|
+
time: fmtDef(getTime(true), compareTime),
|
|
37226
|
+
"date-time": fmtDef(getDateTime(true), compareDateTime),
|
|
37227
|
+
"iso-time": fmtDef(getTime(), compareIsoTime),
|
|
37228
|
+
"iso-date-time": fmtDef(getDateTime(), compareIsoDateTime),
|
|
37229
|
+
// duration: https://tools.ietf.org/html/rfc3339#appendix-A
|
|
37230
|
+
duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,
|
|
37231
|
+
uri,
|
|
37232
|
+
"uri-reference": /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
|
|
37233
|
+
// uri-template: https://tools.ietf.org/html/rfc6570
|
|
37234
|
+
"uri-template": /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,
|
|
37235
|
+
// For the source: https://gist.github.com/dperini/729294
|
|
37236
|
+
// For test cases: https://mathiasbynens.be/demo/url-regex
|
|
37237
|
+
url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,
|
|
37238
|
+
email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
|
|
37239
|
+
hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,
|
|
37240
|
+
// optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
|
|
37241
|
+
ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,
|
|
37242
|
+
ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
|
|
37243
|
+
regex,
|
|
37244
|
+
// uuid: http://tools.ietf.org/html/rfc4122
|
|
37245
|
+
uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,
|
|
37246
|
+
// JSON-pointer: https://tools.ietf.org/html/rfc6901
|
|
37247
|
+
// uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
|
|
37248
|
+
"json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/,
|
|
37249
|
+
"json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,
|
|
37250
|
+
// relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
|
|
37251
|
+
"relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,
|
|
37252
|
+
// the following formats are used by the openapi specification: https://spec.openapis.org/oas/v3.0.0#data-types
|
|
37253
|
+
// byte: https://github.com/miguelmota/is-base64
|
|
37254
|
+
byte,
|
|
37255
|
+
// signed 32 bit integer
|
|
37256
|
+
int32: { type: "number", validate: validateInt32 },
|
|
37257
|
+
// signed 64 bit integer
|
|
37258
|
+
int64: { type: "number", validate: validateInt64 },
|
|
37259
|
+
// C-type float
|
|
37260
|
+
float: { type: "number", validate: validateNumber },
|
|
37261
|
+
// C-type double
|
|
37262
|
+
double: { type: "number", validate: validateNumber },
|
|
37263
|
+
// hint to the UI to hide input strings
|
|
37264
|
+
password: true,
|
|
37265
|
+
// unchecked string payload
|
|
37266
|
+
binary: true
|
|
37267
|
+
};
|
|
37268
|
+
exports.fastFormats = {
|
|
37269
|
+
...exports.fullFormats,
|
|
37270
|
+
date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
|
|
37271
|
+
time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime),
|
|
37272
|
+
"date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime),
|
|
37273
|
+
"iso-time": fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoTime),
|
|
37274
|
+
"iso-date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoDateTime),
|
|
37275
|
+
// uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
|
|
37276
|
+
uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,
|
|
37277
|
+
"uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
|
|
37278
|
+
// email (sources from jsen validator):
|
|
37279
|
+
// http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
|
|
37280
|
+
// http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')
|
|
37281
|
+
email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i
|
|
37282
|
+
};
|
|
37283
|
+
exports.formatNames = Object.keys(exports.fullFormats);
|
|
37284
|
+
function isLeapYear(year) {
|
|
37285
|
+
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
37286
|
+
}
|
|
37287
|
+
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
|
37288
|
+
var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
37289
|
+
function date4(str) {
|
|
37290
|
+
const matches = DATE.exec(str);
|
|
37291
|
+
if (!matches)
|
|
37292
|
+
return false;
|
|
37293
|
+
const year = +matches[1];
|
|
37294
|
+
const month = +matches[2];
|
|
37295
|
+
const day = +matches[3];
|
|
37296
|
+
return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]);
|
|
37297
|
+
}
|
|
37298
|
+
function compareDate(d1, d2) {
|
|
37299
|
+
if (!(d1 && d2))
|
|
37300
|
+
return void 0;
|
|
37301
|
+
if (d1 > d2)
|
|
37302
|
+
return 1;
|
|
37303
|
+
if (d1 < d2)
|
|
37304
|
+
return -1;
|
|
37305
|
+
return 0;
|
|
37306
|
+
}
|
|
37307
|
+
var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
|
|
37308
|
+
function getTime(strictTimeZone) {
|
|
37309
|
+
return function time3(str) {
|
|
37310
|
+
const matches = TIME.exec(str);
|
|
37311
|
+
if (!matches)
|
|
37312
|
+
return false;
|
|
37313
|
+
const hr = +matches[1];
|
|
37314
|
+
const min = +matches[2];
|
|
37315
|
+
const sec = +matches[3];
|
|
37316
|
+
const tz = matches[4];
|
|
37317
|
+
const tzSign = matches[5] === "-" ? -1 : 1;
|
|
37318
|
+
const tzH = +(matches[6] || 0);
|
|
37319
|
+
const tzM = +(matches[7] || 0);
|
|
37320
|
+
if (tzH > 23 || tzM > 59 || strictTimeZone && !tz)
|
|
37321
|
+
return false;
|
|
37322
|
+
if (hr <= 23 && min <= 59 && sec < 60)
|
|
37323
|
+
return true;
|
|
37324
|
+
const utcMin = min - tzM * tzSign;
|
|
37325
|
+
const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0);
|
|
37326
|
+
return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61;
|
|
37327
|
+
};
|
|
37328
|
+
}
|
|
37329
|
+
function compareTime(s1, s2) {
|
|
37330
|
+
if (!(s1 && s2))
|
|
37331
|
+
return void 0;
|
|
37332
|
+
const t1 = (/* @__PURE__ */ new Date("2020-01-01T" + s1)).valueOf();
|
|
37333
|
+
const t2 = (/* @__PURE__ */ new Date("2020-01-01T" + s2)).valueOf();
|
|
37334
|
+
if (!(t1 && t2))
|
|
37335
|
+
return void 0;
|
|
37336
|
+
return t1 - t2;
|
|
37337
|
+
}
|
|
37338
|
+
function compareIsoTime(t1, t2) {
|
|
37339
|
+
if (!(t1 && t2))
|
|
37340
|
+
return void 0;
|
|
37341
|
+
const a1 = TIME.exec(t1);
|
|
37342
|
+
const a2 = TIME.exec(t2);
|
|
37343
|
+
if (!(a1 && a2))
|
|
37344
|
+
return void 0;
|
|
37345
|
+
t1 = a1[1] + a1[2] + a1[3];
|
|
37346
|
+
t2 = a2[1] + a2[2] + a2[3];
|
|
37347
|
+
if (t1 > t2)
|
|
37348
|
+
return 1;
|
|
37349
|
+
if (t1 < t2)
|
|
37350
|
+
return -1;
|
|
37351
|
+
return 0;
|
|
37352
|
+
}
|
|
37353
|
+
var DATE_TIME_SEPARATOR = /t|\s/i;
|
|
37354
|
+
function getDateTime(strictTimeZone) {
|
|
37355
|
+
const time3 = getTime(strictTimeZone);
|
|
37356
|
+
return function date_time(str) {
|
|
37357
|
+
const dateTime = str.split(DATE_TIME_SEPARATOR);
|
|
37358
|
+
return dateTime.length === 2 && date4(dateTime[0]) && time3(dateTime[1]);
|
|
37359
|
+
};
|
|
37360
|
+
}
|
|
37361
|
+
function compareDateTime(dt1, dt2) {
|
|
37362
|
+
if (!(dt1 && dt2))
|
|
37363
|
+
return void 0;
|
|
37364
|
+
const d1 = new Date(dt1).valueOf();
|
|
37365
|
+
const d2 = new Date(dt2).valueOf();
|
|
37366
|
+
if (!(d1 && d2))
|
|
37367
|
+
return void 0;
|
|
37368
|
+
return d1 - d2;
|
|
37369
|
+
}
|
|
37370
|
+
function compareIsoDateTime(dt1, dt2) {
|
|
37371
|
+
if (!(dt1 && dt2))
|
|
37372
|
+
return void 0;
|
|
37373
|
+
const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);
|
|
37374
|
+
const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR);
|
|
37375
|
+
const res = compareDate(d1, d2);
|
|
37376
|
+
if (res === void 0)
|
|
37377
|
+
return void 0;
|
|
37378
|
+
return res || compareTime(t1, t2);
|
|
37379
|
+
}
|
|
37380
|
+
var NOT_URI_FRAGMENT = /\/|:/;
|
|
37381
|
+
var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
|
37382
|
+
function uri(str) {
|
|
37383
|
+
return NOT_URI_FRAGMENT.test(str) && URI.test(str);
|
|
37384
|
+
}
|
|
37385
|
+
var BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
|
|
37386
|
+
function byte(str) {
|
|
37387
|
+
BYTE.lastIndex = 0;
|
|
37388
|
+
return BYTE.test(str);
|
|
37389
|
+
}
|
|
37390
|
+
var MIN_INT32 = -(2 ** 31);
|
|
37391
|
+
var MAX_INT32 = 2 ** 31 - 1;
|
|
37392
|
+
function validateInt32(value) {
|
|
37393
|
+
return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32;
|
|
37394
|
+
}
|
|
37395
|
+
function validateInt64(value) {
|
|
37396
|
+
return Number.isInteger(value);
|
|
37397
|
+
}
|
|
37398
|
+
function validateNumber() {
|
|
37399
|
+
return true;
|
|
37400
|
+
}
|
|
37401
|
+
var Z_ANCHOR = /[^\\]\\Z/;
|
|
37402
|
+
function regex(str) {
|
|
37403
|
+
if (Z_ANCHOR.test(str))
|
|
37404
|
+
return false;
|
|
37405
|
+
try {
|
|
37406
|
+
new RegExp(str);
|
|
37407
|
+
return true;
|
|
37408
|
+
} catch (e) {
|
|
37409
|
+
return false;
|
|
37410
|
+
}
|
|
37411
|
+
}
|
|
37412
|
+
}
|
|
37413
|
+
});
|
|
37414
|
+
|
|
37194
37415
|
// node_modules/ajv-formats/dist/limit.js
|
|
37195
37416
|
var require_limit = __commonJS({
|
|
37196
37417
|
"node_modules/ajv-formats/dist/limit.js"(exports) {
|
|
@@ -37837,8 +38058,8 @@ function createDevelopmentContext(moduleUrl) {
|
|
|
37837
38058
|
return {
|
|
37838
38059
|
mode: "development",
|
|
37839
38060
|
command: {
|
|
37840
|
-
command: "
|
|
37841
|
-
args: ["--
|
|
38061
|
+
command: "bun",
|
|
38062
|
+
args: ["--cwd", projectRoot, "run", "--silent", "dev", "--"]
|
|
37842
38063
|
}
|
|
37843
38064
|
};
|
|
37844
38065
|
}
|
|
@@ -37869,7 +38090,7 @@ function formatCliHelpCommand(context, args) {
|
|
|
37869
38090
|
function formatCliUsageCommand(context) {
|
|
37870
38091
|
switch (context.mode) {
|
|
37871
38092
|
case "development":
|
|
37872
|
-
return "
|
|
38093
|
+
return "bun run dev --";
|
|
37873
38094
|
case "npx":
|
|
37874
38095
|
return "npx poe-code";
|
|
37875
38096
|
case "npx-latest":
|
|
@@ -37922,7 +38143,9 @@ function throwCommandNotFound(input) {
|
|
|
37922
38143
|
logger2.error(`${panel.label}
|
|
37923
38144
|
${panel.footer}`);
|
|
37924
38145
|
}
|
|
37925
|
-
|
|
38146
|
+
if (container.dependencies.exitOverride === false) {
|
|
38147
|
+
process.exitCode = 1;
|
|
38148
|
+
}
|
|
37926
38149
|
throw new SilentError();
|
|
37927
38150
|
}
|
|
37928
38151
|
var init_command_not_found = __esm({
|
|
@@ -38403,19 +38626,21 @@ var init_configs3 = __esm({
|
|
|
38403
38626
|
}
|
|
38404
38627
|
});
|
|
38405
38628
|
|
|
38629
|
+
// packages/agent-skill-config/src/templates/poe-generate.md
|
|
38630
|
+
var poe_generate_default;
|
|
38631
|
+
var init_poe_generate = __esm({
|
|
38632
|
+
"packages/agent-skill-config/src/templates/poe-generate.md"() {
|
|
38633
|
+
poe_generate_default = '---\nname: poe-generate\ndescription: \'Poe code generation skill\'\n---\n\n# poe-code generate\n\nUse `poe-code generate` to create text, images, audio, or video via the Poe API.\n\n## Text generation\n\n```bash\npoe-code generate "Write a short function that parses a JSON string safely."\n```\n\nSpecify the model/bot:\n\n```bash\n# CLI option\npoe-code generate --model "gpt-4.1" "Summarize this codebase change."\n\n# Some agent runtimes call the model selector `--bot`\npoe-code generate --bot "gpt-4.1" "Summarize this codebase change."\n```\n\n## Media generation\n\nThe CLI supports media generation as subcommands:\n\n```bash\npoe-code generate image "A 3D render of a rubber duck wearing sunglasses" --model "gpt-image-1" -o duck.png\npoe-code generate video "A cinematic timelapse of a city at night" --model "veo" -o city.mp4\npoe-code generate audio "A calm 10 second lo-fi beat" --model "audio-model" -o beat.wav\n```\n\nSome agent runtimes expose the same media types as flags. If available, these are equivalent:\n\n```bash\npoe-code generate --image "A 3D render of a rubber duck wearing sunglasses" --bot "gpt-image-1" -o duck.png\npoe-code generate --video "A cinematic timelapse of a city at night" --bot "veo" -o city.mp4\npoe-code generate --audio "A calm 10 second lo-fi beat" --bot "audio-model" -o beat.wav\n```\n\n## Tips\n\n- Use `--param key=value` to pass provider/model parameters (repeatable).\n- Use `--output <path>` (or `-o`) for media outputs.\n';
|
|
38634
|
+
}
|
|
38635
|
+
});
|
|
38636
|
+
|
|
38406
38637
|
// packages/agent-skill-config/src/templates.ts
|
|
38407
|
-
import { readFile as readFile6 } from "node:fs/promises";
|
|
38408
38638
|
async function getTemplates() {
|
|
38409
38639
|
if (templatesCache) {
|
|
38410
38640
|
return templatesCache;
|
|
38411
38641
|
}
|
|
38412
|
-
const poeGenerateTemplateUrl = new URL(
|
|
38413
|
-
"./templates/poe-generate.md",
|
|
38414
|
-
import.meta.url
|
|
38415
|
-
);
|
|
38416
|
-
const poeGenerateTemplate = await readFile6(poeGenerateTemplateUrl, "utf8");
|
|
38417
38642
|
templatesCache = {
|
|
38418
|
-
"poe-generate.md":
|
|
38643
|
+
"poe-generate.md": poe_generate_default
|
|
38419
38644
|
};
|
|
38420
38645
|
return templatesCache;
|
|
38421
38646
|
}
|
|
@@ -38434,6 +38659,7 @@ var templatesCache;
|
|
|
38434
38659
|
var init_templates = __esm({
|
|
38435
38660
|
"packages/agent-skill-config/src/templates.ts"() {
|
|
38436
38661
|
"use strict";
|
|
38662
|
+
init_poe_generate();
|
|
38437
38663
|
templatesCache = null;
|
|
38438
38664
|
}
|
|
38439
38665
|
});
|
|
@@ -38869,7 +39095,7 @@ async function displayVersion(container, currentVersion) {
|
|
|
38869
39095
|
logger2.warn(
|
|
38870
39096
|
`Update available: ${result.currentVersion} -> ${result.latestVersion}`
|
|
38871
39097
|
);
|
|
38872
|
-
logger2.resolved("Update", `
|
|
39098
|
+
logger2.resolved("Update", `bun install --global poe-code@latest`);
|
|
38873
39099
|
}
|
|
38874
39100
|
}
|
|
38875
39101
|
var init_version2 = __esm({
|
|
@@ -39425,8 +39651,22 @@ var init_models2 = __esm({
|
|
|
39425
39651
|
|
|
39426
39652
|
// src/cli/commands/pipeline.ts
|
|
39427
39653
|
import path27 from "node:path";
|
|
39428
|
-
import { readFile as
|
|
39654
|
+
import { readFile as readFile6, stat as stat7 } from "node:fs/promises";
|
|
39429
39655
|
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
39656
|
+
async function resolvePipelinePlanDirectory(container) {
|
|
39657
|
+
const configDoc = await readMergedDocument(
|
|
39658
|
+
container.fs,
|
|
39659
|
+
container.env.configPath,
|
|
39660
|
+
container.env.projectConfigPath
|
|
39661
|
+
);
|
|
39662
|
+
const pipelineConfig = resolveScope(
|
|
39663
|
+
pipelineConfigScope.schema,
|
|
39664
|
+
configDoc[pipelineConfigScope.scope],
|
|
39665
|
+
container.env.variables
|
|
39666
|
+
);
|
|
39667
|
+
const dir = pipelineConfig.plan_directory?.trim();
|
|
39668
|
+
return dir || void 0;
|
|
39669
|
+
}
|
|
39430
39670
|
function formatDuration(ms) {
|
|
39431
39671
|
const totalSeconds = Math.round(ms / 1e3);
|
|
39432
39672
|
const minutes = Math.floor(totalSeconds / 60);
|
|
@@ -39479,8 +39719,8 @@ async function loadPipelineTemplates() {
|
|
|
39479
39719
|
continue;
|
|
39480
39720
|
}
|
|
39481
39721
|
const [skillPlan, steps] = await Promise.all([
|
|
39482
|
-
|
|
39483
|
-
|
|
39722
|
+
readFile6(path27.join(templateRoot, "SKILL_plan.md"), "utf8"),
|
|
39723
|
+
readFile6(path27.join(templateRoot, "steps.yaml.hbs"), "utf8")
|
|
39484
39724
|
]);
|
|
39485
39725
|
pipelineTemplatesCache = { skillPlan, steps };
|
|
39486
39726
|
return pipelineTemplatesCache;
|
|
@@ -39553,10 +39793,12 @@ function registerPipelineCommand(program, container) {
|
|
|
39553
39793
|
}
|
|
39554
39794
|
agent2 = resolvePipelineAgent(selected);
|
|
39555
39795
|
}
|
|
39796
|
+
const planDirectory = await resolvePipelinePlanDirectory(container);
|
|
39556
39797
|
const result = await runPipeline2({
|
|
39557
39798
|
agent: agent2,
|
|
39558
39799
|
cwd: container.env.cwd,
|
|
39559
39800
|
homeDir: container.env.homeDir,
|
|
39801
|
+
...planDirectory ? { planDirectory } : {},
|
|
39560
39802
|
...options.model ? { model: options.model } : {},
|
|
39561
39803
|
...options.task ? { task: options.task } : {},
|
|
39562
39804
|
...options.plan ? { plan: options.plan } : {},
|
|
@@ -39584,7 +39826,7 @@ function registerPipelineCommand(program, container) {
|
|
|
39584
39826
|
return typeof selected === "string" ? selected : null;
|
|
39585
39827
|
},
|
|
39586
39828
|
promptForPath: async (input) => {
|
|
39587
|
-
const value = await
|
|
39829
|
+
const value = await promptText(input);
|
|
39588
39830
|
if (isCancel2(value)) {
|
|
39589
39831
|
cancel2("Pipeline run cancelled.");
|
|
39590
39832
|
return null;
|
|
@@ -39682,6 +39924,17 @@ function registerPipelineCommand(program, container) {
|
|
|
39682
39924
|
resources.context.finalize();
|
|
39683
39925
|
}
|
|
39684
39926
|
});
|
|
39927
|
+
pipeline.command("plan-path").description("Print the directory where pipeline plan files should be placed.").action(async function() {
|
|
39928
|
+
const planDirectory = await resolvePipelinePlanDirectory(container);
|
|
39929
|
+
const resolvedPath = await resolvePlanDirectory({
|
|
39930
|
+
cwd: container.env.cwd,
|
|
39931
|
+
homeDir: container.env.homeDir,
|
|
39932
|
+
planDirectory,
|
|
39933
|
+
fs: container.fs
|
|
39934
|
+
});
|
|
39935
|
+
process.stdout.write(`${resolvedPath}
|
|
39936
|
+
`);
|
|
39937
|
+
});
|
|
39685
39938
|
pipeline.command("install").description("Install the Pipeline /plan skill and scaffold pipeline files.").option("--agent <name>", "Agent to install the Pipeline skill for").option("--local", "Install project-local skill and pipeline files").option("--global", "Install user-global skill and pipeline files").option("--force", "Overwrite an existing steps.yaml scaffold").action(async function() {
|
|
39686
39939
|
const flags = resolveCommandFlags(program);
|
|
39687
39940
|
const resources = createExecutionResources(
|
|
@@ -39808,6 +40061,8 @@ var init_pipeline4 = __esm({
|
|
|
39808
40061
|
init_src5();
|
|
39809
40062
|
init_src2();
|
|
39810
40063
|
init_src15();
|
|
40064
|
+
init_src4();
|
|
40065
|
+
init_config3();
|
|
39811
40066
|
init_errors();
|
|
39812
40067
|
init_shared();
|
|
39813
40068
|
await init_pipeline2();
|
|
@@ -39819,19 +40074,20 @@ var init_pipeline4 = __esm({
|
|
|
39819
40074
|
});
|
|
39820
40075
|
|
|
39821
40076
|
// src/cli/commands/ralph.ts
|
|
40077
|
+
import path28 from "node:path";
|
|
39822
40078
|
function formatDuration2(ms) {
|
|
39823
40079
|
const totalSeconds = Math.round(ms / 1e3);
|
|
39824
40080
|
const minutes = Math.floor(totalSeconds / 60);
|
|
39825
40081
|
const seconds = totalSeconds % 60;
|
|
39826
40082
|
return minutes > 0 ? `${minutes}m ${seconds}s` : `${seconds}s`;
|
|
39827
40083
|
}
|
|
39828
|
-
function resolveRalphAgent(value) {
|
|
40084
|
+
function resolveRalphAgent(value, sourceLabel = "agent") {
|
|
39829
40085
|
if (!value || value.trim().length === 0) {
|
|
39830
40086
|
return DEFAULT_RALPH_AGENT;
|
|
39831
40087
|
}
|
|
39832
40088
|
const resolved = resolveAgentId(value.trim());
|
|
39833
40089
|
if (!resolved) {
|
|
39834
|
-
throw new ValidationError(`Unsupported
|
|
40090
|
+
throw new ValidationError(`Unsupported ${sourceLabel}: ${value}`);
|
|
39835
40091
|
}
|
|
39836
40092
|
return resolved;
|
|
39837
40093
|
}
|
|
@@ -39847,26 +40103,54 @@ function parsePositiveInt(value, fieldName) {
|
|
|
39847
40103
|
}
|
|
39848
40104
|
return parsed;
|
|
39849
40105
|
}
|
|
39850
|
-
|
|
39851
|
-
|
|
39852
|
-
|
|
40106
|
+
function normalizeConfiguredIterations(value) {
|
|
40107
|
+
return typeof value === "number" && Number.isInteger(value) && value >= 1 ? value : void 0;
|
|
40108
|
+
}
|
|
40109
|
+
function resolveAbsoluteDocPath2(container, docPath) {
|
|
40110
|
+
if (docPath.startsWith("~/")) {
|
|
40111
|
+
return path28.join(container.env.homeDir, docPath.slice(2));
|
|
39853
40112
|
}
|
|
39854
|
-
|
|
39855
|
-
|
|
39856
|
-
|
|
40113
|
+
return path28.isAbsolute(docPath) ? docPath : path28.resolve(container.env.cwd, docPath);
|
|
40114
|
+
}
|
|
40115
|
+
async function resolvePlanDirectory2(container) {
|
|
40116
|
+
const configDoc = await readMergedDocument(
|
|
40117
|
+
container.fs,
|
|
40118
|
+
container.env.configPath,
|
|
40119
|
+
container.env.projectConfigPath
|
|
40120
|
+
);
|
|
40121
|
+
const ralphConfig = resolveScope(
|
|
40122
|
+
ralphConfigScope.schema,
|
|
40123
|
+
configDoc[ralphConfigScope.scope],
|
|
40124
|
+
container.env.variables
|
|
40125
|
+
);
|
|
40126
|
+
const configDir = ralphConfig.plan_directory?.trim();
|
|
40127
|
+
return configDir || void 0;
|
|
40128
|
+
}
|
|
40129
|
+
function formatDocHint(frontmatter) {
|
|
40130
|
+
const parts = [];
|
|
40131
|
+
if (frontmatter.agent !== void 0) {
|
|
40132
|
+
const agents = Array.isArray(frontmatter.agent) ? frontmatter.agent : [frontmatter.agent];
|
|
40133
|
+
if (agents.length > 0) {
|
|
40134
|
+
parts.push(agents.join(", "));
|
|
40135
|
+
}
|
|
39857
40136
|
}
|
|
39858
|
-
|
|
39859
|
-
|
|
39860
|
-
|
|
39861
|
-
|
|
39862
|
-
|
|
39863
|
-
|
|
39864
|
-
|
|
39865
|
-
|
|
39866
|
-
|
|
39867
|
-
|
|
40137
|
+
if (frontmatter.iterations !== void 0) {
|
|
40138
|
+
parts.push(`\xD7${frontmatter.iterations}`);
|
|
40139
|
+
}
|
|
40140
|
+
if (frontmatter.status.state !== "open" || frontmatter.status.iteration > 0) {
|
|
40141
|
+
parts.push(`${frontmatter.status.state} ${frontmatter.status.iteration}`);
|
|
40142
|
+
}
|
|
40143
|
+
return parts.length > 0 ? parts.join(" \xB7 ") : void 0;
|
|
40144
|
+
}
|
|
40145
|
+
async function readDocHint(container, docPath) {
|
|
40146
|
+
const absolutePath = resolveAbsoluteDocPath2(container, docPath);
|
|
40147
|
+
try {
|
|
40148
|
+
const content = await container.fs.readFile(absolutePath, "utf8");
|
|
40149
|
+
const { data } = parseFrontmatter(content);
|
|
40150
|
+
return formatDocHint(data);
|
|
40151
|
+
} catch {
|
|
40152
|
+
return void 0;
|
|
39868
40153
|
}
|
|
39869
|
-
return resolveRalphAgent(typeof selected === "string" ? selected : void 0);
|
|
39870
40154
|
}
|
|
39871
40155
|
async function resolveDocPath(options) {
|
|
39872
40156
|
if (options.providedDoc && options.providedDoc.trim().length > 0) {
|
|
@@ -39875,6 +40159,7 @@ async function resolveDocPath(options) {
|
|
|
39875
40159
|
const docs = await discoverDocs({
|
|
39876
40160
|
cwd: options.container.env.cwd,
|
|
39877
40161
|
homeDir: options.container.env.homeDir,
|
|
40162
|
+
planDirectory: options.planDirectory,
|
|
39878
40163
|
fs: options.container.fs
|
|
39879
40164
|
});
|
|
39880
40165
|
if (docs.length === 0) {
|
|
@@ -39886,10 +40171,13 @@ async function resolveDocPath(options) {
|
|
|
39886
40171
|
if (flags.assumeYes) {
|
|
39887
40172
|
return docs[0].path;
|
|
39888
40173
|
}
|
|
40174
|
+
const hints = await Promise.all(
|
|
40175
|
+
docs.map((doc) => readDocHint(options.container, doc.path))
|
|
40176
|
+
);
|
|
39889
40177
|
const selected = await select2({
|
|
39890
40178
|
message: "Select the Ralph markdown doc to run:",
|
|
39891
|
-
options: docs.map((doc) => ({
|
|
39892
|
-
label: doc.displayPath,
|
|
40179
|
+
options: docs.map((doc, index) => ({
|
|
40180
|
+
label: text.selectLabel(doc.displayPath, hints[index]),
|
|
39893
40181
|
value: doc.path
|
|
39894
40182
|
}))
|
|
39895
40183
|
});
|
|
@@ -39899,7 +40187,61 @@ async function resolveDocPath(options) {
|
|
|
39899
40187
|
}
|
|
39900
40188
|
return typeof selected === "string" ? selected : null;
|
|
39901
40189
|
}
|
|
39902
|
-
async function
|
|
40190
|
+
async function readRalphDoc(container, docPath) {
|
|
40191
|
+
const absolutePath = resolveAbsoluteDocPath2(container, docPath);
|
|
40192
|
+
try {
|
|
40193
|
+
const content = await container.fs.readFile(absolutePath, "utf8");
|
|
40194
|
+
const parsed = parseFrontmatter(content);
|
|
40195
|
+
return {
|
|
40196
|
+
absolutePath,
|
|
40197
|
+
body: parsed.body,
|
|
40198
|
+
data: parsed.data
|
|
40199
|
+
};
|
|
40200
|
+
} catch {
|
|
40201
|
+
throw new ValidationError(`Ralph doc not found: ${docPath}`);
|
|
40202
|
+
}
|
|
40203
|
+
}
|
|
40204
|
+
function resolveConfiguredAgents(value) {
|
|
40205
|
+
if (value === void 0) {
|
|
40206
|
+
return void 0;
|
|
40207
|
+
}
|
|
40208
|
+
if (typeof value === "string") {
|
|
40209
|
+
return resolveRalphAgent(value, "frontmatter agent");
|
|
40210
|
+
}
|
|
40211
|
+
if (value.length === 0) {
|
|
40212
|
+
throw new ValidationError("Frontmatter agent array must not be empty.");
|
|
40213
|
+
}
|
|
40214
|
+
return value.map((entry) => resolveRalphAgent(entry, "frontmatter agent"));
|
|
40215
|
+
}
|
|
40216
|
+
async function promptForAgent(program) {
|
|
40217
|
+
const flags = resolveCommandFlags(program);
|
|
40218
|
+
if (flags.assumeYes) {
|
|
40219
|
+
return DEFAULT_RALPH_AGENT;
|
|
40220
|
+
}
|
|
40221
|
+
const selected = await select2({
|
|
40222
|
+
message: "Select agent to run Ralph with:",
|
|
40223
|
+
options: allSpawnConfigs.map((config2) => ({
|
|
40224
|
+
label: config2.agentId,
|
|
40225
|
+
value: config2.agentId
|
|
40226
|
+
}))
|
|
40227
|
+
});
|
|
40228
|
+
if (isCancel2(selected)) {
|
|
40229
|
+
cancel2("Ralph run cancelled.");
|
|
40230
|
+
return null;
|
|
40231
|
+
}
|
|
40232
|
+
return resolveRalphAgent(typeof selected === "string" ? selected : void 0);
|
|
40233
|
+
}
|
|
40234
|
+
async function resolveRunAgent(options) {
|
|
40235
|
+
if (options.providedAgent) {
|
|
40236
|
+
return resolveRalphAgent(options.providedAgent);
|
|
40237
|
+
}
|
|
40238
|
+
const configured = resolveConfiguredAgents(options.frontmatterAgent);
|
|
40239
|
+
if (configured !== void 0) {
|
|
40240
|
+
return configured;
|
|
40241
|
+
}
|
|
40242
|
+
return promptForAgent(options.program);
|
|
40243
|
+
}
|
|
40244
|
+
async function resolveRunIterations(options) {
|
|
39903
40245
|
const explicitIterations = parsePositiveInt(
|
|
39904
40246
|
options.providedIterations,
|
|
39905
40247
|
"iterations"
|
|
@@ -39907,13 +40249,17 @@ async function resolveIterations(options) {
|
|
|
39907
40249
|
if (explicitIterations != null) {
|
|
39908
40250
|
return explicitIterations;
|
|
39909
40251
|
}
|
|
40252
|
+
const configuredIterations = normalizeConfiguredIterations(
|
|
40253
|
+
options.frontmatterIterations
|
|
40254
|
+
);
|
|
40255
|
+
if (configuredIterations != null) {
|
|
40256
|
+
return configuredIterations;
|
|
40257
|
+
}
|
|
39910
40258
|
const flags = resolveCommandFlags(options.program);
|
|
39911
40259
|
if (flags.assumeYes) {
|
|
39912
|
-
|
|
39913
|
-
"Iterations are required when using --yes. Provide poe-code ralph run <iterations> [doc]."
|
|
39914
|
-
);
|
|
40260
|
+
return DEFAULT_RALPH_ITERATIONS;
|
|
39915
40261
|
}
|
|
39916
|
-
const entered = await
|
|
40262
|
+
const entered = await promptText({
|
|
39917
40263
|
message: "How many Ralph iterations should run?"
|
|
39918
40264
|
});
|
|
39919
40265
|
if (isCancel2(entered)) {
|
|
@@ -39925,43 +40271,157 @@ async function resolveIterations(options) {
|
|
|
39925
40271
|
"iterations"
|
|
39926
40272
|
) ?? null;
|
|
39927
40273
|
}
|
|
40274
|
+
async function resolveInitAgent(options) {
|
|
40275
|
+
if (options.providedAgent) {
|
|
40276
|
+
return resolveRalphAgent(options.providedAgent);
|
|
40277
|
+
}
|
|
40278
|
+
return promptForAgent(options.program);
|
|
40279
|
+
}
|
|
40280
|
+
async function resolveInitIterations(options) {
|
|
40281
|
+
const explicitIterations = parsePositiveInt(
|
|
40282
|
+
options.providedIterations,
|
|
40283
|
+
"iterations"
|
|
40284
|
+
);
|
|
40285
|
+
if (explicitIterations != null) {
|
|
40286
|
+
return explicitIterations;
|
|
40287
|
+
}
|
|
40288
|
+
const flags = resolveCommandFlags(options.program);
|
|
40289
|
+
if (flags.assumeYes) {
|
|
40290
|
+
return DEFAULT_RALPH_ITERATIONS;
|
|
40291
|
+
}
|
|
40292
|
+
const entered = await promptText({
|
|
40293
|
+
message: "How many Ralph iterations should run?"
|
|
40294
|
+
});
|
|
40295
|
+
if (isCancel2(entered)) {
|
|
40296
|
+
cancel2("Ralph init cancelled.");
|
|
40297
|
+
return null;
|
|
40298
|
+
}
|
|
40299
|
+
return parsePositiveInt(
|
|
40300
|
+
typeof entered === "string" ? entered.trim() : void 0,
|
|
40301
|
+
"iterations"
|
|
40302
|
+
) ?? null;
|
|
40303
|
+
}
|
|
40304
|
+
function formatCurrentConfig(frontmatter) {
|
|
40305
|
+
if (frontmatter.agent === void 0 && frontmatter.iterations === void 0) {
|
|
40306
|
+
return null;
|
|
40307
|
+
}
|
|
40308
|
+
const items = [];
|
|
40309
|
+
if (frontmatter.iterations !== void 0) {
|
|
40310
|
+
items.push(String(frontmatter.iterations));
|
|
40311
|
+
}
|
|
40312
|
+
const agentList = expandAgentList(frontmatter.agent, frontmatter.iterations);
|
|
40313
|
+
if (agentList.length > 0) {
|
|
40314
|
+
items.push(...agentList);
|
|
40315
|
+
}
|
|
40316
|
+
return items.length > 0 ? `Current: ${items.join(", ")}` : null;
|
|
40317
|
+
}
|
|
40318
|
+
function expandAgentList(agent2, iterations) {
|
|
40319
|
+
if (agent2 === void 0) {
|
|
40320
|
+
return [];
|
|
40321
|
+
}
|
|
40322
|
+
if (typeof agent2 === "string") {
|
|
40323
|
+
const count2 = normalizeConfiguredIterations(iterations) ?? 1;
|
|
40324
|
+
return Array.from({ length: count2 }, () => agent2);
|
|
40325
|
+
}
|
|
40326
|
+
if (agent2.length === 0) {
|
|
40327
|
+
return [];
|
|
40328
|
+
}
|
|
40329
|
+
const count = normalizeConfiguredIterations(iterations) ?? agent2.length;
|
|
40330
|
+
return Array.from({ length: count }, (_, index) => agent2[index % agent2.length]);
|
|
40331
|
+
}
|
|
39928
40332
|
function registerRalphCommand(program, container) {
|
|
39929
40333
|
const ralph = program.command("ralph").description("Run a simple iterative markdown loop.");
|
|
39930
|
-
ralph.command("
|
|
39931
|
-
|
|
39932
|
-
|
|
39933
|
-
|
|
40334
|
+
ralph.command("init").description("Write Ralph config into an existing markdown doc frontmatter.").argument("[doc]", "Markdown doc path").option("--agent <name>", "Agent to write into frontmatter").option("--iterations <n>", "Number of iterations to write into frontmatter").action(async function(docArg) {
|
|
40335
|
+
const flags = resolveCommandFlags(program);
|
|
40336
|
+
const resources = createExecutionResources(container, flags, "ralph:init");
|
|
40337
|
+
const options = this.opts();
|
|
40338
|
+
resources.logger.intro("ralph init");
|
|
40339
|
+
try {
|
|
40340
|
+
const planDirectory = await resolvePlanDirectory2(container);
|
|
40341
|
+
const docPath = await resolveDocPath({
|
|
40342
|
+
container,
|
|
40343
|
+
program,
|
|
40344
|
+
providedDoc: docArg,
|
|
40345
|
+
planDirectory
|
|
40346
|
+
});
|
|
40347
|
+
if (!docPath) {
|
|
40348
|
+
return;
|
|
40349
|
+
}
|
|
40350
|
+
const doc = await readRalphDoc(container, docPath);
|
|
40351
|
+
const currentConfig = formatCurrentConfig(doc.data);
|
|
40352
|
+
if (!options.agent && !options.iterations && !flags.assumeYes && currentConfig) {
|
|
40353
|
+
resources.logger.info(currentConfig);
|
|
40354
|
+
}
|
|
40355
|
+
const agent2 = await resolveInitAgent({
|
|
40356
|
+
program,
|
|
40357
|
+
providedAgent: options.agent
|
|
40358
|
+
});
|
|
40359
|
+
if (!agent2) {
|
|
40360
|
+
return;
|
|
40361
|
+
}
|
|
40362
|
+
const iterations = await resolveInitIterations({
|
|
40363
|
+
program,
|
|
40364
|
+
providedIterations: options.iterations
|
|
40365
|
+
});
|
|
40366
|
+
if (iterations == null) {
|
|
40367
|
+
return;
|
|
40368
|
+
}
|
|
40369
|
+
const updated = writeFrontmatter(
|
|
40370
|
+
{
|
|
40371
|
+
agent: agent2,
|
|
40372
|
+
iterations,
|
|
40373
|
+
status: {
|
|
40374
|
+
state: doc.data.status.state,
|
|
40375
|
+
iteration: doc.data.status.iteration
|
|
40376
|
+
}
|
|
40377
|
+
},
|
|
40378
|
+
doc.body
|
|
40379
|
+
);
|
|
40380
|
+
await container.fs.writeFile(doc.absolutePath, updated, { encoding: "utf8" });
|
|
40381
|
+
resources.logger.resolved(
|
|
40382
|
+
"Initialized Ralph config",
|
|
40383
|
+
`Doc: ${docPath}
|
|
40384
|
+
Agent: ${agent2}
|
|
40385
|
+
Iterations: ${iterations}`
|
|
40386
|
+
);
|
|
40387
|
+
resources.logger.success("Ralph config saved.");
|
|
40388
|
+
} finally {
|
|
40389
|
+
resources.context.finalize();
|
|
40390
|
+
}
|
|
40391
|
+
});
|
|
40392
|
+
ralph.command("run").description("Run the selected markdown doc through repeated agent iterations.").argument("[doc]", "Markdown doc path").option("--agent <name>", "Override the agent from frontmatter").option("--iterations <n>", "Override iterations from frontmatter").option("--model <model>", "Model override passed to the agent").action(async function(docArg) {
|
|
39934
40393
|
const flags = resolveCommandFlags(program);
|
|
39935
40394
|
const resources = createExecutionResources(container, flags, "ralph:run");
|
|
39936
40395
|
const options = this.opts();
|
|
39937
40396
|
resources.logger.intro("ralph run");
|
|
39938
40397
|
try {
|
|
40398
|
+
const planDirectory = await resolvePlanDirectory2(container);
|
|
39939
40399
|
const docPath = await resolveDocPath({
|
|
39940
40400
|
container,
|
|
39941
40401
|
program,
|
|
39942
|
-
providedDoc: docArg
|
|
40402
|
+
providedDoc: docArg,
|
|
40403
|
+
planDirectory
|
|
39943
40404
|
});
|
|
39944
40405
|
if (!docPath) {
|
|
39945
40406
|
return;
|
|
39946
40407
|
}
|
|
39947
|
-
const
|
|
40408
|
+
const doc = await readRalphDoc(container, docPath);
|
|
40409
|
+
const agent2 = await resolveRunAgent({
|
|
39948
40410
|
program,
|
|
39949
|
-
providedAgent: options.agent
|
|
40411
|
+
providedAgent: options.agent,
|
|
40412
|
+
frontmatterAgent: doc.data.agent
|
|
39950
40413
|
});
|
|
39951
40414
|
if (!agent2) {
|
|
39952
40415
|
return;
|
|
39953
40416
|
}
|
|
39954
|
-
const maxIterations = await
|
|
40417
|
+
const maxIterations = await resolveRunIterations({
|
|
39955
40418
|
program,
|
|
39956
|
-
providedIterations:
|
|
40419
|
+
providedIterations: options.iterations,
|
|
40420
|
+
frontmatterIterations: doc.data.iterations
|
|
39957
40421
|
});
|
|
39958
40422
|
if (maxIterations == null) {
|
|
39959
40423
|
return;
|
|
39960
40424
|
}
|
|
39961
|
-
const maxFailures = parsePositiveInt(
|
|
39962
|
-
options.maxFailures,
|
|
39963
|
-
"max-failures"
|
|
39964
|
-
);
|
|
39965
40425
|
const result = await runRalph2({
|
|
39966
40426
|
agent: agent2,
|
|
39967
40427
|
cwd: container.env.cwd,
|
|
@@ -39969,34 +40429,14 @@ function registerRalphCommand(program, container) {
|
|
|
39969
40429
|
docPath,
|
|
39970
40430
|
maxIterations,
|
|
39971
40431
|
...options.model ? { model: options.model } : {},
|
|
39972
|
-
|
|
39973
|
-
|
|
39974
|
-
const selected = await select2({
|
|
39975
|
-
message: `Ralph hit ${input.consecutiveFailures} consecutive failures (threshold ${input.threshold}). What should happen next?`,
|
|
39976
|
-
options: [
|
|
39977
|
-
{ label: "Continue", value: "continue" },
|
|
39978
|
-
{ label: "Abort", value: "abort" }
|
|
39979
|
-
]
|
|
39980
|
-
});
|
|
39981
|
-
if (isCancel2(selected)) {
|
|
39982
|
-
cancel2("Ralph run cancelled.");
|
|
39983
|
-
return "abort";
|
|
39984
|
-
}
|
|
39985
|
-
return selected === "continue" ? "continue" : "abort";
|
|
39986
|
-
},
|
|
39987
|
-
onIterationStart(iteration, total) {
|
|
39988
|
-
resources.logger.info(`Iteration ${iteration}/${total}`);
|
|
40432
|
+
onIterationStart(iteration, total, currentAgent) {
|
|
40433
|
+
resources.logger.info(`Iteration ${iteration}/${total} (${currentAgent})`);
|
|
39989
40434
|
},
|
|
39990
40435
|
onIterationComplete(iteration, durationMs, success2) {
|
|
39991
40436
|
const status = success2 ? "done" : "failed";
|
|
39992
40437
|
resources.logger.info(
|
|
39993
40438
|
`Iteration ${iteration} ${status} in ${formatDuration2(durationMs)}`
|
|
39994
40439
|
);
|
|
39995
|
-
},
|
|
39996
|
-
onOverbakeWarning(consecutiveFailures, threshold) {
|
|
39997
|
-
resources.logger.warn(
|
|
39998
|
-
`Overbake protection triggered at ${consecutiveFailures} consecutive failures (threshold ${threshold}).`
|
|
39999
|
-
);
|
|
40000
40440
|
}
|
|
40001
40441
|
});
|
|
40002
40442
|
const summary = [
|
|
@@ -40010,12 +40450,6 @@ function registerRalphCommand(program, container) {
|
|
|
40010
40450
|
resources.logger.resolved("Run summary", summary);
|
|
40011
40451
|
return;
|
|
40012
40452
|
}
|
|
40013
|
-
if (result.stopReason === "overbake_abort") {
|
|
40014
|
-
process.exitCode = 1;
|
|
40015
|
-
resources.logger.warn("Ralph stopped after repeated failures.");
|
|
40016
|
-
resources.logger.resolved("Run summary", summary);
|
|
40017
|
-
return;
|
|
40018
|
-
}
|
|
40019
40453
|
resources.logger.resolved("Run summary", summary);
|
|
40020
40454
|
resources.logger.success("Ralph run finished.");
|
|
40021
40455
|
} finally {
|
|
@@ -40023,7 +40457,7 @@ function registerRalphCommand(program, container) {
|
|
|
40023
40457
|
}
|
|
40024
40458
|
});
|
|
40025
40459
|
}
|
|
40026
|
-
var DEFAULT_RALPH_AGENT;
|
|
40460
|
+
var DEFAULT_RALPH_AGENT, DEFAULT_RALPH_ITERATIONS;
|
|
40027
40461
|
var init_ralph3 = __esm({
|
|
40028
40462
|
async "src/cli/commands/ralph.ts"() {
|
|
40029
40463
|
"use strict";
|
|
@@ -40031,10 +40465,13 @@ var init_ralph3 = __esm({
|
|
|
40031
40465
|
init_src2();
|
|
40032
40466
|
init_src6();
|
|
40033
40467
|
init_src9();
|
|
40468
|
+
init_src4();
|
|
40469
|
+
init_config3();
|
|
40034
40470
|
init_errors();
|
|
40035
40471
|
init_shared();
|
|
40036
40472
|
await init_ralph2();
|
|
40037
40473
|
DEFAULT_RALPH_AGENT = "claude-code";
|
|
40474
|
+
DEFAULT_RALPH_ITERATIONS = 3;
|
|
40038
40475
|
}
|
|
40039
40476
|
});
|
|
40040
40477
|
|
|
@@ -40044,7 +40481,7 @@ var init_package = __esm({
|
|
|
40044
40481
|
"package.json"() {
|
|
40045
40482
|
package_default = {
|
|
40046
40483
|
name: "poe-code",
|
|
40047
|
-
version: "3.0.
|
|
40484
|
+
version: "3.0.116-beta.1",
|
|
40048
40485
|
description: "CLI tool to configure Poe API for developer workflows.",
|
|
40049
40486
|
type: "module",
|
|
40050
40487
|
main: "./dist/index.js",
|
|
@@ -40053,48 +40490,48 @@ var init_package = __esm({
|
|
|
40053
40490
|
"packages/*"
|
|
40054
40491
|
],
|
|
40055
40492
|
scripts: {
|
|
40056
|
-
build: "turbo run build && tsc -p tsconfig.build.json &&
|
|
40057
|
-
"build:deps": "
|
|
40058
|
-
predev: "turbo run build --output-logs=none --log-prefix=none --verbosity=0 > /dev/null 2>&1",
|
|
40059
|
-
dev: "
|
|
40060
|
-
start: "
|
|
40061
|
-
"dev:bundle": "
|
|
40493
|
+
build: "turbo run build && tsc -p tsconfig.build.json && bun scripts/generate-bin-wrappers.mjs && bun scripts/bundle.mjs",
|
|
40494
|
+
"build:deps": "bun scripts/list-workspace-deps.mjs",
|
|
40495
|
+
predev: "bunx turbo run build --output-logs=none --log-prefix=none --verbosity=0 > /dev/null 2>&1",
|
|
40496
|
+
dev: "bun run src/index.ts",
|
|
40497
|
+
start: "bun dist/bin.cjs",
|
|
40498
|
+
"dev:bundle": "bun run build && bun dist/bin.cjs",
|
|
40062
40499
|
test: "turbo run test:unit",
|
|
40063
|
-
"test:unit": "
|
|
40064
|
-
typecheck: "
|
|
40065
|
-
"check:semver": `
|
|
40066
|
-
lint: "
|
|
40500
|
+
"test:unit": "bun test",
|
|
40501
|
+
typecheck: "bun run lint:types",
|
|
40502
|
+
"check:semver": `bun -e "const semver=require('semver'); const pkg=require('./package.json'); if(!semver.valid(pkg.version)){console.error('Invalid semver version in package.json:', pkg.version); process.exit(1);}"`,
|
|
40503
|
+
lint: "bun run lint:eslint && bun run lint:types && bun run lint:workflows",
|
|
40067
40504
|
"lint:workflows": "(command -v actionlint > /dev/null || bash scripts/setup-actionlint.sh) && (command -v actionlint > /dev/null && actionlint || ./actionlint)",
|
|
40068
40505
|
"lint:eslint": "eslint . --ext ts",
|
|
40069
40506
|
"lint:types": "tsc -p tsconfig.build.json --noEmit",
|
|
40070
|
-
"labels:generate": "
|
|
40071
|
-
screenshot: "
|
|
40072
|
-
"screenshot-poe-code": "
|
|
40507
|
+
"labels:generate": "bun run scripts/generate-labels.ts",
|
|
40508
|
+
screenshot: "bun run scripts/screenshot.ts",
|
|
40509
|
+
"screenshot-poe-code": "bun run scripts/screenshot.ts --poe-code",
|
|
40073
40510
|
"generate:design-docs": "turbo run generate:docs --filter=@poe-code/design-system",
|
|
40074
40511
|
format: "prettier --check .",
|
|
40075
40512
|
"format:write": "prettier --write .",
|
|
40076
|
-
"watch:diff": "
|
|
40077
|
-
"test:integration": "
|
|
40078
|
-
"test:record": "POE_SNAPSHOT_MODE=record
|
|
40079
|
-
"test-generate": "
|
|
40080
|
-
snapshots: "
|
|
40081
|
-
"snapshots:list": "
|
|
40082
|
-
"snapshots:refresh": "
|
|
40083
|
-
"snapshots:delete": "
|
|
40084
|
-
"snapshots:list:stale": "
|
|
40085
|
-
"snapshots:delete:stale": "
|
|
40086
|
-
e2e: "
|
|
40087
|
-
"e2e:verbose": "E2E_VERBOSE=1
|
|
40088
|
-
"e2e:cleanup": "
|
|
40089
|
-
"e2e:cleanup:aggressive": "
|
|
40090
|
-
"e2e:logs": "
|
|
40091
|
-
"e2e:logs:rotate": "
|
|
40513
|
+
"watch:diff": "bun run local_scripts/watch-diff.ts",
|
|
40514
|
+
"test:integration": "bun test tests/integration/",
|
|
40515
|
+
"test:record": "POE_SNAPSHOT_MODE=record bun run test:integration",
|
|
40516
|
+
"test-generate": "bun run scripts/test-generate.ts",
|
|
40517
|
+
snapshots: "bun run scripts/snapshots.ts",
|
|
40518
|
+
"snapshots:list": "bun run snapshots -- list",
|
|
40519
|
+
"snapshots:refresh": "bun run snapshots -- refresh",
|
|
40520
|
+
"snapshots:delete": "bun run snapshots -- delete",
|
|
40521
|
+
"snapshots:list:stale": "bun run snapshots -- list --stale",
|
|
40522
|
+
"snapshots:delete:stale": "bun run snapshots -- delete --stale",
|
|
40523
|
+
e2e: "bun test --cwd e2e --max-concurrency 1 --timeout 600000",
|
|
40524
|
+
"e2e:verbose": "E2E_VERBOSE=1 bun test --cwd e2e --max-concurrency 1 --timeout 600000 --verbose",
|
|
40525
|
+
"e2e:cleanup": "bun run packages/e2e-docker-test-runner/scripts/cleanup.ts",
|
|
40526
|
+
"e2e:cleanup:aggressive": "bun run packages/e2e-docker-test-runner/scripts/cleanup.ts --aggressive",
|
|
40527
|
+
"e2e:logs": "bun run packages/e2e-docker-test-runner/scripts/logs.ts",
|
|
40528
|
+
"e2e:logs:rotate": "bun run packages/e2e-docker-test-runner/scripts/logs.ts --rotate",
|
|
40092
40529
|
"e2e:cache:clear": "rm -rf ~/.cache/poe-e2e",
|
|
40093
|
-
prepack: "
|
|
40530
|
+
prepack: "bun run build",
|
|
40094
40531
|
prepare: "husky",
|
|
40095
|
-
"install-local-package": "
|
|
40096
|
-
smoke: "
|
|
40097
|
-
"smoke:verbose": "
|
|
40532
|
+
"install-local-package": "bun pm pack --destination /tmp --quiet && bun install --global /tmp/poe-code-*.tgz && rm /tmp/poe-code-*.tgz",
|
|
40533
|
+
smoke: "bun run scripts/smoke-test.ts",
|
|
40534
|
+
"smoke:verbose": "bun run scripts/smoke-test.ts --verbose"
|
|
40098
40535
|
},
|
|
40099
40536
|
bin: {
|
|
40100
40537
|
"poe-code": "dist/bin.cjs",
|
|
@@ -40109,9 +40546,9 @@ var init_package = __esm({
|
|
|
40109
40546
|
"dist"
|
|
40110
40547
|
],
|
|
40111
40548
|
engines: {
|
|
40112
|
-
|
|
40549
|
+
bun: ">=1.3.0"
|
|
40113
40550
|
},
|
|
40114
|
-
packageManager: "
|
|
40551
|
+
packageManager: "bun@1.3.11",
|
|
40115
40552
|
dependencies: {
|
|
40116
40553
|
"@clack/prompts": "^1.0.0",
|
|
40117
40554
|
chalk: "^5.6.2",
|
|
@@ -40128,8 +40565,6 @@ var init_package = __esm({
|
|
|
40128
40565
|
devDependencies: {
|
|
40129
40566
|
"@eslint/js": "^9.0.0",
|
|
40130
40567
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
40131
|
-
"auth-store": "*",
|
|
40132
|
-
"poe-oauth": "*",
|
|
40133
40568
|
"@poe-code/agent-spawn": "*",
|
|
40134
40569
|
"@poe-code/config-mutations": "*",
|
|
40135
40570
|
"@poe-code/design-system": "*",
|
|
@@ -40139,22 +40574,24 @@ var init_package = __esm({
|
|
|
40139
40574
|
"@poe-code/poe-acp-client": "*",
|
|
40140
40575
|
"@poe-code/poe-code-config": "*",
|
|
40141
40576
|
"@poe-code/ralph": "*",
|
|
40577
|
+
"@types/bun": "latest",
|
|
40142
40578
|
"@types/mustache": "^4.2.6",
|
|
40143
40579
|
"@types/node": "^25.2.2",
|
|
40144
40580
|
"@types/semver": "^7.7.1",
|
|
40581
|
+
"auth-store": "*",
|
|
40582
|
+
esbuild: "^0.27.4",
|
|
40145
40583
|
eslint: "^9.0.0",
|
|
40146
40584
|
"eslint-config-prettier": "^10.1.8",
|
|
40147
40585
|
globals: "^17.3.0",
|
|
40148
40586
|
husky: "^9.1.7",
|
|
40149
40587
|
memfs: "^4.56.10",
|
|
40588
|
+
"poe-oauth": "*",
|
|
40150
40589
|
prettier: "^3.8.1",
|
|
40151
40590
|
"tiny-stdio-mcp-server": "*",
|
|
40152
40591
|
"tiny-stdio-mcp-test-server": "*",
|
|
40153
|
-
tsx: ">=4.21.0",
|
|
40154
40592
|
turbo: "^2.8.3",
|
|
40155
40593
|
typescript: "^5.9.3",
|
|
40156
|
-
"typescript-eslint": "^8.54.0"
|
|
40157
|
-
vitest: "^4.0.18"
|
|
40594
|
+
"typescript-eslint": "^8.54.0"
|
|
40158
40595
|
},
|
|
40159
40596
|
repository: {
|
|
40160
40597
|
type: "git",
|
|
@@ -40262,9 +40699,14 @@ function formatHelpText(input) {
|
|
|
40262
40699
|
args: "",
|
|
40263
40700
|
description: "Run a fixed-step task pipeline plan"
|
|
40264
40701
|
},
|
|
40702
|
+
{
|
|
40703
|
+
name: "ralph init",
|
|
40704
|
+
args: "[doc]",
|
|
40705
|
+
description: "Write Ralph config into a markdown doc frontmatter"
|
|
40706
|
+
},
|
|
40265
40707
|
{
|
|
40266
40708
|
name: "ralph run",
|
|
40267
|
-
args: "[
|
|
40709
|
+
args: "[doc]",
|
|
40268
40710
|
description: "Run a markdown doc through repeated agent iterations"
|
|
40269
40711
|
},
|
|
40270
40712
|
{
|
|
@@ -40529,7 +40971,7 @@ function resolveSelectInitial(descriptor) {
|
|
|
40529
40971
|
return descriptor.initial;
|
|
40530
40972
|
}
|
|
40531
40973
|
function createPromptRunner(adapter = {
|
|
40532
|
-
text:
|
|
40974
|
+
text: promptText,
|
|
40533
40975
|
password: password2,
|
|
40534
40976
|
select: select2,
|
|
40535
40977
|
isCancel: isCancel2,
|
|
@@ -40869,7 +41311,7 @@ function createPoeAgentProgram() {
|
|
|
40869
41311
|
program.name("poe-agent").description("Run a single prompt through the Poe agent runtime.").version("0.0.0").option("--model <model>", "Model identifier override").option("-C, --cwd <path>", "Working directory for the agent").option("--stdin", "Read the prompt from stdin").option(
|
|
40870
41312
|
"--mcp-config <json>",
|
|
40871
41313
|
"MCP server config JSON: {name: {command, args?, env?}}"
|
|
40872
|
-
).argument("[prompt]", "Prompt text to send (or '-' / stdin)").argument("[args...]", "Additional arguments forwarded to the agent").action(async function(
|
|
41314
|
+
).argument("[prompt]", "Prompt text to send (or '-' / stdin)").argument("[args...]", "Additional arguments forwarded to the agent").action(async function(promptText2, _args = []) {
|
|
40873
41315
|
const commandOptions = this.opts();
|
|
40874
41316
|
const mcpServers = parseMcpSpawnConfig(commandOptions.mcpConfig);
|
|
40875
41317
|
const cwdOverride = resolveWorkingDirectory(
|
|
@@ -40877,23 +41319,23 @@ function createPoeAgentProgram() {
|
|
|
40877
41319
|
commandOptions.cwd
|
|
40878
41320
|
);
|
|
40879
41321
|
const wantsStdinFlag = commandOptions.stdin === true;
|
|
40880
|
-
const shouldReadFromStdin = wantsStdinFlag ||
|
|
40881
|
-
if (wantsStdinFlag ||
|
|
40882
|
-
|
|
41322
|
+
const shouldReadFromStdin = wantsStdinFlag || promptText2 === "-" || !promptText2 && !process.stdin.isTTY;
|
|
41323
|
+
if (wantsStdinFlag || promptText2 === "-") {
|
|
41324
|
+
promptText2 = void 0;
|
|
40883
41325
|
}
|
|
40884
|
-
if (!
|
|
41326
|
+
if (!promptText2 && shouldReadFromStdin) {
|
|
40885
41327
|
const chunks = [];
|
|
40886
41328
|
for await (const chunk of process.stdin) {
|
|
40887
41329
|
chunks.push(chunk);
|
|
40888
41330
|
}
|
|
40889
|
-
|
|
41331
|
+
promptText2 = Buffer.concat(chunks).toString("utf8").trim();
|
|
40890
41332
|
}
|
|
40891
|
-
if (!
|
|
41333
|
+
if (!promptText2) {
|
|
40892
41334
|
throw new ValidationError("No prompt provided via argument or stdin");
|
|
40893
41335
|
}
|
|
40894
41336
|
const { spawnPoeAgentWithAcp: spawnPoeAgentWithAcp2 } = await Promise.resolve().then(() => (init_poe_agent(), poe_agent_exports));
|
|
40895
41337
|
const { events, done } = spawnPoeAgentWithAcp2({
|
|
40896
|
-
prompt:
|
|
41338
|
+
prompt: promptText2,
|
|
40897
41339
|
model: commandOptions.model ?? DEFAULT_FRONTIER_MODEL,
|
|
40898
41340
|
cwd: cwdOverride ?? process.cwd(),
|
|
40899
41341
|
mcpServers
|