@opengeni/db 1.2.1-canary.37222965366001 → 1.3.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/dist/api-integration-approvals.d.ts +13 -0
- package/dist/canonical-human-identities.js +3 -3
- package/dist/capability-reconciliation.js +2 -2
- package/dist/{chunk-LXPFNG4L.js → chunk-3XHC5KC5.js} +2 -2
- package/dist/{chunk-VDPCIFKL.js → chunk-6S5T6FSP.js} +5 -5
- package/dist/{chunk-GDN5TSZP.js → chunk-6UKNJ43T.js} +2 -2
- package/dist/{chunk-YOYILDLY.js → chunk-7QWWTVYH.js} +34 -2
- package/dist/chunk-7QWWTVYH.js.map +1 -0
- package/dist/{chunk-3GAR5UN3.js → chunk-7S3O33NM.js} +2 -2
- package/dist/{chunk-JICUP7ZR.js → chunk-AQMH2ZEH.js} +2 -2
- package/dist/{chunk-UCIMHNII.js → chunk-BID3CNN3.js} +3 -3
- package/dist/{chunk-6EIEGHPK.js → chunk-BRVBLQAL.js} +4 -4
- package/dist/{chunk-FWQNHNOU.js → chunk-DSNEIW5E.js} +56 -3
- package/dist/chunk-DSNEIW5E.js.map +1 -0
- package/dist/{chunk-CONWNUSL.js → chunk-HYBQABBJ.js} +2 -2
- package/dist/{chunk-O2Y5E5M3.js → chunk-LRSIODCQ.js} +87 -2
- package/dist/chunk-LRSIODCQ.js.map +1 -0
- package/dist/{chunk-CYP72JTQ.js → chunk-OEFNTGR3.js} +30 -4
- package/dist/{chunk-CYP72JTQ.js.map → chunk-OEFNTGR3.js.map} +1 -1
- package/dist/{chunk-3TGYFFZR.js → chunk-OI6YZXTU.js} +2 -2
- package/dist/{chunk-QFJNEXFL.js → chunk-PNWWNEDM.js} +2 -2
- package/dist/{chunk-JLVWBIEM.js → chunk-VQX54TK3.js} +3 -3
- package/dist/codemode-approvals.d.ts +48 -0
- package/dist/codemode-operations.d.ts +8 -1
- package/dist/connect-attempts.js +3 -3
- package/dist/connector-action-fingerprint.d.ts +8 -0
- package/dist/connector-action-policy.d.ts +55 -0
- package/dist/database.d.ts +2 -0
- package/dist/editable-artifact-durable-export.js +2 -2
- package/dist/editable-artifacts.js +3 -3
- package/dist/index.d.ts +143 -41
- package/dist/index.js +10675 -9736
- package/dist/index.js.map +1 -1
- package/dist/managed-auth-session-sets.js +3 -3
- package/dist/mcp-operations.js +2 -2
- package/dist/organization-integration-policy.js +3 -3
- package/dist/organization-slack-bots.d.ts +86 -0
- package/dist/persistence-errors.d.ts +24 -0
- package/dist/provision-roles.js +1 -1
- package/dist/retained-provider-commands.js +6 -6
- package/dist/runtime-posture.d.ts +1 -1
- package/dist/schema.d.ts +196 -4
- package/dist/schema.js +1 -1
- package/dist/session-attempt-fence.d.ts +37 -0
- package/dist/session-background-commands.js +4 -4
- package/dist/session-command-output.js +5 -5
- package/dist/session-event-slices.js +3 -3
- package/dist/session-mcp-credential-rotation.js +5 -5
- package/dist/session-tenancy.js +3 -3
- package/dist/session-tool-call-settlement.d.ts +2 -0
- package/dist/tool-action-reviews.d.ts +29 -0
- package/dist/video-generation.js +3 -3
- package/dist/workspace-tool-defaults.js +4 -4
- package/drizzle/0618_tool_approval_defaults.sql +8 -0
- package/drizzle/0619_codemode_approval_continuation.sql +108 -0
- package/drizzle/0620_tool_action_review_details.sql +6 -0
- package/drizzle/0621_legacy_api_tool_preferences.sql +86 -0
- package/drizzle/0622_organization_slack_bot_delivery.sql +185 -0
- package/package.json +7 -7
- package/src/api-integration-approvals.ts +78 -0
- package/src/capability-integrations.ts +327 -19
- package/src/codemode-approvals.ts +321 -0
- package/src/codemode-operations.ts +108 -106
- package/src/connector-action-fingerprint.ts +25 -0
- package/src/connector-action-policy.ts +185 -0
- package/src/database.ts +11 -0
- package/src/index.ts +318 -341
- package/src/organization-slack-bots.ts +185 -0
- package/src/persistence-errors.ts +113 -0
- package/src/provision-roles.ts +10 -0
- package/src/runtime-posture.ts +32 -0
- package/src/schema.ts +56 -3
- package/src/session-attempt-fence.ts +147 -0
- package/src/session-tool-call-settlement.ts +36 -0
- package/src/tool-action-reviews.ts +202 -0
- package/dist/chunk-FWQNHNOU.js.map +0 -1
- package/dist/chunk-O2Y5E5M3.js.map +0 -1
- package/dist/chunk-YOYILDLY.js.map +0 -1
- /package/dist/{chunk-LXPFNG4L.js.map → chunk-3XHC5KC5.js.map} +0 -0
- /package/dist/{chunk-VDPCIFKL.js.map → chunk-6S5T6FSP.js.map} +0 -0
- /package/dist/{chunk-GDN5TSZP.js.map → chunk-6UKNJ43T.js.map} +0 -0
- /package/dist/{chunk-3GAR5UN3.js.map → chunk-7S3O33NM.js.map} +0 -0
- /package/dist/{chunk-JICUP7ZR.js.map → chunk-AQMH2ZEH.js.map} +0 -0
- /package/dist/{chunk-UCIMHNII.js.map → chunk-BID3CNN3.js.map} +0 -0
- /package/dist/{chunk-6EIEGHPK.js.map → chunk-BRVBLQAL.js.map} +0 -0
- /package/dist/{chunk-CONWNUSL.js.map → chunk-HYBQABBJ.js.map} +0 -0
- /package/dist/{chunk-3TGYFFZR.js.map → chunk-OI6YZXTU.js.map} +0 -0
- /package/dist/{chunk-QFJNEXFL.js.map → chunk-PNWWNEDM.js.map} +0 -0
- /package/dist/{chunk-JLVWBIEM.js.map → chunk-VQX54TK3.js.map} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StoredApiIntegrationRevision } from "./capability-integrations.js";
|
|
2
|
+
export declare function apiIntegrationToolEffect(revision: StoredApiIntegrationRevision, toolId: string): string | null;
|
|
3
|
+
export declare function apiIntegrationToolMeaningUnchanged(previous: StoredApiIntegrationRevision | null, next: StoredApiIntegrationRevision, toolId: string): boolean;
|
|
4
|
+
/** Omission preserves a choice only for the same account and executable meaning.
|
|
5
|
+
* An explicit list (including []) replaces the legacy auto-approval selection. */
|
|
6
|
+
export declare function apiIntegrationRequiredApprovals(input: {
|
|
7
|
+
revision: StoredApiIntegrationRevision;
|
|
8
|
+
previousRevision: StoredApiIntegrationRevision | null;
|
|
9
|
+
selectedTools: readonly string[];
|
|
10
|
+
previousConfig: Record<string, unknown> | null;
|
|
11
|
+
sameAuthority: boolean;
|
|
12
|
+
autoApprovedTools?: readonly string[];
|
|
13
|
+
}): string[];
|
|
@@ -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-6UKNJ43T.js";
|
|
15
|
+
import "./chunk-LRSIODCQ.js";
|
|
16
|
+
import "./chunk-DSNEIW5E.js";
|
|
17
17
|
import "./chunk-P7YDM2RI.js";
|
|
18
18
|
import "./chunk-PZ5AY32C.js";
|
|
19
19
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
rawRows,
|
|
3
3
|
withRlsContext
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LRSIODCQ.js";
|
|
5
5
|
|
|
6
6
|
// src/editable-artifacts.ts
|
|
7
7
|
import { createHash } from "crypto";
|
|
@@ -3592,4 +3592,4 @@ export {
|
|
|
3592
3592
|
PostgresEditableArtifactLiveReadStore,
|
|
3593
3593
|
transactionallyAuthorizeEditableArtifactActor
|
|
3594
3594
|
};
|
|
3595
|
-
//# sourceMappingURL=chunk-
|
|
3595
|
+
//# sourceMappingURL=chunk-3XHC5KC5.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
appendSessionCommandOutput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BRVBLQAL.js";
|
|
4
4
|
import {
|
|
5
5
|
lockSessionEventWriteRows
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OEFNTGR3.js";
|
|
7
7
|
import {
|
|
8
8
|
withRlsContext,
|
|
9
9
|
withSessionActivityRlsContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LRSIODCQ.js";
|
|
11
11
|
import {
|
|
12
12
|
sandboxRetainedProcesses
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-DSNEIW5E.js";
|
|
14
14
|
|
|
15
15
|
// src/retained-provider-commands.ts
|
|
16
16
|
import { and, eq, sql } from "drizzle-orm";
|
|
@@ -299,4 +299,4 @@ export {
|
|
|
299
299
|
retainedProcessCancellationRequested,
|
|
300
300
|
requestRetainedProcessDeadlineCancellation
|
|
301
301
|
};
|
|
302
|
-
//# sourceMappingURL=chunk-
|
|
302
|
+
//# sourceMappingURL=chunk-6S5T6FSP.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
nestedPostgresSqlState,
|
|
3
3
|
rawRows
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LRSIODCQ.js";
|
|
5
5
|
|
|
6
6
|
// src/canonical-human-identities.ts
|
|
7
7
|
import { createHash } from "crypto";
|
|
@@ -318,4 +318,4 @@ export {
|
|
|
318
318
|
getCanonicalHumanIdentityProjection,
|
|
319
319
|
applyCanonicalHumanIdentityOperation
|
|
320
320
|
};
|
|
321
|
-
//# sourceMappingURL=chunk-
|
|
321
|
+
//# sourceMappingURL=chunk-6UKNJ43T.js.map
|
|
@@ -161,9 +161,15 @@ var ARTIFACT_PIN_RUNTIME_ROUTINES = [
|
|
|
161
161
|
var ARTIFACT_PINS_TABLE = "artifact_catalog_pins";
|
|
162
162
|
var SCHEDULED_SLACK_BOT_MESSAGE_RUNTIME_ROUTINES = [
|
|
163
163
|
"prepare_scheduled_slack_bot_message(uuid, uuid, uuid, uuid, uuid, integer, text, text, text)",
|
|
164
|
-
"read_scheduled_slack_bot_message(uuid, uuid, uuid, uuid)"
|
|
164
|
+
"read_scheduled_slack_bot_message(uuid, uuid, uuid, uuid)",
|
|
165
|
+
"set_organization_slack_bot_access(uuid, uuid, uuid, text, boolean)",
|
|
166
|
+
"read_organization_slack_bot_access(uuid, uuid, uuid)",
|
|
167
|
+
"list_organization_slack_bots(uuid, uuid)",
|
|
168
|
+
"prepare_organization_slack_bot_message(uuid, uuid, uuid, uuid, uuid, integer, uuid, bigint, text, text, text)",
|
|
169
|
+
"read_organization_slack_bot_message(uuid, uuid, uuid, uuid)"
|
|
165
170
|
];
|
|
166
171
|
var SCHEDULED_SLACK_BOT_MESSAGES_TABLE = "scheduled_slack_bot_messages";
|
|
172
|
+
var ORGANIZATION_SLACK_BOT_ACCESS_TABLE = "organization_slack_bot_access";
|
|
167
173
|
var ORGANIZATION_SIGNUP_USE_CASE_RUNTIME_ROUTINES = [
|
|
168
174
|
"record_organization_signup_use_case(uuid, text, text)"
|
|
169
175
|
];
|
|
@@ -1962,6 +1968,7 @@ async function inspectRuntimeDatabasePosture(db, options) {
|
|
|
1962
1968
|
${SANDBOX_FILE_PUBLICATIONS_TABLE},
|
|
1963
1969
|
${ARTIFACT_PINS_TABLE},
|
|
1964
1970
|
${SCHEDULED_SLACK_BOT_MESSAGES_TABLE},
|
|
1971
|
+
${ORGANIZATION_SLACK_BOT_ACCESS_TABLE},
|
|
1965
1972
|
${ORGANIZATION_SIGNUP_USE_CASES_TABLE},
|
|
1966
1973
|
${SLACK_FILE_UPLOAD_OPERATIONS_TABLE},
|
|
1967
1974
|
'organization_usage_read_capabilities',
|
|
@@ -3593,6 +3600,21 @@ function evaluateRuntimeDatabasePosture(posture, options) {
|
|
|
3593
3600
|
}
|
|
3594
3601
|
}
|
|
3595
3602
|
}
|
|
3603
|
+
const botAccessTables = posture.privateTables.filter(
|
|
3604
|
+
(table) => table.name === ORGANIZATION_SLACK_BOT_ACCESS_TABLE
|
|
3605
|
+
);
|
|
3606
|
+
if (botAccessTables.length !== 1) {
|
|
3607
|
+
if (!options.protectedTables)
|
|
3608
|
+
violations.push("organization Slack bot access relation is missing or ambiguous");
|
|
3609
|
+
} else {
|
|
3610
|
+
const table = botAccessTables[0];
|
|
3611
|
+
if (!table.rlsEnabled || !table.rlsForced || !table.rlsActive || (table.policyCount ?? 0) < 1)
|
|
3612
|
+
violations.push("organization Slack bot access lacks active FORCE-RLS isolation");
|
|
3613
|
+
if (table.select || table.insert || table.update || table.delete || table.truncate || table.references || table.trigger || table.owner === expectedRole)
|
|
3614
|
+
violations.push("runtime role has forbidden direct organization Slack bot access authority");
|
|
3615
|
+
if (table.owner !== scheduledSlackMessageTables[0]?.owner)
|
|
3616
|
+
violations.push("organization Slack bot access owner does not match Slack post authority");
|
|
3617
|
+
}
|
|
3596
3618
|
const signupUseCaseTables = posture.privateTables.filter(
|
|
3597
3619
|
(table) => table.name === ORGANIZATION_SIGNUP_USE_CASES_TABLE
|
|
3598
3620
|
);
|
|
@@ -5890,6 +5912,16 @@ BEGIN
|
|
|
5890
5912
|
REVOKE ALL ON TABLE opengeni_private.organization_signup_use_cases FROM PUBLIC;
|
|
5891
5913
|
REVOKE ALL ON FUNCTION opengeni_private.record_organization_signup_use_case(uuid,text,text) FROM PUBLIC;
|
|
5892
5914
|
END IF;
|
|
5915
|
+
IF to_regclass('opengeni_private.organization_slack_bot_access') IS NOT NULL THEN
|
|
5916
|
+
EXECUTE format('REVOKE ALL ON TABLE opengeni_private.organization_slack_bot_access FROM %I', ${literal(role)});
|
|
5917
|
+
REVOKE ALL ON TABLE opengeni_private.organization_slack_bot_access FROM PUBLIC;
|
|
5918
|
+
REVOKE ALL ON FUNCTION
|
|
5919
|
+
opengeni_private.set_organization_slack_bot_access(uuid,uuid,uuid,text,boolean),
|
|
5920
|
+
opengeni_private.read_organization_slack_bot_access(uuid,uuid,uuid),
|
|
5921
|
+
opengeni_private.list_organization_slack_bots(uuid,uuid),
|
|
5922
|
+
opengeni_private.prepare_organization_slack_bot_message(uuid,uuid,uuid,uuid,uuid,integer,uuid,bigint,text,text,text),
|
|
5923
|
+
opengeni_private.read_organization_slack_bot_message(uuid,uuid,uuid,uuid) FROM PUBLIC;
|
|
5924
|
+
END IF;
|
|
5893
5925
|
FOREACH routine_signature IN ARRAY ARRAY[
|
|
5894
5926
|
'read_sender_connection(uuid,uuid,uuid,text)',
|
|
5895
5927
|
'validate_mcp_account_bindings(jsonb,jsonb)',
|
|
@@ -6140,4 +6172,4 @@ export {
|
|
|
6140
6172
|
runtimeDatabaseReadyCheck,
|
|
6141
6173
|
provisionRoles
|
|
6142
6174
|
};
|
|
6143
|
-
//# sourceMappingURL=chunk-
|
|
6175
|
+
//# sourceMappingURL=chunk-7QWWTVYH.js.map
|