@ai-matrx/records 0.30.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -136,6 +136,9 @@ declare const RULE_NODE_KINDS: readonly [{
136
136
  }, {
137
137
  readonly node: "previous";
138
138
  readonly evaluated_by: "PIPELINES";
139
+ }, {
140
+ readonly node: "sibling_count";
141
+ readonly evaluated_by: "STAGE-RULES";
139
142
  }, {
140
143
  readonly node: "stage_count";
141
144
  readonly evaluated_by: "PIPELINES";
@@ -1737,11 +1740,21 @@ declare const STORE_DOORS: readonly [{
1737
1740
  readonly args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb";
1738
1741
  readonly returns: "jsonb";
1739
1742
  readonly security: "definer";
1743
+ }, {
1744
+ readonly name: "pipeline_gate_preview";
1745
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_stage text, p_gate jsonb";
1746
+ readonly returns: "jsonb";
1747
+ readonly security: "definer";
1740
1748
  }, {
1741
1749
  readonly name: "pipeline_move";
1742
1750
  readonly args: "p_organization_id uuid, p_record_id uuid, p_to text, p_also jsonb DEFAULT '{}'::jsonb, p_expected_version integer DEFAULT NULL::integer";
1743
1751
  readonly returns: "jsonb";
1744
1752
  readonly security: "definer";
1753
+ }, {
1754
+ readonly name: "pipeline_pending";
1755
+ readonly args: "p_organization_id uuid, p_table_id uuid";
1756
+ readonly returns: "jsonb";
1757
+ readonly security: "definer";
1745
1758
  }, {
1746
1759
  readonly name: "pipeline_read";
1747
1760
  readonly args: "p_organization_id uuid, p_table_id uuid";
@@ -2072,6 +2085,11 @@ declare const STORE_DOORS: readonly [{
2072
2085
  readonly args: "p_organization_id uuid, p_record_id uuid, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0";
2073
2086
  readonly returns: "TABLE(version integer, occurred_at timestamp with time zone, operation text, operation_label text, actor jsonb, changes jsonb, migration_id uuid, undoable boolean)";
2074
2087
  readonly security: "definer";
2088
+ }, {
2089
+ readonly name: "record_platform_keys";
2090
+ readonly args: "";
2091
+ readonly returns: "text[]";
2092
+ readonly security: "invoker";
2075
2093
  }, {
2076
2094
  readonly name: "record_relation_edges";
2077
2095
  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";
@@ -2112,6 +2130,11 @@ declare const STORE_DOORS: readonly [{
2112
2130
  readonly args: "p_organization_id uuid, p_record_id uuid, p_relations integer DEFAULT 12, p_history integer DEFAULT 15, p_siblings integer DEFAULT 8";
2113
2131
  readonly returns: "jsonb";
2114
2132
  readonly security: "definer";
2133
+ }, {
2134
+ readonly name: "record_stage_pending";
2135
+ readonly args: "p_organization_id uuid, p_record_id uuid";
2136
+ readonly returns: "jsonb";
2137
+ readonly security: "definer";
2115
2138
  }, {
2116
2139
  readonly name: "record_state_as_of";
2117
2140
  readonly args: "p_record_id uuid, p_at timestamp with time zone";
@@ -2427,6 +2450,16 @@ declare const STORE_DOORS: readonly [{
2427
2450
  readonly args: "p_sources jsonb, p_source jsonb";
2428
2451
  readonly returns: "text";
2429
2452
  readonly security: "invoker";
2453
+ }, {
2454
+ readonly name: "stage_rule_enforcement";
2455
+ readonly args: "p_organization_id uuid";
2456
+ readonly returns: "text";
2457
+ readonly security: "invoker";
2458
+ }, {
2459
+ readonly name: "stage_rule_on_fail_kinds";
2460
+ readonly args: "";
2461
+ readonly returns: "TABLE(behaviour text, note text)";
2462
+ readonly security: "invoker";
2430
2463
  }, {
2431
2464
  readonly name: "stamp_value_envelopes";
2432
2465
  readonly args: "p_data jsonb, p_actor text, p_on_behalf_of text, p_at timestamp with time zone";
@@ -2477,6 +2510,11 @@ declare const STORE_DOORS: readonly [{
2477
2510
  readonly args: "p_user_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level";
2478
2511
  readonly returns: "boolean";
2479
2512
  readonly security: "definer";
2513
+ }, {
2514
+ readonly name: "table_column_source";
2515
+ readonly args: "p_organization_id uuid, p_table_id uuid";
2516
+ readonly returns: "text";
2517
+ readonly security: "invoker";
2480
2518
  }, {
2481
2519
  readonly name: "table_contents";
2482
2520
  readonly args: "p_organization_id uuid, p_table_id uuid";
@@ -2547,6 +2585,11 @@ declare const STORE_DOORS: readonly [{
2547
2585
  readonly args: "";
2548
2586
  readonly returns: "trigger";
2549
2587
  readonly security: "definer";
2588
+ }, {
2589
+ readonly name: "undeclared_keys";
2590
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_data jsonb";
2591
+ readonly returns: "text[]";
2592
+ readonly security: "invoker";
2550
2593
  }, {
2551
2594
  readonly name: "validate_custom_fields";
2552
2595
  readonly args: "p_token text, p_organization_id uuid, p_values jsonb";
@@ -2997,6 +3040,10 @@ declare const STORE_KNOBS: readonly [{
2997
3040
  readonly key: "signup_provisioning_guard";
2998
3041
  readonly value: "false";
2999
3042
  readonly type: "boolean";
3043
+ }, {
3044
+ readonly key: "stage_rule_enforcement";
3045
+ readonly value: "\"refuse\"";
3046
+ readonly type: "enum";
3000
3047
  }, {
3001
3048
  readonly key: "system_enabled";
3002
3049
  readonly value: "false";
@@ -3031,7 +3078,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
3031
3078
  readonly raised_by: "context_resolve";
3032
3079
  }, {
3033
3080
  readonly code: "22004";
3034
- readonly raised_by: "_entity_custom_fields_guard,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,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,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,portal_declare,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_many,relation_carry,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_declare,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare";
3081
+ readonly raised_by: "_entity_custom_fields_guard,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,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,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,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_many,relation_carry,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_declare,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare";
3035
3082
  }, {
3036
3083
  readonly code: "22007";
3037
3084
  readonly raised_by: "dashboard_window_sql";
@@ -3049,7 +3096,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
3049
3096
  readonly raised_by: "_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,share_grant,sign_request_cancel,sign_request_create,work_approval_decide,work_slot_hold";
3050
3097
  }, {
3051
3098
  readonly code: "23514";
3052
- readonly raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_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,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_shape_guard,_value_envelope,_work_shape_guard,_workdoors_approval_guard,assert_entity_is_organization_scoped,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_import_rows,migrate_merge,relation_carry,relation_own,sign_request_create,sign_request_sign,table_declare,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate";
3099
+ readonly raised_by: "_checklist_instantiate,_checklist_step_guard,_claimed_column_guard,_containment_guard,_dated_values_guard,_derived_fields,_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,_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,_work_shape_guard,_workdoors_approval_guard,assert_entity_is_organization_scoped,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_import_rows,migrate_merge,relation_carry,relation_own,sign_request_create,sign_request_sign,table_declare,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate";
3053
3100
  }, {
3054
3101
  readonly code: "40001";
3055
3102
  readonly raised_by: "has_visibility_at";
@@ -3068,9 +3115,12 @@ declare const STORE_REFUSAL_CODES: readonly [{
3068
3115
  }, {
3069
3116
  readonly code: "PT409";
3070
3117
  readonly raised_by: "record_update";
3118
+ }, {
3119
+ readonly code: "PT428";
3120
+ readonly raised_by: "_record_rule_uses";
3071
3121
  }];
3072
3122
  /** `platform.entity_types` — the registered tokens a Table or relation may name. */
3073
- 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", "notification_submission", "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"];
3123
+ 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", "notification_submission", "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_action_request", "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"];
3074
3124
  type StoreRefusalCode = (typeof STORE_REFUSAL_CODES)[number]["code"];
3075
3125
  type StoreDoorName = (typeof STORE_DOORS)[number]["name"];
3076
3126
  type EntityToken = (typeof ENTITY_TOKENS)[number];
@@ -3190,6 +3240,157 @@ type Freshness = (typeof FRESHNESS)[number];
3190
3240
  declare const TABLE_DISPLAYS: readonly ["list", "grid", "board", "calendar", "timeline"];
3191
3241
  type TableDisplay = (typeof TABLE_DISPLAYS)[number];
3192
3242
 
3243
+ /**
3244
+ * What KIND of refusal it was. The mapping from SQLSTATE to code lives in
3245
+ * `/core`, and it is checked against `STORE_REFUSAL_CODES` — the list of every
3246
+ * SQLSTATE the store's own bodies raise, generated from the live catalogue. A
3247
+ * code the store can raise and this union cannot name is a hole, and the
3248
+ * real-door suite fails on it.
3249
+ */
3250
+ type RecordsErrorCode =
3251
+ /** `PT409` — somebody else's write won. The record clock moved under you. */
3252
+ "stale_write"
3253
+ /** `42501` — a door. Either the schema is revoked, or the store is switched off, or this principal may not pass. */
3254
+ | "door"
3255
+ /** `23514` — a Rule, a shape guard, or a validation the store enforces refused it. */
3256
+ | "refused_by_rule"
3257
+ /**
3258
+ * `22004` / `22023` / `22P02` — the call itself was malformed: a missing id, a
3259
+ * patch that is not an object, or a value that does not fit the type the
3260
+ * store holds for that Field. The store's own message names the value and the
3261
+ * type it could not be read as.
3262
+ */
3263
+ | "invalid_argument"
3264
+ /** `02000` — the record is not here (deleted, never existed, or another organization's). */
3265
+ | "not_found"
3266
+ /** `23503` — something it points at is not there. */
3267
+ | "missing_reference"
3268
+ /** `23505` — that thing is already here. */
3269
+ | "already_exists"
3270
+ /** `0A000` — the store does not do this yet, and says which part. */
3271
+ | "not_supported"
3272
+ /** `53400` / `22012` — the store ran out of something, or the arithmetic could not be done. */
3273
+ | "store_limit"
3274
+ /**
3275
+ * `40001` — the visibility snapshot this connection carries is older than a
3276
+ * write the reader has already observed, so the store refused to answer at
3277
+ * all rather than hand back something they just lost. Retry on a fresh
3278
+ * connection; it is the one refusal in this list that is worth repeating.
3279
+ */
3280
+ | "stale_read"
3281
+ /**
3282
+ * `57014` — the store cancelled the statement at its own timeout. Nothing was
3283
+ * refused on its merits and nothing was written; the same call can succeed on
3284
+ * a smaller page or a quieter moment. With `stale_read`, one of the only two
3285
+ * refusals in this list worth repeating.
3286
+ */
3287
+ | "timed_out"
3288
+ /**
3289
+ * THE DOOR THAT DOES NOT EXIST YET. Not an error condition in the database —
3290
+ * this package asked for a door that is not in the live catalogue, so it
3291
+ * refused to guess. `door_absent` always names the door and the lane that
3292
+ * owns it; it is never a silent no-op and never an empty list.
3293
+ */
3294
+ | "door_absent"
3295
+ /**
3296
+ * `PGRST202` / `PGRST205` — PostgREST could not find the function or the
3297
+ * schema. The database this client is pointed at is not serving the record
3298
+ * store: the schema is not exposed, or the grants are not there.
3299
+ */
3300
+ | "store_not_served"
3301
+ /**
3302
+ * `PT428` — the move was not refused and it did not happen: a stage gate whose
3303
+ * `on_fail` is `require_approval` filed a request with the people who can
3304
+ * answer it, and left the record exactly where it was. The store's own
3305
+ * sentence is the gate's own sentence, and the DETAIL carries the approval.
3306
+ *
3307
+ * It is the one code in this list that is not a failure. A screen that drew it
3308
+ * as one would tell somebody their work was rejected when it is being
3309
+ * considered; a screen that drew it as success would move the card while
3310
+ * somebody is still deciding. `custom.pipeline_move` answers an object on this
3311
+ * path rather than raising, so a caller only meets PT428 when the move went
3312
+ * through the ORDINARY write door — which is most of them.
3313
+ */
3314
+ | "needs_approval"
3315
+ /** Anything the mapper could not place. It still carries the store's own words. */
3316
+ | "internal";
3317
+ /** A refusal, in the store's own words. */
3318
+ interface RecordsError {
3319
+ code: RecordsErrorCode;
3320
+ /** THE STORE'S message, verbatim. Never paraphrased. */
3321
+ message: string;
3322
+ /** THE STORE'S hint, verbatim — this is where the remedy is written. */
3323
+ hint?: string;
3324
+ /** The SQLSTATE, so a caller can be exact when a code is not exact enough. */
3325
+ sqlstate?: string;
3326
+ /** Whatever the store put in DETAIL, parsed when it was json. */
3327
+ detail?: unknown;
3328
+ }
3329
+ type RecordsResult<T> = {
3330
+ ok: true;
3331
+ data: T;
3332
+ } | {
3333
+ ok: false;
3334
+ error: RecordsError;
3335
+ };
3336
+ /** Narrowing helper for hosts compiled without `strictNullChecks`. */
3337
+ declare function isRecordsErr<T>(result: RecordsResult<T>): result is {
3338
+ ok: false;
3339
+ error: RecordsError;
3340
+ };
3341
+ declare const ok: <T>(data: T) => RecordsResult<T>;
3342
+ declare const err: <T>(error: RecordsError) => RecordsResult<T>;
3343
+ /**
3344
+ * A `stale_write` carries everything the screen needs to show the conflict
3345
+ * rather than a toast: which version you wrote against, which one won, and the
3346
+ * value of every field you touched as it stands now. The store builds this and
3347
+ * this type is its shape — nothing is reconstructed on the client.
3348
+ */
3349
+ interface StaleWriteDetail {
3350
+ expected_version: number;
3351
+ current_version: number;
3352
+ contested_fields: Record<string, unknown>;
3353
+ }
3354
+ /** The parsed form of a `stale_write`, for `useRecordMutation`'s conflict state. */
3355
+ interface WriteConflict extends StaleWriteDetail {
3356
+ record_id: Uuid;
3357
+ /** The store's own sentence — what the screen shows. */
3358
+ message: string;
3359
+ /** The store's own remedy. */
3360
+ hint: string;
3361
+ }
3362
+ /**
3363
+ * The structural shape of a PostgREST failure as supabase-js resolves it: a
3364
+ * PLAIN OBJECT parsed from the response body, NOT an `Error`. Reading
3365
+ * `.message` off `instanceof Error` discards the real database message on every
3366
+ * genuine failure.
3367
+ */
3368
+ interface PgError {
3369
+ code?: string | null;
3370
+ message: string;
3371
+ details?: string | null;
3372
+ hint?: string | null;
3373
+ }
3374
+ /** What the validation mirror answers: the same sentence the trigger would raise. */
3375
+ interface PredictedRefusal {
3376
+ /** The field key the store would name, when it names one. */
3377
+ field_key?: string;
3378
+ /** The message the store's own body would raise, word for word. */
3379
+ message: string;
3380
+ hint?: string;
3381
+ sqlstate: string;
3382
+ /**
3383
+ * Which of the store's bodies would raise it, so a reader can go and check
3384
+ * that this mirror still tells the truth.
3385
+ */
3386
+ predicted_by: string;
3387
+ }
3388
+ /** VAL-5 / VAL-6, named so a caller can say which word was the problem. */
3389
+ interface ForbiddenEnvelopeWord {
3390
+ field_key: string;
3391
+ word: PerValueAccessWord;
3392
+ }
3393
+
3193
3394
  /** A `uuid` as the store writes it. */
3194
3395
  type Uuid = string;
3195
3396
  /** An ISO-8601 timestamp, as jsonb carries it. */
@@ -3357,6 +3558,19 @@ interface RecordRead {
3357
3558
  rule_version: number;
3358
3559
  computed_at: Timestamp;
3359
3560
  }>;
3561
+ /**
3562
+ * WHY `computed` IS EMPTY, when it is empty because nobody could read it.
3563
+ *
3564
+ * `custom.computed_provenance` is a footnote beside the record and its door is not
3565
+ * open to a person's seat (no EXECUTE for `authenticated`, measured 2026-09-21). It
3566
+ * used to fail the WHOLE read, so an organization's own owner was told "You do not
3567
+ * have access to this" about a record he could read — see `core/client.ts`. The
3568
+ * record comes back now, and this carries what the footnote's door said, so a screen
3569
+ * that draws rule provenance can say it could not read it rather than draw nothing
3570
+ * and mean two different things by it. `null` means the footnote was read fine (or
3571
+ * was never asked for).
3572
+ */
3573
+ computedUnavailable?: RecordsError | null;
3360
3574
  }
3361
3575
 
3362
3576
  /** FLD-3. A constraint attached to a Field. A Rule, never a behaviour. */
@@ -3597,4 +3811,4 @@ interface FieldPatch {
3597
3811
  depends_on?: Uuid[];
3598
3812
  }
3599
3813
 
3600
- export { PER_VALUE_ACCESS_WORDS as $, ABSENCE_REASONS as A, FRESHNESS as B, type ComputeOn as C, DELIVERIES as D, ENTITY_TOKENS as E, type FieldTypeWord as F, type FieldBehavior as G, type Freshness as H, type HiddenFieldNotice as I, type KernelTableName as J, KERNEL_TABLES as K, MERGE_FIELD_SEMANTIC_TYPES as L, MERGE_FIELD_MODIFIERS as M, type NewFieldDeclaration as N, type OnDelete as O, MERGE_FIELD_SOURCES as P, type MergeFieldModifier as Q, type RelationFlavor as R, type StorageMode as S, type TableType as T, type Uuid as U, type MergeFieldSemanticType as V, type MergeFieldSource as W, ON_DELETE as X, OVERRIDE_POLICIES as Y, type OverridePolicy as Z, PARITY_FIELD_TYPES as _, type TableDisplay as a, type ParityFieldType as a0, type ParityFieldTypeDescriptor as a1, type PerValueAccessWord as a2, type ProvenancePointer as a3, RELATION_BINDINGS as a4, RELATION_CARDINALITIES as a5, RELATION_FLAVORS as a6, RETIRED_ACTOR_WORDS as a7, RULE_NODE_KINDS as a8, RULE_USES as a9, type RelationBinding as aa, type RetiredActorWord as ab, type RuleNodeKind as ac, type RuleUse as ad, STORAGE_MODES as ae, STORE_DOORS as af, STORE_KNOBS as ag, STORE_REFUSAL_CODES as ah, type StoreDoorName as ai, type StoreRefusalCode as aj, TABLE_DISPLAYS as ak, TABLE_ORIGINS as al, TABLE_TYPES as am, type TableOrigin as an, VALUE_ALTERNATE_KEYS as ao, VALUE_ENVELOPE_KEYS as ap, type ValueAlternate as aq, type ValueAlternateKey as ar, type ValueEnvelope as as, type ValueEnvelopeKey as at, type ValueSource as au, type FieldSource as b, type FieldRule as c, type FieldSensitivity as d, type ContextPolicy as e, type RelationCardinality as f, type Timestamp as g, type RecordDocument as h, type RecordRead as i, type ReadRow as j, type Field as k, type StoredRecord as l, type FieldPatch as m, type RecordRevision as n, type ReadValue as o, type FieldProposal as p, type TableProposal as q, ACTOR_VOCABULARY as r, type AbsenceReason as s, type Actor as t, COMPUTE_ON as u, CONTEXT_POLICIES as v, type Delivery as w, type EntityToken as x, FIELD_SENSITIVITIES as y, FIELD_SOURCES as z };
3814
+ export { type MergeFieldModifier as $, ABSENCE_REASONS as A, type Delivery as B, type ComputeOn as C, DELIVERIES as D, ENTITY_TOKENS as E, type FieldTypeWord as F, type EntityToken as G, FIELD_SENSITIVITIES as H, FIELD_SOURCES as I, FRESHNESS as J, type FieldBehavior as K, type ForbiddenEnvelopeWord as L, type Freshness as M, type NewFieldDeclaration as N, type OnDelete as O, type PgError as P, type HiddenFieldNotice as Q, type RelationFlavor as R, type StorageMode as S, type TableType as T, type Uuid as U, KERNEL_TABLES as V, type WriteConflict as W, type KernelTableName as X, MERGE_FIELD_MODIFIERS as Y, MERGE_FIELD_SEMANTIC_TYPES as Z, MERGE_FIELD_SOURCES as _, type TableDisplay as a, type MergeFieldSemanticType as a0, type MergeFieldSource as a1, ON_DELETE as a2, OVERRIDE_POLICIES as a3, type OverridePolicy as a4, PARITY_FIELD_TYPES as a5, PER_VALUE_ACCESS_WORDS as a6, type ParityFieldType as a7, type ParityFieldTypeDescriptor as a8, type PerValueAccessWord as a9, type ValueEnvelope as aA, type ValueEnvelopeKey as aB, type ValueSource as aC, err as aD, isRecordsErr as aE, ok as aF, type ProvenancePointer as aa, RELATION_BINDINGS as ab, RELATION_CARDINALITIES as ac, RELATION_FLAVORS as ad, RETIRED_ACTOR_WORDS as ae, RULE_NODE_KINDS as af, RULE_USES as ag, type RecordsErrorCode as ah, type RelationBinding as ai, type RetiredActorWord as aj, type RuleNodeKind as ak, type RuleUse as al, STORAGE_MODES as am, STORE_DOORS as an, STORE_KNOBS as ao, STORE_REFUSAL_CODES as ap, type StoreDoorName as aq, type StoreRefusalCode as ar, TABLE_DISPLAYS as as, TABLE_ORIGINS as at, TABLE_TYPES as au, type TableOrigin as av, VALUE_ALTERNATE_KEYS as aw, VALUE_ENVELOPE_KEYS as ax, type ValueAlternate as ay, type ValueAlternateKey as az, type FieldSource as b, type FieldRule as c, type FieldSensitivity as d, type ContextPolicy as e, type RelationCardinality as f, type Timestamp as g, type RecordDocument as h, type RecordsResult as i, type RecordRead as j, type ReadRow as k, type Field as l, type StoredRecord as m, type FieldPatch as n, type RecordRevision as o, type ReadValue as p, type FieldProposal as q, type TableProposal as r, type RecordsError as s, type StaleWriteDetail as t, type PredictedRefusal as u, ACTOR_VOCABULARY as v, type AbsenceReason as w, type Actor as x, COMPUTE_ON as y, CONTEXT_POLICIES as z };
package/dist/index.cjs CHANGED
@@ -46,6 +46,8 @@ __export(src_exports, {
46
46
  RETIRED_ACTOR_WORDS: () => RETIRED_ACTOR_WORDS,
47
47
  RULE_NODE_KINDS: () => RULE_NODE_KINDS,
48
48
  RULE_USES: () => RULE_USES,
49
+ STAGE_RULE_ENFORCEMENT: () => STAGE_RULE_ENFORCEMENT,
50
+ STAGE_RULE_ON_FAIL: () => STAGE_RULE_ON_FAIL,
49
51
  STORAGE_MODES: () => STORAGE_MODES,
50
52
  STORE_DOORS: () => STORE_DOORS,
51
53
  STORE_KNOBS: () => STORE_KNOBS,
@@ -211,6 +213,8 @@ function looksLikeAnId(value) {
211
213
 
212
214
  // src/pipeline.ts
213
215
  var PIPELINE_RULE_KINDS = ["moves", "requires", "who", "limit", "entry"];
216
+ var STAGE_RULE_ON_FAIL = ["refuse", "require_approval"];
217
+ var STAGE_RULE_ENFORCEMENT = ["refuse", "warn"];
214
218
  function mayDrag(level) {
215
219
  return level === "editor" || level === "admin" || level === "owner";
216
220
  }
@@ -567,6 +571,7 @@ var RULE_NODE_KINDS = [
567
571
  { node: "parent_field", evaluated_by: "W1-RULE-APPLY" },
568
572
  { node: "present", evaluated_by: "W1-RULE" },
569
573
  { node: "previous", evaluated_by: "PIPELINES" },
574
+ { node: "sibling_count", evaluated_by: "STAGE-RULES" },
570
575
  { node: "stage_count", evaluated_by: "PIPELINES" },
571
576
  { node: "sub", evaluated_by: "W1-RULE" }
572
577
  ];
@@ -894,7 +899,9 @@ var STORE_DOORS = [
894
899
  { name: "pin_agent_cells", args: "p_new jsonb, p_old jsonb, p_agent_keys text[]", returns: "jsonb", security: "invoker" },
895
900
  { name: "pipeline_board", args: "p_organization_id uuid, p_table_id uuid, p_measure text DEFAULT NULL::text", returns: "TABLE(stage_key text, stage_label text, stage_position integer, cards bigint, total numeric, wip_limit integer, over_limit boolean)", security: "definer" },
896
901
  { name: "pipeline_declare", args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb", returns: "jsonb", security: "definer" },
902
+ { name: "pipeline_gate_preview", args: "p_organization_id uuid, p_table_id uuid, p_stage text, p_gate jsonb", returns: "jsonb", security: "definer" },
897
903
  { name: "pipeline_move", args: "p_organization_id uuid, p_record_id uuid, p_to text, p_also jsonb DEFAULT '{}'::jsonb, p_expected_version integer DEFAULT NULL::integer", returns: "jsonb", security: "definer" },
904
+ { name: "pipeline_pending", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
898
905
  { name: "pipeline_read", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
899
906
  { name: "pipeline_transition_refusal", args: "p_organization_id uuid, p_record_id uuid, p_to text", returns: "jsonb", security: "definer" },
900
907
  { name: "portal_admits", args: "p_organization_id uuid, p_user_id uuid DEFAULT NULL::uuid", returns: "boolean", security: "definer" },
@@ -961,6 +968,7 @@ var STORE_DOORS = [
961
968
  { 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" },
962
969
  { name: "record_delete", args: "p_organization_id uuid, p_record_id uuid", returns: "timestamp with time zone", security: "definer" },
963
970
  { name: "record_history", args: "p_organization_id uuid, p_record_id uuid, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0", returns: "TABLE(version integer, occurred_at timestamp with time zone, operation text, operation_label text, actor jsonb, changes jsonb, migration_id uuid, undoable boolean)", security: "definer" },
971
+ { name: "record_platform_keys", args: "", returns: "text[]", security: "invoker" },
964
972
  { name: "record_relation_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_id uuid, edge_role text, field_id uuid, ord integer)", security: "invoker" },
965
973
  { name: "record_reparent", args: "p_organization_id uuid, p_record_id uuid, p_parent_id uuid", returns: "void", security: "definer" },
966
974
  { name: "record_resolve", args: "p_organization_id uuid, p_id uuid", returns: "jsonb", security: "definer" },
@@ -969,6 +977,7 @@ var STORE_DOORS = [
969
977
  { name: "record_restore_version", args: "p_organization_id uuid, p_record_id uuid, p_version integer", returns: "jsonb", security: "definer" },
970
978
  { name: "record_restore_version", args: "p_organization_id uuid, p_record_id uuid, p_version integer, p_author jsonb", returns: "jsonb", security: "definer" },
971
979
  { name: "record_scope_context", args: "p_organization_id uuid, p_record_id uuid, p_relations integer DEFAULT 12, p_history integer DEFAULT 15, p_siblings integer DEFAULT 8", returns: "jsonb", security: "definer" },
980
+ { name: "record_stage_pending", args: "p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "definer" },
972
981
  { name: "record_state_as_of", args: "p_record_id uuid, p_at timestamp with time zone", returns: "TABLE(state jsonb, replayed boolean)", security: "definer" },
973
982
  { name: "record_table", args: "p_organization_id uuid, p_record_id uuid", returns: "uuid", security: "definer" },
974
983
  { name: "record_update", args: "p_organization_id uuid, p_record_id uuid, p_patch jsonb, p_expected_version integer DEFAULT NULL::integer", returns: "integer", security: "definer" },
@@ -1032,6 +1041,8 @@ var STORE_DOORS = [
1032
1041
  { name: "size_refusal", args: "p_organization_id uuid, p_data jsonb", returns: "text", security: "invoker" },
1033
1042
  { name: "source_next_pointer", args: "p_sources jsonb", returns: "text", security: "invoker" },
1034
1043
  { name: "source_pointer", args: "p_sources jsonb, p_source jsonb", returns: "text", security: "invoker" },
1044
+ { name: "stage_rule_enforcement", args: "p_organization_id uuid", returns: "text", security: "invoker" },
1045
+ { name: "stage_rule_on_fail_kinds", args: "", returns: "TABLE(behaviour text, note text)", security: "invoker" },
1035
1046
  { name: "stamp_value_envelopes", args: "p_data jsonb, p_actor text, p_on_behalf_of text, p_at timestamp with time zone", returns: "jsonb", security: "invoker" },
1036
1047
  { name: "storage_modes", args: "", returns: "text[]", security: "invoker" },
1037
1048
  { name: "store_is_open", args: "p_organization_id uuid DEFAULT NULL::uuid", returns: "boolean", security: "invoker" },
@@ -1042,6 +1053,7 @@ var STORE_DOORS = [
1042
1053
  { name: "subscriptions", args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid", returns: "TABLE(rule_id uuid, name text, table_id uuid, saved_view_id uuid, cadence text, schedule text, quiet_hours jsonb, channel text, recipient_user_id uuid, event_key text, muted boolean, mine boolean, i_may_mute boolean, last_sent_at timestamp with time zone, next_digest_at timestamp with time zone)", security: "definer" },
1043
1054
  { name: "table_capacity", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
1044
1055
  { 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" },
1056
+ { name: "table_column_source", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "invoker" },
1045
1057
  { name: "table_contents", args: "p_organization_id uuid, p_table_id uuid", returns: "TABLE(record_id uuid, kind text, goes_at integer)", security: "invoker" },
1046
1058
  { name: "table_declare", args: "p_organization_id uuid, p_spec jsonb", returns: "uuid", security: "definer" },
1047
1059
  { name: "table_has_a_visible_record", args: "p_user uuid, p_organization_id uuid, p_table_id uuid", returns: "boolean", security: "definer" },
@@ -1056,6 +1068,7 @@ var STORE_DOORS = [
1056
1068
  { name: "tables_at_home", args: "p_organization_id uuid, p_home_ids uuid[]", returns: "TABLE(table_id uuid, home_record_id uuid, kind text)", security: "definer" },
1057
1069
  { name: "tables_described_without_asking", args: "", returns: "TABLE(function_name text, identity_args text, why text)", security: "invoker" },
1058
1070
  { name: "trg_associations_bump_visibility", args: "", returns: "trigger", security: "definer" },
1071
+ { name: "undeclared_keys", args: "p_organization_id uuid, p_table_id uuid, p_data jsonb", returns: "text[]", security: "invoker" },
1059
1072
  { name: "validate_custom_fields", args: "p_token text, p_organization_id uuid, p_values jsonb", returns: "void", security: "invoker" },
1060
1073
  { name: "validate_value_envelope", args: "p_organization_id uuid, p_fields custom.record[], p_data jsonb", returns: "void", security: "invoker" },
1061
1074
  { name: "validate_values", args: "p_organization_id uuid, p_fields custom.record[], p_values jsonb, p_record_type text DEFAULT NULL::text", returns: "void", security: "invoker" },
@@ -1156,6 +1169,7 @@ var STORE_KNOBS = [
1156
1169
  { key: "sandbox_message_bytes", value: "65536", type: "integer" },
1157
1170
  { key: "sandbox_org_components", value: "true", type: "boolean" },
1158
1171
  { key: "signup_provisioning_guard", value: "false", type: "boolean" },
1172
+ { key: "stage_rule_enforcement", value: '"refuse"', type: "enum" },
1159
1173
  { key: "system_enabled", value: "false", type: "boolean" },
1160
1174
  { key: "table_record_ceiling", value: "150000", type: "integer" },
1161
1175
  { key: "value_max_bytes", value: "100000", type: "integer" },
@@ -1165,19 +1179,20 @@ var STORE_REFUSAL_CODES = [
1165
1179
  { code: "02000", raised_by: "_checklist_instantiate,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_card,portal_declare,portal_invite,portal_preview,portal_principal_bind,portal_revoke,read_record,record_delete,record_restore,record_restore_preview,record_table,record_update,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,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state" },
1166
1180
  { 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,work_assign" },
1167
1181
  { code: "22003", raised_by: "context_resolve" },
1168
- { code: "22004", raised_by: "_entity_custom_fields_guard,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,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,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,portal_declare,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_many,relation_carry,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_declare,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare" },
1182
+ { code: "22004", raised_by: "_entity_custom_fields_guard,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,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,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,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_many,relation_carry,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_declare,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare" },
1169
1183
  { code: "22007", raised_by: "dashboard_window_sql" },
1170
1184
  { code: "22012", raised_by: "rule_eval" },
1171
1185
  { code: "22023", raised_by: "_booking_availability,_entity_custom_fields_guard,_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,portal_declare,provenance_write,query_by_coordinates,query_rollup,record_update,record_write_many,relation_carry,rule_eval,rule_members,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_rules,visibility_as_of,work_approval_request,work_list,work_slot_hold" },
1172
1186
  { code: "23503", raised_by: "_booking_availability,_checklist_instantiate,_containment_guard,_field_document_for,_pipeline_stage_key,_record_rule_uses,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,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_submit,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,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_members,rule_run,sign_request_create,subscription_mute,subscription_preview,view_declare,work_set_state,work_take_assignment,work_template_instantiate" },
1173
1187
  { code: "23505", raised_by: "_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,share_grant,sign_request_cancel,sign_request_create,work_approval_decide,work_slot_hold" },
1174
- { code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_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,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_shape_guard,_value_envelope,_work_shape_guard,_workdoors_approval_guard,assert_entity_is_organization_scoped,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_import_rows,migrate_merge,relation_carry,relation_own,sign_request_create,sign_request_sign,table_declare,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate" },
1188
+ { code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_claimed_column_guard,_containment_guard,_dated_values_guard,_derived_fields,_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,_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,_work_shape_guard,_workdoors_approval_guard,assert_entity_is_organization_scoped,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_import_rows,migrate_merge,relation_carry,relation_own,sign_request_create,sign_request_sign,table_declare,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate" },
1175
1189
  { code: "40001", raised_by: "has_visibility_at" },
1176
1190
  { code: "42501", 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_may_know_table,assert_organization_admin,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,conversation_scope_bind,conversation_scope_unbind,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_submit,inbound_mail_land,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_reclass,my_levels,organization_clear,portal_declare,portal_invitation,portal_invite,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,record_table,share_grant,subscription_mute,subscription_preview,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person" },
1177
1191
  { code: "42703", raised_by: "entity_table,portal_declare" },
1178
1192
  { code: "53400", raised_by: "anon_rate_take,delete_cascade_closure,enrich_due,enrich_land,promote_field" },
1179
1193
  { code: "54001", raised_by: "record_delete" },
1180
- { code: "PT409", raised_by: "record_update" }
1194
+ { code: "PT409", raised_by: "record_update" },
1195
+ { code: "PT428", raised_by: "_record_rule_uses" }
1181
1196
  ];
1182
1197
  var ENTITY_TOKENS = [
1183
1198
  "access_delta_probe",
@@ -1841,6 +1856,7 @@ var ENTITY_TOKENS = [
1841
1856
  "plan_node_artifact",
1842
1857
  "plan_node_step",
1843
1858
  "plan_profile",
1859
+ "platform_action_request",
1844
1860
  "platform_actor_session",
1845
1861
  "platform_actor_token",
1846
1862
  "platform_actor_token_event",