@opengeni/db 3.7.4-canary.0 → 3.8.2-canary.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/canonical-human-identities.js +3 -3
- package/dist/{chunk-DXJ2WY6W.js → chunk-53A2PEHT.js} +241 -31
- package/dist/chunk-53A2PEHT.js.map +1 -0
- package/dist/{chunk-JS3AWDKZ.js → chunk-5S4BQAHX.js} +3 -3
- package/dist/{chunk-JP6IYGYI.js → chunk-CITYUGMW.js} +3 -3
- package/dist/{chunk-6FIVOJ3V.js → chunk-F5YOZEYQ.js} +45 -1
- package/dist/chunk-F5YOZEYQ.js.map +1 -0
- package/dist/{chunk-ZTSJPFDH.js → chunk-HZV7O6JR.js} +2 -2
- package/dist/{chunk-VDXHLVDE.js → chunk-RLQVPOVR.js} +2 -2
- package/dist/{chunk-LHKB62GC.js → chunk-UKOGHUGC.js} +2 -2
- package/dist/{chunk-QL4AHBYD.js → chunk-X6TO5HII.js} +2 -2
- package/dist/{chunk-3ZMN4EXC.js → chunk-Y53WEFYB.js} +2 -2
- package/dist/connection-token-resolver.d.ts +4 -0
- package/dist/editable-artifact-durable-export.js +2 -2
- package/dist/editable-artifacts.js +3 -3
- package/dist/index.d.ts +59 -12
- package/dist/index.js +5259 -4374
- package/dist/index.js.map +1 -1
- package/dist/insights.d.ts +9 -0
- package/dist/managed-auth-session-sets.js +3 -3
- package/dist/new-session-drafts.d.ts +12 -0
- package/dist/organization-membership-lifecycle.d.ts +8 -1
- package/dist/organization-model-providers.d.ts +101 -0
- package/dist/pack-components.d.ts +1 -0
- package/dist/provision-roles.js +1 -1
- package/dist/runtime-posture.d.ts +5 -5
- package/dist/schema.d.ts +645 -0
- package/dist/schema.js +7 -1
- package/dist/session-background-commands.js +3 -3
- package/dist/session-tenancy.js +3 -3
- package/dist/video-generation.js +3 -3
- package/drizzle/0390_organization_model_provider_connections.sql +197 -0
- package/drizzle/0391_sandbox_provider_deadline_interaction_followup.sql +295 -0
- package/drizzle/0392_context_compaction_pending_observability.sql +198 -0
- package/drizzle/0393_workspace_memory_and_learning_defaults.sql +102 -0
- package/drizzle/0394_session_selected_skill_activation.sql +20 -0
- package/drizzle/0395_scheduled_task_unclaimed_occurrence_invalidation.sql +154 -0
- package/drizzle/0396_model_call_equivalent_credit_cost.sql +28 -0
- package/drizzle/0397_sandbox_deadline_rotation_preemption.sql +113 -0
- package/drizzle/0398_organization_workspace_management_entry.sql +206 -0
- package/drizzle/0399_additional_managed_organization_creation.sql +691 -0
- package/package.json +6 -6
- package/src/connection-token-resolver.ts +12 -0
- package/src/index.ts +701 -155
- package/src/insights-model-bundle.ts +54 -5
- package/src/insights.ts +32 -0
- package/src/new-session-drafts.ts +66 -21
- package/src/organization-membership-lifecycle.ts +47 -5
- package/src/organization-model-providers.ts +614 -0
- package/src/pack-components.ts +15 -2
- package/src/provision-roles.ts +2 -0
- package/src/runtime-posture.ts +44 -0
- package/src/schema.ts +250 -30
- package/dist/chunk-6FIVOJ3V.js.map +0 -1
- package/dist/chunk-DXJ2WY6W.js.map +0 -1
- /package/dist/{chunk-JS3AWDKZ.js.map → chunk-5S4BQAHX.js.map} +0 -0
- /package/dist/{chunk-JP6IYGYI.js.map → chunk-CITYUGMW.js.map} +0 -0
- /package/dist/{chunk-ZTSJPFDH.js.map → chunk-HZV7O6JR.js.map} +0 -0
- /package/dist/{chunk-VDXHLVDE.js.map → chunk-RLQVPOVR.js.map} +0 -0
- /package/dist/{chunk-LHKB62GC.js.map → chunk-UKOGHUGC.js.map} +0 -0
- /package/dist/{chunk-QL4AHBYD.js.map → chunk-X6TO5HII.js.map} +0 -0
- /package/dist/{chunk-3ZMN4EXC.js.map → chunk-Y53WEFYB.js.map} +0 -0
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
rawRows,
|
|
3
3
|
withRlsContext,
|
|
4
4
|
withWorkspaceRls
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HZV7O6JR.js";
|
|
6
6
|
import {
|
|
7
7
|
connections,
|
|
8
8
|
creditLedgerEntries,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
workspaceVideoGenerationPolicies,
|
|
15
15
|
workspaceVideoGenerationQuotas,
|
|
16
16
|
workspaces
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-53A2PEHT.js";
|
|
18
18
|
|
|
19
19
|
// src/video-generation.ts
|
|
20
20
|
import {
|
|
@@ -992,4 +992,4 @@ export {
|
|
|
992
992
|
mediaGenerationResultForStoredOperation,
|
|
993
993
|
getVideoGenerationOperationSummary
|
|
994
994
|
};
|
|
995
|
-
//# sourceMappingURL=chunk-
|
|
995
|
+
//# sourceMappingURL=chunk-5S4BQAHX.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withRlsContext
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HZV7O6JR.js";
|
|
4
4
|
import {
|
|
5
5
|
sandboxRetainedProcesses,
|
|
6
6
|
sessionBackgroundCommands,
|
|
7
7
|
sessions
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-53A2PEHT.js";
|
|
9
9
|
|
|
10
10
|
// src/session-background-commands.ts
|
|
11
11
|
import { and, desc, eq, inArray, sql } from "drizzle-orm";
|
|
@@ -513,4 +513,4 @@ export {
|
|
|
513
513
|
settleSessionBackgroundCommandForRetainedProcess,
|
|
514
514
|
settleConnectedMachineSessionBackgroundCommand
|
|
515
515
|
};
|
|
516
|
-
//# sourceMappingURL=chunk-
|
|
516
|
+
//# sourceMappingURL=chunk-CITYUGMW.js.map
|
|
@@ -148,6 +148,7 @@ var KNOWLEDGE_SOURCE_SYNC_LOCK_AUTHORITY_TABLES = [
|
|
|
148
148
|
"knowledge_source_objects"
|
|
149
149
|
];
|
|
150
150
|
var MANAGED_HUMAN_PERSONAL_WORKSPACE_ROUTINE = "ensure_managed_human_personal_workspace(uuid, text, uuid)";
|
|
151
|
+
var ADDITIONAL_ORGANIZATION_CREATION_ROUTINE = "create_additional_managed_organization(text, text, text, text, uuid)";
|
|
151
152
|
var ORGANIZATION_MEMBERSHIP_LIFECYCLE_ROUTINES = [
|
|
152
153
|
"list_self_organization_memberships(text)",
|
|
153
154
|
"list_self_organization_invitations(text)",
|
|
@@ -161,9 +162,11 @@ var ORGANIZATION_MEMBERSHIP_LIFECYCLE_ROUTINES = [
|
|
|
161
162
|
"resolve_workspace_codex_subscription_source(uuid, uuid)",
|
|
162
163
|
"list_organization_workspace_ids(uuid)",
|
|
163
164
|
"organization_workspace_command(jsonb)",
|
|
165
|
+
"authorize_organization_shared_workspace_administration(uuid, uuid, text)",
|
|
164
166
|
"resolve_organization_workspace_removal_subject(uuid, text, uuid)",
|
|
165
167
|
"prepare_organization_workspace_member_removal(jsonb)",
|
|
166
168
|
"record_organization_workspace_member_removal(jsonb, uuid, uuid)",
|
|
169
|
+
ADDITIONAL_ORGANIZATION_CREATION_ROUTINE,
|
|
167
170
|
"create_managed_organization(text, text, text, uuid)",
|
|
168
171
|
"assert_organization_shared_workspace_administrator(uuid, uuid, text)",
|
|
169
172
|
"open_organization_shared_workspace_administration_capability(uuid, uuid, text)",
|
|
@@ -221,6 +224,10 @@ var ORGANIZATION_MEMBERSHIP_LIFECYCLE_AUTHORITY_TABLES = [
|
|
|
221
224
|
"organization_workspace_operation_receipts",
|
|
222
225
|
"self_service_organization_setup_receipts"
|
|
223
226
|
];
|
|
227
|
+
var ADDITIONAL_ORGANIZATION_CREATION_AUTHORITY_TABLES = [
|
|
228
|
+
...ORGANIZATION_MEMBERSHIP_LIFECYCLE_AUTHORITY_TABLES,
|
|
229
|
+
"additional_organization_creation_receipts"
|
|
230
|
+
];
|
|
224
231
|
var PRIVATE_SESSION_CREATE_POLICY_ROUTINE = "get_private_session_create_policy(uuid, uuid, text)";
|
|
225
232
|
var ORGANIZATION_PRIVATE_SESSION_SETTINGS_READ_ROUTINE = "get_organization_private_session_settings(uuid, text)";
|
|
226
233
|
var ORGANIZATION_PRIVATE_SESSION_SETTINGS_UPDATE_ROUTINE = "update_organization_private_session_settings(uuid, text, boolean, bigint, uuid)";
|
|
@@ -535,6 +542,7 @@ var SESSION_TENANCY_ANY_ACTIVATION_ROUTINE = "session_tenancy_any_product_activa
|
|
|
535
542
|
var SESSION_TENANCY_QUIESCENCE_ROUTINE = "assert_session_tenancy_quiescent(uuid, uuid, uuid, boolean)";
|
|
536
543
|
var TENANCY_BACKFILL_ACTIVATION_EVIDENCE_ROUTINE = "check_tenancy_backfill_activation_evidence(uuid)";
|
|
537
544
|
var GREENFIELD_SESSION_TENANCY_ACTIVATION_ROUTINE = "activate_greenfield_session_tenancy_from_setup(text)";
|
|
545
|
+
var ADDITIONAL_ORGANIZATION_SESSION_TENANCY_ACTIVATION_ROUTINE = "activate_session_tenancy_from_additional_organization(uuid)";
|
|
538
546
|
var SESSION_VISIBILITY_LIFECYCLE_CAPABILITY_ROUTINE = "session_visibility_lifecycle_capability_held()";
|
|
539
547
|
var PRIVATE_SESSION_CREATE_CAPABILITY_ROUTINES = [
|
|
540
548
|
"open_private_session_create_capability(uuid, uuid, uuid, text)",
|
|
@@ -628,6 +636,7 @@ var RUNTIME_TARGET_SCHEMA_PUBLIC_POLICY_PREDICATE_ROUTINE_SET = new Set(
|
|
|
628
636
|
RUNTIME_TARGET_SCHEMA_PUBLIC_POLICY_PREDICATE_ROUTINES
|
|
629
637
|
);
|
|
630
638
|
var RUNTIME_TARGET_SCHEMA_FORBIDDEN_ROUTINES = [
|
|
639
|
+
ADDITIONAL_ORGANIZATION_SESSION_TENANCY_ACTIVATION_ROUTINE,
|
|
631
640
|
AUTOMATIC_SESSION_TITLE_QUARANTINE_FENCE_ROUTINE,
|
|
632
641
|
ORGANIZATION_PRIVATE_SESSIONS_ENABLED_ROUTINE,
|
|
633
642
|
GREENFIELD_SESSION_TENANCY_ACTIVATION_ROUTINE,
|
|
@@ -644,6 +653,7 @@ var RUNTIME_TARGET_SCHEMA_INVOKER_ROUTINE_SET = new Set(
|
|
|
644
653
|
RUNTIME_TARGET_SCHEMA_INVOKER_ROUTINES
|
|
645
654
|
);
|
|
646
655
|
var FORCE_RLS_TABLES = [
|
|
656
|
+
"additional_organization_creation_receipts",
|
|
647
657
|
"agent_run_states",
|
|
648
658
|
"api_keys",
|
|
649
659
|
"attached_browser_devices",
|
|
@@ -810,6 +820,9 @@ var FORCE_RLS_TABLES = [
|
|
|
810
820
|
"organization_membership_lifecycle_events",
|
|
811
821
|
"organization_membership_operation_receipts",
|
|
812
822
|
"organization_memberships",
|
|
823
|
+
"organization_model_provider_connection_operations",
|
|
824
|
+
"organization_model_provider_connections",
|
|
825
|
+
"organization_model_provider_custom_models",
|
|
813
826
|
"organization_private_session_setting_events",
|
|
814
827
|
"organization_private_session_settings",
|
|
815
828
|
"organization_profile_events",
|
|
@@ -907,6 +920,7 @@ var FORCE_RLS_TABLES = [
|
|
|
907
920
|
"session_system_update_outbox",
|
|
908
921
|
"session_system_updates",
|
|
909
922
|
"session_tenancy_activations",
|
|
923
|
+
"session_tenancy_additional_organization_activation_evidence",
|
|
910
924
|
"session_tenancy_greenfield_activation_evidence",
|
|
911
925
|
"session_turn_attempts",
|
|
912
926
|
"session_turn_startup_milestones",
|
|
@@ -1081,6 +1095,9 @@ var RUNTIME_FULL_DML_TABLES = [
|
|
|
1081
1095
|
"model_call_facts",
|
|
1082
1096
|
"new_session_drafts",
|
|
1083
1097
|
"organization_codex_rotation_settings",
|
|
1098
|
+
"organization_model_provider_connection_operations",
|
|
1099
|
+
"organization_model_provider_connections",
|
|
1100
|
+
"organization_model_provider_custom_models",
|
|
1084
1101
|
"pack_installation_components",
|
|
1085
1102
|
"pack_installations",
|
|
1086
1103
|
"pr_review_app_registrations",
|
|
@@ -1273,6 +1290,7 @@ var RUNTIME_READ_INSERT_UPDATE_TABLES = [
|
|
|
1273
1290
|
"workspace_interaction_revisions"
|
|
1274
1291
|
];
|
|
1275
1292
|
var PROTECTED_NO_DIRECT_DML_TABLES = [
|
|
1293
|
+
"additional_organization_creation_receipts",
|
|
1276
1294
|
"canonical_human_identities",
|
|
1277
1295
|
"canonical_human_identity_operations",
|
|
1278
1296
|
"canonical_human_identity_subjects",
|
|
@@ -1362,6 +1380,7 @@ var PROTECTED_NO_DIRECT_DML_TABLES = [
|
|
|
1362
1380
|
"session_attempt_personal_document_snapshots",
|
|
1363
1381
|
"session_attempt_personal_resource_admissions",
|
|
1364
1382
|
"session_attempt_personal_resource_snapshots",
|
|
1383
|
+
"session_tenancy_additional_organization_activation_evidence",
|
|
1365
1384
|
"session_tenancy_greenfield_activation_evidence",
|
|
1366
1385
|
"session_variable_set_attachments",
|
|
1367
1386
|
"session_visibility_write_capabilities",
|
|
@@ -2065,6 +2084,29 @@ function evaluateRuntimeDatabasePosture(posture, options) {
|
|
|
2065
2084
|
);
|
|
2066
2085
|
}
|
|
2067
2086
|
}
|
|
2087
|
+
} else if (routine.name === ADDITIONAL_ORGANIZATION_CREATION_ROUTINE) {
|
|
2088
|
+
const missingAuthorityTables = ADDITIONAL_ORGANIZATION_CREATION_AUTHORITY_TABLES.filter(
|
|
2089
|
+
(tableName) => !tableByName.has(tableName)
|
|
2090
|
+
);
|
|
2091
|
+
if (missingAuthorityTables.length > 0) {
|
|
2092
|
+
violations.push(
|
|
2093
|
+
`target-schema runtime capability ${routine.name} authority tables are missing: ${missingAuthorityTables.join(", ")}`
|
|
2094
|
+
);
|
|
2095
|
+
} else {
|
|
2096
|
+
const authorityTables = ADDITIONAL_ORGANIZATION_CREATION_AUTHORITY_TABLES.map(
|
|
2097
|
+
(tableName) => tableByName.get(tableName)
|
|
2098
|
+
);
|
|
2099
|
+
const authorityOwners = new Set(authorityTables.map((table) => table.owner));
|
|
2100
|
+
if (authorityOwners.size !== 1) {
|
|
2101
|
+
violations.push(
|
|
2102
|
+
`target-schema runtime capability ${routine.name} authority table owners do not match: ${authorityTables.map((table) => `${table.name}=${table.owner}`).join(", ")}`
|
|
2103
|
+
);
|
|
2104
|
+
} else if (routine.owner !== authorityTables[0].owner) {
|
|
2105
|
+
violations.push(
|
|
2106
|
+
`target-schema runtime capability ${routine.name} owner ${routine.owner} does not match authority table owner ${authorityTables[0].owner}`
|
|
2107
|
+
);
|
|
2108
|
+
}
|
|
2109
|
+
}
|
|
2068
2110
|
} else if (ORGANIZATION_MEMBERSHIP_LIFECYCLE_ROUTINES.includes(routine.name)) {
|
|
2069
2111
|
const missingAuthorityTables = ORGANIZATION_MEMBERSHIP_LIFECYCLE_AUTHORITY_TABLES.filter(
|
|
2070
2112
|
(tableName) => !tableByName.has(tableName)
|
|
@@ -3330,9 +3372,11 @@ async function grantAppRoleIfSchemaExists(sql2, role, schema) {
|
|
|
3330
3372
|
"resolve_workspace_codex_subscription_source(uuid,uuid)",
|
|
3331
3373
|
"list_organization_workspace_ids(uuid)",
|
|
3332
3374
|
"organization_workspace_command(jsonb)",
|
|
3375
|
+
"authorize_organization_shared_workspace_administration(uuid,uuid,text)",
|
|
3333
3376
|
"resolve_organization_workspace_removal_subject(uuid,text,uuid)",
|
|
3334
3377
|
"prepare_organization_workspace_member_removal(jsonb)",
|
|
3335
3378
|
"record_organization_workspace_member_removal(jsonb,uuid,uuid)",
|
|
3379
|
+
"create_additional_managed_organization(text,text,text,text,uuid)",
|
|
3336
3380
|
"create_managed_organization(text,text,text,uuid)",
|
|
3337
3381
|
"assert_organization_shared_workspace_administrator(uuid,uuid,text)",
|
|
3338
3382
|
"open_organization_shared_workspace_administration_capability(uuid,uuid,text)",
|
|
@@ -5106,4 +5150,4 @@ export {
|
|
|
5106
5150
|
runtimeDatabaseReadyCheck,
|
|
5107
5151
|
provisionRoles
|
|
5108
5152
|
};
|
|
5109
|
-
//# sourceMappingURL=chunk-
|
|
5153
|
+
//# sourceMappingURL=chunk-F5YOZEYQ.js.map
|