feat(assistant): AD4M AI-assistant UI (WE front end) - #95
Draft
HexaField wants to merge 3 commits into
Draft
Conversation
…ector) Additive AI-assistant surface for the AD4M-embedded assistant runtime. Renders threads/messages from perspective subject classes and lights up when the executor backend (separate PR on coasys/ad4m) writes replies into the perspective; makes no in-browser LLM call. Existing template-editor AiStore is untouched. - Subject classes: Assistant, Personality, Skill, McpServer, Thread, Message (we:// predicates) - AssistantStore + thread list / thread view / message (collapsible tool-call rendering) / config panel (Assistants/Personalities/Skills/MCP) - AiAssistant shell schema + sidebar nav + component/store registry wiring - Streaming via progressive Message.content updates under a live query (no separate token channel needed) Verified: Vite prod build of app-web PASS, @we/app-framework build+DTS PASS, app-framework tsc 0 errors, 62 unit tests pass. Live/visual verification pending a running executor + the backend runtime. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
✅ Deploy Preview for coasys-we ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
HexaField
added a commit
to coasys/ad4m
that referenced
this pull request
Jul 28, 2026
A Rust subsystem in rust-executor that runs AI-assistant turns server-side — persistent, concurrent, surviving client disconnect. Watches perspectives for new WE Message turns, runs the context->model->tools->persist loop reusing the /v1 tool-calling machinery in-process, streams by rewriting Message.content (auto-publishes to WE), and resumes interrupted runs from a durable RunState.
- assistant_runtime/{entities,store,sdna,context,tools,run,registry,mod}
- Subject classes match the WE contract (coasys/we#95): Assistant/Personality/Skill/McpServer in we-root, Thread/Message in the neighbourhood perspective, we:// predicates.
- Built-in perspective/neighbourhood tools in-process; MCP client behind a trait seam (explicit error until rmcp client is wired — no silent stub).
- Boots beside the MCP/REST subsystems, gated on config.enable_assistants (default on).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Vitest + @solidjs/testing-library component tests (30) for the assistant surface: message roles + the collapsible tool-call block (Arguments/Result), thread view + model selector + composer, thread list, config panel tabs (Assistants/Personalities/Skills/MCP) + grant toggles, and AssistantStore helpers. Adds a scoped vitest 'dom' project (single solid-js instance, jsdom); exports AssistantContext + data-testids for testability; guards scrollIntoView for jsdom. Verified by rendering the real components in headless Electron (surface, expanded tool-call, config tabs all render valid + styled). Full app-framework suite: 92 tests pass; we-web Vite build green; tsc 0 errors in the assistant code. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Headless-Electron renders of the assistant surface: full three-pane view, expanded tool-call block, and config panel tabs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AD4M AI Assistants — front end (WE)
The WE half of the AD4M-embedded AI-assistant runtime. Adds an "AI Assistant" surface — a thread view with tool-call rendering, a per-neighbourhood thread list, a model selector, and a personality / skills / MCP config panel — authored via the schema/template system and rendered from AD4M perspective subject classes.
Additive and non-breaking: the existing template-editor
AiStore/AiPanelis untouched. This surface makes no in-browser LLM call — it renders threads/messages from perspectives and lights up when the AD4M executor backend writes replies into the perspective. The backend (assistant-run subsystem +/v1tool-calling) is a companion PR oncoasys/ad4m(forthcoming).What's here
packages/models/src/entities/):Assistant,Personality,Skill,McpServer,Thread,Message—we://predicates, registered in ROOT/SPACE models.AssistantStore+ components: thread list, thread view, message (collapsible tool-call blocks), config panel (Assistants / Personalities / Skills / MCP).AiAssistantshell schema + sidebar nav + component/store registry wiring.Message.contentupdates under a live query — no separate token channel.Backend contract (for the ad4m side)
Assistant/Personality/Skill/McpServer) in we-root; conversations (Thread/Message) in the neighbourhood perspective.role:'assistant'Messagewithstatus:'streaming', appends tocontent, flips to'complete'. Tool calls as JSON onMessage.toolCalls.GET /v1/models.Verification
@we/app-frameworkbuild + DTS PASS · app-frameworktsc0 errors · 62 unit tests pass.@we/modelsDTS emit fails due to a@coasys/ad4m@0.13.0-test-9typings barrel clash (verified on clean HEAD).🤖 Generated with Claude Code
Screenshots (headless-Electron renders of the real components)
Assistant surface — thread list, thread view (user bubble, get_weather tool-call block, markdown-rendered reply), composer, and the config panel:
Tool-call block expanded — Arguments + Result:
Config panel — Skills and MCP tabs: