agent-yes 1.256.1 → 1.257.0-beta.613.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/dist/{SUPPORTED_CLIS-BzDARJYP.js → SUPPORTED_CLIS-Et85Z6JM.js} +2 -2
- package/dist/{SUPPORTED_CLIS-CUrSR0fn.js → SUPPORTED_CLIS-VONiPaTR.js} +3 -3
- package/dist/{agentShare-JbxEAAIb.js → agentShare-CFoQ4i7E.js} +3 -3
- package/dist/{callback-CDZ0mSn8.js → callback-0YJoCJ_c.js} +3 -3
- package/dist/{callback-BH4-6FVz.js → callback-CWLmSBt9.js} +3 -3
- package/dist/cli.js +8 -8
- package/dist/index.js +2 -2
- package/dist/{notifyDaemon-7udiA8IF.js → notifyDaemon-C5os5sFU.js} +3 -3
- package/dist/{remotes-C71bbp-g.js → remotes-CNe85Icx.js} +1 -1
- package/dist/{remotes-BwytVgTX.js → remotes-Dy4Rg8Yp.js} +2 -2
- package/dist/{rustBinary-Cd9DngDh.js → rustBinary-BR0dkGTw.js} +2 -2
- package/dist/{schedule-Otpou3Ni.js → schedule-CtU6I8ln.js} +4 -4
- package/dist/{serve-JNGfYmLT.js → serve-0A52oc1I.js} +22 -21
- package/dist/{setup-RVV6dnf3.js → setup-CebIM6-Z.js} +2 -2
- package/dist/{spawnGate-BGaqQpMd.js → spawnGate-D0E1uRP7.js} +1 -1
- package/dist/{spawnGate-DcG_Pn2f.js → spawnGate-DqKBA07k.js} +1 -1
- package/dist/{subcommands-CAYOfibe.js → subcommands-BTfRuwP2.js} +73 -30
- package/dist/subcommands-CETDzI9A.js +10 -0
- package/dist/{terminal-CkzqkAST.js → terminal-CpnKEDY5.js} +2 -2
- package/dist/{todoCli-CaQDl5WR.js → todoCli-B2kqgqPh.js} +1 -1
- package/dist/{tray-d0GZiGI9.js → tray-CgkwxtG6.js} +1 -1
- package/dist/trayApp-hCRxrf3n.js +5 -0
- package/dist/{trayApp-pBLHICYj.js → trayApp-jvKMLL2I.js} +2 -2
- package/dist/{ts-DLM7M0W3.js → ts-uhETl5m9.js} +29 -4
- package/dist/{versionChecker-BlwkAisS.js → versionChecker-sIkHpC9-.js} +2 -2
- package/dist/{webrtcRemote-BXmkHX-i.js → webrtcRemote-C3OlHYSt.js} +1 -1
- package/dist/{widget-C2_s8SHw.js → widget-y1DUY3wi.js} +3 -3
- package/dist/ws-CSXOj0Xa.js +11 -0
- package/dist/{ws-833ph696.js → ws-Qh262cFr.js} +19 -12
- package/lab/ui/console-logic.js +6 -3
- package/lab/ui/index.html +27 -5
- package/package.json +2 -1
- package/ts/index.ts +42 -2
- package/ts/needsInput.spec.ts +38 -0
- package/ts/needsInput.ts +7 -3
- package/ts/serve.ts +9 -7
- package/ts/subcommands.spec.ts +26 -0
- package/ts/subcommands.ts +63 -6
- package/ts/todoParse.spec.ts +30 -0
- package/ts/todoParse.ts +19 -5
- package/ts/ws.spec.ts +6 -1
- package/ts/ws.ts +18 -3
- package/dist/subcommands-DEcce_73.js +0 -10
- package/dist/trayApp-DmaV4IyV.js +0 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-uhETl5m9.js";
|
|
2
2
|
|
|
3
3
|
//#region ts/SUPPORTED_CLIS.ts
|
|
4
4
|
const SUPPORTED_CLIS = Object.keys(CLIS_CONFIG);
|
|
5
5
|
|
|
6
6
|
//#endregion
|
|
7
7
|
export { SUPPORTED_CLIS as t };
|
|
8
|
-
//# sourceMappingURL=SUPPORTED_CLIS-
|
|
8
|
+
//# sourceMappingURL=SUPPORTED_CLIS-Et85Z6JM.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import "./ts-
|
|
2
|
+
import "./versionChecker-sIkHpC9-.js";
|
|
3
|
+
import "./ts-uhETl5m9.js";
|
|
4
4
|
import "./todoAutomation-BQRW614S.js";
|
|
5
5
|
import "./JsonlStore-CPGIR0Wy.js";
|
|
6
6
|
import "./globalPidIndex-Dq4KY2IV.js";
|
|
7
7
|
import "./pidStore-Cmcc8Oej.js";
|
|
8
8
|
import "./messageLog-BYFwioFY.js";
|
|
9
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
9
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Et85Z6JM.js";
|
|
10
10
|
|
|
11
11
|
export { SUPPORTED_CLIS };
|
|
@@ -3,9 +3,9 @@ import "./globalPidIndex-Dq4KY2IV.js";
|
|
|
3
3
|
import "./messageLog-BYFwioFY.js";
|
|
4
4
|
import "./e2e-CUMZC53I.js";
|
|
5
5
|
import "./configShared-DtHMBCl7.js";
|
|
6
|
-
import {
|
|
6
|
+
import { I as resolveOne } from "./subcommands-BTfRuwP2.js";
|
|
7
7
|
import "./webrtcLink-CS4D-3G1.js";
|
|
8
|
-
import "./remotes-
|
|
8
|
+
import "./remotes-Dy4Rg8Yp.js";
|
|
9
9
|
import { a as startShare } from "./share-B-e_9WBx.js";
|
|
10
10
|
|
|
11
11
|
//#region ts/agentShare.ts
|
|
@@ -229,4 +229,4 @@ function transformEvent(rawEvent, agentId, forwarded) {
|
|
|
229
229
|
|
|
230
230
|
//#endregion
|
|
231
231
|
export { createScopedShare, listShares, revokeAllShares, revokeShare };
|
|
232
|
-
//# sourceMappingURL=agentShare-
|
|
232
|
+
//# sourceMappingURL=agentShare-CFoQ4i7E.js.map
|
|
@@ -3,10 +3,10 @@ import "./globalPidIndex-Dq4KY2IV.js";
|
|
|
3
3
|
import "./messageLog-BYFwioFY.js";
|
|
4
4
|
import "./e2e-CUMZC53I.js";
|
|
5
5
|
import "./configShared-DtHMBCl7.js";
|
|
6
|
-
import "./subcommands-
|
|
6
|
+
import "./subcommands-BTfRuwP2.js";
|
|
7
7
|
import "./webrtcLink-CS4D-3G1.js";
|
|
8
|
-
import "./remotes-
|
|
8
|
+
import "./remotes-Dy4Rg8Yp.js";
|
|
9
9
|
import "./callbackCore-Cg3Ye0ZS.js";
|
|
10
|
-
import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-
|
|
10
|
+
import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-CWLmSBt9.js";
|
|
11
11
|
|
|
12
12
|
export { cmdCallback };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
|
|
2
|
-
import {
|
|
2
|
+
import { I as resolveOne } from "./subcommands-BTfRuwP2.js";
|
|
3
3
|
import { a as mintCapability, o as parseExpires } from "./callbackCore-Cg3Ye0ZS.js";
|
|
4
4
|
import { randomBytes } from "node:crypto";
|
|
5
5
|
import { chmodSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
@@ -72,7 +72,7 @@ async function resolveBase(flag) {
|
|
|
72
72
|
if (flag) return flag;
|
|
73
73
|
if (process.env.AGENT_YES_CALLBACK_BASE) return process.env.AGENT_YES_CALLBACK_BASE;
|
|
74
74
|
try {
|
|
75
|
-
const { resolveLocalServeUrl } = await import("./serve-
|
|
75
|
+
const { resolveLocalServeUrl } = await import("./serve-0A52oc1I.js");
|
|
76
76
|
const url = await resolveLocalServeUrl();
|
|
77
77
|
if (url) return url;
|
|
78
78
|
} catch {}
|
|
@@ -187,4 +187,4 @@ async function cmdCallback(rest) {
|
|
|
187
187
|
|
|
188
188
|
//#endregion
|
|
189
189
|
export { loadOrCreateCallbackSecret as i, isCallbackRevoked as n, loadCallbackSecretReadOnly as r, cmdCallback as t };
|
|
190
|
-
//# sourceMappingURL=callback-
|
|
190
|
+
//# sourceMappingURL=callback-CWLmSBt9.js.map
|
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import { t as invokedCliName } from "./invokedCli-uqM2YYA7.js";
|
|
3
3
|
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
4
|
-
import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-
|
|
5
|
-
import { r as getRustBinary } from "./rustBinary-
|
|
4
|
+
import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-sIkHpC9-.js";
|
|
5
|
+
import { r as getRustBinary } from "./rustBinary-BR0dkGTw.js";
|
|
6
6
|
import { argv } from "process";
|
|
7
7
|
import { spawn } from "child_process";
|
|
8
8
|
import ms from "ms";
|
|
@@ -285,7 +285,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
285
285
|
const rawArg = process.argv[2];
|
|
286
286
|
const managerCommands = !invokedCliName(process.argv);
|
|
287
287
|
const isHelpFlag = rawArg === "-h" || rawArg === "--help";
|
|
288
|
-
const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken } = await import("./subcommands-
|
|
288
|
+
const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken } = await import("./subcommands-CETDzI9A.js");
|
|
289
289
|
if (isHelpFlag && process.argv.length === 3) {
|
|
290
290
|
await cmdHelp(managerCommands);
|
|
291
291
|
process.exit(0);
|
|
@@ -295,7 +295,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
295
295
|
process.exit(code ?? 0);
|
|
296
296
|
}
|
|
297
297
|
{
|
|
298
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
298
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-VONiPaTR.js");
|
|
299
299
|
if (isUnknownManagerToken(rawArg, managerCommands, SUPPORTED_CLIS)) {
|
|
300
300
|
process.stderr.write(`ay: unknown subcommand or CLI '${rawArg}'.\n See 'ay help' for subcommands. To run an agent, name a CLI:\n 'ay <cli> …' (e.g. 'ay claude …') or 'ay --cli <cli> …'.\n`);
|
|
301
301
|
process.exit(1);
|
|
@@ -314,16 +314,16 @@ await checkAndAutoUpdate();
|
|
|
314
314
|
logger.info(versionString());
|
|
315
315
|
const config = parseCliArgs(process.argv);
|
|
316
316
|
if (config.tray) {
|
|
317
|
-
const { startTray } = await import("./tray-
|
|
317
|
+
const { startTray } = await import("./tray-CgkwxtG6.js");
|
|
318
318
|
await startTray();
|
|
319
319
|
await new Promise(() => {});
|
|
320
320
|
}
|
|
321
321
|
{
|
|
322
|
-
const { ensureTray } = await import("./tray-
|
|
322
|
+
const { ensureTray } = await import("./tray-CgkwxtG6.js");
|
|
323
323
|
ensureTray();
|
|
324
324
|
}
|
|
325
325
|
if (!config.showVersion && !config.appendPrompt && !config.tray) {
|
|
326
|
-
const { waitForSpawnCapacity } = await import("./spawnGate-
|
|
326
|
+
const { waitForSpawnCapacity } = await import("./spawnGate-DqKBA07k.js");
|
|
327
327
|
await waitForSpawnCapacity({
|
|
328
328
|
onWait: (reason, waitedMs) => {
|
|
329
329
|
if (config.verbose || waitedMs === 0) console.error(`[agent-yes] spawn gate: ${reason} — waiting…`);
|
|
@@ -346,7 +346,7 @@ if (config.useRust) {
|
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
348
|
if (rustBinary) {
|
|
349
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
349
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-VONiPaTR.js");
|
|
350
350
|
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
351
351
|
if (config.verbose) {
|
|
352
352
|
console.log(`[rust] Using binary: ${rustBinary}`);
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import { a as hasTodoStore, i as answerAsk, l as AgentContext, n as agentYes, o as listAsks, r as config, s as listAsksForProject, t as CLIS_CONFIG } from "./ts-
|
|
2
|
+
import "./versionChecker-sIkHpC9-.js";
|
|
3
|
+
import { a as hasTodoStore, i as answerAsk, l as AgentContext, n as agentYes, o as listAsks, r as config, s as listAsksForProject, t as CLIS_CONFIG } from "./ts-uhETl5m9.js";
|
|
4
4
|
import { _ as isKnownKind, a as renderTree, b as statesOf, c as monitorHint, d as openStore, f as DONE_STATE, g as initialState, h as canTransition, i as renderDigest, l as CycleError, m as ORPHANED_STATE, o as unblockedTasks, p as LIFECYCLES, r as openBlockers, s as describeBlock, t as reconcileTodos, u as TodoStore, v as nextStates, x as removeControlCharacters, y as requiredGate } from "./todoAutomation-BQRW614S.js";
|
|
5
5
|
import "./JsonlStore-CPGIR0Wy.js";
|
|
6
6
|
import "./globalPidIndex-Dq4KY2IV.js";
|
|
@@ -3,9 +3,9 @@ import "./globalPidIndex-Dq4KY2IV.js";
|
|
|
3
3
|
import "./messageLog-BYFwioFY.js";
|
|
4
4
|
import "./e2e-CUMZC53I.js";
|
|
5
5
|
import "./configShared-DtHMBCl7.js";
|
|
6
|
-
import { $ as
|
|
6
|
+
import { $ as liveWatchers, J as appendEvent, N as renderLogTailLines, Q as listInboxParents, X as hostId, Y as gcInboxes, et as readInbox, it as notifyDir, l as deriveLiveState, nt as daemonLockDir, rt as daemonLockOwnerPath, tt as shouldStealLock, v as isPidAlive, w as listRecords } from "./subcommands-BTfRuwP2.js";
|
|
7
7
|
import "./webrtcLink-CS4D-3G1.js";
|
|
8
|
-
import "./remotes-
|
|
8
|
+
import "./remotes-Dy4Rg8Yp.js";
|
|
9
9
|
import { mkdir, readFile, rename, rm, stat, writeFile } from "fs/promises";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
11
|
import { execFile, execFileSync } from "node:child_process";
|
|
@@ -836,4 +836,4 @@ async function ensureDaemon() {
|
|
|
836
836
|
|
|
837
837
|
//#endregion
|
|
838
838
|
export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
|
|
839
|
-
//# sourceMappingURL=notifyDaemon-
|
|
839
|
+
//# sourceMappingURL=notifyDaemon-C5os5sFU.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./e2e-CUMZC53I.js";
|
|
2
2
|
import "./webrtcLink-CS4D-3G1.js";
|
|
3
|
-
import { a as resolveRemoteSpec, i as readRemotes, n as deleteRemoteAlias, o as writeRemoteAlias, r as parseDirectRemoteSpec, t as cmdRemote } from "./remotes-
|
|
3
|
+
import { a as resolveRemoteSpec, i as readRemotes, n as deleteRemoteAlias, o as writeRemoteAlias, r as parseDirectRemoteSpec, t as cmdRemote } from "./remotes-Dy4Rg8Yp.js";
|
|
4
4
|
|
|
5
5
|
export { cmdRemote };
|
|
@@ -86,7 +86,7 @@ async function resolveRemoteSpec(spec) {
|
|
|
86
86
|
* The bridge lives for the rest of the process (torn down on `process.exit`).
|
|
87
87
|
*/
|
|
88
88
|
async function resolveWebrtc(link, keyword) {
|
|
89
|
-
const { startWebrtcBridge } = await import("./webrtcRemote-
|
|
89
|
+
const { startWebrtcBridge } = await import("./webrtcRemote-C3OlHYSt.js");
|
|
90
90
|
const bridge = await startWebrtcBridge(link);
|
|
91
91
|
return {
|
|
92
92
|
url: bridge.baseUrl,
|
|
@@ -173,4 +173,4 @@ async function cmdRemote(rest) {
|
|
|
173
173
|
|
|
174
174
|
//#endregion
|
|
175
175
|
export { resolveRemoteSpec as a, readRemotes as i, deleteRemoteAlias as n, writeRemoteAlias as o, parseDirectRemoteSpec as r, cmdRemote as t };
|
|
176
|
-
//# sourceMappingURL=remotes-
|
|
176
|
+
//# sourceMappingURL=remotes-Dy4Rg8Yp.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
1
|
+
import { r as getInstalledPackage } from "./versionChecker-sIkHpC9-.js";
|
|
2
2
|
import { execFileSync } from "child_process";
|
|
3
3
|
import { existsSync, mkdirSync, unlinkSync } from "fs";
|
|
4
4
|
import { chmod, copyFile } from "fs/promises";
|
|
@@ -243,4 +243,4 @@ async function getRustBinary(options = {}) {
|
|
|
243
243
|
|
|
244
244
|
//#endregion
|
|
245
245
|
export { findTrayLauncher as n, getRustBinary as r, findSpawnHiddenLauncher as t };
|
|
246
|
-
//# sourceMappingURL=rustBinary-
|
|
246
|
+
//# sourceMappingURL=rustBinary-BR0dkGTw.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import "./ts-
|
|
2
|
+
import "./versionChecker-sIkHpC9-.js";
|
|
3
|
+
import "./ts-uhETl5m9.js";
|
|
4
4
|
import "./todoAutomation-BQRW614S.js";
|
|
5
5
|
import "./JsonlStore-CPGIR0Wy.js";
|
|
6
6
|
import "./globalPidIndex-Dq4KY2IV.js";
|
|
7
7
|
import "./pidStore-Cmcc8Oej.js";
|
|
8
8
|
import "./messageLog-BYFwioFY.js";
|
|
9
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
9
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Et85Z6JM.js";
|
|
10
10
|
import { f as resolveSpawnCwd } from "./workspaceConfig-Bxuk_MOq.js";
|
|
11
11
|
import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-vhOBffJ3.js";
|
|
12
12
|
import { createHash } from "node:crypto";
|
|
@@ -153,4 +153,4 @@ async function cmdSchedule(rest) {
|
|
|
153
153
|
|
|
154
154
|
//#endregion
|
|
155
155
|
export { cmdSchedule };
|
|
156
|
-
//# sourceMappingURL=schedule-
|
|
156
|
+
//# sourceMappingURL=schedule-CtU6I8ln.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
3
|
-
import { t as findSpawnHiddenLauncher } from "./rustBinary-
|
|
4
|
-
import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-
|
|
2
|
+
import { r as getInstalledPackage } from "./versionChecker-sIkHpC9-.js";
|
|
3
|
+
import { t as findSpawnHiddenLauncher } from "./rustBinary-BR0dkGTw.js";
|
|
4
|
+
import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-uhETl5m9.js";
|
|
5
5
|
import { t as agentYesHome$1 } from "./agentYesHome-CtmsY6I-.js";
|
|
6
6
|
import { x as removeControlCharacters } from "./todoAutomation-BQRW614S.js";
|
|
7
7
|
import "./JsonlStore-CPGIR0Wy.js";
|
|
@@ -11,16 +11,17 @@ import { r as recordInbox } from "./messageLog-BYFwioFY.js";
|
|
|
11
11
|
import { t as pgidForWrapper } from "./reaper-C4BvNylH.js";
|
|
12
12
|
import "./e2e-CUMZC53I.js";
|
|
13
13
|
import "./configShared-DtHMBCl7.js";
|
|
14
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
15
|
-
import { A as
|
|
14
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Et85Z6JM.js";
|
|
15
|
+
import { A as readPtysize, F as renderRawLogLines, I as resolveOne, M as recentReadEdges, N as renderLogTailLines, O as readLogForRender, P as renderRawLog, S as isUserTyping, V as snapshotStatus, Z as isTransientLockMkdirError, at as TYPING_BADGE, d as extractBadges, j as recentMessageEdges, k as readNotes, m as extractTaskCounts, p as extractNeedsInput, q as writeToIpc, s as controlCodeFromName, u as deriveLiveStatus, w as listRecords } from "./subcommands-BTfRuwP2.js";
|
|
16
16
|
import "./webrtcLink-CS4D-3G1.js";
|
|
17
|
-
import "./remotes-
|
|
17
|
+
import "./remotes-Dy4Rg8Yp.js";
|
|
18
18
|
import { i as frameVisitorMessage, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-Cg3Ye0ZS.js";
|
|
19
|
-
import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-
|
|
19
|
+
import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-CWLmSBt9.js";
|
|
20
20
|
import { a as getProvisionRoot, d as isProvisionAllowed, f as resolveSpawnCwd, i as getProvisionHook, l as hasProvisionHook, o as getSpawnHook, t as allowsSkipPermissions, u as hasSpawnHook } from "./workspaceConfig-Bxuk_MOq.js";
|
|
21
21
|
import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-vhOBffJ3.js";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
22
|
+
import { i as importProvisionModule } from "./ws-Qh262cFr.js";
|
|
23
|
+
import { r as spawnRejectionReason } from "./spawnGate-D0E1uRP7.js";
|
|
24
|
+
import { i as launchTray } from "./trayApp-jvKMLL2I.js";
|
|
24
25
|
import yargs from "yargs";
|
|
25
26
|
import { appendFile, mkdir, open, readFile, readdir, rename, rm, stat, unlink, writeFile } from "fs/promises";
|
|
26
27
|
import { arch, cpus, freemem, homedir, hostname, loadavg, platform, totalmem, uptime, userInfo } from "os";
|
|
@@ -2367,7 +2368,7 @@ Options:
|
|
|
2367
2368
|
}
|
|
2368
2369
|
});
|
|
2369
2370
|
if (req.method === "GET" && p === "/api/ws") {
|
|
2370
|
-
const ws = await import("./ws-
|
|
2371
|
+
const ws = await import("./ws-CSXOj0Xa.js");
|
|
2371
2372
|
try {
|
|
2372
2373
|
await ws.loadProvision();
|
|
2373
2374
|
} catch (e) {
|
|
@@ -2387,7 +2388,7 @@ Options:
|
|
|
2387
2388
|
if (req.method === "GET" && p === "/api/ws/status") {
|
|
2388
2389
|
const dirRaw = url.searchParams.get("path");
|
|
2389
2390
|
if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
|
|
2390
|
-
const ws = await import("./ws-
|
|
2391
|
+
const ws = await import("./ws-CSXOj0Xa.js");
|
|
2391
2392
|
let prov;
|
|
2392
2393
|
try {
|
|
2393
2394
|
prov = await ws.loadProvision();
|
|
@@ -2430,7 +2431,7 @@ Options:
|
|
|
2430
2431
|
try {
|
|
2431
2432
|
const record = await resolveOne(keyword, defaultOpts());
|
|
2432
2433
|
if (!record.log_file) return new Response(`pid ${record.pid}: no log_file`, { status: 404 });
|
|
2433
|
-
const buf = await
|
|
2434
|
+
const buf = await readLogForRender(record.log_file);
|
|
2434
2435
|
const size = await readPtysize(record.pid);
|
|
2435
2436
|
const text = await renderRawLog(buf, {
|
|
2436
2437
|
mode,
|
|
@@ -2972,9 +2973,9 @@ Options:
|
|
|
2972
2973
|
if (fork) {
|
|
2973
2974
|
let prov;
|
|
2974
2975
|
try {
|
|
2975
|
-
prov = await
|
|
2976
|
+
prov = await importProvisionModule();
|
|
2976
2977
|
} catch (e) {
|
|
2977
|
-
return new Response(`fork needs
|
|
2978
|
+
return new Response(`fork needs a provision implementation — '@snomiao/ws-provision' (bundled dependency) or a bun-linked 'codehost': ${e.message}`, { status: 501 });
|
|
2978
2979
|
}
|
|
2979
2980
|
const forkOrigin = originOwnerRepo(fork.fromCwd);
|
|
2980
2981
|
const forkHook = await runProvisionHook(fork.fromCwd, {
|
|
@@ -3007,9 +3008,9 @@ Options:
|
|
|
3007
3008
|
} else if (from) {
|
|
3008
3009
|
let prov;
|
|
3009
3010
|
try {
|
|
3010
|
-
prov = await
|
|
3011
|
+
prov = await importProvisionModule();
|
|
3011
3012
|
} catch (e) {
|
|
3012
|
-
return new Response(`spawn-from needs
|
|
3013
|
+
return new Response(`spawn-from needs a provision implementation — '@snomiao/ws-provision' (bundled dependency) or a bun-linked 'codehost': ${e.message}`, { status: 501 });
|
|
3013
3014
|
}
|
|
3014
3015
|
let spec;
|
|
3015
3016
|
try {
|
|
@@ -3144,7 +3145,7 @@ Options:
|
|
|
3144
3145
|
const perm = body.perm ?? "r";
|
|
3145
3146
|
if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
|
|
3146
3147
|
try {
|
|
3147
|
-
const { createScopedShare } = await import("./agentShare-
|
|
3148
|
+
const { createScopedShare } = await import("./agentShare-CFoQ4i7E.js");
|
|
3148
3149
|
const share = await createScopedShare({
|
|
3149
3150
|
agent: body.agent,
|
|
3150
3151
|
perm,
|
|
@@ -3159,12 +3160,12 @@ Options:
|
|
|
3159
3160
|
}
|
|
3160
3161
|
}
|
|
3161
3162
|
if (req.method === "GET" && p === "/api/shares") {
|
|
3162
|
-
const { listShares } = await import("./agentShare-
|
|
3163
|
+
const { listShares } = await import("./agentShare-CFoQ4i7E.js");
|
|
3163
3164
|
return Response.json(listShares());
|
|
3164
3165
|
}
|
|
3165
3166
|
const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
|
|
3166
3167
|
if (req.method === "DELETE" && revokeM) {
|
|
3167
|
-
const { revokeShare } = await import("./agentShare-
|
|
3168
|
+
const { revokeShare } = await import("./agentShare-CFoQ4i7E.js");
|
|
3168
3169
|
const ok = revokeShare(decodeURIComponent(revokeM[1]));
|
|
3169
3170
|
return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
|
|
3170
3171
|
}
|
|
@@ -3466,7 +3467,7 @@ Options:
|
|
|
3466
3467
|
const shutdown = (resolve) => {
|
|
3467
3468
|
if (heartbeat) clearInterval(heartbeat);
|
|
3468
3469
|
closeShare?.();
|
|
3469
|
-
import("./agentShare-
|
|
3470
|
+
import("./agentShare-CFoQ4i7E.js").then((m) => m.revokeAllShares()).catch(() => {});
|
|
3470
3471
|
server?.stop();
|
|
3471
3472
|
Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
|
|
3472
3473
|
};
|
|
@@ -3479,4 +3480,4 @@ Options:
|
|
|
3479
3480
|
|
|
3480
3481
|
//#endregion
|
|
3481
3482
|
export { cmdServe, loadTokenReadOnly, mintScopedTermToken, resolveDaemonHttpBase, resolveLocalServeUrl };
|
|
3482
|
-
//# sourceMappingURL=serve-
|
|
3483
|
+
//# sourceMappingURL=serve-0A52oc1I.js.map
|
|
@@ -32,7 +32,7 @@ async function cmdSetup(rest) {
|
|
|
32
32
|
if (!existsSync(abs)) process.stderr.write(` note: that directory doesn't exist yet — create it, or agents spawned there will fail\n`);
|
|
33
33
|
if (noShare) return 0;
|
|
34
34
|
process.stdout.write(`\nsharing this machine to agent-yes.com…\n`);
|
|
35
|
-
const { cmdServe } = await import("./serve-
|
|
35
|
+
const { cmdServe } = await import("./serve-0A52oc1I.js");
|
|
36
36
|
return cmdServe([
|
|
37
37
|
"install",
|
|
38
38
|
"--share",
|
|
@@ -42,4 +42,4 @@ async function cmdSetup(rest) {
|
|
|
42
42
|
|
|
43
43
|
//#endregion
|
|
44
44
|
export { cmdSetup };
|
|
45
|
-
//# sourceMappingURL=setup-
|
|
45
|
+
//# sourceMappingURL=setup-CebIM6-Z.js.map
|
|
@@ -104,4 +104,4 @@ async function waitForSpawnCapacity(opts) {
|
|
|
104
104
|
|
|
105
105
|
//#endregion
|
|
106
106
|
export { waitForSpawnCapacity as i, spawnGateEnabled as n, spawnRejectionReason as r, memAvailableMb as t };
|
|
107
|
-
//# sourceMappingURL=spawnGate-
|
|
107
|
+
//# sourceMappingURL=spawnGate-D0E1uRP7.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
2
|
import "./globalPidIndex-Dq4KY2IV.js";
|
|
3
|
-
import { i as waitForSpawnCapacity, n as spawnGateEnabled, r as spawnRejectionReason, t as memAvailableMb } from "./spawnGate-
|
|
3
|
+
import { i as waitForSpawnCapacity, n as spawnGateEnabled, r as spawnRejectionReason, t as memAvailableMb } from "./spawnGate-D0E1uRP7.js";
|
|
4
4
|
|
|
5
5
|
export { waitForSpawnCapacity };
|