@ai-matrx/records 0.58.14 → 0.58.15

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.
@@ -2967,7 +2967,9 @@ var STORE_DOORS = [
2967
2967
  { name: "choice_render", args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb", returns: "jsonb", security: "invoker" },
2968
2968
  { name: "choice_render_groups", args: "p_map jsonb, p_groups jsonb", returns: "jsonb", security: "invoker" },
2969
2969
  { name: "choice_render_note", args: "p_field jsonb, p_value jsonb", returns: "jsonb", security: "invoker" },
2970
+ { name: "choice_render_plan", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "invoker" },
2970
2971
  { name: "choice_render_value", args: "p_field jsonb, p_value jsonb", returns: "jsonb", security: "invoker" },
2972
+ { name: "choice_render_with", args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb, p_plan jsonb", returns: "jsonb", security: "invoker" },
2971
2973
  { name: "choice_slug", args: "p_word text", returns: "text", security: "invoker" },
2972
2974
  { name: "choice_synonyms", args: "p_organization_id uuid, p_table_id uuid, p_token text", returns: "text[]", security: "invoker" },
2973
2975
  { name: "choice_synonyms_in", args: "p_map jsonb, p_token text", returns: "text[]", security: "invoker" },
@@ -3067,7 +3069,9 @@ var STORE_DOORS = [
3067
3069
  { name: "entity_reference_fields", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "invoker" },
3068
3070
  { name: "entity_reference_kinds", args: "", returns: "TABLE(token text, label text, category text)", security: "definer" },
3069
3071
  { name: "entity_reference_render", args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb", returns: "jsonb", security: "invoker" },
3072
+ { name: "entity_reference_render_with", args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb, p_fields jsonb", returns: "jsonb", security: "invoker" },
3070
3073
  { name: "entity_reference_rows", args: "p_organization_id uuid, p_token text, p_ids uuid[]", returns: "jsonb", security: "invoker" },
3074
+ { name: "entity_reference_target", args: "p_token text", returns: "jsonb", security: "definer" },
3071
3075
  { name: "entity_reference_words", args: "p_organization_id uuid, p_refs jsonb", returns: "jsonb", security: "definer" },
3072
3076
  { name: "entity_table", args: "p_token text", returns: "TABLE(token text, schema_name text, table_name text, type text, title_column text, label text, has_organization boolean, has_deleted_at boolean)", security: "invoker" },
3073
3077
  { name: "entity_value_write", args: "p_organization_id uuid, p_token text, p_record_id uuid, p_patch jsonb", returns: "jsonb", security: "invoker" },
@@ -3192,6 +3196,7 @@ var STORE_DOORS = [
3192
3196
  { name: "is_a_retirement", args: "p_old_deleted timestamp with time zone, p_new_deleted timestamp with time zone, p_old_data jsonb, p_new_data jsonb, p_old_table uuid, p_new_table uuid, p_old_org uuid, p_new_org uuid, p_old_class text, p_new_class text", returns: "boolean", security: "invoker" },
3193
3197
  { name: "ladder_replanners", args: "p_roots text[] DEFAULT ARRAY['custom.has_visibility'::text, 'custom.effective_level'::text, 'custom.reaches_directly'::text, 'custom.visible_set'::text]", returns: "TABLE(fn text, lang text, why text, remedy text)", security: "definer" },
3194
3198
  { name: "level_floor", args: "", returns: "permission_level", security: "definer" },
3199
+ { name: "levels_of", args: "p_user_id uuid, p_ids uuid[]", returns: "jsonb", security: "definer" },
3195
3200
  { name: "levels_raised_by_a_less_specific_rung", args: "", returns: "TABLE(organization_id uuid, organization_name text, member_id uuid, member_email text, record_id uuid, addressed_level permission_level, answered_level permission_level)", security: "definer" },
3196
3201
  { name: "list_door_disagreements", args: "p_pretend text DEFAULT NULL::text, p_only_organization uuid DEFAULT NULL::uuid, p_sample integer DEFAULT 200", returns: "TABLE(organization_id uuid, organization_name text, member_id uuid, table_id uuid, record_id uuid, door text, why text)", security: "invoker" },
3197
3202
  { name: "list_door_disagreements", args: "p_pretend text, p_only_organization uuid, p_sample integer, p_exhaustive boolean", returns: "TABLE(organization_id uuid, organization_name text, member_id uuid, table_id uuid, record_id uuid, door text, why text)", security: "invoker" },
@@ -3312,6 +3317,8 @@ var STORE_DOORS = [
3312
3317
  { name: "read_door_ladder_ceiling", args: "", returns: "integer", security: "invoker" },
3313
3318
  { name: "read_door_parity", args: "p_organization_id uuid, p_table_id uuid, p_user uuid, p_required permission_level, p_sample integer", returns: "TABLE(record_id uuid, set_based boolean, per_row boolean, verdict text)", security: "definer" },
3314
3319
  { name: "read_mask", args: "p_organization_id uuid, p_record_id uuid, p_action text DEFAULT 'read'::text", returns: "jsonb", security: "definer" },
3320
+ { name: "read_mask_at", args: "p_record_id uuid, p_level_given boolean, p_level permission_level, p_action text DEFAULT 'read'::text", returns: "jsonb", security: "definer" },
3321
+ { name: "read_mask_for", args: "p_user_id uuid, p_organization_id uuid, p_table_id uuid, p_level permission_level, p_action text DEFAULT 'read'::text", returns: "jsonb", security: "definer" },
3315
3322
  { name: "read_paths_outside_the_door", args: "", returns: "TABLE(object_name text, why text)", security: "invoker" },
3316
3323
  { name: "read_record", args: "p_organization_id uuid, p_record_id uuid, p_by_id boolean DEFAULT false", returns: "jsonb", security: "definer" },
3317
3324
  { name: "read_records", args: "p_organization_id uuid, p_table_id uuid, 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" },
@@ -3352,6 +3359,7 @@ var STORE_DOORS = [
3352
3359
  { name: "record_value_one", args: "p_organization_id uuid, p_record_id uuid, p_key text", returns: "jsonb", security: "invoker" },
3353
3360
  { name: "record_values", args: "p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "invoker" },
3354
3361
  { name: "record_values_of", args: "p_row custom.record", returns: "jsonb", security: "invoker" },
3362
+ { name: "record_values_step", args: "p_row custom.record, p_cache jsonb DEFAULT '{}'::jsonb, OUT o_doc jsonb, OUT o_cache jsonb", returns: "record", security: "invoker" },
3355
3363
  { name: "record_values_versioned", args: "p_organization_id uuid, p_record_id uuid", 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)", security: "definer" },
3356
3364
  { name: "record_words", args: "p_organization_id uuid, p_record_id uuid, p_noun text DEFAULT NULL::text", returns: "text", security: "definer" },
3357
3365
  { name: "record_write", args: "p_organization_id uuid, p_table_id uuid, p_data jsonb", returns: "uuid", security: "definer" },
@@ -3374,7 +3382,7 @@ var STORE_DOORS = [
3374
3382
  { name: "relation_words_many", args: "p_organization_id uuid, p_field_id uuid, p_record_ids uuid[]", returns: "TABLE(record_id uuid, words text)", security: "definer" },
3375
3383
  { name: "reopen_declared_doors", args: "", returns: "TABLE(reopened text)", security: "definer" },
3376
3384
  { name: "required_epoch", args: "p_container_type text, p_container_id uuid, p_item_type text, p_item_id uuid", returns: "bigint", security: "definer" },
3377
- { name: "resolve_context", args: "p_entity_type text, p_entity_id uuid, p_record_ids uuid[] DEFAULT NULL::uuid[], p_table_ids uuid[] DEFAULT NULL::uuid[]", returns: "jsonb", security: "definer" },
3385
+ { name: "resolve_context", args: "p_entity_type text, p_entity_id uuid, p_record_ids uuid[] DEFAULT NULL::uuid[], p_table_ids uuid[] DEFAULT NULL::uuid[], p_system_item_refs text[] DEFAULT NULL::text[]", returns: "jsonb", security: "definer" },
3378
3386
  { name: "resolve_first_match", args: "p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "invoker" },
3379
3387
  { name: "resolve_id", args: "p_organization_id uuid, p_id uuid", returns: "uuid", security: "invoker" },
3380
3388
  { name: "retired_actor_words", args: "", returns: "jsonb", security: "invoker" },
@@ -3501,6 +3509,8 @@ var STORE_DOORS = [
3501
3509
  { name: "view_designate", args: "p_organization_id uuid, p_table_id uuid, p_view_id uuid, p_layout text DEFAULT NULL::text", returns: "uuid", security: "definer" },
3502
3510
  { name: "view_keys", args: "", returns: "TABLE(path text, shape text, layouts text[], writer text, sentence text)", security: "invoker" },
3503
3511
  { name: "view_keys_check", args: "p_organization_id uuid, p_table_id uuid, p_set jsonb, p_old jsonb DEFAULT '{}'::jsonb", returns: "jsonb", security: "invoker" },
3512
+ { name: "view_look_read", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
3513
+ { name: "view_look_set", args: "p_organization_id uuid, p_table_id uuid, p_view_id uuid, p_look jsonb", returns: "jsonb", security: "definer" },
3504
3514
  { name: "view_record_order_set", args: "p_organization_id uuid, p_view_id uuid, p_record_ids uuid[]", returns: "jsonb", security: "definer" },
3505
3515
  { name: "views", args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid", returns: "TABLE(view_id uuid, name text, table_id uuid, filters jsonb, definition jsonb, created_at timestamp with time zone)", security: "definer" },
3506
3516
  { name: "visibility_ancestors", args: "p_item_type text, p_item_id uuid", returns: "TABLE(container_type text, container_id uuid, depth integer, max_level permission_level)", security: "definer" },
@@ -3627,18 +3637,18 @@ var STORE_KNOBS = [
3627
3637
  { key: "world_publish_enabled", value: "false", type: "boolean" }
3628
3638
  ];
3629
3639
  var STORE_REFUSAL_CODES = [
3630
- { code: "02000", raised_by: "_checklist_instantiate,_portal_config_judge,_portal_invite_payload,_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,read_record,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" },
3640
+ { 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" },
3631
3641
  { 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" },
3632
3642
  { code: "22003", raised_by: "context_resolve" },
3633
- { 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,work_approval_decide,work_approval_request,work_template_declare" },
3643
+ { 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" },
3634
3644
  { code: "22007", raised_by: "agg_parse_moment,dashboard_window_sql" },
3635
3645
  { code: "22012", raised_by: "formula_eval,rule_eval,rule_sql_op" },
3636
- { 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_webhook_declare,view_declare,view_keys_check,view_record_order_set,visibility_as_of,where_tables_live,work_approval_request,work_decide_many,work_inbox,work_list,work_slot_hold" },
3637
- { 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_record_order_set,work_set_state,work_take_assignment,work_template_instantiate" },
3646
+ { 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_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" },
3647
+ { 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" },
3638
3648
  { 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" },
3639
3649
  { 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" },
3640
3650
  { code: "40001", raised_by: "has_visibility_at,table_move" },
3641
- { 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,_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,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_webhook_declare,visibility_as_of,where_tables_live,work_approval_decide,work_approval_read,work_approval_request,work_person" },
3651
+ { 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,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_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" },
3642
3652
  { code: "42703", raised_by: "entity_table,portal_declare" },
3643
3653
  { code: "42P17", raised_by: "_field_reads_what_it_reads,far_value" },
3644
3654
  { code: "53400", raised_by: "anon_rate_take,delete_cascade_closure,enrich_due,enrich_land,promote_field" },
@@ -5013,6 +5023,7 @@ var DOORS = {
5013
5023
  // ask, under the same wall and visibility gate as `portals` itself.
5014
5024
  portalTables: "portal_tables",
5015
5025
  tableFacts: "table_facts",
5026
+ tablesLiveWhere: "where_tables_live",
5016
5027
  // WHERE A TABLE LIVES, AND MOVING IT (SC-1' / SC-1-TAILS). `table_home` answers only when the
5017
5028
  // caller may open the Table (custom.where_id_opens) and names its organization FROM THE TABLE;
5018
5029
  // `table_move` moves it into another organization the caller belongs to, with every Table
@@ -5143,6 +5154,11 @@ var DOORS = {
5143
5154
  // VIEW-SWITCH-NOT-DESIGNATION (2026-09-25): how a Table opens is designated by an EDITOR through
5144
5155
  // this one door; `view_declare` refuses the default view's layout and is_default by name.
5145
5156
  viewDesignate: "view_designate",
5157
+ // VIEW-LOOK (lane VIEW-STATE-PERSONAL, VERIFIER-23 item 1, 2026-09-25): how ONE person is looking at
5158
+ // a shared view — its grouping, date field, sort, filter, hidden columns, widths, layout — is her
5159
+ // own look until an editor saves it onto the view (`view_declare`). Viewer on the Table.
5160
+ viewLookRead: "view_look_read",
5161
+ viewLookSet: "view_look_set",
5146
5162
  // The cadence CATALOGUE a person's screen may ask for. `agg_subscription_cadences`
5147
5163
  // above is the notifier's own and holds no client grant; this door delegates to
5148
5164
  // it, so a picker and the digest runner can never offer different words.
@@ -5687,6 +5703,31 @@ function createRecordsClient(config) {
5687
5703
  if (!doorExists(DOORS.tableFacts)) return ok(null);
5688
5704
  return callDoor(DOORS.tableFacts, { p_organization_id: org }, "tableFacts");
5689
5705
  },
5706
+ async tablesLiveWhere({ table_ids }) {
5707
+ if (table_ids.length === 0) return ok([]);
5708
+ const answered = await callDoor(DOORS.tablesLiveWhere, { p_table_ids: table_ids }, "tablesLiveWhere");
5709
+ if (!answered.ok) return answered;
5710
+ if (!Array.isArray(answered.data)) {
5711
+ const refusal = {
5712
+ code: "not_supported",
5713
+ message: "The record store answered where these tables are written in a shape this client cannot read, so no write location was assumed.",
5714
+ hint: "Regenerate @ai-matrx/records against the store (pnpm records:generate) \u2014 the door and this client disagree."
5715
+ };
5716
+ scream({ code: refusal.code, message: refusal.message, ...refusal.hint ? { hint: refusal.hint } : {}, where: "tablesLiveWhere" });
5717
+ return err(refusal);
5718
+ }
5719
+ const locations = [];
5720
+ for (const row of answered.data) {
5721
+ const value = row && typeof row === "object" ? row : null;
5722
+ if (!value || typeof value.table_id !== "string" || value.lives_in !== "record" && value.lives_in !== "older" || value.why !== null && value.why !== void 0 && typeof value.why !== "string") {
5723
+ const refusal = { code: "not_supported", message: "The record store returned an invalid table write location, so no write location was assumed." };
5724
+ scream({ code: refusal.code, message: refusal.message, where: "tablesLiveWhere" });
5725
+ return err(refusal);
5726
+ }
5727
+ locations.push({ table_id: value.table_id, lives_in: value.lives_in, why: typeof value.why === "string" ? value.why : null });
5728
+ }
5729
+ return ok(locations);
5730
+ },
5690
5731
  async tableHome({ table_id }) {
5691
5732
  const answered = await callDoor(DOORS.tableHome, { p_table_id: table_id }, "tableHome");
5692
5733
  if (!answered.ok) return answered;
@@ -6772,6 +6813,21 @@ function createRecordsClient(config) {
6772
6813
  "viewDesignate"
6773
6814
  );
6774
6815
  },
6816
+ async viewLookRead({ table_id }) {
6817
+ const answered = await callDoor(
6818
+ DOORS.viewLookRead,
6819
+ { p_organization_id: org, p_table_id: table_id },
6820
+ "viewLookRead"
6821
+ );
6822
+ return answered.ok ? ok(answered.data ?? {}) : answered;
6823
+ },
6824
+ async viewLookSet({ table_id, view_id, look }) {
6825
+ return callDoor(
6826
+ DOORS.viewLookSet,
6827
+ { p_organization_id: org, p_table_id: table_id, p_view_id: view_id, p_look: look },
6828
+ "viewLookSet"
6829
+ );
6830
+ },
6775
6831
  async subscriptionMute({ rule_id, muted }) {
6776
6832
  return callDoor(
6777
6833
  DOORS.subscriptionMute,