askrobots / dbbasic-object-server
Public
Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.
danq9
signup: the person chooses the password and name on the confirm page
83c7aa6
2 weeks, 5 days ago
History
attention_sources.json · 5.0 KB · 92 lines
| 1 | { |
| 2 | "name": "attention_sources", |
| 3 | "title": "Attention sources", |
| 4 | "version": 1, |
| 5 | "description": "What each installed app says 'needs a human' means in its own domain. This server is built almost entirely out of gates and derived states, and every one of them ends in a pile of things a machine deliberately refused to decide: scans sitting at `extracted` waiting to be confirmed into expenses, time entries `submitted` waiting for an approver who is not the person who logged them, invoices past their due date, bank lines nothing matched. It has been computing those piles all along and throwing them away at the end of each pass -- system_scan_processor returns a field literally named `needing_a_human` and no surface has ever read it. The arithmetic was never the missing part; a place to declare that the arithmetic MEANS something was, and that declaration can only honestly live in the package that owns the domain, because nobody else knows that `extracted` is a waiting room and `confirmed` is not. So a package declares its queues in its manifest and install writes them here, exactly as it declares its schedules and its doors. The daemon executes each row's object with method COUNT on a schedule and writes the answers to attention_counts; the home page and the app list read that small table. The package owns object_id/label/path/nav_id/group/severity and restates them on every install; the operator owns operator_muted, which an install never writes.", |
| 6 | "fields": [ |
| 7 | { |
| 8 | "name": "id" |
| 9 | }, |
| 10 | { |
| 11 | "name": "package", |
| 12 | "type": "text", |
| 13 | "label": "Package", |
| 14 | "help": "Which package declared this queue. Provenance, stamped by install: it is how a second package claiming the same id is caught, and how you find the manifest to edit when a label is wrong." |
| 15 | }, |
| 16 | { |
| 17 | "name": "object_id", |
| 18 | "type": "text", |
| 19 | "required": true, |
| 20 | "label": "Provider", |
| 21 | "validation": {"min_length": 1, "max_length": 128}, |
| 22 | "help": "The object the rollup pass executes with method COUNT, expecting {count, detail?}. A distinct verb rather than GET or POST so the same object can also answer a human -- a provider is allowed to be a page too." |
| 23 | }, |
| 24 | { |
| 25 | "name": "label", |
| 26 | "type": "text", |
| 27 | "required": true, |
| 28 | "label": "Label", |
| 29 | "validation": {"min_length": 1, "max_length": 60}, |
| 30 | "help": "What the queue is called on the home page, in the words of the person who has to work it: 'Receipts to confirm', not 'scans.status=extracted'." |
| 31 | }, |
| 32 | { |
| 33 | "name": "path", |
| 34 | "type": "text", |
| 35 | "required": true, |
| 36 | "label": "Path", |
| 37 | "validation": {"min_length": 1, "max_length": 200}, |
| 38 | "help": "Where the count clicks through to. A number that cannot be acted on in one click does not belong on a home page. Whether anything answers this URL is a routing question this collection deliberately does not restate." |
| 39 | }, |
| 40 | { |
| 41 | "name": "nav_id", |
| 42 | "type": "text", |
| 43 | "label": "Nav entry", |
| 44 | "validation": {"max_length": 64}, |
| 45 | "help": "The nav_entries row this count decorates, so the app list itself can read 'Invoices - 5 overdue' with no second surface to maintain. Optional: a queue can belong to a package that ships no page at all (app-intake is one)." |
| 46 | }, |
| 47 | { |
| 48 | "name": "group", |
| 49 | "type": "text", |
| 50 | "label": "Group", |
| 51 | "default": "Apps", |
| 52 | "help": "Free text heading, the same vocabulary nav_entries uses: Work, Publishing, Money, Commerce, Warehouse, System." |
| 53 | }, |
| 54 | { |
| 55 | "name": "severity", |
| 56 | "type": "enum", |
| 57 | "label": "Severity", |
| 58 | "default": "normal", |
| 59 | "enum": ["normal", "warning", "urgent"], |
| 60 | "help": "How loudly a non-zero count is presented, and the first sort key on the home band. `normal` is work waiting; `warning` is work that is now late (an overdue invoice); `urgent` is something broken (a scheduler pass that failed). Deliberately three, because a scale with more steps is a scale nobody calibrates." |
| 61 | }, |
| 62 | { |
| 63 | "name": "operator_muted", |
| 64 | "type": "boolean", |
| 65 | "label": "Muted by operator", |
| 66 | "default": "false", |
| 67 | "help": "The operator's word, and install NEVER overwrites it. Set it when this deployment does not work a queue somebody else's package cares about -- a shop with no warehouse does not want a picking count -- and a reinstall restates every other column but leaves this one exactly as you left it. Same posture as a paused schedule and a hidden nav entry." |
| 68 | }, |
| 69 | { |
| 70 | "name": "owner_id", |
| 71 | "type": "text", |
| 72 | "label": "Owner" |
| 73 | }, |
| 74 | { |
| 75 | "name": "created_at", |
| 76 | "type": "datetime", |
| 77 | "label": "Created", |
| 78 | "read_only": true |
| 79 | } |
| 80 | ], |
| 81 | "forms": { |
| 82 | "default": {"fields": ["object_id", "label", "path", "nav_id", "group", "severity", "operator_muted"]} |
| 83 | }, |
| 84 | "views": { |
| 85 | "list_mode": "table", |
| 86 | "list_fields": ["label", "object_id", "path", "group", "severity", "operator_muted", "package"], |
| 87 | "filter_fields": ["group", "severity"] |
| 88 | }, |
| 89 | "search": { |
| 90 | "fields": ["label", "path", "object_id"] |
| 91 | } |
| 92 | } |