agent-yes 1.306.3 → 1.307.0-beta.820.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 +35 -0
- package/dist/{JsonlStore-CB_0sfdT.js → JsonlStore-fEAVg5aY.js} +1 -1
- package/dist/{SUPPORTED_CLIS-XUv7pAhg.js → SUPPORTED_CLIS-DH-le_qK.js} +2 -2
- package/dist/SUPPORTED_CLIS-VJI2s5ow.js +12 -0
- package/dist/agent-yes.config-ByXwI-t3.js +47 -0
- package/dist/agentPermissions-CgM1bl6m.js +62 -0
- package/dist/{agentShare-DHslHOe9.js → agentShare-DPdNmy77.js} +14 -14
- package/dist/{askCli-D4czi-_j.js → askCli-DNjFBBqa.js} +6 -6
- package/dist/{browser-BW90gl2w.js → browser-BzjhscIR.js} +5 -5
- package/dist/{browser-BAFPmEvN.js → browser-CU933aYj.js} +1 -1
- package/dist/{callback-BbDa82Yw.js → callback-DEHuyEpm.js} +5 -5
- package/dist/callback-gixVvm9O.js +17 -0
- package/dist/{callbackCore-Deve5pv3.js → callbackCore-CaLG7aPo.js} +1 -1
- package/dist/{callbackCore-BZ_10zyc.js → callbackCore-D9X-BW1Y.js} +1 -1
- package/dist/{channels-jIa5fNjY.js → channels-BGSdyeQs.js} +2 -2
- package/dist/{channels-Y36S0ccW.js → channels-wGkKOk1z.js} +6 -6
- package/dist/channels.js +5 -5
- package/dist/cli.js +60 -15
- package/dist/{cmdDsh-DZ8bLsH7.js → cmdDsh-Buh6yx_Z.js} +1 -1
- package/dist/{cmdKill-DUyZ7Dch.js → cmdKill-CxvLEa4Z.js} +5 -5
- package/dist/{cmdPs-D_9k-_up.js → cmdPs-Akqw7xBH.js} +14 -14
- package/dist/{agent-yes.config-CRfpdp3A.js → configLoader-CLSX_LND.js} +4 -42
- package/dist/configLoader-D9O9zwKR.js +5 -0
- package/dist/{configShared-De4bR5hH.js → configShared-B9gyn11R.js} +1 -1
- package/dist/{cwdConflictWarn-ml6Qs3Qu.js → cwdConflictWarn-Bo-MXcHc.js} +2 -2
- package/dist/{cwdPassthroughHint-CzWh0hrw.js → cwdPassthroughHint-yMqzDqR-.js} +1 -1
- package/dist/detach-CUPQbXtv.js +58 -0
- package/dist/{e2e-BdLf8DvY.js → e2e-C34A1uYu.js} +1 -1
- package/dist/{expose-Bhsn5yUz.js → expose-DUTNNQ7K.js} +1 -1
- package/dist/{forceKill-BDqxx4uQ.js → forceKill-BqPcVAsI.js} +2 -2
- package/dist/{forkNested-DHuYbpaf.js → forkNested-NWzwReQd.js} +3 -3
- package/dist/{globalPidIndex-DmDCB_X7.js → globalPidIndex-B5c_g_yJ.js} +1 -1
- package/dist/{globalPidIndex-C6p_AY4D.js → globalPidIndex-D9fxq9Ad.js} +10 -2
- package/dist/{hist-DY16wm7g.js → hist-DuebYWNr.js} +1 -1
- package/dist/{html2canvas-pro.esm-Dp-JZojz.js → html2canvas-pro.esm-BW1GOcB-.js} +1 -1
- package/dist/{identity-puvd7hVQ.js → identity-CcRmDe4W.js} +1 -1
- package/dist/{identity-D3hr59eC.js → identity-DlZbkJQS.js} +1 -1
- package/dist/index.js +8 -8
- package/dist/{initMsg-GPU52N-j.js → initMsg-Ccwt3Zl0.js} +1 -1
- package/dist/{initMsg-BEVDWYnv.js → initMsg-DVDdYJsR.js} +1 -1
- package/dist/launch-BRXNFCBA.js +74 -0
- package/dist/launch-CMznER0r.js +3 -0
- package/dist/{messageLog-CEqe4Hk1.js → messageLog-BrXNxItW.js} +1 -1
- package/dist/{needsInput-hRiWFjGy.js → needsInput-YjRIX-lx.js} +1 -1
- package/dist/{nodeRuntime-DGMQRTGT.js → nodeRuntime-B-N-Vmy5.js} +1 -1
- package/dist/{notifyDaemon-Dsb009Id.js → notifyDaemon-D3F9_xkB.js} +13 -13
- package/dist/{notifyStore-DIfkfKB2.js → notifyStore--pUbdH-t.js} +1 -1
- package/dist/{notifyStore-C4pH_-zJ.js → notifyStore-Cr4L1LJB.js} +1 -1
- package/dist/{openBrowser-CQAOIrD6.js → openBrowser-DrT49KoY.js} +1 -1
- package/dist/{oxmgrService-DlYHmqyI.js → oxmgrService-BEkkVQ_I.js} +2 -2
- package/dist/oxmgrService-CXDx2gq-.js +3 -0
- package/dist/{parentLink-B7_kEM1v.js → parentLink-DJCkwoxE.js} +2 -2
- package/dist/{parentLink-UiM6WoKm.js → parentLink-eU8ZWi1k.js} +2 -2
- package/dist/{parentPingLoop-cXg1hXg0.js → parentPingLoop-Cfjiq_kt.js} +7 -7
- package/dist/peer-BSZQbKB7.js +4 -0
- package/dist/{peer-L-prov9t.js → peer-DI_xxui8.js} +3 -3
- package/dist/pidStore-BRU1Q0uN.js +6 -0
- package/dist/{pidStore-DUXifdBr.js → pidStore-DXEbQrh-.js} +3 -3
- package/dist/{procStats-DwTxj3rs.js → procStats-BvbPF1a2.js} +1 -1
- package/dist/{reaper-DsZhX5FH.js → reaper-A_eEjMxS.js} +1 -1
- package/dist/{reaper-C2cuougX.js → reaper-BTfq0-5j.js} +1 -1
- package/dist/{remotes-BqLoB5GR.js → remotes-DuCBbfG8.js} +3 -3
- package/dist/{remotes-BsMGvAay.js → remotes-Mcv47Ik8.js} +3 -3
- package/dist/{roomReplyAlias-B-v76TA8.js → roomReplyAlias-DcBAdDfr.js} +3 -3
- package/dist/roomReplyAlias-YVKAzxv-.js +6 -0
- package/dist/runner-Cqa0n41s.js +530 -0
- package/dist/{runningLock-DMznYh45.js → runningLock-DaVbNt4d.js} +1 -1
- package/dist/{rustBinary-0BGlZPM2.js → rustBinary-CYTolquW.js} +2 -2
- package/dist/{rustBinary-BaadP-ZC.js → rustBinary-VsMJc0r1.js} +2 -2
- package/dist/{schedule-CEZ-hTWV.js → schedule-DVOB4DDY.js} +57 -16
- package/dist/{schedulesCli-CLqieyQZ.js → schedules-CyCEXjq3.js} +2 -339
- package/dist/schedulesCli-1fgNuPVC.js +343 -0
- package/dist/{senderAncestry-KhAUPCQs.js → senderAncestry-C-hBTX_v.js} +1 -1
- package/dist/{senderAncestry-CVHeKk1Y.js → senderAncestry-DAO9fNCT.js} +1 -1
- package/dist/{serve-CuqQMmlO.js → serve-DtV8A_mY.js} +58 -50
- package/dist/{serveRust-BfWkeL6T.js → serveRust-CvXeHHZD.js} +3 -3
- package/dist/{setup-D2hLlUYT.js → setup-DUsQQDKJ.js} +4 -4
- package/dist/{share-CbFetL5H.js → share-BJ78YmNu.js} +2 -2
- package/dist/{share-_TPYAGWC.js → share-Bq8CEWOU.js} +2 -2
- package/dist/{shareCmd-DbMp0rph.js → shareCmd-ERmMzHuV.js} +10 -10
- package/dist/spawnGate-BLLSFzwz.js +5 -0
- package/dist/{spawnGate-3YSXiRFS.js → spawnGate-BbXnT_bJ.js} +3 -3
- package/dist/{store-xmBpqPUq.js → store-MjCqeJDI.js} +1 -1
- package/dist/{subcommands-7SrEP-BA.js → subcommands-BtK8rqa4.js} +43 -42
- package/dist/{subcommands-_Neez7D-.js → subcommands-tx8hO0Cv.js} +12 -12
- package/dist/{systemPathLink-Y3iC7bYV.js → systemPathLink-D4w0d1g_.js} +1 -1
- package/dist/{terminal-iUqKIceC.js → terminal-B6At0dCd.js} +2 -2
- package/dist/terminal.js +1 -1
- package/dist/{todoAutomation-CKlrxuZv.js → todoAutomation-KgmnTAsD.js} +2 -2
- package/dist/{todoCli-uJ3nK9j4.js → todoCli-KlmdphDn.js} +6 -6
- package/dist/{todoIdentity-DeDp7LKl.js → todoIdentity--FkENDOE.js} +2 -2
- package/dist/{todoStore-msRCEUi1.js → todoStore-Dre3Yhwt.js} +2 -2
- package/dist/{tray-CLktEN3G.js → tray-B7YfZ0UA.js} +2 -2
- package/dist/{trayApp-l9q9To-G.js → trayApp-CbXqQuJT.js} +2 -2
- package/dist/trayApp-a86LjLSt.js +5 -0
- package/dist/{ts-BLBWiX6i.js → ts-BlQSFhYu.js} +20 -79
- package/dist/{versionChecker-Dt2Aewei.js → versionChecker-DTKtQCee.js} +2 -2
- package/dist/{webrtcLink-DcvacEci.js → webrtcLink-Cknj61A1.js} +2 -2
- package/dist/{webrtcLink-WxS1nTIs.js → webrtcLink-vJVMbW35.js} +2 -2
- package/dist/{webrtcRemote-C3xQyf3u.js → webrtcRemote-BXcSWa2i.js} +3 -3
- package/dist/{widget-_K5rPsLe.js → widget-AiTX9XSl.js} +3 -3
- package/dist/widget.js +1 -1
- package/dist/widgets.js +5 -5
- package/dist/{workspaceConfig-DBgsu81B.js → workspaceConfig-gqJ3pTM4.js} +1 -1
- package/dist/ws-Cut6DEip.js +16 -0
- package/dist/{ws-BCJF2ZKx.js → ws-DX6A3W6M.js} +3 -3
- package/lab/ui/console-logic.js +2 -2
- package/lab/ui/device-sync.js +209 -0
- package/lab/ui/device-transfer.js +99 -0
- package/lab/ui/index.html +129 -40
- package/lab/ui/sw.js +2 -0
- package/package.json +3 -1
- package/ts/cli.ts +40 -1
- package/ts/globalPidIndex.ts +19 -2
- package/ts/parseCliArgs.spec.ts +10 -0
- package/ts/parseCliArgs.ts +22 -0
- package/ts/schedule.ts +51 -1
- package/ts/scheduleSummary.bun.spec.ts +74 -0
- package/ts/serve.ts +11 -0
- package/ts/subcommands.ts +6 -0
- package/dist/SUPPORTED_CLIS-Dvgot0oL.js +0 -12
- package/dist/callback-BnPh1ipj.js +0 -17
- package/dist/oxmgrService-o9L3I6FX.js +0 -3
- package/dist/peer-3F7owPWt.js +0 -4
- package/dist/pidStore-B89BOF_T.js +0 -6
- package/dist/roomReplyAlias-BzWUBkQy.js +0 -6
- package/dist/spawnGate-I4p2fbz7.js +0 -5
- package/dist/trayApp-oEZBU7Cx.js +0 -5
- package/dist/ws-BaBtzqo_.js +0 -16
package/README.md
CHANGED
|
@@ -223,6 +223,7 @@ Send a message to an agent on a 5-field cron (timezone `$AY_CRON_TZ`, default As
|
|
|
223
223
|
ay cron "*/30 9-18 * * 1-5" lane:alpha "progress report please ({now})"
|
|
224
224
|
ay cron ls # id, cron, target, next run, last result
|
|
225
225
|
ay cron rm c1
|
|
226
|
+
ay schedule list --json # read the local timetable as JSON
|
|
226
227
|
ay schedules ls # everything: cron reminders + legacy `ay schedule` jobs
|
|
227
228
|
ay schedules daemon status # the per-machine scheduler daemon
|
|
228
229
|
```
|
|
@@ -711,3 +712,37 @@ be committed.
|
|
|
711
712
|
## License
|
|
712
713
|
|
|
713
714
|
MIT
|
|
715
|
+
|
|
716
|
+
### Claude stream sessions (preview)
|
|
717
|
+
|
|
718
|
+
PTY remains the default. When Claude's own arguments request
|
|
719
|
+
`--output-format stream-json`, `ay` detects the protocol, records `mode: "stream"`,
|
|
720
|
+
and captures NDJSON through pipes in the TypeScript runtime. It does not add
|
|
721
|
+
stream flags to a native invocation:
|
|
722
|
+
|
|
723
|
+
```sh
|
|
724
|
+
ay claude -p --input-format stream-json --output-format stream-json --verbose --replay-user-messages -- "task"
|
|
725
|
+
```
|
|
726
|
+
|
|
727
|
+
`ay --stream claude "task"` is optional shorthand that appends those native
|
|
728
|
+
flags (and the stdio permission protocol). There is no config transport default.
|
|
729
|
+
Output-only stream invocations are also captured; bidirectional sends require
|
|
730
|
+
explicit `--input-format stream-json --replay-user-messages`.
|
|
731
|
+
|
|
732
|
+
Each session writes normalized `<pid>.events.jsonl`, original `<pid>.native.jsonl`,
|
|
733
|
+
and a readable `<pid>.raw.log` under the working directory's `.agent-yes/`.
|
|
734
|
+
Stream capture currently requires macOS or Linux. `ay --detach claude ...` starts a
|
|
735
|
+
background TypeScript wrapper and prints its registered CLI pid.
|
|
736
|
+
Permission requests are recorded; use an explicit Claude permission policy for
|
|
737
|
+
unattended sessions until approval commands are available.
|
|
738
|
+
|
|
739
|
+
Native stream flags also work after the wrapper separator, for example
|
|
740
|
+
`ay --detach claude -- -p --input-format stream-json --output-format stream-json --verbose --replay-user-messages --model haiku "task"`.
|
|
741
|
+
The initial stream task is passed verbatim, without PTY init-message envelopes.
|
|
742
|
+
The registry mirrors active/idle turn transitions, and event files preserve stream
|
|
743
|
+
identity when an older registry writer drops the transport field.
|
|
744
|
+
|
|
745
|
+
This capture-only change rejects `ay send` for stream sessions rather than claiming
|
|
746
|
+
terminal input was delivered. Replay-confirmed stream delivery is added in #562.
|
|
747
|
+
Successful CLI exit also cleans up its detached process group, including remaining
|
|
748
|
+
descendants that inherited the output pipes.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-BlQSFhYu.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-DH-le_qK.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./logger-CDIsZ-Pp.js";
|
|
2
|
+
import "./versionChecker-DTKtQCee.js";
|
|
3
|
+
import "./ts-BlQSFhYu.js";
|
|
4
|
+
import "./todoAutomation-KgmnTAsD.js";
|
|
5
|
+
import "./JsonlStore-fEAVg5aY.js";
|
|
6
|
+
import "./globalPidIndex-D9fxq9Ad.js";
|
|
7
|
+
import "./pidStore-DXEbQrh-.js";
|
|
8
|
+
import "./messageLog-BrXNxItW.js";
|
|
9
|
+
import "./todoStore-Dre3Yhwt.js";
|
|
10
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DH-le_qK.js";
|
|
11
|
+
|
|
12
|
+
export { SUPPORTED_CLIS };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
2
|
+
import { t as loadSharedCliDefaults } from "./configShared-B9gyn11R.js";
|
|
3
|
+
import { n as loadCascadingConfig, r as deepMixin, t as ensureSchemaInConfigFiles } from "./configLoader-CLSX_LND.js";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import os from "node:os";
|
|
6
|
+
import { mkdir } from "node:fs/promises";
|
|
7
|
+
|
|
8
|
+
//#region ts/defineConfig.ts
|
|
9
|
+
async function defineCliYesConfig(cfg) {
|
|
10
|
+
if (typeof cfg === "function") cfg = await cfg({ clis: {} });
|
|
11
|
+
return cfg;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region agent-yes.config.ts
|
|
16
|
+
logger.debug("loading cli-yes.config.ts from " + import.meta.url);
|
|
17
|
+
ensureSchemaInConfigFiles().catch(() => {});
|
|
18
|
+
const configDir = await (async () => {
|
|
19
|
+
const homeConfigDir = path.resolve(os.homedir(), ".agent-yes");
|
|
20
|
+
if (await mkdir(homeConfigDir, { recursive: true }).then(() => true).catch(() => false)) {
|
|
21
|
+
logger.debug("[config] Using home directory:", homeConfigDir);
|
|
22
|
+
return homeConfigDir;
|
|
23
|
+
}
|
|
24
|
+
const tmpConfigDir = path.resolve("/tmp/.agent-yes");
|
|
25
|
+
if (await mkdir(tmpConfigDir, { recursive: true })) {
|
|
26
|
+
logger.debug("[config] Using workspace directory:", tmpConfigDir);
|
|
27
|
+
return tmpConfigDir;
|
|
28
|
+
}
|
|
29
|
+
})();
|
|
30
|
+
const cascadingConfig = await loadCascadingConfig();
|
|
31
|
+
const legacyConfigs = await Promise.all([
|
|
32
|
+
import(path.resolve(os.homedir(), ".agent-yes/config.ts")).catch(() => ({ default: {} })).then((mod) => mod.default),
|
|
33
|
+
import(path.resolve(process.cwd(), "node_modules/.agent-yes/config.ts")).catch(() => ({ default: {} })).then((mod) => mod.default),
|
|
34
|
+
import(path.resolve(process.cwd(), ".agent-yes/config.ts")).catch(() => ({ default: {} })).then((mod) => mod.default)
|
|
35
|
+
]);
|
|
36
|
+
var agent_yes_config_default = deepMixin(await getDefaultConfig(), cascadingConfig, ...legacyConfigs);
|
|
37
|
+
async function getDefaultConfig() {
|
|
38
|
+
return defineCliYesConfig({
|
|
39
|
+
configDir,
|
|
40
|
+
logsDir: configDir && path.resolve(configDir, "logs"),
|
|
41
|
+
clis: await loadSharedCliDefaults(import.meta.url)
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
export { agent_yes_config_default as default };
|
|
47
|
+
//# sourceMappingURL=agent-yes.config-ByXwI-t3.js.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//#region ts/sessionEnv.ts
|
|
2
|
+
const CLAUDE_SESSION_PIN_ENV = [
|
|
3
|
+
"CLAUDECODE",
|
|
4
|
+
"CLAUDE_CODE_SSE_PORT",
|
|
5
|
+
"CLAUDE_CODE_SESSION_ID",
|
|
6
|
+
"CLAUDE_CODE_CHILD_SESSION",
|
|
7
|
+
"CLAUDE_CODE_ENTRYPOINT"
|
|
8
|
+
];
|
|
9
|
+
/** Delete the parent Claude Code session-pin vars from a mutable env map, in
|
|
10
|
+
* place. Idempotent (a no-op when they're already absent, e.g. a console spawn
|
|
11
|
+
* whose env came from freshAgentEnv). Returns the same object for chaining. */
|
|
12
|
+
function stripClaudeSessionPin(env) {
|
|
13
|
+
for (const k of CLAUDE_SESSION_PIN_ENV) delete env[k];
|
|
14
|
+
return env;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region ts/agentPermissions.ts
|
|
19
|
+
/**
|
|
20
|
+
* Flags that disable a CLI's confirmation gate, recognised regardless of what
|
|
21
|
+
* `yesArgs` the config declares.
|
|
22
|
+
*
|
|
23
|
+
* The configured `yesArgs` are the flags `-y` APPENDS; a user is free to pass
|
|
24
|
+
* the same flag directly, and a config that omits `yesArgs` entirely (some CLIs
|
|
25
|
+
* deliberately have none) must not make a genuinely dangerous flag invisible.
|
|
26
|
+
* So the check is the union: configured flags OR any of these.
|
|
27
|
+
*/
|
|
28
|
+
const DANGEROUS_FLAGS = new Set([
|
|
29
|
+
"--dangerously-skip-permissions",
|
|
30
|
+
"--dangerously-bypass-approvals-and-sandbox",
|
|
31
|
+
"--yolo",
|
|
32
|
+
"--full-auto"
|
|
33
|
+
]);
|
|
34
|
+
/** `--flag=value` and `--flag value` must compare equal — match on the flag part. */
|
|
35
|
+
function flagName(arg) {
|
|
36
|
+
const eq = arg.indexOf("=");
|
|
37
|
+
return eq === -1 ? arg : arg.slice(0, eq);
|
|
38
|
+
}
|
|
39
|
+
function derivePermissions(opts) {
|
|
40
|
+
const configured = new Set((opts.yesArgs ?? []).map(flagName).filter(Boolean));
|
|
41
|
+
return {
|
|
42
|
+
skip_permissions: opts.cliArgs.some((a) => {
|
|
43
|
+
const name = flagName(a);
|
|
44
|
+
return configured.has(name) || DANGEROUS_FLAGS.has(name);
|
|
45
|
+
}),
|
|
46
|
+
robust: Boolean(opts.robust),
|
|
47
|
+
auto_continue: Boolean(opts.autoContinue)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* One-word posture for a badge. `skip` is the only one that changes what the
|
|
52
|
+
* agent is ALLOWED to do; the wrapper flags change only how it recovers, so
|
|
53
|
+
* they never soften the label.
|
|
54
|
+
*/
|
|
55
|
+
function permissionBadge(p) {
|
|
56
|
+
if (!p) return null;
|
|
57
|
+
return p.skip_permissions ? "skip" : "prompt";
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
export { stripClaudeSessionPin as i, permissionBadge as n, CLAUDE_SESSION_PIN_ENV as r, derivePermissions as t };
|
|
62
|
+
//# sourceMappingURL=agentPermissions-CgM1bl6m.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./JsonlStore-
|
|
3
|
-
import "./globalPidIndex-
|
|
4
|
-
import "./pidStore-
|
|
5
|
-
import "./messageLog-
|
|
6
|
-
import "./e2e-
|
|
7
|
-
import "./configShared-
|
|
8
|
-
import { ot as resolveOne } from "./subcommands-
|
|
9
|
-
import "./webrtcLink-
|
|
10
|
-
import "./remotes-
|
|
11
|
-
import "./roomReplyAlias-
|
|
12
|
-
import "./notifyStore-
|
|
13
|
-
import "./senderAncestry-
|
|
14
|
-
import { l as startShare } from "./share-
|
|
2
|
+
import "./JsonlStore-fEAVg5aY.js";
|
|
3
|
+
import "./globalPidIndex-D9fxq9Ad.js";
|
|
4
|
+
import "./pidStore-DXEbQrh-.js";
|
|
5
|
+
import "./messageLog-BrXNxItW.js";
|
|
6
|
+
import "./e2e-C34A1uYu.js";
|
|
7
|
+
import "./configShared-B9gyn11R.js";
|
|
8
|
+
import { ot as resolveOne } from "./subcommands-BtK8rqa4.js";
|
|
9
|
+
import "./webrtcLink-Cknj61A1.js";
|
|
10
|
+
import "./remotes-Mcv47Ik8.js";
|
|
11
|
+
import "./roomReplyAlias-DcBAdDfr.js";
|
|
12
|
+
import "./notifyStore--pUbdH-t.js";
|
|
13
|
+
import "./senderAncestry-DAO9fNCT.js";
|
|
14
|
+
import { l as startShare } from "./share-BJ78YmNu.js";
|
|
15
15
|
|
|
16
16
|
//#region ts/agentShare.ts
|
|
17
17
|
const MAX_SHARES = 8;
|
|
@@ -234,4 +234,4 @@ function transformEvent(rawEvent, agentId, forwarded) {
|
|
|
234
234
|
|
|
235
235
|
//#endregion
|
|
236
236
|
export { createScopedShare, listShares, revokeAllShares, revokeShare };
|
|
237
|
-
//# sourceMappingURL=agentShare-
|
|
237
|
+
//# sourceMappingURL=agentShare-DPdNmy77.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./JsonlStore-
|
|
3
|
-
import "./globalPidIndex-
|
|
4
|
-
import { r as openStore } from "./todoStore-
|
|
5
|
-
import { t as formatIdentity } from "./identity-
|
|
6
|
-
import { a as resolveTodoRoot, i as resolveSelf } from "./todoIdentity
|
|
2
|
+
import "./JsonlStore-fEAVg5aY.js";
|
|
3
|
+
import "./globalPidIndex-D9fxq9Ad.js";
|
|
4
|
+
import { r as openStore } from "./todoStore-Dre3Yhwt.js";
|
|
5
|
+
import { t as formatIdentity } from "./identity-CcRmDe4W.js";
|
|
6
|
+
import { a as resolveTodoRoot, i as resolveSelf } from "./todoIdentity--FkENDOE.js";
|
|
7
7
|
import yargs from "yargs";
|
|
8
8
|
import { randomBytes } from "crypto";
|
|
9
9
|
|
|
@@ -269,4 +269,4 @@ async function runAnswerSubcommand(rest, deps) {
|
|
|
269
269
|
|
|
270
270
|
//#endregion
|
|
271
271
|
export { runAnswerSubcommand, runAskSubcommand };
|
|
272
|
-
//# sourceMappingURL=askCli-
|
|
272
|
+
//# sourceMappingURL=askCli-DNjFBBqa.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as randomHex } from "./e2e-
|
|
2
|
-
import { d as parseChannelLink, f as secretFromTopic, o as deriveChannelId, s as deriveRoom } from "./channels-
|
|
3
|
-
import { a as renderThread, c as makeOp, f as hlcSend, n as maxHlc, o as sortOps, r as mergeOps, s as isValidOp } from "./store-
|
|
4
|
-
import { t as ChannelPeer } from "./peer-
|
|
1
|
+
import { d as randomHex } from "./e2e-C34A1uYu.js";
|
|
2
|
+
import { d as parseChannelLink, f as secretFromTopic, o as deriveChannelId, s as deriveRoom } from "./channels-BGSdyeQs.js";
|
|
3
|
+
import { a as renderThread, c as makeOp, f as hlcSend, n as maxHlc, o as sortOps, r as mergeOps, s as isValidOp } from "./store-MjCqeJDI.js";
|
|
4
|
+
import { t as ChannelPeer } from "./peer-DI_xxui8.js";
|
|
5
5
|
|
|
6
6
|
//#region ts/channels/store.browser.ts
|
|
7
7
|
const PREFIX = "ay29ch:";
|
|
@@ -308,4 +308,4 @@ const WIDGET_HTML = `
|
|
|
308
308
|
|
|
309
309
|
//#endregion
|
|
310
310
|
export { AyChannel as t };
|
|
311
|
-
//# sourceMappingURL=browser-
|
|
311
|
+
//# sourceMappingURL=browser-BzjhscIR.js.map
|
|
@@ -13566,4 +13566,4 @@ const XTERM_CSS = `
|
|
|
13566
13566
|
|
|
13567
13567
|
//#endregion
|
|
13568
13568
|
export { AyTerminal as t };
|
|
13569
|
-
//# sourceMappingURL=browser-
|
|
13569
|
+
//# sourceMappingURL=browser-CU933aYj.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as agentYesHome } from "./agentYesHome-JmJC28YX.js";
|
|
2
|
-
import { ot as resolveOne } from "./subcommands-
|
|
3
|
-
import { a as mintCapability, o as parseExpires } from "./callbackCore-
|
|
2
|
+
import { ot as resolveOne } from "./subcommands-BtK8rqa4.js";
|
|
3
|
+
import { a as mintCapability, o as parseExpires } from "./callbackCore-CaLG7aPo.js";
|
|
4
4
|
import { chmodSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { randomBytes } from "node:crypto";
|
|
@@ -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-DtV8A_mY.js");
|
|
76
76
|
const url = await resolveLocalServeUrl();
|
|
77
77
|
if (url) return url;
|
|
78
78
|
} catch {}
|
|
@@ -170,7 +170,7 @@ async function cmdCallback(rest) {
|
|
|
170
170
|
createdAt: Date.now()
|
|
171
171
|
};
|
|
172
172
|
saveStore(all);
|
|
173
|
-
const { buildSnippet } = await import("./callbackCore-
|
|
173
|
+
const { buildSnippet } = await import("./callbackCore-D9X-BW1Y.js");
|
|
174
174
|
w(`callback ${id} → ${record.cli} #${record.pid} @ ${record.cwd}`);
|
|
175
175
|
w(`expires: ${new Date(exp).toISOString()} (${expiresSpec})`);
|
|
176
176
|
w(`endpoint: ${base.replace(/\/+$/, "")}/cb/${cap}`);
|
|
@@ -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-DEHuyEpm.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./logger-CDIsZ-Pp.js";
|
|
2
|
+
import "./JsonlStore-fEAVg5aY.js";
|
|
3
|
+
import "./globalPidIndex-D9fxq9Ad.js";
|
|
4
|
+
import "./pidStore-DXEbQrh-.js";
|
|
5
|
+
import "./messageLog-BrXNxItW.js";
|
|
6
|
+
import "./e2e-C34A1uYu.js";
|
|
7
|
+
import "./configShared-B9gyn11R.js";
|
|
8
|
+
import "./subcommands-BtK8rqa4.js";
|
|
9
|
+
import "./webrtcLink-Cknj61A1.js";
|
|
10
|
+
import "./remotes-Mcv47Ik8.js";
|
|
11
|
+
import "./roomReplyAlias-DcBAdDfr.js";
|
|
12
|
+
import "./notifyStore--pUbdH-t.js";
|
|
13
|
+
import "./senderAncestry-DAO9fNCT.js";
|
|
14
|
+
import "./callbackCore-CaLG7aPo.js";
|
|
15
|
+
import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-DEHuyEpm.js";
|
|
16
|
+
|
|
17
|
+
export { cmdCallback };
|
|
@@ -140,4 +140,4 @@ function buildSnippet(opts) {
|
|
|
140
140
|
|
|
141
141
|
//#endregion
|
|
142
142
|
export { mintCapability as a, frameVisitorMessage as i, MAX_EXPIRES_MS as n, parseExpires as o, buildSnippet as r, verifyCapability as s, MAX_CALLBACK_MSG_BYTES as t };
|
|
143
|
-
//# sourceMappingURL=callbackCore-
|
|
143
|
+
//# sourceMappingURL=callbackCore-CaLG7aPo.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as mintCapability, i as frameVisitorMessage, n as MAX_EXPIRES_MS, o as parseExpires, r as buildSnippet, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-
|
|
1
|
+
import { a as mintCapability, i as frameVisitorMessage, n as MAX_EXPIRES_MS, o as parseExpires, r as buildSnippet, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-CaLG7aPo.js";
|
|
2
2
|
|
|
3
3
|
export { buildSnippet };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as validateS, u as parseSecret } from "./e2e-
|
|
1
|
+
import { m as validateS, u as parseSecret } from "./e2e-C34A1uYu.js";
|
|
2
2
|
|
|
3
3
|
//#region ts/channels/link.ts
|
|
4
4
|
const CH_DEFAULT_SIGHOST = "s.agent-yes.com";
|
|
@@ -134,4 +134,4 @@ function formatUntrustedInbound(op, opts) {
|
|
|
134
134
|
|
|
135
135
|
//#endregion
|
|
136
136
|
export { CH_DEFAULT_SIGHOST as a, formatChannelLink as c, parseChannelLink as d, secretFromTopic as f, parseCmd as i, formatChannelWebLink as l, isActionableCmd as n, deriveChannelId as o, isEphemeral as r, deriveRoom as s, formatUntrustedInbound as t, isChannelLink as u };
|
|
137
|
-
//# sourceMappingURL=channels-
|
|
137
|
+
//# sourceMappingURL=channels-BGSdyeQs.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./e2e-
|
|
2
|
-
import { c as formatChannelLink, d as parseChannelLink, f as secretFromTopic, l as formatChannelWebLink, o as deriveChannelId, s as deriveRoom, u as isChannelLink } from "./channels-
|
|
3
|
-
import { a as renderThread, c as makeOp, f as hlcSend, n as maxHlc, o as sortOps, r as mergeOps, s as isValidOp } from "./store-
|
|
1
|
+
import "./e2e-C34A1uYu.js";
|
|
2
|
+
import { c as formatChannelLink, d as parseChannelLink, f as secretFromTopic, l as formatChannelWebLink, o as deriveChannelId, s as deriveRoom, u as isChannelLink } from "./channels-BGSdyeQs.js";
|
|
3
|
+
import { a as renderThread, c as makeOp, f as hlcSend, n as maxHlc, o as sortOps, r as mergeOps, s as isValidOp } from "./store-MjCqeJDI.js";
|
|
4
4
|
import { appendFile, chmod, mkdir, readFile, rm, writeFile } from "fs/promises";
|
|
5
5
|
import os from "os";
|
|
6
6
|
import path from "path";
|
|
@@ -386,8 +386,8 @@ function printOp(op) {
|
|
|
386
386
|
* `extraStdin` (pipe mode) drives it. Returns the started peer + a stop fn.
|
|
387
387
|
*/
|
|
388
388
|
async function runMesh(cwd, entry, opts) {
|
|
389
|
-
const { ChannelPeer } = await import("./peer-
|
|
390
|
-
const { importRTC, getIceServers } = await import("./share-
|
|
389
|
+
const { ChannelPeer } = await import("./peer-BSZQbKB7.js");
|
|
390
|
+
const { importRTC, getIceServers } = await import("./share-Bq8CEWOU.js");
|
|
391
391
|
const rtc = await importRTC();
|
|
392
392
|
const seen = new Set((await readOps(cwd, entry.channelId)).map((o) => o.id));
|
|
393
393
|
const peer = new ChannelPeer({
|
|
@@ -567,4 +567,4 @@ async function cmdCh(args) {
|
|
|
567
567
|
|
|
568
568
|
//#endregion
|
|
569
569
|
export { cmdCh };
|
|
570
|
-
//# sourceMappingURL=channels-
|
|
570
|
+
//# sourceMappingURL=channels-wGkKOk1z.js.map
|
package/dist/channels.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./e2e-
|
|
2
|
-
import { a as CH_DEFAULT_SIGHOST, c as formatChannelLink, d as parseChannelLink, f as secretFromTopic, i as parseCmd, l as formatChannelWebLink, n as isActionableCmd, o as deriveChannelId, r as isEphemeral, s as deriveRoom, t as formatUntrustedInbound, u as isChannelLink } from "./channels-
|
|
3
|
-
import { a as renderThread, c as makeOp, d as formatHlc, f as hlcSend, i as opsMissing, l as opId, n as maxHlc, o as sortOps, p as parseHlc, r as mergeOps, s as isValidOp, t as haveVector, u as compareHlc } from "./store-
|
|
4
|
-
import "./peer-
|
|
5
|
-
import { t as AyChannel } from "./browser-
|
|
1
|
+
import "./e2e-C34A1uYu.js";
|
|
2
|
+
import { a as CH_DEFAULT_SIGHOST, c as formatChannelLink, d as parseChannelLink, f as secretFromTopic, i as parseCmd, l as formatChannelWebLink, n as isActionableCmd, o as deriveChannelId, r as isEphemeral, s as deriveRoom, t as formatUntrustedInbound, u as isChannelLink } from "./channels-BGSdyeQs.js";
|
|
3
|
+
import { a as renderThread, c as makeOp, d as formatHlc, f as hlcSend, i as opsMissing, l as opId, n as maxHlc, o as sortOps, p as parseHlc, r as mergeOps, s as isValidOp, t as haveVector, u as compareHlc } from "./store-MjCqeJDI.js";
|
|
4
|
+
import "./peer-DI_xxui8.js";
|
|
5
|
+
import { t as AyChannel } from "./browser-BzjhscIR.js";
|
|
6
6
|
|
|
7
7
|
export { AyChannel, AyChannel as default, CH_DEFAULT_SIGHOST, compareHlc, deriveChannelId, deriveRoom, formatChannelLink, formatChannelWebLink, formatHlc, formatUntrustedInbound, haveVector, hlcSend, isActionableCmd, isChannelLink, isEphemeral, isValidOp, makeOp, maxHlc, mergeOps, opId, opsMissing, parseChannelLink, parseCmd, parseHlc, renderThread, secretFromTopic, sortOps };
|
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 { h as getRustBinary } from "./rustBinary-
|
|
4
|
+
import { a as versionString, r as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-DTKtQCee.js";
|
|
5
|
+
import { h as getRustBinary } from "./rustBinary-CYTolquW.js";
|
|
6
6
|
import { statSync } from "node:fs";
|
|
7
7
|
import { isAbsolute } from "node:path";
|
|
8
8
|
import { argv } from "process";
|
|
@@ -94,7 +94,11 @@ applyCwdGuard();
|
|
|
94
94
|
*/
|
|
95
95
|
function parseCliArgs(argv, supportedClis) {
|
|
96
96
|
const cliName = invokedCliName(argv);
|
|
97
|
-
const yargsInstance = yargs(hideBin(argv)).usage("Usage: $0 [agent-yes args] [cli] [agent-cli args] [--] [prompts...]").example("$0 --timeout=30s claude -- solve all todos in my codebase, commit one by one", "Run Claude with a 30 seconds idle timeout (will type /exit when timeout), everything after `--` will be treated as the prompt").example("$0 claude --stdpush", "Run Claude with external stdin input enabled via --append-prompt").option("
|
|
97
|
+
const yargsInstance = yargs(hideBin(argv)).usage("Usage: $0 [agent-yes args] [cli] [agent-cli args] [--] [prompts...]").example("$0 --timeout=30s claude -- solve all todos in my codebase, commit one by one", "Run Claude with a 30 seconds idle timeout (will type /exit when timeout), everything after `--` will be treated as the prompt").example("$0 claude --stdpush", "Run Claude with external stdin input enabled via --append-prompt").option("stream", {
|
|
98
|
+
type: "boolean",
|
|
99
|
+
default: false,
|
|
100
|
+
description: "Run Claude using the stream JSON protocol (TypeScript runtime)"
|
|
101
|
+
}).option("robust", {
|
|
98
102
|
type: "boolean",
|
|
99
103
|
default: true,
|
|
100
104
|
description: "re-spawn Claude with --continue if it crashes, only works for claude yet",
|
|
@@ -299,6 +303,18 @@ function parseCliArgs(argv, supportedClis) {
|
|
|
299
303
|
const dashPrompt = dashIndex === void 0 ? void 0 : rawArgs.slice(dashIndex + 1).join(" ");
|
|
300
304
|
if (parsedArgv.exitOnIdle !== void 0) console.warn("\x1B[33m⚠ Warning: --exit-on-idle and -e are deprecated. Please use --timeout instead.\x1B[0m");
|
|
301
305
|
return {
|
|
306
|
+
nativeArgs: (() => {
|
|
307
|
+
const args = parsedArgv._[0] && !cliName ? rawArgs.slice((cliArgIndex ?? 0) + 1) : [
|
|
308
|
+
...cliArgsForSpawn,
|
|
309
|
+
...positionalPromptWords,
|
|
310
|
+
...dashIndex === void 0 ? [] : rawArgs.slice(dashIndex + 1)
|
|
311
|
+
];
|
|
312
|
+
const separator = args.indexOf("--");
|
|
313
|
+
if (parsedArgv._[0] && !cliName && separator !== -1) args.splice(separator, 1);
|
|
314
|
+
return args;
|
|
315
|
+
})(),
|
|
316
|
+
explicitPrompt: parsedArgv.prompt,
|
|
317
|
+
stream: parsedArgv.stream,
|
|
302
318
|
cwd: process.cwd(),
|
|
303
319
|
env: process.env,
|
|
304
320
|
cli: cliName || parsedArgv.cli || (dashIndex !== 0 ? parsedArgv._[0]?.toString()?.replace?.(/-yes$/, "") : void 0),
|
|
@@ -378,7 +394,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
378
394
|
const rawArg = process.argv[2];
|
|
379
395
|
const managerCommands = !invokedCliName(process.argv);
|
|
380
396
|
const isHelpFlag = rawArg === "-h" || rawArg === "--help";
|
|
381
|
-
const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken, isBareManagerInvocation } = await import("./subcommands-
|
|
397
|
+
const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken, isBareManagerInvocation } = await import("./subcommands-tx8hO0Cv.js");
|
|
382
398
|
if (isHelpFlag && process.argv.length === 3) {
|
|
383
399
|
await cmdHelp(managerCommands);
|
|
384
400
|
process.exit(0);
|
|
@@ -392,7 +408,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
392
408
|
process.exit(code ?? 0);
|
|
393
409
|
}
|
|
394
410
|
{
|
|
395
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
411
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-VJI2s5ow.js");
|
|
396
412
|
if (isUnknownManagerToken(rawArg, managerCommands, SUPPORTED_CLIS)) {
|
|
397
413
|
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`);
|
|
398
414
|
process.exit(1);
|
|
@@ -400,7 +416,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
400
416
|
}
|
|
401
417
|
}
|
|
402
418
|
{
|
|
403
|
-
const { detectCwdPassthrough, SUPPRESS_CWD_WARN_ENV } = await import("./cwdPassthroughHint-
|
|
419
|
+
const { detectCwdPassthrough, SUPPRESS_CWD_WARN_ENV } = await import("./cwdPassthroughHint-yMqzDqR-.js");
|
|
404
420
|
const dep = detectCwdPassthrough(process.argv);
|
|
405
421
|
if (dep) {
|
|
406
422
|
console.warn(dep.message);
|
|
@@ -410,8 +426,13 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
410
426
|
await checkAndAutoUpdate();
|
|
411
427
|
logger.info(versionString());
|
|
412
428
|
const config = parseCliArgs(process.argv);
|
|
429
|
+
const { loadCascadingConfig } = await import("./configLoader-D9O9zwKR.js");
|
|
430
|
+
const { planClaudeStream } = await import("./launch-CMznER0r.js");
|
|
431
|
+
const streamCliConfig = (await loadCascadingConfig()).clis?.[config.cli];
|
|
432
|
+
if (config.stream && config.cli !== "claude") throw new Error("--stream currently supports claude only");
|
|
433
|
+
const streamLaunch = planClaudeStream(config.cli, [...streamCliConfig?.defaultArgs ?? [], ...config.nativeArgs], config.explicitPrompt, config.stream);
|
|
413
434
|
{
|
|
414
|
-
const { stripDetachFlag } = await import("./forkNested-
|
|
435
|
+
const { stripDetachFlag } = await import("./forkNested-NWzwReQd.js");
|
|
415
436
|
const res = stripDetachFlag(process.argv.slice(2), Boolean(config.detach));
|
|
416
437
|
if (!res.ok) {
|
|
417
438
|
console.error(res.error);
|
|
@@ -423,21 +444,21 @@ if (config.detach && (config.attach || process.env.AGENT_YES_ATTACH === "1")) {
|
|
|
423
444
|
console.error("--detach and --attach (or AGENT_YES_ATTACH=1) contradict each other.");
|
|
424
445
|
process.exit(1);
|
|
425
446
|
}
|
|
426
|
-
if (config.detach && !config.useRust) {
|
|
447
|
+
if (config.detach && !config.useRust && !streamLaunch) {
|
|
427
448
|
console.error("--detach needs the Rust runtime (drop --no-rust / AGENT_YES_NO_RUST).");
|
|
428
449
|
process.exit(1);
|
|
429
450
|
}
|
|
430
451
|
if (config.tray) {
|
|
431
|
-
const { startTray } = await import("./tray-
|
|
452
|
+
const { startTray } = await import("./tray-B7YfZ0UA.js");
|
|
432
453
|
await startTray();
|
|
433
454
|
await new Promise(() => {});
|
|
434
455
|
}
|
|
435
456
|
{
|
|
436
|
-
const { ensureTray } = await import("./tray-
|
|
457
|
+
const { ensureTray } = await import("./tray-B7YfZ0UA.js");
|
|
437
458
|
ensureTray();
|
|
438
459
|
}
|
|
439
460
|
if (!config.showVersion && !config.appendPrompt && !config.tray) {
|
|
440
|
-
const { waitForSpawnCapacity } = await import("./spawnGate-
|
|
461
|
+
const { waitForSpawnCapacity } = await import("./spawnGate-BLLSFzwz.js");
|
|
441
462
|
await waitForSpawnCapacity({
|
|
442
463
|
onWait: (reason, waitedMs) => {
|
|
443
464
|
if (config.verbose || waitedMs === 0) console.error(`[agent-yes] spawn gate: ${reason} — waiting…`);
|
|
@@ -446,9 +467,33 @@ if (!config.showVersion && !config.appendPrompt && !config.tray) {
|
|
|
446
467
|
});
|
|
447
468
|
}
|
|
448
469
|
if (!config.showVersion && !config.appendPrompt && !config.tray) {
|
|
449
|
-
const { warnIfCwdOccupied } = await import("./cwdConflictWarn-
|
|
470
|
+
const { warnIfCwdOccupied } = await import("./cwdConflictWarn-Bo-MXcHc.js");
|
|
450
471
|
await warnIfCwdOccupied(process.argv);
|
|
451
472
|
}
|
|
473
|
+
if (streamLaunch) {
|
|
474
|
+
const { runStream } = await import("./runner-Cqa0n41s.js");
|
|
475
|
+
const args = [...streamLaunch.args];
|
|
476
|
+
if (config.skipPermissions) args.push("--dangerously-skip-permissions");
|
|
477
|
+
if (config.resume) args.push("--continue");
|
|
478
|
+
if (config.detach) {
|
|
479
|
+
const { detachStream } = await import("./detach-CUPQbXtv.js");
|
|
480
|
+
const record = await detachStream({
|
|
481
|
+
entry: process.argv[1],
|
|
482
|
+
args: process.argv.slice(2),
|
|
483
|
+
cwd: config.cwd
|
|
484
|
+
});
|
|
485
|
+
console.log(`Spawned ${record.cli} stream session as pid ${record.pid}.`);
|
|
486
|
+
console.log(` ay tail ${record.pid}\n ay send ${record.pid} "message"`);
|
|
487
|
+
process.exit(0);
|
|
488
|
+
}
|
|
489
|
+
process.exit(await runStream({
|
|
490
|
+
...config,
|
|
491
|
+
...streamLaunch,
|
|
492
|
+
cliArgs: args,
|
|
493
|
+
binary: streamCliConfig?.binary,
|
|
494
|
+
input: process.stdin.isTTY ? void 0 : process.stdin
|
|
495
|
+
}));
|
|
496
|
+
}
|
|
452
497
|
if (config.useRust) {
|
|
453
498
|
let rustBinary;
|
|
454
499
|
try {
|
|
@@ -464,14 +509,14 @@ if (config.useRust) {
|
|
|
464
509
|
process.exit(1);
|
|
465
510
|
}
|
|
466
511
|
if (rustBinary) {
|
|
467
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
512
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-VJI2s5ow.js");
|
|
468
513
|
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
469
514
|
if (config.verbose) {
|
|
470
515
|
console.log(`[rust] Using binary: ${rustBinary}`);
|
|
471
516
|
console.log(`[rust] Args: ${rustArgs.join(" ")}`);
|
|
472
517
|
}
|
|
473
518
|
const attach = config.attach || process.env.AGENT_YES_ATTACH === "1";
|
|
474
|
-
const { shouldForkNested, buildSpawnTutorial, waitForRegistration, confirmAgentStarted, predictedLogPath } = await import("./forkNested-
|
|
519
|
+
const { shouldForkNested, buildSpawnTutorial, waitForRegistration, confirmAgentStarted, predictedLogPath } = await import("./forkNested-NWzwReQd.js");
|
|
475
520
|
if (shouldForkNested({
|
|
476
521
|
isTTY: Boolean(process.stdout.isTTY),
|
|
477
522
|
ayPid: process.env.AGENT_YES_PID,
|
|
@@ -539,7 +584,7 @@ if (config.showVersion) {
|
|
|
539
584
|
process.exit(0);
|
|
540
585
|
}
|
|
541
586
|
if (config.appendPrompt) {
|
|
542
|
-
const { PidStore } = await import("./pidStore-
|
|
587
|
+
const { PidStore } = await import("./pidStore-BRU1Q0uN.js");
|
|
543
588
|
const ipcPath = await PidStore.findActiveFifo(process.cwd());
|
|
544
589
|
if (!ipcPath) {
|
|
545
590
|
console.error("No active agent with IPC found in current directory.");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as pidOwnershipVerdict } from "./senderAncestry-
|
|
1
|
+
import { o as pidOwnershipVerdict } from "./senderAncestry-DAO9fNCT.js";
|
|
2
2
|
import yargs from "yargs";
|
|
3
3
|
|
|
4
4
|
//#region ts/cmdKill.ts
|
|
@@ -54,7 +54,7 @@ async function cmdKill(rest) {
|
|
|
54
54
|
return 1;
|
|
55
55
|
}
|
|
56
56
|
const pid = Number(sel);
|
|
57
|
-
const { readGlobalPids, updateGlobalPidStatus } = await import("./globalPidIndex-
|
|
57
|
+
const { readGlobalPids, updateGlobalPidStatus } = await import("./globalPidIndex-B5c_g_yJ.js");
|
|
58
58
|
const matches = (await readGlobalPids()).filter((r) => r.pid === pid);
|
|
59
59
|
if (matches.length !== 1) {
|
|
60
60
|
process.stderr.write(matches.length === 0 ? `ay kill: no registered agent has pid ${pid} (see: ay ls --all)\n` : `ay kill: ${matches.length} registry rows claim pid ${pid} — refusing an ambiguous kill\n`);
|
|
@@ -65,7 +65,7 @@ async function cmdKill(rest) {
|
|
|
65
65
|
process.stderr.write(`ay kill: pid ${pid} is registered as exited — refusing: the number may belong to another process by now\n`);
|
|
66
66
|
return 1;
|
|
67
67
|
}
|
|
68
|
-
const { ancestorPids, pidOwnershipVerdict, readAncestryTable } = await import("./senderAncestry-
|
|
68
|
+
const { ancestorPids, pidOwnershipVerdict, readAncestryTable } = await import("./senderAncestry-C-hBTX_v.js");
|
|
69
69
|
const table = await readAncestryTable();
|
|
70
70
|
const selfPgid = await ownPgid();
|
|
71
71
|
if (!table || !selfPgid) {
|
|
@@ -76,7 +76,7 @@ async function cmdKill(rest) {
|
|
|
76
76
|
process.stderr.write(`ay kill: pid ${pid} is alive but is NOT the agent that registered it (the number was reused) — refusing. Retire the stale row with: ay stop ${pid}\n`);
|
|
77
77
|
return 1;
|
|
78
78
|
}
|
|
79
|
-
const { forceKill, forceKillTargets } = await import("./forceKill-
|
|
79
|
+
const { forceKill, forceKillTargets } = await import("./forceKill-BqPcVAsI.js");
|
|
80
80
|
const targets = await forceKillTargets(record);
|
|
81
81
|
const reusedWrapper = reusedWrapperPid(record, table);
|
|
82
82
|
if (reusedWrapper) {
|
|
@@ -113,4 +113,4 @@ async function cmdKill(rest) {
|
|
|
113
113
|
|
|
114
114
|
//#endregion
|
|
115
115
|
export { cmdKill };
|
|
116
|
-
//# sourceMappingURL=cmdKill-
|
|
116
|
+
//# sourceMappingURL=cmdKill-CxvLEa4Z.js.map
|