@leviyuan/lodestar 0.3.3 → 0.3.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 CHANGED
@@ -4,203 +4,134 @@
4
4
 
5
5
  # 夜航星 (Lodestar)
6
6
 
7
- AI 不是帮手,是倍率。它放大的不是体力,是你——你的直觉、判断和品味,每一样都被乘以一个你以前不敢想的系数。最终走多远,取决于被放大的你有多强。
7
+ > **你醒着它在听,你睡了它还在跑。**
8
8
 
9
- 夜航星让这件事真正发生:在你思考的地方接住想法,在你转身之后继续把它推向终点。**你醒着它在听,你睡了它还在跑。**
9
+ AI 不是帮手,是倍率。它放大的不是体力,是你 —— 你的直觉、判断和品味,每一样都被乘以一个你以前不敢想的系数。
10
10
 
11
- ## 你会得到什么
11
+ 夜航星让这件事真正发生:在你思考的地方接住想法,在你转身之后继续推向终点。
12
12
 
13
- - 🌊 **流式卡片**:token 级渲染同一张卡,不刷屏;assistant 段、工具调用、追问全收纳在一张卡的不同面板里
14
- - 🔧 **工具一格一面板**:折起概述、展开细节;连续 `Read` 自动合批一格;权限/审批就地三按钮
15
- - ❓ **结构化追问**:`AskUserQuestion` 选项行 + 自由文本回答 + 多题翻页
16
- - ⌨️ **连珠炮安全**:type-ahead 全收,排队进 ⏳ 反应,下一轮合并喂回模型,用 `<u>...</u>` 拆开独立消息
17
- - 📊 **footer 实时指标**:`✅ ⏱时长 · 📊上下文% · 💰本轮成本`
18
- - 📦 **`hi` 控制台**:跨群项目、上下文%、订阅额度一屏看完
19
- - 📎 **图文双向**:`[file: /abs/path]` 进、`[[send: /abs/path]]` 出
20
- - 📲 **关键时刻加急**:Ask / 审批 / done 走 `im:message.urgent` 锁屏推送,定时唤醒不打扰
21
- - 🛑 **`stop` 软打断**:取消当前 turn + 清队列,子进程保活
22
- - 🗂 **多项目并发**:一个 daemon 持 N 群 ↔ N session
23
- - 🔄 **自动 resume**:重启后上次活跃 session 全部 `--resume`,主动 `kill` 过的不吵醒
24
- - 🛡 **守护级稳定**:WS watchdog + 单 PID + alive marker
25
- - 📡 **HTTP 通知端点**:任意本机进程 `POST /notify` 把 markdown 推成卡片,info / warn / error 染色
26
- - ⏰ **定时任务**:让 Claude 自己定期跑一轮,每次 fire 起 fresh 子进程不累积上下文;silent 只推结果 / verbose 全 transcript 可切;hi 面板带删/切按钮
13
+ ---
27
14
 
28
- ## 怎么用
15
+ ## ✨ 你会得到什么
29
16
 
30
- 每个飞书群对应一个 Claude 会话。**群名 = `projects_root` 下的目录名**。新群第一次发消息时 daemon 自动 `mkdir -p` + `git init`,开新群 = 开新项目。
17
+ <table>
18
+ <tr>
19
+ <td width="50%" valign="top">
31
20
 
32
- 群里发任意文字,Claude 接管这一轮,流式打字机渲染在一张卡片里。下一句话开新一轮卡片。
21
+ **🌊 流式打字机**
33
22
 
34
- ### 控制指令
23
+ 同一张卡片 token 级渲染,不刷屏。
35
24
 
36
- 直接发这五个**裸词**(不要斜杠,大小写不敏感),daemon 拦截、不转发给 Claude:
25
+ </td>
26
+ <td width="50%" valign="top">
37
27
 
38
- | 指令 | 行为 |
39
- | --- | --- |
40
- | `hi` | 未运行时启动;运行中弹一张**状态卡片** |
41
- | `stop` | 软打断当前 turn + 清队列;子进程保活,排队中的消息打 ❌ |
42
- | `kill` | 优雅关闭 Claude 进程;`sessionId` 落盘,可 `restart` 接回 |
43
- | `restart` | 用上次 `sessionId` 重启(保留上下文);无进程时也能用 |
44
- | `clear` | 杀进程并开新 session(等价 `/clear`);无进程时无效 |
28
+ **🔧 工具调用一格一面板**
45
29
 
46
- ## 安装
30
+ 每步折叠、审批就地三按钮。
47
31
 
48
- Windows / macOS / Linux 通吃,只要 Node ≥ 18。
32
+ </td>
33
+ </tr>
34
+ <tr>
35
+ <td valign="top">
49
36
 
50
- ### 1. 装包
37
+ **💬 自然双向对话**
51
38
 
52
- ```bash
53
- npm i -g @leviyuan/lodestar
54
- ```
39
+ 它能反问、你能抢话,自动排队进下轮。
55
40
 
56
- `@anthropic-ai/claude-code` 是 peer dep,npm 7+ 自动连带装。装完 `lodestar-daemon` / `lodestar-setup` / `claude` 三个命令进 PATH。
41
+ </td>
42
+ <td valign="top">
57
43
 
58
- ### 2. 飞书自建应用
44
+ **📊 本轮成本一眼看清**
59
45
 
60
- 去[飞书开放平台](https://open.feishu.cn/app)→ 创建企业自建应用:
46
+ 时长 / 上下文 / 价钱卡底直显。
61
47
 
62
- 1. **添加机器人能力**:左侧"添加应用能力"→"机器人"→**添加**。
63
- 2. **开通权限**(权限管理 → 开通权限):
64
- - 消息:`im:message:send_as_bot` `im:message` `im:chat` `im:resource` `im:message.urgent` `im:message.group_msg`(敏感,需审批) `im:message.group_at_msg:readonly`
65
- - 卡片:`cardkit:card:read` `cardkit:card:write`
66
- 3. **订阅事件**(事件与回调,拆两个子页):
67
- - **事件配置**:订阅方式选**长连接** → 保存 → 添加 `im.message.receive_v1`
68
- - **回调配置**:订阅方式选**长连接** → 保存 → 添加 `card.action.trigger`
69
- 4. **发布版本**:顶部 **创建版本** → 滚到底 **保存** → 弹框 **发布**。**没发版收不到任何事件**。
70
- 5. **拿凭据**:`App ID`(`cli_xxx`)和 `App Secret`,下一步要用。
71
- 6. **拉机器人进群**:群设置 → 群机器人 → 添加 → 选你的应用。**群名 = `projects_root` 下的目录名**。
48
+ </td>
49
+ </tr>
50
+ <tr>
51
+ <td valign="top">
72
52
 
73
- ### 3. 跑配置向导
53
+ **📦 一张卡管所有项目**
74
54
 
75
- ```bash
76
- lodestar-setup
77
- ```
55
+ `hi` 跨群跨项目一屏总览。
78
56
 
79
- 四步走完即可:
57
+ </td>
58
+ <td valign="top">
80
59
 
81
- 1. **Claude CLI**:没装会自动 `npm i -g @anthropic-ai/claude-code`
82
- 2. **LLM 后端**(2 选 1):
83
- - **已配过**:claude.ai 订阅 / API key / 已设环境变量,直接用
84
- - **用 DeepSeek**(推荐,国内可用,人民币计费):粘 DeepSeek API key,向导写好 8 个 `ANTHROPIC_*` / `CLAUDE_CODE_*` 到 `[claude.env]` 节,daemon 拉起 claude 时自动注入,**不碰系统环境变量**
85
- 3. **Feishu 凭据**:粘上一步的 `App ID` / `App Secret`,向导调 `tenant_access_token` 端点验真,失败重输
86
- 4. **`projects_root`**(默认用户主目录),写盘后自动 detach 启动 daemon
60
+ **🛡 跑得稳、续得上**
87
61
 
88
- 配置写到:
89
- - Linux / macOS:`~/.config/lodestar/config.toml`
90
- - Windows:`%APPDATA%\Lodestar\config.toml`
62
+ 多项目并发、重启自动接回、关键时刻锁屏推送。
91
63
 
92
- ### 4. 7×24 守护(可选)
64
+ </td>
65
+ </tr>
66
+ </table>
93
67
 
94
- **Linux / macOS** 用 `systemd --user`(`ExecStart` 换成你 `which lodestar-daemon` 的路径):
68
+ ---
95
69
 
96
- ```ini
97
- [Unit]
98
- Description=Lodestar daemon
99
- After=network-online.target
70
+ ## 🚀 用起来
100
71
 
101
- [Service]
102
- Type=simple
103
- ExecStart=%h/.npm-global/bin/lodestar-daemon
104
- Restart=always
105
- RestartSec=3
72
+ 跨平台 (Windows / macOS / Linux),Node ≥ 18。
106
73
 
107
- [Install]
108
- WantedBy=default.target
109
- ```
74
+ **1. 装包**
110
75
 
111
76
  ```bash
112
- systemctl --user enable --now lodestar
113
- ```
114
-
115
- **Windows** 用 Task Scheduler 在登录时拉起 `lodestar-daemon`。
116
-
117
- 每次重启,上次还活着的 session 全部 `--resume` 自动复活;主动 `kill` 过的留在停机态。
118
-
119
- ### 配置文件
120
-
121
- 向导写出来的 TOML:
122
-
123
- ```toml
124
- [feishu]
125
- app_id = "cli_xxxxxxxxxxxxxxxx"
126
- app_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
127
-
128
- [runtime]
129
- projects_root = "/home/you"
130
-
131
- # 可选,daemon 拉起 claude 子进程时注入这些 env (DeepSeek / GLM / 任意 anthropic 兼容后端)
132
- [claude.env]
133
- ANTHROPIC_BASE_URL = "https://api.deepseek.com/anthropic"
134
- ANTHROPIC_AUTH_TOKEN = "sk-xxxxxxxx"
135
- # ... 选 DeepSeek 时向导自动填全 8 个变量
136
-
137
- # 可选,默认 127.0.0.1:9876
138
- [notify]
139
- bind = "127.0.0.1"
140
- port = 9876
77
+ npm i -g @leviyuan/lodestar
141
78
  ```
142
79
 
143
- 路径覆盖:`LODESTAR_CONFIG` / `LODESTAR_CONFIG_DIR` / `XDG_CONFIG_HOME` 都认。运行时状态在 Linux/Mac `~/.local/share/lodestar/` 或 Windows `%LOCALAPPDATA%\Lodestar\`(`LODESTAR_DATA_DIR` / `XDG_DATA_HOME` 可改) —— daemon.pid、daemon.log、session-chat-map、alive-marker、inbox/ 都在那里。
80
+ 装完得到 4 个命令:
144
81
 
145
- ## 通知端点(Notify)
82
+ | 命令 | 作用 |
83
+ | --- | --- |
84
+ | `lodestar-setup` | 首次配置向导 |
85
+ | `lodestar-daemon` | 启动 daemon |
86
+ | `lodestar-stop` | 停止 daemon |
87
+ | `lodestar-update` | 升级到最新版(含 Claude CLI)|
146
88
 
147
- 本机任何进程都能往群里推一张卡片 —— 不走 SDK、不走鉴权,daemon 启动时顺带跑一个 loopback HTTP listener,默认绑 `127.0.0.1:9876`。
89
+ **2. 跑向导**
148
90
 
149
91
  ```bash
150
- curl -fsS -X POST http://127.0.0.1:9876/notify \
151
- -H 'content-type: application/json' \
152
- -d '{"project":"feishu","text":"**build done** 12 files"}'
92
+ lodestar-setup
153
93
  ```
154
94
 
155
- | 字段 | 必需 | 说明 |
156
- | --- | --- | --- |
157
- | `project` | ✅ | 飞书群名(= session 名 = 项目目录名)|
158
- | `text` | ✅ | Feishu schema-2.0 markdown:`**bold**`、`` `code` ``、`[link](url)`、`<font color='red'>…</font>`;~30 KB 上限 |
159
- | `title` | | 卡片 header,默认等于 `project` |
160
- | `level` | | `info`(蓝,默认)/ `warn`(黄)/ `error`(红)|
95
+ 手把手带你装 claude、配 API、建飞书应用、启动 lodestar。
161
96
 
162
- 响应:`200 {ok, chat_id, message_id}` / `400` 参数错 / `404` 群没绑定过 / `502` 飞书 API 拒收。
97
+ **3. 拉机器人进群**
163
98
 
164
- > ⚠️ 群必须**至少有一条消息**触达过 daemon(WS 收到过),否则 404。新建群第一次发消息后即可用。
99
+ 群名 = `projects_root` 下的目录名(没建会自动建)。发条消息,Claude 接管。
165
100
 
166
- cron / systemd hook 用法:
101
+ 群里发这五个**裸词**(不要斜杠,大小写不敏感)可以控 daemon:
167
102
 
168
- ```cron
169
- 0 3 * * * /usr/local/bin/backup.sh \
170
- && curl -fsS -X POST http://127.0.0.1:9876/notify -H 'content-type: application/json' \
171
- -d '{"project":"ops","text":"✅ nightly backup OK"}' \
172
- || curl -fsS -X POST http://127.0.0.1:9876/notify -H 'content-type: application/json' \
173
- -d '{"project":"ops","level":"error","text":"❌ nightly backup FAILED"}'
174
- ```
103
+ | 指令 | 行为 |
104
+ | --- | --- |
105
+ | `hi` | 未运行时启动;运行中弹一张状态卡片 |
106
+ | `stop` | 软打断当前 turn,子进程保活,排队消息打 ❌ |
107
+ | `kill` | 优雅关闭 Claude 进程,`sessionId` 落盘 |
108
+ | `restart` | 用上次 `sessionId` 重启(保留上下文)|
109
+ | `clear` | 杀进程并开新 session(等价 `/clear`)|
175
110
 
176
- > 想让 Claude Code 自己说一句 "build 完通知我" 就推送 —— daemon 启动时**自动同步** `~/.claude/skills/feishu-notify/SKILL.md`,主端 Claude 立即就能用关键词触发(`LODESTAR_DISABLE_SKILL_SYNC=1` 关闭自动同步)。
111
+ ---
177
112
 
178
- ## 定时任务(Schedule)
113
+ ## 🎁 附加能力
179
114
 
180
- Claude **自己**定期跑一轮 —— 比上面 cron-curl 推卡片有用一个量级:每次 fire 起一个**全新的 Claude 子进程**(无 `--resume`、fresh `sessionId`、`bypassPermissions`、cwd = 项目目录),让它读最新的 git 状态 / 日志文件 / API,自己分析,然后把结果按你定义的格式贴回群里。
115
+ ### 🔔 HTTP 通知端点
181
116
 
182
- **怎么加**:在群里跟 Claude 说"以后每天早上 9 silent 给我总结昨天的 PR"就行 —— claude 会调 MCP 工具 `schedule_create` 落到 daemon 的 `schedules.json`。
117
+ 本机任何脚本一行 curl 就能往群里推一张 markdown 卡片(info / warn / error 三档染色):
183
118
 
184
- | 工具 | 用途 |
185
- | --- | --- |
186
- | `schedule_create` | cron 周期(标准 5 段 `m h dom mon dow`,支持 `*` `*/N` `a,b,c` `a-b`) |
187
- | `schedule_once` | 一次性延时(对齐内置 `ScheduleWakeup` 语义) |
188
- | `schedule_list` | 当前项目所有 schedule |
189
- | `schedule_delete` | 按 id 删除 |
119
+ ```bash
120
+ curl -X POST http://127.0.0.1:9876/notify \
121
+ -d '{"project":"xxx","text":"build done"}'
122
+ ```
190
123
 
191
- MCP 工具是 daemon spawn claude 时通过 `--mcp-config` 注入的 —— **不用碰 `~/.claude.json`**;每个群独立 URL path `/mcp/<project>` 钉死项目,跨群零泄漏。
124
+ ### 定时任务
192
125
 
193
- **两种 fire 输出**:
126
+ 在群里跟 Claude 说"每天早上 9 点总结昨天 PR",它自己排好。每次 fire 起一个干净的 Claude 子进程跑,不累上下文,silent / verbose 二选一,`hi` 面板带删/切按钮。
194
127
 
195
- | 模式 | 输出 | 适用 |
196
- | --- | --- | --- |
197
- | `silent`(默认) | 只把最终 assistant text 推一张 notify 风格卡 | 每日报告、状态摘要、不打扰 |
198
- | `verbose` | 完整 transcript:prompt 折叠 + assistant 段 + 工具调用 panel(input + output)+ 耗时/token footer | 偶尔检查任务跑得对不对 |
128
+ ---
199
129
 
200
- **`hi` 面板**:任意群发 `hi`,**⏰ 定时任务** 段列出 daemon 名下所有 schedule(跨项目全局 dashboard),每条带 `📁 项目` + `🔕silent` / `📜verbose` + 下次触发时间,展开看完整 prompt + cron + 上次触发,两个按钮 **切换 mode** / **🗑 删除** 走 `update_multi` 原地刷新当前卡。
130
+ > [!TIP]
131
+ > 想 7×24 长跑,用 `systemd --user`(Linux/macOS)或 Windows 任务计划程序拉起 `lodestar-daemon`。重启后上次活跃的 session 会自动 `--resume` 接回。
201
132
 
202
- **对比 SDK 自带的 `ScheduleWakeup` / `CronCreate`**:daemon 这一层补三件事 —— 持久化(daemon 重启不丢)、每次 fire 干净进程(不累积上下文)、跨项目可见(hi 面板)。
133
+ ---
203
134
 
204
- ## 许可
135
+ ## 📄 许可
205
136
 
206
137
  [MIT](LICENSE)
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{execSync as f}from"node:child_process";import{existsSync as U,readFileSync as y}from"node:fs";import{homedir as W}from"node:os";import{join as K}from"node:path";var X=W(),B=process.platform==="win32";function b(z,J,Y){if(z)return z;if(J)return K(J,"lodestar");return Y}function H(){if(B)return K(process.env.APPDATA??K(X,"AppData","Roaming"),"Lodestar");return K(X,".config","lodestar")}function V(){if(B)return K(process.env.LOCALAPPDATA??K(X,"AppData","Local"),"Lodestar");return K(X,".local","share","lodestar")}var w=b(process.env.LODESTAR_CONFIG_DIR,process.env.XDG_CONFIG_HOME,H()),Q=b(process.env.LODESTAR_DATA_DIR,process.env.XDG_DATA_HOME,V()),O=process.env.LODESTAR_CONFIG??K(w,"config.toml"),Z=K(Q,"daemon.pid"),g=K(Q,"daemon.log"),x=K(Q,"session-chat-map.json"),S=K(Q,"session-resume-map.json"),E=K(Q,"schedules.json"),v=K(Q,"alive-on-shutdown.json"),h=K(Q,"inbox"),k=K(Q,"debug.sock"),A=K(Q,"debug-context.json");import{execSync as G}from"node:child_process";import{readFileSync as L,writeFileSync as C}from"node:fs";function M(z){try{if(process.platform==="linux")return L(`/proc/${z}/cmdline`,"utf8").replace(/\0/g," ").trim();if(process.platform==="darwin")return G(`ps -p ${z} -o args=`,{encoding:"utf8",timeout:2000}).trim();if(process.platform==="win32")return G(`powershell -NoProfile -Command "(Get-CimInstance Win32_Process -Filter 'ProcessId=${z}').CommandLine"`,{encoding:"utf8",timeout:5000}).trim()||null;return null}catch{return null}}function N(z,J){if(!Number.isFinite(z)||z<=0||!J)return!1;let Y=M(z);if(!Y)return!1;if(process.platform==="win32")return Y.toLowerCase().includes(J.toLowerCase());return Y.includes(J)}var q={reset:"\x1B[0m",bold:"\x1B[1m",green:"\x1B[32m",yellow:"\x1B[33m",red:"\x1B[31m",dim:"\x1B[2m"};function P(z){return new Promise((J)=>setTimeout(J,z))}async function R(){if(!U(Z)){console.log(`${q.yellow}Lodestar daemon 未运行${q.reset} ${q.dim}(${Z} 不存在)${q.reset}`);return}let z=y(Z,"utf8").split(`
3
+ `),J=parseInt((z[0]??"").trim(),10),Y=(z[1]??"").trim();if(!Number.isFinite(J)||J<=0)console.error(`${q.red}PID 文件格式坏:${q.reset} ${Z}`),process.exit(1);if(Y&&!N(J,Y)){console.log(`${q.yellow}PID ${J} 上没有 daemon (stale 文件)${q.reset}`),console.log(`${q.dim}手删 ${Z} 后再试${q.reset}`);return}console.log(`${q.bold}停止 daemon${q.reset} (pid ${J})...`);try{if(process.platform==="win32")f(`taskkill /PID ${J} /T /F`,{stdio:"ignore"});else process.kill(J,"SIGTERM")}catch($){console.error(`${q.red}发信号失败:${q.reset} ${$?.message??$}`),process.exit(1)}for(let $=0;$<50;$++){if(!U(Z)){console.log(`${q.green}✓ daemon 已停${q.reset}`);return}await P(100)}console.log(`${q.yellow}已发 SIGTERM, 但 5s 内 daemon 没清掉 ${Z}${q.reset}`),console.log(`${q.dim}它可能还在收尾 (落盘 alive marker / 关 WS); 下次启动 pid-guard 会自动判别。${q.reset}`)}R().catch((z)=>{console.error(`${q.red}lodestar-stop:${q.reset} ${z?.message??z}`),process.exit(1)});
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import{spawn as b}from"node:child_process";import{existsSync as g}from"node:fs";import{homedir as p}from"node:os";import{join as e}from"node:path";var m=p(),a=process.platform==="win32";function $(o,t,r){if(o)return o;if(t)return e(t,"lodestar");return r}function d(){if(a)return e(process.env.APPDATA??e(m,"AppData","Roaming"),"Lodestar");return e(m,".config","lodestar")}function y(){if(a)return e(process.env.LOCALAPPDATA??e(m,"AppData","Local"),"Lodestar");return e(m,".local","share","lodestar")}var u=$(process.env.LODESTAR_CONFIG_DIR,process.env.XDG_CONFIG_HOME,d()),l=$(process.env.LODESTAR_DATA_DIR,process.env.XDG_DATA_HOME,y()),P=process.env.LODESTAR_CONFIG??e(u,"config.toml"),n=e(l,"daemon.pid"),C=e(l,"daemon.log"),q=e(l,"session-chat-map.json"),z=e(l,"session-resume-map.json"),J=e(l,"schedules.json"),K=e(l,"alive-on-shutdown.json"),Q=e(l,"inbox"),S=e(l,"debug.sock"),Y=e(l,"debug-context.json");var s={reset:"\x1B[0m",bold:"\x1B[1m",cyan:"\x1B[36m",green:"\x1B[32m",yellow:"\x1B[33m",red:"\x1B[31m",dim:"\x1B[2m"};function w(){let o=process.platform==="win32"?"npm.cmd":"npm";return new Promise((t)=>{let r=b(o,["install","-g","@leviyuan/lodestar@latest","@anthropic-ai/claude-code@latest"],{stdio:"inherit",shell:process.platform==="win32"});r.on("exit",(c)=>t(c??1)),r.on("error",(c)=>{console.error(`${s.red}spawn npm 失败:${s.reset} ${c.message}`),t(1)})})}async function x(){console.log(`${s.bold}更新 Lodestar + Claude Code${s.reset}`),console.log(`${s.dim}npm i -g @leviyuan/lodestar@latest @anthropic-ai/claude-code@latest${s.reset}
3
+ `);let o=await w();if(o!==0)console.error(`
4
+ ${s.red}更新失败 (npm exit ${o})${s.reset}`),process.exit(o);if(console.log(`
5
+ ${s.green}✓ 更新完成${s.reset}`),g(n))console.log(),console.log(`${s.yellow}检测到 daemon 仍在跑老版本进程, 用新版本需要重启:${s.reset}`),console.log(` ${s.dim}# systemd / Task Scheduler 托管的:${s.reset}`),console.log(` ${s.cyan}systemctl --user restart lodestar${s.reset} ${s.dim}# Linux/macOS${s.reset}`),console.log(` ${s.dim}# 或手动重启:${s.reset}`),console.log(` ${s.cyan}lodestar-stop && lodestar-daemon${s.reset}`)}x().catch((o)=>{console.error(`${s.red}lodestar-update:${s.reset} ${o?.message??o}`),process.exit(1)});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leviyuan/lodestar",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -31,13 +31,17 @@
31
31
  "start": "bun daemon.ts",
32
32
  "build:daemon": "bun build cli.ts --target=node --minify --banner='#!/usr/bin/env node' --outfile=dist/lodestar.js",
33
33
  "build:setup": "bun build src/setup-cli.ts --target=node --minify --banner='#!/usr/bin/env node' --outfile=dist/lodestar-setup.js",
34
- "build": "bun run build:daemon && bun run build:setup",
34
+ "build:stop": "bun build src/stop-cli.ts --target=node --minify --banner='#!/usr/bin/env node' --outfile=dist/lodestar-stop.js",
35
+ "build:update": "bun build src/update-cli.ts --target=node --minify --banner='#!/usr/bin/env node' --outfile=dist/lodestar-update.js",
36
+ "build": "bun run build:daemon && bun run build:setup && bun run build:stop && bun run build:update",
35
37
  "prepublishOnly": "bun run build",
36
38
  "postinstall": "node scripts/postinstall.cjs"
37
39
  },
38
40
  "bin": {
39
41
  "lodestar-daemon": "./dist/lodestar.js",
40
- "lodestar-setup": "./dist/lodestar-setup.js"
42
+ "lodestar-setup": "./dist/lodestar-setup.js",
43
+ "lodestar-stop": "./dist/lodestar-stop.js",
44
+ "lodestar-update": "./dist/lodestar-update.js"
41
45
  },
42
46
  "files": [
43
47
  "dist/",