@auipage/core 0.1.0-alpha.4 → 0.1.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/AUTHORS.txt CHANGED
@@ -1,6 +1,6 @@
1
- Authors ordered by first contribution.
2
-
3
- zxl20070701 <1904314465@qq.com> <https://github.com/zxl20070701>
4
-
5
- -----------------------------------------------------
6
- We thank all of them for their contributions!
1
+ Authors ordered by first contribution.
2
+
3
+ zxl20070701 <1904314465@qq.com> <https://github.com/zxl20070701>
4
+
5
+ -----------------------------------------------------
6
+ We thank all of them for their contributions!
package/CHANGELOG CHANGED
@@ -1,4 +1,4 @@
1
- v0.1.0:
2
- date:
3
- changes:
4
- - 初始化版本
1
+ v0.1.0:
2
+ date:2026-10-25
3
+ changes:
4
+ - 初始化版本
package/README.md CHANGED
@@ -1,54 +1,54 @@
1
- # [@auipage/core](https://github.com/handless-ui/auipage/packages/core/README.md)
2
-
3
- auipage 的核心层:业务侧实现 Adapter 对接模型与存储,UI 侧实现 Runtime 负责渲染,`AuiPage` 把两者串起来,统一处理会话列表、消息历史、流式对话和历史入库。不耦合任何模型服务与 UI 框架。
4
-
5
- <p>
6
- <a href="https://zxl20070701.github.io/toolbox/#/npm-download?packages=@auipage/core&interval=7">
7
- <img src="https://img.shields.io/npm/dm/@auipage/core.svg" alt="downloads">
8
- </a>
9
- <a href="https://www.npmjs.com/package/@auipage/core">
10
- <img src="https://img.shields.io/npm/v/@auipage/core.svg" alt="npm">
11
- </a>
12
- <a href="https://github.com/handless-ui/auipage" target='_blank'>
13
- <img alt="GitHub repo stars" src="https://img.shields.io/github/stars/handless-ui/auipage?style=social">
14
- </a>
15
- </p>
16
-
17
- <img src="https://nodei.co/npm/@auipage/core.png?downloads=true&amp;downloadRank=true&amp;stars=true" alt="NPM">
18
-
19
- ## 安装
20
-
21
- ```
22
- npm install --save @auipage/core
23
- ```
24
-
25
- 通常配合 `@auipage/agent`(对话循环)、`@auipage/model`(模型请求)一起使用。
26
-
27
- ## 导出
28
-
29
- | 导出名 | 类型 | 作用 |
30
- | --- | --- | --- |
31
- | `AuiPage` | 构造器 | 框架核心,管理 adapter / runtime、消息与会话状态 |
32
- | `ChatTransportAdapter` | 适配器基类 | 对接模型对话接口,流式产出消息片段 |
33
- | `MessageHistoryAdapter` | 适配器基类 | 历史消息的加载与追加 |
34
- | `ThreadListAdapter` | 适配器基类 | 会话列表的增删改查 |
35
- | `ThreadListRuntime` | 运行时基类 | 会话列表的 UI 渲染钩子 |
36
- | `ChatContentRuntime` | 运行时基类 | 对话内容的 UI 渲染钩子 |
37
- | `defineTool` | 函数 | 定义前端工具(`description` / `execute` / `render`) |
38
- | `generator` | 函数 | 把回调式异步流转成 `AsyncGenerator` |
39
- | `MessageStream` | 构造器 | 消息流封装(`send` / `end`),服务端配合 `CreateTool` 推送 SSE |
40
-
41
- ## 文档
42
-
43
- - [快速上手](./docs/quick-start.md):完整可运行示例与整体流程
44
- - [AuiPage](./docs/auipage.md):构造参数、实例属性与方法、消息结构、任务生命周期事件
45
- - [Adapter](./docs/adapters.md):三个适配器的接口与实现示例
46
- - [Runtime](./docs/runtimes.md):两个运行时的渲染钩子约定
47
- - [defineTool](./docs/define-tool.md):前端工具定义
48
- - [generator](./docs/generator.md):回调式流到 `AsyncGenerator` 的转换
49
-
50
- ## 版权
51
-
52
- MIT License
53
-
54
- Copyright (c) [zxl20070701](https://zxl20070701.github.io/notebook/home.html) 走一步,再走一步
1
+ # [@auipage/core](https://github.com/handless-ui/auipage/packages/core/README.md)
2
+
3
+ auipage 的核心层:业务侧实现 Adapter 对接模型与存储,UI 侧实现 Runtime 负责渲染,`AuiPage` 把两者串起来,统一处理会话列表、消息历史、流式对话和历史入库。不耦合任何模型服务与 UI 框架。
4
+
5
+ <p>
6
+ <a href="https://zxl20070701.github.io/toolbox/#/npm-download?packages=@auipage/core&interval=7">
7
+ <img src="https://img.shields.io/npm/dm/@auipage/core.svg" alt="downloads">
8
+ </a>
9
+ <a href="https://www.npmjs.com/package/@auipage/core">
10
+ <img src="https://img.shields.io/npm/v/@auipage/core.svg" alt="npm">
11
+ </a>
12
+ <a href="https://github.com/handless-ui/auipage" target='_blank'>
13
+ <img alt="GitHub repo stars" src="https://img.shields.io/github/stars/handless-ui/auipage?style=social">
14
+ </a>
15
+ </p>
16
+
17
+ <img src="https://nodei.co/npm/@auipage/core.png?downloads=true&amp;downloadRank=true&amp;stars=true" alt="NPM">
18
+
19
+ ## 安装
20
+
21
+ ```
22
+ npm install --save @auipage/core
23
+ ```
24
+
25
+ 通常配合 `@auipage/agent`(对话循环)、`@auipage/model`(模型请求)一起使用。
26
+
27
+ ## 导出
28
+
29
+ | 导出名 | 类型 | 作用 |
30
+ | --- | --- | --- |
31
+ | `AuiPage` | 构造器 | 框架核心,管理 adapter / runtime、消息与会话状态 |
32
+ | `ChatTransportAdapter` | 适配器基类 | 对接模型对话接口,流式产出消息片段 |
33
+ | `MessageHistoryAdapter` | 适配器基类 | 历史消息的加载与追加 |
34
+ | `ThreadListAdapter` | 适配器基类 | 会话列表的增删改查 |
35
+ | `ThreadListRuntime` | 运行时基类 | 会话列表的 UI 渲染钩子 |
36
+ | `ChatContentRuntime` | 运行时基类 | 对话内容的 UI 渲染钩子 |
37
+ | `defineTool` | 函数 | 定义前端工具(`description` / `execute` / `render`) |
38
+ | `generator` | 函数 | 把回调式异步流转成 `AsyncGenerator` |
39
+ | `MessageStream` | 构造器 | 消息流封装(`send` / `end`),服务端配合 `CreateTool` 推送 SSE |
40
+
41
+ ## 文档
42
+
43
+ - [快速上手](./docs/quick-start.md):完整可运行示例与整体流程
44
+ - [AuiPage](./docs/auipage.md):构造参数、实例属性与方法、消息结构、任务生命周期事件
45
+ - [Adapter](./docs/adapters.md):三个适配器的接口与实现示例
46
+ - [Runtime](./docs/runtimes.md):两个运行时的渲染钩子约定
47
+ - [defineTool](./docs/define-tool.md):前端工具定义
48
+ - [generator](./docs/generator.md):回调式流到 `AsyncGenerator` 的转换
49
+
50
+ ## 版权
51
+
52
+ MIT License
53
+
54
+ Copyright (c) [zxl20070701](https://zxl20070701.github.io/notebook/home.html) 走一步,再走一步