feat(service-ai): headless AI runtime — move the ask data-Q&A agent to closed cloud#2298
Merged
Conversation
… package The data-Q&A intelligence — the `ask` agent persona plus its data-explorer / actions-executor skills — is a commercial feature (ADR-0002 "open the mechanism, close the intelligence"). Extract it from the open-source @objectstack/service-ai so the framework AI runtime is now HEADLESS: it registers no built-in agent, skills, or tools. The persona attaches in the cloud-only @objectstack/service-ai-studio package via the `ai:ready` hook — exactly how the sibling `build` agent already attaches. What MOVES to cloud (intelligence): - agents/ask-agent.ts (ASK_AGENT) - skills/data-explorer-skill.ts (DATA_EXPLORER_SKILL) - skills/actions-executor-skill.ts (ACTIONS_EXECUTOR_SKILL) What STAYS open here (mechanism the cloud persona imports + registers against): - tools/data-tools.ts, query-data.tool.ts, visualize-data.tool.ts, action-tools.ts (the data tools) - skills/schema-reader-skill.ts (SCHEMA_READER_SKILL, surface:'both', shared with `build`) - agents/agent-aliases.ts — the alias REGISTRY + the ASK_AGENT_NAME / LEGACY_DATA_AGENT_NAME string constants (relocated here from the deleted ask-agent.ts so the framework keeps exporting them without the persona), agent-runtime.ts, skill-registry.ts, all routes/* plugin.ts: the data-engine-gated built-in registration block (data tools + ask agent + the three skills + the legacy data_chat cleanup) is removed and replaced with a NOTE; the now-dead protocolService resolution + toToolLabel helper + unused IAnalyticsService/IAutomationService imports are dropped. Tests: agent-aliases.test.ts pulls the name constants from agent-aliases.js and uses a local stub for the loadAgent path; chatbot-features.test.ts keeps the generic runtime/route MECHANISM tests against local persona stubs and the persona-as-subject specs (ASK_AGENT/affinity) move with the agent to cloud. @objectstack/mcp is byte-unchanged. Build (esm+cjs+dts) green; 401/401 tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 5 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
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.
What
Makes the open-source
@objectstack/service-aiAI runtime headless: it no longer ships or registers the in-UI AI Q&Aaskagent (the intelligence). Per ADR-0023 (open-core: "open mechanism, close intelligence"), theaskdata-Q&A agent moves to the closed cloud@objectstack/service-ai-studiopackage, attaching via the sameai:readyhook thebuildagent already uses.Stays open here (the mechanism): the data tools (
registerDataTools,query-data,visualize-data,action-tools),SCHEMA_READER_SKILL, the agent-alias registry +ASK_AGENT_NAME/LEGACY_DATA_AGENT_NAMEconstants, the agent runtime, and all chat routes (they serve whatever agents are registered — empty in CE).@objectstack/mcpis byte-unchanged — MCP remains the open "BYO-AI" path for self-host.Changes
agents/ask-agent.ts,skills/data-explorer-skill.ts,skills/actions-executor-skill.ts.ASK_AGENT_NAME+LEGACY_DATA_AGENT_NAMEintoagents/agent-aliases.tsso the names stay exported without theASK_AGENTobject.plugin.ts: removed the data-engine-gated built-in registration block (data tools +ASK_AGENT+ skills + legacy cleanup) → replaced with a note comment; dropped now-dead helpers/imports.ASK_AGENT+ the two ask skills; keep the mechanism exports.Verification
0references to theASK_AGENTobject / moved skills in production source or builtdist.@objectstack/mcpdiff: empty.This removes
askfrom the OSS runtime; the closed cloud PR objectstack-ai/cloud#485 adds it back toservice-ai-studio. Merge both together (or cloud first) so no full runtime losesask. Reviewers verifying the cloud branch in isolation must point itslink:-resolved@objectstack/service-aiat this branch (it resolves to the framework main checkout by default).🤖 Generated with Claude Code