@chanlerdev/scorel 0.0.5 → 0.0.7
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 +11 -2
- package/dist/index.js +440 -178
- package/dist/index.js.map +4 -4
- package/docs/CHANGELOG.md +59 -0
- package/docs/ROADMAP.md +6 -0
- package/docs/SHIP.md +1 -0
- package/docs/spec/channels.md +1 -1
- package/docs/spec/events.md +45 -11
- package/docs/spec/runtime.md +3 -3
- package/docs/spec/session.md +16 -4
- package/docs/spec/ship/S0106-snip-context-control.md +113 -0
- package/docs/spec/ship/S0107-system-reminder-unification.md +173 -0
- package/docs/spec/ship/S0108-gui-bundled-cli-runtime.md +108 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,6 +45,8 @@ pnpm --filter @scorel/app-gui dist:mac
|
|
|
45
45
|
|
|
46
46
|
GUI 跟随正常 release 节奏发布到同一个 GitHub Release。Release assets 包含 dmg / zip、`latest-mac.yml` 和 blockmap 文件;packaged GUI 通过 `electron-updater` 读取这些 metadata 做增量更新。
|
|
47
47
|
|
|
48
|
+
Packaged GUI 自带同版本 CLI runtime:`Scorel.app/Contents/Resources/scorel` 会通过 app 自己的 Electron executable 以 Node mode 运行 `scorel.js`,再启动本机 Host。它不依赖用户全局安装的 `node`、`scorel`、nvm PATH 或源码仓库路径。
|
|
49
|
+
|
|
48
50
|
当前没有 Apple Developer signing/notarization 时,macOS 首次打开下载的 app 可能被 Gatekeeper 拦截。确认来源可信后,可以移除 quarantine 标记:
|
|
49
51
|
|
|
50
52
|
```bash
|
|
@@ -204,15 +206,18 @@ Session 是 append-only JSONL。Host 是唯一 writer,Entry 不直接写会话
|
|
|
204
206
|
一次会话里会写入这些事件:
|
|
205
207
|
|
|
206
208
|
- `instruction_snapshot`:Session 初始化时冻结的系统提示词来源。
|
|
207
|
-
- `harness_item
|
|
209
|
+
- `harness_item`:运行中或 session 级注入给模型的上下文,例如 memory、skill listing、steer;进入模型前会转成结构化 `system_reminder` block。
|
|
208
210
|
- `user_message`:用户输入。
|
|
209
211
|
- `assistant_message`:模型输出。
|
|
210
212
|
- `tool_result`:工具执行结果。
|
|
211
213
|
- `compact`:旧上下文的压缩摘要,作为后续 `buildContext()` 的 replay barrier。
|
|
214
|
+
- `context_control`:上下文投影控制,例如 `snip` 隐藏某个已完成 user turn,使它不再进入未来 LLM context。
|
|
212
215
|
- `queue_update`:follow-up / steer 队列状态。
|
|
213
216
|
- `skill_index_snapshot` / `skill_index_delta`:Skill 路由表。
|
|
214
217
|
|
|
215
|
-
JSONL 是恢复会话的事实来源。`buildContext()` 从事件树构造下一轮 LLM messages;遇到 `compact` 时,会用
|
|
218
|
+
JSONL 是恢复会话的事实来源。`buildContext()` 从事件树构造下一轮 canonical LLM messages;遇到 `compact` 时,会用 `system_reminder kind="compact_summary"` 替换更早上下文,并最多保留最近 8 条从 `user_message`、`compact` 或带 `tool_call` 的 `assistant_message` 边界开始的原始 conversation events;遇到 `context_control operation="hide_user_turn"` 时,会从未来模型上下文中过滤对应 user turn span。UI 则从同一条事件流投影 transcript、工具块、运行状态和队列状态。
|
|
219
|
+
|
|
220
|
+
`system_reminder` 是结构化 content block,不是 JSONL 事件类型,也不是 provider-level system prompt。它可以作为 user message 的 model-only sidecar(例如当前 turn 信息、`snip.userMessageId`、用户引用),也可以由 `harness_item` / `compact` 在 `buildContext()` 时产生。Provider adapter 最后才把它 lower 成 `<system-reminder>...</system-reminder>` 文本;GUI / WebUI / CLI 只按 block type 和 `visibility` 决定展示,不解析 XML。
|
|
216
221
|
|
|
217
222
|
这个设计的重点不是“保存聊天记录”,而是让 Agent 的输入、输出、工具调用、控制事件和恢复状态都落在同一条可检查的链路里。
|
|
218
223
|
|
|
@@ -255,6 +260,8 @@ Memory 的链路分三段:
|
|
|
255
260
|
|
|
256
261
|
Auto compact 是当前 session 的上下文管理,不是长期 memory。Host 在每轮新用户消息写入前估算 context,默认达到模型窗口 80% 时追加 `compact` 事件。`compact` 优先使用后台维护的 session memory;如果 session memory 不存在或关闭,会降级到 foreground compact。后台 session memory 正在更新时,Host 最多等待 5 秒,然后继续执行,不让用户 turn 无限等待。
|
|
257
262
|
|
|
263
|
+
`snip` 是另一种当前 session 的上下文管理:Host 创建每条 `user_message` 时会持久写入一个 model-only 的 `system_reminder kind="message_ref"`,内容包含短 `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 放进模型输入。
|
|
264
|
+
|
|
258
265
|
Session memory 写在:
|
|
259
266
|
|
|
260
267
|
```text
|
|
@@ -446,6 +453,7 @@ GUI 更偏本地桌面工作台,WebUI 更偏 hosted/remote control。二者都
|
|
|
446
453
|
- AGENTS.md instruction snapshot。
|
|
447
454
|
- Skill index + Skill tool。
|
|
448
455
|
- memory harness + AppendDaily + idle dream。
|
|
456
|
+
- context control + `snip` tool。
|
|
449
457
|
- provider/model profile 和 auxiliary model。
|
|
450
458
|
- extension manifest + IM channel bridge。
|
|
451
459
|
- built-in Telegram IM extension。
|
|
@@ -454,6 +462,7 @@ GUI 更偏本地桌面工作台,WebUI 更偏 hosted/remote control。二者都
|
|
|
454
462
|
- GUI IM settings。
|
|
455
463
|
- CLI update/upgrade。
|
|
456
464
|
- GUI release assets with incremental update metadata。
|
|
465
|
+
- packaged GUI bundled CLI runtime for local Host startup。
|
|
457
466
|
|
|
458
467
|
计划中的方向:
|
|
459
468
|
|