@opengeni/sdk 0.28.2 → 0.32.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 +28 -9
- package/dist/client.d.ts +643 -0
- package/dist/desktop.d.ts +71 -0
- package/dist/errors.d.ts +39 -0
- package/dist/index.d.ts +25 -4209
- package/dist/index.js +195 -3
- 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-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 +3 -3
- package/src/client.ts +279 -2
- package/src/index.ts +67 -0
- package/src/preference-registry.ts +210 -0
- package/src/transcription.ts +16 -0
- package/src/types.ts +269 -13
- package/src/workspace-state.ts +134 -0
package/src/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ export type {
|
|
|
5
5
|
OpenGeniRequestOptions,
|
|
6
6
|
SendMessageInput,
|
|
7
7
|
SteerMessageResult,
|
|
8
|
+
TranscribeAudioInput,
|
|
8
9
|
WorkspaceControlEventPage,
|
|
9
10
|
} from "./client";
|
|
10
11
|
export {
|
|
@@ -78,10 +79,47 @@ export type {
|
|
|
78
79
|
WorkspaceInstructionPolicyScope,
|
|
79
80
|
WorkspaceInstructionPolicyTarget,
|
|
80
81
|
} from "./workspace-instruction-policies";
|
|
82
|
+
export type {
|
|
83
|
+
WorkspaceStateDocumentStatusCounts,
|
|
84
|
+
WorkspaceStateGapCode,
|
|
85
|
+
WorkspaceStateMemoryKindCounts,
|
|
86
|
+
WorkspaceStateMemoryStatusCounts,
|
|
87
|
+
WorkspaceStateResponse,
|
|
88
|
+
WorkspaceStateSourceKindCounts,
|
|
89
|
+
} from "./workspace-state";
|
|
90
|
+
export { normalizePreferenceRegistryStableKey } from "./preference-registry";
|
|
91
|
+
export type {
|
|
92
|
+
ActivatePreferenceRegistryRevisionRequest,
|
|
93
|
+
ChangePreferenceRegistryScopeRequest,
|
|
94
|
+
CorrectPreferenceRegistryRequest,
|
|
95
|
+
CreatePreferenceRegistryProposalRequest,
|
|
96
|
+
DeactivatePreferenceRegistryRequest,
|
|
97
|
+
PreferenceRegistryConflictStrategy,
|
|
98
|
+
PreferenceRegistryDescriptor,
|
|
99
|
+
PreferenceRegistryDescriptorProvenance,
|
|
100
|
+
PreferenceRegistryDetailResponse,
|
|
101
|
+
PreferenceRegistryEvent,
|
|
102
|
+
PreferenceRegistryFullContent,
|
|
103
|
+
PreferenceRegistryListOptions,
|
|
104
|
+
PreferenceRegistryListResponse,
|
|
105
|
+
PreferenceRegistryMutationResponse,
|
|
106
|
+
PreferenceRegistryPrecedence,
|
|
107
|
+
PreferenceRegistryProvenanceSource,
|
|
108
|
+
PreferenceRegistryRecord,
|
|
109
|
+
PreferenceRegistryRevisionSummary,
|
|
110
|
+
PreferenceRegistryScope,
|
|
111
|
+
PreferenceRegistryScopeTarget,
|
|
112
|
+
PreferenceRegistrySnapshot,
|
|
113
|
+
PreferenceRegistryStatus,
|
|
114
|
+
PreferenceRegistryTrust,
|
|
115
|
+
RejectPreferenceRegistryProposalRequest,
|
|
116
|
+
SupersedePreferenceRegistryRequest,
|
|
117
|
+
} from "./preference-registry";
|
|
81
118
|
export {
|
|
82
119
|
DEFAULT_WORKSPACE_TRANSCRIPTION_POLICY,
|
|
83
120
|
authorizeTranscriptionAdapter,
|
|
84
121
|
createTranscriptionSessionRequest,
|
|
122
|
+
resolveWorkspaceVoiceInputEnabled,
|
|
85
123
|
resolveWorkspaceTranscriptionPolicy,
|
|
86
124
|
} from "./transcription";
|
|
87
125
|
export type {
|
|
@@ -132,6 +170,19 @@ export type {
|
|
|
132
170
|
BillingMode,
|
|
133
171
|
BillingSummary,
|
|
134
172
|
BillingUsageResponse,
|
|
173
|
+
InsightsRange,
|
|
174
|
+
InsightsBillingPath,
|
|
175
|
+
InsightsModelUsageRow,
|
|
176
|
+
InsightsSeriesPoint,
|
|
177
|
+
InsightsDepthBucket,
|
|
178
|
+
InsightsModelFacet,
|
|
179
|
+
InsightsSpendDriver,
|
|
180
|
+
InsightsWarmGroupRow,
|
|
181
|
+
InsightsLiveWarmLease,
|
|
182
|
+
InsightsFloorSession,
|
|
183
|
+
InsightsScheduleRow,
|
|
184
|
+
WorkspaceInsightsSnapshot,
|
|
185
|
+
WorkspaceInsightsResponse,
|
|
135
186
|
CapabilityCatalogItem,
|
|
136
187
|
CapabilityCatalogResponse,
|
|
137
188
|
CapabilityInstallation,
|
|
@@ -149,6 +200,7 @@ export type {
|
|
|
149
200
|
CapabilitySource,
|
|
150
201
|
CapabilityUnavailableReason,
|
|
151
202
|
ClientConfig,
|
|
203
|
+
ClientVoiceInputConfig,
|
|
152
204
|
ClientModel,
|
|
153
205
|
ModelAvailabilityV1,
|
|
154
206
|
ModelBillingAttributionV1,
|
|
@@ -237,12 +289,23 @@ export type {
|
|
|
237
289
|
FileResourceRef,
|
|
238
290
|
FileStatus,
|
|
239
291
|
FileUploadData,
|
|
292
|
+
FirstPartyMcpToolName,
|
|
240
293
|
GetPackResponse,
|
|
241
294
|
GitHubAppInfo,
|
|
295
|
+
GitHubAppSetupMode,
|
|
242
296
|
GitHubBindingStatus,
|
|
243
297
|
GitHubInstallationBinding,
|
|
244
298
|
GitHubInstallationLifecycle,
|
|
245
299
|
GitHubRepositoriesResponse,
|
|
300
|
+
GoogleDriveBrowseItem,
|
|
301
|
+
GoogleDriveBrowseResponse,
|
|
302
|
+
GoogleDriveConnectionMetadata,
|
|
303
|
+
GoogleDriveOAuthStartRequest,
|
|
304
|
+
GoogleDriveOAuthStartResponse,
|
|
305
|
+
GoogleDriveReadPolicy,
|
|
306
|
+
GoogleDriveSelectedSource,
|
|
307
|
+
GoogleDriveSyncCadence,
|
|
308
|
+
GoogleDriveTargetScope,
|
|
246
309
|
GitHubRepository,
|
|
247
310
|
GitHubRepositoryScope,
|
|
248
311
|
GoalSpec,
|
|
@@ -270,6 +333,7 @@ export type {
|
|
|
270
333
|
PackInstallationStatus,
|
|
271
334
|
Permission,
|
|
272
335
|
ProductAccessMode,
|
|
336
|
+
LatencyMode,
|
|
273
337
|
ReasoningEffort,
|
|
274
338
|
RetainedArtifactContent,
|
|
275
339
|
RetainedArtifactContentOptions,
|
|
@@ -288,6 +352,7 @@ export type {
|
|
|
288
352
|
RegisterCapabilityPackRequest,
|
|
289
353
|
RepositoryResourceRef,
|
|
290
354
|
ResourceRef,
|
|
355
|
+
SaveGoogleDriveSourceRequest,
|
|
291
356
|
SandboxBackend,
|
|
292
357
|
SandboxCapabilityName,
|
|
293
358
|
SandboxOs,
|
|
@@ -453,6 +518,7 @@ export type {
|
|
|
453
518
|
UpdateWorkspaceMemberRequest,
|
|
454
519
|
UpdateWorkspaceRequest,
|
|
455
520
|
UpdateWorkspaceSettingsRequest,
|
|
521
|
+
TranscribeAudioResponse,
|
|
456
522
|
UploadFileInput,
|
|
457
523
|
UsageEvent,
|
|
458
524
|
UsageEventType,
|
|
@@ -484,6 +550,7 @@ export type {
|
|
|
484
550
|
WorkspaceMemorySearchResult,
|
|
485
551
|
WorkspaceMemorySearchResponse,
|
|
486
552
|
WorkspaceSettings,
|
|
553
|
+
WorkspaceVoiceInputSettings,
|
|
487
554
|
WorkspaceRegisteredPack,
|
|
488
555
|
// Bring-your-own-compute: Machines dashboard + per-machine metrics (M10).
|
|
489
556
|
MetricSample,
|
|
@@ -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;
|