From e2f109d5cd05721207eff65b7b6739f7f5c9e2eb Mon Sep 17 00:00:00 2001 From: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Date: Sat, 13 Jun 2026 06:41:31 +0500 Subject: [PATCH 1/2] chore: bump objectui to 76c38108544d test(e2e): lookup quick-filter coverage (CRM parity) (#1682) objectui@76c38108544dd92abf965c0e07b0e4d92264708a --- .objectui-sha | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.objectui-sha b/.objectui-sha index 2f1a4d2778..11870b052c 100644 --- a/.objectui-sha +++ b/.objectui-sha @@ -1 +1 @@ -e95cc25b2c0d2fa680e232151721e71c19630659 +76c38108544dd92abf965c0e07b0e4d92264708a From c3dfb526889727738aca05e514e3f5fd423d23a9 Mon Sep 17 00:00:00 2001 From: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Date: Sat, 13 Jun 2026 06:52:49 +0500 Subject: [PATCH 2/2] feat(service-ai): open framework AI is query-only, declines app-building MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The unified `data_chat` persona (ADR-0040) advertises that it can BUILD or CHANGE the application, but that capability is supplied entirely by the cloud AI Studio plugin's `metadata_authoring`/`solution_design` skills and their tools. On the open single-env framework those skills are not registered, so the authoring tools never resolve — yet the LLM, still reading the "you can build" persona, role-plays designing a whole system (emitting design docs it has no tools to execute). Users saw the standalone open framework "develop" a full 进销存 app that it could not actually create. Fix: in buildSystemMessages, when no authoring (build-register) skill is active, append a deployment-capability note constraining the assistant to data/query and instructing it to decline build requests instead of pretending. Keyed off actual skill presence, so cloud/EE (AI Studio loaded) keeps the full build UX with zero extra wiring. Adds tests for both the absent and present build-register cases. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../src/__tests__/chatbot-features.test.ts | 18 ++++++++++++ .../services/service-ai/src/agent-runtime.ts | 28 +++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/packages/services/service-ai/src/__tests__/chatbot-features.test.ts b/packages/services/service-ai/src/__tests__/chatbot-features.test.ts index 93afbfdb33..39a9324b69 100644 --- a/packages/services/service-ai/src/__tests__/chatbot-features.test.ts +++ b/packages/services/service-ai/src/__tests__/chatbot-features.test.ts @@ -619,6 +619,24 @@ describe('AgentRuntime', () => { expect(messages[0].content).not.toContain('publish AUTOMATICALLY'); } }); + + it('constrains to data-only when the authoring (build) skills are absent', () => { + // Open single-env framework: no AI Studio plugin → no authoring skills. + const messages = runtime.buildSystemMessages(DATA_CHAT_AGENT, undefined, [ + { name: 'data_explorer', label: 'Data Explorer', tools: [] } as never, + ]); + expect(messages[0].content).toContain('BUILDING / AUTHORING is NOT available'); + expect(messages[0].content).toContain('do NOT design or'); + }); + + it('drops the data-only constraint when an authoring skill is active', () => { + // Cloud / EE: AI Studio plugin registered metadata_authoring → full build UX. + const messages = runtime.buildSystemMessages(DATA_CHAT_AGENT, undefined, [ + { name: 'data_explorer', label: 'Data Explorer', tools: [] } as never, + { name: 'metadata_authoring', label: 'Metadata Authoring', tools: [] } as never, + ]); + expect(messages[0].content).not.toContain('BUILDING / AUTHORING is NOT available'); + }); }); describe('buildRequestOptions', () => { diff --git a/packages/services/service-ai/src/agent-runtime.ts b/packages/services/service-ai/src/agent-runtime.ts index 286f92dd6d..4eef869bf2 100644 --- a/packages/services/service-ai/src/agent-runtime.ts +++ b/packages/services/service-ai/src/agent-runtime.ts @@ -160,6 +160,34 @@ export class AgentRuntime { if (block) parts.push(block); } + // Authoring (build) register availability. The unified `data_chat` persona + // (ADR-0040) advertises that it can BUILD or CHANGE the application, but + // that capability is supplied ENTIRELY by the cloud AI Studio plugin's + // `metadata_authoring` / `solution_design` skills (and their tools). On the + // open single-env framework those skills are not registered, so the + // authoring tools never resolve — yet the LLM, still reading the "you can + // build" persona, will role-play designing a whole system (emitting design + // docs it has no tools to execute). When the build register is absent, + // constrain the assistant to data/query and have it decline build requests + // instead of pretending. Keyed off actual skill presence so cloud/EE + // (AI Studio loaded) keeps the full build UX with no extra wiring. + const buildRegisterActive = !!activeSkills?.some( + (s) => s.name === 'metadata_authoring' || s.name === 'solution_design', + ); + if (!buildRegisterActive) { + parts.push( + '\n--- Capabilities in this deployment ---\n' + + 'Application BUILDING / AUTHORING is NOT available here. You can ONLY answer questions ' + + "about the user's existing data (query, list, count, aggregate, search) and run actions " + + 'the application already exposes. You CANNOT create, change, or design objects, fields, ' + + 'views, dashboards, pages, or whole apps — and you have no tools to do so. If the user ' + + 'asks you to build, create, develop, or modify the application itself, do NOT design or ' + + 'outline a system and do NOT pretend to build one: briefly say that AI app-building is ' + + 'not available in this edition, then offer to help explore or report on existing data ' + + "instead. Answer in the user's language.", + ); + } + return [{ role: 'system' as const, content: parts.join('\n') }]; }