@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
|
@@ -19,6 +19,40 @@ export declare const workspaceInstructionPolicyRevisions: import("drizzle-orm/pg
|
|
|
19
19
|
identity: undefined;
|
|
20
20
|
generated: undefined;
|
|
21
21
|
}, {}, {}>;
|
|
22
|
+
operationId: import("drizzle-orm/pg-core").PgColumn<{
|
|
23
|
+
name: "operation_id";
|
|
24
|
+
tableName: "workspace_instruction_policy_revisions";
|
|
25
|
+
dataType: "string";
|
|
26
|
+
columnType: "PgUUID";
|
|
27
|
+
data: string;
|
|
28
|
+
driverParam: string;
|
|
29
|
+
notNull: false;
|
|
30
|
+
hasDefault: false;
|
|
31
|
+
isPrimaryKey: false;
|
|
32
|
+
isAutoincrement: false;
|
|
33
|
+
hasRuntimeDefault: false;
|
|
34
|
+
enumValues: undefined;
|
|
35
|
+
baseColumn: never;
|
|
36
|
+
identity: undefined;
|
|
37
|
+
generated: undefined;
|
|
38
|
+
}, {}, {}>;
|
|
39
|
+
requestFingerprint: import("drizzle-orm/pg-core").PgColumn<{
|
|
40
|
+
name: "request_fingerprint";
|
|
41
|
+
tableName: "workspace_instruction_policy_revisions";
|
|
42
|
+
dataType: "string";
|
|
43
|
+
columnType: "PgText";
|
|
44
|
+
data: string;
|
|
45
|
+
driverParam: string;
|
|
46
|
+
notNull: false;
|
|
47
|
+
hasDefault: false;
|
|
48
|
+
isPrimaryKey: false;
|
|
49
|
+
isAutoincrement: false;
|
|
50
|
+
hasRuntimeDefault: false;
|
|
51
|
+
enumValues: [string, ...string[]];
|
|
52
|
+
baseColumn: never;
|
|
53
|
+
identity: undefined;
|
|
54
|
+
generated: undefined;
|
|
55
|
+
}, {}, {}>;
|
|
22
56
|
accountId: import("drizzle-orm/pg-core").PgColumn<{
|
|
23
57
|
name: "account_id";
|
|
24
58
|
tableName: "workspace_instruction_policy_revisions";
|
|
@@ -458,6 +492,40 @@ export declare const workspaceInstructionPolicyActivationEvents: import("drizzle
|
|
|
458
492
|
identity: undefined;
|
|
459
493
|
generated: undefined;
|
|
460
494
|
}, {}, {}>;
|
|
495
|
+
operationId: import("drizzle-orm/pg-core").PgColumn<{
|
|
496
|
+
name: "operation_id";
|
|
497
|
+
tableName: "workspace_instruction_policy_activation_events";
|
|
498
|
+
dataType: "string";
|
|
499
|
+
columnType: "PgUUID";
|
|
500
|
+
data: string;
|
|
501
|
+
driverParam: string;
|
|
502
|
+
notNull: false;
|
|
503
|
+
hasDefault: false;
|
|
504
|
+
isPrimaryKey: false;
|
|
505
|
+
isAutoincrement: false;
|
|
506
|
+
hasRuntimeDefault: false;
|
|
507
|
+
enumValues: undefined;
|
|
508
|
+
baseColumn: never;
|
|
509
|
+
identity: undefined;
|
|
510
|
+
generated: undefined;
|
|
511
|
+
}, {}, {}>;
|
|
512
|
+
requestFingerprint: import("drizzle-orm/pg-core").PgColumn<{
|
|
513
|
+
name: "request_fingerprint";
|
|
514
|
+
tableName: "workspace_instruction_policy_activation_events";
|
|
515
|
+
dataType: "string";
|
|
516
|
+
columnType: "PgText";
|
|
517
|
+
data: string;
|
|
518
|
+
driverParam: string;
|
|
519
|
+
notNull: false;
|
|
520
|
+
hasDefault: false;
|
|
521
|
+
isPrimaryKey: false;
|
|
522
|
+
isAutoincrement: false;
|
|
523
|
+
hasRuntimeDefault: false;
|
|
524
|
+
enumValues: [string, ...string[]];
|
|
525
|
+
baseColumn: never;
|
|
526
|
+
identity: undefined;
|
|
527
|
+
generated: undefined;
|
|
528
|
+
}, {}, {}>;
|
|
461
529
|
accountId: import("drizzle-orm/pg-core").PgColumn<{
|
|
462
530
|
name: "account_id";
|
|
463
531
|
tableName: "workspace_instruction_policy_activation_events";
|
|
@@ -733,6 +801,387 @@ export declare const workspaceInstructionPolicyActivationEvents: import("drizzle
|
|
|
733
801
|
};
|
|
734
802
|
dialect: 'pg';
|
|
735
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
|
+
}>;
|
|
736
1185
|
export declare const workspaceInstructionPolicySnapshots: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
737
1186
|
name: "workspace_instruction_policy_snapshots";
|
|
738
1187
|
schema: undefined;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { WorkspaceInstructionPolicySnapshot } from "@opengeni/contracts";
|
|
2
|
+
import type { WorkspaceInstructionPolicyActivationResponse, WorkspaceInstructionPolicyDiffResponse, WorkspaceInstructionPolicyDraftProvenanceSource, WorkspaceInstructionPolicyHead, WorkspaceInstructionPolicyListQuery, WorkspaceInstructionPolicyListResponse, WorkspaceInstructionPolicyOnboardingProposal, WorkspaceInstructionPolicyOnboardingProposalListQuery, WorkspaceInstructionPolicyOnboardingProposalListResponse, WorkspaceInstructionPolicyProvenanceSource, WorkspaceInstructionPolicyRevision, WorkspaceInstructionPolicyTarget } from "@opengeni/contracts";
|
|
2
3
|
import type { Database } from "./index";
|
|
3
|
-
type
|
|
4
|
+
type DraftRequestInput = WorkspaceInstructionPolicyTarget & {
|
|
5
|
+
operationId: string;
|
|
4
6
|
accountId: string;
|
|
5
7
|
workspaceId: string;
|
|
6
8
|
content: string;
|
|
@@ -9,15 +11,40 @@ type DraftInput = WorkspaceInstructionPolicyTarget & {
|
|
|
9
11
|
supersedesRevisionId: string | null;
|
|
10
12
|
createdBySubjectId: string;
|
|
11
13
|
};
|
|
12
|
-
type CallerDraftInput = Omit<
|
|
14
|
+
type CallerDraftInput = Omit<DraftRequestInput, "operationId" | "provenanceSource"> & {
|
|
15
|
+
operationId?: string;
|
|
13
16
|
provenanceSource: WorkspaceInstructionPolicyDraftProvenanceSource;
|
|
14
17
|
};
|
|
18
|
+
type ImportLegacyRequestInput = {
|
|
19
|
+
operationId: string;
|
|
20
|
+
accountId: string;
|
|
21
|
+
workspaceId: string;
|
|
22
|
+
createdBySubjectId: string;
|
|
23
|
+
supersedesRevisionId: string | null;
|
|
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
|
+
};
|
|
15
37
|
export declare class WorkspaceInstructionPolicyConflictError extends Error {
|
|
16
38
|
readonly currentHead: WorkspaceInstructionPolicyHead | null;
|
|
17
39
|
readonly name = "WorkspaceInstructionPolicyConflictError";
|
|
18
40
|
readonly code = "WORKSPACE_INSTRUCTION_POLICY_CONFLICT";
|
|
19
41
|
constructor(currentHead: WorkspaceInstructionPolicyHead | null);
|
|
20
42
|
}
|
|
43
|
+
export declare class WorkspaceInstructionPolicyOperationReuseError extends Error {
|
|
44
|
+
readonly name = "WorkspaceInstructionPolicyOperationReuseError";
|
|
45
|
+
readonly code = "WORKSPACE_INSTRUCTION_POLICY_OPERATION_REUSED";
|
|
46
|
+
constructor();
|
|
47
|
+
}
|
|
21
48
|
export declare class WorkspaceInstructionPolicyNotFoundError extends Error {
|
|
22
49
|
readonly name = "WorkspaceInstructionPolicyNotFoundError";
|
|
23
50
|
constructor(message?: string);
|
|
@@ -29,6 +56,24 @@ export declare class WorkspaceInstructionPolicyLegacyUnavailableError extends Er
|
|
|
29
56
|
readonly name = "WorkspaceInstructionPolicyLegacyUnavailableError";
|
|
30
57
|
constructor();
|
|
31
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
|
+
}
|
|
32
77
|
export declare class WorkspaceInstructionPolicySnapshotAuthorityError extends Error {
|
|
33
78
|
readonly name = "WorkspaceInstructionPolicySnapshotAuthorityError";
|
|
34
79
|
}
|
|
@@ -40,14 +85,45 @@ export type WorkspaceInstructionPolicyAttemptClaims = {
|
|
|
40
85
|
attemptId: string;
|
|
41
86
|
executionGeneration: number;
|
|
42
87
|
};
|
|
43
|
-
export
|
|
44
|
-
|
|
45
|
-
|
|
88
|
+
export type WorkspaceStateAcceptedAttemptGovernance = {
|
|
89
|
+
attemptId: string;
|
|
90
|
+
executionGeneration: number;
|
|
91
|
+
acceptedAt: string;
|
|
92
|
+
policySnapshot: WorkspaceInstructionPolicySnapshot | null;
|
|
93
|
+
preferenceSnapshot: {
|
|
94
|
+
id: string;
|
|
95
|
+
descriptorHash: string;
|
|
96
|
+
descriptors: Array<{
|
|
97
|
+
id: string;
|
|
98
|
+
revisionId: string;
|
|
99
|
+
contentHash: string;
|
|
100
|
+
activeVersion: number;
|
|
101
|
+
scope: "organization" | "workspace" | "user";
|
|
102
|
+
}>;
|
|
103
|
+
truncated: boolean;
|
|
104
|
+
createdAt: string;
|
|
105
|
+
} | null;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Inspect one immutable accepted attempt only when the authenticated caller is
|
|
109
|
+
* exactly its frozen initiating human. The null result deliberately conflates
|
|
110
|
+
* absence, cross-account/workspace lookup, and another subject's attempt.
|
|
111
|
+
*/
|
|
112
|
+
export declare function getWorkspaceStateAcceptedAttemptGovernance(db: Database, input: {
|
|
46
113
|
accountId: string;
|
|
47
114
|
workspaceId: string;
|
|
48
|
-
|
|
49
|
-
|
|
115
|
+
subjectId: string;
|
|
116
|
+
attemptId: string;
|
|
117
|
+
}): Promise<WorkspaceStateAcceptedAttemptGovernance | null>;
|
|
118
|
+
export declare function createWorkspaceInstructionPolicyDraft(db: Database, input: CallerDraftInput): Promise<WorkspaceInstructionPolicyRevision>;
|
|
119
|
+
/** Import only the stored legacy override; never materialize a deployment default or activate it. */
|
|
120
|
+
export declare function importLegacyWorkspaceInstructionPolicyDraft(db: Database, input: Omit<ImportLegacyRequestInput, "operationId"> & {
|
|
121
|
+
operationId?: string;
|
|
50
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>;
|
|
51
127
|
export declare function listWorkspaceInstructionPolicyRevisions(db: Database, workspaceId: string, query: WorkspaceInstructionPolicyListQuery): Promise<WorkspaceInstructionPolicyListResponse>;
|
|
52
128
|
export declare function getWorkspaceInstructionPolicyRevision(db: Database, workspaceId: string, revisionId: string): Promise<WorkspaceInstructionPolicyRevision>;
|
|
53
129
|
/** Deterministic, dependency-free unified line diff; large inputs degrade to a full replacement. */
|
|
@@ -57,18 +133,22 @@ export declare function diffWorkspaceInstructionPolicyRevisions(db: Database, wo
|
|
|
57
133
|
toRevisionId: string;
|
|
58
134
|
}): Promise<WorkspaceInstructionPolicyDiffResponse>;
|
|
59
135
|
export declare function activateWorkspaceInstructionPolicyRevision(db: Database, input: {
|
|
136
|
+
operationId?: string;
|
|
60
137
|
accountId: string;
|
|
61
138
|
workspaceId: string;
|
|
62
139
|
revisionId: string;
|
|
63
140
|
expectedCurrentRevisionId: string | null;
|
|
141
|
+
expectedActivationVersion?: number;
|
|
64
142
|
actorSubjectId: string;
|
|
65
143
|
reason: string;
|
|
66
144
|
}): Promise<WorkspaceInstructionPolicyActivationResponse>;
|
|
67
145
|
export declare function rollbackWorkspaceInstructionPolicyRevision(db: Database, input: {
|
|
146
|
+
operationId?: string;
|
|
68
147
|
accountId: string;
|
|
69
148
|
workspaceId: string;
|
|
70
149
|
targetRevisionId: string;
|
|
71
150
|
expectedCurrentRevisionId: string;
|
|
151
|
+
expectedActivationVersion?: number;
|
|
72
152
|
actorSubjectId: string;
|
|
73
153
|
reason: string;
|
|
74
154
|
}): Promise<WorkspaceInstructionPolicyActivationResponse>;
|