@things-factory/board-ai 10.1.176 → 10.1.178
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-client/server/service/assistant.d.ts +2 -2
- package/dist-client/server/service/assistant.js +5 -4
- package/dist-client/server/service/assistant.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/assistant.d.ts +2 -2
- package/dist-server/service/assistant.js +4 -3
- package/dist-server/service/assistant.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/server/service/assistant.test.ts +23 -38
- package/server/service/assistant.ts +5 -4
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import type { AIClient, AITool, AIToolCall, AIToolChatResult } from '@things-factory/ai-client-base';
|
|
5
5
|
import { type BoardModel, type ComponentCategory } from '@things-factory/board-import';
|
|
6
6
|
import type { BoardAIAssistant, ChatOptions, ChatResponse, LLMMessage } from './types.js';
|
|
7
|
-
import { formatAbortNotice,
|
|
7
|
+
import { formatAbortNotice, resultShapeOf, type ToolGate as NeutralToolGate } from '@things-factory/ai-client-base';
|
|
8
8
|
import type { SceneEditOp } from '@operato/scene-ops';
|
|
9
9
|
import { type ToolCategoryFilter } from '@things-factory/ai-client-base';
|
|
10
10
|
export interface BoardAIAssistantOptions {
|
|
@@ -58,7 +58,7 @@ export declare function listColorPaletteNames(): string[];
|
|
|
58
58
|
* 등록된 레이아웃 템플릿 이름 목록 — 위와 동일.
|
|
59
59
|
*/
|
|
60
60
|
export declare function listLayoutTemplateNames(): string[];
|
|
61
|
-
export { formatAbortNotice,
|
|
61
|
+
export { formatAbortNotice, resultShapeOf };
|
|
62
62
|
export declare function isWriteTool(name: string): boolean;
|
|
63
63
|
export declare function isActionTool(name: string): boolean;
|
|
64
64
|
/**
|
|
@@ -12,7 +12,7 @@ import { buildComponentStyleSummary } from './styling/read-tools';
|
|
|
12
12
|
*
|
|
13
13
|
* board 의 것(문서·선택 refid·편집 op)은 타입 매개변수로 넘긴다 — 루프는 그 모양을 모른다.
|
|
14
14
|
*/
|
|
15
|
-
import { runAgenticLoop, formatAbortNotice,
|
|
15
|
+
import { runAgenticLoop, formatAbortNotice, resultShapeOf, registryToolGate, extendToolGate } from '@things-factory/ai-client-base';
|
|
16
16
|
import { checkReplyGrounding } from './grounding';
|
|
17
17
|
import { collectAllComponents, findComponentByRefid } from './component-tree';
|
|
18
18
|
import { isStylingTool, dispatchStylingTool, buildStylingToolDefinitions } from './styling/registry.js';
|
|
@@ -172,7 +172,8 @@ export class DefaultBoardAIAssistant {
|
|
|
172
172
|
/* 문서에서 부품을 꺼내는 일은 **여기서** 한다 — 루프는 board 의 모양을 모른다. */
|
|
173
173
|
validateWriteToolCall: (tc, ctx) => validateWriteToolCall(tc, (ctx.board?.components ?? [])),
|
|
174
174
|
toolCallToOp: toolCallToSceneActionOp,
|
|
175
|
-
|
|
175
|
+
/* The conversation row keeps each answer's shape, never its values (ADR-0061 decision 8). */
|
|
176
|
+
summarizeToolResult: resultShapeOf
|
|
176
177
|
},
|
|
177
178
|
context: { board: currentBoard, selectedRefids }
|
|
178
179
|
});
|
|
@@ -1827,7 +1828,7 @@ export function listLayoutTemplateNames() {
|
|
|
1827
1828
|
return Object.keys(LAYOUT_TEMPLATES.templates);
|
|
1828
1829
|
}
|
|
1829
1830
|
/*
|
|
1830
|
-
* 중단 통지 · 도구
|
|
1831
|
+
* 중단 통지 · 도구 결과의 모양 — **공용 패키지에 있다** (2026-09-10, 결과는 값 대신 모양 2026-10-17).
|
|
1831
1832
|
*
|
|
1832
1833
|
* 둘 다 보드를 모르는 함수였다. 옮긴 이유는 중복이 아니라 **한쪽만 갖고 있었던 것**이다:
|
|
1833
1834
|
* `twin-ai` 는 `summarizeToolResult: v => v` 로 요약을 아예 안 하고 있었다. 한 제품은 압축해서
|
|
@@ -1838,7 +1839,7 @@ export function listLayoutTemplateNames() {
|
|
|
1838
1839
|
*
|
|
1839
1840
|
* 여기 남은 것은 재수출이다. 이 패키지를 지나는 소비처가 이름을 그대로 쓰게 한다.
|
|
1840
1841
|
*/
|
|
1841
|
-
export { formatAbortNotice,
|
|
1842
|
+
export { formatAbortNotice, resultShapeOf };
|
|
1842
1843
|
export function isWriteTool(name) {
|
|
1843
1844
|
if (WRITE_TOOL_NAMES.has(name))
|
|
1844
1845
|
return true;
|