deepline 0.2.27 → 0.2.28
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 +16 -4
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +4 -6
- package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +3 -2
- package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +15 -7
- package/dist/bundling-sources/shared_libs/plays/contracts.ts +10 -11
- package/dist/cli/index.js +14 -5
- package/dist/cli/index.mjs +14 -5
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -4
- package/dist/index.mjs +2 -4
- package/package.json +1 -1
|
@@ -4490,10 +4490,22 @@ export class DeeplineClient {
|
|
|
4490
4490
|
* // { status: "ok", version: "v2" }
|
|
4491
4491
|
* ```
|
|
4492
4492
|
*/
|
|
4493
|
-
async health(): Promise<{
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4493
|
+
async health(): Promise<{
|
|
4494
|
+
status: string;
|
|
4495
|
+
version?: string;
|
|
4496
|
+
status_banner?: {
|
|
4497
|
+
message: string;
|
|
4498
|
+
updatedAt: number;
|
|
4499
|
+
};
|
|
4500
|
+
}> {
|
|
4501
|
+
return this.http.get<{
|
|
4502
|
+
status: string;
|
|
4503
|
+
version?: string;
|
|
4504
|
+
status_banner?: {
|
|
4505
|
+
message: string;
|
|
4506
|
+
updatedAt: number;
|
|
4507
|
+
};
|
|
4508
|
+
}>('/api/v2/health');
|
|
4497
4509
|
}
|
|
4498
4510
|
}
|
|
4499
4511
|
|
|
@@ -160,7 +160,7 @@ export const SDK_RELEASE = {
|
|
|
160
160
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
161
161
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
162
162
|
// release keeps lazy paging semantics independent of row residency.
|
|
163
|
-
version: '0.2.
|
|
163
|
+
version: '0.2.28',
|
|
164
164
|
contracts: {
|
|
165
165
|
api: {
|
|
166
166
|
name: 'sdk-http-api',
|
|
@@ -91,8 +91,8 @@ import {
|
|
|
91
91
|
normalizePlayContractCompatibility,
|
|
92
92
|
} from '@shared_libs/plays/contracts';
|
|
93
93
|
import {
|
|
94
|
-
LEGACY_TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
|
|
95
94
|
serializeToolExecutionFailure,
|
|
95
|
+
TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
|
|
96
96
|
TOOL_EXECUTION_ERROR_SCHEMA_HEADER,
|
|
97
97
|
type ToolExecutionErrorSchemaVersion,
|
|
98
98
|
type ToolExecutionFailureV1,
|
|
@@ -1760,11 +1760,9 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
|
|
|
1760
1760
|
* was published, even when the parent was published under another schema.
|
|
1761
1761
|
*/
|
|
1762
1762
|
private get currentToolErrorSchemaVersion(): ToolExecutionErrorSchemaVersion {
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
LEGACY_TOOL_EXECUTION_ERROR_SCHEMA_VERSION
|
|
1767
|
-
);
|
|
1763
|
+
// Historical artifacts must not turn durable structured failures back into
|
|
1764
|
+
// strings. Every runtime tool call and receipt rehydration uses v1.
|
|
1765
|
+
return TOOL_EXECUTION_ERROR_SCHEMA_VERSION;
|
|
1768
1766
|
}
|
|
1769
1767
|
|
|
1770
1768
|
private get currentAuthoringContractEdition(): PlayAuthoringContractEdition {
|
|
@@ -23,6 +23,7 @@ import { createRuntimeReceiptHeartbeatSupervisor } from './receipt-heartbeat-sup
|
|
|
23
23
|
import {
|
|
24
24
|
deserializeToolExecutionFailure,
|
|
25
25
|
serializeToolExecutionFailure,
|
|
26
|
+
TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
|
|
26
27
|
} from '../tool-execution-error';
|
|
27
28
|
import type {
|
|
28
29
|
ToolExecutionErrorSchemaVersion,
|
|
@@ -308,14 +309,14 @@ export function runtimeReceiptOutput<T>(receipt: RuntimeStepReceipt): T {
|
|
|
308
309
|
export function runtimeReceiptFailureError(
|
|
309
310
|
receipt: RuntimeStepReceipt,
|
|
310
311
|
legacyPrefix: string,
|
|
311
|
-
|
|
312
|
+
_toolErrorSchemaVersion: ToolExecutionErrorSchemaVersion,
|
|
312
313
|
): Error {
|
|
313
314
|
const message = receipt.error ?? 'unknown error';
|
|
314
315
|
return (
|
|
315
316
|
deserializeToolExecutionFailure(
|
|
316
317
|
message,
|
|
317
318
|
receipt.errorPayload,
|
|
318
|
-
|
|
319
|
+
TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
|
|
319
320
|
) ?? new Error(`${legacyPrefix}: ${message}`)
|
|
320
321
|
);
|
|
321
322
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { WorkReceiptFailureKind } from './work-receipts';
|
|
2
2
|
import {
|
|
3
3
|
LEGACY_TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
|
|
4
|
+
TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
|
|
4
5
|
ToolExecutionError,
|
|
5
6
|
deserializeToolExecutionFailure,
|
|
6
7
|
isProviderTransientFailure,
|
|
@@ -42,8 +43,8 @@ function applyToolHttpErrorFields(
|
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
46
|
+
* Retained only to deserialize direct SDK callers that explicitly request the
|
|
47
|
+
* retired schema-0 boundary. Play runtime execution always uses schema 1.
|
|
47
48
|
*/
|
|
48
49
|
export class ToolHttpError extends Error {
|
|
49
50
|
readonly billing: Record<string, unknown> | null;
|
|
@@ -156,6 +157,12 @@ function getStringField(value: unknown, key: string): string | null {
|
|
|
156
157
|
return typeof field === 'string' && field.trim() ? field : null;
|
|
157
158
|
}
|
|
158
159
|
|
|
160
|
+
function getBooleanField(value: unknown, key: string): boolean | null {
|
|
161
|
+
if (!isRecord(value)) return null;
|
|
162
|
+
const field = value[key];
|
|
163
|
+
return typeof field === 'boolean' ? field : null;
|
|
164
|
+
}
|
|
165
|
+
|
|
159
166
|
function getObjectField(
|
|
160
167
|
value: unknown,
|
|
161
168
|
key: string,
|
|
@@ -377,7 +384,7 @@ export function normalizeToolHttpErrorMessage(input: {
|
|
|
377
384
|
schemaVersion?: ToolExecutionErrorSchemaVersion;
|
|
378
385
|
}): ToolHttpError {
|
|
379
386
|
const schemaVersion =
|
|
380
|
-
input.schemaVersion ??
|
|
387
|
+
input.schemaVersion ?? TOOL_EXECUTION_ERROR_SCHEMA_VERSION;
|
|
381
388
|
let parsed: Record<string, unknown> | null = null;
|
|
382
389
|
try {
|
|
383
390
|
const candidate = JSON.parse(input.bodyText);
|
|
@@ -419,7 +426,9 @@ export function normalizeToolHttpErrorMessage(input: {
|
|
|
419
426
|
origin,
|
|
420
427
|
category,
|
|
421
428
|
retryable: trustworthy
|
|
422
|
-
? (hydratedFailure?.retryable ??
|
|
429
|
+
? (hydratedFailure?.retryable ??
|
|
430
|
+
getBooleanField(parsed, 'retryable') ??
|
|
431
|
+
input.retryable === true)
|
|
423
432
|
: false,
|
|
424
433
|
statusCode: input.status,
|
|
425
434
|
requestId:
|
|
@@ -469,9 +478,8 @@ export function normalizeToolHttpErrorMessage(input: {
|
|
|
469
478
|
? parsed
|
|
470
479
|
: null;
|
|
471
480
|
if (hardBillingPayload) {
|
|
472
|
-
const providerCapacity =
|
|
473
|
-
hardBillingPayload
|
|
474
|
-
);
|
|
481
|
+
const providerCapacity =
|
|
482
|
+
isProviderAccountCapacityFailurePayload(hardBillingPayload);
|
|
475
483
|
return createToolHttpError(
|
|
476
484
|
schemaVersion,
|
|
477
485
|
formatHardBillingFailureMessage({
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
LEGACY_TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
|
|
3
2
|
SUPPORTED_TOOL_EXECUTION_ERROR_SCHEMA_VERSIONS,
|
|
4
3
|
TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
|
|
5
4
|
type ToolExecutionErrorSchemaVersion,
|
|
@@ -36,7 +35,7 @@ export type PlayContractCompatibilitySnapshot = {
|
|
|
36
35
|
minRunnerVersion: number;
|
|
37
36
|
runtimeFeatures: PlayRuntimeFeature[];
|
|
38
37
|
runtimeBackend?: string | null;
|
|
39
|
-
/**
|
|
38
|
+
/** Every Play run uses the structured tool-error contract. */
|
|
40
39
|
toolErrorSchemaVersion?: ToolExecutionErrorSchemaVersion;
|
|
41
40
|
/** Missing preserves edition 1 for artifacts stored before authoring contracts were pinned. */
|
|
42
41
|
authoringContractEdition?: PlayAuthoringContractEdition;
|
|
@@ -66,8 +65,10 @@ export class InvalidPlayContractCompatibilityError extends Error {
|
|
|
66
65
|
|
|
67
66
|
/**
|
|
68
67
|
* Normalize the artifact-pinned compatibility facts without regenerating them.
|
|
69
|
-
*
|
|
70
|
-
*
|
|
68
|
+
*
|
|
69
|
+
* Play failures must retain their typed code across durable receipts. Historical
|
|
70
|
+
* artifacts therefore upgrade to schema 1 at execution time; schema 0's
|
|
71
|
+
* string-only failure shape is retired from Play execution.
|
|
71
72
|
*/
|
|
72
73
|
export function normalizePlayContractCompatibility(
|
|
73
74
|
compatibility: PlayContractCompatibilitySnapshot | null | undefined,
|
|
@@ -79,22 +80,20 @@ export function normalizePlayContractCompatibility(
|
|
|
79
80
|
) {
|
|
80
81
|
throw new InvalidPlayContractCompatibilityError();
|
|
81
82
|
}
|
|
82
|
-
const
|
|
83
|
-
compatibility.toolErrorSchemaVersion ??
|
|
84
|
-
LEGACY_TOOL_EXECUTION_ERROR_SCHEMA_VERSION;
|
|
83
|
+
const requestedToolErrorSchemaVersion =
|
|
84
|
+
compatibility.toolErrorSchemaVersion ?? TOOL_EXECUTION_ERROR_SCHEMA_VERSION;
|
|
85
85
|
if (
|
|
86
86
|
!SUPPORTED_TOOL_EXECUTION_ERROR_SCHEMA_VERSIONS.includes(
|
|
87
|
-
|
|
87
|
+
requestedToolErrorSchemaVersion,
|
|
88
88
|
)
|
|
89
89
|
) {
|
|
90
90
|
throw new UnsupportedPlayToolErrorSchemaVersionError(
|
|
91
|
-
|
|
91
|
+
requestedToolErrorSchemaVersion,
|
|
92
92
|
);
|
|
93
93
|
}
|
|
94
94
|
return {
|
|
95
95
|
...compatibility,
|
|
96
|
-
toolErrorSchemaVersion:
|
|
97
|
-
toolErrorSchemaVersion as ToolExecutionErrorSchemaVersion,
|
|
96
|
+
toolErrorSchemaVersion: TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
|
|
98
97
|
authoringContractEdition: normalizePlayAuthoringContractEdition(
|
|
99
98
|
compatibility.authoringContractEdition,
|
|
100
99
|
),
|
package/dist/cli/index.js
CHANGED
|
@@ -1044,7 +1044,7 @@ var SDK_RELEASE = {
|
|
|
1044
1044
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
1045
1045
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
1046
1046
|
// release keeps lazy paging semantics independent of row residency.
|
|
1047
|
-
version: "0.2.
|
|
1047
|
+
version: "0.2.28",
|
|
1048
1048
|
contracts: {
|
|
1049
1049
|
api: {
|
|
1050
1050
|
name: "sdk-http-api",
|
|
@@ -5961,9 +5961,7 @@ var DeeplineClient = class {
|
|
|
5961
5961
|
* ```
|
|
5962
5962
|
*/
|
|
5963
5963
|
async health() {
|
|
5964
|
-
return this.http.get(
|
|
5965
|
-
"/api/v2/health"
|
|
5966
|
-
);
|
|
5964
|
+
return this.http.get("/api/v2/health");
|
|
5967
5965
|
}
|
|
5968
5966
|
};
|
|
5969
5967
|
|
|
@@ -6804,6 +6802,14 @@ function printCommandEnvelope(envelope, options = {}) {
|
|
|
6804
6802
|
var EXIT_OK = 0;
|
|
6805
6803
|
var EXIT_AUTH = 3;
|
|
6806
6804
|
var EXIT_SERVER = 5;
|
|
6805
|
+
function statusBannerLine(value) {
|
|
6806
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return null;
|
|
6807
|
+
const banner = value;
|
|
6808
|
+
if (typeof banner.message !== "string") {
|
|
6809
|
+
return null;
|
|
6810
|
+
}
|
|
6811
|
+
return `Service notice: ${banner.message}`;
|
|
6812
|
+
}
|
|
6807
6813
|
function envFilePath(baseUrl) {
|
|
6808
6814
|
return hostEnvFilePath(baseUrl);
|
|
6809
6815
|
}
|
|
@@ -7260,11 +7266,14 @@ async function handleStatus(args) {
|
|
|
7260
7266
|
hostStatusPayload = {
|
|
7261
7267
|
host: baseUrl,
|
|
7262
7268
|
hostStatus: hData.status || "ok",
|
|
7263
|
-
hostVersion: hData.version || "(unknown)"
|
|
7269
|
+
hostVersion: hData.version || "(unknown)",
|
|
7270
|
+
status_banner: hData.status_banner ?? null
|
|
7264
7271
|
};
|
|
7265
7272
|
hostLines.push(`Host: ${baseUrl}`);
|
|
7266
7273
|
hostLines.push(`Host status: ${hData.status || "ok"}`);
|
|
7267
7274
|
hostLines.push(`Host version: ${hData.version || "(unknown)"}`);
|
|
7275
|
+
const bannerLine = statusBannerLine(hData.status_banner);
|
|
7276
|
+
if (bannerLine) hostLines.push(bannerLine);
|
|
7268
7277
|
}
|
|
7269
7278
|
} catch {
|
|
7270
7279
|
hostStatusPayload = {
|
package/dist/cli/index.mjs
CHANGED
|
@@ -1030,7 +1030,7 @@ var SDK_RELEASE = {
|
|
|
1030
1030
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
1031
1031
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
1032
1032
|
// release keeps lazy paging semantics independent of row residency.
|
|
1033
|
-
version: "0.2.
|
|
1033
|
+
version: "0.2.28",
|
|
1034
1034
|
contracts: {
|
|
1035
1035
|
api: {
|
|
1036
1036
|
name: "sdk-http-api",
|
|
@@ -5947,9 +5947,7 @@ var DeeplineClient = class {
|
|
|
5947
5947
|
* ```
|
|
5948
5948
|
*/
|
|
5949
5949
|
async health() {
|
|
5950
|
-
return this.http.get(
|
|
5951
|
-
"/api/v2/health"
|
|
5952
|
-
);
|
|
5950
|
+
return this.http.get("/api/v2/health");
|
|
5953
5951
|
}
|
|
5954
5952
|
};
|
|
5955
5953
|
|
|
@@ -6802,6 +6800,14 @@ function printCommandEnvelope(envelope, options = {}) {
|
|
|
6802
6800
|
var EXIT_OK = 0;
|
|
6803
6801
|
var EXIT_AUTH = 3;
|
|
6804
6802
|
var EXIT_SERVER = 5;
|
|
6803
|
+
function statusBannerLine(value) {
|
|
6804
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return null;
|
|
6805
|
+
const banner = value;
|
|
6806
|
+
if (typeof banner.message !== "string") {
|
|
6807
|
+
return null;
|
|
6808
|
+
}
|
|
6809
|
+
return `Service notice: ${banner.message}`;
|
|
6810
|
+
}
|
|
6805
6811
|
function envFilePath(baseUrl) {
|
|
6806
6812
|
return hostEnvFilePath(baseUrl);
|
|
6807
6813
|
}
|
|
@@ -7258,11 +7264,14 @@ async function handleStatus(args) {
|
|
|
7258
7264
|
hostStatusPayload = {
|
|
7259
7265
|
host: baseUrl,
|
|
7260
7266
|
hostStatus: hData.status || "ok",
|
|
7261
|
-
hostVersion: hData.version || "(unknown)"
|
|
7267
|
+
hostVersion: hData.version || "(unknown)",
|
|
7268
|
+
status_banner: hData.status_banner ?? null
|
|
7262
7269
|
};
|
|
7263
7270
|
hostLines.push(`Host: ${baseUrl}`);
|
|
7264
7271
|
hostLines.push(`Host status: ${hData.status || "ok"}`);
|
|
7265
7272
|
hostLines.push(`Host version: ${hData.version || "(unknown)"}`);
|
|
7273
|
+
const bannerLine = statusBannerLine(hData.status_banner);
|
|
7274
|
+
if (bannerLine) hostLines.push(bannerLine);
|
|
7266
7275
|
}
|
|
7267
7276
|
} catch {
|
|
7268
7277
|
hostStatusPayload = {
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -763,7 +763,7 @@ var SDK_RELEASE = {
|
|
|
763
763
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
764
764
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
765
765
|
// release keeps lazy paging semantics independent of row residency.
|
|
766
|
-
version: "0.2.
|
|
766
|
+
version: "0.2.28",
|
|
767
767
|
contracts: {
|
|
768
768
|
api: {
|
|
769
769
|
name: "sdk-http-api",
|
|
@@ -5680,9 +5680,7 @@ var DeeplineClient = class {
|
|
|
5680
5680
|
* ```
|
|
5681
5681
|
*/
|
|
5682
5682
|
async health() {
|
|
5683
|
-
return this.http.get(
|
|
5684
|
-
"/api/v2/health"
|
|
5685
|
-
);
|
|
5683
|
+
return this.http.get("/api/v2/health");
|
|
5686
5684
|
}
|
|
5687
5685
|
};
|
|
5688
5686
|
|
package/dist/index.mjs
CHANGED
|
@@ -689,7 +689,7 @@ var SDK_RELEASE = {
|
|
|
689
689
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
690
690
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
691
691
|
// release keeps lazy paging semantics independent of row residency.
|
|
692
|
-
version: "0.2.
|
|
692
|
+
version: "0.2.28",
|
|
693
693
|
contracts: {
|
|
694
694
|
api: {
|
|
695
695
|
name: "sdk-http-api",
|
|
@@ -5606,9 +5606,7 @@ var DeeplineClient = class {
|
|
|
5606
5606
|
* ```
|
|
5607
5607
|
*/
|
|
5608
5608
|
async health() {
|
|
5609
|
-
return this.http.get(
|
|
5610
|
-
"/api/v2/health"
|
|
5611
|
-
);
|
|
5609
|
+
return this.http.get("/api/v2/health");
|
|
5612
5610
|
}
|
|
5613
5611
|
};
|
|
5614
5612
|
|