deepline 0.3.271 → 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/play-runtime/activity-observation.ts +3 -2
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +11 -9
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +5 -4
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-event-catalog.ts +610 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-event-transport.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-diagnostics.ts +3 -2
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +80 -67
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +5 -4
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +3 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +19 -9
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +103 -78
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +125 -81
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +3 -2
- package/dist/cli/index.js +662 -39
- package/dist/cli/index.mjs +662 -39
- 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 +423 -4
- package/dist/index.mjs +423 -4
- package/dist/install-integrity.json +5 -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/README.md
CHANGED
|
@@ -38,6 +38,15 @@ with project-local skills automatically.
|
|
|
38
38
|
|
|
39
39
|
## Use it with an agent
|
|
40
40
|
|
|
41
|
+
For an existing run, start with `deepline runs logs --help`. It includes every
|
|
42
|
+
known event kind, what records it, available fields, filters, payload reads,
|
|
43
|
+
pagination and retention. `runs logs` reads text or structured events;
|
|
44
|
+
`runs get`, `runs watch`, `runs export` and `runs receipt` cover status, live
|
|
45
|
+
observation, dataset rows and retained tool results. These inspection commands
|
|
46
|
+
read existing evidence without starting provider work. TypeScript callers use
|
|
47
|
+
`client.runs.logs`, `client.runs.searchEvents` and `client.runs.getReceipts`;
|
|
48
|
+
their source JSDoc and the generated SDK/API references describe the same reads.
|
|
49
|
+
|
|
41
50
|
Paste this into Claude Code, Codex, or another coding agent:
|
|
42
51
|
|
|
43
52
|
```text
|
|
@@ -740,25 +740,33 @@ export type RunsWatchOptions = {
|
|
|
740
740
|
/** @deprecated Use `RunsWatchOptions`. */
|
|
741
741
|
export type RunsTailOptions = RunsWatchOptions;
|
|
742
742
|
|
|
743
|
-
/**
|
|
743
|
+
/** Read retained text with `client.runs.logs(...)`; use `runs.searchEvents` for structured filters and payloads. */
|
|
744
744
|
export type RunsLogsOptions = {
|
|
745
|
-
/** Return the
|
|
745
|
+
/** Return the last `limit` retained lines in sequence order; default 200. Ignored when `all` is true. */
|
|
746
746
|
limit?: number;
|
|
747
|
-
/**
|
|
747
|
+
/** Page through every retained line. Cannot combine with `failed`; sampling or retention loss cannot be recovered. */
|
|
748
748
|
all?: boolean;
|
|
749
|
-
/**
|
|
749
|
+
/** Read a terminal-failed run's last 20 retained lines, or fewer with `limit`. Retention loss returns an explicit association and warning. */
|
|
750
750
|
failed?: boolean;
|
|
751
751
|
};
|
|
752
752
|
|
|
753
|
-
/**
|
|
753
|
+
/** Retained text for one run. Counts and retention flags describe the stored stream, not every original console call. */
|
|
754
754
|
export type RunsLogsResult = {
|
|
755
|
+
/** Public run identity. */
|
|
755
756
|
runId: string;
|
|
757
|
+
/** Count tracked by the log stream; may exceed available bodies after retention truncation. */
|
|
756
758
|
totalCount: number;
|
|
759
|
+
/** Number of line bodies returned in `entries`. */
|
|
757
760
|
returnedCount: number;
|
|
761
|
+
/** First returned stored sequence, or null for an empty view. */
|
|
758
762
|
firstSequence: number | null;
|
|
763
|
+
/** Last returned stored sequence, or null for an empty view. */
|
|
759
764
|
lastSequence: number | null;
|
|
765
|
+
/** 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. */
|
|
760
766
|
truncated: boolean;
|
|
767
|
+
/** More retained lines exist after `lastSequence`; always false for the designed failure window. */
|
|
761
768
|
hasMore: boolean;
|
|
769
|
+
/** Formatted text lines in stored sequence order; structured context is available through event search. */
|
|
762
770
|
entries: string[];
|
|
763
771
|
/** Selected public log view. */
|
|
764
772
|
view?: 'tail' | 'failed' | 'all';
|
|
@@ -775,53 +783,77 @@ export type RunsLogsResult = {
|
|
|
775
783
|
logsTruncated?: boolean;
|
|
776
784
|
};
|
|
777
785
|
|
|
778
|
-
/**
|
|
786
|
+
/** 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`. */
|
|
779
787
|
export type RunsEventSearchOptions = {
|
|
780
788
|
/** Inclusive UTC timestamp; defaults to one hour before the request. */
|
|
781
789
|
since?: string;
|
|
782
|
-
/** Exclusive UTC timestamp; defaults to the request time. */
|
|
790
|
+
/** Exclusive UTC timestamp; defaults to the request time. A window spans at most seven days; event retention is seven days. */
|
|
783
791
|
until?: string;
|
|
784
792
|
/** Optional run filter. Omit to search across the active organization. */
|
|
785
793
|
runId?: string;
|
|
794
|
+
/** Exact Play name; HTTP query parameter `playName`, CLI `--play`. */
|
|
786
795
|
playName?: string;
|
|
796
|
+
/** Exact dotted event kind, such as `step.failed`. The catalog is discoverable with `runs logs --help`; future stored kinds are accepted too. */
|
|
787
797
|
kind?: string;
|
|
788
|
-
/**
|
|
798
|
+
/** 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`. */
|
|
789
799
|
jsonpath?: string;
|
|
790
|
-
/**
|
|
800
|
+
/** 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. */
|
|
791
801
|
includePayloads?: boolean;
|
|
802
|
+
/** Page size: default 100, maximum 200; with payloads, default and maximum ten. */
|
|
792
803
|
limit?: number;
|
|
804
|
+
/** Opaque `nextCursor` from the preceding page. Reuse that page's returned since/until and the same filters and runtime scope. */
|
|
793
805
|
cursor?: string;
|
|
794
806
|
/** Explicit Preview selection requires the existing runtime credential. */
|
|
795
807
|
runtime?: PlayRuntimeSelection;
|
|
796
808
|
};
|
|
797
809
|
|
|
810
|
+
/** One indexed observation; optional indexed fields and payloads depend on what its producer recorded. */
|
|
798
811
|
export type RunsEventSearchEntry = {
|
|
812
|
+
/** Stable event identity; also breaks ties in newest-first pagination. */
|
|
799
813
|
eventId: string;
|
|
814
|
+
/** Producer occurrence time as a UTC timestamp string. */
|
|
800
815
|
occurredAt: string;
|
|
816
|
+
/** Index ingestion time as a UTC timestamp string; may be later than occurrence. */
|
|
801
817
|
ingestedAt: string;
|
|
818
|
+
/** Public run identity associated with this observation. */
|
|
802
819
|
runId: string;
|
|
820
|
+
/** Recorded Play name. */
|
|
803
821
|
playName: string;
|
|
822
|
+
/** Exact indexed kind; canonical payloads use `type` for this dotted name. */
|
|
804
823
|
kind: string;
|
|
824
|
+
/** Recorded log severity, or null; not a JSONPath filter field. */
|
|
805
825
|
level: string | null;
|
|
826
|
+
/** Log message preview of at most 2,048 characters, or null. Use text logs/export for the full retained line. */
|
|
806
827
|
message: string | null;
|
|
828
|
+
/** 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. */
|
|
807
829
|
searchDoc: Record<string, unknown>;
|
|
808
|
-
/**
|
|
830
|
+
/** Stored canonical event details, only when payloads are requested and available. Lifecycle/activity/dataset payloads are observations, not complete tool responses or dataset rows. */
|
|
809
831
|
eventPayload?: Record<string, unknown>;
|
|
810
|
-
/**
|
|
832
|
+
/** Retained work result for a receipt match when payloads are requested; null if unavailable. Other events need not carry this field. */
|
|
811
833
|
payload?: RunsEventPayload | null;
|
|
812
834
|
};
|
|
813
835
|
|
|
836
|
+
/** One bounded search page. Continue using `nextCursor` and these exact time bounds; CLI-only counts and follow-up commands are not SDK/API fields. */
|
|
814
837
|
export type RunsEventSearchResult = {
|
|
838
|
+
/** Matching observations in descending occurredAt/eventId order. */
|
|
815
839
|
events: RunsEventSearchEntry[];
|
|
840
|
+
/** Opaque continuation token, or null when no further page exists. */
|
|
816
841
|
nextCursor: string | null;
|
|
842
|
+
/** Resolved inclusive UTC bound, including a defaulted bound. */
|
|
817
843
|
since: string;
|
|
844
|
+
/** Resolved exclusive UTC bound, including a defaulted bound. */
|
|
818
845
|
until: string;
|
|
819
846
|
};
|
|
820
847
|
|
|
848
|
+
/** Retained work outcome hydrated for a receipt event; not a new execution, billing receipt or guarantee of a raw HTTP response. */
|
|
821
849
|
export type RunsEventPayload = {
|
|
850
|
+
/** Recorded terminal work outcome. */
|
|
822
851
|
status: 'completed' | 'failed' | 'skipped';
|
|
852
|
+
/** Stored result data, or null when no output was retained. */
|
|
823
853
|
output: unknown | null;
|
|
854
|
+
/** Stored failure message, or null when absent. */
|
|
824
855
|
error: string | null;
|
|
856
|
+
/** Stored structured failure details, or null when absent. */
|
|
825
857
|
errorPayload: unknown | null;
|
|
826
858
|
};
|
|
827
859
|
|
|
@@ -902,7 +934,7 @@ export type PlaySecretCheck = {
|
|
|
902
934
|
* @sdkReference client 020 client.runs
|
|
903
935
|
*/
|
|
904
936
|
export type RunsNamespace = {
|
|
905
|
-
/** Read retained tool results
|
|
937
|
+
/** 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. */
|
|
906
938
|
getReceipts: (
|
|
907
939
|
runId: string,
|
|
908
940
|
options: { keys: string[] },
|
|
@@ -937,9 +969,9 @@ export type RunsNamespace = {
|
|
|
937
969
|
watch: (runId: string, options?: RunsWatchOptions) => Promise<PlayStatus>;
|
|
938
970
|
/** @deprecated Use `watch`; retained as a source-compatible alias. */
|
|
939
971
|
tail: (runId: string, options?: RunsTailOptions) => Promise<PlayStatus>;
|
|
940
|
-
/**
|
|
972
|
+
/** 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). */
|
|
941
973
|
logs: (runId: string, options?: RunsLogsOptions) => Promise<RunsLogsResult>;
|
|
942
|
-
/** Search
|
|
974
|
+
/** 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. */
|
|
943
975
|
searchEvents: (
|
|
944
976
|
options?: RunsEventSearchOptions,
|
|
945
977
|
) => Promise<RunsEventSearchResult>;
|
|
@@ -4342,7 +4374,7 @@ export class DeeplineClient {
|
|
|
4342
4374
|
return { ...response, runs: response.runs ?? [] };
|
|
4343
4375
|
}
|
|
4344
4376
|
|
|
4345
|
-
/** Read
|
|
4377
|
+
/** 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. */
|
|
4346
4378
|
async getRunReceipts(
|
|
4347
4379
|
runId: string,
|
|
4348
4380
|
options: { keys: string[] },
|
|
@@ -4426,7 +4458,7 @@ export class DeeplineClient {
|
|
|
4426
4458
|
}
|
|
4427
4459
|
|
|
4428
4460
|
/**
|
|
4429
|
-
*
|
|
4461
|
+
* 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.
|
|
4430
4462
|
*
|
|
4431
4463
|
* This is the SDK equivalent of:
|
|
4432
4464
|
*
|
|
@@ -4525,7 +4557,7 @@ export class DeeplineClient {
|
|
|
4525
4557
|
};
|
|
4526
4558
|
}
|
|
4527
4559
|
|
|
4528
|
-
/**
|
|
4560
|
+
/** 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. */
|
|
4529
4561
|
async searchRunEvents(
|
|
4530
4562
|
options: RunsEventSearchOptions = {},
|
|
4531
4563
|
): Promise<RunsEventSearchResult> {
|
|
@@ -200,7 +200,7 @@ export const SDK_RELEASE = {
|
|
|
200
200
|
// getters keep their established compatibility behavior.
|
|
201
201
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
202
202
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
203
|
-
version: '0.3.
|
|
203
|
+
version: '0.3.273',
|
|
204
204
|
updateSummary:
|
|
205
205
|
'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.',
|
|
206
206
|
packageCapabilities: {
|
|
@@ -1,23 +1,39 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** 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. */
|
|
2
2
|
export type RunToolReceiptResult = {
|
|
3
|
+
/** Exact key supplied to the read, obtained from exported evidence or execution metadata. */
|
|
3
4
|
receiptKey: string;
|
|
5
|
+
/** Recorded work status when available; an error does not imply a fresh provider failure. */
|
|
4
6
|
status?: string;
|
|
5
7
|
} & (
|
|
6
8
|
| {
|
|
9
|
+
/** Retained result envelope; provider fields reflect stored evidence, not a guaranteed raw HTTP response. */
|
|
7
10
|
result: {
|
|
11
|
+
/** Status recorded in the tool result. */
|
|
8
12
|
status: string;
|
|
13
|
+
/** Provider job identity when recorded. */
|
|
9
14
|
job_id?: string;
|
|
15
|
+
/** Stored tool response. */
|
|
10
16
|
toolResponse: Record<string, unknown>;
|
|
17
|
+
/** Stored target values when the tool supplied them. */
|
|
11
18
|
targetValues?: Record<string, unknown>;
|
|
19
|
+
/** Stored list dataset metadata when supplied. */
|
|
12
20
|
listDatasets?: Record<string, unknown>;
|
|
21
|
+
/** Stored list row evidence when supplied. */
|
|
13
22
|
listRows?: Record<string, unknown>;
|
|
14
23
|
};
|
|
15
24
|
error?: never;
|
|
16
25
|
}
|
|
17
|
-
| {
|
|
26
|
+
| {
|
|
27
|
+
result?: never;
|
|
28
|
+
/** Explicit lookup/access/retention failure for this key. */
|
|
29
|
+
error: { code: string; message: string };
|
|
30
|
+
}
|
|
18
31
|
);
|
|
19
32
|
|
|
33
|
+
/** Results in the exact requested key order, including errors for unavailable keys. */
|
|
20
34
|
export type RunToolReceiptsResponse = {
|
|
35
|
+
/** Public run identity used to scope the read. */
|
|
21
36
|
runId: string;
|
|
37
|
+
/** One result or error per requested key. */
|
|
22
38
|
receipts: RunToolReceiptResult[];
|
|
23
39
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RUN_EVENT_KIND } from './run-event-catalog';
|
|
1
2
|
/**
|
|
2
3
|
* Canonical, producer-facing description of what a play is doing.
|
|
3
4
|
*
|
|
@@ -117,7 +118,7 @@ export type PlayActivityObservation = {
|
|
|
117
118
|
};
|
|
118
119
|
|
|
119
120
|
export type PlayActivityEvent = {
|
|
120
|
-
type:
|
|
121
|
+
type: typeof RUN_EVENT_KIND.activityObserved;
|
|
121
122
|
observation: PlayActivityObservation;
|
|
122
123
|
};
|
|
123
124
|
|
|
@@ -357,7 +358,7 @@ export function createPlayActivityReporter(input: {
|
|
|
357
358
|
return {
|
|
358
359
|
observe(observation) {
|
|
359
360
|
input.emit({
|
|
360
|
-
type:
|
|
361
|
+
type: RUN_EVENT_KIND.activityObserved,
|
|
361
362
|
observation: {
|
|
362
363
|
...observation,
|
|
363
364
|
observedAt: observation.observedAt ?? input.now?.() ?? Date.now(),
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RUN_EVENT_KIND,
|
|
3
|
+
RUN_EVENT_TERMINAL_KIND_VALUES,
|
|
4
|
+
} from './run-event-catalog';
|
|
1
5
|
import { prepareRetainedPlayPipelinesForTransport } from '../plays/execution-pipeline';
|
|
2
6
|
import { createWriteStream } from 'node:fs';
|
|
3
7
|
import { createHash, randomUUID } from 'node:crypto';
|
|
@@ -2257,7 +2261,7 @@ async function updateRunStatusViaAppRuntimeUnlocked(
|
|
|
2257
2261
|
});
|
|
2258
2262
|
if (update.workCounters) {
|
|
2259
2263
|
events.push({
|
|
2260
|
-
type:
|
|
2264
|
+
type: RUN_EVENT_KIND.workCounters,
|
|
2261
2265
|
runId: update.playId,
|
|
2262
2266
|
source: 'worker',
|
|
2263
2267
|
occurredAt: update.lastCheckpointAt ?? Date.now(),
|
|
@@ -2283,7 +2287,7 @@ async function updateRunStatusViaAppRuntimeUnlocked(
|
|
|
2283
2287
|
event.bornFrom.rowCountIn > current.bornFrom.rowCountIn));
|
|
2284
2288
|
if (!changesSnapshot) continue;
|
|
2285
2289
|
events.push({
|
|
2286
|
-
type:
|
|
2290
|
+
type: RUN_EVENT_KIND.datasetLifecycle,
|
|
2287
2291
|
runId: update.playId,
|
|
2288
2292
|
source: 'worker',
|
|
2289
2293
|
occurredAt: event.at,
|
|
@@ -2315,7 +2319,7 @@ async function updateRunStatusViaAppRuntimeUnlocked(
|
|
|
2315
2319
|
});
|
|
2316
2320
|
if (lane === 'drop' || lane === 'liveness') continue;
|
|
2317
2321
|
events.push({
|
|
2318
|
-
type:
|
|
2322
|
+
type: RUN_EVENT_KIND.activityObserved,
|
|
2319
2323
|
runId: update.playId,
|
|
2320
2324
|
source: 'worker',
|
|
2321
2325
|
occurredAt: observation.observedAt,
|
|
@@ -2461,9 +2465,7 @@ function runLedgerReceiptBatchIndex(
|
|
|
2461
2465
|
for (let index = batches.length - 1; index >= 0; index -= 1) {
|
|
2462
2466
|
if (
|
|
2463
2467
|
batches[index]!.some((event) =>
|
|
2464
|
-
|
|
2465
|
-
event.key ?? event.type ?? '',
|
|
2466
|
-
),
|
|
2468
|
+
RUN_EVENT_TERMINAL_KIND_VALUES.includes(event.key ?? event.type ?? ''),
|
|
2467
2469
|
)
|
|
2468
2470
|
)
|
|
2469
2471
|
return index;
|
|
@@ -2500,9 +2502,9 @@ export async function appendRunEventsViaAppRuntime(
|
|
|
2500
2502
|
batches[index]!.some((event) => {
|
|
2501
2503
|
const key = event.key ?? event.type;
|
|
2502
2504
|
return (
|
|
2503
|
-
key ===
|
|
2504
|
-
key ===
|
|
2505
|
-
key ===
|
|
2505
|
+
key === RUN_EVENT_KIND.runCompleted ||
|
|
2506
|
+
key === RUN_EVENT_KIND.runFailed ||
|
|
2507
|
+
key === RUN_EVENT_KIND.runCancelled
|
|
2506
2508
|
);
|
|
2507
2509
|
})
|
|
2508
2510
|
) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RUN_EVENT_KIND } from './run-event-catalog';
|
|
1
2
|
/**
|
|
2
3
|
* PlayContextImpl — the cloud execution engine.
|
|
3
4
|
*
|
|
@@ -14728,7 +14729,7 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
|
|
|
14728
14729
|
const observedAt = Date.now();
|
|
14729
14730
|
const label = providerCapacityLabel(provider);
|
|
14730
14731
|
this.emitExecutionEvent({
|
|
14731
|
-
type:
|
|
14732
|
+
type: RUN_EVENT_KIND.activityObserved,
|
|
14732
14733
|
observation: {
|
|
14733
14734
|
activityId: `capacity:provider:${label}`,
|
|
14734
14735
|
target: { kind: 'capacity', pool: 'provider', label },
|
|
@@ -20524,7 +20525,7 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
|
|
|
20524
20525
|
);
|
|
20525
20526
|
retryActivityEmitted = true;
|
|
20526
20527
|
this.emitExecutionEvent({
|
|
20527
|
-
type:
|
|
20528
|
+
type: RUN_EVENT_KIND.activityObserved,
|
|
20528
20529
|
observation: {
|
|
20529
20530
|
schemaVersion: 1,
|
|
20530
20531
|
activityId,
|
|
@@ -20561,7 +20562,7 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
|
|
|
20561
20562
|
deeplineRequestId = `ctx-tool-${stableDigest(`${executionRequestNonce}:provider-rate-limit-retry:${invocationAttempt}`).slice(0, 32)}`;
|
|
20562
20563
|
}
|
|
20563
20564
|
this.emitExecutionEvent({
|
|
20564
|
-
type:
|
|
20565
|
+
type: RUN_EVENT_KIND.activityObserved,
|
|
20565
20566
|
observation: {
|
|
20566
20567
|
schemaVersion: 1,
|
|
20567
20568
|
activityId,
|
|
@@ -20654,7 +20655,7 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
|
|
|
20654
20655
|
toolInputSnapshotMemory.current?.release();
|
|
20655
20656
|
if (retryActivityEmitted) {
|
|
20656
20657
|
this.emitExecutionEvent({
|
|
20657
|
-
type:
|
|
20658
|
+
type: RUN_EVENT_KIND.activityObserved,
|
|
20658
20659
|
observation: {
|
|
20659
20660
|
schemaVersion: 1,
|
|
20660
20661
|
activityId,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RUN_EVENT_KIND } from './run-event-catalog';
|
|
1
2
|
// Core types for PlayContext.
|
|
2
3
|
import type {
|
|
3
4
|
PlayCellReadRef,
|
|
@@ -572,7 +573,7 @@ export type PlayExecutionEvent =
|
|
|
572
573
|
at: number;
|
|
573
574
|
}
|
|
574
575
|
| {
|
|
575
|
-
type:
|
|
576
|
+
type: typeof RUN_EVENT_KIND.datasetLifecycle;
|
|
576
577
|
datasetId: string;
|
|
577
578
|
path: string;
|
|
578
579
|
tableNamespace: string;
|