@chanlerdev/scorel 0.0.2 → 0.0.4
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 +55 -2
- package/dist/index.js +1162 -192
- package/dist/index.js.map +3 -3
- package/docs/CHANGELOG.md +106 -0
- package/docs/ROADMAP.md +34 -2
- package/docs/SHIP.md +1 -1
- package/docs/spec/channels.md +15 -5
- package/docs/spec/extensions.md +6 -5
- package/docs/spec/ship/S0060-relay-hosted-webui-e2e-validation.verification.md +1 -1
- package/docs/spec/ship/S0073-provider-model-profile-contract.md +6 -6
- package/docs/spec/ship/S0074-gui-model-provider-settings-split.md +1 -1
- package/docs/spec/ship/S0076-provider-modal-search-and-direct-key.md +1 -1
- package/docs/spec/ship/S0086-auto-compact-and-session-memory.md +1 -1
- package/docs/spec/ship/S0087-gui-ui-polish-sweep.md +153 -0
- package/docs/spec/ship/S0088-gui-streaming-thinking-contract.md +35 -0
- package/docs/spec/ship/S0089-memory-reliability-and-dream-trigger.md +84 -0
- package/docs/spec/ship/S0090-gui-provider-delete-and-dark-code-theme.md +77 -0
- package/docs/spec/ship/S0091-built-in-qq-and-wechat-im-extensions.md +125 -0
- package/docs/spec/ship/S0092-im-message-media-and-human-cadence.md +83 -0
- package/docs/spec/ship/S0093-gui-im-settings-platform-layout.md +66 -0
- package/docs/spec/ship/S0094-im-inbound-runtime.md +67 -0
- package/docs/spec/ship/S0095-gui-im-session-list-refresh.md +36 -0
- package/docs/spec/ship/S0096-glob-stable-order.md +32 -0
- package/docs/spec/ship/S0097-rtk-token-saving-settings.md +61 -0
- package/docs/spec/ship/S0098-local-daemon-singleton-unified-state.md +96 -0
- package/docs/spec/ship/S0099-gui-connection-device-settings.md +85 -0
- package/docs/spec/ship/S0100-gui-provider-danger-zone.md +57 -0
- package/docs/spec/ship/S0101-gui-device-settings-polish.md +66 -0
- package/docs/spec/ship/S0102-device-only-config.md +58 -0
- package/extensions/builtin/loopback/skills/loopback/SKILL.md +2 -0
- package/extensions/builtin/qq/adapter.d.ts +27 -0
- package/extensions/builtin/qq/adapter.js +384 -0
- package/extensions/builtin/qq/scorel.extension.json +7 -0
- package/extensions/builtin/qq/skills/qq/SKILL.md +9 -0
- package/extensions/builtin/telegram/adapter.d.ts +1 -1
- package/extensions/builtin/telegram/adapter.js +7 -0
- package/extensions/builtin/telegram/skills/telegram/SKILL.md +2 -0
- package/extensions/builtin/wechat/adapter.d.ts +24 -0
- package/extensions/builtin/wechat/adapter.js +226 -0
- package/extensions/builtin/wechat/scorel.extension.json +7 -0
- package/extensions/builtin/wechat/skills/wechat/SKILL.md +9 -0
- package/package.json +4 -2
package/docs/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,112 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.0.4 - 2026-06-14
|
|
6
|
+
|
|
7
|
+
### Highlights
|
|
8
|
+
|
|
9
|
+
- Config is now device-scoped only; project-level config is no longer read or written.
|
|
10
|
+
- GUI settings are device-scoped with relay device rename and project scope selector.
|
|
11
|
+
- Local daemon is a singleton background process with idle shutdown and shared state root.
|
|
12
|
+
- RTK token saving settings available in GUI for Bash execution.
|
|
13
|
+
|
|
14
|
+
### Changes
|
|
15
|
+
|
|
16
|
+
- GUI connection settings default to official Relay URL; editing requires explicit click.
|
|
17
|
+
- Pairing button label changed to 'Get Pair Code'.
|
|
18
|
+
- Paired Relay devices can be renamed locally; name persists across refresh.
|
|
19
|
+
- Provider delete button moved to a danger zone at bottom of settings panel.
|
|
20
|
+
- Token-saving statistics labels changed to Chinese (Bash 输出 Token / 已节省 Token).
|
|
21
|
+
- RTK token saving can be enabled/disabled in GUI settings, persisted in project config.
|
|
22
|
+
- Cumulative RTK savings stats are maintained across sessions and projects.
|
|
23
|
+
- RTK is detected from default shell; can be installed via Homebrew if missing.
|
|
24
|
+
|
|
25
|
+
### Fixes
|
|
26
|
+
|
|
27
|
+
- Glob results are now sorted by workspace-relative path for deterministic ordering across platforms.
|
|
28
|
+
|
|
29
|
+
### Breaking Changes
|
|
30
|
+
|
|
31
|
+
- Runtime no longer reads project `.scorel/config.toml`; existing project configs are ignored.
|
|
32
|
+
- GUI local projects and sessions are now stored under `~/.scorel/` instead of `~/.scorel/gui/`; old state is not migrated automatically.
|
|
33
|
+
|
|
34
|
+
### Verification
|
|
35
|
+
|
|
36
|
+
- Core config tests prove project config is ignored and device config is used.
|
|
37
|
+
- Daemon embedded tests prove settings writes with projectId write device config only.
|
|
38
|
+
- GUI rendering tests confirm device-scoped selector, provider delete placement, and Chinese token labels.
|
|
39
|
+
- New local-host test verifies device config writes to ~/.scorel/config.toml.
|
|
40
|
+
- E2E CDP script validates shared state paths and daemon lifecycle.
|
|
41
|
+
- Unit tests cover RTK detection, Bash execution with RTK, and runtime stats recording.
|
|
42
|
+
|
|
43
|
+
### Internal
|
|
44
|
+
|
|
45
|
+
- `scorel host start` launches a singleton background daemon; `scorel host serve` gains `--idle-timeout-ms` flag.
|
|
46
|
+
- `scorel up` ensures daemon is running but no longer owns its lifecycle.
|
|
47
|
+
- GUI attaches to singleton daemon instead of running embedded Host.
|
|
48
|
+
- gui-store.json lives at `~/.scorel/gui-store.json`.
|
|
49
|
+
|
|
50
|
+
- Add `scorel host start` for background singleton Host startup; `scorel up` now leaves the singleton Host running when WebUI exits.
|
|
51
|
+
- GUI local Host state now uses the shared `~/.scorel` root for Projects and Sessions, with `gui-store.json` stored at `~/.scorel/gui-store.json`.
|
|
52
|
+
- GUI starts and attaches to the singleton local daemon instead of starting a second local Host writer.
|
|
53
|
+
- Local daemon now idle-shuts down when there are no clients, no active work, and no active IM extensions; active IM keeps it alive until explicit stop.
|
|
54
|
+
- GUI connection settings now default to the official Relay, hide Relay URL editing behind an edit action, show `Get Pair Code`, support paired-device rename/details, and use a device-scoped settings selector.
|
|
55
|
+
- GUI Provider settings now place `删除提供商` in the Provider configuration block, token-saving stats use clear Chinese labels, and Relay device rows expose expand/edit affordances.
|
|
56
|
+
- Config loading now uses the device config only; Project `.scorel/config.toml` is no longer a runtime or Settings config source.
|
|
57
|
+
|
|
58
|
+
## 0.0.3 - 2026-06-12
|
|
59
|
+
|
|
60
|
+
### Highlights
|
|
61
|
+
|
|
62
|
+
- QQ Bot and WeChat inbound support: receive and route messages via official WebSocket or HTTP callback
|
|
63
|
+
- GUI now auto-refreshes session lists when IM sessions are created in the background
|
|
64
|
+
- Streaming thinking delta events in GUI for real-time thought display
|
|
65
|
+
- Memory status display and reliability improvements (dream trigger, duplicate detection)
|
|
66
|
+
|
|
67
|
+
### Changes
|
|
68
|
+
|
|
69
|
+
- GUI automatically refreshes session lists when IM sessions are created in the background
|
|
70
|
+
- Implement IM inbound runtime for QQ and WeChat (WebSocket gateway, HTTP callback server)
|
|
71
|
+
- Compact IM settings layout with collapsible rows for Telegram, QQ, and WeChat
|
|
72
|
+
- SendChannelMessage now supports optional attachments (image/file) with metadata
|
|
73
|
+
- Human-cadence guidance injected into IM replies (acknowledgement, progress updates)
|
|
74
|
+
- Add built-in QQ Bot and WeChat IM extension support (sending and receiving)
|
|
75
|
+
- Add thinking_delta event for streaming real-time thought content in GUI
|
|
76
|
+
- Add memory status query and GUI display for memory status
|
|
77
|
+
- Improve daily append quality with validation for low-signal summaries and duplicate detection
|
|
78
|
+
- Persist memory dream state (dirty/running/scheduled/failure) with restart recovery
|
|
79
|
+
- Refine GUI visual style: Codex-inspired polish for sidebar, empty workspace, composer, code blocks, and tool execution traces
|
|
80
|
+
- Add 'delete provider' button in GUI Settings with full deletion chain
|
|
81
|
+
- Fix IME composition handling in composer (Enter does not submit during IME input)
|
|
82
|
+
- Fix Shiki code block theme from dark to light to match GUI surface
|
|
83
|
+
|
|
84
|
+
### Fixes
|
|
85
|
+
|
|
86
|
+
- GUI provider deletion now removes provider, models, and dependent role assignments
|
|
87
|
+
- Dark code block theme fixed to light mode for better readability in dark GUI
|
|
88
|
+
- IME composition handling in composer fixed (Enter does not submit during IME input)
|
|
89
|
+
|
|
90
|
+
### Breaking Changes
|
|
91
|
+
|
|
92
|
+
- QQ and WeChat config keys changed: old `tokenEnv`, `token`, `webhookKeyEnv`, etc. are no longer supported; users must re-enter App ID/App Secret or Webhook URL.
|
|
93
|
+
|
|
94
|
+
### Verification
|
|
95
|
+
|
|
96
|
+
- Unit and integration tests for QQ gateway identify/heartbeat/dispatch/stop
|
|
97
|
+
- Unit and integration tests for WeChat callback verification and text message routing
|
|
98
|
+
- Tests for session change notification and renderer refresh behavior
|
|
99
|
+
- Tests for attachment validation and human-cadence guidance in channel harness
|
|
100
|
+
- Tests for QQ/WeChat adapter normalization and secret redaction
|
|
101
|
+
- Tests for streaming thinking deltas and final message reconciliation
|
|
102
|
+
- Tests for low-signal daily summary rejection and duplicate entry skipping
|
|
103
|
+
- Tests for memory dream state persistence and status retrieval
|
|
104
|
+
- GUI tests for IM settings layout, provider deletion, code block theme, and memory status display
|
|
105
|
+
|
|
106
|
+
### Internal
|
|
107
|
+
|
|
108
|
+
- Update README to clarify IM behavior details for QQ Bot and WeChat integrations
|
|
109
|
+
- Add planned spec S0089 for memory reliability and dream trigger improvements
|
|
110
|
+
|
|
5
111
|
## 0.0.2 - 2026-06-11
|
|
6
112
|
|
|
7
113
|
### Highlights
|
package/docs/ROADMAP.md
CHANGED
|
@@ -303,7 +303,7 @@ M5 WebUI 的正式产品方向记录在 [`S0030`](spec/ship/S0030-webui-product-
|
|
|
303
303
|
- `scorel daemon serve` 全部 flag 有合理默认;token 在 `~/.scorel/daemon.json` 持久化,跨重启复用。
|
|
304
304
|
- `~/.scorel/daemon.json` 不再每次启动删除;通过 pid liveness + `stoppedAt` 判存活。
|
|
305
305
|
- WebUI Settings 页面通过 `/api/local-daemon` server route 自动发现本地 daemon,一键添加 device。
|
|
306
|
-
- `scorel up`
|
|
306
|
+
- `scorel up` 确保 singleton daemon 可用并启动 WebUI;退出 `scorel up` 不关闭后台 daemon;无 client/无 active work/无 active IM 后 idle 自动退出。
|
|
307
307
|
- 全部改动通过自动测试,真实 LLM 手工烟雾通过。
|
|
308
308
|
|
|
309
309
|
**Steps**:
|
|
@@ -315,7 +315,7 @@ M5 WebUI 的正式产品方向记录在 [`S0030`](spec/ship/S0030-webui-product-
|
|
|
315
315
|
**Not in M5.6**:
|
|
316
316
|
|
|
317
317
|
- WebUI 多 daemon 切换 UI;每用户单 daemon 假设。
|
|
318
|
-
-
|
|
318
|
+
- restart-on-crash supervisor;仍需手工 `scorel host stop && start`。
|
|
319
319
|
- Windows 专属 PID 语义。
|
|
320
320
|
- TLS / OAuth / 公网隧道。
|
|
321
321
|
|
|
@@ -589,6 +589,15 @@ M5 WebUI 的正式产品方向记录在 [`S0030`](spec/ship/S0030-webui-product-
|
|
|
589
589
|
| M9.F1.13 | [`S0081`](spec/ship/S0081-automatic-memory.md) | 自动 memory context、daily、dream consolidation、GUI Settings 与 Command+, 设置入口 | Done |
|
|
590
590
|
| M9.F1.14 | [`S0082`](spec/ship/S0082-memory-journal-tool-and-idle-dream.md) | Daily 改为 agent 主循环 AppendDaily 工具,dream 改为项目 idle 后延迟整合 project/root memory | Done |
|
|
591
591
|
| M9.F1.15 | [`S0086`](spec/ship/S0086-auto-compact-and-session-memory.md) | 80% auto compact、compact replay barrier 和每轮 session memory 维护 | Done |
|
|
592
|
+
| M9.F1.16 | [`S0087`](spec/ship/S0087-gui-ui-polish-sweep.md) | Codex-inspired GUI visual pass:学习 Codex 的比例、层级和克制风格,并把 GUI tool blocks 收敛为低噪声执行证据流 | Done |
|
|
593
|
+
| M9.F1.17 | [`S0088`](spec/ship/S0088-gui-streaming-thinking-contract.md) | Streaming thinking contract:补 thinking/content delta,使 thinking 在 turn 运行中按序显示,而不是最终 assistant_message 后才插入 | Done |
|
|
594
|
+
| M9.F1.18 | [`S0089`](spec/ship/S0089-memory-reliability-and-dream-trigger.md) | Memory reliability:修复 AppendDaily 调用质量、dreaming 触发与可观测性,让 M9 后半段聚焦真实使用中的质量优化 | Done |
|
|
595
|
+
| M9.F1.19 | [`S0097`](spec/ship/S0097-rtk-token-saving-settings.md) | GUI Token 节省设置 + RTK Bash output proxy + runtime config | Done |
|
|
596
|
+
| M9.F1.20 | [`S0098`](spec/ship/S0098-local-daemon-singleton-unified-state.md) | 统一本机 Host state root、后台 singleton start、GUI/CLI auto-start + attach、idle shutdown、active IM 保活 | Done |
|
|
597
|
+
| M9.F1.21 | [`S0099`](spec/ship/S0099-gui-connection-device-settings.md) | GUI 连接设置默认官方 Relay、配对设备命名/详情、Settings scope 初版 | Done |
|
|
598
|
+
| M9.F1.22 | [`S0100`](spec/ship/S0100-gui-provider-danger-zone.md) | GUI Provider 删除按钮位置初版 | Done |
|
|
599
|
+
| M9.F1.23 | [`S0101`](spec/ship/S0101-gui-device-settings-polish.md) | GUI Settings 改为设备级配置,修正 Provider 删除位置、Token 文案、设备展开/重命名交互 | Done |
|
|
600
|
+
| M9.F1.24 | [`S0102`](spec/ship/S0102-device-only-config.md) | Config 彻底收敛为设备级唯一配置,移除 Project config 运行时语义 | Done |
|
|
592
601
|
|
|
593
602
|
**Not in M9 Follow-up**:
|
|
594
603
|
|
|
@@ -654,6 +663,12 @@ HTTP adapter 必须映射已有 Host use cases,不复制领域逻辑。
|
|
|
654
663
|
| M12.1 | [`S0083`](spec/ship/S0083-extension-manifest-and-im-channel-runtime.md) | Extension manifest、IM channel bridge、fixed session、default workspace、source reminder、SendChannelMessage、loopback IM | Done |
|
|
655
664
|
| M12.2 | [`S0084`](spec/ship/S0084-built-in-telegram-im-extension.md) | Built-in Telegram IM extension、Bot API long polling、DM/group mention、local HTTP stub coverage | Done |
|
|
656
665
|
| M12.3 | [`S0085`](spec/ship/S0085-gui-im-extension-settings.md) | GUI IM settings、Telegram toggle、extension config IPC、built-in package discovery | Done |
|
|
666
|
+
| M12.4 | [`S0090`](spec/ship/S0090-gui-provider-delete-and-dark-code-theme.md) | 修复 GUI Provider 删除能力和 dark code block Shiki theme 漂移 | Done |
|
|
667
|
+
| M12.5 | [`S0091`](spec/ship/S0091-built-in-qq-and-wechat-im-extensions.md) | Built-in QQ Bot / WeChat IM extensions and shared adapter boundary | Done |
|
|
668
|
+
| M12.6 | [`S0092`](spec/ship/S0092-im-message-media-and-human-cadence.md) | SendChannelMessage media payload and IM human-cadence guidance | Done |
|
|
669
|
+
| M12.7 | [`S0093`](spec/ship/S0093-gui-im-settings-platform-layout.md) | GUI IM Settings compact platform rows and expandable details | Done |
|
|
670
|
+
| M12.8 | [`S0094`](spec/ship/S0094-im-inbound-runtime.md) | QQ and WeChat built-in IM inbound runtime receive paths | Done |
|
|
671
|
+
| M12.9 | [`S0095`](spec/ship/S0095-gui-im-session-list-refresh.md) | Refresh GUI session lists for background IM-created sessions | Done |
|
|
657
672
|
|
|
658
673
|
---
|
|
659
674
|
|
|
@@ -742,6 +757,23 @@ HTTP adapter 必须映射已有 Host use cases,不复制领域逻辑。
|
|
|
742
757
|
| [`S0083`](spec/ship/S0083-extension-manifest-and-im-channel-runtime.md) | Extension manifest、IM channel bridge、fixed session、source reminder 与 SendChannelMessage | Done |
|
|
743
758
|
| [`S0084`](spec/ship/S0084-built-in-telegram-im-extension.md) | Built-in Telegram IM extension with Bot API long polling | Done |
|
|
744
759
|
| [`S0085`](spec/ship/S0085-gui-im-extension-settings.md) | GUI IM extension settings and Telegram toggle | Done |
|
|
760
|
+
| [`S0086`](spec/ship/S0086-auto-compact-and-session-memory.md) | Auto compact and session memory | Done |
|
|
761
|
+
| [`S0087`](spec/ship/S0087-gui-ui-polish-sweep.md) | Codex-inspired GUI visual pass and GUI tool trace polish | Done |
|
|
762
|
+
| [`S0088`](spec/ship/S0088-gui-streaming-thinking-contract.md) | GUI streaming thinking contract | Done |
|
|
763
|
+
| [`S0089`](spec/ship/S0089-memory-reliability-and-dream-trigger.md) | Memory reliability and dream trigger fix | Done |
|
|
764
|
+
| [`S0090`](spec/ship/S0090-gui-provider-delete-and-dark-code-theme.md) | GUI Provider delete and dark code theme fixes | Done |
|
|
765
|
+
| [`S0091`](spec/ship/S0091-built-in-qq-and-wechat-im-extensions.md) | Built-in QQ Bot and WeChat IM extensions | Done |
|
|
766
|
+
| [`S0092`](spec/ship/S0092-im-message-media-and-human-cadence.md) | IM media message payload and human response cadence | Done |
|
|
767
|
+
| [`S0093`](spec/ship/S0093-gui-im-settings-platform-layout.md) | GUI IM Settings platform layout | Done |
|
|
768
|
+
| [`S0094`](spec/ship/S0094-im-inbound-runtime.md) | IM inbound runtime receive paths | Done |
|
|
769
|
+
| [`S0095`](spec/ship/S0095-gui-im-session-list-refresh.md) | GUI IM session list refresh | Done |
|
|
770
|
+
| [`S0096`](spec/ship/S0096-glob-stable-order.md) | Glob stable cross-platform ordering | Done |
|
|
771
|
+
| [`S0097`](spec/ship/S0097-rtk-token-saving-settings.md) | RTK token saving settings and Bash output proxy | Done |
|
|
772
|
+
| [`S0098`](spec/ship/S0098-local-daemon-singleton-unified-state.md) | Local daemon singleton and unified state | Done |
|
|
773
|
+
| [`S0099`](spec/ship/S0099-gui-connection-device-settings.md) | GUI connection device settings | Done |
|
|
774
|
+
| [`S0100`](spec/ship/S0100-gui-provider-danger-zone.md) | GUI Provider danger-zone placement | Done |
|
|
775
|
+
| [`S0101`](spec/ship/S0101-gui-device-settings-polish.md) | GUI device-scoped Settings polish | Done |
|
|
776
|
+
| [`S0102`](spec/ship/S0102-device-only-config.md) | Device-only config | Done |
|
|
745
777
|
|
|
746
778
|
---
|
|
747
779
|
|
package/docs/SHIP.md
CHANGED
|
@@ -35,7 +35,7 @@ open https://scorel.chanler.dev
|
|
|
35
35
|
pnpm scorel pair <pair-code>
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
`scorel host serve`
|
|
38
|
+
`scorel host serve` 会以前台调试模式启动本机 Host、注册当前目录为初始 Project,并默认连接官方 Relay。`scorel host start` 会启动或复用后台 singleton Host,并返回到 shell;`scorel host stop` 显式关闭它。`scorel up` / `pnpm dev` 只作为本地开发便利入口:确保后台 Host 可用,然后启动本地 WebUI,但不拥有 Host 生命周期。后台 Host 无 client、无 active work、无 active IM 时会按 idle timeout 自动退出;active IM 会保持 Host 存活。
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
package/docs/spec/channels.md
CHANGED
|
@@ -13,7 +13,7 @@ Channel 是外部消息入口。S0083 后,IM Channel 通过 Extension manifest
|
|
|
13
13
|
IM Adapter -> Channel Bridge -> ScorelHost -> ScorelRuntime -> SendChannelMessage -> IM Adapter
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Channel 不拥有 Runtime、Session、queue、memory 或 replay。它只把外部 IM 消息转成现有 Host turn,并把模型通过 `SendChannelMessage`
|
|
16
|
+
Channel 不拥有 Runtime、Session、queue、memory 或 replay。它只把外部 IM 消息转成现有 Host turn,并把模型通过 `SendChannelMessage` 发出的文本或附件元数据送回当前 IM 会话。
|
|
17
17
|
|
|
18
18
|
CLI / GUI / WebUI 仍然直接通过 DaemonClient / Host application service 操作 Host,不经过 Channel。
|
|
19
19
|
|
|
@@ -118,12 +118,23 @@ Use SendChannelMessage to reply to the current conversation when needed.
|
|
|
118
118
|
当前已落地的回复工具:
|
|
119
119
|
|
|
120
120
|
```typescript
|
|
121
|
-
SendChannelMessage({
|
|
121
|
+
SendChannelMessage({
|
|
122
|
+
text?: string,
|
|
123
|
+
attachments?: Array<{
|
|
124
|
+
type: "image" | "file",
|
|
125
|
+
path?: string,
|
|
126
|
+
url?: string,
|
|
127
|
+
mimeType?: string,
|
|
128
|
+
caption?: string
|
|
129
|
+
}>
|
|
130
|
+
})
|
|
122
131
|
```
|
|
123
132
|
|
|
124
133
|
规则:
|
|
125
134
|
|
|
126
135
|
- 默认目标是当前 IM conversation;
|
|
136
|
+
- `text` 和 `attachments` 至少提供一个;
|
|
137
|
+
- adapter 可以对暂不支持的附件返回明确 tool error,不能静默忽略;
|
|
127
138
|
- 模型不填写 Telegram chat id、飞书 open id、Slack channel id 等 raw id;
|
|
128
139
|
- 无 channel context 时返回 `no_channel_context`;
|
|
129
140
|
- adapter send 失败时返回 tool error 并写 diagnostics。
|
|
@@ -137,9 +148,8 @@ SendChannelMessage({ text: string })
|
|
|
137
148
|
后续真实 provider:
|
|
138
149
|
|
|
139
150
|
- S0084: Telegram Bot API long polling;
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
- WeCom,而不是微信个人号优先。
|
|
151
|
+
- S0091: QQ Bot / WeChat official bot-style adapter;
|
|
152
|
+
- S0092: structured `SendChannelMessage` payload and IM response cadence。
|
|
143
153
|
|
|
144
154
|
---
|
|
145
155
|
|
package/docs/spec/extensions.md
CHANGED
|
@@ -152,11 +152,12 @@ class PromptBuilder {
|
|
|
152
152
|
|
|
153
153
|
**格式**:TOML
|
|
154
154
|
|
|
155
|
-
|
|
156
|
-
1.
|
|
157
|
-
2. `~/.scorel/config.toml`(用户级)
|
|
155
|
+
**读取路径**:
|
|
156
|
+
1. `~/.scorel/config.toml`(用户级 / 设备级唯一 config)
|
|
158
157
|
|
|
159
|
-
|
|
158
|
+
一个设备只有一份 config。Project 是 workspace/session 对象,不拥有 Provider、Model、Memory、Runtime 或 Extension 配置;运行时不会读取项目目录下的 `.scorel/config.toml`。
|
|
159
|
+
|
|
160
|
+
`~/.scorel` 是固定用户级根目录;`~/.scorel/config.toml` 是固定用户级配置文件;JSONL session 默认固定写入 `~/.scorel/sessions`。这些路径是产品约定,不作为可配置字段暴露。测试和内部嵌入场景可以通过代码注入临时 `scorelHomeDir` / session 目录,但这不是用户配置面。
|
|
160
161
|
|
|
161
162
|
环境变量不参与通用配置覆盖,只通过 `apiKeyEnv` 指向具体密钥。CLI 参数也不复制完整 config schema;只有明确属于交互控制的参数才进入 CLI。
|
|
162
163
|
|
|
@@ -244,7 +245,7 @@ auxiliary = "aux"
|
|
|
244
245
|
|
|
245
246
|
`available_models.*` 是 Scorel 的 available model / use pool。它们从 `provider_models.*` 里引用少量真正允许 Scorel 使用的模型;Runtime、GUI composer 和未来 subagent selection 只能选择 pool 内模型,不能直接选择 provider catalog 或 provider model 里的任意条目。
|
|
246
247
|
|
|
247
|
-
GUI 的 provider/model 写入必须 merge
|
|
248
|
+
GUI 的 provider/model 写入必须 merge 到现有设备级 `config.toml`:同一 provider 下追加第二个 provider model,或把 provider model 加入 available models 时,不能删除已存在 provider、provider model、available model 或 role assignment,除非用户明确覆盖对应字段。
|
|
248
249
|
|
|
249
250
|
Scorel 仍处在开发阶段,没有存量配置兼容要求。旧 `[models.*]` section 不再支持;遇到旧 section 必须按未知 section 报错。
|
|
250
251
|
|
|
@@ -38,7 +38,7 @@ The verifier starts:
|
|
|
38
38
|
- a real local Relay process with durable file store
|
|
39
39
|
- a real local Host daemon process connected outbound to Relay
|
|
40
40
|
- a real WebUI Next dev server
|
|
41
|
-
- a temporary real Project
|
|
41
|
+
- a temporary real Project using the device-level `~/.scorel/config.toml`
|
|
42
42
|
- a Relay Entry using `RelayTransport` and `DaemonClient`
|
|
43
43
|
|
|
44
44
|
The verifier then:
|
|
@@ -103,12 +103,12 @@ The response must be display-safe:
|
|
|
103
103
|
- if the target Project has no model profile config yet, `list_models` returns an empty
|
|
104
104
|
model list instead of surfacing config-not-found as a user-facing error.
|
|
105
105
|
|
|
106
|
-
Expose a Host API for adding/updating
|
|
107
|
-
this Host-owned path for both local and Relay
|
|
108
|
-
|
|
106
|
+
Expose a Host API for adding/updating the device provider/model profile. GUI must use
|
|
107
|
+
this Host-owned path for both local and Relay devices; renderer code must not write
|
|
108
|
+
`~/.scorel/config.toml` directly.
|
|
109
109
|
|
|
110
110
|
Saving a provider/model profile is a config edit, not a provider call. It must validate
|
|
111
|
-
shape and merge into the existing
|
|
111
|
+
shape and merge into the existing device config, but it must not require the target
|
|
112
112
|
Host process to already have the provider API key env var set. Missing credentials
|
|
113
113
|
should block runtime use, not saving.
|
|
114
114
|
|
|
@@ -186,8 +186,8 @@ This spec does not implement a new subagent execution engine.
|
|
|
186
186
|
- using the selected model's context window.
|
|
187
187
|
- Daemon/client tests cover:
|
|
188
188
|
- model profile summary is exposed without API keys;
|
|
189
|
-
- a
|
|
190
|
-
- adding/updating a provider/model profile writes a valid
|
|
189
|
+
- a device with no model config returns an empty model profile summary;
|
|
190
|
+
- adding/updating a provider/model profile writes a valid `~/.scorel/config.toml`
|
|
191
191
|
without requiring API key env vars;
|
|
192
192
|
- adding a second model under the same provider preserves the existing provider and
|
|
193
193
|
model entries;
|
|
@@ -56,7 +56,7 @@ page hierarchy.
|
|
|
56
56
|
### 4. Existing Host contract
|
|
57
57
|
|
|
58
58
|
Continue using the Host-owned `list_models` and `upsert_model_profile` path. Renderer
|
|
59
|
-
code must not write
|
|
59
|
+
code must not write `~/.scorel/config.toml` directly.
|
|
60
60
|
|
|
61
61
|
This spec can reuse the S0073 data model and does not need a new protocol message unless
|
|
62
62
|
the UI needs one for clean implementation.
|
|
@@ -37,7 +37,7 @@ selecting a draft provider.
|
|
|
37
37
|
Provider config supports either:
|
|
38
38
|
|
|
39
39
|
- `apiKeyEnv`, resolved from environment variables; or
|
|
40
|
-
- `apiKey`, stored directly in
|
|
40
|
+
- `apiKey`, stored directly in the device `~/.scorel/config.toml`.
|
|
41
41
|
|
|
42
42
|
GUI never receives direct API key values when listing providers. Editing an existing
|
|
43
43
|
direct-key provider shows only that a direct key is configured. Saving a provider with
|
|
@@ -69,7 +69,7 @@ GUI Settings Memory section exposes:
|
|
|
69
69
|
- session memory toggle;
|
|
70
70
|
- auto compact threshold select.
|
|
71
71
|
|
|
72
|
-
These controls use the
|
|
72
|
+
These controls use the device-scoped memory config path; memory status and persisted memory artifacts remain project-aware activity data.
|
|
73
73
|
|
|
74
74
|
## Not In Scope
|
|
75
75
|
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# S0087: Codex-Inspired GUI Visual Pass
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Move the Scorel desktop GUI closer to a mature Codex-style workbench without copying Codex screen-for-screen.
|
|
6
|
+
|
|
7
|
+
The business value is product trust. Scorel should stop feeling like an engineering demo and start feeling like a quiet, high-density desktop tool for project-scoped agent work.
|
|
8
|
+
|
|
9
|
+
This spec is a visual-system pass over existing GUI surfaces. It does not introduce new product capabilities.
|
|
10
|
+
|
|
11
|
+
## Design Direction
|
|
12
|
+
|
|
13
|
+
Learn from Codex at the level of visual principles:
|
|
14
|
+
|
|
15
|
+
- restrained source-list sidebar;
|
|
16
|
+
- white main workspace with low visual noise;
|
|
17
|
+
- natural heading text instead of badge-heavy emphasis;
|
|
18
|
+
- composer as a command surface with a clear input/control row;
|
|
19
|
+
- metadata controls visually attached to the composer;
|
|
20
|
+
- quiet active states, subtle borders, and shallow elevation;
|
|
21
|
+
- compact but readable typography.
|
|
22
|
+
|
|
23
|
+
Do not copy Codex literally. Scorel remains Project-first and should only show real controls backed by existing product paths.
|
|
24
|
+
|
|
25
|
+
## Scope
|
|
26
|
+
|
|
27
|
+
### Visual Pass Targets
|
|
28
|
+
|
|
29
|
+
- Sidebar source list:
|
|
30
|
+
- reduce heavy active row treatment;
|
|
31
|
+
- tighten project/session row rhythm;
|
|
32
|
+
- make empty session rows quieter;
|
|
33
|
+
- load session lists for the selected Project and expanded Projects so startup stays responsive without stale empty states;
|
|
34
|
+
- keep Add Project as the real project-management entry.
|
|
35
|
+
|
|
36
|
+
- Empty workspace:
|
|
37
|
+
- hide the empty topbar when it has no useful content;
|
|
38
|
+
- render the project name as natural heading text, not a large grey badge;
|
|
39
|
+
- keep the hero centered but calmer and less heavy.
|
|
40
|
+
|
|
41
|
+
- Composer:
|
|
42
|
+
- reduce shadow and heavy pill feel;
|
|
43
|
+
- add whole-surface focus feedback;
|
|
44
|
+
- make model selection and send action read as a compact control row;
|
|
45
|
+
- keep fake controls such as attachment, voice, and permission mode hidden.
|
|
46
|
+
|
|
47
|
+
- Project metadata:
|
|
48
|
+
- keep project picker as a real control;
|
|
49
|
+
- visually attach the project picker to the composer area;
|
|
50
|
+
- keep the popover anchored and searchable.
|
|
51
|
+
|
|
52
|
+
- Active session:
|
|
53
|
+
- keep a stable topbar title fallback (`未命名对话`) until auxiliary title generation updates it.
|
|
54
|
+
- keep expanded thinking content within the message column, with long prose wrapping and code blocks scrolling internally.
|
|
55
|
+
- render code-block language and copy controls inside the code-block header.
|
|
56
|
+
- keep markdown code blocks aligned with the GUI light surface and token system; do not use a fixed dark code-block theme in the light workspace.
|
|
57
|
+
- render tool calls as compact execution evidence rows: clear tool name, target object, status, counters, and expandable details.
|
|
58
|
+
- keep successful tool output collapsed by default, while making errors, diffs, and pending/running state visible.
|
|
59
|
+
|
|
60
|
+
### Tool Display Contract
|
|
61
|
+
|
|
62
|
+
- `Read`: collapsed header shows file basename and line range; expanded details show the returned read text and full path/range evidence.
|
|
63
|
+
- `Glob` / `Grep`: collapsed header shows pattern/result count; expanded details show the returned file or match list plus pagination/mode metadata when present.
|
|
64
|
+
- `Bash`: collapsed header shows command and exit status when known; expanded details show stdout/stderr/cwd evidence returned by the tool.
|
|
65
|
+
- `Edit` / `Write`: collapsed header shows operation, file basename, and `+/-` counters; diff details are visible by default and remain collapsible.
|
|
66
|
+
- `TodoWrite`: collapsed header shows active progress; expanded details show the current todo list and item states.
|
|
67
|
+
- Fallback tools: collapsed header shows tool name; expanded details show args/result JSON.
|
|
68
|
+
|
|
69
|
+
## Not In Scope
|
|
70
|
+
|
|
71
|
+
- New GUI product capability such as SSH remote device, HTTP API, account/auth, review banner, or changed-files diff surface.
|
|
72
|
+
- Runtime, provider/model, memory, channel, extension, or daemon contract changes.
|
|
73
|
+
- Reintroducing disabled placeholder commands.
|
|
74
|
+
- Empty-state plugin recommendation cards.
|
|
75
|
+
- Global conversation history grouping.
|
|
76
|
+
- Voice, attachment, permission-mode, or null-project mode.
|
|
77
|
+
- WebUI component reuse or shared UI package extraction.
|
|
78
|
+
- Streaming thinking/runtime protocol changes. Thinking currently arrives with final persistent assistant messages; streaming thinking requires a follow-up protocol/runtime spec.
|
|
79
|
+
|
|
80
|
+
## Acceptance Criteria
|
|
81
|
+
|
|
82
|
+
- Empty workspace has no blank topbar.
|
|
83
|
+
- Empty heading uses natural text, with no badge-like project-name background.
|
|
84
|
+
- Composer has low-shadow elevation, stable focus feedback, and no unimplemented controls.
|
|
85
|
+
- Project picker remains visible and attached to the composer cluster.
|
|
86
|
+
- Sidebar active and empty states are quiet and source-list-like.
|
|
87
|
+
- Startup loads session summaries for the selected Project and expanded Projects, not every Project.
|
|
88
|
+
- Expanded thinking content cannot horizontally stretch the workspace.
|
|
89
|
+
- Long prose wraps inside thinking/markdown content, while code blocks keep formatting and scroll internally.
|
|
90
|
+
- Code blocks show the fenced language as non-interactive metadata on the top-left and a copy control on the top-right.
|
|
91
|
+
- Code block theme and chrome match the GUI light mode instead of rendering as a visually detached dark block.
|
|
92
|
+
- GUI tool blocks read as a low-noise execution trace, not generic JSON dumps.
|
|
93
|
+
- Bash, Read, Glob/Grep, Edit/Write, TodoWrite, and fallback JSON tools share consistent header/body/error/pending styling.
|
|
94
|
+
- File edits surface filename and diff counters in the header; expanded details keep diff/output internally scrollable.
|
|
95
|
+
- Clicking a tool header reveals the right evidence for that tool type, not just raw arguments.
|
|
96
|
+
- Active sessions show `未命名对话` when no generated title exists.
|
|
97
|
+
- Existing GUI behavior remains Project-first.
|
|
98
|
+
- Text remains readable and non-overlapping across narrow and normal desktop widths.
|
|
99
|
+
- Sidebar collapse/resize behavior still works.
|
|
100
|
+
- GUI shell render tests cover the changed contracts.
|
|
101
|
+
- Full `pnpm typecheck && pnpm test` passes.
|
|
102
|
+
|
|
103
|
+
## Testing Requirements
|
|
104
|
+
|
|
105
|
+
- Focused GUI tests:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
pnpm --filter @scorel/app-gui test
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
- GUI build:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
pnpm --filter @scorel/app-gui build
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
- Full check:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
pnpm typecheck && pnpm test
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
- Whitespace check:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
git diff --check
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
- Run Electron GUI and visually inspect the empty workspace.
|
|
130
|
+
|
|
131
|
+
## Impacted Files
|
|
132
|
+
|
|
133
|
+
- `apps/gui/src/renderer/workspace/Workspace.tsx`
|
|
134
|
+
- `apps/gui/src/renderer/App.tsx`
|
|
135
|
+
- `apps/gui/src/renderer/shell/Sidebar.tsx`
|
|
136
|
+
- `apps/gui/src/renderer/shell/ProjectTree.tsx`
|
|
137
|
+
- `apps/gui/src/renderer/workspace/EmptyState.tsx`
|
|
138
|
+
- `apps/gui/src/renderer/composer/Composer.tsx`
|
|
139
|
+
- `apps/gui/src/renderer/chatbox/ShikiCodeBlock.tsx`
|
|
140
|
+
- `apps/gui/src/renderer/chatbox/ShikiCodeBlock.test.tsx`
|
|
141
|
+
- `apps/gui/src/renderer/chatbox/tool-blocks/*`
|
|
142
|
+
- `apps/gui/src/renderer/styles.css`
|
|
143
|
+
- `apps/gui/src/renderer/gui-shell.test.tsx`
|
|
144
|
+
- `apps/gui/src/renderer/app-session-preload.test.tsx`
|
|
145
|
+
- `apps/gui/src/sidebar-layout.test.ts`
|
|
146
|
+
- `docs/ROADMAP.md`
|
|
147
|
+
- `docs/spec/ship/S0087-gui-ui-polish-sweep.md`
|
|
148
|
+
|
|
149
|
+
## Risks And Boundaries
|
|
150
|
+
|
|
151
|
+
- Visual polish can sprawl. Keep this pass focused on existing workbench surfaces.
|
|
152
|
+
- A better-looking fake feature is still bad product design. Hide unimplemented controls instead of styling them.
|
|
153
|
+
- Render tests prove structure but not taste. Use manual GUI inspection before handoff.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# S0088: GUI Streaming Thinking Contract
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Make thinking visible while a turn is running instead of inserting the thinking block only after the final persistent `assistant_message` arrives.
|
|
6
|
+
|
|
7
|
+
The business value is process trust. Users should see the agent's work unfold in order, not as a post-hoc replay after the visible answer has already completed.
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
Today Scorel streams only `text_delta`. Thinking content exists in the final persistent assistant message, so GUI can only render it after the turn is finalized. A GUI-only placeholder would be misleading because it would imply thinking is streaming when the runtime has not emitted it.
|
|
12
|
+
|
|
13
|
+
## Scope
|
|
14
|
+
|
|
15
|
+
- Add a protocol/runtime event for streaming thinking, likely `thinking_delta` or a more general ordered `content_delta`.
|
|
16
|
+
- Preserve ordered assistant content blocks so thinking, text, and tool calls reconcile cleanly with the final persistent assistant message.
|
|
17
|
+
- Update GUI projector to create and update thinking parts incrementally.
|
|
18
|
+
- Keep final `assistant_message` as authoritative reconciliation, not a second visual insertion.
|
|
19
|
+
|
|
20
|
+
## Not In Scope
|
|
21
|
+
|
|
22
|
+
- Tool block visual polish; covered by `S0087`.
|
|
23
|
+
- Fake GUI placeholders for thinking content.
|
|
24
|
+
- Changing provider reasoning semantics beyond the event stream needed to display already-produced thinking.
|
|
25
|
+
|
|
26
|
+
## Acceptance Criteria
|
|
27
|
+
|
|
28
|
+
- Thinking appears during the active turn when the provider/runtime emits thinking content.
|
|
29
|
+
- Final assistant reconciliation does not duplicate or reorder thinking/text/tool parts.
|
|
30
|
+
- Existing text streaming remains smooth.
|
|
31
|
+
- Protocol, daemon/client, GUI projector, and tests all agree on the new event contract.
|
|
32
|
+
|
|
33
|
+
## Status
|
|
34
|
+
|
|
35
|
+
Done.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# S0089: Memory Reliability And Dream Trigger
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Make Scorel memory actually useful in normal GUI/agent use by tightening the `AppendDaily -> idle dream -> memory injection` loop.
|
|
6
|
+
|
|
7
|
+
The business value is continuity. If users finish meaningful work and later return to the project, Scorel should remember durable progress, decisions, and follow-ups without relying on fragile manual reminders.
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
S0081/S0082 established the memory architecture:
|
|
12
|
+
|
|
13
|
+
- daily evidence is written through the agent-owned `AppendDaily` tool;
|
|
14
|
+
- successful append marks the project dirty;
|
|
15
|
+
- daemon schedules dreaming after project idle time;
|
|
16
|
+
- memory content re-enters future turns through the hidden memory harness.
|
|
17
|
+
|
|
18
|
+
In practice this is not reliable enough yet:
|
|
19
|
+
|
|
20
|
+
- `AppendDaily` depends too much on the model remembering a prompt instruction near the end of work;
|
|
21
|
+
- daily entries can be low quality when the model records vague summaries instead of durable evidence;
|
|
22
|
+
- dream triggering is hard to observe and easy to miss;
|
|
23
|
+
- idle-only scheduling means memory may not update before the app/host exits;
|
|
24
|
+
- GUI has no clear signal that daily/dream/memory actually happened.
|
|
25
|
+
|
|
26
|
+
## Scope
|
|
27
|
+
|
|
28
|
+
### AppendDaily Quality
|
|
29
|
+
|
|
30
|
+
- Make the tool contract harder to ignore in completed meaningful turns.
|
|
31
|
+
- Improve the journal schema/prompt so entries prefer concrete completed work, decisions, evidence paths, and follow-ups over generic summaries.
|
|
32
|
+
- Add validation or lightweight scoring for empty, duplicate, or low-signal entries.
|
|
33
|
+
- Keep `AppendDaily` project-scoped and append-only.
|
|
34
|
+
|
|
35
|
+
### Dream Trigger Reliability
|
|
36
|
+
|
|
37
|
+
- Audit the current daemon dirty-project and idle-timer path.
|
|
38
|
+
- Ensure a successful `AppendDaily` reliably schedules a dream attempt.
|
|
39
|
+
- Add a recovery path for pending daily evidence when the process restarts before idle dream fires.
|
|
40
|
+
- Consider a manual or debug trigger if it materially improves verification and support.
|
|
41
|
+
|
|
42
|
+
### Observability
|
|
43
|
+
|
|
44
|
+
- Expose enough local state to answer:
|
|
45
|
+
- when was the last daily append;
|
|
46
|
+
- whether the project is dirty;
|
|
47
|
+
- whether dream is scheduled/running/failed;
|
|
48
|
+
- when project memory was last updated.
|
|
49
|
+
- Surface this in GUI Settings or a compact project memory status area.
|
|
50
|
+
- Keep failures non-blocking for chat turns, but visible enough to debug.
|
|
51
|
+
|
|
52
|
+
### Injection Verification
|
|
53
|
+
|
|
54
|
+
- Verify that updated project memory is actually injected into subsequent model context.
|
|
55
|
+
- Add tests or a local verification path proving `AppendDaily` evidence can become project memory and then influence a later turn.
|
|
56
|
+
|
|
57
|
+
## Not In Scope
|
|
58
|
+
|
|
59
|
+
- Full activity recorder.
|
|
60
|
+
- Vector search or semantic memory.
|
|
61
|
+
- Topic memory file fan-out.
|
|
62
|
+
- Root/global memory promotion beyond the existing guarded behavior.
|
|
63
|
+
- Replacing the memory harness with provider system prompt content.
|
|
64
|
+
|
|
65
|
+
## Acceptance Criteria
|
|
66
|
+
|
|
67
|
+
- Meaningful completed work has a reliable path to daily evidence without depending only on user reminders.
|
|
68
|
+
- Successful `AppendDaily` schedules or queues dream work even across host restarts.
|
|
69
|
+
- Dream status is inspectable from local state and surfaced in GUI.
|
|
70
|
+
- Low-quality or duplicate daily entries are reduced by contract, validation, or tests.
|
|
71
|
+
- A verified path proves daily evidence can update project memory and be injected into a later turn.
|
|
72
|
+
- Existing memory settings remain backward compatible.
|
|
73
|
+
|
|
74
|
+
## Testing Requirements
|
|
75
|
+
|
|
76
|
+
- Core tests for `AppendDaily` schema/quality validation.
|
|
77
|
+
- Daemon tests for dirty-project scheduling, idle dream, restart recovery, and failure visibility.
|
|
78
|
+
- GUI tests for memory status rendering if a GUI surface is added.
|
|
79
|
+
- Integration-style test or scripted verification for `AppendDaily -> dream -> memory injection`.
|
|
80
|
+
- Full `pnpm typecheck && pnpm test`.
|
|
81
|
+
|
|
82
|
+
## Status
|
|
83
|
+
|
|
84
|
+
Done.
|