jinzd-ai-cli 0.4.330 → 0.4.331
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/{batch-GXITPLER.js → batch-OOHC5POO.js} +2 -2
- package/dist/{chunk-DX2U6QK4.js → chunk-56ME7PB2.js} +1 -1
- package/dist/{chunk-GWEBO4RF.js → chunk-6BGW25LG.js} +1 -1
- package/dist/{chunk-E2W2MI6H.js → chunk-C6GA7H5D.js} +1 -72
- package/dist/{chunk-QU74ONFF.js → chunk-CM5C7ZSM.js} +1 -1
- package/dist/{chunk-3YVZJHTF.js → chunk-DTVN2LDU.js} +1 -1
- package/dist/{chunk-265M6ZLH.js → chunk-EWARNWJ4.js} +4 -4
- package/dist/{chunk-CCFCPAKN.js → chunk-IJNDIOOQ.js} +1 -1
- package/dist/{chunk-LLXHA2LA.js → chunk-L3FDFFD2.js} +8 -8
- package/dist/{chunk-LUJ4JVMI.js → chunk-MJSK6ZYR.js} +4 -4
- package/dist/{chunk-C2Z77RTU.js → chunk-MN25ELTF.js} +15 -4
- package/dist/{chunk-72AR23R2.js → chunk-NOLK5C4U.js} +54 -2
- package/dist/{chunk-HMQA2R3O.js → chunk-Q26V2PNA.js} +1 -1
- package/dist/{chunk-GEC3MEVQ.js → chunk-QFF2PTI3.js} +6 -4
- package/dist/{chunk-2SYDIWRU.js → chunk-R3XIU7NS.js} +1 -1
- package/dist/{chunk-M5B6G6AY.js → chunk-RZDRBFAB.js} +9 -7
- package/dist/{chunk-DU44SD6A.js → chunk-TF2FNRDZ.js} +1 -1
- package/dist/chunk-W4P2KJZN.js +75 -0
- package/dist/{chunk-AJITHMRE.js → chunk-YCDF6FNR.js} +1 -1
- package/dist/{ci-6K3JNHB4.js → ci-HNYUXJUE.js} +7 -6
- package/dist/{ci-format-2L3RFJVH.js → ci-format-ZLBEAU7Z.js} +2 -2
- package/dist/{constants-DLJECTGQ.js → constants-4EH6Y6VI.js} +1 -1
- package/dist/{constants-J5SJ232X.js → constants-JM6MK5SS.js} +1 -1
- package/dist/{doctor-cli-BHS7G2XY.js → doctor-cli-VCNERMX5.js} +7 -6
- package/dist/electron-server.js +193 -130
- package/dist/{hub-PPG4N6QQ.js → hub-3OXLWTEP.js} +8 -18
- package/dist/{hub-server-JLC7CNP7.js → hub-server-LJWXNEWK.js} +2 -1
- package/dist/index.js +20 -19
- package/dist/{persistent-memory-3XTSZ3QR.js → persistent-memory-LMVWIHMX.js} +2 -2
- package/dist/{persistent-memory-O4T2OTVV.js → persistent-memory-PAS7NAPQ.js} +2 -2
- package/dist/{pr-M6ZY4CEK.js → pr-IMR62OHN.js} +7 -6
- package/dist/{run-tests-H3DIUCDB.js → run-tests-2TVEWCQI.js} +2 -2
- package/dist/{run-tests-WQE3XTUL.js → run-tests-MQVGE6FK.js} +2 -2
- package/dist/{server-J2B26DZK.js → server-55X6MCGX.js} +7 -6
- package/dist/{server-5NQSYQ2T.js → server-6MS2NGEJ.js} +29 -19
- package/dist/{task-orchestrator-CI7EDT25.js → task-orchestrator-KIDJB7NP.js} +9 -7
- package/dist/{usage-AJYZ5A7P.js → usage-X2CQYAUA.js} +2 -2
- package/dist/web/client/app.js +19 -0
- package/dist/web/client/app.js.br +0 -0
- package/dist/web/client/app.js.gz +0 -0
- package/package.json +1 -1
|
@@ -8,12 +8,14 @@ import {
|
|
|
8
8
|
DiscussionOrchestrator,
|
|
9
9
|
getPreset,
|
|
10
10
|
listPresets,
|
|
11
|
+
parseRolesJson,
|
|
11
12
|
resolveRoleProviders
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-NOLK5C4U.js";
|
|
14
|
+
import "./chunk-MN25ELTF.js";
|
|
14
15
|
import {
|
|
15
16
|
thinkingParamsFor
|
|
16
17
|
} from "./chunk-6YZEZFX5.js";
|
|
18
|
+
import "./chunk-C6GA7H5D.js";
|
|
17
19
|
|
|
18
20
|
// src/hub/index.ts
|
|
19
21
|
import { readFileSync, existsSync } from "fs";
|
|
@@ -39,20 +41,8 @@ async function startHub(options, configManager, providers) {
|
|
|
39
41
|
process.exit(1);
|
|
40
42
|
}
|
|
41
43
|
try {
|
|
42
|
-
const raw = readFileSync(options.rolesFile, "utf-8");
|
|
43
|
-
|
|
44
|
-
const rawRoles = Array.isArray(parsed) ? parsed : parsed.roles;
|
|
45
|
-
if (!Array.isArray(rawRoles) || rawRoles.length === 0) {
|
|
46
|
-
throw new Error("roles must be a non-empty array");
|
|
47
|
-
}
|
|
48
|
-
roles = rawRoles.map((r) => ({
|
|
49
|
-
id: r.id ?? r.name?.toLowerCase().replace(/\s+/g, "-") ?? "agent",
|
|
50
|
-
name: r.name ?? r.id ?? "Agent",
|
|
51
|
-
persona: r.persona ?? r.description ?? `You are ${r.name ?? "an AI assistant"}.`,
|
|
52
|
-
...r.provider && { provider: r.provider },
|
|
53
|
-
...r.model && { model: r.model },
|
|
54
|
-
...r.color && { color: r.color }
|
|
55
|
-
}));
|
|
44
|
+
const raw = readFileSync(options.rolesFile, "utf-8").replace(/^/, "");
|
|
45
|
+
roles = parseRolesJson(JSON.parse(raw));
|
|
56
46
|
} catch (err) {
|
|
57
47
|
console.error(` \u2717 Invalid roles file: ${err.message}`);
|
|
58
48
|
process.exit(1);
|
|
@@ -158,7 +148,7 @@ ${content}`);
|
|
|
158
148
|
}
|
|
159
149
|
}
|
|
160
150
|
async function runTaskMode(config, providers, configManager, topic) {
|
|
161
|
-
const { TaskOrchestrator } = await import("./task-orchestrator-
|
|
151
|
+
const { TaskOrchestrator } = await import("./task-orchestrator-KIDJB7NP.js");
|
|
162
152
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
163
153
|
let interrupted = false;
|
|
164
154
|
const onSigint = () => {
|
|
@@ -194,7 +184,7 @@ async function runTaskMode(config, providers, configManager, topic) {
|
|
|
194
184
|
}
|
|
195
185
|
}
|
|
196
186
|
async function runDistributedDiscussion(config, providers, topic, port) {
|
|
197
|
-
const { HubServer } = await import("./hub-server-
|
|
187
|
+
const { HubServer } = await import("./hub-server-LJWXNEWK.js");
|
|
198
188
|
const hub = new HubServer(config, providers, port);
|
|
199
189
|
let interrupted = false;
|
|
200
190
|
const onSigint = () => {
|
package/dist/index.js
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
setupProxy,
|
|
25
25
|
snapshotFile,
|
|
26
26
|
stripRoutingTags
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-L3FDFFD2.js";
|
|
28
28
|
import {
|
|
29
29
|
CostTracker,
|
|
30
30
|
getPricing,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
setMaxOutputCap,
|
|
48
48
|
spawnAgentContext,
|
|
49
49
|
undoStack
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-RZDRBFAB.js";
|
|
51
51
|
import "./chunk-HLWUDRBO.js";
|
|
52
52
|
import {
|
|
53
53
|
NO_THINKING,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
countPendingMemories,
|
|
61
61
|
detectStaleLegacyMarkdownEdit,
|
|
62
62
|
formatMemoryForPrompt
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-56ME7PB2.js";
|
|
64
64
|
import "./chunk-RWRZVQCB.js";
|
|
65
65
|
import "./chunk-B3MPYI4E.js";
|
|
66
66
|
import "./chunk-M6HLYG33.js";
|
|
@@ -81,22 +81,23 @@ import {
|
|
|
81
81
|
import {
|
|
82
82
|
loadContextFiles,
|
|
83
83
|
writeCrashLog
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-EWARNWJ4.js";
|
|
85
85
|
import {
|
|
86
86
|
getActivePluginAssets,
|
|
87
87
|
getPendingHookTrust,
|
|
88
88
|
installFlushOnExit,
|
|
89
89
|
mergePluginHooks,
|
|
90
90
|
runLifecycleHooks
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-Q26V2PNA.js";
|
|
92
92
|
import "./chunk-RS7SKYTS.js";
|
|
93
93
|
import {
|
|
94
94
|
ProviderRegistry,
|
|
95
95
|
listBuiltInProviderMetadata
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-QFF2PTI3.js";
|
|
97
97
|
import {
|
|
98
98
|
ConfigManager
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-CM5C7ZSM.js";
|
|
100
|
+
import "./chunk-W4P2KJZN.js";
|
|
100
101
|
import {
|
|
101
102
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
102
103
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -114,7 +115,7 @@ import {
|
|
|
114
115
|
runAgentLoop,
|
|
115
116
|
stripToolCallReminder,
|
|
116
117
|
teeStreamErrorSummary
|
|
117
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-C6GA7H5D.js";
|
|
118
119
|
import {
|
|
119
120
|
AuthError,
|
|
120
121
|
ProviderError,
|
|
@@ -134,7 +135,7 @@ import {
|
|
|
134
135
|
isInterrupted,
|
|
135
136
|
requestInterrupt,
|
|
136
137
|
resetInterrupt
|
|
137
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-6BGW25LG.js";
|
|
138
139
|
import {
|
|
139
140
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
140
141
|
AUTHOR,
|
|
@@ -152,7 +153,7 @@ import {
|
|
|
152
153
|
SKILLS_DIR_NAME,
|
|
153
154
|
VERSION,
|
|
154
155
|
buildUserIdentityPrompt
|
|
155
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-YCDF6FNR.js";
|
|
156
157
|
import "./chunk-SXIJLSVF.js";
|
|
157
158
|
|
|
158
159
|
// src/index.ts
|
|
@@ -4118,7 +4119,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
4118
4119
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
4119
4120
|
process.exit(1);
|
|
4120
4121
|
}
|
|
4121
|
-
const { startWebServer, WebStartupError } = await import("./server-
|
|
4122
|
+
const { startWebServer, WebStartupError } = await import("./server-6MS2NGEJ.js");
|
|
4122
4123
|
try {
|
|
4123
4124
|
await startWebServer({ port, host: options.host, externalOrigin: options.externalOrigin });
|
|
4124
4125
|
} catch (err) {
|
|
@@ -4295,11 +4296,11 @@ program.command("sessions").description("List recent conversation sessions").opt
|
|
|
4295
4296
|
console.log(footer + "\n");
|
|
4296
4297
|
});
|
|
4297
4298
|
program.command("usage").description("Show token + cost usage grouped by provider/model (cross-session)").option("--days <n>", "Only the last N days (inclusive of today)").option("--month <ym>", "Only a specific month, format YYYY-MM (e.g. 2026-06)").option("--json", "Output as JSON (for scripting)").action(async (options) => {
|
|
4298
|
-
const { runUsageCli } = await import("./usage-
|
|
4299
|
+
const { runUsageCli } = await import("./usage-X2CQYAUA.js");
|
|
4299
4300
|
await runUsageCli(options);
|
|
4300
4301
|
});
|
|
4301
4302
|
program.command("doctor").description("Health check: API keys, config, MCP, recent crashes, tool usage, disk usage").option("--json", "Output as JSON (for scripting)").option("--reset-stats", "Reset accumulated tool usage statistics").action(async (options) => {
|
|
4302
|
-
const { runDoctorCli } = await import("./doctor-cli-
|
|
4303
|
+
const { runDoctorCli } = await import("./doctor-cli-VCNERMX5.js");
|
|
4303
4304
|
const argv = process.argv.slice(2);
|
|
4304
4305
|
await runDoctorCli({
|
|
4305
4306
|
json: !!options.json || argv.includes("--json"),
|
|
@@ -4308,7 +4309,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
|
|
|
4308
4309
|
});
|
|
4309
4310
|
program.command("batch <action> [arg] [arg2]").description("Anthropic Message Batches: submit | list | status <id> | results <id> [out] | cancel <id>").option("--dry-run", "Parse and validate input without submitting (submit only)").action(async (action, arg, arg2, options) => {
|
|
4310
4311
|
try {
|
|
4311
|
-
const batch = await import("./batch-
|
|
4312
|
+
const batch = await import("./batch-OOHC5POO.js");
|
|
4312
4313
|
switch (action) {
|
|
4313
4314
|
case "submit":
|
|
4314
4315
|
if (!arg) {
|
|
@@ -4351,7 +4352,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
4351
4352
|
}
|
|
4352
4353
|
});
|
|
4353
4354
|
program.command("mcp-serve").description("Start an MCP server over STDIO, exposing aicli's built-in tools to Claude Desktop / Cursor / other MCP clients").option("--allow-destructive", "Allow bash / run_interactive / task_create (always destructive in MCP mode)").option("--allow-outside-cwd", "Allow tool path arguments to escape the sandbox root \u2014 disabled by default").option("--tools <list>", "Comma-separated whitelist of tools to expose (default: all eligible tools)").option("--cwd <path>", "Working directory AND sandbox root (default: current directory)").action(async (options) => {
|
|
4354
|
-
const { startMcpServer } = await import("./server-
|
|
4355
|
+
const { startMcpServer } = await import("./server-55X6MCGX.js");
|
|
4355
4356
|
await startMcpServer({
|
|
4356
4357
|
allowDestructive: !!options.allowDestructive,
|
|
4357
4358
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -4364,7 +4365,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
4364
4365
|
console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
|
|
4365
4366
|
process.exit(1);
|
|
4366
4367
|
}
|
|
4367
|
-
const { runPrCli } = await import("./pr-
|
|
4368
|
+
const { runPrCli } = await import("./pr-IMR62OHN.js");
|
|
4368
4369
|
const result = await runPrCli({
|
|
4369
4370
|
action,
|
|
4370
4371
|
target,
|
|
@@ -4384,8 +4385,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
4384
4385
|
process.exit(result.exitCode);
|
|
4385
4386
|
});
|
|
4386
4387
|
program.command("ci").description("Headless PR review (code + security) \u2014 reads git/gh diff, optionally posts to PR. Designed for GitHub Actions.").option("--pr <num>", "PR number or URL; diff fetched via gh pr diff <value>", (v) => /^#?\d+$/.test(v) ? parseInt(v.replace(/^#/, ""), 10) : v).option("--base <ref>", "Base ref for git diff <ref>...HEAD (ignored when --pr set)").option("--post", "Post review as a PR comment (requires gh CLI + GH_TOKEN, needs --pr)").option("--no-update", "Always create a new comment instead of updating the previous aicli review").option("--skip-code", "Skip the code review section").option("--skip-security", "Skip the security review section").option("--detailed", "Use the detailed code-review prompt").option("--max-diff <n>", "Max diff chars sent to the model (default 30000)", (v) => parseInt(v, 10)).option("--provider <id>", "Override provider (default: config.defaultProvider)").option("--model <id>", "Override model").option("--dry-run", "Print result to stdout instead of posting (overrides --post)").option("--json", "Output a structured JSON report").option("--markdown", "Output Markdown report (default)").option("--sarif", "Output SARIF 2.1.0 for code scanning artifacts").option("--fail-on-security-high", "Fail when the security review contains HIGH/CRITICAL findings (default)").option("--no-fail-on-security-high", "Do not fail on security HIGH/CRITICAL findings").option("--fail-on-test-failure", "Fail when the report mentions test failures (default)").option("--no-fail-on-test-failure", "Do not fail on test failure findings").option("--fail-on-lint-failure", "Fail when the report mentions lint/typecheck failures (default)").option("--no-fail-on-lint-failure", "Do not fail on lint/typecheck failure findings").action(async (options) => {
|
|
4387
|
-
const { runCi } = await import("./ci-
|
|
4388
|
-
const { formatCiResult } = await import("./ci-format-
|
|
4388
|
+
const { runCi } = await import("./ci-HNYUXJUE.js");
|
|
4389
|
+
const { formatCiResult } = await import("./ci-format-ZLBEAU7Z.js");
|
|
4389
4390
|
const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
|
|
4390
4391
|
if (formats > 1) {
|
|
4391
4392
|
console.error("Choose only one output format: --json, --markdown, or --sarif.");
|
|
@@ -4544,7 +4545,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
4544
4545
|
config.get("customProviders"),
|
|
4545
4546
|
config.getConfigDir()
|
|
4546
4547
|
);
|
|
4547
|
-
const { startHub } = await import("./hub-
|
|
4548
|
+
const { startHub } = await import("./hub-3OXLWTEP.js");
|
|
4548
4549
|
await startHub(
|
|
4549
4550
|
{
|
|
4550
4551
|
topic: topic ?? "",
|
|
@@ -27,11 +27,11 @@ import {
|
|
|
27
27
|
touchMemoryReferences,
|
|
28
28
|
updateMemoryApproval,
|
|
29
29
|
updateMemoryEntry
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-R3XIU7NS.js";
|
|
31
31
|
import "./chunk-FSC6KEWU.js";
|
|
32
32
|
import "./chunk-2XMUCC42.js";
|
|
33
33
|
import "./chunk-CGLYJRFA.js";
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-DTVN2LDU.js";
|
|
35
35
|
export {
|
|
36
36
|
addMemoryEntry,
|
|
37
37
|
backupMemoryStore,
|
|
@@ -28,11 +28,11 @@ import {
|
|
|
28
28
|
touchMemoryReferences,
|
|
29
29
|
updateMemoryApproval,
|
|
30
30
|
updateMemoryEntry
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-56ME7PB2.js";
|
|
32
32
|
import "./chunk-3FEZSLGI.js";
|
|
33
33
|
import "./chunk-HOSJZMQS.js";
|
|
34
34
|
import "./chunk-BMLQPSHP.js";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-YCDF6FNR.js";
|
|
36
36
|
export {
|
|
37
37
|
addMemoryEntry,
|
|
38
38
|
backupMemoryStore,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
countSeverity,
|
|
4
4
|
runCi
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-MJSK6ZYR.js";
|
|
6
|
+
import "./chunk-IJNDIOOQ.js";
|
|
7
7
|
import {
|
|
8
8
|
buildReviewPrompt,
|
|
9
9
|
buildSecurityReviewPrompt,
|
|
@@ -14,16 +14,17 @@ import {
|
|
|
14
14
|
} from "./chunk-6YZEZFX5.js";
|
|
15
15
|
import {
|
|
16
16
|
ProviderRegistry
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QFF2PTI3.js";
|
|
18
18
|
import {
|
|
19
19
|
ConfigManager
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-CM5C7ZSM.js";
|
|
21
|
+
import "./chunk-W4P2KJZN.js";
|
|
22
|
+
import "./chunk-C6GA7H5D.js";
|
|
22
23
|
import "./chunk-TU3L3PW7.js";
|
|
23
24
|
import "./chunk-BMLQPSHP.js";
|
|
24
25
|
import {
|
|
25
26
|
VERSION
|
|
26
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-YCDF6FNR.js";
|
|
27
28
|
|
|
28
29
|
// src/cli/pr.ts
|
|
29
30
|
import { execFileSync } from "child_process";
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
executeTests,
|
|
3
3
|
runTestProcess,
|
|
4
4
|
runTestsTool
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-TF2FNRDZ.js";
|
|
6
6
|
import "./chunk-QMFMST2T.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-DTVN2LDU.js";
|
|
8
8
|
export {
|
|
9
9
|
executeTests,
|
|
10
10
|
runTestProcess,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RZDRBFAB.js";
|
|
5
5
|
import "./chunk-6JHACXB3.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-56ME7PB2.js";
|
|
7
7
|
import "./chunk-RWRZVQCB.js";
|
|
8
8
|
import "./chunk-B3MPYI4E.js";
|
|
9
9
|
import "./chunk-M6HLYG33.js";
|
|
@@ -14,20 +14,21 @@ import "./chunk-JL44HGZC.js";
|
|
|
14
14
|
import "./chunk-3FEZSLGI.js";
|
|
15
15
|
import {
|
|
16
16
|
runTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-Q26V2PNA.js";
|
|
18
18
|
import "./chunk-RS7SKYTS.js";
|
|
19
19
|
import {
|
|
20
20
|
getDangerLevel,
|
|
21
21
|
schemaToJsonSchema
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-W4P2KJZN.js";
|
|
23
|
+
import "./chunk-C6GA7H5D.js";
|
|
23
24
|
import "./chunk-TU3L3PW7.js";
|
|
24
25
|
import "./chunk-HOSJZMQS.js";
|
|
25
26
|
import "./chunk-BMLQPSHP.js";
|
|
26
27
|
import "./chunk-JJFJWD35.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-6BGW25LG.js";
|
|
28
29
|
import {
|
|
29
30
|
VERSION
|
|
30
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-YCDF6FNR.js";
|
|
31
32
|
import "./chunk-SXIJLSVF.js";
|
|
32
33
|
|
|
33
34
|
// src/mcp/server.ts
|
|
@@ -5,11 +5,13 @@ import {
|
|
|
5
5
|
equalToken
|
|
6
6
|
} from "./chunk-TDQW2YHK.js";
|
|
7
7
|
import {
|
|
8
|
+
CUSTOM_PRESET_PREFIX,
|
|
8
9
|
DiscussionOrchestrator,
|
|
9
10
|
getPreset,
|
|
11
|
+
loadCustomPresets,
|
|
10
12
|
resolveRoleProviders
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-NOLK5C4U.js";
|
|
14
|
+
import "./chunk-MN25ELTF.js";
|
|
13
15
|
import {
|
|
14
16
|
AuthManager,
|
|
15
17
|
TOKEN_EXPIRY_MS
|
|
@@ -86,7 +88,7 @@ import {
|
|
|
86
88
|
skillHistoryNote,
|
|
87
89
|
snapshotFile,
|
|
88
90
|
stripRoutingTags
|
|
89
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-L3FDFFD2.js";
|
|
90
92
|
import {
|
|
91
93
|
CNY_PER_USD,
|
|
92
94
|
CostTracker,
|
|
@@ -130,7 +132,7 @@ import {
|
|
|
130
132
|
spawnAgentContext,
|
|
131
133
|
truncateOutput,
|
|
132
134
|
undoStack
|
|
133
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-RZDRBFAB.js";
|
|
134
136
|
import {
|
|
135
137
|
buildReviewPrompt,
|
|
136
138
|
buildSecurityReviewPrompt
|
|
@@ -157,7 +159,7 @@ import {
|
|
|
157
159
|
restoreMemoryEntries,
|
|
158
160
|
updateMemoryApproval,
|
|
159
161
|
updateMemoryEntry
|
|
160
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-56ME7PB2.js";
|
|
161
163
|
import "./chunk-RWRZVQCB.js";
|
|
162
164
|
import "./chunk-B3MPYI4E.js";
|
|
163
165
|
import "./chunk-M6HLYG33.js";
|
|
@@ -176,7 +178,7 @@ import {
|
|
|
176
178
|
buildDoctorReport,
|
|
177
179
|
formatDoctorReport,
|
|
178
180
|
loadContextFiles
|
|
179
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-EWARNWJ4.js";
|
|
180
182
|
import {
|
|
181
183
|
describePlugin,
|
|
182
184
|
getActivePluginAssets,
|
|
@@ -191,14 +193,17 @@ import {
|
|
|
191
193
|
runTool,
|
|
192
194
|
setPluginEnabled,
|
|
193
195
|
trustPlugin
|
|
194
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-Q26V2PNA.js";
|
|
195
197
|
import "./chunk-RS7SKYTS.js";
|
|
196
198
|
import {
|
|
197
199
|
ProviderRegistry
|
|
198
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-QFF2PTI3.js";
|
|
199
201
|
import {
|
|
200
202
|
ConfigManager
|
|
201
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-CM5C7ZSM.js";
|
|
204
|
+
import {
|
|
205
|
+
getDangerLevel
|
|
206
|
+
} from "./chunk-W4P2KJZN.js";
|
|
202
207
|
import {
|
|
203
208
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
204
209
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -209,12 +214,11 @@ import {
|
|
|
209
214
|
consumeToolCallStream,
|
|
210
215
|
evaluateTeeContent,
|
|
211
216
|
freshPriorContent,
|
|
212
|
-
getDangerLevel,
|
|
213
217
|
isAbortError,
|
|
214
218
|
runAgentLoop,
|
|
215
219
|
stripToolCallReminder,
|
|
216
220
|
teeStreamErrorSummary
|
|
217
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-C6GA7H5D.js";
|
|
218
222
|
import "./chunk-TU3L3PW7.js";
|
|
219
223
|
import {
|
|
220
224
|
formatGitContextForPrompt,
|
|
@@ -231,7 +235,7 @@ import {
|
|
|
231
235
|
import {
|
|
232
236
|
assertReadablePath
|
|
233
237
|
} from "./chunk-JJFJWD35.js";
|
|
234
|
-
import "./chunk-
|
|
238
|
+
import "./chunk-6BGW25LG.js";
|
|
235
239
|
import {
|
|
236
240
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
237
241
|
AUTHOR,
|
|
@@ -247,7 +251,7 @@ import {
|
|
|
247
251
|
SKILLS_DIR_NAME,
|
|
248
252
|
VERSION,
|
|
249
253
|
buildUserIdentityPrompt
|
|
250
|
-
} from "./chunk-
|
|
254
|
+
} from "./chunk-YCDF6FNR.js";
|
|
251
255
|
import {
|
|
252
256
|
runWithExecutionContext,
|
|
253
257
|
runWithSessionKey
|
|
@@ -979,7 +983,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
|
|
|
979
983
|
Cost: ${formatCost(cost)}` : "";
|
|
980
984
|
let memoryLine = "";
|
|
981
985
|
try {
|
|
982
|
-
const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-
|
|
986
|
+
const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-PAS7NAPQ.js");
|
|
983
987
|
const pending = countPendingMemories2(ctx.config.getConfigDir());
|
|
984
988
|
if (pending > 0) memoryLine = `
|
|
985
989
|
Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
|
|
@@ -1908,7 +1912,7 @@ async function handleTest(args, ctx) {
|
|
|
1908
1912
|
const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
|
|
1909
1913
|
testArgs = isCommand ? { command: argStr } : { filter: argStr };
|
|
1910
1914
|
}
|
|
1911
|
-
const runTests = ctx.runTests ?? (await import("./run-tests-
|
|
1915
|
+
const runTests = ctx.runTests ?? (await import("./run-tests-2TVEWCQI.js")).executeTests;
|
|
1912
1916
|
const report = await runTests(testArgs);
|
|
1913
1917
|
ctx.send({ type: "info", message: report });
|
|
1914
1918
|
} catch (err) {
|
|
@@ -2184,7 +2188,7 @@ async function handleMemory(args, ctx) {
|
|
|
2184
2188
|
}
|
|
2185
2189
|
if (intent.kind === "status") {
|
|
2186
2190
|
const { getChatIndexStatus } = await import("./chat-index-7CLR4CBG.js");
|
|
2187
|
-
const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-
|
|
2191
|
+
const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-PAS7NAPQ.js");
|
|
2188
2192
|
const memories = listMemoryEntries2(configDir, { includeExpired: true, includeRejected: true });
|
|
2189
2193
|
const injected = formatMemoryForPrompt2(configDir, process.cwd(), ctx.config.get("memory")?.maxChars);
|
|
2190
2194
|
const view = buildMemoryStatusView({
|
|
@@ -2207,7 +2211,7 @@ async function handleMemory(args, ctx) {
|
|
|
2207
2211
|
return;
|
|
2208
2212
|
}
|
|
2209
2213
|
if (intent.kind === "recall") {
|
|
2210
|
-
const { searchPersistentMemories, touchMemoryReferences } = await import("./persistent-memory-
|
|
2214
|
+
const { searchPersistentMemories, touchMemoryReferences } = await import("./persistent-memory-PAS7NAPQ.js");
|
|
2211
2215
|
const { searchChatMemory } = await import("./chat-index-7CLR4CBG.js");
|
|
2212
2216
|
const persistentHits = searchPersistentMemories(configDir, intent.query, process.cwd(), 3);
|
|
2213
2217
|
if (persistentHits.length > 0) {
|
|
@@ -2328,7 +2332,7 @@ async function handleMemory(args, ctx) {
|
|
|
2328
2332
|
ctx.handleMemoryManage(intent.action, args[1], intent.action === "expire" ? args[2] : void 0);
|
|
2329
2333
|
} else if (intent.kind === "export") {
|
|
2330
2334
|
if (args[1] === "md") {
|
|
2331
|
-
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-
|
|
2335
|
+
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-PAS7NAPQ.js");
|
|
2332
2336
|
ctx.send({
|
|
2333
2337
|
type: "export_data",
|
|
2334
2338
|
format: "md",
|
|
@@ -2936,6 +2940,11 @@ var SessionHandler = class _SessionHandler {
|
|
|
2936
2940
|
costCnyPerUsd: CNY_PER_USD,
|
|
2937
2941
|
costPricingUnknown,
|
|
2938
2942
|
providers: providerList,
|
|
2943
|
+
hubPresets: loadCustomPresets(this.config.getConfigDir()).presets.map((p) => ({
|
|
2944
|
+
id: p.id,
|
|
2945
|
+
name: p.name,
|
|
2946
|
+
description: p.description
|
|
2947
|
+
})),
|
|
2939
2948
|
branches,
|
|
2940
2949
|
activeBranchId: sess?.activeBranchId ?? "main",
|
|
2941
2950
|
agents: listAgentRuns().slice(0, 20).map((run) => ({
|
|
@@ -3189,7 +3198,8 @@ var SessionHandler = class _SessionHandler {
|
|
|
3189
3198
|
this.send({ type: "error", message: "Hub topic is required." });
|
|
3190
3199
|
return;
|
|
3191
3200
|
}
|
|
3192
|
-
const
|
|
3201
|
+
const presetId = msg.preset ?? "brainstorm";
|
|
3202
|
+
const preset = presetId.startsWith(CUSTOM_PRESET_PREFIX) ? loadCustomPresets(this.config.getConfigDir()).presets.find((p) => p.id === presetId) : getPreset(presetId);
|
|
3193
3203
|
if (!preset) {
|
|
3194
3204
|
this.send({ type: "error", message: `Unknown preset "${msg.preset}".` });
|
|
3195
3205
|
return;
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
googleSearchContext,
|
|
5
5
|
isToolCapableProvider,
|
|
6
6
|
truncateOutput
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RZDRBFAB.js";
|
|
8
8
|
import "./chunk-6JHACXB3.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-56ME7PB2.js";
|
|
10
10
|
import "./chunk-RWRZVQCB.js";
|
|
11
11
|
import "./chunk-B3MPYI4E.js";
|
|
12
12
|
import "./chunk-M6HLYG33.js";
|
|
@@ -17,22 +17,24 @@ import "./chunk-JL44HGZC.js";
|
|
|
17
17
|
import "./chunk-3FEZSLGI.js";
|
|
18
18
|
import {
|
|
19
19
|
runTool
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-Q26V2PNA.js";
|
|
21
21
|
import "./chunk-RS7SKYTS.js";
|
|
22
22
|
import {
|
|
23
|
-
getDangerLevel
|
|
23
|
+
getDangerLevel
|
|
24
|
+
} from "./chunk-W4P2KJZN.js";
|
|
25
|
+
import {
|
|
24
26
|
runLeanAgentLoop
|
|
25
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-C6GA7H5D.js";
|
|
26
28
|
import "./chunk-TU3L3PW7.js";
|
|
27
29
|
import "./chunk-HOSJZMQS.js";
|
|
28
30
|
import {
|
|
29
31
|
atomicWriteFileSync
|
|
30
32
|
} from "./chunk-BMLQPSHP.js";
|
|
31
33
|
import "./chunk-JJFJWD35.js";
|
|
32
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-6BGW25LG.js";
|
|
33
35
|
import {
|
|
34
36
|
SUBAGENT_ALLOWED_TOOLS
|
|
35
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-YCDF6FNR.js";
|
|
36
38
|
import "./chunk-SXIJLSVF.js";
|
|
37
39
|
|
|
38
40
|
// src/hub/task-orchestrator.ts
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
import "./chunk-RS7SKYTS.js";
|
|
10
10
|
import {
|
|
11
11
|
ConfigManager
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CM5C7ZSM.js";
|
|
13
13
|
import "./chunk-TU3L3PW7.js";
|
|
14
14
|
import "./chunk-BMLQPSHP.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-YCDF6FNR.js";
|
|
16
16
|
|
|
17
17
|
// src/cli/usage.ts
|
|
18
18
|
function classifyRowCost(row) {
|
package/dist/web/client/app.js
CHANGED
|
@@ -506,6 +506,7 @@ function handleStatus(msg) {
|
|
|
506
506
|
providers = msg.providers || [];
|
|
507
507
|
updateProviderSelect(msg.provider);
|
|
508
508
|
updateModelSelect(msg.provider, msg.model);
|
|
509
|
+
updateHubPresets(msg.hubPresets);
|
|
509
510
|
|
|
510
511
|
// ── Route by sessionId ────────────────────────────────────────────
|
|
511
512
|
// Find the Tab this status payload belongs to. If the active Tab matches,
|
|
@@ -3202,6 +3203,24 @@ function hubAgentContainer(roleId) {
|
|
|
3202
3203
|
|
|
3203
3204
|
function hubColor(c) { return HUB_COLORS[c] || '#9ca3af'; }
|
|
3204
3205
|
|
|
3206
|
+
/** Sync the `custom:` entries of the preset dropdown with `<configDir>/hub-roles/*.json`. */
|
|
3207
|
+
function updateHubPresets(list) {
|
|
3208
|
+
const select = document.getElementById('hub-preset');
|
|
3209
|
+
if (!select) return;
|
|
3210
|
+
const presets = Array.isArray(list) ? list : [];
|
|
3211
|
+
const selected = select.value;
|
|
3212
|
+
for (const opt of [...select.options]) {
|
|
3213
|
+
if (opt.value.startsWith('custom:')) opt.remove();
|
|
3214
|
+
}
|
|
3215
|
+
for (const p of presets) {
|
|
3216
|
+
const opt = document.createElement('option');
|
|
3217
|
+
opt.value = p.id;
|
|
3218
|
+
opt.textContent = `★ ${p.name} — ${p.description}`;
|
|
3219
|
+
select.appendChild(opt);
|
|
3220
|
+
}
|
|
3221
|
+
if ([...select.options].some(o => o.value === selected)) select.value = selected;
|
|
3222
|
+
}
|
|
3223
|
+
|
|
3205
3224
|
window.startHub = function () {
|
|
3206
3225
|
const topic = (document.getElementById('hub-topic').value || '').trim();
|
|
3207
3226
|
if (!topic) { document.getElementById('hub-status').textContent = 'Enter a topic first.'; return; }
|
|
Binary file
|
|
Binary file
|