jinzd-ai-cli 0.1.89 → 0.1.90

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.
@@ -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.89";
11
+ var VERSION = "0.1.90";
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,
@@ -16,7 +16,7 @@ import {
16
16
  SUBAGENT_MAX_ROUNDS_LIMIT,
17
17
  VERSION,
18
18
  runTestsTool
19
- } from "./chunk-6T7KHDLM.js";
19
+ } from "./chunk-N22QAXWR.js";
20
20
 
21
21
  // src/config/config-manager.ts
22
22
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ import {
35
35
  theme,
36
36
  truncateOutput,
37
37
  undoStack
38
- } from "./chunk-3RRSDUVU.js";
38
+ } from "./chunk-TVXTIA3P.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-6T7KHDLM.js";
58
+ } from "./chunk-N22QAXWR.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-U3HF44WA.js");
1907
+ const { executeTests } = await import("./run-tests-RDW3AQXJ.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-IDSC72WU.js");
5295
+ const { startWebServer } = await import("./server-DKCUXFJR.js");
5296
5296
  await startWebServer({ port, host: options.host });
5297
5297
  });
5298
5298
  program.command("sessions").description("List recent conversation sessions").action(async () => {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-6T7KHDLM.js";
5
+ } from "./chunk-N22QAXWR.js";
6
6
  export {
7
7
  executeTests,
8
8
  runTestsTool
@@ -23,7 +23,7 @@ import {
23
23
  setupProxy,
24
24
  spawnAgentContext,
25
25
  truncateOutput
26
- } from "./chunk-3RRSDUVU.js";
26
+ } from "./chunk-TVXTIA3P.js";
27
27
  import {
28
28
  AGENTIC_BEHAVIOR_GUIDELINE,
29
29
  CONTEXT_FILE_CANDIDATES,
@@ -34,16 +34,15 @@ import {
34
34
  PLAN_MODE_READONLY_TOOLS,
35
35
  PLAN_MODE_SYSTEM_ADDON,
36
36
  SKILLS_DIR_NAME,
37
- VERSION,
38
- __require
39
- } from "./chunk-6T7KHDLM.js";
37
+ VERSION
38
+ } from "./chunk-N22QAXWR.js";
40
39
 
41
40
  // src/web/server.ts
42
41
  import express from "express";
43
42
  import { createServer } from "http";
44
43
  import { WebSocketServer } from "ws";
45
- import { join as join3, dirname, resolve as resolve2 } from "path";
46
- import { existsSync as existsSync4, readFileSync as readFileSync4 } from "fs";
44
+ import { join as join3, dirname, resolve as resolve2, relative } from "path";
45
+ import { existsSync as existsSync4, readFileSync as readFileSync4, readdirSync, statSync } from "fs";
47
46
 
48
47
  // src/web/tool-executor-web.ts
49
48
  import { randomUUID } from "crypto";
@@ -1356,17 +1355,19 @@ async function startWebServer(options = {}) {
1356
1355
  app.get("/api/status", (_req, res) => {
1357
1356
  res.json({
1358
1357
  version: VERSION,
1359
- providers: availableProviders,
1358
+ providers: availableProviders.map((p) => ({
1359
+ id: p.info.id,
1360
+ displayName: p.info.displayName,
1361
+ models: p.info.models.map((m) => ({ id: m.id, name: m.name ?? m.id }))
1362
+ })),
1360
1363
  tools: toolRegistry.getDefinitions().length,
1361
1364
  cwd: process.cwd()
1362
1365
  });
1363
1366
  });
1364
1367
  app.get("/api/files", (req, res) => {
1365
- const { readdirSync, statSync } = __require("fs");
1366
- const { join: pjoin, relative } = __require("path");
1367
1368
  const cwd = process.cwd();
1368
1369
  const prefix = req.query.prefix || "";
1369
- const targetDir = pjoin(cwd, prefix);
1370
+ const targetDir = join3(cwd, prefix);
1370
1371
  if (!resolve2(targetDir).startsWith(resolve2(cwd))) {
1371
1372
  res.json({ files: [] });
1372
1373
  return;
@@ -1376,7 +1377,7 @@ async function startWebServer(options = {}) {
1376
1377
  const entries = readdirSync(targetDir, { withFileTypes: true });
1377
1378
  const files = entries.filter((e) => !SKIP.has(e.name) && !e.name.startsWith(".")).slice(0, 50).map((e) => ({
1378
1379
  name: e.name,
1379
- path: relative(cwd, pjoin(targetDir, e.name)).replace(/\\/g, "/"),
1380
+ path: relative(cwd, join3(targetDir, e.name)).replace(/\\/g, "/"),
1380
1381
  isDir: e.isDirectory()
1381
1382
  }));
1382
1383
  res.json({ files });
@@ -1414,13 +1415,12 @@ async function startWebServer(options = {}) {
1414
1415
  return;
1415
1416
  }
1416
1417
  try {
1417
- const { statSync, readFileSync: readFileSync5 } = __require("fs");
1418
1418
  const stat = statSync(fullPath);
1419
1419
  if (stat.size > 512 * 1024) {
1420
1420
  res.json({ error: `File too large (${(stat.size / 1024).toFixed(0)} KB, max 512 KB)` });
1421
1421
  return;
1422
1422
  }
1423
- const content = readFileSync5(fullPath, "utf-8");
1423
+ const content = readFileSync4(fullPath, "utf-8");
1424
1424
  res.json({ content, size: stat.size });
1425
1425
  } catch (err) {
1426
1426
  res.json({ error: `Cannot read: ${err.message}` });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.1.89",
3
+ "version": "0.1.90",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",