@bendyline/gilde 0.1.79 → 0.1.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/authoring/chat-models/qwen3.8-27b-q4.json +27 -9
- package/authoring/tactical/books/bug-fix-tdd.json +2 -2
- package/authoring/tactical/books/dependency-upgrade.json +1 -1
- package/authoring/tactical/books/refactor-module.json +4 -4
- package/authoring/tactical/books/test-suite-backfill.json +2 -2
- package/authoring/tactical/wave.json +8 -8
- package/data/chat-models/index.json +1 -1
- package/data/chat-models/qw/qwen3.8-27b-q4/manifest.json +35 -12
- package/data/chat-models/qw/qwen3.8-27b-q4/versions/1.0.5/manifest.json +116 -0
- package/data/chat-models/raw-index.json +1 -1
- package/data/craftbook-templates/bu/bug-fix-tdd/versions/2.0.5/craftbook.json +736 -0
- package/data/craftbook-templates/bu/bug-fix-tdd/versions/2.0.5/test.json +221 -0
- package/data/craftbook-templates/de/dependency-upgrade/versions/1.0.5/craftbook.json +625 -0
- package/data/craftbook-templates/de/dependency-upgrade/versions/1.0.5/test.json +235 -0
- package/data/craftbook-templates/index.json +1 -1
- package/data/craftbook-templates/raw-index.json +1 -1
- package/data/craftbook-templates/re/refactor-module/versions/2.0.5/craftbook.json +699 -0
- package/data/craftbook-templates/re/refactor-module/versions/2.0.5/test.json +241 -0
- package/data/craftbook-templates/te/test-suite-backfill/versions/2.0.5/craftbook.json +596 -0
- package/data/craftbook-templates/te/test-suite-backfill/versions/2.0.5/test.json +195 -0
- package/data/gezel-templates/ar/archivaris/manifest.json +1 -1
- package/data/gezel-templates/ar/archivaris/versions/1.0.1/about.md +26 -0
- package/data/gezel-templates/ar/archivaris/versions/1.0.1/manifest.json +10 -0
- package/data/gezel-templates/index.json +1 -1
- package/data/gezel-templates/pe/penningmeester/versions/1.0.1/about.md +23 -0
- package/data/gezel-templates/pe/penningmeester/versions/1.0.1/manifest.json +10 -0
- package/data/gezel-templates/raw-index.json +1 -1
- package/data/gezel-templates/zo/zorgcoordinator/manifest.json +1 -1
- package/data/gezel-templates/zo/zorgcoordinator/versions/1.0.1/about.md +23 -0
- package/data/gezel-templates/zo/zorgcoordinator/versions/1.0.1/manifest.json +10 -0
- package/data/project-types/ca/caregiving-binder/manifest.json +1 -1
- package/data/project-types/ca/caregiving-binder/versions/1.1.1/about.md +7 -0
- package/data/project-types/ca/caregiving-binder/versions/1.1.1/care.json +4 -0
- package/data/project-types/ca/caregiving-binder/versions/1.1.1/manifest.json +178 -0
- package/data/project-types/ca/caregiving-binder/versions/1.1.1/meds.json +8 -0
- package/data/project-types/ca/caregiving-binder/versions/1.1.1/mission.md +7 -0
- package/data/project-types/ca/caregiving-binder/versions/1.1.1/pages/dashboard/index.html +265 -0
- package/data/project-types/ho/household-budget/manifest.json +1 -1
- package/data/project-types/ho/household-budget/versions/1.0.2/about.md +6 -0
- package/data/project-types/ho/household-budget/versions/1.0.2/ledger.json +5 -0
- package/data/project-types/ho/household-budget/versions/1.0.2/manifest.json +163 -0
- package/data/project-types/ho/household-budget/versions/1.0.2/mission.md +5 -0
- package/data/project-types/ho/household-budget/versions/1.0.2/pages/dashboard/index.html +233 -0
- package/data/project-types/index.json +1 -1
- package/data/project-types/li/life-binder/manifest.json +1 -1
- package/data/project-types/li/life-binder/versions/1.0.2/about.md +7 -0
- package/data/project-types/li/life-binder/versions/1.0.2/documents.json +145 -0
- package/data/project-types/li/life-binder/versions/1.0.2/manifest.json +137 -0
- package/data/project-types/li/life-binder/versions/1.0.2/mission.md +6 -0
- package/data/project-types/li/life-binder/versions/1.0.2/pages/dashboard/index.html +147 -0
- package/data/project-types/raw-index.json +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"kind": "project-type",
|
|
4
4
|
"id": "life-binder",
|
|
5
5
|
"name": "Life Binder",
|
|
6
|
-
"description": "The \"in case of emergency\" file, actually complete. A gentle Archivaris (\"archivist\") tracks wills, policies, accounts, and instructions — what exists, where it lives, what's missing
|
|
6
|
+
"description": "The \"in case of emergency\" file, actually complete. A gentle Archivaris (\"archivist\") tracks wills, policies, accounts, and instructions — what exists, where it lives, what's missing.",
|
|
7
7
|
"tags": [
|
|
8
8
|
"estate",
|
|
9
9
|
"documents",
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
The binder {{household}} hopes never to need — complete, current, and findable.
|
|
2
|
+
Your Archivaris keeps the checklist: which documents exist, where the originals
|
|
3
|
+
live, which are missing, which are due a review. Contents are never stored;
|
|
4
|
+
locations are.
|
|
5
|
+
|
|
6
|
+
The **Output** tab shows the completeness picture at a glance. Start anywhere:
|
|
7
|
+
tell your Archivaris about one document you know exists.
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"stages": [
|
|
4
|
+
"missing",
|
|
5
|
+
"present"
|
|
6
|
+
],
|
|
7
|
+
"records": [
|
|
8
|
+
{
|
|
9
|
+
"id": "doc-1",
|
|
10
|
+
"status": "missing",
|
|
11
|
+
"fields": {
|
|
12
|
+
"name": "Will",
|
|
13
|
+
"note": "The signed original, and who holds copies."
|
|
14
|
+
},
|
|
15
|
+
"createdAt": "2026-07-18T00:00:00.000Z",
|
|
16
|
+
"updatedAt": "2026-07-18T00:00:00.000Z",
|
|
17
|
+
"history": [
|
|
18
|
+
{
|
|
19
|
+
"at": "2026-07-18T00:00:00.000Z",
|
|
20
|
+
"from": null,
|
|
21
|
+
"to": "missing"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "doc-2",
|
|
27
|
+
"status": "missing",
|
|
28
|
+
"fields": {
|
|
29
|
+
"name": "Medical directives",
|
|
30
|
+
"note": "Living will / healthcare proxy."
|
|
31
|
+
},
|
|
32
|
+
"createdAt": "2026-07-18T00:00:00.000Z",
|
|
33
|
+
"updatedAt": "2026-07-18T00:00:00.000Z",
|
|
34
|
+
"history": [
|
|
35
|
+
{
|
|
36
|
+
"at": "2026-07-18T00:00:00.000Z",
|
|
37
|
+
"from": null,
|
|
38
|
+
"to": "missing"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "doc-3",
|
|
44
|
+
"status": "missing",
|
|
45
|
+
"fields": {
|
|
46
|
+
"name": "Life insurance policy",
|
|
47
|
+
"note": "Provider, policy number, where the paperwork lives."
|
|
48
|
+
},
|
|
49
|
+
"createdAt": "2026-07-18T00:00:00.000Z",
|
|
50
|
+
"updatedAt": "2026-07-18T00:00:00.000Z",
|
|
51
|
+
"history": [
|
|
52
|
+
{
|
|
53
|
+
"at": "2026-07-18T00:00:00.000Z",
|
|
54
|
+
"from": null,
|
|
55
|
+
"to": "missing"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "doc-4",
|
|
61
|
+
"status": "missing",
|
|
62
|
+
"fields": {
|
|
63
|
+
"name": "Home or renters insurance",
|
|
64
|
+
"note": "Provider and policy number."
|
|
65
|
+
},
|
|
66
|
+
"createdAt": "2026-07-18T00:00:00.000Z",
|
|
67
|
+
"updatedAt": "2026-07-18T00:00:00.000Z",
|
|
68
|
+
"history": [
|
|
69
|
+
{
|
|
70
|
+
"at": "2026-07-18T00:00:00.000Z",
|
|
71
|
+
"from": null,
|
|
72
|
+
"to": "missing"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"id": "doc-5",
|
|
78
|
+
"status": "missing",
|
|
79
|
+
"fields": {
|
|
80
|
+
"name": "Accounts list",
|
|
81
|
+
"note": "Banks, retirement, investments — institutions only, no credentials."
|
|
82
|
+
},
|
|
83
|
+
"createdAt": "2026-07-18T00:00:00.000Z",
|
|
84
|
+
"updatedAt": "2026-07-18T00:00:00.000Z",
|
|
85
|
+
"history": [
|
|
86
|
+
{
|
|
87
|
+
"at": "2026-07-18T00:00:00.000Z",
|
|
88
|
+
"from": null,
|
|
89
|
+
"to": "missing"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "doc-6",
|
|
95
|
+
"status": "missing",
|
|
96
|
+
"fields": {
|
|
97
|
+
"name": "Passwords location",
|
|
98
|
+
"note": "Where the password manager or list lives, not the passwords."
|
|
99
|
+
},
|
|
100
|
+
"createdAt": "2026-07-18T00:00:00.000Z",
|
|
101
|
+
"updatedAt": "2026-07-18T00:00:00.000Z",
|
|
102
|
+
"history": [
|
|
103
|
+
{
|
|
104
|
+
"at": "2026-07-18T00:00:00.000Z",
|
|
105
|
+
"from": null,
|
|
106
|
+
"to": "missing"
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "doc-7",
|
|
112
|
+
"status": "missing",
|
|
113
|
+
"fields": {
|
|
114
|
+
"name": "Emergency contacts",
|
|
115
|
+
"note": "Who to call first: family, lawyer, doctor."
|
|
116
|
+
},
|
|
117
|
+
"createdAt": "2026-07-18T00:00:00.000Z",
|
|
118
|
+
"updatedAt": "2026-07-18T00:00:00.000Z",
|
|
119
|
+
"history": [
|
|
120
|
+
{
|
|
121
|
+
"at": "2026-07-18T00:00:00.000Z",
|
|
122
|
+
"from": null,
|
|
123
|
+
"to": "missing"
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"id": "doc-8",
|
|
129
|
+
"status": "missing",
|
|
130
|
+
"fields": {
|
|
131
|
+
"name": "Deeds and titles",
|
|
132
|
+
"note": "House, vehicles — where the originals live."
|
|
133
|
+
},
|
|
134
|
+
"createdAt": "2026-07-18T00:00:00.000Z",
|
|
135
|
+
"updatedAt": "2026-07-18T00:00:00.000Z",
|
|
136
|
+
"history": [
|
|
137
|
+
{
|
|
138
|
+
"at": "2026-07-18T00:00:00.000Z",
|
|
139
|
+
"from": null,
|
|
140
|
+
"to": "missing"
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"releasedAt": "2026-10-01T22:30:17Z",
|
|
5
|
+
"meesterManaged": false,
|
|
6
|
+
"params": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"household": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"title": "Who is this binder for?",
|
|
12
|
+
"description": "e.g. 'our family', 'Mom', 'me'.",
|
|
13
|
+
"default": "our family"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": [
|
|
17
|
+
"household"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"nameTemplate": "Life Binder",
|
|
21
|
+
"aboutTemplate": "about.md",
|
|
22
|
+
"missionTemplate": "mission.md",
|
|
23
|
+
"gezels": [
|
|
24
|
+
{
|
|
25
|
+
"templateId": "archivaris",
|
|
26
|
+
"voorman": true
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"tools": [
|
|
30
|
+
{
|
|
31
|
+
"name": "record_document",
|
|
32
|
+
"description": "Record that a document exists and where the original lives.",
|
|
33
|
+
"script": "binder-store",
|
|
34
|
+
"inputs": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"properties": {
|
|
37
|
+
"name": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"location": {
|
|
41
|
+
"type": "string"
|
|
42
|
+
},
|
|
43
|
+
"note": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"required": [
|
|
48
|
+
"name"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"bind": {
|
|
52
|
+
"action": "record_document"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "mark_missing",
|
|
57
|
+
"description": "Mark a checklist item as a known gap.",
|
|
58
|
+
"script": "binder-store",
|
|
59
|
+
"inputs": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"properties": {
|
|
62
|
+
"id": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
},
|
|
65
|
+
"name": {
|
|
66
|
+
"type": "string"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"bind": {
|
|
71
|
+
"action": "mark_missing"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "mark_reviewed",
|
|
76
|
+
"description": "Confirm a document was just reviewed and is current.",
|
|
77
|
+
"script": "binder-store",
|
|
78
|
+
"inputs": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"properties": {
|
|
81
|
+
"id": {
|
|
82
|
+
"type": "string"
|
|
83
|
+
},
|
|
84
|
+
"name": {
|
|
85
|
+
"type": "string"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"bind": {
|
|
90
|
+
"action": "mark_reviewed"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "binder_status",
|
|
95
|
+
"description": "The completeness picture: what's in place, missing, or due a review.",
|
|
96
|
+
"script": "binder-store",
|
|
97
|
+
"inputs": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"properties": {}
|
|
100
|
+
},
|
|
101
|
+
"bind": {
|
|
102
|
+
"action": "status"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "checklist",
|
|
107
|
+
"description": "Read the whole checklist with locations.",
|
|
108
|
+
"script": "binder-store",
|
|
109
|
+
"inputs": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"properties": {}
|
|
112
|
+
},
|
|
113
|
+
"bind": {
|
|
114
|
+
"action": "checklist"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"craftbooks": [
|
|
119
|
+
"annual-document-review"
|
|
120
|
+
],
|
|
121
|
+
"schedules": [],
|
|
122
|
+
"pages": {
|
|
123
|
+
"entry": "dashboard/index.html",
|
|
124
|
+
"reads": [
|
|
125
|
+
{
|
|
126
|
+
"source": "workspace",
|
|
127
|
+
"path": "documents.json"
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"workspaceSeed": [
|
|
132
|
+
"documents.json"
|
|
133
|
+
],
|
|
134
|
+
"scripts": {
|
|
135
|
+
"binder-store": "import { type InferredInput, defineScript, gezel } from '@bendyline/gezel-sdk';\nimport { rosterStore } from '@bendyline/gezel-sdk/stores';\n\nexport const meta = defineScript({\n name: 'binder-store',\n description:\n \"Read and update the life binder (documents.json). Call action:'status' for the completeness picture; 'record_document' when a document exists (name + where the original lives); 'mark_missing' / 'mark_reviewed' as reality changes; 'checklist' to read everything.\",\n inputs: {\n action: {\n type: 'string',\n description:\n \"One of 'status', 'record_document', 'mark_missing', 'mark_reviewed', or 'checklist'.\",\n required: true,\n },\n name: { type: 'string', description: \"Document name, e.g. 'Will', 'Home insurance policy'.\" },\n location: { type: 'string', description: 'Where the original lives (drawer, safe, provider).' },\n note: { type: 'string', description: 'Anything a trusted person should know about it.' },\n id: { type: 'string', description: \"Document id, e.g. 'doc-2'.\" },\n },\n outputs: {\n total: { type: 'number', description: 'Documents on the checklist.' },\n present: { type: 'number', description: 'Recorded as existing.' },\n missing: { type: 'number', description: 'Known gaps.' },\n stale: { type: 'number', description: 'Present but unreviewed for over a year.' },\n summary: { type: 'string', description: 'The completeness picture.' },\n },\n requires: ['workspace.read', 'workspace.write'],\n} as const);\n\nconst input = gezel.input as InferredInput<typeof meta>;\n\n// ── binder-rules-start ──\n// Pure derivations over rosterStore-shaped document records: statuses are\n// missing -> present; staleness is derived (present + unreviewed > 365d).\n\nvar YEAR_MS = 365 * 24 * 60 * 60 * 1000;\n\nfunction isStale(record, nowMs) {\n if (record.status !== 'present') return false;\n var reviewed = record.fields && typeof record.fields.reviewedAt === 'string'\n ? Date.parse(record.fields.reviewedAt)\n : Date.parse(record.updatedAt);\n return isFinite(reviewed) && nowMs - reviewed > YEAR_MS;\n}\n\nfunction binderShape(records, nowMs) {\n var present = 0;\n var missing = [];\n var stale = [];\n records.forEach(function (r) {\n if (r.status === 'present') {\n present += 1;\n if (isStale(r, nowMs)) stale.push(r);\n } else {\n missing.push(r);\n }\n });\n return { present: present, missing: missing, stale: stale };\n}\n\nfunction binderLine(records, nowMs) {\n var shape = binderShape(records, nowMs);\n var gaps = shape.missing\n .map(function (r) {\n return r.fields && r.fields.name ? r.fields.name : r.id;\n })\n .join(', ');\n var staleNames = shape.stale\n .map(function (r) {\n return r.fields && r.fields.name ? r.fields.name : r.id;\n })\n .join(', ');\n return (\n shape.present +\n ' of ' +\n records.length +\n ' in place' +\n (gaps ? '. Missing: ' + gaps : '. Nothing missing') +\n (staleNames ? '. Due a review: ' + staleNames + '.' : '.')\n );\n}\n// ── binder-rules-end ──\n\nconst binder = rosterStore(gezel.fs, 'documents.json', {\n stages: ['missing', 'present'],\n idPrefix: 'doc',\n});\n\nasync function resolveDoc(): Promise<string> {\n if (input.id) return input.id;\n if (input.name) {\n const wanted = input.name.toLowerCase();\n const matches = (await binder.list()).filter(\n (r) => String(r.fields.name ?? '').toLowerCase() === wanted,\n );\n if (matches.length === 1) return matches[0]!.id;\n }\n throw new Error(\"Pass 'id' (e.g. 'doc-2') or an exact document 'name'.\");\n}\n\nif (input.action === 'record_document') {\n if (!input.name) throw new Error(\"record_document needs 'name'.\");\n const existing = (await binder.list()).find(\n (r) => String(r.fields.name ?? '').toLowerCase() === input.name!.toLowerCase(),\n );\n if (existing) {\n await binder.update(existing.id, {\n fields: {\n ...(input.location ? { location: input.location } : {}),\n ...(input.note ? { note: input.note } : {}),\n reviewedAt: new Date().toISOString(),\n },\n });\n await binder.transition(existing.id, 'present');\n } else {\n await binder.add({\n status: 'present',\n fields: {\n name: input.name,\n ...(input.location ? { location: input.location } : {}),\n ...(input.note ? { note: input.note } : {}),\n reviewedAt: new Date().toISOString(),\n },\n });\n }\n} else if (input.action === 'mark_missing') {\n await binder.transition(await resolveDoc(), 'missing');\n} else if (input.action === 'mark_reviewed') {\n const id = await resolveDoc();\n await binder.update(id, { fields: { reviewedAt: new Date().toISOString() } });\n await binder.transition(id, 'present');\n} else if (input.action !== 'status' && input.action !== 'checklist') {\n throw new Error(\n `Unknown action '${input.action}'. Use status, record_document, mark_missing, mark_reviewed, or checklist.`,\n );\n}\n\nconst records = await binder.list();\nconst shape = binderShape(records, Date.now());\nconst listing =\n input.action === 'checklist'\n ? records\n .map(\n (r) =>\n `${r.id} [${r.status}${isStale(r, Date.now()) ? ', stale' : ''}] ${String(r.fields.name ?? '?')}${r.fields.location ? ` — ${String(r.fields.location)}` : ''}`,\n )\n .join('\\n') || 'The checklist is empty.'\n : '';\n\ngezel.output({\n total: records.length,\n present: shape.present,\n missing: shape.missing.length,\n stale: shape.stale.length,\n summary: listing || binderLine(records, Date.now()),\n});\n"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
- Every checklist item is either recorded (with where the original lives) or a
|
|
2
|
+
known, owned gap — nothing ambiguous.
|
|
3
|
+
- The one-page test holds: a trusted person could find what they need in five
|
|
4
|
+
minutes from what's recorded here.
|
|
5
|
+
- Anything unreviewed for a year gets flagged and re-confirmed.
|
|
6
|
+
- Document contents are never stored; locations and instructions are.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<meta name="gezel-demo" content="standalone" />
|
|
7
|
+
<title>Life binder</title>
|
|
8
|
+
<style>
|
|
9
|
+
:root {
|
|
10
|
+
color-scheme: light dark;
|
|
11
|
+
--bg: #faf7f2; --card: #fff; --ink: #2b2620; --muted: #7a7166;
|
|
12
|
+
--accent: #b5651d; --track: #ece5da; --good: #4a7c59; --warn: #a4552e;
|
|
13
|
+
}
|
|
14
|
+
@media (prefers-color-scheme: dark) {
|
|
15
|
+
:root {
|
|
16
|
+
--bg: #1c1a17; --card: #262320; --ink: #efe9e0; --muted: #a59a8c;
|
|
17
|
+
--accent: #e0894a; --track: #3a352f; --good: #7fae8d; --warn: #d98a63;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
* { box-sizing: border-box; }
|
|
21
|
+
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--ink); padding: 1.5rem 1.25rem; }
|
|
22
|
+
main { max-width: 620px; margin: 0 auto; }
|
|
23
|
+
h1 { font-family: Georgia, 'PT Serif', 'Times New Roman', serif; font-size: 1.35rem; font-weight: 600; margin: 0 0 0.15rem; }
|
|
24
|
+
.sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.9rem; }
|
|
25
|
+
.meter { background: var(--card); border: 1px solid var(--track); border-radius: 10px; padding: 0.85rem 1rem; margin-bottom: 0.75rem; }
|
|
26
|
+
.meter .line { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 0.4rem; }
|
|
27
|
+
.bar { background: var(--track); border-radius: 4px; height: 10px; overflow: hidden; }
|
|
28
|
+
.bar > span { display: block; height: 100%; background: var(--good); border-radius: 4px; transition: width 0.3s ease; }
|
|
29
|
+
.list { background: var(--card); border: 1px solid var(--track); border-radius: 10px; padding: 0.5rem 0; }
|
|
30
|
+
.row { display: grid; grid-template-columns: 1.4rem 1fr auto; gap: 0.6rem; align-items: baseline; padding: 0.45rem 1rem; font-size: 0.9rem; }
|
|
31
|
+
.row + .row { border-top: 1px solid var(--track); }
|
|
32
|
+
.mark { font-weight: 700; text-align: center; }
|
|
33
|
+
.row.present .mark { color: var(--good); }
|
|
34
|
+
.row.missing .mark { color: var(--warn); }
|
|
35
|
+
.row .where { color: var(--muted); font-size: 0.78rem; }
|
|
36
|
+
.chip { display: inline-block; border: 1px solid var(--warn); color: var(--warn); border-radius: 4px; padding: 0 0.3rem; font-size: 0.7rem; line-height: 1.4; }
|
|
37
|
+
.privacy { color: var(--muted); font-size: 0.78rem; text-align: center; margin-top: 0.75rem; }
|
|
38
|
+
+ .demo-banner {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: space-between;
|
|
42
|
+
gap: 0.75rem;
|
|
43
|
+
margin: 0 0 0.85rem;
|
|
44
|
+
padding: 0.5rem 0.65rem;
|
|
45
|
+
border: 1px solid var(--accent, #8a5a2b);
|
|
46
|
+
border-radius: 6px;
|
|
47
|
+
background: color-mix(in srgb, var(--card, var(--surface, #fffdf8)) 88%, var(--accent, #8a5a2b));
|
|
48
|
+
color: var(--ink, #2b2620);
|
|
49
|
+
font-size: 0.8rem;
|
|
50
|
+
}
|
|
51
|
+
.demo-banner[hidden] { display: none; }
|
|
52
|
+
.demo-banner strong { font-weight: 700; }
|
|
53
|
+
.demo-reset {
|
|
54
|
+
flex: none;
|
|
55
|
+
padding: 0.25rem 0.5rem;
|
|
56
|
+
border: 1px solid var(--accent, #8a5a2b);
|
|
57
|
+
border-radius: 6px;
|
|
58
|
+
background: var(--card, var(--surface, #fffdf8));
|
|
59
|
+
color: var(--ink, #2b2620);
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
font: inherit;
|
|
62
|
+
}
|
|
63
|
+
.demo-reset:hover { border-color: var(--ink, #2b2620); }
|
|
64
|
+
</style>
|
|
65
|
+
</head>
|
|
66
|
+
<body>
|
|
67
|
+
<main>
|
|
68
|
+
+ <div class="demo-banner" data-gezel-demo-banner hidden>
|
|
69
|
+
<span><strong>Demo mode</strong> — sample data stays in this page.</span>
|
|
70
|
+
<button type="button" class="demo-reset" onclick="location.reload()">Reset demo</button>
|
|
71
|
+
</div>
|
|
72
|
+
<h1>Life binder</h1>
|
|
73
|
+
<p class="sub" id="sub">Loading the checklist…</p>
|
|
74
|
+
<div class="meter">
|
|
75
|
+
<div class="line"><span id="m-label">—</span><span id="m-count">—</span></div>
|
|
76
|
+
<div class="bar"><span id="m-bar" style="width: 0%"></span></div>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="list" id="list"></div>
|
|
79
|
+
<p class="privacy">Locations, never contents.</p>
|
|
80
|
+
</main>
|
|
81
|
+
<script>
|
|
82
|
+
(function () {
|
|
83
|
+
'use strict';
|
|
84
|
+
var parts = location.pathname.split('/').filter(Boolean);
|
|
85
|
+
var typeIdx = parts.indexOf('type');
|
|
86
|
+
var capability = typeIdx > 0 ? parts[typeIdx - 1] : null;
|
|
87
|
+
var projectId = typeIdx >= 0 ? parts[typeIdx + 1] : null;
|
|
88
|
+
var failedPolls = 0;
|
|
89
|
+
var YEAR = 365 * 24 * 60 * 60 * 1000;
|
|
90
|
+
var demoMode = !capability || !projectId;
|
|
91
|
+
var demoBinder = { records: [
|
|
92
|
+
{ id: 'doc-1', status: 'present', updatedAt: new Date(Date.now() - 40 * 86400000).toISOString(), fields: { name: 'Will', location: 'Blue fire box', reviewedAt: new Date(Date.now() - 40 * 86400000).toISOString() } },
|
|
93
|
+
{ id: 'doc-2', status: 'present', updatedAt: new Date(Date.now() - 420 * 86400000).toISOString(), fields: { name: 'Home insurance', location: 'Blue fire box', reviewedAt: new Date(Date.now() - 420 * 86400000).toISOString() } },
|
|
94
|
+
{ id: 'doc-3', status: 'missing', updatedAt: new Date().toISOString(), fields: { name: 'Emergency contacts' } },
|
|
95
|
+
{ id: 'doc-4', status: 'present', updatedAt: new Date(Date.now() - 20 * 86400000).toISOString(), fields: { name: 'Passport copies', location: 'Travel folder' } },
|
|
96
|
+
{ id: 'doc-5', status: 'missing', updatedAt: new Date().toISOString(), fields: { name: 'Pet care instructions' } },
|
|
97
|
+
] };
|
|
98
|
+
if (demoMode) document.querySelector('[data-gezel-demo-banner]').hidden = false;
|
|
99
|
+
|
|
100
|
+
function esc(s) { return String(s).replace(/[&<>"]/g, function (c) { return { '&': '&', '<': '<', '>': '>', '"': '"' }[c]; }); }
|
|
101
|
+
|
|
102
|
+
function render(binder) {
|
|
103
|
+
var records = Array.isArray(binder.records) ? binder.records : [];
|
|
104
|
+
var present = records.filter(function (r) { return r.status === 'present'; });
|
|
105
|
+
var now = Date.now();
|
|
106
|
+
document.getElementById('sub').textContent =
|
|
107
|
+
present.length === records.length && records.length > 0
|
|
108
|
+
? 'Everything in place. Well done.'
|
|
109
|
+
: (records.length - present.length) + ' gap(s) to close.';
|
|
110
|
+
document.getElementById('m-label').textContent = 'In place';
|
|
111
|
+
document.getElementById('m-count').textContent = present.length + ' of ' + records.length;
|
|
112
|
+
document.getElementById('m-bar').style.width =
|
|
113
|
+
(records.length ? Math.round((present.length / records.length) * 100) : 0) + '%';
|
|
114
|
+
|
|
115
|
+
document.getElementById('list').innerHTML = records
|
|
116
|
+
.slice()
|
|
117
|
+
.sort(function (a, b) { return a.status === b.status ? 0 : a.status === 'missing' ? -1 : 1; })
|
|
118
|
+
.map(function (r) {
|
|
119
|
+
var f = r.fields || {};
|
|
120
|
+
var reviewed = typeof f.reviewedAt === 'string' ? Date.parse(f.reviewedAt) : Date.parse(r.updatedAt);
|
|
121
|
+
var stale = r.status === 'present' && isFinite(reviewed) && now - reviewed > YEAR;
|
|
122
|
+
return (
|
|
123
|
+
'<div class="row ' + r.status + '"><span class="mark">' + (r.status === 'present' ? '+' : '-') + '</span>' +
|
|
124
|
+
'<span>' + esc(f.name || r.id) +
|
|
125
|
+
(f.location ? '<span class="where"> — ' + esc(f.location) + '</span>' : '') + '</span>' +
|
|
126
|
+
'<span>' + (stale ? '<span class="chip">review due</span>' : '') + '</span></div>'
|
|
127
|
+
);
|
|
128
|
+
})
|
|
129
|
+
.join('');
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function poll() {
|
|
133
|
+
if (demoMode) { render(demoBinder); return Promise.resolve(); }
|
|
134
|
+
if (!capability || !projectId) return Promise.resolve();
|
|
135
|
+
return fetch('/preview/' + encodeURIComponent(capability) + '/workspace/' + encodeURIComponent(projectId) + '/documents.json', { cache: 'no-store' })
|
|
136
|
+
.then(function (r) { if (!r.ok) throw new Error('poll ' + r.status); return r.json(); })
|
|
137
|
+
.then(function (next) { failedPolls = 0; render(next); })
|
|
138
|
+
.catch(function () {
|
|
139
|
+
failedPolls += 1;
|
|
140
|
+
if (failedPolls === 3 && window.parent !== window) window.parent.postMessage({ __gezelPageRefresh: true }, '*');
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
poll().then(function () { setInterval(function () { void poll(); }, 6000); });
|
|
144
|
+
})();
|
|
145
|
+
</script>
|
|
146
|
+
</body>
|
|
147
|
+
</html>
|