@tbox.cn/app-template-agent 0.8.0 → 0.9.0
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/AGENTS.md +2 -2
- package/ENV.md +4 -5
- package/README.md +4 -4
- package/apps/client/index.html +2 -2
- package/apps/client/src/platform/AgentChatApp.tsx +4 -3
- package/apps/server/package.json +0 -2
- package/apps/server/src/app.ts +73 -12
- package/apps/server/tests/agent-prompt.test.ts +3 -3
- package/apps/server/tests/tool-runtime.test.ts +1 -1
- package/package.json +2 -2
- package/packages/agent-ui-kit/src/components/ActionBar/index.tsx +0 -2
- package/packages/agent-ui-kit/src/components/MessageBubble/index.tsx +0 -2
- package/packages/agent-ui-kit/src/utils/tool-call-display.test.ts +14 -14
- package/pnpm-lock.template.yaml +37 -65
- package/pnpm-workspace.template.yaml +4 -4
package/AGENTS.md
CHANGED
|
@@ -17,7 +17,7 @@ template-agent 是多包 pnpm workspace:`apps/` 薄组装端 + `packages/` 模
|
|
|
17
17
|
|---|---|
|
|
18
18
|
| `apps/server` | Express + WS 装配入口,HTTP 路由,TTS 代理;业务工具/卡片由模块自注册(自注册闭环) |
|
|
19
19
|
| `apps/client` | React/Vite 装配入口,业务页面/组件/adapters/bridge(家页 MallHome 由 mall-home 模块经 home 槽供给) |
|
|
20
|
-
| `packages/` | 模块目录(空装配起点:`tbox-app module add` 生成 `@app/<id>` 成员;根 workspace 内平台真源在根 `packages/`) |
|
|
20
|
+
| `packages/` | 模块目录(空装配起点:`tbox-app new module <name>` 或 `module add` 生成 `@app/<id>` 成员;根 workspace 内平台真源在根 `packages/`) |
|
|
21
21
|
|
|
22
22
|
> **画像供能(017 家族)**:mall 形态 = profiles/mall.json 声明的模块序列(mall-core 域装配 + mall-home 家页 + 六业务模块)
|
|
23
23
|
> + profiles/mall/config 叠加;公共能力(协议/机制/配置链)沉淀 SDK/CLI——新增通用能力先落 SDK/kit 再被模板/模块消费。
|
|
@@ -82,7 +82,7 @@ pnpm plugin:doctor
|
|
|
82
82
|
pnpm plugin:inspect <pluginId> <toolId>
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
starter 文档:`tbox-app starter --type agent-mall`;可用类型:`tbox-app starter --list`。在沙箱中使用 `tbox-app create . --name <app-name> --source @tbox.cn/app-template-agent --profile mall` 原地初始化(缺省不带 --profile = 空装配 chat 形态),应用模板的 `AGENTS.md` 会覆盖 starter seed。模块安装/装配由 `tbox-app` CLI(`@tbox.cn/app-cli`)管理:`module add --mode local|codegen|sdk --source <路径|tgz|registry包> / remove / list / sync / diff / doctor / update / publish`。add/remove/sync 后需 `pnpm install`。未安装 CLI 时:`pnpm add -g @tbox.cn/app-cli`(registry 安装)。
|
|
85
|
+
starter 文档:`tbox-app starter --type agent-mall`;可用类型:`tbox-app starter --list`。在沙箱中使用 `tbox-app create . --name <app-name> --source @tbox.cn/app-template-agent --profile mall` 原地初始化(缺省不带 --profile = 空装配 chat 形态),应用模板的 `AGENTS.md` 会覆盖 starter seed。模块安装/装配由 `tbox-app` CLI(`@tbox.cn/app-cli`)管理:`new <module|provider|theme> <name>`(应用内脚手架)/ `module add --mode local|codegen|sdk --source <路径|tgz|registry包> / remove / list / sync / diff / doctor / update / publish`。add/remove/sync 后需 `pnpm install`。未安装 CLI 时:`pnpm add -g @tbox.cn/app-cli`(registry 安装)。
|
|
86
86
|
|
|
87
87
|
## 平台基础设施
|
|
88
88
|
|
package/ENV.md
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
- **本地开发**:shell export 注入(每次新终端需重新执行;见文末命令块)。生成应用请直接 shell export 或平台配置。
|
|
8
8
|
- **生产**:建议在 tbox 平台页面上配置环境变量(平台托管 env,密钥不进代码仓库、不进 git)。
|
|
9
|
-
生产部署必须 `NODE_ENV=production`(
|
|
9
|
+
生产部署必须 `NODE_ENV=production`(JWT 密钥链 fail-fast + real hardening 的依据)。
|
|
10
10
|
入口分离后 dist 恒静态供给(vite dev 仅存在于源码 `src/dev.ts` 本地开发入口);`NODE_ENV` 不再决定
|
|
11
|
-
客户端供给形态——测试环境可用 `node dist/index.js`(不设 NODE_ENV)获得「静态产物 +
|
|
11
|
+
客户端供给形态——测试环境可用 `node dist/index.js`(不设 NODE_ENV)获得「静态产物 + 开发档登录语义」。
|
|
12
12
|
- 以下变量缺失时服务可启动,但对话/会话/上传链路会 503。
|
|
13
13
|
|
|
14
14
|
## 默认商圈(integrations v4)
|
|
@@ -115,13 +115,12 @@ dev/src 与 prod/dist bundle 形态恒等):
|
|
|
115
115
|
| `TBOX_LLM_CONN_BIND` | per-session 连接绑定旋钮(缺省 on;`=off` 关闭——LLM fetch 回退全局连接池。连接=网关缓存池路由单位:per-session 单连接(120s keep-alive)钉死集群分配,保活跨 run 提升前缀缓存命中;排障时可关) |
|
|
116
116
|
| `TBOX_LLM_COOKIE_AFFINITY` | 网关 cookie 亲和旋钮(缺省 on;`=off` 关闭——不回传网关 set-cookie。回传激活 LB 粘性:连接重建后恢复原集群的通道;best-effort) |
|
|
117
117
|
|
|
118
|
-
## 统一鉴权
|
|
118
|
+
## 统一鉴权
|
|
119
119
|
|
|
120
120
|
| 变量 | 说明 |
|
|
121
121
|
|---|---|
|
|
122
122
|
| `AUTH_TOKEN_SECRET` | 自有 JWT 密钥(≥32 字节随机串),生产由平台注入。006 鉴权与 011 模块动作授权(action-grant)共用统一密钥链:未配置回退 `TBOX_API_KEY`(须 ≥32 字节)→ dev 临时随机;prod 整链空则 fail-fast(拒绝启动)。011 另有 `ACTION_TOKEN_SECRET` 覆盖档。本地一般无需设置 |
|
|
123
123
|
| `AUTH_MODE` | `required`(默认,缺失 token 一律 401)/ `optional`(缺失 token → 匿名,写通道仍拒绝) |
|
|
124
|
-
| `AUTH_DEV_LOGIN_DISABLED` | 非生产环境需关闭 dev-login 时设 `true`(dev-login 非 production 默认开启,生产强制关闭) |
|
|
125
124
|
| `AUTH_TOKEN_TTL_MS` | token 有效期(毫秒,默认 2h) |
|
|
126
125
|
| `AUTH_TOKEN_ISSUER` | token issuer(默认 `agent`;如需 mall 独立身份可显式设 `agent-mall`) |
|
|
127
126
|
| `AUTH_EMBED_EXTERNAL_TOKEN` | 是否把外部原始 token 内嵌进自有 JWT(external claim,默认 `true`;`false` 则上游调用需另取) |
|
|
@@ -144,7 +143,7 @@ dev/src 与 prod/dist bundle 形态恒等):
|
|
|
144
143
|
(上游 Token 寿命未知;自有 JWT 过期即重登换新)。
|
|
145
144
|
- ⚠️ 与 `VITE_AUTH_PROVIDER=external` **互斥**:设 external 走 `AUTH_EXTERNAL_*` HMAC 转发旁路,
|
|
146
145
|
换码器被 platform 路由绕过,两者勿同时启用。
|
|
147
|
-
- 裸跑(无登录槽配置):无换码器注册 → 内置 alipay(未配 → 503)或
|
|
146
|
+
- 裸跑(无登录槽配置):无换码器注册 → 内置 alipay(未配 → 503)或 browser 轴 guest(内置换码器 allowsGuestLogin),匿名降级属预期行为。
|
|
148
147
|
- 跨 mall 切换(URL `mallId` 变更)由 SDK `scopeKey` 守卫自动清 token 重登,无需手工登出。
|
|
149
148
|
|
|
150
149
|
## 客户端(Vite 注入)
|
package/README.md
CHANGED
|
@@ -35,9 +35,9 @@ tbox-app module doctor # 26 条结构校验
|
|
|
35
35
|
> 依赖链说明(007):`@tbox.cn/app-sdk` 新增 dependencies `@tbox-dev-js/sdk`(平台能力客户端)、`@ai-sdk/openai-compatible`(LLM)——
|
|
36
36
|
> 生成应用 install 时由 pnpm 自动解析(`@tbox-dev-js/sdk` 已发布 npm;内网/离线环境需 registry 镜像或 store 缓存兜底)。
|
|
37
37
|
|
|
38
|
-
> 🔐
|
|
39
|
-
>
|
|
40
|
-
> `
|
|
38
|
+
> 🔐 鉴权(统一登录):登录面 = `POST /api/auth/login`(`method:'code'|'browser'` 判别);
|
|
39
|
+
> 浏览器档位(guest/mock/off/auto)经换码器 `browserLoginMode` 能力口治理(登录槽 config,
|
|
40
|
+
> 支持 `${VAR:-default}` 展开经 env 分档);生产部署必须 `NODE_ENV=production`。
|
|
41
41
|
|
|
42
42
|
## 工程结构
|
|
43
43
|
|
|
@@ -175,7 +175,7 @@ definePreTool(findStoreTool, {
|
|
|
175
175
|
| `getToolRequestContext` / `requireToolRequestContext` | `@tbox.cn/app-sdk/server` | 工具 execute 第二参读取运行上下文(fail-soft / 缺失抛 AUTH_FORBIDDEN;上下文统一化) |
|
|
176
176
|
| `createToolExecContext(reqCtx)` | `@tbox.cn/app-sdk/server` | 测试/直调助手:构造工具 execute 第二参(散键与引擎同构) |
|
|
177
177
|
| `createPlatformAdapters(session, overrides)` | `@tbox.cn/app-sdk/client` | 自定义 ASR/TTS/upload/feedback 实现(contracts 接口,UI 零改动) |
|
|
178
|
-
| `createAuthClient({ loginPlatform,
|
|
178
|
+
| `createAuthClient({ loginPlatform, scopeKey })` | `@tbox.cn/app-sdk/client` | 客户端登录配置(`main.tsx`/`platform/agent-runtime.ts`);**应用级单例**——重复调用幂等返回首建实例,首建选项生效 |
|
|
179
179
|
| `configureRuntime({ apiBaseUrl })` | `@tbox.cn/app-sdk/client` | API/WS 地址注入(`main.tsx`;对应 `VITE_API_URL`) |
|
|
180
180
|
| bridge 透传 | `@tbox.cn/app-sdk/client` 的 `callJsapi` | 业务新能力(扫码/导航/分享等,壳子补 JSAPI 白名单) |
|
|
181
181
|
|
package/apps/client/index.html
CHANGED
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
window.addEventListener('orientationchange', setRootFontSize);
|
|
27
27
|
})();
|
|
28
28
|
</script>
|
|
29
|
-
<!--
|
|
30
|
-
<title
|
|
29
|
+
<!-- 出厂标题 = 此处静态值(theme-tbox brand.js 出厂不覆写标题);租户主题经其 brand.js 运行时覆写 document.title -->
|
|
30
|
+
<title>AI 助手</title>
|
|
31
31
|
<!-- 平台微调(inspector) runtime:由 server 提供 GET /__vs_inspector__.js;dev 下经 Vite 代理到 server。-->
|
|
32
32
|
<script src="/__vs_inspector__.js" defer></script>
|
|
33
33
|
</head>
|
|
@@ -17,15 +17,16 @@ export default function AgentChatApp() {
|
|
|
17
17
|
useEffect(() => {
|
|
18
18
|
authClient
|
|
19
19
|
.ensureAuth()
|
|
20
|
-
|
|
20
|
+
// 会话 β 收口:身份恒取 token(服务端 401/403),userId 不再上行
|
|
21
|
+
.then(() => platformApi.getTboxSession())
|
|
21
22
|
.then(setSession)
|
|
22
23
|
.catch((err) => appLogger.error('tbox session init failed:', err));
|
|
23
24
|
}, []);
|
|
24
25
|
|
|
25
26
|
const refreshSession = useCallback(async (): Promise<AdapterContextValue> => {
|
|
26
27
|
platformApi.clearTboxSession();
|
|
27
|
-
|
|
28
|
-
const data = await platformApi.getTboxSession(
|
|
28
|
+
await authClient.refreshAuth();
|
|
29
|
+
const data = await platformApi.getTboxSession(true);
|
|
29
30
|
setSession(data);
|
|
30
31
|
return { tts, ...createPlatformAdapters(data, { tts }), refreshSession };
|
|
31
32
|
}, [tts]);
|
package/apps/server/package.json
CHANGED
|
@@ -16,13 +16,11 @@
|
|
|
16
16
|
"@tbox.cn/app-contracts": "catalog:",
|
|
17
17
|
"@app/contracts-mall": "workspace:*",
|
|
18
18
|
"@tbox-dev-js/sdk": "catalog:",
|
|
19
|
-
"cors": "catalog:",
|
|
20
19
|
"express": "catalog:",
|
|
21
20
|
"zod": "catalog:",
|
|
22
21
|
"@app/provider-custom": "workspace:*"
|
|
23
22
|
},
|
|
24
23
|
"devDependencies": {
|
|
25
|
-
"@types/cors": "catalog:",
|
|
26
24
|
"@types/express": "catalog:",
|
|
27
25
|
"@types/node": "catalog:",
|
|
28
26
|
"tsx": "catalog:",
|
package/apps/server/src/app.ts
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* import 本模块即完成装配(与旧单文件入口时序等价:listen 仍在 start() 内最后发生)。
|
|
5
5
|
*/
|
|
6
6
|
import express from 'express';
|
|
7
|
-
import cors from 'cors';
|
|
8
7
|
import { createServer, type IncomingMessage } from 'http';
|
|
9
8
|
import type { Duplex } from 'node:stream';
|
|
10
9
|
import path from 'path';
|
|
@@ -136,7 +135,7 @@ function mallAssembly(): MallScopeAssembly | undefined {
|
|
|
136
135
|
}
|
|
137
136
|
|
|
138
137
|
// 上下文统一化 Stage 2:validateContext 域校验注入(HTTP body.context 伪冒防线:
|
|
139
|
-
// mallId 形状校验(v4 恒动态)→ 403;只在全局面生效——login
|
|
138
|
+
// mallId 形状校验(v4 恒动态)→ 403;只在全局面生效——login 走 login-routes 独立归一化)。
|
|
140
139
|
// 与 WS validateScope 同核(isValidMallShape);无装配 → true(非 mall 部署放行)。
|
|
141
140
|
const auth = createAuthRuntime(undefined, {
|
|
142
141
|
validateContext: (attributes) => mallAssembly()?.validateScope(attributes) ?? true,
|
|
@@ -207,16 +206,46 @@ process.on('uncaughtException', (err) => {
|
|
|
207
206
|
});
|
|
208
207
|
|
|
209
208
|
export const app = express();
|
|
210
|
-
|
|
209
|
+
|
|
210
|
+
// ===== CORS allowlist(统一登录改造 T20:全开 cors() 退役) =====
|
|
211
|
+
// 双轴分离:iframe 嵌入走 CSP frame-ancestors(下方中间件),跨源 fetch 走本 allowlist。
|
|
212
|
+
// 三元组与 frame-ancestors 对齐(用户裁决 2026-09-13);credentials 恒 false(token 走
|
|
213
|
+
// Authorization 头,不依赖 cookie——跨源带凭据面直接关死)。
|
|
214
|
+
// 生成应用可编辑此常量(长尾 origin 逃生通道)——刻意不加 env(决策权归部署面代码)。
|
|
215
|
+
const CORS_ALLOWED_ORIGINS = ['https://tbox.cn', 'https://*.tbox.cn', 'http://localhost:3000'];
|
|
216
|
+
function originAllowed(origin: string): boolean {
|
|
217
|
+
return CORS_ALLOWED_ORIGINS.some((pattern) =>
|
|
218
|
+
pattern.includes('*')
|
|
219
|
+
? origin.endsWith(pattern.slice(pattern.indexOf('*') + 1))
|
|
220
|
+
: origin === pattern,
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
app.use((req, res, next) => {
|
|
224
|
+
const origin = req.headers.origin;
|
|
225
|
+
if (typeof origin === 'string' && originAllowed(origin)) {
|
|
226
|
+
res.setHeader('Access-Control-Allow-Origin', origin);
|
|
227
|
+
res.setHeader('Vary', 'Origin');
|
|
228
|
+
}
|
|
229
|
+
res.setHeader('Access-Control-Allow-Methods', 'GET,POST,DELETE,OPTIONS');
|
|
230
|
+
res.setHeader('Access-Control-Allow-Headers', 'Authorization,Content-Type,X-Request-ID');
|
|
231
|
+
res.setHeader('Access-Control-Allow-Credentials', 'false');
|
|
232
|
+
if (req.method === 'OPTIONS') {
|
|
233
|
+
res.sendStatus(204);
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
next();
|
|
237
|
+
});
|
|
238
|
+
|
|
211
239
|
app.use(express.json());
|
|
212
240
|
|
|
213
241
|
// 🔒 平台基础设施 — 禁止 AI 删除或修改(@infrastructure-locked)
|
|
214
242
|
installInspector(app);
|
|
215
243
|
|
|
216
|
-
//
|
|
217
|
-
|
|
244
|
+
// 浏览器登录形态提示:非 prod 裸跑(无 mall 控制面)默认开放 guest 登录(内置换码器
|
|
245
|
+
// allowsGuestLogin 声明);公网实例应以 NODE_ENV=production + 换码器档位收敛(browserLoginMode: off)
|
|
246
|
+
if (!isProduction) {
|
|
218
247
|
authLogger.warn(
|
|
219
|
-
'
|
|
248
|
+
'浏览器登录(browser 轴)按换码器档位开放:裸跑/demo 默认 guest。若本实例暴露公网,请设 NODE_ENV=production 并在登录槽 config 收敛 browserLoginMode。',
|
|
220
249
|
);
|
|
221
250
|
}
|
|
222
251
|
|
|
@@ -237,7 +266,7 @@ const ctx = createServerContext({
|
|
|
237
266
|
// 自动装配(W1-④:raw 派生 modules 资源节 + 源目录台账锚;无条件注册、与控制面正交,
|
|
238
267
|
// 防无控制面启动静默丢失)。模板显式注册已拆(W3-1:装配默认兜底覆盖同语义)。
|
|
239
268
|
|
|
240
|
-
// 全局 /api 鉴权(H2 挂载顺序契约):除 public(login/
|
|
269
|
+
// 全局 /api 鉴权(H2 挂载顺序契约):除 public(login/health)外一律要求 Bearer token;
|
|
241
270
|
// optional 模式缺失 token → 匿名身份(写通道仍被 action gateway 拒绝)
|
|
242
271
|
// ⚠️ 必须先于 /api/m、/api/action、createPlatformApiRouter 挂载,保证全 API 面受鉴权约束
|
|
243
272
|
app.use('/api', auth.middleware);
|
|
@@ -396,9 +425,9 @@ export async function start() {
|
|
|
396
425
|
// 默认商圈兜底/卡片动作授权/enhanceContext 全断——见 Agent Note 2026-09-17-mall-assembly-resolution-order)
|
|
397
426
|
const assembly = mallAssembly();
|
|
398
427
|
|
|
399
|
-
// 011 S6:mall 装配 + 生产环境缺动作授权密钥 →
|
|
428
|
+
// 011 S6:mall 装配 + 生产环境缺动作授权密钥 → 启动期提示(≥32B TBOX_API_KEY 在场回退 apiKey 档;整链空装配期 fail-fast)
|
|
400
429
|
if (assembly && isProduction && !process.env.ACTION_TOKEN_SECRET && !process.env.AUTH_TOKEN_SECRET) {
|
|
401
|
-
actionLogger.warn('生产环境未配置 ACTION_TOKEN_SECRET/AUTH_TOKEN_SECRET
|
|
430
|
+
actionLogger.warn('生产环境未配置 ACTION_TOKEN_SECRET/AUTH_TOKEN_SECRET——TBOX_API_KEY(≥32B) 缺席时装配将 fail-fast 拒绝启动;在场则回退 apiKey 档(平台运维可伪 action token)');
|
|
402
431
|
}
|
|
403
432
|
|
|
404
433
|
// 011 F2/E2:mall 装配(条件)——scope 会话 + 动作授权先行(engine attacher 依赖)
|
|
@@ -456,6 +485,19 @@ export async function start() {
|
|
|
456
485
|
const defaultContext = assembly?.defaultMallContext();
|
|
457
486
|
const chatWss = createWsServer(engine, {
|
|
458
487
|
auth: auth.wsAuth,
|
|
488
|
+
// 会话 β:会话建立服务(懒代理——TBOX_API_KEY 缺席时 NEW/RESUME 失败 notice,RUN 恒严格拒绝)
|
|
489
|
+
conversationService: {
|
|
490
|
+
createConversation: (agentId, userId) => {
|
|
491
|
+
const service = getConversationService();
|
|
492
|
+
if (!service) return Promise.reject(new Error('TBOX_API_KEY not configured'));
|
|
493
|
+
return service.createConversation(agentId, userId);
|
|
494
|
+
},
|
|
495
|
+
getOrCreateConversation: (agentId, userId) => {
|
|
496
|
+
const service = getConversationService();
|
|
497
|
+
if (!service) return Promise.reject(new Error('TBOX_API_KEY not configured'));
|
|
498
|
+
return service.getOrCreateConversation(agentId, userId);
|
|
499
|
+
},
|
|
500
|
+
},
|
|
459
501
|
...(scopeSessions
|
|
460
502
|
? {
|
|
461
503
|
scopeSessions,
|
|
@@ -487,7 +529,7 @@ export async function start() {
|
|
|
487
529
|
process.exit(1);
|
|
488
530
|
});
|
|
489
531
|
|
|
490
|
-
httpServer.on('upgrade', (request, socket, head) => {
|
|
532
|
+
httpServer.on('upgrade', async (request, socket, head) => {
|
|
491
533
|
socket.on('error', (e) => upgradeLogger.warn('socket error:', e.message));
|
|
492
534
|
if (upgradeDelegate?.(request, socket, head)) return;
|
|
493
535
|
const { pathname } = new URL(request.url || '/', 'http://localhost');
|
|
@@ -497,8 +539,27 @@ export async function start() {
|
|
|
497
539
|
chatWss.emit('connection', ws, request);
|
|
498
540
|
});
|
|
499
541
|
} else if (pathname === '/ws/tts') {
|
|
500
|
-
//
|
|
501
|
-
//
|
|
542
|
+
// 双层门 1(S5 修复,pre-101 鉴权):token 校验先行——TTS 代理原为全开放面。
|
|
543
|
+
// 双形态载体(IP-2):Node 客户端 = Authorization Bearer;浏览器 WebSocket 无法
|
|
544
|
+
// 自定义 header = ?token= query。无效/缺失 token 于 upgrade 前 destroy
|
|
545
|
+
// (对齐 Terminal channel 先例)。
|
|
546
|
+
const headerToken = (request.headers.authorization ?? '').replace(/^Bearer\s+/i, '');
|
|
547
|
+
const queryToken = new URL(request.url || '/', 'http://localhost').searchParams.get('token') ?? '';
|
|
548
|
+
const ttsToken = headerToken || queryToken;
|
|
549
|
+
if (!ttsToken) {
|
|
550
|
+
upgradeLogger.warn('TTS upgrade rejected: missing token');
|
|
551
|
+
socket.destroy();
|
|
552
|
+
return;
|
|
553
|
+
}
|
|
554
|
+
try {
|
|
555
|
+
await auth.tokenService.verify(ttsToken);
|
|
556
|
+
} catch {
|
|
557
|
+
upgradeLogger.warn('TTS upgrade rejected: invalid token');
|
|
558
|
+
socket.destroy();
|
|
559
|
+
return;
|
|
560
|
+
}
|
|
561
|
+
// 双层门 2(通道门与 UI 同值同源):chat.json enableTTS 单源——关态硬拒 upgrade,
|
|
562
|
+
// 防服务端开着 TTS 代理但 UI 已隐藏按钮的僵尸路径
|
|
502
563
|
if (!loadedChatConfig.enableTTS) {
|
|
503
564
|
upgradeLogger.warn('TTS disabled (chat.json enableTTS:false) — /ws/tts upgrade rejected');
|
|
504
565
|
socket.destroy();
|
|
@@ -11,14 +11,14 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
|
11
11
|
* W4 单一模板统一化双段语义:
|
|
12
12
|
* - 缺省出厂 = 空装配(config/ 无 agent.jsonc)→ loader 走 SDK 默认兜底单行(chat 形态零域广告);
|
|
13
13
|
* - mall 画像 = profiles/mall/config/agent.jsonc(--profile mall 经 --config-dir 通道注入)——
|
|
14
|
-
* 四章节/禁工具名/承接句/中立锚断言锚定画像资产文件(create 展开/
|
|
14
|
+
* 四章节/禁工具名/承接句/中立锚断言锚定画像资产文件(create 展开/stage mall 完整档消费)。
|
|
15
15
|
*
|
|
16
16
|
* 部署态让位(2026-09-10):--config-dir 注入真实厂商档(integrations.json root provider 为
|
|
17
17
|
* 真实厂商名而非 mock)时 agent.jsonc 为部署方品牌人设——中立锚仅守卫出厂/mock 态(mock 档
|
|
18
|
-
* 不注入 agent.jsonc,保持出厂中立)。
|
|
18
|
+
* 不注入 agent.jsonc,保持出厂中立)。stage 真实厂商档完整链依赖此让位。
|
|
19
19
|
*
|
|
20
20
|
* 装配态感知(2026-09-17 评审修复):第一段的 config/ 状态在生成应用是装配变量——mall 完整档
|
|
21
|
-
* 素材注入、support 自含 config(出厂在场)均使 agent.jsonc 在场,恒常量断言失配(
|
|
21
|
+
* 素材注入、support 自含 config(出厂在场)均使 agent.jsonc 在场,恒常量断言失配(stage
|
|
22
22
|
* 完整档 94/95 缺口)。用例改为形态感知:缺席 → 兜底断言(出厂守卫保持);在场 → 读文件断言。
|
|
23
23
|
*/
|
|
24
24
|
describe('agent.jsonc(兜底语义:空装配 → SDK 默认单行;装配态注入 → 读文件)', () => {
|
|
@@ -18,7 +18,7 @@ describe('tool runtime 宿主装配(自注册闭环)', () => {
|
|
|
18
18
|
loadPlugins: async () => ({ tools: {}, references: [] }),
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
//
|
|
21
|
+
// 缺省空装配:模块工具不存在,仅 app 级工具
|
|
22
22
|
expect(Object.keys(runtime.tools)).not.toEqual(
|
|
23
23
|
expect.arrayContaining(['getWeather']),
|
|
24
24
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tbox.cn/app-template-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "tbox AI Agent 全栈模板(多包 pnpm workspace):apps/client + apps/server。唯一模板(W4 单一模板统一化:缺省空装配 chat 形态;mall 能力经 profiles/mall 加装),能力经 tbox-app module add 模块扩展(shopping-guide/member 等)。",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=24.0.0 <25.0.0"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"LICENSE"
|
|
33
33
|
],
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@tbox.cn/app-sdk": "0.
|
|
35
|
+
"@tbox.cn/app-sdk": "0.20.0",
|
|
36
36
|
"eslint": "9.39.5",
|
|
37
37
|
"typescript-eslint": "8.67.0",
|
|
38
38
|
"eslint-plugin-react-hooks": "5.2.0",
|
|
@@ -58,7 +58,6 @@ export function ActionBar({ message }: { message: ChatMessage }) {
|
|
|
58
58
|
const refreshSession = useRefreshSession();
|
|
59
59
|
const tts = useTTSAdapter();
|
|
60
60
|
const enableTTS = useChatConfigStore((s) => s.enableTTS);
|
|
61
|
-
const conversationId = useChatStore((s) => s.conversationId);
|
|
62
61
|
const submitFeedback = useChatStore((s) => s.submitFeedback);
|
|
63
62
|
|
|
64
63
|
const [ttsState, setTtsState] = useState<'idle' | 'loading' | 'playing' | 'paused'>('idle');
|
|
@@ -151,7 +150,6 @@ export function ActionBar({ message }: { message: ChatMessage }) {
|
|
|
151
150
|
|
|
152
151
|
<DebugButton
|
|
153
152
|
requestId={message.requestId}
|
|
154
|
-
conversationId={conversationId ?? undefined}
|
|
155
153
|
messageId={message.id}
|
|
156
154
|
messageCreatedAt={new Date(message.createdAt).getTime()}
|
|
157
155
|
/>
|
|
@@ -20,7 +20,6 @@ const TBOX_FILE_URL = 'https://mdn.alipayobjects.com/tcmarket/afts/file/';
|
|
|
20
20
|
/** 消息气泡(对齐原模板):meta + 思考/工具/卡片 + 气泡 + 媒体 + 操作栏。 */
|
|
21
21
|
export function MessageBubble({ message }: { message: ChatMessage }) {
|
|
22
22
|
const cardsByMessageId = useChatStore((s) => s.cardsByMessageId);
|
|
23
|
-
const conversationId = useChatStore((s) => s.conversationId);
|
|
24
23
|
// 018 tool-debug:服务端旗标单源(HELLO_ACK;无 URL 逃逸——数据面信任锚点在服务端)
|
|
25
24
|
const toolDebug = useChatStore((s) => s.helloAck?.toolDebug === true);
|
|
26
25
|
const isUser = message.role === 'user';
|
|
@@ -164,7 +163,6 @@ export function MessageBubble({ message }: { message: ChatMessage }) {
|
|
|
164
163
|
{message.requestId && (
|
|
165
164
|
<DebugButton
|
|
166
165
|
requestId={message.requestId}
|
|
167
|
-
conversationId={conversationId ?? undefined}
|
|
168
166
|
messageId={message.id}
|
|
169
167
|
messageCreatedAt={new Date(message.createdAt).getTime()}
|
|
170
168
|
/>
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
|
|
11
11
|
const normal = (over: Partial<ToolCallInfo> = {}): ToolCallInfo => ({
|
|
12
12
|
id: 't1',
|
|
13
|
-
name: '
|
|
13
|
+
name: 'queryPoints',
|
|
14
14
|
status: 'done',
|
|
15
15
|
result: JSON.stringify({ temp: 22 }),
|
|
16
16
|
...over,
|
|
@@ -18,7 +18,7 @@ const normal = (over: Partial<ToolCallInfo> = {}): ToolCallInfo => ({
|
|
|
18
18
|
|
|
19
19
|
describe('describeToolCall(010 下沉 S5:展示语义三分支)', () => {
|
|
20
20
|
it('skill:label 取 skillName,无详情', () => {
|
|
21
|
-
const { args } = buildSkillToolCallPayload({ name: '
|
|
21
|
+
const { args } = buildSkillToolCallPayload({ name: 'demo-guide', description: '演示' });
|
|
22
22
|
const d = describeToolCall({
|
|
23
23
|
id: 's1',
|
|
24
24
|
name: '__tbox_skill',
|
|
@@ -26,17 +26,17 @@ describe('describeToolCall(010 下沉 S5:展示语义三分支)', () => {
|
|
|
26
26
|
result: '{}',
|
|
27
27
|
status: 'done',
|
|
28
28
|
});
|
|
29
|
-
expect(d).toEqual({ kind: 'skill', label: '
|
|
29
|
+
expect(d).toEqual({ kind: 'skill', label: 'demo-guide', hasDetail: false });
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
it('preTool done:label 取 description、详情 = 结果文本', () => {
|
|
33
33
|
const args = buildPreToolArgsPayload({
|
|
34
|
-
toolName: '
|
|
35
|
-
description: '
|
|
36
|
-
toolArgs: {
|
|
34
|
+
toolName: 'queryPoints',
|
|
35
|
+
description: '积分查询',
|
|
36
|
+
toolArgs: { accountId: 'M0001' },
|
|
37
37
|
});
|
|
38
38
|
const result = buildPreToolResultPayload({
|
|
39
|
-
toolName: '
|
|
39
|
+
toolName: 'queryPoints',
|
|
40
40
|
status: 'done',
|
|
41
41
|
result: { temp: 22 },
|
|
42
42
|
});
|
|
@@ -49,7 +49,7 @@ describe('describeToolCall(010 下沉 S5:展示语义三分支)', () => {
|
|
|
49
49
|
});
|
|
50
50
|
expect(d.kind).toBe('preTool');
|
|
51
51
|
if (d.kind === 'preTool') {
|
|
52
|
-
expect(d.label).toBe('
|
|
52
|
+
expect(d.label).toBe('积分查询');
|
|
53
53
|
expect(d.status).toBe('done');
|
|
54
54
|
expect(d.hasDetail).toBe(true);
|
|
55
55
|
expect(d.resultText).toContain('"temp": 22');
|
|
@@ -57,7 +57,7 @@ describe('describeToolCall(010 下沉 S5:展示语义三分支)', () => {
|
|
|
57
57
|
});
|
|
58
58
|
|
|
59
59
|
it('preTool calling:label 可用(ARGS 先行)、无详情', () => {
|
|
60
|
-
const args = buildPreToolArgsPayload({ toolName: '
|
|
60
|
+
const args = buildPreToolArgsPayload({ toolName: 'queryPoints', description: '积分查询' });
|
|
61
61
|
const d = describeToolCall({
|
|
62
62
|
id: 'p2',
|
|
63
63
|
name: '__tbox_pretool',
|
|
@@ -68,14 +68,14 @@ describe('describeToolCall(010 下沉 S5:展示语义三分支)', () => {
|
|
|
68
68
|
if (d.kind === 'preTool') {
|
|
69
69
|
expect(d.status).toBe('calling');
|
|
70
70
|
expect(d.hasDetail).toBe(false);
|
|
71
|
-
expect(d.label).toBe('
|
|
71
|
+
expect(d.label).toBe('积分查询');
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
|
|
75
75
|
it('preTool error:经 result payload status 判定(ToolCallInfo.status 恒 done,R 语义)', () => {
|
|
76
|
-
const args = buildPreToolArgsPayload({ toolName: '
|
|
76
|
+
const args = buildPreToolArgsPayload({ toolName: 'queryPoints', description: '积分查询' });
|
|
77
77
|
const result = buildPreToolResultPayload({
|
|
78
|
-
toolName: '
|
|
78
|
+
toolName: 'queryPoints',
|
|
79
79
|
status: 'error',
|
|
80
80
|
error: '超时',
|
|
81
81
|
});
|
|
@@ -111,12 +111,12 @@ describe('describeToolCall(010 下沉 S5:展示语义三分支)', () => {
|
|
|
111
111
|
it('normal:label = 工具名,详情 = 有 result/error', () => {
|
|
112
112
|
expect(describeToolCall(normal())).toEqual({
|
|
113
113
|
kind: 'normal',
|
|
114
|
-
label: '
|
|
114
|
+
label: 'queryPoints',
|
|
115
115
|
hasDetail: true,
|
|
116
116
|
});
|
|
117
117
|
expect(describeToolCall(normal({ status: 'calling', result: undefined }))).toEqual({
|
|
118
118
|
kind: 'normal',
|
|
119
|
-
label: '
|
|
119
|
+
label: 'queryPoints',
|
|
120
120
|
hasDetail: false,
|
|
121
121
|
});
|
|
122
122
|
});
|
package/pnpm-lock.template.yaml
CHANGED
|
@@ -16,20 +16,17 @@ catalogs:
|
|
|
16
16
|
specifier: 0.1.0
|
|
17
17
|
version: 0.1.0
|
|
18
18
|
'@tbox.cn/app-contracts':
|
|
19
|
-
specifier: 0.
|
|
20
|
-
version: 0.
|
|
19
|
+
specifier: 0.11.0
|
|
20
|
+
version: 0.11.0
|
|
21
21
|
'@tbox.cn/app-contracts-mall':
|
|
22
|
-
specifier: 0.
|
|
23
|
-
version: 0.
|
|
22
|
+
specifier: 0.11.0
|
|
23
|
+
version: 0.11.0
|
|
24
24
|
'@tbox.cn/app-sdk':
|
|
25
|
-
specifier: 0.
|
|
26
|
-
version: 0.
|
|
25
|
+
specifier: 0.20.0
|
|
26
|
+
version: 0.20.0
|
|
27
27
|
'@tbox.cn/app-theme-tbox':
|
|
28
|
-
specifier: 0.1.
|
|
29
|
-
version: 0.1.
|
|
30
|
-
'@types/cors':
|
|
31
|
-
specifier: 2.8.19
|
|
32
|
-
version: 2.8.19
|
|
28
|
+
specifier: 0.1.1
|
|
29
|
+
version: 0.1.1
|
|
33
30
|
'@types/express':
|
|
34
31
|
specifier: 4.17.25
|
|
35
32
|
version: 4.17.25
|
|
@@ -48,9 +45,6 @@ catalogs:
|
|
|
48
45
|
antd-mobile:
|
|
49
46
|
specifier: 5.42.3
|
|
50
47
|
version: 5.42.3
|
|
51
|
-
cors:
|
|
52
|
-
specifier: 2.8.6
|
|
53
|
-
version: 2.8.6
|
|
54
48
|
eslint:
|
|
55
49
|
specifier: 9.39.5
|
|
56
50
|
version: 9.39.5
|
|
@@ -115,7 +109,7 @@ importers:
|
|
|
115
109
|
devDependencies:
|
|
116
110
|
'@tbox.cn/app-sdk':
|
|
117
111
|
specifier: 'catalog:'
|
|
118
|
-
version: 0.
|
|
112
|
+
version: 0.20.0(@types/react@18.3.31)(rxjs@7.8.1)
|
|
119
113
|
eslint:
|
|
120
114
|
specifier: 'catalog:'
|
|
121
115
|
version: 9.39.5
|
|
@@ -142,13 +136,13 @@ importers:
|
|
|
142
136
|
version: link:../../packages/provider-custom
|
|
143
137
|
'@tbox.cn/app-contracts':
|
|
144
138
|
specifier: 'catalog:'
|
|
145
|
-
version: 0.
|
|
139
|
+
version: 0.11.0
|
|
146
140
|
'@tbox.cn/app-sdk':
|
|
147
141
|
specifier: 'catalog:'
|
|
148
|
-
version: 0.
|
|
142
|
+
version: 0.20.0(@types/react@18.3.31)(rxjs@7.8.1)
|
|
149
143
|
'@tbox.cn/app-theme-tbox':
|
|
150
144
|
specifier: 'catalog:'
|
|
151
|
-
version: 0.1.
|
|
145
|
+
version: 0.1.1
|
|
152
146
|
react:
|
|
153
147
|
specifier: 'catalog:'
|
|
154
148
|
version: 18.3.1
|
|
@@ -206,13 +200,10 @@ importers:
|
|
|
206
200
|
version: 0.1.0(@mastra/core@1.59.0(ai@6.0.246(zod@3.25.76))(express@4.22.2)(rxjs@7.8.1)(zod@3.25.76))(@tbox-dev-js/sdk@0.1.18)(zod@3.25.76)
|
|
207
201
|
'@tbox.cn/app-contracts':
|
|
208
202
|
specifier: 'catalog:'
|
|
209
|
-
version: 0.
|
|
203
|
+
version: 0.11.0
|
|
210
204
|
'@tbox.cn/app-sdk':
|
|
211
205
|
specifier: 'catalog:'
|
|
212
|
-
version: 0.
|
|
213
|
-
cors:
|
|
214
|
-
specifier: 'catalog:'
|
|
215
|
-
version: 2.8.6
|
|
206
|
+
version: 0.20.0(@types/react@18.3.31)(rxjs@7.8.1)
|
|
216
207
|
express:
|
|
217
208
|
specifier: 'catalog:'
|
|
218
209
|
version: 4.22.2
|
|
@@ -220,9 +211,6 @@ importers:
|
|
|
220
211
|
specifier: 'catalog:'
|
|
221
212
|
version: 3.25.76
|
|
222
213
|
devDependencies:
|
|
223
|
-
'@types/cors':
|
|
224
|
-
specifier: 'catalog:'
|
|
225
|
-
version: 2.8.19
|
|
226
214
|
'@types/express':
|
|
227
215
|
specifier: 'catalog:'
|
|
228
216
|
version: 4.17.25
|
|
@@ -252,10 +240,10 @@ importers:
|
|
|
252
240
|
version: 2.1.10(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
|
253
241
|
'@tbox.cn/app-contracts':
|
|
254
242
|
specifier: 'catalog:'
|
|
255
|
-
version: 0.
|
|
243
|
+
version: 0.11.0
|
|
256
244
|
'@tbox.cn/app-sdk':
|
|
257
245
|
specifier: 'catalog:'
|
|
258
|
-
version: 0.
|
|
246
|
+
version: 0.20.0(@types/react@18.3.31)(rxjs@7.8.1)
|
|
259
247
|
antd-mobile:
|
|
260
248
|
specifier: 'catalog:'
|
|
261
249
|
version: 5.42.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
|
@@ -304,7 +292,7 @@ importers:
|
|
|
304
292
|
dependencies:
|
|
305
293
|
'@tbox.cn/app-contracts-mall':
|
|
306
294
|
specifier: 'catalog:'
|
|
307
|
-
version: 0.
|
|
295
|
+
version: 0.11.0
|
|
308
296
|
devDependencies:
|
|
309
297
|
'@types/node':
|
|
310
298
|
specifier: 24.13.3
|
|
@@ -320,10 +308,10 @@ importers:
|
|
|
320
308
|
dependencies:
|
|
321
309
|
'@tbox.cn/app-contracts':
|
|
322
310
|
specifier: 'catalog:'
|
|
323
|
-
version: 0.
|
|
311
|
+
version: 0.11.0
|
|
324
312
|
'@tbox.cn/app-sdk':
|
|
325
313
|
specifier: 'catalog:'
|
|
326
|
-
version: 0.
|
|
314
|
+
version: 0.20.0(@types/react@18.3.31)(rxjs@7.8.1)
|
|
327
315
|
devDependencies:
|
|
328
316
|
'@types/node':
|
|
329
317
|
specifier: 24.13.3
|
|
@@ -1338,24 +1326,24 @@ packages:
|
|
|
1338
1326
|
'@tbox-dev-js/sdk': '>=0.1.18 <0.2.0'
|
|
1339
1327
|
zod: '>=3.24.0 <4.0.0'
|
|
1340
1328
|
|
|
1341
|
-
'@tbox.cn/app-contracts-mall@0.
|
|
1342
|
-
resolution: {integrity: sha512-
|
|
1329
|
+
'@tbox.cn/app-contracts-mall@0.11.0':
|
|
1330
|
+
resolution: {integrity: sha512-4BpbtZAif2zmYlMJ2M1wF03yTs3n4w5eFBZKFlA3yGeAfjpODyUy4OTRmRMaFfz4dHBichQF3n30A0RgS/h0Eg==}
|
|
1343
1331
|
engines: {node: '>=20.0.0'}
|
|
1344
1332
|
|
|
1345
|
-
'@tbox.cn/app-contracts@0.
|
|
1346
|
-
resolution: {integrity: sha512-
|
|
1333
|
+
'@tbox.cn/app-contracts@0.11.0':
|
|
1334
|
+
resolution: {integrity: sha512-ePyJwpfmWwyOx1BrSoAWZpwEI7xB8b2wFliR+uaAQfyGvbOfvKbaWJXOt/qPJh+PlYgUGvGLGvntnX2m2YC6BA==}
|
|
1347
1335
|
engines: {node: '>=20.0.0'}
|
|
1348
1336
|
|
|
1349
|
-
'@tbox.cn/app-sdk@0.
|
|
1350
|
-
resolution: {integrity: sha512-
|
|
1337
|
+
'@tbox.cn/app-sdk@0.20.0':
|
|
1338
|
+
resolution: {integrity: sha512-r6Jx/ciA+UWZ8rOlaAs94Et98g/n9NBIMoaXy3jpnUNs8zFrBTrViVYGaQvBMqL4yvDLcJBjOJQ2oSF7h1MJGQ==}
|
|
1351
1339
|
engines: {node: '>=20.0.0'}
|
|
1352
1340
|
hasBin: true
|
|
1353
1341
|
|
|
1354
|
-
'@tbox.cn/app-theme-tbox@0.1.
|
|
1355
|
-
resolution: {integrity: sha512-
|
|
1342
|
+
'@tbox.cn/app-theme-tbox@0.1.1':
|
|
1343
|
+
resolution: {integrity: sha512-g4150ksl35yZLMSezeMrtqj281Ly2RcX7qJCYQql0oDMHczlBXu2lpKuzOZ2GUdCnfT61wdmuahb7jPuyg6o7A==}
|
|
1356
1344
|
|
|
1357
|
-
'@tbox.cn/app-toolkit@0.
|
|
1358
|
-
resolution: {integrity: sha512-
|
|
1345
|
+
'@tbox.cn/app-toolkit@0.4.0':
|
|
1346
|
+
resolution: {integrity: sha512-b4ha8IonQKu2M9O/EHrUqUZh7ReiMfryNojptytRsnAOiJnTyRIQeChrDxEDHfb5ZS8AAJ0Prb5/ofxvqd7uqg==}
|
|
1359
1347
|
engines: {node: '>=20.0.0'}
|
|
1360
1348
|
|
|
1361
1349
|
'@types/babel__core@7.20.5':
|
|
@@ -1379,9 +1367,6 @@ packages:
|
|
|
1379
1367
|
'@types/connect@3.4.38':
|
|
1380
1368
|
resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==}
|
|
1381
1369
|
|
|
1382
|
-
'@types/cors@2.8.19':
|
|
1383
|
-
resolution: {integrity: sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==}
|
|
1384
|
-
|
|
1385
1370
|
'@types/debug@4.1.13':
|
|
1386
1371
|
resolution: {integrity: sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==}
|
|
1387
1372
|
|
|
@@ -1809,10 +1794,6 @@ packages:
|
|
|
1809
1794
|
resolution: {integrity: sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w==}
|
|
1810
1795
|
engines: {node: '>=12.13'}
|
|
1811
1796
|
|
|
1812
|
-
cors@2.8.6:
|
|
1813
|
-
resolution: {integrity: sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==}
|
|
1814
|
-
engines: {node: '>= 0.10'}
|
|
1815
|
-
|
|
1816
1797
|
croner@10.0.1:
|
|
1817
1798
|
resolution: {integrity: sha512-ixNtAJndqh173VQ4KodSdJEI6nuioBWI0V1ITNKhZZsO0pEMoDxz539T4FTTbSZ/xIOSuDnzxLVRqBVSvPNE2g==}
|
|
1818
1799
|
engines: {node: '>=18.0'}
|
|
@@ -4063,18 +4044,18 @@ snapshots:
|
|
|
4063
4044
|
'@tbox-dev-js/sdk': 0.1.18
|
|
4064
4045
|
zod: 3.25.76
|
|
4065
4046
|
|
|
4066
|
-
'@tbox.cn/app-contracts-mall@0.
|
|
4047
|
+
'@tbox.cn/app-contracts-mall@0.11.0':
|
|
4067
4048
|
dependencies:
|
|
4068
|
-
'@tbox.cn/app-contracts': 0.
|
|
4049
|
+
'@tbox.cn/app-contracts': 0.11.0
|
|
4069
4050
|
zod: 3.25.76
|
|
4070
4051
|
|
|
4071
|
-
'@tbox.cn/app-contracts@0.
|
|
4052
|
+
'@tbox.cn/app-contracts@0.11.0':
|
|
4072
4053
|
dependencies:
|
|
4073
4054
|
'@ag-ui/core': 0.0.47
|
|
4074
4055
|
react: 18.3.1
|
|
4075
4056
|
zod: 3.25.76
|
|
4076
4057
|
|
|
4077
|
-
'@tbox.cn/app-sdk@0.
|
|
4058
|
+
'@tbox.cn/app-sdk@0.20.0(@types/react@18.3.31)(rxjs@7.8.1)':
|
|
4078
4059
|
dependencies:
|
|
4079
4060
|
'@ag-ui/core': 0.0.47
|
|
4080
4061
|
'@ai-sdk/openai-compatible': 2.0.68(zod@3.25.76)
|
|
@@ -4083,8 +4064,8 @@ snapshots:
|
|
|
4083
4064
|
'@mastra/observability': 1.16.5(@mastra/core@1.59.0(ai@6.0.246(zod@3.25.76))(express@4.22.2)(rxjs@7.8.1)(zod@3.25.76))(zod@3.25.76)
|
|
4084
4065
|
'@tbox-dev-js/sdk': 0.1.18
|
|
4085
4066
|
'@tbox.cn/agent-plugin': 0.1.0(@mastra/core@1.59.0(ai@6.0.246(zod@3.25.76))(express@4.22.2)(rxjs@7.8.1)(zod@3.25.76))(@tbox-dev-js/sdk@0.1.18)(zod@3.25.76)
|
|
4086
|
-
'@tbox.cn/app-contracts': 0.
|
|
4087
|
-
'@tbox.cn/app-toolkit': 0.
|
|
4067
|
+
'@tbox.cn/app-contracts': 0.11.0
|
|
4068
|
+
'@tbox.cn/app-toolkit': 0.4.0
|
|
4088
4069
|
ai: 6.0.246(zod@3.25.76)
|
|
4089
4070
|
express: 4.22.2
|
|
4090
4071
|
gray-matter: 4.0.3
|
|
@@ -4107,9 +4088,9 @@ snapshots:
|
|
|
4107
4088
|
- utf-8-validate
|
|
4108
4089
|
- workflow
|
|
4109
4090
|
|
|
4110
|
-
'@tbox.cn/app-theme-tbox@0.1.
|
|
4091
|
+
'@tbox.cn/app-theme-tbox@0.1.1': {}
|
|
4111
4092
|
|
|
4112
|
-
'@tbox.cn/app-toolkit@0.
|
|
4093
|
+
'@tbox.cn/app-toolkit@0.4.0':
|
|
4113
4094
|
dependencies:
|
|
4114
4095
|
ajv: 8.20.0
|
|
4115
4096
|
zod: 3.25.76
|
|
@@ -4149,10 +4130,6 @@ snapshots:
|
|
|
4149
4130
|
dependencies:
|
|
4150
4131
|
'@types/node': 24.13.3
|
|
4151
4132
|
|
|
4152
|
-
'@types/cors@2.8.19':
|
|
4153
|
-
dependencies:
|
|
4154
|
-
'@types/node': 24.13.3
|
|
4155
|
-
|
|
4156
4133
|
'@types/debug@4.1.13':
|
|
4157
4134
|
dependencies:
|
|
4158
4135
|
'@types/ms': 2.1.0
|
|
@@ -4640,11 +4617,6 @@ snapshots:
|
|
|
4640
4617
|
dependencies:
|
|
4641
4618
|
is-what: 4.1.16
|
|
4642
4619
|
|
|
4643
|
-
cors@2.8.6:
|
|
4644
|
-
dependencies:
|
|
4645
|
-
object-assign: 4.1.1
|
|
4646
|
-
vary: 1.1.2
|
|
4647
|
-
|
|
4648
4620
|
croner@10.0.1: {}
|
|
4649
4621
|
|
|
4650
4622
|
cross-spawn@7.0.6:
|
|
@@ -38,10 +38,10 @@ catalog:
|
|
|
38
38
|
ws: 8.21.3
|
|
39
39
|
"@types/ws": 8.18.1
|
|
40
40
|
"@tbox.cn/agent-plugin": 0.1.0
|
|
41
|
-
"@tbox.cn/app-sdk": 0.
|
|
42
|
-
"@tbox.cn/app-contracts": 0.
|
|
43
|
-
"@tbox.cn/app-contracts-mall": 0.
|
|
44
|
-
"@tbox.cn/app-theme-tbox": 0.1.
|
|
41
|
+
"@tbox.cn/app-sdk": 0.20.0
|
|
42
|
+
"@tbox.cn/app-contracts": 0.11.0
|
|
43
|
+
"@tbox.cn/app-contracts-mall": 0.11.0
|
|
44
|
+
"@tbox.cn/app-theme-tbox": 0.1.1
|
|
45
45
|
zustand: 4.5.7
|
|
46
46
|
eslint: 9.39.5
|
|
47
47
|
typescript-eslint: 8.67.0
|