deepline 0.3.123 → 0.3.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client.ts +25 -2
- package/dist/bundling-sources/sdk/src/compat.ts +17 -2
- package/dist/bundling-sources/sdk/src/play.ts +3 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/package.json +2 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +61 -10
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-control-plane-capability.ts +47 -0
- package/dist/bundling-sources/shared_libs/observability/redaction.ts +3 -0
- package/dist/bundling-sources/shared_libs/observability/runtime-console.ts +174 -0
- package/dist/bundling-sources/shared_libs/observability/telemetry.ts +26 -2
- package/dist/bundling-sources/shared_libs/play-runtime/play-admission-outcome.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/contracts.ts +20 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/index.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/postgres-adapter.ts +28 -11
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-telemetry.ts +121 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-play-deploy-task.ts +91 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +87 -41
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-pool.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/scheduler-capacity.ts +5 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +1 -0
- package/dist/cli/index.js +538 -469
- package/dist/cli/index.mjs +538 -469
- package/dist/index.d.mts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +11 -4
- package/dist/index.mjs +11 -4
- package/dist/install-integrity.json +2 -0
- 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
package/dist/index.d.mts
CHANGED
|
@@ -3523,8 +3523,12 @@ declare const MONITOR_JOB_RECONCILIATION_STATES: readonly ["pending", "aligned",
|
|
|
3523
3523
|
type MonitorJobReconciliationState = (typeof MONITOR_JOB_RECONCILIATION_STATES)[number];
|
|
3524
3524
|
type MonitorJobProjection = {
|
|
3525
3525
|
id: string;
|
|
3526
|
+
/** Durable provider operation identity used to trace Fleet/deploy work. */
|
|
3527
|
+
operation_id?: string;
|
|
3526
3528
|
kind: 'batch_deploy' | 'fleet_deploy';
|
|
3527
3529
|
state: MonitorJobState;
|
|
3530
|
+
/** Terminal semantic result; `blocked` is a deterministic Fleet/input refusal, not a provider outage. */
|
|
3531
|
+
outcome?: 'blocked' | 'failed';
|
|
3528
3532
|
phase: MonitorJobPhase;
|
|
3529
3533
|
target: {
|
|
3530
3534
|
monitor_key?: string;
|
|
@@ -3570,6 +3574,8 @@ type MonitorJobResult = {
|
|
|
3570
3574
|
ok?: boolean;
|
|
3571
3575
|
job?: MonitorJobProjection;
|
|
3572
3576
|
batch?: MonitorNamedBatchProjection;
|
|
3577
|
+
/** Same durable operation identity as `job.operation_id`, for log reads. */
|
|
3578
|
+
operation_id?: string;
|
|
3573
3579
|
logs?: Array<{
|
|
3574
3580
|
level: string;
|
|
3575
3581
|
phase: string;
|
|
@@ -4083,6 +4089,10 @@ type TargetBillingStatusResult = {
|
|
|
4083
4089
|
recharge_state: string;
|
|
4084
4090
|
next_action: string | null;
|
|
4085
4091
|
pending_plan_sku: string | null;
|
|
4092
|
+
/** Saved transition boundary; optional for older servers. */
|
|
4093
|
+
pending_plan_starts_at?: string | null;
|
|
4094
|
+
/** Next cycle boundary from the current Contract’s retained cadence. */
|
|
4095
|
+
current_period_end?: string | null;
|
|
4086
4096
|
as_of: string | null;
|
|
4087
4097
|
};
|
|
4088
4098
|
type TargetAutoRechargeResult = {
|
|
@@ -5464,6 +5474,7 @@ declare class DeeplineClient {
|
|
|
5464
5474
|
reactivateMonitor(key: string, options?: {
|
|
5465
5475
|
dryRun?: boolean;
|
|
5466
5476
|
}): Promise<MonitorReactivateResult>;
|
|
5477
|
+
private static readonly MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH;
|
|
5467
5478
|
private monitorJobIdempotencyKey;
|
|
5468
5479
|
private monitorJobHeaders;
|
|
5469
5480
|
deployMonitorBatch(definitions: MonitorDefinition[], options?: MonitorJobDeployOptions): Promise<MonitorJobResult>;
|
|
@@ -5552,7 +5563,9 @@ type PlayFetchResponse = PlayAuthoringFetchResponse;
|
|
|
5552
5563
|
* `runtime: { timeout: '90m', size: 'standard' }`; duration values are whole minutes or hours, up to `4h`.
|
|
5553
5564
|
* It differs from `ctx.tools.execute({ timeoutMs })`, which limits one provider call.
|
|
5554
5565
|
*
|
|
5555
|
-
* @example Webhook with HMAC verification
|
|
5566
|
+
* @example Webhook with HMAC verification. `secretEnv` is the Deepline Secret
|
|
5567
|
+
* name configured with `deepline secrets set`, retained as the legacy field
|
|
5568
|
+
* name for SDK compatibility.
|
|
5556
5569
|
* ```typescript
|
|
5557
5570
|
* definePlay('webhook-handler', handler, {
|
|
5558
5571
|
* webhook: {
|
package/dist/index.d.ts
CHANGED
|
@@ -3523,8 +3523,12 @@ declare const MONITOR_JOB_RECONCILIATION_STATES: readonly ["pending", "aligned",
|
|
|
3523
3523
|
type MonitorJobReconciliationState = (typeof MONITOR_JOB_RECONCILIATION_STATES)[number];
|
|
3524
3524
|
type MonitorJobProjection = {
|
|
3525
3525
|
id: string;
|
|
3526
|
+
/** Durable provider operation identity used to trace Fleet/deploy work. */
|
|
3527
|
+
operation_id?: string;
|
|
3526
3528
|
kind: 'batch_deploy' | 'fleet_deploy';
|
|
3527
3529
|
state: MonitorJobState;
|
|
3530
|
+
/** Terminal semantic result; `blocked` is a deterministic Fleet/input refusal, not a provider outage. */
|
|
3531
|
+
outcome?: 'blocked' | 'failed';
|
|
3528
3532
|
phase: MonitorJobPhase;
|
|
3529
3533
|
target: {
|
|
3530
3534
|
monitor_key?: string;
|
|
@@ -3570,6 +3574,8 @@ type MonitorJobResult = {
|
|
|
3570
3574
|
ok?: boolean;
|
|
3571
3575
|
job?: MonitorJobProjection;
|
|
3572
3576
|
batch?: MonitorNamedBatchProjection;
|
|
3577
|
+
/** Same durable operation identity as `job.operation_id`, for log reads. */
|
|
3578
|
+
operation_id?: string;
|
|
3573
3579
|
logs?: Array<{
|
|
3574
3580
|
level: string;
|
|
3575
3581
|
phase: string;
|
|
@@ -4083,6 +4089,10 @@ type TargetBillingStatusResult = {
|
|
|
4083
4089
|
recharge_state: string;
|
|
4084
4090
|
next_action: string | null;
|
|
4085
4091
|
pending_plan_sku: string | null;
|
|
4092
|
+
/** Saved transition boundary; optional for older servers. */
|
|
4093
|
+
pending_plan_starts_at?: string | null;
|
|
4094
|
+
/** Next cycle boundary from the current Contract’s retained cadence. */
|
|
4095
|
+
current_period_end?: string | null;
|
|
4086
4096
|
as_of: string | null;
|
|
4087
4097
|
};
|
|
4088
4098
|
type TargetAutoRechargeResult = {
|
|
@@ -5464,6 +5474,7 @@ declare class DeeplineClient {
|
|
|
5464
5474
|
reactivateMonitor(key: string, options?: {
|
|
5465
5475
|
dryRun?: boolean;
|
|
5466
5476
|
}): Promise<MonitorReactivateResult>;
|
|
5477
|
+
private static readonly MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH;
|
|
5467
5478
|
private monitorJobIdempotencyKey;
|
|
5468
5479
|
private monitorJobHeaders;
|
|
5469
5480
|
deployMonitorBatch(definitions: MonitorDefinition[], options?: MonitorJobDeployOptions): Promise<MonitorJobResult>;
|
|
@@ -5552,7 +5563,9 @@ type PlayFetchResponse = PlayAuthoringFetchResponse;
|
|
|
5552
5563
|
* `runtime: { timeout: '90m', size: 'standard' }`; duration values are whole minutes or hours, up to `4h`.
|
|
5553
5564
|
* It differs from `ctx.tools.execute({ timeoutMs })`, which limits one provider call.
|
|
5554
5565
|
*
|
|
5555
|
-
* @example Webhook with HMAC verification
|
|
5566
|
+
* @example Webhook with HMAC verification. `secretEnv` is the Deepline Secret
|
|
5567
|
+
* name configured with `deepline secrets set`, retained as the legacy field
|
|
5568
|
+
* name for SDK compatibility.
|
|
5556
5569
|
* ```typescript
|
|
5557
5570
|
* definePlay('webhook-handler', handler, {
|
|
5558
5571
|
* webhook: {
|
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.125",
|
|
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
|
|
@@ -4593,7 +4593,7 @@ function playRunStatusFromState(state) {
|
|
|
4593
4593
|
..."result" in state ? { result: state.result } : {}
|
|
4594
4594
|
};
|
|
4595
4595
|
}
|
|
4596
|
-
var DeeplineClient = class {
|
|
4596
|
+
var DeeplineClient = class _DeeplineClient {
|
|
4597
4597
|
http;
|
|
4598
4598
|
config;
|
|
4599
4599
|
/** Canonical run lifecycle namespace backed by `/api/v2/runs`. */
|
|
@@ -7518,9 +7518,16 @@ var DeeplineClient = class {
|
|
|
7518
7518
|
// ——————————————————————————————————————————————————————————
|
|
7519
7519
|
// Monitor Jobs, Batches, and Fleets
|
|
7520
7520
|
// ——————————————————————————————————————————————————————————
|
|
7521
|
+
static MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96;
|
|
7521
7522
|
monitorJobIdempotencyKey(operation) {
|
|
7522
|
-
const uuid = globalThis.crypto?.randomUUID?.()
|
|
7523
|
-
|
|
7523
|
+
const uuid = globalThis.crypto?.randomUUID?.() ?? `${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
7524
|
+
const prefix = "monitor-job-";
|
|
7525
|
+
const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
|
|
7526
|
+
const maxOperationLength = Math.max(
|
|
7527
|
+
0,
|
|
7528
|
+
_DeeplineClient.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH - prefix.length - uuid.length - 1
|
|
7529
|
+
);
|
|
7530
|
+
return `${prefix}${safeOperation.slice(0, maxOperationLength)}-${uuid}`;
|
|
7524
7531
|
}
|
|
7525
7532
|
monitorJobHeaders(operation, idempotencyKey) {
|
|
7526
7533
|
return {
|
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.125",
|
|
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
|
|
@@ -4497,7 +4497,7 @@ function playRunStatusFromState(state) {
|
|
|
4497
4497
|
..."result" in state ? { result: state.result } : {}
|
|
4498
4498
|
};
|
|
4499
4499
|
}
|
|
4500
|
-
var DeeplineClient = class {
|
|
4500
|
+
var DeeplineClient = class _DeeplineClient {
|
|
4501
4501
|
http;
|
|
4502
4502
|
config;
|
|
4503
4503
|
/** Canonical run lifecycle namespace backed by `/api/v2/runs`. */
|
|
@@ -7422,9 +7422,16 @@ var DeeplineClient = class {
|
|
|
7422
7422
|
// ——————————————————————————————————————————————————————————
|
|
7423
7423
|
// Monitor Jobs, Batches, and Fleets
|
|
7424
7424
|
// ——————————————————————————————————————————————————————————
|
|
7425
|
+
static MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96;
|
|
7425
7426
|
monitorJobIdempotencyKey(operation) {
|
|
7426
|
-
const uuid = globalThis.crypto?.randomUUID?.()
|
|
7427
|
-
|
|
7427
|
+
const uuid = globalThis.crypto?.randomUUID?.() ?? `${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
7428
|
+
const prefix = "monitor-job-";
|
|
7429
|
+
const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
|
|
7430
|
+
const maxOperationLength = Math.max(
|
|
7431
|
+
0,
|
|
7432
|
+
_DeeplineClient.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH - prefix.length - uuid.length - 1
|
|
7433
|
+
);
|
|
7434
|
+
return `${prefix}${safeOperation.slice(0, maxOperationLength)}-${uuid}`;
|
|
7428
7435
|
}
|
|
7429
7436
|
monitorJobHeaders(operation, idempotencyKey) {
|
|
7430
7437
|
return {
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts",
|
|
66
66
|
"dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts",
|
|
67
67
|
"dist/bundling-sources/shared_libs/monitors/provider-monitor-consumer-health.ts",
|
|
68
|
+
"dist/bundling-sources/shared_libs/monitors/provider-monitor-control-plane-capability.ts",
|
|
68
69
|
"dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts",
|
|
69
70
|
"dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts",
|
|
70
71
|
"dist/bundling-sources/shared_libs/monitors/provider-monitor-legacy-aliases.ts",
|
|
@@ -97,6 +98,7 @@
|
|
|
97
98
|
"dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts",
|
|
98
99
|
"dist/bundling-sources/shared_libs/observability/redaction.ts",
|
|
99
100
|
"dist/bundling-sources/shared_libs/observability/request-context.ts",
|
|
101
|
+
"dist/bundling-sources/shared_libs/observability/runtime-console.ts",
|
|
100
102
|
"dist/bundling-sources/shared_libs/observability/scheduled-job-errors.ts",
|
|
101
103
|
"dist/bundling-sources/shared_libs/observability/scheduled-jobs.json",
|
|
102
104
|
"dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts",
|
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.125";
|
|
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.125";
|
|
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.125",
|
|
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.125",
|
|
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
|