deepline 0.3.64 → 0.3.66
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/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +999 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +354 -37
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +7 -0
- package/dist/bundling-sources/shared_libs/play-runtime/log-provenance.ts +80 -3
- package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-batching-registry.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/test-async-batching.ts +141 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +57 -10
- package/dist/cli/index.js +81 -20
- package/dist/cli/index.mjs +81 -20
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/install-integrity.json +2 -0
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
|
@@ -1199,7 +1199,7 @@ var SDK_RELEASE = {
|
|
|
1199
1199
|
// available at toolResponse.rawV2 while toolResponse.raw and all declared
|
|
1200
1200
|
// getters keep their established compatibility behavior.
|
|
1201
1201
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
1202
|
-
version: "0.3.
|
|
1202
|
+
version: "0.3.66",
|
|
1203
1203
|
updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
|
|
1204
1204
|
packageCapabilities: {
|
|
1205
1205
|
updatePreferences: 1
|
|
@@ -16820,9 +16820,7 @@ function readProvenanceTag(line) {
|
|
|
16820
16820
|
return { provenance: null, line };
|
|
16821
16821
|
}
|
|
16822
16822
|
const candidate = line.slice(PROVENANCE_PREFIX.length, end);
|
|
16823
|
-
const provenance = LOG_PROVENANCE_CLASSES.includes(
|
|
16824
|
-
candidate
|
|
16825
|
-
) ? candidate : null;
|
|
16823
|
+
const provenance = LOG_PROVENANCE_CLASSES.includes(candidate) ? candidate : null;
|
|
16826
16824
|
return { provenance, line: line.slice(end + 1) };
|
|
16827
16825
|
}
|
|
16828
16826
|
function classifyLegacyLogLine(line) {
|
|
@@ -17156,12 +17154,16 @@ var PLAY_RUN_RESERVED_BOOLEAN_FLAGS = /* @__PURE__ */ new Set([
|
|
|
17156
17154
|
"--watch",
|
|
17157
17155
|
"--no-wait",
|
|
17158
17156
|
"--logs",
|
|
17157
|
+
"--debug",
|
|
17159
17158
|
"--full",
|
|
17160
17159
|
"--force",
|
|
17161
17160
|
"--force-tool-refresh",
|
|
17162
17161
|
"--open",
|
|
17163
17162
|
"--debug-map-latency"
|
|
17164
17163
|
]);
|
|
17164
|
+
function isBarePlayRunDebugFlag(args, index) {
|
|
17165
|
+
return args[index] === "--debug" && (args[index + 1] === void 0 || args[index + 1].startsWith("--"));
|
|
17166
|
+
}
|
|
17165
17167
|
async function pathExistsIncludingSymlink(path) {
|
|
17166
17168
|
try {
|
|
17167
17169
|
await lstat(path);
|
|
@@ -21119,12 +21121,13 @@ function parsePlayRunOptions(args) {
|
|
|
21119
21121
|
const watch = !args.includes("--no-wait");
|
|
21120
21122
|
let jsonOutput = watch ? args.includes("--json") : argsWantJson(args);
|
|
21121
21123
|
const fullJson = args.includes("--full");
|
|
21122
|
-
const
|
|
21124
|
+
const explicitDebugLogs = args.includes("--logs") || args.some((_, index) => isBarePlayRunDebugFlag(args, index));
|
|
21125
|
+
const emitLogs = !jsonOutput || explicitDebugLogs;
|
|
21123
21126
|
const force = args.includes("--force");
|
|
21124
21127
|
const forceToolRefresh = args.includes("--force-tool-refresh");
|
|
21125
21128
|
const open2 = args.includes("--open");
|
|
21126
21129
|
const debugMapLatency = args.includes("--debug-map-latency");
|
|
21127
|
-
const verboseLogs =
|
|
21130
|
+
const verboseLogs = explicitDebugLogs || debugMapLatency;
|
|
21128
21131
|
let waitTimeoutMs = null;
|
|
21129
21132
|
let maxConcurrentExternalCalls = null;
|
|
21130
21133
|
let maxConcurrentRows = null;
|
|
@@ -21255,6 +21258,20 @@ function parsePlayRunOptions(args) {
|
|
|
21255
21258
|
waitTimeoutMs = parsePositiveInteger3(args[++index], arg);
|
|
21256
21259
|
continue;
|
|
21257
21260
|
}
|
|
21261
|
+
if (arg === "--debug" && args[index + 1] && !args[index + 1].startsWith("--")) {
|
|
21262
|
+
input2 ??= {};
|
|
21263
|
+
setDottedInputValue(input2, "debug", parseInputFlagValue(args[++index]));
|
|
21264
|
+
continue;
|
|
21265
|
+
}
|
|
21266
|
+
if (arg.startsWith("--debug=")) {
|
|
21267
|
+
input2 ??= {};
|
|
21268
|
+
setDottedInputValue(
|
|
21269
|
+
input2,
|
|
21270
|
+
"debug",
|
|
21271
|
+
parseInputFlagValue(arg.slice("--debug=".length))
|
|
21272
|
+
);
|
|
21273
|
+
continue;
|
|
21274
|
+
}
|
|
21258
21275
|
if (PLAY_RUN_RESERVED_BOOLEAN_FLAGS.has(arg)) {
|
|
21259
21276
|
if (arg === "--watch") {
|
|
21260
21277
|
continue;
|
|
@@ -22513,7 +22530,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
22513
22530
|
function parseRunIdPositional(args, usage) {
|
|
22514
22531
|
for (let index = 0; index < args.length; index += 1) {
|
|
22515
22532
|
const arg = args[index];
|
|
22516
|
-
if (arg === "--json" || arg === "--full" || arg === "--input" || arg === "--logs" || arg === "--compact" || arg === "--log-failed" || arg === "--failed" || arg === "--limit") {
|
|
22533
|
+
if (arg === "--json" || arg === "--full" || arg === "--input" || arg === "--logs" || arg === "--debug" || arg === "--compact" || arg === "--log-failed" || arg === "--failed" || arg === "--limit") {
|
|
22517
22534
|
if (arg === "--limit" && args[index + 1]) {
|
|
22518
22535
|
index += 1;
|
|
22519
22536
|
}
|
|
@@ -22661,7 +22678,7 @@ async function handleRunsList(args) {
|
|
|
22661
22678
|
return 0;
|
|
22662
22679
|
}
|
|
22663
22680
|
async function handleRunTail(args) {
|
|
22664
|
-
const usage = "Usage: deepline runs tail <run-id> [--json | --jsonl] [--compact]";
|
|
22681
|
+
const usage = "Usage: deepline runs tail <run-id> [--json | --jsonl] [--compact] [--debug]";
|
|
22665
22682
|
let runId;
|
|
22666
22683
|
try {
|
|
22667
22684
|
runId = parseRunIdPositional(args, usage);
|
|
@@ -22677,7 +22694,7 @@ async function handleRunTail(args) {
|
|
|
22677
22694
|
);
|
|
22678
22695
|
return 1;
|
|
22679
22696
|
}
|
|
22680
|
-
if (arg.startsWith("--") && arg !== "--json" && arg !== "--jsonl" && arg !== "--compact") {
|
|
22697
|
+
if (arg.startsWith("--") && arg !== "--json" && arg !== "--jsonl" && arg !== "--compact" && arg !== "--logs" && arg !== "--debug") {
|
|
22681
22698
|
console.error(`${arg} is not supported by deepline runs tail.`);
|
|
22682
22699
|
return 1;
|
|
22683
22700
|
}
|
|
@@ -22686,6 +22703,13 @@ async function handleRunTail(args) {
|
|
|
22686
22703
|
console.error("--json and --jsonl cannot be used together.");
|
|
22687
22704
|
return 1;
|
|
22688
22705
|
}
|
|
22706
|
+
const debug = args.includes("--logs") || args.includes("--debug");
|
|
22707
|
+
if (args.includes("--jsonl") && debug) {
|
|
22708
|
+
console.error(
|
|
22709
|
+
"--debug is redundant with --jsonl: JSON Lines already includes every canonical live event."
|
|
22710
|
+
);
|
|
22711
|
+
return 1;
|
|
22712
|
+
}
|
|
22689
22713
|
const client2 = new DeeplineClient();
|
|
22690
22714
|
const jsonLines = args.includes("--jsonl");
|
|
22691
22715
|
const jsonOutput = !jsonLines && argsWantJson(args);
|
|
@@ -22695,7 +22719,8 @@ async function handleRunTail(args) {
|
|
|
22695
22719
|
emittedRunnerStarted: false,
|
|
22696
22720
|
lastProgressSignature: null,
|
|
22697
22721
|
lastProgressHeartbeatAt: 0,
|
|
22698
|
-
lastStatusHeartbeatAt: 0
|
|
22722
|
+
lastStatusHeartbeatAt: 0,
|
|
22723
|
+
verbose: debug
|
|
22699
22724
|
};
|
|
22700
22725
|
const status = await client2.runs.tail(runId, {
|
|
22701
22726
|
onEvent: jsonLines ? (event) => {
|
|
@@ -22707,7 +22732,20 @@ async function handleRunTail(args) {
|
|
|
22707
22732
|
})}
|
|
22708
22733
|
`
|
|
22709
22734
|
);
|
|
22710
|
-
} : compact
|
|
22735
|
+
} : compact || debug ? (event) => {
|
|
22736
|
+
if (debug) {
|
|
22737
|
+
for (const line of getLogLinesFromLiveEvent(event)) {
|
|
22738
|
+
const formatted = formatPlayLogLine(
|
|
22739
|
+
line,
|
|
22740
|
+
void 0,
|
|
22741
|
+
compactState
|
|
22742
|
+
);
|
|
22743
|
+
if (formatted) process.stderr.write(`${formatted}
|
|
22744
|
+
`);
|
|
22745
|
+
compactState.lastLogIndex += 1;
|
|
22746
|
+
}
|
|
22747
|
+
}
|
|
22748
|
+
if (!compact || jsonOutput) return;
|
|
22711
22749
|
const transition = getStepTransitionLineFromLiveEvent(
|
|
22712
22750
|
event,
|
|
22713
22751
|
compactState
|
|
@@ -22730,7 +22768,7 @@ async function handleRunTail(args) {
|
|
|
22730
22768
|
}
|
|
22731
22769
|
} : void 0,
|
|
22732
22770
|
// Human mode only: in --json mode emit nothing non-protocol.
|
|
22733
|
-
onReconnect: jsonOutput ? void 0 : ({ reason }) => {
|
|
22771
|
+
onReconnect: jsonOutput && !debug ? void 0 : ({ reason }) => {
|
|
22734
22772
|
process.stderr.write(
|
|
22735
22773
|
`[runs tail] stream ended without a terminal status; reconnecting to run ${runId} (${reason})
|
|
22736
22774
|
`
|
|
@@ -22746,7 +22784,7 @@ async function handleRunTail(args) {
|
|
|
22746
22784
|
return status.status === "failed" ? 1 : 0;
|
|
22747
22785
|
}
|
|
22748
22786
|
async function handleRunLogs(args) {
|
|
22749
|
-
const usage = "Usage: deepline runs logs <run-id> [--limit 200] [--failed] [--out run.log] [--json]";
|
|
22787
|
+
const usage = "Usage: deepline runs logs <run-id> [--limit 200] [--failed] [--out run.log] [--json] [--debug]";
|
|
22750
22788
|
let runId;
|
|
22751
22789
|
try {
|
|
22752
22790
|
runId = parseRunIdPositional(args, usage);
|
|
@@ -22759,12 +22797,20 @@ async function handleRunLogs(args) {
|
|
|
22759
22797
|
const failed = args.includes("--failed");
|
|
22760
22798
|
for (let index = 0; index < args.length; index += 1) {
|
|
22761
22799
|
const arg = args[index];
|
|
22800
|
+
if (arg === "--debug" || arg === "--logs" || arg === "--json" || arg === "--failed") {
|
|
22801
|
+
continue;
|
|
22802
|
+
}
|
|
22762
22803
|
if (arg === "--limit" && args[index + 1]) {
|
|
22763
22804
|
limit = parsePositiveInteger3(args[++index], "--limit");
|
|
22764
22805
|
continue;
|
|
22765
22806
|
}
|
|
22766
22807
|
if (arg === "--out" && args[index + 1]) {
|
|
22767
22808
|
outPath = resolve11(args[++index]);
|
|
22809
|
+
continue;
|
|
22810
|
+
}
|
|
22811
|
+
if (arg.startsWith("--")) {
|
|
22812
|
+
console.error(`${arg} is not supported by deepline runs logs.`);
|
|
22813
|
+
return 1;
|
|
22768
22814
|
}
|
|
22769
22815
|
}
|
|
22770
22816
|
if (failed && outPath) {
|
|
@@ -24237,9 +24283,9 @@ Examples:
|
|
|
24237
24283
|
).option("--watch", "Compatibility alias; run waits by default").option("--wait", "Compatibility alias; run waits by default").option("--no-wait", "Start the run and return immediately").option(
|
|
24238
24284
|
"--run-id-file <path>",
|
|
24239
24285
|
"Atomically write the accepted run id to a new JSON file"
|
|
24240
|
-
).option(
|
|
24241
|
-
"--
|
|
24242
|
-
"
|
|
24286
|
+
).option("--logs", "Compatibility alias for --debug").option(
|
|
24287
|
+
"--debug [value]",
|
|
24288
|
+
"Stream complete customer-safe runtime logs when passed without a value; otherwise pass input.debug"
|
|
24243
24289
|
).option("--tail-timeout-ms <ms>", "Timeout while watching the run stream").option("--force", "Start a fresh run graph").option(
|
|
24244
24290
|
"--force-tool-refresh",
|
|
24245
24291
|
"Refresh completed tool receipts; may repeat billed provider calls"
|
|
@@ -24288,6 +24334,7 @@ Pass-through input flags:
|
|
|
24288
24334
|
...options.runIdFile ? ["--run-id-file", options.runIdFile] : [],
|
|
24289
24335
|
...options.watch || options.wait ? ["--watch"] : [],
|
|
24290
24336
|
...options.logs ? ["--logs"] : [],
|
|
24337
|
+
...options.debug === true ? ["--debug"] : typeof options.debug === "string" ? ["--debug", options.debug] : [],
|
|
24291
24338
|
...options.tailTimeoutMs ? ["--tail-timeout-ms", options.tailTimeoutMs] : [],
|
|
24292
24339
|
...options.force ? ["--force"] : [],
|
|
24293
24340
|
...options.forceToolRefresh ? ["--force-tool-refresh"] : [],
|
|
@@ -24705,11 +24752,13 @@ Notes:
|
|
|
24705
24752
|
logs for persisted log history. In human output, --compact prints deduplicated
|
|
24706
24753
|
step transitions and progress instead of the full event stream. --json emits
|
|
24707
24754
|
one terminal package. --jsonl emits canonical live events as JSON Lines and
|
|
24708
|
-
ends with the same compact package shape as runs get --json.
|
|
24755
|
+
ends with the same compact package shape as runs get --json. Use --debug
|
|
24756
|
+
(or legacy --logs) to also print customer-safe runtime log lines to stderr.
|
|
24709
24757
|
|
|
24710
24758
|
Examples:
|
|
24711
24759
|
deepline runs tail play/my-play/run/20260501t000000-000
|
|
24712
24760
|
deepline runs tail play/my-play/run/20260501t000000-000 --compact
|
|
24761
|
+
deepline runs tail play/my-play/run/20260501t000000-000 --debug
|
|
24713
24762
|
deepline runs tail play/my-play/run/20260501t000000-000 --jsonl
|
|
24714
24763
|
`
|
|
24715
24764
|
).option("--json", "Emit one terminal JSON package after the run completes").option(
|
|
@@ -24718,12 +24767,17 @@ Examples:
|
|
|
24718
24767
|
).option(
|
|
24719
24768
|
"--compact",
|
|
24720
24769
|
"Show deduplicated human step transitions and progress"
|
|
24770
|
+
).option("--logs", "Compatibility alias for --debug").option(
|
|
24771
|
+
"--debug",
|
|
24772
|
+
"Print customer-safe runtime log lines to stderr while tailing"
|
|
24721
24773
|
).action(async (runId, options) => {
|
|
24722
24774
|
process.exitCode = await handleRunTail([
|
|
24723
24775
|
runId,
|
|
24724
24776
|
...options.json ? ["--json"] : [],
|
|
24725
24777
|
...options.jsonl ? ["--jsonl"] : [],
|
|
24726
|
-
...options.compact ? ["--compact"] : []
|
|
24778
|
+
...options.compact ? ["--compact"] : [],
|
|
24779
|
+
...options.logs ? ["--logs"] : [],
|
|
24780
|
+
...options.debug ? ["--debug"] : []
|
|
24727
24781
|
]);
|
|
24728
24782
|
});
|
|
24729
24783
|
runs.command("logs <runId>").description("Fetch persisted logs for a play run.").addHelpText(
|
|
@@ -24731,24 +24785,31 @@ Examples:
|
|
|
24731
24785
|
`
|
|
24732
24786
|
Notes:
|
|
24733
24787
|
Prints a bounded recent log preview by default. Use --out to write the full
|
|
24734
|
-
persisted log stream to a local file.
|
|
24788
|
+
persisted log stream to a local file. --debug (or legacy --logs) is accepted
|
|
24789
|
+
for script parity; this command already returns the unfiltered durable stream.
|
|
24735
24790
|
|
|
24736
24791
|
Examples:
|
|
24737
24792
|
deepline runs logs play/my-play/run/20260501t000000-000
|
|
24738
24793
|
deepline runs logs play/my-play/run/20260501t000000-000 --limit 500
|
|
24739
24794
|
deepline runs logs play/my-play/run/20260501t000000-000 --failed --json
|
|
24795
|
+
deepline runs logs play/my-play/run/20260501t000000-000 --debug
|
|
24740
24796
|
deepline runs logs play/my-play/run/20260501t000000-000 --out run.log --json
|
|
24741
24797
|
`
|
|
24742
24798
|
).option(
|
|
24743
24799
|
"--limit <count>",
|
|
24744
24800
|
"Maximum recent log lines to print without --out",
|
|
24745
24801
|
"200"
|
|
24746
|
-
).option("--out <path>", "Write the full persisted log stream to a file").option("--failed", "Show the bounded terminal-failure log window").option("--
|
|
24802
|
+
).option("--out <path>", "Write the full persisted log stream to a file").option("--failed", "Show the bounded terminal-failure log window").option("--logs", "Compatibility alias for --debug").option(
|
|
24803
|
+
"--debug",
|
|
24804
|
+
"Explicitly request the same persisted log view (no provenance filtering)"
|
|
24805
|
+
).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (runId, options) => {
|
|
24747
24806
|
process.exitCode = await handleRunLogs([
|
|
24748
24807
|
runId,
|
|
24749
24808
|
...options.limit ? ["--limit", options.limit] : [],
|
|
24750
24809
|
...options.out ? ["--out", options.out] : [],
|
|
24751
24810
|
...options.failed ? ["--failed"] : [],
|
|
24811
|
+
...options.logs ? ["--logs"] : [],
|
|
24812
|
+
...options.debug ? ["--debug"] : [],
|
|
24752
24813
|
...options.json ? ["--json"] : []
|
|
24753
24814
|
]);
|
|
24754
24815
|
});
|
package/dist/index.js
CHANGED
|
@@ -832,7 +832,7 @@ var SDK_RELEASE = {
|
|
|
832
832
|
// available at toolResponse.rawV2 while toolResponse.raw and all declared
|
|
833
833
|
// getters keep their established compatibility behavior.
|
|
834
834
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
835
|
-
version: "0.3.
|
|
835
|
+
version: "0.3.66",
|
|
836
836
|
updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
|
|
837
837
|
packageCapabilities: {
|
|
838
838
|
updatePreferences: 1
|
package/dist/index.mjs
CHANGED
|
@@ -744,7 +744,7 @@ var SDK_RELEASE = {
|
|
|
744
744
|
// available at toolResponse.rawV2 while toolResponse.raw and all declared
|
|
745
745
|
// getters keep their established compatibility behavior.
|
|
746
746
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
747
|
-
version: "0.3.
|
|
747
|
+
version: "0.3.66",
|
|
748
748
|
updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
|
|
749
749
|
packageCapabilities: {
|
|
750
750
|
updatePreferences: 1
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"dist/bundling-sources/shared_libs/play-data-plane/sheet-contract.ts",
|
|
42
42
|
"dist/bundling-sources/shared_libs/play-runtime/activity-observation.ts",
|
|
43
43
|
"dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts",
|
|
44
|
+
"dist/bundling-sources/shared_libs/play-runtime/async-operation.ts",
|
|
44
45
|
"dist/bundling-sources/shared_libs/play-runtime/auth-scope-resolver.ts",
|
|
45
46
|
"dist/bundling-sources/shared_libs/play-runtime/backend.ts",
|
|
46
47
|
"dist/bundling-sources/shared_libs/play-runtime/batch-runtime.ts",
|
|
@@ -187,6 +188,7 @@
|
|
|
187
188
|
"dist/bundling-sources/shared_libs/play-runtime/step-program-dataset-builder.ts",
|
|
188
189
|
"dist/bundling-sources/shared_libs/play-runtime/submit-limits.ts",
|
|
189
190
|
"dist/bundling-sources/shared_libs/play-runtime/suspension.ts",
|
|
191
|
+
"dist/bundling-sources/shared_libs/play-runtime/test-async-batching.ts",
|
|
190
192
|
"dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts",
|
|
191
193
|
"dist/bundling-sources/shared_libs/play-runtime/tool-batch-executor.ts",
|
|
192
194
|
"dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts",
|