@opengeni/db 0.23.0 → 0.27.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/{chunk-3UCHDMKG.js → chunk-EX7CDSGH.js} +196 -2
- package/dist/chunk-EX7CDSGH.js.map +1 -0
- package/dist/{chunk-L6ADMZHE.js → chunk-IHPCI4GV.js} +5 -1
- package/dist/chunk-IHPCI4GV.js.map +1 -0
- package/dist/connection-token-resolver.d.ts +24 -2
- package/dist/index.d.ts +68 -2
- package/dist/index.js +1457 -338
- package/dist/index.js.map +1 -1
- package/dist/preference-registry.d.ts +14 -0
- package/dist/provision-roles.js +1 -1
- package/dist/runtime-posture.d.ts +3 -3
- package/dist/schema.d.ts +262 -4
- package/dist/schema.js +5 -1
- package/dist/session-realtime-mirror.d.ts +22 -1
- package/dist/workspace-instruction-policies-schema.d.ts +449 -0
- package/dist/workspace-instruction-policies.d.ts +88 -8
- package/drizzle/0165_document_authority_foundation.sql +259 -0
- package/drizzle/0166_connection_disconnect_idempotency.sql +49 -0
- package/drizzle/0167_document_index_replay_authority.sql +61 -0
- package/drizzle/0168_workspace_instruction_policy_operation_receipts.sql +44 -0
- package/drizzle/0169_workspace_instruction_policy_onboarding_proposals.sql +202 -0
- package/package.json +3 -3
- package/src/connection-token-resolver.ts +79 -16
- package/src/index.ts +419 -23
- package/src/preference-registry.ts +103 -0
- package/src/runtime-posture.ts +4 -0
- package/src/schema.ts +86 -0
- package/src/session-control.ts +48 -1
- package/src/session-queue-commands.ts +45 -11
- package/src/session-realtime-mirror.ts +117 -1
- package/src/session-realtime.ts +49 -1
- package/src/workspace-instruction-policies-schema.ts +116 -0
- package/src/workspace-instruction-policies.ts +819 -25
- package/dist/chunk-3UCHDMKG.js.map +0 -1
- package/dist/chunk-L6ADMZHE.js.map +0 -1
|
@@ -126,6 +126,20 @@ export declare function listPreferenceRegistry(db: Database, input: {
|
|
|
126
126
|
updatedAt: string;
|
|
127
127
|
}[];
|
|
128
128
|
}>;
|
|
129
|
+
export type PreferenceRegistryGovernanceIdentity = Pick<PreferenceRegistryDescriptor, "id" | "revisionId" | "contentHash" | "activeVersion" | "scope">;
|
|
130
|
+
export type CurrentPreferenceRegistryGovernanceMetadata = {
|
|
131
|
+
descriptors: PreferenceRegistryGovernanceIdentity[];
|
|
132
|
+
truncated: boolean;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Read the current active descriptor identities for one exact authenticated
|
|
136
|
+
* subject. Full preference values and even descriptor display text stay inside
|
|
137
|
+
* this DB boundary; Workspace State receives only stable revision metadata.
|
|
138
|
+
*/
|
|
139
|
+
export declare function getCurrentPreferenceRegistryGovernanceMetadata(db: Database, input: {
|
|
140
|
+
workspaceId: string;
|
|
141
|
+
subjectId: string;
|
|
142
|
+
}): Promise<CurrentPreferenceRegistryGovernanceMetadata>;
|
|
129
143
|
export declare function listPreferenceRegistryForAttempt(db: Database, input: PreferenceRegistryAttemptClaims & PreferenceRegistryListInput): Promise<{
|
|
130
144
|
preferences: {
|
|
131
145
|
id: string;
|
package/dist/provision-roles.js
CHANGED
|
@@ -4,7 +4,7 @@ import type { Database, RlsStrategy } from "./index";
|
|
|
4
4
|
* FORCE-RLS table is an architectural change: update this list in the same
|
|
5
5
|
* commit as the migration so startup cannot silently accept an unreviewed gap.
|
|
6
6
|
*/
|
|
7
|
-
export declare const FORCE_RLS_TABLES: readonly ["agent_run_states", "api_keys", "audit_events", "billing_customers", "capability_catalog_items", "capability_installations", "codex_capacity_waiters", "codex_credential_leases", "codex_reset_redemption_attempts", "codex_rotation_settings", "codex_subscription_credentials", "composer_drafts", "connections", "connector_action_policies", "connector_action_requests", "credit_ledger_entries", "device_enrollment_requests", "document_bases", "document_chunks", "documents", "enrollments", "file_uploads", "files", "github_installation_repositories", "github_installations", "host_export_config", "host_export_consumers", "host_export_cursor_state", "host_export_dead_letters", "host_export_outbox", "import_batches", "integration_oauth_state_nonces", "knowledge_change_proposals", "knowledge_claim_evidence", "knowledge_claim_relations", "knowledge_claim_reviews", "knowledge_claims", "knowledge_document_versions", "knowledge_entities", "knowledge_entity_aliases", "knowledge_facts", "knowledge_lifecycle_events", "knowledge_memories", "knowledge_memory_lifecycle_events", "knowledge_memory_relationships", "knowledge_operation_receipts", "knowledge_providers", "knowledge_source_acl_versions", "knowledge_source_objects", "knowledge_sources", "knowledge_sync_runs", "machine_metrics_latest", "machine_metrics_series", "model_call_facts", "new_session_drafts", "pack_installations", "preference_registry_events", "preference_registry_preferences", "preference_registry_revisions", "preference_registry_snapshots", "rig_changes", "rig_versions", "rigs", "sandbox_checkpoint_artifacts", "sandbox_lease_holders", "sandbox_leases", "sandbox_pty_sessions", "sandbox_retained_processes", "sandbox_session_envelopes", "sandbox_workspace_mutation_admissions", "sandboxes", "scheduled_task_runs", "scheduled_tasks", "session_attempt_interruptions", "session_command_receipts", "session_events", "session_goals", "session_history_items", "session_human_input_requests", "session_list_snapshots", "session_mcp_servers", "session_pending_tool_calls", "session_pins", "session_realtime_connections", "session_realtime_context_projections", "session_realtime_entries", "session_realtime_modes", "session_recordings", "session_spawn_denials", "session_stream_acknowledgments", "session_system_update_outbox", "session_system_updates", "session_turn_attempts", "session_turns", "session_workflow_wake_outbox", "sessions", "slack_bot_delete_operations", "slack_bot_post_operations", "slack_bot_user_links", "slack_interaction_inbox", "slack_interaction_progress_deliveries", "slack_interactions", "social_connections", "social_posts", "usage_events", "workspace_artifact_events", "workspace_artifact_versions", "workspace_artifacts", "workspace_captures", "workspace_control_events", "workspace_inference_controls", "workspace_instruction_policy_activation_events", "workspace_instruction_policy_heads", "workspace_instruction_policy_revisions", "workspace_instruction_policy_snapshots", "workspace_model_policies", "workspace_packs", "workspace_session_activity_revisions", "workspace_variable_set_variables", "workspace_variable_sets"];
|
|
7
|
+
export declare const FORCE_RLS_TABLES: readonly ["agent_run_states", "api_keys", "audit_events", "billing_customers", "capability_catalog_items", "capability_installations", "codex_capacity_waiters", "codex_credential_leases", "codex_reset_redemption_attempts", "codex_rotation_settings", "codex_subscription_credentials", "composer_drafts", "connection_disconnect_operations", "connections", "connector_action_policies", "connector_action_requests", "credit_ledger_entries", "device_enrollment_requests", "document_bases", "document_chunks", "documents", "enrollments", "file_uploads", "files", "github_installation_repositories", "github_installations", "host_export_config", "host_export_consumers", "host_export_cursor_state", "host_export_dead_letters", "host_export_outbox", "import_batches", "integration_oauth_state_nonces", "knowledge_change_proposals", "knowledge_claim_evidence", "knowledge_claim_relations", "knowledge_claim_reviews", "knowledge_claims", "knowledge_document_versions", "knowledge_entities", "knowledge_entity_aliases", "knowledge_facts", "knowledge_lifecycle_events", "knowledge_memories", "knowledge_memory_lifecycle_events", "knowledge_memory_relationships", "knowledge_operation_receipts", "knowledge_providers", "knowledge_source_acl_versions", "knowledge_source_objects", "knowledge_sources", "knowledge_sync_runs", "machine_metrics_latest", "machine_metrics_series", "model_call_facts", "new_session_drafts", "pack_installations", "preference_registry_events", "preference_registry_preferences", "preference_registry_revisions", "preference_registry_snapshots", "rig_changes", "rig_versions", "rigs", "sandbox_checkpoint_artifacts", "sandbox_lease_holders", "sandbox_leases", "sandbox_pty_sessions", "sandbox_retained_processes", "sandbox_session_envelopes", "sandbox_workspace_mutation_admissions", "sandboxes", "scheduled_task_runs", "scheduled_tasks", "session_attempt_interruptions", "session_command_receipts", "session_events", "session_goals", "session_history_items", "session_human_input_requests", "session_list_snapshots", "session_mcp_servers", "session_pending_tool_calls", "session_pins", "session_realtime_connections", "session_realtime_context_projections", "session_realtime_entries", "session_realtime_modes", "session_recordings", "session_spawn_denials", "session_stream_acknowledgments", "session_system_update_outbox", "session_system_updates", "session_turn_attempts", "session_turns", "session_workflow_wake_outbox", "sessions", "slack_bot_delete_operations", "slack_bot_post_operations", "slack_bot_user_links", "slack_interaction_inbox", "slack_interaction_progress_deliveries", "slack_interactions", "social_connections", "social_posts", "usage_events", "workspace_artifact_events", "workspace_artifact_versions", "workspace_artifacts", "workspace_captures", "workspace_control_events", "workspace_inference_controls", "workspace_instruction_policy_activation_events", "workspace_instruction_policy_heads", "workspace_instruction_policy_onboarding_proposals", "workspace_instruction_policy_revisions", "workspace_instruction_policy_snapshots", "workspace_model_policies", "workspace_packs", "workspace_session_activity_revisions", "workspace_variable_set_variables", "workspace_variable_sets"];
|
|
8
8
|
/**
|
|
9
9
|
* Deployment-global and authentication tables used by ordinary API/worker
|
|
10
10
|
* traffic. They intentionally do not carry workspace RLS: their access model
|
|
@@ -16,11 +16,11 @@ export declare const NON_RLS_RUNTIME_TABLES: readonly ["auth_identities", "auth_
|
|
|
16
16
|
* explicit instead of being derived from FORCE_RLS_TABLES: adding a protected
|
|
17
17
|
* table must not silently grant it broader DML than its migration intended.
|
|
18
18
|
*/
|
|
19
|
-
export declare const RUNTIME_FULL_DML_TABLES: readonly ["agent_run_states", "api_keys", "audit_events", "auth_identities", "auth_rate_limits", "auth_sessions", "auth_users", "auth_verifications", "billing_customers", "capability_catalog_items", "capability_installations", "codex_capacity_waiters", "codex_credential_leases", "codex_reset_redemption_attempts", "codex_rotation_settings", "codex_subscription_credentials", "composer_drafts", "connections", "connector_action_policies", "connector_action_requests", "credit_ledger_entries", "device_enrollment_requests", "document_bases", "document_chunks", "documents", "enrollments", "file_uploads", "files", "github_installation_repositories", "github_installations", "import_batches", "integration_oauth_clients", "integration_oauth_state_nonces", "knowledge_memories", "machine_metrics_latest", "machine_metrics_series", "managed_accounts", "model_call_facts", "new_session_drafts", "pack_installations", "rig_changes", "rig_versions", "rigs", "sandbox_checkpoint_artifacts", "sandbox_lease_holders", "sandbox_leases", "sandbox_pty_sessions", "sandbox_retained_processes", "sandbox_session_envelopes", "sandbox_workspace_mutation_admissions", "sandboxes", "scheduled_task_runs", "scheduled_tasks", "session_attempt_interruptions", "session_command_receipts", "session_events", "session_goals", "session_history_items", "session_human_input_requests", "session_list_snapshots", "session_mcp_servers", "session_pending_tool_calls", "session_pins", "session_realtime_connections", "session_realtime_context_projections", "session_realtime_entries", "session_realtime_modes", "session_recordings", "session_stream_acknowledgments", "session_system_update_outbox", "session_system_updates", "session_turn_attempts", "session_turns", "session_workflow_wake_outbox", "sessions", "slack_bot_delete_operations", "slack_bot_post_operations", "slack_bot_user_links", "slack_interaction_inbox", "slack_interaction_progress_deliveries", "slack_interactions", "social_connections", "social_posts", "stripe_webhook_events", "usage_events", "workspace_artifacts", "workspace_captures", "workspace_control_events", "workspace_inference_controls", "workspace_instruction_policy_heads", "workspace_memberships", "workspace_model_policies", "workspace_packs", "workspace_session_activity_revisions", "workspace_variable_set_variables", "workspace_variable_sets", "workspaces"];
|
|
19
|
+
export declare const RUNTIME_FULL_DML_TABLES: readonly ["agent_run_states", "api_keys", "audit_events", "auth_identities", "auth_rate_limits", "auth_sessions", "auth_users", "auth_verifications", "billing_customers", "capability_catalog_items", "capability_installations", "codex_capacity_waiters", "codex_credential_leases", "codex_reset_redemption_attempts", "codex_rotation_settings", "codex_subscription_credentials", "composer_drafts", "connection_disconnect_operations", "connections", "connector_action_policies", "connector_action_requests", "credit_ledger_entries", "device_enrollment_requests", "document_bases", "document_chunks", "documents", "enrollments", "file_uploads", "files", "github_installation_repositories", "github_installations", "import_batches", "integration_oauth_clients", "integration_oauth_state_nonces", "knowledge_memories", "machine_metrics_latest", "machine_metrics_series", "managed_accounts", "model_call_facts", "new_session_drafts", "pack_installations", "rig_changes", "rig_versions", "rigs", "sandbox_checkpoint_artifacts", "sandbox_lease_holders", "sandbox_leases", "sandbox_pty_sessions", "sandbox_retained_processes", "sandbox_session_envelopes", "sandbox_workspace_mutation_admissions", "sandboxes", "scheduled_task_runs", "scheduled_tasks", "session_attempt_interruptions", "session_command_receipts", "session_events", "session_goals", "session_history_items", "session_human_input_requests", "session_list_snapshots", "session_mcp_servers", "session_pending_tool_calls", "session_pins", "session_realtime_connections", "session_realtime_context_projections", "session_realtime_entries", "session_realtime_modes", "session_recordings", "session_stream_acknowledgments", "session_system_update_outbox", "session_system_updates", "session_turn_attempts", "session_turns", "session_workflow_wake_outbox", "sessions", "slack_bot_delete_operations", "slack_bot_post_operations", "slack_bot_user_links", "slack_interaction_inbox", "slack_interaction_progress_deliveries", "slack_interactions", "social_connections", "social_posts", "stripe_webhook_events", "usage_events", "workspace_artifacts", "workspace_captures", "workspace_control_events", "workspace_inference_controls", "workspace_instruction_policy_heads", "workspace_memberships", "workspace_model_policies", "workspace_packs", "workspace_session_activity_revisions", "workspace_variable_set_variables", "workspace_variable_sets", "workspaces"];
|
|
20
20
|
/** Configuration and lifecycle-owned audit rows are read-only at runtime. */
|
|
21
21
|
export declare const RUNTIME_READ_ONLY_TABLES: readonly ["knowledge_lifecycle_events", "knowledge_memory_lifecycle_events", "knowledge_memory_relationships", "nested_agent_depth_configuration", "preference_registry_events", "preference_registry_snapshots", "workspace_instruction_policy_snapshots"];
|
|
22
22
|
/** Append-only evidence/revision tables are insertable and queryable, never mutable. */
|
|
23
|
-
export declare const RUNTIME_READ_INSERT_TABLES: readonly ["knowledge_change_proposals", "knowledge_claim_evidence", "knowledge_claim_relations", "knowledge_claim_reviews", "knowledge_claims", "knowledge_document_versions", "knowledge_entities", "knowledge_entity_aliases", "knowledge_facts", "knowledge_operation_receipts", "knowledge_providers", "knowledge_source_acl_versions", "knowledge_source_objects", "knowledge_sources", "knowledge_sync_runs", "preference_registry_preferences", "preference_registry_revisions", "session_spawn_denials", "workspace_artifact_events", "workspace_artifact_versions", "workspace_instruction_policy_activation_events", "workspace_instruction_policy_revisions"];
|
|
23
|
+
export declare const RUNTIME_READ_INSERT_TABLES: readonly ["knowledge_change_proposals", "knowledge_claim_evidence", "knowledge_claim_relations", "knowledge_claim_reviews", "knowledge_claims", "knowledge_document_versions", "knowledge_entities", "knowledge_entity_aliases", "knowledge_facts", "knowledge_operation_receipts", "knowledge_providers", "knowledge_source_acl_versions", "knowledge_source_objects", "knowledge_sources", "knowledge_sync_runs", "preference_registry_preferences", "preference_registry_revisions", "session_spawn_denials", "workspace_artifact_events", "workspace_artifact_versions", "workspace_instruction_policy_activation_events", "workspace_instruction_policy_onboarding_proposals", "workspace_instruction_policy_revisions"];
|
|
24
24
|
/**
|
|
25
25
|
* These FORCE-RLS tables are owned by security-definer host-export routines.
|
|
26
26
|
* The ordinary application role must have no direct table privileges on them.
|
package/dist/schema.d.ts
CHANGED
|
@@ -3370,6 +3370,166 @@ export declare const connections: import("drizzle-orm/pg-core").PgTableWithColum
|
|
|
3370
3370
|
};
|
|
3371
3371
|
dialect: 'pg';
|
|
3372
3372
|
}>;
|
|
3373
|
+
export declare const connectionDisconnectOperations: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
3374
|
+
name: "connection_disconnect_operations";
|
|
3375
|
+
schema: undefined;
|
|
3376
|
+
columns: {
|
|
3377
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
3378
|
+
name: "id";
|
|
3379
|
+
tableName: "connection_disconnect_operations";
|
|
3380
|
+
dataType: "string";
|
|
3381
|
+
columnType: "PgUUID";
|
|
3382
|
+
data: string;
|
|
3383
|
+
driverParam: string;
|
|
3384
|
+
notNull: true;
|
|
3385
|
+
hasDefault: true;
|
|
3386
|
+
isPrimaryKey: true;
|
|
3387
|
+
isAutoincrement: false;
|
|
3388
|
+
hasRuntimeDefault: false;
|
|
3389
|
+
enumValues: undefined;
|
|
3390
|
+
baseColumn: never;
|
|
3391
|
+
identity: undefined;
|
|
3392
|
+
generated: undefined;
|
|
3393
|
+
}, {}, {}>;
|
|
3394
|
+
accountId: import("drizzle-orm/pg-core").PgColumn<{
|
|
3395
|
+
name: "account_id";
|
|
3396
|
+
tableName: "connection_disconnect_operations";
|
|
3397
|
+
dataType: "string";
|
|
3398
|
+
columnType: "PgUUID";
|
|
3399
|
+
data: string;
|
|
3400
|
+
driverParam: string;
|
|
3401
|
+
notNull: true;
|
|
3402
|
+
hasDefault: false;
|
|
3403
|
+
isPrimaryKey: false;
|
|
3404
|
+
isAutoincrement: false;
|
|
3405
|
+
hasRuntimeDefault: false;
|
|
3406
|
+
enumValues: undefined;
|
|
3407
|
+
baseColumn: never;
|
|
3408
|
+
identity: undefined;
|
|
3409
|
+
generated: undefined;
|
|
3410
|
+
}, {}, {}>;
|
|
3411
|
+
workspaceId: import("drizzle-orm/pg-core").PgColumn<{
|
|
3412
|
+
name: "workspace_id";
|
|
3413
|
+
tableName: "connection_disconnect_operations";
|
|
3414
|
+
dataType: "string";
|
|
3415
|
+
columnType: "PgUUID";
|
|
3416
|
+
data: string;
|
|
3417
|
+
driverParam: string;
|
|
3418
|
+
notNull: true;
|
|
3419
|
+
hasDefault: false;
|
|
3420
|
+
isPrimaryKey: false;
|
|
3421
|
+
isAutoincrement: false;
|
|
3422
|
+
hasRuntimeDefault: false;
|
|
3423
|
+
enumValues: undefined;
|
|
3424
|
+
baseColumn: never;
|
|
3425
|
+
identity: undefined;
|
|
3426
|
+
generated: undefined;
|
|
3427
|
+
}, {}, {}>;
|
|
3428
|
+
connectionId: import("drizzle-orm/pg-core").PgColumn<{
|
|
3429
|
+
name: "connection_id";
|
|
3430
|
+
tableName: "connection_disconnect_operations";
|
|
3431
|
+
dataType: "string";
|
|
3432
|
+
columnType: "PgUUID";
|
|
3433
|
+
data: string;
|
|
3434
|
+
driverParam: string;
|
|
3435
|
+
notNull: true;
|
|
3436
|
+
hasDefault: false;
|
|
3437
|
+
isPrimaryKey: false;
|
|
3438
|
+
isAutoincrement: false;
|
|
3439
|
+
hasRuntimeDefault: false;
|
|
3440
|
+
enumValues: undefined;
|
|
3441
|
+
baseColumn: never;
|
|
3442
|
+
identity: undefined;
|
|
3443
|
+
generated: undefined;
|
|
3444
|
+
}, {}, {}>;
|
|
3445
|
+
subjectId: import("drizzle-orm/pg-core").PgColumn<{
|
|
3446
|
+
name: "subject_id";
|
|
3447
|
+
tableName: "connection_disconnect_operations";
|
|
3448
|
+
dataType: "string";
|
|
3449
|
+
columnType: "PgText";
|
|
3450
|
+
data: string;
|
|
3451
|
+
driverParam: string;
|
|
3452
|
+
notNull: true;
|
|
3453
|
+
hasDefault: false;
|
|
3454
|
+
isPrimaryKey: false;
|
|
3455
|
+
isAutoincrement: false;
|
|
3456
|
+
hasRuntimeDefault: false;
|
|
3457
|
+
enumValues: [string, ...string[]];
|
|
3458
|
+
baseColumn: never;
|
|
3459
|
+
identity: undefined;
|
|
3460
|
+
generated: undefined;
|
|
3461
|
+
}, {}, {}>;
|
|
3462
|
+
idempotencyKey: import("drizzle-orm/pg-core").PgColumn<{
|
|
3463
|
+
name: "idempotency_key";
|
|
3464
|
+
tableName: "connection_disconnect_operations";
|
|
3465
|
+
dataType: "string";
|
|
3466
|
+
columnType: "PgText";
|
|
3467
|
+
data: string;
|
|
3468
|
+
driverParam: string;
|
|
3469
|
+
notNull: true;
|
|
3470
|
+
hasDefault: false;
|
|
3471
|
+
isPrimaryKey: false;
|
|
3472
|
+
isAutoincrement: false;
|
|
3473
|
+
hasRuntimeDefault: false;
|
|
3474
|
+
enumValues: [string, ...string[]];
|
|
3475
|
+
baseColumn: never;
|
|
3476
|
+
identity: undefined;
|
|
3477
|
+
generated: undefined;
|
|
3478
|
+
}, {}, {}>;
|
|
3479
|
+
expectedVersion: import("drizzle-orm/pg-core").PgColumn<{
|
|
3480
|
+
name: "expected_version";
|
|
3481
|
+
tableName: "connection_disconnect_operations";
|
|
3482
|
+
dataType: "number";
|
|
3483
|
+
columnType: "PgInteger";
|
|
3484
|
+
data: number;
|
|
3485
|
+
driverParam: string | number;
|
|
3486
|
+
notNull: true;
|
|
3487
|
+
hasDefault: false;
|
|
3488
|
+
isPrimaryKey: false;
|
|
3489
|
+
isAutoincrement: false;
|
|
3490
|
+
hasRuntimeDefault: false;
|
|
3491
|
+
enumValues: undefined;
|
|
3492
|
+
baseColumn: never;
|
|
3493
|
+
identity: undefined;
|
|
3494
|
+
generated: undefined;
|
|
3495
|
+
}, {}, {}>;
|
|
3496
|
+
resultVersion: import("drizzle-orm/pg-core").PgColumn<{
|
|
3497
|
+
name: "result_version";
|
|
3498
|
+
tableName: "connection_disconnect_operations";
|
|
3499
|
+
dataType: "number";
|
|
3500
|
+
columnType: "PgInteger";
|
|
3501
|
+
data: number;
|
|
3502
|
+
driverParam: string | number;
|
|
3503
|
+
notNull: true;
|
|
3504
|
+
hasDefault: false;
|
|
3505
|
+
isPrimaryKey: false;
|
|
3506
|
+
isAutoincrement: false;
|
|
3507
|
+
hasRuntimeDefault: false;
|
|
3508
|
+
enumValues: undefined;
|
|
3509
|
+
baseColumn: never;
|
|
3510
|
+
identity: undefined;
|
|
3511
|
+
generated: undefined;
|
|
3512
|
+
}, {}, {}>;
|
|
3513
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
3514
|
+
name: "created_at";
|
|
3515
|
+
tableName: "connection_disconnect_operations";
|
|
3516
|
+
dataType: "date";
|
|
3517
|
+
columnType: "PgTimestamp";
|
|
3518
|
+
data: Date;
|
|
3519
|
+
driverParam: string;
|
|
3520
|
+
notNull: true;
|
|
3521
|
+
hasDefault: true;
|
|
3522
|
+
isPrimaryKey: false;
|
|
3523
|
+
isAutoincrement: false;
|
|
3524
|
+
hasRuntimeDefault: false;
|
|
3525
|
+
enumValues: undefined;
|
|
3526
|
+
baseColumn: never;
|
|
3527
|
+
identity: undefined;
|
|
3528
|
+
generated: undefined;
|
|
3529
|
+
}, {}, {}>;
|
|
3530
|
+
};
|
|
3531
|
+
dialect: 'pg';
|
|
3532
|
+
}>;
|
|
3373
3533
|
export declare const connectorActionPolicies: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
3374
3534
|
name: "connector_action_policies";
|
|
3375
3535
|
schema: undefined;
|
|
@@ -10184,6 +10344,57 @@ export declare const documents: import("drizzle-orm/pg-core").PgTableWithColumns
|
|
|
10184
10344
|
}, {}, {
|
|
10185
10345
|
$type: string[];
|
|
10186
10346
|
}>;
|
|
10347
|
+
authorityKind: import("drizzle-orm/pg-core").PgColumn<{
|
|
10348
|
+
name: "authority_kind";
|
|
10349
|
+
tableName: "documents";
|
|
10350
|
+
dataType: "string";
|
|
10351
|
+
columnType: "PgText";
|
|
10352
|
+
data: string;
|
|
10353
|
+
driverParam: string;
|
|
10354
|
+
notNull: true;
|
|
10355
|
+
hasDefault: true;
|
|
10356
|
+
isPrimaryKey: false;
|
|
10357
|
+
isAutoincrement: false;
|
|
10358
|
+
hasRuntimeDefault: false;
|
|
10359
|
+
enumValues: [string, ...string[]];
|
|
10360
|
+
baseColumn: never;
|
|
10361
|
+
identity: undefined;
|
|
10362
|
+
generated: undefined;
|
|
10363
|
+
}, {}, {}>;
|
|
10364
|
+
authorityWorkspaceId: import("drizzle-orm/pg-core").PgColumn<{
|
|
10365
|
+
name: "authority_workspace_id";
|
|
10366
|
+
tableName: "documents";
|
|
10367
|
+
dataType: "string";
|
|
10368
|
+
columnType: "PgUUID";
|
|
10369
|
+
data: string;
|
|
10370
|
+
driverParam: string;
|
|
10371
|
+
notNull: false;
|
|
10372
|
+
hasDefault: false;
|
|
10373
|
+
isPrimaryKey: false;
|
|
10374
|
+
isAutoincrement: false;
|
|
10375
|
+
hasRuntimeDefault: false;
|
|
10376
|
+
enumValues: undefined;
|
|
10377
|
+
baseColumn: never;
|
|
10378
|
+
identity: undefined;
|
|
10379
|
+
generated: undefined;
|
|
10380
|
+
}, {}, {}>;
|
|
10381
|
+
authoritySubjectId: import("drizzle-orm/pg-core").PgColumn<{
|
|
10382
|
+
name: "authority_subject_id";
|
|
10383
|
+
tableName: "documents";
|
|
10384
|
+
dataType: "string";
|
|
10385
|
+
columnType: "PgText";
|
|
10386
|
+
data: string;
|
|
10387
|
+
driverParam: string;
|
|
10388
|
+
notNull: false;
|
|
10389
|
+
hasDefault: false;
|
|
10390
|
+
isPrimaryKey: false;
|
|
10391
|
+
isAutoincrement: false;
|
|
10392
|
+
hasRuntimeDefault: false;
|
|
10393
|
+
enumValues: [string, ...string[]];
|
|
10394
|
+
baseColumn: never;
|
|
10395
|
+
identity: undefined;
|
|
10396
|
+
generated: undefined;
|
|
10397
|
+
}, {}, {}>;
|
|
10187
10398
|
visibility: import("drizzle-orm/pg-core").PgColumn<{
|
|
10188
10399
|
name: "visibility";
|
|
10189
10400
|
tableName: "documents";
|
|
@@ -10503,6 +10714,57 @@ export declare const documentChunks: import("drizzle-orm/pg-core").PgTableWithCo
|
|
|
10503
10714
|
}, {}, {
|
|
10504
10715
|
$type: Record<string, unknown>;
|
|
10505
10716
|
}>;
|
|
10717
|
+
authorityKind: import("drizzle-orm/pg-core").PgColumn<{
|
|
10718
|
+
name: "authority_kind";
|
|
10719
|
+
tableName: "document_chunks";
|
|
10720
|
+
dataType: "string";
|
|
10721
|
+
columnType: "PgText";
|
|
10722
|
+
data: string;
|
|
10723
|
+
driverParam: string;
|
|
10724
|
+
notNull: true;
|
|
10725
|
+
hasDefault: true;
|
|
10726
|
+
isPrimaryKey: false;
|
|
10727
|
+
isAutoincrement: false;
|
|
10728
|
+
hasRuntimeDefault: false;
|
|
10729
|
+
enumValues: [string, ...string[]];
|
|
10730
|
+
baseColumn: never;
|
|
10731
|
+
identity: undefined;
|
|
10732
|
+
generated: undefined;
|
|
10733
|
+
}, {}, {}>;
|
|
10734
|
+
authorityWorkspaceId: import("drizzle-orm/pg-core").PgColumn<{
|
|
10735
|
+
name: "authority_workspace_id";
|
|
10736
|
+
tableName: "document_chunks";
|
|
10737
|
+
dataType: "string";
|
|
10738
|
+
columnType: "PgUUID";
|
|
10739
|
+
data: string;
|
|
10740
|
+
driverParam: string;
|
|
10741
|
+
notNull: false;
|
|
10742
|
+
hasDefault: false;
|
|
10743
|
+
isPrimaryKey: false;
|
|
10744
|
+
isAutoincrement: false;
|
|
10745
|
+
hasRuntimeDefault: false;
|
|
10746
|
+
enumValues: undefined;
|
|
10747
|
+
baseColumn: never;
|
|
10748
|
+
identity: undefined;
|
|
10749
|
+
generated: undefined;
|
|
10750
|
+
}, {}, {}>;
|
|
10751
|
+
authoritySubjectId: import("drizzle-orm/pg-core").PgColumn<{
|
|
10752
|
+
name: "authority_subject_id";
|
|
10753
|
+
tableName: "document_chunks";
|
|
10754
|
+
dataType: "string";
|
|
10755
|
+
columnType: "PgText";
|
|
10756
|
+
data: string;
|
|
10757
|
+
driverParam: string;
|
|
10758
|
+
notNull: false;
|
|
10759
|
+
hasDefault: false;
|
|
10760
|
+
isPrimaryKey: false;
|
|
10761
|
+
isAutoincrement: false;
|
|
10762
|
+
hasRuntimeDefault: false;
|
|
10763
|
+
enumValues: [string, ...string[]];
|
|
10764
|
+
baseColumn: never;
|
|
10765
|
+
identity: undefined;
|
|
10766
|
+
generated: undefined;
|
|
10767
|
+
}, {}, {}>;
|
|
10506
10768
|
embedding: import("drizzle-orm/pg-core").PgColumn<{
|
|
10507
10769
|
name: "embedding";
|
|
10508
10770
|
tableName: "document_chunks";
|
|
@@ -16670,8 +16932,6 @@ export declare const sessionHumanInputRequests: import("drizzle-orm/pg-core").Pg
|
|
|
16670
16932
|
required: boolean;
|
|
16671
16933
|
allowOther: boolean;
|
|
16672
16934
|
validation?: {
|
|
16673
|
-
minLength?: number | null | undefined;
|
|
16674
|
-
maxLength?: number | null | undefined;
|
|
16675
16935
|
minSelections?: number | null | undefined;
|
|
16676
16936
|
maxSelections?: number | null | undefined;
|
|
16677
16937
|
} | null | undefined;
|
|
@@ -16701,8 +16961,6 @@ export declare const sessionHumanInputRequests: import("drizzle-orm/pg-core").Pg
|
|
|
16701
16961
|
required: boolean;
|
|
16702
16962
|
allowOther: boolean;
|
|
16703
16963
|
validation?: {
|
|
16704
|
-
minLength?: number | null | undefined;
|
|
16705
|
-
maxLength?: number | null | undefined;
|
|
16706
16964
|
minSelections?: number | null | undefined;
|
|
16707
16965
|
maxSelections?: number | null | undefined;
|
|
16708
16966
|
} | null | undefined;
|
package/dist/schema.js
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
codexRotationSettings,
|
|
12
12
|
codexSubscriptionCredentials,
|
|
13
13
|
composerDrafts,
|
|
14
|
+
connectionDisconnectOperations,
|
|
14
15
|
connections,
|
|
15
16
|
connectorActionPolicies,
|
|
16
17
|
connectorActionRequests,
|
|
@@ -128,6 +129,7 @@ import {
|
|
|
128
129
|
workspaceInferenceControls,
|
|
129
130
|
workspaceInstructionPolicyActivationEvents,
|
|
130
131
|
workspaceInstructionPolicyHeads,
|
|
132
|
+
workspaceInstructionPolicyOnboardingProposals,
|
|
131
133
|
workspaceInstructionPolicyRevisions,
|
|
132
134
|
workspaceInstructionPolicySnapshots,
|
|
133
135
|
workspaceMemberships,
|
|
@@ -137,7 +139,7 @@ import {
|
|
|
137
139
|
workspaceVariableSetVariables,
|
|
138
140
|
workspaceVariableSets,
|
|
139
141
|
workspaces
|
|
140
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-EX7CDSGH.js";
|
|
141
143
|
import "./chunk-PZ5AY32C.js";
|
|
142
144
|
export {
|
|
143
145
|
agentRunStates,
|
|
@@ -152,6 +154,7 @@ export {
|
|
|
152
154
|
codexRotationSettings,
|
|
153
155
|
codexSubscriptionCredentials,
|
|
154
156
|
composerDrafts,
|
|
157
|
+
connectionDisconnectOperations,
|
|
155
158
|
connections,
|
|
156
159
|
connectorActionPolicies,
|
|
157
160
|
connectorActionRequests,
|
|
@@ -269,6 +272,7 @@ export {
|
|
|
269
272
|
workspaceInferenceControls,
|
|
270
273
|
workspaceInstructionPolicyActivationEvents,
|
|
271
274
|
workspaceInstructionPolicyHeads,
|
|
275
|
+
workspaceInstructionPolicyOnboardingProposals,
|
|
272
276
|
workspaceInstructionPolicyRevisions,
|
|
273
277
|
workspaceInstructionPolicySnapshots,
|
|
274
278
|
workspaceMemberships,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { HumanInputQuestion, HumanInputResponse } from "@opengeni/contracts";
|
|
1
2
|
import type { Database } from "./index";
|
|
2
3
|
import * as schema from "./schema";
|
|
3
4
|
export type SessionRealtimeMirrorChannel = "speakable" | "commentary" | null;
|
|
@@ -5,7 +6,7 @@ export type MirrorSessionRealtimeContextInput = {
|
|
|
5
6
|
accountId: string;
|
|
6
7
|
workspaceId: string;
|
|
7
8
|
sessionId: string;
|
|
8
|
-
sourceKind: "human_input" | "assistant_progress" | "assistant_terminal";
|
|
9
|
+
sourceKind: "human_input" | "human_input_request" | "human_input_response" | "assistant_progress" | "assistant_terminal";
|
|
9
10
|
sourceId: string;
|
|
10
11
|
text: string;
|
|
11
12
|
channel: SessionRealtimeMirrorChannel;
|
|
@@ -28,3 +29,23 @@ export declare function renderRealtimeHumanInputContext(input: {
|
|
|
28
29
|
routing: "accepted_for_execution" | "queued_for_execution" | "accepted_for_steering";
|
|
29
30
|
text: string;
|
|
30
31
|
}): string;
|
|
32
|
+
export type RealtimeHumanInputRequestContext = {
|
|
33
|
+
id: string;
|
|
34
|
+
questions: HumanInputQuestion[];
|
|
35
|
+
allowSkip: boolean;
|
|
36
|
+
expiresAt?: Date | string | null;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Render the exact durable question contract for the conversational surface.
|
|
40
|
+
* The structured form remains authoritative, while a conversational answer is
|
|
41
|
+
* ordinary new user input that the realtime model delegates once with enough
|
|
42
|
+
* question context for the next underlying turn.
|
|
43
|
+
*/
|
|
44
|
+
export declare function renderRealtimeHumanInputRequestContext(input: {
|
|
45
|
+
requests: RealtimeHumanInputRequestContext[];
|
|
46
|
+
}): string;
|
|
47
|
+
export declare function renderRealtimeHumanInputResponseContext(input: {
|
|
48
|
+
requestId: string;
|
|
49
|
+
questions: HumanInputQuestion[];
|
|
50
|
+
response: HumanInputResponse;
|
|
51
|
+
}): string;
|