@opengeni/db 4.4.0-canary.2 → 5.0.0-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/artifact-catalog.d.ts +41 -0
- package/dist/canonical-human-identities.js +3 -3
- package/dist/{chunk-M4PKBJRS.js → chunk-6T2GGYWE.js} +4 -4
- package/dist/{chunk-2KOLL33E.js → chunk-7HMK3B45.js} +2 -2
- package/dist/{chunk-WFU6PS54.js → chunk-DPONPYJD.js} +2 -2
- package/dist/{chunk-6IJD3XXF.js → chunk-ERKVSPDX.js} +3 -3
- package/dist/{chunk-5UUWZDAV.js → chunk-F73UKJY6.js} +31 -1
- package/dist/{chunk-5UUWZDAV.js.map → chunk-F73UKJY6.js.map} +1 -1
- package/dist/{chunk-6V3HDEMR.js → chunk-HQDVI2DB.js} +2 -2
- package/dist/{chunk-UOXWVP3T.js → chunk-MWMXWHJD.js} +2 -2
- package/dist/{chunk-CHBLBEU6.js → chunk-T6BWIGWJ.js} +2 -2
- package/dist/{chunk-XJP7KJ6U.js → chunk-T6YLHJLS.js} +47 -3
- package/dist/chunk-T6YLHJLS.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 +1 -0
- package/dist/index.js +1893 -1812
- 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/provision-roles.js +1 -1
- package/dist/retained-provider-commands.js +2 -2
- package/dist/runtime-posture.d.ts +2 -0
- package/dist/schema.d.ts +93 -0
- package/dist/schema.js +3 -1
- package/dist/session-background-commands.js +4 -4
- package/dist/session-command-output.js +4 -4
- package/dist/session-event-slices.js +2 -2
- package/dist/session-mcp-credential-rotation.js +4 -4
- package/dist/session-tenancy.js +3 -3
- package/dist/video-generation.js +3 -3
- package/dist/workspace-tool-defaults.js +4 -4
- package/drizzle/0465_sandbox_file_publications.sql +142 -0
- package/drizzle/0466_agent_instruction_activation_preservation.sql +190 -0
- package/drizzle/0467_host_resolver_full_organization_keys.sql +34 -0
- package/package.json +6 -6
- package/src/artifact-catalog.ts +121 -0
- package/src/host-mcp-resolvers.ts +1 -1
- package/src/index.ts +1 -0
- package/src/provision-roles.ts +6 -0
- package/src/runtime-posture.ts +54 -1
- package/src/schema.ts +30 -0
- package/dist/chunk-XJP7KJ6U.js.map +0 -1
- /package/dist/{chunk-M4PKBJRS.js.map → chunk-6T2GGYWE.js.map} +0 -0
- /package/dist/{chunk-2KOLL33E.js.map → chunk-7HMK3B45.js.map} +0 -0
- /package/dist/{chunk-WFU6PS54.js.map → chunk-DPONPYJD.js.map} +0 -0
- /package/dist/{chunk-6IJD3XXF.js.map → chunk-ERKVSPDX.js.map} +0 -0
- /package/dist/{chunk-6V3HDEMR.js.map → chunk-HQDVI2DB.js.map} +0 -0
- /package/dist/{chunk-UOXWVP3T.js.map → chunk-MWMXWHJD.js.map} +0 -0
- /package/dist/{chunk-CHBLBEU6.js.map → chunk-T6BWIGWJ.js.map} +0 -0
|
@@ -20,9 +20,9 @@ import {
|
|
|
20
20
|
reapManagedAuthIsolatedSessions,
|
|
21
21
|
releaseManagedAuthActorMutationLease,
|
|
22
22
|
validateManagedAuthActorMutationLease
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-MWMXWHJD.js";
|
|
24
|
+
import "./chunk-DPONPYJD.js";
|
|
25
|
+
import "./chunk-F73UKJY6.js";
|
|
26
26
|
import "./chunk-S2TZ3F4L.js";
|
|
27
27
|
import "./chunk-PZ5AY32C.js";
|
|
28
28
|
export {
|
package/dist/mcp-operations.js
CHANGED
package/dist/provision-roles.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Database, RlsStrategy } from "./database.js";
|
|
2
|
+
export declare const SANDBOX_FILE_PUBLICATION_RUNTIME_ROUTINES: readonly ["record_sandbox_file_publication(uuid, uuid, uuid, uuid)", "list_sandbox_file_publications(uuid, uuid, jsonb)"];
|
|
2
3
|
export declare const WORK_CLAIM_CAPABILITY_ROUTINES: readonly ["upsert_session_work_claim_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, integer, text, text, text, text, text, text, text)", "release_session_work_claim_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, uuid, integer, text)"];
|
|
3
4
|
export declare const RUNTIME_TARGET_SCHEMA_CAPABILITY_ROUTINES: readonly ["knowledge_index_claim(text, integer, integer)", "knowledge_index_work(uuid, uuid, uuid, jsonb)", "knowledge_entry_apply(uuid, uuid, jsonb, jsonb)", "knowledge_entry_confirm_legacy(uuid, uuid, jsonb, jsonb)", "agent_instruction_apply(uuid, uuid, jsonb, jsonb)", "knowledge_entry_read(uuid, uuid, jsonb, jsonb)", "knowledge_entry_prepare_file(uuid, uuid, jsonb, jsonb)", "knowledge_document_prepare(uuid, uuid, uuid, jsonb)", "agent_learning_manage(uuid, uuid, jsonb, jsonb)", "mcp_operation_command(jsonb, text, jsonb)", "skill_apply_lifecycle(uuid, uuid, jsonb, jsonb)", "company_brain_inspect_context_receipts(uuid, uuid, text, uuid, timestamp with time zone, uuid, integer)", "company_brain_context_get_or_create_selection(uuid, uuid, uuid, uuid, uuid, integer)", "propose_company_profile_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, text, text, text)", "propose_company_profile_for_attempt_v2(uuid, uuid, uuid, uuid, uuid, integer, uuid, uuid, text, text, text)", "confirm_company_profile_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, uuid, uuid)", "get_company_profile_agent_policy(uuid, uuid, text)", "update_company_profile_agent_policy(uuid, uuid, text, text, bigint, uuid)", "undo_governed_learning_activation(uuid, uuid, uuid, uuid)", "inspect_governed_learning_decisions(uuid, uuid, text, integer)", "inspect_governed_learning_activations(uuid, uuid, text, integer)", "inspect_governed_learning_activation_undos(uuid, uuid, text, integer)", "fork_session_content(uuid, uuid, uuid, text, uuid, text, boolean, text, text, integer)", "fork_session_content(uuid, uuid, uuid, text, uuid, text, boolean, text, text, integer, uuid)", "fork_session_content(uuid, uuid, uuid, text, uuid, text, text, text, integer)", "replay_applied_session_fork(uuid, uuid, uuid, text, uuid, text, boolean, text, text, integer)", "session_tenancy_product_activated(uuid, integer)", "session_tenancy_any_product_activation()", "xai_subscription_authority_live(uuid, uuid, text, uuid, text, uuid, uuid, bigint)", "create_xai_subscription_credential(uuid, uuid, text, text, text, text, text, text, text, timestamp with time zone)", "disconnect_xai_subscription_credential(uuid, uuid, text, uuid, jsonb)", "google_drive_document_citation(uuid, uuid, text, uuid, uuid)", "google_drive_file_authorized(uuid, uuid, text, uuid)", "knowledge_source_sync_lock_authority(uuid, uuid, uuid)", "ensure_managed_human_personal_workspace(uuid, text, uuid)", "get_external_identity_link_reference(uuid, uuid, text)", "get_external_identity_link_inventory_references(uuid, uuid[])", "ensure_external_identity(uuid, text, text)", "lookup_external_identity(uuid, text, text, text)", "prepare_external_workspace_membership_operation(jsonb)", "record_external_workspace_membership_operation(jsonb, jsonb)", "list_self_organization_memberships(text)", "list_self_organization_invitations(text)", "list_self_organization_invitations(text, uuid, integer)", "get_self_organization_invitation(text, uuid)", "list_organization_invitations(uuid, text, uuid, integer)", "list_organization_members(uuid, text)", "list_organization_administration_members(uuid, text)", "get_organization_administration_overview(uuid, text)", "get_workspace_kind(uuid, uuid)", "resolve_workspace_codex_subscription_source(uuid, uuid)", "list_organization_workspace_ids(uuid)", "list_organization_codex_workspace_ids(uuid)", "organization_workspace_command(jsonb)", "authorize_organization_shared_workspace_administration(uuid, uuid, text)", "resolve_organization_workspace_removal_subject(uuid, text, uuid)", "prepare_organization_workspace_member_removal(jsonb)", "record_organization_workspace_member_removal(jsonb, uuid, uuid)", "create_additional_managed_organization(text, text, text, text, uuid)", "create_managed_organization(text, text, text, uuid)", "assert_organization_shared_workspace_administrator(uuid, uuid, text)", "open_organization_shared_workspace_administration_capability(uuid, uuid, text)", "close_organization_shared_workspace_administration_capability(uuid)", "create_organization_shared_workspace(uuid, text, text, text, text, uuid)", "upsert_organization_shared_workspace_member(uuid, uuid, text, uuid, text, text, jsonb, boolean)", "update_organization_name(uuid, text, text, timestamp with time zone, uuid)", "create_organization_invitation_v2(jsonb)", "bind_pending_organization_invitations_for_verified_email(text, text)", "has_pending_organization_invitation_for_subject(text)", "accept_organization_invitation_v2(jsonb)", "complete_self_service_organization_setup(jsonb)", "ensure_organization_user_setup_intent(jsonb)", "claim_organization_user_setup_delivery(jsonb)", "claim_organization_user_setup_delivery_v2(jsonb)", "prepare_organization_user_setup_delivery(jsonb)", "prepare_organization_user_setup_delivery_v2(jsonb)", "settle_organization_user_setup_delivery(jsonb)", "preview_organization_user_setup(text)", "get_organization_invitation_for_administration(uuid, text, uuid)", "preflight_organization_user_setup(text)", "complete_organization_user_setup(jsonb)", "organization_membership_command(jsonb)", "prepare_organization_membership_protocol_settlements(jsonb)", "assert_active_managed_human_organization_membership(uuid, text)", "resolve_workspace_writer_grant_identity(uuid, text)", "prepare_workspace_membership_removal_settlements(jsonb)", "workspace_membership_removal_command(jsonb)", "get_organization_retention_policy(uuid, text)", "preview_organization_retention_deletions(uuid, integer)", "claim_organization_retention_deletion(uuid, uuid, uuid[])", "list_organization_retention_deletion_objects(uuid, uuid, uuid, text, integer)", "record_organization_retention_object_deleted(uuid, uuid, uuid, text, text, text, text)", "fail_organization_retention_deletion(uuid, uuid, uuid, text)", "finalize_organization_retention_deletion(uuid, uuid, uuid, text)", "complete_organization_retention_deletion(uuid, uuid, uuid, text)", ...string[], "open_private_session_create_capability(uuid, uuid, uuid, text)", "open_private_child_session_create_capability(uuid, uuid, uuid, uuid, uuid, uuid, integer)", "close_private_session_create_capability(uuid)", "resolve_session_attempt_personal_resources(uuid, uuid, uuid)", "accept_turn_personal_resource_attachment(uuid, uuid, uuid, uuid, text, integer, boolean, integer)", "list_self_user_resource_authorities(uuid, uuid, text, uuid, integer)", "issue_self_user_resource_grant(uuid, uuid, uuid, text, text, text, uuid, integer, boolean)", "issue_self_local_connection_use_grant(uuid, uuid, uuid, text, boolean)", "revoke_self_user_resource_grant(uuid, uuid, uuid)", "authorize_session_attempt_personal_resource_reads(uuid, uuid, uuid)", "preference_registry_create_knowledge_proposal_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, text, uuid, text, text, text, text, integer, text, jsonb, timestamp with time zone, text)", "create_scoped_variable_set(uuid, uuid, text, text, text, jsonb, boolean)", "list_scoped_variable_sets(uuid, uuid, uuid, text, text)", "count_scoped_variable_sets(uuid, uuid, text)", "mutate_scoped_variable_set(uuid, uuid, uuid, text, text, boolean, text, boolean, text, text, boolean)", "read_scoped_variable_set_secret(uuid, uuid, uuid, text, text, text, uuid, uuid, uuid, integer)", "materialize_scoped_variable_set_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid)", "materialize_scoped_variable_set_for_session(uuid, uuid, uuid, uuid)", "connection_authority_convergence_audit_capability_active(uuid)", "resolve_personal_connection_authority_selection(uuid, uuid, text, uuid, jsonb)", "resolve_accepted_connection_use(uuid, uuid, uuid, uuid, uuid, integer, uuid, text, text, uuid, text, text, text, text)", "resolve_connection_use_authority(uuid, uuid, uuid, jsonb)", "inspect_organization_connection_authority_convergence(uuid, integer, uuid)", "get_self_personal_github_repository_selection(uuid, uuid, text, uuid)", "mutate_self_personal_github_repository_selection(uuid, uuid, text, uuid, bigint, bigint, text, jsonb, boolean)", "create_personal_document_authority(uuid, uuid, uuid)", "resolve_document_original_file(uuid, uuid, text, uuid)", "resolve_session_attempt_personal_document_reads(uuid, uuid, uuid, uuid)", "list_document_authority_reclassifications(uuid, uuid, text, uuid, integer, timestamp with time zone, uuid)", "reclassify_document_authority(jsonb)", "run_document_default_collection_backfill(jsonb)", "list_document_default_collection_backfill_runs(jsonb)", "get_document_default_collection_backfill_audit(jsonb)", "list_organization_document_authority_reclassifications(jsonb)", "create_scoped_rig(uuid, uuid, text, text, text, text, jsonb, boolean)", "list_scoped_rigs(uuid, uuid, uuid, text, text)", "count_scoped_rigs(uuid, uuid, text)", "mutate_scoped_rig(uuid, uuid, uuid, text, text, boolean, text, boolean, boolean)", "finalize_scoped_enrollment(uuid, uuid, text, text, boolean, boolean, text, text, text, boolean)", "list_scoped_enrollments(uuid, uuid, uuid, text)", "get_scoped_sandbox(uuid, uuid, uuid)", "authorize_scoped_sandbox_attach(uuid, uuid, uuid)", "materialize_scoped_rig_version_for_attempt(uuid, uuid, uuid, uuid, uuid, integer)", "authorize_session_attempt_personal_machine(uuid, uuid, uuid, uuid, uuid, integer, uuid)", "assert_session_attempt_personal_machine(uuid, uuid, uuid, uuid, uuid, integer, uuid, boolean)", "list_scoped_machine_dependent_sessions(uuid, uuid, uuid)", "detach_scoped_machine_dependent_sessions(uuid, uuid, uuid)", "freeze_scheduled_task_personal_resources(uuid, uuid, uuid, bigint)", "clone_scheduled_task_personal_resource_authority(uuid, uuid, uuid, bigint, bigint)", "refresh_scheduled_task_personal_resources_clone_connections(uuid, uuid, uuid, bigint, bigint)", "create_scheduled_agent_run_with_admission(uuid, uuid, uuid, uuid, bigint, text, text, text, timestamp with time zone, timestamp with time zone, jsonb)", "materialize_scheduled_task_reusable_session_from_run(uuid, uuid, uuid, uuid, uuid, bigint, text)", "scheduled_task_run_personal_resource_authority(uuid, uuid, uuid)", "scheduled_task_run_connection_authority_subject(uuid, uuid, uuid)", "scheduled_task_personal_resource_authority_subject(uuid, uuid, uuid, bigint)", "record_scheduled_task_revision_authority(uuid, uuid, uuid, bigint)", "clone_scheduled_task_revision_authority(uuid, uuid, uuid, bigint, bigint)", "scheduled_task_revision_authority_subject(uuid, uuid, uuid, bigint)", "scheduled_task_revision_authority_snapshot(uuid, uuid, uuid, bigint)", "validate_scheduled_agent_run_live_authority(uuid, uuid, uuid)", "scheduled_scoped_rig_version_metadata(uuid, uuid, text, uuid, uuid)", "scheduled_variable_set_expected_generation_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid)", "bind_scheduled_task_run_session(uuid, uuid, uuid, uuid)", "transition_scheduled_agent_run(uuid, uuid, uuid, uuid, uuid, text, text)", "ensure_canonical_human_identity(text, text)", "validate_canonical_human_session(text, text, boolean)", "get_canonical_human_identity_projection(text)", "apply_canonical_human_identity_operation(uuid, text, bigint, text, uuid, text, text, text)", "get_canonical_human_exact_login_binding(text, text)", "managed_auth_session_set_authority_state(text)", "managed_auth_session_set_snapshot(text, text, boolean, boolean, boolean)", "managed_auth_session_set_bootstrap(text, text, text, text, uuid, text, bigint, bigint)", "managed_auth_session_set_begin_transaction(text, text, text, uuid, text, bigint, uuid, bigint, text, text, uuid, uuid, text, timestamp with time zone)", "managed_auth_session_set_complete_transaction(text, text, uuid, text, bigint, bigint, uuid, text, text, text)", "managed_auth_session_set_mutate(text, text, uuid, text, bigint, bigint, text, uuid, uuid, uuid, text, text)", "managed_auth_actor_mutation_fence(text, bigint, uuid)", "managed_auth_actor_mutation_lease_acquire(text, bigint, uuid, integer)", "managed_auth_actor_mutation_lease_release(text, uuid)", "managed_auth_actor_mutation_lease_validate(text, bigint, uuid)", "managed_auth_adopted_session_snapshot(text)", "managed_auth_isolated_session_reap(integer)", "managed_auth_expired_session_set_reap(integer)", "managed_auth_session_set_operation_receipt(text, uuid, text, text)", "get_organization_recovery_overview(uuid, text, jsonb, text, text)", "organization_recovery_command(jsonb)", "create_task_note_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, text, text, integer)", "archive_task_note_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, uuid, integer, text)", "list_task_notes_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, boolean, integer)", "replace_task_note_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, uuid, uuid, uuid, integer, text, text, integer, text)", "resolve_task_note_knowledge_promotion_source(uuid, uuid, uuid, uuid, uuid, integer, uuid, integer, text, text, text)", "upsert_session_work_claim_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, integer, text, text, text, text, text, text, text)", "release_session_work_claim_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, uuid, integer, text)", "session_private_actor_visible(uuid, uuid, uuid, text)", "session_reference_visible(uuid, uuid, uuid)", "session_visibility_lifecycle_capability_held()", "transition_session_visibility(uuid, uuid, uuid, text, text, integer, text, text, integer)", "xai_subscription_pool_visible(uuid, uuid, text, text, uuid)", "resolve_xai_authority_pool(uuid, uuid, text, jsonb)", "revalidate_xai_subscription_authority(uuid, text, uuid, jsonb)", "xai_provider_account_authority_snapshot_v1_valid(jsonb)"];
|
|
4
5
|
/**
|
|
@@ -103,6 +104,7 @@ export type RuntimeRoutinePosture = {
|
|
|
103
104
|
execute: boolean;
|
|
104
105
|
publicExecute?: boolean;
|
|
105
106
|
securityDefiner: boolean;
|
|
107
|
+
configuration?: string[] | null;
|
|
106
108
|
};
|
|
107
109
|
export type RuntimeTargetRoutinePosture = RuntimeRoutinePosture & {
|
|
108
110
|
publicExecute: boolean;
|
package/dist/schema.d.ts
CHANGED
|
@@ -23527,6 +23527,99 @@ export declare const files: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
23527
23527
|
};
|
|
23528
23528
|
dialect: 'pg';
|
|
23529
23529
|
}>;
|
|
23530
|
+
/** Immutable publication receipt; content and ownership remain in files. */
|
|
23531
|
+
export declare const sandboxFilePublications: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
23532
|
+
name: "sandbox_file_publications";
|
|
23533
|
+
schema: "opengeni_private";
|
|
23534
|
+
columns: {
|
|
23535
|
+
accountId: import("drizzle-orm/pg-core").PgColumn<{
|
|
23536
|
+
name: "account_id";
|
|
23537
|
+
tableName: "sandbox_file_publications";
|
|
23538
|
+
dataType: "string";
|
|
23539
|
+
columnType: "PgUUID";
|
|
23540
|
+
data: string;
|
|
23541
|
+
driverParam: string;
|
|
23542
|
+
notNull: true;
|
|
23543
|
+
hasDefault: false;
|
|
23544
|
+
isPrimaryKey: false;
|
|
23545
|
+
isAutoincrement: false;
|
|
23546
|
+
hasRuntimeDefault: false;
|
|
23547
|
+
enumValues: undefined;
|
|
23548
|
+
baseColumn: never;
|
|
23549
|
+
identity: undefined;
|
|
23550
|
+
generated: undefined;
|
|
23551
|
+
}, {}, {}>;
|
|
23552
|
+
workspaceId: import("drizzle-orm/pg-core").PgColumn<{
|
|
23553
|
+
name: "workspace_id";
|
|
23554
|
+
tableName: "sandbox_file_publications";
|
|
23555
|
+
dataType: "string";
|
|
23556
|
+
columnType: "PgUUID";
|
|
23557
|
+
data: string;
|
|
23558
|
+
driverParam: string;
|
|
23559
|
+
notNull: true;
|
|
23560
|
+
hasDefault: false;
|
|
23561
|
+
isPrimaryKey: false;
|
|
23562
|
+
isAutoincrement: false;
|
|
23563
|
+
hasRuntimeDefault: false;
|
|
23564
|
+
enumValues: undefined;
|
|
23565
|
+
baseColumn: never;
|
|
23566
|
+
identity: undefined;
|
|
23567
|
+
generated: undefined;
|
|
23568
|
+
}, {}, {}>;
|
|
23569
|
+
fileId: import("drizzle-orm/pg-core").PgColumn<{
|
|
23570
|
+
name: "file_id";
|
|
23571
|
+
tableName: "sandbox_file_publications";
|
|
23572
|
+
dataType: "string";
|
|
23573
|
+
columnType: "PgUUID";
|
|
23574
|
+
data: string;
|
|
23575
|
+
driverParam: string;
|
|
23576
|
+
notNull: true;
|
|
23577
|
+
hasDefault: false;
|
|
23578
|
+
isPrimaryKey: false;
|
|
23579
|
+
isAutoincrement: false;
|
|
23580
|
+
hasRuntimeDefault: false;
|
|
23581
|
+
enumValues: undefined;
|
|
23582
|
+
baseColumn: never;
|
|
23583
|
+
identity: undefined;
|
|
23584
|
+
generated: undefined;
|
|
23585
|
+
}, {}, {}>;
|
|
23586
|
+
sourceSessionId: import("drizzle-orm/pg-core").PgColumn<{
|
|
23587
|
+
name: "source_session_id";
|
|
23588
|
+
tableName: "sandbox_file_publications";
|
|
23589
|
+
dataType: "string";
|
|
23590
|
+
columnType: "PgUUID";
|
|
23591
|
+
data: string;
|
|
23592
|
+
driverParam: string;
|
|
23593
|
+
notNull: false;
|
|
23594
|
+
hasDefault: false;
|
|
23595
|
+
isPrimaryKey: false;
|
|
23596
|
+
isAutoincrement: false;
|
|
23597
|
+
hasRuntimeDefault: false;
|
|
23598
|
+
enumValues: undefined;
|
|
23599
|
+
baseColumn: never;
|
|
23600
|
+
identity: undefined;
|
|
23601
|
+
generated: undefined;
|
|
23602
|
+
}, {}, {}>;
|
|
23603
|
+
publishedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
23604
|
+
name: "published_at";
|
|
23605
|
+
tableName: "sandbox_file_publications";
|
|
23606
|
+
dataType: "date";
|
|
23607
|
+
columnType: "PgTimestamp";
|
|
23608
|
+
data: Date;
|
|
23609
|
+
driverParam: string;
|
|
23610
|
+
notNull: true;
|
|
23611
|
+
hasDefault: true;
|
|
23612
|
+
isPrimaryKey: false;
|
|
23613
|
+
isAutoincrement: false;
|
|
23614
|
+
hasRuntimeDefault: false;
|
|
23615
|
+
enumValues: undefined;
|
|
23616
|
+
baseColumn: never;
|
|
23617
|
+
identity: undefined;
|
|
23618
|
+
generated: undefined;
|
|
23619
|
+
}, {}, {}>;
|
|
23620
|
+
};
|
|
23621
|
+
dialect: 'pg';
|
|
23622
|
+
}>;
|
|
23530
23623
|
export declare const fileUploads: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
23531
23624
|
name: "file_uploads";
|
|
23532
23625
|
schema: undefined;
|
package/dist/schema.js
CHANGED
|
@@ -236,6 +236,7 @@ import {
|
|
|
236
236
|
rigs,
|
|
237
237
|
sandboxCheckpointArtifactStateValues,
|
|
238
238
|
sandboxCheckpointArtifacts,
|
|
239
|
+
sandboxFilePublications,
|
|
239
240
|
sandboxKindValues,
|
|
240
241
|
sandboxLeaseHolders,
|
|
241
242
|
sandboxLeaseLivenessValues,
|
|
@@ -372,7 +373,7 @@ import {
|
|
|
372
373
|
xaiRotationSettings,
|
|
373
374
|
xaiSessionAccountPins,
|
|
374
375
|
xaiSubscriptionCredentials
|
|
375
|
-
} from "./chunk-
|
|
376
|
+
} from "./chunk-F73UKJY6.js";
|
|
376
377
|
import "./chunk-S2TZ3F4L.js";
|
|
377
378
|
import "./chunk-PZ5AY32C.js";
|
|
378
379
|
export {
|
|
@@ -613,6 +614,7 @@ export {
|
|
|
613
614
|
rigs,
|
|
614
615
|
sandboxCheckpointArtifactStateValues,
|
|
615
616
|
sandboxCheckpointArtifacts,
|
|
617
|
+
sandboxFilePublications,
|
|
616
618
|
sandboxKindValues,
|
|
617
619
|
sandboxLeaseHolders,
|
|
618
620
|
sandboxLeaseLivenessValues,
|
|
@@ -22,10 +22,10 @@ import {
|
|
|
22
22
|
settleClaimedConnectedMachineBackgroundCommandWithMutation,
|
|
23
23
|
settleConnectedMachineSessionBackgroundCommandWithMutation,
|
|
24
24
|
settleSessionBackgroundCommandForRetainedProcessInTransaction
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-6T2GGYWE.js";
|
|
26
|
+
import "./chunk-ERKVSPDX.js";
|
|
27
|
+
import "./chunk-DPONPYJD.js";
|
|
28
|
+
import "./chunk-F73UKJY6.js";
|
|
29
29
|
import "./chunk-S2TZ3F4L.js";
|
|
30
30
|
import "./chunk-PZ5AY32C.js";
|
|
31
31
|
export {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lockSessionEventWriteRows
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-6T2GGYWE.js";
|
|
4
|
+
import "./chunk-ERKVSPDX.js";
|
|
5
5
|
import {
|
|
6
6
|
withSessionActivityRlsContext
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DPONPYJD.js";
|
|
8
8
|
import {
|
|
9
9
|
sandboxRetainedProcesses,
|
|
10
10
|
sessionBackgroundCommands,
|
|
11
11
|
sessionEvents,
|
|
12
12
|
sessions
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-F73UKJY6.js";
|
|
14
14
|
import {
|
|
15
15
|
fromPostgresLosslessJson,
|
|
16
16
|
withLosslessContentWriteVersion
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
rawRows,
|
|
3
3
|
withWorkspaceRls
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DPONPYJD.js";
|
|
5
5
|
import {
|
|
6
6
|
sessionEvents,
|
|
7
7
|
sessionTurns
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-F73UKJY6.js";
|
|
9
9
|
import {
|
|
10
10
|
LOSSLESS_JSON_STRING_PREFIX,
|
|
11
11
|
fromPostgresLosslessJson
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lockSessionEventWriteRows
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-6T2GGYWE.js";
|
|
4
|
+
import "./chunk-ERKVSPDX.js";
|
|
5
5
|
import {
|
|
6
6
|
rawRows,
|
|
7
7
|
setSubjectRlsContext,
|
|
8
8
|
withRlsContext
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DPONPYJD.js";
|
|
10
10
|
import {
|
|
11
11
|
apiKeys,
|
|
12
12
|
sessionCommandReceipts,
|
|
13
13
|
sessionMcpServers,
|
|
14
14
|
sessions
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-F73UKJY6.js";
|
|
16
16
|
import "./chunk-S2TZ3F4L.js";
|
|
17
17
|
import "./chunk-PZ5AY32C.js";
|
|
18
18
|
|
package/dist/session-tenancy.js
CHANGED
|
@@ -14,9 +14,9 @@ import {
|
|
|
14
14
|
replayAppliedSessionFork,
|
|
15
15
|
sessionTenancyProductActivated,
|
|
16
16
|
transitionSessionVisibility
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-T6BWIGWJ.js";
|
|
18
|
+
import "./chunk-DPONPYJD.js";
|
|
19
|
+
import "./chunk-F73UKJY6.js";
|
|
20
20
|
import "./chunk-S2TZ3F4L.js";
|
|
21
21
|
import "./chunk-PZ5AY32C.js";
|
|
22
22
|
export {
|
package/dist/video-generation.js
CHANGED
|
@@ -29,9 +29,9 @@ import {
|
|
|
29
29
|
settleVideoGenerationFailure,
|
|
30
30
|
settleVideoGenerationReady,
|
|
31
31
|
updateWorkspaceVideoGenerationPolicy
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
32
|
+
} from "./chunk-ERKVSPDX.js";
|
|
33
|
+
import "./chunk-DPONPYJD.js";
|
|
34
|
+
import "./chunk-F73UKJY6.js";
|
|
35
35
|
import "./chunk-S2TZ3F4L.js";
|
|
36
36
|
import "./chunk-PZ5AY32C.js";
|
|
37
37
|
export {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lockWorkspaceInferenceControl
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-6T2GGYWE.js";
|
|
4
|
+
import "./chunk-ERKVSPDX.js";
|
|
5
5
|
import {
|
|
6
6
|
withWorkspaceRls
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-DPONPYJD.js";
|
|
8
|
+
import "./chunk-F73UKJY6.js";
|
|
9
9
|
import "./chunk-S2TZ3F4L.js";
|
|
10
10
|
import "./chunk-PZ5AY32C.js";
|
|
11
11
|
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
-- deployment-mode: rolling
|
|
2
|
+
-- Explicit output publication metadata only. Never infer publications from
|
|
3
|
+
-- uploaded inputs, object-key conventions, temporary evidence or old history.
|
|
4
|
+
SET LOCAL lock_timeout = '5s';
|
|
5
|
+
SET LOCAL statement_timeout = '5min';
|
|
6
|
+
|
|
7
|
+
CREATE TABLE opengeni_private.sandbox_file_publications (
|
|
8
|
+
account_id uuid NOT NULL,
|
|
9
|
+
workspace_id uuid NOT NULL,
|
|
10
|
+
file_id uuid NOT NULL,
|
|
11
|
+
source_session_id uuid,
|
|
12
|
+
published_at timestamptz NOT NULL DEFAULT now(),
|
|
13
|
+
CONSTRAINT sandbox_file_publications_pk PRIMARY KEY (account_id, workspace_id, file_id),
|
|
14
|
+
CONSTRAINT sandbox_file_publications_file_fk FOREIGN KEY (account_id, workspace_id, file_id)
|
|
15
|
+
REFERENCES files(account_id, workspace_id, id) ON DELETE CASCADE,
|
|
16
|
+
CONSTRAINT sandbox_file_publications_session_fk FOREIGN KEY (workspace_id, source_session_id)
|
|
17
|
+
REFERENCES sessions(workspace_id, id) ON DELETE SET NULL (source_session_id)
|
|
18
|
+
);
|
|
19
|
+
CREATE INDEX sandbox_file_publications_session_idx
|
|
20
|
+
ON opengeni_private.sandbox_file_publications(workspace_id, source_session_id, published_at, file_id);
|
|
21
|
+
ALTER TABLE opengeni_private.sandbox_file_publications ENABLE ROW LEVEL SECURITY;
|
|
22
|
+
ALTER TABLE opengeni_private.sandbox_file_publications FORCE ROW LEVEL SECURITY;
|
|
23
|
+
CREATE POLICY workspace_isolation ON opengeni_private.sandbox_file_publications
|
|
24
|
+
USING (opengeni_private.workspace_rls_visible(account_id, workspace_id))
|
|
25
|
+
WITH CHECK (opengeni_private.workspace_rls_visible(account_id, workspace_id));
|
|
26
|
+
-- A publication never grants access to its file or bypasses personal-file RLS.
|
|
27
|
+
CREATE POLICY visible_file ON opengeni_private.sandbox_file_publications AS RESTRICTIVE
|
|
28
|
+
USING (EXISTS (SELECT 1 FROM files f WHERE f.account_id = sandbox_file_publications.account_id
|
|
29
|
+
AND f.workspace_id = sandbox_file_publications.workspace_id AND f.id = file_id AND f.status = 'ready'))
|
|
30
|
+
WITH CHECK (EXISTS (SELECT 1 FROM files f WHERE f.account_id = sandbox_file_publications.account_id
|
|
31
|
+
AND f.workspace_id = sandbox_file_publications.workspace_id AND f.id = file_id AND f.status = 'ready'));
|
|
32
|
+
|
|
33
|
+
-- Keep new storage out of the public-schema exact table inventory so older
|
|
34
|
+
-- binaries remain ready. Runtime has EXECUTE only, never table DML. Both
|
|
35
|
+
-- capabilities bind caller tenant GUCs and retain explicit file-owner checks
|
|
36
|
+
-- even when a deployment migrated with a superuser owner.
|
|
37
|
+
CREATE FUNCTION opengeni_private.record_sandbox_file_publication(
|
|
38
|
+
p_account uuid, p_workspace uuid, p_file uuid, p_session uuid
|
|
39
|
+
) RETURNS void LANGUAGE plpgsql SECURITY DEFINER SET search_path = pg_catalog, pg_temp AS $body$
|
|
40
|
+
BEGIN
|
|
41
|
+
IF p_account IS NULL OR p_workspace IS NULL OR p_file IS NULL OR p_session IS NULL
|
|
42
|
+
OR p_account IS DISTINCT FROM opengeni_private.current_account_id()
|
|
43
|
+
OR p_workspace IS DISTINCT FROM opengeni_private.current_workspace_id()
|
|
44
|
+
THEN RAISE EXCEPTION 'publication scope mismatch' USING ERRCODE = '42501'; END IF;
|
|
45
|
+
PERFORM 1 FROM files f WHERE f.account_id=p_account AND f.workspace_id=p_workspace AND f.id=p_file AND f.status='ready'
|
|
46
|
+
AND (f.private_owner_subject_ids IS NULL OR nullif(current_setting('opengeni.private_file_owner',true),'')=ANY(f.private_owner_subject_ids));
|
|
47
|
+
IF NOT FOUND THEN RAISE EXCEPTION 'publication file unavailable' USING ERRCODE = '42501'; END IF;
|
|
48
|
+
PERFORM 1 FROM sessions s WHERE s.account_id=p_account AND s.workspace_id=p_workspace AND s.id=p_session;
|
|
49
|
+
IF NOT FOUND THEN RAISE EXCEPTION 'publication session unavailable' USING ERRCODE = '42501'; END IF;
|
|
50
|
+
INSERT INTO opengeni_private.sandbox_file_publications(account_id,workspace_id,file_id,source_session_id)
|
|
51
|
+
VALUES(p_account,p_workspace,p_file,p_session) ON CONFLICT DO NOTHING;
|
|
52
|
+
IF EXISTS(SELECT 1 FROM opengeni_private.sandbox_file_publications p
|
|
53
|
+
WHERE p.account_id=p_account AND p.workspace_id=p_workspace AND p.file_id=p_file
|
|
54
|
+
AND p.source_session_id IS DISTINCT FROM p_session)
|
|
55
|
+
THEN RAISE EXCEPTION 'publication identity conflict' USING ERRCODE = '23505'; END IF;
|
|
56
|
+
END $body$;
|
|
57
|
+
|
|
58
|
+
CREATE FUNCTION opengeni_private.list_sandbox_file_publications(
|
|
59
|
+
p_account uuid, p_workspace uuid, p_query jsonb
|
|
60
|
+
) RETURNS TABLE(file_id uuid, title text, kind text, source_session_id uuid, published_at timestamptz)
|
|
61
|
+
LANGUAGE plpgsql STABLE SECURITY DEFINER SET search_path = pg_catalog, pg_temp AS $body$
|
|
62
|
+
DECLARE
|
|
63
|
+
v_limit integer := (p_query->>'limit')::integer;
|
|
64
|
+
v_sort text := p_query->>'sort';
|
|
65
|
+
v_after text := p_query#>>'{after,key}';
|
|
66
|
+
BEGIN
|
|
67
|
+
IF p_account IS NULL OR p_workspace IS NULL
|
|
68
|
+
OR p_account IS DISTINCT FROM opengeni_private.current_account_id()
|
|
69
|
+
OR p_workspace IS DISTINCT FROM opengeni_private.current_workspace_id()
|
|
70
|
+
OR v_limit IS NULL OR v_limit NOT BETWEEN 1 AND 201
|
|
71
|
+
OR v_sort IS NULL OR v_sort NOT IN ('updated','newest','title')
|
|
72
|
+
OR jsonb_typeof(p_query) IS DISTINCT FROM 'object'
|
|
73
|
+
OR jsonb_typeof(p_query->'kinds') IS DISTINCT FROM 'array'
|
|
74
|
+
OR jsonb_array_length(p_query->'kinds') NOT BETWEEN 1 AND 2
|
|
75
|
+
OR length(coalesce(p_query->>'q',''))>200
|
|
76
|
+
THEN RAISE EXCEPTION 'publication list scope mismatch' USING ERRCODE = '42501'; END IF;
|
|
77
|
+
RETURN QUERY WITH candidates AS (
|
|
78
|
+
SELECT p.file_id, f.filename AS title,
|
|
79
|
+
CASE WHEN f.content_type IN ('image/png','image/jpeg','image/gif','image/webp','image/avif','image/svg+xml')
|
|
80
|
+
THEN 'image' ELSE 'file' END AS kind,
|
|
81
|
+
p.source_session_id, p.published_at,
|
|
82
|
+
CASE WHEN v_sort='title' THEN lower(f.filename)
|
|
83
|
+
ELSE to_char(p.published_at AT TIME ZONE 'UTC','YYYY-MM-DD"T"HH24:MI:SS.US') END AS sort_key
|
|
84
|
+
FROM opengeni_private.sandbox_file_publications p JOIN files f
|
|
85
|
+
ON f.account_id=p.account_id AND f.workspace_id=p.workspace_id AND f.id=p.file_id
|
|
86
|
+
WHERE p.account_id=p_account AND p.workspace_id=p_workspace AND f.status='ready'
|
|
87
|
+
AND (f.private_owner_subject_ids IS NULL OR nullif(current_setting('opengeni.private_file_owner',true),'')=ANY(f.private_owner_subject_ids))
|
|
88
|
+
AND (p_query->>'sourceSessionId' IS NULL OR p.source_session_id=(p_query->>'sourceSessionId')::uuid)
|
|
89
|
+
AND p.published_at<=(p_query->>'snapshotAt')::timestamptz
|
|
90
|
+
AND strpos(lower(f.filename),lower(coalesce(p_query->>'q','')))>0
|
|
91
|
+
) SELECT c.file_id,c.title,c.kind,c.source_session_id,c.published_at FROM candidates c
|
|
92
|
+
WHERE (p_query->'kinds') ? c.kind AND (v_after IS NULL OR
|
|
93
|
+
(v_sort='title' AND c.sort_key COLLATE "C">v_after COLLATE "C") OR
|
|
94
|
+
(v_sort<>'title' AND c.sort_key COLLATE "C"<v_after COLLATE "C") OR
|
|
95
|
+
(c.sort_key=v_after AND (c.kind COLLATE "C",c.file_id::text COLLATE "C")>
|
|
96
|
+
((p_query#>>'{after,kind}') COLLATE "C",(p_query#>>'{after,id}') COLLATE "C")))
|
|
97
|
+
ORDER BY CASE WHEN v_sort='title' THEN c.sort_key END COLLATE "C" ASC,
|
|
98
|
+
CASE WHEN v_sort<>'title' THEN c.sort_key END COLLATE "C" DESC,c.kind COLLATE "C",c.file_id::text COLLATE "C"
|
|
99
|
+
LIMIT v_limit;
|
|
100
|
+
END $body$;
|
|
101
|
+
REVOKE ALL ON FUNCTION opengeni_private.record_sandbox_file_publication(uuid,uuid,uuid,uuid) FROM PUBLIC;
|
|
102
|
+
REVOKE ALL ON FUNCTION opengeni_private.list_sandbox_file_publications(uuid,uuid,jsonb) FROM PUBLIC;
|
|
103
|
+
|
|
104
|
+
-- Preserve existing runtime role recipients; provisionRoles owns future roles.
|
|
105
|
+
DO $grants$
|
|
106
|
+
DECLARE target_schema text := current_schema(); recipient record;
|
|
107
|
+
BEGIN
|
|
108
|
+
-- Explicit pg_temp LAST is load-bearing: omitting it lets PostgreSQL search
|
|
109
|
+
-- caller-controlled temporary relations ahead of the captured data schema.
|
|
110
|
+
-- Pin builtins first and the exact migration target before granting EXECUTE.
|
|
111
|
+
EXECUTE format('ALTER FUNCTION opengeni_private.record_sandbox_file_publication(uuid,uuid,uuid,uuid) SET search_path = pg_catalog, %I, pg_temp', target_schema);
|
|
112
|
+
EXECUTE format('ALTER FUNCTION opengeni_private.list_sandbox_file_publications(uuid,uuid,jsonb) SET search_path = pg_catalog, %I, pg_temp', target_schema);
|
|
113
|
+
FOR recipient IN
|
|
114
|
+
SELECT DISTINCT acl.grantee, r.rolname FROM pg_class c
|
|
115
|
+
JOIN pg_namespace n ON n.oid = c.relnamespace
|
|
116
|
+
CROSS JOIN LATERAL aclexplode(c.relacl) acl
|
|
117
|
+
LEFT JOIN pg_roles r ON r.oid = acl.grantee
|
|
118
|
+
WHERE n.nspname = 'opengeni_private' AND c.relname = 'sandbox_file_publications' AND acl.grantee <> c.relowner
|
|
119
|
+
LOOP
|
|
120
|
+
EXECUTE format('REVOKE ALL ON TABLE opengeni_private.sandbox_file_publications FROM %s',
|
|
121
|
+
CASE WHEN recipient.grantee = 0 THEN 'PUBLIC' ELSE quote_ident(recipient.rolname) END);
|
|
122
|
+
END LOOP;
|
|
123
|
+
FOR recipient IN
|
|
124
|
+
SELECT DISTINCT acl.grantee, r.rolname, p.oid::regprocedure AS signature
|
|
125
|
+
FROM pg_proc p JOIN pg_namespace n ON n.oid=p.pronamespace
|
|
126
|
+
CROSS JOIN LATERAL aclexplode(p.proacl) acl LEFT JOIN pg_roles r ON r.oid=acl.grantee
|
|
127
|
+
WHERE n.nspname='opengeni_private'
|
|
128
|
+
AND p.proname IN ('record_sandbox_file_publication','list_sandbox_file_publications')
|
|
129
|
+
AND acl.grantee<>p.proowner
|
|
130
|
+
LOOP
|
|
131
|
+
EXECUTE format('REVOKE ALL ON FUNCTION %s FROM %s', recipient.signature,
|
|
132
|
+
CASE WHEN recipient.grantee=0 THEN 'PUBLIC' ELSE quote_ident(recipient.rolname) END);
|
|
133
|
+
END LOOP;
|
|
134
|
+
FOR recipient IN
|
|
135
|
+
SELECT DISTINCT r.rolname FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace
|
|
136
|
+
CROSS JOIN LATERAL aclexplode(c.relacl) acl JOIN pg_roles r ON r.oid = acl.grantee
|
|
137
|
+
WHERE n.nspname = target_schema AND c.relname = 'files' AND acl.privilege_type = 'INSERT'
|
|
138
|
+
AND acl.grantee <> c.relowner
|
|
139
|
+
LOOP
|
|
140
|
+
EXECUTE format('GRANT EXECUTE ON FUNCTION opengeni_private.record_sandbox_file_publication(uuid,uuid,uuid,uuid), opengeni_private.list_sandbox_file_publications(uuid,uuid,jsonb) TO %I', recipient.rolname);
|
|
141
|
+
END LOOP;
|
|
142
|
+
END $grants$;
|