@chanlerdev/scorel 0.0.2 → 0.0.3
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 +395 -31
- package/dist/index.js.map +3 -3
- package/docs/CHANGELOG.md +53 -0
- package/docs/ROADMAP.md +19 -0
- package/docs/spec/channels.md +15 -5
- 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/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 +1 -1
package/docs/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,59 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.0.3 - 2026-06-12
|
|
6
|
+
|
|
7
|
+
### Highlights
|
|
8
|
+
|
|
9
|
+
- QQ Bot and WeChat inbound support: receive and route messages via official WebSocket or HTTP callback
|
|
10
|
+
- GUI now auto-refreshes session lists when IM sessions are created in the background
|
|
11
|
+
- Streaming thinking delta events in GUI for real-time thought display
|
|
12
|
+
- Memory status display and reliability improvements (dream trigger, duplicate detection)
|
|
13
|
+
|
|
14
|
+
### Changes
|
|
15
|
+
|
|
16
|
+
- GUI automatically refreshes session lists when IM sessions are created in the background
|
|
17
|
+
- Implement IM inbound runtime for QQ and WeChat (WebSocket gateway, HTTP callback server)
|
|
18
|
+
- Compact IM settings layout with collapsible rows for Telegram, QQ, and WeChat
|
|
19
|
+
- SendChannelMessage now supports optional attachments (image/file) with metadata
|
|
20
|
+
- Human-cadence guidance injected into IM replies (acknowledgement, progress updates)
|
|
21
|
+
- Add built-in QQ Bot and WeChat IM extension support (sending and receiving)
|
|
22
|
+
- Add thinking_delta event for streaming real-time thought content in GUI
|
|
23
|
+
- Add memory status query and GUI display for memory status
|
|
24
|
+
- Improve daily append quality with validation for low-signal summaries and duplicate detection
|
|
25
|
+
- Persist memory dream state (dirty/running/scheduled/failure) with restart recovery
|
|
26
|
+
- Refine GUI visual style: Codex-inspired polish for sidebar, empty workspace, composer, code blocks, and tool execution traces
|
|
27
|
+
- Add 'delete provider' button in GUI Settings with full deletion chain
|
|
28
|
+
- Fix IME composition handling in composer (Enter does not submit during IME input)
|
|
29
|
+
- Fix Shiki code block theme from dark to light to match GUI surface
|
|
30
|
+
|
|
31
|
+
### Fixes
|
|
32
|
+
|
|
33
|
+
- GUI provider deletion now removes provider, models, and dependent role assignments
|
|
34
|
+
- Dark code block theme fixed to light mode for better readability in dark GUI
|
|
35
|
+
- IME composition handling in composer fixed (Enter does not submit during IME input)
|
|
36
|
+
|
|
37
|
+
### Breaking Changes
|
|
38
|
+
|
|
39
|
+
- 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.
|
|
40
|
+
|
|
41
|
+
### Verification
|
|
42
|
+
|
|
43
|
+
- Unit and integration tests for QQ gateway identify/heartbeat/dispatch/stop
|
|
44
|
+
- Unit and integration tests for WeChat callback verification and text message routing
|
|
45
|
+
- Tests for session change notification and renderer refresh behavior
|
|
46
|
+
- Tests for attachment validation and human-cadence guidance in channel harness
|
|
47
|
+
- Tests for QQ/WeChat adapter normalization and secret redaction
|
|
48
|
+
- Tests for streaming thinking deltas and final message reconciliation
|
|
49
|
+
- Tests for low-signal daily summary rejection and duplicate entry skipping
|
|
50
|
+
- Tests for memory dream state persistence and status retrieval
|
|
51
|
+
- GUI tests for IM settings layout, provider deletion, code block theme, and memory status display
|
|
52
|
+
|
|
53
|
+
### Internal
|
|
54
|
+
|
|
55
|
+
- Update README to clarify IM behavior details for QQ Bot and WeChat integrations
|
|
56
|
+
- Add planned spec S0089 for memory reliability and dream trigger improvements
|
|
57
|
+
|
|
5
58
|
## 0.0.2 - 2026-06-11
|
|
6
59
|
|
|
7
60
|
### Highlights
|
package/docs/ROADMAP.md
CHANGED
|
@@ -589,6 +589,9 @@ 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 |
|
|
592
595
|
|
|
593
596
|
**Not in M9 Follow-up**:
|
|
594
597
|
|
|
@@ -654,6 +657,12 @@ HTTP adapter 必须映射已有 Host use cases,不复制领域逻辑。
|
|
|
654
657
|
| 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
658
|
| 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
659
|
| M12.3 | [`S0085`](spec/ship/S0085-gui-im-extension-settings.md) | GUI IM settings、Telegram toggle、extension config IPC、built-in package discovery | Done |
|
|
660
|
+
| M12.4 | [`S0090`](spec/ship/S0090-gui-provider-delete-and-dark-code-theme.md) | 修复 GUI Provider 删除能力和 dark code block Shiki theme 漂移 | Done |
|
|
661
|
+
| 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 |
|
|
662
|
+
| M12.6 | [`S0092`](spec/ship/S0092-im-message-media-and-human-cadence.md) | SendChannelMessage media payload and IM human-cadence guidance | Done |
|
|
663
|
+
| M12.7 | [`S0093`](spec/ship/S0093-gui-im-settings-platform-layout.md) | GUI IM Settings compact platform rows and expandable details | Done |
|
|
664
|
+
| M12.8 | [`S0094`](spec/ship/S0094-im-inbound-runtime.md) | QQ and WeChat built-in IM inbound runtime receive paths | Done |
|
|
665
|
+
| M12.9 | [`S0095`](spec/ship/S0095-gui-im-session-list-refresh.md) | Refresh GUI session lists for background IM-created sessions | Done |
|
|
657
666
|
|
|
658
667
|
---
|
|
659
668
|
|
|
@@ -742,6 +751,16 @@ HTTP adapter 必须映射已有 Host use cases,不复制领域逻辑。
|
|
|
742
751
|
| [`S0083`](spec/ship/S0083-extension-manifest-and-im-channel-runtime.md) | Extension manifest、IM channel bridge、fixed session、source reminder 与 SendChannelMessage | Done |
|
|
743
752
|
| [`S0084`](spec/ship/S0084-built-in-telegram-im-extension.md) | Built-in Telegram IM extension with Bot API long polling | Done |
|
|
744
753
|
| [`S0085`](spec/ship/S0085-gui-im-extension-settings.md) | GUI IM extension settings and Telegram toggle | Done |
|
|
754
|
+
| [`S0086`](spec/ship/S0086-auto-compact-and-session-memory.md) | Auto compact and session memory | Done |
|
|
755
|
+
| [`S0087`](spec/ship/S0087-gui-ui-polish-sweep.md) | Codex-inspired GUI visual pass and GUI tool trace polish | Done |
|
|
756
|
+
| [`S0088`](spec/ship/S0088-gui-streaming-thinking-contract.md) | GUI streaming thinking contract | Done |
|
|
757
|
+
| [`S0089`](spec/ship/S0089-memory-reliability-and-dream-trigger.md) | Memory reliability and dream trigger fix | Done |
|
|
758
|
+
| [`S0090`](spec/ship/S0090-gui-provider-delete-and-dark-code-theme.md) | GUI Provider delete and dark code theme fixes | Done |
|
|
759
|
+
| [`S0091`](spec/ship/S0091-built-in-qq-and-wechat-im-extensions.md) | Built-in QQ Bot and WeChat IM extensions | Done |
|
|
760
|
+
| [`S0092`](spec/ship/S0092-im-message-media-and-human-cadence.md) | IM media message payload and human response cadence | Done |
|
|
761
|
+
| [`S0093`](spec/ship/S0093-gui-im-settings-platform-layout.md) | GUI IM Settings platform layout | Done |
|
|
762
|
+
| [`S0094`](spec/ship/S0094-im-inbound-runtime.md) | IM inbound runtime receive paths | Done |
|
|
763
|
+
| [`S0095`](spec/ship/S0095-gui-im-session-list-refresh.md) | GUI IM session list refresh | Done |
|
|
745
764
|
|
|
746
765
|
---
|
|
747
766
|
|
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
|
|
|
@@ -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.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# S0090: GUI Provider Delete And Dark Code Theme
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Fix two GUI regressions before the next IM expansion:
|
|
6
|
+
|
|
7
|
+
- dark theme code blocks must use a dark Shiki theme instead of light-token colors;
|
|
8
|
+
- Provider settings must expose a real delete path for configured providers.
|
|
9
|
+
|
|
10
|
+
The business value is basic settings trust. Users should be able to remove bad provider config and read code blocks in the selected GUI theme.
|
|
11
|
+
|
|
12
|
+
## Scope
|
|
13
|
+
|
|
14
|
+
### Dark Code Blocks
|
|
15
|
+
|
|
16
|
+
- Load both light and dark Shiki themes in the GUI code block highlighter.
|
|
17
|
+
- Select the rendered theme from `:root[data-theme]` / system dark preference.
|
|
18
|
+
- Re-render when the GUI theme changes.
|
|
19
|
+
- Keep code block chrome styled by Scorel tokens; only syntax token colors switch.
|
|
20
|
+
|
|
21
|
+
### Provider Delete
|
|
22
|
+
|
|
23
|
+
- Add a protocol/client/daemon request for removing one provider from a project model profile.
|
|
24
|
+
- Deleting a provider removes:
|
|
25
|
+
- `[providers.<id>]`;
|
|
26
|
+
- provider models owned by that provider;
|
|
27
|
+
- available models pointing at removed provider models;
|
|
28
|
+
- role selections that pointed at removed available models, with stable fallback when possible.
|
|
29
|
+
- GUI Provider Settings exposes a delete button for the selected provider.
|
|
30
|
+
- If no provider remains, the Provider page returns to the empty state without stale selected-provider UI.
|
|
31
|
+
|
|
32
|
+
## Not In Scope
|
|
33
|
+
|
|
34
|
+
- Deleting individual provider model definitions unless required by provider deletion.
|
|
35
|
+
- Bulk reset of all model profile config.
|
|
36
|
+
- Provider secret migration.
|
|
37
|
+
- Changing provider catalog fetch behavior.
|
|
38
|
+
- IM platform work; covered by S0091-S0093.
|
|
39
|
+
|
|
40
|
+
## Acceptance Criteria
|
|
41
|
+
|
|
42
|
+
- Dark GUI theme renders Shiki tokens with a dark theme.
|
|
43
|
+
- Light GUI theme keeps the current light code block behavior.
|
|
44
|
+
- Switching GUI theme updates future code block renders without app restart.
|
|
45
|
+
- Provider delete removes the provider and all dependent model profile entries from persisted config.
|
|
46
|
+
- Provider delete does not leave roles pointing at removed models.
|
|
47
|
+
- GUI can delete the selected provider and updates the selected provider to the next available provider or empty state.
|
|
48
|
+
- Remote GUI provider deletion uses the same daemon/client request as local GUI.
|
|
49
|
+
|
|
50
|
+
## Testing Requirements
|
|
51
|
+
|
|
52
|
+
- GUI Shiki tests prove both light and dark themes are loaded/selected.
|
|
53
|
+
- Config renderer tests cover provider deletion and role fallback.
|
|
54
|
+
- Protocol/client/daemon tests cover the delete request.
|
|
55
|
+
- GUI render test covers delete button and empty-state transition.
|
|
56
|
+
- Full `pnpm typecheck && pnpm test`.
|
|
57
|
+
|
|
58
|
+
## Impacted Files
|
|
59
|
+
|
|
60
|
+
- `apps/gui/src/renderer/chatbox/ShikiCodeBlock.tsx`
|
|
61
|
+
- `apps/gui/src/renderer/chatbox/ShikiCodeBlock.test.tsx`
|
|
62
|
+
- `apps/gui/src/shiki-theme.test.ts`
|
|
63
|
+
- `apps/gui/src/renderer/settings/sections/ProviderSection.tsx`
|
|
64
|
+
- `apps/gui/src/shared/ipc.ts`
|
|
65
|
+
- `apps/gui/src/main.ts`
|
|
66
|
+
- `apps/gui/src/main/local-host.ts`
|
|
67
|
+
- `apps/gui/src/main/relay-service.ts`
|
|
68
|
+
- `packages/protocol/src/events.ts`
|
|
69
|
+
- `packages/protocol/src/wire.ts`
|
|
70
|
+
- `packages/client/src/index.ts`
|
|
71
|
+
- `packages/core/src/config/index.ts`
|
|
72
|
+
- `packages/core/src/config/*.test.ts`
|
|
73
|
+
- `packages/daemon/src/index.ts`
|
|
74
|
+
|
|
75
|
+
## Status
|
|
76
|
+
|
|
77
|
+
Done.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# S0091: Built-In QQ And WeChat IM Extensions
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Add QQ Bot and WeChat as built-in IM extensions on the existing extension-backed channel bridge.
|
|
6
|
+
|
|
7
|
+
The business value is channel reach. Telegram proved the bridge; QQ and WeChat force the adapter contract to stay generic enough for multiple IM platforms without forking Scorel runtime behavior.
|
|
8
|
+
|
|
9
|
+
## Product Boundary
|
|
10
|
+
|
|
11
|
+
Scorel must use official or documented bot/server APIs. This spec does not support personal-account reverse engineering, browser automation of consumer clients, unofficial Web WeChat scraping, or any path likely to get user accounts restricted.
|
|
12
|
+
|
|
13
|
+
## Scope
|
|
14
|
+
|
|
15
|
+
### Shared IM Adapter Utilities
|
|
16
|
+
|
|
17
|
+
- Extract reusable helpers for HTTP polling/webhook-shaped adapters where the current Telegram code has platform-neutral logic.
|
|
18
|
+
- Keep platform-specific authentication, payload parsing, mention rules, and send APIs inside each built-in extension.
|
|
19
|
+
- Preserve the S0083 adapter boundary: adapters do platform IO only and never create sessions or write JSONL.
|
|
20
|
+
|
|
21
|
+
### QQ Bot Extension
|
|
22
|
+
|
|
23
|
+
Add:
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
extensions/builtin/qq/
|
|
27
|
+
scorel.extension.json
|
|
28
|
+
adapter.js
|
|
29
|
+
adapter.d.ts
|
|
30
|
+
skills/qq/SKILL.md
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Expected config shape:
|
|
34
|
+
|
|
35
|
+
```toml
|
|
36
|
+
[extensions.qq]
|
|
37
|
+
enabled = true
|
|
38
|
+
kind = "im"
|
|
39
|
+
|
|
40
|
+
[extensions.qq.config]
|
|
41
|
+
appId = "..."
|
|
42
|
+
appSecret = "..."
|
|
43
|
+
botId = "..."
|
|
44
|
+
allowedConversationIds = "..."
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
QQ Bot uses the current official server-side credential flow: Scorel stores the developer-console `App ID` and `App Secret`, calls `https://bots.qq.com/app/getAppAccessToken`, caches the returned access token until shortly before expiry, and sends API requests with `Authorization: QQBot ACCESS_TOKEN`.
|
|
48
|
+
|
|
49
|
+
`apiBaseUrl` and `accessTokenUrl` may remain internal override hooks for tests and sandbox work, but GUI Settings must not expose them as the default setup path.
|
|
50
|
+
|
|
51
|
+
### WeChat Extension
|
|
52
|
+
|
|
53
|
+
Add:
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
extensions/builtin/wechat/
|
|
57
|
+
scorel.extension.json
|
|
58
|
+
adapter.js
|
|
59
|
+
adapter.d.ts
|
|
60
|
+
skills/wechat/SKILL.md
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Expected config shape:
|
|
64
|
+
|
|
65
|
+
```toml
|
|
66
|
+
[extensions.wechat]
|
|
67
|
+
enabled = true
|
|
68
|
+
kind = "im"
|
|
69
|
+
|
|
70
|
+
[extensions.wechat.config]
|
|
71
|
+
webhookUrl = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=..."
|
|
72
|
+
callbackToken = "..."
|
|
73
|
+
callbackHost = "127.0.0.1"
|
|
74
|
+
callbackPort = 0
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Use WeCom group robot webhook semantics for outbound send only. The user copies the full webhook URL from the official group robot configuration and pastes it into Scorel. This webhook cannot receive user messages from the group.
|
|
78
|
+
|
|
79
|
+
Inbound WeChat receive is covered by S0094: Scorel can expose an official-account style plaintext callback server when `callbackToken` is configured. Do not make users split `key`, env var names, or base URLs in the default outbound setup path. Do not implement consumer WeChat personal account automation.
|
|
80
|
+
|
|
81
|
+
### Skills
|
|
82
|
+
|
|
83
|
+
Each built-in extension must include a platform-specific skill that tells the model:
|
|
84
|
+
|
|
85
|
+
- what kind of conversation it is replying to;
|
|
86
|
+
- how mentions/group context should be interpreted;
|
|
87
|
+
- platform etiquette and short-response expectations;
|
|
88
|
+
- when to use `SendChannelMessage`;
|
|
89
|
+
- what not to assume about raw platform ids.
|
|
90
|
+
|
|
91
|
+
## Not In Scope
|
|
92
|
+
|
|
93
|
+
- Consumer QQ/WeChat personal account login.
|
|
94
|
+
- Public callback deployment, TLS, or hosted ingress.
|
|
95
|
+
- Rich media send support; covered by S0092.
|
|
96
|
+
- GUI Settings layout; covered by S0093.
|
|
97
|
+
- Remote Relay management of IM settings.
|
|
98
|
+
|
|
99
|
+
## Acceptance Criteria
|
|
100
|
+
|
|
101
|
+
- QQ and WeChat built-in extension manifests are discoverable by the existing loader.
|
|
102
|
+
- Each extension starts only when explicitly enabled and required credentials are present.
|
|
103
|
+
- QQ requires `appId` and `appSecret`; WeChat requires either a full outbound `webhookUrl` or an inbound `callbackToken`.
|
|
104
|
+
- Each adapter normalizes incoming text messages into the existing `ImIncomingMessage` shape.
|
|
105
|
+
- Each adapter sends plain text replies through the existing `SendChannelMessage` path.
|
|
106
|
+
- QQ send obtains and reuses an official access token instead of accepting deprecated bot token config.
|
|
107
|
+
- Adapter diagnostics redact secrets.
|
|
108
|
+
- QQ, WeChat, Telegram, and loopback share the same channel bridge and session binding behavior.
|
|
109
|
+
- No QQ/WeChat-specific branch is added to runtime/session/core channel orchestration.
|
|
110
|
+
|
|
111
|
+
## Testing Requirements
|
|
112
|
+
|
|
113
|
+
- Manifest loader coverage for QQ and WeChat built-ins.
|
|
114
|
+
- Adapter normalization tests using local HTTP stubs or pure parser fixtures.
|
|
115
|
+
- Send-message tests proving each adapter maps `SendChannelMessage` to its platform send API shape.
|
|
116
|
+
- Secret redaction tests.
|
|
117
|
+
- Full `pnpm typecheck && pnpm test`.
|
|
118
|
+
|
|
119
|
+
## Local State Boundary
|
|
120
|
+
|
|
121
|
+
Pre-1.0 local config may contain older `tokenEnv`, `token`, `webhookKeyEnv`, `webhookKey`, or `webhookBaseUrl` keys from earlier S0091 drafts. Those keys are no longer the supported setup surface. Users should re-enter QQ `App ID` / `App Secret` or WeChat `Outbound Webhook` / `Callback Token` in GUI Settings.
|
|
122
|
+
|
|
123
|
+
## Status
|
|
124
|
+
|
|
125
|
+
Done.
|