@opengeni/sdk 3.1.0 → 3.1.2
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 +1037 -71
- package/dist/accounts.d.ts +5 -1
- package/dist/accounts.js +13 -1
- package/dist/accounts.js.map +1 -1
- 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/app-links.d.ts +42 -0
- package/dist/app-links.js +66 -0
- package/dist/app-links.js.map +1 -0
- package/dist/artifact-catalog.d.ts +40 -0
- package/dist/artifact-client.d.ts +20 -8
- package/dist/artifacts.d.ts +1 -1
- package/dist/artifacts.js +8 -6
- package/dist/automations.js +8 -2
- package/dist/automations.js.map +1 -1
- package/dist/azure-live-transport.d.ts +32 -0
- package/dist/browser.d.ts +7 -2
- package/dist/browser.js +27 -5
- 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 +1703 -0
- package/dist/chat/index.js.map +1 -0
- package/dist/chat/openai.d.ts +30 -0
- package/dist/chat/opengeni.d.ts +129 -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-4AHR4KGA.js +301 -0
- package/dist/chunk-4AHR4KGA.js.map +1 -0
- package/dist/chunk-6HZGAIUE.js +1665 -0
- package/dist/chunk-6HZGAIUE.js.map +1 -0
- package/dist/chunk-7EWT3PV6.js +368 -0
- package/dist/chunk-7EWT3PV6.js.map +1 -0
- package/dist/{chunk-VYCTL62C.js → chunk-GZQSWAKD.js} +1 -1
- package/dist/chunk-GZQSWAKD.js.map +1 -0
- package/dist/chunk-JXXCTW5W.js +1392 -0
- package/dist/chunk-JXXCTW5W.js.map +1 -0
- package/dist/{chunk-YTAWBDO2.js → chunk-KADZ5PGG.js} +28 -2
- package/dist/chunk-KADZ5PGG.js.map +1 -0
- package/dist/{chunk-YKZME56C.js → chunk-KWADQ227.js} +3 -3
- package/dist/{chunk-YKZME56C.js.map → chunk-KWADQ227.js.map} +1 -1
- package/dist/{chunk-7ZXBPJZP.js → chunk-NEM5N6C6.js} +3902 -1457
- package/dist/chunk-NEM5N6C6.js.map +1 -0
- package/dist/{chunk-GW3EJ2GP.js → chunk-O7KANXC3.js} +86 -13
- package/dist/chunk-O7KANXC3.js.map +1 -0
- package/dist/{chunk-VUQZAB3O.js → chunk-OAKHWFSV.js} +28 -32
- package/dist/chunk-OAKHWFSV.js.map +1 -0
- package/dist/chunk-P7UWKORG.js +561 -0
- package/dist/chunk-P7UWKORG.js.map +1 -0
- package/dist/chunk-QGEIL4TR.js +195 -0
- package/dist/chunk-QGEIL4TR.js.map +1 -0
- package/dist/chunk-RJHCBZF7.js +270 -0
- package/dist/chunk-RJHCBZF7.js.map +1 -0
- package/dist/chunk-S3D75WSQ.js +340 -0
- package/dist/chunk-S3D75WSQ.js.map +1 -0
- package/dist/chunk-UM4ZXXJR.js +9 -0
- package/dist/chunk-UM4ZXXJR.js.map +1 -0
- package/dist/chunk-VPVMLM7Q.js +15 -0
- package/dist/chunk-VPVMLM7Q.js.map +1 -0
- package/dist/{chunk-C2H7HBNP.js → chunk-WVCJRSGJ.js} +119 -14
- package/dist/chunk-WVCJRSGJ.js.map +1 -0
- package/dist/chunk-XA7HVIHI.js +126 -0
- package/dist/chunk-XA7HVIHI.js.map +1 -0
- package/dist/{chunk-TX3EIENU.js → chunk-YDVPI7WT.js} +73 -2
- package/dist/chunk-YDVPI7WT.js.map +1 -0
- package/dist/chunk-YKIHNLWD.js +153 -0
- package/dist/chunk-YKIHNLWD.js.map +1 -0
- package/dist/chunk-ZDUBPV33.js +277 -0
- package/dist/chunk-ZDUBPV33.js.map +1 -0
- package/dist/client.d.ts +1065 -124
- package/dist/codex-realtime-controller.d.ts +13 -0
- package/dist/codex-realtime-controller.js +4 -2
- package/dist/codex-realtime-v3-wire.d.ts +3 -2
- package/dist/codex-realtime.d.ts +5 -1
- package/dist/company-brain.d.ts +1 -11
- package/dist/company-profile.d.ts +13 -0
- package/dist/core.d.ts +7 -2
- package/dist/core.js +25 -6
- package/dist/deprecation.d.ts +47 -0
- package/dist/document-authority-client.d.ts +24 -2
- package/dist/document-authority.js +7 -5
- package/dist/editable-artifacts/index.d.ts +1 -1
- package/dist/editable-artifacts/types.d.ts +12 -2
- package/dist/editable-artifacts.js +19 -3
- package/dist/editable-artifacts.js.map +1 -1
- package/dist/embedding-client.d.ts +129 -0
- package/dist/errors.d.ts +76 -1
- package/dist/feedback.d.ts +23 -0
- package/dist/gateway-realtime-transport.js +1 -1
- 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 +64 -11
- package/dist/index.js +566 -141
- package/dist/index.js.map +1 -1
- package/dist/insights-usage.d.ts +33 -0
- package/dist/insights-usage.js +7 -0
- package/dist/insights-usage.js.map +1 -0
- package/dist/interaction.d.ts +103 -71
- package/dist/interaction.js +4 -2
- package/dist/knowledge.d.ts +7 -0
- package/dist/knowledge.js +20 -0
- package/dist/knowledge.js.map +1 -0
- package/dist/known-tools.d.ts +4 -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 +17 -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/pr-review-client.d.ts +1 -1
- package/dist/pr-review.d.ts +1 -1
- package/dist/pr-review.js.map +1 -1
- package/dist/preference-registry.d.ts +1 -1
- package/dist/prepared-mcp-setup.d.ts +5 -0
- package/dist/proxy.d.ts +13 -11
- package/dist/realtime.d.ts +4 -2
- package/dist/realtime.js +253 -7
- package/dist/realtime.js.map +1 -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 +28 -0
- package/dist/session-proxy.d.ts +334 -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/session-usage-limits.d.ts +10 -0
- package/dist/session-usage-limits.js +43 -0
- package/dist/session-usage-limits.js.map +1 -0
- package/dist/shared-catalog-loader.d.ts +34 -0
- package/dist/site-bridge-host.d.ts +112 -0
- package/dist/site-bridge-host.js +285 -0
- package/dist/site-bridge-host.js.map +1 -0
- package/dist/site-browser-entry.d.ts +1 -0
- package/dist/site-browser-runtime.gen.d.ts +1 -0
- package/dist/site-data.d.ts +178 -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 +17 -0
- package/dist/site-sql.d.ts +31 -0
- package/dist/site-tool-bridge.d.ts +57 -0
- package/dist/site.d.ts +182 -0
- package/dist/site.js +62 -0
- package/dist/site.js.map +1 -0
- package/dist/skills.d.ts +75 -0
- package/dist/sse.d.ts +1 -1
- 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-37DCTCNZ.js +12 -0
- package/dist/tools-37DCTCNZ.js.map +1 -0
- package/dist/tools.d.ts +81 -0
- package/dist/transcription.d.ts +1 -1
- package/dist/types.d.ts +2848 -573
- 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/vault-types.d.ts +236 -0
- package/dist/vaults-api.d.ts +57 -0
- package/dist/workspace-artifacts.d.ts +47 -5
- package/dist/workspace-instruction-policies.d.ts +2 -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-state.d.ts +8 -71
- package/package.json +99 -5
- package/src/accounts.ts +18 -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/app-links.ts +117 -0
- package/src/artifact-catalog.ts +51 -0
- package/src/artifact-client.ts +40 -49
- package/src/artifacts.ts +1 -0
- package/src/automations-client.ts +8 -2
- package/src/azure-live-transport.ts +286 -0
- package/src/browser.ts +37 -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 +88 -0
- package/src/chat/openai.ts +439 -0
- package/src/chat/opengeni.ts +737 -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 +5822 -1847
- package/src/codex-realtime-controller.ts +163 -8
- package/src/codex-realtime-v3-wire.ts +4 -3
- package/src/codex-realtime-v3.ts +12 -3
- package/src/codex-realtime.ts +11 -3
- package/src/company-brain.ts +0 -40
- package/src/company-profile.ts +13 -0
- package/src/core.ts +20 -0
- package/src/deprecation.ts +149 -0
- package/src/document-authority-client.ts +104 -1
- package/src/editable-artifacts/controller.ts +36 -2
- package/src/editable-artifacts/index.ts +1 -0
- package/src/editable-artifacts/types.ts +29 -16
- package/src/embedding-client.ts +519 -0
- package/src/errors.ts +303 -4
- package/src/feedback.ts +20 -0
- package/src/gateway-realtime-transport.ts +3 -3
- package/src/github-repositories.ts +60 -0
- package/src/index.ts +611 -64
- package/src/insights-usage.ts +61 -0
- package/src/interaction.ts +274 -93
- package/src/knowledge.ts +72 -0
- package/src/known-tools.ts +279 -0
- package/src/message-links.ts +178 -0
- package/src/model-context.ts +113 -0
- package/src/model-display.ts +11 -0
- package/src/model-picker-order.ts +6 -0
- package/src/organization-integration-policy.ts +54 -0
- package/src/pr-review-client.ts +1 -1
- package/src/pr-review.ts +1 -1
- package/src/preference-registry.ts +2 -0
- package/src/prepared-mcp-setup.ts +123 -0
- package/src/proxy.ts +23 -12
- package/src/realtime.ts +16 -6
- 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 +68 -0
- package/src/session-proxy.ts +2098 -0
- package/src/session-titles.ts +10 -0
- package/src/session-usage-limits.ts +71 -0
- package/src/shared-catalog-loader.ts +169 -0
- package/src/site-bridge-host.ts +422 -0
- package/src/site-browser-entry.ts +6 -0
- package/src/site-browser-runtime.gen.ts +2 -0
- package/src/site-data.ts +372 -0
- package/src/site-document.test.ts +64 -0
- package/src/site-document.ts +18 -0
- package/src/site-http.ts +171 -0
- package/src/site-sql.ts +153 -0
- package/src/site-tool-bridge.ts +401 -0
- package/src/site.ts +867 -0
- package/src/skills.ts +69 -0
- package/src/sse.ts +9 -3
- package/src/stream.ts +33 -10
- package/src/tenant-workspaces.ts +148 -0
- package/src/tool-auth.ts +301 -0
- package/src/tool-display-metadata.ts +27 -0
- package/src/tools.ts +452 -0
- package/src/transcription.ts +3 -0
- package/src/types.ts +3216 -581
- package/src/usage-allowances.ts +189 -0
- package/src/vault-types.ts +293 -0
- package/src/vaults-api.ts +288 -0
- package/src/workspace-artifacts.ts +55 -6
- package/src/workspace-instruction-policies.ts +2 -1
- package/src/workspace-integrations.ts +402 -0
- package/src/workspace-state.ts +8 -82
- package/dist/chunk-7ZXBPJZP.js.map +0 -1
- package/dist/chunk-C2H7HBNP.js.map +0 -1
- package/dist/chunk-C4DJPZRU.js +0 -119
- package/dist/chunk-C4DJPZRU.js.map +0 -1
- package/dist/chunk-GW3EJ2GP.js.map +0 -1
- package/dist/chunk-TX3EIENU.js.map +0 -1
- package/dist/chunk-VUQZAB3O.js.map +0 -1
- package/dist/chunk-VYCTL62C.js.map +0 -1
- package/dist/chunk-YTAWBDO2.js.map +0 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { WorkspaceTranscriptionPolicy } from "./transcription.js";
|
|
2
|
+
import type { SessionUsageLimit } from "@opengeni/contracts/session-usage-limits";
|
|
3
|
+
export type { SessionUsageLimit, SessionUsageLimitHistory, SessionUsageLimitReachedRefusal, SessionUsageLimitStatus, SetSessionUsageLimitRequest, } from "@opengeni/contracts/session-usage-limits";
|
|
4
|
+
export type { InsightsUsageRange, InsightsUsageGroupBy, InsightsUsagePayer, InsightsUsageSource, InsightsUsageTokens, InsightsUsageClassMicros, InsightsUsageMeasures, InsightsUsageScope, InsightsUsageGroup, InsightsUsageSeriesPoint, InsightsUsageFacets, InsightsUsageResponse, InsightsCall, InsightsCallsResponse, InsightsUsageWindowOptions, WorkspaceInsightsUsageOptions, OrganizationInsightsUsageOptions, WorkspaceInsightsCallsOptions, OrganizationInsightsCallsOptions, InsightsCallsScope, } from "./insights-usage.js";
|
|
5
|
+
export type { ClaudeSubscriptionOAuthStartResponse, ClaudeSubscriptionOAuthCompleteRequest, ClaudeSubscriptionOAuthCompleteResponse, } from "@opengeni/contracts";
|
|
6
|
+
export type { SessionMessageSearchRequest, SessionMessageSearchMatch, SessionMessageSearchResponse, SessionMessagePreview, SessionMessagePreviewReference, } from "./session-message-search.js";
|
|
7
|
+
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" | "builtin:opengeni-secrets";
|
|
2
8
|
export type CodexRealtimeWebrtcVersion = "v3";
|
|
3
9
|
export type CodexRealtimeVoice = "juniper" | "maple" | "spruce" | "ember" | "vale" | "breeze" | "arbor" | "sol" | "cove";
|
|
4
10
|
export type CodexRealtimeWebrtcRequest = {
|
|
@@ -18,7 +24,7 @@ export type CodexRealtimeWebrtcRequest = {
|
|
|
18
24
|
export type CodexRealtimeWebrtcResponse = {
|
|
19
25
|
sdp: string;
|
|
20
26
|
version: CodexRealtimeWebrtcVersion;
|
|
21
|
-
model: "gpt-live-1-boulder-alpha";
|
|
27
|
+
model: "gpt-live-1-boulder-alpha" | "opengeni-azure/gpt-live-1";
|
|
22
28
|
connectionId: string;
|
|
23
29
|
connectionEpoch: number;
|
|
24
30
|
startupFenceSequence: number;
|
|
@@ -51,6 +57,125 @@ export type GatewayRealtimeConnectResponse = {
|
|
|
51
57
|
instructions: string;
|
|
52
58
|
replay: false;
|
|
53
59
|
};
|
|
60
|
+
export type ToolGatewayIdentity = {
|
|
61
|
+
serverId: string;
|
|
62
|
+
toolName: string;
|
|
63
|
+
};
|
|
64
|
+
export type ToolGatewayCatalogEntry = {
|
|
65
|
+
identity: ToolGatewayIdentity;
|
|
66
|
+
modelName: string;
|
|
67
|
+
codemodePath: string[];
|
|
68
|
+
title?: string | undefined;
|
|
69
|
+
description?: string | undefined;
|
|
70
|
+
inputSchema: Record<string, unknown>;
|
|
71
|
+
outputSchema?: Record<string, unknown> | undefined;
|
|
72
|
+
annotations?: Record<string, unknown> | undefined;
|
|
73
|
+
icons?: Array<Record<string, unknown>> | undefined;
|
|
74
|
+
source: "opengeni" | "files" | "docs" | "mcp" | "codex_apps" | "interaction";
|
|
75
|
+
approval: "none" | "human" | "policy";
|
|
76
|
+
};
|
|
77
|
+
export type ToolGatewayCatalog = {
|
|
78
|
+
version: 1;
|
|
79
|
+
accountId: string;
|
|
80
|
+
workspaceId: string;
|
|
81
|
+
generation: number;
|
|
82
|
+
digest: string;
|
|
83
|
+
createdAt: string;
|
|
84
|
+
entries: ToolGatewayCatalogEntry[];
|
|
85
|
+
};
|
|
86
|
+
export type ToolGatewayResult = {
|
|
87
|
+
content: Array<{
|
|
88
|
+
type: string;
|
|
89
|
+
[key: string]: unknown;
|
|
90
|
+
}>;
|
|
91
|
+
structuredContent?: Record<string, unknown> | undefined;
|
|
92
|
+
isError?: boolean | undefined;
|
|
93
|
+
_meta?: Record<string, unknown> | undefined;
|
|
94
|
+
[key: string]: unknown;
|
|
95
|
+
};
|
|
96
|
+
export type ToolGatewayCallRequest = {
|
|
97
|
+
operationId?: string | undefined;
|
|
98
|
+
catalogDigest: string;
|
|
99
|
+
identity: ToolGatewayIdentity;
|
|
100
|
+
arguments: Record<string, unknown>;
|
|
101
|
+
siteArtifactId?: string | undefined;
|
|
102
|
+
siteVersionId?: string | undefined;
|
|
103
|
+
approvalToken?: string | undefined;
|
|
104
|
+
};
|
|
105
|
+
export type ToolGatewayApprovalRequest = {
|
|
106
|
+
operationId: string;
|
|
107
|
+
catalogDigest: string;
|
|
108
|
+
identity: ToolGatewayIdentity;
|
|
109
|
+
arguments: Record<string, unknown>;
|
|
110
|
+
};
|
|
111
|
+
export type ToolGatewayApprovalResponse = {
|
|
112
|
+
operationId: string;
|
|
113
|
+
catalogDigest: string;
|
|
114
|
+
identity: ToolGatewayIdentity;
|
|
115
|
+
approvalToken: string;
|
|
116
|
+
expiresAt: string;
|
|
117
|
+
};
|
|
118
|
+
export type ToolGatewayCallResponse = {
|
|
119
|
+
operationId: string;
|
|
120
|
+
catalogDigest: string;
|
|
121
|
+
result: ToolGatewayResult;
|
|
122
|
+
};
|
|
123
|
+
export type ToolGatewayTarget = {
|
|
124
|
+
identity: ToolGatewayIdentity;
|
|
125
|
+
} | {
|
|
126
|
+
path: string[];
|
|
127
|
+
};
|
|
128
|
+
export type ToolGatewayResolvedTool = {
|
|
129
|
+
version: 1;
|
|
130
|
+
definitionDigest: string;
|
|
131
|
+
entry: ToolGatewayCatalogEntry;
|
|
132
|
+
};
|
|
133
|
+
export type ToolGatewayResolveRequest = {
|
|
134
|
+
target: ToolGatewayTarget;
|
|
135
|
+
siteArtifactId?: string;
|
|
136
|
+
siteVersionId?: string;
|
|
137
|
+
};
|
|
138
|
+
export type ToolGatewayInvokeRequest = ToolGatewayResolveRequest & {
|
|
139
|
+
operationId: string;
|
|
140
|
+
arguments: Record<string, unknown>;
|
|
141
|
+
expectedDefinitionDigest?: string;
|
|
142
|
+
approvalToken?: string;
|
|
143
|
+
};
|
|
144
|
+
export type ToolGatewayInvokeResponse = {
|
|
145
|
+
operationId: string;
|
|
146
|
+
tool: ToolGatewayResolvedTool;
|
|
147
|
+
result: ToolGatewayResult;
|
|
148
|
+
};
|
|
149
|
+
export type ToolGatewayTargetApprovalRequest = {
|
|
150
|
+
identity: ToolGatewayIdentity;
|
|
151
|
+
operationId: string;
|
|
152
|
+
arguments: Record<string, unknown>;
|
|
153
|
+
expectedDefinitionDigest: string;
|
|
154
|
+
siteArtifactId?: string;
|
|
155
|
+
siteVersionId?: string;
|
|
156
|
+
};
|
|
157
|
+
export type ToolGatewayTargetApprovalResponse = {
|
|
158
|
+
bindingVersion: 2;
|
|
159
|
+
operationId: string;
|
|
160
|
+
tool: ToolGatewayResolvedTool;
|
|
161
|
+
approvalToken: string;
|
|
162
|
+
expiresAt: string;
|
|
163
|
+
};
|
|
164
|
+
export type ToolGatewayManifestRequest = {
|
|
165
|
+
identities: ToolGatewayIdentity[];
|
|
166
|
+
siteArtifactId?: string;
|
|
167
|
+
siteVersionId?: string;
|
|
168
|
+
};
|
|
169
|
+
export type ToolGatewayManifestResponse = {
|
|
170
|
+
version: 1;
|
|
171
|
+
digest: string;
|
|
172
|
+
tools: ToolGatewayResolvedTool[];
|
|
173
|
+
};
|
|
174
|
+
export type ToolGatewayDeclarationsResponse = {
|
|
175
|
+
catalogDigest: string;
|
|
176
|
+
moduleSpecifier: string;
|
|
177
|
+
source: string;
|
|
178
|
+
};
|
|
54
179
|
export type ActivateCodexRealtimeConnectionRequest = {
|
|
55
180
|
operationId: string;
|
|
56
181
|
browserInstanceId: string;
|
|
@@ -114,7 +239,7 @@ export type SyncSessionRealtimeLedgerResponse = {
|
|
|
114
239
|
}>;
|
|
115
240
|
outbound: SessionRealtimeLedgerEntry[];
|
|
116
241
|
};
|
|
117
|
-
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";
|
|
242
|
+
export type SessionRealtimeModel = "opengeni-azure/gpt-live-1" | "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";
|
|
118
243
|
export type WorkspaceRealtimeModelCatalogItem = {
|
|
119
244
|
id: SessionRealtimeModel;
|
|
120
245
|
label: string;
|
|
@@ -122,6 +247,8 @@ export type WorkspaceRealtimeModelCatalogItem = {
|
|
|
122
247
|
description: string;
|
|
123
248
|
available: boolean;
|
|
124
249
|
unavailableReason: string | null;
|
|
250
|
+
/** Machine-readable reason when unavailable, e.g. `insufficient_credits`. */
|
|
251
|
+
unavailableCode?: string | null | undefined;
|
|
125
252
|
recommended: boolean;
|
|
126
253
|
};
|
|
127
254
|
export type WorkspaceRealtimeModelCatalogResponse = {
|
|
@@ -158,9 +285,16 @@ export type RenewSessionRealtimeRequest = {
|
|
|
158
285
|
export type EndSessionRealtimeRequest = RenewSessionRealtimeRequest & {
|
|
159
286
|
reason: Extract<SessionRealtimeEndReason, "user_stop" | "browser_unload">;
|
|
160
287
|
};
|
|
288
|
+
/** Server instruction to end a live call now (for example, out of credits). */
|
|
289
|
+
export type SessionRealtimeStopInstruction = {
|
|
290
|
+
code: string;
|
|
291
|
+
message: string;
|
|
292
|
+
};
|
|
161
293
|
export type SessionRealtimeMutationResponse = {
|
|
162
294
|
mode: SessionRealtimeMode;
|
|
163
295
|
replay: boolean;
|
|
296
|
+
/** Present on a heartbeat when the server stopped extending the lease. */
|
|
297
|
+
stop?: SessionRealtimeStopInstruction | undefined;
|
|
164
298
|
};
|
|
165
299
|
export type SessionStatus = "queued" | "running" | "idle" | "requires_action" | "recovering" | "waiting_capacity" | "failed" | "cancelled";
|
|
166
300
|
export type SandboxBackend = "docker" | "modal" | "local" | "none" | "daytona" | "runloop" | "e2b" | "blaxel" | "cloudflare" | "vercel" | "selfhosted" | "opensandbox";
|
|
@@ -220,6 +354,7 @@ export type SessionCapabilities = {
|
|
|
220
354
|
codecs: ("h264-mp4" | "vp9-webm")[];
|
|
221
355
|
reason: CapabilityUnavailableReason | null;
|
|
222
356
|
};
|
|
357
|
+
/** @deprecated Use the managed ComputerSession interaction tools. */
|
|
223
358
|
ComputerUse: {
|
|
224
359
|
available: boolean;
|
|
225
360
|
readOnly: boolean;
|
|
@@ -232,6 +367,7 @@ export type TerminalCapability = SessionCapabilities["Terminal"];
|
|
|
232
367
|
export type GitCapability = SessionCapabilities["Git"];
|
|
233
368
|
export type DesktopStreamCapability = SessionCapabilities["DesktopStream"];
|
|
234
369
|
export type RecordingCapability = SessionCapabilities["Recording"];
|
|
370
|
+
/** @deprecated Use the managed ComputerSession interaction tools. */
|
|
235
371
|
export type ComputerUseCapability = SessionCapabilities["ComputerUse"];
|
|
236
372
|
export type StreamUrlRotatedPayload = {
|
|
237
373
|
url: string;
|
|
@@ -309,7 +445,7 @@ export type RepositoryResourceRef = {
|
|
|
309
445
|
/** Exact immutable commit that repository materialization must produce. */
|
|
310
446
|
expectedCommitSha?: string | undefined;
|
|
311
447
|
/**
|
|
312
|
-
* Optional workspace-relative override. When omitted,
|
|
448
|
+
* Optional workspace-relative override. When omitted, Opengeni persists
|
|
313
449
|
* `repos/<encoded-host>/<owner>/<repo>` so equal names on different Git
|
|
314
450
|
* providers do not collide. Explicit paths are portable, traversal-free, and
|
|
315
451
|
* collision-checked case-insensitively before sandbox execution.
|
|
@@ -326,6 +462,12 @@ export type RepositoryResourceRef = {
|
|
|
326
462
|
connectionId?: string | undefined;
|
|
327
463
|
githubInstallationId?: number | undefined;
|
|
328
464
|
githubRepositoryId?: number | undefined;
|
|
465
|
+
/**
|
|
466
|
+
* Best-effort materialization: a failed clone logs a warning and the
|
|
467
|
+
* session continues without this repository instead of failing sandbox
|
|
468
|
+
* setup. Omit it to keep a failed clone fatal.
|
|
469
|
+
*/
|
|
470
|
+
optional?: boolean | undefined;
|
|
329
471
|
};
|
|
330
472
|
/** Value mirror of `@opengeni/contracts`; parity-tested without importing it from ordinary SDK entries. */
|
|
331
473
|
export declare const DEFAULT_FILE_RESOURCE_MOUNT_ROOT: ".opengeni/files";
|
|
@@ -339,15 +481,24 @@ export type ResourceRef = RepositoryResourceRef | FileResourceRef;
|
|
|
339
481
|
export type ToolRef = {
|
|
340
482
|
kind: "mcp";
|
|
341
483
|
id: string;
|
|
484
|
+
/** Narrow this connection's authorized tool names; an empty list allows none. */
|
|
485
|
+
allowedTools?: string[] | undefined;
|
|
486
|
+
/** Skip this server when its connect/tools-list fails instead of failing the turn. */
|
|
342
487
|
optional?: boolean | undefined;
|
|
488
|
+
/**
|
|
489
|
+
* Put this server's tool schemas on the first model request instead of behind
|
|
490
|
+
* `tool_search` progressive discovery. A startup choice only; grants nothing.
|
|
491
|
+
*/
|
|
343
492
|
eager?: boolean | undefined;
|
|
344
493
|
};
|
|
345
494
|
export type SessionToolPolicy = {
|
|
346
495
|
mode: "workspace_default" | "explicit" | "inherited";
|
|
347
496
|
inheritedFromSessionId: string | null;
|
|
497
|
+
excludedMcpServerIds?: string[] | undefined;
|
|
348
498
|
};
|
|
349
499
|
export type UpdateSessionToolPolicyRequest = {
|
|
350
500
|
mode: "workspace_default";
|
|
501
|
+
excludedMcpServerIds?: string[] | undefined;
|
|
351
502
|
expectedVersion: number;
|
|
352
503
|
} | {
|
|
353
504
|
mode: "explicit";
|
|
@@ -377,10 +528,20 @@ export type SessionEffectiveToolPolicy = {
|
|
|
377
528
|
};
|
|
378
529
|
idsTruncated: boolean;
|
|
379
530
|
};
|
|
531
|
+
export type SessionGoalReportRequirement = {
|
|
532
|
+
id: string;
|
|
533
|
+
title: string;
|
|
534
|
+
};
|
|
535
|
+
export type SessionGoalReportDelivery = {
|
|
536
|
+
requirementId: string;
|
|
537
|
+
artifactId: string;
|
|
538
|
+
inspectionReceiptId: string;
|
|
539
|
+
};
|
|
380
540
|
export type GoalSpec = {
|
|
381
541
|
text: string;
|
|
382
542
|
successCriteria?: string | undefined;
|
|
383
543
|
rootConstraints?: string[] | undefined;
|
|
544
|
+
reportRequirements?: SessionGoalReportRequirement[] | undefined;
|
|
384
545
|
maxAutoContinuations?: number | undefined;
|
|
385
546
|
mutationPolicy?: SessionGoalMutationPolicy | undefined;
|
|
386
547
|
};
|
|
@@ -400,6 +561,28 @@ export type SessionMcpCredentialUpdateInput = {
|
|
|
400
561
|
id: string;
|
|
401
562
|
headers: Record<string, string>;
|
|
402
563
|
};
|
|
564
|
+
export type RotateSessionMcpCredentialsRequest = {
|
|
565
|
+
operationKey: string;
|
|
566
|
+
updates: Array<{
|
|
567
|
+
id: string;
|
|
568
|
+
expectedCredentialVersion: number;
|
|
569
|
+
expectedServerUrl: string;
|
|
570
|
+
} & ({
|
|
571
|
+
headers: Record<string, string>;
|
|
572
|
+
} | {
|
|
573
|
+
nativeConnectionId: string;
|
|
574
|
+
replacementServerUrl?: string | undefined;
|
|
575
|
+
})>;
|
|
576
|
+
};
|
|
577
|
+
export type RotateSessionMcpCredentialsReceipt = {
|
|
578
|
+
operationKey: string;
|
|
579
|
+
sessionId: string;
|
|
580
|
+
servers: Array<{
|
|
581
|
+
id: string;
|
|
582
|
+
credentialVersion: number;
|
|
583
|
+
}>;
|
|
584
|
+
appliedAt: string;
|
|
585
|
+
};
|
|
403
586
|
export type SessionMcpApprovalPolicy = boolean | string[];
|
|
404
587
|
export type SessionMcpServerMetadata = {
|
|
405
588
|
id: string;
|
|
@@ -414,9 +597,14 @@ export type UpdateSessionMcpApprovalPolicyRequest = {
|
|
|
414
597
|
requireApproval: SessionMcpApprovalPolicy;
|
|
415
598
|
};
|
|
416
599
|
export type UpdateSessionMcpApprovalPolicyResponse = {
|
|
417
|
-
server:
|
|
600
|
+
server: SessionMcpApprovalPolicyTarget;
|
|
418
601
|
effectiveFrom: "next_attempt";
|
|
419
602
|
};
|
|
603
|
+
export type SessionMcpApprovalPolicyTarget = SessionMcpServerMetadata | {
|
|
604
|
+
id: string;
|
|
605
|
+
source: "workspace";
|
|
606
|
+
requireApproval: SessionMcpApprovalPolicy;
|
|
607
|
+
};
|
|
420
608
|
export type ConnectionKind = "oauth2" | "api_key" | "app_install" | "delegated";
|
|
421
609
|
export type ConnectionStatus = "active" | "needs_reauth" | "revoked" | "error";
|
|
422
610
|
export type UserResourceDelegation = {
|
|
@@ -433,13 +621,21 @@ export type UserResourceDelegation = {
|
|
|
433
621
|
grantGeneration: number;
|
|
434
622
|
resourceVersionId?: string | null | undefined;
|
|
435
623
|
};
|
|
436
|
-
export type
|
|
624
|
+
export type McpConnectionAccountSelection = {
|
|
437
625
|
serverId: string;
|
|
438
626
|
connectionId: string;
|
|
439
|
-
userDelegation: UserResourceDelegation;
|
|
440
627
|
};
|
|
441
628
|
export type McpServerConnectionRef = {
|
|
442
629
|
connectionId?: string | undefined;
|
|
630
|
+
accountSelection?: "all_eligible" | undefined;
|
|
631
|
+
authoritySource?: "host" | undefined;
|
|
632
|
+
/** accepted_turn is configuration-only; each accepted owner must select a grant. */
|
|
633
|
+
hostBinding?: {
|
|
634
|
+
bindingId: string;
|
|
635
|
+
generation: number;
|
|
636
|
+
} | {
|
|
637
|
+
selection: "accepted_turn";
|
|
638
|
+
} | undefined;
|
|
443
639
|
provider?: string | undefined;
|
|
444
640
|
providerDomain: string;
|
|
445
641
|
kind?: ConnectionKind | undefined;
|
|
@@ -461,6 +657,7 @@ export type McpPersonalConnectionDelegation = {
|
|
|
461
657
|
export type McpPersonalConnectionSummary = Pick<McpPersonalConnectionDelegation, "serverId" | "providerDomain">;
|
|
462
658
|
export type ConnectionMetadata = {
|
|
463
659
|
id: string;
|
|
660
|
+
authorityId?: string | undefined;
|
|
464
661
|
accountId: string;
|
|
465
662
|
workspaceId: string;
|
|
466
663
|
subjectId: string | null;
|
|
@@ -481,17 +678,63 @@ export type ConnectionMetadata = {
|
|
|
481
678
|
createdAt: string;
|
|
482
679
|
updatedAt: string;
|
|
483
680
|
};
|
|
484
|
-
|
|
681
|
+
/** Where a brokered credential is written on each outbound provider request. */
|
|
682
|
+
export type ConnectionCredentialPlacement = {
|
|
683
|
+
carrier: "header" | "query" | "cookie";
|
|
684
|
+
name: string;
|
|
685
|
+
value: string;
|
|
686
|
+
/** Prepended to `value`, for example `"Bearer "` or `"Token "`. */
|
|
687
|
+
prefix?: string | undefined;
|
|
688
|
+
};
|
|
689
|
+
/**
|
|
690
|
+
* Write-only secret for a brokered `api_key` Connection (API Integrations and
|
|
691
|
+
* MCP servers). The broker never infers a location: use exact `headers`, or
|
|
692
|
+
* `placements` when the provider expects a query parameter or cookie (API
|
|
693
|
+
* Integrations only) or a prefixed value. Match the carrier/name reported by
|
|
694
|
+
* `previewApiIntegration().auth`. A bare `{ apiKey }` is rejected with 422.
|
|
695
|
+
*
|
|
696
|
+
* @example { headers: { Authorization: "Token abc123" } }
|
|
697
|
+
* @example { placements: [{ carrier: "header", name: "X-Api-Key", value: "abc123" }] }
|
|
698
|
+
*/
|
|
699
|
+
export type ApiKeyConnectionCredential = {
|
|
700
|
+
headers: Record<string, string>;
|
|
701
|
+
placements?: never;
|
|
702
|
+
} | {
|
|
703
|
+
placements: ConnectionCredentialPlacement[];
|
|
704
|
+
headers?: never;
|
|
705
|
+
};
|
|
706
|
+
type CreateConnectionRequestBase = {
|
|
485
707
|
providerDomain: string;
|
|
486
|
-
kind: ConnectionKind;
|
|
487
708
|
ownership?: ConnectionOwnership | undefined;
|
|
488
709
|
/** @deprecated use ownership */
|
|
489
710
|
subjectId?: string | null | undefined;
|
|
490
|
-
credential: Record<string, unknown>;
|
|
491
711
|
grantedScopes?: string[] | undefined;
|
|
492
712
|
expiresAt?: string | null | undefined;
|
|
493
|
-
|
|
713
|
+
operationId?: string | undefined;
|
|
714
|
+
/** Direct OpenAI/Azure keys only: verify the provider/model before saving. */
|
|
715
|
+
verifyModelAccess?: boolean | undefined;
|
|
494
716
|
};
|
|
717
|
+
export type CreateConnectionRequest = CreateConnectionRequestBase & ({
|
|
718
|
+
kind: "api_key";
|
|
719
|
+
credential: ApiKeyConnectionCredential;
|
|
720
|
+
metadata?: Record<string, unknown> | undefined;
|
|
721
|
+
} | {
|
|
722
|
+
/**
|
|
723
|
+
* Workspace model-provider key lane (Vercel AI Gateway / OpenRouter),
|
|
724
|
+
* selected by `metadata.credentialRole`; not usable by integrations.
|
|
725
|
+
*/
|
|
726
|
+
kind: "api_key";
|
|
727
|
+
credential: {
|
|
728
|
+
apiKey: string;
|
|
729
|
+
};
|
|
730
|
+
metadata: {
|
|
731
|
+
credentialRole: string;
|
|
732
|
+
} & Record<string, unknown>;
|
|
733
|
+
} | {
|
|
734
|
+
kind: Exclude<ConnectionKind, "api_key">;
|
|
735
|
+
credential: Record<string, unknown>;
|
|
736
|
+
metadata?: Record<string, unknown> | undefined;
|
|
737
|
+
});
|
|
495
738
|
export type PersonalGitHubConnectionMetadata = {
|
|
496
739
|
credentialRole: "opengeni_github_personal";
|
|
497
740
|
providerFamily: "github";
|
|
@@ -585,9 +828,20 @@ export type VerifyPersonalGitHubRepositorySelectionsRequest = {
|
|
|
585
828
|
idempotencyKey: string;
|
|
586
829
|
};
|
|
587
830
|
export type OpenGeniSlackBotInstallRequest = {
|
|
588
|
-
/** Existing
|
|
831
|
+
/** Existing Opengeni Slack bot connection to reinstall in place. */
|
|
589
832
|
connectionId?: string | undefined;
|
|
590
833
|
};
|
|
834
|
+
export type AvailableOpenGeniSlackBots = {
|
|
835
|
+
connections: ConnectionMetadata[];
|
|
836
|
+
organizationSharedConnectionIds: string[];
|
|
837
|
+
};
|
|
838
|
+
export type UpdateOpenGeniSlackBotOrganizationAccess = {
|
|
839
|
+
enabled: boolean;
|
|
840
|
+
};
|
|
841
|
+
export type OpenGeniSlackBotOrganizationAccess = {
|
|
842
|
+
enabled: boolean;
|
|
843
|
+
generation: number;
|
|
844
|
+
};
|
|
591
845
|
export type FikenInstallRequest = {
|
|
592
846
|
apiToken: string;
|
|
593
847
|
defaultCompanySlug?: string | undefined;
|
|
@@ -595,6 +849,7 @@ export type FikenInstallRequest = {
|
|
|
595
849
|
connectionId?: string | undefined;
|
|
596
850
|
};
|
|
597
851
|
export type FikenOAuthStartRequest = {
|
|
852
|
+
returnPath?: string | undefined;
|
|
598
853
|
/** Existing Fiken connection to re-authorize in place (reconnect). */
|
|
599
854
|
connectionId?: string | undefined;
|
|
600
855
|
};
|
|
@@ -620,7 +875,7 @@ export type SlackInstallationBinding = {
|
|
|
620
875
|
slackTeamName: string;
|
|
621
876
|
botId: string;
|
|
622
877
|
botUserId: string;
|
|
623
|
-
botDisplayName: "OpenGeni" | "OpenGeni Staging";
|
|
878
|
+
botDisplayName: "Opengeni" | "Opengeni Staging" | "OpenGeni" | "OpenGeni Staging";
|
|
624
879
|
state: SlackInstallationBindingState;
|
|
625
880
|
quarantineReason: string | null;
|
|
626
881
|
version: number;
|
|
@@ -838,6 +1093,8 @@ export type UpdateConnectionRequest = {
|
|
|
838
1093
|
grantedScopes?: string[] | undefined;
|
|
839
1094
|
expiresAt?: string | null | undefined;
|
|
840
1095
|
metadata?: Record<string, unknown> | undefined;
|
|
1096
|
+
expectedVersion?: number | undefined;
|
|
1097
|
+
operationId?: string | undefined;
|
|
841
1098
|
};
|
|
842
1099
|
export type ConnectionResponse = {
|
|
843
1100
|
connection: ConnectionMetadata;
|
|
@@ -852,7 +1109,12 @@ export type OAuthStartRequest = {
|
|
|
852
1109
|
resource?: string | undefined;
|
|
853
1110
|
requestedScopes?: string[] | undefined;
|
|
854
1111
|
returnPath?: string | undefined;
|
|
1112
|
+
/** Exact trusted-host destination; requires verified external-user mode. */
|
|
1113
|
+
returnUrl?: string | undefined;
|
|
855
1114
|
connectionId?: string | undefined;
|
|
1115
|
+
/** Sign in a further account instead of refreshing your existing active one.
|
|
1116
|
+
* Never combined with connectionId. */
|
|
1117
|
+
newAccount?: true | undefined;
|
|
856
1118
|
ownership?: ConnectionOwnership | undefined;
|
|
857
1119
|
oauthClient?: {
|
|
858
1120
|
clientId: string;
|
|
@@ -902,11 +1164,11 @@ export type ServiceTurnInitiator = TurnInitiator & {
|
|
|
902
1164
|
kind: "service";
|
|
903
1165
|
};
|
|
904
1166
|
export type TurnInitiatorContext = Record<string, unknown>;
|
|
905
|
-
/** Bounded host provenance;
|
|
1167
|
+
/** Bounded host provenance; Opengeni-owned lineage keys are reserved. */
|
|
906
1168
|
export type ServiceTurnInitiatorContext = TurnInitiatorContext;
|
|
907
1169
|
export type IntegrationClientMetadata = {
|
|
908
1170
|
client_id: string;
|
|
909
|
-
client_name: "OpenGeni";
|
|
1171
|
+
client_name: "Opengeni" | "OpenGeni";
|
|
910
1172
|
redirect_uris: string[];
|
|
911
1173
|
token_endpoint_auth_method: "none";
|
|
912
1174
|
grant_types: Array<"authorization_code" | "refresh_token">;
|
|
@@ -917,6 +1179,11 @@ export type SessionTenancyCreateCapabilities = {
|
|
|
917
1179
|
activated: boolean;
|
|
918
1180
|
canCreatePrivate: boolean;
|
|
919
1181
|
reason: "available" | "not_activated" | "managed_session_required" | "unavailable";
|
|
1182
|
+
/**
|
|
1183
|
+
* Who sees a new chat or schedule unless the person picks otherwise. Absent
|
|
1184
|
+
* from older servers, which means "workspace".
|
|
1185
|
+
*/
|
|
1186
|
+
defaultVisibility?: SessionVisibility;
|
|
920
1187
|
};
|
|
921
1188
|
export type SessionTenancyPublicProjection = {
|
|
922
1189
|
visibility: SessionVisibility;
|
|
@@ -932,6 +1199,38 @@ export type UpdateSessionVisibilityRequest = {
|
|
|
932
1199
|
visibility: SessionVisibility;
|
|
933
1200
|
expectedAuthorityEpoch: number;
|
|
934
1201
|
idempotencyKey: string;
|
|
1202
|
+
/**
|
|
1203
|
+
* "Make private anyway": stop the chat's work in progress (the running or
|
|
1204
|
+
* parked response, queued messages, an active goal) as part of the change.
|
|
1205
|
+
* Without it such work refuses the change with reason `active_work`.
|
|
1206
|
+
*/
|
|
1207
|
+
stopActiveWork?: boolean;
|
|
1208
|
+
};
|
|
1209
|
+
/** What still refuses a visibility change after the chat's own work stops. */
|
|
1210
|
+
export type SessionTenancyBlocker = "nonterminal_turn" | "nonterminal_attempt" | "unsettled_interruption" | "pending_system_update" | "pending_human_input" | "pending_tool_receipt" | "run_state" | "active_goal" | "capacity_waiter" | "active_realtime" | "active_scheduled_task" | "workspace_mutation_admission" | "retained_process" | "active_sandbox_access" | "shared_sandbox_group";
|
|
1211
|
+
/**
|
|
1212
|
+
* What a change to Only me stops or removes when `stopActiveWork` is sent:
|
|
1213
|
+
* the chat's visible work and anything that carries another person's access.
|
|
1214
|
+
*/
|
|
1215
|
+
export type SessionVisibilityWork = {
|
|
1216
|
+
runningTurnCount: number;
|
|
1217
|
+
queuedTurnCount: number;
|
|
1218
|
+
activeGoal: boolean;
|
|
1219
|
+
/** A voice session is live in the chat. */
|
|
1220
|
+
liveVoice: boolean;
|
|
1221
|
+
/** Pending updates that carry another person's access. */
|
|
1222
|
+
otherPeoplePendingUpdateCount: number;
|
|
1223
|
+
/** Account choices for the chat that only another person may use. */
|
|
1224
|
+
otherPeopleAccountChoiceCount: number;
|
|
1225
|
+
};
|
|
1226
|
+
export type SessionVisibilityChangePreview = {
|
|
1227
|
+
visibility: SessionVisibility;
|
|
1228
|
+
targetVisibility: SessionVisibility;
|
|
1229
|
+
authorityEpoch: number;
|
|
1230
|
+
/** Nothing else refuses the change; an empty value means it just happens. */
|
|
1231
|
+
work: SessionVisibilityWork;
|
|
1232
|
+
/** @deprecated Always `null`: nothing refuses a change to Only me any more. */
|
|
1233
|
+
blocker: SessionTenancyBlocker | null;
|
|
935
1234
|
};
|
|
936
1235
|
export type UpdateSessionVisibilityResponse = {
|
|
937
1236
|
operationId: string;
|
|
@@ -948,7 +1247,6 @@ export type ForkSessionRequest = {
|
|
|
948
1247
|
visibility: SessionVisibility;
|
|
949
1248
|
workspaceSharedAcknowledged: boolean;
|
|
950
1249
|
rigId?: string | null | undefined;
|
|
951
|
-
variableSetIds?: string[] | undefined;
|
|
952
1250
|
};
|
|
953
1251
|
export type ForkSessionResponse = {
|
|
954
1252
|
operationId: string;
|
|
@@ -962,16 +1260,36 @@ export type ForkSessionResponse = {
|
|
|
962
1260
|
replay: boolean;
|
|
963
1261
|
};
|
|
964
1262
|
export type SessionBackgroundCommandActivity = {
|
|
1263
|
+
unavailableCount?: number | undefined;
|
|
965
1264
|
state: "running" | "stopping";
|
|
966
1265
|
count: number;
|
|
967
1266
|
};
|
|
1267
|
+
/** Stored reconciliation checkpoints, not a live provider probe or native ACK. */
|
|
1268
|
+
export type SessionBackgroundCommandReconciliation = {
|
|
1269
|
+
lastOutcome: string | null;
|
|
1270
|
+
attempts: number;
|
|
1271
|
+
dueAt: string;
|
|
1272
|
+
claimedAt: string | null;
|
|
1273
|
+
terminalProof: {
|
|
1274
|
+
outcome: "exited";
|
|
1275
|
+
exitCode: number;
|
|
1276
|
+
observedAt: string;
|
|
1277
|
+
} | {
|
|
1278
|
+
outcome: "lost";
|
|
1279
|
+
exitCode: null;
|
|
1280
|
+
observedAt: string;
|
|
1281
|
+
} | null;
|
|
1282
|
+
};
|
|
968
1283
|
export type SessionBackgroundCommand = {
|
|
1284
|
+
observationStatus?: "unavailable" | undefined;
|
|
1285
|
+
reconciliation?: SessionBackgroundCommandReconciliation | undefined;
|
|
969
1286
|
id: string;
|
|
970
1287
|
workspaceId: string;
|
|
971
1288
|
sessionId: string;
|
|
972
1289
|
provider: "managed" | "connected_machine";
|
|
973
1290
|
state: "running" | "stopping" | "exited" | "lost";
|
|
974
1291
|
commandPreview: string;
|
|
1292
|
+
commandText?: string | undefined;
|
|
975
1293
|
cancelRequestedAt: string | null;
|
|
976
1294
|
exitCode: number | null;
|
|
977
1295
|
settlementReason: string | null;
|
|
@@ -986,12 +1304,36 @@ export type CancelSessionBackgroundCommandResult = {
|
|
|
986
1304
|
command: SessionBackgroundCommand;
|
|
987
1305
|
accepted: boolean;
|
|
988
1306
|
};
|
|
1307
|
+
/** Why the runtime refused to start a session's next turn. */
|
|
1308
|
+
export type SessionAdmissionBlock = {
|
|
1309
|
+
reason: "database_claim_rejected" | "initiator_membership_required" | "personal_resource_grant_required";
|
|
1310
|
+
sqlState: string | null;
|
|
1311
|
+
retryPolicy: "explicit_recheck";
|
|
1312
|
+
blockedAt: string;
|
|
1313
|
+
};
|
|
989
1314
|
export type Session = {
|
|
1315
|
+
/** Detail-only dispatch evidence; delivery does not prove turn execution. */
|
|
1316
|
+
dispatchWait?: {
|
|
1317
|
+
state: "pending" | "acknowledged" | "unavailable";
|
|
1318
|
+
attempts: number;
|
|
1319
|
+
nextAttemptAt: string | null;
|
|
1320
|
+
lastError: string | null;
|
|
1321
|
+
} | null | undefined;
|
|
1322
|
+
/** Detail-only failure evidence through lastSequence; independent of timeline paging. */
|
|
1323
|
+
failureDiagnostics?: {
|
|
1324
|
+
eventId: string;
|
|
1325
|
+
sequence: number;
|
|
1326
|
+
turnId: string | null;
|
|
1327
|
+
occurredAt: string;
|
|
1328
|
+
payload: unknown;
|
|
1329
|
+
} | null | undefined;
|
|
1330
|
+
bundledSkillIds?: BundledSkillId[] | undefined;
|
|
990
1331
|
id: string;
|
|
991
1332
|
workspaceId: string;
|
|
992
1333
|
accountId: string;
|
|
993
1334
|
status: SessionStatus;
|
|
994
1335
|
backgroundCommandActivity?: SessionBackgroundCommandActivity | undefined;
|
|
1336
|
+
hasSchedules?: boolean | undefined;
|
|
995
1337
|
initialMessage: string;
|
|
996
1338
|
title: string | null;
|
|
997
1339
|
titleSource: "user" | "agent" | null;
|
|
@@ -1020,10 +1362,11 @@ export type Session = {
|
|
|
1020
1362
|
activeEpoch: number;
|
|
1021
1363
|
/** Explicit connected-machine project root; null uses the agent launch root. */
|
|
1022
1364
|
workingDir: string | null;
|
|
1023
|
-
/**
|
|
1365
|
+
/** @deprecated Variable Sets were replaced by vaults; inert legacy selection. Use `vaultPolicy`. */
|
|
1024
1366
|
variableSetIds?: string[] | undefined;
|
|
1367
|
+
/** @deprecated Variable Sets were replaced by vaults; inert legacy selection. */
|
|
1025
1368
|
variableSetId: string | null;
|
|
1026
|
-
/** @deprecated
|
|
1369
|
+
/** @deprecated Variable Sets were replaced by vaults; inert legacy selection. */
|
|
1027
1370
|
environmentId: string | null;
|
|
1028
1371
|
rigId: string | null;
|
|
1029
1372
|
rigVersionId: string | null;
|
|
@@ -1031,10 +1374,24 @@ export type Session = {
|
|
|
1031
1374
|
channelId: string | null;
|
|
1032
1375
|
firstPartyMcpPermissions: string[] | null;
|
|
1033
1376
|
firstPartyMcpTools: FirstPartyMcpToolName[];
|
|
1377
|
+
/**
|
|
1378
|
+
* Frozen agent configuration; null for sessions created without one (legacy
|
|
1379
|
+
* behavior). Omitted by older servers.
|
|
1380
|
+
*/
|
|
1381
|
+
agent?: ResolvedAgentConfig | null | undefined;
|
|
1382
|
+
/** Capability-level view of what a configured session can use; null for legacy. */
|
|
1383
|
+
effectiveTools?: AgentEffectiveTools | null | undefined;
|
|
1034
1384
|
mcpServers: SessionMcpServerMetadata[];
|
|
1385
|
+
mcpApprovalPolicies?: Record<string, SessionMcpApprovalPolicy> | undefined;
|
|
1035
1386
|
parentSessionId: string | null;
|
|
1036
1387
|
/** Immutable server-authored nested-agent lineage and policy snapshot. */
|
|
1037
1388
|
rootSessionId: string;
|
|
1389
|
+
/**
|
|
1390
|
+
* The task root's usage limit and recorded API-equivalent model usage, on
|
|
1391
|
+
* detail reads and create responses. Omitted by older servers and list
|
|
1392
|
+
* reads: omission never means "no limit".
|
|
1393
|
+
*/
|
|
1394
|
+
usageLimit?: SessionUsageLimit | undefined;
|
|
1038
1395
|
nestedAgentDepth: number;
|
|
1039
1396
|
maxNestedAgentDepthOverride: number | null;
|
|
1040
1397
|
effectiveMaxNestedAgentDepth: number;
|
|
@@ -1047,16 +1404,32 @@ export type Session = {
|
|
|
1047
1404
|
queueHeadPosition: number;
|
|
1048
1405
|
queueTailPosition: number;
|
|
1049
1406
|
effectiveControl: EffectiveSessionControl;
|
|
1407
|
+
/** Current durable input wait; an elapsed deadline does not prove a new turn started. */
|
|
1408
|
+
inputWait?: {
|
|
1409
|
+
deadlineAt: string;
|
|
1410
|
+
reason: string;
|
|
1411
|
+
} | null | undefined;
|
|
1050
1412
|
lastSequence: number;
|
|
1051
1413
|
/** Multi-account Codex (P1): the account this session is pinned to (null ⇒ follow workspace active). */
|
|
1052
1414
|
codexPinnedCredentialId?: string | null;
|
|
1053
1415
|
/** Multi-account Codex (P1): the account the most recent turn ran on (the "Running on:" indicator). */
|
|
1054
1416
|
codexLastCredentialId?: string | null;
|
|
1417
|
+
/** Accepted current-turn account, separate from future session preferences. */
|
|
1418
|
+
codexCurrentSelection?: {
|
|
1419
|
+
credentialId: string | null;
|
|
1420
|
+
waiting: boolean;
|
|
1421
|
+
} | null | undefined;
|
|
1055
1422
|
/**
|
|
1056
1423
|
* Frozen at create. `remote_v2` ⇒ Codex remote compaction + Codex-only model
|
|
1057
1424
|
* admission; `portable` ⇒ plaintext compaction and free provider switching.
|
|
1058
1425
|
*/
|
|
1059
1426
|
codexCompactionMode: "remote_v2" | "portable";
|
|
1427
|
+
/**
|
|
1428
|
+
* The `code_search` decision frozen at create. A turn gets the tool only when
|
|
1429
|
+
* this is true, the deployment still offers it, the workspace is not Off, and
|
|
1430
|
+
* the turn has POSIX compute.
|
|
1431
|
+
*/
|
|
1432
|
+
codeSearchEnabled?: boolean;
|
|
1060
1433
|
/** Personal (authenticated subject) workspace pin state, never workspace-global. */
|
|
1061
1434
|
pinned?: boolean;
|
|
1062
1435
|
/** Stable pin ordering key; null when this subject has not pinned the session. */
|
|
@@ -1072,6 +1445,20 @@ export type Session = {
|
|
|
1072
1445
|
/** Personal archive state. */
|
|
1073
1446
|
archived?: boolean;
|
|
1074
1447
|
archivedAt?: string | null;
|
|
1448
|
+
/**
|
|
1449
|
+
* Read-only imported timeline, independent of personal archive/restore state.
|
|
1450
|
+
* Never model-facing conversation history.
|
|
1451
|
+
*/
|
|
1452
|
+
importedArchive?: {
|
|
1453
|
+
importId: string;
|
|
1454
|
+
importedAt: string;
|
|
1455
|
+
readOnly: true;
|
|
1456
|
+
} | undefined;
|
|
1457
|
+
/**
|
|
1458
|
+
* Idle-session archive state and keep-live exemption, workspace-wide and
|
|
1459
|
+
* independent of the personal `archived` flag. Absent on older servers.
|
|
1460
|
+
*/
|
|
1461
|
+
retention?: SessionRetention | undefined;
|
|
1075
1462
|
/** Optimistic archive-state revision. */
|
|
1076
1463
|
archiveVersion?: number;
|
|
1077
1464
|
/** Server-authoritative descendant counts populated by session-list reads. */
|
|
@@ -1080,10 +1467,12 @@ export type Session = {
|
|
|
1080
1467
|
totalDescendants: number;
|
|
1081
1468
|
runningDescendants: number;
|
|
1082
1469
|
queuedDescendants: number;
|
|
1470
|
+
waitingDescendants?: number | undefined;
|
|
1083
1471
|
attentionDescendants: number;
|
|
1084
1472
|
pausedDescendants: number;
|
|
1085
1473
|
failedDescendants: number;
|
|
1086
1474
|
unreadDescendants?: number | undefined;
|
|
1475
|
+
unreadFailedDescendants?: number | undefined;
|
|
1087
1476
|
activelyWorkingDescendants?: number | undefined;
|
|
1088
1477
|
/**
|
|
1089
1478
|
* Earliest moment one of the counted `attentionDescendants` entered
|
|
@@ -1098,6 +1487,18 @@ export type Session = {
|
|
|
1098
1487
|
* list and lineage reads for `requires_action` sessions; null otherwise.
|
|
1099
1488
|
*/
|
|
1100
1489
|
requiresActionSince?: string | null | undefined;
|
|
1490
|
+
/**
|
|
1491
|
+
* Set while the runtime refuses to start this session's next turn (status
|
|
1492
|
+
* `requires_action`, but nothing is asked of a person). Accepted work is
|
|
1493
|
+
* kept; Resume or a new Send/Steer rechecks admission. Absent on older servers.
|
|
1494
|
+
*/
|
|
1495
|
+
admissionBlock?: SessionAdmissionBlock | null | undefined;
|
|
1496
|
+
/** Agent access scope; absent on servers before the agent-access release. */
|
|
1497
|
+
agentAccess?: SessionAgentAccess | undefined;
|
|
1498
|
+
/** Opaque end-user label; null when the session carries none. */
|
|
1499
|
+
scopeSubjectId?: SessionScopeSubjectId | null | undefined;
|
|
1500
|
+
/** Memory scope; absent on servers before the agent-access release. */
|
|
1501
|
+
memoryScope?: SessionMemoryScope | undefined;
|
|
1101
1502
|
createdAt: string;
|
|
1102
1503
|
updatedAt: string;
|
|
1103
1504
|
};
|
|
@@ -1106,11 +1507,64 @@ export type CreateSessionResponse = Session & {
|
|
|
1106
1507
|
initialTurnId: string | null;
|
|
1107
1508
|
};
|
|
1108
1509
|
export type SessionSummary = Session;
|
|
1109
|
-
/**
|
|
1510
|
+
/**
|
|
1511
|
+
* Compact list-only record, excluding prompts and execution configuration
|
|
1512
|
+
* other than the model and reasoning effort shown with a row.
|
|
1513
|
+
*/
|
|
1514
|
+
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" | "retention" | "archiveVersion" | "treeStats" | "requiresActionSince" | "admissionBlock" | "createdAt" | "updatedAt"> & {
|
|
1515
|
+
displayTitle: string;
|
|
1516
|
+
renameSeed: string;
|
|
1517
|
+
scheduledTaskId: string | null;
|
|
1518
|
+
siteOrigin: {
|
|
1519
|
+
siteId: string;
|
|
1520
|
+
title: string;
|
|
1521
|
+
} | null;
|
|
1522
|
+
/**
|
|
1523
|
+
* Display-only: the latest started turn's model, or the session's stored
|
|
1524
|
+
* default when an explicit settings change is newer or no turn has started.
|
|
1525
|
+
* Rows the SDK projects from an older server's full pages carry the
|
|
1526
|
+
* session's effective model instead. `getSession` remains authoritative for
|
|
1527
|
+
* the composer default.
|
|
1528
|
+
*/
|
|
1529
|
+
model?: string | undefined;
|
|
1530
|
+
reasoningEffort?: ReasoningEffort | undefined;
|
|
1531
|
+
};
|
|
1532
|
+
export type SessionListEntryResponse = Omit<SessionListResponse, "pinned" | "sessions"> & {
|
|
1533
|
+
projection: "summary";
|
|
1534
|
+
pinned: SessionListEntry[];
|
|
1535
|
+
sessions: SessionListEntry[];
|
|
1536
|
+
};
|
|
1537
|
+
/** Complete metadata for authorized roots and ordinary project trees. */
|
|
1538
|
+
export type SessionListTotals = {
|
|
1539
|
+
needsYouCount: number;
|
|
1540
|
+
groups: Array<{
|
|
1541
|
+
channelId: string | null;
|
|
1542
|
+
total: number;
|
|
1543
|
+
attention: number;
|
|
1544
|
+
attentionSince: string | null;
|
|
1545
|
+
failed: number;
|
|
1546
|
+
active: number;
|
|
1547
|
+
queued: number;
|
|
1548
|
+
unread: number;
|
|
1549
|
+
activeWork: number;
|
|
1550
|
+
}>;
|
|
1551
|
+
};
|
|
1110
1552
|
export type SessionListResponse = {
|
|
1553
|
+
totals?: SessionListTotals;
|
|
1554
|
+
needsYouOnly?: true;
|
|
1555
|
+
/** Receipt for the read-only (archived idle session) filter. */
|
|
1556
|
+
contentArchivedOnly?: true;
|
|
1111
1557
|
pinned: Session[];
|
|
1112
1558
|
/** True when the server omitted older pins from its bounded pinned section. */
|
|
1113
1559
|
pinnedTruncated?: boolean;
|
|
1560
|
+
/** Present only when the server recognized and applied additive list filters. */
|
|
1561
|
+
filtersApplied?: true;
|
|
1562
|
+
/** Effective server ordering. Name: ASCII-space trim, ASCII case fold,
|
|
1563
|
+
* UTF-8 byte order, id ASC. Date keys and id ties are DESC. */
|
|
1564
|
+
sortBy?: "updatedAt" | "createdAt" | "name" | "archivedAt";
|
|
1565
|
+
archiveStatus?: "active" | "archived" | "all";
|
|
1566
|
+
/** Server-resolved Site origin filter, when requested. */
|
|
1567
|
+
originSiteId?: string;
|
|
1114
1568
|
sessions: Session[];
|
|
1115
1569
|
nextCursor: string | null;
|
|
1116
1570
|
};
|
|
@@ -1210,6 +1664,21 @@ export type UpdateSessionAttentionRequest = {
|
|
|
1210
1664
|
activelyWorking?: boolean;
|
|
1211
1665
|
expectedVersion?: number;
|
|
1212
1666
|
};
|
|
1667
|
+
/**
|
|
1668
|
+
* Idle-session archive state. `archive` is null while the session is live; an
|
|
1669
|
+
* archived session keeps its readable timeline but is read-only.
|
|
1670
|
+
*/
|
|
1671
|
+
export type SessionRetention = {
|
|
1672
|
+
/** Never archive this session, however long it stays idle. */
|
|
1673
|
+
keepLive: boolean;
|
|
1674
|
+
archive: {
|
|
1675
|
+
state: "archiving" | "archived";
|
|
1676
|
+
archivedAt: string | null;
|
|
1677
|
+
} | null;
|
|
1678
|
+
};
|
|
1679
|
+
export type UpdateSessionRetentionRequest = {
|
|
1680
|
+
keepLive: boolean;
|
|
1681
|
+
};
|
|
1213
1682
|
export type UpdateSessionArchiveRequest = {
|
|
1214
1683
|
archived: boolean;
|
|
1215
1684
|
expectedVersion?: number;
|
|
@@ -1219,6 +1688,7 @@ export type LineageNode = {
|
|
|
1219
1688
|
children: LineageNode[];
|
|
1220
1689
|
};
|
|
1221
1690
|
export type SessionLineageResponse = {
|
|
1691
|
+
sessionHasSchedules?: boolean | undefined;
|
|
1222
1692
|
ancestors: SessionSummary[];
|
|
1223
1693
|
children: LineageNode[];
|
|
1224
1694
|
truncated: boolean;
|
|
@@ -1299,19 +1769,78 @@ export type SessionTurn = {
|
|
|
1299
1769
|
createdAt: string;
|
|
1300
1770
|
updatedAt: string;
|
|
1301
1771
|
};
|
|
1302
|
-
export type HumanInputQuestionKind = "text" | "single_select" | "multi_select";
|
|
1772
|
+
export type HumanInputQuestionKind = "text" | "single_select" | "multi_select" | "secret";
|
|
1773
|
+
/** Options for a generated password (see `@opengeni/contracts` GeneratePasswordSpec). */
|
|
1774
|
+
export type GeneratePasswordSpec = {
|
|
1775
|
+
length?: number | undefined;
|
|
1776
|
+
lowercase?: boolean | undefined;
|
|
1777
|
+
uppercase?: boolean | undefined;
|
|
1778
|
+
digits?: boolean | undefined;
|
|
1779
|
+
symbols?: boolean | undefined;
|
|
1780
|
+
symbolSet?: string | undefined;
|
|
1781
|
+
excludeAmbiguous?: boolean | undefined;
|
|
1782
|
+
requireEachClass?: boolean | undefined;
|
|
1783
|
+
};
|
|
1784
|
+
export type HumanInputSecretSaveTo = "user" | "task" | "workspace";
|
|
1785
|
+
/** A secret question's spec; the value is saved to a vault, never to the response. */
|
|
1786
|
+
export type HumanInputSecretSpec = {
|
|
1787
|
+
item: string;
|
|
1788
|
+
field?: string | undefined;
|
|
1789
|
+
fieldKind?: "concealed" | "totp" | "text" | undefined;
|
|
1790
|
+
itemType?: "login" | "api_key" | "note" | undefined;
|
|
1791
|
+
username?: {
|
|
1792
|
+
prompt: string;
|
|
1793
|
+
value?: string | null | undefined;
|
|
1794
|
+
} | null | undefined;
|
|
1795
|
+
website?: string | null | undefined;
|
|
1796
|
+
looksLike?: string | null | undefined;
|
|
1797
|
+
pattern?: string | null | undefined;
|
|
1798
|
+
saveTo?: HumanInputSecretSaveTo | undefined;
|
|
1799
|
+
vault?: string | null | undefined;
|
|
1800
|
+
allowGenerate?: boolean | undefined;
|
|
1801
|
+
generate?: GeneratePasswordSpec | null | undefined;
|
|
1802
|
+
autocomplete?: "current-password" | "new-password" | "one-time-code" | "off" | undefined;
|
|
1803
|
+
};
|
|
1804
|
+
/** Write-only secret value for one secret question: exactly one of `value` or `generate`. */
|
|
1805
|
+
export type HumanInputSecretAnswer = {
|
|
1806
|
+
questionId: string;
|
|
1807
|
+
value?: string | undefined;
|
|
1808
|
+
generate?: GeneratePasswordSpec | undefined;
|
|
1809
|
+
username?: string | undefined;
|
|
1810
|
+
saveTo: HumanInputSecretSaveTo;
|
|
1811
|
+
vaultId?: string | undefined;
|
|
1812
|
+
};
|
|
1813
|
+
/** What the agent and timeline see for an answered secret question. */
|
|
1814
|
+
export type HumanInputSecretAnswerResult = {
|
|
1815
|
+
reference: string;
|
|
1816
|
+
username: string | null;
|
|
1817
|
+
vaultName: string;
|
|
1818
|
+
itemName: string;
|
|
1819
|
+
saveTo: HumanInputSecretSaveTo;
|
|
1820
|
+
};
|
|
1303
1821
|
export type HumanInputOption = {
|
|
1304
1822
|
id: string;
|
|
1305
1823
|
label: string;
|
|
1306
1824
|
description?: string | null | undefined;
|
|
1307
1825
|
};
|
|
1826
|
+
export type SkillReviewReference = {
|
|
1827
|
+
removalOperationId?: string | undefined;
|
|
1828
|
+
sourceOperationId: string;
|
|
1829
|
+
skillId: string;
|
|
1830
|
+
revisionId: string;
|
|
1831
|
+
expectedRevisionId: string | null;
|
|
1832
|
+
expectedScopeVersion: number;
|
|
1833
|
+
};
|
|
1308
1834
|
export type HumanInputQuestion = {
|
|
1835
|
+
skillReview?: SkillReviewReference | null | undefined;
|
|
1309
1836
|
id: string;
|
|
1310
1837
|
kind: HumanInputQuestionKind;
|
|
1311
1838
|
prompt: string;
|
|
1312
1839
|
label?: string | null | undefined;
|
|
1313
1840
|
helpText?: string | null | undefined;
|
|
1314
1841
|
options: HumanInputOption[];
|
|
1842
|
+
/** Required exactly when `kind` is "secret"; null otherwise. */
|
|
1843
|
+
secret?: HumanInputSecretSpec | null | undefined;
|
|
1315
1844
|
required: boolean;
|
|
1316
1845
|
allowOther: boolean;
|
|
1317
1846
|
validation?: {
|
|
@@ -1323,6 +1852,8 @@ export type HumanInputAnswer = {
|
|
|
1323
1852
|
questionId: string;
|
|
1324
1853
|
values: string[];
|
|
1325
1854
|
other?: string | null | undefined;
|
|
1855
|
+
/** Secret questions: the saved reference, never the value. */
|
|
1856
|
+
secret?: HumanInputSecretAnswerResult | undefined;
|
|
1326
1857
|
};
|
|
1327
1858
|
export type HumanInputResponse = {
|
|
1328
1859
|
outcome: "answered";
|
|
@@ -1333,6 +1864,8 @@ export type HumanInputResponse = {
|
|
|
1333
1864
|
export type SubmitHumanInputResponseRequest = {
|
|
1334
1865
|
outcome: "answered";
|
|
1335
1866
|
answers: HumanInputAnswer[];
|
|
1867
|
+
/** Write-only secret values; never echoed in events or responses. */
|
|
1868
|
+
secretAnswers?: HumanInputSecretAnswer[] | undefined;
|
|
1336
1869
|
} | {
|
|
1337
1870
|
outcome: "skipped";
|
|
1338
1871
|
};
|
|
@@ -1354,10 +1887,10 @@ export type SessionHumanInputRequest = {
|
|
|
1354
1887
|
createdAt: string;
|
|
1355
1888
|
updatedAt: string;
|
|
1356
1889
|
};
|
|
1357
|
-
export declare const SESSION_EVENT_TYPES: readonly ["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.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", "sandbox.command.output.delta", "artifact.created", "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", "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"];
|
|
1890
|
+
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.notification.posted", "session.notification.withdrawn", "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.skills.updated", "session.model_settings.updated", "session.usage_limit.updated", "codex.account.switched", "subscription.account.selected", "subscription.account.switched", "codex.account.selection.changed", "model_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"];
|
|
1358
1891
|
export type KnownSessionEventType = (typeof SESSION_EVENT_TYPES)[number];
|
|
1359
1892
|
/**
|
|
1360
|
-
* Event types the SDK knows about today, kept open so a newer
|
|
1893
|
+
* Event types the SDK knows about today, kept open so a newer Opengeni server
|
|
1361
1894
|
* can introduce event types without breaking older SDK consumers.
|
|
1362
1895
|
*/
|
|
1363
1896
|
export type SessionEventType = KnownSessionEventType | (string & {});
|
|
@@ -1367,6 +1900,8 @@ export type SessionEvent = {
|
|
|
1367
1900
|
sessionId: string;
|
|
1368
1901
|
/** Per-session sequence number: positive, contiguous, strictly increasing. */
|
|
1369
1902
|
sequence: number;
|
|
1903
|
+
/** Server-owned durable high-water mark for a synthetic compact event. */
|
|
1904
|
+
coveredThrough?: number | undefined;
|
|
1370
1905
|
type: SessionEventType;
|
|
1371
1906
|
payload: unknown;
|
|
1372
1907
|
occurredAt: string;
|
|
@@ -1478,11 +2013,17 @@ export type SessionEventPage = {
|
|
|
1478
2013
|
};
|
|
1479
2014
|
export type ToolAuthNeededPayload = {
|
|
1480
2015
|
serverId: string;
|
|
2016
|
+
/** Configured connector for recovery; serverId retains the execution alias. */
|
|
2017
|
+
canonicalServerId?: string | undefined;
|
|
2018
|
+
/** Scope of the exact failed account, not the canonical catalog default. */
|
|
2019
|
+
connectionSubjectScope?: "workspace" | "subject" | undefined;
|
|
1481
2020
|
toolName?: string | null | undefined;
|
|
1482
2021
|
providerDomain: string;
|
|
1483
2022
|
provider?: string | undefined;
|
|
1484
2023
|
connectionId?: string | null | undefined;
|
|
1485
|
-
|
|
2024
|
+
authoritySource?: "host" | undefined;
|
|
2025
|
+
reason: "missing_connection" | "expired" | "insufficient_scope" | "refresh_failed" | "personal_authority_unavailable" | "unsupported_auth" | "resource_scope_unavailable" | "designated_credential_unavailable";
|
|
2026
|
+
hostReason?: "missing_connection" | "expired" | "insufficient_scope" | "refresh_failed" | "personal_authority_unavailable" | "unsupported_auth" | "resource_scope_unavailable" | "designated_credential_unavailable" | undefined;
|
|
1486
2027
|
scopes?: string[] | undefined;
|
|
1487
2028
|
resource?: string | undefined;
|
|
1488
2029
|
selectedResources?: Array<{
|
|
@@ -1500,6 +2041,15 @@ export type ToolAuthNeededPayload = {
|
|
|
1500
2041
|
rationale: string;
|
|
1501
2042
|
requiredVariables: string[];
|
|
1502
2043
|
} | undefined;
|
|
2044
|
+
/** Agent suggestion; never a connection or permission grant. */
|
|
2045
|
+
setupRequest?: {
|
|
2046
|
+
kind: "mcp";
|
|
2047
|
+
ownership?: "personal" | "workspace" | undefined;
|
|
2048
|
+
mcpSetup?: import("@opengeni/contracts/prepared-mcp-setup").PreparedMcpSetup | undefined;
|
|
2049
|
+
name: string;
|
|
2050
|
+
endpointUrl: string;
|
|
2051
|
+
rationale: string;
|
|
2052
|
+
} | undefined;
|
|
1503
2053
|
};
|
|
1504
2054
|
export type AgentTextDeltaPayload = {
|
|
1505
2055
|
text: string;
|
|
@@ -1512,6 +2062,11 @@ export type AgentToolCallCreatedPayload = {
|
|
|
1512
2062
|
name: string;
|
|
1513
2063
|
arguments: unknown;
|
|
1514
2064
|
raw?: unknown | undefined;
|
|
2065
|
+
/**
|
|
2066
|
+
* Content-free analytics family: an Opengeni first-party tool name,
|
|
2067
|
+
* `integration:<reviewed domain>`, or `custom`. Absent when unclassified.
|
|
2068
|
+
*/
|
|
2069
|
+
toolFamily?: string | undefined;
|
|
1515
2070
|
};
|
|
1516
2071
|
export type AgentToolCallOutputPayload = {
|
|
1517
2072
|
id: string | null;
|
|
@@ -1545,7 +2100,7 @@ export type CodexFleetDecisionEventPayload = {
|
|
|
1545
2100
|
actual: {
|
|
1546
2101
|
outcome: "selected" | "waiting" | "none";
|
|
1547
2102
|
candidateKey: string | null;
|
|
1548
|
-
reason: "lease_reused" | "pin" | "rotation" | "active" | "all_capped" | "none";
|
|
2103
|
+
reason: "lease_reused" | "pin" | "rotation" | "active" | "all_capped" | "allocator_disabled" | "none";
|
|
1549
2104
|
};
|
|
1550
2105
|
comparison: CodexFleetShadowComparison;
|
|
1551
2106
|
replay: {
|
|
@@ -1665,11 +2220,16 @@ export type FsTreeNode = {
|
|
|
1665
2220
|
truncated: boolean;
|
|
1666
2221
|
};
|
|
1667
2222
|
export type FsEncoding = "utf8" | "base64";
|
|
2223
|
+
export type FileSystemRouteIdentity = {
|
|
2224
|
+
epoch: number;
|
|
2225
|
+
root: string;
|
|
2226
|
+
};
|
|
1668
2227
|
export type FsListRequest = {
|
|
1669
2228
|
path?: string;
|
|
1670
2229
|
depth?: number;
|
|
1671
2230
|
maxEntries?: number;
|
|
1672
2231
|
includeHidden?: boolean;
|
|
2232
|
+
route?: FileSystemRouteIdentity;
|
|
1673
2233
|
};
|
|
1674
2234
|
export type FsListResponse = {
|
|
1675
2235
|
root: FsTreeNode;
|
|
@@ -1684,8 +2244,11 @@ export type FsListBatchResponse = {
|
|
|
1684
2244
|
};
|
|
1685
2245
|
export type FsReadRequest = {
|
|
1686
2246
|
path: string;
|
|
2247
|
+
/** Confine this read to the session's working directory, refusing symlinks. */
|
|
2248
|
+
workspaceOnly?: boolean;
|
|
1687
2249
|
encoding?: FsEncoding;
|
|
1688
2250
|
maxBytes?: number;
|
|
2251
|
+
route?: FileSystemRouteIdentity;
|
|
1689
2252
|
};
|
|
1690
2253
|
export type FsReadResponse = {
|
|
1691
2254
|
path: string;
|
|
@@ -1712,6 +2275,7 @@ export type FsWriteRequest = {
|
|
|
1712
2275
|
content: string;
|
|
1713
2276
|
overwrite?: boolean;
|
|
1714
2277
|
createParents?: boolean;
|
|
2278
|
+
route?: FileSystemRouteIdentity;
|
|
1715
2279
|
};
|
|
1716
2280
|
export type FsWriteResponse = {
|
|
1717
2281
|
path: string;
|
|
@@ -1721,6 +2285,7 @@ export type FsWriteResponse = {
|
|
|
1721
2285
|
export type FsDeleteRequest = {
|
|
1722
2286
|
path: string;
|
|
1723
2287
|
recursive?: boolean;
|
|
2288
|
+
route?: FileSystemRouteIdentity;
|
|
1724
2289
|
};
|
|
1725
2290
|
export type FsDeleteResponse = {
|
|
1726
2291
|
revision: number;
|
|
@@ -1730,6 +2295,7 @@ export type FsMoveRequest = {
|
|
|
1730
2295
|
newPath: string;
|
|
1731
2296
|
overwrite?: boolean;
|
|
1732
2297
|
createParents?: boolean;
|
|
2298
|
+
route?: FileSystemRouteIdentity;
|
|
1733
2299
|
};
|
|
1734
2300
|
export type FsMoveResponse = {
|
|
1735
2301
|
path: string;
|
|
@@ -1739,6 +2305,7 @@ export type FsMoveResponse = {
|
|
|
1739
2305
|
export type FsMkdirRequest = {
|
|
1740
2306
|
path: string;
|
|
1741
2307
|
recursive?: boolean;
|
|
2308
|
+
route?: FileSystemRouteIdentity;
|
|
1742
2309
|
};
|
|
1743
2310
|
export type FsMkdirResponse = {
|
|
1744
2311
|
path: string;
|
|
@@ -2099,18 +2666,45 @@ export type IncidentTelemetryPreflightInput = Omit<IncidentTelemetryPreflight, "
|
|
|
2099
2666
|
requiredVariableNames?: string[] | undefined;
|
|
2100
2667
|
};
|
|
2101
2668
|
export type ScheduledTaskAgentConfig = {
|
|
2669
|
+
/** Agent configuration for every generated session; omitted keeps legacy behavior. */
|
|
2670
|
+
agent?: AgentConfigRequest | undefined;
|
|
2671
|
+
/**
|
|
2672
|
+
* Connector accounts a person pinned for a schedule that starts its own
|
|
2673
|
+
* session. Each pinned pair narrows its connector; every other connector
|
|
2674
|
+
* uses the owner's current accounts at each run.
|
|
2675
|
+
*/
|
|
2676
|
+
pinnedAccounts?: McpConnectionAccountSelection[] | undefined;
|
|
2677
|
+
/** Skip an occurrence instead of running without an unusable pinned account. */
|
|
2678
|
+
pinnedAccountsRequired?: true | undefined;
|
|
2679
|
+
knowledgeSource?: Extract<ScheduledTaskAction, {
|
|
2680
|
+
kind: "knowledge_source_sync";
|
|
2681
|
+
}> | undefined;
|
|
2682
|
+
bundledSkillIds?: BundledSkillId[] | undefined;
|
|
2102
2683
|
prompt: string;
|
|
2103
2684
|
resources: ResourceRef[];
|
|
2104
2685
|
tools: ToolRef[];
|
|
2686
|
+
/**
|
|
2687
|
+
* Present when runs follow the workspace's default connectors (minus the
|
|
2688
|
+
* excluded ones) plus `tools`; absent when runs get exactly `tools`.
|
|
2689
|
+
*/
|
|
2690
|
+
toolPolicy?: ScheduledTaskToolPolicy | undefined;
|
|
2105
2691
|
metadata: Record<string, unknown>;
|
|
2106
2692
|
slackBotConnectionId?: string | undefined;
|
|
2693
|
+
/** Slack channel a person chose for this task's bot posts; requires slackBotConnectionId. */
|
|
2694
|
+
slackBotChannelId?: string | undefined;
|
|
2107
2695
|
model?: string | undefined;
|
|
2108
2696
|
reasoningEffort?: ReasoningEffort | undefined;
|
|
2109
2697
|
sandboxBackend?: SandboxBackend | undefined;
|
|
2698
|
+
machineTarget?: {
|
|
2699
|
+
targetSandboxId: string;
|
|
2700
|
+
workingDir?: string | undefined;
|
|
2701
|
+
} | undefined;
|
|
2110
2702
|
goal?: GoalSpec | undefined;
|
|
2111
2703
|
executionClass?: "incident_telemetry" | undefined;
|
|
2112
2704
|
incidentTelemetryPreflight?: IncidentTelemetryPreflight | undefined;
|
|
2113
2705
|
maxNestedAgentDepth?: number | undefined;
|
|
2706
|
+
/** Seconds a run may wait on a person before the scheduler answers for it. */
|
|
2707
|
+
approvalTimeoutSeconds?: number | undefined;
|
|
2114
2708
|
};
|
|
2115
2709
|
export type ScopedKnowledgeScope = {
|
|
2116
2710
|
kind: "organization";
|
|
@@ -2161,6 +2755,13 @@ export type ScheduledTask = {
|
|
|
2161
2755
|
accountId: string;
|
|
2162
2756
|
workspaceId: string;
|
|
2163
2757
|
name: string;
|
|
2758
|
+
/** Immutable execution owner; null for workspace/service tasks. */
|
|
2759
|
+
ownerSubjectId: string | null;
|
|
2760
|
+
/**
|
|
2761
|
+
* Who can see this schedule. `workspace`: everyone in the workspace.
|
|
2762
|
+
* `private`: only its owner; its runs create Only me chats owned by them.
|
|
2763
|
+
*/
|
|
2764
|
+
visibility: SessionVisibility;
|
|
2164
2765
|
status: ScheduledTaskStatus;
|
|
2165
2766
|
schedule: ScheduledTaskScheduleSpec;
|
|
2166
2767
|
temporalScheduleId: string;
|
|
@@ -2170,25 +2771,155 @@ export type ScheduledTask = {
|
|
|
2170
2771
|
agentConfig: ScheduledTaskAgentConfig;
|
|
2171
2772
|
createdBy?: TurnInitiator | undefined;
|
|
2172
2773
|
createdByContext?: TurnInitiatorContext | undefined;
|
|
2173
|
-
personalConnections?: McpPersonalConnectionSummary[] | undefined;
|
|
2174
2774
|
authorityRevision: number;
|
|
2175
2775
|
executionDigest: string;
|
|
2176
2776
|
targetSessionId: string | null;
|
|
2177
2777
|
reusableSessionId: string | null;
|
|
2778
|
+
/** @deprecated Variable Sets were replaced by vaults; inert legacy selection. Use `vaultPolicy`. */
|
|
2178
2779
|
variableSetId: string | null;
|
|
2179
|
-
/** @deprecated
|
|
2780
|
+
/** @deprecated Variable Sets were replaced by vaults; inert legacy selection. */
|
|
2180
2781
|
environmentId: string | null;
|
|
2181
2782
|
rigId: string | null;
|
|
2783
|
+
/** Vaults every run may resolve secret references from (the task vault is always included). */
|
|
2784
|
+
vaultPolicy?: VaultPolicy | undefined;
|
|
2182
2785
|
metadata: Record<string, unknown>;
|
|
2183
2786
|
createdAt: string;
|
|
2184
2787
|
updatedAt: string;
|
|
2788
|
+
/** Read-only: what `refreshScheduledTaskAccess` would change, for a viewer who can act on it. */
|
|
2789
|
+
policyDrift?: ScheduledTaskPolicyDrift | null | undefined;
|
|
2790
|
+
/** Read-only: which accounts a run would use if it started now, for a viewer who can act on it. */
|
|
2791
|
+
accountPlan?: ScheduledTaskAccountPlan | undefined;
|
|
2792
|
+
/** Read-only: why it paused itself, or why its owner was told its runs keep failing. */
|
|
2793
|
+
blocker?: ScheduledTaskBlocker | undefined;
|
|
2794
|
+
};
|
|
2795
|
+
/**
|
|
2796
|
+
* What blocks a schedule. `paused`: no later run could start until a person
|
|
2797
|
+
* acts, so it paused itself; resume it once the cause is fixed. `notified`:
|
|
2798
|
+
* its scheduled runs kept failing or being skipped and its owner was told
|
|
2799
|
+
* once; it keeps running. `message` says what would unblock it.
|
|
2800
|
+
*/
|
|
2801
|
+
export type ScheduledTaskBlocker = {
|
|
2802
|
+
state: "paused" | "notified";
|
|
2803
|
+
/** Stable machine reason, such as `scheduled_session_paused`; tolerate new ones. */
|
|
2804
|
+
reason: string;
|
|
2805
|
+
message: string;
|
|
2806
|
+
/** The run that showed the blocker (the first of a failing streak). */
|
|
2807
|
+
runId: string;
|
|
2808
|
+
since: string;
|
|
2809
|
+
};
|
|
2810
|
+
/**
|
|
2811
|
+
* What an admin sees of someone else's Only me schedule: that it exists, whose
|
|
2812
|
+
* it is, how often it runs and what it costs. Never its name, prompt, settings
|
|
2813
|
+
* or runs.
|
|
2814
|
+
*/
|
|
2815
|
+
export type PrivateScheduledTaskSummary = {
|
|
2816
|
+
id: string;
|
|
2817
|
+
ownerSubjectId: string;
|
|
2818
|
+
/** The owner's display name or email, when known. */
|
|
2819
|
+
ownerName: string | null;
|
|
2820
|
+
status: ScheduledTaskStatus;
|
|
2821
|
+
schedule: ScheduledTaskScheduleSpec;
|
|
2822
|
+
lastRunAt: string | null;
|
|
2823
|
+
/** Usage of this schedule's runs over the last 30 days. */
|
|
2824
|
+
last30Days: {
|
|
2825
|
+
runs: number;
|
|
2826
|
+
creditUsd: number;
|
|
2827
|
+
estimatedProviderUsd: number;
|
|
2828
|
+
};
|
|
2829
|
+
createdAt: string;
|
|
2830
|
+
};
|
|
2831
|
+
/** One connector named in a scheduled task's access report. */
|
|
2832
|
+
export type ScheduledTaskAccessConnector = {
|
|
2833
|
+
id: string;
|
|
2834
|
+
name: string;
|
|
2835
|
+
};
|
|
2836
|
+
/**
|
|
2837
|
+
* A schedule that follows the workspace's default connectors at each run,
|
|
2838
|
+
* the way a new chat does. Connectors a person turned off stay off.
|
|
2839
|
+
*/
|
|
2840
|
+
export type ScheduledTaskToolPolicy = {
|
|
2841
|
+
mode: "workspace_default";
|
|
2842
|
+
excludedMcpServerIds: string[];
|
|
2843
|
+
};
|
|
2844
|
+
/**
|
|
2845
|
+
* What a scheduled task's saved connectors and Opengeni tools lack compared
|
|
2846
|
+
* with what its owner would get by saving it again now, plus pinned accounts
|
|
2847
|
+
* that can no longer be used.
|
|
2848
|
+
*/
|
|
2849
|
+
export type ScheduledTaskPolicyDrift = {
|
|
2850
|
+
/** Workspace default connectors that new schedules get and this one lacks. */
|
|
2851
|
+
missingConnectors: ScheduledTaskAccessConnector[];
|
|
2852
|
+
/** Connectors this schedule names that this workspace no longer sets up; refresh drops them. */
|
|
2853
|
+
unavailableConnectors: ScheduledTaskAccessConnector[];
|
|
2854
|
+
/** Default Opengeni tools missing from an agent-created task's frozen tools. */
|
|
2855
|
+
missingOpenGeniTools: FirstPartyMcpToolName[];
|
|
2856
|
+
/** Connectors whose pinned account can no longer be used; runs continue without them. */
|
|
2857
|
+
unavailableAccounts: ScheduledTaskAccessConnector[];
|
|
2858
|
+
/** Whether this viewer may run the refresh (a signed-in person, not a key or agent). */
|
|
2859
|
+
canRefresh: boolean;
|
|
2860
|
+
};
|
|
2861
|
+
/** One connector account a scheduled run would act as. */
|
|
2862
|
+
export type ScheduledTaskAccountPlanAccount = {
|
|
2863
|
+
connectionId: string;
|
|
2864
|
+
label: string;
|
|
2865
|
+
/** `personal`: the schedule owner's own account. `shared`: a workspace account. */
|
|
2866
|
+
scope: "personal" | "shared";
|
|
2867
|
+
};
|
|
2868
|
+
export type ScheduledTaskAccountPlanConnector = {
|
|
2869
|
+
id: string;
|
|
2870
|
+
name: string;
|
|
2871
|
+
/** `default`: the owner's current accounts at each run. `pinned`: only the accounts a person chose. */
|
|
2872
|
+
mode: "default" | "pinned";
|
|
2873
|
+
/** Accounts a run would use if it started now; empty when none can be used. */
|
|
2874
|
+
accounts: ScheduledTaskAccountPlanAccount[];
|
|
2875
|
+
/** Pinned accounts that can no longer be used; always empty in `default` mode. */
|
|
2876
|
+
unavailablePins: Array<{
|
|
2877
|
+
connectionId: string;
|
|
2878
|
+
}>;
|
|
2879
|
+
};
|
|
2880
|
+
/**
|
|
2881
|
+
* Which connector accounts a run of this schedule would use if it started
|
|
2882
|
+
* now, resolved at read time from the owner's live connections. Nothing here
|
|
2883
|
+
* is stored.
|
|
2884
|
+
*/
|
|
2885
|
+
export type ScheduledTaskAccountPlan = {
|
|
2886
|
+
connectors: ScheduledTaskAccountPlanConnector[];
|
|
2887
|
+
};
|
|
2888
|
+
/** Re-freeze with the caller's current authority; `executionDigest` is the reviewed head. */
|
|
2889
|
+
export type RefreshScheduledTaskAccessRequest = {
|
|
2890
|
+
executionDigest: string;
|
|
2891
|
+
/** Default connectors and Opengeni tools to keep off; only narrows what the refresh adds. */
|
|
2892
|
+
leaveOut?: {
|
|
2893
|
+
connectors?: string[] | undefined;
|
|
2894
|
+
openGeniTools?: FirstPartyMcpToolName[] | undefined;
|
|
2895
|
+
} | undefined;
|
|
2185
2896
|
};
|
|
2186
2897
|
export type CreateSessionRequest = {
|
|
2898
|
+
/** Omitted: defaults/inheritance; []: no bundled guidance. Children cannot widen. */
|
|
2899
|
+
bundledSkillIds?: BundledSkillId[] | undefined;
|
|
2900
|
+
excludedMcpServerIds?: string[] | undefined;
|
|
2187
2901
|
requestedSessionId?: string | undefined;
|
|
2902
|
+
/**
|
|
2903
|
+
* Optional usage limit for a new root task in USD micros of API-equivalent
|
|
2904
|
+
* model usage (null/omitted: no limit; 0: stop before the first model
|
|
2905
|
+
* request). Person or trusted host only. `OpenGeniClient.createSession`
|
|
2906
|
+
* sends a limited create with `startMode: "standard"`, which servers that
|
|
2907
|
+
* predate usage limits reject before creating or starting anything; it then
|
|
2908
|
+
* throws `OpenGeniSessionUsageLimitUnsupportedError`, as it does for a
|
|
2909
|
+
* response that does not echo the requested limit.
|
|
2910
|
+
*/
|
|
2911
|
+
usageLimitMicros?: number | null | undefined;
|
|
2188
2912
|
visibility?: SessionVisibility | undefined;
|
|
2189
2913
|
initialMessage?: string | undefined;
|
|
2190
|
-
/**
|
|
2191
|
-
|
|
2914
|
+
/** Exempt the new session from the idle-session archive, e.g. for a persistent agent. */
|
|
2915
|
+
keepLive?: boolean | undefined;
|
|
2916
|
+
/**
|
|
2917
|
+
* `realtime` creates an idle session shell so realtime voice can be the
|
|
2918
|
+
* first interaction. `standard` is the explicit default; `createSession`
|
|
2919
|
+
* sends it with a usage limit so servers that predate limits reject the
|
|
2920
|
+
* create instead of starting uncapped work.
|
|
2921
|
+
*/
|
|
2922
|
+
startMode?: "realtime" | "standard" | undefined;
|
|
2192
2923
|
/** Model-visible application context attached to the initial user message; omitted by standard timeline rendering. */
|
|
2193
2924
|
modelContext?: string | undefined;
|
|
2194
2925
|
instructions?: string | undefined;
|
|
@@ -2196,7 +2927,15 @@ export type CreateSessionRequest = {
|
|
|
2196
2927
|
policyRole?: string | undefined;
|
|
2197
2928
|
resources?: ResourceRef[] | undefined;
|
|
2198
2929
|
/** Inline skills fixed onto this session; omitted children inherit them. */
|
|
2199
|
-
skills?:
|
|
2930
|
+
skills?: SessionSkillInput[] | undefined;
|
|
2931
|
+
/** Installed session-selected Skill identities to freeze onto this session at creation. */
|
|
2932
|
+
installedSkillIds?: string[] | undefined;
|
|
2933
|
+
/**
|
|
2934
|
+
* MCP servers to select. Omitted follows the workspace defaults; an explicit
|
|
2935
|
+
* array (including `[]`) is an exact allow-list over workspace/deployment
|
|
2936
|
+
* servers. Servers attached in this request's `mcpServers` are always
|
|
2937
|
+
* selected; list one here only to set `eager`/`optional`.
|
|
2938
|
+
*/
|
|
2200
2939
|
tools?: ToolRef[] | undefined;
|
|
2201
2940
|
metadata?: Record<string, unknown> | undefined;
|
|
2202
2941
|
model?: string | undefined;
|
|
@@ -2205,34 +2944,47 @@ export type CreateSessionRequest = {
|
|
|
2205
2944
|
sandboxBackend?: SandboxBackend | undefined;
|
|
2206
2945
|
targetSandboxId?: string | undefined;
|
|
2207
2946
|
workingDir?: string | undefined;
|
|
2208
|
-
/** Ordered low-to-high precedence; later sets win name collisions. */
|
|
2209
|
-
variableSetIds?: string[] | undefined;
|
|
2210
|
-
variableSetId?: string | undefined;
|
|
2211
|
-
/** @deprecated use variableSetId */
|
|
2212
|
-
environmentId?: string | undefined;
|
|
2213
2947
|
rigId?: string | undefined;
|
|
2214
2948
|
goal?: GoalSpec | undefined;
|
|
2215
2949
|
clientEventId?: string | undefined;
|
|
2216
2950
|
idempotencyKey?: string | undefined;
|
|
2217
2951
|
expectedNewSessionDraftRevision?: number | undefined;
|
|
2952
|
+
agentLearning?: import("@opengeni/contracts").AgentLearningOverrides | undefined;
|
|
2218
2953
|
maxNestedAgentDepth?: number | undefined;
|
|
2219
2954
|
firstPartyMcpPermissions?: string[] | undefined;
|
|
2220
2955
|
firstPartyMcpTools?: FirstPartyMcpToolName[] | undefined;
|
|
2956
|
+
/**
|
|
2957
|
+
* One agent configuration: capabilities, identity, instructions alias and
|
|
2958
|
+
* renderer. Omission keeps today's behavior (a child inherits its parent's).
|
|
2959
|
+
* Children may only narrow. Requires the server's admission switch.
|
|
2960
|
+
*/
|
|
2961
|
+
agent?: AgentConfigRequest | undefined;
|
|
2221
2962
|
mcpServers?: SessionMcpServerInput[] | undefined;
|
|
2963
|
+
mcpApprovalPolicies?: Record<string, SessionMcpApprovalPolicy> | undefined;
|
|
2964
|
+
connectionAccounts?: McpConnectionAccountSelection[] | undefined;
|
|
2222
2965
|
/** Atomically attach the server-derived personal Variable Set/Rig closure to the initial turn. */
|
|
2223
2966
|
personalResourceAttachment?: PersonalResourceAttachmentIntent | undefined;
|
|
2224
2967
|
sandbox?: "shared" | "new" | {
|
|
2225
2968
|
groupId: string;
|
|
2226
2969
|
} | undefined;
|
|
2227
|
-
|
|
2228
|
-
|
|
2970
|
+
agentAccess?: SessionAgentAccess | undefined;
|
|
2971
|
+
/** Opaque end-user label inside the workspace. Not a subject, not authority. */
|
|
2972
|
+
/** Select identity with server-side asUser(), not session creation data. */
|
|
2973
|
+
scopeSubjectId?: never;
|
|
2974
|
+
/** Which Memory the agent reads and where it saves; "user" requires `scopeSubjectId`. */
|
|
2975
|
+
memoryScope?: SessionMemoryScope | undefined;
|
|
2976
|
+
};
|
|
2977
|
+
export type SessionAgentAccess = "session" | "user" | "workspace";
|
|
2978
|
+
export type SessionScopeSubjectId = string;
|
|
2979
|
+
export type SessionMemoryScope = "workspace" | "user" | "off";
|
|
2980
|
+
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", "secrets:use", "mcp_servers:attach", "codemode:call", "goals:manage", "enrollments:read", "enrollments:manage", "rigs:use", "rigs:manage", "artifacts:read", "artifacts:publish"];
|
|
2229
2981
|
export type KnownPermission = (typeof KNOWN_PERMISSIONS)[number];
|
|
2230
2982
|
/**
|
|
2231
|
-
* Permissions the SDK knows about today, kept open so a newer
|
|
2983
|
+
* Permissions the SDK knows about today, kept open so a newer Opengeni server
|
|
2232
2984
|
* can introduce permissions without breaking older SDK consumers.
|
|
2233
2985
|
*/
|
|
2234
2986
|
export type Permission = KnownPermission | (string & {});
|
|
2235
|
-
export type FirstPartyMcpToolName = "set_session_title" | "goal_set" | "goal_update" | "goal_progress" | "
|
|
2987
|
+
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" | "notify_user" | "notification_withdraw" | "inbox_tidy" | "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" | "connected_machine_enable_screen_control" | "project_list" | "project_get" | "project_create" | "project_update" | "project_reorder" | "project_delete" | "session_set_project" | "admin_actions_search" | "admin_action_describe" | "admin_action_call" | "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_message_status" | "session_target_get" | "session_target_set" | "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" | "secret_search" | "secret_save" | "secret_get" | "secret_move" | "secret_delete" | "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" | "site_data_describe" | "site_data_define_collection" | "site_data_query" | "site_data_write" | "site_data_import" | "site_data_export" | "site_data_reset" | "site_files_list" | "site_files_upload" | "site_files_delete" | "site_publication_get" | "site_publication_update" | "site_publication_apply_fix" | "site_hostname_check" | "site_sql_inspect" | "site_sql_enable" | "site_sql_migrate" | "site_sql_define_query" | "site_sql_query" | "site_sql_run" | "site_sql_execute" | "site_sql_export" | "site_sql_import" | "site_sql_reset" | "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";
|
|
2236
2988
|
export type ProductAccessMode = "local" | "configured" | "managed";
|
|
2237
2989
|
export type ModelCapabilitySupportV1 = "supported" | "unsupported" | "unknown";
|
|
2238
2990
|
export type ModelCapabilityStateV1 = {
|
|
@@ -2275,18 +3027,23 @@ export type ModelCredentialSourceV1 = {
|
|
|
2275
3027
|
mechanism: "api_key" | "azure_ad_bearer";
|
|
2276
3028
|
} | {
|
|
2277
3029
|
kind: "connected_subscription";
|
|
2278
|
-
provider: "codex" | "xai";
|
|
3030
|
+
provider: "codex" | "xai" | "claude";
|
|
2279
3031
|
} | {
|
|
2280
3032
|
kind: "workspace_connection";
|
|
2281
3033
|
mechanism: "api_key";
|
|
3034
|
+
} | {
|
|
3035
|
+
kind: "organization_connection";
|
|
3036
|
+
mechanism: "api_key";
|
|
2282
3037
|
};
|
|
2283
3038
|
export type ModelBillingAttributionV1 = {
|
|
2284
|
-
upstreamPayer: "deployment" | "workspace" | "connected_subscription";
|
|
3039
|
+
upstreamPayer: "deployment" | "workspace" | "organization" | "connected_subscription";
|
|
2285
3040
|
metering: "opengeni_credits" | "external";
|
|
2286
3041
|
};
|
|
3042
|
+
export type ModelCostClassV1 = "free" | "credits" | "subscription" | "workspace" | "organization";
|
|
2287
3043
|
export type ModelPricingV1 = {
|
|
2288
3044
|
inputMicrosPerMillionTokens: number;
|
|
2289
3045
|
cachedInputMicrosPerMillionTokens?: number | undefined;
|
|
3046
|
+
cacheWriteMicrosPerMillionTokens?: number | undefined;
|
|
2290
3047
|
outputMicrosPerMillionTokens: number;
|
|
2291
3048
|
marginBps?: number | undefined;
|
|
2292
3049
|
};
|
|
@@ -2308,17 +3065,19 @@ export type ClientModel = {
|
|
|
2308
3065
|
label: string;
|
|
2309
3066
|
/** Optional curated compact label for dense UI (e.g. mobile composer). */
|
|
2310
3067
|
shortLabel?: string | undefined;
|
|
3068
|
+
/** Optional HTTPS maker logo supplied by the model catalog. */
|
|
3069
|
+
logoUrl?: string | undefined;
|
|
2311
3070
|
/** Provider id (e.g. `openai`, `azure`, or a registry provider id). */
|
|
2312
3071
|
provider: string;
|
|
2313
3072
|
providerLabel: string;
|
|
2314
|
-
api: "responses" | "chat";
|
|
2315
|
-
source?: "opengeni" | "codex" | "supergrok" | "workspace_gateway" | undefined;
|
|
3073
|
+
api: "responses" | "chat" | "anthropic-messages";
|
|
3074
|
+
source?: "opengeni" | "codex" | "supergrok" | "workspace_gateway" | "openrouter" | undefined;
|
|
2316
3075
|
contextWindowTokens?: number | undefined;
|
|
2317
3076
|
schemaVersion?: 1 | undefined;
|
|
2318
3077
|
aliases?: string[] | undefined;
|
|
2319
3078
|
deployment?: {
|
|
2320
3079
|
upstreamModelId: string;
|
|
2321
|
-
wireApi: "responses" | "chat";
|
|
3080
|
+
wireApi: "responses" | "chat" | "anthropic-messages";
|
|
2322
3081
|
} | undefined;
|
|
2323
3082
|
executionLimits?: {
|
|
2324
3083
|
contextWindowTokens: number | null;
|
|
@@ -2328,6 +3087,7 @@ export type ClientModel = {
|
|
|
2328
3087
|
} | undefined;
|
|
2329
3088
|
credentialSource?: ModelCredentialSourceV1 | undefined;
|
|
2330
3089
|
billing?: ModelBillingAttributionV1 | undefined;
|
|
3090
|
+
cost?: ModelCostClassV1 | undefined;
|
|
2331
3091
|
capabilities?: ModelCapabilitiesV1 | undefined;
|
|
2332
3092
|
pricing?: ModelPricingScheduleV1 | undefined;
|
|
2333
3093
|
definitionVersion?: string | undefined;
|
|
@@ -2335,7 +3095,7 @@ export type ClientModel = {
|
|
|
2335
3095
|
export type ModelAvailabilityV1 = {
|
|
2336
3096
|
status: "available" | "unavailable" | "degraded" | "unknown";
|
|
2337
3097
|
selectable: boolean;
|
|
2338
|
-
reason: "missing_credential" | "needs_reauth" | "credential_not_ready" | "not_entitled" | "provider_unhealthy" | "policy_blocked" | "unsupported" | null;
|
|
3098
|
+
reason: "missing_credential" | "needs_reauth" | "credential_not_ready" | "not_entitled" | "provider_unhealthy" | "policy_blocked" | "unsupported" | "credits_disabled" | null;
|
|
2339
3099
|
checkedAt: string | null;
|
|
2340
3100
|
};
|
|
2341
3101
|
export type ModelCredentialReadinessV1 = {
|
|
@@ -2345,32 +3105,449 @@ export type ModelCredentialReadinessV1 = {
|
|
|
2345
3105
|
checkedAt: string | null;
|
|
2346
3106
|
};
|
|
2347
3107
|
export type WorkspaceModelCatalogModel = ClientModel & {
|
|
3108
|
+
/** Workspace preference, separate from immutable model execution limits. */
|
|
3109
|
+
compactionPolicy?: {
|
|
3110
|
+
defaultTokens: number;
|
|
3111
|
+
/** This workspace's own limit; null follows the organization's or the model's default. */
|
|
3112
|
+
overrideTokens: number | null;
|
|
3113
|
+
/** The organization's limit this workspace follows while it sets none. */
|
|
3114
|
+
organizationTokens?: number | null | undefined;
|
|
3115
|
+
effectiveTokens: number;
|
|
3116
|
+
minimumTokens: number;
|
|
3117
|
+
maximumTokens: number;
|
|
3118
|
+
} | undefined;
|
|
2348
3119
|
credentialReadiness: ModelCredentialReadinessV1;
|
|
3120
|
+
creditFunding?: "promotional" | "general" | "unavailable" | undefined;
|
|
2349
3121
|
/** Exact workspace-policy verdict without exposing provider identity. */
|
|
2350
3122
|
policyAllowed?: boolean | undefined;
|
|
2351
3123
|
availability: ModelAvailabilityV1;
|
|
2352
3124
|
};
|
|
3125
|
+
/** Why a new chat or scheduled task without an explicit model gets its default. */
|
|
3126
|
+
export type DefaultModelSelectionSource = "workspace" | "organization" | "subscription" | "credits" | "deployment";
|
|
3127
|
+
export type DefaultModelSelection = {
|
|
3128
|
+
model: string;
|
|
3129
|
+
reasoningEffort: ReasoningEffort;
|
|
3130
|
+
source: DefaultModelSelectionSource;
|
|
3131
|
+
};
|
|
2353
3132
|
export type WorkspaceModelCatalogResponse = {
|
|
2354
3133
|
models: WorkspaceModelCatalogModel[];
|
|
3134
|
+
/** Default for new chats and scheduled tasks that name no model. */
|
|
3135
|
+
defaultSelection?: DefaultModelSelection | undefined;
|
|
3136
|
+
/**
|
|
3137
|
+
* The default this workspace would use once its organization holds an
|
|
3138
|
+
* Opengeni credit balance. Null when the deployment does not bill credits.
|
|
3139
|
+
*/
|
|
3140
|
+
creditsSelection?: DefaultModelSelection | null | undefined;
|
|
2355
3141
|
};
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
3142
|
+
export type WorkspaceGatewayCustomModel = {
|
|
3143
|
+
id: string;
|
|
3144
|
+
upstreamModelId: string;
|
|
3145
|
+
label: string | null;
|
|
3146
|
+
version: number;
|
|
3147
|
+
createdAt: string;
|
|
3148
|
+
updatedAt: string;
|
|
2363
3149
|
};
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
allowedProviders?: string[] | null | undefined;
|
|
2367
|
-
allowedModels?: string[] | null | undefined;
|
|
3150
|
+
export type WorkspaceGatewayCustomModelsResponse = {
|
|
3151
|
+
models: WorkspaceGatewayCustomModel[];
|
|
2368
3152
|
};
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
3153
|
+
export type CreateWorkspaceGatewayCustomModelRequest = {
|
|
3154
|
+
operationId: string;
|
|
3155
|
+
upstreamModelId: string;
|
|
3156
|
+
label?: string | undefined;
|
|
3157
|
+
};
|
|
3158
|
+
export type DeleteWorkspaceGatewayCustomModelRequest = {
|
|
3159
|
+
expectedVersion: number;
|
|
3160
|
+
operationId: string;
|
|
3161
|
+
};
|
|
3162
|
+
export type WorkspaceOpenRouterCustomModel = WorkspaceGatewayCustomModel;
|
|
3163
|
+
export type WorkspaceOpenRouterCustomModelsResponse = {
|
|
3164
|
+
models: WorkspaceOpenRouterCustomModel[];
|
|
3165
|
+
};
|
|
3166
|
+
export type CreateWorkspaceOpenRouterCustomModelRequest = CreateWorkspaceGatewayCustomModelRequest;
|
|
3167
|
+
export type DeleteWorkspaceOpenRouterCustomModelRequest = DeleteWorkspaceGatewayCustomModelRequest;
|
|
3168
|
+
export type WorkspaceOpperCustomModel = WorkspaceGatewayCustomModel;
|
|
3169
|
+
export type WorkspaceOpperCustomModelsResponse = {
|
|
3170
|
+
models: WorkspaceOpperCustomModel[];
|
|
3171
|
+
};
|
|
3172
|
+
export type CreateWorkspaceOpperCustomModelRequest = CreateWorkspaceGatewayCustomModelRequest;
|
|
3173
|
+
export type DeleteWorkspaceOpperCustomModelRequest = DeleteWorkspaceGatewayCustomModelRequest;
|
|
3174
|
+
/** Model connection kinds that carry a per-connection access policy. */
|
|
3175
|
+
export type ModelConnectionAccessKind = "codex" | "supergrok" | "vercel_gateway" | "openrouter" | "anthropic" | "claude_subscription" | "opper";
|
|
3176
|
+
export type OrganizationModelProviderKind = "vercel_gateway" | "openrouter" | "anthropic" | "claude_subscription" | "opper";
|
|
3177
|
+
export type ClaudeUsageWindow = {
|
|
3178
|
+
id: "five_hour" | "seven_day" | "seven_day_opus" | "seven_day_sonnet" | "seven_day_overage_included" | "overage";
|
|
3179
|
+
usedPercent: number | null;
|
|
3180
|
+
resetsAt: string | null;
|
|
3181
|
+
status: "allowed" | "allowed_warning" | "rejected" | null;
|
|
3182
|
+
observedAt: string;
|
|
3183
|
+
source?: "response_headers" | "provider" | undefined;
|
|
3184
|
+
};
|
|
3185
|
+
export type ClaudeUsageRequestStatus = {
|
|
3186
|
+
status: ClaudeUsageWindow["status"];
|
|
3187
|
+
resetsAt: string | null;
|
|
3188
|
+
representativeClaim: ClaudeUsageWindow["id"] | null;
|
|
3189
|
+
overageStatus: ClaudeUsageWindow["status"];
|
|
3190
|
+
overageResetsAt: string | null;
|
|
3191
|
+
upstreamModelId: string | null;
|
|
3192
|
+
observedAt: string;
|
|
3193
|
+
source?: "response_headers" | "provider" | undefined;
|
|
3194
|
+
};
|
|
3195
|
+
export type ClaudeSubscriptionUsage = {
|
|
3196
|
+
connected: boolean;
|
|
3197
|
+
credentialVersion: number | null;
|
|
3198
|
+
windows: ClaudeUsageWindow[];
|
|
3199
|
+
observedAt: string | null;
|
|
3200
|
+
source: "response_headers" | "provider" | null;
|
|
3201
|
+
refreshStatus: "not_checked" | "available" | "scope_required" | "unavailable" | "reconnect";
|
|
3202
|
+
refreshCheckedAt: string | null;
|
|
3203
|
+
requestStatus?: ClaudeUsageRequestStatus | null | undefined;
|
|
3204
|
+
requestRestrictions?: ClaudeUsageRequestStatus[] | undefined;
|
|
3205
|
+
};
|
|
3206
|
+
export type OrganizationModelProviderConnection = {
|
|
3207
|
+
providerKind: OrganizationModelProviderKind;
|
|
3208
|
+
status: "active" | "revoked";
|
|
3209
|
+
version: number;
|
|
3210
|
+
createdAt: string;
|
|
3211
|
+
updatedAt: string;
|
|
3212
|
+
};
|
|
3213
|
+
export type UpsertOrganizationModelProviderConnectionRequest = {
|
|
3214
|
+
operationId: string;
|
|
3215
|
+
expectedVersion?: number | undefined;
|
|
3216
|
+
apiKey: string;
|
|
3217
|
+
claudeIdentity?: {
|
|
3218
|
+
accountUuid: string;
|
|
3219
|
+
deviceId: string;
|
|
3220
|
+
} | undefined;
|
|
3221
|
+
};
|
|
3222
|
+
export type RevokeOrganizationModelProviderConnectionRequest = {
|
|
3223
|
+
operationId: string;
|
|
3224
|
+
expectedVersion: number;
|
|
3225
|
+
};
|
|
3226
|
+
export type OrganizationProviderCustomModel = WorkspaceGatewayCustomModel;
|
|
3227
|
+
export type OrganizationProviderCustomModelsResponse = {
|
|
3228
|
+
models: OrganizationProviderCustomModel[];
|
|
3229
|
+
};
|
|
3230
|
+
export type CreateOrganizationProviderCustomModelRequest = CreateWorkspaceGatewayCustomModelRequest;
|
|
3231
|
+
export type DeleteOrganizationProviderCustomModelRequest = DeleteWorkspaceGatewayCustomModelRequest;
|
|
3232
|
+
/**
|
|
3233
|
+
* The workspace's hard model/provider allowlist. `null` means unrestricted for
|
|
3234
|
+
* that dimension; an empty array is an explicit total block.
|
|
3235
|
+
*/
|
|
3236
|
+
export type WorkspaceModelAccessPolicy = {
|
|
3237
|
+
allowedProviders: string[] | null;
|
|
3238
|
+
allowedModels: string[] | null;
|
|
3239
|
+
/**
|
|
3240
|
+
* Where the policy comes from: the workspace's own, the organization's
|
|
3241
|
+
* default it follows, or no restriction. Absent from older servers.
|
|
3242
|
+
*/
|
|
3243
|
+
source?: "workspace" | "organization" | "none" | undefined;
|
|
3244
|
+
/** The organization default the workspace follows without its own policy. */
|
|
3245
|
+
organization?: {
|
|
3246
|
+
allowedProviders: string[] | null;
|
|
3247
|
+
allowedModels: string[] | null;
|
|
3248
|
+
} | null;
|
|
3249
|
+
/**
|
|
3250
|
+
* The workspace's credit switch (its `allowCreditModels` setting). False
|
|
3251
|
+
* blocks every model billed in Opengeni credits, including ones added later,
|
|
3252
|
+
* whichever allowlist applies. Absent from older servers; treat as true.
|
|
3253
|
+
*/
|
|
3254
|
+
allowCreditModels?: boolean | undefined;
|
|
3255
|
+
};
|
|
3256
|
+
/**
|
|
3257
|
+
* Model defaults every workspace in an organization follows until it sets its
|
|
3258
|
+
* own (`GET/PATCH /v1/organizations/:id/model-defaults`, owners and admins).
|
|
3259
|
+
*/
|
|
3260
|
+
export type OrganizationModelDefaults = {
|
|
3261
|
+
sessionDefaults: {
|
|
3262
|
+
model: string;
|
|
3263
|
+
reasoningEffort: ReasoningEffort;
|
|
3264
|
+
} | null;
|
|
3265
|
+
allowedProviders: string[] | null;
|
|
3266
|
+
allowedModels: string[] | null;
|
|
3267
|
+
modelCompactionThresholds: Record<string, number>;
|
|
3268
|
+
updatedAt: string | null;
|
|
3269
|
+
};
|
|
3270
|
+
/** Field-by-field update; compaction merges by model id and null resets one model. */
|
|
3271
|
+
export type UpdateOrganizationModelDefaultsRequest = {
|
|
3272
|
+
sessionDefaults?: {
|
|
3273
|
+
model: string;
|
|
3274
|
+
reasoningEffort: ReasoningEffort;
|
|
3275
|
+
} | null | undefined;
|
|
3276
|
+
modelPolicy?: {
|
|
3277
|
+
allowedProviders?: string[] | null | undefined;
|
|
3278
|
+
allowedModels?: string[] | null;
|
|
3279
|
+
} | null | undefined;
|
|
3280
|
+
modelCompactionThresholds?: Record<string, number | null> | undefined;
|
|
3281
|
+
};
|
|
3282
|
+
/** A model-account setting an organization sets, and may lock for every workspace. */
|
|
3283
|
+
export type ModelAccountSettingKey = "rotation" | "providers" | "crossProviderFailover" | "fallbackOrder" | "personalConnectionsAllowed" | "personalFallbackAllowed";
|
|
3284
|
+
/**
|
|
3285
|
+
* Where an effective value comes from: the organization, this workspace's
|
|
3286
|
+
* override, or the organization with a lock workspaces cannot override.
|
|
3287
|
+
*/
|
|
3288
|
+
export type ModelAccountSettingSource = "organization" | "workspace" | "locked";
|
|
3289
|
+
export type ModelAccountRotationMode = "spread" | "primary_first";
|
|
3290
|
+
/** Effective model-account settings. */
|
|
3291
|
+
export type ModelAccountSettingValues = {
|
|
3292
|
+
/** How the shared core spreads load across eligible accounts, per provider. */
|
|
3293
|
+
rotation: Record<string, {
|
|
3294
|
+
mode: ModelAccountRotationMode;
|
|
3295
|
+
primaryConnectionId?: string | null | undefined;
|
|
3296
|
+
}>;
|
|
3297
|
+
providers: Record<string, {
|
|
3298
|
+
inferenceSource?: "automatic" | "workspace" | "organization" | undefined;
|
|
3299
|
+
useOrganizationAccounts: boolean;
|
|
3300
|
+
enabled: boolean;
|
|
3301
|
+
}>;
|
|
3302
|
+
crossProviderFailover: boolean;
|
|
3303
|
+
/** Ordered fallback models for a preferred model. */
|
|
3304
|
+
fallbackOrder: Record<string, string[]>;
|
|
3305
|
+
personalConnectionsAllowed: boolean;
|
|
3306
|
+
/** Permit a person's opt-in fallback; accepted background work retains its captured authority. */
|
|
3307
|
+
personalFallbackAllowed: boolean;
|
|
3308
|
+
};
|
|
3309
|
+
/** One source per setting and, for map-valued settings, per entry. */
|
|
3310
|
+
export type ModelAccountSettingsView = {
|
|
3311
|
+
values: ModelAccountSettingValues;
|
|
3312
|
+
sources: Record<ModelAccountSettingKey, ModelAccountSettingSource>;
|
|
3313
|
+
entrySources: {
|
|
3314
|
+
rotation: Record<string, "organization" | "workspace">;
|
|
3315
|
+
providers: Record<string, "organization" | "workspace">;
|
|
3316
|
+
fallbackOrder: Record<string, "organization" | "workspace">;
|
|
3317
|
+
};
|
|
3318
|
+
};
|
|
3319
|
+
/** `GET/PATCH /v1/organizations/:id/model-account-settings` (owners and admins). */
|
|
3320
|
+
export type OrganizationModelAccountSettings = {
|
|
3321
|
+
organizationId: string;
|
|
3322
|
+
values: ModelAccountSettingValues;
|
|
3323
|
+
locked: ModelAccountSettingKey[];
|
|
3324
|
+
version: number;
|
|
3325
|
+
updatedAt: string | null;
|
|
3326
|
+
};
|
|
3327
|
+
/**
|
|
3328
|
+
* Organization change: omitted fields are kept; `fallbackOrder` and `locked`
|
|
3329
|
+
* replace the stored value. Locking a setting clears every workspace override of it.
|
|
3330
|
+
*/
|
|
3331
|
+
export type UpdateOrganizationModelAccountSettingsRequest = {
|
|
3332
|
+
crossProviderFailover?: boolean | undefined;
|
|
3333
|
+
fallbackOrder?: Record<string, string[]> | undefined;
|
|
3334
|
+
personalConnectionsAllowed?: boolean | undefined;
|
|
3335
|
+
personalFallbackAllowed?: boolean | undefined;
|
|
3336
|
+
rotation?: Record<string, {
|
|
3337
|
+
mode: ModelAccountRotationMode;
|
|
3338
|
+
}> | undefined;
|
|
3339
|
+
locked?: ModelAccountSettingKey[] | undefined;
|
|
3340
|
+
/** Refuse the write (409) if the settings changed since this version was read. */
|
|
3341
|
+
expectedVersion?: number | undefined;
|
|
3342
|
+
};
|
|
3343
|
+
/** `GET/PATCH /v1/workspaces/:id/model-account-settings`. */
|
|
3344
|
+
export type WorkspaceModelAccountSettings = ModelAccountSettingsView & {
|
|
3345
|
+
workspaceId: string;
|
|
3346
|
+
locked: ModelAccountSettingKey[];
|
|
3347
|
+
/** The workspace's stored overrides; null follows the organization. */
|
|
3348
|
+
overrides: {
|
|
3349
|
+
rotation: Record<string, unknown> | null;
|
|
3350
|
+
providers: Record<string, unknown> | null;
|
|
3351
|
+
crossProviderFailover: boolean | null;
|
|
3352
|
+
fallbackOrder: Record<string, string[]> | null;
|
|
3353
|
+
personalConnectionsAllowed: boolean | null;
|
|
3354
|
+
personalFallbackAllowed: boolean | null;
|
|
3355
|
+
};
|
|
3356
|
+
version: number;
|
|
3357
|
+
updatedAt: string | null;
|
|
3358
|
+
canEdit: boolean;
|
|
3359
|
+
};
|
|
3360
|
+
/**
|
|
3361
|
+
* Workspace change: `null` follows the organization again; `fallbackOrder`
|
|
3362
|
+
* and `rotation` change entry by entry. A locked setting answers 409.
|
|
3363
|
+
*/
|
|
3364
|
+
export type UpdateWorkspaceModelAccountSettingsRequest = {
|
|
3365
|
+
crossProviderFailover?: boolean | null | undefined;
|
|
3366
|
+
personalConnectionsAllowed?: boolean | null | undefined;
|
|
3367
|
+
personalFallbackAllowed?: boolean | null | undefined;
|
|
3368
|
+
fallbackOrder?: Record<string, string[] | null> | null | undefined;
|
|
3369
|
+
rotation?: Record<string, {
|
|
3370
|
+
mode: ModelAccountRotationMode;
|
|
3371
|
+
} | null> | null | undefined;
|
|
3372
|
+
expectedVersion?: number | undefined;
|
|
3373
|
+
};
|
|
3374
|
+
/** Every shared workspace's effective settings and sources, one page. */
|
|
3375
|
+
export type ModelAccountSettingsOverview = {
|
|
3376
|
+
organization: OrganizationModelAccountSettings;
|
|
3377
|
+
workspaces: (ModelAccountSettingsView & {
|
|
3378
|
+
workspaceId: string;
|
|
3379
|
+
name: string;
|
|
3380
|
+
})[];
|
|
3381
|
+
nextCursor: string | null;
|
|
3382
|
+
};
|
|
3383
|
+
/** Why a listed model account cannot be chosen for this session. */
|
|
3384
|
+
export type ModelAccountChoiceRefusal = "inactive" | "personal_not_allowed" | "personal_not_owner_work" | "session_has_no_owner";
|
|
3385
|
+
/**
|
|
3386
|
+
* Cached usage, not a live check or a promise of available capacity. Source/time
|
|
3387
|
+
* describe the snapshot, not each retained window. A past reset does not prove replenishment.
|
|
3388
|
+
*/
|
|
3389
|
+
export type ModelAccountUsageSnapshot = {
|
|
3390
|
+
/** Snapshot-level time, not the observation time of every retained window. */
|
|
3391
|
+
observedAt: string | null;
|
|
3392
|
+
source: "usage_endpoint" | "response_headers" | "refusal" | null;
|
|
3393
|
+
windows: Array<{
|
|
3394
|
+
id: string;
|
|
3395
|
+
/** Null means unknown; values over 100 can represent overage. */
|
|
3396
|
+
usedPercent: number | null;
|
|
3397
|
+
resetsAt: string | null;
|
|
3398
|
+
status: "ok" | "warning" | "exhausted" | "unknown";
|
|
3399
|
+
}>;
|
|
3400
|
+
exhaustedUntil: string | null;
|
|
3401
|
+
exhaustedKind: "quota" | "rate_limit" | null;
|
|
3402
|
+
};
|
|
3403
|
+
/** An already-visible account, with optional cached usage (never an eligibility decision). */
|
|
3404
|
+
export type ModelAccountChoiceOption = {
|
|
3405
|
+
provider: string;
|
|
3406
|
+
connectionId: string;
|
|
3407
|
+
label: string | null;
|
|
3408
|
+
accountEmail: string | null;
|
|
3409
|
+
planType: string | null;
|
|
3410
|
+
status: string;
|
|
3411
|
+
personal: boolean;
|
|
3412
|
+
source: "workspace" | "organization" | "personal";
|
|
3413
|
+
allowedModelIds: string[] | null;
|
|
3414
|
+
choosable: boolean;
|
|
3415
|
+
refusal: ModelAccountChoiceRefusal | null;
|
|
3416
|
+
/** Omitted on older servers; null means no decodable stored snapshot. Readings may be partial or stale. */
|
|
3417
|
+
usage?: ModelAccountUsageSnapshot | null | undefined;
|
|
3418
|
+
};
|
|
3419
|
+
/** A session's current account, what it may switch to, and the effective personal settings. */
|
|
3420
|
+
export type SessionModelAccountChoiceResponse = {
|
|
3421
|
+
/** Last committed placement; neither queued account choices nor unplaced proposals are serving truth. */
|
|
3422
|
+
serving?: {
|
|
3423
|
+
turnId: string;
|
|
3424
|
+
provider: string;
|
|
3425
|
+
connectionId: string | null;
|
|
3426
|
+
modelId: string;
|
|
3427
|
+
preferredModelId: string;
|
|
3428
|
+
reasoningEffort: ReasoningEffort;
|
|
3429
|
+
latencyMode: LatencyMode;
|
|
3430
|
+
} | null | undefined;
|
|
3431
|
+
/** The session's account when it has bindings for one provider only; else null (see `bindings`). */
|
|
3432
|
+
binding: {
|
|
3433
|
+
provider: string;
|
|
3434
|
+
connectionId: string | null;
|
|
3435
|
+
choice: "explicit" | "automatic";
|
|
3436
|
+
} | null;
|
|
3437
|
+
/** One binding per provider. */
|
|
3438
|
+
bindings: {
|
|
3439
|
+
provider: string;
|
|
3440
|
+
connectionId: string | null;
|
|
3441
|
+
choice: "explicit" | "automatic";
|
|
3442
|
+
}[];
|
|
3443
|
+
accounts: ModelAccountChoiceOption[];
|
|
3444
|
+
personal: {
|
|
3445
|
+
connectionsAllowed: boolean;
|
|
3446
|
+
fallbackAllowed: boolean;
|
|
3447
|
+
fallbackOptIn: boolean;
|
|
3448
|
+
};
|
|
3449
|
+
};
|
|
3450
|
+
/**
|
|
3451
|
+
* A connection becomes the choice for its provider; other providers' choices
|
|
3452
|
+
* stay. `connectionId: null` returns `provider`'s choice to automatic, or
|
|
3453
|
+
* every provider's when `provider` is omitted.
|
|
3454
|
+
*/
|
|
3455
|
+
export type SetSessionModelAccountChoiceRequest = {
|
|
3456
|
+
connectionId: string | null;
|
|
3457
|
+
provider?: string;
|
|
3458
|
+
};
|
|
3459
|
+
export type SetSessionModelAccountChoiceResponse = {
|
|
3460
|
+
changed: boolean;
|
|
3461
|
+
appliedTo: "waiting_turn" | "next_turn";
|
|
3462
|
+
provider: string | null;
|
|
3463
|
+
connectionId: string | null;
|
|
3464
|
+
choice: "explicit" | "automatic";
|
|
3465
|
+
};
|
|
3466
|
+
/** The caller's own model-account preferences in an organization. */
|
|
3467
|
+
export type ModelAccountPreferences = {
|
|
3468
|
+
personalFallbackOptIn: boolean;
|
|
3469
|
+
version: number;
|
|
3470
|
+
};
|
|
3471
|
+
export type UpdateModelAccountPreferencesRequest = {
|
|
3472
|
+
personalFallbackOptIn: boolean;
|
|
3473
|
+
expectedVersion?: number;
|
|
3474
|
+
};
|
|
3475
|
+
/**
|
|
3476
|
+
* Whether owners and admins may give agent sessions admin access. Off by
|
|
3477
|
+
* default; turning it off ends every session's admin access.
|
|
3478
|
+
*/
|
|
3479
|
+
export type OrganizationAgentAdminAccess = {
|
|
3480
|
+
sessionAdminAccessAllowed: boolean;
|
|
3481
|
+
updatedAt: string | null;
|
|
3482
|
+
};
|
|
3483
|
+
export type UpdateOrganizationAgentAdminAccessRequest = {
|
|
3484
|
+
sessionAdminAccessAllowed: boolean;
|
|
3485
|
+
};
|
|
3486
|
+
/**
|
|
3487
|
+
* An organization's privacy choices, after the deployment's limits. A product
|
|
3488
|
+
* that embeds Opengeni can only narrow these; `limits` says which are fixed.
|
|
3489
|
+
*/
|
|
3490
|
+
export type OrganizationPrivacySettings = {
|
|
3491
|
+
organizationId: string;
|
|
3492
|
+
/** Who sees new chats and schedules unless the person picks otherwise. */
|
|
3493
|
+
defaultVisibility: "private" | "workspace";
|
|
3494
|
+
/** Whether admins see that other people's Only me schedules exist, and can pause them. */
|
|
3495
|
+
adminsSeePrivateSchedules: boolean;
|
|
3496
|
+
limits: {
|
|
3497
|
+
/** False when this deployment turns Only me off in shared workspaces. */
|
|
3498
|
+
onlyMeAllowed: boolean;
|
|
3499
|
+
/** True when new chats and schedules always start as Workspace. */
|
|
3500
|
+
defaultVisibilityLocked: boolean;
|
|
3501
|
+
/** True when admins always see that other people's Only me schedules exist. */
|
|
3502
|
+
adminsSeePrivateSchedulesLocked: boolean;
|
|
3503
|
+
};
|
|
3504
|
+
updatedAt: string | null;
|
|
3505
|
+
};
|
|
3506
|
+
export type UpdateOrganizationPrivacySettingsRequest = {
|
|
3507
|
+
defaultVisibility?: "private" | "workspace";
|
|
3508
|
+
adminsSeePrivateSchedules?: boolean;
|
|
3509
|
+
};
|
|
3510
|
+
/**
|
|
3511
|
+
* A session's admin access as the viewer sees it. While `active`, the agent
|
|
3512
|
+
* in this session can do what `grantedBy` can manage across the
|
|
3513
|
+
* organization, checked live on every action.
|
|
3514
|
+
*/
|
|
3515
|
+
export type SessionAdminAccess = {
|
|
3516
|
+
active: boolean;
|
|
3517
|
+
grantedBy: {
|
|
3518
|
+
subjectId: string;
|
|
3519
|
+
name: string | null;
|
|
3520
|
+
} | null;
|
|
3521
|
+
grantedAt: string | null;
|
|
3522
|
+
/** While active: when it ends by itself, or null for no time limit. */
|
|
3523
|
+
expiresAt: string | null;
|
|
3524
|
+
/** The organization allows admin access for sessions. */
|
|
3525
|
+
allowed: boolean;
|
|
3526
|
+
/**
|
|
3527
|
+
* The viewer may turn it on, or choose a new time limit while it is on: an
|
|
3528
|
+
* owner or admin, in person, on their own session.
|
|
3529
|
+
*/
|
|
3530
|
+
canGrant: boolean;
|
|
3531
|
+
/** The viewer may turn it off. */
|
|
3532
|
+
canRevoke: boolean;
|
|
3533
|
+
};
|
|
3534
|
+
/**
|
|
3535
|
+
* How long a session's admin access lasts from now: whole hours from 1 to
|
|
3536
|
+
* 720, or null for no time limit. Omitted means one hour.
|
|
3537
|
+
*/
|
|
3538
|
+
export type GrantSessionAdminAccessRequest = {
|
|
3539
|
+
durationHours?: number | null;
|
|
3540
|
+
};
|
|
3541
|
+
/** Full replacement body for `PUT /v1/workspaces/:id/model-policy`. */
|
|
3542
|
+
export type UpdateWorkspaceModelAccessPolicyRequest = {
|
|
3543
|
+
allowedProviders?: string[] | null | undefined;
|
|
3544
|
+
allowedModels?: string[] | null | undefined;
|
|
3545
|
+
};
|
|
3546
|
+
/**
|
|
3547
|
+
* Connection state of a workspace's Codex (ChatGPT) subscription, returned by
|
|
3548
|
+
* `GET /v1/workspaces/:id/codex/status`. `models` are the codex models the
|
|
3549
|
+
* workspace can select (projected as ClientModel under their own "no credits"
|
|
3550
|
+
* provider group), present only while connected.
|
|
2374
3551
|
*/
|
|
2375
3552
|
export type CodexConnectionStatus = {
|
|
2376
3553
|
connected: boolean;
|
|
@@ -2385,8 +3562,32 @@ export type CodexConnectionStatus = {
|
|
|
2385
3562
|
label?: string | null;
|
|
2386
3563
|
chatgptAccountId?: string | null;
|
|
2387
3564
|
} | null;
|
|
3565
|
+
/** Live model-catalog probe result for the active account only. */
|
|
3566
|
+
activeAccountValid?: boolean;
|
|
3567
|
+
/** Cached readiness of any account in the effective worker pool. */
|
|
3568
|
+
poolReady?: boolean;
|
|
3569
|
+
/** Cached unpinned worker routability; rotation-off remains active-pointer-only. */
|
|
3570
|
+
workerRoutable?: boolean;
|
|
2388
3571
|
/** How many Codex accounts the workspace has connected. */
|
|
2389
3572
|
accountCount?: number;
|
|
3573
|
+
source?: WorkspaceCodexSubscriptionSource;
|
|
3574
|
+
};
|
|
3575
|
+
export type WorkspaceCodexSubscriptionMode = "automatic" | "workspace" | "organization" | "disabled";
|
|
3576
|
+
export type WorkspaceCodexSubscriptionSource = {
|
|
3577
|
+
accountId: string;
|
|
3578
|
+
workspaceId: string;
|
|
3579
|
+
workspaceKind: "personal" | "shared";
|
|
3580
|
+
mode: WorkspaceCodexSubscriptionMode;
|
|
3581
|
+
effectiveSource: "workspace" | "organization" | "disabled";
|
|
3582
|
+
workspaceAvailable: boolean;
|
|
3583
|
+
organizationAvailable: boolean;
|
|
3584
|
+
/** Some of the workspace's own accounts are not in use here. Absent from older servers. */
|
|
3585
|
+
workspaceSetAside?: boolean;
|
|
3586
|
+
/**
|
|
3587
|
+
* How many organization accounts other than the workspace's own reach this
|
|
3588
|
+
* workspace (accounts limited to chosen people aside). Absent from older servers.
|
|
3589
|
+
*/
|
|
3590
|
+
organizationCount?: number;
|
|
2390
3591
|
};
|
|
2391
3592
|
/**
|
|
2392
3593
|
* One normalized Codex usage window (5h or weekly), camelCase end-to-end (the
|
|
@@ -2425,21 +3626,48 @@ export type CodexUsagePayload = {
|
|
|
2425
3626
|
meteredFeature: string;
|
|
2426
3627
|
fiveHour: CodexUsageWindow | null;
|
|
2427
3628
|
weekly: CodexUsageWindow | null;
|
|
3629
|
+
unknownWindowExhausted: boolean;
|
|
2428
3630
|
}>;
|
|
2429
3631
|
credits?: {
|
|
2430
3632
|
hasCredits: boolean;
|
|
2431
3633
|
unlimited: boolean;
|
|
2432
3634
|
overageLimitReached: boolean;
|
|
2433
|
-
balance: string;
|
|
3635
|
+
balance: string | null;
|
|
2434
3636
|
};
|
|
2435
3637
|
};
|
|
3638
|
+
/** One model a Codex account's current ChatGPT plan was proven not to include. */
|
|
3639
|
+
export type CodexPlanExcludedModel = {
|
|
3640
|
+
/** Product model id, for example `codex/gpt-6-sol`. */
|
|
3641
|
+
model: string;
|
|
3642
|
+
/** Display name, for example "GPT-6 Sol". */
|
|
3643
|
+
label: string;
|
|
3644
|
+
excludedAt: string;
|
|
3645
|
+
retryAfter: string;
|
|
3646
|
+
};
|
|
2436
3647
|
/** One connected Codex (ChatGPT) account in a workspace (multi-account P1). Metadata only. */
|
|
2437
3648
|
export type CodexAccount = {
|
|
2438
3649
|
id: string;
|
|
3650
|
+
source?: "workspace" | "organization";
|
|
3651
|
+
/**
|
|
3652
|
+
* Organization list only: shared workspaces that list the account among
|
|
3653
|
+
* their own (it was connected there).
|
|
3654
|
+
*/
|
|
3655
|
+
ownInWorkspaceIds?: string[];
|
|
2439
3656
|
chatgptAccountId?: string | null;
|
|
2440
3657
|
label?: string | null;
|
|
2441
3658
|
email?: string | null;
|
|
2442
3659
|
plan?: string | null;
|
|
3660
|
+
/** When the provider last confirmed `plan` (connect, token refresh, or usage read). */
|
|
3661
|
+
planCheckedAt?: string | null;
|
|
3662
|
+
/** Plan before the most recent observed plan change, and when that change was seen. */
|
|
3663
|
+
planChangedFrom?: string | null;
|
|
3664
|
+
planChangedAt?: string | null;
|
|
3665
|
+
/**
|
|
3666
|
+
* Models the current plan was proven not to include. Each is skipped by
|
|
3667
|
+
* automatic selection until `retryAfter` (one request then re-checks it), or
|
|
3668
|
+
* until a different plan is observed, for example after refreshing usage.
|
|
3669
|
+
*/
|
|
3670
|
+
planExcludedModels?: CodexPlanExcludedModel[];
|
|
2443
3671
|
status: "active" | "needs_relogin" | "error";
|
|
2444
3672
|
active: boolean;
|
|
2445
3673
|
expiresAt?: string | null;
|
|
@@ -2450,6 +3678,9 @@ export type CodexAccount = {
|
|
|
2450
3678
|
usageCheckedAt?: string | null;
|
|
2451
3679
|
exhaustedUntil?: string | null;
|
|
2452
3680
|
/** Controls only NEW automatic allocations. */
|
|
3681
|
+
extraCreditsEnabled?: boolean;
|
|
3682
|
+
extraCreditsVersion?: number;
|
|
3683
|
+
extraCreditsUpdatedAt?: string | null;
|
|
2453
3684
|
allocatorEnabled: boolean;
|
|
2454
3685
|
/** Independent OCC sequence; credential/token `version` is never exposed. */
|
|
2455
3686
|
allocatorVersion: number;
|
|
@@ -2537,6 +3768,7 @@ export type CodexRotationSettings = {
|
|
|
2537
3768
|
export type CodexAccountsResponse = {
|
|
2538
3769
|
accounts: CodexAccount[];
|
|
2539
3770
|
activeAccountId: string | null;
|
|
3771
|
+
source?: WorkspaceCodexSubscriptionSource;
|
|
2540
3772
|
/** Added by Apps-aware servers; absent on older same-major deployments. */
|
|
2541
3773
|
apps?: {
|
|
2542
3774
|
available: boolean;
|
|
@@ -2547,6 +3779,18 @@ export type CodexAccountsResponse = {
|
|
|
2547
3779
|
};
|
|
2548
3780
|
settings: CodexRotationSettings;
|
|
2549
3781
|
};
|
|
3782
|
+
export type OrganizationCodexAccountsResponse = Omit<CodexAccountsResponse, "apps" | "source">;
|
|
3783
|
+
/** Session-authorized choices: the accepted pool for a capacity wait, otherwise
|
|
3784
|
+
* the current pool for the next turn. Current execution may use another pool. */
|
|
3785
|
+
export type SessionCodexAccountsResponse = Omit<CodexAccountsResponse, "apps" | "source"> & {
|
|
3786
|
+
currentSelection: {
|
|
3787
|
+
credentialId: string | null;
|
|
3788
|
+
waiting: boolean;
|
|
3789
|
+
} | null;
|
|
3790
|
+
currentAccount: CodexAccount | null;
|
|
3791
|
+
pinnedAccountId: string | null;
|
|
3792
|
+
lastAccountId: string | null;
|
|
3793
|
+
};
|
|
2550
3794
|
export type CodexAppsUpdate = {
|
|
2551
3795
|
credentialId: string | null;
|
|
2552
3796
|
version: number;
|
|
@@ -2578,10 +3822,11 @@ export type CodexConnectPoll = {
|
|
|
2578
3822
|
isActive?: boolean;
|
|
2579
3823
|
};
|
|
2580
3824
|
/** Explicit authority of one connected SuperGrok/xAI subscription account. */
|
|
2581
|
-
export type SuperGrokAccountScope = "workspace" | "user";
|
|
3825
|
+
export type SuperGrokAccountScope = "workspace" | "user" | "organization";
|
|
2582
3826
|
/** Metadata-only connected SuperGrok account. Secret OAuth material never crosses the API. */
|
|
2583
3827
|
export type SuperGrokAccount = {
|
|
2584
3828
|
id: string;
|
|
3829
|
+
plan?: string | null;
|
|
2585
3830
|
scope: SuperGrokAccountScope;
|
|
2586
3831
|
subject: string;
|
|
2587
3832
|
email?: string | null;
|
|
@@ -2610,6 +3855,8 @@ export type SuperGrokRotationSettings = {
|
|
|
2610
3855
|
};
|
|
2611
3856
|
/** GET /supergrok/accounts — visible accounts plus the workspace active pointer. */
|
|
2612
3857
|
export type SuperGrokAccountsResponse = {
|
|
3858
|
+
source?: "workspace" | "user" | "organization";
|
|
3859
|
+
organizationId?: string;
|
|
2613
3860
|
accounts: SuperGrokAccount[];
|
|
2614
3861
|
activeAccountId: string | null;
|
|
2615
3862
|
settings: SuperGrokRotationSettings;
|
|
@@ -2680,8 +3927,15 @@ export type ClientAuthConfig = {
|
|
|
2680
3927
|
session: "cookie";
|
|
2681
3928
|
/** Defaults to true when omitted by an older deployment. */
|
|
2682
3929
|
emailVerificationRequired?: boolean;
|
|
3930
|
+
/** Configured managed sign-in providers; omitted by older deployments. */
|
|
3931
|
+
socialProviders?: ("google" | "github")[];
|
|
3932
|
+
/**
|
|
3933
|
+
* False while the deployment has paused new account creation; existing
|
|
3934
|
+
* accounts can still sign in. Omitted (treat as true) by older deployments.
|
|
3935
|
+
*/
|
|
3936
|
+
newSignupsEnabled?: boolean;
|
|
2683
3937
|
};
|
|
2684
|
-
export declare const OPENGENI_API_CONTRACT_REVISION: "2026-
|
|
3938
|
+
export declare const OPENGENI_API_CONTRACT_REVISION: "2026-09-plugins-and-skills-v1";
|
|
2685
3939
|
export declare const OPENGENI_API_CONTRACT_HEADER: "x-opengeni-api-contract";
|
|
2686
3940
|
/** Bounded request/response identifier shared by browser, ingress, and API diagnostics. */
|
|
2687
3941
|
export declare const OPENGENI_CORRELATION_HEADER: "x-opengeni-correlation-id";
|
|
@@ -2694,18 +3948,27 @@ export declare const OPENGENI_CORRELATION_HEADER: "x-opengeni-correlation-id";
|
|
|
2694
3948
|
*/
|
|
2695
3949
|
export type ClientConfig = {
|
|
2696
3950
|
deploymentRevision: string;
|
|
2697
|
-
|
|
3951
|
+
/**
|
|
3952
|
+
* The API's contract revision. Equals `OPENGENI_API_CONTRACT_REVISION` for a
|
|
3953
|
+
* `"strict"` client (it throws otherwise); a `"compatible"` client may
|
|
3954
|
+
* receive a newer revision from an additive deployment within its major.
|
|
3955
|
+
*/
|
|
3956
|
+
apiContractRevision: string;
|
|
2698
3957
|
serverVersion?: string | undefined;
|
|
3958
|
+
claudeSubscriptionEnabled?: boolean | undefined;
|
|
3959
|
+
/** Whether people can connect their own computers; absent on older servers. */
|
|
3960
|
+
connectedMachines?: boolean | undefined;
|
|
2699
3961
|
defaultModel: string;
|
|
2700
3962
|
allowedModels: string[];
|
|
2701
3963
|
models: ClientModel[];
|
|
2702
3964
|
defaultReasoningEffort: ReasoningEffort;
|
|
2703
3965
|
allowedReasoningEfforts: ReasoningEffort[];
|
|
3966
|
+
defaultSandboxBackend?: SandboxBackend | undefined;
|
|
2704
3967
|
mcpServers: {
|
|
2705
3968
|
id: string;
|
|
2706
3969
|
name: string;
|
|
2707
3970
|
}[];
|
|
2708
|
-
/** Deployment defaults and hard maximum for built-in
|
|
3971
|
+
/** Deployment defaults and hard maximum for built-in Opengeni session tools. */
|
|
2709
3972
|
firstPartyMcpTools?: {
|
|
2710
3973
|
default: FirstPartyMcpToolName[];
|
|
2711
3974
|
allowed: FirstPartyMcpToolName[];
|
|
@@ -2714,11 +3977,93 @@ export type ClientConfig = {
|
|
|
2714
3977
|
enabled: boolean;
|
|
2715
3978
|
maxSizeBytes: number;
|
|
2716
3979
|
};
|
|
3980
|
+
/**
|
|
3981
|
+
* `false` when a host's session proxy fixes the model policy
|
|
3982
|
+
* (`createSessionProxyHandler({ modelSelection: false })`), so UIs hide the
|
|
3983
|
+
* model picker; `true` when the host explicitly offers end users model
|
|
3984
|
+
* choice (embedded stock UIs then show the picker). Opengeni itself omits it.
|
|
3985
|
+
*/
|
|
3986
|
+
modelSelection?: boolean | undefined;
|
|
3987
|
+
/** Session proxy sandbox-path download opt-in; absent on native deployments. */
|
|
3988
|
+
sandboxFiles?: boolean | undefined;
|
|
3989
|
+
/**
|
|
3990
|
+
* `false` when a host's session proxy turns live voice off
|
|
3991
|
+
* (`createSessionProxyHandler({ realtimeVoice: false })`), so UIs hide the
|
|
3992
|
+
* voice button; `true` when the host explicitly offers it to end users
|
|
3993
|
+
* (embedded stock UIs then show the button). Otherwise absent: availability
|
|
3994
|
+
* comes from the workspace's realtime model catalog.
|
|
3995
|
+
*/
|
|
3996
|
+
realtimeVoice?: boolean | undefined;
|
|
3997
|
+
/**
|
|
3998
|
+
* Session proxy only: the workspace the proxy resolved for this user, so a
|
|
3999
|
+
* browser pointed at the proxy (`<OpenGeniChat baseUrl=... />`) needs no
|
|
4000
|
+
* workspace id. Absent on native deployments and older proxies.
|
|
4001
|
+
*/
|
|
4002
|
+
workspaceId?: string | undefined;
|
|
4003
|
+
/**
|
|
4004
|
+
* Session proxy capability for the embedded artifact viewer and inline Site
|
|
4005
|
+
* previews; absent on native deployments. The live socket is
|
|
4006
|
+
* ticket-authenticated and reached directly; the cache partition identifies
|
|
4007
|
+
* the proxied user. `false` when the proxy does not serve artifacts, so
|
|
4008
|
+
* stock UIs show Site previews as unavailable instead of failing on click.
|
|
4009
|
+
*/
|
|
4010
|
+
artifacts?: {
|
|
4011
|
+
editableLiveUrl: string;
|
|
4012
|
+
cachePartition: {
|
|
4013
|
+
accountId: string;
|
|
4014
|
+
principalId: string;
|
|
4015
|
+
authorizationEpoch: string;
|
|
4016
|
+
};
|
|
4017
|
+
} | false | undefined;
|
|
4018
|
+
/**
|
|
4019
|
+
* Session proxy only: whether the browser may start a chat (the proxy has a
|
|
4020
|
+
* `createSession` hook). Stock UIs hide "New chat" when `false`; absent on
|
|
4021
|
+
* native deployments and older proxies.
|
|
4022
|
+
*/
|
|
4023
|
+
sessionCreation?: boolean | undefined;
|
|
4024
|
+
/**
|
|
4025
|
+
* Session proxy only: whether users may archive or restore their chats.
|
|
4026
|
+
* Stock UIs hide "Archive" when `false`; absent on native deployments.
|
|
4027
|
+
*/
|
|
4028
|
+
archive?: boolean | undefined;
|
|
2717
4029
|
/** Native browser microphone capture + server-side transcription capability. */
|
|
2718
4030
|
voiceInput?: ClientVoiceInputConfig | undefined;
|
|
4031
|
+
/**
|
|
4032
|
+
* Whether the deployment offers the Jev-backed code_search agent tool and
|
|
4033
|
+
* what workspaces without their own setting get (`split` = half of sessions).
|
|
4034
|
+
*/
|
|
4035
|
+
codeSearch?: {
|
|
4036
|
+
available: boolean;
|
|
4037
|
+
workspaceDefault: "off" | "on" | "split";
|
|
4038
|
+
} | undefined;
|
|
4039
|
+
/**
|
|
4040
|
+
* Present only when this deployment archives idle sessions: after `idleDays`
|
|
4041
|
+
* without activity a session (unless kept live) becomes read-only.
|
|
4042
|
+
*/
|
|
4043
|
+
sessionArchive?: {
|
|
4044
|
+
enabled: true;
|
|
4045
|
+
idleDays: number;
|
|
4046
|
+
} | undefined;
|
|
4047
|
+
/**
|
|
4048
|
+
* Present when the server records and enforces per-task usage limits.
|
|
4049
|
+
* `enabled: false` refuses new limits but still enforces and clears existing
|
|
4050
|
+
* ones. Omitted by older servers, which ignore `usageLimitMicros`.
|
|
4051
|
+
*/
|
|
4052
|
+
sessionUsageLimits?: {
|
|
4053
|
+
enabled: boolean;
|
|
4054
|
+
} | undefined;
|
|
4055
|
+
/** Agent configuration rollout and per-capability availability. */
|
|
4056
|
+
agentConfig?: ClientAgentConfig | undefined;
|
|
2719
4057
|
productAccessMode: ProductAccessMode;
|
|
4058
|
+
/** Client-safe hint for whether the console should offer Stripe checkout. */
|
|
4059
|
+
billingMode?: BillingMode | undefined;
|
|
2720
4060
|
managedAuthSessionSetMode: "legacy" | "dual" | "broker";
|
|
2721
4061
|
auth: ClientAuthConfig;
|
|
4062
|
+
/**
|
|
4063
|
+
* Product documentation for a console Help link. `null` means the deployment
|
|
4064
|
+
* hides the link; absent means a server that predates the field.
|
|
4065
|
+
*/
|
|
4066
|
+
documentationUrl?: string | null | undefined;
|
|
2722
4067
|
analytics: {
|
|
2723
4068
|
consentRequired: boolean;
|
|
2724
4069
|
providers: {
|
|
@@ -2734,6 +4079,13 @@ export type ClientConfig = {
|
|
|
2734
4079
|
} | undefined;
|
|
2735
4080
|
};
|
|
2736
4081
|
};
|
|
4082
|
+
/** Operator-owned legal documents the signed-out console links to, when configured. */
|
|
4083
|
+
legal?: {
|
|
4084
|
+
privacyPolicyUrl?: string | undefined;
|
|
4085
|
+
termsOfServiceUrl?: string | undefined;
|
|
4086
|
+
} | undefined;
|
|
4087
|
+
/** Operator support address the console offers as a mailto link, when configured. */
|
|
4088
|
+
supportEmail?: string | undefined;
|
|
2737
4089
|
structuredServices: {
|
|
2738
4090
|
fileSystem: boolean;
|
|
2739
4091
|
git: boolean;
|
|
@@ -2743,6 +4095,7 @@ export type ClientConfig = {
|
|
|
2743
4095
|
/** Client-safe voice-input capability projection. */
|
|
2744
4096
|
export type ClientVoiceInputConfig = {
|
|
2745
4097
|
available: boolean;
|
|
4098
|
+
providers?: VoiceInputProviderId[] | undefined;
|
|
2746
4099
|
maxDurationSeconds: number;
|
|
2747
4100
|
maxSizeBytes: number;
|
|
2748
4101
|
acceptedMimeTypes: string[];
|
|
@@ -2754,7 +4107,7 @@ export type ClientResumableVoiceInputConfig = {
|
|
|
2754
4107
|
maxChunkSizeBytes: number;
|
|
2755
4108
|
providerSegmentSeconds: number;
|
|
2756
4109
|
};
|
|
2757
|
-
export type TranscriptionRecordingErrorCode = "permission_denied" | "not_supported" | "network" | "provider" | "policy_blocked" | "timeout" | "cancelled" | "unavailable" | "too_large" | "invalid_audio" | "unknown";
|
|
4110
|
+
export type TranscriptionRecordingErrorCode = "permission_denied" | "not_supported" | "network" | "provider" | "policy_blocked" | "timeout" | "cancelled" | "unavailable" | "too_large" | "invalid_audio" | "unknown" | "insufficient_credits" | "allowance_exhausted" | "monthly_model_cost_limit";
|
|
2758
4111
|
export type TranscriptionRecordingState = "uploading" | "segmenting" | "ready" | "transcribing" | "complete" | "failed" | "discarded";
|
|
2759
4112
|
export type TranscriptionRecordingSegmentState = "preparing" | "pending" | "transcribing" | "complete" | "failed";
|
|
2760
4113
|
export type TranscriptionRecordingSegment = {
|
|
@@ -2827,11 +4180,43 @@ export type AccessGrant = {
|
|
|
2827
4180
|
subjectId: string;
|
|
2828
4181
|
subjectLabel?: string | undefined;
|
|
2829
4182
|
permissions: Permission[];
|
|
4183
|
+
/** Explicit policies never expand `workspace:admin` into unselected permissions. */
|
|
4184
|
+
permissionMode?: "legacy" | "explicit" | undefined;
|
|
2830
4185
|
principalKind?: AccessPrincipalKind | undefined;
|
|
2831
4186
|
metadata?: Record<string, unknown> | undefined;
|
|
2832
4187
|
serviceInitiator?: ServiceTurnInitiator | undefined;
|
|
2833
4188
|
serviceInitiatorContext?: ServiceTurnInitiatorContext | undefined;
|
|
2834
4189
|
};
|
|
4190
|
+
/**
|
|
4191
|
+
* Authority of a directly used organization or workspace API key, separate
|
|
4192
|
+
* from the caller's account and workspace grants. Full organization keys can
|
|
4193
|
+
* provision shared workspaces, external members, and sessions through `asUser`;
|
|
4194
|
+
* those user requests additionally need the user's live membership.
|
|
4195
|
+
* Organization-key scope excludes Personal workspaces. Neither key kind bypasses
|
|
4196
|
+
* session visibility or the explicit `secrets:read` permission requirement.
|
|
4197
|
+
*/
|
|
4198
|
+
export type AccessCredential = {
|
|
4199
|
+
kind: "organization_api_key" | "workspace_api_key";
|
|
4200
|
+
/** Organization keys only; omitted for workspace keys. */
|
|
4201
|
+
access?: OrganizationApiKeyAccess | undefined;
|
|
4202
|
+
/** The key's organization id. */
|
|
4203
|
+
accountId: string;
|
|
4204
|
+
/** Null for an organization key; `workspaceScope` selects shared workspaces, never Personal. */
|
|
4205
|
+
workspaceId: string | null;
|
|
4206
|
+
/**
|
|
4207
|
+
* Effective workspace permissions, with admin expansion only for legacy keys. Excludes
|
|
4208
|
+
* account-only permissions and includes `secrets:read` only when explicitly
|
|
4209
|
+
* granted. Explicit policies grant exactly their selected permissions.
|
|
4210
|
+
*/
|
|
4211
|
+
effectiveWorkspacePermissions: Permission[];
|
|
4212
|
+
/** Organization keys only; the preset label never adds permissions. */
|
|
4213
|
+
policy?: OrganizationAccessPolicy | undefined;
|
|
4214
|
+
/** Organization keys only; omitted on older servers. */
|
|
4215
|
+
workspaceScope?: OrganizationWorkspaceScope | undefined;
|
|
4216
|
+
/** Plain-language explanation of the key's scope and limits. */
|
|
4217
|
+
note: string;
|
|
4218
|
+
};
|
|
4219
|
+
/** Caller identity, grants, defaults, and optional direct API-key authority. */
|
|
2835
4220
|
export type AccessContext = {
|
|
2836
4221
|
mode: ProductAccessMode;
|
|
2837
4222
|
subjectId: string;
|
|
@@ -2840,6 +4225,15 @@ export type AccessContext = {
|
|
|
2840
4225
|
workspaceGrants: AccessGrant[];
|
|
2841
4226
|
defaultAccountId: string | null;
|
|
2842
4227
|
defaultWorkspaceId: string | null;
|
|
4228
|
+
/**
|
|
4229
|
+
* Direct API-key authority; omitted for `asUser`/external actors, humans,
|
|
4230
|
+
* delegated tokens, other caller contexts, and older servers. Existing grants
|
|
4231
|
+
* are unchanged. Full organization keys can provision shared workspaces,
|
|
4232
|
+
* external members, and `asUser` sessions; user requests still need live
|
|
4233
|
+
* membership. Organization-key scope excludes Personal workspaces. Neither key
|
|
4234
|
+
* kind bypasses session visibility or the explicit `secrets:read` requirement.
|
|
4235
|
+
*/
|
|
4236
|
+
credential?: AccessCredential | undefined;
|
|
2843
4237
|
};
|
|
2844
4238
|
export type ManagedOrganizationMembership = {
|
|
2845
4239
|
id: string;
|
|
@@ -2875,7 +4269,7 @@ export type UserResourceAuthoritySummary = {
|
|
|
2875
4269
|
grants: UserResourceAuthorityGrant[];
|
|
2876
4270
|
};
|
|
2877
4271
|
export type ListUserResourceAuthoritiesOptions = {
|
|
2878
|
-
resourceKind: UserResourceKind
|
|
4272
|
+
resourceKind: Exclude<UserResourceKind, "connection">;
|
|
2879
4273
|
cursor?: string | undefined;
|
|
2880
4274
|
limit?: number | undefined;
|
|
2881
4275
|
};
|
|
@@ -2886,7 +4280,7 @@ export type ListUserResourceAuthoritiesResponse = {
|
|
|
2886
4280
|
};
|
|
2887
4281
|
export type IssueUserResourceGrantRequest = {
|
|
2888
4282
|
scope: "user";
|
|
2889
|
-
resourceKind: UserResourceKind
|
|
4283
|
+
resourceKind: Exclude<UserResourceKind, "connection">;
|
|
2890
4284
|
mode: "session";
|
|
2891
4285
|
context: "user_private" | "workspace_shared";
|
|
2892
4286
|
sessionId: string;
|
|
@@ -2894,7 +4288,7 @@ export type IssueUserResourceGrantRequest = {
|
|
|
2894
4288
|
workspaceSharedAcknowledged?: boolean | undefined;
|
|
2895
4289
|
} | {
|
|
2896
4290
|
scope: "user";
|
|
2897
|
-
resourceKind: UserResourceKind
|
|
4291
|
+
resourceKind: Exclude<UserResourceKind, "connection">;
|
|
2898
4292
|
mode: "always";
|
|
2899
4293
|
context: "user_private" | "workspace_shared";
|
|
2900
4294
|
sessionId?: null | undefined;
|
|
@@ -3061,6 +4455,16 @@ export type CreateOrganizationResponse = {
|
|
|
3061
4455
|
organization: OrganizationSummary;
|
|
3062
4456
|
workspaceId: string;
|
|
3063
4457
|
};
|
|
4458
|
+
export type CreateAdditionalOrganizationRequest = {
|
|
4459
|
+
name: string;
|
|
4460
|
+
workspaceName: string;
|
|
4461
|
+
operationId: string;
|
|
4462
|
+
};
|
|
4463
|
+
export type CreateAdditionalOrganizationResponse = {
|
|
4464
|
+
organization: OrganizationSummary;
|
|
4465
|
+
workspaceId: string;
|
|
4466
|
+
personalWorkspaceId: string;
|
|
4467
|
+
};
|
|
3064
4468
|
export type UpdateOrganizationNameRequest = {
|
|
3065
4469
|
name: string;
|
|
3066
4470
|
expectedUpdatedAt: string;
|
|
@@ -3237,6 +4641,8 @@ export type Workspace = {
|
|
|
3237
4641
|
agentInstructions: string | null;
|
|
3238
4642
|
settings: Record<string, unknown>;
|
|
3239
4643
|
inferenceControl: {
|
|
4644
|
+
timer?: WorkspacePauseTimer | null | undefined;
|
|
4645
|
+
serverTime?: string | undefined;
|
|
3240
4646
|
state: "active" | "paused";
|
|
3241
4647
|
revision: number;
|
|
3242
4648
|
reason: string | null;
|
|
@@ -3248,6 +4654,8 @@ export type Workspace = {
|
|
|
3248
4654
|
updatedAt: string;
|
|
3249
4655
|
};
|
|
3250
4656
|
export type WorkspaceSettings = {
|
|
4657
|
+
/** Exact product-model preferences. Invalid/newer values are ignored per model. */
|
|
4658
|
+
modelCompactionThresholds?: unknown;
|
|
3251
4659
|
memoryEnabled?: boolean | undefined;
|
|
3252
4660
|
/** Reversible Memory V1 prompt composition rollout. */
|
|
3253
4661
|
memoryPromptMode?: "legacy_standing" | "retrieval_only" | undefined;
|
|
@@ -3255,6 +4663,8 @@ export type WorkspaceSettings = {
|
|
|
3255
4663
|
sessionDefaults?: WorkspaceSessionDefaults | undefined;
|
|
3256
4664
|
/** Exact capability selection inherited by new top-level sessions. */
|
|
3257
4665
|
sessionToolDefaults?: WorkspaceSessionToolDefaults | undefined;
|
|
4666
|
+
/** Allowlisted sandbox image for new managed boxes; absent uses the deployment image. */
|
|
4667
|
+
defaultSandboxImage?: string | null | undefined;
|
|
3258
4668
|
voiceInput?: WorkspaceVoiceInputSettings | undefined;
|
|
3259
4669
|
transcription?: WorkspaceTranscriptionPolicy | undefined;
|
|
3260
4670
|
maxNestedAgentDepth?: number | null | undefined;
|
|
@@ -3262,9 +4672,13 @@ export type WorkspaceSettings = {
|
|
|
3262
4672
|
codexCompactionDefault?: "remote_v2" | "portable" | undefined;
|
|
3263
4673
|
/** Whether agents may invoke the built-in structured human-input tool. */
|
|
3264
4674
|
agentHumanInputEnabled?: boolean | undefined;
|
|
4675
|
+
/** Whether agents get the Jev-backed code_search tool; absent or null follows the deployment. */
|
|
4676
|
+
codeSearchEnabled?: boolean | null | undefined;
|
|
3265
4677
|
slackReactionSummon?: WorkspaceSlackReactionSummonSettings | undefined;
|
|
3266
4678
|
/** Slack orchestration notices; both default off when absent or invalid. */
|
|
3267
4679
|
slackOrchestrationNotices?: WorkspaceSlackOrchestrationNoticeSettings | undefined;
|
|
4680
|
+
/** False blocks every model billed in Opengeni credits; absent allows them. */
|
|
4681
|
+
allowCreditModels?: boolean | undefined;
|
|
3268
4682
|
[key: string]: unknown;
|
|
3269
4683
|
};
|
|
3270
4684
|
export type WorkspaceSessionDefaults = {
|
|
@@ -3272,8 +4686,9 @@ export type WorkspaceSessionDefaults = {
|
|
|
3272
4686
|
reasoningEffort: ReasoningEffort;
|
|
3273
4687
|
};
|
|
3274
4688
|
export type WorkspaceSessionToolDefaults = {
|
|
3275
|
-
|
|
3276
|
-
|
|
4689
|
+
inheritConnectedMcpServers?: boolean | undefined;
|
|
4690
|
+
mcpServerIds?: string[];
|
|
4691
|
+
firstPartyMcpTools?: FirstPartyMcpToolName[];
|
|
3277
4692
|
};
|
|
3278
4693
|
export type WorkspaceSlackReactionSummonSettings = {
|
|
3279
4694
|
enabled: boolean;
|
|
@@ -3322,21 +4737,41 @@ export type UpdateSlackChannelRoutesRequest = {
|
|
|
3322
4737
|
targetWorkspaceId: string | null;
|
|
3323
4738
|
}>;
|
|
3324
4739
|
};
|
|
4740
|
+
export type VoiceInputProviderId = "azure-mai" | "supergrok-subscription" | "codex-subscription" | "openai" | "azure-openai";
|
|
3325
4741
|
export type WorkspaceVoiceInputSettings = {
|
|
3326
4742
|
enabled: boolean;
|
|
4743
|
+
preferredProvider?: VoiceInputProviderId | null | undefined;
|
|
4744
|
+
fallbackEnabled?: boolean | undefined;
|
|
3327
4745
|
};
|
|
3328
4746
|
export type UpdateWorkspaceSettingsRequest = {
|
|
4747
|
+
/** Independent model patches; null restores that model's default. */
|
|
4748
|
+
modelCompactionThresholds?: Record<string, number | null>;
|
|
3329
4749
|
memoryEnabled?: boolean | undefined;
|
|
3330
4750
|
memoryPromptMode?: "legacy_standing" | "retrieval_only" | undefined;
|
|
3331
|
-
|
|
3332
|
-
|
|
4751
|
+
/** null removes the workspace's own default so it follows its organization's. */
|
|
4752
|
+
sessionDefaults?: WorkspaceSessionDefaults | null | undefined;
|
|
4753
|
+
sessionToolDefaults?: {
|
|
4754
|
+
mcpServerIds?: string[] | null;
|
|
4755
|
+
firstPartyMcpTools?: FirstPartyMcpToolName[] | null;
|
|
4756
|
+
inheritConnectedMcpServers?: boolean | null;
|
|
4757
|
+
} | undefined;
|
|
3333
4758
|
voiceInput?: WorkspaceVoiceInputSettings | undefined;
|
|
3334
4759
|
transcription?: WorkspaceTranscriptionPolicy | undefined;
|
|
3335
4760
|
maxNestedAgentDepth?: number | null | undefined;
|
|
3336
4761
|
codexCompactionDefault?: "remote_v2" | "portable" | undefined;
|
|
3337
4762
|
agentHumanInputEnabled?: boolean | undefined;
|
|
4763
|
+
codeSearchEnabled?: boolean | null | undefined;
|
|
3338
4764
|
slackReactionSummon?: WorkspaceSlackReactionSummonSettings | undefined;
|
|
3339
4765
|
slackOrchestrationNotices?: WorkspaceSlackOrchestrationNoticeSettings | undefined;
|
|
4766
|
+
/** One of `listWorkspaceSandboxImages().images`, or null for the deployment image. */
|
|
4767
|
+
defaultSandboxImage?: string | null | undefined;
|
|
4768
|
+
/** Agent defaults for new sessions; null clears. Requires the admission switch. */
|
|
4769
|
+
sessionAgentDefaults?: WorkspaceAgentDefaults | null | undefined;
|
|
4770
|
+
/**
|
|
4771
|
+
* False blocks every model billed in Opengeni credits in this workspace,
|
|
4772
|
+
* including ones added later; true allows them again.
|
|
4773
|
+
*/
|
|
4774
|
+
allowCreditModels?: boolean | undefined;
|
|
3340
4775
|
[key: string]: unknown;
|
|
3341
4776
|
};
|
|
3342
4777
|
export type SetWorkspaceDefaultRigRequest = {
|
|
@@ -3350,11 +4785,56 @@ export type CreateWorkspaceRequest = {
|
|
|
3350
4785
|
externalId?: string | undefined;
|
|
3351
4786
|
agentInstructions?: string | null | undefined;
|
|
3352
4787
|
};
|
|
4788
|
+
export type EnsureWorkspaceRequest = {
|
|
4789
|
+
/**
|
|
4790
|
+
* Owning organization id. An organization API key may omit it and the
|
|
4791
|
+
* workspace is created in the key's own organization; every other caller
|
|
4792
|
+
* must send it.
|
|
4793
|
+
*/
|
|
4794
|
+
accountId?: string | undefined;
|
|
4795
|
+
externalSource: string;
|
|
4796
|
+
externalId: string;
|
|
4797
|
+
name: string;
|
|
4798
|
+
slug?: string | undefined;
|
|
4799
|
+
agentInstructions?: string | null | undefined;
|
|
4800
|
+
};
|
|
4801
|
+
export type EnsureWorkspaceResponse = {
|
|
4802
|
+
workspace: Workspace;
|
|
4803
|
+
created: boolean;
|
|
4804
|
+
};
|
|
3353
4805
|
export type UpdateWorkspaceRequest = {
|
|
3354
4806
|
name?: string | undefined;
|
|
3355
4807
|
slug?: string | null | undefined;
|
|
3356
4808
|
agentInstructions?: string | null | undefined;
|
|
3357
4809
|
};
|
|
4810
|
+
/**
|
|
4811
|
+
* Legacy organization API key access tier, derived by the server from the key's
|
|
4812
|
+
* permissions: `full` can provision shared workspaces, external members, and
|
|
4813
|
+
* `asUser` sessions (user requests additionally need live membership);
|
|
4814
|
+
* `read` only inventories shared workspaces and reads their sessions, events,
|
|
4815
|
+
* and files. `developer_setup` configures shared workspaces and budgets without
|
|
4816
|
+
* API-key management or credential delegation; its default expiry is 24 hours.
|
|
4817
|
+
* Organization-key scope excludes Personal workspaces and bypasses neither
|
|
4818
|
+
* session visibility nor the explicit `secrets:read` permission requirement.
|
|
4819
|
+
*/
|
|
4820
|
+
export type OrganizationApiKeyAccess = "full" | "read" | "developer_setup";
|
|
4821
|
+
/** Informational preset label; the server recomputes it from explicit permissions. */
|
|
4822
|
+
export type OrganizationAccessPreset = "read_only" | "full" | "custom";
|
|
4823
|
+
/** Organization-key scope always excludes Personal workspaces. */
|
|
4824
|
+
export type OrganizationWorkspaceScope = {
|
|
4825
|
+
kind: "all";
|
|
4826
|
+
} | {
|
|
4827
|
+
kind: "selected";
|
|
4828
|
+
/** Up to 500 unique shared-workspace IDs in the same organization. Empty reaches none. */
|
|
4829
|
+
workspaceIds: string[];
|
|
4830
|
+
};
|
|
4831
|
+
export type OrganizationAccessPolicy = {
|
|
4832
|
+
preset: OrganizationAccessPreset;
|
|
4833
|
+
/** Exact grants, including `workspace:admin` individually; no implicit wildcard. */
|
|
4834
|
+
permissions: Permission[];
|
|
4835
|
+
workspaceScope: OrganizationWorkspaceScope;
|
|
4836
|
+
};
|
|
4837
|
+
export type OrganizationActor = "user" | "organization";
|
|
3358
4838
|
export type ApiKey = {
|
|
3359
4839
|
id: string;
|
|
3360
4840
|
accountId: string;
|
|
@@ -3363,6 +4843,18 @@ export type ApiKey = {
|
|
|
3363
4843
|
description: string | null;
|
|
3364
4844
|
prefix: string;
|
|
3365
4845
|
permissions: Permission[];
|
|
4846
|
+
/** Organization keys only; omitted for workspace-scoped keys. */
|
|
4847
|
+
access?: OrganizationApiKeyAccess | undefined;
|
|
4848
|
+
policy?: OrganizationAccessPolicy | undefined;
|
|
4849
|
+
workspaceScope?: OrganizationWorkspaceScope | undefined;
|
|
4850
|
+
/** Legacy keys retain their historical workspace-admin wildcard. */
|
|
4851
|
+
permissionMode?: "legacy" | "explicit" | undefined;
|
|
4852
|
+
/** Organization keys: the service account that holds the key. */
|
|
4853
|
+
serviceAccount?: {
|
|
4854
|
+
id: string;
|
|
4855
|
+
name: string;
|
|
4856
|
+
role: OrganizationServiceAccountRole;
|
|
4857
|
+
} | null | undefined;
|
|
3366
4858
|
expiresAt: string | null;
|
|
3367
4859
|
revokedAt: string | null;
|
|
3368
4860
|
lastUsedAt: string | null;
|
|
@@ -3380,27 +4872,370 @@ export type CreateApiKeyResponse = {
|
|
|
3380
4872
|
/** The full secret token — shown once at creation, never returned again. */
|
|
3381
4873
|
token: string;
|
|
3382
4874
|
};
|
|
4875
|
+
export type CreateOrganizationApiKeyRequest = {
|
|
4876
|
+
name: string;
|
|
4877
|
+
description?: string | undefined;
|
|
4878
|
+
expiresAt?: string | undefined;
|
|
4879
|
+
/** With no policy, omitted means legacy `full`. */
|
|
4880
|
+
access?: OrganizationApiKeyAccess | undefined;
|
|
4881
|
+
/** Optional creation alias for the developer_setup access tier. */
|
|
4882
|
+
preset?: "developer_setup" | undefined;
|
|
4883
|
+
/** Explicit grants and shared-workspace scope; do not combine with legacy access/preset. */
|
|
4884
|
+
policy?: OrganizationAccessPolicy | undefined;
|
|
4885
|
+
/** The service account that holds the key; omitted creates one named after the key. */
|
|
4886
|
+
serviceAccountId?: string | undefined;
|
|
4887
|
+
};
|
|
4888
|
+
/** The server requires at least one change. Omitted fields stay unchanged. */
|
|
4889
|
+
export type UpdateOrganizationApiKeyRequest = {
|
|
4890
|
+
name?: string | undefined;
|
|
4891
|
+
description?: string | null | undefined;
|
|
4892
|
+
/** Replaces the policy and transitions a legacy key to explicit permission semantics. */
|
|
4893
|
+
policy?: OrganizationAccessPolicy | undefined;
|
|
4894
|
+
};
|
|
3383
4895
|
export type ListApiKeysResponse = {
|
|
3384
4896
|
apiKeys: ApiKey[];
|
|
3385
4897
|
};
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
4898
|
+
/** Up to admin, never owner. A member's keys never hold administrator permissions. */
|
|
4899
|
+
export type OrganizationServiceAccountRole = "admin" | "member";
|
|
4900
|
+
/** An organization identity with no person behind it; it holds organization API keys. */
|
|
4901
|
+
export type OrganizationServiceAccount = {
|
|
4902
|
+
id: string;
|
|
4903
|
+
organizationId: string;
|
|
4904
|
+
name: string;
|
|
4905
|
+
description: string | null;
|
|
4906
|
+
role: OrganizationServiceAccountRole;
|
|
4907
|
+
/** Keys that are not revoked, including expired ones. */
|
|
4908
|
+
activeKeyCount: number;
|
|
3391
4909
|
createdAt: string;
|
|
4910
|
+
updatedAt: string;
|
|
3392
4911
|
};
|
|
3393
|
-
export type
|
|
3394
|
-
|
|
3395
|
-
};
|
|
3396
|
-
export type AddWorkspaceMemberRequest = {
|
|
3397
|
-
email: string;
|
|
3398
|
-
role?: string | undefined;
|
|
3399
|
-
permissions: Permission[];
|
|
4912
|
+
export type ListOrganizationServiceAccountsResponse = {
|
|
4913
|
+
serviceAccounts: OrganizationServiceAccount[];
|
|
3400
4914
|
};
|
|
3401
|
-
export type
|
|
3402
|
-
|
|
3403
|
-
|
|
4915
|
+
export type CreateOrganizationServiceAccountRequest = {
|
|
4916
|
+
name: string;
|
|
4917
|
+
description?: string | undefined;
|
|
4918
|
+
/** Defaults to member. Only an organization administrator can choose admin. */
|
|
4919
|
+
role?: OrganizationServiceAccountRole | undefined;
|
|
4920
|
+
};
|
|
4921
|
+
/** The server requires at least one change. Making it a member narrows its keys. */
|
|
4922
|
+
export type UpdateOrganizationServiceAccountRequest = {
|
|
4923
|
+
name?: string | undefined;
|
|
4924
|
+
description?: string | null | undefined;
|
|
4925
|
+
role?: OrganizationServiceAccountRole | undefined;
|
|
4926
|
+
};
|
|
4927
|
+
/** An outside agent a person connected to the organization MCP server. */
|
|
4928
|
+
export type OrganizationMcpConnection = {
|
|
4929
|
+
id: string;
|
|
4930
|
+
/** The name the client registered with ("Claude Code"). */
|
|
4931
|
+
clientName: string;
|
|
4932
|
+
/** Where its sign-in returned to ("127.0.0.1:4567", "cursor.com"). */
|
|
4933
|
+
clientHost: string | null;
|
|
4934
|
+
/** Signed-in agents act as the person who connected them. */
|
|
4935
|
+
actor: "user";
|
|
4936
|
+
connectedBy: {
|
|
4937
|
+
subjectId: string;
|
|
4938
|
+
name: string;
|
|
4939
|
+
};
|
|
4940
|
+
/** What it can do and where. The person's own live access still caps it. */
|
|
4941
|
+
policy: OrganizationAccessPolicy;
|
|
4942
|
+
createdAt: string;
|
|
4943
|
+
lastUsedAt: string | null;
|
|
4944
|
+
expiresAt: string;
|
|
4945
|
+
revokedAt: null;
|
|
4946
|
+
};
|
|
4947
|
+
export type OrganizationMcpConnectionList = {
|
|
4948
|
+
connections: OrganizationMcpConnection[];
|
|
4949
|
+
/** Owners and admins see and can disconnect everyone's agents. */
|
|
4950
|
+
canManageAll: boolean;
|
|
4951
|
+
};
|
|
4952
|
+
export type UpdateOrganizationMcpConnectionRequest = {
|
|
4953
|
+
access: OrganizationAccessPolicy;
|
|
4954
|
+
};
|
|
4955
|
+
/**
|
|
4956
|
+
* A key that acts as the person who created it: their live access in this
|
|
4957
|
+
* organization, capped by `access`. It stops working when they leave.
|
|
4958
|
+
*/
|
|
4959
|
+
export type PersonalApiKey = {
|
|
4960
|
+
id: string;
|
|
4961
|
+
organizationId: string;
|
|
4962
|
+
name: string;
|
|
4963
|
+
description: string | null;
|
|
4964
|
+
/** The first characters of the key, to recognize it. */
|
|
4965
|
+
prefix: string;
|
|
4966
|
+
access: OrganizationAccessPolicy;
|
|
4967
|
+
owner: {
|
|
4968
|
+
subjectId: string;
|
|
4969
|
+
name: string;
|
|
4970
|
+
};
|
|
4971
|
+
expiresAt: string | null;
|
|
4972
|
+
lastUsedAt: string | null;
|
|
4973
|
+
createdAt: string;
|
|
4974
|
+
};
|
|
4975
|
+
export type ListPersonalApiKeysResponse = {
|
|
4976
|
+
apiKeys: PersonalApiKey[];
|
|
4977
|
+
/** Owners and admins see everyone's keys and can revoke them. */
|
|
4978
|
+
canManageAll: boolean;
|
|
4979
|
+
};
|
|
4980
|
+
export type CreatePersonalApiKeyRequest = {
|
|
4981
|
+
name: string;
|
|
4982
|
+
description?: string | undefined;
|
|
4983
|
+
access: OrganizationAccessPolicy;
|
|
4984
|
+
/** Omitted means the key never expires. */
|
|
4985
|
+
expiresAt?: string | undefined;
|
|
4986
|
+
};
|
|
4987
|
+
export type CreatePersonalApiKeyResponse = {
|
|
4988
|
+
apiKey: PersonalApiKey;
|
|
4989
|
+
/** The full secret token, shown once at creation. */
|
|
4990
|
+
token: string;
|
|
4991
|
+
};
|
|
4992
|
+
/** A pending agent sign-in, as the web app's sign-in page shows it. */
|
|
4993
|
+
export type McpConnectionRequest = {
|
|
4994
|
+
client: {
|
|
4995
|
+
name: string;
|
|
4996
|
+
host: string | null;
|
|
4997
|
+
};
|
|
4998
|
+
person: {
|
|
4999
|
+
name: string | null;
|
|
5000
|
+
};
|
|
5001
|
+
organizations: Array<{
|
|
5002
|
+
id: string;
|
|
5003
|
+
name: string;
|
|
5004
|
+
workspaces: Array<{
|
|
5005
|
+
id: string;
|
|
5006
|
+
name: string;
|
|
5007
|
+
personal: boolean;
|
|
5008
|
+
}>;
|
|
5009
|
+
/** Everything the person can do there; the most an agent can get. */
|
|
5010
|
+
grantable: Permission[];
|
|
5011
|
+
}>;
|
|
5012
|
+
defaultOrganizationId: string | null;
|
|
5013
|
+
};
|
|
5014
|
+
export type McpConnectionDecision = {
|
|
5015
|
+
decision: "deny";
|
|
5016
|
+
} | {
|
|
5017
|
+
decision: "approve";
|
|
5018
|
+
organizationId: string;
|
|
5019
|
+
access: OrganizationAccessPolicy;
|
|
5020
|
+
};
|
|
5021
|
+
/** Why an inbox item waits on the person. */
|
|
5022
|
+
export type InboxItemKind = "question" | "approval" | "goal_paused" | "notification" | "reply";
|
|
5023
|
+
/**
|
|
5024
|
+
* One thing that waits on the person: a question, an approval, a goal the agent
|
|
5025
|
+
* paused on them, or an agent's notification. It leaves the inbox when it is
|
|
5026
|
+
* answered, resolved, withdrawn or dismissed; it stays in the session's timeline.
|
|
5027
|
+
*/
|
|
5028
|
+
export type InboxItem = {
|
|
5029
|
+
id: string;
|
|
5030
|
+
workspaceId: string;
|
|
5031
|
+
sessionId: string;
|
|
5032
|
+
sessionTitle: string | null;
|
|
5033
|
+
kind: InboxItemKind;
|
|
5034
|
+
/** The question or approval id, or the notification key. */
|
|
5035
|
+
sourceKey: string;
|
|
5036
|
+
title: string;
|
|
5037
|
+
/** A notification's subtitle; empty otherwise. */
|
|
5038
|
+
subtitle: string;
|
|
5039
|
+
/** Plain text, or for a notification its message (paragraphs, "- " bullets, **bold**, `code`, links). */
|
|
5040
|
+
body: string;
|
|
5041
|
+
/** A notification's label/value facts (at most four); empty otherwise. */
|
|
5042
|
+
facts: InboxItemFact[];
|
|
5043
|
+
/** A notification's link outside the session, or null. */
|
|
5044
|
+
link: InboxItemLink | null;
|
|
5045
|
+
/**
|
|
5046
|
+
* The session event that opened or last updated the item: open the session
|
|
5047
|
+
* at this point. Null for items from before this was recorded.
|
|
5048
|
+
*/
|
|
5049
|
+
eventSequence: number | null;
|
|
5050
|
+
/** One-tap answers for a single short choice question; empty otherwise. */
|
|
5051
|
+
choices: InboxItemChoice[];
|
|
5052
|
+
urgency: "normal" | "time_sensitive";
|
|
5053
|
+
status: "open" | "resolved" | "withdrawn" | "dismissed";
|
|
5054
|
+
/** True while the person has not seen the item's current content. */
|
|
5055
|
+
unread: boolean;
|
|
5056
|
+
snoozedUntil: string | null;
|
|
5057
|
+
createdAt: string;
|
|
5058
|
+
updatedAt: string;
|
|
5059
|
+
resolvedAt: string | null;
|
|
5060
|
+
/** Another workspace member whose agent sent this notification; null for the person's own. */
|
|
5061
|
+
sender?: InboxItemSender | null;
|
|
5062
|
+
/**
|
|
5063
|
+
* Whether the person can open the session the item came from. False for
|
|
5064
|
+
* another member's private session: show no session link then.
|
|
5065
|
+
*/
|
|
5066
|
+
sessionAvailable?: boolean;
|
|
5067
|
+
};
|
|
5068
|
+
/** The member an agent notified the person for. */
|
|
5069
|
+
export type InboxItemSender = {
|
|
5070
|
+
subjectId: string;
|
|
5071
|
+
label: string;
|
|
5072
|
+
};
|
|
5073
|
+
/** A short label and value an agent attached to a notification. */
|
|
5074
|
+
export type InboxItemFact = {
|
|
5075
|
+
label: string;
|
|
5076
|
+
value: string;
|
|
5077
|
+
};
|
|
5078
|
+
/** A place outside the session an agent's notification points to. */
|
|
5079
|
+
export type InboxItemLink = {
|
|
5080
|
+
url: string;
|
|
5081
|
+
label: string;
|
|
5082
|
+
};
|
|
5083
|
+
/** An option of the question behind an inbox item, answerable in one tap. */
|
|
5084
|
+
export type InboxItemChoice = {
|
|
5085
|
+
id: string;
|
|
5086
|
+
label: string;
|
|
5087
|
+
};
|
|
5088
|
+
export type ListInboxResponse = {
|
|
5089
|
+
items: InboxItem[];
|
|
5090
|
+
/** Open, unsnoozed items that need the person (questions, approvals, paused goals). */
|
|
5091
|
+
needsYouCount: number;
|
|
5092
|
+
/** Open, unsnoozed, unread items of any kind. */
|
|
5093
|
+
unreadCount: number;
|
|
5094
|
+
};
|
|
5095
|
+
/** The person's own attention on an item; answering happens in the session. */
|
|
5096
|
+
export type UpdateInboxItemInput = {
|
|
5097
|
+
seen?: true;
|
|
5098
|
+
/** ISO time to hide the item until, or null to unsnooze. */
|
|
5099
|
+
snoozedUntil?: string | null;
|
|
5100
|
+
dismissed?: true;
|
|
5101
|
+
};
|
|
5102
|
+
/**
|
|
5103
|
+
* What agents may do in the person's inbox: tidy notifications (from their own
|
|
5104
|
+
* sessions, or any agent's), or `full_access` to see every open item and
|
|
5105
|
+
* snooze or dismiss it. Agents never answer or approve for the person.
|
|
5106
|
+
*/
|
|
5107
|
+
export type InboxTidyPolicy = "own_sessions" | "any_agent" | "full_access";
|
|
5108
|
+
export type InboxSettings = {
|
|
5109
|
+
tidyPolicy: InboxTidyPolicy;
|
|
5110
|
+
/**
|
|
5111
|
+
* Goals an agent paused in the person's own sessions reach the inbox. Off by
|
|
5112
|
+
* default. Always present in responses; leave it out of an update to keep it.
|
|
5113
|
+
*/
|
|
5114
|
+
pausedGoals?: boolean;
|
|
5115
|
+
/**
|
|
5116
|
+
* Keep each session's latest reply in the inbox until the person clears it.
|
|
5117
|
+
* Off by default. Always present in responses; leave it out to keep it.
|
|
5118
|
+
*/
|
|
5119
|
+
replies?: boolean;
|
|
5120
|
+
/**
|
|
5121
|
+
* Alert the phone for the agent's questions and approvals as time-sensitive,
|
|
5122
|
+
* so they break through Focus on iPhone. Off by default. Always present in
|
|
5123
|
+
* responses; leave it out to keep it.
|
|
5124
|
+
*/
|
|
5125
|
+
timeSensitiveNeedsYou?: boolean;
|
|
5126
|
+
};
|
|
5127
|
+
/**
|
|
5128
|
+
* The signed-in person's mute on one session. Muted replies neither reach the
|
|
5129
|
+
* inbox nor alert the phone; the agent's notifications, questions and
|
|
5130
|
+
* approvals still do.
|
|
5131
|
+
*/
|
|
5132
|
+
export type SessionInboxMute = {
|
|
5133
|
+
repliesMuted: boolean;
|
|
5134
|
+
};
|
|
5135
|
+
/**
|
|
5136
|
+
* Whether other members' agents may notify the signed-in person in one
|
|
5137
|
+
* workspace. Each person decides for themselves; off by default.
|
|
5138
|
+
*/
|
|
5139
|
+
export type MemberNotificationsSetting = {
|
|
5140
|
+
allowOthers: boolean;
|
|
5141
|
+
};
|
|
5142
|
+
export type NativeAppPlatform = "ios" | "android" | "macos" | "windows" | "linux";
|
|
5143
|
+
export type NativeAppAuthorizeInput = {
|
|
5144
|
+
/** Exactly `<registered scheme>://auth/callback`. */
|
|
5145
|
+
redirectUri: string;
|
|
5146
|
+
/** Base64url SHA-256 of the app's code verifier. */
|
|
5147
|
+
codeChallenge: string;
|
|
5148
|
+
codeChallengeMethod: "S256";
|
|
5149
|
+
state?: string;
|
|
5150
|
+
platform: NativeAppPlatform;
|
|
5151
|
+
deviceName?: string;
|
|
5152
|
+
};
|
|
5153
|
+
export type NativeAppTokenInput = {
|
|
5154
|
+
code: string;
|
|
5155
|
+
codeVerifier: string;
|
|
5156
|
+
redirectUri: string;
|
|
5157
|
+
};
|
|
5158
|
+
export type NativeAppToken = {
|
|
5159
|
+
/** Sent as `Authorization: Bearer <accessToken>` (the client's `apiKey`). */
|
|
5160
|
+
accessToken: string;
|
|
5161
|
+
tokenType: "Bearer";
|
|
5162
|
+
expiresAt: string;
|
|
5163
|
+
};
|
|
5164
|
+
/**
|
|
5165
|
+
* What a signed-in app is pushed about, for sessions its person started:
|
|
5166
|
+
* `needs_input` (a question or an approval), `reply_ready` (a turn finished),
|
|
5167
|
+
* `failed` (a turn failed) and `agent` (the agent chose to notify).
|
|
5168
|
+
*/
|
|
5169
|
+
export type NativePushRule = "needs_input" | "reply_ready" | "failed" | "agent";
|
|
5170
|
+
export type RegisterNativePushDeviceInput = {
|
|
5171
|
+
platform: NativeAppPlatform;
|
|
5172
|
+
/** The app's bundle identifier (iOS) or package name (Android). */
|
|
5173
|
+
appId: string;
|
|
5174
|
+
/** APNs environment of the build; FCM ignores it. */
|
|
5175
|
+
environment: "development" | "production";
|
|
5176
|
+
/** The APNs device token (hex) or FCM registration token. */
|
|
5177
|
+
token: string;
|
|
5178
|
+
rules: NativePushRule[];
|
|
5179
|
+
};
|
|
5180
|
+
/** This app credential's push registration. */
|
|
5181
|
+
export type NativePushDevice = {
|
|
5182
|
+
platform: NativeAppPlatform;
|
|
5183
|
+
appId: string;
|
|
5184
|
+
environment: "development" | "production";
|
|
5185
|
+
token: string;
|
|
5186
|
+
rules: NativePushRule[];
|
|
5187
|
+
updatedAt: string;
|
|
5188
|
+
};
|
|
5189
|
+
export type ListOrganizationSessionsOptions = {
|
|
5190
|
+
/** Page size, 1..200; the server default is 50. */
|
|
5191
|
+
limit?: number | undefined;
|
|
5192
|
+
/** `nextCursor` from the previous page. */
|
|
5193
|
+
cursor?: string | undefined;
|
|
5194
|
+
/** Keep only sessions labelled with this exact end user. */
|
|
5195
|
+
scopeSubjectId?: string | undefined;
|
|
5196
|
+
/** Keep only sessions in this exact lifecycle state. */
|
|
5197
|
+
status?: SessionStatus | undefined;
|
|
5198
|
+
signal?: AbortSignal | undefined;
|
|
5199
|
+
};
|
|
5200
|
+
/**
|
|
5201
|
+
* One page of `GET /v1/organizations/:organizationId/sessions`. Rows come from
|
|
5202
|
+
* every shared workspace the caller may read, each carrying its
|
|
5203
|
+
* `workspaceId`; personal workspaces are never included and private sessions
|
|
5204
|
+
* stay invisible. A page may be shorter than `limit` while `nextCursor` is
|
|
5205
|
+
* still set, so follow `nextCursor` until it is null.
|
|
5206
|
+
*/
|
|
5207
|
+
export type OrganizationSessionListResponse = {
|
|
5208
|
+
sessions: Session[];
|
|
5209
|
+
nextCursor: string | null;
|
|
5210
|
+
};
|
|
5211
|
+
export type WorkspaceMember = {
|
|
5212
|
+
subjectId: string;
|
|
5213
|
+
subjectLabel: string | null;
|
|
5214
|
+
role: string;
|
|
5215
|
+
permissions: Permission[];
|
|
5216
|
+
createdAt: string;
|
|
5217
|
+
};
|
|
5218
|
+
export type ListWorkspaceMembersResponse = {
|
|
5219
|
+
members: WorkspaceMember[];
|
|
5220
|
+
};
|
|
5221
|
+
export type WorkspaceMemberCandidate = {
|
|
5222
|
+
organizationMembershipId: string;
|
|
5223
|
+
subjectId: string;
|
|
5224
|
+
name: string | null;
|
|
5225
|
+
email: string | null;
|
|
5226
|
+
organizationRole: "owner" | "admin" | "member";
|
|
5227
|
+
};
|
|
5228
|
+
export type ListWorkspaceMemberCandidatesResponse = {
|
|
5229
|
+
members: WorkspaceMemberCandidate[];
|
|
5230
|
+
};
|
|
5231
|
+
export type AddWorkspaceMemberRequest = {
|
|
5232
|
+
organizationMembershipId: string;
|
|
5233
|
+
role?: string | undefined;
|
|
5234
|
+
permissions: Permission[];
|
|
5235
|
+
};
|
|
5236
|
+
export type UpdateWorkspaceMemberRequest = {
|
|
5237
|
+
role?: string | undefined;
|
|
5238
|
+
permissions: Permission[];
|
|
3404
5239
|
};
|
|
3405
5240
|
export type SlackUserLinkAccessRequestStatus = "prepared" | "pending" | "completed" | "denied" | "cancelled" | "expired";
|
|
3406
5241
|
/** Token-free durable projection of one signed Slack identity-link intent. */
|
|
@@ -3492,7 +5327,7 @@ export type SessionGoalContinuation = {
|
|
|
3492
5327
|
observedRevision: number;
|
|
3493
5328
|
nextAttemptAt: string | null;
|
|
3494
5329
|
lastError: string | null;
|
|
3495
|
-
/** Agent-stated reason for a `
|
|
5330
|
+
/** Agent-stated reason for a `wait_for_input` hold; null otherwise. */
|
|
3496
5331
|
holdReason?: string | null | undefined;
|
|
3497
5332
|
};
|
|
3498
5333
|
export type SessionGoal = {
|
|
@@ -3504,6 +5339,8 @@ export type SessionGoal = {
|
|
|
3504
5339
|
text: string;
|
|
3505
5340
|
successCriteria: string | null;
|
|
3506
5341
|
rootConstraints: string[];
|
|
5342
|
+
/** Optional for older-server/source compatibility; current servers always supply this projection. */
|
|
5343
|
+
reportRequirements?: SessionGoalReportRequirement[] | undefined;
|
|
3507
5344
|
evidence: string | null;
|
|
3508
5345
|
rationale: string | null;
|
|
3509
5346
|
pausedReason: string | null;
|
|
@@ -3534,10 +5371,6 @@ export type UpdateSessionGoalRequest = {
|
|
|
3534
5371
|
export type UpdateSessionRequest = {
|
|
3535
5372
|
title: string;
|
|
3536
5373
|
};
|
|
3537
|
-
/** Replace the complete ordered low-to-high precedence Variable Set selection. */
|
|
3538
|
-
export type UpdateSessionVariableSetsRequest = {
|
|
3539
|
-
variableSetIds: string[];
|
|
3540
|
-
};
|
|
3541
5374
|
/** Outcome of a manual /compact trigger. */
|
|
3542
5375
|
export type CompactSessionContextResult = {
|
|
3543
5376
|
/** pending waits for the current safe boundary; completed ran while idle. */
|
|
@@ -3610,16 +5443,17 @@ export type ComposerDraft = {
|
|
|
3610
5443
|
updatedAt: string | null;
|
|
3611
5444
|
};
|
|
3612
5445
|
export type NewSessionDraftOptions = {
|
|
5446
|
+
agentLearning?: import("@opengeni/contracts").AgentLearningOverrides | undefined;
|
|
5447
|
+
excludedMcpServerIds?: string[] | undefined;
|
|
3613
5448
|
visibility?: SessionVisibility | undefined;
|
|
3614
5449
|
sandboxBackend?: SandboxBackend | undefined;
|
|
3615
5450
|
targetSandboxId?: string | undefined;
|
|
3616
5451
|
workingDir?: string | undefined;
|
|
3617
|
-
variableSetIds?: string[] | undefined;
|
|
3618
|
-
variableSetId?: string | undefined;
|
|
3619
5452
|
rigId?: string | undefined;
|
|
3620
5453
|
goal?: GoalSpec | undefined;
|
|
3621
5454
|
firstPartyMcpPermissions?: Permission[] | undefined;
|
|
3622
5455
|
firstPartyMcpTools?: FirstPartyMcpToolName[] | undefined;
|
|
5456
|
+
agent?: AgentConfigRequest | undefined;
|
|
3623
5457
|
};
|
|
3624
5458
|
export type NewSessionSelectionHistory = {
|
|
3625
5459
|
/** Most-recently used project first. Null channelId is the Default project. */
|
|
@@ -3644,6 +5478,13 @@ export type NewSessionDraft = {
|
|
|
3644
5478
|
model: string;
|
|
3645
5479
|
reasoningEffort: ReasoningEffort;
|
|
3646
5480
|
latencyMode: LatencyMode;
|
|
5481
|
+
/**
|
|
5482
|
+
* True when the person chose this model policy; false follows the resolved
|
|
5483
|
+
* default for new chats. Absent from older servers.
|
|
5484
|
+
*/
|
|
5485
|
+
modelProvided?: boolean | undefined;
|
|
5486
|
+
/** Absent on legacy drafts; null records an explicit Default-project selection. */
|
|
5487
|
+
selectedProjectChannelId?: string | null | undefined;
|
|
3647
5488
|
options: NewSessionDraftOptions;
|
|
3648
5489
|
selectionHistory: NewSessionSelectionHistory;
|
|
3649
5490
|
updatedAt: string | null;
|
|
@@ -3666,8 +5507,28 @@ export type SessionQueueSnapshot = {
|
|
|
3666
5507
|
};
|
|
3667
5508
|
export type SessionPendingInputPreview = Pick<SessionSystemUpdate, "id" | "sessionId" | "kind" | "classification" | "sourceId" | "summary" | "createdAt">;
|
|
3668
5509
|
export type SystemUpdateClassification = "success" | "failure" | "action_required" | "info";
|
|
3669
|
-
export type SessionSystemUpdateKind = "scheduled_occurrence" | "goal_continuation" | "agent_message" | "agent_steer_instruction" | "child_terminal_result" | "media_generation_result" | "child_requires_action" | "child_requires_action_resolved" | "child_paused" | "child_waiting_capacity" | "child_progress";
|
|
5510
|
+
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";
|
|
3670
5511
|
export type SessionSystemUpdateState = "pending" | "delivered" | "cancelled" | "superseded" | "failed";
|
|
5512
|
+
export type SessionSystemUpdatePayload = {
|
|
5513
|
+
type: "session_wait_timeout";
|
|
5514
|
+
waitTurnId: string;
|
|
5515
|
+
deadlineAt: string;
|
|
5516
|
+
reason: string;
|
|
5517
|
+
[key: string]: unknown;
|
|
5518
|
+
} | {
|
|
5519
|
+
type: "background_command_result";
|
|
5520
|
+
commandId: string;
|
|
5521
|
+
state: "exited" | "lost";
|
|
5522
|
+
exitCode: number | null;
|
|
5523
|
+
reason: string;
|
|
5524
|
+
outputLocator: {
|
|
5525
|
+
eventType: "sandbox.command.output.delta";
|
|
5526
|
+
commandId: string;
|
|
5527
|
+
};
|
|
5528
|
+
[key: string]: unknown;
|
|
5529
|
+
} | ({
|
|
5530
|
+
type: Exclude<SessionSystemUpdateKind, "session_wait_timeout" | "background_command_result">;
|
|
5531
|
+
} & Record<string, unknown>);
|
|
3671
5532
|
export type SessionSystemUpdate = {
|
|
3672
5533
|
id: string;
|
|
3673
5534
|
sessionId: string;
|
|
@@ -3676,7 +5537,7 @@ export type SessionSystemUpdate = {
|
|
|
3676
5537
|
sourceId: string;
|
|
3677
5538
|
dedupeKey: string;
|
|
3678
5539
|
summary: string;
|
|
3679
|
-
payload:
|
|
5540
|
+
payload: SessionSystemUpdatePayload;
|
|
3680
5541
|
lineage: Record<string, unknown>;
|
|
3681
5542
|
state: SessionSystemUpdateState;
|
|
3682
5543
|
deliveredTurnId: string | null;
|
|
@@ -3684,6 +5545,56 @@ export type SessionSystemUpdate = {
|
|
|
3684
5545
|
deliveredAt: string | null;
|
|
3685
5546
|
createdAt: string;
|
|
3686
5547
|
};
|
|
5548
|
+
export type SessionRetryRequest = {
|
|
5549
|
+
clientEventId: string;
|
|
5550
|
+
failureEventId: string;
|
|
5551
|
+
model?: string;
|
|
5552
|
+
reasoningEffort?: ReasoningEffort;
|
|
5553
|
+
latencyMode?: LatencyMode;
|
|
5554
|
+
};
|
|
5555
|
+
export type SandboxRecoverySelection = {
|
|
5556
|
+
version: 1;
|
|
5557
|
+
sessionId: string;
|
|
5558
|
+
sandboxGroupId: string;
|
|
5559
|
+
leaseId: string;
|
|
5560
|
+
routeEpoch: number;
|
|
5561
|
+
authorityEpoch: number;
|
|
5562
|
+
leaseEpoch: number;
|
|
5563
|
+
workspaceGeneration: number;
|
|
5564
|
+
archiveGeneration: number;
|
|
5565
|
+
artifactId: string;
|
|
5566
|
+
revision: string;
|
|
5567
|
+
capturedAt: string;
|
|
5568
|
+
};
|
|
5569
|
+
export type SandboxRecoveryProjection = {
|
|
5570
|
+
version: 1;
|
|
5571
|
+
status: "unsupported" | "blocked" | "eligible" | "consent_accepted" | "restoring" | "restored";
|
|
5572
|
+
reason: string | null;
|
|
5573
|
+
checkpoint: SandboxRecoverySelection | null;
|
|
5574
|
+
operationId: string | null;
|
|
5575
|
+
automaticAvailable?: boolean;
|
|
5576
|
+
/** What an automatic Retry does: restore `checkpoint`, or continue on a new
|
|
5577
|
+
* empty workspace because no usable checkpoint survived the sandbox loss. */
|
|
5578
|
+
automaticLane?: "checkpoint" | "fresh_workspace";
|
|
5579
|
+
/** For a timed recovery wait: the earliest time a Retry or a new message can
|
|
5580
|
+
* let Opengeni decide again. Nothing proceeds by itself before then. */
|
|
5581
|
+
availableAt?: string;
|
|
5582
|
+
};
|
|
5583
|
+
export type SandboxRecoveryRequest = {
|
|
5584
|
+
operationId: string;
|
|
5585
|
+
acceptHistoricalCheckpoint: true;
|
|
5586
|
+
selection: SandboxRecoverySelection;
|
|
5587
|
+
};
|
|
5588
|
+
export type SandboxRecoveryResponse = {
|
|
5589
|
+
outcome: "accepted" | "replayed";
|
|
5590
|
+
operationId: string;
|
|
5591
|
+
recovery: SandboxRecoveryProjection;
|
|
5592
|
+
};
|
|
5593
|
+
export type SessionRetryResponse = {
|
|
5594
|
+
outcome: "accepted" | "replayed";
|
|
5595
|
+
turnId: string;
|
|
5596
|
+
failureEventId: string;
|
|
5597
|
+
};
|
|
3687
5598
|
export type SessionControlResponse = {
|
|
3688
5599
|
receipt: SessionCommandReceipt;
|
|
3689
5600
|
effectiveControl: EffectiveSessionControl;
|
|
@@ -3692,6 +5603,19 @@ export type SessionControlResponse = {
|
|
|
3692
5603
|
cancelledSessionCount: number;
|
|
3693
5604
|
cancelledTurnCount: number;
|
|
3694
5605
|
};
|
|
5606
|
+
export type WorkspacePauseTimer = {
|
|
5607
|
+
id: string;
|
|
5608
|
+
action: "pause" | "resume";
|
|
5609
|
+
dueAt: string;
|
|
5610
|
+
pauseForSeconds: number | null;
|
|
5611
|
+
};
|
|
5612
|
+
export type WorkspacePauseTimerRequest = {
|
|
5613
|
+
action: "set" | "cancel";
|
|
5614
|
+
pauseInSeconds?: number | undefined;
|
|
5615
|
+
pauseForSeconds?: number | null | undefined;
|
|
5616
|
+
clientEventId: string;
|
|
5617
|
+
expectedRevision: number;
|
|
5618
|
+
};
|
|
3695
5619
|
export type WorkspaceInferenceControlResponse = {
|
|
3696
5620
|
receipt: SessionCommandReceipt;
|
|
3697
5621
|
state: "active" | "paused";
|
|
@@ -3708,7 +5632,7 @@ export type WorkspaceControlEvent = {
|
|
|
3708
5632
|
type: "workspace.control.changed";
|
|
3709
5633
|
scope: "workspace" | "session";
|
|
3710
5634
|
rootSessionId: string | null;
|
|
3711
|
-
action: "pause" | "resume";
|
|
5635
|
+
action: "pause" | "resume" | "timer_set" | "timer_cancelled";
|
|
3712
5636
|
automatic: boolean;
|
|
3713
5637
|
reason: string | null;
|
|
3714
5638
|
actor: string;
|
|
@@ -3765,7 +5689,7 @@ export type SubmitComposerDraftRequest = Omit<SaveComposerDraftRequest, "expecte
|
|
|
3765
5689
|
controlEtag?: string;
|
|
3766
5690
|
modelContext?: string;
|
|
3767
5691
|
mcpCredentialUpdates?: SessionMcpCredentialUpdateInput[];
|
|
3768
|
-
|
|
5692
|
+
connectionAccounts?: McpConnectionAccountSelection[];
|
|
3769
5693
|
personalResourceAttachment?: PersonalResourceAttachmentIntent;
|
|
3770
5694
|
};
|
|
3771
5695
|
export type SubmitComposerDraftResponse = {
|
|
@@ -3782,35 +5706,79 @@ export type SaveNewSessionDraftRequest = Omit<NewSessionDraft, "revision" | "sel
|
|
|
3782
5706
|
};
|
|
3783
5707
|
/** Input shape for agent config on create/update (server applies defaults). */
|
|
3784
5708
|
export type ScheduledTaskAgentConfigInput = {
|
|
5709
|
+
/**
|
|
5710
|
+
* Agent configuration frozen into the schedule and used by every run;
|
|
5711
|
+
* omitted runs follow the workspace's agent defaults.
|
|
5712
|
+
*/
|
|
5713
|
+
agent?: AgentConfigRequest | undefined;
|
|
5714
|
+
knowledgeSource?: Extract<ScheduledTaskAction, {
|
|
5715
|
+
kind: "knowledge_source_sync";
|
|
5716
|
+
}> | undefined;
|
|
3785
5717
|
prompt: string;
|
|
3786
5718
|
resources?: ResourceRef[] | undefined;
|
|
5719
|
+
/**
|
|
5720
|
+
* Connectors added on top of the workspace defaults when `toolPolicy` is
|
|
5721
|
+
* set; otherwise the exact list. Omit both on a schedule that starts its
|
|
5722
|
+
* own session to follow the workspace defaults at each run.
|
|
5723
|
+
*/
|
|
3787
5724
|
tools?: ToolRef[] | undefined;
|
|
5725
|
+
/** Follow the workspace's default connectors at each run, except the excluded ones. */
|
|
5726
|
+
toolPolicy?: ScheduledTaskToolPolicy | undefined;
|
|
3788
5727
|
metadata?: Record<string, unknown> | undefined;
|
|
3789
5728
|
slackBotConnectionId?: string | undefined;
|
|
5729
|
+
/** Slack channel a person chose for this task's bot posts; requires slackBotConnectionId. */
|
|
5730
|
+
slackBotChannelId?: string | undefined;
|
|
3790
5731
|
model?: string | undefined;
|
|
3791
5732
|
reasoningEffort?: ReasoningEffort | undefined;
|
|
3792
5733
|
sandboxBackend?: SandboxBackend | undefined;
|
|
5734
|
+
machineTarget?: {
|
|
5735
|
+
targetSandboxId: string;
|
|
5736
|
+
workingDir?: string | undefined;
|
|
5737
|
+
} | undefined;
|
|
3793
5738
|
goal?: GoalSpec | undefined;
|
|
3794
5739
|
executionClass?: "incident_telemetry" | undefined;
|
|
3795
5740
|
incidentTelemetryPreflight?: IncidentTelemetryPreflightInput | undefined;
|
|
3796
5741
|
maxNestedAgentDepth?: number | undefined;
|
|
5742
|
+
/**
|
|
5743
|
+
* Seconds a run's own turn may wait on a person (tool approval or structured
|
|
5744
|
+
* question, 60 s - 30 days) before the scheduler rejects the approval / skips
|
|
5745
|
+
* the question as a labelled system decision. Omitted: waits indefinitely.
|
|
5746
|
+
*/
|
|
5747
|
+
approvalTimeoutSeconds?: number | undefined;
|
|
3797
5748
|
};
|
|
3798
5749
|
export type CreateAgentScheduledTaskRequest = {
|
|
5750
|
+
agentLearning?: {
|
|
5751
|
+
scope: "workspace" | "personal";
|
|
5752
|
+
settings: import("./knowledge.js").AgentLearningOverrides;
|
|
5753
|
+
};
|
|
3799
5754
|
name: string;
|
|
3800
5755
|
schedule: ScheduledTaskScheduleSpec;
|
|
5756
|
+
/** Who can see it. Omitted: everyone in the workspace. */
|
|
5757
|
+
visibility?: SessionVisibility | undefined;
|
|
3801
5758
|
action?: {
|
|
3802
5759
|
kind: "agent_turn";
|
|
3803
5760
|
} | undefined;
|
|
3804
5761
|
runMode?: ScheduledTaskRunMode | undefined;
|
|
3805
5762
|
targetSessionId?: string | null | undefined;
|
|
3806
|
-
|
|
5763
|
+
/**
|
|
5764
|
+
* Connector accounts a person pins for a schedule that starts its own
|
|
5765
|
+
* session (never an existing-chat schedule, never an agent).
|
|
5766
|
+
*/
|
|
5767
|
+
pinnedAccounts?: McpConnectionAccountSelection[] | undefined;
|
|
5768
|
+
/** Skip an occurrence instead of running without an unusable pinned account. */
|
|
5769
|
+
pinnedAccountsRequired?: boolean | undefined;
|
|
3807
5770
|
overlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
|
|
3808
5771
|
agentConfig: ScheduledTaskAgentConfigInput;
|
|
3809
5772
|
status?: ScheduledTaskStatus | undefined;
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
5773
|
+
/**
|
|
5774
|
+
* Sandbox Environment each run binds to; its active version is resolved per
|
|
5775
|
+
* fire. Omit to resolve it once at create: the workspace default (none for a
|
|
5776
|
+
* Connected Machine task), or the target session's own environment for an
|
|
5777
|
+
* existing-session task. `null` means none.
|
|
5778
|
+
*/
|
|
3813
5779
|
rigId?: string | null | undefined;
|
|
5780
|
+
/** Vault narrowing for every run; omission adds none. */
|
|
5781
|
+
vaultPolicy?: VaultPolicy | undefined;
|
|
3814
5782
|
metadata?: Record<string, unknown> | undefined;
|
|
3815
5783
|
};
|
|
3816
5784
|
export type CreateKnowledgeSourceSyncScheduledTaskRequest = {
|
|
@@ -3823,21 +5791,49 @@ export type CreateKnowledgeSourceSyncScheduledTaskRequest = {
|
|
|
3823
5791
|
status?: ScheduledTaskStatus | undefined;
|
|
3824
5792
|
metadata?: Record<string, unknown> | undefined;
|
|
3825
5793
|
};
|
|
3826
|
-
|
|
5794
|
+
/** Send a scheduled message using the destination chat’s current execution settings. */
|
|
5795
|
+
export type CreateSessionScheduledTaskRequest = {
|
|
5796
|
+
name: string;
|
|
5797
|
+
schedule: ScheduledTaskScheduleSpec;
|
|
5798
|
+
prompt: string;
|
|
5799
|
+
targetSessionId: string;
|
|
5800
|
+
/** A schedule posting into an Only me chat is always Only me. */
|
|
5801
|
+
visibility?: SessionVisibility | undefined;
|
|
5802
|
+
runMode?: "existing_session" | undefined;
|
|
5803
|
+
overlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
|
|
5804
|
+
status?: ScheduledTaskStatus | undefined;
|
|
5805
|
+
metadata?: Record<string, unknown> | undefined;
|
|
5806
|
+
};
|
|
5807
|
+
export type CreateScheduledTaskRequest = CreateSessionScheduledTaskRequest | CreateAgentScheduledTaskRequest | CreateKnowledgeSourceSyncScheduledTaskRequest;
|
|
3827
5808
|
export type UpdateScheduledTaskRequest = {
|
|
5809
|
+
expectedExecutionDigest?: string | undefined;
|
|
5810
|
+
adoptSessionSettings?: true | undefined;
|
|
5811
|
+
/** Lossless message edit. All omitted configuration is preserved. */
|
|
5812
|
+
prompt?: string | undefined;
|
|
3828
5813
|
name?: string | undefined;
|
|
3829
5814
|
schedule?: ScheduledTaskScheduleSpec | undefined;
|
|
3830
5815
|
runMode?: ScheduledTaskRunMode | undefined;
|
|
3831
5816
|
targetSessionId?: string | null | undefined;
|
|
3832
|
-
|
|
5817
|
+
/** Change who can see it. Only the owner can; a schedule posting into an Only me chat stays Only me. */
|
|
5818
|
+
visibility?: SessionVisibility | undefined;
|
|
5819
|
+
/** Replace the person-pinned accounts; `[]` unpins every connector. Omitted keeps the pins. */
|
|
5820
|
+
pinnedAccounts?: McpConnectionAccountSelection[] | undefined;
|
|
5821
|
+
/** Skip occurrences instead of running without an unusable pinned account. */
|
|
5822
|
+
pinnedAccountsRequired?: boolean | undefined;
|
|
3833
5823
|
overlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
|
|
3834
5824
|
action?: ScheduledTaskAction | undefined;
|
|
3835
5825
|
agentConfig?: ScheduledTaskAgentConfigInput | undefined;
|
|
5826
|
+
/** Lossless model defaults patch; cannot be combined with agentConfig replacement.
|
|
5827
|
+
* Existing target/reusable sessions retain their own model and reasoning. */
|
|
5828
|
+
agentConfigPatch?: {
|
|
5829
|
+
prompt?: string | undefined;
|
|
5830
|
+
model?: string | undefined;
|
|
5831
|
+
reasoningEffort?: ReasoningEffort | undefined;
|
|
5832
|
+
} | undefined;
|
|
3836
5833
|
status?: ScheduledTaskStatus | undefined;
|
|
3837
|
-
variableSetId?: string | null | undefined;
|
|
3838
|
-
/** @deprecated use variableSetId */
|
|
3839
|
-
environmentId?: string | null | undefined;
|
|
3840
5834
|
rigId?: string | null | undefined;
|
|
5835
|
+
/** Vault narrowing for every run. */
|
|
5836
|
+
vaultPolicy?: VaultPolicy | undefined;
|
|
3841
5837
|
metadata?: Record<string, unknown> | undefined;
|
|
3842
5838
|
};
|
|
3843
5839
|
export type ScheduledTaskRunStatus = "queued" | "dispatched" | "succeeded" | "skipped" | "failed";
|
|
@@ -3883,75 +5879,83 @@ export type ScheduledTaskRun = {
|
|
|
3883
5879
|
knowledgeSummary: KnowledgeSourceSyncRunSummary | null;
|
|
3884
5880
|
completedAt: string | null;
|
|
3885
5881
|
error: string | null;
|
|
5882
|
+
admissionDiagnostic?: {
|
|
5883
|
+
version: 1;
|
|
5884
|
+
reason: "selected_account_unavailable" | "owner_access_unavailable" | "ambiguous_account" | "parent_accounts_required" | "selection_unavailable";
|
|
5885
|
+
accounts: Array<{
|
|
5886
|
+
serverId: string;
|
|
5887
|
+
connectionId: string | null;
|
|
5888
|
+
reason: "connector_unavailable" | "account_not_visible" | "account_inactive" | "account_mismatch" | "selection_unavailable";
|
|
5889
|
+
}>;
|
|
5890
|
+
} | null | undefined;
|
|
5891
|
+
/**
|
|
5892
|
+
* Pinned connector accounts this run could not use. The run went ahead
|
|
5893
|
+
* without those connectors; no other account was used in their place.
|
|
5894
|
+
*/
|
|
5895
|
+
degradedAccounts?: Array<{
|
|
5896
|
+
serverId: string;
|
|
5897
|
+
connectionId: string | null;
|
|
5898
|
+
reason: "connector_unavailable" | "account_not_visible" | "account_inactive" | "account_mismatch" | "selection_unavailable" | "owner_access_unavailable";
|
|
5899
|
+
}> | undefined;
|
|
5900
|
+
/**
|
|
5901
|
+
* Why the scheduler refused this occurrence before running it; `error`
|
|
5902
|
+
* equals `reason`. `retryable: true` (status `skipped`): a later occurrence
|
|
5903
|
+
* runs once the condition clears. `retryable: false` (status `failed`):
|
|
5904
|
+
* every occurrence is refused until the task or a resource it names changes.
|
|
5905
|
+
*/
|
|
5906
|
+
admissionRefusal?: ScheduledTaskAdmissionRefusal | null | undefined;
|
|
5907
|
+
/**
|
|
5908
|
+
* This dispatched run's own turn is waiting on a person (tool approval or
|
|
5909
|
+
* structured question) since `since`; `expiresAt` is when the task's
|
|
5910
|
+
* `approvalTimeoutSeconds` answers for it (null: waits indefinitely).
|
|
5911
|
+
*/
|
|
5912
|
+
awaitingHuman?: ScheduledTaskRunAwaitingHuman | null | undefined;
|
|
3886
5913
|
createdAt: string;
|
|
3887
5914
|
updatedAt: string;
|
|
5915
|
+
/** Connectors this run could not use; projected only for a viewer who can act on the task. */
|
|
5916
|
+
accessFailures?: ScheduledTaskRunAccessFailure[] | undefined;
|
|
3888
5917
|
};
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
version: number;
|
|
3893
|
-
createdAt: string;
|
|
3894
|
-
updatedAt: string;
|
|
3895
|
-
};
|
|
3896
|
-
/** Dedicated permissioned plaintext response; never embedded in metadata reads. */
|
|
3897
|
-
export type VariableSetSecret = {
|
|
3898
|
-
variableSetId: string;
|
|
3899
|
-
name: string;
|
|
3900
|
-
version: number;
|
|
3901
|
-
value: string;
|
|
3902
|
-
};
|
|
3903
|
-
export type VariableSet = {
|
|
3904
|
-
id: string;
|
|
3905
|
-
accountId: string;
|
|
3906
|
-
workspaceId: string;
|
|
3907
|
-
scope: "organization" | "workspace" | "user";
|
|
3908
|
-
generation: number;
|
|
3909
|
-
status: "active" | "revoked";
|
|
3910
|
-
name: string;
|
|
3911
|
-
description: string | null;
|
|
3912
|
-
variables: VariableSetVariableMetadata[];
|
|
3913
|
-
createdAt: string;
|
|
3914
|
-
updatedAt: string;
|
|
3915
|
-
};
|
|
3916
|
-
/** Exact-ID attachment metadata; intentionally excludes catalog and secret metadata. */
|
|
3917
|
-
export type VariableSetAttachmentMetadata = {
|
|
3918
|
-
id: string;
|
|
3919
|
-
scope: "organization" | "workspace" | "user";
|
|
3920
|
-
};
|
|
3921
|
-
export type ResolveVariableSetAttachmentsRequest = {
|
|
3922
|
-
variableSetIds: string[];
|
|
5918
|
+
export type ScheduledTaskRunAwaitingHuman = {
|
|
5919
|
+
since: string;
|
|
5920
|
+
expiresAt: string | null;
|
|
3923
5921
|
};
|
|
3924
|
-
export type
|
|
3925
|
-
|
|
5922
|
+
export type ScheduledTaskAdmissionRefusal = {
|
|
5923
|
+
version: 1;
|
|
5924
|
+
reason: "scheduled_authority_unavailable" | "machine_target_unavailable" | "machine_enrollment_inactive" | "variable_set_unavailable" | "rig_version_unavailable" | "scheduled_model_unavailable" | "insufficient_credits" | "monthly_model_cost_limit" | "monthly_agent_run_limit" | (string & {});
|
|
5925
|
+
retryable: boolean;
|
|
3926
5926
|
};
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
export type CreateVariableSetRequest = {
|
|
3932
|
-
/** Omitted remains the legacy workspace-owned path. */
|
|
3933
|
-
scope?: "organization" | "workspace" | "user" | undefined;
|
|
5927
|
+
export type ScheduledTaskAccessFailureReason = "missing_connection" | "expired" | "insufficient_scope" | "refresh_failed" | "personal_authority_unavailable" | "unsupported_auth" | "resource_scope_unavailable" | "designated_credential_unavailable";
|
|
5928
|
+
/** A connector a scheduled run's own turn could not use (a `tool.auth_needed` fact). */
|
|
5929
|
+
export type ScheduledTaskRunAccessFailure = {
|
|
5930
|
+
serverId: string;
|
|
3934
5931
|
name: string;
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
value: string;
|
|
3940
|
-
}[] | undefined;
|
|
5932
|
+
providerDomain: string;
|
|
5933
|
+
reason: ScheduledTaskAccessFailureReason;
|
|
5934
|
+
count: number;
|
|
5935
|
+
firstOccurredAt: string;
|
|
3941
5936
|
};
|
|
3942
|
-
/**
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
5937
|
+
/**
|
|
5938
|
+
* A schedule that needs its owner's attention: its latest run failed closed on
|
|
5939
|
+
* connector access (`runId`, `failures`), and/or a pinned connector account can
|
|
5940
|
+
* no longer be used (`unavailableAccounts`; runs continue without that
|
|
5941
|
+
* connector unless the schedule requires its pins; `runId` and `firedAt` are
|
|
5942
|
+
* null when only this applies).
|
|
5943
|
+
*/
|
|
5944
|
+
export type ScheduledTaskAccessAttention = {
|
|
5945
|
+
taskId: string;
|
|
5946
|
+
taskName: string;
|
|
5947
|
+
/** The task head this item was computed against; a new head is a new notice. */
|
|
5948
|
+
executionDigest: string;
|
|
5949
|
+
runId: string | null;
|
|
5950
|
+
firedAt: string | null;
|
|
5951
|
+
failures: ScheduledTaskRunAccessFailure[];
|
|
5952
|
+
unavailableAccounts: ScheduledTaskAccessConnector[];
|
|
5953
|
+
/** The latest run is waiting on a person (tool approval or question) right now. */
|
|
5954
|
+
awaitingHuman?: ScheduledTaskRunAwaitingHuman | null | undefined;
|
|
3947
5955
|
};
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
export type SetVariableSetVariableRequest = {
|
|
3951
|
-
value: string;
|
|
5956
|
+
export type ListScheduledTaskAccessAttentionResponse = {
|
|
5957
|
+
tasks: ScheduledTaskAccessAttention[];
|
|
3952
5958
|
};
|
|
3953
|
-
/** @deprecated use SetVariableSetVariableRequest */
|
|
3954
|
-
export type SetWorkspaceEnvironmentVariableRequest = SetVariableSetVariableRequest;
|
|
3955
5959
|
export type RigCheck = {
|
|
3956
5960
|
name: string;
|
|
3957
5961
|
command: string;
|
|
@@ -3994,6 +5998,7 @@ export type RigVersion = {
|
|
|
3994
5998
|
setupScript: string | null;
|
|
3995
5999
|
checks: RigCheck[];
|
|
3996
6000
|
credentialHooks: string[];
|
|
6001
|
+
/** @deprecated Variable Sets were replaced by vaults; inert legacy data. */
|
|
3997
6002
|
defaultVariableSetIds: string[];
|
|
3998
6003
|
changelog: string | null;
|
|
3999
6004
|
providerImages: Partial<Record<SandboxBackend, RigProviderImage>>;
|
|
@@ -4091,7 +6096,6 @@ export type CreateRigRequest = {
|
|
|
4091
6096
|
setupScript?: string | undefined;
|
|
4092
6097
|
checks?: RigCheck[] | undefined;
|
|
4093
6098
|
credentialHooks?: string[] | undefined;
|
|
4094
|
-
defaultVariableSetIds?: string[] | undefined;
|
|
4095
6099
|
};
|
|
4096
6100
|
export type UpdateRigRequest = {
|
|
4097
6101
|
name?: string | undefined;
|
|
@@ -4106,7 +6110,6 @@ export type RigDefinitionEditPayload = {
|
|
|
4106
6110
|
setupScript?: string | null | undefined;
|
|
4107
6111
|
checks?: RigCheck[] | undefined;
|
|
4108
6112
|
credentialHooks?: string[] | undefined;
|
|
4109
|
-
defaultVariableSetIds?: string[] | undefined;
|
|
4110
6113
|
changelog?: string | null | undefined;
|
|
4111
6114
|
};
|
|
4112
6115
|
export type ProposeRigChangeRequest = {
|
|
@@ -4117,7 +6120,17 @@ export type ProposeRigChangeRequest = {
|
|
|
4117
6120
|
payload: RigDefinitionEditPayload;
|
|
4118
6121
|
};
|
|
4119
6122
|
export type FileStatus = "pending_upload" | "ready" | "failed" | "expired" | "deleted";
|
|
6123
|
+
export type FileListRequest = {
|
|
6124
|
+
scope?: "all" | "workspace" | "personal";
|
|
6125
|
+
limit?: number;
|
|
6126
|
+
cursor?: string;
|
|
6127
|
+
};
|
|
6128
|
+
export type FileListResponse = {
|
|
6129
|
+
files: FileAsset[];
|
|
6130
|
+
nextCursor: string | null;
|
|
6131
|
+
};
|
|
4120
6132
|
export type FileAsset = {
|
|
6133
|
+
scope?: "workspace" | "personal" | undefined;
|
|
4121
6134
|
id: string;
|
|
4122
6135
|
workspaceId: string;
|
|
4123
6136
|
status: FileStatus;
|
|
@@ -4137,7 +6150,7 @@ export declare const RETAINED_OUTPUT_MAX_PAGE_BYTES: number;
|
|
|
4137
6150
|
export declare const COMPUTER_SCREENSHOT_MAX_BYTES: number;
|
|
4138
6151
|
export declare const GENERATED_IMAGE_MAX_BYTES: number;
|
|
4139
6152
|
export declare const GENERATED_VIDEO_MAX_BYTES: number;
|
|
4140
|
-
export type RetainedOutputKind = "tool_result" | "assistant_completion" | "internal_update" | "event_media" | "computer_screenshot" | "generated_image" | "generated_video" | "file";
|
|
6153
|
+
export type RetainedOutputKind = "tool_result" | "assistant_completion" | "internal_update" | "event_media" | "computer_screenshot" | "browser_screenshot" | "generated_image" | "generated_video" | "file";
|
|
4141
6154
|
export type RetainedOutputUnavailableReason = "not_retained" | "pending" | "failed" | "expired" | "deleted" | "missing_storage" | "storage_write_failed" | "quota_exceeded" | "invalid_content" | "oversized" | "unsupported";
|
|
4142
6155
|
export type RetainedArtifactReference = {
|
|
4143
6156
|
available: true;
|
|
@@ -4308,6 +6321,7 @@ export type RetainedArtifactDownload = {
|
|
|
4308
6321
|
bytes: Uint8Array;
|
|
4309
6322
|
};
|
|
4310
6323
|
export type CreateFileUploadRequest = {
|
|
6324
|
+
scope?: "workspace" | "personal";
|
|
4311
6325
|
filename: string;
|
|
4312
6326
|
contentType: string;
|
|
4313
6327
|
sizeBytes: number;
|
|
@@ -4333,6 +6347,7 @@ export type FileDownloadUrlResponse = {
|
|
|
4333
6347
|
/** Bytes accepted by the `uploadFile` helper. */
|
|
4334
6348
|
export type FileUploadData = Blob | ArrayBuffer | Uint8Array | string;
|
|
4335
6349
|
export type UploadFileInput = {
|
|
6350
|
+
scope?: "workspace" | "personal";
|
|
4336
6351
|
filename: string;
|
|
4337
6352
|
contentType: string;
|
|
4338
6353
|
data: FileUploadData;
|
|
@@ -4586,313 +6601,69 @@ export type KnowledgeMemory = {
|
|
|
4586
6601
|
};
|
|
4587
6602
|
export type CreateKnowledgeMemoryRequest = {
|
|
4588
6603
|
status?: KnowledgeMemoryStatus | undefined;
|
|
4589
|
-
kind?: KnowledgeMemoryKind | undefined;
|
|
4590
|
-
scope?: string | undefined;
|
|
4591
|
-
text: string;
|
|
4592
|
-
sourceRefs?: KnowledgeSourceRef[] | undefined;
|
|
4593
|
-
confidence?: number | undefined;
|
|
4594
|
-
metadata?: Record<string, unknown> | undefined;
|
|
4595
|
-
createdBySessionId?: string | undefined;
|
|
4596
|
-
pinned?: boolean | undefined;
|
|
4597
|
-
replacesId?: string | undefined;
|
|
4598
|
-
};
|
|
4599
|
-
export type UpdateKnowledgeMemoryRequest = {
|
|
4600
|
-
status?: KnowledgeMemoryStatus | undefined;
|
|
4601
|
-
kind?: KnowledgeMemoryKind | undefined;
|
|
4602
|
-
scope?: string | undefined;
|
|
4603
|
-
text?: string | undefined;
|
|
4604
|
-
sourceRefs?: KnowledgeSourceRef[] | undefined;
|
|
4605
|
-
confidence?: number | undefined;
|
|
4606
|
-
metadata?: Record<string, unknown> | undefined;
|
|
4607
|
-
reviewedBy?: string | undefined;
|
|
4608
|
-
pinned?: boolean | undefined;
|
|
4609
|
-
};
|
|
4610
|
-
export type KnowledgeMemorySearchRequest = {
|
|
4611
|
-
query?: string | undefined;
|
|
4612
|
-
status?: KnowledgeMemoryStatus | undefined;
|
|
4613
|
-
kind?: KnowledgeMemoryKind | undefined;
|
|
4614
|
-
scope?: string | undefined;
|
|
4615
|
-
limit?: number | undefined;
|
|
4616
|
-
};
|
|
4617
|
-
export type WorkspaceMemorySearchMode = "hybrid" | "vector" | "keyword";
|
|
4618
|
-
export type WorkspaceMemorySearchRequest = {
|
|
4619
|
-
query: string;
|
|
4620
|
-
kind?: KnowledgeMemoryKind | undefined;
|
|
4621
|
-
limit?: number | undefined;
|
|
4622
|
-
mode?: WorkspaceMemorySearchMode | undefined;
|
|
4623
|
-
};
|
|
4624
|
-
export type WorkspaceMemorySearchResult = {
|
|
4625
|
-
memory: KnowledgeMemory;
|
|
4626
|
-
score: number;
|
|
4627
|
-
matchType: WorkspaceMemorySearchMode;
|
|
4628
|
-
vectorScore: number | null;
|
|
4629
|
-
keywordScore: number | null;
|
|
4630
|
-
};
|
|
4631
|
-
export type WorkspaceMemorySearchResponse = {
|
|
4632
|
-
results: WorkspaceMemorySearchResult[];
|
|
4633
|
-
};
|
|
4634
|
-
export type CapabilityPackConnectorAuthModel = "oauth2_authorization_code_pkce" | "oauth2_authorization_code" | "api_key" | "credential_ref";
|
|
4635
|
-
export type CapabilityPackConnector = {
|
|
4636
|
-
id: string;
|
|
4637
|
-
name: string;
|
|
4638
|
-
category: string;
|
|
4639
|
-
authModel: CapabilityPackConnectorAuthModel;
|
|
4640
|
-
providers: string[];
|
|
4641
|
-
scopes: string[];
|
|
4642
|
-
required: boolean;
|
|
4643
|
-
metadata: Record<string, unknown>;
|
|
4644
|
-
};
|
|
4645
|
-
export type CapabilityPackKnowledge = {
|
|
4646
|
-
type: "document_base";
|
|
4647
|
-
id: string;
|
|
4648
|
-
name: string;
|
|
4649
|
-
description: string | null;
|
|
4650
|
-
required: boolean;
|
|
4651
|
-
};
|
|
4652
|
-
export type CapabilityPackScheduledTaskTemplate = {
|
|
4653
|
-
id: string;
|
|
4654
|
-
name: string;
|
|
4655
|
-
description: string;
|
|
4656
|
-
defaultSchedule: ScheduledTaskScheduleSpec;
|
|
4657
|
-
defaultRunMode: ScheduledTaskRunMode;
|
|
4658
|
-
defaultOverlapPolicy: ScheduledTaskOverlapPolicy;
|
|
4659
|
-
prompt?: string | undefined;
|
|
4660
|
-
};
|
|
4661
|
-
export type CapabilityPackAutomationTemplate = {
|
|
4662
|
-
id: string;
|
|
4663
|
-
name: string;
|
|
4664
|
-
description: string;
|
|
4665
|
-
adapterId: string;
|
|
4666
|
-
eventTypes: string[];
|
|
4667
|
-
sessionTemplate: {
|
|
4668
|
-
prompt: string;
|
|
4669
|
-
instructions: string | null;
|
|
4670
|
-
resources: ResourceRef[];
|
|
4671
|
-
skills: CapabilityPackSkill[];
|
|
4672
|
-
tools: ToolRef[];
|
|
4673
|
-
firstPartyMcpTools: string[];
|
|
4674
|
-
firstPartyMcpPermissions: Permission[];
|
|
4675
|
-
model: string | null;
|
|
4676
|
-
reasoningEffort: ReasoningEffort | null;
|
|
4677
|
-
sandboxBackend: SandboxBackend | null;
|
|
4678
|
-
policyRole: string | null;
|
|
4679
|
-
metadata: Record<string, unknown>;
|
|
4680
|
-
};
|
|
4681
|
-
configuration: Record<string, unknown>;
|
|
4682
|
-
connectionRequirement: string | null;
|
|
4683
|
-
};
|
|
4684
|
-
export type CapabilityPackSkillFile = {
|
|
4685
|
-
path: string;
|
|
4686
|
-
content: string;
|
|
4687
|
-
};
|
|
4688
|
-
export type CapabilityPackSkill = {
|
|
4689
|
-
name: string;
|
|
4690
|
-
description?: string | undefined;
|
|
4691
|
-
files: CapabilityPackSkillFile[];
|
|
4692
|
-
};
|
|
4693
|
-
export type SessionSkill = CapabilityPackSkill;
|
|
4694
|
-
export type CapabilityPackVariableSetSpec = {
|
|
4695
|
-
description: string;
|
|
4696
|
-
requiredVariables: string[];
|
|
4697
|
-
required: boolean;
|
|
4698
|
-
};
|
|
4699
|
-
export type CapabilityPackComponentReference = {
|
|
4700
|
-
key: string;
|
|
4701
|
-
kind: "plugin";
|
|
4702
|
-
pluginKey: string;
|
|
4703
|
-
version: string;
|
|
4704
|
-
manifestDigest: string;
|
|
4705
|
-
required: boolean;
|
|
4706
|
-
} | {
|
|
4707
|
-
key: string;
|
|
4708
|
-
kind: "skill";
|
|
4709
|
-
capabilityId: string;
|
|
4710
|
-
contentSha256: string;
|
|
4711
|
-
required: boolean;
|
|
4712
|
-
} | {
|
|
4713
|
-
key: string;
|
|
4714
|
-
kind: "integration";
|
|
4715
|
-
capabilityId: string;
|
|
4716
|
-
instanceKey: string;
|
|
4717
|
-
revisionId: string;
|
|
4718
|
-
contentSha256: string;
|
|
4719
|
-
required: boolean;
|
|
4720
|
-
} | {
|
|
4721
|
-
key: string;
|
|
4722
|
-
kind: "facet";
|
|
4723
|
-
capabilityId: string;
|
|
4724
|
-
instanceKey: string;
|
|
4725
|
-
facetKey: string;
|
|
4726
|
-
bindingKey: string;
|
|
4727
|
-
configDigest: string;
|
|
4728
|
-
required: boolean;
|
|
4729
|
-
};
|
|
4730
|
-
export type CapabilityPackRigRequirement = {
|
|
4731
|
-
description?: string | undefined;
|
|
4732
|
-
required: boolean;
|
|
4733
|
-
rigId?: string | undefined;
|
|
4734
|
-
requireVerified: boolean;
|
|
4735
|
-
};
|
|
4736
|
-
export type CapabilityPack = {
|
|
4737
|
-
id: string;
|
|
4738
|
-
name: string;
|
|
4739
|
-
description: string;
|
|
4740
|
-
role: string;
|
|
4741
|
-
category: string;
|
|
4742
|
-
version: string;
|
|
4743
|
-
sandboxImage?: string | undefined;
|
|
4744
|
-
sandboxProviderImages?: {
|
|
4745
|
-
modal?: {
|
|
4746
|
-
imageId: string;
|
|
4747
|
-
} | undefined;
|
|
4748
|
-
} | undefined;
|
|
4749
|
-
skills: CapabilityPackSkill[];
|
|
4750
|
-
components: CapabilityPackComponentReference[];
|
|
4751
|
-
rig?: CapabilityPackRigRequirement | undefined;
|
|
4752
|
-
tools: ToolRef[];
|
|
4753
|
-
connectors: CapabilityPackConnector[];
|
|
4754
|
-
knowledge: CapabilityPackKnowledge[];
|
|
4755
|
-
scheduledTaskTemplates: CapabilityPackScheduledTaskTemplate[];
|
|
4756
|
-
automationTemplates?: CapabilityPackAutomationTemplate[] | undefined;
|
|
4757
|
-
variableSet?: CapabilityPackVariableSetSpec | undefined;
|
|
4758
|
-
metadata: Record<string, unknown>;
|
|
4759
|
-
};
|
|
4760
|
-
/** Input shape for registering a pack manifest (server applies defaults). */
|
|
4761
|
-
export type RegisterCapabilityPackRequest = {
|
|
4762
|
-
id: string;
|
|
4763
|
-
name: string;
|
|
4764
|
-
description: string;
|
|
4765
|
-
role: string;
|
|
4766
|
-
category: string;
|
|
4767
|
-
version: string;
|
|
4768
|
-
sandboxImage?: string | undefined;
|
|
4769
|
-
sandboxProviderImages?: {
|
|
4770
|
-
modal?: {
|
|
4771
|
-
imageId: string;
|
|
4772
|
-
} | undefined;
|
|
4773
|
-
} | undefined;
|
|
4774
|
-
skills?: {
|
|
4775
|
-
name: string;
|
|
4776
|
-
description?: string | undefined;
|
|
4777
|
-
files: CapabilityPackSkillFile[];
|
|
4778
|
-
}[] | undefined;
|
|
4779
|
-
components?: ({
|
|
4780
|
-
key: string;
|
|
4781
|
-
kind: "plugin";
|
|
4782
|
-
pluginKey: string;
|
|
4783
|
-
version: string;
|
|
4784
|
-
manifestDigest: string;
|
|
4785
|
-
required?: boolean | undefined;
|
|
4786
|
-
} | {
|
|
4787
|
-
key: string;
|
|
4788
|
-
kind: "skill";
|
|
4789
|
-
capabilityId: string;
|
|
4790
|
-
contentSha256: string;
|
|
4791
|
-
required?: boolean | undefined;
|
|
4792
|
-
} | {
|
|
4793
|
-
key: string;
|
|
4794
|
-
kind: "integration";
|
|
4795
|
-
capabilityId: string;
|
|
4796
|
-
instanceKey: string;
|
|
4797
|
-
revisionId: string;
|
|
4798
|
-
contentSha256: string;
|
|
4799
|
-
required?: boolean | undefined;
|
|
4800
|
-
} | {
|
|
4801
|
-
key: string;
|
|
4802
|
-
kind: "facet";
|
|
4803
|
-
capabilityId: string;
|
|
4804
|
-
instanceKey: string;
|
|
4805
|
-
facetKey: string;
|
|
4806
|
-
bindingKey: string;
|
|
4807
|
-
configDigest: string;
|
|
4808
|
-
required?: boolean | undefined;
|
|
4809
|
-
})[] | undefined;
|
|
4810
|
-
rig?: {
|
|
4811
|
-
description?: string | undefined;
|
|
4812
|
-
required?: boolean | undefined;
|
|
4813
|
-
rigId?: string | undefined;
|
|
4814
|
-
requireVerified?: boolean | undefined;
|
|
4815
|
-
} | undefined;
|
|
4816
|
-
tools?: ToolRef[] | undefined;
|
|
4817
|
-
connectors?: {
|
|
4818
|
-
id: string;
|
|
4819
|
-
name: string;
|
|
4820
|
-
category: string;
|
|
4821
|
-
authModel: CapabilityPackConnectorAuthModel;
|
|
4822
|
-
providers?: string[] | undefined;
|
|
4823
|
-
scopes?: string[] | undefined;
|
|
4824
|
-
required?: boolean | undefined;
|
|
4825
|
-
metadata?: Record<string, unknown> | undefined;
|
|
4826
|
-
}[] | undefined;
|
|
4827
|
-
knowledge?: {
|
|
4828
|
-
type: "document_base";
|
|
4829
|
-
id: string;
|
|
4830
|
-
name: string;
|
|
4831
|
-
description?: string | null | undefined;
|
|
4832
|
-
required?: boolean | undefined;
|
|
4833
|
-
}[] | undefined;
|
|
4834
|
-
scheduledTaskTemplates?: {
|
|
4835
|
-
id: string;
|
|
4836
|
-
name: string;
|
|
4837
|
-
description: string;
|
|
4838
|
-
defaultSchedule: ScheduledTaskScheduleSpec;
|
|
4839
|
-
defaultRunMode?: ScheduledTaskRunMode | undefined;
|
|
4840
|
-
defaultOverlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
|
|
4841
|
-
prompt?: string | undefined;
|
|
4842
|
-
}[] | undefined;
|
|
4843
|
-
automationTemplates?: {
|
|
4844
|
-
id: string;
|
|
4845
|
-
name: string;
|
|
4846
|
-
description: string;
|
|
4847
|
-
adapterId: string;
|
|
4848
|
-
eventTypes: string[];
|
|
4849
|
-
sessionTemplate: {
|
|
4850
|
-
prompt: string;
|
|
4851
|
-
instructions?: string | null | undefined;
|
|
4852
|
-
resources?: ResourceRef[] | undefined;
|
|
4853
|
-
skills?: CapabilityPackSkill[] | undefined;
|
|
4854
|
-
tools?: ToolRef[] | undefined;
|
|
4855
|
-
firstPartyMcpTools?: string[] | undefined;
|
|
4856
|
-
firstPartyMcpPermissions?: Permission[] | undefined;
|
|
4857
|
-
model?: string | null | undefined;
|
|
4858
|
-
reasoningEffort?: ReasoningEffort | null | undefined;
|
|
4859
|
-
sandboxBackend?: SandboxBackend | null | undefined;
|
|
4860
|
-
policyRole?: string | null | undefined;
|
|
4861
|
-
metadata?: Record<string, unknown> | undefined;
|
|
4862
|
-
};
|
|
4863
|
-
configuration?: Record<string, unknown> | undefined;
|
|
4864
|
-
connectionRequirement?: string | null | undefined;
|
|
4865
|
-
}[] | undefined;
|
|
4866
|
-
variableSet?: {
|
|
4867
|
-
description: string;
|
|
4868
|
-
requiredVariables?: string[] | undefined;
|
|
4869
|
-
required?: boolean | undefined;
|
|
4870
|
-
} | undefined;
|
|
6604
|
+
kind?: KnowledgeMemoryKind | undefined;
|
|
6605
|
+
scope?: string | undefined;
|
|
6606
|
+
text: string;
|
|
6607
|
+
sourceRefs?: KnowledgeSourceRef[] | undefined;
|
|
6608
|
+
confidence?: number | undefined;
|
|
4871
6609
|
metadata?: Record<string, unknown> | undefined;
|
|
6610
|
+
createdBySessionId?: string | undefined;
|
|
6611
|
+
pinned?: boolean | undefined;
|
|
6612
|
+
replacesId?: string | undefined;
|
|
4872
6613
|
};
|
|
4873
|
-
export type
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
6614
|
+
export type UpdateKnowledgeMemoryRequest = {
|
|
6615
|
+
status?: KnowledgeMemoryStatus | undefined;
|
|
6616
|
+
kind?: KnowledgeMemoryKind | undefined;
|
|
6617
|
+
scope?: string | undefined;
|
|
6618
|
+
text?: string | undefined;
|
|
6619
|
+
sourceRefs?: KnowledgeSourceRef[] | undefined;
|
|
6620
|
+
confidence?: number | undefined;
|
|
6621
|
+
metadata?: Record<string, unknown> | undefined;
|
|
6622
|
+
reviewedBy?: string | undefined;
|
|
6623
|
+
pinned?: boolean | undefined;
|
|
4879
6624
|
};
|
|
4880
|
-
export type
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
6625
|
+
export type KnowledgeMemorySearchRequest = {
|
|
6626
|
+
query?: string | undefined;
|
|
6627
|
+
status?: KnowledgeMemoryStatus | undefined;
|
|
6628
|
+
kind?: KnowledgeMemoryKind | undefined;
|
|
6629
|
+
scope?: string | undefined;
|
|
6630
|
+
limit?: number | undefined;
|
|
6631
|
+
};
|
|
6632
|
+
export type WorkspaceMemorySearchMode = "hybrid" | "vector" | "keyword";
|
|
6633
|
+
export type WorkspaceMemorySearchRequest = {
|
|
6634
|
+
query: string;
|
|
6635
|
+
kind?: KnowledgeMemoryKind | undefined;
|
|
6636
|
+
limit?: number | undefined;
|
|
6637
|
+
mode?: WorkspaceMemorySearchMode | undefined;
|
|
6638
|
+
};
|
|
6639
|
+
export type WorkspaceMemorySearchResult = {
|
|
6640
|
+
memory: KnowledgeMemory;
|
|
6641
|
+
score: number;
|
|
6642
|
+
matchType: WorkspaceMemorySearchMode;
|
|
6643
|
+
vectorScore: number | null;
|
|
6644
|
+
keywordScore: number | null;
|
|
6645
|
+
};
|
|
6646
|
+
export type WorkspaceMemorySearchResponse = {
|
|
6647
|
+
results: WorkspaceMemorySearchResult[];
|
|
6648
|
+
};
|
|
6649
|
+
export type SkillArtifactFile = {
|
|
6650
|
+
path: string;
|
|
6651
|
+
content: string;
|
|
6652
|
+
};
|
|
6653
|
+
export type SkillArtifactDefinition = {
|
|
6654
|
+
name: string;
|
|
6655
|
+
description?: string | undefined;
|
|
6656
|
+
/** Omitted means workspace-wide; session_selected requires explicit session attachment. */
|
|
6657
|
+
activationMode?: "workspace_managed" | "session_selected" | undefined;
|
|
6658
|
+
files: SkillArtifactFile[];
|
|
6659
|
+
};
|
|
6660
|
+
export type SessionSkill = Omit<SkillArtifactDefinition, "activationMode">;
|
|
6661
|
+
/** SKILL.md owns metadata; supplied legacy fields must exactly match it. */
|
|
6662
|
+
export type SkillArtifactDefinitionInput = Omit<SkillArtifactDefinition, "name" | "description"> & {
|
|
6663
|
+
name?: string | undefined;
|
|
6664
|
+
description?: string | undefined;
|
|
4895
6665
|
};
|
|
6666
|
+
export type SessionSkillInput = Omit<SkillArtifactDefinitionInput, "activationMode">;
|
|
4896
6667
|
export type PrReviewProvider = GitCredentialProvider;
|
|
4897
6668
|
export type PrReviewCredentialKind = "github_app" | "managed_github_app" | "provider_token";
|
|
4898
6669
|
export type PrReviewWebhookAuthKind = "hmac_sha256" | "shared_token" | "basic";
|
|
@@ -4990,93 +6761,12 @@ export type PrReviewManagedGitHubInstallation = {
|
|
|
4990
6761
|
export type PrReviewManagedGitHubSetup = {
|
|
4991
6762
|
configured: boolean;
|
|
4992
6763
|
status: "unavailable" | "not_connected" | "connected";
|
|
4993
|
-
appName: "OpenGeni Lens";
|
|
6764
|
+
appName: "Opengeni Lens" | "OpenGeni Lens";
|
|
4994
6765
|
connectUrl: string | null;
|
|
4995
6766
|
installations: PrReviewManagedGitHubInstallation[];
|
|
4996
6767
|
missing: string[];
|
|
4997
6768
|
};
|
|
4998
|
-
export type
|
|
4999
|
-
variableSetId?: string | undefined;
|
|
5000
|
-
/** @deprecated use variableSetId */
|
|
5001
|
-
environmentId?: string | undefined;
|
|
5002
|
-
metadata?: Record<string, unknown> | undefined;
|
|
5003
|
-
};
|
|
5004
|
-
export type PackComponentResolutionStatus = "ready" | "missing" | "mismatch";
|
|
5005
|
-
export type PackComponentResolution = {
|
|
5006
|
-
key: string;
|
|
5007
|
-
kind: "plugin" | "skill" | "integration" | "facet" | "inline_skill";
|
|
5008
|
-
capabilityId: string;
|
|
5009
|
-
required: boolean;
|
|
5010
|
-
status: PackComponentResolutionStatus;
|
|
5011
|
-
expectedDigest: string;
|
|
5012
|
-
actualDigest: string | null;
|
|
5013
|
-
resolvedId: string | null;
|
|
5014
|
-
label: string;
|
|
5015
|
-
};
|
|
5016
|
-
export type PackRigResolution = {
|
|
5017
|
-
required: boolean;
|
|
5018
|
-
status: "not_required" | "ready" | "missing" | "mismatch" | "unverified";
|
|
5019
|
-
requestedRigId: string | null;
|
|
5020
|
-
rigId: string | null;
|
|
5021
|
-
rigVersionId: string | null;
|
|
5022
|
-
name: string | null;
|
|
5023
|
-
image: string | null;
|
|
5024
|
-
};
|
|
5025
|
-
export type PreviewPackInstallationRequest = {
|
|
5026
|
-
rigId?: string | undefined;
|
|
5027
|
-
variableSetId?: string | undefined;
|
|
5028
|
-
};
|
|
5029
|
-
export type PackInstallationPreview = {
|
|
5030
|
-
packId: string;
|
|
5031
|
-
packVersion: string;
|
|
5032
|
-
manifestDigest: string;
|
|
5033
|
-
installationVersion: number | null;
|
|
5034
|
-
action: "install" | "update" | "repair";
|
|
5035
|
-
ready: boolean;
|
|
5036
|
-
blockers: string[];
|
|
5037
|
-
components: PackComponentResolution[];
|
|
5038
|
-
rig: PackRigResolution;
|
|
5039
|
-
variableSetId: string | null;
|
|
5040
|
-
legacyInlineSkillCount: number;
|
|
5041
|
-
legacySandboxImage: string | null;
|
|
5042
|
-
};
|
|
5043
|
-
export type InstallPackRequest = {
|
|
5044
|
-
expectedManifestDigest: string;
|
|
5045
|
-
expectedInstallationVersion?: number | undefined;
|
|
5046
|
-
rigId?: string | undefined;
|
|
5047
|
-
variableSetId?: string | undefined;
|
|
5048
|
-
idempotencyKey: string;
|
|
5049
|
-
metadata?: Record<string, unknown> | undefined;
|
|
5050
|
-
};
|
|
5051
|
-
export type PackUninstallPreview = {
|
|
5052
|
-
packId: string;
|
|
5053
|
-
installed: boolean;
|
|
5054
|
-
installationVersion: number | null;
|
|
5055
|
-
components: Array<{
|
|
5056
|
-
key: string;
|
|
5057
|
-
kind: "plugin" | "skill" | "integration" | "facet" | "inline_skill";
|
|
5058
|
-
capabilityId: string;
|
|
5059
|
-
retainedByOtherOwners: boolean;
|
|
5060
|
-
}>;
|
|
5061
|
-
};
|
|
5062
|
-
export type UninstallPackRequest = {
|
|
5063
|
-
expectedInstallationVersion: number;
|
|
5064
|
-
idempotencyKey: string;
|
|
5065
|
-
};
|
|
5066
|
-
export type UninstallPackResult = {
|
|
5067
|
-
packId: string;
|
|
5068
|
-
status: "not_installed" | "uninstalled";
|
|
5069
|
-
retainedComponents: string[];
|
|
5070
|
-
};
|
|
5071
|
-
export type ListPacksResponse = {
|
|
5072
|
-
packs: CapabilityPack[];
|
|
5073
|
-
installations: PackInstallation[];
|
|
5074
|
-
};
|
|
5075
|
-
export type GetPackResponse = {
|
|
5076
|
-
pack: CapabilityPack;
|
|
5077
|
-
installation: PackInstallation | null;
|
|
5078
|
-
};
|
|
5079
|
-
export type CapabilityKind = "pack" | "mcp" | "api" | "skill" | "plugin";
|
|
6769
|
+
export type CapabilityKind = "mcp" | "api" | "skill" | "plugin";
|
|
5080
6770
|
export type CapabilitySource = "built_in" | "library" | "configured" | "public_registry" | "registry" | "manual";
|
|
5081
6771
|
export type CapabilityInstallationStatus = "active" | "disabled";
|
|
5082
6772
|
export type CapabilityCatalogAuthKind = "oauth2" | "api_key" | "none" | "unknown";
|
|
@@ -5100,6 +6790,14 @@ export type CapabilityRuntime = {
|
|
|
5100
6790
|
state: "trusted" | "legacy_active" | "unverified";
|
|
5101
6791
|
reason: "trusted_source" | "verified_probe" | "active_installation_compatibility" | "missing_verification";
|
|
5102
6792
|
} | undefined;
|
|
6793
|
+
/**
|
|
6794
|
+
* Present when connecting needs an operator-registered OAuth client because
|
|
6795
|
+
* the provider refuses self-registration; `configured` is whether this
|
|
6796
|
+
* deployment has one. Connector surfaces offer the row only when true.
|
|
6797
|
+
*/
|
|
6798
|
+
operatorOAuthClient?: {
|
|
6799
|
+
configured: boolean;
|
|
6800
|
+
} | undefined;
|
|
5103
6801
|
};
|
|
5104
6802
|
export type CapabilityCatalogItem = {
|
|
5105
6803
|
id: string;
|
|
@@ -5138,6 +6836,8 @@ export type CapabilityCatalogItem = {
|
|
|
5138
6836
|
/** The connection backing this enabled installation, or null when none is involved. */
|
|
5139
6837
|
connectionRef: {
|
|
5140
6838
|
connectionId?: string | undefined;
|
|
6839
|
+
accountSelection?: "all_eligible" | undefined;
|
|
6840
|
+
authoritySource?: "host" | undefined;
|
|
5141
6841
|
providerDomain: string;
|
|
5142
6842
|
kind: string;
|
|
5143
6843
|
subjectScope?: "subject" | "workspace" | undefined;
|
|
@@ -5177,6 +6877,7 @@ export type CreateCapabilityCatalogItemRequest = {
|
|
|
5177
6877
|
metadata?: Record<string, unknown> | undefined;
|
|
5178
6878
|
};
|
|
5179
6879
|
export type EnableCapabilityRequest = {
|
|
6880
|
+
onlyIfUninstalled?: boolean | undefined;
|
|
5180
6881
|
config?: Record<string, unknown> | undefined;
|
|
5181
6882
|
metadata?: Record<string, unknown> | undefined;
|
|
5182
6883
|
connectionRef?: McpServerConnectionRef | undefined;
|
|
@@ -5193,7 +6894,7 @@ export type DiscoverMcpCapabilitiesResponse = {
|
|
|
5193
6894
|
sourceUrl: string;
|
|
5194
6895
|
};
|
|
5195
6896
|
export type SkillImportSource = "github" | "skills_sh";
|
|
5196
|
-
export type SkillInstallationSource = "library" | "github" | "skills_sh"
|
|
6897
|
+
export type SkillInstallationSource = "library" | "github" | "skills_sh";
|
|
5197
6898
|
export type PreviewSkillImportRequest = {
|
|
5198
6899
|
url: string;
|
|
5199
6900
|
};
|
|
@@ -5203,6 +6904,7 @@ export type SkillImportFileSummary = {
|
|
|
5203
6904
|
contentSha256: string;
|
|
5204
6905
|
};
|
|
5205
6906
|
export type SkillImportPreview = {
|
|
6907
|
+
markdown?: string;
|
|
5206
6908
|
source: SkillImportSource;
|
|
5207
6909
|
sourceUrl: string;
|
|
5208
6910
|
repositoryUrl: string;
|
|
@@ -5231,6 +6933,7 @@ export type InstallLibrarySkillRequest = {
|
|
|
5231
6933
|
expectedInstallationVersion?: number | undefined;
|
|
5232
6934
|
};
|
|
5233
6935
|
export type InstalledSkill = {
|
|
6936
|
+
skillReceipt?: import("./skills.js").SkillWriteReceipt | undefined;
|
|
5234
6937
|
capabilityId: string;
|
|
5235
6938
|
pluginId: string;
|
|
5236
6939
|
pluginVersionId: string;
|
|
@@ -5247,7 +6950,7 @@ export type InstalledSkill = {
|
|
|
5247
6950
|
status: "installed";
|
|
5248
6951
|
};
|
|
5249
6952
|
export type CapabilityComponentOwner = {
|
|
5250
|
-
kind: "direct" | "plugin" | "
|
|
6953
|
+
kind: "direct" | "plugin" | "migration";
|
|
5251
6954
|
id: string;
|
|
5252
6955
|
removable: boolean;
|
|
5253
6956
|
};
|
|
@@ -5289,6 +6992,7 @@ export type UninstallSkillRequest = {
|
|
|
5289
6992
|
expectedInstallationVersion: number;
|
|
5290
6993
|
};
|
|
5291
6994
|
export type UninstallSkillResult = {
|
|
6995
|
+
skillReleases?: import("./skills.js").SkillSourceReleaseReceipt[] | undefined;
|
|
5292
6996
|
capabilityId: string;
|
|
5293
6997
|
status: "not_installed" | "uninstalled" | "retained_by_other_owners";
|
|
5294
6998
|
remainingOwners: CapabilityComponentOwner[];
|
|
@@ -5410,8 +7114,31 @@ export type IntegrationSource = {
|
|
|
5410
7114
|
url: string;
|
|
5411
7115
|
baseUrl?: string | undefined;
|
|
5412
7116
|
};
|
|
7117
|
+
/**
|
|
7118
|
+
* OpenAPI 3.x text (JSON or YAML, at most 8 MiB) sent in the request instead
|
|
7119
|
+
* of a URL. `sourceKey` is your stable identity for the Integration: reuse it
|
|
7120
|
+
* to update the same installation. Server URLs must be absolute or `baseUrl`
|
|
7121
|
+
* given. Calls still obey the deployment network policy, so an API on
|
|
7122
|
+
* localhost or a private address needs a public tunnel unless the operator
|
|
7123
|
+
* enables private targets. Send the same document again on install.
|
|
7124
|
+
*/
|
|
7125
|
+
export type InlineOpenApiDocumentSource = {
|
|
7126
|
+
kind: "openapi_document";
|
|
7127
|
+
sourceKey: string;
|
|
7128
|
+
document: string;
|
|
7129
|
+
baseUrl?: string | undefined;
|
|
7130
|
+
};
|
|
7131
|
+
/** Preview/install input sources. */
|
|
7132
|
+
export type IntegrationSourceInput = IntegrationSource | InlineOpenApiDocumentSource;
|
|
7133
|
+
/** Preview echo: an inline document is reported by digest, never its text. */
|
|
7134
|
+
export type IntegrationSourceProjection = IntegrationSource | {
|
|
7135
|
+
kind: "openapi_document";
|
|
7136
|
+
sourceKey: string;
|
|
7137
|
+
documentSha256: string;
|
|
7138
|
+
baseUrl?: string | undefined;
|
|
7139
|
+
};
|
|
5413
7140
|
export type PreviewApiIntegrationRequest = {
|
|
5414
|
-
source:
|
|
7141
|
+
source: IntegrationSourceInput;
|
|
5415
7142
|
connectionId?: string | undefined;
|
|
5416
7143
|
ownership?: ConnectionOwnership | undefined;
|
|
5417
7144
|
};
|
|
@@ -5447,7 +7174,7 @@ export type ApiIntegrationToolPreview = {
|
|
|
5447
7174
|
deprecated: boolean;
|
|
5448
7175
|
};
|
|
5449
7176
|
export type ApiIntegrationPreview = {
|
|
5450
|
-
source:
|
|
7177
|
+
source: IntegrationSourceProjection;
|
|
5451
7178
|
definitionId: string;
|
|
5452
7179
|
definitionProvenance: IntegrationDefinitionProvenance;
|
|
5453
7180
|
protocol: ApiIntegrationProtocol;
|
|
@@ -5469,7 +7196,7 @@ export type ApiIntegrationPreview = {
|
|
|
5469
7196
|
warnings: string[];
|
|
5470
7197
|
};
|
|
5471
7198
|
export type InstallApiIntegrationRequest = {
|
|
5472
|
-
source:
|
|
7199
|
+
source: IntegrationSourceInput;
|
|
5473
7200
|
expectedRevisionId: string;
|
|
5474
7201
|
expectedContentSha256: string;
|
|
5475
7202
|
connectionId?: string | undefined;
|
|
@@ -5478,6 +7205,14 @@ export type InstallApiIntegrationRequest = {
|
|
|
5478
7205
|
displayName?: string | undefined;
|
|
5479
7206
|
expectedInstanceVersion?: number | undefined;
|
|
5480
7207
|
allowedTools?: string[] | undefined;
|
|
7208
|
+
/**
|
|
7209
|
+
* Selected tools whose preview `approvalMode` is `"ask"` that should run
|
|
7210
|
+
* without per-call human approval (for example in scheduled or other
|
|
7211
|
+
* unattended sessions). Needs `capabilities:manage`; a curated definition
|
|
7212
|
+
* may forbid exempting specific operations (422). Declarative: omit it and every write tool asks
|
|
7213
|
+
* again. Connector Block and session approval policies still apply.
|
|
7214
|
+
*/
|
|
7215
|
+
autoApprovedTools?: string[] | undefined;
|
|
5481
7216
|
};
|
|
5482
7217
|
export type InstalledApiIntegration = {
|
|
5483
7218
|
capabilityId: string;
|
|
@@ -5623,6 +7358,9 @@ export type InstallPluginRequest = {
|
|
|
5623
7358
|
expectedInstallationVersion?: number | undefined;
|
|
5624
7359
|
};
|
|
5625
7360
|
export type InstalledPlugin = {
|
|
7361
|
+
skillPublications?: import("./skills.js").SkillPublicationReceipt[] | undefined;
|
|
7362
|
+
skillWrites?: import("./skills.js").SkillWriteReceipt[] | undefined;
|
|
7363
|
+
skillReleases?: import("./skills.js").SkillSourceReleaseReceipt[] | undefined;
|
|
5626
7364
|
pluginKey: string;
|
|
5627
7365
|
version: string;
|
|
5628
7366
|
pluginId: string;
|
|
@@ -5639,6 +7377,7 @@ export type PluginInstallationSummary = {
|
|
|
5639
7377
|
description: string;
|
|
5640
7378
|
category: string;
|
|
5641
7379
|
tags: string[];
|
|
7380
|
+
logoUrl?: string | null | undefined;
|
|
5642
7381
|
sourceUrl: string | null;
|
|
5643
7382
|
manifestDigest: string;
|
|
5644
7383
|
installationVersion: number;
|
|
@@ -5650,22 +7389,34 @@ export type PluginInstallationSummary = {
|
|
|
5650
7389
|
export type ListInstalledPluginsResponse = {
|
|
5651
7390
|
plugins: PluginInstallationSummary[];
|
|
5652
7391
|
};
|
|
7392
|
+
export type PluginUninstallComponentImpact = {
|
|
7393
|
+
capabilityId: string;
|
|
7394
|
+
kind: "skill" | "integration" | "mcp";
|
|
7395
|
+
retainedByOtherOwners: boolean;
|
|
7396
|
+
name: string;
|
|
7397
|
+
disposition: "removed" | "retained" | "inactive";
|
|
7398
|
+
retentionReasons: Array<"other_owners" | "customized" | "re_scoped" | "registry_unavailable">;
|
|
7399
|
+
remainingOwners: Array<{
|
|
7400
|
+
kind: "direct" | "plugin" | "migration";
|
|
7401
|
+
name: string;
|
|
7402
|
+
}>;
|
|
7403
|
+
skillId?: string | undefined;
|
|
7404
|
+
};
|
|
5653
7405
|
export type PluginUninstallPreview = {
|
|
5654
7406
|
pluginKey: string;
|
|
5655
7407
|
installed: boolean;
|
|
5656
7408
|
version: string | null;
|
|
5657
7409
|
installationVersion: number | null;
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
kind: "skill" | "integration" | "mcp";
|
|
5661
|
-
retainedByOtherOwners: boolean;
|
|
5662
|
-
}>;
|
|
7410
|
+
previewToken?: string | undefined;
|
|
7411
|
+
components: PluginUninstallComponentImpact[];
|
|
5663
7412
|
};
|
|
5664
7413
|
export type UninstallPluginRequest = {
|
|
5665
7414
|
expectedInstallationVersion: number;
|
|
7415
|
+
expectedPreviewToken?: string | undefined;
|
|
5666
7416
|
idempotencyKey: string;
|
|
5667
7417
|
};
|
|
5668
7418
|
export type UninstallPluginResult = {
|
|
7419
|
+
skillReleases?: import("./skills.js").SkillSourceReleaseReceipt[] | undefined;
|
|
5669
7420
|
pluginKey: string;
|
|
5670
7421
|
status: "not_installed" | "uninstalled";
|
|
5671
7422
|
retainedComponents: string[];
|
|
@@ -5681,6 +7432,10 @@ export type GitHubRepository = {
|
|
|
5681
7432
|
defaultBranch: string;
|
|
5682
7433
|
accountLogin: string;
|
|
5683
7434
|
accountType: string | null;
|
|
7435
|
+
/** GitHub's archived flag, when the provider reported it. */
|
|
7436
|
+
archived?: boolean | undefined;
|
|
7437
|
+
/** GitHub's reported size in kilobytes, when reported. Zero means empty. */
|
|
7438
|
+
sizeKb?: number | undefined;
|
|
5684
7439
|
};
|
|
5685
7440
|
export type GitHubRepositoryScope = "all" | "selected";
|
|
5686
7441
|
export type GitHubBindingStatus = "disabled" | "unbound" | "bound";
|
|
@@ -5694,7 +7449,7 @@ export type GitHubInstallationBinding = {
|
|
|
5694
7449
|
lifecycle: GitHubInstallationLifecycle;
|
|
5695
7450
|
repositoryScope: GitHubRepositoryScope;
|
|
5696
7451
|
repositoryCount: number;
|
|
5697
|
-
/**
|
|
7452
|
+
/** Opengeni-owned entry point for changing the installation's repository allowlist. */
|
|
5698
7453
|
configureUrl: string | null;
|
|
5699
7454
|
createdAt: string;
|
|
5700
7455
|
updatedAt: string;
|
|
@@ -5720,6 +7475,55 @@ export type GitHubAppInfo = {
|
|
|
5720
7475
|
export type GitHubRepositoriesResponse = {
|
|
5721
7476
|
repositories: GitHubRepository[];
|
|
5722
7477
|
};
|
|
7478
|
+
export type GitHubActionPolicyDecision = "allow" | "ask" | "block";
|
|
7479
|
+
export type GitHubActionPolicyEffectiveDecision = GitHubActionPolicyDecision | "mixed";
|
|
7480
|
+
export type GitHubActionPolicyGroup = "routine" | "review" | "merge";
|
|
7481
|
+
export type GitHubActionPolicyActor = {
|
|
7482
|
+
kind: "workspace_app";
|
|
7483
|
+
installationId: number;
|
|
7484
|
+
} | {
|
|
7485
|
+
kind: "personal";
|
|
7486
|
+
connectionId: string;
|
|
7487
|
+
};
|
|
7488
|
+
export type GitHubActionPolicyActorState = GitHubActionPolicyActor & {
|
|
7489
|
+
label: string;
|
|
7490
|
+
groups: Record<GitHubActionPolicyGroup, GitHubActionPolicyEffectiveDecision>;
|
|
7491
|
+
};
|
|
7492
|
+
export type GitHubActionPoliciesResponse = {
|
|
7493
|
+
enabled: boolean;
|
|
7494
|
+
actors: GitHubActionPolicyActorState[];
|
|
7495
|
+
};
|
|
7496
|
+
export type UpdateGitHubActionPolicyRequest = {
|
|
7497
|
+
actor: GitHubActionPolicyActor;
|
|
7498
|
+
group: GitHubActionPolicyGroup;
|
|
7499
|
+
decision: GitHubActionPolicyDecision;
|
|
7500
|
+
};
|
|
7501
|
+
export type VerifyPublicGitHubRepositoryRefRequest = {
|
|
7502
|
+
url: string;
|
|
7503
|
+
ref: string;
|
|
7504
|
+
};
|
|
7505
|
+
export type VerifyPublicGitHubRepositoryRefResponse = {
|
|
7506
|
+
owner: string;
|
|
7507
|
+
name: string;
|
|
7508
|
+
fullName: string;
|
|
7509
|
+
canonicalUrl: string;
|
|
7510
|
+
cloneUrl: string;
|
|
7511
|
+
defaultBranch: string;
|
|
7512
|
+
ref: string;
|
|
7513
|
+
commitSha: string;
|
|
7514
|
+
};
|
|
7515
|
+
export type GitHubRepositoryBranch = {
|
|
7516
|
+
name: string;
|
|
7517
|
+
isDefault: boolean;
|
|
7518
|
+
};
|
|
7519
|
+
export type ListGitHubRepositoryBranchesOptions = {
|
|
7520
|
+
cursor?: number | undefined;
|
|
7521
|
+
limit?: number | undefined;
|
|
7522
|
+
};
|
|
7523
|
+
export type GitHubRepositoryBranchesResponse = {
|
|
7524
|
+
branches: GitHubRepositoryBranch[];
|
|
7525
|
+
nextCursor: number | null;
|
|
7526
|
+
};
|
|
5723
7527
|
export type CreateGitHubAppManifestRequest = {
|
|
5724
7528
|
appName?: string | undefined;
|
|
5725
7529
|
organization?: string | undefined;
|
|
@@ -5734,11 +7538,23 @@ export type CreateGitHubAppManifestResponse = {
|
|
|
5734
7538
|
};
|
|
5735
7539
|
export type BillingMode = "disabled" | "stripe";
|
|
5736
7540
|
export type EntitlementsMode = "none" | "static" | "managed";
|
|
7541
|
+
export type PromotionalCreditScope = {
|
|
7542
|
+
label: string;
|
|
7543
|
+
eligibleModelIds: string[];
|
|
7544
|
+
};
|
|
7545
|
+
export type PromotionalCreditBalance = PromotionalCreditScope & {
|
|
7546
|
+
grantId: string;
|
|
7547
|
+
remainingMicros: number;
|
|
7548
|
+
/** Also pays for dictation and live voice, like general credits (signup credits). */
|
|
7549
|
+
coversVoice?: boolean | undefined;
|
|
7550
|
+
};
|
|
5737
7551
|
export type BillingBalance = {
|
|
5738
7552
|
accountId: string;
|
|
5739
7553
|
balanceMicros: number;
|
|
5740
7554
|
currency: "usd";
|
|
5741
7555
|
updatedAt: string;
|
|
7556
|
+
generalBalanceMicros?: number | undefined;
|
|
7557
|
+
promotionalCredits?: PromotionalCreditBalance[] | undefined;
|
|
5742
7558
|
};
|
|
5743
7559
|
export declare const KNOWN_USAGE_EVENT_TYPES: readonly ["agent_run.created", "agent_run.completed", "model.tokens", "model.cost", "file.uploaded", "file.deleted", "document.indexed", "scheduled_task.fired", "knowledge_source_sync.fired", "knowledge_source_sync.completed", "knowledge_source_sync.items", "knowledge_source_sync.bytes", "api_key.request", "sandbox.warm_seconds", "sandbox.warm_cost"];
|
|
5744
7560
|
export type KnownUsageEventType = (typeof KNOWN_USAGE_EVENT_TYPES)[number];
|
|
@@ -5790,12 +7606,16 @@ export type InsightsModelUsageRow = {
|
|
|
5790
7606
|
creditUsd: number;
|
|
5791
7607
|
estimatedProviderUsd: number;
|
|
5792
7608
|
estimatedProviderCostKnownCalls: number;
|
|
7609
|
+
equivalentCreditUsd: number;
|
|
7610
|
+
equivalentCreditCostKnownCalls: number;
|
|
5793
7611
|
};
|
|
5794
7612
|
export type InsightsSeriesPoint = {
|
|
5795
7613
|
label: string;
|
|
5796
7614
|
modelCostUsd: number;
|
|
5797
7615
|
estimatedProviderUsd: number;
|
|
5798
7616
|
estimatedProviderCostKnownCalls: number;
|
|
7617
|
+
equivalentCreditUsd: number;
|
|
7618
|
+
equivalentCreditCostKnownCalls: number;
|
|
5799
7619
|
warmSeconds: number;
|
|
5800
7620
|
inputTokens: number;
|
|
5801
7621
|
outputTokens: number;
|
|
@@ -5809,6 +7629,10 @@ export type InsightsSeriesPoint = {
|
|
|
5809
7629
|
cacheHitPct: number;
|
|
5810
7630
|
calls: number;
|
|
5811
7631
|
};
|
|
7632
|
+
export type InsightsScope = {
|
|
7633
|
+
rootSessionId: string | null;
|
|
7634
|
+
sessionId: string | null;
|
|
7635
|
+
};
|
|
5812
7636
|
export type InsightsDepthBucket = {
|
|
5813
7637
|
depth: number;
|
|
5814
7638
|
sessions: number;
|
|
@@ -5824,12 +7648,27 @@ export type InsightsSpendDriver = {
|
|
|
5824
7648
|
creditUsd: number;
|
|
5825
7649
|
estimatedProviderUsd: number;
|
|
5826
7650
|
estimatedProviderCostKnownCalls: number;
|
|
7651
|
+
equivalentCreditUsd: number;
|
|
7652
|
+
equivalentCreditCostKnownCalls: number;
|
|
5827
7653
|
tokens: number;
|
|
5828
7654
|
cacheHitPct: number;
|
|
5829
7655
|
pctOfCreditUsd: number;
|
|
5830
7656
|
pctOfTokens: number;
|
|
5831
7657
|
deltaUsdVsPrior: number;
|
|
5832
7658
|
};
|
|
7659
|
+
export type InsightsProjectRow = {
|
|
7660
|
+
id: string;
|
|
7661
|
+
kind: "project" | "other" | "unfiled" | "unavailable" | "deleted";
|
|
7662
|
+
label: string;
|
|
7663
|
+
projects: number;
|
|
7664
|
+
rootSessions: number;
|
|
7665
|
+
calls: number;
|
|
7666
|
+
creditUsd: number;
|
|
7667
|
+
estimatedProviderUsd: number;
|
|
7668
|
+
estimatedProviderCostKnownCalls: number;
|
|
7669
|
+
tokens: number;
|
|
7670
|
+
cacheHitPct: number | null;
|
|
7671
|
+
};
|
|
5833
7672
|
export type InsightsWarmGroupRow = {
|
|
5834
7673
|
id: string;
|
|
5835
7674
|
groupId: string;
|
|
@@ -5865,6 +7704,8 @@ export type InsightsScheduleRow = {
|
|
|
5865
7704
|
creditUsd: number | null;
|
|
5866
7705
|
estimatedProviderUsd: number | null;
|
|
5867
7706
|
estimatedProviderCostKnownCalls: number | null;
|
|
7707
|
+
equivalentCreditUsd: number | null;
|
|
7708
|
+
equivalentCreditCostKnownCalls: number | null;
|
|
5868
7709
|
tokens: number | null;
|
|
5869
7710
|
cacheHitPct: number | null;
|
|
5870
7711
|
billing: InsightsBillingPath | null;
|
|
@@ -5888,6 +7729,7 @@ export type InsightsModelCallRow = {
|
|
|
5888
7729
|
totalTokens: number | null;
|
|
5889
7730
|
creditUsd: number;
|
|
5890
7731
|
estimatedProviderUsd: number | null;
|
|
7732
|
+
equivalentCreditUsd: number | null;
|
|
5891
7733
|
pricingSource: InsightsPricingSource | null;
|
|
5892
7734
|
};
|
|
5893
7735
|
export type ModelContextContributionSource = "workspace_instruction_policy" | "legacy_workspace_instructions" | "preference_registry_descriptor" | "company_profile" | "legacy_memory_v1" | "runtime_skill_catalog";
|
|
@@ -5920,6 +7762,18 @@ export type WorkspaceInsightsSnapshot = {
|
|
|
5920
7762
|
series: InsightsSeriesPoint[];
|
|
5921
7763
|
depth: InsightsDepthBucket[];
|
|
5922
7764
|
drivers: InsightsSpendDriver[];
|
|
7765
|
+
projects: InsightsProjectRow[];
|
|
7766
|
+
privateChats: {
|
|
7767
|
+
ownerKey: string;
|
|
7768
|
+
name: string | null;
|
|
7769
|
+
you: boolean;
|
|
7770
|
+
calls: number;
|
|
7771
|
+
tokens: number;
|
|
7772
|
+
creditUsd: number;
|
|
7773
|
+
estimatedProviderUsd: number;
|
|
7774
|
+
estimatedProviderCostKnownCalls: number;
|
|
7775
|
+
}[];
|
|
7776
|
+
privateChatsTruncated: boolean;
|
|
5923
7777
|
schedules: InsightsScheduleRow[];
|
|
5924
7778
|
recentCalls: InsightsModelCallRow[];
|
|
5925
7779
|
promptContributions: InsightsPromptContributions;
|
|
@@ -5938,6 +7792,10 @@ export type WorkspaceInsightsSnapshot = {
|
|
|
5938
7792
|
priorEstimatedProviderUsd: number;
|
|
5939
7793
|
estimatedProviderCostKnownCalls: number;
|
|
5940
7794
|
priorEstimatedProviderCostKnownCalls: number;
|
|
7795
|
+
equivalentCreditUsd: number;
|
|
7796
|
+
priorEquivalentCreditUsd: number;
|
|
7797
|
+
equivalentCreditCostKnownCalls: number;
|
|
7798
|
+
priorEquivalentCreditCostKnownCalls: number;
|
|
5941
7799
|
modelCalls: number;
|
|
5942
7800
|
priorInputTokens: number;
|
|
5943
7801
|
priorTotalTokens: number;
|
|
@@ -5956,6 +7814,13 @@ export type WorkspaceInsightsSnapshot = {
|
|
|
5956
7814
|
agentRunsUsed: number;
|
|
5957
7815
|
agentRunCap: number | null;
|
|
5958
7816
|
modelFilterActive: boolean;
|
|
7817
|
+
dataThrough: string | null;
|
|
7818
|
+
cacheHitPct: number;
|
|
7819
|
+
scope: InsightsScope;
|
|
7820
|
+
driverGroups: number;
|
|
7821
|
+
driversTruncated: boolean;
|
|
7822
|
+
facetsTruncated: boolean;
|
|
7823
|
+
recentCallsTruncated: boolean;
|
|
5959
7824
|
};
|
|
5960
7825
|
export type WorkspaceInsightsResponse = {
|
|
5961
7826
|
snapshot: WorkspaceInsightsSnapshot;
|
|
@@ -5967,14 +7832,36 @@ export type BillingEntitlementsResponse = {
|
|
|
5967
7832
|
};
|
|
5968
7833
|
export type CreateCheckoutRequest = {
|
|
5969
7834
|
accountId?: string | undefined;
|
|
5970
|
-
/**
|
|
5971
|
-
|
|
7835
|
+
/**
|
|
7836
|
+
* USD amount with cent precision (server enforces min/max). Required unless
|
|
7837
|
+
* `promotionCode` is given; a fixed-amount USD code then sets the amount.
|
|
7838
|
+
*/
|
|
7839
|
+
amountUsd?: number | undefined;
|
|
7840
|
+
/** A Stripe promotion code to apply up front, as the customer typed it. */
|
|
7841
|
+
promotionCode?: string | undefined;
|
|
5972
7842
|
successUrl?: string | undefined;
|
|
5973
7843
|
cancelUrl?: string | undefined;
|
|
5974
7844
|
};
|
|
5975
7845
|
export type CreateCheckoutResponse = {
|
|
5976
7846
|
checkoutSessionId: string;
|
|
5977
7847
|
url: string;
|
|
7848
|
+
/** The credits this checkout grants once it completes. */
|
|
7849
|
+
amountUsd?: number | undefined;
|
|
7850
|
+
promotionalScope?: PromotionalCreditScope | undefined;
|
|
7851
|
+
};
|
|
7852
|
+
/** Where one checkout stands, and whether its credits reached the balance. */
|
|
7853
|
+
export type BillingCheckoutStatus = {
|
|
7854
|
+
checkoutSessionId: string;
|
|
7855
|
+
status: "open" | "complete" | "expired";
|
|
7856
|
+
credit: {
|
|
7857
|
+
state: "pending" | "granted";
|
|
7858
|
+
amountMicros: number;
|
|
7859
|
+
currency: "usd";
|
|
7860
|
+
/** True when a coupon covered the whole checkout, so nothing was charged. */
|
|
7861
|
+
free: boolean;
|
|
7862
|
+
promotionalScope?: PromotionalCreditScope | undefined;
|
|
7863
|
+
};
|
|
7864
|
+
balance: BillingBalance | null;
|
|
5978
7865
|
};
|
|
5979
7866
|
export type CreateBillingPortalRequest = {
|
|
5980
7867
|
accountId?: string | undefined;
|
|
@@ -5998,17 +7885,36 @@ export type UserMessageEventInput = {
|
|
|
5998
7885
|
controlEtag?: string | undefined;
|
|
5999
7886
|
expectedDraftRevision?: number | undefined;
|
|
6000
7887
|
mcpCredentialUpdates?: SessionMcpCredentialUpdateInput[] | undefined;
|
|
6001
|
-
|
|
7888
|
+
connectionAccounts?: McpConnectionAccountSelection[] | undefined;
|
|
6002
7889
|
personalResourceAttachment?: PersonalResourceAttachmentIntent | undefined;
|
|
6003
7890
|
};
|
|
6004
7891
|
};
|
|
7892
|
+
/**
|
|
7893
|
+
* Stable fields of each `session.requiresAction` `payload.approvals[]` entry.
|
|
7894
|
+
* Entries also carry producer-specific compatibility fields (`rawItem` on a
|
|
7895
|
+
* turn's first pause, `raw` on later ones); read only these three. Events
|
|
7896
|
+
* written before these fields existed need `approvalsFromRequiresAction`
|
|
7897
|
+
* from `@opengeni/react` or `approvalIdentifier` from `@opengeni/contracts`.
|
|
7898
|
+
*/
|
|
7899
|
+
export type SessionApprovalRequest = {
|
|
7900
|
+
/** Pass as `sendApprovalDecision({ approvalId })`; this is the tool call id. */
|
|
7901
|
+
id: string;
|
|
7902
|
+
/** Model-visible tool name, for example `crm__update_record`. */
|
|
7903
|
+
name: string;
|
|
7904
|
+
/** Tool arguments as the model produced them (usually a JSON string). */
|
|
7905
|
+
arguments: unknown;
|
|
7906
|
+
[compatibilityField: string]: unknown;
|
|
7907
|
+
};
|
|
6005
7908
|
export type UserApprovalDecisionEventInput = {
|
|
6006
7909
|
type: "user.approvalDecision";
|
|
6007
7910
|
clientEventId?: string | undefined;
|
|
6008
7911
|
payload: {
|
|
7912
|
+
/** `session.requiresAction` `approvals[].id` (the pending tool call id). */
|
|
6009
7913
|
approvalId: string;
|
|
6010
7914
|
decision: "approve" | "reject";
|
|
6011
7915
|
message?: string | undefined;
|
|
7916
|
+
/** Server-owned header rotation applied atomically when the response is accepted. */
|
|
7917
|
+
mcpCredentialUpdates?: SessionMcpCredentialUpdateInput[] | undefined;
|
|
6012
7918
|
};
|
|
6013
7919
|
};
|
|
6014
7920
|
export type UserHumanInputResponseEventInput = {
|
|
@@ -6017,6 +7923,8 @@ export type UserHumanInputResponseEventInput = {
|
|
|
6017
7923
|
payload: {
|
|
6018
7924
|
requestId: string;
|
|
6019
7925
|
response: SubmitHumanInputResponseRequest;
|
|
7926
|
+
/** Server-owned header rotation applied atomically when the response is accepted. */
|
|
7927
|
+
mcpCredentialUpdates?: SessionMcpCredentialUpdateInput[] | undefined;
|
|
6020
7928
|
};
|
|
6021
7929
|
};
|
|
6022
7930
|
/** Control/user events a client may POST to a session's event log. */
|
|
@@ -6041,7 +7949,7 @@ export type MetricSample = {
|
|
|
6041
7949
|
/** The derived dashboard state of a machine (M3 liveness + consent/display
|
|
6042
7950
|
* reasons + the in-flight device-flow). */
|
|
6043
7951
|
export type MachineState = "online" | "reconnecting" | "offline" | "consent_required" | "display_unavailable" | "enrolling";
|
|
6044
|
-
export type MachineKind = "modal" | "selfhosted" | "opensandbox";
|
|
7952
|
+
export type MachineKind = "docker" | "modal" | "local" | "daytona" | "runloop" | "e2b" | "blaxel" | "cloudflare" | "vercel" | "selfhosted" | "opensandbox";
|
|
6045
7953
|
export type MachineConnectionAuthority = {
|
|
6046
7954
|
state: "not_applicable" | "unclaimed" | "active" | "expired";
|
|
6047
7955
|
generation: number;
|
|
@@ -6060,6 +7968,17 @@ export type MachineRuntimeCapabilities = {
|
|
|
6060
7968
|
browserBridge: boolean;
|
|
6061
7969
|
operationResourcePolicy: boolean;
|
|
6062
7970
|
operationCpuQuota: boolean;
|
|
7971
|
+
transactionalFsWrite: boolean;
|
|
7972
|
+
/** The agent renews its credentials on request, so screen control turns on in place. */
|
|
7973
|
+
credentialRenew: boolean;
|
|
7974
|
+
/** The live agent's credentials carry screen-control consent; null when unknown. */
|
|
7975
|
+
screenControl: boolean | null;
|
|
7976
|
+
};
|
|
7977
|
+
/** The three macOS Privacy & Security grants desktop capture and input need. */
|
|
7978
|
+
export type MachineMacPermissions = {
|
|
7979
|
+
screenRecording: boolean;
|
|
7980
|
+
accessibility: boolean;
|
|
7981
|
+
inputMonitoring: boolean;
|
|
6063
7982
|
};
|
|
6064
7983
|
export type MachineUpdateStatus = "requested" | "accepted" | "waiting_for_idle" | "downloading" | "verifying" | "applying" | "restarting" | "succeeded" | "failed";
|
|
6065
7984
|
export type MachineUpdateState = {
|
|
@@ -6080,14 +7999,114 @@ export type MachineRuntime = {
|
|
|
6080
7999
|
updateChannel: "stable" | "beta" | null;
|
|
6081
8000
|
desiredVersion: string | null;
|
|
6082
8001
|
versionState: "unknown" | "current" | "outdated" | "ahead" | "updating" | "update_failed";
|
|
8002
|
+
/** Required installer bootstrap when a legacy updater cannot safely replace the install. */
|
|
8003
|
+
updateBlockedReason?: string | null | undefined;
|
|
6083
8004
|
capabilities: MachineRuntimeCapabilities;
|
|
6084
8005
|
update: MachineUpdateState | null;
|
|
8006
|
+
/** Live macOS permissions; null off macOS or when the agent does not report them. */
|
|
8007
|
+
macPermissions: MachineMacPermissions | null;
|
|
6085
8008
|
};
|
|
6086
8009
|
export type UpdateMachineAgentResponse = {
|
|
6087
8010
|
operationId: string;
|
|
6088
8011
|
accepted: boolean;
|
|
6089
8012
|
targetVersion: string;
|
|
6090
8013
|
};
|
|
8014
|
+
/** POST /v1/workspaces/:ws/machines/:enrollmentId/screen-control response.
|
|
8015
|
+
* active: on now. pending: allowed, and turns on by itself when the machine
|
|
8016
|
+
* reconnects (offline), after its agent update (agent_update_required), or on
|
|
8017
|
+
* a retry (renewal_failed). reconnect_required: run the connect command on the
|
|
8018
|
+
* machine again. */
|
|
8019
|
+
export type EnableMachineScreenControlResponse = {
|
|
8020
|
+
status: "active" | "pending";
|
|
8021
|
+
reason: "offline" | "agent_update_required" | "renewal_failed" | "reconnect_required" | null;
|
|
8022
|
+
message: string | null;
|
|
8023
|
+
};
|
|
8024
|
+
/** macOS Privacy & Security panes the agent needs for desktop capture/input. */
|
|
8025
|
+
export type MachinePrivacySettingsPane = "screen_recording" | "accessibility" | "input_monitoring";
|
|
8026
|
+
/** POST /v1/workspaces/:ws/machines/:enrollmentId/privacy-settings body. */
|
|
8027
|
+
export type OpenMachinePrivacySettingsRequest = {
|
|
8028
|
+
pane: MachinePrivacySettingsPane;
|
|
8029
|
+
};
|
|
8030
|
+
/** Who can use a Connected Machine: everyone in its workspace, or one person. */
|
|
8031
|
+
export type MachineAudience = "workspace" | "only_me";
|
|
8032
|
+
/** POST /v1/workspaces/:ws/machines/:enrollmentId/audience/preview body.
|
|
8033
|
+
* `ownerSubjectId` names who owns the machine as Only me (defaults to the
|
|
8034
|
+
* caller; naming someone else needs workspace admin). */
|
|
8035
|
+
export type MachineAudiencePreviewRequest = {
|
|
8036
|
+
audience: MachineAudience;
|
|
8037
|
+
ownerSubjectId?: string;
|
|
8038
|
+
};
|
|
8039
|
+
/** PUT /v1/workspaces/:ws/machines/:enrollmentId/audience body: apply the
|
|
8040
|
+
* previewed plan at the generation it was read at. */
|
|
8041
|
+
export type ChangeMachineAudienceRequest = MachineAudiencePreviewRequest & {
|
|
8042
|
+
expectedGeneration: number;
|
|
8043
|
+
};
|
|
8044
|
+
/** What the change does to one thing on the machine. `move_off`: the chat
|
|
8045
|
+
* leaves the machine (its history and files stay). `keep`: the owner's chat
|
|
8046
|
+
* stays. `make_only_me` / `pause`: a schedule that runs on the machine.
|
|
8047
|
+
* `remove_first`: the same computer is connected a second time. */
|
|
8048
|
+
export type MachineAudienceAction = "move_off" | "keep" | "make_only_me" | "pause" | "remove_first";
|
|
8049
|
+
/** One thing an audience change affects. Another member's private chat or
|
|
8050
|
+
* schedule is listed without its title or owner. */
|
|
8051
|
+
export type MachineAudienceItem = {
|
|
8052
|
+
kind: "chat" | "schedule" | "duplicate_connection";
|
|
8053
|
+
action: MachineAudienceAction;
|
|
8054
|
+
sessionId: string | null;
|
|
8055
|
+
scheduledTaskId: string | null;
|
|
8056
|
+
enrollmentId: string | null;
|
|
8057
|
+
workspaceId: string | null;
|
|
8058
|
+
relation: "other_member" | "owner_shared" | "owner_private" | "other_workspace" | null;
|
|
8059
|
+
visibility: "user_private" | "workspace_shared" | null;
|
|
8060
|
+
title: string | null;
|
|
8061
|
+
ownerSubjectId: string | null;
|
|
8062
|
+
/** A running turn in this chat stops for good. */
|
|
8063
|
+
stopsTurn: boolean;
|
|
8064
|
+
/** Agent commands still running in this chat that stop. */
|
|
8065
|
+
stopsCommands: number;
|
|
8066
|
+
};
|
|
8067
|
+
/** Counts of what one change does. */
|
|
8068
|
+
export type MachineAudienceSummary = {
|
|
8069
|
+
keptChats: number;
|
|
8070
|
+
keptSharedChats: number;
|
|
8071
|
+
movedOffChats: number;
|
|
8072
|
+
schedulesMadeOnlyMe: number;
|
|
8073
|
+
schedulesPaused: number;
|
|
8074
|
+
stoppedTurns: number;
|
|
8075
|
+
stoppedCommands: number;
|
|
8076
|
+
notifiedPeople: number;
|
|
8077
|
+
};
|
|
8078
|
+
/** POST .../audience/preview response: everything one confirmation does.
|
|
8079
|
+
* `ready` is false only while the same computer is also connected as a
|
|
8080
|
+
* separate machine. */
|
|
8081
|
+
export type MachineAudiencePreview = {
|
|
8082
|
+
enrollmentId: string;
|
|
8083
|
+
sandboxId: string;
|
|
8084
|
+
machineName: string;
|
|
8085
|
+
currentAudience: MachineAudience;
|
|
8086
|
+
targetAudience: MachineAudience;
|
|
8087
|
+
generation: number;
|
|
8088
|
+
ownerSubjectId: string | null;
|
|
8089
|
+
summary: MachineAudienceSummary;
|
|
8090
|
+
items: MachineAudienceItem[];
|
|
8091
|
+
ready: boolean;
|
|
8092
|
+
};
|
|
8093
|
+
/** PUT .../audience response. The machine keeps its sandbox ID and connection. */
|
|
8094
|
+
export type ChangeMachineAudienceResponse = {
|
|
8095
|
+
enrollmentId: string;
|
|
8096
|
+
sandboxId: string;
|
|
8097
|
+
previousAudience: MachineAudience;
|
|
8098
|
+
audience: MachineAudience;
|
|
8099
|
+
ownerSubjectId: string | null;
|
|
8100
|
+
generation: number;
|
|
8101
|
+
summary: MachineAudienceSummary;
|
|
8102
|
+
detachedSessionIds: string[];
|
|
8103
|
+
keptSessionIds: string[];
|
|
8104
|
+
};
|
|
8105
|
+
/** POST /v1/workspaces/:ws/machines/:enrollmentId/privacy-settings response. */
|
|
8106
|
+
export type OpenMachinePrivacySettingsResponse = {
|
|
8107
|
+
opened: boolean;
|
|
8108
|
+
message: string | null;
|
|
8109
|
+
};
|
|
6091
8110
|
export type MachineOperationPolicy = {
|
|
6092
8111
|
memoryMaxBytes: number | null;
|
|
6093
8112
|
memoryHighBytes: number | null;
|
|
@@ -6185,7 +8204,7 @@ export type SwapActiveSandboxResponse = {
|
|
|
6185
8204
|
activeSandboxId: string | null;
|
|
6186
8205
|
activeEpoch: number;
|
|
6187
8206
|
reason?: string;
|
|
6188
|
-
code?: "stale_pointer" | "offline_enrollment" | "unsupported_backend_context" | "transient_establishment" | "concurrent_swap" | "recovery_in_progress" | "recovery_degraded" | "recovery_unrecoverable";
|
|
8207
|
+
code?: "stale_pointer" | "offline_enrollment" | "unsupported_backend_context" | "transient_establishment" | "concurrent_swap" | "personal_machine_permission_required" | "personal_machine_not_permitted" | "recovery_in_progress" | "recovery_degraded" | "recovery_unrecoverable";
|
|
6189
8208
|
};
|
|
6190
8209
|
/** Mirror of `@opengeni/contracts` EnrollmentOs. */
|
|
6191
8210
|
export type EnrollmentOs = "linux" | "macos" | "windows";
|
|
@@ -6233,12 +8252,27 @@ export type DeviceEnrollmentDenyResponse = {
|
|
|
6233
8252
|
/** POST /v1/workspaces/:ws/enrollments/token body. */
|
|
6234
8253
|
export type MintEnrollTokenRequest = {
|
|
6235
8254
|
allowScreenControl?: boolean;
|
|
8255
|
+
/**
|
|
8256
|
+
* Who can use the machine. `user` makes it the signed-in caller's own
|
|
8257
|
+
* machine (requires a verified person: someone signed in, or a credential
|
|
8258
|
+
* acting as them, such as a personal API key or an organization key acting
|
|
8259
|
+
* `asUser`; a key, service or agent acting as itself gets 422); `workspace`
|
|
8260
|
+
* shares it with this workspace's members. Omitted mints the original
|
|
8261
|
+
* workspace-shared token.
|
|
8262
|
+
*/
|
|
8263
|
+
scope?: EnrollTokenScope;
|
|
6236
8264
|
};
|
|
8265
|
+
/** Who can use a machine connected with an enroll token. */
|
|
8266
|
+
export type EnrollTokenScope = "user" | "workspace";
|
|
6237
8267
|
/** POST /v1/workspaces/:ws/enrollments/token response. The `token` is SECRET. */
|
|
6238
8268
|
export type MintEnrollTokenResponse = {
|
|
6239
8269
|
token: string;
|
|
6240
8270
|
expiresAt: string;
|
|
6241
8271
|
expiresInSeconds: number;
|
|
8272
|
+
/** What the token grants. Absent from servers that predate scoped tokens,
|
|
8273
|
+
* which always mint workspace-shared tokens. */
|
|
8274
|
+
scope?: EnrollTokenScope;
|
|
8275
|
+
allowScreenControl?: boolean;
|
|
6242
8276
|
};
|
|
6243
8277
|
/** The credential payload the headless exchange returns (a subset of the agent's
|
|
6244
8278
|
* EnrollmentCredentials — IDENTICAL to the device-flow poll authorized branch). */
|
|
@@ -6270,4 +8304,245 @@ export type EnrollTokenExchangeRequest = {
|
|
|
6270
8304
|
export type EnrollTokenExchangeResponse = {
|
|
6271
8305
|
credentials: EnrollmentCredentials;
|
|
6272
8306
|
};
|
|
6273
|
-
export {
|
|
8307
|
+
export type ModelConnectionAccessPolicy = {
|
|
8308
|
+
allowedModels: string[] | null;
|
|
8309
|
+
/** Organization-pool grants; null for every shared workspace, including new ones. */
|
|
8310
|
+
allowedWorkspaces: string[] | null;
|
|
8311
|
+
allowPersonalWorkspaces: boolean;
|
|
8312
|
+
/**
|
|
8313
|
+
* The chosen people (organization membership ids), or null when the account
|
|
8314
|
+
* is not limited to people. Requires `allowedWorkspaces: []` and
|
|
8315
|
+
* `allowPersonalWorkspaces: false`.
|
|
8316
|
+
*/
|
|
8317
|
+
allowedPeople?: string[] | null;
|
|
8318
|
+
/** Explicit owner consent to share a personal subscription with the organization. */
|
|
8319
|
+
sharePersonal?: true;
|
|
8320
|
+
version: number;
|
|
8321
|
+
};
|
|
8322
|
+
export type ModelConnectionAccessResponse = {
|
|
8323
|
+
policy: ModelConnectionAccessPolicy;
|
|
8324
|
+
models: Array<{
|
|
8325
|
+
id: string;
|
|
8326
|
+
label: string;
|
|
8327
|
+
}>;
|
|
8328
|
+
workspaces: Array<{
|
|
8329
|
+
id: string;
|
|
8330
|
+
name: string;
|
|
8331
|
+
}>;
|
|
8332
|
+
personalWorkspacesSupported: boolean;
|
|
8333
|
+
/** The account can be limited to chosen people. */
|
|
8334
|
+
peopleSupported?: boolean;
|
|
8335
|
+
/** Active members of the organization an administrator can choose. */
|
|
8336
|
+
people?: Array<{
|
|
8337
|
+
id: string;
|
|
8338
|
+
name: string | null;
|
|
8339
|
+
email: string | null;
|
|
8340
|
+
}>;
|
|
8341
|
+
/** Workspaces that use the account as their own; they always keep it for workspace choices. */
|
|
8342
|
+
localWorkspaceIds?: string[];
|
|
8343
|
+
/** The workspace whose administrators also manage the account, if any. */
|
|
8344
|
+
managedByWorkspaceId?: string | null;
|
|
8345
|
+
personalSharingSupported?: boolean;
|
|
8346
|
+
};
|
|
8347
|
+
export type ConnectorToolPermission = "allow" | "ask" | "block";
|
|
8348
|
+
export type ConnectorToolPermissionEntry = {
|
|
8349
|
+
name: string;
|
|
8350
|
+
title?: string | undefined;
|
|
8351
|
+
description?: string | undefined;
|
|
8352
|
+
group: "read" | "write" | "other";
|
|
8353
|
+
permission: ConnectorToolPermission;
|
|
8354
|
+
inherited: boolean;
|
|
8355
|
+
approvalRequired: boolean;
|
|
8356
|
+
source?: "recommended" | "connector_default" | "tool" | "action" | "conflict";
|
|
8357
|
+
conditional?: boolean;
|
|
8358
|
+
actionPermissions?: Array<{
|
|
8359
|
+
actionName: string;
|
|
8360
|
+
permission: ConnectorToolPermission;
|
|
8361
|
+
}>;
|
|
8362
|
+
};
|
|
8363
|
+
export type ConnectorToolPermissionsResponse = {
|
|
8364
|
+
connectionId: string;
|
|
8365
|
+
serverId: string;
|
|
8366
|
+
defaultPermission: ConnectorToolPermission | null;
|
|
8367
|
+
tools: ConnectorToolPermissionEntry[];
|
|
8368
|
+
discoveryError: string | null;
|
|
8369
|
+
canManage: boolean;
|
|
8370
|
+
appliesTo?: "next_attempt";
|
|
8371
|
+
revision?: string;
|
|
8372
|
+
accountLabel?: string;
|
|
8373
|
+
instanceKey?: string;
|
|
8374
|
+
accounts?: Array<{
|
|
8375
|
+
connectionId: string;
|
|
8376
|
+
label: string;
|
|
8377
|
+
scope: "personal" | "workspace" | "none";
|
|
8378
|
+
instanceKey?: string;
|
|
8379
|
+
}>;
|
|
8380
|
+
};
|
|
8381
|
+
export type UpdateConnectorToolPermissionsRequest = {
|
|
8382
|
+
connectionId: string;
|
|
8383
|
+
permission: ConnectorToolPermission | null;
|
|
8384
|
+
expectedRevision?: string;
|
|
8385
|
+
instanceKey?: string;
|
|
8386
|
+
} & ({
|
|
8387
|
+
target: "default";
|
|
8388
|
+
} | {
|
|
8389
|
+
target: "tools";
|
|
8390
|
+
toolNames: string[];
|
|
8391
|
+
} | {
|
|
8392
|
+
target: "action";
|
|
8393
|
+
toolName: string;
|
|
8394
|
+
actionName: string;
|
|
8395
|
+
});
|
|
8396
|
+
/** Saved Allow/Ask/Block rules for a session MCP server the host attaches.
|
|
8397
|
+
* Tools without a rule follow `defaultPermission`, then the attaching session's
|
|
8398
|
+
* `requireApproval` recommendation (Ask), then Allow. */
|
|
8399
|
+
export type SessionMcpToolPermissionsResponse = {
|
|
8400
|
+
connectionId: string;
|
|
8401
|
+
serverId: string;
|
|
8402
|
+
defaultPermission: ConnectorToolPermission | null;
|
|
8403
|
+
tools: Array<{
|
|
8404
|
+
toolName: string;
|
|
8405
|
+
permission: ConnectorToolPermission;
|
|
8406
|
+
}>;
|
|
8407
|
+
revision: string;
|
|
8408
|
+
canManage: boolean;
|
|
8409
|
+
appliesTo: "next_attempt";
|
|
8410
|
+
};
|
|
8411
|
+
/** `url` is the exact URL attached to sessions; `permission: null` resets. */
|
|
8412
|
+
export type UpdateSessionMcpToolPermissionsRequest = {
|
|
8413
|
+
serverId: string;
|
|
8414
|
+
url: string;
|
|
8415
|
+
permission: ConnectorToolPermission | null;
|
|
8416
|
+
expectedRevision?: string;
|
|
8417
|
+
} & ({
|
|
8418
|
+
target: "default";
|
|
8419
|
+
} | {
|
|
8420
|
+
target: "tools";
|
|
8421
|
+
toolNames: string[];
|
|
8422
|
+
});
|
|
8423
|
+
/** Agent capability ids (see `@opengeni/contracts` agent-config). */
|
|
8424
|
+
export type AgentCapabilityId = "webSearch" | "humanInput" | "skills" | "goals" | "subagents" | "knowledge" | "schedules" | "artifacts" | "browser" | "secrets" | "media" | "workspaceFiles" | "workspaceConnectors" | "workspaceAdmin";
|
|
8425
|
+
/** `read` reads installed Skills; `manage` also changes them. */
|
|
8426
|
+
export type AgentSkillsCapability = "read" | "manage" | false;
|
|
8427
|
+
export type AgentCapabilityToggles = {
|
|
8428
|
+
webSearch?: boolean | undefined;
|
|
8429
|
+
humanInput?: boolean | undefined;
|
|
8430
|
+
skills?: AgentSkillsCapability | undefined;
|
|
8431
|
+
goals?: boolean | undefined;
|
|
8432
|
+
subagents?: boolean | undefined;
|
|
8433
|
+
knowledge?: boolean | undefined;
|
|
8434
|
+
schedules?: boolean | undefined;
|
|
8435
|
+
artifacts?: boolean | undefined;
|
|
8436
|
+
browser?: boolean | undefined;
|
|
8437
|
+
secrets?: boolean | undefined;
|
|
8438
|
+
media?: boolean | undefined;
|
|
8439
|
+
workspaceFiles?: boolean | undefined;
|
|
8440
|
+
workspaceConnectors?: boolean | undefined;
|
|
8441
|
+
workspaceAdmin?: boolean | undefined;
|
|
8442
|
+
};
|
|
8443
|
+
/**
|
|
8444
|
+
* `"all"`: everything this workspace offers (today's behavior). `"none"`: the
|
|
8445
|
+
* session's own tools plus essentials. An object starts from one and toggles.
|
|
8446
|
+
*/
|
|
8447
|
+
export type AgentCapabilities = "all" | "none" | ({
|
|
8448
|
+
from: "all" | "none";
|
|
8449
|
+
} & AgentCapabilityToggles);
|
|
8450
|
+
export type AgentRenderer = "opengeni" | "markdown";
|
|
8451
|
+
export type AgentConfigRequest = {
|
|
8452
|
+
capabilities?: AgentCapabilities | undefined;
|
|
8453
|
+
/** Replaces only Opengeni's identity lines (max 8,000 chars); null = default identity. */
|
|
8454
|
+
identity?: string | null | undefined;
|
|
8455
|
+
/** Alias of the session `instructions` field. */
|
|
8456
|
+
instructions?: string | undefined;
|
|
8457
|
+
renderer?: AgentRenderer | undefined;
|
|
8458
|
+
/** Vaults this session may use (input only); intersected with the parent's policy. */
|
|
8459
|
+
vaultPolicy?: VaultPolicy | undefined;
|
|
8460
|
+
};
|
|
8461
|
+
/** Which vaults a session or schedule may use (see `@opengeni/contracts` VaultPolicy). */
|
|
8462
|
+
export type VaultPolicy = {
|
|
8463
|
+
mode: "all";
|
|
8464
|
+
} | {
|
|
8465
|
+
mode: "selected";
|
|
8466
|
+
vaultIds: string[];
|
|
8467
|
+
};
|
|
8468
|
+
export type WorkspaceAgentDefaults = {
|
|
8469
|
+
capabilities?: AgentCapabilities | undefined;
|
|
8470
|
+
identity?: string | null | undefined;
|
|
8471
|
+
renderer?: AgentRenderer | undefined;
|
|
8472
|
+
};
|
|
8473
|
+
export type ResolvedAgentCapabilities = {
|
|
8474
|
+
webSearch: boolean;
|
|
8475
|
+
humanInput: boolean;
|
|
8476
|
+
skills: AgentSkillsCapability;
|
|
8477
|
+
goals: boolean;
|
|
8478
|
+
subagents: boolean;
|
|
8479
|
+
knowledge: boolean;
|
|
8480
|
+
schedules: boolean;
|
|
8481
|
+
artifacts: boolean;
|
|
8482
|
+
browser: boolean;
|
|
8483
|
+
secrets: boolean;
|
|
8484
|
+
media: boolean;
|
|
8485
|
+
workspaceFiles: boolean;
|
|
8486
|
+
workspaceConnectors: boolean;
|
|
8487
|
+
workspaceAdmin: boolean;
|
|
8488
|
+
};
|
|
8489
|
+
export type ResolvedAgentConfig = {
|
|
8490
|
+
version: 1;
|
|
8491
|
+
from: "all" | "none";
|
|
8492
|
+
capabilities: ResolvedAgentCapabilities;
|
|
8493
|
+
/** Capabilities wanted on but not offered by this deployment. */
|
|
8494
|
+
unavailable: AgentCapabilityId[];
|
|
8495
|
+
/** Why each unavailable capability is off; present whenever `unavailable` is non-empty. */
|
|
8496
|
+
unavailableReasons?: Partial<Record<AgentCapabilityId, string>> | undefined;
|
|
8497
|
+
identity: string | null;
|
|
8498
|
+
renderer: AgentRenderer;
|
|
8499
|
+
source: "request" | "workspace_default" | "deployment_default" | "inherited" | "legacy_conversion";
|
|
8500
|
+
};
|
|
8501
|
+
export type AgentEffectiveTools = {
|
|
8502
|
+
capabilities: ResolvedAgentCapabilities;
|
|
8503
|
+
unavailable: AgentCapabilityId[];
|
|
8504
|
+
/** False until exact runtime media adapters (including credential identity) are resolved. */
|
|
8505
|
+
mediaToolsKnown?: boolean | undefined;
|
|
8506
|
+
tools: Array<{
|
|
8507
|
+
name: string;
|
|
8508
|
+
capability: AgentCapabilityId | "runtime" | "sandbox" | "product";
|
|
8509
|
+
source: "first_party" | "runtime" | "hosted" | "sandbox" | "mcp";
|
|
8510
|
+
visibility?: "upfront" | "search" | undefined;
|
|
8511
|
+
}>;
|
|
8512
|
+
mcpServers: Array<{
|
|
8513
|
+
id: string;
|
|
8514
|
+
capability: AgentCapabilityId | "runtime" | "product";
|
|
8515
|
+
toolsKnown: boolean;
|
|
8516
|
+
}>;
|
|
8517
|
+
};
|
|
8518
|
+
/**
|
|
8519
|
+
* `PUT .../sessions/:id/skills`. Replaces every Skill the session carries
|
|
8520
|
+
* itself; an empty list removes them all.
|
|
8521
|
+
*/
|
|
8522
|
+
export type UpdateSessionSkillsRequest = {
|
|
8523
|
+
skills: SessionSkillInput[];
|
|
8524
|
+
/** The session's current `toolPolicyVersion` (shared CAS). */
|
|
8525
|
+
expectedVersion: number;
|
|
8526
|
+
};
|
|
8527
|
+
/** `PUT .../sessions/:id/agent`. Omitted agent fields keep their current values. */
|
|
8528
|
+
export type UpdateSessionAgentRequest = {
|
|
8529
|
+
agent: AgentConfigRequest;
|
|
8530
|
+
/** The session's current `toolPolicyVersion` (shared CAS). */
|
|
8531
|
+
expectedVersion: number;
|
|
8532
|
+
};
|
|
8533
|
+
export type ClientAgentConfig = {
|
|
8534
|
+
/** @deprecated Agent configuration is always on; current servers always report `true`. */
|
|
8535
|
+
enabled: boolean;
|
|
8536
|
+
/** @deprecated Omitted `agent` always resolves `{ capabilities: "all" }`; always `true`. */
|
|
8537
|
+
defaultForNewSessions: boolean;
|
|
8538
|
+
capabilities: Array<{
|
|
8539
|
+
id: AgentCapabilityId;
|
|
8540
|
+
available: boolean;
|
|
8541
|
+
reason?: string | undefined;
|
|
8542
|
+
}>;
|
|
8543
|
+
};
|
|
8544
|
+
/** `error.details.code` of a 422 agent-configuration failure. */
|
|
8545
|
+
export type AgentConfigErrorCode = "agent_capability_unavailable" | "agent_config_conflict" | "agent_config_widening"
|
|
8546
|
+
/** Returned only by older servers that predate always-on agent configuration. */
|
|
8547
|
+
| "agent_config_not_enabled";
|
|
8548
|
+
export type { ToolActionReview, ToolReviewDetailsPage, ToolReviewStatus, } from "@opengeni/contracts";
|