@csntgao/uni-base 0.6.3 → 0.6.6
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 +10 -8
- package/CLAUDE.md +10 -8
- package/README.md +27 -21
- package/docs//346/225/260/345/255/227/345/221/230/345/267/245/345/256/214/346/225/264/346/212/275/345/261/211/346/216/245/345/205/245/350/257/264/346/230/216.md +46 -0
- package/docs//347/273/204/347/273/207/345/221/230/345/267/245/345/215/225/351/200/211/347/273/204/344/273/266/346/216/245/345/205/245/350/257/264/346/230/216.md +1 -1
- package/docs//347/273/204/347/273/207/345/221/230/345/267/245/345/244/232/351/200/211/347/273/204/344/273/266/346/216/245/345/205/245/350/257/264/346/230/216.md +1 -1
- package/examples/vanilla/main.js +1 -1
- package/examples/vanilla/package.json +3 -3
- package/package.json +12 -13
- package/packages/core/package.json +2 -2
- package/packages/core/src/assistant-actions.ts +120 -0
- package/packages/core/src/customer-support-types.ts +15 -0
- package/packages/core/src/index.ts +8 -0
- package/packages/core/src/types.ts +6 -0
- package/packages/core/tests/assistant-actions.test.ts +76 -0
- package/packages/web-components/package.json +3 -3
- package/packages/web-components/scripts/verify-runtime-build.mjs +1 -0
- package/packages/web-components/src/chat.ts +267 -15
- package/packages/web-components/src/customer-support-chat.ts +1 -1
- package/packages/web-components/src/customer-support-transport.ts +118 -16
- package/packages/web-components/src/index.ts +14 -2
- package/packages/web-components/src/notification-center.ts +1 -1
- package/packages/web-components/src/notification-popover.ts +1 -1
- package/packages/web-components/src/uniplat-base-notification-center-transport.ts +1 -1
- package/packages/web-components/tests/chat.test.ts +418 -10
- package/packages/web-components/tests/customer-support-chat.test.ts +1 -1
- package/packages/web-components/tests/customer-support-transport.test.ts +89 -1
- package/packages/web-components/tests/notification-center.test.ts +1 -1
- package/packages/web-components/tests/notification-popover.test.ts +1 -1
- package/packages/web-components/tsup.config.ts +1 -1
- package/packages/web-components/tsup.runtime.config.ts +1 -1
- package/restart +0 -0
- package/tsconfig.base.json +2 -2
- package/vitest.config.ts +2 -2
- package//344/272/244/346/216/245/346/226/207/346/241/243.md +21 -26
|
@@ -38,12 +38,12 @@ HEAD = 495ef35
|
|
|
38
38
|
|
|
39
39
|
| 位置 | npm 名称 | 当前本地版本 | 说明 |
|
|
40
40
|
| ------------------------- | -------------------------------------- | -----------: | --------------------------------------- |
|
|
41
|
-
| 根目录 | `@csntgao/uni-base` | `0.6.
|
|
42
|
-
| `packages/core` | `@
|
|
43
|
-
| `packages/web-components` | `@
|
|
44
|
-
| `examples/vanilla` | `@
|
|
41
|
+
| 根目录 | `@csntgao/uni-base` | `0.6.6` | 当前公开发布入口 |
|
|
42
|
+
| `packages/core` | `@csntgao/ai-employee-client` | `0.14.3` | UI 无关的 HTTP/WebSocket/Core 状态机 |
|
|
43
|
+
| `packages/web-components` | `@csntgao/ai-employee-web-components` | `0.29.6` | Lit Web Components 与独立浏览器 runtime |
|
|
44
|
+
| `examples/vanilla` | `@csntgao/ai-employee-vanilla-example` | 私有示例 | 必须消费 workspace 包的构建产物 |
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
注意:全部 npm workspace 包已经统一为 `@csntgao/*`。已有 `uniplat-*` Web Component 标签、数字员工类型名和运行时协议名称不随 npm scope 改名。
|
|
47
47
|
|
|
48
48
|
## 3. 当前公开 Web Components
|
|
49
49
|
|
|
@@ -315,27 +315,27 @@ Account Context 对外只派发净化后的 `LOAD_FAILED`,精确排错应看
|
|
|
315
315
|
|
|
316
316
|
## 7. 当前构建和验证状态
|
|
317
317
|
|
|
318
|
-
|
|
318
|
+
最近一次完整检查结果(本次 scope 迁移完成后需重新执行):
|
|
319
319
|
|
|
320
320
|
```text
|
|
321
321
|
pnpm format:check 通过
|
|
322
322
|
pnpm lint 通过
|
|
323
323
|
pnpm typecheck 通过
|
|
324
|
-
pnpm test
|
|
324
|
+
pnpm test 26 个测试文件通过;311 passed,2 skipped
|
|
325
325
|
pnpm build core、web-components、runtime、vanilla 全部通过
|
|
326
326
|
```
|
|
327
327
|
|
|
328
328
|
两个 SDK 已重新打包:
|
|
329
329
|
|
|
330
330
|
```text
|
|
331
|
-
/Users/gaostudio/uni-base/
|
|
332
|
-
/Users/gaostudio/uni-base/
|
|
331
|
+
/Users/gaostudio/uni-base/csntgao-ai-employee-client-0.14.3.tgz
|
|
332
|
+
/Users/gaostudio/uni-base/csntgao-ai-employee-web-components-0.29.6.tgz
|
|
333
333
|
```
|
|
334
334
|
|
|
335
335
|
根包本地产物:
|
|
336
336
|
|
|
337
337
|
```text
|
|
338
|
-
/Users/gaostudio/uni-base/csntgao-uni-base-0.
|
|
338
|
+
/Users/gaostudio/uni-base/csntgao-uni-base-0.6.6.tgz
|
|
339
339
|
```
|
|
340
340
|
|
|
341
341
|
这些 tarball 都是本地交付物,不应提交 Git。
|
|
@@ -348,8 +348,8 @@ pnpm lint
|
|
|
348
348
|
pnpm typecheck
|
|
349
349
|
pnpm test
|
|
350
350
|
pnpm build
|
|
351
|
-
pnpm --filter @
|
|
352
|
-
pnpm --filter @
|
|
351
|
+
pnpm --filter @csntgao/ai-employee-client pack
|
|
352
|
+
pnpm --filter @csntgao/ai-employee-web-components pack
|
|
353
353
|
```
|
|
354
354
|
|
|
355
355
|
代码再次修改后,旧 runtime 与 tarball 立即过期。纯文档修改不需要版本递增、构建、打包或发布。
|
|
@@ -362,9 +362,9 @@ pnpm --filter @uniplat/ai-employee-web-components pack
|
|
|
362
362
|
|
|
363
363
|
```text
|
|
364
364
|
Manifest: https://10.10.10.131:8787/current.json
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
365
|
+
Current: 0.29.5
|
|
366
|
+
Target: 0.29.6(本次 scope 迁移验证后发布)
|
|
367
|
+
Module: https://10.10.10.131:8787/releases/0.29.6/index.js
|
|
368
368
|
```
|
|
369
369
|
|
|
370
370
|
最后验证结果:
|
|
@@ -372,7 +372,7 @@ SHA-256: 60fbeac569ff3cb5e27f7e4ef650fc5114343c44b42a3be3f86ace1da1bb1de9
|
|
|
372
372
|
- `current.json`:HTTP 200、`Cache-Control: no-store`;
|
|
373
373
|
- 版本模块:HTTP 200、CORS `*`、`immutable`;
|
|
374
374
|
- 远端模块 hash 与本地一致;
|
|
375
|
-
- `current.json` 指向 `./releases/0.29.
|
|
375
|
+
- 发布前 `current.json` 指向 `./releases/0.29.5/index.js`;本次完成后应原子切换到 `./releases/0.29.6/index.js`。
|
|
376
376
|
|
|
377
377
|
静态服务未启动时可执行:
|
|
378
378
|
|
|
@@ -394,13 +394,12 @@ https://registry.npmjs.org/
|
|
|
394
394
|
|
|
395
395
|
```text
|
|
396
396
|
npm whoami csntgao(已登录)
|
|
397
|
-
@csntgao/uni-base
|
|
398
|
-
@
|
|
399
|
-
@
|
|
397
|
+
@csntgao/uni-base 0.6.5 已发布并回读校验;0.6.6 待本次发布
|
|
398
|
+
@csntgao/ai-employee-client 0.14.3 待首次发布
|
|
399
|
+
@csntgao/ai-employee-web-components 0.29.6 待首次发布
|
|
400
400
|
```
|
|
401
401
|
|
|
402
|
-
|
|
403
|
-
与本地打包一致。发布后远端 `npm view` 有几秒传播延迟,第一次回读到旧版本要重试再确认。注意该包没有 `main`/`exports`/`files`,发布内容是 91 个源码文件,
|
|
402
|
+
发布后远端 `npm view` 有几秒传播延迟,第一次回读到旧版本要重试再确认。注意根包没有 `main`/`exports`/`files`,发布内容是 workspace 源码,
|
|
404
403
|
不是可直接 `import` 的库;调用方仍应使用 runtime 或 workspace 包。
|
|
405
404
|
|
|
406
405
|
发布需要浏览器 2FA:该账号的第二因子是 passkey / WebAuthn,**没有 TOTP 六位码**,所以
|
|
@@ -416,11 +415,7 @@ script -q /dev/null npm publish <绝对路径或 tarball> --access public
|
|
|
416
415
|
注意两个陷阱:`npm publish packages/core` 会被当成 git 仓库简写;`npm publish <目录>`
|
|
417
416
|
不会改写 `workspace:*`,发布 web-components 必须使用 `pnpm pack` 生成的 tarball。
|
|
418
417
|
|
|
419
|
-
|
|
420
|
-
`@uniplat/html5-qrcode: read-write`,且该包 maintainer 是 `ytl003
|
|
421
|
-
<yanghua19970726@163.com>`,`npm org ls uniplat` 无输出,说明当前账号在该 scope 下
|
|
422
|
-
只有单包权限、没有创建新包的权限。需要 scope 所有者发布,或把 `@uniplat` 作为组织把
|
|
423
|
-
`csntgao` 加入并授予创建 public package 的权限;不要通过重命名内部包规避公开契约。
|
|
418
|
+
历史 `@uniplat/*` 包因 scope 权限未发布;本次经用户明确授权执行破坏性 scope 迁移,不再把它们作为发布目标。新包统一发布到账号自有的 `@csntgao/*` scope,Web Component 标签与运行时协议名称继续保持 `uniplat-*`。
|
|
424
419
|
|
|
425
420
|
## 9. 发布流程
|
|
426
421
|
|