deepline 0.3.522 → 0.3.524
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-core.ts +178 -60
- package/dist/bundling-sources/sdk/src/index.ts +3 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +60 -14
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-queue-delivery.ts +9 -3
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +406 -40
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/db-session-renewal.ts +209 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +16 -6
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +388 -13
- package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +28 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-modal-fallback.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +38 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +92 -10
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-deadline-reconciliation.ts +96 -25
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +29 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +139 -17
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-sql.ts +26 -3
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +145 -5
- package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +190 -10
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +85 -5
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +21 -11
- package/dist/cli/auth-OKPHHMMP.js +43 -0
- package/dist/cli/{auth-YIBY5IKT.mjs → auth-QXJMVLPN.mjs} +5 -5
- package/dist/cli/{billing-UDKL53GI.js → billing-N5R4HTHT.js} +82 -82
- package/dist/cli/{billing-G3IX3SNY.mjs → billing-SNSIFM4B.mjs} +7 -7
- package/dist/cli/{chunk-EJBW7Y6Z.js → chunk-2ZWNIS54.js} +108 -96
- package/dist/cli/{chunk-3KMGVOBM.mjs → chunk-2ZX7XSAQ.mjs} +4 -4
- package/dist/cli/{chunk-4TUMKJZX.mjs → chunk-3WWTBQHC.mjs} +2 -2
- package/dist/cli/{chunk-MD524MRB.mjs → chunk-536TGWR6.mjs} +1 -1
- package/dist/cli/{chunk-37SXIFIU.js → chunk-66N76YZG.js} +44 -44
- package/dist/cli/{chunk-BZY335JP.js → chunk-7E6B7VMS.js} +5 -5
- package/dist/cli/{chunk-HYR34KFA.js → chunk-7OQGZBDG.js} +109 -24
- package/dist/cli/{chunk-GVKW3LCA.js → chunk-7QM6DNR4.js} +11 -11
- package/dist/cli/{chunk-DNJJ3ULJ.js → chunk-ANKD3AIR.js} +2 -2
- package/dist/cli/{chunk-4DFWDA2Q.js → chunk-ATATJNJ6.js} +9 -9
- package/dist/cli/{chunk-ZZ7U4YJS.mjs → chunk-BXIQD2IY.mjs} +1 -1
- package/dist/cli/{chunk-XT25FX6T.js → chunk-BXVYVIMB.js} +3 -3
- package/dist/cli/{chunk-XR6TN5DT.mjs → chunk-CH7JVSA7.mjs} +6 -6
- package/dist/cli/{chunk-RKE5YTHY.mjs → chunk-EO55Y4QW.mjs} +5 -5
- package/dist/cli/{chunk-RI672VNY.js → chunk-EQNAQENZ.js} +2 -2
- package/dist/cli/{chunk-LFSOBW7E.mjs → chunk-FXTV5B3D.mjs} +22 -10
- package/dist/cli/{chunk-C6WGMODR.mjs → chunk-GMO3JDZA.mjs} +2 -2
- package/dist/cli/{chunk-DRDZBRXV.js → chunk-GTGJBZVH.js} +7 -7
- package/dist/cli/{chunk-SFMCKB57.mjs → chunk-HLAFGQPV.mjs} +76 -34
- package/dist/cli/{chunk-534YYHIF.js → chunk-HTYT2OHB.js} +6 -6
- package/dist/cli/{chunk-ZZLZCO6Y.js → chunk-I75VRGQG.js} +22 -22
- package/dist/cli/{chunk-Y3LDRCMB.mjs → chunk-II3BJKCH.mjs} +2 -2
- package/dist/cli/{chunk-5BQPEHEP.js → chunk-JDIQBZ6O.js} +14 -14
- package/dist/cli/{chunk-ENWJFUWK.mjs → chunk-KKPBCB6D.mjs} +2 -2
- package/dist/cli/{chunk-BONXEWYF.mjs → chunk-KSQXBLRW.mjs} +3 -3
- package/dist/cli/{chunk-7JEN3FX4.js → chunk-LRWDZDBS.js} +5 -5
- package/dist/cli/{chunk-5477PEHL.mjs → chunk-MW3YMPD2.mjs} +1 -1
- package/dist/cli/{chunk-VFCVH2LV.mjs → chunk-NUC7ZVDG.mjs} +5 -5
- package/dist/cli/{chunk-DLDWAPA5.js → chunk-OCT4SUJA.js} +4 -4
- package/dist/cli/{chunk-FQQAAR3Q.mjs → chunk-OQ5G7RFQ.mjs} +1 -1
- package/dist/cli/{chunk-VIM6I7RC.js → chunk-PFKKZVFK.js} +41 -41
- package/dist/cli/{chunk-OAQIVJFY.mjs → chunk-PFKWKWUJ.mjs} +2 -2
- package/dist/cli/{chunk-52MHE7B4.mjs → chunk-R457IMHJ.mjs} +1 -1
- package/dist/cli/{chunk-UV6XCHOZ.mjs → chunk-RIX26ZJD.mjs} +1 -1
- package/dist/cli/{chunk-RDJTCW3I.mjs → chunk-RTDX5NNN.mjs} +3 -3
- package/dist/cli/{chunk-FNHUDCJE.js → chunk-RUULUCBP.js} +10 -10
- package/dist/cli/{chunk-GMYDVW7Z.js → chunk-SF4QJVBE.js} +3 -3
- package/dist/cli/{chunk-DARD7TJ7.js → chunk-SMWFOGUT.js} +53 -53
- package/dist/cli/{chunk-XXY4E57R.mjs → chunk-T43FF5PF.mjs} +2 -2
- package/dist/cli/{chunk-ZUAKRBZB.js → chunk-TZTWH53O.js} +1 -1
- package/dist/cli/{chunk-7J5PLHII.mjs → chunk-V2YIBBVT.mjs} +1 -1
- package/dist/cli/{chunk-6SJPZV5E.js → chunk-V4RJ57MA.js} +2 -2
- package/dist/cli/{chunk-4MF44THR.js → chunk-V7KUBDEB.js} +82 -40
- package/dist/cli/{chunk-ISUUSSS4.js → chunk-VHTVXS5A.js} +16 -16
- package/dist/cli/{chunk-NDNG3MAT.mjs → chunk-WCVIPZWX.mjs} +5 -5
- package/dist/cli/{chunk-F5D623KO.js → chunk-WOEPDSO3.js} +26 -26
- package/dist/cli/{chunk-VE6FHVXZ.mjs → chunk-XURWFEXM.mjs} +109 -24
- package/dist/cli/{chunk-G65FJ5JX.mjs → chunk-YCIXY66B.mjs} +2 -2
- package/dist/cli/{chunk-CFXERH7F.mjs → chunk-YGOI5ZE5.mjs} +1 -1
- package/dist/cli/{chunk-PDLRUZ42.mjs → chunk-YKFW3NNA.mjs} +5 -5
- package/dist/cli/{chunk-5H22VJPE.js → chunk-YXVYPYIP.js} +6 -6
- package/dist/cli/{chunk-KMBF3N2Z.js → chunk-Z4MOEQSY.js} +16 -16
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-PE35WGRO.mjs → csv-HT2JBCW2.mjs} +4 -4
- package/dist/cli/{csv-3HIE4VCO.js → csv-Q2LWKXAV.js} +13 -13
- package/dist/cli/{db-L7ZMMQKW.mjs → db-CS3XQ2LX.mjs} +6 -6
- package/dist/cli/{db-O2YRTTDO.js → db-XEV4WEE4.js} +27 -27
- package/dist/cli/describe-5G5NXO5E.js +50 -0
- package/dist/cli/{describe-NI324Y2M.mjs → describe-OUTXLDGZ.mjs} +18 -18
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-VH4DKLFI.js → executions-JCC34WAD.js} +8 -8
- package/dist/cli/{executions-T6KU2OKK.mjs → executions-L6XFG5MP.mjs} +6 -6
- package/dist/cli/{feedback-SCSJC3FX.mjs → feedback-AWBDO5I6.mjs} +5 -5
- package/dist/cli/{feedback-ZLC6G5OK.js → feedback-HV2M2G7N.js} +10 -10
- package/dist/cli/git-GDPTG52F.js +25 -0
- package/dist/cli/{git-I4LVQCID.mjs → git-S4LRXTRX.mjs} +5 -5
- package/dist/cli/index.js +146 -146
- package/dist/cli/index.mjs +45 -45
- package/dist/cli/{legacy-noops-44FQ2256.mjs → legacy-noops-7MOKBL4O.mjs} +6 -6
- package/dist/cli/{legacy-noops-UPFWEHPG.js → legacy-noops-RGSZUD6V.js} +9 -9
- package/dist/cli/{monitors-JN6IQGK6.js → monitors-JEFM2C5W.js} +100 -100
- package/dist/cli/{monitors-LMSASWXE.mjs → monitors-XQNXDZPQ.mjs} +7 -7
- package/dist/cli/{org-F7O3ZU5O.js → org-GYLA5V32.js} +235 -72
- package/dist/cli/{org-QYLVEE7A.mjs → org-KTMJZGTN.mjs} +169 -6
- package/dist/cli/{pages-KEL3Y4L4.js → pages-RY4U7OCL.js} +18 -18
- package/dist/cli/{pages-5XE4LBZN.mjs → pages-WOMU2T2O.mjs} +6 -6
- package/dist/cli/{play-OURHH6KV.js → play-2Q6MWJ3D.js} +363 -323
- package/dist/cli/{play-MWQG3G32.mjs → play-KOYGGNYS.mjs} +64 -24
- package/dist/cli/{providers-IQY7LUBB.mjs → providers-7YKDITJC.mjs} +6 -6
- package/dist/cli/{providers-ZCBWPE3C.js → providers-HOIRHMN2.js} +9 -9
- package/dist/cli/{quickstart-O53OXTN6.js → quickstart-OWCJOSQA.js} +6 -6
- package/dist/cli/{quickstart-L45NGRMI.mjs → quickstart-RDXHSMVX.mjs} +4 -4
- package/dist/cli/{run-W745Z3Z5.js → run-MT2ABKO5.js} +41 -41
- package/dist/cli/{run-VCSIWLEU.mjs → run-RT73NDP5.mjs} +23 -23
- package/dist/cli/search-7VBA6IGS.js +33 -0
- package/dist/cli/{search-THELKULN.mjs → search-CJPKIGSA.mjs} +8 -8
- package/dist/cli/{search-output-N7MJLYYD.mjs → search-output-AREMA544.mjs} +4 -4
- package/dist/cli/{search-output-SJW7LEOM.js → search-output-OSBZ7WK6.js} +6 -6
- package/dist/cli/{secrets-44ST3FJH.mjs → secrets-BTIY2FEJ.mjs} +6 -6
- package/dist/cli/{secrets-GDXPX3KB.js → secrets-OV6KH633.js} +15 -15
- package/dist/cli/{sessions-LYCBI77S.mjs → sessions-3CO3ZFOD.mjs} +6 -6
- package/dist/cli/sessions-B3WNEWRW.js +18 -0
- package/dist/cli/{settings-GXPDMJFG.mjs → settings-7BQIC7QN.mjs} +13 -13
- package/dist/cli/{settings-3WOFF642.js → settings-LBIECYDB.js} +86 -86
- package/dist/cli/{setup-YHLMBJP4.js → setup-QZE7QR3F.js} +50 -50
- package/dist/cli/{setup-YM6JEB64.mjs → setup-XPTSNNES.mjs} +10 -10
- package/dist/cli/{skills-WX4XWEAT.mjs → skills-TGGKIQLT.mjs} +8 -8
- package/dist/cli/skills-TXBRTWEV.js +37 -0
- package/dist/cli/{tools-K24VSQ7S.mjs → tools-MKIFX2TQ.mjs} +17 -17
- package/dist/cli/tools-RZJV4X3J.js +57 -0
- package/dist/cli/{update-PSSCF5AT.mjs → update-5R3D3WNH.mjs} +10 -10
- package/dist/cli/update-YWGGPWUA.js +35 -0
- package/dist/cli/{artifacts-RY2MK74N.mjs → views-VHKDHHUP.mjs} +76 -76
- package/dist/cli/views-VPWEINIA.js +270 -0
- package/dist/cli/{workflow-FPVI3NIA.js → workflow-7K2VEQ4V.js} +17 -17
- package/dist/cli/{workflow-DGOPYATO.mjs → workflow-D5DF65N6.mjs} +7 -7
- package/dist/{client-DA71-2_u.d.mts → client-C5_6W8yd.d.mts} +1 -1
- package/dist/{client-core-C0IzDKMJ.d.ts → client-core-B-GPfmaC.d.ts} +121 -44
- package/dist/{client-core-BXbds1cb.d.mts → client-core-Dob428Z4.d.mts} +121 -44
- package/dist/{client-B-2Am2y6.d.ts → client-iXW4TOat.d.ts} +1 -1
- package/dist/{compiler-manifest-B4mIIbw7.d.mts → compiler-manifest-DsxsQP-T.d.mts} +14 -7
- package/dist/{compiler-manifest-B4mIIbw7.d.ts → compiler-manifest-DsxsQP-T.d.ts} +14 -7
- package/dist/{errors-Gj9i5Rkd.d.ts → errors-Bk5h1D-C.d.ts} +1 -1
- package/dist/{errors-C2F4qzAq.d.mts → errors-qdJUVQ3g.d.mts} +1 -1
- package/dist/{index-5JZBufdF.d.mts → index-PaupwX1B.d.mts} +1 -1
- package/dist/{index-BXtSj8bv.d.ts → index-bL66eHYz.d.ts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +117 -116
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +7 -5
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- 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/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/artifacts-GIZZH5VA.js +0 -270
- package/dist/cli/auth-JSES2JOQ.js +0 -43
- package/dist/cli/describe-EB336DAO.js +0 -50
- package/dist/cli/git-23T7TXAH.js +0 -25
- package/dist/cli/search-R6K7ZAMU.js +0 -33
- package/dist/cli/sessions-2V5ZFOWL.js +0 -18
- package/dist/cli/skills-XNGADDO6.js +0 -37
- package/dist/cli/tools-ROUMCB7B.js +0 -57
- package/dist/cli/update-RXURGIRW.js +0 -35
|
@@ -2430,6 +2430,68 @@ export type WorkspaceCreateResult = {
|
|
|
2430
2430
|
request_id?: string;
|
|
2431
2431
|
};
|
|
2432
2432
|
|
|
2433
|
+
/** One key a service account holds. Never key material. */
|
|
2434
|
+
export type WorkspaceServiceAccountKey = {
|
|
2435
|
+
id: string;
|
|
2436
|
+
keyPrefix: string;
|
|
2437
|
+
keyLast4: string;
|
|
2438
|
+
status: string;
|
|
2439
|
+
createdAt: number;
|
|
2440
|
+
lastUsedAt: number | null;
|
|
2441
|
+
};
|
|
2442
|
+
|
|
2443
|
+
/**
|
|
2444
|
+
* A workspace member that is not a person: it owns API keys so production
|
|
2445
|
+
* credentials keep working when people leave. It cannot sign in, and its role
|
|
2446
|
+
* is read, run, or member.
|
|
2447
|
+
*/
|
|
2448
|
+
export type WorkspaceServiceAccount = {
|
|
2449
|
+
id: string;
|
|
2450
|
+
userId: string;
|
|
2451
|
+
memberId: string | null;
|
|
2452
|
+
name: string;
|
|
2453
|
+
role: string | null;
|
|
2454
|
+
createdAt: number;
|
|
2455
|
+
createdByUserId: string;
|
|
2456
|
+
activeKeyCount: number;
|
|
2457
|
+
lastUsedAt: number | null;
|
|
2458
|
+
/** Present for admins; null for other members. */
|
|
2459
|
+
keys: WorkspaceServiceAccountKey[] | null;
|
|
2460
|
+
};
|
|
2461
|
+
|
|
2462
|
+
/** Create, change, and delete service accounts and their keys. Admin only, except list. */
|
|
2463
|
+
export type WorkspaceServiceAccountsNamespace = {
|
|
2464
|
+
list: () => Promise<{ serviceAccounts: WorkspaceServiceAccount[] }>;
|
|
2465
|
+
create: (options: {
|
|
2466
|
+
name: string;
|
|
2467
|
+
role: string;
|
|
2468
|
+
}) => Promise<{ serviceAccount: WorkspaceServiceAccount }>;
|
|
2469
|
+
setRole: (
|
|
2470
|
+
serviceAccountId: string,
|
|
2471
|
+
role: string,
|
|
2472
|
+
) => Promise<{ serviceAccount: WorkspaceServiceAccount }>;
|
|
2473
|
+
delete: (
|
|
2474
|
+
serviceAccountId: string,
|
|
2475
|
+
) => Promise<{ id: string; revokedKeyCount: number }>;
|
|
2476
|
+
/**
|
|
2477
|
+
* A service account holds one active key; this is refused while it has one.
|
|
2478
|
+
* The returned `apiKey` is shown once; Deepline stores only its hash.
|
|
2479
|
+
*/
|
|
2480
|
+
createKey: (
|
|
2481
|
+
serviceAccountId: string,
|
|
2482
|
+
) => Promise<{ apiKey: string; key: WorkspaceServiceAccountKey }>;
|
|
2483
|
+
/** Revoke the active key and issue its replacement in one step; shown once. */
|
|
2484
|
+
rotateKey: (serviceAccountId: string) => Promise<{
|
|
2485
|
+
apiKey: string;
|
|
2486
|
+
key: WorkspaceServiceAccountKey;
|
|
2487
|
+
revokedKeyIds: string[];
|
|
2488
|
+
}>;
|
|
2489
|
+
revokeKey: (
|
|
2490
|
+
serviceAccountId: string,
|
|
2491
|
+
keyId: string,
|
|
2492
|
+
) => Promise<{ keyId: string; status: string }>;
|
|
2493
|
+
};
|
|
2494
|
+
|
|
2433
2495
|
/** Deliberate workspace lifecycle operations. */
|
|
2434
2496
|
export type WorkspacesNamespace = {
|
|
2435
2497
|
/** One page of current workspace memberships and effective grants. */
|
|
@@ -2451,6 +2513,7 @@ export type WorkspacesNamespace = {
|
|
|
2451
2513
|
name: string;
|
|
2452
2514
|
idempotencyKey: string;
|
|
2453
2515
|
}) => Promise<WorkspaceCreateResult>;
|
|
2516
|
+
serviceAccounts: WorkspaceServiceAccountsNamespace;
|
|
2454
2517
|
};
|
|
2455
2518
|
|
|
2456
2519
|
/** One authenticated per-request usage event from `/api/v2/usage/events`. */
|
|
@@ -2956,21 +3019,21 @@ export type HostedPageLink = {
|
|
|
2956
3019
|
created_at: number;
|
|
2957
3020
|
};
|
|
2958
3021
|
|
|
2959
|
-
export type
|
|
3022
|
+
export type ViewAccess = 'workspace' | 'public';
|
|
2960
3023
|
|
|
2961
|
-
export type
|
|
3024
|
+
export type View = {
|
|
2962
3025
|
id: string;
|
|
2963
3026
|
name: string;
|
|
2964
3027
|
description: string | null;
|
|
2965
3028
|
url: string;
|
|
2966
3029
|
play: string;
|
|
2967
3030
|
input: Record<string, unknown>;
|
|
2968
|
-
access:
|
|
3031
|
+
access: ViewAccess;
|
|
2969
3032
|
created_at: number;
|
|
2970
3033
|
updated_at: number;
|
|
2971
3034
|
};
|
|
2972
3035
|
|
|
2973
|
-
export type
|
|
3036
|
+
export type ViewAbilities = {
|
|
2974
3037
|
create: boolean;
|
|
2975
3038
|
edit: boolean;
|
|
2976
3039
|
delete: boolean;
|
|
@@ -2979,24 +3042,24 @@ export type ArtifactAbilities = {
|
|
|
2979
3042
|
admin: boolean;
|
|
2980
3043
|
};
|
|
2981
3044
|
|
|
2982
|
-
export type
|
|
2983
|
-
can:
|
|
3045
|
+
export type ViewDetail = View & {
|
|
3046
|
+
can: ViewAbilities | null;
|
|
2984
3047
|
};
|
|
2985
3048
|
|
|
2986
|
-
export type
|
|
3049
|
+
export type ViewRunSummary = {
|
|
2987
3050
|
run_id: string;
|
|
2988
3051
|
status: string;
|
|
2989
3052
|
created_at: number;
|
|
2990
3053
|
finished_at: number | null;
|
|
2991
3054
|
};
|
|
2992
3055
|
|
|
2993
|
-
export type
|
|
2994
|
-
export type
|
|
2995
|
-
create:
|
|
2996
|
-
edit:
|
|
2997
|
-
delete:
|
|
2998
|
-
setAccess:
|
|
2999
|
-
refresh:
|
|
3056
|
+
export type ViewPermissionLevel = 'members' | 'admins';
|
|
3057
|
+
export type ViewPermissionRules = {
|
|
3058
|
+
create: ViewPermissionLevel;
|
|
3059
|
+
edit: ViewPermissionLevel;
|
|
3060
|
+
delete: ViewPermissionLevel;
|
|
3061
|
+
setAccess: ViewPermissionLevel;
|
|
3062
|
+
refresh: ViewPermissionLevel;
|
|
3000
3063
|
};
|
|
3001
3064
|
|
|
3002
3065
|
/**
|
|
@@ -3170,6 +3233,49 @@ export class DeeplineClient {
|
|
|
3170
3233
|
{ role: grants.join(',') },
|
|
3171
3234
|
),
|
|
3172
3235
|
create: (options) => this.createWorkspace(options),
|
|
3236
|
+
serviceAccounts: {
|
|
3237
|
+
list: () => this.http.get('/api/v2/auth/workspace/service-accounts'),
|
|
3238
|
+
// Creating an account or a key is not idempotent, so a transport
|
|
3239
|
+
// retry or localhost failover after a lost response could report a
|
|
3240
|
+
// false failure or mint a second live key. Surface the ambiguity;
|
|
3241
|
+
// `list` shows what exists.
|
|
3242
|
+
create: (options) =>
|
|
3243
|
+
this.http.post(
|
|
3244
|
+
'/api/v2/auth/workspace/service-accounts',
|
|
3245
|
+
options,
|
|
3246
|
+
undefined,
|
|
3247
|
+
{ maxRetries: 0, exactUrlOnly: true },
|
|
3248
|
+
),
|
|
3249
|
+
setRole: (serviceAccountId, role) =>
|
|
3250
|
+
this.http.patch(
|
|
3251
|
+
`/api/v2/auth/workspace/service-accounts/${encodeURIComponent(serviceAccountId)}`,
|
|
3252
|
+
{ role },
|
|
3253
|
+
),
|
|
3254
|
+
delete: (serviceAccountId) =>
|
|
3255
|
+
this.http.delete(
|
|
3256
|
+
`/api/v2/auth/workspace/service-accounts/${encodeURIComponent(serviceAccountId)}`,
|
|
3257
|
+
),
|
|
3258
|
+
createKey: (serviceAccountId) =>
|
|
3259
|
+
this.http.post(
|
|
3260
|
+
`/api/v2/auth/workspace/service-accounts/${encodeURIComponent(serviceAccountId)}/keys`,
|
|
3261
|
+
{},
|
|
3262
|
+
undefined,
|
|
3263
|
+
{ maxRetries: 0, exactUrlOnly: true },
|
|
3264
|
+
),
|
|
3265
|
+
// A retried rotate after a lost response would revoke the key it
|
|
3266
|
+
// just issued, so it is not retried either.
|
|
3267
|
+
rotateKey: (serviceAccountId) =>
|
|
3268
|
+
this.http.post(
|
|
3269
|
+
`/api/v2/auth/workspace/service-accounts/${encodeURIComponent(serviceAccountId)}/keys/rotate`,
|
|
3270
|
+
{},
|
|
3271
|
+
undefined,
|
|
3272
|
+
{ maxRetries: 0, exactUrlOnly: true },
|
|
3273
|
+
),
|
|
3274
|
+
revokeKey: (serviceAccountId, keyId) =>
|
|
3275
|
+
this.http.delete(
|
|
3276
|
+
`/api/v2/auth/workspace/service-accounts/${encodeURIComponent(serviceAccountId)}/keys/${encodeURIComponent(keyId)}`,
|
|
3277
|
+
),
|
|
3278
|
+
},
|
|
3173
3279
|
};
|
|
3174
3280
|
this.monitors = {
|
|
3175
3281
|
status: () => this.getMonitorsAccess(),
|
|
@@ -3384,40 +3490,40 @@ export class DeeplineClient {
|
|
|
3384
3490
|
}
|
|
3385
3491
|
|
|
3386
3492
|
// ——————————————————————————————————————————————————————————
|
|
3387
|
-
//
|
|
3493
|
+
// Views
|
|
3388
3494
|
// ——————————————————————————————————————————————————————————
|
|
3389
3495
|
|
|
3390
|
-
/** List this workspace's
|
|
3391
|
-
async
|
|
3496
|
+
/** List this workspace's views, most recently changed first. */
|
|
3497
|
+
async listViews(input?: {
|
|
3392
3498
|
cursor?: string;
|
|
3393
3499
|
limit?: number;
|
|
3394
|
-
}): Promise<{
|
|
3500
|
+
}): Promise<{ views: View[]; next_cursor: string | null }> {
|
|
3395
3501
|
const params = new URLSearchParams();
|
|
3396
3502
|
if (input?.cursor) params.set('cursor', input.cursor);
|
|
3397
3503
|
if (input?.limit) params.set('limit', String(input.limit));
|
|
3398
3504
|
const query = params.size > 0 ? `?${params}` : '';
|
|
3399
|
-
return await this.http.get(`/api/v2/
|
|
3505
|
+
return await this.http.get(`/api/v2/views${query}`);
|
|
3400
3506
|
}
|
|
3401
3507
|
|
|
3402
|
-
/** One
|
|
3403
|
-
async
|
|
3404
|
-
return await this.http.get<
|
|
3405
|
-
`/api/v2/
|
|
3508
|
+
/** One view and what the caller may do with it. */
|
|
3509
|
+
async getView(id: string): Promise<ViewDetail> {
|
|
3510
|
+
return await this.http.get<ViewDetail>(
|
|
3511
|
+
`/api/v2/views/${encodeURIComponent(id)}`,
|
|
3406
3512
|
);
|
|
3407
3513
|
}
|
|
3408
3514
|
|
|
3409
|
-
/** Create
|
|
3410
|
-
async
|
|
3515
|
+
/** Create a view that shows a Play's runs at a fixed URL. */
|
|
3516
|
+
async createView(input: {
|
|
3411
3517
|
name: string;
|
|
3412
3518
|
play: string;
|
|
3413
3519
|
input?: Record<string, unknown>;
|
|
3414
3520
|
description?: string;
|
|
3415
|
-
}): Promise<
|
|
3416
|
-
return await this.http.post<
|
|
3521
|
+
}): Promise<View> {
|
|
3522
|
+
return await this.http.post<View>('/api/v2/views', input);
|
|
3417
3523
|
}
|
|
3418
3524
|
|
|
3419
3525
|
/** Change the name, description, Play, or saved input. */
|
|
3420
|
-
async
|
|
3526
|
+
async updateView(
|
|
3421
3527
|
id: string,
|
|
3422
3528
|
input: {
|
|
3423
3529
|
name?: string;
|
|
@@ -3425,78 +3531,78 @@ export class DeeplineClient {
|
|
|
3425
3531
|
play?: string;
|
|
3426
3532
|
input?: Record<string, unknown>;
|
|
3427
3533
|
},
|
|
3428
|
-
): Promise<
|
|
3429
|
-
return await this.http.patch<
|
|
3430
|
-
`/api/v2/
|
|
3534
|
+
): Promise<View> {
|
|
3535
|
+
return await this.http.patch<View>(
|
|
3536
|
+
`/api/v2/views/${encodeURIComponent(id)}`,
|
|
3431
3537
|
input,
|
|
3432
3538
|
);
|
|
3433
3539
|
}
|
|
3434
3540
|
|
|
3435
|
-
/** Who can open
|
|
3436
|
-
async
|
|
3541
|
+
/** Who can open a view: workspace members, or anyone with its URL. */
|
|
3542
|
+
async setViewAccess(
|
|
3437
3543
|
id: string,
|
|
3438
|
-
access:
|
|
3439
|
-
): Promise<
|
|
3440
|
-
return await this.http.post<
|
|
3441
|
-
`/api/v2/
|
|
3544
|
+
access: ViewAccess,
|
|
3545
|
+
): Promise<View> {
|
|
3546
|
+
return await this.http.post<View>(
|
|
3547
|
+
`/api/v2/views/${encodeURIComponent(id)}/access`,
|
|
3442
3548
|
{ access },
|
|
3443
3549
|
);
|
|
3444
3550
|
}
|
|
3445
3551
|
|
|
3446
|
-
/** Every run of the
|
|
3447
|
-
async
|
|
3552
|
+
/** Every run of the view's Play, newest first. */
|
|
3553
|
+
async listViewRuns(
|
|
3448
3554
|
id: string,
|
|
3449
3555
|
input?: { limit?: number; offset?: number },
|
|
3450
|
-
): Promise<{ runs:
|
|
3556
|
+
): Promise<{ runs: ViewRunSummary[]; total: number }> {
|
|
3451
3557
|
const params = new URLSearchParams();
|
|
3452
3558
|
if (input?.limit) params.set('limit', String(input.limit));
|
|
3453
3559
|
if (input?.offset) params.set('offset', String(input.offset));
|
|
3454
3560
|
const query = params.size > 0 ? `?${params}` : '';
|
|
3455
3561
|
return await this.http.get(
|
|
3456
|
-
`/api/v2/
|
|
3562
|
+
`/api/v2/views/${encodeURIComponent(id)}/runs${query}`,
|
|
3457
3563
|
);
|
|
3458
3564
|
}
|
|
3459
3565
|
|
|
3460
3566
|
/**
|
|
3461
|
-
* Refresh
|
|
3462
|
-
* goes through the normal run API; the
|
|
3567
|
+
* Refresh a view: run its Play with its saved input (or `input`). The run
|
|
3568
|
+
* goes through the normal run API; the view shows it when it finishes.
|
|
3463
3569
|
*/
|
|
3464
|
-
async
|
|
3570
|
+
async refreshView(
|
|
3465
3571
|
id: string,
|
|
3466
3572
|
input?: Record<string, unknown>,
|
|
3467
|
-
): Promise<PlayRunStart & {
|
|
3573
|
+
): Promise<PlayRunStart & { view: string }> {
|
|
3468
3574
|
const intent = await this.http.post<{
|
|
3469
3575
|
id: string;
|
|
3470
3576
|
play: string;
|
|
3471
3577
|
input: Record<string, unknown>;
|
|
3472
|
-
}>(`/api/v2/
|
|
3578
|
+
}>(`/api/v2/views/${encodeURIComponent(id)}/refresh`, {});
|
|
3473
3579
|
const started = await this.startPlayRun({
|
|
3474
3580
|
name: intent.play,
|
|
3475
3581
|
input: input ?? intent.input,
|
|
3476
3582
|
});
|
|
3477
|
-
return { ...started,
|
|
3583
|
+
return { ...started, view: intent.id };
|
|
3478
3584
|
}
|
|
3479
3585
|
|
|
3480
|
-
/** Delete
|
|
3481
|
-
async
|
|
3586
|
+
/** Delete a view. Its Play and runs are not touched. */
|
|
3587
|
+
async deleteView(id: string): Promise<{ id: string; deleted: boolean }> {
|
|
3482
3588
|
return await this.http.delete(
|
|
3483
|
-
`/api/v2/
|
|
3589
|
+
`/api/v2/views/${encodeURIComponent(id)}`,
|
|
3484
3590
|
);
|
|
3485
3591
|
}
|
|
3486
3592
|
|
|
3487
|
-
/** The workspace
|
|
3488
|
-
async
|
|
3489
|
-
rules:
|
|
3490
|
-
can:
|
|
3593
|
+
/** The workspace view rules and what the caller may do. */
|
|
3594
|
+
async getViewPermissions(): Promise<{
|
|
3595
|
+
rules: ViewPermissionRules;
|
|
3596
|
+
can: ViewAbilities | null;
|
|
3491
3597
|
}> {
|
|
3492
|
-
return await this.http.get('/api/v2/
|
|
3598
|
+
return await this.http.get('/api/v2/views/permissions');
|
|
3493
3599
|
}
|
|
3494
3600
|
|
|
3495
|
-
/** Change
|
|
3496
|
-
async
|
|
3497
|
-
rules: Partial<
|
|
3498
|
-
): Promise<{ rules:
|
|
3499
|
-
return await this.http.put('/api/v2/
|
|
3601
|
+
/** Change view rules. Admins only; omitted verbs keep their rule. */
|
|
3602
|
+
async setViewPermissions(
|
|
3603
|
+
rules: Partial<ViewPermissionRules>,
|
|
3604
|
+
): Promise<{ rules: ViewPermissionRules }> {
|
|
3605
|
+
return await this.http.put('/api/v2/views/permissions', { rules });
|
|
3500
3606
|
}
|
|
3501
3607
|
|
|
3502
3608
|
/** List secret metadata visible to the current workspace. */
|
|
@@ -5876,6 +5982,18 @@ export class DeeplineClient {
|
|
|
5876
5982
|
return this.http.get('/api/v2/settings/notifications');
|
|
5877
5983
|
}
|
|
5878
5984
|
|
|
5985
|
+
/** Fresh balance of the active workspace's own provider credential. */
|
|
5986
|
+
async getIntegrationBalance(provider: string): Promise<{
|
|
5987
|
+
provider: string;
|
|
5988
|
+
credentialScope: 'customer';
|
|
5989
|
+
unit: string;
|
|
5990
|
+
observedAt: string;
|
|
5991
|
+
balance: { value: number; status: 'reported'; source: string };
|
|
5992
|
+
}> {
|
|
5993
|
+
const params = new URLSearchParams({ provider });
|
|
5994
|
+
return this.http.get(`/api/v2/integrations/balance?${params}`);
|
|
5995
|
+
}
|
|
5996
|
+
|
|
5879
5997
|
/** Get the dashboard link where a workspace owner or admin can connect a provider. */
|
|
5880
5998
|
async getIntegrationConnectLink(
|
|
5881
5999
|
provider: string,
|
|
@@ -131,6 +131,9 @@ export type {
|
|
|
131
131
|
BillingUsageOptions,
|
|
132
132
|
BillingUsageResult,
|
|
133
133
|
WorkspaceCreateResult,
|
|
134
|
+
WorkspaceServiceAccount,
|
|
135
|
+
WorkspaceServiceAccountKey,
|
|
136
|
+
WorkspaceServiceAccountsNamespace,
|
|
134
137
|
WorkspacesNamespace,
|
|
135
138
|
MonitorsNamespace,
|
|
136
139
|
MonitorsAccessStatus,
|
|
@@ -205,7 +205,7 @@ export const SDK_RELEASE = {
|
|
|
205
205
|
// getters keep their established compatibility behavior.
|
|
206
206
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
207
207
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
208
|
-
version: '0.3.
|
|
208
|
+
version: '0.3.524',
|
|
209
209
|
updateSummary: {
|
|
210
210
|
introducedIn: '0.3.90',
|
|
211
211
|
summary:
|
|
@@ -103,13 +103,16 @@ function errorMessage(error: unknown): string {
|
|
|
103
103
|
// The transient side reuses the SAME classification the rest of the ingestion
|
|
104
104
|
// stack already treats as repairable (permission-denied / role drift / conn
|
|
105
105
|
// resets), so the worker never disagrees with the route on "transient".
|
|
106
|
+
function inboundFailureCode(error: unknown): string {
|
|
107
|
+
return error && typeof error === 'object'
|
|
108
|
+
? String((error as { code?: unknown }).code ?? '')
|
|
109
|
+
: '';
|
|
110
|
+
}
|
|
111
|
+
|
|
106
112
|
export function classifyInboundFailure(error: unknown): InboundFailureClass {
|
|
107
113
|
if (isRepairableTenantDataPlaneError(error)) return 'transient';
|
|
108
114
|
|
|
109
|
-
const code =
|
|
110
|
-
error && typeof error === 'object'
|
|
111
|
-
? String((error as { code?: unknown }).code ?? '')
|
|
112
|
-
: '';
|
|
115
|
+
const code = inboundFailureCode(error);
|
|
113
116
|
const transientCodes = new Set([
|
|
114
117
|
'tenant_data_plane_repair_required',
|
|
115
118
|
// An admission-backed callback whose Convex binding has not landed yet.
|
|
@@ -284,9 +287,7 @@ export async function recordSignalRadarDeadLetter(input: {
|
|
|
284
287
|
FOR UPDATE`,
|
|
285
288
|
[message.deadLetterId],
|
|
286
289
|
);
|
|
287
|
-
const existing = (prior.rows ?? [])[0] as
|
|
288
|
-
| { status?: unknown }
|
|
289
|
-
| undefined;
|
|
290
|
+
const existing = (prior.rows ?? [])[0] as { status?: unknown } | undefined;
|
|
290
291
|
if (existing) {
|
|
291
292
|
const nextStatus = transitionSignalRadarInboundDeadLetterStatus(
|
|
292
293
|
existing.status,
|
|
@@ -400,20 +401,65 @@ export function inboundBackoffSeconds(deliveryCount: number): number {
|
|
|
400
401
|
return Math.min(300, 2 ** exponent * 5);
|
|
401
402
|
}
|
|
402
403
|
|
|
404
|
+
/**
|
|
405
|
+
* How long a callback whose monitor binding cannot be proven keeps retrying
|
|
406
|
+
* (KAR-189). A binding that is only syncing lands within minutes: the 2026-11-10
|
|
407
|
+
* bulk burst resolved in at most three attempts. One that never lands used to
|
|
408
|
+
* retry until the queue dropped the message after seven days, payload and all.
|
|
409
|
+
* Past this age it dead-letters instead, payload kept and redrivable, well
|
|
410
|
+
* inside the queue's retention.
|
|
411
|
+
*/
|
|
412
|
+
export const PROVIDER_MONITOR_CONTROL_STATE_PENDING_RETRY_WINDOW_MS =
|
|
413
|
+
24 * 60 * 60 * 1000;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* The one terminal rule for both inbound delivery paths, the queue handler and
|
|
417
|
+
* the receipt dispatcher. A permanent failure dead-letters once its delivery
|
|
418
|
+
* budget is spent. A transient one keeps retrying, except a pending monitor
|
|
419
|
+
* binding, which also dead-letters once it is older than its retry window.
|
|
420
|
+
*/
|
|
421
|
+
export function inboundFailureNeedsDeadLetter(input: {
|
|
422
|
+
error: unknown;
|
|
423
|
+
deliveryCount: number;
|
|
424
|
+
maxDeliveries: number;
|
|
425
|
+
receivedAt: string;
|
|
426
|
+
now: number;
|
|
427
|
+
}): boolean {
|
|
428
|
+
if (input.deliveryCount <= input.maxDeliveries) return false;
|
|
429
|
+
if (classifyInboundFailure(input.error) === 'permanent') return true;
|
|
430
|
+
if (
|
|
431
|
+
inboundFailureCode(input.error) !==
|
|
432
|
+
PROVIDER_MONITOR_CONTROL_STATE_PENDING_CODE
|
|
433
|
+
) {
|
|
434
|
+
return false;
|
|
435
|
+
}
|
|
436
|
+
const receivedAt = Date.parse(input.receivedAt);
|
|
437
|
+
// An unreadable receipt time cannot prove the callback is still young. The
|
|
438
|
+
// dead letter keeps its payload, so ending the retries loses nothing.
|
|
439
|
+
return (
|
|
440
|
+
!Number.isFinite(receivedAt) ||
|
|
441
|
+
input.now - receivedAt >=
|
|
442
|
+
PROVIDER_MONITOR_CONTROL_STATE_PENDING_RETRY_WINDOW_MS
|
|
443
|
+
);
|
|
444
|
+
}
|
|
445
|
+
|
|
403
446
|
export async function resolveInboundRetryDecision(input: {
|
|
404
447
|
client: InboundPgClient;
|
|
405
448
|
message: DeadLetterMessageInput;
|
|
406
449
|
error: unknown;
|
|
407
450
|
deliveryCount: number;
|
|
408
451
|
maxDeliveries: number;
|
|
452
|
+
now?: number;
|
|
409
453
|
}): Promise<InboundRetryDecision> {
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
454
|
+
if (
|
|
455
|
+
!inboundFailureNeedsDeadLetter({
|
|
456
|
+
error: input.error,
|
|
457
|
+
deliveryCount: input.deliveryCount,
|
|
458
|
+
maxDeliveries: input.maxDeliveries,
|
|
459
|
+
receivedAt: input.message.receivedAt,
|
|
460
|
+
now: input.now ?? Date.now(),
|
|
461
|
+
})
|
|
462
|
+
) {
|
|
417
463
|
return { afterSeconds: inboundBackoffSeconds(input.deliveryCount) };
|
|
418
464
|
}
|
|
419
465
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
classifyInboundFailure,
|
|
3
2
|
inboundBackoffSeconds,
|
|
3
|
+
inboundFailureNeedsDeadLetter,
|
|
4
4
|
} from '@deepline/monitors/signal-radars/inbound-dead-letter';
|
|
5
5
|
import type { SignalRadarInboundMessage } from '@deepline/monitors/signal-radars/inbound-message';
|
|
6
6
|
|
|
@@ -27,13 +27,19 @@ export async function handleSignalRadarInboundDelivery(input: {
|
|
|
27
27
|
error: unknown;
|
|
28
28
|
deliveryCount: number;
|
|
29
29
|
}) => Promise<void>;
|
|
30
|
+
now?: () => number;
|
|
30
31
|
}) {
|
|
31
32
|
try {
|
|
32
33
|
await input.runWorker(input.message, input.metadata);
|
|
33
34
|
} catch (error) {
|
|
34
35
|
if (
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
inboundFailureNeedsDeadLetter({
|
|
37
|
+
error,
|
|
38
|
+
deliveryCount: input.metadata.deliveryCount,
|
|
39
|
+
maxDeliveries: input.maxDeliveries,
|
|
40
|
+
receivedAt: input.message.receivedAt,
|
|
41
|
+
now: (input.now ?? Date.now)(),
|
|
42
|
+
})
|
|
37
43
|
) {
|
|
38
44
|
try {
|
|
39
45
|
await input.recordDeadLetter({
|
|
@@ -1245,7 +1245,7 @@
|
|
|
1245
1245
|
"owner": "billing",
|
|
1246
1246
|
"criticality": "operational",
|
|
1247
1247
|
"purpose": "Request workspace drains for indexed pending usage from closed UTC days, including late arrivals.",
|
|
1248
|
-
"successDefinition": "Discovery reaches the end of the indexed pending workspaces and issues closed-day wake requests. Each invocation inspects at most
|
|
1248
|
+
"successDefinition": "Discovery reaches the end of the indexed pending workspaces and issues closed-day wake requests. Each invocation inspects at most 200 workspaces.",
|
|
1249
1249
|
"failureDefinition": "Discovery or wake dispatch fails, or the bounded pass stops before reaching the end. The next invocation resumes from its saved workspace cursor.",
|
|
1250
1250
|
"startGraceMs": 120000,
|
|
1251
1251
|
"runTimeoutMs": 420000,
|