Cotton code
46 lines · 3.1 KB · JSONRaw
{  "id": "quota",  "name": "Quota",  "plural": "Quotas",  "picture": null,  "builtin": false,  "engine": null,  "columns": [    { "key": "name", "name": "Account", "type": "text", "required": true, "placeholder": "The account's email" },    { "key": "provider", "name": "Provider", "type": "text", "placeholder": "claude" },    { "key": "email", "name": "Email", "type": "text" },    { "key": "plan", "name": "Plan", "type": "text", "placeholder": "Max 20x" },    { "key": "macs", "name": "Signed in on", "type": "text" },    { "key": "week", "name": "Week", "type": "text", "placeholder": "62% used" },    { "key": "week_pct", "name": "Week used (%)", "type": "number" },    { "key": "week_resets", "name": "Week resets", "type": "text", "placeholder": "in 2d 23h" },    { "key": "resets_line", "name": "Resets", "type": "text", "placeholder": "resets in 2d 23h" },    { "key": "week_resets_at", "name": "Week resets on", "type": "date", "format": "countdown", "units": { "one": "resets in {n}", "other": "resets in {n}", "zero": "has reset" } },    { "key": "week_trend", "name": "Week trend", "type": "text", "placeholder": "[24, 43, 62]" },    { "key": "session", "name": "Window", "type": "text", "placeholder": "34% used" },    { "key": "session_pct", "name": "Window used (%)", "type": "number" },    { "key": "extra", "name": "Extra usage", "type": "text" },    { "key": "models", "name": "Models", "type": "text" },    { "key": "status", "name": "Status", "type": "choice", "choices": ["active", "unreachable"], "format": "words", "tones": { "active": "green", "unreachable": "red" }, "default": "active" },    { "key": "checked_at", "name": "Checked", "type": "date", "format": "ago" },    { "key": "notes", "name": "Notes", "type": "longtext", "markdown": true }  ],  "title": "name",  "date": "checked_at",  "project": null,  "order": null,  "slip": { "title": "name", "subtitle": ["plan", "week"], "trailing": "resets_line", "photo": null, "toggle": null },  "tile": { "face": "slip-list" },  "sort": { "column": "week_resets_at" },  "empty": { "title": "No quotas yet", "message": "Each Mac writes the accounts it is signed in to." },  "create": { "label": "Add an account" },  "page": [    { "heading": null, "columns": ["name", "provider", "plan", "status"] },    { "heading": "This week", "columns": ["week", "week_pct", "resets_line", "week_resets", "week_resets_at", "models"] },    { "heading": "Window", "columns": ["session", "session_pct", "extra"] },    { "heading": "Read", "columns": ["macs", "checked_at", "email"] },    { "heading": "History", "list": { "table": "quota_reading", "link": "quota" } },    { "heading": "Notes", "columns": ["notes"] }  ],  "instructions": "One row per AI account the household uses; the account's email is its name. week_pct and session_pct are whole percentages of the week's and the five-hour window's allowance used; resets_line says when the week resets in words and week_resets_at is that day. status is active, or unreachable when the last read failed (notes says why). Rows are written hourly by scripts/dev/quota-row.sh; never guess a figure."}