@opengeni/sdk 0.52.1 → 1.0.0
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/README.md +1078 -33
- package/dist/accounts.d.ts +153 -0
- package/dist/accounts.js +307 -0
- package/dist/accounts.js.map +1 -0
- package/dist/adapters/express.d.ts +31 -0
- package/dist/adapters/express.js +87 -0
- package/dist/adapters/express.js.map +1 -0
- package/dist/adapters/hono.d.ts +16 -0
- package/dist/adapters/hono.js +8 -0
- package/dist/adapters/hono.js.map +1 -0
- package/dist/adapters/next.d.ts +29 -0
- package/dist/adapters/next.js +22 -0
- package/dist/adapters/next.js.map +1 -0
- package/dist/allowance-refusal.d.ts +2 -0
- package/dist/allowance-refusal.js +50 -0
- package/dist/allowance-refusal.js.map +1 -0
- package/dist/artifact-catalog.d.ts +31 -0
- package/dist/artifact-client.d.ts +23 -11
- package/dist/artifacts.d.ts +1 -1
- package/dist/artifacts.js +7 -5
- package/dist/automations-client.d.ts +17 -0
- package/dist/automations.d.ts +3 -0
- package/dist/automations.js +84 -0
- package/dist/automations.js.map +1 -0
- package/dist/browser.d.ts +11 -0
- package/dist/browser.js +47 -0
- package/dist/browser.js.map +1 -0
- package/dist/chat/fold.d.ts +75 -0
- package/dist/chat/handler.d.ts +41 -0
- package/dist/chat/http.d.ts +67 -0
- package/dist/chat/ids.d.ts +34 -0
- package/dist/chat/index.d.ts +9 -0
- package/dist/chat/index.js +1694 -0
- package/dist/chat/index.js.map +1 -0
- package/dist/chat/openai.d.ts +30 -0
- package/dist/chat/opengeni.d.ts +128 -0
- package/dist/chat/types.d.ts +207 -0
- package/dist/chat/vercel.d.ts +49 -0
- package/dist/chats.d.ts +8 -0
- package/dist/{chunk-KIHGPM7H.js → chunk-2UXZUCEZ.js} +309 -46
- package/dist/chunk-2UXZUCEZ.js.map +1 -0
- package/dist/chunk-4SMEOV3P.js +246 -0
- package/dist/chunk-4SMEOV3P.js.map +1 -0
- package/dist/{chunk-FHI4DFIG.js → chunk-AH5D5Q5V.js} +31 -35
- package/dist/chunk-AH5D5Q5V.js.map +1 -0
- package/dist/chunk-APXVSSSY.js +301 -0
- package/dist/chunk-APXVSSSY.js.map +1 -0
- package/dist/chunk-DUVIYER4.js +639 -0
- package/dist/chunk-DUVIYER4.js.map +1 -0
- package/dist/{chunk-ILQZR5N6.js → chunk-FG3OO5LM.js} +3484 -750
- package/dist/chunk-FG3OO5LM.js.map +1 -0
- package/dist/chunk-GZYZT22T.js +260 -0
- package/dist/chunk-GZYZT22T.js.map +1 -0
- package/dist/chunk-HMGADJGZ.js +150 -0
- package/dist/chunk-HMGADJGZ.js.map +1 -0
- package/dist/{chunk-DXDL7EEW.js → chunk-KWADQ227.js} +198 -114
- package/dist/chunk-KWADQ227.js.map +1 -0
- package/dist/chunk-LY2K6ELJ.js +126 -0
- package/dist/chunk-LY2K6ELJ.js.map +1 -0
- package/dist/chunk-MOTJYIYL.js +340 -0
- package/dist/chunk-MOTJYIYL.js.map +1 -0
- package/dist/{chunk-MZWTWOX6.js → chunk-NC57YMUO.js} +447 -3
- package/dist/chunk-NC57YMUO.js.map +1 -0
- package/dist/chunk-RWKB6YZG.js +1270 -0
- package/dist/chunk-RWKB6YZG.js.map +1 -0
- package/dist/chunk-U6CV2SXO.js +195 -0
- package/dist/chunk-U6CV2SXO.js.map +1 -0
- package/dist/chunk-UM4ZXXJR.js +9 -0
- package/dist/chunk-UM4ZXXJR.js.map +1 -0
- package/dist/chunk-V6GIY62B.js +229 -0
- package/dist/chunk-V6GIY62B.js.map +1 -0
- package/dist/chunk-WU6GQG25.js +268 -0
- package/dist/chunk-WU6GQG25.js.map +1 -0
- package/dist/{chunk-VWE2QIVO.js → chunk-XNG7YGR3.js} +23 -6
- package/dist/chunk-XNG7YGR3.js.map +1 -0
- package/dist/{chunk-FRJFNDIR.js → chunk-YIKA2QT4.js} +37 -2
- package/dist/chunk-YIKA2QT4.js.map +1 -0
- package/dist/chunk-ZKPY6YAJ.js +135 -0
- package/dist/chunk-ZKPY6YAJ.js.map +1 -0
- package/dist/client.d.ts +843 -107
- package/dist/codex-realtime-controller.d.ts +6 -0
- package/dist/codex-realtime-controller.js +2 -2
- package/dist/codex-realtime-v3.d.ts +13 -2
- package/dist/company-brain.d.ts +22 -0
- package/dist/company-profile.d.ts +14 -1
- package/dist/core.d.ts +9 -3
- package/dist/core.js +28 -9
- package/dist/deprecation.d.ts +47 -0
- package/dist/desktop.d.ts +8 -0
- package/dist/document-authority-client.d.ts +51 -0
- package/dist/document-authority.d.ts +2 -0
- package/dist/document-authority.js +12 -0
- package/dist/document-authority.js.map +1 -0
- package/dist/editable-artifacts/browser-session.d.ts +7 -3
- package/dist/editable-artifacts/controller.d.ts +4 -1
- package/dist/editable-artifacts/errors.d.ts +1 -1
- package/dist/editable-artifacts/http-live-transport.d.ts +6 -2
- package/dist/editable-artifacts/index.d.ts +2 -0
- package/dist/editable-artifacts/open-failure.d.ts +9 -0
- package/dist/editable-artifacts/types.d.ts +6 -3
- package/dist/editable-artifacts/worker/kernel-adapter.d.ts +1 -1
- package/dist/editable-artifacts-worker.js +44 -17
- package/dist/editable-artifacts-worker.js.map +1 -1
- package/dist/editable-artifacts.js +243 -124
- package/dist/editable-artifacts.js.map +1 -1
- package/dist/embedding-client.d.ts +129 -0
- package/dist/errors.d.ts +36 -1
- package/dist/feedback.d.ts +23 -0
- package/dist/gateway-realtime-transport.d.ts +1 -0
- package/dist/gateway-realtime-transport.js +5 -3
- package/dist/github-repositories.d.ts +10 -0
- package/dist/github-repositories.js +36 -0
- package/dist/github-repositories.js.map +1 -0
- package/dist/index.d.ts +61 -12
- package/dist/index.js +277 -126
- package/dist/index.js.map +1 -1
- package/dist/interaction-revision-stream.d.ts +11 -0
- package/dist/interaction.d.ts +687 -5
- package/dist/interaction.js +32 -1
- package/dist/knowledge.d.ts +7 -0
- package/dist/knowledge.js +20 -0
- package/dist/knowledge.js.map +1 -0
- package/dist/message-links.d.ts +68 -0
- package/dist/model-context.d.ts +68 -0
- package/dist/model-display.d.ts +2 -0
- package/dist/model-display.js +15 -0
- package/dist/model-display.js.map +1 -0
- package/dist/model-picker-order.d.ts +1 -0
- package/dist/model-picker-order.js +10 -0
- package/dist/model-picker-order.js.map +1 -0
- package/dist/organization-integration-policy.d.ts +26 -0
- package/dist/organization-integration-policy.js +26 -0
- package/dist/organization-integration-policy.js.map +1 -0
- package/dist/organization-private-session-settings.d.ts +6 -0
- package/dist/organization-private-session-settings.js +22 -0
- package/dist/organization-private-session-settings.js.map +1 -0
- package/dist/organization-user-setup.d.ts +8 -0
- package/dist/organization-user-setup.js +16 -0
- package/dist/organization-user-setup.js.map +1 -0
- package/dist/pr-review-client.d.ts +16 -0
- package/dist/pr-review.d.ts +4 -0
- package/dist/pr-review.js +62 -0
- package/dist/pr-review.js.map +1 -0
- package/dist/preference-registry.d.ts +9 -1
- package/dist/proxy.d.ts +7 -5
- package/dist/realtime.d.ts +6 -4
- package/dist/realtime.js +10 -6
- package/dist/realtime.js.map +1 -1
- package/dist/retained-artifacts.d.ts +5 -1
- package/dist/session-history-import.d.ts +22 -0
- package/dist/session-history-import.js +36 -0
- package/dist/session-history-import.js.map +1 -0
- package/dist/session-list-entries.d.ts +1 -0
- package/dist/session-list-entries.js +7 -0
- package/dist/session-list-entries.js.map +1 -0
- package/dist/session-message-search.d.ts +53 -0
- package/dist/session-proxy-client.d.ts +24 -0
- package/dist/session-proxy.d.ts +245 -0
- package/dist/session-proxy.js +24 -0
- package/dist/session-proxy.js.map +1 -0
- package/dist/session-titles.d.ts +2 -0
- package/dist/site-browser-entry.d.ts +1 -0
- package/dist/site-browser-runtime.gen.d.ts +1 -0
- package/dist/site-document.d.ts +5 -0
- package/dist/site-document.js +20 -0
- package/dist/site-document.js.map +1 -0
- package/dist/site-document.test.d.ts +1 -0
- package/dist/site-http.d.ts +16 -0
- package/dist/site-tool-bridge.d.ts +44 -0
- package/dist/site.d.ts +101 -0
- package/dist/site.js +49 -0
- package/dist/site.js.map +1 -0
- package/dist/skills.d.ts +75 -0
- package/dist/stream.d.ts +2 -0
- package/dist/tenant-workspaces.d.ts +47 -0
- package/dist/tenant-workspaces.js +8 -0
- package/dist/tenant-workspaces.js.map +1 -0
- package/dist/tool-auth.d.ts +87 -0
- package/dist/tool-auth.js +23 -0
- package/dist/tool-auth.js.map +1 -0
- package/dist/tool-display-metadata.d.ts +3 -0
- package/dist/tools-FXBLUWAE.js +12 -0
- package/dist/tools-FXBLUWAE.js.map +1 -0
- package/dist/tools.d.ts +61 -0
- package/dist/types.d.ts +3048 -406
- package/dist/usage-allowances.d.ts +36 -0
- package/dist/usage-allowances.js +80 -0
- package/dist/usage-allowances.js.map +1 -0
- package/dist/workspace-artifacts.d.ts +33 -5
- package/dist/workspace-instruction-policies.d.ts +24 -2
- package/dist/workspace-integrations.d.ts +74 -0
- package/dist/workspace-integrations.js +65 -0
- package/dist/workspace-integrations.js.map +1 -0
- package/dist/workspace-learning.d.ts +124 -0
- package/dist/workspace-live-stream.d.ts +14 -0
- package/dist/workspace-state.d.ts +8 -71
- package/package.json +108 -3
- package/src/accounts.ts +443 -0
- package/src/adapters/express.ts +136 -0
- package/src/adapters/hono.ts +18 -0
- package/src/adapters/next.ts +42 -0
- package/src/allowance-refusal.ts +5 -0
- package/src/artifact-catalog.ts +41 -0
- package/src/artifact-client.ts +43 -52
- package/src/artifacts.ts +7 -1
- package/src/automations-client.ts +124 -0
- package/src/automations.ts +15 -0
- package/src/browser.ts +54 -0
- package/src/chat/fold.ts +431 -0
- package/src/chat/handler.ts +240 -0
- package/src/chat/http.ts +257 -0
- package/src/chat/ids.ts +85 -0
- package/src/chat/index.ts +87 -0
- package/src/chat/openai.ts +439 -0
- package/src/chat/opengeni.ts +722 -0
- package/src/chat/types.ts +219 -0
- package/src/chat/vercel.ts +204 -0
- package/src/chats.ts +16 -0
- package/src/client.ts +5162 -792
- package/src/codex-realtime-controller.ts +260 -12
- package/src/codex-realtime-lifecycle.ts +1 -0
- package/src/codex-realtime-v3.ts +162 -31
- package/src/codex-realtime.ts +1 -1
- package/src/company-brain.ts +59 -0
- package/src/company-profile.ts +17 -1
- package/src/core.ts +23 -1
- package/src/deprecation.ts +149 -0
- package/src/desktop.ts +11 -1
- package/src/document-authority-client.ts +219 -0
- package/src/document-authority.ts +17 -0
- package/src/editable-artifacts/browser-session.ts +36 -22
- package/src/editable-artifacts/controller.ts +102 -47
- package/src/editable-artifacts/errors.ts +2 -0
- package/src/editable-artifacts/http-live-transport.ts +62 -37
- package/src/editable-artifacts/index.ts +6 -0
- package/src/editable-artifacts/open-failure.ts +79 -0
- package/src/editable-artifacts/storage.ts +31 -40
- package/src/editable-artifacts/types.ts +6 -3
- package/src/editable-artifacts/worker/kernel-adapter.ts +23 -7
- package/src/editable-artifacts/worker/runtime.ts +26 -13
- package/src/editable-artifacts/worker/wire-codec.ts +23 -5
- package/src/embedding-client.ts +519 -0
- package/src/errors.ts +185 -4
- package/src/feedback.ts +20 -0
- package/src/gateway-realtime-transport.ts +253 -110
- package/src/github-repositories.ts +60 -0
- package/src/index.ts +603 -54
- package/src/interaction-revision-stream.ts +117 -0
- package/src/interaction.ts +1367 -51
- package/src/knowledge.ts +72 -0
- package/src/message-links.ts +178 -0
- package/src/model-context.ts +112 -0
- package/src/model-display.ts +10 -0
- package/src/model-picker-order.ts +6 -0
- package/src/organization-integration-policy.ts +54 -0
- package/src/organization-private-session-settings.ts +33 -0
- package/src/organization-user-setup.ts +31 -0
- package/src/pr-review-client.ts +92 -0
- package/src/pr-review.ts +17 -0
- package/src/preference-registry.ts +11 -0
- package/src/proxy.ts +17 -6
- package/src/realtime.ts +15 -4
- package/src/retained-artifacts.ts +101 -0
- package/src/session-history-import.ts +84 -0
- package/src/session-list-entries.ts +1 -0
- package/src/session-message-search.ts +47 -0
- package/src/session-proxy-client.ts +64 -0
- package/src/session-proxy.ts +1473 -0
- package/src/session-titles.ts +10 -0
- package/src/site-browser-entry.ts +6 -0
- package/src/site-browser-runtime.gen.ts +2 -0
- package/src/site-document.test.ts +64 -0
- package/src/site-document.ts +18 -0
- package/src/site-http.ts +162 -0
- package/src/site-tool-bridge.ts +146 -0
- package/src/site.ts +585 -0
- package/src/skills.ts +69 -0
- package/src/sse.ts +8 -2
- package/src/stream.ts +38 -4
- package/src/tenant-workspaces.ts +148 -0
- package/src/tool-auth.ts +301 -0
- package/src/tool-display-metadata.ts +19 -0
- package/src/tools.ts +396 -0
- package/src/types.ts +3607 -493
- package/src/usage-allowances.ts +189 -0
- package/src/workspace-artifacts.ts +40 -6
- package/src/workspace-instruction-policies.ts +26 -1
- package/src/workspace-integrations.ts +402 -0
- package/src/workspace-learning.ts +138 -0
- package/src/workspace-live-stream.ts +137 -0
- package/src/workspace-state.ts +8 -82
- package/dist/chunk-DXDL7EEW.js.map +0 -1
- package/dist/chunk-FHI4DFIG.js.map +0 -1
- package/dist/chunk-FRJFNDIR.js.map +0 -1
- package/dist/chunk-ILQZR5N6.js.map +0 -1
- package/dist/chunk-KIHGPM7H.js.map +0 -1
- package/dist/chunk-MZWTWOX6.js.map +0 -1
- package/dist/chunk-V5F253OG.js +0 -116
- package/dist/chunk-V5F253OG.js.map +0 -1
- package/dist/chunk-VWE2QIVO.js.map +0 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { WorkspaceTranscriptionPolicy } from "./transcription.js";
|
|
2
|
+
export type { ClaudeSubscriptionOAuthStartResponse, ClaudeSubscriptionOAuthCompleteRequest, ClaudeSubscriptionOAuthCompleteResponse, } from "@opengeni/contracts";
|
|
3
|
+
export type { SessionMessageSearchRequest, SessionMessageSearchMatch, SessionMessageSearchResponse, SessionMessagePreview, SessionMessagePreviewReference, } from "./session-message-search.js";
|
|
4
|
+
export type BundledSkillId = "builtin:opengeni-help" | "builtin:opengeni-client" | "builtin:opengeni-visualize" | "builtin:document-parsing" | "builtin:opengeni-skills" | "builtin:opengeni-projects" | "builtin:opengeni-schedules" | "builtin:opengeni-documents" | "builtin:opengeni-spreadsheets" | "builtin:opengeni-presentations" | "builtin:opengeni-sites" | "builtin:opengeni-video-generation";
|
|
2
5
|
export type CodexRealtimeWebrtcVersion = "v3";
|
|
3
6
|
export type CodexRealtimeVoice = "juniper" | "maple" | "spruce" | "ember" | "vale" | "breeze" | "arbor" | "sol" | "cove";
|
|
4
7
|
export type CodexRealtimeWebrtcRequest = {
|
|
@@ -51,6 +54,74 @@ export type GatewayRealtimeConnectResponse = {
|
|
|
51
54
|
instructions: string;
|
|
52
55
|
replay: false;
|
|
53
56
|
};
|
|
57
|
+
export type ToolGatewayIdentity = {
|
|
58
|
+
serverId: string;
|
|
59
|
+
toolName: string;
|
|
60
|
+
};
|
|
61
|
+
export type ToolGatewayCatalogEntry = {
|
|
62
|
+
identity: ToolGatewayIdentity;
|
|
63
|
+
modelName: string;
|
|
64
|
+
codemodePath: string[];
|
|
65
|
+
title?: string | undefined;
|
|
66
|
+
description?: string | undefined;
|
|
67
|
+
inputSchema: Record<string, unknown>;
|
|
68
|
+
outputSchema?: Record<string, unknown> | undefined;
|
|
69
|
+
annotations?: Record<string, unknown> | undefined;
|
|
70
|
+
icons?: Array<Record<string, unknown>> | undefined;
|
|
71
|
+
source: "opengeni" | "files" | "docs" | "mcp" | "codex_apps" | "interaction";
|
|
72
|
+
approval: "none" | "human" | "policy";
|
|
73
|
+
};
|
|
74
|
+
export type ToolGatewayCatalog = {
|
|
75
|
+
version: 1;
|
|
76
|
+
accountId: string;
|
|
77
|
+
workspaceId: string;
|
|
78
|
+
generation: number;
|
|
79
|
+
digest: string;
|
|
80
|
+
createdAt: string;
|
|
81
|
+
entries: ToolGatewayCatalogEntry[];
|
|
82
|
+
};
|
|
83
|
+
export type ToolGatewayResult = {
|
|
84
|
+
content: Array<{
|
|
85
|
+
type: string;
|
|
86
|
+
[key: string]: unknown;
|
|
87
|
+
}>;
|
|
88
|
+
structuredContent?: Record<string, unknown> | undefined;
|
|
89
|
+
isError?: boolean | undefined;
|
|
90
|
+
_meta?: Record<string, unknown> | undefined;
|
|
91
|
+
[key: string]: unknown;
|
|
92
|
+
};
|
|
93
|
+
export type ToolGatewayCallRequest = {
|
|
94
|
+
operationId?: string | undefined;
|
|
95
|
+
catalogDigest: string;
|
|
96
|
+
identity: ToolGatewayIdentity;
|
|
97
|
+
arguments: Record<string, unknown>;
|
|
98
|
+
siteArtifactId?: string | undefined;
|
|
99
|
+
siteVersionId?: string | undefined;
|
|
100
|
+
approvalToken?: string | undefined;
|
|
101
|
+
};
|
|
102
|
+
export type ToolGatewayApprovalRequest = {
|
|
103
|
+
operationId: string;
|
|
104
|
+
catalogDigest: string;
|
|
105
|
+
identity: ToolGatewayIdentity;
|
|
106
|
+
arguments: Record<string, unknown>;
|
|
107
|
+
};
|
|
108
|
+
export type ToolGatewayApprovalResponse = {
|
|
109
|
+
operationId: string;
|
|
110
|
+
catalogDigest: string;
|
|
111
|
+
identity: ToolGatewayIdentity;
|
|
112
|
+
approvalToken: string;
|
|
113
|
+
expiresAt: string;
|
|
114
|
+
};
|
|
115
|
+
export type ToolGatewayCallResponse = {
|
|
116
|
+
operationId: string;
|
|
117
|
+
catalogDigest: string;
|
|
118
|
+
result: ToolGatewayResult;
|
|
119
|
+
};
|
|
120
|
+
export type ToolGatewayDeclarationsResponse = {
|
|
121
|
+
catalogDigest: string;
|
|
122
|
+
moduleSpecifier: string;
|
|
123
|
+
source: string;
|
|
124
|
+
};
|
|
54
125
|
export type ActivateCodexRealtimeConnectionRequest = {
|
|
55
126
|
operationId: string;
|
|
56
127
|
browserInstanceId: string;
|
|
@@ -90,6 +161,8 @@ export type SessionRealtimeInboundEntry = {
|
|
|
90
161
|
delegationItemId?: string | null | undefined;
|
|
91
162
|
text?: string | null | undefined;
|
|
92
163
|
payload?: Record<string, unknown> | undefined;
|
|
164
|
+
/** Model-visible application context attached to this exact realtime message. */
|
|
165
|
+
modelContext?: string | undefined;
|
|
93
166
|
};
|
|
94
167
|
export type SyncSessionRealtimeLedgerRequest = {
|
|
95
168
|
browserInstanceId: string;
|
|
@@ -112,11 +185,11 @@ export type SyncSessionRealtimeLedgerResponse = {
|
|
|
112
185
|
}>;
|
|
113
186
|
outbound: SessionRealtimeLedgerEntry[];
|
|
114
187
|
};
|
|
115
|
-
export type SessionRealtimeModel = "gpt-live-1-boulder-alpha" | "opengeni-gateway/openai/gpt-realtime-2.1" | "opengeni-gateway/openai/gpt-realtime-mini" | "opengeni-gateway/xai/grok-voice-think-fast-2.0" | "workspace-gateway/openai/gpt-realtime-2.1" | "workspace-gateway/openai/gpt-realtime-mini" | "workspace-gateway/xai/grok-voice-think-fast-2.0";
|
|
188
|
+
export type SessionRealtimeModel = "gpt-live-1-boulder-alpha" | "supergrok/grok-voice-think-fast-2.0" | "opengeni-gateway/openai/gpt-realtime-2.1" | "opengeni-gateway/openai/gpt-realtime-mini" | "opengeni-gateway/xai/grok-voice-think-fast-2.0" | "workspace-gateway/openai/gpt-realtime-2.1" | "workspace-gateway/openai/gpt-realtime-mini" | "workspace-gateway/xai/grok-voice-think-fast-2.0";
|
|
116
189
|
export type WorkspaceRealtimeModelCatalogItem = {
|
|
117
190
|
id: SessionRealtimeModel;
|
|
118
191
|
label: string;
|
|
119
|
-
provider: "OpenGeni" | "Connected Codex" | "Your Gateway";
|
|
192
|
+
provider: "OpenGeni" | "Connected Codex" | "Connected SuperGrok" | "Your Gateway";
|
|
120
193
|
description: string;
|
|
121
194
|
available: boolean;
|
|
122
195
|
unavailableReason: string | null;
|
|
@@ -126,7 +199,7 @@ export type WorkspaceRealtimeModelCatalogResponse = {
|
|
|
126
199
|
models: WorkspaceRealtimeModelCatalogItem[];
|
|
127
200
|
};
|
|
128
201
|
export type SessionRealtimeState = "active" | "ended";
|
|
129
|
-
export type SessionRealtimeEndReason = "user_stop" | "browser_unload" | "lease_expired";
|
|
202
|
+
export type SessionRealtimeEndReason = "user_stop" | "browser_unload" | "lease_expired" | "authority_revoked";
|
|
130
203
|
export type SessionRealtimeMode = {
|
|
131
204
|
id: string;
|
|
132
205
|
sessionId: string;
|
|
@@ -161,7 +234,7 @@ export type SessionRealtimeMutationResponse = {
|
|
|
161
234
|
replay: boolean;
|
|
162
235
|
};
|
|
163
236
|
export type SessionStatus = "queued" | "running" | "idle" | "requires_action" | "recovering" | "waiting_capacity" | "failed" | "cancelled";
|
|
164
|
-
export type SandboxBackend = "docker" | "modal" | "local" | "none" | "daytona" | "runloop" | "e2b" | "blaxel" | "cloudflare" | "vercel" | "selfhosted";
|
|
237
|
+
export type SandboxBackend = "docker" | "modal" | "local" | "none" | "daytona" | "runloop" | "e2b" | "blaxel" | "cloudflare" | "vercel" | "selfhosted" | "opensandbox";
|
|
165
238
|
export type SandboxOs = "linux" | "macos" | "windows";
|
|
166
239
|
export type SandboxCapabilityName = "FileSystem" | "Terminal" | "Git" | "DesktopStream" | "Recording";
|
|
167
240
|
export type CapabilityUnavailableReason = "backend_unsupported" | "os_unsupported" | "not_provisioned" | "disabled_by_policy" | "lease_cold" | "tier_headless" | "agent_offline" | "agent_reconnecting" | "consent_required" | "display_unavailable";
|
|
@@ -184,7 +257,7 @@ export type SessionCapabilities = {
|
|
|
184
257
|
reason: CapabilityUnavailableReason | null;
|
|
185
258
|
};
|
|
186
259
|
Terminal: {
|
|
187
|
-
transport: "sse-events" | "pty-ws" | null;
|
|
260
|
+
transport: "sse-events" | "pty-ws" | "relay-pty" | null;
|
|
188
261
|
ptyCapable: boolean;
|
|
189
262
|
shell: string;
|
|
190
263
|
url: string | null;
|
|
@@ -218,6 +291,7 @@ export type SessionCapabilities = {
|
|
|
218
291
|
codecs: ("h264-mp4" | "vp9-webm")[];
|
|
219
292
|
reason: CapabilityUnavailableReason | null;
|
|
220
293
|
};
|
|
294
|
+
/** @deprecated Use the managed ComputerSession interaction tools. */
|
|
221
295
|
ComputerUse: {
|
|
222
296
|
available: boolean;
|
|
223
297
|
readOnly: boolean;
|
|
@@ -230,6 +304,7 @@ export type TerminalCapability = SessionCapabilities["Terminal"];
|
|
|
230
304
|
export type GitCapability = SessionCapabilities["Git"];
|
|
231
305
|
export type DesktopStreamCapability = SessionCapabilities["DesktopStream"];
|
|
232
306
|
export type RecordingCapability = SessionCapabilities["Recording"];
|
|
307
|
+
/** @deprecated Use the managed ComputerSession interaction tools. */
|
|
233
308
|
export type ComputerUseCapability = SessionCapabilities["ComputerUse"];
|
|
234
309
|
export type StreamUrlRotatedPayload = {
|
|
235
310
|
url: string;
|
|
@@ -279,7 +354,7 @@ export type AttachViewerResponse = ViewerHolder & {
|
|
|
279
354
|
terminalUrl: string | null;
|
|
280
355
|
terminalToken: string | null;
|
|
281
356
|
terminalExpiresAt: string | null;
|
|
282
|
-
terminalTransport: "pty-ws" | null;
|
|
357
|
+
terminalTransport: "pty-ws" | "relay-pty" | null;
|
|
283
358
|
};
|
|
284
359
|
export type AcknowledgeStreamRequest = {
|
|
285
360
|
acknowledgeUnredacted?: boolean | undefined;
|
|
@@ -304,6 +379,8 @@ export type RepositoryResourceRef = {
|
|
|
304
379
|
kind: "repository";
|
|
305
380
|
uri: string;
|
|
306
381
|
ref: string;
|
|
382
|
+
/** Exact immutable commit that repository materialization must produce. */
|
|
383
|
+
expectedCommitSha?: string | undefined;
|
|
307
384
|
/**
|
|
308
385
|
* Optional workspace-relative override. When omitted, OpenGeni persists
|
|
309
386
|
* `repos/<encoded-host>/<owner>/<repo>` so equal names on different Git
|
|
@@ -313,6 +390,7 @@ export type RepositoryResourceRef = {
|
|
|
313
390
|
mountPath?: string | undefined;
|
|
314
391
|
subpath?: string | undefined;
|
|
315
392
|
provider?: GitCredentialProvider | undefined;
|
|
393
|
+
connectionType?: "github_personal" | undefined;
|
|
316
394
|
credentialBindingId?: GitCredentialBindingId | undefined;
|
|
317
395
|
access?: GitRepositoryAccess | undefined;
|
|
318
396
|
repositoryId?: number | string | undefined;
|
|
@@ -321,6 +399,12 @@ export type RepositoryResourceRef = {
|
|
|
321
399
|
connectionId?: string | undefined;
|
|
322
400
|
githubInstallationId?: number | undefined;
|
|
323
401
|
githubRepositoryId?: number | undefined;
|
|
402
|
+
/**
|
|
403
|
+
* Best-effort materialization: a failed clone logs a warning and the
|
|
404
|
+
* session continues without this repository instead of failing sandbox
|
|
405
|
+
* setup. Omit it to keep a failed clone fatal.
|
|
406
|
+
*/
|
|
407
|
+
optional?: boolean | undefined;
|
|
324
408
|
};
|
|
325
409
|
/** Value mirror of `@opengeni/contracts`; parity-tested without importing it from ordinary SDK entries. */
|
|
326
410
|
export declare const DEFAULT_FILE_RESOURCE_MOUNT_ROOT: ".opengeni/files";
|
|
@@ -334,14 +418,22 @@ export type ResourceRef = RepositoryResourceRef | FileResourceRef;
|
|
|
334
418
|
export type ToolRef = {
|
|
335
419
|
kind: "mcp";
|
|
336
420
|
id: string;
|
|
421
|
+
/** Skip this server when its connect/tools-list fails instead of failing the turn. */
|
|
337
422
|
optional?: boolean | undefined;
|
|
423
|
+
/**
|
|
424
|
+
* Put this server's tool schemas on the first model request instead of behind
|
|
425
|
+
* `tool_search` progressive discovery. A startup choice only; grants nothing.
|
|
426
|
+
*/
|
|
427
|
+
eager?: boolean | undefined;
|
|
338
428
|
};
|
|
339
429
|
export type SessionToolPolicy = {
|
|
340
430
|
mode: "workspace_default" | "explicit" | "inherited";
|
|
341
431
|
inheritedFromSessionId: string | null;
|
|
432
|
+
excludedMcpServerIds?: string[] | undefined;
|
|
342
433
|
};
|
|
343
434
|
export type UpdateSessionToolPolicyRequest = {
|
|
344
435
|
mode: "workspace_default";
|
|
436
|
+
excludedMcpServerIds?: string[] | undefined;
|
|
345
437
|
expectedVersion: number;
|
|
346
438
|
} | {
|
|
347
439
|
mode: "explicit";
|
|
@@ -371,10 +463,22 @@ export type SessionEffectiveToolPolicy = {
|
|
|
371
463
|
};
|
|
372
464
|
idsTruncated: boolean;
|
|
373
465
|
};
|
|
466
|
+
export type SessionGoalReportRequirement = {
|
|
467
|
+
id: string;
|
|
468
|
+
title: string;
|
|
469
|
+
};
|
|
470
|
+
export type SessionGoalReportDelivery = {
|
|
471
|
+
requirementId: string;
|
|
472
|
+
artifactId: string;
|
|
473
|
+
inspectionReceiptId: string;
|
|
474
|
+
};
|
|
374
475
|
export type GoalSpec = {
|
|
375
476
|
text: string;
|
|
376
477
|
successCriteria?: string | undefined;
|
|
478
|
+
rootConstraints?: string[] | undefined;
|
|
479
|
+
reportRequirements?: SessionGoalReportRequirement[] | undefined;
|
|
377
480
|
maxAutoContinuations?: number | undefined;
|
|
481
|
+
mutationPolicy?: SessionGoalMutationPolicy | undefined;
|
|
378
482
|
};
|
|
379
483
|
export type SessionMcpServerInput = {
|
|
380
484
|
id: string;
|
|
@@ -392,6 +496,28 @@ export type SessionMcpCredentialUpdateInput = {
|
|
|
392
496
|
id: string;
|
|
393
497
|
headers: Record<string, string>;
|
|
394
498
|
};
|
|
499
|
+
export type RotateSessionMcpCredentialsRequest = {
|
|
500
|
+
operationKey: string;
|
|
501
|
+
updates: Array<{
|
|
502
|
+
id: string;
|
|
503
|
+
expectedCredentialVersion: number;
|
|
504
|
+
expectedServerUrl: string;
|
|
505
|
+
} & ({
|
|
506
|
+
headers: Record<string, string>;
|
|
507
|
+
} | {
|
|
508
|
+
nativeConnectionId: string;
|
|
509
|
+
replacementServerUrl?: string | undefined;
|
|
510
|
+
})>;
|
|
511
|
+
};
|
|
512
|
+
export type RotateSessionMcpCredentialsReceipt = {
|
|
513
|
+
operationKey: string;
|
|
514
|
+
sessionId: string;
|
|
515
|
+
servers: Array<{
|
|
516
|
+
id: string;
|
|
517
|
+
credentialVersion: number;
|
|
518
|
+
}>;
|
|
519
|
+
appliedAt: string;
|
|
520
|
+
};
|
|
395
521
|
export type SessionMcpApprovalPolicy = boolean | string[];
|
|
396
522
|
export type SessionMcpServerMetadata = {
|
|
397
523
|
id: string;
|
|
@@ -406,13 +532,45 @@ export type UpdateSessionMcpApprovalPolicyRequest = {
|
|
|
406
532
|
requireApproval: SessionMcpApprovalPolicy;
|
|
407
533
|
};
|
|
408
534
|
export type UpdateSessionMcpApprovalPolicyResponse = {
|
|
409
|
-
server:
|
|
535
|
+
server: SessionMcpApprovalPolicyTarget;
|
|
410
536
|
effectiveFrom: "next_attempt";
|
|
411
537
|
};
|
|
538
|
+
export type SessionMcpApprovalPolicyTarget = SessionMcpServerMetadata | {
|
|
539
|
+
id: string;
|
|
540
|
+
source: "workspace";
|
|
541
|
+
requireApproval: SessionMcpApprovalPolicy;
|
|
542
|
+
};
|
|
412
543
|
export type ConnectionKind = "oauth2" | "api_key" | "app_install" | "delegated";
|
|
413
544
|
export type ConnectionStatus = "active" | "needs_reauth" | "revoked" | "error";
|
|
545
|
+
export type UserResourceDelegation = {
|
|
546
|
+
authorityId: string;
|
|
547
|
+
grantId: string;
|
|
548
|
+
organizationId: string;
|
|
549
|
+
workspaceId: string;
|
|
550
|
+
sessionId: string | null;
|
|
551
|
+
action: string;
|
|
552
|
+
mode: "once" | "session" | "always";
|
|
553
|
+
context: "user_private" | "workspace_shared";
|
|
554
|
+
authorityEpoch: number | null;
|
|
555
|
+
authorityGeneration: number;
|
|
556
|
+
grantGeneration: number;
|
|
557
|
+
resourceVersionId?: string | null | undefined;
|
|
558
|
+
};
|
|
559
|
+
export type McpConnectionAccountSelection = {
|
|
560
|
+
serverId: string;
|
|
561
|
+
connectionId: string;
|
|
562
|
+
};
|
|
414
563
|
export type McpServerConnectionRef = {
|
|
415
564
|
connectionId?: string | undefined;
|
|
565
|
+
accountSelection?: "all_eligible" | undefined;
|
|
566
|
+
authoritySource?: "host" | undefined;
|
|
567
|
+
/** accepted_turn is configuration-only; each accepted owner must select a grant. */
|
|
568
|
+
hostBinding?: {
|
|
569
|
+
bindingId: string;
|
|
570
|
+
generation: number;
|
|
571
|
+
} | {
|
|
572
|
+
selection: "accepted_turn";
|
|
573
|
+
} | undefined;
|
|
416
574
|
provider?: string | undefined;
|
|
417
575
|
providerDomain: string;
|
|
418
576
|
kind?: ConnectionKind | undefined;
|
|
@@ -434,6 +592,7 @@ export type McpPersonalConnectionDelegation = {
|
|
|
434
592
|
export type McpPersonalConnectionSummary = Pick<McpPersonalConnectionDelegation, "serverId" | "providerDomain">;
|
|
435
593
|
export type ConnectionMetadata = {
|
|
436
594
|
id: string;
|
|
595
|
+
authorityId?: string | undefined;
|
|
437
596
|
accountId: string;
|
|
438
597
|
workspaceId: string;
|
|
439
598
|
subjectId: string | null;
|
|
@@ -454,21 +613,174 @@ export type ConnectionMetadata = {
|
|
|
454
613
|
createdAt: string;
|
|
455
614
|
updatedAt: string;
|
|
456
615
|
};
|
|
457
|
-
|
|
616
|
+
/** Where a brokered credential is written on each outbound provider request. */
|
|
617
|
+
export type ConnectionCredentialPlacement = {
|
|
618
|
+
carrier: "header" | "query" | "cookie";
|
|
619
|
+
name: string;
|
|
620
|
+
value: string;
|
|
621
|
+
/** Prepended to `value`, for example `"Bearer "` or `"Token "`. */
|
|
622
|
+
prefix?: string | undefined;
|
|
623
|
+
};
|
|
624
|
+
/**
|
|
625
|
+
* Write-only secret for a brokered `api_key` Connection (API Integrations and
|
|
626
|
+
* MCP servers). The broker never infers a location: use exact `headers`, or
|
|
627
|
+
* `placements` when the provider expects a query parameter or cookie (API
|
|
628
|
+
* Integrations only) or a prefixed value. Match the carrier/name reported by
|
|
629
|
+
* `previewApiIntegration().auth`. A bare `{ apiKey }` is rejected with 422.
|
|
630
|
+
*
|
|
631
|
+
* @example { headers: { Authorization: "Token abc123" } }
|
|
632
|
+
* @example { placements: [{ carrier: "header", name: "X-Api-Key", value: "abc123" }] }
|
|
633
|
+
*/
|
|
634
|
+
export type ApiKeyConnectionCredential = {
|
|
635
|
+
headers: Record<string, string>;
|
|
636
|
+
placements?: never;
|
|
637
|
+
} | {
|
|
638
|
+
placements: ConnectionCredentialPlacement[];
|
|
639
|
+
headers?: never;
|
|
640
|
+
};
|
|
641
|
+
type CreateConnectionRequestBase = {
|
|
458
642
|
providerDomain: string;
|
|
459
|
-
kind: ConnectionKind;
|
|
460
643
|
ownership?: ConnectionOwnership | undefined;
|
|
461
644
|
/** @deprecated use ownership */
|
|
462
645
|
subjectId?: string | null | undefined;
|
|
463
|
-
credential: Record<string, unknown>;
|
|
464
646
|
grantedScopes?: string[] | undefined;
|
|
465
647
|
expiresAt?: string | null | undefined;
|
|
648
|
+
operationId?: string | undefined;
|
|
649
|
+
/** Direct OpenAI/Azure keys only: verify the provider/model before saving. */
|
|
650
|
+
verifyModelAccess?: boolean | undefined;
|
|
651
|
+
};
|
|
652
|
+
export type CreateConnectionRequest = CreateConnectionRequestBase & ({
|
|
653
|
+
kind: "api_key";
|
|
654
|
+
credential: ApiKeyConnectionCredential;
|
|
655
|
+
metadata?: Record<string, unknown> | undefined;
|
|
656
|
+
} | {
|
|
657
|
+
/**
|
|
658
|
+
* Workspace model-provider key lane (Vercel AI Gateway / OpenRouter),
|
|
659
|
+
* selected by `metadata.credentialRole`; not usable by integrations.
|
|
660
|
+
*/
|
|
661
|
+
kind: "api_key";
|
|
662
|
+
credential: {
|
|
663
|
+
apiKey: string;
|
|
664
|
+
};
|
|
665
|
+
metadata: {
|
|
666
|
+
credentialRole: string;
|
|
667
|
+
} & Record<string, unknown>;
|
|
668
|
+
} | {
|
|
669
|
+
kind: Exclude<ConnectionKind, "api_key">;
|
|
670
|
+
credential: Record<string, unknown>;
|
|
466
671
|
metadata?: Record<string, unknown> | undefined;
|
|
672
|
+
});
|
|
673
|
+
export type PersonalGitHubConnectionMetadata = {
|
|
674
|
+
credentialRole: "opengeni_github_personal";
|
|
675
|
+
providerFamily: "github";
|
|
676
|
+
providerPrincipalId: string;
|
|
677
|
+
githubUserId: string;
|
|
678
|
+
githubLogin: string;
|
|
679
|
+
oauthEnvironment: string;
|
|
680
|
+
oauthClientMarker: string;
|
|
681
|
+
credentialBindingId: string;
|
|
682
|
+
connectedAt: string;
|
|
683
|
+
lastVerifiedAt: string;
|
|
684
|
+
refreshTokenExpiresAt?: string | null | undefined;
|
|
685
|
+
disconnectedAt?: string | null | undefined;
|
|
686
|
+
[key: string]: unknown;
|
|
687
|
+
};
|
|
688
|
+
export type PersonalGitHubOAuthStartRequest = {
|
|
689
|
+
connectionId?: string | undefined;
|
|
690
|
+
returnPath?: string | undefined;
|
|
691
|
+
};
|
|
692
|
+
export type PersonalGitHubOAuthStartResponse = {
|
|
693
|
+
authorizationUrl: string;
|
|
694
|
+
expiresAt: string;
|
|
695
|
+
};
|
|
696
|
+
export type PersonalGitHubConnectionStatusResponse = {
|
|
697
|
+
enabled: boolean;
|
|
698
|
+
connection: ConnectionMetadata | null;
|
|
699
|
+
reviewUrl: string | null;
|
|
700
|
+
};
|
|
701
|
+
export type PersonalGitHubDisconnectRequest = {
|
|
702
|
+
expectedVersion: number;
|
|
703
|
+
idempotencyKey: string;
|
|
704
|
+
};
|
|
705
|
+
export type PersonalGitHubRepositoryAccess = "read" | "write";
|
|
706
|
+
export type PersonalGitHubRepositoryPermissions = {
|
|
707
|
+
pull: boolean;
|
|
708
|
+
push: boolean;
|
|
709
|
+
admin: boolean;
|
|
710
|
+
maintain: boolean;
|
|
711
|
+
triage: boolean;
|
|
712
|
+
};
|
|
713
|
+
export type PersonalGitHubRepository = {
|
|
714
|
+
repositoryId: string;
|
|
715
|
+
fullName: string;
|
|
716
|
+
canonicalUrl: string;
|
|
717
|
+
defaultBranch: string;
|
|
718
|
+
visibility: "public" | "private" | "internal";
|
|
719
|
+
private: boolean;
|
|
720
|
+
archived: boolean;
|
|
721
|
+
disabled: boolean;
|
|
722
|
+
permissions: PersonalGitHubRepositoryPermissions;
|
|
723
|
+
};
|
|
724
|
+
export type PersonalGitHubSelectedRepository = PersonalGitHubRepository & {
|
|
725
|
+
selectedAccess: PersonalGitHubRepositoryAccess;
|
|
726
|
+
selectionGeneration: number;
|
|
727
|
+
selectedAt: string;
|
|
728
|
+
lastVerifiedAt: string;
|
|
729
|
+
};
|
|
730
|
+
export type PersonalGitHubRepositorySelectionState = {
|
|
731
|
+
connectionAuthorityGeneration: number;
|
|
732
|
+
credentialBindingId: string;
|
|
733
|
+
providerPrincipalId: string;
|
|
734
|
+
selectionGeneration: number;
|
|
735
|
+
repositories: PersonalGitHubSelectedRepository[];
|
|
736
|
+
};
|
|
737
|
+
export type PersonalGitHubRepositoryCatalogItem = PersonalGitHubRepository & {
|
|
738
|
+
selectedAccess: PersonalGitHubRepositoryAccess | null;
|
|
739
|
+
};
|
|
740
|
+
export type ListPersonalGitHubRepositoriesOptions = {
|
|
741
|
+
cursor?: number | undefined;
|
|
742
|
+
limit?: number | undefined;
|
|
743
|
+
};
|
|
744
|
+
export type ListPersonalGitHubRepositoriesResponse = {
|
|
745
|
+
repositories: PersonalGitHubRepositoryCatalogItem[];
|
|
746
|
+
nextCursor: number | null;
|
|
747
|
+
selection: PersonalGitHubRepositorySelectionState;
|
|
748
|
+
};
|
|
749
|
+
export type PersonalGitHubRepositorySelectionInput = {
|
|
750
|
+
repositoryId: string;
|
|
751
|
+
fullName: string;
|
|
752
|
+
access: PersonalGitHubRepositoryAccess;
|
|
753
|
+
};
|
|
754
|
+
export type ReplacePersonalGitHubRepositorySelectionsRequest = {
|
|
755
|
+
expectedConnectionAuthorityGeneration: number;
|
|
756
|
+
expectedSelectionGeneration: number;
|
|
757
|
+
idempotencyKey: string;
|
|
758
|
+
repositories: PersonalGitHubRepositorySelectionInput[];
|
|
759
|
+
};
|
|
760
|
+
export type VerifyPersonalGitHubRepositorySelectionsRequest = {
|
|
761
|
+
expectedConnectionAuthorityGeneration: number;
|
|
762
|
+
expectedSelectionGeneration: number;
|
|
763
|
+
idempotencyKey: string;
|
|
467
764
|
};
|
|
468
765
|
export type OpenGeniSlackBotInstallRequest = {
|
|
469
766
|
/** Existing OpenGeni Slack bot connection to reinstall in place. */
|
|
470
767
|
connectionId?: string | undefined;
|
|
471
768
|
};
|
|
769
|
+
export type FikenInstallRequest = {
|
|
770
|
+
apiToken: string;
|
|
771
|
+
defaultCompanySlug?: string | undefined;
|
|
772
|
+
/** Existing Fiken connection to rewrite in place (reconnect). */
|
|
773
|
+
connectionId?: string | undefined;
|
|
774
|
+
};
|
|
775
|
+
export type FikenOAuthStartRequest = {
|
|
776
|
+
returnPath?: string | undefined;
|
|
777
|
+
/** Existing Fiken connection to re-authorize in place (reconnect). */
|
|
778
|
+
connectionId?: string | undefined;
|
|
779
|
+
};
|
|
780
|
+
export type FikenOAuthStartResponse = {
|
|
781
|
+
authorizationUrl: string;
|
|
782
|
+
expiresAt: string;
|
|
783
|
+
};
|
|
472
784
|
export type OpenGeniSlackBotInstallStart = {
|
|
473
785
|
authorizationUrl: string;
|
|
474
786
|
expiresAt: string;
|
|
@@ -487,7 +799,7 @@ export type SlackInstallationBinding = {
|
|
|
487
799
|
slackTeamName: string;
|
|
488
800
|
botId: string;
|
|
489
801
|
botUserId: string;
|
|
490
|
-
botDisplayName: "OpenGeni";
|
|
802
|
+
botDisplayName: "OpenGeni" | "OpenGeni Staging";
|
|
491
803
|
state: SlackInstallationBindingState;
|
|
492
804
|
quarantineReason: string | null;
|
|
493
805
|
version: number;
|
|
@@ -541,16 +853,25 @@ export type GoogleDriveConnectionMetadata = {
|
|
|
541
853
|
googleEmail: string;
|
|
542
854
|
googleDisplayName: string | null;
|
|
543
855
|
verifiedAt: string;
|
|
544
|
-
accessMode: "metadata_readonly" | "readonly";
|
|
856
|
+
accessMode: "file_only" | "metadata_readonly" | "readonly";
|
|
545
857
|
lifecycle?: GoogleDriveConnectionLifecycle | undefined;
|
|
858
|
+
outputDestination?: GoogleDriveOutputDestination | undefined;
|
|
546
859
|
documentDestination?: ConnectorDocumentDestination | undefined;
|
|
547
860
|
selectedSources?: GoogleDriveSelectedSource[] | undefined;
|
|
548
861
|
/** @deprecated Read selectedSources; retained while existing connections migrate. */
|
|
549
862
|
selectedSource?: GoogleDriveSelectedSource | null | undefined;
|
|
550
863
|
[key: string]: unknown;
|
|
551
864
|
};
|
|
865
|
+
export type GoogleDriveOutputDestination = {
|
|
866
|
+
folderId: string;
|
|
867
|
+
folderName: string;
|
|
868
|
+
driveId: string | null;
|
|
869
|
+
location: "my_drive" | "shared_drive";
|
|
870
|
+
selectedAt: string;
|
|
871
|
+
};
|
|
552
872
|
export type GoogleDriveOAuthStartRequest = {
|
|
553
873
|
connectionId?: string | undefined;
|
|
874
|
+
capability?: "source_read" | "publish" | undefined;
|
|
554
875
|
};
|
|
555
876
|
export type GoogleDriveOAuthStartResponse = {
|
|
556
877
|
authorizationUrl: string;
|
|
@@ -696,6 +1017,8 @@ export type UpdateConnectionRequest = {
|
|
|
696
1017
|
grantedScopes?: string[] | undefined;
|
|
697
1018
|
expiresAt?: string | null | undefined;
|
|
698
1019
|
metadata?: Record<string, unknown> | undefined;
|
|
1020
|
+
expectedVersion?: number | undefined;
|
|
1021
|
+
operationId?: string | undefined;
|
|
699
1022
|
};
|
|
700
1023
|
export type ConnectionResponse = {
|
|
701
1024
|
connection: ConnectionMetadata;
|
|
@@ -710,6 +1033,8 @@ export type OAuthStartRequest = {
|
|
|
710
1033
|
resource?: string | undefined;
|
|
711
1034
|
requestedScopes?: string[] | undefined;
|
|
712
1035
|
returnPath?: string | undefined;
|
|
1036
|
+
/** Exact trusted-host destination; requires verified external-user mode. */
|
|
1037
|
+
returnUrl?: string | undefined;
|
|
713
1038
|
connectionId?: string | undefined;
|
|
714
1039
|
ownership?: ConnectionOwnership | undefined;
|
|
715
1040
|
oauthClient?: {
|
|
@@ -770,11 +1095,123 @@ export type IntegrationClientMetadata = {
|
|
|
770
1095
|
grant_types: Array<"authorization_code" | "refresh_token">;
|
|
771
1096
|
response_types: ["code"];
|
|
772
1097
|
};
|
|
1098
|
+
export type SessionVisibility = "private" | "workspace";
|
|
1099
|
+
export type SessionTenancyCreateCapabilities = {
|
|
1100
|
+
activated: boolean;
|
|
1101
|
+
canCreatePrivate: boolean;
|
|
1102
|
+
reason: "available" | "not_activated" | "managed_session_required" | "unavailable";
|
|
1103
|
+
};
|
|
1104
|
+
export type SessionTenancyPublicProjection = {
|
|
1105
|
+
visibility: SessionVisibility;
|
|
1106
|
+
authorityEpoch: number;
|
|
1107
|
+
ownedByCurrentUser: boolean;
|
|
1108
|
+
fork: {
|
|
1109
|
+
sourceVisibility: SessionVisibility;
|
|
1110
|
+
sourceAuthorityEpoch: number;
|
|
1111
|
+
forkedAt: string;
|
|
1112
|
+
} | null;
|
|
1113
|
+
};
|
|
1114
|
+
export type UpdateSessionVisibilityRequest = {
|
|
1115
|
+
visibility: SessionVisibility;
|
|
1116
|
+
expectedAuthorityEpoch: number;
|
|
1117
|
+
idempotencyKey: string;
|
|
1118
|
+
};
|
|
1119
|
+
export type UpdateSessionVisibilityResponse = {
|
|
1120
|
+
operationId: string;
|
|
1121
|
+
eventId: string | null;
|
|
1122
|
+
eventSequence: number | null;
|
|
1123
|
+
visibility: SessionVisibility;
|
|
1124
|
+
authorityEpoch: number;
|
|
1125
|
+
changed: boolean;
|
|
1126
|
+
replay: boolean;
|
|
1127
|
+
revokedGrantCount: number;
|
|
1128
|
+
};
|
|
1129
|
+
export type ForkSessionRequest = {
|
|
1130
|
+
idempotencyKey: string;
|
|
1131
|
+
visibility: SessionVisibility;
|
|
1132
|
+
workspaceSharedAcknowledged: boolean;
|
|
1133
|
+
rigId?: string | null | undefined;
|
|
1134
|
+
variableSetIds?: string[] | undefined;
|
|
1135
|
+
};
|
|
1136
|
+
export type ForkSessionResponse = {
|
|
1137
|
+
operationId: string;
|
|
1138
|
+
eventId: string;
|
|
1139
|
+
eventSequence: number;
|
|
1140
|
+
sessionId: string;
|
|
1141
|
+
workspaceId: string;
|
|
1142
|
+
visibility: SessionVisibility;
|
|
1143
|
+
authorityEpoch: 1;
|
|
1144
|
+
copiedHistoryItemCount: number;
|
|
1145
|
+
replay: boolean;
|
|
1146
|
+
};
|
|
1147
|
+
export type SessionBackgroundCommandActivity = {
|
|
1148
|
+
unavailableCount?: number | undefined;
|
|
1149
|
+
state: "running" | "stopping";
|
|
1150
|
+
count: number;
|
|
1151
|
+
};
|
|
1152
|
+
/** Stored reconciliation checkpoints, not a live provider probe or native ACK. */
|
|
1153
|
+
export type SessionBackgroundCommandReconciliation = {
|
|
1154
|
+
lastOutcome: string | null;
|
|
1155
|
+
attempts: number;
|
|
1156
|
+
dueAt: string;
|
|
1157
|
+
claimedAt: string | null;
|
|
1158
|
+
terminalProof: {
|
|
1159
|
+
outcome: "exited";
|
|
1160
|
+
exitCode: number;
|
|
1161
|
+
observedAt: string;
|
|
1162
|
+
} | {
|
|
1163
|
+
outcome: "lost";
|
|
1164
|
+
exitCode: null;
|
|
1165
|
+
observedAt: string;
|
|
1166
|
+
} | null;
|
|
1167
|
+
};
|
|
1168
|
+
export type SessionBackgroundCommand = {
|
|
1169
|
+
observationStatus?: "unavailable" | undefined;
|
|
1170
|
+
reconciliation?: SessionBackgroundCommandReconciliation | undefined;
|
|
1171
|
+
id: string;
|
|
1172
|
+
workspaceId: string;
|
|
1173
|
+
sessionId: string;
|
|
1174
|
+
provider: "managed" | "connected_machine";
|
|
1175
|
+
state: "running" | "stopping" | "exited" | "lost";
|
|
1176
|
+
commandPreview: string;
|
|
1177
|
+
commandText?: string | undefined;
|
|
1178
|
+
cancelRequestedAt: string | null;
|
|
1179
|
+
exitCode: number | null;
|
|
1180
|
+
settlementReason: string | null;
|
|
1181
|
+
startedAt: string;
|
|
1182
|
+
settledAt: string | null;
|
|
1183
|
+
updatedAt: string;
|
|
1184
|
+
};
|
|
1185
|
+
export type SessionBackgroundCommandListResponse = {
|
|
1186
|
+
commands: SessionBackgroundCommand[];
|
|
1187
|
+
};
|
|
1188
|
+
export type CancelSessionBackgroundCommandResult = {
|
|
1189
|
+
command: SessionBackgroundCommand;
|
|
1190
|
+
accepted: boolean;
|
|
1191
|
+
};
|
|
773
1192
|
export type Session = {
|
|
1193
|
+
/** Detail-only dispatch evidence; delivery does not prove turn execution. */
|
|
1194
|
+
dispatchWait?: {
|
|
1195
|
+
state: "pending" | "acknowledged" | "unavailable";
|
|
1196
|
+
attempts: number;
|
|
1197
|
+
nextAttemptAt: string | null;
|
|
1198
|
+
lastError: string | null;
|
|
1199
|
+
} | null | undefined;
|
|
1200
|
+
/** Detail-only failure evidence through lastSequence; independent of timeline paging. */
|
|
1201
|
+
failureDiagnostics?: {
|
|
1202
|
+
eventId: string;
|
|
1203
|
+
sequence: number;
|
|
1204
|
+
turnId: string | null;
|
|
1205
|
+
occurredAt: string;
|
|
1206
|
+
payload: unknown;
|
|
1207
|
+
} | null | undefined;
|
|
1208
|
+
bundledSkillIds?: BundledSkillId[] | undefined;
|
|
774
1209
|
id: string;
|
|
775
1210
|
workspaceId: string;
|
|
776
1211
|
accountId: string;
|
|
777
1212
|
status: SessionStatus;
|
|
1213
|
+
backgroundCommandActivity?: SessionBackgroundCommandActivity | undefined;
|
|
1214
|
+
hasSchedules?: boolean | undefined;
|
|
778
1215
|
initialMessage: string;
|
|
779
1216
|
title: string | null;
|
|
780
1217
|
titleSource: "user" | "agent" | null;
|
|
@@ -788,10 +1225,14 @@ export type Session = {
|
|
|
788
1225
|
toolPolicyVersion: number;
|
|
789
1226
|
effectiveToolPolicy?: SessionEffectiveToolPolicy | undefined;
|
|
790
1227
|
metadata: Record<string, unknown>;
|
|
1228
|
+
/** Present only when session-tenancy product activation is enabled for the organization. */
|
|
1229
|
+
tenancy?: SessionTenancyPublicProjection | undefined;
|
|
791
1230
|
/** Frozen creator fact; later turns carry their own independent initiator. */
|
|
792
1231
|
createdBy: TurnInitiator;
|
|
793
1232
|
createdByContext: Record<string, unknown>;
|
|
794
1233
|
model: string;
|
|
1234
|
+
reasoningEffort: ReasoningEffort;
|
|
1235
|
+
latencyMode: LatencyMode;
|
|
795
1236
|
sandboxBackend: SandboxBackend;
|
|
796
1237
|
sandboxOs: SandboxOs;
|
|
797
1238
|
sandboxGroupId: string;
|
|
@@ -799,14 +1240,26 @@ export type Session = {
|
|
|
799
1240
|
activeEpoch: number;
|
|
800
1241
|
/** Explicit connected-machine project root; null uses the agent launch root. */
|
|
801
1242
|
workingDir: string | null;
|
|
1243
|
+
/** Ordered low-to-high precedence; the final entry is the legacy singular alias. */
|
|
1244
|
+
variableSetIds?: string[] | undefined;
|
|
802
1245
|
variableSetId: string | null;
|
|
803
1246
|
/** @deprecated use variableSetId */
|
|
804
1247
|
environmentId: string | null;
|
|
805
1248
|
rigId: string | null;
|
|
806
1249
|
rigVersionId: string | null;
|
|
1250
|
+
/** Workspace channel the session is filed under; null = unfiled (inbox). */
|
|
1251
|
+
channelId: string | null;
|
|
807
1252
|
firstPartyMcpPermissions: string[] | null;
|
|
808
1253
|
firstPartyMcpTools: FirstPartyMcpToolName[];
|
|
1254
|
+
/**
|
|
1255
|
+
* Frozen agent configuration; null for sessions created without one (legacy
|
|
1256
|
+
* behavior). Omitted by older servers.
|
|
1257
|
+
*/
|
|
1258
|
+
agent?: ResolvedAgentConfig | null | undefined;
|
|
1259
|
+
/** Capability-level view of what a configured session can use; null for legacy. */
|
|
1260
|
+
effectiveTools?: AgentEffectiveTools | null | undefined;
|
|
809
1261
|
mcpServers: SessionMcpServerMetadata[];
|
|
1262
|
+
mcpApprovalPolicies?: Record<string, SessionMcpApprovalPolicy> | undefined;
|
|
810
1263
|
parentSessionId: string | null;
|
|
811
1264
|
/** Immutable server-authored nested-agent lineage and policy snapshot. */
|
|
812
1265
|
rootSessionId: string;
|
|
@@ -822,34 +1275,90 @@ export type Session = {
|
|
|
822
1275
|
queueHeadPosition: number;
|
|
823
1276
|
queueTailPosition: number;
|
|
824
1277
|
effectiveControl: EffectiveSessionControl;
|
|
1278
|
+
/** Current durable input wait; an elapsed deadline does not prove a new turn started. */
|
|
1279
|
+
inputWait?: {
|
|
1280
|
+
deadlineAt: string;
|
|
1281
|
+
reason: string;
|
|
1282
|
+
} | null | undefined;
|
|
825
1283
|
lastSequence: number;
|
|
826
1284
|
/** Multi-account Codex (P1): the account this session is pinned to (null ⇒ follow workspace active). */
|
|
827
1285
|
codexPinnedCredentialId?: string | null;
|
|
828
1286
|
/** Multi-account Codex (P1): the account the most recent turn ran on (the "Running on:" indicator). */
|
|
829
1287
|
codexLastCredentialId?: string | null;
|
|
1288
|
+
/** Accepted current-turn account, separate from future session preferences. */
|
|
1289
|
+
codexCurrentSelection?: {
|
|
1290
|
+
credentialId: string | null;
|
|
1291
|
+
waiting: boolean;
|
|
1292
|
+
} | null | undefined;
|
|
830
1293
|
/**
|
|
831
1294
|
* Frozen at create. `remote_v2` ⇒ Codex remote compaction + Codex-only model
|
|
832
1295
|
* admission; `portable` ⇒ plaintext compaction and free provider switching.
|
|
833
1296
|
*/
|
|
834
1297
|
codexCompactionMode: "remote_v2" | "portable";
|
|
1298
|
+
/**
|
|
1299
|
+
* The `code_search` decision frozen at create. A turn gets the tool only when
|
|
1300
|
+
* this is true, the deployment still offers it, the workspace is not Off, and
|
|
1301
|
+
* the turn has POSIX compute.
|
|
1302
|
+
*/
|
|
1303
|
+
codeSearchEnabled?: boolean;
|
|
835
1304
|
/** Personal (authenticated subject) workspace pin state, never workspace-global. */
|
|
836
1305
|
pinned?: boolean;
|
|
837
1306
|
/** Stable pin ordering key; null when this subject has not pinned the session. */
|
|
838
1307
|
pinnedAt?: string | null;
|
|
839
1308
|
/** Optimistic pin-state revision; zero represents an absent pin relation. */
|
|
840
1309
|
pinVersion?: number;
|
|
1310
|
+
/** Personal explicit acknowledgment state. */
|
|
1311
|
+
unread?: boolean;
|
|
1312
|
+
/** Personal actively-working label. */
|
|
1313
|
+
activelyWorking?: boolean;
|
|
1314
|
+
/** Optimistic unread/actively-working revision. */
|
|
1315
|
+
attentionVersion?: number;
|
|
1316
|
+
/** Personal archive state. */
|
|
1317
|
+
archived?: boolean;
|
|
1318
|
+
archivedAt?: string | null;
|
|
1319
|
+
/**
|
|
1320
|
+
* Read-only imported timeline, independent of personal archive/restore state.
|
|
1321
|
+
* Never model-facing conversation history.
|
|
1322
|
+
*/
|
|
1323
|
+
importedArchive?: {
|
|
1324
|
+
importId: string;
|
|
1325
|
+
importedAt: string;
|
|
1326
|
+
readOnly: true;
|
|
1327
|
+
} | undefined;
|
|
1328
|
+
/** Optimistic archive-state revision. */
|
|
1329
|
+
archiveVersion?: number;
|
|
841
1330
|
/** Server-authoritative descendant counts populated by session-list reads. */
|
|
842
1331
|
treeStats?: {
|
|
843
1332
|
directChildren: number;
|
|
844
1333
|
totalDescendants: number;
|
|
845
1334
|
runningDescendants: number;
|
|
846
1335
|
queuedDescendants: number;
|
|
1336
|
+
waitingDescendants?: number | undefined;
|
|
847
1337
|
attentionDescendants: number;
|
|
848
1338
|
pausedDescendants: number;
|
|
849
1339
|
failedDescendants: number;
|
|
1340
|
+
unreadDescendants?: number | undefined;
|
|
1341
|
+
unreadFailedDescendants?: number | undefined;
|
|
1342
|
+
activelyWorkingDescendants?: number | undefined;
|
|
1343
|
+
/**
|
|
1344
|
+
* Earliest moment one of the counted `attentionDescendants` entered
|
|
1345
|
+
* `requires_action`; null when none is waiting, absent on older servers.
|
|
1346
|
+
*/
|
|
1347
|
+
attentionSince?: string | null | undefined;
|
|
850
1348
|
/** Counts are lower bounds rather than exact totals when true. */
|
|
851
1349
|
truncated: boolean;
|
|
852
1350
|
} | undefined;
|
|
1351
|
+
/**
|
|
1352
|
+
* When this session's own open turn entered `requires_action`. Populated by
|
|
1353
|
+
* list and lineage reads for `requires_action` sessions; null otherwise.
|
|
1354
|
+
*/
|
|
1355
|
+
requiresActionSince?: string | null | undefined;
|
|
1356
|
+
/** Agent access scope; absent on servers before the agent-access release. */
|
|
1357
|
+
agentAccess?: SessionAgentAccess | undefined;
|
|
1358
|
+
/** Opaque end-user label; null when the session carries none. */
|
|
1359
|
+
scopeSubjectId?: SessionScopeSubjectId | null | undefined;
|
|
1360
|
+
/** Memory scope; absent on servers before the agent-access release. */
|
|
1361
|
+
memoryScope?: SessionMemoryScope | undefined;
|
|
853
1362
|
createdAt: string;
|
|
854
1363
|
updatedAt: string;
|
|
855
1364
|
};
|
|
@@ -858,14 +1367,88 @@ export type CreateSessionResponse = Session & {
|
|
|
858
1367
|
initialTurnId: string | null;
|
|
859
1368
|
};
|
|
860
1369
|
export type SessionSummary = Session;
|
|
861
|
-
/**
|
|
1370
|
+
/** Compact list-only record, excluding prompts and execution configuration. */
|
|
1371
|
+
export type SessionListEntry = Pick<Session, "id" | "workspaceId" | "accountId" | "status" | "backgroundCommandActivity" | "hasSchedules" | "title" | "titleSource" | "createdBy" | "channelId" | "parentSessionId" | "rootSessionId" | "effectiveControl" | "inputWait" | "lastSequence" | "pinned" | "pinnedAt" | "pinVersion" | "unread" | "activelyWorking" | "attentionVersion" | "archived" | "archivedAt" | "importedArchive" | "archiveVersion" | "treeStats" | "requiresActionSince" | "createdAt" | "updatedAt"> & {
|
|
1372
|
+
displayTitle: string;
|
|
1373
|
+
renameSeed: string;
|
|
1374
|
+
scheduledTaskId: string | null;
|
|
1375
|
+
siteOrigin: {
|
|
1376
|
+
siteId: string;
|
|
1377
|
+
title: string;
|
|
1378
|
+
} | null;
|
|
1379
|
+
};
|
|
1380
|
+
export type SessionListEntryResponse = Omit<SessionListResponse, "pinned" | "sessions"> & {
|
|
1381
|
+
projection: "summary";
|
|
1382
|
+
pinned: SessionListEntry[];
|
|
1383
|
+
sessions: SessionListEntry[];
|
|
1384
|
+
};
|
|
1385
|
+
/** Complete metadata for authorized roots and ordinary project trees. */
|
|
1386
|
+
export type SessionListTotals = {
|
|
1387
|
+
needsYouCount: number;
|
|
1388
|
+
groups: Array<{
|
|
1389
|
+
channelId: string | null;
|
|
1390
|
+
total: number;
|
|
1391
|
+
attention: number;
|
|
1392
|
+
attentionSince: string | null;
|
|
1393
|
+
failed: number;
|
|
1394
|
+
active: number;
|
|
1395
|
+
queued: number;
|
|
1396
|
+
unread: number;
|
|
1397
|
+
activeWork: number;
|
|
1398
|
+
}>;
|
|
1399
|
+
};
|
|
862
1400
|
export type SessionListResponse = {
|
|
1401
|
+
totals?: SessionListTotals;
|
|
1402
|
+
needsYouOnly?: true;
|
|
863
1403
|
pinned: Session[];
|
|
864
1404
|
/** True when the server omitted older pins from its bounded pinned section. */
|
|
865
1405
|
pinnedTruncated?: boolean;
|
|
1406
|
+
/** Present only when the server recognized and applied additive list filters. */
|
|
1407
|
+
filtersApplied?: true;
|
|
1408
|
+
/** Effective server ordering. Name: ASCII-space trim, ASCII case fold,
|
|
1409
|
+
* UTF-8 byte order, id ASC. Date keys and id ties are DESC. */
|
|
1410
|
+
sortBy?: "updatedAt" | "createdAt" | "name" | "archivedAt";
|
|
1411
|
+
archiveStatus?: "active" | "archived" | "all";
|
|
1412
|
+
/** Server-resolved Site origin filter, when requested. */
|
|
1413
|
+
originSiteId?: string;
|
|
866
1414
|
sessions: Session[];
|
|
867
1415
|
nextCursor: string | null;
|
|
868
1416
|
};
|
|
1417
|
+
export type WorkClaimSubjectType = "repository" | "branch" | "pull_request" | "issue" | "artifact" | "release" | "ci_run" | "other";
|
|
1418
|
+
export type WorkClaimDiscoverySummary = {
|
|
1419
|
+
id: string;
|
|
1420
|
+
sessionId: string;
|
|
1421
|
+
subject: {
|
|
1422
|
+
namespace: string;
|
|
1423
|
+
type: WorkClaimSubjectType;
|
|
1424
|
+
canonicalKey: string;
|
|
1425
|
+
displayLabel: string | null;
|
|
1426
|
+
};
|
|
1427
|
+
role: "working" | "reviewing" | "monitoring" | "delivering";
|
|
1428
|
+
state: "active" | "released" | "superseded" | "stale";
|
|
1429
|
+
revision: number;
|
|
1430
|
+
provenance: "explicit_agent" | "user_api" | "trusted_integration" | "session_resource" | "system_lifecycle";
|
|
1431
|
+
version: {
|
|
1432
|
+
kind: "git_commit" | "branch_head" | "pull_request_head" | "artifact_version" | "release_version" | "ci_run" | "other";
|
|
1433
|
+
value: string;
|
|
1434
|
+
} | null;
|
|
1435
|
+
observedAt: string;
|
|
1436
|
+
updatedAt: string;
|
|
1437
|
+
settledAt: string | null;
|
|
1438
|
+
};
|
|
1439
|
+
export type WorkDiscoveryProjection = {
|
|
1440
|
+
claims: WorkClaimDiscoverySummary[];
|
|
1441
|
+
claimsTruncated: boolean;
|
|
1442
|
+
match: {
|
|
1443
|
+
class: "exact_subject" | "title" | "goal" | "fuzzy";
|
|
1444
|
+
field: "subject" | "title" | "goal" | "claim_key" | "claim_label";
|
|
1445
|
+
scoreBand: "exact" | "strong" | "related";
|
|
1446
|
+
claimId: string | null;
|
|
1447
|
+
} | null;
|
|
1448
|
+
possibleOverlap: boolean;
|
|
1449
|
+
advisoryOnly: true;
|
|
1450
|
+
noAdditionalAccess: true;
|
|
1451
|
+
};
|
|
869
1452
|
/** Compact, bounded session projection for workspace agent-topology browsers. */
|
|
870
1453
|
export type AgentTopologySession = {
|
|
871
1454
|
id: string;
|
|
@@ -880,6 +1463,11 @@ export type AgentTopologySession = {
|
|
|
880
1463
|
titleTruncated: boolean;
|
|
881
1464
|
}>;
|
|
882
1465
|
status: SessionStatus;
|
|
1466
|
+
goal: {
|
|
1467
|
+
status: SessionGoalStatus;
|
|
1468
|
+
summary: string;
|
|
1469
|
+
summaryTruncated: boolean;
|
|
1470
|
+
} | null;
|
|
883
1471
|
pause: {
|
|
884
1472
|
state: "active" | "paused";
|
|
885
1473
|
additionalBlockerCount: number;
|
|
@@ -900,6 +1488,7 @@ export type AgentTopologySession = {
|
|
|
900
1488
|
failedDescendants: number;
|
|
901
1489
|
truncated: boolean;
|
|
902
1490
|
};
|
|
1491
|
+
relatedWork: WorkDiscoveryProjection;
|
|
903
1492
|
createdAt: string;
|
|
904
1493
|
updatedAt: string;
|
|
905
1494
|
};
|
|
@@ -907,17 +1496,30 @@ export type AgentTopologyPageResponse = {
|
|
|
907
1496
|
sessions: AgentTopologySession[];
|
|
908
1497
|
total: number;
|
|
909
1498
|
hasMore: boolean;
|
|
1499
|
+
/** Operator rollout decision for human advisory presentation. */
|
|
1500
|
+
humanAdvisoriesEnabled?: boolean | undefined;
|
|
910
1501
|
nextCursor: string | null;
|
|
911
1502
|
};
|
|
912
1503
|
export type UpdateSessionPinRequest = {
|
|
913
1504
|
pinned: boolean;
|
|
914
1505
|
expectedVersion?: number;
|
|
915
1506
|
};
|
|
1507
|
+
export type UpdateSessionAttentionRequest = {
|
|
1508
|
+
unread?: boolean;
|
|
1509
|
+
acknowledgedThroughSequence?: number;
|
|
1510
|
+
activelyWorking?: boolean;
|
|
1511
|
+
expectedVersion?: number;
|
|
1512
|
+
};
|
|
1513
|
+
export type UpdateSessionArchiveRequest = {
|
|
1514
|
+
archived: boolean;
|
|
1515
|
+
expectedVersion?: number;
|
|
1516
|
+
};
|
|
916
1517
|
export type LineageNode = {
|
|
917
1518
|
session: SessionSummary;
|
|
918
1519
|
children: LineageNode[];
|
|
919
1520
|
};
|
|
920
1521
|
export type SessionLineageResponse = {
|
|
1522
|
+
sessionHasSchedules?: boolean | undefined;
|
|
921
1523
|
ancestors: SessionSummary[];
|
|
922
1524
|
children: LineageNode[];
|
|
923
1525
|
truncated: boolean;
|
|
@@ -948,6 +1550,21 @@ export type SubmittedTimelineAnnotation = DraftTimelineAnnotation;
|
|
|
948
1550
|
export type TimelineAnnotation = DraftTimelineAnnotation & {
|
|
949
1551
|
ordinal: number;
|
|
950
1552
|
};
|
|
1553
|
+
export declare const PERSONAL_RESOURCE_SHARED_OUTPUT_WARNING_VERSION: 1;
|
|
1554
|
+
export declare const PERSONAL_RESOURCE_SHARED_OUTPUT_WARNING = "Personal resources used in a workspace-shared session may influence outputs visible to other workspace members. The underlying credentials and secret values are not shared by the attachment itself.";
|
|
1555
|
+
export type PersonalResourceAttachmentIntent = {
|
|
1556
|
+
mode: "once" | "session" | "always";
|
|
1557
|
+
expectedAuthorityEpoch?: number | undefined;
|
|
1558
|
+
workspaceSharedAcknowledged?: boolean | undefined;
|
|
1559
|
+
sharedOutputWarningVersion: 1;
|
|
1560
|
+
};
|
|
1561
|
+
export type PersonalResourceAttachmentSummary = {
|
|
1562
|
+
mode: "once" | "session" | "always";
|
|
1563
|
+
context: "user_private" | "workspace_shared";
|
|
1564
|
+
resourceCount: number;
|
|
1565
|
+
resourceKinds: Array<"variable_set" | "rig" | "connected_machine">;
|
|
1566
|
+
sharedOutputWarningVersion: 1;
|
|
1567
|
+
};
|
|
951
1568
|
export type SessionTurn = {
|
|
952
1569
|
id: string;
|
|
953
1570
|
workspaceId: string;
|
|
@@ -975,6 +1592,7 @@ export type SessionTurn = {
|
|
|
975
1592
|
initiator: TurnInitiator;
|
|
976
1593
|
initiatorContext: Record<string, unknown>;
|
|
977
1594
|
personalConnections?: McpPersonalConnectionSummary[] | undefined;
|
|
1595
|
+
personalResources?: PersonalResourceAttachmentSummary | null | undefined;
|
|
978
1596
|
cancelledBy?: string | null;
|
|
979
1597
|
cancelReason?: string | null;
|
|
980
1598
|
startedAt: string | null;
|
|
@@ -988,7 +1606,16 @@ export type HumanInputOption = {
|
|
|
988
1606
|
label: string;
|
|
989
1607
|
description?: string | null | undefined;
|
|
990
1608
|
};
|
|
1609
|
+
export type SkillReviewReference = {
|
|
1610
|
+
removalOperationId?: string | undefined;
|
|
1611
|
+
sourceOperationId: string;
|
|
1612
|
+
skillId: string;
|
|
1613
|
+
revisionId: string;
|
|
1614
|
+
expectedRevisionId: string | null;
|
|
1615
|
+
expectedScopeVersion: number;
|
|
1616
|
+
};
|
|
991
1617
|
export type HumanInputQuestion = {
|
|
1618
|
+
skillReview?: SkillReviewReference | null | undefined;
|
|
992
1619
|
id: string;
|
|
993
1620
|
kind: HumanInputQuestionKind;
|
|
994
1621
|
prompt: string;
|
|
@@ -1037,7 +1664,7 @@ export type SessionHumanInputRequest = {
|
|
|
1037
1664
|
createdAt: string;
|
|
1038
1665
|
updatedAt: string;
|
|
1039
1666
|
};
|
|
1040
|
-
export declare const SESSION_EVENT_TYPES: readonly ["session.created", "session.event.envelope_omitted", "session.status.changed", "session.realtime.started", "session.realtime.ended", "session.requiresAction", "session.humanInput.requested", "session.context.compaction.requested", "session.context.compaction.started", "session.context.compacted", "session.context.compaction.skipped", "session.context.cleared", "user.message", "user.pause", "user.approvalDecision", "user.humanInputResponse", "turn.queued", "turn.started", "turn.completed", "turn.failed", "turn.cancelled", "turn.superseded", "turn.recovery.requested", "turn.capacity_waiting", "agent.message.delta", "agent.message.completed", "agent.reasoning.delta", "agent.toolCall.created", "agent.toolCall.output", "agent.model.request", "agent.model.usage", "tool.auth_needed", "credential.auth_needed", "agent.updated", "rig.setup.started", "rig.setup.completed", "rig.setup.skipped", "rig.setup.failed", "sandbox.operation.started", "sandbox.operation.completed", "sandbox.operation.failed", "sandbox.command.output.delta", "artifact.created", "goal.set", "goal.updated", "goal.completed", "goal.paused", "goal.resumed", "goal.cleared", "goal.continuation", "system.update.pending", "system.update.delivered", "system.update.superseded", "system.update.cancelled", "system.update.settled", "session.control.paused", "session.control.resumed", "session.control.steer_requested", "workspace.inference.paused", "workspace.inference.resumed", "session.queue.changed", "session.queue.prompt.cancelled", "session.queue.history", "turn.event.rejected_late", "memory.saved", "memory.corrected", "stream.url.rotated", "stream.opened", "stream.closed", "stream.revoked", "recording.started", "recording.available", "recording.failed", "fs.changed", "git.changed", "terminal.pty.started", "terminal.pty.output.delta", "terminal.pty.exited", "session.title_set", "session.mcp.approval_policy.updated", "session.tool_policy.updated", "codex.account.switched", "codex.credential.selected", "codex.fleet.decision", "codex.capacity.waiting", "codex.capacity.resumed", "codex.capacity.superseded", "sandbox.box.created", "sandbox.box.lost", "sandbox.box.terminated", "sandbox.box.snapshot", "sandbox.env.drift", "session.route.reconciled", "workspace.revision.captured", "workspace.revision.degraded", "machine.op.failed", "machine.op.recovered", "machine.link.lost", "machine.link.restored", "machine.runner.restarted"];
|
|
1667
|
+
export declare const SESSION_EVENT_TYPES: readonly ["usage.threshold_reached", "usage.exhausted", "usage.period_reset", "session.created", "session.variable_sets.updated", "session.runtime.configured", "session.event.envelope_omitted", "session.status.changed", "session.realtime.started", "session.realtime.ended", "session.requiresAction", "session.humanInput.requested", "session.context.compaction.requested", "session.context.compaction.started", "session.context.compacted", "session.context.compaction.skipped", "session.context.cleared", "user.message", "user.pause", "user.approvalDecision", "user.humanInputResponse", "turn.queued", "turn.started", "turn.completed", "turn.failed", "turn.cancelled", "turn.superseded", "turn.recovery.requested", "turn.dispatch.expired", "turn.capacity_waiting", "turn.startup.phase.started", "turn.startup.phase.completed", "turn.startup.phase.failed", "agent.message.delta", "agent.message.completed", "agent.reasoning.delta", "agent.toolCall.created", "agent.toolCall.output", "agent.model.request", "agent.model.usage", "tool.auth_needed", "credential.auth_needed", "agent.updated", "rig.setup.started", "rig.setup.completed", "rig.setup.skipped", "rig.setup.failed", "sandbox.operation.started", "sandbox.operation.completed", "sandbox.operation.failed", "session.command.backgrounded", "session.command.finished", "session.wait.started", "session.wait.finished", "sandbox.command.output.delta", "artifact.created", "knowledge.confirmation.recovered", "instruction.confirmation.recovered", "knowledge.source.prepared", "knowledge.source.failed", "goal.set", "goal.updated", "goal.progress", "goal.rewrite.proposed", "goal.rewrite.rejected", "goal.completed", "goal.paused", "goal.resumed", "goal.cleared", "goal.held", "goal.continuation", "system.update.pending", "system.update.delivered", "system.update.superseded", "system.update.cancelled", "system.update.settled", "session.control.paused", "session.control.resumed", "session.control.steer_requested", "workspace.inference.paused", "workspace.inference.resumed", "session.queue.changed", "session.queue.prompt.cancelled", "session.queue.history", "turn.event.rejected_late", "memory.saved", "memory.corrected", "stream.url.rotated", "stream.opened", "stream.closed", "stream.revoked", "recording.started", "recording.available", "recording.failed", "fs.changed", "git.changed", "terminal.pty.started", "terminal.pty.output.delta", "terminal.pty.exited", "session.title_set", "session.visibility.changed", "session.personal_resources.attached", "session.mcp.approval_policy.updated", "session.tool_policy.updated", "session.agent.updated", "session.model_settings.updated", "codex.account.switched", "codex.account.selection.changed", "codex.credential.selected", "codex.fleet.decision", "codex.capacity.waiting", "codex.capacity.resumed", "codex.capacity.superseded", "sandbox.box.created", "sandbox.box.lost", "sandbox.box.terminated", "sandbox.box.snapshot", "sandbox.env.drift", "session.route.reconciled", "workspace.revision.captured", "workspace.revision.degraded", "machine.op.failed", "machine.op.recovered", "machine.link.lost", "machine.link.restored", "machine.runner.restarted"];
|
|
1041
1668
|
export type KnownSessionEventType = (typeof SESSION_EVENT_TYPES)[number];
|
|
1042
1669
|
/**
|
|
1043
1670
|
* Event types the SDK knows about today, kept open so a newer OpenGeni server
|
|
@@ -1050,6 +1677,8 @@ export type SessionEvent = {
|
|
|
1050
1677
|
sessionId: string;
|
|
1051
1678
|
/** Per-session sequence number: positive, contiguous, strictly increasing. */
|
|
1052
1679
|
sequence: number;
|
|
1680
|
+
/** Server-owned durable high-water mark for a synthetic compact event. */
|
|
1681
|
+
coveredThrough?: number | undefined;
|
|
1053
1682
|
type: SessionEventType;
|
|
1054
1683
|
payload: unknown;
|
|
1055
1684
|
occurredAt: string;
|
|
@@ -1161,11 +1790,17 @@ export type SessionEventPage = {
|
|
|
1161
1790
|
};
|
|
1162
1791
|
export type ToolAuthNeededPayload = {
|
|
1163
1792
|
serverId: string;
|
|
1793
|
+
/** Configured connector for recovery; serverId retains the execution alias. */
|
|
1794
|
+
canonicalServerId?: string | undefined;
|
|
1795
|
+
/** Scope of the exact failed account, not the canonical catalog default. */
|
|
1796
|
+
connectionSubjectScope?: "workspace" | "subject" | undefined;
|
|
1164
1797
|
toolName?: string | null | undefined;
|
|
1165
1798
|
providerDomain: string;
|
|
1166
1799
|
provider?: string | undefined;
|
|
1167
1800
|
connectionId?: string | null | undefined;
|
|
1801
|
+
authoritySource?: "host" | undefined;
|
|
1168
1802
|
reason: "missing_connection" | "expired" | "insufficient_scope" | "refresh_failed" | "personal_authority_unavailable" | "unsupported_auth" | "resource_scope_unavailable";
|
|
1803
|
+
hostReason?: "missing_connection" | "expired" | "insufficient_scope" | "refresh_failed" | "personal_authority_unavailable" | "unsupported_auth" | "resource_scope_unavailable" | undefined;
|
|
1169
1804
|
scopes?: string[] | undefined;
|
|
1170
1805
|
resource?: string | undefined;
|
|
1171
1806
|
selectedResources?: Array<{
|
|
@@ -1183,6 +1818,13 @@ export type ToolAuthNeededPayload = {
|
|
|
1183
1818
|
rationale: string;
|
|
1184
1819
|
requiredVariables: string[];
|
|
1185
1820
|
} | undefined;
|
|
1821
|
+
/** Agent suggestion; never a connection or permission grant. */
|
|
1822
|
+
setupRequest?: {
|
|
1823
|
+
kind: "mcp";
|
|
1824
|
+
name: string;
|
|
1825
|
+
endpointUrl: string;
|
|
1826
|
+
rationale: string;
|
|
1827
|
+
} | undefined;
|
|
1186
1828
|
};
|
|
1187
1829
|
export type AgentTextDeltaPayload = {
|
|
1188
1830
|
text: string;
|
|
@@ -1195,6 +1837,11 @@ export type AgentToolCallCreatedPayload = {
|
|
|
1195
1837
|
name: string;
|
|
1196
1838
|
arguments: unknown;
|
|
1197
1839
|
raw?: unknown | undefined;
|
|
1840
|
+
/**
|
|
1841
|
+
* Content-free analytics family: an OpenGeni first-party tool name,
|
|
1842
|
+
* `integration:<reviewed domain>`, or `custom`. Absent when unclassified.
|
|
1843
|
+
*/
|
|
1844
|
+
toolFamily?: string | undefined;
|
|
1198
1845
|
};
|
|
1199
1846
|
export type AgentToolCallOutputPayload = {
|
|
1200
1847
|
id: string | null;
|
|
@@ -1228,7 +1875,7 @@ export type CodexFleetDecisionEventPayload = {
|
|
|
1228
1875
|
actual: {
|
|
1229
1876
|
outcome: "selected" | "waiting" | "none";
|
|
1230
1877
|
candidateKey: string | null;
|
|
1231
|
-
reason: "lease_reused" | "pin" | "rotation" | "active" | "all_capped" | "none";
|
|
1878
|
+
reason: "lease_reused" | "pin" | "rotation" | "active" | "all_capped" | "allocator_disabled" | "none";
|
|
1232
1879
|
};
|
|
1233
1880
|
comparison: CodexFleetShadowComparison;
|
|
1234
1881
|
replay: {
|
|
@@ -1348,11 +1995,16 @@ export type FsTreeNode = {
|
|
|
1348
1995
|
truncated: boolean;
|
|
1349
1996
|
};
|
|
1350
1997
|
export type FsEncoding = "utf8" | "base64";
|
|
1998
|
+
export type FileSystemRouteIdentity = {
|
|
1999
|
+
epoch: number;
|
|
2000
|
+
root: string;
|
|
2001
|
+
};
|
|
1351
2002
|
export type FsListRequest = {
|
|
1352
2003
|
path?: string;
|
|
1353
2004
|
depth?: number;
|
|
1354
2005
|
maxEntries?: number;
|
|
1355
2006
|
includeHidden?: boolean;
|
|
2007
|
+
route?: FileSystemRouteIdentity;
|
|
1356
2008
|
};
|
|
1357
2009
|
export type FsListResponse = {
|
|
1358
2010
|
root: FsTreeNode;
|
|
@@ -1367,8 +2019,11 @@ export type FsListBatchResponse = {
|
|
|
1367
2019
|
};
|
|
1368
2020
|
export type FsReadRequest = {
|
|
1369
2021
|
path: string;
|
|
2022
|
+
/** Confine this read to the session's working directory, refusing symlinks. */
|
|
2023
|
+
workspaceOnly?: boolean;
|
|
1370
2024
|
encoding?: FsEncoding;
|
|
1371
2025
|
maxBytes?: number;
|
|
2026
|
+
route?: FileSystemRouteIdentity;
|
|
1372
2027
|
};
|
|
1373
2028
|
export type FsReadResponse = {
|
|
1374
2029
|
path: string;
|
|
@@ -1379,12 +2034,23 @@ export type FsReadResponse = {
|
|
|
1379
2034
|
isBinary: boolean;
|
|
1380
2035
|
revision: number;
|
|
1381
2036
|
};
|
|
2037
|
+
export declare const SANDBOX_FILE_ARTIFACT_MAX_BYTES: number;
|
|
2038
|
+
export type PublishSandboxFileArtifactRequest = {
|
|
2039
|
+
path: string;
|
|
2040
|
+
};
|
|
2041
|
+
export type SandboxFileArtifactReceipt = {
|
|
2042
|
+
type: "sandbox_file";
|
|
2043
|
+
sandboxPath: string;
|
|
2044
|
+
filename: string;
|
|
2045
|
+
artifact: RetainedArtifactReference;
|
|
2046
|
+
};
|
|
1382
2047
|
export type FsWriteRequest = {
|
|
1383
2048
|
path: string;
|
|
1384
2049
|
encoding?: FsEncoding;
|
|
1385
2050
|
content: string;
|
|
1386
2051
|
overwrite?: boolean;
|
|
1387
2052
|
createParents?: boolean;
|
|
2053
|
+
route?: FileSystemRouteIdentity;
|
|
1388
2054
|
};
|
|
1389
2055
|
export type FsWriteResponse = {
|
|
1390
2056
|
path: string;
|
|
@@ -1394,6 +2060,7 @@ export type FsWriteResponse = {
|
|
|
1394
2060
|
export type FsDeleteRequest = {
|
|
1395
2061
|
path: string;
|
|
1396
2062
|
recursive?: boolean;
|
|
2063
|
+
route?: FileSystemRouteIdentity;
|
|
1397
2064
|
};
|
|
1398
2065
|
export type FsDeleteResponse = {
|
|
1399
2066
|
revision: number;
|
|
@@ -1403,6 +2070,7 @@ export type FsMoveRequest = {
|
|
|
1403
2070
|
newPath: string;
|
|
1404
2071
|
overwrite?: boolean;
|
|
1405
2072
|
createParents?: boolean;
|
|
2073
|
+
route?: FileSystemRouteIdentity;
|
|
1406
2074
|
};
|
|
1407
2075
|
export type FsMoveResponse = {
|
|
1408
2076
|
path: string;
|
|
@@ -1412,6 +2080,7 @@ export type FsMoveResponse = {
|
|
|
1412
2080
|
export type FsMkdirRequest = {
|
|
1413
2081
|
path: string;
|
|
1414
2082
|
recursive?: boolean;
|
|
2083
|
+
route?: FileSystemRouteIdentity;
|
|
1415
2084
|
};
|
|
1416
2085
|
export type FsMkdirResponse = {
|
|
1417
2086
|
path: string;
|
|
@@ -1720,17 +2389,87 @@ export type ScheduledTaskScheduleSpec = {
|
|
|
1720
2389
|
minute: number;
|
|
1721
2390
|
daysOfWeek?: ScheduledTaskDayOfWeek[] | undefined;
|
|
1722
2391
|
};
|
|
2392
|
+
export type IncidentTelemetrySeriesMetadata = {
|
|
2393
|
+
metric: string;
|
|
2394
|
+
labels: string[];
|
|
2395
|
+
};
|
|
2396
|
+
export type IncidentTelemetryDataRoute = {
|
|
2397
|
+
kind: "mcp";
|
|
2398
|
+
serverId: string;
|
|
2399
|
+
} | {
|
|
2400
|
+
kind: "first_party";
|
|
2401
|
+
tool: FirstPartyMcpToolName;
|
|
2402
|
+
} | {
|
|
2403
|
+
kind: "variable_set";
|
|
2404
|
+
variableSetName: string;
|
|
2405
|
+
variableNames: string[];
|
|
2406
|
+
} | {
|
|
2407
|
+
kind: "rig_credential_hook";
|
|
2408
|
+
credentialHookId: string;
|
|
2409
|
+
};
|
|
2410
|
+
export type IncidentTelemetryPreflight = {
|
|
2411
|
+
requiredResources: ResourceRef[];
|
|
2412
|
+
requiredMcpServerIds: string[];
|
|
2413
|
+
requiredFirstPartyMcpTools: FirstPartyMcpToolName[];
|
|
2414
|
+
requiredFirstPartyMcpPermissions: Permission[];
|
|
2415
|
+
requiredRig: {
|
|
2416
|
+
name: string;
|
|
2417
|
+
credentialHookIds: string[];
|
|
2418
|
+
} | null;
|
|
2419
|
+
requiredVariableSetNames: string[];
|
|
2420
|
+
requiredVariableNames: string[];
|
|
2421
|
+
dataSource: {
|
|
2422
|
+
kind: "prometheus";
|
|
2423
|
+
queryPath: "/api/v1/query" | "/api/v1/query_range";
|
|
2424
|
+
workspaceLabel: string;
|
|
2425
|
+
alertSelectorLabels: string[];
|
|
2426
|
+
route: IncidentTelemetryDataRoute;
|
|
2427
|
+
requiredSeries: IncidentTelemetrySeriesMetadata[];
|
|
2428
|
+
availableSeries: IncidentTelemetrySeriesMetadata[];
|
|
2429
|
+
};
|
|
2430
|
+
};
|
|
2431
|
+
export type IncidentTelemetryPreflightInput = Omit<IncidentTelemetryPreflight, "requiredResources" | "requiredMcpServerIds" | "requiredFirstPartyMcpTools" | "requiredFirstPartyMcpPermissions" | "requiredRig" | "requiredVariableSetNames" | "requiredVariableNames"> & {
|
|
2432
|
+
requiredResources?: ResourceRef[] | undefined;
|
|
2433
|
+
requiredMcpServerIds?: string[] | undefined;
|
|
2434
|
+
requiredFirstPartyMcpTools?: FirstPartyMcpToolName[] | undefined;
|
|
2435
|
+
requiredFirstPartyMcpPermissions?: Permission[] | undefined;
|
|
2436
|
+
requiredRig?: {
|
|
2437
|
+
name: string;
|
|
2438
|
+
credentialHookIds?: string[] | undefined;
|
|
2439
|
+
} | null | undefined;
|
|
2440
|
+
requiredVariableSetNames?: string[] | undefined;
|
|
2441
|
+
requiredVariableNames?: string[] | undefined;
|
|
2442
|
+
};
|
|
1723
2443
|
export type ScheduledTaskAgentConfig = {
|
|
2444
|
+
/** Agent configuration for every generated session; omitted keeps legacy behavior. */
|
|
2445
|
+
agent?: AgentConfigRequest | undefined;
|
|
2446
|
+
connectionAccounts?: McpConnectionAccountSelection[] | undefined;
|
|
2447
|
+
/** Read-only: the complete accepted account set, including an empty set. */
|
|
2448
|
+
connectionAccountsFrozen?: true | undefined;
|
|
2449
|
+
knowledgeSource?: Extract<ScheduledTaskAction, {
|
|
2450
|
+
kind: "knowledge_source_sync";
|
|
2451
|
+
}> | undefined;
|
|
2452
|
+
bundledSkillIds?: BundledSkillId[] | undefined;
|
|
1724
2453
|
prompt: string;
|
|
1725
2454
|
resources: ResourceRef[];
|
|
1726
2455
|
tools: ToolRef[];
|
|
1727
2456
|
metadata: Record<string, unknown>;
|
|
1728
2457
|
slackBotConnectionId?: string | undefined;
|
|
2458
|
+
/** Slack channel a person chose for this task's bot posts; requires slackBotConnectionId. */
|
|
2459
|
+
slackBotChannelId?: string | undefined;
|
|
1729
2460
|
model?: string | undefined;
|
|
1730
2461
|
reasoningEffort?: ReasoningEffort | undefined;
|
|
1731
2462
|
sandboxBackend?: SandboxBackend | undefined;
|
|
2463
|
+
machineTarget?: {
|
|
2464
|
+
targetSandboxId: string;
|
|
2465
|
+
workingDir?: string | undefined;
|
|
2466
|
+
} | undefined;
|
|
1732
2467
|
goal?: GoalSpec | undefined;
|
|
2468
|
+
executionClass?: "incident_telemetry" | undefined;
|
|
2469
|
+
incidentTelemetryPreflight?: IncidentTelemetryPreflight | undefined;
|
|
1733
2470
|
maxNestedAgentDepth?: number | undefined;
|
|
2471
|
+
/** Seconds a run may wait on a person before the scheduler answers for it. */
|
|
2472
|
+
approvalTimeoutSeconds?: number | undefined;
|
|
1734
2473
|
};
|
|
1735
2474
|
export type ScopedKnowledgeScope = {
|
|
1736
2475
|
kind: "organization";
|
|
@@ -1781,6 +2520,8 @@ export type ScheduledTask = {
|
|
|
1781
2520
|
accountId: string;
|
|
1782
2521
|
workspaceId: string;
|
|
1783
2522
|
name: string;
|
|
2523
|
+
/** Immutable execution owner; null for workspace/service tasks. */
|
|
2524
|
+
ownerSubjectId: string | null;
|
|
1784
2525
|
status: ScheduledTaskStatus;
|
|
1785
2526
|
schedule: ScheduledTaskScheduleSpec;
|
|
1786
2527
|
temporalScheduleId: string;
|
|
@@ -1790,7 +2531,8 @@ export type ScheduledTask = {
|
|
|
1790
2531
|
agentConfig: ScheduledTaskAgentConfig;
|
|
1791
2532
|
createdBy?: TurnInitiator | undefined;
|
|
1792
2533
|
createdByContext?: TurnInitiatorContext | undefined;
|
|
1793
|
-
|
|
2534
|
+
authorityRevision: number;
|
|
2535
|
+
executionDigest: string;
|
|
1794
2536
|
targetSessionId: string | null;
|
|
1795
2537
|
reusableSessionId: string | null;
|
|
1796
2538
|
variableSetId: string | null;
|
|
@@ -1800,20 +2542,66 @@ export type ScheduledTask = {
|
|
|
1800
2542
|
metadata: Record<string, unknown>;
|
|
1801
2543
|
createdAt: string;
|
|
1802
2544
|
updatedAt: string;
|
|
2545
|
+
/** Read-only: what `refreshScheduledTaskAccess` would change, for a viewer who can act on it. */
|
|
2546
|
+
policyDrift?: ScheduledTaskPolicyDrift | null | undefined;
|
|
2547
|
+
};
|
|
2548
|
+
/** One connector named in a scheduled task's access report. */
|
|
2549
|
+
export type ScheduledTaskAccessConnector = {
|
|
2550
|
+
id: string;
|
|
2551
|
+
name: string;
|
|
2552
|
+
};
|
|
2553
|
+
/**
|
|
2554
|
+
* What a scheduled task's frozen connectors, connector accounts and OpenGeni
|
|
2555
|
+
* tools lack compared with what its owner would get by saving it again now.
|
|
2556
|
+
*/
|
|
2557
|
+
export type ScheduledTaskPolicyDrift = {
|
|
2558
|
+
/** Workspace default connectors that new schedules get and this one lacks. */
|
|
2559
|
+
missingConnectors: ScheduledTaskAccessConnector[];
|
|
2560
|
+
/** Connectors this schedule names that this workspace no longer sets up; refresh drops them. */
|
|
2561
|
+
unavailableConnectors: ScheduledTaskAccessConnector[];
|
|
2562
|
+
/** Default OpenGeni tools missing from an agent-created task's frozen tools. */
|
|
2563
|
+
missingOpenGeniTools: FirstPartyMcpToolName[];
|
|
2564
|
+
/** Connectors whose chosen account can no longer be used by this schedule. */
|
|
2565
|
+
unavailableAccounts: ScheduledTaskAccessConnector[];
|
|
2566
|
+
/** Connectors this schedule has no account for, although one is now available. */
|
|
2567
|
+
attachableAccounts: ScheduledTaskAccessConnector[];
|
|
2568
|
+
/** Whether this viewer may run the refresh (a signed-in person, not a key or agent). */
|
|
2569
|
+
canRefresh: boolean;
|
|
2570
|
+
};
|
|
2571
|
+
/** Re-freeze with the caller's current authority; `executionDigest` is the reviewed head. */
|
|
2572
|
+
export type RefreshScheduledTaskAccessRequest = {
|
|
2573
|
+
executionDigest: string;
|
|
2574
|
+
/** Default connectors and OpenGeni tools to keep off; only narrows what the refresh adds. */
|
|
2575
|
+
leaveOut?: {
|
|
2576
|
+
connectors?: string[] | undefined;
|
|
2577
|
+
openGeniTools?: FirstPartyMcpToolName[] | undefined;
|
|
2578
|
+
} | undefined;
|
|
1803
2579
|
};
|
|
1804
2580
|
export type CreateSessionRequest = {
|
|
2581
|
+
/** Omitted: defaults/inheritance; []: no bundled guidance. Children cannot widen. */
|
|
2582
|
+
bundledSkillIds?: BundledSkillId[] | undefined;
|
|
2583
|
+
excludedMcpServerIds?: string[] | undefined;
|
|
1805
2584
|
requestedSessionId?: string | undefined;
|
|
2585
|
+
visibility?: SessionVisibility | undefined;
|
|
1806
2586
|
initialMessage?: string | undefined;
|
|
1807
2587
|
/** Create an idle session shell so realtime voice can be the first interaction. */
|
|
1808
2588
|
startMode?: "realtime" | undefined;
|
|
1809
|
-
/**
|
|
1810
|
-
|
|
2589
|
+
/** Model-visible application context attached to the initial user message; omitted by standard timeline rendering. */
|
|
2590
|
+
modelContext?: string | undefined;
|
|
1811
2591
|
instructions?: string | undefined;
|
|
1812
2592
|
/** Immutable normalized prompt-policy role; distinct from membership roles. */
|
|
1813
2593
|
policyRole?: string | undefined;
|
|
1814
2594
|
resources?: ResourceRef[] | undefined;
|
|
1815
2595
|
/** Inline skills fixed onto this session; omitted children inherit them. */
|
|
1816
|
-
skills?:
|
|
2596
|
+
skills?: SessionSkillInput[] | undefined;
|
|
2597
|
+
/** Installed session-selected Skill identities to freeze onto this session at creation. */
|
|
2598
|
+
installedSkillIds?: string[] | undefined;
|
|
2599
|
+
/**
|
|
2600
|
+
* MCP servers to select. Omitted follows the workspace defaults; an explicit
|
|
2601
|
+
* array (including `[]`) is an exact allow-list over workspace/deployment
|
|
2602
|
+
* servers. Servers attached in this request's `mcpServers` are always
|
|
2603
|
+
* selected; list one here only to set `eager`/`optional`.
|
|
2604
|
+
*/
|
|
1817
2605
|
tools?: ToolRef[] | undefined;
|
|
1818
2606
|
metadata?: Record<string, unknown> | undefined;
|
|
1819
2607
|
model?: string | undefined;
|
|
@@ -1822,6 +2610,8 @@ export type CreateSessionRequest = {
|
|
|
1822
2610
|
sandboxBackend?: SandboxBackend | undefined;
|
|
1823
2611
|
targetSandboxId?: string | undefined;
|
|
1824
2612
|
workingDir?: string | undefined;
|
|
2613
|
+
/** Ordered low-to-high precedence; later sets win name collisions. */
|
|
2614
|
+
variableSetIds?: string[] | undefined;
|
|
1825
2615
|
variableSetId?: string | undefined;
|
|
1826
2616
|
/** @deprecated use variableSetId */
|
|
1827
2617
|
environmentId?: string | undefined;
|
|
@@ -1830,22 +2620,42 @@ export type CreateSessionRequest = {
|
|
|
1830
2620
|
clientEventId?: string | undefined;
|
|
1831
2621
|
idempotencyKey?: string | undefined;
|
|
1832
2622
|
expectedNewSessionDraftRevision?: number | undefined;
|
|
2623
|
+
agentLearning?: import("@opengeni/contracts").AgentLearningOverrides | undefined;
|
|
1833
2624
|
maxNestedAgentDepth?: number | undefined;
|
|
1834
2625
|
firstPartyMcpPermissions?: string[] | undefined;
|
|
1835
2626
|
firstPartyMcpTools?: FirstPartyMcpToolName[] | undefined;
|
|
2627
|
+
/**
|
|
2628
|
+
* One agent configuration: capabilities, identity, instructions alias and
|
|
2629
|
+
* renderer. Omission keeps today's behavior (a child inherits its parent's).
|
|
2630
|
+
* Children may only narrow. Requires the server's admission switch.
|
|
2631
|
+
*/
|
|
2632
|
+
agent?: AgentConfigRequest | undefined;
|
|
1836
2633
|
mcpServers?: SessionMcpServerInput[] | undefined;
|
|
2634
|
+
mcpApprovalPolicies?: Record<string, SessionMcpApprovalPolicy> | undefined;
|
|
2635
|
+
connectionAccounts?: McpConnectionAccountSelection[] | undefined;
|
|
2636
|
+
/** Atomically attach the server-derived personal Variable Set/Rig closure to the initial turn. */
|
|
2637
|
+
personalResourceAttachment?: PersonalResourceAttachmentIntent | undefined;
|
|
1837
2638
|
sandbox?: "shared" | "new" | {
|
|
1838
2639
|
groupId: string;
|
|
1839
2640
|
} | undefined;
|
|
1840
|
-
|
|
1841
|
-
|
|
2641
|
+
agentAccess?: SessionAgentAccess | undefined;
|
|
2642
|
+
/** Opaque end-user label inside the workspace. Not a subject, not authority. */
|
|
2643
|
+
/** Select identity with server-side asUser(), not session creation data. */
|
|
2644
|
+
scopeSubjectId?: never;
|
|
2645
|
+
/** Which Memory the agent reads and where it saves; "user" requires `scopeSubjectId`. */
|
|
2646
|
+
memoryScope?: SessionMemoryScope | undefined;
|
|
2647
|
+
};
|
|
2648
|
+
export type SessionAgentAccess = "session" | "user" | "workspace";
|
|
2649
|
+
export type SessionScopeSubjectId = string;
|
|
2650
|
+
export type SessionMemoryScope = "workspace" | "user" | "off";
|
|
2651
|
+
export declare const KNOWN_PERMISSIONS: readonly ["account:read", "account:admin", "members:manage", "workspace:create", "billing:read", "billing:manage", "workspace:read", "workspace:admin", "sessions:create", "sessions:read", "sessions:control", "stream:view", "stream:control", "stream:acknowledge", "files:upload", "files:read", "files:write", "terminal:attach", "documents:manage", "documents:search", "scheduled_tasks:manage", "scheduled_tasks:run", "github:manage", "github:use", "api_keys:manage", "usage_allowances:manage", "connections:read", "connections:write", "capabilities:manage", "environments:manage", "environments:use", "variable-sets:list", "variable-sets:read", "variable-sets:write", "variable-sets:manage", "variable-sets:attach", "variable-sets:use", "secrets:list", "secrets:read", "secrets:write", "mcp_servers:attach", "codemode:call", "goals:manage", "enrollments:read", "enrollments:manage", "rigs:use", "rigs:manage", "artifacts:read", "artifacts:publish"];
|
|
1842
2652
|
export type KnownPermission = (typeof KNOWN_PERMISSIONS)[number];
|
|
1843
2653
|
/**
|
|
1844
2654
|
* Permissions the SDK knows about today, kept open so a newer OpenGeni server
|
|
1845
2655
|
* can introduce permissions without breaking older SDK consumers.
|
|
1846
2656
|
*/
|
|
1847
2657
|
export type Permission = KnownPermission | (string & {});
|
|
1848
|
-
export type FirstPartyMcpToolName = "set_session_title" | "goal_set" | "goal_update" | "goal_complete" | "goal_pause" | "memory_search" | "memory_save" | "memory_correct" | "preference_registry_summary" | "preference_registry_get" | "sandboxes_list" | "sandbox_attach" | "sandbox_swap" | "run_on" | "sandbox_provision" | "connected_machine_remove" | "rig_list" | "rig_get" | "rig_propose_change" | "rig_verify" | "rig_promote" | "sessions_list" | "session_get" | "session_events" | "session_create" | "session_send_message" | "session_pause" | "session_resume" | "session_steer" | "set_other_session_title" | "interaction_discover" | "browser_open" | "browser_tabs" | "browser_observe" | "browser_act" | "browser_debug" | "browser_identity" | "browser_publish" | "browser_lifecycle" | "computer_open" | "computer_targets" | "computer_observe" | "computer_act" | "computer_lifecycle" | "variable_set_list" | "environment_list" | "variable_set_get_variable" | "variable_set_set_variable" | "environment_set_variable" | "capability_catalog_search" | "capability_authorization_request" | "github_connect_link" | "github_repositories_list" | "social_connections_list" | "social_posts_recent" | "social_daily_analysis_context" | "social_search_live" | "social_mentions_live" | "social_thread_fetch" | "social_posts_sync" | "social_post_reply" | "x_accounts_list" | "x_search_live" | "x_mentions_live" | "x_thread_fetch" | "x_posts_sync" | "x_post_reply" | "reddit_accounts_list" | "reddit_search_live" | "reddit_mentions_live" | "reddit_thread_fetch" | "reddit_posts_sync" | "reddit_post_reply" | "scheduled_tasks_list" | "scheduled_tasks_get" | "scheduled_tasks_create" | "scheduled_tasks_update" | "scheduled_tasks_pause" | "scheduled_tasks_resume" | "scheduled_tasks_trigger" | "scheduled_tasks_delete" | "scheduled_task_runs_list" | "slack_bot_list_channels" | "slack_bot_channel_history" | "slack_bot_thread_replies" | "slack_bot_list_users" | "slack_bot_list_files" | "slack_bot_file_info" | "slack_bot_file_content" | "slack_bot_post_message" | "slack_bot_delete_message" | "atlassian_sources_list" | "atlassian_search" | "atlassian_get" | "artifacts_list" | "artifacts_get_source" | "artifacts_create" | "artifacts_publish" | "artifacts_rollback" | "editable_artifact_list" | "editable_artifact_create" | "editable_artifact_import" | "editable_artifact_get" | "editable_artifact_inspect" | "editable_artifact_apply" | "editable_artifact_export" | "editable_artifact_export_status";
|
|
2658
|
+
export type FirstPartyMcpToolName = "knowledge_search" | "knowledge_prepare_save" | "knowledge_get" | "knowledge_browse" | "knowledge_save" | "knowledge_retain_file" | "knowledge_retain_message" | "knowledge_archive" | "instruction_policy_save" | "instruction_policy_get" | "set_session_title" | "goal_set" | "goal_update" | "goal_progress" | "wait_for_input" | "goal_complete" | "goal_pause" | "goal_resume" | "memory_search" | "memory_save" | "memory_correct" | "preference_registry_summary" | "preference_registry_get" | "task_notes_list" | "task_note_save" | "task_note_archive" | "task_note_replace" | "work_claim_upsert" | "work_claim_release" | "knowledge_propose" | "knowledge_correct" | "task_note_promote_knowledge" | "task_note_promote_instruction_policy" | "task_note_promote_preference" | "instruction_policy_propose" | "preference_propose" | "remember" | "remember_confirm" | "company_profile_propose" | "company_profile_confirm" | "sandboxes_list" | "sandbox_attach" | "sandbox_swap" | "run_on" | "sandbox_provision" | "connected_machine_remove" | "connected_machine_enroll_token" | "project_list" | "project_get" | "project_create" | "project_update" | "project_reorder" | "project_delete" | "session_set_project" | "rig_list" | "rig_get" | "rig_propose_change" | "rig_verify" | "rig_promote" | "sessions_list" | "session_get" | "session_set_model" | "session_events" | "session_wait" | "command_read" | "command_wait" | "session_create" | "session_send_message" | "session_pause" | "session_resume" | "session_steer" | "session_human_input_respond" | "set_other_session_title" | "interaction_discover" | "browser_open" | "browser_tabs" | "browser_observe" | "browser_act" | "browser_read" | "browser_screenshot" | "browser_clipboard" | "browser_debug" | "browser_downloads" | "browser_download_save" | "browser_auth" | "interaction_request_human" | "browser_identity" | "browser_publish" | "browser_lifecycle" | "computer_open" | "computer_targets" | "computer_observe" | "computer_clipboard" | "computer_act" | "computer_lifecycle" | "variable_set_list" | "environment_list" | "variable_set_get_variable" | "variable_set_set_variable" | "environment_set_variable" | "capability_catalog_search" | "capability_authorization_request" | "custom_mcp_setup_request" | "github_connect_link" | "github_repositories_list" | "social_connections_list" | "social_posts_recent" | "social_daily_analysis_context" | "social_search_live" | "social_mentions_live" | "social_thread_fetch" | "social_posts_sync" | "social_post_reply" | "x_accounts_list" | "x_search_live" | "x_mentions_live" | "x_thread_fetch" | "x_posts_sync" | "x_post_reply" | "reddit_accounts_list" | "reddit_search_live" | "reddit_mentions_live" | "reddit_thread_fetch" | "reddit_posts_sync" | "reddit_post_reply" | "scheduled_tasks_list" | "scheduled_tasks_get" | "scheduled_tasks_create" | "scheduled_tasks_update" | "scheduled_tasks_pause" | "scheduled_tasks_resume" | "scheduled_tasks_trigger" | "scheduled_tasks_delete" | "scheduled_task_runs_list" | "slack_bot_list_channels" | "slack_bot_search" | "slack_bot_channel_history" | "slack_bot_thread_replies" | "slack_bot_list_users" | "slack_bot_list_files" | "slack_bot_file_info" | "slack_bot_file_content" | "slack_bot_upload_file" | "slack_bot_post_message" | "slack_bot_delete_message" | "slack_bot_prepare_message" | "slack_bot_send_prepared_message" | "fiken_companies_list" | "fiken_contacts_list" | "fiken_contact_create" | "fiken_products_list" | "fiken_invoices_list" | "fiken_invoice_get" | "fiken_invoice_draft_create" | "fiken_bank_accounts_list" | "fiken_purchases_list" | "fiken_sales_list" | "atlassian_sources_list" | "atlassian_search" | "atlassian_get" | "sandbox_file_publish" | "artifacts_list" | "artifacts_get_source" | "artifacts_prepare_upload" | "artifacts_create" | "artifacts_publish" | "artifacts_rollback" | "artifacts_archive" | "artifacts_restore" | "editable_artifact_list" | "editable_artifact_create" | "editable_artifact_import" | "editable_artifact_get" | "editable_artifact_inspect" | "editable_artifact_apply" | "editable_artifact_export" | "editable_artifact_export_status";
|
|
1849
2659
|
export type ProductAccessMode = "local" | "configured" | "managed";
|
|
1850
2660
|
export type ModelCapabilitySupportV1 = "supported" | "unsupported" | "unknown";
|
|
1851
2661
|
export type ModelCapabilityStateV1 = {
|
|
@@ -1888,18 +2698,23 @@ export type ModelCredentialSourceV1 = {
|
|
|
1888
2698
|
mechanism: "api_key" | "azure_ad_bearer";
|
|
1889
2699
|
} | {
|
|
1890
2700
|
kind: "connected_subscription";
|
|
1891
|
-
provider: "codex";
|
|
2701
|
+
provider: "codex" | "xai" | "claude";
|
|
1892
2702
|
} | {
|
|
1893
2703
|
kind: "workspace_connection";
|
|
1894
2704
|
mechanism: "api_key";
|
|
2705
|
+
} | {
|
|
2706
|
+
kind: "organization_connection";
|
|
2707
|
+
mechanism: "api_key";
|
|
1895
2708
|
};
|
|
1896
2709
|
export type ModelBillingAttributionV1 = {
|
|
1897
|
-
upstreamPayer: "deployment" | "workspace" | "connected_subscription";
|
|
2710
|
+
upstreamPayer: "deployment" | "workspace" | "organization" | "connected_subscription";
|
|
1898
2711
|
metering: "opengeni_credits" | "external";
|
|
1899
2712
|
};
|
|
2713
|
+
export type ModelCostClassV1 = "free" | "credits" | "subscription" | "workspace" | "organization";
|
|
1900
2714
|
export type ModelPricingV1 = {
|
|
1901
2715
|
inputMicrosPerMillionTokens: number;
|
|
1902
2716
|
cachedInputMicrosPerMillionTokens?: number | undefined;
|
|
2717
|
+
cacheWriteMicrosPerMillionTokens?: number | undefined;
|
|
1903
2718
|
outputMicrosPerMillionTokens: number;
|
|
1904
2719
|
marginBps?: number | undefined;
|
|
1905
2720
|
};
|
|
@@ -1924,14 +2739,14 @@ export type ClientModel = {
|
|
|
1924
2739
|
/** Provider id (e.g. `openai`, `azure`, or a registry provider id). */
|
|
1925
2740
|
provider: string;
|
|
1926
2741
|
providerLabel: string;
|
|
1927
|
-
api: "responses" | "chat";
|
|
1928
|
-
source?: "opengeni" | "codex" | "workspace_gateway" | undefined;
|
|
2742
|
+
api: "responses" | "chat" | "anthropic-messages";
|
|
2743
|
+
source?: "opengeni" | "codex" | "supergrok" | "workspace_gateway" | "openrouter" | undefined;
|
|
1929
2744
|
contextWindowTokens?: number | undefined;
|
|
1930
2745
|
schemaVersion?: 1 | undefined;
|
|
1931
2746
|
aliases?: string[] | undefined;
|
|
1932
2747
|
deployment?: {
|
|
1933
2748
|
upstreamModelId: string;
|
|
1934
|
-
wireApi: "responses" | "chat";
|
|
2749
|
+
wireApi: "responses" | "chat" | "anthropic-messages";
|
|
1935
2750
|
} | undefined;
|
|
1936
2751
|
executionLimits?: {
|
|
1937
2752
|
contextWindowTokens: number | null;
|
|
@@ -1941,6 +2756,7 @@ export type ClientModel = {
|
|
|
1941
2756
|
} | undefined;
|
|
1942
2757
|
credentialSource?: ModelCredentialSourceV1 | undefined;
|
|
1943
2758
|
billing?: ModelBillingAttributionV1 | undefined;
|
|
2759
|
+
cost?: ModelCostClassV1 | undefined;
|
|
1944
2760
|
capabilities?: ModelCapabilitiesV1 | undefined;
|
|
1945
2761
|
pricing?: ModelPricingScheduleV1 | undefined;
|
|
1946
2762
|
definitionVersion?: string | undefined;
|
|
@@ -1959,32 +2775,160 @@ export type ModelCredentialReadinessV1 = {
|
|
|
1959
2775
|
};
|
|
1960
2776
|
export type WorkspaceModelCatalogModel = ClientModel & {
|
|
1961
2777
|
credentialReadiness: ModelCredentialReadinessV1;
|
|
2778
|
+
/** Exact workspace-policy verdict without exposing provider identity. */
|
|
2779
|
+
policyAllowed?: boolean | undefined;
|
|
1962
2780
|
availability: ModelAvailabilityV1;
|
|
1963
2781
|
};
|
|
2782
|
+
/** Why a new chat or scheduled task without an explicit model gets its default. */
|
|
2783
|
+
export type DefaultModelSelectionSource = "workspace" | "subscription" | "credits" | "deployment";
|
|
2784
|
+
export type DefaultModelSelection = {
|
|
2785
|
+
model: string;
|
|
2786
|
+
reasoningEffort: ReasoningEffort;
|
|
2787
|
+
source: DefaultModelSelectionSource;
|
|
2788
|
+
};
|
|
1964
2789
|
export type WorkspaceModelCatalogResponse = {
|
|
1965
2790
|
models: WorkspaceModelCatalogModel[];
|
|
2791
|
+
/** Default for new chats and scheduled tasks that name no model. */
|
|
2792
|
+
defaultSelection?: DefaultModelSelection | undefined;
|
|
2793
|
+
/**
|
|
2794
|
+
* The default this workspace would use once its organization holds an
|
|
2795
|
+
* OpenGeni credit balance. Null when the deployment does not bill credits.
|
|
2796
|
+
*/
|
|
2797
|
+
creditsSelection?: DefaultModelSelection | null | undefined;
|
|
1966
2798
|
};
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
2799
|
+
export type WorkspaceGatewayCustomModel = {
|
|
2800
|
+
id: string;
|
|
2801
|
+
upstreamModelId: string;
|
|
2802
|
+
label: string | null;
|
|
2803
|
+
version: number;
|
|
2804
|
+
createdAt: string;
|
|
2805
|
+
updatedAt: string;
|
|
2806
|
+
};
|
|
2807
|
+
export type WorkspaceGatewayCustomModelsResponse = {
|
|
2808
|
+
models: WorkspaceGatewayCustomModel[];
|
|
2809
|
+
};
|
|
2810
|
+
export type CreateWorkspaceGatewayCustomModelRequest = {
|
|
2811
|
+
operationId: string;
|
|
2812
|
+
upstreamModelId: string;
|
|
2813
|
+
label?: string | undefined;
|
|
2814
|
+
};
|
|
2815
|
+
export type DeleteWorkspaceGatewayCustomModelRequest = {
|
|
2816
|
+
expectedVersion: number;
|
|
2817
|
+
operationId: string;
|
|
2818
|
+
};
|
|
2819
|
+
export type WorkspaceOpenRouterCustomModel = WorkspaceGatewayCustomModel;
|
|
2820
|
+
export type WorkspaceOpenRouterCustomModelsResponse = {
|
|
2821
|
+
models: WorkspaceOpenRouterCustomModel[];
|
|
2822
|
+
};
|
|
2823
|
+
export type CreateWorkspaceOpenRouterCustomModelRequest = CreateWorkspaceGatewayCustomModelRequest;
|
|
2824
|
+
export type DeleteWorkspaceOpenRouterCustomModelRequest = DeleteWorkspaceGatewayCustomModelRequest;
|
|
2825
|
+
export type OrganizationModelProviderKind = "vercel_gateway" | "openrouter" | "anthropic" | "claude_subscription";
|
|
2826
|
+
export type ClaudeUsageWindow = {
|
|
2827
|
+
id: "five_hour" | "seven_day" | "seven_day_opus" | "seven_day_sonnet" | "seven_day_overage_included" | "overage";
|
|
2828
|
+
usedPercent: number | null;
|
|
2829
|
+
resetsAt: string | null;
|
|
2830
|
+
status: "allowed" | "allowed_warning" | "rejected" | null;
|
|
2831
|
+
observedAt: string;
|
|
2832
|
+
source?: "response_headers" | "provider" | undefined;
|
|
2833
|
+
};
|
|
2834
|
+
export type ClaudeUsageRequestStatus = {
|
|
2835
|
+
status: ClaudeUsageWindow["status"];
|
|
2836
|
+
resetsAt: string | null;
|
|
2837
|
+
representativeClaim: ClaudeUsageWindow["id"] | null;
|
|
2838
|
+
overageStatus: ClaudeUsageWindow["status"];
|
|
2839
|
+
overageResetsAt: string | null;
|
|
2840
|
+
upstreamModelId: string | null;
|
|
2841
|
+
observedAt: string;
|
|
2842
|
+
source?: "response_headers" | "provider" | undefined;
|
|
2843
|
+
};
|
|
2844
|
+
export type ClaudeSubscriptionUsage = {
|
|
2845
|
+
connected: boolean;
|
|
2846
|
+
credentialVersion: number | null;
|
|
2847
|
+
windows: ClaudeUsageWindow[];
|
|
2848
|
+
observedAt: string | null;
|
|
2849
|
+
source: "response_headers" | "provider" | null;
|
|
2850
|
+
refreshStatus: "not_checked" | "available" | "scope_required" | "unavailable" | "reconnect";
|
|
2851
|
+
refreshCheckedAt: string | null;
|
|
2852
|
+
requestStatus?: ClaudeUsageRequestStatus | null | undefined;
|
|
2853
|
+
requestRestrictions?: ClaudeUsageRequestStatus[] | undefined;
|
|
2854
|
+
};
|
|
2855
|
+
export type OrganizationModelProviderConnection = {
|
|
2856
|
+
providerKind: OrganizationModelProviderKind;
|
|
2857
|
+
status: "active" | "revoked";
|
|
2858
|
+
version: number;
|
|
2859
|
+
createdAt: string;
|
|
2860
|
+
updatedAt: string;
|
|
2861
|
+
};
|
|
2862
|
+
export type UpsertOrganizationModelProviderConnectionRequest = {
|
|
2863
|
+
operationId: string;
|
|
2864
|
+
expectedVersion?: number | undefined;
|
|
2865
|
+
apiKey: string;
|
|
2866
|
+
claudeIdentity?: {
|
|
2867
|
+
accountUuid: string;
|
|
2868
|
+
deviceId: string;
|
|
2869
|
+
} | undefined;
|
|
2870
|
+
};
|
|
2871
|
+
export type RevokeOrganizationModelProviderConnectionRequest = {
|
|
2872
|
+
operationId: string;
|
|
2873
|
+
expectedVersion: number;
|
|
2874
|
+
};
|
|
2875
|
+
export type OrganizationProviderCustomModel = WorkspaceGatewayCustomModel;
|
|
2876
|
+
export type OrganizationProviderCustomModelsResponse = {
|
|
2877
|
+
models: OrganizationProviderCustomModel[];
|
|
2878
|
+
};
|
|
2879
|
+
export type CreateOrganizationProviderCustomModelRequest = CreateWorkspaceGatewayCustomModelRequest;
|
|
2880
|
+
export type DeleteOrganizationProviderCustomModelRequest = DeleteWorkspaceGatewayCustomModelRequest;
|
|
2881
|
+
/**
|
|
2882
|
+
* The workspace's hard model/provider allowlist. `null` means unrestricted for
|
|
2883
|
+
* that dimension; an empty array is an explicit total block.
|
|
2884
|
+
*/
|
|
2885
|
+
export type WorkspaceModelAccessPolicy = {
|
|
2886
|
+
allowedProviders: string[] | null;
|
|
2887
|
+
allowedModels: string[] | null;
|
|
2888
|
+
};
|
|
2889
|
+
/** Full replacement body for `PUT /v1/workspaces/:id/model-policy`. */
|
|
2890
|
+
export type UpdateWorkspaceModelAccessPolicyRequest = {
|
|
2891
|
+
allowedProviders?: string[] | null | undefined;
|
|
2892
|
+
allowedModels?: string[] | null | undefined;
|
|
2893
|
+
};
|
|
2894
|
+
/**
|
|
2895
|
+
* Connection state of a workspace's Codex (ChatGPT) subscription, returned by
|
|
2896
|
+
* `GET /v1/workspaces/:id/codex/status`. `models` are the codex models the
|
|
2897
|
+
* workspace can select (projected as ClientModel under their own "no credits"
|
|
2898
|
+
* provider group), present only while connected.
|
|
2899
|
+
*/
|
|
2900
|
+
export type CodexConnectionStatus = {
|
|
2901
|
+
connected: boolean;
|
|
2902
|
+
plan?: string | null;
|
|
2903
|
+
valid?: boolean;
|
|
2904
|
+
expiresAt?: string | null;
|
|
2905
|
+
lastError?: string | null;
|
|
2906
|
+
models?: ClientModel[];
|
|
2907
|
+
/** The account a session runs on when unpinned (label for the in-session indicator). */
|
|
2908
|
+
activeAccount?: {
|
|
2909
|
+
id: string;
|
|
2910
|
+
label?: string | null;
|
|
2911
|
+
chatgptAccountId?: string | null;
|
|
2912
|
+
} | null;
|
|
2913
|
+
/** Live model-catalog probe result for the active account only. */
|
|
2914
|
+
activeAccountValid?: boolean;
|
|
2915
|
+
/** Cached readiness of any account in the effective worker pool. */
|
|
2916
|
+
poolReady?: boolean;
|
|
2917
|
+
/** Cached unpinned worker routability; rotation-off remains active-pointer-only. */
|
|
2918
|
+
workerRoutable?: boolean;
|
|
2919
|
+
/** How many Codex accounts the workspace has connected. */
|
|
1987
2920
|
accountCount?: number;
|
|
2921
|
+
source?: WorkspaceCodexSubscriptionSource;
|
|
2922
|
+
};
|
|
2923
|
+
export type WorkspaceCodexSubscriptionMode = "automatic" | "workspace" | "organization" | "disabled";
|
|
2924
|
+
export type WorkspaceCodexSubscriptionSource = {
|
|
2925
|
+
accountId: string;
|
|
2926
|
+
workspaceId: string;
|
|
2927
|
+
workspaceKind: "personal" | "shared";
|
|
2928
|
+
mode: WorkspaceCodexSubscriptionMode;
|
|
2929
|
+
effectiveSource: "workspace" | "organization" | "disabled";
|
|
2930
|
+
workspaceAvailable: boolean;
|
|
2931
|
+
organizationAvailable: boolean;
|
|
1988
2932
|
};
|
|
1989
2933
|
/**
|
|
1990
2934
|
* One normalized Codex usage window (5h or weekly), camelCase end-to-end (the
|
|
@@ -2023,6 +2967,7 @@ export type CodexUsagePayload = {
|
|
|
2023
2967
|
meteredFeature: string;
|
|
2024
2968
|
fiveHour: CodexUsageWindow | null;
|
|
2025
2969
|
weekly: CodexUsageWindow | null;
|
|
2970
|
+
unknownWindowExhausted: boolean;
|
|
2026
2971
|
}>;
|
|
2027
2972
|
credits?: {
|
|
2028
2973
|
hasCredits: boolean;
|
|
@@ -2031,13 +2976,34 @@ export type CodexUsagePayload = {
|
|
|
2031
2976
|
balance: string;
|
|
2032
2977
|
};
|
|
2033
2978
|
};
|
|
2979
|
+
/** One model a Codex account's current ChatGPT plan was proven not to include. */
|
|
2980
|
+
export type CodexPlanExcludedModel = {
|
|
2981
|
+
/** Product model id, for example `codex/gpt-6-sol`. */
|
|
2982
|
+
model: string;
|
|
2983
|
+
/** Display name, for example "GPT-6 Sol". */
|
|
2984
|
+
label: string;
|
|
2985
|
+
excludedAt: string;
|
|
2986
|
+
retryAfter: string;
|
|
2987
|
+
};
|
|
2034
2988
|
/** One connected Codex (ChatGPT) account in a workspace (multi-account P1). Metadata only. */
|
|
2035
2989
|
export type CodexAccount = {
|
|
2036
2990
|
id: string;
|
|
2991
|
+
source?: "workspace" | "organization";
|
|
2037
2992
|
chatgptAccountId?: string | null;
|
|
2038
2993
|
label?: string | null;
|
|
2039
2994
|
email?: string | null;
|
|
2040
2995
|
plan?: string | null;
|
|
2996
|
+
/** When the provider last confirmed `plan` (connect, token refresh, or usage read). */
|
|
2997
|
+
planCheckedAt?: string | null;
|
|
2998
|
+
/** Plan before the most recent observed plan change, and when that change was seen. */
|
|
2999
|
+
planChangedFrom?: string | null;
|
|
3000
|
+
planChangedAt?: string | null;
|
|
3001
|
+
/**
|
|
3002
|
+
* Models the current plan was proven not to include. Each is skipped by
|
|
3003
|
+
* automatic selection until `retryAfter` (one request then re-checks it), or
|
|
3004
|
+
* until a different plan is observed, for example after refreshing usage.
|
|
3005
|
+
*/
|
|
3006
|
+
planExcludedModels?: CodexPlanExcludedModel[];
|
|
2041
3007
|
status: "active" | "needs_relogin" | "error";
|
|
2042
3008
|
active: boolean;
|
|
2043
3009
|
expiresAt?: string | null;
|
|
@@ -2104,6 +3070,12 @@ export type CodexAccountOverview = {
|
|
|
2104
3070
|
credits: CodexResetCredit[];
|
|
2105
3071
|
};
|
|
2106
3072
|
canRedeem: boolean;
|
|
3073
|
+
/** Secret-free reason redemption is owner-actionable or view-only. */
|
|
3074
|
+
redemptionAccess: {
|
|
3075
|
+
ownership: "current_human" | "unowned" | "different_human" | "managed_human_unavailable";
|
|
3076
|
+
/** A direct managed-cookie admin may claim only an unowned same-provider row by reconnecting. */
|
|
3077
|
+
canClaimUnownedViaReconnect: boolean;
|
|
3078
|
+
};
|
|
2107
3079
|
/** Owning managed-cookie human may replay durable completion without a healthy provider token. */
|
|
2108
3080
|
canResumeRedemption: boolean;
|
|
2109
3081
|
/** Durable owner-scoped ambiguity/completion discovery; never redemption authority for agents. */
|
|
@@ -2129,6 +3101,7 @@ export type CodexRotationSettings = {
|
|
|
2129
3101
|
export type CodexAccountsResponse = {
|
|
2130
3102
|
accounts: CodexAccount[];
|
|
2131
3103
|
activeAccountId: string | null;
|
|
3104
|
+
source?: WorkspaceCodexSubscriptionSource;
|
|
2132
3105
|
/** Added by Apps-aware servers; absent on older same-major deployments. */
|
|
2133
3106
|
apps?: {
|
|
2134
3107
|
available: boolean;
|
|
@@ -2139,6 +3112,18 @@ export type CodexAccountsResponse = {
|
|
|
2139
3112
|
};
|
|
2140
3113
|
settings: CodexRotationSettings;
|
|
2141
3114
|
};
|
|
3115
|
+
export type OrganizationCodexAccountsResponse = Omit<CodexAccountsResponse, "apps" | "source">;
|
|
3116
|
+
/** Session-authorized choices: the accepted pool for a capacity wait, otherwise
|
|
3117
|
+
* the current pool for the next turn. Current execution may use another pool. */
|
|
3118
|
+
export type SessionCodexAccountsResponse = Omit<CodexAccountsResponse, "apps" | "source"> & {
|
|
3119
|
+
currentSelection: {
|
|
3120
|
+
credentialId: string | null;
|
|
3121
|
+
waiting: boolean;
|
|
3122
|
+
} | null;
|
|
3123
|
+
currentAccount: CodexAccount | null;
|
|
3124
|
+
pinnedAccountId: string | null;
|
|
3125
|
+
lastAccountId: string | null;
|
|
3126
|
+
};
|
|
2142
3127
|
export type CodexAppsUpdate = {
|
|
2143
3128
|
credentialId: string | null;
|
|
2144
3129
|
version: number;
|
|
@@ -2169,6 +3154,86 @@ export type CodexConnectPoll = {
|
|
|
2169
3154
|
accountId?: string;
|
|
2170
3155
|
isActive?: boolean;
|
|
2171
3156
|
};
|
|
3157
|
+
/** Explicit authority of one connected SuperGrok/xAI subscription account. */
|
|
3158
|
+
export type SuperGrokAccountScope = "workspace" | "user" | "organization";
|
|
3159
|
+
/** Metadata-only connected SuperGrok account. Secret OAuth material never crosses the API. */
|
|
3160
|
+
export type SuperGrokAccount = {
|
|
3161
|
+
id: string;
|
|
3162
|
+
plan?: string | null;
|
|
3163
|
+
scope: SuperGrokAccountScope;
|
|
3164
|
+
subject: string;
|
|
3165
|
+
email?: string | null;
|
|
3166
|
+
label?: string | null;
|
|
3167
|
+
status: "active" | "needs_relogin" | "error";
|
|
3168
|
+
active: boolean;
|
|
3169
|
+
expiresAt?: string | null;
|
|
3170
|
+
lastRefreshAt?: string | null;
|
|
3171
|
+
lastError?: string | null;
|
|
3172
|
+
allocatorEnabled: boolean;
|
|
3173
|
+
allocatorVersion: number;
|
|
3174
|
+
allocatorUpdatedAt?: string | null;
|
|
3175
|
+
exhaustedUntil?: string | null;
|
|
3176
|
+
quota?: {
|
|
3177
|
+
usedPercent: number | null;
|
|
3178
|
+
periodStart: string | null;
|
|
3179
|
+
periodEnd: string | null;
|
|
3180
|
+
subscriptionTier: string | null;
|
|
3181
|
+
checkedAt: string | null;
|
|
3182
|
+
} | null;
|
|
3183
|
+
};
|
|
3184
|
+
export type SuperGrokRotationSettings = {
|
|
3185
|
+
rotationEnabled: boolean;
|
|
3186
|
+
rotationStrategy: "sharded";
|
|
3187
|
+
activeCredentialId: string | null;
|
|
3188
|
+
};
|
|
3189
|
+
/** GET /supergrok/accounts — visible accounts plus the workspace active pointer. */
|
|
3190
|
+
export type SuperGrokAccountsResponse = {
|
|
3191
|
+
source?: "workspace" | "user" | "organization";
|
|
3192
|
+
organizationId?: string;
|
|
3193
|
+
accounts: SuperGrokAccount[];
|
|
3194
|
+
activeAccountId: string | null;
|
|
3195
|
+
settings: SuperGrokRotationSettings;
|
|
3196
|
+
};
|
|
3197
|
+
export type SuperGrokConnectionStatus = {
|
|
3198
|
+
connected: boolean;
|
|
3199
|
+
valid?: boolean;
|
|
3200
|
+
accountCount?: number;
|
|
3201
|
+
models?: ClientModel[];
|
|
3202
|
+
activeAccount?: {
|
|
3203
|
+
id: string;
|
|
3204
|
+
label?: string | null;
|
|
3205
|
+
subject?: string | null;
|
|
3206
|
+
scope: SuperGrokAccountScope;
|
|
3207
|
+
} | null;
|
|
3208
|
+
};
|
|
3209
|
+
/** Workspace is the deliberately simple/default connection authority. */
|
|
3210
|
+
export type SuperGrokConnectStart = {
|
|
3211
|
+
userCode: string;
|
|
3212
|
+
verificationUri: string;
|
|
3213
|
+
verificationUriComplete?: string | null;
|
|
3214
|
+
intervalSeconds: number;
|
|
3215
|
+
expiresInSeconds: number;
|
|
3216
|
+
scope: SuperGrokAccountScope;
|
|
3217
|
+
state: string;
|
|
3218
|
+
};
|
|
3219
|
+
export type SuperGrokConnectPoll = {
|
|
3220
|
+
status: "pending" | "slow_down";
|
|
3221
|
+
intervalSeconds?: number;
|
|
3222
|
+
} | {
|
|
3223
|
+
status: "expired" | "denied";
|
|
3224
|
+
} | {
|
|
3225
|
+
status: "connected";
|
|
3226
|
+
accountId: string;
|
|
3227
|
+
scope: SuperGrokAccountScope;
|
|
3228
|
+
isActive: boolean;
|
|
3229
|
+
email?: string | null;
|
|
3230
|
+
};
|
|
3231
|
+
export type SuperGrokAllocatorUpdate = {
|
|
3232
|
+
allocatorEnabled: boolean;
|
|
3233
|
+
allocatorVersion: number;
|
|
3234
|
+
allocatorUpdatedAt: string | null;
|
|
3235
|
+
changed: boolean;
|
|
3236
|
+
};
|
|
2172
3237
|
/** Remaining usage/limits for one account. `usage` is the normalized P2 payload. */
|
|
2173
3238
|
export type CodexUsage = {
|
|
2174
3239
|
status: "ok" | "limit_reached" | "error" | "no-data";
|
|
@@ -2193,8 +3258,17 @@ export type ClientAuthConfig = {
|
|
|
2193
3258
|
} | {
|
|
2194
3259
|
mode: "managedSession";
|
|
2195
3260
|
session: "cookie";
|
|
3261
|
+
/** Defaults to true when omitted by an older deployment. */
|
|
3262
|
+
emailVerificationRequired?: boolean;
|
|
3263
|
+
/** Configured managed sign-in providers; omitted by older deployments. */
|
|
3264
|
+
socialProviders?: ("google" | "github")[];
|
|
3265
|
+
/**
|
|
3266
|
+
* False while the deployment has paused new account creation; existing
|
|
3267
|
+
* accounts can still sign in. Omitted (treat as true) by older deployments.
|
|
3268
|
+
*/
|
|
3269
|
+
newSignupsEnabled?: boolean;
|
|
2196
3270
|
};
|
|
2197
|
-
export declare const OPENGENI_API_CONTRACT_REVISION: "2026-
|
|
3271
|
+
export declare const OPENGENI_API_CONTRACT_REVISION: "2026-09-plugins-and-skills-v1";
|
|
2198
3272
|
export declare const OPENGENI_API_CONTRACT_HEADER: "x-opengeni-api-contract";
|
|
2199
3273
|
/** Bounded request/response identifier shared by browser, ingress, and API diagnostics. */
|
|
2200
3274
|
export declare const OPENGENI_CORRELATION_HEADER: "x-opengeni-correlation-id";
|
|
@@ -2207,25 +3281,83 @@ export declare const OPENGENI_CORRELATION_HEADER: "x-opengeni-correlation-id";
|
|
|
2207
3281
|
*/
|
|
2208
3282
|
export type ClientConfig = {
|
|
2209
3283
|
deploymentRevision: string;
|
|
2210
|
-
|
|
3284
|
+
/**
|
|
3285
|
+
* The API's contract revision. Equals `OPENGENI_API_CONTRACT_REVISION` for a
|
|
3286
|
+
* `"strict"` client (it throws otherwise); a `"compatible"` client may
|
|
3287
|
+
* receive a newer revision from an additive deployment within its major.
|
|
3288
|
+
*/
|
|
3289
|
+
apiContractRevision: string;
|
|
2211
3290
|
serverVersion?: string | undefined;
|
|
3291
|
+
claudeSubscriptionEnabled?: boolean | undefined;
|
|
2212
3292
|
defaultModel: string;
|
|
2213
3293
|
allowedModels: string[];
|
|
2214
3294
|
models: ClientModel[];
|
|
2215
3295
|
defaultReasoningEffort: ReasoningEffort;
|
|
2216
3296
|
allowedReasoningEfforts: ReasoningEffort[];
|
|
3297
|
+
defaultSandboxBackend?: SandboxBackend | undefined;
|
|
2217
3298
|
mcpServers: {
|
|
2218
3299
|
id: string;
|
|
2219
3300
|
name: string;
|
|
2220
3301
|
}[];
|
|
3302
|
+
/** Deployment defaults and hard maximum for built-in OpenGeni session tools. */
|
|
3303
|
+
firstPartyMcpTools?: {
|
|
3304
|
+
default: FirstPartyMcpToolName[];
|
|
3305
|
+
allowed: FirstPartyMcpToolName[];
|
|
3306
|
+
} | undefined;
|
|
2221
3307
|
fileUploads: {
|
|
2222
3308
|
enabled: boolean;
|
|
2223
3309
|
maxSizeBytes: number;
|
|
2224
3310
|
};
|
|
3311
|
+
/**
|
|
3312
|
+
* `false` when a host's session proxy fixes the model policy
|
|
3313
|
+
* (`createSessionProxyHandler({ modelSelection: false })`), so UIs hide the
|
|
3314
|
+
* model picker; `true` when the host explicitly offers end users model
|
|
3315
|
+
* choice (embedded stock UIs then show the picker). OpenGeni itself omits it.
|
|
3316
|
+
*/
|
|
3317
|
+
modelSelection?: boolean | undefined;
|
|
3318
|
+
/** Session proxy sandbox-path download opt-in; absent on native deployments. */
|
|
3319
|
+
sandboxFiles?: boolean | undefined;
|
|
3320
|
+
/**
|
|
3321
|
+
* Session proxy only: the workspace the proxy resolved for this user, so a
|
|
3322
|
+
* browser pointed at the proxy (`<OpenGeniChat baseUrl=... />`) needs no
|
|
3323
|
+
* workspace id. Absent on native deployments and older proxies.
|
|
3324
|
+
*/
|
|
3325
|
+
workspaceId?: string | undefined;
|
|
3326
|
+
/**
|
|
3327
|
+
* Session proxy capability for the embedded artifact viewer; absent on
|
|
3328
|
+
* native deployments. The live socket is ticket-authenticated and reached
|
|
3329
|
+
* directly; the cache partition identifies the proxied user.
|
|
3330
|
+
*/
|
|
3331
|
+
artifacts?: {
|
|
3332
|
+
editableLiveUrl: string;
|
|
3333
|
+
cachePartition: {
|
|
3334
|
+
accountId: string;
|
|
3335
|
+
principalId: string;
|
|
3336
|
+
authorizationEpoch: string;
|
|
3337
|
+
};
|
|
3338
|
+
} | undefined;
|
|
2225
3339
|
/** Native browser microphone capture + server-side transcription capability. */
|
|
2226
3340
|
voiceInput?: ClientVoiceInputConfig | undefined;
|
|
3341
|
+
/**
|
|
3342
|
+
* Whether the deployment offers the Jev-backed code_search agent tool and
|
|
3343
|
+
* what workspaces without their own setting get (`split` = half of sessions).
|
|
3344
|
+
*/
|
|
3345
|
+
codeSearch?: {
|
|
3346
|
+
available: boolean;
|
|
3347
|
+
workspaceDefault: "off" | "on" | "split";
|
|
3348
|
+
} | undefined;
|
|
3349
|
+
/** Agent configuration rollout and per-capability availability. */
|
|
3350
|
+
agentConfig?: ClientAgentConfig | undefined;
|
|
2227
3351
|
productAccessMode: ProductAccessMode;
|
|
3352
|
+
/** Client-safe hint for whether the console should offer Stripe checkout. */
|
|
3353
|
+
billingMode?: BillingMode | undefined;
|
|
3354
|
+
managedAuthSessionSetMode: "legacy" | "dual" | "broker";
|
|
2228
3355
|
auth: ClientAuthConfig;
|
|
3356
|
+
/**
|
|
3357
|
+
* Product documentation for a console Help link. `null` means the deployment
|
|
3358
|
+
* hides the link; absent means a server that predates the field.
|
|
3359
|
+
*/
|
|
3360
|
+
documentationUrl?: string | null | undefined;
|
|
2229
3361
|
analytics: {
|
|
2230
3362
|
consentRequired: boolean;
|
|
2231
3363
|
providers: {
|
|
@@ -2241,6 +3373,13 @@ export type ClientConfig = {
|
|
|
2241
3373
|
} | undefined;
|
|
2242
3374
|
};
|
|
2243
3375
|
};
|
|
3376
|
+
/** Operator-owned legal documents the signed-out console links to, when configured. */
|
|
3377
|
+
legal?: {
|
|
3378
|
+
privacyPolicyUrl?: string | undefined;
|
|
3379
|
+
termsOfServiceUrl?: string | undefined;
|
|
3380
|
+
} | undefined;
|
|
3381
|
+
/** Operator support address the console offers as a mailto link, when configured. */
|
|
3382
|
+
supportEmail?: string | undefined;
|
|
2244
3383
|
structuredServices: {
|
|
2245
3384
|
fileSystem: boolean;
|
|
2246
3385
|
git: boolean;
|
|
@@ -2250,6 +3389,7 @@ export type ClientConfig = {
|
|
|
2250
3389
|
/** Client-safe voice-input capability projection. */
|
|
2251
3390
|
export type ClientVoiceInputConfig = {
|
|
2252
3391
|
available: boolean;
|
|
3392
|
+
providers?: VoiceInputProviderId[] | undefined;
|
|
2253
3393
|
maxDurationSeconds: number;
|
|
2254
3394
|
maxSizeBytes: number;
|
|
2255
3395
|
acceptedMimeTypes: string[];
|
|
@@ -2334,11 +3474,43 @@ export type AccessGrant = {
|
|
|
2334
3474
|
subjectId: string;
|
|
2335
3475
|
subjectLabel?: string | undefined;
|
|
2336
3476
|
permissions: Permission[];
|
|
3477
|
+
/** Explicit policies never expand `workspace:admin` into unselected permissions. */
|
|
3478
|
+
permissionMode?: "legacy" | "explicit" | undefined;
|
|
2337
3479
|
principalKind?: AccessPrincipalKind | undefined;
|
|
2338
3480
|
metadata?: Record<string, unknown> | undefined;
|
|
2339
3481
|
serviceInitiator?: ServiceTurnInitiator | undefined;
|
|
2340
3482
|
serviceInitiatorContext?: ServiceTurnInitiatorContext | undefined;
|
|
2341
3483
|
};
|
|
3484
|
+
/**
|
|
3485
|
+
* Authority of a directly used organization or workspace API key, separate
|
|
3486
|
+
* from the caller's account and workspace grants. Full organization keys can
|
|
3487
|
+
* provision shared workspaces, external members, and sessions through `asUser`;
|
|
3488
|
+
* those user requests additionally need the user's live membership.
|
|
3489
|
+
* Organization-key scope excludes Personal workspaces. Neither key kind bypasses
|
|
3490
|
+
* session visibility or the explicit `secrets:read` permission requirement.
|
|
3491
|
+
*/
|
|
3492
|
+
export type AccessCredential = {
|
|
3493
|
+
kind: "organization_api_key" | "workspace_api_key";
|
|
3494
|
+
/** Organization keys only; omitted for workspace keys. */
|
|
3495
|
+
access?: OrganizationApiKeyAccess | undefined;
|
|
3496
|
+
/** The key's organization id. */
|
|
3497
|
+
accountId: string;
|
|
3498
|
+
/** Null for an organization key; `workspaceScope` selects shared workspaces, never Personal. */
|
|
3499
|
+
workspaceId: string | null;
|
|
3500
|
+
/**
|
|
3501
|
+
* Effective workspace permissions, with admin expansion only for legacy keys. Excludes
|
|
3502
|
+
* account-only permissions and includes `secrets:read` only when explicitly
|
|
3503
|
+
* granted. Explicit policies grant exactly their selected permissions.
|
|
3504
|
+
*/
|
|
3505
|
+
effectiveWorkspacePermissions: Permission[];
|
|
3506
|
+
/** Organization keys only; the preset label never adds permissions. */
|
|
3507
|
+
policy?: OrganizationAccessPolicy | undefined;
|
|
3508
|
+
/** Organization keys only; omitted on older servers. */
|
|
3509
|
+
workspaceScope?: OrganizationWorkspaceScope | undefined;
|
|
3510
|
+
/** Plain-language explanation of the key's scope and limits. */
|
|
3511
|
+
note: string;
|
|
3512
|
+
};
|
|
3513
|
+
/** Caller identity, grants, defaults, and optional direct API-key authority. */
|
|
2342
3514
|
export type AccessContext = {
|
|
2343
3515
|
mode: ProductAccessMode;
|
|
2344
3516
|
subjectId: string;
|
|
@@ -2347,10 +3519,415 @@ export type AccessContext = {
|
|
|
2347
3519
|
workspaceGrants: AccessGrant[];
|
|
2348
3520
|
defaultAccountId: string | null;
|
|
2349
3521
|
defaultWorkspaceId: string | null;
|
|
3522
|
+
/**
|
|
3523
|
+
* Direct API-key authority; omitted for `asUser`/external actors, humans,
|
|
3524
|
+
* delegated tokens, other caller contexts, and older servers. Existing grants
|
|
3525
|
+
* are unchanged. Full organization keys can provision shared workspaces,
|
|
3526
|
+
* external members, and `asUser` sessions; user requests still need live
|
|
3527
|
+
* membership. Organization-key scope excludes Personal workspaces. Neither key
|
|
3528
|
+
* kind bypasses session visibility or the explicit `secrets:read` requirement.
|
|
3529
|
+
*/
|
|
3530
|
+
credential?: AccessCredential | undefined;
|
|
3531
|
+
};
|
|
3532
|
+
export type ManagedOrganizationMembership = {
|
|
3533
|
+
id: string;
|
|
3534
|
+
organizationId: string;
|
|
3535
|
+
status: "active";
|
|
3536
|
+
personalWorkspaceId: string;
|
|
3537
|
+
};
|
|
3538
|
+
export type ListManagedOrganizationMembershipsResponse = {
|
|
3539
|
+
memberships: ManagedOrganizationMembership[];
|
|
3540
|
+
};
|
|
3541
|
+
export type UserResourceKind = "connection" | "document" | "variable_set" | "rig" | "connected_machine";
|
|
3542
|
+
export type UserResourceGrantAction = "connection.use" | "document.read" | "variable_set.use" | "rig.use" | "connected_machine.use";
|
|
3543
|
+
export type UserResourceAuthorityGrant = {
|
|
3544
|
+
grantId: string;
|
|
3545
|
+
targetWorkspaceId: string;
|
|
3546
|
+
targetSessionId: string | null;
|
|
3547
|
+
action: UserResourceGrantAction;
|
|
3548
|
+
mode: "once" | "session" | "always";
|
|
3549
|
+
context: "user_private" | "workspace_shared";
|
|
3550
|
+
authorityEpoch: number | null;
|
|
3551
|
+
generation: number;
|
|
3552
|
+
status: "active" | "consumed" | "revoked" | "expired";
|
|
3553
|
+
expiresAt: string | null;
|
|
3554
|
+
delegation: UserResourceDelegation;
|
|
3555
|
+
};
|
|
3556
|
+
export type UserResourceAuthoritySummary = {
|
|
3557
|
+
authorityId: string;
|
|
3558
|
+
resourceKind: UserResourceKind;
|
|
3559
|
+
resourceId: string;
|
|
3560
|
+
originWorkspaceId: string | null;
|
|
3561
|
+
generation: number;
|
|
3562
|
+
status: "active" | "retained" | "revoked";
|
|
3563
|
+
grants: UserResourceAuthorityGrant[];
|
|
3564
|
+
};
|
|
3565
|
+
export type ListUserResourceAuthoritiesOptions = {
|
|
3566
|
+
resourceKind: Exclude<UserResourceKind, "connection">;
|
|
3567
|
+
cursor?: string | undefined;
|
|
3568
|
+
limit?: number | undefined;
|
|
3569
|
+
};
|
|
3570
|
+
export type ListUserResourceAuthoritiesResponse = {
|
|
3571
|
+
scope: "user";
|
|
3572
|
+
authorities: UserResourceAuthoritySummary[];
|
|
3573
|
+
nextCursor: string | null;
|
|
3574
|
+
};
|
|
3575
|
+
export type IssueUserResourceGrantRequest = {
|
|
3576
|
+
scope: "user";
|
|
3577
|
+
resourceKind: Exclude<UserResourceKind, "connection">;
|
|
3578
|
+
mode: "session";
|
|
3579
|
+
context: "user_private" | "workspace_shared";
|
|
3580
|
+
sessionId: string;
|
|
3581
|
+
expectedAuthorityEpoch: number;
|
|
3582
|
+
workspaceSharedAcknowledged?: boolean | undefined;
|
|
3583
|
+
} | {
|
|
3584
|
+
scope: "user";
|
|
3585
|
+
resourceKind: Exclude<UserResourceKind, "connection">;
|
|
3586
|
+
mode: "always";
|
|
3587
|
+
context: "user_private" | "workspace_shared";
|
|
3588
|
+
sessionId?: null | undefined;
|
|
3589
|
+
expectedAuthorityEpoch?: null | undefined;
|
|
3590
|
+
workspaceSharedAcknowledged?: boolean | undefined;
|
|
3591
|
+
};
|
|
3592
|
+
export type UserResourceGrantMutationResponse = {
|
|
3593
|
+
scope: "user";
|
|
3594
|
+
grant: UserResourceAuthorityGrant;
|
|
3595
|
+
};
|
|
3596
|
+
export type RevokeUserResourceGrantResponse = {
|
|
3597
|
+
scope: "user";
|
|
3598
|
+
grant: {
|
|
3599
|
+
grantId: string;
|
|
3600
|
+
generation: number;
|
|
3601
|
+
status: "revoked";
|
|
3602
|
+
revokedAt: string;
|
|
3603
|
+
};
|
|
3604
|
+
};
|
|
3605
|
+
export type OrganizationMembershipRole = "owner" | "admin" | "member";
|
|
3606
|
+
export type WorkspaceMemberRole = "viewer" | "member" | "admin" | "custom";
|
|
3607
|
+
export type AssignableWorkspaceMemberRole = "viewer" | "member" | "admin";
|
|
3608
|
+
export type OrganizationUserSetupDelivery = {
|
|
3609
|
+
id: string;
|
|
3610
|
+
state: "pending" | "sent" | "failed" | "outcome_unknown" | "revoked";
|
|
3611
|
+
attemptCount: number;
|
|
3612
|
+
revision: number;
|
|
3613
|
+
errorClass: string | null;
|
|
3614
|
+
retryState: "available" | "reconciliation_required" | "unavailable";
|
|
3615
|
+
sentAt: string | null;
|
|
3616
|
+
updatedAt: string;
|
|
3617
|
+
};
|
|
3618
|
+
export type OrganizationInvitation = {
|
|
3619
|
+
id: string;
|
|
3620
|
+
organizationId: string;
|
|
3621
|
+
organizationName: string | null;
|
|
3622
|
+
targetEmail: string;
|
|
3623
|
+
targetName: string | null;
|
|
3624
|
+
initialWorkspaceIds: string[];
|
|
3625
|
+
role: OrganizationMembershipRole;
|
|
3626
|
+
status: "pending" | "accepted" | "revoked" | "expired";
|
|
3627
|
+
revision: number;
|
|
3628
|
+
expiresAt: string;
|
|
3629
|
+
acceptedMembershipId: string | null;
|
|
3630
|
+
createdAt: string;
|
|
3631
|
+
updatedAt: string;
|
|
3632
|
+
delivery: OrganizationUserSetupDelivery | null;
|
|
3633
|
+
};
|
|
3634
|
+
export type OrganizationMember = {
|
|
3635
|
+
id: string;
|
|
3636
|
+
organizationId: string;
|
|
3637
|
+
subjectId: string;
|
|
3638
|
+
name: string | null;
|
|
3639
|
+
email: string | null;
|
|
3640
|
+
role: OrganizationMembershipRole;
|
|
3641
|
+
status: "provisioning" | "active" | "suspended" | "revoked";
|
|
3642
|
+
authorizationRevision: number;
|
|
3643
|
+
personalWorkspaceId: string | null;
|
|
3644
|
+
revokedAt: string | null;
|
|
3645
|
+
personalRetentionUntil: string | null;
|
|
3646
|
+
createdAt: string;
|
|
3647
|
+
updatedAt: string;
|
|
3648
|
+
};
|
|
3649
|
+
export type OrganizationAdministrationMemberWorkspaceAccess = {
|
|
3650
|
+
workspaceId: string;
|
|
3651
|
+
workspaceName: string;
|
|
3652
|
+
membershipId: string;
|
|
3653
|
+
role: WorkspaceMemberRole;
|
|
3654
|
+
updatedAt: string;
|
|
3655
|
+
};
|
|
3656
|
+
export type OrganizationAdministrationMember = {
|
|
3657
|
+
id: string;
|
|
3658
|
+
organizationId: string;
|
|
3659
|
+
subjectId: string;
|
|
3660
|
+
name: string | null;
|
|
3661
|
+
email: string | null;
|
|
3662
|
+
role: OrganizationMembershipRole;
|
|
3663
|
+
status: "provisioning" | "active" | "suspended" | "revoked";
|
|
3664
|
+
authorizationRevision: number;
|
|
3665
|
+
sharedWorkspaceAccess: OrganizationAdministrationMemberWorkspaceAccess[];
|
|
3666
|
+
revokedAt: string | null;
|
|
3667
|
+
createdAt: string;
|
|
3668
|
+
updatedAt: string;
|
|
3669
|
+
};
|
|
3670
|
+
export type OrganizationSummary = {
|
|
3671
|
+
id: string;
|
|
3672
|
+
name: string;
|
|
3673
|
+
createdAt: string;
|
|
3674
|
+
updatedAt: string;
|
|
3675
|
+
};
|
|
3676
|
+
export type OrganizationWorkspaceAccessMember = {
|
|
3677
|
+
membershipId: string;
|
|
3678
|
+
organizationMembershipId: string | null;
|
|
3679
|
+
subjectId: string;
|
|
3680
|
+
name: string | null;
|
|
3681
|
+
email: string | null;
|
|
3682
|
+
subjectLabel: string | null;
|
|
3683
|
+
principalKind: "human" | "service";
|
|
3684
|
+
organizationRole: OrganizationMembershipRole | null;
|
|
3685
|
+
role: WorkspaceMemberRole;
|
|
3686
|
+
permissions: string[];
|
|
3687
|
+
createdAt: string;
|
|
3688
|
+
updatedAt: string;
|
|
3689
|
+
};
|
|
3690
|
+
export type OrganizationWorkspaceAccess = {
|
|
3691
|
+
id: string;
|
|
3692
|
+
name: string;
|
|
3693
|
+
slug: string | null;
|
|
3694
|
+
createdAt: string;
|
|
3695
|
+
updatedAt: string;
|
|
3696
|
+
members: OrganizationWorkspaceAccessMember[];
|
|
3697
|
+
};
|
|
3698
|
+
export type OrganizationAdministrationOverview = {
|
|
3699
|
+
organization: OrganizationSummary;
|
|
3700
|
+
roles: OrganizationWorkspaceRoleDefinition[];
|
|
3701
|
+
workspaces: OrganizationWorkspaceAccess[];
|
|
3702
|
+
};
|
|
3703
|
+
export type OrganizationWorkspaceRoleDefinition = {
|
|
3704
|
+
role: AssignableWorkspaceMemberRole;
|
|
3705
|
+
label: string;
|
|
3706
|
+
description: string;
|
|
3707
|
+
permissions: Permission[];
|
|
3708
|
+
};
|
|
3709
|
+
export type OrganizationPrivateSessionSettings = {
|
|
3710
|
+
organizationId: string;
|
|
3711
|
+
enabled: boolean;
|
|
3712
|
+
available: boolean;
|
|
3713
|
+
version: number;
|
|
3714
|
+
updatedAt: string;
|
|
3715
|
+
changed?: boolean;
|
|
3716
|
+
};
|
|
3717
|
+
export type CreateOrganizationWorkspaceRequest = {
|
|
3718
|
+
name: string;
|
|
3719
|
+
operationId: string;
|
|
3720
|
+
};
|
|
3721
|
+
export type UpdateOrganizationWorkspaceRequest = {
|
|
3722
|
+
name: string;
|
|
3723
|
+
expectedUpdatedAt: string;
|
|
3724
|
+
operationId: string;
|
|
3725
|
+
};
|
|
3726
|
+
export type PutOrganizationWorkspaceMemberRequest = {
|
|
3727
|
+
role: AssignableWorkspaceMemberRole;
|
|
3728
|
+
expectedUpdatedAt: string | null;
|
|
3729
|
+
operationId: string;
|
|
3730
|
+
} | {
|
|
3731
|
+
role: "custom";
|
|
3732
|
+
permissions: Permission[];
|
|
3733
|
+
expectedUpdatedAt: string | null;
|
|
3734
|
+
operationId: string;
|
|
3735
|
+
};
|
|
3736
|
+
export type RevokeOrganizationWorkspaceMemberRequest = {
|
|
3737
|
+
expectedUpdatedAt: string;
|
|
3738
|
+
operationId: string;
|
|
3739
|
+
};
|
|
3740
|
+
export type RevokeOrganizationWorkspaceMemberResponse = {
|
|
3741
|
+
removed: boolean;
|
|
3742
|
+
replay: boolean;
|
|
3743
|
+
};
|
|
3744
|
+
export type CreateOrganizationRequest = {
|
|
3745
|
+
name: string;
|
|
3746
|
+
operationId: string;
|
|
3747
|
+
};
|
|
3748
|
+
export type CreateOrganizationResponse = {
|
|
3749
|
+
organization: OrganizationSummary;
|
|
3750
|
+
workspaceId: string;
|
|
3751
|
+
};
|
|
3752
|
+
export type CreateAdditionalOrganizationRequest = {
|
|
3753
|
+
name: string;
|
|
3754
|
+
workspaceName: string;
|
|
3755
|
+
operationId: string;
|
|
3756
|
+
};
|
|
3757
|
+
export type CreateAdditionalOrganizationResponse = {
|
|
3758
|
+
organization: OrganizationSummary;
|
|
3759
|
+
workspaceId: string;
|
|
3760
|
+
personalWorkspaceId: string;
|
|
3761
|
+
};
|
|
3762
|
+
export type UpdateOrganizationNameRequest = {
|
|
3763
|
+
name: string;
|
|
3764
|
+
expectedUpdatedAt: string;
|
|
3765
|
+
operationId: string;
|
|
3766
|
+
};
|
|
3767
|
+
export type UpdateOrganizationPrivateSessionSettingsRequest = {
|
|
3768
|
+
enabled: boolean;
|
|
3769
|
+
expectedVersion: number;
|
|
3770
|
+
operationId: string;
|
|
3771
|
+
};
|
|
3772
|
+
export type OrganizationRetentionPolicy = {
|
|
3773
|
+
organizationId: string;
|
|
3774
|
+
mode: "retain" | "delete_after";
|
|
3775
|
+
retentionDays: number | null;
|
|
3776
|
+
version: number;
|
|
3777
|
+
updatedAt: string;
|
|
3778
|
+
};
|
|
3779
|
+
export type OrganizationRecoveryPolicyState = "pending_acceptance" | "active" | "degraded" | "superseded" | "disabled";
|
|
3780
|
+
export type OrganizationRecoveryOperationState = "collecting" | "cooling" | "executed" | "cancelled" | "expired" | "superseded";
|
|
3781
|
+
export type OrganizationRecoveryUnavailableReason = "no_policy" | "pending_acceptance" | "degraded" | "disabled" | "identity_unavailable";
|
|
3782
|
+
export type OrganizationRecoveryMemberSummary = {
|
|
3783
|
+
membershipId: string;
|
|
3784
|
+
name: string | null;
|
|
3785
|
+
email: string | null;
|
|
3786
|
+
};
|
|
3787
|
+
export type OrganizationRecoveryCustodian = OrganizationRecoveryMemberSummary & {
|
|
3788
|
+
ordinal: number;
|
|
3789
|
+
enrollmentState: "pending_acceptance" | "accepted" | "ineligible";
|
|
3790
|
+
acceptedAt: string | null;
|
|
3791
|
+
};
|
|
3792
|
+
export type OrganizationRecoveryPolicy = {
|
|
3793
|
+
id: string;
|
|
3794
|
+
organizationId: string;
|
|
3795
|
+
revision: number;
|
|
3796
|
+
state: OrganizationRecoveryPolicyState;
|
|
3797
|
+
custodians: OrganizationRecoveryCustodian[];
|
|
3798
|
+
createdAt: string;
|
|
3799
|
+
updatedAt: string;
|
|
3800
|
+
};
|
|
3801
|
+
export type OrganizationRecoveryApproval = OrganizationRecoveryMemberSummary & {
|
|
3802
|
+
approvedAt: string;
|
|
3803
|
+
};
|
|
3804
|
+
export type OrganizationRecoveryOperation = {
|
|
3805
|
+
id: string;
|
|
3806
|
+
organizationId: string;
|
|
3807
|
+
policyId: string;
|
|
3808
|
+
policyRevision: number;
|
|
3809
|
+
revision: number;
|
|
3810
|
+
state: OrganizationRecoveryOperationState;
|
|
3811
|
+
target: OrganizationRecoveryMemberSummary;
|
|
3812
|
+
approvals: OrganizationRecoveryApproval[];
|
|
3813
|
+
approvalCount: number;
|
|
3814
|
+
quorumAt: string | null;
|
|
3815
|
+
executableAt: string | null;
|
|
3816
|
+
expiresAt: string;
|
|
3817
|
+
executedAt: string | null;
|
|
3818
|
+
cancelledAt: string | null;
|
|
3819
|
+
notificationJournaled: boolean;
|
|
3820
|
+
createdAt: string;
|
|
3821
|
+
updatedAt: string;
|
|
3822
|
+
};
|
|
3823
|
+
export type OrganizationRecoveryCapabilities = {
|
|
3824
|
+
configure: boolean;
|
|
3825
|
+
accept: boolean;
|
|
3826
|
+
disable: boolean;
|
|
3827
|
+
start: boolean;
|
|
3828
|
+
approve: boolean;
|
|
3829
|
+
cancel: boolean;
|
|
3830
|
+
execute: boolean;
|
|
3831
|
+
};
|
|
3832
|
+
export type OrganizationRecoveryOverview = {
|
|
3833
|
+
organizationId: string;
|
|
3834
|
+
availability: "available" | "recovery_unavailable";
|
|
3835
|
+
unavailableReason: OrganizationRecoveryUnavailableReason | null;
|
|
3836
|
+
recentReauthenticationAt: string | null;
|
|
3837
|
+
eligibleMembers: OrganizationRecoveryMemberSummary[];
|
|
3838
|
+
policy: OrganizationRecoveryPolicy | null;
|
|
3839
|
+
operation: OrganizationRecoveryOperation | null;
|
|
3840
|
+
capabilities: OrganizationRecoveryCapabilities;
|
|
3841
|
+
};
|
|
3842
|
+
export type ConfigureOrganizationRecoveryPolicyRequest = {
|
|
3843
|
+
custodianMembershipIds: [string, string, string];
|
|
3844
|
+
expectedPolicyRevision: number;
|
|
3845
|
+
operationId: string;
|
|
3846
|
+
};
|
|
3847
|
+
export type AcceptOrganizationRecoveryCustodyRequest = {
|
|
3848
|
+
expectedPolicyRevision: number;
|
|
3849
|
+
operationId: string;
|
|
3850
|
+
};
|
|
3851
|
+
export type DisableOrganizationRecoveryPolicyRequest = AcceptOrganizationRecoveryCustodyRequest;
|
|
3852
|
+
export type StartOrganizationRecoveryOperationRequest = {
|
|
3853
|
+
targetMembershipId: string;
|
|
3854
|
+
expectedPolicyRevision: number;
|
|
3855
|
+
operationId: string;
|
|
3856
|
+
};
|
|
3857
|
+
export type OrganizationRecoveryOperationCommandRequest = {
|
|
3858
|
+
expectedOperationRevision: number;
|
|
3859
|
+
operationId: string;
|
|
3860
|
+
};
|
|
3861
|
+
export type OrganizationRecoveryMutationResponse = {
|
|
3862
|
+
replay: boolean;
|
|
3863
|
+
overview: OrganizationRecoveryOverview;
|
|
3864
|
+
};
|
|
3865
|
+
export type CreateOrganizationInvitationRequest = {
|
|
3866
|
+
email: string;
|
|
3867
|
+
name?: string;
|
|
3868
|
+
initialWorkspaceIds?: string[];
|
|
3869
|
+
role?: OrganizationMembershipRole;
|
|
3870
|
+
expiresAt: string;
|
|
3871
|
+
operationId: string;
|
|
3872
|
+
};
|
|
3873
|
+
export type AcceptOrganizationInvitationRequest = {
|
|
3874
|
+
expectedRevision: number;
|
|
3875
|
+
operationId: string;
|
|
3876
|
+
};
|
|
3877
|
+
export type RevokeOrganizationInvitationRequest = AcceptOrganizationInvitationRequest;
|
|
3878
|
+
export type PreviewOrganizationUserSetupRequest = {
|
|
3879
|
+
token: string;
|
|
3880
|
+
};
|
|
3881
|
+
export type OrganizationUserSetupPreview = {
|
|
3882
|
+
state: "unavailable" | "expired" | "revoked" | "completed";
|
|
3883
|
+
} | {
|
|
3884
|
+
state: "pending";
|
|
3885
|
+
organizationId: string;
|
|
3886
|
+
organizationName: string;
|
|
3887
|
+
targetEmail: string;
|
|
3888
|
+
targetName: string | null;
|
|
3889
|
+
organizationRole: OrganizationMembershipRole;
|
|
3890
|
+
sharedWorkspaceAccess: Array<{
|
|
3891
|
+
workspaceId: string;
|
|
3892
|
+
workspaceName: string;
|
|
3893
|
+
role: AssignableWorkspaceMemberRole;
|
|
3894
|
+
}>;
|
|
3895
|
+
expiresAt: string;
|
|
3896
|
+
};
|
|
3897
|
+
export type RetryOrganizationUserSetupDeliveryRequest = {
|
|
3898
|
+
operationId: string;
|
|
3899
|
+
};
|
|
3900
|
+
export type UpdateOrganizationMemberRequest = {
|
|
3901
|
+
kind: "change_role" | "suspend" | "reactivate" | "offboard";
|
|
3902
|
+
role?: OrganizationMembershipRole;
|
|
3903
|
+
expectedAuthorizationRevision: number;
|
|
3904
|
+
operationId: string;
|
|
3905
|
+
reason?: string;
|
|
3906
|
+
};
|
|
3907
|
+
export type UpdateOrganizationRetentionPolicyRequest = {
|
|
3908
|
+
mode: "retain" | "delete_after";
|
|
3909
|
+
retentionDays: number | null;
|
|
3910
|
+
expectedVersion: number;
|
|
3911
|
+
operationId: string;
|
|
3912
|
+
};
|
|
3913
|
+
export type ListOrganizationInvitationsPageResponse = {
|
|
3914
|
+
invitations: OrganizationInvitation[];
|
|
3915
|
+
nextCursor: string | null;
|
|
3916
|
+
};
|
|
3917
|
+
export type ListOrganizationMembersResponse = {
|
|
3918
|
+
members: OrganizationAdministrationMember[];
|
|
3919
|
+
};
|
|
3920
|
+
export type ListOrganizationAdministrationMembersResponse = {
|
|
3921
|
+
members: OrganizationAdministrationMember[];
|
|
3922
|
+
};
|
|
3923
|
+
export type AcceptOrganizationInvitationResponse = {
|
|
3924
|
+
invitation: OrganizationInvitation;
|
|
3925
|
+
membership: OrganizationMember;
|
|
2350
3926
|
};
|
|
2351
3927
|
export type Workspace = {
|
|
2352
3928
|
id: string;
|
|
2353
3929
|
accountId: string;
|
|
3930
|
+
kind: "personal" | "shared";
|
|
2354
3931
|
name: string;
|
|
2355
3932
|
slug: string | null;
|
|
2356
3933
|
externalSource: string | null;
|
|
@@ -2358,6 +3935,8 @@ export type Workspace = {
|
|
|
2358
3935
|
agentInstructions: string | null;
|
|
2359
3936
|
settings: Record<string, unknown>;
|
|
2360
3937
|
inferenceControl: {
|
|
3938
|
+
timer?: WorkspacePauseTimer | null | undefined;
|
|
3939
|
+
serverTime?: string | undefined;
|
|
2361
3940
|
state: "active" | "paused";
|
|
2362
3941
|
revision: number;
|
|
2363
3942
|
reason: string | null;
|
|
@@ -2370,6 +3949,14 @@ export type Workspace = {
|
|
|
2370
3949
|
};
|
|
2371
3950
|
export type WorkspaceSettings = {
|
|
2372
3951
|
memoryEnabled?: boolean | undefined;
|
|
3952
|
+
/** Reversible Memory V1 prompt composition rollout. */
|
|
3953
|
+
memoryPromptMode?: "legacy_standing" | "retrieval_only" | undefined;
|
|
3954
|
+
/** Model policy inherited by new chats and scheduled tasks. */
|
|
3955
|
+
sessionDefaults?: WorkspaceSessionDefaults | undefined;
|
|
3956
|
+
/** Exact capability selection inherited by new top-level sessions. */
|
|
3957
|
+
sessionToolDefaults?: WorkspaceSessionToolDefaults | undefined;
|
|
3958
|
+
/** Allowlisted sandbox image for new managed boxes; absent uses the deployment image. */
|
|
3959
|
+
defaultSandboxImage?: string | null | undefined;
|
|
2373
3960
|
voiceInput?: WorkspaceVoiceInputSettings | undefined;
|
|
2374
3961
|
transcription?: WorkspaceTranscriptionPolicy | undefined;
|
|
2375
3962
|
maxNestedAgentDepth?: number | null | undefined;
|
|
@@ -2377,9 +3964,22 @@ export type WorkspaceSettings = {
|
|
|
2377
3964
|
codexCompactionDefault?: "remote_v2" | "portable" | undefined;
|
|
2378
3965
|
/** Whether agents may invoke the built-in structured human-input tool. */
|
|
2379
3966
|
agentHumanInputEnabled?: boolean | undefined;
|
|
3967
|
+
/** Whether agents get the Jev-backed code_search tool; absent or null follows the deployment. */
|
|
3968
|
+
codeSearchEnabled?: boolean | null | undefined;
|
|
2380
3969
|
slackReactionSummon?: WorkspaceSlackReactionSummonSettings | undefined;
|
|
3970
|
+
/** Slack orchestration notices; both default off when absent or invalid. */
|
|
3971
|
+
slackOrchestrationNotices?: WorkspaceSlackOrchestrationNoticeSettings | undefined;
|
|
2381
3972
|
[key: string]: unknown;
|
|
2382
3973
|
};
|
|
3974
|
+
export type WorkspaceSessionDefaults = {
|
|
3975
|
+
model: string;
|
|
3976
|
+
reasoningEffort: ReasoningEffort;
|
|
3977
|
+
};
|
|
3978
|
+
export type WorkspaceSessionToolDefaults = {
|
|
3979
|
+
inheritConnectedMcpServers?: boolean | undefined;
|
|
3980
|
+
mcpServerIds?: string[];
|
|
3981
|
+
firstPartyMcpTools?: FirstPartyMcpToolName[];
|
|
3982
|
+
};
|
|
2383
3983
|
export type WorkspaceSlackReactionSummonSettings = {
|
|
2384
3984
|
enabled: boolean;
|
|
2385
3985
|
emoji: "genie";
|
|
@@ -2390,6 +3990,16 @@ export type WorkspaceSlackReactionSummonSettings = {
|
|
|
2390
3990
|
channelIds: string[];
|
|
2391
3991
|
};
|
|
2392
3992
|
};
|
|
3993
|
+
/**
|
|
3994
|
+
* Per-workspace switches for the two Slack orchestration notices. Both are off
|
|
3995
|
+
* unless the workspace explicitly turned them on.
|
|
3996
|
+
*/
|
|
3997
|
+
export type WorkspaceSlackOrchestrationNoticeSettings = {
|
|
3998
|
+
/** Post a pointer card when a child worker blocks on input or an approval. */
|
|
3999
|
+
childRequiresAction?: boolean | undefined;
|
|
4000
|
+
/** Post one line when a goal pauses for budget or the continuation cap. */
|
|
4001
|
+
goalPaused?: boolean | undefined;
|
|
4002
|
+
};
|
|
2393
4003
|
export type SlackReactionChannel = {
|
|
2394
4004
|
id: string;
|
|
2395
4005
|
name: string | null;
|
|
@@ -2399,17 +4009,51 @@ export type SlackReactionChannelListResponse = {
|
|
|
2399
4009
|
channels: SlackReactionChannel[];
|
|
2400
4010
|
nextCursor: string | null;
|
|
2401
4011
|
};
|
|
4012
|
+
export type SlackChannelRoute = {
|
|
4013
|
+
slackChannelId: string;
|
|
4014
|
+
targetWorkspaceId: string;
|
|
4015
|
+
targetWorkspaceName: string | null;
|
|
4016
|
+
source: "picker" | "admin";
|
|
4017
|
+
updatedAt: string;
|
|
4018
|
+
};
|
|
4019
|
+
export type SlackChannelRouteListResponse = {
|
|
4020
|
+
routes: SlackChannelRoute[];
|
|
4021
|
+
routingEnabled: boolean;
|
|
4022
|
+
};
|
|
4023
|
+
export type UpdateSlackChannelRoutesRequest = {
|
|
4024
|
+
connectionId: string;
|
|
4025
|
+
routes: Array<{
|
|
4026
|
+
slackChannelId: string;
|
|
4027
|
+
targetWorkspaceId: string | null;
|
|
4028
|
+
}>;
|
|
4029
|
+
};
|
|
4030
|
+
export type VoiceInputProviderId = "supergrok-subscription" | "codex-subscription" | "openai" | "azure-openai";
|
|
2402
4031
|
export type WorkspaceVoiceInputSettings = {
|
|
2403
4032
|
enabled: boolean;
|
|
4033
|
+
preferredProvider?: VoiceInputProviderId | null | undefined;
|
|
4034
|
+
fallbackEnabled?: boolean | undefined;
|
|
2404
4035
|
};
|
|
2405
4036
|
export type UpdateWorkspaceSettingsRequest = {
|
|
2406
4037
|
memoryEnabled?: boolean | undefined;
|
|
4038
|
+
memoryPromptMode?: "legacy_standing" | "retrieval_only" | undefined;
|
|
4039
|
+
sessionDefaults?: WorkspaceSessionDefaults | undefined;
|
|
4040
|
+
sessionToolDefaults?: {
|
|
4041
|
+
mcpServerIds?: string[] | null;
|
|
4042
|
+
firstPartyMcpTools?: FirstPartyMcpToolName[] | null;
|
|
4043
|
+
inheritConnectedMcpServers?: boolean | null;
|
|
4044
|
+
} | undefined;
|
|
2407
4045
|
voiceInput?: WorkspaceVoiceInputSettings | undefined;
|
|
2408
4046
|
transcription?: WorkspaceTranscriptionPolicy | undefined;
|
|
2409
4047
|
maxNestedAgentDepth?: number | null | undefined;
|
|
2410
4048
|
codexCompactionDefault?: "remote_v2" | "portable" | undefined;
|
|
2411
4049
|
agentHumanInputEnabled?: boolean | undefined;
|
|
4050
|
+
codeSearchEnabled?: boolean | null | undefined;
|
|
2412
4051
|
slackReactionSummon?: WorkspaceSlackReactionSummonSettings | undefined;
|
|
4052
|
+
slackOrchestrationNotices?: WorkspaceSlackOrchestrationNoticeSettings | undefined;
|
|
4053
|
+
/** One of `listWorkspaceSandboxImages().images`, or null for the deployment image. */
|
|
4054
|
+
defaultSandboxImage?: string | null | undefined;
|
|
4055
|
+
/** Agent defaults for new sessions; null clears. Requires the admission switch. */
|
|
4056
|
+
sessionAgentDefaults?: WorkspaceAgentDefaults | null | undefined;
|
|
2413
4057
|
[key: string]: unknown;
|
|
2414
4058
|
};
|
|
2415
4059
|
export type SetWorkspaceDefaultRigRequest = {
|
|
@@ -2423,18 +4067,76 @@ export type CreateWorkspaceRequest = {
|
|
|
2423
4067
|
externalId?: string | undefined;
|
|
2424
4068
|
agentInstructions?: string | null | undefined;
|
|
2425
4069
|
};
|
|
4070
|
+
export type EnsureWorkspaceRequest = {
|
|
4071
|
+
/**
|
|
4072
|
+
* Owning organization id. An organization API key may omit it and the
|
|
4073
|
+
* workspace is created in the key's own organization; every other caller
|
|
4074
|
+
* must send it.
|
|
4075
|
+
*/
|
|
4076
|
+
accountId?: string | undefined;
|
|
4077
|
+
externalSource: string;
|
|
4078
|
+
externalId: string;
|
|
4079
|
+
name: string;
|
|
4080
|
+
slug?: string | undefined;
|
|
4081
|
+
agentInstructions?: string | null | undefined;
|
|
4082
|
+
};
|
|
4083
|
+
export type EnsureWorkspaceResponse = {
|
|
4084
|
+
workspace: Workspace;
|
|
4085
|
+
created: boolean;
|
|
4086
|
+
};
|
|
2426
4087
|
export type UpdateWorkspaceRequest = {
|
|
2427
4088
|
name?: string | undefined;
|
|
2428
4089
|
slug?: string | null | undefined;
|
|
2429
4090
|
agentInstructions?: string | null | undefined;
|
|
2430
4091
|
};
|
|
4092
|
+
/**
|
|
4093
|
+
* Legacy organization API key access tier, derived by the server from the key's
|
|
4094
|
+
* permissions: `full` can provision shared workspaces, external members, and
|
|
4095
|
+
* `asUser` sessions (user requests additionally need live membership);
|
|
4096
|
+
* `read` only inventories shared workspaces and reads their sessions, events,
|
|
4097
|
+
* and files. `developer_setup` configures shared workspaces and budgets without
|
|
4098
|
+
* API-key management or credential delegation; its default expiry is 24 hours.
|
|
4099
|
+
* Organization-key scope excludes Personal workspaces and bypasses neither
|
|
4100
|
+
* session visibility nor the explicit `secrets:read` permission requirement.
|
|
4101
|
+
*/
|
|
4102
|
+
export type OrganizationApiKeyAccess = "full" | "read" | "developer_setup";
|
|
4103
|
+
/** Informational preset label; the server recomputes it from explicit permissions. */
|
|
4104
|
+
export type OrganizationAccessPreset = "read_only" | "full" | "custom";
|
|
4105
|
+
/** Organization-key scope always excludes Personal workspaces. */
|
|
4106
|
+
export type OrganizationWorkspaceScope = {
|
|
4107
|
+
kind: "all";
|
|
4108
|
+
} | {
|
|
4109
|
+
kind: "selected";
|
|
4110
|
+
/** Up to 500 unique shared-workspace IDs in the same organization. Empty reaches none. */
|
|
4111
|
+
workspaceIds: string[];
|
|
4112
|
+
};
|
|
4113
|
+
export type OrganizationAccessPolicy = {
|
|
4114
|
+
preset: OrganizationAccessPreset;
|
|
4115
|
+
/** Exact grants, including `workspace:admin` individually; no implicit wildcard. */
|
|
4116
|
+
permissions: Permission[];
|
|
4117
|
+
workspaceScope: OrganizationWorkspaceScope;
|
|
4118
|
+
};
|
|
4119
|
+
export type OrganizationActor = "user" | "organization";
|
|
2431
4120
|
export type ApiKey = {
|
|
2432
4121
|
id: string;
|
|
2433
4122
|
accountId: string;
|
|
2434
4123
|
workspaceId: string | null;
|
|
2435
4124
|
name: string;
|
|
4125
|
+
description: string | null;
|
|
2436
4126
|
prefix: string;
|
|
2437
4127
|
permissions: Permission[];
|
|
4128
|
+
/** Organization keys only; omitted for workspace-scoped keys. */
|
|
4129
|
+
access?: OrganizationApiKeyAccess | undefined;
|
|
4130
|
+
policy?: OrganizationAccessPolicy | undefined;
|
|
4131
|
+
workspaceScope?: OrganizationWorkspaceScope | undefined;
|
|
4132
|
+
/** Legacy keys retain their historical workspace-admin wildcard. */
|
|
4133
|
+
permissionMode?: "legacy" | "explicit" | undefined;
|
|
4134
|
+
/** Organization keys: the service account that holds the key. */
|
|
4135
|
+
serviceAccount?: {
|
|
4136
|
+
id: string;
|
|
4137
|
+
name: string;
|
|
4138
|
+
role: OrganizationServiceAccountRole;
|
|
4139
|
+
} | null | undefined;
|
|
2438
4140
|
expiresAt: string | null;
|
|
2439
4141
|
revokedAt: string | null;
|
|
2440
4142
|
lastUsedAt: string | null;
|
|
@@ -2443,6 +4145,7 @@ export type ApiKey = {
|
|
|
2443
4145
|
};
|
|
2444
4146
|
export type CreateApiKeyRequest = {
|
|
2445
4147
|
name: string;
|
|
4148
|
+
description?: string | undefined;
|
|
2446
4149
|
permissions: Permission[];
|
|
2447
4150
|
expiresAt?: string | undefined;
|
|
2448
4151
|
};
|
|
@@ -2451,8 +4154,136 @@ export type CreateApiKeyResponse = {
|
|
|
2451
4154
|
/** The full secret token — shown once at creation, never returned again. */
|
|
2452
4155
|
token: string;
|
|
2453
4156
|
};
|
|
2454
|
-
export type
|
|
2455
|
-
|
|
4157
|
+
export type CreateOrganizationApiKeyRequest = {
|
|
4158
|
+
name: string;
|
|
4159
|
+
description?: string | undefined;
|
|
4160
|
+
expiresAt?: string | undefined;
|
|
4161
|
+
/** With no policy, omitted means legacy `full`. */
|
|
4162
|
+
access?: OrganizationApiKeyAccess | undefined;
|
|
4163
|
+
/** Optional creation alias for the developer_setup access tier. */
|
|
4164
|
+
preset?: "developer_setup" | undefined;
|
|
4165
|
+
/** Explicit grants and shared-workspace scope; do not combine with legacy access/preset. */
|
|
4166
|
+
policy?: OrganizationAccessPolicy | undefined;
|
|
4167
|
+
/** The service account that holds the key; omitted creates one named after the key. */
|
|
4168
|
+
serviceAccountId?: string | undefined;
|
|
4169
|
+
};
|
|
4170
|
+
/** The server requires at least one change. Omitted fields stay unchanged. */
|
|
4171
|
+
export type UpdateOrganizationApiKeyRequest = {
|
|
4172
|
+
name?: string | undefined;
|
|
4173
|
+
description?: string | null | undefined;
|
|
4174
|
+
/** Replaces the policy and transitions a legacy key to explicit permission semantics. */
|
|
4175
|
+
policy?: OrganizationAccessPolicy | undefined;
|
|
4176
|
+
};
|
|
4177
|
+
export type ListApiKeysResponse = {
|
|
4178
|
+
apiKeys: ApiKey[];
|
|
4179
|
+
};
|
|
4180
|
+
/** Up to admin, never owner. A member's keys never hold administrator permissions. */
|
|
4181
|
+
export type OrganizationServiceAccountRole = "admin" | "member";
|
|
4182
|
+
/** An organization identity with no person behind it; it holds organization API keys. */
|
|
4183
|
+
export type OrganizationServiceAccount = {
|
|
4184
|
+
id: string;
|
|
4185
|
+
organizationId: string;
|
|
4186
|
+
name: string;
|
|
4187
|
+
description: string | null;
|
|
4188
|
+
role: OrganizationServiceAccountRole;
|
|
4189
|
+
/** Keys that are not revoked, including expired ones. */
|
|
4190
|
+
activeKeyCount: number;
|
|
4191
|
+
createdAt: string;
|
|
4192
|
+
updatedAt: string;
|
|
4193
|
+
};
|
|
4194
|
+
export type ListOrganizationServiceAccountsResponse = {
|
|
4195
|
+
serviceAccounts: OrganizationServiceAccount[];
|
|
4196
|
+
};
|
|
4197
|
+
export type CreateOrganizationServiceAccountRequest = {
|
|
4198
|
+
name: string;
|
|
4199
|
+
description?: string | undefined;
|
|
4200
|
+
/** Defaults to member. Only an organization administrator can choose admin. */
|
|
4201
|
+
role?: OrganizationServiceAccountRole | undefined;
|
|
4202
|
+
};
|
|
4203
|
+
/** The server requires at least one change. Making it a member narrows its keys. */
|
|
4204
|
+
export type UpdateOrganizationServiceAccountRequest = {
|
|
4205
|
+
name?: string | undefined;
|
|
4206
|
+
description?: string | null | undefined;
|
|
4207
|
+
role?: OrganizationServiceAccountRole | undefined;
|
|
4208
|
+
};
|
|
4209
|
+
/** An outside agent a person connected to the organization MCP server. */
|
|
4210
|
+
export type OrganizationMcpConnection = {
|
|
4211
|
+
id: string;
|
|
4212
|
+
/** The name the client registered with ("Claude Code"). */
|
|
4213
|
+
clientName: string;
|
|
4214
|
+
/** Where its sign-in returned to ("127.0.0.1:4567", "cursor.com"). */
|
|
4215
|
+
clientHost: string | null;
|
|
4216
|
+
/** Signed-in agents act as the person who connected them. */
|
|
4217
|
+
actor: "user";
|
|
4218
|
+
connectedBy: {
|
|
4219
|
+
subjectId: string;
|
|
4220
|
+
name: string;
|
|
4221
|
+
};
|
|
4222
|
+
/** What it can do and where. The person's own live access still caps it. */
|
|
4223
|
+
policy: OrganizationAccessPolicy;
|
|
4224
|
+
createdAt: string;
|
|
4225
|
+
lastUsedAt: string | null;
|
|
4226
|
+
expiresAt: string;
|
|
4227
|
+
revokedAt: null;
|
|
4228
|
+
};
|
|
4229
|
+
export type OrganizationMcpConnectionList = {
|
|
4230
|
+
connections: OrganizationMcpConnection[];
|
|
4231
|
+
/** Owners and admins see and can disconnect everyone's agents. */
|
|
4232
|
+
canManageAll: boolean;
|
|
4233
|
+
};
|
|
4234
|
+
export type UpdateOrganizationMcpConnectionRequest = {
|
|
4235
|
+
access: OrganizationAccessPolicy;
|
|
4236
|
+
};
|
|
4237
|
+
/** A pending agent sign-in, as the web app's sign-in page shows it. */
|
|
4238
|
+
export type McpConnectionRequest = {
|
|
4239
|
+
client: {
|
|
4240
|
+
name: string;
|
|
4241
|
+
host: string | null;
|
|
4242
|
+
};
|
|
4243
|
+
person: {
|
|
4244
|
+
name: string | null;
|
|
4245
|
+
};
|
|
4246
|
+
organizations: Array<{
|
|
4247
|
+
id: string;
|
|
4248
|
+
name: string;
|
|
4249
|
+
workspaces: Array<{
|
|
4250
|
+
id: string;
|
|
4251
|
+
name: string;
|
|
4252
|
+
personal: boolean;
|
|
4253
|
+
}>;
|
|
4254
|
+
/** Everything the person can do there; the most an agent can get. */
|
|
4255
|
+
grantable: Permission[];
|
|
4256
|
+
}>;
|
|
4257
|
+
defaultOrganizationId: string | null;
|
|
4258
|
+
};
|
|
4259
|
+
export type McpConnectionDecision = {
|
|
4260
|
+
decision: "deny";
|
|
4261
|
+
} | {
|
|
4262
|
+
decision: "approve";
|
|
4263
|
+
organizationId: string;
|
|
4264
|
+
access: OrganizationAccessPolicy;
|
|
4265
|
+
};
|
|
4266
|
+
export type ListOrganizationSessionsOptions = {
|
|
4267
|
+
/** Page size, 1..200; the server default is 50. */
|
|
4268
|
+
limit?: number | undefined;
|
|
4269
|
+
/** `nextCursor` from the previous page. */
|
|
4270
|
+
cursor?: string | undefined;
|
|
4271
|
+
/** Keep only sessions labelled with this exact end user. */
|
|
4272
|
+
scopeSubjectId?: string | undefined;
|
|
4273
|
+
/** Keep only sessions in this exact lifecycle state. */
|
|
4274
|
+
status?: SessionStatus | undefined;
|
|
4275
|
+
signal?: AbortSignal | undefined;
|
|
4276
|
+
};
|
|
4277
|
+
/**
|
|
4278
|
+
* One page of `GET /v1/organizations/:organizationId/sessions`. Rows come from
|
|
4279
|
+
* every shared workspace the caller may read, each carrying its
|
|
4280
|
+
* `workspaceId`; personal workspaces are never included and private sessions
|
|
4281
|
+
* stay invisible. A page may be shorter than `limit` while `nextCursor` is
|
|
4282
|
+
* still set, so follow `nextCursor` until it is null.
|
|
4283
|
+
*/
|
|
4284
|
+
export type OrganizationSessionListResponse = {
|
|
4285
|
+
sessions: Session[];
|
|
4286
|
+
nextCursor: string | null;
|
|
2456
4287
|
};
|
|
2457
4288
|
export type WorkspaceMember = {
|
|
2458
4289
|
subjectId: string;
|
|
@@ -2464,8 +4295,18 @@ export type WorkspaceMember = {
|
|
|
2464
4295
|
export type ListWorkspaceMembersResponse = {
|
|
2465
4296
|
members: WorkspaceMember[];
|
|
2466
4297
|
};
|
|
4298
|
+
export type WorkspaceMemberCandidate = {
|
|
4299
|
+
organizationMembershipId: string;
|
|
4300
|
+
subjectId: string;
|
|
4301
|
+
name: string | null;
|
|
4302
|
+
email: string | null;
|
|
4303
|
+
organizationRole: "owner" | "admin" | "member";
|
|
4304
|
+
};
|
|
4305
|
+
export type ListWorkspaceMemberCandidatesResponse = {
|
|
4306
|
+
members: WorkspaceMemberCandidate[];
|
|
4307
|
+
};
|
|
2467
4308
|
export type AddWorkspaceMemberRequest = {
|
|
2468
|
-
|
|
4309
|
+
organizationMembershipId: string;
|
|
2469
4310
|
role?: string | undefined;
|
|
2470
4311
|
permissions: Permission[];
|
|
2471
4312
|
};
|
|
@@ -2505,8 +4346,57 @@ export type ListSlackUserLinkAccessRequestsResponse = {
|
|
|
2505
4346
|
};
|
|
2506
4347
|
export type SessionGoalStatus = "active" | "paused" | "completed";
|
|
2507
4348
|
export type SessionGoalCreatedBy = "api" | "agent" | "scheduled_task";
|
|
4349
|
+
export type SessionGoalMutationPolicy = "review_changes" | "preserve_intent" | "autonomous_adaptation";
|
|
4350
|
+
export type SessionGoalChangeKind = "refinement" | "adaptation" | "replacement";
|
|
4351
|
+
export type SessionGoalRevision = {
|
|
4352
|
+
id: string;
|
|
4353
|
+
accountId: string;
|
|
4354
|
+
workspaceId: string;
|
|
4355
|
+
sessionId: string;
|
|
4356
|
+
goalId: string;
|
|
4357
|
+
disposition: "applied" | "proposed" | "rejected";
|
|
4358
|
+
changeKind: SessionGoalChangeKind;
|
|
4359
|
+
baseObjectiveRevision: number;
|
|
4360
|
+
resultObjectiveRevision: number | null;
|
|
4361
|
+
text: string;
|
|
4362
|
+
successCriteria: string | null;
|
|
4363
|
+
rootConstraints: string[];
|
|
4364
|
+
mutationPolicy: SessionGoalMutationPolicy;
|
|
4365
|
+
rationale: string;
|
|
4366
|
+
actor: "agent" | "api" | "scheduled_task";
|
|
4367
|
+
actorTurnId: string | null;
|
|
4368
|
+
actorAttemptId: string | null;
|
|
4369
|
+
proposalId: string | null;
|
|
4370
|
+
rollbackOfRevisionId: string | null;
|
|
4371
|
+
createdAt: string;
|
|
4372
|
+
};
|
|
4373
|
+
export type ApplySessionGoalRevisionRequest = {
|
|
4374
|
+
expectedObjectiveRevision: number;
|
|
4375
|
+
rationale?: string | undefined;
|
|
4376
|
+
};
|
|
4377
|
+
export type ListSessionGoalRevisionsOptions = {
|
|
4378
|
+
limit?: number | undefined;
|
|
4379
|
+
before?: string | undefined;
|
|
4380
|
+
};
|
|
4381
|
+
export type ListSessionGoalRevisionsResponse = {
|
|
4382
|
+
revisions: SessionGoalRevision[];
|
|
4383
|
+
hasMore: boolean;
|
|
4384
|
+
nextCursor: string | null;
|
|
4385
|
+
};
|
|
4386
|
+
export type RejectSessionGoalRevisionRequest = {
|
|
4387
|
+
expectedObjectiveRevision: number;
|
|
4388
|
+
rationale: string;
|
|
4389
|
+
};
|
|
4390
|
+
export type RejectSessionGoalRevisionResponse = {
|
|
4391
|
+
revision: SessionGoalRevision;
|
|
4392
|
+
replay: boolean;
|
|
4393
|
+
};
|
|
4394
|
+
export type RollbackSessionGoalRevisionRequest = {
|
|
4395
|
+
expectedObjectiveRevision: number;
|
|
4396
|
+
rationale: string;
|
|
4397
|
+
};
|
|
2508
4398
|
export type SessionGoalContinuationState = "inactive" | "scheduled" | "running" | "blocked" | "invariant_broken";
|
|
2509
|
-
export type SessionGoalContinuationReason = "goal_inactive" | "wake_pending" | "continuation_pending" | "human_work_pending" | "goal_turn_running" | "human_turn_running" | "workstream_paused" | "approval_required" | "provider_backpressure" | "session_cancelled" | "system_work_pending" | "missing_obligation";
|
|
4399
|
+
export type SessionGoalContinuationReason = "goal_inactive" | "wake_pending" | "continuation_pending" | "human_work_pending" | "goal_turn_running" | "human_turn_running" | "workstream_paused" | "approval_required" | "provider_backpressure" | "session_cancelled" | "system_work_pending" | "held_for_input" | "backoff_pending" | "missing_obligation";
|
|
2510
4400
|
export type SessionGoalContinuation = {
|
|
2511
4401
|
state: SessionGoalContinuationState;
|
|
2512
4402
|
reason: SessionGoalContinuationReason;
|
|
@@ -2514,6 +4404,8 @@ export type SessionGoalContinuation = {
|
|
|
2514
4404
|
observedRevision: number;
|
|
2515
4405
|
nextAttemptAt: string | null;
|
|
2516
4406
|
lastError: string | null;
|
|
4407
|
+
/** Agent-stated reason for a `wait_for_input` hold; null otherwise. */
|
|
4408
|
+
holdReason?: string | null | undefined;
|
|
2517
4409
|
};
|
|
2518
4410
|
export type SessionGoal = {
|
|
2519
4411
|
id: string;
|
|
@@ -2523,11 +4415,16 @@ export type SessionGoal = {
|
|
|
2523
4415
|
status: SessionGoalStatus;
|
|
2524
4416
|
text: string;
|
|
2525
4417
|
successCriteria: string | null;
|
|
4418
|
+
rootConstraints: string[];
|
|
4419
|
+
/** Optional for older-server/source compatibility; current servers always supply this projection. */
|
|
4420
|
+
reportRequirements?: SessionGoalReportRequirement[] | undefined;
|
|
2526
4421
|
evidence: string | null;
|
|
2527
4422
|
rationale: string | null;
|
|
2528
4423
|
pausedReason: string | null;
|
|
2529
4424
|
createdBy: SessionGoalCreatedBy;
|
|
2530
4425
|
version: number;
|
|
4426
|
+
objectiveRevision: number;
|
|
4427
|
+
mutationPolicy: SessionGoalMutationPolicy;
|
|
2531
4428
|
autoContinuations: number;
|
|
2532
4429
|
noProgressStreak: number;
|
|
2533
4430
|
maxAutoContinuations: number | null;
|
|
@@ -2540,10 +4437,21 @@ export type SessionGoal = {
|
|
|
2540
4437
|
export type UpdateSessionGoalRequest = {
|
|
2541
4438
|
status: "paused" | "active";
|
|
2542
4439
|
rationale?: string | undefined;
|
|
4440
|
+
} | {
|
|
4441
|
+
text: string;
|
|
4442
|
+
successCriteria?: string | null | undefined;
|
|
4443
|
+
rootConstraints?: string[] | undefined;
|
|
4444
|
+
mutationPolicy?: SessionGoalMutationPolicy | undefined;
|
|
4445
|
+
rationale: string;
|
|
4446
|
+
expectedObjectiveRevision: number;
|
|
2543
4447
|
};
|
|
2544
4448
|
export type UpdateSessionRequest = {
|
|
2545
4449
|
title: string;
|
|
2546
4450
|
};
|
|
4451
|
+
/** Replace the complete ordered low-to-high precedence Variable Set selection. */
|
|
4452
|
+
export type UpdateSessionVariableSetsRequest = {
|
|
4453
|
+
variableSetIds: string[];
|
|
4454
|
+
};
|
|
2547
4455
|
/** Outcome of a manual /compact trigger. */
|
|
2548
4456
|
export type CompactSessionContextResult = {
|
|
2549
4457
|
/** pending waits for the current safe boundary; completed ran while idle. */
|
|
@@ -2585,6 +4493,10 @@ export type EffectiveSessionControl = {
|
|
|
2585
4493
|
interruptionPendingCount: number;
|
|
2586
4494
|
quiescencePendingCount: number;
|
|
2587
4495
|
} | null;
|
|
4496
|
+
backgroundCommandSettlement?: {
|
|
4497
|
+
state: "stopping";
|
|
4498
|
+
commandCount: number;
|
|
4499
|
+
} | null | undefined;
|
|
2588
4500
|
};
|
|
2589
4501
|
export type SessionCommandReceipt = {
|
|
2590
4502
|
id: string;
|
|
@@ -2598,6 +4510,7 @@ export type SessionCommandReceipt = {
|
|
|
2598
4510
|
appliedDraftRevision: number | null;
|
|
2599
4511
|
createdAt: string;
|
|
2600
4512
|
};
|
|
4513
|
+
export type SessionPromptRouting = "accepted_for_execution" | "queued_for_execution" | "accepted_for_steering";
|
|
2601
4514
|
export type ComposerDraft = {
|
|
2602
4515
|
revision: number;
|
|
2603
4516
|
text: string;
|
|
@@ -2605,20 +4518,38 @@ export type ComposerDraft = {
|
|
|
2605
4518
|
resources: ResourceRef[];
|
|
2606
4519
|
model: string;
|
|
2607
4520
|
reasoningEffort: ReasoningEffort;
|
|
2608
|
-
latencyMode
|
|
4521
|
+
latencyMode: LatencyMode;
|
|
2609
4522
|
sourceTurnId: string | null;
|
|
2610
4523
|
sourceTurnVersion: number | null;
|
|
2611
4524
|
updatedAt: string | null;
|
|
2612
4525
|
};
|
|
2613
4526
|
export type NewSessionDraftOptions = {
|
|
4527
|
+
agentLearning?: import("@opengeni/contracts").AgentLearningOverrides | undefined;
|
|
4528
|
+
excludedMcpServerIds?: string[] | undefined;
|
|
4529
|
+
visibility?: SessionVisibility | undefined;
|
|
2614
4530
|
sandboxBackend?: SandboxBackend | undefined;
|
|
2615
4531
|
targetSandboxId?: string | undefined;
|
|
2616
4532
|
workingDir?: string | undefined;
|
|
4533
|
+
variableSetIds?: string[] | undefined;
|
|
2617
4534
|
variableSetId?: string | undefined;
|
|
2618
4535
|
rigId?: string | undefined;
|
|
2619
4536
|
goal?: GoalSpec | undefined;
|
|
2620
4537
|
firstPartyMcpPermissions?: Permission[] | undefined;
|
|
2621
4538
|
firstPartyMcpTools?: FirstPartyMcpToolName[] | undefined;
|
|
4539
|
+
agent?: AgentConfigRequest | undefined;
|
|
4540
|
+
};
|
|
4541
|
+
export type NewSessionSelectionHistory = {
|
|
4542
|
+
/** Most-recently used project first. Null channelId is the Default project. */
|
|
4543
|
+
projects: Array<{
|
|
4544
|
+
channelId: string | null;
|
|
4545
|
+
/** Null means the managed sandbox was used most recently in this project. */
|
|
4546
|
+
targetSandboxId: string | null;
|
|
4547
|
+
/** Most-recently used machine in this project first. */
|
|
4548
|
+
machines: Array<{
|
|
4549
|
+
sandboxId: string;
|
|
4550
|
+
workingDir: string | null;
|
|
4551
|
+
}>;
|
|
4552
|
+
}>;
|
|
2622
4553
|
};
|
|
2623
4554
|
export type NewSessionDraft = {
|
|
2624
4555
|
revision: number;
|
|
@@ -2629,8 +4560,16 @@ export type NewSessionDraft = {
|
|
|
2629
4560
|
toolsProvided: boolean;
|
|
2630
4561
|
model: string;
|
|
2631
4562
|
reasoningEffort: ReasoningEffort;
|
|
2632
|
-
latencyMode
|
|
4563
|
+
latencyMode: LatencyMode;
|
|
4564
|
+
/**
|
|
4565
|
+
* True when the person chose this model policy; false follows the resolved
|
|
4566
|
+
* default for new chats. Absent from older servers.
|
|
4567
|
+
*/
|
|
4568
|
+
modelProvided?: boolean | undefined;
|
|
4569
|
+
/** Absent on legacy drafts; null records an explicit Default-project selection. */
|
|
4570
|
+
selectedProjectChannelId?: string | null | undefined;
|
|
2633
4571
|
options: NewSessionDraftOptions;
|
|
4572
|
+
selectionHistory: NewSessionSelectionHistory;
|
|
2634
4573
|
updatedAt: string | null;
|
|
2635
4574
|
};
|
|
2636
4575
|
export type SessionQueueSnapshot = {
|
|
@@ -2651,8 +4590,28 @@ export type SessionQueueSnapshot = {
|
|
|
2651
4590
|
};
|
|
2652
4591
|
export type SessionPendingInputPreview = Pick<SessionSystemUpdate, "id" | "sessionId" | "kind" | "classification" | "sourceId" | "summary" | "createdAt">;
|
|
2653
4592
|
export type SystemUpdateClassification = "success" | "failure" | "action_required" | "info";
|
|
2654
|
-
export type SessionSystemUpdateKind = "scheduled_occurrence" | "goal_continuation" | "agent_message" | "agent_steer_instruction" | "child_terminal_result" | "media_generation_result";
|
|
4593
|
+
export type SessionSystemUpdateKind = "scheduled_occurrence" | "goal_continuation" | "agent_message" | "agent_steer_instruction" | "session_wait_timeout" | "background_command_result" | "child_terminal_result" | "media_generation_result" | "child_requires_action" | "child_requires_action_resolved" | "child_paused" | "child_waiting_capacity" | "child_progress";
|
|
2655
4594
|
export type SessionSystemUpdateState = "pending" | "delivered" | "cancelled" | "superseded" | "failed";
|
|
4595
|
+
export type SessionSystemUpdatePayload = {
|
|
4596
|
+
type: "session_wait_timeout";
|
|
4597
|
+
waitTurnId: string;
|
|
4598
|
+
deadlineAt: string;
|
|
4599
|
+
reason: string;
|
|
4600
|
+
[key: string]: unknown;
|
|
4601
|
+
} | {
|
|
4602
|
+
type: "background_command_result";
|
|
4603
|
+
commandId: string;
|
|
4604
|
+
state: "exited" | "lost";
|
|
4605
|
+
exitCode: number | null;
|
|
4606
|
+
reason: string;
|
|
4607
|
+
outputLocator: {
|
|
4608
|
+
eventType: "sandbox.command.output.delta";
|
|
4609
|
+
commandId: string;
|
|
4610
|
+
};
|
|
4611
|
+
[key: string]: unknown;
|
|
4612
|
+
} | ({
|
|
4613
|
+
type: Exclude<SessionSystemUpdateKind, "session_wait_timeout" | "background_command_result">;
|
|
4614
|
+
} & Record<string, unknown>);
|
|
2656
4615
|
export type SessionSystemUpdate = {
|
|
2657
4616
|
id: string;
|
|
2658
4617
|
sessionId: string;
|
|
@@ -2661,7 +4620,7 @@ export type SessionSystemUpdate = {
|
|
|
2661
4620
|
sourceId: string;
|
|
2662
4621
|
dedupeKey: string;
|
|
2663
4622
|
summary: string;
|
|
2664
|
-
payload:
|
|
4623
|
+
payload: SessionSystemUpdatePayload;
|
|
2665
4624
|
lineage: Record<string, unknown>;
|
|
2666
4625
|
state: SessionSystemUpdateState;
|
|
2667
4626
|
deliveredTurnId: string | null;
|
|
@@ -2669,6 +4628,56 @@ export type SessionSystemUpdate = {
|
|
|
2669
4628
|
deliveredAt: string | null;
|
|
2670
4629
|
createdAt: string;
|
|
2671
4630
|
};
|
|
4631
|
+
export type SessionRetryRequest = {
|
|
4632
|
+
clientEventId: string;
|
|
4633
|
+
failureEventId: string;
|
|
4634
|
+
model?: string;
|
|
4635
|
+
reasoningEffort?: ReasoningEffort;
|
|
4636
|
+
latencyMode?: LatencyMode;
|
|
4637
|
+
};
|
|
4638
|
+
export type SandboxRecoverySelection = {
|
|
4639
|
+
version: 1;
|
|
4640
|
+
sessionId: string;
|
|
4641
|
+
sandboxGroupId: string;
|
|
4642
|
+
leaseId: string;
|
|
4643
|
+
routeEpoch: number;
|
|
4644
|
+
authorityEpoch: number;
|
|
4645
|
+
leaseEpoch: number;
|
|
4646
|
+
workspaceGeneration: number;
|
|
4647
|
+
archiveGeneration: number;
|
|
4648
|
+
artifactId: string;
|
|
4649
|
+
revision: string;
|
|
4650
|
+
capturedAt: string;
|
|
4651
|
+
};
|
|
4652
|
+
export type SandboxRecoveryProjection = {
|
|
4653
|
+
version: 1;
|
|
4654
|
+
status: "unsupported" | "blocked" | "eligible" | "consent_accepted" | "restoring" | "restored";
|
|
4655
|
+
reason: string | null;
|
|
4656
|
+
checkpoint: SandboxRecoverySelection | null;
|
|
4657
|
+
operationId: string | null;
|
|
4658
|
+
automaticAvailable?: boolean;
|
|
4659
|
+
/** What an automatic Retry does: restore `checkpoint`, or continue on a new
|
|
4660
|
+
* empty workspace because no usable checkpoint survived the sandbox loss. */
|
|
4661
|
+
automaticLane?: "checkpoint" | "fresh_workspace";
|
|
4662
|
+
/** For a timed recovery wait: the earliest time a Retry or a new message can
|
|
4663
|
+
* let OpenGeni decide again. Nothing proceeds by itself before then. */
|
|
4664
|
+
availableAt?: string;
|
|
4665
|
+
};
|
|
4666
|
+
export type SandboxRecoveryRequest = {
|
|
4667
|
+
operationId: string;
|
|
4668
|
+
acceptHistoricalCheckpoint: true;
|
|
4669
|
+
selection: SandboxRecoverySelection;
|
|
4670
|
+
};
|
|
4671
|
+
export type SandboxRecoveryResponse = {
|
|
4672
|
+
outcome: "accepted" | "replayed";
|
|
4673
|
+
operationId: string;
|
|
4674
|
+
recovery: SandboxRecoveryProjection;
|
|
4675
|
+
};
|
|
4676
|
+
export type SessionRetryResponse = {
|
|
4677
|
+
outcome: "accepted" | "replayed";
|
|
4678
|
+
turnId: string;
|
|
4679
|
+
failureEventId: string;
|
|
4680
|
+
};
|
|
2672
4681
|
export type SessionControlResponse = {
|
|
2673
4682
|
receipt: SessionCommandReceipt;
|
|
2674
4683
|
effectiveControl: EffectiveSessionControl;
|
|
@@ -2677,6 +4686,19 @@ export type SessionControlResponse = {
|
|
|
2677
4686
|
cancelledSessionCount: number;
|
|
2678
4687
|
cancelledTurnCount: number;
|
|
2679
4688
|
};
|
|
4689
|
+
export type WorkspacePauseTimer = {
|
|
4690
|
+
id: string;
|
|
4691
|
+
action: "pause" | "resume";
|
|
4692
|
+
dueAt: string;
|
|
4693
|
+
pauseForSeconds: number | null;
|
|
4694
|
+
};
|
|
4695
|
+
export type WorkspacePauseTimerRequest = {
|
|
4696
|
+
action: "set" | "cancel";
|
|
4697
|
+
pauseInSeconds?: number | undefined;
|
|
4698
|
+
pauseForSeconds?: number | null | undefined;
|
|
4699
|
+
clientEventId: string;
|
|
4700
|
+
expectedRevision: number;
|
|
4701
|
+
};
|
|
2680
4702
|
export type WorkspaceInferenceControlResponse = {
|
|
2681
4703
|
receipt: SessionCommandReceipt;
|
|
2682
4704
|
state: "active" | "paused";
|
|
@@ -2693,7 +4715,7 @@ export type WorkspaceControlEvent = {
|
|
|
2693
4715
|
type: "workspace.control.changed";
|
|
2694
4716
|
scope: "workspace" | "session";
|
|
2695
4717
|
rootSessionId: string | null;
|
|
2696
|
-
action: "pause" | "resume";
|
|
4718
|
+
action: "pause" | "resume" | "timer_set" | "timer_cancelled";
|
|
2697
4719
|
automatic: boolean;
|
|
2698
4720
|
reason: string | null;
|
|
2699
4721
|
actor: string;
|
|
@@ -2743,23 +4765,68 @@ export type DeleteSessionQueueItemRequest = {
|
|
|
2743
4765
|
export type SaveComposerDraftRequest = Omit<ComposerDraft, "revision" | "sourceTurnId" | "sourceTurnVersion" | "updatedAt"> & {
|
|
2744
4766
|
expectedRevision: number;
|
|
2745
4767
|
};
|
|
2746
|
-
export type
|
|
4768
|
+
export type SubmitComposerDraftRequest = Omit<SaveComposerDraftRequest, "expectedRevision"> & {
|
|
4769
|
+
expectedDraftRevision: number;
|
|
4770
|
+
clientEventId: string;
|
|
4771
|
+
delivery: "send" | "steer";
|
|
4772
|
+
controlEtag?: string;
|
|
4773
|
+
modelContext?: string;
|
|
4774
|
+
mcpCredentialUpdates?: SessionMcpCredentialUpdateInput[];
|
|
4775
|
+
connectionAccounts?: McpConnectionAccountSelection[];
|
|
4776
|
+
personalResourceAttachment?: PersonalResourceAttachmentIntent;
|
|
4777
|
+
};
|
|
4778
|
+
export type SubmitComposerDraftResponse = {
|
|
4779
|
+
accepted: SessionEvent;
|
|
4780
|
+
turn: SessionTurn;
|
|
4781
|
+
draft: ComposerDraft;
|
|
4782
|
+
receipt: SessionCommandReceipt;
|
|
4783
|
+
routing: SessionPromptRouting;
|
|
4784
|
+
interruptionCount: number;
|
|
4785
|
+
replay: boolean;
|
|
4786
|
+
};
|
|
4787
|
+
export type SaveNewSessionDraftRequest = Omit<NewSessionDraft, "revision" | "selectionHistory" | "updatedAt"> & {
|
|
2747
4788
|
expectedRevision: number;
|
|
2748
4789
|
};
|
|
2749
4790
|
/** Input shape for agent config on create/update (server applies defaults). */
|
|
2750
4791
|
export type ScheduledTaskAgentConfigInput = {
|
|
4792
|
+
/**
|
|
4793
|
+
* Agent configuration frozen into the schedule and used by every run;
|
|
4794
|
+
* omitted runs follow the workspace's agent defaults.
|
|
4795
|
+
*/
|
|
4796
|
+
agent?: AgentConfigRequest | undefined;
|
|
4797
|
+
knowledgeSource?: Extract<ScheduledTaskAction, {
|
|
4798
|
+
kind: "knowledge_source_sync";
|
|
4799
|
+
}> | undefined;
|
|
2751
4800
|
prompt: string;
|
|
2752
4801
|
resources?: ResourceRef[] | undefined;
|
|
2753
4802
|
tools?: ToolRef[] | undefined;
|
|
2754
4803
|
metadata?: Record<string, unknown> | undefined;
|
|
2755
4804
|
slackBotConnectionId?: string | undefined;
|
|
4805
|
+
/** Slack channel a person chose for this task's bot posts; requires slackBotConnectionId. */
|
|
4806
|
+
slackBotChannelId?: string | undefined;
|
|
2756
4807
|
model?: string | undefined;
|
|
2757
4808
|
reasoningEffort?: ReasoningEffort | undefined;
|
|
2758
4809
|
sandboxBackend?: SandboxBackend | undefined;
|
|
4810
|
+
machineTarget?: {
|
|
4811
|
+
targetSandboxId: string;
|
|
4812
|
+
workingDir?: string | undefined;
|
|
4813
|
+
} | undefined;
|
|
2759
4814
|
goal?: GoalSpec | undefined;
|
|
4815
|
+
executionClass?: "incident_telemetry" | undefined;
|
|
4816
|
+
incidentTelemetryPreflight?: IncidentTelemetryPreflightInput | undefined;
|
|
2760
4817
|
maxNestedAgentDepth?: number | undefined;
|
|
4818
|
+
/**
|
|
4819
|
+
* Seconds a run's own turn may wait on a person (tool approval or structured
|
|
4820
|
+
* question, 60 s - 30 days) before the scheduler rejects the approval / skips
|
|
4821
|
+
* the question as a labelled system decision. Omitted: waits indefinitely.
|
|
4822
|
+
*/
|
|
4823
|
+
approvalTimeoutSeconds?: number | undefined;
|
|
2761
4824
|
};
|
|
2762
4825
|
export type CreateAgentScheduledTaskRequest = {
|
|
4826
|
+
agentLearning?: {
|
|
4827
|
+
scope: "workspace" | "personal";
|
|
4828
|
+
settings: import("./knowledge.js").AgentLearningOverrides;
|
|
4829
|
+
};
|
|
2763
4830
|
name: string;
|
|
2764
4831
|
schedule: ScheduledTaskScheduleSpec;
|
|
2765
4832
|
action?: {
|
|
@@ -2767,12 +4834,19 @@ export type CreateAgentScheduledTaskRequest = {
|
|
|
2767
4834
|
} | undefined;
|
|
2768
4835
|
runMode?: ScheduledTaskRunMode | undefined;
|
|
2769
4836
|
targetSessionId?: string | null | undefined;
|
|
4837
|
+
connectionAccounts?: McpConnectionAccountSelection[] | undefined;
|
|
2770
4838
|
overlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
|
|
2771
4839
|
agentConfig: ScheduledTaskAgentConfigInput;
|
|
2772
4840
|
status?: ScheduledTaskStatus | undefined;
|
|
2773
4841
|
variableSetId?: string | null | undefined;
|
|
2774
4842
|
/** @deprecated use variableSetId */
|
|
2775
4843
|
environmentId?: string | null | undefined;
|
|
4844
|
+
/**
|
|
4845
|
+
* Sandbox Environment each run binds to; its active version is resolved per
|
|
4846
|
+
* fire. Omit to resolve it once at create: the workspace default (none for a
|
|
4847
|
+
* Connected Machine task), or the target session's own environment for an
|
|
4848
|
+
* existing-session task. `null` means none.
|
|
4849
|
+
*/
|
|
2776
4850
|
rigId?: string | null | undefined;
|
|
2777
4851
|
metadata?: Record<string, unknown> | undefined;
|
|
2778
4852
|
};
|
|
@@ -2786,15 +4860,39 @@ export type CreateKnowledgeSourceSyncScheduledTaskRequest = {
|
|
|
2786
4860
|
status?: ScheduledTaskStatus | undefined;
|
|
2787
4861
|
metadata?: Record<string, unknown> | undefined;
|
|
2788
4862
|
};
|
|
2789
|
-
|
|
4863
|
+
/** Send a scheduled message using the destination chat’s current execution settings. */
|
|
4864
|
+
export type CreateSessionScheduledTaskRequest = {
|
|
4865
|
+
name: string;
|
|
4866
|
+
schedule: ScheduledTaskScheduleSpec;
|
|
4867
|
+
prompt: string;
|
|
4868
|
+
targetSessionId: string;
|
|
4869
|
+
runMode?: "existing_session" | undefined;
|
|
4870
|
+
connectionAccounts?: McpConnectionAccountSelection[] | undefined;
|
|
4871
|
+
overlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
|
|
4872
|
+
status?: ScheduledTaskStatus | undefined;
|
|
4873
|
+
metadata?: Record<string, unknown> | undefined;
|
|
4874
|
+
};
|
|
4875
|
+
export type CreateScheduledTaskRequest = CreateSessionScheduledTaskRequest | CreateAgentScheduledTaskRequest | CreateKnowledgeSourceSyncScheduledTaskRequest;
|
|
2790
4876
|
export type UpdateScheduledTaskRequest = {
|
|
4877
|
+
expectedExecutionDigest?: string | undefined;
|
|
4878
|
+
adoptSessionSettings?: true | undefined;
|
|
4879
|
+
/** Lossless message edit. All omitted configuration is preserved. */
|
|
4880
|
+
prompt?: string | undefined;
|
|
2791
4881
|
name?: string | undefined;
|
|
2792
4882
|
schedule?: ScheduledTaskScheduleSpec | undefined;
|
|
2793
4883
|
runMode?: ScheduledTaskRunMode | undefined;
|
|
2794
4884
|
targetSessionId?: string | null | undefined;
|
|
4885
|
+
connectionAccounts?: McpConnectionAccountSelection[] | undefined;
|
|
2795
4886
|
overlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
|
|
2796
4887
|
action?: ScheduledTaskAction | undefined;
|
|
2797
4888
|
agentConfig?: ScheduledTaskAgentConfigInput | undefined;
|
|
4889
|
+
/** Lossless model defaults patch; cannot be combined with agentConfig replacement.
|
|
4890
|
+
* Existing target/reusable sessions retain their own model and reasoning. */
|
|
4891
|
+
agentConfigPatch?: {
|
|
4892
|
+
prompt?: string | undefined;
|
|
4893
|
+
model?: string | undefined;
|
|
4894
|
+
reasoningEffort?: ReasoningEffort | undefined;
|
|
4895
|
+
} | undefined;
|
|
2798
4896
|
status?: ScheduledTaskStatus | undefined;
|
|
2799
4897
|
variableSetId?: string | null | undefined;
|
|
2800
4898
|
/** @deprecated use variableSetId */
|
|
@@ -2832,6 +4930,8 @@ export type ScheduledTaskRun = {
|
|
|
2832
4930
|
accountId: string;
|
|
2833
4931
|
workspaceId: string;
|
|
2834
4932
|
taskId: string;
|
|
4933
|
+
taskAuthorityRevision: number | null;
|
|
4934
|
+
taskExecutionDigest: string | null;
|
|
2835
4935
|
status: ScheduledTaskRunStatus;
|
|
2836
4936
|
triggerType: ScheduledTaskTriggerType;
|
|
2837
4937
|
scheduledAt: string | null;
|
|
@@ -2843,8 +4943,72 @@ export type ScheduledTaskRun = {
|
|
|
2843
4943
|
knowledgeSummary: KnowledgeSourceSyncRunSummary | null;
|
|
2844
4944
|
completedAt: string | null;
|
|
2845
4945
|
error: string | null;
|
|
4946
|
+
admissionDiagnostic?: {
|
|
4947
|
+
version: 1;
|
|
4948
|
+
reason: "selected_account_unavailable" | "owner_access_unavailable" | "ambiguous_account" | "parent_accounts_required" | "selection_unavailable";
|
|
4949
|
+
accounts: Array<{
|
|
4950
|
+
serverId: string;
|
|
4951
|
+
connectionId: string | null;
|
|
4952
|
+
reason: "connector_unavailable" | "account_not_visible" | "account_inactive" | "account_mismatch" | "selection_unavailable";
|
|
4953
|
+
}>;
|
|
4954
|
+
} | null | undefined;
|
|
4955
|
+
/**
|
|
4956
|
+
* Why the scheduler refused this occurrence before running it; `error`
|
|
4957
|
+
* equals `reason`. `retryable: true` (status `skipped`): a later occurrence
|
|
4958
|
+
* runs once the condition clears. `retryable: false` (status `failed`):
|
|
4959
|
+
* every occurrence is refused until the task or a resource it names changes.
|
|
4960
|
+
*/
|
|
4961
|
+
admissionRefusal?: ScheduledTaskAdmissionRefusal | null | undefined;
|
|
4962
|
+
/**
|
|
4963
|
+
* This dispatched run's own turn is waiting on a person (tool approval or
|
|
4964
|
+
* structured question) since `since`; `expiresAt` is when the task's
|
|
4965
|
+
* `approvalTimeoutSeconds` answers for it (null: waits indefinitely).
|
|
4966
|
+
*/
|
|
4967
|
+
awaitingHuman?: ScheduledTaskRunAwaitingHuman | null | undefined;
|
|
2846
4968
|
createdAt: string;
|
|
2847
4969
|
updatedAt: string;
|
|
4970
|
+
/** Connectors this run could not use; projected only for a viewer who can act on the task. */
|
|
4971
|
+
accessFailures?: ScheduledTaskRunAccessFailure[] | undefined;
|
|
4972
|
+
};
|
|
4973
|
+
export type ScheduledTaskRunAwaitingHuman = {
|
|
4974
|
+
since: string;
|
|
4975
|
+
expiresAt: string | null;
|
|
4976
|
+
};
|
|
4977
|
+
export type ScheduledTaskAdmissionRefusal = {
|
|
4978
|
+
version: 1;
|
|
4979
|
+
reason: "scheduled_authority_unavailable" | "machine_target_unavailable" | "machine_enrollment_inactive" | "variable_set_unavailable" | "rig_version_unavailable" | "insufficient_credits" | "monthly_model_cost_limit" | "monthly_agent_run_limit" | (string & {});
|
|
4980
|
+
retryable: boolean;
|
|
4981
|
+
};
|
|
4982
|
+
export type ScheduledTaskAccessFailureReason = "missing_connection" | "expired" | "insufficient_scope" | "refresh_failed" | "personal_authority_unavailable" | "unsupported_auth" | "resource_scope_unavailable";
|
|
4983
|
+
/** A connector a scheduled run's own turn could not use (a `tool.auth_needed` fact). */
|
|
4984
|
+
export type ScheduledTaskRunAccessFailure = {
|
|
4985
|
+
serverId: string;
|
|
4986
|
+
name: string;
|
|
4987
|
+
providerDomain: string;
|
|
4988
|
+
reason: ScheduledTaskAccessFailureReason;
|
|
4989
|
+
count: number;
|
|
4990
|
+
firstOccurredAt: string;
|
|
4991
|
+
};
|
|
4992
|
+
/**
|
|
4993
|
+
* A schedule that needs its owner's attention: its latest run failed closed on
|
|
4994
|
+
* connector access (`runId`, `failures`), and/or a chosen connector account can
|
|
4995
|
+
* no longer be used so new runs cannot start (`unavailableAccounts`; `runId`
|
|
4996
|
+
* and `firedAt` are null when only this applies).
|
|
4997
|
+
*/
|
|
4998
|
+
export type ScheduledTaskAccessAttention = {
|
|
4999
|
+
taskId: string;
|
|
5000
|
+
taskName: string;
|
|
5001
|
+
/** The task head this item was computed against; a new head is a new notice. */
|
|
5002
|
+
executionDigest: string;
|
|
5003
|
+
runId: string | null;
|
|
5004
|
+
firedAt: string | null;
|
|
5005
|
+
failures: ScheduledTaskRunAccessFailure[];
|
|
5006
|
+
unavailableAccounts: ScheduledTaskAccessConnector[];
|
|
5007
|
+
/** The latest run is waiting on a person (tool approval or question) right now. */
|
|
5008
|
+
awaitingHuman?: ScheduledTaskRunAwaitingHuman | null | undefined;
|
|
5009
|
+
};
|
|
5010
|
+
export type ListScheduledTaskAccessAttentionResponse = {
|
|
5011
|
+
tasks: ScheduledTaskAccessAttention[];
|
|
2848
5012
|
};
|
|
2849
5013
|
/** Generic variable-set reads expose name + version metadata only. */
|
|
2850
5014
|
export type VariableSetVariableMetadata = {
|
|
@@ -2864,17 +5028,33 @@ export type VariableSet = {
|
|
|
2864
5028
|
id: string;
|
|
2865
5029
|
accountId: string;
|
|
2866
5030
|
workspaceId: string;
|
|
5031
|
+
scope: "organization" | "workspace" | "user";
|
|
5032
|
+
generation: number;
|
|
5033
|
+
status: "active" | "revoked";
|
|
2867
5034
|
name: string;
|
|
2868
5035
|
description: string | null;
|
|
2869
5036
|
variables: VariableSetVariableMetadata[];
|
|
2870
5037
|
createdAt: string;
|
|
2871
5038
|
updatedAt: string;
|
|
2872
5039
|
};
|
|
5040
|
+
/** Exact-ID attachment metadata; intentionally excludes catalog and secret metadata. */
|
|
5041
|
+
export type VariableSetAttachmentMetadata = {
|
|
5042
|
+
id: string;
|
|
5043
|
+
scope: "organization" | "workspace" | "user";
|
|
5044
|
+
};
|
|
5045
|
+
export type ResolveVariableSetAttachmentsRequest = {
|
|
5046
|
+
variableSetIds: string[];
|
|
5047
|
+
};
|
|
5048
|
+
export type ResolveVariableSetAttachmentsResponse = {
|
|
5049
|
+
variableSets: VariableSetAttachmentMetadata[];
|
|
5050
|
+
};
|
|
2873
5051
|
/** @deprecated use VariableSetVariableMetadata */
|
|
2874
5052
|
export type WorkspaceEnvironmentVariableMetadata = VariableSetVariableMetadata;
|
|
2875
5053
|
/** @deprecated use VariableSet */
|
|
2876
5054
|
export type WorkspaceEnvironment = VariableSet;
|
|
2877
5055
|
export type CreateVariableSetRequest = {
|
|
5056
|
+
/** Omitted remains the legacy workspace-owned path. */
|
|
5057
|
+
scope?: "organization" | "workspace" | "user" | undefined;
|
|
2878
5058
|
name: string;
|
|
2879
5059
|
description?: string | undefined;
|
|
2880
5060
|
/** Initial variables. Values are write-only: they never come back on reads. */
|
|
@@ -2949,10 +5129,46 @@ export type RigVerificationHealth = {
|
|
|
2949
5129
|
checkHealth: "passing" | "failing" | "unknown";
|
|
2950
5130
|
lastVerifiedAt: string | null;
|
|
2951
5131
|
};
|
|
5132
|
+
/**
|
|
5133
|
+
* Workspace-shared channel organizing root sessions ("workstreams") by work
|
|
5134
|
+
* type in the rail. Pure organizational metadata.
|
|
5135
|
+
*/
|
|
5136
|
+
export type Channel = {
|
|
5137
|
+
id: string;
|
|
5138
|
+
accountId: string;
|
|
5139
|
+
workspaceId: string;
|
|
5140
|
+
name: string;
|
|
5141
|
+
description: string | null;
|
|
5142
|
+
pinned: boolean;
|
|
5143
|
+
sortOrder: number;
|
|
5144
|
+
createdBy: string | null;
|
|
5145
|
+
createdAt: string;
|
|
5146
|
+
updatedAt: string;
|
|
5147
|
+
};
|
|
5148
|
+
export type CreateChannelRequest = {
|
|
5149
|
+
name: string;
|
|
5150
|
+
description?: string;
|
|
5151
|
+
};
|
|
5152
|
+
export type UpdateChannelRequest = {
|
|
5153
|
+
name?: string;
|
|
5154
|
+
description?: string | null;
|
|
5155
|
+
pinned?: boolean;
|
|
5156
|
+
};
|
|
5157
|
+
/** Complete workspace project order. It is replaced atomically after a drag. */
|
|
5158
|
+
export type ReorderChannelsRequest = {
|
|
5159
|
+
channelIds: string[];
|
|
5160
|
+
};
|
|
5161
|
+
/** Re-files one session; null moves it back to the unfiled inbox. */
|
|
5162
|
+
export type UpdateSessionChannelRequest = {
|
|
5163
|
+
channelId: string | null;
|
|
5164
|
+
};
|
|
2952
5165
|
export type Rig = {
|
|
2953
5166
|
id: string;
|
|
2954
5167
|
accountId: string;
|
|
2955
5168
|
workspaceId: string;
|
|
5169
|
+
scope: ResourceAuthorityScope;
|
|
5170
|
+
generation: number;
|
|
5171
|
+
status: "active" | "revoked";
|
|
2956
5172
|
name: string;
|
|
2957
5173
|
description: string | null;
|
|
2958
5174
|
createdBy: string | null;
|
|
@@ -2974,6 +5190,7 @@ export type RigChangeVerification = {
|
|
|
2974
5190
|
startedAt?: string | undefined;
|
|
2975
5191
|
finishedAt?: string | undefined;
|
|
2976
5192
|
log?: string | undefined;
|
|
5193
|
+
platformCheckResults?: RigCheckResult[] | undefined;
|
|
2977
5194
|
checkResults?: RigCheckResult[] | undefined;
|
|
2978
5195
|
[key: string]: unknown;
|
|
2979
5196
|
};
|
|
@@ -2991,9 +5208,10 @@ export type RigChange = {
|
|
|
2991
5208
|
updatedAt: string;
|
|
2992
5209
|
};
|
|
2993
5210
|
export type CreateRigRequest = {
|
|
5211
|
+
scope?: ResourceAuthorityScope;
|
|
2994
5212
|
name: string;
|
|
2995
5213
|
description?: string | undefined;
|
|
2996
|
-
image?:
|
|
5214
|
+
image?: never;
|
|
2997
5215
|
setupScript?: string | undefined;
|
|
2998
5216
|
checks?: RigCheck[] | undefined;
|
|
2999
5217
|
credentialHooks?: string[] | undefined;
|
|
@@ -3008,7 +5226,7 @@ export type RigSetupAppendPayload = {
|
|
|
3008
5226
|
note?: string | undefined;
|
|
3009
5227
|
};
|
|
3010
5228
|
export type RigDefinitionEditPayload = {
|
|
3011
|
-
image?:
|
|
5229
|
+
image?: never;
|
|
3012
5230
|
setupScript?: string | null | undefined;
|
|
3013
5231
|
checks?: RigCheck[] | undefined;
|
|
3014
5232
|
credentialHooks?: string[] | undefined;
|
|
@@ -3023,7 +5241,17 @@ export type ProposeRigChangeRequest = {
|
|
|
3023
5241
|
payload: RigDefinitionEditPayload;
|
|
3024
5242
|
};
|
|
3025
5243
|
export type FileStatus = "pending_upload" | "ready" | "failed" | "expired" | "deleted";
|
|
5244
|
+
export type FileListRequest = {
|
|
5245
|
+
scope?: "all" | "workspace" | "personal";
|
|
5246
|
+
limit?: number;
|
|
5247
|
+
cursor?: string;
|
|
5248
|
+
};
|
|
5249
|
+
export type FileListResponse = {
|
|
5250
|
+
files: FileAsset[];
|
|
5251
|
+
nextCursor: string | null;
|
|
5252
|
+
};
|
|
3026
5253
|
export type FileAsset = {
|
|
5254
|
+
scope?: "workspace" | "personal" | undefined;
|
|
3027
5255
|
id: string;
|
|
3028
5256
|
workspaceId: string;
|
|
3029
5257
|
status: FileStatus;
|
|
@@ -3043,7 +5271,7 @@ export declare const RETAINED_OUTPUT_MAX_PAGE_BYTES: number;
|
|
|
3043
5271
|
export declare const COMPUTER_SCREENSHOT_MAX_BYTES: number;
|
|
3044
5272
|
export declare const GENERATED_IMAGE_MAX_BYTES: number;
|
|
3045
5273
|
export declare const GENERATED_VIDEO_MAX_BYTES: number;
|
|
3046
|
-
export type RetainedOutputKind = "tool_result" | "assistant_completion" | "internal_update" | "event_media" | "computer_screenshot" | "generated_image" | "generated_video" | "file";
|
|
5274
|
+
export type RetainedOutputKind = "tool_result" | "assistant_completion" | "internal_update" | "event_media" | "computer_screenshot" | "browser_screenshot" | "generated_image" | "generated_video" | "file";
|
|
3047
5275
|
export type RetainedOutputUnavailableReason = "not_retained" | "pending" | "failed" | "expired" | "deleted" | "missing_storage" | "storage_write_failed" | "quota_exceeded" | "invalid_content" | "oversized" | "unsupported";
|
|
3048
5276
|
export type RetainedArtifactReference = {
|
|
3049
5277
|
available: true;
|
|
@@ -3118,7 +5346,7 @@ export type UpdateVideoGenerationPolicyRequest = {
|
|
|
3118
5346
|
enabledModelIds: string[];
|
|
3119
5347
|
defaultModelId: string | null;
|
|
3120
5348
|
};
|
|
3121
|
-
export type VideoGenerationFundingSource = "opengeni_credits" | "workspace_gateway";
|
|
5349
|
+
export type VideoGenerationFundingSource = "opengeni_credits" | "workspace_gateway" | "supergrok_subscription";
|
|
3122
5350
|
export type VideoGenerationFundingOption = {
|
|
3123
5351
|
source: VideoGenerationFundingSource;
|
|
3124
5352
|
label: string;
|
|
@@ -3214,6 +5442,7 @@ export type RetainedArtifactDownload = {
|
|
|
3214
5442
|
bytes: Uint8Array;
|
|
3215
5443
|
};
|
|
3216
5444
|
export type CreateFileUploadRequest = {
|
|
5445
|
+
scope?: "workspace" | "personal";
|
|
3217
5446
|
filename: string;
|
|
3218
5447
|
contentType: string;
|
|
3219
5448
|
sizeBytes: number;
|
|
@@ -3239,6 +5468,7 @@ export type FileDownloadUrlResponse = {
|
|
|
3239
5468
|
/** Bytes accepted by the `uploadFile` helper. */
|
|
3240
5469
|
export type FileUploadData = Blob | ArrayBuffer | Uint8Array | string;
|
|
3241
5470
|
export type UploadFileInput = {
|
|
5471
|
+
scope?: "workspace" | "personal";
|
|
3242
5472
|
filename: string;
|
|
3243
5473
|
contentType: string;
|
|
3244
5474
|
data: FileUploadData;
|
|
@@ -3290,6 +5520,7 @@ export type Document = {
|
|
|
3290
5520
|
authorityKind: DocumentAuthorityKind;
|
|
3291
5521
|
authorityWorkspaceId: string | null;
|
|
3292
5522
|
authoritySubjectId: string | null;
|
|
5523
|
+
authorityId?: string | null | undefined;
|
|
3293
5524
|
visibility: DocumentVisibility;
|
|
3294
5525
|
createdBy: string | null;
|
|
3295
5526
|
agentAccess: boolean;
|
|
@@ -3359,11 +5590,98 @@ export type CreateKnowledgeDropRequest = {
|
|
|
3359
5590
|
export type MoveDocumentRequest = {
|
|
3360
5591
|
targetBaseId?: string | undefined;
|
|
3361
5592
|
};
|
|
5593
|
+
export type DocumentAuthorityTuple = {
|
|
5594
|
+
kind: DocumentAuthorityKind;
|
|
5595
|
+
workspaceId: string | null;
|
|
5596
|
+
subjectId: string | null;
|
|
5597
|
+
authorityId: string | null;
|
|
5598
|
+
};
|
|
5599
|
+
export type ReclassifyDocumentAuthorityRequest = {
|
|
5600
|
+
operationId: string;
|
|
5601
|
+
expectedAuthority: DocumentAuthorityTuple;
|
|
5602
|
+
targetAuthorityKind: DocumentAuthorityKind;
|
|
5603
|
+
};
|
|
5604
|
+
export type DocumentAuthorityReclassification = {
|
|
5605
|
+
operationId: string;
|
|
5606
|
+
documentId: string;
|
|
5607
|
+
previousAuthority: DocumentAuthorityTuple;
|
|
5608
|
+
authority: DocumentAuthorityTuple;
|
|
5609
|
+
createdAt: string;
|
|
5610
|
+
};
|
|
5611
|
+
export type ListDocumentAuthorityReclassificationsOptions = {
|
|
5612
|
+
limit?: number | undefined;
|
|
5613
|
+
cursor?: string | undefined;
|
|
5614
|
+
};
|
|
5615
|
+
export type ListDocumentAuthorityReclassificationsResponse = {
|
|
5616
|
+
receipts: DocumentAuthorityReclassification[];
|
|
5617
|
+
hasMore: boolean;
|
|
5618
|
+
nextCursor: string | null;
|
|
5619
|
+
};
|
|
5620
|
+
export type RunDocumentDefaultCollectionBackfillRequest = {
|
|
5621
|
+
runId: string;
|
|
5622
|
+
operationId: string;
|
|
5623
|
+
batchSize?: number | undefined;
|
|
5624
|
+
};
|
|
5625
|
+
export type DocumentDefaultCollectionBackfill = {
|
|
5626
|
+
runId: string;
|
|
5627
|
+
operationId: string;
|
|
5628
|
+
status: "running" | "completed";
|
|
5629
|
+
lastWorkspaceId: string | null;
|
|
5630
|
+
processedCount: number;
|
|
5631
|
+
createdCount: number;
|
|
5632
|
+
adoptedCount: number;
|
|
5633
|
+
completedAt: string | null;
|
|
5634
|
+
};
|
|
5635
|
+
export type DocumentDefaultCollectionBackfillRunAudit = Omit<DocumentDefaultCollectionBackfill, "operationId"> & {
|
|
5636
|
+
actorSubjectId: string;
|
|
5637
|
+
startedAt: string;
|
|
5638
|
+
updatedAt: string;
|
|
5639
|
+
};
|
|
5640
|
+
export type DocumentDefaultCollectionBackfillOperationAudit = {
|
|
5641
|
+
operationId: string;
|
|
5642
|
+
result: DocumentDefaultCollectionBackfill;
|
|
5643
|
+
createdAt: string;
|
|
5644
|
+
};
|
|
5645
|
+
export type DocumentDefaultCollectionBackfillReceiptAudit = {
|
|
5646
|
+
workspaceId: string;
|
|
5647
|
+
baseId: string;
|
|
5648
|
+
outcome: "created" | "adopted";
|
|
5649
|
+
createdAt: string;
|
|
5650
|
+
};
|
|
5651
|
+
export type ListDocumentDefaultCollectionBackfillRunsResponse = {
|
|
5652
|
+
runs: DocumentDefaultCollectionBackfillRunAudit[];
|
|
5653
|
+
hasMore: boolean;
|
|
5654
|
+
nextCursor: string | null;
|
|
5655
|
+
};
|
|
5656
|
+
export type DocumentDefaultCollectionBackfillAudit = {
|
|
5657
|
+
run: DocumentDefaultCollectionBackfillRunAudit;
|
|
5658
|
+
operations: DocumentDefaultCollectionBackfillOperationAudit[];
|
|
5659
|
+
receipts: DocumentDefaultCollectionBackfillReceiptAudit[];
|
|
5660
|
+
operationsHasMore: boolean;
|
|
5661
|
+
operationsNextCursor: string | null;
|
|
5662
|
+
receiptsHasMore: boolean;
|
|
5663
|
+
receiptsNextCursor: string | null;
|
|
5664
|
+
};
|
|
5665
|
+
export type GetDocumentDefaultCollectionBackfillAuditOptions = {
|
|
5666
|
+
limit?: number | undefined;
|
|
5667
|
+
operationCursor?: string | undefined;
|
|
5668
|
+
receiptCursor?: string | undefined;
|
|
5669
|
+
};
|
|
5670
|
+
export type OrganizationDocumentAuthorityReclassification = DocumentAuthorityReclassification & {
|
|
5671
|
+
actorSubjectId: string;
|
|
5672
|
+
requestWorkspaceId: string;
|
|
5673
|
+
};
|
|
5674
|
+
export type ListOrganizationDocumentAuthorityReclassificationsResponse = {
|
|
5675
|
+
receipts: OrganizationDocumentAuthorityReclassification[];
|
|
5676
|
+
hasMore: boolean;
|
|
5677
|
+
nextCursor: string | null;
|
|
5678
|
+
};
|
|
3362
5679
|
export type DocumentSearchRequest = {
|
|
3363
5680
|
query: string;
|
|
3364
5681
|
baseIds?: string[] | undefined;
|
|
3365
5682
|
mode?: DocumentSearchMode | undefined;
|
|
3366
5683
|
sourceKinds?: KnowledgeSourceKind[] | undefined;
|
|
5684
|
+
authorityKinds?: DocumentAuthorityKind[] | undefined;
|
|
3367
5685
|
aclTags?: string[] | undefined;
|
|
3368
5686
|
limit?: number | undefined;
|
|
3369
5687
|
};
|
|
@@ -3449,303 +5767,127 @@ export type WorkspaceMemorySearchResult = {
|
|
|
3449
5767
|
export type WorkspaceMemorySearchResponse = {
|
|
3450
5768
|
results: WorkspaceMemorySearchResult[];
|
|
3451
5769
|
};
|
|
3452
|
-
export type
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
authModel: CapabilityPackConnectorAuthModel;
|
|
3458
|
-
providers: string[];
|
|
3459
|
-
scopes: string[];
|
|
3460
|
-
required: boolean;
|
|
3461
|
-
metadata: Record<string, unknown>;
|
|
3462
|
-
};
|
|
3463
|
-
export type CapabilityPackKnowledge = {
|
|
3464
|
-
type: "document_base";
|
|
3465
|
-
id: string;
|
|
3466
|
-
name: string;
|
|
3467
|
-
description: string | null;
|
|
3468
|
-
required: boolean;
|
|
3469
|
-
};
|
|
3470
|
-
export type CapabilityPackScheduledTaskTemplate = {
|
|
3471
|
-
id: string;
|
|
3472
|
-
name: string;
|
|
3473
|
-
description: string;
|
|
3474
|
-
defaultSchedule: ScheduledTaskScheduleSpec;
|
|
3475
|
-
defaultRunMode: ScheduledTaskRunMode;
|
|
3476
|
-
defaultOverlapPolicy: ScheduledTaskOverlapPolicy;
|
|
3477
|
-
prompt?: string | undefined;
|
|
3478
|
-
};
|
|
3479
|
-
export type CapabilityPackSkillFile = {
|
|
3480
|
-
path: string;
|
|
3481
|
-
content: string;
|
|
3482
|
-
};
|
|
3483
|
-
export type CapabilityPackSkill = {
|
|
3484
|
-
name: string;
|
|
3485
|
-
description?: string | undefined;
|
|
3486
|
-
files: CapabilityPackSkillFile[];
|
|
3487
|
-
};
|
|
3488
|
-
export type SessionSkill = CapabilityPackSkill;
|
|
3489
|
-
export type CapabilityPackVariableSetSpec = {
|
|
3490
|
-
description: string;
|
|
3491
|
-
requiredVariables: string[];
|
|
3492
|
-
required: boolean;
|
|
3493
|
-
};
|
|
3494
|
-
export type CapabilityPackComponentReference = {
|
|
3495
|
-
key: string;
|
|
3496
|
-
kind: "plugin";
|
|
3497
|
-
pluginKey: string;
|
|
3498
|
-
version: string;
|
|
3499
|
-
manifestDigest: string;
|
|
3500
|
-
required: boolean;
|
|
3501
|
-
} | {
|
|
3502
|
-
key: string;
|
|
3503
|
-
kind: "skill";
|
|
3504
|
-
capabilityId: string;
|
|
3505
|
-
contentSha256: string;
|
|
3506
|
-
required: boolean;
|
|
3507
|
-
} | {
|
|
3508
|
-
key: string;
|
|
3509
|
-
kind: "integration";
|
|
3510
|
-
capabilityId: string;
|
|
3511
|
-
instanceKey: string;
|
|
3512
|
-
revisionId: string;
|
|
3513
|
-
contentSha256: string;
|
|
3514
|
-
required: boolean;
|
|
3515
|
-
} | {
|
|
3516
|
-
key: string;
|
|
3517
|
-
kind: "feature";
|
|
3518
|
-
capabilityId: string;
|
|
3519
|
-
instanceKey: string;
|
|
3520
|
-
featureKey: string;
|
|
3521
|
-
bindingKey: string;
|
|
3522
|
-
configDigest: string;
|
|
3523
|
-
required: boolean;
|
|
3524
|
-
};
|
|
3525
|
-
export type CapabilityPackRigRequirement = {
|
|
3526
|
-
description?: string | undefined;
|
|
3527
|
-
required: boolean;
|
|
3528
|
-
rigId?: string | undefined;
|
|
3529
|
-
requireVerified: boolean;
|
|
3530
|
-
};
|
|
3531
|
-
export type CapabilityPack = {
|
|
3532
|
-
id: string;
|
|
3533
|
-
name: string;
|
|
3534
|
-
description: string;
|
|
3535
|
-
role: string;
|
|
3536
|
-
category: string;
|
|
3537
|
-
version: string;
|
|
3538
|
-
sandboxImage?: string | undefined;
|
|
3539
|
-
sandboxProviderImages?: {
|
|
3540
|
-
modal?: {
|
|
3541
|
-
imageId: string;
|
|
3542
|
-
} | undefined;
|
|
3543
|
-
} | undefined;
|
|
3544
|
-
skills: CapabilityPackSkill[];
|
|
3545
|
-
components: CapabilityPackComponentReference[];
|
|
3546
|
-
rig?: CapabilityPackRigRequirement | undefined;
|
|
3547
|
-
tools: ToolRef[];
|
|
3548
|
-
connectors: CapabilityPackConnector[];
|
|
3549
|
-
knowledge: CapabilityPackKnowledge[];
|
|
3550
|
-
scheduledTaskTemplates: CapabilityPackScheduledTaskTemplate[];
|
|
3551
|
-
variableSet?: CapabilityPackVariableSetSpec | undefined;
|
|
3552
|
-
metadata: Record<string, unknown>;
|
|
3553
|
-
};
|
|
3554
|
-
/** Input shape for registering a pack manifest (server applies defaults). */
|
|
3555
|
-
export type RegisterCapabilityPackRequest = {
|
|
3556
|
-
id: string;
|
|
5770
|
+
export type SkillArtifactFile = {
|
|
5771
|
+
path: string;
|
|
5772
|
+
content: string;
|
|
5773
|
+
};
|
|
5774
|
+
export type SkillArtifactDefinition = {
|
|
3557
5775
|
name: string;
|
|
3558
|
-
description
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
skills?: {
|
|
3569
|
-
name: string;
|
|
3570
|
-
description?: string | undefined;
|
|
3571
|
-
files: CapabilityPackSkillFile[];
|
|
3572
|
-
}[] | undefined;
|
|
3573
|
-
components?: ({
|
|
3574
|
-
key: string;
|
|
3575
|
-
kind: "plugin";
|
|
3576
|
-
pluginKey: string;
|
|
3577
|
-
version: string;
|
|
3578
|
-
manifestDigest: string;
|
|
3579
|
-
required?: boolean | undefined;
|
|
3580
|
-
} | {
|
|
3581
|
-
key: string;
|
|
3582
|
-
kind: "skill";
|
|
3583
|
-
capabilityId: string;
|
|
3584
|
-
contentSha256: string;
|
|
3585
|
-
required?: boolean | undefined;
|
|
3586
|
-
} | {
|
|
3587
|
-
key: string;
|
|
3588
|
-
kind: "integration";
|
|
3589
|
-
capabilityId: string;
|
|
3590
|
-
instanceKey: string;
|
|
3591
|
-
revisionId: string;
|
|
3592
|
-
contentSha256: string;
|
|
3593
|
-
required?: boolean | undefined;
|
|
3594
|
-
} | {
|
|
3595
|
-
key: string;
|
|
3596
|
-
kind: "feature";
|
|
3597
|
-
capabilityId: string;
|
|
3598
|
-
instanceKey: string;
|
|
3599
|
-
featureKey: string;
|
|
3600
|
-
bindingKey: string;
|
|
3601
|
-
configDigest: string;
|
|
3602
|
-
required?: boolean | undefined;
|
|
3603
|
-
})[] | undefined;
|
|
3604
|
-
rig?: {
|
|
3605
|
-
description?: string | undefined;
|
|
3606
|
-
required?: boolean | undefined;
|
|
3607
|
-
rigId?: string | undefined;
|
|
3608
|
-
requireVerified?: boolean | undefined;
|
|
3609
|
-
} | undefined;
|
|
3610
|
-
tools?: ToolRef[] | undefined;
|
|
3611
|
-
connectors?: {
|
|
3612
|
-
id: string;
|
|
3613
|
-
name: string;
|
|
3614
|
-
category: string;
|
|
3615
|
-
authModel: CapabilityPackConnectorAuthModel;
|
|
3616
|
-
providers?: string[] | undefined;
|
|
3617
|
-
scopes?: string[] | undefined;
|
|
3618
|
-
required?: boolean | undefined;
|
|
3619
|
-
metadata?: Record<string, unknown> | undefined;
|
|
3620
|
-
}[] | undefined;
|
|
3621
|
-
knowledge?: {
|
|
3622
|
-
type: "document_base";
|
|
3623
|
-
id: string;
|
|
3624
|
-
name: string;
|
|
3625
|
-
description?: string | null | undefined;
|
|
3626
|
-
required?: boolean | undefined;
|
|
3627
|
-
}[] | undefined;
|
|
3628
|
-
scheduledTaskTemplates?: {
|
|
3629
|
-
id: string;
|
|
3630
|
-
name: string;
|
|
3631
|
-
description: string;
|
|
3632
|
-
defaultSchedule: ScheduledTaskScheduleSpec;
|
|
3633
|
-
defaultRunMode?: ScheduledTaskRunMode | undefined;
|
|
3634
|
-
defaultOverlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
|
|
3635
|
-
prompt?: string | undefined;
|
|
3636
|
-
}[] | undefined;
|
|
3637
|
-
variableSet?: {
|
|
3638
|
-
description: string;
|
|
3639
|
-
requiredVariables?: string[] | undefined;
|
|
3640
|
-
required?: boolean | undefined;
|
|
3641
|
-
} | undefined;
|
|
3642
|
-
metadata?: Record<string, unknown> | undefined;
|
|
5776
|
+
description?: string | undefined;
|
|
5777
|
+
/** Omitted means workspace-wide; session_selected requires explicit session attachment. */
|
|
5778
|
+
activationMode?: "workspace_managed" | "session_selected" | undefined;
|
|
5779
|
+
files: SkillArtifactFile[];
|
|
5780
|
+
};
|
|
5781
|
+
export type SessionSkill = Omit<SkillArtifactDefinition, "activationMode">;
|
|
5782
|
+
/** SKILL.md owns metadata; supplied legacy fields must exactly match it. */
|
|
5783
|
+
export type SkillArtifactDefinitionInput = Omit<SkillArtifactDefinition, "name" | "description"> & {
|
|
5784
|
+
name?: string | undefined;
|
|
5785
|
+
description?: string | undefined;
|
|
3643
5786
|
};
|
|
3644
|
-
export type
|
|
5787
|
+
export type SessionSkillInput = Omit<SkillArtifactDefinitionInput, "activationMode">;
|
|
5788
|
+
export type PrReviewProvider = GitCredentialProvider;
|
|
5789
|
+
export type PrReviewCredentialKind = "github_app" | "managed_github_app" | "provider_token";
|
|
5790
|
+
export type PrReviewWebhookAuthKind = "hmac_sha256" | "shared_token" | "basic";
|
|
5791
|
+
export type CreatePrReviewAppRegistrationRequest = {
|
|
5792
|
+
name: string;
|
|
5793
|
+
provider: PrReviewProvider;
|
|
5794
|
+
providerBaseUrl?: string | undefined;
|
|
5795
|
+
appId?: string | undefined;
|
|
5796
|
+
credentialKind: PrReviewCredentialKind;
|
|
5797
|
+
privateKey?: string | undefined;
|
|
5798
|
+
accessToken?: string | undefined;
|
|
5799
|
+
accessTokenExpiresAt?: string | null | undefined;
|
|
5800
|
+
webhookSecret: string;
|
|
5801
|
+
webhookUsername?: string | undefined;
|
|
5802
|
+
};
|
|
5803
|
+
export type UpdatePrReviewAppRegistrationRequest = {
|
|
5804
|
+
name?: string | undefined;
|
|
5805
|
+
privateKey?: string | undefined;
|
|
5806
|
+
accessToken?: string | undefined;
|
|
5807
|
+
accessTokenExpiresAt?: string | null | undefined;
|
|
5808
|
+
webhookSecret?: string | undefined;
|
|
5809
|
+
webhookUsername?: string | undefined;
|
|
5810
|
+
status?: "active" | "disabled" | undefined;
|
|
5811
|
+
};
|
|
5812
|
+
export type PrReviewAppRegistration = {
|
|
5813
|
+
id: string;
|
|
5814
|
+
sourceId: string;
|
|
3645
5815
|
accountId: string;
|
|
3646
5816
|
workspaceId: string;
|
|
3647
|
-
|
|
5817
|
+
name: string;
|
|
5818
|
+
provider: PrReviewProvider;
|
|
5819
|
+
providerBaseUrl: string;
|
|
5820
|
+
appId: string | null;
|
|
5821
|
+
installationId: string | null;
|
|
5822
|
+
providerAccountLogin: string | null;
|
|
5823
|
+
providerAccountType: "User" | "Organization" | null;
|
|
5824
|
+
credentialKind: PrReviewCredentialKind;
|
|
5825
|
+
hasCredential: boolean;
|
|
5826
|
+
accessTokenExpiresAt: string | null;
|
|
5827
|
+
webhookAuthKind: PrReviewWebhookAuthKind;
|
|
5828
|
+
hasWebhookSecret: boolean;
|
|
5829
|
+
webhookUsername: string | null;
|
|
5830
|
+
webhookPath: string;
|
|
5831
|
+
status: "active" | "disabled";
|
|
5832
|
+
createdBySubjectId: string;
|
|
3648
5833
|
createdAt: string;
|
|
3649
5834
|
updatedAt: string;
|
|
3650
5835
|
};
|
|
3651
|
-
export type
|
|
3652
|
-
|
|
5836
|
+
export type CreatePrReviewRepositoryBindingRequest = {
|
|
5837
|
+
registrationId: string;
|
|
5838
|
+
repositoryUri: string;
|
|
5839
|
+
repositoryFullName: string;
|
|
5840
|
+
providerRepositoryId: string | number;
|
|
5841
|
+
installationId?: string | number | undefined;
|
|
5842
|
+
projectId?: string | number | undefined;
|
|
5843
|
+
model?: string | null | undefined;
|
|
5844
|
+
additionalInstructions?: string | null | undefined;
|
|
5845
|
+
status?: "active" | "disabled" | undefined;
|
|
5846
|
+
};
|
|
5847
|
+
export type UpdatePrReviewRepositoryBindingRequest = {
|
|
5848
|
+
model?: string | null | undefined;
|
|
5849
|
+
additionalInstructions?: string | null | undefined;
|
|
5850
|
+
status?: "active" | "disabled" | undefined;
|
|
5851
|
+
};
|
|
5852
|
+
export type PrReviewRepositoryBinding = {
|
|
3653
5853
|
id: string;
|
|
5854
|
+
triggerId: string;
|
|
3654
5855
|
accountId: string;
|
|
3655
5856
|
workspaceId: string;
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
5857
|
+
registrationId: string;
|
|
5858
|
+
provider: PrReviewProvider;
|
|
5859
|
+
repositoryUri: string;
|
|
5860
|
+
repositoryFullName: string;
|
|
5861
|
+
providerRepositoryId: string;
|
|
5862
|
+
installationId: string | null;
|
|
5863
|
+
projectId: string | null;
|
|
5864
|
+
model: string | null;
|
|
5865
|
+
additionalInstructions: string | null;
|
|
5866
|
+
status: "active" | "disabled";
|
|
5867
|
+
createdBySubjectId: string;
|
|
5868
|
+
createdAt: string;
|
|
3665
5869
|
updatedAt: string;
|
|
3666
5870
|
};
|
|
3667
|
-
export type
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
environmentId?: string | undefined;
|
|
3671
|
-
metadata?: Record<string, unknown> | undefined;
|
|
3672
|
-
};
|
|
3673
|
-
export type PackComponentResolutionStatus = "ready" | "missing" | "mismatch";
|
|
3674
|
-
export type PackComponentResolution = {
|
|
3675
|
-
key: string;
|
|
3676
|
-
kind: "plugin" | "skill" | "integration" | "feature" | "inline_skill";
|
|
3677
|
-
capabilityId: string;
|
|
3678
|
-
required: boolean;
|
|
3679
|
-
status: PackComponentResolutionStatus;
|
|
3680
|
-
expectedDigest: string;
|
|
3681
|
-
actualDigest: string | null;
|
|
3682
|
-
resolvedId: string | null;
|
|
3683
|
-
label: string;
|
|
3684
|
-
};
|
|
3685
|
-
export type PackRigResolution = {
|
|
3686
|
-
required: boolean;
|
|
3687
|
-
status: "not_required" | "ready" | "missing" | "mismatch" | "unverified";
|
|
3688
|
-
requestedRigId: string | null;
|
|
3689
|
-
rigId: string | null;
|
|
3690
|
-
rigVersionId: string | null;
|
|
3691
|
-
name: string | null;
|
|
3692
|
-
image: string | null;
|
|
3693
|
-
};
|
|
3694
|
-
export type PreviewPackInstallationRequest = {
|
|
3695
|
-
rigId?: string | undefined;
|
|
3696
|
-
variableSetId?: string | undefined;
|
|
3697
|
-
};
|
|
3698
|
-
export type PackInstallationPreview = {
|
|
3699
|
-
packId: string;
|
|
3700
|
-
packVersion: string;
|
|
3701
|
-
manifestDigest: string;
|
|
3702
|
-
installationVersion: number | null;
|
|
3703
|
-
action: "install" | "update" | "repair";
|
|
3704
|
-
ready: boolean;
|
|
3705
|
-
blockers: string[];
|
|
3706
|
-
components: PackComponentResolution[];
|
|
3707
|
-
rig: PackRigResolution;
|
|
3708
|
-
variableSetId: string | null;
|
|
3709
|
-
legacyInlineSkillCount: number;
|
|
3710
|
-
legacySandboxImage: string | null;
|
|
3711
|
-
};
|
|
3712
|
-
export type InstallPackRequest = {
|
|
3713
|
-
expectedManifestDigest: string;
|
|
3714
|
-
expectedInstallationVersion?: number | undefined;
|
|
3715
|
-
rigId?: string | undefined;
|
|
3716
|
-
variableSetId?: string | undefined;
|
|
3717
|
-
idempotencyKey: string;
|
|
3718
|
-
metadata?: Record<string, unknown> | undefined;
|
|
3719
|
-
};
|
|
3720
|
-
export type PackUninstallPreview = {
|
|
3721
|
-
packId: string;
|
|
3722
|
-
installed: boolean;
|
|
3723
|
-
installationVersion: number | null;
|
|
3724
|
-
components: Array<{
|
|
3725
|
-
key: string;
|
|
3726
|
-
kind: "plugin" | "skill" | "integration" | "feature" | "inline_skill";
|
|
3727
|
-
capabilityId: string;
|
|
3728
|
-
retainedByOtherOwners: boolean;
|
|
3729
|
-
}>;
|
|
3730
|
-
};
|
|
3731
|
-
export type UninstallPackRequest = {
|
|
3732
|
-
expectedInstallationVersion: number;
|
|
3733
|
-
idempotencyKey: string;
|
|
3734
|
-
};
|
|
3735
|
-
export type UninstallPackResult = {
|
|
3736
|
-
packId: string;
|
|
3737
|
-
status: "not_installed" | "uninstalled";
|
|
3738
|
-
retainedComponents: string[];
|
|
5871
|
+
export type ListPrReviewConfigurationResponse = {
|
|
5872
|
+
registrations: PrReviewAppRegistration[];
|
|
5873
|
+
repositories: PrReviewRepositoryBinding[];
|
|
3739
5874
|
};
|
|
3740
|
-
export type
|
|
3741
|
-
|
|
3742
|
-
|
|
5875
|
+
export type PrReviewManagedGitHubInstallation = {
|
|
5876
|
+
registrationId: string;
|
|
5877
|
+
installationId: string;
|
|
5878
|
+
accountLogin: string | null;
|
|
5879
|
+
configureUrl: string | null;
|
|
5880
|
+
repositoryCount: number;
|
|
3743
5881
|
};
|
|
3744
|
-
export type
|
|
3745
|
-
|
|
3746
|
-
|
|
5882
|
+
export type PrReviewManagedGitHubSetup = {
|
|
5883
|
+
configured: boolean;
|
|
5884
|
+
status: "unavailable" | "not_connected" | "connected";
|
|
5885
|
+
appName: "OpenGeni Lens";
|
|
5886
|
+
connectUrl: string | null;
|
|
5887
|
+
installations: PrReviewManagedGitHubInstallation[];
|
|
5888
|
+
missing: string[];
|
|
3747
5889
|
};
|
|
3748
|
-
export type CapabilityKind = "
|
|
5890
|
+
export type CapabilityKind = "mcp" | "api" | "skill" | "plugin";
|
|
3749
5891
|
export type CapabilitySource = "built_in" | "library" | "configured" | "public_registry" | "registry" | "manual";
|
|
3750
5892
|
export type CapabilityInstallationStatus = "active" | "disabled";
|
|
3751
5893
|
export type CapabilityCatalogAuthKind = "oauth2" | "api_key" | "none" | "unknown";
|
|
@@ -3807,6 +5949,8 @@ export type CapabilityCatalogItem = {
|
|
|
3807
5949
|
/** The connection backing this enabled installation, or null when none is involved. */
|
|
3808
5950
|
connectionRef: {
|
|
3809
5951
|
connectionId?: string | undefined;
|
|
5952
|
+
accountSelection?: "all_eligible" | undefined;
|
|
5953
|
+
authoritySource?: "host" | undefined;
|
|
3810
5954
|
providerDomain: string;
|
|
3811
5955
|
kind: string;
|
|
3812
5956
|
subjectScope?: "subject" | "workspace" | undefined;
|
|
@@ -3833,7 +5977,7 @@ export type CapabilityCatalogResponse = {
|
|
|
3833
5977
|
};
|
|
3834
5978
|
export type CreateCapabilityCatalogItemRequest = {
|
|
3835
5979
|
id?: string | undefined;
|
|
3836
|
-
kind:
|
|
5980
|
+
kind: "mcp";
|
|
3837
5981
|
source?: CapabilitySource | undefined;
|
|
3838
5982
|
name: string;
|
|
3839
5983
|
description?: string | undefined;
|
|
@@ -3846,6 +5990,7 @@ export type CreateCapabilityCatalogItemRequest = {
|
|
|
3846
5990
|
metadata?: Record<string, unknown> | undefined;
|
|
3847
5991
|
};
|
|
3848
5992
|
export type EnableCapabilityRequest = {
|
|
5993
|
+
onlyIfUninstalled?: boolean | undefined;
|
|
3849
5994
|
config?: Record<string, unknown> | undefined;
|
|
3850
5995
|
metadata?: Record<string, unknown> | undefined;
|
|
3851
5996
|
connectionRef?: McpServerConnectionRef | undefined;
|
|
@@ -3855,14 +6000,6 @@ export type EnableCapabilityRequest = {
|
|
|
3855
6000
|
* API (responses expose header names only).
|
|
3856
6001
|
*/
|
|
3857
6002
|
headers?: Record<string, string> | undefined;
|
|
3858
|
-
/**
|
|
3859
|
-
* Initial variableSet attachment for kind=pack capabilities — mirrors the
|
|
3860
|
-
* dedicated POST /packs/:id/enable body. Required to enable an
|
|
3861
|
-
* variableSet.required pack through this unified path; ignored otherwise.
|
|
3862
|
-
*/
|
|
3863
|
-
variableSetId?: string | undefined;
|
|
3864
|
-
/** @deprecated use variableSetId */
|
|
3865
|
-
environmentId?: string | undefined;
|
|
3866
6003
|
};
|
|
3867
6004
|
export type DiscoverMcpCapabilitiesResponse = {
|
|
3868
6005
|
items: CapabilityCatalogItem[];
|
|
@@ -3870,6 +6007,7 @@ export type DiscoverMcpCapabilitiesResponse = {
|
|
|
3870
6007
|
sourceUrl: string;
|
|
3871
6008
|
};
|
|
3872
6009
|
export type SkillImportSource = "github" | "skills_sh";
|
|
6010
|
+
export type SkillInstallationSource = "library" | "github" | "skills_sh";
|
|
3873
6011
|
export type PreviewSkillImportRequest = {
|
|
3874
6012
|
url: string;
|
|
3875
6013
|
};
|
|
@@ -3879,6 +6017,7 @@ export type SkillImportFileSummary = {
|
|
|
3879
6017
|
contentSha256: string;
|
|
3880
6018
|
};
|
|
3881
6019
|
export type SkillImportPreview = {
|
|
6020
|
+
markdown?: string;
|
|
3882
6021
|
source: SkillImportSource;
|
|
3883
6022
|
sourceUrl: string;
|
|
3884
6023
|
repositoryUrl: string;
|
|
@@ -3901,7 +6040,13 @@ export type InstallSkillRequest = {
|
|
|
3901
6040
|
expectedContentSha256: string;
|
|
3902
6041
|
expectedInstallationVersion?: number | undefined;
|
|
3903
6042
|
};
|
|
6043
|
+
export type InstallLibrarySkillRequest = {
|
|
6044
|
+
expectedVersion: string;
|
|
6045
|
+
expectedContentSha256: string;
|
|
6046
|
+
expectedInstallationVersion?: number | undefined;
|
|
6047
|
+
};
|
|
3904
6048
|
export type InstalledSkill = {
|
|
6049
|
+
skillReceipt?: import("./skills.js").SkillWriteReceipt | undefined;
|
|
3905
6050
|
capabilityId: string;
|
|
3906
6051
|
pluginId: string;
|
|
3907
6052
|
pluginVersionId: string;
|
|
@@ -3909,7 +6054,8 @@ export type InstalledSkill = {
|
|
|
3909
6054
|
pluginInstallationId: string;
|
|
3910
6055
|
facetInstallationId: string;
|
|
3911
6056
|
installationVersion: number;
|
|
3912
|
-
source:
|
|
6057
|
+
source: SkillInstallationSource;
|
|
6058
|
+
version: string;
|
|
3913
6059
|
sourceUrl: string;
|
|
3914
6060
|
sourceCommit: string;
|
|
3915
6061
|
contentSha256: string;
|
|
@@ -3917,10 +6063,36 @@ export type InstalledSkill = {
|
|
|
3917
6063
|
status: "installed";
|
|
3918
6064
|
};
|
|
3919
6065
|
export type CapabilityComponentOwner = {
|
|
3920
|
-
kind: "direct" | "plugin" | "
|
|
6066
|
+
kind: "direct" | "plugin" | "migration";
|
|
3921
6067
|
id: string;
|
|
3922
6068
|
removable: boolean;
|
|
3923
6069
|
};
|
|
6070
|
+
export type InstalledSkillSummary = {
|
|
6071
|
+
capabilityId: string;
|
|
6072
|
+
pluginKey: string;
|
|
6073
|
+
installationVersion: number;
|
|
6074
|
+
name: string;
|
|
6075
|
+
description: string;
|
|
6076
|
+
category: string;
|
|
6077
|
+
tags: string[];
|
|
6078
|
+
provenance: string;
|
|
6079
|
+
source: SkillInstallationSource;
|
|
6080
|
+
version: string;
|
|
6081
|
+
sourceUrl: string;
|
|
6082
|
+
repositoryUrl: string;
|
|
6083
|
+
sourceCommit: string;
|
|
6084
|
+
sourcePath: string;
|
|
6085
|
+
contentSha256: string;
|
|
6086
|
+
fileCount: number;
|
|
6087
|
+
totalBytes: number;
|
|
6088
|
+
license: string | null;
|
|
6089
|
+
installedAt: string;
|
|
6090
|
+
updatedAt: string;
|
|
6091
|
+
owners: CapabilityComponentOwner[];
|
|
6092
|
+
};
|
|
6093
|
+
export type ListInstalledSkillsResponse = {
|
|
6094
|
+
skills: InstalledSkillSummary[];
|
|
6095
|
+
};
|
|
3924
6096
|
export type SkillUninstallPreview = {
|
|
3925
6097
|
capabilityId: string;
|
|
3926
6098
|
installed: boolean;
|
|
@@ -3933,27 +6105,29 @@ export type UninstallSkillRequest = {
|
|
|
3933
6105
|
expectedInstallationVersion: number;
|
|
3934
6106
|
};
|
|
3935
6107
|
export type UninstallSkillResult = {
|
|
6108
|
+
skillReleases?: import("./skills.js").SkillSourceReleaseReceipt[] | undefined;
|
|
3936
6109
|
capabilityId: string;
|
|
3937
6110
|
status: "not_installed" | "uninstalled" | "retained_by_other_owners";
|
|
3938
6111
|
remainingOwners: CapabilityComponentOwner[];
|
|
3939
6112
|
};
|
|
3940
6113
|
export type ApiIntegrationProtocol = "openapi" | "graphql";
|
|
3941
|
-
export type
|
|
3942
|
-
export type
|
|
3943
|
-
export type
|
|
3944
|
-
|
|
3945
|
-
|
|
6114
|
+
export type IntegrationDefinitionProvenance = "curated" | "workspace";
|
|
6115
|
+
export type IntegrationFacetKind = "tools" | "knowledge_source" | "inbound_trigger" | "delivery_destination" | "identity_link";
|
|
6116
|
+
export type IntegrationFacetStatus = "active" | "paused" | "needs_attention" | "disabled";
|
|
6117
|
+
export type IntegrationFacetDefinitionSummary = {
|
|
6118
|
+
facetKey: string;
|
|
6119
|
+
kind: Exclude<IntegrationFacetKind, "tools">;
|
|
3946
6120
|
configSchema: Record<string, unknown>;
|
|
3947
6121
|
capabilities: Record<string, unknown>;
|
|
3948
6122
|
};
|
|
3949
|
-
export type
|
|
6123
|
+
export type IntegrationFacetBindingSummary = {
|
|
3950
6124
|
id: string;
|
|
3951
|
-
|
|
3952
|
-
kind: Exclude<
|
|
6125
|
+
facetKey: string;
|
|
6126
|
+
kind: Exclude<IntegrationFacetKind, "tools">;
|
|
3953
6127
|
bindingKey: string;
|
|
3954
6128
|
displayName: string;
|
|
3955
6129
|
connectionId: string | null;
|
|
3956
|
-
status:
|
|
6130
|
+
status: IntegrationFacetStatus;
|
|
3957
6131
|
config: Record<string, unknown>;
|
|
3958
6132
|
version: number;
|
|
3959
6133
|
hasCursor: boolean;
|
|
@@ -3961,58 +6135,85 @@ export type IntegrationFeatureBindingSummary = {
|
|
|
3961
6135
|
lastErrorCode: string | null;
|
|
3962
6136
|
createdAt: string;
|
|
3963
6137
|
updatedAt: string;
|
|
6138
|
+
directlyOwned: boolean;
|
|
6139
|
+
owners: CapabilityComponentOwner[];
|
|
3964
6140
|
};
|
|
3965
|
-
export type
|
|
6141
|
+
export type IntegrationInstanceFacetsResponse = {
|
|
3966
6142
|
capabilityId: string;
|
|
3967
6143
|
instanceKey: string;
|
|
3968
6144
|
providerDomain: string;
|
|
3969
6145
|
connectionId: string | null;
|
|
3970
|
-
|
|
3971
|
-
definition:
|
|
3972
|
-
binding:
|
|
6146
|
+
facets: {
|
|
6147
|
+
definition: IntegrationFacetDefinitionSummary;
|
|
6148
|
+
binding: IntegrationFacetBindingSummary | null;
|
|
3973
6149
|
}[];
|
|
3974
6150
|
};
|
|
3975
|
-
export type
|
|
6151
|
+
export type UpsertIntegrationFacetRequest = {
|
|
3976
6152
|
displayName: string;
|
|
3977
6153
|
config?: Record<string, unknown> | undefined;
|
|
3978
6154
|
expectedVersion?: number | undefined;
|
|
3979
6155
|
idempotencyKey: string;
|
|
3980
6156
|
};
|
|
3981
|
-
export type
|
|
6157
|
+
export type MutateIntegrationFacetRequest = {
|
|
3982
6158
|
expectedVersion: number;
|
|
3983
6159
|
idempotencyKey: string;
|
|
3984
6160
|
};
|
|
3985
|
-
export type
|
|
6161
|
+
export type IntegrationFacetMutationResult = {
|
|
3986
6162
|
capabilityId: string;
|
|
3987
6163
|
instanceKey: string;
|
|
3988
|
-
|
|
6164
|
+
facetKey: string;
|
|
3989
6165
|
status: "configured" | "paused" | "active";
|
|
3990
|
-
binding:
|
|
6166
|
+
binding: IntegrationFacetBindingSummary;
|
|
3991
6167
|
};
|
|
3992
|
-
export type
|
|
6168
|
+
export type IntegrationFacetRemovalResult = {
|
|
3993
6169
|
capabilityId: string;
|
|
3994
6170
|
instanceKey: string;
|
|
3995
|
-
|
|
6171
|
+
facetKey: string;
|
|
3996
6172
|
status: "not_configured" | "removed" | "retained_by_other_owners";
|
|
3997
|
-
binding:
|
|
6173
|
+
binding: IntegrationFacetBindingSummary | null;
|
|
3998
6174
|
remainingOwners: CapabilityComponentOwner[];
|
|
3999
6175
|
};
|
|
4000
|
-
|
|
6176
|
+
/**
|
|
6177
|
+
* Presentation-only consent copy served with an integration or connector.
|
|
6178
|
+
* Never grants a scope or replaces server-side authorization; the UI keeps a
|
|
6179
|
+
* generic fallback for any omitted field.
|
|
6180
|
+
*/
|
|
6181
|
+
export type IntegrationPresentation = {
|
|
6182
|
+
providerName?: string | undefined;
|
|
6183
|
+
icon?: "calendar" | "cloud" | "contacts" | "files" | "mail" | undefined;
|
|
6184
|
+
introduction?: string | undefined;
|
|
6185
|
+
capabilities?: {
|
|
6186
|
+
title: string;
|
|
6187
|
+
description: string;
|
|
6188
|
+
}[] | undefined;
|
|
6189
|
+
permissionSummary?: string | undefined;
|
|
6190
|
+
scopeLabels?: Record<string, {
|
|
6191
|
+
label: string;
|
|
6192
|
+
description: string;
|
|
6193
|
+
}> | undefined;
|
|
6194
|
+
};
|
|
6195
|
+
export type IntegrationDefinitionSummary = {
|
|
4001
6196
|
id: string;
|
|
4002
6197
|
name: string;
|
|
4003
6198
|
summary: string;
|
|
4004
|
-
family: "google" | "microsoft";
|
|
4005
6199
|
protocol: "openapi";
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
6200
|
+
provider: {
|
|
6201
|
+
id: "google" | "microsoft";
|
|
6202
|
+
domain: string;
|
|
6203
|
+
};
|
|
6204
|
+
authentication: {
|
|
6205
|
+
kind: "oauth2";
|
|
6206
|
+
scopes: string[];
|
|
6207
|
+
};
|
|
6208
|
+
presentation?: IntegrationPresentation | undefined;
|
|
6209
|
+
facets: IntegrationFacetDefinitionSummary[];
|
|
4009
6210
|
};
|
|
4010
|
-
export type
|
|
4011
|
-
|
|
6211
|
+
export type ListIntegrationDefinitionsResponse = {
|
|
6212
|
+
definitions: IntegrationDefinitionSummary[];
|
|
4012
6213
|
};
|
|
4013
|
-
export type
|
|
4014
|
-
kind: "
|
|
4015
|
-
|
|
6214
|
+
export type IntegrationSource = {
|
|
6215
|
+
kind: "definition";
|
|
6216
|
+
definitionId: string;
|
|
4016
6217
|
} | {
|
|
4017
6218
|
kind: "openapi";
|
|
4018
6219
|
url: string;
|
|
@@ -4026,13 +6227,36 @@ export type ApiIntegrationSource = {
|
|
|
4026
6227
|
url: string;
|
|
4027
6228
|
baseUrl?: string | undefined;
|
|
4028
6229
|
};
|
|
6230
|
+
/**
|
|
6231
|
+
* OpenAPI 3.x text (JSON or YAML, at most 8 MiB) sent in the request instead
|
|
6232
|
+
* of a URL. `sourceKey` is your stable identity for the Integration: reuse it
|
|
6233
|
+
* to update the same installation. Server URLs must be absolute or `baseUrl`
|
|
6234
|
+
* given. Calls still obey the deployment network policy, so an API on
|
|
6235
|
+
* localhost or a private address needs a public tunnel unless the operator
|
|
6236
|
+
* enables private targets. Send the same document again on install.
|
|
6237
|
+
*/
|
|
6238
|
+
export type InlineOpenApiDocumentSource = {
|
|
6239
|
+
kind: "openapi_document";
|
|
6240
|
+
sourceKey: string;
|
|
6241
|
+
document: string;
|
|
6242
|
+
baseUrl?: string | undefined;
|
|
6243
|
+
};
|
|
6244
|
+
/** Preview/install input sources. */
|
|
6245
|
+
export type IntegrationSourceInput = IntegrationSource | InlineOpenApiDocumentSource;
|
|
6246
|
+
/** Preview echo: an inline document is reported by digest, never its text. */
|
|
6247
|
+
export type IntegrationSourceProjection = IntegrationSource | {
|
|
6248
|
+
kind: "openapi_document";
|
|
6249
|
+
sourceKey: string;
|
|
6250
|
+
documentSha256: string;
|
|
6251
|
+
baseUrl?: string | undefined;
|
|
6252
|
+
};
|
|
4029
6253
|
export type PreviewApiIntegrationRequest = {
|
|
4030
|
-
source:
|
|
6254
|
+
source: IntegrationSourceInput;
|
|
4031
6255
|
connectionId?: string | undefined;
|
|
4032
6256
|
ownership?: ConnectionOwnership | undefined;
|
|
4033
6257
|
};
|
|
4034
6258
|
export type ApiIntegrationOAuthStartRequest = {
|
|
4035
|
-
|
|
6259
|
+
definitionId: string;
|
|
4036
6260
|
ownership?: ConnectionOwnership | undefined;
|
|
4037
6261
|
connectionId?: string | undefined;
|
|
4038
6262
|
returnPath?: string | undefined;
|
|
@@ -4063,10 +6287,10 @@ export type ApiIntegrationToolPreview = {
|
|
|
4063
6287
|
deprecated: boolean;
|
|
4064
6288
|
};
|
|
4065
6289
|
export type ApiIntegrationPreview = {
|
|
4066
|
-
source:
|
|
4067
|
-
|
|
6290
|
+
source: IntegrationSourceProjection;
|
|
6291
|
+
definitionId: string;
|
|
6292
|
+
definitionProvenance: IntegrationDefinitionProvenance;
|
|
4068
6293
|
protocol: ApiIntegrationProtocol;
|
|
4069
|
-
integrationId: string;
|
|
4070
6294
|
capabilityId: string;
|
|
4071
6295
|
pluginKey: string;
|
|
4072
6296
|
serverId: string;
|
|
@@ -4085,7 +6309,7 @@ export type ApiIntegrationPreview = {
|
|
|
4085
6309
|
warnings: string[];
|
|
4086
6310
|
};
|
|
4087
6311
|
export type InstallApiIntegrationRequest = {
|
|
4088
|
-
source:
|
|
6312
|
+
source: IntegrationSourceInput;
|
|
4089
6313
|
expectedRevisionId: string;
|
|
4090
6314
|
expectedContentSha256: string;
|
|
4091
6315
|
connectionId?: string | undefined;
|
|
@@ -4094,6 +6318,14 @@ export type InstallApiIntegrationRequest = {
|
|
|
4094
6318
|
displayName?: string | undefined;
|
|
4095
6319
|
expectedInstanceVersion?: number | undefined;
|
|
4096
6320
|
allowedTools?: string[] | undefined;
|
|
6321
|
+
/**
|
|
6322
|
+
* Selected tools whose preview `approvalMode` is `"ask"` that should run
|
|
6323
|
+
* without per-call human approval (for example in scheduled or other
|
|
6324
|
+
* unattended sessions). Needs `capabilities:manage`; a curated definition
|
|
6325
|
+
* may forbid exempting specific operations (422). Declarative: omit it and every write tool asks
|
|
6326
|
+
* again. Connector Block and session approval policies still apply.
|
|
6327
|
+
*/
|
|
6328
|
+
autoApprovedTools?: string[] | undefined;
|
|
4097
6329
|
};
|
|
4098
6330
|
export type InstalledApiIntegration = {
|
|
4099
6331
|
capabilityId: string;
|
|
@@ -4125,7 +6357,8 @@ export type ApiIntegrationInstallationSummary = {
|
|
|
4125
6357
|
name: string;
|
|
4126
6358
|
description: string | null;
|
|
4127
6359
|
protocol: ApiIntegrationProtocol;
|
|
4128
|
-
|
|
6360
|
+
definitionId: string;
|
|
6361
|
+
definitionProvenance: IntegrationDefinitionProvenance;
|
|
4129
6362
|
providerDomain: string;
|
|
4130
6363
|
baseUrl: string;
|
|
4131
6364
|
sourceUrl: string | null;
|
|
@@ -4172,7 +6405,7 @@ export type PluginManifestComponent = {
|
|
|
4172
6405
|
} | {
|
|
4173
6406
|
key: string;
|
|
4174
6407
|
kind: "integration";
|
|
4175
|
-
source:
|
|
6408
|
+
source: IntegrationSource;
|
|
4176
6409
|
} | {
|
|
4177
6410
|
key: string;
|
|
4178
6411
|
kind: "mcp";
|
|
@@ -4238,6 +6471,9 @@ export type InstallPluginRequest = {
|
|
|
4238
6471
|
expectedInstallationVersion?: number | undefined;
|
|
4239
6472
|
};
|
|
4240
6473
|
export type InstalledPlugin = {
|
|
6474
|
+
skillPublications?: import("./skills.js").SkillPublicationReceipt[] | undefined;
|
|
6475
|
+
skillWrites?: import("./skills.js").SkillWriteReceipt[] | undefined;
|
|
6476
|
+
skillReleases?: import("./skills.js").SkillSourceReleaseReceipt[] | undefined;
|
|
4241
6477
|
pluginKey: string;
|
|
4242
6478
|
version: string;
|
|
4243
6479
|
pluginId: string;
|
|
@@ -4254,6 +6490,7 @@ export type PluginInstallationSummary = {
|
|
|
4254
6490
|
description: string;
|
|
4255
6491
|
category: string;
|
|
4256
6492
|
tags: string[];
|
|
6493
|
+
logoUrl?: string | null | undefined;
|
|
4257
6494
|
sourceUrl: string | null;
|
|
4258
6495
|
manifestDigest: string;
|
|
4259
6496
|
installationVersion: number;
|
|
@@ -4265,22 +6502,34 @@ export type PluginInstallationSummary = {
|
|
|
4265
6502
|
export type ListInstalledPluginsResponse = {
|
|
4266
6503
|
plugins: PluginInstallationSummary[];
|
|
4267
6504
|
};
|
|
6505
|
+
export type PluginUninstallComponentImpact = {
|
|
6506
|
+
capabilityId: string;
|
|
6507
|
+
kind: "skill" | "integration" | "mcp";
|
|
6508
|
+
retainedByOtherOwners: boolean;
|
|
6509
|
+
name: string;
|
|
6510
|
+
disposition: "removed" | "retained" | "inactive";
|
|
6511
|
+
retentionReasons: Array<"other_owners" | "customized" | "re_scoped" | "registry_unavailable">;
|
|
6512
|
+
remainingOwners: Array<{
|
|
6513
|
+
kind: "direct" | "plugin" | "migration";
|
|
6514
|
+
name: string;
|
|
6515
|
+
}>;
|
|
6516
|
+
skillId?: string | undefined;
|
|
6517
|
+
};
|
|
4268
6518
|
export type PluginUninstallPreview = {
|
|
4269
6519
|
pluginKey: string;
|
|
4270
6520
|
installed: boolean;
|
|
4271
6521
|
version: string | null;
|
|
4272
6522
|
installationVersion: number | null;
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
kind: "skill" | "integration" | "mcp";
|
|
4276
|
-
retainedByOtherOwners: boolean;
|
|
4277
|
-
}>;
|
|
6523
|
+
previewToken?: string | undefined;
|
|
6524
|
+
components: PluginUninstallComponentImpact[];
|
|
4278
6525
|
};
|
|
4279
6526
|
export type UninstallPluginRequest = {
|
|
4280
6527
|
expectedInstallationVersion: number;
|
|
6528
|
+
expectedPreviewToken?: string | undefined;
|
|
4281
6529
|
idempotencyKey: string;
|
|
4282
6530
|
};
|
|
4283
6531
|
export type UninstallPluginResult = {
|
|
6532
|
+
skillReleases?: import("./skills.js").SkillSourceReleaseReceipt[] | undefined;
|
|
4284
6533
|
pluginKey: string;
|
|
4285
6534
|
status: "not_installed" | "uninstalled";
|
|
4286
6535
|
retainedComponents: string[];
|
|
@@ -4296,6 +6545,10 @@ export type GitHubRepository = {
|
|
|
4296
6545
|
defaultBranch: string;
|
|
4297
6546
|
accountLogin: string;
|
|
4298
6547
|
accountType: string | null;
|
|
6548
|
+
/** GitHub's archived flag, when the provider reported it. */
|
|
6549
|
+
archived?: boolean | undefined;
|
|
6550
|
+
/** GitHub's reported size in kilobytes, when reported. Zero means empty. */
|
|
6551
|
+
sizeKb?: number | undefined;
|
|
4299
6552
|
};
|
|
4300
6553
|
export type GitHubRepositoryScope = "all" | "selected";
|
|
4301
6554
|
export type GitHubBindingStatus = "disabled" | "unbound" | "bound";
|
|
@@ -4335,6 +6588,55 @@ export type GitHubAppInfo = {
|
|
|
4335
6588
|
export type GitHubRepositoriesResponse = {
|
|
4336
6589
|
repositories: GitHubRepository[];
|
|
4337
6590
|
};
|
|
6591
|
+
export type GitHubActionPolicyDecision = "allow" | "ask" | "block";
|
|
6592
|
+
export type GitHubActionPolicyEffectiveDecision = GitHubActionPolicyDecision | "mixed";
|
|
6593
|
+
export type GitHubActionPolicyGroup = "routine" | "review" | "merge";
|
|
6594
|
+
export type GitHubActionPolicyActor = {
|
|
6595
|
+
kind: "workspace_app";
|
|
6596
|
+
installationId: number;
|
|
6597
|
+
} | {
|
|
6598
|
+
kind: "personal";
|
|
6599
|
+
connectionId: string;
|
|
6600
|
+
};
|
|
6601
|
+
export type GitHubActionPolicyActorState = GitHubActionPolicyActor & {
|
|
6602
|
+
label: string;
|
|
6603
|
+
groups: Record<GitHubActionPolicyGroup, GitHubActionPolicyEffectiveDecision>;
|
|
6604
|
+
};
|
|
6605
|
+
export type GitHubActionPoliciesResponse = {
|
|
6606
|
+
enabled: boolean;
|
|
6607
|
+
actors: GitHubActionPolicyActorState[];
|
|
6608
|
+
};
|
|
6609
|
+
export type UpdateGitHubActionPolicyRequest = {
|
|
6610
|
+
actor: GitHubActionPolicyActor;
|
|
6611
|
+
group: GitHubActionPolicyGroup;
|
|
6612
|
+
decision: GitHubActionPolicyDecision;
|
|
6613
|
+
};
|
|
6614
|
+
export type VerifyPublicGitHubRepositoryRefRequest = {
|
|
6615
|
+
url: string;
|
|
6616
|
+
ref: string;
|
|
6617
|
+
};
|
|
6618
|
+
export type VerifyPublicGitHubRepositoryRefResponse = {
|
|
6619
|
+
owner: string;
|
|
6620
|
+
name: string;
|
|
6621
|
+
fullName: string;
|
|
6622
|
+
canonicalUrl: string;
|
|
6623
|
+
cloneUrl: string;
|
|
6624
|
+
defaultBranch: string;
|
|
6625
|
+
ref: string;
|
|
6626
|
+
commitSha: string;
|
|
6627
|
+
};
|
|
6628
|
+
export type GitHubRepositoryBranch = {
|
|
6629
|
+
name: string;
|
|
6630
|
+
isDefault: boolean;
|
|
6631
|
+
};
|
|
6632
|
+
export type ListGitHubRepositoryBranchesOptions = {
|
|
6633
|
+
cursor?: number | undefined;
|
|
6634
|
+
limit?: number | undefined;
|
|
6635
|
+
};
|
|
6636
|
+
export type GitHubRepositoryBranchesResponse = {
|
|
6637
|
+
branches: GitHubRepositoryBranch[];
|
|
6638
|
+
nextCursor: number | null;
|
|
6639
|
+
};
|
|
4338
6640
|
export type CreateGitHubAppManifestRequest = {
|
|
4339
6641
|
appName?: string | undefined;
|
|
4340
6642
|
organization?: string | undefined;
|
|
@@ -4405,12 +6707,16 @@ export type InsightsModelUsageRow = {
|
|
|
4405
6707
|
creditUsd: number;
|
|
4406
6708
|
estimatedProviderUsd: number;
|
|
4407
6709
|
estimatedProviderCostKnownCalls: number;
|
|
6710
|
+
equivalentCreditUsd: number;
|
|
6711
|
+
equivalentCreditCostKnownCalls: number;
|
|
4408
6712
|
};
|
|
4409
6713
|
export type InsightsSeriesPoint = {
|
|
4410
6714
|
label: string;
|
|
4411
6715
|
modelCostUsd: number;
|
|
4412
6716
|
estimatedProviderUsd: number;
|
|
4413
6717
|
estimatedProviderCostKnownCalls: number;
|
|
6718
|
+
equivalentCreditUsd: number;
|
|
6719
|
+
equivalentCreditCostKnownCalls: number;
|
|
4414
6720
|
warmSeconds: number;
|
|
4415
6721
|
inputTokens: number;
|
|
4416
6722
|
outputTokens: number;
|
|
@@ -4424,6 +6730,10 @@ export type InsightsSeriesPoint = {
|
|
|
4424
6730
|
cacheHitPct: number;
|
|
4425
6731
|
calls: number;
|
|
4426
6732
|
};
|
|
6733
|
+
export type InsightsScope = {
|
|
6734
|
+
rootSessionId: string | null;
|
|
6735
|
+
sessionId: string | null;
|
|
6736
|
+
};
|
|
4427
6737
|
export type InsightsDepthBucket = {
|
|
4428
6738
|
depth: number;
|
|
4429
6739
|
sessions: number;
|
|
@@ -4439,12 +6749,27 @@ export type InsightsSpendDriver = {
|
|
|
4439
6749
|
creditUsd: number;
|
|
4440
6750
|
estimatedProviderUsd: number;
|
|
4441
6751
|
estimatedProviderCostKnownCalls: number;
|
|
6752
|
+
equivalentCreditUsd: number;
|
|
6753
|
+
equivalentCreditCostKnownCalls: number;
|
|
4442
6754
|
tokens: number;
|
|
4443
6755
|
cacheHitPct: number;
|
|
4444
6756
|
pctOfCreditUsd: number;
|
|
4445
6757
|
pctOfTokens: number;
|
|
4446
6758
|
deltaUsdVsPrior: number;
|
|
4447
6759
|
};
|
|
6760
|
+
export type InsightsProjectRow = {
|
|
6761
|
+
id: string;
|
|
6762
|
+
kind: "project" | "other" | "unfiled" | "unavailable" | "deleted";
|
|
6763
|
+
label: string;
|
|
6764
|
+
projects: number;
|
|
6765
|
+
rootSessions: number;
|
|
6766
|
+
calls: number;
|
|
6767
|
+
creditUsd: number;
|
|
6768
|
+
estimatedProviderUsd: number;
|
|
6769
|
+
estimatedProviderCostKnownCalls: number;
|
|
6770
|
+
tokens: number;
|
|
6771
|
+
cacheHitPct: number | null;
|
|
6772
|
+
};
|
|
4448
6773
|
export type InsightsWarmGroupRow = {
|
|
4449
6774
|
id: string;
|
|
4450
6775
|
groupId: string;
|
|
@@ -4480,6 +6805,8 @@ export type InsightsScheduleRow = {
|
|
|
4480
6805
|
creditUsd: number | null;
|
|
4481
6806
|
estimatedProviderUsd: number | null;
|
|
4482
6807
|
estimatedProviderCostKnownCalls: number | null;
|
|
6808
|
+
equivalentCreditUsd: number | null;
|
|
6809
|
+
equivalentCreditCostKnownCalls: number | null;
|
|
4483
6810
|
tokens: number | null;
|
|
4484
6811
|
cacheHitPct: number | null;
|
|
4485
6812
|
billing: InsightsBillingPath | null;
|
|
@@ -4503,8 +6830,24 @@ export type InsightsModelCallRow = {
|
|
|
4503
6830
|
totalTokens: number | null;
|
|
4504
6831
|
creditUsd: number;
|
|
4505
6832
|
estimatedProviderUsd: number | null;
|
|
6833
|
+
equivalentCreditUsd: number | null;
|
|
4506
6834
|
pricingSource: InsightsPricingSource | null;
|
|
4507
6835
|
};
|
|
6836
|
+
export type ModelContextContributionSource = "workspace_instruction_policy" | "legacy_workspace_instructions" | "preference_registry_descriptor" | "company_profile" | "legacy_memory_v1" | "runtime_skill_catalog";
|
|
6837
|
+
export type InsightsPromptContributionRow = {
|
|
6838
|
+
source: ModelContextContributionSource;
|
|
6839
|
+
items: number;
|
|
6840
|
+
utf8Bytes: number;
|
|
6841
|
+
estimatedTokens: number;
|
|
6842
|
+
calls: number;
|
|
6843
|
+
};
|
|
6844
|
+
export type InsightsPromptContributions = {
|
|
6845
|
+
estimatedTokens: number;
|
|
6846
|
+
utf8Bytes: number;
|
|
6847
|
+
coveredCalls: number;
|
|
6848
|
+
totalCalls: number;
|
|
6849
|
+
sources: InsightsPromptContributionRow[];
|
|
6850
|
+
};
|
|
4508
6851
|
export type WorkspaceInsightsSnapshot = {
|
|
4509
6852
|
range: InsightsRange;
|
|
4510
6853
|
rangeLabel: string;
|
|
@@ -4520,8 +6863,21 @@ export type WorkspaceInsightsSnapshot = {
|
|
|
4520
6863
|
series: InsightsSeriesPoint[];
|
|
4521
6864
|
depth: InsightsDepthBucket[];
|
|
4522
6865
|
drivers: InsightsSpendDriver[];
|
|
6866
|
+
projects: InsightsProjectRow[];
|
|
6867
|
+
privateChats: {
|
|
6868
|
+
ownerKey: string;
|
|
6869
|
+
name: string | null;
|
|
6870
|
+
you: boolean;
|
|
6871
|
+
calls: number;
|
|
6872
|
+
tokens: number;
|
|
6873
|
+
creditUsd: number;
|
|
6874
|
+
estimatedProviderUsd: number;
|
|
6875
|
+
estimatedProviderCostKnownCalls: number;
|
|
6876
|
+
}[];
|
|
6877
|
+
privateChatsTruncated: boolean;
|
|
4523
6878
|
schedules: InsightsScheduleRow[];
|
|
4524
6879
|
recentCalls: InsightsModelCallRow[];
|
|
6880
|
+
promptContributions: InsightsPromptContributions;
|
|
4525
6881
|
warmSeconds: number;
|
|
4526
6882
|
priorWarmSeconds: number;
|
|
4527
6883
|
warmGroups: InsightsWarmGroupRow[];
|
|
@@ -4537,6 +6893,10 @@ export type WorkspaceInsightsSnapshot = {
|
|
|
4537
6893
|
priorEstimatedProviderUsd: number;
|
|
4538
6894
|
estimatedProviderCostKnownCalls: number;
|
|
4539
6895
|
priorEstimatedProviderCostKnownCalls: number;
|
|
6896
|
+
equivalentCreditUsd: number;
|
|
6897
|
+
priorEquivalentCreditUsd: number;
|
|
6898
|
+
equivalentCreditCostKnownCalls: number;
|
|
6899
|
+
priorEquivalentCreditCostKnownCalls: number;
|
|
4540
6900
|
modelCalls: number;
|
|
4541
6901
|
priorInputTokens: number;
|
|
4542
6902
|
priorTotalTokens: number;
|
|
@@ -4555,6 +6915,13 @@ export type WorkspaceInsightsSnapshot = {
|
|
|
4555
6915
|
agentRunsUsed: number;
|
|
4556
6916
|
agentRunCap: number | null;
|
|
4557
6917
|
modelFilterActive: boolean;
|
|
6918
|
+
dataThrough: string | null;
|
|
6919
|
+
cacheHitPct: number;
|
|
6920
|
+
scope: InsightsScope;
|
|
6921
|
+
driverGroups: number;
|
|
6922
|
+
driversTruncated: boolean;
|
|
6923
|
+
facetsTruncated: boolean;
|
|
6924
|
+
recentCallsTruncated: boolean;
|
|
4558
6925
|
};
|
|
4559
6926
|
export type WorkspaceInsightsResponse = {
|
|
4560
6927
|
snapshot: WorkspaceInsightsSnapshot;
|
|
@@ -4566,14 +6933,42 @@ export type BillingEntitlementsResponse = {
|
|
|
4566
6933
|
};
|
|
4567
6934
|
export type CreateCheckoutRequest = {
|
|
4568
6935
|
accountId?: string | undefined;
|
|
4569
|
-
/**
|
|
4570
|
-
|
|
6936
|
+
/**
|
|
6937
|
+
* USD amount with cent precision (server enforces min/max). Required unless
|
|
6938
|
+
* `promotionCode` is given; a fixed-amount USD code then sets the amount.
|
|
6939
|
+
*/
|
|
6940
|
+
amountUsd?: number | undefined;
|
|
6941
|
+
/** A Stripe promotion code to apply up front, as the customer typed it. */
|
|
6942
|
+
promotionCode?: string | undefined;
|
|
4571
6943
|
successUrl?: string | undefined;
|
|
4572
6944
|
cancelUrl?: string | undefined;
|
|
4573
6945
|
};
|
|
4574
6946
|
export type CreateCheckoutResponse = {
|
|
4575
6947
|
checkoutSessionId: string;
|
|
4576
6948
|
url: string;
|
|
6949
|
+
/** The credits this checkout grants once it completes. */
|
|
6950
|
+
amountUsd?: number | undefined;
|
|
6951
|
+
};
|
|
6952
|
+
/** Where one checkout stands, and whether its credits reached the balance. */
|
|
6953
|
+
export type BillingCheckoutStatus = {
|
|
6954
|
+
checkoutSessionId: string;
|
|
6955
|
+
status: "open" | "complete" | "expired";
|
|
6956
|
+
credit: {
|
|
6957
|
+
state: "pending" | "granted";
|
|
6958
|
+
amountMicros: number;
|
|
6959
|
+
currency: "usd";
|
|
6960
|
+
/** True when a coupon covered the whole checkout, so nothing was charged. */
|
|
6961
|
+
free: boolean;
|
|
6962
|
+
};
|
|
6963
|
+
balance: BillingBalance | null;
|
|
6964
|
+
};
|
|
6965
|
+
export type CreateBillingPortalRequest = {
|
|
6966
|
+
accountId?: string | undefined;
|
|
6967
|
+
returnUrl?: string | undefined;
|
|
6968
|
+
};
|
|
6969
|
+
export type CreateBillingPortalResponse = {
|
|
6970
|
+
portalSessionId: string;
|
|
6971
|
+
url: string;
|
|
4577
6972
|
};
|
|
4578
6973
|
export type UserMessageEventInput = {
|
|
4579
6974
|
type: "user.message";
|
|
@@ -4581,21 +6976,44 @@ export type UserMessageEventInput = {
|
|
|
4581
6976
|
payload: {
|
|
4582
6977
|
text: string;
|
|
4583
6978
|
annotations?: SubmittedTimelineAnnotation[] | undefined;
|
|
4584
|
-
|
|
6979
|
+
modelContext?: string | undefined;
|
|
4585
6980
|
resources?: ResourceRef[] | undefined;
|
|
4586
6981
|
model?: string | undefined;
|
|
4587
6982
|
reasoningEffort?: ReasoningEffort | undefined;
|
|
4588
6983
|
latencyMode?: LatencyMode | undefined;
|
|
6984
|
+
controlEtag?: string | undefined;
|
|
6985
|
+
expectedDraftRevision?: number | undefined;
|
|
4589
6986
|
mcpCredentialUpdates?: SessionMcpCredentialUpdateInput[] | undefined;
|
|
6987
|
+
connectionAccounts?: McpConnectionAccountSelection[] | undefined;
|
|
6988
|
+
personalResourceAttachment?: PersonalResourceAttachmentIntent | undefined;
|
|
4590
6989
|
};
|
|
4591
6990
|
};
|
|
6991
|
+
/**
|
|
6992
|
+
* Stable fields of each `session.requiresAction` `payload.approvals[]` entry.
|
|
6993
|
+
* Entries also carry producer-specific compatibility fields (`rawItem` on a
|
|
6994
|
+
* turn's first pause, `raw` on later ones); read only these three. Events
|
|
6995
|
+
* written before these fields existed need `approvalsFromRequiresAction`
|
|
6996
|
+
* from `@opengeni/react` or `approvalIdentifier` from `@opengeni/contracts`.
|
|
6997
|
+
*/
|
|
6998
|
+
export type SessionApprovalRequest = {
|
|
6999
|
+
/** Pass as `sendApprovalDecision({ approvalId })`; this is the tool call id. */
|
|
7000
|
+
id: string;
|
|
7001
|
+
/** Model-visible tool name, for example `crm__update_record`. */
|
|
7002
|
+
name: string;
|
|
7003
|
+
/** Tool arguments as the model produced them (usually a JSON string). */
|
|
7004
|
+
arguments: unknown;
|
|
7005
|
+
[compatibilityField: string]: unknown;
|
|
7006
|
+
};
|
|
4592
7007
|
export type UserApprovalDecisionEventInput = {
|
|
4593
7008
|
type: "user.approvalDecision";
|
|
4594
7009
|
clientEventId?: string | undefined;
|
|
4595
7010
|
payload: {
|
|
7011
|
+
/** `session.requiresAction` `approvals[].id` (the pending tool call id). */
|
|
4596
7012
|
approvalId: string;
|
|
4597
7013
|
decision: "approve" | "reject";
|
|
4598
7014
|
message?: string | undefined;
|
|
7015
|
+
/** Server-owned header rotation applied atomically when the response is accepted. */
|
|
7016
|
+
mcpCredentialUpdates?: SessionMcpCredentialUpdateInput[] | undefined;
|
|
4599
7017
|
};
|
|
4600
7018
|
};
|
|
4601
7019
|
export type UserHumanInputResponseEventInput = {
|
|
@@ -4604,6 +7022,8 @@ export type UserHumanInputResponseEventInput = {
|
|
|
4604
7022
|
payload: {
|
|
4605
7023
|
requestId: string;
|
|
4606
7024
|
response: SubmitHumanInputResponseRequest;
|
|
7025
|
+
/** Server-owned header rotation applied atomically when the response is accepted. */
|
|
7026
|
+
mcpCredentialUpdates?: SessionMcpCredentialUpdateInput[] | undefined;
|
|
4607
7027
|
};
|
|
4608
7028
|
};
|
|
4609
7029
|
/** Control/user events a client may POST to a session's event log. */
|
|
@@ -4628,12 +7048,77 @@ export type MetricSample = {
|
|
|
4628
7048
|
/** The derived dashboard state of a machine (M3 liveness + consent/display
|
|
4629
7049
|
* reasons + the in-flight device-flow). */
|
|
4630
7050
|
export type MachineState = "online" | "reconnecting" | "offline" | "consent_required" | "display_unavailable" | "enrolling";
|
|
4631
|
-
export type MachineKind = "modal" | "selfhosted";
|
|
7051
|
+
export type MachineKind = "docker" | "modal" | "local" | "daytona" | "runloop" | "e2b" | "blaxel" | "cloudflare" | "vercel" | "selfhosted" | "opensandbox";
|
|
7052
|
+
export type MachineConnectionAuthority = {
|
|
7053
|
+
state: "not_applicable" | "unclaimed" | "active" | "expired";
|
|
7054
|
+
generation: number;
|
|
7055
|
+
supersededCount: number;
|
|
7056
|
+
leaseExpiresAt: string | null;
|
|
7057
|
+
duplicateRunnerDeniedCount: number;
|
|
7058
|
+
duplicateRunnerDeniedAt: string | null;
|
|
7059
|
+
};
|
|
7060
|
+
export type MachineRuntimeCapabilities = {
|
|
7061
|
+
exec: boolean;
|
|
7062
|
+
filesystem: boolean;
|
|
7063
|
+
git: boolean;
|
|
7064
|
+
pty: boolean;
|
|
7065
|
+
desktop: boolean;
|
|
7066
|
+
opStream: boolean;
|
|
7067
|
+
browserBridge: boolean;
|
|
7068
|
+
operationResourcePolicy: boolean;
|
|
7069
|
+
operationCpuQuota: boolean;
|
|
7070
|
+
transactionalFsWrite: boolean;
|
|
7071
|
+
};
|
|
7072
|
+
export type MachineUpdateStatus = "requested" | "accepted" | "waiting_for_idle" | "downloading" | "verifying" | "applying" | "restarting" | "succeeded" | "failed";
|
|
7073
|
+
export type MachineUpdateState = {
|
|
7074
|
+
operationId: string;
|
|
7075
|
+
status: MachineUpdateStatus;
|
|
7076
|
+
targetVersion: string;
|
|
7077
|
+
expectedBinarySha256: string | null;
|
|
7078
|
+
errorCode: string | null;
|
|
7079
|
+
retryable: boolean;
|
|
7080
|
+
rolledBack: boolean;
|
|
7081
|
+
requestedAt: string;
|
|
7082
|
+
updatedAt: string;
|
|
7083
|
+
completedAt: string | null;
|
|
7084
|
+
};
|
|
7085
|
+
export type MachineRuntime = {
|
|
7086
|
+
installedVersion: string | null;
|
|
7087
|
+
binarySha256: string | null;
|
|
7088
|
+
updateChannel: "stable" | "beta" | null;
|
|
7089
|
+
desiredVersion: string | null;
|
|
7090
|
+
versionState: "unknown" | "current" | "outdated" | "ahead" | "updating" | "update_failed";
|
|
7091
|
+
/** Required installer bootstrap when a legacy updater cannot safely replace the install. */
|
|
7092
|
+
updateBlockedReason?: string | null | undefined;
|
|
7093
|
+
capabilities: MachineRuntimeCapabilities;
|
|
7094
|
+
update: MachineUpdateState | null;
|
|
7095
|
+
};
|
|
7096
|
+
export type UpdateMachineAgentResponse = {
|
|
7097
|
+
operationId: string;
|
|
7098
|
+
accepted: boolean;
|
|
7099
|
+
targetVersion: string;
|
|
7100
|
+
};
|
|
7101
|
+
export type MachineOperationPolicy = {
|
|
7102
|
+
memoryMaxBytes: number | null;
|
|
7103
|
+
memoryHighBytes: number | null;
|
|
7104
|
+
cpuMaxMillicores: number | null;
|
|
7105
|
+
revision: number;
|
|
7106
|
+
updatedAt: string | null;
|
|
7107
|
+
};
|
|
7108
|
+
export type UpdateMachineOperationPolicyRequest = {
|
|
7109
|
+
memoryMaxBytes: number | null;
|
|
7110
|
+
memoryHighBytes: number | null;
|
|
7111
|
+
/** Omitted preserves the current CPU limit for older/partial clients; null clears. */
|
|
7112
|
+
cpuMaxMillicores?: number | null;
|
|
7113
|
+
expectedRevision: number;
|
|
7114
|
+
};
|
|
4632
7115
|
/** A machine as the Machines dashboard renders it (an enrolled selfhosted machine
|
|
4633
7116
|
* or the session's synthetic Modal group box, `isSessionGroup: true`). */
|
|
4634
7117
|
export type MachineView = {
|
|
4635
7118
|
sandboxId: string;
|
|
4636
7119
|
enrollmentId: string | null;
|
|
7120
|
+
scope: ResourceAuthorityScope;
|
|
7121
|
+
generation: number;
|
|
4637
7122
|
name: string;
|
|
4638
7123
|
kind: MachineKind;
|
|
4639
7124
|
state: MachineState;
|
|
@@ -4652,6 +7137,14 @@ export type MachineView = {
|
|
|
4652
7137
|
allowScreenControl: boolean;
|
|
4653
7138
|
sharedSessionCount: number;
|
|
4654
7139
|
lastSeenAt: string | null;
|
|
7140
|
+
/** Secret-free single-runner authority diagnostics. */
|
|
7141
|
+
connectionAuthority: MachineConnectionAuthority;
|
|
7142
|
+
/** Exact build/update truth. Null means the runner predates runtime Hello
|
|
7143
|
+
* reporting or this is a managed-session group without a connected agent. */
|
|
7144
|
+
runtime: MachineRuntime | null;
|
|
7145
|
+
/** Explicit per-enrollment command memory policy. Null only for managed
|
|
7146
|
+
* session boxes; null limits on a real machine mean unrestricted. */
|
|
7147
|
+
operationPolicy: MachineOperationPolicy | null;
|
|
4655
7148
|
metrics: MetricSample | null;
|
|
4656
7149
|
};
|
|
4657
7150
|
/** GET /v1/workspaces/:ws/machines — the dashboard list + the active-sandbox
|
|
@@ -4706,6 +7199,7 @@ export type SwapActiveSandboxResponse = {
|
|
|
4706
7199
|
};
|
|
4707
7200
|
/** Mirror of `@opengeni/contracts` EnrollmentOs. */
|
|
4708
7201
|
export type EnrollmentOs = "linux" | "macos" | "windows";
|
|
7202
|
+
export type ResourceAuthorityScope = "organization" | "workspace" | "user";
|
|
4709
7203
|
/** POST /v1/enrollments/device/lookup body. */
|
|
4710
7204
|
export type DeviceEnrollmentLookupRequest = {
|
|
4711
7205
|
userCode: string;
|
|
@@ -4729,6 +7223,7 @@ export type DeviceEnrollmentLookupResponse = {
|
|
|
4729
7223
|
export type DeviceEnrollmentApproveRequest = {
|
|
4730
7224
|
userCode: string;
|
|
4731
7225
|
allowScreenControl?: boolean;
|
|
7226
|
+
scope?: ResourceAuthorityScope;
|
|
4732
7227
|
};
|
|
4733
7228
|
/** POST /v1/workspaces/:ws/enrollments/device/approve response. */
|
|
4734
7229
|
export type DeviceEnrollmentApproveResponse = {
|
|
@@ -4785,4 +7280,151 @@ export type EnrollTokenExchangeRequest = {
|
|
|
4785
7280
|
export type EnrollTokenExchangeResponse = {
|
|
4786
7281
|
credentials: EnrollmentCredentials;
|
|
4787
7282
|
};
|
|
4788
|
-
export {
|
|
7283
|
+
export type ModelConnectionAccessPolicy = {
|
|
7284
|
+
allowedModels: string[] | null;
|
|
7285
|
+
allowedWorkspaces: string[] | null;
|
|
7286
|
+
allowPersonalWorkspaces: boolean;
|
|
7287
|
+
version: number;
|
|
7288
|
+
};
|
|
7289
|
+
export type ModelConnectionAccessResponse = {
|
|
7290
|
+
policy: ModelConnectionAccessPolicy;
|
|
7291
|
+
models: Array<{
|
|
7292
|
+
id: string;
|
|
7293
|
+
label: string;
|
|
7294
|
+
}>;
|
|
7295
|
+
workspaces: Array<{
|
|
7296
|
+
id: string;
|
|
7297
|
+
name: string;
|
|
7298
|
+
}>;
|
|
7299
|
+
personalWorkspacesSupported: boolean;
|
|
7300
|
+
};
|
|
7301
|
+
export type ConnectorToolPermission = "allow" | "ask" | "block";
|
|
7302
|
+
export type ConnectorToolPermissionEntry = {
|
|
7303
|
+
name: string;
|
|
7304
|
+
title?: string | undefined;
|
|
7305
|
+
description?: string | undefined;
|
|
7306
|
+
group: "read" | "write" | "other";
|
|
7307
|
+
permission: ConnectorToolPermission;
|
|
7308
|
+
inherited: boolean;
|
|
7309
|
+
approvalRequired: boolean;
|
|
7310
|
+
};
|
|
7311
|
+
export type ConnectorToolPermissionsResponse = {
|
|
7312
|
+
connectionId: string;
|
|
7313
|
+
serverId: string;
|
|
7314
|
+
defaultPermission: ConnectorToolPermission | null;
|
|
7315
|
+
tools: ConnectorToolPermissionEntry[];
|
|
7316
|
+
discoveryError: string | null;
|
|
7317
|
+
canManage: boolean;
|
|
7318
|
+
};
|
|
7319
|
+
export type UpdateConnectorToolPermissionsRequest = {
|
|
7320
|
+
connectionId: string;
|
|
7321
|
+
permission: ConnectorToolPermission;
|
|
7322
|
+
} & ({
|
|
7323
|
+
target: "default";
|
|
7324
|
+
} | {
|
|
7325
|
+
target: "tools";
|
|
7326
|
+
toolNames: string[];
|
|
7327
|
+
});
|
|
7328
|
+
/** Agent capability ids (see `@opengeni/contracts` agent-config). */
|
|
7329
|
+
export type AgentCapabilityId = "webSearch" | "humanInput" | "skills" | "goals" | "subagents" | "knowledge" | "schedules" | "artifacts" | "browser" | "media" | "workspaceFiles" | "workspaceConnectors" | "workspaceAdmin";
|
|
7330
|
+
/** `read` reads installed Skills; `manage` also changes them. */
|
|
7331
|
+
export type AgentSkillsCapability = "read" | "manage" | false;
|
|
7332
|
+
export type AgentCapabilityToggles = {
|
|
7333
|
+
webSearch?: boolean | undefined;
|
|
7334
|
+
humanInput?: boolean | undefined;
|
|
7335
|
+
skills?: AgentSkillsCapability | undefined;
|
|
7336
|
+
goals?: boolean | undefined;
|
|
7337
|
+
subagents?: boolean | undefined;
|
|
7338
|
+
knowledge?: boolean | undefined;
|
|
7339
|
+
schedules?: boolean | undefined;
|
|
7340
|
+
artifacts?: boolean | undefined;
|
|
7341
|
+
browser?: boolean | undefined;
|
|
7342
|
+
media?: boolean | undefined;
|
|
7343
|
+
workspaceFiles?: boolean | undefined;
|
|
7344
|
+
workspaceConnectors?: boolean | undefined;
|
|
7345
|
+
workspaceAdmin?: boolean | undefined;
|
|
7346
|
+
};
|
|
7347
|
+
/**
|
|
7348
|
+
* `"all"`: everything this workspace offers (today's behavior). `"none"`: the
|
|
7349
|
+
* session's own tools plus essentials. An object starts from one and toggles.
|
|
7350
|
+
*/
|
|
7351
|
+
export type AgentCapabilities = "all" | "none" | ({
|
|
7352
|
+
from: "all" | "none";
|
|
7353
|
+
} & AgentCapabilityToggles);
|
|
7354
|
+
export type AgentRenderer = "opengeni" | "markdown";
|
|
7355
|
+
export type AgentConfigRequest = {
|
|
7356
|
+
capabilities?: AgentCapabilities | undefined;
|
|
7357
|
+
/** Replaces only OpenGeni's identity lines (max 8,000 chars); null = default identity. */
|
|
7358
|
+
identity?: string | null | undefined;
|
|
7359
|
+
/** Alias of the session `instructions` field. */
|
|
7360
|
+
instructions?: string | undefined;
|
|
7361
|
+
renderer?: AgentRenderer | undefined;
|
|
7362
|
+
};
|
|
7363
|
+
export type WorkspaceAgentDefaults = {
|
|
7364
|
+
capabilities?: AgentCapabilities | undefined;
|
|
7365
|
+
identity?: string | null | undefined;
|
|
7366
|
+
renderer?: AgentRenderer | undefined;
|
|
7367
|
+
};
|
|
7368
|
+
export type ResolvedAgentCapabilities = {
|
|
7369
|
+
webSearch: boolean;
|
|
7370
|
+
humanInput: boolean;
|
|
7371
|
+
skills: AgentSkillsCapability;
|
|
7372
|
+
goals: boolean;
|
|
7373
|
+
subagents: boolean;
|
|
7374
|
+
knowledge: boolean;
|
|
7375
|
+
schedules: boolean;
|
|
7376
|
+
artifacts: boolean;
|
|
7377
|
+
browser: boolean;
|
|
7378
|
+
media: boolean;
|
|
7379
|
+
workspaceFiles: boolean;
|
|
7380
|
+
workspaceConnectors: boolean;
|
|
7381
|
+
workspaceAdmin: boolean;
|
|
7382
|
+
};
|
|
7383
|
+
export type ResolvedAgentConfig = {
|
|
7384
|
+
version: 1;
|
|
7385
|
+
from: "all" | "none";
|
|
7386
|
+
capabilities: ResolvedAgentCapabilities;
|
|
7387
|
+
/** Capabilities wanted on but not offered by this deployment. */
|
|
7388
|
+
unavailable: AgentCapabilityId[];
|
|
7389
|
+
identity: string | null;
|
|
7390
|
+
renderer: AgentRenderer;
|
|
7391
|
+
source: "request" | "workspace_default" | "deployment_default" | "inherited" | "legacy_conversion";
|
|
7392
|
+
};
|
|
7393
|
+
export type AgentEffectiveTools = {
|
|
7394
|
+
capabilities: ResolvedAgentCapabilities;
|
|
7395
|
+
unavailable: AgentCapabilityId[];
|
|
7396
|
+
/** False until exact runtime media adapters (including credential identity) are resolved. */
|
|
7397
|
+
mediaToolsKnown?: boolean | undefined;
|
|
7398
|
+
tools: Array<{
|
|
7399
|
+
name: string;
|
|
7400
|
+
capability: AgentCapabilityId | "runtime" | "sandbox" | "product";
|
|
7401
|
+
source: "first_party" | "runtime" | "hosted" | "sandbox" | "mcp";
|
|
7402
|
+
visibility?: "upfront" | "search" | undefined;
|
|
7403
|
+
}>;
|
|
7404
|
+
mcpServers: Array<{
|
|
7405
|
+
id: string;
|
|
7406
|
+
capability: AgentCapabilityId | "runtime" | "product";
|
|
7407
|
+
toolsKnown: boolean;
|
|
7408
|
+
}>;
|
|
7409
|
+
};
|
|
7410
|
+
/** `PUT .../sessions/:id/agent`. Omitted agent fields keep their current values. */
|
|
7411
|
+
export type UpdateSessionAgentRequest = {
|
|
7412
|
+
agent: AgentConfigRequest;
|
|
7413
|
+
/** The session's current `toolPolicyVersion` (shared CAS). */
|
|
7414
|
+
expectedVersion: number;
|
|
7415
|
+
};
|
|
7416
|
+
export type ClientAgentConfig = {
|
|
7417
|
+
/** @deprecated Agent configuration is always on; current servers always report `true`. */
|
|
7418
|
+
enabled: boolean;
|
|
7419
|
+
/** @deprecated Omitted `agent` always resolves `{ capabilities: "all" }`; always `true`. */
|
|
7420
|
+
defaultForNewSessions: boolean;
|
|
7421
|
+
capabilities: Array<{
|
|
7422
|
+
id: AgentCapabilityId;
|
|
7423
|
+
available: boolean;
|
|
7424
|
+
reason?: string | undefined;
|
|
7425
|
+
}>;
|
|
7426
|
+
};
|
|
7427
|
+
/** `error.details.code` of a 422 agent-configuration failure. */
|
|
7428
|
+
export type AgentConfigErrorCode = "agent_capability_unavailable" | "agent_config_conflict" | "agent_config_widening"
|
|
7429
|
+
/** Returned only by older servers that predate always-on agent configuration. */
|
|
7430
|
+
| "agent_config_not_enabled";
|