poe-code 3.0.326 → 3.0.328
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/dist/cli/commands/decimal-integer.d.ts +1 -0
- package/dist/cli/commands/decimal-integer.js +13 -0
- package/dist/cli/commands/decimal-integer.js.map +1 -0
- package/dist/cli/commands/launch.js +7 -4
- package/dist/cli/commands/launch.js.map +1 -1
- package/dist/cli/commands/ralph.js +4 -2
- package/dist/cli/commands/ralph.js.map +1 -1
- package/dist/cli/commands/spawn.js +4 -2
- package/dist/cli/commands/spawn.js.map +1 -1
- package/dist/cli/commands/tasks-options.js +5 -2
- package/dist/cli/commands/tasks-options.js.map +1 -1
- package/dist/cli/commands/usage.js +2 -2
- package/dist/cli/commands/usage.js.map +1 -1
- package/dist/index.js +42 -13
- package/dist/index.js.map +3 -3
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -93061,6 +93061,25 @@ var init_runtime_options = __esm({
|
|
|
93061
93061
|
}
|
|
93062
93062
|
});
|
|
93063
93063
|
|
|
93064
|
+
// src/cli/commands/decimal-integer.ts
|
|
93065
|
+
function isDecimalIntegerLiteral(value) {
|
|
93066
|
+
if (value.length === 0) {
|
|
93067
|
+
return false;
|
|
93068
|
+
}
|
|
93069
|
+
for (const character of value) {
|
|
93070
|
+
const codePoint = character.charCodeAt(0);
|
|
93071
|
+
if (codePoint < 48 || codePoint > 57) {
|
|
93072
|
+
return false;
|
|
93073
|
+
}
|
|
93074
|
+
}
|
|
93075
|
+
return true;
|
|
93076
|
+
}
|
|
93077
|
+
var init_decimal_integer = __esm({
|
|
93078
|
+
"src/cli/commands/decimal-integer.ts"() {
|
|
93079
|
+
"use strict";
|
|
93080
|
+
}
|
|
93081
|
+
});
|
|
93082
|
+
|
|
93064
93083
|
// src/cli/commands/spawn.ts
|
|
93065
93084
|
import path145 from "node:path";
|
|
93066
93085
|
import { Option as Option3 } from "commander";
|
|
@@ -93616,8 +93635,9 @@ Agents with spawn-time MCP support: ${supported.join(", ")}`
|
|
|
93616
93635
|
);
|
|
93617
93636
|
}
|
|
93618
93637
|
function parsePositiveInt(value, fieldName) {
|
|
93619
|
-
const
|
|
93620
|
-
|
|
93638
|
+
const normalized = value.trim();
|
|
93639
|
+
const parsed = Number.parseInt(normalized, 10);
|
|
93640
|
+
if (!isDecimalIntegerLiteral(normalized) || !Number.isInteger(parsed) || parsed < 1) {
|
|
93621
93641
|
throw new ValidationError(`Invalid ${fieldName} "${value}". Expected a positive integer.`);
|
|
93622
93642
|
}
|
|
93623
93643
|
return parsed;
|
|
@@ -93700,6 +93720,7 @@ var init_spawn6 = __esm({
|
|
|
93700
93720
|
init_errors();
|
|
93701
93721
|
init_resolve_spawn_workspace();
|
|
93702
93722
|
init_runtime_options();
|
|
93723
|
+
init_decimal_integer();
|
|
93703
93724
|
SPAWN_MODES2 = ["yolo", "auto", "edit", "read"];
|
|
93704
93725
|
}
|
|
93705
93726
|
});
|
|
@@ -97033,7 +97054,7 @@ function registerUsageCommand(program, container) {
|
|
|
97033
97054
|
dryRun: false
|
|
97034
97055
|
});
|
|
97035
97056
|
const theme = getTheme();
|
|
97036
|
-
const filterTerm = commandOptions.filter;
|
|
97057
|
+
const filterTerm = commandOptions.filter?.trim();
|
|
97037
97058
|
const tzAbbr = Intl.DateTimeFormat("en-US", { timeZoneName: "short" }).formatToParts(/* @__PURE__ */ new Date()).find((p) => p.type === "timeZoneName")?.value ?? "local";
|
|
97038
97059
|
const dateTitle = `Date [${tzAbbr}]`;
|
|
97039
97060
|
const dateWidth = Math.max(16, dateTitle.length);
|
|
@@ -97085,7 +97106,7 @@ function registerUsageCommand(program, container) {
|
|
|
97085
97106
|
while (true) {
|
|
97086
97107
|
let url = `${container.env.poeBaseUrl}/usage/points_history?limit=20`;
|
|
97087
97108
|
if (startingAfter) {
|
|
97088
|
-
url += `&starting_after=${startingAfter}`;
|
|
97109
|
+
url += `&starting_after=${encodeURIComponent(startingAfter)}`;
|
|
97089
97110
|
}
|
|
97090
97111
|
const result = await withSpinner({
|
|
97091
97112
|
message: `Fetching usage history page ${pagesLoaded + 1}...`,
|
|
@@ -98975,8 +98996,9 @@ function parsePositiveInt2(value, fieldName) {
|
|
|
98975
98996
|
if (value == null) {
|
|
98976
98997
|
return void 0;
|
|
98977
98998
|
}
|
|
98978
|
-
const
|
|
98979
|
-
|
|
98999
|
+
const normalized = value.trim();
|
|
99000
|
+
const parsed = Number.parseInt(normalized, 10);
|
|
99001
|
+
if (!isDecimalIntegerLiteral(normalized) || !Number.isFinite(parsed) || parsed < 1) {
|
|
98980
99002
|
throw new ValidationError(`Invalid ${fieldName} "${value}". Expected a positive integer.`);
|
|
98981
99003
|
}
|
|
98982
99004
|
return parsed;
|
|
@@ -99433,6 +99455,7 @@ var init_ralph4 = __esm({
|
|
|
99433
99455
|
init_config5();
|
|
99434
99456
|
init_errors();
|
|
99435
99457
|
init_shared();
|
|
99458
|
+
init_decimal_integer();
|
|
99436
99459
|
init_error_codes17();
|
|
99437
99460
|
await init_ralph3();
|
|
99438
99461
|
await init_spawn5();
|
|
@@ -100802,8 +100825,9 @@ function parsePositiveInt3(value, fieldName) {
|
|
|
100802
100825
|
if (value == null) {
|
|
100803
100826
|
return void 0;
|
|
100804
100827
|
}
|
|
100805
|
-
const
|
|
100806
|
-
|
|
100828
|
+
const normalized = value.trim();
|
|
100829
|
+
const parsed = Number.parseInt(normalized, 10);
|
|
100830
|
+
if (!isDecimalIntegerLiteral(normalized) || !Number.isInteger(parsed) || parsed < 1) {
|
|
100807
100831
|
throw new ValidationError(`Invalid ${fieldName} "${value}". Expected a positive integer.`);
|
|
100808
100832
|
}
|
|
100809
100833
|
return parsed;
|
|
@@ -100819,8 +100843,9 @@ function parseNonNegativeInt3(value, fieldName) {
|
|
|
100819
100843
|
if (value == null) {
|
|
100820
100844
|
return void 0;
|
|
100821
100845
|
}
|
|
100822
|
-
const
|
|
100823
|
-
|
|
100846
|
+
const normalized = value.trim();
|
|
100847
|
+
const parsed = Number.parseInt(normalized, 10);
|
|
100848
|
+
if (!isDecimalIntegerLiteral(normalized) || !Number.isInteger(parsed) || parsed < 0) {
|
|
100824
100849
|
throw new ValidationError(`Invalid ${fieldName} "${value}". Expected a non-negative integer.`);
|
|
100825
100850
|
}
|
|
100826
100851
|
return parsed;
|
|
@@ -100833,6 +100858,7 @@ var init_launch2 = __esm({
|
|
|
100833
100858
|
"use strict";
|
|
100834
100859
|
init_src2();
|
|
100835
100860
|
init_shared();
|
|
100861
|
+
init_decimal_integer();
|
|
100836
100862
|
init_errors();
|
|
100837
100863
|
init_launch();
|
|
100838
100864
|
}
|
|
@@ -136946,8 +136972,10 @@ function createAnyToAnyStateMachine(states) {
|
|
|
136946
136972
|
}
|
|
136947
136973
|
function parseProject(value) {
|
|
136948
136974
|
const [owner, rawNumber, extra] = value?.split("/") ?? [];
|
|
136949
|
-
const
|
|
136950
|
-
|
|
136975
|
+
const normalizedNumber = rawNumber?.trim();
|
|
136976
|
+
const hasValidNumber = normalizedNumber !== void 0 && isDecimalIntegerLiteral(normalizedNumber);
|
|
136977
|
+
const number = hasValidNumber ? Number.parseInt(normalizedNumber, 10) : NaN;
|
|
136978
|
+
if (value === void 0 || owner === void 0 || owner.trim().length === 0 || rawNumber === void 0 || !hasValidNumber || extra !== void 0 || !Number.isInteger(number)) {
|
|
136951
136979
|
throw new TasksOptionsError(
|
|
136952
136980
|
"invalid_project",
|
|
136953
136981
|
'Expected project to use "<owner>/<number>" format.'
|
|
@@ -137111,6 +137139,7 @@ var init_tasks_options = __esm({
|
|
|
137111
137139
|
"use strict";
|
|
137112
137140
|
init_src40();
|
|
137113
137141
|
init_error_codes17();
|
|
137142
|
+
init_decimal_integer();
|
|
137114
137143
|
DEFAULT_WORKFLOW_PATH = "./WORKFLOW.md";
|
|
137115
137144
|
MAESTRO_TASK_STATE_MACHINE_STATES = [
|
|
137116
137145
|
"queued",
|
|
@@ -137953,7 +137982,7 @@ var init_package2 = __esm({
|
|
|
137953
137982
|
"package.json"() {
|
|
137954
137983
|
package_default2 = {
|
|
137955
137984
|
name: "poe-code",
|
|
137956
|
-
version: "3.0.
|
|
137985
|
+
version: "3.0.328",
|
|
137957
137986
|
description: "CLI tool to configure Poe API for developer workflows.",
|
|
137958
137987
|
type: "module",
|
|
137959
137988
|
main: "./dist/index.js",
|