@opengeni/db 0.26.0 → 0.27.3
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-7WTDI7Y3.js → chunk-EX7CDSGH.js} +88 -1
- package/dist/{chunk-7WTDI7Y3.js.map → chunk-EX7CDSGH.js.map} +1 -1
- package/dist/{chunk-KW6U54V2.js → chunk-IHPCI4GV.js} +3 -1
- package/dist/chunk-IHPCI4GV.js.map +1 -0
- package/dist/index.js +291 -4
- package/dist/index.js.map +1 -1
- package/dist/provision-roles.js +1 -1
- package/dist/runtime-posture.d.ts +2 -2
- package/dist/schema.js +3 -1
- package/dist/workspace-instruction-policies-schema.d.ts +381 -0
- package/dist/workspace-instruction-policies.d.ts +35 -1
- package/drizzle/0169_workspace_instruction_policy_onboarding_proposals.sql +202 -0
- package/package.json +4 -4
- package/src/runtime-posture.ts +2 -0
- package/src/workspace-instruction-policies-schema.ts +86 -0
- package/src/workspace-instruction-policies.ts +381 -1
- package/dist/chunk-KW6U54V2.js.map +0 -1
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", "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_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
|
|
@@ -20,7 +20,7 @@ export declare const RUNTIME_FULL_DML_TABLES: readonly ["agent_run_states", "api
|
|
|
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.js
CHANGED
|
@@ -129,6 +129,7 @@ import {
|
|
|
129
129
|
workspaceInferenceControls,
|
|
130
130
|
workspaceInstructionPolicyActivationEvents,
|
|
131
131
|
workspaceInstructionPolicyHeads,
|
|
132
|
+
workspaceInstructionPolicyOnboardingProposals,
|
|
132
133
|
workspaceInstructionPolicyRevisions,
|
|
133
134
|
workspaceInstructionPolicySnapshots,
|
|
134
135
|
workspaceMemberships,
|
|
@@ -138,7 +139,7 @@ import {
|
|
|
138
139
|
workspaceVariableSetVariables,
|
|
139
140
|
workspaceVariableSets,
|
|
140
141
|
workspaces
|
|
141
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-EX7CDSGH.js";
|
|
142
143
|
import "./chunk-PZ5AY32C.js";
|
|
143
144
|
export {
|
|
144
145
|
agentRunStates,
|
|
@@ -271,6 +272,7 @@ export {
|
|
|
271
272
|
workspaceInferenceControls,
|
|
272
273
|
workspaceInstructionPolicyActivationEvents,
|
|
273
274
|
workspaceInstructionPolicyHeads,
|
|
275
|
+
workspaceInstructionPolicyOnboardingProposals,
|
|
274
276
|
workspaceInstructionPolicyRevisions,
|
|
275
277
|
workspaceInstructionPolicySnapshots,
|
|
276
278
|
workspaceMemberships,
|
|
@@ -801,6 +801,387 @@ export declare const workspaceInstructionPolicyActivationEvents: import("drizzle
|
|
|
801
801
|
};
|
|
802
802
|
dialect: 'pg';
|
|
803
803
|
}>;
|
|
804
|
+
export declare const workspaceInstructionPolicyOnboardingProposals: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
805
|
+
name: "workspace_instruction_policy_onboarding_proposals";
|
|
806
|
+
schema: undefined;
|
|
807
|
+
columns: {
|
|
808
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
809
|
+
name: "id";
|
|
810
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
811
|
+
dataType: "string";
|
|
812
|
+
columnType: "PgUUID";
|
|
813
|
+
data: string;
|
|
814
|
+
driverParam: string;
|
|
815
|
+
notNull: true;
|
|
816
|
+
hasDefault: true;
|
|
817
|
+
isPrimaryKey: true;
|
|
818
|
+
isAutoincrement: false;
|
|
819
|
+
hasRuntimeDefault: false;
|
|
820
|
+
enumValues: undefined;
|
|
821
|
+
baseColumn: never;
|
|
822
|
+
identity: undefined;
|
|
823
|
+
generated: undefined;
|
|
824
|
+
}, {}, {}>;
|
|
825
|
+
operationId: import("drizzle-orm/pg-core").PgColumn<{
|
|
826
|
+
name: "operation_id";
|
|
827
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
828
|
+
dataType: "string";
|
|
829
|
+
columnType: "PgUUID";
|
|
830
|
+
data: string;
|
|
831
|
+
driverParam: string;
|
|
832
|
+
notNull: true;
|
|
833
|
+
hasDefault: false;
|
|
834
|
+
isPrimaryKey: false;
|
|
835
|
+
isAutoincrement: false;
|
|
836
|
+
hasRuntimeDefault: false;
|
|
837
|
+
enumValues: undefined;
|
|
838
|
+
baseColumn: never;
|
|
839
|
+
identity: undefined;
|
|
840
|
+
generated: undefined;
|
|
841
|
+
}, {}, {}>;
|
|
842
|
+
requestFingerprint: import("drizzle-orm/pg-core").PgColumn<{
|
|
843
|
+
name: "request_fingerprint";
|
|
844
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
845
|
+
dataType: "string";
|
|
846
|
+
columnType: "PgText";
|
|
847
|
+
data: string;
|
|
848
|
+
driverParam: string;
|
|
849
|
+
notNull: true;
|
|
850
|
+
hasDefault: false;
|
|
851
|
+
isPrimaryKey: false;
|
|
852
|
+
isAutoincrement: false;
|
|
853
|
+
hasRuntimeDefault: false;
|
|
854
|
+
enumValues: [string, ...string[]];
|
|
855
|
+
baseColumn: never;
|
|
856
|
+
identity: undefined;
|
|
857
|
+
generated: undefined;
|
|
858
|
+
}, {}, {}>;
|
|
859
|
+
accountId: import("drizzle-orm/pg-core").PgColumn<{
|
|
860
|
+
name: "account_id";
|
|
861
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
862
|
+
dataType: "string";
|
|
863
|
+
columnType: "PgUUID";
|
|
864
|
+
data: string;
|
|
865
|
+
driverParam: string;
|
|
866
|
+
notNull: true;
|
|
867
|
+
hasDefault: false;
|
|
868
|
+
isPrimaryKey: false;
|
|
869
|
+
isAutoincrement: false;
|
|
870
|
+
hasRuntimeDefault: false;
|
|
871
|
+
enumValues: undefined;
|
|
872
|
+
baseColumn: never;
|
|
873
|
+
identity: undefined;
|
|
874
|
+
generated: undefined;
|
|
875
|
+
}, {}, {}>;
|
|
876
|
+
workspaceId: import("drizzle-orm/pg-core").PgColumn<{
|
|
877
|
+
name: "workspace_id";
|
|
878
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
879
|
+
dataType: "string";
|
|
880
|
+
columnType: "PgUUID";
|
|
881
|
+
data: string;
|
|
882
|
+
driverParam: string;
|
|
883
|
+
notNull: true;
|
|
884
|
+
hasDefault: false;
|
|
885
|
+
isPrimaryKey: false;
|
|
886
|
+
isAutoincrement: false;
|
|
887
|
+
hasRuntimeDefault: false;
|
|
888
|
+
enumValues: undefined;
|
|
889
|
+
baseColumn: never;
|
|
890
|
+
identity: undefined;
|
|
891
|
+
generated: undefined;
|
|
892
|
+
}, {}, {}>;
|
|
893
|
+
kind: import("drizzle-orm/pg-core").PgColumn<{
|
|
894
|
+
name: "kind";
|
|
895
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
896
|
+
dataType: "string";
|
|
897
|
+
columnType: "PgText";
|
|
898
|
+
data: string;
|
|
899
|
+
driverParam: string;
|
|
900
|
+
notNull: true;
|
|
901
|
+
hasDefault: false;
|
|
902
|
+
isPrimaryKey: false;
|
|
903
|
+
isAutoincrement: false;
|
|
904
|
+
hasRuntimeDefault: false;
|
|
905
|
+
enumValues: [string, ...string[]];
|
|
906
|
+
baseColumn: never;
|
|
907
|
+
identity: undefined;
|
|
908
|
+
generated: undefined;
|
|
909
|
+
}, {}, {}>;
|
|
910
|
+
scope: import("drizzle-orm/pg-core").PgColumn<{
|
|
911
|
+
name: "scope";
|
|
912
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
913
|
+
dataType: "string";
|
|
914
|
+
columnType: "PgText";
|
|
915
|
+
data: string;
|
|
916
|
+
driverParam: string;
|
|
917
|
+
notNull: true;
|
|
918
|
+
hasDefault: false;
|
|
919
|
+
isPrimaryKey: false;
|
|
920
|
+
isAutoincrement: false;
|
|
921
|
+
hasRuntimeDefault: false;
|
|
922
|
+
enumValues: [string, ...string[]];
|
|
923
|
+
baseColumn: never;
|
|
924
|
+
identity: undefined;
|
|
925
|
+
generated: undefined;
|
|
926
|
+
}, {}, {}>;
|
|
927
|
+
roleKey: import("drizzle-orm/pg-core").PgColumn<{
|
|
928
|
+
name: "role_key";
|
|
929
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
930
|
+
dataType: "string";
|
|
931
|
+
columnType: "PgText";
|
|
932
|
+
data: string;
|
|
933
|
+
driverParam: string;
|
|
934
|
+
notNull: false;
|
|
935
|
+
hasDefault: false;
|
|
936
|
+
isPrimaryKey: false;
|
|
937
|
+
isAutoincrement: false;
|
|
938
|
+
hasRuntimeDefault: false;
|
|
939
|
+
enumValues: [string, ...string[]];
|
|
940
|
+
baseColumn: never;
|
|
941
|
+
identity: undefined;
|
|
942
|
+
generated: undefined;
|
|
943
|
+
}, {}, {}>;
|
|
944
|
+
sourceId: import("drizzle-orm/pg-core").PgColumn<{
|
|
945
|
+
name: "source_id";
|
|
946
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
947
|
+
dataType: "string";
|
|
948
|
+
columnType: "PgText";
|
|
949
|
+
data: string;
|
|
950
|
+
driverParam: string;
|
|
951
|
+
notNull: true;
|
|
952
|
+
hasDefault: false;
|
|
953
|
+
isPrimaryKey: false;
|
|
954
|
+
isAutoincrement: false;
|
|
955
|
+
hasRuntimeDefault: false;
|
|
956
|
+
enumValues: [string, ...string[]];
|
|
957
|
+
baseColumn: never;
|
|
958
|
+
identity: undefined;
|
|
959
|
+
generated: undefined;
|
|
960
|
+
}, {}, {}>;
|
|
961
|
+
sourceVersion: import("drizzle-orm/pg-core").PgColumn<{
|
|
962
|
+
name: "source_version";
|
|
963
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
964
|
+
dataType: "string";
|
|
965
|
+
columnType: "PgText";
|
|
966
|
+
data: string;
|
|
967
|
+
driverParam: string;
|
|
968
|
+
notNull: true;
|
|
969
|
+
hasDefault: false;
|
|
970
|
+
isPrimaryKey: false;
|
|
971
|
+
isAutoincrement: false;
|
|
972
|
+
hasRuntimeDefault: false;
|
|
973
|
+
enumValues: [string, ...string[]];
|
|
974
|
+
baseColumn: never;
|
|
975
|
+
identity: undefined;
|
|
976
|
+
generated: undefined;
|
|
977
|
+
}, {}, {}>;
|
|
978
|
+
confidenceBps: import("drizzle-orm/pg-core").PgColumn<{
|
|
979
|
+
name: "confidence_bps";
|
|
980
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
981
|
+
dataType: "number";
|
|
982
|
+
columnType: "PgInteger";
|
|
983
|
+
data: number;
|
|
984
|
+
driverParam: string | number;
|
|
985
|
+
notNull: true;
|
|
986
|
+
hasDefault: false;
|
|
987
|
+
isPrimaryKey: false;
|
|
988
|
+
isAutoincrement: false;
|
|
989
|
+
hasRuntimeDefault: false;
|
|
990
|
+
enumValues: undefined;
|
|
991
|
+
baseColumn: never;
|
|
992
|
+
identity: undefined;
|
|
993
|
+
generated: undefined;
|
|
994
|
+
}, {}, {}>;
|
|
995
|
+
baselineRevisionId: import("drizzle-orm/pg-core").PgColumn<{
|
|
996
|
+
name: "baseline_revision_id";
|
|
997
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
998
|
+
dataType: "string";
|
|
999
|
+
columnType: "PgUUID";
|
|
1000
|
+
data: string;
|
|
1001
|
+
driverParam: string;
|
|
1002
|
+
notNull: false;
|
|
1003
|
+
hasDefault: false;
|
|
1004
|
+
isPrimaryKey: false;
|
|
1005
|
+
isAutoincrement: false;
|
|
1006
|
+
hasRuntimeDefault: false;
|
|
1007
|
+
enumValues: undefined;
|
|
1008
|
+
baseColumn: never;
|
|
1009
|
+
identity: undefined;
|
|
1010
|
+
generated: undefined;
|
|
1011
|
+
}, {}, {}>;
|
|
1012
|
+
baselineRevision: import("drizzle-orm/pg-core").PgColumn<{
|
|
1013
|
+
name: "baseline_revision";
|
|
1014
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
1015
|
+
dataType: "number";
|
|
1016
|
+
columnType: "PgBigInt53";
|
|
1017
|
+
data: number;
|
|
1018
|
+
driverParam: string | number;
|
|
1019
|
+
notNull: false;
|
|
1020
|
+
hasDefault: false;
|
|
1021
|
+
isPrimaryKey: false;
|
|
1022
|
+
isAutoincrement: false;
|
|
1023
|
+
hasRuntimeDefault: false;
|
|
1024
|
+
enumValues: undefined;
|
|
1025
|
+
baseColumn: never;
|
|
1026
|
+
identity: undefined;
|
|
1027
|
+
generated: undefined;
|
|
1028
|
+
}, {}, {}>;
|
|
1029
|
+
baselineContentHash: import("drizzle-orm/pg-core").PgColumn<{
|
|
1030
|
+
name: "baseline_content_hash";
|
|
1031
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
1032
|
+
dataType: "string";
|
|
1033
|
+
columnType: "PgText";
|
|
1034
|
+
data: string;
|
|
1035
|
+
driverParam: string;
|
|
1036
|
+
notNull: false;
|
|
1037
|
+
hasDefault: false;
|
|
1038
|
+
isPrimaryKey: false;
|
|
1039
|
+
isAutoincrement: false;
|
|
1040
|
+
hasRuntimeDefault: false;
|
|
1041
|
+
enumValues: [string, ...string[]];
|
|
1042
|
+
baseColumn: never;
|
|
1043
|
+
identity: undefined;
|
|
1044
|
+
generated: undefined;
|
|
1045
|
+
}, {}, {}>;
|
|
1046
|
+
baselineActivationVersion: import("drizzle-orm/pg-core").PgColumn<{
|
|
1047
|
+
name: "baseline_activation_version";
|
|
1048
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
1049
|
+
dataType: "number";
|
|
1050
|
+
columnType: "PgBigInt53";
|
|
1051
|
+
data: number;
|
|
1052
|
+
driverParam: string | number;
|
|
1053
|
+
notNull: true;
|
|
1054
|
+
hasDefault: false;
|
|
1055
|
+
isPrimaryKey: false;
|
|
1056
|
+
isAutoincrement: false;
|
|
1057
|
+
hasRuntimeDefault: false;
|
|
1058
|
+
enumValues: undefined;
|
|
1059
|
+
baseColumn: never;
|
|
1060
|
+
identity: undefined;
|
|
1061
|
+
generated: undefined;
|
|
1062
|
+
}, {}, {}>;
|
|
1063
|
+
baselineActivatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
1064
|
+
name: "baseline_activated_at";
|
|
1065
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
1066
|
+
dataType: "date";
|
|
1067
|
+
columnType: "PgTimestamp";
|
|
1068
|
+
data: Date;
|
|
1069
|
+
driverParam: string;
|
|
1070
|
+
notNull: false;
|
|
1071
|
+
hasDefault: false;
|
|
1072
|
+
isPrimaryKey: false;
|
|
1073
|
+
isAutoincrement: false;
|
|
1074
|
+
hasRuntimeDefault: false;
|
|
1075
|
+
enumValues: undefined;
|
|
1076
|
+
baseColumn: never;
|
|
1077
|
+
identity: undefined;
|
|
1078
|
+
generated: undefined;
|
|
1079
|
+
}, {}, {}>;
|
|
1080
|
+
draftRevisionId: import("drizzle-orm/pg-core").PgColumn<{
|
|
1081
|
+
name: "draft_revision_id";
|
|
1082
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
1083
|
+
dataType: "string";
|
|
1084
|
+
columnType: "PgUUID";
|
|
1085
|
+
data: string;
|
|
1086
|
+
driverParam: string;
|
|
1087
|
+
notNull: true;
|
|
1088
|
+
hasDefault: false;
|
|
1089
|
+
isPrimaryKey: false;
|
|
1090
|
+
isAutoincrement: false;
|
|
1091
|
+
hasRuntimeDefault: false;
|
|
1092
|
+
enumValues: undefined;
|
|
1093
|
+
baseColumn: never;
|
|
1094
|
+
identity: undefined;
|
|
1095
|
+
generated: undefined;
|
|
1096
|
+
}, {}, {}>;
|
|
1097
|
+
draftRevision: import("drizzle-orm/pg-core").PgColumn<{
|
|
1098
|
+
name: "draft_revision";
|
|
1099
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
1100
|
+
dataType: "number";
|
|
1101
|
+
columnType: "PgBigInt53";
|
|
1102
|
+
data: number;
|
|
1103
|
+
driverParam: string | number;
|
|
1104
|
+
notNull: true;
|
|
1105
|
+
hasDefault: false;
|
|
1106
|
+
isPrimaryKey: false;
|
|
1107
|
+
isAutoincrement: false;
|
|
1108
|
+
hasRuntimeDefault: false;
|
|
1109
|
+
enumValues: undefined;
|
|
1110
|
+
baseColumn: never;
|
|
1111
|
+
identity: undefined;
|
|
1112
|
+
generated: undefined;
|
|
1113
|
+
}, {}, {}>;
|
|
1114
|
+
draftContentHash: import("drizzle-orm/pg-core").PgColumn<{
|
|
1115
|
+
name: "draft_content_hash";
|
|
1116
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
1117
|
+
dataType: "string";
|
|
1118
|
+
columnType: "PgText";
|
|
1119
|
+
data: string;
|
|
1120
|
+
driverParam: string;
|
|
1121
|
+
notNull: true;
|
|
1122
|
+
hasDefault: false;
|
|
1123
|
+
isPrimaryKey: false;
|
|
1124
|
+
isAutoincrement: false;
|
|
1125
|
+
hasRuntimeDefault: false;
|
|
1126
|
+
enumValues: [string, ...string[]];
|
|
1127
|
+
baseColumn: never;
|
|
1128
|
+
identity: undefined;
|
|
1129
|
+
generated: undefined;
|
|
1130
|
+
}, {}, {}>;
|
|
1131
|
+
status: import("drizzle-orm/pg-core").PgColumn<{
|
|
1132
|
+
name: "status";
|
|
1133
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
1134
|
+
dataType: "string";
|
|
1135
|
+
columnType: "PgText";
|
|
1136
|
+
data: string;
|
|
1137
|
+
driverParam: string;
|
|
1138
|
+
notNull: true;
|
|
1139
|
+
hasDefault: true;
|
|
1140
|
+
isPrimaryKey: false;
|
|
1141
|
+
isAutoincrement: false;
|
|
1142
|
+
hasRuntimeDefault: false;
|
|
1143
|
+
enumValues: [string, ...string[]];
|
|
1144
|
+
baseColumn: never;
|
|
1145
|
+
identity: undefined;
|
|
1146
|
+
generated: undefined;
|
|
1147
|
+
}, {}, {}>;
|
|
1148
|
+
createdBySubjectId: import("drizzle-orm/pg-core").PgColumn<{
|
|
1149
|
+
name: "created_by_subject_id";
|
|
1150
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
1151
|
+
dataType: "string";
|
|
1152
|
+
columnType: "PgText";
|
|
1153
|
+
data: string;
|
|
1154
|
+
driverParam: string;
|
|
1155
|
+
notNull: true;
|
|
1156
|
+
hasDefault: false;
|
|
1157
|
+
isPrimaryKey: false;
|
|
1158
|
+
isAutoincrement: false;
|
|
1159
|
+
hasRuntimeDefault: false;
|
|
1160
|
+
enumValues: [string, ...string[]];
|
|
1161
|
+
baseColumn: never;
|
|
1162
|
+
identity: undefined;
|
|
1163
|
+
generated: undefined;
|
|
1164
|
+
}, {}, {}>;
|
|
1165
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
1166
|
+
name: "created_at";
|
|
1167
|
+
tableName: "workspace_instruction_policy_onboarding_proposals";
|
|
1168
|
+
dataType: "date";
|
|
1169
|
+
columnType: "PgTimestamp";
|
|
1170
|
+
data: Date;
|
|
1171
|
+
driverParam: string;
|
|
1172
|
+
notNull: true;
|
|
1173
|
+
hasDefault: true;
|
|
1174
|
+
isPrimaryKey: false;
|
|
1175
|
+
isAutoincrement: false;
|
|
1176
|
+
hasRuntimeDefault: false;
|
|
1177
|
+
enumValues: undefined;
|
|
1178
|
+
baseColumn: never;
|
|
1179
|
+
identity: undefined;
|
|
1180
|
+
generated: undefined;
|
|
1181
|
+
}, {}, {}>;
|
|
1182
|
+
};
|
|
1183
|
+
dialect: 'pg';
|
|
1184
|
+
}>;
|
|
804
1185
|
export declare const workspaceInstructionPolicySnapshots: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
805
1186
|
name: "workspace_instruction_policy_snapshots";
|
|
806
1187
|
schema: undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WorkspaceInstructionPolicySnapshot } from "@opengeni/contracts";
|
|
2
|
-
import type { WorkspaceInstructionPolicyActivationResponse, WorkspaceInstructionPolicyDiffResponse, WorkspaceInstructionPolicyDraftProvenanceSource, WorkspaceInstructionPolicyHead, WorkspaceInstructionPolicyListQuery, WorkspaceInstructionPolicyListResponse, WorkspaceInstructionPolicyProvenanceSource, WorkspaceInstructionPolicyRevision, WorkspaceInstructionPolicyTarget } from "@opengeni/contracts";
|
|
2
|
+
import type { WorkspaceInstructionPolicyActivationResponse, WorkspaceInstructionPolicyDiffResponse, WorkspaceInstructionPolicyDraftProvenanceSource, WorkspaceInstructionPolicyHead, WorkspaceInstructionPolicyListQuery, WorkspaceInstructionPolicyListResponse, WorkspaceInstructionPolicyOnboardingProposal, WorkspaceInstructionPolicyOnboardingProposalListQuery, WorkspaceInstructionPolicyOnboardingProposalListResponse, WorkspaceInstructionPolicyProvenanceSource, WorkspaceInstructionPolicyRevision, WorkspaceInstructionPolicyTarget } from "@opengeni/contracts";
|
|
3
3
|
import type { Database } from "./index";
|
|
4
4
|
type DraftRequestInput = WorkspaceInstructionPolicyTarget & {
|
|
5
5
|
operationId: string;
|
|
@@ -22,6 +22,18 @@ type ImportLegacyRequestInput = {
|
|
|
22
22
|
createdBySubjectId: string;
|
|
23
23
|
supersedesRevisionId: string | null;
|
|
24
24
|
};
|
|
25
|
+
type OnboardingProposalRequestInput = WorkspaceInstructionPolicyTarget & {
|
|
26
|
+
operationId: string;
|
|
27
|
+
accountId: string;
|
|
28
|
+
workspaceId: string;
|
|
29
|
+
content: string;
|
|
30
|
+
sourceId: string;
|
|
31
|
+
sourceVersion: string;
|
|
32
|
+
confidenceBps: number;
|
|
33
|
+
expectedCurrentRevisionId: string | null;
|
|
34
|
+
expectedActivationVersion: number;
|
|
35
|
+
createdBySubjectId: string;
|
|
36
|
+
};
|
|
25
37
|
export declare class WorkspaceInstructionPolicyConflictError extends Error {
|
|
26
38
|
readonly currentHead: WorkspaceInstructionPolicyHead | null;
|
|
27
39
|
readonly name = "WorkspaceInstructionPolicyConflictError";
|
|
@@ -44,6 +56,24 @@ export declare class WorkspaceInstructionPolicyLegacyUnavailableError extends Er
|
|
|
44
56
|
readonly name = "WorkspaceInstructionPolicyLegacyUnavailableError";
|
|
45
57
|
constructor();
|
|
46
58
|
}
|
|
59
|
+
export declare class WorkspaceInstructionPolicyOnboardingProposalContentError extends Error {
|
|
60
|
+
readonly code: "WORKSPACE_INSTRUCTION_POLICY_ONBOARDING_PROPOSAL_EMPTY" | "WORKSPACE_INSTRUCTION_POLICY_ONBOARDING_PROPOSAL_OVERSIZED";
|
|
61
|
+
readonly name = "WorkspaceInstructionPolicyOnboardingProposalContentError";
|
|
62
|
+
constructor(code: "WORKSPACE_INSTRUCTION_POLICY_ONBOARDING_PROPOSAL_EMPTY" | "WORKSPACE_INSTRUCTION_POLICY_ONBOARDING_PROPOSAL_OVERSIZED");
|
|
63
|
+
}
|
|
64
|
+
export declare class WorkspaceInstructionPolicyOnboardingProposalStaleError extends Error {
|
|
65
|
+
readonly currentHead: WorkspaceInstructionPolicyHead | null;
|
|
66
|
+
readonly name = "WorkspaceInstructionPolicyOnboardingProposalStaleError";
|
|
67
|
+
readonly code = "WORKSPACE_INSTRUCTION_POLICY_ONBOARDING_PROPOSAL_STALE";
|
|
68
|
+
constructor(currentHead: WorkspaceInstructionPolicyHead | null);
|
|
69
|
+
}
|
|
70
|
+
export declare class WorkspaceInstructionPolicyOnboardingProposalConflictError extends Error {
|
|
71
|
+
readonly existingProposalId: string;
|
|
72
|
+
readonly existingDraftRevisionId: string;
|
|
73
|
+
readonly name = "WorkspaceInstructionPolicyOnboardingProposalConflictError";
|
|
74
|
+
readonly code = "WORKSPACE_INSTRUCTION_POLICY_ONBOARDING_PROPOSAL_CONFLICT";
|
|
75
|
+
constructor(existingProposalId: string, existingDraftRevisionId: string);
|
|
76
|
+
}
|
|
47
77
|
export declare class WorkspaceInstructionPolicySnapshotAuthorityError extends Error {
|
|
48
78
|
readonly name = "WorkspaceInstructionPolicySnapshotAuthorityError";
|
|
49
79
|
}
|
|
@@ -90,6 +120,10 @@ export declare function createWorkspaceInstructionPolicyDraft(db: Database, inpu
|
|
|
90
120
|
export declare function importLegacyWorkspaceInstructionPolicyDraft(db: Database, input: Omit<ImportLegacyRequestInput, "operationId"> & {
|
|
91
121
|
operationId?: string;
|
|
92
122
|
}): Promise<WorkspaceInstructionPolicyRevision>;
|
|
123
|
+
export declare function createWorkspaceInstructionPolicyOnboardingProposal(db: Database, input: Omit<OnboardingProposalRequestInput, "operationId"> & {
|
|
124
|
+
operationId?: string;
|
|
125
|
+
}): Promise<WorkspaceInstructionPolicyOnboardingProposal>;
|
|
126
|
+
export declare function listWorkspaceInstructionPolicyOnboardingProposals(db: Database, workspaceId: string, query: WorkspaceInstructionPolicyOnboardingProposalListQuery): Promise<WorkspaceInstructionPolicyOnboardingProposalListResponse>;
|
|
93
127
|
export declare function listWorkspaceInstructionPolicyRevisions(db: Database, workspaceId: string, query: WorkspaceInstructionPolicyListQuery): Promise<WorkspaceInstructionPolicyListResponse>;
|
|
94
128
|
export declare function getWorkspaceInstructionPolicyRevision(db: Database, workspaceId: string, revisionId: string): Promise<WorkspaceInstructionPolicyRevision>;
|
|
95
129
|
/** Deterministic, dependency-free unified line diff; large inputs degrade to a full replacement. */
|