jinzd-ai-cli 0.4.318 → 0.4.320
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-Y7IG5WTY.js → batch-LRYDPB6F.js} +2 -2
- package/dist/{chunk-VXQSMWXN.js → chunk-46M65JDN.js} +99 -62
- package/dist/{chunk-SPSFCJLM.js → chunk-4S2XD3M2.js} +4 -4
- package/dist/{chunk-ZXNQ37FB.js → chunk-5VZHSSLW.js} +1 -1
- package/dist/{chunk-DAWPHJSS.js → chunk-DB4HVUPI.js} +1 -1
- package/dist/{chunk-6VBW3L57.js → chunk-E2W2MI6H.js} +76 -6
- package/dist/{chunk-KPCXZJW2.js → chunk-J7IPNING.js} +1 -1
- package/dist/{chunk-IODFI5GY.js → chunk-N6YFBRQV.js} +28 -16
- package/dist/{chunk-TNEGZIP6.js → chunk-NOAWUEJJ.js} +28 -16
- package/dist/{chunk-BVEEA5BS.js → chunk-P4FJBD2H.js} +1 -1
- package/dist/{chunk-RB6FKHNZ.js → chunk-QB3MECZJ.js} +8 -8
- package/dist/{chunk-ZGIMXWXZ.js → chunk-SKQUWDRM.js} +1 -1
- package/dist/{chunk-7HX3FC67.js → chunk-TKBWA3XJ.js} +4 -4
- package/dist/{chunk-4MLOMT3W.js → chunk-WW2LFOWE.js} +1 -1
- package/dist/{chunk-APGWL4CQ.js → chunk-WY4IWCQ5.js} +1 -1
- package/dist/{chunk-MBI4RPRN.js → chunk-YAMPLTYO.js} +1 -1
- package/dist/{ci-XE42OB7U.js → ci-7TSOMDHV.js} +6 -6
- package/dist/{ci-format-IHLVLQ6B.js → ci-format-6A2RFYZS.js} +2 -2
- package/dist/{constants-HVWL645G.js → constants-EHYM2NS5.js} +1 -1
- package/dist/{constants-XUNVLHWI.js → constants-P33UDQVS.js} +1 -1
- package/dist/{doctor-cli-R3WQP5FD.js → doctor-cli-2B72UMZO.js} +6 -6
- package/dist/electron-server.js +180 -73
- package/dist/{hub-34YQNQF3.js → hub-JACLTKYY.js} +1 -1
- package/dist/index.js +45 -24
- package/dist/{persistent-memory-IUALAZ5K.js → persistent-memory-5ICLP275.js} +2 -2
- package/dist/{persistent-memory-VBVGH3P5.js → persistent-memory-ZIM6ICIR.js} +2 -2
- package/dist/{pr-QEQH3TAH.js → pr-UBGLNROK.js} +6 -6
- package/dist/{run-tests-OBX5CEPQ.js → run-tests-HCID73KE.js} +2 -2
- package/dist/{run-tests-L7FHOQAD.js → run-tests-SYJG4S3N.js} +2 -2
- package/dist/{server-ESLQPXVI.js → server-3UEEPEUD.js} +15 -15
- package/dist/{server-NBAC226K.js → server-BVTFIPB2.js} +6 -6
- package/dist/{task-orchestrator-2IKNOOMG.js → task-orchestrator-6NRCGF5V.js} +9 -7
- package/dist/{usage-B7TQHRIN.js → usage-6V64TTRE.js} +2 -2
- package/package.json +1 -1
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-QB3MECZJ.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-46M65JDN.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-WY4IWCQ5.js";
|
|
64
64
|
import "./chunk-RWRZVQCB.js";
|
|
65
65
|
import "./chunk-B3MPYI4E.js";
|
|
66
66
|
import "./chunk-M6HLYG33.js";
|
|
@@ -81,22 +81,22 @@ import {
|
|
|
81
81
|
import {
|
|
82
82
|
loadContextFiles,
|
|
83
83
|
writeCrashLog
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-4S2XD3M2.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-5VZHSSLW.js";
|
|
92
92
|
import "./chunk-RS7SKYTS.js";
|
|
93
93
|
import {
|
|
94
94
|
ProviderRegistry,
|
|
95
95
|
listBuiltInProviderMetadata
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-YAMPLTYO.js";
|
|
97
97
|
import {
|
|
98
98
|
ConfigManager
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-DB4HVUPI.js";
|
|
100
100
|
import {
|
|
101
101
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
102
102
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -114,7 +114,7 @@ import {
|
|
|
114
114
|
runAgentLoop,
|
|
115
115
|
stripToolCallReminder,
|
|
116
116
|
teeStreamErrorSummary
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-E2W2MI6H.js";
|
|
118
118
|
import {
|
|
119
119
|
AuthError,
|
|
120
120
|
ProviderError,
|
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
isInterrupted,
|
|
135
135
|
requestInterrupt,
|
|
136
136
|
resetInterrupt
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-NOAWUEJJ.js";
|
|
138
138
|
import {
|
|
139
139
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
140
140
|
AUTHOR,
|
|
@@ -152,7 +152,7 @@ import {
|
|
|
152
152
|
SKILLS_DIR_NAME,
|
|
153
153
|
VERSION,
|
|
154
154
|
buildUserIdentityPrompt
|
|
155
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-J7IPNING.js";
|
|
156
156
|
import "./chunk-SXIJLSVF.js";
|
|
157
157
|
|
|
158
158
|
// src/index.ts
|
|
@@ -3697,7 +3697,7 @@ Tip: You can continue the conversation by asking the AI to proceed.`
|
|
|
3697
3697
|
);
|
|
3698
3698
|
if (verdict.kind === "reject") {
|
|
3699
3699
|
cleanupRejectedTeeFile(saveToFile);
|
|
3700
|
-
const label = verdict.reason === "meta-narration" ? "meta-narration / leaked reasoning, not document body" : verdict.reason === "empty" ? "an empty stream (no text produced)" : "pseudo-tool-call markup with no usable document body";
|
|
3700
|
+
const label = verdict.reason === "meta-narration" ? "meta-narration / leaked reasoning, not document body" : verdict.reason === "empty" ? "an empty stream (no text produced)" : verdict.reason === "not-a-document" ? `only an announcement ("I'll write it now\u2026"), not the document` : "pseudo-tool-call markup with no usable document body";
|
|
3701
3701
|
pendingTeeSave = armDeferredSave(saveToFile);
|
|
3702
3702
|
process.stdout.write(theme.warning(
|
|
3703
3703
|
`
|
|
@@ -4107,7 +4107,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
4107
4107
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
4108
4108
|
process.exit(1);
|
|
4109
4109
|
}
|
|
4110
|
-
const { startWebServer } = await import("./server-
|
|
4110
|
+
const { startWebServer } = await import("./server-3UEEPEUD.js");
|
|
4111
4111
|
await startWebServer({ port, host: options.host, externalOrigin: options.externalOrigin });
|
|
4112
4112
|
});
|
|
4113
4113
|
program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | logout-all <name> | migrate <name>)").action(async (action, username) => {
|
|
@@ -4274,11 +4274,11 @@ program.command("sessions").description("List recent conversation sessions").opt
|
|
|
4274
4274
|
console.log(footer + "\n");
|
|
4275
4275
|
});
|
|
4276
4276
|
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) => {
|
|
4277
|
-
const { runUsageCli } = await import("./usage-
|
|
4277
|
+
const { runUsageCli } = await import("./usage-6V64TTRE.js");
|
|
4278
4278
|
await runUsageCli(options);
|
|
4279
4279
|
});
|
|
4280
4280
|
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) => {
|
|
4281
|
-
const { runDoctorCli } = await import("./doctor-cli-
|
|
4281
|
+
const { runDoctorCli } = await import("./doctor-cli-2B72UMZO.js");
|
|
4282
4282
|
const argv = process.argv.slice(2);
|
|
4283
4283
|
await runDoctorCli({
|
|
4284
4284
|
json: !!options.json || argv.includes("--json"),
|
|
@@ -4287,7 +4287,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
|
|
|
4287
4287
|
});
|
|
4288
4288
|
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) => {
|
|
4289
4289
|
try {
|
|
4290
|
-
const batch = await import("./batch-
|
|
4290
|
+
const batch = await import("./batch-LRYDPB6F.js");
|
|
4291
4291
|
switch (action) {
|
|
4292
4292
|
case "submit":
|
|
4293
4293
|
if (!arg) {
|
|
@@ -4330,7 +4330,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
4330
4330
|
}
|
|
4331
4331
|
});
|
|
4332
4332
|
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) => {
|
|
4333
|
-
const { startMcpServer } = await import("./server-
|
|
4333
|
+
const { startMcpServer } = await import("./server-BVTFIPB2.js");
|
|
4334
4334
|
await startMcpServer({
|
|
4335
4335
|
allowDestructive: !!options.allowDestructive,
|
|
4336
4336
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -4343,7 +4343,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
4343
4343
|
console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
|
|
4344
4344
|
process.exit(1);
|
|
4345
4345
|
}
|
|
4346
|
-
const { runPrCli } = await import("./pr-
|
|
4346
|
+
const { runPrCli } = await import("./pr-UBGLNROK.js");
|
|
4347
4347
|
const result = await runPrCli({
|
|
4348
4348
|
action,
|
|
4349
4349
|
target,
|
|
@@ -4363,8 +4363,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
4363
4363
|
process.exit(result.exitCode);
|
|
4364
4364
|
});
|
|
4365
4365
|
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) => {
|
|
4366
|
-
const { runCi } = await import("./ci-
|
|
4367
|
-
const { formatCiResult } = await import("./ci-format-
|
|
4366
|
+
const { runCi } = await import("./ci-7TSOMDHV.js");
|
|
4367
|
+
const { formatCiResult } = await import("./ci-format-6A2RFYZS.js");
|
|
4368
4368
|
const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
|
|
4369
4369
|
if (formats > 1) {
|
|
4370
4370
|
console.error("Choose only one output format: --json, --markdown, or --sarif.");
|
|
@@ -4523,7 +4523,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
4523
4523
|
config.get("customProviders"),
|
|
4524
4524
|
config.getConfigDir()
|
|
4525
4525
|
);
|
|
4526
|
-
const { startHub } = await import("./hub-
|
|
4526
|
+
const { startHub } = await import("./hub-JACLTKYY.js");
|
|
4527
4527
|
await startHub(
|
|
4528
4528
|
{
|
|
4529
4529
|
topic: topic ?? "",
|
|
@@ -4664,6 +4664,17 @@ ${loaded.mergedContent}` : void 0
|
|
|
4664
4664
|
const f = new ThinkTagFilter();
|
|
4665
4665
|
return f.push(text) + f.flush();
|
|
4666
4666
|
};
|
|
4667
|
+
let emptyResult = false;
|
|
4668
|
+
const checkEmpty = (content, usage) => {
|
|
4669
|
+
if (content.trim()) return;
|
|
4670
|
+
emptyResult = true;
|
|
4671
|
+
const spent = usage?.outputTokens ?? 0;
|
|
4672
|
+
process.stderr.write(
|
|
4673
|
+
`[aicli] empty response from ${providerId}/${model}` + (spent > 0 ? ` (${spent} output tokens were spent, most likely on reasoning). Try --think off, or raise modelParams.<model>.maxTokens.
|
|
4674
|
+
` : `. The model returned no text.
|
|
4675
|
+
`)
|
|
4676
|
+
);
|
|
4677
|
+
};
|
|
4667
4678
|
try {
|
|
4668
4679
|
if (isStreamingJson) {
|
|
4669
4680
|
const stream = provider.chatStream({
|
|
@@ -4701,6 +4712,7 @@ ${loaded.mergedContent}` : void 0
|
|
|
4701
4712
|
if (finalUsage) doneOut["usage"] = finalUsage;
|
|
4702
4713
|
recordUsage(finalUsage);
|
|
4703
4714
|
process.stdout.write(JSON.stringify(doneOut) + "\n");
|
|
4715
|
+
checkEmpty(fullContent, finalUsage);
|
|
4704
4716
|
} else if (options.json) {
|
|
4705
4717
|
const response = await provider.chat({
|
|
4706
4718
|
messages,
|
|
@@ -4720,6 +4732,7 @@ ${loaded.mergedContent}` : void 0
|
|
|
4720
4732
|
};
|
|
4721
4733
|
recordUsage(response.usage);
|
|
4722
4734
|
process.stdout.write(JSON.stringify(out, null, 2) + "\n");
|
|
4735
|
+
checkEmpty(out.content, response.usage);
|
|
4723
4736
|
} else if (useStream) {
|
|
4724
4737
|
const stream = provider.chatStream({
|
|
4725
4738
|
messages,
|
|
@@ -4733,13 +4746,19 @@ ${loaded.mergedContent}` : void 0
|
|
|
4733
4746
|
});
|
|
4734
4747
|
const textFilter = new ThinkTagFilter();
|
|
4735
4748
|
let streamUsage;
|
|
4749
|
+
let streamedText = "";
|
|
4750
|
+
const emitText = (text) => {
|
|
4751
|
+
streamedText += text;
|
|
4752
|
+
process.stdout.write(text);
|
|
4753
|
+
};
|
|
4736
4754
|
for await (const chunk of stream) {
|
|
4737
4755
|
if (chunk.usage) streamUsage = chunk.usage;
|
|
4738
|
-
if (chunk.delta)
|
|
4756
|
+
if (chunk.delta) emitText(keepThinking ? chunk.delta : textFilter.push(chunk.delta));
|
|
4739
4757
|
}
|
|
4740
|
-
if (!keepThinking)
|
|
4758
|
+
if (!keepThinking) emitText(textFilter.flush());
|
|
4741
4759
|
recordUsage(streamUsage);
|
|
4742
4760
|
process.stdout.write("\n");
|
|
4761
|
+
checkEmpty(streamedText, streamUsage);
|
|
4743
4762
|
} else {
|
|
4744
4763
|
const response = await provider.chat({
|
|
4745
4764
|
messages,
|
|
@@ -4752,10 +4771,12 @@ ${loaded.mergedContent}` : void 0
|
|
|
4752
4771
|
...thinkingParams
|
|
4753
4772
|
});
|
|
4754
4773
|
recordUsage(response.usage);
|
|
4755
|
-
|
|
4774
|
+
const text = stripThinking(response.content);
|
|
4775
|
+
process.stdout.write(text + "\n");
|
|
4776
|
+
checkEmpty(text, response.usage);
|
|
4756
4777
|
}
|
|
4757
4778
|
costTracker.flush();
|
|
4758
|
-
process.exit(0);
|
|
4779
|
+
process.exit(emptyResult ? 2 : 0);
|
|
4759
4780
|
} catch (err) {
|
|
4760
4781
|
costTracker.flush();
|
|
4761
4782
|
const msg = err instanceof Error ? err.message : String(err);
|
|
@@ -28,11 +28,11 @@ import {
|
|
|
28
28
|
touchMemoryReferences,
|
|
29
29
|
updateMemoryApproval,
|
|
30
30
|
updateMemoryEntry
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-WY4IWCQ5.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-J7IPNING.js";
|
|
36
36
|
export {
|
|
37
37
|
addMemoryEntry,
|
|
38
38
|
backupMemoryStore,
|
|
@@ -27,11 +27,11 @@ import {
|
|
|
27
27
|
touchMemoryReferences,
|
|
28
28
|
updateMemoryApproval,
|
|
29
29
|
updateMemoryEntry
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-WW2LFOWE.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-SKQUWDRM.js";
|
|
35
35
|
export {
|
|
36
36
|
addMemoryEntry,
|
|
37
37
|
backupMemoryStore,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
countSeverity,
|
|
4
4
|
runCi
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-TKBWA3XJ.js";
|
|
6
|
+
import "./chunk-P4FJBD2H.js";
|
|
7
7
|
import {
|
|
8
8
|
buildReviewPrompt,
|
|
9
9
|
buildSecurityReviewPrompt,
|
|
@@ -14,16 +14,16 @@ import {
|
|
|
14
14
|
} from "./chunk-6YZEZFX5.js";
|
|
15
15
|
import {
|
|
16
16
|
ProviderRegistry
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YAMPLTYO.js";
|
|
18
18
|
import {
|
|
19
19
|
ConfigManager
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-DB4HVUPI.js";
|
|
21
|
+
import "./chunk-E2W2MI6H.js";
|
|
22
22
|
import "./chunk-TU3L3PW7.js";
|
|
23
23
|
import "./chunk-BMLQPSHP.js";
|
|
24
24
|
import {
|
|
25
25
|
VERSION
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-J7IPNING.js";
|
|
27
27
|
|
|
28
28
|
// src/cli/pr.ts
|
|
29
29
|
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-N6YFBRQV.js";
|
|
6
6
|
import "./chunk-QMFMST2T.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-SKQUWDRM.js";
|
|
8
8
|
export {
|
|
9
9
|
executeTests,
|
|
10
10
|
runTestProcess,
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
skillHistoryNote,
|
|
87
87
|
snapshotFile,
|
|
88
88
|
stripRoutingTags
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-QB3MECZJ.js";
|
|
90
90
|
import {
|
|
91
91
|
CNY_PER_USD,
|
|
92
92
|
CostTracker,
|
|
@@ -130,7 +130,7 @@ import {
|
|
|
130
130
|
spawnAgentContext,
|
|
131
131
|
truncateOutput,
|
|
132
132
|
undoStack
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-46M65JDN.js";
|
|
134
134
|
import {
|
|
135
135
|
buildReviewPrompt,
|
|
136
136
|
buildSecurityReviewPrompt
|
|
@@ -157,7 +157,7 @@ import {
|
|
|
157
157
|
restoreMemoryEntries,
|
|
158
158
|
updateMemoryApproval,
|
|
159
159
|
updateMemoryEntry
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-WY4IWCQ5.js";
|
|
161
161
|
import "./chunk-RWRZVQCB.js";
|
|
162
162
|
import "./chunk-B3MPYI4E.js";
|
|
163
163
|
import "./chunk-M6HLYG33.js";
|
|
@@ -176,7 +176,7 @@ import {
|
|
|
176
176
|
buildDoctorReport,
|
|
177
177
|
formatDoctorReport,
|
|
178
178
|
loadContextFiles
|
|
179
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-4S2XD3M2.js";
|
|
180
180
|
import {
|
|
181
181
|
describePlugin,
|
|
182
182
|
getActivePluginAssets,
|
|
@@ -191,14 +191,14 @@ import {
|
|
|
191
191
|
runTool,
|
|
192
192
|
setPluginEnabled,
|
|
193
193
|
trustPlugin
|
|
194
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-5VZHSSLW.js";
|
|
195
195
|
import "./chunk-RS7SKYTS.js";
|
|
196
196
|
import {
|
|
197
197
|
ProviderRegistry
|
|
198
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-YAMPLTYO.js";
|
|
199
199
|
import {
|
|
200
200
|
ConfigManager
|
|
201
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-DB4HVUPI.js";
|
|
202
202
|
import {
|
|
203
203
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
204
204
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -214,7 +214,7 @@ import {
|
|
|
214
214
|
runAgentLoop,
|
|
215
215
|
stripToolCallReminder,
|
|
216
216
|
teeStreamErrorSummary
|
|
217
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-E2W2MI6H.js";
|
|
218
218
|
import "./chunk-TU3L3PW7.js";
|
|
219
219
|
import {
|
|
220
220
|
formatGitContextForPrompt,
|
|
@@ -231,7 +231,7 @@ import {
|
|
|
231
231
|
import {
|
|
232
232
|
assertReadablePath
|
|
233
233
|
} from "./chunk-JJFJWD35.js";
|
|
234
|
-
import "./chunk-
|
|
234
|
+
import "./chunk-NOAWUEJJ.js";
|
|
235
235
|
import {
|
|
236
236
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
237
237
|
AUTHOR,
|
|
@@ -247,7 +247,7 @@ import {
|
|
|
247
247
|
SKILLS_DIR_NAME,
|
|
248
248
|
VERSION,
|
|
249
249
|
buildUserIdentityPrompt
|
|
250
|
-
} from "./chunk-
|
|
250
|
+
} from "./chunk-J7IPNING.js";
|
|
251
251
|
import {
|
|
252
252
|
runWithExecutionContext,
|
|
253
253
|
runWithSessionKey
|
|
@@ -978,7 +978,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
|
|
|
978
978
|
Cost: ${formatCost(cost)}` : "";
|
|
979
979
|
let memoryLine = "";
|
|
980
980
|
try {
|
|
981
|
-
const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-
|
|
981
|
+
const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-5ICLP275.js");
|
|
982
982
|
const pending = countPendingMemories2(ctx.config.getConfigDir());
|
|
983
983
|
if (pending > 0) memoryLine = `
|
|
984
984
|
Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
|
|
@@ -1907,7 +1907,7 @@ async function handleTest(args, ctx) {
|
|
|
1907
1907
|
const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
|
|
1908
1908
|
testArgs = isCommand ? { command: argStr } : { filter: argStr };
|
|
1909
1909
|
}
|
|
1910
|
-
const runTests = ctx.runTests ?? (await import("./run-tests-
|
|
1910
|
+
const runTests = ctx.runTests ?? (await import("./run-tests-SYJG4S3N.js")).executeTests;
|
|
1911
1911
|
const report = await runTests(testArgs);
|
|
1912
1912
|
ctx.send({ type: "info", message: report });
|
|
1913
1913
|
} catch (err) {
|
|
@@ -2183,7 +2183,7 @@ async function handleMemory(args, ctx) {
|
|
|
2183
2183
|
}
|
|
2184
2184
|
if (intent.kind === "status") {
|
|
2185
2185
|
const { getChatIndexStatus } = await import("./chat-index-7CLR4CBG.js");
|
|
2186
|
-
const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-
|
|
2186
|
+
const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-5ICLP275.js");
|
|
2187
2187
|
const memories = listMemoryEntries2(configDir, { includeExpired: true, includeRejected: true });
|
|
2188
2188
|
const injected = formatMemoryForPrompt2(configDir, process.cwd(), ctx.config.get("memory")?.maxChars);
|
|
2189
2189
|
const view = buildMemoryStatusView({
|
|
@@ -2206,7 +2206,7 @@ async function handleMemory(args, ctx) {
|
|
|
2206
2206
|
return;
|
|
2207
2207
|
}
|
|
2208
2208
|
if (intent.kind === "recall") {
|
|
2209
|
-
const { searchPersistentMemories, touchMemoryReferences } = await import("./persistent-memory-
|
|
2209
|
+
const { searchPersistentMemories, touchMemoryReferences } = await import("./persistent-memory-5ICLP275.js");
|
|
2210
2210
|
const { searchChatMemory } = await import("./chat-index-7CLR4CBG.js");
|
|
2211
2211
|
const persistentHits = searchPersistentMemories(configDir, intent.query, process.cwd(), 3);
|
|
2212
2212
|
if (persistentHits.length > 0) {
|
|
@@ -2327,7 +2327,7 @@ async function handleMemory(args, ctx) {
|
|
|
2327
2327
|
ctx.handleMemoryManage(intent.action, args[1], intent.action === "expire" ? args[2] : void 0);
|
|
2328
2328
|
} else if (intent.kind === "export") {
|
|
2329
2329
|
if (args[1] === "md") {
|
|
2330
|
-
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-
|
|
2330
|
+
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-5ICLP275.js");
|
|
2331
2331
|
ctx.send({
|
|
2332
2332
|
type: "export_data",
|
|
2333
2333
|
format: "md",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-46M65JDN.js";
|
|
5
5
|
import "./chunk-6JHACXB3.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-WY4IWCQ5.js";
|
|
7
7
|
import "./chunk-RWRZVQCB.js";
|
|
8
8
|
import "./chunk-B3MPYI4E.js";
|
|
9
9
|
import "./chunk-M6HLYG33.js";
|
|
@@ -14,20 +14,20 @@ import "./chunk-JL44HGZC.js";
|
|
|
14
14
|
import "./chunk-3FEZSLGI.js";
|
|
15
15
|
import {
|
|
16
16
|
runTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5VZHSSLW.js";
|
|
18
18
|
import "./chunk-RS7SKYTS.js";
|
|
19
19
|
import {
|
|
20
20
|
getDangerLevel,
|
|
21
21
|
schemaToJsonSchema
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-E2W2MI6H.js";
|
|
23
23
|
import "./chunk-TU3L3PW7.js";
|
|
24
24
|
import "./chunk-HOSJZMQS.js";
|
|
25
25
|
import "./chunk-BMLQPSHP.js";
|
|
26
26
|
import "./chunk-JJFJWD35.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-NOAWUEJJ.js";
|
|
28
28
|
import {
|
|
29
29
|
VERSION
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-J7IPNING.js";
|
|
31
31
|
import "./chunk-SXIJLSVF.js";
|
|
32
32
|
|
|
33
33
|
// src/mcp/server.ts
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
googleSearchContext,
|
|
5
5
|
isToolCapableProvider,
|
|
6
6
|
truncateOutput
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-46M65JDN.js";
|
|
8
8
|
import "./chunk-6JHACXB3.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-WY4IWCQ5.js";
|
|
10
10
|
import "./chunk-RWRZVQCB.js";
|
|
11
11
|
import "./chunk-B3MPYI4E.js";
|
|
12
12
|
import "./chunk-M6HLYG33.js";
|
|
@@ -17,22 +17,22 @@ import "./chunk-JL44HGZC.js";
|
|
|
17
17
|
import "./chunk-3FEZSLGI.js";
|
|
18
18
|
import {
|
|
19
19
|
runTool
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5VZHSSLW.js";
|
|
21
21
|
import "./chunk-RS7SKYTS.js";
|
|
22
22
|
import {
|
|
23
23
|
getDangerLevel,
|
|
24
24
|
runLeanAgentLoop
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-E2W2MI6H.js";
|
|
26
26
|
import "./chunk-TU3L3PW7.js";
|
|
27
27
|
import "./chunk-HOSJZMQS.js";
|
|
28
28
|
import {
|
|
29
29
|
atomicWriteFileSync
|
|
30
30
|
} from "./chunk-BMLQPSHP.js";
|
|
31
31
|
import "./chunk-JJFJWD35.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-NOAWUEJJ.js";
|
|
33
33
|
import {
|
|
34
34
|
SUBAGENT_ALLOWED_TOOLS
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-J7IPNING.js";
|
|
36
36
|
import "./chunk-SXIJLSVF.js";
|
|
37
37
|
|
|
38
38
|
// src/hub/task-orchestrator.ts
|
|
@@ -68,6 +68,7 @@ async function executeTask(options) {
|
|
|
68
68
|
maxRounds,
|
|
69
69
|
context,
|
|
70
70
|
configManager,
|
|
71
|
+
thinking,
|
|
71
72
|
onToolCall,
|
|
72
73
|
onToolResult,
|
|
73
74
|
onRound
|
|
@@ -113,7 +114,7 @@ ${task}`, timestamp: /* @__PURE__ */ new Date() }
|
|
|
113
114
|
messages,
|
|
114
115
|
model,
|
|
115
116
|
maxRounds,
|
|
116
|
-
chatParams: { temperature: 0.3, maxTokens: 8192 },
|
|
117
|
+
chatParams: { temperature: 0.3, maxTokens: 8192, ...thinking ?? {} },
|
|
117
118
|
executeTools: (calls) => executor.executeAll(calls),
|
|
118
119
|
systemPromptForRound: (_round, remaining) => {
|
|
119
120
|
if (remaining <= 3 && remaining > 1) {
|
|
@@ -481,6 +482,7 @@ Example:
|
|
|
481
482
|
maxRounds: maxRoundsPerTask,
|
|
482
483
|
context: this.config.context,
|
|
483
484
|
configManager: this.configManager,
|
|
485
|
+
thinking: this.config.thinking,
|
|
484
486
|
onToolCall: (call, danger) => {
|
|
485
487
|
const icon = danger === "write" ? chalk.yellow("\u270E") : chalk.cyan("\u2699");
|
|
486
488
|
console.log(chalk.dim(` ${icon} ${call.name}`));
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
import "./chunk-RS7SKYTS.js";
|
|
10
10
|
import {
|
|
11
11
|
ConfigManager
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DB4HVUPI.js";
|
|
13
13
|
import "./chunk-TU3L3PW7.js";
|
|
14
14
|
import "./chunk-BMLQPSHP.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-J7IPNING.js";
|
|
16
16
|
|
|
17
17
|
// src/cli/usage.ts
|
|
18
18
|
function classifyRowCost(row) {
|