poe-code 3.0.296 → 3.0.297
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/index.js +18 -7
- package/dist/index.js.map +3 -3
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/agent-traces/dist/collect.js +13 -2
- package/packages/agent-traces/dist/line-json.js +2 -1
- package/packages/agent-traces/dist/readers/claude.js +1 -1
- package/packages/agent-traces/dist/readers/codex.js +2 -2
package/dist/index.js
CHANGED
|
@@ -76840,7 +76840,8 @@ function asRecord4(value) {
|
|
|
76840
76840
|
function parseDate(value) {
|
|
76841
76841
|
if (typeof value === "number" && Number.isFinite(value)) {
|
|
76842
76842
|
const milliseconds = value > 1e10 ? value : value * 1e3;
|
|
76843
|
-
|
|
76843
|
+
const date2 = new Date(milliseconds);
|
|
76844
|
+
return Number.isNaN(date2.getTime()) ? void 0 : date2;
|
|
76844
76845
|
}
|
|
76845
76846
|
if (typeof value !== "string" || value.trim().length === 0) {
|
|
76846
76847
|
return void 0;
|
|
@@ -76862,7 +76863,7 @@ var init_line_json = __esm({
|
|
|
76862
76863
|
// packages/agent-traces/src/readers/claude.ts
|
|
76863
76864
|
import path111 from "node:path";
|
|
76864
76865
|
function isMissingFile2(error3) {
|
|
76865
|
-
return typeof error3 === "object" && error3 !== null && "code"
|
|
76866
|
+
return typeof error3 === "object" && error3 !== null && Object.prototype.hasOwnProperty.call(error3, "code") && error3.code === "ENOENT";
|
|
76866
76867
|
}
|
|
76867
76868
|
function encodeClaudeProjectPath(cwd) {
|
|
76868
76869
|
return cwd.split(path111.sep).join("-");
|
|
@@ -77046,7 +77047,7 @@ var init_claude2 = __esm({
|
|
|
77046
77047
|
// packages/agent-traces/src/readers/codex.ts
|
|
77047
77048
|
import path112 from "node:path";
|
|
77048
77049
|
function isMissingFile3(error3) {
|
|
77049
|
-
return typeof error3 === "object" && error3 !== null && "code"
|
|
77050
|
+
return typeof error3 === "object" && error3 !== null && Object.prototype.hasOwnProperty.call(error3, "code") && error3.code === "ENOENT";
|
|
77050
77051
|
}
|
|
77051
77052
|
async function importNodeSqlite() {
|
|
77052
77053
|
const emitWarning = process.emitWarning;
|
|
@@ -77077,7 +77078,7 @@ async function defaultSqliteFactory(databasePath) {
|
|
|
77077
77078
|
}
|
|
77078
77079
|
function dateFromRow(seconds, milliseconds) {
|
|
77079
77080
|
if (typeof milliseconds === "number" && Number.isFinite(milliseconds)) {
|
|
77080
|
-
return
|
|
77081
|
+
return parseDate(milliseconds);
|
|
77081
77082
|
}
|
|
77082
77083
|
return parseDate(seconds);
|
|
77083
77084
|
}
|
|
@@ -77317,9 +77318,18 @@ function removeContextTags(text5) {
|
|
|
77317
77318
|
return result;
|
|
77318
77319
|
}
|
|
77319
77320
|
function recordKey(record) {
|
|
77320
|
-
return [record.source, record.traceId, record.text].join("\0");
|
|
77321
|
+
return [record.source, record.traceId, record.timestamp ?? "", record.text].join("\0");
|
|
77322
|
+
}
|
|
77323
|
+
function isValidDate(date) {
|
|
77324
|
+
return Number.isFinite(date.getTime());
|
|
77321
77325
|
}
|
|
77322
77326
|
async function collectHumanPromptsFromReaders(readers, options = {}) {
|
|
77327
|
+
if (options.since !== void 0 && !isValidDate(options.since)) {
|
|
77328
|
+
throw new Error("since must be a valid Date.");
|
|
77329
|
+
}
|
|
77330
|
+
if (options.limit !== void 0 && (!Number.isInteger(options.limit) || options.limit < 0 || !Number.isFinite(options.limit))) {
|
|
77331
|
+
throw new Error("limit must be a non-negative integer.");
|
|
77332
|
+
}
|
|
77323
77333
|
const sources = options.sources ?? DEFAULT_SOURCES;
|
|
77324
77334
|
const readerById = new Map(readers.map((reader) => [reader.id, reader]));
|
|
77325
77335
|
const fs28 = options.fs ?? nodeFs12;
|
|
@@ -77358,12 +77368,13 @@ async function collectHumanPromptsFromReaders(readers, options = {}) {
|
|
|
77358
77368
|
if (isInjectedContext(text5)) {
|
|
77359
77369
|
continue;
|
|
77360
77370
|
}
|
|
77371
|
+
const timestamp = turn.timestamp && isValidDate(turn.timestamp) ? turn.timestamp.toISOString() : void 0;
|
|
77361
77372
|
const record = {
|
|
77362
77373
|
traceId: trace.id,
|
|
77363
77374
|
source: trace.source,
|
|
77364
77375
|
...trace.cwd ? { cwd: trace.cwd } : {},
|
|
77365
77376
|
...trace.title ? { title: trace.title } : {},
|
|
77366
|
-
...
|
|
77377
|
+
...timestamp ? { timestamp } : {},
|
|
77367
77378
|
text: text5
|
|
77368
77379
|
};
|
|
77369
77380
|
const key2 = recordKey(record);
|
|
@@ -136860,7 +136871,7 @@ var init_package2 = __esm({
|
|
|
136860
136871
|
"package.json"() {
|
|
136861
136872
|
package_default2 = {
|
|
136862
136873
|
name: "poe-code",
|
|
136863
|
-
version: "3.0.
|
|
136874
|
+
version: "3.0.297",
|
|
136864
136875
|
description: "CLI tool to configure Poe API for developer workflows.",
|
|
136865
136876
|
type: "module",
|
|
136866
136877
|
main: "./dist/index.js",
|