deepline 0.3.272 → 0.3.273
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 +9 -0
- package/dist/bundling-sources/sdk/src/client.ts +49 -17
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/runs/receipts.ts +18 -2
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +3 -2
- package/dist/cli/index.js +241 -44
- package/dist/cli/index.mjs +241 -44
- package/dist/{client-BbKtvT9Q.d.ts → client-5xpuGpRn.d.ts} +64 -19
- package/dist/{client-C1Xm7eBH.d.mts → client-D9annc6K.d.mts} +64 -19
- package/dist/{compiler-manifest-CUuh8C3b.d.mts → compiler-manifest-C1bKB9bY.d.mts} +3 -2
- package/dist/{compiler-manifest-CUuh8C3b.d.ts → compiler-manifest-C1bKB9bY.d.ts} +3 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/install-integrity.json +4 -4
- package/dist/plays/bundle-play-file.d.mts +2 -2
- package/dist/plays/bundle-play-file.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +1 -1
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
|
@@ -3507,7 +3507,7 @@ var SDK_RELEASE = {
|
|
|
3507
3507
|
// getters keep their established compatibility behavior.
|
|
3508
3508
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
3509
3509
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
3510
|
-
version: "0.3.
|
|
3510
|
+
version: "0.3.273",
|
|
3511
3511
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
3512
3512
|
packageCapabilities: {
|
|
3513
3513
|
updatePreferences: 1
|
|
@@ -8363,7 +8363,7 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
8363
8363
|
);
|
|
8364
8364
|
return { ...response, runs: response.runs ?? [] };
|
|
8365
8365
|
}
|
|
8366
|
-
/** Read
|
|
8366
|
+
/** Read retained tool results without executing tools, preserving supplied key order and batching 100 keys per request. Obtain keys from exported evidence or execution metadata; each key must be nonempty, at most 2,048 characters and contain no CR, LF or NUL. Missing/expired results have an explicit per-key error. */
|
|
8367
8367
|
async getRunReceipts(runId, options) {
|
|
8368
8368
|
if (!options.keys.length || options.keys.some(
|
|
8369
8369
|
(key) => typeof key !== "string" || !key.trim() || key.length > 2048 || /[\r\n\0]/.test(key)
|
|
@@ -8419,7 +8419,7 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
8419
8419
|
);
|
|
8420
8420
|
}
|
|
8421
8421
|
/**
|
|
8422
|
-
*
|
|
8422
|
+
* Read a run's retained text tail (default 200), full retained stream (`all`), or terminal failure window (`failed`, at most 20). These are existing reads; sampling and retention loss cannot be recovered. See [run logs and events](run-events.md) for structured search and payload retrieval.
|
|
8423
8423
|
*
|
|
8424
8424
|
* This is the SDK equivalent of:
|
|
8425
8425
|
*
|
|
@@ -8498,7 +8498,7 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
8498
8498
|
...probe.logsTruncated ? { logsTruncated: true } : {}
|
|
8499
8499
|
};
|
|
8500
8500
|
}
|
|
8501
|
-
/**
|
|
8501
|
+
/** Read structured history across the active organization without requiring a run ID. Defaults to the last hour, newest first; use the returned cursor and exact time bounds to continue. See [run logs and events](run-events.md) for all kinds, indexed fields, payloads and SDK/API response types. */
|
|
8502
8502
|
async searchRunEvents(options = {}) {
|
|
8503
8503
|
const now = Date.now();
|
|
8504
8504
|
const params = new URLSearchParams({
|
|
@@ -15689,6 +15689,233 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
15689
15689
|
// src/cli/commands/play.ts
|
|
15690
15690
|
import { createHash as createHash4, randomUUID as randomUUID4 } from "crypto";
|
|
15691
15691
|
|
|
15692
|
+
// src/cli/run-logs-help.ts
|
|
15693
|
+
var EVENT_DETAILS = {
|
|
15694
|
+
"run.created": {
|
|
15695
|
+
emittedBy: "Run admission",
|
|
15696
|
+
payloadFields: ["status", "playName", "runtimeBackend"]
|
|
15697
|
+
},
|
|
15698
|
+
"run.started": {
|
|
15699
|
+
emittedBy: "Execution coordinator",
|
|
15700
|
+
payloadFields: ["playName", "runtimeBackend"]
|
|
15701
|
+
},
|
|
15702
|
+
"run.waiting": {
|
|
15703
|
+
emittedBy: "Durable wait handling",
|
|
15704
|
+
payloadFields: ["waitKind", "waitUntil"]
|
|
15705
|
+
},
|
|
15706
|
+
"run.resumed": { emittedBy: "Durable wait handling", payloadFields: [] },
|
|
15707
|
+
"run.completed": {
|
|
15708
|
+
emittedBy: "Run finalization",
|
|
15709
|
+
payloadFields: ["result", "resultSummary", "terminalWorkCounterSegment"]
|
|
15710
|
+
},
|
|
15711
|
+
"run.failed": {
|
|
15712
|
+
emittedBy: "Run finalization",
|
|
15713
|
+
payloadFields: [
|
|
15714
|
+
"error",
|
|
15715
|
+
"result",
|
|
15716
|
+
"resultSummary",
|
|
15717
|
+
"terminalWorkCounterSegment"
|
|
15718
|
+
]
|
|
15719
|
+
},
|
|
15720
|
+
"run.cancelled": {
|
|
15721
|
+
emittedBy: "Run cancellation",
|
|
15722
|
+
payloadFields: ["error", "result"]
|
|
15723
|
+
},
|
|
15724
|
+
"step.started": {
|
|
15725
|
+
emittedBy: "Managed step execution",
|
|
15726
|
+
payloadFields: ["stepId", "label", "kind", "artifactTableNamespace"]
|
|
15727
|
+
},
|
|
15728
|
+
"step.progress": {
|
|
15729
|
+
emittedBy: "Managed step execution",
|
|
15730
|
+
payloadFields: ["stepId", "label", "kind", "status", "progress"]
|
|
15731
|
+
},
|
|
15732
|
+
"step.completed": {
|
|
15733
|
+
emittedBy: "Managed step execution",
|
|
15734
|
+
payloadFields: ["stepId", "label", "kind", "artifactTableNamespace"]
|
|
15735
|
+
},
|
|
15736
|
+
"step.failed": {
|
|
15737
|
+
emittedBy: "Managed step execution",
|
|
15738
|
+
payloadFields: [
|
|
15739
|
+
"stepId",
|
|
15740
|
+
"label",
|
|
15741
|
+
"kind",
|
|
15742
|
+
"error",
|
|
15743
|
+
"artifactTableNamespace"
|
|
15744
|
+
]
|
|
15745
|
+
},
|
|
15746
|
+
"step.skipped": {
|
|
15747
|
+
emittedBy: "Managed step execution",
|
|
15748
|
+
payloadFields: ["stepId", "label", "kind", "artifactTableNamespace"]
|
|
15749
|
+
},
|
|
15750
|
+
"log.appended": {
|
|
15751
|
+
emittedBy: "ctx.log and runtime/coordinator messages",
|
|
15752
|
+
payloadFields: [
|
|
15753
|
+
"lines",
|
|
15754
|
+
"lineContexts",
|
|
15755
|
+
"producerAttempt",
|
|
15756
|
+
"channelOffset",
|
|
15757
|
+
"logsTruncated"
|
|
15758
|
+
]
|
|
15759
|
+
},
|
|
15760
|
+
"dataset.lifecycle": {
|
|
15761
|
+
emittedBy: "Managed dataset storage",
|
|
15762
|
+
payloadFields: [
|
|
15763
|
+
"datasetId",
|
|
15764
|
+
"path",
|
|
15765
|
+
"tableNamespace",
|
|
15766
|
+
"phase",
|
|
15767
|
+
"persistedRows",
|
|
15768
|
+
"succeededRows",
|
|
15769
|
+
"failedRows",
|
|
15770
|
+
"complete",
|
|
15771
|
+
"bornFrom"
|
|
15772
|
+
]
|
|
15773
|
+
},
|
|
15774
|
+
"activity.observed": {
|
|
15775
|
+
emittedBy: "Managed provider/dataset/runner activity",
|
|
15776
|
+
payloadFields: ["observation"]
|
|
15777
|
+
},
|
|
15778
|
+
"work.counters": {
|
|
15779
|
+
emittedBy: "Runtime work accounting",
|
|
15780
|
+
payloadFields: [
|
|
15781
|
+
"attempt",
|
|
15782
|
+
"invocationSeq",
|
|
15783
|
+
"segmentId",
|
|
15784
|
+
"logicalCalls",
|
|
15785
|
+
"providerRequests",
|
|
15786
|
+
"provider429s",
|
|
15787
|
+
"final"
|
|
15788
|
+
]
|
|
15789
|
+
}
|
|
15790
|
+
};
|
|
15791
|
+
var RUN_LOGS_KIND_HELP = [
|
|
15792
|
+
...Object.entries(RUN_EVENT_KIND_CATALOG).map(([kind, descriptor]) => ({
|
|
15793
|
+
kind,
|
|
15794
|
+
description: descriptor.description,
|
|
15795
|
+
...EVENT_DETAILS[kind]
|
|
15796
|
+
})),
|
|
15797
|
+
...Object.entries(RUN_RECEIPT_SEARCH_KIND_CATALOG).map(
|
|
15798
|
+
([kind, descriptor]) => ({
|
|
15799
|
+
kind,
|
|
15800
|
+
description: descriptor.description,
|
|
15801
|
+
emittedBy: "Durable work receipt settlement",
|
|
15802
|
+
payloadFields: ["status", "output", "error", "errorPayload"]
|
|
15803
|
+
})
|
|
15804
|
+
),
|
|
15805
|
+
{
|
|
15806
|
+
kind: RUN_EVENT_SEARCH_FALLBACK_KIND,
|
|
15807
|
+
description: "Fallback for an observation without a recognized event type.",
|
|
15808
|
+
emittedBy: "Event indexing",
|
|
15809
|
+
payloadFields: []
|
|
15810
|
+
}
|
|
15811
|
+
];
|
|
15812
|
+
var SECTIONS = [
|
|
15813
|
+
{
|
|
15814
|
+
title: "Choose the read",
|
|
15815
|
+
paragraphs: [
|
|
15816
|
+
"These commands read existing evidence; they do not start a run or execute a provider. Replace <run-id>, <play-name> and other angle-bracket values with identifiers returned by the CLI.",
|
|
15817
|
+
"Text logs: runs logs <run-id> returns the last 200 retained lines by default. --out writes the full retained stream to a local file. --log-level filters text severity; debug includes all retained levels. --failed reads only a terminal-failed run\u2019s last 20 retained lines and reports retention limitations.",
|
|
15818
|
+
"Event search: omit the run ID, or add any of --since, --until, --play, --kind, --where, --payloads, --cursor, --runtime-namespace or --runtime-backend. A supplied run ID then narrows the search. --limit and --json alone do not switch a run\u2019s text logs to event search. Text-only flags --out, --failed, --log-level, --logs and --debug cannot be combined with event search.",
|
|
15819
|
+
"Current status and returned output selectors: runs get <run-id> --json. Live observation: runs watch <run-id>. Dataset rows: runs export <run-id> --dataset <returned-selector> --out rows.csv. A referenced tool response: runs receipt <run-id> --key <returned-receipt-key> --json. Read each command\u2019s --help for its options."
|
|
15820
|
+
],
|
|
15821
|
+
commands: [
|
|
15822
|
+
"deepline runs logs <run-id> --json",
|
|
15823
|
+
"deepline runs logs <run-id> --out run.log --json",
|
|
15824
|
+
"deepline runs logs --kind run.failed --json",
|
|
15825
|
+
"deepline runs logs --kind step.failed --payloads --json",
|
|
15826
|
+
"deepline runs logs --kind receipt.failed --payloads --json"
|
|
15827
|
+
]
|
|
15828
|
+
},
|
|
15829
|
+
{
|
|
15830
|
+
title: "Search window and pagination",
|
|
15831
|
+
paragraphs: [
|
|
15832
|
+
"Search defaults to the last hour, newest first. Use explicit ISO UTC --since and --until values for reproducible queries; the maximum lookback is seven days. Default page size is 100 events; --limit accepts 1\u2013200. With --payloads, default and maximum are 10 events, with 16 MiB total payload data.",
|
|
15833
|
+
"JSON returns events[], returnedCount, since, until, nextCursor and next.logs. Run the returned next.logs command to continue with the same filters and UTC window; nextCursor is opaque. A bounded page or an empty result does not establish whole-run coverage or application health."
|
|
15834
|
+
],
|
|
15835
|
+
commands: [
|
|
15836
|
+
"deepline runs logs <run-id> --kind log.appended --json",
|
|
15837
|
+
"deepline runs logs --play <play-name> --since <UTC-start> --until <UTC-end> --json"
|
|
15838
|
+
]
|
|
15839
|
+
},
|
|
15840
|
+
{
|
|
15841
|
+
title: "Fields you can filter with --where",
|
|
15842
|
+
paragraphs: [
|
|
15843
|
+
"Identity strings: orgId, runId, playName, runtimeScope. These come from authenticated execution state; filters only narrow your authorized organization/runtime. Preview reads require the existing runtime credential and an authorized --runtime-namespace; --runtime-backend selects daytona or modal.",
|
|
15844
|
+
"Event string: kind. Optional strings: source, stepId, stepKind, status, datasetId, phase, provider, operation. Optional positive integer: producerAttempt. These fields exist only when recorded; inspect a returned event before filtering on an optional field.",
|
|
15845
|
+
'stepId/stepKind describe recorded step work; datasetId/phase describe dataset lifecycle (registered, available, failed). provider/operation appear on typed provider activity.observed events, not every receipt or provider call. status is the recorded status or activity state when present: run.completed and step.completed do not imply status == "completed". Select lifecycle outcomes with --kind.',
|
|
15846
|
+
"context.<key> matches an authored flat scalar log field: string, number or boolean. Context cannot override event identity. Missing fields do not match. --where supports only $.field == literal predicates joined with &&, at most eight predicates and 512 bytes. No OR, ranges, wildcards, nested payload paths or text search. Time uses --since/--until; level and message are not --where fields."
|
|
15847
|
+
],
|
|
15848
|
+
commands: [
|
|
15849
|
+
`deepline runs logs --kind receipt.failed --where '$.status == "failed"' --payloads --json`,
|
|
15850
|
+
`deepline runs logs <run-id> --where '$.source == "worker" && $.producerAttempt == 1' --json`,
|
|
15851
|
+
`deepline runs logs --kind activity.observed --where '$.provider == "<returned-provider>" && $.operation == "<returned-operation>"' --json`,
|
|
15852
|
+
`deepline runs logs --kind log.appended --where '$.context.<authored-key> == "<recorded-value>"' --json`
|
|
15853
|
+
]
|
|
15854
|
+
},
|
|
15855
|
+
{
|
|
15856
|
+
title: "What you get back",
|
|
15857
|
+
paragraphs: [
|
|
15858
|
+
"Search events include eventId, occurredAt, ingestedAt, kind, runId, playName, level and message. The CLI puts indexed fields directly on each events[] entry; SDK/API responses keep them under searchDoc. Log search message is a preview (up to 2,048 characters); use text logs or --out for full retained lines.",
|
|
15859
|
+
"--payloads adds eventPayload for stored canonical events: lifecycle, step details/errors, activity observations, dataset transitions and work counters. Receipt matches instead hydrate payload with status, output, error and errorPayload. An event without a receipt does not promise a tool response; retained payloads may be unavailable. Neither --where nor event search indexes request/response bodies.",
|
|
15860
|
+
"Search does not expose a receipt key or storage reference. To retrieve a specific retained tool response with runs receipt, use the receipt key returned in the run\u2019s exported evidence or tool execution metadata. For full row data, follow runs get output/export actions; dataset.lifecycle contains metadata, not all dataset rows.",
|
|
15861
|
+
"The catalog lists known searchable kinds, including receipt outcomes and the runtime.event fallback. Use the exact dotted name with --kind. Future stored kinds can also be queried; this list is not a CLI validation allowlist. Events are observations, not a count of billed provider calls.",
|
|
15862
|
+
"Catalog payload fields are possible producer fields, not required fields or --where paths. Canonical eventPayload uses type for the dotted event kind; its kind field, when present on a step, becomes indexed stepKind. Indexed log entries describe individual lines rather than reproducing the original lines batch.",
|
|
15863
|
+
"Canonical event envelopes carry runId, type, occurredAt (producer milliseconds), source, optional seq and optional producer-owned payload. Search occurredAt/ingestedAt are UTC timestamp strings. source identifies the recorded producer; producerAttempt is present only when known.",
|
|
15864
|
+
"activity.observed stores observation with activityId, stepId, target, state and observedAt. Targets describe provider, dataset, lease, runner, step or capacity work. State kinds are active, queued, waiting, retrying, scheduled, completed or failed; retry/wait detail stays in the payload. work.counters contains aggregate logicalCalls, providerRequests and provider429s, not per-call responses."
|
|
15865
|
+
],
|
|
15866
|
+
commands: []
|
|
15867
|
+
}
|
|
15868
|
+
];
|
|
15869
|
+
var RETENTION = [
|
|
15870
|
+
"Event/log/receipt search shares the PlanetScale index. New runs marked runEventStore=planet_scale retain accepted event/log history in PlanetScale; Convex keeps current run/control state and eligible saved-Play rollup facts. Older unmarked runs retain their existing readers. No backfill is implied.",
|
|
15871
|
+
"Search retention is seven days; receipt payload retention is independent. Logs reflect accepted, retained lines: runtime sampling and truncation can omit original console output. Read returned retention/sampling warnings; an export contains the full retained stream, not suppressed lines."
|
|
15872
|
+
];
|
|
15873
|
+
function wrapParagraph(text, indent2 = 2) {
|
|
15874
|
+
const lines = [];
|
|
15875
|
+
const padding = " ".repeat(indent2);
|
|
15876
|
+
let line = padding;
|
|
15877
|
+
for (const word of text.split(" ")) {
|
|
15878
|
+
if (line.length + word.length > 80 && line.trim()) {
|
|
15879
|
+
lines.push(line.trimEnd());
|
|
15880
|
+
line = padding;
|
|
15881
|
+
}
|
|
15882
|
+
line += `${word} `;
|
|
15883
|
+
}
|
|
15884
|
+
lines.push(line.trimEnd());
|
|
15885
|
+
return lines.join("\n");
|
|
15886
|
+
}
|
|
15887
|
+
function renderRunLogsHelp() {
|
|
15888
|
+
const section = ({
|
|
15889
|
+
title,
|
|
15890
|
+
paragraphs,
|
|
15891
|
+
commands
|
|
15892
|
+
}) => [
|
|
15893
|
+
`${title}:`,
|
|
15894
|
+
...paragraphs.flatMap((paragraph) => [wrapParagraph(paragraph), ""]),
|
|
15895
|
+
...commands.length ? [" Common commands:", ...commands.map((command) => ` ${command}`)] : [],
|
|
15896
|
+
""
|
|
15897
|
+
];
|
|
15898
|
+
return [
|
|
15899
|
+
"",
|
|
15900
|
+
...section(SECTIONS[0]),
|
|
15901
|
+
"Known --kind values (complete catalog):",
|
|
15902
|
+
...RUN_LOGS_KIND_HELP.flatMap(
|
|
15903
|
+
({ kind, description, emittedBy, payloadFields }) => [
|
|
15904
|
+
` ${kind}`,
|
|
15905
|
+
wrapParagraph(description, 4),
|
|
15906
|
+
wrapParagraph(
|
|
15907
|
+
`Recorded by: ${emittedBy}. Payload fields: ${kind === RUN_EVENT_SEARCH_FALLBACK_KIND ? "producer-specific fields; inspect the returned payload" : payloadFields.join(", ") || "event envelope only"}.`,
|
|
15908
|
+
4
|
|
15909
|
+
)
|
|
15910
|
+
]
|
|
15911
|
+
),
|
|
15912
|
+
"",
|
|
15913
|
+
...SECTIONS.slice(1).flatMap(section),
|
|
15914
|
+
"Storage and retention:",
|
|
15915
|
+
...RETENTION.flatMap((paragraph) => [wrapParagraph(paragraph), ""])
|
|
15916
|
+
].join("\n");
|
|
15917
|
+
}
|
|
15918
|
+
|
|
15692
15919
|
// ../play-runtime/run-execution-state.ts
|
|
15693
15920
|
function assertNeverState(value, what) {
|
|
15694
15921
|
throw new Error(`Unhandled ${what}: ${JSON.stringify(value)}`);
|
|
@@ -36867,51 +37094,21 @@ Examples:
|
|
|
36867
37094
|
});
|
|
36868
37095
|
runs.command("logs [runId]").description(
|
|
36869
37096
|
"Fetch one run\u2019s logs or search recent runtime events across runs."
|
|
36870
|
-
).addHelpText(
|
|
36871
|
-
"
|
|
36872
|
-
|
|
36873
|
-
|
|
36874
|
-
Prints a bounded recent log preview by default. Use --out to write the full
|
|
36875
|
-
retained stream to a local file. Use --log-level to filter by severity;
|
|
36876
|
-
default debug preserves the complete historical stream.
|
|
36877
|
-
|
|
36878
|
-
Search flags read the org-scoped event index (last hour by default, at most
|
|
36879
|
-
seven days). Org, run, Play, runtime scope and known attempt identity are
|
|
36880
|
-
attached automatically. --where accepts equality joined with && for orgId,
|
|
36881
|
-
runId, playName, runtimeScope, producerAttempt, kind, status, source, stepId,
|
|
36882
|
-
stepKind, datasetId, phase, provider, operation, and scalar context.<key>.
|
|
36883
|
-
Filters only narrow the authenticated org/runtime scope. Provider and
|
|
36884
|
-
operation come from typed provider activity observations; this does not
|
|
36885
|
-
index request/response bodies or promise one event per provider call. --payloads
|
|
36886
|
-
includes full result data in this command, capped at ten events and 16 MiB.
|
|
36887
|
-
|
|
36888
|
-
Event, log, and receipt search share one PlanetScale index. For runs marked
|
|
36889
|
-
runEventStore=planet_scale, PlanetScale owns full event/log history; Convex
|
|
36890
|
-
keeps the live run snapshot, admission fence, and eligible saved-Play rollup
|
|
36891
|
-
facts. Marked-run log bodies are not copied into Convex. Unmarked legacy runs
|
|
36892
|
-
keep their existing Convex event history and Run Log Stream.
|
|
36893
|
-
Known --kind values: ${RUN_EVENT_SEARCH_KIND_VALUES.join(", ")}.
|
|
36894
|
-
|
|
36895
|
-
Examples:
|
|
36896
|
-
deepline runs logs play/my-play/run/20260501t000000-000
|
|
36897
|
-
deepline runs logs play/my-play/run/20260501t000000-000 --limit 500
|
|
36898
|
-
deepline runs logs play/my-play/run/20260501t000000-000 --failed --json
|
|
36899
|
-
deepline runs logs play/my-play/run/20260501t000000-000 --log-level error
|
|
36900
|
-
deepline runs logs play/my-play/run/20260501t000000-000 --out run.log --log-level debug --json
|
|
36901
|
-
deepline runs logs --since 2026-09-29T00:00:00Z --kind step.failed --json
|
|
36902
|
-
deepline runs logs --kind activity.observed --where '$.provider == "apollo" && $.operation == "company_lookup"' --json
|
|
36903
|
-
deepline runs logs --play my-play --where '$.context.companyId == "acme_123"' --json
|
|
36904
|
-
deepline runs logs --where '$.status == "failed"' --payloads --play my-play --json
|
|
36905
|
-
`
|
|
36906
|
-
).option("--limit <count>", "Maximum log lines or search events to print").option("--out <path>", "Write the full retained log stream to a file").option("--failed", "Show the bounded terminal-failure log window").option(
|
|
37097
|
+
).addHelpText("after", renderRunLogsHelp()).option(
|
|
37098
|
+
"--limit <count>",
|
|
37099
|
+
"Text tail: default 200; search: default 100, max 200 (10 with --payloads)"
|
|
37100
|
+
).option("--out <path>", "Write the full retained log stream to a file").option("--failed", "Show the bounded terminal-failure log window").option(
|
|
36907
37101
|
"--log-level <level>",
|
|
36908
37102
|
"Minimum severity: debug (default), info, warn, or error"
|
|
36909
|
-
).option("--logs", "Compatibility alias for --log-level debug").option("--debug", "Compatibility alias for --log-level debug").option("--json", "Emit JSON output. Also automatic when stdout is piped").option("--since <timestamp>", "Search events since this UTC timestamp").option("--until <timestamp>", "Search events before this UTC timestamp").option("--play <name>", "Filter events by Play name").option(
|
|
37103
|
+
).option("--logs", "Compatibility alias for --log-level debug").option("--debug", "Compatibility alias for --log-level debug").option("--json", "Emit JSON output. Also automatic when stdout is piped").option("--since <timestamp>", "Search events since this UTC timestamp").option("--until <timestamp>", "Search events before this UTC timestamp").option("--play <name>", "Filter events by Play name").option(
|
|
37104
|
+
"--kind <kind>",
|
|
37105
|
+
"Search one exact event kind; complete catalog below"
|
|
37106
|
+
).option(
|
|
36910
37107
|
"--where <jsonpath>",
|
|
36911
|
-
|
|
37108
|
+
"Search indexed fields with == and &&; field types and availability below"
|
|
36912
37109
|
).option(
|
|
36913
37110
|
"--payloads",
|
|
36914
|
-
"
|
|
37111
|
+
"Search with canonical eventPayload or receipt payload; max 10 events, 16 MiB"
|
|
36915
37112
|
).option("--cursor <token>", "Continue a bounded event search").option(
|
|
36916
37113
|
"--runtime-namespace <name>",
|
|
36917
37114
|
"Search an explicitly authorized Preview namespace"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="./text-imports.d.ts" />
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { c as PlayCompilerManifest, ai as ToolResultBilling } from './compiler-manifest-
|
|
3
|
+
import { c as PlayCompilerManifest, ai as ToolResultBilling } from './compiler-manifest-C1bKB9bY.js';
|
|
4
4
|
import { MonitorFleetDefinition } from './monitor-fleet-contract.js';
|
|
5
5
|
|
|
6
6
|
declare const playPathSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
@@ -191,29 +191,42 @@ type PlayTriggerConfigUpdateResult = {
|
|
|
191
191
|
triggers: PlayTriggerConfigView;
|
|
192
192
|
};
|
|
193
193
|
|
|
194
|
-
/**
|
|
194
|
+
/** Read-only retained tool evidence associated with a run. Each requested key returns either its stored result or an explicit error; this never executes tools or returns a billing receipt. */
|
|
195
195
|
type RunToolReceiptResult = {
|
|
196
|
+
/** Exact key supplied to the read, obtained from exported evidence or execution metadata. */
|
|
196
197
|
receiptKey: string;
|
|
198
|
+
/** Recorded work status when available; an error does not imply a fresh provider failure. */
|
|
197
199
|
status?: string;
|
|
198
200
|
} & ({
|
|
201
|
+
/** Retained result envelope; provider fields reflect stored evidence, not a guaranteed raw HTTP response. */
|
|
199
202
|
result: {
|
|
203
|
+
/** Status recorded in the tool result. */
|
|
200
204
|
status: string;
|
|
205
|
+
/** Provider job identity when recorded. */
|
|
201
206
|
job_id?: string;
|
|
207
|
+
/** Stored tool response. */
|
|
202
208
|
toolResponse: Record<string, unknown>;
|
|
209
|
+
/** Stored target values when the tool supplied them. */
|
|
203
210
|
targetValues?: Record<string, unknown>;
|
|
211
|
+
/** Stored list dataset metadata when supplied. */
|
|
204
212
|
listDatasets?: Record<string, unknown>;
|
|
213
|
+
/** Stored list row evidence when supplied. */
|
|
205
214
|
listRows?: Record<string, unknown>;
|
|
206
215
|
};
|
|
207
216
|
error?: never;
|
|
208
217
|
} | {
|
|
209
218
|
result?: never;
|
|
219
|
+
/** Explicit lookup/access/retention failure for this key. */
|
|
210
220
|
error: {
|
|
211
221
|
code: string;
|
|
212
222
|
message: string;
|
|
213
223
|
};
|
|
214
224
|
});
|
|
225
|
+
/** Results in the exact requested key order, including errors for unavailable keys. */
|
|
215
226
|
type RunToolReceiptsResponse = {
|
|
227
|
+
/** Public run identity used to scope the read. */
|
|
216
228
|
runId: string;
|
|
229
|
+
/** One result or error per requested key. */
|
|
217
230
|
receipts: RunToolReceiptResult[];
|
|
218
231
|
};
|
|
219
232
|
|
|
@@ -3813,24 +3826,32 @@ type RunsWatchOptions = {
|
|
|
3813
3826
|
};
|
|
3814
3827
|
/** @deprecated Use `RunsWatchOptions`. */
|
|
3815
3828
|
type RunsTailOptions = RunsWatchOptions;
|
|
3816
|
-
/**
|
|
3829
|
+
/** Read retained text with `client.runs.logs(...)`; use `runs.searchEvents` for structured filters and payloads. */
|
|
3817
3830
|
type RunsLogsOptions = {
|
|
3818
|
-
/** Return the
|
|
3831
|
+
/** Return the last `limit` retained lines in sequence order; default 200. Ignored when `all` is true. */
|
|
3819
3832
|
limit?: number;
|
|
3820
|
-
/**
|
|
3833
|
+
/** Page through every retained line. Cannot combine with `failed`; sampling or retention loss cannot be recovered. */
|
|
3821
3834
|
all?: boolean;
|
|
3822
|
-
/**
|
|
3835
|
+
/** Read a terminal-failed run's last 20 retained lines, or fewer with `limit`. Retention loss returns an explicit association and warning. */
|
|
3823
3836
|
failed?: boolean;
|
|
3824
3837
|
};
|
|
3825
|
-
/**
|
|
3838
|
+
/** Retained text for one run. Counts and retention flags describe the stored stream, not every original console call. */
|
|
3826
3839
|
type RunsLogsResult = {
|
|
3840
|
+
/** Public run identity. */
|
|
3827
3841
|
runId: string;
|
|
3842
|
+
/** Count tracked by the log stream; may exceed available bodies after retention truncation. */
|
|
3828
3843
|
totalCount: number;
|
|
3844
|
+
/** Number of line bodies returned in `entries`. */
|
|
3829
3845
|
returnedCount: number;
|
|
3846
|
+
/** First returned stored sequence, or null for an empty view. */
|
|
3830
3847
|
firstSequence: number | null;
|
|
3848
|
+
/** Last returned stored sequence, or null for an empty view. */
|
|
3831
3849
|
lastSequence: number | null;
|
|
3850
|
+
/** Tail/all: returned count is below total count. Failed: the stream lost bodies to retention. Check `logsTruncated` to distinguish retention loss from a selected tail. */
|
|
3832
3851
|
truncated: boolean;
|
|
3852
|
+
/** More retained lines exist after `lastSequence`; always false for the designed failure window. */
|
|
3833
3853
|
hasMore: boolean;
|
|
3854
|
+
/** Formatted text lines in stored sequence order; structured context is available through event search. */
|
|
3834
3855
|
entries: string[];
|
|
3835
3856
|
/** Selected public log view. */
|
|
3836
3857
|
view?: 'tail' | 'failed' | 'all';
|
|
@@ -3848,50 +3869,74 @@ type RunsLogsResult = {
|
|
|
3848
3869
|
*/
|
|
3849
3870
|
logsTruncated?: boolean;
|
|
3850
3871
|
};
|
|
3851
|
-
/**
|
|
3872
|
+
/** Read existing events in the authenticated organization/runtime scope, newest first by occurrence time and event ID. See the complete catalog and field contract in `deepline runs logs --help`. */
|
|
3852
3873
|
type RunsEventSearchOptions = {
|
|
3853
3874
|
/** Inclusive UTC timestamp; defaults to one hour before the request. */
|
|
3854
3875
|
since?: string;
|
|
3855
|
-
/** Exclusive UTC timestamp; defaults to the request time. */
|
|
3876
|
+
/** Exclusive UTC timestamp; defaults to the request time. A window spans at most seven days; event retention is seven days. */
|
|
3856
3877
|
until?: string;
|
|
3857
3878
|
/** Optional run filter. Omit to search across the active organization. */
|
|
3858
3879
|
runId?: string;
|
|
3880
|
+
/** Exact Play name; HTTP query parameter `playName`, CLI `--play`. */
|
|
3859
3881
|
playName?: string;
|
|
3882
|
+
/** Exact dotted event kind, such as `step.failed`. The catalog is discoverable with `runs logs --help`; future stored kinds are accepted too. */
|
|
3860
3883
|
kind?: string;
|
|
3861
|
-
/**
|
|
3884
|
+
/** Equality joined with `&&`, at most eight predicates and 512 bytes. Fields: orgId, runId, playName, runtimeScope, producerAttempt, kind, status, source, stepId, stepKind, datasetId, phase, provider, operation and scalar `context.<key>`. Missing fields do not match; status is not inferred from kind. No body, message, level, nested payload, range or OR search. HTTP `jsonpath`, CLI `--where`. */
|
|
3862
3885
|
jsonpath?: string;
|
|
3863
|
-
/**
|
|
3886
|
+
/** Add stored canonical `eventPayload` and, for receipt matches, retained `payload`. At most ten events and 16 MiB; unavailable receipts return null. HTTP `payloads=true`, CLI `--payloads`. Does not execute tools. */
|
|
3864
3887
|
includePayloads?: boolean;
|
|
3888
|
+
/** Page size: default 100, maximum 200; with payloads, default and maximum ten. */
|
|
3865
3889
|
limit?: number;
|
|
3890
|
+
/** Opaque `nextCursor` from the preceding page. Reuse that page's returned since/until and the same filters and runtime scope. */
|
|
3866
3891
|
cursor?: string;
|
|
3867
3892
|
/** Explicit Preview selection requires the existing runtime credential. */
|
|
3868
3893
|
runtime?: PlayRuntimeSelection;
|
|
3869
3894
|
};
|
|
3895
|
+
/** One indexed observation; optional indexed fields and payloads depend on what its producer recorded. */
|
|
3870
3896
|
type RunsEventSearchEntry = {
|
|
3897
|
+
/** Stable event identity; also breaks ties in newest-first pagination. */
|
|
3871
3898
|
eventId: string;
|
|
3899
|
+
/** Producer occurrence time as a UTC timestamp string. */
|
|
3872
3900
|
occurredAt: string;
|
|
3901
|
+
/** Index ingestion time as a UTC timestamp string; may be later than occurrence. */
|
|
3873
3902
|
ingestedAt: string;
|
|
3903
|
+
/** Public run identity associated with this observation. */
|
|
3874
3904
|
runId: string;
|
|
3905
|
+
/** Recorded Play name. */
|
|
3875
3906
|
playName: string;
|
|
3907
|
+
/** Exact indexed kind; canonical payloads use `type` for this dotted name. */
|
|
3876
3908
|
kind: string;
|
|
3909
|
+
/** Recorded log severity, or null; not a JSONPath filter field. */
|
|
3877
3910
|
level: string | null;
|
|
3911
|
+
/** Log message preview of at most 2,048 characters, or null. Use text logs/export for the full retained line. */
|
|
3878
3912
|
message: string | null;
|
|
3913
|
+
/** Indexed identity and recorded scalar fields. SDK/API keep this nested; CLI search flattens it onto each event. Provider/operation describe typed activity observations, not every provider call. */
|
|
3879
3914
|
searchDoc: Record<string, unknown>;
|
|
3880
|
-
/**
|
|
3915
|
+
/** Stored canonical event details, only when payloads are requested and available. Lifecycle/activity/dataset payloads are observations, not complete tool responses or dataset rows. */
|
|
3881
3916
|
eventPayload?: Record<string, unknown>;
|
|
3882
|
-
/**
|
|
3917
|
+
/** Retained work result for a receipt match when payloads are requested; null if unavailable. Other events need not carry this field. */
|
|
3883
3918
|
payload?: RunsEventPayload | null;
|
|
3884
3919
|
};
|
|
3920
|
+
/** One bounded search page. Continue using `nextCursor` and these exact time bounds; CLI-only counts and follow-up commands are not SDK/API fields. */
|
|
3885
3921
|
type RunsEventSearchResult = {
|
|
3922
|
+
/** Matching observations in descending occurredAt/eventId order. */
|
|
3886
3923
|
events: RunsEventSearchEntry[];
|
|
3924
|
+
/** Opaque continuation token, or null when no further page exists. */
|
|
3887
3925
|
nextCursor: string | null;
|
|
3926
|
+
/** Resolved inclusive UTC bound, including a defaulted bound. */
|
|
3888
3927
|
since: string;
|
|
3928
|
+
/** Resolved exclusive UTC bound, including a defaulted bound. */
|
|
3889
3929
|
until: string;
|
|
3890
3930
|
};
|
|
3931
|
+
/** Retained work outcome hydrated for a receipt event; not a new execution, billing receipt or guarantee of a raw HTTP response. */
|
|
3891
3932
|
type RunsEventPayload = {
|
|
3933
|
+
/** Recorded terminal work outcome. */
|
|
3892
3934
|
status: 'completed' | 'failed' | 'skipped';
|
|
3935
|
+
/** Stored result data, or null when no output was retained. */
|
|
3893
3936
|
output: unknown | null;
|
|
3937
|
+
/** Stored failure message, or null when absent. */
|
|
3894
3938
|
error: string | null;
|
|
3939
|
+
/** Stored structured failure details, or null when absent. */
|
|
3895
3940
|
errorPayload: unknown | null;
|
|
3896
3941
|
};
|
|
3897
3942
|
/** One persisted runtime-sheet row returned by `client.runs.exportDatasetRows(...)`. */
|
|
@@ -3951,7 +3996,7 @@ type PlaySecretCheck = {
|
|
|
3951
3996
|
* @sdkReference client 020 client.runs
|
|
3952
3997
|
*/
|
|
3953
3998
|
type RunsNamespace = {
|
|
3954
|
-
/** Read retained tool results
|
|
3999
|
+
/** Read retained tool results in supplied key order. Use keys returned in exported evidence or execution metadata; search does not expose receipt keys. Never executes tools. */
|
|
3955
4000
|
getReceipts: (runId: string, options: {
|
|
3956
4001
|
keys: string[];
|
|
3957
4002
|
}) => Promise<RunToolReceiptsResponse>;
|
|
@@ -3982,9 +4027,9 @@ type RunsNamespace = {
|
|
|
3982
4027
|
watch: (runId: string, options?: RunsWatchOptions) => Promise<PlayStatus>;
|
|
3983
4028
|
/** @deprecated Use `watch`; retained as a source-compatible alias. */
|
|
3984
4029
|
tail: (runId: string, options?: RunsTailOptions) => Promise<PlayStatus>;
|
|
3985
|
-
/**
|
|
4030
|
+
/** Read a run's retained text tail, full stream (`all`) or terminal failure window (`failed`). For structured filters and payloads, see [run logs and events](run-events.md). */
|
|
3986
4031
|
logs: (runId: string, options?: RunsLogsOptions) => Promise<RunsLogsResult>;
|
|
3987
|
-
/** Search
|
|
4032
|
+
/** Search existing events across the active organization; default last hour, up to 200 events per page (ten with payloads). See [run logs and events](run-events.md) for the catalog, query fields and response types. */
|
|
3988
4033
|
searchEvents: (options?: RunsEventSearchOptions) => Promise<RunsEventSearchResult>;
|
|
3989
4034
|
/** Export persisted rows for a runtime-sheet dataset/table namespace. */
|
|
3990
4035
|
exportDatasetRows: (input: {
|
|
@@ -5928,7 +5973,7 @@ declare class DeeplineClient {
|
|
|
5928
5973
|
listRuns(options: RunsListOptions): Promise<PlayRunListItem[]>;
|
|
5929
5974
|
/** Read one run page without discarding server pagination metadata. */
|
|
5930
5975
|
listRunsPage(options: RunsListOptions): Promise<RunsListPage>;
|
|
5931
|
-
/** Read
|
|
5976
|
+
/** Read retained tool results without executing tools, preserving supplied key order and batching 100 keys per request. Obtain keys from exported evidence or execution metadata; each key must be nonempty, at most 2,048 characters and contain no CR, LF or NUL. Missing/expired results have an explicit per-key error. */
|
|
5932
5977
|
getRunReceipts(runId: string, options: {
|
|
5933
5978
|
keys: string[];
|
|
5934
5979
|
}): Promise<RunToolReceiptsResponse>;
|
|
@@ -5951,7 +5996,7 @@ declare class DeeplineClient {
|
|
|
5951
5996
|
*/
|
|
5952
5997
|
rerun(runId: string, options?: RerunOptions): Promise<RerunPlayRunResult>;
|
|
5953
5998
|
/**
|
|
5954
|
-
*
|
|
5999
|
+
* Read a run's retained text tail (default 200), full retained stream (`all`), or terminal failure window (`failed`, at most 20). These are existing reads; sampling and retention loss cannot be recovered. See [run logs and events](run-events.md) for structured search and payload retrieval.
|
|
5955
6000
|
*
|
|
5956
6001
|
* This is the SDK equivalent of:
|
|
5957
6002
|
*
|
|
@@ -5960,7 +6005,7 @@ declare class DeeplineClient {
|
|
|
5960
6005
|
* ```
|
|
5961
6006
|
*/
|
|
5962
6007
|
getRunLogs(runId: string, options?: RunsLogsOptions): Promise<RunsLogsResult>;
|
|
5963
|
-
/**
|
|
6008
|
+
/** Read structured history across the active organization without requiring a run ID. Defaults to the last hour, newest first; use the returned cursor and exact time bounds to continue. See [run logs and events](run-events.md) for all kinds, indexed fields, payloads and SDK/API response types. */
|
|
5964
6009
|
searchRunEvents(options?: RunsEventSearchOptions): Promise<RunsEventSearchResult>;
|
|
5965
6010
|
/**
|
|
5966
6011
|
* Export persisted runtime-sheet rows for a play dataset/table namespace.
|