Skip to content

feat(portal): custom AI assistant page block with always-on tools and page filter controls#66

Merged
albanm merged 30 commits into
masterfrom
feat-agent-block
May 29, 2026
Merged

feat(portal): custom AI assistant page block with always-on tools and page filter controls#66
albanm merged 30 commits into
masterfrom
feat-agent-block

Conversation

@albanm
Copy link
Copy Markdown
Member

@albanm albanm commented May 29, 2026

Add a new custom-agent page element that embeds an inline AI assistant chat in portal pages, with configurable title, system prompt, focus datasets, and visibility controls.

What changed:

  • Decouple agent tool registration from the agentChat.active toggle — tools are now always available on the BroadcastChannel (Piece 1: use-portal-agent-host.ts extracted from agent-chat.vue)
  • Add page-scoped pageFilters_get / pageFilters_set agent tools operating on reactiveSearchParams, plus per-block describe_filters_<uuid> tools for shared-filters elements (Piece 2: page-params-tools.ts, page-filter-describe-tool.ts)
  • New custom-agent page element schema and component with composed system prompt, focus datasets, and role-based visibility (Piece 3: page-element-custom-agent.vue, element-custom-agent in functional schema)
  • Bump @data-fair/lib-vue-agents 0.4.0, @data-fair/lib-vuetify-agents 0.6.0, @data-fair/agent-tools-data-fair 0.3.4

Why: Allow portal admins to embed purpose-built AI assistants on specific portal pages, scoped to particular datasets and topics, with filter-driving capabilities.

Regression risks:

  • Tools now register unconditionally (even with agentChat.active: false) — admins who disabled the chat expecting full agent disablement will still have tools on the channel
  • usePageParamsTools registers at the root <page-elements> — verify nested instances all pass :root="false" to avoid duplicate registration
  • pageFilters_set does not validate key prefixes — an agent can set arbitrary query params
  • lib-vue-agents 0.3→0.4 and lib-vuetify-agents 0.5→0.6 peer dependency change signals a breaking API change in the agents lib

albanm and others added 30 commits May 29, 2026 09:08
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…l get/set

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ant block

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…arams)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add agents-lib Task 0 (new DfAgentChatBlock in @data-fair/lib-vuetify-agents),
reduce the portal block to a thin prompt-composing wrapper, and note the
published-package dependency bump.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…or DfAgentChatBlock

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Lift the WebMCP frame server + base tool registration out of agent-chat.vue
into an always-mounted client-only host (usePortalAgentHost + PortalAgentHost
in app.vue). The agentChat.active toggle now only gates chat display. Also
extract the shared portal-context prompt helper reused by the global agent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…rams

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
New element-custom-agent def in page-element-functional (title, systemPrompt,
focusDatasets, height, mb); appended to the page-elements oneOf at index 38 to
keep existing discriminator indices stable, with a Functional-group label.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…typing

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ataset interactions

- waitForFunction needs (fn, arg, options) — the 2-arg form ignored the timeout
- DfAgentChatBlock stores init config under sessionStorage key df-agent-init-config:block
- dataset-table interactions is a boolean, not an array

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@albanm albanm merged commit 66f83dc into master May 29, 2026
4 checks passed
@albanm albanm deleted the feat-agent-block branch May 29, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant