@shivaedev/work-board 0.7.2 → 0.8.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 (198) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +93 -2
  3. package/assets/agent.js +37 -0
  4. package/assets/native.js +32 -25
  5. package/dist/board.d.ts +1 -0
  6. package/dist/board.d.ts.map +1 -1
  7. package/dist/board.js +15 -2
  8. package/dist/board.js.map +1 -1
  9. package/dist/browser/client.d.ts +19 -79
  10. package/dist/browser/client.d.ts.map +1 -1
  11. package/dist/browser/client.js +12 -1
  12. package/dist/browser/client.js.map +1 -1
  13. package/dist/browser/entry.d.ts +3 -0
  14. package/dist/browser/entry.d.ts.map +1 -0
  15. package/dist/browser/entry.js +7 -0
  16. package/dist/browser/entry.js.map +1 -0
  17. package/dist/browser/responses/draftSession.d.ts +8 -0
  18. package/dist/browser/responses/draftSession.d.ts.map +1 -0
  19. package/dist/browser/responses/draftSession.js +92 -0
  20. package/dist/browser/responses/draftSession.js.map +1 -0
  21. package/dist/browser/responses/drafts.d.ts +16 -0
  22. package/dist/browser/responses/drafts.d.ts.map +1 -0
  23. package/dist/browser/responses/drafts.js +49 -0
  24. package/dist/browser/responses/drafts.js.map +1 -0
  25. package/dist/browser/responses/preview.d.ts +3 -0
  26. package/dist/browser/responses/preview.d.ts.map +1 -0
  27. package/dist/browser/responses/preview.js +4 -0
  28. package/dist/browser/responses/preview.js.map +1 -0
  29. package/dist/browser/responses/schema.d.ts +127 -0
  30. package/dist/browser/responses/schema.d.ts.map +1 -0
  31. package/dist/browser/responses/schema.js +47 -0
  32. package/dist/browser/responses/schema.js.map +1 -0
  33. package/dist/browser/responses/setup.d.ts +2 -0
  34. package/dist/browser/responses/setup.d.ts.map +1 -0
  35. package/dist/browser/responses/setup.js +99 -0
  36. package/dist/browser/responses/setup.js.map +1 -0
  37. package/dist/browser/responses/submit.d.ts +4 -0
  38. package/dist/browser/responses/submit.d.ts.map +1 -0
  39. package/dist/browser/responses/submit.js +36 -0
  40. package/dist/browser/responses/submit.js.map +1 -0
  41. package/dist/browser/session.d.ts +1 -79
  42. package/dist/browser/session.d.ts.map +1 -1
  43. package/dist/cli.d.ts.map +1 -1
  44. package/dist/cli.js +24 -15
  45. package/dist/cli.js.map +1 -1
  46. package/dist/files/changes.d.ts +1 -0
  47. package/dist/files/changes.d.ts.map +1 -1
  48. package/dist/files/changes.js +1 -1
  49. package/dist/files/changes.js.map +1 -1
  50. package/dist/http/respond.d.ts.map +1 -1
  51. package/dist/http/respond.js +2 -0
  52. package/dist/http/respond.js.map +1 -1
  53. package/dist/metadata/backlinks.d.ts.map +1 -1
  54. package/dist/metadata/backlinks.js +2 -0
  55. package/dist/metadata/backlinks.js.map +1 -1
  56. package/dist/metadata/fields.d.ts +17 -1
  57. package/dist/metadata/fields.d.ts.map +1 -1
  58. package/dist/metadata/problems.d.ts.map +1 -1
  59. package/dist/metadata/problems.js +2 -0
  60. package/dist/metadata/problems.js.map +1 -1
  61. package/dist/metadata/schema.d.ts +17 -1
  62. package/dist/metadata/schema.d.ts.map +1 -1
  63. package/dist/metadata/schema.js +6 -2
  64. package/dist/metadata/schema.js.map +1 -1
  65. package/dist/page/attentionDetails.d.ts.map +1 -1
  66. package/dist/page/attentionDetails.js +2 -1
  67. package/dist/page/attentionDetails.js.map +1 -1
  68. package/dist/page/metadataDetails.d.ts.map +1 -1
  69. package/dist/page/metadataDetails.js +6 -0
  70. package/dist/page/metadataDetails.js.map +1 -1
  71. package/dist/page/navigationScript.js +1 -1
  72. package/dist/page/shell.d.ts +1 -1
  73. package/dist/page/shell.d.ts.map +1 -1
  74. package/dist/page/shell.js.map +1 -1
  75. package/dist/page/style.d.ts.map +1 -1
  76. package/dist/page/style.js +2 -1
  77. package/dist/page/style.js.map +1 -1
  78. package/dist/page/swap.d.ts +1 -1
  79. package/dist/page/swap.d.ts.map +1 -1
  80. package/dist/page/swap.js +3 -0
  81. package/dist/page/swap.js.map +1 -1
  82. package/dist/path/Identity.d.ts +3 -0
  83. package/dist/path/Identity.d.ts.map +1 -0
  84. package/dist/path/Identity.js +3 -0
  85. package/dist/path/Identity.js.map +1 -0
  86. package/dist/responses/agent-cli.d.ts +2 -0
  87. package/dist/responses/agent-cli.d.ts.map +1 -0
  88. package/dist/responses/agent-cli.js +31 -0
  89. package/dist/responses/agent-cli.js.map +1 -0
  90. package/dist/responses/agent.d.ts +68 -0
  91. package/dist/responses/agent.d.ts.map +1 -0
  92. package/dist/responses/agent.js +49 -0
  93. package/dist/responses/agent.js.map +1 -0
  94. package/dist/responses/await.d.ts +33 -0
  95. package/dist/responses/await.d.ts.map +1 -0
  96. package/dist/responses/await.js +21 -0
  97. package/dist/responses/await.js.map +1 -0
  98. package/dist/responses/flags.d.ts +6 -0
  99. package/dist/responses/flags.d.ts.map +1 -0
  100. package/dist/responses/flags.js +23 -0
  101. package/dist/responses/flags.js.map +1 -0
  102. package/dist/responses/locate.d.ts +13 -0
  103. package/dist/responses/locate.d.ts.map +1 -0
  104. package/dist/responses/locate.js +50 -0
  105. package/dist/responses/locate.js.map +1 -0
  106. package/dist/responses/outcome.d.ts +65 -0
  107. package/dist/responses/outcome.d.ts.map +1 -0
  108. package/dist/responses/outcome.js +14 -0
  109. package/dist/responses/outcome.js.map +1 -0
  110. package/dist/responses/page.d.ts +6 -0
  111. package/dist/responses/page.d.ts.map +1 -0
  112. package/dist/responses/page.js +25 -0
  113. package/dist/responses/page.js.map +1 -0
  114. package/dist/responses/publish.d.ts +4 -0
  115. package/dist/responses/publish.d.ts.map +1 -0
  116. package/dist/responses/publish.js +56 -0
  117. package/dist/responses/publish.js.map +1 -0
  118. package/dist/responses/publishIn.d.ts +3 -0
  119. package/dist/responses/publishIn.d.ts.map +1 -0
  120. package/dist/responses/publishIn.js +69 -0
  121. package/dist/responses/publishIn.js.map +1 -0
  122. package/dist/responses/read.d.ts +30 -0
  123. package/dist/responses/read.d.ts.map +1 -0
  124. package/dist/responses/read.js +43 -0
  125. package/dist/responses/read.js.map +1 -0
  126. package/dist/responses/records.d.ts +12 -0
  127. package/dist/responses/records.d.ts.map +1 -0
  128. package/dist/responses/records.js +47 -0
  129. package/dist/responses/records.js.map +1 -0
  130. package/dist/responses/retry.d.ts +22 -0
  131. package/dist/responses/retry.d.ts.map +1 -0
  132. package/dist/responses/retry.js +14 -0
  133. package/dist/responses/retry.js.map +1 -0
  134. package/dist/responses/service.d.ts +106 -0
  135. package/dist/responses/service.d.ts.map +1 -0
  136. package/dist/responses/service.js +90 -0
  137. package/dist/responses/service.js.map +1 -0
  138. package/dist/responses/waitFor.d.ts +31 -0
  139. package/dist/responses/waitFor.d.ts.map +1 -0
  140. package/dist/responses/waitFor.js +47 -0
  141. package/dist/responses/waitFor.js.map +1 -0
  142. package/dist/rpc/contract.d.ts +101 -2
  143. package/dist/rpc/contract.d.ts.map +1 -1
  144. package/dist/rpc/contract.js +3 -2
  145. package/dist/rpc/contract.js.map +1 -1
  146. package/dist/rpc/responseContract.d.ts +212 -0
  147. package/dist/rpc/responseContract.d.ts.map +1 -0
  148. package/dist/rpc/responseContract.js +37 -0
  149. package/dist/rpc/responseContract.js.map +1 -0
  150. package/dist/rpc/server.d.ts +3 -1
  151. package/dist/rpc/server.d.ts.map +1 -1
  152. package/dist/rpc/server.js +6 -1
  153. package/dist/rpc/server.js.map +1 -1
  154. package/dist/serve-cli.d.ts +3 -0
  155. package/dist/serve-cli.d.ts.map +1 -0
  156. package/dist/serve-cli.js +20 -0
  157. package/dist/serve-cli.js.map +1 -0
  158. package/package.json +2 -2
  159. package/src/board.ts +16 -2
  160. package/src/browser/client.ts +30 -4
  161. package/src/browser/entry.ts +9 -0
  162. package/src/browser/responses/draftSession.ts +88 -0
  163. package/src/browser/responses/drafts.ts +58 -0
  164. package/src/browser/responses/preview.ts +5 -0
  165. package/src/browser/responses/schema.ts +52 -0
  166. package/src/browser/responses/setup.ts +102 -0
  167. package/src/browser/responses/submit.ts +41 -0
  168. package/src/cli.ts +14 -22
  169. package/src/files/changes.ts +2 -1
  170. package/src/http/respond.ts +2 -0
  171. package/src/metadata/backlinks.ts +2 -0
  172. package/src/metadata/problems.ts +2 -0
  173. package/src/metadata/schema.ts +6 -2
  174. package/src/page/attentionDetails.ts +2 -1
  175. package/src/page/metadataDetails.ts +6 -0
  176. package/src/page/navigationScript.ts +1 -1
  177. package/src/page/shell.ts +1 -1
  178. package/src/page/style.ts +2 -1
  179. package/src/page/swap.ts +3 -0
  180. package/src/path/Identity.ts +3 -0
  181. package/src/responses/agent-cli.ts +35 -0
  182. package/src/responses/agent.ts +59 -0
  183. package/src/responses/await.ts +21 -0
  184. package/src/responses/flags.ts +22 -0
  185. package/src/responses/locate.ts +55 -0
  186. package/src/responses/outcome.ts +15 -0
  187. package/src/responses/page.ts +41 -0
  188. package/src/responses/publish.ts +53 -0
  189. package/src/responses/publishIn.ts +64 -0
  190. package/src/responses/read.ts +45 -0
  191. package/src/responses/records.ts +53 -0
  192. package/src/responses/retry.ts +23 -0
  193. package/src/responses/service.ts +106 -0
  194. package/src/responses/waitFor.ts +58 -0
  195. package/src/rpc/contract.ts +3 -2
  196. package/src/rpc/responseContract.ts +46 -0
  197. package/src/rpc/server.ts +8 -1
  198. package/src/serve-cli.ts +37 -0
package/CHANGELOG.md CHANGED
@@ -8,6 +8,30 @@
8
8
  and delivery scope. Keep onboarding/report templates and linked in-app review.
9
9
  - Record the approved Platform-first live client direction and its actual shared HTTP/browser fixture evidence; Work Board adopts that foundation in 0.5.0 below.
10
10
 
11
+ ## 0.8.0 - 2026-10-06
12
+
13
+ ### Added
14
+
15
+ - Explicit `--responses` / embedding opt-in for anchored local feedback with
16
+ separate immutable question/context and response Markdown records. Preserve
17
+ reviewed revisions and original source bytes; reject stale/conflicting writes
18
+ and distinguish pending, saved, rejected and uncertain outcomes.
19
+ - Browser-local response drafts with a separate 2 MiB workspace bound, 30-day
20
+ retention since edit, explicit clearing and unavailable/expiry disclosure.
21
+ - Native RPC `question`, `response` and per-question `wait` CLI commands, with
22
+ durable 48-hour registration deadlines, clarification/deferral, late replies,
23
+ nondestructive reattachment and an explicit next-response cursor. The waiter
24
+ bundle excludes server/rendering/watchers and transfers only the next reply.
25
+
26
+ ### Changed
27
+
28
+ - Keep the default server read-only. The first safe publisher requires Linux
29
+ directory descriptors, hard-link publication and directory synchronization;
30
+ other platforms retain reading support. Reference symlinks do not grant writes.
31
+ - Block source form actions/frames at the content-security boundary and require
32
+ native NDJSON for the opted-in command route. Existing readable Markdown,
33
+ static raw HTML, local visuals and no-JavaScript reading remain supported.
34
+
11
35
  ## 0.7.2 - 2026-10-06
12
36
 
13
37
  ### Changed
package/README.md CHANGED
@@ -14,8 +14,7 @@ getting-started guidance at `/`. **Getting started** in the
14
14
  sidebar remains available at `/_board/start`, with copyable project, investigation
15
15
  and agent-result Markdown templates. Focus a template text area, select all and
16
16
  copy; save through your editor or agent tool. Replace example IDs and matching
17
- references, and record evidence only after an actual observation. The viewer
18
- does not create project files. Templates and links also work without JavaScript.
17
+ references, and record evidence only after an actual observation. Read-only mode does not create project files. Templates and links also work without JavaScript.
19
18
  Browser print focuses on the document; document export is outside product scope.
20
19
 
21
20
  It listens on `127.0.0.1` only and answers only requests addressed to a loopback
@@ -63,8 +62,100 @@ preference says otherwise. A keyboard skip link moves directly to the content.
63
62
  | --- | --- | --- |
64
63
  | `<dir>` | required | The folder to serve. |
65
64
  | `--port` | `4747` | The port on `127.0.0.1`. `0` picks a free one. |
65
+ | `--responses` | `false` | Explicitly enable local question/response writes. The first writer requires Linux, a real workspace directory, `/proc/self/fd`, hard links and directory synchronization. Reading remains available on other supported Node platforms. |
66
66
  | `--home` | none | The file shown at `/` as a board, relative to the folder. The command stops with an error unless it leads to one of the markdown files listed from the folder. Without it, `/` shows the first file as a document. |
67
67
 
68
+ ## Local responses and one logical wait per question
69
+
70
+ Start one shared server with explicit write opt-in:
71
+
72
+ ```sh
73
+ work-board ./project-notes --responses --port 4747
74
+ ```
75
+
76
+ Use an existing explicit open attention request. In its **Work details and source**,
77
+ choose **Respond to this request**, review the exact source and SHA-256, enter a
78
+ local author label, and preview the Markdown before recording it. An answer may
79
+ say no; **Ask back / clarify** and **Not now** are separate reply kinds. These
80
+ labels are not authenticated identities. Recording a reply never changes source
81
+ status, closes an attention request, executes an agent or establishes acceptance.
82
+
83
+ The app creates immutable question/context and response Markdown files in
84
+ `responses/`. Original documents remain untouched. Questions identify the item,
85
+ request, source path and exact bytes reviewed; changing either the source bytes or
86
+ path creates a different generation. A stale save retains the draft and requires
87
+ review/preview again. The preview names both files and all authored fields; the
88
+ server assigns registration and recorded timestamps when saving.
89
+
90
+ Drafts use separate browser-local storage per workspace/origin: 2 MiB total and
91
+ 30 days since the last edit. **Clear workspace drafts** affects drafts, not saved
92
+ source or Mark seen history. Expiry, corrupt/unavailable storage and quota failures
93
+ are disclosed. Text remains in the current window after a storage/save failure.
94
+ Navigation, reload and live source refresh preserve retained drafts; changed
95
+ context must be previewed again. Another unsaved edit made during submission is
96
+ retained. Saved feedback also remains readable without JavaScript.
97
+
98
+ An agent uses these short command names against the shared server:
99
+
100
+ ```sh
101
+ # Read the exact current question/context and its reviewedRevision (no write).
102
+ work-board question investigation.model/review-model
103
+
104
+ # Register that reviewed generation and wait for one attributable reply.
105
+ work-board wait investigation.model/review-model --revision <reviewedRevision>
106
+
107
+ # After registration, repeat this same wait after a killed shell or restart.
108
+ work-board wait <question-id>
109
+
110
+ # Retrieve the saved conversation without waiting or consuming any reply.
111
+ work-board response <question-id>
112
+
113
+ # After a clarification/deferral, wait for the next response explicitly.
114
+ work-board wait <question-id> --after <response-id>
115
+ ```
116
+
117
+ `--port` selects another local workspace/server; `--url` accepts only an HTTP
118
+ loopback origin. There is no hidden workspace discovery or automatic server launch.
119
+ Register-and-wait reports its stable question ID and deadline on stderr. Its stdout
120
+ is one JSON result containing the attributable question/context and response;
121
+ exit 0 means a recorded reply, including no/clarification/deferral, not approval.
122
+ Exit 2 reports an unanswered 48-hour deadline; other failures exit nonzero with
123
+ stderr diagnostics. `question` and `response` are explicit read commands.
124
+
125
+ The human deadline starts at first durable registration and does not reset when
126
+ rearming, revisiting a page or previewing. A deadline never deletes/cancels the
127
+ question. Late replies remain readable and take precedence over an old timeout.
128
+ A missing cursor fails explicitly. Replies can be read repeatedly; this provides
129
+ recovery, not exactly-once agent action. The server's 30-second request leases and
130
+ one-second reconciliation checks are distinct from the human's 48-hour deadline.
131
+ During a transport/index outage, waits retry the same question; at the deadline,
132
+ an unavailable service is reported as unavailable rather than falsely unanswered.
133
+
134
+ The client uses bundled native Effect RPC over the existing local command path.
135
+ Serving imports are loaded only for the server command. Each waiter has no
136
+ renderer, Mermaid, filesystem watcher, AtomRegistry or daemon. A pending lease
137
+ returns only its question and next reply, not the entire conversation history.
138
+ Harnesses own model wakeup and shell lifetime: completion is not a universal
139
+ promise of autonomous agent continuation. Re-read/reattach when your harness does
140
+ not inject a completed shell result.
141
+
142
+ Publication holds Linux directory descriptors, writes and synchronizes a private
143
+ temporary file, publishes with a no-replace hard link, then synchronizes the
144
+ response directory. Retries reconcile the same identity/content and never replace
145
+ another contribution; a moved/duplicated/conflicting identity is rejected.
146
+ Symlinked reference folders grant read access only. Changed/moved directories,
147
+ permissions, unsupported filesystem capabilities and uncertain outcomes remain
148
+ explicit. An unrelated editor can change the reviewed source after a preflight
149
+ check; immutable replies still identify the exact reviewed bytes and never claim
150
+ an atomic transaction with that editor. Directory moves after publication can
151
+ produce an uncertain result; reconcile saved source before retrying.
152
+
153
+ Source HTML cannot submit write forms: CSP disables form actions/frames, the
154
+ native route requires same-origin/loopback and NDJSON when writes are enabled,
155
+ and the official response surface escapes the reviewed source. Embedded apps must
156
+ explicitly opt in with `boardLayer({ root, responses: true })` and own the trusted
157
+ host boundary. There is no write endpoint for arbitrary paths or source rewriting.
158
+
68
159
  ## Local visual evidence
69
160
 
70
161
  Use ordinary Markdown such as `![Review screenshot](shots/review.png)` or