deepline 0.3.48 → 0.3.49
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/client.ts +6 -36
- package/dist/bundling-sources/sdk/src/http.ts +1 -4
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +1 -61
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +0 -26
- package/dist/cli/index.js +10 -25
- package/dist/cli/index.mjs +10 -25
- package/dist/index.d.mts +0 -8
- package/dist/index.d.ts +0 -8
- package/dist/index.js +9 -24
- package/dist/index.mjs +9 -24
- package/package.json +1 -1
|
@@ -3106,14 +3106,6 @@ export class DeeplineClient {
|
|
|
3106
3106
|
signal?: AbortSignal;
|
|
3107
3107
|
lastEventId?: string;
|
|
3108
3108
|
mode?: 'cli' | 'ui';
|
|
3109
|
-
/**
|
|
3110
|
-
* A run just accepted by durable scheduler admission can take a short
|
|
3111
|
-
* time to appear in the asynchronous Convex read model. Callers that
|
|
3112
|
-
* received that admission may opt into a bounded retry of the initial
|
|
3113
|
-
* pending response; a normal arbitrary run id still fails loudly by
|
|
3114
|
-
* default.
|
|
3115
|
-
*/
|
|
3116
|
-
waitForProjection?: boolean;
|
|
3117
3109
|
},
|
|
3118
3110
|
): AsyncGenerator<PlayLiveEvent> {
|
|
3119
3111
|
const headers =
|
|
@@ -3122,33 +3114,12 @@ export class DeeplineClient {
|
|
|
3122
3114
|
: undefined;
|
|
3123
3115
|
const params = new URLSearchParams();
|
|
3124
3116
|
params.set('mode', options?.mode ?? 'cli');
|
|
3125
|
-
const
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
3132
|
-
{ signal: options?.signal, headers },
|
|
3133
|
-
)) {
|
|
3134
|
-
sawEvent = true;
|
|
3135
|
-
if (event.scope === 'play') {
|
|
3136
|
-
yield event;
|
|
3137
|
-
}
|
|
3138
|
-
}
|
|
3139
|
-
return;
|
|
3140
|
-
} catch (error) {
|
|
3141
|
-
const projectionPending =
|
|
3142
|
-
options?.waitForProjection === true &&
|
|
3143
|
-
!sawEvent &&
|
|
3144
|
-
error instanceof DeeplineError &&
|
|
3145
|
-
(error.statusCode === 404 ||
|
|
3146
|
-
(error.statusCode === 202 &&
|
|
3147
|
-
error.code === 'RUN_PROJECTION_PENDING')) &&
|
|
3148
|
-
Date.now() < projectionDeadline;
|
|
3149
|
-
if (!projectionPending) throw error;
|
|
3150
|
-
await sleep(streamReconnectDelayMs(projectionAttempt));
|
|
3151
|
-
projectionAttempt += 1;
|
|
3117
|
+
for await (const event of this.http.streamSse<PlayLiveEvent>(
|
|
3118
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
3119
|
+
{ signal: options?.signal, headers },
|
|
3120
|
+
)) {
|
|
3121
|
+
if (event.scope === 'play') {
|
|
3122
|
+
yield event;
|
|
3152
3123
|
}
|
|
3153
3124
|
}
|
|
3154
3125
|
}
|
|
@@ -4468,7 +4439,6 @@ export class DeeplineClient {
|
|
|
4468
4439
|
for await (const event of this.streamPlayRunEvents(workflowId, {
|
|
4469
4440
|
mode: 'cli',
|
|
4470
4441
|
signal: options?.signal,
|
|
4471
|
-
waitForProjection: true,
|
|
4472
4442
|
})) {
|
|
4473
4443
|
if (options?.signal?.aborted) {
|
|
4474
4444
|
await this.cancelPlay(workflowId);
|
|
@@ -621,10 +621,7 @@ export class HttpClient {
|
|
|
621
621
|
signal: options?.signal,
|
|
622
622
|
});
|
|
623
623
|
|
|
624
|
-
|
|
625
|
-
// request. A 202 JSON response is a deliberately retryable admission
|
|
626
|
-
// state, not an empty, successfully completed stream.
|
|
627
|
-
if (!response.ok || response.status === 202) {
|
|
624
|
+
if (!response.ok) {
|
|
628
625
|
const body = await response.text();
|
|
629
626
|
const parsed = parseResponseBody(body);
|
|
630
627
|
if (
|
|
@@ -199,7 +199,7 @@ export const SDK_RELEASE = {
|
|
|
199
199
|
// available at toolResponse.rawV2 while toolResponse.raw and all declared
|
|
200
200
|
// getters keep their established compatibility behavior.
|
|
201
201
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
202
|
-
version: '0.3.
|
|
202
|
+
version: '0.3.49',
|
|
203
203
|
updateSummary:
|
|
204
204
|
'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.',
|
|
205
205
|
packageCapabilities: {
|
|
@@ -156,7 +156,6 @@ type RuntimeApiRequest =
|
|
|
156
156
|
action: 'start_run';
|
|
157
157
|
idempotencyKey?: string;
|
|
158
158
|
playName: string;
|
|
159
|
-
playReference?: string | null;
|
|
160
159
|
runId: string;
|
|
161
160
|
artifactStorageKey?: string | null;
|
|
162
161
|
artifactHash?: string | null;
|
|
@@ -173,45 +172,6 @@ type RuntimeApiRequest =
|
|
|
173
172
|
inputSha256?: string;
|
|
174
173
|
replayedFromRunId?: string | null;
|
|
175
174
|
}
|
|
176
|
-
| {
|
|
177
|
-
/** Ordered projection of a Runtime Postgres/Absurd admission. */
|
|
178
|
-
action: 'project_run_created';
|
|
179
|
-
idempotencyKey?: string;
|
|
180
|
-
playName: string;
|
|
181
|
-
playReference?: string | null;
|
|
182
|
-
workflowId: string;
|
|
183
|
-
runId: string;
|
|
184
|
-
workflowFamilyKey: string;
|
|
185
|
-
definitionScope?: 'org' | 'system';
|
|
186
|
-
revisionId?: string | null;
|
|
187
|
-
artifactStorageKey?: string | null;
|
|
188
|
-
artifactHash?: string | null;
|
|
189
|
-
graphHash?: string | null;
|
|
190
|
-
runtimeBackend?: string | null;
|
|
191
|
-
schedulerBackend?: string | null;
|
|
192
|
-
schedulerSchema?: string | null;
|
|
193
|
-
executionProfile?: string | null;
|
|
194
|
-
runtimeReleaseId?: string | null;
|
|
195
|
-
runtimeDeployVersion?: string | null;
|
|
196
|
-
runtimeCallbackBaseUrl?: string | null;
|
|
197
|
-
coordinatorUrl?: string | null;
|
|
198
|
-
coordinatorWorkerName?: string | null;
|
|
199
|
-
runtimeWorkflowName?: string | null;
|
|
200
|
-
runtimeHarnessWorkerName?: string | null;
|
|
201
|
-
maxCreditsPerRun?: number | null;
|
|
202
|
-
staticPipeline?: unknown;
|
|
203
|
-
source?: 'published' | 'ad_hoc' | 'draft';
|
|
204
|
-
triggerSource?: 'webhook' | 'cron' | 'sql_listener' | 'api';
|
|
205
|
-
inputFileId?: string;
|
|
206
|
-
inputBytes?: number;
|
|
207
|
-
inputSha256?: string;
|
|
208
|
-
replayedFromRunId?: string | null;
|
|
209
|
-
secretRefs?: unknown[];
|
|
210
|
-
inputSummary?: Record<string, unknown>;
|
|
211
|
-
/** Terminal bypass used only when the causal admission projection is
|
|
212
|
-
* permanently blocked and no queued row can be projected. */
|
|
213
|
-
admissionFailure?: string;
|
|
214
|
-
}
|
|
215
175
|
| ({
|
|
216
176
|
action: 'save_results';
|
|
217
177
|
} & RuntimeSaveResults)
|
|
@@ -708,8 +668,7 @@ function isRetryableAppRuntimeAction(
|
|
|
708
668
|
action === 'release_runtime_step_receipt' ||
|
|
709
669
|
action === 'save_results' ||
|
|
710
670
|
action === 'skip_runtime_step_receipt' ||
|
|
711
|
-
action === 'start_run'
|
|
712
|
-
action === 'project_run_created'
|
|
671
|
+
action === 'start_run'
|
|
713
672
|
);
|
|
714
673
|
}
|
|
715
674
|
|
|
@@ -1966,7 +1925,6 @@ export async function startRunViaAppRuntime(
|
|
|
1966
1925
|
context: WorkerRuntimeApiContext,
|
|
1967
1926
|
input: {
|
|
1968
1927
|
playName: string;
|
|
1969
|
-
playReference?: string | null;
|
|
1970
1928
|
runId: string;
|
|
1971
1929
|
artifactStorageKey?: string | null;
|
|
1972
1930
|
artifactHash?: string | null;
|
|
@@ -1991,24 +1949,6 @@ export async function startRunViaAppRuntime(
|
|
|
1991
1949
|
});
|
|
1992
1950
|
}
|
|
1993
1951
|
|
|
1994
|
-
/**
|
|
1995
|
-
* Deliver the causally-first `run.created` projection after Runtime Postgres
|
|
1996
|
-
* has atomically admitted the run and its Absurd task. It is safe to retry:
|
|
1997
|
-
* the server preserves any existing queued, running, or terminal run.
|
|
1998
|
-
*/
|
|
1999
|
-
export async function projectRunCreatedViaAppRuntime(
|
|
2000
|
-
context: WorkerRuntimeApiContext,
|
|
2001
|
-
input: Omit<
|
|
2002
|
-
Extract<RuntimeApiRequest, { action: 'project_run_created' }>,
|
|
2003
|
-
'action'
|
|
2004
|
-
>,
|
|
2005
|
-
): Promise<void> {
|
|
2006
|
-
await postAppRuntimeApi<{ ok: true; status: 'queued' }>(context, {
|
|
2007
|
-
action: 'project_run_created',
|
|
2008
|
-
...input,
|
|
2009
|
-
});
|
|
2010
|
-
}
|
|
2011
|
-
|
|
2012
1952
|
export async function saveResultsViaAppRuntime(
|
|
2013
1953
|
context: WorkerRuntimeApiContext,
|
|
2014
1954
|
input: RuntimeSaveResults,
|
|
@@ -42,15 +42,7 @@ export type { PlayRunInputPayload };
|
|
|
42
42
|
export type PlaySchedulerSubmitInput = {
|
|
43
43
|
runId: string;
|
|
44
44
|
playId: string;
|
|
45
|
-
/** Canonical definition name used by the Convex read-model projector. */
|
|
46
|
-
definitionName?: string | null;
|
|
47
45
|
playName: string;
|
|
48
|
-
/** Immutable display/lookup name selected at admission, if distinct. */
|
|
49
|
-
playReference?: string | null;
|
|
50
|
-
/** Definition ownership selected at admission; never re-resolve on replay. */
|
|
51
|
-
definitionScope?: 'org' | 'system' | null;
|
|
52
|
-
/** Immutable published revision selected at admission. */
|
|
53
|
-
revisionId?: string | null;
|
|
54
46
|
workflowFamilyKey?: string | null;
|
|
55
47
|
artifactStorageKey: string;
|
|
56
48
|
/** Optional inline artifact for the Node scheduler. */
|
|
@@ -60,10 +52,6 @@ export type PlaySchedulerSubmitInput = {
|
|
|
60
52
|
/** Immutable scheduler/worker/runner ABI snapshot (not a Git SHA). */
|
|
61
53
|
runtimeProtocolVersion?: PlayRuntimeProtocolVersion | null;
|
|
62
54
|
input: PlayRunInputPayload;
|
|
63
|
-
/** Immutable secret authority selected at admission; never re-resolve on projection. */
|
|
64
|
-
secretRefs?: unknown[];
|
|
65
|
-
/** Display-only, size-bounded projection of the admitted input. */
|
|
66
|
-
inputSummary?: Record<string, unknown>;
|
|
67
55
|
/** Convex metadata for the exact input saved before scheduler submission. */
|
|
68
56
|
inputFileId?: string;
|
|
69
57
|
inputBytes?: number;
|
|
@@ -83,8 +71,6 @@ export type PlaySchedulerSubmitInput = {
|
|
|
83
71
|
storageKey?: string;
|
|
84
72
|
fileName?: string;
|
|
85
73
|
logicalPath?: string;
|
|
86
|
-
storageKind?: 'r2';
|
|
87
|
-
contentHash?: string;
|
|
88
74
|
contentType?: string;
|
|
89
75
|
bytes?: number;
|
|
90
76
|
} | null;
|
|
@@ -101,8 +87,6 @@ export type PlaySchedulerSubmitInput = {
|
|
|
101
87
|
logicalPath?: string;
|
|
102
88
|
fileName?: string;
|
|
103
89
|
storageKey: string;
|
|
104
|
-
storageKind?: 'r2';
|
|
105
|
-
contentHash?: string;
|
|
106
90
|
contentType?: string;
|
|
107
91
|
bytes?: number;
|
|
108
92
|
inlineText?: string;
|
|
@@ -152,16 +136,6 @@ export type PlaySchedulerSubmitInput = {
|
|
|
152
136
|
*/
|
|
153
137
|
queuePriority?: number | null;
|
|
154
138
|
executionProfile?: string | null;
|
|
155
|
-
/** Concrete Runtime Postgres namespace selected at admission. */
|
|
156
|
-
schedulerSchema?: string | null;
|
|
157
|
-
/** Immutable release tuple for the Convex read-model projection. */
|
|
158
|
-
runtimeReleaseId?: string | null;
|
|
159
|
-
runtimeCallbackBaseUrl?: string | null;
|
|
160
|
-
coordinatorWorkerName?: string | null;
|
|
161
|
-
runtimeWorkflowName?: string | null;
|
|
162
|
-
runtimeHarnessWorkerName?: string | null;
|
|
163
|
-
/** Billing admission cap from the immutable contract snapshot. */
|
|
164
|
-
maxCreditsPerRun?: number | null;
|
|
165
139
|
/** runner backend to use for executing attempts */
|
|
166
140
|
runtimeBackend: string;
|
|
167
141
|
/**
|
package/dist/cli/index.js
CHANGED
|
@@ -1079,7 +1079,7 @@ var SDK_RELEASE = {
|
|
|
1079
1079
|
// available at toolResponse.rawV2 while toolResponse.raw and all declared
|
|
1080
1080
|
// getters keep their established compatibility behavior.
|
|
1081
1081
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
1082
|
-
version: "0.3.
|
|
1082
|
+
version: "0.3.49",
|
|
1083
1083
|
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.",
|
|
1084
1084
|
packageCapabilities: {
|
|
1085
1085
|
updatePreferences: 1
|
|
@@ -1968,7 +1968,7 @@ var HttpClient = class {
|
|
|
1968
1968
|
body: options?.body !== void 0 ? JSON.stringify(options.body) : void 0,
|
|
1969
1969
|
signal: options?.signal
|
|
1970
1970
|
});
|
|
1971
|
-
if (!response.ok
|
|
1971
|
+
if (!response.ok) {
|
|
1972
1972
|
const body = await response.text();
|
|
1973
1973
|
const parsed = parseResponseBody(body);
|
|
1974
1974
|
if (response.status === 401 && !isProviderOriginatedHttpError(parsed)) {
|
|
@@ -5697,26 +5697,12 @@ var DeeplineClient = class {
|
|
|
5697
5697
|
const headers = options?.lastEventId && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
|
|
5698
5698
|
const params = new URLSearchParams();
|
|
5699
5699
|
params.set("mode", options?.mode ?? "cli");
|
|
5700
|
-
const
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
5707
|
-
{ signal: options?.signal, headers }
|
|
5708
|
-
)) {
|
|
5709
|
-
sawEvent = true;
|
|
5710
|
-
if (event.scope === "play") {
|
|
5711
|
-
yield event;
|
|
5712
|
-
}
|
|
5713
|
-
}
|
|
5714
|
-
return;
|
|
5715
|
-
} catch (error) {
|
|
5716
|
-
const projectionPending = options?.waitForProjection === true && !sawEvent && error instanceof DeeplineError && (error.statusCode === 404 || error.statusCode === 202 && error.code === "RUN_PROJECTION_PENDING") && Date.now() < projectionDeadline;
|
|
5717
|
-
if (!projectionPending) throw error;
|
|
5718
|
-
await sleep2(streamReconnectDelayMs(projectionAttempt));
|
|
5719
|
-
projectionAttempt += 1;
|
|
5700
|
+
for await (const event of this.http.streamSse(
|
|
5701
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
5702
|
+
{ signal: options?.signal, headers }
|
|
5703
|
+
)) {
|
|
5704
|
+
if (event.scope === "play") {
|
|
5705
|
+
yield event;
|
|
5720
5706
|
}
|
|
5721
5707
|
}
|
|
5722
5708
|
}
|
|
@@ -6745,8 +6731,7 @@ var DeeplineClient = class {
|
|
|
6745
6731
|
}
|
|
6746
6732
|
for await (const event of this.streamPlayRunEvents(workflowId, {
|
|
6747
6733
|
mode: "cli",
|
|
6748
|
-
signal: options?.signal
|
|
6749
|
-
waitForProjection: true
|
|
6734
|
+
signal: options?.signal
|
|
6750
6735
|
})) {
|
|
6751
6736
|
if (options?.signal?.aborted) {
|
|
6752
6737
|
await this.cancelPlay(workflowId);
|
|
@@ -20779,7 +20764,7 @@ async function waitForPlayCompletionByStream(input2) {
|
|
|
20779
20764
|
try {
|
|
20780
20765
|
for await (const event of input2.client.streamPlayRunEvents(
|
|
20781
20766
|
input2.workflowId,
|
|
20782
|
-
{ signal: controller.signal
|
|
20767
|
+
{ signal: controller.signal }
|
|
20783
20768
|
)) {
|
|
20784
20769
|
sawEvent = true;
|
|
20785
20770
|
const terminal = await handleLiveEvent(event);
|
package/dist/cli/index.mjs
CHANGED
|
@@ -1065,7 +1065,7 @@ var SDK_RELEASE = {
|
|
|
1065
1065
|
// available at toolResponse.rawV2 while toolResponse.raw and all declared
|
|
1066
1066
|
// getters keep their established compatibility behavior.
|
|
1067
1067
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
1068
|
-
version: "0.3.
|
|
1068
|
+
version: "0.3.49",
|
|
1069
1069
|
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.",
|
|
1070
1070
|
packageCapabilities: {
|
|
1071
1071
|
updatePreferences: 1
|
|
@@ -1954,7 +1954,7 @@ var HttpClient = class {
|
|
|
1954
1954
|
body: options?.body !== void 0 ? JSON.stringify(options.body) : void 0,
|
|
1955
1955
|
signal: options?.signal
|
|
1956
1956
|
});
|
|
1957
|
-
if (!response.ok
|
|
1957
|
+
if (!response.ok) {
|
|
1958
1958
|
const body = await response.text();
|
|
1959
1959
|
const parsed = parseResponseBody(body);
|
|
1960
1960
|
if (response.status === 401 && !isProviderOriginatedHttpError(parsed)) {
|
|
@@ -5683,26 +5683,12 @@ var DeeplineClient = class {
|
|
|
5683
5683
|
const headers = options?.lastEventId && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
|
|
5684
5684
|
const params = new URLSearchParams();
|
|
5685
5685
|
params.set("mode", options?.mode ?? "cli");
|
|
5686
|
-
const
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
5693
|
-
{ signal: options?.signal, headers }
|
|
5694
|
-
)) {
|
|
5695
|
-
sawEvent = true;
|
|
5696
|
-
if (event.scope === "play") {
|
|
5697
|
-
yield event;
|
|
5698
|
-
}
|
|
5699
|
-
}
|
|
5700
|
-
return;
|
|
5701
|
-
} catch (error) {
|
|
5702
|
-
const projectionPending = options?.waitForProjection === true && !sawEvent && error instanceof DeeplineError && (error.statusCode === 404 || error.statusCode === 202 && error.code === "RUN_PROJECTION_PENDING") && Date.now() < projectionDeadline;
|
|
5703
|
-
if (!projectionPending) throw error;
|
|
5704
|
-
await sleep2(streamReconnectDelayMs(projectionAttempt));
|
|
5705
|
-
projectionAttempt += 1;
|
|
5686
|
+
for await (const event of this.http.streamSse(
|
|
5687
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
5688
|
+
{ signal: options?.signal, headers }
|
|
5689
|
+
)) {
|
|
5690
|
+
if (event.scope === "play") {
|
|
5691
|
+
yield event;
|
|
5706
5692
|
}
|
|
5707
5693
|
}
|
|
5708
5694
|
}
|
|
@@ -6731,8 +6717,7 @@ var DeeplineClient = class {
|
|
|
6731
6717
|
}
|
|
6732
6718
|
for await (const event of this.streamPlayRunEvents(workflowId, {
|
|
6733
6719
|
mode: "cli",
|
|
6734
|
-
signal: options?.signal
|
|
6735
|
-
waitForProjection: true
|
|
6720
|
+
signal: options?.signal
|
|
6736
6721
|
})) {
|
|
6737
6722
|
if (options?.signal?.aborted) {
|
|
6738
6723
|
await this.cancelPlay(workflowId);
|
|
@@ -20842,7 +20827,7 @@ async function waitForPlayCompletionByStream(input2) {
|
|
|
20842
20827
|
try {
|
|
20843
20828
|
for await (const event of input2.client.streamPlayRunEvents(
|
|
20844
20829
|
input2.workflowId,
|
|
20845
|
-
{ signal: controller.signal
|
|
20830
|
+
{ signal: controller.signal }
|
|
20846
20831
|
)) {
|
|
20847
20832
|
sawEvent = true;
|
|
20848
20833
|
const terminal = await handleLiveEvent(event);
|
package/dist/index.d.mts
CHANGED
|
@@ -3213,14 +3213,6 @@ declare class DeeplineClient {
|
|
|
3213
3213
|
signal?: AbortSignal;
|
|
3214
3214
|
lastEventId?: string;
|
|
3215
3215
|
mode?: 'cli' | 'ui';
|
|
3216
|
-
/**
|
|
3217
|
-
* A run just accepted by durable scheduler admission can take a short
|
|
3218
|
-
* time to appear in the asynchronous Convex read model. Callers that
|
|
3219
|
-
* received that admission may opt into a bounded retry of the initial
|
|
3220
|
-
* pending response; a normal arbitrary run id still fails loudly by
|
|
3221
|
-
* default.
|
|
3222
|
-
*/
|
|
3223
|
-
waitForProjection?: boolean;
|
|
3224
3216
|
}): AsyncGenerator<PlayLiveEvent>;
|
|
3225
3217
|
/**
|
|
3226
3218
|
* Cancel a running play execution.
|
package/dist/index.d.ts
CHANGED
|
@@ -3213,14 +3213,6 @@ declare class DeeplineClient {
|
|
|
3213
3213
|
signal?: AbortSignal;
|
|
3214
3214
|
lastEventId?: string;
|
|
3215
3215
|
mode?: 'cli' | 'ui';
|
|
3216
|
-
/**
|
|
3217
|
-
* A run just accepted by durable scheduler admission can take a short
|
|
3218
|
-
* time to appear in the asynchronous Convex read model. Callers that
|
|
3219
|
-
* received that admission may opt into a bounded retry of the initial
|
|
3220
|
-
* pending response; a normal arbitrary run id still fails loudly by
|
|
3221
|
-
* default.
|
|
3222
|
-
*/
|
|
3223
|
-
waitForProjection?: boolean;
|
|
3224
3216
|
}): AsyncGenerator<PlayLiveEvent>;
|
|
3225
3217
|
/**
|
|
3226
3218
|
* Cancel a running play execution.
|
package/dist/index.js
CHANGED
|
@@ -815,7 +815,7 @@ var SDK_RELEASE = {
|
|
|
815
815
|
// available at toolResponse.rawV2 while toolResponse.raw and all declared
|
|
816
816
|
// getters keep their established compatibility behavior.
|
|
817
817
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
818
|
-
version: "0.3.
|
|
818
|
+
version: "0.3.49",
|
|
819
819
|
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.",
|
|
820
820
|
packageCapabilities: {
|
|
821
821
|
updatePreferences: 1
|
|
@@ -1695,7 +1695,7 @@ var HttpClient = class {
|
|
|
1695
1695
|
body: options?.body !== void 0 ? JSON.stringify(options.body) : void 0,
|
|
1696
1696
|
signal: options?.signal
|
|
1697
1697
|
});
|
|
1698
|
-
if (!response.ok
|
|
1698
|
+
if (!response.ok) {
|
|
1699
1699
|
const body = await response.text();
|
|
1700
1700
|
const parsed = parseResponseBody(body);
|
|
1701
1701
|
if (response.status === 401 && !isProviderOriginatedHttpError(parsed)) {
|
|
@@ -5399,26 +5399,12 @@ var DeeplineClient = class {
|
|
|
5399
5399
|
const headers = options?.lastEventId && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
|
|
5400
5400
|
const params = new URLSearchParams();
|
|
5401
5401
|
params.set("mode", options?.mode ?? "cli");
|
|
5402
|
-
const
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
5409
|
-
{ signal: options?.signal, headers }
|
|
5410
|
-
)) {
|
|
5411
|
-
sawEvent = true;
|
|
5412
|
-
if (event.scope === "play") {
|
|
5413
|
-
yield event;
|
|
5414
|
-
}
|
|
5415
|
-
}
|
|
5416
|
-
return;
|
|
5417
|
-
} catch (error) {
|
|
5418
|
-
const projectionPending = options?.waitForProjection === true && !sawEvent && error instanceof DeeplineError && (error.statusCode === 404 || error.statusCode === 202 && error.code === "RUN_PROJECTION_PENDING") && Date.now() < projectionDeadline;
|
|
5419
|
-
if (!projectionPending) throw error;
|
|
5420
|
-
await sleep2(streamReconnectDelayMs(projectionAttempt));
|
|
5421
|
-
projectionAttempt += 1;
|
|
5402
|
+
for await (const event of this.http.streamSse(
|
|
5403
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
5404
|
+
{ signal: options?.signal, headers }
|
|
5405
|
+
)) {
|
|
5406
|
+
if (event.scope === "play") {
|
|
5407
|
+
yield event;
|
|
5422
5408
|
}
|
|
5423
5409
|
}
|
|
5424
5410
|
}
|
|
@@ -6447,8 +6433,7 @@ var DeeplineClient = class {
|
|
|
6447
6433
|
}
|
|
6448
6434
|
for await (const event of this.streamPlayRunEvents(workflowId, {
|
|
6449
6435
|
mode: "cli",
|
|
6450
|
-
signal: options?.signal
|
|
6451
|
-
waitForProjection: true
|
|
6436
|
+
signal: options?.signal
|
|
6452
6437
|
})) {
|
|
6453
6438
|
if (options?.signal?.aborted) {
|
|
6454
6439
|
await this.cancelPlay(workflowId);
|
package/dist/index.mjs
CHANGED
|
@@ -738,7 +738,7 @@ var SDK_RELEASE = {
|
|
|
738
738
|
// available at toolResponse.rawV2 while toolResponse.raw and all declared
|
|
739
739
|
// getters keep their established compatibility behavior.
|
|
740
740
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
741
|
-
version: "0.3.
|
|
741
|
+
version: "0.3.49",
|
|
742
742
|
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.",
|
|
743
743
|
packageCapabilities: {
|
|
744
744
|
updatePreferences: 1
|
|
@@ -1618,7 +1618,7 @@ var HttpClient = class {
|
|
|
1618
1618
|
body: options?.body !== void 0 ? JSON.stringify(options.body) : void 0,
|
|
1619
1619
|
signal: options?.signal
|
|
1620
1620
|
});
|
|
1621
|
-
if (!response.ok
|
|
1621
|
+
if (!response.ok) {
|
|
1622
1622
|
const body = await response.text();
|
|
1623
1623
|
const parsed = parseResponseBody(body);
|
|
1624
1624
|
if (response.status === 401 && !isProviderOriginatedHttpError(parsed)) {
|
|
@@ -5322,26 +5322,12 @@ var DeeplineClient = class {
|
|
|
5322
5322
|
const headers = options?.lastEventId && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
|
|
5323
5323
|
const params = new URLSearchParams();
|
|
5324
5324
|
params.set("mode", options?.mode ?? "cli");
|
|
5325
|
-
const
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
5332
|
-
{ signal: options?.signal, headers }
|
|
5333
|
-
)) {
|
|
5334
|
-
sawEvent = true;
|
|
5335
|
-
if (event.scope === "play") {
|
|
5336
|
-
yield event;
|
|
5337
|
-
}
|
|
5338
|
-
}
|
|
5339
|
-
return;
|
|
5340
|
-
} catch (error) {
|
|
5341
|
-
const projectionPending = options?.waitForProjection === true && !sawEvent && error instanceof DeeplineError && (error.statusCode === 404 || error.statusCode === 202 && error.code === "RUN_PROJECTION_PENDING") && Date.now() < projectionDeadline;
|
|
5342
|
-
if (!projectionPending) throw error;
|
|
5343
|
-
await sleep2(streamReconnectDelayMs(projectionAttempt));
|
|
5344
|
-
projectionAttempt += 1;
|
|
5325
|
+
for await (const event of this.http.streamSse(
|
|
5326
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
5327
|
+
{ signal: options?.signal, headers }
|
|
5328
|
+
)) {
|
|
5329
|
+
if (event.scope === "play") {
|
|
5330
|
+
yield event;
|
|
5345
5331
|
}
|
|
5346
5332
|
}
|
|
5347
5333
|
}
|
|
@@ -6370,8 +6356,7 @@ var DeeplineClient = class {
|
|
|
6370
6356
|
}
|
|
6371
6357
|
for await (const event of this.streamPlayRunEvents(workflowId, {
|
|
6372
6358
|
mode: "cli",
|
|
6373
|
-
signal: options?.signal
|
|
6374
|
-
waitForProjection: true
|
|
6359
|
+
signal: options?.signal
|
|
6375
6360
|
})) {
|
|
6376
6361
|
if (options?.signal?.aborted) {
|
|
6377
6362
|
await this.cancelPlay(workflowId);
|