From 8c8022eb54d7e8682b714fabcf289213791843e4 Mon Sep 17 00:00:00 2001 From: os-zhuang Date: Sat, 11 Jul 2026 10:01:07 +0800 Subject: [PATCH] docs(ai): describe the cloud data-tool registration in prose, not an uninstallable import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Natural Language Queries page pasted `import { registerDataTools } from '@objectstack/service-ai'` — installable-looking code for a closed package an open-edition reader cannot install. That is the subtlest form of the declared-≠-delivered trap (a reader copies it and `pnpm add` 404s). Replaced the code block with a prose description of what the cloud runtime does plus a pointer to the cloud docs; the open `@objectstack/mcp` example above is unchanged. Docs-only; the open path this page teaches still fully works. Co-Authored-By: Claude Fable 5 --- content/docs/ai/natural-language-queries.mdx | 21 ++++++-------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/content/docs/ai/natural-language-queries.mdx b/content/docs/ai/natural-language-queries.mdx index 75b860fdd7..6a45c29afe 100644 --- a/content/docs/ai/natural-language-queries.mdx +++ b/content/docs/ai/natural-language-queries.mdx @@ -52,21 +52,12 @@ model is prompted with the available objects and translates the user's question into `query_records` calls at runtime. -**Cloud / Enterprise — bundled in-product chat.** The cloud tier's in-UI AI -runtime (`@objectstack/service-ai`, the `ask` data-query assistant, and the -`/api/v1/ai/*` chat endpoints) registers these data tools — plus the -group-by/roll-up `aggregate_data` tool — into its chat loop via -`registerDataTools`: - -```typescript -import { registerDataTools } from '@objectstack/service-ai'; - -ctx.hook('ai:ready', async (ai) => { - registerDataTools(ai.toolRegistry, { dataEngine: ctx.getService('data') }); -}); -``` - -This is the cloud runtime, not the open path. On the open edition, use +**Cloud / Enterprise — bundled in-product chat.** The cloud tier ships an in-UI +AI runtime (`@objectstack/service-ai`, closed) — the `ask` data-query assistant +and the `/api/v1/ai/*` chat endpoints — that registers these same data tools, +plus the group-by/roll-up `aggregate_data` tool, into its own chat loop. That +package is not part of the open framework and is documented separately in the +cloud docs; this page covers the open path only. On the open edition, use `@objectstack/mcp` above to get the same natural-language querying with your own AI.