Cotton code
2878 lines · 51.2 KB · JSONRaw
{  "schema_version": 147,  "tables": {    "_ai_batches": [      "applied",      "batch_id",      "context",      "created_at",      "failure",      "metered",      "next_poll",      "purpose",      "request_key",      "reservation_usd",      "result"    ],    "_computed": [      "key",      "record_id",      "table_id",      "value"    ],    "_cursors": [      "author_device_id",      "hlc_seen",      "updated_at"    ],    "_fts_fill": [      "filled",      "floor",      "fts",      "started_at",      "total",      "updated_at"    ],    "_gone": [      "actor",      "author",      "bytes",      "hlc",      "op_id",      "reason",      "row_id",      "sig",      "tbl"    ],    "_keep_fetch": [      "after",      "covered",      "target",      "tbl"    ],    "_media": [      "after",      "after_row_id",      "attempts",      "captured_here",      "content_type",      "created_at",      "fetched_by_rule",      "key",      "last_error",      "last_viewed_at",      "local_path",      "next_attempt_at",      "pinned",      "sha256",      "size_bytes",      "state",      "tier",      "updated_at",      "workspace_id"    ],    "_media_key_names": [      "key",      "row_id",      "tbl"    ],    "_media_unlinks": [      "done_at",      "key",      "queued_at"    ],    "_meta": [      "author_id",      "device_id",      "handed_over_epoch",      "heard_serving_epoch",      "last_hlc",      "last_server_seq",      "only_one",      "owner_id",      "rotation_check_due",      "schema_version",      "workspace_id"    ],    "_on_demand": [      "fetched_at",      "opened_at",      "row_id",      "tbl"    ],    "_outbox": [      "attempts",      "author",      "bytes",      "hlc",      "kind",      "last_error",      "mint_boot",      "mint_cont",      "op_id",      "queued_at",      "row_id",      "schema_version",      "sig",      "tbl"    ],    "_parked": [      "bytes",      "class",      "direction",      "first_at",      "handover_epoch",      "handover_offers",      "op_id",      "reason",      "row_id",      "sig",      "tbl",      "tried_at",      "tries"    ],    "_tombstones": [      "actor",      "author",      "bytes",      "held",      "hlc",      "mint_boot",      "mint_cont",      "op_id",      "row_id",      "sig",      "tbl"    ],    "_writes": [      "actor",      "author",      "bytes",      "fields",      "held",      "hlc",      "kind",      "mint_boot",      "mint_cont",      "op_id",      "row_id",      "sig",      "tbl"    ],    "_writes_owners": [      "owner",      "receipt",      "tbl"    ],    "cotton_account_usage_samples": [      "_born",      "_hlc",      "account_id",      "five_hour_pct",      "id",      "sampled_at",      "weekly_pct",      "workspace_id"    ],    "cotton_admissions": [      "_born",      "_hlc",      "admitted_at",      "admitted_by_person",      "id",      "invite_id",      "p_sig",      "person_key",      "person_name",      "rights",      "suggested_person_id",      "suggested_person_sig",      "workspace_id"    ],    "cotton_agent_accounts": [      "_born",      "_hlc",      "created_at",      "email",      "five_hour_pct",      "five_hour_resets_at",      "id",      "label",      "provider",      "seen_at",      "seen_on_device_id",      "updated_at",      "weekly_pct",      "weekly_resets_at",      "workspace_id"    ],    "cotton_ai_access": [      "_born",      "_hlc",      "created_at",      "owner_user_id",      "subscription_active",      "trial_started_at",      "updated_at",      "workspace_id"    ],    "cotton_ai_budgets": [      "_born",      "_hlc",      "created_at",      "currency",      "daily_cap",      "hourly_cap",      "id",      "name",      "pause_reason",      "paused_until",      "updated_at",      "usd_rate",      "workspace_id"    ],    "cotton_ai_calls": [      "_born",      "_hlc",      "at",      "cache_creation_input_tokens",      "cache_read_input_tokens",      "cost_amount",      "cost_usd",      "created_at",      "currency",      "device_id",      "drained_by",      "duration_seconds",      "error_message",      "function_name",      "id",      "input_tokens",      "is_preview",      "job_id",      "key_source",      "latency_ms",      "legacy_id",      "local_day",      "metadata",      "mode",      "model",      "output_tokens",      "provider",      "status",      "updated_at",      "workspace_id"    ],    "cotton_ai_jobs": [      "_born",      "_hlc",      "attempts",      "created_at",      "done_at",      "id",      "input",      "kind",      "level",      "outcome",      "reason",      "state",      "subject_id",      "subject_table",      "taken_at",      "taken_by",      "updated_at",      "workspace_id"    ],    "cotton_alarms": [      "_born",      "_hlc",      "created_at",      "enabled",      "hour",      "id",      "label",      "minute",      "repeat_days",      "sound",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_arrivals": [      "_born",      "_hlc",      "ask",      "burst",      "changes",      "context",      "created_at",      "decided_at",      "id",      "kind",      "outcome",      "reason",      "record_id",      "record_table",      "retrieval",      "seen_at",      "seen_by",      "updated_at",      "workspace_id"    ],    "cotton_assistant_runs": [      "_born",      "_hlc",      "class",      "cost_usd",      "error",      "finished_at",      "id",      "input_tokens",      "output_tokens",      "queued_at",      "receipt",      "record_id",      "record_kind",      "result_note_id",      "session_id",      "source_id",      "source_kind",      "started_at",      "state",      "stopped_reason",      "task",      "turns",      "workspace_id"    ],    "cotton_audiences": [      "_born",      "_hlc",      "audience",      "created_at",      "id",      "record_id",      "record_table",      "updated_at",      "workspace_id"    ],    "cotton_authors": [      "_born",      "_hlc",      "device_id",      "device_name",      "first_stamp",      "id",      "minted_at",      "reason",      "workspace_id"    ],    "cotton_automation_runs": [      "_born",      "_hlc",      "automation",      "changes",      "created_at",      "deleted_at",      "ended_at",      "id",      "outcome",      "record_byline",      "root_first",      "started_at",      "summary",      "updated_at",      "workspace_id"    ],    "cotton_blocked_senders": [      "_born",      "_hlc",      "address",      "created_at",      "id",      "workspace_id"    ],    "cotton_board_definitions": [      "_born",      "_hlc",      "builtin",      "builtin_hash",      "builtin_revision",      "builtin_stamp",      "created_at",      "definition",      "id",      "updated_at",      "workspace_id"    ],    "cotton_call_log": [      "_born",      "_hlc",      "contact_id",      "created_at",      "device",      "direction",      "duration_s",      "external_id",      "handle",      "id",      "meta",      "outcome",      "person_id",      "provider",      "source",      "started_at",      "updated_at",      "workspace_id"    ],    "cotton_changes": [      "_born",      "_hlc",      "actor",      "after",      "before",      "byline",      "created_at",      "id",      "kind",      "record_id",      "table_id",      "verb",      "workspace_id",      "write_hlc"    ],    "cotton_code_credentials": [      "_born",      "_hlc",      "created_at",      "device_id",      "expires_at",      "id",      "last_used_at",      "minted_by",      "name",      "read_only",      "revoked_at",      "scope",      "token_digest",      "workspace_id"    ],    "cotton_collections": [      "_born",      "_hlc",      "archived_at",      "color",      "created_at",      "id",      "is_default",      "kind",      "name",      "sort_key",      "workspace_id"    ],    "cotton_comments": [      "_born",      "_hlc",      "anchor",      "author_kind",      "author_label",      "author_user_id",      "body",      "created_at",      "id",      "kind",      "parent_id",      "record_id",      "record_kind",      "resolved_at",      "resolved_by_kind",      "resolved_by_label",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_connections": [      "_born",      "_hlc",      "config",      "created_at",      "database_id",      "id",      "kind",      "last_error",      "last_read_at",      "name",      "reaches",      "read_requested_at",      "schedule",      "secret_id",      "state",      "updated_at",      "workspace_id"    ],    "cotton_database_departures": [      "_born",      "_hlc",      "database_id",      "departed_at",      "device_id",      "id",      "reason",      "workspace_id"    ],    "cotton_databases": [      "_born",      "_hlc",      "created_at",      "id",      "name",      "sort_order",      "workspace_id"    ],    "cotton_decisions": [      "_born",      "_hlc",      "created_at",      "decided_by",      "id",      "pull",      "title",      "trashed_at",      "updated_at",      "why",      "workspace_id"    ],    "cotton_dev_jobs": [      "_born",      "_hlc",      "claimed_at",      "command",      "created_at",      "cwd",      "device_id",      "exit_code",      "failure",      "finished_at",      "id",      "log_bytes",      "log_lines",      "log_path",      "output_tail",      "state",      "timeout_seconds",      "updated_at",      "workspace_id"    ],    "cotton_device_keep": [      "_born",      "_hlc",      "created_at",      "device_id",      "id",      "kind",      "rule",      "target",      "updated_at",      "workspace_id"    ],    "cotton_device_relay_keys": [      "_born",      "_hlc",      "created_at",      "device_id",      "epoch",      "id",      "relay_identity_key",      "set_at",      "set_by",      "updated_at",      "workspace_id"    ],    "cotton_device_samples": [      "_born",      "_hlc",      "build_lock_held",      "device_id",      "disk_free_gb",      "id",      "load1",      "mem_free_pct",      "sampled_at",      "sessions_running",      "workspace_id"    ],    "cotton_device_statements": [      "_born",      "_hlc",      "d_sig",      "device_key",      "device_name",      "id",      "made_at",      "p_sig",      "person_key",      "vault_public_key",      "workspace_id"    ],    "cotton_devices": [      "_born",      "_hlc",      "account_ids",      "agents",      "ai_day_cap_usd",      "ai_holds",      "ai_spend",      "app_version",      "approved_at",      "approved_by_device",      "build_lock_held",      "camera_roll",      "chip",      "copy_as_of",      "cpu_count",      "created_at",      "device_id",      "disk_free_gb",      "disk_total_gb",      "hardware_id",      "host_version",      "id",      "keep_bytes",      "keep_free_bytes",      "kept_space_bytes",      "load1",      "mem_budget_gb",      "mem_committed_gb",      "mem_free_pct",      "mem_total_gb",      "name",      "os_version",      "person_key",      "platform",      "push_authorization",      "push_bundle_id",      "push_environment",      "push_registered_at",      "push_retired_at",      "push_retired_reason",      "push_token",      "pushed_first_at",      "recovery_key_shown_at",      "relay_identity_key",      "reported_state",      "repos",      "revoked_at",      "revoked_by_device",      "revoked_reason",      "runner_confirmed_at",      "runner_ordered_at",      "runner_problem",      "sampled_at",      "schema_version",      "scope",      "serving_rank",      "session_peak_gb",      "session_peak_samples",      "sessions_cap",      "sessions_running",      "takes_placements",      "update_hold",      "updated_at",      "workspace_id"    ],    "cotton_dictations": [      "_born",      "_hlc",      "created_at",      "duration_ms",      "external_id",      "host_app",      "id",      "raw_text",      "source",      "spoken_at",      "text",      "words",      "workspace_id"    ],    "cotton_document_pages": [      "_born",      "_hlc",      "created_at",      "document_id",      "id",      "page",      "text",      "workspace_id"    ],    "cotton_documents": [      "_born",      "_hlc",      "byte_size",      "created_at",      "decrypted_path",      "doc_type",      "document_date",      "error_code",      "facts",      "failed_stage",      "id",      "issuer",      "mcp_token_id",      "mime",      "origin_handle",      "original_name",      "page_count",      "password",      "period_end",      "period_start",      "secret_id",      "sha256",      "source",      "status",      "status_changed_at",      "storage_path",      "summary",      "text_extracted",      "title",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_email_participants": [      "_born",      "_hlc",      "created_at",      "display_name",      "email",      "id",      "role",      "thread_id",      "updated_at",      "workspace_id"    ],    "cotton_email_senders": [      "_born",      "_hlc",      "address",      "created_at",      "decided_at",      "decided_by",      "id",      "kind",      "reason",      "updated_at",      "verdict",      "workspace_id",      "written_to"    ],    "cotton_email_threads": [      "_born",      "_hlc",      "amount_minor",      "created_at",      "currency",      "email_count",      "external_key",      "first_at",      "id",      "last_at",      "merchant",      "record_kind",      "record_on",      "record_reason",      "reference",      "sender_address",      "sender_kind",      "subject",      "summary",      "summary_by",      "summary_updated_at",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_emails": [      "_born",      "_hlc",      "account",      "attachments",      "body",      "created_at",      "external_id",      "from_email",      "from_name",      "gmail_account",      "gmail_id",      "id",      "in_inbox",      "labels",      "recipients",      "sent_at",      "snippet",      "starred",      "subject",      "sync_state",      "thread_id",      "trashed_at",      "unread",      "workspace_id"    ],    "cotton_event_attendees": [      "_born",      "_hlc",      "created_at",      "display_name",      "email",      "event_id",      "id",      "phone",      "response",      "updated_at"    ],    "cotton_events": [      "_born",      "_hlc",      "account",      "all_day",      "collection_id",      "country",      "created_at",      "ends_at",      "erase_requested_at",      "event_place",      "exdates",      "gcal_etag",      "gcal_id",      "ical_uid",      "id",      "location",      "my_response",      "notes",      "on_google",      "organizer_is_self",      "original_starts_at",      "rrule",      "series_id",      "source_inbox_id",      "starts_at",      "sync_state",      "timezone",      "title",      "trashed_at",      "updated_at"    ],    "cotton_feedback": [      "_born",      "_hlc",      "app",      "author_kind",      "author_label",      "author_user_id",      "body",      "context",      "created_at",      "id",      "image_ext",      "image_sha256",      "parent_id",      "person_id",      "resolution_note",      "resolved_at",      "resolved_by_kind",      "resolved_by_label",      "same_as",      "share_id",      "status",      "updated_at",      "workspace_id",      "x",      "y"    ],    "cotton_filing_proposals": [      "_born",      "_hlc",      "answer",      "arrivals",      "candidates",      "created_at",      "decided_at",      "destination",      "id",      "kind",      "owner",      "payload",      "reason",      "revisions",      "session",      "source",      "status",      "updated_at",      "workspace_id"    ],    "cotton_goals": [      "_born",      "_hlc",      "achieved_at",      "created_at",      "id",      "sort_order",      "status",      "target_date",      "title",      "trashed_at",      "updated_at",      "why",      "workspace_id"    ],    "cotton_google_accounts": [      "_born",      "_hlc",      "channel_expires_at",      "channel_id",      "channel_resource_id",      "created_at",      "google_email",      "id",      "refresh_token_enc",      "sync_token",      "updated_at",      "workspace_id"    ],    "cotton_grant_rotations": [      "_born",      "_hlc",      "actor",      "digest",      "generation",      "grant_id",      "id",      "rotated_at",      "workspace_id"    ],    "cotton_group_members": [      "_born",      "_hlc",      "created_at",      "group_id",      "id",      "place",      "record_id",      "updated_at",      "workspace_id"    ],    "cotton_groups": [      "_born",      "_hlc",      "created_at",      "deleted_at",      "filter",      "id",      "name",      "picture",      "position",      "record_byline",      "table_id",      "updated_at",      "workspace_id"    ],    "cotton_home_arrangement": [      "_born",      "_hlc",      "created_at",      "project_slugs",      "tools",      "updated_at",      "view_ids",      "workspace_id"    ],    "cotton_imports": [      "_born",      "_hlc",      "added",      "created_at",      "device_id",      "finished_at",      "id",      "skipped",      "source",      "title",      "workspace_id"    ],    "cotton_inbox_items": [      "_born",      "_hlc",      "audio_url",      "captured_at",      "correction_of",      "created_at",      "id",      "raw_text",      "route_confidence",      "route_plan",      "route_plan_user_edited",      "route_proposal",      "route_reason",      "route_status",      "routed_id",      "routed_kind",      "routed_records",      "said_record_id",      "said_table",      "sweep_note",      "swept_at",      "transcript",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_invites": [      "_born",      "_hlc",      "expires_at",      "hands_over",      "id",      "made_at",      "made_by_person",      "p_sig",      "recipient",      "rights",      "secret_hash",      "workspace_id"    ],    "cotton_joined_places": [      "_born",      "_hlc",      "database_id",      "id",      "joined_at",      "name",      "origin",      "server_device_id",      "workspace_id"    ],    "cotton_links": [      "_born",      "_hlc",      "created_at",      "from_id",      "from_kind",      "id",      "to_database",      "to_id",      "to_kind",      "workspace_id"    ],    "cotton_locations": [      "_born",      "_hlc",      "address",      "archived_at",      "country",      "created_at",      "id",      "lat",      "lng",      "name",      "near",      "note",      "place",      "place_id",      "source_inbox_id",      "timezone",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_machine_runners": [      "_born",      "_hlc",      "ai_levels",      "capacity",      "created_at",      "device_id",      "enabled",      "id",      "labels_json",      "updated_at",      "workspace_id"    ],    "cotton_mcp_audit": [      "_born",      "_hlc",      "args_summary",      "created_at",      "id",      "ok",      "token_id",      "tool",      "workspace_id"    ],    "cotton_mcp_tokens": [      "_born",      "_hlc",      "created_at",      "expires_at",      "id",      "last_used_at",      "minted_by_device",      "name",      "owner_user_id",      "revoked_at",      "scopes",      "token_hash",      "workspace_id"    ],    "cotton_media_album_items": [      "_born",      "_hlc",      "added_by",      "album_id",      "created_at",      "id",      "origin_handle",      "record_id",      "record_kind",      "sort_at",      "updated_at",      "workspace_id"    ],    "cotton_media_albums": [      "_born",      "_hlc",      "cover_id",      "created_at",      "decided_at",      "ends_at",      "home_label",      "id",      "kind",      "origin_handle",      "starts_at",      "state",      "title",      "title_by",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_media_backups": [      "_born",      "_hlc",      "id",      "missing_at",      "object_key",      "serving_epoch",      "verified_at",      "workspace_id"    ],    "cotton_media_duplicates": [      "_born",      "_hlc",      "copy_id",      "created_at",      "decided_at",      "distance",      "id",      "keep_id",      "method",      "record_kind",      "state",      "updated_at",      "workspace_id"    ],    "cotton_media_erasures": [      "_born",      "_hlc",      "actor",      "erased_at",      "id",      "key",      "record_id",      "record_table",      "workspace_id"    ],    "cotton_media_faces": [      "_born",      "_hlc",      "cluster_id",      "created_at",      "embedding",      "embedding_model",      "h",      "id",      "person_by",      "person_id",      "quality",      "record_id",      "record_kind",      "source",      "source_id",      "suggested_distance",      "suggested_person_id",      "suggestion_dismissed_at",      "updated_at",      "w",      "workspace_id",      "x",      "y"    ],    "cotton_media_holdings": [      "_born",      "_hlc",      "bytes",      "created_at",      "device_id",      "dropped_at",      "id",      "object_key",      "tier",      "updated_at",      "verified_at",      "workspace_id"    ],    "cotton_media_sightings": [      "_born",      "_hlc",      "created_at",      "id",      "key",      "record_id",      "record_kind",      "seen_at",      "source",      "source_id",      "thread_id",      "updated_at",      "workspace_id"    ],    "cotton_meeting_utterances": [      "_born",      "_hlc",      "created_at",      "id",      "meeting_id",      "seq",      "speaker_label",      "t0_ms",      "t1_ms",      "text"    ],    "cotton_meetings": [      "_born",      "_hlc",      "audio_deleted_at",      "created_at",      "decisions",      "duration_seconds",      "ended_at",      "error_code",      "event_database",      "event_id",      "failed_stage",      "id",      "language",      "poll_attempts",      "segments",      "source",      "speakers",      "started_at",      "status",      "status_changed_at",      "summary_md",      "title",      "trashed_at",      "updated_at",      "vendor",      "vendor_job_id",      "workspace_id"    ],    "cotton_member_person_claims": [      "_born",      "_hlc",      "admission_id",      "claimed_at",      "id",      "p_sig",      "person_id",      "person_key",      "workspace_id"    ],    "cotton_memories": [      "_born",      "_hlc",      "archived_at",      "body",      "created_at",      "id",      "machine",      "origin_kind",      "origin_label",      "reviewed_at",      "slug",      "source",      "source_external_id",      "status",      "superseded_by",      "title",      "updated_at",      "visibility",      "workspace_id"    ],    "cotton_memory_projects": [      "_born",      "_hlc",      "brand",      "created_at",      "description",      "id",      "name",      "origin_handle",      "repos",      "section_order",      "slug",      "status",      "summary_by",      "summary_updated_at",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_money_accounts": [      "_born",      "_hlc",      "archived_at",      "counterparty_person_id",      "created_at",      "currency",      "id",      "institution",      "is_default",      "is_pooled",      "kind",      "name",      "number_mask",      "subtype",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_money_evidence": [      "_born",      "_hlc",      "attached_by",      "attached_by_label",      "created_at",      "excerpt",      "id",      "kind",      "ref_id",      "source_label",      "transaction_id",      "trashed_at",      "workspace_id"    ],    "cotton_money_statement_lines": [      "_born",      "_hlc",      "amount_minor",      "balance_after_minor",      "created_at",      "direction",      "fingerprint",      "id",      "ignored_reason",      "line_no",      "page",      "posted_on",      "reference",      "statement_id",      "text",      "workspace_id"    ],    "cotton_money_statements": [      "_born",      "_hlc",      "account_id",      "balance_check",      "closing_balance_minor",      "created_at",      "currency",      "document_id",      "id",      "kind",      "line_count",      "opening_balance_minor",      "period_end",      "period_start",      "read_at",      "read_by",      "read_error",      "read_status",      "sum_in_minor",      "sum_out_minor",      "updated_at",      "workspace_id"    ],    "cotton_money_transactions": [      "_born",      "_hlc",      "account_id",      "amount_known",      "amount_minor",      "between_us",      "certainty",      "counterparty_person_id",      "created_at",      "created_by",      "currency",      "description",      "direction",      "due_date",      "external_hash",      "for_period",      "id",      "moves_money",      "notes",      "occurred_on",      "payee_text",      "repeat",      "repeat_day",      "settles_transaction_id",      "source",      "source_inbox_id",      "status",      "tag",      "transfer_of",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_moods": [      "_born",      "_hlc",      "at",      "created_at",      "emotions",      "emotions_by",      "id",      "line",      "local_day",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_msg_contact_handles": [      "_born",      "_hlc",      "contact_id",      "created_at",      "id",      "kind",      "value",      "workspace_id"    ],    "cotton_msg_contacts": [      "_born",      "_hlc",      "auth_user_id",      "avatar_key",      "blocked",      "created_at",      "display_name",      "id",      "muted",      "on_cotton_at",      "person_id",      "phone_e164",      "updated_at",      "vip",      "workspace_id"    ],    "cotton_msg_messages": [      "_born",      "_hlc",      "body",      "channel",      "created_at",      "deleted_at",      "direction",      "edited_at",      "external_id",      "forward_of_id",      "hidden_at",      "id",      "media",      "mentions",      "meta",      "origin",      "reactions",      "read_at",      "reply_to_external_id",      "reply_to_id",      "send_attempts",      "send_error",      "send_state",      "sender_contact_id",      "sender_participant_id",      "sent_at",      "seq",      "starred_at",      "thread_id",      "trashed_at",      "workspace_id"    ],    "cotton_msg_owner_settings": [      "_born",      "_hlc",      "allow_new_contacts",      "app_download_url",      "availability_copy",      "avatar_url",      "created_at",      "discoverable",      "display_name",      "handle",      "last_seen_visible",      "read_receipts",      "share_requests",      "updated_at",      "workspace_id"    ],    "cotton_msg_reactions": [      "_born",      "_hlc",      "actor",      "created_at",      "emoji",      "id",      "message_id",      "thread_id",      "workspace_id"    ],    "cotton_msg_receipts": [      "_born",      "_hlc",      "delivered_seq",      "id",      "phone",      "read_seq",      "thread_id",      "updated_at",      "workspace_id"    ],    "cotton_msg_thread_filings": [      "_born",      "_hlc",      "copied_through",      "created_at",      "database_id",      "filed_at",      "id",      "paused_by",      "state",      "thread_id",      "unfiled_at",      "updated_at",      "workspace_id"    ],    "cotton_msg_thread_marks": [      "_born",      "_hlc",      "archived",      "cleared_before",      "created_at",      "database_id",      "id",      "muted_until",      "pinned_at",      "thread_id",      "updated_at",      "workspace_id"    ],    "cotton_msg_thread_participants": [      "_born",      "_hlc",      "contact_id",      "created_at",      "display_name",      "id",      "is_self",      "left_at",      "role",      "thread_id",      "workspace_id"    ],    "cotton_msg_threads": [      "_born",      "_hlc",      "archived",      "cleared_before",      "contact_id",      "created_at",      "created_by_phone",      "delivered_seq",      "description",      "draft",      "draft_reply_to_id",      "external_key",      "id",      "kind",      "last_message_at",      "last_message_preview",      "muted_until",      "photo_key",      "pinned_at",      "read_seq",      "summary",      "summary_by",      "summary_updated_at",      "title",      "trashed_at",      "unread_marked_at",      "updated_at",      "workspace_id"    ],    "cotton_news_editions": [      "_born",      "_hlc",      "covered_from",      "covered_to",      "created_at",      "edition_label",      "error_code",      "failed_stage",      "id",      "model",      "notes",      "opened_at",      "quiet",      "read_minutes",      "status",      "status_changed_at",      "story_count",      "trigger_kind",      "updated_at",      "workspace_id"    ],    "cotton_news_seen": [      "_born",      "_hlc",      "first_seen_at",      "id",      "key",      "source",      "story_id",      "title_hash",      "topic_id",      "url",      "workspace_id"    ],    "cotton_news_settings": [      "_born",      "_hlc",      "created_at",      "edition_times",      "next_edition_at",      "notify",      "stale_after_minutes",      "stale_refresh",      "timezone",      "updated_at",      "workspace_id"    ],    "cotton_news_stories": [      "_born",      "_hlc",      "bullets",      "created_at",      "edition_id",      "feedback",      "headline",      "id",      "lede",      "opened_at",      "rank",      "read_minutes",      "sources",      "topic_id",      "why_care"    ],    "cotton_news_topics": [      "_born",      "_hlc",      "active",      "brief",      "created_at",      "exclusions",      "id",      "kind",      "last_new_at",      "name",      "paused_reason",      "sort_order",      "source_url",      "trashed_at",      "unopened_streak",      "updated_at",      "workspace_id"    ],    "cotton_note_attachments": [      "_born",      "_hlc",      "caption",      "created_at",      "id",      "note_id",      "origin_handle",      "position",      "record_id",      "record_kind",      "updated_at",      "workspace_id"    ],    "cotton_notes": [      "_born",      "_hlc",      "archived_at",      "author_kind",      "author_label",      "body",      "created_at",      "external_id",      "id",      "journal_date",      "kind",      "managed_by",      "origin_handle",      "pinned",      "project_id",      "public_slug",      "published_at",      "source_hash",      "source_inbox_id",      "title",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_oauth_clients": [      "_born",      "_hlc",      "client_id",      "created_at",      "kind",      "metadata_json",      "secret_hash"    ],    "cotton_oauth_grants": [      "_born",      "_hlc",      "client_id",      "client_name",      "created_at",      "id",      "minted_by",      "refresh_digest",      "refresh_generation",      "refresh_rotated_at",      "revoked_at",      "scope",      "token_id",      "workspace_id"    ],    "cotton_outages": [      "_born",      "_hlc",      "condition",      "created_at",      "doing",      "effect",      "ended_at",      "id",      "kind",      "machine",      "started_at",      "title",      "told_close_at",      "told_open_at",      "updated_at",      "workspace_id"    ],    "cotton_pages": [      "_born",      "_hlc",      "archived_at",      "created_at",      "host",      "id",      "read_at",      "source_inbox_id",      "state",      "text",      "text_state",      "title",      "trashed_at",      "updated_at",      "url",      "workspace_id"    ],    "cotton_people": [      "_born",      "_hlc",      "archived_at",      "avatar_key",      "avatar_photo_id",      "avatar_url",      "birth_day",      "birth_month",      "birth_year",      "city",      "city_filled_at",      "city_place",      "contact_source",      "country",      "created_at",      "device_contact_id",      "device_contact_snapshot",      "face_embedding",      "face_embedding_from",      "face_embedding_model",      "full_name",      "id",      "language",      "org",      "role_title",      "summary",      "summary_by",      "summary_updated_at",      "timezone",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_person_handles": [      "_born",      "_hlc",      "created_at",      "id",      "kind",      "normalised",      "person_id",      "position",      "source",      "trashed_at",      "updated_at",      "value",      "verified_at",      "workspace_id"    ],    "cotton_person_keys": [      "_born",      "_hlc",      "created_at",      "id",      "name",      "public_key",      "sealed_private",      "vmk_version",      "workspace_id"    ],    "cotton_person_languages": [      "_born",      "_hlc",      "created_at",      "id",      "language",      "person_id",      "position",      "proficiency",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_person_notes": [      "_born",      "_hlc",      "body",      "created_at",      "id",      "noted_at",      "person_id",      "source_inbox_id"    ],    "cotton_person_suggestions": [      "_born",      "_hlc",      "candidate_id",      "contact_id",      "created_at",      "decided_at",      "id",      "person_id",      "reason",      "score",      "state",      "updated_at",      "workspace_id"    ],    "cotton_photos": [      "_born",      "_hlc",      "aesthetic_score",      "camera_make",      "camera_model",      "caption",      "content_type",      "created_at",      "curation_score",      "favourite",      "height",      "id",      "image_embedding",      "image_embedding_model",      "is_utility",      "key",      "labels",      "latitude",      "longitude",      "ocr_text",      "orientation",      "origin_handle",      "original_filename",      "phash",      "place_city",      "place_country",      "place_name",      "place_region",      "preview",      "review_at",      "review_by",      "review_note",      "sha256",      "size_bytes",      "subtypes",      "summary",      "summary_at",      "summary_by",      "taken_at",      "taken_offset",      "trashed_at",      "updated_at",      "width",      "workspace_id"    ],    "cotton_placement_proposals": [      "_born",      "_hlc",      "created_at",      "decided_at",      "id",      "items",      "status",      "title",      "updated_at",      "workspace_id"    ],    "cotton_posts": [      "_born",      "_hlc",      "account",      "author_handle",      "author_name",      "caption",      "created_at",      "external_id",      "id",      "media",      "permalink",      "person_id",      "posted_at",      "saved",      "saved_at",      "source",      "updated_at",      "workspace_id"    ],    "cotton_project_links": [      "_born",      "_hlc",      "applied_by",      "created_at",      "id",      "note",      "origin_handle",      "pinned",      "position",      "project_id",      "record_id",      "record_kind",      "updated_at",      "workspace_id"    ],    "cotton_prompts": [      "_born",      "_hlc",      "created_at",      "id",      "project_id",      "role",      "seq",      "session_id",      "text",      "ts",      "updated_at",      "workspace_id"    ],    "cotton_push_acks": [      "_born",      "_hlc",      "created_at",      "device_id",      "how",      "id",      "push_id",      "received_at",      "updated_at",      "workspace_id"    ],    "cotton_records": [      "_born",      "_hlc",      "byline",      "created_at",      "data",      "deleted_at",      "id",      "position",      "project_id",      "table_id",      "updated_at",      "workspace_id"    ],    "cotton_repo_bundles": [      "_born",      "_hlc",      "basis_sha",      "bytes",      "created_at",      "head_sha",      "id",      "kind",      "object_key",      "refs_json",      "repo_id",      "sha256",      "superseded_at",      "updated_at",      "workspace_id"    ],    "cotton_repo_clones": [      "_born",      "_hlc",      "created_at",      "device_id",      "id",      "repo_id",      "sentence",      "state",      "updated_at",      "workspace_id"    ],    "cotton_repo_comments": [      "_born",      "_hlc",      "author",      "body",      "created_at",      "html_url",      "id",      "kind",      "line",      "path",      "remote_created_at",      "remote_id",      "remote_updated_at",      "repo_id",      "review_state",      "target_kind",      "target_number",      "updated_at",      "workspace_id"    ],    "cotton_repo_commits": [      "_born",      "_hlc",      "author_login",      "author_name",      "authored_at",      "created_at",      "html_url",      "id",      "message",      "parents",      "repo_id",      "sha",      "updated_at",      "workspace_id"    ],    "cotton_repo_issues": [      "_born",      "_hlc",      "author",      "body",      "closed_at",      "comments_count",      "created_at",      "html_url",      "id",      "labels",      "number",      "remote_created_at",      "remote_id",      "remote_updated_at",      "repo_id",      "state",      "title",      "updated_at",      "workspace_id"    ],    "cotton_repo_jobs": [      "_born",      "_hlc",      "cancel_requested",      "conclusion",      "created_at",      "finished_at",      "id",      "index_in_run",      "log_ack",      "log_key",      "log_lines",      "name",      "needs_json",      "outputs_json",      "requeues",      "run_id",      "runner_uuid",      "runs_on",      "started_at",      "status",      "steps_json",      "summary",      "task_id",      "timeout_minutes",      "token_digest",      "updated_at",      "workspace_id"    ],    "cotton_repo_labels": [      "_born",      "_hlc",      "color",      "created_at",      "description",      "id",      "name",      "remote_id",      "repo_id",      "updated_at",      "workspace_id"    ],    "cotton_repo_merge_queue": [      "_born",      "_hlc",      "base_ref",      "created_at",      "enqueued_at",      "failures",      "finished_at",      "head_sha",      "id",      "landed_sha",      "pull_id",      "pull_number",      "reason",      "repo_id",      "state",      "train_base_sha",      "train_number",      "train_run_id",      "train_squash_sha",      "train_tip_sha",      "updated_at",      "workspace_id"    ],    "cotton_repo_pulls": [      "_born",      "_hlc",      "additions",      "author",      "base_ref",      "body",      "changed_files",      "checks",      "checks_state",      "closed_at",      "comments_count",      "created_at",      "deletions",      "draft",      "head_ref",      "head_sha",      "html_url",      "id",      "labels",      "merge_commit_sha",      "mergeable",      "merged",      "merged_at",      "number",      "remote_created_at",      "remote_id",      "remote_updated_at",      "repo_id",      "review_comments_count",      "state",      "title",      "updated_at",      "workspace_id"    ],    "cotton_repo_releases": [      "_born",      "_hlc",      "assets_json",      "author",      "body",      "created_at",      "draft",      "html_url",      "id",      "name",      "prerelease",      "published_at",      "remote_id",      "repo_id",      "synced_at",      "tag",      "target_sha",      "updated_at",      "workspace_id"    ],    "cotton_repo_rules": [      "_born",      "_hlc",      "allow_push",      "block_outdated",      "branch",      "created_at",      "id",      "repo_id",      "required_approvals",      "required_contexts_json",      "updated_at",      "workspace_id"    ],    "cotton_repo_runners": [      "_born",      "_hlc",      "created_at",      "credential_id",      "device_id",      "id",      "labels_json",      "last_seen_at",      "name",      "repo_id",      "updated_at",      "uuid",      "version",      "workspace_id"    ],    "cotton_repo_runs": [      "_born",      "_hlc",      "conclusion",      "created_at",      "event",      "finished_at",      "id",      "index_in_repo",      "pull_id",      "ref",      "repo_id",      "sha",      "started_at",      "status",      "triggered_by",      "updated_at",      "workflow",      "workflow_name",      "workspace_id"    ],    "cotton_repo_vars": [      "_born",      "_hlc",      "created_at",      "id",      "name",      "repo_id",      "updated_at",      "value",      "workspace_id"    ],    "cotton_repos": [      "_born",      "_hlc",      "bundle_state",      "created_at",      "default_branch",      "description",      "head_sha",      "held",      "held_at",      "host",      "id",      "issues_cursor",      "key",      "kind",      "last_bundle_error",      "last_error",      "name",      "open_issues",      "open_pulls",      "origin",      "owner",      "pulls_cursor",      "sync_state",      "synced_at",      "updated_at",      "web_url",      "workspace_id"    ],    "cotton_revocations": [      "_born",      "_hlc",      "actor",      "id",      "p_sig",      "reason",      "replaced_by",      "revoked_at",      "signer_person",      "subject_id",      "subject_table",      "successor",      "workspace_id"    ],    "cotton_screenplay_characters": [      "_born",      "_hlc",      "age",      "aliases",      "arc",      "bio",      "casting_thoughts",      "created_at",      "id",      "name",      "picture_photo_id",      "screenplay_id",      "trashed_at",      "updated_at",      "want",      "workspace_id"    ],    "cotton_screenplay_documents": [      "_born",      "_hlc",      "body",      "created_at",      "id",      "kind",      "screenplay_id",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_screenplay_draft_scenes": [      "_born",      "_hlc",      "body",      "created_at",      "draft_id",      "heading",      "id",      "position",      "purpose",      "scene_id",      "updated_at",      "workspace_id"    ],    "cotton_screenplay_drafts": [      "_born",      "_hlc",      "created_at",      "id",      "name",      "screenplay_id",      "updated_at",      "workspace_id"    ],    "cotton_screenplay_scenes": [      "_born",      "_hlc",      "act",      "archived_at",      "body",      "characters_in_scene",      "characters_set_by",      "created_at",      "heading",      "id",      "location",      "position",      "purpose",      "screenplay_id",      "sequence",      "status",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_screenplays": [      "_born",      "_hlc",      "archived_at",      "created_at",      "id",      "logline",      "title",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_secret_placements": [      "_born",      "_hlc",      "applied_at",      "applied_hash",      "apply_problem",      "created_at",      "device_id",      "env_name",      "format",      "id",      "mode",      "path",      "secret_id",      "updated_at",      "workspace_id"    ],    "cotton_secrets": [      "_born",      "_hlc",      "changed_at",      "created_at",      "expires_at",      "favourite_at",      "hint",      "history_enc",      "id",      "kind",      "last_used_at",      "name",      "passkey_id",      "service",      "site",      "trashed_at",      "updated_at",      "username",      "uses",      "value_enc",      "vmk_version",      "workspace_id"    ],    "cotton_serving_machine": [      "_born",      "_hlc",      "author_id",      "backup_access_key_id",      "confirmed_by",      "device_credential_id",      "epoch",      "id",      "relay_key",      "since",      "start_positions",      "workspace_id"    ],    "cotton_session_messages": [      "_born",      "_hlc",      "body",      "claimed_at",      "claimed_by_session_id",      "created_at",      "done_at",      "from_kind",      "from_session_id",      "id",      "kind",      "media",      "project_id",      "reply_to",      "request_ref",      "status",      "thought_id",      "to_kind",      "to_session_id",      "updated_at",      "workspace_id"    ],    "cotton_session_tasks": [      "_born",      "_hlc",      "created_at",      "id",      "seq",      "session_id",      "state",      "text",      "updated_at",      "workspace_id"    ],    "cotton_sessions": [      "_born",      "_hlc",      "account",      "branch",      "chosen_by",      "claimed_at",      "created_at",      "cwd",      "device_id",      "ended_at",      "error",      "exit_code",      "external_id",      "hold_reason",      "host_owned",      "id",      "kind",      "last_active_at",      "last_line",      "listened_at",      "machine",      "model",      "parent_session_id",      "permission_mode",      "project_id",      "prompt",      "prompt_count",      "repo_url",      "report_message_id",      "requested_device_id",      "shipped",      "started_at",      "state",      "state_at",      "summary",      "title",      "todo_database",      "todo_id",      "tool",      "transcript_ref",      "trashed_at",      "turn_count",      "updated_at",      "waiting_kind",      "waiting_ref",      "workspace_id"    ],    "cotton_storage_rules": [      "_born",      "_hlc",      "created_at",      "device_id",      "freeable_bytes",      "held_bytes",      "held_count",      "id",      "keep_rule",      "measured_at",      "tool",      "total_count",      "updated_at",      "workspace_id"    ],    "cotton_stories": [      "_born",      "_hlc",      "account",      "caption",      "created_at",      "expires_at",      "external_id",      "id",      "kept",      "kind",      "media_content_type",      "media_dropped_at",      "media_key",      "person_id",      "posted_at",      "seen_at",      "sender",      "sender_label",      "source",      "workspace_id"    ],    "cotton_table_definitions": [      "_born",      "_hlc",      "builtin",      "builtin_hash",      "builtin_revision",      "builtin_stamp",      "created_at",      "definition",      "id",      "instructions_edited",      "updated_at",      "workspace_id"    ],    "cotton_theme_definitions": [      "_born",      "_hlc",      "builtin",      "builtin_hash",      "builtin_revision",      "builtin_stamp",      "created_at",      "definition",      "id",      "updated_at",      "workspace_id"    ],    "cotton_thought_attachments": [      "_born",      "_hlc",      "caption",      "created_at",      "id",      "position",      "record_id",      "record_kind",      "thought_id",      "updated_at",      "workspace_id"    ],    "cotton_todo_recurrences": [      "_born",      "_hlc",      "created_at",      "dtstart",      "id",      "materialized_until",      "notes",      "paused",      "priority",      "rrule",      "source_inbox_id",      "title",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_todos": [      "_born",      "_hlc",      "completed_at",      "created_at",      "due_at",      "id",      "label",      "notes",      "occurrence_at",      "priority",      "recurrence_id",      "snoozed_until",      "source_inbox_id",      "status",      "title",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_tool_assets": [      "_born",      "_hlc",      "bytes",      "created_at",      "id",      "name",      "tool_id",      "updated_at",      "workspace_id"    ],    "cotton_tool_definitions": [      "_born",      "_hlc",      "builtin",      "created_at",      "definition",      "id",      "instructions_edited",      "updated_at",      "workspace_id"    ],    "cotton_toolkits": [      "_born",      "_hlc",      "created_at",      "description",      "id",      "name",      "picture",      "position",      "shipped",      "tools",      "trashed_at",      "updated_at",      "workspace_id"    ],    "cotton_undos": [      "_born",      "_hlc",      "actor",      "at",      "change_id",      "id",      "undo_change_id",      "workspace_id"    ],    "cotton_usage": [      "_born",      "_hlc",      "at",      "device",      "id",      "kind",      "record",      "record_byline",      "tool",      "view",      "workspace_id"    ],    "cotton_vault_keys": [      "_born",      "_hlc",      "created_at",      "device_id",      "id",      "public_key",      "updated_at",      "vmk_version",      "workspace_id",      "wrapped_vmk"    ],    "cotton_vault_retired_keys": [      "_born",      "_hlc",      "actor",      "id",      "retired_at",      "under_kcv",      "under_version",      "version",      "workspace_id",      "wrapped"    ],    "cotton_vault_state": [      "_born",      "_hlc",      "created_at",      "rotated_at",      "updated_at",      "vmk_version",      "workspace_id"    ],    "cotton_videos": [      "_born",      "_hlc",      "aesthetic_score",      "camera_make",      "camera_model",      "caption",      "content_type",      "created_at",      "curation_score",      "duration_ms",      "favourite",      "height",      "id",      "key",      "labels",      "latitude",      "longitude",      "orientation",      "origin_handle",      "original_filename",      "phash",      "place_city",      "place_country",      "place_name",      "place_region",      "poster_key",      "preview",      "review_at",      "review_by",      "review_note",      "sha256",      "size_bytes",      "subtypes",      "summary",      "summary_at",      "summary_by",      "taken_at",      "taken_offset",      "trashed_at",      "updated_at",      "width",      "workspace_id"    ],    "cotton_voice_vocabulary": [      "_born",      "_hlc",      "created_at",      "id",      "last_used_at",      "source",      "term",      "use_count",      "workspace_id"    ],    "cotton_workspaces": [      "_born",      "_hlc",      "city_lat",      "city_lon",      "city_name",      "created_at",      "front_door",      "front_door_address",      "id",      "kind",      "msg_import_self_names",      "name",      "namespace",      "owner_person_id",      "owner_user_id",      "relay_domain",      "relay_name",      "relay_roster",      "relay_tunnel_host",      "session_permission_default"    ]  }}