@warlock.js/ai-cli 5.53.0 → 5.54.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/CHANGELOG.md +14 -0
- package/cjs/index.cjs +42 -3
- package/cjs/index.cjs.map +1 -1
- package/esm/adapters/aider.d.mts.map +1 -1
- package/esm/adapters/aider.mjs +8 -0
- package/esm/adapters/aider.mjs.map +1 -1
- package/esm/adapters/amp.mjs +1 -0
- package/esm/adapters/amp.mjs.map +1 -1
- package/esm/adapters/antigravity.d.mts.map +1 -1
- package/esm/adapters/antigravity.mjs +1 -0
- package/esm/adapters/antigravity.mjs.map +1 -1
- package/esm/adapters/claude-code.mjs +5 -0
- package/esm/adapters/claude-code.mjs.map +1 -1
- package/esm/adapters/claude-stream.mjs.map +1 -1
- package/esm/adapters/codex.d.mts.map +1 -1
- package/esm/adapters/codex.mjs +1 -0
- package/esm/adapters/codex.mjs.map +1 -1
- package/esm/adapters/copilot.d.mts.map +1 -1
- package/esm/adapters/copilot.mjs +1 -0
- package/esm/adapters/copilot.mjs.map +1 -1
- package/esm/adapters/cursor.d.mts.map +1 -1
- package/esm/adapters/cursor.mjs +1 -0
- package/esm/adapters/cursor.mjs.map +1 -1
- package/esm/adapters/droid.d.mts.map +1 -1
- package/esm/adapters/droid.mjs +1 -0
- package/esm/adapters/droid.mjs.map +1 -1
- package/esm/adapters/grok.d.mts.map +1 -1
- package/esm/adapters/grok.mjs +1 -0
- package/esm/adapters/grok.mjs.map +1 -1
- package/esm/adapters/kimi.d.mts.map +1 -1
- package/esm/adapters/kimi.mjs +5 -0
- package/esm/adapters/kimi.mjs.map +1 -1
- package/esm/adapters/mistral-vibe.d.mts.map +1 -1
- package/esm/adapters/mistral-vibe.mjs +1 -0
- package/esm/adapters/mistral-vibe.mjs.map +1 -1
- package/esm/adapters/opencode.d.mts.map +1 -1
- package/esm/adapters/opencode.mjs +6 -0
- package/esm/adapters/opencode.mjs.map +1 -1
- package/esm/adapters/qwen-code.mjs +6 -0
- package/esm/adapters/qwen-code.mjs.map +1 -1
- package/esm/adapters/reasonix.d.mts.map +1 -1
- package/esm/adapters/reasonix.mjs +1 -0
- package/esm/adapters/reasonix.mjs.map +1 -1
- package/esm/adapters/shared.mjs.map +1 -1
- package/esm/cli-agent.mjs +2 -2
- package/esm/cli-agent.mjs.map +1 -1
- package/esm/cli.mjs.map +1 -1
- package/esm/contracts/adapter.contract.d.mts +6 -0
- package/esm/contracts/adapter.contract.d.mts.map +1 -1
- package/esm/contracts/options.type.d.mts +2 -1
- package/esm/contracts/options.type.d.mts.map +1 -1
- package/esm/errors.mjs.map +1 -1
- package/esm/model/cli-model.mjs.map +1 -1
- package/esm/probe/probe.mjs.map +1 -1
- package/esm/session/aggregate.mjs.map +1 -1
- package/esm/session/environment.mjs +1 -1
- package/esm/session/environment.mjs.map +1 -1
- package/esm/session/run-directory.mjs.map +1 -1
- package/esm/session/session.mjs.map +1 -1
- package/esm/spawn/invocation.mjs.map +1 -1
- package/esm/spawn/process-tree.mjs.map +1 -1
- package/esm/spawn/resolve-command.mjs.map +1 -1
- package/esm/stream/event-log.mjs.map +1 -1
- package/esm/stream/json-lines.mjs.map +1 -1
- package/esm/stream/line-splitter.mjs.map +1 -1
- package/esm/utils/toml.mjs.map +1 -1
- package/llms-full.txt +2 -1
- package/package.json +2 -2
- package/skills/run-cli-agents/SKILL.md +1 -1
- package/skills/write-a-cli-adapter/SKILL.md +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@ All notable changes to `@warlock.js/ai-cli` are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
|
|
6
6
|
|
|
7
|
+
## 5.54.0 - 2026-11-16
|
|
8
|
+
|
|
9
|
+
### Upgrading
|
|
10
|
+
|
|
11
|
+
- `inheritEnv` keeps defaulting to `true` in 5.x, and the production warning when it is unset stays. The default changes to `"curated"` in 6.0, so set `inheritEnv` explicitly now (`"curated"` to adopt the new behaviour, `true` to keep inheriting the whole environment).
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- `CliAdapter` has an optional `passEnv` list: extra variables the CLI needs (base URLs, provider keys, auth tokens beyond `apiKeyEnv`). `inheritEnv: "curated"` passes them from the host together with `apiKeyEnv`. Every built-in adapter declares its list, so `"curated"` works out of the box for the usual setups; custom adapters can declare their own.
|
|
16
|
+
|
|
17
|
+
### Documentation
|
|
18
|
+
|
|
19
|
+
- The environment pages, the `run-cli-agents` and `write-a-cli-adapter` skills describe `passEnv` and the planned 6.0 default.
|
|
20
|
+
|
|
7
21
|
## 5.53.0 - 2026-11-11
|
|
8
22
|
|
|
9
23
|
### Upgrading
|
package/cjs/index.cjs
CHANGED
|
@@ -541,7 +541,7 @@ let warnedInheritedEnvironment = false;
|
|
|
541
541
|
function warnInheritedEnvironment(title, inheritEnv, env) {
|
|
542
542
|
if (warnedInheritedEnvironment || inheritEnv !== void 0 || env.NODE_ENV !== "production") return;
|
|
543
543
|
warnedInheritedEnvironment = true;
|
|
544
|
-
console.warn(`[warlock-ai-cli] ${title} receives the whole server environment because \`inheritEnv\` is not set (default \`true\`). Set \`inheritEnv: "curated"\` to pass only the system variables and the CLI's own API key variable, or \`inheritEnv: true\` to keep the current behaviour and silence this warning.`);
|
|
544
|
+
console.warn(`[warlock-ai-cli] ${title} receives the whole server environment because \`inheritEnv\` is not set (default \`true\`; the default changes to \`"curated"\` in 6.0). Set \`inheritEnv: "curated"\` to pass only the system variables and the CLI's own API key variable, or \`inheritEnv: true\` to keep the current behaviour and silence this warning.`);
|
|
545
545
|
}
|
|
546
546
|
|
|
547
547
|
//#endregion
|
|
@@ -1149,7 +1149,7 @@ function createCliAgent(adapter, options = {}, host = currentHost()) {
|
|
|
1149
1149
|
const probeEnvironment = () => buildEnvironment({
|
|
1150
1150
|
source: host.env,
|
|
1151
1151
|
inherit: options.inheritEnv ?? true,
|
|
1152
|
-
credentials: adapter.apiKeyEnv,
|
|
1152
|
+
credentials: [...adapter.apiKeyEnv, ...adapter.passEnv ?? []],
|
|
1153
1153
|
managed: [],
|
|
1154
1154
|
user: options.env,
|
|
1155
1155
|
platform: host.platform
|
|
@@ -1245,7 +1245,7 @@ function createCliAgent(adapter, options = {}, host = currentHost()) {
|
|
|
1245
1245
|
const env = buildEnvironment({
|
|
1246
1246
|
source: host.env,
|
|
1247
1247
|
inherit: options.inheritEnv ?? true,
|
|
1248
|
-
credentials: adapter.apiKeyEnv,
|
|
1248
|
+
credentials: [...adapter.apiKeyEnv, ...adapter.passEnv ?? []],
|
|
1249
1249
|
managed: home === "inherit" ? [] : adapter.homeEnv,
|
|
1250
1250
|
plan: host.platform === "win32" ? chosen.plan.env : {
|
|
1251
1251
|
PWD: cwd,
|
|
@@ -1597,6 +1597,14 @@ const aiderAdapter = {
|
|
|
1597
1597
|
title: "Aider",
|
|
1598
1598
|
command: "aider",
|
|
1599
1599
|
apiKeyEnv: [],
|
|
1600
|
+
passEnv: [
|
|
1601
|
+
"OPENAI_API_KEY",
|
|
1602
|
+
"OPENAI_API_BASE",
|
|
1603
|
+
"ANTHROPIC_API_KEY",
|
|
1604
|
+
"GEMINI_API_KEY",
|
|
1605
|
+
"DEEPSEEK_API_KEY",
|
|
1606
|
+
"OPENROUTER_API_KEY"
|
|
1607
|
+
],
|
|
1600
1608
|
homeEnv: ["HOME", "USERPROFILE"],
|
|
1601
1609
|
transports: ["argv", "file"],
|
|
1602
1610
|
effort: true,
|
|
@@ -2013,6 +2021,7 @@ const ampAdapter = {
|
|
|
2013
2021
|
title: "Amp",
|
|
2014
2022
|
command: "amp",
|
|
2015
2023
|
apiKeyEnv: ["AMP_API_KEY"],
|
|
2024
|
+
passEnv: ["AMP_URL"],
|
|
2016
2025
|
homeEnv: [
|
|
2017
2026
|
"XDG_CONFIG_HOME",
|
|
2018
2027
|
"XDG_DATA_HOME",
|
|
@@ -2128,6 +2137,7 @@ const antigravityAdapter = {
|
|
|
2128
2137
|
title: "Antigravity CLI",
|
|
2129
2138
|
command: "agy",
|
|
2130
2139
|
apiKeyEnv: ["GEMINI_API_KEY"],
|
|
2140
|
+
passEnv: [],
|
|
2131
2141
|
homeEnv: ["HOME", "USERPROFILE"],
|
|
2132
2142
|
transports: ["argv", "stdin"],
|
|
2133
2143
|
effort: true,
|
|
@@ -2352,6 +2362,11 @@ const claudeCodeAdapter = {
|
|
|
2352
2362
|
title: "Claude Code",
|
|
2353
2363
|
command: "claude",
|
|
2354
2364
|
apiKeyEnv: ["ANTHROPIC_API_KEY"],
|
|
2365
|
+
passEnv: [
|
|
2366
|
+
"ANTHROPIC_AUTH_TOKEN",
|
|
2367
|
+
"ANTHROPIC_BASE_URL",
|
|
2368
|
+
"CLAUDE_CODE_OAUTH_TOKEN"
|
|
2369
|
+
],
|
|
2355
2370
|
homeEnv: ["CLAUDE_CONFIG_DIR"],
|
|
2356
2371
|
transports: ["argv", "stdin"],
|
|
2357
2372
|
effort: true,
|
|
@@ -2472,6 +2487,7 @@ const codexAdapter = {
|
|
|
2472
2487
|
title: "Codex CLI",
|
|
2473
2488
|
command: "codex",
|
|
2474
2489
|
apiKeyEnv: ["CODEX_API_KEY"],
|
|
2490
|
+
passEnv: ["OPENAI_API_KEY", "OPENAI_BASE_URL"],
|
|
2475
2491
|
homeEnv: ["CODEX_HOME"],
|
|
2476
2492
|
transports: ["argv", "stdin"],
|
|
2477
2493
|
effort: true,
|
|
@@ -2787,6 +2803,7 @@ const copilotAdapter = {
|
|
|
2787
2803
|
title: "Copilot CLI",
|
|
2788
2804
|
command: "copilot",
|
|
2789
2805
|
apiKeyEnv: ["COPILOT_GITHUB_TOKEN"],
|
|
2806
|
+
passEnv: ["GH_TOKEN", "GITHUB_TOKEN"],
|
|
2790
2807
|
homeEnv: ["COPILOT_HOME"],
|
|
2791
2808
|
transports: ["argv", "stdin"],
|
|
2792
2809
|
effort: true,
|
|
@@ -3020,6 +3037,7 @@ const cursorAdapter = {
|
|
|
3020
3037
|
title: "Cursor CLI",
|
|
3021
3038
|
command: "cursor-agent",
|
|
3022
3039
|
apiKeyEnv: ["CURSOR_API_KEY"],
|
|
3040
|
+
passEnv: [],
|
|
3023
3041
|
homeEnv: [
|
|
3024
3042
|
"HOME",
|
|
3025
3043
|
"USERPROFILE",
|
|
@@ -3214,6 +3232,7 @@ const droidAdapter = {
|
|
|
3214
3232
|
title: "Factory Droid",
|
|
3215
3233
|
command: "droid",
|
|
3216
3234
|
apiKeyEnv: ["FACTORY_API_KEY"],
|
|
3235
|
+
passEnv: [],
|
|
3217
3236
|
homeEnv: ["FACTORY_HOME_OVERRIDE"],
|
|
3218
3237
|
transports: ["argv", "file"],
|
|
3219
3238
|
effort: true,
|
|
@@ -3391,6 +3410,7 @@ const grokAdapter = {
|
|
|
3391
3410
|
title: "Grok Build",
|
|
3392
3411
|
command: "grok",
|
|
3393
3412
|
apiKeyEnv: ["XAI_API_KEY"],
|
|
3413
|
+
passEnv: [],
|
|
3394
3414
|
homeEnv: ["GROK_HOME"],
|
|
3395
3415
|
transports: ["argv", "file"],
|
|
3396
3416
|
effort: true,
|
|
@@ -3583,6 +3603,11 @@ const kimiAdapter = {
|
|
|
3583
3603
|
title: "Kimi Code",
|
|
3584
3604
|
command: "kimi",
|
|
3585
3605
|
apiKeyEnv: ["KIMI_MODEL_API_KEY"],
|
|
3606
|
+
passEnv: [
|
|
3607
|
+
"KIMI_MODEL_NAME",
|
|
3608
|
+
"KIMI_MODEL_PROVIDER_TYPE",
|
|
3609
|
+
"KIMI_MODEL_BASE_URL"
|
|
3610
|
+
],
|
|
3586
3611
|
homeEnv: ["KIMI_CODE_HOME"],
|
|
3587
3612
|
transports: ["argv"],
|
|
3588
3613
|
effort: false,
|
|
@@ -3739,6 +3764,7 @@ const mistralVibeAdapter = {
|
|
|
3739
3764
|
title: "Mistral Vibe",
|
|
3740
3765
|
command: "vibe",
|
|
3741
3766
|
apiKeyEnv: ["MISTRAL_API_KEY"],
|
|
3767
|
+
passEnv: [],
|
|
3742
3768
|
homeEnv: ["VIBE_HOME"],
|
|
3743
3769
|
transports: [
|
|
3744
3770
|
"argv",
|
|
@@ -3983,6 +4009,12 @@ const opencodeAdapter = {
|
|
|
3983
4009
|
title: "OpenCode",
|
|
3984
4010
|
command: "opencode",
|
|
3985
4011
|
apiKeyEnv: [],
|
|
4012
|
+
passEnv: [
|
|
4013
|
+
"ANTHROPIC_API_KEY",
|
|
4014
|
+
"OPENAI_API_KEY",
|
|
4015
|
+
"GEMINI_API_KEY",
|
|
4016
|
+
"OPENROUTER_API_KEY"
|
|
4017
|
+
],
|
|
3986
4018
|
homeEnv: [
|
|
3987
4019
|
"XDG_CONFIG_HOME",
|
|
3988
4020
|
"XDG_DATA_HOME",
|
|
@@ -4192,6 +4224,12 @@ const qwenCodeAdapter = {
|
|
|
4192
4224
|
title: "Qwen Code",
|
|
4193
4225
|
command: "qwen",
|
|
4194
4226
|
apiKeyEnv: ["OPENAI_API_KEY"],
|
|
4227
|
+
passEnv: [
|
|
4228
|
+
"OPENAI_BASE_URL",
|
|
4229
|
+
"OPENAI_MODEL",
|
|
4230
|
+
"ANTHROPIC_API_KEY",
|
|
4231
|
+
"GEMINI_API_KEY"
|
|
4232
|
+
],
|
|
4195
4233
|
homeEnv: ["QWEN_HOME"],
|
|
4196
4234
|
transports: ["argv", "stdin"],
|
|
4197
4235
|
effort: false,
|
|
@@ -4279,6 +4317,7 @@ const reasonixAdapter = {
|
|
|
4279
4317
|
title: "Reasonix",
|
|
4280
4318
|
command: "reasonix",
|
|
4281
4319
|
apiKeyEnv: ["DEEPSEEK_API_KEY"],
|
|
4320
|
+
passEnv: [],
|
|
4282
4321
|
homeEnv: ["REASONIX_HOME"],
|
|
4283
4322
|
transports: ["argv", "stdin"],
|
|
4284
4323
|
effort: true,
|