deepline 0.3.479 → 0.3.481
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-core.ts +35 -1
- package/dist/bundling-sources/sdk/src/http-core.ts +2 -0
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +54 -31
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/legacy-radar-forward-routes.ts +569 -0
- package/dist/bundling-sources/shared_libs/monitors/legacy-radar-retirement.ts +451 -0
- package/dist/bundling-sources/shared_libs/monitors/package.json +5 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-array-input-receipts.ts +13 -6
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +125 -22
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +16 -53
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +34 -48
- package/dist/bundling-sources/shared_libs/security/receipt-admission-token.ts +44 -0
- package/dist/cli/auth-EQWYBNIE.js +43 -0
- package/dist/cli/{auth-D7DYB57R.mjs → auth-FYY65LYD.mjs} +7 -5
- package/dist/cli/{billing-DT4JT4QN.mjs → billing-3MELYUTI.mjs} +7 -7
- package/dist/cli/{billing-DHGSNM6E.js → billing-TROHWBSE.js} +80 -80
- package/dist/cli/{chunk-GQCH6Y7W.js → chunk-27BYXQU4.js} +1 -1
- package/dist/cli/{chunk-CK2Q6AWR.js → chunk-4CIVXXSU.js} +26 -26
- package/dist/cli/{chunk-G6V34EQ5.js → chunk-5ONCPLWC.js} +16 -16
- package/dist/cli/{chunk-27GSBTWD.js → chunk-6VKDKATO.js} +96 -65
- package/dist/cli/{chunk-LXYDN5FE.js → chunk-6WWBVWFQ.js} +7 -7
- package/dist/cli/{chunk-JNFNNJ75.mjs → chunk-6ZMUAASO.mjs} +4 -4
- package/dist/cli/{chunk-6C3QY5JS.mjs → chunk-75LUK4E5.mjs} +1 -1
- package/dist/cli/{chunk-JKUFOP7M.mjs → chunk-7VVC4RZX.mjs} +1 -1
- package/dist/cli/{chunk-N7E25EU2.mjs → chunk-ASQJUUGB.mjs} +5 -5
- package/dist/cli/{chunk-FKEZ5DIJ.mjs → chunk-BJ5UFTWL.mjs} +28 -7
- package/dist/cli/{chunk-W4HIOBQQ.js → chunk-BJMEXKZY.js} +2 -2
- package/dist/cli/{chunk-YC2QBF2W.mjs → chunk-C7UIUKW6.mjs} +2 -2
- package/dist/cli/{chunk-AKVNUNL7.js → chunk-CM3KC74A.js} +3 -3
- package/dist/cli/{chunk-JFGOMQW6.mjs → chunk-CS2P3EQS.mjs} +2 -2
- package/dist/cli/{chunk-VKBLXJCK.js → chunk-CUSWZTS7.js} +8 -8
- package/dist/cli/{chunk-GSULE54L.js → chunk-D3UHG54V.js} +199 -178
- package/dist/cli/{chunk-3PHOAUU4.mjs → chunk-EJTU6X6C.mjs} +41 -10
- package/dist/cli/{chunk-AFHFZU5V.js → chunk-EPEAQA6O.js} +37 -37
- package/dist/cli/{chunk-K5RRY7DJ.mjs → chunk-EPZSX7FZ.mjs} +4 -4
- package/dist/cli/{chunk-27PXHD2P.mjs → chunk-FXLMDAAY.mjs} +1 -1
- package/dist/cli/chunk-GBAT5NMI.mjs +789 -0
- package/dist/cli/{chunk-Y2MVDYV6.js → chunk-GJOKFJ2Y.js} +10 -10
- package/dist/cli/{chunk-JDMR33HS.js → chunk-GVAENVIG.js} +28 -19
- package/dist/cli/{chunk-NELMCOWK.mjs → chunk-HNRELVCS.mjs} +27 -18
- package/dist/cli/{chunk-GICSDK72.mjs → chunk-HXG7TYRS.mjs} +2 -2
- package/dist/cli/{chunk-EMVWC5LP.js → chunk-J4D3PCQ2.js} +5 -5
- package/dist/cli/{chunk-6QIXWFPO.mjs → chunk-JE27DTQM.mjs} +3 -3
- package/dist/cli/{chunk-3GIM7XRH.js → chunk-KDU6TSGE.js} +2 -2
- package/dist/cli/{chunk-JMCTNS6S.js → chunk-KPXP2DIY.js} +7 -9
- package/dist/cli/chunk-KQSTV4MW.js +789 -0
- package/dist/cli/{chunk-RJVUILW4.mjs → chunk-LISZBUA7.mjs} +2 -2
- package/dist/cli/{chunk-D6MLXRMQ.mjs → chunk-LTOY2GUJ.mjs} +10 -10
- package/dist/cli/{chunk-FBEXJVQL.js → chunk-MKDWU3ZI.js} +93 -93
- package/dist/cli/{chunk-UOYA35OT.mjs → chunk-N5267HEH.mjs} +1 -1
- package/dist/cli/{chunk-XDFARN7U.mjs → chunk-PDJS6LFI.mjs} +2 -1
- package/dist/cli/{chunk-J5VDE42G.js → chunk-R4EFW2I2.js} +3 -3
- package/dist/cli/{chunk-GONL4EFT.mjs → chunk-RV2GB7KW.mjs} +2 -2
- package/dist/cli/{chunk-GZ43YXHT.mjs → chunk-S5BM6NPJ.mjs} +3 -5
- package/dist/cli/{chunk-PUOKABQF.mjs → chunk-S5WXSC3P.mjs} +5 -5
- package/dist/cli/{chunk-ZJRVHQSZ.mjs → chunk-SOGLBLMH.mjs} +4 -4
- package/dist/cli/{chunk-FV7WGK5X.js → chunk-SVPM2E2U.js} +5 -5
- package/dist/cli/{chunk-XBYW5EHY.mjs → chunk-UUGSZZZH.mjs} +1 -1
- package/dist/cli/{chunk-3SGA53DX.js → chunk-VBDR2DP6.js} +3 -3
- package/dist/cli/{chunk-O5BUFQ2P.mjs → chunk-VRAOWHXJ.mjs} +1 -1
- package/dist/cli/{chunk-TZCHXF4R.mjs → chunk-VTKAIGW6.mjs} +3 -3
- package/dist/cli/{chunk-33O2JGHE.js → chunk-WF5QE2IW.js} +17 -16
- package/dist/cli/{chunk-OVFCPV24.js → chunk-WICQQ7GY.js} +53 -53
- package/dist/cli/{chunk-W6N2S5N7.js → chunk-WTWRZ5ZI.js} +8 -8
- package/dist/cli/{chunk-N4M6CO5H.js → chunk-X4XZFIK6.js} +14 -14
- package/dist/cli/{chunk-VRZXGJXH.js → chunk-X6MEQBAT.js} +21 -21
- package/dist/cli/{csv-JXFOD7DJ.mjs → csv-2EG7JW7V.mjs} +4 -4
- package/dist/cli/{csv-DQWOZ2BL.js → csv-OUALOZBF.js} +13 -13
- package/dist/cli/{db-Q2OAAXRX.js → db-7BTOI6YB.js} +28 -28
- package/dist/cli/{db-NOGMZAQE.mjs → db-ECDQWI2Y.mjs} +7 -7
- package/dist/cli/describe-EXSH6OZD.js +48 -0
- package/dist/cli/{describe-VKZTZLX6.mjs → describe-KO6WKQIB.mjs} +18 -18
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-XU3JMNI3.mjs → executions-3VMFBZT4.mjs} +7 -7
- package/dist/cli/{executions-B3GDZ4GQ.js → executions-VZSG3F3E.js} +9 -9
- package/dist/cli/{feedback-5IW3ZKRP.js → feedback-ASKBWRXR.js} +8 -8
- package/dist/cli/{feedback-R5UQXINE.mjs → feedback-SN7AVALN.mjs} +4 -4
- package/dist/cli/{git-7B4H7VEL.mjs → git-W2DZXEAY.mjs} +5 -5
- package/dist/cli/git-X2XUKYYX.js +25 -0
- package/dist/cli/index.js +167 -144
- package/dist/cli/index.mjs +73 -50
- package/dist/cli/{legacy-noops-AVT6T5QI.js → legacy-noops-6KOC6LV7.js} +8 -8
- package/dist/cli/{legacy-noops-KY7JAALE.mjs → legacy-noops-R2SML7ED.mjs} +5 -5
- package/dist/cli/{monitors-G7L7AFXR.mjs → monitors-4VGZGJBT.mjs} +8 -8
- package/dist/cli/{monitors-GZB6CWK2.js → monitors-OJXDYU4G.js} +92 -92
- package/dist/cli/{org-ZHHKAPCE.js → org-AELMZFUT.js} +73 -73
- package/dist/cli/{org-QDUBOQTH.mjs → org-UGN5ZG2Y.mjs} +7 -7
- package/dist/cli/{pages-5P3SPMN5.js → pages-L26N7MK3.js} +18 -18
- package/dist/cli/{pages-Q4WGQCST.mjs → pages-ZYPAAYSS.mjs} +7 -7
- package/dist/cli/{play-WRSHD4RE.mjs → play-ENYB7X4S.mjs} +125 -53
- package/dist/cli/{play-IRLKESZB.js → play-VTZWB3N5.js} +620 -548
- package/dist/cli/{providers-7CQUHS57.mjs → providers-BZQTVAQG.mjs} +7 -7
- package/dist/cli/{providers-LKEYLN6D.js → providers-HWBY6MGQ.js} +10 -10
- package/dist/cli/{quickstart-KS45M5SR.js → quickstart-D54IJ3PX.js} +6 -6
- package/dist/cli/{quickstart-I6NYGMEE.mjs → quickstart-SSQJDWPB.mjs} +4 -4
- package/dist/cli/{run-BLMOBNAN.js → run-45NKE7UY.js} +37 -37
- package/dist/cli/{run-AZETCL7R.mjs → run-FR3TPYT3.mjs} +23 -23
- package/dist/cli/{search-EEKEP67Y.mjs → search-CZCWSR5L.mjs} +8 -8
- package/dist/cli/search-V2GJKQQQ.js +32 -0
- package/dist/cli/{secrets-M6NU3TD2.js → secrets-KJ5ZEDWT.js} +16 -16
- package/dist/cli/{secrets-HAULG2EW.mjs → secrets-KKK55B4Y.mjs} +7 -7
- package/dist/cli/{sessions-5MB4XKOK.mjs → sessions-2YKA54PH.mjs} +5 -5
- package/dist/cli/{sessions-DSR5AHIA.js → sessions-QCNPUTDZ.js} +6 -6
- package/dist/cli/{settings-JUQP4HYQ.mjs → settings-4NI2AS5V.mjs} +12 -12
- package/dist/cli/{settings-6US327NQ.js → settings-KM3LCPWD.js} +79 -79
- package/dist/cli/{setup-JRH4UC47.mjs → setup-BZF3M54I.mjs} +33 -18
- package/dist/cli/{setup-5ZRSEQUD.js → setup-V5MTS2AA.js} +67 -52
- package/dist/cli/skills-CRFYW767.js +33 -0
- package/dist/cli/{skills-HFOZ5WDH.mjs → skills-NXYNB3LP.mjs} +7 -7
- package/dist/cli/{tools-CJEBZNPB.mjs → tools-57MWFRIZ.mjs} +17 -17
- package/dist/cli/tools-Q662HPVJ.js +55 -0
- package/dist/cli/{update-VQJEPAAK.mjs → update-QM6H677U.mjs} +9 -9
- package/dist/cli/update-TYHKF7F5.js +33 -0
- package/dist/cli/{workflow-EYWE3T75.mjs → workflow-NHYDIUWY.mjs} +8 -8
- package/dist/cli/{workflow-NKPDRZOP.js → workflow-TGEC4ITO.js} +18 -18
- package/dist/{client-B9N1bcGc.d.mts → client-DJ3r8VQJ.d.mts} +1 -1
- package/dist/{client-Btw075Hq.d.ts → client-JPSNljtj.d.ts} +1 -1
- package/dist/{client-core-TulbIeRB.d.mts → client-core-3SJlNsKU.d.mts} +21 -2
- package/dist/{client-core-DvGWlwtX.d.ts → client-core-rCoQ5Xz3.d.ts} +21 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +10 -10
- package/dist/index.mjs +7 -7
- package/dist/install-integrity.json +106 -104
- package/dist/plays/bundle-play-file.mjs +5426 -12
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/plays/run-request.js +4 -2
- package/dist/plays/run-request.mjs +3 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +6 -6
- package/dist/server.mjs +4 -4
- package/package.json +1 -1
- package/dist/cli/auth-MZDFNRPG.js +0 -41
- package/dist/cli/chunk-7UFFWPQ2.js +0 -6188
- package/dist/cli/chunk-ZBSUXXZS.mjs +0 -6188
- package/dist/cli/describe-THHHNUEA.js +0 -48
- package/dist/cli/git-BX27JAW4.js +0 -25
- package/dist/cli/search-PEQXXY2B.js +0 -32
- package/dist/cli/skills-P67KCVDR.js +0 -33
- package/dist/cli/tools-PDBEAI22.js +0 -55
- package/dist/cli/update-G6DI3BQW.js +0 -33
|
@@ -177,11 +177,14 @@ import {
|
|
|
177
177
|
mintStagedPlayFileUploads,
|
|
178
178
|
normalizePlayRunStart,
|
|
179
179
|
CLI_PLAY_RUN_START_STREAM_PATH,
|
|
180
|
+
CLI_PLAY_RUN_SUPPORTED_HEADER,
|
|
180
181
|
CliPlayAdmissionUnsupportedError,
|
|
181
182
|
PLAY_RUN_START_STREAM_PATH,
|
|
182
183
|
stagePlayFiles,
|
|
183
184
|
preparePlayRunAdmission,
|
|
185
|
+
readPlayRunAdmissionCapability,
|
|
184
186
|
type MintStagedFileUpload,
|
|
187
|
+
type PlayRunAdmissionCapability,
|
|
185
188
|
type PlayRunStartOptions,
|
|
186
189
|
type ResolvedStartPlayRunRequest,
|
|
187
190
|
} from './plays/run-request';
|
|
@@ -3527,7 +3530,7 @@ export class DeeplineClient {
|
|
|
3527
3530
|
/**
|
|
3528
3531
|
* Re-establish this workspace's tenant storage contract: role/DB connect
|
|
3529
3532
|
* grants plus materialized table grants. Org-admin only. Use when a run fails
|
|
3530
|
-
* with WORKSPACE_STORAGE_NOT_READY
|
|
3533
|
+
* with `WORKSPACE_STORAGE_NOT_READY`.
|
|
3531
3534
|
*/
|
|
3532
3535
|
async repairIngestionStorage(input?: {
|
|
3533
3536
|
provider?: string;
|
|
@@ -3595,6 +3598,10 @@ export class DeeplineClient {
|
|
|
3595
3598
|
request: StartPlayRunRequest,
|
|
3596
3599
|
options?: {
|
|
3597
3600
|
cliAdmission?: boolean;
|
|
3601
|
+
/** @internal Capability response prefetched by the CLI during local preparation. */
|
|
3602
|
+
admissionCapability?:
|
|
3603
|
+
| Promise<PlayRunAdmissionCapability>
|
|
3604
|
+
| PlayRunAdmissionCapability;
|
|
3598
3605
|
onSubmission?: (intent: {
|
|
3599
3606
|
workflowId: string;
|
|
3600
3607
|
orgId: string;
|
|
@@ -3607,6 +3614,11 @@ export class DeeplineClient {
|
|
|
3607
3614
|
this.http,
|
|
3608
3615
|
resolved.request,
|
|
3609
3616
|
options?.onSubmission,
|
|
3617
|
+
{
|
|
3618
|
+
...(options && Object.hasOwn(options, 'admissionCapability')
|
|
3619
|
+
? { admissionCapability: options.admissionCapability }
|
|
3620
|
+
: {}),
|
|
3621
|
+
},
|
|
3610
3622
|
);
|
|
3611
3623
|
const bodyJson = JSON.stringify(prepared.body);
|
|
3612
3624
|
const headers = runtimeSelectionHeaders(resolved.runtime, this.environment);
|
|
@@ -3629,12 +3641,15 @@ export class DeeplineClient {
|
|
|
3629
3641
|
await preparePlayRunAdmission(
|
|
3630
3642
|
http,
|
|
3631
3643
|
JSON.parse(bodyJson) as ResolvedStartPlayRunRequest,
|
|
3644
|
+
undefined,
|
|
3645
|
+
{ signal: streamOptions?.signal },
|
|
3632
3646
|
);
|
|
3633
3647
|
}
|
|
3634
3648
|
submitted = true;
|
|
3635
3649
|
const streamPath = options?.cliAdmission
|
|
3636
3650
|
? CLI_PLAY_RUN_START_STREAM_PATH
|
|
3637
3651
|
: PLAY_RUN_START_STREAM_PATH;
|
|
3652
|
+
let cliAdmissionSupported = false;
|
|
3638
3653
|
try {
|
|
3639
3654
|
for await (const event of http.streamSse<PlayLiveEvent>(streamPath, {
|
|
3640
3655
|
method: 'POST',
|
|
@@ -3642,12 +3657,22 @@ export class DeeplineClient {
|
|
|
3642
3657
|
headers,
|
|
3643
3658
|
signal: streamOptions?.signal,
|
|
3644
3659
|
exactUrlOnly: true,
|
|
3660
|
+
...(options?.cliAdmission
|
|
3661
|
+
? {
|
|
3662
|
+
onResponse: (response: Response) => {
|
|
3663
|
+
cliAdmissionSupported =
|
|
3664
|
+
response.headers.get(CLI_PLAY_RUN_SUPPORTED_HEADER) ===
|
|
3665
|
+
'true';
|
|
3666
|
+
},
|
|
3667
|
+
}
|
|
3668
|
+
: {}),
|
|
3645
3669
|
})) {
|
|
3646
3670
|
if (event.scope === 'play') yield event;
|
|
3647
3671
|
}
|
|
3648
3672
|
} catch (error) {
|
|
3649
3673
|
if (
|
|
3650
3674
|
options?.cliAdmission &&
|
|
3675
|
+
!cliAdmissionSupported &&
|
|
3651
3676
|
error instanceof DeeplineError &&
|
|
3652
3677
|
(error.statusCode === 404 || error.statusCode === 405)
|
|
3653
3678
|
) {
|
|
@@ -3659,6 +3684,15 @@ export class DeeplineClient {
|
|
|
3659
3684
|
};
|
|
3660
3685
|
}
|
|
3661
3686
|
|
|
3687
|
+
/**
|
|
3688
|
+
* Internal CLI helper. Reads the server's admission contract before local
|
|
3689
|
+
* preparation so the network round trip can overlap with compilation.
|
|
3690
|
+
* @internal
|
|
3691
|
+
*/
|
|
3692
|
+
async prefetchPlayRunAdmissionCapability(): Promise<PlayRunAdmissionCapability> {
|
|
3693
|
+
return readPlayRunAdmissionCapability(this.http);
|
|
3694
|
+
}
|
|
3695
|
+
|
|
3662
3696
|
/**
|
|
3663
3697
|
* Submit a play run through the legacy event response.
|
|
3664
3698
|
*
|
|
@@ -121,6 +121,7 @@ interface StreamOptions {
|
|
|
121
121
|
body?: unknown;
|
|
122
122
|
headers?: Record<string, string>;
|
|
123
123
|
signal?: AbortSignal;
|
|
124
|
+
onResponse?: (response: Response) => void;
|
|
124
125
|
}
|
|
125
126
|
|
|
126
127
|
type RequestAbortTaggedError = Error & {
|
|
@@ -941,6 +942,7 @@ export class HttpClient {
|
|
|
941
942
|
: undefined,
|
|
942
943
|
signal: options?.signal,
|
|
943
944
|
});
|
|
945
|
+
options?.onResponse?.(response);
|
|
944
946
|
|
|
945
947
|
if (!response.ok) {
|
|
946
948
|
const body = await response.text();
|
|
@@ -68,6 +68,12 @@ export interface PlayRunHttp {
|
|
|
68
68
|
): Promise<T>;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
export type PlayRunAdmissionCapability = {
|
|
72
|
+
admissionContract?: string;
|
|
73
|
+
strictTotalBudget?: string;
|
|
74
|
+
orgId?: string;
|
|
75
|
+
} | null;
|
|
76
|
+
|
|
71
77
|
// ── Run-start body and response ─────────────────────────────────────────────
|
|
72
78
|
|
|
73
79
|
/**
|
|
@@ -188,7 +194,12 @@ export async function preparePlayRunAdmission(
|
|
|
188
194
|
orgId: string;
|
|
189
195
|
request: Record<string, unknown>;
|
|
190
196
|
}) => void | Promise<void>,
|
|
191
|
-
options?: {
|
|
197
|
+
options?: {
|
|
198
|
+
signal?: AbortSignal;
|
|
199
|
+
admissionCapability?:
|
|
200
|
+
| Promise<PlayRunAdmissionCapability>
|
|
201
|
+
| PlayRunAdmissionCapability;
|
|
202
|
+
},
|
|
192
203
|
): Promise<{
|
|
193
204
|
body: Record<string, unknown>;
|
|
194
205
|
workflowId?: string;
|
|
@@ -196,36 +207,10 @@ export async function preparePlayRunAdmission(
|
|
|
196
207
|
}> {
|
|
197
208
|
// The reader ships before the writer. An older route ignores workflowId;
|
|
198
209
|
// that response cannot prove an identity can be reused safely after a timeout.
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
} | null = null;
|
|
204
|
-
if (http.get) {
|
|
205
|
-
try {
|
|
206
|
-
capability = await http.get(PLAY_RUN_START_PATH, options);
|
|
207
|
-
} catch (error) {
|
|
208
|
-
if (
|
|
209
|
-
!(error instanceof DeeplineError) ||
|
|
210
|
-
![404, 405].includes(error.statusCode ?? 0)
|
|
211
|
-
)
|
|
212
|
-
throw error;
|
|
213
|
-
// Only an authoritative absent route proves an older server. A timeout,
|
|
214
|
-
// 503, or authentication denial must never switch to an unkeyed writer.
|
|
215
|
-
}
|
|
216
|
-
if (
|
|
217
|
-
capability &&
|
|
218
|
-
!['caller-intent-v1', 'unsupported'].includes(
|
|
219
|
-
capability.admissionContract ?? '',
|
|
220
|
-
)
|
|
221
|
-
) {
|
|
222
|
-
throw new DeeplineError(
|
|
223
|
-
'The server admission capability response is unknown; execution was not submitted.',
|
|
224
|
-
503,
|
|
225
|
-
'PLAY_RUN_ADMISSION_CAPABILITY_UNKNOWN',
|
|
226
|
-
);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
210
|
+
const capability =
|
|
211
|
+
options && Object.hasOwn(options, 'admissionCapability')
|
|
212
|
+
? await options.admissionCapability
|
|
213
|
+
: await readPlayRunAdmissionCapability(http, options);
|
|
229
214
|
const supportsCallerIntent =
|
|
230
215
|
capability?.admissionContract === 'caller-intent-v1';
|
|
231
216
|
options?.signal?.throwIfAborted();
|
|
@@ -316,6 +301,44 @@ export async function preparePlayRunAdmission(
|
|
|
316
301
|
return { body: submittedBody, workflowId, supportsCallerIntent };
|
|
317
302
|
}
|
|
318
303
|
|
|
304
|
+
/** Read the admission contract before submission; callers may overlap this GET with local preparation. */
|
|
305
|
+
export async function readPlayRunAdmissionCapability(
|
|
306
|
+
http: PlayRunHttp,
|
|
307
|
+
options?: { signal?: AbortSignal },
|
|
308
|
+
): Promise<PlayRunAdmissionCapability> {
|
|
309
|
+
let capability: PlayRunAdmissionCapability = null;
|
|
310
|
+
if (http.get) {
|
|
311
|
+
try {
|
|
312
|
+
capability = await http.get<PlayRunAdmissionCapability>(
|
|
313
|
+
PLAY_RUN_START_PATH,
|
|
314
|
+
options,
|
|
315
|
+
);
|
|
316
|
+
} catch (error) {
|
|
317
|
+
if (
|
|
318
|
+
!(error instanceof DeeplineError) ||
|
|
319
|
+
![404, 405].includes(error.statusCode ?? 0)
|
|
320
|
+
) {
|
|
321
|
+
throw error;
|
|
322
|
+
}
|
|
323
|
+
// Only an authoritative absent route proves an older server. A timeout,
|
|
324
|
+
// 503, or authentication denial must never switch to an unkeyed writer.
|
|
325
|
+
}
|
|
326
|
+
if (
|
|
327
|
+
capability &&
|
|
328
|
+
!['caller-intent-v1', 'unsupported'].includes(
|
|
329
|
+
capability.admissionContract ?? '',
|
|
330
|
+
)
|
|
331
|
+
) {
|
|
332
|
+
throw new DeeplineError(
|
|
333
|
+
'The server admission capability response is unknown; execution was not submitted.',
|
|
334
|
+
503,
|
|
335
|
+
'PLAY_RUN_ADMISSION_CAPABILITY_UNKNOWN',
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
return capability;
|
|
340
|
+
}
|
|
341
|
+
|
|
319
342
|
export async function startPlayRun(
|
|
320
343
|
http: PlayRunHttp,
|
|
321
344
|
request: ResolvedStartPlayRunRequest,
|
|
@@ -205,7 +205,7 @@ export const SDK_RELEASE = {
|
|
|
205
205
|
// getters keep their established compatibility behavior.
|
|
206
206
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
207
207
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
208
|
-
version: '0.3.
|
|
208
|
+
version: '0.3.481',
|
|
209
209
|
updateSummary: {
|
|
210
210
|
introducedIn: '0.3.90',
|
|
211
211
|
summary:
|