codeksei 0.1.0

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.
Files changed (80) hide show
  1. package/LICENSE +661 -0
  2. package/README.en.md +215 -0
  3. package/README.md +259 -0
  4. package/bin/codeksei.js +10 -0
  5. package/bin/cyberboss.js +11 -0
  6. package/package.json +86 -0
  7. package/scripts/install-background-tasks.ps1 +135 -0
  8. package/scripts/open_shared_wechat_thread.sh +94 -0
  9. package/scripts/open_wechat_thread.sh +117 -0
  10. package/scripts/shared-common.js +791 -0
  11. package/scripts/shared-open.js +46 -0
  12. package/scripts/shared-start.js +41 -0
  13. package/scripts/shared-status.js +74 -0
  14. package/scripts/shared-supervisor.js +141 -0
  15. package/scripts/shared-task-runner.ps1 +87 -0
  16. package/scripts/shared-watchdog.js +290 -0
  17. package/scripts/show_shared_status.sh +53 -0
  18. package/scripts/start_shared_app_server.sh +65 -0
  19. package/scripts/start_shared_wechat.sh +108 -0
  20. package/scripts/timeline-screenshot.sh +15 -0
  21. package/scripts/uninstall-background-tasks.ps1 +23 -0
  22. package/src/adapters/channel/weixin/account-store.js +135 -0
  23. package/src/adapters/channel/weixin/api-v2.js +258 -0
  24. package/src/adapters/channel/weixin/api.js +180 -0
  25. package/src/adapters/channel/weixin/context-token-store.js +84 -0
  26. package/src/adapters/channel/weixin/index.js +605 -0
  27. package/src/adapters/channel/weixin/legacy.js +567 -0
  28. package/src/adapters/channel/weixin/login-common.js +63 -0
  29. package/src/adapters/channel/weixin/login-legacy.js +124 -0
  30. package/src/adapters/channel/weixin/login-v2.js +186 -0
  31. package/src/adapters/channel/weixin/media-mime.js +22 -0
  32. package/src/adapters/channel/weixin/media-receive.js +370 -0
  33. package/src/adapters/channel/weixin/media-send.js +331 -0
  34. package/src/adapters/channel/weixin/message-utils-v2.js +282 -0
  35. package/src/adapters/channel/weixin/message-utils.js +199 -0
  36. package/src/adapters/channel/weixin/protocol.js +77 -0
  37. package/src/adapters/channel/weixin/redact.js +41 -0
  38. package/src/adapters/channel/weixin/reminder-queue-store.js +101 -0
  39. package/src/adapters/channel/weixin/sync-buffer-store.js +35 -0
  40. package/src/adapters/runtime/codex/events.js +252 -0
  41. package/src/adapters/runtime/codex/index.js +502 -0
  42. package/src/adapters/runtime/codex/message-utils.js +141 -0
  43. package/src/adapters/runtime/codex/model-catalog.js +106 -0
  44. package/src/adapters/runtime/codex/protocol-leak-monitor.js +75 -0
  45. package/src/adapters/runtime/codex/rpc-client.js +443 -0
  46. package/src/adapters/runtime/codex/session-store.js +376 -0
  47. package/src/app/channel-send-file-cli.js +57 -0
  48. package/src/app/diary-write-cli.js +620 -0
  49. package/src/app/note-auto-cli.js +201 -0
  50. package/src/app/note-sync-cli.js +130 -0
  51. package/src/app/project-radar-cli.js +165 -0
  52. package/src/app/reminder-write-cli.js +210 -0
  53. package/src/app/review-cli.js +134 -0
  54. package/src/app/system-checkin-poller.js +100 -0
  55. package/src/app/system-send-cli.js +129 -0
  56. package/src/app/timeline-event-cli.js +273 -0
  57. package/src/app/timeline-screenshot-cli.js +109 -0
  58. package/src/core/app.js +1810 -0
  59. package/src/core/branding.js +167 -0
  60. package/src/core/command-registry.js +609 -0
  61. package/src/core/config.js +84 -0
  62. package/src/core/default-targets.js +163 -0
  63. package/src/core/durable-note-schema.js +325 -0
  64. package/src/core/instructions-template.js +31 -0
  65. package/src/core/note-sync.js +433 -0
  66. package/src/core/project-radar.js +402 -0
  67. package/src/core/review-semantic.js +524 -0
  68. package/src/core/review.js +1081 -0
  69. package/src/core/shared-bridge-heartbeat.js +140 -0
  70. package/src/core/stream-delivery.js +990 -0
  71. package/src/core/system-message-dispatcher.js +68 -0
  72. package/src/core/system-message-queue-store.js +128 -0
  73. package/src/core/thread-state-store.js +135 -0
  74. package/src/core/timeline-screenshot-queue-store.js +134 -0
  75. package/src/core/workspace-alias.js +163 -0
  76. package/src/core/workspace-bootstrap.js +338 -0
  77. package/src/index.js +270 -0
  78. package/src/integrations/timeline/index.js +191 -0
  79. package/templates/weixin-instructions.md +53 -0
  80. package/templates/weixin-operations.md +69 -0
package/README.en.md ADDED
@@ -0,0 +1,215 @@
1
+ # Codeksei
2
+
3
+ [![CI](https://github.com/Sapientropic/codeksei/actions/workflows/ci.yml/badge.svg)](https://github.com/Sapientropic/codeksei/actions/workflows/ci.yml)
4
+
5
+ [中文 README](./README.md)
6
+
7
+ Codeksei is a local-first life-assistant agent bridge.
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
+
10
+ This repository is no longer a lightly modified fork whose original README still applies. The current codebase has been heavily reshaped around shared app-server lifecycle management, WeChat v2 routing and delivery hardening, timeline/diary/review tooling, durable note routing, workspace bootstrap, and project radar. The documentation below describes this repository as it exists today.
11
+
12
+ ## What It Is
13
+
14
+ - A personal, locally deployed life-assistant bridge, not a hosted SaaS.
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.
17
+
18
+ ## Current Capabilities
19
+
20
+ - WeChat bridge: QR login, long polling, file send-back, shared thread attach
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
27
+
28
+ ## Naming and Compatibility
29
+
30
+ `Codeksei` is now the primary public name.
31
+
32
+ - Primary package name: `codeksei`
33
+ - Primary CLI name: `codeksei`
34
+ - Primary env prefix: `CODEKSEI_*`
35
+ - Primary state directory: `~/.codeksei`
36
+
37
+ Compatibility is still preserved for existing local setups:
38
+
39
+ - Legacy CLI: `cyberboss`
40
+ - Legacy env prefix: `CYBERBOSS_*`
41
+ - Legacy state directory: `~/.cyberboss`
42
+
43
+ Rules:
44
+
45
+ - New-prefixed env vars override legacy-prefixed env vars.
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.
48
+
49
+ ## Quick Start
50
+
51
+ ### 1. Clone and install
52
+
53
+ The default path is still to clone and run locally. The repository now includes GitHub Actions CI and an npm publish workflow, but until the first package release exists, clone-based local usage remains the primary install path:
54
+
55
+ ```bash
56
+ git clone https://github.com/Sapientropic/codeksei.git
57
+ cd codeksei
58
+ npm install
59
+ ```
60
+
61
+ ### 2. Configure env vars
62
+
63
+ Recommended minimum setup:
64
+
65
+ ```dotenv
66
+ CODEKSEI_USER_NAME=YourName
67
+ CODEKSEI_USER_GENDER=female
68
+ CODEKSEI_ALLOWED_USER_IDS=your-wechat-user-id
69
+ CODEKSEI_WORKSPACE_ROOT=/absolute/path/to/your/workspace
70
+ ```
71
+
72
+ Useful optional variables:
73
+
74
+ ```dotenv
75
+ CODEKSEI_ACCOUNT_ID=
76
+ CODEKSEI_CODEX_ENDPOINT=ws://127.0.0.1:8765
77
+ CODEKSEI_WEIXIN_ADAPTER=v2
78
+ CODEKSEI_WEIXIN_REPLY_MODE=stream
79
+ CODEKSEI_DIARY_DIR=/absolute/path/to/your/vault/diary
80
+ CODEKSEI_TIMELINE_STATE_DIR=/absolute/path/to/your/vault/.codex/timeline
81
+ CODEKSEI_WORKSPACE_BOOTSTRAP_CONFIG=/absolute/path/to/workspace-bootstrap.json
82
+ CODEKSEI_PROJECT_RADAR_CONFIG=/absolute/path/to/.codex/code-projects.json
83
+ CODEKSEI_DURABLE_NOTE_SCHEMA_CONFIG=/absolute/path/to/.codex/durable-note-schema.json
84
+ CODEKSEI_REVIEW_SCHEMA_CONFIG=/absolute/path/to/.codex/review-schema.json
85
+ ```
86
+
87
+ Legacy `CYBERBOSS_*` variables still work, but new setups should move to `CODEKSEI_*`.
88
+
89
+ ### 3. Login
90
+
91
+ ```bash
92
+ npm run login
93
+ ```
94
+
95
+ ### 4. Start shared mode
96
+
97
+ Shared mode is the default operational path:
98
+
99
+ ```bash
100
+ npm run shared:start
101
+ ```
102
+
103
+ Attach your current WeChat-bound thread from the terminal:
104
+
105
+ ```bash
106
+ npm run shared:open
107
+ ```
108
+
109
+ Check status:
110
+
111
+ ```bash
112
+ npm run shared:status
113
+ ```
114
+
115
+ ### 5. Install Windows background tasks
116
+
117
+ ```powershell
118
+ npm run background:install
119
+ ```
120
+
121
+ Remove them:
122
+
123
+ ```powershell
124
+ npm run background:uninstall
125
+ ```
126
+
127
+ ## Common Commands
128
+
129
+ Most frequently used local commands:
130
+
131
+ - `npm run login`
132
+ - `npm run accounts`
133
+ - `npm run shared:start`
134
+ - `npm run shared:open`
135
+ - `npm run shared:status`
136
+ - `npm run shared:watchdog`
137
+ - `npm run doctor`
138
+ - `npm run help`
139
+
140
+ Common WeChat commands:
141
+
142
+ - `/bind /absolute/path`
143
+ - `/status`
144
+ - `/new`
145
+ - `/reread`
146
+ - `/switch <threadId>`
147
+ - `/stop`
148
+ - `/yes`
149
+ - `/always`
150
+ - `/no`
151
+ - `/model`
152
+ - `/model <id>`
153
+ - `/help`
154
+
155
+ More detailed references:
156
+
157
+ - [docs/commands.md](./docs/commands.md)
158
+ - [docs/architecture.md](./docs/architecture.md)
159
+
160
+ ## Release and CI
161
+
162
+ The repository now includes GitHub Actions CI and an npm publish workflow.
163
+ The canonical release instructions, required secrets, tag rules, and slug-migration constraints live in:
164
+
165
+ - [docs/release.md](./docs/release.md)
166
+
167
+ ## Local State
168
+
169
+ Primary state directory:
170
+
171
+ ```text
172
+ ~/.codeksei
173
+ ```
174
+
175
+ Legacy-compatible state directory:
176
+
177
+ ```text
178
+ ~/.cyberboss
179
+ ```
180
+
181
+ Typical contents:
182
+
183
+ - `accounts/`
184
+ - `sessions.json`
185
+ - `sync-buffers/`
186
+ - `weixin-instructions.md`
187
+ - `workspace-bootstrap.json`
188
+ - `reminder-queue.json`
189
+ - `system-message-queue.json`
190
+ - `timeline-screenshot-queue.json`
191
+ - `diary/`
192
+ - `timeline/`
193
+ - `logs/`
194
+
195
+ ## Timeline Can Be Used Separately
196
+
197
+ Codeksei builds its timeline layer on top of [`timeline-for-agent`](https://github.com/WenXiaoWendy/timeline-for-agent).
198
+ If you only want the timeline runtime and not the WeChat/life-assistant stack, you can use that upstream project directly.
199
+
200
+ ## Upstream Acknowledgement
201
+
202
+ Thanks to [`WenXiaoWendy/cyberboss`](https://github.com/WenXiaoWendy/cyberboss) for open-sourcing the original repository.
203
+ Codeksei grew from that base, but this version has been substantially reworked. Please treat this repository’s README, `docs/`, and actual code as the source of truth for current behavior.
204
+
205
+ ## FAQ
206
+
207
+ ### Why not `npm install codeksei` directly?
208
+
209
+ Because the primary install path is still local clone + run.
210
+ CI and npm trusted publishing automation are now in place, but the first public release still requires a one-time trusted publisher setup on npm plus the release/tag flow.
211
+
212
+ ## License
213
+
214
+ This project is released under `AGPL-3.0-only`.
215
+ If you modify it and provide it as a networked service to users, you must provide the corresponding source code to those users under AGPL terms.
package/README.md ADDED
@@ -0,0 +1,259 @@
1
+ # Codeksei
2
+
3
+ [![CI](https://github.com/Sapientropic/codeksei/actions/workflows/ci.yml/badge.svg)](https://github.com/Sapientropic/codeksei/actions/workflows/ci.yml)
4
+
5
+ [English README](./README.en.md)
6
+
7
+ Codeksei 是一个面向个人本地部署的生活助理 Agent Bridge。
8
+ 它把 Codex runtime、微信桥接、timeline、diary、review、durable note 这些能力接到同一条工作流里,让一个长期在线的 agent 不只是“回答问题”,而是能在真实生活与项目上下文里持续接线、记账、回看和推进。
9
+
10
+ 这个仓库已经不是对原仓 README 原样适用的轻量 fork。现在的实现包含共享 app-server 生命周期、WeChat v2 路由与回复去重、timeline/diary/review 命令链路、durable note 自动路由、workspace bootstrap、project radar 等大量改造,因此文档以当前仓库现状为准。
11
+
12
+ ## 这是什么
13
+
14
+ - 一个本地优先的个人生活助理桥接层,不是云端 SaaS。
15
+ - 一个把微信消息、Codex 线程、时间轴、日记、复盘和轻量项目索引接起来的运行时。
16
+ - 一个更适合“需要外部脚手架、需要被重新接住、需要低摩擦收口”的个人协作系统。
17
+
18
+ 它不是:
19
+
20
+ - 通用聊天机器人托管平台
21
+ - 多租户服务端产品
22
+ - 只靠提示词演戏、没有状态与工具落盘的“人格壳”
23
+
24
+ ## 适合谁
25
+
26
+ - 希望把微信当成主要交互入口,而不是再开一个新 App 的人
27
+ - 需要 agent 帮自己记住线程状态、时间线、未收口事项和复盘线索的人
28
+ - 更在意本地数据可控、可改、可审计,而不是云端托管的人
29
+ - 有 ADHD / 执行功能摩擦,想把“重新接上”做成默认能力的人
30
+
31
+ ## 当前能力
32
+
33
+ - 微信桥接:扫码登录、长轮询收发、文件发送、共享线程接管
34
+ - Codex runtime:共享 `app-server`、thread/session 绑定、审批流、stop / resume
35
+ - 时间轴:单条事件写入、批量写入、分类查询、构建/预览/截图
36
+ - 日记:Todo、时间线事实、碎片、补充记录、总结
37
+ - Review:nightly / weekly / monthly,默认 hybrid 语义提炼
38
+ - Durable note:`note:auto` / `note:maybe` / `note:sync`
39
+ - Workspace continuity:workspace bootstrap、project radar、共享线程按 workspace 恢复
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`
56
+
57
+ 兼容规则:
58
+
59
+ - 新前缀优先于旧前缀
60
+ - 如果 `~/.codeksei` 不存在但 `~/.cyberboss` 已存在,运行时会优先复用旧状态
61
+ - Windows 后台任务会安装为 `Codeksei Shared *`,同时清理旧 `Cyberboss Shared *`
62
+
63
+ ## 快速开始
64
+
65
+ ### 1. 获取源码
66
+
67
+ 当前默认仍推荐直接拉源码使用。仓库已经补上 GitHub Actions CI 和 npm publish workflow,但在首发 npm 包之前,日常安装入口仍以 clone 仓库为主:
68
+
69
+ ```bash
70
+ git clone https://github.com/Sapientropic/codeksei.git
71
+ cd codeksei
72
+ npm install
73
+ ```
74
+
75
+ ### 2. 先配环境变量
76
+
77
+ 运行时默认读取:
78
+
79
+ 1. 当前项目目录下的 `.env`
80
+ 2. 当前状态目录下的 `.env`
81
+
82
+ 推荐优先使用新前缀:
83
+
84
+ ```dotenv
85
+ CODEKSEI_USER_NAME=你的名字
86
+ CODEKSEI_USER_GENDER=female
87
+ CODEKSEI_ALLOWED_USER_IDS=你的微信 user id
88
+ CODEKSEI_WORKSPACE_ROOT=/绝对路径/你的项目目录
89
+ ```
90
+
91
+ 常用可选项:
92
+
93
+ ```dotenv
94
+ CODEKSEI_ACCOUNT_ID=
95
+ CODEKSEI_CODEX_ENDPOINT=ws://127.0.0.1:8765
96
+ CODEKSEI_WEIXIN_ADAPTER=v2
97
+ CODEKSEI_WEIXIN_REPLY_MODE=stream
98
+ CODEKSEI_WEIXIN_ROUTE_TAG=
99
+ CODEKSEI_WEIXIN_PROTOCOL_CLIENT_VERSION=2.1.1
100
+ CODEKSEI_DIARY_DIR=/绝对路径/你的 vault/日记
101
+ CODEKSEI_TIMELINE_STATE_DIR=/绝对路径/你的 vault/.codex/timeline
102
+ CODEKSEI_WORKSPACE_BOOTSTRAP_CONFIG=/绝对路径/你的 workspace-bootstrap.json
103
+ CODEKSEI_PROJECT_RADAR_CONFIG=/绝对路径/你的 workspace/.codex/code-projects.json
104
+ CODEKSEI_DURABLE_NOTE_SCHEMA_CONFIG=/绝对路径/你的 workspace/.codex/durable-note-schema.json
105
+ CODEKSEI_REVIEW_SCHEMA_CONFIG=/绝对路径/你的 workspace/.codex/review-schema.json
106
+ CODEKSEI_SHARED_USE_BUNDLED_CODEX_BINARY=1
107
+ CODEKSEI_SHARED_DISABLE_PLUGINS=0
108
+ CODEKSEI_SHARED_DISABLE_SHELL_SNAPSHOT=0
109
+ ```
110
+
111
+ 说明:
112
+
113
+ - 旧的 `CYBERBOSS_*` 仍可用,但新项目建议统一切到 `CODEKSEI_*`
114
+ - 第一次运行任意命令时,会在状态目录生成 `weixin-instructions.md`
115
+ - 如果你在共享模式下使用多 workspace,建议启动前就设置好 `CODEKSEI_WORKSPACE_ROOT`
116
+
117
+ ### 3. 扫码登录
118
+
119
+ ```bash
120
+ npm run login
121
+ ```
122
+
123
+ ### 4. 启动共享模式
124
+
125
+ 默认推荐共享模式,不再推荐把桥接跑成一次性的私有 runtime:
126
+
127
+ ```bash
128
+ npm run shared:start
129
+ ```
130
+
131
+ 接入当前微信绑定的共享线程:
132
+
133
+ ```bash
134
+ npm run shared:open
135
+ ```
136
+
137
+ 查看状态:
138
+
139
+ ```bash
140
+ npm run shared:status
141
+ ```
142
+
143
+ ### 5. Windows 后台常驻
144
+
145
+ 如果你希望登录后自动拉起,并在解锁/恢复睡眠后快速自愈:
146
+
147
+ ```powershell
148
+ npm run background:install
149
+ ```
150
+
151
+ 卸载:
152
+
153
+ ```powershell
154
+ npm run background:uninstall
155
+ ```
156
+
157
+ ## 常用命令
158
+
159
+ 普通用户最常用的是这些:
160
+
161
+ - `npm run login`
162
+ - `npm run accounts`
163
+ - `npm run shared:start`
164
+ - `npm run shared:open`
165
+ - `npm run shared:status`
166
+ - `npm run shared:watchdog`
167
+ - `npm run background:install`
168
+ - `npm run background:uninstall`
169
+ - `npm run doctor`
170
+ - `npm run help`
171
+
172
+ 微信里常用的是这些:
173
+
174
+ - `/bind /绝对路径`
175
+ - `/status`
176
+ - `/new`
177
+ - `/reread`
178
+ - `/switch <threadId>`
179
+ - `/stop`
180
+ - `/yes`
181
+ - `/always`
182
+ - `/no`
183
+ - `/model`
184
+ - `/model <id>`
185
+ - `/help`
186
+
187
+ 更完整的命令说明见:
188
+
189
+ - [docs/commands.md](./docs/commands.md)
190
+ - [docs/architecture.md](./docs/architecture.md)
191
+
192
+ ## 发布与 CI
193
+
194
+ 仓库现在已经内置 GitHub Actions CI 与 npm 发布 workflow。
195
+ 发布流程、所需 secret、tag 约定和 slug 迁移约束统一见:
196
+
197
+ - [docs/release.md](./docs/release.md)
198
+
199
+ ## 本地数据在哪里
200
+
201
+ 当前默认状态目录是:
202
+
203
+ ```text
204
+ ~/.codeksei
205
+ ```
206
+
207
+ 如果你是从旧版本升级,且只有旧目录存在,运行时会继续兼容:
208
+
209
+ ```text
210
+ ~/.cyberboss
211
+ ```
212
+
213
+ 常见内容包括:
214
+
215
+ - `accounts/`
216
+ - `sessions.json`
217
+ - `sync-buffers/`
218
+ - `weixin-instructions.md`
219
+ - `workspace-bootstrap.json`
220
+ - `reminder-queue.json`
221
+ - `system-message-queue.json`
222
+ - `timeline-screenshot-queue.json`
223
+ - `diary/`
224
+ - `timeline/`
225
+ - `logs/`
226
+
227
+ 如果你单独设置了 `CODEKSEI_DIARY_DIR` 或 `CODEKSEI_TIMELINE_STATE_DIR`,真正的数据会写到你指定的位置,状态目录只保留运行态文件。
228
+
229
+ ## Timeline 可单独复用
230
+
231
+ Codeksei 的时间轴能力建立在 [`timeline-for-agent`](https://github.com/WenXiaoWendy/timeline-for-agent) 之上。
232
+ 如果你只想要 timeline,而不需要微信桥接与生活助理能力,也可以直接单独使用上游项目。
233
+
234
+ ## Upstream Acknowledgement
235
+
236
+ 感谢原仓 [`WenXiaoWendy/cyberboss`](https://github.com/WenXiaoWendy/cyberboss) 的开源。
237
+ Codeksei 是在其基础上发展出来的版本,但当前已经进行了大量魔改和结构调整,包括共享桥接生命周期、workspace continuity、review/durable-note/timeline 命令链路、WeChat v2 登录与回复处理等。因此,使用和维护时请以本仓 README、`docs/` 和实际代码实现为准,不再默认沿用原仓说明。
238
+
239
+ ## FAQ
240
+
241
+ ### 为什么不是直接 `npm install codeksei`?
242
+
243
+ 因为当前默认入口仍是 clone 仓库后本地运行。
244
+ 现在已经有 GitHub Actions CI 和 npm trusted publishing workflow,但真正首发前仍需要先在 npm 后台完成一次 trusted publisher 配置,再走 release/tag 流程。
245
+
246
+ ### 现在到底该用 `codeksei` 还是 `cyberboss`?
247
+
248
+ 新项目和新文档都应使用 `Codeksei / codeksei / CODEKSEI_*`。
249
+ 旧名字目前仍保留兼容,只是为了不打断已有本地状态和脚本。
250
+
251
+ ### 共享模式和 `npm run start` 有什么区别?
252
+
253
+ `npm run start` / `npm run start:checkin` 更适合最小链路调试。
254
+ 日常使用、微信与终端共用同一条线程、后台自愈和多窗口接管,默认都应走共享模式。
255
+
256
+ ## License
257
+
258
+ 本项目采用 `AGPL-3.0-only`。
259
+ 如果你基于本项目修改、扩展并通过网络向他人提供服务,需要按照 AGPL 的要求向对应用户提供完整的对应源代码。
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { main } = require("../src/index");
4
+ const { PACKAGE_NAME } = require("../src/core/branding");
5
+
6
+ main().catch((error) => {
7
+ const message = error instanceof Error ? error.message : String(error);
8
+ console.error(`[${PACKAGE_NAME}] ${message}`);
9
+ process.exitCode = 1;
10
+ });
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { main } = require("../src/index");
4
+ const { LEGACY_PACKAGE_NAME } = require("../src/core/branding");
5
+
6
+ main().catch((error) => {
7
+ const message = error instanceof Error ? error.message : String(error);
8
+ console.error(`[${LEGACY_PACKAGE_NAME}] ${message}`);
9
+ process.exitCode = 1;
10
+ });
11
+
package/package.json ADDED
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "codeksei",
3
+ "version": "0.1.0",
4
+ "description": "Local-first life-assistant agent bridge for Codex, WeChat, timeline, diary, and review workflows.",
5
+ "license": "AGPL-3.0-only",
6
+ "private": false,
7
+ "type": "commonjs",
8
+ "main": "src/index.js",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/Sapientropic/codeksei.git"
12
+ },
13
+ "homepage": "https://github.com/Sapientropic/codeksei#readme",
14
+ "bugs": {
15
+ "url": "https://github.com/Sapientropic/codeksei/issues"
16
+ },
17
+ "bin": {
18
+ "codeksei": "bin/codeksei.js",
19
+ "cyberboss": "bin/cyberboss.js"
20
+ },
21
+ "files": [
22
+ "bin",
23
+ "src",
24
+ "scripts",
25
+ "templates",
26
+ "README.en.md"
27
+ ],
28
+ "keywords": [
29
+ "codeksei",
30
+ "codex",
31
+ "wechat",
32
+ "weixin",
33
+ "timeline",
34
+ "review",
35
+ "life-assistant"
36
+ ],
37
+ "engines": {
38
+ "node": ">=22"
39
+ },
40
+ "publishConfig": {
41
+ "access": "public"
42
+ },
43
+ "scripts": {
44
+ "start": "node ./bin/codeksei.js start",
45
+ "start:checkin": "node ./bin/codeksei.js start --checkin",
46
+ "login": "node ./bin/codeksei.js login",
47
+ "accounts": "node ./bin/codeksei.js accounts",
48
+ "doctor": "node ./bin/codeksei.js doctor",
49
+ "help": "node ./bin/codeksei.js help",
50
+ "shared:start": "node ./scripts/shared-start.js",
51
+ "shared:open": "node ./scripts/shared-open.js",
52
+ "shared:status": "node ./scripts/shared-status.js",
53
+ "shared:supervisor": "node ./scripts/shared-supervisor.js",
54
+ "shared:watchdog": "node ./scripts/shared-watchdog.js",
55
+ "background:install": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File ./scripts/install-background-tasks.ps1",
56
+ "background:uninstall": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File ./scripts/uninstall-background-tasks.ps1",
57
+ "channel:send-file": "node ./bin/codeksei.js channel send-file",
58
+ "note:auto": "node ./bin/codeksei.js note auto",
59
+ "note:maybe": "node ./bin/codeksei.js note maybe",
60
+ "note:sync": "node ./bin/codeksei.js note sync",
61
+ "project:radar": "node ./bin/codeksei.js project radar",
62
+ "review:nightly": "node ./bin/codeksei.js review nightly",
63
+ "review:weekly": "node ./bin/codeksei.js review weekly",
64
+ "review:monthly": "node ./bin/codeksei.js review monthly",
65
+ "reminder:write": "node ./bin/codeksei.js reminder write",
66
+ "diary:write": "node ./bin/codeksei.js diary write",
67
+ "system:send": "node ./bin/codeksei.js system send",
68
+ "system:checkin": "node ./bin/codeksei.js system checkin-poller",
69
+ "timeline:event": "node ./bin/codeksei.js timeline event",
70
+ "timeline:write": "node ./bin/codeksei.js timeline write",
71
+ "timeline:read": "node ./bin/codeksei.js timeline read",
72
+ "timeline:categories": "node ./bin/codeksei.js timeline categories",
73
+ "timeline:proposals": "node ./bin/codeksei.js timeline proposals",
74
+ "timeline:build": "node ./bin/codeksei.js timeline build",
75
+ "timeline:serve": "node ./bin/codeksei.js timeline serve",
76
+ "timeline:dev": "node ./bin/codeksei.js timeline dev",
77
+ "timeline:screenshot": "node ./bin/codeksei.js timeline screenshot",
78
+ "check": "node --check ./src/index.js && node --check ./src/core/config.js && node --check ./src/core/app.js && node --check ./src/core/default-targets.js && node --check ./src/core/thread-state-store.js && node --check ./src/core/stream-delivery.js && node --check ./src/core/command-registry.js && node --check ./src/core/system-message-queue-store.js && node --check ./src/core/system-message-dispatcher.js && node --check ./src/core/timeline-screenshot-queue-store.js && node --check ./src/core/workspace-alias.js && node --check ./src/core/shared-bridge-heartbeat.js && node --check ./src/core/workspace-bootstrap.js && node --check ./src/core/project-radar.js && node --check ./src/core/note-sync.js && node --check ./src/core/durable-note-schema.js && node --check ./src/core/review.js && node --check ./src/core/review-semantic.js && node --check ./src/app/channel-send-file-cli.js && node --check ./src/app/note-auto-cli.js && node --check ./src/app/note-sync-cli.js && node --check ./src/app/project-radar-cli.js && node --check ./src/app/review-cli.js && node --check ./src/app/diary-write-cli.js && node --check ./src/app/reminder-write-cli.js && node --check ./src/app/system-send-cli.js && node --check ./src/app/system-checkin-poller.js && node --check ./src/app/timeline-event-cli.js && node --check ./src/app/timeline-screenshot-cli.js && node --check ./src/adapters/channel/weixin/index.js && node --check ./src/adapters/channel/weixin/legacy.js && node --check ./src/adapters/channel/weixin/api.js && node --check ./src/adapters/channel/weixin/api-v2.js && node --check ./src/adapters/channel/weixin/protocol.js && node --check ./src/adapters/channel/weixin/login-common.js && node --check ./src/adapters/channel/weixin/login-legacy.js && node --check ./src/adapters/channel/weixin/login-v2.js && node --check ./src/adapters/channel/weixin/account-store.js && node --check ./src/adapters/channel/weixin/context-token-store.js && node --check ./src/adapters/channel/weixin/message-utils.js && node --check ./src/adapters/channel/weixin/message-utils-v2.js && node --check ./src/adapters/channel/weixin/sync-buffer-store.js && node --check ./src/adapters/channel/weixin/media-mime.js && node --check ./src/adapters/channel/weixin/media-send.js && node --check ./src/adapters/channel/weixin/redact.js && node --check ./src/adapters/channel/weixin/reminder-queue-store.js && node --check ./src/adapters/runtime/codex/index.js && node --check ./src/adapters/runtime/codex/events.js && node --check ./src/adapters/runtime/codex/model-catalog.js && node --check ./src/adapters/runtime/codex/message-utils.js && node --check ./src/adapters/runtime/codex/rpc-client.js && node --check ./src/adapters/runtime/codex/session-store.js && node --check ./src/integrations/timeline/index.js && node --check ./scripts/shared-common.js && node --check ./scripts/shared-start.js && node --check ./scripts/shared-open.js && node --check ./scripts/shared-status.js && node --check ./scripts/shared-supervisor.js && node --check ./scripts/shared-watchdog.js"
79
+ },
80
+ "dependencies": {
81
+ "dotenv": "^16.4.7",
82
+ "qrcode-terminal": "0.12.0",
83
+ "timeline-for-agent": "github:WenXiaoWendy/timeline-for-agent#main",
84
+ "ws": "^8.19.0"
85
+ }
86
+ }