@chanlerdev/scorel 0.0.4 → 0.0.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/README.md +37 -1
- package/dist/index.js +676 -198
- package/dist/index.js.map +4 -4
- package/docs/CHANGELOG.md +73 -0
- package/docs/ROADMAP.md +11 -0
- package/docs/SHIP.md +10 -5
- package/docs/spec/events.md +17 -1
- package/docs/spec/session.md +12 -0
- package/docs/spec/ship/S0064-gui-product-intent-and-boundary.md +1 -1
- package/docs/spec/ship/S0073-provider-model-profile-contract.md +8 -1
- package/docs/spec/ship/S0103-daemon-lifecycle-and-settings-resilience.md +61 -0
- package/docs/spec/ship/S0104-tool-result-artifacts.md +64 -0
- package/docs/spec/ship/S0105-cli-update-and-gui-release.md +128 -0
- package/docs/spec/ship/S0106-snip-context-control.md +113 -0
- package/docs/spec/ship/S0107-system-reminder-unification.md +112 -0
- package/docs/spec/ship/S0108-gui-bundled-cli-runtime.md +108 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,12 +20,39 @@ pnpm install
|
|
|
20
20
|
pnpm scorel
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
查看版本、手动更新 CLI:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
scorel --version
|
|
27
|
+
scorel update
|
|
28
|
+
# alias
|
|
29
|
+
scorel upgrade
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
后台 Host 会每小时检查一次 npm 上的 `@chanlerdev/scorel`。发现新版本后,只有在没有 active work,或者 active work 已经连续三小时没有进展时,才会执行同一套 npm 更新;更新成功后 Host 会短暂停止,下一次 CLI / GUI / WebUI 入口启动时使用新版本。
|
|
33
|
+
|
|
23
34
|
启动桌面 GUI,本机会启动 embedded Host:
|
|
24
35
|
|
|
25
36
|
```bash
|
|
26
37
|
pnpm gui
|
|
27
38
|
```
|
|
28
39
|
|
|
40
|
+
打包 macOS GUI:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pnpm --filter @scorel/app-gui dist:mac
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
GUI 跟随正常 release 节奏发布到同一个 GitHub Release。Release assets 包含 dmg / zip、`latest-mac.yml` 和 blockmap 文件;packaged GUI 通过 `electron-updater` 读取这些 metadata 做增量更新。
|
|
47
|
+
|
|
48
|
+
Packaged GUI 自带同版本 CLI runtime:`Scorel.app/Contents/Resources/scorel` 会通过 app 自己的 Electron executable 以 Node mode 运行 `scorel.js`,再启动本机 Host。它不依赖用户全局安装的 `node`、`scorel`、nvm PATH 或源码仓库路径。
|
|
49
|
+
|
|
50
|
+
当前没有 Apple Developer signing/notarization 时,macOS 首次打开下载的 app 可能被 Gatekeeper 拦截。确认来源可信后,可以移除 quarantine 标记:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
xattr -dr com.apple.quarantine /Applications/Scorel.app
|
|
54
|
+
```
|
|
55
|
+
|
|
29
56
|
启动本机 Host:
|
|
30
57
|
|
|
31
58
|
```bash
|
|
@@ -184,10 +211,11 @@ Session 是 append-only JSONL。Host 是唯一 writer,Entry 不直接写会话
|
|
|
184
211
|
- `assistant_message`:模型输出。
|
|
185
212
|
- `tool_result`:工具执行结果。
|
|
186
213
|
- `compact`:旧上下文的压缩摘要,作为后续 `buildContext()` 的 replay barrier。
|
|
214
|
+
- `context_control`:上下文投影控制,例如 `snip` 隐藏某个已完成 user turn,使它不再进入未来 LLM context。
|
|
187
215
|
- `queue_update`:follow-up / steer 队列状态。
|
|
188
216
|
- `skill_index_snapshot` / `skill_index_delta`:Skill 路由表。
|
|
189
217
|
|
|
190
|
-
JSONL 是恢复会话的事实来源。`buildContext()` 从事件树构造下一轮 LLM messages;遇到 `compact` 时,会用 compact summary 替换更早上下文,并最多保留最近 8 条从 `user_message`、`compact` 或带 `tool_call` 的 `assistant_message` 边界开始的原始 conversation events。UI 则从同一条事件流投影 transcript、工具块、运行状态和队列状态。
|
|
218
|
+
JSONL 是恢复会话的事实来源。`buildContext()` 从事件树构造下一轮 LLM messages;遇到 `compact` 时,会用 compact summary 替换更早上下文,并最多保留最近 8 条从 `user_message`、`compact` 或带 `tool_call` 的 `assistant_message` 边界开始的原始 conversation events;遇到 `context_control operation="hide_user_turn"` 时,会从未来模型上下文中过滤对应 user turn span。UI 则从同一条事件流投影 transcript、工具块、运行状态和队列状态。
|
|
191
219
|
|
|
192
220
|
这个设计的重点不是“保存聊天记录”,而是让 Agent 的输入、输出、工具调用、控制事件和恢复状态都落在同一条可检查的链路里。
|
|
193
221
|
|
|
@@ -230,6 +258,8 @@ Memory 的链路分三段:
|
|
|
230
258
|
|
|
231
259
|
Auto compact 是当前 session 的上下文管理,不是长期 memory。Host 在每轮新用户消息写入前估算 context,默认达到模型窗口 80% 时追加 `compact` 事件。`compact` 优先使用后台维护的 session memory;如果 session memory 不存在或关闭,会降级到 foreground compact。后台 session memory 正在更新时,Host 最多等待 5 秒,然后继续执行,不让用户 turn 无限等待。
|
|
232
260
|
|
|
261
|
+
`snip` 是另一种当前 session 的上下文管理:Host 创建每条 `user_message` 时会持久写入一个 model-only 的短 `snip.userMessageId`,UI 不展示,但模型能用它通过 Host 注册的 `snip` 工具请求隐藏其中一个已完成 user turn。因为这个 id 随消息创建时固定下来,后续 `buildContext()` replay 不会动态改写历史 user message,也不会破坏 prompt cache 前缀。Host 会校验目标 `user_message` 在当前 active path 上,并 append `context_control` 事件;原始 JSONL 不删除、不重写,只是后续 `buildContext()` 不再把该 span 放进模型输入。
|
|
262
|
+
|
|
233
263
|
Session memory 写在:
|
|
234
264
|
|
|
235
265
|
```text
|
|
@@ -403,6 +433,8 @@ GUI 更偏本地桌面工作台,WebUI 更偏 hosted/remote control。二者都
|
|
|
403
433
|
- memory settings。
|
|
404
434
|
- IM settings,包括 Telegram enable、env/direct token、allowed chats、QQ App ID / App Secret、WeChat outbound webhook 和 inbound callback。
|
|
405
435
|
- Relay device pairing 和 remote project 选择。
|
|
436
|
+
- packaged GUI auto-update。
|
|
437
|
+
- macOS menu bar status menu with Show, Settings, Check for Updates, Host status, and Quit.
|
|
406
438
|
|
|
407
439
|
## Status
|
|
408
440
|
|
|
@@ -419,12 +451,16 @@ GUI 更偏本地桌面工作台,WebUI 更偏 hosted/remote control。二者都
|
|
|
419
451
|
- AGENTS.md instruction snapshot。
|
|
420
452
|
- Skill index + Skill tool。
|
|
421
453
|
- memory harness + AppendDaily + idle dream。
|
|
454
|
+
- context control + `snip` tool。
|
|
422
455
|
- provider/model profile 和 auxiliary model。
|
|
423
456
|
- extension manifest + IM channel bridge。
|
|
424
457
|
- built-in Telegram IM extension。
|
|
425
458
|
- built-in QQ Bot IM extension。
|
|
426
459
|
- WeChat outbound webhook 和 official-account style plaintext callback。
|
|
427
460
|
- GUI IM settings。
|
|
461
|
+
- CLI update/upgrade。
|
|
462
|
+
- GUI release assets with incremental update metadata。
|
|
463
|
+
- packaged GUI bundled CLI runtime for local Host startup。
|
|
428
464
|
|
|
429
465
|
计划中的方向:
|
|
430
466
|
|