codeksei 0.1.0 → 0.1.1
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/LICENSE +661 -661
- package/README.en.md +109 -47
- package/README.md +79 -58
- package/bin/cyberboss.js +1 -1
- package/package.json +86 -86
- package/scripts/open_shared_wechat_thread.sh +77 -77
- package/scripts/open_wechat_thread.sh +108 -108
- package/scripts/shared-common.js +144 -144
- package/scripts/shared-open.js +14 -14
- package/scripts/shared-start.js +5 -5
- package/scripts/shared-status.js +27 -27
- package/scripts/show_shared_status.sh +45 -45
- package/scripts/start_shared_app_server.sh +52 -52
- package/scripts/start_shared_wechat.sh +94 -94
- package/scripts/timeline-screenshot.sh +14 -14
- package/src/adapters/channel/weixin/account-store.js +99 -99
- package/src/adapters/channel/weixin/api-v2.js +50 -50
- package/src/adapters/channel/weixin/api.js +169 -169
- package/src/adapters/channel/weixin/context-token-store.js +84 -84
- package/src/adapters/channel/weixin/index.js +618 -604
- package/src/adapters/channel/weixin/legacy.js +579 -566
- package/src/adapters/channel/weixin/media-mime.js +22 -22
- package/src/adapters/channel/weixin/media-receive.js +370 -370
- package/src/adapters/channel/weixin/media-send.js +102 -102
- package/src/adapters/channel/weixin/message-utils-v2.js +282 -282
- package/src/adapters/channel/weixin/message-utils.js +199 -199
- package/src/adapters/channel/weixin/redact.js +41 -41
- package/src/adapters/channel/weixin/reminder-queue-store.js +101 -101
- package/src/adapters/channel/weixin/sync-buffer-store.js +35 -35
- package/src/adapters/runtime/codex/events.js +215 -215
- package/src/adapters/runtime/codex/index.js +109 -104
- package/src/adapters/runtime/codex/message-utils.js +95 -95
- package/src/adapters/runtime/codex/model-catalog.js +106 -106
- package/src/adapters/runtime/codex/protocol-leak-monitor.js +75 -75
- package/src/adapters/runtime/codex/rpc-client.js +339 -339
- package/src/adapters/runtime/codex/session-store.js +286 -286
- package/src/app/channel-send-file-cli.js +57 -57
- package/src/app/diary-write-cli.js +236 -88
- package/src/app/note-sync-cli.js +2 -2
- package/src/app/reminder-write-cli.js +215 -210
- package/src/app/review-cli.js +7 -5
- package/src/app/system-checkin-poller.js +64 -64
- package/src/app/system-send-cli.js +129 -129
- package/src/app/timeline-event-cli.js +28 -25
- package/src/app/timeline-screenshot-cli.js +103 -100
- package/src/core/app.js +1763 -1763
- package/src/core/branding.js +2 -1
- package/src/core/command-registry.js +381 -369
- package/src/core/config.js +30 -14
- package/src/core/default-targets.js +163 -163
- package/src/core/durable-note-schema.js +9 -8
- package/src/core/instructions-template.js +17 -16
- package/src/core/note-sync.js +8 -7
- package/src/core/path-utils.js +54 -0
- package/src/core/project-radar.js +11 -10
- package/src/core/review.js +48 -50
- package/src/core/stream-delivery.js +1162 -983
- package/src/core/system-message-dispatcher.js +68 -68
- package/src/core/system-message-queue-store.js +128 -128
- package/src/core/thread-state-store.js +96 -96
- package/src/core/timeline-screenshot-queue-store.js +134 -134
- package/src/core/timezone.js +436 -0
- package/src/core/workspace-bootstrap.js +9 -1
- package/src/index.js +148 -146
- package/src/integrations/timeline/index.js +130 -74
- package/src/integrations/timeline/state-sync.js +240 -0
- package/templates/weixin-instructions.md +12 -38
- package/templates/weixin-operations.md +29 -31
package/README.en.md
CHANGED
|
@@ -1,56 +1,65 @@
|
|
|
1
1
|
# Codeksei
|
|
2
2
|
|
|
3
3
|
[](https://github.com/Sapientropic/codeksei/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/codeksei)
|
|
5
|
+
[](https://github.com/Sapientropic/codeksei/blob/main/LICENSE)
|
|
4
6
|
|
|
5
7
|
[中文 README](./README.md)
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
It connects Codex runtime, WeChat messaging, timeline, diary, review, durable notes, and workspace continuity into one operational loop so the agent can keep state, reconnect context, and carry work forward instead of acting like a stateless chat shell.
|
|
9
|
+
> A local-first life-assistant agent bridge that connects WeChat, Codex runtime, timeline, diary, review, durable notes, and workspace continuity into one ongoing personal workflow.
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
`Codeksei` is not a hosted SaaS, and it is not a stateless personality shell.
|
|
12
|
+
It is a local operational layer for keeping state, reconnecting context, and moving work forward across WeChat, terminal sessions, and workspace tools.
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
> This repository has diverged substantially from the original `cyberboss` README and usage model. Treat this repository’s `README`, `docs/`, and actual code as the current source of truth.
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
- A runtime that links WeChat conversations, Codex threads, timeline events, diaries, reviews, and lightweight project memory.
|
|
16
|
-
- A system designed for real continuity and low-friction re-entry, especially when executive function is the bottleneck.
|
|
16
|
+
## At a Glance
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
| Item | What it means |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| Positioning | Local-first personal life-assistant bridge |
|
|
21
|
+
| Main interfaces | WeChat + `codeksei` CLI |
|
|
22
|
+
| Core value | Shared thread, shared state, low-friction re-entry |
|
|
23
|
+
| Current package | `codeksei@0.1.1` |
|
|
24
|
+
| Compatibility layer | `cyberboss` / `CYBERBOSS_*` / `~/.cyberboss` |
|
|
19
25
|
|
|
20
|
-
|
|
21
|
-
- Codex runtime: shared `app-server`, thread/session binding, approvals, stop/resume
|
|
22
|
-
- Timeline: event write, batch write, taxonomy lookup, build/serve/screenshot
|
|
23
|
-
- Diary: Todo, factual timeline, fragments, supplements, summaries
|
|
24
|
-
- Review: nightly / weekly / monthly, with hybrid semantic pass by default
|
|
25
|
-
- Durable notes: `note:auto`, `note:maybe`, `note:sync`
|
|
26
|
-
- Workspace continuity: workspace bootstrap, project radar, shared-thread recovery
|
|
26
|
+
## Why It Is More Than a Chat Shell
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
- It is designed for continuity, not one-off prompts.
|
|
29
|
+
- WeChat and terminal sessions can attach to the same shared thread.
|
|
30
|
+
- `timeline`, `diary`, `review`, and `note` are built-in workflows, not afterthought scripts.
|
|
31
|
+
- State and tooling stay local, auditable, and modifiable.
|
|
29
32
|
|
|
30
|
-
|
|
33
|
+
## Who It Fits
|
|
31
34
|
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
35
|
+
- People who want WeChat to be the main interaction surface
|
|
36
|
+
- People who need the agent to remember thread state, unfinished work, and review clues
|
|
37
|
+
- People who prefer local control over hosted products
|
|
38
|
+
- People who benefit from low-friction re-entry, especially when executive function is the bottleneck
|
|
36
39
|
|
|
37
|
-
|
|
40
|
+
## Current Capabilities
|
|
38
41
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
+
| Area | What it currently does |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| WeChat bridge | QR login, long polling, file send-back, shared-thread attach |
|
|
45
|
+
| Codex runtime | Shared `app-server`, thread/session binding, approvals, stop/resume |
|
|
46
|
+
| Timeline | Event write, batch write, taxonomy lookup, build, preview, screenshot |
|
|
47
|
+
| Diary | Todo, factual timeline, fragments, supplements, summaries |
|
|
48
|
+
| Review | nightly / weekly / monthly, with hybrid semantic extraction by default |
|
|
49
|
+
| Durable notes | `note:auto`, `note:maybe`, `note:sync` |
|
|
50
|
+
| Workspace continuity | workspace bootstrap, project radar, shared-thread recovery by workspace |
|
|
42
51
|
|
|
43
|
-
|
|
52
|
+
## Quick Start
|
|
44
53
|
|
|
45
|
-
|
|
46
|
-
- If `~/.codeksei` does not exist but `~/.cyberboss` does, the runtime will reuse the legacy state directory.
|
|
47
|
-
- Windows scheduled tasks are installed as `Codeksei Shared *` and remove legacy `Cyberboss Shared *` task names during reinstall.
|
|
54
|
+
### 1. Fastest install path
|
|
48
55
|
|
|
49
|
-
|
|
56
|
+
If you just want to install and use it:
|
|
50
57
|
|
|
51
|
-
|
|
58
|
+
```bash
|
|
59
|
+
npm install -g codeksei
|
|
60
|
+
```
|
|
52
61
|
|
|
53
|
-
|
|
62
|
+
If you want source-level customization, debugging, or local script changes:
|
|
54
63
|
|
|
55
64
|
```bash
|
|
56
65
|
git clone https://github.com/Sapientropic/codeksei.git
|
|
@@ -58,14 +67,19 @@ cd codeksei
|
|
|
58
67
|
npm install
|
|
59
68
|
```
|
|
60
69
|
|
|
61
|
-
### 2.
|
|
70
|
+
### 2. Minimum env setup
|
|
62
71
|
|
|
63
|
-
|
|
72
|
+
Runtime env lookup order:
|
|
73
|
+
|
|
74
|
+
1. `.env` in the current project directory
|
|
75
|
+
2. `.env` in the current state directory
|
|
76
|
+
|
|
77
|
+
Recommended minimum variables:
|
|
64
78
|
|
|
65
79
|
```dotenv
|
|
66
80
|
CODEKSEI_USER_NAME=YourName
|
|
67
81
|
CODEKSEI_USER_GENDER=female
|
|
68
|
-
CODEKSEI_ALLOWED_USER_IDS=
|
|
82
|
+
CODEKSEI_ALLOWED_USER_IDS=bridge_observed_sender_id
|
|
69
83
|
CODEKSEI_WORKSPACE_ROOT=/absolute/path/to/your/workspace
|
|
70
84
|
```
|
|
71
85
|
|
|
@@ -76,15 +90,32 @@ CODEKSEI_ACCOUNT_ID=
|
|
|
76
90
|
CODEKSEI_CODEX_ENDPOINT=ws://127.0.0.1:8765
|
|
77
91
|
CODEKSEI_WEIXIN_ADAPTER=v2
|
|
78
92
|
CODEKSEI_WEIXIN_REPLY_MODE=stream
|
|
93
|
+
CODEKSEI_WEIXIN_ROUTE_TAG=
|
|
94
|
+
CODEKSEI_WEIXIN_PROTOCOL_CLIENT_VERSION=2.1.1
|
|
95
|
+
CODEKSEI_TIMEZONE=Asia/Shanghai
|
|
79
96
|
CODEKSEI_DIARY_DIR=/absolute/path/to/your/vault/diary
|
|
80
97
|
CODEKSEI_TIMELINE_STATE_DIR=/absolute/path/to/your/vault/.codex/timeline
|
|
81
98
|
CODEKSEI_WORKSPACE_BOOTSTRAP_CONFIG=/absolute/path/to/workspace-bootstrap.json
|
|
82
99
|
CODEKSEI_PROJECT_RADAR_CONFIG=/absolute/path/to/.codex/code-projects.json
|
|
83
100
|
CODEKSEI_DURABLE_NOTE_SCHEMA_CONFIG=/absolute/path/to/.codex/durable-note-schema.json
|
|
84
101
|
CODEKSEI_REVIEW_SCHEMA_CONFIG=/absolute/path/to/.codex/review-schema.json
|
|
102
|
+
CODEKSEI_SHARED_USE_BUNDLED_CODEX_BINARY=1
|
|
103
|
+
CODEKSEI_SHARED_DISABLE_PLUGINS=0
|
|
104
|
+
CODEKSEI_SHARED_DISABLE_SHELL_SNAPSHOT=0
|
|
85
105
|
```
|
|
86
106
|
|
|
87
|
-
|
|
107
|
+
Notes:
|
|
108
|
+
|
|
109
|
+
- Legacy `CYBERBOSS_*` variables still work, but new setups should use `CODEKSEI_*`
|
|
110
|
+
- `CODEKSEI_USER_NAME` is a display/persona field for chat, not a routing id
|
|
111
|
+
- `CODEKSEI_ALLOWED_USER_IDS` must use the exact sender ids observed by the bridge; the easiest way to find them is `npm run accounts`
|
|
112
|
+
- The first successful run will generate `weixin-instructions.md` in the state directory
|
|
113
|
+
- If you use multiple workspaces in shared mode, set `CODEKSEI_WORKSPACE_ROOT` before starting
|
|
114
|
+
- `CODEKSEI_TIMEZONE` is optional; when set, it becomes the single local-time contract for reminder / diary / review / timeline flows
|
|
115
|
+
- If `CODEKSEI_TIMEZONE` is unset, Codeksei first reuses any non-legacy timezone already declared by the timeline state; otherwise it falls back to the system timezone
|
|
116
|
+
- Legacy `Asia/Shanghai` timeline state can be auto-migrated to the unified timezone the next time you run a timeline command
|
|
117
|
+
- `CODEKSEI_TIMELINE_STATE_DIR` is the timeline-for-agent state root; the current primary layout stores runtime files under `timeline/*.json`
|
|
118
|
+
- Keep `.env` local; do not commit it into the repository
|
|
88
119
|
|
|
89
120
|
### 3. Login
|
|
90
121
|
|
|
@@ -100,7 +131,7 @@ Shared mode is the default operational path:
|
|
|
100
131
|
npm run shared:start
|
|
101
132
|
```
|
|
102
133
|
|
|
103
|
-
Attach
|
|
134
|
+
Attach the current WeChat-bound shared thread:
|
|
104
135
|
|
|
105
136
|
```bash
|
|
106
137
|
npm run shared:open
|
|
@@ -126,7 +157,7 @@ npm run background:uninstall
|
|
|
126
157
|
|
|
127
158
|
## Common Commands
|
|
128
159
|
|
|
129
|
-
Most frequently used
|
|
160
|
+
Most frequently used terminal commands:
|
|
130
161
|
|
|
131
162
|
- `npm run login`
|
|
132
163
|
- `npm run accounts`
|
|
@@ -134,6 +165,8 @@ Most frequently used local commands:
|
|
|
134
165
|
- `npm run shared:open`
|
|
135
166
|
- `npm run shared:status`
|
|
136
167
|
- `npm run shared:watchdog`
|
|
168
|
+
- `npm run background:install`
|
|
169
|
+
- `npm run background:uninstall`
|
|
137
170
|
- `npm run doctor`
|
|
138
171
|
- `npm run help`
|
|
139
172
|
|
|
@@ -156,15 +189,30 @@ More detailed references:
|
|
|
156
189
|
|
|
157
190
|
- [docs/commands.md](./docs/commands.md)
|
|
158
191
|
- [docs/architecture.md](./docs/architecture.md)
|
|
192
|
+
- [docs/release.md](./docs/release.md)
|
|
159
193
|
|
|
160
|
-
##
|
|
194
|
+
## Naming and Compatibility
|
|
161
195
|
|
|
162
|
-
|
|
163
|
-
The canonical release instructions, required secrets, tag rules, and slug-migration constraints live in:
|
|
196
|
+
`Codeksei` is now the primary public name.
|
|
164
197
|
|
|
165
|
-
-
|
|
198
|
+
- Primary package name: `codeksei`
|
|
199
|
+
- Primary CLI name: `codeksei`
|
|
200
|
+
- Primary env prefix: `CODEKSEI_*`
|
|
201
|
+
- Primary state directory: `~/.codeksei`
|
|
166
202
|
|
|
167
|
-
|
|
203
|
+
Compatibility is still preserved for existing local setups:
|
|
204
|
+
|
|
205
|
+
- Legacy CLI: `cyberboss`
|
|
206
|
+
- Legacy env prefix: `CYBERBOSS_*`
|
|
207
|
+
- Legacy state directory: `~/.cyberboss`
|
|
208
|
+
|
|
209
|
+
Rules:
|
|
210
|
+
|
|
211
|
+
- New-prefixed env vars override legacy-prefixed env vars
|
|
212
|
+
- If `~/.codeksei` does not exist but `~/.cyberboss` does, the runtime reuses the legacy state directory
|
|
213
|
+
- Windows scheduled tasks are installed as `Codeksei Shared *` and remove legacy `Cyberboss Shared *` task names during reinstall
|
|
214
|
+
|
|
215
|
+
## Local State and Public Boundary
|
|
168
216
|
|
|
169
217
|
Primary state directory:
|
|
170
218
|
|
|
@@ -178,7 +226,7 @@ Legacy-compatible state directory:
|
|
|
178
226
|
~/.cyberboss
|
|
179
227
|
```
|
|
180
228
|
|
|
181
|
-
Typical contents:
|
|
229
|
+
Typical runtime contents:
|
|
182
230
|
|
|
183
231
|
- `accounts/`
|
|
184
232
|
- `sessions.json`
|
|
@@ -192,6 +240,10 @@ Typical contents:
|
|
|
192
240
|
- `timeline/`
|
|
193
241
|
- `logs/`
|
|
194
242
|
|
|
243
|
+
If you set `CODEKSEI_DIARY_DIR` or `CODEKSEI_TIMELINE_STATE_DIR`, business data is stored there and the state directory keeps runtime files only.
|
|
244
|
+
|
|
245
|
+
The repository and npm package are meant to contain code, scripts, templates, and docs only. Your accounts, sessions, logs, personal `.env`, and local business data should stay outside version control.
|
|
246
|
+
|
|
195
247
|
## Timeline Can Be Used Separately
|
|
196
248
|
|
|
197
249
|
Codeksei builds its timeline layer on top of [`timeline-for-agent`](https://github.com/WenXiaoWendy/timeline-for-agent).
|
|
@@ -204,10 +256,20 @@ Codeksei grew from that base, but this version has been substantially reworked.
|
|
|
204
256
|
|
|
205
257
|
## FAQ
|
|
206
258
|
|
|
207
|
-
### Why not `npm install codeksei
|
|
259
|
+
### Why not just `npm install -g codeksei`?
|
|
260
|
+
|
|
261
|
+
You can. `codeksei@0.1.1` is already on npm.
|
|
262
|
+
Use npm if you only want to install it; clone the repository when you want customization, debugging, or source-level changes.
|
|
263
|
+
|
|
264
|
+
### Should I use `codeksei` or `cyberboss`?
|
|
265
|
+
|
|
266
|
+
New setups and current docs should use `Codeksei / codeksei / CODEKSEI_*`.
|
|
267
|
+
The old naming still exists only as a compatibility layer for existing local state and scripts.
|
|
268
|
+
|
|
269
|
+
### How is shared mode different from `npm run start`?
|
|
208
270
|
|
|
209
|
-
|
|
210
|
-
|
|
271
|
+
`npm run start` / `npm run start:checkin` is better for minimal-path debugging.
|
|
272
|
+
Shared mode is the default for daily use, WeChat + terminal continuity, recovery, and multi-window attach.
|
|
211
273
|
|
|
212
274
|
## License
|
|
213
275
|
|
package/README.md
CHANGED
|
@@ -1,70 +1,65 @@
|
|
|
1
1
|
# Codeksei
|
|
2
2
|
|
|
3
3
|
[](https://github.com/Sapientropic/codeksei/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/codeksei)
|
|
5
|
+
[](https://github.com/Sapientropic/codeksei/blob/main/LICENSE)
|
|
4
6
|
|
|
5
7
|
[English README](./README.en.md)
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
它把 Codex runtime、微信桥接、timeline、diary、review、durable note 这些能力接到同一条工作流里,让一个长期在线的 agent 不只是“回答问题”,而是能在真实生活与项目上下文里持续接线、记账、回看和推进。
|
|
9
|
+
> 一个本地优先的生活助理 Agent Bridge,把 WeChat、Codex runtime、timeline、diary、review、durable note 和 workspace continuity 接到同一条可持续运行的个人工作流里。
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
`Codeksei` 不是云端 SaaS,也不是只靠提示词扮演人格的聊天外壳。
|
|
12
|
+
它更像一个本地运行的协作底座:让 agent 能持续记住线程、接住上下文、把事情往前推,并在你掉线之后还能低摩擦重新接上。
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
> 这个仓库已经显著偏离上游 `cyberboss` 的原始 README 和使用方式。当前行为请以本仓 `README`、`docs/` 和实际代码实现为准。
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
- 一个把微信消息、Codex 线程、时间轴、日记、复盘和轻量项目索引接起来的运行时。
|
|
16
|
-
- 一个更适合“需要外部脚手架、需要被重新接住、需要低摩擦收口”的个人协作系统。
|
|
16
|
+
## 一眼看懂
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
| 项目 | 说明 |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| 定位 | 本地优先的个人生活助理桥接层 |
|
|
21
|
+
| 主要入口 | WeChat + `codeksei` CLI |
|
|
22
|
+
| 核心价值 | 同一条线程、同一份状态、低摩擦续接 |
|
|
23
|
+
| 当前发布 | `codeksei@0.1.1` |
|
|
24
|
+
| 兼容层 | `cyberboss` / `CYBERBOSS_*` / `~/.cyberboss` |
|
|
19
25
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
26
|
+
## 为什么它不是普通聊天壳
|
|
27
|
+
|
|
28
|
+
- 持续运行,而不是每次对话都从零开始。
|
|
29
|
+
- 微信和终端可以接到同一条共享线程,而不是两个互不相认的入口。
|
|
30
|
+
- `timeline`、`diary`、`review`、`note` 是内建工作流,不是后贴的边缘脚本。
|
|
31
|
+
- 数据与脚本本地可控、可改、可审计,更适合长期陪跑而不是一次性问答。
|
|
23
32
|
|
|
24
33
|
## 适合谁
|
|
25
34
|
|
|
26
|
-
-
|
|
35
|
+
- 希望把微信当成主要交互入口,而不是再开一个单独助手 App 的人
|
|
27
36
|
- 需要 agent 帮自己记住线程状态、时间线、未收口事项和复盘线索的人
|
|
28
37
|
- 更在意本地数据可控、可改、可审计,而不是云端托管的人
|
|
29
|
-
- 有 ADHD
|
|
38
|
+
- 有 ADHD 或执行功能摩擦,想把“重新接上”做成默认能力的人
|
|
30
39
|
|
|
31
40
|
## 当前能力
|
|
32
41
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
这轮开始,公共品牌以 `Codeksei` 为主。
|
|
44
|
-
|
|
45
|
-
- 主名称:`Codeksei`
|
|
46
|
-
- 主包名:`codeksei`
|
|
47
|
-
- 主 CLI 名:`codeksei`
|
|
48
|
-
- 主环境变量前缀:`CODEKSEI_*`
|
|
49
|
-
- 主状态目录:`~/.codeksei`
|
|
50
|
-
|
|
51
|
-
为了不打断已有本地使用,当前仍保留兼容层:
|
|
52
|
-
|
|
53
|
-
- 旧 CLI:`cyberboss`
|
|
54
|
-
- 旧环境变量前缀:`CYBERBOSS_*`
|
|
55
|
-
- 旧状态目录:`~/.cyberboss`
|
|
42
|
+
| 模块 | 当前能力 |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| WeChat bridge | 扫码登录、长轮询收发、文件发送、共享线程接管 |
|
|
45
|
+
| Codex runtime | 共享 `app-server`、thread/session 绑定、审批流、stop/resume |
|
|
46
|
+
| Timeline | 单条事件写入、批量写入、分类查询、构建、预览、截图 |
|
|
47
|
+
| Diary | Todo、时间线事实、碎片、补充记录、总结 |
|
|
48
|
+
| Review | nightly / weekly / monthly,默认 hybrid 语义提炼 |
|
|
49
|
+
| Durable note | `note:auto`、`note:maybe`、`note:sync` |
|
|
50
|
+
| Workspace continuity | workspace bootstrap、project radar、按 workspace 恢复共享线程 |
|
|
56
51
|
|
|
57
|
-
|
|
52
|
+
## 快速开始
|
|
58
53
|
|
|
59
|
-
|
|
60
|
-
- 如果 `~/.codeksei` 不存在但 `~/.cyberboss` 已存在,运行时会优先复用旧状态
|
|
61
|
-
- Windows 后台任务会安装为 `Codeksei Shared *`,同时清理旧 `Cyberboss Shared *`
|
|
54
|
+
### 1. 最短安装路径
|
|
62
55
|
|
|
63
|
-
|
|
56
|
+
如果你只是要安装和使用:
|
|
64
57
|
|
|
65
|
-
|
|
58
|
+
```bash
|
|
59
|
+
npm install -g codeksei
|
|
60
|
+
```
|
|
66
61
|
|
|
67
|
-
|
|
62
|
+
如果你要改源码、调试共享脚本或做本地定制:
|
|
68
63
|
|
|
69
64
|
```bash
|
|
70
65
|
git clone https://github.com/Sapientropic/codeksei.git
|
|
@@ -72,7 +67,7 @@ cd codeksei
|
|
|
72
67
|
npm install
|
|
73
68
|
```
|
|
74
69
|
|
|
75
|
-
### 2.
|
|
70
|
+
### 2. 最小环境变量
|
|
76
71
|
|
|
77
72
|
运行时默认读取:
|
|
78
73
|
|
|
@@ -84,7 +79,7 @@ npm install
|
|
|
84
79
|
```dotenv
|
|
85
80
|
CODEKSEI_USER_NAME=你的名字
|
|
86
81
|
CODEKSEI_USER_GENDER=female
|
|
87
|
-
CODEKSEI_ALLOWED_USER_IDS
|
|
82
|
+
CODEKSEI_ALLOWED_USER_IDS=桥实际观测到的 sender id
|
|
88
83
|
CODEKSEI_WORKSPACE_ROOT=/绝对路径/你的项目目录
|
|
89
84
|
```
|
|
90
85
|
|
|
@@ -97,6 +92,7 @@ CODEKSEI_WEIXIN_ADAPTER=v2
|
|
|
97
92
|
CODEKSEI_WEIXIN_REPLY_MODE=stream
|
|
98
93
|
CODEKSEI_WEIXIN_ROUTE_TAG=
|
|
99
94
|
CODEKSEI_WEIXIN_PROTOCOL_CLIENT_VERSION=2.1.1
|
|
95
|
+
CODEKSEI_TIMEZONE=Asia/Shanghai
|
|
100
96
|
CODEKSEI_DIARY_DIR=/绝对路径/你的 vault/日记
|
|
101
97
|
CODEKSEI_TIMELINE_STATE_DIR=/绝对路径/你的 vault/.codex/timeline
|
|
102
98
|
CODEKSEI_WORKSPACE_BOOTSTRAP_CONFIG=/绝对路径/你的 workspace-bootstrap.json
|
|
@@ -111,8 +107,15 @@ CODEKSEI_SHARED_DISABLE_SHELL_SNAPSHOT=0
|
|
|
111
107
|
说明:
|
|
112
108
|
|
|
113
109
|
- 旧的 `CYBERBOSS_*` 仍可用,但新项目建议统一切到 `CODEKSEI_*`
|
|
110
|
+
- `CODEKSEI_USER_NAME` 是 agent 聊天时怎么称呼你的人设字段,不参与消息路由
|
|
111
|
+
- `CODEKSEI_ALLOWED_USER_IDS` 必须填写微信桥实际观测到的 sender id;最简单的做法是先跑 `npm run accounts`
|
|
114
112
|
- 第一次运行任意命令时,会在状态目录生成 `weixin-instructions.md`
|
|
115
113
|
- 如果你在共享模式下使用多 workspace,建议启动前就设置好 `CODEKSEI_WORKSPACE_ROOT`
|
|
114
|
+
- `CODEKSEI_TIMEZONE` 可选;若显式设置,它会统一驱动 reminder / diary / review / timeline 的本地时间解释
|
|
115
|
+
- 如果不设 `CODEKSEI_TIMEZONE`,Codeksei 会优先沿用 timeline state 里已声明的非 legacy timezone;否则回退到系统时区
|
|
116
|
+
- 旧的 `Asia/Shanghai` legacy timeline state 在需要时会在下一次 timeline 命令时自动迁移到当前统一 timezone
|
|
117
|
+
- `CODEKSEI_TIMELINE_STATE_DIR` 默认是 timeline-for-agent 的 state root;当前主布局会在它下面使用 `timeline/*.json`
|
|
118
|
+
- `.env` 只应放在你的本地工作目录或状态目录里,不要提交进仓库
|
|
116
119
|
|
|
117
120
|
### 3. 扫码登录
|
|
118
121
|
|
|
@@ -142,7 +145,7 @@ npm run shared:status
|
|
|
142
145
|
|
|
143
146
|
### 5. Windows 后台常驻
|
|
144
147
|
|
|
145
|
-
|
|
148
|
+
如果你希望登录后自动拉起,并在解锁或恢复睡眠后快速自愈:
|
|
146
149
|
|
|
147
150
|
```powershell
|
|
148
151
|
npm run background:install
|
|
@@ -156,7 +159,7 @@ npm run background:uninstall
|
|
|
156
159
|
|
|
157
160
|
## 常用命令
|
|
158
161
|
|
|
159
|
-
|
|
162
|
+
终端里最常用的是这些:
|
|
160
163
|
|
|
161
164
|
- `npm run login`
|
|
162
165
|
- `npm run accounts`
|
|
@@ -169,7 +172,7 @@ npm run background:uninstall
|
|
|
169
172
|
- `npm run doctor`
|
|
170
173
|
- `npm run help`
|
|
171
174
|
|
|
172
|
-
|
|
175
|
+
微信里最常用的是这些:
|
|
173
176
|
|
|
174
177
|
- `/bind /绝对路径`
|
|
175
178
|
- `/status`
|
|
@@ -184,19 +187,35 @@ npm run background:uninstall
|
|
|
184
187
|
- `/model <id>`
|
|
185
188
|
- `/help`
|
|
186
189
|
|
|
187
|
-
|
|
190
|
+
更完整的命令与架构说明见:
|
|
188
191
|
|
|
189
192
|
- [docs/commands.md](./docs/commands.md)
|
|
190
193
|
- [docs/architecture.md](./docs/architecture.md)
|
|
194
|
+
- [docs/release.md](./docs/release.md)
|
|
191
195
|
|
|
192
|
-
##
|
|
196
|
+
## 命名与兼容
|
|
193
197
|
|
|
194
|
-
|
|
195
|
-
发布流程、所需 secret、tag 约定和 slug 迁移约束统一见:
|
|
198
|
+
这轮开始,公共品牌以 `Codeksei` 为主。
|
|
196
199
|
|
|
197
|
-
-
|
|
200
|
+
- 主名称:`Codeksei`
|
|
201
|
+
- 主包名:`codeksei`
|
|
202
|
+
- 主 CLI 名:`codeksei`
|
|
203
|
+
- 主环境变量前缀:`CODEKSEI_*`
|
|
204
|
+
- 主状态目录:`~/.codeksei`
|
|
198
205
|
|
|
199
|
-
|
|
206
|
+
为了不打断已有本地使用,当前仍保留兼容层:
|
|
207
|
+
|
|
208
|
+
- 旧 CLI:`cyberboss`
|
|
209
|
+
- 旧环境变量前缀:`CYBERBOSS_*`
|
|
210
|
+
- 旧状态目录:`~/.cyberboss`
|
|
211
|
+
|
|
212
|
+
兼容规则:
|
|
213
|
+
|
|
214
|
+
- 新前缀优先于旧前缀
|
|
215
|
+
- 如果 `~/.codeksei` 不存在但 `~/.cyberboss` 已存在,运行时会优先复用旧状态
|
|
216
|
+
- Windows 后台任务会安装为 `Codeksei Shared *`,同时清理旧 `Cyberboss Shared *`
|
|
217
|
+
|
|
218
|
+
## 本地数据与公开边界
|
|
200
219
|
|
|
201
220
|
当前默认状态目录是:
|
|
202
221
|
|
|
@@ -210,7 +229,7 @@ npm run background:uninstall
|
|
|
210
229
|
~/.cyberboss
|
|
211
230
|
```
|
|
212
231
|
|
|
213
|
-
|
|
232
|
+
常见运行态内容包括:
|
|
214
233
|
|
|
215
234
|
- `accounts/`
|
|
216
235
|
- `sessions.json`
|
|
@@ -226,6 +245,8 @@ npm run background:uninstall
|
|
|
226
245
|
|
|
227
246
|
如果你单独设置了 `CODEKSEI_DIARY_DIR` 或 `CODEKSEI_TIMELINE_STATE_DIR`,真正的数据会写到你指定的位置,状态目录只保留运行态文件。
|
|
228
247
|
|
|
248
|
+
这个仓库和 npm 包默认只放代码、脚本、模板与文档,不应包含你的账号、会话、日志、个人 `.env` 或本地业务数据。
|
|
249
|
+
|
|
229
250
|
## Timeline 可单独复用
|
|
230
251
|
|
|
231
252
|
Codeksei 的时间轴能力建立在 [`timeline-for-agent`](https://github.com/WenXiaoWendy/timeline-for-agent) 之上。
|
|
@@ -238,10 +259,10 @@ Codeksei 是在其基础上发展出来的版本,但当前已经进行了大
|
|
|
238
259
|
|
|
239
260
|
## FAQ
|
|
240
261
|
|
|
241
|
-
### 为什么不是直接 `npm install codeksei`?
|
|
262
|
+
### 为什么不是直接 `npm install -g codeksei`?
|
|
242
263
|
|
|
243
|
-
|
|
244
|
-
|
|
264
|
+
现在已经可以直接 `npm install -g codeksei`。
|
|
265
|
+
如果你只想安装使用,npm 就是最短路径;如果你要做本地定制、调试共享桥接脚本或直接改仓库源码,clone 仓库仍然更合适。
|
|
245
266
|
|
|
246
267
|
### 现在到底该用 `codeksei` 还是 `cyberboss`?
|
|
247
268
|
|
package/bin/cyberboss.js
CHANGED