agent-yes 1.307.0 → 1.308.0
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 +53 -0
- package/dist/{JsonlStore-CB_0sfdT.js → JsonlStore-fEAVg5aY.js} +1 -1
- package/dist/SUPPORTED_CLIS-Ce_7n97m.js +12 -0
- package/dist/{SUPPORTED_CLIS-qL9_2DZ8.js → SUPPORTED_CLIS-DFpjQ2Ke.js} +2 -2
- package/dist/agent-yes.config-ByXwI-t3.js +47 -0
- package/dist/agentPermissions-CgM1bl6m.js +62 -0
- package/dist/{agentShare-C2oXrGvf.js → agentShare-Dz_T6b5v.js} +14 -14
- package/dist/{askCli-D4czi-_j.js → askCli-BjQOqpvv.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-ie8yyKma.js → callback-CAWItwdn.js} +5 -5
- package/dist/callback-oTjpUn2G.js +17 -0
- package/dist/{callbackCore-Deve5pv3.js → callbackCore-DoPrLOFY.js} +1 -1
- package/dist/{callbackCore-BZ_10zyc.js → callbackCore-TE7HjQm9.js} +1 -1
- package/dist/{channels-jIa5fNjY.js → channels-BGSdyeQs.js} +2 -2
- package/dist/{channels-Y36S0ccW.js → channels-bw-b9z0l.js} +6 -6
- package/dist/channels.js +5 -5
- package/dist/claude-DLN2dvVD.js +180 -0
- package/dist/cli.js +60 -15
- package/dist/{cmdDsh-DZ8bLsH7.js → cmdDsh-h7V2ThH5.js} +1 -1
- package/dist/{cmdKill-DUyZ7Dch.js → cmdKill-b5I7H8wx.js} +5 -5
- package/dist/{cmdPs-CfR5qCiO.js → cmdPs-RZU-tTd4.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-BQ8vH915.js} +2 -2
- package/dist/{cwdPassthroughHint-CzWh0hrw.js → cwdPassthroughHint-h4dQQCLO.js} +1 -1
- package/dist/detach-B_n7xRl2.js +58 -0
- package/dist/{e2e-BdLf8DvY.js → e2e-C34A1uYu.js} +1 -1
- package/dist/{expose-Bhsn5yUz.js → expose-BKxcKYt-.js} +1 -1
- package/dist/{forceKill-BDqxx4uQ.js → forceKill-BAqKNR_f.js} +2 -2
- package/dist/{forkNested-DHuYbpaf.js → forkNested-CVSWfZT6.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-OSUKO8sb.js} +1 -1
- package/dist/{html2canvas-pro.esm-Dp-JZojz.js → html2canvas-pro.esm-BW1GOcB-.js} +1 -1
- package/dist/{identity-D3hr59eC.js → identity-BVHHqtvP.js} +1 -1
- package/dist/{identity-puvd7hVQ.js → identity-CtwRW1nD.js} +1 -1
- package/dist/index.js +8 -8
- package/dist/{initMsg-GPU52N-j.js → initMsg-C1tgHfYP.js} +1 -1
- package/dist/{initMsg-BEVDWYnv.js → initMsg-CkrZjsX-.js} +1 -1
- package/dist/launch-BlKMU2ZA.js +74 -0
- package/dist/launch-CMran68t.js +3 -0
- package/dist/{messageLog-CEqe4Hk1.js → messageLog-BrXNxItW.js} +1 -1
- package/dist/{needsInput-hRiWFjGy.js → needsInput-B3aPVSqs.js} +1 -1
- package/dist/{nodeRuntime-DGMQRTGT.js → nodeRuntime-B1nCglgu.js} +1 -1
- package/dist/{notifyDaemon-DcAbvP43.js → notifyDaemon-Dh4cLfBU.js} +13 -13
- package/dist/{notifyStore-C4pH_-zJ.js → notifyStore-B7DLD83Q.js} +1 -1
- package/dist/{notifyStore-DIfkfKB2.js → notifyStore-CNdHlJyW.js} +1 -1
- package/dist/{openBrowser-CQAOIrD6.js → openBrowser-CwhGNBhv.js} +1 -1
- package/dist/oxmgrService-C0nYf9CD.js +3 -0
- package/dist/{oxmgrService-DlYHmqyI.js → oxmgrService-CBlFJ_-C.js} +2 -2
- package/dist/{parentLink-UiM6WoKm.js → parentLink-C2gocHk9.js} +2 -2
- package/dist/{parentLink-B7_kEM1v.js → parentLink-EVI_0cLu.js} +2 -2
- package/dist/{parentPingLoop-BYT4XgfN.js → parentPingLoop-B9QDw20l.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-CkzFrwx7.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-CAZymHd7.js → remotes-B0vw-dsd.js} +3 -3
- package/dist/{remotes-W6NhMDfP.js → remotes-TKXkCV76.js} +3 -3
- package/dist/roomReplyAlias-0xfUQlda.js +6 -0
- package/dist/{roomReplyAlias-B1EJft2d.js → roomReplyAlias-CkfEtW2v.js} +3 -3
- package/dist/runner-B1vocYOj.js +371 -0
- package/dist/{runningLock-DMznYh45.js → runningLock-DaVbNt4d.js} +1 -1
- package/dist/{rustBinary-BjsZbiv5.js → rustBinary-B603fLUa.js} +2 -2
- package/dist/{rustBinary-CXQGcJEm.js → rustBinary-CTEd2FnZ.js} +2 -2
- package/dist/{schedule-zacFV53l.js → schedule-DncJhp1d.js} +15 -15
- package/dist/{schedules-BvwTGXU2.js → schedules-D6hZ7VpJ.js} +1 -1
- package/dist/{schedulesCli-Donh0LS2.js → schedulesCli-DSBZwREE.js} +3 -3
- package/dist/{senderAncestry-KhAUPCQs.js → senderAncestry-Brb-cYni.js} +1 -1
- package/dist/{senderAncestry-CVHeKk1Y.js → senderAncestry-DqbNIecg.js} +1 -1
- package/dist/{serve-C38WYmzz.js → serve-BJEDb5Az.js} +52 -51
- package/dist/{serveRust-76_apYb8.js → serveRust-B50JWdfK.js} +3 -3
- package/dist/{setup-CeAisuhv.js → setup-CxQJtnmp.js} +4 -4
- package/dist/{share-_TPYAGWC.js → share-CPtJgXt2.js} +2 -2
- package/dist/{share-CbFetL5H.js → share-zVt71n2g.js} +2 -2
- package/dist/{shareCmd-foO5MbJp.js → shareCmd-96G551OE.js} +10 -10
- package/dist/{spawnGate-nUrmf4dd.js → spawnGate-BkkT7GF2.js} +3 -3
- package/dist/spawnGate-Ky21E51l.js +5 -0
- package/dist/{store-xmBpqPUq.js → store-MjCqeJDI.js} +1 -1
- package/dist/{subcommands-DE31Tfv_.js → subcommands-BJezWaHi.js} +455 -124
- package/dist/{subcommands-DLQEC24N.js → subcommands-DbdxjvFI.js} +12 -12
- package/dist/{systemPathLink-DI9WdoqQ.js → systemPathLink-BQE53HED.js} +1 -1
- package/dist/{terminal-CBbp6PfB.js → terminal-CLjXOXI7.js} +2 -2
- package/dist/terminal.js +1 -1
- package/dist/{todoAutomation-CKlrxuZv.js → todoAutomation-KgmnTAsD.js} +2 -2
- package/dist/{todoCli-BllShFnc.js → todoCli-ammnk6Wv.js} +6 -6
- package/dist/{todoIdentity-DeDp7LKl.js → todoIdentity-DzjduXlF.js} +2 -2
- package/dist/{todoStore-msRCEUi1.js → todoStore-Dre3Yhwt.js} +2 -2
- package/dist/{tray-RIjHSw7z.js → tray-C4sCiT8B.js} +2 -2
- package/dist/{trayApp-C9SZOPpw.js → trayApp-CZwRPF62.js} +2 -2
- package/dist/trayApp-UWX_Bfay.js +5 -0
- package/dist/{ts-CO1H1P2R.js → ts-J77_edCv.js} +20 -79
- package/dist/{versionChecker-CG--tQsV.js → versionChecker-DcrK7m4z.js} +2 -2
- package/dist/{webrtcLink-WxS1nTIs.js → webrtcLink-CGCXjlQJ.js} +2 -2
- package/dist/{webrtcLink-DcvacEci.js → webrtcLink-D4pMhyvY.js} +2 -2
- package/dist/{webrtcRemote-B4pwES4i.js → webrtcRemote-DdCC3aZC.js} +3 -3
- package/dist/{widget-CI7BtN94.js → widget-DU-iJOPF.js} +3 -3
- package/dist/widget.js +1 -1
- package/dist/widgets.js +5 -5
- package/dist/{workspaceConfig-DjEklzxf.js → workspaceConfig-BmK6COFt.js} +1 -1
- package/dist/{ws-DLJSBws6.js → ws-AZ6QSr2M.js} +3 -3
- package/dist/ws-CNd9TMOE.js +16 -0
- package/package.json +1 -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/subcommands.spec.ts +2 -2
- package/ts/subcommands.ts +186 -13
- package/dist/SUPPORTED_CLIS-BOGmmIrH.js +0 -12
- package/dist/callback-CNL-PGwh.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-BeGVkAlc.js +0 -6
- package/dist/spawnGate-DhPgMs0Y.js +0 -5
- package/dist/trayApp-BSOmax2E.js +0 -5
- package/dist/ws-W5nWHjDt.js +0 -16
package/README.md
CHANGED
|
@@ -712,3 +712,56 @@ be committed.
|
|
|
712
712
|
## License
|
|
713
713
|
|
|
714
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
|
+
For stream sessions, `ay status` and `ay ls --watch` derive state from events.
|
|
740
|
+
Permission requests and questions appear as `needs_input`; protocol errors appear
|
|
741
|
+
as `stuck`. `ay ls` shows the latest reported cumulative session cost in `COST`
|
|
742
|
+
(and `cost_usd` in JSON), with `-` when cost is unavailable.
|
|
743
|
+
|
|
744
|
+
`ay send <pid> "message"` sends one JSON line and returns success only after
|
|
745
|
+
Claude echoes that message's unique ID. Bodies are sent verbatim; sender provenance
|
|
746
|
+
stays in mailbox history rather than adding reply instructions to the task. `--interrupt` sends Claude's native
|
|
747
|
+
interrupt request before the new message. Receipt timeouts report an uncertain
|
|
748
|
+
outcome and never retry automatically. Stream sessions require receipts, so
|
|
749
|
+
`--no-wait` and terminal control codes are not supported. `ay tail`, including
|
|
750
|
+
follow and `--until`, reads the transcript without terminal wrapping.
|
|
751
|
+
|
|
752
|
+
A local preview executable such as `aysj` can forward arguments unchanged to a
|
|
753
|
+
worktree build. It behaves exactly like `ay`, including the PTY default; its name
|
|
754
|
+
does not enable stream capture.
|
|
755
|
+
|
|
756
|
+
Native stream flags also work after the wrapper separator, for example
|
|
757
|
+
`ay --detach claude -- -p --input-format stream-json --output-format stream-json --verbose --replay-user-messages --model haiku "task"`.
|
|
758
|
+
The initial stream task is passed verbatim, without PTY init-message envelopes.
|
|
759
|
+
The registry mirrors active/idle turn transitions, and event files preserve stream
|
|
760
|
+
identity when an older registry writer drops the transport field.
|
|
761
|
+
|
|
762
|
+
Successful CLI exit also cleans up its detached process group, including remaining
|
|
763
|
+
descendants that inherited the output pipes.
|
|
764
|
+
|
|
765
|
+
`ay status` uses the same normalized stream state and pending question as `ay ls`,
|
|
766
|
+
including permission requests. Output-only native stream invocations forward piped
|
|
767
|
+
stdin unchanged and preserve EOF; they do not convert text input into JSON messages.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./logger-CDIsZ-Pp.js";
|
|
2
|
+
import "./versionChecker-DcrK7m4z.js";
|
|
3
|
+
import "./ts-J77_edCv.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-DFpjQ2Ke.js";
|
|
11
|
+
|
|
12
|
+
export { SUPPORTED_CLIS };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-J77_edCv.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-DFpjQ2Ke.js.map
|
|
@@ -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-BJezWaHi.js";
|
|
9
|
+
import "./webrtcLink-D4pMhyvY.js";
|
|
10
|
+
import "./remotes-B0vw-dsd.js";
|
|
11
|
+
import "./roomReplyAlias-CkfEtW2v.js";
|
|
12
|
+
import "./notifyStore-CNdHlJyW.js";
|
|
13
|
+
import "./senderAncestry-DqbNIecg.js";
|
|
14
|
+
import { l as startShare } from "./share-zVt71n2g.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-Dz_T6b5v.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-CtwRW1nD.js";
|
|
6
|
+
import { a as resolveTodoRoot, i as resolveSelf } from "./todoIdentity-DzjduXlF.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-BjQOqpvv.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-BJezWaHi.js";
|
|
3
|
+
import { a as mintCapability, o as parseExpires } from "./callbackCore-DoPrLOFY.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-BJEDb5Az.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-TE7HjQm9.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-CAWItwdn.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-BJezWaHi.js";
|
|
9
|
+
import "./webrtcLink-D4pMhyvY.js";
|
|
10
|
+
import "./remotes-B0vw-dsd.js";
|
|
11
|
+
import "./roomReplyAlias-CkfEtW2v.js";
|
|
12
|
+
import "./notifyStore-CNdHlJyW.js";
|
|
13
|
+
import "./senderAncestry-DqbNIecg.js";
|
|
14
|
+
import "./callbackCore-DoPrLOFY.js";
|
|
15
|
+
import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-CAWItwdn.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-DoPrLOFY.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-DoPrLOFY.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-CPtJgXt2.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-bw-b9z0l.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 };
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { spawn } from "node:child_process";
|
|
3
|
+
|
|
4
|
+
//#region ts/stream/claude.ts
|
|
5
|
+
function userMessage(text, id = randomUUID()) {
|
|
6
|
+
return JSON.stringify({
|
|
7
|
+
type: "user",
|
|
8
|
+
uuid: id,
|
|
9
|
+
message: {
|
|
10
|
+
role: "user",
|
|
11
|
+
content: text
|
|
12
|
+
}
|
|
13
|
+
}) + "\n";
|
|
14
|
+
}
|
|
15
|
+
/** Claude's SDK stdio protocol; unknown notifications are intentionally ignored. */
|
|
16
|
+
var ClaudeAdapter = class {
|
|
17
|
+
child;
|
|
18
|
+
turn = 0;
|
|
19
|
+
active = false;
|
|
20
|
+
receipts = /* @__PURE__ */ new Set();
|
|
21
|
+
requests = /* @__PURE__ */ new Map();
|
|
22
|
+
spawn(opts) {
|
|
23
|
+
const args = [...opts.args];
|
|
24
|
+
if (opts.resumeId) args.push("--resume", opts.resumeId);
|
|
25
|
+
this.child = spawn(opts.binary ?? "claude", args, {
|
|
26
|
+
cwd: opts.cwd,
|
|
27
|
+
env: opts.env ?? process.env,
|
|
28
|
+
stdio: "pipe",
|
|
29
|
+
detached: process.platform !== "win32"
|
|
30
|
+
});
|
|
31
|
+
return this.child;
|
|
32
|
+
}
|
|
33
|
+
send(msg, id = randomUUID()) {
|
|
34
|
+
if (!this.child?.stdin.writable) throw new Error("Claude stream is not writable");
|
|
35
|
+
this.child.stdin.write(userMessage(msg, id));
|
|
36
|
+
return id;
|
|
37
|
+
}
|
|
38
|
+
async interrupt() {
|
|
39
|
+
if (!this.child?.stdin.writable) throw new Error("Claude stream is not writable");
|
|
40
|
+
this.child.stdin.write(JSON.stringify({
|
|
41
|
+
type: "control_request",
|
|
42
|
+
request_id: randomUUID(),
|
|
43
|
+
request: { subtype: "interrupt" }
|
|
44
|
+
}) + "\n");
|
|
45
|
+
}
|
|
46
|
+
answer(reqId, choice) {
|
|
47
|
+
const input = this.requests.get(reqId);
|
|
48
|
+
if (input === void 0) throw new Error("Unknown Claude permission request");
|
|
49
|
+
this.requests.delete(reqId);
|
|
50
|
+
this.child?.stdin.write(JSON.stringify({
|
|
51
|
+
type: "control_response",
|
|
52
|
+
response: {
|
|
53
|
+
subtype: "success",
|
|
54
|
+
request_id: reqId,
|
|
55
|
+
response: choice === "allow" ? {
|
|
56
|
+
behavior: "allow",
|
|
57
|
+
updatedInput: input
|
|
58
|
+
} : {
|
|
59
|
+
behavior: "deny",
|
|
60
|
+
message: choice
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}) + "\n");
|
|
64
|
+
}
|
|
65
|
+
parse(line) {
|
|
66
|
+
let d;
|
|
67
|
+
try {
|
|
68
|
+
d = JSON.parse(line);
|
|
69
|
+
} catch {
|
|
70
|
+
return [{
|
|
71
|
+
type: "error",
|
|
72
|
+
message: "Invalid Claude stream JSON",
|
|
73
|
+
fatal: false
|
|
74
|
+
}];
|
|
75
|
+
}
|
|
76
|
+
if (!d || typeof d !== "object") return [];
|
|
77
|
+
const events = [];
|
|
78
|
+
const start = () => {
|
|
79
|
+
if (!this.active) {
|
|
80
|
+
this.active = true;
|
|
81
|
+
events.push({
|
|
82
|
+
type: "turn_start",
|
|
83
|
+
turn: ++this.turn,
|
|
84
|
+
ts: Date.now()
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
if (d.type === "system" && d.subtype === "init" && typeof d.session_id === "string") events.push({
|
|
89
|
+
type: "session",
|
|
90
|
+
sessionId: d.session_id,
|
|
91
|
+
model: d.model
|
|
92
|
+
});
|
|
93
|
+
if (d.type === "user") {
|
|
94
|
+
const content = d.message?.content;
|
|
95
|
+
const text = typeof content === "string" ? content : Array.isArray(content) ? content.filter((b) => b.type === "text").map((b) => b.text).join("\n") : "";
|
|
96
|
+
if (text && typeof d.uuid === "string" && !this.receipts.has(d.uuid)) {
|
|
97
|
+
this.receipts.add(d.uuid);
|
|
98
|
+
start();
|
|
99
|
+
events.push({
|
|
100
|
+
type: "user",
|
|
101
|
+
id: d.uuid,
|
|
102
|
+
text
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
if (Array.isArray(content)) {
|
|
106
|
+
for (const b of content) if (b.type === "tool_result") events.push({
|
|
107
|
+
type: "tool_result",
|
|
108
|
+
id: b.tool_use_id,
|
|
109
|
+
ok: !b.is_error,
|
|
110
|
+
summary: typeof b.content === "string" ? b.content : JSON.stringify(b.content ?? "")
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (d.type === "assistant" && Array.isArray(d.message?.content)) {
|
|
115
|
+
start();
|
|
116
|
+
for (const b of d.message.content) {
|
|
117
|
+
if (b.type === "text" && typeof b.text === "string") events.push({
|
|
118
|
+
type: "text",
|
|
119
|
+
text: b.text
|
|
120
|
+
});
|
|
121
|
+
if (b.type === "tool_use") events.push({
|
|
122
|
+
type: "tool_call",
|
|
123
|
+
id: b.id,
|
|
124
|
+
name: b.name,
|
|
125
|
+
input: b.input
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
if (d.error) events.push({
|
|
129
|
+
type: "error",
|
|
130
|
+
message: String(d.error),
|
|
131
|
+
fatal: false
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
if (d.type === "control_request" && d.request?.subtype === "can_use_tool") {
|
|
135
|
+
const r = d.request;
|
|
136
|
+
this.requests.set(d.request_id, r.input);
|
|
137
|
+
if (r.tool_name === "AskUserQuestion") {
|
|
138
|
+
const questions = r.input?.questions ?? [];
|
|
139
|
+
events.push({
|
|
140
|
+
type: "needs_input",
|
|
141
|
+
reqId: d.request_id,
|
|
142
|
+
question: questions.map((q) => q.question).join("\n"),
|
|
143
|
+
options: questions.flatMap((q) => (q.options ?? []).map((o) => o.label))
|
|
144
|
+
});
|
|
145
|
+
} else events.push({
|
|
146
|
+
type: "needs_permission",
|
|
147
|
+
reqId: d.request_id,
|
|
148
|
+
tool: r.tool_name,
|
|
149
|
+
input: r.input,
|
|
150
|
+
options: ["allow", "deny"]
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
if (d.type === "result") {
|
|
154
|
+
start();
|
|
155
|
+
events.push({
|
|
156
|
+
type: "turn_end",
|
|
157
|
+
turn: this.turn,
|
|
158
|
+
costUsd: typeof d.total_cost_usd === "number" ? d.total_cost_usd : void 0,
|
|
159
|
+
usage: d.usage ? {
|
|
160
|
+
inputTokens: d.usage.input_tokens ?? 0,
|
|
161
|
+
outputTokens: d.usage.output_tokens ?? 0,
|
|
162
|
+
cacheReadTokens: d.usage.cache_read_input_tokens,
|
|
163
|
+
cacheCreationTokens: d.usage.cache_creation_input_tokens
|
|
164
|
+
} : void 0,
|
|
165
|
+
stopReason: d.stop_reason ?? d.subtype
|
|
166
|
+
});
|
|
167
|
+
this.active = false;
|
|
168
|
+
if (d.is_error) events.push({
|
|
169
|
+
type: "error",
|
|
170
|
+
message: (d.errors ?? [d.result ?? d.subtype]).join("\n"),
|
|
171
|
+
fatal: false
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
return events;
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
//#endregion
|
|
179
|
+
export { userMessage as n, ClaudeAdapter as t };
|
|
180
|
+
//# sourceMappingURL=claude-DLN2dvVD.js.map
|