@chanlerdev/scorel 0.0.5 → 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 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
@@ -209,10 +211,11 @@ Session 是 append-only JSONL。Host 是唯一 writer,Entry 不直接写会话
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` 时,会用 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、工具块、运行状态和队列状态。
216
219
 
217
220
  这个设计的重点不是“保存聊天记录”,而是让 Agent 的输入、输出、工具调用、控制事件和恢复状态都落在同一条可检查的链路里。
218
221
 
@@ -255,6 +258,8 @@ Memory 的链路分三段:
255
258
 
256
259
  Auto compact 是当前 session 的上下文管理,不是长期 memory。Host 在每轮新用户消息写入前估算 context,默认达到模型窗口 80% 时追加 `compact` 事件。`compact` 优先使用后台维护的 session memory;如果 session memory 不存在或关闭,会降级到 foreground compact。后台 session memory 正在更新时,Host 最多等待 5 秒,然后继续执行,不让用户 turn 无限等待。
257
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
+
258
263
  Session memory 写在:
259
264
 
260
265
  ```text
@@ -446,6 +451,7 @@ GUI 更偏本地桌面工作台,WebUI 更偏 hosted/remote control。二者都
446
451
  - AGENTS.md instruction snapshot。
447
452
  - Skill index + Skill tool。
448
453
  - memory harness + AppendDaily + idle dream。
454
+ - context control + `snip` tool。
449
455
  - provider/model profile 和 auxiliary model。
450
456
  - extension manifest + IM channel bridge。
451
457
  - built-in Telegram IM extension。
@@ -454,6 +460,7 @@ GUI 更偏本地桌面工作台,WebUI 更偏 hosted/remote control。二者都
454
460
  - GUI IM settings。
455
461
  - CLI update/upgrade。
456
462
  - GUI release assets with incremental update metadata。
463
+ - packaged GUI bundled CLI runtime for local Host startup。
457
464
 
458
465
  计划中的方向:
459
466