jinzd-ai-cli 0.4.0 → 0.4.2
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-ODUVYMY7.js → chunk-54EGIKT5.js} +1 -1
- package/dist/{chunk-MXMU4PSC.js → chunk-E2HVDEWW.js} +1 -1
- package/dist/{chunk-AE7S6GOW.js → chunk-LP2ZH4HH.js} +2 -2
- package/dist/{chunk-SX52VL4D.js → chunk-UB6BRUQ4.js} +1 -1
- package/dist/{hub-F5PM4DUQ.js → hub-OXZNGBAY.js} +11 -3
- package/dist/index.js +16 -11
- package/dist/{run-tests-LX4GMVCW.js → run-tests-4WOG5THP.js} +1 -1
- package/dist/{run-tests-PVELOOI3.js → run-tests-DRN42YLI.js} +1 -1
- package/dist/{server-4I75C6R7.js → server-JNWKHPBS.js} +4 -4
- package/dist/{task-orchestrator-NS7XXP5N.js → task-orchestrator-GONUQ6TN.js} +3 -3
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
EnvLoader,
|
|
4
4
|
schemaToJsonSchema
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-E2HVDEWW.js";
|
|
6
6
|
import {
|
|
7
7
|
APP_NAME,
|
|
8
8
|
CONFIG_DIR_NAME,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
MCP_TOOL_PREFIX,
|
|
16
16
|
PLUGINS_DIR_NAME,
|
|
17
17
|
VERSION
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-UB6BRUQ4.js";
|
|
19
19
|
|
|
20
20
|
// src/config/config-manager.ts
|
|
21
21
|
import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
|
|
@@ -293,10 +293,18 @@ async function startHub(options, configManager, providers) {
|
|
|
293
293
|
try {
|
|
294
294
|
const raw = readFileSync(options.rolesFile, "utf-8");
|
|
295
295
|
const parsed = JSON.parse(raw);
|
|
296
|
-
|
|
297
|
-
if (!Array.isArray(
|
|
296
|
+
const rawRoles = Array.isArray(parsed) ? parsed : parsed.roles;
|
|
297
|
+
if (!Array.isArray(rawRoles) || rawRoles.length === 0) {
|
|
298
298
|
throw new Error("roles must be a non-empty array");
|
|
299
299
|
}
|
|
300
|
+
roles = rawRoles.map((r) => ({
|
|
301
|
+
id: r.id ?? r.name?.toLowerCase().replace(/\s+/g, "-") ?? "agent",
|
|
302
|
+
name: r.name ?? r.id ?? "Agent",
|
|
303
|
+
persona: r.persona ?? r.description ?? `You are ${r.name ?? "an AI assistant"}.`,
|
|
304
|
+
...r.provider && { provider: r.provider },
|
|
305
|
+
...r.model && { model: r.model },
|
|
306
|
+
...r.color && { color: r.color }
|
|
307
|
+
}));
|
|
300
308
|
} catch (err) {
|
|
301
309
|
console.error(` \u2717 Invalid roles file: ${err.message}`);
|
|
302
310
|
process.exit(1);
|
|
@@ -373,7 +381,7 @@ ${content}`);
|
|
|
373
381
|
}
|
|
374
382
|
}
|
|
375
383
|
async function runTaskMode(config, providers, configManager, topic) {
|
|
376
|
-
const { TaskOrchestrator } = await import("./task-orchestrator-
|
|
384
|
+
const { TaskOrchestrator } = await import("./task-orchestrator-GONUQ6TN.js");
|
|
377
385
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
378
386
|
let interrupted = false;
|
|
379
387
|
const onSigint = () => {
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
saveDevState,
|
|
24
24
|
sessionHasMeaningfulContent,
|
|
25
25
|
setupProxy
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-LP2ZH4HH.js";
|
|
27
27
|
import {
|
|
28
28
|
ToolRegistry,
|
|
29
29
|
askUserContext,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
theme,
|
|
39
39
|
truncateOutput,
|
|
40
40
|
undoStack
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-E2HVDEWW.js";
|
|
42
42
|
import {
|
|
43
43
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
44
44
|
AUTHOR,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
REPO_URL,
|
|
59
59
|
SKILLS_DIR_NAME,
|
|
60
60
|
VERSION
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-UB6BRUQ4.js";
|
|
62
62
|
|
|
63
63
|
// src/index.ts
|
|
64
64
|
import { program } from "commander";
|
|
@@ -217,12 +217,12 @@ var Renderer = class {
|
|
|
217
217
|
console.log(tool("spawn_agent", "Delegate to independent sub-agent (isolated dialog + auto tool-call loop)"));
|
|
218
218
|
console.log(tool("run_tests", "Run project tests and return structured report (auto-detect Maven/npm/pytest etc.)"));
|
|
219
219
|
console.log(HR);
|
|
220
|
-
console.log(theme.dim(" REPL Commands (
|
|
220
|
+
console.log(theme.dim(" REPL Commands (37):"));
|
|
221
221
|
console.log(theme.dim(" /help /about /provider /model /clear /compact /plan /session"));
|
|
222
|
-
console.log(theme.dim(" /system /context /status /search /undo /export /copy /
|
|
223
|
-
console.log(theme.dim(" /init /skill /tools /plugins /mcp /config /checkpoint
|
|
224
|
-
console.log(theme.dim(" /commands /test /scaffold /add-dir /memory /doctor
|
|
225
|
-
console.log(theme.dim(" /diff /fork /exit"));
|
|
222
|
+
console.log(theme.dim(" /system /context /status /search /undo /export /copy /paste"));
|
|
223
|
+
console.log(theme.dim(" /cost /init /skill /tools /plugins /mcp /config /checkpoint"));
|
|
224
|
+
console.log(theme.dim(" /review /commands /test /scaffold /add-dir /memory /doctor"));
|
|
225
|
+
console.log(theme.dim(" /bug /think /diff /fork /yolo /exit"));
|
|
226
226
|
console.log(HR);
|
|
227
227
|
console.log(theme.dim(" Key Features:"));
|
|
228
228
|
console.log(feat("Agentic loop (up to 25 tool-call rounds, final answer streamed)"));
|
|
@@ -275,6 +275,11 @@ var Renderer = class {
|
|
|
275
275
|
console.log(feat("/fork conversation branch: fork from current position or checkpoint into new session, explore alternatives"));
|
|
276
276
|
console.log(feat("Streaming Tool Use: real-time text streaming + instant tool name display in agentic loop (OpenAI/Claude)"));
|
|
277
277
|
console.log(feat("User interjection: type a message + Enter during agentic loop to redirect AI mid-execution"));
|
|
278
|
+
console.log(feat("Multi-Agent Hub: aicli hub \u2014 multiple AI roles discuss/brainstorm with round-robin turns"));
|
|
279
|
+
console.log(feat("Hub distributed mode: aicli hub --distributed + aicli join \u2014 multi-process via WebSocket"));
|
|
280
|
+
console.log(feat("Human participation: aicli join --human \u2014 real person joins multi-agent discussion"));
|
|
281
|
+
console.log(feat("Context injection: aicli hub -c doc.md \u2014 inject external documents for all agents"));
|
|
282
|
+
console.log(feat("Task Mode: aicli hub --task \u2014 agents plan, write code, and execute with tools (plan\u2192approve\u2192execute\u2192review)"));
|
|
278
283
|
console.log();
|
|
279
284
|
}
|
|
280
285
|
printPrompt(provider, _model) {
|
|
@@ -1909,7 +1914,7 @@ ${hint}` : "")
|
|
|
1909
1914
|
description: "Run project tests and show structured report",
|
|
1910
1915
|
usage: "/test [command|filter]",
|
|
1911
1916
|
async execute(args, _ctx) {
|
|
1912
|
-
const { executeTests } = await import("./run-tests-
|
|
1917
|
+
const { executeTests } = await import("./run-tests-4WOG5THP.js");
|
|
1913
1918
|
const argStr = args.join(" ").trim();
|
|
1914
1919
|
let testArgs = {};
|
|
1915
1920
|
if (argStr) {
|
|
@@ -5519,7 +5524,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
5519
5524
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
5520
5525
|
process.exit(1);
|
|
5521
5526
|
}
|
|
5522
|
-
const { startWebServer } = await import("./server-
|
|
5527
|
+
const { startWebServer } = await import("./server-JNWKHPBS.js");
|
|
5523
5528
|
await startWebServer({ port, host: options.host });
|
|
5524
5529
|
});
|
|
5525
5530
|
program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | migrate <name>)").action(async (action, username) => {
|
|
@@ -5752,7 +5757,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
5752
5757
|
}),
|
|
5753
5758
|
config.get("customProviders")
|
|
5754
5759
|
);
|
|
5755
|
-
const { startHub } = await import("./hub-
|
|
5760
|
+
const { startHub } = await import("./hub-OXZNGBAY.js");
|
|
5756
5761
|
await startHub(
|
|
5757
5762
|
{
|
|
5758
5763
|
topic: topic ?? "",
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
renderDiff,
|
|
19
19
|
runHook,
|
|
20
20
|
setupProxy
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-LP2ZH4HH.js";
|
|
22
22
|
import {
|
|
23
23
|
AuthManager
|
|
24
24
|
} from "./chunk-CPLT6CD3.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
spawnAgentContext,
|
|
33
33
|
truncateOutput,
|
|
34
34
|
undoStack
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-E2HVDEWW.js";
|
|
36
36
|
import {
|
|
37
37
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
38
38
|
CONTEXT_FILE_CANDIDATES,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
PLAN_MODE_SYSTEM_ADDON,
|
|
45
45
|
SKILLS_DIR_NAME,
|
|
46
46
|
VERSION
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-UB6BRUQ4.js";
|
|
48
48
|
|
|
49
49
|
// src/web/server.ts
|
|
50
50
|
import express from "express";
|
|
@@ -1440,7 +1440,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
1440
1440
|
case "test": {
|
|
1441
1441
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
1442
1442
|
try {
|
|
1443
|
-
const { executeTests } = await import("./run-tests-
|
|
1443
|
+
const { executeTests } = await import("./run-tests-4WOG5THP.js");
|
|
1444
1444
|
const argStr = args.join(" ").trim();
|
|
1445
1445
|
let testArgs = {};
|
|
1446
1446
|
if (argStr) {
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
getDangerLevel,
|
|
5
5
|
googleSearchContext,
|
|
6
6
|
truncateOutput
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-E2HVDEWW.js";
|
|
8
8
|
import {
|
|
9
9
|
SUBAGENT_ALLOWED_TOOLS
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UB6BRUQ4.js";
|
|
11
11
|
|
|
12
12
|
// src/hub/task-orchestrator.ts
|
|
13
13
|
import { createInterface } from "readline";
|
|
@@ -198,7 +198,7 @@ var TaskOrchestrator = class {
|
|
|
198
198
|
// ── Phase 1: Plan Generation ──────────────────────────────────────
|
|
199
199
|
async generatePlan(goal, provider) {
|
|
200
200
|
const roles = this.config.roles;
|
|
201
|
-
const roleList = roles.map((r) => `- ${r.id} (${r.name}): ${r.persona.slice(0, 100)}...`).join("\n");
|
|
201
|
+
const roleList = roles.map((r) => `- ${r.id} (${r.name}): ${(r.persona ?? "").slice(0, 100)}...`).join("\n");
|
|
202
202
|
const contextSection = this.config.context ? `
|
|
203
203
|
|
|
204
204
|
## Reference Documents
|