deepline 0.3.510 → 0.3.512
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 +159 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +39 -3
- package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +9 -3
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +35 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +241 -34
- package/dist/cli/artifacts-5IGM3EYP.js +268 -0
- package/dist/cli/artifacts-YSYWQFQQ.mjs +268 -0
- package/dist/cli/{auth-USS2W3UV.mjs → auth-4MVWCUXS.mjs} +5 -5
- package/dist/cli/auth-M3AJBJ3O.js +43 -0
- package/dist/cli/{billing-LQQHU443.js → billing-OYYHWNVS.js} +82 -82
- package/dist/cli/{billing-JCUWM5XB.mjs → billing-SZXRENPC.mjs} +7 -7
- package/dist/cli/{chunk-RHKFNEV2.mjs → chunk-2BS6BRGH.mjs} +2 -2
- package/dist/cli/{chunk-WAOLTP6R.mjs → chunk-2R6M62UO.mjs} +2 -2
- package/dist/cli/{chunk-YYUVOUEH.mjs → chunk-32UMZXCZ.mjs} +5 -5
- package/dist/cli/{chunk-7BF4R26M.mjs → chunk-3INAN6EK.mjs} +3 -3
- package/dist/cli/{chunk-BPGFNVH2.js → chunk-4DSRBHN6.js} +44 -44
- package/dist/cli/{chunk-EEQ2QQOH.js → chunk-4QR64X2S.js} +10 -10
- package/dist/cli/{chunk-JY73USD7.js → chunk-4ZDHGAE6.js} +2 -2
- package/dist/cli/{chunk-KXSOZYCS.mjs → chunk-5XLU47DG.mjs} +1 -1
- package/dist/cli/{chunk-ZRACZKEE.mjs → chunk-77DPQI6W.mjs} +62 -0
- package/dist/cli/{chunk-YDALHHUC.js → chunk-7U3WY2F3.js} +53 -53
- package/dist/cli/{chunk-DMF56C6D.mjs → chunk-AATUAFD2.mjs} +2 -2
- package/dist/cli/{chunk-XJZU7KO4.js → chunk-AVYI522S.js} +5 -5
- package/dist/cli/{chunk-LF3FF2B2.js → chunk-BP4XEO6Z.js} +1 -1
- package/dist/cli/{chunk-7VT7RMZ2.mjs → chunk-DJ4FD5DR.mjs} +2 -2
- package/dist/cli/{chunk-CLV4T5FN.mjs → chunk-EQAKPIGI.mjs} +2 -2
- package/dist/cli/{chunk-XK3AJFYQ.js → chunk-FF25PDQ2.js} +62 -0
- package/dist/cli/{chunk-B6Q6BHSY.mjs → chunk-FJPJ6SO3.mjs} +2 -2
- package/dist/cli/{chunk-UV524JZ5.mjs → chunk-GJMIW4Q6.mjs} +1 -1
- package/dist/cli/{chunk-5MYXW6M6.mjs → chunk-HA5NSCTH.mjs} +2 -2
- package/dist/cli/{chunk-63DHG7BM.js → chunk-HCMFRAYT.js} +26 -26
- package/dist/cli/{chunk-FND6GZZ4.mjs → chunk-I6OK54YK.mjs} +5 -5
- package/dist/cli/{chunk-F6IXWFPF.js → chunk-IMC2HQ6V.js} +6 -6
- package/dist/cli/{chunk-DEPBCRKG.mjs → chunk-JDD6OLWN.mjs} +3 -3
- package/dist/cli/{chunk-EJ57CA2L.mjs → chunk-JH7JISQ2.mjs} +1 -1
- package/dist/cli/{chunk-XRLE2FPE.js → chunk-JKLFRDQ6.js} +6 -6
- package/dist/cli/{chunk-7VQKU6MS.js → chunk-JU35QU3Z.js} +270 -199
- package/dist/cli/{chunk-ZCYV6MZH.js → chunk-KBM5T6UV.js} +5 -5
- package/dist/cli/{chunk-VPJSQMWQ.js → chunk-L7CAOWHY.js} +3 -3
- package/dist/cli/{chunk-B2U3LVSO.mjs → chunk-LYOWQKGN.mjs} +1 -1
- package/dist/cli/{chunk-HOKOJGQW.mjs → chunk-MQ5GBB7V.mjs} +1 -1
- package/dist/cli/{chunk-OEG6VCK4.mjs → chunk-MTSHUN2R.mjs} +72 -1
- package/dist/cli/{chunk-ASBWPRBN.js → chunk-O24VWLOY.js} +16 -16
- package/dist/cli/{chunk-HC27PYJM.js → chunk-OU6AK63V.js} +2 -2
- package/dist/cli/{chunk-563HM4D2.mjs → chunk-P3RYPSOQ.mjs} +6 -6
- package/dist/cli/{chunk-6AL2VF3E.js → chunk-PJCPFF7J.js} +14 -14
- package/dist/cli/{chunk-4ZIIS6KG.js → chunk-Q72Q3ZWB.js} +9 -9
- package/dist/cli/{chunk-JNECQ5QF.js → chunk-RR6G6ZCT.js} +11 -11
- package/dist/cli/{chunk-Q5EJO4TE.mjs → chunk-RXZRZEW7.mjs} +5 -5
- package/dist/cli/{chunk-WC5754QJ.mjs → chunk-T3SUWKUT.mjs} +5 -5
- package/dist/cli/{chunk-QRQBKLOM.js → chunk-TKN2TRW5.js} +3 -3
- package/dist/cli/{chunk-PQ56GE55.mjs → chunk-TNQ5MF6K.mjs} +1 -1
- package/dist/cli/{chunk-B2T7PBS6.js → chunk-V6FQRUPJ.js} +41 -41
- package/dist/cli/{chunk-3LXU22UZ.js → chunk-VGCNLFER.js} +2 -2
- package/dist/cli/{chunk-XL4FFVWL.js → chunk-VZN6D23P.js} +7 -7
- package/dist/cli/{chunk-5N2HFB3G.js → chunk-W7DAWILZ.js} +16 -16
- package/dist/cli/{chunk-2JXEZAJF.js → chunk-WDCOUJQ5.js} +21 -21
- package/dist/cli/{chunk-FFPLCSTZ.mjs → chunk-XKFWY4IK.mjs} +10 -10
- package/dist/cli/{chunk-V6DLYRSO.mjs → chunk-YJN55ZWG.mjs} +1 -1
- package/dist/cli/{chunk-JVEU6MXD.mjs → chunk-YNMHIJC5.mjs} +1 -1
- package/dist/cli/{chunk-N7FV7OM3.js → chunk-ZLHIQU2G.js} +96 -96
- package/dist/cli/{chunk-5DU7RXDW.mjs → chunk-ZVYMGTZ7.mjs} +4 -4
- package/dist/cli/{chunk-4NJK6P5T.js → chunk-ZZ7SVWKR.js} +4 -4
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-MTFVEDPU.mjs → csv-AY4KT3NZ.mjs} +4 -4
- package/dist/cli/{csv-UXFQZLZM.js → csv-YR2E5HNM.js} +13 -13
- package/dist/cli/{db-3WPUYCCI.mjs → db-IMYD3OCM.mjs} +6 -6
- package/dist/cli/{db-RGWT6B7K.js → db-YKV6564I.js} +27 -27
- package/dist/cli/{describe-XJY5654F.mjs → describe-72GI2Q6T.mjs} +18 -18
- package/dist/cli/describe-UFGHQBM7.js +50 -0
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-PDE4V5YH.mjs → executions-2YO6KIP3.mjs} +6 -6
- package/dist/cli/{executions-IWTALFNB.js → executions-OSNL5CSU.js} +8 -8
- package/dist/cli/{feedback-BMOVTPC4.mjs → feedback-SYDNAT62.mjs} +5 -5
- package/dist/cli/{feedback-I72P4XZS.js → feedback-WSA7YTKS.js} +10 -10
- package/dist/cli/{git-QJG3EF4P.mjs → git-WBH7N3EF.mjs} +5 -5
- package/dist/cli/git-YYOW4CYQ.js +25 -0
- package/dist/cli/index.js +148 -144
- package/dist/cli/index.mjs +47 -43
- package/dist/cli/{legacy-noops-5P75CQC7.js → legacy-noops-BZPLWY5C.js} +9 -9
- package/dist/cli/{legacy-noops-MZ45GDMK.mjs → legacy-noops-USZM4ZXF.mjs} +6 -6
- package/dist/cli/{monitors-VIOBUG2X.mjs → monitors-6HOZMLEV.mjs} +7 -7
- package/dist/cli/{monitors-5PHQZDZM.js → monitors-XHXAMMYC.js} +100 -100
- package/dist/cli/{org-B5LDVP2P.js → org-BAAOAZF3.js} +72 -72
- package/dist/cli/{org-D5RTFJNY.mjs → org-LT3DICB4.mjs} +6 -6
- package/dist/cli/{pages-BUJYG3JL.js → pages-7NP4PKLA.js} +18 -18
- package/dist/cli/{pages-XWZL3YV2.mjs → pages-MOCSTZZQ.mjs} +6 -6
- package/dist/cli/{play-SEC3EE7H.js → play-CGUL22GL.js} +317 -317
- package/dist/cli/{play-OSXLGCLZ.mjs → play-MGJ7B7RL.mjs} +18 -18
- package/dist/cli/{providers-RQPUASLI.js → providers-5LCUHKX2.js} +9 -9
- package/dist/cli/{providers-ENSURIW6.mjs → providers-AOWBHJ24.mjs} +6 -6
- package/dist/cli/{quickstart-XDTU4MAT.js → quickstart-7YZUT7GO.js} +6 -6
- package/dist/cli/{quickstart-HJTK6XWI.mjs → quickstart-Z6NA2CCM.mjs} +4 -4
- package/dist/cli/{run-ZMWSQAR2.mjs → run-7QGBNUKE.mjs} +23 -23
- package/dist/cli/{run-GX2SU5AT.js → run-M66ILCWL.js} +41 -41
- package/dist/cli/search-OZQH5VMI.js +33 -0
- package/dist/cli/{search-DZHZBHWT.mjs → search-Z2T3B4V4.mjs} +8 -8
- package/dist/cli/{search-output-3JVZERNV.js → search-output-6OHPSJGK.js} +6 -6
- package/dist/cli/{search-output-MNHAR754.mjs → search-output-MLHVBRIR.mjs} +4 -4
- package/dist/cli/{secrets-WO2LMDQ2.js → secrets-T7MW2DMK.js} +15 -15
- package/dist/cli/{secrets-VALVNVXB.mjs → secrets-VBSILT5H.mjs} +6 -6
- package/dist/cli/{sessions-EPYCH3AY.mjs → sessions-KNITGDLS.mjs} +6 -6
- package/dist/cli/sessions-XKEIBOTP.js +18 -0
- package/dist/cli/{settings-W2ABZUD4.mjs → settings-NBZRRKZS.mjs} +13 -13
- package/dist/cli/{settings-OSF4O5HM.js → settings-OSEBDBKR.js} +86 -86
- package/dist/cli/{setup-DCXNQG6R.js → setup-7DZPC6FC.js} +50 -50
- package/dist/cli/{setup-XI2ERSMQ.mjs → setup-WTEQPZ5I.mjs} +10 -10
- package/dist/cli/{skills-ZO4AH2YR.mjs → skills-JMD2MNJZ.mjs} +8 -8
- package/dist/cli/skills-R6RO6MQF.js +37 -0
- package/dist/cli/{tools-FTECXZYA.mjs → tools-LK5BM2Z7.mjs} +17 -17
- package/dist/cli/tools-NBBDUNPR.js +57 -0
- package/dist/cli/update-BI2ABPGX.js +35 -0
- package/dist/cli/{update-WPFZO2JE.mjs → update-IVUSIA2E.mjs} +10 -10
- package/dist/cli/{workflow-7X75IP3D.mjs → workflow-4QP6G54M.mjs} +7 -7
- package/dist/cli/{workflow-PKMU33LV.js → workflow-GY374FMJ.js} +17 -17
- package/dist/{client-DMpsMNH9.d.mts → client-By7bUS8h.d.mts} +1 -1
- package/dist/{client-BlwD-G4v.d.ts → client-CmlKSBXd.d.ts} +1 -1
- package/dist/{client-core-DwBLuEkm.d.ts → client-core-BM0mKhgp.d.ts} +93 -1
- package/dist/{client-core-CITtRTbB.d.mts → client-core-BZ3tpY_J.d.mts} +93 -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 -108
- 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/dist/viewer/viewer.js +16 -7
- package/package.json +1 -1
- package/dist/cli/auth-S2Z5YMU3.js +0 -43
- package/dist/cli/describe-LNCLA2LA.js +0 -50
- package/dist/cli/git-QWH7SPGF.js +0 -25
- package/dist/cli/search-7WPABWYO.js +0 -33
- package/dist/cli/sessions-2IA2DGWO.js +0 -18
- package/dist/cli/skills-QMD2WARJ.js +0 -37
- package/dist/cli/tools-53E6GBQU.js +0 -57
- package/dist/cli/update-PPPNR6J5.js +0 -35
|
@@ -2956,6 +2956,49 @@ export type HostedPageLink = {
|
|
|
2956
2956
|
created_at: number;
|
|
2957
2957
|
};
|
|
2958
2958
|
|
|
2959
|
+
export type ArtifactAccess = 'workspace' | 'public';
|
|
2960
|
+
|
|
2961
|
+
export type Artifact = {
|
|
2962
|
+
id: string;
|
|
2963
|
+
name: string;
|
|
2964
|
+
description: string | null;
|
|
2965
|
+
url: string;
|
|
2966
|
+
play: string;
|
|
2967
|
+
input: Record<string, unknown>;
|
|
2968
|
+
access: ArtifactAccess;
|
|
2969
|
+
created_at: number;
|
|
2970
|
+
updated_at: number;
|
|
2971
|
+
};
|
|
2972
|
+
|
|
2973
|
+
export type ArtifactAbilities = {
|
|
2974
|
+
create: boolean;
|
|
2975
|
+
edit: boolean;
|
|
2976
|
+
delete: boolean;
|
|
2977
|
+
setAccess: boolean;
|
|
2978
|
+
refresh: boolean;
|
|
2979
|
+
admin: boolean;
|
|
2980
|
+
};
|
|
2981
|
+
|
|
2982
|
+
export type ArtifactDetail = Artifact & {
|
|
2983
|
+
can: ArtifactAbilities | null;
|
|
2984
|
+
};
|
|
2985
|
+
|
|
2986
|
+
export type ArtifactRunSummary = {
|
|
2987
|
+
run_id: string;
|
|
2988
|
+
status: string;
|
|
2989
|
+
created_at: number;
|
|
2990
|
+
finished_at: number | null;
|
|
2991
|
+
};
|
|
2992
|
+
|
|
2993
|
+
export type ArtifactPermissionLevel = 'members' | 'admins';
|
|
2994
|
+
export type ArtifactPermissionRules = {
|
|
2995
|
+
create: ArtifactPermissionLevel;
|
|
2996
|
+
edit: ArtifactPermissionLevel;
|
|
2997
|
+
delete: ArtifactPermissionLevel;
|
|
2998
|
+
setAccess: ArtifactPermissionLevel;
|
|
2999
|
+
refresh: ArtifactPermissionLevel;
|
|
3000
|
+
};
|
|
3001
|
+
|
|
2959
3002
|
/**
|
|
2960
3003
|
* Low-level typed REST client with authentication, retries, and localhost failover.
|
|
2961
3004
|
*
|
|
@@ -3340,6 +3383,122 @@ export class DeeplineClient {
|
|
|
3340
3383
|
);
|
|
3341
3384
|
}
|
|
3342
3385
|
|
|
3386
|
+
// ——————————————————————————————————————————————————————————
|
|
3387
|
+
// Artifacts
|
|
3388
|
+
// ——————————————————————————————————————————————————————————
|
|
3389
|
+
|
|
3390
|
+
/** List this workspace's artifacts, most recently changed first. */
|
|
3391
|
+
async listArtifacts(input?: {
|
|
3392
|
+
cursor?: string;
|
|
3393
|
+
limit?: number;
|
|
3394
|
+
}): Promise<{ artifacts: Artifact[]; next_cursor: string | null }> {
|
|
3395
|
+
const params = new URLSearchParams();
|
|
3396
|
+
if (input?.cursor) params.set('cursor', input.cursor);
|
|
3397
|
+
if (input?.limit) params.set('limit', String(input.limit));
|
|
3398
|
+
const query = params.size > 0 ? `?${params}` : '';
|
|
3399
|
+
return await this.http.get(`/api/v2/artifacts${query}`);
|
|
3400
|
+
}
|
|
3401
|
+
|
|
3402
|
+
/** One artifact and what the caller may do with it. */
|
|
3403
|
+
async getArtifact(id: string): Promise<ArtifactDetail> {
|
|
3404
|
+
return await this.http.get<ArtifactDetail>(
|
|
3405
|
+
`/api/v2/artifacts/${encodeURIComponent(id)}`,
|
|
3406
|
+
);
|
|
3407
|
+
}
|
|
3408
|
+
|
|
3409
|
+
/** Create an artifact that shows a Play's runs at a fixed URL. */
|
|
3410
|
+
async createArtifact(input: {
|
|
3411
|
+
name: string;
|
|
3412
|
+
play: string;
|
|
3413
|
+
input?: Record<string, unknown>;
|
|
3414
|
+
description?: string;
|
|
3415
|
+
}): Promise<Artifact> {
|
|
3416
|
+
return await this.http.post<Artifact>('/api/v2/artifacts', input);
|
|
3417
|
+
}
|
|
3418
|
+
|
|
3419
|
+
/** Change the name, description, Play, or saved input. */
|
|
3420
|
+
async updateArtifact(
|
|
3421
|
+
id: string,
|
|
3422
|
+
input: {
|
|
3423
|
+
name?: string;
|
|
3424
|
+
description?: string | null;
|
|
3425
|
+
play?: string;
|
|
3426
|
+
input?: Record<string, unknown>;
|
|
3427
|
+
},
|
|
3428
|
+
): Promise<Artifact> {
|
|
3429
|
+
return await this.http.patch<Artifact>(
|
|
3430
|
+
`/api/v2/artifacts/${encodeURIComponent(id)}`,
|
|
3431
|
+
input,
|
|
3432
|
+
);
|
|
3433
|
+
}
|
|
3434
|
+
|
|
3435
|
+
/** Who can open an artifact: workspace members, or anyone with its URL. */
|
|
3436
|
+
async setArtifactAccess(
|
|
3437
|
+
id: string,
|
|
3438
|
+
access: ArtifactAccess,
|
|
3439
|
+
): Promise<Artifact> {
|
|
3440
|
+
return await this.http.post<Artifact>(
|
|
3441
|
+
`/api/v2/artifacts/${encodeURIComponent(id)}/access`,
|
|
3442
|
+
{ access },
|
|
3443
|
+
);
|
|
3444
|
+
}
|
|
3445
|
+
|
|
3446
|
+
/** Every run of the artifact's Play, newest first. */
|
|
3447
|
+
async listArtifactRuns(
|
|
3448
|
+
id: string,
|
|
3449
|
+
input?: { limit?: number; offset?: number },
|
|
3450
|
+
): Promise<{ runs: ArtifactRunSummary[]; total: number }> {
|
|
3451
|
+
const params = new URLSearchParams();
|
|
3452
|
+
if (input?.limit) params.set('limit', String(input.limit));
|
|
3453
|
+
if (input?.offset) params.set('offset', String(input.offset));
|
|
3454
|
+
const query = params.size > 0 ? `?${params}` : '';
|
|
3455
|
+
return await this.http.get(
|
|
3456
|
+
`/api/v2/artifacts/${encodeURIComponent(id)}/runs${query}`,
|
|
3457
|
+
);
|
|
3458
|
+
}
|
|
3459
|
+
|
|
3460
|
+
/**
|
|
3461
|
+
* Refresh an artifact: run its Play with its saved input (or `input`). The run
|
|
3462
|
+
* goes through the normal run API; the artifact shows it when it finishes.
|
|
3463
|
+
*/
|
|
3464
|
+
async refreshArtifact(
|
|
3465
|
+
id: string,
|
|
3466
|
+
input?: Record<string, unknown>,
|
|
3467
|
+
): Promise<PlayRunStart & { artifact: string }> {
|
|
3468
|
+
const intent = await this.http.post<{
|
|
3469
|
+
id: string;
|
|
3470
|
+
play: string;
|
|
3471
|
+
input: Record<string, unknown>;
|
|
3472
|
+
}>(`/api/v2/artifacts/${encodeURIComponent(id)}/refresh`, {});
|
|
3473
|
+
const started = await this.startPlayRun({
|
|
3474
|
+
name: intent.play,
|
|
3475
|
+
input: input ?? intent.input,
|
|
3476
|
+
});
|
|
3477
|
+
return { ...started, artifact: intent.id };
|
|
3478
|
+
}
|
|
3479
|
+
|
|
3480
|
+
/** Delete an artifact. Its Play and runs are not touched. */
|
|
3481
|
+
async deleteArtifact(id: string): Promise<{ id: string; deleted: boolean }> {
|
|
3482
|
+
return await this.http.delete(
|
|
3483
|
+
`/api/v2/artifacts/${encodeURIComponent(id)}`,
|
|
3484
|
+
);
|
|
3485
|
+
}
|
|
3486
|
+
|
|
3487
|
+
/** The workspace artifact rules and what the caller may do. */
|
|
3488
|
+
async getArtifactPermissions(): Promise<{
|
|
3489
|
+
rules: ArtifactPermissionRules;
|
|
3490
|
+
can: ArtifactAbilities | null;
|
|
3491
|
+
}> {
|
|
3492
|
+
return await this.http.get('/api/v2/artifacts/permissions');
|
|
3493
|
+
}
|
|
3494
|
+
|
|
3495
|
+
/** Change artifact rules. Admins only; omitted verbs keep their rule. */
|
|
3496
|
+
async setArtifactPermissions(
|
|
3497
|
+
rules: Partial<ArtifactPermissionRules>,
|
|
3498
|
+
): Promise<{ rules: ArtifactPermissionRules }> {
|
|
3499
|
+
return await this.http.put('/api/v2/artifacts/permissions', { rules });
|
|
3500
|
+
}
|
|
3501
|
+
|
|
3343
3502
|
/** List secret metadata visible to the current workspace. */
|
|
3344
3503
|
async listSecrets(): Promise<PlaySecretMetadata[]> {
|
|
3345
3504
|
const response = await this.http.get<{ secrets?: PlaySecretMetadata[] }>(
|
|
@@ -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.512',
|
|
209
209
|
updateSummary: {
|
|
210
210
|
introducedIn: '0.3.90',
|
|
211
211
|
summary:
|
|
@@ -1234,6 +1234,24 @@
|
|
|
1234
1234
|
"failureAlert": "convex_action_wrapper",
|
|
1235
1235
|
"domainReportRequired": true
|
|
1236
1236
|
},
|
|
1237
|
+
{
|
|
1238
|
+
"id": "convex.sweep-closed-day-usage-rollups",
|
|
1239
|
+
"name": "Sweep closed-day usage rollups",
|
|
1240
|
+
"scheduler": "convex_cron",
|
|
1241
|
+
"cadence": "12 0 * * *",
|
|
1242
|
+
"timezone": "UTC",
|
|
1243
|
+
"source": "packages/convex/crons.ts",
|
|
1244
|
+
"locator": "sweep closed-day usage rollups",
|
|
1245
|
+
"owner": "billing",
|
|
1246
|
+
"criticality": "operational",
|
|
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 1,000 workspaces.",
|
|
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
|
+
"startGraceMs": 120000,
|
|
1251
|
+
"runTimeoutMs": 420000,
|
|
1252
|
+
"failureAlert": "convex_action_wrapper",
|
|
1253
|
+
"domainReportRequired": true
|
|
1254
|
+
},
|
|
1237
1255
|
{
|
|
1238
1256
|
"id": "convex.cleanup-expired-org-day-usage-shards",
|
|
1239
1257
|
"name": "Cleanup expired org-day usage shards",
|
|
@@ -1400,20 +1418,38 @@
|
|
|
1400
1418
|
"id": "convex.refresh-tool-usage-popularity",
|
|
1401
1419
|
"name": "Refresh tool usage popularity",
|
|
1402
1420
|
"scheduler": "convex_cron",
|
|
1403
|
-
"cadence": "37
|
|
1421
|
+
"cadence": "37 * * * *",
|
|
1404
1422
|
"timezone": "UTC",
|
|
1405
1423
|
"source": "packages/convex/crons.ts",
|
|
1406
1424
|
"locator": "refresh tool usage popularity snapshot",
|
|
1407
1425
|
"owner": "integrations",
|
|
1408
1426
|
"criticality": "operational",
|
|
1409
1427
|
"purpose": "Sum distinct user-days per tool over the last 28 complete UTC days into the snapshot tools search uses as a ranking prior, then delete user-day rows past retention.",
|
|
1410
|
-
"successDefinition": "A
|
|
1411
|
-
"failureDefinition": "
|
|
1428
|
+
"successDefinition": "A complete snapshot is published and up to 2,000 expired user-day records are removed; an empty snapshot is valid before usage is folded.",
|
|
1429
|
+
"failureDefinition": "If a scan exceeds its input budget or any required read or write fails, Search keeps serving the previous snapshot.",
|
|
1412
1430
|
"startGraceMs": 120000,
|
|
1413
1431
|
"runTimeoutMs": 1800000,
|
|
1414
1432
|
"failureAlert": "convex_action_wrapper",
|
|
1415
1433
|
"domainReportRequired": true
|
|
1416
1434
|
},
|
|
1435
|
+
{
|
|
1436
|
+
"id": "convex.publish-shadow-tool-rates",
|
|
1437
|
+
"name": "Publish shadow tool rates",
|
|
1438
|
+
"scheduler": "convex_cron",
|
|
1439
|
+
"cadence": "47 * * * *",
|
|
1440
|
+
"timezone": "UTC",
|
|
1441
|
+
"source": "packages/convex/crons.ts",
|
|
1442
|
+
"locator": "publish shadow tool rates",
|
|
1443
|
+
"owner": "integrations",
|
|
1444
|
+
"criticality": "operational",
|
|
1445
|
+
"purpose": "Apply bounded workspace tool-rate ingress and due changes to the shadow snapshot for parity verification.",
|
|
1446
|
+
"successDefinition": "The leased pass applies all currently due ingress and changes.",
|
|
1447
|
+
"failureDefinition": "A publication batch fails or the bounded pass leaves due work for the next invocation.",
|
|
1448
|
+
"startGraceMs": 120000,
|
|
1449
|
+
"runTimeoutMs": 180000,
|
|
1450
|
+
"failureAlert": "convex_action_wrapper",
|
|
1451
|
+
"domainReportRequired": true
|
|
1452
|
+
},
|
|
1417
1453
|
{
|
|
1418
1454
|
"id": "convex.refresh-prebuilt-play-cost-stats",
|
|
1419
1455
|
"name": "Refresh prebuilt Play cost stats",
|
|
@@ -13,6 +13,7 @@ export const MANUALLY_RUNNABLE_CONVEX_CRON_JOB_IDS = [
|
|
|
13
13
|
'github.credit-purchase-readiness-morning',
|
|
14
14
|
'inngest.play-cron-tick',
|
|
15
15
|
'convex.fold-usage-rollups',
|
|
16
|
+
'convex.sweep-closed-day-usage-rollups',
|
|
16
17
|
'convex.cleanup-expired-org-day-usage-shards',
|
|
17
18
|
'convex.cleanup-expired-mcp-oauth-codes',
|
|
18
19
|
'convex.cleanup-expired-api-key-claims',
|
|
@@ -20,6 +21,7 @@ export const MANUALLY_RUNNABLE_CONVEX_CRON_JOB_IDS = [
|
|
|
20
21
|
'convex.cleanup-expired-analytics-ip2company-cache',
|
|
21
22
|
'convex.cleanup-expired-domain-health-cache',
|
|
22
23
|
'convex.refresh-tool-usage-popularity',
|
|
24
|
+
'convex.publish-shadow-tool-rates',
|
|
23
25
|
'convex.refresh-prebuilt-play-cost-stats',
|
|
24
26
|
'convex.salesforce-oauth-refresh-maintenance',
|
|
25
27
|
'convex.monitor-fleet-convergence-tick',
|
|
@@ -4159,8 +4159,14 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
|
|
|
4159
4159
|
orgId,
|
|
4160
4160
|
semanticKey: input.semanticKey,
|
|
4161
4161
|
invocationId: input.invocationId,
|
|
4162
|
-
runId: this.
|
|
4162
|
+
runId: this.currentReceiptOwnerRunId,
|
|
4163
4163
|
receiptOwnerRunId: this.currentReceiptOwnerRunId,
|
|
4164
|
+
// Launches admitted without run-scoped keys wrote this operation under
|
|
4165
|
+
// the child's composition namespace; recover that row only for the run
|
|
4166
|
+
// that wrote it.
|
|
4167
|
+
...(this.#options.runScopedKeys === true
|
|
4168
|
+
? {}
|
|
4169
|
+
: { legacyOperationRunId: this.currentRunId }),
|
|
4164
4170
|
onLatestPublishSkipped: (event) =>
|
|
4165
4171
|
this.reportSharedReadCachePublishSkipped({
|
|
4166
4172
|
...event,
|
|
@@ -7438,7 +7444,7 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
|
|
|
7438
7444
|
orgId: this.#options.orgId,
|
|
7439
7445
|
toolId: request.toolId,
|
|
7440
7446
|
resultReceiptKey: request.receiptKey,
|
|
7441
|
-
runId: this.
|
|
7447
|
+
runId: this.currentReceiptOwnerRunId,
|
|
7442
7448
|
logicalCallId: request.logicalCallId,
|
|
7443
7449
|
force: request.force === true,
|
|
7444
7450
|
});
|
|
@@ -15178,7 +15184,7 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
|
|
|
15178
15184
|
orgId: this.#options.orgId,
|
|
15179
15185
|
toolId,
|
|
15180
15186
|
resultReceiptKey,
|
|
15181
|
-
runId: this.
|
|
15187
|
+
runId: this.currentReceiptOwnerRunId,
|
|
15182
15188
|
logicalCallId,
|
|
15183
15189
|
force: toolCachePolicy.force,
|
|
15184
15190
|
canStoreResult: this.durableDirectToolResultsBackedByReceipts,
|
|
@@ -247,6 +247,16 @@ export async function executeWithFreshnessReceipt<T>(input: {
|
|
|
247
247
|
* differs for an inline child. Defaults to `runId` (a root run: identical).
|
|
248
248
|
*/
|
|
249
249
|
receiptOwnerRunId?: string;
|
|
250
|
+
/**
|
|
251
|
+
* The run identity older builds derived this operation key from. An inline
|
|
252
|
+
* child's was its composition namespace, which repeats across parent runs,
|
|
253
|
+
* so a later parent run recovered an earlier run's call. New operations are
|
|
254
|
+
* keyed by `runId`, the executing run. A history row under the legacy key is
|
|
255
|
+
* recovered only when the executing run itself wrote it (an in-flight run
|
|
256
|
+
* retried across this build); another run's row is ignored. Omit for a root
|
|
257
|
+
* run (both keys are identical).
|
|
258
|
+
*/
|
|
259
|
+
legacyOperationRunId?: string;
|
|
250
260
|
/**
|
|
251
261
|
* Reports a shared-cache publish that was skipped or failed. The publish is
|
|
252
262
|
* an optimization, so the run proceeds; the caller makes this observable.
|
|
@@ -284,9 +294,26 @@ export async function executeWithFreshnessReceipt<T>(input: {
|
|
|
284
294
|
const semanticHash = sha256Hex(input.semanticKey);
|
|
285
295
|
const cachePrefix = `ctx:${input.orgId}:freshness:${semanticHash}`;
|
|
286
296
|
const latestCacheKey = latestCacheResultKey(input.orgId, input.semanticKey);
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
|
|
297
|
+
const operationKeyFor = (runId: string) =>
|
|
298
|
+
`ctx:${input.orgId}:freshness:operation:${sha256Hex(
|
|
299
|
+
stableStringify({ runId, invocationId: input.invocationId }),
|
|
300
|
+
)}`;
|
|
301
|
+
const operationKey = operationKeyFor(input.runId);
|
|
302
|
+
const legacyOperationKey =
|
|
303
|
+
input.legacyOperationRunId !== undefined &&
|
|
304
|
+
input.legacyOperationRunId !== input.runId
|
|
305
|
+
? operationKeyFor(input.legacyOperationRunId)
|
|
306
|
+
: null;
|
|
307
|
+
/** A legacy-keyed row counts only when this executing run wrote it. */
|
|
308
|
+
const readLegacyOperationWrittenByThisRun = (key: string) =>
|
|
309
|
+
input.withHydration(async (measure) => {
|
|
310
|
+
const receipt = await input.store.get(key);
|
|
311
|
+
measure?.([receipt]);
|
|
312
|
+
const writer = receipt?.leaseOwnerRunId ?? receipt?.runId ?? null;
|
|
313
|
+
return writer === (input.receiptOwnerRunId ?? input.runId)
|
|
314
|
+
? completedCall(receipt)
|
|
315
|
+
: null;
|
|
316
|
+
});
|
|
290
317
|
const read = (key: string) =>
|
|
291
318
|
input.withHydration(async (measure) => {
|
|
292
319
|
const receipt = await input.store.get(key);
|
|
@@ -456,6 +483,11 @@ export async function executeWithFreshnessReceipt<T>(input: {
|
|
|
456
483
|
]);
|
|
457
484
|
if (operation.status === 'rejected') throw operation.reason;
|
|
458
485
|
if (operation.value) return outcome(operation.value, 'operation_recovery');
|
|
486
|
+
if (legacyOperationKey) {
|
|
487
|
+
const legacy =
|
|
488
|
+
await readLegacyOperationWrittenByThisRun(legacyOperationKey);
|
|
489
|
+
if (legacy) return outcome(legacy, 'operation_recovery');
|
|
490
|
+
}
|
|
459
491
|
if (candidateManifests.status === 'rejected') {
|
|
460
492
|
throw candidateManifests.reason;
|
|
461
493
|
}
|
|
@@ -195,6 +195,7 @@ import {
|
|
|
195
195
|
import type { RuntimeTestFaultName } from './runtime-incident-drills';
|
|
196
196
|
import { COMPLETED_RECEIPT_CACHE_INSERT_LEASE_ID } from './durable-receipt-execution';
|
|
197
197
|
import { vercelProtectionBypassHeader } from './vercel-protection';
|
|
198
|
+
import { isRuntimeGatewayLaunchError } from './runtime-gateway-profile';
|
|
198
199
|
import {
|
|
199
200
|
isRuntimePostgresAdmissionError,
|
|
200
201
|
RuntimePostgresAdmission,
|
|
@@ -1080,6 +1081,9 @@ async function postRuntimeApi<TResponse>(
|
|
|
1080
1081
|
if (context.abortSignal?.aborted) {
|
|
1081
1082
|
throw context.abortSignal.reason ?? error;
|
|
1082
1083
|
}
|
|
1084
|
+
// A pinned gateway credential that cannot be minted is deterministic;
|
|
1085
|
+
// it is not a network cut, so retrying only stalls the caller.
|
|
1086
|
+
if (isRuntimeGatewayLaunchError(error)) throw error;
|
|
1083
1087
|
const message = error instanceof Error ? error.message : String(error);
|
|
1084
1088
|
if (response) {
|
|
1085
1089
|
// A status line arrived and then its body failed or stalled. The
|