deepline 0.3.48 → 0.3.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -779,6 +779,8 @@ interface PlayRunPackage {
779
779
  playName: string;
780
780
  status: string;
781
781
  dashboardUrl?: string;
782
+ /** Durable acceptance time: the run record was created. */
783
+ acceptedAt?: number | null;
782
784
  updatedAt?: number | null;
783
785
  startedAt?: number | null;
784
786
  finishedAt?: number | null;
@@ -3213,14 +3215,6 @@ declare class DeeplineClient {
3213
3215
  signal?: AbortSignal;
3214
3216
  lastEventId?: string;
3215
3217
  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
3218
  }): AsyncGenerator<PlayLiveEvent>;
3225
3219
  /**
3226
3220
  * Cancel a running play execution.
package/dist/index.d.ts CHANGED
@@ -779,6 +779,8 @@ interface PlayRunPackage {
779
779
  playName: string;
780
780
  status: string;
781
781
  dashboardUrl?: string;
782
+ /** Durable acceptance time: the run record was created. */
783
+ acceptedAt?: number | null;
782
784
  updatedAt?: number | null;
783
785
  startedAt?: number | null;
784
786
  finishedAt?: number | null;
@@ -3213,14 +3215,6 @@ declare class DeeplineClient {
3213
3215
  signal?: AbortSignal;
3214
3216
  lastEventId?: string;
3215
3217
  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
3218
  }): AsyncGenerator<PlayLiveEvent>;
3225
3219
  /**
3226
3220
  * 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.48",
818
+ version: "0.3.50",
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 || response.status === 202) {
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 projectionDeadline = Date.now() + 3e4;
5403
- let projectionAttempt = 0;
5404
- for (; ; ) {
5405
- let sawEvent = false;
5406
- try {
5407
- for await (const event of this.http.streamSse(
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.48",
741
+ version: "0.3.50",
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 || response.status === 202) {
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 projectionDeadline = Date.now() + 3e4;
5326
- let projectionAttempt = 0;
5327
- for (; ; ) {
5328
- let sawEvent = false;
5329
- try {
5330
- for await (const event of this.http.streamSse(
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.3.48",
3
+ "version": "0.3.50",
4
4
  "description": "GTM data CLI and TypeScript SDK for coding agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://code.deepline.com",