@opengeni/sdk 0.29.0 → 0.33.1
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 +47 -4
- package/dist/artifact-client.d.ts +11 -0
- package/dist/chunk-YROWFD7R.js +2971 -0
- package/dist/chunk-YROWFD7R.js.map +1 -0
- package/dist/client.d.ts +643 -0
- package/dist/core.d.ts +5 -0
- package/dist/core.js +23 -0
- package/dist/core.js.map +1 -0
- package/dist/desktop.d.ts +71 -0
- package/dist/errors.d.ts +39 -0
- package/dist/index.d.ts +26 -4211
- package/dist/index.js +50 -2729
- package/dist/index.js.map +1 -1
- package/dist/mcp-output.d.ts +15 -0
- package/dist/preference-registry.d.ts +169 -0
- package/dist/proxy.d.ts +64 -0
- package/dist/sse.d.ts +14 -0
- package/dist/stream.d.ts +48 -0
- package/dist/terminal.d.ts +49 -0
- package/dist/transcription.d.ts +189 -0
- package/dist/types.d.ts +3221 -0
- package/dist/workspace-artifacts.d.ts +94 -0
- package/dist/workspace-control-stream.d.ts +12 -0
- package/dist/workspace-instruction-policies.d.ts +98 -0
- package/dist/workspace-state.d.ts +122 -0
- package/package.json +7 -3
- package/src/artifact-client.ts +85 -0
- package/src/client.ts +280 -3
- package/src/core.ts +19 -0
- package/src/index.ts +79 -1
- package/src/preference-registry.ts +210 -0
- package/src/transcription.ts +16 -0
- package/src/types.ts +262 -2
- package/src/workspace-artifacts.ts +94 -0
- package/src/workspace-state.ts +134 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
export type PreferenceRegistryScope = "organization" | "workspace" | "user";
|
|
2
|
+
export type PreferenceRegistryStatus =
|
|
3
|
+
| "proposed"
|
|
4
|
+
| "active"
|
|
5
|
+
| "inactive"
|
|
6
|
+
| "rejected"
|
|
7
|
+
| "superseded"
|
|
8
|
+
| "expired";
|
|
9
|
+
export type PreferenceRegistryProvenanceSource =
|
|
10
|
+
| "human"
|
|
11
|
+
| "onboarding"
|
|
12
|
+
| "knowledge_proposal"
|
|
13
|
+
| "imported_document"
|
|
14
|
+
| "slack"
|
|
15
|
+
| "meeting_transcript"
|
|
16
|
+
| "call_transcript";
|
|
17
|
+
export type PreferenceRegistryTrust =
|
|
18
|
+
| "untrusted_proposal"
|
|
19
|
+
| "personal"
|
|
20
|
+
| "workspace_managed"
|
|
21
|
+
| "organization_managed";
|
|
22
|
+
export type PreferenceRegistryConflictStrategy = "override" | "merge" | "reject" | "inform";
|
|
23
|
+
|
|
24
|
+
export function normalizePreferenceRegistryStableKey(value: string): string {
|
|
25
|
+
return value.normalize("NFKC").trim().toLowerCase().replace(/\s+/gu, "-").replace(/-+/g, "-");
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type PreferenceRegistryScopeTarget = {
|
|
29
|
+
scope: PreferenceRegistryScope;
|
|
30
|
+
workspaceId: string | null;
|
|
31
|
+
subjectId: string | null;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type PreferenceRegistryPrecedence = {
|
|
35
|
+
tier: PreferenceRegistryScope;
|
|
36
|
+
rank: number;
|
|
37
|
+
conflictStrategy: PreferenceRegistryConflictStrategy;
|
|
38
|
+
conflictsWith: string[];
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type PreferenceRegistryRevisionSummary = {
|
|
42
|
+
id: string;
|
|
43
|
+
preferenceId: string;
|
|
44
|
+
revision: number;
|
|
45
|
+
contentHash: string;
|
|
46
|
+
title: string;
|
|
47
|
+
description: string;
|
|
48
|
+
precedence: PreferenceRegistryPrecedence;
|
|
49
|
+
provenance: {
|
|
50
|
+
source: PreferenceRegistryProvenanceSource;
|
|
51
|
+
sourceId: string | null;
|
|
52
|
+
trust: PreferenceRegistryTrust;
|
|
53
|
+
};
|
|
54
|
+
expiresAt: string | null;
|
|
55
|
+
correctsRevisionId: string | null;
|
|
56
|
+
createdBySubjectId: string;
|
|
57
|
+
createdAt: string;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export type PreferenceRegistryDescriptorProvenance = {
|
|
61
|
+
source: PreferenceRegistryProvenanceSource;
|
|
62
|
+
sourceIdHash: string | null;
|
|
63
|
+
trust: PreferenceRegistryTrust;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export type PreferenceRegistryRecord = {
|
|
67
|
+
id: string;
|
|
68
|
+
accountId: string;
|
|
69
|
+
stableKey: string;
|
|
70
|
+
target: PreferenceRegistryScopeTarget;
|
|
71
|
+
status: PreferenceRegistryStatus;
|
|
72
|
+
scopeVersion: number;
|
|
73
|
+
activationVersion: number;
|
|
74
|
+
activeRevision: PreferenceRegistryRevisionSummary | null;
|
|
75
|
+
supersededByPreferenceId: string | null;
|
|
76
|
+
createdBySubjectId: string;
|
|
77
|
+
createdAt: string;
|
|
78
|
+
updatedAt: string;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export type PreferenceRegistryEvent = {
|
|
82
|
+
id: string;
|
|
83
|
+
accountId: string;
|
|
84
|
+
preferenceId: string;
|
|
85
|
+
type:
|
|
86
|
+
| "proposal_created"
|
|
87
|
+
| "activated"
|
|
88
|
+
| "corrected"
|
|
89
|
+
| "rejected"
|
|
90
|
+
| "deactivated"
|
|
91
|
+
| "superseded"
|
|
92
|
+
| "scope_changed";
|
|
93
|
+
version: number;
|
|
94
|
+
oldRevisionId: string | null;
|
|
95
|
+
newRevisionId: string | null;
|
|
96
|
+
oldTarget: PreferenceRegistryScopeTarget | null;
|
|
97
|
+
newTarget: PreferenceRegistryScopeTarget | null;
|
|
98
|
+
relatedPreferenceId: string | null;
|
|
99
|
+
actorSubjectId: string;
|
|
100
|
+
reason: string;
|
|
101
|
+
createdAt: string;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export type PreferenceRegistryDescriptor = {
|
|
105
|
+
id: string;
|
|
106
|
+
stableKey: string;
|
|
107
|
+
title: string;
|
|
108
|
+
description: string;
|
|
109
|
+
scope: PreferenceRegistryScope;
|
|
110
|
+
activeVersion: number;
|
|
111
|
+
revisionId: string;
|
|
112
|
+
contentHash: string;
|
|
113
|
+
precedence: PreferenceRegistryPrecedence;
|
|
114
|
+
provenance: PreferenceRegistryDescriptorProvenance;
|
|
115
|
+
expiresAt: string | null;
|
|
116
|
+
retrievalHandle: string;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export type PreferenceRegistrySnapshot = {
|
|
120
|
+
id: string;
|
|
121
|
+
workspaceId: string;
|
|
122
|
+
sessionId: string;
|
|
123
|
+
turnId: string;
|
|
124
|
+
attemptId: string;
|
|
125
|
+
executionGeneration: number;
|
|
126
|
+
initiatingHumanSubjectId: string;
|
|
127
|
+
descriptorHash: string;
|
|
128
|
+
descriptors: PreferenceRegistryDescriptor[];
|
|
129
|
+
truncated: boolean;
|
|
130
|
+
createdAt: string;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export type PreferenceRegistryFullContent = {
|
|
134
|
+
descriptor: PreferenceRegistryDescriptor;
|
|
135
|
+
content: string;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
export type CreatePreferenceRegistryProposalRequest = {
|
|
139
|
+
stableKey: string;
|
|
140
|
+
scope: PreferenceRegistryScope;
|
|
141
|
+
title: string;
|
|
142
|
+
description: string;
|
|
143
|
+
content: string;
|
|
144
|
+
precedenceRank?: number;
|
|
145
|
+
conflictStrategy?: PreferenceRegistryConflictStrategy;
|
|
146
|
+
conflictsWith?: string[];
|
|
147
|
+
expiresAt?: string | null;
|
|
148
|
+
provenanceSource?: PreferenceRegistryProvenanceSource;
|
|
149
|
+
provenanceSourceId?: string | null;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
export type ActivatePreferenceRegistryRevisionRequest = {
|
|
153
|
+
revisionId: string;
|
|
154
|
+
expectedCurrentRevisionId: string | null;
|
|
155
|
+
expectedScopeVersion: number;
|
|
156
|
+
reason: string;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
export type CorrectPreferenceRegistryRequest = {
|
|
160
|
+
expectedCurrentRevisionId: string;
|
|
161
|
+
expectedScopeVersion: number;
|
|
162
|
+
title: string;
|
|
163
|
+
description: string;
|
|
164
|
+
content: string;
|
|
165
|
+
precedenceRank?: number;
|
|
166
|
+
conflictStrategy?: PreferenceRegistryConflictStrategy;
|
|
167
|
+
conflictsWith?: string[];
|
|
168
|
+
expiresAt?: string | null;
|
|
169
|
+
reason: string;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export type DeactivatePreferenceRegistryRequest = {
|
|
173
|
+
expectedCurrentRevisionId: string;
|
|
174
|
+
expectedScopeVersion: number;
|
|
175
|
+
reason: string;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
export type ChangePreferenceRegistryScopeRequest = {
|
|
179
|
+
scope: PreferenceRegistryScope;
|
|
180
|
+
expectedScopeVersion: number;
|
|
181
|
+
reason: string;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export type SupersedePreferenceRegistryRequest = {
|
|
185
|
+
replacementPreferenceId: string;
|
|
186
|
+
expectedCurrentRevisionId: string;
|
|
187
|
+
expectedScopeVersion: number;
|
|
188
|
+
reason: string;
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
export type RejectPreferenceRegistryProposalRequest = {
|
|
192
|
+
revisionId: string;
|
|
193
|
+
expectedScopeVersion: number;
|
|
194
|
+
reason: string;
|
|
195
|
+
};
|
|
196
|
+
export type PreferenceRegistryListOptions = {
|
|
197
|
+
scope?: PreferenceRegistryScope;
|
|
198
|
+
status?: PreferenceRegistryStatus;
|
|
199
|
+
limit?: number;
|
|
200
|
+
};
|
|
201
|
+
export type PreferenceRegistryListResponse = { preferences: PreferenceRegistryRecord[] };
|
|
202
|
+
export type PreferenceRegistryDetailResponse = {
|
|
203
|
+
preference: PreferenceRegistryRecord;
|
|
204
|
+
revisions: PreferenceRegistryRevisionSummary[];
|
|
205
|
+
events: PreferenceRegistryEvent[];
|
|
206
|
+
};
|
|
207
|
+
export type PreferenceRegistryMutationResponse = {
|
|
208
|
+
preference: PreferenceRegistryRecord;
|
|
209
|
+
event: PreferenceRegistryEvent;
|
|
210
|
+
};
|
package/src/transcription.ts
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* and no provider implementation.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import type { WorkspaceVoiceInputSettings } from "./types";
|
|
10
|
+
|
|
9
11
|
export type TranscriptionCredentialMode = "managed" | "byok";
|
|
10
12
|
|
|
11
13
|
export type WorkspaceTranscriptionTarget = {
|
|
@@ -111,8 +113,22 @@ export type TranscriptionErrorCode =
|
|
|
111
113
|
| "policy_blocked"
|
|
112
114
|
| "timeout"
|
|
113
115
|
| "cancelled"
|
|
116
|
+
| "unavailable"
|
|
117
|
+
| "too_large"
|
|
118
|
+
| "invalid_audio"
|
|
114
119
|
| "unknown";
|
|
115
120
|
|
|
121
|
+
/** Native browser voice input defaults to the configured deployment capability. */
|
|
122
|
+
export function resolveWorkspaceVoiceInputEnabled(settings: unknown): boolean | null {
|
|
123
|
+
if (!isRecord(settings)) return null;
|
|
124
|
+
const voiceInput = settings.voiceInput;
|
|
125
|
+
if (isRecord(voiceInput) && typeof voiceInput.enabled === "boolean") {
|
|
126
|
+
return (voiceInput as WorkspaceVoiceInputSettings).enabled;
|
|
127
|
+
}
|
|
128
|
+
const legacy = settings.transcription;
|
|
129
|
+
return isRecord(legacy) && typeof legacy.enabled === "boolean" ? legacy.enabled : null;
|
|
130
|
+
}
|
|
131
|
+
|
|
116
132
|
export type TranscriptionTimeSpan = {
|
|
117
133
|
startMilliseconds: number;
|
|
118
134
|
endMilliseconds: number;
|
package/src/types.ts
CHANGED
|
@@ -229,6 +229,7 @@ export type ViewerHeartbeatRequest = { leaseEpoch: number };
|
|
|
229
229
|
export type ViewerHeartbeatResponse = { alive: boolean };
|
|
230
230
|
|
|
231
231
|
export type ReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
232
|
+
export type LatencyMode = "standard" | "priority" | "fast";
|
|
232
233
|
export type GitCredentialProvider = "github" | "gitlab" | "azure_devops";
|
|
233
234
|
export type GitCredentialBindingId = string;
|
|
234
235
|
export type GitRepositoryAccess = "read" | "write";
|
|
@@ -418,6 +419,71 @@ export type OpenGeniSlackBotInstallStart = {
|
|
|
418
419
|
expiresAt: string;
|
|
419
420
|
};
|
|
420
421
|
|
|
422
|
+
export type GoogleDriveTargetScope = "user" | "workspace" | "organization";
|
|
423
|
+
export type GoogleDriveSyncCadence = "manual" | "hourly" | "daily";
|
|
424
|
+
export type GoogleDriveReadPolicy = "allow" | "ask" | "block";
|
|
425
|
+
|
|
426
|
+
export type GoogleDriveSelectedSource = {
|
|
427
|
+
id: string;
|
|
428
|
+
name: string;
|
|
429
|
+
mimeType: string;
|
|
430
|
+
driveId: string | null;
|
|
431
|
+
targetScope: GoogleDriveTargetScope;
|
|
432
|
+
syncCadence: GoogleDriveSyncCadence;
|
|
433
|
+
readPolicy: GoogleDriveReadPolicy;
|
|
434
|
+
selectedAt: string;
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
export type GoogleDriveConnectionMetadata = {
|
|
438
|
+
credentialRole: "google_drive_metadata";
|
|
439
|
+
credentialLabel: "Google Drive metadata browser";
|
|
440
|
+
googlePermissionId: string;
|
|
441
|
+
googleEmail: string;
|
|
442
|
+
googleDisplayName: string | null;
|
|
443
|
+
verifiedAt: string;
|
|
444
|
+
accessMode: "metadata_readonly" | "readonly";
|
|
445
|
+
selectedSources?: GoogleDriveSelectedSource[] | undefined;
|
|
446
|
+
/** @deprecated Read selectedSources; retained while existing connections migrate. */
|
|
447
|
+
selectedSource?: GoogleDriveSelectedSource | null | undefined;
|
|
448
|
+
[key: string]: unknown;
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
export type GoogleDriveOAuthStartRequest = {
|
|
452
|
+
connectionId?: string | undefined;
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
export type GoogleDriveOAuthStartResponse = {
|
|
456
|
+
authorizationUrl: string;
|
|
457
|
+
expiresAt: string;
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
export type GoogleDriveBrowseItem = {
|
|
461
|
+
id: string;
|
|
462
|
+
name: string;
|
|
463
|
+
mimeType: string;
|
|
464
|
+
kind: "folder" | "file";
|
|
465
|
+
driveId: string | null;
|
|
466
|
+
modifiedTime: string | null;
|
|
467
|
+
size: string | null;
|
|
468
|
+
webViewLink: string | null;
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
export type GoogleDriveBrowseResponse = {
|
|
472
|
+
connection: ConnectionMetadata;
|
|
473
|
+
parentId: string;
|
|
474
|
+
current: GoogleDriveBrowseItem | null;
|
|
475
|
+
items: GoogleDriveBrowseItem[];
|
|
476
|
+
nextPageToken: string | null;
|
|
477
|
+
incompleteSearch: boolean;
|
|
478
|
+
};
|
|
479
|
+
|
|
480
|
+
export type SaveGoogleDriveSourceRequest = {
|
|
481
|
+
sources: Array<Pick<GoogleDriveBrowseItem, "id" | "name" | "mimeType" | "driveId">>;
|
|
482
|
+
targetScope: GoogleDriveTargetScope;
|
|
483
|
+
syncCadence: GoogleDriveSyncCadence;
|
|
484
|
+
readPolicy: GoogleDriveReadPolicy;
|
|
485
|
+
};
|
|
486
|
+
|
|
421
487
|
export type UpdateConnectionRequest = {
|
|
422
488
|
providerDomain?: string | undefined;
|
|
423
489
|
subjectId?: string | null | undefined;
|
|
@@ -539,6 +605,11 @@ export type Session = {
|
|
|
539
605
|
codexPinnedCredentialId?: string | null;
|
|
540
606
|
/** Multi-account Codex (P1): the account the most recent turn ran on (the "Running on:" indicator). */
|
|
541
607
|
codexLastCredentialId?: string | null;
|
|
608
|
+
/**
|
|
609
|
+
* Frozen at create. `remote_v2` ⇒ Codex remote compaction + Codex-only model
|
|
610
|
+
* admission; `portable` ⇒ plaintext compaction and free provider switching.
|
|
611
|
+
*/
|
|
612
|
+
codexCompactionMode: "remote_v2" | "portable";
|
|
542
613
|
/** Personal (authenticated subject) workspace pin state, never workspace-global. */
|
|
543
614
|
pinned?: boolean;
|
|
544
615
|
/** Stable pin ordering key; null when this subject has not pinned the session. */
|
|
@@ -630,6 +701,7 @@ export type SessionTurn = {
|
|
|
630
701
|
toolsProvided?: boolean | undefined;
|
|
631
702
|
model: string;
|
|
632
703
|
reasoningEffort: ReasoningEffort;
|
|
704
|
+
latencyMode: LatencyMode;
|
|
633
705
|
sandboxBackend: SandboxBackend;
|
|
634
706
|
sandboxOs: SandboxOs | null;
|
|
635
707
|
metadata: Record<string, unknown>;
|
|
@@ -716,6 +788,7 @@ export const SESSION_EVENT_TYPES = [
|
|
|
716
788
|
"session.requiresAction",
|
|
717
789
|
"session.humanInput.requested",
|
|
718
790
|
"session.context.compaction.requested",
|
|
791
|
+
"session.context.compaction.started",
|
|
719
792
|
"session.context.compacted",
|
|
720
793
|
"session.context.compaction.skipped",
|
|
721
794
|
"session.context.cleared",
|
|
@@ -1574,6 +1647,7 @@ export type CreateSessionRequest = {
|
|
|
1574
1647
|
metadata?: Record<string, unknown> | undefined;
|
|
1575
1648
|
model?: string | undefined;
|
|
1576
1649
|
reasoningEffort?: ReasoningEffort | undefined;
|
|
1650
|
+
latencyMode?: LatencyMode | undefined;
|
|
1577
1651
|
sandboxBackend?: SandboxBackend | undefined;
|
|
1578
1652
|
// The enrolled machine (a sandbox id) to run this session on; seeds the
|
|
1579
1653
|
// active-sandbox pointer at creation so the first turn lands on it.
|
|
@@ -1654,6 +1728,8 @@ export const KNOWN_PERMISSIONS = [
|
|
|
1654
1728
|
"enrollments:manage",
|
|
1655
1729
|
"rigs:use",
|
|
1656
1730
|
"rigs:manage",
|
|
1731
|
+
"artifacts:read",
|
|
1732
|
+
"artifacts:publish",
|
|
1657
1733
|
] as const;
|
|
1658
1734
|
|
|
1659
1735
|
export type KnownPermission = (typeof KNOWN_PERMISSIONS)[number];
|
|
@@ -1673,6 +1749,8 @@ export type FirstPartyMcpToolName =
|
|
|
1673
1749
|
| "memory_search"
|
|
1674
1750
|
| "memory_save"
|
|
1675
1751
|
| "memory_correct"
|
|
1752
|
+
| "preference_registry_summary"
|
|
1753
|
+
| "preference_registry_get"
|
|
1676
1754
|
| "sandboxes_list"
|
|
1677
1755
|
| "sandbox_attach"
|
|
1678
1756
|
| "sandbox_swap"
|
|
@@ -1713,8 +1791,18 @@ export type FirstPartyMcpToolName =
|
|
|
1713
1791
|
| "scheduled_task_runs_list"
|
|
1714
1792
|
| "slack_bot_list_channels"
|
|
1715
1793
|
| "slack_bot_channel_history"
|
|
1794
|
+
| "slack_bot_thread_replies"
|
|
1716
1795
|
| "slack_bot_list_users"
|
|
1717
|
-
| "
|
|
1796
|
+
| "slack_bot_list_files"
|
|
1797
|
+
| "slack_bot_file_info"
|
|
1798
|
+
| "slack_bot_file_content"
|
|
1799
|
+
| "slack_bot_post_message"
|
|
1800
|
+
| "slack_bot_delete_message"
|
|
1801
|
+
| "artifacts_list"
|
|
1802
|
+
| "artifacts_get_source"
|
|
1803
|
+
| "artifacts_create"
|
|
1804
|
+
| "artifacts_publish"
|
|
1805
|
+
| "artifacts_rollback";
|
|
1718
1806
|
|
|
1719
1807
|
export type ProductAccessMode = "local" | "configured" | "managed";
|
|
1720
1808
|
|
|
@@ -2079,7 +2167,7 @@ export type ClientAuthConfig =
|
|
|
2079
2167
|
|
|
2080
2168
|
// Kept value-identical to @opengeni/contracts and pinned by the SDK contract
|
|
2081
2169
|
// parity suite. The SDK has no runtime dependency on the Zod contracts package.
|
|
2082
|
-
export const OPENGENI_API_CONTRACT_REVISION = "2026-07-
|
|
2170
|
+
export const OPENGENI_API_CONTRACT_REVISION = "2026-07-workspace-artifacts-v1" as const;
|
|
2083
2171
|
export const OPENGENI_API_CONTRACT_HEADER = "x-opengeni-api-contract" as const;
|
|
2084
2172
|
/** Bounded request/response identifier shared by browser, ingress, and API diagnostics. */
|
|
2085
2173
|
export const OPENGENI_CORRELATION_HEADER = "x-opengeni-correlation-id" as const;
|
|
@@ -2102,6 +2190,8 @@ export type ClientConfig = {
|
|
|
2102
2190
|
allowedReasoningEfforts: ReasoningEffort[];
|
|
2103
2191
|
mcpServers: { id: string; name: string }[];
|
|
2104
2192
|
fileUploads: { enabled: boolean; maxSizeBytes: number };
|
|
2193
|
+
/** Native browser microphone capture + server-side transcription capability. */
|
|
2194
|
+
voiceInput?: ClientVoiceInputConfig | undefined;
|
|
2105
2195
|
productAccessMode: ProductAccessMode;
|
|
2106
2196
|
auth: ClientAuthConfig;
|
|
2107
2197
|
// Server-wide hint: does this deployment support Channel-A structured services
|
|
@@ -2115,8 +2205,29 @@ export type ClientConfig = {
|
|
|
2115
2205
|
};
|
|
2116
2206
|
};
|
|
2117
2207
|
|
|
2208
|
+
/** Client-safe voice-input capability projection. */
|
|
2209
|
+
export type ClientVoiceInputConfig = {
|
|
2210
|
+
available: boolean;
|
|
2211
|
+
maxDurationSeconds: number;
|
|
2212
|
+
maxSizeBytes: number;
|
|
2213
|
+
acceptedMimeTypes: string[];
|
|
2214
|
+
};
|
|
2215
|
+
|
|
2216
|
+
/** Response from POST /v1/workspaces/:workspaceId/transcriptions. */
|
|
2217
|
+
export type TranscribeAudioResponse = {
|
|
2218
|
+
text: string;
|
|
2219
|
+
languages: string[];
|
|
2220
|
+
};
|
|
2221
|
+
|
|
2118
2222
|
export type AccountRole = "owner" | "admin" | "member";
|
|
2119
2223
|
|
|
2224
|
+
export type AccessPrincipalKind =
|
|
2225
|
+
| "human_session"
|
|
2226
|
+
| "agent_attempt"
|
|
2227
|
+
| "service"
|
|
2228
|
+
| "api_key"
|
|
2229
|
+
| "configured_key";
|
|
2230
|
+
|
|
2120
2231
|
export type AccountGrant = {
|
|
2121
2232
|
accountId: string;
|
|
2122
2233
|
subjectId: string;
|
|
@@ -2132,6 +2243,7 @@ export type AccessGrant = {
|
|
|
2132
2243
|
subjectId: string;
|
|
2133
2244
|
subjectLabel?: string | undefined;
|
|
2134
2245
|
permissions: Permission[];
|
|
2246
|
+
principalKind?: AccessPrincipalKind | undefined;
|
|
2135
2247
|
metadata?: Record<string, unknown> | undefined;
|
|
2136
2248
|
serviceInitiator?: ServiceTurnInitiator | undefined;
|
|
2137
2249
|
serviceInitiatorContext?: ServiceTurnInitiatorContext | undefined;
|
|
@@ -2170,15 +2282,24 @@ export type Workspace = {
|
|
|
2170
2282
|
|
|
2171
2283
|
export type WorkspaceSettings = {
|
|
2172
2284
|
memoryEnabled?: boolean | undefined;
|
|
2285
|
+
voiceInput?: WorkspaceVoiceInputSettings | undefined;
|
|
2173
2286
|
transcription?: WorkspaceTranscriptionPolicy | undefined;
|
|
2174
2287
|
maxNestedAgentDepth?: number | null | undefined;
|
|
2288
|
+
/** Default for new Codex sessions; absent ⇒ remote_v2. */
|
|
2289
|
+
codexCompactionDefault?: "remote_v2" | "portable" | undefined;
|
|
2175
2290
|
[key: string]: unknown;
|
|
2176
2291
|
};
|
|
2177
2292
|
|
|
2293
|
+
export type WorkspaceVoiceInputSettings = {
|
|
2294
|
+
enabled: boolean;
|
|
2295
|
+
};
|
|
2296
|
+
|
|
2178
2297
|
export type UpdateWorkspaceSettingsRequest = {
|
|
2179
2298
|
memoryEnabled?: boolean | undefined;
|
|
2299
|
+
voiceInput?: WorkspaceVoiceInputSettings | undefined;
|
|
2180
2300
|
transcription?: WorkspaceTranscriptionPolicy | undefined;
|
|
2181
2301
|
maxNestedAgentDepth?: number | null | undefined;
|
|
2302
|
+
codexCompactionDefault?: "remote_v2" | "portable" | undefined;
|
|
2182
2303
|
[key: string]: unknown;
|
|
2183
2304
|
};
|
|
2184
2305
|
|
|
@@ -2391,6 +2512,7 @@ export type ComposerDraft = {
|
|
|
2391
2512
|
resources: ResourceRef[];
|
|
2392
2513
|
model: string;
|
|
2393
2514
|
reasoningEffort: ReasoningEffort;
|
|
2515
|
+
latencyMode?: LatencyMode | undefined;
|
|
2394
2516
|
sourceTurnId: string | null;
|
|
2395
2517
|
sourceTurnVersion: number | null;
|
|
2396
2518
|
updatedAt: string | null;
|
|
@@ -2416,6 +2538,7 @@ export type NewSessionDraft = {
|
|
|
2416
2538
|
toolsProvided: boolean;
|
|
2417
2539
|
model: string;
|
|
2418
2540
|
reasoningEffort: ReasoningEffort;
|
|
2541
|
+
latencyMode?: LatencyMode | undefined;
|
|
2419
2542
|
options: NewSessionDraftOptions;
|
|
2420
2543
|
updatedAt: string | null;
|
|
2421
2544
|
};
|
|
@@ -3594,6 +3717,142 @@ export type BillingUsageResponse = {
|
|
|
3594
3717
|
usage: UsageEvent[];
|
|
3595
3718
|
};
|
|
3596
3719
|
|
|
3720
|
+
export type InsightsRange = "today" | "week" | "month" | "ytd";
|
|
3721
|
+
|
|
3722
|
+
export type InsightsBillingPath = "opengeni_credits" | "external";
|
|
3723
|
+
|
|
3724
|
+
export type InsightsModelUsageRow = {
|
|
3725
|
+
id: string;
|
|
3726
|
+
model: string;
|
|
3727
|
+
provider: string;
|
|
3728
|
+
billing: InsightsBillingPath;
|
|
3729
|
+
calls: number;
|
|
3730
|
+
inputTokens: number;
|
|
3731
|
+
outputTokens: number;
|
|
3732
|
+
cachedTokens: number;
|
|
3733
|
+
cacheWriteTokens: number;
|
|
3734
|
+
reasoningTokens: number;
|
|
3735
|
+
creditUsd: number;
|
|
3736
|
+
};
|
|
3737
|
+
|
|
3738
|
+
export type InsightsSeriesPoint = {
|
|
3739
|
+
label: string;
|
|
3740
|
+
modelCostUsd: number;
|
|
3741
|
+
warmSeconds: number;
|
|
3742
|
+
inputTokens: number;
|
|
3743
|
+
cachedTokens: number;
|
|
3744
|
+
cacheHitPct: number;
|
|
3745
|
+
calls: number;
|
|
3746
|
+
};
|
|
3747
|
+
|
|
3748
|
+
export type InsightsDepthBucket = {
|
|
3749
|
+
depth: number;
|
|
3750
|
+
sessions: number;
|
|
3751
|
+
};
|
|
3752
|
+
|
|
3753
|
+
export type InsightsModelFacet = {
|
|
3754
|
+
provider: string;
|
|
3755
|
+
model: string;
|
|
3756
|
+
};
|
|
3757
|
+
|
|
3758
|
+
export type InsightsSpendDriver = {
|
|
3759
|
+
id: string;
|
|
3760
|
+
groupBy: "root_session" | "schedule";
|
|
3761
|
+
label: string;
|
|
3762
|
+
creditUsd: number;
|
|
3763
|
+
tokens: number;
|
|
3764
|
+
cacheHitPct: number;
|
|
3765
|
+
pctOfCreditUsd: number;
|
|
3766
|
+
deltaUsdVsPrior: number;
|
|
3767
|
+
};
|
|
3768
|
+
|
|
3769
|
+
export type InsightsWarmGroupRow = {
|
|
3770
|
+
id: string;
|
|
3771
|
+
groupId: string;
|
|
3772
|
+
label: string;
|
|
3773
|
+
backend: string | null;
|
|
3774
|
+
warmSeconds: number;
|
|
3775
|
+
sessionsAttached: number;
|
|
3776
|
+
};
|
|
3777
|
+
|
|
3778
|
+
export type InsightsLiveWarmLease = {
|
|
3779
|
+
id: string;
|
|
3780
|
+
groupId: string;
|
|
3781
|
+
backend: string;
|
|
3782
|
+
turnHolders: number;
|
|
3783
|
+
viewerHolders: number;
|
|
3784
|
+
warmForLabel: string;
|
|
3785
|
+
warmSeconds: number;
|
|
3786
|
+
};
|
|
3787
|
+
|
|
3788
|
+
export type InsightsFloorSession = {
|
|
3789
|
+
id: string;
|
|
3790
|
+
title: string;
|
|
3791
|
+
state: "running" | "paused" | "failed" | "idle" | "compacting" | "waiting";
|
|
3792
|
+
depth: number;
|
|
3793
|
+
model: string | null;
|
|
3794
|
+
provider: string | null;
|
|
3795
|
+
ageLabel: string;
|
|
3796
|
+
cacheHitPct: number | null;
|
|
3797
|
+
route: string | null;
|
|
3798
|
+
};
|
|
3799
|
+
|
|
3800
|
+
export type InsightsScheduleRow = {
|
|
3801
|
+
id: string;
|
|
3802
|
+
name: string;
|
|
3803
|
+
fires: number;
|
|
3804
|
+
creditUsd: number | null;
|
|
3805
|
+
tokens: number | null;
|
|
3806
|
+
cacheHitPct: number | null;
|
|
3807
|
+
billing: InsightsBillingPath | null;
|
|
3808
|
+
};
|
|
3809
|
+
|
|
3810
|
+
export type WorkspaceInsightsSnapshot = {
|
|
3811
|
+
range: InsightsRange;
|
|
3812
|
+
rangeLabel: string;
|
|
3813
|
+
priorLabel: string;
|
|
3814
|
+
seriesLabel: string;
|
|
3815
|
+
cacheSeriesLabel: string;
|
|
3816
|
+
timezone: "UTC";
|
|
3817
|
+
models: InsightsModelUsageRow[];
|
|
3818
|
+
facets: InsightsModelFacet[];
|
|
3819
|
+
series: InsightsSeriesPoint[];
|
|
3820
|
+
depth: InsightsDepthBucket[];
|
|
3821
|
+
drivers: InsightsSpendDriver[];
|
|
3822
|
+
schedules: InsightsScheduleRow[];
|
|
3823
|
+
warmSeconds: number;
|
|
3824
|
+
priorWarmSeconds: number;
|
|
3825
|
+
warmGroups: InsightsWarmGroupRow[];
|
|
3826
|
+
liveWarm: InsightsLiveWarmLease[];
|
|
3827
|
+
floor: InsightsFloorSession[];
|
|
3828
|
+
selfhostedEnabled: boolean;
|
|
3829
|
+
machinesOnline: number;
|
|
3830
|
+
workspaceCreditUsd: number;
|
|
3831
|
+
priorWorkspaceCreditUsd: number;
|
|
3832
|
+
creditUsd: number;
|
|
3833
|
+
priorCreditUsd: number;
|
|
3834
|
+
priorInputTokens: number;
|
|
3835
|
+
priorCacheHitPct: number;
|
|
3836
|
+
priorCalls: number;
|
|
3837
|
+
goalsActive: number;
|
|
3838
|
+
goalsCompleted: number;
|
|
3839
|
+
sessionsTouched: number;
|
|
3840
|
+
rootSessions: number;
|
|
3841
|
+
deepestDepth: number;
|
|
3842
|
+
deepestSessionTitle: string;
|
|
3843
|
+
avgDepth: number;
|
|
3844
|
+
warmIdleNow: number;
|
|
3845
|
+
billableTokensUsed: number;
|
|
3846
|
+
billableTokenCap: number | null;
|
|
3847
|
+
agentRunsUsed: number;
|
|
3848
|
+
agentRunCap: number | null;
|
|
3849
|
+
modelFilterActive: boolean;
|
|
3850
|
+
};
|
|
3851
|
+
|
|
3852
|
+
export type WorkspaceInsightsResponse = {
|
|
3853
|
+
snapshot: WorkspaceInsightsSnapshot;
|
|
3854
|
+
};
|
|
3855
|
+
|
|
3597
3856
|
export type BillingEntitlementsResponse = {
|
|
3598
3857
|
accountId: string;
|
|
3599
3858
|
mode: EntitlementsMode;
|
|
@@ -3622,6 +3881,7 @@ export type UserMessageEventInput = {
|
|
|
3622
3881
|
resources?: ResourceRef[] | undefined;
|
|
3623
3882
|
model?: string | undefined;
|
|
3624
3883
|
reasoningEffort?: ReasoningEffort | undefined;
|
|
3884
|
+
latencyMode?: LatencyMode | undefined;
|
|
3625
3885
|
mcpCredentialUpdates?: SessionMcpCredentialUpdateInput[] | undefined;
|
|
3626
3886
|
};
|
|
3627
3887
|
};
|