agent-yes 1.143.0 → 1.144.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 +4 -2
- package/default.config.yaml +7 -0
- package/dist/SUPPORTED_CLIS-CwWcK6Fl.js +8 -0
- package/dist/{SUPPORTED_CLIS-DdzFdshj.js → SUPPORTED_CLIS-D0dDlvLS.js} +2 -2
- package/dist/cli.js +4 -4
- package/dist/index.js +2 -2
- package/dist/{invokedCli-zdFbz1ST.js → invokedCli-uqM2YYA7.js} +5 -2
- package/dist/orcy.js +10 -0
- package/dist/{schedule-C8QKzvq-.js → schedule-BKyOLSSe.js} +4 -4
- package/dist/{serve-Bathp8Fu.js → serve-QXNICu0K.js} +5 -5
- package/dist/{setup-ygcLSFBT.js → setup-dJlAGJEz.js} +2 -2
- package/dist/{subcommands-BtCnrZmr.js → subcommands-_raQNJO3.js} +1 -1
- package/dist/{subcommands-BthznoYM.js → subcommands-o3WRyHb9.js} +5 -5
- package/dist/{ts-CV4m7CUC.js → ts-Qh0Z7nsZ.js} +7 -5
- package/dist/{versionChecker-DatX-QMn.js → versionChecker-BjKAfiI-.js} +2 -2
- package/package.json +3 -2
- package/ts/index.ts +12 -5
- package/ts/invokedCli.ts +2 -1
- package/ts/postbuild.ts +1 -1
- package/ts/subcommands.ts +0 -0
- package/dist/SUPPORTED_CLIS-CPLtBfWE.js +0 -8
package/README.md
CHANGED
|
@@ -143,8 +143,10 @@ ZAI_API_KEY=... glm-yes -- help me with this code
|
|
|
143
143
|
|
|
144
144
|
# Use OpenRouter directly — runs Claude Code against OpenRouter's
|
|
145
145
|
# Anthropic-compatible endpoint. Set OPENROUTER_API_KEY first
|
|
146
|
-
# (https://openrouter.ai/keys).
|
|
147
|
-
|
|
146
|
+
# (https://openrouter.ai/keys). `orcy` is the short alias
|
|
147
|
+
# (openrouter-claude-yes) and defaults to the z-ai/glm-5.2 model
|
|
148
|
+
# (override via ANTHROPIC_DEFAULT_*_MODEL or ~/.claude/settings.json).
|
|
149
|
+
OPENROUTER_API_KEY=... orcy -- help me with this code
|
|
148
150
|
|
|
149
151
|
# Use Pi directly — minimal multi-provider coding agent
|
|
150
152
|
# (https://github.com/earendil-works/pi)
|
package/default.config.yaml
CHANGED
|
@@ -169,6 +169,13 @@ clis:
|
|
|
169
169
|
ANTHROPIC_BASE_URL: https://openrouter.ai/api
|
|
170
170
|
ANTHROPIC_AUTH_TOKEN: ${OPENROUTER_API_KEY}
|
|
171
171
|
ANTHROPIC_API_KEY: ""
|
|
172
|
+
# Default to GLM 5.2 (verified to work through OpenRouter's Anthropic skin).
|
|
173
|
+
# `${VAR:-default}` keeps it overridable: export ANTHROPIC_DEFAULT_*_MODEL or
|
|
174
|
+
# ANTHROPIC_MODEL (or set them in ~/.claude/settings.json) to use another
|
|
175
|
+
# OpenRouter slug. Reachable as `orcy` (openrouter-claude-yes).
|
|
176
|
+
ANTHROPIC_DEFAULT_SONNET_MODEL: ${ANTHROPIC_DEFAULT_SONNET_MODEL:-z-ai/glm-5.2}
|
|
177
|
+
ANTHROPIC_DEFAULT_OPUS_MODEL: ${ANTHROPIC_DEFAULT_OPUS_MODEL:-z-ai/glm-5.2}
|
|
178
|
+
ANTHROPIC_DEFAULT_HAIKU_MODEL: ${ANTHROPIC_DEFAULT_HAIKU_MODEL:-z-ai/glm-5.2}
|
|
172
179
|
promptArg: last-arg
|
|
173
180
|
systemPrompt: --append-system-prompt
|
|
174
181
|
yesArgs:
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./ts-Qh0Z7nsZ.js";
|
|
2
|
+
import "./logger-CDIsZ-Pp.js";
|
|
3
|
+
import "./versionChecker-BjKAfiI-.js";
|
|
4
|
+
import "./pidStore-fqXqTKkh.js";
|
|
5
|
+
import "./globalPidIndex-DlmmJlO8.js";
|
|
6
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-D0dDlvLS.js";
|
|
7
|
+
|
|
8
|
+
export { SUPPORTED_CLIS };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-Qh0Z7nsZ.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-D0dDlvLS.js.map
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import { t as invokedCliName } from "./invokedCli-
|
|
2
|
+
import { t as invokedCliName } from "./invokedCli-uqM2YYA7.js";
|
|
3
3
|
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
4
|
-
import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-
|
|
4
|
+
import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-BjKAfiI-.js";
|
|
5
5
|
import { argv } from "process";
|
|
6
6
|
import { execFileSync, spawn } from "child_process";
|
|
7
7
|
import ms from "ms";
|
|
@@ -480,7 +480,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
480
480
|
const rawArg = process.argv[2];
|
|
481
481
|
const managerCommands = !invokedCliName(process.argv);
|
|
482
482
|
const isHelpFlag = rawArg === "-h" || rawArg === "--help";
|
|
483
|
-
const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-
|
|
483
|
+
const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-_raQNJO3.js");
|
|
484
484
|
if (isHelpFlag && process.argv.length === 3) {
|
|
485
485
|
cmdHelp(managerCommands);
|
|
486
486
|
process.exit(0);
|
|
@@ -513,7 +513,7 @@ if (config.useRust) {
|
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
if (rustBinary) {
|
|
516
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
516
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-CwWcK6Fl.js");
|
|
517
517
|
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
518
518
|
if (config.verbose) {
|
|
519
519
|
console.log(`[rust] Using binary: ${rustBinary}`);
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-Qh0Z7nsZ.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-BjKAfiI-.js";
|
|
4
4
|
import "./pidStore-fqXqTKkh.js";
|
|
5
5
|
import "./globalPidIndex-DlmmJlO8.js";
|
|
6
6
|
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
* resolves to `undefined`. Callers use that `undefined` to tell "the agent-yes
|
|
11
11
|
* manager" apart from "a cli-bound runner alias".
|
|
12
12
|
*/
|
|
13
|
-
const CLI_ALIASES = {
|
|
13
|
+
const CLI_ALIASES = {
|
|
14
|
+
cy: "claude",
|
|
15
|
+
orcy: "openrouter"
|
|
16
|
+
};
|
|
14
17
|
/**
|
|
15
18
|
* The agent CLI implied by argv[1] (cy / claude-yes → "claude", codex-yes →
|
|
16
19
|
* "codex", …), or `undefined` for the generic `ay` / `agent-yes` / `cli` entry.
|
|
@@ -22,4 +25,4 @@ function invokedCliName(argv) {
|
|
|
22
25
|
|
|
23
26
|
//#endregion
|
|
24
27
|
export { invokedCliName as t };
|
|
25
|
-
//# sourceMappingURL=invokedCli-
|
|
28
|
+
//# sourceMappingURL=invokedCli-uqM2YYA7.js.map
|
package/dist/orcy.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { join, dirname } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
6
|
+
if (typeof Bun !== "undefined" && existsSync(join(root, ".git"))) {
|
|
7
|
+
await import("../ts/cli.ts");
|
|
8
|
+
} else {
|
|
9
|
+
await import("./cli.js");
|
|
10
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-Qh0Z7nsZ.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-BjKAfiI-.js";
|
|
4
4
|
import "./pidStore-fqXqTKkh.js";
|
|
5
5
|
import "./globalPidIndex-DlmmJlO8.js";
|
|
6
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
6
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-D0dDlvLS.js";
|
|
7
7
|
import { n as resolveSpawnCwd } from "./workspaceConfig-BCOqRBEW.js";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
9
9
|
|
|
@@ -141,4 +141,4 @@ async function cmdSchedule(rest) {
|
|
|
141
141
|
|
|
142
142
|
//#endregion
|
|
143
143
|
export { cmdSchedule };
|
|
144
|
-
//# sourceMappingURL=schedule-
|
|
144
|
+
//# sourceMappingURL=schedule-BKyOLSSe.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-Qh0Z7nsZ.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
3
|
+
import { r as getInstalledPackage } from "./versionChecker-BjKAfiI-.js";
|
|
4
4
|
import "./pidStore-fqXqTKkh.js";
|
|
5
5
|
import { a as updateGlobalPidStatus } from "./globalPidIndex-DlmmJlO8.js";
|
|
6
6
|
import { t as pgidForWrapper } from "./reaper-C-eWAxIj.js";
|
|
7
7
|
import "./configShared-C1C04bbq.js";
|
|
8
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
8
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-D0dDlvLS.js";
|
|
9
9
|
import "./remotes-PKKjfTI1.js";
|
|
10
|
-
import { S as snapshotStatus, _ as renderRawLog, c as extractTaskCounts, g as readNotes, i as controlCodeFromName, m as listRecords, o as deriveLiveStatus, w as writeToIpc, y as resolveOne } from "./subcommands-
|
|
10
|
+
import { S as snapshotStatus, _ as renderRawLog, c as extractTaskCounts, g as readNotes, i as controlCodeFromName, m as listRecords, o as deriveLiveStatus, w as writeToIpc, y as resolveOne } from "./subcommands-o3WRyHb9.js";
|
|
11
11
|
import yargs from "yargs";
|
|
12
12
|
import { mkdir, open, readFile, stat, writeFile } from "fs/promises";
|
|
13
13
|
import { homedir, hostname, userInfo } from "os";
|
|
@@ -1177,4 +1177,4 @@ Options:
|
|
|
1177
1177
|
|
|
1178
1178
|
//#endregion
|
|
1179
1179
|
export { cmdServe };
|
|
1180
|
-
//# sourceMappingURL=serve-
|
|
1180
|
+
//# sourceMappingURL=serve-QXNICu0K.js.map
|
|
@@ -32,7 +32,7 @@ async function cmdSetup(rest) {
|
|
|
32
32
|
if (!existsSync(abs)) process.stderr.write(` note: that directory doesn't exist yet — create it, or agents spawned there will fail\n`);
|
|
33
33
|
if (noShare) return 0;
|
|
34
34
|
process.stdout.write(`\nsharing this machine to agent-yes.com…\n`);
|
|
35
|
-
const { cmdServe } = await import("./serve-
|
|
35
|
+
const { cmdServe } = await import("./serve-QXNICu0K.js");
|
|
36
36
|
return cmdServe([
|
|
37
37
|
"install",
|
|
38
38
|
"--share",
|
|
@@ -42,4 +42,4 @@ async function cmdSetup(rest) {
|
|
|
42
42
|
|
|
43
43
|
//#endregion
|
|
44
44
|
export { cmdSetup };
|
|
45
|
-
//# sourceMappingURL=setup-
|
|
45
|
+
//# sourceMappingURL=setup-dJlAGJEz.js.map
|
|
@@ -2,6 +2,6 @@ import "./logger-CDIsZ-Pp.js";
|
|
|
2
2
|
import "./globalPidIndex-DlmmJlO8.js";
|
|
3
3
|
import "./configShared-C1C04bbq.js";
|
|
4
4
|
import "./remotes-PKKjfTI1.js";
|
|
5
|
-
import { C as stopTipForCli, S as snapshotStatus, _ as renderRawLog, a as cursorAbs, b as resolveReadWindow, c as extractTaskCounts, d as isExitRequest, f as isPidAlive, g as readNotes, h as matchKeyword, i as controlCodeFromName, l as finalizedLines, m as listRecords, n as READ_PAGE_DEFAULT, o as deriveLiveStatus, p as isSubcommand, r as cmdHelp, s as extractNeedsInput, t as GRACEFUL_EXIT_COMMANDS, u as isAgentStuck, v as renderRawLogLines, w as writeToIpc, x as runSubcommand, y as resolveOne } from "./subcommands-
|
|
5
|
+
import { C as stopTipForCli, S as snapshotStatus, _ as renderRawLog, a as cursorAbs, b as resolveReadWindow, c as extractTaskCounts, d as isExitRequest, f as isPidAlive, g as readNotes, h as matchKeyword, i as controlCodeFromName, l as finalizedLines, m as listRecords, n as READ_PAGE_DEFAULT, o as deriveLiveStatus, p as isSubcommand, r as cmdHelp, s as extractNeedsInput, t as GRACEFUL_EXIT_COMMANDS, u as isAgentStuck, v as renderRawLogLines, w as writeToIpc, x as runSubcommand, y as resolveOne } from "./subcommands-o3WRyHb9.js";
|
|
6
6
|
|
|
7
7
|
export { cmdHelp, isSubcommand, runSubcommand };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as invokedCliName } from "./invokedCli-
|
|
1
|
+
import { t as invokedCliName } from "./invokedCli-uqM2YYA7.js";
|
|
2
2
|
import { t as agentYesHome } from "./agentYesHome-_eJa3DaX.js";
|
|
3
3
|
import { a as updateGlobalPidStatus, i as readGlobalPids } from "./globalPidIndex-DlmmJlO8.js";
|
|
4
4
|
import { t as loadSharedCliDefaults } from "./configShared-C1C04bbq.js";
|
|
@@ -553,15 +553,15 @@ async function runSubcommand(argv) {
|
|
|
553
553
|
case "restart": return await cmdRestart(rest);
|
|
554
554
|
case "note": return await cmdNote(rest);
|
|
555
555
|
case "serve": {
|
|
556
|
-
const { cmdServe } = await import("./serve-
|
|
556
|
+
const { cmdServe } = await import("./serve-QXNICu0K.js");
|
|
557
557
|
return cmdServe(rest);
|
|
558
558
|
}
|
|
559
559
|
case "setup": {
|
|
560
|
-
const { cmdSetup } = await import("./setup-
|
|
560
|
+
const { cmdSetup } = await import("./setup-dJlAGJEz.js");
|
|
561
561
|
return cmdSetup(rest);
|
|
562
562
|
}
|
|
563
563
|
case "schedule": {
|
|
564
|
-
const { cmdSchedule } = await import("./schedule-
|
|
564
|
+
const { cmdSchedule } = await import("./schedule-BKyOLSSe.js");
|
|
565
565
|
return cmdSchedule(rest);
|
|
566
566
|
}
|
|
567
567
|
case "remote": {
|
|
@@ -2581,4 +2581,4 @@ async function cmdResultSet(rest) {
|
|
|
2581
2581
|
|
|
2582
2582
|
//#endregion
|
|
2583
2583
|
export { stopTipForCli as C, snapshotStatus as S, renderRawLog as _, cursorAbs as a, resolveReadWindow as b, extractTaskCounts as c, isExitRequest as d, isPidAlive as f, readNotes as g, matchKeyword as h, controlCodeFromName as i, finalizedLines as l, listRecords as m, READ_PAGE_DEFAULT as n, deriveLiveStatus as o, isSubcommand as p, cmdHelp as r, extractNeedsInput as s, GRACEFUL_EXIT_COMMANDS as t, isAgentStuck as u, renderRawLogLines as v, writeToIpc as w, runSubcommand as x, resolveOne as y };
|
|
2584
|
-
//# sourceMappingURL=subcommands-
|
|
2584
|
+
//# sourceMappingURL=subcommands-o3WRyHb9.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as logger, t as addTransport } from "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
2
|
+
import { r as getInstalledPackage } from "./versionChecker-BjKAfiI-.js";
|
|
3
3
|
import { t as agentYesHome } from "./agentYesHome-_eJa3DaX.js";
|
|
4
4
|
import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-V4qvXgAw.js";
|
|
5
5
|
import { t as PidStore } from "./pidStore-fqXqTKkh.js";
|
|
@@ -1218,10 +1218,12 @@ async function agentYes({ cli, cliArgs = [], skipPermissions = false, prompt, ro
|
|
|
1218
1218
|
ptyEnv.AGENT_YES_PID = String(process.pid);
|
|
1219
1219
|
if (cliConf?.env) for (const [key, raw] of Object.entries(cliConf.env)) {
|
|
1220
1220
|
let unresolved = false;
|
|
1221
|
-
const value = raw.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)
|
|
1221
|
+
const value = raw.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)(?::-([^}]*))?\}/g, (_, name, fallback) => {
|
|
1222
1222
|
const v = ptyEnv[name];
|
|
1223
|
-
if (v
|
|
1224
|
-
|
|
1223
|
+
if (v !== void 0 && v !== "") return v;
|
|
1224
|
+
if (fallback !== void 0) return fallback;
|
|
1225
|
+
unresolved = true;
|
|
1226
|
+
return "";
|
|
1225
1227
|
});
|
|
1226
1228
|
if (unresolved) continue;
|
|
1227
1229
|
ptyEnv[key] = value;
|
|
@@ -1798,4 +1800,4 @@ function sleep(ms) {
|
|
|
1798
1800
|
|
|
1799
1801
|
//#endregion
|
|
1800
1802
|
export { removeControlCharacters as a, AgentContext as i, agentYes as n, config as r, CLIS_CONFIG as t };
|
|
1801
|
-
//# sourceMappingURL=ts-
|
|
1803
|
+
//# sourceMappingURL=ts-Qh0Z7nsZ.js.map
|
|
@@ -7,7 +7,7 @@ import { fileURLToPath } from "url";
|
|
|
7
7
|
|
|
8
8
|
//#region package.json
|
|
9
9
|
var name = "agent-yes";
|
|
10
|
-
var version = "1.
|
|
10
|
+
var version = "1.144.0";
|
|
11
11
|
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region ts/versionChecker.ts
|
|
@@ -215,4 +215,4 @@ async function displayVersion() {
|
|
|
215
215
|
|
|
216
216
|
//#endregion
|
|
217
217
|
export { versionString as i, displayVersion as n, getInstalledPackage as r, checkAndAutoUpdate as t };
|
|
218
|
-
//# sourceMappingURL=versionChecker-
|
|
218
|
+
//# sourceMappingURL=versionChecker-BjKAfiI-.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-yes",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.144.0",
|
|
4
4
|
"description": "A wrapper tool that automates interactions with various AI CLI tools by automatically handling common prompts and responses.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
"opencode-yes": "./dist/opencode-yes.js",
|
|
45
45
|
"qwen-yes": "./dist/qwen-yes.js",
|
|
46
46
|
"pi-yes": "./dist/pi-yes.js",
|
|
47
|
-
"openrouter-yes": "./dist/openrouter-yes.js"
|
|
47
|
+
"openrouter-yes": "./dist/openrouter-yes.js",
|
|
48
|
+
"orcy": "./dist/orcy.js"
|
|
48
49
|
},
|
|
49
50
|
"directories": {
|
|
50
51
|
"doc": "docs"
|
package/ts/index.ts
CHANGED
|
@@ -376,14 +376,21 @@ export default async function agentYes({
|
|
|
376
376
|
// Inject per-CLI env (e.g. glm → Z.AI endpoint). Expand ${VAR} against the
|
|
377
377
|
// launching env; skip entries whose vars are unset so we never blank out an
|
|
378
378
|
// inherited value (e.g. ANTHROPIC_AUTH_TOKEN when ZAI_API_KEY isn't exported).
|
|
379
|
+
// `${VAR:-default}` falls back to `default` when VAR is unset/empty — used for
|
|
380
|
+
// overridable defaults like the model (openrouter → z-ai/glm-5.2).
|
|
379
381
|
if (cliConf?.env) {
|
|
380
382
|
for (const [key, raw] of Object.entries(cliConf.env)) {
|
|
381
383
|
let unresolved = false;
|
|
382
|
-
const value = raw.replace(
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
384
|
+
const value = raw.replace(
|
|
385
|
+
/\$\{([A-Za-z_][A-Za-z0-9_]*)(?::-([^}]*))?\}/g,
|
|
386
|
+
(_, name, fallback) => {
|
|
387
|
+
const v = ptyEnv[name];
|
|
388
|
+
if (v !== undefined && v !== "") return v;
|
|
389
|
+
if (fallback !== undefined) return fallback;
|
|
390
|
+
unresolved = true;
|
|
391
|
+
return "";
|
|
392
|
+
},
|
|
393
|
+
);
|
|
387
394
|
if (unresolved) continue;
|
|
388
395
|
ptyEnv[key] = value;
|
|
389
396
|
}
|
package/ts/invokedCli.ts
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
// Short aliases → target CLI. Must match the alias wrappers postbuild.ts emits.
|
|
14
|
-
|
|
14
|
+
// orcy = "openrouter-claude-yes" (claude binary routed through OpenRouter).
|
|
15
|
+
export const CLI_ALIASES: Record<string, string> = { cy: "claude", orcy: "openrouter" };
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* The agent CLI implied by argv[1] (cy / claude-yes → "claude", codex-yes →
|
package/ts/postbuild.ts
CHANGED
|
@@ -13,7 +13,7 @@ const cliNames = [...Object.keys(CLIS_CONFIG), "agent"];
|
|
|
13
13
|
const suffixes = ["-yes"];
|
|
14
14
|
|
|
15
15
|
// Short aliases: maps alias name → target CLI name (alias resolves in parseCliArgs.ts)
|
|
16
|
-
const shortAliases: Record<string, string> = { cy: "claude" };
|
|
16
|
+
const shortAliases: Record<string, string> = { cy: "claude", orcy: "openrouter" };
|
|
17
17
|
|
|
18
18
|
// Under Bun (dev via `bun link`), run TypeScript source directly — no build needed.
|
|
19
19
|
// Under Node (published install or CI), use the compiled dist/cli.js.
|
package/ts/subcommands.ts
CHANGED
|
Binary file
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./ts-CV4m7CUC.js";
|
|
2
|
-
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-DatX-QMn.js";
|
|
4
|
-
import "./pidStore-fqXqTKkh.js";
|
|
5
|
-
import "./globalPidIndex-DlmmJlO8.js";
|
|
6
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DdzFdshj.js";
|
|
7
|
-
|
|
8
|
-
export { SUPPORTED_CLIS };
|