claude-yes 1.299.0 → 1.300.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/README.md +13 -2
- package/default.config.yaml +12 -0
- package/dist/{SUPPORTED_CLIS-QeBw5kgC.js → SUPPORTED_CLIS-C-5idp3R.js} +2 -2
- package/dist/{SUPPORTED_CLIS-4xT0bC4u.js → SUPPORTED_CLIS-NZHT0QJq.js} +3 -3
- package/dist/{agentShare-CfZXpwt3.js → agentShare-Bt_vRAdp.js} +3 -3
- package/dist/{callback-NudDhDZC.js → callback-BoCEpJ3Z.js} +3 -3
- package/dist/{callback-baQW_tZ0.js → callback-DniBBM0f.js} +3 -3
- package/dist/cli.js +5 -5
- package/dist/{cmdPs-DLwqadZ0.js → cmdPs-DU-4ULBF.js} +3 -3
- package/dist/index.js +2 -2
- package/dist/{notifyDaemon-2CcUnfC5.js → notifyDaemon-wT-mtu1E.js} +3 -3
- package/dist/{parentPingLoop-CzL4S5Wj.js → parentPingLoop-DYL_oSrV.js} +2 -2
- package/dist/{remotes-DrYe_nfw.js → remotes-B4v0Nowo.js} +64 -7
- package/dist/remotes-DnMQWaqQ.js +5 -0
- package/dist/{rustBinary-C73tJoI1.js → rustBinary-BYXCnEzJ.js} +2 -2
- package/dist/{rustBinary-BNZsAVs2.js → rustBinary-DGb3sdEw.js} +2 -2
- package/dist/{schedule-C7eEKVge.js → schedule-BQEUD3h2.js} +4 -4
- package/dist/{serve-Dt8PPtXq.js → serve-DknfTqkm.js} +42 -28
- package/dist/{setup--yrsihq3.js → setup-B13FgF2W.js} +2 -2
- package/dist/{shareCmd-CQc70udS.js → shareCmd-CKsoN9x4.js} +3 -3
- package/dist/subcommands-BNVgv7bt.js +13 -0
- package/dist/{subcommands-DBfwGmiE.js → subcommands-CFVFLCuJ.js} +766 -81
- package/dist/{terminal-B12ElZBy.js → terminal-CODg7fHK.js} +2 -2
- package/dist/trayApp-VNZEQ1av.js +5 -0
- package/dist/{trayApp-CPp8dclE.js → trayApp-wUiHykPM.js} +2 -2
- package/dist/{ts-BpOXK769.js → ts-CPR985mz.js} +3 -3
- package/dist/{versionChecker-DBVGT5ZP.js → versionChecker-pTpboio4.js} +2 -2
- package/dist/{widget-CJfTDB3o.js → widget-C8srSfBL.js} +3 -3
- package/dist/{ws-Ds9OJg3V.js → ws-B3n0JCmy.js} +3 -3
- package/dist/{ws-4RlKZyrX.js → ws-BhV8FLVX.js} +2 -2
- package/package.json +1 -1
- package/ts/composerGuard.spec.ts +279 -0
- package/ts/composerGuard.ts +366 -0
- package/ts/globalPidIndex.ts +7 -0
- package/ts/messageLog.ts +2 -0
- package/ts/needsInput.bun.spec.ts +36 -0
- package/ts/needsInput.spec.ts +36 -0
- package/ts/remotes.bun.spec.ts +125 -0
- package/ts/remotes.spec.ts +125 -0
- package/ts/remotes.ts +95 -5
- package/ts/serve.bun.spec.ts +50 -0
- package/ts/serve.spec.ts +57 -1
- package/ts/serve.ts +50 -9
- package/ts/subcommands.spec.ts +530 -50
- package/ts/subcommands.ts +657 -94
- package/ts/workDir.bun.spec.ts +90 -0
- package/ts/workDir.spec.ts +90 -0
- package/ts/workDir.ts +75 -0
- package/dist/remotes-BDMnvGI6.js +0 -5
- package/dist/subcommands-DLDYGRWG.js +0 -13
- package/dist/trayApp-DjHBdisZ.js +0 -5
package/README.md
CHANGED
|
@@ -164,7 +164,7 @@ claude-yes --exit-on-idle=60s "run all tests and commit current changes"
|
|
|
164
164
|
claude-code-execute claude-yes "your task here"
|
|
165
165
|
```
|
|
166
166
|
|
|
167
|
-
### Inspect and message running agents (`cy ls /
|
|
167
|
+
### Inspect and message running agents (`cy ls / tail / send`)
|
|
168
168
|
|
|
169
169
|
From any terminal you can list and interact with agents that are already
|
|
170
170
|
running on the machine — both TS- and Rust-spawned ones:
|
|
@@ -173,7 +173,9 @@ running on the machine — both TS- and Rust-spawned ones:
|
|
|
173
173
|
cy ls # list all running agents
|
|
174
174
|
cy ls codex # filter (matches pid, cwd, cli, or prompt)
|
|
175
175
|
cy tail <keyword> # render last 96 lines via @xterm/headless
|
|
176
|
-
cy
|
|
176
|
+
cy cat <keyword> # full rendered log
|
|
177
|
+
ay read <keyword> # same, with pagination (--last/--range/…)
|
|
178
|
+
# `read` is `ay`-only: `cy read foo.ts` is a prompt
|
|
177
179
|
cy send <keyword> "next: run tests" # append a prompt to that agent's stdin
|
|
178
180
|
cy send <keyword> "" --code=ctrl-c # send a Ctrl+C
|
|
179
181
|
cy attach <keyword> # interactive attach (detach: Ctrl-\)
|
|
@@ -229,6 +231,8 @@ Tasks move through a lifecycle per `--kind`, and gated transitions require
|
|
|
229
231
|
|
|
230
232
|
### Ask another agent a question (`ay ask`)
|
|
231
233
|
|
|
234
|
+
`ay send` の送信確認では、今回のメッセージ識別子が入力欄から履歴へ移ったことを調べます。終了コードは `0` = 送信確認済み、`1` = `NOT SUBMITTED`(宛先を確認してから再送)、`3` = 宛先到達不能、`4` = `QUEUED`(受付済み・処理待ち)です。`4` は失敗として本文を再送せず、宛先の処理を待ってください。確認できない画面や入力候補・ダイアログには Enter を追加しません。`--no-wait` は従来どおり確認を省略するため、終了コード `0` でも送信確認を意味しません。
|
|
235
|
+
|
|
232
236
|
`ay send` delivers a question but leaves no trace of it: if the asker moves on
|
|
233
237
|
and the other agent dies, wedges, or simply never replies, nothing records that
|
|
234
238
|
an answer is owed. `ay ask` delivers the same way — returning immediately — and
|
|
@@ -619,6 +623,13 @@ Each supported CLI has its own configuration defining:
|
|
|
619
623
|
|
|
620
624
|
This project was inspired by: [Claude Code full auto while I sleep : r/ClaudeAI](https://www.reddit.com/r/ClaudeAI/comments/1klk6aw/claude_code_full_auto_while_i_sleep/)
|
|
621
625
|
|
|
626
|
+
## Contributing
|
|
627
|
+
|
|
628
|
+
Contributions from humans and coding agents are welcome. Please read
|
|
629
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) first: everything in this repository (code,
|
|
630
|
+
docs, commits, PRs, issues) is written in English, and only synthetic data may
|
|
631
|
+
be committed.
|
|
632
|
+
|
|
622
633
|
## License
|
|
623
634
|
|
|
624
635
|
MIT
|
package/default.config.yaml
CHANGED
|
@@ -40,6 +40,12 @@ clis:
|
|
|
40
40
|
needsInput:
|
|
41
41
|
- pattern: '❯ ?\d+\.'
|
|
42
42
|
flags: m
|
|
43
|
+
# Folder-trust dialog (current un-numbered layout or legacy numbered one).
|
|
44
|
+
# The typingRespond/enter pair below normally answers it; when that loses
|
|
45
|
+
# its race the session parks here matching neither `ready` nor `working`,
|
|
46
|
+
# and `ay ls` called it idle — a lane silently stuck on the dialog.
|
|
47
|
+
- pattern: '(❯|>) ?(\d\. ?)?(Yes, I trust this folder|No, exit)'
|
|
48
|
+
flags: m
|
|
43
49
|
typingRespond:
|
|
44
50
|
"1\n":
|
|
45
51
|
- '│ Do you want to use this API key\?'
|
|
@@ -202,6 +208,12 @@ clis:
|
|
|
202
208
|
needsInput:
|
|
203
209
|
- pattern: '❯ ?\d+\.'
|
|
204
210
|
flags: m
|
|
211
|
+
# Folder-trust dialog (current un-numbered layout or legacy numbered one).
|
|
212
|
+
# The typingRespond/enter pair below normally answers it; when that loses
|
|
213
|
+
# its race the session parks here matching neither `ready` nor `working`,
|
|
214
|
+
# and `ay ls` called it idle — a lane silently stuck on the dialog.
|
|
215
|
+
- pattern: '(❯|>) ?(\d\. ?)?(Yes, I trust this folder|No, exit)'
|
|
216
|
+
flags: m
|
|
205
217
|
typingRespond:
|
|
206
218
|
"1\n":
|
|
207
219
|
- '│ Do you want to use this API key\?'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-CPR985mz.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-C-5idp3R.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import "./ts-
|
|
2
|
+
import "./versionChecker-pTpboio4.js";
|
|
3
|
+
import "./ts-CPR985mz.js";
|
|
4
4
|
import "./todoAutomation-CbVVS4re.js";
|
|
5
5
|
import "./JsonlStore-BqF7AQ6E.js";
|
|
6
6
|
import "./globalPidIndex-CRH9L9tn.js";
|
|
7
7
|
import "./pidStore-DXWqzTSz.js";
|
|
8
8
|
import "./messageLog-Brx3w6zT.js";
|
|
9
9
|
import "./todoStore-DF6vxHgV.js";
|
|
10
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
10
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C-5idp3R.js";
|
|
11
11
|
|
|
12
12
|
export { SUPPORTED_CLIS };
|
|
@@ -5,10 +5,10 @@ import "./pidStore-DXWqzTSz.js";
|
|
|
5
5
|
import "./messageLog-Brx3w6zT.js";
|
|
6
6
|
import "./e2e-z1xpwSAg.js";
|
|
7
7
|
import "./configShared-DKTgiz7K.js";
|
|
8
|
-
import {
|
|
8
|
+
import { et as resolveOne } from "./subcommands-CFVFLCuJ.js";
|
|
9
9
|
import "./notifyStore-2SWKGwZI.js";
|
|
10
10
|
import "./webrtcLink-DFRyWNMs.js";
|
|
11
|
-
import "./remotes-
|
|
11
|
+
import "./remotes-B4v0Nowo.js";
|
|
12
12
|
import { o as startShare } from "./share-C9oGvjXT.js";
|
|
13
13
|
|
|
14
14
|
//#region ts/agentShare.ts
|
|
@@ -232,4 +232,4 @@ function transformEvent(rawEvent, agentId, forwarded) {
|
|
|
232
232
|
|
|
233
233
|
//#endregion
|
|
234
234
|
export { createScopedShare, listShares, revokeAllShares, revokeShare };
|
|
235
|
-
//# sourceMappingURL=agentShare-
|
|
235
|
+
//# sourceMappingURL=agentShare-Bt_vRAdp.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
|
|
2
|
-
import {
|
|
2
|
+
import { et as resolveOne } from "./subcommands-CFVFLCuJ.js";
|
|
3
3
|
import { a as mintCapability, o as parseExpires } from "./callbackCore-Bl2gGcxg.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-DknfTqkm.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-BoCEpJ3Z.js.map
|
|
@@ -5,11 +5,11 @@ import "./pidStore-DXWqzTSz.js";
|
|
|
5
5
|
import "./messageLog-Brx3w6zT.js";
|
|
6
6
|
import "./e2e-z1xpwSAg.js";
|
|
7
7
|
import "./configShared-DKTgiz7K.js";
|
|
8
|
-
import "./subcommands-
|
|
8
|
+
import "./subcommands-CFVFLCuJ.js";
|
|
9
9
|
import "./notifyStore-2SWKGwZI.js";
|
|
10
10
|
import "./webrtcLink-DFRyWNMs.js";
|
|
11
|
-
import "./remotes-
|
|
11
|
+
import "./remotes-B4v0Nowo.js";
|
|
12
12
|
import "./callbackCore-Bl2gGcxg.js";
|
|
13
|
-
import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-
|
|
13
|
+
import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-BoCEpJ3Z.js";
|
|
14
14
|
|
|
15
15
|
export { cmdCallback };
|
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import { t as invokedCliName } from "./invokedCli-zdFbz1ST.js";
|
|
3
3
|
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
4
|
-
import { a as versionString, r as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-
|
|
5
|
-
import { d as getRustBinary } from "./rustBinary-
|
|
4
|
+
import { a as versionString, r as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-pTpboio4.js";
|
|
5
|
+
import { d as getRustBinary } from "./rustBinary-DGb3sdEw.js";
|
|
6
6
|
import { argv } from "process";
|
|
7
7
|
import { spawn } from "child_process";
|
|
8
8
|
import ms from "ms";
|
|
@@ -295,7 +295,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
295
295
|
const rawArg = process.argv[2];
|
|
296
296
|
const managerCommands = !invokedCliName(process.argv);
|
|
297
297
|
const isHelpFlag = rawArg === "-h" || rawArg === "--help";
|
|
298
|
-
const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken, isBareManagerInvocation } = await import("./subcommands-
|
|
298
|
+
const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken, isBareManagerInvocation } = await import("./subcommands-BNVgv7bt.js");
|
|
299
299
|
if (isHelpFlag && process.argv.length === 3) {
|
|
300
300
|
await cmdHelp(managerCommands);
|
|
301
301
|
process.exit(0);
|
|
@@ -309,7 +309,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
309
309
|
process.exit(code ?? 0);
|
|
310
310
|
}
|
|
311
311
|
{
|
|
312
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
312
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-NZHT0QJq.js");
|
|
313
313
|
if (isUnknownManagerToken(rawArg, managerCommands, SUPPORTED_CLIS)) {
|
|
314
314
|
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`);
|
|
315
315
|
process.exit(1);
|
|
@@ -360,7 +360,7 @@ if (config.useRust) {
|
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
if (rustBinary) {
|
|
363
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
363
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-NZHT0QJq.js");
|
|
364
364
|
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
365
365
|
if (config.verbose) {
|
|
366
366
|
console.log(`[rust] Using binary: ${rustBinary}`);
|
|
@@ -5,10 +5,10 @@ import "./pidStore-DXWqzTSz.js";
|
|
|
5
5
|
import "./messageLog-Brx3w6zT.js";
|
|
6
6
|
import "./e2e-z1xpwSAg.js";
|
|
7
7
|
import "./configShared-DKTgiz7K.js";
|
|
8
|
-
import {
|
|
8
|
+
import { _ as deriveLiveState, _t as buildAgentForest, vt as flattenForest, z as listRecords } from "./subcommands-CFVFLCuJ.js";
|
|
9
9
|
import "./notifyStore-2SWKGwZI.js";
|
|
10
10
|
import "./webrtcLink-DFRyWNMs.js";
|
|
11
|
-
import "./remotes-
|
|
11
|
+
import "./remotes-B4v0Nowo.js";
|
|
12
12
|
import { i as systemStats, n as sampleTrees, r as snapshotProcs, t as humanBytes } from "./procStats-CyD8h5nx.js";
|
|
13
13
|
import yargs from "yargs";
|
|
14
14
|
import { readFileSync } from "node:fs";
|
|
@@ -330,4 +330,4 @@ function readPpidSync(pid) {
|
|
|
330
330
|
|
|
331
331
|
//#endregion
|
|
332
332
|
export { cmdPs };
|
|
333
|
-
//# sourceMappingURL=cmdPs-
|
|
333
|
+
//# sourceMappingURL=cmdPs-DU-4ULBF.js.map
|
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-pTpboio4.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-CPR985mz.js";
|
|
4
4
|
import { a as renderTree, c as describeBlock, i as renderDigest, l as monitorHint, o as unblockedTasks, r as openBlockers, t as reconcileTodos, u as removeControlCharacters } from "./todoAutomation-CbVVS4re.js";
|
|
5
5
|
import "./JsonlStore-BqF7AQ6E.js";
|
|
6
6
|
import "./globalPidIndex-CRH9L9tn.js";
|
|
@@ -5,10 +5,10 @@ import "./pidStore-DXWqzTSz.js";
|
|
|
5
5
|
import "./messageLog-Brx3w6zT.js";
|
|
6
6
|
import "./e2e-z1xpwSAg.js";
|
|
7
7
|
import "./configShared-DKTgiz7K.js";
|
|
8
|
-
import {
|
|
8
|
+
import { Z as renderLogTailLines, _ as deriveLiveState, j as isPidAlive, z as listRecords } from "./subcommands-CFVFLCuJ.js";
|
|
9
9
|
import { f as readInbox, g as daemonLockOwnerPath, h as daemonLockDir, i as gcInboxes, l as listInboxParents, m as shouldStealLock, n as appendEvent, s as hostId, u as liveWatchers, x as notifyDir } from "./notifyStore-2SWKGwZI.js";
|
|
10
10
|
import "./webrtcLink-DFRyWNMs.js";
|
|
11
|
-
import "./remotes-
|
|
11
|
+
import "./remotes-B4v0Nowo.js";
|
|
12
12
|
import { mkdir, readFile, rename, rm, stat, writeFile } from "fs/promises";
|
|
13
13
|
import { randomUUID } from "node:crypto";
|
|
14
14
|
import { execFile, execFileSync } from "node:child_process";
|
|
@@ -879,4 +879,4 @@ async function ensureDaemon() {
|
|
|
879
879
|
|
|
880
880
|
//#endregion
|
|
881
881
|
export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
|
|
882
|
-
//# sourceMappingURL=notifyDaemon-
|
|
882
|
+
//# sourceMappingURL=notifyDaemon-wT-mtu1E.js.map
|
|
@@ -338,7 +338,7 @@ async function isParentWatching(parentWrapperPid, parentAgentPid, selfAgentPid,
|
|
|
338
338
|
logger.debug("[parent-ping] watcher lookup failed:", error);
|
|
339
339
|
}
|
|
340
340
|
try {
|
|
341
|
-
const { lastReadAt, READ_WINDOW_MS } = await import("./subcommands-
|
|
341
|
+
const { lastReadAt, READ_WINDOW_MS } = await import("./subcommands-BNVgv7bt.js");
|
|
342
342
|
const last = await lastReadAt(`agent:${parentAgentPid}`, selfAgentPid);
|
|
343
343
|
if (last !== null && now - last <= READ_WINDOW_MS) return true;
|
|
344
344
|
} catch (error) {
|
|
@@ -466,4 +466,4 @@ function startParentPingLoop(opts) {
|
|
|
466
466
|
|
|
467
467
|
//#endregion
|
|
468
468
|
export { startParentPingLoop };
|
|
469
|
-
//# sourceMappingURL=parentPingLoop-
|
|
469
|
+
//# sourceMappingURL=parentPingLoop-DYL_oSrV.js.map
|
|
@@ -145,23 +145,80 @@ async function resolveWebrtc(link, keyword, label) {
|
|
|
145
145
|
label
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
+
/** What a secret is replaced with in `ay remote ls` / `add` output. */
|
|
149
|
+
const MASK = "***";
|
|
150
|
+
/**
|
|
151
|
+
* A saved remote URL with every embedded secret replaced by MASK, so listing
|
|
152
|
+
* remotes doesn't print a usable credential into a terminal, a log, or an
|
|
153
|
+
* agent's transcript. Covers every form `ay remote add` stores:
|
|
154
|
+
* webrtc://<room>:<token>@<host> → webrtc://<room>:***@<host>
|
|
155
|
+
* https://…/w/#<room>:<token>[@<sighost>] → https://…/w/#<room>:***[@<sighost>]
|
|
156
|
+
* https://…/room/#room=<id>&s=<token>[&sig=…] → …#room=<id>&s=***[&sig=…]
|
|
157
|
+
* https://…/#k=<token> → https://…/#k=***
|
|
158
|
+
* http://<token>@host:port → http://***@host:port
|
|
159
|
+
* The room id is kept: it is shown elsewhere as the remote's label and is not
|
|
160
|
+
* enough to join without the token.
|
|
161
|
+
*/
|
|
162
|
+
function maskRemoteUrl(url) {
|
|
163
|
+
if (/^webrtc:\/\//i.test(url)) return url.replace(/^(webrtc:\/\/[^:]*:)[^@]*/i, `$1${MASK}`);
|
|
164
|
+
if (!/^https?:\/\//i.test(url)) return url;
|
|
165
|
+
const hashAt = url.indexOf("#");
|
|
166
|
+
const base = (hashAt >= 0 ? url.slice(0, hashAt) : url).replace(/^(https?:\/\/)[^/@]+@/i, `$1${MASK}@`);
|
|
167
|
+
if (hashAt < 0) return base;
|
|
168
|
+
const frag = url.slice(hashAt + 1);
|
|
169
|
+
if (/^\??[A-Za-z_]+=/.test(frag)) return `${base}#${maskFragmentParams(frag)}`;
|
|
170
|
+
if (/^[^:@]*:/.test(frag)) return `${base}#${frag.replace(/^([^:@]*:)[^@]*/, `$1${MASK}`)}`;
|
|
171
|
+
return `${base}#${maskFragmentParams(frag)}`;
|
|
172
|
+
}
|
|
173
|
+
/** Secret-bearing fragment keys: `s` (room secret) and `k` (`ay share` token). */
|
|
174
|
+
const SECRET_KEYS = new Set(["s", "k"]);
|
|
175
|
+
/**
|
|
176
|
+
* Mask the values of SECRET_KEYS in a key=value fragment. Keys are compared
|
|
177
|
+
* after the same decoding URLSearchParams applies when the link is USED
|
|
178
|
+
* (`%73=` is `s=`, `+` is a space), so an encoded spelling can't slip a
|
|
179
|
+
* working secret past the mask.
|
|
180
|
+
*/
|
|
181
|
+
function maskFragmentParams(frag) {
|
|
182
|
+
const lead = frag.startsWith("?") ? "?" : "";
|
|
183
|
+
return lead + frag.slice(lead.length).split("&").map((part) => {
|
|
184
|
+
const eq = part.indexOf("=");
|
|
185
|
+
const rawKey = eq >= 0 ? part.slice(0, eq) : part;
|
|
186
|
+
const key = decodeMaybe(rawKey.replace(/\+/g, " ")).trim().toLowerCase();
|
|
187
|
+
return SECRET_KEYS.has(key) ? `${rawKey}=${MASK}` : part;
|
|
188
|
+
}).join("&");
|
|
189
|
+
}
|
|
190
|
+
/** A bare token for display: MASK, or the token itself with --show-secrets. */
|
|
191
|
+
function displayToken(token, showSecrets) {
|
|
192
|
+
return showSecrets ? token : MASK;
|
|
193
|
+
}
|
|
148
194
|
async function cmdRemote(rest) {
|
|
149
195
|
const sub = rest[0];
|
|
150
196
|
if (sub === "-h" || sub === "--help") {
|
|
151
|
-
process.stdout.write("Usage: ay remote <subcommand>\n\nManage saved remote server aliases.\n\nSubcommands:\n ay remote ls
|
|
197
|
+
process.stdout.write("Usage: ay remote <subcommand>\n\nManage saved remote server aliases.\n\nSubcommands:\n ay remote ls [--show-secrets] list configured remotes\n (tokens are masked unless --show-secrets)\n ay remote add <alias> http://<token>@<host>:<port> add an http remote\n ay remote add <alias> webrtc://<room>:<token>@<host> add a WebRTC share remote\n ay remote add <alias> https://agent-yes.com/w/#<room>:<token> (share link form)\n ay remote add <alias> https://<host>/ay/#k=<token> (an `ay share` URL)\n ay remote rm <alias> remove a remote\n\nOnce added, use the alias anywhere a keyword is accepted:\n ay ls <alias>\n ay tail <alias>:<keyword>\n ay send <alias>:<keyword> \"message\"\n");
|
|
152
198
|
return 0;
|
|
153
199
|
}
|
|
154
|
-
if (!sub || sub === "ls" || sub === "list") {
|
|
200
|
+
if (!sub || sub === "ls" || sub === "list" || sub.startsWith("-")) {
|
|
201
|
+
const flags = sub && !sub.startsWith("-") ? rest.slice(1) : rest;
|
|
202
|
+
const unknown = flags.filter((f) => f !== "--show-secrets");
|
|
203
|
+
if (unknown.length) {
|
|
204
|
+
process.stderr.write(`ay remote ls: unknown argument '${unknown[0]}' (only --show-secrets)\n`);
|
|
205
|
+
return 1;
|
|
206
|
+
}
|
|
207
|
+
const showSecrets = flags.includes("--show-secrets");
|
|
155
208
|
const remotes = await readRemotes();
|
|
156
209
|
if (remotes.size === 0) {
|
|
157
210
|
process.stdout.write("no remotes configured\n");
|
|
158
211
|
process.stderr.write("\n ay remote add <alias> http://<token>@<host>:<port> # add a remote\n ay serve # start server (prints token)\n");
|
|
159
212
|
return 0;
|
|
160
213
|
}
|
|
214
|
+
let masked = false;
|
|
161
215
|
for (const [alias, cfg] of remotes) {
|
|
162
|
-
const
|
|
163
|
-
|
|
216
|
+
const url = showSecrets ? cfg.url : maskRemoteUrl(cfg.url);
|
|
217
|
+
const token = cfg.token ? `\ttoken:${displayToken(cfg.token, showSecrets)}` : "";
|
|
218
|
+
masked ||= url !== cfg.url || !!cfg.token && !showSecrets;
|
|
219
|
+
process.stdout.write(`${alias}\t${url}${token}\n`);
|
|
164
220
|
}
|
|
221
|
+
if (masked) process.stderr.write(`\n ay remote ls --show-secrets # reveal tokens\n`);
|
|
165
222
|
return 0;
|
|
166
223
|
}
|
|
167
224
|
if (sub === "add") {
|
|
@@ -176,7 +233,7 @@ async function cmdRemote(rest) {
|
|
|
176
233
|
url: rawUrl,
|
|
177
234
|
token: ""
|
|
178
235
|
});
|
|
179
|
-
process.stdout.write(`remote '${alias}' added → ${rawUrl} (webrtc)\n`);
|
|
236
|
+
process.stdout.write(`remote '${alias}' added → ${maskRemoteUrl(rawUrl)} (webrtc)\n`);
|
|
180
237
|
process.stderr.write(`\n ay ls ${alias} # list agents on ${alias}\n`);
|
|
181
238
|
return 0;
|
|
182
239
|
}
|
|
@@ -263,5 +320,5 @@ async function cmdConnect(rest) {
|
|
|
263
320
|
}
|
|
264
321
|
|
|
265
322
|
//#endregion
|
|
266
|
-
export {
|
|
267
|
-
//# sourceMappingURL=remotes-
|
|
323
|
+
export { deleteRemoteAlias as a, parseShareUrl as c, writeRemoteAlias as d, defaultConnectAlias as i, readRemotes as l, cmdConnect as n, maskRemoteUrl as o, cmdRemote as r, parseDirectRemoteSpec as s, MASK as t, resolveRemoteSpec as u };
|
|
324
|
+
//# sourceMappingURL=remotes-B4v0Nowo.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import "./e2e-z1xpwSAg.js";
|
|
2
|
+
import "./webrtcLink-DFRyWNMs.js";
|
|
3
|
+
import { a as deleteRemoteAlias, c as parseShareUrl, d as writeRemoteAlias, i as defaultConnectAlias, l as readRemotes, n as cmdConnect, o as maskRemoteUrl, r as cmdRemote, s as parseDirectRemoteSpec, t as MASK, u as resolveRemoteSpec } from "./remotes-B4v0Nowo.js";
|
|
4
|
+
|
|
5
|
+
export { cmdConnect, cmdRemote };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./versionChecker-
|
|
2
|
-
import { a as findSpawnHiddenLauncher, c as getBinDir, d as getRustBinary, f as hasValidMacSignature, i as findRustBinary, l as getBinaryName, n as downloadBinary, o as findTrayLauncher, r as findAyrsBinary, s as gcOldBinaryDirs, t as devBuildInfo, u as getDownloadUrl } from "./rustBinary-
|
|
1
|
+
import "./versionChecker-pTpboio4.js";
|
|
2
|
+
import { a as findSpawnHiddenLauncher, c as getBinDir, d as getRustBinary, f as hasValidMacSignature, i as findRustBinary, l as getBinaryName, n as downloadBinary, o as findTrayLauncher, r as findAyrsBinary, s as gcOldBinaryDirs, t as devBuildInfo, u as getDownloadUrl } from "./rustBinary-DGb3sdEw.js";
|
|
3
3
|
|
|
4
4
|
export { findAyrsBinary, gcOldBinaryDirs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getInstalledPackage, n as compareVersions } from "./versionChecker-
|
|
1
|
+
import { i as getInstalledPackage, n as compareVersions } from "./versionChecker-pTpboio4.js";
|
|
2
2
|
import { execFileSync } from "child_process";
|
|
3
3
|
import { existsSync, mkdirSync, readdirSync, rmSync, statSync, unlinkSync } from "fs";
|
|
4
4
|
import { chmod, copyFile } from "fs/promises";
|
|
@@ -371,4 +371,4 @@ async function getRustBinary(options = {}) {
|
|
|
371
371
|
|
|
372
372
|
//#endregion
|
|
373
373
|
export { findSpawnHiddenLauncher as a, getBinDir as c, getRustBinary as d, hasValidMacSignature as f, findRustBinary as i, getBinaryName as l, downloadBinary as n, findTrayLauncher as o, findAyrsBinary as r, gcOldBinaryDirs as s, devBuildInfo as t, getDownloadUrl as u };
|
|
374
|
-
//# sourceMappingURL=rustBinary-
|
|
374
|
+
//# sourceMappingURL=rustBinary-DGb3sdEw.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import "./ts-
|
|
2
|
+
import "./versionChecker-pTpboio4.js";
|
|
3
|
+
import "./ts-CPR985mz.js";
|
|
4
4
|
import "./todoAutomation-CbVVS4re.js";
|
|
5
5
|
import "./JsonlStore-BqF7AQ6E.js";
|
|
6
6
|
import "./globalPidIndex-CRH9L9tn.js";
|
|
7
7
|
import "./pidStore-DXWqzTSz.js";
|
|
8
8
|
import "./messageLog-Brx3w6zT.js";
|
|
9
9
|
import "./todoStore-DF6vxHgV.js";
|
|
10
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
10
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C-5idp3R.js";
|
|
11
11
|
import { f as resolveSpawnCwd } from "./workspaceConfig-DTvPtr5j.js";
|
|
12
12
|
import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-CipjIwfO.js";
|
|
13
13
|
import { createHash } from "node:crypto";
|
|
@@ -154,4 +154,4 @@ async function cmdSchedule(rest) {
|
|
|
154
154
|
|
|
155
155
|
//#endregion
|
|
156
156
|
export { cmdSchedule };
|
|
157
|
-
//# sourceMappingURL=schedule-
|
|
157
|
+
//# sourceMappingURL=schedule-BQEUD3h2.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import { i as getInstalledPackage } from "./versionChecker-
|
|
3
|
-
import { a 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 { i as getInstalledPackage } from "./versionChecker-pTpboio4.js";
|
|
3
|
+
import { a as findSpawnHiddenLauncher } from "./rustBinary-DGb3sdEw.js";
|
|
4
|
+
import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-CPR985mz.js";
|
|
5
5
|
import { t as agentYesHome$1 } from "./agentYesHome-BNtn19J4.js";
|
|
6
6
|
import { u as removeControlCharacters } from "./todoAutomation-CbVVS4re.js";
|
|
7
7
|
import "./JsonlStore-BqF7AQ6E.js";
|
|
@@ -12,19 +12,19 @@ import { t as pgidForWrapper } from "./reaper-UimuuTfO.js";
|
|
|
12
12
|
import "./todoStore-DF6vxHgV.js";
|
|
13
13
|
import "./e2e-z1xpwSAg.js";
|
|
14
14
|
import "./configShared-DKTgiz7K.js";
|
|
15
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
16
|
-
import {
|
|
15
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C-5idp3R.js";
|
|
16
|
+
import { $ as renderRawLogLines, I as isUserTyping, J as readPtysize, K as readLogForRender, M as isSlashCommand, Q as renderRawLog, S as extractBadges, T as extractTaskCounts, X as recentReadEdges, Y as recentMessageEdges, Z as renderLogTailLines, d as cliDefaults, et as resolveOne, ft as writeToIpc, gt as TYPING_BADGE, ht as shouldFramePaste, m as controlCodeFromName, mt as framePaste, ot as snapshotStatus, pt as withIpcLock, q as readNotes, v as deriveLiveStatus, w as extractNeedsInput, z as listRecords } from "./subcommands-CFVFLCuJ.js";
|
|
17
17
|
import { c as isTransientLockMkdirError } from "./notifyStore-2SWKGwZI.js";
|
|
18
18
|
import { i as toWebrtcUrl, n as isWebrtcSpec } from "./webrtcLink-DFRyWNMs.js";
|
|
19
|
-
import "./remotes-
|
|
19
|
+
import "./remotes-B4v0Nowo.js";
|
|
20
20
|
import { i as frameVisitorMessage, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-Bl2gGcxg.js";
|
|
21
|
-
import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-
|
|
21
|
+
import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-BoCEpJ3Z.js";
|
|
22
22
|
import { n as sampleTrees } from "./procStats-CyD8h5nx.js";
|
|
23
23
|
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-DTvPtr5j.js";
|
|
24
24
|
import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-CipjIwfO.js";
|
|
25
|
-
import { i as importProvisionModule } from "./ws-
|
|
25
|
+
import { i as importProvisionModule } from "./ws-BhV8FLVX.js";
|
|
26
26
|
import { r as spawnRejectionReason } from "./spawnGate-YpHopveO.js";
|
|
27
|
-
import { i as launchTray } from "./trayApp-
|
|
27
|
+
import { i as launchTray } from "./trayApp-wUiHykPM.js";
|
|
28
28
|
import yargs from "yargs";
|
|
29
29
|
import { appendFile, mkdir, open, readFile, readdir, rename, rm, stat, unlink, writeFile } from "fs/promises";
|
|
30
30
|
import { arch, cpus, freemem, homedir, hostname, loadavg, platform, totalmem, uptime, userInfo } from "os";
|
|
@@ -1299,19 +1299,28 @@ function explicitWebrtcUrl(args) {
|
|
|
1299
1299
|
}
|
|
1300
1300
|
}
|
|
1301
1301
|
}
|
|
1302
|
-
|
|
1303
|
-
|
|
1302
|
+
const DAEMON_PROBE_TIMEOUT_MS = 15e3;
|
|
1303
|
+
async function probeDaemon(port, token, timeoutMs = DAEMON_PROBE_TIMEOUT_MS) {
|
|
1304
|
+
if (port === null) return { kind: "down" };
|
|
1304
1305
|
try {
|
|
1305
1306
|
const r = await fetch(`http://127.0.0.1:${port}/api/version`, {
|
|
1306
1307
|
headers: { Authorization: `Bearer ${token}` },
|
|
1307
|
-
signal: AbortSignal.timeout(
|
|
1308
|
+
signal: AbortSignal.timeout(timeoutMs)
|
|
1308
1309
|
});
|
|
1309
|
-
if (!r.ok) return
|
|
1310
|
-
return
|
|
1311
|
-
|
|
1312
|
-
|
|
1310
|
+
if (!r.ok) return { kind: "down" };
|
|
1311
|
+
return {
|
|
1312
|
+
kind: "ok",
|
|
1313
|
+
version: (await r.json()).version ?? null
|
|
1314
|
+
};
|
|
1315
|
+
} catch (e) {
|
|
1316
|
+
const name = e?.name;
|
|
1317
|
+
return name === "TimeoutError" || name === "AbortError" ? { kind: "slow" } : { kind: "down" };
|
|
1313
1318
|
}
|
|
1314
1319
|
}
|
|
1320
|
+
async function fetchDaemonVersion(port, token) {
|
|
1321
|
+
const p = await probeDaemon(port, token);
|
|
1322
|
+
return p.kind === "ok" ? p.version : null;
|
|
1323
|
+
}
|
|
1315
1324
|
async function cmdServeStartStop(sub) {
|
|
1316
1325
|
const mgr = resolveDaemonManager();
|
|
1317
1326
|
if (!mgr) {
|
|
@@ -1576,7 +1585,8 @@ async function cmdServeStatus(args) {
|
|
|
1576
1585
|
const webrtcish = a.some((x) => x.startsWith("--webrtc") || x.startsWith("--share"));
|
|
1577
1586
|
const httpish = a.some((x) => x.startsWith("--http") || x.startsWith("--share")) || !a.some((x) => x.startsWith("--webrtc"));
|
|
1578
1587
|
const mode = httpish && webrtcish ? "http+webrtc" : webrtcish ? "webrtc" : "http";
|
|
1579
|
-
const
|
|
1588
|
+
const probe = httpish && token ? await probeDaemon(port, token) : { kind: "down" };
|
|
1589
|
+
const runningVersion = probe.kind === "ok" ? probe.version : null;
|
|
1580
1590
|
const current = getInstalledPackage().version;
|
|
1581
1591
|
const share = shareLinkStatus(shareLink, installed, webrtcish);
|
|
1582
1592
|
if (json) {
|
|
@@ -1588,6 +1598,7 @@ async function cmdServeStatus(args) {
|
|
|
1588
1598
|
port: httpish ? port : null,
|
|
1589
1599
|
localUrl: httpish ? localUrl : null,
|
|
1590
1600
|
reachable: runningVersion !== null,
|
|
1601
|
+
probe: probe.kind,
|
|
1591
1602
|
runningVersion,
|
|
1592
1603
|
currentVersion: current,
|
|
1593
1604
|
upToDate: runningVersion !== null && runningVersion === current,
|
|
@@ -1611,7 +1622,10 @@ async function cmdServeStatus(args) {
|
|
|
1611
1622
|
const tag = runningVersion === current ? "up to date" : `outdated (current v${current})`;
|
|
1612
1623
|
w(`http api: reachable ${local ? `via ${localUrl}` : `on 127.0.0.1:${port}`} — v${runningVersion} (${tag})`);
|
|
1613
1624
|
} else if (mode === "webrtc") w(`http api: none (webrtc-only)`);
|
|
1614
|
-
else
|
|
1625
|
+
else {
|
|
1626
|
+
const where = local ? `via ${localUrl}` : `on 127.0.0.1:${port}`;
|
|
1627
|
+
w(probe.kind === "slow" ? `http api: listening ${where} but did not answer within ${DAEMON_PROBE_TIMEOUT_MS / 1e3}s — the daemon is up and the host is overloaded, not down` : `http api: not reachable ${where} (not running)`);
|
|
1628
|
+
}
|
|
1615
1629
|
w(`token: ${token ?? "(none yet — created on first serve)"}`);
|
|
1616
1630
|
if (share.link) if (share.stale) {
|
|
1617
1631
|
w(`share link: (stale) ${share.link}`);
|
|
@@ -1690,7 +1704,7 @@ Options:
|
|
|
1690
1704
|
const { planRustServe } = await import("./serveRust-DDQiZmMf.js");
|
|
1691
1705
|
const plan = planRustServe(rest);
|
|
1692
1706
|
if (plan.kind === "rust") {
|
|
1693
|
-
const { findAyrsBinary } = await import("./rustBinary-
|
|
1707
|
+
const { findAyrsBinary } = await import("./rustBinary-BYXCnEzJ.js");
|
|
1694
1708
|
const ayrs = findAyrsBinary();
|
|
1695
1709
|
if (ayrs) return runAyrsServe(ayrs, plan.argv);
|
|
1696
1710
|
process.stderr.write("ay serve: ayrs binary not found — running the TypeScript server (bun run build:rs, or reinstall, to get the Rust daemon)\n");
|
|
@@ -2665,7 +2679,7 @@ Options:
|
|
|
2665
2679
|
}
|
|
2666
2680
|
});
|
|
2667
2681
|
if (req.method === "GET" && p === "/api/ws") {
|
|
2668
|
-
const ws = await import("./ws-
|
|
2682
|
+
const ws = await import("./ws-B3n0JCmy.js");
|
|
2669
2683
|
try {
|
|
2670
2684
|
await ws.loadProvision();
|
|
2671
2685
|
} catch (e) {
|
|
@@ -2685,7 +2699,7 @@ Options:
|
|
|
2685
2699
|
if (req.method === "GET" && p === "/api/ws/status") {
|
|
2686
2700
|
const dirRaw = url.searchParams.get("path");
|
|
2687
2701
|
if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
|
|
2688
|
-
const ws = await import("./ws-
|
|
2702
|
+
const ws = await import("./ws-B3n0JCmy.js");
|
|
2689
2703
|
let prov;
|
|
2690
2704
|
try {
|
|
2691
2705
|
prov = await ws.loadProvision();
|
|
@@ -2707,7 +2721,7 @@ Options:
|
|
|
2707
2721
|
}
|
|
2708
2722
|
}
|
|
2709
2723
|
if (req.method === "GET" && p === "/api/ws/repos") {
|
|
2710
|
-
const ws = await import("./ws-
|
|
2724
|
+
const ws = await import("./ws-B3n0JCmy.js");
|
|
2711
2725
|
try {
|
|
2712
2726
|
await ws.loadProvision();
|
|
2713
2727
|
} catch (e) {
|
|
@@ -2788,7 +2802,7 @@ Options:
|
|
|
2788
2802
|
const m = /^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/.exec(repoParam);
|
|
2789
2803
|
if (!m || m[1] === "." || m[1] === ".." || m[2] === "." || m[2] === "..") return new Response("missing/invalid ?repo=<owner>/<repo>", { status: 400 });
|
|
2790
2804
|
const [, owner, repo] = m;
|
|
2791
|
-
const ws = await import("./ws-
|
|
2805
|
+
const ws = await import("./ws-B3n0JCmy.js");
|
|
2792
2806
|
let prov;
|
|
2793
2807
|
try {
|
|
2794
2808
|
prov = await ws.loadProvision();
|
|
@@ -3706,7 +3720,7 @@ Options:
|
|
|
3706
3720
|
const perm = body.perm ?? "r";
|
|
3707
3721
|
if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
|
|
3708
3722
|
try {
|
|
3709
|
-
const { createScopedShare } = await import("./agentShare-
|
|
3723
|
+
const { createScopedShare } = await import("./agentShare-Bt_vRAdp.js");
|
|
3710
3724
|
const share = await createScopedShare({
|
|
3711
3725
|
agent: body.agent,
|
|
3712
3726
|
perm,
|
|
@@ -3721,12 +3735,12 @@ Options:
|
|
|
3721
3735
|
}
|
|
3722
3736
|
}
|
|
3723
3737
|
if (req.method === "GET" && p === "/api/shares") {
|
|
3724
|
-
const { listShares } = await import("./agentShare-
|
|
3738
|
+
const { listShares } = await import("./agentShare-Bt_vRAdp.js");
|
|
3725
3739
|
return Response.json(listShares());
|
|
3726
3740
|
}
|
|
3727
3741
|
const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
|
|
3728
3742
|
if (req.method === "DELETE" && revokeM) {
|
|
3729
|
-
const { revokeShare } = await import("./agentShare-
|
|
3743
|
+
const { revokeShare } = await import("./agentShare-Bt_vRAdp.js");
|
|
3730
3744
|
const ok = revokeShare(decodeURIComponent(revokeM[1]));
|
|
3731
3745
|
return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
|
|
3732
3746
|
}
|
|
@@ -4038,7 +4052,7 @@ Options:
|
|
|
4038
4052
|
const shutdown = (resolve) => {
|
|
4039
4053
|
if (heartbeat) clearInterval(heartbeat);
|
|
4040
4054
|
closeShare?.();
|
|
4041
|
-
import("./agentShare-
|
|
4055
|
+
import("./agentShare-Bt_vRAdp.js").then((m) => m.revokeAllShares()).catch(() => {});
|
|
4042
4056
|
server?.stop();
|
|
4043
4057
|
Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
|
|
4044
4058
|
};
|
|
@@ -4051,4 +4065,4 @@ Options:
|
|
|
4051
4065
|
|
|
4052
4066
|
//#endregion
|
|
4053
4067
|
export { cmdServe, inspectServeDaemon, loadTokenReadOnly, mintScopedTermToken, resolveDaemonHttpBase, resolveLocalServeUrl };
|
|
4054
|
-
//# sourceMappingURL=serve-
|
|
4068
|
+
//# sourceMappingURL=serve-DknfTqkm.js.map
|
|
@@ -97,7 +97,7 @@ async function cmdSetup(rest) {
|
|
|
97
97
|
} catch {}
|
|
98
98
|
if (noShare) return 0;
|
|
99
99
|
process.stdout.write(`\nsharing this machine to agent-yes.com…\n`);
|
|
100
|
-
const { cmdServe } = await import("./serve-
|
|
100
|
+
const { cmdServe } = await import("./serve-DknfTqkm.js");
|
|
101
101
|
return cmdServe([
|
|
102
102
|
"install",
|
|
103
103
|
"--share",
|
|
@@ -107,4 +107,4 @@ async function cmdSetup(rest) {
|
|
|
107
107
|
|
|
108
108
|
//#endregion
|
|
109
109
|
export { cmdSetup };
|
|
110
|
-
//# sourceMappingURL=setup
|
|
110
|
+
//# sourceMappingURL=setup-B13FgF2W.js.map
|