deepline 0.3.90 → 0.3.92
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 +101 -6
- package/dist/bundling-sources/sdk/src/monitor-fleet-contract.ts +2 -556
- package/dist/bundling-sources/sdk/src/monitor-fleets.ts +2 -2
- package/dist/bundling-sources/sdk/src/release.ts +7 -12
- package/dist/bundling-sources/sdk/src/types.ts +6 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/monitor-fleet-contract.ts +549 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/errors.ts +96 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +8 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +320 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/verdict.ts +106 -0
- package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +5 -1
- package/dist/bundling-sources/shared_libs/monitors/monitor-fleet-limits.ts +2 -12
- package/dist/bundling-sources/shared_libs/monitors/package.json +107 -5
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +12 -7
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +48 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/db-session-lease-store.ts +578 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-execution-relay.ts +521 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-receipt-gateway.ts +1378 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/runtime-topology.ts +1024 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-gateway-route-probe.ts +193 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machine-lifecycle.ts +104 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +1844 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-registry.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/process-tree.ts +40 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-gateway-drain.ts +262 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-surface.ts +98 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-topology.ts +303 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-tuple-publication-guardian.ts +70 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-tuple-recovery.ts +519 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/vercel-fly-rollback-alignment.ts +280 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/vercel-production-gate.ts +159 -0
- package/dist/bundling-sources/shared_libs/play-runtime/integration-operation-reader-fence/memory-store.ts +114 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +44 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/child-play-resolver.ts +26 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +3662 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/progress-sidecar.ts +47 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-deadline.ts +84 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-gateway-transport.ts +91 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-heartbeat.ts +424 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-progress-push.ts +321 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-sheet-persistence-retry.ts +110 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-terminal-push.ts +625 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +46 -3
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/receipt-gateway.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/webhook-receipt-retry.ts +50 -0
- package/dist/bundling-sources/shared_libs/plays/bundling/repository-adapter.ts +24 -0
- package/dist/bundling-sources/shared_libs/plays/child-run-projection.ts +174 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/api-client.ts +267 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/control-plane-types.ts +73 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/manifest.ts +162 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/project-serializer.ts +87 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/source-file-path.ts +26 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/target-paths.ts +36 -0
- package/dist/bundling-sources/shared_libs/plays/launch/input-contract.ts +400 -0
- package/dist/bundling-sources/shared_libs/plays/launch/prepare.ts +96 -0
- package/dist/bundling-sources/shared_libs/plays/local-file-discovery.ts +385 -0
- package/dist/bundling-sources/shared_libs/plays/play-grep-search.ts +79 -6
- package/dist/bundling-sources/shared_libs/plays/play-reference.ts +117 -0
- package/dist/bundling-sources/shared_libs/plays/run-input-summary.ts +260 -0
- package/dist/bundling-sources/shared_libs/plays/run-summary-types.ts +49 -0
- package/dist/bundling-sources/shared_libs/plays/secrets/errors.ts +19 -0
- package/dist/bundling-sources/shared_libs/plays/sheet-filter.ts +347 -0
- package/dist/bundling-sources/shared_libs/plays/standard-webhooks.ts +117 -0
- package/dist/bundling-sources/shared_libs/plays/status-result.ts +388 -0
- package/dist/bundling-sources/shared_libs/plays/transform-factor-structure.ts +377 -0
- package/dist/bundling-sources/shared_libs/plays/webhook-payload.ts +113 -0
- package/dist/cli/index.js +369 -162
- package/dist/cli/index.mjs +369 -162
- package/dist/{compiler-manifest-BaJfE-5H.d.mts → compiler-manifest-x14KL83E.d.mts} +1 -1
- package/dist/{compiler-manifest-BaJfE-5H.d.ts → compiler-manifest-x14KL83E.d.ts} +1 -1
- package/dist/index.d.mts +45 -8
- package/dist/index.d.ts +45 -8
- package/dist/index.js +61 -14
- package/dist/index.mjs +61 -14
- package/dist/install-integrity.json +54 -2
- package/dist/monitor-fleet-contract.d.mts +3 -10
- package/dist/monitor-fleet-contract.d.ts +3 -10
- package/dist/monitor-fleet-contract.js +2 -0
- package/dist/monitor-fleet-contract.mjs +1 -1
- package/dist/plays/bundle-play-file.d.mts +2 -2
- package/dist/plays/bundle-play-file.d.ts +2 -2
- package/dist/release.d.mts +3 -3
- package/dist/release.d.ts +3 -3
- package/dist/release.js +7 -12
- package/dist/release.mjs +7 -12
- package/package.json +2 -2
|
@@ -749,6 +749,7 @@ export type PlaySecretMetadata = {
|
|
|
749
749
|
scope: 'org' | 'play';
|
|
750
750
|
playName?: string;
|
|
751
751
|
name: string;
|
|
752
|
+
note?: string;
|
|
752
753
|
status: string;
|
|
753
754
|
hasValue: boolean;
|
|
754
755
|
createdAt: number;
|
|
@@ -1085,7 +1086,13 @@ export type MonitorBatchOperationResult = {
|
|
|
1085
1086
|
rejoined?: boolean;
|
|
1086
1087
|
operation: {
|
|
1087
1088
|
runId: string;
|
|
1088
|
-
kind:
|
|
1089
|
+
kind:
|
|
1090
|
+
| 'audit'
|
|
1091
|
+
| 'converge'
|
|
1092
|
+
| 'deactivate'
|
|
1093
|
+
| 'reactivate'
|
|
1094
|
+
| 'deploy'
|
|
1095
|
+
| 'repair';
|
|
1089
1096
|
state: 'running' | 'retry_scheduled' | 'completed' | 'failed';
|
|
1090
1097
|
dryRun: boolean;
|
|
1091
1098
|
scope: unknown;
|
|
@@ -1205,7 +1212,13 @@ export type MonitorsHealth = {
|
|
|
1205
1212
|
/** Bounded current durable monitor work, if the server supports it. */
|
|
1206
1213
|
batch_operations?: Array<{
|
|
1207
1214
|
run_id: string;
|
|
1208
|
-
kind:
|
|
1215
|
+
kind:
|
|
1216
|
+
| 'audit'
|
|
1217
|
+
| 'converge'
|
|
1218
|
+
| 'deactivate'
|
|
1219
|
+
| 'reactivate'
|
|
1220
|
+
| 'repair'
|
|
1221
|
+
| 'deploy';
|
|
1209
1222
|
state: 'running' | 'retry_scheduled';
|
|
1210
1223
|
updated_at: number;
|
|
1211
1224
|
next_attempt_at?: number;
|
|
@@ -1457,6 +1470,7 @@ export type TargetBillingPlan = {
|
|
|
1457
1470
|
interval: 'month' | 'year';
|
|
1458
1471
|
included_credits: number;
|
|
1459
1472
|
purchased_credit_price_usd: number;
|
|
1473
|
+
acquisition_enabled: boolean;
|
|
1460
1474
|
};
|
|
1461
1475
|
|
|
1462
1476
|
export type TargetBillingPlansResult = {
|
|
@@ -1465,6 +1479,7 @@ export type TargetBillingPlansResult = {
|
|
|
1465
1479
|
current_plan_sku: string;
|
|
1466
1480
|
pending_plan_sku: string | null;
|
|
1467
1481
|
acquisition_enabled: boolean;
|
|
1482
|
+
enabled_offer_keys: TargetBillingPlan['sku'][];
|
|
1468
1483
|
};
|
|
1469
1484
|
|
|
1470
1485
|
export type TargetBillingStatusResult = {
|
|
@@ -1494,6 +1509,8 @@ export type TargetAutoRechargeResult = {
|
|
|
1494
1509
|
threshold_credits: number | null;
|
|
1495
1510
|
refill_to_credits: number | null;
|
|
1496
1511
|
rolling_limit_cents: null;
|
|
1512
|
+
purchase_limit_cents?: number | null;
|
|
1513
|
+
rolling_committed_cents?: number;
|
|
1497
1514
|
};
|
|
1498
1515
|
|
|
1499
1516
|
export type TargetAutoRechargeUpdateOptions =
|
|
@@ -1505,6 +1522,8 @@ export type TargetAutoRechargeUpdateOptions =
|
|
|
1505
1522
|
enabled: true;
|
|
1506
1523
|
thresholdCredits: number;
|
|
1507
1524
|
refillToCredits: number;
|
|
1525
|
+
/** Maximum automatic purchases in a rolling 30-day window, in USD cents. */
|
|
1526
|
+
purchaseLimitCents?: number | null;
|
|
1508
1527
|
idempotencyKey: string;
|
|
1509
1528
|
};
|
|
1510
1529
|
|
|
@@ -1632,10 +1651,8 @@ export type WorkspacesNamespace = {
|
|
|
1632
1651
|
};
|
|
1633
1652
|
|
|
1634
1653
|
/**
|
|
1635
|
-
* Public billing namespace
|
|
1636
|
-
*
|
|
1637
|
-
* Carries plans, subscription state, cancellation, and invoice/receipt history
|
|
1638
|
-
* so CLI commands and programmatic callers share one surface.
|
|
1654
|
+
* Public `client.billing` namespace for CLI commands and programmatic callers.
|
|
1655
|
+
* Covers plans, subscription state, cancellation, and invoice/receipt history.
|
|
1639
1656
|
*
|
|
1640
1657
|
* @sdkReference client 030 client.billing
|
|
1641
1658
|
*/
|
|
@@ -1669,6 +1686,9 @@ export type BillingNamespace = {
|
|
|
1669
1686
|
/** Read and manage the Metronome-backed automatic recharge configuration. */
|
|
1670
1687
|
autoRecharge: {
|
|
1671
1688
|
get: () => Promise<TargetAutoRechargeResult>;
|
|
1689
|
+
trigger: (options?: {
|
|
1690
|
+
idempotencyKey: string;
|
|
1691
|
+
}) => Promise<{ data: { status: string; operation_id?: string } }>;
|
|
1672
1692
|
update: (
|
|
1673
1693
|
options: TargetAutoRechargeUpdateOptions,
|
|
1674
1694
|
) => Promise<TargetAutoRechargeResult>;
|
|
@@ -1678,6 +1698,12 @@ export type BillingNamespace = {
|
|
|
1678
1698
|
credits: number;
|
|
1679
1699
|
idempotencyKey: string;
|
|
1680
1700
|
}) => Promise<TargetBillingMutationResult>;
|
|
1701
|
+
/** Inspect or retire the original purchase intent without starting a payment. */
|
|
1702
|
+
recoverCreditPurchase: (options: {
|
|
1703
|
+
credits: number;
|
|
1704
|
+
orgId: string;
|
|
1705
|
+
idempotencyKey: string;
|
|
1706
|
+
}) => Promise<TargetBillingMutationResult>;
|
|
1681
1707
|
/** Start, change, cancel, or undo a target plan transition. */
|
|
1682
1708
|
transitionPlan: (
|
|
1683
1709
|
options: TargetBillingPlanTransitionOptions,
|
|
@@ -2267,9 +2293,21 @@ export class DeeplineClient {
|
|
|
2267
2293
|
targetStatus: () => this.getTargetBillingStatus(),
|
|
2268
2294
|
autoRecharge: {
|
|
2269
2295
|
get: () => this.getTargetAutoRecharge(),
|
|
2296
|
+
trigger: (options) =>
|
|
2297
|
+
this.http.post(
|
|
2298
|
+
'/api/v2/billing/auto-recharge/trigger',
|
|
2299
|
+
{},
|
|
2300
|
+
{
|
|
2301
|
+
'Idempotency-Key': requireTargetBillingIdempotencyKey(
|
|
2302
|
+
options?.idempotencyKey ?? globalThis.crypto.randomUUID(),
|
|
2303
|
+
),
|
|
2304
|
+
},
|
|
2305
|
+
),
|
|
2270
2306
|
update: (options) => this.updateTargetAutoRecharge(options),
|
|
2271
2307
|
},
|
|
2272
2308
|
purchaseCredits: (options) => this.purchaseTargetBillingCredits(options),
|
|
2309
|
+
recoverCreditPurchase: (options) =>
|
|
2310
|
+
this.recoverTargetBillingCreditPurchase(options),
|
|
2273
2311
|
transitionPlan: (options) => this.transitionTargetBillingPlan(options),
|
|
2274
2312
|
portalSession: () => this.createTargetBillingPortalSession(),
|
|
2275
2313
|
};
|
|
@@ -2525,6 +2563,18 @@ export class DeeplineClient {
|
|
|
2525
2563
|
return this.http.get(`/api/v2/secrets?${params.toString()}`);
|
|
2526
2564
|
}
|
|
2527
2565
|
|
|
2566
|
+
/** Add, replace, or clear the non-sensitive note attached to one secret. */
|
|
2567
|
+
async updateSecretNote(
|
|
2568
|
+
secretId: string,
|
|
2569
|
+
note: string,
|
|
2570
|
+
): Promise<PlaySecretMetadata> {
|
|
2571
|
+
const response = await this.http.patch<{ secret: PlaySecretMetadata }>(
|
|
2572
|
+
`/api/v2/secrets/${encodeURIComponent(secretId)}`,
|
|
2573
|
+
{ note },
|
|
2574
|
+
);
|
|
2575
|
+
return response.secret;
|
|
2576
|
+
}
|
|
2577
|
+
|
|
2528
2578
|
// ——————————————————————————————————————————————————————————
|
|
2529
2579
|
// Tools
|
|
2530
2580
|
// ——————————————————————————————————————————————————————————
|
|
@@ -5421,6 +5471,9 @@ export class DeeplineClient {
|
|
|
5421
5471
|
enabled: true,
|
|
5422
5472
|
threshold_credits: options.thresholdCredits,
|
|
5423
5473
|
refill_to_credits: options.refillToCredits,
|
|
5474
|
+
...(options.purchaseLimitCents !== undefined
|
|
5475
|
+
? { purchase_limit_cents: options.purchaseLimitCents }
|
|
5476
|
+
: {}),
|
|
5424
5477
|
}
|
|
5425
5478
|
: { enabled: false },
|
|
5426
5479
|
{ 'Idempotency-Key': idempotencyKey },
|
|
@@ -5447,6 +5500,48 @@ export class DeeplineClient {
|
|
|
5447
5500
|
);
|
|
5448
5501
|
}
|
|
5449
5502
|
|
|
5503
|
+
/** Recover only the original workspace, credit amount, and purchase key; never charge. */
|
|
5504
|
+
async recoverTargetBillingCreditPurchase(options: {
|
|
5505
|
+
credits: number;
|
|
5506
|
+
orgId: string;
|
|
5507
|
+
idempotencyKey: string;
|
|
5508
|
+
}): Promise<TargetBillingMutationResult> {
|
|
5509
|
+
if (typeof options.idempotencyKey !== 'string') {
|
|
5510
|
+
throw new DeeplineError(
|
|
5511
|
+
'The original billing idempotencyKey is required.',
|
|
5512
|
+
undefined,
|
|
5513
|
+
'INVALID_BILLING_IDEMPOTENCY_KEY',
|
|
5514
|
+
);
|
|
5515
|
+
}
|
|
5516
|
+
const idempotencyKey = requireTargetBillingIdempotencyKey(
|
|
5517
|
+
options.idempotencyKey,
|
|
5518
|
+
);
|
|
5519
|
+
if (!Number.isSafeInteger(options.credits) || options.credits <= 0) {
|
|
5520
|
+
throw new DeeplineError(
|
|
5521
|
+
'credits must be a positive safe integer.',
|
|
5522
|
+
undefined,
|
|
5523
|
+
'INVALID_CREDITS',
|
|
5524
|
+
);
|
|
5525
|
+
}
|
|
5526
|
+
if (
|
|
5527
|
+
typeof options.orgId !== 'string' ||
|
|
5528
|
+
!options.orgId.trim() ||
|
|
5529
|
+
options.orgId !== options.orgId.trim()
|
|
5530
|
+
) {
|
|
5531
|
+
throw new DeeplineError(
|
|
5532
|
+
'The original orgId is required without surrounding whitespace.',
|
|
5533
|
+
undefined,
|
|
5534
|
+
'INVALID_ORG_ID',
|
|
5535
|
+
);
|
|
5536
|
+
}
|
|
5537
|
+
return this.http.post<TargetBillingMutationResult>(
|
|
5538
|
+
'/api/v2/billing/credit-purchases/recover',
|
|
5539
|
+
{ credits: options.credits, org_id: options.orgId },
|
|
5540
|
+
{ 'Idempotency-Key': idempotencyKey },
|
|
5541
|
+
{ maxRetries: 0, exactUrlOnly: true },
|
|
5542
|
+
);
|
|
5543
|
+
}
|
|
5544
|
+
|
|
5450
5545
|
/**
|
|
5451
5546
|
* Start, change, cancel, or restore a target plan through one idempotent
|
|
5452
5547
|
* commercial operation.
|