@opengeni/db 5.0.0-canary.1 → 5.0.1-canary.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/canonical-human-identities.js +3 -3
- package/dist/capability-integrations.d.ts +22 -1
- package/dist/capability-reconciliation.d.ts +5 -0
- package/dist/capability-reconciliation.js +21 -0
- package/dist/capability-reconciliation.js.map +1 -0
- package/dist/{chunk-HQDVI2DB.js → chunk-26BQCKRE.js} +2 -2
- package/dist/{chunk-MWMXWHJD.js → chunk-3LMHK5AL.js} +2 -2
- package/dist/{chunk-6T2GGYWE.js → chunk-4UJCXBR2.js} +4 -5800
- package/dist/chunk-4UJCXBR2.js.map +1 -0
- package/dist/{chunk-F73UKJY6.js → chunk-BGMK3XV6.js} +50 -1
- package/dist/chunk-BGMK3XV6.js.map +1 -0
- package/dist/chunk-DLYLKTD6.js +156 -0
- package/dist/chunk-DLYLKTD6.js.map +1 -0
- package/dist/{chunk-7HMK3B45.js → chunk-E4X5HQ5P.js} +2 -2
- package/dist/chunk-JIISMOTH.js +5801 -0
- package/dist/chunk-JIISMOTH.js.map +1 -0
- package/dist/{chunk-T6BWIGWJ.js → chunk-LQDNDCQ5.js} +2 -2
- package/dist/{chunk-DPONPYJD.js → chunk-TDXX22IZ.js} +2 -2
- package/dist/chunk-TW43DRG3.js +219 -0
- package/dist/chunk-TW43DRG3.js.map +1 -0
- package/dist/{chunk-T6YLHJLS.js → chunk-VRS7M7FP.js} +50 -1
- package/dist/chunk-VRS7M7FP.js.map +1 -0
- package/dist/{chunk-ERKVSPDX.js → chunk-XTQWEJLJ.js} +3 -3
- package/dist/connect-attempts.d.ts +15 -0
- package/dist/connect-attempts.js +25 -0
- package/dist/connect-attempts.js.map +1 -0
- package/dist/editable-artifact-durable-export.js +2 -2
- package/dist/editable-artifacts.js +3 -3
- package/dist/index.d.ts +37 -4
- package/dist/index.js +2307 -1966
- package/dist/index.js.map +1 -1
- package/dist/insights-usage-bundle.d.ts +3 -0
- package/dist/integration-facets.d.ts +17 -0
- package/dist/knowledge-entries-schema.d.ts +2 -0
- package/dist/knowledge-entries.d.ts +1 -0
- package/dist/knowledge-indexing.d.ts +1 -0
- package/dist/managed-auth-session-sets.js +3 -3
- package/dist/mcp-operations.js +2 -2
- package/dist/organization-integration-policy.d.ts +51 -0
- package/dist/organization-integration-policy.js +18 -0
- package/dist/organization-integration-policy.js.map +1 -0
- package/dist/organization-usage.d.ts +20 -0
- package/dist/provision-roles.js +1 -1
- package/dist/retained-provider-commands.js +2 -2
- package/dist/runtime-posture.d.ts +2 -2
- package/dist/schema.d.ts +185 -12
- package/dist/schema.js +5 -1
- package/dist/session-attempt-writers.d.ts +4 -0
- package/dist/session-background-commands.js +5 -4
- package/dist/session-command-output.js +5 -4
- package/dist/session-command-output.js.map +1 -1
- package/dist/session-event-slices.js +2 -2
- package/dist/session-mcp-credential-rotation.js +5 -4
- package/dist/session-mcp-credential-rotation.js.map +1 -1
- package/dist/session-tenancy.js +3 -3
- package/dist/video-generation.js +3 -3
- package/dist/workspace-tool-defaults.js +5 -4
- package/dist/workspace-tool-defaults.js.map +1 -1
- package/drizzle/0468_knowledge_relationship_projection.sql +30 -0
- package/drizzle/0469_knowledge_source_discovery.sql +85 -0
- package/drizzle/0470_organization_integration_policy.sql +151 -0
- package/drizzle/0471_usage_events_account_recent_index.sql +4 -0
- package/drizzle/0472_usage_events_workspace_recent_index.sql +4 -0
- package/drizzle/0473_organization_usage_analytical_capability.sql +237 -0
- package/package.json +18 -6
- package/src/capability-integrations.ts +299 -8
- package/src/capability-reconciliation.ts +19 -0
- package/src/connect-attempts.ts +49 -18
- package/src/index.ts +491 -172
- package/src/insights-model-bundle.ts +19 -7
- package/src/insights-usage-bundle.ts +15 -18
- package/src/integration-facets.ts +71 -1
- package/src/knowledge-entries.ts +8 -1
- package/src/organization-integration-policy.ts +235 -0
- package/src/organization-usage.ts +83 -0
- package/src/plugin-packages.ts +11 -0
- package/src/provision-roles.ts +5 -0
- package/src/runtime-posture.ts +67 -0
- package/src/schema.ts +51 -0
- package/src/session-attempt-writers.ts +48 -0
- package/dist/chunk-6T2GGYWE.js.map +0 -1
- package/dist/chunk-F73UKJY6.js.map +0 -1
- package/dist/chunk-T6YLHJLS.js.map +0 -1
- /package/dist/{chunk-HQDVI2DB.js.map → chunk-26BQCKRE.js.map} +0 -0
- /package/dist/{chunk-MWMXWHJD.js.map → chunk-3LMHK5AL.js.map} +0 -0
- /package/dist/{chunk-7HMK3B45.js.map → chunk-E4X5HQ5P.js.map} +0 -0
- /package/dist/{chunk-T6BWIGWJ.js.map → chunk-LQDNDCQ5.js.map} +0 -0
- /package/dist/{chunk-DPONPYJD.js.map → chunk-TDXX22IZ.js.map} +0 -0
- /package/dist/{chunk-ERKVSPDX.js.map → chunk-XTQWEJLJ.js.map} +0 -0
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
getCanonicalHumanIdentityProjection,
|
|
12
12
|
synchronizeCanonicalHumanLoginBindings,
|
|
13
13
|
validateCanonicalHumanSession
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-E4X5HQ5P.js";
|
|
15
|
+
import "./chunk-TDXX22IZ.js";
|
|
16
|
+
import "./chunk-BGMK3XV6.js";
|
|
17
17
|
import "./chunk-S2TZ3F4L.js";
|
|
18
18
|
import "./chunk-PZ5AY32C.js";
|
|
19
19
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type McpServerConnectionRef } from "@opengeni/contracts";
|
|
1
|
+
import { type IntegrationSource, type McpServerConnectionRef } from "@opengeni/contracts";
|
|
2
2
|
import { type Database } from "./database.js";
|
|
3
3
|
export type ApiIntegrationProtocol = "openapi" | "graphql";
|
|
4
4
|
export type ApiIntegrationToolSafety = "read" | "write" | "destructive";
|
|
@@ -197,6 +197,27 @@ export declare function listInstalledApiIntegrationServerIdsForDelegations(db: D
|
|
|
197
197
|
*/
|
|
198
198
|
export declare function listInstalledApiIntegrationsInRlsContext(scopedDb: Database, workspaceId: string, subjectId?: string): Promise<ApiIntegrationRuntime[]>;
|
|
199
199
|
export declare function getApiIntegrationUninstallPreview(db: Database, workspaceId: string, subjectId: string, capabilityId: string, instanceKey: string): Promise<ApiIntegrationUninstallPreview>;
|
|
200
|
+
/** No discovery or new authority: recover only an exact, currently visible and
|
|
201
|
+
* directly owned installed source. The installer must still lock and recheck
|
|
202
|
+
* the snapshot before committing; this read is not installation admission.
|
|
203
|
+
*/
|
|
204
|
+
export declare function getApiIntegrationReconciliationSnapshot(db: Database, input: {
|
|
205
|
+
accountId: string;
|
|
206
|
+
workspaceId: string;
|
|
207
|
+
subjectId: string;
|
|
208
|
+
source: IntegrationSource;
|
|
209
|
+
connectionId?: string;
|
|
210
|
+
instanceKey?: string;
|
|
211
|
+
expectedRevisionId: string;
|
|
212
|
+
expectedContentSha256: string;
|
|
213
|
+
allowedTools?: string[];
|
|
214
|
+
}): Promise<{
|
|
215
|
+
runtime: ApiIntegrationRuntime;
|
|
216
|
+
baseServerId: string;
|
|
217
|
+
name: string;
|
|
218
|
+
provider: string | null;
|
|
219
|
+
requiredScopes: string[];
|
|
220
|
+
} | null>;
|
|
200
221
|
export declare function uninstallApiIntegration(db: Database, input: {
|
|
201
222
|
accountId: string;
|
|
202
223
|
workspaceId: string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Database } from "./database.js";
|
|
2
|
+
/** Retain the installation row through the caller's outer transaction. This is
|
|
3
|
+
* a no-write reconciliation read; it never activates or alters an installation.
|
|
4
|
+
* Acquisition callers must already hold the organization policy fence. */
|
|
5
|
+
export declare function withLockedCapabilityInstallation<T>(db: Database, workspaceId: string, capabilityId: string, read: (tx: Database) => Promise<T>): Promise<T>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
withWorkspaceRls
|
|
3
|
+
} from "./chunk-TDXX22IZ.js";
|
|
4
|
+
import "./chunk-BGMK3XV6.js";
|
|
5
|
+
import "./chunk-S2TZ3F4L.js";
|
|
6
|
+
import "./chunk-PZ5AY32C.js";
|
|
7
|
+
|
|
8
|
+
// src/capability-reconciliation.ts
|
|
9
|
+
import { sql } from "drizzle-orm";
|
|
10
|
+
async function withLockedCapabilityInstallation(db, workspaceId, capabilityId, read) {
|
|
11
|
+
return withWorkspaceRls(db, workspaceId, async (tx) => {
|
|
12
|
+
await tx.execute(sql`select id from capability_installations
|
|
13
|
+
where workspace_id = ${workspaceId}::uuid and capability_id = ${capabilityId}
|
|
14
|
+
for update`);
|
|
15
|
+
return read(tx);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
withLockedCapabilityInstallation
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=capability-reconciliation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/capability-reconciliation.ts"],"sourcesContent":["import { sql } from \"drizzle-orm\";\nimport { withWorkspaceRls, type Database } from \"./database\";\n\n/** Retain the installation row through the caller's outer transaction. This is\n * a no-write reconciliation read; it never activates or alters an installation.\n * Acquisition callers must already hold the organization policy fence. */\nexport async function withLockedCapabilityInstallation<T>(\n db: Database,\n workspaceId: string,\n capabilityId: string,\n read: (tx: Database) => Promise<T>,\n) {\n return withWorkspaceRls(db, workspaceId, async (tx) => {\n await tx.execute(sql`select id from capability_installations\n where workspace_id = ${workspaceId}::uuid and capability_id = ${capabilityId}\n for update`);\n return read(tx);\n });\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,WAAW;AAMpB,eAAsB,iCACpB,IACA,aACA,cACA,MACA;AACA,SAAO,iBAAiB,IAAI,aAAa,OAAO,OAAO;AACrD,UAAM,GAAG,QAAQ;AAAA,6BACQ,WAAW,8BAA8B,YAAY;AAAA,iBACjE;AACb,WAAO,KAAK,EAAE;AAAA,EAChB,CAAC;AACH;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
rawRows,
|
|
3
3
|
withRlsContext
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TDXX22IZ.js";
|
|
5
5
|
|
|
6
6
|
// src/editable-artifacts.ts
|
|
7
7
|
import { createHash } from "crypto";
|
|
@@ -3540,4 +3540,4 @@ export {
|
|
|
3540
3540
|
PostgresEditableArtifactStore,
|
|
3541
3541
|
PostgresEditableArtifactLiveReadStore
|
|
3542
3542
|
};
|
|
3543
|
-
//# sourceMappingURL=chunk-
|
|
3543
|
+
//# sourceMappingURL=chunk-26BQCKRE.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
nestedPostgresSqlState,
|
|
3
3
|
rawRows
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TDXX22IZ.js";
|
|
5
5
|
|
|
6
6
|
// src/managed-auth-session-sets.ts
|
|
7
7
|
import {
|
|
@@ -296,4 +296,4 @@ export {
|
|
|
296
296
|
reapManagedAuthIsolatedSessions,
|
|
297
297
|
reapExpiredManagedAuthSessionSets
|
|
298
298
|
};
|
|
299
|
-
//# sourceMappingURL=chunk-
|
|
299
|
+
//# sourceMappingURL=chunk-3LMHK5AL.js.map
|