@ai-matrx/records 0.58.16 → 0.58.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,12 +1,48 @@
1
1
  # Changelog — @ai-matrx/records
2
2
 
3
- ## 0.58.16
3
+ ## 0.58.19
4
4
 
5
5
  Automatic changed-only republish (docs/metadata drift since the last tag — see
6
- `git diff npm/records/v0.58.15..npm/records/v0.58.16 -- apps/shared/records`).
6
+ `git diff npm/records/v0.58.17..npm/records/v0.58.19 -- apps/shared/records`).
7
7
  No source changes intended and no consumer action required.
8
8
 
9
- ## Unreleased — lane SUITE-HEALTH-3 (2026-09-25)
9
+ ## 0.58.18
10
+ ### Unreleased
11
+
12
+ ### Lane data-tables-grid-overhaul — DOOR-SPEED (2026-09-25)
13
+
14
+ * **`client.listPage({ table_id, filter?, search?, sort?, view_id?, limit?, offset? })`** — one page
15
+ through the new `custom.read_records_page`: sorted (a choice column by the word a person sees),
16
+ searched over the columns this reader may see, filtered, and COUNTED (`total` of the matching
17
+ visible set). The record-store twin of the older store's paged door, so a grid never reads a whole
18
+ table to draw one page. A sort on a hidden column or on a formula worked out on every read is
19
+ refused by name. New types `RecordPageSort`, `RecordPage`.
20
+ * **`client.recordChangeMany({ table_id, changes })`** — inserts, updates (optional
21
+ `expected_version`) and archives in ONE transaction through the new `custom.record_change_many`;
22
+ every update lands in one statement. One refused change refuses the batch and nothing is saved;
23
+ the hint names the change. New types `RecordChange`, `RecordChangeResult`.
24
+ * **`client.tableRead({ table_id })`** — one Table by id through `read_records_by_ids` on the Table
25
+ kernel. The kernel id is now asked once per client (`tableList` shares it).
26
+ * **`useTable` reads one Table by id** (it listed up to 500 Tables to find one, and answered "no
27
+ table" past the 500th). **`useTable`, `useTables`, `useMyLevels`, `useMyLevel` and `useFields`
28
+ share ONE request per question** across sibling mounts (in flight, and for 2 s after); `reload()`
29
+ always asks again. *Consumer action:* none — same answers, fewer requests.
30
+ * Both doors applied to production 2026-09-26 (`matrx-frontend/migrations/campaign/doorspeed_*.sql`);
31
+ `store.generated.ts` regenerated.
32
+
33
+ ## 0.58.17 (2026-09-25 — hand-corrected by PUBLISH-CHANGELOG-FIX: this is the version KERNEL-TAILS's commits actually shipped in, per `git log npm/records/v0.58.16..npm/records/v0.58.17 -- apps/shared/records`)
34
+
35
+ ### Lane KERNEL-TAILS (2026-09-25)
36
+
37
+ * **No signed-out caller holds any grant in `custom`.** The anonymous EXECUTE on
38
+ `custom._older_table_copy_refusal(uuid)` was a dead door (`anon` has no USAGE on the schema and
39
+ the copy fence runs as the writer) and is revoked; its door row no longer declares anonymous
40
+ callers. `real-doors.test.ts` now asserts 0 anon-executable functions in `custom` and 0 anonymous
41
+ door rows for it, declared or not. No API change.
42
+
43
+ ## 0.58.16 (2026-09-25 — hand-corrected by PUBLISH-CHANGELOG-FIX: this is the version SUITE-HEALTH-3's commit actually shipped in, per `git log npm/records/v0.58.15..npm/records/v0.58.16 -- apps/shared/records`)
44
+
45
+ ### Lane SUITE-HEALTH-3 (2026-09-25)
10
46
 
11
47
  * **Retired: `custom.context_resolve(p_organization_id, p_bindings, p_scope_slug)`** — the
12
48
  three-argument overload was a "retired shape" whose whole body forwarded to
@@ -1962,3 +1998,5 @@ Two defects the suite found in the mirror and fixed:
1962
1998
  `custom.value_versions` overwrite all four with the truth BEFORE
1963
1999
  `custom.value_envelope_refusal` looks. Those four predictions are gone —
1964
2000
  a sentence the store never says is a defect in the mirror.
2001
+
2002
+
@@ -4212,6 +4212,7 @@ var STORE_DOORS = [
4212
4212
  { name: "read_records_by_ids", args: "p_organization_id uuid, p_table_id uuid, p_record_ids uuid[], p_by_id boolean DEFAULT false", returns: "TABLE(id uuid, document jsonb, level permission_level)", security: "definer" },
4213
4213
  { name: "read_records_in_view_order", args: "p_organization_id uuid, p_view_id uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0, p_filter jsonb DEFAULT NULL::jsonb", returns: 'TABLE(id uuid, document jsonb, level permission_level, "position" numeric)', security: "definer" },
4214
4214
  { name: "read_records_matching", args: "p_organization_id uuid, p_table_id uuid, p_filter jsonb DEFAULT '{}'::jsonb, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0", returns: "TABLE(id uuid, document jsonb, level permission_level)", security: "definer" },
4215
+ { name: "read_records_page", args: "p_organization_id uuid, p_table_id uuid, p_filter jsonb DEFAULT '{}'::jsonb, p_search text DEFAULT NULL::text, p_sort jsonb DEFAULT '[]'::jsonb, p_view_id uuid DEFAULT NULL::uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0", returns: "jsonb", security: "definer" },
4215
4216
  { name: "realtime_topic_admits", args: "p_topic text", returns: "boolean", security: "definer" },
4216
4217
  { name: "record_aggregate", 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, p_compare jsonb DEFAULT NULL::jsonb", returns: "TABLE(groups jsonb, measures jsonb, row_count bigint, prior_groups jsonb, prior_measures jsonb, prior_row_count bigint, delta jsonb, compare jsonb)", security: "definer" },
4217
4218
  { name: "record_applicability", args: "p_organization_id uuid, p_record_id uuid", returns: "TABLE(rule_id uuid, rule_name text, rule_version integer, applies boolean, answer jsonb)", security: "invoker" },
@@ -4220,6 +4221,7 @@ var STORE_DOORS = [
4220
4221
  { name: "record_card", args: "p_viewer uuid, p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "definer" },
4221
4222
  { name: "record_carrying_edges", args: "p_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone", returns: "TABLE(container_id uuid, item_id uuid, edge_role text)", security: "invoker" },
4222
4223
  { name: "record_change_actions", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
4224
+ { name: "record_change_many", args: "p_organization_id uuid, p_table_id uuid, p_changes jsonb", returns: "jsonb", security: "definer" },
4223
4225
  { name: "record_delete", args: "p_organization_id uuid, p_record_id uuid", returns: "timestamp with time zone", security: "definer" },
4224
4226
  { name: "record_entity_edges", 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", returns: "TABLE(target_type text, target_id uuid, edge_role text, field_id uuid, ord integer)", security: "invoker" },
4225
4227
  { name: "record_filter_sql", args: "p_filter jsonb", returns: "text", security: "invoker" },
@@ -4339,6 +4341,7 @@ var STORE_DOORS = [
4339
4341
  { name: "table_carries_its_rows", args: "p_user_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level", returns: "boolean", security: "definer" },
4340
4342
  { name: "table_column_source", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "invoker" },
4341
4343
  { name: "table_contents", args: "p_organization_id uuid, p_table_id uuid", returns: "TABLE(record_id uuid, kind text, goes_at integer)", security: "invoker" },
4344
+ { name: "table_copy_evaluation_state", args: "p_table_id uuid", returns: "jsonb", security: "definer" },
4342
4345
  { name: "table_declare", args: "p_organization_id uuid, p_spec jsonb", returns: "uuid", security: "definer" },
4343
4346
  { name: "table_decorate", args: "p_organization_id uuid, p_table_id uuid, p_path text[], p_value jsonb DEFAULT NULL::jsonb", returns: "jsonb", security: "definer" },
4344
4347
  { name: "table_decorations", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
@@ -4411,7 +4414,13 @@ var STORE_DOORS = [
4411
4414
  { name: "visible_set", args: "p_user uuid, p_organization_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level, OUT o_all_visible boolean, OUT o_true_visibility platform.visibility[], OUT o_granted_all uuid[], OUT o_granted_visible uuid[], OUT o_carried_visible uuid[], OUT o_ladder_calls integer, OUT o_fallback boolean, OUT o_note text", returns: "record", security: "definer" },
4412
4415
  { name: "where_id_opens", args: "p_id uuid", returns: "jsonb", security: "definer" },
4413
4416
  { name: "where_tables_live", args: "p_table_ids uuid[]", returns: "TABLE(table_id uuid, lives_in text, why text)", security: "definer" },
4417
+ { name: "whole_value_ceiling", args: "p_organization_id uuid", returns: "bigint", security: "invoker" },
4418
+ { name: "whole_value_complete", args: "p_organization_id uuid, p_record_id uuid, p_field_key text, p_file_id uuid", returns: "jsonb", security: "definer" },
4419
+ { name: "whole_value_head", args: "p_text text", returns: "text", security: "invoker" },
4420
+ { name: "whole_value_park", args: "p_organization_id uuid, p_table_id uuid, p_record_id uuid, p_owner_id uuid, p_visibility platform.visibility, p_data jsonb, p_park jsonb", returns: "void", security: "invoker" },
4414
4421
  { name: "whole_value_pointer_of", args: "p_values jsonb, p_sources jsonb, p_key text", returns: "jsonb", security: "invoker" },
4422
+ { name: "whole_value_source", args: "p_text text, p_writer_src jsonb", returns: "jsonb", security: "invoker" },
4423
+ { name: "whole_values_waiting", args: "p_organization_id uuid, p_record_ids uuid[]", returns: "TABLE(record_id uuid, field_key text, pointer text, value_version integer, sha256 text, bytes bigint, chars bigint, owner_id uuid, record_visibility text, table_id uuid, table_name text)", security: "definer" },
4415
4424
  { name: "widget_kernel_id", args: "", returns: "uuid", security: "invoker" },
4416
4425
  { name: "with_whole_value_pointers", args: "p_document jsonb, p_values jsonb, p_sources jsonb, p_visible text[], p_by_id boolean DEFAULT false, p_key_ids jsonb DEFAULT '{}'::jsonb", returns: "jsonb", security: "invoker" },
4417
4426
  { name: "withheld_marker", args: "p_mask jsonb, p_key text", returns: "jsonb", security: "invoker" },
@@ -4525,27 +4534,27 @@ var STORE_KNOBS = [
4525
4534
  { key: "world_publish_enabled", value: "false", type: "boolean" }
4526
4535
  ];
4527
4536
  var STORE_REFUSAL_CODES = [
4528
- { code: "02000", raised_by: "_checklist_instantiate,_portal_config_judge,_portal_invite_payload,_read_record_with,_share_write_person,_table_share_invite_payload,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_run,doc_letterhead,doc_render_body,doc_render_document,doc_render_read,doc_sign,doc_signature_intact,doc_signature_read,doc_template_delete,doc_template_read,doc_template_save,enrich_pin,entity_field_retire,entity_field_update,entity_record_read,entity_value_write,external_history_event,external_rows,external_stub_upsert,external_writes_set,io_restore,migrate_delete,migrate_extract_parent,migrate_merge,migrate_reclass,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,organization_clear,portal_archive,portal_card,portal_declare,portal_form,portal_form_submit,portal_invite,portal_invite_accept,portal_preview,portal_principal_bind,portal_restore,portal_revoke,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_halves_repair,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,table_archive,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_share_outside_revoke,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state" },
4529
- { code: "0A000", raised_by: "checklist_step_complete,external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,rule_eval,rule_filter_node_sql,work_assign" },
4537
+ { code: "02000", raised_by: "_checklist_instantiate,_portal_config_judge,_portal_invite_payload,_read_record_with,_share_write_person,_table_share_invite_payload,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_run,doc_letterhead,doc_render_body,doc_render_document,doc_render_read,doc_sign,doc_signature_intact,doc_signature_read,doc_template_delete,doc_template_read,doc_template_save,enrich_pin,entity_field_retire,entity_field_update,entity_record_read,entity_value_write,external_history_event,external_rows,external_stub_upsert,external_writes_set,io_restore,migrate_delete,migrate_extract_parent,migrate_merge,migrate_reclass,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,organization_clear,portal_archive,portal_card,portal_declare,portal_form,portal_form_submit,portal_invite,portal_invite_accept,portal_preview,portal_principal_bind,portal_restore,portal_revoke,record_change_many,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_halves_repair,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,table_archive,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_share_outside_revoke,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state" },
4538
+ { code: "0A000", raised_by: "checklist_step_complete,external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,read_records_page,rule_eval,rule_filter_node_sql,work_assign" },
4530
4539
  { code: "22003", raised_by: "context_resolve" },
4531
- { code: "22004", raised_by: "_entity_custom_fields_guard,_portal_config_judge,_share_write_person,_value_envelope,actor_word,agg_assert_key,agg_compare_windows,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,context_tag_copy,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,field_history,form_declare,form_submit,home_add,inbox_snooze,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_purge_hard,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_form_submit,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,record_write_graph,record_write_many,relation_carry,relation_halves_repair,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_archive,table_declare,table_move,table_share_outside_grant,table_share_outside_invite,value_restore,view_declare,view_designate,view_look_read,view_look_set,work_approval_decide,work_approval_request,work_template_declare" },
4540
+ { code: "22004", raised_by: "_entity_custom_fields_guard,_portal_config_judge,_share_write_person,_value_envelope,actor_word,agg_assert_key,agg_compare_windows,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,context_tag_copy,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,field_history,form_declare,form_submit,home_add,inbox_snooze,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_purge_hard,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_form_submit,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,record_write_graph,record_write_many,relation_carry,relation_halves_repair,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_archive,table_declare,table_move,table_share_outside_grant,table_share_outside_invite,value_restore,view_declare,view_designate,view_look_read,view_look_set,whole_value_complete,work_approval_decide,work_approval_request,work_template_declare" },
4532
4541
  { code: "22007", raised_by: "agg_parse_moment,dashboard_window_sql" },
4533
4542
  { code: "22012", raised_by: "formula_eval,rule_eval,rule_sql_op" },
4534
- { code: "22023", raised_by: "_action_check,_booking_availability,_decorations_check,_entity_custom_fields_guard,_fx_date,_fx_num,_fx_unit,_fxp_level,_fxp_resolve,_fxp_tokens,_portal_config_judge,_take_op_id,_value_envelope,_view_field_key,_view_key_value,_work_shape_guard,action_run,actor_word,agg_assert_key,agg_calendar,agg_compare_windows,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_run,dashboard_target_field_assert,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_reference_rows,entity_reference_words,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,field_update,form_declare,form_draft_save,formula_eval,formula_parse,grid_layout_check,hub_changed_by,inbox_snooze,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,list_portals,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,pipeline_move_many,portal_declare,portal_form_submit,provenance_write,query_by_coordinates,query_rollup,read_records_archived,read_records_in_view_order,record_filter_sql,record_update,record_write_graph,record_write_many,relation_carry,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_sql_op,scope_table_provision,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_from_example,table_move,table_rules,table_share_outside_grant,table_sync,table_transfer_owner,table_webhook_declare,view_declare,view_keys_check,view_look_set,view_record_order_set,visibility_as_of,where_tables_live,work_approval_request,work_decide_many,work_inbox,work_list,work_slot_hold" },
4535
- { code: "23503", raised_by: "_action_check,_booking_availability,_checklist_instantiate,_containment_guard,_decorations_check,_display_spec_for,_field_document_for,_field_type_parity_guard,_pipeline_stage_key,_record_rule_uses,action_declare,action_run,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,autonumber_backfill,booking_cancel,booking_confirm,booking_declare,booking_hold,booking_reschedule,capture_publish,checklist_declare,checklist_steps_table,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,enrich_declare,enrich_due,enrich_land,form_declare,form_draft_save,form_submit,grid_layout,home_add,inbound_declare,inbound_mail_land,inbound_set,io_comment_write,io_import_begin,io_import_finish,io_import_report,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,pipeline_board,pipeline_declare,pipeline_move,pipeline_read,pipeline_transition_refusal,promote_field,promote_table,read_records_in_view_order,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_run,sign_request_create,subscription_mute,subscription_preview,table_decorate,table_from_example,table_webhook_archive,table_webhook_declare,view_declare,view_designate,view_look_set,view_record_order_set,work_set_state,work_take_assignment,work_template_instantiate" },
4543
+ { code: "22023", raised_by: "_action_check,_booking_availability,_decorations_check,_entity_custom_fields_guard,_fx_date,_fx_num,_fx_unit,_fxp_level,_fxp_resolve,_fxp_tokens,_portal_config_judge,_take_op_id,_value_envelope,_view_field_key,_view_key_value,_work_shape_guard,action_run,actor_word,agg_assert_key,agg_calendar,agg_compare_windows,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_run,dashboard_target_field_assert,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_reference_rows,entity_reference_words,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,field_update,form_declare,form_draft_save,formula_eval,formula_parse,grid_layout_check,hub_changed_by,inbox_snooze,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,list_portals,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,pipeline_move_many,portal_declare,portal_form_submit,provenance_write,query_by_coordinates,query_rollup,read_records_archived,read_records_in_view_order,read_records_page,record_change_many,record_filter_sql,record_update,record_write_graph,record_write_many,relation_carry,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_sql_op,scope_table_provision,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_from_example,table_move,table_rules,table_share_outside_grant,table_sync,table_transfer_owner,table_webhook_declare,view_declare,view_keys_check,view_look_set,view_record_order_set,visibility_as_of,where_tables_live,work_approval_request,work_decide_many,work_inbox,work_list,work_slot_hold" },
4544
+ { code: "23503", raised_by: "_action_check,_booking_availability,_checklist_instantiate,_containment_guard,_decorations_check,_display_spec_for,_field_document_for,_field_type_parity_guard,_pipeline_stage_key,_record_rule_uses,action_declare,action_run,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,autonumber_backfill,booking_cancel,booking_confirm,booking_declare,booking_hold,booking_reschedule,capture_publish,checklist_declare,checklist_steps_table,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,enrich_declare,enrich_due,enrich_land,form_declare,form_draft_save,form_submit,grid_layout,home_add,inbound_declare,inbound_mail_land,inbound_set,io_comment_write,io_import_begin,io_import_finish,io_import_report,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,pipeline_board,pipeline_declare,pipeline_move,pipeline_read,pipeline_transition_refusal,promote_field,promote_table,read_records_in_view_order,read_records_page,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_run,sign_request_create,subscription_mute,subscription_preview,table_decorate,table_from_example,table_webhook_archive,table_webhook_declare,view_declare,view_designate,view_look_set,view_record_order_set,whole_value_complete,work_set_state,work_take_assignment,work_template_instantiate" },
4536
4545
  { code: "23505", raised_by: "_portal_config_judge,_share_write_person,_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,sign_request_cancel,sign_request_create,table_share_outside_resend,work_approval_decide,work_slot_hold" },
4537
- { code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_display_format_check,_display_spec_for,_entity_custom_fields_guard,_field_class_guard,_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,_record_source_key_is_record,_relation_halves_agree,_relation_kernel_targets,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_columns_word_guard,_table_shape_guard,_undeclared_key_guard,_value_envelope,_with_display,_work_shape_guard,_workdoors_approval_guard,action_run,assert_columns_are_defined,assert_entity_is_organization_scoped,booking_declare,capture_publish,capture_sheet_declare,checklist_declare,checklist_step_complete,doc_sign,doc_signature_write,doc_template_save,entity_field_declare,entity_field_retire,entity_field_update,entity_records_find,entity_table,field_declare,field_retire,field_update,home_add,io_comment_write,io_import_rows,migrate_merge,migrate_purge_hard,portal_archive,portal_restore,record_restore,record_write_graph,relation_carry,relation_halves_repair,relation_own,sign_request_create,sign_request_sign,table_declare,table_from_example,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate" },
4538
- { code: "40001", raised_by: "has_visibility_at,table_move" },
4539
- { code: "42501", raised_by: "_context_copy_fence,_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_portal_config_judge,_portal_principal_here,_read_record_with,_rule_definition_write,_store_door,agent_table_claim,agg_fields_readable_assert,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_may_know_table,assert_organization_admin,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,context_resolve,conversation_scope_bind,conversation_scope_unbind,dashboard_target_field_assert,doc_sign,enrich_declare,enrich_due,enrich_land,enrich_normalize,entity_field_declare,entity_field_retire,entity_field_update,entity_value_write,external_write_through,form_declare,form_draft_save,form_public_asks,form_submit,inbound_mail_land,inbox_clear,inbox_snooze,inbox_unclear,inbox_unsnooze,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,member_personal_tables,migrate_purge,migrate_purge_hard,migrate_purge_hard_request,migrate_reclass,my_levels,organization_clear,organization_contents,portal_declare,portal_form,portal_form_submit,portal_invitation,portal_invite,portal_invite_accept,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,read_records_archived,read_records_by_ids,read_records_matching,record_table,record_write_graph,relation_halves_disagreements,relation_halves_repair,resolve_context,scope_table_provision,share_grant,subscription_mute,subscription_preview,table_move,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_transfer_owner,table_webhook_declare,view_declare,view_look_set,view_record_order_set,visibility_as_of,where_tables_live,work_approval_decide,work_approval_read,work_approval_request,work_person" },
4546
+ { code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_display_format_check,_display_spec_for,_entity_custom_fields_guard,_field_class_guard,_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,_record_source_key_is_record,_relation_halves_agree,_relation_kernel_targets,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_columns_word_guard,_table_shape_guard,_undeclared_key_guard,_value_envelope,_with_display,_work_shape_guard,_workdoors_approval_guard,action_run,assert_columns_are_defined,assert_entity_is_organization_scoped,booking_declare,capture_publish,capture_sheet_declare,checklist_declare,checklist_step_complete,doc_sign,doc_signature_write,doc_template_save,entity_field_declare,entity_field_retire,entity_field_update,entity_records_find,entity_table,field_declare,field_retire,field_update,home_add,io_comment_write,io_import_rows,migrate_merge,migrate_purge_hard,portal_archive,portal_restore,record_restore,record_write_graph,relation_carry,relation_halves_repair,relation_own,sign_request_create,sign_request_sign,table_declare,table_from_example,validate_value_envelope,validate_values,whole_value_complete,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate" },
4547
+ { code: "40001", raised_by: "has_visibility_at,table_move,whole_value_complete" },
4548
+ { code: "42501", raised_by: "_context_copy_fence,_copy_evaluation_note,_copy_evaluation_reimage,_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_portal_config_judge,_portal_principal_here,_read_record_with,_rule_definition_write,_store_door,agent_table_claim,agg_fields_readable_assert,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_may_know_table,assert_organization_admin,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,context_resolve,conversation_scope_bind,conversation_scope_unbind,dashboard_target_field_assert,doc_sign,enrich_declare,enrich_due,enrich_land,enrich_normalize,entity_field_declare,entity_field_retire,entity_field_update,entity_value_write,external_write_through,form_declare,form_draft_save,form_public_asks,form_submit,inbound_mail_land,inbox_clear,inbox_snooze,inbox_unclear,inbox_unsnooze,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,member_personal_tables,migrate_purge,migrate_purge_hard,migrate_purge_hard_request,migrate_reclass,my_levels,organization_clear,organization_contents,portal_declare,portal_form,portal_form_submit,portal_invitation,portal_invite,portal_invite_accept,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,read_records_archived,read_records_by_ids,read_records_matching,read_records_page,record_table,record_write_graph,relation_halves_disagreements,relation_halves_repair,resolve_context,scope_table_provision,share_grant,subscription_mute,subscription_preview,table_copy_evaluation_state,table_move,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_transfer_owner,table_webhook_declare,view_declare,view_look_set,view_record_order_set,visibility_as_of,where_tables_live,whole_value_complete,work_approval_decide,work_approval_read,work_approval_request,work_person" },
4540
4549
  { code: "42703", raised_by: "entity_table,portal_declare" },
4541
4550
  { code: "42P17", raised_by: "_field_reads_what_it_reads,far_value" },
4542
4551
  { code: "53400", raised_by: "anon_rate_take,delete_cascade_closure,enrich_due,enrich_land,promote_field" },
4543
- { code: "54000", raised_by: "action_run,form_draft_save,hub_changed_by,pipeline_move_many,record_headers,table_decorate,table_from_example,table_row_counts,table_sync,table_webhook_declare,view_record_order_set,work_decide_many" },
4552
+ { code: "54000", raised_by: "action_run,form_draft_save,hub_changed_by,pipeline_move_many,record_change_many,record_headers,table_decorate,table_from_example,table_row_counts,table_sync,table_webhook_declare,view_record_order_set,work_decide_many" },
4544
4553
  { code: "54001", raised_by: "record_delete" },
4545
4554
  { code: "55000", raised_by: "inbox_clear,inbox_snooze,table_move,work_approval_decide,work_approval_request" },
4546
4555
  { code: "P0001", raised_by: "action_run" },
4547
- { code: "P0002", raised_by: "inbox_clear,inbox_snooze" },
4548
- { code: "PT409", raised_by: "record_update" },
4556
+ { code: "P0002", raised_by: "inbox_clear,inbox_snooze,whole_value_complete" },
4557
+ { code: "PT409", raised_by: "record_change_many,record_update" },
4549
4558
  { code: "PT428", raised_by: "_record_rule_uses" }
4550
4559
  ];
4551
4560
  var ENTITY_TOKENS = [
@@ -5199,6 +5208,8 @@ var ENTITY_TOKENS = [
5199
5208
  "party_contact_point",
5200
5209
  "passkey_credential",
5201
5210
  "path_drift_repair_2026_09",
5211
+ "pb_claim_appeals_fd31de",
5212
+ "pb_insurance_claims_fd31de",
5202
5213
  "pc_article",
5203
5214
  "pc_episode",
5204
5215
  "pc_show",
@@ -5500,7 +5511,6 @@ var ENTITY_TOKENS = [
5500
5511
  "visibility_epoch",
5501
5512
  "voice",
5502
5513
  "war_room",
5503
- "wbx_capture",
5504
5514
  "wbx_demo",
5505
5515
  "wbx_guidance",
5506
5516
  "wbx_highlight",
@@ -5696,6 +5706,13 @@ var DOORS = {
5696
5706
  // `custom.record_filter_sql`, the one body `custom.agg_sql` also calls, so the
5697
5707
  // rows it opens are the rows the number counted.
5698
5708
  readRecordsMatching: "read_records_matching",
5709
+ // THE SAME READ DOOR, ASKED FOR ONE PAGE THE STORE SORTED, SEARCHED AND COUNTED (DOOR-SPEED,
5710
+ // 2026-09-25). `custom.read_records_page` takes the same filter, adds a sort (by the words a
5711
+ // person sees on a choice column), a search over the columns this reader may see, a hand-ordered
5712
+ // view's order, and answers the TOTAL of the matching visible set — the record-store twin of the
5713
+ // older store's `get_user_table_data_paginated_v2`, so a grid never reads a whole table to draw
5714
+ // one page. Its documents are built by `read_records_by_ids`. A separate NAME for the reason above.
5715
+ readRecordsPage: "read_records_page",
5699
5716
  // THE SAME READ DOOR, ADDRESSED BY ABSENCE. Every door above answers LIVE rows
5700
5717
  // only — each of them hard-codes `and r.deleted_at is null` — so until this one
5701
5718
  // existed no screen could list an archived record however it was written, and
@@ -5711,6 +5728,11 @@ var DOORS = {
5711
5728
  queryTableAsOf: "query_table_as_of",
5712
5729
  recordWrite: "record_write",
5713
5730
  recordWriteMany: "record_write_many",
5731
+ // MANY CHANGES TO ONE TABLE, ONE TRANSACTION (DOOR-SPEED, 2026-09-25). `custom.record_change_many`
5732
+ // takes inserts, updates and archives: inserts through `record_write_many`, every update in ONE
5733
+ // UPDATE statement (each record asked its editor rung, CAS honoured), archives through
5734
+ // `record_delete`. One refused change refuses the batch and nothing is saved; the hint names it.
5735
+ recordChangeMany: "record_change_many",
5714
5736
  // A PARENT, THE EDGES IT STANDS ON AND THE ROWS THAT BELONG TO IT — ALL OR NOTHING.
5715
5737
  // `recordWrite` and `recordWriteMany` are each ONE statement, so a caller that needs a
5716
5738
  // parent, its provenance edge and its child rows to land together had no door at all: a
@@ -6317,6 +6339,14 @@ function createRecordsClient(config) {
6317
6339
  }
6318
6340
  return ok(response.data);
6319
6341
  }
6342
+ let kernelAsked = null;
6343
+ function tableKernel(where) {
6344
+ kernelAsked ??= callDoor(DOORS.tableKernelId, {}, where).then((answer) => {
6345
+ if (!answer.ok) kernelAsked = null;
6346
+ return answer;
6347
+ });
6348
+ return kernelAsked;
6349
+ }
6320
6350
  function unfold(document) {
6321
6351
  const raw = document ?? {};
6322
6352
  const hidden = raw._hidden ?? {};
@@ -6356,6 +6386,25 @@ function createRecordsClient(config) {
6356
6386
  "recordWriteMany"
6357
6387
  );
6358
6388
  },
6389
+ async recordChangeMany({ table_id, changes }) {
6390
+ const opId = mintOpId();
6391
+ return callDoor(
6392
+ DOORS.recordChangeMany,
6393
+ {
6394
+ p_organization_id: org,
6395
+ p_table_id: table_id,
6396
+ p_changes: changes.map(
6397
+ (change) => change.op === "insert" ? { op: "insert", data: { ...change.data, _op_id: opId } } : change.op === "update" ? {
6398
+ op: "update",
6399
+ record_id: change.record_id,
6400
+ patch: { ...change.patch, _op_id: opId },
6401
+ ...change.expected_version === void 0 || change.expected_version === null ? {} : { expected_version: change.expected_version }
6402
+ } : { op: "archive", record_id: change.record_id }
6403
+ )
6404
+ },
6405
+ "recordChangeMany"
6406
+ );
6407
+ },
6359
6408
  async recordWriteGraph({ table_id, parent, children, edges }) {
6360
6409
  const opId = mintOpId();
6361
6410
  return callDoor(
@@ -6584,6 +6633,34 @@ function createRecordsClient(config) {
6584
6633
  const total = rows.length < limit ? offset + rows.length : null;
6585
6634
  return ok({ rows, total });
6586
6635
  },
6636
+ async listPage({ table_id, filter, search, sort, view_id, limit = 50, offset = 0 }) {
6637
+ const door = await callDoor(
6638
+ DOORS.readRecordsPage,
6639
+ {
6640
+ p_organization_id: org,
6641
+ p_table_id: table_id,
6642
+ p_filter: filter ?? {},
6643
+ p_search: search ?? null,
6644
+ p_sort: sort ?? [],
6645
+ p_view_id: view_id ?? null,
6646
+ p_limit: limit,
6647
+ p_offset: offset
6648
+ },
6649
+ "listPage"
6650
+ );
6651
+ if (!door.ok) return err(door.error);
6652
+ const answer = door.data;
6653
+ const rows = (answer?.rows ?? []).map((row) => {
6654
+ const { document, hidden } = unfold(row.document);
6655
+ return { id: row.id, document, level: row.level, hidden };
6656
+ });
6657
+ return ok({
6658
+ rows,
6659
+ total: Number(answer?.total ?? 0),
6660
+ limit: Number(answer?.limit ?? limit),
6661
+ offset: Number(answer?.offset ?? offset)
6662
+ });
6663
+ },
6587
6664
  async query(input) {
6588
6665
  const plan = planQuery(input);
6589
6666
  const sets = [];
@@ -6688,8 +6765,22 @@ function createRecordsClient(config) {
6688
6765
  offset: plan.read.offset
6689
6766
  });
6690
6767
  },
6768
+ async tableRead({ table_id }) {
6769
+ const kernel = await tableKernel("tableRead.kernel");
6770
+ if (!kernel.ok) return err(kernel.error);
6771
+ const door = await callDoor(
6772
+ DOORS.readRecordsByIds,
6773
+ { p_organization_id: org, p_table_id: kernel.data, p_record_ids: [table_id] },
6774
+ "tableRead"
6775
+ );
6776
+ if (!door.ok) return err(door.error);
6777
+ const row = (door.data ?? []).find((r) => r.id === table_id);
6778
+ if (!row) return ok(null);
6779
+ const { document } = unfold(row.document);
6780
+ return ok({ ...document, id: row.id, organization_id: org });
6781
+ },
6691
6782
  async tableList() {
6692
- const kernel = await callDoor(DOORS.tableKernelId, {}, "tableList.kernel");
6783
+ const kernel = await tableKernel("tableList.kernel");
6693
6784
  if (!kernel.ok) return err(kernel.error);
6694
6785
  const door = await callDoor(
6695
6786
  DOORS.readRecords,