Cotton code
352 lines · 9.3 KB · JSONRaw
{  "_": "What the db-cards install puts on a database beyond scripts/faces-walk/cards.json. Each entry is the whole of its target: a card block, a column's look, a slip's keys, a view's sort, a tool's contributed column; packages are row 7's decks under db-cards/packages, imported whole.; kit_packages are kit tools whose revision the database lacks, imported whole from crates/cotton-core/kits/personal/tools (no start carries a kit revision forward); kit_table_cards are a kit table's card, set on a table whose tool is the owner's own copy, so its views stay as they are. Every column quota-row.sh writes is readonly: false, so a Mac's writer writes it whatever token it holds (a column held readonly answers only its table's producer token, and the agents' reinstall wrote with another: \"week\" is read only, 23 Oct 2026). new_views are views a tool gains, each added where the tool has no view by its id: Money's By person, a group deck dealing one card per person over Owed.",  "view_ids": {    "money": {      "bank_accounts": ["banks", "cards"]    },    "birthdays": {      "coming": [        "wishes",        "everyone"      ]    }  },  "new_views": {    "money": [      {"id": "by_person", "label": "By person", "read": {"table": "money_owed"}, "face": "cards", "card": {"face": "group", "fields": [{"slot": "people", "column": "counterparty_person_id"}, {"slot": "title", "column": "description"}, {"slot": "amount", "column": "amount_minor"}, {"slot": "date", "column": "occurred_on"}]}}    ]  },  "view_cards": {    "money": {      "statements": {"face": "plain", "fields": [{"slot": "account", "column": "account_id"}, {"slot": "date", "column": "period_end"}, {"slot": "facts", "column": "period_start", "also": ["opening_balance_minor", "closing_balance_minor", "line_count"]}]},      "owed": {"face": "transaction.receipt", "fields": [{"slot": "people", "column": "counterparty_person_id", "max": 1, "label": "label.money.person"}, {"slot": "title", "column": "description", "label": "label.money.for"}, {"slot": "amount", "column": "amount_minor"}, {"slot": "state", "column": "direction", "only": ["out", "in"]}, {"slot": "date", "column": "occurred_on"}, {"slot": "tag", "column": "tag"}]},      "with_person": {"face": "transaction.receipt", "fields": [{"slot": "title", "column": "description", "label": "label.money.for"}, {"slot": "tag", "column": "tag"}, {"slot": "amount", "column": "amount_minor"}, {"slot": "state", "column": "direction", "only": ["out", "in"]}, {"slot": "date", "column": "occurred_on"}, {"slot": "facts", "column": "balance_after"}]}    }  },  "table_cards": {    "call": {      "face": "audio",      "fields": [        {          "slot": "photo",          "column": "photo"        },        {          "slot": "title",          "column": "title"        },        {          "slot": "date",          "column": "started_at",          "form": "weekday_date"        },        {          "slot": "state",          "column": "outcome",          "only": [            "missed",            "cancelled",            "failed"          ]        },        {          "slot": "subtitle",          "column": "provider"        },        {          "slot": "people",          "column": "person_id",          "max": 1        }      ]    },    "page": {      "face": "document",      "fields": [        {          "slot": "title",          "column": "title"        },        {          "slot": "subtitle",          "column": "host"        },        {          "slot": "date",          "column": "created_at",          "form": "relative"        },        {          "slot": "state",          "column": "state",          "only": [            "unread"          ]        }      ]    },    "comment": {      "face": "note.page",      "fields": [        {          "slot": "body",          "column": "body"        },        {          "slot": "subtitle",          "column": "author_label"        },        {          "slot": "date",          "column": "created_at",          "form": "relative"        },        {          "slot": "state",          "column": "status",          "only": [            "open"          ]        }      ]    },    "thought": {      "face": "note.page",      "fields": [        {          "slot": "body",          "column": "raw_text"        },        {          "slot": "date",          "column": "captured_at",          "form": "relative"        },        {          "slot": "state",          "column": "standing",          "only": [            "open"          ]        }      ]    },    "location": {      "face": "note.page",      "fields": [        {          "slot": "title",          "column": "name"        },        {          "slot": "subtitle",          "column": "near"        },        {          "slot": "place",          "column": "address"        },        {          "slot": "body",          "column": "note"        }      ]    },    "goal": {      "face": "todo.card",      "fields": [        {          "slot": "title",          "column": "title"        },        {          "slot": "body",          "column": "why"        },        {          "slot": "date",          "column": "target_date",          "form": "weekday_date"        },        {          "slot": "state",          "column": "status",          "only": [            "paused",            "achieved",            "dropped"          ]        }      ]    }  },  "added_columns": {    "machines": {      "machine": [        { "key": "mem_used_gb", "name": "Memory used (GB)", "type": "number" },        { "key": "disk_used_gb", "name": "Disk used (GB)", "type": "number" },        { "key": "model", "name": "Model", "type": "text", "placeholder": "Mac mini" }      ]    },    "quotas": {      "quota": [        { "key": "week_trend", "name": "Week trend", "type": "text", "placeholder": "[24, 43, 62]" }      ]    },    "subscriptions": {      "subscription": [        { "key": "account_id", "name": "Paid from", "type": "link", "link_to": "money_account" },        { "key": "login", "name": "Signed in as", "type": "text", "placeholder": "you@example.com" },        { "key": "category", "name": "Category", "type": "choice", "choices": ["entertainment", "work", "software", "news", "health", "home", "other"], "format": "words" },        { "key": "cancelled_on", "name": "Cancelled on", "type": "date" },        { "key": "last_charged", "name": "Last charged", "type": "date" },        { "key": "charges", "name": "Charges", "type": "number" },        { "key": "paid_total", "name": "Paid in all", "type": "amount", "currency": "currency" }      ]    }  },  "columns": {    "machine": {      "sessions": {        "name": "Coding sessions"      }    },    "quota": {      "week_resets_at": {        "format": "countdown",        "units": {          "one": "resets in {n}",          "other": "resets in {n}",          "zero": "has reset"        },        "readonly": false      },      "name": {        "readonly": false      },      "provider": {        "readonly": false      },      "email": {        "readonly": false      },      "plan": {        "readonly": false      },      "macs": {        "readonly": false      },      "week": {        "readonly": false      },      "week_pct": {        "readonly": false      },      "week_resets": {        "readonly": false      },      "resets_line": {        "readonly": false      },      "week_trend": {        "readonly": false      },      "session": {        "readonly": false      },      "session_pct": {        "readonly": false      },      "extra": {        "readonly": false      },      "models": {        "readonly": false      },      "status": {        "readonly": false      },      "checked_at": {        "readonly": false      },      "notes": {        "readonly": false      }    },    "quota_reading": {      "name": {        "readonly": false      },      "quota": {        "readonly": false      },      "week_pct": {        "readonly": false      },      "session_pct": {        "readonly": false      },      "sampled_at": {        "readonly": false      }    },    "money_owed": {      "direction": {        "labels": {          "out": "Owed to me",          "in": "I owe"        }      }    }  },  "slips": {    "quota": {      "subtitle": [        "email",        "week",        "week_resets_at"      ]    }  },  "view_sorts": {    "money": {      "future": {        "column": "occurred_on"      }    }  },  "contributions": {    "birthdays": [      {        "table": "person",        "column": {          "key": "last_wished",          "name": "Last wished",          "type": "date"        }      },      {        "table": "person",        "column": {          "key": "last_wished_via",          "name": "Wished on",          "type": "choice",          "choices": ["call", "whatsapp", "message", "email", "in_person", "card"],          "labels": {"call": "A call", "whatsapp": "WhatsApp", "message": "A message", "email": "Email", "in_person": "In person", "card": "A card"}        }      }    ]  },  "packages": [    "meetings",    "moods"  ],  "kit_packages": [    "artifacts",    "memories",    "messages"  ],  "kit_table_cards": {    "person": "people"  }}