@homie-rocks/studio 0.57.0 → 0.58.0

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +24 -3
  2. package/docs/toolkit-place-patterns.md +16 -0
  3. package/lib/template-history.json +42 -0
  4. package/package.json +1 -1
  5. package/parts/README.md +28 -0
  6. package/parts/catalogue.json +236 -0
  7. package/parts/owner-action-checklist/LICENSE +202 -0
  8. package/parts/owner-action-checklist/NOTICE +3 -0
  9. package/parts/owner-action-checklist/README.md +68 -0
  10. package/parts/owner-action-checklist/part.json +95 -0
  11. package/parts/owner-action-checklist/preview/index.html +16 -0
  12. package/parts/owner-action-checklist/src/handler.mjs +44 -0
  13. package/parts/owner-action-checklist/src/index.mjs +96 -0
  14. package/parts/owner-action-checklist/src/style.css +3 -0
  15. package/parts/owner-action-checklist/tuning.json +3 -0
  16. package/parts/terrain-route-map/LICENSE +202 -0
  17. package/parts/terrain-route-map/NOTICE +3 -0
  18. package/parts/terrain-route-map/README.md +67 -0
  19. package/parts/terrain-route-map/THIRD-PARTY-LICENSE +21 -0
  20. package/parts/terrain-route-map/part.json +133 -0
  21. package/parts/terrain-route-map/preview/demo.js +4127 -0
  22. package/parts/terrain-route-map/preview/heightmap.png +0 -0
  23. package/parts/terrain-route-map/preview/index.html +1 -0
  24. package/parts/terrain-route-map/preview/main.mjs +4 -0
  25. package/parts/terrain-route-map/preview/route.json +1 -0
  26. package/parts/terrain-route-map/src/data.mjs +81 -0
  27. package/parts/terrain-route-map/src/index.mjs +131 -0
  28. package/parts/terrain-route-map/src/style.css +3 -0
  29. package/parts/terrain-route-map/tuning.json +5 -0
  30. package/tools/tools.ts +1 -1
  31. package/worker/booking-calendar.mjs +15 -2
  32. package/worker/build-id.mjs +1 -1
  33. package/worker/version.mjs +1 -1
package/CHANGELOG.md CHANGED
@@ -19,13 +19,34 @@ file) and what the upgrade would change, and changes nothing until you agree.
19
19
 
20
20
  ## [Unreleased]
21
21
 
22
+ ## [0.58.0] - 2026-10-16
23
+
24
+ **Plugin 0.58.0**
25
+
26
+ Two new shared parts — an owner action checklist and a 3D terrain route map — and booking calendars that can skip or change single dates in a weekly series.
27
+
28
+ ### Added
29
+
30
+ - Two Apache-2.0 shared building blocks: an owner action checklist with visible consequences, one-tap confirmation, server-authorized undo and existing studio role/origin checks; and a three.js terrain route map with a local heightmap coastline, route tube, markers and phone/TV camera controls. Both include standard part manifests, catalogue entries, AI integration docs, self-contained previews and fast logic checks. No tile service is required.
31
+ - Weekly booking calendars can omit individual dates or override an occurrence's time, capacity and duration. Occurrence IDs stay stable when a start time changes; undefined overrides, off-series or invalid dates and ambiguous DST times are refused, and a date that already has reservations cannot be silently removed.
32
+
33
+ ### Changed
34
+
35
+ - Shared terrain map: smooth high-resolution coast, lit terrain with cavity shading, animated depth-coloured water and foam, sky/haze, flowing elevated route, collision-aware leader labels, intro camera and measured-frame lite fallback. Owner checklist distinguishes pending, confirming, done and undone, announces actual consequences, labels irreversible actions and restores fresh pending actions after undo.
36
+
22
37
  ### Fixed
23
38
 
24
- - The MCP Events workerd conformance test now parses SSE frames across HTTP chunks, including combined event/heartbeat frames and split UTF-8. Its former one-chunk-per-event assumption caused the intermittent 0.57.0 publish-gate JSON parse failure; production delivery and webhook formats are unchanged. PR CI adds a path-filtered Events/webhook gate covering protocol, push, durable delivery and signed studio events.
39
+ - Public checklist proposals require per-action staff authorization, validate tokens, retain retry keys and use separate expiring undo grants. Terrain heightmaps restrict origins and PNG types and enforce byte/dimension budgets before decoding.
40
+ - The MCP Events workerd conformance test parses SSE frames across HTTP chunks, including combined event/heartbeat frames and split UTF-8 (the intermittent 0.57.0 publish-gate failure); production delivery and webhook formats are unchanged. PR CI adds a path-filtered Events/webhook gate.
41
+ - CI Chrome launches keep each caller's protocol timeout.
42
+
43
+ ### Upgrade notes
44
+
45
+ - No migration and nothing to change. Studios use the new parts by asking their AI to add them from the catalogue; existing weekly calendars keep working, and dated exceptions are optional (see "Weekly calendar exceptions" in `packages/studio/docs/toolkit-place-patterns.md`).
25
46
 
26
47
  ## [0.57.0] - 2026-10-16
27
48
 
28
- **Plugin 0.57.0**
49
+ **Plugin 0.57.0** · [release-2026-10-16-studio-0.57.0](https://github.com/homie-rocks/homie/releases/tag/release-2026-10-16-studio-0.57.0)
29
50
 
30
51
  Studios can book at each other on behalf of a person, with proven studio identity and signed events, and friends joining a browser-hosted game at the same moment always get their seat.
31
52
 
@@ -52,7 +73,7 @@ Studios can book at each other on behalf of a person, with proven studio identit
52
73
 
53
74
  ## [0.56.0] - 2026-10-15
54
75
 
55
- **Plugin 0.56.0**
76
+ **Plugin 0.56.0** · [release-2026-10-15-studio-0.56.0](https://github.com/homie-rocks/homie/releases/tag/release-2026-10-15-studio-0.56.0)
56
77
 
57
78
  Studios scale with hibernating rooms, add custom routes with built-in access checks, and deploy reliably with background queue handlers.
58
79
 
@@ -66,3 +66,19 @@ Tokens are bound to this origin, limited to the exact named tools, expire after
66
66
  ## Deployment
67
67
 
68
68
  Cloudflare's official MCP request interface cannot authorize new static-asset uploads with an upload JWT; deploy with Wrangler, Cloudflare's own CLI using browser OAuth.
69
+
70
+ ## Weekly calendar exceptions
71
+
72
+ `calendarSlots` (also exposed by `ctx.bookings.calendar`) accepts `exceptions`,
73
+ keyed by local `YYYY-MM-DD`. Use `null` to omit a holiday or an object containing
74
+ `time`, `capacity` and/or `durationMinutes` to override that occurrence. Dates
75
+ must belong to the declared range and weekdays. The occurrence ID remains based
76
+ on the original series time when an exception changes its start time. DST gaps
77
+ and ambiguous times refuse rather than silently changing the booking. Publishing
78
+ new calendar data does not itself move existing reservations or change payments.
79
+
80
+ A `durationMinutes` exception replaces the series `days` duration for that date.
81
+ Explicit `undefined` override values are invalid. Removing a published slot with
82
+ active reservations is refused by the database (`slot has active bookings`).
83
+ Release or cancel those reservations through the payment-aware booking flow before
84
+ deleting the slot; omitting a generated date alone does not delete a published row.
@@ -4134,6 +4134,48 @@
4134
4134
  }
4135
4135
  }
4136
4136
  }
4137
+ },
4138
+ "0.58.0": {
4139
+ "files": {
4140
+ "CLAUDE.md": "ddf2b2a0376202f6",
4141
+ "README.md": "684b3cca8001673c",
4142
+ "HANDOFF.md": "29337e2ace95b2e7",
4143
+ "games/README.md": "5ad32fe80c61f117",
4144
+ "music/README.md": "a3dc042dadd39df8",
4145
+ "videos/README.md": "16babc3437d5545b",
4146
+ "posts/README.md": "37841aae476bd540",
4147
+ "site/README.md": "1dbdf22c03a1e505",
4148
+ "site/src/worker.mjs": "6cc5c6131eaf6fd0"
4149
+ },
4150
+ "sections": {
4151
+ "AGENTS.md": {
4152
+ "(intro)": "af7f2f732505d379",
4153
+ "## Version-matched authoring guides": "f6261a0e5801b96b",
4154
+ "## Layout": "f3a280b8c96cd068",
4155
+ "## Apps: one screen, roles and parts": "c10aa0441ea89702",
4156
+ "## Commands (all through the pinned CLI in node_modules)": "c20d90de21cde0c7",
4157
+ "## The site": "0cb8dd9a6f8a0096",
4158
+ "## Making games": "bb715272fd1a615b",
4159
+ "## The Game Codex and progress": "0738ef719cef3a4c",
4160
+ "## Art direction and models": "a48fff7bf0a5f2fc",
4161
+ "## Running live games (the back office)": "51ebf2ab756f6e4d",
4162
+ "## Servers and AI seats": "1ccfd549d2369a60",
4163
+ "## Selling things (the shop)": "0df5a5fe1833c624",
4164
+ "## Continuing a build from the Claude app": "0d68081e924ca419",
4165
+ "## Rules": "b2234d80f6cbe71d",
4166
+ "## Telling Homie": "80b46fdd9e578db8",
4167
+ "## Beta": "9d02638207a26e73"
4168
+ }
4169
+ },
4170
+ "named": {
4171
+ "Homie Arcade": {
4172
+ "sections": {
4173
+ "AGENTS.md": {
4174
+ "## Commands (all through the pinned CLI in node_modules)": "8364e05cebefcba4"
4175
+ }
4176
+ }
4177
+ }
4178
+ }
4137
4179
  }
4138
4180
  }
4139
4181
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homie-rocks/studio",
3
- "version": "0.57.0",
3
+ "version": "0.58.0",
4
4
  "description": "A studio for games, music and video on its own Cloudflare: scaffold, multiplayer starters on the netplay contract, a port toolkit that makes existing single-player web games multiplayer, the site Worker with public rooms (Table/Lobby Durable Objects and D1, all on the free Workers plan, no payment method), a site with the hub's sections (Home, Games, Music, Videos, Rooms, Posts with feeds) in the studio's own look, an epic landing page for every game, big songs and videos in the studio's own R2 once it has storage (uploaded, checked by SHA-256, served at the same addresses), deploy, and the homie.rocks directory.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -0,0 +1,28 @@
1
+ # Toolkit parts catalogue
2
+
3
+ These are reusable files, not new npm packages or complete apps. The catalogue entries
4
+ are the standard `part.json` records, also collected in `catalogue.json` for local browsing.
5
+
6
+ | Part | What it supplies | Source | Licence |
7
+ | --- | --- | --- | --- |
8
+ | [Owner action checklist](owner-action-checklist/README.md) | Consequence-first owner/staff action UI, server integration boundary, optional undo | Owner action checklist / Homie toolkit | Apache-2.0 |
9
+ | [Terrain route map](terrain-route-map/README.md) | Local heightmap coast, draped route, markers and phone/TV camera controls | Terrain route map / Homie toolkit | Apache-2.0 (three.js MIT) |
10
+
11
+ Each folder includes its licence, attribution, AI integration contract, tunables and small
12
+ working preview. Ryan Campbell authored both. To preview locally, serve this directory with
13
+ a static HTTP server, then open `<id>/preview/index.html`.
14
+
15
+ These public source parts are explicitly shared in their manifests. This checkout is not
16
+ a deployed studio and does not invent a catalogue host or claim a live directory listing.
17
+ To distribute from a studio, retain the original provenance/credit, place these original
18
+ source folders under that studio's `parts/`, run the existing `parts share` checks/packing,
19
+ and deploy. The standard well-known catalogue then advertises exact immutable releases;
20
+ consuming studios use `parts_find` / `part_add`, never copy another studio's release by hand.
21
+ Follow [PARTS.md](PARTS.md) for hashes, licence checks, packing and delivery. Do not serve
22
+ unpacked source as an immutable release. Later changes to a shared release need a new part
23
+ version. These initial parts are 1.0.0; no toolkit version is changed.
24
+
25
+ Maintainers: `node scripts/build-shared-parts.mjs` builds the local map preview and rewrites
26
+ hashes with `writeHashes`. `node --test packages/studio/test/shared-parts.test.mjs` checks
27
+ logic, licences and real pack/catalogue/integrity paths. Run
28
+ `node scripts/check-shared-parts.mjs` for one short browser check and 4× CPU measurements.
@@ -0,0 +1,236 @@
1
+ {
2
+ "v": 1,
3
+ "studio": {
4
+ "name": "Homie toolkit"
5
+ },
6
+ "parts": [
7
+ {
8
+ "id": "owner-action-checklist",
9
+ "name": "Owner action checklist",
10
+ "kind": "ui",
11
+ "version": "1.0.0",
12
+ "summary": "Consequence-first pending owner actions with one-tap confirmation and server-authorized undo.",
13
+ "license": "Apache-2.0",
14
+ "attribution": "Ryan Campbell — Homie toolkit",
15
+ "share": true,
16
+ "tags": [
17
+ "owner",
18
+ "staff",
19
+ "checklist",
20
+ "approval",
21
+ "tools"
22
+ ],
23
+ "uses": [
24
+ "app",
25
+ "game"
26
+ ],
27
+ "entry": "src/index.mjs",
28
+ "files": [
29
+ {
30
+ "path": "LICENSE",
31
+ "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30",
32
+ "bytes": 11358
33
+ },
34
+ {
35
+ "path": "NOTICE",
36
+ "sha256": "99ef9d6d5ea52f701ed623a7181c87ceaa0d1c9e047d20fa396de2ed3b42704e",
37
+ "bytes": 90
38
+ },
39
+ {
40
+ "path": "README.md",
41
+ "sha256": "b9f452ce67c4641c00312486fc12645307d6c6f646d275fddab8d25573feacb0",
42
+ "bytes": 4888
43
+ },
44
+ {
45
+ "path": "preview/index.html",
46
+ "sha256": "54fd85f24a923ac0a402d833204f645cfc295fd26d23722cb17ab0c761a66fad",
47
+ "bytes": 2346
48
+ },
49
+ {
50
+ "path": "src/handler.mjs",
51
+ "sha256": "b849b4effb3dc4b1e53d1c9ec32592c7fdff1d987eeefe5ff90483f56a14a458",
52
+ "bytes": 3243
53
+ },
54
+ {
55
+ "path": "src/index.mjs",
56
+ "sha256": "68da98e40ced789d8c76ce3e9e2d381fb7dc0b61cbac6fb126c967d0f27053aa",
57
+ "bytes": 6348
58
+ },
59
+ {
60
+ "path": "src/style.css",
61
+ "sha256": "d6497f8f01bbc72663a45577ecb9d78797e8d978fd3dff11c23f8b12c40b6f1b",
62
+ "bytes": 1336
63
+ },
64
+ {
65
+ "path": "tuning.json",
66
+ "sha256": "255d3ba827e3244527bf4dc81eccabaa94f03830b6bd7053ed518e0683959c91",
67
+ "bytes": 26
68
+ }
69
+ ],
70
+ "preview": {
71
+ "page": "preview/index.html",
72
+ "aspect": "4:3",
73
+ "phoneAspect": "2:3"
74
+ },
75
+ "requires": {
76
+ "packages": {
77
+ "@homie-rocks/studio": "^0.57.0"
78
+ }
79
+ },
80
+ "cost": {
81
+ "bytes": 29635
82
+ },
83
+ "provenance": {
84
+ "source": "original",
85
+ "notes": "Original code and example data authored for the Homie toolkit."
86
+ },
87
+ "contract": {
88
+ "inputs": {
89
+ "items": "See README; revisioned server-owned proposals"
90
+ },
91
+ "state": {
92
+ "authority": "Studio tools own mutations; UI is local"
93
+ },
94
+ "netplay": "local"
95
+ },
96
+ "from": {
97
+ "kind": "app",
98
+ "id": "owner-action-checklist",
99
+ "studio": "Homie toolkit"
100
+ }
101
+ },
102
+ {
103
+ "id": "terrain-route-map",
104
+ "name": "Terrain route map",
105
+ "kind": "environment",
106
+ "version": "1.0.0",
107
+ "summary": "Local heightmap coastline with a draped route tube, markers and touch or TV camera controls.",
108
+ "license": "Apache-2.0",
109
+ "attribution": "Ryan Campbell — Homie toolkit",
110
+ "share": true,
111
+ "tags": [
112
+ "terrain",
113
+ "map",
114
+ "route",
115
+ "heightmap",
116
+ "three",
117
+ "camera"
118
+ ],
119
+ "uses": [
120
+ "app",
121
+ "game"
122
+ ],
123
+ "files": [
124
+ {
125
+ "path": "LICENSE",
126
+ "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30",
127
+ "bytes": 11358
128
+ },
129
+ {
130
+ "path": "NOTICE",
131
+ "sha256": "5f149927ffe3253d38a25acfb7f1a02bd00c4b4a5b36b5e468b0e0b22f9319be",
132
+ "bytes": 85
133
+ },
134
+ {
135
+ "path": "README.md",
136
+ "sha256": "2cddd8172fafb31f126e2d7930a90376797cc169d8f5bcf33efc859ad290c8a4",
137
+ "bytes": 4628
138
+ },
139
+ {
140
+ "path": "THIRD-PARTY-LICENSE",
141
+ "sha256": "8b378ebe60e2fe500158cb0ac71cb5e8b7d92953c2abcc63a0eb90499653b5bc",
142
+ "bytes": 1081,
143
+ "rights": {
144
+ "license": "MIT"
145
+ }
146
+ },
147
+ {
148
+ "path": "preview/demo.js",
149
+ "sha256": "8f0c03e5e84e8eda9175c891afe889a0e86bb8241f0fa58ae67da963a5470544",
150
+ "bytes": 580288,
151
+ "rights": {
152
+ "license": "Apache-2.0 AND MIT"
153
+ }
154
+ },
155
+ {
156
+ "path": "preview/heightmap.png",
157
+ "sha256": "35791172bf7ec80a607e700c1191727383b7158dedc2d02667c5f1fa8da924e1",
158
+ "bytes": 52522
159
+ },
160
+ {
161
+ "path": "preview/index.html",
162
+ "sha256": "9d5ffa3179a2fe2ebc7a1f146fee1a02f2e0fcfe5186512bfdfb9ccccde1b6a5",
163
+ "bytes": 985
164
+ },
165
+ {
166
+ "path": "preview/main.mjs",
167
+ "sha256": "36b7799ed3b0c1dc95aa8ee452638b5ebaf303118421785ee333fb5078f12c44",
168
+ "bytes": 386
169
+ },
170
+ {
171
+ "path": "preview/route.json",
172
+ "sha256": "d505766350b5556c386abb05076d142bf825099c2a2d46135db2a81a4d0a770e",
173
+ "bytes": 321
174
+ },
175
+ {
176
+ "path": "src/data.mjs",
177
+ "sha256": "740608c324ccbe7a75d2d61831f5d266e6c5def7508f03f8c3013508d8c8658c",
178
+ "bytes": 5470
179
+ },
180
+ {
181
+ "path": "src/index.mjs",
182
+ "sha256": "5a17552670519c28a818e6ffa849da930f785f9599af7de75342b43207452ef1",
183
+ "bytes": 13814
184
+ },
185
+ {
186
+ "path": "src/style.css",
187
+ "sha256": "7354c997deec0933674a759e7f1e8027f7126eb59db5166ded82771d25acf7b1",
188
+ "bytes": 1580
189
+ },
190
+ {
191
+ "path": "tuning.json",
192
+ "sha256": "ab68f2f4b6cc5ac13d58519ac0ad6932f88402dc203d90af04313fb72b8452a7",
193
+ "bytes": 64
194
+ }
195
+ ],
196
+ "preview": {
197
+ "page": "preview/index.html",
198
+ "aspect": "4:3",
199
+ "phoneAspect": "2:3"
200
+ },
201
+ "requires": {
202
+ "packages": {
203
+ "three": "0.185.1"
204
+ }
205
+ },
206
+ "physical": {
207
+ "units": "metres",
208
+ "scale": 1,
209
+ "pivot": "origin",
210
+ "collision": null
211
+ },
212
+ "cost": {
213
+ "bytes": 672582
214
+ },
215
+ "provenance": {
216
+ "source": "original",
217
+ "notes": "Original code and example data authored for the Homie toolkit."
218
+ },
219
+ "entry": "src/index.mjs",
220
+ "contract": {
221
+ "inputs": {
222
+ "data": "See README; local LineString, bounds and PNG heightmap"
223
+ },
224
+ "state": {
225
+ "camera": "local"
226
+ },
227
+ "netplay": "local"
228
+ },
229
+ "from": {
230
+ "kind": "app",
231
+ "id": "terrain-route-map",
232
+ "studio": "Homie toolkit"
233
+ }
234
+ }
235
+ ]
236
+ }
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,3 @@
1
+ Owner action checklist
2
+ Copyright 2026 Ryan Campbell <ryan@ryancampbell.com>
3
+ Homie toolkit
@@ -0,0 +1,68 @@
1
+ # Owner action checklist
2
+
3
+ A phone-first, one-tap confirmation surface for a studio's own pending tools: bookings,
4
+ refunds, requests and publication. Consequences are always visible before confirmation.
5
+ The UI is a reusable component, not an approval system or a source of authorization.
6
+
7
+ ## For the AI integrating this part
8
+
9
+ Import `mountChecklist` from `@parts/owner-action-checklist` and include `src/style.css`.
10
+ Mount in an element owned by the app. Supply async `list()` and `execute(input)` callbacks;
11
+ `ready` resolves after initial loading, `refresh()` reloads, `dispose()` removes the UI.
12
+ Use your app's authenticated same-origin endpoint. Do not put credentials in a preview.
13
+ The CSS accepts `--checklist-ink`, `--checklist-card`, `--checklist-accent`.
14
+
15
+ Each item has unique string `id`, opaque string `revision`, `title`, `consequence` and
16
+ `confirmLabel`, and optional boolean `irreversible`. State the exact effect, amount/currency, recipient, visibility and
17
+ irreversibility where applicable. All labels render as text, never HTML. Limit: 100 items.
18
+
19
+ `execute` receives `{id, revision, operation: 'confirm'|'undo', key, token?}`.
20
+ A successful durable commit returns `{ok:true, message, undoToken?, undoRevision?, undoExpiresAt?}`. `message` describes
21
+ what actually happened (past tense); it appears after “Done —”. `irreversible: true`
22
+ always labels the consequence before confirmation and suppresses undo even if a token arrives.
23
+ The visible states are Pending → Confirming → Done → Undone. During execution, the button
24
+ is disabled and live status announces progress. After undo, return `{ok:true,message,pendingItem}`
25
+ with a complete freshly revisioned proposal to re-enable confirmation. Without `pendingItem`,
26
+ the disabled button says “Undone”. The undo message should name the restored state, e.g.
27
+ “Saturday’s booking is back to pending.” Never return a pending proposal before restoration commits. Return an undo token
28
+ only for an operation your server can reverse; never show a refund as reversible. A token
29
+ must be bound to the authenticated actor, original action and deadline on the server.
30
+ Undo uses a distinct revision and an absolute millisecond deadline; the UI hides it at expiry.
31
+ The UI disables duplicate taps. Refresh reconciles an uncertain failure; if the server
32
+ still lists that proposal revision, a manual retry reuses its original idempotency key
33
+ for the lifetime of the mounted component. The server must deduplicate by proposal revision
34
+ as well as key across remounts and clients. Do not automatically retry a financial/publication mutation.
35
+
36
+ ### Worker integration
37
+
38
+ Import `createChecklistHandler` from the part's `src/handler.mjs`. Mount it at an exact
39
+ route in the studio Worker, supplying `{app:'your-app', list, load, act}`. It calls the existing
40
+ `isOwner(request,env)`, `hasRole(request,env,app,'staff')`, and `requireSameOrigin(request)`
41
+ from `@homie-rocks/studio/worker`. POST is checked for same-origin evidence before roles;
42
+ responses are not cached. No new roles, sessions, cross-origin bypass or tool router.
43
+
44
+ `list({request,env,owner,staff})` must filter to the actor's allowed proposals.
45
+ `load(context,id)` must return the server-owned proposal (including completed proposals
46
+ needed for retry lookup), or null. The handler permits staff only when that specific
47
+ proposal has `allowStaff: true`; otherwise only owners may act. Undo requires a stored
48
+ `undo: {token, revision, expiresAt, used:false}` grant, whose revision differs from the
49
+ confirm revision. The server sets the deadline from the proposal's undo window at commit;
50
+ never accept a client deadline. Tokens are 1–1000 URL-safe characters (letters, digits,
51
+ `._~-`). Return the grant as `undoToken`, `undoRevision`, `undoExpiresAt` to the UI.
52
+ `act(context,input)` MUST reload the server-owned proposal and check its action-specific
53
+ permission (staff membership does not grant refunds or publishing), compare revision,
54
+ consume the proposal and persist the result/idempotency key atomically in the studio's
55
+ existing durable store. Use a provider idempotency key for external side effects. Return
56
+ prior results on repeated keys, reject stale revisions and expired/used undo tokens,
57
+ and reconcile unknown provider outcomes before issuing a replacement revision. Never
58
+ execute a client-supplied tool name, arguments, price or consequence. The adapter owns
59
+ these domain guarantees: the component cannot make separate provider/database commits atomic.
60
+
61
+ The `auth` override exists for tests; production should use the default helpers.
62
+ The preview uses in-memory fake results, clearly labelled, with no network mutations.
63
+
64
+ ## Built from / rights
65
+
66
+ Original reusable UI from **Owner action checklist**, Homie toolkit; Ryan Campbell.
67
+ No third-party parts. Worker authorization uses `@homie-rocks/studio`.
68
+ Apache-2.0; preserve LICENSE and NOTICE and the part attribution.