Skip to content

feat(service-ai)!: rename data agent data_chat → ask (Path A) with back-compat alias - #2144

Merged
os-zhuang merged 5 commits into
mainfrom
feat/rename-data-chat-to-ask
Jun 22, 2026
Merged

feat(service-ai)!: rename data agent data_chat → ask (Path A) with back-compat alias#2144
os-zhuang merged 5 commits into
mainfrom
feat/rename-data-chat-to-ask

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

Why

Part of the Path A console AI surface split (objectui#1868): the two assistants get their own pages at friendly routes /ai/ask and /ai/build. For the route to equal the real identifier (no permanent alias-indirection layer), the built-in agents are renamed. This PR renames the framework's data agent data_chatask. The cloud rename (metadata_assistantbuild) is a separate PR; this one is independently safe.

What

  • DEFAULT_DATA_AGENT_NAME = 'ask' (was data_chat); LEGACY_DATA_AGENT_NAME kept for migrations/diagnostics.
  • Alias registry (agents/agent-aliases.ts): seeds data_chat → ask; AgentRuntime.loadAgent normalizes a requested name through it, so /agents/data_chat/chat and any persisted ai_conversations.agent_id = 'data_chat' keep resolving. Aliases are resolution-only (not records), so GET /ai/agents still lists each agent once.
  • registerAgentAlias(legacy, canonical) is exported so each package registers its own rename — the cloud AI Studio plugin will register metadata_assistant → build. This decoupling is what makes the two renames independently safe: neither alias points at an id its owning package hasn't registered yet.
  • On upgrade, the plugin prunes the stale data_chat registry entry so the catalog isn't doubled (idempotent on fresh installs).

Verification

  • New unit tests (5): alias table behavior + loadAgent resolving a legacy name to the renamed record + unknown-name passthrough.
  • The objectui console already resolves both legacy and renamed catalogs (its agentAliases layer was verified live against this rig and is unit-tested), so no client change is required by this PR.
  • Pre-existing unrelated tsc errors exist in some __tests__ files on main; none are touched here.

Breaking change

The built-in data agent's canonical name is now ask. The legacy data_chat name remains accepted via the alias table, so existing clients/links/conversations keep working.

Related / follow-ups

  • objectui#1868 — console routing/UX (already resolves ask/build).
  • cloud service-ai-studio: rename metadata_assistantbuild (+ registerAgentAlias), update the Studio app defaultAgent.
  • optional one-time migration of ai_conversations.agent_id old→new (not required for function — aliases handle legacy values).

🤖 Generated with Claude Code

…lias
The platform data agent's identifier is renamed so the friendly console
URL equals the real name (/ai/ask). Back-compat is preserved:
- DEFAULT_DATA_AGENT_NAME = 'ask' (was 'data_chat'); LEGACY_DATA_AGENT_NAME
kept for migrations/diagnostics.
- New process-wide alias registry (agent-aliases.ts): seeds data_chat->ask;
AgentRuntime.loadAgent normalizes a requested name through it, so
/agents/data_chat/chat and persisted agent_id='data_chat' keep resolving.
Exposes registerAgentAlias() so other packages register their OWN renames
(cloud AI Studio: metadata_assistant->build) — keeping the two renames
decoupled and independently safe; no alias points at an unregistered id.
- Aliases are resolution-only (not records), so GET /ai/agents still lists
each agent once. On upgrade, the plugin prunes the stale 'data_chat'
registry entry so the catalog isn't doubled.
Unit-tested: alias table + loadAgent legacy resolution (5 cases). The
objectui console already resolves both legacy and renamed catalogs (its
agentAliases layer is verified live), so no client change is required.
BREAKING CHANGE: the built-in data agent's canonical name is now 'ask'.
The legacy 'data_chat' name remains accepted via the alias table.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercelBot commented Jun 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
specReadyReadyPreview, CommentJun 21, 2026 4:56pm

Request Review

@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation tests labels Jun 21, 2026
@github-actions

github-actionsBot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): packages/services.

5 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/guides/packages.mdx(via packages/services)
  • content/docs/guides/runtime-services/audit-service.mdx(via packages/services)
  • content/docs/guides/runtime-services/index.mdx(via packages/services)
  • content/docs/guides/runtime-services/settings-service.mdx(via packages/services)
  • content/docs/protocol/objectos/i18n-standard.mdx(via packages/services)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
git add -A swept in local worktree node_modules symlinks (the repo
.gitignore matches node_modules/ as a dir, not a symlink), which broke CI
install (ENOTDIR). Untracked; functionally inert.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
chatbot-features: catalog/loadAgent/agent-spec now assert canonical 'ask';
legacy '/agents/data_chat/chat' POST tests kept as back-compat (resolve via
alias). 83 AI tests pass locally.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@os-zhuang
os-zhuang merged commit be07ce7 into mainJun 22, 2026
16 checks passed
@os-zhuang
os-zhuang deleted the feat/rename-data-chat-to-ask branch June 22, 2026 01:47
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/mteststooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@xuyushun441-sys@os-zhuang@hotlong