Skip to content

feat(service-ai): headless AI runtime — move the ask data-Q&A agent to closed cloud#2298

Merged
os-zhuang merged 1 commit into
mainfrom
feat/move-ask-to-cloud
Jun 24, 2026
Merged

feat(service-ai): headless AI runtime — move the ask data-Q&A agent to closed cloud#2298
os-zhuang merged 1 commit into
mainfrom
feat/move-ask-to-cloud

Conversation

@os-zhuang

@os-zhuang os-zhuang commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

What

Makes the open-source @objectstack/service-ai AI runtime headless: it no longer ships or registers the in-UI AI Q&A ask agent (the intelligence). Per ADR-0023 (open-core: "open mechanism, close intelligence"), the ask data-Q&A agent moves to the closed cloud @objectstack/service-ai-studio package, attaching via the same ai:ready hook the build agent 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_NAME constants, the agent runtime, and all chat routes (they serve whatever agents are registered — empty in CE). @objectstack/mcp is byte-unchanged — MCP remains the open "BYO-AI" path for self-host.

Changes

  • Deleted agents/ask-agent.ts, skills/data-explorer-skill.ts, skills/actions-executor-skill.ts.
  • Relocated ASK_AGENT_NAME + LEGACY_DATA_AGENT_NAME into agents/agent-aliases.ts so the names stay exported without the ASK_AGENT object.
  • 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.
  • Index/exports stop exporting ASK_AGENT + the two ask skills; keep the mechanism exports.
  • Tests updated to exercise the generic runtime/route mechanism against local persona stubs (the persona-as-subject specs move to cloud).

Verification

  • Build green (esm+cjs+dts); 401/401 tests pass.
  • 0 references to the ASK_AGENT object / moved skills in production source or built dist.
  • @objectstack/mcp diff: empty.

⚠️ Must land together with the cloud companion

This removes ask from the OSS runtime; the closed cloud PR objectstack-ai/cloud#485 adds it back to service-ai-studio. Merge both together (or cloud first) so no full runtime loses ask. Reviewers verifying the cloud branch in isolation must point its link:-resolved @objectstack/service-ai at this branch (it resolves to the framework main checkout by default).

🤖 Generated with Claude Code

… 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>
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
spec Building Building Preview, Comment Jun 24, 2026 3:52pm

Request Review

@github-actions

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.

@os-zhuang
os-zhuang merged commit e062b95 into main Jun 24, 2026
14 of 15 checks passed
@os-zhuang
os-zhuang deleted the feat/move-ask-to-cloud branch June 24, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant