Files
summercms/.planning/phases/20-demo-instance-with-every-shared-plugin/20-03-PLAN.md
2026-10-28 18:39:49 +01:00

49 KiB

phase, plan, type, wave, depends_on, files_modified, autonomous, requirements, estimate, must_haves
phase plan type wave depends_on files_modified autonomous requirements estimate must_haves
20-demo-instance-with-every-shared-plugin 03 execute 3
20-02
../vue-chat-layer/.gitignore
../vue-chat-layer/.nvmrc
../vue-chat-layer/package.json
../vue-chat-layer/pnpm-lock.yaml
../vue-chat-layer/pnpm-workspace.yaml
../vue-chat-layer/tsconfig.json
../vue-chat-layer/nuxt.config.ts
../vue-chat-layer/vitest.config.ts
../vue-chat-layer/README.md
../vue-chat-layer/.playground/nuxt.config.ts
../vue-chat-layer/.playground/app/app.vue
../vue-chat-layer/app/lib/client.ts
../vue-chat-layer/app/lib/types.ts
../vue-chat-layer/app/lib/realtime.ts
../vue-chat-layer/app/lib/chatEvents.ts
../vue-chat-layer/app/lib/chatFormat.ts
../vue-chat-layer/app/lib/chatText.ts
../vue-chat-layer/app/lib/chatUnread.ts
../vue-chat-layer/app/lib/linkEmbeds.ts
../vue-chat-layer/app/lib/format.ts
../vue-chat-layer/app/lib/media.ts
../vue-chat-layer/app/lib/tabs.ts
../vue-chat-layer/app/composables/useChatApi.ts
../vue-chat-layer/app/composables/useChat.ts
../vue-chat-layer/app/composables/useChatNotice.ts
../vue-chat-layer/app/components/Chat/Page.vue
../vue-chat-layer/app/components/Chat/ChannelList.vue
../vue-chat-layer/app/components/Chat/Panel.vue
../vue-chat-layer/app/components/Chat/MessageList.vue
../vue-chat-layer/app/components/Chat/Message.vue
../vue-chat-layer/app/components/Chat/Composer.vue
../vue-chat-layer/app/components/Chat/Header.vue
../vue-chat-layer/app/components/Chat/DmList.vue
../vue-chat-layer/app/components/Chat/MemberPicker.vue
../vue-chat-layer/app/components/Chat/MentionPopup.vue
../vue-chat-layer/app/components/Chat/ReactionBar.vue
../vue-chat-layer/app/components/Chat/LinkEmbed.vue
../vue-chat-layer/app/components/Chat/StagingChips.vue
../vue-chat-layer/app/components/Chat/DeleteDialog.vue
../vue-chat-layer/app/components/Chat/Avatar.vue
../vue-chat-layer/app/components/Chat/ThreadPane.vue
../vue-chat-layer/app/components/Chat/PinsPanel.vue
../vue-chat-layer/app/components/Chat/CommandPicker.vue
../vue-chat-layer/app/components/Chat/FloatingPanel.vue
../vue-chat-layer/app/components/Chat/Icon.vue
../vue-chat-layer/app/components/Chat/Notices.vue
../vue-chat-layer/app/assets/css/chat-tokens.css
../vue-chat-layer/app/assets/css/chat-base.css
../vue-chat-layer/i18n/locales/en.json
../vue-chat-layer/i18n/locales/pl.json
../vue-chat-layer/tests/smoke.test.ts
../sm-demo-app/vue-demo-app/package.json
../sm-demo-app/vue-demo-app/pnpm-lock.yaml
../sm-demo-app/vue-demo-app/nuxt.config.ts
../sm-demo-app/vue-demo-app/app/plugins/auth.ts
../sm-demo-app/vue-demo-app/app/layouts/default.vue
../sm-demo-app/vue-demo-app/app/pages/chat.vue
../sm-demo-app/vue-demo-app/app/pages/index.vue
../sm-demo-app/vue-demo-app/app/components/TourCard.vue
../sm-demo-app/vue-demo-app/app/lib/realtime.ts
../sm-demo-app/vue-demo-app/i18n/locales/en.json
../sm-demo-app/vue-demo-app/i18n/locales/pl.json
../sm-demo-app/scripts/check-chat.cjs
../sm-demo-app/scripts/check-local.sh
../sm-demo-app/scripts/smoke.sh
false
SC-2
D-01
D-02
D-03
D-04
D-05
D-07
D-20
D-22
D-23
tokens raw_tokens tasks confidence
380000 380000 6 low
truths artifacts key_links prohibitions
D-01: vue-chat-layer is a new shared Nuxt layer (own repository, tag v0.1.0) ported from the bm SPA's chat components, store, API client and chat libraries, with no Pinia (state is useState composables), no bm entity embeds and no name of a consuming application; host specifics enter only through runtime config (public.chat.hostApiBase), the $chatAuth hook, slots and the link-embed renderer registry.
D-02: on /chat a logged-in member sees the seeded channels in a sidebar, opens one, reads history, sends and edits messages, replies in threads (thread pane), sees typing, unread and mention counts, adds and removes reactions, attaches files, mentions members with @, picks a DM partner from the member picker, deletes own messages (moderators also others' in channels, D-22) through the delete dialog, sees channel pins and sees URLs as links with a generic link embed.
D-03: every page of vue-demo-app shows a floating chat panel (DM list and unread badge) for logged-in users (not on /chat and not on the full-screen deck pages); the homepage tour has a Chat card; the site is EN and PL.
D-04: an anonymous visitor on /chat sees a description and a register-to-chat link to /register?next=/chat; there is no read-only preview, and the floating panel is not rendered.
D-05: typing / at the start of the composer opens a command picker filled from GET /_chatbots/api/v1/commands; choosing or sending a command calls POST /_chatbots/api/v1/dispatch and shows the ephemeral answer only to the sender; there is no chatbots layer.
D-07: the layer offers no channel creation UI; members join and leave seeded channels.
D-23 (extension point): the conversation header exposes a slot that the layer renders only for DM conversations, so a call button placed there (plan 04) appears only in DMs.
SC-2: messages from another member arrive without reload through the shared Centrifuge client (one connection per page, shared with the presentations remote through vue-demo-app's app/lib/realtime.ts re-export).
After the Task 5 go-ahead, git.golem15.com/golem15/vue-chat-layer exists with tag v0.1.0 and vue-demo-app pins git+https://git.golem15.com/golem15/vue-chat-layer.git#v0.1.0 in a committed package.json and pnpm-lock.yaml.
path provides contains
../vue-chat-layer/nuxt.config.ts layer config: runtimeConfig chat.apiBase, public.chat.hostApiBase, css, i18n registration (no routes, no route rules) hostApiBase
path provides contains
../vue-chat-layer/app/composables/useChat.ts useState-based chat store (channels, DMs, threads, unread, typing, realtime) useState
path provides contains
../vue-chat-layer/app/lib/realtime.ts one shared Centrifuge client with connect, subscribe, presence, openChannel and onUserEvent onUserEvent
path provides contains
../vue-chat-layer/app/lib/linkEmbeds.ts linkify and the link-embed renderer registry (registerEmbedRenderer) registerEmbedRenderer
path provides contains
../vue-chat-layer/app/components/Chat/CommandPicker.vue slash command picker over the chatbots catalog and dispatch dispatch
path provides contains
../sm-demo-app/vue-demo-app/app/pages/chat.vue /chat: ChatPage for members, register prompt for anonymous visitors registerToChat
path provides contains
../sm-demo-app/scripts/check-chat.cjs Playwright check: the visitor sends a message in #general on /chat check-chat: ok
from to via pattern
../vue-chat-layer/app/composables/useChatApi.ts ../sm-demo-app/vue-demo-app/app/plugins/auth.ts the layer reads useNuxtApp().$chatAuth {token, refresh, unauthorized}; the app provides it chatAuth
from to via pattern
../vue-chat-layer/app/composables/useChat.ts ../sm-demo-app/plugins/demo/chat_api.go bootstrap GET {public.chat.hostApiBase}/chat and /chat/members hostApiBase
from to via pattern
../sm-demo-app/vue-demo-app/app/lib/realtime.ts ../vue-chat-layer/app/lib/realtime.ts re-export so presentations and chat share one connection vue-chat-layer/app/lib/realtime
from to via pattern
../sm-demo-app/vue-demo-app/app/layouts/default.vue ../vue-chat-layer/app/components/Chat/FloatingPanel.vue ClientOnly ChatFloatingPanel when logged in ChatFloatingPanel
statement status verification
vue-chat-layer names no consuming application and has no default host bootstrap path. unresolved automated
statement status verification
No message, name or attachment field is rendered with v-html except the escaped output of the ported chatText renderer. unresolved judgment
statement status verification
No Pinia and no new npm package except those already pinned in the workspace (centrifuge 5.7.3, @nuxtjs/i18n 10.4.0, vitest 3.2.7, nuxt 4.4.8, vue 3.5.35, typescript 5.9.3). unresolved automated
statement status verification
Nothing is pushed and no repository is created before the Task 5 go-ahead; vue-demo-app is not pushed in this plan (plan 05). unresolved judgment

Phase Goal

ROADMAP Goal (not in user-story format; no story is invented here): the demo's public Nuxt site shows the shared plugins working, chat and channels with realtime included, through the shared layers.

This plan's slice (plan 3 of 6, wave 3, per D-20): vue-chat-layer v0.1.0, ported from bm's chat SPA and widened to several channels, threads, pins, a command picker and generic link embeds, then used in vue-demo-app as /chat, a floating panel and a tour card, in EN and PL.

Decisions taken in this plan (Claude's discretion, recorded)

  • Layout of the layer: pure modules in app/lib/ (imported explicitly, never auto-imported, so generic names like initials cannot clash with an app's utils). Composables useChat, useChatApi and useChatNotice in app/composables/. Components in app/components/Chat/, auto-registered with the Chat prefix (ChatPage, ChatFloatingPanel). The layer ships components; the app owns routes, page copy and the anonymous prompt (as vue-paymentgateway-layer does).
  • Host contract: runtimeConfig.public.chat.hostApiBase defaults to an empty string, and the layer refuses to bootstrap without it, with a console error naming the key. vue-demo-app sets /_demo/api/v1. The README documents the GET {hostApiBase}/chat and /chat/members JSON shapes as the contract any host implements, under neutral names.
  • Auth hook: $chatAuth with token(): string | null, refresh(): Promise<string | null> and unauthorized(): void. One refresh-and-retry on 401 (bm's client renews through /_user/api/v1/fetch), then unauthorized().
  • Store: bm's Pinia setup store becomes a module-level composable over useState keys prefixed chat: (19.4.1 no-Pinia rule). general/generalId become channels[] and activeId.
  • Realtime: bm's current lib/realtime.ts (shared client) is ported with onUserEvent(handler), so other layers (chatvideo, plan 04) get user:{me} events they do not own without a second subscription. vue-demo-app's app/lib/realtime.ts becomes a re-export, so the presentations remote and chat share one WebSocket.
  • Embeds: bm's entity embeds and picker are dropped. URLs in text are linkified (escaped, rel="noopener noreferrer nofollow", target="_blank"). A message with a URL shows a ChatLinkEmbed card with host and path; there is no unfurl backend. registerEmbedRenderer(match, component) lets a host render its own entity links (D-01 extension point).
  • Extension slots: conversation-actions in ChatHeader, rendered only for type === 'dm' (D-23), and sidebar-footer in ChannelList (the friends link, plan 04).
  • Floating panel: hidden on /chat, /p/** and /presentations/** (full-screen decks) and for anonymous visitors.
  • Development pin: while the layer has no remote, vue-demo-app depends on link:../../vue-chat-layer, committed with the first vue-demo-app commit so every commit builds on this machine. Task 6 replaces it with the tag pin; vue-demo-app is pushed only in plan 05, after the swap, so no pushed commit needs the local path.
  • spec-less probe fallback skipped: phase has no requirement IDs to probe (visible skip).

Artifacts this phase produces (this plan)

  • Repository vue-chat-layer (tag v0.1.0):
    • components ChatPage, ChatChannelList, ChatPanel, ChatMessageList, ChatMessage, ChatComposer, ChatHeader, ChatDmList, ChatMemberPicker, ChatMentionPopup, ChatReactionBar, ChatLinkEmbed, ChatStagingChips, ChatDeleteDialog, ChatAvatar, ChatThreadPane, ChatPinsPanel, ChatCommandPicker, ChatFloatingPanel, ChatIcon, ChatNotices;
    • composables useChat, useChatApi, useChatNotice;
    • lib exports: createChatClient, REALTIME_WS_PATH, connect, subscribe, presence, openChannel, onUserEvent, disconnect, linkify, registerEmbedRenderer, embedRendererFor, and the ported chatEvents, chatFormat, chatText and chatUnread functions;
    • runtime config chat.apiBase (NUXT_CHAT_API_BASE), public.chat.apiBase, public.chat.channelsApiBase, public.chat.botsApiBase, public.chat.hostApiBase;
    • Nuxt plugin hook $chatAuth; slots conversation-actions and sidebar-footer; i18n keys under chat.* (EN and PL);
    • smoke test tests/smoke.test.ts.
  • vue-demo-app: page /chat, the floating panel in the default layout, Chat tour card (TourCard icon chat), i18n keys chat.* and tour.chat.*, goPaths /_chat, /_chatchannels, /_chatbots, ChatPage inside ClientOnly (the page itself is server-rendered so the banner and the anonymous prompt are in the HTML), chatAuth provided in app/plugins/auth.ts, app/lib/realtime.ts re-exporting the layer client.
  • sm-demo-app: scripts/check-chat.cjs, check-local check chat, check-local tour expecting the Chat card, smoke.sh covering /chat.
Build and release vue-chat-layer v0.1.0 and put chat on the demo site: `/chat`, the floating panel, the Chat tour card and the anonymous prompt, in EN and PL.

Purpose: SC-2 (chat and channels with realtime on the public site), D-01 to D-05, D-07 (no channel creation), D-22 (moderator delete) and the D-23 extension point plan 04 uses. Output: a new repository vue-chat-layer (pushed and tagged after the go-ahead), commits in ../sm-demo-app/vue-demo-app (the submodule; not pushed) and ../sm-demo-app (scripts; not pushed).

<execution_context> @/.claude/msd-core/workflows/execute-plan.md @/.claude/msd-core/templates/summary.md </execution_context>

@.planning/phases/20-demo-instance-with-every-shared-plugin/20-CONTEXT.md @.planning/phases/20-demo-instance-with-every-shared-plugin/20-RESEARCH.md @.planning/phases/20-demo-instance-with-every-shared-plugin/20-PATTERNS.md @.planning/phases/20-demo-instance-with-every-shared-plugin/20-02-SUMMARY.md

Repos: new ../vue-chat-layer; ../sm-demo-app/vue-demo-app (the submodule, origin golem15/vue-demo-app; never the stale ../vue-demo-app sibling); ../sm-demo-app (scripts). Read-only port source: ../sm-bm-app/frontend/src (components/chat/, stores/chat.ts and chat.test.ts, api/chat.ts, api/types.ts, lib/chat.ts, lib/realtime.ts, lib/format.ts, lib/media.ts, lib/tabs.ts, components/Icon.vue). Layer conventions: ../vue-faq-layer and ../vue-paymentgateway-layer.

Rules: no co-author tags; stage by explicit path; the layer repository gets no remote before Task 5; vue-demo-app is committed in its own repository (never staged from sm-demo-app) and not pushed here; check git -C ../sm-demo-app/vue-demo-app status --porcelain before each commit and leave other sessions' edits alone (Phase 33 also edits nuxt.config.ts). The local dev stack runs with ../sm-demo-app/scripts/dev.sh up (Go 127.0.0.1:8097, Nuxt 127.0.0.1:3020, Centrifugo, LiveKit). Playwright is the global install (NODE_PATH="$(npm root -g)", scripts/lib/browser.cjs).

Host bootstrap (plan 02, ../sm-demo-app/plugins/demo/chat_api.go): GET /_demo/api/v1/chat gives {member, moderator, context: {type, id}, channels: [{id, slug, name, conversation_id, joined, unread, mentions}], conversations: [{id, type: "dm", other_user_id, unread, last_message: {id, sender_id, content, created_at}}], limits: {max_files, max_bytes, max_embeds}}; GET /_demo/api/v1/chat/members gives {members: [{id, name, surname, handle, is_bot}]}. chat API /_chat/api/v1: GET|POST /contexts/{type}/{id}/conversation; GET|POST /conversations/{id}/messages; POST /conversations/{id}/read, /typing, /mute; GET|PUT|DELETE /messages/{id}; GET /reactions; POST /messages/{id}/reactions; DELETE /messages/{id}/reactions/{key}; GET|POST /messages/{id}/replies; PUT /threads/{rootId}/mute; POST /attachments (multipart, body limit); GET /attachments/{messageId}/{fileId}; POST /contexts/{type}/{id}/dm. 422 envelope {"error":"Validation failed","errors":{field:[msg]}}, other refusals {"error": msg}, IDOR 404. chatchannels /_chatchannels/api/v1/contexts/demo/1: GET channels, POST channels/{id}/join and /leave, GET|POST channels/{id}/pins, DELETE channels/{id}/pins/{messageId}, GET channels/{id}/mentions, GET mentions. chatbots /_chatbots/api/v1: GET /commands gives {commands: [{trigger, description}]}; POST /dispatch {input} gives {mode, payload}; unknown gives 422 errors.input. Realtime: token GET /api/realtime/token; WebSocket /ws; channels user:{me} (chat:message, typing, read, unread, deleted, reacted, updated events per bm's chatEvents.ts; video:* from chatvideo), chat:conversation:{id}. vue-demo-app today: nuxt.config.ts (`goPaths`, `extends`, `runtimeConfig`, `routeRules`, `robots.disallow: goPaths`), app/plugins/auth.ts (`paymentGatewayAuth`), app/utils/authCookie.ts (`DEMO_TOKEN_COOKIE`), app/composables/useDemoAuth.ts (`loggedIn`), app/pages/quizzes/index.vue (anonymous prompt with `registerLink` and `quiz.registerToTake`), app/pages/index.vue (`stops`, TourCard), app/components/TourCard.vue (`icon` union, `ICONS` paths), app/lib/realtime.ts (openChannel subset of bm's file), vitest.config.ts (app/**/*.test.ts), package.json (centrifuge 5.7.3, layers pinned by git+https tag). Layer analogs: ../vue-faq-layer/nuxt.config.ts (currentDir, absolute paths, runtimeConfig), ../vue-paymentgateway-layer/nuxt.config.ts (i18n:registerModule for EN/PL), app/composables/usePaymentGatewayApi.ts (auth hook through useNuxtApp), package.json (main nuxt.config.ts, peerDependencies nuxt 4.4.8, engines node >=22.18). Task 1: Tracer: a logged-in visitor opens /chat, picks #general from the seeded channels and sends a message that appears; an anonymous visitor gets the register prompt D-01: a public layer with tagged releases that later sites pin; its runtime-config keys, auth hook and bootstrap contract become a contract. The plan 02 SUMMARY exists; `../sm-demo-app/scripts/dev.sh up` brings the stack up and `curl -fsS http://127.0.0.1:8097/_demo/api/v1/roadmap` answers; `git -C ../sm-demo-app/vue-demo-app status --porcelain` lists no file this task changes. ../vue-chat-layer/.gitignore, ../vue-chat-layer/.nvmrc, ../vue-chat-layer/package.json, ../vue-chat-layer/pnpm-lock.yaml, ../vue-chat-layer/pnpm-workspace.yaml, ../vue-chat-layer/tsconfig.json, ../vue-chat-layer/nuxt.config.ts, ../vue-chat-layer/vitest.config.ts, ../vue-chat-layer/.playground/nuxt.config.ts, ../vue-chat-layer/.playground/app/app.vue, ../vue-chat-layer/app/lib/client.ts, ../vue-chat-layer/app/lib/types.ts, ../vue-chat-layer/app/composables/useChatApi.ts, ../vue-chat-layer/app/composables/useChat.ts, ../vue-chat-layer/app/components/Chat/Page.vue, ../vue-chat-layer/app/components/Chat/ChannelList.vue, ../vue-chat-layer/app/components/Chat/MessageList.vue, ../vue-chat-layer/app/components/Chat/Composer.vue, ../vue-chat-layer/tests/smoke.test.ts, ../sm-demo-app/vue-demo-app/package.json, ../sm-demo-app/vue-demo-app/nuxt.config.ts, ../sm-demo-app/vue-demo-app/app/plugins/auth.ts, ../sm-demo-app/vue-demo-app/app/pages/chat.vue, ../sm-demo-app/vue-demo-app/i18n/locales/en.json, ../sm-demo-app/vue-demo-app/i18n/locales/pl.json, ../sm-demo-app/scripts/check-chat.cjs, ../sm-demo-app/scripts/check-local.sh ../vue-faq-layer/{nuxt.config.ts,package.json,pnpm-workspace.yaml,tsconfig.json,.gitignore,.nvmrc,.playground/nuxt.config.ts}, ../vue-paymentgateway-layer/nuxt.config.ts and app/composables/usePaymentGatewayApi.ts and app/utils/client.ts, ../sm-bm-app/frontend/src/api/chat.ts and api/types.ts, ../sm-bm-app/frontend/src/stores/chat.ts (bootstrap, open, send), ../sm-bm-app/frontend/src/components/chat/{ChatPanel,MessageList,ChatComposer}.vue, ../sm-demo-app/plugins/demo/chat_api.go, ../sm-demo-app/vue-demo-app/{nuxt.config.ts,package.json,app/plugins/auth.ts,app/pages/quizzes/index.vue,app/composables/useDemoAuth.ts,app/utils/authCookie.ts,i18n/locales/en.json}, ../sm-demo-app/scripts/check-local.sh (visitor_jwt, check_remote, ALL_CHECKS), ../sm-demo-app/scripts/check-remote.cjs and scripts/lib/browser.cjs, 20-PATTERNS.md (vue-chat-layer) Per D-01, D-04, D-07, SC-2. One path through every layer: app page, layer component, store, client, host bootstrap, chat API, database, back to the list.
  1. Create the repository: git init -b main at /media/nvme/dev/golem15/summercms.io/summercms/vue-chat-layer with the vue-faq-layer files (.gitignore, .nvmrc, tsconfig.json, pnpm-workspace.yaml allowing the same builds plus protobufjs: false).
    • package.json: name vue-chat-layer, version 0.1.0, private, type module, main ./nuxt.config.ts, engines node >=22.18, peerDependencies nuxt 4.4.8;
    • dependencies centrifuge 5.7.3 and @nuxtjs/i18n 10.4.0; devDependencies nuxt 4.4.8, vue 3.5.35, typescript 5.9.3, vitest 3.2.7;
    • scripts test (vitest run), dev (nuxi dev .playground), build:playground and dev:prepare. Run pnpm install.
  2. nuxt.config.ts:
    • the header comment says an app consumes it with extends: ['vue-chat-layer'], provides $chatAuth and sets public.chat.hostApiBase; currentDir with absolute paths;
    • runtimeConfig.chat.apiBase for SSR (http://127.0.0.1:8096/_chat/api/v1, NUXT_CHAT_API_BASE);
    • public.chat: apiBase /_chat/api/v1, channelsApiBase /_chatchannels/api/v1, botsApiBase /_chatbots/api/v1, hostApiBase empty;
    • no pages and no route rules: the app owns its routes and wraps the chat components in ClientOnly (the components touch window and WebSocket, RESEARCH Pitfall 9);
    • the i18n:registerModule block of vue-paymentgateway-layer for en and pl (strings come in Task 3; create empty-object locale files now if the module needs them).
  3. app/lib/client.ts: createChatClient({ bases, auth, fetch }), pure and Nuxt-free so tests import it. It builds URLs, sends Bearer from auth.token(), retries once after auth.refresh() on 401 and then calls auth.unauthorized(), and turns the 422 envelope into a typed ChatApiError with field errors. Methods for the tracer: bootstrap(), members(), openConversation(type, id), messages(conversationId, opts) and send(conversationId, body). app/lib/types.ts holds the bootstrap and message types ported from bm's api/types.ts. app/composables/useChatApi.ts binds the client to runtime config and useNuxtApp().$chatAuth, following usePaymentGatewayApi.
  4. app/composables/useChat.ts, minimal for now, over useState('chat:…'): start() loads the bootstrap (and logs a console error, then stops, when hostApiBase is empty); channels; activeId; open(channel) calls openConversation('channel', channel.id) then messages; send(text).
  5. Components ChatPage (sidebar plus pane), ChatChannelList (channel names, no create button), ChatMessageList (plain text in this task) and ChatComposer (textarea plus send). No v-html.
  6. vue-demo-app:
    • run pnpm --dir ../sm-demo-app/vue-demo-app add vue-chat-layer@link:../../vue-chat-layer (development pin, committed with this task's vue-demo-app commit; Task 6 swaps it for the tag before any push);
    • nuxt.config.ts: append 'vue-chat-layer' to extends; add '/_chat', '/_chatchannels' and '/_chatbots' to goPaths; set public.chat.hostApiBase: '/_demo/api/v1' and chat.apiBase from api; no route rule for /chat (the page is server-rendered with the chat inside ClientOnly, so smoke.sh still sees the banner and the prompt);
    • app/plugins/auth.ts provides chatAuth: { token, refresh, unauthorized }. token reads DEMO_TOKEN_COOKIE. refresh calls the user plugin's refresh endpoint that the login flow uses (read useDemoAuth) and stores the new token. unauthorized clears the cookie;
    • app/pages/chat.vue: for loggedIn, <ClientOnly><ChatPage /></ClientOnly>; otherwise a description and a NuxtLink class="button" to { path: '/register', query: { next: '/chat' } } labelled t('chat.registerToChat'), as the quizzes page does. useSeoMeta with title and description;
    • i18n en and pl: chat.title, chat.lead and chat.registerToChat.
  7. sm-demo-app/scripts/check-chat.cjs (CommonJS, Playwright, modeled on check-remote.cjs):
    • --base (Nuxt origin) and DEMO_JWT from the environment;
    • sets the DEMO_TOKEN_COOKIE cookie with the JWT, opens {base}/chat, clicks the channel whose name is general and sends a unique text;
    • waits up to 10 s for the text in the message list, then fails on a console error or a 4xx/5xx response from /_chat;
    • opens {base}/chat in a fresh context without the cookie and asserts the register link to /register?next=/chat;
    • prints check-chat: ok. check-local.sh gets check_chat, which takes visitor_jwt and runs the script as check_remote does, and chat in ALL_CHECKS plus the header list.
  8. tests/smoke.test.ts (vitest): createChatClient builds /_chat/api/v1/conversations/7/messages, sends the Bearer header, retries once on 401 after refresh and maps a 422 body to field errors.

Commit vue-chat-layer (feat: chat layer tracer: bootstrap, channel list, messages, composer). Commit vue-demo-app package.json, pnpm-lock.yaml (link pin), nuxt.config.ts, auth.ts, chat.vue and locales by path (feat: /chat page on vue-chat-layer). Commit sm-demo-app scripts (test: check-chat browser check). pnpm --dir ../vue-chat-layer test && pnpm --dir ../sm-demo-app/vue-demo-app run build && ../sm-demo-app/scripts/dev.sh up && ../sm-demo-app/scripts/check-local.sh chat <fails_when>Non-zero exit: the layer smoke test fails; the Nuxt build fails (layer not resolved, type or template error); the stack does not come up; or check-local prints "check-local: chat failed" (the sent text does not appear, /_chat answered 4xx/5xx, or the anonymous page lacks the register link).</fails_when> <acceptance_criteria> - git -C ../vue-chat-layer remote prints nothing. - grep -c "hostApiBase: ''" ../vue-chat-layer/nuxt.config.ts prints 1. - grep -rniE 'sm-bm|jz\.bm|_demo/api' ../vue-chat-layer/app ../vue-chat-layer/nuxt.config.ts ../vue-chat-layer/README.md 2>/dev/null | wc -l prints 0. - grep -c "'/_chat'" ../sm-demo-app/vue-demo-app/nuxt.config.ts prints 1. - node -p "require('../sm-demo-app/vue-demo-app/package.json').dependencies['vue-chat-layer']" prints link:../../vue-chat-layer (the development pin, swapped in Task 6). </acceptance_criteria> A visitor can chat in #general on the local demo site through the new layer, and an anonymous visitor is invited to register.

Task 2: The bm chat experience on the layer: realtime, DMs, member picker, mentions, unread counts and typing ../vue-chat-layer/app/lib/realtime.ts, ../vue-chat-layer/app/lib/chatEvents.ts, ../vue-chat-layer/app/lib/chatFormat.ts, ../vue-chat-layer/app/lib/chatText.ts, ../vue-chat-layer/app/lib/chatUnread.ts, ../vue-chat-layer/app/lib/format.ts, ../vue-chat-layer/app/lib/media.ts, ../vue-chat-layer/app/lib/tabs.ts, ../vue-chat-layer/app/lib/client.ts, ../vue-chat-layer/app/composables/useChat.ts, ../vue-chat-layer/app/composables/useChatNotice.ts, ../vue-chat-layer/app/components/Chat/Panel.vue, ../vue-chat-layer/app/components/Chat/MessageList.vue, ../vue-chat-layer/app/components/Chat/Message.vue, ../vue-chat-layer/app/components/Chat/Composer.vue, ../vue-chat-layer/app/components/Chat/Header.vue, ../vue-chat-layer/app/components/Chat/DmList.vue, ../vue-chat-layer/app/components/Chat/MemberPicker.vue, ../vue-chat-layer/app/components/Chat/MentionPopup.vue, ../vue-chat-layer/app/components/Chat/Avatar.vue, ../vue-chat-layer/app/components/Chat/Icon.vue, ../vue-chat-layer/app/components/Chat/Notices.vue, ../vue-chat-layer/app/components/Chat/Page.vue, ../sm-demo-app/vue-demo-app/app/lib/realtime.ts ../sm-bm-app/frontend/src/stores/chat.ts (whole store), stores/chat.test.ts, lib/realtime.ts, lib/chatEvents.ts, lib/chatFormat.ts, lib/chatText.ts, lib/chatUnread.ts, lib/format.ts, lib/media.ts, lib/tabs.ts, components/Icon.vue, components/chat/{ChatPanel,MessageList,ChatMessage,ChatComposer,ChatHeader,DmList,MemberPicker,MentionPopup,Avatar}.vue, ../sm-demo-app/vue-demo-app/app/lib/realtime.ts and realtime.test.ts, app/pages/presentations/[slug]/index.vue and pilot.vue (openChannel callers), ../vue-chat-layer/app/composables/useChat.ts (Task 1), 20-RESEARCH.md (Pattern 3, Pitfall 9) Per D-01, D-02, SC-2.
  • Port bm's lib/realtime.ts into app/lib/realtime.ts. It keeps the same exports (REALTIME_WS_PATH, tokenFailureIsFinal, wsURL, connect, subscribe, presence, onConnection, onUnavailable, realtimeState, realtimeUnavailable, disconnect, openChannel). The token is fetched from /api/realtime/token with the $chatAuth token through a setter setRealtimeAuth(getToken), so the module stays Nuxt-free. centrifuge is loaded with a dynamic import. Add onUserEvent(handler): () => void: the chat store's user:{me} subscription hands every event it does not handle to the registered handlers, so a second layer never subscribes to user:{me} itself.
  • Port chatEvents, chatFormat, chatText and chatUnread unchanged except for import paths, and the helpers they need from format, media and tabs. The bm tests come in plan 06. chatText's renderer escapes before it marks mentions; keep it the only raw-HTML binding in the layer.
  • useChat: port bm's store as a composable over useState. Replace general and generalId with channels, activeId and a kind ('channel' or 'dm') for the open conversation. Keep:
    • DMs (conversations; openDm(userId) through POST /contexts/demo/1/dm, using the context from the bootstrap);
    • the member list from /chat/members;
    • unread and mention counts, read marks and typing, with bm's polling fallback when realtime is unavailable (15 s open conversation, 60 s counts);
    • realtime start for a member session, edits and deletions from events. Channel join and leave call chatchannels join and leave and refresh the bootstrap. Errors go to useChatNotice (a small toast state rendered by ChatNotices inside ChatPage and the floating panel), replacing bm's toast store.
  • Port the components ChatPanel, ChatMessageList, ChatMessage (text through chatText, attachment rendering in Task 3), ChatComposer (mention popup, Enter to send, Shift+Enter newline), ChatHeader (unread and mention badges), ChatDmList, ChatMemberPicker, ChatMentionPopup and ChatAvatar, plus ChatIcon with the icons they use. ChatPage composes sidebar (channels, DMs, a new-DM button opening the member picker) and pane. Strip every bm-specific element (entity embeds, deadline pins, the student app's tabs) or leave a named slot in its place.
  • vue-demo-app app/lib/realtime.ts becomes a re-export of vue-chat-layer/app/lib/realtime (with a comment), and the app plugin calls setRealtimeAuth with the DEMO_TOKEN_COOKIE reader. If the existing app/lib/realtime.test.ts fails against the shared client, replace it with bm's current realtime.test.ts, adjusted only in import paths.

Commit vue-chat-layer (feat: port the chat store, realtime client and components) and vue-demo-app (refactor: share the chat layer's realtime client). pnpm --dir ../vue-chat-layer test && pnpm --dir ../sm-demo-app/vue-demo-app test && pnpm --dir ../sm-demo-app/vue-demo-app run build && ../sm-demo-app/scripts/check-local.sh chat realtime remote <fails_when>Non-zero exit: layer smoke or vue-demo-app vitest red (the realtime re-export broke the presentations tests), the build fails, or check-local reports chat, realtime or remote failed (the presentations remote no longer works through the shared client).</fails_when> <acceptance_criteria> - grep -c 'export function onUserEvent' ../vue-chat-layer/app/lib/realtime.ts prints 1. - grep -rn "from 'pinia'" ../vue-chat-layer/app | wc -l prints 0. - grep -c 'vue-chat-layer/app/lib/realtime' ../sm-demo-app/vue-demo-app/app/lib/realtime.ts prints 1. - grep -rn 'v-html' ../vue-chat-layer/app/components | grep -v 'renderChatText\|rendered' | wc -l prints 0. </acceptance_criteria> The layer behaves like bm's chat across several channels and DMs, live, with one shared realtime connection on every page.

Task 3: Threads, pins, reactions, attachments, moderator delete, link embeds and the slash command picker ../vue-chat-layer/app/components/Chat/ThreadPane.vue, ../vue-chat-layer/app/components/Chat/PinsPanel.vue, ../vue-chat-layer/app/components/Chat/ReactionBar.vue, ../vue-chat-layer/app/components/Chat/StagingChips.vue, ../vue-chat-layer/app/components/Chat/DeleteDialog.vue, ../vue-chat-layer/app/components/Chat/LinkEmbed.vue, ../vue-chat-layer/app/components/Chat/CommandPicker.vue, ../vue-chat-layer/app/components/Chat/Message.vue, ../vue-chat-layer/app/components/Chat/Composer.vue, ../vue-chat-layer/app/components/Chat/Header.vue, ../vue-chat-layer/app/components/Chat/ChannelList.vue, ../vue-chat-layer/app/lib/linkEmbeds.ts, ../vue-chat-layer/app/lib/client.ts, ../vue-chat-layer/app/composables/useChat.ts, ../vue-chat-layer/app/assets/css/chat-tokens.css, ../vue-chat-layer/app/assets/css/chat-base.css, ../vue-chat-layer/i18n/locales/en.json, ../vue-chat-layer/i18n/locales/pl.json, ../vue-chat-layer/nuxt.config.ts, ../vue-chat-layer/README.md ../sm-bm-app/frontend/src/components/chat/{ReactionBar,StagingChips,DeleteDialog,ChatMessage,ChatComposer,EmbedCard}.vue, ../sm-bm-app/frontend/src/lib/embeds.ts (what to drop), ../sm-demo-app/plugins/golem15/chat/README.md (replies, thread mute, reactions catalog, attachments and limits), ../sm-demo-app/plugins/golem15/chatchannels/README.md (pins, mentions), ../sm-demo-app/plugins/golem15/chatbots/README.md and api/commands.go, ../vue-paymentgateway-layer/{README.md,app/assets/css/pg-tokens.css}, ../vue-faq-layer/README.md (layer README structure), 20-RESEARCH.md (Open Question 4, Anti-Patterns) Per D-02, D-05, D-22, D-23, D-01.
  • Threads: a reply count on root messages opens ChatThreadPane, which lists replies (GET /messages/{id}/replies), posts replies (POST /messages/{id}/replies) and mutes the thread (PUT /threads/{rootId}/mute). Realtime reply events update the count.
  • Pins: ChatPinsPanel, opened from the header of a channel, lists GET .../channels/{id}/pins. Pin and unpin show only when the API allows it: a refused pin shows a notice and hides the action for the session.
  • Reactions: ChatReactionBar ported, with the keys from GET /reactions.
  • Attachments: ChatStagingChips ported. Uploads go to POST /attachments within the bootstrap limits (max_files, max_bytes), and the message shows a download link (GET /attachments/{messageId}/{fileId} with the auth header, fetched as a blob).
  • Delete: ChatDeleteDialog ported. Own messages always; others' only when the bootstrap's moderator is true and the conversation is a channel (D-22).
  • Edits: an Edit action on own messages through PUT /messages/{id}.
  • Link embeds: app/lib/linkEmbeds.ts with linkify(escapedHtml), registerEmbedRenderer(match: (url: URL) => boolean, component) and embedRendererFor(url). ChatMessage renders the first URL of a message with a registered renderer or with ChatLinkEmbed (host and path, no fetch). max_embeds caps the cards.
  • Commands (D-05): typing "/" at the start of the composer opens ChatCommandPicker, filled from GET /commands (cached per session) and filtered by prefix. Sending a "/" message calls POST /dispatch with {input} instead of posting. An ephemeral answer renders as a local, dismissable, sender-only system row with the payload text (escaped); a 422 shows the error.
  • Slots: ChatHeader renders <slot name="conversation-actions" :conversation> only when the open conversation is a DM (D-23). ChatChannelList renders <slot name="sidebar-footer" />. ChatPage forwards both slots.
  • Styling: chat-tokens.css and chat-base.css (neutral tokens an app overrides, as pg-tokens.css does), registered in nuxt.config.ts css with absolute paths.
  • i18n: every UI string of the layer in en and pl under chat.*. The app's own copy stays in the app.
  • README.md in the layer structure of vue-faq-layer and vue-paymentgateway-layer:
    • install by tag; extends;
    • the $chatAuth hook; the runtime-config keys;
    • the host bootstrap contract (the two JSON shapes with a neutral acme host);
    • slots, registerEmbedRenderer, onUserEvent;
    • client-only rendering (wrap ChatPage and ChatFloatingPanel in ClientOnly); testing. Name no consuming application.

Commit vue-chat-layer (feat: threads, pins, reactions, attachments, link embeds and the command picker). pnpm --dir ../vue-chat-layer test && pnpm --dir ../vue-chat-layer run build:playground && pnpm --dir ../sm-demo-app/vue-demo-app run build && ../sm-demo-app/scripts/check-local.sh chat <fails_when>Non-zero exit: the layer smoke test, the playground build or the app build fails, or check-local prints "check-local: chat failed".</fails_when> <acceptance_criteria> - grep -c 'conversation-actions' ../vue-chat-layer/app/components/Chat/Header.vue prints at least 1, and the slot sits inside a condition on the DM type (grep -c "type === 'dm'" ../vue-chat-layer/app/components/Chat/Header.vue prints at least 1). - grep -c 'export function registerEmbedRenderer' ../vue-chat-layer/app/lib/linkEmbeds.ts prints 1. - grep -c '/dispatch' ../vue-chat-layer/app/lib/client.ts prints at least 1. - node -e "const a=require('../vue-chat-layer/i18n/locales/en.json'),b=require('../vue-chat-layer/i18n/locales/pl.json');const k=o=>Object.entries(o).flatMap(([x,v])=>typeof v==='object'?k(v).map(y=>x+'.'+y):[x]);const d=k(a).filter(x=>!k(b).includes(x));if(d.length){console.error(d);process.exit(1)}" exits 0 (PL covers every EN key). - In a manual run on the local stack, a "/demo" command in the composer shows the ephemeral answer and nothing is posted to the channel (recorded in the SUMMARY). </acceptance_criteria> The layer has the full D-02 feature set plus the slash command picker and the extension points other layers and hosts plug into.

Task 4: Chat everywhere on the demo site: floating panel, Chat tour card, EN/PL copy and updated checks ../vue-chat-layer/app/components/Chat/FloatingPanel.vue, ../sm-demo-app/vue-demo-app/app/layouts/default.vue, ../sm-demo-app/vue-demo-app/app/pages/index.vue, ../sm-demo-app/vue-demo-app/app/components/TourCard.vue, ../sm-demo-app/vue-demo-app/app/pages/chat.vue, ../sm-demo-app/vue-demo-app/i18n/locales/en.json, ../sm-demo-app/vue-demo-app/i18n/locales/pl.json, ../sm-demo-app/scripts/check-local.sh, ../sm-demo-app/scripts/smoke.sh ../sm-demo-app/vue-demo-app/app/layouts/default.vue, app/pages/index.vue (stops, TourCard), app/components/TourCard.vue (icon union, ICONS), app/composables/useDemoAuth.ts, i18n/locales/en.json and pl.json (tour.*), ../sm-demo-app/scripts/check-local.sh (check_tour, card_titles), ../sm-demo-app/scripts/smoke.sh (page loop at line 237), ../sm-bm-app/frontend/src/components/chat/DmList.vue Per D-03, D-04. - Layer ChatFloatingPanel: a corner button with the total unread badge (DMs plus channel mentions). It opens a compact panel with ChatDmList and the open DM's message list and composer, and has a link to the full chat page whose path comes from a `chatPath` prop (default '/chat'). It starts the chat store only for a member and renders nothing otherwise. - vue-demo-app default.vue: inside ``, render `` when loggedIn and the route is not /chat, /p/** or /presentations/**. - index.vue: a Chat stop `{ key: 'chat', to: '/chat' }` after quizzes. TourCard gets an outline chat icon in ICONS and 'chat' in the icon union. en and pl get tour.chat.title and tour.chat.text, and the tour heading text matches the new count ("Seven things to try" / the Polish equivalent). - chat.vue: final copy (EN/PL) explaining channels, DMs, threads and slash commands, plus the register prompt. - check-local.sh check_tour expects Chat (EN) and Czat (PL) among the cards and seven cards. smoke.sh adds /chat to the page loop (banner present; the anonymous prompt link to /register?next=%2Fchat in the HTML).

Commit the layer (feat: floating chat panel), vue-demo-app (feat: floating chat panel, Chat tour card) and sm-demo-app scripts separately. pnpm --dir ../vue-chat-layer test && pnpm --dir ../sm-demo-app/vue-demo-app run build && ../sm-demo-app/scripts/check-local.sh tour chat <fails_when>Non-zero exit: build or tests fail, or check-local reports tour failed (missing Chat or Czat card, wrong card count) or chat failed.</fails_when> <acceptance_criteria> - grep -c 'ChatFloatingPanel' ../sm-demo-app/vue-demo-app/app/layouts/default.vue prints 1 and the element sits inside ClientOnly. - grep -c "key: 'chat'" ../sm-demo-app/vue-demo-app/app/pages/index.vue prints 1. - grep -c '/chat' ../sm-demo-app/scripts/smoke.sh prints at least 1. </acceptance_criteria> Chat is reachable from every page for members and from the tour for everyone, in EN and PL.

Task 5: Go-ahead to create vue-chat-layer on git.golem15.com, push it and tag v0.1.0 Claude's summary before asking: `git -C ../vue-chat-layer log --oneline`, the README's install line, the visibility of vue-faq-layer on git.golem15.com (consumers install layers over git+https), whether `tea login list` shows a git.golem15.com login, and the result of the Task 4 checks. - The user chose one option and it is recorded in the SUMMARY; with "release", `git ls-remote https://git.golem15.com/golem15/vue-chat-layer.git` exits 0 before Task 6 pushes, or Task 6 creates it with tea. Create the vue-chat-layer repository, push main and tag v0.1.0 now? D-01 rates the layer costly: later sites pin it by tag, so v0.1.0 freezes the hook, runtime-config and bootstrap contract shown in the README. A pushed tag must not move. vue-demo-app can only pin the layer by tag after this; until then it builds from a local link that cannot be pushed. Repository creation and pushes need your go-ahead (CLAUDE.md). Create, push and tag v0.1.0 vue-demo-app pins the tag and plan 04 can build vue-chatvideo-layer against it. The v0.1.0 contract is public; changes need v0.1.1 or v0.2.0. Hold The layer's contract can still change freely. Plan 04 (chatvideo extends the chat contract) and the deploy are blocked; vue-demo-app keeps a local link pin, so it cannot be pushed. For "release" without a tea login: create golem15/vue-chat-layer (empty, default branch main, same visibility as vue-faq-layer) in the git.golem15.com web UI, then reply. Do not paste tokens. Reply "release" (add "repo ready" if you created it) or "hold". Task 6: Release vue-chat-layer v0.1.0 and pin it in vue-demo-app A pushed layer tag is installed by consumers' lockfiles; it can be superseded but must never move. Task 5 resolved with "release". ../vue-chat-layer/README.md, ../sm-demo-app/vue-demo-app/package.json, ../sm-demo-app/vue-demo-app/pnpm-lock.yaml ../vue-chat-layer/README.md, ../sm-demo-app/vue-demo-app/package.json (other layer pins), the Task 5 answer Per D-01. 1. If the repository is missing, create it with `tea repo create --name vue-chat-layer --owner golem15` at vue-faq-layer's visibility. 2. Add the remote `git@git.golem15.com:golem15/vue-chat-layer.git` and push main. 3. If the README's install line says no tag exists yet, fix it before tagging. Create the annotated tag v0.1.0, push it, and confirm `git ls-remote origin refs/tags/v0.1.0^{}` equals HEAD. 4. In vue-demo-app run `pnpm add "vue-chat-layer@git+https://git.golem15.com/golem15/vue-chat-layer.git#v0.1.0"` (replacing the link pin), then build and test. 5. Commit package.json and pnpm-lock.yaml (`feat: pin vue-chat-layer v0.1.0`). Do not push vue-demo-app (plan 05). [ "$(git -C ../vue-chat-layer ls-remote origin 'refs/tags/v0.1.0^{}' | cut -f1)" = "$(git -C ../vue-chat-layer rev-parse HEAD)" ] && grep -q 'vue-chat-layer.git#v0.1.0' ../sm-demo-app/vue-demo-app/package.json && pnpm --dir ../sm-demo-app/vue-demo-app test && pnpm --dir ../sm-demo-app/vue-demo-app run build Non-zero exit: the remote tag is missing or differs from HEAD, package.json still holds the link pin, or the vue-demo-app tests or build fail against the tagged layer. - `node -p "require('../sm-demo-app/vue-demo-app/package.json').dependencies['vue-chat-layer']"` prints `git+https://git.golem15.com/golem15/vue-chat-layer.git#v0.1.0`. - `git -C ../sm-demo-app/vue-demo-app status --porcelain -- package.json pnpm-lock.yaml` prints nothing. - `../sm-demo-app/scripts/check-local.sh chat tour` prints `check-local: ok chat tour`. vue-chat-layer v0.1.0 is published and the demo site builds against the tag.

<threat_model>

Trust Boundaries

Boundary Description
other members' messages, names and URLs to the browser untrusted content rendered in every member's page
browser to the chat-family APIs JWT bearer from the demo cookie; actor fixed server-side
browser to Centrifugo connection token per member; subscriptions authorized server-side
pnpm install from git.golem15.com the layer tag becomes an input of every consuming site

STRIDE Threat Register

Threat ID Category Component Severity Disposition Mitigation Plan
T-20-14 Tampering stored XSS through message text, names or URLs high mitigate text rendered through the ported chatText renderer that escapes before marking mentions; linkify runs on escaped HTML and only emits http(s) anchors with rel noopener noreferrer nofollow; names and payloads are text bindings; acceptance grep limits v-html to the renderer output
T-20-15 Information disclosure JWT handling in the layer medium mitigate the token comes only from the app's $chatAuth hook (cookie reader), is sent as a Bearer header to same-origin paths, never stored by the layer, and cleared through unauthorized() after a failed refresh
T-20-16 Information disclosure attachment downloads medium mitigate downloads go through GET /attachments/{messageId}/{fileId} with the Bearer header (participants only server-side); no public URL is built
T-20-17 Spoofing slash command answers low mitigate ephemeral answers are rendered locally as escaped text marked as a system row and never posted as the user
T-20-18 Tampering layer supply chain medium mitigate the layer pins exact versions already audited in the workspace (centrifuge 5.7.3, @nuxtjs/i18n 10.4.0); vue-demo-app pins the layer by tag with a committed lockfile
T-20-19 Denial of service realtime connections low mitigate one shared Centrifuge client per page (re-export in vue-demo-app); polling fallback intervals of 15 s and 60 s from bm
T-20-SC Tampering npm installs high mitigate no new package: centrifuge 5.7.3 was audited in 19.4.1 (protobufjs postinstall disabled in pnpm-workspace.yaml); @nuxtjs/i18n 10.4.0, vitest 3.2.7, nuxt, vue and typescript are the pins already in the workspace lockfiles
</threat_model>
- Task 1: layer smoke, app build, check-local chat (browser send, anonymous prompt). - Task 2: layer and app vitest, build, check-local chat, realtime and remote. - Task 3: layer smoke, playground build, app build, check-local chat, PL key coverage. - Task 4: build, check-local tour and chat, smoke.sh page list. - Task 5: go-ahead recorded. - Task 6: remote tag equals HEAD, vue-demo-app builds against the tag.

<success_criteria> The public demo site has /chat with channels, DMs, threads, pins, reactions, attachments, mentions, typing, unread counts, link embeds and slash commands working live (SC-2, D-01 to D-05), a floating panel for members and an invitation for visitors. vue-chat-layer v0.1.0 is a reusable, app-neutral layer. </success_criteria>

Create `.planning/phases/20-demo-instance-with-every-shared-plugin/20-03-SUMMARY.md` when done: the layer's public API (runtime keys, hook, slots, exports), what was stripped from bm and why, the refresh endpoint used by chatAuth, which realtime test file is used in vue-demo-app, the tag and commit, and the checkpoint answer.