@ai-matrx/associations 0.3.0 → 0.5.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.
@@ -276,6 +276,49 @@ interface DemandedRpcSignatures {
276
276
  title: string;
277
277
  }[];
278
278
  };
279
+ cmt_list: {
280
+ Args: {
281
+ p_entity_id: string;
282
+ p_entity_type: string;
283
+ };
284
+ Returns: {
285
+ author_avatar_url: string;
286
+ author_display_name: string;
287
+ author_email: string;
288
+ body: string;
289
+ created_at: string;
290
+ created_by: string;
291
+ entity_id: string;
292
+ entity_type: string;
293
+ id: string;
294
+ organization_id: string;
295
+ parent_id: string;
296
+ updated_at: string;
297
+ }[];
298
+ };
299
+ cmt_add: {
300
+ Args: {
301
+ p_body: string;
302
+ p_entity_id: string;
303
+ p_entity_type: string;
304
+ p_org_id?: string;
305
+ p_parent_id?: string;
306
+ };
307
+ Returns: string;
308
+ };
309
+ cmt_edit: {
310
+ Args: {
311
+ p_body: string;
312
+ p_id: string;
313
+ };
314
+ Returns: undefined;
315
+ };
316
+ cmt_delete: {
317
+ Args: {
318
+ p_id: string;
319
+ };
320
+ Returns: undefined;
321
+ };
279
322
  }
280
323
  /** The name of any demanded RPC — the only strings the dataSource port accepts. */
281
324
  type DemandedRpcName = keyof DemandedRpcSignatures;
@@ -284,7 +327,7 @@ type DemandedRpcName = keyof DemandedRpcSignatures;
284
327
  * EVERY registered entity token (the FK-valid set). Use this for any
285
328
  * `source_type` / `target_type` argument so an invalid token is a COMPILE error.
286
329
  */
287
- type EntityTypeToken = "access_request" | "activity" | "agent" | "agent_card" | "agent_definition_version" | "agent_drift_alert" | "agent_exemplar" | "agent_mandate_note" | "agent_prompt_remediation" | "agent_run" | "agent_run_stage" | "agent_shortcut" | "agent_surface_binding" | "agent_template" | "agent_usage" | "ai_api" | "ai_endpoint" | "ai_model" | "ai_model_alias" | "ai_offering" | "ai_provider" | "ai_setting" | "app" | "app_definition_version" | "app_error" | "app_execution" | "app_instance" | "app_log" | "app_rate_limit" | "app_setting" | "app_sync_status" | "approach" | "artifact" | "assessment" | "assessment_item" | "assessment_result" | "assist" | "batch_cost_event" | "batch_provider_batch" | "batch_work_item" | "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" | "canvas_comment" | "canvas_comment_like" | "canvas_item" | "canvas_item_state" | "canvas_like" | "canvas_score" | "canvas_view" | "category" | "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_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_product" | "commerce_product_channel_ref" | "commerce_product_media" | "commerce_product_variant" | "commerce_recall_audit" | "comparison_set" | "contact_medium" | "contact_submission" | "content_ir_kind" | "content_ir_kind_component" | "content_ir_kind_component_incident" | "content_ir_kind_conformance" | "content_ir_kind_edge" | "content_ir_kind_example" | "content_ir_kind_instance" | "content_ir_kind_surface" | "context_item" | "context_item_suggestion" | "conversation" | "conversation_value" | "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_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" | "data_store" | "dataset" | "derive_run" | "dict_setting" | "dm_conversation" | "dm_message" | "dm_participant" | "domain_classification" | "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" | "fc_card" | "fc_detail" | "fc_set" | "feature_doc" | "file" | "file_analysis" | "file_entities" | "file_overrides" | "file_page_annotations" | "file_pages" | "file_version" | "flexible_data" | "folder" | "game_badge" | "game_result" | "game_room" | "global_execution" | "global_execution_checkpoint" | "global_execution_event" | "global_meter_entry" | "global_origin" | "global_request" | "growth_loop_event" | "growth_loop_run" | "growth_loop_stage_run" | "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" | "iam_api_key" | "industry_curator" | "interview_document_revision" | "interview_hole" | "interview_question" | "interview_session" | "interview_turn" | "invitation" | "invitation_code" | "invitation_request" | "item_mastery" | "judge_verdict" | "kg_alert" | "kg_suggestion_ack" | "kg_sweep_queue" | "kg_sweep_run" | "kg_sweep_state" | "kg_value_match" | "league_membership" | "learn_doc" | "library_doc" | "mandate" | "mandate_binding" | "mandate_treatment" | "marketing_initiative" | "masterwork_corpus_item" | "masterwork_run" | "membership" | "message" | "message_template" | "ner_shadow" | "note" | "note_folder" | "notification" | "notification_channel_preference" | "notification_event_override" | "notification_event_type" | "notification_preference" | "ops_issue_event" | "ops_proof_check" | "ops_proof_run" | "ops_proof_scenario" | "organization" | "output_feedback" | "page_extraction_job" | "page_extraction_page_run" | "party" | "party_contact_point" | "pc_article" | "pc_episode" | "pc_show" | "pc_studio_run" | "pc_studio_run_asset" | "pdf_redaction_audit" | "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_outcome_event" | "platform_outsider_consumer" | "platform_saved_view" | "podcast_race" | "processed_document" | "processed_document_page" | "product_capture_file" | "product_capture_item" | "product_capture_payload" | "product_capture_product" | "product_capture_question" | "project" | "provision" | "purpose" | "quiz_session" | "rag_ingest_run" | "redaction_mapping" | "research_analysis" | "research_content" | "research_context_bundle" | "research_document" | "research_keyword" | "research_media" | "research_source" | "research_synthesis" | "research_tag" | "research_template" | "research_topic" | "rulebook" | "sandbox_instance" | "sch_agent_task" | "sch_run" | "sch_task" | "sch_trigger" | "scope" | "scope_association_suggestion" | "scope_item_value_suggestion" | "scope_suggestion" | "scope_type" | "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_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_web_analytics_daily" | "shared_canvas_item" | "skill" | "skill_render_definition" | "sms_consent" | "sms_conversation" | "sms_message" | "sms_message_media" | "sms_notification" | "sms_notification_preference" | "sms_phone_number" | "structured_list" | "studio_documents" | "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" | "surface" | "system_context_item" | "system_error" | "system_personal_org_failure" | "system_write_failure" | "task" | "thread" | "tool" | "tool_bundle" | "tool_call" | "tool_definition_version" | "tool_test_sample" | "tool_ui" | "tool_ui_incident" | "tool_ui_version" | "transcript" | "udt_dataset_fields" | "udt_dataset_rows" | "udt_document" | "udt_structured_list_items" | "ui_surface_agent_pref" | "ui_surface_config" | "user_achievement" | "user_analysis_preference" | "user_bookmark" | "user_email_preference" | "user_feedback" | "user_form_profile" | "user_markdown_sample" | "user_memory" | "user_preference" | "user_profile" | "user_stat" | "user_surface_state" | "voice" | "war_room" | "wbx_capture" | "wbx_guidance" | "wbx_highlight" | "wbx_pattern" | "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_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" | "wf_node_data_slot" | "work_item" | "workbook" | "workflow" | "workflow_card" | "workflow_checkpoint" | "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" | "working_document" | "youtube_search" | "youtube_video";
330
+ type EntityTypeToken = "access_request" | "activity" | "agent" | "agent_card" | "agent_definition_version" | "agent_drift_alert" | "agent_exemplar" | "agent_mandate_note" | "agent_prompt_remediation" | "agent_run" | "agent_run_stage" | "agent_shortcut" | "agent_surface_binding" | "agent_template" | "agent_usage" | "ai_api" | "ai_endpoint" | "ai_model" | "ai_model_alias" | "ai_offering" | "ai_provider" | "ai_setting" | "app" | "app_definition_version" | "app_error" | "app_execution" | "app_instance" | "app_log" | "app_rate_limit" | "app_setting" | "app_sync_status" | "approach" | "artifact" | "assessment" | "assessment_item" | "assessment_result" | "assist" | "batch_cost_event" | "batch_provider_batch" | "batch_work_item" | "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" | "canvas_comment" | "canvas_comment_like" | "canvas_item" | "canvas_item_state" | "canvas_like" | "canvas_score" | "canvas_view" | "category" | "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_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_product" | "commerce_product_channel_ref" | "commerce_product_media" | "commerce_product_variant" | "commerce_recall_audit" | "comparison_set" | "contact_medium" | "contact_submission" | "content_ir_kind" | "content_ir_kind_component" | "content_ir_kind_component_incident" | "content_ir_kind_conformance" | "content_ir_kind_edge" | "content_ir_kind_example" | "content_ir_kind_instance" | "content_ir_kind_surface" | "context_item" | "context_item_suggestion" | "conversation" | "conversation_value" | "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_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" | "data_store" | "dataset" | "derive_run" | "dict_setting" | "dm_conversation" | "dm_message" | "dm_participant" | "domain_classification" | "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" | "fc_card" | "fc_detail" | "fc_set" | "feature_doc" | "file" | "file_analysis" | "file_entities" | "file_overrides" | "file_page_annotations" | "file_pages" | "file_version" | "flexible_data" | "folder" | "game_badge" | "game_result" | "game_room" | "global_execution" | "global_execution_checkpoint" | "global_execution_event" | "global_meter_entry" | "global_origin" | "global_request" | "growth_loop_event" | "growth_loop_run" | "growth_loop_stage_run" | "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" | "iam_api_key" | "industry_curator" | "interview_document_revision" | "interview_hole" | "interview_question" | "interview_session" | "interview_turn" | "invitation" | "invitation_code" | "invitation_request" | "item_mastery" | "judge_verdict" | "kg_alert" | "kg_suggestion_ack" | "kg_sweep_queue" | "kg_sweep_run" | "kg_sweep_state" | "kg_value_match" | "league_membership" | "learn_doc" | "library_doc" | "mandate" | "mandate_binding" | "mandate_treatment" | "marketing_initiative" | "masterwork_corpus_item" | "masterwork_run" | "membership" | "message" | "message_template" | "ner_shadow" | "note" | "note_folder" | "notification" | "notification_channel_preference" | "notification_event_override" | "notification_event_type" | "notification_preference" | "ops_issue_event" | "ops_proof_check" | "ops_proof_run" | "ops_proof_scenario" | "organization" | "output_feedback" | "page_extraction_job" | "page_extraction_page_run" | "party" | "party_contact_point" | "pc_article" | "pc_episode" | "pc_show" | "pc_studio_run" | "pc_studio_run_asset" | "pdf_redaction_audit" | "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_outcome_event" | "platform_outsider_consumer" | "platform_saved_view" | "podcast_race" | "processed_document" | "processed_document_page" | "product_capture_file" | "product_capture_item" | "product_capture_payload" | "product_capture_product" | "product_capture_question" | "project" | "provision" | "purpose" | "quiz_session" | "rag_ingest_run" | "redaction_mapping" | "research_analysis" | "research_content" | "research_context_bundle" | "research_document" | "research_keyword" | "research_media" | "research_source" | "research_synthesis" | "research_tag" | "research_template" | "research_topic" | "route_manifest_entry" | "rulebook" | "sandbox_instance" | "sch_agent_task" | "sch_run" | "sch_task" | "sch_trigger" | "scope" | "scope_association_suggestion" | "scope_item_value_suggestion" | "scope_suggestion" | "scope_type" | "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_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_web_analytics_daily" | "shared_canvas_item" | "short_link" | "skill" | "skill_render_definition" | "sms_consent" | "sms_conversation" | "sms_message" | "sms_message_media" | "sms_notification" | "sms_notification_preference" | "sms_phone_number" | "structured_list" | "studio_documents" | "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" | "surface" | "system_context_item" | "system_error" | "system_personal_org_failure" | "system_write_failure" | "task" | "thread" | "tool" | "tool_bundle" | "tool_call" | "tool_definition_version" | "tool_test_sample" | "tool_ui" | "tool_ui_incident" | "tool_ui_version" | "transcript" | "udt_dataset_fields" | "udt_dataset_rows" | "udt_document" | "udt_structured_list_items" | "ui_surface_agent_pref" | "ui_surface_config" | "user_achievement" | "user_analysis_preference" | "user_bookmark" | "user_email_preference" | "user_feedback" | "user_form_profile" | "user_markdown_sample" | "user_memory" | "user_preference" | "user_profile" | "user_stat" | "user_surface_state" | "voice" | "war_room" | "wbx_capture" | "wbx_guidance" | "wbx_highlight" | "wbx_pattern" | "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_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" | "wf_node_data_slot" | "work_item" | "workbook" | "workflow" | "workflow_card" | "workflow_checkpoint" | "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" | "working_document" | "youtube_search" | "youtube_video";
288
331
 
289
332
  type AssociationsRpcErrorCode = "unauthorized" | "forbidden_org" | "forbidden_role" | "not_found" | "conflict_in_use" | "invalid_argument" | "version_conflict" | "quota_exceeded"
290
333
  /**
@@ -548,6 +591,30 @@ interface EntityDoorProps {
548
591
  name?: string | null;
549
592
  className?: string;
550
593
  }
594
+ /** What the authorDisplay port receives — one comment's denormalized author. */
595
+ interface AuthorDisplayInput {
596
+ /** The auth user id (`created_by`), or null on an authorless legacy row. */
597
+ userId: string | null;
598
+ email: string | null;
599
+ displayName: string | null;
600
+ avatarUrl: string | null;
601
+ }
602
+ /**
603
+ * The author-display seam (W6 comments UI). The package cannot resolve user
604
+ * profiles itself — `cmt_list` denormalizes email/displayName/avatarUrl per
605
+ * row, and a host with a richer profile store (presence, current names,
606
+ * signed avatar URLs) overrides them here. Return `null` (or omit a field)
607
+ * to keep the denormalized value.
608
+ *
609
+ * DEGRADATION (absent port): the RPC's denormalized fields render as-is;
610
+ * a row with neither displayName nor email shows the package's
611
+ * "Unknown user" label with the default initial avatar. Never blank, never
612
+ * a crash.
613
+ */
614
+ type AuthorDisplayPort = (author: AuthorDisplayInput) => {
615
+ displayName?: string | null;
616
+ avatarUrl?: string | null;
617
+ } | null;
551
618
  /**
552
619
  * The entity-doors seam (today: `EntityRef` / `EntityDoorControls` /
553
620
  * access-gate `UnresolvedEntityRef`). Absent → title text plus the overlay's
@@ -577,6 +644,7 @@ interface AssociationsConfig {
577
644
  capture?: CapturePort;
578
645
  pickerOverrides?: PickerOverrideMap;
579
646
  entityDoors?: EntityDoorsPort;
647
+ authorDisplay?: AuthorDisplayPort;
580
648
  }
581
649
 
582
650
  declare const ASSOCIATION_TARGET_TYPES: readonly ["organization", "scope", "scope_type", "project", "task", "context_item", "thread", "war_room", "category", "conversation", "fc_set", "fc_card", "study_media", "assessment", "note", "file", "quiz_session", "agent", "research_tag", "skill", "surface", "plan_entity", "plan_node", "web_site", "seo_topic", "seo_keyword", "web_page", "web_screenshot", "party", "crm_outreach_list", "crm_deal", "rulebook"];
@@ -667,6 +735,43 @@ interface CategoriesEntry {
667
735
  error: string | null;
668
736
  }
669
737
 
738
+ /** The author of a comment, denormalized by `cmt_list` from the auth user. */
739
+ interface CommentAuthor {
740
+ email: string | null;
741
+ displayName: string | null;
742
+ avatarUrl: string | null;
743
+ }
744
+ /**
745
+ * One `platform.comments` row, camelCased (mirrors `cmt_list`'s return).
746
+ * Threading is by `parentId`: a top-level comment has `parentId === null`;
747
+ * a reply points at its parent. `cmt_list` returns rows oldest→newest so
748
+ * callers can build the thread in one pass.
749
+ */
750
+ interface PlatformComment {
751
+ id: string;
752
+ orgId: string | null;
753
+ entityType: string;
754
+ entityId: string;
755
+ parentId: string | null;
756
+ body: string;
757
+ createdAt: string;
758
+ updatedAt: string;
759
+ createdBy: string | null;
760
+ author: CommentAuthor;
761
+ }
762
+ /**
763
+ * One cached comment thread (per `${entityType}:${entityId}` endpoint) — the
764
+ * same lifecycle shape as `AssociationsEntry`/`CategoriesEntry`: pending
765
+ * keeps previous comments AND the visible error; `fetchedAt` is the last
766
+ * successful load.
767
+ */
768
+ interface CommentsEntry {
769
+ status: "idle" | "loading" | "ready" | "error";
770
+ comments: readonly PlatformComment[];
771
+ fetchedAt: number | null;
772
+ error: string | null;
773
+ }
774
+
670
775
  type ContentRole = "utility" | "source" | "destination" | "hybrid" | "container";
671
776
  /**
672
777
  * Fully-resolved entity descriptor — generated metadata + host overlay, with
@@ -1058,6 +1163,27 @@ interface AssociationHelpersApi {
1058
1163
  }[]): Promise<AssociationsRpcResult<null>>;
1059
1164
  }
1060
1165
 
1166
+ interface AddCommentArgs {
1167
+ /** Registered entity-type token the comment hangs on (writes-strict, C18). */
1168
+ entityType: string;
1169
+ entityId: string;
1170
+ body: string;
1171
+ /** Reply target — an existing comment's id. Top-level when omitted. */
1172
+ parentId?: string | null;
1173
+ /** Org override; the RPC resolves task-org/personal-org when omitted. */
1174
+ orgId?: string | null;
1175
+ }
1176
+ interface CommentsServiceApi {
1177
+ listForEntity(entityType: string, entityId: string): Promise<AssociationsRpcResult<{
1178
+ comments: PlatformComment[];
1179
+ }>>;
1180
+ add(args: AddCommentArgs): Promise<AssociationsRpcResult<{
1181
+ id: string;
1182
+ }>>;
1183
+ edit(id: string, body: string): Promise<AssociationsRpcResult<null>>;
1184
+ remove(id: string): Promise<AssociationsRpcResult<null>>;
1185
+ }
1186
+
1061
1187
  interface AssociationWriteResult {
1062
1188
  ok: boolean;
1063
1189
  /** Set on a successful single-edge `add`. */
@@ -1070,6 +1196,12 @@ interface CategoryMutationResult {
1070
1196
  id?: string;
1071
1197
  error?: string;
1072
1198
  }
1199
+ interface CommentMutationResult {
1200
+ ok: boolean;
1201
+ /** Set on a successful `addComment`. */
1202
+ id?: string;
1203
+ error?: string;
1204
+ }
1073
1205
  interface AssociationsStore {
1074
1206
  /** Stable, sync read of one endpoint's entry (idle default when uncached). */
1075
1207
  getEdges(type: string, id: string): AssociationsEntry;
@@ -1113,7 +1245,7 @@ interface AssociationsStore {
1113
1245
  }): Promise<AssociationWriteResult>;
1114
1246
  /** Reset one endpoint to idle and notify its subscribers. */
1115
1247
  invalidate(type: string, id: string): void;
1116
- /** Reset every association endpoint AND every category facet. */
1248
+ /** Reset every association endpoint, category facet, and comment thread. */
1117
1249
  invalidateAll(): void;
1118
1250
  getCategories(dimension: CategoryDimension): CategoriesEntry;
1119
1251
  loadCategories(dimension: CategoryDimension, opts?: {
@@ -1148,6 +1280,41 @@ interface AssociationsStore {
1148
1280
  dimension: CategoryDimension;
1149
1281
  id: string;
1150
1282
  }): Promise<CategoryMutationResult>;
1283
+ /** Stable, sync read of one entity's comment thread (idle when uncached). */
1284
+ getComments(type: string, id: string): CommentsEntry;
1285
+ /**
1286
+ * Lazy load of every comment on `${type}:${id}` (oldest→newest; thread by
1287
+ * `parentId`). Deduped per key; `status === "ready"` short-circuits unless
1288
+ * `force`.
1289
+ */
1290
+ loadComments(type: string, id: string, opts?: {
1291
+ force?: boolean;
1292
+ }): Promise<void>;
1293
+ /** External-store contract for one entity's comment thread. */
1294
+ subscribeComments(key: string, cb: () => void): () => void;
1295
+ /** Post a comment (or a reply); on success force-reloads the thread. */
1296
+ addComment(args: {
1297
+ entityType: string;
1298
+ entityId: string;
1299
+ body: string;
1300
+ parentId?: string | null;
1301
+ orgId?: string | null;
1302
+ }): Promise<CommentMutationResult>;
1303
+ /** Edit a comment body (author-only in the RPC); reloads the thread. */
1304
+ editComment(args: {
1305
+ entityType: string;
1306
+ entityId: string;
1307
+ id: string;
1308
+ body: string;
1309
+ }): Promise<CommentMutationResult>;
1310
+ /** Soft-delete a comment (author/org member in the RPC); reloads the thread. */
1311
+ deleteComment(args: {
1312
+ entityType: string;
1313
+ entityId: string;
1314
+ id: string;
1315
+ }): Promise<CommentMutationResult>;
1316
+ /** Reset one entity's comment thread to idle and notify its subscribers. */
1317
+ invalidateComments(type: string, id: string): void;
1151
1318
  /** Batched title resolution + the session cache + prime. */
1152
1319
  titles: TitlesServiceApi;
1153
1320
  /** Per-user favorite/pinned/hidden state (`ues_*`). */
@@ -1168,6 +1335,7 @@ interface AssociationsStore {
1168
1335
  services: {
1169
1336
  associations: AssociationsServiceApi;
1170
1337
  categories: CategoriesServiceApi;
1338
+ comments: CommentsServiceApi;
1171
1339
  };
1172
1340
  /** Merge more host overlay entries in (icons/routes/candidate loaders). */
1173
1341
  registerEntityOverlay: EntityRegistry["registerEntityOverlay"];
@@ -1192,16 +1360,17 @@ interface AssociationsUiPorts {
1192
1360
  capture?: CapturePort;
1193
1361
  pickerOverrides?: PickerOverrideMap;
1194
1362
  entityDoors?: EntityDoorsPort;
1363
+ authorDisplay?: AuthorDisplayPort;
1195
1364
  }
1196
1365
  interface AssociationsProviderProps extends AssociationsUiPorts {
1197
1366
  /** The /core store the host constructed with `createAssociationsStore`. */
1198
1367
  store: AssociationsStore;
1199
1368
  children: ReactNode;
1200
1369
  }
1201
- declare function AssociationsProvider({ store, notifier, windowShell, capture, pickerOverrides, entityDoors, children, }: AssociationsProviderProps): react.JSX.Element;
1370
+ declare function AssociationsProvider({ store, notifier, windowShell, capture, pickerOverrides, entityDoors, authorDisplay, children, }: AssociationsProviderProps): react.JSX.Element;
1202
1371
  /** The /core store bound by the nearest provider. Throws when unmounted. */
1203
1372
  declare function useAssociationsStore(): AssociationsStore;
1204
- /** The five UI ports the host bound (each optional, each degradable). */
1373
+ /** The UI ports the host bound (each optional, each degradable). */
1205
1374
  declare function useAssociationsUiPorts(): AssociationsUiPorts;
1206
1375
  /**
1207
1376
  * The notifier, degraded per contract: absent → warn once via errorSink,
@@ -1407,6 +1576,36 @@ interface UseAssociationCandidatesReturn {
1407
1576
  }
1408
1577
  declare function useAssociationCandidates(args: UseAssociationCandidatesArgs): UseAssociationCandidatesReturn;
1409
1578
 
1579
+ interface UseCommentsArgs {
1580
+ /** Entity-type token of the commented-on entity (writes-strict, C18). */
1581
+ token: string;
1582
+ /** The entity's row id; null renders the idle entry and loads nothing. */
1583
+ id: string | null;
1584
+ /** Disable the auto-load on mount. Defaults to false (auto-load). */
1585
+ autoLoad?: boolean;
1586
+ }
1587
+ interface UseCommentsReturn {
1588
+ /** Every comment on the entity, flat, oldest→newest (thread by parentId). */
1589
+ comments: readonly PlatformComment[];
1590
+ status: CommentsEntry["status"];
1591
+ error: string | null;
1592
+ fetchedAt: number | null;
1593
+ /** Post a comment; pass `parentId` to reply. Reloads the thread. */
1594
+ add(body: string, opts?: {
1595
+ parentId?: string | null;
1596
+ orgId?: string | null;
1597
+ }): Promise<CommentMutationResult>;
1598
+ /** Edit a comment body (author-only in the RPC). Reloads the thread. */
1599
+ edit(commentId: string, body: string): Promise<CommentMutationResult>;
1600
+ /** Soft-delete a comment (author/org member in the RPC). Reloads. */
1601
+ remove(commentId: string): Promise<CommentMutationResult>;
1602
+ /** Force a refetch of the thread. */
1603
+ reload(): Promise<void>;
1604
+ /** Lenient identity read for edit/delete-own gating; null when signed out. */
1605
+ currentUserId: string | null;
1606
+ }
1607
+ declare function useComments(args: UseCommentsArgs): UseCommentsReturn;
1608
+
1410
1609
  interface AssociationEntitySelectItem {
1411
1610
  id: string;
1412
1611
  title: string;
@@ -1740,6 +1939,138 @@ declare function UnresolvedRef({ token, id }: {
1740
1939
  id: string;
1741
1940
  }): react.JSX.Element;
1742
1941
 
1942
+ interface AssociationEntitySelectProps {
1943
+ token: EntityTypeToken;
1944
+ adapter: AssociationEntitySelectAdapter;
1945
+ className?: string;
1946
+ /** Label sizing/typography override (defaults to toolbar-dense text-xs). */
1947
+ labelClassName?: string;
1948
+ align?: "start" | "end";
1949
+ showIcon?: boolean;
1950
+ /** How the name enters inline edit. Default "click". */
1951
+ renameActivation?: "click" | "doubleClick";
1952
+ /** Shown while no entity is active yet. Defaults to the plural label. */
1953
+ emptyLabel?: string;
1954
+ /** Icon color accent (e.g. "text-yellow-500" for notes). */
1955
+ iconClassName?: string;
1956
+ /**
1957
+ * Replaces the default "+ New <Entity>" name-input footer with a custom
1958
+ * creator (e.g. an agent picker that starts a new chat). Function form
1959
+ * receives `close` so the creator can dismiss the dropdown when done.
1960
+ */
1961
+ createSlot?: React.ReactNode | ((close: () => void) => React.ReactNode);
1962
+ }
1963
+ declare function AssociationEntitySelect({ token, adapter, className, labelClassName, align, showIcon, renameActivation, emptyLabel, iconClassName, createSlot, }: AssociationEntitySelectProps): react.JSX.Element;
1964
+
1965
+ interface CategorySelectProps {
1966
+ dimension: CategoryDimension;
1967
+ value: string | null;
1968
+ onChange: (id: string | null) => void;
1969
+ placeholder: string;
1970
+ allowNone?: boolean;
1971
+ disabled?: boolean;
1972
+ /**
1973
+ * Offer "Create «what you typed»". On by default — a closed category list is
1974
+ * a defect, so turning this off needs a reason a person would accept.
1975
+ */
1976
+ allowCreate?: boolean;
1977
+ /**
1978
+ * Org for an inline-created category. Defaults to the identity port's
1979
+ * `ensureOrgId()`; with neither, create refuses loudly.
1980
+ */
1981
+ orgId?: string | null;
1982
+ /** What one of these is called, for the create affordance ("stage", "folder"). */
1983
+ noun?: string;
1984
+ }
1985
+ declare function CategorySelect({ dimension, value, onChange, placeholder, allowNone, disabled, allowCreate, orgId, noun, }: CategorySelectProps): react.JSX.Element;
1986
+
1987
+ /** Structural stand-in for the host's `LucideIcon` on the `icon` prop. */
1988
+ type TagPickerIcon = ComponentType<{
1989
+ className?: string;
1990
+ }>;
1991
+ interface CategoryTagPickerProps {
1992
+ /** The tagged entity's registered association type (e.g. "fc_set", "party"). */
1993
+ entityType: string;
1994
+ entityId: string;
1995
+ /** The `platform.categories` facet the picker offers. */
1996
+ dimension: CategoryDimension;
1997
+ /** The typed edge role the assignment edges carry (e.g. "theme", "member"). */
1998
+ edgeRole: string;
1999
+ /**
2000
+ * Org for the edge write and for inline-created categories. Defaults to the
2001
+ * identity port's `ensureOrgId()` (create only) — pass the owning entity's
2002
+ * org when it has one.
2003
+ */
2004
+ orgId?: string | null;
2005
+ /** Trigger label while nothing is selected. */
2006
+ addLabel?: string;
2007
+ /** Trigger icon. */
2008
+ icon?: TagPickerIcon;
2009
+ /** Offer "Create <term>" for unmatched search terms. Default true. */
2010
+ allowCreate?: boolean;
2011
+ /**
2012
+ * Force the two-level face on or off. Omit to detect it from parentId rows,
2013
+ * which leaves every existing flat facet visually unchanged.
2014
+ */
2015
+ hierarchical?: boolean;
2016
+ emptyText?: string;
2017
+ }
2018
+ /**
2019
+ * Multi-select combobox: badges for the entity's current tags in `dimension`,
2020
+ * a popover to toggle existing categories, optional inline create. Fully
2021
+ * self-contained — mount it once per entity and it reads/writes the edges.
2022
+ */
2023
+ declare function CategoryTagPicker({ entityType, entityId, dimension, edgeRole, orgId, addLabel, icon: Icon, allowCreate, hierarchical, emptyText, }: CategoryTagPickerProps): react.JSX.Element;
2024
+
2025
+ interface CommentThreadProps {
2026
+ /** Entity-type token of the commented-on entity. */
2027
+ token: EntityTypeToken;
2028
+ /** The entity's row id. */
2029
+ id: string;
2030
+ /** Org override forwarded to `cmt_add` (the RPC resolves one when omitted). */
2031
+ orgId?: string | null;
2032
+ /** Hide the slim "Comments · n" header row. Defaults to shown. */
2033
+ showHeader?: boolean;
2034
+ className?: string;
2035
+ }
2036
+ interface CommentComposerProps {
2037
+ /** Post the body; resolve `{ok:false}` to keep the text + show the error. */
2038
+ onSubmit: (body: string) => Promise<{
2039
+ ok: boolean;
2040
+ error?: string;
2041
+ }>;
2042
+ placeholder?: string;
2043
+ submitLabel?: string;
2044
+ /** Initial body (the edit flow seeds the current text). */
2045
+ initialValue?: string;
2046
+ /** Rendered right of the submit button (the Cancel affordance). */
2047
+ trailing?: ReactNode;
2048
+ autoFocus?: boolean;
2049
+ }
2050
+ /**
2051
+ * The one composer every comment write goes through (new comment, reply,
2052
+ * edit). Submit on the button or Cmd/Ctrl+Enter; the text survives a failed
2053
+ * submit alongside the inline error (input is never lost).
2054
+ */
2055
+ declare function CommentComposer({ onSubmit, placeholder, submitLabel, initialValue, trailing, autoFocus, }: CommentComposerProps): react.JSX.Element;
2056
+ /**
2057
+ * Build the parent→children index. A reply whose parent is missing from the
2058
+ * list (soft-deleted parent, partial page) is promoted to top level rather
2059
+ * than dropped — every visible comment stays reachable.
2060
+ */
2061
+ declare function buildCommentTree(comments: readonly PlatformComment[]): {
2062
+ roots: PlatformComment[];
2063
+ childrenOf: Map<string, PlatformComment[]>;
2064
+ };
2065
+ declare function CommentThread({ token, id, orgId, showHeader, className, }: CommentThreadProps): react.JSX.Element;
2066
+
2067
+ /**
2068
+ * "just now" under a minute, then the largest whole unit ("5 minutes ago",
2069
+ * "2 days ago"). An unparseable timestamp returns the raw string rather than
2070
+ * "Invalid Date" chrome — degraded, never broken.
2071
+ */
2072
+ declare function formatRelativeTime(iso: string, now?: number): string;
2073
+
1743
2074
  interface ContentRoleMeta {
1744
2075
  id: ContentRole;
1745
2076
  /** Section heading. */
@@ -1755,4 +2086,4 @@ interface ContentRoleMeta {
1755
2086
  declare const CONTENT_ROLES: ContentRoleMeta[];
1756
2087
  declare function getContentRoleMeta(role: ContentRole): ContentRoleMeta;
1757
2088
 
1758
- export { AssociationCandidateBody, type AssociationCandidateBodyProps, AssociationCaptureToolbar, type AssociationCaptureToolbarProps, AssociationCard, AssociationCardGrid, type AssociationCardGridProps, type AssociationCardProps, type AssociationEntitySelectAdapter, type AssociationEntitySelectItem, AssociationList, type AssociationListProps, AssociationPicker, type AssociationPickerProps, AssociationWindow, type AssociationWindowProps, type AssociationWriteResult, AssociationsProvider, type AssociationsProviderProps, type AssociationsUiPorts, AttachedItemsSheet, type AttachedItemsSheetProps, CONTENT_ROLES, type CandidateRecord, type CaptureAttach, type CaptureAttachResult, CaptureToolbarAction, type CategoryCreateResult, type CategoryMutationResult, type ContainerLink, type ContainerResourceRow, type ContainerResourcesAdapter, type ContentRoleMeta, DefaultEntityIcon, DoorRef, type EntityTitleRef, type PrimaryEntity, PrimaryEntityProvider, UniversalAssociationPicker, type UniversalAssociationPickerProps, type UniversalCandidate, UnresolvedRef, type UseAssociationCandidatesArgs, type UseAssociationCandidatesReturn, type UseAssociationEntitySelectAdapterArgs, type UseAssociationsArgs, type UseAssociationsReturn, type UseCategoriesArgs, type UseCategoriesReturn, type UseContainerLinksArgs, type UseContainerLinksReturn, type UseEntityTitlesReturn, type UseUniversalEntitySearchArgs, type UseUniversalEntitySearchReturn, attachedKey, getContentRoleMeta, useAssociationCandidates, useAssociationEntitySelectAdapter, useAssociations, useAssociationsStore, useAssociationsUiPorts, useCategories, useContainerLinks, useContainerLinksAdapter, useEntityRelationships, useEntityTitles, useNotifier, usePrimaryEntity, useUniversalEntitySearch };
2089
+ export { AssociationCandidateBody, type AssociationCandidateBodyProps, AssociationCaptureToolbar, type AssociationCaptureToolbarProps, AssociationCard, AssociationCardGrid, type AssociationCardGridProps, type AssociationCardProps, AssociationEntitySelect, type AssociationEntitySelectAdapter, type AssociationEntitySelectItem, type AssociationEntitySelectProps, AssociationList, type AssociationListProps, AssociationPicker, type AssociationPickerProps, AssociationWindow, type AssociationWindowProps, type AssociationWriteResult, AssociationsProvider, type AssociationsProviderProps, type AssociationsUiPorts, AttachedItemsSheet, type AttachedItemsSheetProps, CONTENT_ROLES, type CandidateRecord, type CaptureAttach, type CaptureAttachResult, CaptureToolbarAction, type CategoryCreateResult, type CategoryMutationResult, CategorySelect, type CategorySelectProps, CategoryTagPicker, type CategoryTagPickerProps, CommentComposer, type CommentComposerProps, CommentThread, type CommentThreadProps, type ContainerLink, type ContainerResourceRow, type ContainerResourcesAdapter, type ContentRoleMeta, DefaultEntityIcon, DoorRef, type EntityTitleRef, type PrimaryEntity, PrimaryEntityProvider, type TagPickerIcon, UniversalAssociationPicker, type UniversalAssociationPickerProps, type UniversalCandidate, UnresolvedRef, type UseAssociationCandidatesArgs, type UseAssociationCandidatesReturn, type UseAssociationEntitySelectAdapterArgs, type UseAssociationsArgs, type UseAssociationsReturn, type UseCategoriesArgs, type UseCategoriesReturn, type UseCommentsArgs, type UseCommentsReturn, type UseContainerLinksArgs, type UseContainerLinksReturn, type UseEntityTitlesReturn, type UseUniversalEntitySearchArgs, type UseUniversalEntitySearchReturn, attachedKey, buildCommentTree, formatRelativeTime, getContentRoleMeta, useAssociationCandidates, useAssociationEntitySelectAdapter, useAssociations, useAssociationsStore, useAssociationsUiPorts, useCategories, useComments, useContainerLinks, useContainerLinksAdapter, useEntityRelationships, useEntityTitles, useNotifier, usePrimaryEntity, useUniversalEntitySearch };