@ai-matrx/records 0.5.1 → 0.6.2

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.
@@ -211,7 +211,7 @@ declare const STORE_DOORS: readonly [{
211
211
  readonly name: "agg_explain";
212
212
  readonly args: "p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_required text DEFAULT 'viewer'::text";
213
213
  readonly returns: "jsonb";
214
- readonly security: "invoker";
214
+ readonly security: "definer";
215
215
  }, {
216
216
  readonly name: "agg_operations";
217
217
  readonly args: "";
@@ -302,11 +302,26 @@ declare const STORE_DOORS: readonly [{
302
302
  readonly args: "p_organization_id uuid, p_subject_id uuid, p_door text, p_required permission_level DEFAULT 'editor'::permission_level, p_subject_word text DEFAULT 'record'::text";
303
303
  readonly returns: "void";
304
304
  readonly security: "invoker";
305
+ }, {
306
+ readonly name: "assert_client_may_open";
307
+ readonly args: "p_organization_id uuid, p_subject_id uuid, p_door text, p_required permission_level DEFAULT 'viewer'::permission_level, p_subject_word text DEFAULT 'record'::text";
308
+ readonly returns: "void";
309
+ readonly security: "invoker";
305
310
  }, {
306
311
  readonly name: "assert_client_may_reach";
307
312
  readonly args: "p_organization_id uuid, p_door text";
308
313
  readonly returns: "void";
309
314
  readonly security: "invoker";
315
+ }, {
316
+ readonly name: "assert_may_know_table";
317
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_door text";
318
+ readonly returns: "void";
319
+ readonly security: "invoker";
320
+ }, {
321
+ readonly name: "assert_organization_admin";
322
+ readonly args: "p_organization_id uuid, p_door text, p_what text";
323
+ readonly returns: "void";
324
+ readonly security: "invoker";
310
325
  }, {
311
326
  readonly name: "assert_organization_wall";
312
327
  readonly args: "p_kind text, p_organization_id uuid, p_row jsonb";
@@ -362,11 +377,26 @@ declare const STORE_DOORS: readonly [{
362
377
  readonly args: "p_data jsonb";
363
378
  readonly returns: "uuid";
364
379
  readonly security: "invoker";
380
+ }, {
381
+ readonly name: "cross_organization_links_open";
382
+ readonly args: "p_source_organization_id uuid, p_target_organization_id uuid";
383
+ readonly returns: "boolean";
384
+ readonly security: "invoker";
365
385
  }, {
366
386
  readonly name: "custom_fields_tables";
367
387
  readonly args: "";
368
388
  readonly returns: "TABLE(token text, schema_name text, table_name text)";
369
389
  readonly security: "invoker";
390
+ }, {
391
+ readonly name: "delete_cascade_closure";
392
+ readonly args: "p_organization_id uuid, p_record_id uuid";
393
+ readonly returns: "uuid[]";
394
+ readonly security: "invoker";
395
+ }, {
396
+ readonly name: "delete_rule";
397
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_apply boolean DEFAULT true";
398
+ readonly returns: "jsonb";
399
+ readonly security: "definer";
370
400
  }, {
371
401
  readonly name: "dependency_cycle";
372
402
  readonly args: "p_organization_id uuid, p_row custom.record";
@@ -522,6 +552,16 @@ declare const STORE_DOORS: readonly [{
522
552
  readonly args: "p_organization_id uuid, p_source_id uuid, p_enabled boolean";
523
553
  readonly returns: "boolean";
524
554
  readonly security: "definer";
555
+ }, {
556
+ readonly name: "field_behaviour";
557
+ readonly args: "p_field_data jsonb";
558
+ readonly returns: "text";
559
+ readonly security: "invoker";
560
+ }, {
561
+ readonly name: "field_declare";
562
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb";
563
+ readonly returns: "uuid";
564
+ readonly security: "definer";
525
565
  }, {
526
566
  readonly name: "field_dependants";
527
567
  readonly args: "p_organization_id uuid, p_field_id uuid";
@@ -536,12 +576,27 @@ declare const STORE_DOORS: readonly [{
536
576
  readonly name: "field_options";
537
577
  readonly args: "p_organization_id uuid, p_field_id uuid";
538
578
  readonly returns: "SETOF custom.record";
539
- readonly security: "invoker";
579
+ readonly security: "definer";
580
+ }, {
581
+ readonly name: "field_retire";
582
+ readonly args: "p_organization_id uuid, p_field_id uuid";
583
+ readonly returns: "boolean";
584
+ readonly security: "definer";
540
585
  }, {
541
586
  readonly name: "field_rules";
542
587
  readonly args: "p_field_data jsonb";
543
588
  readonly returns: "TABLE(kind text, spec jsonb)";
544
589
  readonly security: "invoker";
590
+ }, {
591
+ readonly name: "field_update";
592
+ readonly args: "p_organization_id uuid, p_field_id uuid, p_patch jsonb";
593
+ readonly returns: "uuid";
594
+ readonly security: "definer";
595
+ }, {
596
+ readonly name: "field_value_convert";
597
+ readonly args: "p_to jsonb, p_value jsonb";
598
+ readonly returns: "jsonb";
599
+ readonly security: "invoker";
545
600
  }, {
546
601
  readonly name: "file_kernel_id";
547
602
  readonly args: "";
@@ -567,11 +622,31 @@ declare const STORE_DOORS: readonly [{
567
622
  readonly args: "p_field custom.record, p_action text DEFAULT 'read'::text";
568
623
  readonly returns: "jsonb";
569
624
  readonly security: "invoker";
625
+ }, {
626
+ readonly name: "history_prune";
627
+ readonly args: "p_organization_id uuid, p_scope text DEFAULT 'values'::text, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true";
628
+ readonly returns: "jsonb";
629
+ readonly security: "definer";
630
+ }, {
631
+ readonly name: "history_retention";
632
+ readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid";
633
+ readonly returns: "jsonb";
634
+ readonly security: "definer";
635
+ }, {
636
+ readonly name: "history_retention_floor_raise";
637
+ readonly args: "p_organization_id uuid, p_days integer";
638
+ readonly returns: "integer";
639
+ readonly security: "definer";
640
+ }, {
641
+ readonly name: "history_retention_set";
642
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_days integer";
643
+ readonly returns: "integer";
644
+ readonly security: "definer";
570
645
  }, {
571
646
  readonly name: "home_add";
572
647
  readonly args: "p_organization_id uuid, p_table_id uuid, p_home_record_id uuid";
573
648
  readonly returns: "uuid";
574
- readonly security: "invoker";
649
+ readonly security: "definer";
575
650
  }, {
576
651
  readonly name: "home_relations";
577
652
  readonly args: "";
@@ -629,7 +704,7 @@ declare const STORE_DOORS: readonly [{
629
704
  readonly security: "definer";
630
705
  }, {
631
706
  readonly name: "io_export_csv";
632
- readonly args: "p_organization_id uuid, p_table_id uuid, p_columns text[] DEFAULT NULL::text[], p_limit integer DEFAULT 10000, p_delimiter text DEFAULT ','::text, p_required text DEFAULT 'viewer'::text";
707
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_columns text[] DEFAULT NULL::text[], p_limit integer DEFAULT 10000, p_delimiter text DEFAULT chr(44), p_required text DEFAULT 'viewer'::text";
633
708
  readonly returns: "text";
634
709
  readonly security: "definer";
635
710
  }, {
@@ -685,7 +760,7 @@ declare const STORE_DOORS: readonly [{
685
760
  }, {
686
761
  readonly name: "io_revisions";
687
762
  readonly args: "p_organization_id uuid, p_record_id uuid";
688
- readonly returns: "TABLE(version integer, changed_at timestamp with time zone, changed_by uuid, summary text)";
763
+ readonly returns: "TABLE(version integer, changed_at timestamp with time zone, changed_by uuid, summary text, operation text, changed_fields jsonb)";
689
764
  readonly security: "definer";
690
765
  }, {
691
766
  readonly name: "lookup_value";
@@ -711,42 +786,42 @@ declare const STORE_DOORS: readonly [{
711
786
  readonly name: "migrate_delete";
712
787
  readonly args: "p_organization_id uuid, p_record_id uuid, p_note text DEFAULT NULL::text";
713
788
  readonly returns: "jsonb";
714
- readonly security: "invoker";
789
+ readonly security: "definer";
715
790
  }, {
716
791
  readonly name: "migrate_demote";
717
792
  readonly args: "p_organization_id uuid, p_table_id uuid, p_note text DEFAULT NULL::text";
718
793
  readonly returns: "jsonb";
719
- readonly security: "invoker";
794
+ readonly security: "definer";
720
795
  }, {
721
796
  readonly name: "migrate_extract_parent";
722
797
  readonly args: "p_organization_id uuid, p_id uuid, p_parent_table_id uuid, p_moved_keys text[], p_note text DEFAULT NULL::text";
723
798
  readonly returns: "jsonb";
724
- readonly security: "invoker";
799
+ readonly security: "definer";
725
800
  }, {
726
801
  readonly name: "migrate_merge";
727
802
  readonly args: "p_organization_id uuid, p_winner_id uuid, p_loser_id uuid, p_note text DEFAULT NULL::text";
728
803
  readonly returns: "jsonb";
729
- readonly security: "invoker";
804
+ readonly security: "definer";
730
805
  }, {
731
806
  readonly name: "migrate_promote";
732
807
  readonly args: "p_organization_id uuid, p_table_id uuid, p_note text DEFAULT NULL::text";
733
808
  readonly returns: "jsonb";
734
- readonly security: "invoker";
809
+ readonly security: "definer";
735
810
  }, {
736
811
  readonly name: "migrate_purge";
737
812
  readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true";
738
813
  readonly returns: "jsonb";
739
- readonly security: "invoker";
814
+ readonly security: "definer";
740
815
  }, {
741
816
  readonly name: "migrate_rename";
742
817
  readonly args: "p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text";
743
818
  readonly returns: "jsonb";
744
- readonly security: "invoker";
819
+ readonly security: "definer";
745
820
  }, {
746
821
  readonly name: "migrate_reparent";
747
822
  readonly args: "p_organization_id uuid, p_id uuid, p_parent_id uuid, p_note text DEFAULT NULL::text";
748
823
  readonly returns: "jsonb";
749
- readonly security: "invoker";
824
+ readonly security: "definer";
750
825
  }, {
751
826
  readonly name: "migrate_retype";
752
827
  readonly args: "p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text";
@@ -756,7 +831,12 @@ declare const STORE_DOORS: readonly [{
756
831
  readonly name: "migrate_split";
757
832
  readonly args: "p_organization_id uuid, p_record_id uuid, p_moved_keys text[], p_note text DEFAULT NULL::text";
758
833
  readonly returns: "jsonb";
759
- readonly security: "invoker";
834
+ readonly security: "definer";
835
+ }, {
836
+ readonly name: "migrate_undo";
837
+ readonly args: "p_organization_id uuid, p_log_id uuid";
838
+ readonly returns: "jsonb";
839
+ readonly security: "definer";
760
840
  }, {
761
841
  readonly name: "organization_kernel_id";
762
842
  readonly args: "";
@@ -767,6 +847,16 @@ declare const STORE_DOORS: readonly [{
767
847
  readonly args: "p_kind text, p_organization_id uuid, p_row jsonb";
768
848
  readonly returns: "TABLE(site text, what text, ref_id uuid, openable boolean)";
769
849
  readonly security: "invoker";
850
+ }, {
851
+ readonly name: "owning_table";
852
+ readonly args: "p_organization_id uuid, p_record_id uuid";
853
+ readonly returns: "uuid";
854
+ readonly security: "invoker";
855
+ }, {
856
+ readonly name: "owning_table_gone";
857
+ readonly args: "p_organization_id uuid, p_record_id uuid";
858
+ readonly returns: "boolean";
859
+ readonly security: "invoker";
770
860
  }, {
771
861
  readonly name: "parity_field_types";
772
862
  readonly args: "";
@@ -866,17 +956,17 @@ declare const STORE_DOORS: readonly [{
866
956
  readonly name: "query_across_homes";
867
957
  readonly args: "p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_required text DEFAULT 'viewer'::text";
868
958
  readonly returns: "TABLE(record_id uuid, home_record_id uuid, data jsonb, created_at timestamp with time zone)";
869
- readonly security: "invoker";
959
+ readonly security: "definer";
870
960
  }, {
871
961
  readonly name: "query_by_coordinates";
872
962
  readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_coordinates jsonb DEFAULT '[]'::jsonb, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_required text DEFAULT 'viewer'::text";
873
963
  readonly returns: "TABLE(record_id uuid, table_id uuid, data jsonb, coordinates_matched integer)";
874
- readonly security: "invoker";
964
+ readonly security: "definer";
875
965
  }, {
876
966
  readonly name: "query_can_see";
877
967
  readonly args: "p_organization_id uuid, p_record_id uuid, p_required text DEFAULT 'viewer'::text";
878
968
  readonly returns: "boolean";
879
- readonly security: "invoker";
969
+ readonly security: "definer";
880
970
  }, {
881
971
  readonly name: "query_hot_paths";
882
972
  readonly args: "";
@@ -906,37 +996,42 @@ declare const STORE_DOORS: readonly [{
906
996
  readonly name: "query_record_as_of";
907
997
  readonly args: "p_organization_id uuid, p_record_id uuid, p_recorded_at timestamp with time zone DEFAULT NULL::timestamp with time zone, p_world_on date DEFAULT NULL::date, p_required text DEFAULT 'viewer'::text";
908
998
  readonly returns: "jsonb";
909
- readonly security: "invoker";
999
+ readonly security: "definer";
910
1000
  }, {
911
1001
  readonly name: "query_relation_edges";
912
1002
  readonly args: "p_organization_id uuid, p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text";
913
1003
  readonly returns: "TABLE(parent_id uuid, child_id uuid, role text, flavor text)";
914
- readonly security: "invoker";
1004
+ readonly security: "definer";
915
1005
  }, {
916
1006
  readonly name: "query_rollup";
917
1007
  readonly args: "p_organization_id uuid, p_roots uuid[], p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text, p_max_depth integer DEFAULT 33, p_required text DEFAULT 'viewer'::text";
918
1008
  readonly returns: "TABLE(record_id uuid, depth integer)";
919
- readonly security: "invoker";
1009
+ readonly security: "definer";
920
1010
  }, {
921
1011
  readonly name: "query_rollup_sum";
922
1012
  readonly args: "p_organization_id uuid, p_roots uuid[], p_field_key text, p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text, p_max_depth integer DEFAULT 33, p_required text DEFAULT 'viewer'::text";
923
1013
  readonly returns: "numeric";
924
- readonly security: "invoker";
1014
+ readonly security: "definer";
925
1015
  }, {
926
1016
  readonly name: "query_table_as_of";
927
1017
  readonly args: "p_organization_id uuid, p_table_id uuid, p_recorded_at timestamp with time zone DEFAULT NULL::timestamp with time zone, p_world_on date DEFAULT NULL::date, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_required text DEFAULT 'viewer'::text";
928
1018
  readonly returns: "TABLE(record_id uuid, data jsonb)";
929
- readonly security: "invoker";
1019
+ readonly security: "definer";
930
1020
  }, {
931
1021
  readonly name: "query_table_homes";
932
1022
  readonly args: "p_organization_id uuid, p_table_id uuid";
933
1023
  readonly returns: "SETOF uuid";
934
- readonly security: "invoker";
1024
+ readonly security: "definer";
1025
+ }, {
1026
+ readonly name: "query_visibility_parity";
1027
+ readonly args: "p_organization_id uuid";
1028
+ readonly returns: "TABLE(side text, container_type text, container_id uuid, item_type text, item_id uuid, stored_level permission_level, derived_level permission_level, reason text)";
1029
+ readonly security: "definer";
935
1030
  }, {
936
1031
  readonly name: "query_visible_ids";
937
1032
  readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_required text DEFAULT 'viewer'::text";
938
1033
  readonly returns: "SETOF uuid";
939
- readonly security: "invoker";
1034
+ readonly security: "definer";
940
1035
  }, {
941
1036
  readonly name: "reachable_from";
942
1037
  readonly args: "p_organization_id uuid, p_roots uuid[]";
@@ -961,27 +1056,52 @@ declare const STORE_DOORS: readonly [{
961
1056
  readonly name: "record_aggregate";
962
1057
  readonly args: "p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 200, p_required text DEFAULT 'viewer'::text";
963
1058
  readonly returns: "TABLE(groups jsonb, measures jsonb, row_count bigint)";
964
- readonly security: "invoker";
1059
+ readonly security: "definer";
965
1060
  }, {
966
1061
  readonly name: "record_applicability";
967
1062
  readonly args: "p_organization_id uuid, p_record_id uuid";
968
1063
  readonly returns: "TABLE(rule_id uuid, rule_name text, rule_version integer, applies boolean, answer jsonb)";
969
1064
  readonly security: "invoker";
1065
+ }, {
1066
+ readonly name: "record_card";
1067
+ readonly args: "p_viewer uuid, p_organization_id uuid, p_record_id uuid";
1068
+ readonly returns: "jsonb";
1069
+ readonly security: "definer";
1070
+ }, {
1071
+ readonly name: "record_carrying_edges";
1072
+ readonly args: "p_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone";
1073
+ readonly returns: "TABLE(container_id uuid, item_id uuid, edge_role text)";
1074
+ readonly security: "invoker";
970
1075
  }, {
971
1076
  readonly name: "record_delete";
972
1077
  readonly args: "p_organization_id uuid, p_record_id uuid";
973
1078
  readonly returns: "timestamp with time zone";
974
1079
  readonly security: "definer";
1080
+ }, {
1081
+ readonly name: "record_relation_edges";
1082
+ readonly args: "p_organization_id uuid, p_id uuid, p_table_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone";
1083
+ readonly returns: "TABLE(target_id uuid, edge_role text, field_id uuid, ord integer)";
1084
+ readonly security: "invoker";
975
1085
  }, {
976
1086
  readonly name: "record_reparent";
977
1087
  readonly args: "p_organization_id uuid, p_record_id uuid, p_parent_id uuid";
978
1088
  readonly returns: "void";
979
- readonly security: "invoker";
1089
+ readonly security: "definer";
1090
+ }, {
1091
+ readonly name: "record_resolve";
1092
+ readonly args: "p_organization_id uuid, p_id uuid";
1093
+ readonly returns: "jsonb";
1094
+ readonly security: "definer";
980
1095
  }, {
981
1096
  readonly name: "record_restore";
982
1097
  readonly args: "p_organization_id uuid, p_record_id uuid";
983
1098
  readonly returns: "void";
984
1099
  readonly security: "definer";
1100
+ }, {
1101
+ readonly name: "record_state_as_of";
1102
+ readonly args: "p_record_id uuid, p_at timestamp with time zone";
1103
+ readonly returns: "TABLE(state jsonb, replayed boolean)";
1104
+ readonly security: "definer";
985
1105
  }, {
986
1106
  readonly name: "record_update";
987
1107
  readonly args: "p_organization_id uuid, p_record_id uuid, p_patch jsonb, p_expected_version integer DEFAULT NULL::integer";
@@ -996,17 +1116,27 @@ declare const STORE_DOORS: readonly [{
996
1116
  readonly name: "record_values_versioned";
997
1117
  readonly args: "p_organization_id uuid, p_record_id uuid";
998
1118
  readonly returns: "TABLE(field_key text, field_id uuid, value jsonb, value_version integer, source jsonb, absent_reason text, actor text, on_behalf_of text, written_at timestamp with time zone, alternates jsonb)";
999
- readonly security: "invoker";
1119
+ readonly security: "definer";
1000
1120
  }, {
1001
1121
  readonly name: "record_write";
1002
1122
  readonly args: "p_organization_id uuid, p_table_id uuid, p_data jsonb";
1003
1123
  readonly returns: "uuid";
1004
1124
  readonly security: "definer";
1125
+ }, {
1126
+ readonly name: "relation_carry";
1127
+ readonly args: "p_organization_id uuid, p_container_id uuid, p_item_id uuid";
1128
+ readonly returns: "uuid";
1129
+ readonly security: "definer";
1005
1130
  }, {
1006
1131
  readonly name: "relation_own";
1007
1132
  readonly args: "p_organization_id uuid, p_owner_id uuid, p_target_id uuid";
1008
1133
  readonly returns: "uuid";
1009
- readonly security: "invoker";
1134
+ readonly security: "definer";
1135
+ }, {
1136
+ readonly name: "relation_target_card";
1137
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_via_key text DEFAULT NULL::text";
1138
+ readonly returns: "TABLE(target_id uuid, target_organization_id uuid, is_foreign boolean, masked boolean, reader_level permission_level, card jsonb, why text)";
1139
+ readonly security: "definer";
1010
1140
  }, {
1011
1141
  readonly name: "relation_target_external";
1012
1142
  readonly args: "p_connection_token text, p_external_table text, p_external_key text";
@@ -1021,7 +1151,12 @@ declare const STORE_DOORS: readonly [{
1021
1151
  readonly name: "relation_targets";
1022
1152
  readonly args: "p_organization_id uuid, p_record_id uuid, p_via_key text";
1023
1153
  readonly returns: "SETOF uuid";
1024
- readonly security: "invoker";
1154
+ readonly security: "definer";
1155
+ }, {
1156
+ readonly name: "relation_uncarry";
1157
+ readonly args: "p_organization_id uuid, p_container_id uuid, p_item_id uuid";
1158
+ readonly returns: "integer";
1159
+ readonly security: "definer";
1025
1160
  }, {
1026
1161
  readonly name: "reopen_declared_doors";
1027
1162
  readonly args: "";
@@ -1122,6 +1257,46 @@ declare const STORE_DOORS: readonly [{
1122
1257
  readonly args: "p_organization_id uuid, p_rule_id uuid";
1123
1258
  readonly returns: "integer";
1124
1259
  readonly security: "invoker";
1260
+ }, {
1261
+ readonly name: "share_access";
1262
+ readonly args: "p_organization_id uuid, p_subject_id uuid";
1263
+ readonly returns: "TABLE(principal_kind text, principal_id uuid, principal_label text, level permission_level, reason text, reason_detail text, via_type text, via_id uuid, revocable boolean)";
1264
+ readonly security: "definer";
1265
+ }, {
1266
+ readonly name: "share_grant";
1267
+ readonly args: "p_organization_id uuid, p_subject_id uuid, p_principal_kind text, p_principal_id uuid, p_level permission_level DEFAULT 'viewer'::permission_level";
1268
+ readonly returns: "jsonb";
1269
+ readonly security: "definer";
1270
+ }, {
1271
+ readonly name: "share_lane_set";
1272
+ readonly args: "p_organization_id uuid, p_subject_id uuid, p_choice text, p_level permission_level DEFAULT NULL::permission_level";
1273
+ readonly returns: "jsonb";
1274
+ readonly security: "definer";
1275
+ }, {
1276
+ readonly name: "share_lanes";
1277
+ readonly args: "";
1278
+ readonly returns: "TABLE(choice text, lane text, discoverable boolean, label text, means text)";
1279
+ readonly security: "definer";
1280
+ }, {
1281
+ readonly name: "share_levels";
1282
+ readonly args: "";
1283
+ readonly returns: "TABLE(level permission_level, ordinal integer, label text, means text)";
1284
+ readonly security: "definer";
1285
+ }, {
1286
+ readonly name: "share_people";
1287
+ readonly args: "p_organization_id uuid, p_subject_id uuid DEFAULT NULL::uuid, p_query text DEFAULT NULL::text, p_limit integer DEFAULT 25";
1288
+ readonly returns: "TABLE(user_id uuid, email text, display_name text, membership text, already_at permission_level, already_why text)";
1289
+ readonly security: "definer";
1290
+ }, {
1291
+ readonly name: "share_revoke";
1292
+ readonly args: "p_organization_id uuid, p_subject_id uuid, p_principal_kind text, p_principal_id uuid";
1293
+ readonly returns: "jsonb";
1294
+ readonly security: "definer";
1295
+ }, {
1296
+ readonly name: "share_subject_name";
1297
+ readonly args: "p_organization_id uuid, p_type text, p_id uuid";
1298
+ readonly returns: "text";
1299
+ readonly security: "definer";
1125
1300
  }, {
1126
1301
  readonly name: "size_refusal";
1127
1302
  readonly args: "p_organization_id uuid, p_data jsonb";
@@ -1157,11 +1332,21 @@ declare const STORE_DOORS: readonly [{
1157
1332
  readonly args: "p_organization_id uuid, p_table_id uuid";
1158
1333
  readonly returns: "jsonb";
1159
1334
  readonly security: "definer";
1335
+ }, {
1336
+ readonly name: "table_contents";
1337
+ readonly args: "p_organization_id uuid, p_table_id uuid";
1338
+ readonly returns: "TABLE(record_id uuid, kind text, goes_at integer)";
1339
+ readonly security: "invoker";
1160
1340
  }, {
1161
1341
  readonly name: "table_declare";
1162
1342
  readonly args: "p_organization_id uuid, p_spec jsonb";
1163
1343
  readonly returns: "uuid";
1164
1344
  readonly security: "definer";
1345
+ }, {
1346
+ readonly name: "table_is_live";
1347
+ readonly args: "p_organization_id uuid, p_table_id uuid";
1348
+ readonly returns: "boolean";
1349
+ readonly security: "invoker";
1165
1350
  }, {
1166
1351
  readonly name: "table_kernel_id";
1167
1352
  readonly args: "";
@@ -1196,6 +1381,11 @@ declare const STORE_DOORS: readonly [{
1196
1381
  readonly name: "tables_at_home";
1197
1382
  readonly args: "p_organization_id uuid, p_home_ids uuid[]";
1198
1383
  readonly returns: "TABLE(table_id uuid, home_record_id uuid, kind text)";
1384
+ readonly security: "definer";
1385
+ }, {
1386
+ readonly name: "tables_described_without_asking";
1387
+ readonly args: "";
1388
+ readonly returns: "TABLE(function_name text, identity_args text, why text)";
1199
1389
  readonly security: "invoker";
1200
1390
  }, {
1201
1391
  readonly name: "trg_associations_bump_visibility";
@@ -1252,6 +1442,11 @@ declare const STORE_DOORS: readonly [{
1252
1442
  readonly args: "p_item_type text, p_item_id uuid";
1253
1443
  readonly returns: "TABLE(container_type text, container_id uuid, depth integer, max_level permission_level)";
1254
1444
  readonly security: "definer";
1445
+ }, {
1446
+ readonly name: "visibility_as_of";
1447
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_at timestamp with time zone";
1448
+ readonly returns: "TABLE(principal_kind text, principal_id uuid, level permission_level, through_kind text, through_id uuid, reason text, replayed boolean, held_from timestamp with time zone, held_to timestamp with time zone)";
1449
+ readonly security: "definer";
1255
1450
  }, {
1256
1451
  readonly name: "visibility_cache_rebuild";
1257
1452
  readonly args: "";
@@ -1421,6 +1616,10 @@ declare const STORE_KNOBS: readonly [{
1421
1616
  readonly key: "containment_depth_ceiling";
1422
1617
  readonly value: "16";
1423
1618
  readonly type: "integer";
1619
+ }, {
1620
+ readonly key: "cross_organization_links";
1621
+ readonly value: "false";
1622
+ readonly type: "boolean";
1424
1623
  }, {
1425
1624
  readonly key: "document_max_bytes";
1426
1625
  readonly value: "1048576";
@@ -1457,6 +1656,14 @@ declare const STORE_KNOBS: readonly [{
1457
1656
  readonly key: "member_default_level";
1458
1657
  readonly value: "\"viewer\"";
1459
1658
  readonly type: "string";
1659
+ }, {
1660
+ readonly key: "member_default_visibility";
1661
+ readonly value: "\"all_records\"";
1662
+ readonly type: "enum";
1663
+ }, {
1664
+ readonly key: "records_tool_default";
1665
+ readonly value: "true";
1666
+ readonly type: "boolean";
1460
1667
  }, {
1461
1668
  readonly key: "row_versions_guard";
1462
1669
  readonly value: "false";
@@ -1506,43 +1713,46 @@ declare const STORE_KNOBS: readonly [{
1506
1713
  */
1507
1714
  declare const STORE_REFUSAL_CODES: readonly [{
1508
1715
  readonly code: "02000";
1509
- readonly raised_by: "doc_render_body,doc_render_document,doc_sign,doc_signature_intact,doc_template_save,external_history_event,external_rows,external_stub_upsert,external_writes_set,migrate_delete,migrate_extract_parent,migrate_merge,migrate_rename,migrate_reparent,migrate_retype,migrate_split,read_record,record_delete,record_restore,record_update";
1716
+ readonly raised_by: "doc_render_body,doc_render_document,doc_sign,doc_signature_intact,doc_template_save,external_history_event,external_rows,external_stub_upsert,external_writes_set,migrate_delete,migrate_extract_parent,migrate_merge,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,read_record,record_delete,record_restore,record_update,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,visibility_as_of";
1510
1717
  }, {
1511
1718
  readonly code: "0A000";
1512
1719
  readonly raised_by: "external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,rule_eval,work_slots_declare";
1513
1720
  }, {
1514
1721
  readonly code: "22004";
1515
- readonly raised_by: "_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,doc_render_write,doc_sign,doc_signature_write,doc_template_save,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,home_add,io_comment_write,io_import_open,io_outbox_drain,io_restore,migrate_purge,migrate_split,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_restore,record_update,record_write,relation_own,table_declare,work_template_declare";
1722
+ readonly raised_by: "_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,doc_render_write,doc_sign,doc_signature_write,doc_template_save,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,home_add,io_comment_write,io_import_open,io_outbox_drain,io_restore,migrate_purge,migrate_split,migrate_undo,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,relation_carry,relation_own,share_grant,table_declare,work_template_declare";
1516
1723
  }, {
1517
1724
  readonly code: "22012";
1518
1725
  readonly raised_by: "rule_eval";
1519
1726
  }, {
1520
1727
  readonly code: "22023";
1521
- readonly raised_by: "_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,containment_parent,doc_render_body,doc_render_write,doc_signature_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,io_import_open,io_proposal_accept,migrate_merge,query_by_coordinates,query_rollup,record_update,rule_eval,rule_members,table_rules,work_slot_hold";
1728
+ readonly raised_by: "_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,containment_parent,doc_render_body,doc_render_write,doc_signature_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,io_import_open,io_proposal_accept,migrate_merge,query_by_coordinates,query_rollup,record_update,relation_carry,rule_eval,rule_members,share_grant,share_lane_set,table_rules,visibility_as_of,work_slot_hold";
1522
1729
  }, {
1523
1730
  readonly code: "23503";
1524
- readonly raised_by: "_containment_guard,_record_rule_uses,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,doc_sign,doc_template_save,home_add,io_comment_write,io_import_rows,io_proposal_accept,migrate_delete,migrate_demote,migrate_promote,promote_field,promote_table,record_applicability,record_reparent,relation_own,resolve_first_match,rule_applies,rule_eval,rule_members,rule_run,work_take_assignment,work_template_instantiate";
1731
+ readonly raised_by: "_containment_guard,_record_rule_uses,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,delete_rule,doc_sign,doc_template_save,home_add,io_comment_write,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,promote_field,promote_table,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_eval,rule_members,rule_run,work_take_assignment,work_template_instantiate";
1525
1732
  }, {
1526
1733
  readonly code: "23505";
1527
- readonly raised_by: "doc_sign,doc_signature_write,home_add,io_proposal_accept,work_slot_hold";
1734
+ readonly raised_by: "doc_sign,doc_signature_write,field_declare,home_add,io_proposal_accept,relation_carry,relation_own,share_grant,work_slot_hold";
1528
1735
  }, {
1529
1736
  readonly code: "23514";
1530
- readonly raised_by: "_containment_guard,_dated_values_guard,_derived_fields,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_rule_shape_guard,_rule_topology_guard,_table_shape_guard,_value_envelope,_work_shape_guard,doc_sign,doc_signature_write,doc_template_save,home_add,validate_value_envelope,validate_values,work_slots_declare,work_take_assignment,work_template_instantiate";
1737
+ readonly raised_by: "_containment_guard,_dated_values_guard,_derived_fields,_field_document_for,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_shape_guard,_value_envelope,_work_shape_guard,doc_sign,doc_signature_write,doc_template_save,field_declare,field_retire,field_update,home_add,migrate_merge,relation_carry,relation_own,validate_value_envelope,validate_values,work_slots_declare,work_take_assignment,work_template_instantiate";
1531
1738
  }, {
1532
1739
  readonly code: "40001";
1533
1740
  readonly raised_by: "has_visibility_at";
1534
1741
  }, {
1535
1742
  readonly code: "42501";
1536
- readonly raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_reach,assert_store_door,external_write_through,io_comment_resolve,io_comment_write,io_restore,migrate_purge,promote_table,read_record,read_records";
1743
+ readonly raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_client_may_reach,assert_organization_admin,assert_store_door,external_write_through,io_comment_resolve,io_comment_write,io_restore,migrate_purge,promote_table,query_visibility_parity,read_record,read_records,share_grant,visibility_as_of";
1537
1744
  }, {
1538
1745
  readonly code: "53400";
1539
- readonly raised_by: "anon_rate_take,promote_field";
1746
+ readonly raised_by: "anon_rate_take,delete_cascade_closure,promote_field";
1747
+ }, {
1748
+ readonly code: "54001";
1749
+ readonly raised_by: "record_delete";
1540
1750
  }, {
1541
1751
  readonly code: "PT409";
1542
1752
  readonly raised_by: "record_update";
1543
1753
  }];
1544
1754
  /** `platform.entity_types` — the registered tokens a Table or relation may name. */
1545
- declare const ENTITY_TOKENS: readonly ["access_delta_probe", "access_delta_run", "access_request", "account_addon", "acquisition_block", "activity", "admin_audit_log", "admin_email_log", "admin_markdown_sample", "admin_user", "admission_config", "agent", "agent_card", "agent_definition_version", "agent_drift_alert", "agent_exemplar", "agent_mandate_note", "agent_prompt_remediation", "agent_provision_legacy", "agent_run", "agent_run_stage", "agent_schedule", "agent_schedule_claim", "agent_shortcut", "agent_surface_binding", "agent_template", "agent_usage", "agent_user_kv", "ai_api", "ai_endpoint", "ai_model", "ai_model_alias", "ai_offering", "ai_provider", "ai_setting", "analysis_result", "anon_form", "anon_function_birth_grandfather", "anon_hit", "anon_inbound", "anon_replay", "anon_submission", "anon_token", "api_field_warning", "api_request_log", "app", "app_config", "app_config_history", "app_definition_version", "app_error", "app_execution", "app_instance", "app_log", "app_log_muted_pattern", "app_log_norm_exception", "app_rate_limit", "app_setting", "app_sync_status", "approach", "artifact", "assessment", "assessment_item", "assessment_result", "assignment_session", "assist", "assist_producer_policy", "assist_producer_policy_history", "association_type", "assurance_level", "attempt", "audit_broken_functions", "audit_canonical_findings", "audit_exemption", "audit_function_deps", "audit_function_runtime_probe", "audit_m2m_candidates", "audit_refresh_log", "audit_stale_registry", "audit_unregistered_candidates", "bak_assoc_file_processed_document_20260812", "bak_assoc_type_file_processed_document_20260812", "bak_organization_name_dd043", "base_entity_template", "batch_cost_event", "batch_provider_batch", "batch_work_item", "billing_capability", "billing_capability_limit", "billing_connect_account", "billing_customer", "billing_plan", "billing_plan_limit", "billing_price", "billing_product", "billing_spend_guardrail", "billing_stripe_event", "billing_subscription", "billing_usage_ledger", "billing_user_plan", "browser_account_binding", "browser_action_event", "browser_authenticator_window", "browser_capture", "browser_control_request", "browser_handoff", "browser_login_attempt", "browser_login_recipe", "browser_profile", "browser_profile_checkpoint", "browser_run", "browser_site_observation", "browser_site_policy", "browser_stream_ticket", "build_lock", "calendar_event", "canvas_comment", "canvas_comment_like", "canvas_item", "canvas_item_state", "canvas_like", "canvas_score", "canvas_view", "capture_window", "carrying_rule", "catalog_entries_history", "catalog_entry", "category", "change_type_default", "chat_user_usage_summary", "citations", "class_purchase", "classifier_revision_ledger", "client_callable_door", "client_callable_door_retirement", "client_excluded_column_unregistered", "cmp_entry", "cmp_feedback", "code_file", "code_folder", "code_repository", "coding_session", "coding_session_entry", "comment", "commerce_asset_allocation", "commerce_asset_grading", "commerce_asset_identifier", "commerce_asset_lot_event", "commerce_asset_mandate_result", "commerce_asset_price_factor", "commerce_asset_reshoot_request", "commerce_asset_review", "commerce_asset_unknown", "commerce_certified_printer", "commerce_cloud_sync_connection", "commerce_ebay_business_policy", "commerce_ebay_category", "commerce_ebay_category_aspect", "commerce_ebay_category_tree", "commerce_ebay_custom_policy", "commerce_ebay_inventory_item", "commerce_ebay_inventory_item_group", "commerce_ebay_inventory_item_group_member", "commerce_ebay_inventory_location", "commerce_ebay_listing", "commerce_ebay_marketplace_policy", "commerce_ebay_media_asset", "commerce_ebay_notification_destination", "commerce_ebay_notification_event", "commerce_ebay_notification_subscription", "commerce_ebay_notification_topic", "commerce_ebay_offer", "commerce_ebay_order", "commerce_ebay_order_line_item", "commerce_ebay_shipping_fulfillment", "commerce_ebay_store_category", "commerce_human_correction", "commerce_intake_artifact", "commerce_intake_asset", "commerce_intake_batch", "commerce_label_batch", "commerce_label_code", "commerce_marketplace_account", "commerce_marketplace_account_deletion_audit", "commerce_marketplace_api_call", "commerce_marketplace_rate_budget", "commerce_marketplace_site", "commerce_marketplace_sync_run", "commerce_prediction_outcome", "commerce_print_order", "commerce_product", "commerce_product_channel_ref", "commerce_product_media", "commerce_product_variant", "commerce_recall_audit", "comparison_set", "component_group", "contact_medium", "contact_submission", "content_certification", "content_ir_kind", "content_ir_kind_component", "content_ir_kind_component_incident", "content_ir_kind_conformance", "content_ir_kind_edge", "content_ir_kind_example", "content_ir_kind_instance", "content_ir_kind_surface", "context_access_log", "context_item", "context_item_suggestion", "context_item_value", "context_value_refs", "conversation", "conversation_value", "courts", "credential_attachment", "credential_item", "credential_mutation_receipt", "crm_address", "crm_affiliation", "crm_blocklist_entry", "crm_contact_candidate", "crm_deal", "crm_deal_stage_event", "crm_enrichment_call", "crm_interaction", "crm_merge_candidate", "crm_outreach_list", "crm_outreach_list_member", "crm_party_merge", "crm_registry_ingest_run", "crm_registry_source", "crm_saved_view", "crm_sending_event", "crm_sending_identity", "crm_sending_identity_check", "crm_sending_policy", "custom_entity_definition", "custom_field_definition", "custom_field_target", "custom_record", "cx_agent_memory", "cx_agent_plan", "cx_agent_task", "cx_code_edit", "cx_code_message_file", "cx_conversation_documents", "cx_media", "cx_observational_memory", "cx_observational_memory_event", "cx_pending_injection", "cx_request", "cx_request_snapshot", "cx_tool_trace", "cx_user_request", "cx_user_todo", "dashboard_saved_view", "data_rights_event", "data_store", "data_store_members", "dataset", "dd171_containment_baseline", "dd175_cast", "dd175_component_lane_baseline", "ddl_guard_log", "deck_suggestion", "definer_class_exemption", "definer_client_grant_grandfather", "definer_grant_baseline", "deprecated_relation", "derive_run", "dev_login_audit", "dict_entry", "dict_provider_publication", "dict_setting", "dm_conversation", "dm_message", "dm_participant", "doc_render", "doc_signature", "dockets", "domain_classification", "edge_payload_kind", "egress_device", "egress_pairing", "egress_ticket", "emails", "embedding_cache", "embeddings_google_gemini_2_1536", "embeddings_oai_3_small_1536", "embeddings_voyage_4_large_1024", "embeddings_voyage_code_3_1024", "endpoint_family_sweep_state", "engine_owner_task", "entity_grant", "entity_relationship", "entity_type", "esign_campaign", "esign_campaign_member", "esign_consent_disclosure", "esign_envelope", "esign_envelope_certificate", "esign_envelope_document", "esign_envelope_event", "esign_envelope_external_ref", "esign_envelope_signer", "esign_provider", "esign_provider_binding", "esign_signing_key", "execution_event_cursor", "extension_auth_code", "external_link", "external_source", "extract_sweep_state", "fc_card", "fc_detail", "fc_set", "feature_doc", "feature_knob", "feedback_comments", "feedback_user_messages", "field_component", "file", "file_analysis", "file_entities", "file_overrides", "file_page_annotations", "file_pages", "file_rag_job", "file_version", "files_account_tier", "files_machine_written_prefix", "files_sync_mapping", "files_user_account", "flashcard_data", "flashcard_history", "flashcard_review", "flashcard_set", "flashcard_sets", "flexible_data", "folder", "function_contract", "game_badge", "game_result", "game_room", "global_execution", "global_execution_checkpoint", "global_execution_control", "global_execution_event", "global_meter_entry", "global_origin", "global_request", "google_document", "growth_loop_event", "growth_loop_run", "growth_loop_stage_run", "guardian_link", "guest_conversion_audit", "guest_execution_log", "guest_executions", "guided_checklist_run", "heatmap_save", "hindsight_enrollment", "hindsight_finding", "hindsight_regression_case", "hindsight_replay", "hindsight_replay_step", "hindsight_review", "hr_access_audit", "hr_access_role", "hr_accommodation_request", "hr_ai_evidence", "hr_alert_routing_rule", "hr_application", "hr_approval_authority", "hr_approval_delegation", "hr_asset", "hr_asset_assignment", "hr_attendance_exception", "hr_auto_close_rule", "hr_availability", "hr_background_check", "hr_benefits_event", "hr_calculation_snapshot", "hr_candidate", "hr_candidate_conversion", "hr_candidate_message", "hr_careers_portal", "hr_checklist_item", "hr_checklist_run", "hr_checklist_template", "hr_checklist_template_item", "hr_compensation", "hr_corrective_action", "hr_course", "hr_course_version", "hr_credential", "hr_crew", "hr_deduction_code", "hr_department", "hr_derived_grant", "hr_disposition_event", "hr_earning_code", "hr_eeo_response", "hr_emergency_contact", "hr_employee", "hr_employee_private", "hr_employer_profile", "hr_employment", "hr_employment_pin", "hr_engagement", "hr_establishment", "hr_external_identity", "hr_field_policy", "hr_holiday", "hr_holiday_calendar", "hr_i9", "hr_i9_document", "hr_incident", "hr_incident_party", "hr_interview", "hr_interview_kit", "hr_job_title", "hr_jurisdiction", "hr_jurisdiction_rule", "hr_jurisdiction_rule_class", "hr_jurisdiction_rule_org_decision", "hr_jurisdiction_rule_test", "hr_kiosk_device", "hr_kiosk_session", "hr_labor_target", "hr_leave_case", "hr_leave_enrollment", "hr_leave_ledger", "hr_leave_policy", "hr_leave_request", "hr_legal_hold", "hr_legal_hold_item", "hr_location", "hr_new_hire_report", "hr_offer", "hr_opening", "hr_overtime_alert", "hr_overtime_alert_rule", "hr_overtime_preapproval", "hr_pay_group", "hr_pay_period", "hr_pay_period_employment", "hr_payroll_export", "hr_payroll_export_line", "hr_position_assignment", "hr_posting", "hr_posting_publication", "hr_provider_binding", "hr_provider_event", "hr_provisioning_result", "hr_punch", "hr_recalculation_batch", "hr_record_class", "hr_records_request", "hr_reference_check", "hr_reporting_line", "hr_requisition", "hr_restricted_note", "hr_retention_rule", "hr_role_assignment", "hr_schedule", "hr_schedule_change", "hr_schedule_guidance", "hr_schedule_template", "hr_schedule_template_shift", "hr_scorecard", "hr_separation", "hr_shift", "hr_shift_claim", "hr_staffing_requirement", "hr_survey", "hr_survey_invitation", "hr_survey_question", "hr_survey_response", "hr_tax_registration", "hr_tax_withholding", "hr_time_adjustment", "hr_training_assignment", "hr_training_attempt", "hr_transcript_entry", "hr_verification_letter_request", "hr_work_interval", "hr_workflow_binding", "hr_workflow_decision", "hr_workflow_definition", "hr_workflow_event", "hr_workflow_failure", "hr_workflow_flow_type", "hr_workflow_instance", "hr_workflow_step", "hr_workflow_step_definition", "hr_workweek", "html_extraction", "iam_access_audit", "iam_api_key", "iam_emergency_door_request", "idempotency", "industry", "industry_curator", "infra_status", "ingest_runs", "integration_connection", "integration_connection_resource", "interview_decision_interview", "interview_decision_question", "interview_document_revision", "interview_hole", "interview_question", "interview_session", "interview_turn", "invitation", "invitation_code", "invitation_request", "io_comment", "io_contract", "io_import", "io_outbox", "item", "item_mastery", "judge_verdict", "jurisdiction_policy", "keyword_classification_queue", "kg_alert", "kg_chunk_entities", "kg_chunks", "kg_clusters", "kg_edges", "kg_entities", "kg_entity_aliases", "kg_suggestion_ack", "kg_sweep_queue", "kg_sweep_run", "kg_sweep_state", "kg_value_match", "knob_override", "knob_override_audit", "knob_rung_lock", "knob_scope_kind", "knob_write_door", "league_membership", "learn_doc", "library_doc", "lifecycle_archive", "lifecycle_archive_row", "lifecycle_audit", "lifecycle_entity_plan", "lifecycle_map_build", "lifecycle_reference_map", "lifecycle_run", "lifecycle_tier_ledger", "location", "mandate", "mandate_advance_batch_row", "mandate_binding", "mandate_binding_legacy", "mandate_legacy", "mandate_observation", "mandate_reference", "mandate_scan", "mandate_treatment", "marketing_initiative", "masterwork_corpus_item", "masterwork_run", "masterwork_run_kind", "masterwork_source", "math_course_structure", "math_problem", "matrx_action_ledger", "mcp_config", "mcp_server", "mcp_user_conn", "media_capture_handoff", "media_catalog_setting", "media_library_item", "media_selection_item", "media_selection_job", "media_source_library", "meet_call_invite", "meet_meeting", "meet_note", "meet_participant", "meet_recording", "meet_transcript_segment", "membership", "membership_grant", "merge_field_provenance", "message", "message_template", "meta_excluded_schema", "meta_table_stats_history", "metadata_reserved_keys", "microservice_project", "migration_log", "mtx_media_heal_queue", "mtx_public_url_guard", "ner_shadow", "note", "note_folder", "notification", "notification_channel_preference", "notification_event_override", "notification_event_type", "notification_preference", "notify_outsider_door_baseline", "oauth_handoff_claim", "opinion_clusters", "opinions", "ops_issue_class", "ops_issue_event", "ops_proof_check", "ops_proof_run", "ops_proof_scenario", "org_admin_audit", "org_change_policy", "org_context_ledger", "org_industries", "org_member_control", "org_module_config", "org_plan", "org_repair_0253_backup", "organization", "organization_preferences", "organization_visibility_version", "output_feedback", "outreach_acceptance", "page_extraction_job", "page_extraction_page_run", "page_extraction_results", "page_extraction_runs", "page_intent_queue", "page_mapping_queue", "part_config", "part_config_sub", "party", "party_contact_point", "path_drift_repair_2026_09", "pc_article", "pc_episode", "pc_show", "pc_studio_run", "pc_studio_run_asset", "pdf_consolidation_log", "pdf_redaction_audit", "pdf_redaction_key_escrow", "permission_grant", "plan_cms_fill_item", "plan_cms_fill_job", "plan_entity", "plan_node", "plan_node_artifact", "plan_node_step", "plan_profile", "platform_actor_session", "platform_actor_token", "platform_actor_token_event", "platform_continued_access", "platform_org_knob_override", "platform_outcome_event", "platform_outsider_consumer", "platform_reachability", "platform_reference_category", "platform_reference_declaration", "platform_repo", "platform_saved_view", "platform_schema", "platform_share_link", "platform_user_knob_override", "podcast_race", "policy_overlap_backup", "policy_overlap_probe", "processed_document", "processed_document_page", "product_capture_file", "product_capture_item", "product_capture_payload", "product_capture_product", "product_capture_question", "profile", "project", "prompt", "provider_account", "provider_account_credential", "provision", "provision_generate_target", "provision_grant", "provision_marker", "provision_rule_message", "provision_schema", "provision_shape_debt", "provision_spec", "provision_spec_grandfather", "provision_vocabulary", "purpose", "quiz_session", "rag_ingest_run", "rag_library_audit_log", "rate_limit_buckets", "recompute_queue", "record", "record_alias", "redaction_mapping", "research_analysis", "research_content", "research_context_bundle", "research_document", "research_intent", "research_keyword", "research_media", "research_source", "research_synthesis", "research_tag", "research_template", "research_topic", "retention_policy", "retrieval_audit", "review_queue", "route_manifest_entry", "row_version", "rulebook", "runtime_operation_stream", "runtime_operation_stream_batch", "sandbox_instance", "sch_agent_task", "sch_run", "sch_task", "sch_trigger", "schema_client_exposure", "schema_migration_ledger", "schema_migration_legacy", "schema_migration_slot_grandfather", "schema_templates", "scope", "scope_association_suggestion", "scope_dataset_instance", "scope_door_registry", "scope_item_value_suggestion", "scope_suggestion", "scope_type", "scrape_domain", "scrape_domain_settings", "scrape_failure_log", "scrape_parsed_page", "scrape_path_override", "scrape_path_pattern", "scrape_retry_queue", "seo_ai_capability", "seo_ai_visibility_citation", "seo_ai_visibility_claim", "seo_ai_visibility_panel", "seo_ai_visibility_response", "seo_ai_visibility_signal", "seo_backlink", "seo_backlink_change_event", "seo_backlink_dimension_snapshot", "seo_backlink_observation", "seo_backlink_snapshot", "seo_change_assessment", "seo_change_event", "seo_change_item", "seo_change_metric", "seo_change_set", "seo_change_theory", "seo_collection_run", "seo_competitor", "seo_competitor_observation", "seo_competitor_opportunity", "seo_coverage_mention", "seo_coverage_tracker", "seo_dimension_value_matcher", "seo_engine_schedule", "seo_geo_place", "seo_gsc_dig_rule", "seo_keyword", "seo_keyword_class_rule", "seo_keyword_edge", "seo_keyword_facet", "seo_keyword_market", "seo_keyword_market_observation", "seo_keyword_place", "seo_keyword_saved_view", "seo_keyword_topic", "seo_landscape_brief", "seo_link_gap_domain", "seo_link_gap_match", "seo_map_facet", "seo_map_facet_value", "seo_map_topic", "seo_page_measurement_health", "seo_page_performance", "seo_provider_call", "seo_provider_task", "seo_rank_observation", "seo_rank_target", "seo_raw_payload", "seo_referring_domain_profile", "seo_reputation_case", "seo_search_performance_daily", "seo_serp_mention", "seo_serp_opportunity", "seo_serp_result", "seo_serp_snapshot", "seo_site_geo_area", "seo_site_keyword_offering", "seo_site_keyword_value", "seo_site_offering_value", "seo_site_topic_value", "seo_site_value_combo", "seo_site_value_worth", "seo_site_vocabulary", "seo_source_request", "seo_starter_pack", "seo_starter_pack_item", "seo_story_angle", "seo_topic", "seo_topical_map", "seo_web_analytics_daily", "share_link", "shareable_resource_registry", "shared_canvas_item", "short_link", "shortcut_category", "skill", "skill_category", "skill_render_definition", "sms_consent", "sms_conversation", "sms_message", "sms_message_media", "sms_notification", "sms_notification_preference", "sms_phone_number", "sms_rate_limits", "sms_webhook_logs", "soft_delete_edge", "source_authority", "stage_dockets_966c18eca7", "stage_ref_kind", "stamped_write_table", "structure", "structured_list", "studio_cleaned_segments", "studio_concept_items", "studio_documents", "studio_module_segments", "studio_raw_segments", "studio_recording_chunks", "studio_recording_segments", "studio_run", "studio_session", "studio_session_settings", "study_attempt", "study_goal", "study_media", "study_plan", "study_plan_block", "study_plan_day", "study_reminder_context", "study_reminder_delivery", "study_session", "study_source_chunk", "study_streak", "study_structured_section", "superseded_policy", "surface", "system_announcement", "system_context_item", "system_error", "system_orgs", "system_personal_org_failure", "system_write_failure", "task", "task_user_state", "taxonomy_node", "template_context_items", "template_scope_types", "templates", "thread", "tool", "tool_binding", "tool_bundle", "tool_call", "tool_definition_version", "tool_executor", "tool_surface_defaults", "tool_test_sample", "tool_ui", "tool_ui_incident", "tool_ui_version", "topic_placement_queue", "transcript", "trigger_event", "udt_dataset_fields", "udt_dataset_row_versions", "udt_dataset_rows", "udt_dataset_template", "udt_dataset_template_fields", "udt_document", "udt_document_snapshot", "udt_structured_list_items", "udt_workbook_snapshot", "ui_client", "ui_surface_agent_pref", "ui_surface_agent_role", "ui_surface_client_tool", "ui_surface_config", "ui_surface_value", "ui_surface_write_target", "unsubscribe_token", "uploads_inflight", "user_achievement", "user_active_context", "user_analysis_preference", "user_bookmark", "user_email_preference", "user_entity_state", "user_feedback", "user_follows", "user_form_profile", "user_markdown_sample", "user_memory", "user_preference", "user_profile", "user_secret", "user_secret_audit", "user_secret_grant", "user_stat", "user_storage_usage", "user_surface_state", "visibility_cache", "visibility_epoch", "voice", "war_room", "wbx_capture", "wbx_demo", "wbx_guidance", "wbx_highlight", "wbx_pattern", "wbx_recipe", "wbx_screenshot", "wbx_seo_audit", "wc_claim", "wc_impairment_definition", "wc_injury", "wc_report", "web_analysis_item", "web_brand", "web_brand_asset", "web_brand_offering", "web_business_fact", "web_business_location", "web_channel_analytics_daily", "web_crawl_event", "web_crawl_preset", "web_crawl_schedule", "web_crawl_session", "web_crawl_url", "web_discovered_item", "web_finding", "web_gsc_page_stat", "web_link_edge", "web_listing_publisher", "web_location_listing", "web_offering_template", "web_page", "web_page_content", "web_page_evidence", "web_page_sitemap", "web_property", "web_provider", "web_result", "web_screenshot", "web_site", "web_site_endpoint_rule", "web_site_item_config", "web_site_offering", "web_sitemap", "web_snapshot", "web_tag_manager_snapshot", "web_youtube_video", "webhook_deliveries", "webhook_dispatch_state", "webhooks", "wf_node_data_slot", "work_claim", "work_item", "workbook", "worker_heartbeat", "workflow", "workflow_card", "workflow_checkpoint", "workflow_comparison", "workflow_definition_version", "workflow_idempotency", "workflow_job", "workflow_node_events", "workflow_node_outcome", "workflow_plan", "workflow_plan_event", "workflow_plan_sample", "workflow_recovery_audit", "workflow_run", "workflow_run_log", "workflow_runtime_surface", "workflow_template", "workflow_trigger", "workflow_trigger_fire", "workflow_work_item", "working_document", "write_guard_key", "youtube_quota_day", "youtube_search", "youtube_video"];
1755
+ declare const ENTITY_TOKENS: readonly ["access_delta_probe", "access_delta_run", "access_request", "account_addon", "acquisition_block", "activity", "admin_audit_log", "admin_email_log", "admin_markdown_sample", "admin_user", "admission_config", "agent", "agent_card", "agent_definition_version", "agent_drift_alert", "agent_exemplar", "agent_mandate_note", "agent_prompt_remediation", "agent_provision_legacy", "agent_run", "agent_run_stage", "agent_schedule", "agent_schedule_claim", "agent_shortcut", "agent_surface_binding", "agent_template", "agent_usage", "agent_user_kv", "ai_api", "ai_endpoint", "ai_model", "ai_model_alias", "ai_offering", "ai_provider", "ai_setting", "analysis_result", "anon_form", "anon_function_birth_grandfather", "anon_hit", "anon_inbound", "anon_replay", "anon_submission", "anon_token", "api_field_warning", "api_request_log", "app", "app_config", "app_config_history", "app_definition_version", "app_error", "app_execution", "app_instance", "app_log", "app_log_muted_pattern", "app_log_norm_exception", "app_rate_limit", "app_setting", "app_sync_status", "approach", "artifact", "assessment", "assessment_item", "assessment_result", "assignment_session", "assist", "assist_producer_policy", "assist_producer_policy_history", "association_type", "assurance_level", "attempt", "audit_broken_functions", "audit_canonical_findings", "audit_exemption", "audit_function_deps", "audit_function_runtime_probe", "audit_m2m_candidates", "audit_refresh_log", "audit_stale_registry", "audit_unregistered_candidates", "bak_assoc_file_processed_document_20260812", "bak_assoc_type_file_processed_document_20260812", "bak_organization_name_dd043", "base_entity_template", "batch_cost_event", "batch_provider_batch", "batch_work_item", "billing_capability", "billing_capability_limit", "billing_connect_account", "billing_customer", "billing_plan", "billing_plan_limit", "billing_price", "billing_product", "billing_spend_guardrail", "billing_stripe_event", "billing_subscription", "billing_usage_ledger", "billing_user_plan", "browser_account_binding", "browser_action_event", "browser_authenticator_window", "browser_capture", "browser_control_request", "browser_handoff", "browser_login_attempt", "browser_login_recipe", "browser_profile", "browser_profile_checkpoint", "browser_run", "browser_site_observation", "browser_site_policy", "browser_stream_ticket", "build_lock", "calendar_event", "canvas_comment", "canvas_comment_like", "canvas_item", "canvas_item_state", "canvas_like", "canvas_score", "canvas_view", "capture_window", "carrying_rule", "catalog_entries_history", "catalog_entry", "category", "change_type_default", "chat_user_usage_summary", "citations", "class_purchase", "classifier_revision_ledger", "client_callable_door", "client_callable_door_retirement", "client_excluded_column_unregistered", "cmp_entry", "cmp_feedback", "code_file", "code_folder", "code_repository", "coding_session", "coding_session_entry", "comment", "commerce_asset_allocation", "commerce_asset_grading", "commerce_asset_identifier", "commerce_asset_lot_event", "commerce_asset_mandate_result", "commerce_asset_price_factor", "commerce_asset_reshoot_request", "commerce_asset_review", "commerce_asset_unknown", "commerce_certified_printer", "commerce_cloud_sync_connection", "commerce_ebay_business_policy", "commerce_ebay_category", "commerce_ebay_category_aspect", "commerce_ebay_category_tree", "commerce_ebay_custom_policy", "commerce_ebay_inventory_item", "commerce_ebay_inventory_item_group", "commerce_ebay_inventory_item_group_member", "commerce_ebay_inventory_location", "commerce_ebay_listing", "commerce_ebay_marketplace_policy", "commerce_ebay_media_asset", "commerce_ebay_notification_destination", "commerce_ebay_notification_event", "commerce_ebay_notification_subscription", "commerce_ebay_notification_topic", "commerce_ebay_offer", "commerce_ebay_order", "commerce_ebay_order_line_item", "commerce_ebay_shipping_fulfillment", "commerce_ebay_store_category", "commerce_human_correction", "commerce_intake_artifact", "commerce_intake_asset", "commerce_intake_batch", "commerce_label_batch", "commerce_label_code", "commerce_marketplace_account", "commerce_marketplace_account_deletion_audit", "commerce_marketplace_api_call", "commerce_marketplace_rate_budget", "commerce_marketplace_site", "commerce_marketplace_sync_run", "commerce_prediction_outcome", "commerce_print_order", "commerce_product", "commerce_product_channel_ref", "commerce_product_media", "commerce_product_variant", "commerce_recall_audit", "comparison_set", "component_group", "contact_medium", "contact_submission", "content_certification", "content_ir_kind", "content_ir_kind_component", "content_ir_kind_component_incident", "content_ir_kind_conformance", "content_ir_kind_edge", "content_ir_kind_example", "content_ir_kind_instance", "content_ir_kind_surface", "content_lane", "context_access_log", "context_item", "context_item_suggestion", "context_item_value", "context_value_refs", "conversation", "conversation_value", "courts", "credential_attachment", "credential_item", "credential_mutation_receipt", "crm_address", "crm_affiliation", "crm_blocklist_entry", "crm_contact_candidate", "crm_deal", "crm_deal_stage_event", "crm_enrichment_call", "crm_interaction", "crm_merge_candidate", "crm_outreach_list", "crm_outreach_list_member", "crm_party_merge", "crm_registry_ingest_run", "crm_registry_source", "crm_saved_view", "crm_sending_event", "crm_sending_identity", "crm_sending_identity_check", "crm_sending_policy", "custom_entity_definition", "custom_field_definition", "custom_field_target", "custom_record", "cx_agent_memory", "cx_agent_plan", "cx_agent_task", "cx_code_edit", "cx_code_message_file", "cx_conversation_documents", "cx_media", "cx_observational_memory", "cx_observational_memory_event", "cx_pending_injection", "cx_request", "cx_request_snapshot", "cx_tool_trace", "cx_user_request", "cx_user_todo", "dashboard_saved_view", "data_rights_event", "data_store", "data_store_members", "dataset", "dd171_containment_baseline", "dd175_cast", "dd175_component_lane_baseline", "ddl_guard_log", "deck_suggestion", "definer_class_exemption", "definer_client_grant_grandfather", "definer_grant_baseline", "deprecated_relation", "derive_run", "dev_login_audit", "dict_entry", "dict_provider_publication", "dict_setting", "dm_conversation", "dm_message", "dm_participant", "doc_render", "doc_signature", "dockets", "domain_classification", "edge_payload_kind", "egress_device", "egress_pairing", "egress_ticket", "emails", "embedding_cache", "embeddings_google_gemini_2_1536", "embeddings_oai_3_small_1536", "embeddings_voyage_4_large_1024", "embeddings_voyage_code_3_1024", "endpoint_family_sweep_state", "engine_owner_task", "entity_grant", "entity_relationship", "entity_type", "esign_campaign", "esign_campaign_member", "esign_consent_disclosure", "esign_envelope", "esign_envelope_certificate", "esign_envelope_document", "esign_envelope_event", "esign_envelope_external_ref", "esign_envelope_signer", "esign_provider", "esign_provider_binding", "esign_signing_key", "execution_event_cursor", "extension_auth_code", "external_link", "external_source", "extract_sweep_state", "fc_card", "fc_detail", "fc_set", "feature_doc", "feature_knob", "feedback_comments", "feedback_user_messages", "field_component", "file", "file_analysis", "file_entities", "file_overrides", "file_page_annotations", "file_pages", "file_rag_job", "file_version", "files_account_tier", "files_machine_written_prefix", "files_sync_mapping", "files_user_account", "flashcard_data", "flashcard_history", "flashcard_review", "flashcard_set", "flashcard_sets", "flexible_data", "folder", "function_contract", "game_badge", "game_result", "game_room", "global_execution", "global_execution_checkpoint", "global_execution_control", "global_execution_event", "global_meter_entry", "global_origin", "global_request", "google_document", "growth_loop_event", "growth_loop_run", "growth_loop_stage_run", "guardian_link", "guest_conversion_audit", "guest_execution_log", "guest_executions", "guided_checklist_run", "heatmap_save", "hindsight_enrollment", "hindsight_finding", "hindsight_regression_case", "hindsight_replay", "hindsight_replay_step", "hindsight_review", "hr_access_audit", "hr_access_role", "hr_accommodation_request", "hr_ai_evidence", "hr_alert_routing_rule", "hr_application", "hr_approval_authority", "hr_approval_delegation", "hr_asset", "hr_asset_assignment", "hr_attendance_exception", "hr_auto_close_rule", "hr_availability", "hr_background_check", "hr_benefits_event", "hr_calculation_snapshot", "hr_candidate", "hr_candidate_conversion", "hr_candidate_message", "hr_careers_portal", "hr_checklist_item", "hr_checklist_run", "hr_checklist_template", "hr_checklist_template_item", "hr_compensation", "hr_corrective_action", "hr_course", "hr_course_version", "hr_credential", "hr_crew", "hr_deduction_code", "hr_department", "hr_derived_grant", "hr_disposition_event", "hr_earning_code", "hr_eeo_response", "hr_emergency_contact", "hr_employee", "hr_employee_private", "hr_employer_profile", "hr_employment", "hr_employment_pin", "hr_engagement", "hr_establishment", "hr_external_identity", "hr_field_policy", "hr_holiday", "hr_holiday_calendar", "hr_i9", "hr_i9_document", "hr_incident", "hr_incident_party", "hr_interview", "hr_interview_kit", "hr_job_title", "hr_jurisdiction", "hr_jurisdiction_rule", "hr_jurisdiction_rule_class", "hr_jurisdiction_rule_org_decision", "hr_jurisdiction_rule_test", "hr_kiosk_device", "hr_kiosk_session", "hr_labor_target", "hr_leave_case", "hr_leave_enrollment", "hr_leave_ledger", "hr_leave_policy", "hr_leave_request", "hr_legal_hold", "hr_legal_hold_item", "hr_location", "hr_new_hire_report", "hr_offer", "hr_opening", "hr_overtime_alert", "hr_overtime_alert_rule", "hr_overtime_preapproval", "hr_pay_group", "hr_pay_period", "hr_pay_period_employment", "hr_payroll_export", "hr_payroll_export_line", "hr_position_assignment", "hr_posting", "hr_posting_publication", "hr_provider_binding", "hr_provider_event", "hr_provisioning_result", "hr_punch", "hr_recalculation_batch", "hr_record_class", "hr_records_request", "hr_reference_check", "hr_reporting_line", "hr_requisition", "hr_restricted_note", "hr_retention_rule", "hr_role_assignment", "hr_schedule", "hr_schedule_change", "hr_schedule_guidance", "hr_schedule_template", "hr_schedule_template_shift", "hr_scorecard", "hr_separation", "hr_shift", "hr_shift_claim", "hr_staffing_requirement", "hr_survey", "hr_survey_invitation", "hr_survey_question", "hr_survey_response", "hr_tax_registration", "hr_tax_withholding", "hr_time_adjustment", "hr_training_assignment", "hr_training_attempt", "hr_transcript_entry", "hr_verification_letter_request", "hr_work_interval", "hr_workflow_binding", "hr_workflow_decision", "hr_workflow_definition", "hr_workflow_event", "hr_workflow_failure", "hr_workflow_flow_type", "hr_workflow_instance", "hr_workflow_step", "hr_workflow_step_definition", "hr_workweek", "html_extraction", "iam_access_audit", "iam_api_key", "iam_emergency_door_request", "idempotency", "industry", "industry_curator", "infra_status", "ingest_runs", "integration_connection", "integration_connection_resource", "interview_decision_interview", "interview_decision_question", "interview_document_revision", "interview_hole", "interview_question", "interview_session", "interview_turn", "invitation", "invitation_code", "invitation_request", "io_comment", "io_contract", "io_import", "io_outbox", "item", "item_mastery", "judge_verdict", "jurisdiction_policy", "keyword_classification_queue", "kg_alert", "kg_chunk_entities", "kg_chunks", "kg_clusters", "kg_edges", "kg_entities", "kg_entity_aliases", "kg_suggestion_ack", "kg_sweep_queue", "kg_sweep_run", "kg_sweep_state", "kg_value_match", "knob_override", "knob_override_audit", "knob_rung_lock", "knob_scope_kind", "knob_write_door", "league_membership", "learn_doc", "library_doc", "lifecycle_archive", "lifecycle_archive_row", "lifecycle_audit", "lifecycle_entity_plan", "lifecycle_map_build", "lifecycle_reference_map", "lifecycle_run", "lifecycle_tier_ledger", "location", "mandate", "mandate_advance_batch_row", "mandate_binding", "mandate_binding_legacy", "mandate_legacy", "mandate_observation", "mandate_reference", "mandate_scan", "mandate_treatment", "marketing_initiative", "masterwork_corpus_item", "masterwork_run", "masterwork_run_kind", "masterwork_source", "math_course_structure", "math_problem", "matrx_action_ledger", "mcp_config", "mcp_server", "mcp_user_conn", "media_capture_handoff", "media_catalog_setting", "media_library_item", "media_selection_item", "media_selection_job", "media_source_library", "meet_call_invite", "meet_meeting", "meet_note", "meet_participant", "meet_recording", "meet_transcript_segment", "membership", "membership_grant", "merge_field_provenance", "message", "message_template", "meta_excluded_schema", "meta_table_stats_history", "metadata_reserved_keys", "microservice_project", "migration_log", "mtx_media_heal_queue", "mtx_public_url_guard", "ner_shadow", "note", "note_folder", "notification", "notification_channel_preference", "notification_event_override", "notification_event_type", "notification_preference", "notify_outsider_door_baseline", "oauth_handoff_claim", "opinion_clusters", "opinions", "ops_issue_class", "ops_issue_event", "ops_proof_check", "ops_proof_run", "ops_proof_scenario", "org_admin_audit", "org_change_policy", "org_context_ledger", "org_industries", "org_member_control", "org_module_config", "org_plan", "org_repair_0253_backup", "organization", "organization_preferences", "organization_visibility_version", "output_feedback", "outreach_acceptance", "page_extraction_job", "page_extraction_page_run", "page_extraction_results", "page_extraction_runs", "page_intent_queue", "page_mapping_queue", "part_config", "part_config_sub", "party", "party_contact_point", "passkey_credential", "path_drift_repair_2026_09", "pc_article", "pc_episode", "pc_show", "pc_studio_run", "pc_studio_run_asset", "pdf_consolidation_log", "pdf_redaction_audit", "pdf_redaction_key_escrow", "permission_grant", "plan_cms_fill_item", "plan_cms_fill_job", "plan_entity", "plan_node", "plan_node_artifact", "plan_node_step", "plan_profile", "platform_actor_session", "platform_actor_token", "platform_actor_token_event", "platform_continued_access", "platform_org_knob_override", "platform_outcome_event", "platform_outsider_consumer", "platform_reachability", "platform_reference_category", "platform_reference_declaration", "platform_repo", "platform_saved_view", "platform_schema", "platform_share_link", "platform_user_knob_override", "podcast_race", "policy_overlap_backup", "policy_overlap_probe", "processed_document", "processed_document_page", "product_capture_file", "product_capture_item", "product_capture_payload", "product_capture_product", "product_capture_question", "profile", "project", "prompt", "provider_account", "provider_account_credential", "provision", "provision_generate_target", "provision_grant", "provision_marker", "provision_rule_message", "provision_schema", "provision_shape_debt", "provision_spec", "provision_spec_grandfather", "provision_vocabulary", "purpose", "quiz_session", "rag_ingest_run", "rag_library_audit_log", "rate_limit_buckets", "recompute_queue", "record", "record_alias", "redaction_mapping", "research_analysis", "research_content", "research_context_bundle", "research_document", "research_intent", "research_keyword", "research_media", "research_source", "research_synthesis", "research_tag", "research_template", "research_topic", "retention_policy", "retrieval_audit", "review_queue", "route_manifest_entry", "row_version", "rulebook", "runtime_operation_stream", "runtime_operation_stream_batch", "sandbox_instance", "sch_agent_task", "sch_run", "sch_task", "sch_trigger", "schema_client_exposure", "schema_migration_ledger", "schema_migration_legacy", "schema_migration_slot_grandfather", "schema_templates", "scope", "scope_association_suggestion", "scope_dataset_instance", "scope_door_registry", "scope_item_value_suggestion", "scope_suggestion", "scope_type", "scrape_domain", "scrape_domain_settings", "scrape_failure_log", "scrape_parsed_page", "scrape_path_override", "scrape_path_pattern", "scrape_retry_queue", "seo_ai_capability", "seo_ai_visibility_citation", "seo_ai_visibility_claim", "seo_ai_visibility_panel", "seo_ai_visibility_response", "seo_ai_visibility_signal", "seo_backlink", "seo_backlink_change_event", "seo_backlink_dimension_snapshot", "seo_backlink_observation", "seo_backlink_snapshot", "seo_change_assessment", "seo_change_event", "seo_change_item", "seo_change_metric", "seo_change_set", "seo_change_theory", "seo_collection_run", "seo_competitor", "seo_competitor_observation", "seo_competitor_opportunity", "seo_coverage_mention", "seo_coverage_tracker", "seo_dimension_value_matcher", "seo_engine_schedule", "seo_geo_place", "seo_gsc_dig_rule", "seo_keyword", "seo_keyword_class_rule", "seo_keyword_edge", "seo_keyword_facet", "seo_keyword_market", "seo_keyword_market_observation", "seo_keyword_place", "seo_keyword_saved_view", "seo_keyword_topic", "seo_landscape_brief", "seo_link_gap_domain", "seo_link_gap_match", "seo_map_facet", "seo_map_facet_value", "seo_map_topic", "seo_page_measurement_health", "seo_page_performance", "seo_provider_call", "seo_provider_task", "seo_rank_observation", "seo_rank_target", "seo_raw_payload", "seo_referring_domain_profile", "seo_reputation_case", "seo_search_performance_daily", "seo_serp_mention", "seo_serp_opportunity", "seo_serp_result", "seo_serp_snapshot", "seo_site_geo_area", "seo_site_keyword_offering", "seo_site_keyword_value", "seo_site_offering_value", "seo_site_topic_value", "seo_site_value_combo", "seo_site_value_worth", "seo_site_vocabulary", "seo_source_request", "seo_starter_pack", "seo_starter_pack_item", "seo_story_angle", "seo_topic", "seo_topical_map", "seo_web_analytics_daily", "share_link", "shareable_resource_registry", "shared_canvas_item", "short_link", "shortcut_category", "skill", "skill_category", "skill_render_definition", "sms_consent", "sms_conversation", "sms_message", "sms_message_media", "sms_notification", "sms_notification_preference", "sms_phone_number", "sms_rate_limits", "sms_webhook_logs", "soft_delete_edge", "source_authority", "stage_dockets_966c18eca7", "stage_ref_kind", "stamped_write_table", "structure", "structured_list", "studio_cleaned_segments", "studio_concept_items", "studio_documents", "studio_module_segments", "studio_raw_segments", "studio_recording_chunks", "studio_recording_segments", "studio_run", "studio_session", "studio_session_settings", "study_attempt", "study_goal", "study_media", "study_plan", "study_plan_block", "study_plan_day", "study_reminder_context", "study_reminder_delivery", "study_session", "study_source_chunk", "study_streak", "study_structured_section", "superseded_policy", "surface", "system_announcement", "system_context_item", "system_error", "system_orgs", "system_personal_org_failure", "system_write_failure", "task", "task_user_state", "taxonomy_node", "template_context_items", "template_scope_types", "templates", "thread", "tool", "tool_binding", "tool_bundle", "tool_call", "tool_definition_version", "tool_executor", "tool_surface_defaults", "tool_test_sample", "tool_ui", "tool_ui_incident", "tool_ui_version", "topic_placement_queue", "transcript", "trigger_event", "udt_dataset_fields", "udt_dataset_row_versions", "udt_dataset_rows", "udt_dataset_template", "udt_dataset_template_fields", "udt_document", "udt_document_snapshot", "udt_structured_list_items", "udt_workbook_snapshot", "ui_client", "ui_surface_agent_pref", "ui_surface_agent_role", "ui_surface_client_tool", "ui_surface_config", "ui_surface_value", "ui_surface_write_target", "unsubscribe_token", "uploads_inflight", "user_achievement", "user_active_context", "user_analysis_preference", "user_bookmark", "user_email_preference", "user_entity_state", "user_feedback", "user_follows", "user_form_profile", "user_markdown_sample", "user_memory", "user_preference", "user_profile", "user_secret", "user_secret_audit", "user_secret_grant", "user_stat", "user_storage_usage", "user_surface_state", "visibility_cache", "visibility_epoch", "voice", "war_room", "wbx_capture", "wbx_demo", "wbx_guidance", "wbx_highlight", "wbx_pattern", "wbx_recipe", "wbx_screenshot", "wbx_seo_audit", "wc_claim", "wc_impairment_definition", "wc_injury", "wc_report", "web_analysis_item", "web_brand", "web_brand_asset", "web_brand_offering", "web_business_fact", "web_business_location", "web_channel_analytics_daily", "web_crawl_event", "web_crawl_preset", "web_crawl_schedule", "web_crawl_session", "web_crawl_url", "web_discovered_item", "web_finding", "web_gsc_page_stat", "web_link_edge", "web_listing_publisher", "web_location_listing", "web_offering_template", "web_page", "web_page_content", "web_page_evidence", "web_page_sitemap", "web_property", "web_provider", "web_result", "web_screenshot", "web_site", "web_site_endpoint_rule", "web_site_item_config", "web_site_offering", "web_sitemap", "web_snapshot", "web_tag_manager_snapshot", "web_youtube_video", "webhook_deliveries", "webhook_dispatch_state", "webhooks", "wf_node_data_slot", "work_claim", "work_item", "workbook", "worker_heartbeat", "workflow", "workflow_card", "workflow_checkpoint", "workflow_comparison", "workflow_definition_version", "workflow_idempotency", "workflow_job", "workflow_node_events", "workflow_node_outcome", "workflow_plan", "workflow_plan_event", "workflow_plan_sample", "workflow_recovery_audit", "workflow_run", "workflow_run_log", "workflow_runtime_surface", "workflow_template", "workflow_trigger", "workflow_trigger_fire", "workflow_work_item", "working_document", "write_guard_key", "youtube_quota_day", "youtube_search", "youtube_video"];
1546
1756
  type StoreRefusalCode = (typeof STORE_REFUSAL_CODES)[number]["code"];
1547
1757
  type StoreDoorName = (typeof STORE_DOORS)[number]["name"];
1548
1758
  type EntityToken = (typeof ENTITY_TOKENS)[number];
@@ -2011,6 +2221,69 @@ interface TableProposal {
2011
2221
  fields: Array<Omit<FieldProposal, "table_id" | "because">>;
2012
2222
  because: string;
2013
2223
  }
2224
+ /**
2225
+ * WHAT A PERSON SAYS WHEN THEY ADD A COLUMN — the argument of
2226
+ * `custom.field_declare`, and deliberately NOT a `Field`.
2227
+ *
2228
+ * A `Field` is what the store STORES: a behaviour from a closed set of five,
2229
+ * modifiers beside it, a format, a unit, a relation target, a relation maximum,
2230
+ * an on-delete word, a compute_on, and the attached Rules that make a format
2231
+ * enforceable. A person adding a column knows none of that. They know they want
2232
+ * a date, or a person, or a list with these three choices in it.
2233
+ *
2234
+ * Every client that tried to bridge that gap itself got it wrong — the field
2235
+ * panel picked "Person" and the store read a Formula — so the bridge is the
2236
+ * STORE's, once, and this is the shape it takes.
2237
+ */
2238
+ interface NewFieldDeclaration {
2239
+ /** What a person reads on the column. The only thing that is always required. */
2240
+ label: string;
2241
+ /** One of the thirteen. Absent means one of the three plain behaviours below. */
2242
+ parity_type?: ParityFieldType;
2243
+ /** Plain text, a long text or a plain number — the three that carry no parity type. */
2244
+ plain?: "text" | "long_text" | "number";
2245
+ /** Derived from the label when absent, which is why the panel never asks for it. */
2246
+ key?: string;
2247
+ required?: boolean;
2248
+ multi?: boolean;
2249
+ dated?: boolean;
2250
+ sort?: number;
2251
+ sensitivity?: FieldSensitivity;
2252
+ context_policy?: ContextPolicy;
2253
+ rules?: FieldRule[];
2254
+ /** A choice list's choices, as words. The store keeps them as a Table (FLD-5 / FLD-6). */
2255
+ options?: string[];
2256
+ /** …or the Table they already come from, when a person picked an existing list. */
2257
+ options_table_id?: Uuid;
2258
+ /** The currency symbol or code a currency field's numbers are in (FLD-N-1). */
2259
+ unit?: string;
2260
+ /** A date field: a day, or a day and a time. */
2261
+ kind?: "date" | "datetime";
2262
+ /** A lookup or a rollup: the key of the relation Field on THIS table it travels along. */
2263
+ via?: string;
2264
+ /** A lookup: the key of the value it reads on the far side. */
2265
+ pick?: string;
2266
+ /** A rollup: what it works out, and of which far-side field (`count` needs none). */
2267
+ agg?: "sum" | "count" | "min" | "max" | "avg";
2268
+ of?: string;
2269
+ /** A formula: the expression, in the same shape a Rule uses (REC-15). */
2270
+ expr?: Record<string, unknown>;
2271
+ compute_on?: ComputeOn;
2272
+ relation_max?: number;
2273
+ }
2274
+ /** What `custom.field_update` accepts: a field's settings, never what it holds. */
2275
+ interface FieldPatch {
2276
+ label?: string;
2277
+ required?: boolean;
2278
+ dated?: boolean;
2279
+ sort?: number;
2280
+ sensitivity?: FieldSensitivity;
2281
+ context_policy?: ContextPolicy;
2282
+ unit?: string;
2283
+ rules?: FieldRule[];
2284
+ /** The choices of a choice list, rewritten. A choice still wanted keeps its id. */
2285
+ options?: string[];
2286
+ }
2014
2287
 
2015
2288
  /**
2016
2289
  * A rule expression as `custom.rule_eval` ACTUALLY evaluates it — read off the
@@ -2918,6 +3191,33 @@ interface RecordsClient {
2918
3191
  spec: Record<string, unknown>;
2919
3192
  homeId: Uuid;
2920
3193
  }): Promise<RecordsResult<Uuid>>;
3194
+ /**
3195
+ * ADD A FIELD TO A TABLE. One call, and the store does the three things no
3196
+ * client can do for itself: it turns a parity type into the behaviour,
3197
+ * modifiers, format, unit, relation target and Rules its own guards demand;
3198
+ * it tells the TABLE about the field (REC-1 / FLD-8 — a definition for a
3199
+ * field the table never declared is refused, which is the sentence every
3200
+ * "Add field" used to end on); and it stores the definition as a FIELD
3201
+ * rather than as a plain record, so the delete rules and the
3202
+ * formula-dependency check can see it.
3203
+ *
3204
+ * A choice list carries its `options` as words. The store keeps them the only
3205
+ * way FLD-5 / FLD-6 allows — as the records of a Table it declares for them —
3206
+ * so nobody is made to build a table before they can have a dropdown.
3207
+ */
3208
+ fieldDeclare(args: {
3209
+ table_id: Uuid;
3210
+ spec: NewFieldDeclaration;
3211
+ }): Promise<RecordsResult<Uuid>>;
3212
+ /** One field's own settings. What it HOLDS is a conversion and is refused here by name. */
3213
+ fieldUpdate(args: {
3214
+ field_id: Uuid;
3215
+ patch: FieldPatch;
3216
+ }): Promise<RecordsResult<Uuid>>;
3217
+ /** Take a field off a table. Refuses the title field, the last field, and one another field reads through. */
3218
+ fieldRetire(args: {
3219
+ field_id: Uuid;
3220
+ }): Promise<RecordsResult<boolean>>;
2921
3221
  /** The kernel Tables a caller writes a Home, a Field or a Rule into. */
2922
3222
  personKernelId(): Promise<RecordsResult<Uuid>>;
2923
3223
  fieldKernelId(): Promise<RecordsResult<Uuid>>;
@@ -3316,6 +3616,37 @@ interface UseRecordMutation {
3316
3616
  }
3317
3617
  /** Writes, with optimistic concurrency surfaced instead of swallowed. */
3318
3618
  declare function useRecordMutation(): UseRecordMutation;
3619
+ interface UseFieldMutation {
3620
+ /** Add a column. One call; the store decides what the parity type is made of. */
3621
+ declare: (args: {
3622
+ table_id: Uuid;
3623
+ spec: NewFieldDeclaration;
3624
+ }) => Promise<Uuid | null>;
3625
+ /** One field's own settings. What it HOLDS is a conversion and is refused by name. */
3626
+ update: (args: {
3627
+ field_id: Uuid;
3628
+ patch: FieldPatch;
3629
+ }) => Promise<Uuid | null>;
3630
+ /** Take a column off a table. */
3631
+ retire: (args: {
3632
+ field_id: Uuid;
3633
+ }) => Promise<boolean>;
3634
+ saving: boolean;
3635
+ error: RecordsError | null;
3636
+ clearError: () => void;
3637
+ }
3638
+ /**
3639
+ * THE SHAPE OF A TABLE, changed through the store's own doors.
3640
+ *
3641
+ * Deliberately separate from `useRecordMutation`. A Field IS a record, but
3642
+ * adding one is not writing a record: it changes what every record of the table
3643
+ * means, it is an administrator's right rather than an editor's, and it is the
3644
+ * one write `custom.record_write` was never able to make — it cannot tell the
3645
+ * Table about the field, and the field guard refuses any definition the Table
3646
+ * has not declared. A screen that reached for the record writer here is the
3647
+ * screen that spent 19 September refusing every column a person tried to add.
3648
+ */
3649
+ declare function useFieldMutation(): UseFieldMutation;
3319
3650
  /**
3320
3651
  * DYN-14 / AGT-N-7. A merge field's value — and while the resolver's server half
3321
3652
  * does not exist, `pending` WITH THE REASON. Never a blank, never a leftover
@@ -3323,4 +3654,4 @@ declare function useRecordMutation(): UseRecordMutation;
3323
3654
  */
3324
3655
  declare function useMergeField(key: string | null, state?: Record<string, unknown>): MergeFieldResolution | null;
3325
3656
 
3326
- export { ABSENCE_REASONS, ACTOR_VOCABULARY, type AbsenceReason, type Actor, type AggregateBucket, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AnonTokenBinding, COMPUTE_ON, CONTEXT_POLICIES, type ComputeOn, type ContextPolicy, DELIVERIES, type Delivery, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EntityToken, type ExternalPrincipalCard, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, type Field, type FieldBehavior, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type ForbiddenEnvelopeWord, type Freshness, type HiddenFieldNotice, type Home, KERNEL_TABLES, type KernelTableName, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, type MergeField, type MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, type MergeFieldSemanticType, type MergeFieldSource, type MergeFieldTransform, type MissingBehavior, ON_DELETE, OVERRIDE_POLICIES, type OnDelete, type OverridePolicy, PARITY_FIELD_TYPES, PER_VALUE_ACCESS_WORDS, type ParityFieldType, type ParityFieldTypeDescriptor, type PerValueAccessWord, type PgError, type PredictedRefusal, type ProvenancePointer, type PublishBinding, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, type ReadRow, type ReadValue, type RecordDocument, type RecordRead, type RecordRevision, type RecordsActor, type RecordsConfig, type RecordsDataSource, type RecordsError, type RecordsErrorCode, type RecordsErrorSink, type RecordsFilter, RecordsProvider, type RecordsProviderProps, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RetiredActorWord, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreRefusalCode, type StoredRecord, type Subscription, type SubscriptionBlock, type SubscriptionCadence, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableCapacity, type TableDisplay, type TableOrigin, type TableProposal, type TableType, type Timestamp, type UseRecordMutation, type UseRecordsOptions, type UseRecordsState, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type WorkAssignmentField, type WorkGraph, type WorkInstantiation, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, err, isRecordsErr, measureKey, ok, useFields, useMergeField, useRecord, useRecordMutation, useRecords, useRecordsActor, useRecordsClient, useTable, useTables };
3657
+ export { ABSENCE_REASONS, ACTOR_VOCABULARY, type AbsenceReason, type Actor, type AggregateBucket, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AnonTokenBinding, COMPUTE_ON, CONTEXT_POLICIES, type ComputeOn, type ContextPolicy, DELIVERIES, type Delivery, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EntityToken, type ExternalPrincipalCard, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, type Field, type FieldBehavior, type FieldPatch, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type ForbiddenEnvelopeWord, type Freshness, type HiddenFieldNotice, type Home, KERNEL_TABLES, type KernelTableName, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, type MergeField, type MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, type MergeFieldSemanticType, type MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type NewFieldDeclaration, ON_DELETE, OVERRIDE_POLICIES, type OnDelete, type OverridePolicy, PARITY_FIELD_TYPES, PER_VALUE_ACCESS_WORDS, type ParityFieldType, type ParityFieldTypeDescriptor, type PerValueAccessWord, type PgError, type PredictedRefusal, type ProvenancePointer, type PublishBinding, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, type ReadRow, type ReadValue, type RecordDocument, type RecordRead, type RecordRevision, type RecordsActor, type RecordsConfig, type RecordsDataSource, type RecordsError, type RecordsErrorCode, type RecordsErrorSink, type RecordsFilter, RecordsProvider, type RecordsProviderProps, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RetiredActorWord, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreRefusalCode, type StoredRecord, type Subscription, type SubscriptionBlock, type SubscriptionCadence, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableCapacity, type TableDisplay, type TableOrigin, type TableProposal, type TableType, type Timestamp, type UseFieldMutation, type UseRecordMutation, type UseRecordsOptions, type UseRecordsState, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type WorkAssignmentField, type WorkGraph, type WorkInstantiation, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, err, isRecordsErr, measureKey, ok, useFieldMutation, useFields, useMergeField, useRecord, useRecordMutation, useRecords, useRecordsActor, useRecordsClient, useTable, useTables };