jinzd-ai-cli 0.4.6 → 0.4.8
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-N5NLOKMR.js → chunk-56MYFIG4.js} +1 -1
- package/dist/{chunk-O7LPT4AB.js → chunk-G3YURBV7.js} +1 -1
- package/dist/{chunk-ZYBG5J2G.js → chunk-GDMXHX27.js} +1 -1
- package/dist/{chunk-5YPF2PO4.js → chunk-T2W7CI24.js} +2 -2
- package/dist/{hub-FWC6KHT4.js → hub-V27PRAPU.js} +2 -2
- package/dist/index.js +8 -7
- package/dist/{run-tests-NE5GMIMR.js → run-tests-ENUQXQG7.js} +1 -1
- package/dist/{run-tests-S2UMAJWI.js → run-tests-L2NQAT2M.js} +1 -1
- package/dist/{server-EEOYG2EH.js → server-JYSNPBYK.js} +4 -4
- package/dist/{task-orchestrator-GTJM7A5U.js → task-orchestrator-OXDO5UWG.js} +14 -8
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
EnvLoader,
|
|
4
4
|
schemaToJsonSchema
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GDMXHX27.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-G3YURBV7.js";
|
|
19
19
|
|
|
20
20
|
// src/config/config-manager.ts
|
|
21
21
|
import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
|
|
@@ -366,7 +366,7 @@ ${content}`);
|
|
|
366
366
|
defaultModel,
|
|
367
367
|
maxRounds: options.maxRounds ?? (mode === "task" ? 15 : 10),
|
|
368
368
|
enableTools: mode === "task",
|
|
369
|
-
maxToolRoundsPerTurn: mode === "task" ? 30 : void 0,
|
|
369
|
+
maxToolRoundsPerTurn: mode === "task" ? options.taskRounds ?? 30 : void 0,
|
|
370
370
|
context,
|
|
371
371
|
contextFiles: contextFileNames.length > 0 ? contextFileNames : void 0
|
|
372
372
|
};
|
|
@@ -381,7 +381,7 @@ ${content}`);
|
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
async function runTaskMode(config, providers, configManager, topic) {
|
|
384
|
-
const { TaskOrchestrator } = await import("./task-orchestrator-
|
|
384
|
+
const { TaskOrchestrator } = await import("./task-orchestrator-OXDO5UWG.js");
|
|
385
385
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
386
386
|
let interrupted = false;
|
|
387
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-T2W7CI24.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-GDMXHX27.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-G3YURBV7.js";
|
|
62
62
|
|
|
63
63
|
// src/index.ts
|
|
64
64
|
import { program } from "commander";
|
|
@@ -1914,7 +1914,7 @@ ${hint}` : "")
|
|
|
1914
1914
|
description: "Run project tests and show structured report",
|
|
1915
1915
|
usage: "/test [command|filter]",
|
|
1916
1916
|
async execute(args, _ctx) {
|
|
1917
|
-
const { executeTests } = await import("./run-tests-
|
|
1917
|
+
const { executeTests } = await import("./run-tests-L2NQAT2M.js");
|
|
1918
1918
|
const argStr = args.join(" ").trim();
|
|
1919
1919
|
let testArgs = {};
|
|
1920
1920
|
if (argStr) {
|
|
@@ -5524,7 +5524,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
5524
5524
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
5525
5525
|
process.exit(1);
|
|
5526
5526
|
}
|
|
5527
|
-
const { startWebServer } = await import("./server-
|
|
5527
|
+
const { startWebServer } = await import("./server-JYSNPBYK.js");
|
|
5528
5528
|
await startWebServer({ port, host: options.host });
|
|
5529
5529
|
});
|
|
5530
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) => {
|
|
@@ -5746,7 +5746,7 @@ program.command("help").description("Show a comprehensive guide to all aicli fea
|
|
|
5746
5746
|
];
|
|
5747
5747
|
console.log(lines.join("\n"));
|
|
5748
5748
|
});
|
|
5749
|
-
program.command("hub [topic]").description("Start multi-agent hub (discuss / brainstorm with multiple AI roles)").option("--preset <name>", "Use a built-in role preset (default: tech-review)").option("--roles <file>", "Load roles from a JSON file").option("--provider <name>", "Override default AI provider").option("-m, --model <name>", "Override default model").option("--max-rounds <n>", "Max discussion rounds (default: 10)").option("--presets", "List available role presets").option("--task", "Task mode: plan \u2192 approve \
|
|
5749
|
+
program.command("hub [topic]").description("Start multi-agent hub (discuss / brainstorm with multiple AI roles)").option("--preset <name>", "Use a built-in role preset (default: tech-review)").option("--roles <file>", "Load roles from a JSON file").option("--provider <name>", "Override default AI provider").option("-m, --model <name>", "Override default model").option("--max-rounds <n>", "Max discussion rounds (default: 10)").option("--presets", "List available role presets").option("--task", "Task mode: plan \u2192 approve \uFFFD\uFFFD execute with tools (agents write code)").option("--task-rounds <n>", "Max tool-call rounds per task (default: 30)").option("-c, --context <file>", "Inject context document (repeatable: -c a.md -c b.md)", (val, prev) => prev.concat(val), []).option("--distributed", "Start WebSocket server so remote aicli instances can join as agents").option("--port <n>", "WebSocket port for distributed mode (default: 9527)", "9527").action(async (topic, options) => {
|
|
5750
5750
|
const config = new ConfigManager();
|
|
5751
5751
|
const registry = new ProviderRegistry();
|
|
5752
5752
|
await registry.initialize(
|
|
@@ -5757,7 +5757,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
5757
5757
|
}),
|
|
5758
5758
|
config.get("customProviders")
|
|
5759
5759
|
);
|
|
5760
|
-
const { startHub } = await import("./hub-
|
|
5760
|
+
const { startHub } = await import("./hub-V27PRAPU.js");
|
|
5761
5761
|
await startHub(
|
|
5762
5762
|
{
|
|
5763
5763
|
topic: topic ?? "",
|
|
@@ -5770,6 +5770,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
5770
5770
|
listPresets: options.presets === true,
|
|
5771
5771
|
contextFiles: options.context?.length ? options.context : void 0,
|
|
5772
5772
|
distributed: options.distributed === true,
|
|
5773
|
+
taskRounds: options.taskRounds ? parseInt(options.taskRounds, 10) : void 0,
|
|
5773
5774
|
port: options.port ? parseInt(options.port, 10) : void 0
|
|
5774
5775
|
},
|
|
5775
5776
|
config,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
renderDiff,
|
|
19
19
|
runHook,
|
|
20
20
|
setupProxy
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-T2W7CI24.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-GDMXHX27.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-G3YURBV7.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-L2NQAT2M.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-GDMXHX27.js";
|
|
8
8
|
import {
|
|
9
9
|
SUBAGENT_ALLOWED_TOOLS
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-G3YURBV7.js";
|
|
11
11
|
|
|
12
12
|
// src/hub/task-orchestrator.ts
|
|
13
13
|
import { createInterface } from "readline";
|
|
@@ -48,6 +48,9 @@ ${role.persona}
|
|
|
48
48
|
## Your Task
|
|
49
49
|
${task}
|
|
50
50
|
|
|
51
|
+
## Working Directory
|
|
52
|
+
You MUST work in the current directory (${process.cwd()}). Do NOT create sub-directories like "my-project" or "todo-app". Place all files directly in the current directory or in logical sub-folders (e.g. public/, src/, db/).
|
|
53
|
+
|
|
51
54
|
## Rules
|
|
52
55
|
1. Focus exclusively on completing the task described above.
|
|
53
56
|
2. Use tools to read, create, and modify files as needed.
|
|
@@ -55,6 +58,7 @@ ${task}
|
|
|
55
58
|
4. Destructive operations (rm -rf, etc.) will be automatically blocked.
|
|
56
59
|
5. You cannot interact with users \u2014 work independently based on the task description.
|
|
57
60
|
6. Use the same language as the task description.
|
|
61
|
+
7. If files from a previous task already exist, build on them \u2014 do NOT recreate from scratch.
|
|
58
62
|
|
|
59
63
|
## CRITICAL \u2014 When to Stop
|
|
60
64
|
Once you have completed the task (files created/modified, code written, tests passing), you MUST immediately respond with a plain text summary. Do NOT call any more tools after the work is done. Your text summary should include:
|
|
@@ -298,12 +302,14 @@ ${this.config.context}` : "";
|
|
|
298
302
|
${roleList}
|
|
299
303
|
|
|
300
304
|
## Rules
|
|
301
|
-
1. Break the goal into
|
|
302
|
-
2. Each task
|
|
303
|
-
3.
|
|
304
|
-
4.
|
|
305
|
-
5.
|
|
306
|
-
6.
|
|
305
|
+
1. Break the goal into 8-25 concrete, SMALL tasks. Each task should create or modify 1-3 files at most.
|
|
306
|
+
2. Each task must be completable in ~10 tool calls (read file, write file, run bash). If a task seems too big, split it further.
|
|
307
|
+
3. BAD example: "Build the entire frontend" \u2014 too big! GOOD example: "Create index.html with todo list layout and CSS styling"
|
|
308
|
+
4. Assign each task to the most appropriate role based on their expertise.
|
|
309
|
+
5. Specify dependencies (which tasks must complete before this one can start). Keep dependency chains short \u2014 prefer parallel tasks.
|
|
310
|
+
6. Order tasks logically \u2014 foundational work (init project, install deps) first, then backend, then frontend, then integration/testing.
|
|
311
|
+
7. The LAST task should always be: start/run the application and verify it works.
|
|
312
|
+
8. Use the same language as the goal.${contextSection}
|
|
307
313
|
|
|
308
314
|
## Output Format
|
|
309
315
|
You MUST output ONLY a JSON array (no markdown fences, no explanation before/after). Each element:
|