@opengeni/sdk 0.48.0 → 0.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +147 -1
- package/dist/artifact-client.d.ts +20 -2
- package/dist/artifacts.d.ts +4 -0
- package/dist/artifacts.js +11 -0
- package/dist/artifacts.js.map +1 -0
- package/dist/{chunk-V5F253OG.js → chunk-GU6JF75T.js} +6 -3
- package/dist/chunk-GU6JF75T.js.map +1 -0
- package/dist/chunk-HJ3HHUT5.js +222 -0
- package/dist/chunk-HJ3HHUT5.js.map +1 -0
- package/dist/{chunk-KIHGPM7H.js → chunk-JDLDDRNE.js} +20 -14
- package/dist/chunk-JDLDDRNE.js.map +1 -0
- package/dist/chunk-JRPFWI6T.js +128 -0
- package/dist/chunk-JRPFWI6T.js.map +1 -0
- package/dist/{chunk-MBGBLVUV.js → chunk-PKQ377ED.js} +1725 -555
- package/dist/chunk-PKQ377ED.js.map +1 -0
- package/dist/chunk-ST5DDKJP.js +987 -0
- package/dist/chunk-ST5DDKJP.js.map +1 -0
- package/dist/chunk-VWE2QIVO.js +1162 -0
- package/dist/chunk-VWE2QIVO.js.map +1 -0
- package/dist/chunk-VYCTL62C.js +230 -0
- package/dist/chunk-VYCTL62C.js.map +1 -0
- package/dist/{chunk-DXDL7EEW.js → chunk-YKZME56C.js} +197 -113
- package/dist/chunk-YKZME56C.js.map +1 -0
- package/dist/client.d.ts +240 -16
- package/dist/codex-realtime-controller.d.ts +9 -6
- package/dist/codex-realtime-controller.js +2 -2
- package/dist/codex-realtime-lifecycle.d.ts +1 -1
- package/dist/codex-realtime-v3.d.ts +3 -3
- package/dist/codex-realtime.d.ts +1 -1
- package/dist/company-profile.d.ts +100 -0
- package/dist/core.d.ts +5 -5
- package/dist/core.js +10 -5
- package/dist/desktop.d.ts +9 -1
- package/dist/editable-artifact-resources.d.ts +96 -0
- package/dist/editable-artifacts/browser-session.d.ts +35 -0
- package/dist/editable-artifacts/controller.d.ts +60 -0
- package/dist/editable-artifacts/errors.d.ts +23 -0
- package/dist/editable-artifacts/http-live-transport.d.ts +46 -0
- package/dist/editable-artifacts/index.d.ts +19 -0
- package/dist/editable-artifacts/pool.d.ts +15 -0
- package/dist/editable-artifacts/session.d.ts +96 -0
- package/dist/editable-artifacts/storage.d.ts +72 -0
- package/dist/editable-artifacts/types.d.ts +416 -0
- package/dist/editable-artifacts/worker/browser-client.d.ts +80 -0
- package/dist/editable-artifacts/worker/browser-entry.d.ts +6 -0
- package/dist/editable-artifacts/worker/kernel-adapter.d.ts +45 -0
- package/dist/editable-artifacts/worker/rpc-protocol.d.ts +92 -0
- package/dist/editable-artifacts/worker/runtime.d.ts +66 -0
- package/dist/editable-artifacts/worker/wire-codec.d.ts +52 -0
- package/dist/editable-artifacts-worker.d.ts +8 -0
- package/dist/editable-artifacts-worker.js +1708 -0
- package/dist/editable-artifacts-worker.js.map +1 -0
- package/dist/editable-artifacts.d.ts +6 -0
- package/dist/editable-artifacts.js +5954 -0
- package/dist/editable-artifacts.js.map +1 -0
- package/dist/gateway-realtime-transport.d.ts +2 -1
- package/dist/gateway-realtime-transport.js +5 -3
- package/dist/index.d.ts +45 -35
- package/dist/index.js +134 -64
- package/dist/index.js.map +1 -1
- package/dist/interaction-revision-stream.d.ts +11 -0
- package/dist/interaction.d.ts +1484 -0
- package/dist/interaction.js +81 -0
- package/dist/interaction.js.map +1 -0
- package/dist/memory-slack-client.d.ts +13 -0
- package/dist/memory-slack-delivery.d.ts +99 -0
- package/dist/memory-slack.d.ts +4 -0
- package/dist/memory-slack.js +44 -0
- package/dist/memory-slack.js.map +1 -0
- package/dist/proxy.d.ts +3 -3
- package/dist/realtime.d.ts +14 -14
- package/dist/realtime.js +11 -7
- package/dist/realtime.js.map +1 -1
- package/dist/retained-artifacts.d.ts +12 -0
- package/dist/stream.d.ts +1 -1
- package/dist/terminal.d.ts +1 -1
- package/dist/types.d.ts +1347 -34
- package/dist/workspace-control-stream.d.ts +2 -2
- package/dist/workspace-live-stream.d.ts +14 -0
- package/dist/workspace-state.d.ts +1 -1
- package/package.json +29 -3
- package/src/artifact-client.ts +129 -0
- package/src/artifacts.ts +17 -0
- package/src/client.ts +3022 -910
- package/src/codex-realtime-controller.ts +25 -7
- package/src/codex-realtime-lifecycle.ts +1 -0
- package/src/company-profile.ts +92 -0
- package/src/desktop.ts +11 -1
- package/src/editable-artifact-resources.ts +119 -0
- package/src/editable-artifacts/browser-session.ts +176 -0
- package/src/editable-artifacts/controller.ts +2632 -0
- package/src/editable-artifacts/errors.ts +52 -0
- package/src/editable-artifacts/http-live-transport.ts +1449 -0
- package/src/editable-artifacts/index.ts +175 -0
- package/src/editable-artifacts/pool.ts +81 -0
- package/src/editable-artifacts/session.ts +778 -0
- package/src/editable-artifacts/storage.ts +1718 -0
- package/src/editable-artifacts/types.ts +499 -0
- package/src/editable-artifacts/worker/browser-client.ts +1167 -0
- package/src/editable-artifacts/worker/browser-entry.ts +57 -0
- package/src/editable-artifacts/worker/kernel-adapter.ts +1039 -0
- package/src/editable-artifacts/worker/rpc-protocol.ts +622 -0
- package/src/editable-artifacts/worker/runtime.ts +1204 -0
- package/src/editable-artifacts/worker/wire-codec.ts +852 -0
- package/src/editable-artifacts-worker.ts +8 -0
- package/src/editable-artifacts.ts +6 -0
- package/src/errors.ts +16 -2
- package/src/gateway-realtime-transport.ts +252 -109
- package/src/index.ts +215 -1
- package/src/interaction-revision-stream.ts +117 -0
- package/src/interaction.ts +2874 -0
- package/src/memory-slack-client.ts +71 -0
- package/src/memory-slack-delivery.ts +128 -0
- package/src/memory-slack.ts +19 -0
- package/src/realtime.ts +14 -4
- package/src/retained-artifacts.ts +326 -0
- package/src/types.ts +1636 -52
- package/src/workspace-live-stream.ts +137 -0
- package/dist/chunk-DXDL7EEW.js.map +0 -1
- package/dist/chunk-KIHGPM7H.js.map +0 -1
- package/dist/chunk-MBGBLVUV.js.map +0 -1
- package/dist/chunk-V5F253OG.js.map +0 -1
package/src/index.ts
CHANGED
|
@@ -8,6 +8,20 @@ export type {
|
|
|
8
8
|
TranscribeAudioInput,
|
|
9
9
|
WorkspaceControlEventPage,
|
|
10
10
|
} from "./client";
|
|
11
|
+
export type {
|
|
12
|
+
CreateEditableArtifactMaterializationRequest,
|
|
13
|
+
CreateEditableArtifactResourceRequest,
|
|
14
|
+
EditableArtifactListResource,
|
|
15
|
+
EditableArtifactMaterializationFormat,
|
|
16
|
+
EditableArtifactMaterializationJobResource,
|
|
17
|
+
EditableArtifactMaterializationResultResource,
|
|
18
|
+
EditableArtifactPinnedVersionResource,
|
|
19
|
+
EditableArtifactResource,
|
|
20
|
+
ListSessionEditableArtifactResourcesOptions,
|
|
21
|
+
PinEditableArtifactVersionRequest,
|
|
22
|
+
ReadEditableArtifactMaterializationOptions,
|
|
23
|
+
ReadEditableArtifactResourceOptions,
|
|
24
|
+
} from "./editable-artifact-resources";
|
|
11
25
|
export {
|
|
12
26
|
OpenGeniApiContractMismatchError,
|
|
13
27
|
OpenGeniApiError,
|
|
@@ -27,6 +41,14 @@ export { parseSseStream } from "./sse";
|
|
|
27
41
|
export type { SseMessage } from "./sse";
|
|
28
42
|
export { normalizeMcpOutput } from "./mcp-output";
|
|
29
43
|
export type { NormalizedMcpOutput } from "./mcp-output";
|
|
44
|
+
export {
|
|
45
|
+
generatedImageSandboxPathMatches,
|
|
46
|
+
parseGeneratedImageReceipt,
|
|
47
|
+
parseGeneratedVideoReceipt,
|
|
48
|
+
parseMediaGenerationResult,
|
|
49
|
+
parseRetainedGeneratedImageReference,
|
|
50
|
+
parseRetainedGeneratedVideoReference,
|
|
51
|
+
} from "./retained-artifacts";
|
|
30
52
|
export {
|
|
31
53
|
CodexRealtimeMicrophoneError,
|
|
32
54
|
acquireCodexRealtimeMicrophone,
|
|
@@ -74,9 +96,14 @@ export type {
|
|
|
74
96
|
CreateCodexRealtimeControllerOptions,
|
|
75
97
|
RealtimeControllerTransportStarter,
|
|
76
98
|
} from "./codex-realtime-controller";
|
|
77
|
-
export {
|
|
99
|
+
export {
|
|
100
|
+
createGatewayRealtimeTransportStarter,
|
|
101
|
+
createXaiSubscriptionRealtimeTransportStarter,
|
|
102
|
+
} from "./gateway-realtime-transport";
|
|
78
103
|
export { projectSessionRealtimeLifecycle } from "./codex-realtime-lifecycle";
|
|
79
104
|
export type { SessionRealtimeLifecycleProjection } from "./codex-realtime-lifecycle";
|
|
105
|
+
// Provider-neutral Browser/Computer resource client + bounded frame protocol.
|
|
106
|
+
export * from "./interaction";
|
|
80
107
|
// Desktop (noVNC) transport contract — pure, zero-dep (the RFB import lives in
|
|
81
108
|
// @opengeni/react). URL assembler + connection state machine + rotation fence.
|
|
82
109
|
export { desktopSocketUrl, nextDesktopState, applyUrlRotation } from "./desktop";
|
|
@@ -106,6 +133,14 @@ export type {
|
|
|
106
133
|
} from "./stream";
|
|
107
134
|
export { streamWorkspaceControlEvents } from "./workspace-control-stream";
|
|
108
135
|
export type { WorkspaceControlStreamTransport } from "./workspace-control-stream";
|
|
136
|
+
export { streamWorkspaceInteractionRevisions } from "./interaction-revision-stream";
|
|
137
|
+
export type { WorkspaceInteractionRevisionStreamTransport } from "./interaction-revision-stream";
|
|
138
|
+
export { parseWorkspaceLiveEvent, streamWorkspaceLiveEvents } from "./workspace-live-stream";
|
|
139
|
+
export type {
|
|
140
|
+
WorkspaceLiveEvent,
|
|
141
|
+
WorkspaceLiveStreamOptions,
|
|
142
|
+
WorkspaceLiveStreamTransport,
|
|
143
|
+
} from "./workspace-live-stream";
|
|
109
144
|
export type {
|
|
110
145
|
CreateWorkspaceArtifactRequest,
|
|
111
146
|
PublishWorkspaceArtifactVersionRequest,
|
|
@@ -123,6 +158,28 @@ export {
|
|
|
123
158
|
normalizeWorkspaceInstructionPolicyRoleKey,
|
|
124
159
|
WORKSPACE_INSTRUCTION_POLICY_CONTENT_MAX_CHARS,
|
|
125
160
|
} from "./workspace-instruction-policies";
|
|
161
|
+
export {
|
|
162
|
+
COMPANY_PROFILE_ENTRY_MAX_CHARS,
|
|
163
|
+
COMPANY_PROFILE_ENTRY_MAX_COUNT,
|
|
164
|
+
COMPANY_PROFILE_SCALAR_MAX_CHARS,
|
|
165
|
+
normalizeCompanyProfileStableKey,
|
|
166
|
+
} from "./company-profile";
|
|
167
|
+
export type {
|
|
168
|
+
ActivateCompanyProfileRevisionRequest,
|
|
169
|
+
CompanyProfileActivationEvent,
|
|
170
|
+
CompanyProfileContent,
|
|
171
|
+
CompanyProfileDiffRequest,
|
|
172
|
+
CompanyProfileDiffResponse,
|
|
173
|
+
CompanyProfileEntry,
|
|
174
|
+
CompanyProfileHead,
|
|
175
|
+
CompanyProfileListOptions,
|
|
176
|
+
CompanyProfileListResponse,
|
|
177
|
+
CompanyProfileMutationResponse,
|
|
178
|
+
CompanyProfileRevision,
|
|
179
|
+
CompanyProfileRevisionIdentity,
|
|
180
|
+
RollbackCompanyProfileRequest,
|
|
181
|
+
UpdateCompanyProfileRequest,
|
|
182
|
+
} from "./company-profile";
|
|
126
183
|
export type {
|
|
127
184
|
ActivateWorkspaceInstructionPolicyRequest,
|
|
128
185
|
CreateWorkspaceInstructionPolicyDraftRequest,
|
|
@@ -168,6 +225,22 @@ export type {
|
|
|
168
225
|
WorkspaceStateResponse,
|
|
169
226
|
WorkspaceStateSourceKindCounts,
|
|
170
227
|
} from "./workspace-state";
|
|
228
|
+
export type {
|
|
229
|
+
MemorySlackImportance,
|
|
230
|
+
MemorySlackPublication,
|
|
231
|
+
MemorySlackPublicationActionRequest,
|
|
232
|
+
MemorySlackPublicationConfiguration,
|
|
233
|
+
MemorySlackPublicationConfigurationResponse,
|
|
234
|
+
MemorySlackPublicationDistribution,
|
|
235
|
+
MemorySlackPublicationHistoryResponse,
|
|
236
|
+
MemorySlackPublicationReceipt,
|
|
237
|
+
MemorySlackPublicationReceiptKind,
|
|
238
|
+
MemorySlackPublicationState,
|
|
239
|
+
MemorySlackRequestedMode,
|
|
240
|
+
SlackPublicationChannel,
|
|
241
|
+
SlackPublicationChannelListResponse,
|
|
242
|
+
UpdateMemorySlackPublicationConfigurationRequest,
|
|
243
|
+
} from "./memory-slack-delivery";
|
|
171
244
|
export { normalizePreferenceRegistryStableKey } from "./preference-registry";
|
|
172
245
|
export type {
|
|
173
246
|
ActivatePreferenceRegistryRevisionRequest,
|
|
@@ -232,6 +305,7 @@ export {
|
|
|
232
305
|
OPENGENI_API_CONTRACT_HEADER,
|
|
233
306
|
OPENGENI_API_CONTRACT_REVISION,
|
|
234
307
|
OPENGENI_CORRELATION_HEADER,
|
|
308
|
+
GENERATED_VIDEO_MAX_BYTES,
|
|
235
309
|
RETAINED_OUTPUT_DEFAULT_PAGE_BYTES,
|
|
236
310
|
RETAINED_OUTPUT_MAX_PAGE_BYTES,
|
|
237
311
|
SESSION_EVENT_TYPES,
|
|
@@ -243,6 +317,7 @@ export type {
|
|
|
243
317
|
AccountGrant,
|
|
244
318
|
AccountRole,
|
|
245
319
|
AddWorkspaceMemberRequest,
|
|
320
|
+
ApproveSlackUserLinkAccessRequest,
|
|
246
321
|
BeginSessionRealtimeRequest,
|
|
247
322
|
AgentMessageCompletedPayload,
|
|
248
323
|
AgentTextDeltaPayload,
|
|
@@ -253,10 +328,14 @@ export type {
|
|
|
253
328
|
BillingEntitlementsResponse,
|
|
254
329
|
BillingMode,
|
|
255
330
|
BillingSummary,
|
|
331
|
+
ListManagedOrganizationMembershipsResponse,
|
|
332
|
+
ManagedOrganizationMembership,
|
|
256
333
|
BillingUsageResponse,
|
|
257
334
|
InsightsRange,
|
|
258
335
|
InsightsBillingPath,
|
|
336
|
+
InsightsPricingSource,
|
|
259
337
|
InsightsModelUsageRow,
|
|
338
|
+
InsightsModelCallRow,
|
|
260
339
|
InsightsSeriesPoint,
|
|
261
340
|
InsightsDepthBucket,
|
|
262
341
|
InsightsModelFacet,
|
|
@@ -268,19 +347,26 @@ export type {
|
|
|
268
347
|
WorkspaceInsightsSnapshot,
|
|
269
348
|
WorkspaceInsightsResponse,
|
|
270
349
|
CapabilityCatalogItem,
|
|
350
|
+
CapabilityAction,
|
|
271
351
|
CapabilityCatalogResponse,
|
|
352
|
+
CapabilityComponentOwner,
|
|
272
353
|
CapabilityInstallation,
|
|
273
354
|
CapabilityInstallationStatus,
|
|
274
355
|
CapabilityKind,
|
|
356
|
+
CapabilityLifecycle,
|
|
357
|
+
CapabilityLifecycleStatus,
|
|
275
358
|
CapabilityPack,
|
|
359
|
+
CapabilityPackComponentReference,
|
|
276
360
|
CapabilityPackConnector,
|
|
277
361
|
CapabilityPackConnectorAuthModel,
|
|
362
|
+
CapabilityPackRigRequirement,
|
|
278
363
|
CapabilityPackVariableSetSpec,
|
|
279
364
|
CapabilityPackKnowledge,
|
|
280
365
|
CapabilityPackScheduledTaskTemplate,
|
|
281
366
|
CapabilityPackSkill,
|
|
282
367
|
CapabilityPackSkillFile,
|
|
283
368
|
CapabilityRuntime,
|
|
369
|
+
CapabilityReadiness,
|
|
284
370
|
CapabilitySource,
|
|
285
371
|
CapabilityUnavailableReason,
|
|
286
372
|
ClientConfig,
|
|
@@ -321,6 +407,14 @@ export type {
|
|
|
321
407
|
CodexConnectionStatus,
|
|
322
408
|
CodexConnectStart,
|
|
323
409
|
CodexConnectPoll,
|
|
410
|
+
SuperGrokAccount,
|
|
411
|
+
SuperGrokAccountsResponse,
|
|
412
|
+
SuperGrokAccountScope,
|
|
413
|
+
SuperGrokAllocatorUpdate,
|
|
414
|
+
SuperGrokConnectionStatus,
|
|
415
|
+
SuperGrokConnectPoll,
|
|
416
|
+
SuperGrokConnectStart,
|
|
417
|
+
SuperGrokRotationSettings,
|
|
324
418
|
CodexFleetConfidence,
|
|
325
419
|
CodexFleetCacheState,
|
|
326
420
|
CodexFleetDecisionEventPayload,
|
|
@@ -354,6 +448,9 @@ export type {
|
|
|
354
448
|
CreateCapabilityCatalogItemRequest,
|
|
355
449
|
OpenGeniSlackBotInstallRequest,
|
|
356
450
|
OpenGeniSlackBotInstallStart,
|
|
451
|
+
SlackInstallationBinding,
|
|
452
|
+
SlackInstallationBindingState,
|
|
453
|
+
ListSlackInstallationBindingsResponse,
|
|
357
454
|
SlackReactionChannel,
|
|
358
455
|
SlackReactionChannelListResponse,
|
|
359
456
|
CreateConnectionRequest,
|
|
@@ -372,6 +469,11 @@ export type {
|
|
|
372
469
|
CreateWorkspaceEnvironmentRequest,
|
|
373
470
|
CreateWorkspaceRequest,
|
|
374
471
|
DiscoverMcpCapabilitiesResponse,
|
|
472
|
+
InstallSkillRequest,
|
|
473
|
+
InstallLibrarySkillRequest,
|
|
474
|
+
InstalledSkill,
|
|
475
|
+
InstalledSkillSummary,
|
|
476
|
+
ListInstalledSkillsResponse,
|
|
375
477
|
Document,
|
|
376
478
|
DocumentAuthorityKind,
|
|
377
479
|
DocumentBase,
|
|
@@ -400,6 +502,17 @@ export type {
|
|
|
400
502
|
FileStatus,
|
|
401
503
|
FileUploadData,
|
|
402
504
|
FirstPartyMcpToolName,
|
|
505
|
+
AtlassianBrowseItem,
|
|
506
|
+
AtlassianBrowseResponse,
|
|
507
|
+
AtlassianConnectionLifecycle,
|
|
508
|
+
AtlassianConnectionMetadata,
|
|
509
|
+
AtlassianDisconnectRequest,
|
|
510
|
+
AtlassianLifecycleActionRequest,
|
|
511
|
+
AtlassianOAuthStartResponse,
|
|
512
|
+
AtlassianReadPolicy,
|
|
513
|
+
AtlassianSelectedSource,
|
|
514
|
+
AtlassianSourceKind,
|
|
515
|
+
AtlassianSyncCadence,
|
|
403
516
|
GetPackResponse,
|
|
404
517
|
GitHubAppInfo,
|
|
405
518
|
GitHubAppSetupMode,
|
|
@@ -414,6 +527,9 @@ export type {
|
|
|
414
527
|
GoogleDriveConnectionMetadata,
|
|
415
528
|
GoogleDriveDisconnectRequest,
|
|
416
529
|
GoogleDriveLifecycleActionRequest,
|
|
530
|
+
GoogleDriveKnowledgeSourceConfig,
|
|
531
|
+
GoogleDriveKnowledgeSourceDestination,
|
|
532
|
+
GoogleDriveKnowledgeSourceItem,
|
|
417
533
|
GoogleDriveOAuthStartRequest,
|
|
418
534
|
GoogleDriveOAuthStartResponse,
|
|
419
535
|
GoogleDriveReadPolicy,
|
|
@@ -439,6 +555,7 @@ export type {
|
|
|
439
555
|
ListApiKeysResponse,
|
|
440
556
|
ListConnectionsResponse,
|
|
441
557
|
ListPacksResponse,
|
|
558
|
+
ListSlackUserLinkAccessRequestsResponse,
|
|
442
559
|
ListWorkspaceMembersResponse,
|
|
443
560
|
McpServerConnectionRef,
|
|
444
561
|
McpPersonalConnectionDelegation,
|
|
@@ -446,18 +563,47 @@ export type {
|
|
|
446
563
|
OAuthStartRequest,
|
|
447
564
|
OAuthStartResponse,
|
|
448
565
|
PackInstallation,
|
|
566
|
+
PackInstallationPreview,
|
|
449
567
|
PackInstallationStatus,
|
|
568
|
+
PackComponentResolution,
|
|
569
|
+
PackComponentResolutionStatus,
|
|
570
|
+
PackRigResolution,
|
|
571
|
+
PackUninstallPreview,
|
|
572
|
+
PreviewPackInstallationRequest,
|
|
573
|
+
InstallPackRequest,
|
|
574
|
+
UninstallPackRequest,
|
|
575
|
+
UninstallPackResult,
|
|
450
576
|
Permission,
|
|
577
|
+
PrepareSlackUserLinkAccessRequest,
|
|
451
578
|
ProductAccessMode,
|
|
452
579
|
LatencyMode,
|
|
453
580
|
ReasoningEffort,
|
|
581
|
+
GeneratedImageReceipt,
|
|
582
|
+
GeneratedVideoFacts,
|
|
583
|
+
GeneratedVideoReceipt,
|
|
584
|
+
MediaGenerationResult,
|
|
454
585
|
RetainedArtifactContent,
|
|
455
586
|
RetainedArtifactContentOptions,
|
|
587
|
+
RetainedArtifactDownload,
|
|
588
|
+
RetainedArtifactDownloadOptions,
|
|
456
589
|
RetainedArtifactMetadata,
|
|
457
590
|
RetainedArtifactReference,
|
|
458
591
|
RetainedArtifactUnavailable,
|
|
459
592
|
RetainedOutputKind,
|
|
460
593
|
RetainedOutputUnavailableReason,
|
|
594
|
+
UpdateVideoGenerationPolicyRequest,
|
|
595
|
+
VideoArtifactPlaybackSource,
|
|
596
|
+
VideoGenerationAspectRatio,
|
|
597
|
+
VideoGenerationCapabilities,
|
|
598
|
+
VideoGenerationFundingOption,
|
|
599
|
+
VideoGenerationFundingSource,
|
|
600
|
+
VideoGenerationModelCapability,
|
|
601
|
+
VideoGenerationOperationSummary,
|
|
602
|
+
VideoGenerationPolicy,
|
|
603
|
+
VideoGenerationPublicStatus,
|
|
604
|
+
VideoGenerationResolution,
|
|
605
|
+
VideoGenerationSourceMode,
|
|
606
|
+
VideoGenerationTerminalFailureStatus,
|
|
461
607
|
RecordingAvailablePayload,
|
|
462
608
|
RecordingCodec,
|
|
463
609
|
RecordingContentType,
|
|
@@ -469,6 +615,7 @@ export type {
|
|
|
469
615
|
RepositoryResourceRef,
|
|
470
616
|
ResourceRef,
|
|
471
617
|
SaveGoogleDriveSourceRequest,
|
|
618
|
+
SaveGoogleDriveIntegrationSourceRequest,
|
|
472
619
|
SandboxBackend,
|
|
473
620
|
SandboxCapabilityName,
|
|
474
621
|
SandboxOs,
|
|
@@ -480,11 +627,17 @@ export type {
|
|
|
480
627
|
ScheduledTaskRun,
|
|
481
628
|
ScheduledTaskRunMode,
|
|
482
629
|
ScheduledTaskRunStatus,
|
|
630
|
+
ScheduledTaskAction,
|
|
631
|
+
KnowledgeSourceSyncLimits,
|
|
632
|
+
KnowledgeSourceSyncRunSummary,
|
|
633
|
+
ScopedKnowledgeScope,
|
|
483
634
|
ScheduledTaskScheduleSpec,
|
|
484
635
|
ScheduledTaskStatus,
|
|
485
636
|
ScheduledTaskTriggerType,
|
|
486
637
|
Session,
|
|
487
638
|
SessionCapabilities,
|
|
639
|
+
AgentTopologyPageResponse,
|
|
640
|
+
AgentTopologySession,
|
|
488
641
|
SessionListResponse,
|
|
489
642
|
SessionLineageResponse,
|
|
490
643
|
SessionEffectiveToolPolicy,
|
|
@@ -556,6 +709,12 @@ export type {
|
|
|
556
709
|
SessionStatusChangedPayload,
|
|
557
710
|
SessionStructuredCapabilities,
|
|
558
711
|
SessionTurn,
|
|
712
|
+
DraftTimelineAnnotation,
|
|
713
|
+
SubmittedTimelineAnnotation,
|
|
714
|
+
TimelineAnnotation,
|
|
715
|
+
TimelineAnnotationSource,
|
|
716
|
+
TimelineAnnotationSourceEventType,
|
|
717
|
+
TimelineAnnotationSourceKind,
|
|
559
718
|
ServiceTurnInitiator,
|
|
560
719
|
ServiceTurnInitiatorContext,
|
|
561
720
|
TurnInitiatorContext,
|
|
@@ -628,6 +787,9 @@ export type {
|
|
|
628
787
|
PtyResizeRequest,
|
|
629
788
|
PtyCloseRequest,
|
|
630
789
|
ToolRef,
|
|
790
|
+
SlackUserLinkAccessMutationRequest,
|
|
791
|
+
SlackUserLinkAccessRequest,
|
|
792
|
+
SlackUserLinkAccessRequestStatus,
|
|
631
793
|
UpdateKnowledgeMemoryRequest,
|
|
632
794
|
UpdateScheduledTaskRequest,
|
|
633
795
|
UpdateSessionGoalRequest,
|
|
@@ -654,6 +816,10 @@ export type {
|
|
|
654
816
|
VariableSet,
|
|
655
817
|
VariableSetSecret,
|
|
656
818
|
VariableSetVariableMetadata,
|
|
819
|
+
Channel,
|
|
820
|
+
CreateChannelRequest,
|
|
821
|
+
UpdateChannelRequest,
|
|
822
|
+
UpdateSessionChannelRequest,
|
|
657
823
|
Rig,
|
|
658
824
|
RigVersion,
|
|
659
825
|
RigCheck,
|
|
@@ -670,11 +836,59 @@ export type {
|
|
|
670
836
|
WorkspaceEnvironment,
|
|
671
837
|
WorkspaceEnvironmentVariableMetadata,
|
|
672
838
|
WorkspaceMember,
|
|
839
|
+
PreviewSkillImportRequest,
|
|
840
|
+
ApiIntegrationAuthPreview,
|
|
841
|
+
ApiIntegrationInstallationSummary,
|
|
842
|
+
IntegrationDefinitionSummary,
|
|
843
|
+
ApiIntegrationPreview,
|
|
844
|
+
ApiIntegrationOAuthStartRequest,
|
|
845
|
+
ApiIntegrationProtocol,
|
|
846
|
+
IntegrationSource,
|
|
847
|
+
ApiIntegrationToolPreview,
|
|
848
|
+
ApiIntegrationUninstallPreview,
|
|
849
|
+
IntegrationFacetBindingSummary,
|
|
850
|
+
IntegrationFacetDefinitionSummary,
|
|
851
|
+
IntegrationFacetKind,
|
|
852
|
+
IntegrationFacetMutationResult,
|
|
853
|
+
IntegrationFacetRemovalResult,
|
|
854
|
+
IntegrationFacetStatus,
|
|
855
|
+
IntegrationInstanceFacetsResponse,
|
|
856
|
+
InstallApiIntegrationRequest,
|
|
857
|
+
InstalledApiIntegration,
|
|
858
|
+
ListIntegrationDefinitionsResponse,
|
|
859
|
+
ListApiIntegrationsResponse,
|
|
860
|
+
PreviewApiIntegrationRequest,
|
|
861
|
+
MutateIntegrationFacetRequest,
|
|
862
|
+
UpsertIntegrationFacetRequest,
|
|
863
|
+
SkillImportFileSummary,
|
|
864
|
+
SkillImportPreview,
|
|
865
|
+
SkillImportSource,
|
|
866
|
+
SkillInstallationSource,
|
|
867
|
+
SkillUninstallPreview,
|
|
868
|
+
UninstallSkillRequest,
|
|
869
|
+
UninstallSkillResult,
|
|
870
|
+
UninstallApiIntegrationRequest,
|
|
871
|
+
UninstallApiIntegrationResult,
|
|
872
|
+
PluginManifest,
|
|
873
|
+
PluginManifestComponent,
|
|
874
|
+
PluginComponentBinding,
|
|
875
|
+
PreviewPluginRequest,
|
|
876
|
+
PluginComponentPreview,
|
|
877
|
+
PluginUpdateDiff,
|
|
878
|
+
PluginPreview,
|
|
879
|
+
InstallPluginRequest,
|
|
880
|
+
InstalledPlugin,
|
|
881
|
+
PluginInstallationSummary,
|
|
882
|
+
ListInstalledPluginsResponse,
|
|
883
|
+
PluginUninstallPreview,
|
|
884
|
+
UninstallPluginRequest,
|
|
885
|
+
UninstallPluginResult,
|
|
673
886
|
WorkspaceMemorySearchMode,
|
|
674
887
|
WorkspaceMemorySearchRequest,
|
|
675
888
|
WorkspaceMemorySearchResult,
|
|
676
889
|
WorkspaceMemorySearchResponse,
|
|
677
890
|
WorkspaceSettings,
|
|
891
|
+
WorkspaceVideoGenerationSettings,
|
|
678
892
|
WorkspaceVoiceInputSettings,
|
|
679
893
|
WorkspaceRegisteredPack,
|
|
680
894
|
// Bring-your-own-compute: Machines dashboard + per-machine metrics (M10).
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { isAbortError, isRetryableStreamError, OpenGeniStreamError } from "./errors";
|
|
2
|
+
import type { WorkspaceInteractionRevisionEvent } from "./interaction";
|
|
3
|
+
import { parseSseStream } from "./sse";
|
|
4
|
+
import {
|
|
5
|
+
jitteredDelay,
|
|
6
|
+
runBeforeLive,
|
|
7
|
+
type StreamSessionEventsOptions,
|
|
8
|
+
withStreamInactivityTimeout,
|
|
9
|
+
} from "./stream";
|
|
10
|
+
|
|
11
|
+
export type WorkspaceInteractionRevisionStreamTransport = {
|
|
12
|
+
openStream: (
|
|
13
|
+
after: number,
|
|
14
|
+
signal: AbortSignal | undefined,
|
|
15
|
+
) => Promise<ReadableStream<Uint8Array>>;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Reconnecting latest-revision stream. Revisions may skip because intermediate
|
|
20
|
+
* invalidations carry no independent evidence; every delivered value means
|
|
21
|
+
* "refetch any interaction resources older than this cursor".
|
|
22
|
+
*/
|
|
23
|
+
export async function* streamWorkspaceInteractionRevisions(
|
|
24
|
+
transport: WorkspaceInteractionRevisionStreamTransport,
|
|
25
|
+
options: StreamSessionEventsOptions = {},
|
|
26
|
+
): AsyncGenerator<WorkspaceInteractionRevisionEvent, void, void> {
|
|
27
|
+
const signal = options.signal;
|
|
28
|
+
const reconnect = options.reconnect ?? true;
|
|
29
|
+
const baseDelayMs = options.reconnectDelayMs ?? 500;
|
|
30
|
+
const maxDelayMs = options.maxReconnectDelayMs ?? 10_000;
|
|
31
|
+
const jitterRatio = options.reconnectJitterRatio ?? 0.2;
|
|
32
|
+
const beforeLiveTimeoutMs = options.beforeLiveTimeoutMs ?? 15_000;
|
|
33
|
+
const heartbeatTimeoutMs = options.heartbeatTimeoutMs ?? 45_000;
|
|
34
|
+
const maxAttempts = options.maxReconnectAttempts ?? Number.POSITIVE_INFINITY;
|
|
35
|
+
let cursor = options.after ?? 0;
|
|
36
|
+
let failures = 0;
|
|
37
|
+
let delayMs = baseDelayMs;
|
|
38
|
+
let everConnected = false;
|
|
39
|
+
|
|
40
|
+
for (;;) {
|
|
41
|
+
if (signal?.aborted) return;
|
|
42
|
+
options.onStateChange?.(everConnected || failures > 0 ? "reconnecting" : "connecting");
|
|
43
|
+
const cursorAtOpen = cursor;
|
|
44
|
+
try {
|
|
45
|
+
const body = await transport.openStream(cursor, signal);
|
|
46
|
+
everConnected = true;
|
|
47
|
+
failures = 0;
|
|
48
|
+
delayMs = baseDelayMs;
|
|
49
|
+
await runBeforeLive(options.beforeLive, beforeLiveTimeoutMs, signal);
|
|
50
|
+
options.onStateChange?.("live");
|
|
51
|
+
for await (const message of parseSseStream(
|
|
52
|
+
withStreamInactivityTimeout(body, heartbeatTimeoutMs, signal),
|
|
53
|
+
)) {
|
|
54
|
+
if (signal?.aborted) return;
|
|
55
|
+
const event = parseWorkspaceInteractionRevision(message.data);
|
|
56
|
+
if (!event || event.sequence <= cursor) continue;
|
|
57
|
+
cursor = event.sequence;
|
|
58
|
+
yield event;
|
|
59
|
+
}
|
|
60
|
+
if (!reconnect) return;
|
|
61
|
+
if (cursor === cursorAtOpen) await sleep(jitteredDelay(baseDelayMs, jitterRatio), signal);
|
|
62
|
+
continue;
|
|
63
|
+
} catch (error) {
|
|
64
|
+
if (signal?.aborted || isAbortError(error)) return;
|
|
65
|
+
if (!reconnect || !isRetryableStreamError(error)) throw error;
|
|
66
|
+
failures += 1;
|
|
67
|
+
if (failures > maxAttempts) {
|
|
68
|
+
throw new OpenGeniStreamError(
|
|
69
|
+
`workspace interaction stream gave up after ${maxAttempts} reconnect attempts: ${
|
|
70
|
+
error instanceof Error ? error.message : String(error)
|
|
71
|
+
}`,
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
await sleep(jitteredDelay(delayMs, jitterRatio), signal);
|
|
76
|
+
delayMs = Math.min(Math.max(delayMs * 2, baseDelayMs), maxDelayMs);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function parseWorkspaceInteractionRevision(data: string): WorkspaceInteractionRevisionEvent | null {
|
|
81
|
+
let value: unknown;
|
|
82
|
+
try {
|
|
83
|
+
value = JSON.parse(data);
|
|
84
|
+
} catch {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
if (
|
|
88
|
+
!isRecord(value) ||
|
|
89
|
+
value.type !== "workspace.interaction.changed" ||
|
|
90
|
+
typeof value.workspaceId !== "string" ||
|
|
91
|
+
typeof value.sequence !== "number" ||
|
|
92
|
+
!Number.isSafeInteger(value.sequence) ||
|
|
93
|
+
value.sequence < 0 ||
|
|
94
|
+
value.revision !== value.sequence ||
|
|
95
|
+
typeof value.occurredAt !== "string"
|
|
96
|
+
) {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
return value as WorkspaceInteractionRevisionEvent;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
103
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
async function sleep(delayMs: number, signal: AbortSignal | undefined): Promise<void> {
|
|
107
|
+
if (signal?.aborted || delayMs <= 0) return;
|
|
108
|
+
await new Promise<void>((resolve) => {
|
|
109
|
+
const timer = setTimeout(done, delayMs);
|
|
110
|
+
function done() {
|
|
111
|
+
clearTimeout(timer);
|
|
112
|
+
signal?.removeEventListener("abort", done);
|
|
113
|
+
resolve();
|
|
114
|
+
}
|
|
115
|
+
signal?.addEventListener("abort", done, { once: true });
|
|
116
|
+
});
|
|
117
|
+
}
|