@opengeni/sdk 3.3.2-canary.1 → 3.5.1-canary.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 +15 -2
- package/dist/artifact-client.d.ts +2 -1
- package/dist/artifacts.d.ts +1 -1
- package/dist/artifacts.js +4 -4
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +3 -3
- package/dist/{chunk-TFCLHRZK.js → chunk-3VIQGNRX.js} +2 -2
- package/dist/chunk-3VIQGNRX.js.map +1 -0
- package/dist/{chunk-6NEPJ7NC.js → chunk-7S2MZ65L.js} +5 -5
- package/dist/{chunk-GY6RQPCG.js → chunk-GXC4RESV.js} +95 -14
- package/dist/chunk-GXC4RESV.js.map +1 -0
- package/dist/{chunk-E5BNEG2D.js → chunk-HILHQEZD.js} +1 -1
- package/dist/chunk-HILHQEZD.js.map +1 -0
- package/dist/{chunk-BESZFWMU.js → chunk-PPWKSUDS.js} +2 -2
- package/dist/client.d.ts +31 -4
- package/dist/codex-realtime-controller.js +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +6 -6
- package/dist/document-authority.js +3 -3
- package/dist/editable-artifacts.js +4 -4
- 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 +4 -4
- package/dist/index.js +58 -50
- package/dist/index.js.map +1 -1
- package/dist/realtime.js +1 -1
- package/dist/session-titles.d.ts +2 -28
- package/dist/stream.d.ts +2 -0
- package/dist/types.d.ts +90 -3
- package/package.json +6 -2
- package/src/artifact-client.ts +2 -1
- package/src/artifacts.ts +1 -0
- package/src/browser.ts +1 -0
- package/src/client.ts +145 -15
- package/src/core.ts +1 -0
- package/src/github-repositories.ts +60 -0
- package/src/index.ts +16 -1
- package/src/session-titles.ts +8 -82
- package/src/stream.ts +29 -8
- package/src/types.ts +107 -4
- package/dist/chunk-E5BNEG2D.js.map +0 -1
- package/dist/chunk-GY6RQPCG.js.map +0 -1
- package/dist/chunk-TFCLHRZK.js.map +0 -1
- /package/dist/{chunk-6NEPJ7NC.js.map → chunk-7S2MZ65L.js.map} +0 -0
- /package/dist/{chunk-BESZFWMU.js.map → chunk-PPWKSUDS.js.map} +0 -0
package/README.md
CHANGED
|
@@ -84,10 +84,22 @@ session. There is no organization-wide Skill registry or Skill inheritance in
|
|
|
84
84
|
this integration contract. See the canonical guide for the complete route map,
|
|
85
85
|
security boundary, and delivery checklist.
|
|
86
86
|
|
|
87
|
+
Installed Pack Skills normally remain workspace-managed. A Pack may instead
|
|
88
|
+
mark guidance as `session_selected`; installation then exposes it to no agent
|
|
89
|
+
until `createSession` names the reviewed immutable component in
|
|
90
|
+
`installedSkillIds`. OpenGeni copies that exact artifact into the new session,
|
|
91
|
+
so omitting the field from customer-facing creates is a real contamination
|
|
92
|
+
boundary rather than a prompt convention.
|
|
93
|
+
The ordered selection is part of keyed-create identity: reusing an
|
|
94
|
+
`idempotencyKey` with a different selection returns a conflict instead of the
|
|
95
|
+
session configured by the earlier request.
|
|
96
|
+
|
|
87
97
|
For session lists, `deriveSessionDisplayTitle(session)` returns the durable
|
|
88
98
|
agent/user title when available. While the automatic title is still pending, it
|
|
89
|
-
shows
|
|
90
|
-
|
|
99
|
+
shows the first short, sensitive-safe line of the opening prompt, skipping an
|
|
100
|
+
unsafe pasted URL or identifier when later safe text exists. If no safe line is
|
|
101
|
+
available, a short session reference keeps rows distinguishable. The display
|
|
102
|
+
automatically yields to the later `session.title_set` value.
|
|
91
103
|
|
|
92
104
|
Browser consoles that do not need operator-only surfaces can import
|
|
93
105
|
`OpenGeniBrowserClient` from `@opengeni/sdk/browser`. Document authority migration
|
|
@@ -748,6 +760,7 @@ Every public endpoint group has typed methods:
|
|
|
748
760
|
| Group | Methods |
|
|
749
761
|
| --- | --- |
|
|
750
762
|
| Access + workspaces | `getAccessContext`, `listWorkspaces`, `createWorkspace`, `ensureWorkspace`, `getWorkspace`, `updateWorkspace` |
|
|
763
|
+
| Managed organizations | `createOrganization` for first-time compatibility; `createAdditionalOrganization` for an already-onboarded human; `listOrganizationMemberships`, `listOrganizationInvitations`, `acceptOrganizationInvitation` |
|
|
751
764
|
| Sessions + events | `createSession`, `listSessions`, `listSessionPage`, `listAgentTopology`, `getSession`, `getSessionLineage`, `updateSession`, `listEvents`, `sendEvent`, `sendMessage`, `steerMessage`, `pauseSession`, `resumeSession`, `cancelSession`, `sendApprovalDecision`, `streamEvents`, `openEventStream` |
|
|
752
765
|
| Machines (bring-your-own-compute) | `listMachines`, `machineMetricsSeries`, `swapActiveSandbox`, `mintEnrollToken`, `lookupDeviceEnrollment`, `approveDeviceEnrollment`, `denyDeviceEnrollment` |
|
|
753
766
|
| Turn queue | `getQueue`, `moveQueueItem`, `editQueueItem`, `steerQueueItem`, `deleteQueueItem` |
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OpenGeniDocumentAuthorityClient } from "./document-authority-client.js";
|
|
2
|
+
import type { FetchResponse } from "./client.js";
|
|
2
3
|
import type { CreateEditableArtifactMaterializationRequest, CreateEditableArtifactResourceRequest, EditableArtifactListResource, EditableArtifactMaterializationJobResource, EditableArtifactPinnedVersionResource, EditableArtifactResource, ImportEditableArtifactResourceRequest, ListSessionEditableArtifactResourcesOptions, PinEditableArtifactVersionRequest, ReadEditableArtifactMaterializationOptions, ReadEditableArtifactResourceOptions } from "./editable-artifact-resources.js";
|
|
3
4
|
import type { CreateWorkspaceArtifactRequest, PublishWorkspaceArtifactVersionRequest, RollbackWorkspaceArtifactRequest, WorkspaceArtifactContentResponse, WorkspaceArtifactDetailResponse, WorkspaceArtifactListOptions, WorkspaceArtifactListResponse, WorkspaceArtifactMutationResponse } from "./workspace-artifacts.js";
|
|
4
5
|
/** Public SDK client. Optional operator and artifact operations stay out of the console core. */
|
|
@@ -19,7 +20,7 @@ export declare class OpenGeniClient extends OpenGeniDocumentAuthorityClient {
|
|
|
19
20
|
}>): Promise<EditableArtifactMaterializationJobResource>;
|
|
20
21
|
getEditableArtifactMaterialization(workspaceId: string, artifactId: string, jobId: string, options: ReadEditableArtifactMaterializationOptions): Promise<EditableArtifactMaterializationJobResource>;
|
|
21
22
|
/** The caller owns the returned bounded response stream. */
|
|
22
|
-
downloadEditableArtifactMaterialization(workspaceId: string, artifactId: string, jobId: string, options: ReadEditableArtifactMaterializationOptions): Promise<
|
|
23
|
+
downloadEditableArtifactMaterialization(workspaceId: string, artifactId: string, jobId: string, options: ReadEditableArtifactMaterializationOptions): Promise<FetchResponse>;
|
|
23
24
|
listWorkspaceArtifacts(workspaceId: string, options?: WorkspaceArtifactListOptions): Promise<WorkspaceArtifactListResponse>;
|
|
24
25
|
getWorkspaceArtifact(workspaceId: string, artifactId: string): Promise<WorkspaceArtifactDetailResponse>;
|
|
25
26
|
getWorkspaceArtifactContent(workspaceId: string, artifactId: string, versionId?: string): Promise<WorkspaceArtifactContentResponse>;
|
package/dist/artifacts.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** Artifact-only API client entry; keeps unrelated SDK surfaces out of editor bundles. */
|
|
2
2
|
export { OpenGeniClient } from "./artifact-client.js";
|
|
3
3
|
export type { CreateEditableArtifactMaterializationRequest, CreateEditableArtifactResourceRequest, EditableArtifactListResource, EditableArtifactMaterializationFormat, EditableArtifactMaterializationJobResource, EditableArtifactMaterializationResultResource, EditableArtifactPinnedVersionResource, EditableArtifactResource, ListSessionEditableArtifactResourcesOptions, PinEditableArtifactVersionRequest, ReadEditableArtifactMaterializationOptions, ReadEditableArtifactResourceOptions, } from "./editable-artifact-resources.js";
|
|
4
|
-
export type { FetchLike, GetSessionOptions, OpenGeniClientOptions, OpenGeniRequestOptions, } from "./client.js";
|
|
4
|
+
export type { FetchLike, FetchResponse, GetSessionOptions, OpenGeniClientOptions, OpenGeniRequestOptions, } from "./client.js";
|
package/dist/artifacts.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OpenGeniClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-E5BNEG2D.js";
|
|
3
|
+
} from "./chunk-3VIQGNRX.js";
|
|
4
|
+
import "./chunk-PPWKSUDS.js";
|
|
5
|
+
import "./chunk-GXC4RESV.js";
|
|
7
6
|
import "./chunk-QTBAMHEF.js";
|
|
7
|
+
import "./chunk-HILHQEZD.js";
|
|
8
8
|
import "./chunk-OO5LPTO7.js";
|
|
9
9
|
export {
|
|
10
10
|
OpenGeniClient
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Browser-console client. Optional SDK surfaces must not enter this eager graph. */
|
|
2
2
|
export { OpenGeniClient as OpenGeniBrowserClient } from "./client.js";
|
|
3
|
-
export type { FetchLike, GetSessionOptions, OpenGeniClientOptions, OpenGeniRequestOptions, SendMessageInput, SteerMessageResult, TranscribeAudioInput, WorkspaceControlEventPage, } from "./client.js";
|
|
3
|
+
export type { FetchLike, FetchResponse, GetSessionOptions, OpenGeniClientOptions, OpenGeniRequestOptions, SendMessageInput, SteerMessageResult, TranscribeAudioInput, WorkspaceControlEventPage, } from "./client.js";
|
|
4
4
|
export { OpenGeniApiContractMismatchError, OpenGeniApiError, OpenGeniSecureContextRequiredError, OpenGeniSessionListCursorError, OpenGeniStreamError, isRetryableStreamError, } from "./errors.js";
|
|
5
5
|
export type { OpenGeniSecureContextRequiredReason } from "./errors.js";
|
|
6
6
|
export { resolveWorkspaceVoiceInputEnabled } from "./transcription.js";
|
package/dist/browser.js
CHANGED
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
} from "./chunk-VYCTL62C.js";
|
|
4
4
|
import {
|
|
5
5
|
OpenGeniClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GXC4RESV.js";
|
|
7
|
+
import "./chunk-QTBAMHEF.js";
|
|
7
8
|
import {
|
|
8
9
|
OPENGENI_API_CONTRACT_HEADER,
|
|
9
10
|
OPENGENI_API_CONTRACT_REVISION
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-QTBAMHEF.js";
|
|
11
|
+
} from "./chunk-HILHQEZD.js";
|
|
12
12
|
import {
|
|
13
13
|
OpenGeniApiContractMismatchError,
|
|
14
14
|
OpenGeniApiError,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OpenGeniDocumentAuthorityClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PPWKSUDS.js";
|
|
4
4
|
|
|
5
5
|
// src/artifact-client.ts
|
|
6
6
|
var OpenGeniClient = class extends OpenGeniDocumentAuthorityClient {
|
|
@@ -125,4 +125,4 @@ var OpenGeniClient = class extends OpenGeniDocumentAuthorityClient {
|
|
|
125
125
|
export {
|
|
126
126
|
OpenGeniClient
|
|
127
127
|
};
|
|
128
|
-
//# sourceMappingURL=chunk-
|
|
128
|
+
//# sourceMappingURL=chunk-3VIQGNRX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/artifact-client.ts"],"sourcesContent":["import { OpenGeniDocumentAuthorityClient } from \"./document-authority-client\";\nimport type { FetchResponse } from \"./client\";\nimport type {\n CreateEditableArtifactMaterializationRequest,\n CreateEditableArtifactResourceRequest,\n EditableArtifactListResource,\n EditableArtifactMaterializationJobResource,\n EditableArtifactPinnedVersionResource,\n EditableArtifactResource,\n ImportEditableArtifactResourceRequest,\n ListSessionEditableArtifactResourcesOptions,\n PinEditableArtifactVersionRequest,\n ReadEditableArtifactMaterializationOptions,\n ReadEditableArtifactResourceOptions,\n} from \"./editable-artifact-resources\";\nimport type {\n CreateWorkspaceArtifactRequest,\n PublishWorkspaceArtifactVersionRequest,\n RollbackWorkspaceArtifactRequest,\n WorkspaceArtifactContentResponse,\n WorkspaceArtifactDetailResponse,\n WorkspaceArtifactListOptions,\n WorkspaceArtifactListResponse,\n WorkspaceArtifactMutationResponse,\n} from \"./workspace-artifacts\";\n\n/** Public SDK client. Optional operator and artifact operations stay out of the console core. */\nexport class OpenGeniClient extends OpenGeniDocumentAuthorityClient {\n async createEditableArtifact(\n workspaceId: string,\n request: CreateEditableArtifactResourceRequest,\n options: Readonly<{ signal?: AbortSignal | undefined }> = {},\n ): Promise<EditableArtifactResource> {\n return await this.requestJson<EditableArtifactResource>(\n \"POST\",\n `/v1/workspaces/${encodeURIComponent(workspaceId)}/editable-artifacts`,\n request,\n {},\n options,\n );\n }\n\n async importEditableArtifact(\n workspaceId: string,\n request: ImportEditableArtifactResourceRequest,\n options: Readonly<{ signal?: AbortSignal | undefined }> = {},\n ): Promise<EditableArtifactResource> {\n return await this.requestJson<EditableArtifactResource>(\n \"POST\",\n `/v1/workspaces/${encodeURIComponent(workspaceId)}/editable-artifacts/imports`,\n request,\n {},\n options,\n );\n }\n\n async getEditableArtifact(\n workspaceId: string,\n artifactId: string,\n options: ReadEditableArtifactResourceOptions,\n ): Promise<EditableArtifactResource> {\n return await this.requestJson<EditableArtifactResource>(\n \"GET\",\n `/v1/workspaces/${encodeURIComponent(workspaceId)}/editable-artifacts/${encodeURIComponent(artifactId)}`,\n undefined,\n { replicaId: options.replicaId },\n options,\n );\n }\n\n async listSessionEditableArtifacts(\n workspaceId: string,\n sourceSessionId: string,\n options: ListSessionEditableArtifactResourcesOptions,\n ): Promise<EditableArtifactListResource> {\n return await this.requestJson<EditableArtifactListResource>(\n \"GET\",\n `/v1/workspaces/${encodeURIComponent(workspaceId)}/editable-artifacts`,\n undefined,\n { sourceSessionId, replicaId: options.replicaId },\n options,\n );\n }\n\n async pinEditableArtifactVersion(\n workspaceId: string,\n artifactId: string,\n request: PinEditableArtifactVersionRequest,\n options: Readonly<{ signal?: AbortSignal | undefined }> = {},\n ): Promise<EditableArtifactPinnedVersionResource> {\n return await this.requestJson<EditableArtifactPinnedVersionResource>(\n \"POST\",\n `/v1/workspaces/${encodeURIComponent(workspaceId)}/editable-artifacts/${encodeURIComponent(artifactId)}/versions`,\n request,\n {},\n options,\n );\n }\n\n async createEditableArtifactMaterialization(\n workspaceId: string,\n artifactId: string,\n request: CreateEditableArtifactMaterializationRequest,\n options: Readonly<{ signal?: AbortSignal | undefined }> = {},\n ): Promise<EditableArtifactMaterializationJobResource> {\n return await this.requestJson<EditableArtifactMaterializationJobResource>(\n \"POST\",\n `/v1/workspaces/${encodeURIComponent(workspaceId)}/editable-artifacts/${encodeURIComponent(artifactId)}/materializations`,\n request,\n {},\n options,\n );\n }\n\n async getEditableArtifactMaterialization(\n workspaceId: string,\n artifactId: string,\n jobId: string,\n options: ReadEditableArtifactMaterializationOptions,\n ): Promise<EditableArtifactMaterializationJobResource> {\n return await this.requestJson<EditableArtifactMaterializationJobResource>(\n \"GET\",\n `/v1/workspaces/${encodeURIComponent(workspaceId)}/editable-artifacts/${encodeURIComponent(artifactId)}/materializations/${encodeURIComponent(jobId)}`,\n undefined,\n { replicaId: options.replicaId },\n options,\n );\n }\n\n /** The caller owns the returned bounded response stream. */\n async downloadEditableArtifactMaterialization(\n workspaceId: string,\n artifactId: string,\n jobId: string,\n options: ReadEditableArtifactMaterializationOptions,\n ): Promise<FetchResponse> {\n return await this.requestResponse(\n \"GET\",\n `/v1/workspaces/${encodeURIComponent(workspaceId)}/editable-artifacts/${encodeURIComponent(artifactId)}/materializations/${encodeURIComponent(jobId)}/download`,\n { replicaId: options.replicaId },\n options,\n );\n }\n\n async listWorkspaceArtifacts(\n workspaceId: string,\n options: WorkspaceArtifactListOptions = {},\n ): Promise<WorkspaceArtifactListResponse> {\n const query = new URLSearchParams();\n if (options.limit !== undefined) query.set(\"limit\", String(options.limit));\n if (options.cursor) query.set(\"cursor\", options.cursor);\n const suffix = query.size > 0 ? `?${query.toString()}` : \"\";\n return await this.requestJson<WorkspaceArtifactListResponse>(\n \"GET\",\n `/v1/workspaces/${workspaceId}/published-artifacts${suffix}`,\n );\n }\n\n async getWorkspaceArtifact(\n workspaceId: string,\n artifactId: string,\n ): Promise<WorkspaceArtifactDetailResponse> {\n return await this.requestJson<WorkspaceArtifactDetailResponse>(\n \"GET\",\n `/v1/workspaces/${workspaceId}/published-artifacts/${encodeURIComponent(artifactId)}`,\n );\n }\n\n async getWorkspaceArtifactContent(\n workspaceId: string,\n artifactId: string,\n versionId?: string,\n ): Promise<WorkspaceArtifactContentResponse> {\n const query = versionId ? `?versionId=${encodeURIComponent(versionId)}` : \"\";\n return await this.requestJson<WorkspaceArtifactContentResponse>(\n \"GET\",\n `/v1/workspaces/${workspaceId}/published-artifacts/${encodeURIComponent(artifactId)}/content${query}`,\n );\n }\n\n async createWorkspaceArtifact(\n workspaceId: string,\n request: CreateWorkspaceArtifactRequest,\n ): Promise<WorkspaceArtifactMutationResponse> {\n return await this.requestJson<WorkspaceArtifactMutationResponse>(\n \"POST\",\n `/v1/workspaces/${workspaceId}/published-artifacts`,\n request,\n );\n }\n\n async publishWorkspaceArtifactVersion(\n workspaceId: string,\n artifactId: string,\n request: PublishWorkspaceArtifactVersionRequest,\n ): Promise<WorkspaceArtifactMutationResponse> {\n return await this.requestJson<WorkspaceArtifactMutationResponse>(\n \"POST\",\n `/v1/workspaces/${workspaceId}/published-artifacts/${encodeURIComponent(artifactId)}/versions`,\n request,\n );\n }\n\n async rollbackWorkspaceArtifact(\n workspaceId: string,\n artifactId: string,\n request: RollbackWorkspaceArtifactRequest,\n ): Promise<WorkspaceArtifactMutationResponse> {\n return await this.requestJson<WorkspaceArtifactMutationResponse>(\n \"POST\",\n `/v1/workspaces/${workspaceId}/published-artifacts/${encodeURIComponent(artifactId)}/rollback`,\n request,\n );\n }\n}\n"],"mappings":";;;;;AA2BO,IAAM,iBAAN,cAA6B,gCAAgC;AAAA,EAClE,MAAM,uBACJ,aACA,SACA,UAA0D,CAAC,GACxB;AACnC,WAAO,MAAM,KAAK;AAAA,MAChB;AAAA,MACA,kBAAkB,mBAAmB,WAAW,CAAC;AAAA,MACjD;AAAA,MACA,CAAC;AAAA,MACD;AAAA,IACF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AAW;AAAA,MAC7B;AAAA,IACF;AAAA,EACF;AAAA,EAEA,MAAM,gCACJ,aACA,YACA,SAC4C;AAC5C,WAAO,MAAM,KAAK;AAAA,MAChB;AAAA,MACA,kBAAkB,WAAW,wBAAwB,mBAAmB,UAAU,CAAC;AAAA,MACnF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,MAAM,0BACJ,aACA,YACA,SAC4C;AAC5C,WAAO,MAAM,KAAK;AAAA,MAChB;AAAA,MACA,kBAAkB,WAAW,wBAAwB,mBAAmB,UAAU,CAAC;AAAA,MACnF;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -2253,10 +2253,6 @@ function safeError2(error) {
|
|
|
2253
2253
|
}
|
|
2254
2254
|
|
|
2255
2255
|
export {
|
|
2256
|
-
CodexRealtimeMicrophoneError,
|
|
2257
|
-
startCodexRealtimeWebrtc,
|
|
2258
|
-
acquireCodexRealtimeMicrophone,
|
|
2259
|
-
codexRealtimeMicrophoneHealthy,
|
|
2260
2256
|
CODEX_REALTIME_INITIAL_ITEMS_MAX_COUNT,
|
|
2261
2257
|
CODEX_REALTIME_INITIAL_ITEMS_MAX_TOKENS,
|
|
2262
2258
|
CODEX_REALTIME_CONTEXT_APPEND_MAX_BYTES,
|
|
@@ -2271,6 +2267,10 @@ export {
|
|
|
2271
2267
|
CODEX_REALTIME_V3_PENDING_MAX_ENTRIES,
|
|
2272
2268
|
CODEX_REALTIME_V3_PENDING_MAX_BYTES,
|
|
2273
2269
|
createCodexRealtimeV3Bridge,
|
|
2270
|
+
CodexRealtimeMicrophoneError,
|
|
2271
|
+
startCodexRealtimeWebrtc,
|
|
2272
|
+
acquireCodexRealtimeMicrophone,
|
|
2273
|
+
codexRealtimeMicrophoneHealthy,
|
|
2274
2274
|
projectSessionRealtimeLifecycle,
|
|
2275
2275
|
CODEX_REALTIME_NEGOTIATION_TIMEOUT_MS,
|
|
2276
2276
|
sessionRealtimeOwnerStorageNamespace,
|
|
@@ -2278,4 +2278,4 @@ export {
|
|
|
2278
2278
|
hasStoredSessionRealtimeOwnerProof,
|
|
2279
2279
|
createCodexRealtimeController
|
|
2280
2280
|
};
|
|
2281
|
-
//# sourceMappingURL=chunk-
|
|
2281
|
+
//# sourceMappingURL=chunk-7S2MZ65L.js.map
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OpenGeniInteractionClient,
|
|
3
|
+
decodeComputerFrameMetadataHeader
|
|
4
|
+
} from "./chunk-QTBAMHEF.js";
|
|
1
5
|
import {
|
|
2
6
|
COMPUTER_SCREENSHOT_MAX_BYTES,
|
|
3
7
|
GENERATED_VIDEO_MAX_BYTES,
|
|
@@ -5,11 +9,7 @@ import {
|
|
|
5
9
|
OPENGENI_API_CONTRACT_REVISION,
|
|
6
10
|
OPENGENI_CORRELATION_HEADER,
|
|
7
11
|
RETAINED_OUTPUT_MAX_PAGE_BYTES
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import {
|
|
10
|
-
OpenGeniInteractionClient,
|
|
11
|
-
decodeComputerFrameMetadataHeader
|
|
12
|
-
} from "./chunk-QTBAMHEF.js";
|
|
12
|
+
} from "./chunk-HILHQEZD.js";
|
|
13
13
|
import {
|
|
14
14
|
OpenGeniApiContractMismatchError,
|
|
15
15
|
OpenGeniApiError,
|
|
@@ -90,6 +90,9 @@ async function* parseSseStream(stream) {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
// src/stream.ts
|
|
93
|
+
var SESSION_EVENT_STREAM_COVERAGE = Symbol.for(
|
|
94
|
+
"@opengeni/sdk/session-event-stream-covered-through"
|
|
95
|
+
);
|
|
93
96
|
async function* streamSessionEvents(transport, options = {}) {
|
|
94
97
|
const signal = options.signal;
|
|
95
98
|
const reconnect = options.reconnect ?? true;
|
|
@@ -128,7 +131,8 @@ async function* streamSessionEvents(transport, options = {}) {
|
|
|
128
131
|
if (!event) {
|
|
129
132
|
continue;
|
|
130
133
|
}
|
|
131
|
-
const coveredSequence =
|
|
134
|
+
const coveredSequence = trustedSseSequence(message.id, event.sequence);
|
|
135
|
+
markSessionEventStreamCoverage(event, coveredSequence);
|
|
132
136
|
if (coveredSequence <= cursor) continue;
|
|
133
137
|
if (event.sequence > cursor + 1) {
|
|
134
138
|
for await (const missed of backfillEvents(transport, cursor, event.sequence - 1)) {
|
|
@@ -266,12 +270,22 @@ function parseSessionEvent(data) {
|
|
|
266
270
|
}
|
|
267
271
|
return parsed;
|
|
268
272
|
}
|
|
269
|
-
function
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
function sessionEventStreamCoveredThrough(event) {
|
|
274
|
+
const covered = event[SESSION_EVENT_STREAM_COVERAGE];
|
|
275
|
+
return typeof covered === "number" && Number.isSafeInteger(covered) && covered >= event.sequence ? covered : null;
|
|
276
|
+
}
|
|
277
|
+
function trustedSseSequence(id, sequence) {
|
|
278
|
+
if (id === void 0 || !/^\d+$/.test(id)) return sequence;
|
|
279
|
+
const covered = Number(id);
|
|
280
|
+
return Number.isSafeInteger(covered) && covered >= sequence ? covered : sequence;
|
|
281
|
+
}
|
|
282
|
+
function markSessionEventStreamCoverage(event, covered) {
|
|
283
|
+
Object.defineProperty(event, SESSION_EVENT_STREAM_COVERAGE, {
|
|
284
|
+
value: covered,
|
|
285
|
+
enumerable: false,
|
|
286
|
+
configurable: false,
|
|
287
|
+
writable: false
|
|
288
|
+
});
|
|
275
289
|
}
|
|
276
290
|
async function sleep(delayMs, signal) {
|
|
277
291
|
if (signal?.aborted || delayMs <= 0) {
|
|
@@ -3076,6 +3090,57 @@ var OpenGeniClient = class {
|
|
|
3076
3090
|
request
|
|
3077
3091
|
);
|
|
3078
3092
|
}
|
|
3093
|
+
/** Read metadata for one organization-owned model-provider connection. */
|
|
3094
|
+
async getOrganizationModelProviderConnection(organizationId, providerKind) {
|
|
3095
|
+
return await this.requestJson(
|
|
3096
|
+
"GET",
|
|
3097
|
+
`/v1/organizations/${organizationId}/model-providers/${providerKind}`
|
|
3098
|
+
);
|
|
3099
|
+
}
|
|
3100
|
+
/** Connect or rotate one organization-owned provider credential. */
|
|
3101
|
+
async upsertOrganizationModelProviderConnection(organizationId, providerKind, request) {
|
|
3102
|
+
return await this.requestJson(
|
|
3103
|
+
"PUT",
|
|
3104
|
+
`/v1/organizations/${organizationId}/model-providers/${providerKind}`,
|
|
3105
|
+
request
|
|
3106
|
+
);
|
|
3107
|
+
}
|
|
3108
|
+
/** Revoke one organization-owned provider credential. */
|
|
3109
|
+
async revokeOrganizationModelProviderConnection(organizationId, providerKind, request) {
|
|
3110
|
+
return await this.requestJson(
|
|
3111
|
+
"DELETE",
|
|
3112
|
+
`/v1/organizations/${organizationId}/model-providers/${providerKind}`,
|
|
3113
|
+
request
|
|
3114
|
+
);
|
|
3115
|
+
}
|
|
3116
|
+
/** List organization-owned exact upstream model slugs. */
|
|
3117
|
+
async listOrganizationProviderCustomModels(organizationId, providerKind) {
|
|
3118
|
+
return await this.requestJson(
|
|
3119
|
+
"GET",
|
|
3120
|
+
`/v1/organizations/${organizationId}/model-providers/${providerKind}/custom-models`
|
|
3121
|
+
);
|
|
3122
|
+
}
|
|
3123
|
+
/** Add one organization-owned exact upstream model slug. */
|
|
3124
|
+
async createOrganizationProviderCustomModel(organizationId, providerKind, request) {
|
|
3125
|
+
return await this.requestJson(
|
|
3126
|
+
"POST",
|
|
3127
|
+
`/v1/organizations/${organizationId}/model-providers/${providerKind}/custom-models`,
|
|
3128
|
+
request
|
|
3129
|
+
);
|
|
3130
|
+
}
|
|
3131
|
+
/** Retire one organization-owned custom model. */
|
|
3132
|
+
async deleteOrganizationProviderCustomModel(organizationId, providerKind, customModelId, request) {
|
|
3133
|
+
if (!/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu.test(
|
|
3134
|
+
customModelId
|
|
3135
|
+
)) {
|
|
3136
|
+
throw new TypeError("customModelId must be a UUID");
|
|
3137
|
+
}
|
|
3138
|
+
return await this.requestJson(
|
|
3139
|
+
"DELETE",
|
|
3140
|
+
`/v1/organizations/${organizationId}/model-providers/${providerKind}/custom-models/${encodeURIComponent(customModelId)}`,
|
|
3141
|
+
request
|
|
3142
|
+
);
|
|
3143
|
+
}
|
|
3079
3144
|
/** Read the workspace's hard provider/model allowlist. */
|
|
3080
3145
|
async getWorkspaceModelAccessPolicy(workspaceId) {
|
|
3081
3146
|
return await this.requestJson(
|
|
@@ -3144,6 +3209,14 @@ var OpenGeniClient = class {
|
|
|
3144
3209
|
async createOrganization(request) {
|
|
3145
3210
|
return await this.requestJson("POST", "/v1/organizations", request);
|
|
3146
3211
|
}
|
|
3212
|
+
/** Create another organization owned by the current managed human. */
|
|
3213
|
+
async createAdditionalOrganization(request) {
|
|
3214
|
+
return await this.requestJson(
|
|
3215
|
+
"POST",
|
|
3216
|
+
"/v1/organizations/additional",
|
|
3217
|
+
request
|
|
3218
|
+
);
|
|
3219
|
+
}
|
|
3147
3220
|
/** Pending and historical invitations addressed to the current managed human. */
|
|
3148
3221
|
async listOrganizationInvitations(options = {}) {
|
|
3149
3222
|
const query = new URLSearchParams();
|
|
@@ -3204,7 +3277,7 @@ var OpenGeniClient = class {
|
|
|
3204
3277
|
`/v1/organizations/${organizationId}/overview`
|
|
3205
3278
|
);
|
|
3206
3279
|
}
|
|
3207
|
-
/** Create a shared workspace
|
|
3280
|
+
/** Create a shared workspace and grant its creator explicit workspace-admin access. */
|
|
3208
3281
|
async createOrganizationWorkspace(organizationId, request) {
|
|
3209
3282
|
return await this.requestJson(
|
|
3210
3283
|
"POST",
|
|
@@ -3227,6 +3300,13 @@ var OpenGeniClient = class {
|
|
|
3227
3300
|
request
|
|
3228
3301
|
);
|
|
3229
3302
|
}
|
|
3303
|
+
/** Delete a shared workspace through organization-administrator authority. */
|
|
3304
|
+
async deleteOrganizationWorkspace(organizationId, workspaceId) {
|
|
3305
|
+
await this.requestVoid(
|
|
3306
|
+
"DELETE",
|
|
3307
|
+
`/v1/organizations/${organizationId}/workspaces/${workspaceId}`
|
|
3308
|
+
);
|
|
3309
|
+
}
|
|
3230
3310
|
async putOrganizationWorkspaceMember(organizationId, workspaceId, membershipId, request) {
|
|
3231
3311
|
return await this.requestJson(
|
|
3232
3312
|
"PUT",
|
|
@@ -5703,6 +5783,7 @@ async function readBoundedResponseBytes(response, maxBytes, expectedBytes) {
|
|
|
5703
5783
|
export {
|
|
5704
5784
|
parseSseStream,
|
|
5705
5785
|
streamSessionEvents,
|
|
5786
|
+
sessionEventStreamCoveredThrough,
|
|
5706
5787
|
streamWorkspaceControlEvents,
|
|
5707
5788
|
streamWorkspaceInteractionRevisions,
|
|
5708
5789
|
streamWorkspaceLiveEvents,
|
|
@@ -5717,4 +5798,4 @@ export {
|
|
|
5717
5798
|
parseMediaGenerationResult,
|
|
5718
5799
|
OpenGeniClient
|
|
5719
5800
|
};
|
|
5720
|
-
//# sourceMappingURL=chunk-
|
|
5801
|
+
//# sourceMappingURL=chunk-GXC4RESV.js.map
|