deepline 0.3.390 → 0.3.391
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/agent-runtime.ts +21 -16
- package/dist/bundling-sources/sdk/src/billing-idempotency.ts +1 -1
- package/dist/bundling-sources/sdk/src/cli-invocation-id.ts +1 -1
- package/dist/bundling-sources/sdk/src/client.ts +75 -52
- package/dist/bundling-sources/sdk/src/config.ts +3 -2
- package/dist/bundling-sources/sdk/src/db/query.ts +3 -3
- package/dist/bundling-sources/sdk/src/deployment-protection.ts +7 -5
- package/dist/bundling-sources/sdk/src/http.ts +31 -41
- package/dist/bundling-sources/sdk/src/index.ts +26 -26
- package/dist/bundling-sources/sdk/src/play.ts +5 -5
- package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +1 -1
- package/dist/bundling-sources/sdk/src/plays/local-play-execution.ts +2 -2
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +2 -2
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/runs/read-errors.ts +1 -1
- package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +1 -1
- package/dist/bundling-sources/sdk/src/skills-version.ts +2 -2
- package/dist/bundling-sources/sdk/src/tool-calls.ts +3 -3
- package/dist/bundling-sources/sdk/src/types.ts +10 -1
- package/dist/bundling-sources/sdk/src/version.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +87 -1
- package/dist/bundling-sources/shared_libs/plays/local-file-discovery.ts +1 -1
- package/dist/cli/{auth-THPE72WM.mjs → auth-6QET7NFP.mjs} +4 -4
- package/dist/cli/auth-6ZUH42ZA.js +39 -0
- package/dist/cli/{billing-52KJIWW2.mjs → billing-HAQ2VDQX.mjs} +4 -4
- package/dist/cli/{billing-YRXEPKPB.js → billing-KJAGTCFR.js} +73 -73
- package/dist/cli/{chunk-TLCCVMSB.js → chunk-4S6X74A3.js} +2 -2
- package/dist/cli/{chunk-HXENYWVS.js → chunk-4TCT77UF.js} +485 -114
- package/dist/cli/{chunk-KUEYQLM3.js → chunk-556BMGEB.js} +235 -220
- package/dist/cli/{chunk-KZOKUN3N.mjs → chunk-6L4P7Z6C.mjs} +2 -2
- package/dist/cli/{chunk-NQZW72DN.mjs → chunk-DRZFTRZJ.mjs} +46 -31
- package/dist/cli/{chunk-ENJWB4SX.js → chunk-ED42XCOW.js} +226 -226
- package/dist/cli/{chunk-B22POC3J.mjs → chunk-H2ER7QWR.mjs} +6 -6
- package/dist/cli/{chunk-Z7LX4WYM.mjs → chunk-H3DCZOXR.mjs} +5 -5
- package/dist/cli/{chunk-JV7YZMNK.mjs → chunk-HFTOOZGN.mjs} +3 -3
- package/dist/cli/{chunk-FKFE3WH3.mjs → chunk-I3MKXASV.mjs} +2 -2
- package/dist/cli/{chunk-MI2JQCYZ.js → chunk-I7EVBLTW.js} +6 -6
- package/dist/cli/{chunk-DNYNJU5J.mjs → chunk-K3ODOHOI.mjs} +34 -26
- package/dist/cli/{chunk-L7NEMEUI.js → chunk-KA7X75HC.js} +48 -48
- package/dist/cli/{chunk-EMJB62SM.mjs → chunk-KWF4HJF7.mjs} +1 -1
- package/dist/cli/{chunk-UCPH7S5H.js → chunk-ME2DZAHC.js} +26 -26
- package/dist/cli/{chunk-CZUGLUQK.js → chunk-MHLCMJ2E.js} +99 -91
- package/dist/cli/{chunk-RWOX543D.mjs → chunk-PFPP4BKS.mjs} +2 -2
- package/dist/cli/{chunk-HVDBGPDP.mjs → chunk-PQSA443V.mjs} +485 -114
- package/dist/cli/{chunk-CU7GDBBM.mjs → chunk-QCWIORKR.mjs} +2 -2
- package/dist/cli/{chunk-PMNJLCIA.js → chunk-RA2SDTSX.js} +15 -15
- package/dist/cli/{chunk-QANTWJXH.js → chunk-RTH26NF3.js} +61 -61
- package/dist/cli/{chunk-653YVNNZ.mjs → chunk-TLHF54VX.mjs} +1 -1
- package/dist/cli/{chunk-T5JMOYB4.js → chunk-UOSKJIXE.js} +8 -8
- package/dist/cli/{chunk-5KD4F7NR.mjs → chunk-VH4B5OYM.mjs} +1 -1
- package/dist/cli/{chunk-OV567DMC.js → chunk-WLODHQ7S.js} +1 -1
- package/dist/cli/{chunk-ZFZ5PICC.js → chunk-XBPLTHGB.js} +8 -8
- package/dist/cli/{chunk-QVMRQYSO.js → chunk-XEV5LMS2.js} +50 -50
- package/dist/cli/{chunk-ICZQGDYM.mjs → chunk-YBZY3EZF.mjs} +4 -4
- package/dist/cli/command-docs.d.mts +24 -1
- package/dist/cli/command-docs.d.ts +24 -1
- package/dist/cli/command-docs.js +8 -2
- package/dist/cli/command-docs.mjs +9 -3
- package/dist/cli/{csv-JYDWK56E.js → csv-2WSF5TEM.js} +12 -12
- package/dist/cli/{csv-IPUY3W6Z.mjs → csv-V7UHOBFE.mjs} +3 -3
- package/dist/cli/{db-DAWM3T76.js → db-42RL4FZD.js} +29 -29
- package/dist/cli/{db-IP5IPYJQ.mjs → db-TD375E4N.mjs} +4 -4
- package/dist/cli/{describe-5UWGF33U.js → describe-7WFCBZUY.js} +18 -18
- package/dist/cli/{describe-3RTUG7EW.mjs → describe-GPUKAWOZ.mjs} +8 -8
- package/dist/cli/{executions-OEKC7TL5.js → executions-LGVG3FPH.js} +6 -6
- package/dist/cli/{executions-7ZNMR443.mjs → executions-M7O63JNA.mjs} +4 -4
- package/dist/cli/{feedback-IUJV565X.mjs → feedback-6PBSKVB2.mjs} +3 -3
- package/dist/cli/{feedback-5F2NQJP4.js → feedback-PZZA2M4S.js} +7 -7
- package/dist/cli/{git-IPV5G2PS.mjs → git-2VIFM5DI.mjs} +4 -4
- package/dist/cli/git-ZSJD3BID.js +23 -0
- package/dist/cli/index.js +93 -93
- package/dist/cli/index.mjs +33 -33
- package/dist/cli/{legacy-noops-UQOWD66P.mjs → legacy-noops-DPUBZI7N.mjs} +4 -4
- package/dist/cli/{legacy-noops-IZZRWI7V.js → legacy-noops-IQ6QTZNZ.js} +7 -7
- package/dist/cli/{monitors-N6WK7YPE.js → monitors-6GWAZFYV.js} +85 -85
- package/dist/cli/{monitors-SULGYCTF.mjs → monitors-KBZVQG2U.mjs} +4 -4
- package/dist/cli/{org-EPVTTBDK.mjs → org-CP3VSJBX.mjs} +4 -4
- package/dist/cli/{org-COMHSC5H.js → org-JKGTHXOZ.js} +64 -64
- package/dist/cli/{play-OCTPASJI.mjs → play-DD2ME4L4.mjs} +7 -7
- package/dist/cli/play-G5GVMIBN.js +157 -0
- package/dist/cli/{providers-QBVNC5EV.mjs → providers-JUNOFKI7.mjs} +4 -4
- package/dist/cli/{providers-34D6ATLE.js → providers-P34QYYG6.js} +7 -7
- package/dist/cli/{quickstart-SYGV5XVH.mjs → quickstart-N6SWOK7E.mjs} +3 -3
- package/dist/cli/{quickstart-3XR45BHI.js → quickstart-UL3DEFA4.js} +5 -5
- package/dist/cli/{search-UUJ7EHBV.mjs → search-SC7I56HX.mjs} +5 -5
- package/dist/cli/search-W4GXWTOM.js +26 -0
- package/dist/cli/{secrets-TIL6DESO.js → secrets-6ZJE7ZPM.js} +13 -13
- package/dist/cli/{secrets-MWRFHNIT.mjs → secrets-RTARNYF5.mjs} +4 -4
- package/dist/cli/{sessions-2LXC6ZYD.js → sessions-6IZ2XHGW.js} +5 -5
- package/dist/cli/{sessions-5TKMBU5P.mjs → sessions-7RKV2T3O.mjs} +4 -4
- package/dist/cli/{settings-NRIACLPU.mjs → settings-V6PXA6HY.mjs} +7 -7
- package/dist/cli/{settings-II3IQECQ.js → settings-YX3XJDXE.js} +74 -74
- package/dist/cli/{setup-AF3UMIIC.js → setup-CQ5VRNNU.js} +41 -41
- package/dist/cli/{setup-VIMZ4U73.mjs → setup-V2O4UJNT.mjs} +6 -6
- package/dist/cli/skills-LBZPJTPI.js +28 -0
- package/dist/cli/{skills-5OKAXXWJ.mjs → skills-VHJZWEHA.mjs} +4 -4
- package/dist/cli/{tools-5UXNV4YY.mjs → tools-OD5WKEWY.mjs} +6 -6
- package/dist/cli/tools-TQNM473H.js +40 -0
- package/dist/cli/{update-Q4HX6CR3.mjs → update-CRMNOMJ3.mjs} +6 -6
- package/dist/cli/update-QY6GAK6B.js +28 -0
- package/dist/cli/{workflow-45BLG7GN.mjs → workflow-EVDYNCDD.mjs} +5 -5
- package/dist/cli/{workflow-NZZ5H4P4.js → workflow-XHORSD5T.js} +15 -15
- package/dist/{client-DEKvymBI.d.ts → client-BhK9kix9.d.ts} +19 -0
- package/dist/{client-0avPvYBP.d.mts → client-DpzZi4fU.d.mts} +19 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +76 -76
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -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/package.json +1 -1
- package/dist/cli/auth-OVT7BZ5A.js +0 -39
- package/dist/cli/git-ZZ5MD2KG.js +0 -23
- package/dist/cli/play-RWY2JHAP.js +0 -157
- package/dist/cli/search-PTG76HU3.js +0 -26
- package/dist/cli/skills-I6NTZMBZ.js +0 -28
- package/dist/cli/tools-NXD7YFYV.js +0 -40
- package/dist/cli/update-SZ6AMT3M.js +0 -28
|
@@ -77,20 +77,20 @@ export {
|
|
|
77
77
|
MONITOR_JOB_PHASES,
|
|
78
78
|
MONITOR_JOB_RECONCILIATION_STATES,
|
|
79
79
|
MONITOR_JOB_STATES,
|
|
80
|
-
} from './client
|
|
80
|
+
} from './client';
|
|
81
81
|
export type {
|
|
82
82
|
CustomerDbQueryOptions,
|
|
83
83
|
CustomerDbQueryPlan,
|
|
84
|
-
} from './db/query
|
|
85
|
-
export { planCustomerDbQuery } from './db/query
|
|
86
|
-
export type { DeeplineToolCallOptions } from './play
|
|
84
|
+
} from './db/query';
|
|
85
|
+
export { planCustomerDbQuery } from './db/query';
|
|
86
|
+
export type { DeeplineToolCallOptions } from './play';
|
|
87
87
|
export {
|
|
88
88
|
planLocalPlayExecution,
|
|
89
89
|
pinLocalPlayImports,
|
|
90
|
-
} from './plays/local-play-execution
|
|
91
|
-
export type { LocalPlayGraph } from './plays/local-play-execution
|
|
92
|
-
export { CtxFetchHttpError } from './play
|
|
93
|
-
export { RunObserveTransportUnavailableError } from './runs/observe-transport
|
|
90
|
+
} from './plays/local-play-execution';
|
|
91
|
+
export type { LocalPlayGraph } from './plays/local-play-execution';
|
|
92
|
+
export { CtxFetchHttpError } from './play';
|
|
93
|
+
export { RunObserveTransportUnavailableError } from './runs/observe-transport';
|
|
94
94
|
export { RunEventQueryInputError } from '../../shared_libs/play-runtime/run-event-query';
|
|
95
95
|
export type {
|
|
96
96
|
RunEventField,
|
|
@@ -208,23 +208,23 @@ export type {
|
|
|
208
208
|
ToolExecution,
|
|
209
209
|
ExecutionRecovery,
|
|
210
210
|
ExecutionByKeyResult,
|
|
211
|
-
} from './client
|
|
212
|
-
export type { ChildRunSummary } from './types
|
|
211
|
+
} from './client';
|
|
212
|
+
export type { ChildRunSummary } from './types';
|
|
213
213
|
|
|
214
214
|
// ——— Monitors framework ———
|
|
215
|
-
export { defineMonitor } from './monitors
|
|
216
|
-
export { isStopAllPlayRunsDryRunResult } from './types
|
|
217
|
-
export type { MonitorDefinition, MonitorPayload } from './monitors
|
|
215
|
+
export { defineMonitor } from './monitors';
|
|
216
|
+
export { isStopAllPlayRunsDryRunResult } from './types';
|
|
217
|
+
export type { MonitorDefinition, MonitorPayload } from './monitors';
|
|
218
218
|
export {
|
|
219
219
|
lintMonitorBatchInput,
|
|
220
220
|
lintMonitorSpecTemplate,
|
|
221
221
|
renderMonitorSpecTemplate,
|
|
222
|
-
} from './monitor-input-contract
|
|
222
|
+
} from './monitor-input-contract';
|
|
223
223
|
export type {
|
|
224
224
|
BatchMonitorInput,
|
|
225
225
|
MonitorInputIssue,
|
|
226
226
|
MonitorSpec as MonitorInputSpec,
|
|
227
|
-
} from './monitor-input-contract
|
|
227
|
+
} from './monitor-input-contract';
|
|
228
228
|
export {
|
|
229
229
|
admitMonitorFleetAuthoringContract,
|
|
230
230
|
MONITOR_FLEET_AUTHORING_CONTRACT_CHANGELOG,
|
|
@@ -237,7 +237,7 @@ export {
|
|
|
237
237
|
fleetKey,
|
|
238
238
|
lintMonitorFleetInput,
|
|
239
239
|
validateMonitorFleetDefinition,
|
|
240
|
-
} from './monitor-fleets
|
|
240
|
+
} from './monitor-fleets';
|
|
241
241
|
export type {
|
|
242
242
|
AdmittedMonitorFleetAuthoringContract,
|
|
243
243
|
MonitorFleetAuthoringContractEdition,
|
|
@@ -247,8 +247,8 @@ export type {
|
|
|
247
247
|
MonitorFleetDefinition,
|
|
248
248
|
MonitorFleetExpression,
|
|
249
249
|
MonitorFleetTemplate,
|
|
250
|
-
} from './monitor-fleets
|
|
251
|
-
export { SDK_API_CONTRACT, SDK_VERSION } from './version
|
|
250
|
+
} from './monitor-fleets';
|
|
251
|
+
export { SDK_API_CONTRACT, SDK_VERSION } from './version';
|
|
252
252
|
export { DEEPLINE_TOOL_CATEGORIES } from '../../shared_libs/plays/tool-categories.js';
|
|
253
253
|
|
|
254
254
|
// ——— Errors ———
|
|
@@ -264,7 +264,7 @@ export {
|
|
|
264
264
|
RateLimitError,
|
|
265
265
|
ToolRateLimitError,
|
|
266
266
|
ConfigError,
|
|
267
|
-
} from './errors
|
|
267
|
+
} from './errors';
|
|
268
268
|
export type {
|
|
269
269
|
ProviderTransientErrorCategory,
|
|
270
270
|
ProviderUnavailableError,
|
|
@@ -276,10 +276,10 @@ export type {
|
|
|
276
276
|
ToolExecutionNetworkKind,
|
|
277
277
|
ToolExecutionNetworkScope,
|
|
278
278
|
ToolExecutionPublicDetails,
|
|
279
|
-
} from './errors
|
|
279
|
+
} from './errors';
|
|
280
280
|
|
|
281
281
|
// ——— Config ———
|
|
282
|
-
export { resolveConfig, PROD_URL } from './config
|
|
282
|
+
export { resolveConfig, PROD_URL } from './config';
|
|
283
283
|
|
|
284
284
|
// ——— Play framework ———
|
|
285
285
|
export {
|
|
@@ -297,7 +297,7 @@ export {
|
|
|
297
297
|
runIf,
|
|
298
298
|
readList,
|
|
299
299
|
steps,
|
|
300
|
-
} from './play
|
|
300
|
+
} from './play';
|
|
301
301
|
|
|
302
302
|
// ——— Tool output processing ———
|
|
303
303
|
export {
|
|
@@ -305,7 +305,7 @@ export {
|
|
|
305
305
|
writeCsvOutputFile,
|
|
306
306
|
writeJsonOutputFile,
|
|
307
307
|
extractSummaryFields,
|
|
308
|
-
} from './tool-output
|
|
308
|
+
} from './tool-output';
|
|
309
309
|
|
|
310
310
|
// ——— Types (re-exported for consumers) ———
|
|
311
311
|
export type {
|
|
@@ -348,7 +348,7 @@ export type {
|
|
|
348
348
|
SearchResult,
|
|
349
349
|
SearchResultItem,
|
|
350
350
|
SearchType,
|
|
351
|
-
} from './types
|
|
351
|
+
} from './types';
|
|
352
352
|
|
|
353
353
|
export type {
|
|
354
354
|
DefinePlayConfig,
|
|
@@ -402,8 +402,8 @@ export type {
|
|
|
402
402
|
DeeplineGetterValueMap,
|
|
403
403
|
JobChangeStatus,
|
|
404
404
|
PhoneStatus,
|
|
405
|
-
} from './play
|
|
405
|
+
} from './play';
|
|
406
406
|
export type {
|
|
407
407
|
RunToolReceiptResult,
|
|
408
408
|
RunToolReceiptsResponse,
|
|
409
|
-
} from './runs/receipts
|
|
409
|
+
} from './runs/receipts';
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
*
|
|
75
75
|
* @module
|
|
76
76
|
*/
|
|
77
|
-
import { DeeplineClient } from './client
|
|
78
|
-
import { DeeplineError } from './errors
|
|
77
|
+
import { DeeplineClient } from './client';
|
|
78
|
+
import { DeeplineError } from './errors';
|
|
79
79
|
import {
|
|
80
80
|
attachToolResultListDataset,
|
|
81
81
|
createToolExecuteResult,
|
|
@@ -112,14 +112,14 @@ import type {
|
|
|
112
112
|
StopPlayRunResult,
|
|
113
113
|
ToolDefinition,
|
|
114
114
|
ToolMetadata,
|
|
115
|
-
} from './types
|
|
115
|
+
} from './types';
|
|
116
116
|
import type {
|
|
117
117
|
BillingNamespace,
|
|
118
118
|
ExecutionByKeyResult,
|
|
119
119
|
ExecutionRecovery,
|
|
120
120
|
ToolExecution,
|
|
121
|
-
} from './client
|
|
122
|
-
import type { ExecuteToolRawOptions } from './tool-calls
|
|
121
|
+
} from './client';
|
|
122
|
+
import type { ExecuteToolRawOptions } from './tool-calls';
|
|
123
123
|
import type {
|
|
124
124
|
DurableCallStaleAfterSeconds,
|
|
125
125
|
PlayAuthoringBindings,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from '../../../shared_libs/play-runtime/backend.js';
|
|
21
21
|
import { resolveExecutionProfile } from '../../../shared_libs/play-runtime/profiles.js';
|
|
22
22
|
import { validatePlaySourceFilesHaveNoInlineSecrets } from '../../../shared_libs/plays/secret-guardrails.js';
|
|
23
|
-
import { discoverPackagedLocalFiles } from './local-file-discovery
|
|
23
|
+
import { discoverPackagedLocalFiles } from './local-file-discovery';
|
|
24
24
|
|
|
25
25
|
export type {
|
|
26
26
|
BundlePlayFileOptions,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DeeplineClient } from '../client
|
|
2
|
-
import type { BundledPlayFileSuccess } from './bundle-play-file
|
|
1
|
+
import type { DeeplineClient } from '../client';
|
|
2
|
+
import type { BundledPlayFileSuccess } from './bundle-play-file';
|
|
3
3
|
|
|
4
4
|
export type LocalPlayGraph = {
|
|
5
5
|
root: BundledPlayFileSuccess;
|
|
@@ -22,8 +22,8 @@ import type {
|
|
|
22
22
|
PlayRunPackage,
|
|
23
23
|
PlayRunStart,
|
|
24
24
|
StartPlayRunRequest,
|
|
25
|
-
} from '../types
|
|
26
|
-
import type { PlayStagedFileRef } from './local-file-discovery
|
|
25
|
+
} from '../types';
|
|
26
|
+
import type { PlayStagedFileRef } from './local-file-discovery';
|
|
27
27
|
|
|
28
28
|
export { DeeplineError };
|
|
29
29
|
|
|
@@ -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.391',
|
|
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: {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
type PlayRunStreamDiffState,
|
|
8
8
|
type PlayRunStreamEvent,
|
|
9
9
|
} from '../../../shared_libs/play-runtime/run-snapshot-stream.js';
|
|
10
|
-
import { isTransientPlayRunReadError } from './read-errors
|
|
10
|
+
import { isTransientPlayRunReadError } from './read-errors';
|
|
11
11
|
|
|
12
12
|
/** The watch endpoint is a small authenticated REST read, polled every two seconds. */
|
|
13
13
|
export const RUN_WATCH_POLL_INTERVAL_MS = 2_000;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import { dirname, join } from 'node:path';
|
|
3
|
-
import { detectAgentRuntime } from './agent-runtime
|
|
4
|
-
import { sdkCliStateDirPath } from './config
|
|
3
|
+
import { detectAgentRuntime } from './agent-runtime';
|
|
4
|
+
import { sdkCliStateDirPath } from './config';
|
|
5
5
|
|
|
6
6
|
function activePluginSkillsDir(): string {
|
|
7
7
|
const pluginMode = process.env.DEEPLINE_PLUGIN_MODE?.trim().toLowerCase();
|
|
@@ -16,9 +16,9 @@ import {
|
|
|
16
16
|
RAW_V2_TOOL_RESPONSE_CONTRACT,
|
|
17
17
|
} from '../../shared_libs/plays/tool-response-contract.js';
|
|
18
18
|
|
|
19
|
-
import { DeeplineError, ToolExecutionError } from './errors
|
|
20
|
-
import type { HttpClient } from './http
|
|
21
|
-
import { validateCliInvocationId } from './cli-invocation-id
|
|
19
|
+
import { DeeplineError, ToolExecutionError } from './errors';
|
|
20
|
+
import type { HttpClient } from './http';
|
|
21
|
+
import { validateCliInvocationId } from './cli-invocation-id';
|
|
22
22
|
|
|
23
23
|
const INCLUDE_TOOL_METADATA_HEADER = 'x-deepline-include-tool-metadata';
|
|
24
24
|
const EXECUTE_RESPONSE_CONTRACT_HEADER = 'x-deepline-execute-response-contract';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PlaySettings } from '../../shared_libs/plays/settings-contract';
|
|
2
2
|
import type { PlayCompilerManifest } from '../../shared_libs/plays/compiler-manifest';
|
|
3
|
-
import type { RunGetStatus, RunLifecycleStatus } from './client
|
|
3
|
+
import type { RunGetStatus, RunLifecycleStatus } from './client';
|
|
4
4
|
import type { PlayGrepMatch } from '../../shared_libs/plays/play-grep-search';
|
|
5
5
|
import type { PlayRuntimeSelection } from '../../shared_libs/play-runtime/runtime-environment';
|
|
6
6
|
import type {
|
|
@@ -77,6 +77,13 @@ export interface DeeplineClientOptions {
|
|
|
77
77
|
* internal header it honors.
|
|
78
78
|
*/
|
|
79
79
|
headers?: Record<string, string>;
|
|
80
|
+
/**
|
|
81
|
+
* The environment this client reads for caller settings: runtime selection,
|
|
82
|
+
* eval integration mode, deployment protection, and the internal headers a
|
|
83
|
+
* test harness sets. Default: `process.env`. A server that calls the API for
|
|
84
|
+
* someone else passes `{}`, so its own environment never reaches a request.
|
|
85
|
+
*/
|
|
86
|
+
environment?: Readonly<Record<string, string | undefined>>;
|
|
80
87
|
}
|
|
81
88
|
|
|
82
89
|
/**
|
|
@@ -99,6 +106,8 @@ export interface ResolvedConfig {
|
|
|
99
106
|
* {@link DeeplineClientOptions.headers}.
|
|
100
107
|
*/
|
|
101
108
|
headers?: Record<string, string>;
|
|
109
|
+
/** {@link DeeplineClientOptions.environment}; absent means `process.env`. */
|
|
110
|
+
environment?: Readonly<Record<string, string | undefined>>;
|
|
102
111
|
}
|
|
103
112
|
|
|
104
113
|
/** Column metadata returned by a customer data query. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Derived from packages/sdk/src/release.ts. Do not edit by hand.
|
|
2
2
|
// Bump the version in packages/sdk/src/release.ts; this file follows.
|
|
3
|
-
import { SDK_RELEASE } from './release
|
|
3
|
+
import { SDK_RELEASE } from './release';
|
|
4
4
|
|
|
5
5
|
export const SDK_VERSION: string = SDK_RELEASE.version;
|
|
6
6
|
/** Numbered SDK HTTP API major sent by current SDK/CLI clients. */
|
|
@@ -48,6 +48,12 @@ export type AsyncOperationActionCall = {
|
|
|
48
48
|
input: AsyncOperationInputMapping;
|
|
49
49
|
/** Reuse the terminal poll response when poll and finish are the same read. */
|
|
50
50
|
reuseTerminalPollResult?: boolean;
|
|
51
|
+
/** Split a finish input list into provider-sized reads and merge their items. */
|
|
52
|
+
batching?: {
|
|
53
|
+
inputField: string;
|
|
54
|
+
maxItems: number;
|
|
55
|
+
itemsPath: string;
|
|
56
|
+
};
|
|
51
57
|
pagination?: {
|
|
52
58
|
pageInputField: string;
|
|
53
59
|
startPage: number;
|
|
@@ -235,6 +241,26 @@ export function defineAsyncOperation(
|
|
|
235
241
|
contract.lifecycle.finishAction,
|
|
236
242
|
'lifecycle.finishAction',
|
|
237
243
|
);
|
|
244
|
+
const batching = contract.lifecycle.finishAction.batching;
|
|
245
|
+
if (batching) {
|
|
246
|
+
required(
|
|
247
|
+
batching.inputField,
|
|
248
|
+
'lifecycle.finishAction.batching.inputField',
|
|
249
|
+
);
|
|
250
|
+
positiveInteger(
|
|
251
|
+
batching.maxItems,
|
|
252
|
+
'lifecycle.finishAction.batching.maxItems',
|
|
253
|
+
);
|
|
254
|
+
required(batching.itemsPath, 'lifecycle.finishAction.batching.itemsPath');
|
|
255
|
+
if (
|
|
256
|
+
contract.lifecycle.finishAction.pagination ||
|
|
257
|
+
contract.lifecycle.finishAction.reuseTerminalPollResult
|
|
258
|
+
) {
|
|
259
|
+
throw new Error(
|
|
260
|
+
'AsyncOperationContract batched finish action cannot paginate or reuse the terminal poll result.',
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
238
264
|
const pagination = contract.lifecycle.finishAction.pagination;
|
|
239
265
|
if (pagination) {
|
|
240
266
|
required(
|
|
@@ -1272,15 +1298,75 @@ export async function executeAsyncOperationLifecycle<Response>(input: {
|
|
|
1272
1298
|
startResult: input.startResult,
|
|
1273
1299
|
pollResult: previousPollResult,
|
|
1274
1300
|
});
|
|
1301
|
+
const batching = finishAction.batching;
|
|
1302
|
+
const batchItems = batching
|
|
1303
|
+
? finishInput[batching.inputField]
|
|
1304
|
+
: undefined;
|
|
1305
|
+
if (
|
|
1306
|
+
batching &&
|
|
1307
|
+
(!Array.isArray(batchItems) || batchItems.length === 0)
|
|
1308
|
+
) {
|
|
1309
|
+
throw new Error(
|
|
1310
|
+
`Async operation ${input.contract.lifecycle.startAction} finish input ${batching.inputField} must be a nonempty array.`,
|
|
1311
|
+
);
|
|
1312
|
+
}
|
|
1275
1313
|
const actionExecution = await executeActionWithinDeadline({
|
|
1276
1314
|
action: finishAction.action,
|
|
1277
|
-
input:
|
|
1315
|
+
input:
|
|
1316
|
+
batching && Array.isArray(batchItems)
|
|
1317
|
+
? {
|
|
1318
|
+
...finishInput,
|
|
1319
|
+
[batching.inputField]: batchItems.slice(0, batching.maxItems),
|
|
1320
|
+
}
|
|
1321
|
+
: finishInput,
|
|
1278
1322
|
phase: 'finish',
|
|
1279
1323
|
pollAttempt,
|
|
1280
1324
|
});
|
|
1281
1325
|
if (actionExecution.kind === 'timed_out') return timedOut();
|
|
1282
1326
|
finishResponse = actionExecution.response;
|
|
1283
1327
|
finishResult = input.responseValue(finishResponse);
|
|
1328
|
+
if (batching && Array.isArray(batchItems)) {
|
|
1329
|
+
const allItems: unknown[] = [];
|
|
1330
|
+
let currentResult = finishResult;
|
|
1331
|
+
for (
|
|
1332
|
+
let offset = 0;
|
|
1333
|
+
offset < batchItems.length;
|
|
1334
|
+
offset += batching.maxItems
|
|
1335
|
+
) {
|
|
1336
|
+
if (offset > 0) {
|
|
1337
|
+
const batchExecution = await executeActionWithinDeadline({
|
|
1338
|
+
action: finishAction.action,
|
|
1339
|
+
input: {
|
|
1340
|
+
...finishInput,
|
|
1341
|
+
[batching.inputField]: batchItems.slice(
|
|
1342
|
+
offset,
|
|
1343
|
+
offset + batching.maxItems,
|
|
1344
|
+
),
|
|
1345
|
+
},
|
|
1346
|
+
phase: 'finish_page',
|
|
1347
|
+
pollAttempt,
|
|
1348
|
+
page: offset / batching.maxItems,
|
|
1349
|
+
});
|
|
1350
|
+
if (batchExecution.kind === 'timed_out') return timedOut();
|
|
1351
|
+
currentResult = input.responseValue(batchExecution.response);
|
|
1352
|
+
}
|
|
1353
|
+
const items = readAsyncOperationPath(
|
|
1354
|
+
currentResult,
|
|
1355
|
+
batching.itemsPath,
|
|
1356
|
+
);
|
|
1357
|
+
if (!Array.isArray(items)) {
|
|
1358
|
+
throw new Error(
|
|
1359
|
+
`Async operation ${input.contract.lifecycle.startAction} finish batch is missing array ${batching.itemsPath}.`,
|
|
1360
|
+
);
|
|
1361
|
+
}
|
|
1362
|
+
allItems.push(...items);
|
|
1363
|
+
}
|
|
1364
|
+
finishResult = writeAsyncOperationPath(
|
|
1365
|
+
finishResult,
|
|
1366
|
+
batching.itemsPath,
|
|
1367
|
+
allItems,
|
|
1368
|
+
);
|
|
1369
|
+
}
|
|
1284
1370
|
const pagination = finishAction.pagination;
|
|
1285
1371
|
if (pagination) {
|
|
1286
1372
|
const firstItems = readAsyncOperationPath(
|
|
@@ -314,7 +314,7 @@ export async function discoverPackagedLocalFiles(
|
|
|
314
314
|
unresolved.push({
|
|
315
315
|
sourceFragment: extractSourceFragment(sourceCode, argument),
|
|
316
316
|
message:
|
|
317
|
-
'ctx.csv(...) packaged file paths must be relative paths inside the play directory.
|
|
317
|
+
'ctx.csv(...) packaged file paths must be relative paths inside the play directory. Read an external file from a runtime input instead, for example ctx.csv(input.file), and supply the file when the play runs.',
|
|
318
318
|
});
|
|
319
319
|
return;
|
|
320
320
|
}
|
|
@@ -13,12 +13,12 @@ import {
|
|
|
13
13
|
reportSetupCompleted,
|
|
14
14
|
resolvePendingAuthClaimForResume,
|
|
15
15
|
statusBannerLine
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-PFPP4BKS.mjs";
|
|
17
|
+
import "./chunk-VH4B5OYM.mjs";
|
|
18
|
+
import "./chunk-K3ODOHOI.mjs";
|
|
19
19
|
import "./chunk-DLIRSHV6.mjs";
|
|
20
20
|
import "./chunk-NXGCO4JB.mjs";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-KWF4HJF7.mjs";
|
|
22
22
|
import "./chunk-WZYKRD7T.mjs";
|
|
23
23
|
import "./chunk-KRD6H754.mjs";
|
|
24
24
|
export {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var _chunkXEV5LMS2js = require('./chunk-XEV5LMS2.js');
|
|
17
|
+
require('./chunk-I7EVBLTW.js');
|
|
18
|
+
require('./chunk-MHLCMJ2E.js');
|
|
19
|
+
require('./chunk-XNYIZMNQ.js');
|
|
20
|
+
require('./chunk-7P5AA3SN.js');
|
|
21
|
+
require('./chunk-WLODHQ7S.js');
|
|
22
|
+
require('./chunk-OG64RBAC.js');
|
|
23
|
+
require('./chunk-COGTRVWW.js');
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
exports.EXIT_WORKSPACE_MISMATCH = _chunkXEV5LMS2js.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkXEV5LMS2js.authStatusLine; exports.clearPendingClaim = _chunkXEV5LMS2js.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkXEV5LMS2js.clearSatisfiedPendingClaim; exports.handleRegister = _chunkXEV5LMS2js.handleRegister; exports.handleStatus = _chunkXEV5LMS2js.handleStatus; exports.handleWait = _chunkXEV5LMS2js.handleWait; exports.httpJson = _chunkXEV5LMS2js.httpJson; exports.readPendingAuthClaim = _chunkXEV5LMS2js.readPendingAuthClaim; exports.readStatusBanner = _chunkXEV5LMS2js.readStatusBanner; exports.registerAuthCommands = _chunkXEV5LMS2js.registerAuthCommands; exports.reportSetupCompleted = _chunkXEV5LMS2js.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkXEV5LMS2js.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkXEV5LMS2js.statusBannerLine;
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
DeeplineClient,
|
|
3
3
|
iterateCursorPages,
|
|
4
4
|
requireBillingIdempotencyKey
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DRZFTRZJ.mjs";
|
|
6
6
|
import "./chunk-6IKARAYD.mjs";
|
|
7
7
|
import "./chunk-Q6EOHNRH.mjs";
|
|
8
8
|
import {
|
|
@@ -11,16 +11,16 @@ import {
|
|
|
11
11
|
openInBrowser,
|
|
12
12
|
printCommandEnvelope,
|
|
13
13
|
shouldEmitJson
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VH4B5OYM.mjs";
|
|
15
15
|
import {
|
|
16
16
|
AuthError,
|
|
17
17
|
ConfigError
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-K3ODOHOI.mjs";
|
|
19
19
|
import "./chunk-DLIRSHV6.mjs";
|
|
20
20
|
import {
|
|
21
21
|
DeeplineError
|
|
22
22
|
} from "./chunk-NXGCO4JB.mjs";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-KWF4HJF7.mjs";
|
|
24
24
|
import "./chunk-WZYKRD7T.mjs";
|
|
25
25
|
import "./chunk-KRD6H754.mjs";
|
|
26
26
|
|