deepline 0.3.157 → 0.3.159
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/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +10 -1
- package/dist/bundling-sources/shared_libs/observability/dlq.ts +116 -6
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +1 -1
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
|
@@ -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.159',
|
|
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: {
|
|
@@ -194,15 +194,24 @@ export function monitorErrorNextAction(payload: MonitorErrorPayload): string {
|
|
|
194
194
|
if (code === 'monitor_already_exists') {
|
|
195
195
|
const existingMonitor = asRecord(nestedError(payload)?.existing_monitor);
|
|
196
196
|
const existing = existingMonitor?.key;
|
|
197
|
+
const fleetId = existingMonitor?.fleet_id;
|
|
197
198
|
if (existingMonitor?.status === 'provisioning') {
|
|
198
199
|
return 'An in-progress provider operation owns this identity. Do not deploy another key or delete and redeploy. Wait for it to finish, then rerun this check; if the conflict remains, contact Deepline support with the returned tool and identity.';
|
|
199
200
|
}
|
|
201
|
+
if (typeof existing === 'string' && typeof fleetId === 'string') {
|
|
202
|
+
return `Run \`deepline monitors fleets get ${fleetId} --json\` to inspect the Fleet that owns this identity, then \`deepline monitors get ${existing} --json\` to inspect its monitor state. Change or reuse the owning Fleet member instead of deploying a second key.`;
|
|
203
|
+
}
|
|
200
204
|
return typeof existing === 'string'
|
|
201
205
|
? `Run \`deepline monitors get ${existing} --json\` to inspect the monitor that owns this identity. Reuse it or contact Deepline support before replacing it; do not delete and redeploy blindly.`
|
|
202
206
|
: 'Inspect the returned existing_monitor.key with `deepline monitors get <key> --json`. Reuse that monitor or contact Deepline support before replacing it; do not delete and redeploy blindly.';
|
|
203
207
|
}
|
|
204
208
|
if (code === 'upstream_monitor_conflict_unresolved') {
|
|
205
|
-
const
|
|
209
|
+
const existingMonitor = asRecord(nestedError(payload)?.existing_monitor);
|
|
210
|
+
const existing = existingMonitor?.key;
|
|
211
|
+
const fleetId = existingMonitor?.fleet_id;
|
|
212
|
+
if (typeof existing === 'string' && typeof fleetId === 'string') {
|
|
213
|
+
return `Run \`deepline monitors fleets get ${fleetId} --json\` to inspect the Fleet that owns this identity, then report the upstream 409 with the returned monitor key and identity. Do not retry blindly.`;
|
|
214
|
+
}
|
|
206
215
|
return typeof existing === 'string'
|
|
207
216
|
? `Run \`deepline monitors get ${existing} --json\` to inspect the matching managed monitor, then report this upstream 409 to Deepline support. Do not retry blindly.`
|
|
208
217
|
: 'Report this upstream 409 to Deepline support with the returned tool and identity. Do not retry blindly.';
|
|
@@ -202,6 +202,23 @@ export const QUEUE_ITEM_STATES = [
|
|
|
202
202
|
|
|
203
203
|
export type QueueItemState = (typeof QUEUE_ITEM_STATES)[number];
|
|
204
204
|
|
|
205
|
+
export function isQueueItemState(value: unknown): value is QueueItemState {
|
|
206
|
+
return (
|
|
207
|
+
typeof value === 'string' &&
|
|
208
|
+
(QUEUE_ITEM_STATES as readonly string[]).includes(value)
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/** Proof that a filtered item page was read from the queue owner's index. */
|
|
213
|
+
export type QueueItemStateFilter = {
|
|
214
|
+
readonly kind: 'indexed-state';
|
|
215
|
+
readonly state: QueueItemState;
|
|
216
|
+
readonly index: string;
|
|
217
|
+
readonly nativeStates: readonly string[];
|
|
218
|
+
readonly indexed: true;
|
|
219
|
+
readonly cursorBound: true;
|
|
220
|
+
};
|
|
221
|
+
|
|
205
222
|
/** Operator disposition is an overlay on native source state. Retiring an
|
|
206
223
|
* item removes it from active operational views without pretending the owner
|
|
207
224
|
* completed, deleted, or replayed the source row. */
|
|
@@ -282,10 +299,53 @@ export type QueueItem = {
|
|
|
282
299
|
/** Native failure timestamp when the owner can provide it. */
|
|
283
300
|
readonly failedAt?: string;
|
|
284
301
|
readonly summary?: string;
|
|
302
|
+
/** Bounded, owner-projected explanation for a queue item. */
|
|
303
|
+
readonly diagnosis?: QueueItemDiagnosis;
|
|
285
304
|
readonly retiredAt?: string;
|
|
286
305
|
readonly retirementReason?: string;
|
|
287
306
|
};
|
|
288
307
|
|
|
308
|
+
export type QueueItemDiagnosis = {
|
|
309
|
+
readonly version: 1;
|
|
310
|
+
readonly kind: 'charge-reservation';
|
|
311
|
+
readonly reasonCode: string | null;
|
|
312
|
+
readonly parkedAt: string | null;
|
|
313
|
+
readonly lastCheckedAt: string | null;
|
|
314
|
+
readonly reconciliation: {
|
|
315
|
+
readonly attemptCount: number;
|
|
316
|
+
readonly outcome: string | null;
|
|
317
|
+
readonly errorClass: string | null;
|
|
318
|
+
readonly httpStatus: number | null;
|
|
319
|
+
readonly responseClass: string | null;
|
|
320
|
+
readonly nextRetryAt: string | null;
|
|
321
|
+
readonly latestAttempt: {
|
|
322
|
+
readonly attemptNumber: number;
|
|
323
|
+
readonly initiator: string;
|
|
324
|
+
readonly outcome: string | null;
|
|
325
|
+
readonly errorClass: string | null;
|
|
326
|
+
readonly httpStatus: number | null;
|
|
327
|
+
readonly responseClass: string | null;
|
|
328
|
+
readonly safeErrorSummary: string | null;
|
|
329
|
+
} | null;
|
|
330
|
+
};
|
|
331
|
+
readonly settlement: {
|
|
332
|
+
readonly usageRecorded: boolean;
|
|
333
|
+
readonly settled: boolean;
|
|
334
|
+
readonly settleCount: number;
|
|
335
|
+
readonly relatedLedgerSampleCount: number;
|
|
336
|
+
readonly relatedLedgerSampleNetDeeplineCredits: number;
|
|
337
|
+
readonly relatedLedgerWindowTruncated: boolean;
|
|
338
|
+
};
|
|
339
|
+
readonly latestOperatorAction: {
|
|
340
|
+
readonly action: string;
|
|
341
|
+
readonly phase: string;
|
|
342
|
+
readonly result: string;
|
|
343
|
+
readonly at: string;
|
|
344
|
+
} | null;
|
|
345
|
+
readonly attemptsTruncated: boolean;
|
|
346
|
+
readonly auditTruncated: boolean;
|
|
347
|
+
};
|
|
348
|
+
|
|
289
349
|
/** Keep old DLQ verbs working at the boundary while exposing a smaller,
|
|
290
350
|
* operator-readable control vocabulary. */
|
|
291
351
|
export function normalizeQueueItemAction(
|
|
@@ -329,7 +389,7 @@ export type QueueItemEvidence = {
|
|
|
329
389
|
};
|
|
330
390
|
|
|
331
391
|
export type QueueItemUnavailable = {
|
|
332
|
-
readonly code: 'item_reader_unavailable';
|
|
392
|
+
readonly code: 'item_reader_unavailable' | 'state_filter_unavailable';
|
|
333
393
|
readonly reason: string;
|
|
334
394
|
};
|
|
335
395
|
|
|
@@ -365,6 +425,8 @@ export type QueueItemList = {
|
|
|
365
425
|
readonly nextCursor: string | null;
|
|
366
426
|
readonly limit: number;
|
|
367
427
|
readonly cursor: string | null;
|
|
428
|
+
/** Present only when an indexed normalized-state filter was applied. */
|
|
429
|
+
readonly stateFilter?: QueueItemStateFilter;
|
|
368
430
|
/** Present only for a successfully measured indexed failure-time range. */
|
|
369
431
|
readonly failedTimeRange?: QueueItemFailedTimeRange;
|
|
370
432
|
/** Present only for a successfully measured indexed creation-time range. */
|
|
@@ -461,6 +523,7 @@ export type QueueItemConnectorContext = {
|
|
|
461
523
|
readonly now: number;
|
|
462
524
|
readonly limit: number;
|
|
463
525
|
readonly cursor?: string;
|
|
526
|
+
readonly state?: QueueItemState;
|
|
464
527
|
readonly actorId?: string;
|
|
465
528
|
readonly operationId?: string;
|
|
466
529
|
};
|
|
@@ -510,24 +573,67 @@ export function normalizeQueueItemState(nativeState: string): QueueItemState {
|
|
|
510
573
|
if (
|
|
511
574
|
state === 'in_flight' ||
|
|
512
575
|
state === 'in-flight' ||
|
|
513
|
-
state === 'processing'
|
|
576
|
+
state === 'processing' ||
|
|
577
|
+
state === 'leased' ||
|
|
578
|
+
state === 'building' ||
|
|
579
|
+
state === 'publishing' ||
|
|
580
|
+
state === 'cancelling'
|
|
514
581
|
) {
|
|
515
582
|
return 'running';
|
|
516
583
|
}
|
|
517
|
-
if (
|
|
518
|
-
|
|
584
|
+
if (
|
|
585
|
+
state === 'open' ||
|
|
586
|
+
state === 'pending' ||
|
|
587
|
+
state === 'queued' ||
|
|
588
|
+
state === 'active' ||
|
|
589
|
+
state === 'received' ||
|
|
590
|
+
state === 'partial'
|
|
591
|
+
) {
|
|
592
|
+
return 'ready';
|
|
593
|
+
}
|
|
594
|
+
if (state === 'parked' || state === 'blocked') return 'blocked';
|
|
595
|
+
if (state === 'needs_review' || state === 'inactive') return 'held';
|
|
596
|
+
if (
|
|
597
|
+
state === 'retry_scheduled' ||
|
|
598
|
+
state === 'retryable' ||
|
|
599
|
+
state === 'rate_limited' ||
|
|
600
|
+
state === 'delayed'
|
|
601
|
+
) {
|
|
602
|
+
return 'delayed';
|
|
603
|
+
}
|
|
519
604
|
if (
|
|
520
605
|
state === 'failed' ||
|
|
521
606
|
state === 'dead_lettered' ||
|
|
522
607
|
state === 'dead-lettered' ||
|
|
608
|
+
state === 'dead' ||
|
|
609
|
+
state === 'reconcile_failed' ||
|
|
523
610
|
state === 'dlq'
|
|
524
611
|
) {
|
|
525
612
|
return 'quarantined';
|
|
526
613
|
}
|
|
527
|
-
if (
|
|
614
|
+
if (
|
|
615
|
+
state === 'done' ||
|
|
616
|
+
state === 'succeeded' ||
|
|
617
|
+
state === 'succeeded_with_warnings' ||
|
|
618
|
+
state === 'success' ||
|
|
619
|
+
state === 'completed' ||
|
|
620
|
+
state === 'processed' ||
|
|
621
|
+
state === 'admitted' ||
|
|
622
|
+
state === 'published' ||
|
|
623
|
+
state === 'delivered'
|
|
624
|
+
) {
|
|
528
625
|
return 'completed';
|
|
529
626
|
}
|
|
530
627
|
if (state === 'canceled' || state === 'aborted') return 'cancelled';
|
|
628
|
+
if (
|
|
629
|
+
state === 'settled' ||
|
|
630
|
+
state === 'released' ||
|
|
631
|
+
state === 'suppressed' ||
|
|
632
|
+
state === 'expired' ||
|
|
633
|
+
state === 'superseded'
|
|
634
|
+
) {
|
|
635
|
+
return 'archived';
|
|
636
|
+
}
|
|
531
637
|
return 'unknown';
|
|
532
638
|
}
|
|
533
639
|
|
|
@@ -538,6 +644,7 @@ export function unavailableQueueItemList(input: {
|
|
|
538
644
|
reason: string;
|
|
539
645
|
limit?: number;
|
|
540
646
|
cursor?: string | null;
|
|
647
|
+
code?: QueueItemUnavailable['code'];
|
|
541
648
|
}): QueueItemList {
|
|
542
649
|
return {
|
|
543
650
|
contractVersion: QUEUE_ITEM_CONTROL_CONTRACT_VERSION,
|
|
@@ -548,7 +655,10 @@ export function unavailableQueueItemList(input: {
|
|
|
548
655
|
nextCursor: null,
|
|
549
656
|
limit: input.limit ?? 50,
|
|
550
657
|
cursor: input.cursor ?? null,
|
|
551
|
-
unavailable: {
|
|
658
|
+
unavailable: {
|
|
659
|
+
code: input.code ?? 'item_reader_unavailable',
|
|
660
|
+
reason: input.reason,
|
|
661
|
+
},
|
|
552
662
|
};
|
|
553
663
|
}
|
|
554
664
|
|
package/dist/cli/index.js
CHANGED
|
@@ -3051,7 +3051,7 @@ var SDK_RELEASE = {
|
|
|
3051
3051
|
// getters keep their established compatibility behavior.
|
|
3052
3052
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
3053
3053
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
3054
|
-
version: "0.3.
|
|
3054
|
+
version: "0.3.159",
|
|
3055
3055
|
updateSummary: "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.",
|
|
3056
3056
|
packageCapabilities: {
|
|
3057
3057
|
updatePreferences: 1
|
package/dist/cli/index.mjs
CHANGED
|
@@ -3046,7 +3046,7 @@ var SDK_RELEASE = {
|
|
|
3046
3046
|
// getters keep their established compatibility behavior.
|
|
3047
3047
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
3048
3048
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
3049
|
-
version: "0.3.
|
|
3049
|
+
version: "0.3.159",
|
|
3050
3050
|
updateSummary: "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.",
|
|
3051
3051
|
packageCapabilities: {
|
|
3052
3052
|
updatePreferences: 1
|
package/dist/index.js
CHANGED
|
@@ -864,7 +864,7 @@ var SDK_RELEASE = {
|
|
|
864
864
|
// getters keep their established compatibility behavior.
|
|
865
865
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
866
866
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
867
|
-
version: "0.3.
|
|
867
|
+
version: "0.3.159",
|
|
868
868
|
updateSummary: "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.",
|
|
869
869
|
packageCapabilities: {
|
|
870
870
|
updatePreferences: 1
|
package/dist/index.mjs
CHANGED
|
@@ -768,7 +768,7 @@ var SDK_RELEASE = {
|
|
|
768
768
|
// getters keep their established compatibility behavior.
|
|
769
769
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
770
770
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
771
|
-
version: "0.3.
|
|
771
|
+
version: "0.3.159",
|
|
772
772
|
updateSummary: "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.",
|
|
773
773
|
packageCapabilities: {
|
|
774
774
|
updatePreferences: 1
|
package/dist/release.d.mts
CHANGED
|
@@ -149,7 +149,7 @@ type SdkRelease = {
|
|
|
149
149
|
supportPolicy: SdkSupportPolicy;
|
|
150
150
|
};
|
|
151
151
|
declare const SDK_RELEASE: {
|
|
152
|
-
readonly version: "0.3.
|
|
152
|
+
readonly version: "0.3.159";
|
|
153
153
|
readonly updateSummary: "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.";
|
|
154
154
|
readonly packageCapabilities: {
|
|
155
155
|
readonly updatePreferences: 1;
|
package/dist/release.d.ts
CHANGED
|
@@ -149,7 +149,7 @@ type SdkRelease = {
|
|
|
149
149
|
supportPolicy: SdkSupportPolicy;
|
|
150
150
|
};
|
|
151
151
|
declare const SDK_RELEASE: {
|
|
152
|
-
readonly version: "0.3.
|
|
152
|
+
readonly version: "0.3.159";
|
|
153
153
|
readonly updateSummary: "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.";
|
|
154
154
|
readonly packageCapabilities: {
|
|
155
155
|
readonly updatePreferences: 1;
|
package/dist/release.js
CHANGED
|
@@ -74,7 +74,7 @@ var SDK_RELEASE = {
|
|
|
74
74
|
// getters keep their established compatibility behavior.
|
|
75
75
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
76
76
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
77
|
-
version: "0.3.
|
|
77
|
+
version: "0.3.159",
|
|
78
78
|
updateSummary: "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.",
|
|
79
79
|
packageCapabilities: {
|
|
80
80
|
updatePreferences: 1
|
package/dist/release.mjs
CHANGED
|
@@ -48,7 +48,7 @@ var SDK_RELEASE = {
|
|
|
48
48
|
// getters keep their established compatibility behavior.
|
|
49
49
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
50
50
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
51
|
-
version: "0.3.
|
|
51
|
+
version: "0.3.159",
|
|
52
52
|
updateSummary: "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.",
|
|
53
53
|
packageCapabilities: {
|
|
54
54
|
updatePreferences: 1
|