@opengeni/sdk 0.46.0 → 0.52.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 +94 -2
- 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-FHI4DFIG.js +128 -0
- package/dist/chunk-FHI4DFIG.js.map +1 -0
- package/dist/chunk-FRJFNDIR.js +218 -0
- package/dist/chunk-FRJFNDIR.js.map +1 -0
- package/dist/{chunk-QKV5OCLJ.js → chunk-ILQZR5N6.js} +1380 -595
- package/dist/chunk-ILQZR5N6.js.map +1 -0
- package/dist/chunk-MZWTWOX6.js +661 -0
- package/dist/chunk-MZWTWOX6.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/client.d.ts +176 -20
- package/dist/codex-realtime-controller.d.ts +6 -6
- 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 +9 -4
- package/dist/desktop.d.ts +1 -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 +1 -1
- package/dist/index.d.ts +41 -35
- package/dist/index.js +104 -68
- package/dist/index.js.map +1 -1
- package/dist/interaction.d.ts +885 -0
- package/dist/interaction.js +55 -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 +12 -12
- package/dist/retained-artifacts.d.ts +12 -0
- package/dist/stream.d.ts +16 -1
- package/dist/terminal.d.ts +1 -1
- package/dist/transcription.d.ts +2 -2
- package/dist/types.d.ts +1203 -23
- package/dist/workspace-control-stream.d.ts +2 -2
- 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 +1801 -206
- package/src/company-profile.ts +92 -0
- 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/index.ts +194 -0
- package/src/interaction.ts +1830 -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/retained-artifacts.ts +326 -0
- package/src/stream.ts +102 -4
- package/src/transcription.ts +2 -2
- package/src/types.ts +1430 -33
- package/src/workspace-control-stream.ts +15 -5
- package/dist/chunk-QKV5OCLJ.js.map +0 -1
package/README.md
CHANGED
|
@@ -87,6 +87,58 @@ through a tenant-scoped, same-origin proxy. The SDK does not move persistence,
|
|
|
87
87
|
prompt construction, context processing, delegation, or provider credentials
|
|
88
88
|
out of `apps/api`, `apps/worker`, or `packages/db`.
|
|
89
89
|
|
|
90
|
+
## Editable artifact sync (`@opengeni/sdk/editable-artifacts`)
|
|
91
|
+
|
|
92
|
+
Editable-artifact storage, sync, and Worker clients live behind an isolated
|
|
93
|
+
subpath; importing the ordinary SDK never loads them. Browser hosts should
|
|
94
|
+
bundle the dedicated module-Worker entry and pass its URL plus the exact,
|
|
95
|
+
version-matched kernel assets to the client:
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
import { OpenGeniClient } from "@opengeni/sdk/artifacts";
|
|
99
|
+
import workerUrl from "@opengeni/sdk/editable-artifacts/worker?worker&url";
|
|
100
|
+
import {
|
|
101
|
+
createBrowserEditableArtifactSession,
|
|
102
|
+
} from "@opengeni/sdk/editable-artifacts";
|
|
103
|
+
|
|
104
|
+
const client = new OpenGeniClient({ baseUrl: "https://api.example.com" });
|
|
105
|
+
const artifact = await client.getEditableArtifact(workspaceId, artifactId, {
|
|
106
|
+
replicaId,
|
|
107
|
+
});
|
|
108
|
+
const kernels = {
|
|
109
|
+
spreadsheet: () => import("@opengeni/artifact-kernel-wasm-spreadsheet"),
|
|
110
|
+
document: () => import("@opengeni/artifact-kernel-wasm-document"),
|
|
111
|
+
presentation: () => import("@opengeni/artifact-kernel-wasm-presentation"),
|
|
112
|
+
} as const;
|
|
113
|
+
const { editableArtifactKernelRuntime } = await kernels[artifact.modality]();
|
|
114
|
+
const session = createBrowserEditableArtifactSession({
|
|
115
|
+
baseUrl: "https://api.example.com",
|
|
116
|
+
workspaceId,
|
|
117
|
+
artifact,
|
|
118
|
+
storageAuthority,
|
|
119
|
+
runtime: {
|
|
120
|
+
workerUrl,
|
|
121
|
+
...editableArtifactKernelRuntime,
|
|
122
|
+
applicationOrigin: window.location.origin,
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Each kernel package contains only one editor modality, carries a static typed
|
|
128
|
+
build/protocol/model/command identity, and is reproduced from smoke-tested Rust
|
|
129
|
+
outputs under separate raw and gzip budgets. The Worker verifies that identity
|
|
130
|
+
against executable WASM capabilities before accepting state. A self-hosted host
|
|
131
|
+
may instead serve the exact version-matched glue and WASM binary together.
|
|
132
|
+
Canonical OGASC commands, OGATX intents, OGACO commits, and OGAKQ/OGAKV
|
|
133
|
+
queries/projections pass directly through the kernel; there is no JavaScript
|
|
134
|
+
operation mapper.
|
|
135
|
+
|
|
136
|
+
The live transport mints a short-lived, one-use ticket over authenticated HTTP,
|
|
137
|
+
then sends that ticket inside the first binary OGALV WebSocket frame. API keys
|
|
138
|
+
and long-lived credentials are never placed in the WebSocket URL. Hosts may
|
|
139
|
+
inject both `fetch` and the WebSocket factory for authenticated proxies and
|
|
140
|
+
tests; negotiated frame and mutation limits are enforced before work is queued.
|
|
141
|
+
|
|
90
142
|
## Workspace artifacts
|
|
91
143
|
|
|
92
144
|
Workspace artifacts are generic, immutable HTML publications. The SDK does not
|
|
@@ -362,6 +414,18 @@ const file = await client.uploadFile(workspaceId, {
|
|
|
362
414
|
const { url } = await client.createFileDownloadUrl(workspaceId, file.id);
|
|
363
415
|
```
|
|
364
416
|
|
|
417
|
+
Generated-image tool results use the same workspace file authority but expose a
|
|
418
|
+
closed `generated_image` receipt. Prefer a short-lived zero-copy browser URL;
|
|
419
|
+
use the bounded range method when the caller needs verified bytes:
|
|
420
|
+
|
|
421
|
+
```ts
|
|
422
|
+
const { url } = await client.createRetainedArtifactDownloadUrl(workspaceId, receipt.artifact);
|
|
423
|
+
const { bytes } = await client.downloadRetainedArtifact(workspaceId, receipt.artifact);
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
Both methods validate the receipt first. The byte path additionally verifies
|
|
427
|
+
the assembled SHA-256. See `docs/image-generation.md` in the repository.
|
|
428
|
+
|
|
365
429
|
## Connected Machines (bring-your-own-compute)
|
|
366
430
|
|
|
367
431
|
A session can run on an enrolled **Connected Machine** — a user's own computer —
|
|
@@ -396,6 +460,12 @@ the enrollment methods (`mintEnrollToken`, `lookupDeviceEnrollment`,
|
|
|
396
460
|
`approveDeviceEnrollment`, `denyDeviceEnrollment`) are covered in the
|
|
397
461
|
[Connected Machines guide](../../docs/connected-machines.md).
|
|
398
462
|
|
|
463
|
+
For large agent hierarchies, use `listAgentTopology` instead of collecting full
|
|
464
|
+
session pages. It returns compact root, direct-child, or server-side search
|
|
465
|
+
pages with opaque cursors and server-authored descendant counts. Load a child
|
|
466
|
+
page only when its parent is expanded; `children.truncated` makes a lower-bound
|
|
467
|
+
aggregate explicit.
|
|
468
|
+
|
|
399
469
|
## Full API coverage
|
|
400
470
|
|
|
401
471
|
Every public endpoint group has typed methods:
|
|
@@ -403,20 +473,42 @@ Every public endpoint group has typed methods:
|
|
|
403
473
|
| Group | Methods |
|
|
404
474
|
| --- | --- |
|
|
405
475
|
| Access + workspaces | `getAccessContext`, `listWorkspaces`, `createWorkspace`, `getWorkspace`, `updateWorkspace` |
|
|
406
|
-
| Sessions + events | `createSession`, `listSessions`, `getSession`, `updateSession`, `listEvents`, `sendEvent`, `sendMessage`, `steerMessage`, `pauseSession`, `resumeSession`, `cancelSession`, `sendApprovalDecision`, `streamEvents`, `openEventStream` |
|
|
476
|
+
| Sessions + events | `createSession`, `listSessions`, `listSessionPage`, `listAgentTopology`, `getSession`, `getSessionLineage`, `updateSession`, `listEvents`, `sendEvent`, `sendMessage`, `steerMessage`, `pauseSession`, `resumeSession`, `cancelSession`, `sendApprovalDecision`, `streamEvents`, `openEventStream` |
|
|
407
477
|
| Machines (bring-your-own-compute) | `listMachines`, `machineMetricsSeries`, `swapActiveSandbox`, `mintEnrollToken`, `lookupDeviceEnrollment`, `approveDeviceEnrollment`, `denyDeviceEnrollment` |
|
|
408
478
|
| Turn queue | `getQueue`, `moveQueueItem`, `editQueueItem`, `steerQueueItem`, `deleteQueueItem` |
|
|
409
479
|
| Goal | `getGoal`, `updateGoal`, `pauseGoal`, `resumeGoal` |
|
|
410
480
|
| Scheduled tasks | `createScheduledTask`, `listScheduledTasks`, `getScheduledTask`, `updateScheduledTask`, `pauseScheduledTask`, `resumeScheduledTask`, `triggerScheduledTask`, `deleteScheduledTask`, `listScheduledTaskRuns` |
|
|
411
|
-
| Variable sets | `
|
|
481
|
+
| Variable sets | `listVariableSets`, `createVariableSet`, `getVariableSet`, `updateVariableSet`, `deleteVariableSet`, `setVariableSetVariable`, `deleteVariableSetVariable`; generic reads are metadata-only, while dedicated permissioned exact-value reads are part of the held client train |
|
|
412
482
|
| Files | `uploadFile`, `beginFileUpload`, `completeFileUpload`, `getFile`, `createFileDownloadUrl` |
|
|
413
483
|
| Documents | `createDocumentBase`, `listDocumentBases`, `getDocumentBase`, `addDocument`, `listDocuments`, `reindexDocument`, `searchDocuments`, `searchKnowledge` (effective organization + workspace + immutable initiating-user personal scope) |
|
|
414
484
|
| Packs | `listPacks`, `registerPack`, `getPack`, `enablePack`, `deletePack`, `listPackInstallations` |
|
|
415
485
|
| Capabilities | `listCapabilities`, `createCapability`, `enableCapability`, `disableCapability`, `discoverMcpCapabilities` |
|
|
486
|
+
| Plugin packages | `previewPlugin`, `installPlugin`, `previewPluginUninstall`, `uninstallPlugin` |
|
|
487
|
+
| API Integrations | `listApiIntegrationPresets`, `listApiIntegrations`, `previewApiIntegration`, `startApiIntegrationOAuth`, `installApiIntegration`, `previewApiIntegrationUninstall`, `uninstallApiIntegration`, `listIntegrationFeatures`, `configureIntegrationFeature`, `pauseIntegrationFeature`, `resumeIntegrationFeature`, `removeIntegrationFeature`, `browseGoogleDriveIntegrationSource`, `saveGoogleDriveIntegrationSource` |
|
|
488
|
+
| Remote Skills | `previewSkillImport`, `installSkill`, `previewSkillUninstall`, `uninstallSkill` |
|
|
416
489
|
| GitHub | `getGitHubApp`, `githubConnectUrl`, `listGitHubRepositories`, `syncGitHubRepositories`, `createGitHubAppManifest` |
|
|
417
490
|
| API keys | `listApiKeys`, `createApiKey`, `deleteApiKey` |
|
|
418
491
|
| Billing | `getBilling`, `getBillingUsage`, `getBillingEntitlements`, `createBillingCheckout` |
|
|
419
492
|
|
|
493
|
+
`listApiIntegrationPresets` returns safe curated-provider metadata without any
|
|
494
|
+
deployment OAuth client credentials. API Integrations are multi-instance:
|
|
495
|
+
`installApiIntegration` may supply a
|
|
496
|
+
stable `instanceKey`, display name, and exact Connection. The returned
|
|
497
|
+
`serverId` is instance-specific, so two Gmail or Linear accounts can be
|
|
498
|
+
selected in one session without tool-name collision. Uninstall preview and
|
|
499
|
+
uninstall both require the exact `instanceKey` and instance version; neither
|
|
500
|
+
operation disconnects the underlying Connection.
|
|
501
|
+
|
|
502
|
+
Adapter-owned Integration features are listed and mutated under the exact
|
|
503
|
+
`capabilityId` + `instanceKey` + `featureKey`. Generic primitive schemas use
|
|
504
|
+
`configureIntegrationFeature`; lifecycle changes and removal require the
|
|
505
|
+
binding's exact optimistic version plus a caller UUID idempotency key. Google
|
|
506
|
+
Drive's nested folder/Shared Drive source schema has dedicated
|
|
507
|
+
`browseGoogleDriveIntegrationSource` and `saveGoogleDriveIntegrationSource`
|
|
508
|
+
methods. They verify provider metadata through that instance's exact Connection
|
|
509
|
+
and persist only a versioned feature binding—never provider credentials, page
|
|
510
|
+
tokens, or selected-source configuration on the Connection.
|
|
511
|
+
|
|
420
512
|
### Protocol routes (deliberately not in the SDK)
|
|
421
513
|
|
|
422
514
|
Some endpoints are wire protocols for specific counterparts, not client
|
|
@@ -1,7 +1,25 @@
|
|
|
1
|
-
import { OpenGeniClient as OpenGeniCoreClient } from "./client";
|
|
2
|
-
import type {
|
|
1
|
+
import { OpenGeniClient as OpenGeniCoreClient } from "./client.js";
|
|
2
|
+
import type { CreateEditableArtifactMaterializationRequest, CreateEditableArtifactResourceRequest, EditableArtifactListResource, EditableArtifactMaterializationJobResource, EditableArtifactPinnedVersionResource, EditableArtifactResource, ImportEditableArtifactResourceRequest, ListSessionEditableArtifactResourcesOptions, PinEditableArtifactVersionRequest, ReadEditableArtifactMaterializationOptions, ReadEditableArtifactResourceOptions } from "./editable-artifact-resources.js";
|
|
3
|
+
import type { CreateWorkspaceArtifactRequest, PublishWorkspaceArtifactVersionRequest, RollbackWorkspaceArtifactRequest, WorkspaceArtifactContentResponse, WorkspaceArtifactDetailResponse, WorkspaceArtifactListOptions, WorkspaceArtifactListResponse, WorkspaceArtifactMutationResponse } from "./workspace-artifacts.js";
|
|
3
4
|
/** Public SDK client. Artifact operations stay out of the console's eager core graph. */
|
|
4
5
|
export declare class OpenGeniClient extends OpenGeniCoreClient {
|
|
6
|
+
createEditableArtifact(workspaceId: string, request: CreateEditableArtifactResourceRequest, options?: Readonly<{
|
|
7
|
+
signal?: AbortSignal | undefined;
|
|
8
|
+
}>): Promise<EditableArtifactResource>;
|
|
9
|
+
importEditableArtifact(workspaceId: string, request: ImportEditableArtifactResourceRequest, options?: Readonly<{
|
|
10
|
+
signal?: AbortSignal | undefined;
|
|
11
|
+
}>): Promise<EditableArtifactResource>;
|
|
12
|
+
getEditableArtifact(workspaceId: string, artifactId: string, options: ReadEditableArtifactResourceOptions): Promise<EditableArtifactResource>;
|
|
13
|
+
listSessionEditableArtifacts(workspaceId: string, sourceSessionId: string, options: ListSessionEditableArtifactResourcesOptions): Promise<EditableArtifactListResource>;
|
|
14
|
+
pinEditableArtifactVersion(workspaceId: string, artifactId: string, request: PinEditableArtifactVersionRequest, options?: Readonly<{
|
|
15
|
+
signal?: AbortSignal | undefined;
|
|
16
|
+
}>): Promise<EditableArtifactPinnedVersionResource>;
|
|
17
|
+
createEditableArtifactMaterialization(workspaceId: string, artifactId: string, request: CreateEditableArtifactMaterializationRequest, options?: Readonly<{
|
|
18
|
+
signal?: AbortSignal | undefined;
|
|
19
|
+
}>): Promise<EditableArtifactMaterializationJobResource>;
|
|
20
|
+
getEditableArtifactMaterialization(workspaceId: string, artifactId: string, jobId: string, options: ReadEditableArtifactMaterializationOptions): Promise<EditableArtifactMaterializationJobResource>;
|
|
21
|
+
/** The caller owns the returned bounded response stream. */
|
|
22
|
+
downloadEditableArtifactMaterialization(workspaceId: string, artifactId: string, jobId: string, options: ReadEditableArtifactMaterializationOptions): Promise<Response>;
|
|
5
23
|
listWorkspaceArtifacts(workspaceId: string, options?: WorkspaceArtifactListOptions): Promise<WorkspaceArtifactListResponse>;
|
|
6
24
|
getWorkspaceArtifact(workspaceId: string, artifactId: string): Promise<WorkspaceArtifactDetailResponse>;
|
|
7
25
|
getWorkspaceArtifactContent(workspaceId: string, artifactId: string, versionId?: string): Promise<WorkspaceArtifactContentResponse>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Artifact-only API client entry; keeps unrelated SDK surfaces out of editor bundles. */
|
|
2
|
+
export { OpenGeniClient } from "./artifact-client.js";
|
|
3
|
+
export type { CreateEditableArtifactMaterializationRequest, CreateEditableArtifactResourceRequest, EditableArtifactListResource, EditableArtifactMaterializationFormat, EditableArtifactMaterializationJobResource, EditableArtifactMaterializationResultResource, EditableArtifactPinnedVersionResource, EditableArtifactResource, ListSessionEditableArtifactResourcesOptions, PinEditableArtifactVersionRequest, ReadEditableArtifactMaterializationOptions, ReadEditableArtifactResourceOptions, } from "./editable-artifact-resources.js";
|
|
4
|
+
export type { FetchLike, OpenGeniClientOptions, OpenGeniRequestOptions } from "./client.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OpenGeniClient
|
|
3
|
+
} from "./chunk-FHI4DFIG.js";
|
|
4
|
+
import "./chunk-ILQZR5N6.js";
|
|
5
|
+
import "./chunk-V5F253OG.js";
|
|
6
|
+
import "./chunk-MZWTWOX6.js";
|
|
7
|
+
import "./chunk-FRJFNDIR.js";
|
|
8
|
+
export {
|
|
9
|
+
OpenGeniClient
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=artifacts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OpenGeniClient
|
|
3
|
+
} from "./chunk-ILQZR5N6.js";
|
|
4
|
+
|
|
5
|
+
// src/artifact-client.ts
|
|
6
|
+
var OpenGeniClient2 = class extends OpenGeniClient {
|
|
7
|
+
async createEditableArtifact(workspaceId, request, options = {}) {
|
|
8
|
+
return await this.requestJson(
|
|
9
|
+
"POST",
|
|
10
|
+
`/v1/workspaces/${encodeURIComponent(workspaceId)}/editable-artifacts`,
|
|
11
|
+
request,
|
|
12
|
+
{},
|
|
13
|
+
options
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
async importEditableArtifact(workspaceId, request, options = {}) {
|
|
17
|
+
return await this.requestJson(
|
|
18
|
+
"POST",
|
|
19
|
+
`/v1/workspaces/${encodeURIComponent(workspaceId)}/editable-artifacts/imports`,
|
|
20
|
+
request,
|
|
21
|
+
{},
|
|
22
|
+
options
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
async getEditableArtifact(workspaceId, artifactId, options) {
|
|
26
|
+
return await this.requestJson(
|
|
27
|
+
"GET",
|
|
28
|
+
`/v1/workspaces/${encodeURIComponent(workspaceId)}/editable-artifacts/${encodeURIComponent(artifactId)}`,
|
|
29
|
+
void 0,
|
|
30
|
+
{ replicaId: options.replicaId },
|
|
31
|
+
options
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
async listSessionEditableArtifacts(workspaceId, sourceSessionId, options) {
|
|
35
|
+
return await this.requestJson(
|
|
36
|
+
"GET",
|
|
37
|
+
`/v1/workspaces/${encodeURIComponent(workspaceId)}/editable-artifacts`,
|
|
38
|
+
void 0,
|
|
39
|
+
{ sourceSessionId, replicaId: options.replicaId },
|
|
40
|
+
options
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
async pinEditableArtifactVersion(workspaceId, artifactId, request, options = {}) {
|
|
44
|
+
return await this.requestJson(
|
|
45
|
+
"POST",
|
|
46
|
+
`/v1/workspaces/${encodeURIComponent(workspaceId)}/editable-artifacts/${encodeURIComponent(artifactId)}/versions`,
|
|
47
|
+
request,
|
|
48
|
+
{},
|
|
49
|
+
options
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
async createEditableArtifactMaterialization(workspaceId, artifactId, request, options = {}) {
|
|
53
|
+
return await this.requestJson(
|
|
54
|
+
"POST",
|
|
55
|
+
`/v1/workspaces/${encodeURIComponent(workspaceId)}/editable-artifacts/${encodeURIComponent(artifactId)}/materializations`,
|
|
56
|
+
request,
|
|
57
|
+
{},
|
|
58
|
+
options
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
async getEditableArtifactMaterialization(workspaceId, artifactId, jobId, options) {
|
|
62
|
+
return await this.requestJson(
|
|
63
|
+
"GET",
|
|
64
|
+
`/v1/workspaces/${encodeURIComponent(workspaceId)}/editable-artifacts/${encodeURIComponent(artifactId)}/materializations/${encodeURIComponent(jobId)}`,
|
|
65
|
+
void 0,
|
|
66
|
+
{ replicaId: options.replicaId },
|
|
67
|
+
options
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
/** The caller owns the returned bounded response stream. */
|
|
71
|
+
async downloadEditableArtifactMaterialization(workspaceId, artifactId, jobId, options) {
|
|
72
|
+
return await this.requestResponse(
|
|
73
|
+
"GET",
|
|
74
|
+
`/v1/workspaces/${encodeURIComponent(workspaceId)}/editable-artifacts/${encodeURIComponent(artifactId)}/materializations/${encodeURIComponent(jobId)}/download`,
|
|
75
|
+
{ replicaId: options.replicaId },
|
|
76
|
+
options
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
async listWorkspaceArtifacts(workspaceId, options = {}) {
|
|
80
|
+
const query = new URLSearchParams();
|
|
81
|
+
if (options.limit !== void 0) query.set("limit", String(options.limit));
|
|
82
|
+
if (options.cursor) query.set("cursor", options.cursor);
|
|
83
|
+
const suffix = query.size > 0 ? `?${query.toString()}` : "";
|
|
84
|
+
return await this.requestJson(
|
|
85
|
+
"GET",
|
|
86
|
+
`/v1/workspaces/${workspaceId}/published-artifacts${suffix}`
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
async getWorkspaceArtifact(workspaceId, artifactId) {
|
|
90
|
+
return await this.requestJson(
|
|
91
|
+
"GET",
|
|
92
|
+
`/v1/workspaces/${workspaceId}/published-artifacts/${encodeURIComponent(artifactId)}`
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
async getWorkspaceArtifactContent(workspaceId, artifactId, versionId) {
|
|
96
|
+
const query = versionId ? `?versionId=${encodeURIComponent(versionId)}` : "";
|
|
97
|
+
return await this.requestJson(
|
|
98
|
+
"GET",
|
|
99
|
+
`/v1/workspaces/${workspaceId}/published-artifacts/${encodeURIComponent(artifactId)}/content${query}`
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
async createWorkspaceArtifact(workspaceId, request) {
|
|
103
|
+
return await this.requestJson(
|
|
104
|
+
"POST",
|
|
105
|
+
`/v1/workspaces/${workspaceId}/published-artifacts`,
|
|
106
|
+
request
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
async publishWorkspaceArtifactVersion(workspaceId, artifactId, request) {
|
|
110
|
+
return await this.requestJson(
|
|
111
|
+
"POST",
|
|
112
|
+
`/v1/workspaces/${workspaceId}/published-artifacts/${encodeURIComponent(artifactId)}/versions`,
|
|
113
|
+
request
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
async rollbackWorkspaceArtifact(workspaceId, artifactId, request) {
|
|
117
|
+
return await this.requestJson(
|
|
118
|
+
"POST",
|
|
119
|
+
`/v1/workspaces/${workspaceId}/published-artifacts/${encodeURIComponent(artifactId)}/rollback`,
|
|
120
|
+
request
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export {
|
|
126
|
+
OpenGeniClient2 as OpenGeniClient
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=chunk-FHI4DFIG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/artifact-client.ts"],"sourcesContent":["import { OpenGeniClient as OpenGeniCoreClient } 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. Artifact operations stay out of the console's eager core graph. */\nexport class OpenGeniClient extends OpenGeniCoreClient {\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<Response> {\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":"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","names":["OpenGeniClient"]}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
// src/types.ts
|
|
2
|
+
var DEFAULT_FILE_RESOURCE_MOUNT_ROOT = ".opengeni/files";
|
|
3
|
+
var SESSION_EVENT_TYPES = [
|
|
4
|
+
"session.created",
|
|
5
|
+
// Defensive bounded projection for malformed/legacy oversized envelopes.
|
|
6
|
+
"session.event.envelope_omitted",
|
|
7
|
+
"session.status.changed",
|
|
8
|
+
"session.realtime.started",
|
|
9
|
+
"session.realtime.ended",
|
|
10
|
+
"session.requiresAction",
|
|
11
|
+
"session.humanInput.requested",
|
|
12
|
+
"session.context.compaction.requested",
|
|
13
|
+
"session.context.compaction.started",
|
|
14
|
+
"session.context.compacted",
|
|
15
|
+
"session.context.compaction.skipped",
|
|
16
|
+
"session.context.cleared",
|
|
17
|
+
"user.message",
|
|
18
|
+
"user.pause",
|
|
19
|
+
"user.approvalDecision",
|
|
20
|
+
"user.humanInputResponse",
|
|
21
|
+
"turn.queued",
|
|
22
|
+
"turn.started",
|
|
23
|
+
"turn.completed",
|
|
24
|
+
"turn.failed",
|
|
25
|
+
"turn.cancelled",
|
|
26
|
+
"turn.superseded",
|
|
27
|
+
"turn.recovery.requested",
|
|
28
|
+
"turn.capacity_waiting",
|
|
29
|
+
"agent.message.delta",
|
|
30
|
+
"agent.message.completed",
|
|
31
|
+
"agent.reasoning.delta",
|
|
32
|
+
"agent.toolCall.created",
|
|
33
|
+
"agent.toolCall.output",
|
|
34
|
+
"agent.model.request",
|
|
35
|
+
"agent.model.usage",
|
|
36
|
+
"tool.auth_needed",
|
|
37
|
+
"credential.auth_needed",
|
|
38
|
+
"agent.updated",
|
|
39
|
+
"rig.setup.started",
|
|
40
|
+
"rig.setup.completed",
|
|
41
|
+
"rig.setup.skipped",
|
|
42
|
+
"rig.setup.failed",
|
|
43
|
+
"sandbox.operation.started",
|
|
44
|
+
"sandbox.operation.completed",
|
|
45
|
+
"sandbox.operation.failed",
|
|
46
|
+
"sandbox.command.output.delta",
|
|
47
|
+
"artifact.created",
|
|
48
|
+
"goal.set",
|
|
49
|
+
"goal.updated",
|
|
50
|
+
"goal.completed",
|
|
51
|
+
"goal.paused",
|
|
52
|
+
"goal.resumed",
|
|
53
|
+
"goal.cleared",
|
|
54
|
+
"goal.continuation",
|
|
55
|
+
"system.update.pending",
|
|
56
|
+
"system.update.delivered",
|
|
57
|
+
"system.update.superseded",
|
|
58
|
+
"system.update.cancelled",
|
|
59
|
+
"system.update.settled",
|
|
60
|
+
"session.control.paused",
|
|
61
|
+
"session.control.resumed",
|
|
62
|
+
"session.control.steer_requested",
|
|
63
|
+
"workspace.inference.paused",
|
|
64
|
+
"workspace.inference.resumed",
|
|
65
|
+
"session.queue.changed",
|
|
66
|
+
"session.queue.prompt.cancelled",
|
|
67
|
+
"session.queue.history",
|
|
68
|
+
"turn.event.rejected_late",
|
|
69
|
+
"memory.saved",
|
|
70
|
+
"memory.corrected",
|
|
71
|
+
// Channel-B desktop pixel-plane signals (mirror of contracts SessionEventType;
|
|
72
|
+
// the contract-parity test asserts sorted equality).
|
|
73
|
+
"stream.url.rotated",
|
|
74
|
+
"stream.opened",
|
|
75
|
+
"stream.closed",
|
|
76
|
+
"stream.revoked",
|
|
77
|
+
// Channel-B recording signals (P4.3 — "agent films itself proving the fix").
|
|
78
|
+
"recording.started",
|
|
79
|
+
"recording.available",
|
|
80
|
+
"recording.failed",
|
|
81
|
+
// Channel-A structured-service notifications (P4.4; mirror of contracts
|
|
82
|
+
// SessionEventType — the contract-parity test asserts sorted equality).
|
|
83
|
+
"fs.changed",
|
|
84
|
+
"git.changed",
|
|
85
|
+
"terminal.pty.started",
|
|
86
|
+
"terminal.pty.output.delta",
|
|
87
|
+
"terminal.pty.exited",
|
|
88
|
+
"session.title_set",
|
|
89
|
+
"session.mcp.approval_policy.updated",
|
|
90
|
+
"session.tool_policy.updated",
|
|
91
|
+
// Multi-account Codex (P1): the session's inference account changed.
|
|
92
|
+
"codex.account.switched",
|
|
93
|
+
// credential allocator metadata-only per-turn credential selection audit.
|
|
94
|
+
"codex.credential.selected",
|
|
95
|
+
// Bounded, identity-free deterministic shadow/replay decision.
|
|
96
|
+
"codex.fleet.decision",
|
|
97
|
+
// credential allocator durable zero-capacity wait lifecycle. These are system/runtime
|
|
98
|
+
// events, never synthetic user messages.
|
|
99
|
+
"codex.capacity.waiting",
|
|
100
|
+
"codex.capacity.resumed",
|
|
101
|
+
"codex.capacity.superseded",
|
|
102
|
+
// Sandbox durability observability (mirror of contracts SessionEventType):
|
|
103
|
+
// box lifecycle + manifest-env drift, attributable from the DB alone.
|
|
104
|
+
"sandbox.box.created",
|
|
105
|
+
"sandbox.box.lost",
|
|
106
|
+
"sandbox.box.terminated",
|
|
107
|
+
"sandbox.box.snapshot",
|
|
108
|
+
"sandbox.env.drift",
|
|
109
|
+
// Active-sandbox pointer reconcile (issue #341; announce-only; mirror of contracts
|
|
110
|
+
// SessionEventType — the contract-parity test asserts sorted equality).
|
|
111
|
+
"session.route.reconciled",
|
|
112
|
+
// Workbench v2 turn-end workspace capture (announce-only; mirror of contracts
|
|
113
|
+
// SessionEventType — the contract-parity test asserts sorted equality).
|
|
114
|
+
"workspace.revision.captured",
|
|
115
|
+
"workspace.revision.degraded",
|
|
116
|
+
// Connected Machine op-outcome observability (announce-only, quiet; mirror of
|
|
117
|
+
// contracts SessionEventType — the contract-parity test asserts sorted equality).
|
|
118
|
+
"machine.op.failed",
|
|
119
|
+
"machine.op.recovered",
|
|
120
|
+
// Connected Machine link-plane observability (announce-only, quiet; mirror of
|
|
121
|
+
// contracts SessionEventType — the contract-parity test asserts sorted equality).
|
|
122
|
+
"machine.link.lost",
|
|
123
|
+
"machine.link.restored",
|
|
124
|
+
"machine.runner.restarted"
|
|
125
|
+
];
|
|
126
|
+
var KNOWN_PERMISSIONS = [
|
|
127
|
+
"account:read",
|
|
128
|
+
"account:admin",
|
|
129
|
+
"members:manage",
|
|
130
|
+
"workspace:create",
|
|
131
|
+
"billing:read",
|
|
132
|
+
"billing:manage",
|
|
133
|
+
"workspace:read",
|
|
134
|
+
"workspace:admin",
|
|
135
|
+
"sessions:create",
|
|
136
|
+
"sessions:read",
|
|
137
|
+
"sessions:control",
|
|
138
|
+
// sandbox workspace (mirror of @opengeni/contracts Permission). stream:view is
|
|
139
|
+
// strictly broader than sessions:read (un-redacted pixels); stream:control is
|
|
140
|
+
// the never-granted-v1 raw-input plane; stream:acknowledge is the secret-leak
|
|
141
|
+
// consent gate.
|
|
142
|
+
"stream:view",
|
|
143
|
+
"stream:control",
|
|
144
|
+
"stream:acknowledge",
|
|
145
|
+
"files:upload",
|
|
146
|
+
"files:read",
|
|
147
|
+
"files:write",
|
|
148
|
+
"terminal:attach",
|
|
149
|
+
"documents:manage",
|
|
150
|
+
"documents:search",
|
|
151
|
+
"scheduled_tasks:manage",
|
|
152
|
+
"scheduled_tasks:run",
|
|
153
|
+
"github:manage",
|
|
154
|
+
"github:use",
|
|
155
|
+
"api_keys:manage",
|
|
156
|
+
"connections:read",
|
|
157
|
+
"connections:write",
|
|
158
|
+
"environments:manage",
|
|
159
|
+
"environments:use",
|
|
160
|
+
"variable-sets:list",
|
|
161
|
+
"variable-sets:read",
|
|
162
|
+
"variable-sets:write",
|
|
163
|
+
"variable-sets:manage",
|
|
164
|
+
"variable-sets:use",
|
|
165
|
+
"secrets:list",
|
|
166
|
+
"secrets:read",
|
|
167
|
+
"secrets:write",
|
|
168
|
+
"mcp_servers:attach",
|
|
169
|
+
"codemode:call",
|
|
170
|
+
"goals:manage",
|
|
171
|
+
"enrollments:read",
|
|
172
|
+
"enrollments:manage",
|
|
173
|
+
"rigs:use",
|
|
174
|
+
"rigs:manage",
|
|
175
|
+
"artifacts:read",
|
|
176
|
+
"artifacts:publish"
|
|
177
|
+
];
|
|
178
|
+
var OPENGENI_API_CONTRACT_REVISION = "2026-08-social-provider-tools-v1";
|
|
179
|
+
var OPENGENI_API_CONTRACT_HEADER = "x-opengeni-api-contract";
|
|
180
|
+
var OPENGENI_CORRELATION_HEADER = "x-opengeni-correlation-id";
|
|
181
|
+
var RETAINED_OUTPUT_DEFAULT_PAGE_BYTES = 256 * 1024;
|
|
182
|
+
var RETAINED_OUTPUT_MAX_PAGE_BYTES = 1024 * 1024;
|
|
183
|
+
var COMPUTER_SCREENSHOT_MAX_BYTES = 32 * 1024 * 1024;
|
|
184
|
+
var GENERATED_IMAGE_MAX_BYTES = 64 * 1024 * 1024;
|
|
185
|
+
var GENERATED_VIDEO_MAX_BYTES = 512 * 1024 * 1024;
|
|
186
|
+
var KNOWN_USAGE_EVENT_TYPES = [
|
|
187
|
+
"agent_run.created",
|
|
188
|
+
"agent_run.completed",
|
|
189
|
+
"model.tokens",
|
|
190
|
+
"model.cost",
|
|
191
|
+
"file.uploaded",
|
|
192
|
+
"file.deleted",
|
|
193
|
+
"document.indexed",
|
|
194
|
+
"scheduled_task.fired",
|
|
195
|
+
"knowledge_source_sync.fired",
|
|
196
|
+
"knowledge_source_sync.completed",
|
|
197
|
+
"knowledge_source_sync.items",
|
|
198
|
+
"knowledge_source_sync.bytes",
|
|
199
|
+
"api_key.request",
|
|
200
|
+
// sandbox warm-time metering (P2.1) — mirrors contracts UsageEventType.
|
|
201
|
+
"sandbox.warm_seconds",
|
|
202
|
+
"sandbox.warm_cost"
|
|
203
|
+
];
|
|
204
|
+
|
|
205
|
+
export {
|
|
206
|
+
DEFAULT_FILE_RESOURCE_MOUNT_ROOT,
|
|
207
|
+
SESSION_EVENT_TYPES,
|
|
208
|
+
KNOWN_PERMISSIONS,
|
|
209
|
+
OPENGENI_API_CONTRACT_REVISION,
|
|
210
|
+
OPENGENI_API_CONTRACT_HEADER,
|
|
211
|
+
OPENGENI_CORRELATION_HEADER,
|
|
212
|
+
RETAINED_OUTPUT_DEFAULT_PAGE_BYTES,
|
|
213
|
+
RETAINED_OUTPUT_MAX_PAGE_BYTES,
|
|
214
|
+
COMPUTER_SCREENSHOT_MAX_BYTES,
|
|
215
|
+
GENERATED_VIDEO_MAX_BYTES,
|
|
216
|
+
KNOWN_USAGE_EVENT_TYPES
|
|
217
|
+
};
|
|
218
|
+
//# sourceMappingURL=chunk-FRJFNDIR.js.map
|