hinacode 0.1.0-alpha.12 → 0.1.0-alpha.14

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.
@@ -1,16 +1,17 @@
1
- import { mkdirSync, readlinkSync, writeFileSync, readFileSync, rmSync } from "node:fs";
1
+ import { mkdirSync, existsSync, readlinkSync, writeFileSync, readFileSync, rmSync } from "node:fs";
2
2
  import { createRequire } from "node:module";
3
3
  import { homedir, hostname } from "node:os";
4
- import { join } from "node:path";
5
- import { s as serveConfig, h as hydratePath, m as make, a as makeAppLayer, b as succeed, u as unsupported, U as Updates, n as noKeyring, R as RemoteAccess, p as pairingUrl, v as void_ } from "./chunks/shellPath-_2pyKB3Q.js";
4
+ import { dirname, delimiter, basename, join } from "node:path";
5
+ import { fileURLToPath } from "node:url";
6
+ import QRCode from "qrcode";
7
+ import { S as Struct, e as effect, U as Updates, g as gen, u as unsupported, E as Events, t as tryPromise, d as decodeUnknownSync, m as make$1, s as suspend, r as repeat, a as spaced, f as forkScoped, T as Threads, W as Worktrees, b as Terminals, c as forEach, o as orElseSucceed, h as sync, i as isThreadBusy, j as String$1, v as void_, k as andThen, l as matchEffect, n as forkDetach, p as flatMap, q as UsageError, w as USAGE, x as parseCommand, y as serveConfig, z as hydratePath, A as make$2, B as makeAppLayer, C as autoUpdate, D as layer$1, F as provideMerge, G as mergeAll, H as layer$2, I as layer$3, J as provide, K as noKeyring, L as layer$4, M as succeed, N as MinimumLogLevel, O as Settings, R as RemoteAccess, P as pairingUrl, Q as isPortInUse, V as restartCommand } from "./chunks/shellPath-BAeR7gJe.js";
8
+ import { execFile } from "node:child_process";
9
+ import { promisify } from "node:util";
6
10
  import "node:crypto";
7
- import "node:url";
8
11
  import "node:stream";
9
12
  import "node:readline";
10
- import "node:child_process";
11
13
  import "node:fs/promises";
12
14
  import "@anthropic-ai/claude-agent-sdk";
13
- import "node:util";
14
15
  import "@modelcontextprotocol/sdk/client/streamableHttp.js";
15
16
  import "@modelcontextprotocol/sdk/types.js";
16
17
  import "@muse-code/sdk";
@@ -22,13 +23,100 @@ import "node:zlib";
22
23
  import "ws";
23
24
  import "node:net";
24
25
  import "node:tls";
25
- const USAGE = `Usage: hinacode serve [--port <n>] [--host <host>] [--rotate-token]
26
-
27
- Runs a HinaCode cloud: agents, worktrees and threads on this machine, driven from the
28
- desktop or phone app. Data lives in HINACODE_USER_DATA, default ~/.hinacode-cloud.`;
26
+ const execFileAsync = promisify(execFile);
27
+ const CHECK_INTERVAL = "4 hours";
28
+ const AUTO_INSTALL_INTERVAL = "1 minute";
29
+ const INSTALL_TIMEOUT_MS = 10 * 6e4;
30
+ const NpmRelease = Struct({ version: String$1 });
31
+ const globalPrefix = (packageRoot2) => {
32
+ const nodeModules = dirname(packageRoot2);
33
+ const lib = dirname(nodeModules);
34
+ const isGlobal = basename(packageRoot2) === "hinacode" && basename(nodeModules) === "node_modules";
35
+ return isGlobal && basename(lib) === "lib" ? dirname(lib) : void 0;
36
+ };
37
+ const isIdle = (cloud) => cloud.terminals.every((terminal) => terminal.status !== "running") && cloud.threads.every((thread) => !isThreadBusy(thread.status) && thread.queue.length === 0) && cloud.worktrees.every((worktree) => worktree.status !== "preparing");
38
+ const make = ({ current, packageRoot: packageRoot2, registry, restart, autoInstall }) => gen(function* () {
39
+ const prefix = globalPrefix(packageRoot2);
40
+ if (prefix === void 0 || process.platform === "win32") return unsupported(current);
41
+ const events = yield* Events;
42
+ let state = { type: "idle" };
43
+ const set = (next) => suspend(() => {
44
+ state = next;
45
+ return events.publish({ type: "update.changed" });
46
+ });
47
+ const latest = tryPromise(async () => {
48
+ const response = await fetch(`${registry.replace(/\/$/, "")}/hinacode/latest`, {
49
+ signal: AbortSignal.timeout(1e4)
50
+ });
51
+ if (!response.ok) throw new Error(`npm answered ${response.status}`);
52
+ return decodeUnknownSync(NpmRelease)(await response.json()).version;
53
+ });
54
+ const checkLock = yield* make$1(1);
55
+ const check = suspend(
56
+ () => state.type === "downloading" ? void_ : set({ type: "checking" }).pipe(
57
+ andThen(latest),
58
+ matchEffect({
59
+ onFailure: (error) => set({ type: "failed", message: `Could not check for updates: ${error.message}` }),
60
+ onSuccess: (version2) => set(version2 === current ? { type: "upToDate" } : { type: "ready", version: version2 })
61
+ })
62
+ )
63
+ ).pipe(checkLock.withPermit);
64
+ const npmEnv = { ...process.env, PATH: [dirname(process.execPath), process.env["PATH"]].join(delimiter) };
65
+ const npmInstall = (version2) => tryPromise({
66
+ try: () => execFileAsync(
67
+ "npm",
68
+ [
69
+ "install",
70
+ "--global",
71
+ `--prefix=${prefix}`,
72
+ `--registry=${registry}`,
73
+ // npm 11 skips install scripts it was not told to run, and node-pty's picks its prebuilt binary.
74
+ "--allow-scripts=node-pty",
75
+ `hinacode@${version2}`
76
+ ],
77
+ { env: npmEnv, encoding: "utf8", timeout: INSTALL_TIMEOUT_MS }
78
+ ),
79
+ catch: (cause) => new Error(cause.stderr?.trim().split("\n").slice(-3).join("\n") || String(cause))
80
+ });
81
+ const install = suspend(() => {
82
+ if (state.type !== "ready") return void_;
83
+ const { version: version2 } = state;
84
+ return set({ type: "downloading", version: version2 }).pipe(
85
+ andThen(
86
+ npmInstall(version2).pipe(
87
+ matchEffect({
88
+ onFailure: (error) => set({ type: "failed", message: error.message }),
89
+ onSuccess: () => sync(restart)
90
+ }),
91
+ // The caller's rpc returns now; the cloud restarts once npm finishes.
92
+ forkDetach
93
+ )
94
+ )
95
+ );
96
+ });
97
+ yield* repeat(check, spaced(CHECK_INTERVAL)).pipe(forkScoped);
98
+ const [threads, worktrees, terminals] = [yield* Threads, yield* Worktrees, yield* Terminals];
99
+ const idle = gen(function* () {
100
+ const list = yield* threads.list;
101
+ const sessions = yield* forEach(list, (thread) => terminals.list(thread.id));
102
+ return isIdle({ threads: list, worktrees: yield* worktrees.list, terminals: sessions.flat() });
103
+ }).pipe(orElseSucceed(() => false));
104
+ const installWhenIdle = suspend(
105
+ () => state.type === "ready" ? flatMap(idle, (yes) => yes ? install : void_) : void_
106
+ );
107
+ if (autoInstall)
108
+ yield* repeat(installWhenIdle, spaced(AUTO_INSTALL_INTERVAL)).pipe(forkScoped);
109
+ return Updates.of({
110
+ status: sync(() => ({ current, state })),
111
+ check,
112
+ install
113
+ });
114
+ });
115
+ const layer = (options) => effect(Updates, make(options));
29
116
  const QUIT_TIMEOUT_MS = 5e3;
30
117
  const LISTEN_TIMEOUT_MS = 5e3;
31
118
  const { version } = createRequire(import.meta.url)("../../package.json");
119
+ const packageRoot = fileURLToPath(new URL("../..", import.meta.url));
32
120
  const appData = () => process.platform === "darwin" ? join(homedir(), "Library", "Application Support") : process.platform === "win32" ? process.env["APPDATA"] ?? join(homedir(), "AppData", "Roaming") : process.env["XDG_CONFIG_HOME"] ?? join(homedir(), ".config");
33
121
  const isAlive = (pid) => {
34
122
  try {
@@ -56,72 +144,126 @@ const lockDataDir = (dir) => {
56
144
  } catch (error) {
57
145
  if (error.code !== "EEXIST") throw error;
58
146
  const pid = Number(readFileSync(path, "utf8"));
147
+ if (pid === process.pid) break;
59
148
  if (isAlive(pid)) throw new Error(`another hinacode serve (pid ${pid}) uses ${dir}`, { cause: error });
60
149
  rmSync(path, { force: true });
61
150
  }
62
151
  }
63
152
  process.on("exit", () => rmSync(path, { force: true }));
64
153
  };
65
- const printPairing = async (runtime, userData) => {
154
+ const pairingText = async (userData, pairing) => {
155
+ const phoneUrl = pairingUrl(pairing);
156
+ const qr = await QRCode.toString(phoneUrl, { type: "terminal", small: true });
157
+ return [
158
+ `HinaCode cloud ${version}`,
159
+ `data: ${userData}`,
160
+ "",
161
+ "Pair a phone: scan this code in the HinaCode app, or paste the URL.",
162
+ ` ${phoneUrl}`,
163
+ qr,
164
+ "Pair a desktop: Settings > Environments > Add environment, with one of:",
165
+ ...pairing.hosts.map((host) => ` ${pairingUrl({ ...pairing, hosts: [host] })}`),
166
+ "Keep the token in these URLs private. Run `hinacode pair` to print them again.",
167
+ ""
168
+ ].join("\n");
169
+ };
170
+ const listening = async (runtime) => {
66
171
  const deadline = Date.now() + LISTEN_TIMEOUT_MS;
67
172
  for (; ; ) {
68
173
  const status = await runtime.runPromise(RemoteAccess.use((remote) => remote.status));
69
174
  if (status.listening) break;
70
- if (status.listenError) throw new Error(`remote listener failed: ${status.listenError}`);
175
+ if (status.listenError !== null && isPortInUse(status.listenError)) {
176
+ const { port } = (await runtime.runPromise(Settings.use((settings) => settings.get))).remote;
177
+ throw new Error(
178
+ `port ${port} is in use, perhaps by the HinaCode desktop's Remote or another cloud. Pick another with --port <n>.`
179
+ );
180
+ }
181
+ if (status.listenError !== null) throw new Error(`remote listener failed: ${status.listenError}`);
71
182
  if (Date.now() > deadline) throw new Error("remote listener did not start in time");
72
183
  await new Promise((resolve) => setTimeout(resolve, 50));
73
184
  }
74
- const pairing = await runtime.runPromise(RemoteAccess.use((remote) => remote.pairing));
75
- const lines = [
76
- `HinaCode cloud ${version}`,
77
- `data: ${userData}`,
78
- "pair a phone with:",
79
- ` ${pairingUrl(pairing)}`,
80
- "pair a desktop with one of:",
81
- ...pairing.hosts.map((host) => ` ${pairingUrl({ ...pairing, hosts: [host] })}`)
82
- ];
83
- process.stdout.write(`${lines.join("\n")}
84
- `);
185
+ return runtime.runPromise(RemoteAccess.use((remote) => remote.pairing));
85
186
  };
86
- const main = async (argv) => {
87
- const [command] = argv;
88
- if (command === "--version") return void process.stdout.write(`${version}
89
- `);
90
- if (command !== "serve") {
91
- process.stderr.write(`${USAGE}
92
- `);
93
- return void (process.exitCode = command === "--help" || command === "-h" ? 0 : 1);
94
- }
95
- const serve = serveConfig(argv, process.env);
96
- const userData = process.env["HINACODE_USER_DATA"] || join(homedir(), ".hinacode-cloud");
187
+ const serve = async (argv, userData) => {
188
+ const config = serveConfig(argv, process.env);
97
189
  mkdirSync(userData, { recursive: true, mode: 448 });
98
190
  lockDataDir(userData);
99
191
  await hydratePath(process.env);
100
- const runtime = make(
192
+ const runtime = make$2(
101
193
  makeAppLayer({
102
194
  userData,
103
195
  sbxConfigPath: join(appData(), "sbx", "config.json"),
104
196
  keyring: noKeyring,
105
- updates: succeed(Updates, unsupported(version)),
197
+ updates: layer({
198
+ current: version,
199
+ packageRoot,
200
+ registry: process.env["npm_config_registry"] || "https://registry.npmjs.org",
201
+ autoInstall: autoUpdate(process.env),
202
+ restart: () => stop(() => {
203
+ const { file, args, env } = restartCommand(process);
204
+ process.execve(file, args, env);
205
+ })
206
+ }),
106
207
  toWindows: () => {
107
208
  },
108
- serve
209
+ serve: config
109
210
  })
110
211
  );
111
212
  let stopping = false;
112
- const stop = () => {
213
+ const stop = (then) => {
113
214
  if (stopping) return;
114
215
  stopping = true;
115
216
  const disposal = runtime.dispose().catch((cause) => console.error("runtime dispose failed", cause));
116
217
  const timeout = new Promise((resolve) => setTimeout(resolve, QUIT_TIMEOUT_MS));
117
- void Promise.race([disposal, timeout]).then(() => process.exit(0));
218
+ void Promise.race([disposal, timeout]).then(then);
118
219
  };
119
- process.on("SIGINT", stop);
120
- process.on("SIGTERM", stop);
220
+ const quit = () => stop(() => process.exit(0));
221
+ process.on("SIGINT", quit);
222
+ process.on("SIGTERM", quit);
121
223
  await runtime.runPromise(void_);
122
- await printPairing(runtime, userData);
224
+ process.stdout.write(await pairingText(userData, await listening(runtime)));
225
+ };
226
+ const pair = async (userData) => {
227
+ const database = join(userData, "hinacode.sqlite");
228
+ const noCloud = () => {
229
+ process.stderr.write(`No cloud in ${userData} yet. Start one with \`hinacode serve\`.
230
+ `);
231
+ process.exitCode = 1;
232
+ };
233
+ if (!existsSync(database)) return noCloud();
234
+ const runtime = make$2(
235
+ layer$1.pipe(
236
+ provideMerge(mergeAll(layer$3, layer$2)),
237
+ provide(mergeAll(layer$4(database), noKeyring)),
238
+ provide(succeed(MinimumLogLevel, "Warn"))
239
+ )
240
+ );
241
+ try {
242
+ const { remote } = await runtime.runPromise(Settings.use((settings) => settings.get));
243
+ if (!remote.enabled) return noCloud();
244
+ const pairing = await runtime.runPromise(RemoteAccess.use((access) => access.pairing));
245
+ process.stdout.write(await pairingText(userData, pairing));
246
+ } finally {
247
+ await runtime.dispose();
248
+ }
249
+ };
250
+ const main = async (argv) => {
251
+ const command = parseCommand(argv);
252
+ if (command === "help") return void process.stdout.write(`${USAGE}
253
+ `);
254
+ if (command === "version") return void process.stdout.write(`${version}
255
+ `);
256
+ const userData = process.env["HINACODE_USER_DATA"] || join(homedir(), ".hinacode-cloud");
257
+ return command === "serve" ? serve(argv, userData) : pair(userData);
123
258
  };
124
259
  main(process.argv.slice(2)).catch((error) => {
125
- console.error(`hinacode serve: ${error instanceof Error ? error.message : String(error)}`);
260
+ if (error instanceof UsageError) {
261
+ process.stderr.write(`hinacode: ${error.message}
262
+
263
+ ${USAGE}
264
+ `);
265
+ } else {
266
+ console.error(`hinacode ${process.argv[2]}: ${error instanceof Error ? error.message : String(error)}`);
267
+ }
126
268
  process.exit(1);
127
269
  });
package/out/main/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { existsSync, renameSync } from "node:fs";
2
2
  import { join, delimiter } from "node:path";
3
3
  import { pathToFileURL } from "node:url";
4
- import { Notification, nativeImage, BrowserWindow, ipcMain, app, dialog, shell, protocol, safeStorage, Menu, net, session } from "electron";
5
- import { c as sync, d as catchDefect, e as succeed, f as callback, t as timeoutOrElse, g as seconds, T as TaggedError, S as String$1, i as promise, j as tryPromise, k as Struct, o as optional, l as RpcCall, q as decodeUnknownOption, E as EVENT_CHANNEL, r as RPC_CHANNEL, w as isTrustedSender, x as gen, y as getOrUndefined, z as dispatch, A as Environments, B as flatMap, C as catch_, D as all$1, F as map, G as decodeUnknownEffect, H as RpcMethods, I as inlineSource, u as unsupported, J as Events, K as runFork, L as logWarning, M as repeat, N as spaced, O as forkScoped, U as Updates, P as suspend, Q as effect, v as void_, V as ignore, h as hydratePath, W as ATTACHMENT_PROTOCOL, X as GITHUB_ASSET_PROTOCOL, Y as PROJECT_FILE_PROTOCOL, b as succeed$1, Z as Keyring, m as make$1, a as makeAppLayer, _ as isInside, $ as githubAssetId, a0 as GitHub, a1 as externalUrl, a2 as projectFileRequest, a3 as Files, a4 as BROWSER_PARTITION, a5 as lockDownWebview, a6 as isAllowedNavigation } from "./chunks/shellPath-_2pyKB3Q.js";
4
+ import { Notification, nativeImage, BrowserWindow, ipcMain, app, dialog, shell, protocol, safeStorage, powerMonitor, Menu, net, session } from "electron";
5
+ import { h as sync, X as catchDefect, Y as succeed, Z as callback, _ as timeoutOrElse, $ as seconds, a0 as TaggedError, j as String$1, a1 as promise, t as tryPromise, S as Struct, a2 as optional, a3 as RpcCall, a4 as decodeUnknownOption, a5 as EVENT_CHANNEL, a6 as RPC_CHANNEL, a7 as isTrustedSender, g as gen, a8 as getOrUndefined, a9 as dispatch, aa as Environments, p as flatMap, ab as catch_, ac as all$1, ad as map, ae as decodeUnknownEffect, af as RpcMethods, ag as inlineSource, u as unsupported, E as Events, ah as runFork, ai as logWarning, r as repeat, a as spaced, f as forkScoped, U as Updates, s as suspend, e as effect, v as void_, aj as ignore, z as hydratePath, ak as ATTACHMENT_PROTOCOL, al as GITHUB_ASSET_PROTOCOL, am as PROJECT_FILE_PROTOCOL, M as succeed$1, an as Keyring, A as make$1, B as makeAppLayer, ao as isInside, ap as githubAssetId, aq as GitHub, ar as externalUrl, as as projectFileRequest, at as Files, au as BROWSER_PARTITION, av as lockDownWebview, aw as isAllowedNavigation } from "./chunks/shellPath-BAeR7gJe.js";
6
6
  import { createRequire } from "node:module";
7
7
  import { execFile, spawn } from "node:child_process";
8
8
  import { access } from "node:fs/promises";
9
9
  import { homedir } from "node:os";
10
+ import { randomUUID } from "node:crypto";
10
11
  import updater from "electron-updater";
11
12
  import { join as join$1 } from "path";
12
- import "node:crypto";
13
13
  import "node:stream";
14
14
  import "node:readline";
15
15
  import "@anthropic-ai/claude-agent-sdk";
@@ -47,15 +47,17 @@ const routes = {
47
47
  "environments.list": client,
48
48
  "environments.add": client,
49
49
  "environments.remove": client,
50
- "updates.status": client,
51
- "updates.check": client,
52
- "updates.install": client,
50
+ "environments.reconnect": client,
51
+ "updates.status": named,
52
+ "updates.check": named,
53
+ "updates.install": named,
53
54
  "agents.updates": client,
54
55
  "agents.update": client,
55
56
  "links.favicon": client,
56
57
  "projects.list": all,
57
58
  "threads.list": all,
58
59
  "worktrees.list": all,
60
+ "worktrees.checkouts": all,
59
61
  "pullRequests.all": all,
60
62
  "limits.list": named,
61
63
  "search.threads": all,
@@ -73,6 +75,9 @@ const routes = {
73
75
  "github.auth": named,
74
76
  "github.pullRequest": named,
75
77
  "github.pullRequestDetail": named,
78
+ "github.pullRequestFiles": named,
79
+ "pullRequestGuides.get": named,
80
+ "pullRequestGuides.retry": named,
76
81
  "github.merge": named,
77
82
  "github.close": named,
78
83
  "vm.host": named,
@@ -89,6 +94,7 @@ const routes = {
89
94
  "projects.defaultBranch": project,
90
95
  "projects.branches": project,
91
96
  "projects.pullRequests": project,
97
+ "projects.searchPullRequests": project,
92
98
  "projects.fetch": project,
93
99
  "projects.icon": project,
94
100
  "threads.create": owner("project", "projectId"),
@@ -241,7 +247,8 @@ const launch = (location, path) => new Promise((resolve, reject) => {
241
247
  execFile("open", ["-a", location, path], (error) => error ? reject(error) : resolve());
242
248
  return;
243
249
  }
244
- const child = process.platform === "win32" ? spawn(`"${location}"`, [`"${path}"`], { detached: true, stdio: "ignore", shell: true }) : spawn(location, [path], { detached: true, stdio: "ignore" });
250
+ const env = { ...process.env, HINACODE_INSTANCE: void 0 };
251
+ const child = process.platform === "win32" ? spawn(`"${location}"`, [`"${path}"`], { detached: true, stdio: "ignore", shell: true, env }) : spawn(location, [path], { detached: true, stdio: "ignore", env });
245
252
  child.once("error", reject);
246
253
  child.once("spawn", () => {
247
254
  child.unref();
@@ -328,6 +335,18 @@ const registerIpc = (runtime, appUrl2) => {
328
335
  const sendToWindows = (encoded) => {
329
336
  for (const window of BrowserWindow.getAllWindows()) window.webContents.send(EVENT_CHANNEL, encoded);
330
337
  };
338
+ const binary = join(import.meta.dirname, "../../tools/resource-monitor/bin/resource-monitor");
339
+ const startResourceMonitor = (userData) => {
340
+ if (!existsSync(binary)) return;
341
+ const instance = randomUUID();
342
+ process.env["HINACODE_INSTANCE"] = instance;
343
+ const log = join(userData, "resource-monitor", `${(/* @__PURE__ */ new Date()).toISOString().replaceAll(":", "-")}.ndjson`);
344
+ spawn(binary, ["watch", "-root", String(process.pid), "-instance", instance, "-out", log], {
345
+ detached: true,
346
+ stdio: ["ignore", "ignore", "inherit"]
347
+ }).on("error", (error) => console.error(`Resource monitor did not start: ${error.message}`)).unref();
348
+ console.log(`Resource monitor log: ${log}`);
349
+ };
331
350
  const CHECK_INTERVAL = "4 hours";
332
351
  const make = gen(function* () {
333
352
  const current = app.getVersion();
@@ -370,6 +389,7 @@ if (!app.requestSingleInstanceLock()) {
370
389
  console.error(`HinaCode is already running on ${app.getPath("userData")}. Set HINACODE_USER_DATA to run another.`);
371
390
  app.exit(0);
372
391
  }
392
+ if (!app.isPackaged) startResourceMonitor(app.getPath("userData"));
373
393
  const pathHydrated = hydratePath(process.env);
374
394
  protocol.registerSchemesAsPrivileged([
375
395
  { scheme: ATTACHMENT_PROTOCOL, privileges: { standard: true, secure: true } },
@@ -545,6 +565,10 @@ app.whenReady().then(async () => {
545
565
  void Promise.race([disposal, timeout]).then(() => app.quit());
546
566
  });
547
567
  registerIpc(runtime, appUrl);
568
+ powerMonitor.on(
569
+ "resume",
570
+ () => runtime.runFork(flatMap(Environments, (environments) => environments.reconnectAll))
571
+ );
548
572
  app.dock?.setIcon(icon);
549
573
  if (process.platform === "darwin") setMacMenu();
550
574
  serveAttachments(runtime, join(userData, "attachments"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hinacode",
3
- "version": "0.1.0-alpha.12",
3
+ "version": "0.1.0-alpha.14",
4
4
  "description": "Run coding agents on this machine and drive them from the HinaCode desktop or phone app",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -17,7 +17,7 @@
17
17
  "type": "module",
18
18
  "main": "./out/main/index.js",
19
19
  "scripts": {
20
- "dev": "node scripts/dev-app-identity.mjs && electron-vite dev",
20
+ "dev": "node scripts/dev-app-identity.mjs && node scripts/build-resource-monitor.mjs && electron-vite dev",
21
21
  "dev:markdown": "HINACODE_MOCK_CLAUDE=markdown HINACODE_USER_DATA=/tmp/kk-markdown pnpm dev",
22
22
  "build": "electron-vite build",
23
23
  "preview": "electron-vite preview",
@@ -29,6 +29,7 @@
29
29
  "lint": "oxlint",
30
30
  "check:specs": "node scripts/tlc.mjs",
31
31
  "chart:thread": "node scripts/thread-chart.mjs",
32
+ "resource-monitor": "tools/resource-monitor/bin/resource-monitor",
32
33
  "format": "oxfmt",
33
34
  "test": "vitest run",
34
35
  "test:unit": "vitest run --project unit",
@@ -67,6 +68,7 @@
67
68
  "@novnc/novnc": "1.7.0",
68
69
  "@pierre/diffs": "1.5.2",
69
70
  "@playwright/test": "1.64.0",
71
+ "@pulls.review/core": "0.3.4",
70
72
  "@tailwindcss/vite": "4.3.3",
71
73
  "@tanstack/react-hotkeys": "0.13.0",
72
74
  "@tanstack/react-router": "1.170.42",
@@ -78,9 +80,10 @@
78
80
  "@vitejs/plugin-react": "5.2.0",
79
81
  "@wterm/dom": "0.5.4",
80
82
  "@wterm/ghostty": "0.5.4",
83
+ "babel-plugin-react-compiler": "1.0.0",
81
84
  "class-variance-authority": "^0.7.1",
82
85
  "cn": "^0.4.0",
83
- "electron": "44.7.0",
86
+ "electron": "44.9.3",
84
87
  "electron-builder": "26.17.0",
85
88
  "electron-vite": "5.0.0",
86
89
  "fuzzysort": "4.0.2",
@@ -106,7 +109,7 @@
106
109
  "zustand": "5.0.15"
107
110
  },
108
111
  "engines": {
109
- "node": ">=24"
112
+ "node": "^24.22.1 || >=26.12.1"
110
113
  },
111
114
  "packageManager": "pnpm@12.10.1"
112
115
  }