diff --git a/05_Official_Plugins.md b/05_Official_Plugins.md index 55d5f33..27852bd 100644 --- a/05_Official_Plugins.md +++ b/05_Official_Plugins.md @@ -253,8 +253,8 @@ global captures. The local receiver now has an opt-in paired mode that requires Inbox stores plugin-owned `domainBindings` and routes unscoped captures with an exact domain match into the bound workspace queue. Its first conversion workflow creates ordinary Markdown notes through the public Files API and publishes a -`browser.capture.converted` event. Link/file/activity-specific conversions are -still future work. +`browser.capture.converted` event, which Activity records through its public +provider subscription. Link/file-specific conversions are still future work. ## 9. `official.search` diff --git a/07_Full_Implementation_Roadmap.md b/07_Full_Implementation_Roadmap.md index 4e3b526..eb46e0c 100644 --- a/07_Full_Implementation_Roadmap.md +++ b/07_Full_Implementation_Roadmap.md @@ -56,8 +56,9 @@ Known remaining gaps: rendering through the public Files API. - Browser extension repository has protocol, queue, and Chromium/Firefox build scaffold; desktop has a local receiver and mounted-view inbox plugin; receiver - pairing, basic Browser Inbox domain binding, and create-note conversion are - implemented, but link/file/activity-specific conversion workflows remain. + pairing, basic Browser Inbox domain binding, create-note conversion, and + Activity recording for conversions are implemented, but link/file-specific + conversion workflows remain. - Packaging/update/release workflow is not product-grade yet. ## 4. Implementation Phases @@ -166,7 +167,8 @@ Tasks: - [x] define local receiver permission/pairing model; - [x] add domain-to-workspace binding; - [x] convert inbox entries into notes through public plugin APIs; -- convert inbox entries into links/files/activity events through public +- [x] record converted inbox entries in Activity through public plugin events; +- convert inbox entries into links/files through public plugin APIs. Verification: @@ -237,7 +239,7 @@ Verification: 4. [x] Notes trash/delete UX in `verstak-official-plugins`. 5. [x] Sync hardening pass with expanded real two-vault smoke. 6. [~] Browser inbox protocol design, extension scaffold, local receiver, and - minimal inbox plugin are implemented; link/file/activity conversions remain. + minimal inbox plugin are implemented; link/file conversions remain. This order finishes generic platform surfaces before building product features that depend on them. diff --git a/docs/superpowers/plans/2026-06-29-browser-inbox-conversion-activity.md b/docs/superpowers/plans/2026-06-29-browser-inbox-conversion-activity.md new file mode 100644 index 0000000..684f58e --- /dev/null +++ b/docs/superpowers/plans/2026-06-29-browser-inbox-conversion-activity.md @@ -0,0 +1,92 @@ +# Browser Inbox Conversion Activity Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Record Browser Inbox note conversions in Activity through the public `browser.capture.converted` event. + +**Architecture:** Keep plugins decoupled. Browser Inbox already publishes `browser.capture.converted`; Activity subscribes to that event through its normal frontend event list and manifest `activityProviders` contribution. + +**Tech Stack:** Plain JavaScript official plugins, Node smoke test harness, plugin manifest, Markdown docs. + +## Global Constraints + +- Do not add a direct Browser Inbox to Activity API. +- Do not move conversion recording into desktop core. +- Use only public event subscription behavior. +- Use TDD: write the failing Activity smoke test first, run it red, then implement. + +--- + +### Task 1: Activity Conversion Event Recording + +**Files:** +- Modify: `/home/mirivlad/git/verstak2/verstak-official-plugins/scripts/smoke-activity-plugin.js` +- Modify: `/home/mirivlad/git/verstak2/verstak-official-plugins/plugins/activity/frontend/src/index.js` +- Modify: `/home/mirivlad/git/verstak2/verstak-official-plugins/plugins/activity/plugin.json` + +**Interfaces:** +- Consumes: `browser.capture.converted` event payload from Browser Inbox. +- Produces: stored Activity entry using the existing activity event model. + +- [ ] **Step 1: Write the failing smoke test** + +In `scripts/smoke-activity-plugin.js`, add `browser.capture.converted` to the +required subscription checks and dispatch a workspace-scoped conversion event. +Assert it is stored, rendered, and included in worklog suggestion event ids. + +- [ ] **Step 2: Run RED** + +Run: + +```bash +cd /home/mirivlad/git/verstak2/verstak-official-plugins +PATH=/tmp/verstak2-tools:/home/mirivlad/.lmstudio/.internal/utils:$PATH node scripts/smoke-activity-plugin.js +``` + +Expected: fails because Activity does not subscribe to +`browser.capture.converted`. + +- [ ] **Step 3: Implement event subscription** + +Add `browser.capture.converted` to `ACTIVITY_EVENTS` in +`plugins/activity/frontend/src/index.js` and to +`contributes.activityProviders[0].events` in `plugins/activity/plugin.json`. + +- [ ] **Step 4: Run GREEN** + +Run: + +```bash +cd /home/mirivlad/git/verstak2/verstak-official-plugins +PATH=/tmp/verstak2-tools:/home/mirivlad/.lmstudio/.internal/utils:$PATH node scripts/smoke-activity-plugin.js +PATH=/tmp/verstak2-tools/venv/bin:/tmp/verstak2-tools:/home/mirivlad/.lmstudio/.internal/utils:$PATH ./scripts/check.sh +``` + +Expected: both commands exit 0. + +### Task 2: Roadmap Documentation + +**Files:** +- Modify: `/home/mirivlad/git/verstak2/verstak-docs/05_Official_Plugins.md` +- Modify: `/home/mirivlad/git/verstak2/verstak-docs/07_Full_Implementation_Roadmap.md` + +**Interfaces:** +- Consumes verified Activity recording behavior. +- Produces docs that mark Activity integration for capture conversion complete. + +- [ ] **Step 1: Update docs** + +Describe that `browser.capture.converted` is recorded by Activity and that +link/file-specific conversions remain. + +- [ ] **Step 2: Verify docs** + +Run: + +```bash +cd /home/mirivlad/git/verstak2/verstak-docs +git diff --check +rg -n "browser.capture.converted|link/file" 05_Official_Plugins.md 07_Full_Implementation_Roadmap.md +``` + +Expected: `git diff --check` exits 0 and `rg` shows updated status lines. diff --git a/docs/superpowers/specs/2026-06-29-browser-inbox-conversion-activity-design.md b/docs/superpowers/specs/2026-06-29-browser-inbox-conversion-activity-design.md new file mode 100644 index 0000000..e81d582 --- /dev/null +++ b/docs/superpowers/specs/2026-06-29-browser-inbox-conversion-activity-design.md @@ -0,0 +1,50 @@ +# Browser Inbox Conversion Activity Design + +## Purpose + +Browser Inbox now publishes `browser.capture.converted` when a capture becomes +a Markdown note. Activity should record that conversion through the same public +event subscription model it already uses for file, note, workspace, and browser +capture events. + +## Scope + +This slice wires one public event into `verstak.activity`: + +- subscribe to `browser.capture.converted`; +- declare the event in the Activity plugin `activityProviders` contribution; +- store and render conversion activity in the existing workspace/global streams; +- include conversion events in worklog reconstruction. + +It does not add a direct Browser Inbox to Activity API, special conversion UI, +or new desktop core behavior. + +## Event Shape + +Browser Inbox emits: + +```js +{ + captureId: "capture-id", + conversionType: "note", + notePath: "Project/Notes/Example.md", + workspaceRootPath: "Project", + title: "Example", + url: "https://example.com", + sourcePluginId: "verstak.browser-inbox" +} +``` + +Activity stores the event using its normal event normalization. The title should +come from `payload.title`; summary should naturally include the best available +payload text such as `notePath` through the existing summary logic. + +## Testing + +`scripts/smoke-activity-plugin.js` must prove: + +- `browser.capture.converted` is subscribed by the Activity frontend; +- the Activity manifest advertises the event in `activityProviders`; +- a workspace-scoped conversion event is stored under that workspace key; +- the rendered Activity view includes the conversion title and event type; +- worklog suggestions include the conversion event id.