deepline 0.3.533 → 0.3.534
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 +46 -7
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +19 -1
- 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/internal-bootstrap-token.ts +9 -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/workflow-executor-auth.ts +2 -0
- package/dist/cli/{auth-2TZNPIJQ.mjs → auth-MHQYIMVX.mjs} +5 -5
- package/dist/cli/auth-UP2RGPI6.js +43 -0
- package/dist/cli/{billing-LR4WJIHO.mjs → billing-LX2PSBJ4.mjs} +7 -7
- package/dist/cli/{billing-HQYTRIV3.js → billing-YQLNP4S5.js} +82 -82
- package/dist/cli/{chunk-NFDYVMGC.mjs → chunk-2P3NVX65.mjs} +68 -13
- package/dist/cli/{chunk-EVXRQXNV.mjs → chunk-5FXMEEF4.mjs} +35 -0
- package/dist/cli/{chunk-NW736SOD.mjs → chunk-5LZ5VSOK.mjs} +2 -2
- package/dist/cli/{chunk-2UYERVXF.mjs → chunk-62SOZ67Y.mjs} +2 -2
- package/dist/cli/{chunk-R7YDZSN7.js → chunk-6CEUQYMB.js} +3 -3
- package/dist/cli/{chunk-PIACHLYY.mjs → chunk-6GTGWZJG.mjs} +2 -2
- package/dist/cli/{chunk-NKVW552R.mjs → chunk-6IFZPEJE.mjs} +1 -1
- package/dist/cli/{chunk-KKUOIVQO.mjs → chunk-7GFR5Y4J.mjs} +1 -1
- package/dist/cli/{chunk-274Y66HP.js → chunk-A6HNT4EE.js} +2 -2
- package/dist/cli/{chunk-YZK5RSUL.mjs → chunk-AK622KIG.mjs} +1 -1
- package/dist/cli/{chunk-33SNTG5F.js → chunk-B2AS3R5W.js} +16 -16
- package/dist/cli/{chunk-USAQ42OG.mjs → chunk-BDWZBMGV.mjs} +5 -5
- package/dist/cli/{chunk-CANHB6DH.mjs → chunk-BXIUZM5N.mjs} +2 -2
- package/dist/cli/{chunk-WF652G74.js → chunk-D3J2Y2BP.js} +14 -14
- package/dist/cli/{chunk-SVVUC3B4.js → chunk-DGKTHWWH.js} +122 -104
- package/dist/cli/{chunk-G3RVDRYL.mjs → chunk-DQ5ADV2J.mjs} +1 -1
- package/dist/cli/{chunk-A4JP6RPX.js → chunk-DZS4JC7I.js} +2 -2
- package/dist/cli/{chunk-IETLUG4C.mjs → chunk-E7TP25I2.mjs} +1 -1
- package/dist/cli/{chunk-QZWURUBP.js → chunk-EGTUOYYG.js} +7 -7
- package/dist/cli/{chunk-LZMRCUVD.mjs → chunk-ENCA6O2D.mjs} +2 -2
- package/dist/cli/{chunk-BSI7UHQZ.mjs → chunk-EYXUAJAU.mjs} +5 -5
- package/dist/cli/{chunk-LTF2J3JM.js → chunk-GTXSUPCJ.js} +2 -2
- package/dist/cli/{chunk-5XTXC45Z.js → chunk-GVGQ6NZW.js} +41 -41
- package/dist/cli/{chunk-425ERNBL.js → chunk-HCD36BP6.js} +44 -44
- package/dist/cli/{chunk-BWZHMWM5.js → chunk-HPJAE6PP.js} +6 -6
- package/dist/cli/{chunk-735ZOYQN.js → chunk-IX45S5VC.js} +11 -11
- package/dist/cli/{chunk-352XVCGE.js → chunk-JBBJDFUJ.js} +5 -5
- package/dist/cli/{chunk-2TMNRF5R.mjs → chunk-KJVY7V2X.mjs} +1 -1
- package/dist/cli/{chunk-MNAEALPG.js → chunk-KSA2XE4T.js} +182 -127
- package/dist/cli/{chunk-CWIGRIIX.mjs → chunk-KXQCUX3X.mjs} +3 -3
- package/dist/cli/{chunk-E4VWBU2E.js → chunk-LGRZCHKC.js} +16 -16
- package/dist/cli/{chunk-XZN3DBTP.mjs → chunk-MG6YL4M7.mjs} +24 -6
- package/dist/cli/{chunk-4CYNH47Y.js → chunk-MQORQ7WL.js} +53 -53
- package/dist/cli/{chunk-HOTJSXLY.js → chunk-MQX363YF.js} +5 -5
- package/dist/cli/{chunk-TU56J4OV.js → chunk-MYSKWJMA.js} +13 -13
- package/dist/cli/{chunk-4YP2YAIZ.js → chunk-NDFNBJGL.js} +26 -26
- package/dist/cli/{chunk-JZ7LJS3P.mjs → chunk-NNAE7E23.mjs} +6 -6
- package/dist/cli/{chunk-LZ3PBEQH.mjs → chunk-O53LHONF.mjs} +2 -2
- package/dist/cli/{chunk-VKGNQC2S.mjs → chunk-OMVVHX4U.mjs} +5 -5
- package/dist/cli/{chunk-ZH5HCAN3.js → chunk-RH3YRMUY.js} +1 -1
- package/dist/cli/{chunk-V6LUMGVI.js → chunk-SUWTLXCV.js} +35 -0
- package/dist/cli/{chunk-MKUYZ7LR.mjs → chunk-TG2UB3A5.mjs} +1 -1
- package/dist/cli/{chunk-G3GJ3IGU.mjs → chunk-TQH3533L.mjs} +5 -5
- package/dist/cli/{chunk-B4ZNWXUW.js → chunk-TVINIDHB.js} +9 -9
- package/dist/cli/{chunk-O7RSUW75.js → chunk-UWNVFAFN.js} +4 -4
- package/dist/cli/{chunk-VPQDKL5O.js → chunk-V7SCRUFQ.js} +6 -6
- package/dist/cli/{chunk-HPOVAUQF.mjs → chunk-VAG5YKP6.mjs} +1 -1
- package/dist/cli/{chunk-4UADZTU5.js → chunk-VE7ZPLN2.js} +22 -22
- package/dist/cli/{chunk-XUX5KGCQ.mjs → chunk-WDNRPZED.mjs} +2 -2
- package/dist/cli/{chunk-3O3AL5RI.mjs → chunk-WR4WETRU.mjs} +4 -4
- package/dist/cli/{chunk-EYWES7F5.js → chunk-XBK6WCVA.js} +3 -3
- package/dist/cli/{chunk-3KQBV2CG.mjs → chunk-XRZJKHUA.mjs} +3 -3
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-CJKKHGNQ.mjs → csv-4ID4E5W3.mjs} +4 -4
- package/dist/cli/{csv-MBSCHS4H.js → csv-U3M2G76R.js} +13 -13
- package/dist/cli/{db-45HNPCY3.js → db-IHAQIKEQ.js} +27 -27
- package/dist/cli/{db-EAFR6N45.mjs → db-LHX5BBCZ.mjs} +6 -6
- package/dist/cli/{describe-IXW3LDGC.mjs → describe-CI4MREFF.mjs} +18 -18
- package/dist/cli/describe-IVTSD7ST.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-SZAES2S4.js → executions-CJ5LV23G.js} +8 -8
- package/dist/cli/{executions-ZATZV7O6.mjs → executions-UJ6JZUL5.mjs} +6 -6
- package/dist/cli/{feedback-KXLF4GR4.js → feedback-TGUBVGRP.js} +14 -14
- package/dist/cli/{feedback-NY63KEK2.mjs → feedback-YGTPJBRJ.mjs} +6 -6
- package/dist/cli/{git-BSSSTR6N.mjs → git-3DOTQHJO.mjs} +5 -5
- package/dist/cli/git-R3W25XIF.js +25 -0
- package/dist/cli/index.js +145 -145
- package/dist/cli/index.mjs +44 -44
- package/dist/cli/{legacy-noops-XQANGML3.js → legacy-noops-BHEHVFHI.js} +9 -9
- package/dist/cli/{legacy-noops-CYF6DJBF.mjs → legacy-noops-RBBYRVLG.mjs} +6 -6
- package/dist/cli/{monitors-ABJVLWIP.mjs → monitors-5AJCG6IV.mjs} +7 -7
- package/dist/cli/{monitors-F3PTNP45.js → monitors-XECKLAXA.js} +100 -100
- package/dist/cli/{org-WQAPZI5Q.js → org-DOBAIYWG.js} +86 -86
- package/dist/cli/{org-BHF6Y5R7.mjs → org-ZAAIEZKB.mjs} +6 -6
- package/dist/cli/{pages-W4HWVJUG.mjs → pages-FUOSF6BE.mjs} +6 -6
- package/dist/cli/{pages-U3EJ2NPL.js → pages-TLC2N6L7.js} +18 -18
- package/dist/cli/{play-2UHKONON.js → play-E74VN6B7.js} +317 -317
- package/dist/cli/{play-3T4X3ZKH.mjs → play-KLYRMQPF.mjs} +18 -18
- package/dist/cli/{providers-LUK5LIUA.js → providers-APZ6SOSK.js} +9 -9
- package/dist/cli/{providers-2G2VTNDG.mjs → providers-XTQXV5LB.mjs} +6 -6
- package/dist/cli/{quickstart-76P6PGID.js → quickstart-S6WN6NWW.js} +6 -6
- package/dist/cli/{quickstart-XP4PJZ7N.mjs → quickstart-X7RHHQCH.mjs} +4 -4
- package/dist/cli/{run-S2KHGBCM.js → run-3YLIJJ57.js} +41 -41
- package/dist/cli/{run-ACIHA53A.mjs → run-TZPBBSPX.mjs} +23 -23
- package/dist/cli/search-NB5CBALV.js +33 -0
- package/dist/cli/{search-VFIJCUZL.mjs → search-VLHE2CMZ.mjs} +8 -8
- package/dist/cli/{search-output-2KFLZS5F.mjs → search-output-73BYB7UE.mjs} +4 -4
- package/dist/cli/{search-output-GV7NNB4X.js → search-output-GCT7PQIT.js} +6 -6
- package/dist/cli/{secrets-KJSFEW2F.js → secrets-J6CEKXKQ.js} +15 -15
- package/dist/cli/{secrets-MAQLBVC4.mjs → secrets-RLOTGKQZ.mjs} +6 -6
- package/dist/cli/{sessions-G5MWNJ75.mjs → sessions-7HZ7OZ62.mjs} +6 -6
- package/dist/cli/sessions-SFCZSB77.js +22 -0
- package/dist/cli/{settings-MR6UFOK5.mjs → settings-72K5YCIS.mjs} +13 -13
- package/dist/cli/{settings-VXGRPFXP.js → settings-WRV5XEZC.js} +86 -86
- package/dist/cli/{setup-ZOBXMONM.mjs → setup-KQFY6WT4.mjs} +10 -10
- package/dist/cli/{setup-C74BRK7N.js → setup-QVXWT2EQ.js} +50 -50
- package/dist/cli/{skills-4CG3MHOY.mjs → skills-C3K3E473.mjs} +8 -8
- package/dist/cli/skills-WIJEHVLA.js +37 -0
- package/dist/cli/{tools-YXCXZ4ZD.mjs → tools-4A2OH6MB.mjs} +17 -17
- package/dist/cli/tools-VMMERMLO.js +57 -0
- package/dist/cli/update-54WZQDTS.js +35 -0
- package/dist/cli/{update-Z3C5W3I4.mjs → update-BS6USKPR.mjs} +10 -10
- package/dist/cli/{views-XGP2GZ52.js → views-4NZGAXHL.js} +18 -18
- package/dist/cli/{views-45B2FZQT.mjs → views-WB6GFTRX.mjs} +6 -6
- package/dist/cli/{workflow-KQRWSNBH.mjs → workflow-2D4WX55R.mjs} +7 -7
- package/dist/cli/{workflow-DWO35XHZ.js → workflow-L2QTQZYV.js} +17 -17
- package/dist/{client-CBCVhL8U.d.ts → client-DQm56zMs.d.ts} +1 -1
- package/dist/{client-Bd2meveV.d.mts → client-DoUVSkqC.d.mts} +1 -1
- package/dist/{client-core-CsRRWCFy.d.ts → client-core-C7KkUIE_.d.ts} +32 -1
- package/dist/{client-core-CGj8V9mw.d.mts → client-core-CPlwsC1Q.d.mts} +32 -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/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
|
@@ -3544,10 +3544,7 @@ export class DeeplineClient {
|
|
|
3544
3544
|
}
|
|
3545
3545
|
|
|
3546
3546
|
/** Who can open a view: workspace members, or anyone with its URL. */
|
|
3547
|
-
async setViewAccess(
|
|
3548
|
-
id: string,
|
|
3549
|
-
access: ViewAccess,
|
|
3550
|
-
): Promise<View> {
|
|
3547
|
+
async setViewAccess(id: string, access: ViewAccess): Promise<View> {
|
|
3551
3548
|
return await this.http.post<View>(
|
|
3552
3549
|
`/api/v2/views/${encodeURIComponent(id)}/access`,
|
|
3553
3550
|
{ access },
|
|
@@ -3590,9 +3587,7 @@ export class DeeplineClient {
|
|
|
3590
3587
|
|
|
3591
3588
|
/** Delete a view. Its Play and runs are not touched. */
|
|
3592
3589
|
async deleteView(id: string): Promise<{ id: string; deleted: boolean }> {
|
|
3593
|
-
return await this.http.delete(
|
|
3594
|
-
`/api/v2/views/${encodeURIComponent(id)}`,
|
|
3595
|
-
);
|
|
3590
|
+
return await this.http.delete(`/api/v2/views/${encodeURIComponent(id)}`);
|
|
3596
3591
|
}
|
|
3597
3592
|
|
|
3598
3593
|
/** The workspace view rules and what the caller may do. */
|
|
@@ -6002,6 +5997,33 @@ export class DeeplineClient {
|
|
|
6002
5997
|
return this.http.get(`/api/v2/integrations/balance?${params}`);
|
|
6003
5998
|
}
|
|
6004
5999
|
|
|
6000
|
+
/** List the internal pilot's workspace connections. */
|
|
6001
|
+
async listWorkspaceIntegrationConnections(): Promise<{
|
|
6002
|
+
connections: Array<{
|
|
6003
|
+
id: string;
|
|
6004
|
+
provider: string;
|
|
6005
|
+
owner: 'workspace';
|
|
6006
|
+
label: string;
|
|
6007
|
+
status: string;
|
|
6008
|
+
authorizationVersion: number;
|
|
6009
|
+
}>;
|
|
6010
|
+
}> {
|
|
6011
|
+
return this.http.get('/api/v2/integrations/connections');
|
|
6012
|
+
}
|
|
6013
|
+
|
|
6014
|
+
/** Manage a workspace-owned OAuth connection. Consent completes in the browser. */
|
|
6015
|
+
async manageWorkspaceIntegrationConnection(input: {
|
|
6016
|
+
action: 'connect' | 'reconnect' | 'replace' | 'disconnect';
|
|
6017
|
+
provider: 'hubspot' | 'google_calendar_availability';
|
|
6018
|
+
connectionId?: string;
|
|
6019
|
+
authorizationVersion?: number;
|
|
6020
|
+
}): Promise<{ url?: string }> {
|
|
6021
|
+
return this.http.post('/api/v2/integrations/connections', {
|
|
6022
|
+
...input,
|
|
6023
|
+
owner: 'workspace',
|
|
6024
|
+
});
|
|
6025
|
+
}
|
|
6026
|
+
|
|
6005
6027
|
/** Get the dashboard link where a workspace owner or admin can connect a provider. */
|
|
6006
6028
|
async getIntegrationConnectLink(
|
|
6007
6029
|
provider: string,
|
|
@@ -6014,13 +6036,30 @@ export class DeeplineClient {
|
|
|
6014
6036
|
async setIntegrationCredentials(
|
|
6015
6037
|
provider: string,
|
|
6016
6038
|
credentials: Record<string, string>,
|
|
6039
|
+
options?: { expectedConnectionId?: string },
|
|
6017
6040
|
): Promise<{ ok: boolean; credential_saved?: boolean }> {
|
|
6018
6041
|
return this.http.post('/api/v2/integrations/connect', {
|
|
6019
6042
|
provider,
|
|
6020
6043
|
credentials,
|
|
6044
|
+
...(options?.expectedConnectionId
|
|
6045
|
+
? { expected_connection_id: options.expectedConnectionId }
|
|
6046
|
+
: {}),
|
|
6021
6047
|
});
|
|
6022
6048
|
}
|
|
6023
6049
|
|
|
6050
|
+
/** Calendar discovery compatibility method. The managed pilot requires calendar IDs in tool and Play inputs. */
|
|
6051
|
+
async listAvailabilityCalendars(cursor?: string): Promise<{
|
|
6052
|
+
connection_id: string;
|
|
6053
|
+
calendars: Array<{ id: string; name: string }>;
|
|
6054
|
+
cursor: string | null;
|
|
6055
|
+
}> {
|
|
6056
|
+
const params = new URLSearchParams();
|
|
6057
|
+
if (cursor) params.set('cursor', cursor);
|
|
6058
|
+
return this.http.get(
|
|
6059
|
+
`/api/v2/integrations/calendar-availability/calendars?${params}`,
|
|
6060
|
+
);
|
|
6061
|
+
}
|
|
6062
|
+
|
|
6024
6063
|
/** Start provider OAuth and return the URL to open in a browser. */
|
|
6025
6064
|
async startIntegrationOAuth(
|
|
6026
6065
|
provider: string,
|
|
@@ -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.534',
|
|
209
209
|
updateSummary: {
|
|
210
210
|
introducedIn: '0.3.90',
|
|
211
211
|
summary:
|
|
@@ -14939,6 +14939,22 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
|
|
|
14939
14939
|
input: Record<string, unknown>,
|
|
14940
14940
|
options?: ToolCallOptions,
|
|
14941
14941
|
): Promise<unknown> {
|
|
14942
|
+
if (
|
|
14943
|
+
toolId.trim() === 'google_calendar_availability_get_free_busy' &&
|
|
14944
|
+
this.activeInlineComposition
|
|
14945
|
+
) {
|
|
14946
|
+
throw new Error(
|
|
14947
|
+
'Google Calendar Availability must be called directly by the approved published Play.',
|
|
14948
|
+
);
|
|
14949
|
+
}
|
|
14950
|
+
if (
|
|
14951
|
+
this.activeInlineComposition &&
|
|
14952
|
+
toolId.trim().startsWith('google_calendar_availability_')
|
|
14953
|
+
) {
|
|
14954
|
+
throw new Error(
|
|
14955
|
+
'Call the Google Calendar booking tool directly in the admitted Play.',
|
|
14956
|
+
);
|
|
14957
|
+
}
|
|
14942
14958
|
if (!this.usesExplicitFreshness) {
|
|
14943
14959
|
return this.executeToolLegacyInternal(key, toolId, input, options);
|
|
14944
14960
|
}
|
|
@@ -15198,7 +15214,9 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
|
|
|
15198
15214
|
completedAt: Date.now(),
|
|
15199
15215
|
unavailableReason: liveDataset
|
|
15200
15216
|
? 'Dataset rows are live observations; the dataset owner controls pagination and recovery.'
|
|
15201
|
-
:
|
|
15217
|
+
: toolId === 'google_calendar_availability_get_free_busy'
|
|
15218
|
+
? 'Team availability and its approval are checked on every invocation.'
|
|
15219
|
+
: 'Workspace reviewer edits and conflict checks must be observed on every invocation.',
|
|
15202
15220
|
};
|
|
15203
15221
|
return isToolExecuteResult(value)
|
|
15204
15222
|
? cloneToolExecuteResultWithExecution(value, {
|
|
@@ -41,6 +41,28 @@ export const RUNTIME_EXECUTION_CAPABILITIES = [
|
|
|
41
41
|
export type RuntimeExecutionCapability =
|
|
42
42
|
(typeof RUNTIME_EXECUTION_CAPABILITIES)[number];
|
|
43
43
|
|
|
44
|
+
export type CalendarBookingBinding = {
|
|
45
|
+
connectionId: string;
|
|
46
|
+
grantGeneration: number;
|
|
47
|
+
apiKeyId: string;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export function isCalendarBookingBinding(
|
|
51
|
+
value: unknown,
|
|
52
|
+
): value is CalendarBookingBinding {
|
|
53
|
+
if (!value || typeof value !== 'object') return false;
|
|
54
|
+
const binding = value as Partial<CalendarBookingBinding>;
|
|
55
|
+
return (
|
|
56
|
+
typeof binding.connectionId === 'string' &&
|
|
57
|
+
/^[a-z0-9]{16,64}$/.test(binding.connectionId) &&
|
|
58
|
+
typeof binding.apiKeyId === 'string' &&
|
|
59
|
+
/^[a-z0-9]{16,64}$/.test(binding.apiKeyId) &&
|
|
60
|
+
typeof binding.grantGeneration === 'number' &&
|
|
61
|
+
Number.isSafeInteger(binding.grantGeneration) &&
|
|
62
|
+
binding.grantGeneration > 0
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
44
66
|
const CAPABILITY_SET = new Set<string>(RUNTIME_EXECUTION_CAPABILITIES);
|
|
45
67
|
|
|
46
68
|
/**
|
|
@@ -50,6 +72,8 @@ const CAPABILITY_SET = new Set<string>(RUNTIME_EXECUTION_CAPABILITIES);
|
|
|
50
72
|
export type RuntimeAuthorityDescriptor = {
|
|
51
73
|
/** Server-owned restriction inherited by every descendant and attempt. */
|
|
52
74
|
operationPolicy?: ExecutionOperationPolicy;
|
|
75
|
+
/** Exact workspace Calendar connection authorized at root run admission. */
|
|
76
|
+
calendarBookingBinding?: CalendarBookingBinding;
|
|
53
77
|
orgId: string;
|
|
54
78
|
workflowId: string;
|
|
55
79
|
runId: string;
|
|
@@ -181,6 +205,8 @@ export function requireRuntimeAuthorityDescriptor(
|
|
|
181
205
|
capabilities.length === 0 ||
|
|
182
206
|
(descriptor.operationPolicy !== undefined &&
|
|
183
207
|
!isExecutionOperationPolicy(descriptor.operationPolicy)) ||
|
|
208
|
+
(descriptor.calendarBookingBinding !== undefined &&
|
|
209
|
+
!isCalendarBookingBinding(descriptor.calendarBookingBinding)) ||
|
|
184
210
|
!fixtureBehavior.ok ||
|
|
185
211
|
(fixtureBehavior.behavior !== null &&
|
|
186
212
|
descriptor.integrationMode !== 'fixture')
|
|
@@ -89,11 +89,31 @@ export type FreshExecutionReplay = { freshInvocation: true };
|
|
|
89
89
|
/** recoverUnbound's answer when the call should execute instead. */
|
|
90
90
|
const EXECUTE: unique symbol = Symbol('execute');
|
|
91
91
|
|
|
92
|
+
/** The author-facing message for each replay refusal reason. */
|
|
93
|
+
function durableReplayInputMismatchMessage(
|
|
94
|
+
operation: string,
|
|
95
|
+
callId: string,
|
|
96
|
+
reason: ReplayRefusal['reason'],
|
|
97
|
+
): string {
|
|
98
|
+
switch (reason) {
|
|
99
|
+
case 'input_changed':
|
|
100
|
+
return `DURABLE_REPLAY_INPUT_MISMATCH: ctx.${operation}("${callId}") was replayed with a different input than the call recorded in this run. Deepline did not return the recorded result or repeat the call, because it may write. Make the input deterministic (no current time or random values), or give each distinct call its own id.`;
|
|
101
|
+
case 'credential_or_action_changed':
|
|
102
|
+
return `DURABLE_REPLAY_INPUT_MISMATCH: ctx.${operation}("${callId}") was replayed with the same input but a different credential or action revision than the call recorded in this run. Deepline did not return the recorded result or repeat the call, because it may write.`;
|
|
103
|
+
case 'recorded_identity_mismatch':
|
|
104
|
+
return `DURABLE_REPLAY_INPUT_MISMATCH: ctx.${operation}("${callId}") could not be matched to its recorded result. This run started on an older Deepline build whose saved history cannot prove which call this was, and the recorded result belongs to a different request. Deepline did not return that result or repeat the call, because it may write. Start a new run.`;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
92
108
|
/**
|
|
93
109
|
* A replay reached a recorded operation of a different request and the call
|
|
94
110
|
* may write. Returning the recorded result would hand back another request's
|
|
95
|
-
* output; executing could repeat a write. Not retryable
|
|
96
|
-
* must be made deterministic, or each distinct call
|
|
111
|
+
* output; executing could repeat a write. Not retryable. For a binding
|
|
112
|
+
* refusal the Play's input must be made deterministic, or each distinct call
|
|
113
|
+
* given its own id. For `recorded_identity_mismatch` (pre-binding history)
|
|
114
|
+
* nothing proves the input changed: an older build numbered identical calls
|
|
115
|
+
* in tool-layer entry order, so the slot may hold a sibling's result, and
|
|
116
|
+
* the run must be started again.
|
|
97
117
|
*/
|
|
98
118
|
export class DurableReplayInputMismatchError extends Error {
|
|
99
119
|
readonly code = 'DURABLE_REPLAY_INPUT_MISMATCH';
|
|
@@ -102,13 +122,9 @@ export class DurableReplayInputMismatchError extends Error {
|
|
|
102
122
|
constructor(
|
|
103
123
|
readonly operation: string,
|
|
104
124
|
readonly callId: string,
|
|
105
|
-
readonly reason: '
|
|
125
|
+
readonly reason: ReplayRefusal['reason'],
|
|
106
126
|
) {
|
|
107
|
-
super(
|
|
108
|
-
reason === 'input_changed'
|
|
109
|
-
? `DURABLE_REPLAY_INPUT_MISMATCH: ctx.${operation}("${callId}") was replayed with a different input than the call recorded in this run. Deepline did not return the recorded result or repeat the call, because it may write. Make the input deterministic (no current time or random values), or give each distinct call its own id.`
|
|
110
|
-
: `DURABLE_REPLAY_INPUT_MISMATCH: ctx.${operation}("${callId}") was replayed with the same input but a different credential or action revision than the call recorded in this run. Deepline did not return the recorded result or repeat the call, because it may write.`,
|
|
111
|
-
);
|
|
127
|
+
super(durableReplayInputMismatchMessage(operation, callId, reason));
|
|
112
128
|
this.name = 'DurableReplayInputMismatchError';
|
|
113
129
|
}
|
|
114
130
|
}
|
|
@@ -313,9 +329,11 @@ function recordedIdentitySources(
|
|
|
313
329
|
: null;
|
|
314
330
|
const execution = result?._metadata?.execution;
|
|
315
331
|
if (
|
|
316
|
-
[
|
|
317
|
-
|
|
318
|
-
|
|
332
|
+
[
|
|
333
|
+
execution?.cacheKey,
|
|
334
|
+
execution?.receiptKey,
|
|
335
|
+
execution?.resultReceiptKey,
|
|
336
|
+
].some((key) => typeof key === 'string' && key.trim())
|
|
319
337
|
) {
|
|
320
338
|
sources.push('result_metadata');
|
|
321
339
|
}
|
|
@@ -744,8 +762,8 @@ export async function executeWithFreshnessReceipt<T>(input: {
|
|
|
744
762
|
if (stored?.status !== 'completed' && stored?.status !== 'skipped') {
|
|
745
763
|
throw new Error(
|
|
746
764
|
key === operationKey ||
|
|
747
|
-
|
|
748
|
-
|
|
765
|
+
key === exactRequestOperationKey ||
|
|
766
|
+
key.startsWith(`${cachePrefix}:reusable:`)
|
|
749
767
|
? 'Completed freshness receipt publication failed.'
|
|
750
768
|
: `Tool Result Receipt ${key} could not publish a completed result.`,
|
|
751
769
|
);
|
|
@@ -891,7 +909,7 @@ export async function executeWithFreshnessReceipt<T>(input: {
|
|
|
891
909
|
throw new DurableReplayInputMismatchError(
|
|
892
910
|
input.operation ?? 'call',
|
|
893
911
|
input.callId ?? 'unknown',
|
|
894
|
-
'
|
|
912
|
+
'recorded_identity_mismatch',
|
|
895
913
|
);
|
|
896
914
|
};
|
|
897
915
|
/**
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { WORKFLOW_EXECUTOR_TOKEN_TTL_SECONDS } from './/runtime-constants';
|
|
2
2
|
import {
|
|
3
3
|
isExecutionOperationPolicy,
|
|
4
|
+
isCalendarBookingBinding,
|
|
5
|
+
type CalendarBookingBinding,
|
|
4
6
|
type ExecutionOperationPolicy,
|
|
5
7
|
DEFAULT_RUNTIME_EXECUTION_CAPABILITIES,
|
|
6
8
|
isRuntimeExecutionCapability,
|
|
@@ -306,6 +308,7 @@ export type WorkflowRunExecutionTokenClaims =
|
|
|
306
308
|
WorkflowInternalTokenBaseClaims & {
|
|
307
309
|
purpose: typeof INTERNAL_WORKFLOW_EXECUTION_PURPOSE;
|
|
308
310
|
operation_policy?: ExecutionOperationPolicy;
|
|
311
|
+
calendar_booking_binding?: CalendarBookingBinding;
|
|
309
312
|
workflow_id: string;
|
|
310
313
|
run_id: string;
|
|
311
314
|
// Billing owner for this execution. Defaults to run_id on older tokens and
|
|
@@ -652,6 +655,8 @@ function isValidWorkflowClaimsShape(
|
|
|
652
655
|
validateFixtureBehavior(claims.fixture_behavior).ok)) &&
|
|
653
656
|
(claims.operation_policy === undefined ||
|
|
654
657
|
isExecutionOperationPolicy(claims.operation_policy)) &&
|
|
658
|
+
(claims.calendar_booking_binding === undefined ||
|
|
659
|
+
isCalendarBookingBinding(claims.calendar_booking_binding)) &&
|
|
655
660
|
(claims.synthetic === undefined || claims.synthetic === true) &&
|
|
656
661
|
(claims.actor_user_id === undefined ||
|
|
657
662
|
typeof claims.actor_user_id === 'string') &&
|
|
@@ -752,6 +757,7 @@ export async function mintIngestionSubscriptionExecutionToken(input: {
|
|
|
752
757
|
|
|
753
758
|
export async function mintWorkflowRunExecutionToken(input: {
|
|
754
759
|
operationPolicy?: ExecutionOperationPolicy;
|
|
760
|
+
calendarBookingBinding?: CalendarBookingBinding;
|
|
755
761
|
orgId: string;
|
|
756
762
|
workflowId: string;
|
|
757
763
|
runId: string;
|
|
@@ -800,6 +806,9 @@ export async function mintWorkflowRunExecutionToken(input: {
|
|
|
800
806
|
...(input.operationPolicy
|
|
801
807
|
? { operation_policy: input.operationPolicy }
|
|
802
808
|
: {}),
|
|
809
|
+
...(input.calendarBookingBinding
|
|
810
|
+
? { calendar_booking_binding: input.calendarBookingBinding }
|
|
811
|
+
: {}),
|
|
803
812
|
org_id: input.orgId,
|
|
804
813
|
workflow_id: input.workflowId,
|
|
805
814
|
run_id: input.runId,
|
|
@@ -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 };
|
|
@@ -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,
|
|
@@ -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-XRZJKHUA.mjs";
|
|
18
|
+
import "./chunk-62SOZ67Y.mjs";
|
|
19
|
+
import "./chunk-E7TP25I2.mjs";
|
|
20
|
+
import "./chunk-TG2UB3A5.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-AK622KIG.mjs";
|
|
25
25
|
import "./chunk-WZYKRD7T.mjs";
|
|
26
26
|
import "./chunk-KRD6H754.mjs";
|
|
27
27
|
export {
|
|
@@ -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 _chunkMQORQ7WLjs = require('./chunk-MQORQ7WL.js');
|
|
18
|
+
require('./chunk-EGTUOYYG.js');
|
|
19
|
+
require('./chunk-XBK6WCVA.js');
|
|
20
|
+
require('./chunk-UWNVFAFN.js');
|
|
21
|
+
require('./chunk-T2N3B7IQ.js');
|
|
22
|
+
require('./chunk-XNYIZMNQ.js');
|
|
23
|
+
require('./chunk-SQWET4SL.js');
|
|
24
|
+
require('./chunk-RH3YRMUY.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 = _chunkMQORQ7WLjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkMQORQ7WLjs.authStatusLine; exports.clearPendingClaim = _chunkMQORQ7WLjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkMQORQ7WLjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkMQORQ7WLjs.handleRegister; exports.handleStatus = _chunkMQORQ7WLjs.handleStatus; exports.handleWait = _chunkMQORQ7WLjs.handleWait; exports.httpJson = _chunkMQORQ7WLjs.httpJson; exports.readPendingAuthClaim = _chunkMQORQ7WLjs.readPendingAuthClaim; exports.readStatusBanner = _chunkMQORQ7WLjs.readStatusBanner; exports.registerAuthCommands = _chunkMQORQ7WLjs.registerAuthCommands; exports.reportApprovalLinkShown = _chunkMQORQ7WLjs.reportApprovalLinkShown; exports.reportSetupCompleted = _chunkMQORQ7WLjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkMQORQ7WLjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkMQORQ7WLjs.statusBannerLine;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WDNRPZED.mjs";
|
|
4
4
|
import {
|
|
5
5
|
iterateCursorPages,
|
|
6
6
|
requireBillingIdempotencyKey
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MG6YL4M7.mjs";
|
|
8
8
|
import "./chunk-L2VKAASU.mjs";
|
|
9
9
|
import "./chunk-FKD3KL5Q.mjs";
|
|
10
10
|
import "./chunk-PSX3WHIH.mjs";
|
|
11
11
|
import "./chunk-UBKA33KY.mjs";
|
|
12
12
|
import {
|
|
13
13
|
PLAY_RUNTIME_PRICING_NOTE
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5FXMEEF4.mjs";
|
|
15
15
|
import "./chunk-5LUF4LAR.mjs";
|
|
16
16
|
import {
|
|
17
17
|
PLAY_SANDBOX_SIZE_INPUTS
|
|
@@ -22,9 +22,9 @@ import {
|
|
|
22
22
|
openInBrowser,
|
|
23
23
|
printCommandEnvelope,
|
|
24
24
|
shouldEmitJson
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-62SOZ67Y.mjs";
|
|
26
|
+
import "./chunk-E7TP25I2.mjs";
|
|
27
|
+
import "./chunk-TG2UB3A5.mjs";
|
|
28
28
|
import {
|
|
29
29
|
AuthError,
|
|
30
30
|
ConfigError
|
|
@@ -33,7 +33,7 @@ import "./chunk-DLIRSHV6.mjs";
|
|
|
33
33
|
import {
|
|
34
34
|
DeeplineError
|
|
35
35
|
} from "./chunk-ZPGGW27Q.mjs";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-AK622KIG.mjs";
|
|
37
37
|
import "./chunk-WZYKRD7T.mjs";
|
|
38
38
|
import "./chunk-KRD6H754.mjs";
|
|
39
39
|
|