claude-yes 1.72.0 → 1.72.2
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.
|
@@ -815,7 +815,7 @@ function tryCatch(catchFn, fn) {
|
|
|
815
815
|
//#endregion
|
|
816
816
|
//#region package.json
|
|
817
817
|
var name = "agent-yes";
|
|
818
|
-
var version = "1.72.
|
|
818
|
+
var version = "1.72.2";
|
|
819
819
|
|
|
820
820
|
//#endregion
|
|
821
821
|
//#region ts/pty-fix.ts
|
|
@@ -1895,4 +1895,4 @@ const SUPPORTED_CLIS = Object.keys(CLIS_CONFIG);
|
|
|
1895
1895
|
|
|
1896
1896
|
//#endregion
|
|
1897
1897
|
export { AgentContext as a, PidStore as c, config as i, removeControlCharacters as l, CLIS_CONFIG as n, name as o, agentYes as r, version as s, SUPPORTED_CLIS as t };
|
|
1898
|
-
//# sourceMappingURL=SUPPORTED_CLIS-
|
|
1898
|
+
//# sourceMappingURL=SUPPORTED_CLIS-D9eEHdvo.js.map
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import { c as PidStore, o as name, s as version, t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
2
|
+
import { c as PidStore, o as name, s as version, t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-D9eEHdvo.js";
|
|
3
3
|
import { t as logger } from "./logger-CX77vJDA.js";
|
|
4
4
|
import { argv } from "process";
|
|
5
5
|
import { spawn } from "child_process";
|
|
@@ -481,10 +481,14 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
481
481
|
const updateCheckPromise = checkAndAutoUpdate();
|
|
482
482
|
const config = parseCliArgs(process.argv);
|
|
483
483
|
if (config.tray) {
|
|
484
|
-
const { startTray } = await import("./tray-
|
|
484
|
+
const { startTray } = await import("./tray-CPpdxTV-.js");
|
|
485
485
|
await startTray();
|
|
486
486
|
await new Promise(() => {});
|
|
487
487
|
}
|
|
488
|
+
{
|
|
489
|
+
const { ensureTray } = await import("./tray-CPpdxTV-.js");
|
|
490
|
+
ensureTray();
|
|
491
|
+
}
|
|
488
492
|
if (config.useRust) {
|
|
489
493
|
let rustBinary;
|
|
490
494
|
try {
|
|
@@ -572,10 +576,6 @@ if (config.verbose) {
|
|
|
572
576
|
console.log(config);
|
|
573
577
|
console.log(argv);
|
|
574
578
|
}
|
|
575
|
-
{
|
|
576
|
-
const { ensureTray } = await import("./tray-Dyiihcrq.js");
|
|
577
|
-
ensureTray();
|
|
578
|
-
}
|
|
579
579
|
const { default: cliYes } = await import("./index.js");
|
|
580
580
|
const { exitCode } = await cliYes({
|
|
581
581
|
...config,
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AgentContext, i as config, l as removeControlCharacters, n as CLIS_CONFIG, r as agentYes } from "./SUPPORTED_CLIS-
|
|
1
|
+
import { a as AgentContext, i as config, l as removeControlCharacters, n as CLIS_CONFIG, r as agentYes } from "./SUPPORTED_CLIS-D9eEHdvo.js";
|
|
2
2
|
import "./logger-CX77vJDA.js";
|
|
3
3
|
|
|
4
4
|
export { AgentContext, CLIS_CONFIG, config, agentYes as default, removeControlCharacters };
|
|
@@ -142,14 +142,17 @@ async function startTray() {
|
|
|
142
142
|
});
|
|
143
143
|
await systray.ready();
|
|
144
144
|
console.log(`Tray started. Watching ${count} running agent(s).`);
|
|
145
|
+
let intervalId;
|
|
146
|
+
const cleanup = () => {
|
|
147
|
+
if (intervalId) clearInterval(intervalId);
|
|
148
|
+
systray.kill(false);
|
|
149
|
+
removeTrayPid().finally(() => process.exit(0));
|
|
150
|
+
};
|
|
145
151
|
systray.onClick((action) => {
|
|
146
|
-
if (action.item.title === "Quit Tray")
|
|
147
|
-
systray.kill(false);
|
|
148
|
-
removeTrayPid().finally(() => process.exit(0));
|
|
149
|
-
}
|
|
152
|
+
if (action.item.title === "Quit Tray") cleanup();
|
|
150
153
|
});
|
|
151
154
|
let lastCount = count;
|
|
152
|
-
|
|
155
|
+
intervalId = setInterval(async () => {
|
|
153
156
|
try {
|
|
154
157
|
const { count: newCount, tasks: newTasks } = await getRunningAgentCount();
|
|
155
158
|
if (newCount !== lastCount) {
|
|
@@ -166,15 +169,10 @@ async function startTray() {
|
|
|
166
169
|
}
|
|
167
170
|
} catch {}
|
|
168
171
|
}, POLL_INTERVAL);
|
|
169
|
-
const cleanup = () => {
|
|
170
|
-
clearInterval(interval);
|
|
171
|
-
systray.kill(false);
|
|
172
|
-
removeTrayPid().finally(() => process.exit(0));
|
|
173
|
-
};
|
|
174
172
|
process.on("SIGINT", cleanup);
|
|
175
173
|
process.on("SIGTERM", cleanup);
|
|
176
174
|
}
|
|
177
175
|
|
|
178
176
|
//#endregion
|
|
179
177
|
export { ensureTray, startTray };
|
|
180
|
-
//# sourceMappingURL=tray-
|
|
178
|
+
//# sourceMappingURL=tray-CPpdxTV-.js.map
|
package/package.json
CHANGED
package/ts/cli.ts
CHANGED
|
@@ -22,6 +22,13 @@ if (config.tray) {
|
|
|
22
22
|
await new Promise(() => {}); // Block forever, exit via tray quit or signal
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
// Auto-spawn tray icon in background on desktop OS (best-effort, silent failure)
|
|
26
|
+
// Must run before --rust spawn since that blocks forever
|
|
27
|
+
{
|
|
28
|
+
const { ensureTray } = await import("./tray.ts");
|
|
29
|
+
ensureTray(); // fire-and-forget, don't await
|
|
30
|
+
}
|
|
31
|
+
|
|
25
32
|
// Handle --rust: spawn the Rust binary instead, fall back to TypeScript if unavailable
|
|
26
33
|
if (config.useRust) {
|
|
27
34
|
let rustBinary: string | undefined;
|
|
@@ -142,12 +149,6 @@ if (config.verbose) {
|
|
|
142
149
|
console.log(argv);
|
|
143
150
|
}
|
|
144
151
|
|
|
145
|
-
// Auto-spawn tray icon in background on desktop OS (best-effort, silent failure)
|
|
146
|
-
{
|
|
147
|
-
const { ensureTray } = await import("./tray.ts");
|
|
148
|
-
ensureTray(); // fire-and-forget, don't await
|
|
149
|
-
}
|
|
150
|
-
|
|
151
152
|
const { default: cliYes } = await import("./index.ts");
|
|
152
153
|
const { exitCode } = await cliYes({ ...config, autoYes: config.autoYes });
|
|
153
154
|
|
package/ts/tray.ts
CHANGED
|
@@ -161,24 +161,28 @@ export async function startTray(): Promise<void> {
|
|
|
161
161
|
await systray.ready();
|
|
162
162
|
console.log(`Tray started. Watching ${count} running agent(s).`);
|
|
163
163
|
|
|
164
|
+
// Cleanup helper
|
|
165
|
+
let intervalId: ReturnType<typeof setInterval> | undefined;
|
|
166
|
+
const cleanup = () => {
|
|
167
|
+
if (intervalId) clearInterval(intervalId);
|
|
168
|
+
systray.kill(false);
|
|
169
|
+
removeTrayPid().finally(() => process.exit(0));
|
|
170
|
+
};
|
|
171
|
+
|
|
164
172
|
// Handle quit
|
|
165
173
|
systray.onClick((action) => {
|
|
166
|
-
if (action.item.title === "Quit Tray")
|
|
167
|
-
systray.kill(false);
|
|
168
|
-
removeTrayPid().finally(() => process.exit(0));
|
|
169
|
-
}
|
|
174
|
+
if (action.item.title === "Quit Tray") cleanup();
|
|
170
175
|
});
|
|
171
176
|
|
|
172
|
-
// Poll and update
|
|
177
|
+
// Poll and update, auto-exit after ~30s idle (0 agents)
|
|
173
178
|
let lastCount = count;
|
|
174
|
-
|
|
179
|
+
intervalId = setInterval(async () => {
|
|
175
180
|
try {
|
|
176
181
|
const { count: newCount, tasks: newTasks } = await getRunningAgentCount();
|
|
177
182
|
|
|
178
183
|
if (newCount !== lastCount) {
|
|
179
184
|
lastCount = newCount;
|
|
180
185
|
|
|
181
|
-
// Update title and tooltip
|
|
182
186
|
systray.sendAction({
|
|
183
187
|
type: "update-menu",
|
|
184
188
|
menu: {
|
|
@@ -194,12 +198,6 @@ export async function startTray(): Promise<void> {
|
|
|
194
198
|
}
|
|
195
199
|
}, POLL_INTERVAL);
|
|
196
200
|
|
|
197
|
-
// Cleanup on exit
|
|
198
|
-
const cleanup = () => {
|
|
199
|
-
clearInterval(interval);
|
|
200
|
-
systray.kill(false);
|
|
201
|
-
removeTrayPid().finally(() => process.exit(0));
|
|
202
|
-
};
|
|
203
201
|
process.on("SIGINT", cleanup);
|
|
204
202
|
process.on("SIGTERM", cleanup);
|
|
205
203
|
}
|