Cotton code
1865 lines · 47.2 KB · JSONRaw
[  {    "table": "account_usage_sample",    "from": "cotton_account_usage_samples",    "key": "id",    "workspace": true,    "columns": {      "account_id": "account_id",      "sampled_at": "sampled_at",      "five_hour_pct": "five_hour_pct",      "weekly_pct": "weekly_pct"    }  },  {    "table": "agent_account",    "from": "cotton_agent_accounts",    "key": "id",    "workspace": true,    "columns": {      "provider": "provider",      "email": "email",      "label": "label",      "seen_at": "seen_at",      "seen_on_device_id": "seen_on_device_id"    }  },  {    "table": "alarm",    "from": "cotton_alarms",    "key": "id",    "workspace": true,    "columns": {      "label": "label",      "hour": "hour",      "minute": "minute",      "repeat_days": "repeat_days",      "enabled": "enabled",      "sound": "sound",      "trashed_at": "trashed_at"    }  },  {    "table": "album",    "from": "cotton_media_albums",    "key": "id",    "workspace": true,    "columns": {      "kind": "kind",      "state": "state",      "decided_at": "decided_at",      "title": "title",      "title_by": "title_by",      "starts_at": "starts_at",      "ends_at": "ends_at",      "home_label": "home_label",      "cover_id": "cover_id",      "origin_handle": "origin_handle",      "trashed_at": "trashed_at"    }  },  {    "table": "album_item",    "from": "cotton_media_album_items",    "key": "id",    "workspace": true,    "columns": {      "album_id": "album_id",      "record_kind": "record_kind",      "record_id": "record_id",      "added_by": "added_by",      "sort_at": "sort_at",      "origin_handle": "origin_handle"    }  },  {    "table": "assistant_run",    "from": "cotton_assistant_runs",    "key": "id",    "workspace": true,    "columns": {      "source_kind": "source_kind",      "source_id": "source_id",      "record_kind": "record_kind",      "record_id": "record_id",      "session_id": "session_id",      "class": "class",      "state": "state",      "task": "task",      "receipt": "receipt",      "turns": "turns",      "input_tokens": "input_tokens",      "output_tokens": "output_tokens",      "cost_usd": "cost_usd",      "result_note_id": "result_note_id",      "stopped_reason": "stopped_reason",      "error": "error",      "queued_at": "queued_at",      "started_at": "started_at",      "finished_at": "finished_at"    }  },  {    "table": "blocked_sender",    "from": "cotton_blocked_senders",    "key": "id",    "workspace": true,    "columns": {      "address": "address"    }  },  {    "table": "call",    "from": "cotton_call_log",    "key": "id",    "workspace": true,    "columns": {      "source": "source",      "external_id": "external_id",      "provider": "provider",      "direction": "direction",      "outcome": "outcome",      "started_at": "started_at",      "duration_s": "duration_s",      "handle": "handle",      "contact_id": "contact_id",      "person_id": "person_id",      "device": "device",      "meta": "meta"    }  },  {    "table": "code_credential",    "from": "cotton_code_credentials",    "key": "id",    "workspace": true,    "columns": {      "device_id": "device_id",      "name": "name",      "scope": "scope",      "expires_at": "expires_at",      "revoked_at": "revoked_at",      "last_used_at": "last_used_at",      "token_digest": "token_digest",      "minted_by": "minted_by",      "read_only": "read_only"    }  },  {    "table": "code_runner",    "from": "cotton_machine_runners",    "key": "id",    "workspace": true,    "columns": {      "device_id": "device_id",      "enabled": "enabled",      "labels_json": "labels_json",      "capacity": "capacity",      "ai_levels": "ai_levels"    }  },  {    "table": "comment",    "from": "cotton_comments",    "key": "id",    "workspace": true,    "columns": {      "record_kind": "record_kind",      "record_id": "record_id",      "parent_id": "parent_id",      "body": "body",      "author_kind": "author_kind",      "author_user_id": "author_user_id",      "author_label": "author_label",      "anchor": "anchor",      "resolved_at": "resolved_at",      "resolved_by_kind": "resolved_by_kind",      "resolved_by_label": "resolved_by_label",      "kind": "kind",      "trashed_at": "trashed_at"    }  },  {    "table": "decision",    "from": "cotton_decisions",    "key": "id",    "workspace": true,    "columns": {      "title": "title",      "why": "why",      "pull": "pull",      "decided_by": "decided_by",      "trashed_at": "trashed_at"    }  },  {    "table": "dev_job",    "from": "cotton_dev_jobs",    "key": "id",    "workspace": true,    "columns": {      "device_id": "device_id",      "command": "command",      "cwd": "cwd",      "timeout_seconds": "timeout_seconds",      "state": "state",      "exit_code": "exit_code",      "failure": "failure",      "log_path": "log_path",      "log_bytes": "log_bytes",      "log_lines": "log_lines",      "output_tail": "output_tail",      "claimed_at": "claimed_at",      "finished_at": "finished_at"    }  },  {    "table": "document",    "from": "cotton_documents",    "key": "id",    "workspace": true,    "columns": {      "title": "title",      "original_name": "original_name",      "mime": "mime",      "byte_size": "byte_size",      "sha256": "sha256",      "storage_path": "storage_path",      "decrypted_path": "decrypted_path",      "password": "password",      "page_count": "page_count",      "status": "status",      "failed_stage": "failed_stage",      "error_code": "error_code",      "status_changed_at": "status_changed_at",      "doc_type": "doc_type",      "document_date": "document_date",      "period_start": "period_start",      "period_end": "period_end",      "issuer": "issuer",      "summary": "summary",      "facts": "facts",      "text_extracted": "text_extracted",      "source": "source",      "mcp_token_id": "mcp_token_id",      "origin_handle": "origin_handle",      "secret_id": "secret_id",      "trashed_at": "trashed_at"    }  },  {    "table": "document_page",    "from": "cotton_document_pages",    "key": "id",    "workspace": true,    "columns": {      "document_id": "document_id",      "page": "page",      "text": "text"    }  },  {    "table": "duplicate",    "from": "cotton_media_duplicates",    "key": "id",    "workspace": true,    "columns": {      "record_kind": "record_kind",      "keep_id": "keep_id",      "copy_id": "copy_id",      "distance": "distance",      "method": "method",      "state": "state",      "decided_at": "decided_at"    }  },  {    "table": "email",    "from": "cotton_emails",    "key": "id",    "workspace": true,    "columns": {      "thread_id": "thread_id",      "external_id": "external_id",      "subject": "subject",      "from_email": "from_email",      "from_name": "from_name",      "recipients": "recipients",      "sent_at": "sent_at",      "body": "body",      "snippet": "snippet",      "attachments": "attachments",      "gmail_id": "gmail_id",      "gmail_account": "gmail_account",      "labels": "labels",      "unread": "unread",      "starred": "starred",      "in_inbox": "in_inbox",      "trashed_at": "trashed_at",      "sync_state": "sync_state",      "account": "account",      "to_line": "to_line",      "cc_line": "cc_line",      "direction": "direction",      "message_id": "message_id",      "message_refs": "message_refs",      "list_unsubscribe": "list_unsubscribe",      "list_unsubscribe_post": "list_unsubscribe_post",      "list_id": "list_id",      "precedence": "precedence",      "auto_submitted": "auto_submitted",      "gmail_category": "gmail_category",      "archived_at": "archived_at"    }  },  {    "table": "email_participant",    "from": "cotton_email_participants",    "key": "id",    "workspace": true,    "columns": {      "thread_id": "thread_id",      "email": "email",      "display_name": "display_name",      "role": "role"    }  },  {    "table": "email_sender",    "from": "cotton_email_senders",    "key": "id",    "workspace": true,    "columns": {      "address": "address",      "kind": "kind",      "written_to": "written_to",      "decided_by": "decided_by",      "verdict": "verdict",      "reason": "reason",      "decided_at": "decided_at"    }  },  {    "table": "email_thread",    "from": "cotton_email_threads",    "key": "id",    "workspace": true,    "columns": {      "external_key": "external_key",      "subject": "subject",      "first_at": "first_at",      "last_at": "last_at",      "email_count": "email_count",      "summary": "summary",      "summary_updated_at": "summary_updated_at",      "summary_by": "summary_by",      "trashed_at": "trashed_at",      "sender_address": "sender_address",      "sender_kind": "sender_kind",      "record_kind": "record_kind",      "amount_minor": "amount_minor",      "currency": "currency",      "merchant": "merchant",      "record_on": "record_on",      "reference": "reference",      "record_reason": "record_reason"    }  },  {    "table": "event",    "from": "cotton_events",    "key": "id",    "workspace": false,    "columns": {      "collection_id": "collection_id",      "title": "title",      "notes": "notes",      "starts_at": "starts_at",      "ends_at": "ends_at",      "all_day": "all_day",      "rrule": "rrule",      "location": "location",      "source_inbox_id": "source_inbox_id",      "gcal_id": "gcal_id",      "gcal_etag": "gcal_etag",      "sync_state": "sync_state",      "organizer_is_self": "organizer_is_self",      "my_response": "my_response",      "series_id": "series_id",      "original_starts_at": "original_starts_at",      "exdates": "exdates",      "trashed_at": "trashed_at",      "erase_requested_at": "erase_requested_at",      "ical_uid": "ical_uid",      "account": "account",      "on_google": "on_google",      "event_place": "event_place",      "country": "country",      "timezone": "timezone"    }  },  {    "table": "event_attendee",    "from": "cotton_event_attendees",    "key": "id",    "workspace": false,    "columns": {      "event_id": "event_id",      "email": "email",      "phone": "phone",      "display_name": "display_name",      "response": "response"    }  },  {    "table": "evidence",    "from": "cotton_money_evidence",    "key": "id",    "workspace": true,    "columns": {      "transaction_id": "transaction_id",      "kind": "kind",      "ref_id": "ref_id",      "excerpt": "excerpt",      "source_label": "source_label",      "attached_by": "attached_by",      "attached_by_label": "attached_by_label",      "trashed_at": "trashed_at"    }  },  {    "table": "face",    "from": "cotton_media_faces",    "key": "id",    "workspace": true,    "columns": {      "record_kind": "record_kind",      "record_id": "record_id",      "source": "source",      "source_id": "source_id",      "x": "x",      "y": "y",      "w": "w",      "h": "h",      "quality": "quality",      "cluster_id": "cluster_id",      "person_id": "person_id",      "suggested_person_id": "suggested_person_id",      "suggested_distance": "suggested_distance",      "suggestion_dismissed_at": "suggestion_dismissed_at",      "embedding": "embedding",      "embedding_model": "embedding_model",      "person_by": "person_by"    }  },  {    "table": "feedback",    "from": "cotton_feedback",    "key": "id",    "workspace": true,    "columns": {      "image_sha256": "image_sha256",      "image_ext": "image_ext",      "x": "x",      "y": "y",      "body": "body",      "author_kind": "author_kind",      "author_user_id": "author_user_id",      "author_label": "author_label",      "person_id": "person_id",      "same_as": "same_as",      "share_id": "share_id",      "app": "app",      "context": "context",      "status": "status",      "resolved_at": "resolved_at",      "resolved_by_kind": "resolved_by_kind",      "resolved_by_label": "resolved_by_label",      "resolution_note": "resolution_note",      "parent_id": "parent_id"    }  },  {    "table": "filing_proposal",    "from": "cotton_filing_proposals",    "key": "id",    "workspace": true,    "columns": {      "owner": "owner",      "session": "session",      "source": "source",      "destination": "destination",      "kind": "kind",      "candidates": "candidates",      "arrivals": "arrivals",      "revisions": "revisions",      "payload": "payload",      "reason": "reason",      "status": "status",      "decided_at": "decided_at",      "answer": "answer"    }  },  {    "table": "goal",    "from": "cotton_goals",    "key": "id",    "workspace": true,    "columns": {      "title": "title",      "why": "why",      "target_date": "target_date",      "status": "status",      "achieved_at": "achieved_at",      "sort_order": "sort_order",      "trashed_at": "trashed_at"    }  },  {    "table": "group_member",    "from": "cotton_group_members",    "key": "id",    "workspace": true,    "columns": {      "group": "group_id",      "record_id": "record_id",      "place": "place"    }  },  {    "table": "issue",    "from": "cotton_repo_issues",    "key": "id",    "workspace": true,    "columns": {      "repo_id": "repo_id",      "number": "number",      "remote_id": "remote_id",      "title": "title",      "body": "body",      "state": "state",      "author": "author",      "labels": "labels",      "comments_count": "comments_count",      "html_url": "html_url",      "remote_created_at": "remote_created_at",      "remote_updated_at": "remote_updated_at",      "closed_at": "closed_at"    }  },  {    "table": "location",    "from": "cotton_locations",    "key": "id",    "workspace": true,    "columns": {      "name": "name",      "address": "address",      "lat": "lat",      "lng": "lng",      "note": "note",      "source_inbox_id": "source_inbox_id",      "archived_at": "archived_at",      "trashed_at": "trashed_at",      "place": "place",      "place_id": "place_id",      "country": "country",      "timezone": "timezone",      "near": "near"    }  },  {    "table": "meeting",    "from": "cotton_meetings",    "key": "id",    "workspace": true,    "columns": {      "title": "title",      "status": "status",      "source": "source",      "started_at": "started_at",      "ended_at": "ended_at",      "duration_seconds": "duration_seconds",      "language": "language",      "event_id": "event_id",      "speakers": "speakers",      "summary_md": "summary_md",      "decisions": "decisions",      "vendor": "vendor",      "vendor_job_id": "vendor_job_id",      "poll_attempts": "poll_attempts",      "status_changed_at": "status_changed_at",      "audio_deleted_at": "audio_deleted_at",      "failed_stage": "failed_stage",      "error_code": "error_code",      "segments": "segments",      "trashed_at": "trashed_at",      "event_database": "event_database"    }  },  {    "table": "meeting_utterance",    "from": "cotton_meeting_utterances",    "key": "id",    "workspace": false,    "columns": {      "meeting_id": "meeting_id",      "seq": "seq",      "speaker_label": "speaker_label",      "t0_ms": "t0_ms",      "t1_ms": "t1_ms",      "text": "text"    }  },  {    "table": "memory",    "from": "cotton_memories",    "key": "id",    "workspace": true,    "columns": {      "slug": "slug",      "title": "title",      "body": "body",      "status": "status",      "machine": "machine",      "visibility": "visibility",      "origin_kind": "origin_kind",      "origin_label": "origin_label",      "source": "source",      "superseded_by": "superseded_by",      "source_external_id": "source_external_id",      "archived_at": "archived_at",      "reviewed_at": "reviewed_at"    }  },  {    "table": "message",    "from": "cotton_msg_messages",    "key": "id",    "workspace": true,    "columns": {      "thread_id": "thread_id",      "direction": "direction",      "channel": "channel",      "origin": "origin",      "body": "body",      "media": "media",      "external_id": "external_id",      "sent_at": "sent_at",      "read_at": "read_at",      "reply_to_id": "reply_to_id",      "reply_to_external_id": "reply_to_external_id",      "reactions": "reactions",      "meta": "meta",      "sender_contact_id": "sender_contact_id",      "sender_participant_id": "sender_participant_id",      "seq": "seq",      "edited_at": "edited_at",      "deleted_at": "deleted_at",      "forward_of_id": "forward_of_id",      "mentions": "mentions",      "starred_at": "starred_at",      "hidden_at": "hidden_at",      "send_state": "send_state",      "send_error": "send_error",      "send_attempts": "send_attempts",      "trashed_at": "trashed_at"    }  },  {    "table": "message_contact",    "from": "cotton_msg_contacts",    "key": "id",    "workspace": true,    "columns": {      "phone_e164": "phone_e164",      "display_name": "display_name",      "person_id": "person_id",      "auth_user_id": "auth_user_id",      "vip": "vip",      "muted": "muted",      "blocked": "blocked",      "on_cotton_at": "on_cotton_at",      "avatar_key": "avatar_key"    }  },  {    "table": "message_contact_handle",    "from": "cotton_msg_contact_handles",    "key": "id",    "workspace": true,    "columns": {      "contact_id": "contact_id",      "kind": "kind",      "value": "value"    }  },  {    "table": "message_reaction",    "from": "cotton_msg_reactions",    "key": "id",    "workspace": true,    "columns": {      "thread_id": "thread_id",      "message_id": "message_id",      "actor": "actor",      "emoji": "emoji"    }  },  {    "table": "message_receipt",    "from": "cotton_msg_receipts",    "key": "id",    "workspace": true,    "columns": {      "thread_id": "thread_id",      "phone": "phone",      "delivered_seq": "delivered_seq",      "read_seq": "read_seq"    }  },  {    "table": "message_settings",    "from": "cotton_msg_owner_settings",    "key": "workspace_id",    "workspace": true,    "columns": {      "handle": "handle",      "display_name": "display_name",      "avatar_url": "avatar_url",      "availability_copy": "availability_copy",      "allow_new_contacts": "allow_new_contacts",      "app_download_url": "app_download_url",      "read_receipts": "read_receipts",      "discoverable": "discoverable",      "last_seen_visible": "last_seen_visible",      "share_requests": "share_requests"    }  },  {    "table": "money_account",    "from": "cotton_money_accounts",    "key": "id",    "workspace": true,    "columns": {      "kind": "kind",      "subtype": "subtype",      "name": "name",      "counterparty_person_id": "counterparty_person_id",      "currency": "currency",      "institution": "institution",      "number_mask": "number_mask",      "is_default": "is_default",      "is_pooled": "is_pooled",      "archived_at": "archived_at",      "trashed_at": "trashed_at"    }  },  {    "table": "mood",    "from": "cotton_moods",    "key": "id",    "workspace": true,    "columns": {      "at": "at",      "line": "line",      "emotions": "emotions",      "emotions_by": "emotions_by",      "local_day": "local_day",      "trashed_at": "trashed_at"    }  },  {    "table": "news_edition",    "from": "cotton_news_editions",    "key": "id",    "workspace": true,    "columns": {      "status": "status",      "trigger_kind": "trigger_kind",      "edition_label": "edition_label",      "covered_from": "covered_from",      "covered_to": "covered_to",      "story_count": "story_count",      "read_minutes": "read_minutes",      "quiet": "quiet",      "notes": "notes",      "model": "model",      "opened_at": "opened_at",      "status_changed_at": "status_changed_at",      "failed_stage": "failed_stage",      "error_code": "error_code"    }  },  {    "table": "news_seen",    "from": "cotton_news_seen",    "key": "id",    "workspace": true,    "columns": {      "topic_id": "topic_id",      "key": "key",      "title_hash": "title_hash",      "url": "url",      "source": "source",      "first_seen_at": "first_seen_at",      "story_id": "story_id"    }  },  {    "table": "news_settings",    "from": "cotton_news_settings",    "key": "workspace_id",    "workspace": true,    "columns": {      "edition_times": "edition_times",      "timezone": "timezone",      "stale_after_minutes": "stale_after_minutes",      "stale_refresh": "stale_refresh",      "notify": "notify",      "next_edition_at": "next_edition_at"    }  },  {    "table": "news_story",    "from": "cotton_news_stories",    "key": "id",    "workspace": false,    "columns": {      "edition_id": "edition_id",      "topic_id": "topic_id",      "rank": "rank",      "headline": "headline",      "lede": "lede",      "bullets": "bullets",      "sources": "sources",      "why_care": "why_care",      "read_minutes": "read_minutes",      "opened_at": "opened_at",      "feedback": "feedback"    }  },  {    "table": "news_topic",    "from": "cotton_news_topics",    "key": "id",    "workspace": true,    "columns": {      "name": "name",      "brief": "brief",      "exclusions": "exclusions",      "kind": "kind",      "source_url": "source_url",      "active": "active",      "paused_reason": "paused_reason",      "unopened_streak": "unopened_streak",      "last_new_at": "last_new_at",      "sort_order": "sort_order",      "trashed_at": "trashed_at"    }  },  {    "table": "note",    "from": "cotton_notes",    "key": "id",    "workspace": true,    "columns": {      "kind": "kind",      "title": "title",      "body": "body",      "journal_date": "journal_date",      "project": "project_id",      "author_kind": "author_kind",      "author_label": "author_label",      "managed_by": "managed_by",      "external_id": "external_id",      "pinned": "pinned",      "archived_at": "archived_at",      "trashed_at": "trashed_at",      "published_at": "published_at"    }  },  {    "table": "note_attachment",    "from": "cotton_note_attachments",    "key": "id",    "workspace": true,    "columns": {      "note_id": "note_id",      "record_kind": "record_kind",      "record_id": "record_id",      "position": "position",      "caption": "caption",      "origin_handle": "origin_handle"    }  },  {    "table": "outage",    "from": "cotton_outages",    "key": "id",    "workspace": true,    "columns": {      "kind": "kind",      "condition": "condition",      "machine": "machine",      "title": "title",      "effect": "effect",      "doing": "doing",      "started_at": "started_at",      "ended_at": "ended_at",      "told_open_at": "told_open_at",      "told_close_at": "told_close_at"    }  },  {    "table": "page",    "from": "cotton_pages",    "key": "id",    "workspace": true,    "columns": {      "url": "url",      "host": "host",      "title": "title",      "read_at": "read_at",      "source_inbox_id": "source_inbox_id",      "archived_at": "archived_at",      "text_state": "text_state",      "state": "state",      "text": "text",      "trashed_at": "trashed_at"    }  },  {    "table": "person",    "from": "cotton_people",    "key": "id",    "workspace": true,    "columns": {      "full_name": "full_name",      "org": "org",      "role_title": "role_title",      "city": "city",      "summary": "summary",      "summary_updated_at": "summary_updated_at",      "summary_by": "summary_by",      "contact_source": "contact_source",      "device_contact_id": "device_contact_id",      "archived_at": "archived_at",      "birth_month": "birth_month",      "birth_day": "birth_day",      "birth_year": "birth_year",      "timezone": "timezone",      "avatar_url": "avatar_url",      "avatar_key": "avatar_key",      "device_contact_snapshot": "device_contact_snapshot",      "city_filled_at": "city_filled_at",      "avatar_photo_id": "avatar_photo_id",      "trashed_at": "trashed_at",      "language": "language",      "face_embedding": "face_embedding",      "face_embedding_model": "face_embedding_model",      "face_embedding_from": "face_embedding_from",      "city_place": "city_place",      "country": "country"    }  },  {    "table": "person_handle",    "from": "cotton_person_handles",    "key": "id",    "workspace": true,    "columns": {      "person_id": "person_id",      "kind": "kind",      "value": "value",      "normalised": "normalised",      "source": "source",      "verified_at": "verified_at",      "position": "position",      "trashed_at": "trashed_at"    }  },  {    "table": "person_language",    "from": "cotton_person_languages",    "key": "id",    "workspace": true,    "columns": {      "person_id": "person_id",      "language": "language",      "proficiency": "proficiency",      "position": "position",      "trashed_at": "trashed_at"    }  },  {    "table": "person_note",    "from": "cotton_person_notes",    "key": "id",    "workspace": false,    "columns": {      "person_id": "person_id",      "body": "body",      "noted_at": "noted_at",      "source_inbox_id": "source_inbox_id"    }  },  {    "table": "person_suggestion",    "from": "cotton_person_suggestions",    "key": "id",    "workspace": true,    "columns": {      "person_id": "person_id",      "contact_id": "contact_id",      "candidate_id": "candidate_id",      "reason": "reason",      "score": "score",      "state": "state",      "decided_at": "decided_at"    }  },  {    "table": "photo",    "from": "cotton_photos",    "key": "id",    "workspace": true,    "columns": {      "key": "key",      "sha256": "sha256",      "content_type": "content_type",      "size_bytes": "size_bytes",      "width": "width",      "height": "height",      "taken_at": "taken_at",      "preview": "preview",      "caption": "caption",      "summary": "summary",      "summary_by": "summary_by",      "summary_at": "summary_at",      "review_note": "review_note",      "review_by": "review_by",      "review_at": "review_at",      "taken_offset": "taken_offset",      "latitude": "latitude",      "longitude": "longitude",      "place_name": "place_name",      "place_city": "place_city",      "place_region": "place_region",      "place_country": "place_country",      "camera_make": "camera_make",      "camera_model": "camera_model",      "orientation": "orientation",      "favourite": "favourite",      "subtypes": "subtypes",      "original_filename": "original_filename",      "aesthetic_score": "aesthetic_score",      "curation_score": "curation_score",      "labels": "labels",      "phash": "phash",      "ocr_text": "ocr_text",      "is_utility": "is_utility",      "origin_handle": "origin_handle",      "trashed_at": "trashed_at",      "image_embedding": "image_embedding",      "image_embedding_model": "image_embedding_model"    }  },  {    "table": "placement_proposal",    "from": "cotton_placement_proposals",    "key": "id",    "workspace": true,    "columns": {      "title": "title",      "items": "items",      "status": "status",      "decided_at": "decided_at"    }  },  {    "table": "post",    "from": "cotton_posts",    "key": "id",    "workspace": true,    "columns": {      "source": "source",      "account": "account",      "external_id": "external_id",      "saved": "saved",      "author_handle": "author_handle",      "author_name": "author_name",      "person_id": "person_id",      "caption": "caption",      "media": "media",      "posted_at": "posted_at",      "saved_at": "saved_at",      "permalink": "permalink"    }  },  {    "table": "project",    "from": "cotton_memory_projects",    "key": "id",    "workspace": true,    "columns": {      "slug": "slug",      "name": "name",      "repos": "repos",      "description": "description",      "summary_by": "summary_by",      "summary_updated_at": "summary_updated_at",      "status": "status",      "brand": "brand",      "trashed_at": "trashed_at"    }  },  {    "table": "project_link",    "from": "cotton_project_links",    "key": "id",    "workspace": true,    "columns": {      "project": "project_id",      "record_kind": "record_kind",      "record_id": "record_id",      "pinned": "pinned",      "position": "position",      "note": "note",      "applied_by": "applied_by"    }  },  {    "table": "prompt",    "from": "cotton_prompts",    "key": "id",    "workspace": true,    "columns": {      "session": "session_id",      "project": "project_id",      "seq": "seq",      "ts": "ts",      "role": "role",      "text": "text"    }  },  {    "table": "pull",    "from": "cotton_repo_pulls",    "key": "id",    "workspace": true,    "columns": {      "repo_id": "repo_id",      "number": "number",      "remote_id": "remote_id",      "title": "title",      "body": "body",      "state": "state",      "merged": "merged",      "draft": "draft",      "author": "author",      "head_ref": "head_ref",      "head_sha": "head_sha",      "base_ref": "base_ref",      "mergeable": "mergeable",      "additions": "additions",      "deletions": "deletions",      "changed_files": "changed_files",      "comments_count": "comments_count",      "review_comments_count": "review_comments_count",      "labels": "labels",      "checks_state": "checks_state",      "checks": "checks",      "html_url": "html_url",      "remote_created_at": "remote_created_at",      "remote_updated_at": "remote_updated_at",      "merged_at": "merged_at",      "closed_at": "closed_at",      "merge_commit_sha": "merge_commit_sha"    }  },  {    "table": "record_group",    "from": "cotton_groups",    "key": "id",    "workspace": true,    "columns": {      "table_id": "table_id",      "name": "name",      "filter": "filter",      "position": "position",      "picture": "picture",      "deleted_at": "deleted_at",      "hidden": "hidden"    }  },  {    "table": "release",    "from": "cotton_repo_releases",    "key": "id",    "workspace": true,    "columns": {      "repo_id": "repo_id",      "tag": "tag",      "name": "name",      "body": "body",      "draft": "draft",      "prerelease": "prerelease",      "target_sha": "target_sha",      "author": "author",      "published_at": "published_at",      "assets_json": "assets_json",      "html_url": "html_url",      "remote_id": "remote_id",      "synced_at": "synced_at"    }  },  {    "table": "repo_bundle",    "from": "cotton_repo_bundles",    "key": "id",    "workspace": true,    "columns": {      "repo_id": "repo_id",      "object_key": "object_key",      "kind": "kind",      "basis_sha": "basis_sha",      "head_sha": "head_sha",      "refs_json": "refs_json",      "bytes": "bytes",      "sha256": "sha256",      "superseded_at": "superseded_at"    }  },  {    "table": "repo_clone",    "from": "cotton_repo_clones",    "key": "id",    "workspace": true,    "columns": {      "repo_id": "repo_id",      "device_id": "device_id",      "state": "state",      "sentence": "sentence"    }  },  {    "table": "repo_comment",    "from": "cotton_repo_comments",    "key": "id",    "workspace": true,    "columns": {      "repo_id": "repo_id",      "target_kind": "target_kind",      "target_number": "target_number",      "kind": "kind",      "remote_id": "remote_id",      "author": "author",      "body": "body",      "review_state": "review_state",      "path": "path",      "line": "line",      "html_url": "html_url",      "remote_created_at": "remote_created_at",      "remote_updated_at": "remote_updated_at"    }  },  {    "table": "repo_commit",    "from": "cotton_repo_commits",    "key": "id",    "workspace": true,    "columns": {      "repo_id": "repo_id",      "sha": "sha",      "message": "message",      "author_name": "author_name",      "author_login": "author_login",      "authored_at": "authored_at",      "parents": "parents",      "html_url": "html_url"    }  },  {    "table": "repo_job",    "from": "cotton_repo_jobs",    "key": "id",    "workspace": true,    "columns": {      "run_id": "run_id",      "index_in_run": "index_in_run",      "task_id": "task_id",      "name": "name",      "runs_on": "runs_on",      "needs_json": "needs_json",      "status": "status",      "conclusion": "conclusion",      "runner_uuid": "runner_uuid",      "timeout_minutes": "timeout_minutes",      "outputs_json": "outputs_json",      "steps_json": "steps_json",      "summary": "summary",      "log_lines": "log_lines",      "log_ack": "log_ack",      "log_key": "log_key",      "cancel_requested": "cancel_requested",      "requeues": "requeues",      "started_at": "started_at",      "finished_at": "finished_at",      "token_digest": "token_digest"    }  },  {    "table": "repo_label",    "from": "cotton_repo_labels",    "key": "id",    "workspace": true,    "columns": {      "repo_id": "repo_id",      "name": "name",      "color": "color",      "description": "description",      "remote_id": "remote_id"    }  },  {    "table": "repo_merge_queue",    "from": "cotton_repo_merge_queue",    "key": "id",    "workspace": true,    "columns": {      "repo_id": "repo_id",      "pull_id": "pull_id",      "pull_number": "pull_number",      "base_ref": "base_ref",      "head_sha": "head_sha",      "state": "state",      "failures": "failures",      "reason": "reason",      "train_number": "train_number",      "train_base_sha": "train_base_sha",      "train_tip_sha": "train_tip_sha",      "train_run_id": "train_run_id",      "landed_sha": "landed_sha",      "enqueued_at": "enqueued_at",      "finished_at": "finished_at",      "train_squash_sha": "train_squash_sha"    }  },  {    "table": "repo_rule",    "from": "cotton_repo_rules",    "key": "id",    "workspace": true,    "columns": {      "repo_id": "repo_id",      "branch": "branch",      "required_contexts_json": "required_contexts_json",      "required_approvals": "required_approvals",      "block_outdated": "block_outdated",      "allow_push": "allow_push"    }  },  {    "table": "repo_runner",    "from": "cotton_repo_runners",    "key": "id",    "workspace": true,    "columns": {      "repo_id": "repo_id",      "uuid": "uuid",      "name": "name",      "labels_json": "labels_json",      "device_id": "device_id",      "credential_id": "credential_id",      "version": "version",      "last_seen_at": "last_seen_at"    }  },  {    "table": "repo_var",    "from": "cotton_repo_vars",    "key": "id",    "workspace": true,    "columns": {      "repo_id": "repo_id",      "name": "name",      "value": "value"    }  },  {    "table": "repository",    "from": "cotton_repos",    "key": "id",    "workspace": true,    "columns": {      "key": "key",      "host": "host",      "owner": "owner",      "name": "name",      "kind": "kind",      "default_branch": "default_branch",      "description": "description",      "web_url": "web_url",      "open_pulls": "open_pulls",      "open_issues": "open_issues",      "sync_state": "sync_state",      "last_error": "last_error",      "synced_at": "synced_at",      "pulls_cursor": "pulls_cursor",      "issues_cursor": "issues_cursor",      "held": "held",      "origin": "origin",      "head_sha": "head_sha",      "held_at": "held_at",      "bundle_state": "bundle_state",      "last_bundle_error": "last_bundle_error"    }  },  {    "table": "run",    "from": "cotton_repo_runs",    "key": "id",    "workspace": true,    "columns": {      "repo_id": "repo_id",      "index_in_repo": "index_in_repo",      "workflow": "workflow",      "workflow_name": "workflow_name",      "event": "event",      "ref": "ref",      "sha": "sha",      "pull_id": "pull_id",      "status": "status",      "conclusion": "conclusion",      "triggered_by": "triggered_by",      "started_at": "started_at",      "finished_at": "finished_at"    }  },  {    "table": "secret",    "from": "cotton_secrets",    "key": "id",    "workspace": true,    "columns": {      "name": "name",      "kind": "kind",      "site": "site",      "username": "username",      "service": "service",      "value_enc": "value_enc",      "vmk_version": "vmk_version",      "expires_at": "expires_at",      "last_used_at": "last_used_at",      "favourite_at": "favourite_at",      "uses": "uses",      "passkey_id": "passkey_id",      "changed_at": "changed_at",      "history_enc": "history_enc",      "trashed_at": "trashed_at"    }  },  {    "table": "session",    "from": "cotton_sessions",    "key": "id",    "workspace": true,    "columns": {      "tool": "tool",      "external_id": "external_id",      "machine": "machine",      "project": "project_id",      "repo_url": "repo_url",      "branch": "branch",      "cwd": "cwd",      "started_at": "started_at",      "last_active_at": "last_active_at",      "ended_at": "ended_at",      "summary": "summary",      "title": "title",      "shipped": "shipped",      "turn_count": "turn_count",      "prompt_count": "prompt_count",      "transcript_ref": "transcript_ref",      "model": "model",      "account": "account",      "listened_at": "listened_at",      "device_id": "device_id",      "state": "state",      "state_at": "state_at",      "waiting_kind": "waiting_kind",      "waiting_ref": "waiting_ref",      "last_line": "last_line",      "exit_code": "exit_code",      "permission_mode": "permission_mode",      "host_owned": "host_owned",      "todo_id": "todo_id",      "todo_database": "todo_database",      "requested_device_id": "requested_device_id",      "chosen_by": "chosen_by",      "prompt": "prompt",      "hold_reason": "hold_reason",      "claimed_at": "claimed_at",      "error": "error",      "kind": "kind",      "parent_session_id": "parent_session_id",      "trashed_at": "trashed_at"    }  },  {    "table": "session_message",    "from": "cotton_session_messages",    "key": "id",    "workspace": true,    "columns": {      "project": "project_id",      "to_kind": "to_kind",      "to_session": "to_session_id",      "from_kind": "from_kind",      "from_session": "from_session_id",      "kind": "kind",      "body": "body",      "reply_to": "reply_to",      "thought_id": "thought_id",      "request_ref": "request_ref",      "status": "status",      "claimed_by_session": "claimed_by_session_id",      "claimed_at": "claimed_at",      "done_at": "done_at",      "media": "media"    }  },  {    "table": "session_task",    "from": "cotton_session_tasks",    "key": "id",    "workspace": true,    "columns": {      "session": "session_id",      "seq": "seq",      "text": "text",      "state": "state"    }  },  {    "table": "sighting",    "from": "cotton_media_sightings",    "key": "id",    "workspace": true,    "columns": {      "record_kind": "record_kind",      "record_id": "record_id",      "source": "source",      "source_id": "source_id",      "thread_id": "thread_id",      "key": "key",      "seen_at": "seen_at"    }  },  {    "table": "statement",    "from": "cotton_money_statements",    "key": "id",    "workspace": true,    "columns": {      "document_id": "document_id",      "account_id": "account_id",      "kind": "kind",      "period_start": "period_start",      "period_end": "period_end",      "opening_balance_minor": "opening_balance_minor",      "closing_balance_minor": "closing_balance_minor",      "currency": "currency",      "read_status": "read_status",      "read_error": "read_error",      "read_by": "read_by",      "read_at": "read_at",      "line_count": "line_count",      "sum_in_minor": "sum_in_minor",      "sum_out_minor": "sum_out_minor",      "balance_check": "balance_check"    }  },  {    "table": "statement_line",    "from": "cotton_money_statement_lines",    "key": "id",    "workspace": true,    "columns": {      "statement_id": "statement_id",      "page": "page",      "line_no": "line_no",      "posted_on": "posted_on",      "text": "text",      "amount_minor": "amount_minor",      "direction": "direction",      "balance_after_minor": "balance_after_minor",      "reference": "reference",      "fingerprint": "fingerprint",      "ignored_reason": "ignored_reason"    }  },  {    "table": "story",    "from": "cotton_stories",    "key": "id",    "workspace": true,    "columns": {      "source": "source",      "account": "account",      "external_id": "external_id",      "person_id": "person_id",      "sender": "sender",      "sender_label": "sender_label",      "kind": "kind",      "caption": "caption",      "media_key": "media_key",      "media_content_type": "media_content_type",      "media_dropped_at": "media_dropped_at",      "posted_at": "posted_at",      "expires_at": "expires_at",      "seen_at": "seen_at",      "kept": "kept"    }  },  {    "table": "thought",    "from": "cotton_inbox_items",    "key": "id",    "workspace": true,    "columns": {      "raw_text": "raw_text",      "audio_url": "audio_url",      "captured_at": "captured_at",      "route_status": "route_status",      "routed_kind": "routed_kind",      "routed_id": "routed_id",      "route_confidence": "route_confidence",      "correction_of": "correction_of",      "transcript": "transcript",      "route_reason": "route_reason",      "route_proposal": "route_proposal",      "routed_records": "routed_records",      "route_plan": "route_plan",      "route_plan_user_edited": "route_plan_user_edited",      "swept_at": "swept_at",      "sweep_note": "sweep_note",      "said_table": "said_table",      "said_record_id": "said_record_id",      "trashed_at": "trashed_at"    }  },  {    "table": "thought_attachment",    "from": "cotton_thought_attachments",    "key": "id",    "workspace": true,    "columns": {      "thought_id": "thought_id",      "record_kind": "record_kind",      "record_id": "record_id",      "position": "position",      "caption": "caption"    }  },  {    "table": "thread",    "from": "cotton_msg_threads",    "key": "id",    "workspace": true,    "columns": {      "contact_id": "contact_id",      "kind": "kind",      "last_message_at": "last_message_at",      "last_message_preview": "last_message_preview",      "archived": "archived",      "title": "title",      "external_key": "external_key",      "photo_key": "photo_key",      "description": "description",      "created_by_phone": "created_by_phone",      "read_seq": "read_seq",      "delivered_seq": "delivered_seq",      "muted_until": "muted_until",      "pinned_at": "pinned_at",      "unread_marked_at": "unread_marked_at",      "draft": "draft",      "draft_reply_to_id": "draft_reply_to_id",      "cleared_before": "cleared_before",      "summary": "summary",      "summary_updated_at": "summary_updated_at",      "summary_by": "summary_by",      "trashed_at": "trashed_at"    }  },  {    "table": "thread_filing",    "from": "cotton_msg_thread_filings",    "key": "id",    "workspace": true,    "columns": {      "thread_id": "thread_id",      "database_id": "database_id",      "state": "state",      "paused_by": "paused_by",      "copied_through": "copied_through",      "filed_at": "filed_at",      "unfiled_at": "unfiled_at"    }  },  {    "table": "thread_mark",    "from": "cotton_msg_thread_marks",    "key": "id",    "workspace": true,    "columns": {      "database_id": "database_id",      "thread_id": "thread_id",      "pinned_at": "pinned_at",      "muted_until": "muted_until",      "archived": "archived",      "cleared_before": "cleared_before"    }  },  {    "table": "thread_member",    "from": "cotton_msg_thread_participants",    "key": "id",    "workspace": true,    "columns": {      "thread_id": "thread_id",      "contact_id": "contact_id",      "display_name": "display_name",      "role": "role",      "left_at": "left_at",      "is_self": "is_self"    }  },  {    "table": "todo",    "from": "cotton_todos",    "key": "id",    "workspace": true,    "columns": {      "title": "title",      "notes": "notes",      "status": "status",      "due_at": "due_at",      "snoozed_until": "snoozed_until",      "priority": "priority",      "completed_at": "completed_at",      "recurrence_id": "recurrence_id",      "occurrence_at": "occurrence_at",      "trashed_at": "trashed_at",      "source_inbox_id": "source_inbox_id"    }  },  {    "table": "todo_recurrence",    "from": "cotton_todo_recurrences",    "key": "id",    "workspace": true,    "columns": {      "title": "title",      "notes": "notes",      "priority": "priority",      "rrule": "rrule",      "dtstart": "dtstart",      "paused": "paused",      "materialized_until": "materialized_until",      "source_inbox_id": "source_inbox_id",      "trashed_at": "trashed_at"    }  },  {    "table": "transaction",    "from": "cotton_money_transactions",    "key": "id",    "workspace": true,    "columns": {      "occurred_on": "occurred_on",      "description": "description",      "payee_text": "payee_text",      "account_id": "account_id",      "counterparty_person_id": "counterparty_person_id",      "amount_minor": "amount_minor",      "amount_known": "amount_known",      "direction": "direction",      "currency": "currency",      "for_period": "for_period",      "status": "status",      "certainty": "certainty",      "repeat": "repeat",      "repeat_day": "repeat_day",      "between_us": "between_us",      "moves_money": "moves_money",      "tag": "tag",      "transfer_of": "transfer_of",      "source": "source",      "external_hash": "external_hash",      "notes": "notes",      "settles_transaction_id": "settles_transaction_id",      "due_date": "due_date",      "source_inbox_id": "source_inbox_id",      "created_by": "created_by",      "trashed_at": "trashed_at"    }  },  {    "table": "vault_key",    "from": "cotton_vault_keys",    "key": "id",    "workspace": true,    "columns": {      "device_id": "device_id",      "public_key": "public_key",      "wrapped_vmk": "wrapped_vmk",      "vmk_version": "vmk_version"    }  },  {    "table": "video",    "from": "cotton_videos",    "key": "id",    "workspace": true,    "columns": {      "key": "key",      "sha256": "sha256",      "content_type": "content_type",      "size_bytes": "size_bytes",      "width": "width",      "height": "height",      "duration_ms": "duration_ms",      "taken_at": "taken_at",      "preview": "preview",      "poster_key": "poster_key",      "caption": "caption",      "summary": "summary",      "summary_by": "summary_by",      "summary_at": "summary_at",      "review_note": "review_note",      "review_by": "review_by",      "review_at": "review_at",      "taken_offset": "taken_offset",      "latitude": "latitude",      "longitude": "longitude",      "place_name": "place_name",      "place_city": "place_city",      "place_region": "place_region",      "place_country": "place_country",      "camera_make": "camera_make",      "camera_model": "camera_model",      "orientation": "orientation",      "favourite": "favourite",      "subtypes": "subtypes",      "original_filename": "original_filename",      "aesthetic_score": "aesthetic_score",      "curation_score": "curation_score",      "labels": "labels",      "phash": "phash",      "origin_handle": "origin_handle",      "trashed_at": "trashed_at"    }  }]