@warlock.js/ai-cli 5.31.0 → 5.32.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 +6 -0
- package/cjs/index.cjs +38 -46
- package/cjs/index.cjs.map +1 -1
- package/esm/adapters/aider.d.mts +4 -4
- package/esm/adapters/aider.d.mts.map +1 -1
- package/esm/adapters/amp.d.mts +2 -2
- package/esm/adapters/amp.d.mts.map +1 -1
- package/esm/adapters/antigravity.d.mts +3 -3
- package/esm/adapters/antigravity.d.mts.map +1 -1
- package/esm/adapters/claude-code.d.mts +2 -2
- package/esm/adapters/claude-code.d.mts.map +1 -1
- package/esm/adapters/claude-stream.d.mts +3 -3
- package/esm/adapters/claude-stream.d.mts.map +1 -1
- package/esm/adapters/codex.d.mts +3 -3
- package/esm/adapters/codex.d.mts.map +1 -1
- package/esm/adapters/codex.mjs +10 -8
- package/esm/adapters/codex.mjs.map +1 -1
- package/esm/adapters/copilot.d.mts +3 -3
- package/esm/adapters/copilot.d.mts.map +1 -1
- package/esm/adapters/copilot.mjs +5 -7
- package/esm/adapters/copilot.mjs.map +1 -1
- package/esm/adapters/cursor.d.mts +3 -3
- package/esm/adapters/cursor.d.mts.map +1 -1
- package/esm/adapters/droid.d.mts +3 -3
- package/esm/adapters/droid.d.mts.map +1 -1
- package/esm/adapters/grok.d.mts +3 -3
- package/esm/adapters/grok.d.mts.map +1 -1
- package/esm/adapters/grok.mjs +6 -8
- package/esm/adapters/grok.mjs.map +1 -1
- package/esm/adapters/index.d.mts +2 -1
- package/esm/adapters/index.mjs +1 -1
- package/esm/adapters/kimi.d.mts +3 -3
- package/esm/adapters/kimi.d.mts.map +1 -1
- package/esm/adapters/mistral-vibe.d.mts +3 -3
- package/esm/adapters/mistral-vibe.d.mts.map +1 -1
- package/esm/adapters/mistral-vibe.mjs +5 -7
- package/esm/adapters/mistral-vibe.mjs.map +1 -1
- package/esm/adapters/opencode.d.mts +3 -3
- package/esm/adapters/opencode.d.mts.map +1 -1
- package/esm/adapters/qwen-code.d.mts +2 -2
- package/esm/adapters/qwen-code.d.mts.map +1 -1
- package/esm/adapters/reasonix.d.mts +3 -3
- package/esm/adapters/reasonix.d.mts.map +1 -1
- package/esm/adapters/reasonix.mjs +6 -8
- package/esm/adapters/reasonix.mjs.map +1 -1
- package/esm/adapters/shared.d.mts +19 -16
- package/esm/adapters/shared.d.mts.map +1 -1
- package/esm/cli-agent.d.mts +9 -8
- package/esm/cli-agent.d.mts.map +1 -1
- package/esm/cli.d.mts +11 -8
- package/esm/cli.d.mts.map +1 -1
- package/esm/contracts/adapter.contract.d.mts +52 -31
- package/esm/contracts/adapter.contract.d.mts.map +1 -1
- package/esm/contracts/events.type.d.mts +36 -24
- package/esm/contracts/events.type.d.mts.map +1 -1
- package/esm/contracts/index.d.mts +2 -1
- package/esm/contracts/mcp.type.d.mts +4 -5
- package/esm/contracts/mcp.type.d.mts.map +1 -1
- package/esm/contracts/options.type.d.mts +56 -31
- package/esm/contracts/options.type.d.mts.map +1 -1
- package/esm/errors.d.mts +11 -9
- package/esm/errors.d.mts.map +1 -1
- package/esm/index.d.mts +2 -0
- package/esm/model/cli-model.d.mts +8 -7
- package/esm/model/cli-model.d.mts.map +1 -1
- package/esm/probe/probe.d.mts +4 -4
- package/esm/probe/probe.d.mts.map +1 -1
- package/esm/probe/probe.mjs +2 -2
- package/esm/probe/probe.mjs.map +1 -1
- package/esm/session/aggregate.mjs +2 -4
- package/esm/session/aggregate.mjs.map +1 -1
- package/esm/session/environment.mjs +1 -1
- package/esm/spawn/invocation.d.mts +6 -7
- package/esm/spawn/invocation.d.mts.map +1 -1
- package/esm/spawn/invocation.mjs +3 -3
- package/esm/spawn/invocation.mjs.map +1 -1
- package/esm/spawn/resolve-command.d.mts +12 -10
- package/esm/spawn/resolve-command.d.mts.map +1 -1
- package/esm/stream/json-lines.d.mts +10 -10
- package/esm/stream/json-lines.d.mts.map +1 -1
- package/esm/stream/line-splitter.mjs +2 -2
- package/esm/stream/line-splitter.mjs.map +1 -1
- package/esm/utils/toml.d.mts +3 -4
- package/esm/utils/toml.d.mts.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ 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.32.0 - 2026-10-18
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Pin the package development compiler to TypeScript 7.0.2 and use explicit Node types and source roots with supported module resolution.
|
|
12
|
+
|
|
7
13
|
## 5.31.0 - 2026-10-18
|
|
8
14
|
|
|
9
15
|
### Added
|
package/cjs/index.cjs
CHANGED
|
@@ -20,7 +20,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
20
20
|
}
|
|
21
21
|
return to;
|
|
22
22
|
};
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
24
24
|
value: mod,
|
|
25
25
|
enumerable: true
|
|
26
26
|
}) : target, mod));
|
|
@@ -258,9 +258,9 @@ const CMD_LINE_LIMIT = 8e3;
|
|
|
258
258
|
/** `CreateProcess` command-line limit (32767 characters), with headroom. */
|
|
259
259
|
const WINDOWS_LINE_LIMIT = 32e3;
|
|
260
260
|
/** Linux `MAX_ARG_STRLEN` (128 KiB per argument), with headroom. */
|
|
261
|
-
const POSIX_ARGUMENT_LIMIT =
|
|
261
|
+
const POSIX_ARGUMENT_LIMIT = 122880;
|
|
262
262
|
/** Conservative total argv budget on POSIX (ARG_MAX is shared with the environment). */
|
|
263
|
-
const POSIX_TOTAL_LIMIT =
|
|
263
|
+
const POSIX_TOTAL_LIMIT = 524288;
|
|
264
264
|
/**
|
|
265
265
|
* Quote one argument for a `cmd.exe /s /c "..."` line, or return `null` when
|
|
266
266
|
* it holds a byte cmd cannot quote safely. Inside double quotes `& | < > ^`
|
|
@@ -323,7 +323,7 @@ function fitsCommandLine(invocation, platform) {
|
|
|
323
323
|
/** How long a single `--help`/`--version` call may take. */
|
|
324
324
|
const PROBE_TIMEOUT_MS = 3e4;
|
|
325
325
|
/** Output cap per probe call; help screens are a few KiB. */
|
|
326
|
-
const PROBE_OUTPUT_LIMIT =
|
|
326
|
+
const PROBE_OUTPUT_LIMIT = 1048576;
|
|
327
327
|
function escapeRegExp(text) {
|
|
328
328
|
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
329
329
|
}
|
|
@@ -649,7 +649,7 @@ var EventLog = class {
|
|
|
649
649
|
//#endregion
|
|
650
650
|
//#region ../../packages/ai-cli/src/stream/line-splitter.ts
|
|
651
651
|
/** Longest line kept in memory; a longer one is dropped (reported via `onOverflow`). */
|
|
652
|
-
const MAX_LINE_BYTES =
|
|
652
|
+
const MAX_LINE_BYTES = 33554432;
|
|
653
653
|
/**
|
|
654
654
|
* Split a byte stream into lines. Multi-byte UTF-8 characters split across
|
|
655
655
|
* chunks are decoded correctly, `\r\n` and `\n` both end a line, and a final
|
|
@@ -757,9 +757,7 @@ var ResultAggregator = class {
|
|
|
757
757
|
case "usage":
|
|
758
758
|
this.usage = event.cumulative ? { ...event.usage } : addUsage(this.usage, event.usage);
|
|
759
759
|
break;
|
|
760
|
-
case "error":
|
|
761
|
-
if (event.fatal && this.fatalError === void 0) this.fatalError = event.message;
|
|
762
|
-
break;
|
|
760
|
+
case "error": if (event.fatal && this.fatalError === void 0) this.fatalError = event.message;
|
|
763
761
|
}
|
|
764
762
|
}
|
|
765
763
|
/** Close the stream: deltas never followed by a complete message count as one. */
|
|
@@ -2498,13 +2496,15 @@ const codexAdapter = {
|
|
|
2498
2496
|
args.push("--dangerously-bypass-approvals-and-sandbox");
|
|
2499
2497
|
requires.push("--dangerously-bypass-approvals-and-sandbox");
|
|
2500
2498
|
}
|
|
2501
|
-
if (context.mcp !== void 0)
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2499
|
+
if (context.mcp !== void 0) {
|
|
2500
|
+
if (context.home !== void 0 && context.homeIsPrivate) files.push({
|
|
2501
|
+
path: node_path.default.join(context.home, "config.toml"),
|
|
2502
|
+
content: toToml({ mcp_servers: codexMcpTable(context.mcp) })
|
|
2503
|
+
});
|
|
2504
|
+
else {
|
|
2505
|
+
args.push(...codexMcpOverrides(context.mcp, env));
|
|
2506
|
+
requires.push("--config");
|
|
2507
|
+
}
|
|
2508
2508
|
}
|
|
2509
2509
|
if (context.home !== void 0) env.CODEX_HOME = context.home;
|
|
2510
2510
|
const prompt = context.transport === "argv" ? argvPrompt(context.prompt) : "-";
|
|
@@ -2573,7 +2573,7 @@ function codexMcpOverrides(servers, env) {
|
|
|
2573
2573
|
}
|
|
2574
2574
|
return overrides;
|
|
2575
2575
|
}
|
|
2576
|
-
const TOOL_ITEMS = new Set([
|
|
2576
|
+
const TOOL_ITEMS = /* @__PURE__ */ new Set([
|
|
2577
2577
|
"command_execution",
|
|
2578
2578
|
"file_change",
|
|
2579
2579
|
"mcp_tool_call",
|
|
@@ -2940,13 +2940,11 @@ function createCopilotParser(context) {
|
|
|
2940
2940
|
case "result":
|
|
2941
2941
|
sessionRef = stringField(record, "sessionId") ?? sessionRef;
|
|
2942
2942
|
break;
|
|
2943
|
-
case "error":
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
});
|
|
2949
|
-
break;
|
|
2943
|
+
case "error": events.push({
|
|
2944
|
+
type: "error",
|
|
2945
|
+
message: stringField(record, "message") ?? "error",
|
|
2946
|
+
raw: record
|
|
2947
|
+
});
|
|
2950
2948
|
}
|
|
2951
2949
|
return events;
|
|
2952
2950
|
}, () => {
|
|
@@ -3508,14 +3506,12 @@ function createGrokParser() {
|
|
|
3508
3506
|
});
|
|
3509
3507
|
break;
|
|
3510
3508
|
}
|
|
3511
|
-
case "error":
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
});
|
|
3518
|
-
break;
|
|
3509
|
+
case "error": events.push({
|
|
3510
|
+
type: "error",
|
|
3511
|
+
message: stringField(record, "message") ?? "Grok Build reported an error",
|
|
3512
|
+
fatal: true,
|
|
3513
|
+
raw: record
|
|
3514
|
+
});
|
|
3519
3515
|
}
|
|
3520
3516
|
return events;
|
|
3521
3517
|
}),
|
|
@@ -3905,13 +3901,11 @@ function createVibeParser(context) {
|
|
|
3905
3901
|
}
|
|
3906
3902
|
break;
|
|
3907
3903
|
}
|
|
3908
|
-
case "notice":
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
});
|
|
3914
|
-
break;
|
|
3904
|
+
case "notice": if (stringField(record, "level") === "error") events.push({
|
|
3905
|
+
type: "error",
|
|
3906
|
+
message: stringField(record, "message") ?? "error",
|
|
3907
|
+
raw: record
|
|
3908
|
+
});
|
|
3915
3909
|
}
|
|
3916
3910
|
return events;
|
|
3917
3911
|
}, () => {
|
|
@@ -4452,14 +4446,12 @@ function createReasonixParser() {
|
|
|
4452
4446
|
});
|
|
4453
4447
|
break;
|
|
4454
4448
|
}
|
|
4455
|
-
case "turn_done":
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
});
|
|
4462
|
-
break;
|
|
4449
|
+
case "turn_done": if (stringField(record, "status") === "failed") events.push({
|
|
4450
|
+
type: "error",
|
|
4451
|
+
message: stringField(record, "err") ?? "Reasonix turn failed",
|
|
4452
|
+
fatal: true,
|
|
4453
|
+
raw: record
|
|
4454
|
+
});
|
|
4463
4455
|
}
|
|
4464
4456
|
return events;
|
|
4465
4457
|
}),
|