@opengeni/db 0.28.9 → 0.31.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/dist/attached-browser-devices.d.ts +42 -0
- package/dist/attempt-tool-catalogs.d.ts +16 -0
- package/dist/browser-auth.d.ts +91 -0
- package/dist/browser-identities.d.ts +128 -0
- package/dist/browser-sessions.d.ts +272 -0
- package/dist/browser-state-artifacts.d.ts +17 -0
- package/dist/capability-components.d.ts +37 -0
- package/dist/capability-integrations.d.ts +192 -0
- package/dist/chunk-F5FT7BEZ.js +3535 -0
- package/dist/chunk-F5FT7BEZ.js.map +1 -0
- package/dist/chunk-ISI2TIUG.js +639 -0
- package/dist/chunk-ISI2TIUG.js.map +1 -0
- package/dist/chunk-MWDVXQOL.js +11639 -0
- package/dist/chunk-MWDVXQOL.js.map +1 -0
- package/dist/chunk-NBE6CHRI.js +955 -0
- package/dist/chunk-NBE6CHRI.js.map +1 -0
- package/dist/{chunk-VHBFHMPC.js → chunk-YHZXQ7HP.js} +754 -11
- package/dist/chunk-YHZXQ7HP.js.map +1 -0
- package/dist/codemode-operations.d.ts +117 -0
- package/dist/codex-token-resolver.d.ts +2 -2
- package/dist/company-profile-schema.d.ts +798 -0
- package/dist/company-profile.d.ts +268 -0
- package/dist/computer-sessions.d.ts +109 -0
- package/dist/connection-token-resolver.d.ts +9 -4
- package/dist/database.d.ts +52 -3
- package/dist/editable-artifact-durable-export.d.ts +153 -0
- package/dist/editable-artifact-durable-export.js +788 -0
- package/dist/editable-artifact-durable-export.js.map +1 -0
- package/dist/editable-artifact-materialization.d.ts +123 -0
- package/dist/editable-artifacts-schema.d.ts +4152 -0
- package/dist/editable-artifacts.d.ts +610 -0
- package/dist/editable-artifacts.js +26 -0
- package/dist/editable-artifacts.js.map +1 -0
- package/dist/generated-images.d.ts +139 -0
- package/dist/index.d.ts +698 -111
- package/dist/index.js +27573 -10322
- package/dist/index.js.map +1 -1
- package/dist/insights.d.ts +51 -4
- package/dist/integration-bindings.d.ts +70 -0
- package/dist/integration-features.d.ts +99 -0
- package/dist/interaction-revisions.d.ts +3 -0
- package/dist/interaction-schema.d.ts +5372 -0
- package/dist/knowledge-source-sync-schema.d.ts +1679 -0
- package/dist/knowledge-source-sync.d.ts +274 -0
- package/dist/memory-governance.d.ts +2 -2
- package/dist/memory-slack-delivery.d.ts +101 -0
- package/dist/new-session-drafts.d.ts +2 -2
- package/dist/pack-components.d.ts +76 -0
- package/dist/pack-installations.d.ts +86 -0
- package/dist/persistence-errors.d.ts +3 -3
- package/dist/plugin-packages.d.ts +126 -0
- package/dist/preference-registry.d.ts +1 -1
- package/dist/provision-roles.d.ts +9 -1
- package/dist/provision-roles.js +1 -1
- package/dist/runtime-posture.d.ts +18 -6
- package/dist/schema.d.ts +18342 -9099
- package/dist/schema.js +165 -1
- package/dist/scoped-knowledge.d.ts +97 -1
- package/dist/session-control.d.ts +4 -4
- package/dist/session-queue-commands.d.ts +19 -11
- package/dist/session-realtime-context.d.ts +2 -2
- package/dist/session-realtime-ledger.d.ts +4 -4
- package/dist/session-realtime-mirror.d.ts +2 -2
- package/dist/session-realtime-state.d.ts +1 -1
- package/dist/session-realtime-terminal.d.ts +1 -1
- package/dist/session-realtime.d.ts +7 -7
- package/dist/session-tool-call-settlement.d.ts +1 -1
- package/dist/slack-user-link-access.d.ts +54 -0
- package/dist/transcription-recordings.d.ts +2 -2
- package/dist/turn-initiator.d.ts +2 -2
- package/dist/video-generation.d.ts +216 -0
- package/dist/video-generation.js +66 -0
- package/dist/video-generation.js.map +1 -0
- package/dist/workspace-artifacts.d.ts +1 -1
- package/dist/workspace-instruction-policies.d.ts +1 -1
- package/dist/workspace-learning-policy-schema.d.ts +932 -0
- package/dist/workspace-learning-policy.d.ts +161 -0
- package/drizzle/0183_model_call_provider_cost_estimates.sql +39 -0
- package/drizzle/0184_sandbox_drain_teardown_fence.sql +682 -0
- package/drizzle/0185_temporal_schedule_cleanup_outbox.sql +168 -0
- package/drizzle/0186_sandbox_capture_provider_contract.sql +400 -0
- package/drizzle/0187_generated_image_artifacts.sql +173 -0
- package/drizzle/0188_image_generation_retention_failure.sql +25 -0
- package/drizzle/0189_retained_session_image_formats.sql +13 -0
- package/drizzle/0190_timeline_annotations.sql +31 -0
- package/drizzle/0191_editable_artifact_engine.sql +3853 -0
- package/drizzle/0192_editable_artifact_live_tickets.sql +338 -0
- package/drizzle/0193_editable_artifact_authorization.sql +190 -0
- package/drizzle/0194_editable_artifact_durable_exports.sql +160 -0
- package/drizzle/0195_editable_artifact_import_authorization.sql +203 -0
- package/drizzle/0196_rig_provider_images.sql +152 -0
- package/drizzle/0197_knowledge_source_sync_schedules.sql +523 -0
- package/drizzle/0198_memory_slack_publication_delivery.sql +393 -0
- package/drizzle/0199_workspace_learning_policy.sql +980 -0
- package/drizzle/0201_company_profile_authority.sql +849 -0
- package/drizzle/0202_document_index_checkpoints.sql +85 -0
- package/drizzle/0203_durable_video_generation.sql +353 -0
- package/drizzle/0204_video_generation_funding.sql +44 -0
- package/drizzle/0205_attempt_tool_catalogs.sql +230 -0
- package/drizzle/0206_browser_sessions.sql +646 -0
- package/drizzle/0207_browser_identities.sql +379 -0
- package/drizzle/0208_attached_browser_devices.sql +165 -0
- package/drizzle/0209_computer_sessions.sql +575 -0
- package/drizzle/0210_browser_auth_network_interventions.sql +441 -0
- package/drizzle/0211_editable_artifact_session_links.sql +58 -0
- package/drizzle/0212_slack_installation_bindings.sql +348 -0
- package/drizzle/0213_slack_user_link_access_requests.sql +177 -0
- package/drizzle/0214_session_activity_commit_gate.sql +262 -0
- package/drizzle/0215_capabilities_platform.sql +980 -0
- package/drizzle/0216_pack_component_ownership.sql +235 -0
- package/drizzle/0217_capability_definition_delete_authority.sql +32 -0
- package/package.json +18 -5
- package/src/attached-browser-devices.ts +371 -0
- package/src/attempt-tool-catalogs.ts +131 -0
- package/src/browser-auth.ts +1896 -0
- package/src/browser-identities.ts +1168 -0
- package/src/browser-sessions.ts +2005 -0
- package/src/browser-state-artifacts.ts +59 -0
- package/src/capability-components.ts +166 -0
- package/src/capability-integrations.ts +1663 -0
- package/src/codemode-operations.ts +674 -0
- package/src/company-profile-schema.ts +143 -0
- package/src/company-profile.ts +968 -0
- package/src/computer-sessions.ts +1130 -0
- package/src/connection-token-resolver.ts +270 -25
- package/src/database.ts +427 -23
- package/src/editable-artifact-durable-export.ts +1201 -0
- package/src/editable-artifact-materialization.ts +893 -0
- package/src/editable-artifacts-schema.ts +879 -0
- package/src/editable-artifacts.ts +5404 -0
- package/src/generated-images.ts +740 -0
- package/src/index.ts +5917 -1182
- package/src/insights.ts +160 -13
- package/src/integration-bindings.ts +455 -0
- package/src/integration-features.ts +859 -0
- package/src/interaction-revisions.ts +40 -0
- package/src/interaction-schema.ts +1303 -0
- package/src/knowledge-source-sync-schema.ts +192 -0
- package/src/knowledge-source-sync.ts +1922 -0
- package/src/memory-slack-delivery.ts +801 -0
- package/src/pack-components.ts +954 -0
- package/src/pack-installations.ts +929 -0
- package/src/persistence-errors.ts +4 -7
- package/src/plugin-packages.ts +1186 -0
- package/src/provision-roles.ts +302 -1
- package/src/runtime-posture-cli.ts +9 -0
- package/src/runtime-posture.ts +508 -5
- package/src/schema.ts +5117 -3119
- package/src/scoped-knowledge-schema.ts +1 -1
- package/src/scoped-knowledge.ts +655 -3
- package/src/session-control.ts +8 -5
- package/src/session-queue-commands.ts +187 -14
- package/src/session-realtime-context.ts +2 -2
- package/src/session-realtime-ledger.ts +3 -3
- package/src/session-realtime.ts +7 -7
- package/src/session-tool-call-settlement.ts +9 -0
- package/src/slack-user-link-access.ts +702 -0
- package/src/video-generation.ts +1452 -0
- package/src/workspace-learning-policy-schema.ts +139 -0
- package/src/workspace-learning-policy.ts +595 -0
- package/dist/chunk-P6CUHXQZ.js +0 -7248
- package/dist/chunk-P6CUHXQZ.js.map +0 -1
- package/dist/chunk-VHBFHMPC.js.map +0 -1
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { type McpServerConnectionRef } from "@opengeni/contracts";
|
|
2
|
+
import { type Database } from "./database.js";
|
|
3
|
+
export type ApiIntegrationProtocol = "openapi" | "graphql";
|
|
4
|
+
export type ApiIntegrationToolSafety = "read" | "write" | "destructive";
|
|
5
|
+
export type ApiIntegrationApprovalMode = "never" | "ask";
|
|
6
|
+
export type ApiIntegrationFeatureDefinition = {
|
|
7
|
+
readonly featureKey: string;
|
|
8
|
+
readonly kind: "knowledge_source" | "inbound_trigger" | "delivery_destination" | "identity_link";
|
|
9
|
+
readonly configSchema: Readonly<Record<string, unknown>>;
|
|
10
|
+
readonly capabilities: Readonly<Record<string, unknown>>;
|
|
11
|
+
};
|
|
12
|
+
export type ApiIntegrationToolDefinition = {
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly operationKey: string;
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly description: string;
|
|
17
|
+
readonly inputSchema: Readonly<Record<string, unknown>>;
|
|
18
|
+
readonly outputSchema?: Readonly<Record<string, unknown>>;
|
|
19
|
+
readonly safety: ApiIntegrationToolSafety;
|
|
20
|
+
readonly approvalMode: ApiIntegrationApprovalMode;
|
|
21
|
+
readonly deprecated: boolean;
|
|
22
|
+
};
|
|
23
|
+
type StoredApiIntegrationRevisionBase = {
|
|
24
|
+
readonly id: string;
|
|
25
|
+
readonly integrationId: string;
|
|
26
|
+
readonly contentSha256: string;
|
|
27
|
+
readonly source: {
|
|
28
|
+
readonly url?: string;
|
|
29
|
+
readonly provider?: string;
|
|
30
|
+
readonly fetchedAt?: string;
|
|
31
|
+
};
|
|
32
|
+
readonly title: string;
|
|
33
|
+
readonly description?: string;
|
|
34
|
+
readonly version?: string;
|
|
35
|
+
readonly tools: readonly ApiIntegrationToolDefinition[];
|
|
36
|
+
};
|
|
37
|
+
export type StoredOpenApiOperationBinding = {
|
|
38
|
+
readonly method: "get" | "put" | "post" | "delete" | "patch" | "head" | "options" | "trace";
|
|
39
|
+
readonly pathTemplate: string;
|
|
40
|
+
readonly serverUrl: string;
|
|
41
|
+
readonly parameters: readonly {
|
|
42
|
+
readonly name: string;
|
|
43
|
+
readonly location: "path" | "query" | "header" | "cookie";
|
|
44
|
+
readonly required: boolean;
|
|
45
|
+
readonly schema: Readonly<Record<string, unknown>>;
|
|
46
|
+
readonly description?: string;
|
|
47
|
+
}[];
|
|
48
|
+
readonly requestBody?: {
|
|
49
|
+
readonly required: boolean;
|
|
50
|
+
readonly contentTypes: readonly string[];
|
|
51
|
+
readonly schemas: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
52
|
+
};
|
|
53
|
+
readonly requiredScopeAlternatives?: readonly (readonly string[])[];
|
|
54
|
+
};
|
|
55
|
+
export type StoredGraphqlOperationBinding = {
|
|
56
|
+
readonly kind: "query" | "mutation";
|
|
57
|
+
readonly fieldName: string;
|
|
58
|
+
readonly operationName: string;
|
|
59
|
+
readonly variableDefinitions: readonly string[];
|
|
60
|
+
readonly variableNames: readonly string[];
|
|
61
|
+
readonly defaultSelection?: string;
|
|
62
|
+
readonly selectionAllowed: boolean;
|
|
63
|
+
};
|
|
64
|
+
/** Protocol-normalized immutable revision persisted in integration_spec_revisions.spec. */
|
|
65
|
+
export type StoredApiIntegrationRevision = (StoredApiIntegrationRevisionBase & {
|
|
66
|
+
readonly protocol: "openapi";
|
|
67
|
+
readonly bindings: Readonly<Record<string, StoredOpenApiOperationBinding>>;
|
|
68
|
+
}) | (StoredApiIntegrationRevisionBase & {
|
|
69
|
+
readonly protocol: "graphql";
|
|
70
|
+
readonly bindings: Readonly<Record<string, StoredGraphqlOperationBinding>>;
|
|
71
|
+
});
|
|
72
|
+
export type InstallApiIntegrationInput = {
|
|
73
|
+
accountId: string;
|
|
74
|
+
workspaceId: string;
|
|
75
|
+
subjectId: string;
|
|
76
|
+
capabilityId: string;
|
|
77
|
+
pluginKey: string;
|
|
78
|
+
serverId: string;
|
|
79
|
+
name: string;
|
|
80
|
+
description?: string | null;
|
|
81
|
+
category?: string;
|
|
82
|
+
tags?: string[];
|
|
83
|
+
presetId?: string | null;
|
|
84
|
+
provider?: string;
|
|
85
|
+
providerDomain: string;
|
|
86
|
+
protocol: ApiIntegrationProtocol;
|
|
87
|
+
baseUrl: string;
|
|
88
|
+
sourceUrl?: string | null;
|
|
89
|
+
authScheme?: Record<string, unknown>;
|
|
90
|
+
connectionId?: string | null;
|
|
91
|
+
instanceKey?: string;
|
|
92
|
+
displayName?: string;
|
|
93
|
+
expectedInstanceVersion?: number;
|
|
94
|
+
requiredScopes?: string[];
|
|
95
|
+
ownership?: "workspace" | "subject" | "either";
|
|
96
|
+
allowedTools?: string[];
|
|
97
|
+
featureDefinitions?: readonly ApiIntegrationFeatureDefinition[];
|
|
98
|
+
revision: StoredApiIntegrationRevision;
|
|
99
|
+
owner?: ApiIntegrationOwner;
|
|
100
|
+
};
|
|
101
|
+
export type InstalledApiIntegration = {
|
|
102
|
+
capabilityId: string;
|
|
103
|
+
pluginId: string;
|
|
104
|
+
pluginVersionId: string;
|
|
105
|
+
integrationFacetId: string;
|
|
106
|
+
apiFacetId: string;
|
|
107
|
+
pluginInstallationId: string;
|
|
108
|
+
integrationFacetInstallationId: string;
|
|
109
|
+
apiFacetInstallationId: string;
|
|
110
|
+
installationVersion: number;
|
|
111
|
+
instanceId: string;
|
|
112
|
+
instanceKey: string;
|
|
113
|
+
displayName: string;
|
|
114
|
+
instanceVersion: number;
|
|
115
|
+
revisionId: string;
|
|
116
|
+
serverId: string;
|
|
117
|
+
status: "installed";
|
|
118
|
+
};
|
|
119
|
+
export type ApiIntegrationRuntime = {
|
|
120
|
+
capabilityId: string;
|
|
121
|
+
pluginKey: string;
|
|
122
|
+
pluginInstallationId: string;
|
|
123
|
+
installationVersion: number;
|
|
124
|
+
instanceId: string;
|
|
125
|
+
instanceKey: string;
|
|
126
|
+
displayName: string;
|
|
127
|
+
instanceVersion: number;
|
|
128
|
+
serverId: string;
|
|
129
|
+
name: string;
|
|
130
|
+
description: string | null;
|
|
131
|
+
protocol: ApiIntegrationProtocol;
|
|
132
|
+
presetId: string | null;
|
|
133
|
+
baseUrl: string;
|
|
134
|
+
sourceUrl: string | null;
|
|
135
|
+
providerDomain: string;
|
|
136
|
+
authScheme: Record<string, unknown>;
|
|
137
|
+
connectionRef: McpServerConnectionRef | null;
|
|
138
|
+
allowedTools: string[];
|
|
139
|
+
requireApproval: true | string[];
|
|
140
|
+
revision: StoredApiIntegrationRevision;
|
|
141
|
+
};
|
|
142
|
+
export type ApiIntegrationOwner = {
|
|
143
|
+
kind: "direct" | "plugin" | "pack" | "migration";
|
|
144
|
+
id: string;
|
|
145
|
+
removable: boolean;
|
|
146
|
+
};
|
|
147
|
+
export type ApiIntegrationUninstallPreview = {
|
|
148
|
+
capabilityId: string;
|
|
149
|
+
instanceKey: string;
|
|
150
|
+
displayName: string | null;
|
|
151
|
+
installed: boolean;
|
|
152
|
+
installationVersion: number | null;
|
|
153
|
+
instanceVersion: number | null;
|
|
154
|
+
directOwner: ApiIntegrationOwner | null;
|
|
155
|
+
remainingOwners: ApiIntegrationOwner[];
|
|
156
|
+
removesRuntimeIntegration: boolean;
|
|
157
|
+
removesDefinition: boolean;
|
|
158
|
+
};
|
|
159
|
+
export type UninstallApiIntegrationResult = {
|
|
160
|
+
capabilityId: string;
|
|
161
|
+
instanceKey: string;
|
|
162
|
+
status: "not_installed" | "uninstalled" | "retained_by_other_owners";
|
|
163
|
+
remainingOwners: ApiIntegrationOwner[];
|
|
164
|
+
definitionStatus: "retained" | "disabled";
|
|
165
|
+
};
|
|
166
|
+
export declare class ApiIntegrationInstallationVersionConflictError extends Error {
|
|
167
|
+
readonly capabilityId: string;
|
|
168
|
+
readonly expectedVersion: number;
|
|
169
|
+
readonly actualVersion: number;
|
|
170
|
+
readonly name = "ApiIntegrationInstallationVersionConflictError";
|
|
171
|
+
constructor(capabilityId: string, expectedVersion: number, actualVersion: number);
|
|
172
|
+
}
|
|
173
|
+
export declare function installApiIntegration(db: Database, input: InstallApiIntegrationInput): Promise<InstalledApiIntegration>;
|
|
174
|
+
export declare function listInstalledApiIntegrations(db: Database, workspaceId: string, subjectId?: string): Promise<ApiIntegrationRuntime[]>;
|
|
175
|
+
/**
|
|
176
|
+
* Read installed API Integrations from a transaction that already carries the
|
|
177
|
+
* workspace RLS context. This is intentionally separate from the public
|
|
178
|
+
* wrapper so compound Plugin/Pack lifecycle transactions never open a nested
|
|
179
|
+
* transaction or lose their advisory locks.
|
|
180
|
+
*/
|
|
181
|
+
export declare function listInstalledApiIntegrationsInRlsContext(scopedDb: Database, workspaceId: string, subjectId?: string): Promise<ApiIntegrationRuntime[]>;
|
|
182
|
+
export declare function getApiIntegrationUninstallPreview(db: Database, workspaceId: string, subjectId: string, capabilityId: string, instanceKey: string): Promise<ApiIntegrationUninstallPreview>;
|
|
183
|
+
export declare function uninstallApiIntegration(db: Database, input: {
|
|
184
|
+
accountId: string;
|
|
185
|
+
workspaceId: string;
|
|
186
|
+
subjectId: string;
|
|
187
|
+
capabilityId: string;
|
|
188
|
+
instanceKey: string;
|
|
189
|
+
expectedInstallationVersion: number;
|
|
190
|
+
expectedInstanceVersion: number;
|
|
191
|
+
}): Promise<UninstallApiIntegrationResult>;
|
|
192
|
+
export {};
|