deepline 0.3.523 → 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 +60 -60
- 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 +359 -22
- 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/cli/auth-OKPHHMMP.js +43 -0
- package/dist/cli/{auth-ENQUQS56.mjs → auth-QXJMVLPN.mjs} +5 -5
- package/dist/cli/{billing-6HONTJOY.js → billing-N5R4HTHT.js} +82 -82
- package/dist/cli/{billing-6A27ULCX.mjs → billing-SNSIFM4B.mjs} +7 -7
- package/dist/cli/{chunk-326WVSWS.js → chunk-2ZWNIS54.js} +98 -98
- package/dist/cli/{chunk-JGZQBDYG.mjs → chunk-2ZX7XSAQ.mjs} +4 -4
- package/dist/cli/{chunk-6DBRBWHC.mjs → chunk-3WWTBQHC.mjs} +2 -2
- package/dist/cli/{chunk-KILRUAXF.mjs → chunk-536TGWR6.mjs} +1 -1
- package/dist/cli/{chunk-MZROKQV3.js → chunk-66N76YZG.js} +44 -44
- package/dist/cli/{chunk-IEVXYHGJ.js → chunk-7E6B7VMS.js} +5 -5
- package/dist/cli/{chunk-QYXIODWH.js → chunk-7OQGZBDG.js} +31 -23
- package/dist/cli/{chunk-4NWY7JBB.js → chunk-7QM6DNR4.js} +11 -11
- package/dist/cli/{chunk-HUC5SGJQ.js → chunk-ANKD3AIR.js} +2 -2
- package/dist/cli/{chunk-2BRDHM4S.js → chunk-ATATJNJ6.js} +9 -9
- package/dist/cli/{chunk-QSAC3IVI.mjs → chunk-BXIQD2IY.mjs} +1 -1
- package/dist/cli/{chunk-S4YKRH3W.js → chunk-BXVYVIMB.js} +3 -3
- package/dist/cli/{chunk-NWTMQGPP.mjs → chunk-CH7JVSA7.mjs} +6 -6
- package/dist/cli/{chunk-4V63IJCL.mjs → chunk-EO55Y4QW.mjs} +5 -5
- package/dist/cli/{chunk-FBMOBNJY.js → chunk-EQNAQENZ.js} +2 -2
- package/dist/cli/{chunk-QOO5W5XS.mjs → chunk-FXTV5B3D.mjs} +10 -10
- package/dist/cli/{chunk-HSVGP4CI.mjs → chunk-GMO3JDZA.mjs} +2 -2
- package/dist/cli/{chunk-V46J3UTM.js → chunk-GTGJBZVH.js} +7 -7
- package/dist/cli/{chunk-WVQOXYTQ.mjs → chunk-HLAFGQPV.mjs} +33 -33
- package/dist/cli/{chunk-PESMXAUG.js → chunk-HTYT2OHB.js} +6 -6
- package/dist/cli/{chunk-ZWN4RXC2.js → chunk-I75VRGQG.js} +22 -22
- package/dist/cli/{chunk-PCORO245.mjs → chunk-II3BJKCH.mjs} +2 -2
- package/dist/cli/{chunk-WGVJA4I5.js → chunk-JDIQBZ6O.js} +14 -14
- package/dist/cli/{chunk-UH3EAFFN.mjs → chunk-KKPBCB6D.mjs} +2 -2
- package/dist/cli/{chunk-RKREB7MU.mjs → chunk-KSQXBLRW.mjs} +3 -3
- package/dist/cli/{chunk-36LQQL5C.js → chunk-LRWDZDBS.js} +5 -5
- package/dist/cli/{chunk-SXTVJIGB.mjs → chunk-MW3YMPD2.mjs} +1 -1
- package/dist/cli/{chunk-5WFQXAD4.mjs → chunk-NUC7ZVDG.mjs} +5 -5
- package/dist/cli/{chunk-UQN4VTZL.js → chunk-OCT4SUJA.js} +4 -4
- package/dist/cli/{chunk-JCTTXLAZ.mjs → chunk-OQ5G7RFQ.mjs} +1 -1
- package/dist/cli/{chunk-XVXEARHC.js → chunk-PFKKZVFK.js} +41 -41
- package/dist/cli/{chunk-F3WRLFFM.mjs → chunk-PFKWKWUJ.mjs} +2 -2
- package/dist/cli/{chunk-I62LJ7NU.mjs → chunk-R457IMHJ.mjs} +1 -1
- package/dist/cli/{chunk-JVEFMOY2.mjs → chunk-RIX26ZJD.mjs} +1 -1
- package/dist/cli/{chunk-QMBL5ZIQ.mjs → chunk-RTDX5NNN.mjs} +3 -3
- package/dist/cli/{chunk-K326BEVR.js → chunk-RUULUCBP.js} +10 -10
- package/dist/cli/{chunk-MCXPJYBN.js → chunk-SF4QJVBE.js} +3 -3
- package/dist/cli/{chunk-HUIFUE4L.js → chunk-SMWFOGUT.js} +53 -53
- package/dist/cli/{chunk-LZL6V5M5.mjs → chunk-T43FF5PF.mjs} +2 -2
- package/dist/cli/{chunk-JMMNCJ7Z.js → chunk-TZTWH53O.js} +1 -1
- package/dist/cli/{chunk-U6DLLV3S.mjs → chunk-V2YIBBVT.mjs} +1 -1
- package/dist/cli/{chunk-XYL26236.js → chunk-V4RJ57MA.js} +2 -2
- package/dist/cli/{chunk-N5MLEXZ7.js → chunk-V7KUBDEB.js} +39 -39
- package/dist/cli/{chunk-MT3WG3KR.js → chunk-VHTVXS5A.js} +16 -16
- package/dist/cli/{chunk-H7275EZU.mjs → chunk-WCVIPZWX.mjs} +5 -5
- package/dist/cli/{chunk-SBGKKOCC.js → chunk-WOEPDSO3.js} +26 -26
- package/dist/cli/{chunk-MHTRYBXY.mjs → chunk-XURWFEXM.mjs} +31 -23
- package/dist/cli/{chunk-7M5FRSFP.mjs → chunk-YCIXY66B.mjs} +2 -2
- package/dist/cli/{chunk-6OZ2WSHD.mjs → chunk-YGOI5ZE5.mjs} +1 -1
- package/dist/cli/{chunk-DNXP3D5H.mjs → chunk-YKFW3NNA.mjs} +5 -5
- package/dist/cli/{chunk-7GNKAACY.js → chunk-YXVYPYIP.js} +6 -6
- package/dist/cli/{chunk-RQN4PHRE.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-YFJ2JLUP.mjs → csv-HT2JBCW2.mjs} +4 -4
- package/dist/cli/{csv-UBACJK75.js → csv-Q2LWKXAV.js} +13 -13
- package/dist/cli/{db-NKGYTAQO.mjs → db-CS3XQ2LX.mjs} +6 -6
- package/dist/cli/{db-2ZPA2LZ7.js → db-XEV4WEE4.js} +27 -27
- package/dist/cli/describe-5G5NXO5E.js +50 -0
- package/dist/cli/{describe-GX7DRKWZ.mjs → describe-OUTXLDGZ.mjs} +18 -18
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-NXMRGPIL.js → executions-JCC34WAD.js} +8 -8
- package/dist/cli/{executions-HTHQ7KKD.mjs → executions-L6XFG5MP.mjs} +6 -6
- package/dist/cli/{feedback-USP4T34P.mjs → feedback-AWBDO5I6.mjs} +5 -5
- package/dist/cli/{feedback-TGVQACRO.js → feedback-HV2M2G7N.js} +10 -10
- package/dist/cli/git-GDPTG52F.js +25 -0
- package/dist/cli/{git-KUONEHCD.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-B2GMHU42.mjs → legacy-noops-7MOKBL4O.mjs} +6 -6
- package/dist/cli/{legacy-noops-2JY3CQ24.js → legacy-noops-RGSZUD6V.js} +9 -9
- package/dist/cli/{monitors-XI6I52AX.js → monitors-JEFM2C5W.js} +100 -100
- package/dist/cli/{monitors-2OVBZJ6Z.mjs → monitors-XQNXDZPQ.mjs} +7 -7
- package/dist/cli/{org-5TUQ2H6Y.js → org-GYLA5V32.js} +86 -86
- package/dist/cli/{org-BNJW764Y.mjs → org-KTMJZGTN.mjs} +6 -6
- package/dist/cli/{pages-UXCLX53Y.js → pages-RY4U7OCL.js} +18 -18
- package/dist/cli/{pages-QC3TQIPW.mjs → pages-WOMU2T2O.mjs} +6 -6
- package/dist/cli/{play-KRWMZ7FG.js → play-2Q6MWJ3D.js} +363 -323
- package/dist/cli/{play-45PPG5SZ.mjs → play-KOYGGNYS.mjs} +64 -24
- package/dist/cli/{providers-JDT35MRL.mjs → providers-7YKDITJC.mjs} +6 -6
- package/dist/cli/{providers-RBUJ72Y3.js → providers-HOIRHMN2.js} +9 -9
- package/dist/cli/{quickstart-JZ4Q3HFT.js → quickstart-OWCJOSQA.js} +6 -6
- package/dist/cli/{quickstart-GD2SWGAC.mjs → quickstart-RDXHSMVX.mjs} +4 -4
- package/dist/cli/{run-JEAHA367.js → run-MT2ABKO5.js} +41 -41
- package/dist/cli/{run-KIZ3HBI2.mjs → run-RT73NDP5.mjs} +23 -23
- package/dist/cli/search-7VBA6IGS.js +33 -0
- package/dist/cli/{search-5UFNXHFK.mjs → search-CJPKIGSA.mjs} +8 -8
- package/dist/cli/{search-output-HAXPKQO6.mjs → search-output-AREMA544.mjs} +4 -4
- package/dist/cli/{search-output-W3RDSVLE.js → search-output-OSBZ7WK6.js} +6 -6
- package/dist/cli/{secrets-JAWT66B2.mjs → secrets-BTIY2FEJ.mjs} +6 -6
- package/dist/cli/{secrets-PC7C2Q32.js → secrets-OV6KH633.js} +15 -15
- package/dist/cli/{sessions-325V7G35.mjs → sessions-3CO3ZFOD.mjs} +6 -6
- package/dist/cli/sessions-B3WNEWRW.js +18 -0
- package/dist/cli/{settings-FKHTA65P.mjs → settings-7BQIC7QN.mjs} +13 -13
- package/dist/cli/{settings-RGU6Y2QR.js → settings-LBIECYDB.js} +86 -86
- package/dist/cli/{setup-ZMZ7HU2I.js → setup-QZE7QR3F.js} +50 -50
- package/dist/cli/{setup-43GOYTFC.mjs → setup-XPTSNNES.mjs} +10 -10
- package/dist/cli/{skills-Q2VAHSXM.mjs → skills-TGGKIQLT.mjs} +8 -8
- package/dist/cli/skills-TXBRTWEV.js +37 -0
- package/dist/cli/{tools-BUH7ZWDS.mjs → tools-MKIFX2TQ.mjs} +17 -17
- package/dist/cli/tools-RZJV4X3J.js +57 -0
- package/dist/cli/{update-JFALWOHD.mjs → update-5R3D3WNH.mjs} +10 -10
- package/dist/cli/update-YWGGPWUA.js +35 -0
- package/dist/cli/{artifacts-RBHR2DG4.mjs → views-VHKDHHUP.mjs} +76 -76
- package/dist/cli/views-VPWEINIA.js +270 -0
- package/dist/cli/{workflow-YELST32A.js → workflow-7K2VEQ4V.js} +17 -17
- package/dist/cli/{workflow-ISJKLY6X.mjs → workflow-D5DF65N6.mjs} +7 -7
- package/dist/{client-C2N7MofG.d.mts → client-C5_6W8yd.d.mts} +1 -1
- package/dist/{client-core-hmhBi7Ib.d.ts → client-core-B-GPfmaC.d.ts} +43 -43
- package/dist/{client-core-BTkDSKGn.d.mts → client-core-Dob428Z4.d.mts} +43 -43
- package/dist/{client-C7lTRJjw.d.ts → client-iXW4TOat.d.ts} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +110 -110
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- 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 +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/artifacts-RZTS2JHZ.js +0 -270
- package/dist/cli/auth-DPWYFQR5.js +0 -43
- package/dist/cli/describe-WQZF7MEG.js +0 -50
- package/dist/cli/git-X3SCQREB.js +0 -25
- package/dist/cli/search-6JULJMD7.js +0 -33
- package/dist/cli/sessions-WFUCOJHZ.js +0 -18
- package/dist/cli/skills-3XTQ6FFM.js +0 -37
- package/dist/cli/tools-UK2R4YXQ.js +0 -57
- package/dist/cli/update-LNKPHS54.js +0 -35
|
@@ -3019,21 +3019,21 @@ export type HostedPageLink = {
|
|
|
3019
3019
|
created_at: number;
|
|
3020
3020
|
};
|
|
3021
3021
|
|
|
3022
|
-
export type
|
|
3022
|
+
export type ViewAccess = 'workspace' | 'public';
|
|
3023
3023
|
|
|
3024
|
-
export type
|
|
3024
|
+
export type View = {
|
|
3025
3025
|
id: string;
|
|
3026
3026
|
name: string;
|
|
3027
3027
|
description: string | null;
|
|
3028
3028
|
url: string;
|
|
3029
3029
|
play: string;
|
|
3030
3030
|
input: Record<string, unknown>;
|
|
3031
|
-
access:
|
|
3031
|
+
access: ViewAccess;
|
|
3032
3032
|
created_at: number;
|
|
3033
3033
|
updated_at: number;
|
|
3034
3034
|
};
|
|
3035
3035
|
|
|
3036
|
-
export type
|
|
3036
|
+
export type ViewAbilities = {
|
|
3037
3037
|
create: boolean;
|
|
3038
3038
|
edit: boolean;
|
|
3039
3039
|
delete: boolean;
|
|
@@ -3042,24 +3042,24 @@ export type ArtifactAbilities = {
|
|
|
3042
3042
|
admin: boolean;
|
|
3043
3043
|
};
|
|
3044
3044
|
|
|
3045
|
-
export type
|
|
3046
|
-
can:
|
|
3045
|
+
export type ViewDetail = View & {
|
|
3046
|
+
can: ViewAbilities | null;
|
|
3047
3047
|
};
|
|
3048
3048
|
|
|
3049
|
-
export type
|
|
3049
|
+
export type ViewRunSummary = {
|
|
3050
3050
|
run_id: string;
|
|
3051
3051
|
status: string;
|
|
3052
3052
|
created_at: number;
|
|
3053
3053
|
finished_at: number | null;
|
|
3054
3054
|
};
|
|
3055
3055
|
|
|
3056
|
-
export type
|
|
3057
|
-
export type
|
|
3058
|
-
create:
|
|
3059
|
-
edit:
|
|
3060
|
-
delete:
|
|
3061
|
-
setAccess:
|
|
3062
|
-
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;
|
|
3063
3063
|
};
|
|
3064
3064
|
|
|
3065
3065
|
/**
|
|
@@ -3490,40 +3490,40 @@ export class DeeplineClient {
|
|
|
3490
3490
|
}
|
|
3491
3491
|
|
|
3492
3492
|
// ——————————————————————————————————————————————————————————
|
|
3493
|
-
//
|
|
3493
|
+
// Views
|
|
3494
3494
|
// ——————————————————————————————————————————————————————————
|
|
3495
3495
|
|
|
3496
|
-
/** List this workspace's
|
|
3497
|
-
async
|
|
3496
|
+
/** List this workspace's views, most recently changed first. */
|
|
3497
|
+
async listViews(input?: {
|
|
3498
3498
|
cursor?: string;
|
|
3499
3499
|
limit?: number;
|
|
3500
|
-
}): Promise<{
|
|
3500
|
+
}): Promise<{ views: View[]; next_cursor: string | null }> {
|
|
3501
3501
|
const params = new URLSearchParams();
|
|
3502
3502
|
if (input?.cursor) params.set('cursor', input.cursor);
|
|
3503
3503
|
if (input?.limit) params.set('limit', String(input.limit));
|
|
3504
3504
|
const query = params.size > 0 ? `?${params}` : '';
|
|
3505
|
-
return await this.http.get(`/api/v2/
|
|
3505
|
+
return await this.http.get(`/api/v2/views${query}`);
|
|
3506
3506
|
}
|
|
3507
3507
|
|
|
3508
|
-
/** One
|
|
3509
|
-
async
|
|
3510
|
-
return await this.http.get<
|
|
3511
|
-
`/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)}`,
|
|
3512
3512
|
);
|
|
3513
3513
|
}
|
|
3514
3514
|
|
|
3515
|
-
/** Create
|
|
3516
|
-
async
|
|
3515
|
+
/** Create a view that shows a Play's runs at a fixed URL. */
|
|
3516
|
+
async createView(input: {
|
|
3517
3517
|
name: string;
|
|
3518
3518
|
play: string;
|
|
3519
3519
|
input?: Record<string, unknown>;
|
|
3520
3520
|
description?: string;
|
|
3521
|
-
}): Promise<
|
|
3522
|
-
return await this.http.post<
|
|
3521
|
+
}): Promise<View> {
|
|
3522
|
+
return await this.http.post<View>('/api/v2/views', input);
|
|
3523
3523
|
}
|
|
3524
3524
|
|
|
3525
3525
|
/** Change the name, description, Play, or saved input. */
|
|
3526
|
-
async
|
|
3526
|
+
async updateView(
|
|
3527
3527
|
id: string,
|
|
3528
3528
|
input: {
|
|
3529
3529
|
name?: string;
|
|
@@ -3531,78 +3531,78 @@ export class DeeplineClient {
|
|
|
3531
3531
|
play?: string;
|
|
3532
3532
|
input?: Record<string, unknown>;
|
|
3533
3533
|
},
|
|
3534
|
-
): Promise<
|
|
3535
|
-
return await this.http.patch<
|
|
3536
|
-
`/api/v2/
|
|
3534
|
+
): Promise<View> {
|
|
3535
|
+
return await this.http.patch<View>(
|
|
3536
|
+
`/api/v2/views/${encodeURIComponent(id)}`,
|
|
3537
3537
|
input,
|
|
3538
3538
|
);
|
|
3539
3539
|
}
|
|
3540
3540
|
|
|
3541
|
-
/** Who can open
|
|
3542
|
-
async
|
|
3541
|
+
/** Who can open a view: workspace members, or anyone with its URL. */
|
|
3542
|
+
async setViewAccess(
|
|
3543
3543
|
id: string,
|
|
3544
|
-
access:
|
|
3545
|
-
): Promise<
|
|
3546
|
-
return await this.http.post<
|
|
3547
|
-
`/api/v2/
|
|
3544
|
+
access: ViewAccess,
|
|
3545
|
+
): Promise<View> {
|
|
3546
|
+
return await this.http.post<View>(
|
|
3547
|
+
`/api/v2/views/${encodeURIComponent(id)}/access`,
|
|
3548
3548
|
{ access },
|
|
3549
3549
|
);
|
|
3550
3550
|
}
|
|
3551
3551
|
|
|
3552
|
-
/** Every run of the
|
|
3553
|
-
async
|
|
3552
|
+
/** Every run of the view's Play, newest first. */
|
|
3553
|
+
async listViewRuns(
|
|
3554
3554
|
id: string,
|
|
3555
3555
|
input?: { limit?: number; offset?: number },
|
|
3556
|
-
): Promise<{ runs:
|
|
3556
|
+
): Promise<{ runs: ViewRunSummary[]; total: number }> {
|
|
3557
3557
|
const params = new URLSearchParams();
|
|
3558
3558
|
if (input?.limit) params.set('limit', String(input.limit));
|
|
3559
3559
|
if (input?.offset) params.set('offset', String(input.offset));
|
|
3560
3560
|
const query = params.size > 0 ? `?${params}` : '';
|
|
3561
3561
|
return await this.http.get(
|
|
3562
|
-
`/api/v2/
|
|
3562
|
+
`/api/v2/views/${encodeURIComponent(id)}/runs${query}`,
|
|
3563
3563
|
);
|
|
3564
3564
|
}
|
|
3565
3565
|
|
|
3566
3566
|
/**
|
|
3567
|
-
* Refresh
|
|
3568
|
-
* 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.
|
|
3569
3569
|
*/
|
|
3570
|
-
async
|
|
3570
|
+
async refreshView(
|
|
3571
3571
|
id: string,
|
|
3572
3572
|
input?: Record<string, unknown>,
|
|
3573
|
-
): Promise<PlayRunStart & {
|
|
3573
|
+
): Promise<PlayRunStart & { view: string }> {
|
|
3574
3574
|
const intent = await this.http.post<{
|
|
3575
3575
|
id: string;
|
|
3576
3576
|
play: string;
|
|
3577
3577
|
input: Record<string, unknown>;
|
|
3578
|
-
}>(`/api/v2/
|
|
3578
|
+
}>(`/api/v2/views/${encodeURIComponent(id)}/refresh`, {});
|
|
3579
3579
|
const started = await this.startPlayRun({
|
|
3580
3580
|
name: intent.play,
|
|
3581
3581
|
input: input ?? intent.input,
|
|
3582
3582
|
});
|
|
3583
|
-
return { ...started,
|
|
3583
|
+
return { ...started, view: intent.id };
|
|
3584
3584
|
}
|
|
3585
3585
|
|
|
3586
|
-
/** Delete
|
|
3587
|
-
async
|
|
3586
|
+
/** Delete a view. Its Play and runs are not touched. */
|
|
3587
|
+
async deleteView(id: string): Promise<{ id: string; deleted: boolean }> {
|
|
3588
3588
|
return await this.http.delete(
|
|
3589
|
-
`/api/v2/
|
|
3589
|
+
`/api/v2/views/${encodeURIComponent(id)}`,
|
|
3590
3590
|
);
|
|
3591
3591
|
}
|
|
3592
3592
|
|
|
3593
|
-
/** The workspace
|
|
3594
|
-
async
|
|
3595
|
-
rules:
|
|
3596
|
-
can:
|
|
3593
|
+
/** The workspace view rules and what the caller may do. */
|
|
3594
|
+
async getViewPermissions(): Promise<{
|
|
3595
|
+
rules: ViewPermissionRules;
|
|
3596
|
+
can: ViewAbilities | null;
|
|
3597
3597
|
}> {
|
|
3598
|
-
return await this.http.get('/api/v2/
|
|
3598
|
+
return await this.http.get('/api/v2/views/permissions');
|
|
3599
3599
|
}
|
|
3600
3600
|
|
|
3601
|
-
/** Change
|
|
3602
|
-
async
|
|
3603
|
-
rules: Partial<
|
|
3604
|
-
): Promise<{ rules:
|
|
3605
|
-
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 });
|
|
3606
3606
|
}
|
|
3607
3607
|
|
|
3608
3608
|
/** List secret metadata visible to the current workspace. */
|
|
@@ -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,
|