deepline 0.3.36 → 0.3.38
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/http.ts +14 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-work.ts +165 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +19 -0
- package/dist/bundling-sources/shared_libs/play-runtime/coordinator-headers.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +6 -0
- package/dist/cli/index.js +7 -2
- package/dist/cli/index.mjs +7 -2
- package/dist/index.js +7 -2
- package/dist/index.mjs +7 -2
- package/dist/install-integrity.json +1 -0
- package/package.json +1 -1
|
@@ -39,6 +39,7 @@ import {
|
|
|
39
39
|
ABSURD_RELEASE_OVERRIDE_HEADER,
|
|
40
40
|
COORDINATOR_INTERNAL_TOKEN_HEADER,
|
|
41
41
|
COORDINATOR_URL_OVERRIDE_HEADER,
|
|
42
|
+
PREFERRED_RECEIPT_GATEWAY_MACHINE_ID_HEADER,
|
|
42
43
|
RUNTIME_SCHEDULER_SCHEMA_OVERRIDE_HEADER,
|
|
43
44
|
SYNTHETIC_RUN_HEADER,
|
|
44
45
|
WORKER_CALLBACK_URL_OVERRIDE_HEADER,
|
|
@@ -249,6 +250,10 @@ export class HttpClient {
|
|
|
249
250
|
typeof process !== 'undefined'
|
|
250
251
|
? process.env?.DEEPLINE_ABSURD_RELEASE
|
|
251
252
|
: undefined;
|
|
253
|
+
const preferredReceiptGatewayMachineId =
|
|
254
|
+
typeof process !== 'undefined'
|
|
255
|
+
? process.env?.DEEPLINE_PREFERRED_RECEIPT_GATEWAY_MACHINE_ID
|
|
256
|
+
: undefined;
|
|
252
257
|
if (coordinatorUrl?.trim()) {
|
|
253
258
|
headers[COORDINATOR_URL_OVERRIDE_HEADER] = coordinatorUrl.trim();
|
|
254
259
|
}
|
|
@@ -289,12 +294,20 @@ export class HttpClient {
|
|
|
289
294
|
if (absurdReleaseOverride?.trim() && coordinatorInternalToken?.trim()) {
|
|
290
295
|
headers[ABSURD_RELEASE_OVERRIDE_HEADER] = absurdReleaseOverride.trim();
|
|
291
296
|
}
|
|
297
|
+
if (
|
|
298
|
+
preferredReceiptGatewayMachineId?.trim() &&
|
|
299
|
+
coordinatorInternalToken?.trim()
|
|
300
|
+
) {
|
|
301
|
+
headers[PREFERRED_RECEIPT_GATEWAY_MACHINE_ID_HEADER] =
|
|
302
|
+
preferredReceiptGatewayMachineId.trim();
|
|
303
|
+
}
|
|
292
304
|
if (
|
|
293
305
|
coordinatorInternalToken?.trim() &&
|
|
294
306
|
(coordinatorUrl?.trim() ||
|
|
295
307
|
workerCallbackUrl?.trim() ||
|
|
296
308
|
runtimeTestFault?.trim() ||
|
|
297
|
-
absurdReleaseOverride?.trim()
|
|
309
|
+
absurdReleaseOverride?.trim() ||
|
|
310
|
+
preferredReceiptGatewayMachineId?.trim())
|
|
298
311
|
) {
|
|
299
312
|
headers[COORDINATOR_INTERNAL_TOKEN_HEADER] =
|
|
300
313
|
coordinatorInternalToken.trim();
|
|
@@ -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.38',
|
|
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: {
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
export const SCHEDULED_WORK_OBSERVABILITY_VERSION = 1 as const;
|
|
2
|
+
|
|
3
|
+
export type ScheduledWorkScheduler =
|
|
4
|
+
| 'convex_cron'
|
|
5
|
+
| 'convex_scheduled_action'
|
|
6
|
+
| 'github_actions'
|
|
7
|
+
| 'inngest'
|
|
8
|
+
| 'scheduled_play'
|
|
9
|
+
| 'vercel_cron';
|
|
10
|
+
|
|
11
|
+
export type ScheduledWorkOutcome = 'running' | 'succeeded' | 'failed';
|
|
12
|
+
|
|
13
|
+
export type ScheduledWorkVolume = {
|
|
14
|
+
unit: string;
|
|
15
|
+
attempted?: number;
|
|
16
|
+
completed?: number;
|
|
17
|
+
failed?: number;
|
|
18
|
+
skipped?: number;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The portable envelope emitted by every scheduler. Keep this deliberately
|
|
23
|
+
* small: it is both the durable health record and the Axiom graph contract.
|
|
24
|
+
*/
|
|
25
|
+
export type ScheduledWorkObservation = {
|
|
26
|
+
jobId: string;
|
|
27
|
+
jobName: string;
|
|
28
|
+
scheduler: ScheduledWorkScheduler;
|
|
29
|
+
owner: string;
|
|
30
|
+
criticality: string;
|
|
31
|
+
environment: string;
|
|
32
|
+
invocationId: string;
|
|
33
|
+
occurredAt: number;
|
|
34
|
+
outcome: ScheduledWorkOutcome;
|
|
35
|
+
expectedWithinMs: number;
|
|
36
|
+
durationMs?: number;
|
|
37
|
+
errorSummary?: string;
|
|
38
|
+
runUrl?: string;
|
|
39
|
+
volume?: ScheduledWorkVolume;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export function scheduledWorkTelemetryFields(
|
|
43
|
+
observation: ScheduledWorkObservation,
|
|
44
|
+
): Record<string, string | number> {
|
|
45
|
+
return {
|
|
46
|
+
scheduledWorkSchemaVersion: SCHEDULED_WORK_OBSERVABILITY_VERSION,
|
|
47
|
+
scheduledWorkJobId: observation.jobId,
|
|
48
|
+
scheduledWorkJobName: observation.jobName,
|
|
49
|
+
scheduledWorkScheduler: observation.scheduler,
|
|
50
|
+
scheduledWorkOwner: observation.owner,
|
|
51
|
+
scheduledWorkCriticality: observation.criticality,
|
|
52
|
+
scheduledWorkOutcome: observation.outcome,
|
|
53
|
+
scheduledWorkInvocationId: observation.invocationId,
|
|
54
|
+
scheduledWorkExpectedWithinMs: observation.expectedWithinMs,
|
|
55
|
+
...(observation.durationMs === undefined
|
|
56
|
+
? {}
|
|
57
|
+
: { scheduledWorkDurationMs: observation.durationMs }),
|
|
58
|
+
...(observation.errorSummary === undefined
|
|
59
|
+
? {}
|
|
60
|
+
: { scheduledWorkErrorSummary: observation.errorSummary }),
|
|
61
|
+
...(observation.runUrl === undefined
|
|
62
|
+
? {}
|
|
63
|
+
: { scheduledWorkRunUrl: observation.runUrl }),
|
|
64
|
+
...(observation.volume === undefined
|
|
65
|
+
? {}
|
|
66
|
+
: scheduledWorkVolumeTelemetryFields(observation.volume)),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function scheduledWorkVolumeTelemetryFields(
|
|
71
|
+
volume: ScheduledWorkVolume,
|
|
72
|
+
): Record<string, string | number> {
|
|
73
|
+
const attempted = finiteNonNegative(volume.attempted);
|
|
74
|
+
const completed = finiteNonNegative(volume.completed);
|
|
75
|
+
const failed = finiteNonNegative(volume.failed);
|
|
76
|
+
const skipped = finiteNonNegative(volume.skipped);
|
|
77
|
+
const scale =
|
|
78
|
+
attempted ??
|
|
79
|
+
(completed === undefined && failed === undefined && skipped === undefined
|
|
80
|
+
? 0
|
|
81
|
+
: (completed ?? 0) + (failed ?? 0) + (skipped ?? 0));
|
|
82
|
+
return {
|
|
83
|
+
scheduledWorkUnit: volume.unit,
|
|
84
|
+
...(attempted === undefined ? {} : { scheduledWorkAttempted: attempted }),
|
|
85
|
+
...(completed === undefined ? {} : { scheduledWorkCompleted: completed }),
|
|
86
|
+
...(failed === undefined ? {} : { scheduledWorkFailed: failed }),
|
|
87
|
+
...(skipped === undefined ? {} : { scheduledWorkSkipped: skipped }),
|
|
88
|
+
...(scale > 0 && failed !== undefined
|
|
89
|
+
? { scheduledWorkFailureRate: failed / scale }
|
|
90
|
+
: {}),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Safe default for existing roots. New roots should pass a domain-specific
|
|
96
|
+
* volume extractor, but familiar result shapes become useful immediately.
|
|
97
|
+
*/
|
|
98
|
+
export function inferScheduledWorkVolume(result: unknown): ScheduledWorkVolume {
|
|
99
|
+
if (!result || typeof result !== 'object' || Array.isArray(result)) {
|
|
100
|
+
return { unit: 'runs', attempted: 1, completed: 1 };
|
|
101
|
+
}
|
|
102
|
+
const record = result as Record<string, unknown>;
|
|
103
|
+
const attempted = firstFinite(record, [
|
|
104
|
+
'processed',
|
|
105
|
+
'scanned',
|
|
106
|
+
'orgsScanned',
|
|
107
|
+
'dueSubscriptions',
|
|
108
|
+
'queuedJobsFound',
|
|
109
|
+
'total',
|
|
110
|
+
]);
|
|
111
|
+
const completed = firstFinite(record, [
|
|
112
|
+
'completed',
|
|
113
|
+
'processed',
|
|
114
|
+
'launched',
|
|
115
|
+
'started',
|
|
116
|
+
'queued',
|
|
117
|
+
'cleaned',
|
|
118
|
+
'deleted',
|
|
119
|
+
]);
|
|
120
|
+
const failed = firstFinite(record, [
|
|
121
|
+
'failed',
|
|
122
|
+
'errorCount',
|
|
123
|
+
'error_count',
|
|
124
|
+
'scan_errors',
|
|
125
|
+
'notification_error_count',
|
|
126
|
+
]);
|
|
127
|
+
const skipped = firstFinite(record, [
|
|
128
|
+
'skipped',
|
|
129
|
+
'deduped',
|
|
130
|
+
'skippedNotDue',
|
|
131
|
+
'skippedNoActiveSubscriptions',
|
|
132
|
+
]);
|
|
133
|
+
if (
|
|
134
|
+
attempted === undefined &&
|
|
135
|
+
completed === undefined &&
|
|
136
|
+
failed === undefined &&
|
|
137
|
+
skipped === undefined
|
|
138
|
+
) {
|
|
139
|
+
return { unit: 'runs', attempted: 1, completed: 1 };
|
|
140
|
+
}
|
|
141
|
+
return {
|
|
142
|
+
unit: 'items',
|
|
143
|
+
...(attempted === undefined ? {} : { attempted }),
|
|
144
|
+
...(completed === undefined ? {} : { completed }),
|
|
145
|
+
...(failed === undefined ? {} : { failed }),
|
|
146
|
+
...(skipped === undefined ? {} : { skipped }),
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function firstFinite(
|
|
151
|
+
record: Record<string, unknown>,
|
|
152
|
+
keys: readonly string[],
|
|
153
|
+
): number | undefined {
|
|
154
|
+
for (const key of keys) {
|
|
155
|
+
const value = finiteNonNegative(record[key]);
|
|
156
|
+
if (value !== undefined) return value;
|
|
157
|
+
}
|
|
158
|
+
return undefined;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function finiteNonNegative(value: unknown): number | undefined {
|
|
162
|
+
return typeof value === 'number' && Number.isFinite(value) && value >= 0
|
|
163
|
+
? value
|
|
164
|
+
: undefined;
|
|
165
|
+
}
|
|
@@ -236,6 +236,8 @@ export type WorkerRuntimeApiContext = {
|
|
|
236
236
|
integrationMode?: 'live' | 'eval_stub' | 'fixture' | null;
|
|
237
237
|
vercelProtectionBypassToken?: string | null;
|
|
238
238
|
runtimeTestFaultHeader?: string | null;
|
|
239
|
+
/** Internal deployment-fixture receipt gateway route preference. */
|
|
240
|
+
preferredReceiptGatewayMachineId?: string | null;
|
|
239
241
|
fetch?: typeof fetch;
|
|
240
242
|
requestTimeoutMs?: number | null;
|
|
241
243
|
/** A higher-level writer owns retries and preserves the exact request body. */
|
|
@@ -1131,6 +1133,12 @@ async function postAppRuntimeApi<TResponse>(
|
|
|
1131
1133
|
[PLAY_RUNTIME_CONTRACT_HEADER]: String(PLAY_RUNTIME_CONTRACT),
|
|
1132
1134
|
[PLAY_RUNTIME_TRANSPORT_ATTEMPT_HEADER]: transportAttemptId,
|
|
1133
1135
|
...vercelHeaders,
|
|
1136
|
+
...(context.preferredReceiptGatewayMachineId?.trim()
|
|
1137
|
+
? {
|
|
1138
|
+
'fly-prefer-instance-id':
|
|
1139
|
+
context.preferredReceiptGatewayMachineId.trim(),
|
|
1140
|
+
}
|
|
1141
|
+
: {}),
|
|
1134
1142
|
...(runtimeTestFaultHeader
|
|
1135
1143
|
? {
|
|
1136
1144
|
[PLAY_RUNTIME_TEST_FAULT_HEADER]: runtimeTestFaultHeader,
|
|
@@ -1140,6 +1148,17 @@ async function postAppRuntimeApi<TResponse>(
|
|
|
1140
1148
|
body: JSON.stringify(body),
|
|
1141
1149
|
signal: requestSignal,
|
|
1142
1150
|
});
|
|
1151
|
+
const preferredMachineId =
|
|
1152
|
+
context.preferredReceiptGatewayMachineId?.trim() ?? '';
|
|
1153
|
+
if (
|
|
1154
|
+
preferredMachineId &&
|
|
1155
|
+
response.headers.get('x-deepline-gateway-machine-id') !==
|
|
1156
|
+
preferredMachineId
|
|
1157
|
+
) {
|
|
1158
|
+
throw new Error(
|
|
1159
|
+
`Receipt gateway candidate route fell back (expected=${preferredMachineId}, served=${response.headers.get('x-deepline-gateway-machine-id') ?? '<missing>'}).`,
|
|
1160
|
+
);
|
|
1161
|
+
}
|
|
1143
1162
|
} catch (error) {
|
|
1144
1163
|
if (context.signal?.aborted) {
|
|
1145
1164
|
throw context.signal.reason ?? error;
|
|
@@ -41,6 +41,14 @@ export const RUNTIME_ENVIRONMENT_TOKEN_HEADER =
|
|
|
41
41
|
* keys cannot use it. When absent, the resolver chooses the registered lane.
|
|
42
42
|
*/
|
|
43
43
|
export const ABSURD_RELEASE_OVERRIDE_HEADER = 'x-deepline-absurd-release';
|
|
44
|
+
/**
|
|
45
|
+
* Deployment-canary-only route selection for the receipt gateway. The public
|
|
46
|
+
* API never accepts this header: a staged app may honor it only for an
|
|
47
|
+
* internally authenticated fixture run. It is copied into the signed launch
|
|
48
|
+
* contract, rather than forwarded from any sandbox or customer request.
|
|
49
|
+
*/
|
|
50
|
+
export const PREFERRED_RECEIPT_GATEWAY_MACHINE_ID_HEADER =
|
|
51
|
+
'x-deepline-preferred-receipt-gateway-machine-id';
|
|
44
52
|
/**
|
|
45
53
|
* CLI→app marker (NOT a coordinator header — it lives here only because both
|
|
46
54
|
* the SDK HTTP client and the run route already import this module). Set by
|
|
@@ -110,6 +110,12 @@ export interface PlayRunnerContextConfig {
|
|
|
110
110
|
*/
|
|
111
111
|
executionGatewayBaseUrl?: string | null;
|
|
112
112
|
receiptGatewayBaseUrl?: string | null;
|
|
113
|
+
/**
|
|
114
|
+
* Internal fixture-canary pin for a cordoned receipt-gateway candidate. This
|
|
115
|
+
* is a signed launch fact, never a customer-authored or sandbox-supplied
|
|
116
|
+
* header. It must therefore stay absent for ordinary executions.
|
|
117
|
+
*/
|
|
118
|
+
preferredReceiptGatewayMachineId?: string | null;
|
|
113
119
|
/**
|
|
114
120
|
* Request execution through the relay's durable invocation fence. This is
|
|
115
121
|
* required when the execution relay and receipt gateway have different
|
|
@@ -303,6 +303,7 @@ async function main() {
|
|
|
303
303
|
const context = (config && config.context) || {};
|
|
304
304
|
const push = context.runnerPushExecution;
|
|
305
305
|
const gateway = String(context.receiptGatewayBaseUrl || '').replace(/\\/$/, '');
|
|
306
|
+
const preferredGatewayMachineId = String(context.preferredReceiptGatewayMachineId || '').trim();
|
|
306
307
|
const token = context.executorToken;
|
|
307
308
|
if (!push || !push.runId || !gateway || !token) {
|
|
308
309
|
writeDiagnostic('[crash-terminal] no push config; skipping');
|
|
@@ -380,6 +381,9 @@ async function main() {
|
|
|
380
381
|
'content-type': 'application/json',
|
|
381
382
|
authorization: 'Bearer ' + token,
|
|
382
383
|
'${PLAY_RUNTIME_CONTRACT_HEADER}': '${String(PLAY_RUNTIME_CONTRACT)}',
|
|
384
|
+
...(preferredGatewayMachineId
|
|
385
|
+
? { 'fly-prefer-instance-id': preferredGatewayMachineId }
|
|
386
|
+
: {}),
|
|
383
387
|
},
|
|
384
388
|
body: JSON.stringify({
|
|
385
389
|
action: 'runner_terminal',
|
|
@@ -163,6 +163,12 @@ export type PlaySchedulerSubmitInput = {
|
|
|
163
163
|
absurdReleaseEnvironment?: 'preview' | 'production';
|
|
164
164
|
/** Request-scoped Vercel Deployment Protection bypass for preview runtime callbacks. */
|
|
165
165
|
vercelProtectionBypassToken?: string | null;
|
|
166
|
+
/**
|
|
167
|
+
* Internal deployment-fixture pin for a receipt gateway Machine. This is
|
|
168
|
+
* admitted only by the app route after internal authorization and is never
|
|
169
|
+
* supplied by a customer or forwarded from a sandbox.
|
|
170
|
+
*/
|
|
171
|
+
preferredReceiptGatewayMachineId?: string | null;
|
|
166
172
|
/** Request-scoped, dev-only runtime fault injection header for black-box durability tests. */
|
|
167
173
|
runtimeTestFaultHeader?: string | null;
|
|
168
174
|
/** Request-scoped, dev-only runtime policy overrides for black-box durability tests. */
|
package/dist/cli/index.js
CHANGED
|
@@ -1043,7 +1043,7 @@ var SDK_RELEASE = {
|
|
|
1043
1043
|
// available at toolResponse.rawV2 while toolResponse.raw and all declared
|
|
1044
1044
|
// getters keep their established compatibility behavior.
|
|
1045
1045
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
1046
|
-
version: "0.3.
|
|
1046
|
+
version: "0.3.38",
|
|
1047
1047
|
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.",
|
|
1048
1048
|
packageCapabilities: {
|
|
1049
1049
|
updatePreferences: 1
|
|
@@ -1324,6 +1324,7 @@ var WORKER_CALLBACK_URL_OVERRIDE_HEADER = "x-deepline-worker-callback-url";
|
|
|
1324
1324
|
var RUNTIME_SCHEDULER_SCHEMA_OVERRIDE_HEADER = "x-deepline-runtime-scheduler-schema";
|
|
1325
1325
|
var RUNTIME_ENVIRONMENT_TOKEN_HEADER = "x-deepline-runtime-environment-token";
|
|
1326
1326
|
var ABSURD_RELEASE_OVERRIDE_HEADER = "x-deepline-absurd-release";
|
|
1327
|
+
var PREFERRED_RECEIPT_GATEWAY_MACHINE_ID_HEADER = "x-deepline-preferred-receipt-gateway-machine-id";
|
|
1327
1328
|
var SYNTHETIC_RUN_HEADER = "x-deepline-synthetic-run";
|
|
1328
1329
|
|
|
1329
1330
|
// ../shared_libs/play-runtime/runtime-incident-drills.ts
|
|
@@ -1688,6 +1689,7 @@ var HttpClient = class {
|
|
|
1688
1689
|
const coordinatorUrl = typeof process !== "undefined" ? process.env?.DEEPLINE_COORDINATOR_URL : void 0;
|
|
1689
1690
|
const coordinatorInternalToken = typeof process !== "undefined" ? process.env?.DEEPLINE_INTERNAL_TOKEN : void 0;
|
|
1690
1691
|
const absurdReleaseOverride = typeof process !== "undefined" ? process.env?.DEEPLINE_ABSURD_RELEASE : void 0;
|
|
1692
|
+
const preferredReceiptGatewayMachineId = typeof process !== "undefined" ? process.env?.DEEPLINE_PREFERRED_RECEIPT_GATEWAY_MACHINE_ID : void 0;
|
|
1691
1693
|
if (coordinatorUrl?.trim()) {
|
|
1692
1694
|
headers[COORDINATOR_URL_OVERRIDE_HEADER] = coordinatorUrl.trim();
|
|
1693
1695
|
}
|
|
@@ -1710,7 +1712,10 @@ var HttpClient = class {
|
|
|
1710
1712
|
if (absurdReleaseOverride?.trim() && coordinatorInternalToken?.trim()) {
|
|
1711
1713
|
headers[ABSURD_RELEASE_OVERRIDE_HEADER] = absurdReleaseOverride.trim();
|
|
1712
1714
|
}
|
|
1713
|
-
if (
|
|
1715
|
+
if (preferredReceiptGatewayMachineId?.trim() && coordinatorInternalToken?.trim()) {
|
|
1716
|
+
headers[PREFERRED_RECEIPT_GATEWAY_MACHINE_ID_HEADER] = preferredReceiptGatewayMachineId.trim();
|
|
1717
|
+
}
|
|
1718
|
+
if (coordinatorInternalToken?.trim() && (coordinatorUrl?.trim() || workerCallbackUrl?.trim() || runtimeTestFault?.trim() || absurdReleaseOverride?.trim() || preferredReceiptGatewayMachineId?.trim())) {
|
|
1714
1719
|
headers[COORDINATOR_INTERNAL_TOKEN_HEADER] = coordinatorInternalToken.trim();
|
|
1715
1720
|
}
|
|
1716
1721
|
return headers;
|
package/dist/cli/index.mjs
CHANGED
|
@@ -1029,7 +1029,7 @@ var SDK_RELEASE = {
|
|
|
1029
1029
|
// available at toolResponse.rawV2 while toolResponse.raw and all declared
|
|
1030
1030
|
// getters keep their established compatibility behavior.
|
|
1031
1031
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
1032
|
-
version: "0.3.
|
|
1032
|
+
version: "0.3.38",
|
|
1033
1033
|
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.",
|
|
1034
1034
|
packageCapabilities: {
|
|
1035
1035
|
updatePreferences: 1
|
|
@@ -1310,6 +1310,7 @@ var WORKER_CALLBACK_URL_OVERRIDE_HEADER = "x-deepline-worker-callback-url";
|
|
|
1310
1310
|
var RUNTIME_SCHEDULER_SCHEMA_OVERRIDE_HEADER = "x-deepline-runtime-scheduler-schema";
|
|
1311
1311
|
var RUNTIME_ENVIRONMENT_TOKEN_HEADER = "x-deepline-runtime-environment-token";
|
|
1312
1312
|
var ABSURD_RELEASE_OVERRIDE_HEADER = "x-deepline-absurd-release";
|
|
1313
|
+
var PREFERRED_RECEIPT_GATEWAY_MACHINE_ID_HEADER = "x-deepline-preferred-receipt-gateway-machine-id";
|
|
1313
1314
|
var SYNTHETIC_RUN_HEADER = "x-deepline-synthetic-run";
|
|
1314
1315
|
|
|
1315
1316
|
// ../shared_libs/play-runtime/runtime-incident-drills.ts
|
|
@@ -1674,6 +1675,7 @@ var HttpClient = class {
|
|
|
1674
1675
|
const coordinatorUrl = typeof process !== "undefined" ? process.env?.DEEPLINE_COORDINATOR_URL : void 0;
|
|
1675
1676
|
const coordinatorInternalToken = typeof process !== "undefined" ? process.env?.DEEPLINE_INTERNAL_TOKEN : void 0;
|
|
1676
1677
|
const absurdReleaseOverride = typeof process !== "undefined" ? process.env?.DEEPLINE_ABSURD_RELEASE : void 0;
|
|
1678
|
+
const preferredReceiptGatewayMachineId = typeof process !== "undefined" ? process.env?.DEEPLINE_PREFERRED_RECEIPT_GATEWAY_MACHINE_ID : void 0;
|
|
1677
1679
|
if (coordinatorUrl?.trim()) {
|
|
1678
1680
|
headers[COORDINATOR_URL_OVERRIDE_HEADER] = coordinatorUrl.trim();
|
|
1679
1681
|
}
|
|
@@ -1696,7 +1698,10 @@ var HttpClient = class {
|
|
|
1696
1698
|
if (absurdReleaseOverride?.trim() && coordinatorInternalToken?.trim()) {
|
|
1697
1699
|
headers[ABSURD_RELEASE_OVERRIDE_HEADER] = absurdReleaseOverride.trim();
|
|
1698
1700
|
}
|
|
1699
|
-
if (
|
|
1701
|
+
if (preferredReceiptGatewayMachineId?.trim() && coordinatorInternalToken?.trim()) {
|
|
1702
|
+
headers[PREFERRED_RECEIPT_GATEWAY_MACHINE_ID_HEADER] = preferredReceiptGatewayMachineId.trim();
|
|
1703
|
+
}
|
|
1704
|
+
if (coordinatorInternalToken?.trim() && (coordinatorUrl?.trim() || workerCallbackUrl?.trim() || runtimeTestFault?.trim() || absurdReleaseOverride?.trim() || preferredReceiptGatewayMachineId?.trim())) {
|
|
1700
1705
|
headers[COORDINATOR_INTERNAL_TOKEN_HEADER] = coordinatorInternalToken.trim();
|
|
1701
1706
|
}
|
|
1702
1707
|
return headers;
|
package/dist/index.js
CHANGED
|
@@ -779,7 +779,7 @@ var SDK_RELEASE = {
|
|
|
779
779
|
// available at toolResponse.rawV2 while toolResponse.raw and all declared
|
|
780
780
|
// getters keep their established compatibility behavior.
|
|
781
781
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
782
|
-
version: "0.3.
|
|
782
|
+
version: "0.3.38",
|
|
783
783
|
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.",
|
|
784
784
|
packageCapabilities: {
|
|
785
785
|
updatePreferences: 1
|
|
@@ -1051,6 +1051,7 @@ var WORKER_CALLBACK_URL_OVERRIDE_HEADER = "x-deepline-worker-callback-url";
|
|
|
1051
1051
|
var RUNTIME_SCHEDULER_SCHEMA_OVERRIDE_HEADER = "x-deepline-runtime-scheduler-schema";
|
|
1052
1052
|
var RUNTIME_ENVIRONMENT_TOKEN_HEADER = "x-deepline-runtime-environment-token";
|
|
1053
1053
|
var ABSURD_RELEASE_OVERRIDE_HEADER = "x-deepline-absurd-release";
|
|
1054
|
+
var PREFERRED_RECEIPT_GATEWAY_MACHINE_ID_HEADER = "x-deepline-preferred-receipt-gateway-machine-id";
|
|
1054
1055
|
var SYNTHETIC_RUN_HEADER = "x-deepline-synthetic-run";
|
|
1055
1056
|
|
|
1056
1057
|
// ../shared_libs/play-runtime/runtime-incident-drills.ts
|
|
@@ -1415,6 +1416,7 @@ var HttpClient = class {
|
|
|
1415
1416
|
const coordinatorUrl = typeof process !== "undefined" ? process.env?.DEEPLINE_COORDINATOR_URL : void 0;
|
|
1416
1417
|
const coordinatorInternalToken = typeof process !== "undefined" ? process.env?.DEEPLINE_INTERNAL_TOKEN : void 0;
|
|
1417
1418
|
const absurdReleaseOverride = typeof process !== "undefined" ? process.env?.DEEPLINE_ABSURD_RELEASE : void 0;
|
|
1419
|
+
const preferredReceiptGatewayMachineId = typeof process !== "undefined" ? process.env?.DEEPLINE_PREFERRED_RECEIPT_GATEWAY_MACHINE_ID : void 0;
|
|
1418
1420
|
if (coordinatorUrl?.trim()) {
|
|
1419
1421
|
headers[COORDINATOR_URL_OVERRIDE_HEADER] = coordinatorUrl.trim();
|
|
1420
1422
|
}
|
|
@@ -1437,7 +1439,10 @@ var HttpClient = class {
|
|
|
1437
1439
|
if (absurdReleaseOverride?.trim() && coordinatorInternalToken?.trim()) {
|
|
1438
1440
|
headers[ABSURD_RELEASE_OVERRIDE_HEADER] = absurdReleaseOverride.trim();
|
|
1439
1441
|
}
|
|
1440
|
-
if (
|
|
1442
|
+
if (preferredReceiptGatewayMachineId?.trim() && coordinatorInternalToken?.trim()) {
|
|
1443
|
+
headers[PREFERRED_RECEIPT_GATEWAY_MACHINE_ID_HEADER] = preferredReceiptGatewayMachineId.trim();
|
|
1444
|
+
}
|
|
1445
|
+
if (coordinatorInternalToken?.trim() && (coordinatorUrl?.trim() || workerCallbackUrl?.trim() || runtimeTestFault?.trim() || absurdReleaseOverride?.trim() || preferredReceiptGatewayMachineId?.trim())) {
|
|
1441
1446
|
headers[COORDINATOR_INTERNAL_TOKEN_HEADER] = coordinatorInternalToken.trim();
|
|
1442
1447
|
}
|
|
1443
1448
|
return headers;
|
package/dist/index.mjs
CHANGED
|
@@ -702,7 +702,7 @@ var SDK_RELEASE = {
|
|
|
702
702
|
// available at toolResponse.rawV2 while toolResponse.raw and all declared
|
|
703
703
|
// getters keep their established compatibility behavior.
|
|
704
704
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
705
|
-
version: "0.3.
|
|
705
|
+
version: "0.3.38",
|
|
706
706
|
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.",
|
|
707
707
|
packageCapabilities: {
|
|
708
708
|
updatePreferences: 1
|
|
@@ -974,6 +974,7 @@ var WORKER_CALLBACK_URL_OVERRIDE_HEADER = "x-deepline-worker-callback-url";
|
|
|
974
974
|
var RUNTIME_SCHEDULER_SCHEMA_OVERRIDE_HEADER = "x-deepline-runtime-scheduler-schema";
|
|
975
975
|
var RUNTIME_ENVIRONMENT_TOKEN_HEADER = "x-deepline-runtime-environment-token";
|
|
976
976
|
var ABSURD_RELEASE_OVERRIDE_HEADER = "x-deepline-absurd-release";
|
|
977
|
+
var PREFERRED_RECEIPT_GATEWAY_MACHINE_ID_HEADER = "x-deepline-preferred-receipt-gateway-machine-id";
|
|
977
978
|
var SYNTHETIC_RUN_HEADER = "x-deepline-synthetic-run";
|
|
978
979
|
|
|
979
980
|
// ../shared_libs/play-runtime/runtime-incident-drills.ts
|
|
@@ -1338,6 +1339,7 @@ var HttpClient = class {
|
|
|
1338
1339
|
const coordinatorUrl = typeof process !== "undefined" ? process.env?.DEEPLINE_COORDINATOR_URL : void 0;
|
|
1339
1340
|
const coordinatorInternalToken = typeof process !== "undefined" ? process.env?.DEEPLINE_INTERNAL_TOKEN : void 0;
|
|
1340
1341
|
const absurdReleaseOverride = typeof process !== "undefined" ? process.env?.DEEPLINE_ABSURD_RELEASE : void 0;
|
|
1342
|
+
const preferredReceiptGatewayMachineId = typeof process !== "undefined" ? process.env?.DEEPLINE_PREFERRED_RECEIPT_GATEWAY_MACHINE_ID : void 0;
|
|
1341
1343
|
if (coordinatorUrl?.trim()) {
|
|
1342
1344
|
headers[COORDINATOR_URL_OVERRIDE_HEADER] = coordinatorUrl.trim();
|
|
1343
1345
|
}
|
|
@@ -1360,7 +1362,10 @@ var HttpClient = class {
|
|
|
1360
1362
|
if (absurdReleaseOverride?.trim() && coordinatorInternalToken?.trim()) {
|
|
1361
1363
|
headers[ABSURD_RELEASE_OVERRIDE_HEADER] = absurdReleaseOverride.trim();
|
|
1362
1364
|
}
|
|
1363
|
-
if (
|
|
1365
|
+
if (preferredReceiptGatewayMachineId?.trim() && coordinatorInternalToken?.trim()) {
|
|
1366
|
+
headers[PREFERRED_RECEIPT_GATEWAY_MACHINE_ID_HEADER] = preferredReceiptGatewayMachineId.trim();
|
|
1367
|
+
}
|
|
1368
|
+
if (coordinatorInternalToken?.trim() && (coordinatorUrl?.trim() || workerCallbackUrl?.trim() || runtimeTestFault?.trim() || absurdReleaseOverride?.trim() || preferredReceiptGatewayMachineId?.trim())) {
|
|
1364
1369
|
headers[COORDINATOR_INTERNAL_TOKEN_HEADER] = coordinatorInternalToken.trim();
|
|
1365
1370
|
}
|
|
1366
1371
|
return headers;
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"dist/bundling-sources/shared_libs/observability/node-tracing.ts",
|
|
27
27
|
"dist/bundling-sources/shared_libs/observability/redaction.ts",
|
|
28
28
|
"dist/bundling-sources/shared_libs/observability/scheduled-job-errors.ts",
|
|
29
|
+
"dist/bundling-sources/shared_libs/observability/scheduled-work.ts",
|
|
29
30
|
"dist/bundling-sources/shared_libs/observability/telemetry.ts",
|
|
30
31
|
"dist/bundling-sources/shared_libs/observability/tracing.ts",
|
|
31
32
|
"dist/bundling-sources/shared_libs/observability/worker-telemetry.ts",
|