{ "said": { "album": { "list_takes_capture": false, "takes_an": true, "labels": { "cover_height": "Cover height", "cover_id": "Cover picture", "cover_key": "Cover", "cover_width": "Cover width", "decided_at": "Decided", "ends_at": "To", "home_label": "Home", "kind": "Kind", "member_count": "Pictures", "origin_handle": "Origin handle", "starts_at": "Days", "state": "State", "title": "Name", "title_by": "Title by", "trashed_at": "Trashed" } }, "album_item": { "list_takes_capture": false, "takes_an": false, "labels": { "added_by": "Added by", "album_id": "Album", "caption": "Caption", "duration_ms": "Length", "key": "Print", "kind": "Kind", "origin_handle": "Origin handle", "record_id": "Picture", "record_kind": "Record kind", "sort_at": "Sort", "taken_at": "Taken" } }, "artist": { "list_takes_capture": true, "takes_an": true, "labels": { "albums": "Albums", "mb_artist": "MusicBrainz", "name": "Name", "photo": "Photo", "songs": "Songs", "sort_name": "Sorted as" } }, "backup": { "list_takes_capture": false, "takes_an": false, "labels": { "kept": "Copies kept", "last_at": "Newest copy", "last_error": "What went wrong", "state": "Daily copy" } }, "bin": { "list_takes_capture": false, "takes_an": false, "labels": { "binned_at": "Binned on", "can_restore": "Can restore", "creator_name": "Deleted by", "database_id": "Database", "kept_until": "Kept until", "kind": "Kind", "removed_by": "Removed by", "state": "State", "table": "Table", "table_name": "Kind", "title": "Title", "title_at": "Day", "trashed_at": "Binned" } }, "board": { "list_takes_capture": false, "takes_an": false, "labels": { "definition": "Board", "drawn": "Drawn from", "name": "Screen" } }, "book": { "list_takes_capture": true, "takes_an": false, "labels": { "added_on": "Added", "author": "Author", "cover": "Cover", "deleted_at": "Deleted at", "description": "About", "doi": "DOI", "file": "Book", "filled_from": "Filled from", "finished_on": "Finished", "format": "Kind", "goodreads_id": "Goodreads", "isbn": "ISBN", "language": "Language", "ol_edition": "Open Library edition", "ol_work": "Open Library", "on_phone": "On this phone", "pages": "Pages", "position": "Place", "position_at": "Last read", "progress": "Read", "publisher": "Publisher", "rating": "Rating", "read_count": "Times read", "review": "Review", "send_id": "Send", "sent_at": "Sent", "sent_by": "Sent by", "sent_by_number": "Sent from", "series": "Series", "series_number": "Number in series", "source": "Came from", "started_on": "Started", "status": "Status", "subjects": "Subjects", "title": "Title", "year": "First published" } }, "call": { "list_takes_capture": false, "takes_an": false, "labels": { "contact_id": "Contact", "device": "Read by", "direction": "Direction", "duration_s": "Length", "ended_at": "Ended", "ended_reason": "How it ended", "external_id": "External", "handle": "Number", "kind": "Kind", "link": "Meeting link", "live": "Called here", "meta": "Meta", "missed": "Missed", "outcome": "Outcome", "outcome_label": "What happened", "person_id": "Person", "photo": "Photo", "provider": "How", "recording": "Recording", "recording_phase": "Recording state", "source": "Source", "started_at": "When", "title": "Title", "who": "People" } }, "copy": { "list_takes_capture": false, "takes_an": false, "labels": { "ambient": "Sync", "behind": "Behind", "behind_at_least": "Behind", "bytes_wanted": "Still to fetch", "changes_waiting": "Waiting to send", "database": "Database", "databases_moved": "Databases updated", "databases_to_move": "Databases to update", "doing_now": "Now", "keeps": "Keeps", "kind": "Kind", "last_heard_at": "Last heard", "mac_heard_at": "Mac heard", "moving_database": "Updating", "name": "Device", "not_answering": "Sync", "reach": "Reachable", "role": "Role", "synced_at": "Synced", "unreachable_since": "Not reachable since", "waiting_since": "Mac not heard since" } }, "device": { "list_takes_capture": false, "takes_an": false, "labels": { "ai_day_cap_usd": "API cap per day", "ai_spend_line": "Claude API today", "ambient": "Sync", "app_version": "App version", "approved_at": "Paired", "approved_by_device": "Approved by", "asked_at": "Asked", "auto_updates": "Updates", "backup": "Backup", "backup_answered_by": "Backup said by", "backup_why": "Why", "backups": "Backups", "build": "Build", "bytes_wanted": "Still to fetch", "can_serve": "Can serve", "caught_up": "Caught up", "changes_waiting": "Waiting to send", "chip": "Chip", "coming": "Coming", "cpu_count": "Processor", "cpu_time_today": "CPU time today", "devices_route": "All devices", "digits": "Code", "disk_free_gb": "Disk free", "disk_total_gb": "Disk", "error_reports": "Error reports", "error_reports_to": "Error reports go to", "failed_files": "Not backed up", "fetch_bytes": "Bytes to fetch", "fetch_count": "Files to fetch", "hangs_today": "Hangs today", "has_access": "Access", "has_server": "Has a server", "held_until": "AI paused until", "hold_reason": "AI pause reason", "host_answered_by": "Settings said by", "host_version": "Server version", "keep_always": "Always", "keep_bytes": "Files", "keep_bytes_note": "While serving", "keep_fetch_coming": "Kept on this phone", "keep_fetch_full": "Kept things", "keep_files_document": "Documents", "keep_files_instagram": "Instagram media", "keep_files_photo": "Photos", "keep_files_video": "Videos", "keep_files_whatsapp": "WhatsApp media", "keep_free_bytes": "Keep free", "keep_free_percent": "Keep free", "keep_free_size": "Kept free", "keep_mail": "Mail", "keep_statuses": "Statuses", "keeps_answered_by": "What it keeps said by", "kept_space_bytes": "Space for kept things", "kind": "Kind", "last_answer": "Last answer", "last_contact": "Last contact", "last_seen_at": "Last seen", "last_synced": "Synced", "load": "Free disk", "load_1": "Load", "mac_heard_at": "Mac heard", "machine": "Runs the server", "media_backup": "Photos and files", "mem_budget_gb": "Memory budget", "mem_committed_gb": "Committed", "mem_free_pct": "Memory free", "mem_total_gb": "Memory", "name": "Name", "notifications": "Notifications", "notifications_off": "Notifications off", "notifications_permission": "Allowed by the system", "notify": "Notifications", "notify_alarms": "Alarms", "notify_birthdays": "Birthdays", "notify_events": "Events", "notify_reminders": "Todo reminders", "notify_system": "Notifications", "os_version": "OS version", "peak_memory": "Peak memory", "placement_problems": "Passwords", "platform": "Platform", "push": "Push", "push_authorization": "Notifications reported", "reach_answered_by": "How it is reached said by", "reached_through": "Reached through", "receipts_behind": "To receive", "receipts_to_send": "To send", "received_since_open": "Received since open", "refusal": "Not serving", "refusal_clearable": "Can serve again", "rekey": "Re-key", "rekey_digits": "Code to approve", "rekeyed_at": "Re-keyed", "removal_state": "Removal", "reported_state_lines": "Reported", "revoked_at": "Revoked", "revoked_reason": "Revoked because", "runner_confirm": "Serving Mac copy", "runner_confirmed_at": "Runner confirmed", "runner_drop": "Drop copy and pair", "runner_ordered_at": "Runner ordered", "runner_problem": "Runner owed", "sampled_at": "Last reading", "samples": "Sample records", "schema": "Schema", "search_index": "Search index", "serving_mac": "Serving Mac", "serving_order": "Serving order", "serving_place": "Serving order", "serving_rank": "Serving rank", "session": "Signed in", "sessions": "Sessions", "sessions_cap": "Session limit", "sessions_running": "Sessions running", "smooth_scrolling": "Smooth scrolling", "stalled_at": "Stalled at", "stalled_why": "Why it stalled", "start_at_login": "Start at login", "state": "State", "status": "Status", "stay_awake": "Stay awake", "sync_background": "In the background", "sync_bytes": "Sync bytes", "sync_rows_done": "Sync rows done", "sync_rows_total": "Sync rows total", "sync_table_progress": "Moving", "sync_tables": "Tables", "sync_trouble": "Last try", "synced_at": "Synced at", "takes_placements": "Takes placements", "theme_change_id": "Last theme change", "theme_changed_at": "Theme changed", "theme_undo_available": "Theme can be undone", "unreachable_since": "Unreachable since", "update_feed": "Updates come from", "update_hold": "Update hold", "upload_bytes": "Bytes to send", "upload_count": "Files to send", "waiting_since": "Mac not heard since" } }, "document": { "list_takes_capture": false, "takes_an": false, "labels": { "byte_size": "Size", "created_at": "Added", "decrypted_path": "Decrypted path", "doc_type": "Kind", "document_date": "Dated", "error_code": "Problem", "facts": "Facts", "failed_stage": "Failed at", "issuer": "From", "mcp_token_id": "Mcp token", "mime": "Type", "origin_handle": "Origin handle", "original_name": "File name", "page_count": "Pages", "page_line": "Pages", "pages_text": "Pages", "password": "Password", "people": "People", "period_end": "Covers to", "period_start": "Covers from", "period_years": "Year", "projects": "Project", "provenance": "Added", "secret_id": "Password", "sha256": "Sha256", "source": "Added from", "state_message": "Reading status", "statement_id": "Statement", "status": "Status", "status_changed_at": "Status changed", "storage_path": "File", "summary": "Reading", "text_extracted": "Text extracted", "title": "Title", "trashed_at": "Trashed", "type_line": "Kind and date", "unlock_password": "File password" } }, "duplicate": { "list_takes_capture": false, "takes_an": false, "labels": { "copy_facts": "Copy facts", "copy_id": "Copy", "copy_key": "Copy", "decided_at": "Decided", "distance": "Distance", "keep_facts": "Keep facts", "keep_id": "Keep", "keep_key": "Keep", "method": "Method", "record_kind": "Record kind", "state": "State" } }, "email": { "list_takes_capture": false, "takes_an": true, "labels": { "account": "Account", "archived_at": "Archived in Comms", "attachments": "Attachments", "auto_submitted": "Auto-Submitted", "binned": "In bin", "body": "Body", "cc_line": "Cc", "direction": "Direction", "external_id": "External", "from_email": "From address", "from_name": "From", "gmail_account": "Gmail account", "gmail_category": "Gmail category", "gmail_id": "Gmail", "in_inbox": "In inbox", "labels": "Labels", "list_id": "List-Id", "list_unsubscribe": "List-Unsubscribe", "list_unsubscribe_post": "List-Unsubscribe-Post", "media": "Media", "message_id": "Message-ID", "message_refs": "References", "precedence": "Precedence", "recipients": "Recipients", "sent_at": "Sent", "snippet": "Snippet", "starred": "Starred", "subject": "Subject", "sync_state": "Sync state", "thread_id": "Conversation", "to_line": "To", "trashed_at": "Binned", "unread": "Unread" } }, "email_sender": { "list_takes_capture": false, "takes_an": true, "labels": { "address": "Address", "blocked": "Blocked", "decided_at": "Decided", "decided_by": "Decided by", "email_count": "Emails", "in_people": "In People", "kind": "Is", "last_at": "Latest email", "name": "Name", "reason": "Why", "unread_count": "Unread", "verdict": "Verdict", "written_to": "Written to" } }, "email_thread": { "list_takes_capture": false, "takes_an": true, "labels": { "amount_minor": "Amount", "binned": "In bin", "currency": "Currency", "email_count": "Emails", "event_id": "In the calendar", "external_key": "External key", "first_at": "First email", "in_inbox": "In inbox", "last_at": "Latest email", "marks": "Marked", "merchant": "Merchant", "people": "People", "preview": "Preview", "read_state": "Read state", "record_kind": "Record", "record_on": "On", "record_reason": "Record reason", "reference": "Reference", "sender": "Sender", "sender_address": "Sender address", "sender_kind": "Sender is", "starred": "Starred", "subject": "Subject", "summary": "Summary", "summary_by": "Summary by", "summary_updated_at": "Summary updated", "transaction_id": "Recorded in Money", "trashed_at": "Binned" } }, "event": { "list_takes_capture": true, "takes_an": true, "labels": { "account": "Account", "alert": "Alert", "all_day": "All day", "calendar_name": "Calendar", "collection_id": "Calendar", "country": "Country", "created_at": "Added", "day": "Day", "email_thread_id": "From mail", "ends_at": "Ends", "erase_requested_at": "Erase requested", "event_place": "Place", "event_place_lat": "Place latitude", "event_place_lng": "Place longitude", "event_place_version": "Place version", "exdates": "Exdates", "gcal_etag": "Gcal etag", "gcal_id": "Gcal", "guest_responses": "Replies", "ical_uid": "Ical uid", "invited": "Invited", "kind": "Kind", "location": "Where", "mark": "Mark", "my_response": "Your reply", "notes": "Notes", "on_google": "On Google", "organizer_is_self": "Organizer is self", "original_starts_at": "Original starts", "people": "Who", "picture": "Picture", "picture_photo_id": "Original", "project": "Project", "rrule": "Repeats", "series_id": "Series", "source": "Source", "source_inbox_id": "Source inbox", "start_time": "Starts", "starts_at": "Starts", "sync_state": "Sync", "timezone": "Time zone", "title": "Title", "trashed_at": "Removed", "your_note": "Your note" } }, "everything": { "list_takes_capture": false, "takes_an": false, "labels": { "changed": "Last changed", "count": "Count", "count_one": "Count one", "count_other": "Count other", "name": "Table", "source_absent": "Not installed" } }, "face": { "list_takes_capture": false, "takes_an": false, "labels": { "cluster_id": "Cluster", "crop": "Face", "decision": "Answer", "embedding": "Embedding", "embedding_model": "Embedding model", "h": "H", "likelihood": "How sure", "person_by": "Person by", "person_id": "Person", "photo_id": "In the photo", "quality": "Quality", "question": "Question", "record_id": "Record", "record_kind": "Record kind", "source": "Source", "source_id": "Source", "suggested_distance": "Suggested distance", "suggested_person_id": "Maybe", "suggestion_dismissed_at": "Suggestion dismissed", "w": "W", "x": "X", "y": "Y" } }, "fetch": { "list_takes_capture": true, "takes_an": false, "labels": { "added_on": "Added", "again_error": "Why fetching it again failed", "again_on": "Fetched again", "again_outcome": "How fetching it again went", "bytes": "Fetched so far", "error": "Why it failed", "eta_seconds": "Time left", "files": "Files", "finished_on": "Finished", "in_hidden": "In Hidden", "landed_count": "Landed", "machine": "Mac", "of_bytes": "Size", "picture": "Picture", "progress": "Fetched", "source": "Link", "source_kind": "Kind of link", "speed_bps": "Speed", "stage": "Stage", "stage_at": "Stage last moved", "stage_done": "Stage done", "stage_line": "Where it is", "stage_of": "Stage total", "started_on": "Started", "state": "State", "title": "Title", "wants": "Wants" } }, "fetch_file": { "list_takes_capture": false, "takes_an": false, "labels": { "book": "Book", "bytes": "Size", "document": "Document", "episode": "Episode", "fetch": "Download", "film": "Film", "in_hidden": "In Hidden", "kind": "Landed as", "name": "File", "photo": "Photo", "series": "Series", "song": "Song" } }, "film": { "list_takes_capture": true, "takes_an": false, "labels": { "added_on": "Added", "backdrop": "Backdrop", "bitrate": "Bitrate", "cast": "Cast", "certificate": "Certificate", "chapters": "Chapters", "country": "Country", "director": "Director", "file": "Film", "filled_from": "Filled from", "genres": "Genres", "height": "Picture height", "imdb_id": "IMDb", "in_hidden": "In Hidden", "kind": "Kind", "language": "Language", "last_watched_at": "Last watched", "minutes": "Length", "needs_mac": "Converting on your Mac", "on_phone": "On this phone", "original": "The original file", "original_bytes": "The original's size", "original_sha256": "The original's fingerprint", "original_title": "Original title", "oshash": "OpenSubtitles hash", "position": "Watched to", "position_at": "Last watched", "poster": "Poster", "poster_before": "The poster before a frame was picked", "poster_from": "Where the picked poster was taken", "rating": "Rating", "recommended_by": "Recommended by", "recommended_by_name": "Recommended by (name)", "review": "Review", "sdr_variant": "An SDR picture beside it", "send_id": "Send", "sent_at": "Sent", "sent_by": "Sent by", "sent_by_number": "Sent from", "sha256": "The file's fingerprint", "source_file": "The file as it came", "source_url": "From", "status": "Status", "subtitle_choice": "Subtitles chosen", "subtitle_given": "Subtitles you gave", "subtitle_given_language": "Your subtitles' language", "subtitle_note": "Subtitles", "subtitle_offset": "Subtitle timing", "subtitle_work": "Subtitle work", "subtitles": "Subtitle tracks", "synopsis": "Synopsis", "title": "Title", "tmdb_id": "TMDB", "tvdb_id": "TheTVDB", "uploader": "By", "video_range": "Picture range", "watched_on": "Watched", "watched_with": "Watched with", "year": "Year" } }, "film_episode": { "list_takes_capture": true, "takes_an": true, "labels": { "aired": "Aired", "bitrate": "Bitrate", "chapters": "Chapters", "file": "Episode", "filled_from": "Filled from", "height": "Picture height", "in_hidden": "In Hidden", "minutes": "Length", "needs_mac": "Converting on your Mac", "number": "Episode", "on_phone": "On this phone", "original": "The original file", "original_bytes": "The original's size", "original_sha256": "The original's fingerprint", "oshash": "OpenSubtitles hash", "position": "Watched to", "position_at": "Last watched", "rating": "Rating", "sdr_variant": "An SDR picture beside it", "season": "Season", "season_number": "Season number", "send_id": "Send", "sent_at": "Sent", "sent_by": "Sent by", "sent_by_number": "Sent from", "series": "Series", "series_title": "Series title", "sha256": "The file's fingerprint", "source_file": "The file as it came", "status": "Status", "still": "Still", "still_before": "The still before a frame was picked", "still_from": "Where the picked still was taken", "subtitle_choice": "Subtitles chosen", "subtitle_given": "Subtitles you gave", "subtitle_given_language": "Your subtitles' language", "subtitle_note": "Subtitles", "subtitle_offset": "Subtitle timing", "subtitle_work": "Subtitle work", "subtitles": "Subtitle tracks", "synopsis": "Synopsis", "title": "Title", "tmdb_id": "TMDB", "tvdb_id": "TheTVDB", "video_range": "Picture range", "watched_on": "Watched" } }, "film_season": { "list_takes_capture": true, "takes_an": false, "labels": { "episodes": "Episodes", "film": "Series", "in_hidden": "In Hidden", "intro_from": "Intro starts", "intro_to": "Intro ends", "number": "Season", "on_phone": "On this phone", "poster": "Poster", "send_id": "Send", "sent_at": "Sent", "sent_by": "Sent by", "sent_by_number": "Sent from", "series_poster": "Series poster", "series_title": "Series title", "title": "Title", "tmdb_id": "TMDB", "watched": "Watched", "year": "Year" } }, "health_day": { "list_takes_capture": true, "takes_an": false, "labels": { "day": "Day", "key": "Key", "max": "Highest", "metric": "Measure", "min": "Lowest", "samples": "Readings", "source": "From", "state": "Flow", "unit": "Unit", "value": "Value" } }, "health_measurement": { "list_takes_capture": true, "takes_an": false, "labels": { "context": "Taken", "day": "Day", "device": "Recorded by", "key": "Key", "kind": "Measure", "measured_at": "Taken", "sample": "Sample", "second": "Lower reading", "source": "From", "unit": "Unit", "value": "Reading" } }, "health_person": { "list_takes_capture": true, "takes_an": false, "labels": { "age_on": "Age printed on", "age_years": "Age last printed", "born_on": "Date of birth", "key": "Key", "names": "Names on reports", "owner": "The owner", "person": "Person", "position": "Order", "sex": "Sex" } }, "health_workout": { "list_takes_capture": true, "takes_an": false, "labels": { "day": "Day", "device": "Recorded by", "distance_m": "Distance (m)", "ended_at": "Ended", "energy_kcal": "Active energy (kcal)", "heart_rate_avg": "Average heart rate", "heart_rate_max": "Highest heart rate", "key": "Key", "kind": "Workout", "minutes": "Minutes", "sample": "Sample", "source": "From", "started_at": "Started" } }, "highlight": { "list_takes_capture": true, "takes_an": false, "labels": { "book": "Book", "book_author": "Author", "book_title": "Book", "chapter": "Chapter", "colour": "Colour", "cover": "Cover", "locator": "Place", "made_at": "Marked", "note": "Note", "page_label": "Page", "progress": "Where", "send_id": "Send", "sent_at": "Sent", "sent_by": "Sent by", "sent_by_number": "Sent from", "text": "Passage" } }, "journal_entry": { "list_takes_capture": true, "takes_an": false, "labels": { "body": "Words", "day": "Day", "mood": "Mood", "place": "Where", "send_id": "Send", "sent_at": "Sent", "sent_by": "Sent by", "sent_by_number": "Sent from", "starred": "Starred", "title": "Title", "weather": "Weather" } }, "lab_report": { "list_takes_capture": true, "takes_an": false, "labels": { "added_by": "Added by", "age": "Age on the report", "age_years": "Age in years", "born_on": "Date of birth", "collected_at": "Collected at", "collected_via": "Collected via", "day": "Collected", "file_name": "File name", "key": "Key", "lab": "Lab", "layout": "Read as", "mail_message_id": "Mail", "order_id": "Order", "pdf": "Report", "pdf_sha256": "File hash", "person": "Person", "printed_name": "Name on the report", "received_at": "Received", "referred_by": "Referred by", "reported_at": "Reported", "results": "Results", "sample_type": "Sample", "sex": "Sex", "status": "Report", "unmatched": "Not yet known", "versions": "Copies received" } }, "lab_result": { "list_takes_capture": true, "takes_an": false, "labels": { "canonical_unit": "Usual unit", "canonical_value": "In the usual unit", "comparator": "Comparator", "day": "Collected", "flag": "Lab's flag", "interval": "Interval, read", "key": "Key", "line": "Line", "method": "Method", "name": "Test", "page": "Page", "panel": "Panel", "parameter": "Parameter", "person": "Person", "position": "Order on the report", "range": "Reference interval", "range_high": "Interval to", "range_low": "Interval from", "report": "Report", "result": "Result", "specimen": "Specimen", "unit": "Unit", "value": "Value" } }, "lines": { "list_takes_capture": false, "takes_an": false, "labels": { "line": "Line", "set": "Set", "words": "Words" } }, "listen": { "list_takes_capture": true, "takes_an": false, "labels": { "artist_name": "By", "device": "On", "ended": "Ended", "from": "Playing from", "played_at": "Played", "seconds": "Listened", "song": "Song", "title": "Title" } }, "media": { "list_takes_capture": false, "takes_an": false, "labels": { "albums": "Albums", "camera_make": "Camera make", "camera_model": "Camera", "caption": "Caption", "duration_ms": "Length", "favourite": "Favourite", "key": "Picture", "kind": "Kind", "on_phone": "On this phone", "people": "People", "place_city": "City", "place_name": "Place", "size_bytes": "Size", "summary": "Description", "taken_at": "Taken" } }, "meetings_action": { "list_takes_capture": false, "takes_an": true, "labels": { "at_ms": "Said at", "due": "Due", "due_said": "When, as said", "made_by": "Made by", "meeting": "Meeting", "position": "Order", "speaker": "Speaker", "todo": "Todo", "who": "Who", "words": "To do" } }, "meetings_line": { "list_takes_capture": false, "takes_an": false, "labels": { "edited": "Corrected", "end_ms": "To", "language": "Language", "meeting": "Meeting", "position": "Order", "speaker": "Speaker", "start_ms": "From", "text": "Said" } }, "meetings_meeting": { "list_takes_capture": true, "takes_an": false, "labels": { "actions": "To do", "asked_at": "Asked", "attempts": "Tries", "audio": "Recording", "audio_bytes": "Size", "call": "Call", "duration_ms": "Length", "ended_at": "Ended", "kind": "Kind", "languages": "Languages", "languages_chosen": "Languages you chose", "lines": "Lines", "marks": "Marked moments", "note": "Saved as note", "on_phone": "On this phone", "recorded_on": "Recorded on", "silenced": "Silenced stretches", "source": "Came from", "speakers": "Speakers", "started_at": "Started", "status": "State", "status_why": "Why", "summarise_on": "Summarised on", "summarised_at": "Summarised", "summarised_by": "Summary by", "summary": "Summary", "summary_asked_at": "Summary asked", "summary_why": "Why no summary", "take": "Take", "title": "Title", "tracks": "Tracks", "transcribe_on": "Turned into text on", "transcribed_at": "Transcribed", "transcribed_by": "Transcribed by", "transcribing_on": "Being turned into words on" } }, "meetings_speaker": { "list_takes_capture": false, "takes_an": false, "labels": { "first_ms": "First spoke at", "label": "Label", "lines": "Lines", "meeting": "Meeting", "name": "Name", "person": "Person", "talk_ms": "Spoke for" } }, "memory": { "list_takes_capture": false, "takes_an": false, "labels": { "archived_at": "Archived at", "body": "Body", "created_at": "Added", "machine": "Device", "origin_kind": "Written by", "origin_label": "Assistant", "reviewed_at": "Reviewed", "slug": "Citation", "source": "Source", "source_external_id": "Source external id", "status": "Status", "superseded_by": "Replaced by", "title": "Entry", "visibility": "Visibility" } }, "message": { "list_takes_capture": false, "takes_an": false, "labels": { "body": "Body", "can_delete": "Can delete", "channel": "Channel", "code": "Sign-in code", "code_for": "Sign-in code for", "deleted_at": "Deleted", "direction": "Direction", "display_body": "Display body", "edited_at": "Edited", "edited_label": "Edited label", "external_id": "Site id", "filed_copy": "Filed copy", "forward_of_id": "Forward of", "hidden_at": "Hidden", "is_system": "Is system", "kept": "Kept", "media": "Media", "mentions": "Mentions", "meta": "Meta", "origin": "Origin", "paper_sender": "Paper sender", "preview": "Line", "provenance": "Provenance", "reactions": "Reactions", "read_at": "Read", "reply_preview": "Reply preview", "reply_to_external_id": "Reply to external", "reply_to_id": "Reply to", "send_attempts": "Send attempts", "send_error": "Why it was not sent", "send_id": "Send", "send_state": "Sending", "sender_contact_id": "Sender contact", "sender_label": "Sender label", "sender_name": "Sender name", "sender_participant_id": "Sender participant", "sender_photo": "Sender photo", "sent_at": "Sent", "sent_by": "Sent by", "sent_by_number": "Sent from", "seq": "Seq", "shared_status": "Shared video", "starred_at": "Kept", "starred_label": "Starred label", "thread_id": "Chat", "trashed_at": "Trashed" } }, "message_import": { "list_takes_capture": false, "takes_an": true, "labels": { "media_receipt": "Pictures and files", "name": "Export", "receipt": "Result", "senders": "Senders in this export", "state": "Import state", "thread_id": "Chat" } }, "money_account": { "list_takes_capture": false, "takes_an": true, "labels": { "archived_at": "Archived", "balance_as_of": "Balance as of", "balance_minor": "Balance", "counterparty_person_id": "Counterparty person", "currency": "Currency", "institution": "Bank", "is_default": "Usual account", "is_pooled": "Pooled", "kind": "Kind", "known_balance_minor": "Known balance", "known_balance_on": "Known balance on", "name": "Name", "number_mask": "Account ending", "subtype": "Subtype", "trashed_at": "Trashed" } }, "money_owed": { "list_takes_capture": true, "takes_an": true, "labels": { "account_id": "Account", "amount_known": "Amount known", "amount_minor": "Amount", "balance_after": "Balance after", "between_us": "Between us", "certainty": "Certainty", "counterparty_person_id": "Person", "currency": "Currency", "description": "What", "direction": "Direction", "due_date": "Due", "for_period": "For month", "moves_money": "Moves money", "occurred_on": "Date", "owed_signed": "Signed", "status": "Status", "tag": "Tag" } }, "music_album": { "list_takes_capture": true, "takes_an": true, "labels": { "added_on": "Added", "album_gain": "Album gain", "album_peak": "Album peak", "artist": "Album artist", "artist_name": "By", "barcode": "Barcode", "booklet": "Booklet", "bought_on": "Bought", "catalog_number": "Catalogue number", "compilation": "Compilation", "cover": "Cover", "discs": "Discs", "filled_from": "Filled from", "label": "Label", "last_played_at": "Last played", "length": "Length", "mb_release": "MusicBrainz release", "mb_release_group": "MusicBrainz release group", "on_phone": "On this phone", "original_year": "First released", "release_type": "Kind of release", "send_id": "Send", "sent_at": "Sent", "sent_by": "Sent by", "sent_by_number": "Sent from", "songs": "Songs", "store_id": "Shop's id", "store_url": "Shop page", "title": "Title", "year": "Year" } }, "note": { "list_takes_capture": true, "takes_an": false, "labels": { "archived_at": "Archived", "author_kind": "Author kind", "author_label": "Author label", "body": "Body", "external_id": "External id", "journal_date": "Journal date", "kind": "Kind", "managed_by": "Kept in step with", "people": "People", "pinned": "Pinned", "pinned_in": "Pinned in", "project": "Project", "project_id": "Project", "published_at": "Published", "send_id": "Send", "sent_at": "Sent", "sent_by": "Sent by", "sent_by_number": "Sent from", "title": "Title", "trashed_at": "Trashed at", "updated_at": "Edited", "words": "Words" } }, "passkey": { "list_takes_capture": false, "takes_an": false, "labels": { "algorithm": "Algorithm", "created_at": "Made", "credential_id": "Credential id", "last_used_at": "Last used", "note": "Note", "private_key_enc": "Private key", "public_key": "Public key", "rp_id": "Site", "rp_name": "Name", "sign_count": "Signature count", "transports": "Transports", "user_handle": "Account id", "user_name": "Account", "uses": "Uses", "vmk_version": "Vault key version" } }, "person": { "list_takes_capture": true, "takes_an": false, "labels": { "archived_at": "Archived", "avatar_key": "Photo", "avatar_photo_id": "Original", "avatar_url": "Avatar url", "birth_day": "Birthday", "birth_month": "Birth month", "birth_year": "Birth year", "birthday": "Birthday", "city": "City", "city_filled_at": "City filled", "city_lat": "Place latitude", "city_lng": "Place longitude", "city_place": "Place", "city_version": "Place version", "contact_source": "Contact source", "country": "Country", "device_contact_id": "Device contact", "device_contact_snapshot": "Device contact snapshot", "emails": "Email", "face_embedding": "Face embedding", "face_embedding_from": "Face embedding from", "face_embedding_model": "Face embedding model", "full_name": "Name", "instagrams": "Instagram", "language": "Language", "org": "Organisation", "own_birthdays__last_wished": "Last wished", "own_birthdays__wish": "Send wishes", "phones": "Phone", "reach_90d": "Reached in 90 days", "reached_at": "Last reached", "role_title": "Role", "send_id": "Send", "sent_at": "Sent", "sent_by": "Sent by", "sent_by_number": "Sent from", "summary": "Summary", "summary_by": "Summary by", "summary_since": "Since the summary", "summary_updated_at": "Summary written", "thread_channel": "Messages over", "timezone": "Time zone", "trashed_at": "Trashed" } }, "person_handle": { "list_takes_capture": true, "takes_an": false, "labels": { "kept": "Confirmed", "kind": "Kind", "normalised": "Matched as", "person_id": "Person", "position": "Position", "send_id": "Send", "sent_at": "Sent", "sent_by": "Sent by", "sent_by_number": "Sent from", "source": "From", "trashed_at": "Trashed", "value": "Handle", "verified_at": "Confirmed" } }, "photo": { "list_takes_capture": false, "takes_an": false, "labels": { "aesthetic_score": "Aesthetic score", "albums": "Albums", "camera_make": "Camera make", "camera_model": "Camera", "caption": "Caption", "content_type": "Content type", "curation_score": "Curation score", "favourite": "Favourite", "height": "Height", "image_embedding": "Image embedding", "image_embedding_model": "Image embedding model", "is_utility": "Is utility", "key": "Picture", "labels": "Labels", "latitude": "Latitude", "longitude": "Longitude", "ocr_text": "Text in the picture", "orientation": "Orientation", "origin_handle": "Origin handle", "original_filename": "File name", "people": "People", "phash": "Phash", "place_city": "City", "place_country": "Country", "place_name": "Place", "place_region": "Place region", "preview": "Preview", "review_at": "Suggested", "review_by": "Suggested by", "review_note": "Review", "send_id": "Send", "sent_at": "Sent", "sent_by": "Sent by", "sent_by_number": "Sent from", "sha256": "Sha256", "size_bytes": "Size", "subtypes": "Subtypes", "summary": "Description", "summary_at": "Described", "summary_by": "Summary by", "taken_at": "Taken", "taken_offset": "Taken offset", "trashed_at": "Trashed", "width": "Dimensions" } }, "schema_move": { "list_takes_capture": false, "takes_an": true, "labels": { "name": "Database", "state": "State", "tables_left": "Tables left" } }, "secret": { "list_takes_capture": false, "takes_an": false, "labels": { "changed_at": "Password changed", "expires_at": "Runs out", "favourite_at": "Favourite", "hint": "Hint", "history_enc": "Earlier passwords", "kind": "Kind", "last_used_at": "Last used", "name": "Name", "passkey_id": "Passkey", "sealed": "Sealed", "service": "Service", "site": "Website", "trashed_at": "Binned", "updated_at": "Updated", "username": "Username", "uses": "Filled", "value_enc": "Sealed on your devices", "vmk_version": "Vault key version" } }, "session": { "list_takes_capture": false, "takes_an": false, "labels": { "account": "Account", "active_at": "Active", "answering": "Answering", "branch": "Branch", "can_resume": "Can resume", "chosen_by": "Chosen by", "claimed_at": "Claimed at", "cwd": "Folder", "device_id": "Device id", "ended_at": "Ended", "error": "Error", "exit_code": "Exit code", "external_id": "External id", "facts": "Facts", "heading": "Heading", "hold_reason": "Held because", "host_owned": "Runs in a terminal here", "kind": "Kind", "last_active_at": "Last active", "last_line": "Last line", "line": "Now", "listened_at": "Listened at", "machine": "Machine", "model": "Model", "notice": "Notice", "open_questions": "Open questions", "parent_session_id": "Started from", "pending_decision": "Answered", "permission_mode": "Permissions", "project": "Project", "project_id": "Project", "project_slug": "Project slug", "prompt": "Task", "prompt_count": "Prompts", "repo_url": "Repository", "requested_device_id": "Requested device id", "section": "Section", "shipped": "Shipped", "started_at": "Started", "state": "State", "state_at": "State at", "state_line": "State", "summary": "Summary", "tasks": "Task list", "tasks_count": "Tasks", "title": "Name", "todo_database": "Todo database", "todo_id": "Todo", "tool": "Agent", "transcript_ref": "Transcript", "trashed_at": "Trashed at", "turn_count": "Turns", "waiting_kind": "Waiting for", "waiting_ref": "Waiting ref" } }, "settings": { "list_takes_capture": false, "takes_an": false, "labels": { "name": "Name", "position": "Position", "route": "Route", "value": "Value" } }, "sighting": { "list_takes_capture": false, "takes_an": false, "labels": { "key": "Key", "photo_id": "Photo", "record_id": "Record", "record_kind": "Record kind", "seen_at": "Seen", "source": "Where", "source_id": "Source", "thread_id": "Chat", "thread_name": "Chat name", "video_id": "Video" } }, "song": { "list_takes_capture": true, "takes_an": false, "labels": { "added_on": "Added", "album": "Album", "album_title": "On", "artist": "Artist", "artist_name": "By", "bitrate": "Bitrate", "composer": "Composer", "cover": "Cover", "disc_number": "Disc", "duration": "Length", "favourite": "Favourite", "file": "Recording", "filled_from": "Filled from", "format": "Kind", "genre": "Genre", "isrc": "ISRC", "last_played_at": "Last played", "lyrics": "Lyrics", "lyrics_source": "Lyrics from", "mb_recording": "MusicBrainz", "mb_release_track": "MusicBrainz track", "on_phone": "On this phone", "path": "Came in as", "play_count": "Plays", "sample_rate": "Sample rate", "send_id": "Send", "sent_at": "Sent", "sent_by": "Sent by", "sent_by_number": "Sent from", "skip_count": "Skips", "source": "Came from", "synced_lyrics": "Timed lyrics", "title": "Title", "track_gain": "Track gain", "track_number": "Track", "track_peak": "Track peak", "year": "Year" } }, "statement": { "list_takes_capture": false, "takes_an": false, "labels": { "account_id": "Account", "balance_check": "Balance check", "closing_balance_minor": "Closing balance", "currency": "Currency", "document_id": "Document", "kind": "Kind", "line_count": "Lines", "opening_balance_minor": "Opening balance", "period_end": "To", "period_start": "Period", "read_at": "Read", "read_by": "Read by", "read_error": "Read problem", "read_status": "Reading", "recorded_count": "Recorded entries", "sum_in_minor": "Money in", "sum_out_minor": "Money out", "visual_problem": "Reading problem", "visual_problem_field": "Figure", "visual_problem_page": "Reading problem" } }, "statement_line": { "list_takes_capture": false, "takes_an": false, "labels": { "amount_minor": "Amount", "balance_after_minor": "Balance after", "currency": "Currency", "direction": "Direction", "fingerprint": "Fingerprint", "ignored_reason": "Skipped because", "line_no": "Line no", "page": "Page", "posted_on": "Date", "reference": "Reference", "state": "State", "statement_id": "Statement", "text": "As the bank wrote it", "title": "With", "transaction_id": "Recorded as" } }, "story": { "list_takes_capture": false, "takes_an": false, "labels": { "account": "Account", "caption": "Caption", "expires_at": "App expiry", "expiry_line": "In the app", "external_id": "External", "kept": "Kept", "kind": "Kind", "media_content_type": "Media content type", "media_dropped_at": "Picture let go", "media_key": "Picture", "person_id": "Who", "posted_at": "Posted", "reactions": "Reactions", "retention_line": "Kept", "seen_at": "Seen", "sender": "From", "sender_label": "Shown as", "source": "App" } }, "story_answer": { "list_takes_capture": true, "takes_an": true, "labels": { "answer": "Answer", "answered_at": "Answered", "question": "Question", "skipped": "Skipped", "story": "Story" } }, "story_character": { "list_takes_capture": true, "takes_an": false, "labels": { "about": "About", "lines": "Lines", "name": "Name", "picture": "Picture", "role": "Who they are", "scenes": "Scenes", "story": "Story", "tint": "Tint", "want": "What they want" } }, "story_costume": { "list_takes_capture": true, "takes_an": false, "labels": { "about": "About", "character": "Worn by", "day": "Story day", "name": "Name", "picture": "Picture", "story": "Story" } }, "story_draft": { "list_takes_capture": true, "takes_an": false, "labels": { "cast": "Characters then", "made_at": "Marked", "name": "Name", "pages": "Pages", "places": "Places then", "scenes": "Scenes", "story": "Story" } }, "story_draft_scene": { "list_takes_capture": true, "takes_an": false, "labels": { "body": "Scene", "day": "Story day", "draft": "Draft", "heading": "Scene heading", "lines": "Lines", "place": "Place", "position": "Order", "scene": "Scene", "setting": "Inside or out", "story": "Story", "summary": "What happens", "time": "Time" } }, "story_line": { "list_takes_capture": true, "takes_an": false, "labels": { "aside": "Aside", "character": "Character", "form": "Set as", "kind": "Kind", "position": "Order", "scene": "Scene", "story": "Story", "text": "Line", "who": "Who" } }, "story_note": { "list_takes_capture": true, "takes_an": false, "labels": { "body": "Note", "scene": "Scene", "story": "Story", "title": "Title" } }, "story_picture": { "list_takes_capture": true, "takes_an": false, "labels": { "caption": "Caption", "character": "Of", "costume": "Costume", "day": "Story day", "picture": "Picture", "place": "Of the place", "position": "Order", "scene": "For the scene", "story": "Story", "thing": "Thing" } }, "story_place": { "list_takes_capture": true, "takes_an": false, "labels": { "about": "About", "name": "Name", "picture": "Picture", "scenes": "Scenes", "story": "Story" } }, "story_scene": { "list_takes_capture": true, "takes_an": false, "labels": { "answer": "Grew from", "body": "Scene", "day": "Story day", "heading": "Scene heading", "lines_sum": "Lines kept for", "minutes": "Minutes", "pages": "Pages", "place": "Place", "position": "Order", "question": "Open question", "setting": "Inside or out", "speakers": "Who speaks", "status": "Status", "story": "Story", "summary": "What happens", "time": "Time", "words": "Words" } }, "story_sequence": { "list_takes_capture": true, "takes_an": false, "labels": { "folded": "Folded", "position": "Starts at", "story": "Story", "title": "Title" } }, "story_story": { "list_takes_capture": true, "takes_an": false, "labels": { "chosen_at": "Last written in", "format": "Kind", "interval_at": "Interval at", "language": "Language", "logline": "In a sentence", "made_at": "Started", "pages": "Pages", "scenes": "Scenes", "title": "Title", "translation_of": "Translated from", "written_by": "Written by" } }, "story_thing": { "list_takes_capture": true, "takes_an": false, "labels": { "about": "About", "kind": "Kind", "name": "Name", "picture": "Picture", "story": "Story" } }, "story_use": { "list_takes_capture": true, "takes_an": true, "labels": { "character": "Who has it", "costume": "Costume", "note": "Note", "scene": "Scene", "story": "Story", "thing": "Thing" } }, "subscription": { "list_takes_capture": true, "takes_an": false, "labels": { "amount": "Amount", "cancel_url": "Cancel link", "charges": "Charges recorded", "currency": "Currency", "cycle": "Cycle", "last_charged": "Last charged", "monthly_inr": "Per month, ₹ (approx, for ordering)", "name": "Name", "next_renewal": "Next renewal", "notes": "Notes", "paid_total": "Paid in all", "per_month": "Per month", "provider": "Provider", "started": "Started", "status": "Status" } }, "subscription_charge": { "list_takes_capture": true, "takes_an": false, "labels": { "amount": "Amount", "charged_on": "Charged on", "currency": "Currency", "kind": "Kind", "name": "Charge", "notes": "Notes", "payment": "Paid by", "period": "Covers", "reference": "Reference", "subscription": "Subscription" } }, "theme": { "list_takes_capture": false, "takes_an": false, "labels": { "definition": "Definition", "drawn": "Drawn from", "name": "Theme", "worn": "Worn" } }, "thread": { "list_takes_capture": false, "takes_an": false, "labels": { "archived": "Archived", "changes_waiting": "Changes waiting", "channels": "Channels", "cleared_before": "Cleared before", "contact_id": "Contact", "created_by_phone": "Created by phone", "delivered_seq": "Delivered seq", "description": "Description", "draft": "Draft", "draft_reply_to_id": "Draft reply to", "external_key": "External key", "filed_copy": "Filed copy", "group_log": "Group changes", "kind": "Kind", "last_message_at": "Last message", "last_message_preview": "Last line", "member_people": "People", "member_self": "Member self", "members": "Members", "members_unmatched": "Members unmatched", "muted": "Muted", "muted_until": "Muted until", "name": "Name", "photo_key": "Photo", "pinned": "Pinned", "pinned_at": "Pinned", "pinned_messages": "Pinned messages", "read_seq": "Read seq", "request": "Request", "send_blocked_reason": "Why it cannot send", "sendable": "Can send", "state_line": "State line", "summary": "Summary", "summary_by": "Summary by", "summary_updated_at": "Summary updated", "title": "Title", "trashed_at": "Trashed", "unread": "Unread", "unread_marked_at": "Unread marked" } }, "thread_member": { "list_takes_capture": false, "takes_an": false, "labels": { "contact_id": "Contact", "display_name": "Display name", "is_self": "Is self", "left_at": "Left", "name": "Name", "person_id": "Person", "role": "Role", "thread_id": "Thread" } }, "todo": { "list_takes_capture": true, "takes_an": false, "labels": { "completed_at": "Completed", "created_at": "Made", "done_before": "Done before", "due_at": "Due", "mark": "Mark", "notes": "Details", "occurrence_at": "Occurrence at", "people": "People", "priority": "Priority", "project": "Project", "recurrence_id": "Repeat rule", "repeats": "Repeats", "send_id": "Send", "sent_at": "Sent", "sent_by": "Sent by", "sent_by_number": "Sent from", "snoozed_until": "Snoozed until", "status": "Status", "title": "Title", "trashed_at": "Trashed at" } }, "todo_recurrence": { "list_takes_capture": false, "takes_an": false, "labels": { "dtstart": "Starts", "materialized_until": "Materialized until", "notes": "Notes", "paused": "Paused", "priority": "Priority", "rrule": "Repeats", "source_inbox_id": "Source inbox", "title": "Title", "trashed_at": "Trashed" } }, "transaction": { "list_takes_capture": true, "takes_an": false, "labels": { "account_id": "Account", "amount_known": "Amount known", "amount_minor": "Amount", "balance_after_minor": "Balance after", "balance_before_minor": "Balance before", "balance_state": "Balance state", "between_us": "Between us", "can_delete": "Can delete", "certainty": "Certainty", "counterparty_person_id": "Person", "created_by": "Created by", "currency": "Currency", "description": "What", "direction": "Direction", "due_date": "Due", "email_thread_id": "From mail", "external_hash": "External hash", "for_period": "For month", "moves_money": "Moves money", "notes": "Notes", "occurred_on": "Date", "payee_text": "Payee", "repeat": "Repeat", "repeat_day": "Repeat day", "settles_transaction_id": "Settles", "source": "Source", "source_inbox_id": "Source inbox", "status": "Status", "tag": "Tag", "title": "With", "transfer_of": "Transfer", "trashed_at": "Trashed" } }, "vault_key": { "list_takes_capture": false, "takes_an": false, "labels": { "created_at": "Asked", "device_id": "Device", "fingerprint": "Fingerprint", "name": "Name", "public_key": "Public key", "vmk_version": "Vault key version", "wrapped_vmk": "Wrapped vault key" } }, "video": { "list_takes_capture": false, "takes_an": false, "labels": { "aesthetic_score": "Aesthetic score", "albums": "Albums", "camera_make": "Camera make", "camera_model": "Camera model", "caption": "Caption", "content_type": "Content type", "curation_score": "Curation score", "duration_ms": "Length", "favourite": "Favourite", "height": "Height", "key": "Film", "labels": "Labels", "latitude": "Latitude", "longitude": "Longitude", "orientation": "Orientation", "origin_handle": "Origin handle", "original_filename": "File name", "people": "People", "phash": "Phash", "place_city": "Place city", "place_country": "Place country", "place_name": "Place", "place_region": "Place region", "poster_key": "Poster", "preview": "Preview", "review_at": "Suggested", "review_by": "Suggested by", "review_note": "Review", "sha256": "Sha256", "size_bytes": "Size", "subtypes": "Subtypes", "summary": "Description", "summary_at": "Described", "summary_by": "Summary by", "taken_at": "Taken", "taken_offset": "Taken offset", "trashed_at": "Trashed", "width": "Dimensions" } }, "watch": { "list_takes_capture": true, "takes_an": false, "labels": { "device": "On", "episode": "Episode", "episode_title": "Episode", "film": "Film", "film_title": "Film", "finished": "Finished", "seconds": "Watched", "started_at": "Started", "with": "With" } } }, "pages": { "album": { "parts": { "shape": "sheet", "head": { "facts": [] }, "links": [], "lists": [ { "table": "album_item", "relation": "album_id", "heading": "Pictures", "face": "photos" } ], "acts": { "more": [] }, "cards": [ { "column": "starts_at", "until": "ends_at" }, { "column": "member_count" }, { "column": "state" } ], "opens": "facts" }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "album_item": { "parts": { "shape": "sheet", "head": { "facts": [] }, "links": [], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "taken_at" }, { "column": "duration_ms" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "artist": { "parts": { "shape": "sheet", "head": { "facts": [ "sort_name", "albums" ] }, "links": [], "lists": [], "acts": { "more": [ "play", "shuffle" ] }, "cards": [ { "column": "photo" }, { "column": "sort_name" }, { "column": "albums" }, { "column": "songs" }, { "column": "mb_artist" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "backup": { "parts": { "shape": "sheet", "head": { "facts": [ "last_at" ] }, "links": [], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "last_error", "width": "full", "when": { "column": "last_error", "present": true } }, { "column": "kept" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "bin": { "parts": { "shape": "sheet", "head": { "facts": [ "removed_by", "creator_name", "binned_at", "kept_until" ] }, "links": [], "lists": [], "acts": { "more": [ "restore_database" ], "away": "delete" }, "cards": [] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "board": { "parts": { "shape": "desk", "head": { "facts": [ "drawn" ] }, "links": [], "body": "definition", "lists": [], "acts": { "more": [] }, "strip": [ { "column": "drawn" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "book": { "parts": { "shape": "desk", "head": { "facts": [ "author", "format" ] }, "links": [], "body": "review", "lists": [], "acts": { "more": [ "read", "start", "finish", "resume", "want", "keep_on_phone", "remove_download", "rate", "review", "find_details", "add_file" ], "away": "stop" }, "strip": [ { "column": "cover" }, { "column": "author" }, { "column": "status" }, { "column": "rating" }, { "column": "progress" }, { "column": "added_on" }, { "column": "started_on" }, { "column": "finished_on" }, { "column": "read_count" }, { "column": "position_at" }, { "column": "description" }, { "column": "series" }, { "column": "series_number" }, { "column": "publisher" }, { "column": "year" }, { "column": "pages" }, { "column": "language" }, { "column": "subjects" }, { "column": "isbn" }, { "column": "doi" }, { "column": "format" }, { "column": "on_phone" }, { "column": "source" }, { "column": "ol_work" }, { "column": "ol_edition" }, { "column": "goodreads_id" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "call": { "parts": { "shape": "sheet", "head": { "facts": [ "started_at", "duration_s", "provider", "kind" ] }, "links": [], "lists": [], "acts": { "more": [ "person" ] }, "cards": [ { "column": "person_id" }, { "column": "outcome_label", "object": "phone" } ], "strip": [] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "copy": { "parts": { "shape": "sheet", "head": { "facts": [ "role", "kind" ], "state": "reach" }, "links": [], "lists": [], "acts": { "main": "sync_now", "more": [] }, "cards": [ { "column": "ambient", "object": "words" }, { "column": "waiting_since", "label": "Mac away since" }, { "column": "not_answering", "when": { "column": "ambient", "present": false } }, { "column": "behind", "when": { "column": "behind_at_least", "present": false } }, { "column": "behind_at_least" }, { "column": "synced_at" }, { "column": "changes_waiting" }, { "column": "doing_now", "object": "words", "when": { "column": "doing_now", "values": [ "pulling_changes", "fetching_bytes", "sending", "catching_up", "paused" ] } }, { "column": "keeps", "object": "archive" }, { "column": "unreachable_since", "label": "Away since" }, { "column": "last_heard_at" }, { "column": "bytes_wanted", "object": "figure" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "device": { "parts": { "shape": "sheet", "head": { "facts": [ "platform", "last_seen_at" ], "state": "state" }, "links": [], "lists": [], "acts": { "main": "sign_out", "more": [ "sign_in", "sync_now", "send_report", "rekey", "approve", "add_samples", "share_ink" ], "away": "erase_here" }, "cards": [ { "column": "removal_state" }, { "column": "bytes_wanted" }, { "column": "ambient", "object": "words" }, { "column": "changes_waiting" }, { "column": "waiting_since", "label": "Mac away since" }, { "column": "last_synced" }, { "column": "sync_trouble" }, { "column": "refusal" }, { "column": "runner_problem" }, { "column": "kind", "object": "device" }, { "column": "notify", "object": "bell", "label": "Alerts", "switches": [ "notify", "notify_reminders", "notify_events", "notify_birthdays", "notify_alarms" ], "caption": "{on} of {total} on", "when": { "column": "notify_system", "values": [ "on" ] } }, { "column": "notify_system", "object": "bell", "label": "Alerts", "when": { "column": "notify_system", "values": [ "declined" ] } }, { "column": "sessions", "object": "figure", "when": { "column": "status", "values": [ "this device", "approved" ] } }, { "column": "keep_bytes", "object": "archive", "when": { "column": "status", "values": [ "approved" ] } }, { "column": "backup", "when": { "column": "backup_answered_by", "values": [ "this mac", "serving mac" ] } }, { "column": "backup_why", "when": { "column": "backup_answered_by", "values": [ "this mac", "serving mac" ] } }, { "column": "disk_free_gb", "width": "full", "object": "figure", "label": "Free disk", "when": { "column": "status", "values": [ "approved" ] } }, { "column": "keep_free_percent", "width": "full", "object": "figure", "when": { "column": "kind", "values": [ "Mac" ] } }, { "column": "keep_free_bytes", "object": "figure", "label": "Set keep free", "when": { "column": "kind", "values": [ "Mac" ] } }, { "column": "runner_confirm", "when": { "column": "runner_confirm", "values": [ "waiting", "short", "confirmed" ] } }, { "column": "runner_drop", "when": { "column": "runner_drop", "values": [ "waiting", "done" ] } }, { "column": "keep_mail", "object": "mail" }, { "column": "keep_statuses", "object": "message" }, { "column": "keep_files_whatsapp", "object": "chat" }, { "column": "keep_files_instagram", "object": "lens" }, { "column": "keep_files_photo", "object": "picture" }, { "column": "keep_files_video", "object": "picture" }, { "column": "keep_files_document", "object": "file" }, { "column": "kept_space_bytes", "object": "archive", "label": "Kept space" }, { "column": "reached_through", "object": "link" }, { "column": "start_at_login" }, { "column": "stay_awake" }, { "column": "error_reports" }, { "column": "auto_updates" } ], "strip": [], "groups": [ { "columns": [ "receipts_behind", "receipts_to_send", "fetch_count", "fetch_bytes", "upload_count", "upload_bytes" ] }, { "columns": [ "last_contact", "serving_mac" ] }, { "column": "received_since_open", "reads": true }, { "columns": [ "removal_state", "ai_spend_line", "asked_at", "approved_at", "approved_by_device", "revoked_at" ] }, { "columns": [ "revoked_reason", "serving_place", "sessions_cap", "ai_day_cap_usd", "chip", "cpu_count" ] }, { "columns": [ "mem_total_gb", "os_version", "update_hold", "load_1", "sessions_running", "smooth_scrolling" ] }, { "columns": [ "hangs_today", "cpu_time_today", "peak_memory", "backup", "backup_why", "media_backup" ] }, { "columns": [ "push", "start_at_login", "stay_awake", "error_reports", "auto_updates", "error_reports_to" ] }, { "columns": [ "update_feed", "reached_through", "keep_mail", "keep_statuses", "keep_files_whatsapp", "keep_files_instagram" ] }, { "columns": [ "keep_files_photo", "keep_files_video", "keep_files_document", "kept_space_bytes", "keep_fetch_full", "keep_bytes" ] }, { "columns": [ "keep_bytes_note", "digits", "rekey", "rekey_digits", "rekeyed_at", "last_seen_at" ] }, { "columns": [ "refusal", "ambient", "changes_waiting", "waiting_since", "last_synced", "sync_trouble" ] }, { "columns": [ "sync_background", "search_index", "backups", "notifications", "notifications_off", "notify" ] }, { "columns": [ "notify_reminders", "notify_events", "notify_birthdays", "notify_alarms", "keep_free_bytes", "bytes_wanted" ] }, { "columns": [ "held_until", "hold_reason" ] }, { "column": "placement_problems", "reads": true }, { "column": "reported_state_lines", "reads": true }, { "column": "keep_fetch_coming", "reads": true }, { "column": "keep_always", "reads": true }, { "column": "coming", "reads": true }, { "column": "failed_files", "reads": true }, { "column": "sync_tables", "reads": true, "folded": true } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "document": { "parts": { "shape": "desk", "head": { "facts": [] }, "links": [], "body": "facts", "lists": [], "acts": { "more": [ "statement" ], "away": "delete" }, "strip": [ { "column": "summary" }, { "column": "issuer" }, { "column": "document_date" }, { "column": "status", "when": { "column": "status", "values": [ "processing", "summarizing", "locked", "failed" ] } }, { "column": "state_message", "when": { "column": "status", "values": [ "processing", "summarizing", "locked", "failed" ] } }, { "column": "unlock_password" }, { "column": "period_start", "until": "period_end" } ] }, "page_parts": [ "title", "facts", "content", "grid", "sections" ] }, "duplicate": { "parts": { "shape": "sheet", "head": { "facts": [] }, "links": [ "keep_id", "copy_id" ], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "keep_key" }, { "column": "copy_key" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "email": { "parts": { "shape": "desk", "head": { "facts": [ "from_name", "sent_at" ] }, "links": [], "body": "body", "lists": [], "acts": { "more": [ "thread" ] }, "strip": [ { "column": "media" }, { "column": "from_email" }, { "column": "to_line" }, { "column": "cc_line" } ], "opens": "body" }, "page_parts": [ "title", "facts", "content", "grid", "sections" ] }, "email_sender": { "parts": { "shape": "sheet", "head": { "facts": [ "address" ] }, "links": [], "lists": [ { "table": "email_thread", "match": { "column": "sender_address", "parent": "address" }, "heading": "Mail" } ], "acts": { "more": [ "keep", "add_to_people" ], "away": "junk" }, "cards": [ { "column": "kind" }, { "column": "last_at" }, { "column": "unread_count" }, { "column": "blocked" } ], "strip": [] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "email_thread": { "parts": { "shape": "desk", "head": { "facts": [ "sender" ] }, "links": [], "lists": [], "acts": { "more": [ "star", "unstar", "inbox", "not_junk", "record_as_transaction", "add_to_calendar", "transaction", "event" ], "away": "junk" }, "strip": [ { "column": "marks" }, { "column": "record_on" }, { "column": "amount_minor" }, { "column": "merchant" }, { "column": "reference" } ] }, "page_parts": [ "title", "facts", "messages", "grid" ] }, "event": { "parts": { "shape": "desk", "head": { "facts": [] }, "links": [], "body": "notes", "lists": [ { "table": "email_thread", "relation": "event_id", "heading": "Mail" } ], "acts": { "more": [ "set-date", "invite", "open-email-thread-id", "open-people", "open-project" ], "away": "delete" }, "cards": [ { "column": "start_time", "label": "time" }, { "column": "starts_at", "label": "when", "until": "ends_at" }, { "column": "location", "label": "where" }, { "column": "my_response" }, { "column": "guest_responses" }, { "column": "rrule", "object": "ring", "label": "repeats" }, { "column": "calendar_name", "label": "calendar" } ], "strip": [] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "everything": { "parts": { "shape": "sheet", "head": { "facts": [ "count", "changed" ] }, "links": [], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "count" }, { "column": "changed" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "face": { "parts": { "shape": "sheet", "head": { "facts": [], "state": "decision" }, "links": [], "lists": [], "acts": { "more": [ "open-photo", "open-person" ] }, "cards": [ { "column": "likelihood" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "fetch": { "parts": { "shape": "sheet", "head": { "facts": [ "source", "wants" ] }, "links": [], "lists": [], "acts": { "more": [ "cancel", "retry" ], "away": "remove" }, "cards": [ { "column": "picture" }, { "column": "state" }, { "column": "stage_line" }, { "column": "progress" }, { "column": "error" }, { "column": "landed_count" }, { "column": "source" }, { "column": "source_kind" }, { "column": "wants" }, { "column": "bytes" }, { "column": "of_bytes" }, { "column": "speed_bps" }, { "column": "eta_seconds" }, { "column": "files" }, { "column": "machine" }, { "column": "added_on" }, { "column": "started_on" }, { "column": "finished_on" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "fetch_file": { "parts": { "shape": "sheet", "head": { "facts": [ "kind", "bytes" ] }, "links": [ "fetch", "film", "episode", "series", "song", "book", "photo", "document" ], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "kind" }, { "column": "bytes" }, { "column": "fetch" }, { "column": "film" }, { "column": "episode" }, { "column": "song" }, { "column": "book" }, { "column": "photo" }, { "column": "document" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "film": { "parts": { "shape": "desk", "head": { "facts": [ "year", "kind" ] }, "links": [ "recommended_by" ], "body": "review", "lists": [], "acts": { "more": [ "play", "play_from_start", "mark_watched", "mark_unwatched", "find_details", "find_subtitles", "generate_subtitles", "give_subtitles", "keep_on_phone", "keep_series", "remove_download" ] }, "strip": [ { "column": "poster" }, { "column": "year" }, { "column": "kind" }, { "column": "status" }, { "column": "rating" }, { "column": "minutes" }, { "column": "subtitle_note" }, { "column": "watched_on" }, { "column": "last_watched_at" }, { "column": "watched_with" }, { "column": "recommended_by" }, { "column": "recommended_by_name" }, { "column": "synopsis" }, { "column": "director" }, { "column": "cast" }, { "column": "genres" }, { "column": "certificate" }, { "column": "language" }, { "column": "country" }, { "column": "backdrop" }, { "column": "added_on" }, { "column": "on_phone" }, { "column": "tmdb_id" }, { "column": "imdb_id" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "film_episode": { "parts": { "shape": "desk", "head": { "facts": [ "number", "minutes" ] }, "links": [ "season", "series" ], "body": "synopsis", "lists": [], "acts": { "more": [ "play", "play_from_start", "mark_watched", "mark_unwatched", "find_subtitles", "generate_subtitles", "give_subtitles", "keep_on_phone", "remove_download" ] }, "strip": [ { "column": "still" }, { "column": "series" }, { "column": "season" }, { "column": "number" }, { "column": "minutes" }, { "column": "subtitle_note" }, { "column": "aired" }, { "column": "status" }, { "column": "watched_on" }, { "column": "rating" }, { "column": "on_phone" }, { "column": "tmdb_id" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "film_season": { "parts": { "shape": "sheet", "head": { "facts": [ "number", "year" ] }, "links": [ "film" ], "lists": [], "acts": { "more": [ "keep_season", "remove_download" ] }, "cards": [ { "column": "film" }, { "column": "number" }, { "column": "year" }, { "column": "episodes" }, { "column": "intro_from" }, { "column": "intro_to" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "health_day": { "parts": { "shape": "sheet", "head": { "facts": [ "day", "value" ] }, "links": [], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "day" }, { "column": "value" }, { "column": "unit" }, { "column": "min" }, { "column": "max" }, { "column": "samples" }, { "column": "state" }, { "column": "source" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "health_measurement": { "parts": { "shape": "sheet", "head": { "facts": [ "measured_at", "value" ] }, "links": [], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "measured_at" }, { "column": "value" }, { "column": "second" }, { "column": "unit" }, { "column": "context" }, { "column": "device" }, { "column": "source" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "health_person": { "parts": { "shape": "desk", "head": { "facts": [ "owner", "sex" ] }, "links": [ "person" ], "body": "names", "lists": [], "acts": { "more": [] }, "strip": [ { "column": "owner" }, { "column": "sex" }, { "column": "born_on" }, { "column": "age_years" }, { "column": "age_on" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "health_workout": { "parts": { "shape": "sheet", "head": { "facts": [ "day", "started_at" ] }, "links": [], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "day" }, { "column": "started_at" }, { "column": "ended_at" }, { "column": "minutes" }, { "column": "distance_m" }, { "column": "energy_kcal" }, { "column": "heart_rate_avg" }, { "column": "heart_rate_max" }, { "column": "device" }, { "column": "source" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "highlight": { "parts": { "shape": "desk", "head": { "facts": [ "book_title", "colour" ] }, "links": [ "book" ], "body": "text", "lists": [], "acts": { "more": [ "go_to", "recolour", "note" ], "away": "remove" }, "strip": [ { "column": "note" }, { "column": "book_title" }, { "column": "chapter" }, { "column": "page_label" }, { "column": "colour" }, { "column": "made_at" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "journal_entry": { "parts": { "shape": "desk", "head": { "facts": [ "day" ] }, "links": [], "body": "body", "lists": [], "acts": { "more": [ "star", "unstar" ], "away": "delete" }, "cards": [ { "column": "mood" }, { "column": "weather" } ], "strip": [] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "lab_report": { "parts": { "shape": "desk", "head": { "facts": [ "day", "order_id" ] }, "links": [ "person" ], "body": "versions", "lists": [], "acts": { "more": [] }, "strip": [ { "column": "person" }, { "column": "day" }, { "column": "status" }, { "column": "results" }, { "column": "pdf" }, { "column": "printed_name" }, { "column": "age" }, { "column": "sex" }, { "column": "born_on" }, { "column": "order_id" }, { "column": "sample_type" }, { "column": "collected_via" }, { "column": "referred_by" }, { "column": "collected_at" }, { "column": "received_at" }, { "column": "reported_at" }, { "column": "unmatched" }, { "column": "added_by" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "lab_result": { "parts": { "shape": "desk", "head": { "facts": [ "day", "panel" ] }, "links": [ "person", "report" ], "body": "range", "lists": [], "acts": { "more": [] }, "strip": [ { "column": "person" }, { "column": "result" }, { "column": "unit" }, { "column": "day" }, { "column": "panel" }, { "column": "method" }, { "column": "specimen" }, { "column": "flag" }, { "column": "canonical_value" }, { "column": "canonical_unit" }, { "column": "report" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "lines": { "parts": { "shape": "sheet", "head": { "facts": [ "set", "line" ] }, "links": [], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "set" }, { "column": "line" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "listen": { "parts": { "shape": "sheet", "head": { "facts": [] }, "links": [ "song" ], "lists": [], "acts": { "more": [] }, "cards": [] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "media": { "parts": { "shape": "desk", "head": { "facts": [ "taken_at", "place_name" ] }, "links": [], "body": "summary", "lists": [], "acts": { "main": "share", "more": [ "favourite", "unfavourite" ], "away": "delete" }, "strip": [ { "column": "taken_at" }, { "column": "place_name" }, { "column": "key" } ] }, "page_parts": [ "title", "facts", "content", "grid", "sections" ] }, "meetings_action": { "parts": { "shape": "sheet", "head": { "facts": [ "position", "who" ] }, "links": [ "meeting", "speaker", "todo" ], "lists": [], "acts": { "more": [ "add_to_todos" ] }, "cards": [ { "column": "who" }, { "column": "due" }, { "column": "due_said" }, { "column": "meeting" }, { "column": "todo" }, { "column": "speaker" }, { "column": "at_ms" }, { "column": "made_by" }, { "column": "position" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "meetings_line": { "parts": { "shape": "desk", "head": { "facts": [ "start_ms", "end_ms" ] }, "links": [ "meeting", "speaker" ], "body": "text", "lists": [], "acts": { "more": [] }, "strip": [ { "column": "speaker" }, { "column": "start_ms" }, { "column": "end_ms" }, { "column": "language" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "meetings_meeting": { "parts": { "shape": "desk", "head": { "facts": [ "kind", "status" ] }, "links": [ "note" ], "body": "summary", "lists": [], "acts": { "more": [ "transcribe", "summarise", "export" ], "away": "delete" }, "strip": [ { "column": "kind" }, { "column": "status" }, { "column": "status_why" }, { "column": "started_at" }, { "column": "duration_ms" }, { "column": "languages" }, { "column": "speakers" }, { "column": "audio" }, { "column": "summary_why" }, { "column": "actions" }, { "column": "transcribe_on" }, { "column": "transcribed_by" }, { "column": "transcribed_at" }, { "column": "summarised_by" }, { "column": "summarise_on" }, { "column": "recorded_on" }, { "column": "ended_at" }, { "column": "lines" }, { "column": "attempts" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "meetings_speaker": { "parts": { "shape": "sheet", "head": { "facts": [ "label", "lines" ] }, "links": [ "meeting", "person" ], "lists": [], "acts": { "more": [ "name_speaker" ] }, "cards": [ { "column": "person" }, { "column": "label" }, { "column": "lines" }, { "column": "talk_ms" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "memory": { "parts": { "shape": "desk", "head": { "facts": [ "created_at" ] }, "links": [], "body": "body", "lists": [], "acts": { "more": [ "open-superseded-by" ] }, "cards": [ { "column": "status" }, { "column": "slug" }, { "column": "origin_label" }, { "column": "reviewed_at" } ], "strip": [] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "message": { "parts": { "shape": "desk", "head": { "facts": [ "sender_name", "sent_at" ] }, "links": [], "body": "display_body", "lists": [], "acts": { "more": [ "keep", "unkeep", "thread" ], "away": "hide" }, "strip": [ { "column": "media" }, { "column": "reply_preview" }, { "column": "reactions" }, { "column": "send_state" }, { "column": "send_error" }, { "column": "shared_status" } ], "opens": "body" }, "page_parts": [ "title", "facts", "content", "grid", "sections" ] }, "message_import": { "parts": { "shape": "desk", "head": { "facts": [ "state" ] }, "links": [], "body": "receipt", "lists": [], "acts": { "main": "choose", "more": [ "whatsapp", "instagram", "retry", "owner", "thread" ] }, "strip": [ { "column": "media_receipt" } ] }, "page_parts": [ "title", "facts", "content", "grid", "sections" ] }, "money_account": { "parts": { "shape": "sheet", "head": { "facts": [ "kind", "institution" ] }, "links": [], "lists": [ { "table": "statement", "relation": "account_id", "heading": "Statements" } ], "acts": { "more": [] }, "cards": [ { "column": "kind" }, { "column": "institution" }, { "column": "is_pooled" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "money_owed": { "parts": { "shape": "sheet", "head": { "facts": [ "occurred_on" ] }, "links": [ "account_id", "counterparty_person_id" ], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "occurred_on" }, { "column": "account_id" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "music_album": { "parts": { "shape": "desk", "head": { "facts": [ "artist_name", "year" ] }, "links": [ "artist" ], "body": "filled_from", "lists": [], "acts": { "more": [ "play", "shuffle", "play_next", "add_to_queue", "find_details", "keep_on_phone", "remove_download" ] }, "strip": [ { "column": "cover" }, { "column": "artist" }, { "column": "artist_name" }, { "column": "year" }, { "column": "songs" }, { "column": "length" }, { "column": "compilation" }, { "column": "discs" }, { "column": "original_year" }, { "column": "release_type" }, { "column": "label" }, { "column": "catalog_number" }, { "column": "barcode" }, { "column": "bought_on" }, { "column": "store_url" }, { "column": "store_id" }, { "column": "booklet" }, { "column": "added_on" }, { "column": "last_played_at" }, { "column": "album_gain" }, { "column": "album_peak" }, { "column": "on_phone" }, { "column": "mb_release" }, { "column": "mb_release_group" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "note": { "parts": { "shape": "desk", "head": { "facts": [ "updated_at" ] }, "links": [], "body": "body", "lists": [], "acts": { "more": [ "pin", "unpin" ], "away": "delete" }, "strip": [] }, "page_parts": [ "title", "facts", "content", "grid", "sections" ] }, "passkey": { "parts": { "shape": "desk", "head": { "facts": [ "rp_name", "user_name" ] }, "links": [], "body": "public_key", "lists": [], "acts": { "more": [] }, "strip": [ { "column": "rp_name" }, { "column": "user_name" }, { "column": "algorithm" }, { "column": "transports" }, { "column": "uses" }, { "column": "last_used_at" }, { "column": "note" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "person": { "parts": { "shape": "sheet", "head": { "facts": [ "role_title" ] }, "links": [], "body": "summary", "lists": [ { "table": "person_handle", "relation": "person_id", "heading": "Handles", "main_act": "keep", "keeps": [ "phones", "emails", "instagrams" ] }, { "table": "todo", "relation": "people", "heading": "Todos" }, { "table": "thread", "relation": "member_people", "heading": "Messages" }, { "table": "call", "relation": "person_id", "heading": "Calls" }, { "table": "note", "relation": "people", "heading": "Notes" }, { "table": "event", "relation": "people", "heading": "Events" }, { "table": "photo", "relation": "people", "heading": "Photos", "face": "photos" }, { "table": "story", "relation": "person_id", "heading": "Social" }, { "table": "document", "relation": "people", "heading": "Documents" } ], "acts": { "main": "tel:phones", "more": [ "sms:phones", "mailto:emails" ], "away": "archive" }, "cards": [ { "column": "phones" }, { "column": "emails" }, { "column": "instagrams" }, { "column": "city" }, { "column": "timezone", "when": { "column": "city", "present": false } }, { "column": "birthday" }, { "column": "language", "object": "message" }, { "column": "org", "label": "Works at" }, { "column": "summary", "width": "full" } ], "strip": [] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "person_handle": { "parts": { "shape": "sheet", "head": { "facts": [] }, "links": [], "lists": [], "acts": { "main": "keep", "more": [ "person" ], "away": "remove" }, "cards": [ { "column": "kind" }, { "column": "kept" }, { "column": "source" } ], "strip": [] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "photo": { "parts": { "shape": "sheet", "head": { "facts": [ "taken_at", "place_name" ] }, "links": [], "body": "summary", "lists": [ { "table": "face", "relation": "photo_id", "heading": "People" } ], "acts": { "main": "share", "more": [ "favourite", "unfavourite", "describe" ], "away": "delete" }, "cards": [ { "column": "taken_at" }, { "column": "place_name" }, { "column": "review_note" }, { "column": "ocr_text", "width": "full" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "schema_move": { "parts": { "shape": "sheet", "head": { "facts": [ "state", "tables_left" ] }, "links": [], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "state" }, { "column": "tables_left" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "secret": { "parts": { "shape": "sheet", "head": { "facts": [ "kind", "username" ] }, "links": [], "lists": [], "acts": { "main": "copy_password", "more": [], "away": "delete" }, "cards": [ { "column": "kind" }, { "column": "username" }, { "column": "site" }, { "column": "service" }, { "column": "expires_at" }, { "column": "last_used_at" } ], "strip": [] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "session": { "parts": { "shape": "desk", "head": { "facts": [ "title", "tool" ] }, "links": [ "project_id", "todo_id", "parent_session_id" ], "body": "summary", "lists": [], "acts": { "more": [] }, "strip": [ { "column": "state" }, { "column": "project_id" }, { "column": "machine" }, { "column": "branch" }, { "column": "model" }, { "column": "todo_id" }, { "column": "hold_reason" }, { "column": "error" } ] }, "page_parts": [ "title", "facts", "messages" ] }, "settings": { "parts": { "shape": "sheet", "head": { "facts": [ "route" ] }, "links": [], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "route" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "sighting": { "parts": { "shape": "sheet", "head": { "facts": [] }, "links": [], "lists": [], "acts": { "more": [ "open-photo", "open-video" ] }, "cards": [ { "column": "source" }, { "column": "seen_at" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "song": { "parts": { "shape": "desk", "head": { "facts": [ "artist_name", "format" ] }, "links": [ "artist", "album" ], "body": "lyrics", "lists": [], "acts": { "more": [ "play", "play_next", "add_to_queue", "favourite", "unfavourite", "find_lyrics", "keep_on_phone", "remove_download" ] }, "strip": [ { "column": "cover" }, { "column": "artist_name" }, { "column": "artist" }, { "column": "album" }, { "column": "track_number" }, { "column": "disc_number" }, { "column": "duration" }, { "column": "favourite" }, { "column": "synced_lyrics" }, { "column": "lyrics_source" }, { "column": "play_count" }, { "column": "skip_count" }, { "column": "last_played_at" }, { "column": "added_on" }, { "column": "year" }, { "column": "genre" }, { "column": "composer" }, { "column": "isrc" }, { "column": "format" }, { "column": "bitrate" }, { "column": "sample_rate" }, { "column": "track_gain" }, { "column": "track_peak" }, { "column": "on_phone" }, { "column": "source" }, { "column": "path" }, { "column": "mb_recording" }, { "column": "mb_release_track" }, { "column": "filled_from" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "statement": { "parts": { "shape": "sheet", "head": { "facts": [] }, "links": [], "lists": [ { "table": "statement_line", "relation": "statement_id", "heading": "Lines" } ], "acts": { "more": [] }, "cards": [ { "column": "balance_check" }, { "column": "read_status" }, { "column": "visual_problem", "when": { "column": "visual_problem", "values": [ "unavailable", "renderer_failed", "glyph_maps_unread", "heading_mismatch" ] } }, { "column": "visual_problem_page", "when": { "column": "visual_problem", "values": [ "page_mismatch" ] } }, { "column": "visual_problem_field", "when": { "column": "visual_problem", "values": [ "heading_mismatch", "page_mismatch" ] } }, { "column": "read_error" }, { "column": "opening_balance_minor" }, { "column": "closing_balance_minor" }, { "column": "sum_in_minor" }, { "column": "sum_out_minor" }, { "column": "recorded_count" } ], "strip": [] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "statement_line": { "parts": { "shape": "sheet", "head": { "facts": [ "posted_on" ], "state": "state" }, "links": [], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "amount_minor" }, { "column": "text", "label": "Bank's words" }, { "column": "balance_after_minor" }, { "column": "ignored_reason" } ], "strip": [] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "story": { "parts": { "shape": "desk", "head": { "facts": [ "sender_label", "posted_at", "source" ] }, "links": [], "body": "caption", "lists": [], "acts": { "main": "keep", "more": [ "unkeep", "person" ] }, "strip": [ { "column": "media_key" }, { "column": "retention_line" }, { "column": "expiry_line" }, { "column": "reactions" } ] }, "page_parts": [ "title", "facts", "content", "grid", "sections" ] }, "story_answer": { "parts": { "shape": "desk", "head": { "facts": [ "skipped", "answered_at" ] }, "links": [ "story" ], "body": "answer", "lists": [], "acts": { "more": [] }, "strip": [ { "column": "skipped" }, { "column": "answered_at" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "story_character": { "parts": { "shape": "desk", "head": { "facts": [ "role", "want" ] }, "links": [ "story" ], "body": "about", "lists": [], "acts": { "more": [], "away": "delete" }, "strip": [ { "column": "picture" }, { "column": "role" }, { "column": "want" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "story_costume": { "parts": { "shape": "desk", "head": { "facts": [ "day" ] }, "links": [ "story", "character" ], "body": "about", "lists": [], "acts": { "more": [] }, "strip": [ { "column": "picture" }, { "column": "character" }, { "column": "day" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "story_draft": { "parts": { "shape": "desk", "head": { "facts": [ "made_at", "scenes" ] }, "links": [ "story" ], "body": "cast", "lists": [], "acts": { "more": [] }, "strip": [ { "column": "made_at" }, { "column": "scenes" }, { "column": "pages" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "story_draft_scene": { "parts": { "shape": "desk", "head": { "facts": [ "summary" ] }, "links": [ "draft", "story" ], "body": "body", "lists": [], "acts": { "more": [] }, "strip": [ { "column": "summary" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "story_line": { "parts": { "shape": "desk", "head": { "facts": [ "position", "kind" ] }, "links": [ "story", "scene", "character" ], "body": "text", "lists": [], "acts": { "more": [] }, "strip": [ { "column": "scene" }, { "column": "position" }, { "column": "kind" }, { "column": "character" }, { "column": "who" }, { "column": "aside" }, { "column": "form" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "story_note": { "parts": { "shape": "desk", "head": { "facts": [] }, "links": [ "story", "scene" ], "body": "body", "lists": [], "acts": { "more": [], "away": "delete" }, "strip": [ { "column": "scene" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "story_picture": { "parts": { "shape": "sheet", "head": { "facts": [ "day" ] }, "links": [ "story", "character", "place", "scene", "costume", "thing" ], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "picture" }, { "column": "character" }, { "column": "place" }, { "column": "scene" }, { "column": "costume" }, { "column": "thing" }, { "column": "day" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "story_place": { "parts": { "shape": "desk", "head": { "facts": [] }, "links": [ "story" ], "body": "about", "lists": [], "acts": { "more": [], "away": "delete" }, "strip": [ { "column": "picture" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "story_scene": { "parts": { "shape": "desk", "head": { "facts": [ "setting", "time" ] }, "links": [ "story", "place", "answer" ], "body": "body", "lists": [], "acts": { "more": [ "write" ], "away": "delete" }, "strip": [ { "column": "setting" }, { "column": "place" }, { "column": "time" }, { "column": "summary" }, { "column": "day" }, { "column": "status" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "story_sequence": { "parts": { "shape": "sheet", "head": { "facts": [ "position", "folded" ] }, "links": [ "story" ], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "position" }, { "column": "folded" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "story_story": { "parts": { "shape": "desk", "head": { "facts": [ "written_by", "language" ] }, "links": [ "translation_of" ], "body": "logline", "lists": [], "acts": { "more": [], "away": "delete" }, "strip": [ { "column": "written_by" }, { "column": "format" }, { "column": "language" }, { "column": "translation_of" }, { "column": "made_at" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "story_thing": { "parts": { "shape": "desk", "head": { "facts": [ "kind" ] }, "links": [ "story" ], "body": "about", "lists": [], "acts": { "more": [] }, "strip": [ { "column": "picture" }, { "column": "kind" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "story_use": { "parts": { "shape": "sheet", "head": { "facts": [] }, "links": [ "story", "scene", "thing", "costume", "character" ], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "scene" }, { "column": "thing" }, { "column": "costume" }, { "column": "character" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "subscription": { "parts": { "shape": "desk", "head": { "facts": [ "provider", "amount" ] }, "links": [], "body": "notes", "lists": [ { "table": "subscription_charge", "relation": "subscription", "heading": "Charges" } ], "acts": { "more": [] }, "strip": [ { "column": "provider" }, { "column": "status" }, { "column": "amount" }, { "column": "currency" }, { "column": "cycle" }, { "column": "per_month" }, { "column": "next_renewal" }, { "column": "last_charged" }, { "column": "started" }, { "column": "cancel_url" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "subscription_charge": { "parts": { "shape": "desk", "head": { "facts": [ "charged_on", "amount" ] }, "links": [ "subscription" ], "body": "notes", "lists": [], "acts": { "more": [] }, "strip": [ { "column": "subscription" }, { "column": "kind" }, { "column": "amount" }, { "column": "currency" }, { "column": "charged_on" }, { "column": "period" }, { "column": "reference" }, { "column": "payment" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "theme": { "parts": { "shape": "desk", "head": { "facts": [ "drawn", "worn" ] }, "links": [], "body": "definition", "lists": [], "acts": { "more": [] }, "strip": [ { "column": "worn" }, { "column": "drawn" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "thread": { "parts": { "shape": "desk", "head": { "facts": [ "channels" ], "state": "kind" }, "links": [], "body": "summary", "lists": [], "acts": { "main": "mute", "more": [ "pin", "unpin", "unmute", "unarchive" ], "away": "clear" }, "strip": [ { "column": "members", "when": { "column": "kind", "values": [ "group" ] } }, { "column": "state_line" } ], "opens": "facts" }, "page_parts": [ "title", "facts", "messages" ] }, "thread_member": { "parts": { "shape": "sheet", "head": { "facts": [] }, "links": [], "lists": [], "acts": { "more": [ "person", "chat" ] }, "cards": [ { "column": "role" }, { "column": "left_at" } ], "strip": [] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "todo": { "parts": { "shape": "sheet", "head": { "facts": [ "snoozed_until" ], "state": "status" }, "links": [ "people", "project" ], "body": "notes", "lists": [], "acts": { "main": "done", "more": [ "set-date", "open-repeat-rule", "invite", "edit-notes", "reopen", "take_up", "open-people" ], "away": "delete" }, "cards": [ { "column": "priority", "object": "flag" }, { "column": "due_at" }, { "column": "notes", "width": "full" } ], "strip": [] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "todo_recurrence": { "parts": { "shape": "sheet", "head": { "facts": [] }, "links": [], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "rrule", "object": "ring", "label": "repeats" }, { "column": "dtstart", "label": "starts" }, { "column": "paused" }, { "column": "notes", "width": "full" } ], "strip": [] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "transaction": { "parts": { "shape": "desk", "head": { "facts": [ "occurred_on", "for_period" ] }, "links": [ "account_id", "counterparty_person_id", "transfer_of", "settles_transaction_id", "email_thread_id" ], "body": "notes", "lists": [ { "table": "evidence", "relation": "transaction_id", "heading": "Evidence" } ], "acts": { "more": [ "pay_upi" ] }, "strip": [ { "column": "occurred_on" }, { "column": "account_id" }, { "column": "status" }, { "column": "certainty" }, { "column": "for_period" }, { "column": "counterparty_person_id" }, { "column": "tag" }, { "column": "due_date" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "vault_key": { "parts": { "shape": "desk", "head": { "facts": [ "device_id", "fingerprint" ] }, "links": [], "body": "wrapped_vmk", "lists": [], "acts": { "more": [ "approve" ], "away": "refuse" }, "strip": [ { "column": "fingerprint" }, { "column": "device_id" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "video": { "parts": { "shape": "sheet", "head": { "facts": [ "taken_at", "duration_ms" ] }, "links": [], "body": "summary", "lists": [], "acts": { "more": [ "favourite", "unfavourite", "describe" ], "away": "delete" }, "cards": [ { "column": "duration_ms" }, { "column": "taken_at" }, { "column": "place_name" }, { "column": "review_note" } ] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] }, "watch": { "parts": { "shape": "sheet", "head": { "facts": [] }, "links": [ "film", "episode", "with" ], "lists": [], "acts": { "more": [] }, "cards": [] }, "page_parts": [ "title", "facts", "grid", "content", "sections" ] } }, "tables": [ { "format_version": 1, "tables": [ { "name": "cotton_todos", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "title", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n title TEXT NOT NULL", "position": 1 }, { "name": "notes", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n notes TEXT", "position": 2 }, { "name": "label", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n label TEXT", "position": 3 }, { "name": "status", "type": "TEXT", "default": "'open'", "nullable": false, "primary_key": false, "declaration": "\n status TEXT NOT NULL DEFAULT 'open'", "position": 4 }, { "name": "due_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n due_at TEXT", "position": 5 }, { "name": "snoozed_until", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n snoozed_until TEXT", "position": 6 }, { "name": "priority", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n priority INTEGER NOT NULL DEFAULT 0", "position": 7 }, { "name": "completed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n completed_at TEXT", "position": 8 }, { "name": "source_inbox_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n source_inbox_id TEXT", "position": 9 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 10 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 11 }, { "name": "recurrence_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n recurrence_id TEXT", "position": 12 }, { "name": "occurrence_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n occurrence_at TEXT", "position": 13 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 14 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 15 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 16 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " trashed_at TEXT", "position": 17 } ], "constraints": [ { "declaration": "\n UNIQUE (recurrence_id, occurrence_at)", "position": 18 }, { "declaration": "\n CHECK (status IN ('open', 'done', 'dropped', 'missed'))", "position": 19 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 20 } ], "prefix": "CREATE TABLE cotton_todos (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_todos_open ON cotton_todos (workspace_id) WHERE status = 'open' AND trashed_at IS NULL", "CREATE INDEX idx_cotton_todos_recurrence ON cotton_todos (recurrence_id) WHERE recurrence_id IS NOT NULL", "CREATE INDEX idx_cotton_todos_workspace ON cotton_todos (workspace_id)", "CREATE INDEX idx_cotton_todos_workspace_due ON cotton_todos (workspace_id, due_at)", "CREATE INDEX IF NOT EXISTS idx_cotton_todos_author ON cotton_todos (substr(_hlc, 20), _hlc)" ], "full_text": [ "CREATE VIRTUAL TABLE fts_todos USING fts5(\n title, notes, content = 'cotton_todos', content_rowid = 'rowid',\n tokenize = 'unicode61 remove_diacritics 2'\n )" ], "triggers": [ "CREATE TRIGGER fts_todos_ai AFTER INSERT ON cotton_todos WHEN new.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_todos'), 0) BEGIN\n INSERT INTO fts_todos (rowid, title, notes) VALUES (new.rowid, new.title, new.notes);\n END", "CREATE TRIGGER fts_todos_ad AFTER DELETE ON cotton_todos WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_todos'), 0) BEGIN\n INSERT INTO fts_todos (fts_todos, rowid, title, notes) VALUES ('delete', old.rowid, old.title, old.notes);\n END", "CREATE TRIGGER fts_todos_au AFTER UPDATE OF title, notes ON cotton_todos\n FOR EACH ROW WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_todos'), 0) AND (new.title IS NOT old.title OR new.notes IS NOT old.notes) BEGIN\n INSERT INTO fts_todos (fts_todos, rowid, title, notes) VALUES ('delete', old.rowid, old.title, old.notes);\n INSERT INTO fts_todos (rowid, title, notes) VALUES (new.rowid, new.title, new.notes);\n END" ] } ], "id": "todo", "name": "Todo", "plural": "Todos", "visibility": "owner", "picture": { "photo": "photo:a86576668bb7f4915eae3b9dd6f2e3b9cbd20b9e55f85fc7c12586b759858b0e", "object": "tool-todos" }, "builtin": true, "engine": "todos", "columns": [ { "key": "title", "name": "Title", "type": "text", "required": true, "placeholder": "What needs doing?" }, { "key": "notes", "name": "Details", "type": "longtext" }, { "key": "status", "name": "Status", "type": "choice", "choices": [ "open", "done", "dropped", "missed" ], "labels": { "open": "Open", "done": "Done", "dropped": "Dropped", "missed": "Missed" }, "default": "open" }, { "key": "due_at", "name": "Due", "type": "date", "untimed": "due today" }, { "key": "snoozed_until", "name": "Snoozed until", "type": "date", "fact": true, "reading": "Snoozed until {value}", "format": "calendar-datetime" }, { "key": "priority", "name": "Priority", "type": "number", "default": 0 }, { "key": "completed_at", "name": "Completed", "type": "date", "readonly": true }, { "key": "recurrence_id", "name": "Repeat rule", "type": "link", "link_to": "todo_recurrence", "readonly": true, "contributes": false }, { "key": "occurrence_at", "name": "Occurrence at", "type": "text", "readonly": true }, { "key": "trashed_at", "name": "Trashed at", "type": "text", "readonly": true }, { "key": "repeats", "name": "Repeats", "type": "text", "readonly": true, "placeholder": "Once", "format": "repeat-rule", "labels": { "none": "Once", "daily": "Daily", "weekdays": "Every weekday", "weekly": "Weekly", "biweekly": "Every two weeks", "monthly": "Monthly", "yearly": "Yearly", "custom": "Custom repeat", "paused_daily": "Daily, paused", "paused_weekdays": "Every weekday, paused", "paused_weekly": "Weekly, paused", "paused_biweekly": "Every two weeks, paused", "paused_monthly": "Monthly, paused", "paused_yearly": "Yearly, paused", "paused_custom": "Custom repeat, paused" }, "opens": { "column": "recurrence_id", "table": "todo_recurrence" } }, { "key": "done_before", "name": "Done before", "type": "number", "readonly": true, "units": { "one": "done once before", "other": "done {n} times before", "zero": "" } }, { "key": "project", "name": "Project", "type": "link", "link_to": "project" }, { "key": "people", "name": "People", "type": "link", "link_to": "person", "readonly": true, "multiple": true, "edges": true }, { "key": "created_at", "name": "Made", "type": "date", "readonly": true }, { "key": "sent_by", "name": "Sent by", "type": "text", "readonly": true }, { "key": "sent_by_number", "name": "Sent from", "type": "text", "readonly": true }, { "key": "sent_at", "name": "Sent", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "send_id", "name": "Send", "type": "text", "readonly": true }, { "key": "mark", "name": "Mark", "type": "text" } ], "title": "title", "date": "due_at", "project": "project", "order": null, "slip": { "title": "title", "subtitle": null, "trailing": "due_at", "photo": null, "toggle": "status", "byline": { "column": "priority", "words": { "1": "high priority", "2": "high priority", "3": "high priority" } }, "badge": { "column": "recurrence_id", "symbol": "repeat", "spoken": "Repeats" }, "dye": "pink" }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "title", "due_at", "repeats", "snoozed_until", "completed_at", "project", "people" ] }, { "heading": "Details", "columns": [ "notes" ] }, { "heading": null, "columns": [], "when": { "column": "status", "values": [ "dropped" ] }, "note": "Dropped" } ], "send": { "columns": [ "title", "notes", "due_at", "priority" ] }, "record_route": "/todos/todo/[id]", "record_kind": "todo", "filing_rank": 1, "made_by_verb": true, "role": "todo", "projects_read": { "kind": "todo", "read": "todo", "families": [ "todos", "projects" ] }, "group": { "column": "status", "sections": [ { "heading": null, "values": [ "open" ], "closed": false }, { "heading": "Done", "values": [ "done" ], "closed": false }, { "heading": "Dropped", "values": [ "dropped" ], "closed": false }, { "heading": "Missed", "values": [ "missed" ], "closed": false } ] }, "upcoming": { "dates": [ "due_at", "snoozed_until" ], "undated": "No date", "late": "Late", "later": "Later", "series": "recurrence_id" }, "empty": { "title": "No todos yet" }, "create": { "label": "New todo", "dated": "due_at" }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "todo" } } ], "commands": [ { "id": "done", "label": "Mark done", "kind": "update", "verb": "update_todo", "data": { "status": "done" }, "bindings": { "id": "$id" }, "when": { "status": "open" }, "receipt": "Done", "undo": "reopen", "does": "completes", "object": "stamp" }, { "id": "reopen", "label": "Reopen", "kind": "update", "verb": "update_todo", "data": { "status": "open" }, "bindings": { "id": "$id" }, "when": { "status": "done" }, "receipt": "Reopened", "undo": "done", "object": "folder" }, { "id": "drop", "label": "Drop", "kind": "update", "verb": "update_todo", "data": { "status": "dropped" }, "bindings": { "id": "$id" }, "when": { "status": "open" }, "receipt": "Dropped", "undo": "take_up", "does": "puts-away", "object": "drop" }, { "id": "take_up", "label": "Reopen", "kind": "update", "verb": "update_todo", "data": { "status": "open" }, "bindings": { "id": "$id" }, "when": { "status": "dropped" }, "receipt": "Reopened", "undo": "drop", "object": "folder" }, { "id": "delete", "label": "Delete", "kind": "delete", "verb": "delete_record", "data": { "table": "todo" }, "confirm": "Undo on the receipt brings it back.", "bindings": { "id": "$id" }, "receipt": "Deleted", "does": "destroys", "object": "bin" }, { "id": "open-people", "label": "Open people", "kind": "open", "opens": "people", "object": "person" }, { "id": "open-repeat-rule", "label": "Repeat", "kind": "open", "opens": "recurrence_id", "object": "loop" }, { "id": "set-date", "label": "Set date", "kind": "update", "verb": "update_record", "data": { "table": "todo", "patch": {} }, "bindings": { "id": "$id" }, "receipt": "Date set to {picked}", "pick": { "argument": "patch.due_at", "kind": "datetime" }, "does": "times", "object": "bell" }, { "id": "invite", "label": "People", "kind": "create", "verb": "create_link", "data": { "fromKind": "todo", "toKind": "person" }, "bindings": { "fromId": "$id" }, "receipt": "Added {picked}", "pick": { "argument": "toId", "kind": "record", "table": "person" }, "object": "clip" }, { "id": "edit-notes", "label": "Notes", "kind": "update", "verb": "update_record", "data": { "table": "todo", "patch": {} }, "bindings": { "id": "$id" }, "receipt": "Notes updated", "pick": { "argument": "patch.notes", "kind": "text" }, "object": "slip" } ], "instructions": "A todo is one thing to do. Status is open until it is done, or dropped when it will not be done; an earlier occurrence of a repeating todo still open when a later one is done becomes missed, never done. the due date is when it is wanted, and a snoozed todo stays out of sight until its snooze ends. A priority of 1 or more marks it as high priority. Never invent a due date the person did not give. A repeating todo has one open occurrence at a time: one left undone stays that one, however late, until it is done or dropped, and then its next is made. A mark is the id of the small drawn mark Cotton Days shows beside it; most todos have none.", "groups": { "stack": "slips" }, "views": [ { "face": "today", "name": "Today" }, { "face": "upcoming", "name": "Upcoming" } ], "card": { "face": "todo.card", "fields": [ { "slot": "check", "column": "status", "label": "label.face.todo.check" }, { "slot": "title", "column": "title" }, { "slot": "body", "column": "notes" }, { "slot": "date", "column": "due_at", "form": "weekday_date" }, { "slot": "group" }, { "slot": "state", "column": "status", "only": [ "dropped", "missed" ] }, { "slot": "started", "column": "created_at", "form": "weekday_date" }, { "slot": "expires", "column": "completed_at", "form": "weekday_date" }, { "slot": "repeats", "column": "repeats" } ], "corner": [ { "column": "due_at", "form": "late", "behind": 1 }, { "column": "due_at", "form": "late", "within": 0, "line": "corner.today" }, { "column": "due_at", "form": "late", "within": 1, "line": "corner.tomorrow" }, { "column": "due_at", "form": "late", "within": 3650 }, { "column": "completed_at", "form": "relative", "within": 0, "line": "corner.done", "done": true } ], "art": "pace", "pace": { "date": "due_at", "done": { "column": "status", "values": [ "done", "dropped", "missed" ] }, "repeat": "recurrence_id" } }, "marks": { "check": "done" }, "tool": { "views": [ { "id": "done", "label": "Done", "visibility": "owner", "is_default": false, "read": { "table": "todo", "section": "done", "empty": { "line": "empty_views.todos.done", "table": true } } }, { "id": "late", "label": "Late", "visibility": "owner", "is_default": false, "read": { "table": "todo", "section": "late", "empty": { "line": "empty_views.todos.late", "table": true } } }, { "id": "today", "label": "Today", "visibility": "owner", "is_default": true, "read": { "table": "todo", "section": "today", "empty": { "line": "empty_views.todos.today", "counts": { "late": "empty_views.todo_late_count" }, "table": true } } }, { "id": "upcoming", "label": "Upcoming", "visibility": "owner", "is_default": false, "read": { "table": "todo", "section": "upcoming", "empty": { "line": "empty_views.todos.upcoming", "table": true } } }, { "id": "all", "label": "All", "visibility": "owner", "is_default": false, "read": { "table": "todo" }, "lead": "late" } ], "name": "Todos", "purpose": "What you need to do and when it is due.", "key": "todos", "icon": "circle-check", "card_stock": "sage", "route": "/todos", "figures": [ { "read": "openTodos", "many": "{n} open" } ] }, "parts": { "shape": "sheet", "head": { "facts": [ "snoozed_until" ], "state": "status" }, "links": [ "people", "project" ], "body": "notes", "lists": [], "acts": { "main": "done", "more": [ "set-date", "open-repeat-rule", "invite", "edit-notes", "reopen", "take_up", "open-people" ], "away": "delete" }, "cards": [ { "column": "priority", "object": "flag" }, { "column": "due_at" }, { "column": "notes", "width": "full" } ], "strip": [] } }, { "format_version": 1, "tables": [ { "name": "cotton_todo_recurrences", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "title", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n title TEXT NOT NULL", "position": 1 }, { "name": "notes", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n notes TEXT", "position": 2 }, { "name": "priority", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n priority INTEGER NOT NULL DEFAULT 0", "position": 3 }, { "name": "rrule", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n rrule TEXT NOT NULL", "position": 4 }, { "name": "dtstart", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n dtstart TEXT NOT NULL", "position": 5 }, { "name": "paused", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n paused INTEGER NOT NULL DEFAULT 0", "position": 6 }, { "name": "materialized_until", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n materialized_until TEXT", "position": 7 }, { "name": "source_inbox_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n source_inbox_id TEXT", "position": 8 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 9 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 10 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 11 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 12 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 13 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " trashed_at TEXT", "position": 14 } ], "constraints": [ { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 15 } ], "prefix": "CREATE TABLE cotton_todo_recurrences (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_todo_recurrences_workspace ON cotton_todo_recurrences (workspace_id)", "CREATE INDEX IF NOT EXISTS idx_cotton_todo_recurrences_author ON cotton_todo_recurrences (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "id": "todo_recurrence", "name": "Repeating todo", "plural": "Repeating todos", "visibility": "owner", "picture": null, "builtin": true, "engine": "todos", "columns": [ { "key": "title", "type": "text", "required": true }, { "key": "notes", "type": "longtext" }, { "key": "priority", "type": "number" }, { "key": "rrule", "name": "Repeats", "type": "text", "required": true, "format": "repeat-rule", "labels": { "none": "Once", "daily": "Daily", "weekdays": "Every weekday", "weekly": "Weekly", "biweekly": "Every two weeks", "monthly": "Monthly", "yearly": "Yearly", "custom": "Custom repeat" } }, { "key": "dtstart", "name": "Starts", "type": "date", "required": true }, { "key": "paused", "name": "Paused", "type": "bool" }, { "key": "materialized_until", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "source_inbox_id", "type": "text", "readonly": true }, { "key": "trashed_at", "type": "date", "readonly": true, "format": "calendar-datetime" } ], "title": "title", "date": "dtstart", "project": null, "order": null, "slip": { "title": "title", "subtitle": "rrule", "trailing": "dtstart", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "title", "rrule", "dtstart", "paused" ] }, { "heading": "Details", "columns": [ "notes", "priority" ] } ], "add": false, "delete": false, "instructions": "A repeating todo is the rule behind a series of todos: an iCal repeat rule and the moment the series starts. The todos themselves are created from it one occurrence at a time, so edit the rule to change future ones and pause it to stop new ones without losing the series.", "card": { "face": "plain", "fields": [ { "slot": "title", "column": "title" }, { "slot": "subtitle", "column": "rrule" }, { "slot": "body", "column": "notes" }, { "slot": "facts", "column": "dtstart", "also": [ "paused" ] } ] }, "parts": { "shape": "sheet", "head": { "facts": [] }, "links": [], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "rrule", "object": "ring", "label": "repeats" }, { "column": "dtstart", "label": "starts" }, { "column": "paused" }, { "column": "notes", "width": "full" } ], "strip": [] } }, { "format_version": 1, "tables": [ { "name": "cotton_events", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "collection_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n collection_id TEXT", "position": 1 }, { "name": "title", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n title TEXT NOT NULL", "position": 2 }, { "name": "notes", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n notes TEXT", "position": 3 }, { "name": "starts_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n starts_at TEXT NOT NULL", "position": 4 }, { "name": "ends_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n ends_at TEXT", "position": 5 }, { "name": "all_day", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n all_day INTEGER NOT NULL DEFAULT 0", "position": 6 }, { "name": "rrule", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n rrule TEXT", "position": 7 }, { "name": "location", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n location TEXT", "position": 8 }, { "name": "source_inbox_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n source_inbox_id TEXT", "position": 9 }, { "name": "gcal_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n gcal_id TEXT", "position": 10 }, { "name": "gcal_etag", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n gcal_etag TEXT", "position": 11 }, { "name": "sync_state", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n sync_state TEXT", "position": 12 }, { "name": "organizer_is_self", "type": "INTEGER", "default": "1", "nullable": false, "primary_key": false, "declaration": "\n organizer_is_self INTEGER NOT NULL DEFAULT 1", "position": 13 }, { "name": "my_response", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n my_response TEXT", "position": 14 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 15 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 16 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 17 }, { "name": "series_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " series_id TEXT", "position": 18 }, { "name": "original_starts_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " original_starts_at TEXT", "position": 19 }, { "name": "exdates", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " exdates TEXT CHECK (exdates IS NULL OR json_type(exdates) = 'array')", "position": 20 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " trashed_at TEXT", "position": 21 }, { "name": "erase_requested_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n erase_requested_at TEXT", "position": 22 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 23 }, { "name": "ical_uid", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n ical_uid TEXT", "position": 24 }, { "name": "account", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n account TEXT", "position": 25 }, { "name": "on_google", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n on_google INTEGER NOT NULL DEFAULT 0", "position": 26 }, { "name": "event_place", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " event_place TEXT", "position": 27 }, { "name": "country", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " country TEXT", "position": 28 }, { "name": "timezone", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " timezone TEXT", "position": 29 }, { "name": "kind", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " kind TEXT", "position": 30 }, { "name": "picture", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " picture TEXT", "position": 31 }, { "name": "picture_photo_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " picture_photo_id TEXT", "position": 32 } ], "constraints": [ { "declaration": "\n CHECK (on_google IN (0, 1))", "position": 33 }, { "declaration": "\n CHECK (my_response IN ('needs_action', 'accepted', 'declined', 'tentative'))", "position": 34 }, { "declaration": "\n CHECK (sync_state IN ('synced', 'pending', 'conflict'))\n ", "position": 35 } ], "prefix": "CREATE TABLE cotton_events (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_events_invites ON cotton_events (my_response, starts_at) WHERE my_response = 'needs_action' AND organizer_is_self = 0 AND trashed_at IS NULL", "CREATE INDEX idx_cotton_events_collection ON cotton_events (collection_id)", "CREATE INDEX idx_cotton_events_range ON cotton_events (starts_at)", "CREATE UNIQUE INDEX uq_cotton_events_gcal_id ON cotton_events (account, gcal_id) WHERE gcal_id IS NOT NULL", "CREATE INDEX idx_cotton_events_series ON cotton_events (series_id) WHERE series_id IS NOT NULL", "CREATE INDEX idx_cotton_events_trashed ON cotton_events (trashed_at) WHERE trashed_at IS NOT NULL", "CREATE INDEX idx_cotton_events_ical_uid ON cotton_events (ical_uid, original_starts_at) WHERE ical_uid IS NOT NULL", "CREATE INDEX IF NOT EXISTS idx_cotton_events_author ON cotton_events (substr(_hlc, 20), _hlc)" ], "full_text": [ "CREATE VIRTUAL TABLE fts_events USING fts5(\n title, notes, location, content = 'cotton_events', content_rowid = 'rowid',\n tokenize = 'unicode61 remove_diacritics 2'\n )" ], "triggers": [ "CREATE TRIGGER fts_events_ai AFTER INSERT ON cotton_events WHEN new.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_events'), 0) BEGIN\n INSERT INTO fts_events (rowid, title, notes, location) VALUES (new.rowid, new.title, new.notes, new.location);\n END", "CREATE TRIGGER fts_events_ad AFTER DELETE ON cotton_events WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_events'), 0) BEGIN\n INSERT INTO fts_events (fts_events, rowid, title, notes, location) VALUES ('delete', old.rowid, old.title, old.notes, old.location);\n END", "CREATE TRIGGER fts_events_au AFTER UPDATE OF title, notes, location ON cotton_events\n FOR EACH ROW WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_events'), 0) AND (new.title IS NOT old.title OR new.notes IS NOT old.notes OR new.location IS NOT old.location) BEGIN\n INSERT INTO fts_events (fts_events, rowid, title, notes, location) VALUES ('delete', old.rowid, old.title, old.notes, old.location);\n INSERT INTO fts_events (rowid, title, notes, location) VALUES (new.rowid, new.title, new.notes, new.location);\n END" ] }, { "name": "cotton_event_attendees", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "event_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n event_id TEXT NOT NULL", "position": 1 }, { "name": "email", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n email TEXT", "position": 2 }, { "name": "phone", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n phone TEXT", "position": 3 }, { "name": "display_name", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n display_name TEXT", "position": 4 }, { "name": "response", "type": "TEXT", "default": "'needs_action'", "nullable": false, "primary_key": false, "declaration": "\n response TEXT NOT NULL DEFAULT 'needs_action'", "position": 5 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 6 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 7 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 8 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 9 } ], "constraints": [ { "declaration": "\n CHECK (response IN ('needs_action', 'accepted', 'declined', 'tentative'))", "position": 10 }, { "declaration": "\n FOREIGN KEY (event_id) REFERENCES cotton_events(id)\n ", "position": 11 } ], "prefix": "CREATE TABLE cotton_event_attendees (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_event_attendees_event ON cotton_event_attendees (event_id)", "CREATE INDEX IF NOT EXISTS idx_cotton_event_attendees_author ON cotton_event_attendees (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "id": "event", "name": "Event", "plural": "Calendar", "visibility": "owner", "picture": { "photo": "photo:a4c0a1a6ab854cbc99f2481f788b16b76214b2133e43df2502d694498861624f", "object": "tool-calendar" }, "builtin": true, "engine": "calendar", "columns": [ { "key": "collection_id", "name": "Calendar", "type": "text", "readonly": true }, { "key": "title", "name": "Title", "type": "text", "required": true }, { "key": "notes", "name": "Notes", "type": "longtext" }, { "key": "starts_at", "name": "Starts", "type": "date", "required": true, "untimed": "all day" }, { "key": "ends_at", "name": "Ends", "type": "date" }, { "key": "all_day", "name": "All day", "type": "bool" }, { "key": "rrule", "name": "Repeats", "type": "text", "format": "repeat-rule", "labels": { "none": "Once", "daily": "Daily", "weekdays": "Every weekday", "weekly": "Weekly", "biweekly": "Every two weeks", "monthly": "Monthly", "yearly": "Yearly", "custom": "Custom repeat" } }, { "key": "location", "name": "Where", "type": "place", "place": { "id": "event_place", "country": "country", "zone": "timezone", "lat": "event_place_lat", "lng": "event_place_lng", "version": "event_place_version" } }, { "key": "source_inbox_id", "type": "text", "readonly": true }, { "key": "gcal_id", "type": "text", "readonly": true }, { "key": "gcal_etag", "type": "text", "readonly": true }, { "key": "sync_state", "name": "Sync", "type": "text", "readonly": true, "format": "words" }, { "key": "organizer_is_self", "type": "bool", "readonly": true }, { "key": "my_response", "name": "Your reply", "type": "choice", "choices": [ "needs_action", "accepted", "tentative", "declined" ], "shown_when": { "column": "invited", "values": [ "invited" ] }, "labels": { "needs_action": "Reply needed", "accepted": "Accepted", "tentative": "Tentative", "declined": "Declined" } }, { "key": "series_id", "type": "text", "readonly": true }, { "key": "original_starts_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "exdates", "type": "longtext", "readonly": true }, { "key": "trashed_at", "name": "Removed", "type": "date" }, { "key": "erase_requested_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "ical_uid", "type": "text", "readonly": true }, { "key": "account", "type": "text", "readonly": true }, { "key": "on_google", "name": "On Google", "type": "bool" }, { "key": "event_place", "name": "Place", "type": "text", "readonly": true }, { "key": "event_place_lat", "name": "Place latitude", "type": "number", "readonly": true }, { "key": "event_place_lng", "name": "Place longitude", "type": "number", "readonly": true }, { "key": "event_place_version", "name": "Place version", "type": "text", "readonly": true }, { "key": "country", "name": "Country", "type": "text", "readonly": true }, { "key": "timezone", "name": "Time zone", "type": "text", "readonly": true }, { "key": "project", "name": "Project", "type": "link", "link_to": "project" }, { "key": "people", "name": "Who", "type": "link", "link_to": "person", "readonly": true, "multiple": true, "edges": true }, { "key": "guest_responses", "name": "Replies", "type": "longtext", "readonly": true }, { "key": "calendar_name", "name": "Calendar", "type": "text", "readonly": true }, { "key": "source", "name": "Source", "type": "text", "readonly": true, "format": "words" }, { "key": "created_at", "name": "Added", "type": "date", "readonly": true }, { "key": "day", "name": "Day", "type": "date", "readonly": true }, { "key": "start_time", "name": "Starts", "type": "time", "readonly": true }, { "key": "invited", "name": "Invited", "type": "choice", "choices": [ "invited" ], "readonly": true, "labels": { "invited": "Invited" } }, { "key": "email_thread_id", "name": "From mail", "type": "link", "link_to": "email_thread", "readonly": true }, { "key": "kind", "name": "Kind", "type": "choice", "choices": [ "call", "meeting", "meal", "breakfast", "lunch", "dinner", "coffee", "birthday", "celebration", "wedding", "travel", "flight", "train", "commute", "drive", "doctor", "workout", "walk", "run", "gym", "yoga", "swim", "class", "deadline", "delivery", "payment", "show", "appointment", "errand", "reminder" ], "labels": { "call": "Call", "meeting": "Meeting", "meal": "Meal", "breakfast": "Breakfast", "lunch": "Lunch", "dinner": "Dinner", "coffee": "Coffee", "birthday": "Birthday", "celebration": "Celebration", "wedding": "Wedding", "travel": "Travel", "flight": "Flight", "train": "Train", "commute": "Commute", "drive": "Drive", "doctor": "Doctor", "workout": "Workout", "walk": "Walk", "run": "Run", "gym": "Gym", "yoga": "Yoga", "swim": "Swim", "class": "Class", "deadline": "Deadline", "delivery": "Delivery", "payment": "Payment", "show": "Show", "appointment": "Appointment", "errand": "Errand", "reminder": "Reminder" }, "families": { "breakfast": "meal", "lunch": "meal", "dinner": "meal", "coffee": "meal", "flight": "travel", "train": "travel", "commute": "travel", "drive": "travel", "walk": "workout", "run": "workout", "gym": "workout", "yoga": "workout", "swim": "workout" }, "examples": { "call": [ "Call", "Phone call", "Call with Priya", "Catch-up call", "Video call", "Zoom call", "Ring Mum" ], "meeting": [ "Meeting", "Team sync", "Standup", "Review with the board", "1:1", "Planning session", "Client meeting" ], "meal": [ "Meal", "Eating out", "Food with friends", "Meal together", "Bite to eat" ], "breakfast": [ "Breakfast", "Breakfast with Arjun", "Brunch", "Morning breakfast meeting" ], "lunch": [ "Lunch", "Lunch with the team", "Working lunch", "Lunch at the club" ], "dinner": [ "Dinner", "Dinner with Sam", "Dinner party", "Family dinner", "Dinner reservation" ], "coffee": [ "Coffee", "Coffee with Meera", "Chai", "Coffee catch-up", "Tea break" ], "birthday": [ "Birthday", "Riya's birthday", "Birthday party", "Bday", "Turns 40" ], "celebration": [ "Celebration", "Party", "Anniversary", "Diwali party", "Housewarming", "Farewell drinks" ], "wedding": [ "Wedding", "Sangeet", "Reception", "Mehendi", "Wedding of Anu and Dev" ], "travel": [ "Trip", "Travel", "Journey", "Holiday", "Weekend in Goa" ], "flight": [ "Flight", "Flight to Delhi", "6E 2134 BLR to BOM", "Fly to London", "Airport" ], "train": [ "Train", "Train to Chennai", "Vande Bharat", "Shatabdi", "Overnight train" ], "commute": [ "Commute", "Drive to work", "Office commute", "Metro to office" ], "drive": [ "Drive", "Road trip", "Drive to Mysore", "Pick up from the station" ], "doctor": [ "Doctor", "Dentist", "Doctor's appointment", "Check-up", "Blood test", "Physio" ], "workout": [ "Workout", "Exercise", "Training", "Fitness", "Cardio" ], "walk": [ "Walk", "Morning walk", "Evening walk", "Walk in the park" ], "run": [ "Run", "Morning run", "5k run", "Long run", "Marathon training" ], "gym": [ "Gym", "Leg day", "Strength session", "Weights", "Personal trainer", "Workout at the gym" ], "yoga": [ "Yoga", "Yoga class", "Pranayama", "Morning yoga", "Vinyasa" ], "swim": [ "Swim", "Swimming", "Pool", "Laps at the pool" ], "class": [ "Class", "Lecture", "Lesson", "Guitar lesson", "Workshop", "Course" ], "deadline": [ "Deadline", "Due", "Submit the report", "Last day to file", "Tax filing due" ], "delivery": [ "Delivery", "Package arriving", "Online order arriving", "Courier pickup", "Groceries arriving" ], "payment": [ "Payment", "Pay rent", "Bill due", "EMI", "Credit card payment", "Pay the electricity bill" ], "show": [ "Show", "Concert", "Movie", "Play", "Gig", "Stand-up comedy", "Match" ], "appointment": [ "Appointment", "Haircut", "Salon", "Bank appointment", "Car service" ], "errand": [ "Errand", "Groceries", "Pick up dry cleaning", "Post office", "Shopping" ], "reminder": [ "Reminder", "Remember to", "Don't forget", "Renew passport", "Renew insurance" ] }, "says": [ "title", "notes", "location" ] }, { "key": "picture", "name": "Picture", "type": "photo", "opens": { "column": "picture_photo_id", "table": "photo" } }, { "key": "picture_photo_id", "name": "Original", "type": "link", "link_to": "photo", "readonly": true, "media": true }, { "key": "mark", "name": "Mark", "type": "text" }, { "key": "your_note", "name": "Your note", "type": "longtext" }, { "key": "alert", "name": "Alert", "type": "number", "units": { "one": "{n} minute before", "other": "{n} minutes before" } } ], "title": "title", "date": "starts_at", "project": "project", "order": null, "slip": { "title": "title", "subtitle": "location", "trailing": "starts_at", "photo": null, "toggle": null, "caption": { "columns": [ "rrule" ], "status": "my_response", "dates": [ "starts_at" ] }, "dye": "sage" }, "tile": { "face": "slip-list", "current": { "column": "starts_at", "days": 0 } }, "page": [ { "heading": null, "columns": [ "title" ] }, { "heading": null, "columns": [ "starts_at", "ends_at", "all_day", "rrule", "my_response", "on_google" ] }, { "heading": null, "columns": [ "location" ] }, { "heading": "Who", "columns": [ "people", "guest_responses" ] }, { "heading": "Notes", "columns": [ "notes" ] }, { "heading": "Details", "columns": [ "calendar_name", "source", "project", "email_thread_id" ] }, { "heading": "Mail", "list": { "table": "email_thread", "link": "event_id", "limit": 3 } } ], "archived": "trashed_at", "kept_by": { "when": "sync_state", "says": "Kept in step with Google Calendar" }, "seal": { "clear": [ "collection_id", "starts_at", "ends_at", "all_day", "rrule", "source_inbox_id", "gcal_id", "gcal_etag", "sync_state", "organizer_is_self", "my_response", "series_id", "original_starts_at", "exdates", "trashed_at", "erase_requested_at", "ical_uid", "account", "on_google", "timezone", "project", "people", "source", "created_at", "day", "start_time", "invited", "email_thread_id", "kind", "picture_photo_id" ], "blind": [ "title", "notes", "location" ] }, "record_route": "/calendar/event/[id]", "linked_when": { "scheduled": "starts {when}" }, "record_kind": "event", "filing_rank": 3, "role": "event", "sort": { "column": "starts_at" }, "day_grouping": "starts_at", "empty": { "title": "Nothing on the calendar yet.", "message": "Events from your synced calendars land here, and New event adds one." }, "create": { "label": "New event", "dated": "starts_at", "path": "/calendar/event/edit" }, "deletion": { "confirm": "Delete", "asks": true, "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "event" } } ], "commands": [ { "id": "delete", "label": "Delete", "kind": "delete", "verb": "delete_record", "data": { "table": "event" }, "confirm": "Undo on the receipt brings it back.", "bindings": { "id": "$id" }, "when": { "rrule": [ null, "" ] }, "receipt": "Deleted", "does": "destroys", "object": "bin" }, { "id": "open-email-thread-id", "label": "Open from mail", "kind": "open", "opens": "email_thread_id", "object": "envelope" }, { "id": "open-people", "label": "Open who", "kind": "open", "opens": "people", "object": "person" }, { "id": "open-project", "label": "Open project", "kind": "open", "opens": "project", "object": "open" }, { "id": "set-date", "label": "Set date", "kind": "update", "verb": "update_record", "data": { "table": "event", "patch": {}, "scope": "this" }, "bindings": { "id": "$id" }, "receipt": "Date set to {picked}", "pick": { "argument": "patch.starts_at", "kind": "datetime" }, "does": "times", "object": "bell" }, { "id": "invite", "label": "Invite", "kind": "create", "verb": "create_link", "data": { "fromKind": "event", "toKind": "person" }, "bindings": { "fromId": "$id" }, "receipt": "Added {picked}", "pick": { "argument": "toId", "kind": "record", "table": "person" }, "object": "clip" } ], "instructions": "An event is something on the calendar with a start and usually an end; an all-day event ignores the clock time. A repeating event carries an iCal repeat rule, and your reply only applies to invitations someone else sent. Always give times with an explicit time zone, and never guess a location or end time that was not stated. A mark is the id of the small drawn mark Cotton Days shows beside it (cake, plane, tooth, fork-knife, cup and the rest of the catalogue), most events have none. your_note and alert (minutes before it starts; -1 is no alert at all, and empty is the ten minutes before) are the person's own, also on an event from Google Calendar, whose title, time, place and notes belong to Google and are changed there.", "groups": { "stack": "slips" }, "views": [ { "face": "nextUp", "name": "Next up" }, { "face": "month", "name": "Month", "opens": "/calendar/month" } ], "card": { "face": "event.rolodex", "fields": [ { "slot": "photo", "column": "picture", "chooses": "kind" }, { "slot": "title", "column": "title" }, { "slot": "date", "column": "starts_at", "form": "weekday_date" }, { "slot": "ends", "column": "ends_at", "also": [ "starts_at" ] }, { "slot": "repeats", "column": "rrule" }, { "slot": "place", "column": "location" }, { "slot": "people", "column": "people" }, { "slot": "body", "column": "notes" }, { "slot": "state", "column": "my_response", "only": [ "needs_action" ] }, { "slot": "city", "column": "event_place", "also": [ "country" ] } ], "corner": [ { "column": "starts_at", "form": "relative", "within": 0, "line": "corner.today", "ahead": true }, { "column": "starts_at", "form": "relative", "within": 1, "line": "corner.tomorrow", "ahead": true }, { "column": "starts_at", "form": "relative", "within": 6, "ahead": true } ], "pace": { "date": "starts_at", "done": { "column": "my_response", "values": [ "declined" ] }, "repeat": "rrule" } }, "tool": { "views": [ { "id": "today", "label": "Today", "visibility": "owner", "is_default": true, "read": { "table": "event", "section": "today", "empty": { "line": "empty_views.calendar.today", "table": true } } }, { "id": "upcoming", "label": "Upcoming", "visibility": "owner", "is_default": false, "read": { "table": "event", "section": "upcoming", "empty": { "line": "empty_views.calendar.upcoming", "table": true } } }, { "id": "recurring", "label": "Recurring", "visibility": "owner", "is_default": false, "read": { "table": "event", "where": { "rrule": { "present": true } }, "empty": { "line": "empty_views.calendar.recurring", "table": true } } }, { "id": "all", "label": "All", "visibility": "owner", "is_default": false, "read": { "table": "event" } } ], "name": "Calendar", "purpose": "Events, appointments and time you have planned.", "key": "calendar", "icon": "calendar-days", "card_stock": "sage", "route": "/calendar", "figures": [ { "read": "eventsLeftToday", "many": "{n} left today" } ] }, "parts": { "shape": "desk", "head": { "facts": [] }, "links": [], "body": "notes", "lists": [ { "table": "email_thread", "relation": "event_id", "heading": "Mail" } ], "acts": { "more": [ "set-date", "invite", "open-email-thread-id", "open-people", "open-project" ], "away": "delete" }, "cards": [ { "column": "start_time", "label": "time" }, { "column": "starts_at", "label": "when", "until": "ends_at" }, { "column": "location", "label": "where" }, { "column": "my_response" }, { "column": "guest_responses" }, { "column": "rrule", "object": "ring", "label": "repeats" }, { "column": "calendar_name", "label": "calendar" } ], "strip": [] } }, { "format_version": 1, "tables": [ { "name": "cotton_notes", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "kind", "type": "TEXT", "default": "'note'", "nullable": false, "primary_key": false, "declaration": "\n kind TEXT NOT NULL DEFAULT 'note'", "position": 1 }, { "name": "title", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n title TEXT", "position": 2 }, { "name": "body", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n body TEXT NOT NULL DEFAULT ''", "position": 3 }, { "name": "journal_date", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n journal_date TEXT", "position": 4 }, { "name": "project_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n project_id TEXT", "position": 5 }, { "name": "published_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n published_at TEXT", "position": 6 }, { "name": "public_slug", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n public_slug TEXT", "position": 7 }, { "name": "source_inbox_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n source_inbox_id TEXT", "position": 8 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 9 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 10 }, { "name": "archived_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n archived_at TEXT", "position": 11 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n trashed_at TEXT", "position": 12 }, { "name": "author_kind", "type": "TEXT", "default": "'user'", "nullable": false, "primary_key": false, "declaration": "\n author_kind TEXT NOT NULL DEFAULT 'user'", "position": 13 }, { "name": "author_label", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n author_label TEXT", "position": 14 }, { "name": "managed_by", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n managed_by TEXT", "position": 15 }, { "name": "external_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n external_id TEXT", "position": 16 }, { "name": "source_hash", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n source_hash TEXT", "position": 17 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 18 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 19 }, { "name": "origin_handle", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " origin_handle TEXT CHECK (origin_handle IS NULL OR length(origin_handle) > 0)", "position": 20 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 21 }, { "name": "pinned", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n pinned INTEGER NOT NULL DEFAULT 0 CHECK (pinned IN (0, 1))", "position": 22 } ], "constraints": [ { "declaration": "\n CHECK (author_kind IN ('user', 'agent'))", "position": 23 }, { "declaration": "\n CHECK ((author_kind = 'agent') = (author_label IS NOT NULL))", "position": 24 }, { "declaration": "\n CHECK (kind IN ('note', 'journal'))", "position": 25 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 26 } ], "prefix": "CREATE TABLE cotton_notes (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_notes_home ON cotton_notes (workspace_id) WHERE kind = 'note' AND managed_by IS NULL AND archived_at IS NULL AND trashed_at IS NULL", "CREATE INDEX idx_cotton_notes_managed ON cotton_notes (managed_by) WHERE managed_by IS NOT NULL", "CREATE INDEX idx_cotton_notes_workspace ON cotton_notes (workspace_id)", "CREATE UNIQUE INDEX idx_cotton_notes_workspace_external ON cotton_notes (workspace_id, external_id) WHERE external_id IS NOT NULL", "CREATE UNIQUE INDEX uq_cotton_notes_public_slug ON cotton_notes (public_slug) WHERE public_slug IS NOT NULL", "CREATE UNIQUE INDEX uq_cotton_notes_journal_day ON cotton_notes (workspace_id, journal_date, COALESCE(project_id, '')) WHERE kind = 'journal'", "CREATE INDEX idx_cotton_notes_origin ON cotton_notes (origin_handle) WHERE origin_handle IS NOT NULL", "CREATE INDEX IF NOT EXISTS idx_cotton_notes_author ON cotton_notes (substr(_hlc, 20), _hlc)" ], "full_text": [ "CREATE VIRTUAL TABLE fts_notes USING fts5(\n title, body, content = 'cotton_notes', content_rowid = 'rowid',\n tokenize = 'unicode61 remove_diacritics 2'\n )" ], "triggers": [ "CREATE TRIGGER fts_notes_ai AFTER INSERT ON cotton_notes WHEN new.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_notes'), 0) BEGIN\n INSERT INTO fts_notes (rowid, title, body) VALUES (new.rowid, new.title, new.body);\n END", "CREATE TRIGGER fts_notes_ad AFTER DELETE ON cotton_notes WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_notes'), 0) BEGIN\n INSERT INTO fts_notes (fts_notes, rowid, title, body) VALUES ('delete', old.rowid, old.title, old.body);\n END", "CREATE TRIGGER fts_notes_au AFTER UPDATE OF title, body ON cotton_notes\n FOR EACH ROW WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_notes'), 0) AND (new.title IS NOT old.title OR new.body IS NOT old.body) BEGIN\n INSERT INTO fts_notes (fts_notes, rowid, title, body) VALUES ('delete', old.rowid, old.title, old.body);\n INSERT INTO fts_notes (rowid, title, body) VALUES (new.rowid, new.title, new.body);\n END" ] }, { "name": "cotton_note_attachments", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "note_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n note_id TEXT NOT NULL", "position": 2 }, { "name": "record_kind", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n record_kind TEXT NOT NULL", "position": 3 }, { "name": "record_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n record_id TEXT NOT NULL", "position": 4 }, { "name": "position", "type": "INTEGER", "default": null, "nullable": false, "primary_key": false, "declaration": "\n position INTEGER NOT NULL", "position": 5 }, { "name": "caption", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n caption TEXT", "position": 6 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 7 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 8 }, { "name": "origin_handle", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n origin_handle TEXT CHECK (origin_handle IS NULL OR length(origin_handle) > 0)", "position": 9 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 10 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 11 } ], "constraints": [ { "declaration": "\n UNIQUE (note_id, record_kind, record_id)", "position": 12 }, { "declaration": "\n CHECK (record_kind IN ('photo', 'video', 'document'))", "position": 13 }, { "declaration": "\n CHECK (length(record_id) > 0)", "position": 14 }, { "declaration": "\n CHECK (position >= 0)", "position": 15 }, { "declaration": "\n CHECK (caption IS NULL OR length(caption) <= 500)", "position": 16 }, { "declaration": "\n FOREIGN KEY (note_id) REFERENCES cotton_notes(id)", "position": 17 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 18 } ], "prefix": "CREATE TABLE IF NOT EXISTS cotton_note_attachments (", "suffix": ")", "indexes": [ "CREATE INDEX IF NOT EXISTS idx_cotton_note_attachments_author ON cotton_note_attachments (substr(_hlc, 20), _hlc)", "CREATE INDEX IF NOT EXISTS idx_cotton_note_attachments_note ON cotton_note_attachments (note_id, position)" ], "full_text": [], "triggers": [] } ], "id": "note", "name": "Note", "plural": "Notes", "visibility": "owner", "picture": { "photo": "photo:c5eb8f1ca78553c5419f520da4fd600be292251b4211ff367b203f8a920620e7", "object": "tool-notes" }, "builtin": true, "engine": "notes", "columns": [ { "key": "kind", "name": "Kind", "type": "choice", "choices": [ "note", "journal" ], "readonly": true, "default": "note" }, { "key": "title", "name": "Title", "type": "text", "placeholder": "Title" }, { "key": "body", "name": "Body", "type": "longtext", "placeholder": "Start writing…" }, { "key": "journal_date", "name": "Journal date", "type": "text", "readonly": true }, { "key": "project", "name": "Project", "type": "link", "link_to": "project" }, { "key": "author_kind", "name": "Author kind", "type": "choice", "choices": [ "user", "agent" ], "readonly": true, "default": "user" }, { "key": "author_label", "name": "Author label", "type": "text", "readonly": true }, { "key": "managed_by", "name": "Kept in step with", "type": "text", "readonly": true }, { "key": "external_id", "name": "External id", "type": "text", "readonly": true }, { "key": "pinned", "name": "Pinned", "type": "bool", "readonly": true, "default": false }, { "key": "archived_at", "name": "Archived", "type": "date" }, { "key": "trashed_at", "name": "Trashed at", "type": "text", "readonly": true }, { "key": "project_id", "name": "Project", "type": "link", "link_to": "project" }, { "key": "updated_at", "name": "Edited", "type": "date", "readonly": true, "format": "ago" }, { "key": "words", "name": "Words", "type": "number", "readonly": true, "units": { "one": "word", "other": "words", "zero": "" } }, { "key": "published_at", "name": "Published", "type": "date", "readonly": true }, { "key": "people", "name": "People", "type": "link", "link_to": "person", "readonly": true, "multiple": true, "edges": true }, { "key": "sent_by", "name": "Sent by", "type": "text", "readonly": true }, { "key": "sent_by_number", "name": "Sent from", "type": "text", "readonly": true }, { "key": "sent_at", "name": "Sent", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "send_id", "name": "Send", "type": "text", "readonly": true }, { "key": "pinned_in", "name": "Pinned in", "type": "text", "readonly": true } ], "title": "title", "date": "updated_at", "project": "project_id", "order": null, "slip": { "title": "title", "subtitle": "body", "trailing": "updated_at", "photo": null, "toggle": null, "title_fallback": "body", "dye": "cream" }, "tile": { "face": "slip-list", "current": { "column": "updated_at", "days": 7 } }, "page": [ { "heading": null, "columns": [ "updated_at", "body" ] }, { "heading": "Details", "columns": [ "project_id" ] } ], "archived": "archived_at", "readonly_when": "managed_by", "kept_by": { "when": "managed_by", "says": "Kept by your assistant" }, "seal": { "clear": [ "kind", "journal_date", "project", "project_id", "author_kind", "managed_by", "external_id", "pinned", "archived_at", "trashed_at", "updated_at", "published_at", "people", "sent_at", "send_id" ], "blind": [ "title", "body" ] }, "send": { "columns": [ "kind", "title", "body", "journal_date", "words", "published_at" ] }, "record_route": "/notes/note/[id]", "linked_when": { "made": "written {when}" }, "record_kind": "note", "pins": true, "filing_rank": 2, "made_by_verb": true, "role": "note", "projects_read": { "kind": "note", "read": "record", "families": [ "core", "projects" ] }, "sort": { "column": "updated_at", "descending": true }, "by_month": "updated_at", "empty": { "title": "No notes yet" }, "create": { "label": "New note" }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "note" } } ], "commands": [ { "id": "pin", "label": "Pin", "kind": "update", "verb": "update_note", "data": { "pinned": true }, "bindings": { "id": "$id" }, "when": { "pinned": false }, "receipt": "Pinned", "undo": "unpin", "object": "pin" }, { "id": "unpin", "label": "Unpin", "kind": "update", "verb": "update_note", "data": { "pinned": false }, "bindings": { "id": "$id" }, "when": { "pinned": true }, "receipt": "Unpinned", "undo": "pin", "object": "pin" }, { "id": "delete", "label": "Delete", "kind": "delete", "verb": "delete_record", "data": { "table": "note" }, "confirm": "It can come back from Deleted, and Undo on the receipt brings it back now.", "bindings": { "id": "$id" }, "receipt": "Deleted", "does": "destroys", "object": "bin" } ], "instructions": "A note is free-form writing in markdown with an optional title; when the title is empty the first line of the body stands in. Keep the person's words as they wrote them, and add to a note rather than rewriting it unless asked. A note can belong to one project directly and to more through project links. Pinned puts it at the top of every list in Cotton Notes; pinned_in is the tags it is pinned inside (a JSON list of tag names, lowercased), which Notes writes.", "groups": { "stack": "slips" }, "card": { "face": "note.page", "fields": [ { "slot": "title", "column": "title" }, { "slot": "date", "column": "updated_at", "form": "weekday_date" }, { "slot": "body", "column": "body", "markdown": true } ] }, "tool": { "views": [ { "id": "all", "label": "All", "visibility": "owner", "is_default": true, "read": { "table": "note" } } ], "name": "Notes", "purpose": "Notes and ideas you want to keep.", "key": "notes", "icon": "notebook-text", "card_stock": "cream", "route": "/notes", "figures": [ { "read": "notes", "one": "1 note", "many": "{n} notes" } ] }, "parts": { "shape": "desk", "head": { "facts": [ "updated_at" ] }, "links": [], "body": "body", "lists": [], "acts": { "more": [ "pin", "unpin" ], "away": "delete" }, "strip": [] } }, { "format_version": 1, "tables": [ { "name": "cotton_people", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "full_name", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n full_name TEXT NOT NULL", "position": 2 }, { "name": "org", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n org TEXT", "position": 3 }, { "name": "role_title", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n role_title TEXT", "position": 4 }, { "name": "city", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n city TEXT", "position": 5 }, { "name": "summary", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n summary TEXT", "position": 6 }, { "name": "summary_updated_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n summary_updated_at TEXT", "position": 7 }, { "name": "summary_by", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n summary_by TEXT", "position": 8 }, { "name": "contact_source", "type": "TEXT", "default": "'manual'", "nullable": false, "primary_key": false, "declaration": "\n contact_source TEXT NOT NULL DEFAULT 'manual'", "position": 9 }, { "name": "device_contact_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n device_contact_id TEXT", "position": 10 }, { "name": "archived_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n archived_at TEXT", "position": 11 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 12 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 13 }, { "name": "birth_month", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n birth_month INTEGER", "position": 14 }, { "name": "birth_day", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n birth_day INTEGER", "position": 15 }, { "name": "birth_year", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n birth_year INTEGER", "position": 16 }, { "name": "timezone", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n timezone TEXT", "position": 17 }, { "name": "avatar_url", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n avatar_url TEXT", "position": 18 }, { "name": "avatar_key", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n avatar_key TEXT", "position": 19 }, { "name": "device_contact_snapshot", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n device_contact_snapshot TEXT", "position": 20 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 21 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 22 }, { "name": "city_filled_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n city_filled_at TEXT", "position": 23 }, { "name": "avatar_photo_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n avatar_photo_id TEXT", "position": 24 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " trashed_at TEXT", "position": 25 }, { "name": "language", "type": "TEXT", "default": "'en'", "nullable": false, "primary_key": false, "declaration": " language TEXT NOT NULL DEFAULT 'en' CHECK (length(language) BETWEEN 2 AND 3 AND language NOT GLOB '*[^a-z]*')", "position": 26 }, { "name": "face_embedding", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " face_embedding TEXT CHECK (face_embedding IS NULL OR length(face_embedding) > 0)", "position": 27 }, { "name": "face_embedding_model", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " face_embedding_model TEXT CHECK (face_embedding_model IS NULL OR length(face_embedding_model) > 0)", "position": 28 }, { "name": "face_embedding_from", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " face_embedding_from TEXT CHECK (face_embedding_from IS NULL OR length(face_embedding_from) > 0)", "position": 29 }, { "name": "city_place", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " city_place TEXT", "position": 30 }, { "name": "country", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " country TEXT", "position": 31 } ], "constraints": [ { "declaration": "\n CHECK ((birth_day IS NULL) OR ((birth_day >= 1) AND (birth_day <= 31)))", "position": 32 }, { "declaration": "\n CHECK ((birth_month IS NULL) OR ((birth_month >= 1) AND (birth_month <= 12)))", "position": 33 }, { "declaration": "\n CHECK (((birth_month IS NOT NULL) + (birth_day IS NOT NULL)) IN (0, 2))", "position": 34 }, { "declaration": "\n CHECK (contact_source IN ('import', 'manual', 'apple_library'))", "position": 35 }, { "declaration": "\n CHECK ((summary IS NULL) OR (length(summary) <= 4000))", "position": 36 }, { "declaration": "\n CHECK ((summary_by IS NULL) OR (length(trim(summary_by)) > 0))", "position": 37 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 38 } ], "prefix": "CREATE TABLE \"cotton_people\" (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_people_workspace ON cotton_people (workspace_id)", "CREATE UNIQUE INDEX uq_cotton_people_device_contact ON cotton_people (workspace_id, device_contact_id) WHERE device_contact_id IS NOT NULL", "CREATE INDEX idx_cotton_people_city_filled ON cotton_people (workspace_id, city_filled_at) WHERE city_filled_at IS NOT NULL", "CREATE INDEX IF NOT EXISTS idx_cotton_people_author ON cotton_people (substr(_hlc, 20), _hlc)" ], "full_text": [ "CREATE VIRTUAL TABLE fts_people USING fts5(\n full_name, org, role_title, summary, content = 'cotton_people', content_rowid = 'rowid',\n tokenize = 'unicode61 remove_diacritics 2'\n )" ], "triggers": [ "CREATE TRIGGER fts_people_ai AFTER INSERT ON cotton_people WHEN new.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_people'), 0) BEGIN\n INSERT INTO fts_people (rowid, full_name, org, role_title, summary) VALUES (new.rowid, new.full_name, new.org, new.role_title, new.summary);\n END", "CREATE TRIGGER fts_people_ad AFTER DELETE ON cotton_people WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_people'), 0) BEGIN\n INSERT INTO fts_people (fts_people, rowid, full_name, org, role_title, summary) VALUES ('delete', old.rowid, old.full_name, old.org, old.role_title, old.summary);\n END", "CREATE TRIGGER fts_people_au AFTER UPDATE OF full_name, org, role_title, summary ON cotton_people\n FOR EACH ROW WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_people'), 0) AND (new.full_name IS NOT old.full_name OR new.org IS NOT old.org OR new.role_title IS NOT old.role_title OR new.summary IS NOT old.summary) BEGIN\n INSERT INTO fts_people (fts_people, rowid, full_name, org, role_title, summary) VALUES ('delete', old.rowid, old.full_name, old.org, old.role_title, old.summary);\n INSERT INTO fts_people (rowid, full_name, org, role_title, summary) VALUES (new.rowid, new.full_name, new.org, new.role_title, new.summary);\n END" ] } ], "id": "person", "name": "Person", "plural": "People", "visibility": "owner", "picture": { "photo": "photo:7d85a3b839e062730add96ea91492c4753f8951d2e7157d7d94552a6a301ec24", "object": "tool-people", "link_object": "people" }, "builtin": true, "engine": "people", "columns": [ { "key": "full_name", "name": "Name", "type": "text", "required": true, "placeholder": "Their name" }, { "key": "org", "name": "Organisation", "type": "text", "fact": true, "reading": "{value}" }, { "key": "role_title", "name": "Role", "type": "text", "fact": true, "reading": "{value}" }, { "key": "city", "name": "City", "type": "place", "place": { "id": "city_place", "country": "country", "zone": "timezone", "lat": "city_lat", "lng": "city_lng", "version": "city_version" } }, { "key": "summary", "name": "Summary", "type": "longtext", "placeholder": "Add a summary — how you know {first}, and what they do.", "provenance": { "by": "summary_by", "at": "summary_updated_at", "since": "summary_since" } }, { "key": "summary_updated_at", "name": "Summary written", "type": "date", "readonly": true }, { "key": "summary_by", "name": "Summary by", "type": "text", "readonly": true }, { "key": "contact_source", "type": "text", "readonly": true }, { "key": "device_contact_id", "type": "text", "readonly": true }, { "key": "archived_at", "name": "Archived", "type": "date" }, { "key": "birth_month", "name": "Birth month", "type": "number", "readonly": true }, { "key": "birth_day", "name": "Birthday", "type": "number", "readonly": true }, { "key": "birth_year", "name": "Birth year", "type": "number", "readonly": true }, { "key": "timezone", "name": "Time zone", "type": "text", "readonly": true, "zone": true }, { "key": "avatar_url", "type": "text", "readonly": true }, { "key": "avatar_key", "name": "Photo", "type": "photo", "opens": { "column": "avatar_photo_id", "table": "photo" } }, { "key": "device_contact_snapshot", "type": "longtext", "readonly": true }, { "key": "city_filled_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "avatar_photo_id", "name": "Original", "type": "link", "link_to": "photo", "readonly": true, "media": true }, { "key": "trashed_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "language", "name": "Language", "type": "choice", "required": true, "choices": [ "en", "hi", "ta", "te", "bn", "mr", "gu", "kn", "ml", "pa", "ur", "ar", "fr", "de", "es", "pt", "it", "nl", "sv", "da", "no", "fi", "is", "pl", "cs", "sk", "hu", "ro", "bg", "el", "ru", "uk", "tr", "he", "fa", "zh", "ja", "ko", "vi", "th", "id", "ms", "fil", "sw", "af", "ca", "eu", "gl", "hr", "sr", "sl", "lt", "lv", "et", "km", "lo", "my", "ne", "si", "am", "az", "hy", "ka", "kk", "uz", "mn", "zu" ], "choice_names": { "en": "English", "hi": "Hindi", "ta": "Tamil", "te": "Telugu", "bn": "Bengali", "mr": "Marathi", "gu": "Gujarati", "kn": "Kannada", "ml": "Malayalam", "pa": "Punjabi", "ur": "Urdu", "ar": "Arabic", "fr": "French", "de": "German", "es": "Spanish", "pt": "Portuguese", "it": "Italian", "nl": "Dutch", "sv": "Swedish", "da": "Danish", "no": "Norwegian", "fi": "Finnish", "is": "Icelandic", "pl": "Polish", "cs": "Czech", "sk": "Slovak", "hu": "Hungarian", "ro": "Romanian", "bg": "Bulgarian", "el": "Greek", "ru": "Russian", "uk": "Ukrainian", "tr": "Turkish", "he": "Hebrew", "fa": "Persian", "zh": "Chinese", "ja": "Japanese", "ko": "Korean", "vi": "Vietnamese", "th": "Thai", "id": "Indonesian", "ms": "Malay", "fil": "Filipino", "sw": "Swahili", "af": "Afrikaans", "ca": "Catalan", "eu": "Basque", "gl": "Galician", "hr": "Croatian", "sr": "Serbian", "sl": "Slovenian", "lt": "Lithuanian", "lv": "Latvian", "et": "Estonian", "km": "Khmer", "lo": "Lao", "my": "Burmese", "ne": "Nepali", "si": "Sinhala", "am": "Amharic", "az": "Azerbaijani", "hy": "Armenian", "ka": "Georgian", "kk": "Kazakh", "uz": "Uzbek", "mn": "Mongolian", "zu": "Zulu" }, "default": "en" }, { "key": "face_embedding", "type": "text", "readonly": true }, { "key": "face_embedding_model", "type": "text", "readonly": true }, { "key": "face_embedding_from", "type": "text", "readonly": true }, { "key": "city_place", "name": "Place", "type": "text", "readonly": true }, { "key": "city_lat", "name": "Place latitude", "type": "number", "readonly": true }, { "key": "city_lng", "name": "Place longitude", "type": "number", "readonly": true }, { "key": "city_version", "name": "Place version", "type": "text", "readonly": true }, { "key": "country", "name": "Country", "type": "text", "readonly": true }, { "key": "phones", "name": "Phone", "type": "text", "readonly": true, "multiple": true, "reach": { "kind": "phone", "channel": "thread_channel" } }, { "key": "emails", "name": "Email", "type": "text", "readonly": true, "multiple": true, "reach": "email" }, { "key": "instagrams", "name": "Instagram", "type": "text", "readonly": true, "multiple": true, "reach": "instagram" }, { "key": "birthday", "name": "Birthday", "type": "date", "yearly": true }, { "key": "summary_since", "name": "Since the summary", "type": "text", "readonly": true }, { "key": "thread_channel", "name": "Messages over", "type": "text", "readonly": true }, { "key": "reached_at", "name": "Last reached", "type": "date", "readonly": true, "computed": { "activity": { "handles": "person_handle", "link": "person_id", "op": "latest" } } }, { "key": "reach_90d", "name": "Reached in 90 days", "type": "number", "readonly": true, "computed": { "activity": { "handles": "person_handle", "link": "person_id", "op": "count", "within_days": 90 } } }, { "key": "own_birthdays__wish", "name": "Send wishes", "type": "bool", "hidden": true }, { "key": "own_birthdays__last_wished", "name": "Last wished", "type": "date", "hidden": true }, { "key": "sent_by", "name": "Sent by", "type": "text", "readonly": true }, { "key": "sent_by_number", "name": "Sent from", "type": "text", "readonly": true }, { "key": "sent_at", "name": "Sent", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "send_id", "name": "Send", "type": "text", "readonly": true } ], "title": "full_name", "voice_words": [ "full_name", "org", "city" ], "date": null, "project": null, "order": null, "slip": { "title": "full_name", "subtitle": [ "org", "role_title", "city" ], "trailing": "timezone", "photo": "avatar_key", "toggle": null, "dye": "blue" }, "tile": { "face": "polaroid-grid" }, "page": [ { "heading": null, "columns": [ "avatar_key", "full_name", "role_title", "org", "city", "language", "birthday", "timezone" ] }, { "heading": "Handles", "list": { "table": "person_handle", "link": "person_id", "limit": 5, "add": "Add a handle" } }, { "heading": "Summary", "columns": [ "summary" ] }, { "heading": "Todos", "list": { "table": "todo", "link": "people", "limit": 4, "columns": 2 } }, { "heading": "Messages", "list": { "table": "thread", "link": "member_people", "limit": 3 } }, { "heading": "Calls", "list": { "table": "call", "link": "person_id", "limit": 3 } }, { "heading": "Notes", "list": { "table": "note", "link": "people", "limit": 3 } }, { "heading": "Events", "list": { "table": "event", "link": "people", "limit": 3 } }, { "heading": "Photos", "list": { "table": "photo", "link": "people", "limit": 6, "columns": 3, "with": [ { "table": "video", "link": "people" } ] } }, { "heading": "Social", "list": { "table": "story", "link": "person_id", "limit": 6, "columns": 3 } }, { "heading": "Is this {first}?", "list": { "table": "face", "link": "suggested_person_id" } }, { "heading": "Documents", "list": { "table": "document", "link": "people", "limit": 3, "columns": 2 } }, { "heading": "Also linked", "links": { "except": [ "todo", "note", "event", "photo", "video", "document", "call", "thread", "face", "owed", "person_handle", "story" ] } } ], "archived": "archived_at", "seal": { "clear": [ "contact_source", "archived_at", "avatar_key", "avatar_photo_id", "trashed_at", "language", "summary_updated_at", "city_filled_at", "own_birthdays__wish", "own_birthdays__last_wished", "sent_at", "send_id" ], "blind": [ "full_name" ] }, "send": { "columns": [ "full_name", "org", "role_title", "city", "birth_month", "birth_day", "birth_year", "timezone", "avatar_key", "city_place", "country", "phones", "emails", "instagrams", "birthday", "language" ], "files": [ "avatar_key" ], "with": [ { "table": "person_handle", "by": "person_id" } ] }, "record_route": "/people/person/[id]", "record_kind": "person", "filing_rank": 4, "role": "person", "projects_read": { "kind": "person", "read": "person", "families": [ "people", "projects" ] }, "owner_sections": [ { "heading": "Voice words", "list": { "table": "voice_word", "limit": 5, "whole": "All voice words" }, "role": "side" }, { "heading": "Devices", "list": { "table": "device", "limit": 1, "whole": "All devices" }, "role": "side" } ], "sort": { "column": "full_name" }, "layout": "cards", "grid": { "columns": 4 }, "empty": { "title": "No people yet.", "message": "Add someone by name, or bring in the contacts that matter from this phone." }, "create": { "label": "Import from contacts", "path": "/people/import" }, "actions": [ { "label": "Call", "column": "phones", "scheme": "tel", "object": "handset" }, { "label": "Message", "column": "phones", "scheme": "sms", "object": "slip" }, { "label": "Email", "column": "emails", "scheme": "mailto", "object": "envelope" } ], "index": "full_name", "search": [ "full_name", "org", "city" ], "delete": false, "links": [ { "label": "Import contacts", "table": "import", "path": "/people/import" } ], "related": [ { "label": "threads", "table": "thread", "column": "member_people" }, { "label": "photos", "table": "photo", "column": "people" }, { "label": "events", "table": "event", "column": "people" }, { "label": "todos", "table": "todo", "column": "people" } ], "commands": [ { "id": "archive", "label": "Archive", "kind": "update", "verb": "archive_person", "bindings": { "id": "$id" }, "when": { "archived_at": false }, "receipt": "Archived", "does": "puts-away", "object": "archive" } ], "instructions": "A person is someone the owner knows: name, how to reach them, where they work and live, and their birthday. Search for an existing person before adding one, because duplicates split their history. The summary is a short description of who they are to the owner; keep it factual and never invent contact details. A person is archived, never deleted. Never invent a photo; a person with no photo shows none.", "groups": { "stack": "polaroids" }, "card": { "face": "person.rolodex", "offers": [ "person.rolodex", "person.file", "person.passport" ], "fields": [ { "slot": "photo", "column": "avatar_key" }, { "slot": "title", "column": "full_name" }, { "slot": "subtitle", "column": "role_title", "also": [ "org", "city" ] }, { "slot": "place", "column": "org" }, { "slot": "date", "column": "birthday" }, { "slot": "body", "column": "summary" }, { "slot": "reached", "column": "reached_at", "form": "relative", "also": [ "thread_channel" ], "line": "field.reached" }, { "slot": "phone", "column": "phones" } ], "corner": [ { "column": "birthday", "form": "next_occurrence", "within": 7, "line": "corner.birthday" }, { "column": "reached_at", "form": "since", "behind": 42, "line": "corner.not_reached" } ] }, "tool": { "views": [ { "id": "all", "label": "All", "visibility": "owner", "is_default": true, "read": { "table": "person" }, "sort": { "column": "reached_at", "descending": true, "tie": "full_name", "tie_descending": false } }, { "id": "a_to_z", "label": "A to Z", "visibility": "owner", "is_default": false, "read": { "table": "person" } } ], "name": "People", "purpose": "People and how to reach them.", "key": "people", "icon": "users", "card_stock": "rose", "route": "/people", "figures": [ { "read": "people", "one": "1 person", "many": "{n} people" } ] }, "parts": { "shape": "sheet", "head": { "facts": [ "role_title" ] }, "links": [], "body": "summary", "lists": [ { "table": "person_handle", "relation": "person_id", "heading": "Handles", "main_act": "keep", "keeps": [ "phones", "emails", "instagrams" ] }, { "table": "todo", "relation": "people", "heading": "Todos" }, { "table": "thread", "relation": "member_people", "heading": "Messages" }, { "table": "call", "relation": "person_id", "heading": "Calls" }, { "table": "note", "relation": "people", "heading": "Notes" }, { "table": "event", "relation": "people", "heading": "Events" }, { "table": "photo", "relation": "people", "heading": "Photos", "face": "photos" }, { "table": "story", "relation": "person_id", "heading": "Social" }, { "table": "document", "relation": "people", "heading": "Documents" } ], "acts": { "main": "tel:phones", "more": [ "sms:phones", "mailto:emails" ], "away": "archive" }, "cards": [ { "column": "phones" }, { "column": "emails" }, { "column": "instagrams" }, { "column": "city" }, { "column": "timezone", "when": { "column": "city", "present": false } }, { "column": "birthday" }, { "column": "language", "object": "message" }, { "column": "org", "label": "Works at" }, { "column": "summary", "width": "full" } ], "strip": [] } }, { "format_version": 1, "tables": [ { "name": "cotton_person_handles", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "person_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n person_id TEXT NOT NULL", "position": 2 }, { "name": "kind", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n kind TEXT NOT NULL CHECK (kind IN ('phone','email','instagram','facebook','linkedin'))", "position": 3 }, { "name": "value", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n value TEXT NOT NULL CHECK (length(trim(value)) > 0)", "position": 4 }, { "name": "normalised", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n normalised TEXT NOT NULL CHECK (length(normalised) > 0)", "position": 5 }, { "name": "source", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n source TEXT NOT NULL CHECK (source IN ('manual','contacts','import','suggestion','whatsapp','instagram','facebook','linkedin'))", "position": 6 }, { "name": "verified_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n verified_at TEXT", "position": 7 }, { "name": "position", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n position INTEGER NOT NULL DEFAULT 0", "position": 8 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 9 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 10 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 11 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 12 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " trashed_at TEXT", "position": 13 } ], "constraints": [ { "declaration": "\n FOREIGN KEY (person_id) REFERENCES cotton_people(id)", "position": 14 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 15 } ], "prefix": "CREATE TABLE IF NOT EXISTS cotton_person_handles (", "suffix": ")", "indexes": [ "CREATE INDEX IF NOT EXISTS idx_cotton_person_handles_author ON cotton_person_handles (substr(_hlc, 20), _hlc)", "CREATE UNIQUE INDEX uq_cotton_person_handles_handle ON cotton_person_handles (workspace_id, kind, normalised)", "CREATE INDEX idx_cotton_person_handles_person ON cotton_person_handles (person_id)" ], "full_text": [], "triggers": [] } ], "id": "person_handle", "name": "Handle", "plural": "Handles", "visibility": "owner", "picture": null, "builtin": true, "engine": "people", "columns": [ { "key": "person_id", "name": "Person", "type": "link", "required": true, "link_to": "person", "contributes": false }, { "key": "kind", "name": "Kind", "type": "choice", "required": true, "choices": [ "phone", "email", "instagram", "facebook", "linkedin" ], "labels": { "phone": "Phone", "email": "Email", "instagram": "Instagram", "facebook": "Facebook", "linkedin": "LinkedIn" } }, { "key": "value", "name": "Handle", "type": "text", "required": true }, { "key": "normalised", "name": "Matched as", "type": "text", "readonly": true }, { "key": "source", "name": "From", "type": "text", "readonly": true }, { "key": "verified_at", "name": "Confirmed", "type": "date", "readonly": true }, { "key": "position", "name": "Position", "type": "number", "readonly": true }, { "key": "trashed_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "kept", "name": "Confirmed", "type": "bool" }, { "key": "sent_by", "name": "Sent by", "type": "text", "readonly": true }, { "key": "sent_by_number", "name": "Sent from", "type": "text", "readonly": true }, { "key": "sent_at", "name": "Sent", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "send_id", "name": "Send", "type": "text", "readonly": true } ], "title": "value", "date": null, "project": null, "order": null, "slip": { "title": "value", "subtitle": "kind", "trailing": null, "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "value", "kind", "person_id" ] }, { "heading": "Details", "columns": [ "source", "verified_at" ] } ], "readonly_when": "normalised", "seal": { "clear": [ "person_id", "kind", "source", "verified_at", "position", "trashed_at", "kept", "sent_at", "send_id" ] }, "send": { "columns": [ "kind", "value", "normalised", "position" ] }, "sort": { "column": "position" }, "empty": { "title": "No handles yet.", "message": "Add a phone number, email address or social handle." }, "search": [ "value" ], "deletion": { "confirm": "Remove this handle from the person? Their conversations stay.", "label": "Remove", "asks": true }, "commands": [ { "id": "keep", "label": "Confirm handle", "kind": "update", "verb": "update_record", "data": { "table": "person_handle", "patch": { "kept": true } }, "bindings": { "id": "$id" }, "when": { "kept": false }, "receipt": "Handle confirmed", "undo": "unkeep", "does": "completes", "object": "tick" }, { "id": "unkeep", "label": "Unconfirm", "kind": "update", "verb": "update_record", "data": { "table": "person_handle", "patch": { "kept": false } }, "bindings": { "id": "$id" }, "when": { "kept": true }, "receipt": "Confirmation removed", "undo": "keep", "object": "undo" }, { "id": "remove", "label": "Remove", "kind": "delete", "verb": "delete_record", "data": { "table": "person_handle" }, "confirm": "Remove this handle from the person? Their conversations stay.", "bindings": { "id": "$id" }, "receipt": "Removed", "does": "destroys", "object": "bin" }, { "id": "person", "label": "Open person", "kind": "open", "opens": "person_id", "object": "person" } ], "instructions": "A handle is one address a person can be reached by. Use phone for a number, including WhatsApp, email for an email address, or the social site kind. Never create a second person or merge conversations to keep a handle. A normalized handle belongs to only one person in this database. Keep confirms this address; Remove removes only the address, leaving the person and conversations. To correct an address, remove it and add the correct one.", "card": { "face": "plain", "fields": [ { "slot": "title", "column": "value" }, { "slot": "subtitle", "column": "kind" }, { "slot": "facts", "column": "source", "also": [ "verified_at" ] } ] }, "parts": { "shape": "sheet", "head": { "facts": [] }, "links": [], "lists": [], "acts": { "main": "keep", "more": [ "person" ], "away": "remove" }, "cards": [ { "column": "kind" }, { "column": "kept" }, { "column": "source" } ], "strip": [] } }, { "format_version": 1, "tables": [ { "name": "cotton_email_threads", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "external_key", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n external_key TEXT NOT NULL", "position": 2 }, { "name": "subject", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n subject TEXT", "position": 3 }, { "name": "first_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n first_at TEXT", "position": 4 }, { "name": "last_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n last_at TEXT", "position": 5 }, { "name": "email_count", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n email_count INTEGER NOT NULL DEFAULT 0", "position": 6 }, { "name": "summary", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n summary TEXT", "position": 7 }, { "name": "summary_updated_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n summary_updated_at TEXT", "position": 8 }, { "name": "summary_by", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n summary_by TEXT", "position": 9 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 10 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 11 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 12 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " trashed_at TEXT", "position": 13 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 14 }, { "name": "sender_address", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n sender_address TEXT", "position": 15 }, { "name": "sender_kind", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n sender_kind TEXT", "position": 16 }, { "name": "record_kind", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n record_kind TEXT", "position": 17 }, { "name": "amount_minor", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n amount_minor INTEGER", "position": 18 }, { "name": "currency", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n currency TEXT", "position": 19 }, { "name": "merchant", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n merchant TEXT", "position": 20 }, { "name": "record_on", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n record_on TEXT", "position": 21 }, { "name": "reference", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n reference TEXT", "position": 22 }, { "name": "record_reason", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n record_reason TEXT", "position": 23 } ], "constraints": [ { "declaration": "\n UNIQUE (workspace_id, external_key)", "position": 24 }, { "declaration": "\n CHECK ((record_kind IS NULL) OR (record_kind IN ('receipt', 'statement', 'ticket', 'booking', 'code', 'delivery', 'notice')))", "position": 25 }, { "declaration": "\n CHECK ((currency IS NULL) OR (length(currency) = 3 AND currency = upper(currency)))", "position": 26 }, { "declaration": "\n CHECK ((record_on IS NULL) OR (record_on GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]'))", "position": 27 }, { "declaration": "\n CHECK ((sender_address IS NULL) OR (sender_address = lower(sender_address) AND length(sender_address) > 0))", "position": 28 }, { "declaration": "\n CHECK ((sender_kind IS NULL) OR (sender_kind IN ('person', 'service', 'junk')))", "position": 29 }, { "declaration": "\n CHECK (length(external_key) > 0)", "position": 30 }, { "declaration": "\n CHECK (email_count >= 0)", "position": 31 }, { "declaration": "\n CHECK ((summary IS NULL) OR (length(summary) <= 4000))", "position": 32 }, { "declaration": "\n CHECK ((summary_by IS NULL) OR (length(trim(summary_by)) > 0))", "position": 33 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 34 } ], "prefix": "CREATE TABLE cotton_email_threads (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_email_threads_workspace_recent ON cotton_email_threads (workspace_id, last_at DESC)", "CREATE INDEX idx_cotton_email_threads_sender_kind ON cotton_email_threads (workspace_id, sender_kind, last_at DESC)", "CREATE INDEX idx_cotton_email_threads_sender ON cotton_email_threads (workspace_id, sender_address) WHERE sender_address IS NOT NULL", "CREATE INDEX idx_cotton_email_threads_record_kind ON cotton_email_threads (workspace_id, record_kind, last_at DESC) WHERE record_kind IS NOT NULL", "CREATE INDEX idx_cotton_email_threads_merchant ON cotton_email_threads (workspace_id, id, merchant, trashed_at) WHERE merchant IS NOT NULL AND trashed_at IS NULL", "CREATE INDEX IF NOT EXISTS idx_cotton_email_threads_author ON cotton_email_threads (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "id": "email_thread", "name": "Email", "plural": "Email", "visibility": "owner", "picture": { "photo": "photo:b5cf213d649bc342c2915d314e56b4f4fbc12dabd589527e171f51fa674aa2ea", "object": "tool-email" }, "builtin": true, "engine": "email", "columns": [ { "key": "external_key", "type": "text", "readonly": true }, { "key": "subject", "type": "text", "readonly": true, "placeholder": "No subject" }, { "key": "first_at", "name": "First email", "type": "date", "readonly": true }, { "key": "last_at", "name": "Latest email", "type": "date", "readonly": true, "fact": false, "reading": "{value}", "format": "calendar-datetime" }, { "key": "email_count", "name": "Emails", "type": "number", "readonly": true, "units": { "one": "email", "other": "emails", "zero": "0 emails" } }, { "key": "summary", "type": "longtext", "readonly": false }, { "key": "summary_updated_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "summary_by", "name": "Summary by", "type": "text", "readonly": true }, { "key": "trashed_at", "name": "Binned", "type": "date", "readonly": true }, { "key": "sender_address", "type": "text", "readonly": true }, { "key": "sender_kind", "name": "Sender is", "type": "choice", "choices": [ "person", "service", "junk" ], "readonly": true }, { "key": "record_kind", "name": "Record", "type": "choice", "choices": [ "receipt", "statement", "ticket", "booking", "code", "delivery", "notice" ], "readonly": true, "labels": { "receipt": "Receipt", "statement": "Statement", "ticket": "Ticket", "booking": "Booking", "code": "Sign-in code", "delivery": "Delivery", "notice": "Notice" } }, { "key": "amount_minor", "name": "Amount", "type": "amount", "readonly": true, "currency": "currency" }, { "key": "currency", "type": "text", "readonly": true }, { "key": "merchant", "name": "Merchant", "type": "text", "readonly": true }, { "key": "record_on", "name": "On", "type": "date", "readonly": true }, { "key": "reference", "name": "Reference", "type": "text", "readonly": true }, { "key": "record_reason", "type": "text", "readonly": true }, { "key": "sender", "type": "text", "readonly": true, "fact": true, "reading": "{value}" }, { "key": "preview", "type": "text", "readonly": true }, { "key": "read_state", "name": "Read state", "type": "choice", "choices": [ "read", "unread" ], "readonly": true, "red_when": [ "unread" ], "labels": { "read": "Read", "unread": "Unread" } }, { "key": "starred", "type": "bool", "readonly": true }, { "key": "in_inbox", "name": "In inbox", "type": "bool", "readonly": true }, { "key": "binned", "name": "In bin", "type": "bool", "readonly": true }, { "key": "marks", "name": "Marked", "type": "text", "readonly": true }, { "key": "people", "name": "People", "type": "link", "link_to": "person", "readonly": true, "multiple": true }, { "key": "transaction_id", "name": "Recorded in Money", "type": "link", "link_to": "transaction", "readonly": true }, { "key": "event_id", "name": "In the calendar", "type": "link", "link_to": "event", "readonly": true } ], "title": "subject", "voice_words": [ "merchant" ], "date": "last_at", "project": null, "order": null, "slip": { "title": "sender", "subtitle": "subject", "trailing": null, "photo": null, "toggle": null, "caption": { "columns": [ "last_at", "preview" ] }, "badge": { "column": "starred", "symbol": "star.fill", "spoken": "Starred" }, "unread": "read_state", "dye": "straw" }, "tile": { "face": "slip-list", "current": { "column": "last_at", "days": 2 } }, "page": [ { "heading": null, "columns": [ "subject", "sender", "marks", "email_count", "first_at", "last_at", "transaction_id", "event_id" ] }, { "heading": "Summary", "columns": [ "summary", "summary_by" ] }, { "heading": null, "columns": [ "trashed_at" ] } ], "page_parts": [ "title", "facts", "messages", "grid" ], "add": false, "seal": { "clear": [ "first_at", "last_at", "trashed_at", "sender_kind", "people", "transaction_id", "event_id" ], "blind": [ "subject" ], "blind_exact": [ "external_key", "sender_address" ] }, "record_route": "/email/[id]", "sort": { "column": "last_at", "descending": true }, "by_day": "last_at", "empty": { "title": "No email in this view", "message": "Email from connected accounts appears here when it matches this view." }, "conversation": { "table": "email", "links": [ "thread_id" ], "body": "body", "at": "sent_at", "mine": { "column": "direction", "values": [ "out" ] }, "media": "media", "can_send": false, "folds": true, "header_columns": [ "from_name", "from_email", "to_line", "cc_line", "subject" ] }, "delete": false, "links": [ { "label": "Senders", "table": "email_sender" }, { "label": "Junk senders", "table": "email_sender", "where": { "blocked": true } } ], "link_tiles": { "after": 4 }, "commands": [ { "id": "record_as_transaction", "label": "Record transaction", "kind": "create", "method": "records.recordAsTransaction", "bindings": { "threadId": "$id" }, "when": { "record_kind": [ "receipt", "statement" ], "transaction_id": null }, "receipt": "Recorded in Money", "does": "moves", "object": "folder" }, { "id": "add_to_calendar", "label": "Add event", "kind": "create", "method": "records.addToCalendar", "bindings": { "threadId": "$id" }, "when": { "record_kind": [ "ticket", "booking" ], "event_id": null }, "receipt": "Added to the calendar", "does": "moves", "object": "folder" }, { "id": "star", "label": "Star", "kind": "update", "verb": "update_email", "data": { "starred": true }, "bindings": { "threadId": "$id" }, "when": { "starred": false, "binned": false }, "receipt": "Starred", "undo": "unstar", "does": "completes", "object": "star" }, { "id": "unstar", "label": "Unstar", "kind": "update", "verb": "update_email", "data": { "starred": false }, "bindings": { "threadId": "$id" }, "when": { "starred": true, "binned": false }, "receipt": "Unstarred", "undo": "star", "object": "star" }, { "id": "archive", "label": "Archive", "kind": "update", "verb": "update_email", "data": { "inbox": false }, "bindings": { "threadId": "$id" }, "when": { "in_inbox": true, "binned": false }, "receipt": "Archived", "undo": "inbox", "does": "puts-away", "object": "folder" }, { "id": "inbox", "label": "Move to inbox", "kind": "update", "verb": "update_email", "data": { "inbox": true }, "bindings": { "threadId": "$id" }, "when": { "in_inbox": false, "binned": false }, "receipt": "Moved {name} to the inbox", "undo": "archive", "does": "moves", "object": "folder" }, { "id": "junk", "label": "Junk", "kind": "update", "verb": "block_sender", "destructive": true, "confirm": "Mail from this sender goes to Junk from now on. Not junk brings it back.", "bindings": { "address": "sender_address" }, "when": { "sender_kind": { "not": "junk" }, "binned": false }, "receipt": "Moved {name} to Junk", "does": "destroys", "object": "cross" }, { "id": "not_junk", "label": "Unblock", "kind": "update", "verb": "unblock_sender", "bindings": { "address": "sender_address" }, "when": { "sender_kind": "junk", "binned": false }, "receipt": "Moved {name} out of Junk", "does": "completes", "object": "stamp" }, { "id": "transaction", "label": "Open transaction", "kind": "open", "opens": "transaction_id", "object": "open" }, { "id": "event", "label": "Open event", "kind": "open", "opens": "event_id", "object": "open" } ], "slip_by": { "column": "record_kind", "slips": { "receipt": { "title": "merchant", "subtitle": "subject", "caption": { "columns": [ "last_at", "preview" ] } }, "statement": { "title": "merchant", "subtitle": "subject", "caption": { "columns": [ "last_at", "preview" ] } }, "ticket": { "title": "merchant", "subtitle": "subject", "caption": { "columns": [ "last_at", "preview" ] } }, "booking": { "title": "merchant", "subtitle": "subject", "caption": { "columns": [ "last_at", "preview" ] } }, "delivery": { "title": "merchant", "subtitle": "subject", "caption": { "columns": [ "last_at", "preview" ] } }, "code": { "title": "merchant", "subtitle": "subject", "caption": { "columns": [ "last_at", "preview" ] } } } }, "instructions": "Imported email archive. Ingest and Gmail sync run in Rust. Cotton has no send or reply verb. Never create imported mail as a substitute for delivery.", "groups": { "stack": "slips" }, "card": { "face": "email", "fields": [ { "slot": "title", "column": "subject" }, { "slot": "subtitle", "column": "sender" }, { "slot": "body", "column": "preview" }, { "slot": "date", "column": "last_at", "form": "weekday_date" }, { "slot": "count", "column": "email_count" }, { "slot": "unread", "column": "read_state", "only": [ "unread" ] }, { "slot": "amount", "column": "amount_minor" }, { "slot": "people", "column": "people", "max": 3 } ] }, "tool": { "views": [ { "id": "today", "label": "Today", "visibility": "owner", "is_default": true, "read": { "table": "email_thread", "section": "today", "empty": { "line": "empty_views.email.today", "table": true } } }, { "id": "records", "label": "Records", "visibility": "owner", "is_default": false, "read": { "table": "email_thread", "where": { "sender_kind": "service" }, "empty": { "line": "empty_views.email.records", "table": true } } }, { "id": "people", "label": "People", "visibility": "owner", "is_default": false, "read": { "table": "email_thread", "where": { "sender_kind": "person" }, "empty": { "line": "empty_views.email.people", "table": true } } }, { "id": "junk", "label": "Junk", "visibility": "owner", "is_default": false, "read": { "table": "email_thread", "where": { "sender_kind": "junk" }, "empty": { "line": "empty_views.email.junk", "table": true } } }, { "id": "all", "label": "All", "visibility": "owner", "is_default": false, "read": { "table": "email_thread" } } ], "name": "Email", "purpose": "Your email conversations and attachments.", "key": "email", "icon": "mail", "card_stock": "rose", "route": "/email" }, "parts": { "shape": "desk", "head": { "facts": [ "sender" ] }, "links": [], "lists": [], "acts": { "more": [ "star", "unstar", "inbox", "not_junk", "record_as_transaction", "add_to_calendar", "transaction", "event" ], "away": "junk" }, "strip": [ { "column": "marks" }, { "column": "record_on" }, { "column": "amount_minor" }, { "column": "merchant" }, { "column": "reference" } ] } }, { "format_version": 1, "tables": [ { "name": "cotton_blocked_senders", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "address", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n address TEXT NOT NULL", "position": 2 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 3 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 4 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 5 } ], "constraints": [ { "declaration": "\n UNIQUE (workspace_id, address)", "position": 6 }, { "declaration": "\n CHECK (length(address) > 0)", "position": 7 }, { "declaration": "\n CHECK (address = lower(address))", "position": 8 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 9 } ], "prefix": "CREATE TABLE cotton_blocked_senders (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_blocked_senders_address ON cotton_blocked_senders (workspace_id, address)", "CREATE INDEX IF NOT EXISTS idx_cotton_blocked_senders_author ON cotton_blocked_senders (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] }, { "name": "cotton_email_senders", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "address", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n address TEXT NOT NULL", "position": 2 }, { "name": "kind", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n kind TEXT NOT NULL", "position": 3 }, { "name": "written_to", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n written_to INTEGER NOT NULL DEFAULT 0", "position": 4 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 5 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 6 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 7 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 8 }, { "name": "decided_by", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n decided_by TEXT CHECK (decided_by IS NULL OR decided_by IN ('owner', 'assistant'))", "position": 9 }, { "name": "verdict", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n verdict TEXT CHECK (verdict IS NULL OR verdict IN ('person', 'service', 'junk'))", "position": 10 }, { "name": "reason", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n reason TEXT", "position": 11 }, { "name": "decided_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n decided_at TEXT", "position": 12 } ], "constraints": [ { "declaration": "\n UNIQUE (workspace_id, address)", "position": 13 }, { "declaration": "\n CHECK (length(address) > 0)", "position": 14 }, { "declaration": "\n CHECK (address = lower(address))", "position": 15 }, { "declaration": "\n CHECK (kind IN ('person', 'service', 'junk'))", "position": 16 }, { "declaration": "\n CHECK (written_to IN (0, 1))", "position": 17 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 18 } ], "prefix": "CREATE TABLE cotton_email_senders (", "suffix": ")", "indexes": [ "CREATE INDEX IF NOT EXISTS idx_cotton_email_senders_author ON cotton_email_senders (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "id": "email_sender", "name": "Email sender", "plural": "Email senders", "visibility": "owner", "picture": null, "builtin": true, "engine": "email", "columns": [ { "key": "address", "type": "text", "readonly": true, "fact": true, "reading": "{value}" }, { "key": "kind", "name": "Is", "type": "choice", "choices": [ "person", "service", "junk" ], "readonly": true, "labels": { "person": "Person", "service": "Service", "junk": "Junk" } }, { "key": "written_to", "type": "bool", "readonly": true }, { "key": "decided_by", "type": "text", "readonly": true }, { "key": "verdict", "type": "text", "readonly": true }, { "key": "reason", "name": "Why", "type": "text", "readonly": true }, { "key": "decided_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "name", "type": "text", "readonly": true }, { "key": "last_at", "name": "Latest email", "type": "date", "readonly": true }, { "key": "email_count", "name": "Emails", "type": "number", "readonly": true, "units": { "one": "email", "other": "emails", "zero": "0 emails" } }, { "key": "unread_count", "name": "Unread", "type": "number", "readonly": true, "units": { "one": "unread email", "other": "unread emails", "zero": "0 unread emails" } }, { "key": "blocked", "name": "Blocked", "type": "bool", "readonly": true }, { "key": "in_people", "name": "In People", "type": "bool", "readonly": true } ], "title": "name", "date": "last_at", "project": null, "order": null, "slip": { "title": "name", "subtitle": "address", "trailing": "last_at", "photo": null, "toggle": null, "caption": { "columns": [ "email_count" ] } }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "name", "address", "email_count", "unread_count", "last_at", "blocked", "kind", "reason" ] } ], "seal": { "clear": [ "last_at" ], "blind_exact": [ "address" ] }, "empty": { "title": "No senders in this view", "message": "Senders appear here as email arrives from connected accounts." }, "delete": false, "commands": [ { "id": "junk", "label": "Block sender", "kind": "update", "verb": "block_sender", "destructive": true, "confirm": "Mail from this sender goes to Junk from now on. Keep brings it back.", "bindings": { "address": "$id" }, "when": { "blocked": false }, "receipt": "Moved {name} to Junk", "does": "destroys", "object": "cross" }, { "id": "keep", "label": "Keep", "kind": "update", "verb": "unblock_sender", "bindings": { "address": "$id" }, "when": { "blocked": true }, "receipt": "Kept {name}", "does": "completes", "object": "tick" }, { "id": "add_to_people", "label": "Add person", "kind": "create", "verb": "add_sender_to_people", "bindings": { "address": "$id" }, "when": { "in_people": false, "blocked": false }, "receipt": "Added to People", "does": "moves", "object": "folder" } ], "instructions": "Imported email archive. Ingest and Gmail sync run in Rust. Cotton has no send or reply verb. Never create imported mail as a substitute for delivery.", "card": { "face": "plain", "fields": [ { "slot": "title", "column": "name" }, { "slot": "subtitle", "column": "address" }, { "slot": "facts", "column": "last_at", "also": [ "email_count", "unread_count", "kind", "blocked" ] } ] }, "parts": { "shape": "sheet", "head": { "facts": [ "address" ] }, "links": [], "lists": [ { "table": "email_thread", "match": { "column": "sender_address", "parent": "address" }, "heading": "Mail" } ], "acts": { "more": [ "keep", "add_to_people" ], "away": "junk" }, "cards": [ { "column": "kind" }, { "column": "last_at" }, { "column": "unread_count" }, { "column": "blocked" } ], "strip": [] } }, { "format_version": 1, "tables": [ { "name": "cotton_emails", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "thread_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n thread_id TEXT NOT NULL", "position": 2 }, { "name": "external_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n external_id TEXT NOT NULL", "position": 3 }, { "name": "subject", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n subject TEXT", "position": 4 }, { "name": "from_email", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n from_email TEXT NOT NULL", "position": 5 }, { "name": "from_name", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n from_name TEXT", "position": 6 }, { "name": "recipients", "type": "TEXT", "default": "'[]'", "nullable": false, "primary_key": false, "declaration": "\n recipients TEXT NOT NULL DEFAULT '[]'", "position": 7 }, { "name": "sent_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n sent_at TEXT NOT NULL", "position": 8 }, { "name": "body", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n body TEXT", "position": 9 }, { "name": "snippet", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n snippet TEXT", "position": 10 }, { "name": "attachments", "type": "TEXT", "default": "'[]'", "nullable": false, "primary_key": false, "declaration": "\n attachments TEXT NOT NULL DEFAULT '[]'", "position": 11 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 12 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 13 }, { "name": "gmail_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " gmail_id TEXT", "position": 14 }, { "name": "gmail_account", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " gmail_account TEXT", "position": 15 }, { "name": "labels", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " labels TEXT CHECK (labels IS NULL OR json_type(labels) = 'array')", "position": 16 }, { "name": "unread", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": " unread INTEGER NOT NULL DEFAULT 0", "position": 17 }, { "name": "starred", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": " starred INTEGER NOT NULL DEFAULT 0", "position": 18 }, { "name": "in_inbox", "type": "INTEGER", "default": "1", "nullable": false, "primary_key": false, "declaration": " in_inbox INTEGER NOT NULL DEFAULT 1", "position": 19 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " trashed_at TEXT", "position": 20 }, { "name": "sync_state", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " sync_state TEXT CHECK (sync_state IS NULL OR sync_state IN ('synced', 'pending'))", "position": 21 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 22 }, { "name": "account", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n account TEXT", "position": 23 }, { "name": "to_line", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " to_line TEXT", "position": 24 }, { "name": "cc_line", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " cc_line TEXT", "position": 25 }, { "name": "direction", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " direction TEXT", "position": 26 }, { "name": "message_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " message_id TEXT", "position": 27 }, { "name": "message_refs", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " message_refs TEXT", "position": 28 }, { "name": "list_unsubscribe", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " list_unsubscribe TEXT", "position": 29 }, { "name": "list_unsubscribe_post", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " list_unsubscribe_post TEXT", "position": 30 }, { "name": "list_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " list_id TEXT", "position": 31 }, { "name": "precedence", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " precedence TEXT", "position": 32 }, { "name": "auto_submitted", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " auto_submitted TEXT", "position": 33 }, { "name": "gmail_category", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " gmail_category TEXT", "position": 34 }, { "name": "archived_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " archived_at TEXT", "position": 35 } ], "constraints": [ { "declaration": "\n UNIQUE (workspace_id, external_id)", "position": 36 }, { "declaration": "\n CHECK (length(external_id) > 0)", "position": 37 }, { "declaration": "\n CHECK (length(from_email) > 0)", "position": 38 }, { "declaration": "\n CHECK (json_type(recipients) = 'array')", "position": 39 }, { "declaration": "\n CHECK (json_type(attachments) = 'array')", "position": 40 }, { "declaration": "\n FOREIGN KEY (thread_id) REFERENCES cotton_email_threads(id)", "position": 41 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 42 } ], "prefix": "CREATE TABLE cotton_emails (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_emails_binned ON cotton_emails (workspace_id,trashed_at) WHERE trashed_at IS NOT NULL", "CREATE INDEX idx_cotton_emails_thread_sent ON cotton_emails (thread_id, sent_at DESC)", "CREATE INDEX idx_cotton_emails_workspace ON cotton_emails (workspace_id)", "CREATE INDEX idx_cotton_emails_account ON cotton_emails (workspace_id, account) WHERE account IS NOT NULL", "CREATE INDEX idx_cotton_emails_gmail_id ON cotton_emails (workspace_id, gmail_id)", "CREATE INDEX idx_cotton_emails_from ON cotton_emails (workspace_id, from_email)", "CREATE INDEX idx_cotton_emails_pending ON cotton_emails (workspace_id, sync_state)\n WHERE sync_state = 'pending'", "CREATE INDEX idx_cotton_emails_account_live ON cotton_emails (workspace_id, lower(coalesce(account, gmail_account)), trashed_at)", "CREATE INDEX idx_cotton_emails_thread_live ON cotton_emails (thread_id, trashed_at, in_inbox, starred, unread)", "CREATE INDEX IF NOT EXISTS idx_cotton_emails_author ON cotton_emails (substr(_hlc, 20), _hlc)" ], "full_text": [ "CREATE VIRTUAL TABLE fts_emails USING fts5(\n subject, body, content = 'cotton_emails', content_rowid = 'rowid',\n tokenize = 'unicode61 remove_diacritics 2'\n )", "CREATE VIRTUAL TABLE fts_mail USING fts5(\n subject, body, from_name, from_email, content = 'cotton_emails', content_rowid = 'rowid',\n tokenize = 'unicode61 remove_diacritics 2'\n )" ], "triggers": [ "CREATE TRIGGER fts_emails_ai AFTER INSERT ON cotton_emails WHEN new.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_emails'), 0) BEGIN\n INSERT INTO fts_emails (rowid, subject, body) VALUES (new.rowid, new.subject, new.body);\n END", "CREATE TRIGGER fts_emails_ad AFTER DELETE ON cotton_emails WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_emails'), 0) BEGIN\n INSERT INTO fts_emails (fts_emails, rowid, subject, body) VALUES ('delete', old.rowid, old.subject, old.body);\n END", "CREATE TRIGGER fts_emails_au AFTER UPDATE OF subject, body ON cotton_emails\n FOR EACH ROW WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_emails'), 0) AND (new.subject IS NOT old.subject OR new.body IS NOT old.body) BEGIN\n INSERT INTO fts_emails (fts_emails, rowid, subject, body) VALUES ('delete', old.rowid, old.subject, old.body);\n INSERT INTO fts_emails (rowid, subject, body) VALUES (new.rowid, new.subject, new.body);\n END", "CREATE TRIGGER fts_mail_ai AFTER INSERT ON cotton_emails WHEN new.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_mail'), 0) BEGIN\n INSERT INTO fts_mail (rowid, subject, body, from_name, from_email) VALUES (new.rowid, new.subject, new.body, new.from_name, new.from_email);\n END", "CREATE TRIGGER fts_mail_ad AFTER DELETE ON cotton_emails WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_mail'), 0) BEGIN\n INSERT INTO fts_mail (fts_mail, rowid, subject, body, from_name, from_email) VALUES ('delete', old.rowid, old.subject, old.body, old.from_name, old.from_email);\n END", "CREATE TRIGGER fts_mail_au AFTER UPDATE OF subject, body, from_name, from_email ON cotton_emails\n FOR EACH ROW WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_mail'), 0) AND (new.subject IS NOT old.subject OR new.body IS NOT old.body OR new.from_name IS NOT old.from_name OR new.from_email IS NOT old.from_email) BEGIN\n INSERT INTO fts_mail (fts_mail, rowid, subject, body, from_name, from_email) VALUES ('delete', old.rowid, old.subject, old.body, old.from_name, old.from_email);\n INSERT INTO fts_mail (rowid, subject, body, from_name, from_email) VALUES (new.rowid, new.subject, new.body, new.from_name, new.from_email);\n END" ] }, { "name": "cotton_email_participants", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "thread_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n thread_id TEXT NOT NULL", "position": 2 }, { "name": "email", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n email TEXT NOT NULL", "position": 3 }, { "name": "display_name", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n display_name TEXT", "position": 4 }, { "name": "role", "type": "TEXT", "default": "'cc'", "nullable": false, "primary_key": false, "declaration": "\n role TEXT NOT NULL DEFAULT 'cc'", "position": 5 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 6 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 7 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 8 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 9 } ], "constraints": [ { "declaration": "\n UNIQUE (thread_id, email)", "position": 10 }, { "declaration": "\n CHECK (length(email) > 0)", "position": 11 }, { "declaration": "\n CHECK (email = lower(email))", "position": 12 }, { "declaration": "\n CHECK (role IN ('from', 'to', 'cc'))", "position": 13 }, { "declaration": "\n FOREIGN KEY (thread_id) REFERENCES cotton_email_threads(id)", "position": 14 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 15 } ], "prefix": "CREATE TABLE cotton_email_participants (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_email_participants_email ON cotton_email_participants (workspace_id, email)", "CREATE INDEX idx_cotton_email_participants_thread ON cotton_email_participants (thread_id)", "CREATE INDEX IF NOT EXISTS idx_cotton_email_participants_author ON cotton_email_participants (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "id": "email", "name": "Email", "plural": "Emails", "visibility": "owner", "picture": null, "builtin": true, "engine": "email", "columns": [ { "key": "thread_id", "name": "Conversation", "type": "link", "required": true, "link_to": "email_thread", "readonly": true, "contributes": false }, { "key": "external_id", "type": "text", "readonly": true }, { "key": "subject", "name": "Subject", "type": "text", "readonly": true }, { "key": "from_email", "name": "From address", "type": "text", "readonly": true }, { "key": "from_name", "name": "From", "type": "text", "readonly": true, "fact": true, "reading": "{value}" }, { "key": "recipients", "type": "longtext", "readonly": true }, { "key": "sent_at", "name": "Sent", "type": "date", "readonly": true, "fact": true, "reading": "{value}", "format": "calendar-datetime" }, { "key": "body", "type": "longtext", "readonly": true }, { "key": "snippet", "type": "text", "readonly": true }, { "key": "attachments", "type": "longtext", "readonly": true }, { "key": "gmail_id", "type": "text", "readonly": true }, { "key": "gmail_account", "type": "text", "readonly": true }, { "key": "labels", "type": "longtext", "readonly": true }, { "key": "unread", "type": "bool", "readonly": false }, { "key": "starred", "type": "bool", "readonly": false }, { "key": "in_inbox", "name": "In inbox", "type": "bool", "readonly": false }, { "key": "trashed_at", "name": "Binned", "type": "date", "readonly": true }, { "key": "sync_state", "type": "text", "readonly": true }, { "key": "account", "type": "text", "readonly": true }, { "key": "to_line", "name": "To", "type": "longtext", "readonly": true }, { "key": "cc_line", "name": "Cc", "type": "longtext", "readonly": true }, { "key": "media", "type": "file", "readonly": true, "presentation": "attachments" }, { "key": "direction", "type": "choice", "choices": [ "in", "out" ], "readonly": true }, { "key": "message_id", "name": "Message-ID", "type": "text", "readonly": true }, { "key": "message_refs", "name": "References", "type": "longtext", "readonly": true }, { "key": "list_unsubscribe", "name": "List-Unsubscribe", "type": "text", "readonly": true }, { "key": "list_unsubscribe_post", "name": "List-Unsubscribe-Post", "type": "text", "readonly": true }, { "key": "list_id", "name": "List-Id", "type": "text", "readonly": true }, { "key": "precedence", "name": "Precedence", "type": "text", "readonly": true }, { "key": "auto_submitted", "name": "Auto-Submitted", "type": "text", "readonly": true }, { "key": "gmail_category", "name": "Gmail category", "type": "text", "readonly": true }, { "key": "archived_at", "name": "Archived in Comms", "type": "date" }, { "key": "binned", "name": "In bin", "type": "bool", "readonly": true } ], "title": "subject", "date": "sent_at", "project": null, "order": null, "slip": { "title": "subject", "subtitle": "from_name", "trailing": "sent_at", "photo": null, "toggle": null, "dye": "straw" }, "tile": { "face": "slip-list", "current": { "column": "sent_at", "days": 2 } }, "page": [ { "heading": null, "columns": [ "from_name", "sent_at" ], "role": "facts" }, { "heading": null, "columns": [ "body", "media" ] }, { "heading": "Details", "columns": [ "subject", "from_email", "to_line", "cc_line" ], "role": "side" }, { "heading": null, "columns": [ "trashed_at" ] } ], "add": false, "seal": { "clear": [ "thread_id", "sent_at", "trashed_at" ], "blind": [ "subject", "body" ], "blind_exact": [ "external_id", "from_email" ], "blind_bytes": { "body": 2048 } }, "delete": false, "commands": [ { "id": "thread", "label": "Open thread", "kind": "open", "opens": "thread_id", "object": "envelope" } ], "instructions": "Imported email archive. Ingest and Gmail sync run in Rust. Cotton has no send or reply verb. Never create imported mail as a substitute for delivery.", "card": { "face": "plain", "fields": [ { "slot": "title", "column": "subject" }, { "slot": "subtitle", "column": "from_name" }, { "slot": "body", "column": "body" }, { "slot": "facts", "column": "sent_at", "also": [ "from_email", "to_line", "cc_line" ] } ] }, "parts": { "shape": "desk", "head": { "facts": [ "from_name", "sent_at" ] }, "links": [], "body": "body", "lists": [], "acts": { "more": [ "thread" ] }, "strip": [ { "column": "media" }, { "column": "from_email" }, { "column": "to_line" }, { "column": "cc_line" } ], "opens": "body" } }, { "format_version": 1, "tables": [ { "name": "cotton_msg_owner_settings", "columns": [ { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n workspace_id TEXT PRIMARY KEY", "position": 0 }, { "name": "handle", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n handle TEXT NOT NULL", "position": 1 }, { "name": "display_name", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n display_name TEXT NOT NULL", "position": 2 }, { "name": "avatar_url", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n avatar_url TEXT", "position": 3 }, { "name": "availability_copy", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n availability_copy TEXT", "position": 4 }, { "name": "allow_new_contacts", "type": "INTEGER", "default": "1", "nullable": false, "primary_key": false, "declaration": "\n allow_new_contacts INTEGER NOT NULL DEFAULT 1", "position": 5 }, { "name": "app_download_url", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n app_download_url TEXT", "position": 6 }, { "name": "read_receipts", "type": "INTEGER", "default": "1", "nullable": false, "primary_key": false, "declaration": "\n read_receipts INTEGER NOT NULL DEFAULT 1", "position": 7 }, { "name": "discoverable", "type": "INTEGER", "default": "1", "nullable": false, "primary_key": false, "declaration": "\n discoverable INTEGER NOT NULL DEFAULT 1", "position": 8 }, { "name": "last_seen_visible", "type": "INTEGER", "default": "1", "nullable": false, "primary_key": false, "declaration": "\n last_seen_visible INTEGER NOT NULL DEFAULT 1", "position": 9 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 10 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 11 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 12 }, { "name": "share_requests", "type": "TEXT", "default": "'contacts_direct'", "nullable": false, "primary_key": false, "declaration": " share_requests TEXT NOT NULL DEFAULT 'contacts_direct' CHECK (share_requests IN ('contacts_direct','ask_always'))", "position": 13 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 14 } ], "constraints": [ { "declaration": "\n CHECK (handle NOT IN ('inbox', 'api', 'assets', 'admin', 'settings', 'download', 'privacy', 'terms', 'about', 'app', 'm'))", "position": 15 }, { "declaration": "\n CHECK (length(handle) BETWEEN 3 AND 30 AND NOT handle GLOB '*[^a-z0-9-]*')", "position": 16 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 17 } ], "prefix": "CREATE TABLE cotton_msg_owner_settings (", "suffix": ")", "indexes": [ "CREATE UNIQUE INDEX uq_cotton_msg_owner_settings_handle ON cotton_msg_owner_settings (handle)", "CREATE INDEX IF NOT EXISTS idx_cotton_msg_owner_settings_author ON cotton_msg_owner_settings (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] }, { "name": "cotton_msg_reactions", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "thread_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n thread_id TEXT NOT NULL", "position": 2 }, { "name": "message_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n message_id TEXT NOT NULL", "position": 3 }, { "name": "actor", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n actor TEXT NOT NULL", "position": 4 }, { "name": "emoji", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n emoji TEXT NOT NULL", "position": 5 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 6 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 7 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 8 } ], "constraints": [ { "declaration": "\n UNIQUE (message_id, actor)", "position": 9 }, { "declaration": "\n CHECK (trim(actor) <> '')", "position": 10 }, { "declaration": "\n CHECK (trim(emoji) <> '' AND length(emoji) <= 8)", "position": 11 }, { "declaration": "\n FOREIGN KEY (message_id) REFERENCES cotton_msg_messages(id)", "position": 12 }, { "declaration": "\n FOREIGN KEY (thread_id) REFERENCES cotton_msg_threads(id)", "position": 13 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 14 } ], "prefix": "CREATE TABLE cotton_msg_reactions (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_msg_reactions_message ON cotton_msg_reactions (message_id)", "CREATE INDEX idx_cotton_msg_reactions_workspace ON cotton_msg_reactions (workspace_id)", "CREATE INDEX IF NOT EXISTS idx_cotton_msg_reactions_author ON cotton_msg_reactions (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] }, { "name": "cotton_msg_threads", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "contact_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n contact_id TEXT", "position": 2 }, { "name": "kind", "type": "TEXT", "default": "'dm'", "nullable": false, "primary_key": false, "declaration": "\n kind TEXT NOT NULL DEFAULT 'dm'", "position": 3 }, { "name": "last_message_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n last_message_at TEXT", "position": 4 }, { "name": "last_message_preview", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n last_message_preview TEXT", "position": 5 }, { "name": "archived", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n archived INTEGER NOT NULL DEFAULT 0", "position": 6 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 7 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 8 }, { "name": "title", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n title TEXT", "position": 9 }, { "name": "external_key", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n external_key TEXT", "position": 10 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 11 }, { "name": "photo_key", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " photo_key TEXT", "position": 12 }, { "name": "description", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " description TEXT", "position": 13 }, { "name": "created_by_phone", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " created_by_phone TEXT", "position": 14 }, { "name": "read_seq", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": " read_seq INTEGER NOT NULL DEFAULT 0", "position": 15 }, { "name": "delivered_seq", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": " delivered_seq INTEGER NOT NULL DEFAULT 0", "position": 16 }, { "name": "muted_until", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " muted_until TEXT", "position": 17 }, { "name": "pinned_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " pinned_at TEXT", "position": 18 }, { "name": "unread_marked_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " unread_marked_at TEXT", "position": 19 }, { "name": "draft", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " draft TEXT", "position": 20 }, { "name": "draft_reply_to_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " draft_reply_to_id TEXT", "position": 21 }, { "name": "cleared_before", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " cleared_before TEXT", "position": 22 }, { "name": "summary", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " summary TEXT CHECK ((summary IS NULL) OR (length(summary) <= 4000))", "position": 23 }, { "name": "summary_updated_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " summary_updated_at TEXT", "position": 24 }, { "name": "summary_by", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " summary_by TEXT CHECK ((summary_by IS NULL) OR (length(trim(summary_by)) > 0))", "position": 25 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 26 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n trashed_at TEXT", "position": 27 } ], "constraints": [ { "declaration": "\n CHECK (kind IN ('dm', 'group'))", "position": 28 }, { "declaration": "\n CHECK (((kind = 'dm') AND ((contact_id IS NOT NULL) OR (NULLIF(trim(COALESCE(title, '')), '') IS NOT NULL))) OR ((kind = 'group') AND (contact_id IS NULL) AND (NULLIF(trim(COALESCE(title, '')), '') IS NOT NULL)))", "position": 29 }, { "declaration": "\n FOREIGN KEY (contact_id) REFERENCES cotton_msg_contacts(id)", "position": 30 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 31 } ], "prefix": "CREATE TABLE \"cotton_msg_threads\" (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_msg_threads_contact ON cotton_msg_threads (contact_id)", "CREATE INDEX idx_cotton_msg_threads_workspace_recent ON cotton_msg_threads (workspace_id, last_message_at DESC)", "CREATE UNIQUE INDEX uq_cotton_msg_threads_dm ON cotton_msg_threads (workspace_id, contact_id) WHERE kind = 'dm'", "CREATE UNIQUE INDEX uq_cotton_msg_threads_group_key ON cotton_msg_threads (workspace_id, external_key) WHERE external_key IS NOT NULL", "CREATE INDEX idx_cotton_msg_threads_pinned ON cotton_msg_threads (workspace_id, pinned_at) WHERE pinned_at IS NOT NULL", "CREATE INDEX IF NOT EXISTS idx_cotton_msg_threads_author ON cotton_msg_threads (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] }, { "name": "cotton_msg_contacts", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "phone_e164", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n phone_e164 TEXT", "position": 2 }, { "name": "display_name", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n display_name TEXT", "position": 3 }, { "name": "person_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n person_id TEXT", "position": 4 }, { "name": "auth_user_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n auth_user_id TEXT", "position": 5 }, { "name": "vip", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n vip INTEGER NOT NULL DEFAULT 0", "position": 6 }, { "name": "muted", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n muted INTEGER NOT NULL DEFAULT 0", "position": 7 }, { "name": "blocked", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n blocked INTEGER NOT NULL DEFAULT 0", "position": 8 }, { "name": "on_cotton_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n on_cotton_at TEXT", "position": 9 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 10 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 11 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 12 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 13 }, { "name": "avatar_key", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n avatar_key TEXT", "position": 14 } ], "constraints": [ { "declaration": "\n UNIQUE (workspace_id, phone_e164)", "position": 15 }, { "declaration": "\n CHECK (phone_e164 IS NULL OR (length(phone_e164) BETWEEN 8 AND 15 AND NOT phone_e164 GLOB '*[^0-9]*'))", "position": 16 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 17 } ], "prefix": "CREATE TABLE \"cotton_msg_contacts\" (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_msg_contacts_auth_user ON cotton_msg_contacts (auth_user_id) WHERE auth_user_id IS NOT NULL", "CREATE INDEX idx_cotton_msg_contacts_workspace ON cotton_msg_contacts (workspace_id)", "CREATE INDEX IF NOT EXISTS idx_cotton_msg_contacts_author ON cotton_msg_contacts (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] }, { "name": "cotton_msg_receipts", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "thread_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n thread_id TEXT NOT NULL", "position": 2 }, { "name": "phone", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n phone TEXT NOT NULL", "position": 3 }, { "name": "delivered_seq", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n delivered_seq INTEGER NOT NULL DEFAULT 0", "position": 4 }, { "name": "read_seq", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n read_seq INTEGER NOT NULL DEFAULT 0", "position": 5 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 6 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 7 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 8 } ], "constraints": [ { "declaration": "\n UNIQUE (thread_id, phone)", "position": 9 }, { "declaration": "\n CHECK ((length(phone) BETWEEN 8 AND 15 AND NOT phone GLOB '*[^0-9]*') OR (length(phone) BETWEEN 2 AND 31 AND phone GLOB '[a-z0-9]*' AND NOT phone GLOB '*[^a-z0-9-]*' AND phone GLOB '*[^0-9]*'))", "position": 10 }, { "declaration": "\n FOREIGN KEY (thread_id) REFERENCES cotton_msg_threads(id)", "position": 11 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 12 } ], "prefix": "CREATE TABLE \"cotton_msg_receipts\" (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_msg_receipts_thread ON cotton_msg_receipts (thread_id)", "CREATE INDEX idx_cotton_msg_receipts_workspace ON cotton_msg_receipts (workspace_id)", "CREATE INDEX IF NOT EXISTS idx_cotton_msg_receipts_author ON cotton_msg_receipts (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] }, { "name": "cotton_msg_contact_handles", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "contact_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n contact_id TEXT NOT NULL", "position": 2 }, { "name": "kind", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n kind TEXT NOT NULL", "position": 3 }, { "name": "value", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n value TEXT NOT NULL", "position": 4 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 5 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 6 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 7 } ], "constraints": [ { "declaration": "\n UNIQUE (workspace_id, kind, value)", "position": 8 }, { "declaration": "\n CHECK (kind IN ('phone', 'email', 'cotton', 'instagram', 'facebook', 'linkedin'))", "position": 9 }, { "declaration": "\n CHECK (kind <> 'phone' OR (length(value) BETWEEN 8 AND 15 AND NOT value GLOB '*[^0-9]*'))", "position": 10 }, { "declaration": "\n CHECK (kind <> 'email' OR (value = lower(value) AND value LIKE '%_@_%' AND value NOT GLOB '* *'))", "position": 11 }, { "declaration": "\n CHECK (kind <> 'cotton' OR (length(value) BETWEEN 2 AND 31 AND value GLOB '[a-z0-9]*' AND NOT value GLOB '*[^a-z0-9-]*' AND value GLOB '*[^0-9]*'))", "position": 12 }, { "declaration": "\n FOREIGN KEY (contact_id) REFERENCES cotton_msg_contacts(id)", "position": 13 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 14 } ], "prefix": "CREATE TABLE \"cotton_msg_contact_handles\" (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_msg_contact_handles_contact ON cotton_msg_contact_handles (contact_id)", "CREATE INDEX idx_cotton_msg_contact_handles_workspace ON cotton_msg_contact_handles (workspace_id)", "CREATE INDEX IF NOT EXISTS idx_cotton_msg_contact_handles_author ON cotton_msg_contact_handles (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] }, { "name": "cotton_msg_thread_filings", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "thread_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n thread_id TEXT NOT NULL", "position": 2 }, { "name": "database_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n database_id TEXT NOT NULL CHECK (length(trim(database_id)) > 0)", "position": 3 }, { "name": "state", "type": "TEXT", "default": "'filed'", "nullable": false, "primary_key": false, "declaration": "\n state TEXT NOT NULL DEFAULT 'filed' CHECK (state IN ('filed','paused','unfiled'))", "position": 4 }, { "name": "paused_by", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n paused_by TEXT", "position": 5 }, { "name": "copied_through", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n copied_through TEXT", "position": 6 }, { "name": "filed_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n filed_at TEXT NOT NULL", "position": 7 }, { "name": "unfiled_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n unfiled_at TEXT", "position": 8 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 9 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 10 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 11 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 12 } ], "constraints": [ { "declaration": "\n FOREIGN KEY (thread_id) REFERENCES cotton_msg_threads(id)", "position": 13 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 14 } ], "prefix": "CREATE TABLE IF NOT EXISTS cotton_msg_thread_filings (", "suffix": ")", "indexes": [ "CREATE INDEX IF NOT EXISTS idx_cotton_msg_thread_filings_author ON cotton_msg_thread_filings (substr(_hlc, 20), _hlc)", "CREATE UNIQUE INDEX uq_cotton_msg_thread_filings_pair ON cotton_msg_thread_filings (workspace_id, thread_id, database_id)", "CREATE INDEX idx_cotton_msg_thread_filings_state ON cotton_msg_thread_filings (workspace_id, state)" ], "full_text": [], "triggers": [] }, { "name": "cotton_msg_thread_marks", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "database_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n database_id TEXT NOT NULL CHECK (length(trim(database_id)) > 0)", "position": 2 }, { "name": "thread_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n thread_id TEXT NOT NULL CHECK (length(trim(thread_id)) > 0)", "position": 3 }, { "name": "pinned_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n pinned_at TEXT", "position": 4 }, { "name": "muted_until", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n muted_until TEXT", "position": 5 }, { "name": "archived", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n archived INTEGER NOT NULL DEFAULT 0 CHECK (archived IN (0,1))", "position": 6 }, { "name": "cleared_before", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n cleared_before TEXT", "position": 7 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 8 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 9 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 10 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 11 } ], "constraints": [ { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 12 } ], "prefix": "CREATE TABLE IF NOT EXISTS cotton_msg_thread_marks (", "suffix": ")", "indexes": [ "CREATE INDEX IF NOT EXISTS idx_cotton_msg_thread_marks_author ON cotton_msg_thread_marks (substr(_hlc, 20), _hlc)", "CREATE UNIQUE INDEX uq_cotton_msg_thread_marks_copy ON cotton_msg_thread_marks (workspace_id, database_id, thread_id)" ], "full_text": [], "triggers": [] } ], "id": "thread", "name": "Chat", "plural": "Chats", "visibility": "owner", "picture": { "photo": "photo:9713719602098b4534d4aa3d950031eac5a813fc66fa11de8027b29ec5cd4f9d", "object": "tool-messages" }, "builtin": true, "engine": "messages", "columns": [ { "key": "contact_id", "type": "link", "link_to": "message_contact", "readonly": true }, { "key": "kind", "type": "choice", "choices": [ "dm", "group" ], "readonly": true, "labels": { "dm": "Direct", "group": "Group" } }, { "key": "last_message_at", "name": "Last message", "type": "date", "readonly": true }, { "key": "last_message_preview", "name": "Last line", "type": "text", "readonly": true }, { "key": "archived", "type": "bool", "readonly": true }, { "key": "title", "name": "Title", "type": "text", "readonly": true }, { "key": "external_key", "type": "text", "readonly": true }, { "key": "photo_key", "name": "Photo", "type": "photo", "readonly": true }, { "key": "description", "type": "text", "readonly": true }, { "key": "created_by_phone", "type": "text", "readonly": true }, { "key": "read_seq", "type": "number", "readonly": true }, { "key": "delivered_seq", "type": "number", "readonly": true }, { "key": "muted_until", "name": "Muted until", "type": "date" }, { "key": "pinned_at", "name": "Pinned", "type": "date" }, { "key": "unread_marked_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "draft", "type": "text", "readonly": true }, { "key": "draft_reply_to_id", "type": "text", "readonly": true }, { "key": "cleared_before", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "summary", "type": "longtext" }, { "key": "summary_updated_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "summary_by", "type": "text", "readonly": true }, { "key": "trashed_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "name", "name": "Name", "type": "text", "readonly": true }, { "key": "members", "type": "longtext", "readonly": true }, { "key": "member_people", "name": "People", "type": "link", "link_to": "person", "readonly": true, "multiple": true, "plain_before": "member_self", "plain_after": "members_unmatched" }, { "key": "member_self", "type": "text", "readonly": true }, { "key": "members_unmatched", "type": "longtext", "readonly": true }, { "key": "channels", "type": "text", "readonly": true, "fact": true, "reading": "{value}" }, { "key": "state_line", "type": "text", "readonly": true }, { "key": "unread", "name": "Unread", "type": "choice", "choices": [ "read", "unread" ], "readonly": true, "labels": { "read": "Read", "unread": "Unread" } }, { "key": "pinned", "type": "bool", "readonly": true }, { "key": "muted", "type": "bool", "readonly": true }, { "key": "filed_copy", "type": "bool", "readonly": true }, { "key": "sendable", "name": "Can send", "type": "bool", "readonly": true }, { "key": "send_blocked_reason", "name": "Why it cannot send", "type": "text", "readonly": true }, { "key": "request", "name": "Request", "type": "choice", "choices": [ "pending", "accepted" ], "readonly": true, "labels": { "pending": "Wants to message you", "accepted": "Accepted" } }, { "key": "pinned_messages", "name": "Pinned messages", "type": "longtext", "readonly": true }, { "key": "changes_waiting", "name": "Changes waiting", "type": "longtext", "readonly": true }, { "key": "group_log", "name": "Group changes", "type": "longtext", "readonly": true } ], "title": "name", "date": "last_message_at", "project": null, "order": null, "slip": { "title": "name", "subtitle": "last_message_preview", "trailing": "last_message_at", "photo": "photo_key", "toggle": null, "unread": "unread", "status": "state_line" }, "tile": { "face": "slip-list", "current": { "column": "last_message_at", "days": 2 } }, "page": [ { "heading": null, "columns": [ "photo_key", "description" ] }, { "heading": "Summary", "columns": [ "summary", "summary_by" ] }, { "heading": null, "columns": [ "member_people" ], "when": { "column": "members", "present": true } }, { "heading": "About", "columns": [ "channels" ] } ], "page_parts": [ "title", "facts", "messages" ], "archived": "archived", "add": false, "seal": { "clear": [ "contact_id", "kind", "last_message_at", "archived", "pinned_at", "trashed_at", "member_people", "channels" ], "blind": [ "title" ], "blind_exact": [ "external_key" ] }, "record_route": "/messages/[thread]", "sort": { "column": "pinned_at", "descending": true, "tie": "last_message_at" }, "create": { "label": "New Cotton message", "path": "/messages/new" }, "conversation": { "table": "message", "links": [ "thread_id" ], "body": "display_body", "at": "sent_at", "mine": { "column": "direction", "values": [ "out" ] }, "header": [ "sender_label", "reply_preview" ], "footer": [ "reactions", "edited_label", "starred_label", "provenance", "shared_status" ], "media": "media", "system": "is_system", "color_by": "paper_sender", "queue": { "link": "thread_id", "body": "body" }, "photo": "sender_photo", "can_send": "sendable", "placeholder": "Reply…" }, "composer": true, "delete": false, "menu": [ { "label": "Import chat", "path": "/messages/import", "object": "file" } ], "related": [ { "label": "Archived chats", "table": "thread", "filter": { "archived": true }, "archived": true, "title": "Archived chats", "empty": { "title": "Nothing archived", "message": "A chat you archive leaves the list and is kept here." } }, { "label": "Members", "table": "thread_member", "column": "thread_id", "when": { "kind": "group" } }, { "label": "Kept messages", "table": "message", "filter": { "kept": true }, "open": "thread_id", "title": "Kept messages", "empty": { "title": "Nothing kept yet", "message": "A message you keep is listed here, and opens in its chat." } }, { "label": "Search all messages", "table": "message", "open": "thread_id", "title": "All messages" } ], "commands": [ { "id": "read", "label": "Mark read", "kind": "update", "verb": "mark_thread_read", "bindings": { "threadId": "$id" }, "object": "tick" }, { "id": "pin", "label": "Pin", "kind": "update", "verb": "set_thread_pinned", "data": { "pinned": true }, "bindings": { "threadId": "$id" }, "when": { "pinned": false }, "receipt": "Pinned", "undo": "unpin", "object": "pin" }, { "id": "unpin", "label": "Unpin", "kind": "update", "verb": "set_thread_pinned", "data": { "pinned": false }, "bindings": { "threadId": "$id" }, "when": { "pinned": true }, "receipt": "Unpinned", "undo": "pin", "object": "pin" }, { "id": "mute", "label": "Mute", "kind": "update", "verb": "set_thread_muted", "data": { "until": "9999-12-31T00:00:00Z" }, "bindings": { "threadId": "$id" }, "when": { "muted": false }, "receipt": "Muted", "undo": "unmute", "object": "bell" }, { "id": "unmute", "label": "Unmute", "kind": "update", "verb": "set_thread_muted", "data": {}, "bindings": { "threadId": "$id" }, "when": { "muted": true }, "receipt": "Unmuted", "undo": "mute", "object": "bell" }, { "id": "archive", "label": "Archive", "kind": "update", "verb": "set_thread_archived", "data": { "archived": true }, "bindings": { "threadId": "$id" }, "when": { "archived": false }, "receipt": "Archived", "undo": "unarchive", "does": "puts-away", "object": "folder" }, { "id": "unarchive", "label": "Unarchive", "kind": "update", "verb": "set_thread_archived", "data": { "archived": false }, "bindings": { "threadId": "$id" }, "when": { "archived": true }, "receipt": "Moved {name} back to your chats", "undo": "archive", "object": "folder" }, { "id": "clear", "label": "Clear chat", "kind": "update", "verb": "clear_thread", "destructive": true, "confirm": "Every message in this chat up to now leaves your copy of it. The chat stays in the list, and nobody else's copy changes. This cannot be undone.", "bindings": { "threadId": "$id" }, "receipt": "Chat cleared", "does": "destroys", "object": "cross" } ], "on_open": "read", "instructions": "A chat is one imported WhatsApp, Instagram, iMessage or SMS conversation, direct or group. The owner's own app can reply through a linked WhatsApp number or the exact live Instagram account and thread read by their Mac; an export alone supplies no Instagram reply address. sendable says whether this chat can send, send_blocked_reason why not; an assistant never sends. In a shared database a chat is a filed copy (filed_copy): everybody there reads it, nobody sends into it, and pinning, muting, archiving or clearing it changes the copy for everyone there and nothing in the Messages it was filed from. Its name is the person's or the contact's for a direct chat, the title for a group. The chat carries project membership for its messages. The summary is a short account of the conversation; keep it to what the messages say.", "groups": { "stack": "slips" }, "views": [ { "face": "chats", "name": "Recent chats" } ], "card": { "face": "thread.slips", "fields": [ { "slot": "title", "column": "name" }, { "slot": "photo", "column": "photo_key" }, { "slot": "subtitle", "column": "state_line" }, { "slot": "body", "column": "last_message_preview" }, { "slot": "date", "column": "last_message_at", "form": "weekday_date" }, { "slot": "unread", "column": "unread", "only": [ "unread" ] }, { "slot": "people", "column": "member_people", "max": 3 } ] }, "tool": { "views": [ { "id": "all", "label": "All", "visibility": "owner", "is_default": true, "read": { "table": "thread" } }, { "id": "cotton", "label": "Cotton", "visibility": "owner", "is_default": false, "read": { "table": "thread", "where": { "channels": "cotton" }, "empty": { "line": "empty_views.messages.cotton", "table": true } } }, { "id": "whatsapp", "label": "WhatsApp", "visibility": "owner", "is_default": false, "read": { "table": "thread", "where": { "channels": "whatsapp" }, "empty": { "line": "empty_views.messages.whatsapp", "table": true } } }, { "id": "sms", "label": "SMS", "visibility": "owner", "is_default": false, "read": { "table": "thread", "where": { "channels": "sms" }, "empty": { "line": "empty_views.messages.sms", "table": true } } }, { "id": "instagram", "label": "Instagram", "visibility": "owner", "is_default": false, "read": { "table": "thread", "where": { "channels": "instagram" }, "empty": { "line": "empty_views.messages.instagram", "table": true } } }, { "id": "starred", "label": "Starred", "visibility": "owner", "is_default": false, "read": { "table": "message", "where": { "starred_at": { "present": true } }, "empty": { "line": "empty_views.messages.starred", "table": true } }, "sort": { "column": "starred_at", "descending": true }, "face": "cards", "card": { "face": "message", "fields": [ { "slot": "photo", "column": "sender_photo" }, { "slot": "title", "column": "sender_name" }, { "slot": "body", "column": "display_body" }, { "slot": "date", "column": "sent_at", "form": "weekday_date" }, { "slot": "source", "column": "channel" } ] } }, { "id": "agents", "label": "Agents", "visibility": "owner", "is_default": false, "read": { "table": "session", "empty": { "line": "empty_views.messages.agents", "table": true } }, "sort": { "column": "active_at", "descending": true }, "face": "cards" }, { "id": "devices", "label": "Devices", "visibility": "owner", "is_default": false, "read": { "table": "vault_key", "empty": { "line": "empty_views.keys.devices", "table": true } }, "sort": { "column": "vmk_version", "descending": false, "tie": "created_at", "tie_descending": false } } ], "name": "Messages", "purpose": "Your conversations and the files shared in them.", "key": "messages", "icon": "message-square", "card_stock": "rose", "route": "/messages", "figures": [ { "read": "unreadMessages", "many": "{n} unread" } ] }, "parts": { "shape": "desk", "head": { "facts": [ "channels" ], "state": "kind" }, "links": [], "body": "summary", "lists": [], "acts": { "main": "mute", "more": [ "pin", "unpin", "unmute", "unarchive" ], "away": "clear" }, "strip": [ { "column": "members", "when": { "column": "kind", "values": [ "group" ] } }, { "column": "state_line" } ], "opens": "facts" } }, { "format_version": 1, "tables": [ { "name": "cotton_msg_messages", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "thread_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n thread_id TEXT NOT NULL", "position": 1 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 2 }, { "name": "direction", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n direction TEXT NOT NULL", "position": 3 }, { "name": "channel", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n channel TEXT NOT NULL", "position": 4 }, { "name": "origin", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n origin TEXT NOT NULL", "position": 5 }, { "name": "body", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n body TEXT", "position": 6 }, { "name": "media", "type": "TEXT", "default": "'[]'", "nullable": false, "primary_key": false, "declaration": "\n media TEXT NOT NULL DEFAULT '[]'", "position": 7 }, { "name": "external_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n external_id TEXT", "position": 8 }, { "name": "sent_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n sent_at TEXT NOT NULL", "position": 9 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 10 }, { "name": "read_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n read_at TEXT", "position": 11 }, { "name": "reply_to_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n reply_to_id TEXT", "position": 12 }, { "name": "reply_to_external_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n reply_to_external_id TEXT", "position": 13 }, { "name": "reactions", "type": "TEXT", "default": "'[]'", "nullable": false, "primary_key": false, "declaration": "\n reactions TEXT NOT NULL DEFAULT '[]'", "position": 14 }, { "name": "meta", "type": "TEXT", "default": "'{}'", "nullable": false, "primary_key": false, "declaration": "\n meta TEXT NOT NULL DEFAULT '{}'", "position": 15 }, { "name": "sender_contact_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n sender_contact_id TEXT", "position": 16 }, { "name": "sender_participant_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n sender_participant_id TEXT", "position": 17 }, { "name": "seq", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n seq INTEGER", "position": 18 }, { "name": "edited_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n edited_at TEXT", "position": 19 }, { "name": "deleted_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n deleted_at TEXT", "position": 20 }, { "name": "forward_of_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n forward_of_id TEXT", "position": 21 }, { "name": "mentions", "type": "TEXT", "default": "'[]'", "nullable": false, "primary_key": false, "declaration": "\n mentions TEXT NOT NULL DEFAULT '[]'", "position": 22 }, { "name": "starred_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n starred_at TEXT", "position": 23 }, { "name": "hidden_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n hidden_at TEXT", "position": 24 }, { "name": "send_state", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n send_state TEXT", "position": 25 }, { "name": "send_error", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n send_error TEXT", "position": 26 }, { "name": "send_attempts", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n send_attempts INTEGER NOT NULL DEFAULT 0", "position": 27 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n trashed_at TEXT", "position": 28 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 29 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 30 } ], "constraints": [ { "declaration": "\n CHECK (channel IN ('cotton', 'whatsapp', 'imessage', 'sms', 'instagram'))", "position": 31 }, { "declaration": "\n CHECK (send_state IS NULL OR send_state IN ('queued', 'sending', 'sent', 'delivered', 'read', 'failed'))", "position": 32 }, { "declaration": "\n CHECK (direction IN ('in', 'out'))", "position": 33 }, { "declaration": "\n CHECK (json_type(media) = 'array')", "position": 34 }, { "declaration": "\n CHECK (json_type(meta) = 'object')", "position": 35 }, { "declaration": "\n CHECK (origin IN ('live', 'imported'))", "position": 36 }, { "declaration": "\n CHECK (json_type(reactions) = 'array')", "position": 37 }, { "declaration": "\n CHECK (json_type(mentions) = 'array')", "position": 38 }, { "declaration": "\n FOREIGN KEY (thread_id) REFERENCES cotton_msg_threads(id)", "position": 39 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 40 } ], "prefix": "CREATE TABLE \"cotton_msg_messages\" (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_msg_messages_unread_cursor ON cotton_msg_messages (thread_id, seq, sent_at) WHERE direction = 'in' AND origin = 'live' AND hidden_at IS NULL AND trashed_at IS NULL", "CREATE INDEX idx_cotton_msg_messages_thread_sent ON cotton_msg_messages (thread_id, sent_at DESC)", "CREATE INDEX idx_cotton_msg_messages_unread ON cotton_msg_messages (workspace_id, thread_id) WHERE read_at IS NULL", "CREATE INDEX idx_cotton_msg_messages_unresolved_reply ON cotton_msg_messages (thread_id, reply_to_external_id) WHERE (reply_to_external_id IS NOT NULL) AND (reply_to_id IS NULL)", "CREATE UNIQUE INDEX uq_cotton_msg_messages_external ON cotton_msg_messages (thread_id, channel, external_id) WHERE external_id IS NOT NULL", "CREATE INDEX idx_cotton_msg_messages_channel_external ON cotton_msg_messages (workspace_id, channel, external_id) WHERE external_id IS NOT NULL", "CREATE INDEX idx_cotton_msg_messages_sender_participant ON cotton_msg_messages (sender_participant_id)", "CREATE INDEX idx_cotton_msg_messages_thread_seq ON cotton_msg_messages (thread_id, seq)", "CREATE INDEX idx_cotton_msg_messages_thread_channel ON cotton_msg_messages (thread_id, channel)", "CREATE INDEX idx_cotton_msg_messages_source_account ON cotton_msg_messages (workspace_id, channel, json_extract(meta, '$.source.account')) WHERE deleted_at IS NULL AND hidden_at IS NULL AND json_extract(meta, '$.source.account') IS NOT NULL", "CREATE INDEX idx_cotton_msg_messages_starred ON cotton_msg_messages (workspace_id, starred_at) WHERE starred_at IS NOT NULL", "CREATE INDEX idx_cotton_msg_messages_thread_created ON cotton_msg_messages (thread_id, created_at)", "CREATE INDEX IF NOT EXISTS idx_cotton_msg_messages_outbox ON cotton_msg_messages (channel, created_at, id) WHERE send_state IN ('queued', 'sending')", "CREATE INDEX IF NOT EXISTS idx_cotton_msg_messages_author ON cotton_msg_messages (substr(_hlc, 20), _hlc)" ], "full_text": [ "CREATE VIRTUAL TABLE fts_messages USING fts5(\n body, content = 'cotton_msg_messages', content_rowid = 'rowid',\n tokenize = 'unicode61 remove_diacritics 2'\n )" ], "triggers": [ "CREATE TRIGGER fts_messages_ai AFTER INSERT ON cotton_msg_messages WHEN new.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_messages'), 0) BEGIN\n INSERT INTO fts_messages (rowid, body) VALUES (new.rowid, new.body);\n END", "CREATE TRIGGER fts_messages_ad AFTER DELETE ON cotton_msg_messages WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_messages'), 0) BEGIN\n INSERT INTO fts_messages (fts_messages, rowid, body) VALUES ('delete', old.rowid, old.body);\n END", "CREATE TRIGGER fts_messages_au AFTER UPDATE OF body ON cotton_msg_messages\n FOR EACH ROW WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_messages'), 0) AND (new.body IS NOT old.body) BEGIN\n INSERT INTO fts_messages (fts_messages, rowid, body) VALUES ('delete', old.rowid, old.body);\n INSERT INTO fts_messages (rowid, body) VALUES (new.rowid, new.body);\n END" ] } ], "id": "message", "name": "Message", "plural": "Messages", "visibility": "owner", "picture": null, "builtin": true, "engine": "messages", "columns": [ { "key": "thread_id", "name": "Chat", "type": "link", "required": true, "link_to": "thread", "readonly": true, "contributes": false }, { "key": "direction", "type": "choice", "choices": [ "in", "out" ], "readonly": true, "labels": { "in": "Incoming", "out": "Outgoing" } }, { "key": "channel", "type": "choice", "choices": [ "cotton", "whatsapp", "imessage", "sms", "instagram" ], "readonly": true, "labels": { "cotton": "Cotton", "whatsapp": "WhatsApp", "imessage": "iMessage", "sms": "Text message", "instagram": "Instagram" } }, { "key": "origin", "type": "choice", "choices": [ "live", "imported" ], "readonly": true, "labels": { "live": "Live", "imported": "Imported" } }, { "key": "body", "type": "longtext", "readonly": true }, { "key": "media", "type": "file", "readonly": true, "presentation": "attachments" }, { "key": "external_id", "name": "Site id", "type": "text", "readonly": true }, { "key": "sent_at", "name": "Sent", "type": "date", "readonly": true, "fact": true, "reading": "{value}", "format": "calendar-datetime" }, { "key": "read_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "reply_to_id", "name": "Reply to", "type": "link", "link_to": "message", "readonly": true, "contributes": false }, { "key": "reply_to_external_id", "type": "text", "readonly": true }, { "key": "reactions", "type": "longtext", "readonly": true }, { "key": "meta", "type": "longtext", "readonly": true }, { "key": "sender_contact_id", "type": "text", "readonly": true }, { "key": "sender_participant_id", "type": "text", "readonly": true }, { "key": "seq", "type": "number", "readonly": true }, { "key": "edited_at", "name": "Edited", "type": "date", "readonly": true }, { "key": "deleted_at", "name": "Deleted", "type": "date", "readonly": true }, { "key": "forward_of_id", "type": "text", "readonly": true }, { "key": "mentions", "type": "longtext", "readonly": true }, { "key": "starred_at", "name": "Kept", "type": "date", "readonly": true }, { "key": "hidden_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "send_state", "name": "Sending", "type": "text", "readonly": true, "labels": { "queued": "Queued", "sending": "Sending", "sent": "Sent", "delivered": "Delivered", "read": "Read", "failed": "Failed" } }, { "key": "send_error", "name": "Why it was not sent", "type": "text", "readonly": true }, { "key": "send_attempts", "type": "number", "readonly": true }, { "key": "trashed_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "display_body", "type": "longtext", "readonly": true, "markdown": true }, { "key": "preview", "name": "Line", "type": "text", "readonly": true }, { "key": "sender_name", "type": "text", "readonly": true, "fact": true, "reading": "{value}" }, { "key": "reply_preview", "type": "longtext", "readonly": true }, { "key": "provenance", "type": "text", "readonly": true }, { "key": "code_for", "name": "Sign-in code for", "type": "text", "readonly": true }, { "key": "code", "name": "Sign-in code", "type": "text", "readonly": true, "secret": true }, { "key": "is_system", "type": "bool", "readonly": true }, { "key": "edited_label", "type": "text", "readonly": true }, { "key": "starred_label", "type": "text", "readonly": true }, { "key": "kept", "type": "bool", "readonly": true }, { "key": "paper_sender", "type": "text", "readonly": true }, { "key": "sender_label", "type": "text", "readonly": true }, { "key": "sender_photo", "type": "photo", "readonly": true }, { "key": "can_delete", "type": "bool", "readonly": true }, { "key": "filed_copy", "type": "bool", "readonly": true }, { "key": "shared_status", "name": "Shared video", "type": "text", "readonly": true, "labels": { "pending": "Video not fetched yet", "unavailable": "This reel is no longer available" } }, { "key": "sent_by", "name": "Sent by", "type": "text", "readonly": true }, { "key": "sent_by_number", "name": "Sent from", "type": "text", "readonly": true }, { "key": "send_id", "name": "Send", "type": "text", "readonly": true } ], "title": "preview", "date": "sent_at", "project": null, "order": null, "slip": { "title": "preview", "subtitle": "sender_name", "trailing": "sent_at", "photo": null, "toggle": null, "dye": "peach" }, "tile": { "face": "slip-list", "current": { "column": "sent_at", "days": 2 } }, "page": [ { "heading": null, "columns": [ "display_body", "sender_name", "reply_preview", "media", "reactions" ] }, { "heading": "Details", "columns": [ "thread_id", "provenance", "direction", "channel", "origin", "sent_at", "edited_at", "deleted_at", "starred_at" ] } ], "seal": { "clear": [ "thread_id", "channel", "sent_at", "reply_to_id", "starred_at", "trashed_at" ], "blind": [ "body" ], "blind_exact": [ "external_id" ] }, "send": { "columns": [ "body", "media" ], "files": [ "media" ] }, "sort": { "column": "sent_at", "descending": true }, "delete_when": { "column": "can_delete", "present": true }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "message" } } ], "commands": [ { "id": "keep", "label": "Star", "kind": "update", "verb": "star_message", "data": { "starred": true }, "bindings": { "messageId": "$id" }, "when": { "kept": false, "filed_copy": false }, "receipt": "Starred", "undo": "unkeep", "does": "completes", "object": "star" }, { "id": "unkeep", "label": "Unstar", "kind": "update", "verb": "star_message", "data": { "starred": false }, "bindings": { "messageId": "$id" }, "when": { "kept": true, "filed_copy": false }, "receipt": "No longer starred", "undo": "keep", "object": "star" }, { "id": "hide", "label": "Hide", "kind": "update", "verb": "hide_chat_messages", "data": {}, "destructive": true, "bindings": { "messageIds": "$id_list" }, "when": { "filed_copy": false }, "receipt": "Deleted from your copy", "does": "destroys", "object": "cross" }, { "id": "thread", "label": "Open chat", "kind": "open", "opens": "thread_id", "object": "bubble" } ], "instructions": "A message is one line of a chat, incoming or outgoing, as it was written; a message is authored, never made up. Imported messages keep where they came from. The only changes the owner makes are keeping one and, from their own app, replying into a WhatsApp or Instagram chat that can send through its explicitly bound account; never write a message into a chat. send_state follows a text sent from Cotton (queued, sending, sent, delivered, read, failed; delivered and read require recipient evidence, and send_error explains a failure or an unconfirmed send) and is empty on every message that arrived. display_body is what the conversation says: a deleted message says only that, an importer's marker is said in words. media is the entry list; a deleted message answers none. Reactions are observed site facts, never a request to send a reaction.", "groups": { "stack": "slips" }, "card": { "face": "plain", "fields": [ { "slot": "title", "column": "sender_name" }, { "slot": "body", "column": "display_body" }, { "slot": "facts", "column": "sent_at", "also": [ "channel", "direction", "send_state", "send_error", "edited_label", "starred_label" ] } ] }, "parts": { "shape": "desk", "head": { "facts": [ "sender_name", "sent_at" ] }, "links": [], "body": "display_body", "lists": [], "acts": { "more": [ "keep", "unkeep", "thread" ], "away": "hide" }, "strip": [ { "column": "media" }, { "column": "reply_preview" }, { "column": "reactions" }, { "column": "send_state" }, { "column": "send_error" }, { "column": "shared_status" } ], "opens": "body" } }, { "format_version": 1, "tables": [ { "name": "cotton_photos", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "key", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n key TEXT NOT NULL", "position": 2 }, { "name": "sha256", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n sha256 TEXT NOT NULL", "position": 3 }, { "name": "content_type", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n content_type TEXT NOT NULL", "position": 4 }, { "name": "size_bytes", "type": "INTEGER", "default": null, "nullable": false, "primary_key": false, "declaration": "\n size_bytes INTEGER NOT NULL", "position": 5 }, { "name": "width", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n width INTEGER", "position": 6 }, { "name": "height", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n height INTEGER", "position": 7 }, { "name": "taken_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n taken_at TEXT NOT NULL", "position": 8 }, { "name": "preview", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n preview TEXT", "position": 9 }, { "name": "caption", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n caption TEXT", "position": 10 }, { "name": "summary", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n summary TEXT", "position": 11 }, { "name": "summary_by", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n summary_by TEXT", "position": 12 }, { "name": "summary_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n summary_at TEXT", "position": 13 }, { "name": "review_note", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n review_note TEXT", "position": 14 }, { "name": "review_by", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n review_by TEXT", "position": 15 }, { "name": "review_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n review_at TEXT", "position": 16 }, { "name": "taken_offset", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n taken_offset INTEGER", "position": 17 }, { "name": "latitude", "type": "REAL", "default": null, "nullable": true, "primary_key": false, "declaration": "\n latitude REAL", "position": 18 }, { "name": "longitude", "type": "REAL", "default": null, "nullable": true, "primary_key": false, "declaration": "\n longitude REAL", "position": 19 }, { "name": "place_name", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n place_name TEXT", "position": 20 }, { "name": "place_city", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n place_city TEXT", "position": 21 }, { "name": "place_region", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n place_region TEXT", "position": 22 }, { "name": "place_country", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n place_country TEXT", "position": 23 }, { "name": "camera_make", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n camera_make TEXT", "position": 24 }, { "name": "camera_model", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n camera_model TEXT", "position": 25 }, { "name": "orientation", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n orientation INTEGER", "position": 26 }, { "name": "favourite", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n favourite INTEGER NOT NULL DEFAULT 0", "position": 27 }, { "name": "subtypes", "type": "TEXT", "default": "'[]'", "nullable": false, "primary_key": false, "declaration": "\n subtypes TEXT NOT NULL DEFAULT '[]'", "position": 28 }, { "name": "original_filename", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n original_filename TEXT", "position": 29 }, { "name": "aesthetic_score", "type": "REAL", "default": null, "nullable": true, "primary_key": false, "declaration": "\n aesthetic_score REAL", "position": 30 }, { "name": "curation_score", "type": "REAL", "default": null, "nullable": true, "primary_key": false, "declaration": "\n curation_score REAL", "position": 31 }, { "name": "labels", "type": "TEXT", "default": "'[]'", "nullable": false, "primary_key": false, "declaration": "\n labels TEXT NOT NULL DEFAULT '[]'", "position": 32 }, { "name": "phash", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n phash TEXT", "position": 33 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 34 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 35 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 36 }, { "name": "ocr_text", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " ocr_text TEXT", "position": 37 }, { "name": "is_utility", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": " is_utility INTEGER CHECK (is_utility IS NULL OR is_utility IN (0, 1))", "position": 38 }, { "name": "origin_handle", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " origin_handle TEXT CHECK (origin_handle IS NULL OR length(origin_handle) > 0)", "position": 39 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 40 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n trashed_at TEXT", "position": 41 }, { "name": "image_embedding", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " image_embedding TEXT CHECK (image_embedding IS NULL OR length(image_embedding) > 0)", "position": 42 }, { "name": "image_embedding_model", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " image_embedding_model TEXT CHECK (image_embedding_model IS NULL OR length(image_embedding_model) > 0)", "position": 43 } ], "constraints": [ { "declaration": "\n UNIQUE (workspace_id, sha256)", "position": 44 }, { "declaration": "\n CHECK (id = 'photo:' || sha256)", "position": 45 }, { "declaration": "\n CHECK (sha256 NOT GLOB '*[^0-9a-f]*' AND length(sha256) = 64)", "position": 46 }, { "declaration": "\n CHECK (size_bytes >= 0)", "position": 47 }, { "declaration": "\n CHECK (width IS NULL OR width > 0)", "position": 48 }, { "declaration": "\n CHECK (height IS NULL OR height > 0)", "position": 49 }, { "declaration": "\n CHECK (caption IS NULL OR length(caption) <= 500)", "position": 50 }, { "declaration": "\n CHECK (review_note IS NULL OR (length(trim(review_note)) > 0 AND length(review_note) <= 280))", "position": 51 }, { "declaration": "\n CHECK ((summary IS NULL) = (summary_at IS NULL))", "position": 52 }, { "declaration": "\n CHECK ((review_note IS NULL) = (review_at IS NULL))", "position": 53 }, { "declaration": "\n CHECK ((latitude IS NULL) = (longitude IS NULL))", "position": 54 }, { "declaration": "\n CHECK (latitude IS NULL OR (latitude >= -90 AND latitude <= 90))", "position": 55 }, { "declaration": "\n CHECK (longitude IS NULL OR (longitude >= -180 AND longitude <= 180))", "position": 56 }, { "declaration": "\n CHECK (orientation IS NULL OR (orientation >= 1 AND orientation <= 8))", "position": 57 }, { "declaration": "\n CHECK (taken_offset IS NULL OR (taken_offset >= -86400 AND taken_offset <= 86400))", "position": 58 }, { "declaration": "\n CHECK (favourite IN (0, 1))", "position": 59 }, { "declaration": "\n CHECK (json_type(subtypes) = 'array')", "position": 60 }, { "declaration": "\n CHECK (json_type(labels) = 'array')", "position": 61 }, { "declaration": "\n CHECK (aesthetic_score IS NULL OR (aesthetic_score >= -1 AND aesthetic_score <= 1))", "position": 62 }, { "declaration": "\n CHECK (curation_score IS NULL OR (curation_score >= -1 AND curation_score <= 1))", "position": 63 }, { "declaration": "\n CHECK (phash IS NULL OR (length(phash) = 16 AND phash NOT GLOB '*[^0-9a-f]*'))", "position": 64 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 65 } ], "prefix": "CREATE TABLE \"cotton_photos\" (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_photos_taken ON cotton_photos (workspace_id, taken_at DESC)", "CREATE INDEX idx_cotton_photos_review ON cotton_photos (workspace_id, review_at) WHERE review_note IS NOT NULL", "CREATE INDEX idx_cotton_photos_undescribed ON cotton_photos (workspace_id, taken_at DESC) WHERE summary IS NULL", "CREATE INDEX idx_cotton_photos_place ON cotton_photos (workspace_id, place_city)", "CREATE INDEX idx_cotton_photos_favourite ON cotton_photos (workspace_id, taken_at DESC) WHERE favourite = 1", "CREATE INDEX idx_cotton_photos_phash ON cotton_photos (workspace_id, phash) WHERE phash IS NOT NULL", "CREATE INDEX idx_cotton_photos_utility ON cotton_photos (workspace_id, taken_at DESC) WHERE is_utility = 1", "CREATE INDEX idx_cotton_photos_origin ON cotton_photos (origin_handle) WHERE origin_handle IS NOT NULL", "CREATE INDEX IF NOT EXISTS idx_cotton_photos_author ON cotton_photos (substr(_hlc, 20), _hlc)" ], "full_text": [ "CREATE VIRTUAL TABLE fts_photos USING fts5(\n caption, summary, ocr_text, content = 'cotton_photos', content_rowid = 'rowid',\n tokenize = 'unicode61 remove_diacritics 2'\n )" ], "triggers": [ "CREATE TRIGGER fts_photos_ai AFTER INSERT ON cotton_photos WHEN new.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_photos'), 0) BEGIN\n INSERT INTO fts_photos (rowid, caption, summary, ocr_text) VALUES (new.rowid, new.caption, new.summary, new.ocr_text);\n END", "CREATE TRIGGER fts_photos_ad AFTER DELETE ON cotton_photos WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_photos'), 0) BEGIN\n INSERT INTO fts_photos (fts_photos, rowid, caption, summary, ocr_text) VALUES ('delete', old.rowid, old.caption, old.summary, old.ocr_text);\n END", "CREATE TRIGGER fts_photos_au AFTER UPDATE OF caption, summary, ocr_text ON cotton_photos\n FOR EACH ROW WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_photos'), 0) AND (new.caption IS NOT old.caption OR new.summary IS NOT old.summary OR new.ocr_text IS NOT old.ocr_text) BEGIN\n INSERT INTO fts_photos (fts_photos, rowid, caption, summary, ocr_text) VALUES ('delete', old.rowid, old.caption, old.summary, old.ocr_text);\n INSERT INTO fts_photos (rowid, caption, summary, ocr_text) VALUES (new.rowid, new.caption, new.summary, new.ocr_text);\n END" ] } ], "id": "photo", "name": "Photo", "plural": "Photos", "visibility": "owner", "picture": null, "builtin": true, "engine": "media", "columns": [ { "key": "key", "name": "Picture", "type": "photo", "readonly": true, "size": [ "width", "height" ], "caption": "caption" }, { "key": "sha256", "type": "text", "readonly": true }, { "key": "content_type", "type": "text", "readonly": true }, { "key": "size_bytes", "name": "Size", "type": "number", "readonly": true, "format": "bytes" }, { "key": "width", "name": "Dimensions", "type": "number", "readonly": true, "pair": "height", "format": "dimensions" }, { "key": "height", "name": "Height", "type": "number", "readonly": true }, { "key": "taken_at", "name": "Taken", "type": "date", "readonly": true }, { "key": "preview", "type": "text", "readonly": true }, { "key": "caption", "name": "Caption", "type": "text", "placeholder": "Add a caption" }, { "key": "summary", "name": "Description", "type": "longtext", "readonly": true, "placeholder": "Not described yet." }, { "key": "summary_by", "type": "text", "readonly": true }, { "key": "summary_at", "name": "Described", "type": "date", "readonly": true }, { "key": "review_note", "name": "Review", "type": "text" }, { "key": "review_by", "name": "Suggested by", "type": "text", "readonly": true }, { "key": "review_at", "name": "Suggested", "type": "date", "readonly": true }, { "key": "taken_offset", "type": "number", "readonly": true }, { "key": "latitude", "type": "number", "readonly": true }, { "key": "longitude", "type": "number", "readonly": true }, { "key": "place_name", "name": "Place", "type": "text", "readonly": true }, { "key": "place_city", "name": "City", "type": "text", "readonly": true }, { "key": "place_region", "type": "text", "readonly": true }, { "key": "place_country", "name": "Country", "type": "text", "readonly": true }, { "key": "camera_make", "name": "Camera make", "type": "text", "readonly": true }, { "key": "camera_model", "name": "Camera", "type": "text", "readonly": true }, { "key": "orientation", "type": "number", "readonly": true }, { "key": "favourite", "name": "Favourite", "type": "bool" }, { "key": "subtypes", "type": "longtext", "readonly": true }, { "key": "original_filename", "name": "File name", "type": "text", "readonly": true }, { "key": "aesthetic_score", "type": "number", "readonly": true }, { "key": "curation_score", "type": "number", "readonly": true }, { "key": "labels", "type": "longtext", "readonly": true }, { "key": "phash", "type": "text", "readonly": true }, { "key": "ocr_text", "name": "Text in the picture", "type": "longtext", "readonly": true }, { "key": "is_utility", "type": "bool", "readonly": true }, { "key": "origin_handle", "type": "text", "readonly": true }, { "key": "trashed_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "image_embedding", "type": "text", "readonly": true }, { "key": "image_embedding_model", "type": "text", "readonly": true }, { "key": "albums", "name": "Albums", "type": "link", "link_to": "album", "readonly": true, "multiple": true }, { "key": "people", "name": "People", "type": "link", "link_to": "person", "readonly": true, "multiple": true }, { "key": "sent_by", "name": "Sent by", "type": "text", "readonly": true }, { "key": "sent_by_number", "name": "Sent from", "type": "text", "readonly": true }, { "key": "sent_at", "name": "Sent", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "send_id", "name": "Send", "type": "text", "readonly": true } ], "title": "caption", "date": null, "project": null, "order": null, "slip": { "title": "caption", "subtitle": "place_name", "trailing": "taken_at", "photo": "key", "toggle": null, "title_fallback": "place_name" }, "tile": { "face": "polaroid-grid" }, "page": [ { "heading": null, "columns": [ "key", "caption" ], "hand": [ "taken_at", "place_name" ] }, { "heading": null, "columns": [ "albums" ], "when": { "column": "albums", "present": true } }, { "heading": null, "columns": [ "people" ], "when": { "column": "people", "present": true } }, { "heading": "What Cotton saw", "columns": [ "summary" ], "hand": [ "described {summary_at}" ] }, { "heading": null, "columns": [ "review_note" ], "when": { "column": "review_note", "present": true }, "note": "suggested for review", "ink": "red", "hand": "Suggested by {review_by} on {review_at}", "actions": [ { "label": "Keep", "sets": { "review_note": null }, "object": "star" }, { "label": "Delete", "delete": true } ] }, { "heading": "People", "list": { "table": "face", "link": "photo_id" } }, { "heading": "Details", "columns": [ "place_city", "place_country", "camera_make", "camera_model", "ocr_text" ], "hand": [ "size_bytes", "width" ] } ], "add": false, "seal": { "clear": [ "key", "sha256", "content_type", "size_bytes", "width", "height", "taken_at", "taken_offset", "orientation", "favourite", "is_utility", "trashed_at", "albums", "people", "sent_at", "send_id" ], "blind": [ "caption" ] }, "send": { "columns": [ "key", "sha256", "content_type", "size_bytes", "width", "height", "taken_at", "taken_offset", "caption", "original_filename", "latitude", "longitude", "place_name", "place_city", "place_region", "place_country", "camera_make", "camera_model", "orientation" ], "files": [ "key" ], "same": [ [ "sha256" ] ] }, "record_route": "/photos/photo/[id]", "takes_files": true, "sort": { "column": "taken_at", "descending": true }, "by_month": "taken_at", "layout": "sheet", "grid": { "columns": 4 }, "empty": { "title": "No photos yet.", "message": "Pictures from your chats land here on their own.", "search": { "title": "No matches yet" } }, "search": [ "caption", "summary" ], "polaroid": {}, "months": { "over": 0, "undated": "No date" }, "select": { "verb": "delete" }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "photo" } } ], "search_placeholder": "What's in your photos", "viewer": {}, "commands": [ { "id": "share", "label": "Share", "kind": "update", "method": "media.share", "bindings": { "key": "key" }, "receipt": "Ready to share", "object": "tag" }, { "id": "favourite", "label": "Favourite", "kind": "update", "verb": "update_record", "data": { "table": "photo", "patch": { "favourite": true } }, "bindings": { "id": "$id" }, "when": { "favourite": false }, "receipt": "{name} is a favourite", "undo": "unfavourite", "object": "star" }, { "id": "unfavourite", "label": "Not a favourite", "kind": "update", "verb": "update_record", "data": { "table": "photo", "patch": { "favourite": false } }, "bindings": { "id": "$id" }, "when": { "favourite": true }, "receipt": "{name} is not a favourite", "undo": "favourite", "object": "star" }, { "id": "describe", "label": "Write a description", "kind": "update", "method": "media.describe", "bindings": { "id": "$id" }, "receipt": "Described", "object": "pencil" }, { "id": "delete", "label": "Delete", "kind": "delete", "verb": "delete_record", "data": { "table": "photo" }, "confirm": "It can come back from the Bin. Undo on the receipt brings it back now.", "bindings": { "id": "$id" }, "receipt": "Deleted", "does": "destroys", "object": "bin" } ], "instructions": "A photo is one picture the owner keeps, with when and where it was taken. The caption is the owner's; the description and the text read from the picture are written by a worker. Describe only what is visible, and never name a person in a photo the owner has not confirmed.", "card": { "face": "photo.print", "fields": [ { "slot": "photo", "column": "key" }, { "slot": "title", "column": "caption" }, { "slot": "date", "column": "taken_at", "form": "weekday_date_year" }, { "slot": "place", "column": "place_name" }, { "slot": "people", "column": "people" }, { "slot": "album", "column": "albums" }, { "slot": "city", "column": "place_city" }, { "slot": "model", "column": "camera_make", "also": [ "camera_model" ] } ] }, "parts": { "shape": "sheet", "head": { "facts": [ "taken_at", "place_name" ] }, "links": [], "body": "summary", "lists": [ { "table": "face", "relation": "photo_id", "heading": "People" } ], "acts": { "main": "share", "more": [ "favourite", "unfavourite", "describe" ], "away": "delete" }, "cards": [ { "column": "taken_at" }, { "column": "place_name" }, { "column": "review_note" }, { "column": "ocr_text", "width": "full" } ] } }, { "format_version": 1, "tables": [ { "name": "cotton_videos", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "key", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n key TEXT NOT NULL", "position": 2 }, { "name": "sha256", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n sha256 TEXT NOT NULL", "position": 3 }, { "name": "content_type", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n content_type TEXT NOT NULL", "position": 4 }, { "name": "size_bytes", "type": "INTEGER", "default": null, "nullable": false, "primary_key": false, "declaration": "\n size_bytes INTEGER NOT NULL", "position": 5 }, { "name": "width", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n width INTEGER", "position": 6 }, { "name": "height", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n height INTEGER", "position": 7 }, { "name": "duration_ms", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n duration_ms INTEGER", "position": 8 }, { "name": "taken_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n taken_at TEXT NOT NULL", "position": 9 }, { "name": "preview", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n preview TEXT", "position": 10 }, { "name": "poster_key", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n poster_key TEXT", "position": 11 }, { "name": "caption", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n caption TEXT", "position": 12 }, { "name": "summary", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n summary TEXT", "position": 13 }, { "name": "summary_by", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n summary_by TEXT", "position": 14 }, { "name": "summary_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n summary_at TEXT", "position": 15 }, { "name": "review_note", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n review_note TEXT", "position": 16 }, { "name": "review_by", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n review_by TEXT", "position": 17 }, { "name": "review_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n review_at TEXT", "position": 18 }, { "name": "taken_offset", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n taken_offset INTEGER", "position": 19 }, { "name": "latitude", "type": "REAL", "default": null, "nullable": true, "primary_key": false, "declaration": "\n latitude REAL", "position": 20 }, { "name": "longitude", "type": "REAL", "default": null, "nullable": true, "primary_key": false, "declaration": "\n longitude REAL", "position": 21 }, { "name": "place_name", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n place_name TEXT", "position": 22 }, { "name": "place_city", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n place_city TEXT", "position": 23 }, { "name": "place_region", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n place_region TEXT", "position": 24 }, { "name": "place_country", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n place_country TEXT", "position": 25 }, { "name": "camera_make", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n camera_make TEXT", "position": 26 }, { "name": "camera_model", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n camera_model TEXT", "position": 27 }, { "name": "orientation", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n orientation INTEGER", "position": 28 }, { "name": "favourite", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n favourite INTEGER NOT NULL DEFAULT 0", "position": 29 }, { "name": "subtypes", "type": "TEXT", "default": "'[]'", "nullable": false, "primary_key": false, "declaration": "\n subtypes TEXT NOT NULL DEFAULT '[]'", "position": 30 }, { "name": "original_filename", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n original_filename TEXT", "position": 31 }, { "name": "aesthetic_score", "type": "REAL", "default": null, "nullable": true, "primary_key": false, "declaration": "\n aesthetic_score REAL", "position": 32 }, { "name": "curation_score", "type": "REAL", "default": null, "nullable": true, "primary_key": false, "declaration": "\n curation_score REAL", "position": 33 }, { "name": "labels", "type": "TEXT", "default": "'[]'", "nullable": false, "primary_key": false, "declaration": "\n labels TEXT NOT NULL DEFAULT '[]'", "position": 34 }, { "name": "phash", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n phash TEXT", "position": 35 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 36 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 37 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 38 }, { "name": "origin_handle", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " origin_handle TEXT CHECK (origin_handle IS NULL OR length(origin_handle) > 0)", "position": 39 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 40 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n trashed_at TEXT", "position": 41 } ], "constraints": [ { "declaration": "\n UNIQUE (workspace_id, sha256)", "position": 42 }, { "declaration": "\n CHECK (id = 'video:' || sha256)", "position": 43 }, { "declaration": "\n CHECK (sha256 NOT GLOB '*[^0-9a-f]*' AND length(sha256) = 64)", "position": 44 }, { "declaration": "\n CHECK (size_bytes >= 0)", "position": 45 }, { "declaration": "\n CHECK (width IS NULL OR width > 0)", "position": 46 }, { "declaration": "\n CHECK (height IS NULL OR height > 0)", "position": 47 }, { "declaration": "\n CHECK (caption IS NULL OR length(caption) <= 500)", "position": 48 }, { "declaration": "\n CHECK (review_note IS NULL OR (length(trim(review_note)) > 0 AND length(review_note) <= 280))", "position": 49 }, { "declaration": "\n CHECK ((summary IS NULL) = (summary_at IS NULL))", "position": 50 }, { "declaration": "\n CHECK ((review_note IS NULL) = (review_at IS NULL))", "position": 51 }, { "declaration": "\n CHECK ((latitude IS NULL) = (longitude IS NULL))", "position": 52 }, { "declaration": "\n CHECK (latitude IS NULL OR (latitude >= -90 AND latitude <= 90))", "position": 53 }, { "declaration": "\n CHECK (longitude IS NULL OR (longitude >= -180 AND longitude <= 180))", "position": 54 }, { "declaration": "\n CHECK (orientation IS NULL OR (orientation >= 1 AND orientation <= 8))", "position": 55 }, { "declaration": "\n CHECK (taken_offset IS NULL OR (taken_offset >= -86400 AND taken_offset <= 86400))", "position": 56 }, { "declaration": "\n CHECK (favourite IN (0, 1))", "position": 57 }, { "declaration": "\n CHECK (json_type(subtypes) = 'array')", "position": 58 }, { "declaration": "\n CHECK (json_type(labels) = 'array')", "position": 59 }, { "declaration": "\n CHECK (aesthetic_score IS NULL OR (aesthetic_score >= -1 AND aesthetic_score <= 1))", "position": 60 }, { "declaration": "\n CHECK (curation_score IS NULL OR (curation_score >= -1 AND curation_score <= 1))", "position": 61 }, { "declaration": "\n CHECK (phash IS NULL OR (length(phash) = 16 AND phash NOT GLOB '*[^0-9a-f]*'))", "position": 62 }, { "declaration": "\n CHECK (duration_ms IS NULL OR duration_ms >= 0)", "position": 63 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 64 } ], "prefix": "CREATE TABLE \"cotton_videos\" (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_videos_taken ON cotton_videos (workspace_id, taken_at DESC)", "CREATE INDEX idx_cotton_videos_review ON cotton_videos (workspace_id, review_at) WHERE review_note IS NOT NULL", "CREATE INDEX idx_cotton_videos_undescribed ON cotton_videos (workspace_id, taken_at DESC) WHERE summary IS NULL", "CREATE INDEX idx_cotton_videos_place ON cotton_videos (workspace_id, place_city)", "CREATE INDEX idx_cotton_videos_favourite ON cotton_videos (workspace_id, taken_at DESC) WHERE favourite = 1", "CREATE INDEX idx_cotton_videos_phash ON cotton_videos (workspace_id, phash) WHERE phash IS NOT NULL", "CREATE INDEX idx_cotton_videos_origin ON cotton_videos (origin_handle) WHERE origin_handle IS NOT NULL", "CREATE INDEX IF NOT EXISTS idx_cotton_videos_author ON cotton_videos (substr(_hlc, 20), _hlc)" ], "full_text": [ "CREATE VIRTUAL TABLE fts_videos USING fts5(\n caption, summary, content = 'cotton_videos', content_rowid = 'rowid',\n tokenize = 'unicode61 remove_diacritics 2'\n )" ], "triggers": [ "CREATE TRIGGER fts_videos_ai AFTER INSERT ON cotton_videos WHEN new.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_videos'), 0) BEGIN\n INSERT INTO fts_videos (rowid, caption, summary) VALUES (new.rowid, new.caption, new.summary);\n END", "CREATE TRIGGER fts_videos_ad AFTER DELETE ON cotton_videos WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_videos'), 0) BEGIN\n INSERT INTO fts_videos (fts_videos, rowid, caption, summary) VALUES ('delete', old.rowid, old.caption, old.summary);\n END", "CREATE TRIGGER fts_videos_au AFTER UPDATE OF caption, summary ON cotton_videos\n FOR EACH ROW WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_videos'), 0) AND (new.caption IS NOT old.caption OR new.summary IS NOT old.summary) BEGIN\n INSERT INTO fts_videos (fts_videos, rowid, caption, summary) VALUES ('delete', old.rowid, old.caption, old.summary);\n INSERT INTO fts_videos (rowid, caption, summary) VALUES (new.rowid, new.caption, new.summary);\n END" ] } ], "id": "video", "name": "Video", "plural": "Videos", "visibility": "owner", "picture": { "photo": "photo:879a439235a2a7dd14f5f40f15e4667ef45f7f0051936d0a23ba24f69bc04c74", "object": "tool-videos" }, "builtin": true, "engine": "media", "columns": [ { "key": "key", "name": "Film", "type": "file", "readonly": true, "size": [ "width", "height" ], "caption_fallback": "duration_ms", "poster": "poster_key" }, { "key": "sha256", "type": "text", "readonly": true }, { "key": "content_type", "type": "text", "readonly": true }, { "key": "size_bytes", "name": "Size", "type": "number", "readonly": true, "format": "bytes" }, { "key": "width", "name": "Dimensions", "type": "number", "readonly": true, "pair": "height", "format": "dimensions" }, { "key": "height", "name": "Height", "type": "number", "readonly": true }, { "key": "duration_ms", "name": "Length", "type": "number", "readonly": true, "reading": "{value}", "format": "duration_ms" }, { "key": "taken_at", "name": "Taken", "type": "date", "readonly": true }, { "key": "preview", "type": "text", "readonly": true }, { "key": "poster_key", "name": "Poster", "type": "photo", "readonly": true }, { "key": "caption", "name": "Caption", "type": "text", "placeholder": "Add a caption" }, { "key": "summary", "name": "Description", "type": "longtext", "readonly": true, "placeholder": "Not described yet." }, { "key": "summary_by", "type": "text", "readonly": true }, { "key": "summary_at", "name": "Described", "type": "date", "readonly": true }, { "key": "review_note", "name": "Review", "type": "text" }, { "key": "review_by", "name": "Suggested by", "type": "text", "readonly": true }, { "key": "review_at", "name": "Suggested", "type": "date", "readonly": true }, { "key": "taken_offset", "type": "number", "readonly": true }, { "key": "latitude", "type": "number", "readonly": true }, { "key": "longitude", "type": "number", "readonly": true }, { "key": "place_name", "name": "Place", "type": "text", "readonly": true }, { "key": "place_city", "type": "text", "readonly": true }, { "key": "place_region", "type": "text", "readonly": true }, { "key": "place_country", "type": "text", "readonly": true }, { "key": "camera_make", "type": "text", "readonly": true }, { "key": "camera_model", "type": "text", "readonly": true }, { "key": "orientation", "type": "number", "readonly": true }, { "key": "favourite", "name": "Favourite", "type": "bool" }, { "key": "subtypes", "type": "longtext", "readonly": true }, { "key": "original_filename", "name": "File name", "type": "text", "readonly": true }, { "key": "aesthetic_score", "type": "number", "readonly": true }, { "key": "curation_score", "type": "number", "readonly": true }, { "key": "labels", "type": "longtext", "readonly": true }, { "key": "phash", "type": "text", "readonly": true }, { "key": "origin_handle", "type": "text", "readonly": true }, { "key": "trashed_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "albums", "name": "Albums", "type": "link", "link_to": "album", "readonly": true, "multiple": true }, { "key": "people", "name": "People", "type": "link", "link_to": "person", "readonly": true, "multiple": true } ], "title": "caption", "date": null, "project": null, "order": null, "slip": { "title": "caption", "subtitle": "place_name", "trailing": "duration_ms", "photo": "poster_key", "toggle": null, "player": "key", "title_fallback": "place_name", "badge": { "column": "key", "symbol": "play.fill", "spoken": "Video" } }, "tile": { "face": "polaroid-grid" }, "page": [ { "heading": null, "columns": [ "key", "caption" ], "hand": [ "taken_at", "place_name" ] }, { "heading": null, "columns": [ "albums" ], "when": { "column": "albums", "present": true } }, { "heading": null, "columns": [ "people" ], "when": { "column": "people", "present": true } }, { "heading": "What Cotton saw", "columns": [ "summary" ], "hand": [ "described {summary_at}" ] }, { "heading": null, "columns": [ "review_note" ], "when": { "column": "review_note", "present": true }, "note": "suggested for review", "ink": "red", "hand": "Suggested by {review_by} on {review_at}", "actions": [ { "label": "Keep", "sets": { "review_note": null }, "object": "star" } ] }, { "heading": "Details", "columns": [ "original_filename" ], "hand": [ "size_bytes", "duration_ms" ] } ], "add": false, "seal": { "clear": [ "key", "sha256", "content_type", "size_bytes", "width", "height", "duration_ms", "taken_at", "taken_offset", "poster_key", "orientation", "favourite", "trashed_at", "albums", "people" ], "blind": [ "caption" ] }, "record_route": "/videos/video/[id]", "takes_files": true, "sort": { "column": "taken_at", "descending": true }, "by_month": "taken_at", "layout": "sheet", "grid": { "columns": 4 }, "empty": { "title": "No videos yet.", "message": "Pictures and videos from your chats land here on their own." }, "search": [ "caption", "summary" ], "polaroid": { "caption": "duration_ms" }, "months": { "over": 0, "undated": "No date" }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "video" } } ], "commands": [ { "id": "favourite", "label": "Favourite", "kind": "update", "verb": "update_record", "data": { "table": "video", "patch": { "favourite": true } }, "bindings": { "id": "$id" }, "when": { "favourite": false }, "receipt": "{name} is a favourite", "undo": "unfavourite", "object": "star" }, { "id": "unfavourite", "label": "Not a favourite", "kind": "update", "verb": "update_record", "data": { "table": "video", "patch": { "favourite": false } }, "bindings": { "id": "$id" }, "when": { "favourite": true }, "receipt": "{name} is not a favourite", "undo": "favourite", "object": "star" }, { "id": "describe", "label": "Write a description", "kind": "update", "method": "media.describe", "bindings": { "id": "$id" }, "receipt": "Described", "object": "pencil" }, { "id": "delete", "label": "Delete", "kind": "delete", "verb": "delete_record", "data": { "table": "video" }, "confirm": "Undo on the receipt brings it back.", "bindings": { "id": "$id" }, "receipt": "Deleted", "does": "destroys", "object": "bin" } ], "instructions": "A video is one film the owner keeps, with a poster frame, its length and when and where it was taken. Films are prints in the one Photos library; a film's page plays it. The caption is the owner's; the description is written by a worker from what the film shows. Describe only what is visible, and never name a person in a film the owner has not confirmed.", "groups": { "stack": "polaroids", "kept_in": { "table": "album", "items": "album_item" } }, "card": { "face": "video", "fields": [ { "slot": "photo", "column": "poster_key" }, { "slot": "title", "column": "caption" }, { "slot": "date", "column": "taken_at", "form": "weekday_date" }, { "slot": "place", "column": "place_name" } ] }, "tool": { "views": [ { "id": "all", "label": "All", "visibility": "owner", "is_default": true, "read": { "table": "video" } } ], "name": "Videos", "purpose": "Your videos and recordings.", "key": "videos", "icon": "video", "card_stock": "slate", "route": "/videos" }, "parts": { "shape": "sheet", "head": { "facts": [ "taken_at", "duration_ms" ] }, "links": [], "body": "summary", "lists": [], "acts": { "more": [ "favourite", "unfavourite", "describe" ], "away": "delete" }, "cards": [ { "column": "duration_ms" }, { "column": "taken_at" }, { "column": "place_name" }, { "column": "review_note" } ] } }, { "format_version": 1, "tables": [ { "name": "cotton_media_albums", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "kind", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n kind TEXT NOT NULL", "position": 2 }, { "name": "state", "type": "TEXT", "default": "'open'", "nullable": false, "primary_key": false, "declaration": "\n state TEXT NOT NULL DEFAULT 'open'", "position": 3 }, { "name": "decided_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n decided_at TEXT", "position": 4 }, { "name": "title", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n title TEXT NOT NULL", "position": 5 }, { "name": "title_by", "type": "TEXT", "default": "'derived'", "nullable": false, "primary_key": false, "declaration": "\n title_by TEXT NOT NULL DEFAULT 'derived'", "position": 6 }, { "name": "starts_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n starts_at TEXT NOT NULL", "position": 7 }, { "name": "ends_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n ends_at TEXT NOT NULL", "position": 8 }, { "name": "home_label", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n home_label TEXT", "position": 9 }, { "name": "cover_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n cover_id TEXT", "position": 10 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 11 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 12 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 13 }, { "name": "origin_handle", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " origin_handle TEXT CHECK (origin_handle IS NULL OR length(origin_handle) > 0)", "position": 14 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 15 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " trashed_at TEXT", "position": 16 } ], "constraints": [ { "declaration": "\n CHECK (kind IN ('trip', 'event'))", "position": 17 }, { "declaration": "\n CHECK (state IN ('open', 'kept', 'dismissed'))", "position": 18 }, { "declaration": "\n CHECK ((state = 'open') = (decided_at IS NULL))", "position": 19 }, { "declaration": "\n CHECK (title_by IN ('derived', 'user'))", "position": 20 }, { "declaration": "\n CHECK (starts_at <= ends_at)", "position": 21 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 22 } ], "prefix": "CREATE TABLE cotton_media_albums (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_media_albums_open ON cotton_media_albums (workspace_id, starts_at DESC) WHERE state = 'open'", "CREATE INDEX idx_cotton_media_albums_time ON cotton_media_albums (workspace_id, starts_at DESC)", "CREATE INDEX idx_cotton_media_albums_origin ON cotton_media_albums (origin_handle) WHERE origin_handle IS NOT NULL", "CREATE INDEX IF NOT EXISTS idx_cotton_media_albums_author ON cotton_media_albums (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "id": "album", "name": "Album", "plural": "Albums", "visibility": "owner", "picture": null, "builtin": true, "engine": "media", "columns": [ { "key": "kind", "name": "Kind", "type": "choice", "choices": [ "trip", "event" ], "readonly": true, "labels": { "trip": "Trip", "event": "Event" } }, { "key": "state", "name": "State", "type": "choice", "choices": [ "open", "kept", "dismissed" ], "readonly": true, "labels": { "open": "Suggested", "kept": "Kept", "dismissed": "Not this" } }, { "key": "decided_at", "name": "Decided", "type": "date", "readonly": true }, { "key": "title", "name": "Name", "type": "text", "required": true, "placeholder": "Name this album" }, { "key": "title_by", "type": "text", "readonly": true }, { "key": "starts_at", "name": "Days", "type": "date", "readonly": true, "until": "ends_at" }, { "key": "ends_at", "name": "To", "type": "date", "readonly": true }, { "key": "home_label", "name": "Home", "type": "text", "readonly": true }, { "key": "cover_id", "name": "Cover picture", "type": "text", "readonly": true }, { "key": "origin_handle", "type": "text", "readonly": true }, { "key": "trashed_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "cover_key", "name": "Cover", "type": "photo", "readonly": true, "size": [ "cover_width", "cover_height" ] }, { "key": "cover_width", "name": "Cover width", "type": "number", "readonly": true }, { "key": "cover_height", "name": "Cover height", "type": "number", "readonly": true }, { "key": "member_count", "name": "Pictures", "type": "number", "readonly": true, "units": { "one": "picture", "other": "pictures" } } ], "title": "title", "date": "starts_at", "project": null, "order": null, "slip": { "title": "title", "subtitle": "starts_at", "trailing": "member_count", "photo": "cover_key", "toggle": null, "byline": { "column": "state", "words": { "open": "suggested" }, "ink": "red" }, "answers": { "column": "state", "values": { "kept": "Keep", "dismissed": "Not this" }, "when": [ "open" ], "leaves": false } }, "tile": { "face": "polaroid-grid" }, "page": [ { "heading": null, "columns": [ "cover_key", "title" ], "hand": [ "starts_at", "member_count", "Away from {home_label}" ] }, { "heading": null, "when": { "column": "state", "values": [ "open" ] }, "note": "Cotton put these together — keep the album?", "answers": { "column": "state", "values": { "kept": "Keep", "dismissed": "Not this" }, "when": [ "open" ] } }, { "heading": null, "when": { "column": "state", "values": [ "dismissed" ] }, "note": "You said not this one.", "ink": "red", "answers": { "column": "state", "values": { "open": "Bring it back" }, "when": [ "dismissed" ] } }, { "heading": "Pictures", "list": { "table": "album_item", "link": "album_id", "empty": { "title": "No pictures in this album", "message": "Add some from your photos with the + circle." }, "columns": 3, "add": "Add photos" } }, { "heading": "Details", "columns": [ "kind", "state", "decided_at" ] } ], "add": false, "record_route": "/photos/album/[id]", "group": { "column": "state", "sections": [ { "heading": null, "values": [ "open" ] }, { "heading": null, "values": [ "kept" ] } ] }, "layout": "cards", "grid": { "columns": 2 }, "empty": { "title": "No albums yet", "message": "Cotton looks through your pictures each night and suggests a trip or an evening when it finds one." }, "delete": false, "polaroid": { "caption": "member_count", "title": "title", "subtitle": "starts_at" }, "hidden": { "column": "state", "values": [ "dismissed" ] }, "instructions": "An album groups photos and videos from one trip or event, between two local days. Albums are usually suggested: open until the owner keeps or dismisses one, and renaming a suggestion keeps it.", "card": { "face": "album.carousel", "offers": [ "album.carousel", "album.board" ], "fields": [ { "slot": "photo", "column": "cover_key" }, { "slot": "title", "column": "title" }, { "slot": "count", "column": "member_count" }, { "slot": "span", "column": "starts_at", "also": [ "ends_at" ] }, { "slot": "subtitle", "column": "home_label" } ] }, "parts": { "shape": "sheet", "head": { "facts": [] }, "links": [], "lists": [ { "table": "album_item", "relation": "album_id", "heading": "Pictures", "face": "photos" } ], "acts": { "more": [] }, "cards": [ { "column": "starts_at", "until": "ends_at" }, { "column": "member_count" }, { "column": "state" } ], "opens": "facts" } }, { "format_version": 1, "tables": [], "id": "secret", "name": "Password", "plural": "Passwords", "visibility": "owner", "picture": { "photo": "photo:3485bc7f726643a724a61ed3bf6954642e04592b99ed907c0becaf09b45029f1", "object": "tool-passwords" }, "builtin": true, "engine": "vault", "columns": [ { "key": "name", "name": "Name", "type": "text", "required": true }, { "key": "kind", "name": "Kind", "type": "choice", "required": true, "choices": [ "login", "api_key", "note", "card", "identity", "document", "code", "wifi", "address", "file" ], "readonly": true, "choice_names": { "login": "Login", "api_key": "API key", "note": "Note", "card": "Card", "identity": "ID", "document": "Document password", "code": "One-time code", "wifi": "Wi-Fi", "address": "Address", "file": "File" } }, { "key": "site", "name": "Website", "type": "text", "shown_when": { "column": "kind", "values": [ "login", "api_key" ] } }, { "key": "username", "name": "Username", "type": "text", "shown_when": { "column": "kind", "values": [ "login" ] } }, { "key": "service", "name": "Service", "type": "text", "shown_when": { "column": "kind", "values": [ "api_key" ] } }, { "key": "hint", "name": "Hint", "type": "text", "readonly": true }, { "key": "sealed", "name": "Sealed", "type": "longtext", "readonly": true }, { "key": "value_enc", "name": "Sealed on your devices", "type": "text", "readonly": true, "secret": true }, { "key": "vmk_version", "name": "Vault key version", "type": "number", "readonly": true }, { "key": "expires_at", "name": "Runs out", "type": "date", "month": true }, { "key": "last_used_at", "name": "Last used", "type": "date", "readonly": true }, { "key": "favourite_at", "name": "Favourite", "type": "date", "readonly": true }, { "key": "uses", "name": "Filled", "type": "number", "readonly": true }, { "key": "passkey_id", "name": "Passkey", "type": "text", "readonly": true }, { "key": "changed_at", "name": "Password changed", "type": "date", "readonly": true }, { "key": "history_enc", "name": "Earlier passwords", "type": "text", "readonly": true, "secret": true }, { "key": "trashed_at", "name": "Binned", "type": "date", "readonly": true }, { "key": "updated_at", "name": "Updated", "type": "date", "readonly": true } ], "title": "name", "date": null, "project": null, "order": null, "slip": { "title": "name", "subtitle": [ "site", "service" ], "trailing": "kind", "photo": null, "toggle": null, "subtitle_first": true }, "tile": { "face": "card-grid" }, "page": [ { "heading": null, "columns": [ "name", "kind" ] }, { "heading": "Where it is used", "columns": [ "username", "site", "service" ] }, { "heading": "Dates", "columns": [ "expires_at", "last_used_at", "updated_at", "trashed_at" ] } ], "readonly_when": "trashed_at", "sealed": true, "record_route": "/passwords/[id]", "group": { "column": "kind", "sections": [ { "heading": "Logins", "values": [ "login" ] }, { "heading": "API keys", "values": [ "api_key" ] }, { "heading": "Notes", "values": [ "note" ] }, { "heading": "Cards", "values": [ "card" ] }, { "heading": "IDs", "values": [ "identity" ] }, { "heading": "One-time codes", "values": [ "code" ] }, { "heading": "Wi-Fi", "values": [ "wifi" ] }, { "heading": "Addresses", "values": [ "address" ] } ] }, "empty": { "title": "Nothing kept yet", "message": "Passwords, keys, cards and IDs, sealed with this database’s key, which only the devices in it hold." }, "create": { "label": "Add a password", "doors": [ { "id": "new", "label": "New password", "object": "slip", "act": { "name": "password_new", "argument": "site", "lands": "id" } }, { "id": "apple_passwords", "label": "Bring Apple Passwords in", "object": "stack", "files": { "types": [ "public.comma-separated-values-text" ] } } ] }, "commands": [ { "id": "copy_password", "label": "Copy", "kind": "copy", "copies": "$sealed", "object": "copy" }, { "id": "delete", "label": "Delete", "kind": "delete", "verb": "delete_record", "data": { "table": "secret" }, "confirm": "Undo on the receipt brings it back.", "bindings": { "id": "$id" }, "receipt": "Deleted", "does": "destroys", "object": "bin" } ], "instructions": "A password record holds a login, an API key, a card, an identity or a secure note, sealed so only the devices in this database can open it — your own, or the people you share it with. Assistants can create, list, update and bin passwords, but never read one back. Never repeat a secret the owner typed into a conversation anywhere else.", "groups": { "stack": "slips" }, "card": { "face": "secret", "fields": [ { "slot": "title", "column": "name" }, { "slot": "subtitle", "column": "site", "also": [ "service" ] }, { "slot": "body", "column": "username", "label": "label.secret.username" }, { "slot": "state", "column": "kind", "only": [ "api_key", "note", "card", "identity", "document", "code", "wifi", "address" ] }, { "slot": "date", "column": "last_used_at", "form": "relative", "label": "label.secret.last_used" }, { "slot": "expires", "column": "expires_at", "label": "label.secret.expires" } ] }, "tool": { "views": [ { "id": "all", "label": "All", "visibility": "owner", "is_default": true, "read": { "table": "secret", "empty": { "line": "empty_views.passwords.all", "table": true } } }, { "id": "favourites", "label": "Favourites", "visibility": "owner", "is_default": false, "read": { "table": "secret", "where": { "favourite_at": { "present": true } }, "empty": { "line": "empty_views.passwords.favourites", "table": true } } }, { "id": "codes", "label": "Codes", "visibility": "owner", "is_default": false, "read": { "table": "secret", "where": { "kind": "code" }, "empty": { "line": "empty_views.passwords.codes", "table": true } } }, { "id": "logins", "label": "Logins", "visibility": "owner", "is_default": false, "read": { "table": "secret", "where": { "kind": "login" }, "empty": { "line": "empty_views.passwords.logins", "table": true } } }, { "id": "cards", "label": "Cards", "visibility": "owner", "is_default": false, "read": { "table": "secret", "where": { "kind": "card" }, "empty": { "line": "empty_views.passwords.cards", "table": true } } }, { "id": "notes", "label": "Notes", "visibility": "owner", "is_default": false, "read": { "table": "secret", "where": { "kind": "note" }, "empty": { "line": "empty_views.passwords.notes", "table": true } } }, { "id": "ids", "label": "IDs", "visibility": "owner", "is_default": false, "read": { "table": "secret", "where": { "kind": "identity" }, "empty": { "line": "empty_views.passwords.ids", "table": true } } }, { "id": "wifi", "label": "Wi-Fi", "visibility": "owner", "is_default": false, "read": { "table": "secret", "where": { "kind": "wifi" }, "empty": { "line": "empty_views.passwords.wifi", "table": true } } }, { "id": "addresses", "label": "Addresses", "visibility": "owner", "is_default": false, "read": { "table": "secret", "where": { "kind": "address" }, "empty": { "line": "empty_views.passwords.addresses", "table": true } } }, { "id": "api_keys", "label": "API keys", "visibility": "owner", "is_default": false, "read": { "table": "secret", "where": { "kind": "api_key" }, "empty": { "line": "empty_views.passwords.api_keys", "table": true } } }, { "id": "documents", "label": "Documents", "visibility": "owner", "is_default": false, "read": { "table": "secret", "where": { "kind": "document" }, "empty": { "line": "empty_views.passwords.documents", "table": true } } }, { "id": "health", "label": "Health", "visibility": "owner", "is_default": false, "read": { "table": "secret", "where": { "kind": "login" }, "empty": { "line": "empty_views.passwords.health", "table": true } }, "sort": { "column": "changed_at", "descending": false, "tie": "name", "tie_descending": false } } ], "name": "Passwords", "purpose": "Passwords and other private secrets.", "key": "passwords", "icon": "key-round", "card_stock": "grey", "route": "/passwords" }, "parts": { "shape": "sheet", "head": { "facts": [ "kind", "username" ] }, "links": [], "lists": [], "acts": { "main": "copy_password", "more": [], "away": "delete" }, "cards": [ { "column": "kind" }, { "column": "username" }, { "column": "site" }, { "column": "service" }, { "column": "expires_at" }, { "column": "last_used_at" } ], "strip": [] } }, { "format_version": 1, "tables": [ { "name": "cotton_stories", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "source", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n source TEXT NOT NULL CHECK (source IN ('whatsapp', 'instagram', 'facebook'))", "position": 2 }, { "name": "account", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n account TEXT NOT NULL", "position": 3 }, { "name": "external_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n external_id TEXT NOT NULL", "position": 4 }, { "name": "person_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n person_id TEXT", "position": 5 }, { "name": "sender", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n sender TEXT", "position": 6 }, { "name": "sender_label", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n sender_label TEXT", "position": 7 }, { "name": "kind", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n kind TEXT NOT NULL", "position": 8 }, { "name": "caption", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n caption TEXT", "position": 9 }, { "name": "media_key", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n media_key TEXT", "position": 10 }, { "name": "media_content_type", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n media_content_type TEXT", "position": 11 }, { "name": "media_dropped_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n media_dropped_at TEXT", "position": 12 }, { "name": "posted_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n posted_at TEXT NOT NULL", "position": 13 }, { "name": "expires_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n expires_at TEXT NOT NULL", "position": 14 }, { "name": "seen_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n seen_at TEXT", "position": 15 }, { "name": "kept", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n kept INTEGER NOT NULL DEFAULT 0 CHECK (kept IN (0, 1))", "position": 16 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 17 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 18 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 19 } ], "constraints": [ { "declaration": "\n UNIQUE (workspace_id, source, external_id)", "position": 20 }, { "declaration": "\n CHECK (trim(external_id) <> '')", "position": 21 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 22 } ], "prefix": "CREATE TABLE cotton_stories (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_stories_posted ON cotton_stories (workspace_id, posted_at)", "CREATE INDEX idx_cotton_stories_person ON cotton_stories (person_id)", "CREATE INDEX IF NOT EXISTS idx_cotton_stories_author ON cotton_stories (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "id": "story", "name": "Story", "plural": "Social", "visibility": "owner", "picture": { "photo": "photo:51ec4b79f6e238265a5afb50500b92eaf61fb199ac1c93515b7915544511464c", "object": "tool-stories" }, "builtin": true, "engine": "messages", "columns": [ { "key": "source", "name": "App", "type": "text", "readonly": true, "fact": true, "reading": "{value}", "format": "app-name", "labels": { "cellular": "Phone call", "facetime_audio": "FaceTime audio", "facetime_video": "FaceTime video", "whatsapp": "WhatsApp", "com.apple.telephony": "Phone call", "com.apple.facetime": "FaceTime", "com.skype.skype": "Skype", "com.skype.skypeforiphone": "Skype", "com.microsoft.skype.teams": "Microsoft Teams", "us.zoom.videomeetings": "Zoom", "com.google.meetings": "Google Meet", "com.google.gvdialer": "Google Voice", "ph.telegra.telegraph": "Telegram", "org.whispersystems.signal": "Signal", "com.viber": "Viber", "com.facebook.messenger": "Messenger", "com.burbn.instagram": "Instagram", "jp.naver.line": "LINE", "com.tencent.xin": "WeChat", "com.hammerandchisel.discord": "Discord", "com.tinyspeck.chatlyio": "Slack", "com.cisco.webex.meetings": "Webex", "net.whatsapp.whatsapp": "WhatsApp", "net.whatsapp.whatsappsmb": "WhatsApp Business" } }, { "key": "account", "type": "text", "readonly": true }, { "key": "external_id", "type": "text", "readonly": true }, { "key": "person_id", "name": "Who", "type": "link", "link_to": "person", "readonly": true }, { "key": "sender", "name": "From", "type": "text", "readonly": true }, { "key": "sender_label", "name": "Shown as", "type": "text", "readonly": true, "fact": true, "reading": "{value}" }, { "key": "kind", "name": "Kind", "type": "text", "readonly": true, "labels": { "photo": "Photo", "video": "Video" } }, { "key": "caption", "name": "Caption", "type": "longtext", "readonly": true }, { "key": "media_key", "name": "Picture", "type": "photo", "readonly": true, "placeholder": "Picture unavailable", "caption": "caption" }, { "key": "media_content_type", "type": "text", "readonly": true }, { "key": "media_dropped_at", "name": "Picture let go", "type": "date", "readonly": true }, { "key": "posted_at", "name": "Posted", "type": "date", "readonly": true, "fact": true, "reading": "{value}", "format": "calendar-datetime" }, { "key": "expires_at", "name": "App expiry", "type": "date", "readonly": true }, { "key": "seen_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "kept", "name": "Kept", "type": "bool", "readonly": true }, { "key": "retention_line", "name": "Kept", "type": "text", "readonly": true }, { "key": "expiry_line", "name": "In the app", "type": "text", "readonly": true }, { "key": "reactions", "name": "Reactions", "type": "text", "readonly": true } ], "title": "caption", "date": "posted_at", "project": null, "order": null, "slip": { "title": "caption", "subtitle": "sender_label", "trailing": "posted_at", "photo": "media_key", "toggle": null, "title_fallback": "sender_label" }, "tile": { "face": "polaroid-grid" }, "page": [ { "heading": null, "columns": [ "media_key", "caption" ], "hand": [ "sender_label", "posted_at", "source" ] }, { "heading": null, "columns": [ "person_id" ], "when": { "column": "person_id", "present": true } }, { "heading": null, "columns": [ "media_dropped_at" ], "when": { "column": "media_dropped_at", "present": true } }, { "heading": "Details", "columns": [ "sender", "kind", "expires_at", "kept" ] } ], "add": false, "seal": { "clear": [ "person_id", "posted_at", "expires_at" ], "blind": [ "caption" ], "blind_exact": [ "external_id" ] }, "stories": { "picture": { "caption": "caption", "subtitle": "posted_at" }, "page": { "caption": "caption" }, "video": { "column": "kind", "values": [ "video" ] } }, "sort": { "column": "posted_at", "descending": true }, "group": { "column": "person_id" }, "layout": "sheet", "grid": { "columns": 4 }, "empty": { "title": "No stories yet.", "message": "Statuses people post on WhatsApp land here, kept after the app lets them go." }, "search": [ "caption" ], "delete": false, "commands": [ { "id": "keep", "label": "Keep", "kind": "update", "verb": "update_record", "data": { "table": "story", "patch": { "kept": true } }, "bindings": { "id": "$id" }, "when": { "kept": false }, "receipt": "Kept", "undo": "unkeep", "does": "completes", "object": "tick" }, { "id": "unkeep", "label": "Don't keep", "kind": "update", "verb": "update_record", "data": { "table": "story", "patch": { "kept": false } }, "bindings": { "id": "$id" }, "when": { "kept": true }, "receipt": "Not kept", "undo": "keep", "object": "undo" }, { "id": "person", "label": "Open person", "kind": "open", "opens": "person_id", "object": "person" } ], "instructions": "A story is a status or story someone posted on WhatsApp (later Instagram, Facebook), held after the app lets it go: who posted it (person, or the name the app showed and their number), the caption, the picture, when it was posted and when the app dropped it. Rows stay for ever; a picture stays only for someone on a People record or a story the owner kept (Keep), and is let go a day after posting otherwise. A story is never a chat message, and reading it here marks nothing seen in the app.", "groups": { "stack": "polaroids" }, "card": { "face": "plain", "fields": [ { "slot": "photo", "column": "media_key" }, { "slot": "title", "column": "caption" }, { "slot": "subtitle", "column": "sender_label" }, { "slot": "facts", "column": "posted_at", "also": [ "source", "kind", "expiry_line", "retention_line" ] } ] }, "tool": { "views": [ { "id": "all", "label": "All", "visibility": "owner", "is_default": true, "read": { "table": "story" } } ], "name": "Social", "purpose": "Stories and the moments they bring together.", "key": "stories", "icon": "images", "card_stock": "slate", "route": "/lists/story" }, "parts": { "shape": "desk", "head": { "facts": [ "sender_label", "posted_at", "source" ] }, "links": [], "body": "caption", "lists": [], "acts": { "main": "keep", "more": [ "unkeep", "person" ] }, "strip": [ { "column": "media_key" }, { "column": "retention_line" }, { "column": "expiry_line" }, { "column": "reactions" } ] } }, { "format_version": 1, "tables": [], "id": "media", "name": "Photo or video", "plural": "Photos and videos", "picture": { "photo": "photo:cd1fef04863a8c429257401e6b4da235458215a00395ffecd58b3eda10ab3172", "object": "tool-photos" }, "builtin": true, "engine": "media", "columns": [ { "key": "kind", "name": "Kind", "type": "choice", "choices": [ "photo", "video" ], "readonly": true, "labels": { "photo": "Photo", "video": "Video" } }, { "key": "key", "name": "Picture", "type": "photo", "readonly": true }, { "key": "caption", "name": "Caption", "type": "text", "readonly": true }, { "key": "taken_at", "name": "Taken", "type": "date", "readonly": true }, { "key": "place_name", "name": "Place", "type": "text", "readonly": true }, { "key": "summary", "name": "Description", "type": "longtext", "readonly": true }, { "key": "duration_ms", "name": "Length", "type": "number", "readonly": true, "format": "duration_ms" }, { "key": "size_bytes", "name": "Size", "type": "number", "readonly": true, "format": "bytes" }, { "key": "albums", "name": "Albums", "type": "link", "link_to": "album", "readonly": true, "multiple": true }, { "key": "people", "name": "People", "type": "link", "link_to": "person", "readonly": true, "multiple": true }, { "key": "place_city", "name": "City", "type": "text", "readonly": true }, { "key": "camera_make", "name": "Camera make", "type": "text", "readonly": true }, { "key": "camera_model", "name": "Camera", "type": "text", "readonly": true }, { "key": "favourite", "name": "Favourite", "type": "bool", "readonly": true }, { "key": "on_phone", "name": "On this phone", "type": "choice", "choices": [ "absent", "kept" ], "readonly": true, "labels": { "absent": "Not on this phone", "kept": "On this phone" } } ], "title": "caption", "date": null, "project": null, "order": null, "slip": { "title": "caption", "subtitle": "place_name", "trailing": "taken_at", "photo": "key", "toggle": null, "title_fallback": "place_name", "badge": { "column": "kind", "symbol": "play.fill", "spoken": "Video", "values": [ "video" ] } }, "tile": { "face": "polaroid-grid" }, "page": [ { "heading": null, "columns": [ "key", "caption", "taken_at", "place_name" ] } ], "seal": { "clear": [ "kind", "key", "taken_at", "duration_ms", "size_bytes", "albums", "people", "favourite", "on_phone" ] }, "takes_files": true, "sort": { "column": "taken_at", "descending": true }, "by_month": "taken_at", "layout": "sheet", "grid": { "columns": 4 }, "empty": { "title": "No photos yet.", "message": "Pictures and videos from your chats land here on their own.", "search": { "title": "No matches yet" } }, "create": { "label": "Add photos", "doors": [ { "id": "library", "label": "Choose photos", "object": "sheet", "pick": { "source": "library", "kinds": [ "photo", "video" ], "many": true } }, { "id": "camera", "label": "Take a photo", "object": "camera", "pick": { "source": "camera", "kinds": [ "photo", "video" ] } }, { "id": "files", "label": "From Files", "object": "canister", "files": { "types": [ "public.image", "public.movie" ], "many": true } } ] }, "search": [ "caption", "summary" ], "delete_when": { "column": "kind", "present": true }, "polaroid": { "caption": "duration_ms" }, "filter": { "column": "kind", "tabs": false, "all": "All", "words": { "photo": "Photos", "video": "Videos" }, "empty": { "photo": { "title": "No photos yet.", "message": "Pictures and videos from your chats land here on their own." }, "video": { "title": "No videos yet.", "message": "Pictures and videos from your chats land here on their own." } } }, "count_words": { "column": "kind", "units": { "photo": { "one": "photo", "other": "photos" }, "video": { "one": "video", "other": "videos" } } }, "months": { "over": 0, "undated": "No date" }, "select": { "verb": "delete" }, "deletion": { "bin": true }, "links": [ { "label": "Albums", "table": "album", "where": { "state": "open" }, "words": "suggested", "path": "/photos/albums", "review": true }, { "label": "Duplicates", "table": "duplicate", "path": "/photos/duplicates", "review": true, "hides_empty": true, "units": { "one": "{n} duplicate", "other": "{n} duplicates" } }, { "label": "People to confirm", "table": "face", "path": "/photos/people", "review": true, "hides_empty": true, "units": { "one": "{n} person to confirm", "other": "{n} people to confirm" } }, { "label": "Deleted", "table": "bin", "where": { "table": [ "photo", "video" ] } } ], "search_placeholder": "What's in your photos", "viewer": { "words": { "close": "Close", "details": "Details", "more": "More", "share": "Share", "position": "{n} of {count}", "absent": "Not on this phone yet", "removed": "This was removed.", "fetch": "Fetch", "fetching": "Fetching…", "map_absent": "Map not fetched yet", "play": "Play", "pause": "Pause", "mute": "Mute", "unmute": "Sound on", "picture_in_picture": "Picture in picture", "search": "Search this document", "no_match": "Nothing matches", "page": "Page {n} of {count}", "go_to_page": "Go to page", "go": "Go", "pin_press": "long press to leave a pin", "pin_hint": "A pin on this picture, at the point you pressed.", "pin_placeholder": "What is this about?", "cancel": "Cancel", "save": "Save", "saving": "Saving…" } }, "commands": [ { "id": "share", "label": "Share", "kind": "update", "method": "media.share", "bindings": { "key": "key" }, "receipt": "Ready to share", "object": "tag" }, { "id": "favourite", "label": "Favourite", "kind": "update", "verb": "update_record", "data": { "table": "media", "patch": { "favourite": true } }, "bindings": { "id": "$id" }, "when": { "favourite": false }, "receipt": "{name} is a favourite", "undo": "unfavourite", "object": "star" }, { "id": "unfavourite", "label": "Not a favourite", "kind": "update", "verb": "update_record", "data": { "table": "media", "patch": { "favourite": false } }, "bindings": { "id": "$id" }, "when": { "favourite": true }, "receipt": "{name} is not a favourite", "undo": "favourite", "object": "star" }, { "id": "delete", "label": "Delete", "kind": "delete", "verb": "delete_record", "data": { "table": "media" }, "confirm": "Undo on the receipt brings it back.", "bindings": { "id": "$id" }, "when": { "kind": { "not": null } }, "receipt": "Deleted", "does": "destroys", "object": "bin" } ], "instructions": "The owner's pictures and films as one library, newest first: each row is a photo or a video (kind), read from the photo and video tables. A row opens its photo's or video's own page. Its groups are the albums: create_group on it makes an album of the pictures named, update_group renames one or puts pictures in or takes them out, and delete_group dismisses one. on_phone is answered by each phone (absent, or kept: the picture's own bytes are on it) and never stored. A picture comes in by the + : Choose photos (the system's photo picker, which hands over only what the owner chose and never the whole library), Take a photo (the camera) or From Files; each becomes a photo or a video row with its bytes, kept on the phone and backed up to the object once it is signed in. Cotton never mirrors the camera roll.", "groups": { "stack": "polaroids", "kept_in": { "table": "album", "items": "album_item" } }, "card": { "face": "photo.print", "fields": [ { "slot": "photo", "column": "key" }, { "slot": "title", "column": "caption" }, { "slot": "date", "column": "taken_at", "form": "weekday_date_year" }, { "slot": "place", "column": "place_name" }, { "slot": "people", "column": "people" }, { "slot": "album", "column": "albums" }, { "slot": "city", "column": "place_city" }, { "slot": "model", "column": "camera_make", "also": [ "camera_model" ] } ] }, "tool": { "views": [ { "id": "all", "label": "Recent", "visibility": "owner", "is_default": true, "read": { "table": "media" } }, { "id": "albums", "label": "Albums", "visibility": "owner", "is_default": false, "read": { "table": "album" } }, { "id": "favourites", "label": "Favourites", "visibility": "owner", "is_default": false, "read": { "table": "media", "where": { "favourite": true }, "empty": { "line": "empty_views.photos.favourites", "table": true } } }, { "id": "videos", "label": "Videos", "visibility": "owner", "is_default": false, "read": { "table": "media", "where": { "kind": "video" }, "empty": { "line": "empty_views.photos.videos", "table": true } } }, { "id": "on_phone", "label": "On this phone", "visibility": "owner", "is_default": false, "read": { "table": "media", "where": { "on_phone": [ "kept" ] }, "empty": { "line": "empty_views.photos.on_phone", "table": true } } } ], "name": "Photos", "purpose": "Your photos and the moments they capture.", "key": "photos", "icon": "image", "card_stock": "slate", "route": "/photos" }, "parts": { "shape": "desk", "head": { "facts": [ "taken_at", "place_name" ] }, "links": [], "body": "summary", "lists": [], "acts": { "main": "share", "more": [ "favourite", "unfavourite" ], "away": "delete" }, "strip": [ { "column": "taken_at" }, { "column": "place_name" }, { "column": "key" } ] } }, { "format_version": 1, "tables": [ { "name": "cotton_media_album_items", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "album_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n album_id TEXT NOT NULL", "position": 2 }, { "name": "record_kind", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n record_kind TEXT NOT NULL", "position": 3 }, { "name": "record_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n record_id TEXT NOT NULL", "position": 4 }, { "name": "added_by", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n added_by TEXT NOT NULL", "position": 5 }, { "name": "sort_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n sort_at TEXT NOT NULL", "position": 6 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 7 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 8 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 9 }, { "name": "origin_handle", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " origin_handle TEXT CHECK (origin_handle IS NULL OR length(origin_handle) > 0)", "position": 10 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 11 } ], "constraints": [ { "declaration": "\n CHECK (record_kind IN ('photo', 'video'))", "position": 12 }, { "declaration": "\n CHECK (substr(record_id, 1, length(record_kind) + 1) = record_kind || ':')", "position": 13 }, { "declaration": "\n CHECK (added_by IN ('derived', 'user'))", "position": 14 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE", "position": 15 }, { "declaration": "\n FOREIGN KEY (album_id) REFERENCES cotton_media_albums(id)\n ", "position": 16 } ], "prefix": "CREATE TABLE cotton_media_album_items (", "suffix": ")", "indexes": [ "CREATE UNIQUE INDEX uq_cotton_media_album_items_member ON cotton_media_album_items (album_id, record_id)", "CREATE INDEX idx_cotton_media_album_items_record ON cotton_media_album_items (workspace_id, record_id)", "CREATE INDEX idx_cotton_media_album_items_origin ON cotton_media_album_items (origin_handle) WHERE origin_handle IS NOT NULL", "CREATE INDEX IF NOT EXISTS idx_cotton_media_album_items_author ON cotton_media_album_items (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "id": "album_item", "name": "Picture", "plural": "Pictures", "visibility": "owner", "picture": null, "builtin": true, "engine": "media", "columns": [ { "key": "album_id", "name": "Album", "type": "link", "required": true, "link_to": "album", "readonly": true }, { "key": "record_kind", "type": "text", "readonly": true }, { "key": "record_id", "name": "Picture", "type": "text", "readonly": true }, { "key": "added_by", "type": "text", "readonly": true }, { "key": "sort_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "origin_handle", "type": "text", "readonly": true }, { "key": "kind", "name": "Kind", "type": "choice", "choices": [ "photo", "video" ], "readonly": true, "labels": { "photo": "Photo", "video": "Video" } }, { "key": "key", "name": "Print", "type": "photo", "readonly": true }, { "key": "caption", "name": "Caption", "type": "text", "readonly": true }, { "key": "taken_at", "name": "Taken", "type": "date", "readonly": true }, { "key": "duration_ms", "name": "Length", "type": "number", "readonly": true, "format": "duration_ms" } ], "title": "caption", "date": "taken_at", "project": null, "order": null, "slip": { "title": "caption", "subtitle": null, "trailing": "taken_at", "photo": "key", "toggle": null, "badge": { "column": "kind", "symbol": "play.fill", "spoken": "Video", "values": [ "video" ] } }, "tile": { "face": "polaroid-grid" }, "page": [ { "heading": null, "columns": [ "key", "caption", "taken_at" ] } ], "layout": "sheet", "grid": { "columns": 4 }, "empty": { "title": "No pictures in this album", "message": "Add some from your photos with the + circle." }, "delete_when": { "column": "kind", "present": true }, "opens": { "column": "record_id", "table_column": "kind" }, "polaroid": { "caption": "duration_ms" }, "select": { "verb": "delete" }, "deletion": { "confirm": "Remove from album", "label": "Remove from album", "asks": false }, "instructions": "One picture or film in one album (kind names its table, record_id its id). Removing one takes it out of the album; the picture stays in Photos.", "card": { "face": "plain", "fields": [ { "slot": "photo", "column": "key" }, { "slot": "title", "column": "caption" }, { "slot": "facts", "column": "kind", "also": [ "taken_at" ] } ] }, "parts": { "shape": "sheet", "head": { "facts": [] }, "links": [], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "taken_at" }, { "column": "duration_ms" } ] } }, { "format_version": 1, "tables": [ { "name": "cotton_media_duplicates", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "record_kind", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n record_kind TEXT NOT NULL", "position": 2 }, { "name": "keep_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n keep_id TEXT NOT NULL", "position": 3 }, { "name": "copy_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n copy_id TEXT NOT NULL", "position": 4 }, { "name": "distance", "type": "INTEGER", "default": null, "nullable": false, "primary_key": false, "declaration": "\n distance INTEGER NOT NULL", "position": 5 }, { "name": "method", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n method TEXT NOT NULL", "position": 6 }, { "name": "state", "type": "TEXT", "default": "'open'", "nullable": false, "primary_key": false, "declaration": "\n state TEXT NOT NULL DEFAULT 'open'", "position": 7 }, { "name": "decided_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n decided_at TEXT", "position": 8 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 9 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 10 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 11 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 12 } ], "constraints": [ { "declaration": "\n CHECK (record_kind IN ('photo', 'video'))", "position": 13 }, { "declaration": "\n CHECK (keep_id <> copy_id)", "position": 14 }, { "declaration": "\n CHECK (substr(keep_id, 1, length(record_kind) + 1) = record_kind || ':')", "position": 15 }, { "declaration": "\n CHECK (substr(copy_id, 1, length(record_kind) + 1) = record_kind || ':')", "position": 16 }, { "declaration": "\n CHECK (distance >= 0 AND distance <= 64)", "position": 17 }, { "declaration": "\n CHECK (method IN ('phash', 'featureprint'))", "position": 18 }, { "declaration": "\n CHECK (state IN ('open', 'confirmed', 'dismissed'))", "position": 19 }, { "declaration": "\n CHECK ((state = 'open') = (decided_at IS NULL))", "position": 20 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 21 } ], "prefix": "CREATE TABLE cotton_media_duplicates (", "suffix": ")", "indexes": [ "CREATE UNIQUE INDEX uq_cotton_media_duplicates_pair ON cotton_media_duplicates (workspace_id, keep_id, copy_id)", "CREATE INDEX idx_cotton_media_duplicates_open ON cotton_media_duplicates (workspace_id, keep_id) WHERE state = 'open'", "CREATE INDEX idx_cotton_media_duplicates_copy ON cotton_media_duplicates (workspace_id, copy_id)", "CREATE INDEX IF NOT EXISTS idx_cotton_media_duplicates_author ON cotton_media_duplicates (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "id": "duplicate", "name": "Duplicate", "plural": "Duplicates", "visibility": "owner", "picture": null, "builtin": true, "engine": "media", "columns": [ { "key": "record_kind", "type": "text", "readonly": true }, { "key": "keep_id", "name": "Keep", "type": "link", "link_to": "photo", "readonly": true, "contributes": false, "media": true }, { "key": "copy_id", "name": "Copy", "type": "link", "link_to": "photo", "readonly": true, "contributes": false, "media": true }, { "key": "distance", "name": "Distance", "type": "number", "readonly": true, "units": { "one": "bit apart", "other": "bits apart" } }, { "key": "method", "name": "Method", "type": "choice", "choices": [ "phash", "features" ], "readonly": true, "labels": { "phash": "perceptual hash", "features": "visual features" } }, { "key": "state", "name": "State", "type": "choice", "choices": [ "open", "confirmed", "dismissed" ], "readonly": true, "labels": { "open": "Open", "confirmed": "Confirmed", "dismissed": "Dismissed" } }, { "key": "decided_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "keep_key", "name": "Keep", "type": "photo", "readonly": true, "caption": "keep_facts", "opens": { "column": "keep_id" } }, { "key": "copy_key", "name": "Copy", "type": "photo", "readonly": true, "caption": "copy_facts", "opens": { "column": "copy_id" } }, { "key": "keep_facts", "name": "Keep facts", "type": "text", "readonly": true }, { "key": "copy_facts", "name": "Copy facts", "type": "text", "readonly": true } ], "title": "keep_facts", "date": null, "project": null, "order": null, "slip": { "title": "keep_facts", "subtitle": null, "trailing": null, "photo": "keep_key", "toggle": null, "trailing_picture": "copy_key", "answers": { "column": "state", "values": { "confirmed": "Keep this one", "dismissed": "They are different" }, "when": [ "open" ], "primary": "confirmed" } }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "keep_key", "copy_key" ] } ], "group": { "column": "keep_id" }, "empty": { "title": "Nothing to review.", "message": "When the Mac finds pictures that look like copies of each other, they are listed here for you to decide. Nothing is ever deleted for you." }, "delete": false, "instructions": "A pair of pictures the Mac thinks are copies of one another: keep names the one to keep, copy the likely copy. The owner answers: keep this one (the other is a copy) or they are different. Nothing is deleted for them.", "card": { "face": "plain", "fields": [ { "slot": "photo", "column": "keep_key" }, { "slot": "title", "column": "keep_facts" }, { "slot": "subtitle", "column": "copy_facts" }, { "slot": "facts", "column": "method", "also": [ "state", "distance" ] } ] } }, { "format_version": 1, "tables": [ { "name": "cotton_media_sightings", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "record_kind", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n record_kind TEXT NOT NULL", "position": 2 }, { "name": "record_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n record_id TEXT NOT NULL", "position": 3 }, { "name": "source", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n source TEXT NOT NULL", "position": 4 }, { "name": "source_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n source_id TEXT", "position": 5 }, { "name": "thread_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n thread_id TEXT", "position": 6 }, { "name": "key", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n key TEXT NOT NULL", "position": 7 }, { "name": "seen_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n seen_at TEXT NOT NULL", "position": 8 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 9 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 10 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 11 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 12 } ], "constraints": [ { "declaration": "\n CHECK (record_kind IN ('photo', 'video'))", "position": 13 }, { "declaration": "\n CHECK (substr(record_id, 1, length(record_kind) + 1) = record_kind || ':')", "position": 14 }, { "declaration": "\n CHECK (source IN ('message', 'share', 'library', 'apple_library', 'email'))", "position": 15 }, { "declaration": "\n CHECK ((source = 'message') = (thread_id IS NOT NULL))", "position": 16 }, { "declaration": "\n CHECK (source NOT IN ('message', 'apple_library', 'email') OR source_id IS NOT NULL)", "position": 17 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 18 } ], "prefix": "CREATE TABLE \"cotton_media_sightings\" (", "suffix": ")", "indexes": [ "CREATE UNIQUE INDEX uq_cotton_media_sightings_natural ON cotton_media_sightings (workspace_id, record_kind, record_id, source, ifnull(source_id, ''))", "CREATE INDEX idx_cotton_media_sightings_record ON cotton_media_sightings (workspace_id, record_id)", "CREATE INDEX idx_cotton_media_sightings_thread ON cotton_media_sightings (workspace_id, thread_id) WHERE thread_id IS NOT NULL", "CREATE INDEX idx_cotton_media_sightings_source ON cotton_media_sightings (workspace_id, source, source_id)", "CREATE INDEX IF NOT EXISTS idx_cotton_media_sightings_author ON cotton_media_sightings (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "id": "sighting", "name": "Sighting", "plural": "Seen in", "visibility": "owner", "picture": null, "builtin": true, "engine": "media", "columns": [ { "key": "record_kind", "type": "text", "readonly": true }, { "key": "record_id", "type": "text", "readonly": true }, { "key": "source", "name": "Where", "type": "choice", "choices": [ "message", "share", "library", "apple_library", "email" ], "readonly": true, "labels": { "message": "A chat", "share": "Shared into Cotton", "library": "Added from this phone's library", "apple_library": "Imported from the Apple Photos library", "email": "Attached to an email" } }, { "key": "source_id", "type": "text", "readonly": true }, { "key": "thread_id", "name": "Chat", "type": "text", "readonly": true }, { "key": "key", "type": "text", "readonly": true }, { "key": "seen_at", "name": "Seen", "type": "date", "readonly": true }, { "key": "photo_id", "name": "Photo", "type": "link", "link_to": "photo", "readonly": true, "media": true }, { "key": "video_id", "name": "Video", "type": "link", "link_to": "video", "readonly": true, "media": true }, { "key": "thread_name", "name": "Chat name", "type": "text", "readonly": true } ], "title": "thread_name", "date": "seen_at", "project": null, "order": null, "slip": { "title": "thread_name", "subtitle": null, "trailing": null, "photo": null, "toggle": null, "title_fallback": "source" }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "thread_name", "source", "seen_at" ] } ], "seal": { "clear": [ "record_kind", "record_id", "source", "source_id", "thread_id", "key", "seen_at", "photo_id", "video_id" ] }, "sort": { "column": "seen_at" }, "delete": false, "opens": { "column": "thread_id", "table": "message_thread" }, "commands": [ { "id": "open-photo", "label": "Open photo", "kind": "open", "opens": "photo_id", "object": "picture" }, { "id": "open-video", "label": "Open video", "kind": "open", "opens": "video_id", "object": "picture" } ], "instructions": "Where a picture or film was seen: a chat (with its thread), shared into Cotton, added from the phone's library, imported from Apple Photos, or attached to an email. Read-only.", "card": { "face": "plain", "fields": [ { "slot": "title", "column": "thread_name" }, { "slot": "facts", "column": "source", "also": [ "seen_at" ] } ] }, "parts": { "shape": "sheet", "head": { "facts": [] }, "links": [], "lists": [], "acts": { "more": [ "open-photo", "open-video" ] }, "cards": [ { "column": "source" }, { "column": "seen_at" } ] } }, { "format_version": 1, "tables": [ { "name": "cotton_media_faces", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "record_kind", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n record_kind TEXT NOT NULL", "position": 2 }, { "name": "record_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n record_id TEXT NOT NULL", "position": 3 }, { "name": "source", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n source TEXT NOT NULL", "position": 4 }, { "name": "source_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n source_id TEXT NOT NULL", "position": 5 }, { "name": "x", "type": "REAL", "default": null, "nullable": false, "primary_key": false, "declaration": "\n x REAL NOT NULL", "position": 6 }, { "name": "y", "type": "REAL", "default": null, "nullable": false, "primary_key": false, "declaration": "\n y REAL NOT NULL", "position": 7 }, { "name": "w", "type": "REAL", "default": null, "nullable": false, "primary_key": false, "declaration": "\n w REAL NOT NULL", "position": 8 }, { "name": "h", "type": "REAL", "default": null, "nullable": false, "primary_key": false, "declaration": "\n h REAL NOT NULL", "position": 9 }, { "name": "quality", "type": "REAL", "default": null, "nullable": true, "primary_key": false, "declaration": "\n quality REAL", "position": 10 }, { "name": "cluster_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n cluster_id TEXT", "position": 11 }, { "name": "person_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n person_id TEXT", "position": 12 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 13 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 14 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 15 }, { "name": "suggested_person_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " suggested_person_id TEXT", "position": 16 }, { "name": "suggested_distance", "type": "REAL", "default": null, "nullable": true, "primary_key": false, "declaration": " suggested_distance REAL CHECK (suggested_distance IS NULL OR (suggested_distance >= 0 AND suggested_distance <= 2))", "position": 17 }, { "name": "suggestion_dismissed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " suggestion_dismissed_at TEXT", "position": 18 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 19 }, { "name": "embedding", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " embedding TEXT CHECK (embedding IS NULL OR length(embedding) > 0)", "position": 20 }, { "name": "embedding_model", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " embedding_model TEXT CHECK (embedding_model IS NULL OR length(embedding_model) > 0)", "position": 21 }, { "name": "person_by", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " person_by TEXT CHECK (person_by IS NULL OR person_by = 'match')", "position": 22 } ], "constraints": [ { "declaration": "\n CHECK (record_kind IN ('photo', 'video'))", "position": 23 }, { "declaration": "\n CHECK (substr(record_id, 1, length(record_kind) + 1) = record_kind || ':')", "position": 24 }, { "declaration": "\n CHECK (source IN ('apple', 'cotton'))", "position": 25 }, { "declaration": "\n CHECK (x >= 0 AND x <= 1 AND y >= 0 AND y <= 1)", "position": 26 }, { "declaration": "\n CHECK (w > 0 AND w <= 1 AND h > 0 AND h <= 1)", "position": 27 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 28 } ], "prefix": "CREATE TABLE cotton_media_faces (", "suffix": ")", "indexes": [ "CREATE UNIQUE INDEX uq_cotton_media_faces_natural ON cotton_media_faces (workspace_id, record_kind, record_id, source, source_id)", "CREATE INDEX idx_cotton_media_faces_record ON cotton_media_faces (workspace_id, record_id)", "CREATE INDEX idx_cotton_media_faces_person ON cotton_media_faces (workspace_id, person_id) WHERE person_id IS NOT NULL", "CREATE INDEX idx_cotton_media_faces_cluster ON cotton_media_faces (workspace_id, cluster_id) WHERE cluster_id IS NOT NULL", "CREATE INDEX idx_cotton_media_faces_suggested ON cotton_media_faces (workspace_id, suggested_person_id) WHERE suggested_person_id IS NOT NULL", "CREATE INDEX IF NOT EXISTS idx_cotton_media_faces_author ON cotton_media_faces (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "id": "face", "name": "Face", "plural": "People to confirm", "visibility": "owner", "picture": null, "builtin": true, "engine": "photos", "columns": [ { "key": "record_kind", "type": "text", "readonly": true }, { "key": "record_id", "type": "text", "readonly": true }, { "key": "source", "type": "text", "readonly": true }, { "key": "source_id", "type": "text", "readonly": true }, { "key": "x", "type": "number", "readonly": true }, { "key": "y", "type": "number", "readonly": true }, { "key": "w", "type": "number", "readonly": true }, { "key": "h", "type": "number", "readonly": true }, { "key": "quality", "type": "number", "readonly": true }, { "key": "cluster_id", "type": "text", "readonly": true }, { "key": "person_id", "type": "link", "link_to": "person", "readonly": true }, { "key": "suggested_person_id", "name": "Maybe", "type": "link", "link_to": "person", "readonly": true, "contributes": false }, { "key": "suggested_distance", "type": "number", "readonly": true }, { "key": "suggestion_dismissed_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "embedding", "type": "text", "readonly": true }, { "key": "embedding_model", "type": "text", "readonly": true }, { "key": "person_by", "type": "text", "readonly": true }, { "key": "question", "name": "Question", "type": "text", "readonly": true }, { "key": "crop", "name": "Face", "type": "photo", "readonly": true }, { "key": "likelihood", "name": "How sure", "type": "choice", "choices": [ "likely", "maybe" ], "readonly": true, "labels": { "likely": "Likely", "maybe": "Maybe" } }, { "key": "decision", "name": "Answer", "type": "choice", "choices": [ "yes", "no" ], "labels": { "yes": "Yes", "no": "No" } }, { "key": "photo_id", "name": "In the photo", "type": "link", "link_to": "photo", "readonly": true, "media": true } ], "title": "question", "date": null, "project": null, "order": null, "slip": { "title": "question", "subtitle": null, "trailing": null, "photo": "crop", "toggle": null, "byline": { "column": "likelihood", "words": { "likely": "Very likely", "maybe": "Maybe" } }, "answers": { "column": "decision", "values": { "yes": "Yes", "no": "Not them" } } }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "crop", "question", "likelihood", "decision", "photo_id", "suggested_person_id" ], "answers": { "column": "decision", "values": { "yes": "Yes", "no": "Not them" } } } ], "add": false, "seal": { "clear": [ "record_kind", "record_id", "source", "source_id", "x", "y", "w", "h", "quality", "cluster_id", "person_id", "suggested_person_id", "suggested_distance", "suggestion_dismissed_at", "person_by", "crop", "likelihood", "decision", "photo_id" ] }, "layout": "sheet", "grid": { "columns": 4 }, "empty": { "title": "Nobody to confirm", "message": "When the Mac thinks it recognises someone in a picture, it asks you here. It never decides on its own." }, "delete": false, "commands": [ { "id": "open-photo", "label": "Open photo", "kind": "open", "opens": "photo_id", "object": "picture" }, { "id": "open-person", "label": "Open person", "kind": "open", "opens": "suggested_person_id", "object": "person" } ], "instructions": "A face the Mac found in a photo and thinks it recognises: the question names the person it suggests. Answering yes names that person in the face; no stops the question for this face. Nothing is decided without the owner.", "groups": { "stack": "polaroids" }, "card": { "face": "face", "fields": [ { "slot": "photo", "column": "crop" }, { "slot": "title", "column": "question" }, { "slot": "people", "column": "suggested_person_id", "max": 1 } ] }, "parts": { "shape": "sheet", "head": { "facts": [], "state": "decision" }, "links": [], "lists": [], "acts": { "more": [ "open-photo", "open-person" ] }, "cards": [ { "column": "likelihood" } ] } }, { "format_version": 1, "tables": [ { "name": "cotton_msg_thread_participants", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "thread_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n thread_id TEXT NOT NULL", "position": 1 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 2 }, { "name": "contact_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n contact_id TEXT", "position": 3 }, { "name": "display_name", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n display_name TEXT", "position": 4 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 5 }, { "name": "role", "type": "TEXT", "default": "'member'", "nullable": false, "primary_key": false, "declaration": "\n role TEXT NOT NULL DEFAULT 'member'", "position": 6 }, { "name": "left_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n left_at TEXT", "position": 7 }, { "name": "is_self", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n is_self INTEGER NOT NULL DEFAULT 0", "position": 8 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 9 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 10 } ], "constraints": [ { "declaration": "\n CHECK (role IN ('admin', 'member'))", "position": 11 }, { "declaration": "\n CHECK ((is_self = 1) OR (contact_id IS NOT NULL) OR (NULLIF(trim(COALESCE(display_name, '')), '') IS NOT NULL))", "position": 12 }, { "declaration": "\n FOREIGN KEY (contact_id) REFERENCES cotton_msg_contacts(id)", "position": 13 }, { "declaration": "\n FOREIGN KEY (thread_id) REFERENCES cotton_msg_threads(id)", "position": 14 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 15 } ], "prefix": "CREATE TABLE \"cotton_msg_thread_participants\" (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_msg_thread_participants_contact ON cotton_msg_thread_participants (contact_id)", "CREATE INDEX idx_cotton_msg_thread_participants_workspace ON cotton_msg_thread_participants (workspace_id)", "CREATE INDEX idx_cotton_msg_thread_participants_thread_label ON cotton_msg_thread_participants (thread_id, display_name)", "CREATE INDEX idx_cotton_msg_thread_participants_thread_contact ON cotton_msg_thread_participants (thread_id, contact_id)", "CREATE INDEX IF NOT EXISTS idx_cotton_msg_thread_participants_author ON cotton_msg_thread_participants (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "id": "thread_member", "name": "Chat member", "plural": "Chat members", "visibility": "owner", "picture": null, "builtin": true, "engine": "messages", "columns": [ { "key": "thread_id", "type": "link", "required": true, "link_to": "thread", "readonly": true, "contributes": false }, { "key": "contact_id", "type": "link", "link_to": "message_contact", "readonly": true }, { "key": "display_name", "type": "text", "readonly": true }, { "key": "role", "type": "text", "readonly": true }, { "key": "left_at", "type": "date", "readonly": true }, { "key": "is_self", "type": "bool", "readonly": true }, { "key": "name", "type": "text", "readonly": true }, { "key": "person_id", "type": "link", "link_to": "person", "readonly": true, "contributes": false } ], "title": "name", "date": null, "project": null, "order": null, "slip": { "title": "name", "subtitle": "role", "trailing": null, "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "name", "person_id", "role", "left_at" ] } ], "seal": { "clear": [ "thread_id", "contact_id", "person_id", "left_at" ], "blind": [ "display_name", "name" ] }, "delete": false, "commands": [ { "id": "person", "label": "Open person", "kind": "open", "opens": "person_id", "object": "person" }, { "id": "chat", "label": "Open chat", "kind": "open", "opens": "thread_id", "object": "bubble" } ], "instructions": "One person in a conversation, as the thread lists them: the name the chat shows, the person they are in the owner's contacts when one is known, their role in a group, and when they left it. Members are read only here; the messages engine keeps them in step with the conversation.", "card": { "face": "plain", "fields": [ { "slot": "title", "column": "name" }, { "slot": "subtitle", "column": "role" }, { "slot": "facts", "column": "left_at" } ] }, "parts": { "shape": "sheet", "head": { "facts": [] }, "links": [], "lists": [], "acts": { "more": [ "person", "chat" ] }, "cards": [ { "column": "role" }, { "column": "left_at" } ], "strip": [] } }, { "format_version": 1, "tables": [], "id": "message_import", "name": "Export import", "plural": "Export imports", "visibility": "owner", "picture": null, "builtin": true, "engine": "messages", "columns": [ { "key": "name", "name": "Export", "type": "text", "readonly": true }, { "key": "receipt", "name": "Result", "type": "longtext", "readonly": true }, { "key": "media_receipt", "name": "Pictures and files", "type": "longtext", "readonly": true }, { "key": "thread_id", "name": "Chat", "type": "link", "link_to": "thread", "readonly": true }, { "key": "state", "name": "Import state", "type": "text", "readonly": true, "fact": true, "reading": "{value}" }, { "key": "senders", "name": "Senders in this export", "type": "longtext", "readonly": true } ], "title": "name", "date": null, "project": null, "order": null, "slip": { "title": "name", "subtitle": "receipt", "trailing": null, "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "name", "receipt", "media_receipt", "thread_id" ] } ], "add": true, "empty": { "title": "Import an export", "message": "For WhatsApp, choose Export chat and share it to Cotton, or choose it from Files here. For Instagram, request Download your information in JSON format and choose its ZIP from Imports. A shared ZIP asks which service made it; importing it again adds only what is new." }, "delete": false, "commands": [ { "id": "choose", "label": "Choose an export", "kind": "create", "method": "message.import.choose", "receipt": "Choosing an export", "object": "folder", "form": true }, { "id": "whatsapp", "label": "Import from WhatsApp", "kind": "update", "method": "message.import.run", "data": { "source": "whatsapp" }, "bindings": { "id": "$id" }, "when": { "state": "choosing" }, "receipt": "Importing from WhatsApp", "object": "slip" }, { "id": "instagram", "label": "Import from Instagram", "kind": "update", "method": "message.import.run", "data": { "source": "instagram" }, "bindings": { "id": "$id" }, "when": { "state": "choosing" }, "receipt": "Importing from Instagram", "object": "arrow" }, { "id": "retry", "label": "Try again", "kind": "update", "method": "message.import.retry", "bindings": { "id": "$id" }, "when": { "state": "failed" }, "receipt": "Trying again", "object": "retry" }, { "id": "owner", "label": "Choose me", "kind": "update", "method": "message.import.owner", "bindings": { "id": "$id" }, "when": { "state": "asking" }, "receipt": "Importing this chat", "pick": { "argument": "ownerName", "kind": "text", "choices_from": "senders" }, "object": "person" }, { "id": "thread", "label": "Open chat", "kind": "open", "opens": "thread_id", "object": "bubble" } ], "instructions": "An export import reads a WhatsApp chat or an Instagram Download your information ZIP on this device. It is made by sharing the export to Cotton or by choosing the file; nothing is typed. When the export does not say which sender is the owner, the import's page asks. The list holds the imports made since the app opened; the chats themselves are in Chats. Nothing is ever sent.", "card": { "face": "plain", "fields": [ { "slot": "title", "column": "name" }, { "slot": "subtitle", "column": "state" }, { "slot": "body", "column": "receipt" }, { "slot": "facts", "column": "senders" } ] }, "parts": { "shape": "desk", "head": { "facts": [ "state" ] }, "links": [], "body": "receipt", "lists": [], "acts": { "main": "choose", "more": [ "whatsapp", "instagram", "retry", "owner", "thread" ] }, "strip": [ { "column": "media_receipt" } ] } }, { "format_version": 1, "tables": [ { "name": "cotton_document_pages", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "document_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n document_id TEXT NOT NULL", "position": 1 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 2 }, { "name": "page", "type": "INTEGER", "default": null, "nullable": false, "primary_key": false, "declaration": "\n page INTEGER NOT NULL", "position": 3 }, { "name": "text", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n text TEXT NOT NULL", "position": 4 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 5 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 6 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 7 } ], "constraints": [ { "declaration": "\n UNIQUE (document_id, page)", "position": 8 }, { "declaration": "\n CHECK (page >= 1)", "position": 9 }, { "declaration": "\n FOREIGN KEY (document_id) REFERENCES cotton_documents(id)", "position": 10 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 11 } ], "prefix": "CREATE TABLE cotton_document_pages (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_document_pages_workspace ON cotton_document_pages (workspace_id)", "CREATE INDEX IF NOT EXISTS idx_cotton_document_pages_author ON cotton_document_pages (substr(_hlc, 20), _hlc)" ], "full_text": [ "CREATE VIRTUAL TABLE fts_document_pages USING fts5(\n text, content = 'cotton_document_pages', content_rowid = 'rowid',\n tokenize = 'unicode61 remove_diacritics 2'\n )" ], "triggers": [ "CREATE TRIGGER fts_document_pages_ai AFTER INSERT ON cotton_document_pages WHEN new.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_document_pages'), 0) BEGIN\n INSERT INTO fts_document_pages (rowid, text) VALUES (new.rowid, new.text);\n END", "CREATE TRIGGER fts_document_pages_ad AFTER DELETE ON cotton_document_pages WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_document_pages'), 0) BEGIN\n INSERT INTO fts_document_pages (fts_document_pages, rowid, text) VALUES ('delete', old.rowid, old.text);\n END", "CREATE TRIGGER fts_document_pages_au AFTER UPDATE OF text ON cotton_document_pages\n FOR EACH ROW WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_document_pages'), 0) AND (new.text IS NOT old.text) BEGIN\n INSERT INTO fts_document_pages (fts_document_pages, rowid, text) VALUES ('delete', old.rowid, old.text);\n INSERT INTO fts_document_pages (rowid, text) VALUES (new.rowid, new.text);\n END" ] }, { "name": "cotton_documents", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "title", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n title TEXT", "position": 2 }, { "name": "original_name", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n original_name TEXT NOT NULL", "position": 3 }, { "name": "mime", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n mime TEXT NOT NULL", "position": 4 }, { "name": "byte_size", "type": "INTEGER", "default": null, "nullable": false, "primary_key": false, "declaration": "\n byte_size INTEGER NOT NULL", "position": 5 }, { "name": "sha256", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n sha256 TEXT NOT NULL", "position": 6 }, { "name": "storage_path", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n storage_path TEXT NOT NULL", "position": 7 }, { "name": "decrypted_path", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n decrypted_path TEXT", "position": 8 }, { "name": "password", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n password TEXT", "position": 9 }, { "name": "page_count", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n page_count INTEGER", "position": 10 }, { "name": "status", "type": "TEXT", "default": "'processing'", "nullable": false, "primary_key": false, "declaration": "\n status TEXT NOT NULL DEFAULT 'processing'", "position": 11 }, { "name": "failed_stage", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n failed_stage TEXT", "position": 12 }, { "name": "error_code", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n error_code TEXT", "position": 13 }, { "name": "status_changed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n status_changed_at TEXT", "position": 14 }, { "name": "doc_type", "type": "TEXT", "default": "'other'", "nullable": false, "primary_key": false, "declaration": "\n doc_type TEXT NOT NULL DEFAULT 'other'", "position": 15 }, { "name": "document_date", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n document_date TEXT", "position": 16 }, { "name": "period_start", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n period_start TEXT", "position": 17 }, { "name": "period_end", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n period_end TEXT", "position": 18 }, { "name": "issuer", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n issuer TEXT", "position": 19 }, { "name": "summary", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n summary TEXT", "position": 20 }, { "name": "facts", "type": "TEXT", "default": "'{}'", "nullable": false, "primary_key": false, "declaration": "\n facts TEXT NOT NULL DEFAULT '{}'", "position": 21 }, { "name": "text_extracted", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n text_extracted INTEGER NOT NULL DEFAULT 0", "position": 22 }, { "name": "source", "type": "TEXT", "default": "'app'", "nullable": false, "primary_key": false, "declaration": "\n source TEXT NOT NULL DEFAULT 'app'", "position": 23 }, { "name": "mcp_token_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n mcp_token_id TEXT", "position": 24 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 25 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 26 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 27 }, { "name": "origin_handle", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " origin_handle TEXT CHECK (origin_handle IS NULL OR length(origin_handle) > 0)", "position": 28 }, { "name": "secret_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " secret_id TEXT", "position": 29 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 30 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n trashed_at TEXT", "position": 31 } ], "constraints": [ { "declaration": "\n UNIQUE (workspace_id, sha256)", "position": 32 }, { "declaration": "\n CHECK (byte_size >= 0)", "position": 33 }, { "declaration": "\n CHECK (doc_type IN ('bank_statement', 'card_statement', 'invoice', 'receipt', 'tax', 'id', 'insurance', 'medical', 'legal', 'ticket', 'statement_other', 'letter', 'manual', 'other'))", "position": 34 }, { "declaration": "\n CHECK ((status = 'failed') = (failed_stage IS NOT NULL))", "position": 35 }, { "declaration": "\n CHECK (failed_stage IS NULL OR failed_stage IN ('unlock', 'extract', 'summarize', 'land'))", "position": 36 }, { "declaration": "\n CHECK ((page_count IS NULL) OR (page_count >= 0))", "position": 37 }, { "declaration": "\n CHECK ((period_start IS NULL) OR (period_end IS NULL) OR (period_end >= period_start))", "position": 38 }, { "declaration": "\n CHECK (length(sha256) = 64 AND NOT sha256 GLOB '*[^0-9a-f]*')", "position": 39 }, { "declaration": "\n CHECK (source IN ('app', 'agent', 'share'))", "position": 40 }, { "declaration": "\n CHECK (status IN ('processing', 'summarizing', 'ready', 'locked', 'failed'))", "position": 41 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 42 } ], "prefix": "CREATE TABLE \"cotton_documents\" (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_documents_pipeline ON cotton_documents (status, status_changed_at) WHERE status IN ('processing', 'summarizing')", "CREATE INDEX idx_cotton_documents_type ON cotton_documents (workspace_id, doc_type)", "CREATE INDEX idx_cotton_documents_workspace_date ON cotton_documents (workspace_id, document_date DESC, created_at DESC)", "CREATE INDEX idx_cotton_documents_origin ON cotton_documents (origin_handle) WHERE origin_handle IS NOT NULL", "CREATE INDEX IF NOT EXISTS idx_cotton_documents_author ON cotton_documents (substr(_hlc, 20), _hlc)" ], "full_text": [ "CREATE VIRTUAL TABLE fts_documents USING fts5(\n title, issuer, summary, original_name, content = 'cotton_documents', content_rowid = 'rowid',\n tokenize = 'unicode61 remove_diacritics 2'\n )" ], "triggers": [ "CREATE TRIGGER fts_documents_ai AFTER INSERT ON cotton_documents WHEN new.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_documents'), 0) BEGIN\n INSERT INTO fts_documents (rowid, title, issuer, summary, original_name) VALUES (new.rowid, new.title, new.issuer, new.summary, new.original_name);\n END", "CREATE TRIGGER fts_documents_ad AFTER DELETE ON cotton_documents WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_documents'), 0) BEGIN\n INSERT INTO fts_documents (fts_documents, rowid, title, issuer, summary, original_name) VALUES ('delete', old.rowid, old.title, old.issuer, old.summary, old.original_name);\n END", "CREATE TRIGGER fts_documents_au AFTER UPDATE OF title, issuer, summary, original_name ON cotton_documents\n FOR EACH ROW WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_documents'), 0) AND (new.title IS NOT old.title OR new.issuer IS NOT old.issuer OR new.summary IS NOT old.summary OR new.original_name IS NOT old.original_name) BEGIN\n INSERT INTO fts_documents (fts_documents, rowid, title, issuer, summary, original_name) VALUES ('delete', old.rowid, old.title, old.issuer, old.summary, old.original_name);\n INSERT INTO fts_documents (rowid, title, issuer, summary, original_name) VALUES (new.rowid, new.title, new.issuer, new.summary, new.original_name);\n END" ] } ], "id": "document", "name": "Document", "plural": "Documents", "visibility": "owner", "picture": { "photo": "photo:e1f1afc03a39eee6facd9c74b47b0eb62bf0d48378636a2e0cd0d363a5ba4ad3", "object": "tool-documents" }, "builtin": true, "engine": "documents", "columns": [ { "key": "title", "type": "text", "readonly": false }, { "key": "original_name", "name": "File name", "type": "text", "readonly": true }, { "key": "mime", "name": "Type", "type": "text", "readonly": true }, { "key": "byte_size", "name": "Size", "type": "number", "readonly": true, "format": "bytes" }, { "key": "sha256", "type": "text", "readonly": true }, { "key": "storage_path", "name": "File", "type": "file", "readonly": true, "presentation": "file" }, { "key": "decrypted_path", "type": "text", "readonly": true }, { "key": "password", "type": "text", "readonly": true }, { "key": "page_count", "name": "Pages", "type": "number", "readonly": true, "units": { "one": "page", "other": "pages", "zero": "0 pages" } }, { "key": "status", "type": "choice", "choices": [ "processing", "summarizing", "ready", "locked", "failed" ], "readonly": true, "labels": { "processing": "Being read", "summarizing": "Being summarised", "ready": "Ready", "locked": "Locked — needs its password", "failed": "Could not be read" } }, { "key": "failed_stage", "name": "Failed at", "type": "choice", "choices": [ "unlock", "extract", "summarize", "land" ], "readonly": true }, { "key": "error_code", "name": "Problem", "type": "text", "readonly": true }, { "key": "status_changed_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "doc_type", "name": "Kind", "type": "choice", "choices": [ "bank_statement", "card_statement", "invoice", "receipt", "tax", "id", "insurance", "medical", "legal", "ticket", "statement_other", "letter", "manual", "other" ], "readonly": true, "labels": { "bank_statement": "Bank statement", "card_statement": "Card statement", "invoice": "Invoice", "receipt": "Receipt", "tax": "Tax", "id": "ID", "insurance": "Insurance", "medical": "Medical", "legal": "Legal", "ticket": "Ticket", "statement_other": "Statement", "letter": "Letter", "manual": "Manual", "other": "Other" } }, { "key": "document_date", "name": "Dated", "type": "date", "readonly": true }, { "key": "period_start", "name": "Covers from", "type": "date", "readonly": true }, { "key": "period_end", "name": "Covers to", "type": "date", "readonly": true }, { "key": "issuer", "name": "From", "type": "text", "readonly": true }, { "key": "summary", "name": "Reading", "type": "longtext", "readonly": true }, { "key": "facts", "name": "Facts", "type": "longtext", "readonly": true }, { "key": "text_extracted", "type": "bool", "readonly": true }, { "key": "source", "name": "Added from", "type": "choice", "choices": [ "app", "agent", "share" ], "readonly": true, "labels": { "app": "This app", "agent": "An assistant", "share": "Shared in" } }, { "key": "mcp_token_id", "type": "text", "readonly": true }, { "key": "origin_handle", "type": "text", "readonly": true }, { "key": "secret_id", "name": "Password", "type": "link", "link_to": "secret", "readonly": true }, { "key": "trashed_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "created_at", "name": "Added", "type": "date", "readonly": true }, { "key": "statement_id", "name": "Statement", "type": "link", "link_to": "statement", "readonly": true }, { "key": "pages_text", "name": "Pages", "type": "longtext", "readonly": true }, { "key": "state_message", "name": "Reading status", "type": "longtext", "readonly": true }, { "key": "type_line", "name": "Kind and date", "type": "text", "readonly": true }, { "key": "page_line", "name": "Pages", "type": "text", "readonly": true }, { "key": "provenance", "name": "Added", "type": "text", "readonly": true }, { "key": "period_years", "name": "Year", "type": "text", "readonly": true }, { "key": "projects", "name": "Project", "type": "link", "link_to": "project" }, { "key": "people", "name": "People", "type": "link", "link_to": "person", "readonly": true, "multiple": true, "edges": true }, { "key": "unlock_password", "name": "File password", "type": "text", "shown_when": { "column": "status", "values": [ "locked" ] }, "presentation": "password" } ], "title": "title", "date": "document_date", "project": "projects", "order": null, "slip": { "title": "title", "subtitle": [ "doc_type", "issuer" ], "trailing": "document_date", "photo": null, "toggle": null, "title_fallback": "original_name", "edge": "receipt", "status": "state_message" }, "tile": { "face": "cover-grid" }, "page": [ { "heading": null, "columns": [ "title", "storage_path", "original_name", "status", "state_message" ] }, { "heading": "Facts", "columns": [ "facts", "doc_type", "statement_id", "issuer", "document_date", "period_start", "period_end", "page_count", "byte_size" ] }, { "heading": "Cotton’s reading", "columns": [ "summary" ] }, { "heading": "Pages", "columns": [ "pages_text" ] }, { "heading": "Password", "columns": [ "unlock_password", "secret_id" ] }, { "heading": "Source", "columns": [ "provenance", "source", "created_at", "projects" ] } ], "add": false, "seal": { "clear": [ "mime", "byte_size", "sha256", "storage_path", "page_count", "status", "failed_stage", "error_code", "status_changed_at", "doc_type", "document_date", "period_start", "period_end", "text_extracted", "source", "mcp_token_id", "secret_id", "trashed_at", "created_at", "statement_id", "projects", "people", "period_years" ], "blind": [ "title" ] }, "record_route": "/documents/document/[id]", "takes_files": true, "sort": { "column": "created_at", "descending": true }, "layout": "cards", "cover": { "footer": [ "type_line", "page_line", "state_message" ] }, "empty": { "title": "No documents yet.", "message": "Add a bill, a statement, an ID or a letter — its file, or a photograph of the paper." }, "create": { "label": "Add document", "path": "/documents/import" }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "document" } } ], "viewer": {}, "commands": [ { "id": "statement", "label": "Open", "kind": "open", "opens": "statement_id", "object": "open" }, { "id": "delete", "label": "Delete", "kind": "delete", "verb": "delete_record", "data": { "table": "document" }, "confirm": "Undo on the receipt brings it back.", "bindings": { "id": "$id" }, "when": { "statement_id": null }, "receipt": "Deleted", "does": "destroys", "object": "bin" } ], "instructions": "A document is a filed file, usually a PDF, with what was read from it: its kind, issuer, dates and a short summary. A locked document needs its password before it can be read, and that password is kept as a password record, never in the document. Use the dated day or the covered period exactly as printed; never guess them. Engine projection must omit protected page text and a drawable file reference while locked without a decrypted rendition. File replacement/upload invokes existing Rust document intake through the file-column editor. unlock_password is a write-only engine input; never project/store its plaintext in a document. Facts keeps all extracted amounts/account/people fields as readable labelled lines. period_years is a list of every covered year. Title retains original-name fallback; type_line waits for a ready, non-other classification.", "groups": { "stack": "covers" }, "card": { "face": "document", "fields": [ { "slot": "title", "column": "title" }, { "slot": "subtitle", "column": "type_line", "label": "label.document.file" }, { "slot": "count", "column": "page_count", "label": "label.document.pages" }, { "slot": "date", "column": "created_at", "form": "relative", "line": "field.received" }, { "slot": "source", "column": "issuer", "line": "field.issuer" }, { "slot": "span", "column": "period_start", "also": [ "period_end" ], "label": "label.document.period" }, { "slot": "amount", "column": "facts", "label": "label.document.amount", "at": "total_minor" }, { "slot": "expires", "column": "facts", "at": "expires_on" } ] }, "tool": { "views": [ { "id": "all", "label": "All", "visibility": "owner", "is_default": true, "read": { "table": "document" } } ], "name": "Documents", "purpose": "Your files and the information inside them.", "key": "documents", "icon": "file-text", "card_stock": "cream", "route": "/documents", "figures": [ { "read": "lockedDocuments", "one": "1 needs a password", "many": "{n} need a password" } ] }, "parts": { "shape": "desk", "head": { "facts": [] }, "links": [], "body": "facts", "lists": [], "acts": { "more": [ "statement" ], "away": "delete" }, "strip": [ { "column": "summary" }, { "column": "issuer" }, { "column": "document_date" }, { "column": "status", "when": { "column": "status", "values": [ "processing", "summarizing", "locked", "failed" ] } }, { "column": "state_message", "when": { "column": "status", "values": [ "processing", "summarizing", "locked", "failed" ] } }, { "column": "unlock_password" }, { "column": "period_start", "until": "period_end" } ] } }, { "format_version": 1, "tables": [], "id": "bin", "name": "Binned record", "plural": "Bin", "picture": { "photo": "photo:78ea5af271ac9c036a367d637ecb2c1f0e8bc7723056a3438454235fc63cdbf5", "object": "tool-bin" }, "builtin": true, "engine": "bin", "columns": [ { "key": "title", "type": "text", "readonly": true }, { "key": "table", "name": "Table", "type": "text", "readonly": true }, { "key": "kind", "name": "Kind", "type": "choice", "choices": [ "email", "email_thread", "secret", "note", "event", "photo", "video", "document", "message", "todo", "transaction", "group", "record", "database" ], "readonly": true, "labels": { "email": "Email", "email_thread": "Conversation", "secret": "Password", "note": "Note", "event": "Event", "photo": "Photo", "video": "Video", "document": "Document", "message": "Message", "todo": "Todo", "transaction": "Money row", "group": "Group", "record": "Record", "database": "Database" } }, { "key": "trashed_at", "name": "Binned", "type": "date", "readonly": true }, { "key": "state", "name": "State", "type": "choice", "choices": [ "binned", "restored", "database_binned" ], "readonly": true, "labels": { "binned": "Binned", "restored": "Restored", "database_binned": "Database binned" } }, { "key": "table_name", "name": "Kind", "type": "text", "readonly": true, "fact": true }, { "key": "title_at", "name": "Day", "type": "date", "readonly": true }, { "key": "removed_by", "name": "Removed by", "type": "text", "readonly": true, "fact": true, "reading": "removed by {value}" }, { "key": "creator_name", "name": "Deleted by", "type": "text", "readonly": true, "fact": true, "reading": "deleted by {value}" }, { "key": "binned_at", "name": "Binned on", "type": "date", "readonly": true, "fact": true, "reading": "binned {date}" }, { "key": "kept_until", "name": "Kept until", "type": "date", "readonly": true, "fact": true, "reading": "kept until {date}" }, { "key": "can_restore", "name": "Can restore", "type": "bool", "readonly": true }, { "key": "database_id", "name": "Database", "type": "text", "readonly": true } ], "title": "title", "voice_words": [], "date": "trashed_at", "project": null, "order": null, "slip": { "title": "title", "subtitle": [ "table_name", "removed_by", "creator_name" ], "trailing": null, "photo": null, "toggle": null, "title_fallback": "title_at", "caption": { "dates": [ "trashed_at" ] }, "answers": { "column": "state", "values": { "restored": "Restore" }, "when": [ "binned" ], "leaves": false } }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "title", "removed_by", "creator_name", "trashed_at", "kept_until" ], "answers": { "column": "state", "values": { "restored": "Restore" }, "when": [ "binned" ] } } ], "binned": { "from": "table", "restore": { "state": "restored" } }, "sort": { "column": "trashed_at", "descending": true }, "group": { "column": "kind", "sections": [ { "heading": "Emails", "values": [ "email" ] }, { "heading": "Conversations", "values": [ "email_thread" ] }, { "heading": "Passwords", "values": [ "secret" ] }, { "heading": "Notes", "values": [ "note" ] }, { "heading": "Calendar", "values": [ "event" ] }, { "heading": "Photos", "values": [ "photo" ] }, { "heading": "Videos", "values": [ "video" ] }, { "heading": "Documents", "values": [ "document" ] }, { "heading": "Messages", "values": [ "message" ] }, { "heading": "Todos", "values": [ "todo" ] }, { "heading": "Money", "values": [ "transaction" ] }, { "heading": "Groups", "values": [ "group" ] }, { "heading": "Records", "values": [ "record" ] }, { "heading": "Databases", "values": [ "database" ] } ] }, "dimmed": { "column": "state", "values": [ "binned" ] }, "empty": { "title": "The bin is empty", "message": "Records wait here until you restore or erase them. Database files and their media are kept for 30 days; only their creator can restore them." }, "search": [ "title" ], "delete_when": { "column": "state", "values": [ "binned" ] }, "count_words": { "column": "state", "units": { "binned": { "one": "item", "other": "items" }, "database_binned": { "one": "database", "other": "databases" } } }, "deletion": { "undo": false, "confirm": "Delete forever", "label": "Delete forever" }, "commands": [ { "id": "delete", "label": "Delete forever", "kind": "delete", "verb": "delete_record", "data": { "table": "bin" }, "confirm": "It is erased for good and cannot come back.", "bindings": { "id": "$id" }, "when": { "state": "binned" }, "receipt": "Erased", "does": "destroys", "object": "bin" }, { "id": "restore_database", "label": "Restore", "kind": "update", "method": "databases.restore", "bindings": { "databaseId": "database_id" }, "when": { "can_restore": true }, "receipt": "Restored", "object": "folder" } ], "clear": { "label": "Empty the bin", "title": "Empty the bin?", "message": "This erases Cotton's copy of all {count} — it cannot be undone. Your mail provider keeps its own bin, so mail you binned is still there until they clear it.", "confirm": "Empty", "done": "Bin emptied" }, "instructions": "The one bin holds deleted records until they are restored or the bin is emptied, including money rows entered by hand. Restoring sets state to restored (restore_from_bin); deleting a row erases that record for good, and only the owner's Empty the bin does that. Database rows use state database_binned: only the creator may restore before 30 days; removed members cannot restore. A phone removed from a shared database lists that database here with removed_by (who removed it) in place of creator_name; it is hidden everywhere else, and only a new invitation brings it back, as a fresh copy. Database files and media are purged after 30 days, through the same retention path as removed copies. They cannot be erased early by Empty the bin.", "card": { "face": "plain", "fields": [ { "slot": "title", "column": "title" }, { "slot": "subtitle", "column": "table_name" }, { "slot": "facts", "column": "kind", "also": [ "trashed_at", "removed_by", "creator_name", "kept_until" ] } ] }, "tool": { "views": [ { "id": "all", "label": "All", "visibility": "owner", "is_default": true, "read": { "table": "bin" } } ], "name": "Bin", "purpose": "Deleted records you can restore or remove.", "key": "bin", "icon": "trash-2", "card_stock": "grey", "route": "/bin" }, "parts": { "shape": "sheet", "head": { "facts": [ "removed_by", "creator_name", "binned_at", "kept_until" ] }, "links": [], "lists": [], "acts": { "more": [ "restore_database" ], "away": "delete" }, "cards": [] } }, { "format_version": 1, "tables": [], "id": "board", "name": "Board", "plural": "Boards", "picture": null, "builtin": true, "engine": "boards", "columns": [ { "key": "name", "name": "Screen", "type": "text", "required": true, "readonly": true }, { "key": "definition", "name": "Board", "type": "longtext", "required": true }, { "key": "drawn", "name": "Drawn from", "type": "choice", "choices": [ "yours", "default" ], "readonly": true, "labels": { "yours": "This database's own board", "default": "The board this build ships" } } ], "title": "name", "voice_words": [], "date": null, "project": null, "order": null, "slip": { "title": "name", "subtitle": "drawn", "trailing": null, "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "name", "drawn", "definition" ] } ], "add": false, "empty": { "title": "No boards" }, "delete_when": { "column": "drawn", "values": [ "yours" ] }, "deletion": { "undo": false, "confirm": "Put back the default", "label": "Put back the default" }, "instructions": "A board is what one screen of the app draws, and in what order: home is Home, tools is the Tools screen, database is the database page. Each record's id is the screen's board id and its definition is the board as JSON — {\"id\": , \"parts\": [...]} with parts of the kinds head, notices, tools, asked, done, list, facts and about — exactly the shape get_record_by_table answers. To change a screen, update its record's definition with the whole board; the app draws it on the next sync with no new build. A definition this build cannot draw (unknown keys, an unknown part, a bad value) is refused and nothing is saved, and there are no boards beyond these three: a new id is refused. drawn says whether a screen shows this database's own board or the one the build ships; delete_record on a board that is this database's own puts the shipped one back (the board it replaced stays in the change's before), and a board that is already the shipped one is never deleted.", "card": { "face": "plain", "fields": [ { "slot": "title", "column": "name" }, { "slot": "subtitle", "column": "drawn" } ] } }, { "format_version": 1, "tables": [], "id": "theme", "name": "Theme", "plural": "Themes", "picture": null, "builtin": true, "engine": "themes", "columns": [ { "key": "name", "name": "Theme", "type": "text", "required": true, "readonly": true }, { "key": "definition", "name": "Definition", "type": "longtext", "required": true }, { "key": "drawn", "name": "Drawn from", "type": "choice", "choices": [ "yours", "default" ], "readonly": true, "labels": { "yours": "This database's own theme", "default": "The theme this build ships" } }, { "key": "worn", "name": "Worn", "type": "bool", "readonly": true } ], "title": "name", "voice_words": [], "date": null, "project": null, "order": null, "slip": { "title": "name", "subtitle": "drawn", "trailing": null, "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "name", "worn", "drawn", "definition" ] } ], "add": false, "empty": { "title": "No themes" }, "delete_when": { "column": "drawn", "values": [ "yours" ] }, "deletion": { "undo": false, "confirm": "Put back the default", "label": "Put back the default" }, "instructions": "A theme is how the app looks in this database: its family (paper or plain), the cap's colour and what it lays over the family. The records are the themes this database can hold — paper and plain as this build ships them, and database, its own theme, the one the cap's colour is written on — each with its definition as JSON, exactly the shape get_record_by_table answers, and worn on the one the database wears now. To change how the database looks, update a theme's definition with the whole theme (its id the record's id); the newest theme this database wrote is the one it wears, from the next sync, with no new build. A definition this build cannot draw (a family it does not ship, an unknown key, a colour that is not one) is refused and nothing is saved; no theme is created beyond these. delete_record on a theme that is this database's own puts the default back (the theme it replaced stays in the change's before); a theme that is already the default is never deleted.", "card": { "face": "plain", "fields": [ { "slot": "title", "column": "name" }, { "slot": "subtitle", "column": "drawn" }, { "slot": "facts", "column": "worn" } ] } }, { "format_version": 1, "tables": [], "id": "backup", "name": "Backup", "plural": "Backups", "picture": null, "builtin": true, "engine": "backup", "columns": [ { "key": "state", "name": "Daily copy", "type": "choice", "choices": [ "ok", "stale", "no disk" ], "readonly": true, "labels": { "ok": "Copied today", "stale": "No recent copy", "no disk": "No backup disk" } }, { "key": "last_at", "name": "Newest copy", "type": "date", "readonly": true, "fact": true, "reading": "copied {value}", "format": "calendar-datetime" }, { "key": "kept", "name": "Copies kept", "type": "number", "readonly": true }, { "key": "last_error", "name": "What went wrong", "type": "longtext", "readonly": true } ], "title": "state", "voice_words": [], "date": null, "project": null, "order": null, "slip": { "title": "state", "subtitle": [ "last_error" ], "trailing": null, "photo": null, "toggle": null, "caption": { "dates": [], "fields": [ "last_at" ] } }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "state", "last_at", "kept", "last_error" ] } ], "add": false, "empty": { "title": "No backup to show", "message": "The Mac that serves your databases answers this page. When its backup disk is attached, each database's daily copy shows here." }, "delete": false, "instructions": "One row per database the serving Mac copies to its backup disk each day, read from that Mac each time the page opens: whether the newest daily copy is recent, when it was made, how many copies the disk keeps, and what went wrong when a copy is missing. Nothing here is stored or edited.", "card": { "face": "plain", "fields": [ { "slot": "title", "column": "state" }, { "slot": "body", "column": "last_error" }, { "slot": "facts", "column": "last_at", "also": [ "kept" ] } ] }, "parts": { "shape": "sheet", "head": { "facts": [ "last_at" ] }, "links": [], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "last_error", "width": "full", "when": { "column": "last_error", "present": true } }, { "column": "kept" } ] } }, { "format_version": 1, "tables": [], "id": "lines", "name": "Line", "plural": "Lines", "picture": null, "builtin": true, "engine": null, "columns": [ { "key": "set", "name": "Set", "type": "text", "required": true, "readonly": true }, { "key": "line", "name": "Line", "type": "text", "required": true, "readonly": true }, { "key": "words", "name": "Words", "type": "text", "required": true } ], "title": "words", "voice_words": [], "date": null, "project": null, "order": null, "slip": { "title": "words", "subtitle": "line", "trailing": null, "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "set", "line", "words" ] } ], "add": false, "empty": { "title": "No lines" }, "delete": false, "instructions": "A line is one sentence the app says in its own voice — where sync stands, how long ago, how big — with its blanks in braces ({with}, {n}, {at}) filled when it is said. Each record is one line of one set (sync), at its place in the set (lines.up_to_date, ages.now); its id is set.line. Rewording a line here changes what every device in this database says from the next sync, with no new build; keep the braces it has. A database made before its lines were written says this build's own words until they are.", "card": { "face": "plain", "fields": [ { "slot": "title", "column": "words" }, { "slot": "subtitle", "column": "line" }, { "slot": "facts", "column": "set" } ] } }, { "format_version": 1, "tables": [], "id": "device", "name": "Device", "plural": "Devices", "picture": { "photo": "photo:d89f5c6c461b0d34c508c61f19091f0cd821288143a2598e0c5b8ac6e3d06e18", "object": "tool-devices" }, "builtin": true, "engine": "devices", "live_read": { "method": "device.facts", "bindings": { "deviceId": "$id" }, "fields": [ "build", "schema", "last_answer", "serving_order", "unreachable_since", "host_answered_by", "backup", "backup_why", "backup_answered_by", "refusal", "refusal_clearable", "last_synced", "ambient", "changes_waiting", "waiting_since", "sync_trouble", "sync_background", "coming", "search_index", "has_server", "backups", "failed_files", "notifications", "notifications_permission", "keeps_answered_by", "reach_answered_by", "sessions_running", "sessions", "theme_change_id", "theme_undo_available", "theme_changed_at", "bytes_wanted", "notify_system", "receipts_behind", "receipts_to_send", "fetch_count", "fetch_bytes", "upload_count", "upload_bytes", "last_contact", "serving_mac", "received_since_open", "sync_tables", "sync_table_progress", "synced_at", "sync_rows_done", "sync_rows_total", "sync_bytes", "caught_up", "stalled_at", "stalled_why" ] }, "columns": [ { "key": "removal_state", "name": "Removal", "type": "choice", "choices": [ "waiting" ], "readonly": true, "fact": false, "reading": "{value}", "labels": { "waiting": "removal waiting for your Mac" } }, { "key": "has_access", "name": "Access", "type": "bool", "readonly": true, "fact": false }, { "key": "can_serve", "name": "Can serve", "type": "bool", "readonly": true, "fact": false }, { "key": "name", "name": "Name", "type": "text", "required": true, "fact": false }, { "key": "state", "name": "State", "type": "text", "readonly": true, "fact": false }, { "key": "build", "name": "Build", "type": "text", "readonly": true, "live": true, "fact": false }, { "key": "schema", "name": "Schema", "type": "text", "readonly": true, "live": true, "fact": false, "reading": "schema {value}", "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "last_answer", "name": "Last answer", "type": "text", "readonly": true, "live": true, "fact": false }, { "key": "serving_order", "name": "Serving order", "type": "text", "readonly": true, "live": true, "fact": false }, { "key": "unreachable_since", "name": "Unreachable since", "type": "date", "readonly": true, "live": true, "fact": false }, { "key": "placement_problems", "name": "Passwords", "type": "longtext", "readonly": true, "fact": false }, { "key": "ai_spend_line", "name": "Claude API today", "type": "text", "readonly": true, "fact": false }, { "key": "reported_state_lines", "name": "Reported", "type": "longtext", "readonly": true, "fact": false }, { "key": "kind", "name": "Kind", "type": "choice", "choices": [ "iPhone", "Android", "Mac", "Linux" ], "readonly": true, "fact": true, "reading": "{value}", "objects": { "iPhone": "phone", "Android": "phone", "Mac": "mac", "Linux": "linux" }, "labels": { "iPhone": "iPhone", "Android": "Android", "Mac": "Mac", "Linux": "Linux" } }, { "key": "platform", "name": "Platform", "type": "text", "readonly": true, "fact": true, "reading": "{value}", "labels": { "ios": "iPhone", "iphone": "iPhone", "ipad": "iPad", "ipados": "iPad", "mac": "Mac", "macos": "Mac", "android": "Android", "linux": "Linux", "windows": "Windows" } }, { "key": "machine", "name": "Runs the server", "type": "text", "readonly": true, "fact": false }, { "key": "asked_at", "name": "Asked", "type": "date", "readonly": true, "fact": false, "shown_when": { "column": "status", "values": [ "waiting" ] } }, { "key": "approved_at", "name": "Paired", "type": "date", "readonly": true, "fact": true, "reading": "joined {value}", "format": "calendar-datetime" }, { "key": "approved_by_device", "name": "Approved by", "type": "text", "readonly": true, "fact": true, "reading": "approved by {value}", "fact_join": ", " }, { "key": "revoked_at", "name": "Revoked", "type": "date", "readonly": true, "fact": false, "shown_when": { "column": "status", "values": [ "revoked", "erased" ] } }, { "key": "revoked_reason", "name": "Revoked because", "type": "text", "readonly": true, "fact": false, "shown_when": { "column": "status", "values": [ "revoked", "erased" ] } }, { "key": "serving_rank", "name": "Serving rank", "type": "number", "readonly": true, "fact": false }, { "key": "serving_place", "name": "Serving order", "type": "text", "readonly": true, "fact": false, "shown_when": { "column": "machine", "values": [ "yes" ] } }, { "key": "sessions_cap", "name": "Session limit", "type": "number", "fact": false, "units": { "one": "session", "other": "sessions" }, "shown_when": { "column": "status", "values": [ "this device", "approved" ] } }, { "key": "ai_day_cap_usd", "name": "API cap per day", "type": "number", "fact": false, "units": { "one": "USD", "other": "USD" }, "shown_when": { "column": "status", "values": [ "this device", "approved" ] } }, { "key": "chip", "name": "Chip", "type": "text", "readonly": true, "fact": true, "reading": "{value}", "shown_when": { "column": "status", "values": [ "approved" ] } }, { "key": "cpu_count", "name": "Processor", "type": "number", "readonly": true, "fact": true, "reading": "{value} cpus", "fact_join": ", ", "units": { "one": "CPU", "other": "CPUs" }, "shown_when": { "column": "status", "values": [ "approved" ] } }, { "key": "mem_total_gb", "name": "Memory", "type": "number", "readonly": true, "fact": true, "reading": "{value} GB", "fact_join": ", ", "units": { "one": "GB", "other": "GB" }, "shown_when": { "column": "status", "values": [ "approved" ] } }, { "key": "disk_total_gb", "name": "Disk", "type": "number", "readonly": true, "fact": false, "units": { "one": "GB", "other": "GB" } }, { "key": "os_version", "name": "OS version", "type": "text", "readonly": true, "fact": true, "reading": "{value}", "shown_when": { "column": "status", "values": [ "approved" ] } }, { "key": "update_hold", "name": "Update hold", "type": "text", "readonly": true, "fact": false }, { "key": "load", "name": "Free disk", "type": "text", "readonly": true, "fact": false, "format": "counted-pair", "shown_when": { "column": "machine", "values": [ "yes" ] } }, { "key": "load_1", "name": "Load", "type": "number", "readonly": true, "fact": false, "shown_when": { "column": "machine", "values": [ "yes" ] } }, { "key": "mem_free_pct", "name": "Memory free", "type": "number", "readonly": true, "fact": false, "shown_when": { "column": "machine", "values": [ "yes" ] } }, { "key": "mem_committed_gb", "name": "Committed", "type": "number", "readonly": true, "fact": false, "units": { "one": "GB", "other": "GB" }, "shown_when": { "column": "machine", "values": [ "yes" ] } }, { "key": "mem_budget_gb", "name": "Memory budget", "type": "number", "readonly": true, "fact": false, "units": { "one": "GB", "other": "GB" }, "shown_when": { "column": "machine", "values": [ "yes" ] } }, { "key": "disk_free_gb", "name": "Disk free", "type": "number", "readonly": true, "fact": false, "units": { "one": "GB", "other": "GB" }, "shown_when": { "column": "machine", "values": [ "yes" ] } }, { "key": "sessions_running", "name": "Sessions running", "type": "number", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "smooth_scrolling", "name": "Smooth scrolling", "type": "number", "readonly": true, "fact": false, "units": { "one": "%", "other": "%" } }, { "key": "hangs_today", "name": "Hangs today", "type": "number", "readonly": true, "fact": false }, { "key": "cpu_time_today", "name": "CPU time today", "type": "number", "readonly": true, "fact": false, "units": { "one": "s", "other": "s" }, "format": "duration" }, { "key": "peak_memory", "name": "Peak memory", "type": "number", "readonly": true, "fact": false, "format": "bytes" }, { "key": "sampled_at", "name": "Last reading", "type": "date", "readonly": true, "fact": false, "shown_when": { "column": "machine", "values": [ "yes" ] } }, { "key": "app_version", "name": "App version", "type": "text", "readonly": true, "fact": false }, { "key": "host_version", "name": "Server version", "type": "text", "readonly": true, "fact": false }, { "key": "host_answered_by", "name": "Settings said by", "type": "text", "readonly": true, "live": true, "fact": false }, { "key": "backup_answered_by", "name": "Backup said by", "type": "text", "readonly": true, "live": true, "fact": false }, { "key": "backup", "name": "Backup", "type": "text", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "backup_answered_by", "values": [ "this mac", "serving mac" ] } }, { "key": "backup_why", "name": "Why", "type": "text", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "backup_answered_by", "values": [ "this mac", "serving mac" ] } }, { "key": "session", "name": "Signed in", "type": "choice", "choices": [ "signed_in", "signed_out", "local" ], "readonly": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "samples", "name": "Sample records", "type": "choice", "choices": [ "offered" ], "readonly": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "devices_route", "name": "All devices", "type": "url", "readonly": true, "fact": false }, { "key": "media_backup", "name": "Photos and files", "type": "text", "readonly": true, "fact": false, "shown_when": { "column": "backup_answered_by", "values": [ "this mac", "serving mac" ] } }, { "key": "push", "name": "Push", "type": "text", "readonly": true, "fact": true, "reading": "{value}", "shown_when": { "column": "status", "values": [ "approved" ] } }, { "key": "start_at_login", "name": "Start at login", "type": "bool", "live": true, "fact": false, "shown_when": { "column": "host_answered_by", "values": [ "this mac" ] } }, { "key": "stay_awake", "name": "Stay awake", "type": "bool", "live": true, "fact": false, "shown_when": { "column": "host_answered_by", "values": [ "this mac" ] } }, { "key": "error_reports", "name": "Error reports", "type": "bool", "live": true, "fact": false, "shown_when": { "column": "host_answered_by", "values": [ "this mac" ] } }, { "key": "auto_updates", "name": "Updates", "type": "bool", "live": true, "fact": false, "shown_when": { "column": "host_answered_by", "values": [ "this mac" ] } }, { "key": "error_reports_to", "name": "Error reports go to", "type": "text", "live": true, "fact": false, "shown_when": { "column": "host_answered_by", "values": [ "this mac" ] } }, { "key": "update_feed", "name": "Updates come from", "type": "text", "live": true, "fact": false, "shown_when": { "column": "host_answered_by", "values": [ "this mac" ] } }, { "key": "reach_answered_by", "name": "How it is reached said by", "type": "text", "readonly": true, "live": true, "fact": false }, { "key": "reached_through", "name": "Reached through", "type": "choice", "choices": [ "cotton_relay", "own_relay", "tailscale_funnel", "direct" ], "live": true, "fact": false, "shown_when": { "column": "reach_answered_by", "values": [ "household" ] }, "labels": { "cotton_relay": "Cotton relay", "own_relay": "Your own relay", "tailscale_funnel": "Tailscale Funnel", "direct": "Direct" } }, { "key": "keeps_answered_by", "name": "What it keeps said by", "type": "text", "readonly": true, "live": true, "fact": false }, { "key": "keep_mail", "name": "Mail", "type": "choice", "choices": [ "all", "days:30", "days:90", "days:365", "none" ], "live": true, "fact": false, "placeholder": "Cotton's default", "shown_when": { "column": "keeps_answered_by", "values": [ "phone" ] }, "labels": { "all": "Everything", "days:30": "1 month", "days:90": "3 months", "days:365": "1 year", "none": "Never" } }, { "key": "keep_statuses", "name": "Statuses", "type": "choice", "choices": [ "all", "days:30", "days:90", "days:365", "none" ], "live": true, "fact": false, "placeholder": "Cotton's default", "shown_when": { "column": "keeps_answered_by", "values": [ "phone" ] }, "labels": { "all": "Everything", "days:30": "1 month", "days:90": "3 months", "days:365": "1 year", "none": "Never" } }, { "key": "keep_files_whatsapp", "name": "WhatsApp media", "type": "choice", "required": true, "choices": [ "all", "recent_90_days", "only_opened" ], "live": true, "fact": false, "shown_when": { "column": "keeps_answered_by", "values": [ "phone" ] }, "labels": { "all": "Everything", "recent_90_days": "Last 3 months", "only_opened": "Only what I open" } }, { "key": "keep_files_instagram", "name": "Instagram media", "type": "choice", "required": true, "choices": [ "all", "recent_90_days", "only_opened" ], "live": true, "fact": false, "shown_when": { "column": "keeps_answered_by", "values": [ "phone" ] }, "labels": { "all": "Everything", "recent_90_days": "Last 3 months", "only_opened": "Only what I open" } }, { "key": "keep_files_photo", "name": "Photos", "type": "choice", "required": true, "choices": [ "all", "recent_90_days", "only_opened" ], "live": true, "fact": false, "shown_when": { "column": "keeps_answered_by", "values": [ "phone" ] }, "labels": { "all": "Everything", "recent_90_days": "Last 3 months", "only_opened": "Only what I open" } }, { "key": "keep_files_video", "name": "Videos", "type": "choice", "required": true, "choices": [ "all", "recent_90_days", "only_opened" ], "live": true, "fact": false, "shown_when": { "column": "keeps_answered_by", "values": [ "phone" ] }, "labels": { "all": "Everything", "recent_90_days": "Last 3 months", "only_opened": "Only what I open" } }, { "key": "keep_files_document", "name": "Documents", "type": "choice", "required": true, "choices": [ "all", "recent_90_days", "only_opened" ], "live": true, "fact": false, "shown_when": { "column": "keeps_answered_by", "values": [ "phone" ] }, "labels": { "all": "Everything", "recent_90_days": "Last 3 months", "only_opened": "Only what I open" } }, { "key": "kept_space_bytes", "name": "Space for kept things", "type": "choice", "required": true, "choices": [ "1000000000", "2000000000", "5000000000", "10000000000", "none" ], "live": true, "fact": false, "shown_when": { "column": "keeps_answered_by", "values": [ "phone" ] }, "labels": { "1000000000": "1 GB", "2000000000": "2 GB", "5000000000": "5 GB", "10000000000": "10 GB", "none": "No limit" } }, { "key": "keep_fetch_full", "name": "Kept things", "type": "text", "readonly": true, "fact": false, "shown_when": { "column": "keeps_answered_by", "values": [ "phone" ] } }, { "key": "keep_fetch_coming", "name": "Kept on this phone", "type": "longtext", "readonly": true, "fact": false, "shown_when": { "column": "keeps_answered_by", "values": [ "phone" ] } }, { "key": "keep_always", "name": "Always", "type": "longtext", "readonly": true, "fact": false, "shown_when": { "column": "keeps_answered_by", "values": [ "phone" ] } }, { "key": "keep_bytes", "name": "Files", "type": "choice", "required": true, "choices": [ "everything", "rows_only" ], "fact": false, "toggle_on": [ "everything" ], "placeholder": "Set tool by tool in Storage", "hints": { "everything": "Keep files and rows on this Mac.", "rows_only": "No files are kept on this Mac; rows only." }, "shown_when": { "column": "keeps_answered_by", "values": [ "mac" ] }, "labels": { "everything": "Everything", "rows_only": "Rows only" }, "default": "everything" }, { "key": "runner_ordered_at", "name": "Runner ordered", "type": "date", "readonly": true, "fact": false }, { "key": "runner_confirmed_at", "name": "Runner confirmed", "type": "date", "readonly": true, "fact": false }, { "key": "runner_problem", "name": "Runner owed", "type": "longtext", "readonly": true, "fact": false }, { "key": "runner_confirm", "name": "Serving Mac copy", "type": "choice", "choices": [ "waiting", "short", "confirmed" ], "readonly": true, "fact": false, "labels": { "waiting": "Waiting for the serving Mac", "short": "Still owed changes or files", "confirmed": "Confirmed" } }, { "key": "runner_drop", "name": "Drop copy and pair", "type": "choice", "choices": [ "waiting", "done" ], "readonly": true, "fact": false, "labels": { "waiting": "Waiting", "done": "Copies and backup identity dropped; paired as a runner" } }, { "key": "keep_bytes_note", "name": "While serving", "type": "text", "readonly": true, "fact": false, "shown_when": { "column": "keeps_answered_by", "values": [ "mac" ] } }, { "key": "status", "name": "Status", "type": "choice", "choices": [ "waiting", "this device", "approved", "revoked", "erased" ], "readonly": true, "fact": false, "labels": { "waiting": "Waiting", "this device": "This device", "approved": "Approved", "revoked": "Revoked", "erased": "Erased" } }, { "key": "digits", "name": "Code", "type": "text", "readonly": true, "fact": false, "shown_when": { "column": "status", "values": [ "waiting" ] } }, { "key": "rekey", "name": "Re-key", "type": "choice", "choices": [ "asking", "waiting", "finishing", "failed" ], "readonly": true, "fact": false, "labels": { "asking": "Asking for approval", "waiting": "Waiting for approval", "finishing": "Approved, switching to the new key", "failed": "Not approved; the current key is still in use" } }, { "key": "rekey_digits", "name": "Code to approve", "type": "text", "readonly": true, "fact": false, "shown_when": { "column": "rekey", "values": [ "waiting" ] } }, { "key": "rekeyed_at", "name": "Re-keyed", "type": "date", "readonly": true, "fact": true, "reading": "re-keyed {value}", "format": "calendar-datetime" }, { "key": "last_seen_at", "name": "Last seen", "type": "date", "readonly": true, "fact": true, "reading": "{value}", "format": "calendar-datetime" }, { "key": "refusal", "name": "Not serving", "type": "text", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "refusal_clearable", "name": "Can serve again", "type": "bool", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "ambient", "name": "Sync", "type": "choice", "choices": [ "up_to_date", "waiting_for_mac", "alone", "alone_ios", "alone_android", "alone_mac", "alone_linux" ], "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] }, "labels": { "up_to_date": "Up to date", "waiting_for_mac": "Mac not heard yet", "alone": "On this device only", "alone_ios": "On this iPhone only", "alone_android": "On this phone only", "alone_mac": "On this Mac only", "alone_linux": "On this computer only" } }, { "key": "mac_heard_at", "name": "Mac heard", "type": "date", "readonly": true, "live": true, "fact": false, "units": { "one": "Mac heard {n}", "other": "Mac heard {n}" }, "format": "ago", "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "changes_waiting", "name": "Waiting to send", "type": "number", "readonly": true, "live": true, "fact": false, "units": { "one": "1 change waiting to send", "other": "{n} changes waiting to send" }, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "waiting_since", "name": "Mac not heard since", "type": "date", "readonly": true, "live": true, "fact": false, "reading": "Mac not heard since {datetime}", "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "last_synced", "name": "Synced", "type": "date", "readonly": true, "live": true, "fact": false, "units": { "one": "synced {n}", "other": "synced {n}" }, "format": "ago", "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "sync_trouble", "name": "Last try", "type": "text", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "sync_background", "name": "In the background", "type": "text", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "coming", "name": "Coming", "type": "longtext", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "search_index", "name": "Search index", "type": "text", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "has_server", "name": "Has a server", "type": "bool", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "backups", "name": "Backups", "type": "text", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "failed_files", "name": "Not backed up", "type": "longtext", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "notifications", "name": "Notifications", "type": "text", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "notifications_permission", "name": "Allowed by the system", "type": "choice", "choices": [ "granted", "denied", "undetermined" ], "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "notify_system", "name": "Notifications", "type": "choice", "choices": [ "on", "declined" ], "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] }, "labels": { "on": "On", "declined": "Declined in Settings" } }, { "key": "push_authorization", "name": "Notifications reported", "type": "text", "readonly": true, "fact": false }, { "key": "notifications_off", "name": "Notifications off", "type": "text", "readonly": true, "fact": false, "shown_when": { "column": "push_authorization", "values": [ "denied" ] } }, { "key": "notify", "name": "Notifications", "type": "bool", "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "notify_reminders", "name": "Todo reminders", "type": "bool", "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "notify_events", "name": "Events", "type": "bool", "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "notify_birthdays", "name": "Birthdays", "type": "bool", "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "notify_alarms", "name": "Alarms", "type": "bool", "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "sessions", "name": "Sessions", "type": "text", "readonly": true, "live": true, "fact": false, "format": "counted-pair", "shown_when": { "column": "status", "values": [ "this device", "approved" ] } }, { "key": "takes_placements", "name": "Takes placements", "type": "bool", "required": true, "fact": false, "default": false }, { "key": "keep_free_bytes", "name": "Keep free", "type": "bytes", "fact": false, "placeholder": "15% of the disk" }, { "key": "keep_free_percent", "name": "Keep free", "type": "number", "readonly": true, "fact": false, "units": { "one": "keeps {n} % of the disk free · {keep_free_size}", "other": "keeps {n} % of the disk free · {keep_free_size}" } }, { "key": "keep_free_size", "name": "Kept free", "type": "text", "readonly": true, "fact": false }, { "key": "theme_change_id", "name": "Last theme change", "type": "text", "readonly": true, "live": true, "fact": false }, { "key": "theme_undo_available", "name": "Theme can be undone", "type": "bool", "readonly": true, "live": true, "fact": false }, { "key": "theme_changed_at", "name": "Theme changed", "type": "date", "readonly": true, "live": true, "fact": true, "reading": "theme changed {value}", "format": "calendar-datetime" }, { "key": "bytes_wanted", "name": "Still to fetch", "type": "bytes", "readonly": true, "live": true, "fact": true }, { "key": "held_until", "name": "AI paused until", "type": "date", "readonly": true, "fact": false, "reading": "Paused until {datetime}", "format": "calendar-datetime" }, { "key": "hold_reason", "name": "AI pause reason", "type": "choice", "choices": [ "anthropic_credits" ], "readonly": true, "fact": false, "labels": { "anthropic_credits": "Anthropic credits" } }, { "key": "receipts_behind", "name": "To receive", "type": "number", "readonly": true, "live": true, "fact": false, "units": { "one": "1 change to receive", "other": "{n} changes to receive" }, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "receipts_to_send", "name": "To send", "type": "number", "readonly": true, "live": true, "fact": false, "units": { "one": "1 change to send", "other": "{n} changes to send" }, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "fetch_count", "name": "Files to fetch", "type": "number", "readonly": true, "live": true, "fact": false, "units": { "one": "1 file to fetch", "other": "{n} files to fetch" }, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "fetch_bytes", "name": "Bytes to fetch", "type": "bytes", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "upload_count", "name": "Files to send", "type": "number", "readonly": true, "live": true, "fact": false, "units": { "one": "1 file to send", "other": "{n} files to send" }, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "upload_bytes", "name": "Bytes to send", "type": "bytes", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "last_contact", "name": "Last contact", "type": "date", "readonly": true, "live": true, "fact": false, "format": "ago", "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "serving_mac", "name": "Serving Mac", "type": "text", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "received_since_open", "name": "Received since open", "type": "longtext", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "sync_tables", "name": "Tables", "type": "longtext", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "sync_table_progress", "name": "Moving", "type": "longtext", "readonly": true, "live": true, "fact": false }, { "key": "synced_at", "name": "Synced at", "type": "date", "readonly": true, "live": true, "fact": true, "reading": "{value}", "format": "calendar-datetime", "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "sync_rows_done", "name": "Sync rows done", "type": "number", "readonly": true, "live": true, "fact": true, "reading": "{value} rows", "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "sync_rows_total", "name": "Sync rows total", "type": "number", "readonly": true, "live": true, "fact": true, "reading": "{value} rows", "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "sync_bytes", "name": "Sync bytes", "type": "bytes", "readonly": true, "live": true, "fact": true, "reading": "{value}", "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "caught_up", "name": "Caught up", "type": "bool", "readonly": true, "live": true, "fact": false, "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "stalled_at", "name": "Stalled at", "type": "date", "readonly": true, "live": true, "fact": true, "reading": "{value}", "format": "calendar-datetime", "shown_when": { "column": "status", "values": [ "this device" ] } }, { "key": "stalled_why", "name": "Why it stalled", "type": "text", "readonly": true, "live": true, "fact": true, "reading": "{value}", "shown_when": { "column": "status", "values": [ "this device" ] } } ], "title": "name", "voice_words": [], "date": null, "project": null, "order": null, "slip": { "title": "name", "with_names": false, "subtitle": [ "removal_state", "last_synced", "ambient", "mac_heard_at", "changes_waiting", "waiting_since", "held_until", "hold_reason", "placement_problems", "load" ], "trailing": null, "photo": null, "toggle": null, "caption": { "status": "state", "dates": [ "last_seen_at" ] } }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "removal_state", "held_until", "hold_reason", "ai_spend_line", "reported_state_lines", "placement_problems", "refusal", "ambient", "changes_waiting", "waiting_since", "last_synced", "sync_trouble", "sync_background", "search_index", "push", "backups", "failed_files", "bytes_wanted" ] }, { "heading": "What is coming", "columns": [ "coming", "keep_fetch_coming" ] }, { "heading": "Notifications", "columns": [ "notifications_off", "notifications", "notify", "notify_reminders", "notify_events", "notify_birthdays", "notify_alarms" ] }, { "heading": "What this Mac keeps", "columns": [ "keep_bytes", "keep_bytes_note" ] }, { "heading": "What this phone keeps", "columns": [ "keep_mail", "keep_statuses", "keep_files_whatsapp", "keep_files_instagram", "keep_files_photo", "keep_files_video", "keep_files_document", "kept_space_bytes", "keep_fetch_full", "keep_always" ] }, { "heading": "Identity and trust", "columns": [ "name", "digits", "asked_at", "approved_at", "rekeyed_at", "rekey", "rekey_digits", "approved_by_device", "revoked_at", "revoked_reason", "last_seen_at" ] }, { "heading": "Role", "columns": [ "serving_place", "sessions_cap", "ai_day_cap_usd", "backup", "backup_why", "media_backup" ] }, { "heading": "How the world reaches this household", "columns": [ "reached_through" ] }, { "heading": "This Mac", "columns": [ "start_at_login", "stay_awake", "error_reports", "error_reports_to", "auto_updates", "update_feed" ] }, { "heading": "How it is doing", "columns": [ "load_1", "sessions_running", "smooth_scrolling", "hangs_today", "cpu_time_today", "peak_memory" ] }, { "heading": "Capacity", "columns": [ "chip", "cpu_count", "mem_total_gb", "os_version", "update_hold", "keep_free_bytes" ] } ], "add": false, "list_route": "/devices", "setup": true, "screen_family": "devices", "polled": true, "group": { "column": "status", "sections": [ { "heading": "Asking to join", "values": [ "waiting" ], "note": "A new device joins by typing this database's name, then comparing six digits here." }, { "heading": "Joined", "values": [ "this device", "approved" ] }, { "heading": "Removed", "values": [ "revoked", "erased" ], "closed": true } ] }, "delete": false, "commands": [ { "id": "serve_from", "label": "Serve from this Mac", "kind": "update", "method": "device.serveFrom", "destructive": true, "confirm": "This Mac takes over serving this database.", "bindings": { "deviceId": "$id" }, "when": { "kind": "Mac", "status": "approved" }, "receipt": "This Mac is serving", "does": "moves", "object": "folder" }, { "id": "request_notifications", "label": "Allow notifications", "kind": "update", "method": "device.notifications.request", "when": { "status": "this device", "notifications_permission": "undetermined" }, "receipt": "Asked to allow notifications", "object": "bell", "sheet": "notify" }, { "id": "sign_in", "label": "Sign in", "kind": "update", "method": "settings.openFlow", "data": { "flow": "signIn", "origin_table": "device" }, "bindings": { "origin_id": "$id" }, "when": { "status": "this device", "session": "signed_out" }, "receipt": "Signing in", "object": "arrow" }, { "id": "sign_out", "label": "Sign out", "kind": "update", "method": "settings.openFlow", "data": { "flow": "signOut", "origin_table": "device" }, "bindings": { "origin_id": "$id" }, "when": { "status": "this device", "session": "signed_in" }, "receipt": "Signed out", "object": "send" }, { "id": "sync_now", "label": "Sync now", "kind": "update", "method": "sync.now", "when": { "status": "this device", "session": { "not": [ "signed_out", "local" ] } }, "receipt": "Syncing", "object": "loop" }, { "id": "share_ink", "label": "Share ink", "kind": "update", "method": "settings.openFlow", "data": { "flow": "shareInk", "origin_table": "device" }, "bindings": { "origin_id": "$id" }, "when": { "status": "this device", "session": [ "signed_in", "signed_out" ] }, "receipt": "Sharing ink", "object": "pencil" }, { "id": "erase_here", "label": "Erase", "kind": "update", "method": "settings.openFlow", "data": { "flow": "eraseThisDevice", "origin_table": "device" }, "destructive": true, "bindings": { "origin_id": "$id" }, "when": { "status": "this device", "session": [ "signed_in", "signed_out" ] }, "receipt": "Asked before erasing", "does": "destroys", "object": "bin" }, { "id": "open_devices", "label": "All devices", "kind": "open", "when": { "status": "this device", "session": { "not": [ "signed_in", "signed_out" ] } }, "opens": "devices_route", "object": "device" }, { "id": "open_notification_settings", "label": "Open Settings", "kind": "update", "method": "device.notifications.openSettings", "when": { "status": "this device", "notifications_permission": "denied" }, "receipt": "Opened notification settings", "object": "bell", "sheet": "notify" }, { "id": "approve", "label": "Approve", "kind": "update", "method": "pairing.approve", "bindings": { "pairingId": "$id", "digits": "digits" }, "when": { "status": "waiting" }, "receipt": "Admitted {name}", "does": "completes", "object": "stamp" }, { "id": "remove", "label": "Remove", "kind": "update", "method": "devices.revoke", "data": { "erase": false }, "destructive": true, "confirm": "It stops syncing at once and is taken out of this database. What it already holds stays on it; to join again it asks, and is approved again.", "bindings": { "deviceId": "$id" }, "when": { "status": "approved" }, "receipt": "Removed {name}", "does": "destroys", "object": "cross" }, { "id": "erase", "label": "Erase", "kind": "update", "method": "devices.revoke", "data": { "erase": true }, "destructive": true, "confirm": "It is taken out of this database, and the next time it reaches any of your devices it erases what it holds of it. This cannot be undone.", "bindings": { "deviceId": "$id" }, "when": { "status": "approved" }, "receipt": "Removed {name}; it will erase itself", "does": "destroys", "object": "bin" }, { "id": "rekey", "label": "Re-key this device", "kind": "update", "method": "device.rekey", "when": { "status": "this device", "session": { "not": [ "signed_in", "signed_out" ] } }, "receipt": "Waiting for approval", "does": "times", "object": "clock" }, { "id": "send_report", "label": "Send a report", "kind": "update", "method": "diagnostics.report", "data": { "title": "Device report" }, "when": { "status": "this device", "session": { "not": [ "signed_in", "signed_out" ] } }, "receipt": "Report filed", "does": "moves", "object": "slip" }, { "id": "become_runner", "label": "Use as runner", "kind": "update", "method": "device.becomeRunner", "destructive": true, "confirm": "Once the serving Mac confirms it holds everything this Mac holds, this Mac drops its copy of every database and its backup identity, then only runs jobs and takes placements. Repository homes must be moved first.", "bindings": { "deviceId": "$id" }, "when": { "kind": "Mac", "status": "approved" }, "receipt": "This Mac becomes a runner", "does": "moves", "object": "folder" }, { "id": "add_samples", "label": "Add samples", "kind": "update", "method": "samples.add", "when": { "status": "this device", "samples": "offered" }, "receipt": "Added sample records", "object": "folder" }, { "id": "remove_samples", "label": "Remove samples", "kind": "update", "method": "samples.remove", "destructive": true, "confirm": "The sample records go to the bin. Nothing else is touched.", "when": { "status": "this device", "samples": "offered" }, "receipt": "Moved sample records to the bin", "does": "puts-away", "object": "bin" } ], "instructions": "A device is one of the owner's phones or Macs that has joined, each holding a full copy of the data, or one asking to join (status waiting, with the six digits it shows). The serving order says which Mac serves when several are on, and sessions_cap caps the coding sessions it runs at once (0 takes the Mac out of the household). The serving Mac's row says which kinds of Claude API work it has paused (ai_holds) and what it spent today (ai_spend_line); every device's row says what it reported of itself with its last exchange (reported_state_lines: last answer, unsent, build and schema, databases listed, the open problem, a copy in progress); ai_day_cap_usd is the owner's daily cap in US dollars, empty for the $5 default. Approving, declining, removing, erasing and making a Mac the server are the page's actions, never a column write; never approve or remove one without the owner. This device's own row also says what it is doing — how it syncs and what failed to back up, a refusal another Mac holds against it, and its notification switches and the system's permission for them — and its page offers Sync now, the writes that did not land, storage and Send a report (a redacted document in the personal database: state, last 500 log lines, registry files).", "card": { "face": "plain", "fields": [ { "slot": "title", "column": "name" }, { "slot": "subtitle", "column": "state" }, { "slot": "facts", "column": "platform", "also": [ "build", "os_version", "chip", "mem_total_gb", "disk_total_gb", "last_seen_at", "sync_rows_done", "sync_rows_total", "sync_bytes", "synced_at", "stalled_at" ] } ] }, "tool": { "views": [ { "id": "all", "label": "All", "visibility": "owner", "is_default": true, "read": { "table": "device" } } ], "name": "Devices", "purpose": "Your devices, their access and sync state.", "key": "devices", "icon": "monitor-smartphone", "card_stock": "tan", "route": "/devices" }, "parts": { "shape": "sheet", "head": { "facts": [ "platform", "last_seen_at" ], "state": "state" }, "links": [], "lists": [], "acts": { "main": "sign_out", "more": [ "sign_in", "sync_now", "send_report", "rekey", "approve", "add_samples", "share_ink" ], "away": "erase_here" }, "cards": [ { "column": "removal_state" }, { "column": "bytes_wanted" }, { "column": "ambient", "object": "words" }, { "column": "changes_waiting" }, { "column": "waiting_since", "label": "Mac away since" }, { "column": "last_synced" }, { "column": "sync_trouble" }, { "column": "refusal" }, { "column": "runner_problem" }, { "column": "kind", "object": "device" }, { "column": "notify", "object": "bell", "label": "Alerts", "switches": [ "notify", "notify_reminders", "notify_events", "notify_birthdays", "notify_alarms" ], "caption": "{on} of {total} on", "when": { "column": "notify_system", "values": [ "on" ] } }, { "column": "notify_system", "object": "bell", "label": "Alerts", "when": { "column": "notify_system", "values": [ "declined" ] } }, { "column": "sessions", "object": "figure", "when": { "column": "status", "values": [ "this device", "approved" ] } }, { "column": "keep_bytes", "object": "archive", "when": { "column": "status", "values": [ "approved" ] } }, { "column": "backup", "when": { "column": "backup_answered_by", "values": [ "this mac", "serving mac" ] } }, { "column": "backup_why", "when": { "column": "backup_answered_by", "values": [ "this mac", "serving mac" ] } }, { "column": "disk_free_gb", "width": "full", "object": "figure", "label": "Free disk", "when": { "column": "status", "values": [ "approved" ] } }, { "column": "keep_free_percent", "width": "full", "object": "figure", "when": { "column": "kind", "values": [ "Mac" ] } }, { "column": "keep_free_bytes", "object": "figure", "label": "Set keep free", "when": { "column": "kind", "values": [ "Mac" ] } }, { "column": "runner_confirm", "when": { "column": "runner_confirm", "values": [ "waiting", "short", "confirmed" ] } }, { "column": "runner_drop", "when": { "column": "runner_drop", "values": [ "waiting", "done" ] } }, { "column": "keep_mail", "object": "mail" }, { "column": "keep_statuses", "object": "message" }, { "column": "keep_files_whatsapp", "object": "chat" }, { "column": "keep_files_instagram", "object": "lens" }, { "column": "keep_files_photo", "object": "picture" }, { "column": "keep_files_video", "object": "picture" }, { "column": "keep_files_document", "object": "file" }, { "column": "kept_space_bytes", "object": "archive", "label": "Kept space" }, { "column": "reached_through", "object": "link" }, { "column": "start_at_login" }, { "column": "stay_awake" }, { "column": "error_reports" }, { "column": "auto_updates" } ], "strip": [], "groups": [ { "columns": [ "receipts_behind", "receipts_to_send", "fetch_count", "fetch_bytes", "upload_count", "upload_bytes" ] }, { "columns": [ "last_contact", "serving_mac" ] }, { "column": "received_since_open", "reads": true }, { "columns": [ "removal_state", "ai_spend_line", "asked_at", "approved_at", "approved_by_device", "revoked_at" ] }, { "columns": [ "revoked_reason", "serving_place", "sessions_cap", "ai_day_cap_usd", "chip", "cpu_count" ] }, { "columns": [ "mem_total_gb", "os_version", "update_hold", "load_1", "sessions_running", "smooth_scrolling" ] }, { "columns": [ "hangs_today", "cpu_time_today", "peak_memory", "backup", "backup_why", "media_backup" ] }, { "columns": [ "push", "start_at_login", "stay_awake", "error_reports", "auto_updates", "error_reports_to" ] }, { "columns": [ "update_feed", "reached_through", "keep_mail", "keep_statuses", "keep_files_whatsapp", "keep_files_instagram" ] }, { "columns": [ "keep_files_photo", "keep_files_video", "keep_files_document", "kept_space_bytes", "keep_fetch_full", "keep_bytes" ] }, { "columns": [ "keep_bytes_note", "digits", "rekey", "rekey_digits", "rekeyed_at", "last_seen_at" ] }, { "columns": [ "refusal", "ambient", "changes_waiting", "waiting_since", "last_synced", "sync_trouble" ] }, { "columns": [ "sync_background", "search_index", "backups", "notifications", "notifications_off", "notify" ] }, { "columns": [ "notify_reminders", "notify_events", "notify_birthdays", "notify_alarms", "keep_free_bytes", "bytes_wanted" ] }, { "columns": [ "held_until", "hold_reason" ] }, { "column": "placement_problems", "reads": true }, { "column": "reported_state_lines", "reads": true }, { "column": "keep_fetch_coming", "reads": true }, { "column": "keep_always", "reads": true }, { "column": "coming", "reads": true }, { "column": "failed_files", "reads": true }, { "column": "sync_tables", "reads": true, "folded": true } ] } }, { "format_version": 1, "tables": [], "id": "settings", "name": "Setting", "plural": "Settings", "picture": { "photo": "photo:66785efe292072cf0e24fe078a72074c4419a50c9a8bed526e82c04ad3eb82cc", "object": "tool-settings" }, "builtin": true, "engine": "settings", "columns": [ { "key": "name", "type": "text", "readonly": true }, { "key": "route", "type": "url", "readonly": true }, { "key": "value", "name": "Value", "type": "text", "readonly": true, "fact": false }, { "key": "position", "name": "Position", "type": "number", "readonly": true, "fact": false } ], "title": "name", "voice_words": [], "date": null, "project": null, "order": "position", "slip": { "title": "name", "stock": "plain", "subtitle": "value", "trailing": null, "photo": null, "toggle": null, "opens": "route" }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "name", "route" ] } ], "add": false, "sort": { "column": "position" }, "delete": false, "instructions": "Settings lists this device, your city, databases, runners, voice words and About in the order its board declares, each row only where the app's manifest meets what the row needs. Each row opens its route. Your city opens the Me page with its city card raised; its value line is the Me person's city, filled by the engine, never stored on the row.", "card": { "face": "plain", "fields": [ { "slot": "title", "column": "name" }, { "slot": "subtitle", "column": "value" } ] }, "tool": { "views": [ { "id": "all", "label": "All", "visibility": "owner", "is_default": true, "read": { "table": "settings" } } ], "name": "Settings", "purpose": "Preferences and controls for Cotton.", "key": "settings", "icon": "gearshape", "route": "/tools/board/settings" }, "parts": { "shape": "sheet", "head": { "facts": [ "route" ] }, "links": [], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "route" } ] } }, { "format_version": 1, "tables": [], "id": "everything", "name": "Table", "plural": "Everything", "picture": "tool-everything", "builtin": true, "engine": "everything", "columns": [ { "key": "name", "name": "Table", "type": "text", "required": true, "readonly": true }, { "key": "count", "name": "Count", "type": "number", "readonly": true, "fact": true, "reading": "{value}", "units": { "one": "{count_one}", "other": "{count_other}", "zero": "0 {count_other}" } }, { "key": "changed", "name": "Last changed", "type": "date", "readonly": true }, { "key": "source_absent", "name": "Not installed", "type": "text", "readonly": true, "fact": false, "reading": "reads {value}, whose tool is not installed here" }, { "key": "count_one", "type": "text", "readonly": true }, { "key": "count_other", "type": "text", "readonly": true } ], "title": "name", "voice_words": [], "date": null, "project": null, "order": null, "slip": { "title": "name", "subtitle": "count", "trailing": "changed", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "name", "count", "changed" ] } ], "add": false, "record_route": "/lists/[table]", "list_route": "/lists/everything", "setup": true, "empty": { "title": "No tables in this database yet" }, "delete": false, "instructions": "Every table in this database, one line each, with how many records it holds and when one last changed. A line opens that table's own list. The list is read only; records are added and changed in their own tools.", "card": { "face": "plain", "fields": [ { "slot": "title", "column": "name" }, { "slot": "subtitle", "column": "count" }, { "slot": "facts", "column": "changed" } ] }, "tool": { "views": [ { "id": "all", "label": "All", "visibility": "owner", "is_default": true, "read": { "table": "everything" } } ], "name": "Everything", "purpose": "Search and browse the records in this database.", "key": "everything", "icon": "library", "card_stock": "grey", "route": "/lists/everything" }, "parts": { "shape": "sheet", "head": { "facts": [ "count", "changed" ] }, "links": [], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "count" }, { "column": "changed" } ] } }, { "format_version": 1, "tables": [], "id": "copy", "name": "Copy", "plural": "Copies", "picture": null, "builtin": true, "engine": "sync", "columns": [ { "key": "not_answering", "name": "Sync", "type": "text", "readonly": true, "fact": false }, { "key": "database", "name": "Database", "type": "text", "readonly": true, "fact": false }, { "key": "name", "name": "Device", "type": "text", "required": true, "readonly": true }, { "key": "kind", "name": "Kind", "type": "choice", "choices": [ "phone", "tablet", "mac", "linux", "windows", "other" ], "readonly": true, "labels": { "phone": "Phone", "tablet": "Tablet", "mac": "Mac", "linux": "Linux machine", "windows": "Windows machine", "other": "A device" } }, { "key": "role", "name": "Role", "type": "choice", "choices": [ "this_device", "serving", "copy" ], "readonly": true, "labels": { "this_device": "This device", "serving": "Serves this database", "copy": "Holds a copy" } }, { "key": "keeps", "name": "Keeps", "type": "choice", "choices": [ "records_only", "records_and_media", "whole_file" ], "readonly": true, "labels": { "records_only": "Records only", "records_and_media": "Records and pictures", "whole_file": "The whole database" } }, { "key": "behind", "name": "Behind", "type": "number", "readonly": true, "units": { "one": "1 change not yet here", "other": "{n} changes not yet here", "zero": "Up to date" } }, { "key": "behind_at_least", "name": "Behind", "type": "number", "readonly": true, "units": { "one": "at least 1 change not yet here", "other": "at least {n} changes not yet here" } }, { "key": "doing_now", "name": "Now", "type": "choice", "choices": [ "idle", "pulling_changes", "fetching_bytes", "sending", "catching_up", "paused" ], "readonly": true, "labels": { "idle": "Idle", "pulling_changes": "Reading changes", "fetching_bytes": "Fetching pictures", "sending": "Sending changes", "catching_up": "Catching up", "paused": "Waiting for the Mac" } }, { "key": "reach", "name": "Reachable", "type": "choice", "choices": [ "reachable", "unreachable" ], "readonly": true, "red_when": [ "unreachable" ], "labels": { "reachable": "Reachable", "unreachable": "Not reachable" } }, { "key": "unreachable_since", "name": "Not reachable since", "type": "date", "readonly": true, "fact": true, "reading": "not reachable since {datetime}" }, { "key": "ambient", "name": "Sync", "type": "choice", "choices": [ "up_to_date", "waiting_for_mac" ], "readonly": true, "labels": { "up_to_date": "Up to date", "waiting_for_mac": "Mac not heard yet" } }, { "key": "mac_heard_at", "name": "Mac heard", "type": "date", "readonly": true, "fact": true, "units": { "one": "Mac heard {n}", "other": "Mac heard {n}" }, "format": "ago" }, { "key": "waiting_since", "name": "Mac not heard since", "type": "date", "readonly": true, "fact": true, "reading": "Mac not heard since {datetime}" }, { "key": "last_heard_at", "name": "Last heard", "type": "date", "readonly": true, "units": { "one": "heard {n}", "other": "heard {n}" }, "format": "ago" }, { "key": "synced_at", "name": "Synced", "type": "date", "readonly": true, "units": { "one": "synced {n}", "other": "synced {n}" }, "format": "ago", "shown_when": { "column": "role", "values": [ "this_device" ] } }, { "key": "changes_waiting", "name": "Waiting to send", "type": "number", "readonly": true, "units": { "one": "1 change waiting to send", "other": "{n} changes waiting to send" }, "shown_when": { "column": "role", "values": [ "this_device" ] } }, { "key": "moving_database", "name": "Updating", "type": "text", "readonly": true, "fact": true, "reading": "Updating {value}'s tables", "shown_when": { "column": "role", "values": [ "this_device" ] } }, { "key": "databases_moved", "name": "Databases updated", "type": "number", "readonly": true, "units": { "one": "1 of {databases_to_move} databases", "other": "{n} of {databases_to_move} databases", "zero": "0 of {databases_to_move} databases" }, "shown_when": { "column": "role", "values": [ "this_device" ] } }, { "key": "databases_to_move", "name": "Databases to update", "type": "number", "readonly": true, "fact": false }, { "key": "bytes_wanted", "name": "Still to fetch", "type": "bytes", "readonly": true, "fact": true, "shown_when": { "column": "role", "values": [ "this_device" ] } } ], "title": "name", "voice_words": [], "date": null, "project": null, "order": null, "slip": { "title": "name", "with_names": false, "subtitle": [ "moving_database", "databases_moved", "not_answering", "behind", "behind_at_least", "ambient", "mac_heard_at", "changes_waiting", "waiting_since", "doing_now" ], "trailing": null, "photo": null, "toggle": null, "title_fallback": "kind", "caption": { "columns": [ "role", "synced_at", "unreachable_since", "last_heard_at" ] } }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "name", "not_answering", "ambient", "waiting_since", "role", "keeps", "behind", "behind_at_least", "doing_now", "reach", "unreachable_since", "last_heard_at", "synced_at", "changes_waiting", "bytes_wanted" ] } ], "add": false, "list_route": "/lists/copy", "setup": true, "role": "copies", "empty": { "title": "No device holds a copy yet" }, "delete": false, "commands": [ { "id": "sync_now", "label": "Sync now", "kind": "update", "method": "sync.now", "when": { "role": "this_device" }, "receipt": "Syncing", "object": "loop" } ], "instructions": "Every device holding a copy of this database, one line each: the Mac that serves it, this device, and each member's devices. A line says what the device keeps (the records only, the records and pictures, or the whole database), how far behind it is (changes the serving Mac has that it has not read yet), what it is doing now, whether it can be reached and when it was last heard from. This device's line also says when it last synced, or how many of its own changes wait to send — one state — and what is not fetched yet; what it holds is Storage's. Everything is read from this device's own copy, so it answers offline; a fact this device has not observed is left unsaid, never guessed. The list is read only; Sync now on this device's line asks the serving Mac at once.", "card": { "face": "plain", "fields": [ { "slot": "title", "column": "name" }, { "slot": "subtitle", "column": "kind" }, { "slot": "facts", "column": "role", "also": [ "keeps", "reach", "synced_at", "last_heard_at", "changes_waiting", "behind" ] } ] }, "parts": { "shape": "sheet", "head": { "facts": [ "role", "kind" ], "state": "reach" }, "links": [], "lists": [], "acts": { "main": "sync_now", "more": [] }, "cards": [ { "column": "ambient", "object": "words" }, { "column": "waiting_since", "label": "Mac away since" }, { "column": "not_answering", "when": { "column": "ambient", "present": false } }, { "column": "behind", "when": { "column": "behind_at_least", "present": false } }, { "column": "behind_at_least" }, { "column": "synced_at" }, { "column": "changes_waiting" }, { "column": "doing_now", "object": "words", "when": { "column": "doing_now", "values": [ "pulling_changes", "fetching_bytes", "sending", "catching_up", "paused" ] } }, { "column": "keeps", "object": "archive" }, { "column": "unreachable_since", "label": "Away since" }, { "column": "last_heard_at" }, { "column": "bytes_wanted", "object": "figure" } ] } }, { "format_version": 1, "tables": [], "id": "schema_move", "name": "Update", "plural": "Updates", "picture": null, "builtin": true, "engine": "sync", "columns": [ { "key": "name", "name": "Database", "type": "text", "required": true, "readonly": true }, { "key": "state", "name": "State", "type": "choice", "choices": [ "moving", "waiting", "moved" ], "readonly": true, "labels": { "moving": "Updating now", "waiting": "Waiting its turn", "moved": "Up to date" } }, { "key": "tables_left", "name": "Tables left", "type": "number", "readonly": true, "units": { "one": "1 table left", "other": "{n} tables left" } } ], "title": "name", "voice_words": [], "date": null, "project": null, "order": null, "slip": { "title": "name", "subtitle": [ "state", "tables_left" ], "trailing": null, "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "state", "tables_left" ] } ], "add": false, "list_route": "/lists/schema_move", "setup": true, "delete": false, "instructions": "This device's schema updates in this run: each database another build of Cotton wrote, the one being brought up to date now, the ones waiting their turn and the ones done, with how many of its tables are left. Read only; the updates run by themselves after the app opens.", "card": { "face": "plain", "fields": [ { "slot": "title", "column": "name" }, { "slot": "subtitle", "column": "state" }, { "slot": "facts", "column": "tables_left" } ] } }, { "format_version": 1, "id": "artist", "name": "Artist", "plural": "Artists", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "name", "name": "Name", "type": "text", "required": true, "placeholder": "The artist's name" }, { "key": "sort_name", "name": "Sorted as", "type": "text" }, { "key": "photo", "name": "Photo", "type": "photo" }, { "key": "albums", "name": "Albums", "type": "number", "units": { "one": "album", "other": "albums" }, "computed": { "rollup": { "table": "music_album", "link": "artist", "op": "count" } } }, { "key": "songs", "name": "Songs", "type": "number", "units": { "one": "song", "other": "songs" }, "computed": { "rollup": { "table": "song", "link": "artist", "op": "count" } } }, { "key": "mb_artist", "name": "MusicBrainz", "type": "text", "readonly": true } ], "title": "name", "date": null, "project": null, "order": null, "slip": { "title": "name", "subtitle": [ "albums", "songs" ], "trailing": null, "photo": "photo", "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "photo", "name", "sort_name", "albums", "songs", "mb_artist" ] } ], "sort": { "column": "sort_name", "descending": false }, "empty": { "title": "No artists yet", "message": "Artists gather from the songs that come in." }, "create": { "label": "Add music", "doors": [ { "id": "files", "label": "Add files", "object": "singles", "files": { "types": [ "public.audio", "public.zip-archive" ], "many": true } }, { "id": "folder", "label": "Add a folder", "object": "crate", "files": { "types": [ "public.folder" ] } } ] }, "commands": [ { "id": "play", "label": "Play", "kind": "update", "method": "shell.player", "data": { "table": "artist", "op": "play" }, "bindings": { "id": "$id" }, "receipt": "Playing {name}", "object": "slip" }, { "id": "shuffle", "label": "Play shuffled", "kind": "update", "method": "shell.player", "data": { "table": "artist", "op": "shuffle" }, "bindings": { "id": "$id" }, "receipt": "Shuffling {name}", "object": "loop" } ], "instructions": "One row per artist, a person or a band, gathered from the songs and albums that come in: name as tagged, sort_name the name without a leading \"The\" (\"Beatles\" for \"The Beatles\"), so the list reads by it. \"Various Artists\" is one artist, the album artist of every compilation. photo is only ever the owner's own: there is no free source of artists' pictures, and none is looked up. albums and songs are counted from the albums it is the album artist of and the songs it is the artist of. mb_artist is the MusicBrainz artist id, from the tags or a lookup, filling only while empty. Opening an artist deals the albums by year.", "groups": { "stack": "covers" }, "card": { "face": "artist.divider", "offers": [ "artist.divider" ], "fields": [ { "slot": "photo", "column": "photo" }, { "slot": "title", "column": "name" }, { "slot": "count", "column": "albums" } ], "opens": { "table": "music_album", "by": "artist", "order": [ "year" ] } } }, { "format_version": 1, "id": "book", "name": "Book", "plural": "Books", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "title", "name": "Title", "type": "text", "required": true, "placeholder": "The book's title" }, { "key": "author", "name": "Author", "type": "text", "placeholder": "Who wrote it" }, { "key": "cover", "name": "Cover", "type": "photo" }, { "key": "file", "name": "Book", "type": "file", "readonly": true }, { "key": "format", "name": "Kind", "type": "choice", "choices": [ "epub", "pdf" ], "readonly": true, "labels": { "epub": "EPUB", "pdf": "PDF" } }, { "key": "status", "name": "Status", "type": "choice", "choices": [ "want_to_read", "reading", "finished", "stopped" ], "labels": { "want_to_read": "Want to read", "reading": "Reading", "finished": "Finished", "stopped": "Stopped" }, "default": "want_to_read" }, { "key": "rating", "name": "Rating", "type": "number", "units": { "one": "{n} of 5", "other": "{n} of 5" } }, { "key": "review", "name": "Review", "type": "longtext", "placeholder": "What you thought" }, { "key": "added_on", "name": "Added", "type": "date" }, { "key": "started_on", "name": "Started", "type": "date" }, { "key": "finished_on", "name": "Finished", "type": "date" }, { "key": "read_count", "name": "Times read", "type": "number" }, { "key": "position", "name": "Place", "type": "text" }, { "key": "progress", "name": "Read", "type": "number", "units": { "one": "{n}%", "other": "{n}%" } }, { "key": "position_at", "name": "Last read", "type": "date", "format": "calendar-datetime" }, { "key": "pages", "name": "Pages", "type": "number", "units": { "one": "page", "other": "pages" } }, { "key": "series", "name": "Series", "type": "text" }, { "key": "series_number", "name": "Number in series", "type": "number" }, { "key": "year", "name": "First published", "type": "text" }, { "key": "language", "name": "Language", "type": "text" }, { "key": "isbn", "name": "ISBN", "type": "text" }, { "key": "ol_work", "name": "Open Library", "type": "text", "readonly": true }, { "key": "goodreads_id", "name": "Goodreads", "type": "text", "readonly": true }, { "key": "source", "name": "Came from", "type": "choice", "choices": [ "file", "lookup", "goodreads", "typed" ], "readonly": true, "labels": { "file": "A file", "lookup": "Open Library", "goodreads": "Goodreads", "typed": "Typed" } }, { "key": "on_phone", "name": "On this phone", "type": "choice", "choices": [ "absent", "keeping", "kept" ], "readonly": true, "labels": { "absent": "Not on this phone", "keeping": "Coming down", "kept": "On this phone" } }, { "key": "publisher", "name": "Publisher", "type": "text" }, { "key": "description", "name": "About", "type": "longtext" }, { "key": "subjects", "name": "Subjects", "type": "text" }, { "key": "ol_edition", "name": "Open Library edition", "type": "text", "readonly": true }, { "key": "doi", "name": "DOI", "type": "text" }, { "key": "filled_from", "name": "Filled from", "type": "longtext", "readonly": true }, { "key": "deleted_at", "name": "Deleted at", "type": "text", "readonly": true }, { "key": "sent_by", "name": "Sent by", "type": "text", "readonly": true }, { "key": "sent_by_number", "name": "Sent from", "type": "text", "readonly": true }, { "key": "sent_at", "name": "Sent", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "send_id", "name": "Send", "type": "text", "readonly": true } ], "title": "title", "date": "finished_on", "project": null, "order": null, "slip": { "title": "title", "subtitle": "author", "trailing": "status", "photo": "cover", "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "cover", "title", "author", "status", "rating", "progress" ] }, { "heading": "Reading", "columns": [ "added_on", "started_on", "finished_on", "read_count", "position_at" ] }, { "heading": "Review", "columns": [ "review" ] }, { "heading": "About", "columns": [ "description" ] }, { "heading": "Book", "columns": [ "series", "series_number", "publisher", "year", "pages", "language", "subjects", "isbn", "doi", "format", "on_phone", "source", "ol_work", "ol_edition", "goodreads_id" ] } ], "seal": { "clear": [ "cover", "file", "format", "status", "added_on", "started_on", "finished_on", "read_count", "progress", "position_at", "source", "on_phone", "filled_from", "deleted_at", "sent_at", "send_id" ], "blind": [ "title", "author" ] }, "send": { "columns": [ "title", "author", "cover", "file", "format", "pages", "series", "series_number", "year", "language", "isbn", "ol_work", "ol_edition", "goodreads_id", "publisher", "description", "subjects", "doi" ], "files": [ "cover", "file" ], "same": [ [ "file" ], [ "isbn" ], [ "ol_work" ], [ "doi" ], [ "title", "author" ] ] }, "sort": { "column": "added_on", "descending": true }, "empty": { "title": "A place for your next book." }, "create": { "label": "Add a book", "doors": [ { "id": "find", "label": "Find a book", "object": "catalogue", "act": { "name": "find_book", "argument": "query", "lands": "book", "signed_out": "Sign in to find books by name" } }, { "id": "file", "label": "Add a file", "object": "parcel", "files": { "types": [ "org.idpf.epub-container", "com.adobe.pdf" ], "many": true } }, { "id": "folder", "label": "Add a folder", "object": "parcel", "files": { "types": [ "public.folder" ] } }, { "id": "goodreads", "label": "Bring Goodreads in", "object": "stack", "files": { "types": [ "public.comma-separated-values-text" ] } } ] }, "commands": [ { "id": "read", "label": "Read", "kind": "update", "method": "reader.open", "bindings": { "id": "$id" }, "when": { "file": { "not": false } }, "object": "page" }, { "id": "start", "label": "Start reading", "kind": "update", "method": "object.act", "data": { "act": "start_book" }, "bindings": { "book": "$id" }, "when": { "status": [ "want_to_read", "stopped", "finished" ] }, "receipt": "Reading {name}", "object": "slip" }, { "id": "finish", "label": "Finished", "kind": "update", "method": "object.act", "data": { "act": "finish_book" }, "bindings": { "book": "$id" }, "when": { "status": "reading" }, "receipt": "Finished {name}", "pick": { "argument": "rating", "kind": "number", "label": "How many stars", "optional": true, "min": 1, "max": 5, "labels": { "1": "★", "2": "★★", "3": "★★★", "4": "★★★★", "5": "★★★★★" } }, "does": "completes", "object": "stamp" }, { "id": "stop", "label": "Stop reading", "kind": "update", "verb": "update_record", "data": { "table": "book", "patch": { "status": "stopped" } }, "bindings": { "id": "$id" }, "when": { "status": "reading" }, "receipt": "Stopped {name}", "undo": "resume", "does": "puts-away", "object": "folder" }, { "id": "resume", "label": "Back to reading", "kind": "update", "verb": "update_record", "data": { "table": "book", "patch": { "status": "reading" } }, "bindings": { "id": "$id" }, "when": { "status": "stopped" }, "receipt": "Reading {name}", "undo": "stop", "object": "slip" }, { "id": "want", "label": "Want to read", "kind": "update", "verb": "update_record", "data": { "table": "book", "patch": { "status": "want_to_read" } }, "bindings": { "id": "$id" }, "when": { "status": [ "finished", "stopped" ] }, "receipt": "On your list", "object": "folder" }, { "id": "keep_on_phone", "label": "Keep on phone", "kind": "update", "method": "settings.openFlow", "data": { "flow": "keepBook", "origin_table": "book" }, "bindings": { "origin_id": "$id" }, "when": { "on_phone": "absent" }, "receipt": "Keeping {name} on this phone", "object": "folder" }, { "id": "remove_download", "label": "Remove download", "kind": "update", "method": "settings.openFlow", "data": { "flow": "removeBookDownload", "origin_table": "book" }, "bindings": { "origin_id": "$id" }, "when": { "on_phone": [ "keeping", "kept" ] }, "receipt": "Removed {name} from this phone", "object": "bin" }, { "id": "rate", "label": "Rate", "kind": "update", "verb": "update_record", "data": { "table": "book" }, "bindings": { "id": "$id" }, "receipt": "Rated {name}", "pick": { "argument": "patch.rating", "kind": "number", "label": "How many stars", "min": 1, "max": 5, "labels": { "1": "★", "2": "★★", "3": "★★★", "4": "★★★★", "5": "★★★★★" } }, "object": "star" }, { "id": "review", "label": "Review", "kind": "update", "verb": "update_record", "data": { "table": "book" }, "bindings": { "id": "$id" }, "receipt": "Reviewed {name}", "pick": { "argument": "patch.review", "kind": "text", "label": "Review" }, "object": "slip" }, { "id": "find_details", "label": "Find details", "kind": "update", "method": "object.act", "data": { "act": "find_book" }, "bindings": { "book": "$id" }, "receipt": "Found details for {name}", "object": "catalogue" }, { "id": "add_file", "label": "Add file", "kind": "update", "method": "settings.openFlow", "data": { "flow": "addBookFile", "origin_table": "book" }, "bindings": { "origin_id": "$id" }, "when": { "file": false }, "receipt": "Added a file to {name}", "object": "parcel" } ], "instructions": "One row per book the owner owns, is reading, has read or means to read. A book with a file (format epub or pdf, the file in the object's media under books/) is read in the app; one without is a shelf entry. status is want_to_read, reading, finished or stopped (did not finish); added_on, started_on and finished_on are the days the owner gave or the app stamped, never guessed; rating is out of 5 in half steps, null when unrated; read_count is how many times it was finished. position is a Readium Locator (JSON text) and progress (0 to 100) how far through, both written by the reader alone, as is position_at. Start reading and Finished are the acts start_book { book } and finish_book { book, rating? }: they stamp the day and count the reading, and Finished writes the stars it asked for. Rate sets rating, Review writes review, Find details is find_book { book } (by the book's isbn, else its title and author), and Add file gives a book with no file its EPUB or PDF. find_book { query } | { isbn } looks a book up on Open Library and fills only empty columns (a query with no match is refused); import_goodreads { file } brings a Goodreads library export, each book found again by goodreads_id, other shelves made lists. publisher, description (plain text), subjects (comma separated), doi, ol_edition (an Open Library edition id, OL…M) and series with series_number come from the file's own package document (an EPUB's OPF, a Calibre metadata.opf) or a lookup, filling only while empty. source says where the row came from. filled_from says, as JSON, where each fill's columns came from (opf, goodreads, open_library), kept by the app. on_phone is answered by each phone (absent, keeping, kept) and never stored. Lists are this table's groups.", "groups": { "stack": "covers" }, "card": { "face": "book.hardback", "fields": [ { "slot": "photo", "column": "cover" }, { "slot": "title", "column": "title" }, { "slot": "subtitle", "column": "author" }, { "slot": "used", "column": "progress" }, { "slot": "state", "column": "status", "only": [ "want_to_read", "reading", "finished", "stopped" ] }, { "slot": "started", "column": "started_on" }, { "slot": "last_read", "column": "position_at", "form": "day_month" }, { "slot": "pages", "column": "pages" }, { "slot": "date", "column": "finished_on" }, { "slot": "count", "column": "rating" }, { "slot": "body", "column": "review" } ], "pages": [ "review" ], "opens": { "table": "highlight", "by": "book", "order": [ "progress" ] } } }, { "format_version": 1, "tables": [ { "name": "cotton_call_log", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "source", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n source TEXT NOT NULL", "position": 2 }, { "name": "external_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n external_id TEXT NOT NULL", "position": 3 }, { "name": "provider", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n provider TEXT NOT NULL", "position": 4 }, { "name": "direction", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n direction TEXT NOT NULL", "position": 5 }, { "name": "outcome", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n outcome TEXT NOT NULL", "position": 6 }, { "name": "started_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n started_at TEXT NOT NULL", "position": 7 }, { "name": "duration_s", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n duration_s INTEGER NOT NULL DEFAULT 0", "position": 8 }, { "name": "handle", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n handle TEXT", "position": 9 }, { "name": "contact_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n contact_id TEXT", "position": 10 }, { "name": "person_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n person_id TEXT", "position": 11 }, { "name": "device", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n device TEXT", "position": 12 }, { "name": "meta", "type": "TEXT", "default": "'{}'", "nullable": false, "primary_key": false, "declaration": "\n meta TEXT NOT NULL DEFAULT '{}'", "position": 13 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 14 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 15 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 16 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 17 } ], "constraints": [ { "declaration": "\n UNIQUE (workspace_id, source, external_id)", "position": 18 }, { "declaration": "\n CHECK (direction IN ('in', 'out'))", "position": 19 }, { "declaration": "\n CHECK (outcome IN ('answered', 'missed', 'cancelled', 'failed'))", "position": 20 }, { "declaration": "\n CHECK (length(trim(external_id)) > 0)", "position": 21 }, { "declaration": "\n CHECK (length(trim(provider)) > 0)", "position": 22 }, { "declaration": "\n CHECK (duration_s >= 0)", "position": 23 }, { "declaration": "\n CHECK (json_type(meta) = 'object')", "position": 24 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 25 } ], "prefix": "CREATE TABLE cotton_call_log (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_call_log_started ON cotton_call_log (workspace_id, started_at DESC)", "CREATE INDEX idx_cotton_call_log_person ON cotton_call_log (person_id)", "CREATE INDEX idx_cotton_call_log_contact ON cotton_call_log (contact_id)", "CREATE INDEX IF NOT EXISTS idx_cotton_call_log_author ON cotton_call_log (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "id": "call", "name": "Call", "plural": "Calls", "visibility": "owner", "picture": { "photo": "photo:2eadfa7a8a8468dd21d7ffcff0f4efe44a9c5a4d1d4866f5ef9f6ab8bcf61e31", "object": "tool-calls" }, "builtin": true, "engine": "calls", "columns": [ { "key": "source", "type": "text", "readonly": true }, { "key": "external_id", "type": "text", "readonly": true }, { "key": "provider", "name": "How", "type": "text", "readonly": true, "fact": true, "reading": "{value}", "format": "app-name", "labels": { "cellular": "Phone call", "facetime_audio": "FaceTime audio", "facetime_video": "FaceTime video", "whatsapp": "WhatsApp", "com.apple.telephony": "Phone call", "com.apple.facetime": "FaceTime", "com.skype.skype": "Skype", "com.skype.skypeforiphone": "Skype", "com.microsoft.skype.teams": "Microsoft Teams", "us.zoom.videomeetings": "Zoom", "com.google.meetings": "Google Meet", "com.google.gvdialer": "Google Voice", "ph.telegra.telegraph": "Telegram", "org.whispersystems.signal": "Signal", "com.viber": "Viber", "com.facebook.messenger": "Messenger", "com.burbn.instagram": "Instagram", "jp.naver.line": "LINE", "com.tencent.xin": "WeChat", "com.hammerandchisel.discord": "Discord", "com.tinyspeck.chatlyio": "Slack", "com.cisco.webex.meetings": "Webex", "net.whatsapp.whatsapp": "WhatsApp", "net.whatsapp.whatsappsmb": "WhatsApp Business", "cotton": "Cotton" } }, { "key": "direction", "type": "choice", "choices": [ "in", "out" ], "readonly": true }, { "key": "outcome", "type": "choice", "choices": [ "answered", "missed", "cancelled", "failed" ], "readonly": true }, { "key": "started_at", "name": "When", "type": "date", "readonly": true, "fact": true, "reading": "{value}", "format": "calendar-datetime" }, { "key": "duration_s", "name": "Length", "type": "number", "readonly": true, "fact": true, "reading": "{value}", "units": { "one": "second", "other": "seconds", "zero": "" }, "format": "duration" }, { "key": "handle", "name": "Number", "type": "text", "readonly": true }, { "key": "contact_id", "type": "text", "readonly": true }, { "key": "person_id", "name": "Person", "type": "link", "link_to": "person", "readonly": true }, { "key": "device", "name": "Read by", "type": "text", "readonly": true }, { "key": "meta", "type": "longtext", "readonly": true }, { "key": "title", "type": "text", "readonly": true }, { "key": "photo", "type": "photo", "readonly": true }, { "key": "outcome_label", "name": "What happened", "type": "choice", "choices": [ "incoming", "outgoing", "missed", "no answer", "cancelled", "failed" ], "readonly": true, "red_when": [ "missed" ], "labels": { "incoming": "Incoming call", "outgoing": "Outgoing call", "missed": "Missed call", "no answer": "No answer", "cancelled": "Cancelled call", "failed": "Failed call" } }, { "key": "live", "name": "Called here", "type": "bool", "readonly": true }, { "key": "kind", "name": "Kind", "type": "choice", "choices": [ "audio", "video" ], "readonly": true, "fact": true, "reading": "{value}", "labels": { "audio": "Audio call", "video": "Video call" } }, { "key": "ended_at", "name": "Ended", "type": "date", "readonly": true }, { "key": "who", "name": "People", "type": "text", "readonly": true }, { "key": "link", "name": "Meeting link", "type": "text", "readonly": true }, { "key": "recording", "name": "Recording", "type": "file", "readonly": true }, { "key": "recording_phase", "name": "Recording state", "type": "choice", "choices": [ "asked", "on", "off" ], "readonly": true }, { "key": "ended_reason", "name": "How it ended", "type": "choice", "choices": [ "hung_up", "remote_hung_up", "declined", "declined_elsewhere", "busy", "no_answer", "cancelled", "missed", "answered_elsewhere", "failed", "lost", "too_many_calls", "unreachable_network" ], "readonly": true, "labels": { "hung_up": "You hung up", "remote_hung_up": "They hung up", "declined": "Declined", "declined_elsewhere": "Declined on another device", "busy": "Busy", "no_answer": "No answer", "cancelled": "Cancelled", "missed": "Missed", "answered_elsewhere": "Answered on another device", "failed": "Could not connect", "lost": "Connection lost", "too_many_calls": "Too many calls", "unreachable_network": "No connection" } }, { "key": "missed", "name": "Missed", "type": "bool", "readonly": true, "hidden": true } ], "title": "title", "date": "started_at", "project": null, "order": null, "slip": { "title": "title", "subtitle": [ "outcome_label", "duration_s" ], "trailing": "started_at", "photo": "photo", "toggle": null, "caption": { "dates": [], "fields": [ "started_at" ] } }, "tile": { "face": "slip-list", "current": { "column": "started_at", "days": 2 } }, "page": [ { "heading": null, "columns": [ "title", "photo", "outcome_label" ] }, { "heading": null, "columns": [ "started_at", "duration_s" ] }, { "heading": null, "columns": [ "kind", "who", "ended_at" ] }, { "heading": "Details", "columns": [ "handle", "provider" ] } ], "readonly_when": "started_at", "seal": { "clear": [ "started_at", "ended_at", "person_id", "missed" ], "blind_exact": [ "handle", "external_id" ] }, "record_route": "/calls/call/[id]", "sort": { "column": "started_at", "descending": true }, "day_grouping": "started_at", "empty": { "title": "No calls yet", "message": "Calls placed here and imported phone history appear here." }, "create": { "label": "Make a call link", "path": "/calls/link" }, "actions": [ { "label": "Call back", "column": "handle", "scheme": "tel", "object": "handset", "scheme_column": "provider", "schemes": { "facetime_video": "facetime", "facetime_audio": "facetime-audio" } }, { "label": "Message", "column": "handle", "scheme": "sms", "object": "bubble" } ], "delete": false, "commands": [ { "id": "person", "label": "Open person", "kind": "open", "opens": "person_id", "object": "person" } ], "instructions": "Calls made here appear beside imported phone history. Imported history is read-only. A call shows who joined, when it happened and how long it lasted, with its meeting link, recording and transcript when present. Recording starts after everyone has seen its notice and heard its tone.", "groups": { "stack": "slips" }, "card": { "face": "call.slip", "fields": [ { "slot": "title", "column": "title" }, { "slot": "number", "column": "handle" }, { "slot": "date", "column": "started_at", "form": "ago" }, { "slot": "state", "column": "outcome_label", "only": [ "incoming", "outgoing", "missed", "no answer", "cancelled", "failed" ] }, { "slot": "length", "column": "duration_s", "form": "duration" }, { "slot": "source", "column": "provider" } ] }, "tool": { "views": [ { "id": "all", "label": "All", "visibility": "owner", "is_default": true, "read": { "table": "call" } } ], "name": "Calls", "purpose": "Your calls and when they happened.", "key": "calls", "icon": "phone", "card_stock": "rose", "route": "/calls/history", "server": { "needs": true, "line": "Calls arrive through the Mac app and your Cotton server." } }, "parts": { "shape": "sheet", "head": { "facts": [ "started_at", "duration_s", "provider", "kind" ] }, "links": [], "lists": [], "acts": { "more": [ "person" ] }, "cards": [ { "column": "person_id" }, { "column": "outcome_label", "object": "phone" } ], "strip": [] } }, { "format_version": 1, "id": "fetch", "name": "Download", "plural": "Downloads", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "source", "name": "Link", "type": "text", "required": true, "placeholder": "A magnet, a .torrent, a file's link or a page" }, { "key": "title", "name": "Title", "type": "text", "placeholder": "Filled by the Mac from what it fetches" }, { "key": "picture", "name": "Picture", "type": "photo", "readonly": true }, { "key": "wants", "name": "Wants", "type": "choice", "choices": [ "video", "audio", "files" ], "labels": { "video": "Video", "audio": "Audio only", "files": "Files" } }, { "key": "state", "name": "State", "type": "choice", "choices": [ "queued", "fetching", "landing", "done", "failed", "cancelled" ], "readonly": true, "labels": { "queued": "Waiting for the Mac", "fetching": "Fetching", "landing": "Landing", "done": "Done", "failed": "Failed", "cancelled": "Cancelled" }, "default": "queued" }, { "key": "source_kind", "name": "Kind of link", "type": "choice", "choices": [ "torrent", "page", "file" ], "readonly": true, "labels": { "torrent": "Torrent", "page": "Page", "file": "File" } }, { "key": "progress", "name": "Fetched", "type": "number", "readonly": true, "units": { "one": "{n}%", "other": "{n}%" } }, { "key": "bytes", "name": "Fetched so far", "type": "number", "readonly": true, "format": "bytes" }, { "key": "of_bytes", "name": "Size", "type": "number", "readonly": true, "format": "bytes" }, { "key": "speed_bps", "name": "Speed", "type": "number", "readonly": true, "units": { "one": "{n}/s", "other": "{n}/s" }, "format": "bytes" }, { "key": "eta_seconds", "name": "Time left", "type": "number", "readonly": true, "format": "duration" }, { "key": "files", "name": "Files", "type": "number", "readonly": true }, { "key": "landed_count", "name": "Landed", "type": "number", "readonly": true, "units": { "one": "{n} record", "other": "{n} records" } }, { "key": "stage_line", "name": "Where it is", "type": "text", "readonly": true }, { "key": "stage", "name": "Stage", "type": "choice", "choices": [ "converting", "sending", "sending_original", "smaller_copies", "waiting" ], "readonly": true, "labels": { "converting": "Converting · {done} of {of} min", "sending": "Sending · {done} of {of} files", "sending_original": "Sending the original · {done} of {of} GB", "smaller_copies": "Making smaller copies · {done} of {of} min", "waiting": "Waiting for the server since {since}" }, "hidden": true }, { "key": "stage_done", "name": "Stage done", "type": "number", "readonly": true, "hidden": true }, { "key": "stage_of", "name": "Stage total", "type": "number", "readonly": true, "hidden": true }, { "key": "stage_at", "name": "Stage last moved", "type": "date", "readonly": true, "format": "calendar-datetime", "hidden": true }, { "key": "error", "name": "Why it failed", "type": "text", "readonly": true }, { "key": "machine", "name": "Mac", "type": "text", "readonly": true }, { "key": "added_on", "name": "Added", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "started_on", "name": "Started", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "finished_on", "name": "Finished", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "again_on", "name": "Fetched again", "type": "date", "readonly": true, "format": "calendar-datetime", "hidden": true }, { "key": "again_outcome", "name": "How fetching it again went", "type": "choice", "choices": [ "landed", "failed", "cancelled" ], "readonly": true, "labels": { "landed": "Landed", "failed": "Failed", "cancelled": "Cancelled" }, "hidden": true }, { "key": "again_error", "name": "Why fetching it again failed", "type": "text", "readonly": true, "hidden": true }, { "key": "in_hidden", "name": "In Hidden", "type": "bool", "readonly": true, "hidden": true } ], "title": "title", "date": "added_on", "project": null, "order": null, "slip": { "title": "title", "subtitle": [ "stage_line", "state" ], "trailing": "progress", "photo": "picture", "toggle": null, "subtitle_first": true }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "picture", "title", "state", "stage_line", "progress", "error", "landed_count" ] }, { "heading": "Fetch", "columns": [ "source", "source_kind", "wants", "bytes", "of_bytes", "speed_bps", "eta_seconds", "files", "machine", "added_on", "started_on", "finished_on" ] } ], "seal": { "clear": [ "picture", "wants", "state", "source_kind", "progress", "bytes", "of_bytes", "speed_bps", "eta_seconds", "files", "landed_count", "machine", "added_on", "started_on", "finished_on", "again_on", "again_outcome", "stage_line", "stage", "stage_done", "stage_of", "stage_at" ], "blind": [ "title" ] }, "sort": { "column": "added_on", "descending": true }, "empty": { "title": "Nothing fetched yet", "message": "Give Plus a link: a magnet, a .torrent, a file's link or a video page. The Mac fetches it and each file lands in the tool that plays it." }, "create": { "label": "Fetch a link", "doors": [ { "id": "link", "label": "Fetch a link", "object": "parcel", "act": { "name": "fetch_add", "argument": "source", "lands": "fetch", "signed_out": "Sign in to fetch links on your Mac" } } ] }, "commands": [ { "id": "cancel", "label": "Cancel", "kind": "update", "method": "object.act", "data": { "act": "fetch_cancel" }, "bindings": { "fetch": "$id" }, "when": { "state": [ "queued", "fetching", "landing" ] }, "receipt": "Cancelled {name}", "object": "cross" }, { "id": "retry", "label": "Try again", "kind": "update", "method": "object.act", "data": { "act": "fetch_retry" }, "bindings": { "fetch": "$id" }, "when": { "state": [ "failed", "cancelled" ] }, "receipt": "Fetching {name} again", "object": "loop" }, { "id": "remove", "label": "Remove", "kind": "delete", "verb": "delete_record", "data": { "table": "fetch" }, "confirm": "The files it landed stay in their tools. Undo on the receipt brings it back.", "bindings": { "id": "$id" }, "when": { "state": [ "done", "failed", "cancelled" ] }, "receipt": "Removed {name}", "does": "destroys", "object": "bin" } ], "instructions": "One row per link the owner wants as an owned file: a magnet, an http(s) link to a .torrent or to a file, or a page any of the sites yt-dlp reads. Make one with create_record { table: fetch, data: { source } } or the fetch_add act; wants is video (the default for a page), audio (the sound alone) or files (the default for a torrent or a file). The Mac fetches it (pnpm fetch:run): it claims the row (state fetching), says its progress, lands every file in the tool that plays it (a video a film, a sound a song, an EPUB or PDF a book, a picture a photo, anything else a document), makes one fetch_file row per record it landed (each linking the record in its own tool) and says done; or failed, with the fetcher's reason in error. cancel stops the Mac's job while the row waits or fetches, retry queues a failed or cancelled row again, and remove takes a done, failed or cancelled row off the list (the records it landed stay in their tools). fetch_again queues a done row once more, its link untouched, so the films it landed come back keeping their originals: again_on is when it was asked, again_outcome how that second fetch went (landed, failed or cancelled; empty while it runs) and again_error the fetcher's reason in one sentence; a second fetch that fails or is cancelled leaves the row done, its landed records still linked. Cotton never strips a lock: a site behind DRM fails and says so. Never write state, progress or the landed links by hand.", "card": { "face": "plain", "fields": [ { "slot": "photo", "column": "picture" }, { "slot": "title", "column": "title" }, { "slot": "subtitle", "column": "state", "also": [ "stage_line" ] }, { "slot": "body", "column": "error" }, { "slot": "facts", "column": "progress", "also": [ "landed_count", "of_bytes" ] } ] } }, { "format_version": 1, "id": "fetch_file", "name": "Landed file", "plural": "Landed files", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "fetch", "name": "Download", "type": "link", "required": true, "link_to": "fetch", "readonly": true }, { "key": "name", "name": "File", "type": "text", "required": true, "readonly": true }, { "key": "kind", "name": "Landed as", "type": "choice", "choices": [ "film", "episode", "song", "book", "photo", "document" ], "readonly": true, "labels": { "film": "Film", "episode": "Episode", "song": "Song", "book": "Book", "photo": "Photo", "document": "Document" } }, { "key": "bytes", "name": "Size", "type": "number", "readonly": true, "format": "bytes" }, { "key": "film", "name": "Film", "type": "link", "link_to": "film", "readonly": true }, { "key": "episode", "name": "Episode", "type": "link", "link_to": "film_episode", "readonly": true }, { "key": "series", "name": "Series", "type": "link", "link_to": "film", "readonly": true, "hidden": true }, { "key": "song", "name": "Song", "type": "link", "link_to": "song", "readonly": true }, { "key": "book", "name": "Book", "type": "link", "link_to": "book", "readonly": true }, { "key": "photo", "name": "Photo", "type": "link", "link_to": "photo", "readonly": true }, { "key": "document", "name": "Document", "type": "link", "link_to": "document", "readonly": true }, { "key": "in_hidden", "name": "In Hidden", "type": "bool", "readonly": true, "hidden": true } ], "title": "name", "date": null, "project": null, "order": null, "slip": { "title": "name", "subtitle": "kind", "trailing": "bytes", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "name", "kind", "bytes", "fetch", "film", "episode", "song", "book", "photo", "document" ] } ], "seal": { "clear": [ "fetch", "kind", "bytes", "film", "episode", "series", "song", "book", "photo", "document" ], "blind": [ "name" ] }, "sort": { "column": "name", "descending": false }, "instructions": "One row per record a download landed: the file's name, what it landed as, and a link to the record in its own tool (a film or an episode in Cinemas, a song in Music, a book in Books, a photo in Photos, a document in Documents). The Mac's fetch_landed act writes these; never by hand." }, { "format_version": 1, "retired": [ { "key": "notes", "type": "longtext" } ], "id": "film", "name": "Film", "plural": "Films", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "title", "name": "Title", "type": "text", "required": true, "placeholder": "The film's or series' title" }, { "key": "year", "name": "Year", "type": "text", "placeholder": "2019" }, { "key": "poster", "name": "Poster", "type": "photo" }, { "key": "backdrop", "name": "Backdrop", "type": "photo" }, { "key": "kind", "name": "Kind", "type": "choice", "choices": [ "film", "series", "clip" ], "labels": { "film": "Film", "series": "Series", "clip": "Clip" }, "default": "film" }, { "key": "status", "name": "Status", "type": "choice", "choices": [ "want_to_watch", "watching", "watched", "stopped" ], "labels": { "want_to_watch": "Want to watch", "watching": "Watching", "watched": "Watched", "stopped": "Stopped" }, "default": "want_to_watch" }, { "key": "file", "name": "Film", "type": "file", "readonly": true }, { "key": "watched_on", "name": "Watched", "type": "date" }, { "key": "rating", "name": "Rating", "type": "number", "units": { "one": "{n} of 5", "other": "{n} of 5" } }, { "key": "review", "name": "Review", "type": "longtext", "placeholder": "What you thought of it" }, { "key": "minutes", "name": "Length", "type": "number", "units": { "one": "minute", "other": "minutes" }, "format": "duration" }, { "key": "director", "name": "Director", "type": "text", "placeholder": "Who directed it" }, { "key": "cast", "name": "Cast", "type": "text", "placeholder": "Who is in it" }, { "key": "genres", "name": "Genres", "type": "text" }, { "key": "synopsis", "name": "Synopsis", "type": "longtext" }, { "key": "certificate", "name": "Certificate", "type": "text" }, { "key": "language", "name": "Language", "type": "text" }, { "key": "country", "name": "Country", "type": "text" }, { "key": "tmdb_id", "name": "TMDB", "type": "text", "readonly": true }, { "key": "imdb_id", "name": "IMDb", "type": "text", "readonly": true }, { "key": "tvdb_id", "name": "TheTVDB", "type": "text", "readonly": true }, { "key": "original_title", "name": "Original title", "type": "text", "placeholder": "The title in its own language" }, { "key": "chapters", "name": "Chapters", "type": "longtext", "readonly": true, "hidden": true }, { "key": "subtitles", "name": "Subtitle tracks", "type": "longtext", "readonly": true, "hidden": true }, { "key": "subtitle_work", "name": "Subtitle work", "type": "choice", "choices": [ "find", "generate", "finding", "generating", "translating", "ready", "none", "failed", "file" ], "readonly": false, "labels": { "find": "Waiting for your Mac to find them", "generate": "Waiting for your Mac to make them", "finding": "Finding", "generating": "Making", "translating": "Translating", "ready": "Ready", "none": "None found", "failed": "Not made", "file": "Waiting for your Mac to lay your file" }, "hidden": true }, { "key": "subtitle_note", "name": "Subtitles", "type": "text", "readonly": true }, { "key": "oshash", "name": "OpenSubtitles hash", "type": "text", "readonly": true, "hidden": true }, { "key": "subtitle_choice", "name": "Subtitles chosen", "type": "text", "readonly": true, "hidden": true }, { "key": "subtitle_offset", "name": "Subtitle timing", "type": "number", "readonly": true, "hidden": true }, { "key": "subtitle_given", "name": "Subtitles you gave", "type": "file", "readonly": true, "hidden": true }, { "key": "subtitle_given_language", "name": "Your subtitles' language", "type": "text", "readonly": true, "hidden": true }, { "key": "original", "name": "The original file", "type": "file", "readonly": true, "hidden": true }, { "key": "original_bytes", "name": "The original's size", "type": "number", "readonly": true, "hidden": true }, { "key": "original_sha256", "name": "The original's fingerprint", "type": "text", "readonly": true, "hidden": true }, { "key": "video_range", "name": "Picture range", "type": "text", "readonly": true, "hidden": true }, { "key": "sdr_variant", "name": "An SDR picture beside it", "type": "bool", "readonly": true, "hidden": true }, { "key": "in_hidden", "name": "In Hidden", "type": "bool", "readonly": true, "hidden": true }, { "key": "poster_before", "name": "The poster before a frame was picked", "type": "photo", "readonly": true, "hidden": true }, { "key": "poster_from", "name": "Where the picked poster was taken", "type": "number", "readonly": true, "hidden": true }, { "key": "position", "name": "Watched to", "type": "number", "readonly": true, "format": "duration" }, { "key": "position_at", "name": "Last watched", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "recommended_by", "name": "Recommended by", "type": "link", "link_to": "person" }, { "key": "recommended_by_name", "name": "Recommended by (name)", "type": "text", "placeholder": "Someone not in People" }, { "key": "watched_with", "name": "Watched with", "type": "text", "placeholder": "Who you watched it with" }, { "key": "added_on", "name": "Added", "type": "date" }, { "key": "last_watched_at", "name": "Last watched", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "needs_mac", "name": "Converting on your Mac", "type": "bool", "readonly": true }, { "key": "source_file", "name": "The file as it came", "type": "file", "readonly": true }, { "key": "source_url", "name": "From", "type": "text", "readonly": true }, { "key": "uploader", "name": "By", "type": "text", "placeholder": "Who put it online" }, { "key": "filled_from", "name": "Filled from", "type": "longtext", "readonly": true }, { "key": "sha256", "name": "The file's fingerprint", "type": "text", "readonly": true }, { "key": "height", "name": "Picture height", "type": "number", "readonly": true }, { "key": "bitrate", "name": "Bitrate", "type": "number", "readonly": true }, { "key": "on_phone", "name": "On this phone", "type": "choice", "choices": [ "absent", "keeping", "kept" ], "readonly": true, "labels": { "absent": "Not on this phone", "keeping": "Coming down", "kept": "On this phone" } }, { "key": "sent_by", "name": "Sent by", "type": "text", "readonly": true }, { "key": "sent_by_number", "name": "Sent from", "type": "text", "readonly": true }, { "key": "sent_at", "name": "Sent", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "send_id", "name": "Send", "type": "text", "readonly": true } ], "title": "title", "date": "last_watched_at", "project": null, "order": null, "slip": { "title": "title", "subtitle": "year", "trailing": "status", "photo": "poster", "toggle": null, "player": "file" }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "poster", "title", "year", "kind", "status", "rating", "minutes", "subtitle_note" ] }, { "heading": "Watched", "columns": [ "watched_on", "last_watched_at", "watched_with", "recommended_by", "recommended_by_name" ] }, { "heading": "Review", "columns": [ "review" ] }, { "heading": "Film", "columns": [ "synopsis", "director", "cast", "genres", "certificate", "language", "country", "backdrop", "added_on", "on_phone", "tmdb_id", "imdb_id" ] } ], "seal": { "clear": [ "poster", "backdrop", "kind", "status", "file", "watched_on", "minutes", "position", "position_at", "added_on", "last_watched_at", "needs_mac", "source_file", "sha256", "height", "bitrate", "on_phone", "filled_from", "sent_at", "send_id", "subtitles", "subtitle_work", "subtitle_note", "oshash", "subtitle_choice", "subtitle_offset", "original", "original_bytes", "original_sha256", "video_range", "sdr_variant", "subtitle_given", "subtitle_given_language", "poster_before", "poster_from" ], "blind": [ "title" ] }, "send": { "columns": [ "title", "year", "poster", "backdrop", "kind", "file", "minutes", "director", "cast", "genres", "synopsis", "certificate", "language", "country", "tmdb_id", "imdb_id", "tvdb_id", "original_title", "chapters", "sha256", "height", "bitrate" ], "files": [ "poster", "backdrop", "file" ], "folders": [ "file" ], "same": [ [ "sha256" ], [ "imdb_id" ], [ "tmdb_id" ] ], "with": [ { "table": "film_season", "by": "film" } ] }, "sort": { "column": "title", "descending": false }, "empty": { "title": "A seat for your first film." }, "create": { "label": "Add a film", "doors": [ { "id": "files", "label": "Add files", "object": "pouch", "files": { "types": [ "public.mpeg-4", "com.apple.quicktime-movie", "public.avi", "org.matroska.mkv" ], "many": true } }, { "id": "folder", "label": "Add a folder", "object": "portfolio", "files": { "types": [ "public.folder" ] } }, { "id": "find", "label": "Find a film", "object": "frame", "act": { "name": "find_film", "argument": "query", "lands": "film" } } ] }, "related": [ { "label": "Seasons", "table": "film_season", "column": "film" }, { "label": "Episodes", "table": "film_episode", "column": "series" } ], "commands": [ { "id": "play", "label": "Play", "kind": "update", "method": "shell.player", "data": { "table": "film", "op": "play" }, "bindings": { "id": "$id" }, "receipt": "Playing {name}", "object": "slip" }, { "id": "play_from_start", "label": "Play from the start", "kind": "update", "method": "shell.player", "data": { "table": "film", "op": "play", "at_s": 0 }, "bindings": { "id": "$id" }, "when": { "position": { "not": [ false, 0 ] } }, "receipt": "Playing {name} from the start", "object": "slip" }, { "id": "mark_watched", "label": "Mark watched", "kind": "update", "method": "films.mark", "data": { "table": "film", "watched": true }, "bindings": { "id": "$id" }, "when": { "status": [ "want_to_watch", "watching", "stopped" ] }, "receipt": "Watched {name}", "object": "stamp" }, { "id": "mark_unwatched", "label": "Mark unwatched", "kind": "update", "method": "films.mark", "data": { "table": "film", "watched": false }, "bindings": { "id": "$id" }, "when": { "status": "watched" }, "receipt": "{name} is unwatched", "object": "folder" }, { "id": "find_details", "label": "Find details", "kind": "update", "method": "object.act", "data": { "act": "find_film" }, "bindings": { "film": "$id" }, "when": { "tmdb_id": [ false, "" ] }, "receipt": "Looking up {name}", "object": "loop" }, { "id": "find_subtitles", "label": "Find subtitles", "kind": "update", "verb": "update_record", "data": { "table": "film", "patch": { "subtitle_work": "find" } }, "bindings": { "id": "$id" }, "when": { "file": { "not": [ false, "" ] }, "subtitle_work": { "not": [ "find", "generate", "finding", "generating", "translating", "file" ] } }, "receipt": "Your Mac will look for subtitles for {name}", "object": "loop" }, { "id": "generate_subtitles", "label": "Make subtitles", "kind": "update", "verb": "update_record", "data": { "table": "film", "patch": { "subtitle_work": "generate" } }, "bindings": { "id": "$id" }, "when": { "file": { "not": [ false, "" ] }, "subtitle_work": { "not": [ "find", "generate", "finding", "generating", "translating", "file" ] } }, "receipt": "Your Mac will make subtitles for {name}", "object": "pencil" }, { "id": "give_subtitles", "label": "Give subtitles", "kind": "update", "method": "films.subtitleFile", "data": { "table": "film" }, "bindings": { "id": "$id" }, "when": { "file": { "not": [ false, "" ] }, "subtitle_work": { "not": [ "find", "generate", "finding", "generating", "translating", "file" ] } }, "receipt": "Your Mac will add your subtitles to {name}", "pick": { "argument": "path", "kind": "file", "label": "A subtitle file", "accept": [ "srt", "vtt" ] }, "object": "slip" }, { "id": "keep_on_phone", "label": "Keep on phone", "kind": "update", "method": "settings.openFlow", "data": { "flow": "keepFilm", "origin_table": "film" }, "bindings": { "origin_id": "$id" }, "when": { "kind": "film", "on_phone": "absent" }, "receipt": "Keeping {name} on this phone", "object": "folder" }, { "id": "keep_series", "label": "Keep series", "kind": "update", "method": "settings.openFlow", "data": { "flow": "keepFilm", "origin_table": "film" }, "bindings": { "origin_id": "$id" }, "when": { "kind": "series", "on_phone": "absent" }, "receipt": "Keeping {name} on this phone", "object": "folder" }, { "id": "remove_download", "label": "Remove download", "kind": "update", "method": "settings.openFlow", "data": { "flow": "removeFilmDownload", "origin_table": "film" }, "bindings": { "origin_id": "$id" }, "when": { "on_phone": [ "keeping", "kept" ] }, "receipt": "Removed {name} from this phone", "object": "bin" } ], "instructions": "One row per film or series the owner owns as files, means to watch or has watched; kind is film or series. A film with a file plays in the app: file is the stream the object serves (an HLS master under films// made by the Mac, or a playable MP4 or MOV kept whole as films//whole.); a film whose file still needs converting holds the upload in source_file with needs_mac true until the Mac importer's stream lands; a film with neither is a want-to-watch poster. A series holds no file: its seasons are film_season rows and their episodes film_episode rows. status is want_to_watch, watching, watched or stopped; watched_on is the day the owner finished it, last_watched_at when it last played, both stamped by the player or by Mark watched, never guessed. position (seconds into the film, the resume point) and position_at are written by the phone's player alone; a series' position_at is the time any of its episodes last played. rating is out of 5; review is the owner's words. Details (synopsis, cast, genres, certificate, language, country, director, minutes, tmdb_id, imdb_id, poster and backdrop) come from the file's own tags, then its folder and name (Title (2019).mkv), then find_film { query } | { film } at the object (TMDB), each filling only empty columns; filled_from says, as JSON, where each lookup's columns came from. added_on is the day the row was made. sha256 is the SHA-256 of the file as it came in (the same file twice is already here); height (the picture's height in pixels) and bitrate (kilobits a second) are the file's, read when it came in: of two files of the same title and year, the taller then the denser is kept. on_phone is answered by each phone (absent, keeping, kept) and never stored. Lists are this table's groups. Every play is also a watch row. subtitles is the one answer to which subtitle tracks the film's stream carries, as JSON, one entry per WebVTT rendition in its master: { language (BCP 47), name (as the player lists it), source (embedded: a text track inside the file; sidecar: a .srt/.vtt/.ass beside it; opensubtitles: found on OpenSubtitles.com; generated: transcribed on the Mac by whisper.cpp in the film's own language; translated: a generated or found track's text translated, its timings kept), made_at (ISO-8601), file (the rendition's WebVTT in the film's folder), forced?, from? (a translation's source language), by? (the OpenSubtitles file id, the whisper model or the translator) }, written by the Mac alone. subtitle_work is what the Mac is asked or doing: Find subtitles sets find and Make subtitles sets generate (the Mac's film:subtitles --queue drains both), then finding, generating or translating while it works, then ready, none (nothing found and nothing made) or failed; subtitle_note is the one line it keeps current, shown on the film. oshash is the OpenSubtitles hash of the file as it came in (its size and its first and last 64 KB), read at import so a later Find subtitles matches timings without the file. subtitle_choice is the subtitle track the owner last chose in the player for this film (the rendition's language and name as JSON, or off), written by the phone's player and restored at the next play. subtitle_offset is the owner's timing shift for this film's subtitles, in milliseconds (negative shows them earlier, positive later), set in the player in 100 ms steps and reset to 0; absent is 0. The core keeps it and its words; the players only shift the cues. original is the film's original file, kept untouched beside its stream and sealed like it: the key of a small sealed index (films//original//index.json) naming the piece count, piece size, total bytes, sha256 and file extension of the fixed-size sealed pieces beside it, which the Mac reads by range; original_bytes is its size and original_sha256 the SHA-256 of the whole file. All three are written by the Mac importer alone, after the stream (a film plays before its original is up); empty means the film keeps no original yet. The phone never fetches the original. video_range is the stream's picture range as its top variant has it: SDR, PQ (HDR10, Dolby Vision's base) or HLG, read from the picture's transfer by the Mac importer. sdr_variant is true once the master also lists an SDR picture (H.264, BT.709, tone-mapped from the HDR one, in video-sdr/ beside it) so a screen that shows no HDR (an SDR TV, an AirPlay receiver) plays the film; an HDR film without it plays only on an HDR screen. Both are written by the Mac alone (film:import, film:sdr). Give subtitles is the owner's own subtitle file: the phone picks a .srt or .vtt from its files, keeps it sealed in the film's folder as subtitle_given (films//given/sub-.), says its language in subtitle_given_language where the file's name says one (Film.en.srt; else empty, and the Mac takes the first language the owner reads) and sets subtitle_work to file; the Mac's film:subtitles --queue lays it as a track (source sidecar) in place of none, then ready or failed as for any ask.", "groups": { "stack": "covers" }, "card": { "face": "film.poster", "offers": [ "film.poster" ], "fields": [ { "slot": "photo", "column": "poster" }, { "slot": "title", "column": "title" }, { "slot": "year", "column": "year" }, { "slot": "state", "column": "status", "only": [ "want_to_watch", "watching", "watched", "stopped" ], "also": [ "needs_mac" ] }, { "slot": "date", "column": "watched_on" }, { "slot": "used", "column": "position" }, { "slot": "limit", "column": "minutes" }, { "slot": "facts", "column": "kind" }, { "slot": "count", "column": "rating" }, { "slot": "body", "column": "review" } ], "pages": [ "review" ], "opens": { "table": "film_season", "by": "film", "order": [ "number" ], "when": { "column": "kind", "values": [ "series" ] } } } }, { "format_version": 1, "id": "film_episode", "name": "Episode", "plural": "Episodes", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "season", "name": "Season", "type": "link", "required": true, "link_to": "film_season", "contributes": { "label": "Episodes" } }, { "key": "series", "name": "Series", "type": "link", "link_to": "film", "contributes": false }, { "key": "number", "name": "Episode", "type": "number", "required": true }, { "key": "season_number", "name": "Season number", "type": "number", "computed": { "lookup": { "through": "season", "column": "number" } } }, { "key": "series_title", "name": "Series title", "type": "text", "computed": { "lookup": { "through": "season", "column": "series_title" } } }, { "key": "title", "name": "Title", "type": "text", "required": true, "placeholder": "The episode's title" }, { "key": "synopsis", "name": "Synopsis", "type": "longtext" }, { "key": "still", "name": "Still", "type": "photo" }, { "key": "file", "name": "Episode", "type": "file", "readonly": true }, { "key": "minutes", "name": "Length", "type": "number", "units": { "one": "minute", "other": "minutes" }, "format": "duration" }, { "key": "aired", "name": "Aired", "type": "date" }, { "key": "status", "name": "Status", "type": "choice", "choices": [ "watching", "watched" ], "labels": { "watching": "Watching", "watched": "Watched" } }, { "key": "watched_on", "name": "Watched", "type": "date" }, { "key": "rating", "name": "Rating", "type": "number", "units": { "one": "{n} of 5", "other": "{n} of 5" } }, { "key": "position", "name": "Watched to", "type": "number", "readonly": true, "format": "duration" }, { "key": "position_at", "name": "Last watched", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "tmdb_id", "name": "TMDB", "type": "text", "readonly": true }, { "key": "tvdb_id", "name": "TheTVDB", "type": "text", "readonly": true }, { "key": "chapters", "name": "Chapters", "type": "longtext", "readonly": true, "hidden": true }, { "key": "subtitles", "name": "Subtitle tracks", "type": "longtext", "readonly": true, "hidden": true }, { "key": "subtitle_work", "name": "Subtitle work", "type": "choice", "choices": [ "find", "generate", "finding", "generating", "translating", "ready", "none", "failed", "file" ], "readonly": false, "labels": { "find": "Waiting for your Mac to find them", "generate": "Waiting for your Mac to make them", "finding": "Finding", "generating": "Making", "translating": "Translating", "ready": "Ready", "none": "None found", "failed": "Not made", "file": "Waiting for your Mac to lay your file" }, "hidden": true }, { "key": "subtitle_note", "name": "Subtitles", "type": "text", "readonly": true }, { "key": "oshash", "name": "OpenSubtitles hash", "type": "text", "readonly": true, "hidden": true }, { "key": "subtitle_choice", "name": "Subtitles chosen", "type": "text", "readonly": true, "hidden": true }, { "key": "subtitle_offset", "name": "Subtitle timing", "type": "number", "readonly": true, "hidden": true }, { "key": "subtitle_given", "name": "Subtitles you gave", "type": "file", "readonly": true, "hidden": true }, { "key": "subtitle_given_language", "name": "Your subtitles' language", "type": "text", "readonly": true, "hidden": true }, { "key": "original", "name": "The original file", "type": "file", "readonly": true, "hidden": true }, { "key": "original_bytes", "name": "The original's size", "type": "number", "readonly": true, "hidden": true }, { "key": "original_sha256", "name": "The original's fingerprint", "type": "text", "readonly": true, "hidden": true }, { "key": "video_range", "name": "Picture range", "type": "text", "readonly": true, "hidden": true }, { "key": "sdr_variant", "name": "An SDR picture beside it", "type": "bool", "readonly": true, "hidden": true }, { "key": "in_hidden", "name": "In Hidden", "type": "bool", "readonly": true, "hidden": true }, { "key": "still_before", "name": "The still before a frame was picked", "type": "photo", "readonly": true, "hidden": true }, { "key": "still_from", "name": "Where the picked still was taken", "type": "number", "readonly": true, "hidden": true }, { "key": "filled_from", "name": "Filled from", "type": "longtext", "readonly": true }, { "key": "needs_mac", "name": "Converting on your Mac", "type": "bool", "readonly": true }, { "key": "source_file", "name": "The file as it came", "type": "file", "readonly": true }, { "key": "sha256", "name": "The file's fingerprint", "type": "text", "readonly": true }, { "key": "height", "name": "Picture height", "type": "number", "readonly": true }, { "key": "bitrate", "name": "Bitrate", "type": "number", "readonly": true }, { "key": "on_phone", "name": "On this phone", "type": "choice", "choices": [ "absent", "keeping", "kept" ], "readonly": true, "labels": { "absent": "Not on this phone", "keeping": "Coming down", "kept": "On this phone" } }, { "key": "sent_by", "name": "Sent by", "type": "text", "readonly": true }, { "key": "sent_by_number", "name": "Sent from", "type": "text", "readonly": true }, { "key": "sent_at", "name": "Sent", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "send_id", "name": "Send", "type": "text", "readonly": true } ], "title": "title", "date": "aired", "project": null, "order": null, "slip": { "title": "title", "subtitle": "series_title", "trailing": "number", "photo": "still", "toggle": null, "player": "file" }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "still", "title", "series", "season", "number", "minutes", "subtitle_note", "aired" ] }, { "heading": "Watched", "columns": [ "status", "watched_on", "rating" ] }, { "heading": "Episode", "columns": [ "synopsis", "on_phone", "tmdb_id" ] } ], "seal": { "clear": [ "season", "series", "number", "still", "file", "minutes", "aired", "status", "watched_on", "position", "position_at", "needs_mac", "source_file", "sha256", "height", "bitrate", "on_phone", "filled_from", "sent_at", "send_id", "subtitles", "subtitle_work", "subtitle_note", "oshash", "subtitle_choice", "subtitle_offset", "original", "original_bytes", "original_sha256", "video_range", "sdr_variant", "subtitle_given", "subtitle_given_language", "still_before", "still_from" ], "blind": [ "title" ] }, "send": { "columns": [ "series", "number", "title", "synopsis", "still", "file", "minutes", "aired", "tmdb_id", "tvdb_id", "chapters", "sha256", "height", "bitrate" ], "files": [ "still", "file" ], "folders": [ "file" ] }, "sort": { "column": "number", "descending": false }, "empty": { "title": "No episodes yet", "message": "Add an episode to a season from the season's page." }, "commands": [ { "id": "play", "label": "Play", "kind": "update", "method": "shell.player", "data": { "table": "film_episode", "op": "play" }, "bindings": { "id": "$id" }, "when": { "file": { "not": [ false, "" ] } }, "receipt": "Playing {name}", "object": "slip" }, { "id": "play_from_start", "label": "Play from the start", "kind": "update", "method": "shell.player", "data": { "table": "film_episode", "op": "play", "at_s": 0 }, "bindings": { "id": "$id" }, "when": { "position": { "not": [ false, 0 ] } }, "receipt": "Playing {name} from the start", "object": "slip" }, { "id": "mark_watched", "label": "Mark watched", "kind": "update", "method": "films.mark", "data": { "table": "film_episode", "watched": true }, "bindings": { "id": "$id" }, "when": { "status": { "not": "watched" } }, "receipt": "Watched {name}", "object": "stamp" }, { "id": "mark_unwatched", "label": "Mark unwatched", "kind": "update", "method": "films.mark", "data": { "table": "film_episode", "watched": false }, "bindings": { "id": "$id" }, "when": { "status": "watched" }, "receipt": "{name} is unwatched", "object": "folder" }, { "id": "find_subtitles", "label": "Find subtitles", "kind": "update", "verb": "update_record", "data": { "table": "film_episode", "patch": { "subtitle_work": "find" } }, "bindings": { "id": "$id" }, "when": { "file": { "not": [ false, "" ] }, "subtitle_work": { "not": [ "find", "generate", "finding", "generating", "translating", "file" ] } }, "receipt": "Your Mac will look for subtitles for {name}", "object": "loop" }, { "id": "generate_subtitles", "label": "Make subtitles", "kind": "update", "verb": "update_record", "data": { "table": "film_episode", "patch": { "subtitle_work": "generate" } }, "bindings": { "id": "$id" }, "when": { "file": { "not": [ false, "" ] }, "subtitle_work": { "not": [ "find", "generate", "finding", "generating", "translating", "file" ] } }, "receipt": "Your Mac will make subtitles for {name}", "object": "pencil" }, { "id": "give_subtitles", "label": "Give subtitles", "kind": "update", "method": "films.subtitleFile", "data": { "table": "film_episode" }, "bindings": { "id": "$id" }, "when": { "file": { "not": [ false, "" ] }, "subtitle_work": { "not": [ "find", "generate", "finding", "generating", "translating", "file" ] } }, "receipt": "Your Mac will add your subtitles to {name}", "pick": { "argument": "path", "kind": "file", "label": "A subtitle file", "accept": [ "srt", "vtt" ] }, "object": "slip" }, { "id": "keep_on_phone", "label": "Keep on phone", "kind": "update", "method": "settings.openFlow", "data": { "flow": "keepFilm", "origin_table": "film_episode" }, "bindings": { "origin_id": "$id" }, "when": { "on_phone": "absent" }, "receipt": "Keeping {name} on this phone", "object": "folder" }, { "id": "remove_download", "label": "Remove download", "kind": "update", "method": "settings.openFlow", "data": { "flow": "removeFilmDownload", "origin_table": "film_episode" }, "bindings": { "origin_id": "$id" }, "when": { "on_phone": [ "keeping", "kept" ] }, "receipt": "Removed {name} from this phone", "object": "bin" } ], "instructions": "One row per episode of a season: the season, the series it belongs to (the season's own series), its number within the season, its title, synopsis and still, its length in minutes and the day it aired. file is the stream the object serves (as a film's); source_file and needs_mac hold an upload waiting for the Mac. status is watching or watched, stamped by the player or by Mark watched with watched_on; position and position_at are the player's resume point, written by the phone alone. rating is out of 5. sha256 is the SHA-256 of the file as it came in (the same file twice is already here); height (the picture's height in pixels) and bitrate (kilobits a second) are the file's, read when it came in: of two files of the same title and year, the taller then the denser is kept. season_number and series_title are read off the season and are never written. tmdb_id is TMDB's, filled by find_film on the series. on_phone is answered by each phone (absent, keeping, kept) and never stored. Every play is also a watch row. subtitles is the one answer to which subtitle tracks the film's stream carries, as JSON, one entry per WebVTT rendition in its master: { language (BCP 47), name (as the player lists it), source (embedded: a text track inside the file; sidecar: a .srt/.vtt/.ass beside it; opensubtitles: found on OpenSubtitles.com; generated: transcribed on the Mac by whisper.cpp in the film's own language; translated: a generated or found track's text translated, its timings kept), made_at (ISO-8601), file (the rendition's WebVTT in the film's folder), forced?, from? (a translation's source language), by? (the OpenSubtitles file id, the whisper model or the translator) }, written by the Mac alone. subtitle_work is what the Mac is asked or doing: Find subtitles sets find and Make subtitles sets generate (the Mac's film:subtitles --queue drains both), then finding, generating or translating while it works, then ready, none (nothing found and nothing made) or failed; subtitle_note is the one line it keeps current, shown on the film. oshash is the OpenSubtitles hash of the file as it came in (its size and its first and last 64 KB), read at import so a later Find subtitles matches timings without the file. subtitle_choice is the subtitle track the owner last chose in the player for this film (the rendition's language and name as JSON, or off), written by the phone's player and restored at the next play. subtitle_offset is the owner's timing shift for this film's subtitles, in milliseconds (negative shows them earlier, positive later), set in the player in 100 ms steps and reset to 0; absent is 0. The core keeps it and its words; the players only shift the cues. original is the film's original file, kept untouched beside its stream and sealed like it: the key of a small sealed index (films//original//index.json) naming the piece count, piece size, total bytes, sha256 and file extension of the fixed-size sealed pieces beside it, which the Mac reads by range; original_bytes is its size and original_sha256 the SHA-256 of the whole file. All three are written by the Mac importer alone, after the stream (a film plays before its original is up); empty means the film keeps no original yet. The phone never fetches the original. video_range is the stream's picture range as its top variant has it: SDR, PQ (HDR10, Dolby Vision's base) or HLG, read from the picture's transfer by the Mac importer. sdr_variant is true once the master also lists an SDR picture (H.264, BT.709, tone-mapped from the HDR one, in video-sdr/ beside it) so a screen that shows no HDR (an SDR TV, an AirPlay receiver) plays the film; an HDR film without it plays only on an HDR screen. Both are written by the Mac alone (film:import, film:sdr). Give subtitles is the owner's own subtitle file: the phone picks a .srt or .vtt from its files, keeps it sealed in the film's folder as subtitle_given (films//given/sub-.), says its language in subtitle_given_language where the file's name says one (Film.en.srt; else empty, and the Mac takes the first language the owner reads) and sets subtitle_work to file; the Mac's film:subtitles --queue lays it as a track (source sidecar) in place of none, then ready or failed as for any ask.", "card": { "face": "episode.lobby", "offers": [ "episode.lobby" ], "fields": [ { "slot": "photo", "column": "still" }, { "slot": "title", "column": "title" }, { "slot": "subtitle", "column": "season_number", "also": [ "number" ], "line": "field.episode_mark" }, { "slot": "number", "column": "number" }, { "slot": "limit", "column": "minutes" }, { "slot": "used", "column": "position" }, { "slot": "state", "column": "status", "only": [ "watching", "watched" ], "also": [ "needs_mac" ] }, { "slot": "date", "column": "watched_on" }, { "slot": "source", "column": "series_title" } ] } }, { "format_version": 1, "id": "film_season", "name": "Season", "plural": "Seasons", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "film", "name": "Series", "type": "link", "required": true, "link_to": "film", "contributes": { "label": "Seasons" } }, { "key": "number", "name": "Season", "type": "number", "required": true }, { "key": "title", "name": "Title", "type": "text", "required": true, "placeholder": "Season one" }, { "key": "year", "name": "Year", "type": "text", "placeholder": "2019" }, { "key": "series_title", "name": "Series title", "type": "text", "computed": { "lookup": { "through": "film", "column": "title" } } }, { "key": "poster", "name": "Poster", "type": "photo" }, { "key": "series_poster", "name": "Series poster", "type": "photo", "computed": { "lookup": { "through": "film", "column": "poster" } } }, { "key": "episodes", "name": "Episodes", "type": "number", "computed": { "rollup": { "table": "film_episode", "link": "season", "op": "count" } } }, { "key": "watched", "name": "Watched", "type": "number", "computed": { "rollup": { "table": "film_episode", "link": "season", "op": "count", "where": { "column": "status", "values": [ "watched" ] } } } }, { "key": "tmdb_id", "name": "TMDB", "type": "text", "readonly": true }, { "key": "intro_from", "name": "Intro starts", "type": "number", "format": "duration" }, { "key": "intro_to", "name": "Intro ends", "type": "number", "format": "duration" }, { "key": "on_phone", "name": "On this phone", "type": "choice", "choices": [ "absent", "keeping", "kept" ], "readonly": true, "labels": { "absent": "Not on this phone", "keeping": "Coming down", "kept": "On this phone" } }, { "key": "sent_by", "name": "Sent by", "type": "text", "readonly": true }, { "key": "sent_by_number", "name": "Sent from", "type": "text", "readonly": true }, { "key": "sent_at", "name": "Sent", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "send_id", "name": "Send", "type": "text", "readonly": true }, { "key": "in_hidden", "name": "In Hidden", "type": "bool", "readonly": true, "hidden": true } ], "title": "title", "date": null, "project": null, "order": null, "slip": { "title": "title", "subtitle": "film", "trailing": "year", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "film", "number", "title", "year", "episodes" ] }, { "heading": "Intro", "columns": [ "intro_from", "intro_to" ] } ], "seal": { "clear": [ "film", "number", "year", "poster", "intro_from", "intro_to", "on_phone", "sent_at", "send_id" ], "blind": [ "title" ] }, "send": { "columns": [ "number", "title", "year", "poster", "tmdb_id", "intro_from", "intro_to" ], "files": [ "poster" ], "with": [ { "table": "film_episode", "by": "season" } ] }, "sort": { "column": "number", "descending": false }, "empty": { "title": "No seasons yet", "message": "Add a season to a series from the series' page." }, "commands": [ { "id": "keep_season", "label": "Keep season", "kind": "update", "method": "settings.openFlow", "data": { "flow": "keepFilm", "origin_table": "film_season" }, "bindings": { "origin_id": "$id" }, "when": { "on_phone": "absent" }, "receipt": "Keeping {name} on this phone", "object": "folder" }, { "id": "remove_download", "label": "Remove download", "kind": "update", "method": "settings.openFlow", "data": { "flow": "removeFilmDownload", "origin_table": "film_season" }, "bindings": { "origin_id": "$id" }, "when": { "on_phone": [ "keeping", "kept" ] }, "receipt": "Removed {name} from this phone", "object": "bin" } ], "instructions": "One row per season of a series: the series (a film whose kind is series), its number, its title, the year it aired and its poster; episodes counts its film_episode rows and watched those whose status is watched; series_poster is its series' poster. tmdb_id is TMDB's, filled by find_film. intro_from and intro_to are the seconds the series' intro runs in its episodes, marked once by the owner. on_phone is answered by each phone (absent, keeping, kept) and never stored.", "card": { "face": "season.card", "offers": [ "season.card" ], "fields": [ { "slot": "photo", "column": "series_poster" }, { "slot": "title", "column": "title" }, { "slot": "number", "column": "number" }, { "slot": "year", "column": "year" }, { "slot": "subtitle", "column": "episodes", "line": "field.season_episodes" }, { "slot": "limit", "column": "episodes" }, { "slot": "used", "column": "watched" }, { "slot": "source", "column": "series_title" } ], "opens": { "table": "film_episode", "by": "season", "order": [ "number" ] } } }, { "format_version": 1, "id": "health_day", "name": "Health day", "plural": "Health days", "row_key": "key", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "key", "name": "Key", "type": "text", "required": true, "hidden": true }, { "key": "metric", "name": "Measure", "type": "choice", "required": true, "choices": [ "steps", "distance", "active_energy", "flights", "stand_hours", "resting_heart_rate", "heart_rate_variability", "vo2_max", "sleep_asleep", "sleep_in_bed", "sleep_core", "sleep_deep", "sleep_rem", "sleep_awake", "weight", "body_fat", "blood_pressure_systolic", "blood_pressure_diastolic", "glucose", "mindful_minutes", "menstrual_flow", "basal_energy", "exercise_minutes", "stand_minutes", "move_minutes", "distance_cycling", "distance_swimming", "distance_wheelchair", "distance_snow_sports", "push_count", "swimming_strokes", "time_in_daylight", "falls", "heart_rate", "walking_heart_rate", "oxygen_saturation", "respiratory_rate", "wrist_temperature", "breathing_disturbances", "walking_speed", "walking_step_length", "walking_asymmetry", "walking_double_support", "walking_steadiness", "stair_ascent_speed", "stair_descent_speed", "six_minute_walk", "running_speed", "running_power", "running_stride_length", "running_vertical_oscillation", "running_ground_contact", "cycling_speed", "cycling_power", "cycling_cadence", "environmental_audio", "headphone_audio", "body_mass_index", "lean_body_mass", "height", "waist", "uv_exposure", "dietary_energy", "protein", "carbohydrates", "fat", "saturated_fat", "sugar", "fibre", "sodium", "dietary_cholesterol", "potassium", "calcium", "iron", "vitamin_c", "vitamin_d", "caffeine", "water", "toothbrushing", "handwashing", "high_heart_rate_events", "low_heart_rate_events", "irregular_rhythm_events", "low_cardio_fitness_events", "walking_steadiness_events", "loud_environment_events", "loud_headphone_events", "sleep_apnea_events", "sexual_activity", "intermenstrual_bleeding", "distance_rowing", "distance_paddling", "distance_skating", "distance_cross_country_skiing", "physical_effort", "heart_rate_recovery", "afib_burden", "basal_body_temperature", "peripheral_perfusion", "blood_alcohol", "forced_vital_capacity", "forced_expiratory_volume", "peak_expiratory_flow", "inhaler_uses", "insulin", "cycling_ftp", "environmental_sound_reduction", "fat_monounsaturated", "fat_polyunsaturated", "magnesium", "phosphorus", "zinc", "copper", "manganese", "chloride", "selenium", "iodine", "chromium", "molybdenum", "vitamin_a", "vitamin_b6", "vitamin_b12", "vitamin_e", "vitamin_k", "thiamin", "riboflavin", "niacin", "folate", "biotin", "pantothenic_acid", "alcoholic_drinks", "irregular_cycle_events", "infrequent_cycle_events", "prolonged_period_events", "persistent_bleeding_events" ], "readonly": true, "labels": { "steps": "Steps", "distance": "Walking and running", "active_energy": "Active energy", "flights": "Flights climbed", "stand_hours": "Stand hours", "resting_heart_rate": "Resting heart rate", "heart_rate_variability": "Heart rate variability", "vo2_max": "Cardio fitness", "sleep_asleep": "Asleep", "sleep_in_bed": "In bed", "sleep_core": "Core sleep", "sleep_deep": "Deep sleep", "sleep_rem": "REM sleep", "sleep_awake": "Awake in the night", "weight": "Weight", "body_fat": "Body fat", "blood_pressure_systolic": "Blood pressure, upper", "blood_pressure_diastolic": "Blood pressure, lower", "glucose": "Blood glucose", "mindful_minutes": "Mindful minutes", "menstrual_flow": "Period", "basal_energy": "Resting energy", "exercise_minutes": "Exercise minutes", "stand_minutes": "Stand minutes", "move_minutes": "Move minutes", "distance_cycling": "Cycling distance", "distance_swimming": "Swimming distance", "distance_wheelchair": "Wheelchair distance", "distance_snow_sports": "Downhill snow sports distance", "push_count": "Wheelchair pushes", "swimming_strokes": "Swimming strokes", "time_in_daylight": "Time in daylight", "falls": "Falls", "heart_rate": "Heart rate", "walking_heart_rate": "Walking heart rate", "oxygen_saturation": "Blood oxygen", "respiratory_rate": "Respiratory rate", "wrist_temperature": "Sleeping wrist temperature", "breathing_disturbances": "Breathing disturbances", "walking_speed": "Walking speed", "walking_step_length": "Walking step length", "walking_asymmetry": "Walking asymmetry", "walking_double_support": "Double support time", "walking_steadiness": "Walking steadiness", "stair_ascent_speed": "Stair speed, up", "stair_descent_speed": "Stair speed, down", "six_minute_walk": "Six-minute walk", "running_speed": "Running speed", "running_power": "Running power", "running_stride_length": "Running stride length", "running_vertical_oscillation": "Vertical oscillation", "running_ground_contact": "Ground contact time", "cycling_speed": "Cycling speed", "cycling_power": "Cycling power", "cycling_cadence": "Cycling cadence", "environmental_audio": "Environmental sound", "headphone_audio": "Headphone audio", "body_mass_index": "Body mass index", "lean_body_mass": "Lean body mass", "height": "Height", "waist": "Waist", "uv_exposure": "UV index", "dietary_energy": "Dietary energy", "protein": "Protein", "carbohydrates": "Carbohydrates", "fat": "Total fat", "saturated_fat": "Saturated fat", "sugar": "Sugar", "fibre": "Fibre", "sodium": "Sodium", "dietary_cholesterol": "Dietary cholesterol", "potassium": "Potassium", "calcium": "Calcium", "iron": "Iron", "vitamin_c": "Vitamin C", "vitamin_d": "Vitamin D", "caffeine": "Caffeine", "water": "Water", "toothbrushing": "Toothbrushing", "handwashing": "Handwashing", "high_heart_rate_events": "High heart rate notifications", "low_heart_rate_events": "Low heart rate notifications", "irregular_rhythm_events": "Irregular rhythm notifications", "low_cardio_fitness_events": "Low cardio fitness notifications", "walking_steadiness_events": "Walking steadiness notifications", "loud_environment_events": "Loud environment notifications", "loud_headphone_events": "Loud headphone notifications", "sleep_apnea_events": "Breathing disturbance notifications", "sexual_activity": "Sexual activity", "intermenstrual_bleeding": "Spotting", "distance_rowing": "Rowing distance", "distance_paddling": "Paddling distance", "distance_skating": "Skating distance", "distance_cross_country_skiing": "Cross-country skiing distance", "physical_effort": "Physical effort", "heart_rate_recovery": "Heart rate recovery", "afib_burden": "AFib history", "basal_body_temperature": "Basal body temperature", "peripheral_perfusion": "Peripheral perfusion", "blood_alcohol": "Blood alcohol", "forced_vital_capacity": "Forced vital capacity", "forced_expiratory_volume": "Forced expiratory volume, 1 s", "peak_expiratory_flow": "Peak expiratory flow", "inhaler_uses": "Inhaler use", "insulin": "Insulin delivery", "cycling_ftp": "Cycling functional threshold power", "environmental_sound_reduction": "Environmental sound reduction", "fat_monounsaturated": "Monounsaturated fat", "fat_polyunsaturated": "Polyunsaturated fat", "magnesium": "Magnesium", "phosphorus": "Phosphorus", "zinc": "Zinc", "copper": "Copper", "manganese": "Manganese", "chloride": "Chloride", "selenium": "Selenium", "iodine": "Iodine", "chromium": "Chromium", "molybdenum": "Molybdenum", "vitamin_a": "Vitamin A", "vitamin_b6": "Vitamin B6", "vitamin_b12": "Vitamin B12", "vitamin_e": "Vitamin E", "vitamin_k": "Vitamin K", "thiamin": "Thiamin", "riboflavin": "Riboflavin", "niacin": "Niacin", "folate": "Folate", "biotin": "Biotin", "pantothenic_acid": "Pantothenic acid", "alcoholic_drinks": "Alcoholic drinks", "irregular_cycle_events": "Irregular cycle notifications", "infrequent_cycle_events": "Infrequent period notifications", "prolonged_period_events": "Prolonged period notifications", "persistent_bleeding_events": "Persistent spotting notifications" } }, { "key": "day", "name": "Day", "type": "date", "required": true, "readonly": true }, { "key": "value", "name": "Value", "type": "number", "readonly": true }, { "key": "min", "name": "Lowest", "type": "number", "readonly": true }, { "key": "max", "name": "Highest", "type": "number", "readonly": true }, { "key": "unit", "name": "Unit", "type": "text", "readonly": true }, { "key": "samples", "name": "Readings", "type": "number", "readonly": true, "units": { "one": "{n} reading", "other": "{n} readings" } }, { "key": "state", "name": "Flow", "type": "choice", "choices": [ "none", "unspecified", "light", "medium", "heavy" ], "readonly": true, "labels": { "none": "None", "unspecified": "Flow", "light": "Light", "medium": "Medium", "heavy": "Heavy" } }, { "key": "source", "name": "From", "type": "choice", "choices": [ "healthkit", "health_connect", "export" ], "readonly": true, "labels": { "healthkit": "Apple Health", "health_connect": "Health Connect", "export": "Apple Health export" } } ], "title": "metric", "date": "day", "project": null, "order": null, "slip": { "title": "metric", "subtitle": "value", "trailing": "day", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "metric", "day", "value", "unit" ] }, { "heading": "The day's readings", "columns": [ "min", "max", "samples", "state", "source" ] } ], "seal": { "clear": [ "key", "day" ] }, "sort": { "column": "day", "descending": true }, "empty": { "title": "No health readings yet", "message": "Allow Cotton Health to read Apple Health and each day's numbers stand here." }, "create": { "label": "Bring in", "doors": [ { "id": "apple_health", "label": "Read Apple Health", "object": "device", "reads": "apple_health" }, { "id": "export", "label": "Bring in a Health export", "object": "folder", "files": { "types": [ "public.zip-archive", "public.xml" ] } } ] }, "instructions": "One row per measure per day, the main health table: the day's steps, walking and running distance (metres), active energy (kcal), flights, stand hours, resting heart rate (bpm), heart rate variability (SDNN, ms), cardio fitness (VO2 max, ml/kg/min), sleep by stage in minutes (asleep, in bed, core, deep, REM, awake; a night is the day it ended), weight (kg), body fat (%), blood pressure (mmHg, the day's mean), blood glucose (mg/dL, the day's mean), mindful minutes and, only when logged, the period's flow (state). value is in unit; min and max are the day's lowest and highest where a measure has them. Every other type Apple Health offers as a day's number lands here too, by the same rule: activity (resting energy, exercise, stand and move minutes, each kind of distance, pushes, strokes, daylight, falls), heart (the day's heart rate average with its least and most, walking heart rate, blood oxygen, respiratory rate, sleeping wrist temperature, breathing disturbances), mobility (walking speed, step length, asymmetry, double support, steadiness, stair speeds, six-minute walk), running and cycling metrics, sound exposure, body (BMI, lean mass, height, waist), UV, nutrition (energy, protein, carbohydrates, fat, sugar, fibre, sodium, minerals, vitamins, caffeine, water), and counts of events (toothbrushing minutes, handwashing, heart and sound notifications, spotting). Read from Apple Health, never written back: a person never edits a reading here, and Cotton never writes one to Health. Sealed: only the day stays clear on the object.", "card": { "face": "health.pedometer", "fields": [ { "slot": "title", "column": "metric" }, { "slot": "subtitle", "column": "value" }, { "slot": "date", "column": "day", "form": "weekday_date" } ] } }, { "format_version": 1, "id": "health_measurement", "name": "Measurement", "plural": "Measurements", "row_key": "key", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "key", "name": "Key", "type": "text", "required": true, "hidden": true }, { "key": "kind", "name": "Measure", "type": "choice", "required": true, "choices": [ "weight", "blood_pressure", "glucose", "temperature", "body_fat", "body_mass_index", "lean_body_mass", "height", "waist", "vo2_max", "six_minute_walk" ], "readonly": true, "labels": { "weight": "Weight", "blood_pressure": "Blood pressure", "glucose": "Blood glucose", "temperature": "Temperature", "body_fat": "Body fat", "body_mass_index": "Body mass index", "lean_body_mass": "Lean body mass", "height": "Height", "waist": "Waist", "vo2_max": "Cardio fitness", "six_minute_walk": "Six-minute walk" } }, { "key": "day", "name": "Day", "type": "date", "required": true, "readonly": true }, { "key": "measured_at", "name": "Taken", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "value", "name": "Reading", "type": "number", "readonly": true }, { "key": "second", "name": "Lower reading", "type": "number", "readonly": true }, { "key": "unit", "name": "Unit", "type": "text", "readonly": true }, { "key": "context", "name": "Taken", "type": "choice", "choices": [ "before_meal", "after_meal" ], "readonly": true, "labels": { "before_meal": "Before a meal", "after_meal": "After a meal" } }, { "key": "device", "name": "Recorded by", "type": "text", "readonly": true }, { "key": "sample", "name": "Sample", "type": "text", "readonly": true, "hidden": true }, { "key": "source", "name": "From", "type": "choice", "choices": [ "healthkit", "health_connect", "export" ], "readonly": true, "labels": { "healthkit": "Apple Health", "health_connect": "Health Connect", "export": "Apple Health export" } } ], "title": "kind", "date": "day", "project": null, "order": null, "slip": { "title": "kind", "subtitle": "value", "trailing": "measured_at", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "kind", "measured_at", "value", "second", "unit" ] }, { "heading": "The reading", "columns": [ "context", "device", "source" ] } ], "seal": { "clear": [ "key", "day" ] }, "sort": { "column": "day", "descending": true }, "empty": { "title": "No measurements yet", "message": "Weighings, blood pressures, glucose and temperatures from Apple Health stand here." }, "create": { "label": "Bring in", "doors": [ { "id": "apple_health", "label": "Read Apple Health", "object": "device", "reads": "apple_health" }, { "id": "export", "label": "Bring in a Health export", "object": "folder", "files": { "types": [ "public.zip-archive", "public.xml" ] } } ] }, "instructions": "One reading taken at a moment: a weighing (kg), a blood pressure (value the upper, systolic, second the lower, diastolic, mmHg), a blood glucose (mg/dL, with before or after a meal when the meter said) or a temperature (°C). Also each body fat (%), BMI, lean mass (kg), height and waist (m), cardio fitness (VO2 max) and six-minute walk (m) reading. Read from Apple Health, never written back: a person never edits a reading here, and Cotton never writes one to Health. Sealed: only the day stays clear on the object.", "card": { "face": "health.tag", "fields": [ { "slot": "title", "column": "kind" }, { "slot": "subtitle", "column": "value" }, { "slot": "date", "column": "day", "form": "weekday_date" } ] } }, { "format_version": 1, "id": "health_person", "name": "Health person", "plural": "Health people", "row_key": "key", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "key", "name": "Key", "type": "text", "required": true, "hidden": true }, { "key": "person", "name": "Person", "type": "link", "required": true, "link_to": "person", "readonly": true }, { "key": "owner", "name": "The owner", "type": "bool", "readonly": true }, { "key": "sex", "name": "Sex", "type": "choice", "choices": [ "female", "male" ], "readonly": true, "labels": { "female": "Female", "male": "Male" } }, { "key": "born_on", "name": "Date of birth", "type": "date", "readonly": true }, { "key": "age_years", "name": "Age last printed", "type": "number", "readonly": true }, { "key": "age_on", "name": "Age printed on", "type": "date", "readonly": true }, { "key": "names", "name": "Names on reports", "type": "longtext", "readonly": true, "hidden": true }, { "key": "position", "name": "Order", "type": "number", "readonly": true, "hidden": true } ], "title": "person", "date": null, "project": null, "order": null, "slip": { "title": "person", "subtitle": "sex", "trailing": "born_on", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "person", "owner", "sex", "born_on", "age_years", "age_on" ] } ], "seal": { "clear": [ "key" ] }, "sort": { "column": "position", "descending": false }, "empty": { "title": "Nobody yet", "message": "Each person whose reports are kept stands here." }, "instructions": "What Cotton Health keeps of one person whose health records the owner keeps (the owner, or a family member): `person` the shared `person` row, `owner` true for the owner alone (Apple Health is theirs), `sex` and `born_on` as reports printed them or as typed, `age_years` the latest age a report printed and `age_on` that report's day, `names` the printed names confirmed as this person's (a JSON list), `position` their place in the app's switcher. Sex and age choose the reference band a report gives by sex. Sealed: nothing stays clear but the key.", "card": { "face": "health.tag", "fields": [ { "slot": "title", "column": "person" }, { "slot": "subtitle", "column": "sex" } ] } }, { "format_version": 1, "id": "health_workout", "name": "Workout", "plural": "Workouts", "row_key": "key", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "key", "name": "Key", "type": "text", "required": true, "hidden": true }, { "key": "kind", "name": "Workout", "type": "choice", "required": true, "choices": [ "american_football", "archery", "australian_football", "badminton", "baseball", "basketball", "bowling", "boxing", "climbing", "cricket", "cross_training", "curling", "cycling", "dance", "elliptical", "equestrian_sports", "fencing", "fishing", "functional_strength_training", "golf", "gymnastics", "handball", "hiking", "hockey", "hunting", "lacrosse", "martial_arts", "mind_and_body", "paddle_sports", "play", "preparation_and_recovery", "racquetball", "rowing", "rugby", "running", "sailing", "skating_sports", "snow_sports", "soccer", "softball", "squash", "stair_climbing", "surfing_sports", "swimming", "table_tennis", "tennis", "track_and_field", "traditional_strength_training", "volleyball", "walking", "water_fitness", "water_polo", "water_sports", "wrestling", "yoga", "barre", "core_training", "cross_country_skiing", "downhill_skiing", "flexibility", "high_intensity_interval_training", "jump_rope", "kickboxing", "pilates", "snowboarding", "stairs", "step_training", "wheelchair_walk_pace", "wheelchair_run_pace", "tai_chi", "mixed_cardio", "hand_cycling", "disc_sports", "fitness_gaming", "cardio_dance", "social_dance", "pickleball", "cooldown", "swim_bike_run", "transition", "underwater_diving", "other" ], "readonly": true, "labels": { "american_football": "American football", "archery": "Archery", "australian_football": "Australian football", "badminton": "Badminton", "baseball": "Baseball", "basketball": "Basketball", "bowling": "Bowling", "boxing": "Boxing", "climbing": "Climbing", "cricket": "Cricket", "cross_training": "Cross training", "curling": "Curling", "cycling": "Cycling", "dance": "Dance", "elliptical": "Elliptical", "equestrian_sports": "Equestrian sports", "fencing": "Fencing", "fishing": "Fishing", "functional_strength_training": "Functional strength training", "golf": "Golf", "gymnastics": "Gymnastics", "handball": "Handball", "hiking": "Hiking", "hockey": "Hockey", "hunting": "Hunting", "lacrosse": "Lacrosse", "martial_arts": "Martial arts", "mind_and_body": "Mind and body", "paddle_sports": "Paddle sports", "play": "Play", "preparation_and_recovery": "Preparation and recovery", "racquetball": "Racquetball", "rowing": "Rowing", "rugby": "Rugby", "running": "Running", "sailing": "Sailing", "skating_sports": "Skating sports", "snow_sports": "Snow sports", "soccer": "Soccer", "softball": "Softball", "squash": "Squash", "stair_climbing": "Stair climbing", "surfing_sports": "Surfing sports", "swimming": "Swimming", "table_tennis": "Table tennis", "tennis": "Tennis", "track_and_field": "Track and field", "traditional_strength_training": "Traditional strength training", "volleyball": "Volleyball", "walking": "Walking", "water_fitness": "Water fitness", "water_polo": "Water polo", "water_sports": "Water sports", "wrestling": "Wrestling", "yoga": "Yoga", "barre": "Barre", "core_training": "Core training", "cross_country_skiing": "Cross country skiing", "downhill_skiing": "Downhill skiing", "flexibility": "Flexibility", "high_intensity_interval_training": "High-intensity interval training", "jump_rope": "Jump rope", "kickboxing": "Kickboxing", "pilates": "Pilates", "snowboarding": "Snowboarding", "stairs": "Stairs", "step_training": "Step training", "wheelchair_walk_pace": "Wheelchair walk pace", "wheelchair_run_pace": "Wheelchair run pace", "tai_chi": "Tai chi", "mixed_cardio": "Mixed cardio", "hand_cycling": "Hand cycling", "disc_sports": "Disc sports", "fitness_gaming": "Fitness gaming", "cardio_dance": "Cardio dance", "social_dance": "Social dance", "pickleball": "Pickleball", "cooldown": "Cooldown", "swim_bike_run": "Swim, bike, run", "transition": "Transition", "underwater_diving": "Underwater diving", "other": "Other" } }, { "key": "day", "name": "Day", "type": "date", "required": true, "readonly": true }, { "key": "started_at", "name": "Started", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "ended_at", "name": "Ended", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "minutes", "name": "Minutes", "type": "number", "readonly": true, "units": { "one": "{n} minute", "other": "{n} minutes" } }, { "key": "distance_m", "name": "Distance (m)", "type": "number", "readonly": true }, { "key": "energy_kcal", "name": "Active energy (kcal)", "type": "number", "readonly": true }, { "key": "heart_rate_avg", "name": "Average heart rate", "type": "number", "readonly": true }, { "key": "heart_rate_max", "name": "Highest heart rate", "type": "number", "readonly": true }, { "key": "device", "name": "Recorded by", "type": "text", "readonly": true }, { "key": "sample", "name": "Sample", "type": "text", "readonly": true, "hidden": true }, { "key": "source", "name": "From", "type": "choice", "choices": [ "healthkit", "health_connect", "export" ], "readonly": true, "labels": { "healthkit": "Apple Health", "health_connect": "Health Connect", "export": "Apple Health export" } } ], "title": "kind", "date": "day", "project": null, "order": null, "slip": { "title": "kind", "subtitle": "minutes", "trailing": "day", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "kind", "day", "started_at", "ended_at", "minutes" ] }, { "heading": "The workout", "columns": [ "distance_m", "energy_kcal", "heart_rate_avg", "heart_rate_max", "device", "source" ] } ], "seal": { "clear": [ "key", "day" ] }, "sort": { "column": "day", "descending": true }, "empty": { "title": "No workouts yet", "message": "Workouts recorded in Apple Health stand here." }, "create": { "label": "Bring in", "doors": [ { "id": "apple_health", "label": "Read Apple Health", "object": "device", "reads": "apple_health" }, { "id": "export", "label": "Bring in a Health export", "object": "folder", "files": { "types": [ "public.zip-archive", "public.xml" ] } } ] }, "instructions": "One workout recorded in Apple Health: its kind, the day it started on, when it started and ended, its minutes, distance (metres), active energy (kcal) and average and highest heart rate. Its route is not kept. Read from Apple Health, never written back: a person never edits a reading here, and Cotton never writes one to Health. Sealed: only the day stays clear on the object.", "card": { "face": "health.stopwatch", "fields": [ { "slot": "title", "column": "kind" }, { "slot": "subtitle", "column": "minutes" }, { "slot": "date", "column": "day", "form": "weekday_date" } ] } }, { "format_version": 1, "id": "highlight", "name": "Highlight", "plural": "Highlights", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "book", "name": "Book", "type": "link", "required": true, "link_to": "book" }, { "key": "book_title", "name": "Book", "type": "text", "computed": { "lookup": { "through": "book", "column": "title" } } }, { "key": "cover", "name": "Cover", "type": "photo", "computed": { "lookup": { "through": "book", "column": "cover" } } }, { "key": "text", "name": "Passage", "type": "longtext", "required": true, "readonly": true }, { "key": "note", "name": "Note", "type": "longtext", "placeholder": "Why you marked it" }, { "key": "colour", "name": "Colour", "type": "choice", "choices": [ "red", "yellow", "teal" ], "labels": { "red": "Red", "yellow": "Yellow", "teal": "Teal" }, "default": "yellow" }, { "key": "locator", "name": "Place", "type": "text", "readonly": true }, { "key": "progress", "name": "Where", "type": "number", "readonly": true, "units": { "one": "{n}%", "other": "{n}%" } }, { "key": "page_label", "name": "Page", "type": "text", "readonly": true }, { "key": "chapter", "name": "Chapter", "type": "text", "readonly": true }, { "key": "made_at", "name": "Marked", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "sent_by", "name": "Sent by", "type": "text", "readonly": true }, { "key": "sent_by_number", "name": "Sent from", "type": "text", "readonly": true }, { "key": "sent_at", "name": "Sent", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "send_id", "name": "Send", "type": "text", "readonly": true }, { "key": "book_author", "name": "Author", "type": "text", "computed": { "lookup": { "through": "book", "column": "author" } } } ], "title": "text", "date": "made_at", "project": null, "order": null, "slip": { "title": "text", "subtitle": "book_title", "trailing": "page_label", "photo": "cover", "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "text", "note", "book_title", "chapter", "page_label", "colour", "made_at" ] } ], "send": { "columns": [ "text", "note", "colour", "locator", "progress", "page_label", "chapter", "made_at" ], "same": [ [ "book", "text", "locator" ] ], "carry": { "book": [ "title", "author", "cover", "isbn", "ol_work", "ol_edition", "doi", "year", "language" ] } }, "sort": { "column": "made_at", "descending": true }, "empty": { "title": "No highlights yet", "message": "Select a line while reading to keep it." }, "commands": [ { "id": "go_to", "label": "Open in book", "kind": "update", "method": "reader.open", "bindings": { "id": "book", "at": "locator" }, "object": "page" }, { "id": "recolour", "label": "Recolour", "kind": "update", "verb": "update_record", "data": { "table": "highlight" }, "bindings": { "id": "$id" }, "receipt": "Recoloured", "pick": { "argument": "patch.colour", "kind": "text", "label": "Pencil" }, "object": "tag" }, { "id": "note", "label": "Note", "kind": "update", "verb": "update_record", "data": { "table": "highlight" }, "bindings": { "id": "$id" }, "receipt": "Noted", "pick": { "argument": "patch.note", "kind": "text", "label": "Note" }, "object": "slip" }, { "id": "remove", "label": "Remove", "kind": "delete", "verb": "delete_record", "data": { "table": "highlight" }, "confirm": "Undo on the receipt brings it back.", "bindings": { "id": "$id" }, "receipt": "Removed", "does": "destroys", "object": "bin" } ], "instructions": "One row per passage the owner marked while reading a book: the words as they stand in the book (text), the owner's note, the pencil it is underlined in (red, yellow or teal), and where it is. locator is a Readium Locator (JSON text): for an EPUB its href, progression and the text around it; for a PDF the page (href #page=N) and the selection's quads under locations.otherLocations.quads. progress (0 to 100) is how far through the book, page_label the printed page where the book has one, chapter its chapter's title. The reader writes every one and lays the highlight back on from its locator. Never make one by hand or change its text; Recolour sets colour, Note writes note, and Remove deletes it to unmark.", "groups": { "stack": "slips" }, "card": { "face": "highlight.passage", "fields": [ { "slot": "quote", "column": "text" }, { "slot": "note", "column": "note" }, { "slot": "source", "column": "book_title" }, { "slot": "place", "column": "page_label", "line": "field.page" }, { "slot": "crumb", "column": "chapter" }, { "slot": "ink", "column": "colour" }, { "slot": "photo", "column": "cover" }, { "slot": "subtitle", "column": "book_author" } ] } }, { "format_version": 1, "id": "journal_entry", "name": "Journal entry", "plural": "Journal entries", "visibility": "owner", "picture": { "photo": "photo:c5eb8f1ca78553c5419f520da4fd600be292251b4211ff367b203f8a920620e7", "object": "tool-notes" }, "builtin": false, "engine": null, "columns": [ { "key": "day", "name": "Day", "type": "date", "required": true }, { "key": "title", "name": "Title", "type": "text", "placeholder": "Untitled" }, { "key": "body", "name": "Words", "type": "longtext", "placeholder": "Write what happened" }, { "key": "mood", "name": "Mood", "type": "choice", "choices": [ "great", "good", "okay", "low", "awful" ], "labels": { "great": "Great", "good": "Good", "okay": "Okay", "low": "Low", "awful": "Awful" } }, { "key": "weather", "name": "Weather", "type": "choice", "choices": [ "sunny", "cloudy", "rain", "storm", "snow", "wind", "fog" ], "labels": { "sunny": "Sunny", "cloudy": "Cloudy", "rain": "Rain", "storm": "Storm", "snow": "Snow", "wind": "Wind", "fog": "Fog" } }, { "key": "place", "name": "Where", "type": "text" }, { "key": "starred", "name": "Starred", "type": "bool", "default": false }, { "key": "sent_by", "name": "Sent by", "type": "text", "readonly": true }, { "key": "sent_by_number", "name": "Sent from", "type": "text", "readonly": true }, { "key": "sent_at", "name": "Sent", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "send_id", "name": "Send", "type": "text", "readonly": true } ], "title": "title", "date": "day", "project": null, "order": null, "slip": { "title": "title", "subtitle": "body", "trailing": "day", "photo": null, "toggle": null, "title_fallback": "body" }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "day", "body" ] }, { "heading": "The day", "columns": [ "mood", "weather", "place" ] } ], "seal": { "clear": [ "day", "starred" ], "blind": [ "title", "body", "place" ] }, "send": { "columns": [ "day", "title", "body", "mood", "weather", "place" ] }, "sort": { "column": "day", "descending": true }, "by_month": "day", "empty": { "title": "Nothing written yet" }, "create": { "label": "New entry", "dated": "day" }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "journal_entry" } } ], "commands": [ { "id": "star", "label": "Star", "kind": "update", "verb": "update_record", "data": { "table": "journal_entry", "patch": { "starred": true } }, "bindings": { "id": "$id" }, "when": { "starred": false }, "receipt": "Starred", "undo": "unstar", "object": "star" }, { "id": "unstar", "label": "Unstar", "kind": "update", "verb": "update_record", "data": { "table": "journal_entry", "patch": { "starred": false } }, "bindings": { "id": "$id" }, "when": { "starred": true }, "receipt": "Unstarred", "undo": "star", "object": "star" }, { "id": "delete", "label": "Delete", "kind": "delete", "verb": "delete_record", "data": { "table": "journal_entry" }, "confirm": "It can come back from Deleted, and Undo on the receipt brings it back now.", "bindings": { "id": "$id" }, "receipt": "Deleted", "does": "destroys", "object": "bin" } ], "instructions": "A journal entry is one page of the owner's private journal: the day it is about, an optional title, the words as they wrote them, and, if they said so, the mood (great, good, okay, low or awful), the weather and where they were. Each tap of Plus is a new entry, so a day can hold several. Keep the owner's words as they wrote them; never write, rewrite or summarise an entry unless they ask, and only name a mood they gave. The journal is sealed: every column but the day and the star is sealed on the object, so reading one asks the owner's phone for a window.", "groups": { "stack": "slips" }, "card": { "face": "journal.diary", "fields": [ { "slot": "title", "column": "title" }, { "slot": "date", "column": "day", "form": "weekday_date" }, { "slot": "body", "column": "body", "markdown": true }, { "slot": "seal", "column": "mood" }, { "slot": "weather", "column": "weather" }, { "slot": "place", "column": "place" }, { "slot": "star", "column": "starred" } ] }, "parts": { "shape": "desk", "head": { "facts": [ "day" ] }, "links": [], "body": "body", "lists": [], "acts": { "more": [ "star", "unstar" ], "away": "delete" }, "cards": [ { "column": "mood" }, { "column": "weather" } ], "strip": [] } }, { "format_version": 1, "id": "lab_report", "name": "Lab report", "plural": "Lab reports", "row_key": "key", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "key", "name": "Key", "type": "text", "required": true, "hidden": true }, { "key": "person", "name": "Person", "type": "link", "required": true, "link_to": "person", "readonly": true }, { "key": "day", "name": "Collected", "type": "date", "required": true, "readonly": true }, { "key": "lab", "name": "Lab", "type": "text", "readonly": true }, { "key": "order_id", "name": "Order", "type": "text", "readonly": true }, { "key": "printed_name", "name": "Name on the report", "type": "text", "readonly": true }, { "key": "age", "name": "Age on the report", "type": "text", "readonly": true }, { "key": "age_years", "name": "Age in years", "type": "number", "readonly": true, "hidden": true }, { "key": "sex", "name": "Sex", "type": "choice", "choices": [ "female", "male" ], "readonly": true, "labels": { "female": "Female", "male": "Male" } }, { "key": "born_on", "name": "Date of birth", "type": "date", "readonly": true }, { "key": "collected_via", "name": "Collected via", "type": "text", "readonly": true }, { "key": "sample_type", "name": "Sample", "type": "text", "readonly": true }, { "key": "referred_by", "name": "Referred by", "type": "text", "readonly": true }, { "key": "status", "name": "Report", "type": "choice", "choices": [ "partial", "final" ], "readonly": true, "labels": { "partial": "Partial", "final": "Final" } }, { "key": "collected_at", "name": "Collected at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "received_at", "name": "Received", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "reported_at", "name": "Reported", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "pdf", "name": "Report", "type": "file", "readonly": true, "presentation": "file" }, { "key": "pdf_sha256", "name": "File hash", "type": "text", "readonly": true, "hidden": true }, { "key": "versions", "name": "Copies received", "type": "longtext", "readonly": true, "hidden": true }, { "key": "mail_message_id", "name": "Mail", "type": "text", "readonly": true, "hidden": true }, { "key": "file_name", "name": "File name", "type": "text", "readonly": true, "hidden": true }, { "key": "results", "name": "Results", "type": "number", "readonly": true, "units": { "one": "{n} result", "other": "{n} results" } }, { "key": "unmatched", "name": "Not yet known", "type": "number", "readonly": true, "units": { "one": "{n} name not yet known", "other": "{n} names not yet known" } }, { "key": "layout", "name": "Read as", "type": "text", "readonly": true, "hidden": true }, { "key": "added_by", "name": "Added by", "type": "choice", "choices": [ "import", "phone" ], "readonly": true, "labels": { "import": "Brought in from mail", "phone": "Added on a phone" } } ], "title": "lab", "date": "day", "project": null, "order": null, "slip": { "title": "lab", "subtitle": "results", "trailing": "day", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "person", "day", "lab", "status", "results", "pdf" ] }, { "heading": "As printed", "columns": [ "printed_name", "age", "sex", "born_on", "order_id", "sample_type", "collected_via", "referred_by", "collected_at", "received_at", "reported_at", "unmatched", "added_by" ] } ], "seal": { "clear": [ "key", "day" ] }, "sort": { "column": "day", "descending": true }, "empty": { "title": "No lab reports yet", "message": "Reports brought in from mail, or added from a PDF, stand here by date." }, "create": { "label": "Add a report", "doors": [ { "id": "lab_pdf", "label": "Add a lab report", "object": "folder", "files": { "types": [ "com.adobe.pdf" ] } } ] }, "instructions": "One lab report: one order at one lab for one person, with the original PDF sealed in `pdf`. A partial and a final of the same order are ONE row: `status` is the most complete copy received and `versions` lists every PDF that came (sha256, status, reported time, mail message id). `person` is the person it is for (the owner or a family member, a `person` row). Its results are `lab_result` rows naming it in `report`. Everything is as the lab printed it: never edit a result to say something else, never add an interpretation. Sealed: only the collected day stays clear on the object.", "card": { "face": "health.tag", "fields": [ { "slot": "title", "column": "lab" }, { "slot": "subtitle", "column": "results" }, { "slot": "date", "column": "day", "form": "weekday_date" } ] } }, { "format_version": 1, "id": "lab_result", "name": "Lab result", "plural": "Lab results", "row_key": "key", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "key", "name": "Key", "type": "text", "required": true, "hidden": true }, { "key": "person", "name": "Person", "type": "link", "required": true, "link_to": "person", "readonly": true }, { "key": "report", "name": "Report", "type": "link", "required": true, "link_to": "lab_report", "readonly": true }, { "key": "day", "name": "Collected", "type": "date", "required": true, "readonly": true }, { "key": "parameter", "name": "Parameter", "type": "text", "readonly": true }, { "key": "name", "name": "Test", "type": "text", "required": true, "readonly": true }, { "key": "panel", "name": "Panel", "type": "text", "readonly": true }, { "key": "result", "name": "Result", "type": "text", "readonly": true }, { "key": "value", "name": "Value", "type": "number", "readonly": true }, { "key": "comparator", "name": "Comparator", "type": "choice", "choices": [ "<", "<=", ">", ">=" ], "readonly": true, "labels": { "<": "Less than", "<=": "At most", ">": "More than", ">=": "At least" } }, { "key": "unit", "name": "Unit", "type": "text", "readonly": true }, { "key": "range", "name": "Reference interval", "type": "longtext", "readonly": true }, { "key": "range_low", "name": "Interval from", "type": "number", "readonly": true }, { "key": "range_high", "name": "Interval to", "type": "number", "readonly": true }, { "key": "interval", "name": "Interval, read", "type": "longtext", "readonly": true, "hidden": true }, { "key": "method", "name": "Method", "type": "text", "readonly": true }, { "key": "specimen", "name": "Specimen", "type": "text", "readonly": true }, { "key": "flag", "name": "Lab's flag", "type": "text", "readonly": true }, { "key": "canonical_value", "name": "In the usual unit", "type": "number", "readonly": true }, { "key": "canonical_unit", "name": "Usual unit", "type": "text", "readonly": true }, { "key": "position", "name": "Order on the report", "type": "number", "readonly": true, "hidden": true }, { "key": "page", "name": "Page", "type": "number", "readonly": true, "hidden": true }, { "key": "line", "name": "Line", "type": "number", "readonly": true, "hidden": true } ], "title": "name", "date": "day", "project": null, "order": null, "slip": { "title": "name", "subtitle": "result", "trailing": "day", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "person", "name", "result", "unit", "range", "day" ] }, { "heading": "As printed", "columns": [ "panel", "method", "specimen", "flag", "canonical_value", "canonical_unit", "report" ] } ], "seal": { "clear": [ "key", "day" ] }, "sort": { "column": "day", "descending": true }, "empty": { "title": "No lab results yet", "message": "Each measured value of each report stands here." }, "instructions": "One measured result in one lab report, as printed: `name` the lab's own name for the test, `result` the value as printed (a number, or a word such as Negative, or a range such as 2-3), `value` and `comparator` the number when it is one, `unit` and `range` (the reference interval, possibly several lines of bands) as printed, `range_low`/`range_high` read from it where it is one span, `interval` the whole interval read (JSON: low, high, bands), `method`, `specimen`, `flag` (the lab's own H/L), `panel` the section title it stood under. `parameter` is the canonical parameter's id (kits/health/parameters.json) or empty when the name is not yet known; `canonical_value` is the value in that parameter's `canonical_unit` where an exact conversion exists. `person` and `report` say whose and which report. A record, not advice: never write a diagnosis or a suggestion, and state ranges as the lab printed them. Sealed: only the collected day stays clear on the object.", "card": { "face": "health.tag", "fields": [ { "slot": "title", "column": "name" }, { "slot": "subtitle", "column": "result" }, { "slot": "date", "column": "day", "form": "weekday_date" } ] } }, { "format_version": 1, "id": "listen", "name": "Listen", "plural": "Listens", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "song", "name": "Song", "type": "link", "required": true, "link_to": "song", "readonly": true }, { "key": "title", "name": "Title", "type": "text", "computed": { "lookup": { "through": "song", "column": "title" } } }, { "key": "artist_name", "name": "By", "type": "text", "computed": { "lookup": { "through": "song", "column": "artist_name" } } }, { "key": "played_at", "name": "Played", "type": "date", "required": true, "readonly": true, "format": "calendar-datetime" }, { "key": "seconds", "name": "Listened", "type": "number", "readonly": true, "format": "duration" }, { "key": "ended", "name": "Ended", "type": "choice", "choices": [ "finished", "skipped", "stopped" ], "readonly": true, "labels": { "finished": "Finished", "skipped": "Skipped", "stopped": "Stopped" } }, { "key": "from", "name": "Playing from", "type": "choice", "choices": [ "album", "artist", "playlist", "songs", "shuffle", "queue" ], "readonly": true, "labels": { "album": "An album", "artist": "An artist", "playlist": "A playlist", "songs": "Songs", "shuffle": "Shuffle", "queue": "The queue" } }, { "key": "device", "name": "On", "type": "text", "readonly": true } ], "title": "title", "date": "played_at", "project": null, "order": null, "slip": { "title": "title", "subtitle": [ "artist_name" ], "trailing": "played_at", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [], "sort": { "column": "played_at", "descending": true }, "empty": { "title": "Nothing played yet", "message": "What you play lands here." }, "instructions": "One row per time a song was played, written by the player alone and never by hand: song, played_at (when it started), seconds heard, how it ended (finished, skipped or stopped), where it played from and on which device. A song counts as played once it has been heard for thirty seconds or half its length, whichever is sooner: the row is written then, and its seconds and ended are brought up to date as the play ends. Each row makes the song's play_count one more, a row that ended skipped its skip_count one more too, and its and its album's last_played_at its played_at. History cannot be rebuilt later, so every play is kept." }, { "format_version": 1, "id": "meetings_action", "name": "Action", "plural": "Actions", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "meeting", "name": "Meeting", "type": "link", "required": true, "link_to": "meetings_meeting" }, { "key": "position", "name": "Order", "type": "number" }, { "key": "words", "name": "To do", "type": "text", "required": true, "placeholder": "What is to be done?" }, { "key": "who", "name": "Who", "type": "text", "placeholder": "Who said they would" }, { "key": "speaker", "name": "Speaker", "type": "link", "link_to": "meetings_speaker" }, { "key": "due", "name": "Due", "type": "date" }, { "key": "due_said", "name": "When, as said", "type": "text" }, { "key": "at_ms", "name": "Said at", "type": "number" }, { "key": "todo", "name": "Todo", "type": "link", "link_to": "todo", "readonly": true }, { "key": "made_by", "name": "Made by", "type": "text" } ], "title": "words", "date": "due", "project": null, "order": "position", "slip": { "title": "words", "subtitle": "who", "trailing": "due", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "words", "who", "due", "due_said", "meeting", "todo" ] }, { "heading": "Details", "columns": [ "speaker", "at_ms", "made_by", "position" ], "role": "side" } ], "add": false, "seal": { "clear": [ "meeting", "position", "speaker", "due", "at_ms", "todo", "made_by" ], "blind": [ "words" ] }, "sort": { "column": "position", "descending": false }, "commands": [ { "id": "add_to_todos", "label": "Add to todos", "kind": "update", "method": "meetings.action.todo", "bindings": { "id": "$id" }, "when": { "todo": null }, "object": "slip" } ], "instructions": "An action is one thing to be done that a meeting said, in order (position): words is the task, short, starting with a verb. who is the person who will do it: a speaker's label (S1, S2…, with speaker the meetings_speaker row) or a name the transcript says; empty when nobody took it on. due is the day it is due and due_said the transcript's own words for it (\"by Thursday\"); both empty when no day was said. Never write an owner or a day the meeting did not say. at_ms is where in the recording it was said. made_by names who wrote it: mac:llama: for the Mac's local model, or an assistant's own name when an assistant summarised the meeting (write the meeting's summary, actions, summarised_by and summarised_at with it). todo is the todo the person made from it with Add to todos (meetings.action.todo), written by the core only; an action with a todo is kept when the meeting is summarised again." }, { "format_version": 1, "id": "meetings_line", "name": "Line", "plural": "Lines", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "meeting", "name": "Meeting", "type": "link", "required": true, "link_to": "meetings_meeting", "readonly": true }, { "key": "speaker", "name": "Speaker", "type": "link", "link_to": "meetings_speaker", "readonly": true }, { "key": "position", "name": "Order", "type": "number", "readonly": true }, { "key": "start_ms", "name": "From", "type": "number", "readonly": true }, { "key": "end_ms", "name": "To", "type": "number", "readonly": true }, { "key": "text", "name": "Said", "type": "longtext" }, { "key": "language", "name": "Language", "type": "text", "readonly": true }, { "key": "edited", "name": "Corrected", "type": "bool", "readonly": true } ], "title": "text", "date": null, "project": null, "order": "position", "slip": { "title": "text", "subtitle": "speaker", "trailing": "start_ms", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "speaker", "text", "start_ms", "end_ms", "language" ] } ], "add": false, "seal": { "clear": [ "meeting", "speaker", "position", "start_ms", "end_ms", "language", "edited" ], "blind": [ "text" ], "blind_bytes": { "text": 1024 } }, "sort": { "column": "position", "descending": false }, "instructions": "A line is one stretch of one speaker's speech in a meeting, timed from the start of its recording in milliseconds (start_ms to end_ms), in order by position, with the language it was heard in (BCP 47). Lines are written by the transcriber all at once, with the speakers, in one write; a person may correct text (edited is then set and a later transcription keeps that line). Never invent or tidy what was said." }, { "format_version": 1, "id": "meetings_meeting", "name": "Meeting", "plural": "Meetings", "row_key": "take", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "take", "name": "Take", "type": "text", "required": true, "hidden": true }, { "key": "title", "name": "Title", "type": "text", "placeholder": "What was this about?" }, { "key": "kind", "name": "Kind", "type": "choice", "choices": [ "meeting", "memo" ], "labels": { "meeting": "Meeting", "memo": "Voice memo" }, "default": "meeting" }, { "key": "status", "name": "State", "type": "choice", "choices": [ "recording", "waiting", "transcribing", "ready", "failed" ], "readonly": true, "labels": { "recording": "Recording", "waiting": "Waiting to be turned into text", "transcribing": "Turning it into text", "ready": "Ready", "failed": "Did not work" }, "default": "recording" }, { "key": "status_why", "name": "Why", "type": "text", "readonly": true }, { "key": "started_at", "name": "Started", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "ended_at", "name": "Ended", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "duration_ms", "name": "Length", "type": "number", "readonly": true }, { "key": "audio", "name": "Recording", "type": "file", "readonly": true }, { "key": "audio_bytes", "name": "Size", "type": "number", "readonly": true }, { "key": "languages", "name": "Languages", "type": "text", "readonly": true }, { "key": "speakers", "name": "Speakers", "type": "number", "readonly": true }, { "key": "lines", "name": "Lines", "type": "number", "readonly": true }, { "key": "transcribed_by", "name": "Transcribed by", "type": "text", "readonly": true }, { "key": "transcribed_at", "name": "Transcribed", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "transcribe_on", "name": "Turned into text on", "type": "choice", "choices": [ "any", "mac", "phone", "service" ], "labels": { "any": "Whichever is free first", "mac": "The Mac", "phone": "This phone, while charging", "service": "An outside service" }, "default": "any" }, { "key": "asked_at", "name": "Asked", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "attempts", "name": "Tries", "type": "number", "readonly": true }, { "key": "summary", "name": "Summary", "type": "longtext", "markdown": true }, { "key": "actions", "name": "To do", "type": "longtext" }, { "key": "summarised_by", "name": "Summary by", "type": "text" }, { "key": "summarised_at", "name": "Summarised", "type": "date", "format": "calendar-datetime" }, { "key": "summary_why", "name": "Why no summary", "type": "choice", "choices": [ "no_mac", "model_missing", "failed", "off" ], "readonly": true, "labels": { "no_mac": "No Mac has written it yet", "model_missing": "The Mac has not fetched the summary model", "failed": "The summary could not be written", "off": "Summaries are off for this meeting" } }, { "key": "summarise_on", "name": "Summarised on", "type": "choice", "choices": [ "mac", "off" ], "labels": { "mac": "The Mac, by a model on it", "off": "Nowhere: no summary" }, "default": "mac" }, { "key": "summary_asked_at", "name": "Summary asked", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "recorded_on", "name": "Recorded on", "type": "text", "readonly": true }, { "key": "on_phone", "name": "On this phone", "type": "choice", "choices": [ "absent", "kept" ], "readonly": true, "labels": { "absent": "Not on this phone", "kept": "On this phone" } }, { "key": "marks", "name": "Marked moments", "type": "longtext", "readonly": true }, { "key": "silenced", "name": "Silenced stretches", "type": "longtext", "readonly": true }, { "key": "source", "name": "Came from", "type": "choice", "choices": [ "room", "import", "call" ], "readonly": true, "labels": { "room": "Recorded in a room", "import": "Brought in from a file", "call": "Notes taken on a call" }, "default": "room" }, { "key": "call", "name": "Call", "type": "text", "readonly": true }, { "key": "tracks", "name": "Tracks", "type": "longtext", "readonly": true }, { "key": "languages_chosen", "name": "Languages you chose", "type": "text" }, { "key": "note", "name": "Saved as note", "type": "link", "link_to": "note", "readonly": true }, { "key": "transcribing_on", "name": "Being turned into words on", "type": "choice", "choices": [ "mac", "phone", "service" ], "readonly": true, "labels": { "mac": "The Mac", "phone": "A phone", "service": "An outside service" } } ], "title": "title", "date": "started_at", "project": null, "order": null, "slip": { "title": "title", "subtitle": "status", "trailing": "duration_ms", "photo": null, "toggle": null, "player": "audio" }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "title", "kind", "status", "status_why" ] }, { "heading": null, "columns": [ "started_at", "duration_ms", "languages", "speakers" ], "role": "facts" }, { "heading": "Recording", "columns": [ "audio" ] }, { "heading": "Summary", "columns": [ "summary", "summary_why", "actions" ] }, { "heading": "Details", "columns": [ "transcribe_on", "transcribed_by", "transcribed_at", "summarised_by", "summarise_on", "recorded_on", "ended_at", "lines", "attempts" ], "role": "side" } ], "seal": { "clear": [ "take", "kind", "status", "status_why", "started_at", "ended_at", "duration_ms", "audio", "audio_bytes", "languages", "speakers", "lines", "transcribed_by", "transcribed_at", "transcribe_on", "asked_at", "attempts", "summarised_by", "summarised_at", "on_phone", "marks", "summary_why", "summarise_on", "summary_asked_at", "source", "call", "languages_chosen", "note", "transcribing_on" ], "blind": [ "title", "summary" ], "blind_bytes": { "summary": 2048 } }, "sort": { "column": "started_at", "descending": true }, "day_grouping": "started_at", "empty": { "title": "Nothing recorded yet", "message": "Tap record to keep a meeting or a voice memo. The words and who said them follow." }, "create": { "label": "Record", "method": "meetings.record.start" }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "meetings_meeting" } }, { "label": "Actions", "table": "meetings_action", "where": { "meeting": "$id" } } ], "commands": [ { "id": "transcribe", "label": "Turn into text again", "kind": "update", "method": "meetings.transcribe", "bindings": { "id": "$id" }, "when": { "status": [ "ready", "failed" ] }, "object": "cycle" }, { "id": "summarise", "label": "Summarise", "kind": "update", "method": "meetings.summarise", "bindings": { "id": "$id" }, "when": { "status": "ready" }, "object": "slip" }, { "id": "export", "label": "Export", "kind": "update", "method": "meetings.export", "bindings": { "id": "$id" }, "object": "parcel" }, { "id": "delete", "label": "Delete", "kind": "delete", "verb": "delete_record", "data": { "table": "meetings_meeting" }, "confirm": "It can come back from Deleted, and Undo brings it back now.", "bindings": { "id": "$id" }, "receipt": "Deleted", "does": "destroys", "object": "bin" } ], "instructions": "A meeting is one recording made in Cotton Meetings: a meeting (kind meeting) or a voice memo (kind memo). It is a row from the first second: status recording while the phone records, waiting once it stopped and the audio waits to be turned into text, transcribing while a Mac, the phone or (only when the owner turned it on) an outside service does that, then ready, or failed with status_why saying why. The audio is always kept, sealed like every file, so the text can be redone with Turn into text again. Its words are meetings_line rows and who spoke them meetings_speaker rows; languages, speakers, lines and the summary columns are written by the core, never by hand. summary and actions (one to do a line) come only from what was said: quote it and never add a decision or a task nobody spoke. Nothing of a meeting leaves the owner's devices unless the owner turned on an outside service. take is the recording's own id, the same as the row's: a start sent twice is one recording. marks are the moments the person marked while recording, in milliseconds. The summary is made on the person's Mac by a local model (summarised_by mac:llama:) once the meeting is ready, unless summarise_on is off; no cloud model is called by Cotton. An assistant asked to summarise a meeting reads its meetings_line rows and writes summary (markdown points), actions (one to do a line), summarised_by (its own name) and summarised_at, and one meetings_action row per action. summary_why says why there is none yet; summary_asked_at is when the person asked for it again." }, { "format_version": 1, "id": "meetings_speaker", "name": "Speaker", "plural": "Speakers", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "meeting", "name": "Meeting", "type": "link", "required": true, "link_to": "meetings_meeting" }, { "key": "label", "name": "Label", "type": "text", "readonly": true }, { "key": "name", "name": "Name", "type": "text", "placeholder": "Who is this?" }, { "key": "person", "name": "Person", "type": "link", "link_to": "person" }, { "key": "lines", "name": "Lines", "type": "number", "readonly": true }, { "key": "talk_ms", "name": "Spoke for", "type": "number", "readonly": true }, { "key": "first_ms", "name": "First spoke at", "type": "number", "readonly": true } ], "title": "name", "date": null, "project": null, "order": "first_ms", "slip": { "title": "name", "subtitle": "label", "trailing": "lines", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "name", "person", "label", "lines", "talk_ms" ] } ], "add": false, "seal": { "clear": [ "meeting", "label", "person", "lines", "talk_ms", "first_ms" ], "blind": [ "name" ] }, "sort": { "column": "first_ms", "descending": false }, "commands": [ { "id": "name_speaker", "label": "Name", "kind": "update", "method": "meetings.speaker.name", "bindings": { "id": "$id" }, "object": "slip" } ], "instructions": "A speaker is one voice in one meeting: label is what the transcriber called it (S1, S2…), in order of first speech. Naming a speaker (name, and person when it is someone in People) holds for this meeting only: no voice is remembered across meetings, and no voice print is ever kept. lines, talk_ms and first_ms are worked out from the meeting's lines." }, { "format_version": 1, "tables": [ { "name": "cotton_memory_projects", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "slug", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n slug TEXT NOT NULL", "position": 2 }, { "name": "name", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n name TEXT NOT NULL", "position": 3 }, { "name": "repos", "type": "TEXT", "default": "'[]'", "nullable": false, "primary_key": false, "declaration": "\n repos TEXT NOT NULL DEFAULT '[]'", "position": 4 }, { "name": "brand", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n brand TEXT CHECK (brand IS NULL OR json_type(brand) = 'object')", "position": 5 }, { "name": "description", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n description TEXT", "position": 6 }, { "name": "summary_updated_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n summary_updated_at TEXT", "position": 7 }, { "name": "summary_by", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n summary_by TEXT", "position": 8 }, { "name": "status", "type": "TEXT", "default": "'active'", "nullable": false, "primary_key": false, "declaration": "\n status TEXT NOT NULL DEFAULT 'active'", "position": 9 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 10 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 11 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 12 }, { "name": "origin_handle", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " origin_handle TEXT CHECK (origin_handle IS NULL OR length(origin_handle) > 0)", "position": 13 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 14 }, { "name": "section_order", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n section_order TEXT CHECK (section_order IS NULL OR json_type(section_order) = 'array')", "position": 15 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " trashed_at TEXT", "position": 16 } ], "constraints": [ { "declaration": "\n UNIQUE (workspace_id, slug)", "position": 17 }, { "declaration": "\n CHECK (length(trim(name)) > 0)", "position": 18 }, { "declaration": "\n CHECK (json_type(repos) = 'array')", "position": 19 }, { "declaration": "\n CHECK (length(slug) BETWEEN 1 AND 64 AND slug GLOB '[a-z0-9]*' AND NOT slug GLOB '*[^a-z0-9-]*')", "position": 20 }, { "declaration": "\n CHECK (status IN ('active', 'archived'))", "position": 21 }, { "declaration": "\n CHECK ((summary_by IS NULL) OR (length(trim(summary_by)) > 0))", "position": 22 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 23 } ], "prefix": "CREATE TABLE cotton_memory_projects (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_memory_projects_origin ON cotton_memory_projects (origin_handle) WHERE origin_handle IS NOT NULL", "CREATE INDEX IF NOT EXISTS idx_cotton_memory_projects_author ON cotton_memory_projects (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] }, { "name": "cotton_memories", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "slug", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n slug TEXT NOT NULL", "position": 2 }, { "name": "title", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n title TEXT NOT NULL", "position": 3 }, { "name": "body", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n body TEXT NOT NULL DEFAULT ''", "position": 4 }, { "name": "status", "type": "TEXT", "default": "'active'", "nullable": false, "primary_key": false, "declaration": "\n status TEXT NOT NULL DEFAULT 'active'", "position": 5 }, { "name": "machine", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n machine TEXT", "position": 6 }, { "name": "visibility", "type": "TEXT", "default": "'private'", "nullable": false, "primary_key": false, "declaration": "\n visibility TEXT NOT NULL DEFAULT 'private'", "position": 7 }, { "name": "origin_kind", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n origin_kind TEXT NOT NULL", "position": 8 }, { "name": "origin_label", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n origin_label TEXT", "position": 9 }, { "name": "reviewed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n reviewed_at TEXT", "position": 10 }, { "name": "source_external_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n source_external_id TEXT", "position": 11 }, { "name": "archived_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n archived_at TEXT", "position": 12 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 13 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 14 }, { "name": "source", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n source TEXT", "position": 15 }, { "name": "superseded_by", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n superseded_by TEXT CHECK (superseded_by IS NULL OR status = 'archived')", "position": 16 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 17 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 18 } ], "constraints": [ { "declaration": "\n CHECK ((status = 'archived') = (archived_at IS NOT NULL))", "position": 19 }, { "declaration": "\n CHECK (length(body) <= 4000)", "position": 20 }, { "declaration": "\n CHECK ((machine IS NULL) OR (length(trim(machine)) > 0))", "position": 21 }, { "declaration": "\n CHECK (origin_kind IN ('user', 'agent'))", "position": 22 }, { "declaration": "\n CHECK ((origin_kind = 'agent') = (origin_label IS NOT NULL))", "position": 23 }, { "declaration": "\n CHECK (length(slug) BETWEEN 1 AND 64 AND slug GLOB '[a-z0-9]*' AND NOT slug GLOB '*[^a-z0-9-]*')", "position": 24 }, { "declaration": "\n CHECK (status IN ('active', 'archived'))", "position": 25 }, { "declaration": "\n CHECK ((length(trim(title)) > 0) AND (length(title) <= 280))", "position": 26 }, { "declaration": "\n CHECK (visibility IN ('private', 'shared', 'public'))", "position": 27 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 28 } ], "prefix": "CREATE TABLE \"cotton_memories\" (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_memories_glance ON cotton_memories (workspace_id,status,visibility,origin_kind,reviewed_at,created_at,id,title)", "CREATE UNIQUE INDEX idx_cotton_memories_slug ON cotton_memories (workspace_id, slug)", "CREATE UNIQUE INDEX idx_cotton_memories_source_external ON cotton_memories (workspace_id, source_external_id) WHERE source_external_id IS NOT NULL", "CREATE INDEX idx_cotton_memories_superseded_by ON cotton_memories (superseded_by) WHERE superseded_by IS NOT NULL", "CREATE INDEX idx_cotton_memories_unreviewed ON cotton_memories (workspace_id, updated_at DESC) WHERE (status = 'active') AND (reviewed_at IS NULL)", "CREATE INDEX IF NOT EXISTS idx_cotton_memories_author ON cotton_memories (substr(_hlc, 20), _hlc)" ], "full_text": [ "CREATE VIRTUAL TABLE fts_memories USING fts5(\n title, body, content = 'cotton_memories', content_rowid = 'rowid',\n tokenize = 'unicode61 remove_diacritics 2'\n )" ], "triggers": [ "CREATE TRIGGER fts_memories_ai AFTER INSERT ON cotton_memories WHEN new.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_memories'), 0) BEGIN\n INSERT INTO fts_memories (rowid, title, body) VALUES (new.rowid, new.title, new.body);\n END", "CREATE TRIGGER fts_memories_ad AFTER DELETE ON cotton_memories WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_memories'), 0) BEGIN\n INSERT INTO fts_memories (fts_memories, rowid, title, body) VALUES ('delete', old.rowid, old.title, old.body);\n END", "CREATE TRIGGER fts_memories_au AFTER UPDATE OF title, body ON cotton_memories\n FOR EACH ROW WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_memories'), 0) AND (new.title IS NOT old.title OR new.body IS NOT old.body) BEGIN\n INSERT INTO fts_memories (fts_memories, rowid, title, body) VALUES ('delete', old.rowid, old.title, old.body);\n INSERT INTO fts_memories (rowid, title, body) VALUES (new.rowid, new.title, new.body);\n END" ] } ], "id": "memory", "name": "Memory", "plural": "Memories", "visibility": "owner", "picture": { "photo": "photo:afa2e7071fc4a1861bf373c9f655432be3c584b1394989048eec4fc6bb1c789a", "object": "tool-memory" }, "builtin": true, "engine": "memory", "columns": [ { "key": "slug", "name": "Citation", "type": "text", "required": true, "indexed": true, "readonly": true }, { "key": "title", "name": "Entry", "type": "text", "required": true, "readonly": true }, { "key": "body", "name": "Body", "type": "longtext", "readonly": true }, { "key": "status", "name": "Status", "type": "choice", "choices": [ "active", "archived", "proposed" ], "readonly": true, "labels": { "proposed": "Proposed", "active": "Active", "archived": "Archived" }, "default": "active" }, { "key": "machine", "name": "Device", "type": "text", "readonly": true }, { "key": "visibility", "name": "Visibility", "type": "choice", "choices": [ "private", "shared", "public" ], "readonly": true, "labels": { "private": "Only you", "shared": "Shared", "public": "Public" }, "default": "private" }, { "key": "origin_kind", "name": "Written by", "type": "choice", "required": true, "choices": [ "user", "agent" ], "readonly": true, "labels": { "user": "You", "agent": "Assistant" } }, { "key": "origin_label", "name": "Assistant", "type": "text", "readonly": true }, { "key": "source", "name": "Source", "type": "text", "readonly": true }, { "key": "superseded_by", "name": "Replaced by", "type": "link", "link_to": "memory", "readonly": true, "contributes": false }, { "key": "source_external_id", "name": "Source external id", "type": "text" }, { "key": "archived_at", "name": "Archived at", "type": "text" }, { "key": "reviewed_at", "name": "Reviewed", "type": "date", "readonly": true }, { "key": "created_at", "name": "Added", "type": "date", "readonly": true, "fact": true, "reading": "{value}", "format": "calendar-datetime" } ], "title": "title", "date": "created_at", "project": null, "order": null, "slip": { "title": "title", "subtitle": null, "trailing": "created_at", "photo": null, "toggle": null, "title_lines": 0 }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "title", "body" ] }, { "heading": "Origin", "columns": [ "origin_kind", "origin_label", "reviewed_at", "status" ] }, { "heading": "Details", "columns": [ "slug", "machine", "visibility", "superseded_by" ] } ], "add": false, "record_route": "/memory/[id]", "delete": false, "commands": [ { "id": "open-superseded-by", "label": "Open replaced by", "kind": "open", "opens": "superseded_by", "object": "open" } ], "instructions": "A memory is one thing the owner said that should hold across sessions, in the owner's own words and order. An assistant only transcribes what the owner said: an entry an assistant writes is marked unreviewed until the owner keeps it. Cite an entry by its citation slug, and change or archive one only when the owner has said so.", "groups": { "stack": "slips" }, "card": { "face": "memory", "fields": [ { "slot": "title", "column": "title" }, { "slot": "body", "column": "body" }, { "slot": "date", "column": "created_at", "form": "relative" } ] }, "tool": { "views": [ { "id": "all", "label": "All", "visibility": "owner", "is_default": true, "read": { "table": "memory" } } ], "name": "Memory", "purpose": "What Cotton should remember in this database.", "tables": [ "memory", "briefing" ], "key": "memory", "icon": "brain", "card_stock": "cream" }, "parts": { "shape": "desk", "head": { "facts": [ "created_at" ] }, "links": [], "body": "body", "lists": [], "acts": { "more": [ "open-superseded-by" ] }, "cards": [ { "column": "status" }, { "column": "slug" }, { "column": "origin_label" }, { "column": "reviewed_at" } ], "strip": [] } }, { "format_version": 1, "tables": [ { "name": "cotton_money_accounts", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "kind", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n kind TEXT NOT NULL", "position": 2 }, { "name": "subtype", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n subtype TEXT NOT NULL", "position": 3 }, { "name": "name", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n name TEXT NOT NULL", "position": 4 }, { "name": "counterparty_person_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n counterparty_person_id TEXT", "position": 5 }, { "name": "currency", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n currency TEXT NOT NULL", "position": 6 }, { "name": "institution", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n institution TEXT", "position": 7 }, { "name": "number_mask", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n number_mask TEXT", "position": 8 }, { "name": "is_default", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n is_default INTEGER NOT NULL DEFAULT 0", "position": 9 }, { "name": "is_pooled", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n is_pooled INTEGER CHECK (is_pooled IS NULL OR is_pooled IN (0,1))", "position": 10 }, { "name": "archived_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n archived_at TEXT", "position": 11 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 12 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 13 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 14 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 15 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " trashed_at TEXT", "position": 16 } ], "constraints": [ { "declaration": "\n CHECK (subtype IN ('bank', 'cash', 'credit_card', 'wallet', 'receivable', 'payable', 'loan', 'lent_out', 'fixed_asset'))", "position": 17 }, { "declaration": "\n FOREIGN KEY (counterparty_person_id) REFERENCES cotton_people(id)", "position": 18 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 19 } ], "prefix": "CREATE TABLE \"cotton_money_accounts\" (", "suffix": ")", "indexes": [ "CREATE UNIQUE INDEX uq_cotton_money_accounts_identity ON cotton_money_accounts (workspace_id, institution, number_mask) WHERE (institution IS NOT NULL) AND (number_mask IS NOT NULL)", "CREATE INDEX idx_cotton_money_accounts_person ON cotton_money_accounts (counterparty_person_id) WHERE counterparty_person_id IS NOT NULL", "CREATE INDEX idx_cotton_money_accounts_workspace ON cotton_money_accounts (workspace_id)", "CREATE UNIQUE INDEX uq_cotton_money_accounts_default ON cotton_money_accounts (workspace_id) WHERE is_default = 1", "CREATE INDEX IF NOT EXISTS idx_cotton_money_accounts_author ON cotton_money_accounts (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "id": "money_account", "name": "Account", "plural": "Accounts", "visibility": "owner", "picture": { "photo": "photo:d3020bbe260bf41f313f8116af2a6ee38a7c9ee0ff72794fa86448e88d0b42e6", "object": "tool-money" }, "builtin": true, "engine": "money", "columns": [ { "key": "kind", "type": "choice", "choices": [ "bank", "credit_card", "cash", "wallet", "loan" ], "readonly": true }, { "key": "subtype", "type": "text", "readonly": true }, { "key": "name", "type": "text" }, { "key": "counterparty_person_id", "type": "link", "link_to": "person", "readonly": true }, { "key": "currency", "type": "text", "readonly": true }, { "key": "institution", "name": "Bank", "type": "text", "readonly": true }, { "key": "number_mask", "name": "Account ending", "type": "account_number", "readonly": true, "fact": true, "reading": "ending {value}" }, { "key": "is_default", "name": "Usual account", "type": "bool", "readonly": true }, { "key": "is_pooled", "name": "Pooled", "type": "bool" }, { "key": "archived_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "trashed_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "balance_minor", "name": "Balance", "type": "amount", "readonly": true, "currency": "currency" }, { "key": "balance_as_of", "name": "Balance as of", "type": "date", "readonly": true }, { "key": "known_balance_minor", "name": "Known balance", "type": "amount", "currency": "currency" }, { "key": "known_balance_on", "name": "Known balance on", "type": "date" } ], "title": "name", "date": null, "project": null, "order": null, "slip": { "title": "name", "subtitle": [ "kind", "number_mask" ], "trailing": null, "photo": null, "toggle": null, "figure": "balance_minor" }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "name", "kind", "institution", "is_pooled" ], "figure": "balance_minor" }, { "heading": "Statements", "columns": [], "list": { "table": "statement", "link": "account_id" }, "role": "side" } ], "add": false, "seal": { "clear": [ "kind", "subtype", "counterparty_person_id", "currency", "is_default", "is_pooled", "archived_at", "trashed_at", "balance_as_of", "known_balance_on" ], "blind": [ "name" ] }, "record_route": "/money/accounts/[id]", "delete": false, "derived": true, "instructions": "An account is a bank, card, cash, wallet or loan account. Loan statements are booked like bank statements and the balance is what is still owed.", "card": { "face": "account.statement", "fields": [ { "slot": "title", "column": "name" }, { "slot": "subtitle", "column": "institution" }, { "slot": "mask", "column": "number_mask" }, { "slot": "amount", "column": "balance_minor" } ] }, "parts": { "shape": "sheet", "head": { "facts": [ "kind", "institution" ] }, "links": [], "lists": [ { "table": "statement", "relation": "account_id", "heading": "Statements" } ], "acts": { "more": [] }, "cards": [ { "column": "kind" }, { "column": "institution" }, { "column": "is_pooled" } ] } }, { "format_version": 1, "tables": [], "id": "money_owed", "name": "Owed", "plural": "Owed", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "description", "name": "What", "type": "text", "readonly": false }, { "key": "occurred_on", "name": "Date", "type": "date", "readonly": false }, { "key": "account_id", "name": "Account", "type": "link", "link_to": "money_account", "readonly": false }, { "key": "amount_minor", "name": "Amount", "type": "amount", "readonly": false, "currency": "currency" }, { "key": "amount_known", "name": "Amount known", "type": "bool", "readonly": false }, { "key": "direction", "type": "choice", "choices": [ "in", "out" ], "readonly": false, "labels": { "out": "Owed to me", "in": "I owe" } }, { "key": "currency", "type": "text", "readonly": false }, { "key": "status", "type": "choice", "choices": [ "actual", "expected" ], "readonly": false }, { "key": "certainty", "type": "choice", "choices": [ "fixed", "expected", "estimate" ], "readonly": false }, { "key": "for_period", "name": "For month", "type": "text", "readonly": false }, { "key": "between_us", "name": "Between us", "type": "bool", "readonly": false }, { "key": "moves_money", "name": "Moves money", "type": "bool", "readonly": false }, { "key": "tag", "type": "text", "readonly": false }, { "key": "counterparty_person_id", "name": "Person", "type": "link", "link_to": "person", "readonly": false }, { "key": "due_date", "name": "Due", "type": "date", "readonly": false }, { "key": "owed_signed", "name": "Signed", "type": "amount", "currency": "currency", "computed": { "formula": { "op": "signed", "of": [ "amount_minor" ], "flip_when": { "column": "direction", "values": [ "in" ] } } } }, { "key": "balance_after", "name": "Balance after", "type": "amount", "currency": "currency", "computed": { "running": { "column": "owed_signed", "partition": [ "counterparty_person_id" ], "opening": 0, "order": "occurred_on" } } } ], "title": "description", "date": "occurred_on", "project": null, "order": null, "slip": { "title": "description", "subtitle": "tag", "trailing": "occurred_on", "photo": null, "toggle": null, "figure": "balance_after" }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "description", "occurred_on", "account_id" ], "figure": "balance_after" } ], "record_route": "/money/transactions/[id]", "sort": { "column": "occurred_on", "descending": true }, "group": { "column": "counterparty_person_id", "summary": [ { "op": "sum", "column": "owed_signed", "label": "between you" } ] }, "search": [ "description", "tag" ], "delete": false, "source": { "table": "transaction", "where": { "counterparty_person_id": { "present": true }, "status": "actual" } }, "instructions": "The money rows between you and another person, by person: what each owes, or is owed.", "groups": { "stack": "slips" } }, { "format_version": 1, "id": "music_album", "name": "Album", "plural": "Albums", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "title", "name": "Title", "type": "text", "required": true, "placeholder": "The album's title" }, { "key": "artist", "name": "Album artist", "type": "link", "link_to": "artist" }, { "key": "artist_name", "name": "By", "type": "text", "placeholder": "Who it is by" }, { "key": "cover", "name": "Cover", "type": "photo" }, { "key": "year", "name": "Year", "type": "text" }, { "key": "compilation", "name": "Compilation", "type": "bool" }, { "key": "discs", "name": "Discs", "type": "number", "units": { "one": "disc", "other": "discs" } }, { "key": "songs", "name": "Songs", "type": "number", "units": { "one": "song", "other": "songs" }, "computed": { "rollup": { "table": "song", "link": "album", "op": "count" } } }, { "key": "length", "name": "Length", "type": "number", "format": "duration", "computed": { "rollup": { "table": "song", "link": "album", "op": "sum", "column": "duration" } } }, { "key": "album_gain", "name": "Album gain", "type": "number", "readonly": true, "units": { "one": "{n} dB", "other": "{n} dB" } }, { "key": "album_peak", "name": "Album peak", "type": "number", "readonly": true }, { "key": "added_on", "name": "Added", "type": "date" }, { "key": "last_played_at", "name": "Last played", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "original_year", "name": "First released", "type": "text" }, { "key": "release_type", "name": "Kind of release", "type": "text" }, { "key": "label", "name": "Label", "type": "text" }, { "key": "catalog_number", "name": "Catalogue number", "type": "text" }, { "key": "barcode", "name": "Barcode", "type": "text" }, { "key": "bought_on", "name": "Bought", "type": "date" }, { "key": "store_url", "name": "Shop page", "type": "url" }, { "key": "store_id", "name": "Shop's id", "type": "text", "readonly": true }, { "key": "booklet", "name": "Booklet", "type": "file", "readonly": true }, { "key": "mb_release", "name": "MusicBrainz release", "type": "text", "readonly": true }, { "key": "mb_release_group", "name": "MusicBrainz release group", "type": "text", "readonly": true }, { "key": "filled_from", "name": "Filled from", "type": "longtext", "readonly": true }, { "key": "on_phone", "name": "On this phone", "type": "choice", "choices": [ "absent", "some", "keeping", "kept" ], "readonly": true, "labels": { "absent": "Not on this phone", "some": "Some on this phone", "keeping": "Coming down", "kept": "On this phone" } }, { "key": "sent_by", "name": "Sent by", "type": "text", "readonly": true }, { "key": "sent_by_number", "name": "Sent from", "type": "text", "readonly": true }, { "key": "sent_at", "name": "Sent", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "send_id", "name": "Send", "type": "text", "readonly": true } ], "title": "title", "date": "added_on", "project": null, "order": null, "slip": { "title": "title", "subtitle": [ "artist_name", "year" ], "trailing": "songs", "photo": "cover", "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "cover", "title", "artist", "artist_name", "year", "songs", "length" ] }, { "heading": "Album", "columns": [ "compilation", "discs", "original_year", "release_type", "label", "catalog_number", "barcode", "bought_on", "store_url", "store_id", "booklet", "added_on", "last_played_at", "album_gain", "album_peak", "on_phone", "mb_release", "mb_release_group", "filled_from" ] } ], "seal": { "clear": [ "artist", "cover", "year", "compilation", "discs", "album_gain", "album_peak", "added_on", "last_played_at", "original_year", "release_type", "bought_on", "booklet", "filled_from", "on_phone", "sent_at", "send_id" ], "blind": [ "title", "artist_name" ] }, "send": { "columns": [ "title", "artist_name", "cover", "year", "compilation", "discs", "album_gain", "album_peak", "original_year", "release_type", "label", "catalog_number", "barcode", "booklet", "mb_release", "mb_release_group" ], "files": [ "cover", "booklet" ], "same": [ [ "mb_release" ], [ "barcode" ], [ "title", "artist_name" ] ], "with": [ { "table": "song", "by": "album" } ] }, "sort": { "column": "artist_name", "descending": false, "tie": "year" }, "empty": { "title": "No albums yet", "message": "Albums gather from the songs that come in." }, "create": { "label": "Add music", "doors": [ { "id": "files", "label": "Add files", "object": "singles", "files": { "types": [ "public.audio", "public.zip-archive" ], "many": true } }, { "id": "folder", "label": "Add a folder", "object": "crate", "files": { "types": [ "public.folder" ] } } ] }, "commands": [ { "id": "play", "label": "Play", "kind": "update", "method": "shell.player", "data": { "table": "music_album", "op": "play" }, "bindings": { "id": "$id" }, "receipt": "Playing {name}", "object": "slip" }, { "id": "shuffle", "label": "Play shuffled", "kind": "update", "method": "shell.player", "data": { "table": "music_album", "op": "shuffle" }, "bindings": { "id": "$id" }, "receipt": "Shuffling {name}", "object": "loop" }, { "id": "play_next", "label": "Play next", "kind": "update", "method": "shell.player", "data": { "table": "music_album", "op": "queue_next" }, "bindings": { "id": "$id" }, "receipt": "{name} plays next", "object": "slip" }, { "id": "add_to_queue", "label": "Add to queue", "kind": "update", "method": "shell.player", "data": { "table": "music_album", "op": "queue_add" }, "bindings": { "id": "$id" }, "receipt": "Added {name} to the queue", "object": "folder" }, { "id": "find_details", "label": "Find details", "kind": "update", "method": "music.findDetails", "data": { "table": "music_album" }, "bindings": { "id": "$id" }, "receipt": "Looking up {name}", "object": "loop" }, { "id": "keep_on_phone", "label": "Keep on phone", "kind": "update", "method": "settings.openFlow", "data": { "flow": "keepAlbum", "origin_table": "music_album" }, "bindings": { "origin_id": "$id" }, "when": { "on_phone": [ "absent", "some" ] }, "receipt": "Keeping {name} on this phone", "object": "folder" }, { "id": "remove_download", "label": "Remove download", "kind": "update", "method": "settings.openFlow", "data": { "flow": "removeAlbumDownload", "origin_table": "music_album" }, "bindings": { "origin_id": "$id" }, "when": { "on_phone": [ "some", "keeping", "kept" ] }, "receipt": "Removed {name} from this phone", "object": "bin" } ], "instructions": "One row per album, gathered from its songs as they come in, in one go per album: keyed on the album artist and the title, so an album never splits because some of its songs carry the compilation mark and some do not. \"Various Artists\" is one album artist; a set of discs is one album whose songs carry their disc_number. artist links the album artist and artist_name is the album artist as tagged. cover is the embedded picture, else the folder's cover.jpg, else what fetch_cover { album } finds (Cover Art Archive by mb_release or mb_release_group, then Deezer), else what the phone finds on iTunes; it is only ever filled while empty, and a cover the owner chose is never replaced. year, compilation, discs, album_gain and album_peak come from the songs' tags; original_year is the year the release first came out (ORIGINALDATE, TDOR), release_type the kind of release as the tags say it, lower-cased: album, single, ep, compilation, live, soundtrack or other; label, catalog_number and barcode are the release's as tagged (LABEL or TPUB, CATALOGNUMBER, BARCODE), and fetch_cover fills the empty ones of release_type, label, catalog_number and barcode from MusicBrainz when mb_release is known; bought_on, store_url and store_id remember where it was bought, for any shop: an album ZIP brings them (store_url and store_id, bandcamp:/, from a Bandcamp album page named in the ZIP's note; bought_on the ZIP's own file date), filling only what is empty, and the owner may type them; booklet is the ZIP's PDF booklet, kept as a book file the reader opens. mb_release and mb_release_group from the tags or MusicBrainz, filling only what the tags left empty, each fill named in filled_from. songs and length are counted from its songs. last_played_at is the player's alone: the last time one of its songs counted as a play. Opening an album deals its songs in disc_number then track_number order. on_phone is answered by each phone from its songs (absent, some, keeping, kept) and never stored.", "groups": { "stack": "covers" }, "card": { "face": "album.sleeve", "offers": [ "album.sleeve", "album.tray" ], "fields": [ { "slot": "photo", "column": "cover" }, { "slot": "title", "column": "title" }, { "slot": "subtitle", "column": "artist_name" }, { "slot": "year", "column": "year" }, { "slot": "count", "column": "songs" }, { "slot": "length", "column": "length", "form": "clock" } ], "opens": { "table": "song", "by": "album", "order": [ "disc_number", "track_number" ] } } }, { "format_version": 1, "id": "passkey", "name": "Passkey", "plural": "Passkeys", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "rp_id", "name": "Site", "type": "text", "required": true }, { "key": "rp_name", "name": "Name", "type": "text" }, { "key": "user_name", "name": "Account", "type": "text" }, { "key": "user_handle", "name": "Account id", "type": "text" }, { "key": "credential_id", "name": "Credential id", "type": "text", "required": true }, { "key": "algorithm", "name": "Algorithm", "type": "choice", "required": true, "choices": [ "ES256", "RS256", "EdDSA" ], "labels": { "ES256": "ES256", "RS256": "RS256", "EdDSA": "EdDSA" } }, { "key": "public_key", "name": "Public key", "type": "longtext" }, { "key": "private_key_enc", "name": "Private key", "type": "text", "readonly": true, "secret": true }, { "key": "vmk_version", "name": "Vault key version", "type": "number", "readonly": true, "hidden": true }, { "key": "transports", "name": "Transports", "type": "text" }, { "key": "sign_count", "name": "Signature count", "type": "number" }, { "key": "created_at", "name": "Made", "type": "date", "format": "calendar-datetime" }, { "key": "last_used_at", "name": "Last used", "type": "date", "format": "calendar-datetime" }, { "key": "uses", "name": "Uses", "type": "number", "units": { "one": "{n} use", "other": "{n} uses" } }, { "key": "note", "name": "Note", "type": "longtext", "placeholder": "What this key is for" } ], "title": "rp_id", "date": "created_at", "project": null, "order": null, "slip": { "title": "rp_id", "subtitle": "user_name", "trailing": "last_used_at", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "rp_id", "rp_name", "user_name", "algorithm", "transports", "uses", "last_used_at", "created_at", "note" ] } ], "add": false, "sort": { "column": "rp_id", "descending": false, "tie": "user_name", "tie_descending": false }, "empty": { "title": "No passkeys yet", "message": "Save one from a site's sign-up and it is kept here." }, "instructions": "One row per passkey the owner keeps: the key pair a site (rp_id, the relying party, such as web.whatsapp.com; rp_name its own name for itself) made for one of their accounts (user_name as the site shows it, user_handle the site's opaque id for it, base64url). credential_id is the key's id (base64url), algorithm its COSE algorithm (ES256, RS256 or EdDSA), public_key the COSE public key (base64url), transports how the key is reached, comma separated (internal, hybrid, usb, nfc, ble). private_key_enc is the private key sealed under the owner's devices (the vault master key at vmk_version, bound to the row's id): no read, list, search or face ever answers it. sign_count is the site's signature counter, uses how many times the key signed, last_used_at when it last did. Cotton Vault makes and signs with every one; never make, change or copy one by hand, and never write a real key anywhere else. Note is the owner's own words; Remove deletes the passkey, and the site then refuses it.", "groups": { "stack": "slips" }, "card": { "face": "passkey.card", "offers": [ "passkey.card" ], "fields": [ { "slot": "title", "column": "rp_name" }, { "slot": "subtitle", "column": "rp_id" }, { "slot": "holder", "column": "user_name" }, { "slot": "body", "column": "note" }, { "slot": "facts", "column": "created_at", "also": [ "last_used_at", "uses" ] } ] } }, { "format_version": 1, "tables": [ { "name": "cotton_sessions", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "project_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n project_id TEXT", "position": 2 }, { "name": "tool", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n tool TEXT NOT NULL", "position": 3 }, { "name": "external_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n external_id TEXT", "position": 4 }, { "name": "machine", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n machine TEXT", "position": 5 }, { "name": "repo_url", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n repo_url TEXT", "position": 6 }, { "name": "branch", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n branch TEXT", "position": 7 }, { "name": "cwd", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n cwd TEXT", "position": 8 }, { "name": "started_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n started_at TEXT", "position": 9 }, { "name": "last_active_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n last_active_at TEXT NOT NULL", "position": 10 }, { "name": "ended_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n ended_at TEXT", "position": 11 }, { "name": "summary", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n summary TEXT", "position": 12 }, { "name": "title", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n title TEXT", "position": 13 }, { "name": "shipped", "type": "TEXT", "default": "'[]'", "nullable": false, "primary_key": false, "declaration": "\n shipped TEXT NOT NULL DEFAULT '[]'", "position": 14 }, { "name": "turn_count", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n turn_count INTEGER NOT NULL DEFAULT 0", "position": 15 }, { "name": "prompt_count", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n prompt_count INTEGER NOT NULL DEFAULT 0", "position": 16 }, { "name": "transcript_ref", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n transcript_ref TEXT", "position": 17 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 18 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 19 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 20 }, { "name": "account", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " account TEXT", "position": 21 }, { "name": "listened_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " listened_at TEXT", "position": 22 }, { "name": "model", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " model TEXT", "position": 23 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 24 }, { "name": "device_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n device_id TEXT", "position": 25 }, { "name": "state", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n state TEXT CHECK (state IS NULL OR state IN ('queued', 'starting', 'running', 'idle', 'waiting', 'ended', 'failed', 'withdrawn'))", "position": 26 }, { "name": "state_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n state_at TEXT", "position": 27 }, { "name": "waiting_kind", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n waiting_kind TEXT CHECK (waiting_kind IS NULL OR waiting_kind IN ('permission', 'question', 'input'))", "position": 28 }, { "name": "waiting_ref", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n waiting_ref TEXT", "position": 29 }, { "name": "last_line", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n last_line TEXT CHECK (last_line IS NULL OR length(last_line) <= 280)", "position": 30 }, { "name": "exit_code", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n exit_code INTEGER", "position": 31 }, { "name": "permission_mode", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n permission_mode TEXT CHECK (permission_mode IS NULL OR permission_mode IN ('bypass', 'ask'))", "position": 32 }, { "name": "host_owned", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n host_owned INTEGER NOT NULL DEFAULT 0 CHECK (host_owned IN (0, 1))", "position": 33 }, { "name": "todo_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n todo_id TEXT", "position": 34 }, { "name": "requested_device_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n requested_device_id TEXT", "position": 35 }, { "name": "chosen_by", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n chosen_by TEXT CHECK (chosen_by IS NULL OR chosen_by IN ('owner', 'dispatcher'))", "position": 36 }, { "name": "prompt", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n prompt TEXT NOT NULL DEFAULT ''", "position": 37 }, { "name": "hold_reason", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n hold_reason TEXT CHECK (hold_reason IS NULL OR length(hold_reason) <= 200)", "position": 38 }, { "name": "claimed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n claimed_at TEXT", "position": 39 }, { "name": "report_message_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n report_message_id TEXT", "position": 40 }, { "name": "error", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n error TEXT", "position": 41 }, { "name": "kind", "type": "TEXT", "default": "'thread'", "nullable": false, "primary_key": false, "declaration": "\n kind TEXT NOT NULL DEFAULT 'thread' CHECK (kind IN ('conversation', 'thread'))", "position": 42 }, { "name": "parent_session_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n parent_session_id TEXT", "position": 43 }, { "name": "todo_database", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n todo_database TEXT CHECK (todo_database IS NULL OR length(todo_database) > 0)", "position": 44 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " trashed_at TEXT", "position": 45 } ], "constraints": [ { "declaration": "\n UNIQUE (tool, external_id)", "position": 46 }, { "declaration": "\n CHECK (tool IN ('claude-code', 'codex', 'kimi', 'gemini', 'opencode', 'other'))", "position": 47 }, { "declaration": "\n CHECK (external_id IS NULL OR length(trim(external_id)) > 0)", "position": 48 }, { "declaration": "\n CHECK (machine IS NULL OR length(trim(machine)) > 0)", "position": 49 }, { "declaration": "\n CHECK ((summary IS NULL) OR (length(summary) <= 2000))", "position": 50 }, { "declaration": "\n CHECK ((title IS NULL) OR (length(title) <= 140))", "position": 51 }, { "declaration": "\n CHECK (json_type(shipped) = 'array')", "position": 52 }, { "declaration": "\n CHECK (turn_count >= 0)", "position": 53 }, { "declaration": "\n CHECK (prompt_count >= 0)", "position": 54 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 55 } ], "prefix": "CREATE TABLE cotton_sessions (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_sessions_recent ON cotton_sessions (workspace_id, last_active_at DESC)", "CREATE INDEX idx_cotton_sessions_project ON cotton_sessions (project_id, last_active_at DESC) WHERE project_id IS NOT NULL", "CREATE INDEX idx_cotton_sessions_machine ON cotton_sessions (workspace_id, machine, last_active_at DESC)", "CREATE INDEX idx_cotton_sessions_queue ON cotton_sessions (workspace_id, state, device_id)", "CREATE INDEX IF NOT EXISTS idx_cotton_sessions_author ON cotton_sessions (substr(_hlc, 20), _hlc)", "CREATE UNIQUE INDEX IF NOT EXISTS idx_cotton_sessions_conversation ON cotton_sessions (project_id) WHERE kind = 'conversation'", "CREATE INDEX IF NOT EXISTS idx_cotton_sessions_parent ON cotton_sessions (parent_session_id, last_active_at DESC) WHERE parent_session_id IS NOT NULL" ], "full_text": [], "triggers": [] }, { "name": "cotton_session_tasks", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "session_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n session_id TEXT NOT NULL", "position": 2 }, { "name": "seq", "type": "INTEGER", "default": null, "nullable": false, "primary_key": false, "declaration": "\n seq INTEGER NOT NULL", "position": 3 }, { "name": "text", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n text TEXT NOT NULL", "position": 4 }, { "name": "state", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n state TEXT NOT NULL", "position": 5 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 6 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 7 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 8 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 9 } ], "constraints": [ { "declaration": "\n UNIQUE (session_id, seq)", "position": 10 }, { "declaration": "\n CHECK (seq >= 0)", "position": 11 }, { "declaration": "\n CHECK (length(text) <= 500)", "position": 12 }, { "declaration": "\n CHECK (state IN ('open', 'active', 'done'))", "position": 13 }, { "declaration": "\n FOREIGN KEY (session_id) REFERENCES cotton_sessions(id)", "position": 14 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 15 } ], "prefix": "CREATE TABLE IF NOT EXISTS cotton_session_tasks (", "suffix": ")", "indexes": [ "CREATE INDEX IF NOT EXISTS idx_cotton_session_tasks_author ON cotton_session_tasks (substr(_hlc, 20), _hlc)", "CREATE INDEX IF NOT EXISTS idx_cotton_session_tasks_session ON cotton_session_tasks (session_id, seq)" ], "full_text": [], "triggers": [] }, { "name": "cotton_dev_jobs", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "device_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n device_id TEXT NOT NULL", "position": 2 }, { "name": "command", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n command TEXT NOT NULL", "position": 3 }, { "name": "cwd", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n cwd TEXT", "position": 4 }, { "name": "timeout_seconds", "type": "INTEGER", "default": "300", "nullable": false, "primary_key": false, "declaration": "\n timeout_seconds INTEGER NOT NULL DEFAULT 300", "position": 5 }, { "name": "state", "type": "TEXT", "default": "'queued'", "nullable": false, "primary_key": false, "declaration": "\n state TEXT NOT NULL DEFAULT 'queued'", "position": 6 }, { "name": "exit_code", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n exit_code INTEGER", "position": 7 }, { "name": "failure", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n failure TEXT", "position": 8 }, { "name": "log_path", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n log_path TEXT", "position": 9 }, { "name": "log_bytes", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n log_bytes INTEGER NOT NULL DEFAULT 0", "position": 10 }, { "name": "log_lines", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n log_lines INTEGER NOT NULL DEFAULT 0", "position": 11 }, { "name": "output_tail", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n output_tail TEXT", "position": 12 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 13 }, { "name": "claimed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n claimed_at TEXT", "position": 14 }, { "name": "finished_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n finished_at TEXT", "position": 15 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 16 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 17 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 18 } ], "constraints": [ { "declaration": "\n CHECK (length(device_id) > 0)", "position": 19 }, { "declaration": "\n CHECK (length(trim(command)) > 0)", "position": 20 }, { "declaration": "\n CHECK (length(command) <= 4096)", "position": 21 }, { "declaration": "\n CHECK (cwd IS NULL OR length(trim(cwd)) > 0)", "position": 22 }, { "declaration": "\n CHECK (timeout_seconds > 0)", "position": 23 }, { "declaration": "\n CHECK (timeout_seconds <= 3600)", "position": 24 }, { "declaration": "\n CHECK (state IN ('queued', 'running', 'done', 'failed', 'expired'))", "position": 25 }, { "declaration": "\n CHECK (log_bytes >= 0)", "position": 26 }, { "declaration": "\n CHECK (log_lines >= 0)", "position": 27 }, { "declaration": "\n CHECK (output_tail IS NULL OR length(output_tail) <= 65536)", "position": 28 }, { "declaration": "\n CHECK (failure IS NULL OR length(failure) <= 2048)", "position": 29 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 30 } ], "prefix": "CREATE TABLE IF NOT EXISTS cotton_dev_jobs (", "suffix": ")", "indexes": [ "CREATE INDEX IF NOT EXISTS idx_cotton_dev_jobs_author ON cotton_dev_jobs (substr(_hlc, 20), _hlc)", "CREATE INDEX IF NOT EXISTS idx_cotton_dev_jobs_queue ON cotton_dev_jobs (workspace_id, device_id, state, created_at)" ], "full_text": [], "triggers": [] } ], "id": "session", "name": "Session", "plural": "Sessions", "visibility": "owner", "picture": { "photo": "photo:2cac6e32a9504d6cb1dbe03334e4a29f9b9e865ba6c8d67ebe83d6e8c670e353", "object": "tool-code" }, "builtin": true, "engine": "sessions", "columns": [ { "key": "tool", "name": "Agent", "type": "choice", "required": true, "choices": [ "claude-code", "codex", "kimi", "gemini", "opencode", "other" ], "readonly": true, "labels": { "claude-code": "Claude Code", "codex": "Codex", "kimi": "Kimi", "gemini": "Gemini", "opencode": "OpenCode", "other": "Other" } }, { "key": "external_id", "name": "External id", "type": "text", "indexed": true }, { "key": "machine", "name": "Machine", "type": "text", "readonly": true }, { "key": "project", "name": "Project", "type": "link", "link_to": "project" }, { "key": "repo_url", "name": "Repository", "type": "text", "readonly": true }, { "key": "branch", "name": "Branch", "type": "text", "readonly": true }, { "key": "cwd", "name": "Folder", "type": "text", "readonly": true }, { "key": "started_at", "name": "Started", "type": "date", "readonly": true }, { "key": "last_active_at", "name": "Last active", "type": "date", "required": true, "readonly": true }, { "key": "ended_at", "name": "Ended", "type": "date", "readonly": true }, { "key": "summary", "name": "Summary", "type": "longtext", "readonly": true }, { "key": "title", "name": "Name", "type": "text" }, { "key": "shipped", "name": "Shipped", "type": "longtext", "readonly": true }, { "key": "turn_count", "name": "Turns", "type": "number", "readonly": true, "units": { "one": "turn", "other": "turns", "zero": "0 turns" }, "default": 0 }, { "key": "prompt_count", "name": "Prompts", "type": "number", "readonly": true, "units": { "one": "prompt", "other": "prompts", "zero": "0 prompts" }, "default": 0 }, { "key": "transcript_ref", "name": "Transcript", "type": "text", "readonly": true }, { "key": "model", "name": "Model", "type": "text", "readonly": true }, { "key": "account", "name": "Account", "type": "text", "readonly": true }, { "key": "listened_at", "name": "Listened at", "type": "text" }, { "key": "device_id", "name": "Device id", "type": "text" }, { "key": "state", "name": "State", "type": "choice", "choices": [ "queued", "starting", "running", "idle", "waiting", "ended", "failed", "withdrawn" ], "readonly": true, "labels": { "queued": "Queued", "starting": "Starting", "running": "Running", "idle": "Idle", "waiting": "Waiting", "ended": "Ended", "failed": "Failed", "withdrawn": "Withdrawn" } }, { "key": "state_at", "name": "State at", "type": "text" }, { "key": "waiting_kind", "name": "Waiting for", "type": "choice", "choices": [ "permission", "question", "input" ], "readonly": true, "labels": { "permission": "Permission", "question": "Question", "input": "Input" } }, { "key": "waiting_ref", "name": "Waiting ref", "type": "text" }, { "key": "last_line", "name": "Last line", "type": "text", "readonly": true }, { "key": "exit_code", "name": "Exit code", "type": "number", "readonly": true }, { "key": "permission_mode", "name": "Permissions", "type": "choice", "choices": [ "bypass", "ask" ], "readonly": true, "labels": { "bypass": "Run without asking", "ask": "Ask for permission" } }, { "key": "host_owned", "name": "Runs in a terminal here", "type": "bool", "readonly": true, "default": false }, { "key": "todo_id", "name": "Todo", "type": "link", "link_to": "todo", "readonly": true }, { "key": "todo_database", "name": "Todo database", "type": "text" }, { "key": "requested_device_id", "name": "Requested device id", "type": "text" }, { "key": "chosen_by", "name": "Chosen by", "type": "choice", "choices": [ "owner", "dispatcher" ] }, { "key": "prompt", "name": "Task", "type": "longtext", "readonly": true }, { "key": "hold_reason", "name": "Held because", "type": "text", "readonly": true }, { "key": "claimed_at", "name": "Claimed at", "type": "text" }, { "key": "error", "name": "Error", "type": "text", "readonly": true }, { "key": "kind", "name": "Kind", "type": "choice", "choices": [ "conversation", "thread" ], "readonly": true, "labels": { "conversation": "Conversation", "thread": "Thread" }, "default": "thread" }, { "key": "parent_session_id", "name": "Started from", "type": "link", "link_to": "session", "readonly": true }, { "key": "trashed_at", "name": "Trashed at", "type": "text" }, { "key": "project_id", "name": "Project", "type": "link", "link_to": "project" }, { "key": "heading", "name": "Heading", "type": "text", "readonly": true }, { "key": "section", "name": "Section", "type": "choice", "choices": [ "needs_you", "running", "quiet", "from_terminal", "ended" ], "readonly": true }, { "key": "project_slug", "name": "Project slug", "type": "text", "readonly": true }, { "key": "line", "name": "Now", "type": "text", "readonly": true }, { "key": "facts", "name": "Facts", "type": "text", "readonly": true }, { "key": "state_line", "name": "State", "type": "text", "readonly": true }, { "key": "notice", "name": "Notice", "type": "text", "readonly": true }, { "key": "pending_decision", "name": "Answered", "type": "text", "readonly": true }, { "key": "answering", "name": "Answering", "type": "text", "readonly": true }, { "key": "open_questions", "name": "Open questions", "type": "longtext", "readonly": true }, { "key": "can_resume", "name": "Can resume", "type": "bool", "readonly": true }, { "key": "tasks", "name": "Task list", "type": "longtext", "readonly": true }, { "key": "tasks_count", "name": "Tasks", "type": "text", "readonly": true }, { "key": "active_at", "name": "Active", "type": "date", "readonly": true } ], "title": "title", "date": "active_at", "project": "project_id", "order": null, "slip": { "title": "heading", "subtitle": "line", "trailing": "active_at", "photo": null, "toggle": null, "caption": { "columns": [ "facts" ], "dates": [ "active_at" ] }, "byline": { "column": "model", "words": { "synthetic": "fixture" } } }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "title", "state", "waiting_kind", "machine", "tool", "account", "project_id" ] }, { "heading": "Tasks", "columns": [ "tasks_count", "tasks" ] }, { "heading": "Task", "columns": [ "prompt", "hold_reason", "error", "last_line" ] }, { "heading": "Changes", "columns": [ "branch", "cwd", "repo_url", "shipped" ] }, { "heading": "Summary", "columns": [ "summary" ] }, { "heading": "Details", "columns": [ "model", "permission_mode", "host_owned", "started_at", "ended_at", "turn_count", "prompt_count", "exit_code", "todo_id", "parent_session_id", "kind", "transcript_ref" ] } ], "page_parts": [ "title", "facts", "messages" ], "listed_when": "section", "add": false, "record_route": "/sessions/[id]", "list_route": "/code", "scope": "personal", "setup": true, "screen_family": "sessions", "sort": { "column": "active_at", "descending": true }, "group": { "column": "section", "sections": [ { "heading": "Needs you", "values": [ "needs_you" ] }, { "heading": "Running", "values": [ "running" ] }, { "heading": "Quiet", "values": [ "quiet" ] }, { "heading": "From the terminal", "values": [ "from_terminal" ], "closed": true }, { "heading": "Ended", "values": [ "ended" ], "closed": true } ] }, "empty": { "title": "Nothing running.", "message": "Start a session and describe what an agent should do on one of your Macs." }, "conversation": { "table": "session_message", "links": [ "to_session_id", "from_session_id", "claimed_by_session_id" ], "body": "body", "at": "created_at", "mine": { "column": "from_kind", "values": [ "owner" ] }, "ended": "ended_at", "header": [ "state_line", "last_line", "facts", "notice", "tasks_count" ], "media": "media", "can_send": false, "started": { "at": "started_at", "words": [ "machine", "account" ] }, "also": [ { "table": "prompt", "links": [ "session_id" ], "body": "text", "at": "ts", "mine": { "column": "role", "values": [ "user" ] } } ] }, "delete": false, "links": [ { "label": "Machines", "table": "agent_login", "above": true } ], "menu": [ { "label": "Session defaults", "path": "/code/defaults", "object": "agent" } ], "instructions": "A session is one coding agent session, such as Claude Code or Codex, running on one of the owner's Macs and logged into a project. State says whether it is queued, running, waiting on the owner, idle or ended. A session found in an agent's transcript rather than started here has no terminal, so it cannot be stopped or given permission from here.", "groups": { "stack": "slips" }, "card": { "face": "session", "fields": [ { "slot": "title", "column": "heading" }, { "slot": "subtitle", "column": "last_line" }, { "slot": "source", "column": "machine", "also": [ "branch", "model" ] }, { "slot": "state", "column": "state", "only": [ "queued", "starting", "running", "waiting", "failed" ] }, { "slot": "date", "column": "active_at", "form": "relative" }, { "slot": "body", "column": "summary" } ], "pages": [ "tasks" ] }, "parts": { "shape": "desk", "head": { "facts": [ "title", "tool" ] }, "links": [ "project_id", "todo_id", "parent_session_id" ], "body": "summary", "lists": [], "acts": { "more": [] }, "strip": [ { "column": "state" }, { "column": "project_id" }, { "column": "machine" }, { "column": "branch" }, { "column": "model" }, { "column": "todo_id" }, { "column": "hold_reason" }, { "column": "error" } ] } }, { "format_version": 1, "id": "song", "name": "Song", "plural": "Songs", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "title", "name": "Title", "type": "text", "required": true, "placeholder": "The song's title" }, { "key": "artist_name", "name": "By", "type": "text", "placeholder": "Who it is by" }, { "key": "artist", "name": "Artist", "type": "link", "link_to": "artist" }, { "key": "album", "name": "Album", "type": "link", "link_to": "music_album" }, { "key": "album_title", "name": "On", "type": "text", "computed": { "lookup": { "through": "album", "column": "title" } } }, { "key": "cover", "name": "Cover", "type": "photo", "computed": { "lookup": { "through": "album", "column": "cover" } } }, { "key": "file", "name": "Recording", "type": "file", "readonly": true }, { "key": "format", "name": "Kind", "type": "choice", "choices": [ "mp3", "aac", "alac", "flac", "opus", "vorbis", "wav", "aiff" ], "readonly": true, "labels": { "mp3": "MP3", "aac": "AAC", "alac": "Apple Lossless", "flac": "FLAC", "opus": "Opus", "vorbis": "Ogg Vorbis", "wav": "WAV", "aiff": "AIFF" } }, { "key": "duration", "name": "Length", "type": "number", "readonly": true, "format": "duration" }, { "key": "track_number", "name": "Track", "type": "number" }, { "key": "disc_number", "name": "Disc", "type": "number" }, { "key": "year", "name": "Year", "type": "text" }, { "key": "genre", "name": "Genre", "type": "text" }, { "key": "composer", "name": "Composer", "type": "text" }, { "key": "favourite", "name": "Favourite", "type": "bool" }, { "key": "play_count", "name": "Plays", "type": "number", "readonly": true, "units": { "one": "play", "other": "plays" } }, { "key": "skip_count", "name": "Skips", "type": "number", "readonly": true, "units": { "one": "skip", "other": "skips" } }, { "key": "last_played_at", "name": "Last played", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "added_on", "name": "Added", "type": "date" }, { "key": "lyrics", "name": "Lyrics", "type": "longtext", "placeholder": "The words" }, { "key": "synced_lyrics", "name": "Timed lyrics", "type": "longtext", "readonly": true }, { "key": "lyrics_source", "name": "Lyrics from", "type": "choice", "choices": [ "file", "sidecar", "lrclib", "typed" ], "readonly": true, "labels": { "file": "The file", "sidecar": "A .lrc beside it", "lrclib": "LRCLIB", "typed": "Typed" } }, { "key": "track_gain", "name": "Track gain", "type": "number", "readonly": true, "units": { "one": "{n} dB", "other": "{n} dB" } }, { "key": "track_peak", "name": "Track peak", "type": "number", "readonly": true }, { "key": "bitrate", "name": "Bitrate", "type": "number", "readonly": true, "units": { "one": "{n} kbps", "other": "{n} kbps" } }, { "key": "sample_rate", "name": "Sample rate", "type": "number", "readonly": true, "units": { "one": "{n} Hz", "other": "{n} Hz" } }, { "key": "isrc", "name": "ISRC", "type": "text" }, { "key": "mb_recording", "name": "MusicBrainz", "type": "text", "readonly": true }, { "key": "mb_release_track", "name": "MusicBrainz track", "type": "text", "readonly": true }, { "key": "path", "name": "Came in as", "type": "text", "readonly": true }, { "key": "source", "name": "Came from", "type": "choice", "choices": [ "file", "folder", "lookup", "typed" ], "readonly": true, "labels": { "file": "The file's tags", "folder": "Its folder and name", "lookup": "MusicBrainz", "typed": "Typed" } }, { "key": "filled_from", "name": "Filled from", "type": "longtext", "readonly": true }, { "key": "on_phone", "name": "On this phone", "type": "choice", "choices": [ "absent", "keeping", "kept" ], "readonly": true, "labels": { "absent": "Not on this phone", "keeping": "Coming down", "kept": "On this phone" } }, { "key": "sent_by", "name": "Sent by", "type": "text", "readonly": true }, { "key": "sent_by_number", "name": "Sent from", "type": "text", "readonly": true }, { "key": "sent_at", "name": "Sent", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "send_id", "name": "Send", "type": "text", "readonly": true } ], "title": "title", "date": "added_on", "project": null, "order": null, "slip": { "title": "title", "subtitle": [ "artist_name", "album_title" ], "trailing": "duration", "photo": "cover", "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "cover", "title", "artist_name", "artist", "album", "track_number", "disc_number", "duration", "favourite" ] }, { "heading": "Lyrics", "columns": [ "lyrics", "synced_lyrics", "lyrics_source" ] }, { "heading": "Listening", "columns": [ "play_count", "skip_count", "last_played_at", "added_on" ] }, { "heading": "Song", "columns": [ "year", "genre", "composer", "isrc", "format", "bitrate", "sample_rate", "track_gain", "track_peak", "on_phone", "source", "path", "mb_recording", "mb_release_track", "filled_from" ] } ], "seal": { "clear": [ "artist", "album", "file", "format", "duration", "track_number", "disc_number", "year", "favourite", "play_count", "skip_count", "last_played_at", "added_on", "lyrics_source", "track_gain", "track_peak", "bitrate", "sample_rate", "source", "filled_from", "on_phone", "sent_at", "send_id" ], "blind": [ "title", "artist_name" ] }, "send": { "columns": [ "title", "artist_name", "file", "format", "duration", "track_number", "disc_number", "year", "genre", "composer", "lyrics", "synced_lyrics", "lyrics_source", "track_gain", "track_peak", "bitrate", "sample_rate", "isrc", "mb_recording", "mb_release_track" ], "files": [ "file" ], "same": [ [ "file" ], [ "mb_recording" ], [ "isrc" ] ], "carry": { "album": [ "title", "artist_name", "cover", "year", "mb_release", "mb_release_group" ] } }, "sort": { "column": "title", "descending": false }, "empty": { "title": "No songs yet", "message": "Share audio files to the app, or add a folder of them with Plus." }, "create": { "label": "Add music", "doors": [ { "id": "files", "label": "Add files", "object": "singles", "files": { "types": [ "public.audio", "public.zip-archive" ], "many": true } }, { "id": "folder", "label": "Add a folder", "object": "crate", "files": { "types": [ "public.folder" ] } } ] }, "commands": [ { "id": "play", "label": "Play", "kind": "update", "method": "shell.player", "data": { "table": "song", "op": "play" }, "bindings": { "id": "$id" }, "receipt": "Playing {name}", "object": "slip" }, { "id": "play_next", "label": "Play next", "kind": "update", "method": "shell.player", "data": { "table": "song", "op": "queue_next" }, "bindings": { "id": "$id" }, "receipt": "{name} plays next", "object": "slip" }, { "id": "add_to_queue", "label": "Add to queue", "kind": "update", "method": "shell.player", "data": { "table": "song", "op": "queue_add" }, "bindings": { "id": "$id" }, "receipt": "Added {name} to the queue", "object": "folder" }, { "id": "favourite", "label": "Mark as a favourite", "kind": "update", "verb": "update_record", "data": { "table": "song", "patch": { "favourite": true } }, "bindings": { "id": "$id" }, "when": { "favourite": false }, "receipt": "{name} is a favourite", "undo": "unfavourite", "object": "star" }, { "id": "unfavourite", "label": "Not a favourite", "kind": "update", "verb": "update_record", "data": { "table": "song", "patch": { "favourite": false } }, "bindings": { "id": "$id" }, "when": { "favourite": true }, "receipt": "{name} is not a favourite", "undo": "favourite", "object": "star" }, { "id": "find_lyrics", "label": "Find lyrics", "kind": "update", "method": "object.act", "data": { "act": "find_lyrics" }, "bindings": { "song": "$id" }, "when": { "lyrics": [ false, "" ] }, "receipt": "Looking for the words of {name}", "object": "loop" }, { "id": "keep_on_phone", "label": "Keep on phone", "kind": "update", "method": "settings.openFlow", "data": { "flow": "keepSong", "origin_table": "song" }, "bindings": { "origin_id": "$id" }, "when": { "on_phone": "absent" }, "receipt": "Keeping {name} on this phone", "object": "folder" }, { "id": "remove_download", "label": "Remove download", "kind": "update", "method": "settings.openFlow", "data": { "flow": "removeSongDownload", "origin_table": "song" }, "bindings": { "origin_id": "$id" }, "when": { "on_phone": [ "keeping", "kept" ] }, "receipt": "Removed {name} from this phone", "object": "bin" } ], "instructions": "One row per song the owner keeps as an audio file (the file in the object's media under music/, one object per file named by its bytes). The file's own tags come first: title, artist_name (the credit as tagged, \"A feat. B\"), track_number, disc_number, year, genre, composer, duration in seconds, bitrate, sample_rate, track_gain and track_peak (ReplayGain or R128), isrc, mb_recording (the MusicBrainz recording id: MUSICBRAINZ_TRACKID, ID3's UFID), mb_release_track (the MusicBrainz track id of this song on its release: MUSICBRAINZ_RELEASETRACKID) and the lyrics are read from the file when it comes in; the folder and the file's name (Artist/Album (Year)/01 Title) fill only what the tags left empty, and a lookup (MusicBrainz on the phone, LRCLIB through find_lyrics) fills only what both left empty. A column the owner edited is never written over by a tag, a folder or a lookup. filled_from says, as JSON, where each column a lookup filled came from ({\"year\": \"musicbrainz\"}). artist links the song's own artist and album its album (music_album), which brings album_title and cover. The same bytes twice is one song (the file key is the bytes' hash); the same song in two formats (artist, title, album, length within 2 seconds) is one song, the better file kept (lossless over lossy, then the higher bitrate). format, duration, bitrate, sample_rate and the gains are the file's and are never typed. play_count, skip_count and last_played_at are the player's alone: a play counts once the song has been heard for thirty seconds or half its length, whichever is sooner, and every play counted is a listen row, from which the core keeps play_count and last_played_at. A song left by Next (or Previous onto another song) before it counted is a skip: no listen row, and skip_count one more; a listen that ended skipped (heard enough, then left) makes play_count and skip_count each one more. lyrics is the plain text and synced_lyrics the timed lyrics as LRC; lyrics_source says where they came from (file, sidecar, lrclib, typed). find_lyrics { song } asks LRCLIB for one song whose lyrics are empty, never for many at once. favourite is the owner's own mark. source says where the row came from and path the file's path as it came in. on_phone is answered by each phone (absent, keeping, kept) and never stored. Playlists are this table's groups, ordered, a song at most once in each.", "groups": { "stack": "slips" }, "card": { "face": "song.single", "offers": [ "song.single", "song.tray", "song.cassette" ], "fields": [ { "slot": "photo", "column": "cover" }, { "slot": "title", "column": "title" }, { "slot": "subtitle", "column": "artist_name" }, { "slot": "album", "column": "album" }, { "slot": "number", "column": "track_number", "line": "field.track" }, { "slot": "length", "column": "duration", "form": "clock" }, { "slot": "count", "column": "play_count" }, { "slot": "play", "column": "file" }, { "slot": "body", "column": "lyrics" } ] } }, { "format_version": 1, "tables": [ { "name": "cotton_money_statements", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "document_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n document_id TEXT NOT NULL", "position": 2 }, { "name": "account_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n account_id TEXT", "position": 3 }, { "name": "kind", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n kind TEXT NOT NULL", "position": 4 }, { "name": "period_start", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n period_start TEXT", "position": 5 }, { "name": "period_end", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n period_end TEXT", "position": 6 }, { "name": "opening_balance_minor", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n opening_balance_minor INTEGER", "position": 7 }, { "name": "closing_balance_minor", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n closing_balance_minor INTEGER", "position": 8 }, { "name": "currency", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n currency TEXT NOT NULL", "position": 9 }, { "name": "read_status", "type": "TEXT", "default": "'pending'", "nullable": false, "primary_key": false, "declaration": "\n read_status TEXT NOT NULL DEFAULT 'pending'", "position": 10 }, { "name": "read_error", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n read_error TEXT", "position": 11 }, { "name": "read_by", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n read_by TEXT", "position": 12 }, { "name": "read_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n read_at TEXT", "position": 13 }, { "name": "line_count", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n line_count INTEGER NOT NULL DEFAULT 0", "position": 14 }, { "name": "sum_in_minor", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n sum_in_minor INTEGER NOT NULL DEFAULT 0", "position": 15 }, { "name": "sum_out_minor", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n sum_out_minor INTEGER NOT NULL DEFAULT 0", "position": 16 }, { "name": "balance_check", "type": "TEXT", "default": "'unknown'", "nullable": false, "primary_key": false, "declaration": "\n balance_check TEXT NOT NULL DEFAULT 'unknown'", "position": 17 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 18 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 19 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 20 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 21 } ], "constraints": [ { "declaration": "\n UNIQUE (document_id)", "position": 22 }, { "declaration": "\n CHECK (balance_check IN ('ok', 'mismatch', 'unknown'))", "position": 23 }, { "declaration": "\n CHECK (kind IN ('bank', 'credit_card'))", "position": 24 }, { "declaration": "\n CHECK (line_count >= 0)", "position": 25 }, { "declaration": "\n CHECK ((period_start IS NULL) OR (period_end IS NULL) OR (period_end >= period_start))", "position": 26 }, { "declaration": "\n CHECK (read_status IN ('pending', 'read', 'mismatch', 'failed'))", "position": 27 }, { "declaration": "\n FOREIGN KEY (document_id) REFERENCES cotton_documents(id)", "position": 28 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 29 } ], "prefix": "CREATE TABLE cotton_money_statements (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_money_statements_account ON cotton_money_statements (account_id, period_start) WHERE account_id IS NOT NULL", "CREATE INDEX idx_cotton_money_statements_pending ON cotton_money_statements (created_at) WHERE read_status = 'pending'", "CREATE INDEX idx_cotton_money_statements_workspace ON cotton_money_statements (workspace_id, period_start DESC)", "CREATE INDEX IF NOT EXISTS idx_cotton_money_statements_author ON cotton_money_statements (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "id": "statement", "name": "Statement", "plural": "Statements", "visibility": "owner", "picture": null, "builtin": true, "engine": "money", "columns": [ { "key": "document_id", "name": "Document", "type": "link", "required": true, "link_to": "document", "readonly": true }, { "key": "account_id", "name": "Account", "type": "link", "link_to": "money_account", "readonly": true }, { "key": "kind", "type": "choice", "required": true, "choices": [ "bank", "credit_card" ], "readonly": true, "labels": { "bank": "Bank statement", "credit_card": "Card statement" } }, { "key": "period_start", "name": "Period", "type": "date", "readonly": true }, { "key": "period_end", "name": "To", "type": "date", "readonly": true }, { "key": "opening_balance_minor", "name": "Opening balance", "type": "amount", "readonly": true, "currency": "currency" }, { "key": "closing_balance_minor", "name": "Closing balance", "type": "amount", "readonly": true, "currency": "currency" }, { "key": "currency", "type": "text", "required": true, "readonly": true }, { "key": "read_status", "name": "Reading", "type": "choice", "choices": [ "pending", "read", "mismatch", "failed" ], "readonly": true, "labels": { "pending": "Not read yet", "read": "Read", "mismatch": "Read, totals differ", "failed": "Could not be read" } }, { "key": "read_error", "name": "Read problem", "type": "text", "readonly": true }, { "key": "read_by", "type": "text", "readonly": true }, { "key": "read_at", "name": "Read", "type": "date", "readonly": true }, { "key": "line_count", "name": "Lines", "type": "number", "readonly": true }, { "key": "sum_in_minor", "name": "Money in", "type": "amount", "readonly": true, "currency": "currency" }, { "key": "sum_out_minor", "name": "Money out", "type": "amount", "readonly": true, "currency": "currency" }, { "key": "balance_check", "name": "Balance check", "type": "choice", "choices": [ "ok", "mismatch", "unknown" ], "readonly": true, "labels": { "ok": "Adds up", "mismatch": "Does not add up", "unknown": "Not checked" } }, { "key": "recorded_count", "name": "Recorded entries", "type": "number", "readonly": true }, { "key": "visual_problem", "name": "Reading problem", "type": "text", "readonly": true, "labels": { "unavailable": "Could not read: page verification is unavailable on this Mac.", "renderer_failed": "Could not read: the page images could not be read.", "glyph_maps_unread": "Could not read: the PDF font maps could not be decoded.", "heading_mismatch": "Could not read: a figure in the statement heading differs from the page image." } }, { "key": "visual_problem_page", "name": "Reading problem", "type": "number", "readonly": true, "units": { "one": "Could not read page {n}: a figure differs from the page image.", "other": "Could not read page {n}: a figure differs from the page image." } }, { "key": "visual_problem_field", "name": "Figure", "type": "text", "readonly": true, "labels": { "date": "Date", "amount": "Amount", "direction": "Money in or out", "balance": "Running balance", "balance_after": "Running balance", "balance_after_minor": "Running balance", "period_start": "Period start", "period_end": "Period end", "opening_balance": "Opening balance", "closing_balance": "Closing balance", "opening_balance_minor": "Opening balance", "closing_balance_minor": "Closing balance", "entry_count": "Repeated entries", "entry_type": "Money entry or total" } } ], "title": "period_start", "date": "period_end", "project": null, "order": null, "slip": { "title": "period_start", "subtitle": "account_id", "trailing": "period_end", "photo": null, "toggle": null, "caption": { "columns": [ "closing_balance_minor", "balance_check", "recorded_count" ] } }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "period_start", "period_end", "account_id", "document_id" ], "figure": "closing_balance_minor" }, { "heading": null, "columns": [ "visual_problem", "visual_problem_page", "visual_problem_field" ], "when": { "column": "visual_problem", "present": true } }, { "heading": null, "columns": [ "opening_balance_minor", "closing_balance_minor", "balance_check", "read_error" ], "role": "facts" }, { "heading": "Lines", "columns": [], "list": { "table": "statement_line", "link": "statement_id", "empty": { "title": "Kept as a summary", "message": "This statement was kept as its totals only. Its lines were not kept." } }, "when": { "column": "read_status", "values": [ "read", "mismatch" ] }, "role": "main" }, { "heading": null, "columns": [ "kind", "currency", "read_status" ], "role": "side" }, { "heading": "Totals", "columns": [ "line_count", "recorded_count", "sum_in_minor", "sum_out_minor", "read_at" ], "role": "side" } ], "seal": { "clear": [ "document_id", "account_id", "kind", "period_start", "period_end", "currency", "read_status", "read_by", "read_at", "line_count", "balance_check", "recorded_count" ] }, "sort": { "column": "period_start", "descending": true }, "delete": false, "derived": true, "instructions": "A statement is a bank or card statement read from a filed document, covering one period of one account. Read status is pending until read, read when the totals agreed, mismatch when they did not, and failed when it could not be read. Nothing is recorded from a statement whose totals did not agree; amounts are integer minor units.", "parts": { "shape": "sheet", "head": { "facts": [] }, "links": [], "lists": [ { "table": "statement_line", "relation": "statement_id", "heading": "Lines" } ], "acts": { "more": [] }, "cards": [ { "column": "balance_check" }, { "column": "read_status" }, { "column": "visual_problem", "when": { "column": "visual_problem", "values": [ "unavailable", "renderer_failed", "glyph_maps_unread", "heading_mismatch" ] } }, { "column": "visual_problem_page", "when": { "column": "visual_problem", "values": [ "page_mismatch" ] } }, { "column": "visual_problem_field", "when": { "column": "visual_problem", "values": [ "heading_mismatch", "page_mismatch" ] } }, { "column": "read_error" }, { "column": "opening_balance_minor" }, { "column": "closing_balance_minor" }, { "column": "sum_in_minor" }, { "column": "sum_out_minor" }, { "column": "recorded_count" } ], "strip": [] } }, { "format_version": 1, "tables": [ { "name": "cotton_money_statement_lines", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "statement_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n statement_id TEXT NOT NULL", "position": 2 }, { "name": "page", "type": "INTEGER", "default": null, "nullable": false, "primary_key": false, "declaration": "\n page INTEGER NOT NULL", "position": 3 }, { "name": "line_no", "type": "INTEGER", "default": null, "nullable": false, "primary_key": false, "declaration": "\n line_no INTEGER NOT NULL", "position": 4 }, { "name": "posted_on", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n posted_on TEXT NOT NULL", "position": 5 }, { "name": "text", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n text TEXT NOT NULL", "position": 6 }, { "name": "amount_minor", "type": "INTEGER", "default": null, "nullable": false, "primary_key": false, "declaration": "\n amount_minor INTEGER NOT NULL", "position": 7 }, { "name": "direction", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n direction TEXT NOT NULL", "position": 8 }, { "name": "balance_after_minor", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n balance_after_minor INTEGER", "position": 9 }, { "name": "reference", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n reference TEXT", "position": 10 }, { "name": "fingerprint", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n fingerprint TEXT NOT NULL", "position": 11 }, { "name": "ignored_reason", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n ignored_reason TEXT", "position": 12 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 13 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 14 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 15 } ], "constraints": [ { "declaration": "\n UNIQUE (statement_id, line_no)", "position": 16 }, { "declaration": "\n CHECK (amount_minor > 0)", "position": 17 }, { "declaration": "\n CHECK (direction IN ('in', 'out'))", "position": 18 }, { "declaration": "\n CHECK (length(trim(text)) > 0)", "position": 19 }, { "declaration": "\n CHECK (line_no >= 1)", "position": 20 }, { "declaration": "\n CHECK (page >= 1)", "position": 21 }, { "declaration": "\n FOREIGN KEY (statement_id) REFERENCES cotton_money_statements(id)", "position": 22 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 23 } ], "prefix": "CREATE TABLE cotton_money_statement_lines (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_money_statement_lines_statement ON cotton_money_statement_lines (statement_id, line_no)", "CREATE INDEX idx_cotton_money_statement_lines_workspace ON cotton_money_statement_lines (workspace_id)", "CREATE UNIQUE INDEX uq_cotton_money_statement_lines_fingerprint ON cotton_money_statement_lines (statement_id, fingerprint)", "CREATE INDEX idx_cotton_money_statement_lines_fingerprint ON cotton_money_statement_lines (fingerprint)", "CREATE INDEX IF NOT EXISTS idx_cotton_money_statement_lines_author ON cotton_money_statement_lines (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [ "CREATE TRIGGER cotton_money_statement_lines_no_delete_booked\n BEFORE DELETE ON cotton_money_statement_lines\n WHEN EXISTS (SELECT 1 FROM cotton_money_evidence AS e WHERE e.kind = 'statement_line' AND e.ref_id = OLD.id)\n BEGIN SELECT RAISE(ABORT, 'a booked statement line is never deleted'); END" ] } ], "id": "statement_line", "name": "Statement line", "plural": "Statement lines", "visibility": "owner", "picture": null, "builtin": true, "engine": "money", "columns": [ { "key": "statement_id", "name": "Statement", "type": "link", "required": true, "link_to": "statement", "readonly": true }, { "key": "page", "type": "number", "required": true, "readonly": true }, { "key": "line_no", "type": "number", "readonly": true }, { "key": "posted_on", "name": "Date", "type": "date", "readonly": true, "fact": true, "reading": "{value}", "format": "calendar-datetime" }, { "key": "text", "name": "As the bank wrote it", "type": "text", "readonly": true }, { "key": "amount_minor", "name": "Amount", "type": "amount", "readonly": true, "currency": "currency", "signed": true }, { "key": "direction", "type": "text", "readonly": true }, { "key": "balance_after_minor", "name": "Balance after", "type": "amount", "readonly": true, "currency": "currency" }, { "key": "reference", "type": "text", "readonly": true }, { "key": "fingerprint", "type": "text", "readonly": true }, { "key": "ignored_reason", "name": "Skipped because", "type": "text", "readonly": true }, { "key": "title", "name": "With", "type": "text", "readonly": true }, { "key": "currency", "type": "text", "readonly": true }, { "key": "state", "type": "choice", "choices": [ "recorded", "unread", "skipped" ], "readonly": true, "labels": { "recorded": "Recorded", "unread": "Not recorded yet", "skipped": "Skipped" } }, { "key": "transaction_id", "name": "Recorded as", "type": "link", "link_to": "transaction", "readonly": true } ], "title": "title", "date": "posted_on", "project": null, "order": null, "slip": { "title": "title", "subtitle": "state", "trailing": "posted_on", "photo": null, "toggle": null, "title_fallback": "text", "figure": "amount_minor" }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "title", "text", "amount_minor", "posted_on", "state", "transaction_id", "statement_id", "balance_after_minor", "ignored_reason" ] } ], "seal": { "clear": [ "statement_id", "page", "line_no", "posted_on", "direction", "currency", "state", "transaction_id", "fingerprint" ] }, "search": [ "text" ], "delete": false, "derived": true, "instructions": "Money engine view: one line as a statement printed it. title is the bank's words tidied for reading; text is exactly as the bank wrote them. Engine columns are read-only.", "parts": { "shape": "sheet", "head": { "facts": [ "posted_on" ], "state": "state" }, "links": [], "lists": [], "acts": { "more": [] }, "cards": [ { "column": "amount_minor" }, { "column": "text", "label": "Bank's words" }, { "column": "balance_after_minor" }, { "column": "ignored_reason" } ], "strip": [] } }, { "format_version": 1, "id": "story_answer", "name": "Answer", "plural": "Answers", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "story", "name": "Story", "type": "link", "required": true, "link_to": "story_story" }, { "key": "question", "name": "Question", "type": "text", "required": true }, { "key": "answer", "name": "Answer", "type": "longtext" }, { "key": "skipped", "name": "Skipped", "type": "bool" }, { "key": "answered_at", "name": "Answered", "type": "date", "format": "calendar-datetime" } ], "title": "question", "date": null, "project": null, "order": null, "slip": { "title": "question", "subtitle": null, "trailing": null, "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "question", "answer", "skipped", "answered_at" ] } ], "seal": { "clear": [ "story", "question", "skipped", "answered_at" ], "blind": [ "answer" ] }, "sort": { "column": "question", "descending": false }, "empty": { "title": "No answers yet", "message": "Your answers to Your story gather here." }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "story_answer" } } ], "instructions": "The writer's answer to one of Your story's questions: question is the question's key in the kit, answer what they said, skipped when they passed it by. A scene may point at the answer it grew from (story_scene.answer)." }, { "format_version": 1, "id": "story_character", "name": "Character", "plural": "Characters", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "story", "name": "Story", "type": "link", "required": true, "link_to": "story_story" }, { "key": "name", "name": "Name", "type": "text", "required": true, "placeholder": "Their name, as it appears in the script" }, { "key": "role", "name": "Who they are", "type": "text", "placeholder": "One line: who they are" }, { "key": "about", "name": "About", "type": "longtext" }, { "key": "want", "name": "What they want", "type": "text" }, { "key": "picture", "name": "Picture", "type": "photo" }, { "key": "scenes", "name": "Scenes", "type": "number", "readonly": true, "units": { "one": "in 1 scene", "other": "in {n} scenes" } }, { "key": "lines", "name": "Lines", "type": "number", "readonly": true, "units": { "one": "1 line", "other": "{n} lines" } }, { "key": "tint", "name": "Tint", "type": "text" } ], "title": "name", "date": null, "project": null, "order": null, "slip": { "title": "name", "subtitle": "role", "trailing": "lines", "photo": "picture", "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "picture", "name", "role", "want" ] }, { "heading": "About", "columns": [ "about" ] } ], "seal": { "clear": [ "story", "picture", "scenes", "lines", "tint" ], "blind": [ "name", "role", "about", "want" ] }, "sort": { "column": "lines", "descending": true }, "empty": { "title": "No characters yet", "message": "Characters gather here by themselves as they speak in your scenes." }, "create": { "label": "New character" }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "story_character" } } ], "commands": [ { "id": "delete", "label": "Remove", "kind": "delete", "verb": "delete_record", "data": { "table": "story_character" }, "confirm": "It can come back from Deleted, and Undo brings it back now. What they say in your scenes stays.", "bindings": { "id": "$id" }, "receipt": "Removed", "does": "destroys", "object": "bin" } ], "instructions": "A character is someone in a story: their name as it appears in the script, who they are in one line, what they want, a longer about and an optional picture. The core makes a character on its own when a scene gives a name speech and the story has no character by that name. Renaming a character renames them through the story's scenes. scenes and lines (how many scenes they speak in and how many speeches they have) are worked out, never written.", "card": { "face": "character.card", "fields": [ { "slot": "title", "column": "name" }, { "slot": "subtitle", "column": "role" }, { "slot": "quote", "column": "want" }, { "slot": "photo", "column": "picture" }, { "slot": "note", "column": "lines" } ] } }, { "format_version": 1, "id": "story_costume", "name": "Costume", "plural": "Costumes", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "story", "name": "Story", "type": "link", "required": true, "link_to": "story_story" }, { "key": "character", "name": "Worn by", "type": "link", "required": true, "link_to": "story_character" }, { "key": "name", "name": "Name", "type": "text", "placeholder": "Wedding sari, school uniform" }, { "key": "about", "name": "About", "type": "longtext" }, { "key": "day", "name": "Story day", "type": "number" }, { "key": "picture", "name": "Picture", "type": "photo" } ], "title": "name", "date": null, "project": null, "order": null, "slip": { "title": "name", "subtitle": "about", "trailing": null, "photo": "picture", "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "picture", "name", "character", "day" ] }, { "heading": "About", "columns": [ "about" ] } ], "seal": { "clear": [ "story", "character", "day", "picture" ], "blind": [ "name", "about" ] }, "sort": { "column": "name", "descending": false }, "empty": { "title": "No costumes yet", "message": "What each character wears gathers here." }, "create": { "label": "New costume" }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "story_costume" } } ], "instructions": "What one character wears: worn by (a story_character), a name, an about, the story day it is worn on (day, optional) and an optional picture. More pictures are story_picture rows naming the costume. The scenes it is worn in are story_use rows (scene, costume). Nothing is made on its own." }, { "format_version": 1, "id": "story_draft", "name": "Draft", "plural": "Drafts", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "story", "name": "Story", "type": "link", "required": true, "link_to": "story_story" }, { "key": "name", "name": "Name", "type": "text", "required": true, "placeholder": "First draft, Second draft" }, { "key": "made_at", "name": "Marked", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "scenes", "name": "Scenes", "type": "number", "readonly": true }, { "key": "pages", "name": "Pages", "type": "number", "readonly": true, "decimals": 1 }, { "key": "cast", "name": "Characters then", "type": "longtext", "readonly": true }, { "key": "places", "name": "Places then", "type": "longtext", "readonly": true } ], "title": "name", "date": null, "project": null, "order": null, "slip": { "title": "name", "subtitle": null, "trailing": "made_at", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "name", "made_at", "scenes", "pages" ] } ], "seal": { "clear": [ "story", "made_at", "scenes", "pages" ], "blind": [ "name" ] }, "sort": { "column": "made_at", "descending": false }, "empty": { "title": "No drafts yet", "message": "Mark a draft to keep the script as it stands today." }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "story_draft" } } ], "instructions": "A named, dated draft of a story, frozen as it stood when it was marked: its scenes are story_draft_scene rows. Writing goes on in the story itself. Mark one with story_draft_mark, read it with story_draft_read, see what changed since with story_draft_changes, and go back to it with story_draft_restore. A draft is never changed after it is made. cast and places are JSON: [{ id, name }] as they were named then." }, { "format_version": 1, "id": "story_draft_scene", "name": "Draft scene", "plural": "Draft scenes", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "draft", "name": "Draft", "type": "link", "required": true, "link_to": "story_draft" }, { "key": "story", "name": "Story", "type": "link", "required": true, "link_to": "story_story" }, { "key": "scene", "name": "Scene", "type": "text", "required": true }, { "key": "position", "name": "Order", "type": "number" }, { "key": "heading", "name": "Scene heading", "type": "text" }, { "key": "setting", "name": "Inside or out", "type": "text" }, { "key": "place", "name": "Place", "type": "text" }, { "key": "time", "name": "Time", "type": "text" }, { "key": "day", "name": "Story day", "type": "number" }, { "key": "summary", "name": "What happens", "type": "text" }, { "key": "body", "name": "Scene", "type": "longtext" }, { "key": "lines", "name": "Lines", "type": "longtext" } ], "title": "heading", "date": null, "project": null, "order": "position", "slip": { "title": "heading", "subtitle": "summary", "trailing": null, "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "heading", "summary", "body" ] } ], "seal": { "clear": [ "draft", "story", "scene", "position", "setting", "place", "day" ] }, "sort": { "column": "position", "descending": false }, "empty": { "title": "No scenes in this draft", "message": "A draft keeps its scenes as they stood." }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "story_draft_scene" } } ], "instructions": "One scene of a draft as it stood when the draft was marked: scene is the scene's id (the scene may have changed or gone since), position its order then, its heading parts, summary, Fountain body and lines (JSON: [{ id, kind, who, character, aside, form, text }], each line's own id). Written only by story_draft_mark; never changed." }, { "format_version": 1, "id": "story_line", "name": "Line", "plural": "Lines", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "story", "name": "Story", "type": "link", "required": true, "link_to": "story_story" }, { "key": "scene", "name": "Scene", "type": "link", "required": true, "link_to": "story_scene" }, { "key": "position", "name": "Order", "type": "number" }, { "key": "kind", "name": "Kind", "type": "choice", "choices": [ "action", "dialogue", "note", "enters" ], "labels": { "action": "Action", "dialogue": "Speech", "note": "Note", "enters": "Enters" }, "default": "action" }, { "key": "character", "name": "Character", "type": "link", "link_to": "story_character" }, { "key": "who", "name": "Who", "type": "text" }, { "key": "aside", "name": "Aside", "type": "text" }, { "key": "form", "name": "Set as", "type": "choice", "choices": [ "transition", "centered" ], "labels": { "transition": "Cut", "centered": "Centred" } }, { "key": "text", "name": "Line", "type": "longtext" } ], "title": "text", "date": null, "project": null, "order": "position", "slip": { "title": "text", "subtitle": null, "trailing": null, "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "scene", "position", "kind", "character", "who", "aside", "form", "text" ] } ], "seal": { "clear": [ "story", "scene", "position", "character" ], "blind": [ "text" ], "blind_bytes": { "text": 1024 } }, "sort": { "column": "position", "descending": false }, "empty": { "title": "No lines yet", "message": "Lines gather here as you write a scene." }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "story_line" } } ], "instructions": "One line of a scene as the writer set it down: action, speech (dialogue, with its character), a note to self, or someone entering. position orders a scene's lines and may be a fraction, so a line goes between two others without renumbering. Write lines with Story's own methods: the scene's Fountain body is kept from them." }, { "format_version": 1, "id": "story_note", "name": "Note", "plural": "Notes", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "story", "name": "Story", "type": "link", "required": true, "link_to": "story_story" }, { "key": "title", "name": "Title", "type": "text", "placeholder": "What is this about?" }, { "key": "body", "name": "Note", "type": "longtext" }, { "key": "scene", "name": "Scene", "type": "link", "link_to": "story_scene" } ], "title": "title", "date": null, "project": null, "order": null, "slip": { "title": "title", "subtitle": "body", "trailing": null, "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "title", "scene" ] }, { "heading": "Note", "columns": [ "body" ] } ], "seal": { "clear": [ "story", "scene" ], "blind": [ "title", "body" ] }, "sort": { "column": "title", "descending": false }, "empty": { "title": "No notes yet", "message": "Keep ideas, research and things to fix here." }, "create": { "label": "New note" }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "story_note" } } ], "commands": [ { "id": "delete", "label": "Remove", "kind": "delete", "verb": "delete_record", "data": { "table": "story_note" }, "confirm": "It can come back from Deleted, and Undo brings it back now.", "bindings": { "id": "$id" }, "receipt": "Removed", "does": "destroys", "object": "bin" } ], "instructions": "A note is anything the owner wants to keep beside a story: an idea, research, something to fix. It may name the scene it is about.", "card": { "face": "note.card", "fields": [ { "slot": "title", "column": "title" }, { "slot": "body", "column": "body" }, { "slot": "crumb", "column": "scene" } ] } }, { "format_version": 1, "id": "story_picture", "name": "Picture", "plural": "Pictures", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "story", "name": "Story", "type": "link", "required": true, "link_to": "story_story" }, { "key": "picture", "name": "Picture", "type": "photo", "required": true }, { "key": "caption", "name": "Caption", "type": "text" }, { "key": "position", "name": "Order", "type": "number" }, { "key": "character", "name": "Of", "type": "link", "link_to": "story_character" }, { "key": "place", "name": "Of the place", "type": "link", "link_to": "story_place" }, { "key": "scene", "name": "For the scene", "type": "link", "link_to": "story_scene" }, { "key": "costume", "name": "Costume", "type": "link", "link_to": "story_costume" }, { "key": "thing", "name": "Thing", "type": "link", "link_to": "story_thing" }, { "key": "day", "name": "Story day", "type": "number" } ], "title": "caption", "date": null, "project": null, "order": "position", "slip": { "title": "caption", "subtitle": null, "trailing": null, "photo": "picture", "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "picture", "caption", "character", "place", "scene", "costume", "thing", "day" ] } ], "seal": { "clear": [ "story", "picture", "position", "character", "place", "scene", "costume", "thing", "day" ], "blind": [ "caption" ] }, "sort": { "column": "position", "descending": false }, "empty": { "title": "No pictures yet", "message": "Pictures of places, people and scenes gather here." }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "story_picture" } } ], "instructions": "A picture kept beside a story, of one thing: a place (place), a person (character), a person on one story day, as a costume (character and day, or costume), one scene (scene) or a thing (thing). position orders the pictures of the same thing and may be a fraction. Add one over MCP with story_picture_add." }, { "format_version": 1, "id": "story_place", "name": "Place", "plural": "Places", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "story", "name": "Story", "type": "link", "required": true, "link_to": "story_story" }, { "key": "name", "name": "Name", "type": "text", "required": true, "placeholder": "KITCHEN, ROOFTOP, BUS STOP" }, { "key": "about", "name": "About", "type": "longtext" }, { "key": "picture", "name": "Picture", "type": "photo" }, { "key": "scenes", "name": "Scenes", "type": "number", "readonly": true, "units": { "one": "1 scene", "other": "{n} scenes" }, "computed": { "rollup": { "table": "story_scene", "link": "place", "op": "count" } } } ], "title": "name", "date": null, "project": null, "order": null, "slip": { "title": "name", "subtitle": "about", "trailing": "scenes", "photo": "picture", "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "picture", "name", "about" ] } ], "seal": { "clear": [ "story", "scenes", "picture" ], "blind": [ "name", "about" ] }, "sort": { "column": "name", "descending": false }, "empty": { "title": "No places yet", "message": "Places gather here by themselves from your scene headings." }, "create": { "label": "New place" }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "story_place" } } ], "commands": [ { "id": "delete", "label": "Remove", "kind": "delete", "verb": "delete_record", "data": { "table": "story_place" }, "confirm": "It can come back from Deleted, and Undo brings it back now. Your scene headings stay as they are.", "bindings": { "id": "$id" }, "receipt": "Removed", "does": "destroys", "object": "bin" } ], "instructions": "A place is where scenes of a story happen: its name as the scene heading says it (KITCHEN) and a longer about. The core makes a place on its own when a scene heading names one the story does not have. Renaming a place renames it in the story's scene headings. scenes is worked out, never written.", "card": { "face": "place.card", "fields": [ { "slot": "title", "column": "name" }, { "slot": "body", "column": "about" }, { "slot": "note", "column": "scenes" } ] } }, { "format_version": 1, "id": "story_scene", "name": "Scene", "plural": "Scenes", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "story", "name": "Story", "type": "link", "required": true, "link_to": "story_story" }, { "key": "position", "name": "Order", "type": "number" }, { "key": "setting", "name": "Inside or out", "type": "choice", "choices": [ "INT.", "EXT.", "INT./EXT." ], "labels": { "INT.": "Inside", "EXT.": "Outside", "INT./EXT.": "Inside and out" }, "default": "INT." }, { "key": "place", "name": "Place", "type": "link", "link_to": "story_place" }, { "key": "time", "name": "Time", "type": "text", "placeholder": "DAY or NIGHT, or any time you like" }, { "key": "heading", "name": "Scene heading", "type": "text", "placeholder": "INT. KITCHEN - NIGHT" }, { "key": "summary", "name": "What happens", "type": "text", "placeholder": "One line: what happens in this scene" }, { "key": "day", "name": "Story day", "type": "number" }, { "key": "body", "name": "Scene", "type": "longtext", "placeholder": "Write what we see. Put a name on its own line, and what they say under it." }, { "key": "status", "name": "Status", "type": "choice", "choices": [ "idea", "draft", "done" ], "labels": { "idea": "Idea", "draft": "Draft", "done": "Done" }, "default": "draft" }, { "key": "words", "name": "Words", "type": "number", "readonly": true }, { "key": "pages", "name": "Pages", "type": "number", "readonly": true, "decimals": 3 }, { "key": "minutes", "name": "Minutes", "type": "number", "readonly": true, "decimals": 1 }, { "key": "speakers", "name": "Who speaks", "type": "longtext", "readonly": true }, { "key": "question", "name": "Open question", "type": "text", "placeholder": "What does this scene still have to answer?" }, { "key": "answer", "name": "Grew from", "type": "link", "link_to": "story_answer" }, { "key": "lines_sum", "name": "Lines kept for", "type": "text", "readonly": true } ], "title": "heading", "date": null, "project": null, "order": "position", "reorder": true, "slip": { "title": "heading", "subtitle": "summary", "trailing": "pages", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "heading", "setting", "place", "time", "summary", "day", "status" ] }, { "heading": "Scene", "columns": [ "body" ] } ], "seal": { "clear": [ "story", "position", "setting", "place", "status", "words", "pages", "minutes", "answer", "day" ], "blind": [ "time", "heading", "summary", "speakers", "question" ], "blind_bytes": { "speakers": 512 } }, "sort": { "column": "position", "descending": false }, "empty": { "title": "No scenes yet", "message": "Tap plus to write your first scene. Just start typing: we will lay it out for you." }, "create": { "label": "New scene", "method": "story.scene.new" }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "story_scene" } } ], "commands": [ { "id": "write", "label": "Write", "kind": "update", "method": "story.write", "bindings": { "id": "$id" }, "object": "slip" }, { "id": "delete", "label": "Remove", "kind": "delete", "verb": "delete_record", "data": { "table": "story_scene" }, "confirm": "It can come back from Deleted, and Undo brings it back now.", "bindings": { "id": "$id" }, "receipt": "Removed", "does": "destroys", "object": "bin" } ], "instructions": "A scene is one stretch of a story in one place at one time. heading is its scene heading as written (INT. KITCHEN - NIGHT); setting (INT., EXT., INT./EXT.), place (a story_place) and time (DAY, NIGHT or free text) say the same thing in parts, and the core keeps them in step: write either and the other follows. position orders the scenes in their story (1, 2, 3...); to move a scene, change its position. summary is one line on what happens. status is idea, draft or done. A scene body is plain Fountain text without the heading line: a line of action is just a sentence; a character's name on its own line (in capitals for English, or a name the story already knows in any script) starts their speech, and the lines under it are what they say; an aside in brackets on its own line under the name, like (quietly), is a parenthetical; a line ending in TO: such as CUT TO: is a transition; a blank line separates elements. Never write the scene heading into the body: it lives in heading. words, pages, minutes and speakers are worked out from the body, never written. Write a body with story_scene_write so the core re-reads it, keeps those figures and makes any new characters and places.", "card": { "face": "scene.card", "offers": [ "scene.card", "scene.chat" ], "fields": [ { "slot": "number", "column": "position" }, { "slot": "title", "column": "heading" }, { "slot": "subtitle", "column": "summary" }, { "slot": "body", "column": "body" }, { "slot": "state", "column": "status", "only": [ "idea", "done" ] } ] } }, { "format_version": 1, "id": "story_sequence", "name": "Sequence", "plural": "Sequences", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "story", "name": "Story", "type": "link", "required": true, "link_to": "story_story" }, { "key": "title", "name": "Title", "type": "text", "required": true, "placeholder": "Act one, The wedding" }, { "key": "position", "name": "Starts at", "type": "number" }, { "key": "folded", "name": "Folded", "type": "bool" } ], "title": "title", "date": null, "project": null, "order": "position", "slip": { "title": "title", "subtitle": null, "trailing": null, "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "title", "position", "folded" ] } ], "seal": { "clear": [ "story", "position", "folded" ], "blind": [ "title" ] }, "sort": { "column": "position", "descending": false }, "empty": { "title": "No sequences yet", "message": "Fold a long story into acts or sequences." }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "story_sequence" } } ], "instructions": "A stretch of a long story, an act or a sequence, that folds in the scene list. position stands on the same line as the scenes' positions: a sequence holds the scenes from its position up to the next sequence." }, { "format_version": 1, "id": "story_story", "name": "Story", "plural": "Stories", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "title", "name": "Title", "type": "text", "required": true, "placeholder": "What is your story called?" }, { "key": "logline", "name": "In a sentence", "type": "longtext", "placeholder": "One or two sentences: who wants what, and what stands in the way" }, { "key": "written_by", "name": "Written by", "type": "text" }, { "key": "language", "name": "Language", "type": "text", "default": "English" }, { "key": "translation_of", "name": "Translated from", "type": "link", "link_to": "story_story" }, { "key": "format", "name": "Kind", "type": "choice", "choices": [ "feature", "short", "episode", "micro-drama" ], "labels": { "feature": "Feature film", "short": "Short film", "episode": "Episode", "micro-drama": "Micro-drama" }, "default": "feature" }, { "key": "made_at", "name": "Started", "type": "date" }, { "key": "chosen_at", "name": "Last written in", "type": "date", "format": "calendar-datetime" }, { "key": "scenes", "name": "Scenes", "type": "number", "readonly": true, "units": { "one": "1 scene", "other": "{n} scenes" }, "computed": { "rollup": { "table": "story_scene", "link": "story", "op": "count" } } }, { "key": "pages", "name": "Pages", "type": "number", "readonly": true, "decimals": 1, "units": { "one": "1 page", "other": "{n} pages" }, "computed": { "rollup": { "table": "story_scene", "link": "story", "op": "sum", "column": "pages" } } }, { "key": "interval_at", "name": "Interval at", "type": "number" } ], "title": "title", "date": "made_at", "project": null, "order": null, "slip": { "title": "title", "subtitle": "logline", "trailing": "pages", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "title", "logline", "written_by", "format", "language", "translation_of", "made_at" ] } ], "seal": { "clear": [ "language", "translation_of", "format", "made_at", "chosen_at", "scenes", "pages", "interval_at" ], "blind": [ "title", "logline", "written_by" ] }, "sort": { "column": "chosen_at", "descending": true }, "empty": { "title": "No story yet", "message": "Start a story: give it a title, and write the rest when you are ready." }, "create": { "label": "New story" }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "story_story" } } ], "commands": [ { "id": "delete", "label": "Remove", "kind": "delete", "verb": "delete_record", "data": { "table": "story_story" }, "confirm": "It can come back from Deleted, and Undo brings it back now. Its scenes stay until you remove them.", "bindings": { "id": "$id" }, "receipt": "Removed", "does": "destroys", "object": "bin" } ], "instructions": "A story is one screenplay the owner is writing: its title, a logline of one or two sentences, who wrote it, the language it is written in (English unless they say), the story it translates (translation_of, when it is a copy made for translating), its kind (feature, short, episode, micro-drama) and the day it was started. Its scenes are story_scene rows in order by position; its characters, places and notes are story_character, story_place and story_note rows linked to it. scenes and pages are worked out from its scenes, never written. Read the whole story as Fountain with story_fountain_write { story }.", "card": { "face": "story.card", "fields": [ { "slot": "title", "column": "title" }, { "slot": "subtitle", "column": "logline" }, { "slot": "note", "column": "pages" }, { "slot": "tag", "column": "language" } ] } }, { "format_version": 1, "id": "story_thing", "name": "Thing", "plural": "Things", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "story", "name": "Story", "type": "link", "required": true, "link_to": "story_story" }, { "key": "name", "name": "Name", "type": "text", "required": true, "placeholder": "The red bicycle, the letter" }, { "key": "kind", "name": "Kind", "type": "choice", "choices": [ "prop", "vehicle", "other" ], "labels": { "prop": "Prop", "vehicle": "Vehicle", "other": "Other" }, "default": "prop" }, { "key": "about", "name": "About", "type": "longtext" }, { "key": "picture", "name": "Picture", "type": "photo" } ], "title": "name", "date": null, "project": null, "order": null, "slip": { "title": "name", "subtitle": "about", "trailing": null, "photo": "picture", "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "picture", "name", "kind" ] }, { "heading": "About", "columns": [ "about" ] } ], "seal": { "clear": [ "story", "kind", "picture" ], "blind": [ "name", "about" ] }, "sort": { "column": "name", "descending": false }, "empty": { "title": "No things yet", "message": "Props and vehicles the story needs gather here." }, "create": { "label": "New thing" }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "story_thing" } } ], "instructions": "A thing a story needs on set: a prop, a vehicle or anything else, by name, with an about and an optional picture. The scenes it is in are story_use rows (scene, thing). Nothing is made on its own: a thing is added by the owner or at their asking." }, { "format_version": 1, "id": "story_use", "name": "In a scene", "plural": "In scenes", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "story", "name": "Story", "type": "link", "required": true, "link_to": "story_story" }, { "key": "scene", "name": "Scene", "type": "link", "required": true, "link_to": "story_scene" }, { "key": "thing", "name": "Thing", "type": "link", "link_to": "story_thing" }, { "key": "costume", "name": "Costume", "type": "link", "link_to": "story_costume" }, { "key": "character", "name": "Who has it", "type": "link", "link_to": "story_character" }, { "key": "note", "name": "Note", "type": "text" } ], "title": "note", "date": null, "project": null, "order": null, "slip": { "title": "note", "subtitle": null, "trailing": null, "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "scene", "thing", "costume", "character", "note" ] } ], "seal": { "clear": [ "story", "scene", "thing", "costume", "character" ], "blind": [ "note" ] }, "sort": { "column": "scene", "descending": false }, "empty": { "title": "Nothing in scenes yet", "message": "Things and costumes tied to scenes gather here." }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "story_use" } } ], "instructions": "One thing or one costume in one scene: scene, then thing or costume (one of them), who has or wears it there (character, optional) and a short note." }, { "id": "subscription", "name": "Subscription", "plural": "Subscriptions", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "name", "name": "Name", "type": "text", "required": true, "placeholder": "What you pay for" }, { "key": "provider", "name": "Provider", "type": "text", "placeholder": "Who bills it" }, { "key": "amount", "name": "Amount", "type": "amount", "currency": "currency" }, { "key": "currency", "name": "Currency", "type": "text", "placeholder": "USD" }, { "key": "cycle", "name": "Cycle", "type": "choice", "choices": [ "weekly", "monthly", "quarterly", "yearly" ], "format": "words" }, { "key": "per_month", "name": "Per month", "type": "text", "readonly": true, "placeholder": "about ₹1,700 a month" }, { "key": "monthly_inr", "name": "Per month, ₹ (approx, for ordering)", "type": "number", "readonly": true }, { "key": "next_renewal", "name": "Next renewal", "type": "date" }, { "key": "status", "name": "Status", "type": "choice", "choices": [ "active", "paused", "cancelled" ], "format": "words", "tones": { "active": "green", "paused": "amber", "cancelled": "red" } }, { "key": "started", "name": "Started", "type": "date" }, { "key": "last_charged", "name": "Last charged", "type": "date", "readonly": true }, { "key": "charges", "name": "Charges recorded", "type": "number", "readonly": true, "computed": { "rollup": { "table": "subscription_charge", "link": "subscription", "op": "count" } } }, { "key": "paid_total", "name": "Paid in all", "type": "amount", "readonly": true, "computed": { "rollup": { "table": "subscription_charge", "link": "subscription", "op": "sum", "column": "amount" } } }, { "key": "cancel_url", "name": "Cancel link", "type": "text", "placeholder": "https://" }, { "key": "notes", "name": "Notes", "type": "longtext", "markdown": true } ], "title": "name", "date": "next_renewal", "project": null, "order": null, "slip": { "title": "name", "subtitle": [ "provider", "cycle", "per_month" ], "trailing": "amount", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "name", "provider", "status" ], "actions": [ { "label": "Pause", "sets": { "status": "paused" }, "object": "snooze" }, { "label": "Cancel", "sets": { "status": "cancelled" }, "object": "block" }, { "label": "Resume", "sets": { "status": "active" }, "object": "retry" } ] }, { "heading": "Cost", "columns": [ "amount", "currency", "cycle", "per_month" ] }, { "heading": "Dates", "columns": [ "next_renewal", "last_charged", "started" ] }, { "heading": "Cancelling", "columns": [ "cancel_url" ] }, { "heading": "Charges", "list": { "table": "subscription_charge", "link": "subscription", "empty": { "title": "No charges recorded" }, "limit": 36 }, "note": "Every charge, refund or failed attempt found in the receipts, newest first." }, { "heading": "Notes", "columns": [ "notes" ] } ], "sort": { "column": "monthly_inr", "descending": true, "tie": "name" }, "group": { "column": "status", "sections": [ { "heading": null, "values": [ "active" ] }, { "heading": "Paused", "values": [ "paused" ], "closed": true }, { "heading": "Cancelled", "values": [ "cancelled" ], "closed": true } ] }, "empty": { "title": "No subscriptions yet", "message": "Add the things you pay for again and again." }, "create": { "label": "Add a subscription" }, "instructions": "One row per thing the owner pays for again and again. amount is a whole number of minor units (1599 = 15.99) in the currency column's code; never guess an amount or a renewal date — ask. cycle is weekly, monthly or yearly. status moves active → paused → active, or to cancelled; a cancelled subscription keeps its row. next_renewal is the next charge date; move it forward one cycle only when the owner says the charge went through. cycle may also be quarterly. last_charged is the date of the latest charge; the subscription_charge table holds every charge, refund, credit and failed attempt linked to this row, written from receipts — never invent one. per_month and monthly_inr are the cost normalised to one month in rupees at an approximate rate, for ordering only; the charged amount and currency are the truth.", "groups": { "stack": "slips" }, "card": { "face": "subscription", "fields": [ { "slot": "title", "column": "name" }, { "slot": "subtitle", "column": "provider" }, { "slot": "price", "column": "amount" }, { "slot": "period", "column": "cycle" }, { "slot": "next_charge", "column": "next_renewal" }, { "slot": "state", "column": "status", "only": [ "paused", "cancelled" ] }, { "slot": "body", "column": "notes" } ] } }, { "id": "subscription_charge", "name": "Charge", "plural": "Charges", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "name", "name": "Charge", "type": "text", "required": true, "readonly": true, "placeholder": "₹99.00 · Oct 2026" }, { "key": "subscription", "name": "Subscription", "type": "link", "link_to": "subscription", "readonly": true }, { "key": "charged_on", "name": "Charged on", "type": "date", "readonly": true }, { "key": "amount", "name": "Amount", "type": "amount", "readonly": true }, { "key": "currency", "name": "Currency", "type": "text", "readonly": true, "placeholder": "INR" }, { "key": "kind", "name": "Kind", "type": "choice", "choices": [ "charge", "refund", "credit", "failed" ], "readonly": true, "format": "words", "tones": { "charge": "green", "refund": "amber", "credit": "amber", "failed": "red" } }, { "key": "period", "name": "Covers", "type": "text", "readonly": true, "placeholder": "28 Sep to 28 Oct 2026" }, { "key": "reference", "name": "Reference", "type": "text", "readonly": true, "placeholder": "invoice or receipt number" }, { "key": "payment", "name": "Paid by", "type": "text", "readonly": true, "placeholder": "card ending 1234" }, { "key": "notes", "name": "Notes", "type": "longtext", "markdown": true } ], "title": "name", "date": "charged_on", "project": null, "order": null, "slip": { "title": "name", "subtitle": [ "period", "payment" ], "trailing": "amount", "photo": null, "toggle": null, "caption": { "status": "kind", "dates": [ "charged_on" ] } }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "name", "subscription", "kind" ] }, { "heading": "Money", "columns": [ "amount", "currency", "charged_on", "period" ] }, { "heading": "Receipt", "columns": [ "reference", "payment" ] }, { "heading": "Notes", "columns": [ "notes" ] } ], "sort": { "column": "charged_on" }, "empty": { "title": "No charges yet", "message": "Charges are written from receipts as they are found." }, "instructions": "One row per charge, refund, credit or failed attempt on a subscription, linked to its subscription row and written from a receipt or invoice email; amount is a whole number of minor units in currency. History: never edit or invent a charge; a correction is a new refund or credit row." }, { "format_version": 1, "tables": [ { "name": "cotton_money_transactions", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "occurred_on", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n occurred_on TEXT NOT NULL", "position": 2 }, { "name": "description", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n description TEXT NOT NULL DEFAULT ''", "position": 3 }, { "name": "payee_text", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n payee_text TEXT", "position": 4 }, { "name": "account_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n account_id TEXT", "position": 5 }, { "name": "counterparty_person_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n counterparty_person_id TEXT", "position": 6 }, { "name": "amount_minor", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n amount_minor INTEGER", "position": 7 }, { "name": "amount_known", "type": "INTEGER", "default": "1", "nullable": false, "primary_key": false, "declaration": "\n amount_known INTEGER NOT NULL DEFAULT 1 CHECK (amount_known IN (0,1))", "position": 8 }, { "name": "direction", "type": "TEXT", "default": "'out'", "nullable": false, "primary_key": false, "declaration": "\n direction TEXT NOT NULL DEFAULT 'out' CHECK (direction IN ('in','out'))", "position": 9 }, { "name": "currency", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n currency TEXT", "position": 10 }, { "name": "for_period", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n for_period TEXT NOT NULL DEFAULT ''", "position": 11 }, { "name": "status", "type": "TEXT", "default": "'actual'", "nullable": false, "primary_key": false, "declaration": "\n status TEXT NOT NULL DEFAULT 'actual' CHECK (status IN ('actual','expected'))", "position": 12 }, { "name": "certainty", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n certainty TEXT CHECK (certainty IS NULL OR certainty IN ('fixed','expected','estimate'))", "position": 13 }, { "name": "repeat", "type": "TEXT", "default": "'none'", "nullable": false, "primary_key": false, "declaration": "\n repeat TEXT NOT NULL DEFAULT 'none' CHECK (repeat IN ('none','monthly'))", "position": 14 }, { "name": "repeat_day", "type": "INTEGER", "default": null, "nullable": true, "primary_key": false, "declaration": "\n repeat_day INTEGER CHECK (repeat_day IS NULL OR repeat_day BETWEEN 1 AND 31)", "position": 15 }, { "name": "between_us", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n between_us INTEGER NOT NULL DEFAULT 0 CHECK (between_us IN (0,1))", "position": 16 }, { "name": "moves_money", "type": "INTEGER", "default": "1", "nullable": false, "primary_key": false, "declaration": "\n moves_money INTEGER NOT NULL DEFAULT 1 CHECK (moves_money IN (0,1))", "position": 17 }, { "name": "tag", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n tag TEXT", "position": 18 }, { "name": "transfer_of", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n transfer_of TEXT", "position": 19 }, { "name": "source", "type": "TEXT", "default": "'manual'", "nullable": false, "primary_key": false, "declaration": "\n source TEXT NOT NULL DEFAULT 'manual'", "position": 20 }, { "name": "external_hash", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n external_hash TEXT", "position": 21 }, { "name": "notes", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n notes TEXT", "position": 22 }, { "name": "settles_transaction_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n settles_transaction_id TEXT", "position": 23 }, { "name": "due_date", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n due_date TEXT", "position": 24 }, { "name": "source_inbox_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n source_inbox_id TEXT", "position": 25 }, { "name": "created_by", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n created_by TEXT", "position": 26 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 27 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 28 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 29 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 30 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n trashed_at TEXT", "position": 31 } ], "constraints": [ { "declaration": "\n CHECK ((settles_transaction_id IS NULL) OR (settles_transaction_id <> id))", "position": 32 }, { "declaration": "\n CHECK (source IN ('capture', 'manual', 'import', 'system', 'schedule', 'migration', 'statement', 'external'))", "position": 33 }, { "declaration": "\n FOREIGN KEY (account_id) REFERENCES cotton_money_accounts(id)", "position": 34 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 35 } ], "prefix": "CREATE TABLE \"cotton_money_transactions\" (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_money_transactions_balance ON cotton_money_transactions (workspace_id,account_id,currency,occurred_on,CASE WHEN direction='in' THEN amount_minor ELSE -amount_minor END,direction,amount_minor,status,amount_known,moves_money,trashed_at) WHERE status='actual' AND amount_known=1 AND moves_money=1 AND trashed_at IS NULL", "CREATE INDEX idx_cotton_money_transactions_glance ON cotton_money_transactions (workspace_id,trashed_at,between_us,status,direction,currency,amount_minor)", "CREATE INDEX idx_cotton_money_transactions_due ON cotton_money_transactions (due_date) WHERE due_date IS NOT NULL", "CREATE INDEX idx_cotton_money_transactions_account ON cotton_money_transactions (account_id) WHERE account_id IS NOT NULL", "CREATE INDEX idx_cotton_money_transactions_expected ON cotton_money_transactions (workspace_id,occurred_on,id,due_date,currency,direction,amount_minor,trashed_at) WHERE status='expected'", "CREATE INDEX idx_cotton_money_transactions_person ON cotton_money_transactions (counterparty_person_id) WHERE counterparty_person_id IS NOT NULL", "CREATE INDEX idx_cotton_money_transactions_owed ON cotton_money_transactions (workspace_id,status,trashed_at,counterparty_person_id,occurred_on DESC,updated_at DESC,id,direction,amount_minor,currency,description) WHERE counterparty_person_id IS NOT NULL", "CREATE INDEX idx_cotton_money_transactions_settles ON cotton_money_transactions (settles_transaction_id) WHERE settles_transaction_id IS NOT NULL", "CREATE INDEX idx_cotton_money_transactions_workspace ON cotton_money_transactions (workspace_id)", "CREATE INDEX idx_cotton_money_transactions_workspace_date ON cotton_money_transactions (workspace_id, occurred_on DESC)", "CREATE UNIQUE INDEX uq_cotton_money_transactions_external_hash ON cotton_money_transactions (workspace_id, external_hash) WHERE external_hash IS NOT NULL", "CREATE INDEX IF NOT EXISTS idx_cotton_money_transactions_author ON cotton_money_transactions (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "id": "transaction", "name": "Money row", "plural": "Money", "visibility": "owner", "picture": { "photo": "photo:d3020bbe260bf41f313f8116af2a6ee38a7c9ee0ff72794fa86448e88d0b42e6", "object": "tool-money" }, "builtin": true, "engine": "money", "columns": [ { "key": "occurred_on", "name": "Date", "type": "date", "format": "calendar-datetime" }, { "key": "description", "name": "What", "type": "text" }, { "key": "payee_text", "name": "Payee", "type": "text", "readonly": true }, { "key": "account_id", "name": "Account", "type": "link", "link_to": "money_account" }, { "key": "counterparty_person_id", "name": "Person", "type": "link", "link_to": "person" }, { "key": "amount_minor", "name": "Amount", "type": "amount", "currency": "currency" }, { "key": "amount_known", "name": "Amount known", "type": "bool" }, { "key": "direction", "type": "choice", "choices": [ "in", "out" ] }, { "key": "currency", "type": "text" }, { "key": "for_period", "name": "For month", "type": "text" }, { "key": "status", "type": "choice", "choices": [ "posted", "proposed", "actual", "expected" ], "labels": { "posted": "Posted", "proposed": "Suggested" } }, { "key": "certainty", "type": "choice", "choices": [ "fixed", "expected", "estimate" ] }, { "key": "repeat", "type": "choice", "choices": [ "none", "monthly" ] }, { "key": "repeat_day", "name": "Repeat day", "type": "number" }, { "key": "between_us", "name": "Between us", "type": "bool" }, { "key": "moves_money", "name": "Moves money", "type": "bool" }, { "key": "tag", "type": "text" }, { "key": "transfer_of", "name": "Transfer", "type": "link", "link_to": "transaction", "readonly": true }, { "key": "source", "type": "text", "readonly": true }, { "key": "external_hash", "type": "text", "readonly": true }, { "key": "notes", "type": "longtext" }, { "key": "settles_transaction_id", "name": "Settles", "type": "link", "link_to": "transaction", "readonly": true }, { "key": "due_date", "name": "Due", "type": "date" }, { "key": "source_inbox_id", "type": "text", "readonly": true }, { "key": "created_by", "type": "text", "readonly": true }, { "key": "trashed_at", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "title", "name": "With", "type": "text", "readonly": true }, { "key": "can_delete", "type": "bool", "readonly": true }, { "key": "email_thread_id", "name": "From mail", "type": "link", "link_to": "email_thread", "readonly": true }, { "key": "balance_before_minor", "name": "Balance before", "type": "amount", "readonly": true, "currency": "currency" }, { "key": "balance_after_minor", "name": "Balance after", "type": "amount", "readonly": true, "currency": "currency" }, { "key": "balance_state", "name": "Balance state", "type": "choice", "choices": [ "ok", "overdrawn", "recovers" ], "readonly": true } ], "title": "description", "date": "occurred_on", "project": null, "order": null, "slip": { "title": "title", "subtitle": "tag", "trailing": "occurred_on", "photo": null, "toggle": null, "title_fallback": "description", "figure": "amount_minor" }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "description", "occurred_on", "account_id", "status", "certainty", "for_period", "counterparty_person_id", "tag", "due_date", "notes" ], "figure": "amount_minor" }, { "heading": "Evidence", "columns": [], "list": { "table": "evidence", "link": "transaction_id" }, "role": "side" } ], "seal": { "clear": [ "occurred_on", "account_id", "counterparty_person_id", "amount_known", "direction", "currency", "for_period", "status", "certainty", "repeat", "repeat_day", "between_us", "moves_money", "transfer_of", "source", "settles_transaction_id", "due_date", "source_inbox_id", "created_by", "trashed_at", "can_delete", "email_thread_id" ], "blind": [ "description", "payee_text", "tag" ] }, "record_route": "/money/transactions/[id]", "sort": { "column": "occurred_on", "descending": true }, "create": { "label": "Add", "doors": [ { "id": "spend", "label": "Add a spend", "object": "slip", "draft": { "values": { "direction": "out", "status": "actual", "currency": "INR" }, "dated": "occurred_on", "asks": [ "amount_minor" ], "account": "account_id" } }, { "id": "bill", "label": "A bill to pay", "object": "slip", "draft": { "values": { "direction": "out", "status": "expected", "certainty": "fixed", "currency": "INR" }, "dated": "occurred_on", "asks": [ "amount_minor" ], "account": "account_id" } }, { "id": "money_in", "label": "Money in", "object": "envelope", "draft": { "values": { "direction": "in", "status": "actual", "currency": "INR" }, "dated": "occurred_on", "asks": [ "amount_minor" ], "account": "account_id" } }, { "id": "statement", "label": "Bring in a statement", "object": "folder", "files": { "types": [ "com.adobe.pdf", "public.comma-separated-values-text" ], "many": true } } ] }, "search": [ "description", "tag" ], "delete_when": { "column": "can_delete", "present": true }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "transaction" } } ], "commands": [ { "id": "pay_upi", "label": "Pay by UPI", "kind": "update", "method": "money.upiPay", "data": { "table": "transaction" }, "bindings": { "id": "$id" }, "when": { "direction": "out", "status": "expected" }, "pick": { "argument": "upi", "kind": "text", "label": "Their UPI id" }, "object": "handset" } ], "derived": true, "instructions": "One money row is either actual or expected. It has one account, one direction and one amount when known. A statement-booked row stays in the record.", "card": { "face": "transaction.receipt", "faces": [ { "when": { "column": "direction", "values": [ "in" ] }, "face": "transaction.cheque" } ], "fields": [ { "slot": "title", "column": "description" }, { "slot": "subtitle", "column": "tag" }, { "slot": "body", "column": "notes" }, { "slot": "date", "column": "occurred_on", "form": "weekday_date" }, { "slot": "amount", "column": "amount_minor" }, { "slot": "account", "column": "account_id" }, { "slot": "state", "column": "status", "only": [ "expected" ] }, { "slot": "facts", "column": "balance_before_minor", "also": [ "balance_after_minor" ] }, { "slot": "tag", "column": "tag" }, { "slot": "period", "column": "for_period" }, { "slot": "people", "column": "counterparty_person_id" }, { "slot": "note", "column": "certainty" } ], "corner": [ { "column": "occurred_on", "form": "relative", "within": 0, "line": "corner.today", "ahead": true } ] } }, { "format_version": 1, "id": "vault_key", "name": "Device key", "plural": "Device keys", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "device_id", "name": "Device", "type": "text", "required": true, "readonly": true }, { "key": "name", "name": "Name", "type": "text" }, { "key": "public_key", "name": "Public key", "type": "text", "required": true, "readonly": true }, { "key": "fingerprint", "name": "Fingerprint", "type": "text", "readonly": true }, { "key": "wrapped_vmk", "name": "Wrapped vault key", "type": "longtext", "readonly": true, "hidden": true }, { "key": "vmk_version", "name": "Vault key version", "type": "number", "readonly": true, "hidden": true }, { "key": "created_at", "name": "Asked", "type": "date", "readonly": true, "format": "calendar-datetime" } ], "title": "name", "date": "created_at", "project": null, "order": null, "slip": { "title": "name", "subtitle": "fingerprint", "trailing": "created_at", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "name", "fingerprint", "device_id", "created_at" ] } ], "add": false, "sort": { "column": "vmk_version", "descending": false, "tie": "created_at", "tie_descending": false }, "empty": { "title": "No devices yet", "message": "A Mac or phone that asks to open your vault waits here for you to approve it." }, "commands": [ { "id": "approve", "label": "Approve", "kind": "update", "method": "vault.approveDevice", "bindings": { "deviceId": "device_id" }, "when": { "vmk_version": 0 }, "receipt": "Approved", "does": "completes", "object": "stamp" }, { "id": "refuse", "label": "Refuse", "kind": "update", "method": "vault.refuseDevice", "destructive": true, "confirm": "This device will not open your vault. It can ask again.", "bindings": { "deviceId": "device_id" }, "when": { "vmk_version": 0 }, "receipt": "Refused", "does": "puts-away", "object": "tray" } ], "instructions": "One row per device that asks to open the owner's vault: device_id the device, name what it calls itself, public_key its X25519 public half (base64url), which it publishes itself. fingerprint is the public half's fingerprint (four groups of four hex digits), computed by each phone and never stored: the owner checks it against the asking device's own screen before approving. wrapped_vmk is the vault master key wrapped for that public half, written by one of the owner's devices that already holds the vault when the owner approves this one, and empty until then: such a row is waiting for approval. vmk_version is the version of the key it was wrapped at. Neither half opens anything without the device's own private key, which never leaves it. Never write a column by hand. Approve lets a waiting device in (the phone asks for Face ID or its passcode, then opens the vault for that one approval); Refuse removes its request.", "card": { "face": "plain", "fields": [ { "slot": "title", "column": "name" }, { "slot": "subtitle", "column": "fingerprint" }, { "slot": "facts", "column": "device_id", "also": [ "created_at" ] } ] } }, { "format_version": 1, "id": "watch", "name": "Watch", "plural": "Watches", "visibility": "owner", "picture": null, "builtin": false, "engine": null, "columns": [ { "key": "film", "name": "Film", "type": "link", "link_to": "film", "readonly": true, "contributes": false }, { "key": "episode", "name": "Episode", "type": "link", "link_to": "film_episode", "readonly": true, "contributes": false }, { "key": "film_title", "name": "Film", "type": "text", "computed": { "lookup": { "through": "film", "column": "title" } } }, { "key": "episode_title", "name": "Episode", "type": "text", "computed": { "lookup": { "through": "episode", "column": "title" } } }, { "key": "started_at", "name": "Started", "type": "date", "required": true, "readonly": true, "format": "calendar-datetime" }, { "key": "seconds", "name": "Watched", "type": "number", "readonly": true, "format": "duration" }, { "key": "finished", "name": "Finished", "type": "bool", "readonly": true }, { "key": "device", "name": "On", "type": "text", "readonly": true }, { "key": "with", "name": "With", "type": "link", "link_to": "person", "contributes": false } ], "title": "film_title", "date": "started_at", "project": null, "order": null, "slip": { "title": "film_title", "subtitle": [ "episode_title" ], "trailing": "started_at", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [], "sort": { "column": "started_at", "descending": true }, "empty": { "title": "Nothing watched yet", "message": "What you play lands here." }, "instructions": "One row per time a film or an episode played, written by the player alone and never by hand: film (the film, or the episode's series) and episode (the episode, empty for a film), started_at (when it started), seconds watched, finished (true once it played past nine tenths of its length), and the device it played on. with is the person who watched it with the owner (one person), the one column a person or an assistant may add afterwards. History cannot be rebuilt later, so every play is kept; Watched, \"watched twice\" and a year in review come from these rows." } ], "refused": [], "fell_back": [], "kept_as_rows": [ { "id": "email_account", "reason": "no slip: a storage table, its rows sync and are read, no tool draws it" }, { "id": "email_bin_cut", "reason": "no slip: a storage table, its rows sync and are read, no tool draws it" }, { "id": "email_cut", "reason": "no slip: a storage table, its rows sync and are read, no tool draws it" }, { "id": "email_draft", "reason": "no slip: a storage table, its rows sync and are read, no tool draws it" }, { "id": "email_read_cut", "reason": "no slip: a storage table, its rows sync and are read, no tool draws it" }, { "id": "face_settings", "reason": "no slip: a storage table, its rows sync and are read, no tool draws it" }, { "id": "outbox", "reason": "no slip: a storage table, its rows sync and are read, no tool draws it" }, { "id": "sender_merge", "reason": "no slip: a storage table, its rows sync and are read, no tool draws it" }, { "id": "voice_settings", "reason": "no slip: a storage table, its rows sync and are read, no tool draws it" } ], "boards": { "database": { "definition": { "format_version": 1, "id": "database", "parts": [ { "kind": "head", "tags": [] }, { "kind": "search", "face": "icon" }, { "kind": "notices", "shows": [ "update", "arriving", "unreadable", "backup", "joinRequests", "workingOn", "readRefusal", "attention", "project" ], "backup_behind": "{device} has not synced for {behind}.", "backup_unset": "{device} is not set up to sync all the way.", "backup_open": "See why", "sync_not_answering": "{device} is not answering", "backup_stopped": "{device} has stopped syncing." }, { "kind": "tools", "face": "grid", "columns": 4, "size": "large" } ] }, "drawn": "default" }, "home": { "definition": { "format_version": 1, "id": "home", "parts": [ { "kind": "device", "device_id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" }, { "kind": "tools", "size": "large", "face": "row", "columns": 4 } ], "picture": "object-person" }, "drawn": "default" }, "settings": { "definition": { "format_version": 1, "id": "settings", "parts": [ { "kind": "list", "table": "settings", "heading": null, "rows": [ { "id": "backup", "needs": "personal_object", "data": { "name": "Backup", "route": "/backup" } }, { "id": "server", "needs": "personal_object", "data": { "name": "Cotton server", "route": "/server" } }, { "id": "this-device", "data": { "name": "This device", "route": "/device" } }, { "id": "city", "needs": "personal_object", "data": { "name": "Your city", "route": "/me?raise=city" } }, { "id": "databases", "needs": "several_databases", "data": { "name": "Databases", "route": "/database" } }, { "id": "bring-in", "data": { "name": "Bring in", "route": "/bring-in" } }, { "id": "export", "data": { "name": "Export", "route": "/export" } }, { "id": "about", "data": { "name": "About", "route": "/about" } } ] } ] }, "drawn": "default" }, "tools": { "definition": { "format_version": 1, "id": "tools", "parts": [ { "kind": "tools", "face": "grid", "columns": 4, "size": "small" }, { "kind": "about", "source": "build" } ] }, "drawn": "default" } }, "shape": 10, "revision": "sha256:e8ecc493d5983c9e568b44ca0dde38ced7999f70a2372b754897b2dae4e1c8ba", "theme": { "definition": { "format_version": 1, "id": "database", "name": "Cotton", "family": "paper", "description": "A theme sets palette, type, acts, cards, objects and the tokens under scale.tokens; nothing else.", "palette": { "light": { "ground": "#FFFFFF", "ground_muted": "#EEE3D6", "ground_elevated": "#FFFFFF", "ink": "#444444", "ink_body": "#444444", "ink_secondary": "#888888", "ink_tertiary": "#ABABAB", "hairline": "#E2E2E2", "accent": "#C6534B", "accent_contrast": "#FFFFFF", "chip_ground": "#F2F2F2", "highlight": "#D9F7A6", "selection": "#C6534B2E", "success": "#4F7D5C", "success_light": "#E8F1EB", "error": "#B0453D", "error_light": "#F8EAE8", "warning": "#A06C1C", "warning_light": "#F7EFDC", "print": "#2E2925", "paper": "#FFFFFF", "shadow": "#000000", "pencil": 0.55, "tags": { "fill": "#F2F2F2", "ink": "#444444" }, "paces": { "late": "#F1D5C2", "soon": "#E4DBBE", "upcoming": "#BDE3E8", "someday": "#D6E0C3", "done": "#E0DAD3" }, "pace_rules": { "late": "#C5816D", "soon": "#A79451", "upcoming": "#45A5AF", "someday": "#8A9E5F", "done": "#AE9051" }, "faces": { "cream": "#F2E3CF", "buff": "#ECD5BA", "shadow": "#50321E", "slip": "#E6CDBB", "mount": "#F5EBDF", "ornament": "#5F7590E6", "ruling": "#C2AE9759", "margin": "#D9918C99", "initials": "#3E3E40", "invitation": "#2F3A17", "invitation_disc": "#BFC2A8", "mark": "#C96E50D9", "passport_ink": "color(srgb 0.13 0.12 0.09)", "passport_red": "color(srgb 0.64 0.15 0.11)", "passport_violet": "color(srgb 0.35 0.19 0.49)", "passport_blue": "color(srgb 0.12 0.29 0.46)", "passport_brown": "color(srgb 0.47 0.23 0.16)" }, "dyes": { "cream": "#F0E5D8", "buff": "#ECDAC7", "blue": "#DEE5ED", "sage": "#E1E2D4", "pink": "#F1D8D5", "straw": "#F5EACD", "peach": "#F9E6E1", "newsprint": "#E6E4DE" } }, "dark": { "ground": "#FFFFFF", "ground_muted": "#EEE3D6", "ground_elevated": "#FFFFFF", "ink": "#444444", "ink_body": "#444444", "ink_secondary": "#888888", "ink_tertiary": "#ABABAB", "hairline": "#E2E2E2", "accent": "#C6534B", "accent_contrast": "#FFFFFF", "chip_ground": "#F2F2F2", "highlight": "#D9F7A6", "selection": "#C6534B2E", "success": "#4F7D5C", "success_light": "#E8F1EB", "error": "#B0453D", "error_light": "#F8EAE8", "warning": "#A06C1C", "warning_light": "#F7EFDC", "print": "#2E2925", "paper": "#FFFFFF", "shadow": "#000000", "pencil": 0.55, "tags": { "fill": "#F2F2F2", "ink": "#444444" }, "paces": { "late": "#F1D5C2", "soon": "#E4DBBE", "upcoming": "#BDE3E8", "someday": "#D6E0C3", "done": "#E0DAD3" }, "pace_rules": { "late": "#C5816D", "soon": "#A79451", "upcoming": "#45A5AF", "someday": "#8A9E5F", "done": "#AE9051" }, "faces": { "cream": "#F2E3CF", "buff": "#ECD5BA", "shadow": "#50321E", "slip": "#E6CDBB", "mount": "#F5EBDF", "ornament": "#5F7590E6", "ruling": "#C2AE9759", "margin": "#D9918C99", "initials": "#3E3E40", "invitation": "#2F3A17", "invitation_disc": "#BFC2A8", "mark": "#C96E50D9", "passport_ink": "color(srgb 0.13 0.12 0.09)", "passport_red": "color(srgb 0.64 0.15 0.11)", "passport_violet": "color(srgb 0.35 0.19 0.49)", "passport_blue": "color(srgb 0.12 0.29 0.46)", "passport_brown": "color(srgb 0.47 0.23 0.16)" }, "dyes": { "cream": "#F0E5D8", "buff": "#ECDAC7", "blue": "#DEE5ED", "sage": "#E1E2D4", "pink": "#F1D8D5", "straw": "#F5EACD", "peach": "#F9E6E1", "newsprint": "#E6E4DE" } } }, "type": { "display": "fraunces_title", "title": "fraunces_text", "body": "courier", "meta": "courier_italic", "hand": "caveat", "figure": "courier", "cap": "instrument_italic", "interface": "system", "script": "courier_new", "text_page_title": "system_bold", "text_editor_title": "system_semibold", "text_screen_title": "system_semibold", "text_row_title": "system_medium", "text_row_title_compact": "system_medium", "text_body": "system", "text_preview": "system", "text_caption": "system", "text_section_label": "system_semibold", "text_code": "menlo" }, "scale": { "tokens": { "radius": 8, "radius_min": 3, "radius_fraction": 0.035, "spacing": 12, "inset_fraction": 0.075, "inset_min": 9, "inset_max": 26, "stroke": 1, "hairline": 0.7, "title_size": 17, "body_size": 14, "meta_size": 12.5, "hand_size": 14, "monogram_size": 0.36, "section_title_size": 22, "screen_title_size": 34, "nav_circle": 39, "nav_row_top": 6, "nav_row_air": 12, "type_page_title_size": 34, "type_page_title_line_height": 41, "type_editor_title_size": 30, "type_editor_title_line_height": 37, "type_screen_title_size": 20, "type_screen_title_line_height": 25, "type_row_title_size": 20, "type_row_title_line_height": 25, "type_row_title_compact_size": 17, "type_row_title_compact_line_height": 22, "type_body_size": 16, "type_body_line_height": 22, "type_preview_size": 15, "type_preview_line_height": 20, "type_caption_size": 13, "type_caption_line_height": 18, "type_section_label_size": 13, "type_section_label_line_height": 18, "type_section_label_tracking": 0.8, "type_code_size": 12, "type_code_line_height": 17, "type_weight_regular": 400, "type_weight_medium": 500, "type_weight_semibold": 600, "type_weight_bold": 700, "type_weight_heavy": 800, "fan_tile_w": 90, "fan_radius": 430, "fan_step_deg": 12, "fan_visible_deg": 76, "fan_caps_gap": 14, "fan_caps_faint": 0.75, "fan_cap_size": 55, "fan_cap_lift": 6, "ring_radius": 530, "ring_slip_w": 96, "ring_slip_h": 30, "ring_slip_gap": 8, "fan_bloom_scroll": 24, "fan_collapse_damping": 0.86, "fan_collapse_response": 0.42, "fan_collapse_scroll": 24, "fan_collapsed_size": 44, "head_title_size": 28, "head_record_title_size": 24, "page_head_gap": 12, "slip_pad": 10, "slip_gap": 8, "slip_radius": 3, "slip_edge": 0.7, "slip_lift": 1.04, "slip_shadow": 10, "slip_deckle": 0, "slip_tilt": 0, "page_dim": 0.16, "slip_act_row": 48, "slip_act_glyph": 22, "slip_list_w": 220, "slip_chevron": 7, "fan_top": 26, "fan_lift": 10, "fan_settled_scale": 1.07, "fan_hold_ms": 400, "fan_silence_ms": 1500, "fan_fling_min": 350, "fan_fling_full": 2500, "fan_fling_reach": 0.4, "fan_swipe_lean": 0.2, "fan_snap_response": 0.45, "fan_snap_damping": 0.85, "fan_turn_ms_per_deg": 6, "fan_turn_ms_max": 900, "fan_turn_ms_min": 260, "fan_overscroll": 0.6, "fan_tap_slop": 6, "fan_poster_scale": 1.8, "fan_picture_quality": 0.7, "fan_picture_reach": 4, "fan_picture_scale": 2, "fan_picture_settle_ms": 350, "fan_ghost_wash": 0.45, "fan_record_size": 66, "fan_record_glyph": 0.42, "fan_record_hint_size": 11, "fan_record_pill_size": 19, "fan_record_pill_pad": 12, "fan_record_pulse": 18, "fan_record_pulse_opacity": 0.45, "fan_record_pulse_ms": 1100, "voice_line_lines": 1, "voice_line_fade": 24, "fan_open_fade_ms": 180, "shelf_tile_min_w": 260, "search_page": 50, "card_mottle_opacity": 0.18, "card_rim_opacity": 1, "card_rule_opacity": 0.9, "card_shadow_opacity": 0.18, "card_under_shade": 0.07 } }, "texture": { "grain": true, "shadow": "soft", "tilt": true }, "cap": { "texture": "enamel", "colour": "teal" }, "acts": { "completes": { "stock": "sage" }, "times": { "stock": "tan" }, "moves": { "stock": "slate" }, "destroys": { "stock": "rose" }, "puts_away": { "stock": "grey" }, "default": { "stock": "cream" }, "default_held": { "stock": "rose" } }, "cards": { "field_default_stock": "cream", "overdue_stock": "rose", "tray_stack_stocks": [ "slate", "sage", "cream" ], "empty_outline_dash": [ 4, 3.5 ], "empty_outline_opacity": 0.6, "faint_object_opacity": 0.35, "off_object_opacity": 0.45, "hold_rule_ink": "red", "tray_stock": "cream", "undo_stock": "cream", "empty_rule": "none", "filled_rule": "plain", "destructive_rule": "red", "details_outline_dash": [ 4, 3.5 ] }, "objects": { "date": "leaf", "time": "clock", "repeats": "repeat", "reminder": "bell", "streak": "flame", "text": "words", "figure": "figure", "choice": "ring", "toggle": "ring", "cap": "cap", "people": "people", "link": "link", "picture": "print", "file": "file", "longtext": "words", "url": "words", "number": "figure", "amount": "figure", "bool": "ring", "photo": "print", "phone": "device-phone", "mac": "mac", "linux": "linux", "check": "done" } }, "drawn": "row" }, "themes": { "paper": { "format_version": 1, "id": "paper", "name": "Cotton", "family": "paper", "description": "A theme sets palette, type, acts, cards, objects and the tokens under scale.tokens; nothing else.", "palette": { "light": { "accent": "#C6534B", "accent_contrast": "#FFFFFF", "chip_ground": "#F2F2F2", "dyes": { "cream": "#F0E5D8", "buff": "#ECDAC7", "blue": "#DEE5ED", "sage": "#E1E2D4", "pink": "#F1D8D5", "straw": "#F5EACD", "peach": "#F9E6E1", "newsprint": "#E6E4DE" }, "error": "#B0453D", "error_light": "#F8EAE8", "faces": { "cream": "#F2E3CF", "buff": "#ECD5BA", "shadow": "#50321E", "slip": "#E6CDBB", "mount": "#F5EBDF", "ornament": "#5F7590E6", "ruling": "#C2AE9759", "margin": "#D9918C99", "initials": "#3E3E40", "invitation": "#2F3A17", "invitation_disc": "#BFC2A8", "mark": "#C96E50D9", "passport_ink": "color(srgb 0.13 0.12 0.09)", "passport_red": "color(srgb 0.64 0.15 0.11)", "passport_violet": "color(srgb 0.35 0.19 0.49)", "passport_blue": "color(srgb 0.12 0.29 0.46)", "passport_brown": "color(srgb 0.47 0.23 0.16)" }, "ground": "#FFFFFF", "ground_elevated": "#FFFFFF", "ground_muted": "#EEE3D6", "hairline": "#E2E2E2", "highlight": "#D9F7A6", "ink": "#444444", "ink_body": "#444444", "ink_secondary": "#888888", "ink_tertiary": "#ABABAB", "pace_rules": { "late": "#C5816D", "soon": "#A79451", "upcoming": "#45A5AF", "someday": "#8A9E5F", "done": "#AE9051" }, "paces": { "late": "#F1D5C2", "soon": "#E4DBBE", "upcoming": "#BDE3E8", "someday": "#D6E0C3", "done": "#E0DAD3" }, "paper": "#FFFFFF", "pencil": 0.55, "print": "#2E2925", "selection": "#C6534B2E", "shadow": "#000000", "success": "#4F7D5C", "success_light": "#E8F1EB", "tags": { "fill": "#F2F2F2", "ink": "#444444" }, "warning": "#A06C1C", "warning_light": "#F7EFDC" }, "dark": { "accent": "#C6534B", "accent_contrast": "#FFFFFF", "chip_ground": "#F2F2F2", "dyes": { "cream": "#F0E5D8", "buff": "#ECDAC7", "blue": "#DEE5ED", "sage": "#E1E2D4", "pink": "#F1D8D5", "straw": "#F5EACD", "peach": "#F9E6E1", "newsprint": "#E6E4DE" }, "error": "#B0453D", "error_light": "#F8EAE8", "faces": { "cream": "#F2E3CF", "buff": "#ECD5BA", "shadow": "#50321E", "slip": "#E6CDBB", "mount": "#F5EBDF", "ornament": "#5F7590E6", "ruling": "#C2AE9759", "margin": "#D9918C99", "initials": "#3E3E40", "invitation": "#2F3A17", "invitation_disc": "#BFC2A8", "mark": "#C96E50D9", "passport_ink": "color(srgb 0.13 0.12 0.09)", "passport_red": "color(srgb 0.64 0.15 0.11)", "passport_violet": "color(srgb 0.35 0.19 0.49)", "passport_blue": "color(srgb 0.12 0.29 0.46)", "passport_brown": "color(srgb 0.47 0.23 0.16)" }, "ground": "#FFFFFF", "ground_elevated": "#FFFFFF", "ground_muted": "#EEE3D6", "hairline": "#E2E2E2", "highlight": "#D9F7A6", "ink": "#444444", "ink_body": "#444444", "ink_secondary": "#888888", "ink_tertiary": "#ABABAB", "pace_rules": { "late": "#C5816D", "soon": "#A79451", "upcoming": "#45A5AF", "someday": "#8A9E5F", "done": "#AE9051" }, "paces": { "late": "#F1D5C2", "soon": "#E4DBBE", "upcoming": "#BDE3E8", "someday": "#D6E0C3", "done": "#E0DAD3" }, "paper": "#FFFFFF", "pencil": 0.55, "print": "#2E2925", "selection": "#C6534B2E", "shadow": "#000000", "success": "#4F7D5C", "success_light": "#E8F1EB", "tags": { "fill": "#F2F2F2", "ink": "#444444" }, "warning": "#A06C1C", "warning_light": "#F7EFDC" } }, "type": { "body": "courier", "cap": "instrument_italic", "display": "fraunces_title", "figure": "courier", "hand": "caveat", "interface": "system", "meta": "courier_italic", "script": "courier_new", "text_body": "system", "text_caption": "system", "text_code": "menlo", "text_editor_title": "system_semibold", "text_page_title": "system_bold", "text_preview": "system", "text_row_title": "system_medium", "text_row_title_compact": "system_medium", "text_screen_title": "system_semibold", "text_section_label": "system_semibold", "title": "fraunces_text" }, "scale": { "tokens": { "body_size": 14, "card_mottle_opacity": 0.18, "card_rim_opacity": 1, "card_rule_opacity": 0.9, "card_shadow_opacity": 0.18, "card_under_shade": 0.07, "fan_bloom_scroll": 24, "fan_cap_lift": 6, "fan_cap_size": 55, "fan_caps_faint": 0.75, "fan_caps_gap": 14, "fan_collapse_damping": 0.86, "fan_collapse_response": 0.42, "fan_collapse_scroll": 24, "fan_collapsed_size": 44, "fan_fling_full": 2500, "fan_fling_min": 350, "fan_fling_reach": 0.4, "fan_ghost_wash": 0.45, "fan_hold_ms": 400, "fan_lift": 10, "fan_open_fade_ms": 180, "fan_overscroll": 0.6, "fan_picture_quality": 0.7, "fan_picture_reach": 4, "fan_picture_scale": 2, "fan_picture_settle_ms": 350, "fan_poster_scale": 1.8, "fan_radius": 430, "fan_record_glyph": 0.42, "fan_record_hint_size": 11, "fan_record_pill_pad": 12, "fan_record_pill_size": 19, "fan_record_pulse": 18, "fan_record_pulse_ms": 1100, "fan_record_pulse_opacity": 0.45, "fan_record_size": 66, "fan_settled_scale": 1.07, "fan_silence_ms": 1500, "fan_snap_damping": 0.85, "fan_snap_response": 0.45, "fan_step_deg": 12, "fan_swipe_lean": 0.2, "fan_tap_slop": 6, "fan_tile_w": 90, "fan_top": 26, "fan_turn_ms_max": 900, "fan_turn_ms_min": 260, "fan_turn_ms_per_deg": 6, "fan_visible_deg": 76, "hairline": 0.7, "hand_size": 14, "head_record_title_size": 24, "head_title_size": 28, "inset_fraction": 0.075, "inset_max": 26, "inset_min": 9, "meta_size": 12.5, "monogram_size": 0.36, "nav_circle": 39, "nav_row_air": 12, "nav_row_top": 6, "page_dim": 0.16, "page_head_gap": 12, "radius": 8, "radius_fraction": 0.035, "radius_min": 3, "ring_radius": 530, "ring_slip_gap": 8, "ring_slip_h": 30, "ring_slip_w": 96, "screen_title_size": 34, "search_page": 50, "section_title_size": 22, "shelf_tile_min_w": 260, "slip_act_glyph": 22, "slip_act_row": 48, "slip_chevron": 7, "slip_deckle": 0, "slip_edge": 0.7, "slip_gap": 8, "slip_lift": 1.04, "slip_list_w": 220, "slip_pad": 10, "slip_radius": 3, "slip_shadow": 10, "slip_tilt": 0, "spacing": 12, "stroke": 1, "title_size": 17, "type_body_line_height": 22, "type_body_size": 16, "type_caption_line_height": 18, "type_caption_size": 13, "type_code_line_height": 17, "type_code_size": 12, "type_editor_title_line_height": 37, "type_editor_title_size": 30, "type_page_title_line_height": 41, "type_page_title_size": 34, "type_preview_line_height": 20, "type_preview_size": 15, "type_row_title_compact_line_height": 22, "type_row_title_compact_size": 17, "type_row_title_line_height": 25, "type_row_title_size": 20, "type_screen_title_line_height": 25, "type_screen_title_size": 20, "type_section_label_line_height": 18, "type_section_label_size": 13, "type_section_label_tracking": 0.8, "type_weight_bold": 700, "type_weight_heavy": 800, "type_weight_medium": 500, "type_weight_regular": 400, "type_weight_semibold": 600, "voice_line_fade": 24, "voice_line_lines": 1 } }, "acts": { "completes": { "stock": "sage" }, "default": { "stock": "cream" }, "default_held": { "stock": "rose" }, "destroys": { "stock": "rose" }, "moves": { "stock": "slate" }, "puts_away": { "stock": "grey" }, "times": { "stock": "tan" } }, "cards": { "destructive_rule": "red", "details_outline_dash": [ 4, 3.5 ], "empty_outline_dash": [ 4, 3.5 ], "empty_outline_opacity": 0.6, "empty_rule": "none", "faint_object_opacity": 0.35, "field_default_stock": "cream", "filled_rule": "plain", "hold_rule_ink": "red", "off_object_opacity": 0.45, "overdue_stock": "rose", "tray_stack_stocks": [ "slate", "sage", "cream" ], "tray_stock": "cream", "undo_stock": "cream" }, "objects": { "amount": "figure", "bool": "ring", "cap": "cap", "check": "done", "choice": "ring", "date": "leaf", "figure": "figure", "file": "file", "link": "link", "linux": "linux", "longtext": "words", "mac": "mac", "number": "figure", "people": "people", "phone": "device-phone", "photo": "print", "picture": "print", "reminder": "bell", "repeats": "repeat", "streak": "flame", "text": "words", "time": "clock", "toggle": "ring", "url": "words" }, "texture": { "grain": true, "shadow": "soft", "tilt": true }, "cap": { "texture": "enamel" } }, "plain": { "format_version": 1, "id": "plain", "name": "Plain", "family": "plain", "description": "A theme sets palette, type, acts, cards, objects and the tokens under scale.tokens; nothing else.", "palette": { "light": { "accent": "#C6534B", "accent_contrast": "#FFFFFF", "chip_ground": "#F2F2F2", "dyes": { "cream": "#F0E5D8", "buff": "#ECDAC7", "blue": "#DEE5ED", "sage": "#E1E2D4", "pink": "#F1D8D5", "straw": "#F5EACD", "peach": "#F9E6E1", "newsprint": "#E6E4DE" }, "error": "#B0453D", "error_light": "#F8EAE8", "faces": { "cream": "#F2E3CF", "buff": "#ECD5BA", "shadow": "#50321E", "slip": "#E6CDBB", "mount": "#F5EBDF", "ornament": "#5F7590E6", "ruling": "#C2AE9759", "margin": "#D9918C99", "initials": "#3E3E40", "invitation": "#2F3A17", "invitation_disc": "#BFC2A8", "mark": "#C96E50D9", "passport_ink": "color(srgb 0.13 0.12 0.09)", "passport_red": "color(srgb 0.64 0.15 0.11)", "passport_violet": "color(srgb 0.35 0.19 0.49)", "passport_blue": "color(srgb 0.12 0.29 0.46)", "passport_brown": "color(srgb 0.47 0.23 0.16)" }, "ground": "#F2F2F2", "ground_elevated": "#FFFFFF", "ground_muted": "#F2F2F2", "hairline": "#E2E2E2", "highlight": "#D9F7A6", "ink": "#444444", "ink_body": "#444444", "ink_secondary": "#888888", "ink_tertiary": "#ABABAB", "pace_rules": { "late": "#C5816D", "soon": "#A79451", "upcoming": "#45A5AF", "someday": "#8A9E5F", "done": "#AE9051" }, "paces": { "late": "#F1D5C2", "soon": "#E4DBBE", "upcoming": "#BDE3E8", "someday": "#D6E0C3", "done": "#E0DAD3" }, "paper": "#FFFFFF", "pencil": 0.55, "print": "#444444", "selection": "#C6534B2E", "shadow": "#000000", "success": "#4F7D5C", "success_light": "#E8F1EB", "tags": { "fill": "#444444", "ink": "#FFFFFF" }, "warning": "#A06C1C", "warning_light": "#F7EFDC" }, "dark": { "accent": "#C6534B", "accent_contrast": "#FFFFFF", "chip_ground": "#F2F2F2", "dyes": { "cream": "#F0E5D8", "buff": "#ECDAC7", "blue": "#DEE5ED", "sage": "#E1E2D4", "pink": "#F1D8D5", "straw": "#F5EACD", "peach": "#F9E6E1", "newsprint": "#E6E4DE" }, "error": "#B0453D", "error_light": "#F8EAE8", "faces": { "cream": "#F2E3CF", "buff": "#ECD5BA", "shadow": "#50321E", "slip": "#E6CDBB", "mount": "#F5EBDF", "ornament": "#5F7590E6", "ruling": "#C2AE9759", "margin": "#D9918C99", "initials": "#3E3E40", "invitation": "#2F3A17", "invitation_disc": "#BFC2A8", "mark": "#C96E50D9", "passport_ink": "color(srgb 0.13 0.12 0.09)", "passport_red": "color(srgb 0.64 0.15 0.11)", "passport_violet": "color(srgb 0.35 0.19 0.49)", "passport_blue": "color(srgb 0.12 0.29 0.46)", "passport_brown": "color(srgb 0.47 0.23 0.16)" }, "ground": "#F2F2F2", "ground_elevated": "#FFFFFF", "ground_muted": "#F2F2F2", "hairline": "#E2E2E2", "highlight": "#D9F7A6", "ink": "#444444", "ink_body": "#444444", "ink_secondary": "#888888", "ink_tertiary": "#ABABAB", "pace_rules": { "late": "#C5816D", "soon": "#A79451", "upcoming": "#45A5AF", "someday": "#8A9E5F", "done": "#AE9051" }, "paces": { "late": "#F1D5C2", "soon": "#E4DBBE", "upcoming": "#BDE3E8", "someday": "#D6E0C3", "done": "#E0DAD3" }, "paper": "#FFFFFF", "pencil": 0.55, "print": "#444444", "selection": "#C6534B2E", "shadow": "#000000", "success": "#4F7D5C", "success_light": "#E8F1EB", "tags": { "fill": "#444444", "ink": "#FFFFFF" }, "warning": "#A06C1C", "warning_light": "#F7EFDC" } }, "type": { "body": "system", "cap": "system_semibold", "display": "system_semibold", "figure": "system_monospaced", "hand": "system_italic", "interface": "system", "meta": "system", "script": "courier_new", "text_body": "system", "text_caption": "system", "text_code": "menlo", "text_editor_title": "system_semibold", "text_page_title": "system_bold", "text_preview": "system", "text_row_title": "system_medium", "text_row_title_compact": "system_medium", "text_screen_title": "system_semibold", "text_section_label": "system_semibold", "title": "system_semibold" }, "scale": { "tokens": { "body_size": 15, "card_mottle_opacity": 0.18, "card_rim_opacity": 1, "card_rule_opacity": 0.9, "card_shadow_opacity": 0.18, "card_under_shade": 0.07, "fan_bloom_scroll": 24, "fan_cap_lift": 6, "fan_cap_size": 55, "fan_caps_faint": 0.75, "fan_caps_gap": 14, "fan_collapse_damping": 0.86, "fan_collapse_response": 0.42, "fan_collapse_scroll": 24, "fan_collapsed_size": 44, "fan_fling_full": 2500, "fan_fling_min": 350, "fan_fling_reach": 0.4, "fan_ghost_wash": 0.45, "fan_hold_ms": 400, "fan_lift": 10, "fan_open_fade_ms": 180, "fan_overscroll": 0.6, "fan_picture_quality": 0.7, "fan_picture_reach": 4, "fan_picture_scale": 2, "fan_picture_settle_ms": 350, "fan_poster_scale": 1.8, "fan_radius": 430, "fan_record_glyph": 0.42, "fan_record_hint_size": 11, "fan_record_pill_pad": 12, "fan_record_pill_size": 19, "fan_record_pulse": 18, "fan_record_pulse_ms": 1100, "fan_record_pulse_opacity": 0.45, "fan_record_size": 66, "fan_settled_scale": 1.07, "fan_silence_ms": 1500, "fan_snap_damping": 0.85, "fan_snap_response": 0.45, "fan_step_deg": 12, "fan_swipe_lean": 0.2, "fan_tap_slop": 6, "fan_tile_w": 90, "fan_top": 26, "fan_turn_ms_max": 900, "fan_turn_ms_min": 260, "fan_turn_ms_per_deg": 6, "fan_visible_deg": 76, "hairline": 0.7, "hand_size": 14, "head_record_title_size": 24, "head_title_size": 28, "inset_fraction": 0, "inset_max": 14, "inset_min": 14, "meta_size": 13, "monogram_size": 0.36, "nav_circle": 39, "nav_row_air": 12, "nav_row_top": 6, "page_dim": 0.16, "page_head_gap": 12, "radius": 12, "radius_fraction": 1, "radius_min": 12, "ring_radius": 530, "ring_slip_gap": 8, "ring_slip_h": 30, "ring_slip_w": 96, "screen_title_size": 34, "search_page": 50, "section_title_size": 22, "shelf_tile_min_w": 260, "slip_act_glyph": 22, "slip_act_row": 48, "slip_chevron": 7, "slip_deckle": 0, "slip_edge": 0.7, "slip_gap": 8, "slip_lift": 1.04, "slip_list_w": 220, "slip_pad": 10, "slip_radius": 3, "slip_shadow": 10, "slip_tilt": 0, "spacing": 12, "stroke": 1, "title_size": 17, "type_body_line_height": 22, "type_body_size": 16, "type_caption_line_height": 18, "type_caption_size": 13, "type_code_line_height": 17, "type_code_size": 12, "type_editor_title_line_height": 37, "type_editor_title_size": 30, "type_page_title_line_height": 41, "type_page_title_size": 34, "type_preview_line_height": 20, "type_preview_size": 15, "type_row_title_compact_line_height": 22, "type_row_title_compact_size": 17, "type_row_title_line_height": 25, "type_row_title_size": 20, "type_screen_title_line_height": 25, "type_screen_title_size": 20, "type_section_label_line_height": 18, "type_section_label_size": 13, "type_section_label_tracking": 0.8, "type_weight_bold": 700, "type_weight_heavy": 800, "type_weight_medium": 500, "type_weight_regular": 400, "type_weight_semibold": 600, "voice_line_fade": 24, "voice_line_lines": 1 } }, "acts": { "completes": { "stock": "sage" }, "default": { "stock": "cream" }, "default_held": { "stock": "rose" }, "destroys": { "stock": "rose" }, "moves": { "stock": "slate" }, "puts_away": { "stock": "grey" }, "times": { "stock": "tan" } }, "cards": { "destructive_rule": "red", "details_outline_dash": [ 4, 3.5 ], "empty_outline_dash": [ 4, 3.5 ], "empty_outline_opacity": 0.6, "empty_rule": "none", "faint_object_opacity": 0.35, "field_default_stock": "cream", "filled_rule": "plain", "hold_rule_ink": "red", "off_object_opacity": 0.45, "overdue_stock": "rose", "tray_stack_stocks": [ "slate", "sage", "cream" ], "tray_stock": "cream", "undo_stock": "cream" }, "objects": { "amount": "figure", "bool": "ring", "cap": "cap", "check": "done", "choice": "ring", "date": "leaf", "figure": "figure", "file": "file", "link": "link", "linux": "linux", "longtext": "words", "mac": "mac", "number": "figure", "people": "people", "phone": "device-phone", "photo": "print", "picture": "print", "reminder": "bell", "repeats": "repeat", "streak": "flame", "text": "words", "time": "clock", "toggle": "ring", "url": "words" }, "texture": { "grain": false, "shadow": "none", "tilt": false }, "cap": { "texture": "flat" } } }, "database": "11111111-1111-4111-8111-111111111111" }