@opengeni/sdk 0.52.1 → 1.0.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 +1078 -33
- package/dist/accounts.d.ts +153 -0
- package/dist/accounts.js +307 -0
- package/dist/accounts.js.map +1 -0
- package/dist/adapters/express.d.ts +31 -0
- package/dist/adapters/express.js +87 -0
- package/dist/adapters/express.js.map +1 -0
- package/dist/adapters/hono.d.ts +16 -0
- package/dist/adapters/hono.js +8 -0
- package/dist/adapters/hono.js.map +1 -0
- package/dist/adapters/next.d.ts +29 -0
- package/dist/adapters/next.js +22 -0
- package/dist/adapters/next.js.map +1 -0
- package/dist/allowance-refusal.d.ts +2 -0
- package/dist/allowance-refusal.js +50 -0
- package/dist/allowance-refusal.js.map +1 -0
- package/dist/artifact-catalog.d.ts +31 -0
- package/dist/artifact-client.d.ts +23 -11
- package/dist/artifacts.d.ts +1 -1
- package/dist/artifacts.js +7 -5
- package/dist/automations-client.d.ts +17 -0
- package/dist/automations.d.ts +3 -0
- package/dist/automations.js +84 -0
- package/dist/automations.js.map +1 -0
- package/dist/browser.d.ts +11 -0
- package/dist/browser.js +47 -0
- package/dist/browser.js.map +1 -0
- package/dist/chat/fold.d.ts +75 -0
- package/dist/chat/handler.d.ts +41 -0
- package/dist/chat/http.d.ts +67 -0
- package/dist/chat/ids.d.ts +34 -0
- package/dist/chat/index.d.ts +9 -0
- package/dist/chat/index.js +1694 -0
- package/dist/chat/index.js.map +1 -0
- package/dist/chat/openai.d.ts +30 -0
- package/dist/chat/opengeni.d.ts +128 -0
- package/dist/chat/types.d.ts +207 -0
- package/dist/chat/vercel.d.ts +49 -0
- package/dist/chats.d.ts +8 -0
- package/dist/{chunk-KIHGPM7H.js → chunk-2UXZUCEZ.js} +309 -46
- package/dist/chunk-2UXZUCEZ.js.map +1 -0
- package/dist/chunk-4SMEOV3P.js +246 -0
- package/dist/chunk-4SMEOV3P.js.map +1 -0
- package/dist/{chunk-FHI4DFIG.js → chunk-AH5D5Q5V.js} +31 -35
- package/dist/chunk-AH5D5Q5V.js.map +1 -0
- package/dist/chunk-APXVSSSY.js +301 -0
- package/dist/chunk-APXVSSSY.js.map +1 -0
- package/dist/chunk-DUVIYER4.js +639 -0
- package/dist/chunk-DUVIYER4.js.map +1 -0
- package/dist/{chunk-ILQZR5N6.js → chunk-FG3OO5LM.js} +3484 -750
- package/dist/chunk-FG3OO5LM.js.map +1 -0
- package/dist/chunk-GZYZT22T.js +260 -0
- package/dist/chunk-GZYZT22T.js.map +1 -0
- package/dist/chunk-HMGADJGZ.js +150 -0
- package/dist/chunk-HMGADJGZ.js.map +1 -0
- package/dist/{chunk-DXDL7EEW.js → chunk-KWADQ227.js} +198 -114
- package/dist/chunk-KWADQ227.js.map +1 -0
- package/dist/chunk-LY2K6ELJ.js +126 -0
- package/dist/chunk-LY2K6ELJ.js.map +1 -0
- package/dist/chunk-MOTJYIYL.js +340 -0
- package/dist/chunk-MOTJYIYL.js.map +1 -0
- package/dist/{chunk-MZWTWOX6.js → chunk-NC57YMUO.js} +447 -3
- package/dist/chunk-NC57YMUO.js.map +1 -0
- package/dist/chunk-RWKB6YZG.js +1270 -0
- package/dist/chunk-RWKB6YZG.js.map +1 -0
- package/dist/chunk-U6CV2SXO.js +195 -0
- package/dist/chunk-U6CV2SXO.js.map +1 -0
- package/dist/chunk-UM4ZXXJR.js +9 -0
- package/dist/chunk-UM4ZXXJR.js.map +1 -0
- package/dist/chunk-V6GIY62B.js +229 -0
- package/dist/chunk-V6GIY62B.js.map +1 -0
- package/dist/chunk-WU6GQG25.js +268 -0
- package/dist/chunk-WU6GQG25.js.map +1 -0
- package/dist/{chunk-VWE2QIVO.js → chunk-XNG7YGR3.js} +23 -6
- package/dist/chunk-XNG7YGR3.js.map +1 -0
- package/dist/{chunk-FRJFNDIR.js → chunk-YIKA2QT4.js} +37 -2
- package/dist/chunk-YIKA2QT4.js.map +1 -0
- package/dist/chunk-ZKPY6YAJ.js +135 -0
- package/dist/chunk-ZKPY6YAJ.js.map +1 -0
- package/dist/client.d.ts +843 -107
- package/dist/codex-realtime-controller.d.ts +6 -0
- package/dist/codex-realtime-controller.js +2 -2
- package/dist/codex-realtime-v3.d.ts +13 -2
- package/dist/company-brain.d.ts +22 -0
- package/dist/company-profile.d.ts +14 -1
- package/dist/core.d.ts +9 -3
- package/dist/core.js +28 -9
- package/dist/deprecation.d.ts +47 -0
- package/dist/desktop.d.ts +8 -0
- package/dist/document-authority-client.d.ts +51 -0
- package/dist/document-authority.d.ts +2 -0
- package/dist/document-authority.js +12 -0
- package/dist/document-authority.js.map +1 -0
- package/dist/editable-artifacts/browser-session.d.ts +7 -3
- package/dist/editable-artifacts/controller.d.ts +4 -1
- package/dist/editable-artifacts/errors.d.ts +1 -1
- package/dist/editable-artifacts/http-live-transport.d.ts +6 -2
- package/dist/editable-artifacts/index.d.ts +2 -0
- package/dist/editable-artifacts/open-failure.d.ts +9 -0
- package/dist/editable-artifacts/types.d.ts +6 -3
- package/dist/editable-artifacts/worker/kernel-adapter.d.ts +1 -1
- package/dist/editable-artifacts-worker.js +44 -17
- package/dist/editable-artifacts-worker.js.map +1 -1
- package/dist/editable-artifacts.js +243 -124
- package/dist/editable-artifacts.js.map +1 -1
- package/dist/embedding-client.d.ts +129 -0
- package/dist/errors.d.ts +36 -1
- package/dist/feedback.d.ts +23 -0
- package/dist/gateway-realtime-transport.d.ts +1 -0
- package/dist/gateway-realtime-transport.js +5 -3
- 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 +61 -12
- package/dist/index.js +277 -126
- package/dist/index.js.map +1 -1
- package/dist/interaction-revision-stream.d.ts +11 -0
- package/dist/interaction.d.ts +687 -5
- package/dist/interaction.js +32 -1
- package/dist/knowledge.d.ts +7 -0
- package/dist/knowledge.js +20 -0
- package/dist/knowledge.js.map +1 -0
- package/dist/message-links.d.ts +68 -0
- package/dist/model-context.d.ts +68 -0
- package/dist/model-display.d.ts +2 -0
- package/dist/model-display.js +15 -0
- package/dist/model-display.js.map +1 -0
- package/dist/model-picker-order.d.ts +1 -0
- package/dist/model-picker-order.js +10 -0
- package/dist/model-picker-order.js.map +1 -0
- package/dist/organization-integration-policy.d.ts +26 -0
- package/dist/organization-integration-policy.js +26 -0
- package/dist/organization-integration-policy.js.map +1 -0
- package/dist/organization-private-session-settings.d.ts +6 -0
- package/dist/organization-private-session-settings.js +22 -0
- package/dist/organization-private-session-settings.js.map +1 -0
- package/dist/organization-user-setup.d.ts +8 -0
- package/dist/organization-user-setup.js +16 -0
- package/dist/organization-user-setup.js.map +1 -0
- package/dist/pr-review-client.d.ts +16 -0
- package/dist/pr-review.d.ts +4 -0
- package/dist/pr-review.js +62 -0
- package/dist/pr-review.js.map +1 -0
- package/dist/preference-registry.d.ts +9 -1
- package/dist/proxy.d.ts +7 -5
- package/dist/realtime.d.ts +6 -4
- package/dist/realtime.js +10 -6
- package/dist/realtime.js.map +1 -1
- package/dist/retained-artifacts.d.ts +5 -1
- package/dist/session-history-import.d.ts +22 -0
- package/dist/session-history-import.js +36 -0
- package/dist/session-history-import.js.map +1 -0
- package/dist/session-list-entries.d.ts +1 -0
- package/dist/session-list-entries.js +7 -0
- package/dist/session-list-entries.js.map +1 -0
- package/dist/session-message-search.d.ts +53 -0
- package/dist/session-proxy-client.d.ts +24 -0
- package/dist/session-proxy.d.ts +245 -0
- package/dist/session-proxy.js +24 -0
- package/dist/session-proxy.js.map +1 -0
- package/dist/session-titles.d.ts +2 -0
- package/dist/site-browser-entry.d.ts +1 -0
- package/dist/site-browser-runtime.gen.d.ts +1 -0
- package/dist/site-document.d.ts +5 -0
- package/dist/site-document.js +20 -0
- package/dist/site-document.js.map +1 -0
- package/dist/site-document.test.d.ts +1 -0
- package/dist/site-http.d.ts +16 -0
- package/dist/site-tool-bridge.d.ts +44 -0
- package/dist/site.d.ts +101 -0
- package/dist/site.js +49 -0
- package/dist/site.js.map +1 -0
- package/dist/skills.d.ts +75 -0
- package/dist/stream.d.ts +2 -0
- package/dist/tenant-workspaces.d.ts +47 -0
- package/dist/tenant-workspaces.js +8 -0
- package/dist/tenant-workspaces.js.map +1 -0
- package/dist/tool-auth.d.ts +87 -0
- package/dist/tool-auth.js +23 -0
- package/dist/tool-auth.js.map +1 -0
- package/dist/tool-display-metadata.d.ts +3 -0
- package/dist/tools-FXBLUWAE.js +12 -0
- package/dist/tools-FXBLUWAE.js.map +1 -0
- package/dist/tools.d.ts +61 -0
- package/dist/types.d.ts +3048 -406
- package/dist/usage-allowances.d.ts +36 -0
- package/dist/usage-allowances.js +80 -0
- package/dist/usage-allowances.js.map +1 -0
- package/dist/workspace-artifacts.d.ts +33 -5
- package/dist/workspace-instruction-policies.d.ts +24 -2
- package/dist/workspace-integrations.d.ts +74 -0
- package/dist/workspace-integrations.js +65 -0
- package/dist/workspace-integrations.js.map +1 -0
- package/dist/workspace-learning.d.ts +124 -0
- package/dist/workspace-live-stream.d.ts +14 -0
- package/dist/workspace-state.d.ts +8 -71
- package/package.json +108 -3
- package/src/accounts.ts +443 -0
- package/src/adapters/express.ts +136 -0
- package/src/adapters/hono.ts +18 -0
- package/src/adapters/next.ts +42 -0
- package/src/allowance-refusal.ts +5 -0
- package/src/artifact-catalog.ts +41 -0
- package/src/artifact-client.ts +43 -52
- package/src/artifacts.ts +7 -1
- package/src/automations-client.ts +124 -0
- package/src/automations.ts +15 -0
- package/src/browser.ts +54 -0
- package/src/chat/fold.ts +431 -0
- package/src/chat/handler.ts +240 -0
- package/src/chat/http.ts +257 -0
- package/src/chat/ids.ts +85 -0
- package/src/chat/index.ts +87 -0
- package/src/chat/openai.ts +439 -0
- package/src/chat/opengeni.ts +722 -0
- package/src/chat/types.ts +219 -0
- package/src/chat/vercel.ts +204 -0
- package/src/chats.ts +16 -0
- package/src/client.ts +5162 -792
- package/src/codex-realtime-controller.ts +260 -12
- package/src/codex-realtime-lifecycle.ts +1 -0
- package/src/codex-realtime-v3.ts +162 -31
- package/src/codex-realtime.ts +1 -1
- package/src/company-brain.ts +59 -0
- package/src/company-profile.ts +17 -1
- package/src/core.ts +23 -1
- package/src/deprecation.ts +149 -0
- package/src/desktop.ts +11 -1
- package/src/document-authority-client.ts +219 -0
- package/src/document-authority.ts +17 -0
- package/src/editable-artifacts/browser-session.ts +36 -22
- package/src/editable-artifacts/controller.ts +102 -47
- package/src/editable-artifacts/errors.ts +2 -0
- package/src/editable-artifacts/http-live-transport.ts +62 -37
- package/src/editable-artifacts/index.ts +6 -0
- package/src/editable-artifacts/open-failure.ts +79 -0
- package/src/editable-artifacts/storage.ts +31 -40
- package/src/editable-artifacts/types.ts +6 -3
- package/src/editable-artifacts/worker/kernel-adapter.ts +23 -7
- package/src/editable-artifacts/worker/runtime.ts +26 -13
- package/src/editable-artifacts/worker/wire-codec.ts +23 -5
- package/src/embedding-client.ts +519 -0
- package/src/errors.ts +185 -4
- package/src/feedback.ts +20 -0
- package/src/gateway-realtime-transport.ts +253 -110
- package/src/github-repositories.ts +60 -0
- package/src/index.ts +603 -54
- package/src/interaction-revision-stream.ts +117 -0
- package/src/interaction.ts +1367 -51
- package/src/knowledge.ts +72 -0
- package/src/message-links.ts +178 -0
- package/src/model-context.ts +112 -0
- package/src/model-display.ts +10 -0
- package/src/model-picker-order.ts +6 -0
- package/src/organization-integration-policy.ts +54 -0
- package/src/organization-private-session-settings.ts +33 -0
- package/src/organization-user-setup.ts +31 -0
- package/src/pr-review-client.ts +92 -0
- package/src/pr-review.ts +17 -0
- package/src/preference-registry.ts +11 -0
- package/src/proxy.ts +17 -6
- package/src/realtime.ts +15 -4
- package/src/retained-artifacts.ts +101 -0
- package/src/session-history-import.ts +84 -0
- package/src/session-list-entries.ts +1 -0
- package/src/session-message-search.ts +47 -0
- package/src/session-proxy-client.ts +64 -0
- package/src/session-proxy.ts +1473 -0
- package/src/session-titles.ts +10 -0
- package/src/site-browser-entry.ts +6 -0
- package/src/site-browser-runtime.gen.ts +2 -0
- package/src/site-document.test.ts +64 -0
- package/src/site-document.ts +18 -0
- package/src/site-http.ts +162 -0
- package/src/site-tool-bridge.ts +146 -0
- package/src/site.ts +585 -0
- package/src/skills.ts +69 -0
- package/src/sse.ts +8 -2
- package/src/stream.ts +38 -4
- package/src/tenant-workspaces.ts +148 -0
- package/src/tool-auth.ts +301 -0
- package/src/tool-display-metadata.ts +19 -0
- package/src/tools.ts +396 -0
- package/src/types.ts +3607 -493
- package/src/usage-allowances.ts +189 -0
- package/src/workspace-artifacts.ts +40 -6
- package/src/workspace-instruction-policies.ts +26 -1
- package/src/workspace-integrations.ts +402 -0
- package/src/workspace-learning.ts +138 -0
- package/src/workspace-live-stream.ts +137 -0
- package/src/workspace-state.ts +8 -82
- package/dist/chunk-DXDL7EEW.js.map +0 -1
- package/dist/chunk-FHI4DFIG.js.map +0 -1
- package/dist/chunk-FRJFNDIR.js.map +0 -1
- package/dist/chunk-ILQZR5N6.js.map +0 -1
- package/dist/chunk-KIHGPM7H.js.map +0 -1
- package/dist/chunk-MZWTWOX6.js.map +0 -1
- package/dist/chunk-V5F253OG.js +0 -116
- package/dist/chunk-V5F253OG.js.map +0 -1
- package/dist/chunk-VWE2QIVO.js.map +0 -1
|
@@ -38,6 +38,9 @@ export type CodexRealtimeControllerClient = {
|
|
|
38
38
|
negotiateGatewayRealtime?(workspaceId: string, sessionId: string, request: GatewayRealtimeConnectRequest, options?: {
|
|
39
39
|
signal?: AbortSignal | undefined;
|
|
40
40
|
}): Promise<GatewayRealtimeConnectResponse>;
|
|
41
|
+
negotiateXaiSubscriptionRealtime?(workspaceId: string, sessionId: string, request: GatewayRealtimeConnectRequest, options?: {
|
|
42
|
+
signal?: AbortSignal | undefined;
|
|
43
|
+
}): Promise<GatewayRealtimeConnectResponse>;
|
|
41
44
|
activateCodexRealtimeConnection(workspaceId: string, sessionId: string, realtimeId: string, connectionId: string, request: ActivateCodexRealtimeConnectionRequest, options?: {
|
|
42
45
|
signal?: AbortSignal | undefined;
|
|
43
46
|
}): Promise<SessionRealtimeMutationResponse>;
|
|
@@ -69,6 +72,7 @@ export type CreateCodexRealtimeControllerOptions = {
|
|
|
69
72
|
createPeerConnection?: (() => RTCPeerConnection) | undefined;
|
|
70
73
|
getUserMedia?: ((constraints: MediaStreamConstraints) => Promise<MediaStream>) | undefined;
|
|
71
74
|
randomUUID?: (() => string) | undefined;
|
|
75
|
+
now?: (() => Date) | undefined;
|
|
72
76
|
setInterval?: ((callback: () => void, delayMs: number) => unknown) | undefined;
|
|
73
77
|
clearInterval?: ((handle: unknown) => void) | undefined;
|
|
74
78
|
setTimeout?: ((callback: () => void, delayMs: number) => unknown) | undefined;
|
|
@@ -80,6 +84,8 @@ export type CreateCodexRealtimeControllerOptions = {
|
|
|
80
84
|
model?: SessionRealtimeModel | undefined;
|
|
81
85
|
ownerStorageNamespace?: string | undefined;
|
|
82
86
|
startTransport?: RealtimeControllerTransportStarter | undefined;
|
|
87
|
+
/** Model-visible application context captured with each durable realtime message. */
|
|
88
|
+
getModelContext?: (() => string | undefined) | undefined;
|
|
83
89
|
};
|
|
84
90
|
export type RealtimeControllerTransportStarter = (input: {
|
|
85
91
|
client: CodexRealtimeControllerClient;
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
projectSessionRealtimeLifecycle,
|
|
6
6
|
sessionRealtimeOwnerStorageKey,
|
|
7
7
|
sessionRealtimeOwnerStorageNamespace
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-2UXZUCEZ.js";
|
|
9
|
+
import "./chunk-V6GIY62B.js";
|
|
10
10
|
export {
|
|
11
11
|
CODEX_REALTIME_NEGOTIATION_TIMEOUT_MS,
|
|
12
12
|
createCodexRealtimeController,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { SyncSessionRealtimeLedgerRequest, SyncSessionRealtimeLedgerResponse } from "./types.js";
|
|
1
|
+
import type { SessionRealtimeInboundEntry, SyncSessionRealtimeLedgerRequest, SyncSessionRealtimeLedgerResponse } from "./types.js";
|
|
2
2
|
export { CODEX_REALTIME_CONTEXT_APPEND_MAX_BYTES, CODEX_REALTIME_V3_MAX_EVENT_BYTES, CODEX_REALTIME_V3_MAX_IDENTIFIER_BYTES, CODEX_REALTIME_V3_MAX_TEXT_BYTES, contextAppendChunks, encodeCodexRealtimeV3DelegationContextAppend, encodeCodexRealtimeV3SessionContextAppend, parseCodexRealtimeV3Event, } from "./codex-realtime-v3-wire.js";
|
|
3
3
|
export type { CodexRealtimeV3ContextAppendChannel, CodexRealtimeV3DelegationContextAppend, CodexRealtimeV3Event, CodexRealtimeV3ParseFailure, CodexRealtimeV3ParseResult, CodexRealtimeV3SessionContextAppend, } from "./codex-realtime-v3-wire.js";
|
|
4
4
|
export declare const CODEX_REALTIME_V3_SYNC_MAX_ENTRIES = 64;
|
|
5
5
|
export declare const CODEX_REALTIME_V3_PENDING_MAX_ENTRIES = 256;
|
|
6
6
|
export declare const CODEX_REALTIME_V3_PENDING_MAX_BYTES: number;
|
|
7
7
|
export type CodexRealtimeV3BridgeFatal = {
|
|
8
|
-
code: "pending_overflow";
|
|
8
|
+
code: "pending_overflow" | "replay_journal_failed";
|
|
9
9
|
message: string;
|
|
10
10
|
};
|
|
11
11
|
export type CodexRealtimeV3BridgeSnapshot = {
|
|
@@ -35,6 +35,17 @@ export type CodexRealtimeV3BridgeOptions = {
|
|
|
35
35
|
owner: Pick<SyncSessionRealtimeLedgerRequest, "browserInstanceId" | "ownerKey" | "expectedVersion">;
|
|
36
36
|
sync(request: SyncSessionRealtimeLedgerRequest): Promise<SyncSessionRealtimeLedgerResponse>;
|
|
37
37
|
randomUUID?: (() => string) | undefined;
|
|
38
|
+
/** Model-visible application context captured once for each durable message-bearing entry. */
|
|
39
|
+
getModelContext?: (() => string | undefined) | undefined;
|
|
40
|
+
/** Controller-lifetime delegation identities shared across provider connection rotations. */
|
|
41
|
+
acceptedDelegationItemIds?: Set<string> | undefined;
|
|
42
|
+
/** Unsynced delegation snapshots retained exactly across provider connection rotations. */
|
|
43
|
+
pendingDelegations?: Map<string, SessionRealtimeInboundEntry> | undefined;
|
|
44
|
+
/** Persist exact delegation replay state before it becomes browser-reload-sensitive. */
|
|
45
|
+
onDelegationReplayStateChange?: ((state: {
|
|
46
|
+
acceptedDelegationItemIds: ReadonlySet<string>;
|
|
47
|
+
pendingDelegations: ReadonlyMap<string, SessionRealtimeInboundEntry>;
|
|
48
|
+
}) => void) | undefined;
|
|
38
49
|
/** The controller installs its activation FIFO first, then enables this listener synchronously. */
|
|
39
50
|
listen?: boolean | undefined;
|
|
40
51
|
onSnapshot?: ((snapshot: CodexRealtimeV3BridgeSnapshot) => void) | undefined;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { CompanyBrainContextReceiptPage as ContractCompanyBrainContextReceiptPage, CompanyBrainKnowledgeProposalPage as ContractCompanyBrainKnowledgeProposalPage, CompanyBrainOkfPackage as ContractCompanyBrainOkfPackage } from "@opengeni/contracts";
|
|
2
|
+
export type CompanyBrainOkfPackage = ContractCompanyBrainOkfPackage;
|
|
3
|
+
export type CompanyBrainContextReceiptPage = ContractCompanyBrainContextReceiptPage;
|
|
4
|
+
export type CompanyBrainKnowledgeProposalPage = ContractCompanyBrainKnowledgeProposalPage;
|
|
5
|
+
export type CompanyBrainContextReceiptListOptions = {
|
|
6
|
+
attemptId?: string;
|
|
7
|
+
cursor?: string;
|
|
8
|
+
limit?: number;
|
|
9
|
+
};
|
|
10
|
+
export type CompanyBrainKnowledgeProposalListOptions = {
|
|
11
|
+
limit?: number;
|
|
12
|
+
};
|
|
13
|
+
export type CompanyBrainInspectorTransport = {
|
|
14
|
+
requestJson<T>(method: string, path: string, body?: unknown): Promise<T>;
|
|
15
|
+
};
|
|
16
|
+
export declare function listCompanyBrainContextReceipts(client: CompanyBrainInspectorTransport, workspaceId: string, options?: CompanyBrainContextReceiptListOptions): Promise<CompanyBrainContextReceiptPage>;
|
|
17
|
+
export declare function listCompanyBrainKnowledgeProposals(client: CompanyBrainInspectorTransport, workspaceId: string, options?: CompanyBrainKnowledgeProposalListOptions): Promise<CompanyBrainKnowledgeProposalPage>;
|
|
18
|
+
export type CompanyBrainOkfDownload = {
|
|
19
|
+
content: string;
|
|
20
|
+
contentType: string;
|
|
21
|
+
filename: string;
|
|
22
|
+
};
|
|
@@ -24,7 +24,7 @@ export type CompanyProfileRevision = CompanyProfileRevisionIdentity & {
|
|
|
24
24
|
intent: "active" | "proposal";
|
|
25
25
|
profile: CompanyProfileContent;
|
|
26
26
|
provenance: {
|
|
27
|
-
source: "human" | "durable_learning" | "migration";
|
|
27
|
+
source: "human" | "agent_admin" | "durable_learning" | "migration";
|
|
28
28
|
sourceId: string | null;
|
|
29
29
|
};
|
|
30
30
|
supersedesRevisionId: string | null;
|
|
@@ -87,6 +87,19 @@ export type CompanyProfileMutationResponse = {
|
|
|
87
87
|
head: CompanyProfileHead | null;
|
|
88
88
|
event: CompanyProfileActivationEvent | null;
|
|
89
89
|
};
|
|
90
|
+
export type CompanyProfileAgentPolicyMode = "off" | "suggest" | "automatic";
|
|
91
|
+
export type CompanyProfileAgentPolicy = {
|
|
92
|
+
organizationId: string;
|
|
93
|
+
mode: CompanyProfileAgentPolicyMode;
|
|
94
|
+
version: number;
|
|
95
|
+
updatedAt: string;
|
|
96
|
+
changed?: boolean;
|
|
97
|
+
};
|
|
98
|
+
export type UpdateCompanyProfileAgentPolicyRequest = {
|
|
99
|
+
mode: CompanyProfileAgentPolicyMode;
|
|
100
|
+
expectedVersion: number;
|
|
101
|
+
operationId: string;
|
|
102
|
+
};
|
|
90
103
|
export type CompanyProfileDiffRequest = {
|
|
91
104
|
fromRevisionId: string;
|
|
92
105
|
toRevisionId: string;
|
package/dist/core.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export {
|
|
1
|
+
/** Backward-compatible non-artifact client surface. */
|
|
2
|
+
export { OpenGeniDocumentAuthorityClient as OpenGeniCoreClient } from "./document-authority-client.js";
|
|
3
|
+
export { OpenGeniToolCallError, OpenGeniToolReapprovalRequiredError, OpenGeniToolsClient, } from "./tools.js";
|
|
4
|
+
export type { OpenGeniGeneratedTools, OpenGeniDynamicToolNode, OpenGeniToolCallOptions, OpenGeniToolFunction, OpenGeniToolsFacade, OpenGeniWorkspaceTools, } from "./tools.js";
|
|
5
|
+
export type { FetchLike, FetchResponse, GetSessionOptions, OpenGeniClientOptions, OpenGeniRequestOptions, SendMessageInput, SteerMessageResult, TranscribeAudioInput, WorkspaceControlEventPage, } from "./client.js";
|
|
6
|
+
export { OpenGeniApiContractMismatchError, OpenGeniApiError, OpenGeniSetupError, OpenGeniSecureContextRequiredError, OpenGeniSessionListCursorError, OpenGeniStreamError, formatErrorMessage, isRetryableStreamError, } from "./errors.js";
|
|
7
|
+
export type { OpenGeniSecureContextRequiredReason } from "./errors.js";
|
|
8
|
+
export { parseDeprecationNotice } from "./deprecation.js";
|
|
9
|
+
export type { OpenGeniDeprecationHandler, OpenGeniDeprecationNotice } from "./deprecation.js";
|
|
4
10
|
export { resolveWorkspaceVoiceInputEnabled } from "./transcription.js";
|
|
5
11
|
export { OPENGENI_API_CONTRACT_HEADER, OPENGENI_API_CONTRACT_REVISION } from "./types.js";
|
package/dist/core.js
CHANGED
|
@@ -2,29 +2,48 @@ import {
|
|
|
2
2
|
resolveWorkspaceVoiceInputEnabled
|
|
3
3
|
} from "./chunk-VYCTL62C.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./chunk-
|
|
5
|
+
OpenGeniDocumentAuthorityClient
|
|
6
|
+
} from "./chunk-HMGADJGZ.js";
|
|
7
|
+
import {
|
|
8
|
+
OpenGeniToolCallError,
|
|
9
|
+
OpenGeniToolReapprovalRequiredError,
|
|
10
|
+
OpenGeniToolsClient
|
|
11
|
+
} from "./chunk-4SMEOV3P.js";
|
|
12
|
+
import {
|
|
13
|
+
parseDeprecationNotice
|
|
14
|
+
} from "./chunk-FG3OO5LM.js";
|
|
15
|
+
import "./chunk-APXVSSSY.js";
|
|
16
|
+
import {
|
|
17
|
+
OPENGENI_API_CONTRACT_HEADER,
|
|
18
|
+
OPENGENI_API_CONTRACT_REVISION
|
|
19
|
+
} from "./chunk-YIKA2QT4.js";
|
|
20
|
+
import "./chunk-NC57YMUO.js";
|
|
7
21
|
import {
|
|
8
22
|
OpenGeniApiContractMismatchError,
|
|
9
23
|
OpenGeniApiError,
|
|
24
|
+
OpenGeniSecureContextRequiredError,
|
|
10
25
|
OpenGeniSessionListCursorError,
|
|
26
|
+
OpenGeniSetupError,
|
|
11
27
|
OpenGeniStreamError,
|
|
28
|
+
formatErrorMessage,
|
|
12
29
|
isRetryableStreamError
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-MZWTWOX6.js";
|
|
15
|
-
import {
|
|
16
|
-
OPENGENI_API_CONTRACT_HEADER,
|
|
17
|
-
OPENGENI_API_CONTRACT_REVISION
|
|
18
|
-
} from "./chunk-FRJFNDIR.js";
|
|
30
|
+
} from "./chunk-V6GIY62B.js";
|
|
19
31
|
export {
|
|
20
32
|
OPENGENI_API_CONTRACT_HEADER,
|
|
21
33
|
OPENGENI_API_CONTRACT_REVISION,
|
|
22
34
|
OpenGeniApiContractMismatchError,
|
|
23
35
|
OpenGeniApiError,
|
|
24
|
-
|
|
36
|
+
OpenGeniDocumentAuthorityClient as OpenGeniCoreClient,
|
|
37
|
+
OpenGeniSecureContextRequiredError,
|
|
25
38
|
OpenGeniSessionListCursorError,
|
|
39
|
+
OpenGeniSetupError,
|
|
26
40
|
OpenGeniStreamError,
|
|
41
|
+
OpenGeniToolCallError,
|
|
42
|
+
OpenGeniToolReapprovalRequiredError,
|
|
43
|
+
OpenGeniToolsClient,
|
|
44
|
+
formatErrorMessage,
|
|
27
45
|
isRetryableStreamError,
|
|
46
|
+
parseDeprecationNotice,
|
|
28
47
|
resolveWorkspaceVoiceInputEnabled
|
|
29
48
|
};
|
|
30
49
|
//# sourceMappingURL=core.js.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deprecation notices advertised by the OpenGeni API.
|
|
3
|
+
*
|
|
4
|
+
* Per the public API compatibility policy, a route whose behaviour is scheduled
|
|
5
|
+
* for removal answers with the standard `Deprecation` (RFC 9745) and `Sunset`
|
|
6
|
+
* (RFC 8594) headers plus `Link: <notes>; rel="deprecation"`. The client
|
|
7
|
+
* surfaces them through `OpenGeniClientOptions.onDeprecation`, or by default
|
|
8
|
+
* as a one-time `console.warn` per route, so an integrator pinned to an older
|
|
9
|
+
* SDK learns about a removal well before it happens.
|
|
10
|
+
*/
|
|
11
|
+
export type OpenGeniDeprecationNotice = {
|
|
12
|
+
/** Request method, upper case. */
|
|
13
|
+
method: string;
|
|
14
|
+
/** Request path with ids collapsed (`/v1/workspaces/:id/...`), stable per route. */
|
|
15
|
+
route: string;
|
|
16
|
+
/** Exact request path. */
|
|
17
|
+
path: string;
|
|
18
|
+
/** When the deprecation was announced, if the header carried a date. */
|
|
19
|
+
deprecatedAt: Date | null;
|
|
20
|
+
/** Earliest removal on the server, if advertised. */
|
|
21
|
+
sunset: Date | null;
|
|
22
|
+
/** Migration notes (`rel="deprecation"`), if advertised. */
|
|
23
|
+
link: string | null;
|
|
24
|
+
/** Replacement (`rel="successor-version"`), if advertised. */
|
|
25
|
+
successor: string | null;
|
|
26
|
+
};
|
|
27
|
+
/** `false` silences notices; a function receives each route's notice once per client. */
|
|
28
|
+
export type OpenGeniDeprecationHandler = (notice: OpenGeniDeprecationNotice) => void;
|
|
29
|
+
type HeaderBag = {
|
|
30
|
+
get(name: string): string | null;
|
|
31
|
+
};
|
|
32
|
+
/** Read a deprecation notice from response headers; `null` when none is advertised. */
|
|
33
|
+
export declare function parseDeprecationNotice(method: string, url: string, headers: HeaderBag): OpenGeniDeprecationNotice | null;
|
|
34
|
+
/** The default handler: one `console.warn` per route per process. */
|
|
35
|
+
export declare function warnDeprecationOnce(notice: OpenGeniDeprecationNotice): void;
|
|
36
|
+
type FetchFunction<R extends {
|
|
37
|
+
headers: HeaderBag;
|
|
38
|
+
}> = (input: string | URL | Request, init?: RequestInit) => Promise<R>;
|
|
39
|
+
/**
|
|
40
|
+
* Wrap a fetch implementation so every response is inspected for a deprecation
|
|
41
|
+
* notice. The handler runs at most once per route for this wrapper and never
|
|
42
|
+
* affects the request: a throwing handler is swallowed.
|
|
43
|
+
*/
|
|
44
|
+
export declare function withDeprecationNotices<R extends {
|
|
45
|
+
headers: HeaderBag;
|
|
46
|
+
}>(fetchImpl: FetchFunction<R>, handler: OpenGeniDeprecationHandler | false | undefined): FetchFunction<R>;
|
|
47
|
+
export {};
|
package/dist/desktop.d.ts
CHANGED
|
@@ -30,12 +30,20 @@ export interface DesktopRfbLike {
|
|
|
30
30
|
clipViewport: boolean;
|
|
31
31
|
addEventListener(type: "connect" | "disconnect" | "securityfailure", cb: (e?: unknown) => void): void;
|
|
32
32
|
removeEventListener?: (type: "connect" | "disconnect" | "securityfailure", cb: (e?: unknown) => void) => void;
|
|
33
|
+
/** Send clipboard text over the already-open RFB connection. */
|
|
34
|
+
clipboardPasteFrom?(text: string): void;
|
|
35
|
+
/** Send one RFB key event. A missing `down` emits a complete key press. */
|
|
36
|
+
sendKey?(keysym: number, code: string, down?: boolean): void;
|
|
37
|
+
/** Focus or release the RFB keyboard sink without reconnecting. */
|
|
38
|
+
focus?(options?: FocusOptions): void;
|
|
39
|
+
blur?(): void;
|
|
33
40
|
disconnect(): void;
|
|
34
41
|
}
|
|
35
42
|
export type DesktopRfbFactory = (target: HTMLElement, url: string, opts: {
|
|
36
43
|
credentials?: {
|
|
37
44
|
password?: string | undefined;
|
|
38
45
|
} | undefined;
|
|
46
|
+
wsProtocols?: string[] | undefined;
|
|
39
47
|
}) => DesktopRfbLike;
|
|
40
48
|
export type DesktopConnectionState = "idle" | "negotiating" | "connecting" | "connected" | "rotating" | "reconnecting" | "error" | "ended";
|
|
41
49
|
export type DesktopStreamEvent = {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { CompanyBrainOkfDownload, CompanyBrainOkfPackage } from "./company-brain.js";
|
|
2
|
+
import { OpenGeniClient as OpenGeniCoreClient } from "./client.js";
|
|
3
|
+
import type { ApiKey, UpdateOrganizationApiKeyRequest, Document, IssueUserResourceGrantRequest, UserResourceGrantMutationResponse, DocumentBase, FileDownloadUrlResponse, DocumentAuthorityReclassification, DocumentDefaultCollectionBackfill, DocumentDefaultCollectionBackfillAudit, GetDocumentDefaultCollectionBackfillAuditOptions, ListDocumentAuthorityReclassificationsOptions, ListDocumentAuthorityReclassificationsResponse, ListDocumentDefaultCollectionBackfillRunsResponse, ListOrganizationDocumentAuthorityReclassificationsResponse, ReclassifyDocumentAuthorityRequest, RunDocumentDefaultCollectionBackfillRequest } from "./types.js";
|
|
4
|
+
/**
|
|
5
|
+
* Operator-only authority administration and Document tenancy-backfill surface.
|
|
6
|
+
*
|
|
7
|
+
* The public root and legacy `core` clients extend this class for compatibility.
|
|
8
|
+
* Browser consoles that import `@opengeni/sdk/browser` do not retain these
|
|
9
|
+
* methods or their routes.
|
|
10
|
+
*/
|
|
11
|
+
export declare class OpenGeniDocumentAuthorityClient extends OpenGeniCoreClient {
|
|
12
|
+
/** Read organization-key metadata and policy; never returns the secret token. */
|
|
13
|
+
getOrganizationApiKey(organizationId: string, apiKeyId: string): Promise<ApiKey>;
|
|
14
|
+
/** Update metadata or replace the policy. Policy narrowing applies on the next request. */
|
|
15
|
+
updateOrganizationApiKey(organizationId: string, apiKeyId: string, request: UpdateOrganizationApiKeyRequest): Promise<ApiKey>;
|
|
16
|
+
/** Issue an exact-session or standing personal-resource grant. */
|
|
17
|
+
issueUserResourceGrant(workspaceId: string, authorityId: string, request: IssueUserResourceGrantRequest): Promise<UserResourceGrantMutationResponse>;
|
|
18
|
+
listDocumentBases(workspaceId: string): Promise<DocumentBase[]>;
|
|
19
|
+
/**
|
|
20
|
+
* List every Document the current human can manage from this workspace,
|
|
21
|
+
* including portable personal and organization-scoped Documents whose
|
|
22
|
+
* immutable ingestion workspace is different.
|
|
23
|
+
*/
|
|
24
|
+
listAccessibleDocuments(workspaceId: string): Promise<Document[]>;
|
|
25
|
+
/** Mint a source-file URL through the Document's effective authority. */
|
|
26
|
+
createDocumentOriginalFileDownloadUrl(workspaceId: string, documentId: string): Promise<FileDownloadUrlResponse>;
|
|
27
|
+
/** Retry indexing for a failed document. */
|
|
28
|
+
reindexDocument(workspaceId: string, baseId: string, documentId: string): Promise<Document>;
|
|
29
|
+
/** Permission-filtered Company Brain package with authorized guidance bodies. */
|
|
30
|
+
getCompanyBrain(workspaceId: string): Promise<CompanyBrainOkfPackage>;
|
|
31
|
+
/** Download the deterministic Markdown/YAML Company Brain package. */
|
|
32
|
+
exportCompanyBrainOkf(workspaceId: string): Promise<CompanyBrainOkfDownload>;
|
|
33
|
+
/**
|
|
34
|
+
* Atomically reclassify a Document's authority and every indexed chunk.
|
|
35
|
+
* The operation is replay-safe and rejects a stale expected authority tuple.
|
|
36
|
+
*/
|
|
37
|
+
reclassifyDocumentAuthority(workspaceId: string, documentId: string, request: ReclassifyDocumentAuthorityRequest): Promise<DocumentAuthorityReclassification>;
|
|
38
|
+
/** List the current actor's durable authority-reclassification receipts. */
|
|
39
|
+
listDocumentAuthorityReclassifications(workspaceId: string, documentId: string, options?: ListDocumentAuthorityReclassificationsOptions): Promise<ListDocumentAuthorityReclassificationsResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* Advance one resumable, organization-scoped Default collection backfill.
|
|
42
|
+
* Reusing an operation ID is idempotent; keep the run ID across batches.
|
|
43
|
+
*/
|
|
44
|
+
runDocumentDefaultCollectionBackfill(workspaceId: string, request: RunDocumentDefaultCollectionBackfillRequest): Promise<DocumentDefaultCollectionBackfill>;
|
|
45
|
+
/** List organization-scoped Default collection backfill runs (organization admin only). */
|
|
46
|
+
listDocumentDefaultCollectionBackfillRuns(workspaceId: string, options?: ListDocumentAuthorityReclassificationsOptions): Promise<ListDocumentDefaultCollectionBackfillRunsResponse>;
|
|
47
|
+
/** Read bounded operation and workspace receipts for one Default-collection backfill run. */
|
|
48
|
+
getDocumentDefaultCollectionBackfillAudit(workspaceId: string, runId: string, options?: GetDocumentDefaultCollectionBackfillAuditOptions): Promise<DocumentDefaultCollectionBackfillAudit>;
|
|
49
|
+
/** List organization-wide Document authority changes (organization admin only). */
|
|
50
|
+
listOrganizationDocumentAuthorityReclassifications(workspaceId: string, options?: ListDocumentAuthorityReclassificationsOptions): Promise<ListOrganizationDocumentAuthorityReclassificationsResponse>;
|
|
51
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { OpenGeniDocumentAuthorityClient } from "./document-authority-client.js";
|
|
2
|
+
export type { DocumentAuthorityReclassification, DocumentDefaultCollectionBackfill, DocumentDefaultCollectionBackfillAudit, DocumentDefaultCollectionBackfillOperationAudit, DocumentDefaultCollectionBackfillReceiptAudit, DocumentDefaultCollectionBackfillRunAudit, GetDocumentDefaultCollectionBackfillAuditOptions, ListDocumentAuthorityReclassificationsOptions, ListDocumentAuthorityReclassificationsResponse, ListDocumentDefaultCollectionBackfillRunsResponse, ListOrganizationDocumentAuthorityReclassificationsResponse, OrganizationDocumentAuthorityReclassification, ReclassifyDocumentAuthorityRequest, RunDocumentDefaultCollectionBackfillRequest, } from "./types.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OpenGeniDocumentAuthorityClient
|
|
3
|
+
} from "./chunk-HMGADJGZ.js";
|
|
4
|
+
import "./chunk-FG3OO5LM.js";
|
|
5
|
+
import "./chunk-APXVSSSY.js";
|
|
6
|
+
import "./chunk-YIKA2QT4.js";
|
|
7
|
+
import "./chunk-NC57YMUO.js";
|
|
8
|
+
import "./chunk-V6GIY62B.js";
|
|
9
|
+
export {
|
|
10
|
+
OpenGeniDocumentAuthorityClient
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=document-authority.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -3,12 +3,14 @@ import { type CreateEditableArtifactHttpLiveTransportOptions } from "./http-live
|
|
|
3
3
|
import { type EditableArtifactSession } from "./session.js";
|
|
4
4
|
import type { EditableArtifactStoragePort } from "./storage.js";
|
|
5
5
|
import type { EditableArtifactModality } from "./types.js";
|
|
6
|
+
import type { EditableArtifactOpenFailureReporter } from "./open-failure.js";
|
|
6
7
|
import { type CreateBrowserEditableArtifactWorkerKernelOptions } from "./worker/browser-client.js";
|
|
7
8
|
export type EditableArtifactBrowserRuntime = Omit<CreateBrowserEditableArtifactWorkerKernelOptions, "modality" | "kernelVersion" | "protocolVersion" | "modelSchemaVersion" | "commandVersion"> & Readonly<{
|
|
8
|
-
/** Exact
|
|
9
|
+
/** Exact package/executable build identity; the API records but does not compatibility-gate it. */
|
|
9
10
|
kernelVersion: string;
|
|
10
11
|
modelSchemaVersion: number;
|
|
11
|
-
|
|
12
|
+
/** Exact OGATX001 intent protocol version. */
|
|
13
|
+
protocolVersion: number;
|
|
12
14
|
commandVersion: number;
|
|
13
15
|
}>;
|
|
14
16
|
export type CreateBrowserEditableArtifactSessionOptions = Readonly<{
|
|
@@ -21,10 +23,12 @@ export type CreateBrowserEditableArtifactSessionOptions = Readonly<{
|
|
|
21
23
|
/** Exact login/grant partition; rotate authorizationEpoch on authority changes. */
|
|
22
24
|
storageAuthority: EditableArtifactCacheAuthority;
|
|
23
25
|
runtime: EditableArtifactBrowserRuntime;
|
|
24
|
-
transport?: Omit<CreateEditableArtifactHttpLiveTransportOptions, "baseUrl" | "workspaceId" | "
|
|
26
|
+
transport?: Omit<CreateEditableArtifactHttpLiveTransportOptions, "baseUrl" | "workspaceId" | "modality" | "liveProtocolVersion" | "kernelVersion" | "modelSchemaVersion" | "snapshotVersion" | "commandProtocolVersion" | "committedTransactionProtocolVersion">;
|
|
25
27
|
storage?: EditableArtifactStoragePort;
|
|
26
28
|
/** Reuse the replica used to create the artifact when opening it immediately. */
|
|
27
29
|
replicaId?: string;
|
|
30
|
+
/** Receives bounded categories/codes only; never workbook or formula content. */
|
|
31
|
+
onOpenFailure?: EditableArtifactOpenFailureReporter;
|
|
28
32
|
}>;
|
|
29
33
|
/**
|
|
30
34
|
* One production browser composition point: verified WASM Worker, durable WAL,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type EditableArtifactOpenFailureReporter } from "./open-failure.js";
|
|
1
2
|
import type { EditableArtifactStoragePort } from "./storage.js";
|
|
2
3
|
import type { EditableArtifactId, EditableArtifactModality, EditableArtifactPendingTransaction, EditableArtifactSyncListener, EditableArtifactSyncScheduler, EditableArtifactSyncTransport, EditableArtifactSyncView, EditableArtifactWorkerKernel } from "./types.js";
|
|
3
4
|
export type CreateEditableArtifactSyncControllerOptions = {
|
|
@@ -11,7 +12,7 @@ export type CreateEditableArtifactSyncControllerOptions = {
|
|
|
11
12
|
kernelVersion: string;
|
|
12
13
|
modelSchemaVersion: number;
|
|
13
14
|
commandVersion: number;
|
|
14
|
-
protocolVersion
|
|
15
|
+
protocolVersion: number;
|
|
15
16
|
replayPageSize?: number;
|
|
16
17
|
maxQueuedMessages?: number;
|
|
17
18
|
maxQueuedBytes?: number;
|
|
@@ -28,6 +29,8 @@ export type CreateEditableArtifactSyncControllerOptions = {
|
|
|
28
29
|
maxReconnectAttempts?: number;
|
|
29
30
|
scheduler?: EditableArtifactSyncScheduler;
|
|
30
31
|
clientTransactionIdFactory?: () => string;
|
|
32
|
+
/** Receives bounded categories/codes only; never workbook or formula content. */
|
|
33
|
+
onOpenFailure?: EditableArtifactOpenFailureReporter;
|
|
31
34
|
/** Tests/embedded runtimes may inject; defaults to a fresh per-controller UUID. */
|
|
32
35
|
writerReplicaIdFactory?: () => string;
|
|
33
36
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type EditableArtifactSyncErrorCode = "unsupported_protocol" | "invalid_bootstrap" | "invalid_sequence" | "kernel_diverged" | "queue_overflow" | "resync_required" | "permission_changed" | "storage_failed" | "pending_conflict" | "reconnect_exhausted";
|
|
1
|
+
export type EditableArtifactSyncErrorCode = "unsupported_protocol" | "invalid_bootstrap" | "invalid_sequence" | "kernel_diverged" | "byte_corruption" | "authored_causal_mismatch" | "queue_overflow" | "resync_required" | "permission_changed" | "storage_failed" | "pending_conflict" | "reconnect_exhausted";
|
|
2
2
|
export declare class EditableArtifactSyncError extends Error {
|
|
3
3
|
readonly code: EditableArtifactSyncErrorCode;
|
|
4
4
|
readonly retryable: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EditableArtifactSyncTransport } from "./types.js";
|
|
1
|
+
import type { EditableArtifactModality, EditableArtifactSyncTransport } from "./types.js";
|
|
2
2
|
export type EditableArtifactWebSocketMessageEvent = Readonly<{
|
|
3
3
|
data: unknown;
|
|
4
4
|
}>;
|
|
@@ -24,9 +24,13 @@ export type EditableArtifactWebSocketLike = {
|
|
|
24
24
|
export type CreateEditableArtifactHttpLiveTransportOptions = Readonly<{
|
|
25
25
|
baseUrl: string | URL;
|
|
26
26
|
workspaceId: string;
|
|
27
|
-
|
|
27
|
+
modality: EditableArtifactModality;
|
|
28
|
+
liveProtocolVersion: number;
|
|
28
29
|
kernelVersion: string;
|
|
29
30
|
modelSchemaVersion: number;
|
|
31
|
+
snapshotVersion: number;
|
|
32
|
+
commandProtocolVersion: number;
|
|
33
|
+
committedTransactionProtocolVersion: number;
|
|
30
34
|
apiKey?: string;
|
|
31
35
|
headers?: Readonly<Record<string, string>> | (() => Readonly<Record<string, string>>);
|
|
32
36
|
credentials?: RequestCredentials;
|
|
@@ -3,6 +3,8 @@ export { createBrowserEditableArtifactSession, createEditableArtifactReplicaId,
|
|
|
3
3
|
export type { CreateBrowserEditableArtifactSessionOptions, EditableArtifactBrowserRuntime, } from "./browser-session.js";
|
|
4
4
|
export { EditableArtifactSyncError, EditableArtifactTransportError } from "./errors.js";
|
|
5
5
|
export type { EditableArtifactSyncErrorCode } from "./errors.js";
|
|
6
|
+
export { classifyEditableArtifactOpenFailure } from "./open-failure.js";
|
|
7
|
+
export type { EditableArtifactOpenFailureCategory, EditableArtifactOpenFailureEvent, EditableArtifactOpenFailureReporter, } from "./open-failure.js";
|
|
6
8
|
export { createEditableArtifactHttpLiveTransport } from "./http-live-transport.js";
|
|
7
9
|
export type { CreateEditableArtifactHttpLiveTransportOptions, EditableArtifactWebSocketCloseEvent, EditableArtifactWebSocketLike, EditableArtifactWebSocketMessageEvent, } from "./http-live-transport.js";
|
|
8
10
|
export { EditableArtifactStorageConflictError, IndexedDbEditableArtifactStorage, MemoryEditableArtifactStorage, } from "./storage.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type EditableArtifactOpenFailureCategory = "unsupported_old_format" | "byte_corruption" | "authored_causal_mismatch" | "runtime_package_mismatch" | "projection_parity_ci_failure";
|
|
2
|
+
/** Content-free, bounded telemetry safe to emit for workbook-open failures. */
|
|
3
|
+
export type EditableArtifactOpenFailureEvent = Readonly<{
|
|
4
|
+
category: EditableArtifactOpenFailureCategory;
|
|
5
|
+
code: string;
|
|
6
|
+
}>;
|
|
7
|
+
export type EditableArtifactOpenFailureReporter = (event: EditableArtifactOpenFailureEvent) => void;
|
|
8
|
+
/** Maps only stable error codes; messages and workbook/formula content are ignored. */
|
|
9
|
+
export declare function classifyEditableArtifactOpenFailure(error: unknown): EditableArtifactOpenFailureEvent | null;
|
|
@@ -33,7 +33,8 @@ type EditableArtifactSnapshotCommon = {
|
|
|
33
33
|
export type EditableArtifactSpreadsheetSnapshot = EditableArtifactSnapshotCommon & {
|
|
34
34
|
modality: "spreadsheet";
|
|
35
35
|
causalFrontier: EditableArtifactCausalFrontier;
|
|
36
|
-
|
|
36
|
+
operationProtocolVersion: number;
|
|
37
|
+
snapshotVersion: number;
|
|
37
38
|
};
|
|
38
39
|
export type EditableArtifactSerializedSnapshot = EditableArtifactSnapshotCommon & {
|
|
39
40
|
modality: EditableArtifactSerializedModality;
|
|
@@ -54,7 +55,7 @@ type EditableArtifactCommittedTransactionCommon = {
|
|
|
54
55
|
export type EditableArtifactSpreadsheetCommittedTransaction = EditableArtifactCommittedTransactionCommon & {
|
|
55
56
|
modality: "spreadsheet";
|
|
56
57
|
causalFrontier: EditableArtifactCausalFrontier;
|
|
57
|
-
|
|
58
|
+
operationProtocolVersion: number;
|
|
58
59
|
/** Exact whole canonical OGACO committed-transaction envelope. */
|
|
59
60
|
committedTransactionBytes: Uint8Array;
|
|
60
61
|
};
|
|
@@ -202,7 +203,7 @@ export type EditableArtifactStoredReplica = {
|
|
|
202
203
|
};
|
|
203
204
|
type EditableArtifactBootstrapCommon = {
|
|
204
205
|
artifactId: EditableArtifactId;
|
|
205
|
-
|
|
206
|
+
liveProtocolVersion: number;
|
|
206
207
|
headSequence: number;
|
|
207
208
|
headStateHash: string;
|
|
208
209
|
kernelVersion: string;
|
|
@@ -402,6 +403,8 @@ export type EditableArtifactSyncView = {
|
|
|
402
403
|
writable: boolean;
|
|
403
404
|
pendingTransactions: number;
|
|
404
405
|
blockedPending: readonly EditableArtifactBlockedPending[];
|
|
406
|
+
/** A command barrier independent of the artifact's edit permission. */
|
|
407
|
+
authoringBlockedReason?: "pending_conflict" | "prior_writer" | undefined;
|
|
405
408
|
queuedMessages: number;
|
|
406
409
|
reconnectAttempt: number;
|
|
407
410
|
lastError: Error | null;
|
|
@@ -2,7 +2,7 @@ import type { ArtifactWorkerInitializeInput } from "./wire-codec.js";
|
|
|
2
2
|
import type { EditableArtifactModality } from "../types.js";
|
|
3
3
|
export type ArtifactWorkerKernelSession = {
|
|
4
4
|
readonly modality: EditableArtifactModality;
|
|
5
|
-
/** Replays one exact whole canonical
|
|
5
|
+
/** Replays one exact whole canonical OGACO002 transaction. */
|
|
6
6
|
applyCommitted: (committedTransactionBytes: Uint8Array) => void;
|
|
7
7
|
/** Authors and applies one exact OGATX001 intent over the current frontier. */
|
|
8
8
|
applyPending: (intentBytes: Uint8Array) => void;
|