deepline 0.3.533 → 0.3.535
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 +68 -7
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/call-requeue-state-machine.ts +420 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +677 -26
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +26 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-retry-policy.ts +624 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +26 -0
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +32 -14
- package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +51 -1
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +245 -1
- package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/provider-no-progress.ts +6 -2
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +10 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +55 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +12 -1
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +2 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +101 -0
- package/dist/bundling-sources/shared_libs/plays/share/static-pipeline-summary.ts +63 -13
- package/dist/cli/auth-VDCU3T6A.js +43 -0
- package/dist/cli/{auth-2TZNPIJQ.mjs → auth-ZCTMB5RA.mjs} +5 -5
- package/dist/cli/{billing-HQYTRIV3.js → billing-GVFKZQH3.js} +82 -82
- package/dist/cli/{billing-LR4WJIHO.mjs → billing-OU2ZHL72.mjs} +7 -7
- package/dist/cli/{chunk-HOTJSXLY.js → chunk-243O3FH5.js} +5 -5
- package/dist/cli/{chunk-TU56J4OV.js → chunk-2D6SWQTK.js} +13 -13
- package/dist/cli/{chunk-4YP2YAIZ.js → chunk-4NLRWKZB.js} +26 -26
- package/dist/cli/{chunk-NW736SOD.mjs → chunk-4QELPWUW.mjs} +2 -2
- package/dist/cli/{chunk-LTF2J3JM.js → chunk-5EKNDNFQ.js} +2 -2
- package/dist/cli/{chunk-VPQDKL5O.js → chunk-6LHX33VN.js} +6 -6
- package/dist/cli/{chunk-LZMRCUVD.mjs → chunk-6TYRRNXY.mjs} +2 -2
- package/dist/cli/{chunk-YZK5RSUL.mjs → chunk-7CWSAEYS.mjs} +1 -1
- package/dist/cli/{chunk-A4JP6RPX.js → chunk-7PXP2FQK.js} +2 -2
- package/dist/cli/{chunk-2TMNRF5R.mjs → chunk-7R5DAANG.mjs} +1 -1
- package/dist/cli/{chunk-NKVW552R.mjs → chunk-AUEUAPVS.mjs} +1 -1
- package/dist/cli/{chunk-3KQBV2CG.mjs → chunk-BF65LB7X.mjs} +3 -3
- package/dist/cli/{chunk-33SNTG5F.js → chunk-CIDATNTY.js} +16 -16
- package/dist/cli/{chunk-O7RSUW75.js → chunk-D4MHCCIR.js} +4 -4
- package/dist/cli/{chunk-5XTXC45Z.js → chunk-DAPKLYST.js} +41 -41
- package/dist/cli/{chunk-USAQ42OG.mjs → chunk-DFJODFMC.mjs} +5 -5
- package/dist/cli/{chunk-KKUOIVQO.mjs → chunk-DWPY6ZID.mjs} +1 -1
- package/dist/cli/{chunk-MNAEALPG.js → chunk-DYIWDUY4.js} +182 -127
- package/dist/cli/{chunk-EVXRQXNV.mjs → chunk-E3CLOVG5.mjs} +47 -0
- package/dist/cli/{chunk-SVVUC3B4.js → chunk-FGN75ZN6.js} +138 -104
- package/dist/cli/{chunk-XZN3DBTP.mjs → chunk-FZKPPB5P.mjs} +40 -6
- package/dist/cli/{chunk-NFDYVMGC.mjs → chunk-G2DLG32W.mjs} +68 -13
- package/dist/cli/{chunk-LZ3PBEQH.mjs → chunk-H6SWS5CG.mjs} +2 -2
- package/dist/cli/{chunk-EYWES7F5.js → chunk-HWPOXCCK.js} +3 -3
- package/dist/cli/{chunk-425ERNBL.js → chunk-HYBZWSSH.js} +44 -44
- package/dist/cli/{chunk-CANHB6DH.mjs → chunk-J75DANZY.mjs} +2 -2
- package/dist/cli/{chunk-CWIGRIIX.mjs → chunk-JQQG4QL4.mjs} +3 -3
- package/dist/cli/{chunk-2UYERVXF.mjs → chunk-JWWYLGUT.mjs} +2 -2
- package/dist/cli/{chunk-735ZOYQN.js → chunk-K3IPGMGP.js} +11 -11
- package/dist/cli/{chunk-VKGNQC2S.mjs → chunk-K53NKWZO.mjs} +5 -5
- package/dist/cli/{chunk-3O3AL5RI.mjs → chunk-K76AEBFY.mjs} +4 -4
- package/dist/cli/{chunk-BWZHMWM5.js → chunk-KA6ZERJL.js} +6 -6
- package/dist/cli/{chunk-4CYNH47Y.js → chunk-KOZBZPRM.js} +53 -53
- package/dist/cli/{chunk-QZWURUBP.js → chunk-KWGXHPHL.js} +7 -7
- package/dist/cli/{chunk-XUX5KGCQ.mjs → chunk-LVISZFYO.mjs} +2 -2
- package/dist/cli/{chunk-B4ZNWXUW.js → chunk-OM732MGV.js} +9 -9
- package/dist/cli/{chunk-352XVCGE.js → chunk-PHLNYBAA.js} +5 -5
- package/dist/cli/{chunk-ZH5HCAN3.js → chunk-PI5R65OQ.js} +1 -1
- package/dist/cli/{chunk-JZ7LJS3P.mjs → chunk-QYBAHYP4.mjs} +6 -6
- package/dist/cli/{chunk-G3GJ3IGU.mjs → chunk-R2KKEHJN.mjs} +5 -5
- package/dist/cli/{chunk-R7YDZSN7.js → chunk-RFQWSH6I.js} +3 -3
- package/dist/cli/{chunk-MKUYZ7LR.mjs → chunk-RKY4LBX3.mjs} +1 -1
- package/dist/cli/{chunk-WF652G74.js → chunk-T7RBM2WX.js} +14 -14
- package/dist/cli/{chunk-G3RVDRYL.mjs → chunk-TCVCFZP6.mjs} +1 -1
- package/dist/cli/{chunk-E4VWBU2E.js → chunk-UUQ2OXMH.js} +16 -16
- package/dist/cli/{chunk-IETLUG4C.mjs → chunk-W5YJYU4G.mjs} +1 -1
- package/dist/cli/{chunk-HPOVAUQF.mjs → chunk-W6T23EUC.mjs} +1 -1
- package/dist/cli/{chunk-BSI7UHQZ.mjs → chunk-WAIBM6KX.mjs} +5 -5
- package/dist/cli/{chunk-4UADZTU5.js → chunk-WNNA4L6Z.js} +22 -22
- package/dist/cli/{chunk-V6LUMGVI.js → chunk-XSOTEVOB.js} +47 -0
- package/dist/cli/{chunk-PIACHLYY.mjs → chunk-YFZLZNTH.mjs} +2 -2
- package/dist/cli/{chunk-274Y66HP.js → chunk-ZUVE63Y7.js} +2 -2
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-MBSCHS4H.js → csv-CD55KEIO.js} +13 -13
- package/dist/cli/{csv-CJKKHGNQ.mjs → csv-CLPVMIRF.mjs} +4 -4
- package/dist/cli/{db-EAFR6N45.mjs → db-AU4SMWUN.mjs} +6 -6
- package/dist/cli/{db-45HNPCY3.js → db-MQKLDAEO.js} +27 -27
- package/dist/cli/describe-5BFNHT5V.js +50 -0
- package/dist/cli/{describe-IXW3LDGC.mjs → describe-AWJUXE2U.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-SZAES2S4.js → executions-77GOLWRM.js} +8 -8
- package/dist/cli/{executions-ZATZV7O6.mjs → executions-TFIJPUX7.mjs} +6 -6
- package/dist/cli/{feedback-NY63KEK2.mjs → feedback-2WRSZ5WL.mjs} +6 -6
- package/dist/cli/{feedback-KXLF4GR4.js → feedback-OV5YAL3A.js} +14 -14
- package/dist/cli/git-HGMX52XU.js +25 -0
- package/dist/cli/{git-BSSSTR6N.mjs → git-VNS4ATLZ.mjs} +5 -5
- package/dist/cli/index.js +145 -145
- package/dist/cli/index.mjs +44 -44
- package/dist/cli/{legacy-noops-CYF6DJBF.mjs → legacy-noops-C732QDCY.mjs} +6 -6
- package/dist/cli/{legacy-noops-XQANGML3.js → legacy-noops-HDOB5C6F.js} +9 -9
- package/dist/cli/{monitors-ABJVLWIP.mjs → monitors-2LYEFXOU.mjs} +7 -7
- package/dist/cli/{monitors-F3PTNP45.js → monitors-5IUMHH3E.js} +100 -100
- package/dist/cli/{org-WQAPZI5Q.js → org-ADW2EVAC.js} +86 -86
- package/dist/cli/{org-BHF6Y5R7.mjs → org-G4YGZPHS.mjs} +6 -6
- package/dist/cli/{pages-W4HWVJUG.mjs → pages-KXKWSCEV.mjs} +6 -6
- package/dist/cli/{pages-U3EJ2NPL.js → pages-VTJGAI2D.js} +18 -18
- package/dist/cli/{play-3T4X3ZKH.mjs → play-7GQ56C2D.mjs} +69 -22
- package/dist/cli/{play-2UHKONON.js → play-EHSOSSHT.js} +367 -320
- package/dist/cli/{providers-LUK5LIUA.js → providers-PWCF6OOO.js} +9 -9
- package/dist/cli/{providers-2G2VTNDG.mjs → providers-WL3YTCSV.mjs} +6 -6
- package/dist/cli/{quickstart-XP4PJZ7N.mjs → quickstart-323XOPGI.mjs} +4 -4
- package/dist/cli/{quickstart-76P6PGID.js → quickstart-ZKI5MURA.js} +6 -6
- package/dist/cli/{run-S2KHGBCM.js → run-XZPWA6JS.js} +41 -41
- package/dist/cli/{run-ACIHA53A.mjs → run-ZCNZU3K2.mjs} +23 -23
- package/dist/cli/{search-VFIJCUZL.mjs → search-CVLVSFMJ.mjs} +8 -8
- package/dist/cli/search-J6EY7DQN.js +33 -0
- package/dist/cli/{search-output-2KFLZS5F.mjs → search-output-6PY6RN2R.mjs} +4 -4
- package/dist/cli/{search-output-GV7NNB4X.js → search-output-7HRSSRBS.js} +6 -6
- package/dist/cli/{secrets-MAQLBVC4.mjs → secrets-6S2ZWDIM.mjs} +6 -6
- package/dist/cli/{secrets-KJSFEW2F.js → secrets-IYD5VKY4.js} +15 -15
- package/dist/cli/sessions-7HPIVSQ4.js +22 -0
- package/dist/cli/{sessions-G5MWNJ75.mjs → sessions-GVEX5TUJ.mjs} +6 -6
- package/dist/cli/{settings-MR6UFOK5.mjs → settings-BN5MJZ3C.mjs} +13 -13
- package/dist/cli/{settings-VXGRPFXP.js → settings-CANK4HJQ.js} +86 -86
- package/dist/cli/{setup-ZOBXMONM.mjs → setup-JNMSCCU4.mjs} +10 -10
- package/dist/cli/{setup-C74BRK7N.js → setup-YSGKGLSJ.js} +50 -50
- package/dist/cli/{skills-4CG3MHOY.mjs → skills-QCQN2UM2.mjs} +8 -8
- package/dist/cli/skills-WDGSSKJZ.js +37 -0
- package/dist/cli/{tools-YXCXZ4ZD.mjs → tools-CDPOID7V.mjs} +17 -17
- package/dist/cli/tools-URNVXSTZ.js +57 -0
- package/dist/cli/{update-Z3C5W3I4.mjs → update-D3ZERUQ3.mjs} +10 -10
- package/dist/cli/update-Q6JW32IA.js +35 -0
- package/dist/cli/{views-XGP2GZ52.js → views-4NV2KQKA.js} +18 -18
- package/dist/cli/{views-45B2FZQT.mjs → views-RDZRWQBQ.mjs} +6 -6
- package/dist/cli/{workflow-KQRWSNBH.mjs → workflow-2CG3TVCG.mjs} +7 -7
- package/dist/cli/{workflow-DWO35XHZ.js → workflow-RABJCAZC.js} +17 -17
- package/dist/{client-Bd2meveV.d.mts → client-DhSvMO3A.d.mts} +1 -1
- package/dist/{client-core-CGj8V9mw.d.mts → client-core-CVG1Et-4.d.mts} +41 -2
- package/dist/{client-core-CsRRWCFy.d.ts → client-core-CdWH6Sii.d.ts} +41 -2
- package/dist/{client-CBCVhL8U.d.ts → client-oGNJMQFd.d.ts} +1 -1
- package/dist/{compiler-manifest-DsxsQP-T.d.ts → compiler-manifest-D2ZlBGxj.d.mts} +44 -0
- package/dist/{compiler-manifest-DsxsQP-T.d.mts → compiler-manifest-D2ZlBGxj.d.ts} +44 -0
- package/dist/{errors-qdJUVQ3g.d.mts → errors-B-gOQdj-.d.mts} +1 -1
- package/dist/{errors-Bk5h1D-C.d.ts → errors-CB0KAmmV.d.ts} +1 -1
- package/dist/{index-PaupwX1B.d.mts → index-BbJADro4.d.mts} +1 -1
- package/dist/{index-bL66eHYz.d.ts → index-c3nvUGCS.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 +118 -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 +52 -0
- 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/auth-KE6RFHUE.js +0 -43
- package/dist/cli/describe-PYLZAVRI.js +0 -50
- package/dist/cli/git-T5JTVBYZ.js +0 -25
- package/dist/cli/search-5MD65V43.js +0 -33
- package/dist/cli/sessions-FDMO7PAA.js +0 -22
- package/dist/cli/skills-KRUL7QCT.js +0 -37
- package/dist/cli/tools-CGHOSCPS.js +0 -57
- package/dist/cli/update-S2TILEHZ.js +0 -35
|
@@ -11,6 +11,8 @@ export function observeProviderNoProgress(input: {
|
|
|
11
11
|
scope: string;
|
|
12
12
|
retryAtMs: number;
|
|
13
13
|
nowMs: number;
|
|
14
|
+
/** The no-progress limit; absent is `PROVIDER_NO_PROGRESS_MAX_MS`. */
|
|
15
|
+
maxMs?: number;
|
|
14
16
|
}): { exhausted: boolean; startedAtMs: number; deadlineMs: number } {
|
|
15
17
|
const saved = input.startedAtMsByScope[input.scope];
|
|
16
18
|
const startedAtMs =
|
|
@@ -18,7 +20,7 @@ export function observeProviderNoProgress(input: {
|
|
|
18
20
|
? saved
|
|
19
21
|
: input.nowMs;
|
|
20
22
|
input.startedAtMsByScope[input.scope] = startedAtMs;
|
|
21
|
-
const deadlineMs = startedAtMs + PROVIDER_NO_PROGRESS_MAX_MS;
|
|
23
|
+
const deadlineMs = startedAtMs + (input.maxMs ?? PROVIDER_NO_PROGRESS_MAX_MS);
|
|
22
24
|
return {
|
|
23
25
|
exhausted: input.nowMs >= deadlineMs || input.retryAtMs > deadlineMs,
|
|
24
26
|
startedAtMs,
|
|
@@ -30,11 +32,13 @@ export function providerNoProgressExpired(input: {
|
|
|
30
32
|
startedAtMsByScope: Record<string, number> | undefined;
|
|
31
33
|
scope: string;
|
|
32
34
|
nowMs: number;
|
|
35
|
+
/** The no-progress limit; absent is `PROVIDER_NO_PROGRESS_MAX_MS`. */
|
|
36
|
+
maxMs?: number;
|
|
33
37
|
}): boolean {
|
|
34
38
|
const startedAtMs = input.startedAtMsByScope?.[input.scope];
|
|
35
39
|
return (
|
|
36
40
|
typeof startedAtMs === 'number' &&
|
|
37
41
|
Number.isFinite(startedAtMs) &&
|
|
38
|
-
input.nowMs >= startedAtMs + PROVIDER_NO_PROGRESS_MAX_MS
|
|
42
|
+
input.nowMs >= startedAtMs + (input.maxMs ?? PROVIDER_NO_PROGRESS_MAX_MS)
|
|
39
43
|
);
|
|
40
44
|
}
|
|
@@ -918,6 +918,12 @@ export interface RuntimeResourceGovernor {
|
|
|
918
918
|
tryAcquireProviderPermit(input: {
|
|
919
919
|
toolId: string;
|
|
920
920
|
}): RuntimeProviderPermit | null;
|
|
921
|
+
/** Calls waiting now for the run's external-call slots, and its slot count. */
|
|
922
|
+
externalExecutionBacklog?(): {
|
|
923
|
+
waiting: number;
|
|
924
|
+
slots: number;
|
|
925
|
+
inFlight: number;
|
|
926
|
+
} | null;
|
|
921
927
|
/**
|
|
922
928
|
* Observe one physical provider request's run-local residence. This is not
|
|
923
929
|
* a permit: it cannot block, queue, or widen capacity. Callers must release
|
|
@@ -1961,6 +1967,10 @@ export function createRuntimeResourceGovernor(input: {
|
|
|
1961
1967
|
return lease;
|
|
1962
1968
|
},
|
|
1963
1969
|
|
|
1970
|
+
externalExecutionBacklog() {
|
|
1971
|
+
return input.executionGovernor.externalExecutionBacklog?.() ?? null;
|
|
1972
|
+
},
|
|
1973
|
+
|
|
1964
1974
|
tryAcquireProviderPermit(providerInput) {
|
|
1965
1975
|
const lease = input.executionGovernor.tryAcquireProviderPermit(
|
|
1966
1976
|
providerInput.toolId,
|
|
@@ -3,6 +3,7 @@ import { isIntegrationEventWaitToolId } from '../event-wait-tools';
|
|
|
3
3
|
import type { PlayQueueHint } from '../governor/rate-state-backend';
|
|
4
4
|
import { getPlayRuntimeBatchStrategy } from '../play-runtime-batching-registry';
|
|
5
5
|
import type { ToolResultMetadataInput } from '../tool-result';
|
|
6
|
+
import { resolveDurableRetryPolicy } from '../durable-retry-policy';
|
|
6
7
|
|
|
7
8
|
/** The app's runtime tool metadata as the runner receives it over HTTP. */
|
|
8
9
|
export type RuntimeToolMetadata = {
|
|
@@ -20,6 +21,28 @@ export type RuntimeToolMetadata = {
|
|
|
20
21
|
requiresExecutionFence?: boolean;
|
|
21
22
|
providerServerErrorReplay?: 'idempotent_key' | 'read_safe' | 'never';
|
|
22
23
|
};
|
|
24
|
+
/** Optional (reader-first): absent from an older app; treated as a write. */
|
|
25
|
+
effect?: 'read' | 'write' | 'destructive' | null;
|
|
26
|
+
/** Optional (reader-first): absent counts as non-idempotent. */
|
|
27
|
+
writeIdempotency?: 'idempotent_write' | 'non_idempotent_write' | null;
|
|
28
|
+
/**
|
|
29
|
+
* Optional (reader-first): the stored Durable retry policy the app read for
|
|
30
|
+
* this attempt. Absent, null, or with `readError`, the compiled defaults
|
|
31
|
+
* apply and say so.
|
|
32
|
+
*/
|
|
33
|
+
durableRetryPolicy?: {
|
|
34
|
+
stored: {
|
|
35
|
+
sequence: number;
|
|
36
|
+
policyJson: string;
|
|
37
|
+
/**
|
|
38
|
+
* Optional (reader-first): set when the policy is the run workspace's
|
|
39
|
+
* override rather than the global policy. Attribution only; the
|
|
40
|
+
* sequence already names exactly one stored version.
|
|
41
|
+
*/
|
|
42
|
+
orgId?: string;
|
|
43
|
+
} | null;
|
|
44
|
+
readError?: string;
|
|
45
|
+
} | null;
|
|
23
46
|
targetGetters?: Record<string, string[]>;
|
|
24
47
|
listExtractorPaths?: string[];
|
|
25
48
|
listExtractorAliases?: ToolResultMetadataInput['listExtractorAliases'];
|
|
@@ -42,6 +65,7 @@ export type RuntimeToolHooks = Required<
|
|
|
42
65
|
| 'getToolIdempotencyScope'
|
|
43
66
|
| 'getToolReusableResultSupport'
|
|
44
67
|
| 'getToolRetryPolicy'
|
|
68
|
+
| 'getToolDurableRetryContext'
|
|
45
69
|
| 'getToolActionCacheVersion'
|
|
46
70
|
| 'getToolActionCacheReadVersions'
|
|
47
71
|
| 'getToolTargetGetters'
|
|
@@ -109,6 +133,37 @@ export function createRuntimeToolHooks(input: {
|
|
|
109
133
|
metadata.retry?.providerServerErrorReplay ?? 'never',
|
|
110
134
|
};
|
|
111
135
|
},
|
|
136
|
+
getToolDurableRetryContext: async (toolId) => {
|
|
137
|
+
const metadata = await getRuntimeToolMetadata(toolId);
|
|
138
|
+
const wire = metadata.durableRetryPolicy;
|
|
139
|
+
// An app that predates the policy sends no field: keep the old
|
|
140
|
+
// behaviour (never park). A sent field with no stored policy, or an
|
|
141
|
+
// unreadable one, resolves to the compiled defaults, loudly.
|
|
142
|
+
if (wire === undefined || wire === null) return null;
|
|
143
|
+
const policy = resolveDurableRetryPolicy(wire.stored ?? null);
|
|
144
|
+
return {
|
|
145
|
+
effect:
|
|
146
|
+
metadata.effect === 'read' ||
|
|
147
|
+
metadata.effect === 'write' ||
|
|
148
|
+
metadata.effect === 'destructive'
|
|
149
|
+
? metadata.effect
|
|
150
|
+
: null,
|
|
151
|
+
writeIdempotency:
|
|
152
|
+
metadata.writeIdempotency === 'idempotent_write' ||
|
|
153
|
+
metadata.writeIdempotency === 'non_idempotent_write'
|
|
154
|
+
? metadata.writeIdempotency
|
|
155
|
+
: null,
|
|
156
|
+
policy: wire.readError
|
|
157
|
+
? {
|
|
158
|
+
...policy,
|
|
159
|
+
warnings: [
|
|
160
|
+
`The app could not read the Durable retry policy: ${wire.readError}`,
|
|
161
|
+
...policy.warnings,
|
|
162
|
+
],
|
|
163
|
+
}
|
|
164
|
+
: policy,
|
|
165
|
+
};
|
|
166
|
+
},
|
|
112
167
|
getToolActionCacheVersion: async (toolId) => {
|
|
113
168
|
const metadata = await getRuntimeToolMetadata(toolId);
|
|
114
169
|
const version = metadata.actionCacheVersion.trim();
|
|
@@ -3,6 +3,7 @@ import { mintWorkflowExecutorToken } from './/workflow-executor-auth';
|
|
|
3
3
|
import {
|
|
4
4
|
normalizeRuntimeExecutionCapabilities,
|
|
5
5
|
PLAY_RUNTIME_EXECUTION_CAPABILITIES,
|
|
6
|
+
type CalendarBookingBinding,
|
|
6
7
|
type ExecutionOperationPolicy,
|
|
7
8
|
type RuntimeAuthorityDescriptor,
|
|
8
9
|
type RuntimeExecutionCapability,
|
|
@@ -95,6 +96,7 @@ export async function mintPlayRunRuntimeAuthorityDescriptor(input: {
|
|
|
95
96
|
|
|
96
97
|
export async function mintPlayRunRuntimeAuthority(input: {
|
|
97
98
|
operationPolicy?: ExecutionOperationPolicy;
|
|
99
|
+
calendarBookingBinding?: CalendarBookingBinding;
|
|
98
100
|
orgId: string;
|
|
99
101
|
workflowId: string;
|
|
100
102
|
runId: string;
|
|
@@ -119,6 +121,9 @@ export async function mintPlayRunRuntimeAuthority(input: {
|
|
|
119
121
|
...(input.operationPolicy
|
|
120
122
|
? { operationPolicy: input.operationPolicy }
|
|
121
123
|
: {}),
|
|
124
|
+
...(input.calendarBookingBinding
|
|
125
|
+
? { calendarBookingBinding: input.calendarBookingBinding }
|
|
126
|
+
: {}),
|
|
122
127
|
orgId: input.orgId,
|
|
123
128
|
workflowId: input.workflowId,
|
|
124
129
|
runId: input.runId,
|
|
@@ -163,6 +168,9 @@ export function runtimeAuthorityMintInput(
|
|
|
163
168
|
...(descriptor.operationPolicy
|
|
164
169
|
? { operationPolicy: descriptor.operationPolicy }
|
|
165
170
|
: {}),
|
|
171
|
+
...(descriptor.calendarBookingBinding
|
|
172
|
+
? { calendarBookingBinding: descriptor.calendarBookingBinding }
|
|
173
|
+
: {}),
|
|
166
174
|
orgId: descriptor.orgId,
|
|
167
175
|
workflowId: descriptor.workflowId,
|
|
168
176
|
runId: descriptor.runId,
|
|
@@ -9772,6 +9772,27 @@ export type PostgresSchedulerRunResumeEligibility = {
|
|
|
9772
9772
|
epoch: number | null;
|
|
9773
9773
|
};
|
|
9774
9774
|
|
|
9775
|
+
/** Read only immutable placement metadata for an authenticated resume scope. */
|
|
9776
|
+
export async function readPostgresSchedulerRunResumePlacement(
|
|
9777
|
+
client: PostgresSchedulerQueryClient,
|
|
9778
|
+
input: { runId: string; orgId: string },
|
|
9779
|
+
options?: Pick<PostgresSchedulerOptions, 'schema'>,
|
|
9780
|
+
): Promise<{ sandboxPlacementPolicy: string | null } | null> {
|
|
9781
|
+
const result = await client.query<{
|
|
9782
|
+
sandbox_placement_policy: string | null;
|
|
9783
|
+
}>(
|
|
9784
|
+
`SELECT CASE WHEN admission_json ? 'runtimeSandboxPlacementPolicyId'
|
|
9785
|
+
THEN admission_json->>'runtimeSandboxPlacementPolicyId'
|
|
9786
|
+
ELSE launch_json->>'runtimeSandboxPlacementPolicyId'
|
|
9787
|
+
END AS sandbox_placement_policy
|
|
9788
|
+
FROM ${tableName('runs', options)}
|
|
9789
|
+
WHERE run_id = $1 AND org_id = $2`,
|
|
9790
|
+
[input.runId, input.orgId],
|
|
9791
|
+
);
|
|
9792
|
+
const row = result.rows[0];
|
|
9793
|
+
return row ? { sandboxPlacementPolicy: row.sandbox_placement_policy } : null;
|
|
9794
|
+
}
|
|
9795
|
+
|
|
9775
9796
|
/**
|
|
9776
9797
|
* Read-only resume eligibility for a bounded batch of runs: the exact
|
|
9777
9798
|
* predicate resume evaluates, without its row lock, task spawn or write. A
|
|
@@ -9,6 +9,12 @@ const ALWAYS_FRESH_INTEGRATION_TOOL_IDS = new Set([
|
|
|
9
9
|
'google_workspace_export_dataset',
|
|
10
10
|
'google_workspace_update_cells',
|
|
11
11
|
'google_workspace_write_table',
|
|
12
|
+
// Google sharing and the current credential must be checked on every call.
|
|
13
|
+
'google_calendar_availability_get_free_busy',
|
|
14
|
+
'google_calendar_availability_query_free_busy',
|
|
15
|
+
'google_calendar_availability_get_booking_event',
|
|
16
|
+
'google_calendar_availability_insert_event',
|
|
17
|
+
'google_calendar_availability_create_booking_calendar',
|
|
12
18
|
// Unique public operation alias for google_workspace_export_dataset.
|
|
13
19
|
'export_dataset',
|
|
14
20
|
]);
|
|
@@ -24,6 +30,9 @@ export function isAlwaysFreshIntegrationTool(toolId: string): boolean {
|
|
|
24
30
|
/** The always-fresh tools that only read reviewer-owned state. */
|
|
25
31
|
const ALWAYS_FRESH_INTEGRATION_READ_TOOL_IDS = new Set([
|
|
26
32
|
'google_workspace_request',
|
|
33
|
+
'google_calendar_availability_get_free_busy',
|
|
34
|
+
'google_calendar_availability_query_free_busy',
|
|
35
|
+
'google_calendar_availability_get_booking_event',
|
|
27
36
|
]);
|
|
28
37
|
|
|
29
38
|
/**
|
|
@@ -164,7 +173,9 @@ export function reusableWindowEligibility(
|
|
|
164
173
|
return refuse(
|
|
165
174
|
'workspace',
|
|
166
175
|
toolId,
|
|
167
|
-
'
|
|
176
|
+
toolId.startsWith('google_calendar_availability_')
|
|
177
|
+
? 'checks current calendar access on every call'
|
|
178
|
+
: 'works on a live Google Workspace file whose edits and conflict checks must be seen each run',
|
|
168
179
|
);
|
|
169
180
|
}
|
|
170
181
|
if (!call.input) return { allowed: true };
|
|
@@ -79,6 +79,12 @@ export const TOOL_EXECUTE_PROVIDER_PACING_WAIT_MAX_ATTEMPTS = 65;
|
|
|
79
79
|
// 429, which bounds the wire value before fingerprints or history queries, so
|
|
80
80
|
// malformed executor traffic cannot turn one request into unbounded work.
|
|
81
81
|
export const EXECUTION_GATEWAY_MAX_LOGICAL_ATTEMPT = 32;
|
|
82
|
+
// A Durable requeue (`call-requeue-state-machine.ts`) resumes a fenced call
|
|
83
|
+
// after a park. The gateway then bounds each park segment by the ceiling
|
|
84
|
+
// above, and the parks themselves by this constant: the longest default
|
|
85
|
+
// policy window (48 h for 429) at the 60-minute ladder ceiling is under 64
|
|
86
|
+
// parks. A claim beyond it is refused before any history query.
|
|
87
|
+
export const EXECUTION_GATEWAY_MAX_REQUEUE_PARKS = 64;
|
|
82
88
|
// Every fenced retry other than a shed or follower poll opens the next logical
|
|
83
89
|
// attempt. A Deepline refusal made before dispatch gets the attempts the other
|
|
84
90
|
// advancing reasons leave under the gateway ceiling: idempotency in progress,
|
|
@@ -101,6 +101,7 @@ export async function decryptWorkflowExecutorApiKey(
|
|
|
101
101
|
|
|
102
102
|
export async function mintWorkflowExecutorToken(input: {
|
|
103
103
|
operationPolicy?: ExecutionOperationPolicy;
|
|
104
|
+
calendarBookingBinding?: import('./execution-capabilities').CalendarBookingBinding;
|
|
104
105
|
orgId: string;
|
|
105
106
|
workflowId: string;
|
|
106
107
|
runId: string;
|
|
@@ -125,6 +126,7 @@ export async function mintWorkflowExecutorToken(input: {
|
|
|
125
126
|
const playName = input.playName?.trim() || input.workflowId;
|
|
126
127
|
return mintWorkflowRunExecutionToken({
|
|
127
128
|
operationPolicy: input.operationPolicy,
|
|
129
|
+
calendarBookingBinding: input.calendarBookingBinding,
|
|
128
130
|
orgId: input.orgId,
|
|
129
131
|
workflowId: input.workflowId,
|
|
130
132
|
runId: input.runId,
|
|
@@ -908,6 +908,32 @@ export type PlayAuthoringBindings<TInput = Record<string, unknown>> = {
|
|
|
908
908
|
secrets?: readonly string[];
|
|
909
909
|
};
|
|
910
910
|
|
|
911
|
+
/**
|
|
912
|
+
* The failure classes a durable tool call retries (the Durable retry policy's
|
|
913
|
+
* classes). A class listed in `retry.nonRetryable` reaches the Play after the
|
|
914
|
+
* call's first attempt instead of being retried.
|
|
915
|
+
*/
|
|
916
|
+
export const PLAY_TOOL_CALL_RETRY_ERROR_CLASSES = [
|
|
917
|
+
'never_sent',
|
|
918
|
+
'provider_unavailable',
|
|
919
|
+
'provider_ambiguous_500',
|
|
920
|
+
'timeout_after_send',
|
|
921
|
+
'rate_limit_429',
|
|
922
|
+
'billing_insufficient_credits',
|
|
923
|
+
'billing_monthly_cap',
|
|
924
|
+
] as const;
|
|
925
|
+
export type PlayToolCallRetryErrorClass =
|
|
926
|
+
(typeof PLAY_TOOL_CALL_RETRY_ERROR_CLASSES)[number];
|
|
927
|
+
|
|
928
|
+
/**
|
|
929
|
+
* One durable tool call's retry policy, like a durable-execution activity
|
|
930
|
+
* retry policy. Omitted fields take the live Durable retry policy for the
|
|
931
|
+
* failure's class. Between attempts the run waits on a durable timer.
|
|
932
|
+
*/
|
|
933
|
+
export type PlayToolCallRetryPolicy = Static<
|
|
934
|
+
(typeof PLAY_AUTHORING_FIELD_REGISTRY)['ctx.tools.execute.retry']['schema']
|
|
935
|
+
>;
|
|
936
|
+
|
|
911
937
|
/** The one public type for durable managed-tool calls. */
|
|
912
938
|
export type PlayToolExecutionRequest = {
|
|
913
939
|
id: string;
|
|
@@ -918,6 +944,14 @@ export type PlayToolExecutionRequest = {
|
|
|
918
944
|
staleAfterSeconds?: DurableCallStaleAfterSeconds;
|
|
919
945
|
timeoutMs?: PlayRuntimeTimeoutMs;
|
|
920
946
|
receiptWaitMs?: PlayReceiptWaitMs;
|
|
947
|
+
/**
|
|
948
|
+
* The call's retry policy. The Play sees the call's error only after these
|
|
949
|
+
* retries are spent, or at once for a `nonRetryable` class. Set a small
|
|
950
|
+
* `maximumAttempts` (for example 3) on a call whose failure the Play
|
|
951
|
+
* handles itself, such as a waterfall leg that falls back to the next
|
|
952
|
+
* provider, so it never waits on a durable retry.
|
|
953
|
+
*/
|
|
954
|
+
retry?: PlayToolCallRetryPolicy;
|
|
921
955
|
};
|
|
922
956
|
export type PlayToolCallOptions = Omit<
|
|
923
957
|
PlayToolExecutionRequest,
|
|
@@ -2359,6 +2393,48 @@ export const PLAY_AUTHORING_FIELD_REGISTRY = {
|
|
|
2359
2393
|
errorMessage:
|
|
2360
2394
|
'staleAfterSeconds must be null, 0 (always execute), or a positive whole number of seconds.',
|
|
2361
2395
|
},
|
|
2396
|
+
'ctx.tools.execute.retry': {
|
|
2397
|
+
schema: Type.Object(
|
|
2398
|
+
{
|
|
2399
|
+
maximumAttempts: Type.Optional(Type.Integer({ minimum: 1, maximum: 65 })),
|
|
2400
|
+
initialIntervalMs: Type.Optional(
|
|
2401
|
+
Type.Integer({ minimum: 1_000, maximum: 86_400_000 }),
|
|
2402
|
+
),
|
|
2403
|
+
backoffCoefficient: Type.Optional(
|
|
2404
|
+
Type.Number({ minimum: 1, maximum: 10 }),
|
|
2405
|
+
),
|
|
2406
|
+
maximumIntervalMs: Type.Optional(
|
|
2407
|
+
Type.Integer({ minimum: 1_000, maximum: 86_400_000 }),
|
|
2408
|
+
),
|
|
2409
|
+
nonRetryable: Type.Optional(
|
|
2410
|
+
Type.Array(
|
|
2411
|
+
Type.Union(
|
|
2412
|
+
PLAY_TOOL_CALL_RETRY_ERROR_CLASSES.map((errorClass) =>
|
|
2413
|
+
Type.Literal(errorClass),
|
|
2414
|
+
),
|
|
2415
|
+
),
|
|
2416
|
+
{ uniqueItems: true },
|
|
2417
|
+
),
|
|
2418
|
+
),
|
|
2419
|
+
},
|
|
2420
|
+
{ additionalProperties: false },
|
|
2421
|
+
),
|
|
2422
|
+
fixtures: {
|
|
2423
|
+
valid: { maximumAttempts: 1 },
|
|
2424
|
+
invalid: { maximumAttempts: 0 },
|
|
2425
|
+
absent: undefined,
|
|
2426
|
+
unresolved: { expression: 'retryPolicy' },
|
|
2427
|
+
edition1: { maximumAttempts: 1 },
|
|
2428
|
+
},
|
|
2429
|
+
referenceType: 'PlayToolCallRetryPolicy',
|
|
2430
|
+
required: false,
|
|
2431
|
+
resolution: 'runtime-allowed',
|
|
2432
|
+
issueCode: 'play_authoring_durable_policy_invalid',
|
|
2433
|
+
description:
|
|
2434
|
+
"Optional retry policy for this call, like a durable-execution activity retry policy. Omitted fields take the live Durable retry policy for the failure's class. maximumAttempts counts every request the provider receives for the call, the first included, in-call resends and durable retries alike (1 to 65); initialIntervalMs, backoffCoefficient and maximumIntervalMs set the durable wait before each retry (1 s to 24 h; the coefficient 1 to 10); nonRetryable lists failure classes that reach the Play after the first attempt. The Play sees the error only after the retries are spent. Where the Play handles the failure itself, such as a waterfall leg that falls back, set a small maximumAttempts (for example 3) so the call never waits on a durable retry. Setting retry (an empty object takes the class defaults) is what makes a call retry durably for now; a call without it keeps its earlier behaviour.",
|
|
2435
|
+
errorMessage:
|
|
2436
|
+
'retry must be an object with maximumAttempts (1-65), initialIntervalMs and maximumIntervalMs (1000-86400000 ms), backoffCoefficient (1-10) and nonRetryable (failure classes), and nothing else.',
|
|
2437
|
+
},
|
|
2362
2438
|
'ctx.tools.execute.id': {
|
|
2363
2439
|
schema: Type.String({ pattern: '\\S' }),
|
|
2364
2440
|
fixtures: {
|
|
@@ -3389,6 +3465,28 @@ export function validateOptionalPlayAuthoringField(
|
|
|
3389
3465
|
validatePlayAuthoringField(path, value);
|
|
3390
3466
|
}
|
|
3391
3467
|
|
|
3468
|
+
/**
|
|
3469
|
+
* Validate a per-call `retry` policy: its shape, then that the longest wait
|
|
3470
|
+
* is not shorter than the first.
|
|
3471
|
+
*/
|
|
3472
|
+
export function validatePlayToolCallRetryPolicy(
|
|
3473
|
+
value: unknown,
|
|
3474
|
+
): asserts value is PlayToolCallRetryPolicy {
|
|
3475
|
+
validatePlayAuthoringField('ctx.tools.execute.retry', value);
|
|
3476
|
+
const policy = value as PlayToolCallRetryPolicy;
|
|
3477
|
+
if (
|
|
3478
|
+
policy.initialIntervalMs !== undefined &&
|
|
3479
|
+
policy.maximumIntervalMs !== undefined &&
|
|
3480
|
+
policy.maximumIntervalMs < policy.initialIntervalMs
|
|
3481
|
+
) {
|
|
3482
|
+
throw new PlayAuthoringFieldValidationError(
|
|
3483
|
+
'ctx.tools.execute.retry',
|
|
3484
|
+
PLAY_AUTHORING_FIELD_REGISTRY['ctx.tools.execute.retry'].issueCode,
|
|
3485
|
+
'retry.maximumIntervalMs must be at least retry.initialIntervalMs.',
|
|
3486
|
+
);
|
|
3487
|
+
}
|
|
3488
|
+
}
|
|
3489
|
+
|
|
3392
3490
|
/** Normalize the deprecated SqlQuery compatibility shape at the contract seam. */
|
|
3393
3491
|
export function normalizePlayAuthoringCustomerDbStatement(
|
|
3394
3492
|
statement: PlaySqlQuery | string,
|
|
@@ -3437,6 +3535,8 @@ export const PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
|
|
|
3437
3535
|
`export type DurableCallStaleAfterSeconds = ${cloudReferenceType('ctx.tools.execute.staleAfterSeconds')};`,
|
|
3438
3536
|
`export type PlayRuntimeTimeoutMs = ${cloudReferenceType('ctx.tools.execute.timeoutMs')};`,
|
|
3439
3537
|
`export type PlayReceiptWaitMs = ${cloudReferenceType('ctx.tools.execute.receiptWaitMs')};`,
|
|
3538
|
+
`export type PlayToolCallRetryErrorClass = ${PLAY_TOOL_CALL_RETRY_ERROR_CLASSES.map((errorClass) => `'${errorClass}'`).join(' | ')};`,
|
|
3539
|
+
'export type PlayToolCallRetryPolicy = { readonly maximumAttempts?: number; readonly initialIntervalMs?: number; readonly backoffCoefficient?: number; readonly maximumIntervalMs?: number; readonly nonRetryable?: readonly PlayToolCallRetryErrorClass[] };',
|
|
3440
3540
|
`export type SqlListenerOperation = ${cloudReferenceType('bindings.sqlListeners[].operations[]')};`,
|
|
3441
3541
|
'export type SqlListenerFilterScalar = string | number | boolean | null;',
|
|
3442
3542
|
`export type SqlListenerFilterOperator = { eq?: ${cloudReferenceType('bindings.sqlListeners[].where.*.*.eq')}; neq?: ${cloudReferenceType('bindings.sqlListeners[].where.*.*.neq')}; in?: ${cloudReferenceType('bindings.sqlListeners[].where.*.*.in')}; notIn?: ${cloudReferenceType('bindings.sqlListeners[].where.*.*.notIn')}; isNull?: ${cloudReferenceType('bindings.sqlListeners[].where.*.*.isNull')}; isNotNull?: ${cloudReferenceType('bindings.sqlListeners[].where.*.*.isNotNull')}; ilike?: ${cloudReferenceType('bindings.sqlListeners[].where.*.*.ilike')} };`,
|
|
@@ -3453,6 +3553,7 @@ export const PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
|
|
|
3453
3553
|
' readonly staleAfterSeconds?: DurableCallStaleAfterSeconds;',
|
|
3454
3554
|
' readonly timeoutMs?: PlayRuntimeTimeoutMs;',
|
|
3455
3555
|
' readonly receiptWaitMs?: PlayReceiptWaitMs;',
|
|
3556
|
+
` readonly retry?: ${cloudReferenceType('ctx.tools.execute.retry')};`,
|
|
3456
3557
|
'};',
|
|
3457
3558
|
'export type PlayCronInput<TInput> = TInput extends readonly unknown[] ? never : TInput extends object ? TInput : never;',
|
|
3458
3559
|
'export type PlayBindings<TInput = Record<string, unknown>> = {',
|
|
@@ -479,6 +479,7 @@ function projectPublicColumnProducer(
|
|
|
479
479
|
producer: PlayStaticColumnProducer,
|
|
480
480
|
depth: number,
|
|
481
481
|
maxDepth: number,
|
|
482
|
+
includeBindingPaths: boolean,
|
|
482
483
|
): PlayStaticColumnProducer {
|
|
483
484
|
return {
|
|
484
485
|
id: producer.id,
|
|
@@ -493,11 +494,17 @@ function projectPublicColumnProducer(
|
|
|
493
494
|
producer.substep,
|
|
494
495
|
maxDepth === Infinity ? depth + 1 : MAX_PUBLIC_SUBSTEP_DEPTH,
|
|
495
496
|
maxDepth,
|
|
497
|
+
includeBindingPaths,
|
|
496
498
|
),
|
|
497
499
|
...(maxDepth === Infinity && producer.steps
|
|
498
500
|
? {
|
|
499
501
|
steps: producer.steps.map((step) =>
|
|
500
|
-
projectPublicColumnProducer(
|
|
502
|
+
projectPublicColumnProducer(
|
|
503
|
+
step,
|
|
504
|
+
depth + 1,
|
|
505
|
+
maxDepth,
|
|
506
|
+
includeBindingPaths,
|
|
507
|
+
),
|
|
501
508
|
),
|
|
502
509
|
}
|
|
503
510
|
: {}),
|
|
@@ -507,17 +514,21 @@ function projectPublicColumnProducer(
|
|
|
507
514
|
function projectPublicPipeline(
|
|
508
515
|
pipeline: PlayStaticPipeline,
|
|
509
516
|
depth: number,
|
|
510
|
-
maxDepth
|
|
517
|
+
maxDepth: number,
|
|
518
|
+
includeBindingPaths: boolean,
|
|
511
519
|
): PlayStaticPipeline {
|
|
512
|
-
const safePipeline =
|
|
520
|
+
const safePipeline = buildProjectedGraphPipeline(
|
|
521
|
+
pipeline,
|
|
522
|
+
includeBindingPaths,
|
|
523
|
+
);
|
|
513
524
|
if (maxDepth === Infinity) return safePipeline;
|
|
514
525
|
return {
|
|
515
526
|
...safePipeline,
|
|
516
527
|
stages: (safePipeline.stages ?? []).map((substep) =>
|
|
517
|
-
projectPublicSubstep(substep, depth, maxDepth),
|
|
528
|
+
projectPublicSubstep(substep, depth, maxDepth, includeBindingPaths),
|
|
518
529
|
),
|
|
519
530
|
substeps: safePipeline.substeps.map((substep) =>
|
|
520
|
-
projectPublicSubstep(substep, depth, maxDepth),
|
|
531
|
+
projectPublicSubstep(substep, depth, maxDepth, includeBindingPaths),
|
|
521
532
|
),
|
|
522
533
|
};
|
|
523
534
|
}
|
|
@@ -526,11 +537,12 @@ function projectPublicSubstep(
|
|
|
526
537
|
substep: PlayStaticSubstep,
|
|
527
538
|
depth: number,
|
|
528
539
|
maxDepth = MAX_PUBLIC_SUBSTEP_DEPTH,
|
|
540
|
+
includeBindingPaths = false,
|
|
529
541
|
): PlayStaticSubstep {
|
|
530
542
|
const base = publicSubstepBase(substep);
|
|
531
543
|
const projectChildren = depth < maxDepth;
|
|
532
544
|
const child = (value: PlayStaticSubstep) =>
|
|
533
|
-
projectPublicSubstep(value, depth + 1, maxDepth);
|
|
545
|
+
projectPublicSubstep(value, depth + 1, maxDepth, includeBindingPaths);
|
|
534
546
|
|
|
535
547
|
if (substep.type === 'csv' && maxDepth === Infinity) {
|
|
536
548
|
return {
|
|
@@ -550,7 +562,12 @@ function projectPublicSubstep(
|
|
|
550
562
|
source: column.source,
|
|
551
563
|
...(column.sqlName ? { sqlName: column.sqlName } : {}),
|
|
552
564
|
producers: column.producers.map((producer) =>
|
|
553
|
-
projectPublicColumnProducer(
|
|
565
|
+
projectPublicColumnProducer(
|
|
566
|
+
producer,
|
|
567
|
+
depth,
|
|
568
|
+
maxDepth,
|
|
569
|
+
includeBindingPaths,
|
|
570
|
+
),
|
|
554
571
|
),
|
|
555
572
|
})),
|
|
556
573
|
steps: projectChildren ? (substep.steps ?? []).map(child) : [],
|
|
@@ -603,7 +620,12 @@ function projectPublicSubstep(
|
|
|
603
620
|
field: substep.field,
|
|
604
621
|
pipeline:
|
|
605
622
|
projectChildren && substep.pipeline
|
|
606
|
-
? projectPublicPipeline(
|
|
623
|
+
? projectPublicPipeline(
|
|
624
|
+
substep.pipeline,
|
|
625
|
+
depth + 1,
|
|
626
|
+
maxDepth,
|
|
627
|
+
includeBindingPaths,
|
|
628
|
+
)
|
|
607
629
|
: null,
|
|
608
630
|
} as PlayStaticSubstep;
|
|
609
631
|
}
|
|
@@ -615,7 +637,12 @@ function projectPublicSubstep(
|
|
|
615
637
|
field: substep.field,
|
|
616
638
|
pipeline:
|
|
617
639
|
projectChildren && substep.pipeline
|
|
618
|
-
? projectPublicPipeline(
|
|
640
|
+
? projectPublicPipeline(
|
|
641
|
+
substep.pipeline,
|
|
642
|
+
depth + 1,
|
|
643
|
+
maxDepth,
|
|
644
|
+
includeBindingPaths,
|
|
645
|
+
)
|
|
619
646
|
: null,
|
|
620
647
|
} as PlayStaticSubstep;
|
|
621
648
|
}
|
|
@@ -644,11 +671,34 @@ export function buildAppGraphPipeline(
|
|
|
644
671
|
staticPipeline: unknown,
|
|
645
672
|
): PlayStaticPipeline | null {
|
|
646
673
|
const pipeline = asPipeline(staticPipeline);
|
|
647
|
-
|
|
674
|
+
return pipeline ? buildProjectedGraphPipeline(pipeline, true) : null;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
function buildProjectedGraphPipeline(
|
|
678
|
+
pipeline: PlayStaticPipeline,
|
|
679
|
+
includeBindingPaths: boolean,
|
|
680
|
+
): PlayStaticPipeline {
|
|
648
681
|
const docflow = buildPublicDocflow(pipeline);
|
|
682
|
+
// The authenticated app needs the symbolic bindings to match recorded
|
|
683
|
+
// values to graph nodes. Keep the public share projection unchanged.
|
|
684
|
+
const appDocflow =
|
|
685
|
+
includeBindingPaths && docflow && pipeline.docflow
|
|
686
|
+
? {
|
|
687
|
+
...docflow,
|
|
688
|
+
bindings: pipeline.docflow.bindings.map(
|
|
689
|
+
({ nodeId, line, kind, inputs, outputs }) => ({
|
|
690
|
+
nodeId,
|
|
691
|
+
line,
|
|
692
|
+
...(kind ? { kind } : {}),
|
|
693
|
+
...(inputs ? { inputs: [...inputs] } : {}),
|
|
694
|
+
...(outputs ? { outputs: [...outputs] } : {}),
|
|
695
|
+
}),
|
|
696
|
+
),
|
|
697
|
+
}
|
|
698
|
+
: docflow;
|
|
649
699
|
const csvInput = inputFieldFromStaticCsvArg(pipeline.csvArg);
|
|
650
700
|
return {
|
|
651
|
-
...(
|
|
701
|
+
...(appDocflow ? { docflow: appDocflow } : {}),
|
|
652
702
|
...(pipeline.tableNamespace
|
|
653
703
|
? { tableNamespace: pipeline.tableNamespace }
|
|
654
704
|
: {}),
|
|
@@ -665,10 +715,10 @@ export function buildAppGraphPipeline(
|
|
|
665
715
|
? { returnFields: pipeline.returnFields.map((field) => ({ ...field })) }
|
|
666
716
|
: {}),
|
|
667
717
|
stages: (pipeline.stages ?? []).map((substep) =>
|
|
668
|
-
projectPublicSubstep(substep, 0, Infinity),
|
|
718
|
+
projectPublicSubstep(substep, 0, Infinity, includeBindingPaths),
|
|
669
719
|
),
|
|
670
720
|
substeps: pipeline.substeps.map((substep) =>
|
|
671
|
-
projectPublicSubstep(substep, 0, Infinity),
|
|
721
|
+
projectPublicSubstep(substep, 0, Infinity, includeBindingPaths),
|
|
672
722
|
),
|
|
673
723
|
...(pipeline.sheetContract
|
|
674
724
|
? { sheetContract: pipeline.sheetContract }
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
var _chunkKOZBZPRMjs = require('./chunk-KOZBZPRM.js');
|
|
18
|
+
require('./chunk-KWGXHPHL.js');
|
|
19
|
+
require('./chunk-HWPOXCCK.js');
|
|
20
|
+
require('./chunk-D4MHCCIR.js');
|
|
21
|
+
require('./chunk-T2N3B7IQ.js');
|
|
22
|
+
require('./chunk-XNYIZMNQ.js');
|
|
23
|
+
require('./chunk-SQWET4SL.js');
|
|
24
|
+
require('./chunk-PI5R65OQ.js');
|
|
25
|
+
require('./chunk-OG64RBAC.js');
|
|
26
|
+
require('./chunk-COGTRVWW.js');
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
exports.EXIT_WORKSPACE_MISMATCH = _chunkKOZBZPRMjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkKOZBZPRMjs.authStatusLine; exports.clearPendingClaim = _chunkKOZBZPRMjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkKOZBZPRMjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkKOZBZPRMjs.handleRegister; exports.handleStatus = _chunkKOZBZPRMjs.handleStatus; exports.handleWait = _chunkKOZBZPRMjs.handleWait; exports.httpJson = _chunkKOZBZPRMjs.httpJson; exports.readPendingAuthClaim = _chunkKOZBZPRMjs.readPendingAuthClaim; exports.readStatusBanner = _chunkKOZBZPRMjs.readStatusBanner; exports.registerAuthCommands = _chunkKOZBZPRMjs.registerAuthCommands; exports.reportApprovalLinkShown = _chunkKOZBZPRMjs.reportApprovalLinkShown; exports.reportSetupCompleted = _chunkKOZBZPRMjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkKOZBZPRMjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkKOZBZPRMjs.statusBannerLine;
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
reportSetupCompleted,
|
|
15
15
|
resolvePendingAuthClaimForResume,
|
|
16
16
|
statusBannerLine
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-BF65LB7X.mjs";
|
|
18
|
+
import "./chunk-JWWYLGUT.mjs";
|
|
19
|
+
import "./chunk-W5YJYU4G.mjs";
|
|
20
|
+
import "./chunk-RKY4LBX3.mjs";
|
|
21
21
|
import "./chunk-QNHHZ63P.mjs";
|
|
22
22
|
import "./chunk-DLIRSHV6.mjs";
|
|
23
23
|
import "./chunk-ZPGGW27Q.mjs";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-7CWSAEYS.mjs";
|
|
25
25
|
import "./chunk-WZYKRD7T.mjs";
|
|
26
26
|
import "./chunk-KRD6H754.mjs";
|
|
27
27
|
export {
|