jinzd-ai-cli 0.1.97 → 0.1.98
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/dist/{chunk-ZI3JNFJI.js → chunk-E6NUTTCD.js} +1 -8
- package/dist/{chunk-XII3FWIZ.js → chunk-K4AB4ZUH.js} +1 -1
- package/dist/index.js +4 -4
- package/dist/{run-tests-FU5CQLMA.js → run-tests-CNDALP24.js} +1 -1
- package/dist/{server-L6JPEMMK.js → server-K5CTT3WU.js} +15 -15
- package/package.json +1 -1
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
3
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
4
|
-
}) : x)(function(x) {
|
|
5
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
6
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
|
-
});
|
|
8
2
|
|
|
9
3
|
// src/tools/builtin/run-tests.ts
|
|
10
4
|
import { execSync } from "child_process";
|
|
@@ -14,7 +8,7 @@ import { platform } from "os";
|
|
|
14
8
|
import chalk from "chalk";
|
|
15
9
|
|
|
16
10
|
// src/core/constants.ts
|
|
17
|
-
var VERSION = "0.1.
|
|
11
|
+
var VERSION = "0.1.98";
|
|
18
12
|
var APP_NAME = "ai-cli";
|
|
19
13
|
var CONFIG_DIR_NAME = ".aicli";
|
|
20
14
|
var CONFIG_FILE_NAME = "config.json";
|
|
@@ -447,7 +441,6 @@ var runTestsTool = {
|
|
|
447
441
|
};
|
|
448
442
|
|
|
449
443
|
export {
|
|
450
|
-
__require,
|
|
451
444
|
VERSION,
|
|
452
445
|
APP_NAME,
|
|
453
446
|
CONFIG_DIR_NAME,
|
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
theme,
|
|
36
36
|
truncateOutput,
|
|
37
37
|
undoStack
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-K4AB4ZUH.js";
|
|
39
39
|
import {
|
|
40
40
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
41
41
|
AUTHOR,
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
REPO_URL,
|
|
56
56
|
SKILLS_DIR_NAME,
|
|
57
57
|
VERSION
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-E6NUTTCD.js";
|
|
59
59
|
|
|
60
60
|
// src/index.ts
|
|
61
61
|
import { program } from "commander";
|
|
@@ -1904,7 +1904,7 @@ ${hint}` : "")
|
|
|
1904
1904
|
description: "Run project tests and show structured report",
|
|
1905
1905
|
usage: "/test [command|filter]",
|
|
1906
1906
|
async execute(args, _ctx) {
|
|
1907
|
-
const { executeTests } = await import("./run-tests-
|
|
1907
|
+
const { executeTests } = await import("./run-tests-CNDALP24.js");
|
|
1908
1908
|
const argStr = args.join(" ").trim();
|
|
1909
1909
|
let testArgs = {};
|
|
1910
1910
|
if (argStr) {
|
|
@@ -5292,7 +5292,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
5292
5292
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
5293
5293
|
process.exit(1);
|
|
5294
5294
|
}
|
|
5295
|
-
const { startWebServer } = await import("./server-
|
|
5295
|
+
const { startWebServer } = await import("./server-K5CTT3WU.js");
|
|
5296
5296
|
await startWebServer({ port, host: options.host });
|
|
5297
5297
|
});
|
|
5298
5298
|
program.command("sessions").description("List recent conversation sessions").action(async () => {
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
setupProxy,
|
|
24
24
|
spawnAgentContext,
|
|
25
25
|
truncateOutput
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-K4AB4ZUH.js";
|
|
27
27
|
import {
|
|
28
28
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
29
29
|
CONTEXT_FILE_CANDIDATES,
|
|
@@ -34,9 +34,8 @@ import {
|
|
|
34
34
|
PLAN_MODE_READONLY_TOOLS,
|
|
35
35
|
PLAN_MODE_SYSTEM_ADDON,
|
|
36
36
|
SKILLS_DIR_NAME,
|
|
37
|
-
VERSION
|
|
38
|
-
|
|
39
|
-
} from "./chunk-ZI3JNFJI.js";
|
|
37
|
+
VERSION
|
|
38
|
+
} from "./chunk-E6NUTTCD.js";
|
|
40
39
|
|
|
41
40
|
// src/web/server.ts
|
|
42
41
|
import express from "express";
|
|
@@ -44,6 +43,7 @@ import { createServer } from "http";
|
|
|
44
43
|
import { WebSocketServer } from "ws";
|
|
45
44
|
import { join as join3, dirname, resolve as resolve2, relative } from "path";
|
|
46
45
|
import { existsSync as existsSync4, readFileSync as readFileSync4, readdirSync, statSync } from "fs";
|
|
46
|
+
import { networkInterfaces } from "os";
|
|
47
47
|
|
|
48
48
|
// src/web/tool-executor-web.ts
|
|
49
49
|
import { randomUUID } from "crypto";
|
|
@@ -1560,6 +1560,16 @@ async function startWebServer(options = {}) {
|
|
|
1560
1560
|
const MAX_PORT_ATTEMPTS = 10;
|
|
1561
1561
|
let actualPort = port;
|
|
1562
1562
|
const tryListen = (attempt) => {
|
|
1563
|
+
server.once("error", (err) => {
|
|
1564
|
+
if (err.code === "EADDRINUSE" && attempt < MAX_PORT_ATTEMPTS) {
|
|
1565
|
+
actualPort++;
|
|
1566
|
+
console.log(` \u26A0 Port ${actualPort - 1} in use, trying ${actualPort}...`);
|
|
1567
|
+
server.close(() => tryListen(attempt + 1));
|
|
1568
|
+
} else {
|
|
1569
|
+
console.error(` \u274C Failed to start server: ${err.message}`);
|
|
1570
|
+
process.exit(1);
|
|
1571
|
+
}
|
|
1572
|
+
});
|
|
1563
1573
|
server.listen(actualPort, host, () => {
|
|
1564
1574
|
const url = `http://${host === "0.0.0.0" ? "localhost" : host}:${actualPort}`;
|
|
1565
1575
|
console.log(`
|
|
@@ -1567,7 +1577,7 @@ async function startWebServer(options = {}) {
|
|
|
1567
1577
|
if (actualPort !== port) console.log(` (port ${port} was in use, using ${actualPort})`);
|
|
1568
1578
|
if (host === "0.0.0.0" || host === "::") {
|
|
1569
1579
|
try {
|
|
1570
|
-
const nets =
|
|
1580
|
+
const nets = networkInterfaces();
|
|
1571
1581
|
for (const name of Object.keys(nets)) {
|
|
1572
1582
|
for (const net of nets[name] ?? []) {
|
|
1573
1583
|
if (net.family === "IPv4" && !net.internal) {
|
|
@@ -1582,16 +1592,6 @@ async function startWebServer(options = {}) {
|
|
|
1582
1592
|
`);
|
|
1583
1593
|
openBrowser(url);
|
|
1584
1594
|
});
|
|
1585
|
-
server.once("error", (err) => {
|
|
1586
|
-
if (err.code === "EADDRINUSE" && attempt < MAX_PORT_ATTEMPTS) {
|
|
1587
|
-
actualPort++;
|
|
1588
|
-
console.log(` \u26A0 Port ${actualPort - 1} in use, trying ${actualPort}...`);
|
|
1589
|
-
tryListen(attempt + 1);
|
|
1590
|
-
} else {
|
|
1591
|
-
console.error(` \u274C Failed to start server: ${err.message}`);
|
|
1592
|
-
process.exit(1);
|
|
1593
|
-
}
|
|
1594
|
-
});
|
|
1595
1595
|
};
|
|
1596
1596
|
tryListen(1);
|
|
1597
1597
|
process.on("SIGINT", () => {
|