wiki-viewer 2.12.0 → 2.14.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.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +14 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +1 -1
- package/.next/standalone/.next/routes-manifest.json +81 -3
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/activity/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/admin/registrations/[regId]/approve/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/admin/registrations/[regId]/deny/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/admin/registrations/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/events/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/files/[...path]/route.js +7 -7
- package/.next/standalone/.next/server/app/api/agent/files/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route.js +7 -7
- package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/ls/[[...path]]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/ls/[[...path]]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/move/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/move/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/search/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/live/attach/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/agent/{internal/span → live/attach}/route.js +11 -11
- package/.next/standalone/.next/server/app/api/agent/live/attach/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/agent/live/attach/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/agent/live/md-preview/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/agent/live/md-preview/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/agent/live/md-preview/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/agent/live/md-preview/route.js +17 -0
- package/.next/standalone/.next/server/app/api/agent/live/md-preview/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/agent/live/md-preview/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/agent/live/md-preview/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/agent/live/poll/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/agent/live/poll/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/agent/live/poll/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/agent/live/poll/route.js +17 -0
- package/.next/standalone/.next/server/app/api/agent/live/poll/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/agent/live/poll/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/agent/live/poll/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/agent/live/reply/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/agent/live/reply/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/agent/live/reply/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/agent/live/reply/route.js +17 -0
- package/.next/standalone/.next/server/app/api/agent/live/reply/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/agent/{internal/span → live/reply}/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/live/reply/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/agent/live/web-preview/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/agent/live/web-preview/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/agent/live/web-preview/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/agent/live/web-preview/route.js +18 -0
- package/.next/standalone/.next/server/app/api/agent/live/web-preview/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/agent/live/web-preview/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/agent/live/web-preview/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/agent/settings/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/sidecar/[...path]/route.js +9 -9
- package/.next/standalone/.next/server/app/api/agent/sidecar/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/app-proxy/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/assets/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/pdf/save/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/asset/route.js +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/asset/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/share/route.js +1 -1
- package/.next/standalone/.next/server/app/api/share/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/browse/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/branch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/open/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/refresh/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/upload/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/app/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/backlinks/route.js +1 -1
- package/.next/standalone/.next/server/app/api/wiki/backlinks/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/content/route.js +1 -1
- package/.next/standalone/.next/server/app/api/wiki/content/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/download/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/folder/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-branches/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-checkout/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-diff/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-file-info/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-history/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-pull/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/live/md-request/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-request/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-request/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-request/route.js +18 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-request/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-request/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-request/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-resolve/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-resolve/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-resolve/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-resolve/route.js +18 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-resolve/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-resolve/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-resolve/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-status/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-status/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-status/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-status/route.js +16 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-status/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-status/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/{agent/internal/span → wiki/live/md-status}/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/wiki/live/request/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/live/request/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/live/request/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/live/request/route.js +16 -0
- package/.next/standalone/.next/server/app/api/wiki/live/request/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/live/request/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/wiki/live/request/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/wiki/live/status/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/live/status/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/live/status/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/live/status/route.js +17 -0
- package/.next/standalone/.next/server/app/api/wiki/live/status/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/live/status/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/wiki/live/status/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/wiki/move/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/new-file/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/outlinks/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/page/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/presence/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/scratch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/search/route.js +1 -1
- package/.next/standalone/.next/server/app/api/wiki/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/slugs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/watch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/picker.js/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/picker.js/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/picker.js/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/picker.js/route.js +7 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/picker.js/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/picker.js/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/picker.js/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/request/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/request/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/request/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/request/route.js +16 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/request/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/request/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/request/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/resolve/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/resolve/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/resolve/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/resolve/route.js +17 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/resolve/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/resolve/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/resolve/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/status/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/status/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/status/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/status/route.js +16 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/status/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/status/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/status/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/s/[token]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/signin/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +14 -1
- package/.next/standalone/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_031ecpl.js +274 -0
- package/.next/standalone/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0afqvqi.js +3 -0
- package/.next/standalone/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0ofi5.l.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__07wa2lq._.js → [root-of-the-server]__0-l8919._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0e~2gkf._.js → [root-of-the-server]__0-vsohg._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.xk8gi._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0002pqj._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01v1udu._.js +16 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01y-312._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__020sc-x._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__02373p-._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0n2r6u9._.js → [root-of-the-server]__03c8~ck._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__03qy0.z._.js +55 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__056pu9b._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__06kspyc._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__07bxa4u._.js +90 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08xiuca._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0936qml._.js +43 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__09g2xhj._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0badnl7._.js +43 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0bqhp4b._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0dk42.p._.js +90 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e_irm6._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0iksibp._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0jlrhzi._.js +55 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kamtmx._.js +50 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kpcc70._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0laknd~._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0m.o598._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0mgvfb5._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0n7uto3._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0oxzq2p._.js +8 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0r-3u3v._.js +8 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t8r97l._.js +50 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0vuw0yp._.js +50 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0xoz8e8._.js → [root-of-the-server]__0wtrbmm._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0y4lx2l._.js +50 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0z5xk6f._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zrcu6l._.js +20 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__10-ona2._.js +20 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__130a-u1._.js +50 -0
- package/.next/standalone/.next/server/chunks/_079xuln._.js +1 -1
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_agent_live_attach_route_actions_0cy5eae.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_agent_live_md-preview_route_actions_07po~tm.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_agent_live_poll_route_actions_0tef7r~.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_agent_live_reply_route_actions_0modpib.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_agent_live_web-preview_route_actions_0qjm1cw.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_live_md-request_route_actions_0z5ad2q.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_live_md-resolve_route_actions_0_8g88b.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_live_md-status_route_actions_02ykgzf.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_live_request_route_actions_00m8pc2.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_live_status_route_actions_0v.pypx.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_web-tweak_picker_js_route_actions_118~f~j.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_web-tweak_request_route_actions_0wlzrco.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_web-tweak_resolve_route_actions_0wq6pw5.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_web-tweak_status_route_actions_0vr4h6u.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{0~w0_katex_dist_katex_mjs_0-fyxoz._.js → 0~w0_katex_dist_katex_mjs_0okh~tf._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_blockDiagram-GPEHLZMM_mjs_0v204vn._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_c4Diagram-AAUBKEIU_mjs_0.iwqva._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-3OPIFGDE_mjs_09p1amp._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-5ZQYHXKU_mjs_0z1.978._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-727SXJPM_mjs_115~dsb._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-AQP2D5EJ_mjs_0euza.d._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-CSCIHK7Q_mjs_01i7moi._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-KSCS5N6A_mjs_0v4oeem._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-O5CBEL6O_mjs_11437bo._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_dagre-BM42HDAG_mjs_05ekknz._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_diagram-OG6HWLK6_mjs_0t5sus6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_erDiagram-TEJ5UH35_mjs_0v6rnqy._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_flowDiagram-I6XJVG4X_mjs_13pu1pv._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_gitGraphDiagram-PVQCEYII_mjs_0jp8i-h._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_ishikawaDiagram-YF4QCWOH_mjs_0tcayi4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_journeyDiagram-JHISSGLW_mjs_0-ln2o9._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_kanban-definition-UN3LZRKU_mjs_0_sdvmq._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_mindmap-definition-RKZ34NQL_mjs_002sdr9._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_quadrantDiagram-W4KKPZXB_mjs_0re1qsf._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_requirementDiagram-4Y6WPE33_mjs_067p6fg._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_sankeyDiagram-5OEKKPKP_mjs_11ifrnu._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_sequenceDiagram-3UESZ5HK_mjs_015n5fb._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_stateDiagram-AJRCARHV_mjs_0q8ykwx._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_timeline-definition-PNZ67QCA_mjs_0ie6b6s._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_vennDiagram-CIIHVFJN_mjs_0hds9fe._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_wardleyDiagram-YWT4CUSO_mjs_0s.dkn9._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_xychartDiagram-2RQKCTM6_mjs_0v-eh5w._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_mermaid_core_mjs_0hj_n-~._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0~4py6h._.js → [root-of-the-server]__0t5fses._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0d9d~c~._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0kkaybx._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0oq8kwv._.js +284 -12
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0f0qocb._.js → node_modules__pnpm_0-l23--._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0_g0a7t._.js → node_modules__pnpm_00d-n5v._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0v7wopg._.js → node_modules__pnpm_014r.0e._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0zdl7-7._.js → node_modules__pnpm_03j578g._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_04rulr6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_09y5c~i._.js → node_modules__pnpm_05qsb2c._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0sdy2lv._.js → node_modules__pnpm_08i5ti8._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0b6_242._.js → node_modules__pnpm_09t82cx._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0f6r-u~._.js → node_modules__pnpm_09~hu70._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0pggrwu._.js → node_modules__pnpm_0cfriah._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_02qa21p._.js → node_modules__pnpm_0ct341~._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0d4-t2b._.js → node_modules__pnpm_0eps_u_._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0fb6~r_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0q9s5k5._.js → node_modules__pnpm_0k47joo._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0l9eomm._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0q_v1_2._.js → node_modules__pnpm_0nsy85b._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0vahm7l._.js → node_modules__pnpm_0n~wbom._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0.xieh4._.js → node_modules__pnpm_0o1._vw._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0kib6pw._.js → node_modules__pnpm_0t21hj7._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0~wqhb9._.js → node_modules__pnpm_0tl8mi0._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0f9artj._.js → node_modules__pnpm_0tqv.ym._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_05c~go7._.js → node_modules__pnpm_0v9mhna._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_07hg43b._.js → node_modules__pnpm_0w8.hpb._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0_zd0nt._.js → node_modules__pnpm_0wrxa~f._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0g_tlt-._.js → node_modules__pnpm_0xrjcxa._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0ghm84g._.js → node_modules__pnpm_0xrusyy._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0c6q9~6._.js → node_modules__pnpm_0y.wb-7._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0tvmv0e._.js → node_modules__pnpm_0yu-3eu._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0k6yfdh._.js → node_modules__pnpm_11q1n~-._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_01~03ak._.js → node_modules__pnpm_1323nh~._.js} +2 -2
- package/.next/standalone/.next/server/functions-config-manifest.json +15 -2
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/0k~5ok-cacnor.js +417 -0
- package/.next/standalone/.next/static/chunks/{04um2f1eeqcss.js → 0noq2zqrh0z_0.js} +1 -1
- package/.next/standalone/.next/static/chunks/{04f8lhbw6m9ee.js → 0tn7wdt213lbb.js} +1 -1
- package/.next/standalone/.next/static/chunks/{138ap~9f.rqkh.css → 12-umagms5yro.css} +1 -1
- package/.next/standalone/.next/static/chunks/17446l.6t9j17.css +1 -0
- package/.next/standalone/.test-floor +1 -1
- package/.next/standalone/_status.md +19 -0
- package/.next/standalone/meta/contract.md +67 -0
- package/.next/standalone/meta/overview.md +10 -0
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/queries/lint-2026-08-15.md +28 -0
- package/.next/standalone/server.js +1 -1
- package/.next/standalone/specs/changes/block-preconditions/proposal.md +90 -0
- package/.next/standalone/specs/changes/blockref-frontmatter-misalign/proposal.md +81 -0
- package/.next/standalone/specs/changes/collective-agent-review/design.md +183 -0
- package/.next/standalone/specs/changes/collective-agent-review/proposal.md +138 -0
- package/.next/standalone/specs/changes/collective-agent-review/requirements.md +100 -0
- package/.next/standalone/specs/changes/collective-agent-review/tasks.md +62 -0
- package/.next/standalone/specs/changes/live-collab/design.md +141 -0
- package/.next/standalone/specs/changes/live-collab/proposal.md +133 -0
- package/.next/standalone/specs/changes/live-collab/requirements.md +91 -0
- package/.next/standalone/specs/changes/live-collab/tasks.md +39 -0
- package/.next/standalone/specs/changes/live-collab-web/findings-termdeck.md +120 -0
- package/.next/standalone/specs/changes/live-collab-web/proposal.md +184 -0
- package/.next/standalone/specs/changes/live-unified/design.md +49 -0
- package/.next/standalone/specs/changes/live-unified/proposal.md +54 -0
- package/.next/standalone/specs/changes/web-tweak-variants/proposal.md +65 -0
- package/.next/standalone/wp-test-6mm5qr/burst-0.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-1.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-10.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-11.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-12.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-13.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-14.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-15.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-16.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-17.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-18.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-19.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-2.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-20.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-21.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-22.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-23.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-24.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-25.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-26.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-27.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-28.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-29.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-3.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-30.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-31.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-32.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-33.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-34.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-35.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-36.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-37.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-38.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-39.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-4.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-40.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-41.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-42.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-43.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-44.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-45.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-46.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-47.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-48.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-49.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-5.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-6.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-7.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-8.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-9.txt +1 -0
- package/.next/standalone/wp-test-SiMBLk/child/nested.txt +1 -0
- package/.next/standalone/wp-test-SiMBLk/rootfile.txt +1 -0
- package/.next/standalone/wp-test-bFyuuZ/child/nested.txt +1 -0
- package/.next/standalone/wp-test-bFyuuZ/rootfile.txt +1 -0
- package/.next/standalone/wp-test-dn9shN/after-reset.txt +1 -0
- package/.next/standalone/wp-test-gL64l2/shared.txt +1 -0
- package/.next/standalone/wp-test-mlyQ7q/test.txt +1 -0
- package/.next/standalone/wp-test-o3g2XI/shared.txt +1 -0
- package/.next/standalone/wp-test-oHeYCM/subA/a.txt +1 -0
- package/.next/standalone/wp-test-oHeYCM/subB/b.txt +1 -0
- package/package.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/internal/span/route/app-paths-manifest.json +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04vo55d._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_g-.kr._.js +0 -20
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0bpv09n._.js +0 -20
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e1kbl7._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0omny3u._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0q~ky91._.js +0 -16
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0r--676._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0x.030x._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xlo2r_._.js +0 -3
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_agent_internal_span_route_actions_121if52.js +0 -3
- package/.next/standalone/.next/static/chunks/0gogvjz6oxo51.css +0 -1
- package/.next/standalone/.next/static/chunks/11ehczv8yax~_.js +0 -145
- /package/.next/standalone/.next/server/app/api/agent/{internal/span → live/attach}/route/build-manifest.json +0 -0
- /package/.next/standalone/.next/server/app/api/agent/{internal/span → live/attach}/route/server-reference-manifest.json +0 -0
- /package/.next/standalone/.next/server/app/api/agent/{internal/span → live/attach}/route.js.map +0 -0
- /package/.next/standalone/.next/static/{AsrmwC0YfrYEMAXj2s0Wx → BXRSlvxAOCUzi4h8wCLQi}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{AsrmwC0YfrYEMAXj2s0Wx → BXRSlvxAOCUzi4h8wCLQi}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{AsrmwC0YfrYEMAXj2s0Wx → BXRSlvxAOCUzi4h8wCLQi}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Design: collective agent review
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Turn the fire-and-forget, one-target agent call into **collect → send batch → review batch**,
|
|
6
|
+
sharing one workflow across Markdown and web, while keeping the two write engines separate.
|
|
7
|
+
|
|
8
|
+
Two annotation kinds share the existing anchoring machinery:
|
|
9
|
+
|
|
10
|
+
- **comment** — human discussion (existing behavior).
|
|
11
|
+
- **instruction** — an agent work order; accumulates into a per-file queue; dispatched as one
|
|
12
|
+
**run**.
|
|
13
|
+
|
|
14
|
+
## Data model
|
|
15
|
+
|
|
16
|
+
### Markdown annotations (sidecar)
|
|
17
|
+
|
|
18
|
+
Reuse the existing `Comment` model and its anchoring/reanchor/stale machinery. Add annotation
|
|
19
|
+
kind + queue/run linkage as **additive, nullable** fields (Gap-1 precedent).
|
|
20
|
+
|
|
21
|
+
`src/lib/proof/types.ts`:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
export type AnnotationKind = "comment" | "instruction";
|
|
25
|
+
|
|
26
|
+
export interface Comment { // existing; extended
|
|
27
|
+
id: string;
|
|
28
|
+
ref?: string;
|
|
29
|
+
lineAnchor?: LineAnchor;
|
|
30
|
+
resolved: boolean;
|
|
31
|
+
createdAt: string;
|
|
32
|
+
turns: CommentTurn[];
|
|
33
|
+
stale?: boolean;
|
|
34
|
+
// NEW (all optional; absent => "comment" for legacy rows)
|
|
35
|
+
kind?: AnnotationKind; // "instruction" marks a work order
|
|
36
|
+
instructionState?: "draft" | "queued" | "sent" | "answered"; // instruction lifecycle
|
|
37
|
+
runId?: string; // the send run this instruction went out in
|
|
38
|
+
fromCommentId?: string; // backlink when escalated from a comment
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Rationale: one store, one anchoring path (no duplicate subsystem), but `kind` is a required
|
|
43
|
+
*semantic type* to the user (two create actions), not a soft toggle. Legacy rows with no
|
|
44
|
+
`kind` render as comments.
|
|
45
|
+
|
|
46
|
+
### Web annotations
|
|
47
|
+
|
|
48
|
+
The web surface has no sidecar comment machinery. Web instructions live in the web-tweak
|
|
49
|
+
preview/live store as a small per-file instruction list keyed by workspace+path (new, small;
|
|
50
|
+
does not touch the Markdown sidecar). Same lifecycle fields (`draft/queued/sent/answered`,
|
|
51
|
+
`runId`).
|
|
52
|
+
|
|
53
|
+
### Run (the batch dispatch)
|
|
54
|
+
|
|
55
|
+
A **run** is one agent dispatch carrying N instruction items. Represent it on the existing
|
|
56
|
+
live request:
|
|
57
|
+
|
|
58
|
+
`src/lib/proof/live/store.ts`:
|
|
59
|
+
|
|
60
|
+
- Add request kind `generate.batch` (Markdown) and reuse `web.tweak` batching for web, OR
|
|
61
|
+
keep `kind: "generate"` and add an `items` payload. Chosen: **add `items` to the request**
|
|
62
|
+
so one row = one run.
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
export interface LiveInstructionItem {
|
|
66
|
+
instructionId: string; // annotation id
|
|
67
|
+
blockRef: string | null; // markdown block or web selector target
|
|
68
|
+
baseRevision: number | null;
|
|
69
|
+
instruction: string;
|
|
70
|
+
selectionText?: string | null;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface LiveRequest { // extended
|
|
74
|
+
...
|
|
75
|
+
items: LiveInstructionItem[] | null; // NEW: batch payload; null for legacy single requests
|
|
76
|
+
runId: string | null; // NEW: correlation id returned on results
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The single-instruction fields (`instruction`, `blockRef`, `baseRevision`) stay for backward
|
|
81
|
+
compatibility and for control kinds; batch runs populate `items` + `runId`.
|
|
82
|
+
|
|
83
|
+
The **one-outstanding-request-per-session** invariant is unchanged: a run is still one
|
|
84
|
+
request row.
|
|
85
|
+
|
|
86
|
+
## Correlation (run id → changes)
|
|
87
|
+
|
|
88
|
+
- On send, generate `runId` (e.g. `run:<8hex>`) and stamp it on the request and on each
|
|
89
|
+
queued instruction (`instruction.runId`).
|
|
90
|
+
- Markdown: the agent's tier-2 ops already carry `inResponseTo`. Extend the request's
|
|
91
|
+
idempotency/correlation so activity-log provenance produced for this run carry the `runId` (via the
|
|
92
|
+
existing `ActivityAttrs` provenance). The editor groups activity-log provenance by `runId` to offer
|
|
93
|
+
"Accept run / Discard run".
|
|
94
|
+
- Web: the preview transaction already binds a `previewId`; associate `previewId` with
|
|
95
|
+
`runId` so the overlay reviews the whole run.
|
|
96
|
+
|
|
97
|
+
## Write paths (unchanged engines)
|
|
98
|
+
|
|
99
|
+
- **Markdown**: agent applies ops through existing `POST /api/agent/files` → `applyOps`
|
|
100
|
+
(`ops-applier.ts:457`). Each op keeps baseRevision preflight and STALE_REVISION semantics.
|
|
101
|
+
Batch accept = accept all activity-log provenance tagged with `runId`; batch discard = revert them.
|
|
102
|
+
All-or-nothing is enforced at the review layer (accept each tagged span; if any fails,
|
|
103
|
+
surface and stop — v1 keeps the simple path).
|
|
104
|
+
- **Web**: agent replies via existing `web-preview` route with the candidate patch bound to
|
|
105
|
+
the run's `previewId`; accept commits through existing `commitCandidate` (single-file v1);
|
|
106
|
+
discard invalidates.
|
|
107
|
+
|
|
108
|
+
No new write engine. Line-review gate: nothing writes document bytes or provenance outside
|
|
109
|
+
these two paths.
|
|
110
|
+
|
|
111
|
+
## API surface
|
|
112
|
+
|
|
113
|
+
### Human-facing
|
|
114
|
+
|
|
115
|
+
- `POST /api/wiki/live/request` — extend to accept `items[]` + return `runId` for a batch
|
|
116
|
+
`generate` dispatch. Rejects with 409 if a run is already outstanding. Existing
|
|
117
|
+
single-instruction body still accepted (legacy/compat).
|
|
118
|
+
- `GET /api/wiki/live/status` — already returns attached + last request; add `runId` and item
|
|
119
|
+
count so the queue/review UI can render.
|
|
120
|
+
- Web already has `POST /api/wiki/web-tweak/request` and `/resolve`; extend request to carry
|
|
121
|
+
`items[]` + `runId`; resolve stays per-run (accept/discard).
|
|
122
|
+
|
|
123
|
+
The instruction *queue itself* (draft instructions not yet sent) is client-side state backed
|
|
124
|
+
by the sidecar (Markdown) or the web instruction list; only **send** hits the live channel.
|
|
125
|
+
|
|
126
|
+
### Agent-facing
|
|
127
|
+
|
|
128
|
+
- `GET /api/agent/live/poll` returns the request including `items[]` + `runId`.
|
|
129
|
+
- Agent handler processes items together, applies tier-2 ops for Markdown (or submits web
|
|
130
|
+
preview), then `reply done`. Correlation/idempotency derived from `runId`/`requestId` at
|
|
131
|
+
commit time (existing one-engine rule).
|
|
132
|
+
|
|
133
|
+
## UI
|
|
134
|
+
|
|
135
|
+
### Markdown editor
|
|
136
|
+
|
|
137
|
+
- Bubble menu / view-mode affordance: replace single "Ask agent" with **Comment** and
|
|
138
|
+
**Instruct** actions.
|
|
139
|
+
- `openCommentForSelection` (existing) stays for comments.
|
|
140
|
+
- New `openInstructForSelection` creates a `kind:"instruction"` annotation (draft), no
|
|
141
|
+
dispatch. Retire `AskAgentPopover`'s immediate-send; reuse a lighter instruction editor
|
|
142
|
+
that writes a draft instruction.
|
|
143
|
+
- Comment card gains a **"Turn into an instruction"** action (creates instruction with
|
|
144
|
+
`fromCommentId`).
|
|
145
|
+
- A file-level **queue bar**: "N instructions ready · Send to agent" → enumerated confirm
|
|
146
|
+
dialog → dispatch run.
|
|
147
|
+
- After a run returns, activity-log provenance tagged with `runId` are grouped with **Accept run /
|
|
148
|
+
Discard run** controls, alongside existing per-span activity tracking.
|
|
149
|
+
|
|
150
|
+
### Web tweak overlay
|
|
151
|
+
|
|
152
|
+
- Element picker pins an **instruction** to an element (draft), no dispatch.
|
|
153
|
+
- Same file-level queue bar + enumerated Send.
|
|
154
|
+
- Review the returned preview run with Accept run / Discard run (existing preview overlay,
|
|
155
|
+
relabeled).
|
|
156
|
+
|
|
157
|
+
## Backward compatibility
|
|
158
|
+
|
|
159
|
+
- `kind` absent ⇒ comment. Legacy sidecars unchanged.
|
|
160
|
+
- `items`/`runId` null ⇒ legacy single request path still works.
|
|
161
|
+
- Frozen async `recover` path untouched; event schema additions are ignorable by old
|
|
162
|
+
consumers.
|
|
163
|
+
|
|
164
|
+
## Testing
|
|
165
|
+
|
|
166
|
+
- Sidecar: instruction kind persists; legacy comment loads as comment; escalation creates
|
|
167
|
+
linked instruction without mutating the comment.
|
|
168
|
+
- Live store: batch request stores `items[]` + `runId`; one-outstanding invariant holds;
|
|
169
|
+
poll returns items; reply correlates by runId.
|
|
170
|
+
- Review: accept run accepts all tagged spans; discard reverts all; failure leaves no partial
|
|
171
|
+
state.
|
|
172
|
+
- Web: instruction queue → single send → preview run → accept commits single-file candidate;
|
|
173
|
+
discard invalidates.
|
|
174
|
+
- Rename: no "Ask agent" string in user-facing surfaces; verb is Instruct / Send to agent.
|
|
175
|
+
- Floor holds; add the above as new tests.
|
|
176
|
+
|
|
177
|
+
## Rejected alternatives
|
|
178
|
+
|
|
179
|
+
- **Audience toggle on one note** (model C-as-toggle): makes accidental execution too easy;
|
|
180
|
+
rejected. Kind is a real type set at creation, escalation is explicit one-way.
|
|
181
|
+
- **Separate second annotation subsystem** (model B-as-duplicate-store): duplicates anchoring
|
|
182
|
+
machinery on Markdown for one bit of meaning; rejected in favor of one store + `kind`.
|
|
183
|
+
- **Per-item partial accept**: reintroduces multi-file atomicity; deferred.
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Proposal: collective agent review (instruct → send batch → review batch)
|
|
2
|
+
|
|
3
|
+
## Problem
|
|
4
|
+
|
|
5
|
+
Both agent surfaces share the same disease: **scattered, fire-and-forget, one-at-a-time
|
|
6
|
+
agent calls**, and the way "Comment" and "Ask agent" coexist is confusing.
|
|
7
|
+
|
|
8
|
+
- **Markdown "Ask agent"** (`ask-agent-popover.tsx`): select a block, type an instruction,
|
|
9
|
+
hit Send, popover auto-closes in ~900ms. The result later materializes as a `activity record`
|
|
10
|
+
with no visible tie back to what you asked. Only one request may be outstanding per session.
|
|
11
|
+
No way to annotate several blocks and dispatch them together.
|
|
12
|
+
- **Web "Tweak"** (`web-tweak-overlay.tsx`): each element tweak is its own immediate request.
|
|
13
|
+
Same serialization and scatter, and the agent never sees the whole page at once, so
|
|
14
|
+
multi-element changes drift out of sync.
|
|
15
|
+
- **Comment vs Ask agent is muddled.** A comment is a passive note to humans; Ask agent is an
|
|
16
|
+
invisible fire-and-forget command. They look similar but behave completely differently, and
|
|
17
|
+
nothing tells the user which one will change their file.
|
|
18
|
+
|
|
19
|
+
## The model (in UX terms)
|
|
20
|
+
|
|
21
|
+
**Two things you can pin to a target (a Markdown block or an HTML element):**
|
|
22
|
+
|
|
23
|
+
- **Comment** — a note to humans. It sits there. It never changes the file.
|
|
24
|
+
- **Instruction** — a work order for the agent. Something you intend to get done.
|
|
25
|
+
|
|
26
|
+
They share the same pin gesture and anchoring, but read as clearly different objects
|
|
27
|
+
(distinct icon + color). A user must never wonder "will this one change my file?"
|
|
28
|
+
|
|
29
|
+
**No audience toggle.** We do not put a "for humans / for agent" switch on one note. A toggle
|
|
30
|
+
turns every comment into "might this secretly be a command?" and invites accidental
|
|
31
|
+
execution. Instead there are two things you deliberately create.
|
|
32
|
+
|
|
33
|
+
**Explicit escalation.** A comment has one action, **"Turn into an instruction"** — one
|
|
34
|
+
direction, deliberate, with a backlink to the original comment. The comment is never silently
|
|
35
|
+
reinterpreted.
|
|
36
|
+
|
|
37
|
+
**Collect, then send once.** You leave instructions across the document; nothing fires. When
|
|
38
|
+
ready, one file-level button:
|
|
39
|
+
|
|
40
|
+
> **3 instructions ready · Send to agent**
|
|
41
|
+
|
|
42
|
+
Before sending, a dialog enumerates exactly which instructions on which blocks are going. You
|
|
43
|
+
confirm. The agent processes them together with whole-file context and returns **one coherent
|
|
44
|
+
change set tied to that send** (a "run"), so each returned change is visibly correlated to the
|
|
45
|
+
instruction it answers.
|
|
46
|
+
|
|
47
|
+
**Review as a batch.** Accept the whole run or discard it (all-or-nothing in v1). New
|
|
48
|
+
instructions start the next run.
|
|
49
|
+
|
|
50
|
+
**Retire the verb "Ask agent."** "Ask" implies an immediate conversational reply; this is a
|
|
51
|
+
queued work order reviewed later. The action is **Instruct** / **Send to agent** (mirrors
|
|
52
|
+
Cursor's Ask-vs-Agent split).
|
|
53
|
+
|
|
54
|
+
## Desired outcome
|
|
55
|
+
|
|
56
|
+
One rhythm on both surfaces: **pin your intent → send when ready → review as a batch.**
|
|
57
|
+
|
|
58
|
+
The only thing that differs between surfaces is how a result *looks while you review it*
|
|
59
|
+
(clean markdown suggestion in Markdown vs a staged preview on the HTML page). That is
|
|
60
|
+
the medium, not the workflow.
|
|
61
|
+
|
|
62
|
+
## Scope (this change — step 1)
|
|
63
|
+
|
|
64
|
+
- **Two annotation kinds** on the shared anchoring machinery: `comment` (human) and
|
|
65
|
+
`instruction` (agent work order). Instruction is a first-class kind, not a flag on a
|
|
66
|
+
comment.
|
|
67
|
+
- **Comment → instruction escalation** as an explicit one-way action with a backlink.
|
|
68
|
+
- **A per-file instruction queue** with an enumerated **"Send N to agent"** dispatch. Nothing
|
|
69
|
+
dispatches on creation.
|
|
70
|
+
- **One run per send**: the batch of instructions goes as a single agent dispatch carrying
|
|
71
|
+
whole-file context; returned changes correlate to that run and to each instruction.
|
|
72
|
+
- **Batch review, all-or-nothing** for v1: Accept applies the whole run, Discard drops it.
|
|
73
|
+
- Markdown: changes land as `activity record`s (existing tier-2 path), reviewed inline, tagged
|
|
74
|
+
with the run id.
|
|
75
|
+
- Web: agent returns a staged preview set bound to one previewId, reviewed in the overlay.
|
|
76
|
+
- **Rename the user-facing verb** from "Ask agent"/"Tweak" to Instruct / Send to agent, with
|
|
77
|
+
matching review vocabulary across both surfaces.
|
|
78
|
+
|
|
79
|
+
## Non-goals (this change)
|
|
80
|
+
|
|
81
|
+
- **Generate variants** (N alternatives for one target, switch-and-accept). High value,
|
|
82
|
+
documented as **step 2**, built after this lands. Out of scope here.
|
|
83
|
+
- **Per-item / partial batch accept.** v1 is all-or-nothing. Per-item accept reintroduces
|
|
84
|
+
multi-file atomicity / partial-commit rollback that were deliberately deferred.
|
|
85
|
+
- **Merging the two write engines.** Markdown keeps write-first-then-review (tier-2
|
|
86
|
+
activity/audit provenance); web keeps write-on-accept (tier-1 candidate patch). This change unifies the
|
|
87
|
+
*surface language and workflow*, not the engines. Line reviewers must enforce that no code
|
|
88
|
+
path writes disk/provenance outside the two canonical commit paths.
|
|
89
|
+
- Multi-file candidate writes for web (still single-file per v1 web-tweak constraint).
|
|
90
|
+
- Real LLM handler wiring (separate track); the passthrough/dev runner remains the reference.
|
|
91
|
+
- Comment *replies/resolve* threading changes beyond what already exists.
|
|
92
|
+
|
|
93
|
+
## Risks
|
|
94
|
+
|
|
95
|
+
- **Annotation chrome.** Two similar pin types can clutter the document. Mitigate with one
|
|
96
|
+
unified annotation presentation, restrained visual distinction, and filters, not two
|
|
97
|
+
separate-looking subsystems.
|
|
98
|
+
- **Instruction-as-comment by habit.** Users type a work order into a comment. Mitigate with
|
|
99
|
+
the explicit "Turn into an instruction" action and clear iconography.
|
|
100
|
+
- **Scope creep toward a unified Accept abstraction.** Rejected earlier. Keep two review
|
|
101
|
+
mechanisms; unify only wording/affordances.
|
|
102
|
+
- **Correlation UX.** Users must see which returned change answers which instruction. Needs a
|
|
103
|
+
run id threaded from send → each resulting activity/audit provenance / preview item.
|
|
104
|
+
- **Outstanding-request invariant.** Today one request is outstanding per session. Collective
|
|
105
|
+
send is still one dispatch, so the invariant holds; the request now carries N instruction
|
|
106
|
+
items instead of one.
|
|
107
|
+
|
|
108
|
+
## Acceptance criteria
|
|
109
|
+
|
|
110
|
+
1. A user can create a **comment** (human, never mutates the file) and an **instruction**
|
|
111
|
+
(agent work order) on a Markdown block, visually distinct.
|
|
112
|
+
2. A user can create instructions on 2+ blocks with **no agent request firing**, then trigger
|
|
113
|
+
a single file-level **"Send N to agent"** that dispatches them in one run.
|
|
114
|
+
3. The **send dialog enumerates** exactly which instructions/targets are going.
|
|
115
|
+
4. A **comment can be escalated** to an instruction via an explicit one-way action; the
|
|
116
|
+
original comment is not silently changed.
|
|
117
|
+
5. The same collect → send → batch-review rhythm works in **web tweak** (instructions on
|
|
118
|
+
elements, one Send, one preview run).
|
|
119
|
+
6. The agent receives whole-file context plus the instruction set in one dispatch.
|
|
120
|
+
7. The batched response is reviewable as a set; **Accept applies the whole run, Discard drops
|
|
121
|
+
it** (all-or-nothing), with no partial writes on failure.
|
|
122
|
+
8. Each returned change is **visibly correlated** to the instruction it answers (run id +
|
|
123
|
+
per-item linkage).
|
|
124
|
+
9. **No new write path**: Markdown via tier-2 `applyOps`; web via existing candidate-patch
|
|
125
|
+
accept. Verified by test + review.
|
|
126
|
+
10. The user-facing verb is **Instruct / Send to agent** (no "Ask agent"), with matching
|
|
127
|
+
review controls/wording on both surfaces.
|
|
128
|
+
11. Test floor holds; new tests cover: two kinds, escalation, collective dispatch, batch
|
|
129
|
+
review, all-or-nothing failure.
|
|
130
|
+
|
|
131
|
+
## Sequencing
|
|
132
|
+
|
|
133
|
+
1. **This change** — two kinds (comment/instruction) + escalation + per-file instruction
|
|
134
|
+
queue + single Send + all-or-nothing batch review, on both surfaces, sharing vocabulary.
|
|
135
|
+
Also the moment the weak Markdown "Ask agent" fire-and-forget UX is replaced by the
|
|
136
|
+
collect/send/review loop.
|
|
137
|
+
2. **Step 2 (separate proposal): generate variants** — single target, N staged candidates,
|
|
138
|
+
in-frame/inline switcher, Accept the selected one. The impeccable-native differentiator.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Requirements: collective agent review
|
|
2
|
+
|
|
3
|
+
Each requirement is observable behavior. Scenarios use GIVEN / WHEN / THEN.
|
|
4
|
+
|
|
5
|
+
## R1 — Two annotation kinds on a Markdown block
|
|
6
|
+
|
|
7
|
+
A block-anchored annotation is either a **comment** (human) or an **instruction** (agent work
|
|
8
|
+
order). They are visually distinct and behave differently.
|
|
9
|
+
|
|
10
|
+
- GIVEN a selected Markdown block
|
|
11
|
+
- WHEN the user opens the annotation affordance
|
|
12
|
+
- THEN they can create a **Comment** (human discussion) or an **Instruction** (agent work
|
|
13
|
+
order), each with distinct icon/label
|
|
14
|
+
- AND creating either one does **not** dispatch any agent request
|
|
15
|
+
|
|
16
|
+
## R2 — Comment never mutates the file
|
|
17
|
+
|
|
18
|
+
- GIVEN a comment exists on a block
|
|
19
|
+
- WHEN the user sends instructions to the agent (R5)
|
|
20
|
+
- THEN the comment is **not** included and never causes a file edit
|
|
21
|
+
|
|
22
|
+
## R3 — Explicit comment → instruction escalation
|
|
23
|
+
|
|
24
|
+
- GIVEN an existing comment
|
|
25
|
+
- WHEN the user chooses "Turn into an instruction"
|
|
26
|
+
- THEN a new instruction is created for the same block, carrying the comment's text, with a
|
|
27
|
+
backlink to the original comment
|
|
28
|
+
- AND the original comment is left unchanged (not silently retyped or deleted)
|
|
29
|
+
- AND there is no persistent audience toggle that flips a note between kinds
|
|
30
|
+
|
|
31
|
+
## R4 — Instructions accumulate without firing
|
|
32
|
+
|
|
33
|
+
- GIVEN the user creates instructions on 2+ different blocks
|
|
34
|
+
- WHEN each instruction is created
|
|
35
|
+
- THEN no agent request is dispatched
|
|
36
|
+
- AND a per-file indicator shows the count, e.g. "3 instructions ready"
|
|
37
|
+
|
|
38
|
+
## R5 — Single enumerated batch send
|
|
39
|
+
|
|
40
|
+
- GIVEN 1+ unsent instructions exist for the current file
|
|
41
|
+
- WHEN the user clicks "Send N to agent"
|
|
42
|
+
- THEN a confirmation lists exactly which instructions (text + target block) will be sent
|
|
43
|
+
- AND on confirm, all listed instructions are dispatched as **one run** (single live request
|
|
44
|
+
carrying N instruction items) with whole-file context
|
|
45
|
+
- AND while a run is outstanding, a second send is refused with a clear message (one
|
|
46
|
+
outstanding run per session)
|
|
47
|
+
|
|
48
|
+
## R6 — Batch response correlates to instructions
|
|
49
|
+
|
|
50
|
+
- GIVEN a run was sent with N instructions
|
|
51
|
+
- WHEN the agent responds
|
|
52
|
+
- THEN the returned changes are associated with that run id
|
|
53
|
+
- AND each returned change is linked to the instruction it answers (so the UI can show
|
|
54
|
+
"this change answers instruction X")
|
|
55
|
+
|
|
56
|
+
## R7 — All-or-nothing batch review (Markdown)
|
|
57
|
+
|
|
58
|
+
- GIVEN an agent run produced M activity/audit provenance changes for the current file
|
|
59
|
+
- WHEN the user Accepts the run
|
|
60
|
+
- THEN all M changes are accepted together
|
|
61
|
+
- WHEN the user Discards the run
|
|
62
|
+
- THEN all M changes are reverted together
|
|
63
|
+
- AND if applying any change fails, no partial state is committed (existing tier-2
|
|
64
|
+
baseRevision / STALE_REVISION semantics still hold per change)
|
|
65
|
+
|
|
66
|
+
## R8 — Same rhythm on web tweak
|
|
67
|
+
|
|
68
|
+
- GIVEN a static-HTML page in Tweak mode
|
|
69
|
+
- WHEN the user pins instructions to 2+ elements
|
|
70
|
+
- THEN no request fires per element
|
|
71
|
+
- WHEN the user clicks "Send N to agent"
|
|
72
|
+
- THEN the instructions dispatch as one run
|
|
73
|
+
- AND the agent returns a staged preview set (write-on-accept, source clean) reviewed as a
|
|
74
|
+
batch: Accept commits the run, Discard drops it
|
|
75
|
+
|
|
76
|
+
## R9 — Verb rename
|
|
77
|
+
|
|
78
|
+
- GIVEN either surface
|
|
79
|
+
- THEN the user-facing action is **Instruct** / **Send to agent** (no "Ask agent" wording)
|
|
80
|
+
- AND Markdown and web use matching review vocabulary (e.g. "Accept run" / "Discard run")
|
|
81
|
+
|
|
82
|
+
## R10 — No new write path
|
|
83
|
+
|
|
84
|
+
- THEN Markdown changes are written only through the existing tier-2 `applyOps`
|
|
85
|
+
- AND web changes are written only through the existing web-tweak candidate-patch accept
|
|
86
|
+
- AND no code path writes document bytes or provenance outside those two commit paths
|
|
87
|
+
|
|
88
|
+
## R11 — Backward compatibility
|
|
89
|
+
|
|
90
|
+
- GIVEN existing files with only legacy comments (no instructions)
|
|
91
|
+
- THEN they load and render unchanged
|
|
92
|
+
- AND the additive annotation-kind field is nullable/defaulted so old sidecars and old event
|
|
93
|
+
consumers are unaffected
|
|
94
|
+
- AND the frozen async `recover` path is untouched
|
|
95
|
+
|
|
96
|
+
## R12 — Non-goals stay out
|
|
97
|
+
|
|
98
|
+
- THEN there is no variant generation (N alternatives per target) in this change
|
|
99
|
+
- AND there is no per-item partial accept of a run
|
|
100
|
+
- AND the two persistence engines are not merged
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Tasks: collective agent review
|
|
2
|
+
|
|
3
|
+
Ordered, checkable. Mark complete only after verification.
|
|
4
|
+
|
|
5
|
+
## Phase 1 — Data model (Markdown)
|
|
6
|
+
|
|
7
|
+
- [ ] T1. Add `AnnotationKind` + optional `kind`, `instructionState`, `runId`, `fromCommentId`
|
|
8
|
+
to `Comment` in `src/lib/proof/types.ts`.
|
|
9
|
+
- [ ] T2. Sidecar read/write: persist and load new fields; legacy rows (no `kind`) load as
|
|
10
|
+
comments. Add test.
|
|
11
|
+
|
|
12
|
+
## Phase 2 — Live store run model
|
|
13
|
+
|
|
14
|
+
- [ ] T3. Extend `LiveRequest` with `items: LiveInstructionItem[] | null` and
|
|
15
|
+
`runId: string | null`; add columns (nullable) + migration-safe CREATE.
|
|
16
|
+
- [ ] T4. `enqueueRequest` accepts `items[]` + `runId`; keep single-instruction path. Preserve
|
|
17
|
+
one-outstanding invariant (BEGIN IMMEDIATE). Add test.
|
|
18
|
+
- [ ] T5. Poll response + `toRequest` include `items` + `runId`.
|
|
19
|
+
|
|
20
|
+
## Phase 3 — Human API
|
|
21
|
+
|
|
22
|
+
- [ ] T6. `POST /api/wiki/live/request`: accept `items[]`, generate/echo `runId`, 409 on
|
|
23
|
+
outstanding run. Legacy body still works.
|
|
24
|
+
- [ ] T7. `GET /api/wiki/live/status`: include `runId` + item count.
|
|
25
|
+
|
|
26
|
+
## Phase 4 — Markdown UI
|
|
27
|
+
|
|
28
|
+
- [ ] T8. Bubble menu + view-mode: split into **Comment** and **Instruct** actions; add
|
|
29
|
+
`openInstructForSelection` that creates a draft instruction (no dispatch).
|
|
30
|
+
- [ ] T9. Replace `AskAgentPopover` immediate-send with a draft-instruction editor.
|
|
31
|
+
- [ ] T10. Comment card: **"Turn into an instruction"** action (sets `fromCommentId`).
|
|
32
|
+
- [ ] T11. File-level queue bar: "N instructions ready · Send to agent" + enumerated confirm
|
|
33
|
+
dialog → POST run.
|
|
34
|
+
- [ ] T12. Group activity-log provenance by `runId`; add **Accept run / Discard run** controls (all-or-
|
|
35
|
+
nothing) alongside existing per-span controls.
|
|
36
|
+
|
|
37
|
+
## Phase 5 — Web tweak parity
|
|
38
|
+
|
|
39
|
+
- [ ] T13. Per-file web instruction list (draft) keyed by workspace+path.
|
|
40
|
+
- [ ] T14. Picker pins an instruction to an element (no dispatch); same queue bar + Send.
|
|
41
|
+
- [ ] T15. Associate `previewId` with `runId`; overlay reviews the run (Accept run / Discard
|
|
42
|
+
run), relabeled.
|
|
43
|
+
|
|
44
|
+
## Phase 6 — Rename + correlation
|
|
45
|
+
|
|
46
|
+
- [ ] T16. Retire "Ask agent"/"Tweak" verbs in user-facing UI → **Instruct / Send to agent**;
|
|
47
|
+
matching review vocabulary both surfaces.
|
|
48
|
+
- [ ] T17. Thread `runId` into activity/audit provenance provenance (ActivityAttrs) so results correlate to the
|
|
49
|
+
run and to each instruction item.
|
|
50
|
+
|
|
51
|
+
## Phase 7 — Agent runtime
|
|
52
|
+
|
|
53
|
+
- [ ] T18. `wiki-viewer-mcp` LiveClient/runLiveLoop: handle `items[]` batch requests; apply
|
|
54
|
+
tier-2 ops per item; correlation/idempotency derived from `runId`/`requestId`.
|
|
55
|
+
- [ ] T19. Passthrough reference handler processes batch items.
|
|
56
|
+
|
|
57
|
+
## Phase 8 — Verify
|
|
58
|
+
|
|
59
|
+
- [ ] T20. Tests: kinds persist, escalation, batch enqueue, poll items, run correlation,
|
|
60
|
+
accept/discard run all-or-nothing, web parity, no "Ask agent" string.
|
|
61
|
+
- [ ] T21. `pnpm typecheck`, `pnpm lint`, `pnpm test` (floor holds), mcp `npm test`.
|
|
62
|
+
- [ ] T22. reviewer pass on the diff (security, backward compat, no new write path).
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Design: Live agent collaboration
|
|
2
|
+
|
|
3
|
+
## Key realization from code exploration
|
|
4
|
+
|
|
5
|
+
The existing tier-2 commit path (`applyOps` in `src/lib/proof/ops-applier.ts:457`) already
|
|
6
|
+
IS the `exact` preflight policy for the parts that matter:
|
|
7
|
+
|
|
8
|
+
- It compares `baseRevision` to `sidecar.revision` and returns `409 STALE_REVISION` on mismatch
|
|
9
|
+
(`ops-applier.ts:509-523`).
|
|
10
|
+
- It resolves the target `blockRef` via `resolveRef`; a vanished ref fails the op.
|
|
11
|
+
- AI writers (`by: "ai:<id>"`) already get `activity record` wrapping (`cleanMarkdownCommit`,
|
|
12
|
+
`ops-applier.ts:94-160`) with a `ActivityAttrs` that already carries `inResponseTo`.
|
|
13
|
+
- The HTTP route `POST /api/agent/files/[...path]` already enforces `Idempotency-Key`
|
|
14
|
+
(route.ts:96-132): same key + same payload returns the cached response; same key + different
|
|
15
|
+
payload returns `409 IDEMPOTENCY_KEY_REUSED`.
|
|
16
|
+
|
|
17
|
+
Therefore the live channel adds **no new write path and no schema change to the commit
|
|
18
|
+
engine**. It is a control plane that:
|
|
19
|
+
|
|
20
|
+
1. carries a human's intent (selected block + instruction) to an attached agent, and
|
|
21
|
+
2. tracks the session/request lifecycle,
|
|
22
|
+
|
|
23
|
+
while the agent performs the edit through the existing `POST /api/agent/files/[...path]` with:
|
|
24
|
+
|
|
25
|
+
- `Idempotency-Key: live:<requestId>` (deterministic replay safety), and
|
|
26
|
+
- op `inResponseTo: "live:<requestId>"` (provenance correlation into `ActivityAttrs.inResponseTo`).
|
|
27
|
+
|
|
28
|
+
The editor already reloads snapshot+sidecar via the browser SSE filesystem watch
|
|
29
|
+
(`use-document-watch.ts:55-77`) when `applyOps` writes the `.md`, so the live channel does
|
|
30
|
+
**not** push edits to the client. It only carries intent to the agent and lifecycle to both.
|
|
31
|
+
|
|
32
|
+
This keeps us strictly in "stance 1": one commit engine, live path is exact-fail-closed by
|
|
33
|
+
reusing `applyOps` as-is. The `recover` machinery stays for async/MCP and is untouched.
|
|
34
|
+
|
|
35
|
+
## Components
|
|
36
|
+
|
|
37
|
+
### 1. Live store — `src/lib/proof/live/store.ts`
|
|
38
|
+
|
|
39
|
+
SQLite, following `src/lib/shared-docs/db.ts` (lazy singleton, WAL, inline
|
|
40
|
+
`CREATE TABLE IF NOT EXISTS`). New db file `~/.wiki-viewer/live.db`.
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
live_session(
|
|
44
|
+
id TEXT PRIMARY KEY, -- session id
|
|
45
|
+
workspace_id TEXT NOT NULL,
|
|
46
|
+
agent_id TEXT, -- attached agent, null until attach
|
|
47
|
+
state TEXT NOT NULL, -- 'open' | 'closed'
|
|
48
|
+
created_at INTEGER NOT NULL,
|
|
49
|
+
agent_last_seen INTEGER -- updated each long-poll; presence/lease
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
live_request(
|
|
53
|
+
id TEXT PRIMARY KEY, -- request id -> Idempotency-Key live:<id>
|
|
54
|
+
session_id TEXT NOT NULL,
|
|
55
|
+
workspace_id TEXT NOT NULL,
|
|
56
|
+
path TEXT NOT NULL, -- relative md path
|
|
57
|
+
block_ref TEXT, -- selected block (null for steer/accept/discard)
|
|
58
|
+
base_revision INTEGER, -- revision at selection time
|
|
59
|
+
kind TEXT NOT NULL, -- 'generate' | 'steer' | 'accept' | 'discard' | 'exit'
|
|
60
|
+
instruction TEXT, -- freeform prompt (generate/steer)
|
|
61
|
+
state TEXT NOT NULL, -- 'pending' | 'delivered' | 'working' | 'resolved' | 'stale' | 'error'
|
|
62
|
+
outcome TEXT, -- 'accepted' | 'reverted' | null
|
|
63
|
+
seq INTEGER NOT NULL, -- monotonic per workspace for ordered delivery
|
|
64
|
+
created_at INTEGER NOT NULL,
|
|
65
|
+
delivered_at INTEGER,
|
|
66
|
+
resolved_at INTEGER
|
|
67
|
+
)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Store API (sync, better-sqlite3-style wrapper `src/lib/sqlite.ts`):
|
|
71
|
+
`openOrGetSession`, `attachAgent`, `touchAgent`, `closeSession`, `enqueueRequest`,
|
|
72
|
+
`nextPendingRequest(workspaceId, afterSeq)`, `markDelivered`, `markState`, `getSession`,
|
|
73
|
+
`getRequest`, `latestOpenSessionForWorkspace`.
|
|
74
|
+
|
|
75
|
+
Presence rule: an agent is "attached" if a session has `agent_id` set and
|
|
76
|
+
`agent_last_seen` within a lease TTL (e.g. 45s). No separate heartbeat; the held long-poll
|
|
77
|
+
updates `agent_last_seen`.
|
|
78
|
+
|
|
79
|
+
### 2. Agent-facing transport — `src/app/api/agent/live/`
|
|
80
|
+
|
|
81
|
+
All routes: `checkAuth(req)` -> `resolveWorkspaceForAgent(req)` -> `enforceScope(...)`.
|
|
82
|
+
|
|
83
|
+
- `POST /api/agent/live/attach` — body `{ sessionId? }`. Creates/attaches a session for the
|
|
84
|
+
agent+workspace, returns `{ sessionId }`. Idempotent per agent+workspace (reuses latest open
|
|
85
|
+
session).
|
|
86
|
+
- `GET /api/agent/live/poll?sessionId=&afterSeq=` — **long-poll**. Held open up to ~25s using
|
|
87
|
+
a `ReadableStream`-free promise+interval loop (mirrors the heartbeat pattern of
|
|
88
|
+
`/api/wiki/watch/route.ts:274`). On each tick, `touchAgent` and check
|
|
89
|
+
`nextPendingRequest`; when found, `markDelivered` and return the event JSON `{ type, request }`;
|
|
90
|
+
on timeout return `{ type: "timeout" }`. This held request IS presence.
|
|
91
|
+
- `POST /api/agent/live/reply` — body `{ requestId, status }` where status is
|
|
92
|
+
`working | done | error`. Updates `live_request.state`. `done` on a generate/steer means the
|
|
93
|
+
agent finished committing (the actual edit already landed via tier-2).
|
|
94
|
+
|
|
95
|
+
The agent commits the edit itself via existing `POST /api/agent/files/[...path]` with the
|
|
96
|
+
deterministic idempotency key and `inResponseTo`. The live channel never writes files.
|
|
97
|
+
|
|
98
|
+
### 3. Human-facing dispatch — `src/app/api/wiki/live/`
|
|
99
|
+
|
|
100
|
+
Session-authed (Better Auth), CSRF-checked like other `/api/wiki/*` mutations.
|
|
101
|
+
|
|
102
|
+
- `POST /api/wiki/live/request` — body `{ path, blockRef?, baseRevision?, kind, instruction? }`.
|
|
103
|
+
Resolves the workspace for the user, finds/creates the open session, enqueues a
|
|
104
|
+
`live_request`. Returns `{ requestId, seq }`.
|
|
105
|
+
- `GET /api/wiki/live/status?path=` — returns `{ attached: boolean, session, lastRequest }`
|
|
106
|
+
so the editor can show whether an agent is on the line and the current turn state.
|
|
107
|
+
|
|
108
|
+
Accept/revert are dispatched here too (`kind: 'accept' | 'discard'`) purely as notifications
|
|
109
|
+
to the session; the actual activity tracking of the activity/audit provenance happens through the existing editor
|
|
110
|
+
suggestion/proof UI and its normal API.
|
|
111
|
+
|
|
112
|
+
### 4. Editor UI — `src/components/editor/`
|
|
113
|
+
|
|
114
|
+
- Add `onAskAgent` to `EditorBubbleMenu` (bubble-menu.tsx) beside `onSuggestEdit`/`onComment`.
|
|
115
|
+
- In `editor.tsx`, implement `openAskAgentForSelection()` using existing `resolveSelectionBlock()`
|
|
116
|
+
(editor.tsx:236) to get `{ blockRef, markdown }`, plus `currentPath` and current snapshot
|
|
117
|
+
`revision`. Open a small popover to type the instruction, then
|
|
118
|
+
`POST /api/wiki/live/request { kind: 'generate', path, blockRef, baseRevision, instruction }`.
|
|
119
|
+
- A minimal "Live" status indicator (attached / waiting / working) driven by
|
|
120
|
+
`GET /api/wiki/live/status`. Steer = same popover again while a turn is open.
|
|
121
|
+
- Proof-span appears through the existing SSE-watch reload; activity tracking use existing UI.
|
|
122
|
+
|
|
123
|
+
## Correctness
|
|
124
|
+
|
|
125
|
+
- **Stale intent:** the request stores `base_revision` at selection time. The agent must POST
|
|
126
|
+
with that `baseRevision`. If the human edited meanwhile, `applyOps` returns `STALE_REVISION`;
|
|
127
|
+
the agent replies `error`, the request is marked `stale`, UI asks for a fresh selection. No
|
|
128
|
+
silent re-interpretation.
|
|
129
|
+
- **Replay:** `Idempotency-Key = live:<requestId>` makes a re-POST after agent crash return the
|
|
130
|
+
cached result; no duplicate edit. The request id is stable in `live_request`, so recovery
|
|
131
|
+
reuses it.
|
|
132
|
+
- **One outstanding request per session:** `enqueueRequest` rejects a new `generate` while the
|
|
133
|
+
session has a non-terminal request. Reviewer-approved v1 constraint.
|
|
134
|
+
- **Presence ambiguity:** `agent_last_seen` + TTL. Timeout => not attached. Reconnect resumes
|
|
135
|
+
from `afterSeq` (last delivered seq).
|
|
136
|
+
|
|
137
|
+
## What we deliberately do NOT build
|
|
138
|
+
|
|
139
|
+
Restated from proposal non-goals; enforced in review: no helper server, no injected JS, no HMR,
|
|
140
|
+
no variants, no second write path / `applyLiveEdit`, no async-machinery deletion, no fuzzy
|
|
141
|
+
recovery on the live path.
|