@cnwenf/occ 2.1.270 → 2.1.272
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/cli.js +445 -368
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
globalThis.MACRO={"VERSION":"2.1.
|
|
2
|
+
globalThis.MACRO={"VERSION":"2.1.272","BUILD_TIME":"2026-07-17T04:12:49.768Z","FEEDBACK_CHANNEL":"","ISSUES_EXPLAINER":"","NATIVE_PACKAGE_URL":"","PACKAGE_URL":"@cnwenf/occ","VERSION_CHANGELOG":""};
|
|
3
3
|
// @bun
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -377369,6 +377369,243 @@ var init_UI4 = __esm(() => {
|
|
|
377369
377369
|
jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
|
|
377370
377370
|
});
|
|
377371
377371
|
|
|
377372
|
+
// src/tools/GlobTool/UI.tsx
|
|
377373
|
+
function userFacingName4() {
|
|
377374
|
+
return "Search";
|
|
377375
|
+
}
|
|
377376
|
+
function renderToolUseMessage5({
|
|
377377
|
+
pattern,
|
|
377378
|
+
path: path21
|
|
377379
|
+
}, {
|
|
377380
|
+
verbose
|
|
377381
|
+
}) {
|
|
377382
|
+
if (!pattern) {
|
|
377383
|
+
return null;
|
|
377384
|
+
}
|
|
377385
|
+
if (!path21) {
|
|
377386
|
+
return `pattern: "${pattern}"`;
|
|
377387
|
+
}
|
|
377388
|
+
return `pattern: "${pattern}", path: "${verbose ? path21 : getDisplayPath(path21)}"`;
|
|
377389
|
+
}
|
|
377390
|
+
function renderToolUseErrorMessage5(result, {
|
|
377391
|
+
verbose
|
|
377392
|
+
}) {
|
|
377393
|
+
if (!verbose && typeof result === "string" && extractTag(result, "tool_use_error")) {
|
|
377394
|
+
const errorMessage2 = extractTag(result, "tool_use_error");
|
|
377395
|
+
if (errorMessage2?.includes(FILE_NOT_FOUND_CWD_NOTE)) {
|
|
377396
|
+
return /* @__PURE__ */ jsx_runtime45.jsx(MessageResponse, {
|
|
377397
|
+
children: /* @__PURE__ */ jsx_runtime45.jsx(ThemedText, {
|
|
377398
|
+
color: "error",
|
|
377399
|
+
children: "File not found"
|
|
377400
|
+
})
|
|
377401
|
+
});
|
|
377402
|
+
}
|
|
377403
|
+
return /* @__PURE__ */ jsx_runtime45.jsx(MessageResponse, {
|
|
377404
|
+
children: /* @__PURE__ */ jsx_runtime45.jsx(ThemedText, {
|
|
377405
|
+
color: "error",
|
|
377406
|
+
children: "Error searching files"
|
|
377407
|
+
})
|
|
377408
|
+
});
|
|
377409
|
+
}
|
|
377410
|
+
return /* @__PURE__ */ jsx_runtime45.jsx(FallbackToolUseErrorMessage, {
|
|
377411
|
+
result,
|
|
377412
|
+
verbose
|
|
377413
|
+
});
|
|
377414
|
+
}
|
|
377415
|
+
function getToolUseSummary5(input) {
|
|
377416
|
+
if (!input?.pattern) {
|
|
377417
|
+
return null;
|
|
377418
|
+
}
|
|
377419
|
+
return truncate(input.pattern, TOOL_SUMMARY_MAX_LENGTH);
|
|
377420
|
+
}
|
|
377421
|
+
var jsx_runtime45;
|
|
377422
|
+
var init_UI5 = __esm(() => {
|
|
377423
|
+
init_MessageResponse();
|
|
377424
|
+
init_messages3();
|
|
377425
|
+
init_FallbackToolUseErrorMessage();
|
|
377426
|
+
init_toolLimits();
|
|
377427
|
+
init_ink2();
|
|
377428
|
+
init_file();
|
|
377429
|
+
init_format();
|
|
377430
|
+
init_UI4();
|
|
377431
|
+
jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
|
|
377432
|
+
});
|
|
377433
|
+
|
|
377434
|
+
// src/tools/GlobTool/GlobTool.ts
|
|
377435
|
+
var inputSchema6, outputSchema6, GlobTool;
|
|
377436
|
+
var init_GlobTool = __esm(() => {
|
|
377437
|
+
init_v4();
|
|
377438
|
+
init_Tool();
|
|
377439
|
+
init_cwd2();
|
|
377440
|
+
init_errors();
|
|
377441
|
+
init_file();
|
|
377442
|
+
init_fsOperations();
|
|
377443
|
+
init_glob();
|
|
377444
|
+
init_path2();
|
|
377445
|
+
init_filesystem();
|
|
377446
|
+
init_shellRuleMatching();
|
|
377447
|
+
init_UI5();
|
|
377448
|
+
inputSchema6 = lazySchema(() => exports_external.strictObject({
|
|
377449
|
+
pattern: exports_external.string().describe("The glob pattern to match files against"),
|
|
377450
|
+
path: exports_external.string().optional().describe('The directory to search in. If not specified, the current working directory will be used. IMPORTANT: Omit this field to use the default directory. DO NOT enter "undefined" or "null" - simply omit it for the default behavior. Must be a valid directory path if provided.'),
|
|
377451
|
+
tools: exports_external.array(exports_external.string()).optional().describe("Tool names to re-add to the subagent tool list when running inside an embedded agent. " + "No effect in the main REPL.")
|
|
377452
|
+
}));
|
|
377453
|
+
outputSchema6 = lazySchema(() => exports_external.object({
|
|
377454
|
+
durationMs: exports_external.number().describe("Time taken to execute the search in milliseconds"),
|
|
377455
|
+
numFiles: exports_external.number().describe("Total number of files found"),
|
|
377456
|
+
filenames: exports_external.array(exports_external.string()).describe("Array of file paths that match the pattern"),
|
|
377457
|
+
truncated: exports_external.boolean().describe("Whether results were truncated (limited to 100 files)")
|
|
377458
|
+
}));
|
|
377459
|
+
GlobTool = buildTool({
|
|
377460
|
+
name: GLOB_TOOL_NAME,
|
|
377461
|
+
searchHint: "find files by name pattern or wildcard",
|
|
377462
|
+
maxResultSizeChars: 1e5,
|
|
377463
|
+
async description() {
|
|
377464
|
+
return DESCRIPTION4;
|
|
377465
|
+
},
|
|
377466
|
+
userFacingName: userFacingName4,
|
|
377467
|
+
getToolUseSummary: getToolUseSummary5,
|
|
377468
|
+
getActivityDescription(input) {
|
|
377469
|
+
const summary = getToolUseSummary5(input);
|
|
377470
|
+
return summary ? `Finding ${summary}` : "Finding files";
|
|
377471
|
+
},
|
|
377472
|
+
get inputSchema() {
|
|
377473
|
+
return inputSchema6();
|
|
377474
|
+
},
|
|
377475
|
+
get outputSchema() {
|
|
377476
|
+
return outputSchema6();
|
|
377477
|
+
},
|
|
377478
|
+
isConcurrencySafe() {
|
|
377479
|
+
return true;
|
|
377480
|
+
},
|
|
377481
|
+
isReadOnly() {
|
|
377482
|
+
return true;
|
|
377483
|
+
},
|
|
377484
|
+
toAutoClassifierInput(input) {
|
|
377485
|
+
return input.pattern;
|
|
377486
|
+
},
|
|
377487
|
+
isSearchOrReadCommand() {
|
|
377488
|
+
return { isSearch: true, isRead: false };
|
|
377489
|
+
},
|
|
377490
|
+
getPath({ path: path21 }) {
|
|
377491
|
+
return path21 ? expandPath(path21) : getCwd();
|
|
377492
|
+
},
|
|
377493
|
+
async preparePermissionMatcher({ pattern }) {
|
|
377494
|
+
return (rulePattern) => matchWildcardPattern(rulePattern, pattern);
|
|
377495
|
+
},
|
|
377496
|
+
async validateInput({ pattern, path: path21 }) {
|
|
377497
|
+
const nullByteField = [["pattern", pattern], ["path", path21]].find(([, v6]) => v6?.includes("\x00"));
|
|
377498
|
+
if (nullByteField) {
|
|
377499
|
+
return {
|
|
377500
|
+
result: false,
|
|
377501
|
+
message: `${GLOB_TOOL_NAME} ${nullByteField[0]} cannot contain null bytes (\\0). Remove the null byte and try again.`,
|
|
377502
|
+
errorCode: 2
|
|
377503
|
+
};
|
|
377504
|
+
}
|
|
377505
|
+
if (path21) {
|
|
377506
|
+
const fs17 = getFsImplementation();
|
|
377507
|
+
const absolutePath = expandPath(path21);
|
|
377508
|
+
if (absolutePath.startsWith("\\\\") || absolutePath.startsWith("//")) {
|
|
377509
|
+
return { result: true };
|
|
377510
|
+
}
|
|
377511
|
+
let stats;
|
|
377512
|
+
try {
|
|
377513
|
+
stats = await fs17.stat(absolutePath);
|
|
377514
|
+
} catch (e4) {
|
|
377515
|
+
if (isENOENT(e4)) {
|
|
377516
|
+
const cwdSuggestion = await suggestPathUnderCwd(absolutePath);
|
|
377517
|
+
let message = `Directory does not exist: ${path21}. ${FILE_NOT_FOUND_CWD_NOTE} ${getCwd()}.`;
|
|
377518
|
+
if (cwdSuggestion) {
|
|
377519
|
+
message += ` Did you mean ${cwdSuggestion}?`;
|
|
377520
|
+
}
|
|
377521
|
+
return {
|
|
377522
|
+
result: false,
|
|
377523
|
+
message,
|
|
377524
|
+
errorCode: 1
|
|
377525
|
+
};
|
|
377526
|
+
}
|
|
377527
|
+
throw e4;
|
|
377528
|
+
}
|
|
377529
|
+
if (!stats.isDirectory()) {
|
|
377530
|
+
return {
|
|
377531
|
+
result: false,
|
|
377532
|
+
message: `Path is not a directory: ${path21}`,
|
|
377533
|
+
errorCode: 2
|
|
377534
|
+
};
|
|
377535
|
+
}
|
|
377536
|
+
}
|
|
377537
|
+
return { result: true };
|
|
377538
|
+
},
|
|
377539
|
+
async checkPermissions(input, context4) {
|
|
377540
|
+
const appState = context4.getAppState();
|
|
377541
|
+
return checkReadPermissionForTool(GlobTool, input, appState.toolPermissionContext);
|
|
377542
|
+
},
|
|
377543
|
+
async prompt() {
|
|
377544
|
+
return DESCRIPTION4;
|
|
377545
|
+
},
|
|
377546
|
+
renderToolUseMessage: renderToolUseMessage5,
|
|
377547
|
+
renderToolUseErrorMessage: renderToolUseErrorMessage5,
|
|
377548
|
+
renderToolResultMessage: renderToolResultMessage4,
|
|
377549
|
+
extractSearchText({ filenames }) {
|
|
377550
|
+
return filenames.join(`
|
|
377551
|
+
`);
|
|
377552
|
+
},
|
|
377553
|
+
async call(input, { abortController, getAppState, globLimits, setAppState }) {
|
|
377554
|
+
if (input.tools && input.tools.length > 0) {
|
|
377555
|
+
setAppState((prev) => ({
|
|
377556
|
+
...prev,
|
|
377557
|
+
toolPermissionContext: {
|
|
377558
|
+
...prev.toolPermissionContext,
|
|
377559
|
+
alwaysAllowRules: {
|
|
377560
|
+
...prev.toolPermissionContext.alwaysAllowRules,
|
|
377561
|
+
command: [
|
|
377562
|
+
...new Set([
|
|
377563
|
+
...prev.toolPermissionContext.alwaysAllowRules.command || [],
|
|
377564
|
+
...input.tools
|
|
377565
|
+
])
|
|
377566
|
+
]
|
|
377567
|
+
}
|
|
377568
|
+
}
|
|
377569
|
+
}));
|
|
377570
|
+
}
|
|
377571
|
+
const start = Date.now();
|
|
377572
|
+
const appState = getAppState();
|
|
377573
|
+
const limit = globLimits?.maxResults ?? 100;
|
|
377574
|
+
const { files: files2, truncated } = await glob(input.pattern, GlobTool.getPath(input), { limit, offset: 0 }, abortController.signal, appState.toolPermissionContext);
|
|
377575
|
+
const filenames = files2.map(toRelativePath);
|
|
377576
|
+
const output = {
|
|
377577
|
+
filenames,
|
|
377578
|
+
durationMs: Date.now() - start,
|
|
377579
|
+
numFiles: filenames.length,
|
|
377580
|
+
truncated
|
|
377581
|
+
};
|
|
377582
|
+
return {
|
|
377583
|
+
data: output
|
|
377584
|
+
};
|
|
377585
|
+
},
|
|
377586
|
+
mapToolResultToToolResultBlockParam(output, toolUseID) {
|
|
377587
|
+
if (output.filenames.length === 0) {
|
|
377588
|
+
return {
|
|
377589
|
+
tool_use_id: toolUseID,
|
|
377590
|
+
type: "tool_result",
|
|
377591
|
+
content: "No files found"
|
|
377592
|
+
};
|
|
377593
|
+
}
|
|
377594
|
+
return {
|
|
377595
|
+
tool_use_id: toolUseID,
|
|
377596
|
+
type: "tool_result",
|
|
377597
|
+
content: [
|
|
377598
|
+
...output.filenames,
|
|
377599
|
+
...output.truncated ? [
|
|
377600
|
+
"(Results are truncated. Consider using a more specific path or pattern.)"
|
|
377601
|
+
] : []
|
|
377602
|
+
].join(`
|
|
377603
|
+
`)
|
|
377604
|
+
};
|
|
377605
|
+
}
|
|
377606
|
+
});
|
|
377607
|
+
});
|
|
377608
|
+
|
|
377372
377609
|
// src/tools/GrepTool/GrepTool.ts
|
|
377373
377610
|
function applyHeadLimit(items, limit, offset = 0) {
|
|
377374
377611
|
if (limit === 0) {
|
|
@@ -377390,7 +377627,7 @@ function formatLimitInfo(appliedLimit, appliedOffset) {
|
|
|
377390
377627
|
parts.push(`offset: ${appliedOffset}`);
|
|
377391
377628
|
return parts.join(", ");
|
|
377392
377629
|
}
|
|
377393
|
-
var
|
|
377630
|
+
var inputSchema7, VCS_DIRECTORIES_TO_EXCLUDE2, DEFAULT_HEAD_LIMIT = 250, outputSchema7, GrepTool;
|
|
377394
377631
|
var init_GrepTool = __esm(() => {
|
|
377395
377632
|
init_v4();
|
|
377396
377633
|
init_Tool();
|
|
@@ -377408,7 +377645,7 @@ var init_GrepTool = __esm(() => {
|
|
|
377408
377645
|
init_stringUtils();
|
|
377409
377646
|
init_prompt2();
|
|
377410
377647
|
init_UI4();
|
|
377411
|
-
|
|
377648
|
+
inputSchema7 = lazySchema(() => exports_external.strictObject({
|
|
377412
377649
|
pattern: exports_external.string().describe("The regular expression pattern to search for in file contents"),
|
|
377413
377650
|
path: exports_external.string().optional().describe("File or directory to search in (rg PATH). Defaults to current working directory."),
|
|
377414
377651
|
glob: exports_external.string().optional().describe('Glob pattern to filter files (e.g. "*.js", "*.{ts,tsx}") - maps to rg --glob'),
|
|
@@ -377433,7 +377670,7 @@ var init_GrepTool = __esm(() => {
|
|
|
377433
377670
|
".jj",
|
|
377434
377671
|
".sl"
|
|
377435
377672
|
];
|
|
377436
|
-
|
|
377673
|
+
outputSchema7 = lazySchema(() => exports_external.object({
|
|
377437
377674
|
mode: exports_external.enum(["content", "files_with_matches", "count"]).optional(),
|
|
377438
377675
|
numFiles: exports_external.number(),
|
|
377439
377676
|
filenames: exports_external.array(exports_external.string()),
|
|
@@ -377462,10 +377699,10 @@ var init_GrepTool = __esm(() => {
|
|
|
377462
377699
|
return summary ? `Searching for ${summary}` : "Searching";
|
|
377463
377700
|
},
|
|
377464
377701
|
get inputSchema() {
|
|
377465
|
-
return
|
|
377702
|
+
return inputSchema7();
|
|
377466
377703
|
},
|
|
377467
377704
|
get outputSchema() {
|
|
377468
|
-
return
|
|
377705
|
+
return outputSchema7();
|
|
377469
377706
|
},
|
|
377470
377707
|
isConcurrencySafe() {
|
|
377471
377708
|
return true;
|
|
@@ -377702,6 +377939,11 @@ ${filenames.join(`
|
|
|
377702
377939
|
for (const exclusion of await getGlobExclusionsForPluginCache(absolutePath)) {
|
|
377703
377940
|
args.push("--glob", exclusion);
|
|
377704
377941
|
}
|
|
377942
|
+
try {
|
|
377943
|
+
new RegExp(pattern);
|
|
377944
|
+
} catch {
|
|
377945
|
+
throw new Error(`Search failed: ripgrep rejected the pattern "${pattern}"`);
|
|
377946
|
+
}
|
|
377705
377947
|
const results = await ripGrep(args, absolutePath, abortController.signal, {
|
|
377706
377948
|
rejectOnInputError: true
|
|
377707
377949
|
});
|
|
@@ -377797,244 +378039,6 @@ ${filenames.join(`
|
|
|
377797
378039
|
});
|
|
377798
378040
|
});
|
|
377799
378041
|
|
|
377800
|
-
// src/tools/GlobTool/UI.tsx
|
|
377801
|
-
function userFacingName4() {
|
|
377802
|
-
return "Search";
|
|
377803
|
-
}
|
|
377804
|
-
function renderToolUseMessage5({
|
|
377805
|
-
pattern,
|
|
377806
|
-
path: path21
|
|
377807
|
-
}, {
|
|
377808
|
-
verbose
|
|
377809
|
-
}) {
|
|
377810
|
-
if (!pattern) {
|
|
377811
|
-
return null;
|
|
377812
|
-
}
|
|
377813
|
-
if (!path21) {
|
|
377814
|
-
return `pattern: "${pattern}"`;
|
|
377815
|
-
}
|
|
377816
|
-
return `pattern: "${pattern}", path: "${verbose ? path21 : getDisplayPath(path21)}"`;
|
|
377817
|
-
}
|
|
377818
|
-
function renderToolUseErrorMessage5(result, {
|
|
377819
|
-
verbose
|
|
377820
|
-
}) {
|
|
377821
|
-
if (!verbose && typeof result === "string" && extractTag(result, "tool_use_error")) {
|
|
377822
|
-
const errorMessage2 = extractTag(result, "tool_use_error");
|
|
377823
|
-
if (errorMessage2?.includes(FILE_NOT_FOUND_CWD_NOTE)) {
|
|
377824
|
-
return /* @__PURE__ */ jsx_runtime45.jsx(MessageResponse, {
|
|
377825
|
-
children: /* @__PURE__ */ jsx_runtime45.jsx(ThemedText, {
|
|
377826
|
-
color: "error",
|
|
377827
|
-
children: "File not found"
|
|
377828
|
-
})
|
|
377829
|
-
});
|
|
377830
|
-
}
|
|
377831
|
-
return /* @__PURE__ */ jsx_runtime45.jsx(MessageResponse, {
|
|
377832
|
-
children: /* @__PURE__ */ jsx_runtime45.jsx(ThemedText, {
|
|
377833
|
-
color: "error",
|
|
377834
|
-
children: "Error searching files"
|
|
377835
|
-
})
|
|
377836
|
-
});
|
|
377837
|
-
}
|
|
377838
|
-
return /* @__PURE__ */ jsx_runtime45.jsx(FallbackToolUseErrorMessage, {
|
|
377839
|
-
result,
|
|
377840
|
-
verbose
|
|
377841
|
-
});
|
|
377842
|
-
}
|
|
377843
|
-
function getToolUseSummary5(input) {
|
|
377844
|
-
if (!input?.pattern) {
|
|
377845
|
-
return null;
|
|
377846
|
-
}
|
|
377847
|
-
return truncate(input.pattern, TOOL_SUMMARY_MAX_LENGTH);
|
|
377848
|
-
}
|
|
377849
|
-
var jsx_runtime45, renderToolResultMessage5;
|
|
377850
|
-
var init_UI5 = __esm(() => {
|
|
377851
|
-
init_MessageResponse();
|
|
377852
|
-
init_messages3();
|
|
377853
|
-
init_FallbackToolUseErrorMessage();
|
|
377854
|
-
init_toolLimits();
|
|
377855
|
-
init_ink2();
|
|
377856
|
-
init_file();
|
|
377857
|
-
init_format();
|
|
377858
|
-
init_GrepTool();
|
|
377859
|
-
jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
|
|
377860
|
-
renderToolResultMessage5 = GrepTool.renderToolResultMessage;
|
|
377861
|
-
});
|
|
377862
|
-
|
|
377863
|
-
// src/tools/GlobTool/GlobTool.ts
|
|
377864
|
-
var inputSchema7, outputSchema7, GlobTool;
|
|
377865
|
-
var init_GlobTool = __esm(() => {
|
|
377866
|
-
init_v4();
|
|
377867
|
-
init_Tool();
|
|
377868
|
-
init_cwd2();
|
|
377869
|
-
init_errors();
|
|
377870
|
-
init_file();
|
|
377871
|
-
init_fsOperations();
|
|
377872
|
-
init_glob();
|
|
377873
|
-
init_path2();
|
|
377874
|
-
init_filesystem();
|
|
377875
|
-
init_shellRuleMatching();
|
|
377876
|
-
init_UI5();
|
|
377877
|
-
inputSchema7 = lazySchema(() => exports_external.strictObject({
|
|
377878
|
-
pattern: exports_external.string().describe("The glob pattern to match files against"),
|
|
377879
|
-
path: exports_external.string().optional().describe('The directory to search in. If not specified, the current working directory will be used. IMPORTANT: Omit this field to use the default directory. DO NOT enter "undefined" or "null" - simply omit it for the default behavior. Must be a valid directory path if provided.'),
|
|
377880
|
-
tools: exports_external.array(exports_external.string()).optional().describe("Tool names to re-add to the subagent tool list when running inside an embedded agent. " + "No effect in the main REPL.")
|
|
377881
|
-
}));
|
|
377882
|
-
outputSchema7 = lazySchema(() => exports_external.object({
|
|
377883
|
-
durationMs: exports_external.number().describe("Time taken to execute the search in milliseconds"),
|
|
377884
|
-
numFiles: exports_external.number().describe("Total number of files found"),
|
|
377885
|
-
filenames: exports_external.array(exports_external.string()).describe("Array of file paths that match the pattern"),
|
|
377886
|
-
truncated: exports_external.boolean().describe("Whether results were truncated (limited to 100 files)")
|
|
377887
|
-
}));
|
|
377888
|
-
GlobTool = buildTool({
|
|
377889
|
-
name: GLOB_TOOL_NAME,
|
|
377890
|
-
searchHint: "find files by name pattern or wildcard",
|
|
377891
|
-
maxResultSizeChars: 1e5,
|
|
377892
|
-
async description() {
|
|
377893
|
-
return DESCRIPTION4;
|
|
377894
|
-
},
|
|
377895
|
-
userFacingName: userFacingName4,
|
|
377896
|
-
getToolUseSummary: getToolUseSummary5,
|
|
377897
|
-
getActivityDescription(input) {
|
|
377898
|
-
const summary = getToolUseSummary5(input);
|
|
377899
|
-
return summary ? `Finding ${summary}` : "Finding files";
|
|
377900
|
-
},
|
|
377901
|
-
get inputSchema() {
|
|
377902
|
-
return inputSchema7();
|
|
377903
|
-
},
|
|
377904
|
-
get outputSchema() {
|
|
377905
|
-
return outputSchema7();
|
|
377906
|
-
},
|
|
377907
|
-
isConcurrencySafe() {
|
|
377908
|
-
return true;
|
|
377909
|
-
},
|
|
377910
|
-
isReadOnly() {
|
|
377911
|
-
return true;
|
|
377912
|
-
},
|
|
377913
|
-
toAutoClassifierInput(input) {
|
|
377914
|
-
return input.pattern;
|
|
377915
|
-
},
|
|
377916
|
-
isSearchOrReadCommand() {
|
|
377917
|
-
return { isSearch: true, isRead: false };
|
|
377918
|
-
},
|
|
377919
|
-
getPath({ path: path21 }) {
|
|
377920
|
-
return path21 ? expandPath(path21) : getCwd();
|
|
377921
|
-
},
|
|
377922
|
-
async preparePermissionMatcher({ pattern }) {
|
|
377923
|
-
return (rulePattern) => matchWildcardPattern(rulePattern, pattern);
|
|
377924
|
-
},
|
|
377925
|
-
async validateInput({ pattern, path: path21 }) {
|
|
377926
|
-
const nullByteField = [["pattern", pattern], ["path", path21]].find(([, v6]) => v6?.includes("\x00"));
|
|
377927
|
-
if (nullByteField) {
|
|
377928
|
-
return {
|
|
377929
|
-
result: false,
|
|
377930
|
-
message: `${GLOB_TOOL_NAME} ${nullByteField[0]} cannot contain null bytes (\\0). Remove the null byte and try again.`,
|
|
377931
|
-
errorCode: 2
|
|
377932
|
-
};
|
|
377933
|
-
}
|
|
377934
|
-
if (path21) {
|
|
377935
|
-
const fs17 = getFsImplementation();
|
|
377936
|
-
const absolutePath = expandPath(path21);
|
|
377937
|
-
if (absolutePath.startsWith("\\\\") || absolutePath.startsWith("//")) {
|
|
377938
|
-
return { result: true };
|
|
377939
|
-
}
|
|
377940
|
-
let stats;
|
|
377941
|
-
try {
|
|
377942
|
-
stats = await fs17.stat(absolutePath);
|
|
377943
|
-
} catch (e4) {
|
|
377944
|
-
if (isENOENT(e4)) {
|
|
377945
|
-
const cwdSuggestion = await suggestPathUnderCwd(absolutePath);
|
|
377946
|
-
let message = `Directory does not exist: ${path21}. ${FILE_NOT_FOUND_CWD_NOTE} ${getCwd()}.`;
|
|
377947
|
-
if (cwdSuggestion) {
|
|
377948
|
-
message += ` Did you mean ${cwdSuggestion}?`;
|
|
377949
|
-
}
|
|
377950
|
-
return {
|
|
377951
|
-
result: false,
|
|
377952
|
-
message,
|
|
377953
|
-
errorCode: 1
|
|
377954
|
-
};
|
|
377955
|
-
}
|
|
377956
|
-
throw e4;
|
|
377957
|
-
}
|
|
377958
|
-
if (!stats.isDirectory()) {
|
|
377959
|
-
return {
|
|
377960
|
-
result: false,
|
|
377961
|
-
message: `Path is not a directory: ${path21}`,
|
|
377962
|
-
errorCode: 2
|
|
377963
|
-
};
|
|
377964
|
-
}
|
|
377965
|
-
}
|
|
377966
|
-
return { result: true };
|
|
377967
|
-
},
|
|
377968
|
-
async checkPermissions(input, context4) {
|
|
377969
|
-
const appState = context4.getAppState();
|
|
377970
|
-
return checkReadPermissionForTool(GlobTool, input, appState.toolPermissionContext);
|
|
377971
|
-
},
|
|
377972
|
-
async prompt() {
|
|
377973
|
-
return DESCRIPTION4;
|
|
377974
|
-
},
|
|
377975
|
-
renderToolUseMessage: renderToolUseMessage5,
|
|
377976
|
-
renderToolUseErrorMessage: renderToolUseErrorMessage5,
|
|
377977
|
-
renderToolResultMessage: renderToolResultMessage5,
|
|
377978
|
-
extractSearchText({ filenames }) {
|
|
377979
|
-
return filenames.join(`
|
|
377980
|
-
`);
|
|
377981
|
-
},
|
|
377982
|
-
async call(input, { abortController, getAppState, globLimits, setAppState }) {
|
|
377983
|
-
if (input.tools && input.tools.length > 0) {
|
|
377984
|
-
setAppState((prev) => ({
|
|
377985
|
-
...prev,
|
|
377986
|
-
toolPermissionContext: {
|
|
377987
|
-
...prev.toolPermissionContext,
|
|
377988
|
-
alwaysAllowRules: {
|
|
377989
|
-
...prev.toolPermissionContext.alwaysAllowRules,
|
|
377990
|
-
command: [
|
|
377991
|
-
...new Set([
|
|
377992
|
-
...prev.toolPermissionContext.alwaysAllowRules.command || [],
|
|
377993
|
-
...input.tools
|
|
377994
|
-
])
|
|
377995
|
-
]
|
|
377996
|
-
}
|
|
377997
|
-
}
|
|
377998
|
-
}));
|
|
377999
|
-
}
|
|
378000
|
-
const start = Date.now();
|
|
378001
|
-
const appState = getAppState();
|
|
378002
|
-
const limit = globLimits?.maxResults ?? 100;
|
|
378003
|
-
const { files: files2, truncated } = await glob(input.pattern, GlobTool.getPath(input), { limit, offset: 0 }, abortController.signal, appState.toolPermissionContext);
|
|
378004
|
-
const filenames = files2.map(toRelativePath);
|
|
378005
|
-
const output = {
|
|
378006
|
-
filenames,
|
|
378007
|
-
durationMs: Date.now() - start,
|
|
378008
|
-
numFiles: filenames.length,
|
|
378009
|
-
truncated
|
|
378010
|
-
};
|
|
378011
|
-
return {
|
|
378012
|
-
data: output
|
|
378013
|
-
};
|
|
378014
|
-
},
|
|
378015
|
-
mapToolResultToToolResultBlockParam(output, toolUseID) {
|
|
378016
|
-
if (output.filenames.length === 0) {
|
|
378017
|
-
return {
|
|
378018
|
-
tool_use_id: toolUseID,
|
|
378019
|
-
type: "tool_result",
|
|
378020
|
-
content: "No files found"
|
|
378021
|
-
};
|
|
378022
|
-
}
|
|
378023
|
-
return {
|
|
378024
|
-
tool_use_id: toolUseID,
|
|
378025
|
-
type: "tool_result",
|
|
378026
|
-
content: [
|
|
378027
|
-
...output.filenames,
|
|
378028
|
-
...output.truncated ? [
|
|
378029
|
-
"(Results are truncated. Consider using a more specific path or pattern.)"
|
|
378030
|
-
] : []
|
|
378031
|
-
].join(`
|
|
378032
|
-
`)
|
|
378033
|
-
};
|
|
378034
|
-
}
|
|
378035
|
-
});
|
|
378036
|
-
});
|
|
378037
|
-
|
|
378038
378042
|
// src/services/teamMemorySync/types.ts
|
|
378039
378043
|
var TeamMemoryContentSchema, TeamMemoryDataSchema, TeamMemoryTooManyEntriesSchema;
|
|
378040
378044
|
var init_types12 = __esm(() => {
|
|
@@ -385518,7 +385522,7 @@ function renderToolUseQueuedMessage() {
|
|
|
385518
385522
|
})
|
|
385519
385523
|
});
|
|
385520
385524
|
}
|
|
385521
|
-
function
|
|
385525
|
+
function renderToolResultMessage5(content, progressMessagesForMessage, {
|
|
385522
385526
|
verbose,
|
|
385523
385527
|
theme: _theme,
|
|
385524
385528
|
tools: _tools,
|
|
@@ -386329,7 +386333,7 @@ For commands that are harder to parse at a glance (piped commands, obscure flags
|
|
|
386329
386333
|
renderToolUseMessage: renderToolUseMessage6,
|
|
386330
386334
|
renderToolUseProgressMessage,
|
|
386331
386335
|
renderToolUseQueuedMessage,
|
|
386332
|
-
renderToolResultMessage:
|
|
386336
|
+
renderToolResultMessage: renderToolResultMessage5,
|
|
386333
386337
|
extractSearchText({
|
|
386334
386338
|
stdout,
|
|
386335
386339
|
stderr
|
|
@@ -393379,6 +393383,31 @@ function resolveAgentTools(agentDefinition, availableTools, isAsync2 = false, is
|
|
|
393379
393383
|
allowedAgentTypes
|
|
393380
393384
|
};
|
|
393381
393385
|
}
|
|
393386
|
+
function agentToolResultSchema() {
|
|
393387
|
+
return _agentToolResultSchemaCache ??= exports_external.object({
|
|
393388
|
+
agentId: exports_external.string(),
|
|
393389
|
+
agentType: exports_external.string().optional(),
|
|
393390
|
+
content: exports_external.array(exports_external.object({ type: exports_external.literal("text"), text: exports_external.string() })),
|
|
393391
|
+
totalToolUseCount: exports_external.number(),
|
|
393392
|
+
totalDurationMs: exports_external.number(),
|
|
393393
|
+
totalTokens: exports_external.number(),
|
|
393394
|
+
usage: exports_external.object({
|
|
393395
|
+
input_tokens: exports_external.number(),
|
|
393396
|
+
output_tokens: exports_external.number(),
|
|
393397
|
+
cache_creation_input_tokens: exports_external.number().nullable(),
|
|
393398
|
+
cache_read_input_tokens: exports_external.number().nullable(),
|
|
393399
|
+
server_tool_use: exports_external.object({
|
|
393400
|
+
web_search_requests: exports_external.number(),
|
|
393401
|
+
web_fetch_requests: exports_external.number()
|
|
393402
|
+
}).nullable(),
|
|
393403
|
+
service_tier: exports_external.enum(["standard", "priority", "batch"]).nullable(),
|
|
393404
|
+
cache_creation: exports_external.object({
|
|
393405
|
+
ephemeral_1h_input_tokens: exports_external.number(),
|
|
393406
|
+
ephemeral_5m_input_tokens: exports_external.number()
|
|
393407
|
+
}).nullable()
|
|
393408
|
+
})
|
|
393409
|
+
});
|
|
393410
|
+
}
|
|
393382
393411
|
function countToolUses(messages) {
|
|
393383
393412
|
let count3 = 0;
|
|
393384
393413
|
for (const m5 of messages) {
|
|
@@ -393659,7 +393688,7 @@ ${finalMessage}`;
|
|
|
393659
393688
|
clearDumpState(agentIdForCleanup);
|
|
393660
393689
|
}
|
|
393661
393690
|
}
|
|
393662
|
-
var
|
|
393691
|
+
var _agentToolResultSchemaCache;
|
|
393663
393692
|
var init_agentToolUtils = __esm(() => {
|
|
393664
393693
|
init_featureFlags();
|
|
393665
393694
|
init_v4();
|
|
@@ -393683,29 +393712,6 @@ var init_agentToolUtils = __esm(() => {
|
|
|
393683
393712
|
init_teammateContext();
|
|
393684
393713
|
init_tokens();
|
|
393685
393714
|
init_constants3();
|
|
393686
|
-
agentToolResultSchema = lazySchema(() => exports_external.object({
|
|
393687
|
-
agentId: exports_external.string(),
|
|
393688
|
-
agentType: exports_external.string().optional(),
|
|
393689
|
-
content: exports_external.array(exports_external.object({ type: exports_external.literal("text"), text: exports_external.string() })),
|
|
393690
|
-
totalToolUseCount: exports_external.number(),
|
|
393691
|
-
totalDurationMs: exports_external.number(),
|
|
393692
|
-
totalTokens: exports_external.number(),
|
|
393693
|
-
usage: exports_external.object({
|
|
393694
|
-
input_tokens: exports_external.number(),
|
|
393695
|
-
output_tokens: exports_external.number(),
|
|
393696
|
-
cache_creation_input_tokens: exports_external.number().nullable(),
|
|
393697
|
-
cache_read_input_tokens: exports_external.number().nullable(),
|
|
393698
|
-
server_tool_use: exports_external.object({
|
|
393699
|
-
web_search_requests: exports_external.number(),
|
|
393700
|
-
web_fetch_requests: exports_external.number()
|
|
393701
|
-
}).nullable(),
|
|
393702
|
-
service_tier: exports_external.enum(["standard", "priority", "batch"]).nullable(),
|
|
393703
|
-
cache_creation: exports_external.object({
|
|
393704
|
-
ephemeral_1h_input_tokens: exports_external.number(),
|
|
393705
|
-
ephemeral_5m_input_tokens: exports_external.number()
|
|
393706
|
-
}).nullable()
|
|
393707
|
-
})
|
|
393708
|
-
}));
|
|
393709
393715
|
});
|
|
393710
393716
|
|
|
393711
393717
|
// src/components/AgentProgressLine.tsx
|
|
@@ -448121,6 +448127,8 @@ var init_use_declared_cursor = __esm(() => {
|
|
|
448121
448127
|
|
|
448122
448128
|
// src/utils/imagePaste.ts
|
|
448123
448129
|
import { randomBytes as randomBytes9 } from "crypto";
|
|
448130
|
+
import { writeFileSync as writeFileSync9 } from "fs";
|
|
448131
|
+
import { tmpdir as tmpdir8 } from "os";
|
|
448124
448132
|
import { basename as basename21, extname as extname12, isAbsolute as isAbsolute20, join as join93 } from "path";
|
|
448125
448133
|
function getClipboardCommands() {
|
|
448126
448134
|
const platform5 = process.platform;
|
|
@@ -448158,8 +448166,21 @@ function getClipboardCommands() {
|
|
|
448158
448166
|
};
|
|
448159
448167
|
}
|
|
448160
448168
|
async function hasImageInClipboard() {
|
|
448169
|
+
const overrideSrc = getClipboardImageSrcOverride();
|
|
448170
|
+
if (overrideSrc && getFsImplementation().existsSync(overrideSrc)) {
|
|
448171
|
+
return true;
|
|
448172
|
+
}
|
|
448161
448173
|
if (process.platform !== "darwin") {
|
|
448162
|
-
|
|
448174
|
+
const { commands: commands7 } = getClipboardCommands();
|
|
448175
|
+
try {
|
|
448176
|
+
const result2 = await execa(commands7.checkImage, {
|
|
448177
|
+
shell: true,
|
|
448178
|
+
reject: false
|
|
448179
|
+
});
|
|
448180
|
+
return result2.exitCode === 0;
|
|
448181
|
+
} catch {
|
|
448182
|
+
return false;
|
|
448183
|
+
}
|
|
448163
448184
|
}
|
|
448164
448185
|
if (feature("NATIVE_CLIPBOARD_IMAGE") && getFeatureValue_CACHED_MAY_BE_STALE("tengu_collage_kaleidoscope", true)) {
|
|
448165
448186
|
try {
|
|
@@ -448271,6 +448292,42 @@ async function getImagePathFromClipboard() {
|
|
|
448271
448292
|
return null;
|
|
448272
448293
|
}
|
|
448273
448294
|
}
|
|
448295
|
+
function getClipboardImageSrcOverride() {
|
|
448296
|
+
const v6 = process.env[CLIPBOARD_IMAGE_SRC_ENV];
|
|
448297
|
+
return v6 && v6.length > 0 ? v6 : undefined;
|
|
448298
|
+
}
|
|
448299
|
+
async function saveClipboardImageToTempFile() {
|
|
448300
|
+
try {
|
|
448301
|
+
const overrideSrc = getClipboardImageSrcOverride();
|
|
448302
|
+
if (overrideSrc && getFsImplementation().existsSync(overrideSrc)) {
|
|
448303
|
+
const buffer2 = getFsImplementation().readFileBytesSync(overrideSrc);
|
|
448304
|
+
const mediaType = detectImageFormatFromBase64(buffer2.toString("base64"));
|
|
448305
|
+
return writeUniqueTempImageFile(buffer2, mediaType);
|
|
448306
|
+
}
|
|
448307
|
+
const image = await getImageFromClipboard();
|
|
448308
|
+
if (!image) {
|
|
448309
|
+
return null;
|
|
448310
|
+
}
|
|
448311
|
+
const buffer = Buffer.from(image.base64, "base64");
|
|
448312
|
+
return writeUniqueTempImageFile(buffer, image.mediaType, image.dimensions);
|
|
448313
|
+
} catch (e4) {
|
|
448314
|
+
logError2(e4);
|
|
448315
|
+
return null;
|
|
448316
|
+
}
|
|
448317
|
+
}
|
|
448318
|
+
function writeUniqueTempImageFile(buffer, mediaType, dimensions) {
|
|
448319
|
+
const baseTmpDir = process.env.CLAUDE_CODE_TMPDIR || (process.platform === "win32" ? process.env.TEMP || "C:\\Temp" : tmpdir8());
|
|
448320
|
+
const ext = mediaType.replace(/^image\//, "").toLowerCase();
|
|
448321
|
+
const safeExt = TEMP_IMAGE_EXT_ALLOW.test(ext) ? ext.replace("jpeg", "jpg") : "png";
|
|
448322
|
+
const name3 = `occ-clipboard-${Date.now()}-${randomBytes9(6).toString("hex")}.${safeExt}`;
|
|
448323
|
+
const filePath = join93(baseTmpDir, name3);
|
|
448324
|
+
writeFileSync9(filePath, buffer);
|
|
448325
|
+
return {
|
|
448326
|
+
path: filePath,
|
|
448327
|
+
mediaType: `image/${safeExt === "jpg" ? "jpeg" : safeExt}`,
|
|
448328
|
+
dimensions
|
|
448329
|
+
};
|
|
448330
|
+
}
|
|
448274
448331
|
function removeOuterQuotes(text2) {
|
|
448275
448332
|
if (text2.startsWith('"') && text2.endsWith('"') || text2.startsWith("'") && text2.endsWith("'")) {
|
|
448276
448333
|
return text2.slice(1, -1);
|
|
@@ -448343,7 +448400,7 @@ async function tryReadImageFromPath(text2) {
|
|
|
448343
448400
|
dimensions: resized.dimensions
|
|
448344
448401
|
};
|
|
448345
448402
|
}
|
|
448346
|
-
var PASTE_THRESHOLD = 800, IMAGE_EXTENSION_REGEX;
|
|
448403
|
+
var PASTE_THRESHOLD = 800, CLIPBOARD_IMAGE_SRC_ENV = "OCC_CLIPBOARD_IMAGE_SRC", TEMP_IMAGE_EXT_ALLOW, IMAGE_EXTENSION_REGEX;
|
|
448347
448404
|
var init_imagePaste = __esm(() => {
|
|
448348
448405
|
init_featureFlags();
|
|
448349
448406
|
init_execa();
|
|
@@ -448355,6 +448412,7 @@ var init_imagePaste = __esm(() => {
|
|
|
448355
448412
|
init_fsOperations();
|
|
448356
448413
|
init_imageResizer();
|
|
448357
448414
|
init_log3();
|
|
448415
|
+
TEMP_IMAGE_EXT_ALLOW = /^(png|jpe?g|gif|webp|bmp)$/i;
|
|
448358
448416
|
IMAGE_EXTENSION_REGEX = /\.(png|jpe?g|gif|webp)$/i;
|
|
448359
448417
|
});
|
|
448360
448418
|
|
|
@@ -451971,7 +452029,7 @@ function renderToolUseErrorMessage7(result, {
|
|
|
451971
452029
|
verbose
|
|
451972
452030
|
});
|
|
451973
452031
|
}
|
|
451974
|
-
function
|
|
452032
|
+
function renderToolResultMessage6({
|
|
451975
452033
|
cell_id,
|
|
451976
452034
|
new_source,
|
|
451977
452035
|
error: error52
|
|
@@ -452137,7 +452195,7 @@ var init_NotebookEditTool = __esm(() => {
|
|
|
452137
452195
|
renderToolUseMessage: renderToolUseMessage7,
|
|
452138
452196
|
renderToolUseRejectedMessage: renderToolUseRejectedMessage3,
|
|
452139
452197
|
renderToolUseErrorMessage: renderToolUseErrorMessage7,
|
|
452140
|
-
renderToolResultMessage:
|
|
452198
|
+
renderToolResultMessage: renderToolResultMessage6,
|
|
452141
452199
|
async validateInput({ notebook_path, cell_type, cell_id, edit_mode = "replace" }, toolUseContext) {
|
|
452142
452200
|
const fullPath = isAbsolute22(notebook_path) ? notebook_path : resolve34(getCwd(), notebook_path);
|
|
452143
452201
|
if (fullPath.startsWith("\\\\") || fullPath.startsWith("//")) {
|
|
@@ -459142,7 +459200,7 @@ __export(exports_teamHelpers, {
|
|
|
459142
459200
|
cleanupSessionTeams: () => cleanupSessionTeams,
|
|
459143
459201
|
addHiddenPaneId: () => addHiddenPaneId
|
|
459144
459202
|
});
|
|
459145
|
-
import { mkdirSync as mkdirSync8, readFileSync as readFileSync21, writeFileSync as
|
|
459203
|
+
import { mkdirSync as mkdirSync8, readFileSync as readFileSync21, writeFileSync as writeFileSync10 } from "fs";
|
|
459146
459204
|
import { mkdir as mkdir25, readFile as readFile33, rm as rm5, writeFile as writeFile25 } from "fs/promises";
|
|
459147
459205
|
import { join as join96 } from "path";
|
|
459148
459206
|
function sanitizeName(name3) {
|
|
@@ -459182,7 +459240,7 @@ async function readTeamFileAsync(teamName) {
|
|
|
459182
459240
|
function writeTeamFile(teamName, teamFile) {
|
|
459183
459241
|
const teamDir = getTeamDir(teamName);
|
|
459184
459242
|
mkdirSync8(teamDir, { recursive: true });
|
|
459185
|
-
|
|
459243
|
+
writeFileSync10(getTeamFilePath(teamName), jsonStringify(teamFile, null, 2));
|
|
459186
459244
|
}
|
|
459187
459245
|
async function writeTeamFileAsync(teamName, teamFile) {
|
|
459188
459246
|
const teamDir = getTeamDir(teamName);
|
|
@@ -471915,7 +471973,7 @@ function _temp39(pm_0) {
|
|
|
471915
471973
|
function _temp210(pm) {
|
|
471916
471974
|
return hasProgressMessage(pm.data);
|
|
471917
471975
|
}
|
|
471918
|
-
function
|
|
471976
|
+
function renderToolResultMessage7(data, progressMessagesForMessage, {
|
|
471919
471977
|
tools,
|
|
471920
471978
|
verbose,
|
|
471921
471979
|
theme,
|
|
@@ -476838,11 +476896,11 @@ var init_filesApi = __esm(() => {
|
|
|
476838
476896
|
|
|
476839
476897
|
// src/utils/tempfile.ts
|
|
476840
476898
|
import { createHash as createHash23, randomUUID as randomUUID19 } from "crypto";
|
|
476841
|
-
import { tmpdir as
|
|
476899
|
+
import { tmpdir as tmpdir9 } from "os";
|
|
476842
476900
|
import { join as join98 } from "path";
|
|
476843
476901
|
function generateTempFilePath(prefix = "claude-prompt", extension = ".md", options) {
|
|
476844
476902
|
const id = options?.contentHash ? createHash23("sha256").update(options.contentHash).digest("hex").slice(0, 16) : randomUUID19();
|
|
476845
|
-
return join98(
|
|
476903
|
+
return join98(tmpdir9(), `${prefix}-${id}${extension}`);
|
|
476846
476904
|
}
|
|
476847
476905
|
var init_tempfile = () => {};
|
|
476848
476906
|
|
|
@@ -480588,7 +480646,7 @@ duration_ms: ${data.totalDurationMs}</usage>`
|
|
|
480588
480646
|
}
|
|
480589
480647
|
throw new Error(`Unexpected agent tool result status: ${data.status}`);
|
|
480590
480648
|
},
|
|
480591
|
-
renderToolResultMessage:
|
|
480649
|
+
renderToolResultMessage: renderToolResultMessage7,
|
|
480592
480650
|
renderToolUseMessage: renderToolUseMessage9,
|
|
480593
480651
|
renderToolUseTag: renderToolUseTag2,
|
|
480594
480652
|
renderToolUseProgressMessage: renderToolUseProgressMessage3,
|
|
@@ -480616,7 +480674,7 @@ function getToolUseIDFromParentMessage(parentMessage, toolName) {
|
|
|
480616
480674
|
}
|
|
480617
480675
|
|
|
480618
480676
|
// src/tools/SkillTool/UI.tsx
|
|
480619
|
-
function
|
|
480677
|
+
function renderToolResultMessage8(output) {
|
|
480620
480678
|
if ("status" in output && output.status === "forked") {
|
|
480621
480679
|
return /* @__PURE__ */ jsx_runtime134.jsx(MessageResponse, {
|
|
480622
480680
|
height: 1,
|
|
@@ -481404,7 +481462,7 @@ ${result.result}`
|
|
|
481404
481462
|
content: `Launching skill: ${result.commandName}`
|
|
481405
481463
|
};
|
|
481406
481464
|
},
|
|
481407
|
-
renderToolResultMessage:
|
|
481465
|
+
renderToolResultMessage: renderToolResultMessage8,
|
|
481408
481466
|
renderToolUseMessage: renderToolUseMessage10,
|
|
481409
481467
|
renderToolUseProgressMessage: renderToolUseProgressMessage4,
|
|
481410
481468
|
renderToolUseRejectedMessage: renderToolUseRejectedMessage5,
|
|
@@ -481595,7 +481653,7 @@ function renderToolUseProgressMessage5() {
|
|
|
481595
481653
|
})
|
|
481596
481654
|
});
|
|
481597
481655
|
}
|
|
481598
|
-
function
|
|
481656
|
+
function renderToolResultMessage9({
|
|
481599
481657
|
bytes,
|
|
481600
481658
|
code,
|
|
481601
481659
|
codeText,
|
|
@@ -498862,7 +498920,7 @@ ${DESCRIPTION5}`;
|
|
|
498862
498920
|
},
|
|
498863
498921
|
renderToolUseMessage: renderToolUseMessage11,
|
|
498864
498922
|
renderToolUseProgressMessage: renderToolUseProgressMessage5,
|
|
498865
|
-
renderToolResultMessage:
|
|
498923
|
+
renderToolResultMessage: renderToolResultMessage9,
|
|
498866
498924
|
async call({ url: url3, prompt }, { abortController, options: { isNonInteractiveSession } }) {
|
|
498867
498925
|
const start = Date.now();
|
|
498868
498926
|
const response3 = await getURLMarkdownContent(url3, abortController);
|
|
@@ -572699,7 +572757,7 @@ var init_PipeTransport = __esm(() => {
|
|
|
572699
572757
|
|
|
572700
572758
|
// node_modules/.bun/puppeteer-core@24.43.1/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserLauncher.js
|
|
572701
572759
|
import { existsSync as existsSync14 } from "fs";
|
|
572702
|
-
import { tmpdir as
|
|
572760
|
+
import { tmpdir as tmpdir10 } from "os";
|
|
572703
572761
|
import { join as join102 } from "path";
|
|
572704
572762
|
|
|
572705
572763
|
class BrowserLauncher {
|
|
@@ -572898,7 +572956,7 @@ class BrowserLauncher {
|
|
|
572898
572956
|
});
|
|
572899
572957
|
}
|
|
572900
572958
|
getProfilePath() {
|
|
572901
|
-
return join102(this.puppeteer.configuration.temporaryDirectory ??
|
|
572959
|
+
return join102(this.puppeteer.configuration.temporaryDirectory ?? tmpdir10(), `puppeteer_dev_${this.browser}_profile-`);
|
|
572902
572960
|
}
|
|
572903
572961
|
resolveExecutablePath(headless, validatePath2 = true) {
|
|
572904
572962
|
let executablePath = this.puppeteer.configuration.executablePath;
|
|
@@ -574857,7 +574915,7 @@ function truncateCommand(command5) {
|
|
|
574857
574915
|
}
|
|
574858
574916
|
return truncated.trim();
|
|
574859
574917
|
}
|
|
574860
|
-
function
|
|
574918
|
+
function renderToolResultMessage10(output2, _progressMessagesForMessage, {
|
|
574861
574919
|
verbose
|
|
574862
574920
|
}) {
|
|
574863
574921
|
if (false) {}
|
|
@@ -574960,7 +575018,7 @@ var init_TaskStopTool = __esm(() => {
|
|
|
574960
575018
|
};
|
|
574961
575019
|
},
|
|
574962
575020
|
renderToolUseMessage: renderToolUseMessage12,
|
|
574963
|
-
renderToolResultMessage:
|
|
575021
|
+
renderToolResultMessage: renderToolResultMessage10,
|
|
574964
575022
|
async call({ task_id, shell_id }, { getAppState, setAppState, abortController }) {
|
|
574965
575023
|
const id = task_id ?? shell_id;
|
|
574966
575024
|
if (!id) {
|
|
@@ -575181,7 +575239,7 @@ var init_attachments = __esm(() => {
|
|
|
575181
575239
|
function renderToolUseMessage13() {
|
|
575182
575240
|
return "";
|
|
575183
575241
|
}
|
|
575184
|
-
function
|
|
575242
|
+
function renderToolResultMessage11(output2, _progressMessages, options) {
|
|
575185
575243
|
const hasAttachments = (output2.attachments?.length ?? 0) > 0;
|
|
575186
575244
|
if (!output2.message && !hasAttachments) {
|
|
575187
575245
|
return null;
|
|
@@ -575429,7 +575487,7 @@ var init_BriefTool = __esm(() => {
|
|
|
575429
575487
|
};
|
|
575430
575488
|
},
|
|
575431
575489
|
renderToolUseMessage: renderToolUseMessage13,
|
|
575432
|
-
renderToolResultMessage:
|
|
575490
|
+
renderToolResultMessage: renderToolResultMessage11,
|
|
575433
575491
|
async call({ message, attachments, status }, context7) {
|
|
575434
575492
|
const sentAt = new Date().toISOString();
|
|
575435
575493
|
logEvent2("tengu_brief_send", {
|
|
@@ -576240,7 +576298,7 @@ function renderToolUseProgressMessage6(progressMessages) {
|
|
|
576240
576298
|
return null;
|
|
576241
576299
|
}
|
|
576242
576300
|
}
|
|
576243
|
-
function
|
|
576301
|
+
function renderToolResultMessage12(output2) {
|
|
576244
576302
|
const {
|
|
576245
576303
|
searchCount
|
|
576246
576304
|
} = getSearchSummary(output2.results ?? []);
|
|
@@ -576432,7 +576490,7 @@ var init_WebSearchTool = __esm(() => {
|
|
|
576432
576490
|
},
|
|
576433
576491
|
renderToolUseMessage: renderToolUseMessage14,
|
|
576434
576492
|
renderToolUseProgressMessage: renderToolUseProgressMessage6,
|
|
576435
|
-
renderToolResultMessage:
|
|
576493
|
+
renderToolResultMessage: renderToolResultMessage12,
|
|
576436
576494
|
extractSearchText() {
|
|
576437
576495
|
return "";
|
|
576438
576496
|
},
|
|
@@ -576649,7 +576707,7 @@ Ensure your plan is complete and unambiguous:
|
|
|
576649
576707
|
function renderToolUseMessage15() {
|
|
576650
576708
|
return null;
|
|
576651
576709
|
}
|
|
576652
|
-
function
|
|
576710
|
+
function renderToolResultMessage13(output2, _progressMessagesForMessage, {
|
|
576653
576711
|
theme: _theme
|
|
576654
576712
|
}) {
|
|
576655
576713
|
const {
|
|
@@ -576940,7 +576998,7 @@ var init_ExitPlanModeV2Tool = __esm(() => {
|
|
|
576940
576998
|
};
|
|
576941
576999
|
},
|
|
576942
577000
|
renderToolUseMessage: renderToolUseMessage15,
|
|
576943
|
-
renderToolResultMessage:
|
|
577001
|
+
renderToolResultMessage: renderToolResultMessage13,
|
|
576944
577002
|
renderToolUseRejectedMessage: renderToolUseRejectedMessage6,
|
|
576945
577003
|
async call(input2, context7) {
|
|
576946
577004
|
const isAgent = !!context7.agentId;
|
|
@@ -578192,7 +578250,7 @@ function renderToolUseErrorMessage10(result, {
|
|
|
578192
578250
|
verbose
|
|
578193
578251
|
});
|
|
578194
578252
|
}
|
|
578195
|
-
function
|
|
578253
|
+
function renderToolResultMessage14(output2, _progressMessages, {
|
|
578196
578254
|
verbose
|
|
578197
578255
|
}) {
|
|
578198
578256
|
if (output2.resultCount !== undefined && output2.fileCount !== undefined) {
|
|
@@ -578661,7 +578719,7 @@ var init_LSPTool = __esm(() => {
|
|
|
578661
578719
|
},
|
|
578662
578720
|
renderToolUseMessage: renderToolUseMessage16,
|
|
578663
578721
|
renderToolUseErrorMessage: renderToolUseErrorMessage10,
|
|
578664
|
-
renderToolResultMessage:
|
|
578722
|
+
renderToolResultMessage: renderToolResultMessage14,
|
|
578665
578723
|
async call(input2, _context) {
|
|
578666
578724
|
const absolutePath = expandPath(input2.filePath);
|
|
578667
578725
|
const cwd2 = getCwd();
|
|
@@ -578811,7 +578869,7 @@ function renderToolUseMessage17(input2) {
|
|
|
578811
578869
|
function userFacingName7() {
|
|
578812
578870
|
return "readMcpResource";
|
|
578813
578871
|
}
|
|
578814
|
-
function
|
|
578872
|
+
function renderToolResultMessage15(output2, _progressMessagesForMessage, {
|
|
578815
578873
|
verbose
|
|
578816
578874
|
}) {
|
|
578817
578875
|
if (!output2 || !output2.contents || output2.contents.length === 0) {
|
|
@@ -578938,7 +578996,7 @@ var init_ReadMcpResourceTool = __esm(() => {
|
|
|
578938
578996
|
},
|
|
578939
578997
|
renderToolUseMessage: renderToolUseMessage17,
|
|
578940
578998
|
userFacingName: userFacingName7,
|
|
578941
|
-
renderToolResultMessage:
|
|
578999
|
+
renderToolResultMessage: renderToolResultMessage15,
|
|
578942
579000
|
isResultTruncated(output2) {
|
|
578943
579001
|
return isOutputLineTruncated(jsonStringify(output2));
|
|
578944
579002
|
},
|
|
@@ -578977,7 +579035,7 @@ function renderToolUseMessage18(input2) {
|
|
|
578977
579035
|
function userFacingName8() {
|
|
578978
579036
|
return "readMcpResourceDir";
|
|
578979
579037
|
}
|
|
578980
|
-
function
|
|
579038
|
+
function renderToolResultMessage16(output2, _progressMessagesForMessage, { verbose }) {
|
|
578981
579039
|
if (output2?.error) {
|
|
578982
579040
|
return /* @__PURE__ */ jsx_runtime145.jsx(OutputLine, {
|
|
578983
579041
|
content: output2.error,
|
|
@@ -579135,7 +579193,7 @@ var init_ReadMcpResourceDirTool = __esm(() => {
|
|
|
579135
579193
|
},
|
|
579136
579194
|
renderToolUseMessage: renderToolUseMessage18,
|
|
579137
579195
|
userFacingName: userFacingName8,
|
|
579138
|
-
renderToolResultMessage:
|
|
579196
|
+
renderToolResultMessage: renderToolResultMessage16,
|
|
579139
579197
|
isResultTruncated(output2) {
|
|
579140
579198
|
return isOutputLineTruncated(jsonStringify(output2));
|
|
579141
579199
|
},
|
|
@@ -579362,7 +579420,7 @@ In plan mode, you'll:
|
|
|
579362
579420
|
function renderToolUseMessage19() {
|
|
579363
579421
|
return null;
|
|
579364
579422
|
}
|
|
579365
|
-
function
|
|
579423
|
+
function renderToolResultMessage17(_output, _progressMessagesForMessage, _options) {
|
|
579366
579424
|
return /* @__PURE__ */ jsx_runtime146.jsxs(ThemedBox_default, {
|
|
579367
579425
|
flexDirection: "column",
|
|
579368
579426
|
marginTop: 1,
|
|
@@ -579461,7 +579519,7 @@ var init_EnterPlanModeTool = __esm(() => {
|
|
|
579461
579519
|
return true;
|
|
579462
579520
|
},
|
|
579463
579521
|
renderToolUseMessage: renderToolUseMessage19,
|
|
579464
|
-
renderToolResultMessage:
|
|
579522
|
+
renderToolResultMessage: renderToolResultMessage17,
|
|
579465
579523
|
renderToolUseRejectedMessage: renderToolUseRejectedMessage7,
|
|
579466
579524
|
async call(_input, context7) {
|
|
579467
579525
|
if (context7.agentId) {
|
|
@@ -579572,7 +579630,7 @@ function getEnterWorktreeToolPrompt() {
|
|
|
579572
579630
|
function renderToolUseMessage20() {
|
|
579573
579631
|
return "Creating worktree\u2026";
|
|
579574
579632
|
}
|
|
579575
|
-
function
|
|
579633
|
+
function renderToolResultMessage18(output2, _progressMessagesForMessage, _options) {
|
|
579576
579634
|
return /* @__PURE__ */ jsx_runtime147.jsxs(ThemedBox_default, {
|
|
579577
579635
|
flexDirection: "column",
|
|
579578
579636
|
children: [
|
|
@@ -579765,7 +579823,7 @@ var init_EnterWorktreeTool = __esm(() => {
|
|
|
579765
579823
|
return input2.name ?? "";
|
|
579766
579824
|
},
|
|
579767
579825
|
renderToolUseMessage: renderToolUseMessage20,
|
|
579768
|
-
renderToolResultMessage:
|
|
579826
|
+
renderToolResultMessage: renderToolResultMessage18,
|
|
579769
579827
|
async call(input2) {
|
|
579770
579828
|
if (getCurrentWorktreeSession() && !input2.path) {
|
|
579771
579829
|
throw new Error("Already in a worktree session. Pass `path` to switch into another existing worktree, or use ExitWorktree to leave this one before creating a new worktree.");
|
|
@@ -579847,7 +579905,7 @@ If called outside an EnterWorktree session, the tool is a **no-op**: it reports
|
|
|
579847
579905
|
function renderToolUseMessage21() {
|
|
579848
579906
|
return "Exiting worktree\u2026";
|
|
579849
579907
|
}
|
|
579850
|
-
function
|
|
579908
|
+
function renderToolResultMessage19(output2, _progressMessagesForMessage, _options) {
|
|
579851
579909
|
const actionLabel = output2.action === "keep" ? "Kept worktree" : "Removed worktree";
|
|
579852
579910
|
return /* @__PURE__ */ jsx_runtime148.jsxs(ThemedBox_default, {
|
|
579853
579911
|
flexDirection: "column",
|
|
@@ -580017,7 +580075,7 @@ var init_ExitWorktreeTool = __esm(() => {
|
|
|
580017
580075
|
return { result: true };
|
|
580018
580076
|
},
|
|
580019
580077
|
renderToolUseMessage: renderToolUseMessage21,
|
|
580020
|
-
renderToolResultMessage:
|
|
580078
|
+
renderToolResultMessage: renderToolResultMessage19,
|
|
580021
580079
|
async call(input2) {
|
|
580022
580080
|
const session = getCurrentWorktreeSession();
|
|
580023
580081
|
if (!session) {
|
|
@@ -581077,7 +581135,7 @@ function renderToolUseMessage22(input2) {
|
|
|
581077
581135
|
]
|
|
581078
581136
|
});
|
|
581079
581137
|
}
|
|
581080
|
-
function
|
|
581138
|
+
function renderToolResultMessage20(content) {
|
|
581081
581139
|
if (!content.success) {
|
|
581082
581140
|
return /* @__PURE__ */ jsx_runtime149.jsx(MessageResponse, {
|
|
581083
581141
|
children: /* @__PURE__ */ jsx_runtime149.jsxs(ThemedText, {
|
|
@@ -581925,7 +581983,7 @@ var init_ConfigTool = __esm(() => {
|
|
|
581925
581983
|
};
|
|
581926
581984
|
},
|
|
581927
581985
|
renderToolUseMessage: renderToolUseMessage22,
|
|
581928
|
-
renderToolResultMessage:
|
|
581986
|
+
renderToolResultMessage: renderToolResultMessage20,
|
|
581929
581987
|
renderToolUseRejectedMessage: renderToolUseRejectedMessage8,
|
|
581930
581988
|
async call({ setting, value }, context7) {
|
|
581931
581989
|
if (feature("VOICE_MODE") && setting === "voiceEnabled") {
|
|
@@ -583146,7 +583204,7 @@ The response is the raw JSON from the API.`;
|
|
|
583146
583204
|
function renderToolUseMessage23(input2) {
|
|
583147
583205
|
return `${input2.action ?? ""}${input2.trigger_id ? ` ${input2.trigger_id}` : ""}`;
|
|
583148
583206
|
}
|
|
583149
|
-
function
|
|
583207
|
+
function renderToolResultMessage21(output2) {
|
|
583150
583208
|
const lines2 = countCharInString(output2.json, `
|
|
583151
583209
|
`) + 1;
|
|
583152
583210
|
return /* @__PURE__ */ jsx_runtime150.jsx(MessageResponse, {
|
|
@@ -583312,7 +583370,7 @@ ${output2.json}`
|
|
|
583312
583370
|
};
|
|
583313
583371
|
},
|
|
583314
583372
|
renderToolUseMessage: renderToolUseMessage23,
|
|
583315
|
-
renderToolResultMessage:
|
|
583373
|
+
renderToolResultMessage: renderToolResultMessage21
|
|
583316
583374
|
});
|
|
583317
583375
|
});
|
|
583318
583376
|
|
|
@@ -583948,7 +584006,7 @@ function renderToolUseMessage24(input2) {
|
|
|
583948
584006
|
}
|
|
583949
584007
|
return null;
|
|
583950
584008
|
}
|
|
583951
|
-
function
|
|
584009
|
+
function renderToolResultMessage22(content, _progressMessages, {
|
|
583952
584010
|
verbose
|
|
583953
584011
|
}) {
|
|
583954
584012
|
const result = typeof content === "string" ? jsonParse(content) : content;
|
|
@@ -584603,7 +584661,7 @@ var init_SendMessageTool = __esm(() => {
|
|
|
584603
584661
|
}
|
|
584604
584662
|
},
|
|
584605
584663
|
renderToolUseMessage: renderToolUseMessage24,
|
|
584606
|
-
renderToolResultMessage:
|
|
584664
|
+
renderToolResultMessage: renderToolResultMessage22
|
|
584607
584665
|
});
|
|
584608
584666
|
});
|
|
584609
584667
|
|
|
@@ -585964,7 +586022,7 @@ var init_WorkflowProgressTree = __esm(() => {
|
|
|
585964
586022
|
});
|
|
585965
586023
|
|
|
585966
586024
|
// src/utils/wfProgress.ts
|
|
585967
|
-
import { existsSync as existsSync17, mkdirSync as mkdirSync9, readFileSync as readFileSync27, readdirSync as readdirSync9, unlinkSync as unlinkSync4, writeFileSync as
|
|
586025
|
+
import { existsSync as existsSync17, mkdirSync as mkdirSync9, readFileSync as readFileSync27, readdirSync as readdirSync9, unlinkSync as unlinkSync4, writeFileSync as writeFileSync11, renameSync as renameSync3 } from "fs";
|
|
585968
586026
|
import { join as join109 } from "path";
|
|
585969
586027
|
function getWfProgressDir() {
|
|
585970
586028
|
return join109(getClaudeConfigHomeDir(), "wf-progress");
|
|
@@ -585980,7 +586038,7 @@ function writeWorkflowProgress(runId, data) {
|
|
|
585980
586038
|
};
|
|
585981
586039
|
const target = join109(dir, `${runId}.json`);
|
|
585982
586040
|
const tmp = join109(dir, `${runId}.json.tmp`);
|
|
585983
|
-
|
|
586041
|
+
writeFileSync11(tmp, JSON.stringify(payload), { encoding: "utf-8" });
|
|
585984
586042
|
renameSync3(tmp, target);
|
|
585985
586043
|
} catch {}
|
|
585986
586044
|
}
|
|
@@ -591983,7 +592041,7 @@ function renderToolUseQueuedMessage3() {
|
|
|
591983
592041
|
})
|
|
591984
592042
|
});
|
|
591985
592043
|
}
|
|
591986
|
-
function
|
|
592044
|
+
function renderToolResultMessage23(content, progressMessagesForMessage, {
|
|
591987
592045
|
verbose,
|
|
591988
592046
|
theme: _theme,
|
|
591989
592047
|
tools: _tools,
|
|
@@ -592582,7 +592640,7 @@ var init_PowerShellTool = __esm(() => {
|
|
|
592582
592640
|
renderToolUseMessage: renderToolUseMessage25,
|
|
592583
592641
|
renderToolUseProgressMessage: renderToolUseProgressMessage7,
|
|
592584
592642
|
renderToolUseQueuedMessage: renderToolUseQueuedMessage3,
|
|
592585
|
-
renderToolResultMessage:
|
|
592643
|
+
renderToolResultMessage: renderToolResultMessage23,
|
|
592586
592644
|
renderToolUseErrorMessage: renderToolUseErrorMessage11,
|
|
592587
592645
|
mapToolResultToToolResultBlockParam({
|
|
592588
592646
|
interrupted,
|
|
@@ -596274,7 +596332,7 @@ __export(exports_src3, {
|
|
|
596274
596332
|
ComputerUseAPI: () => ComputerUseAPI
|
|
596275
596333
|
});
|
|
596276
596334
|
import { readFileSync as readFileSync28, unlinkSync as unlinkSync5 } from "fs";
|
|
596277
|
-
import { tmpdir as
|
|
596335
|
+
import { tmpdir as tmpdir11 } from "os";
|
|
596278
596336
|
import { join as join112 } from "path";
|
|
596279
596337
|
function jxaSync(script) {
|
|
596280
596338
|
const result = Bun.spawnSync({
|
|
@@ -596303,7 +596361,7 @@ async function jxa(script) {
|
|
|
596303
596361
|
return text2.trim();
|
|
596304
596362
|
}
|
|
596305
596363
|
async function captureScreenToBase64(args) {
|
|
596306
|
-
const tmpFile = join112(
|
|
596364
|
+
const tmpFile = join112(tmpdir11(), `cu-screenshot-${Date.now()}.png`);
|
|
596307
596365
|
const proc = Bun.spawn(["screencapture", ...args, tmpFile], {
|
|
596308
596366
|
stdout: "pipe",
|
|
596309
596367
|
stderr: "pipe"
|
|
@@ -608924,7 +608982,7 @@ import {
|
|
|
608924
608982
|
stat as stat36,
|
|
608925
608983
|
writeFile as writeFile36
|
|
608926
608984
|
} from "fs/promises";
|
|
608927
|
-
import { tmpdir as
|
|
608985
|
+
import { tmpdir as tmpdir12 } from "os";
|
|
608928
608986
|
import { basename as basename35, dirname as dirname50, join as join118 } from "path";
|
|
608929
608987
|
function isPluginZipCacheEnabled() {
|
|
608930
608988
|
return isEnvTruthy(process.env.CLAUDE_CODE_PLUGIN_USE_ZIP_CACHE);
|
|
@@ -608964,7 +609022,7 @@ async function getSessionPluginCachePath() {
|
|
|
608964
609022
|
if (!sessionPluginCachePromise) {
|
|
608965
609023
|
sessionPluginCachePromise = (async () => {
|
|
608966
609024
|
const suffix = randomBytes10(8).toString("hex");
|
|
608967
|
-
const dir = join118(
|
|
609025
|
+
const dir = join118(tmpdir12(), `claude-plugin-session-${suffix}`);
|
|
608968
609026
|
await getFsImplementation().mkdir(dir);
|
|
608969
609027
|
sessionPluginCachePath = dir;
|
|
608970
609028
|
logForDebugging(`Created session plugin cache at ${dir}`);
|
|
@@ -617610,7 +617668,7 @@ Parameters:
|
|
|
617610
617668
|
function renderToolUseMessage26(input2) {
|
|
617611
617669
|
return input2.server ? `List MCP resources from server "${input2.server}"` : `List all MCP resources`;
|
|
617612
617670
|
}
|
|
617613
|
-
function
|
|
617671
|
+
function renderToolResultMessage24(output2, _progressMessagesForMessage, {
|
|
617614
617672
|
verbose
|
|
617615
617673
|
}) {
|
|
617616
617674
|
if (!output2 || output2.length === 0) {
|
|
@@ -617707,7 +617765,7 @@ var init_ListMcpResourcesTool = __esm(() => {
|
|
|
617707
617765
|
},
|
|
617708
617766
|
renderToolUseMessage: renderToolUseMessage26,
|
|
617709
617767
|
userFacingName: () => "listMcpResources",
|
|
617710
|
-
renderToolResultMessage:
|
|
617768
|
+
renderToolResultMessage: renderToolResultMessage24,
|
|
617711
617769
|
isResultTruncated(output2) {
|
|
617712
617770
|
return isOutputLineTruncated(jsonStringify(output2));
|
|
617713
617771
|
},
|
|
@@ -618020,7 +618078,7 @@ function renderToolUseProgressMessage8(progressMessagesForMessage) {
|
|
|
618020
618078
|
})
|
|
618021
618079
|
});
|
|
618022
618080
|
}
|
|
618023
|
-
function
|
|
618081
|
+
function renderToolResultMessage25(output2, _progressMessagesForMessage, {
|
|
618024
618082
|
verbose,
|
|
618025
618083
|
input: input2
|
|
618026
618084
|
}) {
|
|
@@ -618423,7 +618481,7 @@ var init_MCPTool = __esm(() => {
|
|
|
618423
618481
|
renderToolUseMessage: renderToolUseMessage27,
|
|
618424
618482
|
userFacingName: () => "mcp",
|
|
618425
618483
|
renderToolUseProgressMessage: renderToolUseProgressMessage8,
|
|
618426
|
-
renderToolResultMessage:
|
|
618484
|
+
renderToolResultMessage: renderToolResultMessage25,
|
|
618427
618485
|
isResultTruncated(output2) {
|
|
618428
618486
|
return isOutputLineTruncated(output2);
|
|
618429
618487
|
},
|
|
@@ -623007,7 +623065,7 @@ function renderChromeViewTabLink(input2) {
|
|
|
623007
623065
|
}
|
|
623008
623066
|
function renderChromeToolResultMessage(output2, toolName, verbose) {
|
|
623009
623067
|
if (verbose) {
|
|
623010
|
-
return
|
|
623068
|
+
return renderToolResultMessage25(output2, [], {
|
|
623011
623069
|
verbose
|
|
623012
623070
|
});
|
|
623013
623071
|
}
|
|
@@ -637162,7 +637220,7 @@ __export(exports_workerRegistry, {
|
|
|
637162
637220
|
DEFAULT_PREWARM_PER_SWEEP: () => DEFAULT_PREWARM_PER_SWEEP
|
|
637163
637221
|
});
|
|
637164
637222
|
import { spawn as spawn13 } from "child_process";
|
|
637165
|
-
import { existsSync as existsSync19, readFileSync as readFileSync29, writeFileSync as
|
|
637223
|
+
import { existsSync as existsSync19, readFileSync as readFileSync29, writeFileSync as writeFileSync12 } from "fs";
|
|
637166
637224
|
import { join as join135 } from "path";
|
|
637167
637225
|
function getDaemonJsonPath() {
|
|
637168
637226
|
return join135(getClaudeConfigHomeDir(), "daemon.json");
|
|
@@ -637232,12 +637290,12 @@ function writeDaemonStatus() {
|
|
|
637232
637290
|
id: r4.id,
|
|
637233
637291
|
exitCode: r4.exitCode
|
|
637234
637292
|
}));
|
|
637235
|
-
|
|
637293
|
+
writeFileSync12(getDaemonStatusPath(), JSON.stringify(snapshot2), { encoding: "utf-8" });
|
|
637236
637294
|
} catch {}
|
|
637237
637295
|
}
|
|
637238
637296
|
function writeDaemonJson(config7) {
|
|
637239
637297
|
try {
|
|
637240
|
-
|
|
637298
|
+
writeFileSync12(getDaemonJsonPath(), JSON.stringify(config7, null, 2), {
|
|
637241
637299
|
encoding: "utf-8"
|
|
637242
637300
|
});
|
|
637243
637301
|
} catch {}
|
|
@@ -637527,7 +637585,7 @@ var init_respawn = __esm(() => {
|
|
|
637527
637585
|
});
|
|
637528
637586
|
|
|
637529
637587
|
// src/daemon/install.ts
|
|
637530
|
-
import { existsSync as existsSync20, mkdirSync as mkdirSync10, writeFileSync as
|
|
637588
|
+
import { existsSync as existsSync20, mkdirSync as mkdirSync10, writeFileSync as writeFileSync13, unlinkSync as unlinkSync6 } from "fs";
|
|
637531
637589
|
import { homedir as homedir35 } from "os";
|
|
637532
637590
|
import { join as join136 } from "path";
|
|
637533
637591
|
import { spawnSync as spawnSync9 } from "child_process";
|
|
@@ -637588,7 +637646,7 @@ function installLaunchd() {
|
|
|
637588
637646
|
</dict>
|
|
637589
637647
|
</plist>
|
|
637590
637648
|
`;
|
|
637591
|
-
|
|
637649
|
+
writeFileSync13(plistPath, plist, { encoding: "utf-8" });
|
|
637592
637650
|
spawnSync9("launchctl", ["unload", plistPath], { stdio: "ignore" });
|
|
637593
637651
|
const res = spawnSync9("launchctl", ["load", plistPath], { encoding: "utf-8" });
|
|
637594
637652
|
logEvent2("daemon_install_launchd", { ok: res.status === 0 });
|
|
@@ -637612,7 +637670,7 @@ StandardError=append:${join136(homedir35(), ".claude", "daemon.log")}
|
|
|
637612
637670
|
[Install]
|
|
637613
637671
|
WantedBy=default.target
|
|
637614
637672
|
`;
|
|
637615
|
-
|
|
637673
|
+
writeFileSync13(unitPath, unit, { encoding: "utf-8" });
|
|
637616
637674
|
spawnSync9("systemctl", ["--user", "daemon-reload"], { stdio: "ignore" });
|
|
637617
637675
|
spawnSync9("systemctl", ["--user", "enable", "claude-daemon.service"], { stdio: "ignore" });
|
|
637618
637676
|
spawnSync9("loginctl", ["enable-linger", process.env.USER ?? "root"], {
|
|
@@ -637653,7 +637711,7 @@ var init_install2 = __esm(() => {
|
|
|
637653
637711
|
import { createServer as createServer7 } from "http";
|
|
637654
637712
|
import { randomBytes as randomBytes16 } from "crypto";
|
|
637655
637713
|
import { join as join137 } from "path";
|
|
637656
|
-
import { existsSync as existsSync21, readFileSync as readFileSync30, writeFileSync as
|
|
637714
|
+
import { existsSync as existsSync21, readFileSync as readFileSync30, writeFileSync as writeFileSync14, unlinkSync as unlinkSync7 } from "fs";
|
|
637657
637715
|
function getRemoteControlSocketPath() {
|
|
637658
637716
|
return join137(getClaudeConfigHomeDir(), REMOTE_SOCKET_NAME);
|
|
637659
637717
|
}
|
|
@@ -637689,7 +637747,7 @@ function loadPromptMirror() {
|
|
|
637689
637747
|
}
|
|
637690
637748
|
function savePromptMirror() {
|
|
637691
637749
|
try {
|
|
637692
|
-
|
|
637750
|
+
writeFileSync14(getRemoteControlPromptsPath(), JSON.stringify(promptQueue), {
|
|
637693
637751
|
encoding: "utf-8"
|
|
637694
637752
|
});
|
|
637695
637753
|
} catch {}
|
|
@@ -637723,7 +637781,7 @@ function loadChannelMirror() {
|
|
|
637723
637781
|
}
|
|
637724
637782
|
function saveChannelMirror() {
|
|
637725
637783
|
try {
|
|
637726
|
-
|
|
637784
|
+
writeFileSync14(getRemoteControlChannelPath(), activeChannel ? JSON.stringify(activeChannel) : "null", { encoding: "utf-8" });
|
|
637727
637785
|
} catch {}
|
|
637728
637786
|
}
|
|
637729
637787
|
function getActiveChannel() {
|
|
@@ -641052,7 +641110,7 @@ __export(exports_copy, {
|
|
|
641052
641110
|
call: () => call17
|
|
641053
641111
|
});
|
|
641054
641112
|
import { mkdir as mkdir41, writeFile as writeFile45 } from "fs/promises";
|
|
641055
|
-
import { tmpdir as
|
|
641113
|
+
import { tmpdir as tmpdir13 } from "os";
|
|
641056
641114
|
import { join as join141 } from "path";
|
|
641057
641115
|
function extractCodeBlocks(markdown) {
|
|
641058
641116
|
const tokens = g4.lexer(stripPromptXMLTags(markdown));
|
|
@@ -641447,7 +641505,7 @@ var init_copy = __esm(() => {
|
|
|
641447
641505
|
import_compiler_runtime128 = __toESM(require_compiler_runtime(), 1);
|
|
641448
641506
|
import_react99 = __toESM(require_react(), 1);
|
|
641449
641507
|
jsx_runtime175 = __toESM(require_jsx_runtime(), 1);
|
|
641450
|
-
COPY_DIR = join141(
|
|
641508
|
+
COPY_DIR = join141(tmpdir13(), "claude");
|
|
641451
641509
|
});
|
|
641452
641510
|
|
|
641453
641511
|
// src/commands/copy/index.ts
|
|
@@ -705507,7 +705565,7 @@ var init_rewind = __esm(() => {
|
|
|
705507
705565
|
});
|
|
705508
705566
|
|
|
705509
705567
|
// src/utils/heapDumpService.ts
|
|
705510
|
-
import { createWriteStream as createWriteStream5, writeFileSync as
|
|
705568
|
+
import { createWriteStream as createWriteStream5, writeFileSync as writeFileSync15 } from "fs";
|
|
705511
705569
|
import { readdir as readdir31, readFile as readFile59, writeFile as writeFile53 } from "fs/promises";
|
|
705512
705570
|
import { join as join154 } from "path";
|
|
705513
705571
|
import { pipeline as pipeline4 } from "stream/promises";
|
|
@@ -705646,7 +705704,7 @@ async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
|
705646
705704
|
}
|
|
705647
705705
|
async function writeHeapSnapshot(filepath) {
|
|
705648
705706
|
if (typeof Bun !== "undefined") {
|
|
705649
|
-
|
|
705707
|
+
writeFileSync15(filepath, Bun.generateHeapSnapshot("v8", "arraybuffer"), {
|
|
705650
705708
|
mode: 384
|
|
705651
705709
|
});
|
|
705652
705710
|
Bun.gc(true);
|
|
@@ -712776,7 +712834,7 @@ var init_workflowSavePath = __esm(() => {
|
|
|
712776
712834
|
});
|
|
712777
712835
|
|
|
712778
712836
|
// src/components/WorkflowDetailDialog.tsx
|
|
712779
|
-
import { existsSync as existsSync25, mkdirSync as mkdirSync13, readFileSync as readFileSync32, writeFileSync as
|
|
712837
|
+
import { existsSync as existsSync25, mkdirSync as mkdirSync13, readFileSync as readFileSync32, writeFileSync as writeFileSync16 } from "fs";
|
|
712780
712838
|
function launchTypeOf(_task) {
|
|
712781
712839
|
return "background";
|
|
712782
712840
|
}
|
|
@@ -712833,7 +712891,7 @@ function saveDynamicWorkflow(task, scope, overwrite) {
|
|
|
712833
712891
|
}
|
|
712834
712892
|
try {
|
|
712835
712893
|
mkdirSync13(targetDir, { recursive: true });
|
|
712836
|
-
|
|
712894
|
+
writeFileSync16(targetPath, source2, {
|
|
712837
712895
|
encoding: "utf8",
|
|
712838
712896
|
flag: overwrite ? "w" : "wx"
|
|
712839
712897
|
});
|
|
@@ -713875,7 +713933,7 @@ import {
|
|
|
713875
713933
|
unlink as unlink25,
|
|
713876
713934
|
writeFile as writeFile55
|
|
713877
713935
|
} from "fs/promises";
|
|
713878
|
-
import { tmpdir as
|
|
713936
|
+
import { tmpdir as tmpdir14 } from "os";
|
|
713879
713937
|
import { extname as extname17, join as join159 } from "path";
|
|
713880
713938
|
function getAnalysisModel() {
|
|
713881
713939
|
return getDefaultOpusModel();
|
|
@@ -715638,7 +715696,7 @@ var init_insights = __esm(() => {
|
|
|
715638
715696
|
} : async () => 0;
|
|
715639
715697
|
collectFromRemoteHost = process.env.USER_TYPE === "ant" ? async (homespace, destDir) => {
|
|
715640
715698
|
const result = { copied: 0, skipped: 0 };
|
|
715641
|
-
const tempDir = await mkdtemp5(join159(
|
|
715699
|
+
const tempDir = await mkdtemp5(join159(tmpdir14(), "claude-hs-"));
|
|
715642
715700
|
try {
|
|
715643
715701
|
const scpResult = await execFileNoThrow("scp", ["-rq", `${homespace}.coder:/root/.claude/projects/`, tempDir], { timeout: 300000 });
|
|
715644
715702
|
if (scpResult.code !== 0) {
|
|
@@ -720137,7 +720195,7 @@ var init_agentMemory = __esm(() => {
|
|
|
720137
720195
|
|
|
720138
720196
|
// src/utils/permissions/filesystem.ts
|
|
720139
720197
|
import { randomBytes as randomBytes19 } from "crypto";
|
|
720140
|
-
import { homedir as homedir41, tmpdir as
|
|
720198
|
+
import { homedir as homedir41, tmpdir as tmpdir15 } from "os";
|
|
720141
720199
|
import { join as join163, normalize as normalize16, posix as posix8, sep as sep43 } from "path";
|
|
720142
720200
|
function normalizeCaseForComparison2(path39) {
|
|
720143
720201
|
return path39.toLowerCase();
|
|
@@ -721081,7 +721139,7 @@ var init_filesystem = __esm(() => {
|
|
|
721081
721139
|
];
|
|
721082
721140
|
DIR_SEP = posix8.sep;
|
|
721083
721141
|
getClaudeTempDir = memoize_default(function getClaudeTempDir2() {
|
|
721084
|
-
const baseTmpDir = process.env.CLAUDE_CODE_TMPDIR || (getPlatform() === "windows" ?
|
|
721142
|
+
const baseTmpDir = process.env.CLAUDE_CODE_TMPDIR || (getPlatform() === "windows" ? tmpdir15() : "/tmp");
|
|
721085
721143
|
const fs25 = getFsImplementation();
|
|
721086
721144
|
let resolvedBaseTmpDir = baseTmpDir;
|
|
721087
721145
|
try {
|
|
@@ -728254,7 +728312,7 @@ var init_pollConfig = __esm(() => {
|
|
|
728254
728312
|
// src/bridge/sessionRunner.ts
|
|
728255
728313
|
import { spawn as spawn16 } from "child_process";
|
|
728256
728314
|
import { createWriteStream as createWriteStream6 } from "fs";
|
|
728257
|
-
import { tmpdir as
|
|
728315
|
+
import { tmpdir as tmpdir16 } from "os";
|
|
728258
728316
|
import { dirname as dirname72, join as join167 } from "path";
|
|
728259
728317
|
import { createInterface as createInterface3 } from "readline";
|
|
728260
728318
|
function safeFilenameId(id) {
|
|
@@ -728388,7 +728446,7 @@ function createSessionSpawner(deps) {
|
|
|
728388
728446
|
debugFile = `${deps.debugFile}-${safeId}`;
|
|
728389
728447
|
}
|
|
728390
728448
|
} else if (deps.verbose || process.env.USER_TYPE === "ant") {
|
|
728391
|
-
debugFile = join167(
|
|
728449
|
+
debugFile = join167(tmpdir16(), "claude", `bridge-session-${safeId}.log`);
|
|
728392
728450
|
}
|
|
728393
728451
|
let transcriptStream = null;
|
|
728394
728452
|
let transcriptPath;
|
|
@@ -728931,7 +728989,7 @@ __export(exports_bridgeMain, {
|
|
|
728931
728989
|
BridgeHeadlessPermanentError: () => BridgeHeadlessPermanentError
|
|
728932
728990
|
});
|
|
728933
728991
|
import { randomUUID as randomUUID42 } from "crypto";
|
|
728934
|
-
import { hostname as hostname4, tmpdir as
|
|
728992
|
+
import { hostname as hostname4, tmpdir as tmpdir17 } from "os";
|
|
728935
728993
|
import { basename as basename51, join as join170, resolve as resolve56 } from "path";
|
|
728936
728994
|
async function isMultiSessionSpawnEnabled() {
|
|
728937
728995
|
return checkGate_CACHED_OR_BLOCKING("tengu_ccr_bridge_multi_session");
|
|
@@ -729063,7 +729121,7 @@ async function runBridgeLoop(config8, environmentId, environmentSecret, api5, sp
|
|
|
729063
729121
|
const ext = config8.debugFile.lastIndexOf(".");
|
|
729064
729122
|
debugGlob = ext > 0 ? `${config8.debugFile.slice(0, ext)}-*${config8.debugFile.slice(ext)}` : `${config8.debugFile}-*`;
|
|
729065
729123
|
} else {
|
|
729066
|
-
debugGlob = join170(
|
|
729124
|
+
debugGlob = join170(tmpdir17(), "claude", "bridge-session-*.log");
|
|
729067
729125
|
}
|
|
729068
729126
|
logger30.setDebugLogPath(debugGlob);
|
|
729069
729127
|
}
|
|
@@ -729454,7 +729512,7 @@ async function runBridgeLoop(config8, environmentId, environmentSecret, api5, sp
|
|
|
729454
729512
|
sessionDebugFile = `${config8.debugFile}-${safeId}`;
|
|
729455
729513
|
}
|
|
729456
729514
|
} else if (config8.verbose || process.env.USER_TYPE === "ant") {
|
|
729457
|
-
sessionDebugFile = join170(
|
|
729515
|
+
sessionDebugFile = join170(tmpdir17(), "claude", `bridge-session-${safeId}.log`);
|
|
729458
729516
|
}
|
|
729459
729517
|
if (sessionDebugFile) {
|
|
729460
729518
|
logger30.logVerbose(`Debug log: ${sessionDebugFile}`);
|
|
@@ -730673,7 +730731,7 @@ __export(exports_daemon2, {
|
|
|
730673
730731
|
attachHandler: () => attachHandler,
|
|
730674
730732
|
appendDaemonLog: () => appendDaemonLog
|
|
730675
730733
|
});
|
|
730676
|
-
import { existsSync as existsSync27, mkdirSync as mkdirSync14, readFileSync as readFileSync34, writeFileSync as
|
|
730734
|
+
import { existsSync as existsSync27, mkdirSync as mkdirSync14, readFileSync as readFileSync34, writeFileSync as writeFileSync17, appendFileSync as appendFileSync4 } from "fs";
|
|
730677
730735
|
import { join as join171 } from "path";
|
|
730678
730736
|
import { execSync as execSync4 } from "child_process";
|
|
730679
730737
|
function daemonLogPath2() {
|
|
@@ -730897,8 +730955,8 @@ function writeScheduledConfig(tasks2) {
|
|
|
730897
730955
|
}
|
|
730898
730956
|
current.scheduled = tasks2;
|
|
730899
730957
|
mkdirSync14(join171(path39, ".."), { recursive: true });
|
|
730900
|
-
|
|
730901
|
-
|
|
730958
|
+
writeFileSync17(path39, JSON.stringify(current, null, 2), { encoding: "utf-8" });
|
|
730959
|
+
writeFileSync17(scheduledStatusPath(), JSON.stringify({ tasks: tasks2, updatedAt: Date.now() }, null, 2), {
|
|
730902
730960
|
encoding: "utf-8"
|
|
730903
730961
|
});
|
|
730904
730962
|
}
|
|
@@ -770143,21 +770201,28 @@ function PromptInput({
|
|
|
770143
770201
|
}
|
|
770144
770202
|
}, [previousModeBeforeAuto, toolPermissionContext, setAppState, setToolPermissionContext]);
|
|
770145
770203
|
const handleImagePaste = import_react261.useCallback(() => {
|
|
770146
|
-
|
|
770147
|
-
if (
|
|
770148
|
-
|
|
770204
|
+
saveClipboardImageToTempFile().then((saved) => {
|
|
770205
|
+
if (saved) {
|
|
770206
|
+
insertTextAtCursor(`${saved.path}
|
|
770207
|
+
`);
|
|
770208
|
+
addNotification({
|
|
770209
|
+
key: "clipboard-image-saved",
|
|
770210
|
+
text: `Saved clipboard image \u2192 ${saved.path}`,
|
|
770211
|
+
priority: "immediate",
|
|
770212
|
+
timeoutMs: 4000
|
|
770213
|
+
});
|
|
770149
770214
|
} else {
|
|
770150
770215
|
const shortcutDisplay = getShortcutDisplay("chat:imagePaste", "Chat", "ctrl+v");
|
|
770151
|
-
const message = env4.isSSH() ? "No image found in clipboard. You're SSH'd
|
|
770216
|
+
const message = env4.isSSH() ? "No image found in clipboard. You're SSH'd \u2014 copy the screenshot to the dev machine (e.g. scp) and set OCC_CLIPBOARD_IMAGE_SRC to its path, then press Ctrl+V." : `No image found in clipboard. Use ${shortcutDisplay} to paste images.`;
|
|
770152
770217
|
addNotification({
|
|
770153
770218
|
key: "no-image-in-clipboard",
|
|
770154
770219
|
text: message,
|
|
770155
770220
|
priority: "immediate",
|
|
770156
|
-
timeoutMs:
|
|
770221
|
+
timeoutMs: 6000
|
|
770157
770222
|
});
|
|
770158
770223
|
}
|
|
770159
770224
|
});
|
|
770160
|
-
}, [addNotification,
|
|
770225
|
+
}, [addNotification, insertTextAtCursor]);
|
|
770161
770226
|
const keybindingContext = useOptionalKeybindingContext();
|
|
770162
770227
|
import_react261.useEffect(() => {
|
|
770163
770228
|
if (!keybindingContext || isModalOverlayActive)
|
|
@@ -795367,10 +795432,10 @@ function FleetViewScreen(props) {
|
|
|
795367
795432
|
for (const task of Object.values(tasks2)) {
|
|
795368
795433
|
if (task.status === "running" && task.pid) {
|
|
795369
795434
|
try {
|
|
795370
|
-
const { writeFileSync:
|
|
795435
|
+
const { writeFileSync: writeFileSync18 } = __require("fs");
|
|
795371
795436
|
const { join: join181 } = __require("path");
|
|
795372
795437
|
const heartbeatPath = join181(__require("os").tmpdir(), `.fleetview-heartbeat-${task.pid}`);
|
|
795373
|
-
|
|
795438
|
+
writeFileSync18(heartbeatPath, String(Date.now()));
|
|
795374
795439
|
} catch {}
|
|
795375
795440
|
}
|
|
795376
795441
|
}
|
|
@@ -796443,7 +796508,7 @@ __export(exports_REPL, {
|
|
|
796443
796508
|
});
|
|
796444
796509
|
import { spawnSync as spawnSync14 } from "child_process";
|
|
796445
796510
|
import { dirname as dirname79, join as join182 } from "path";
|
|
796446
|
-
import { tmpdir as
|
|
796511
|
+
import { tmpdir as tmpdir18 } from "os";
|
|
796447
796512
|
import { writeFile as writeFile62 } from "fs/promises";
|
|
796448
796513
|
import { randomUUID as randomUUID63 } from "crypto";
|
|
796449
796514
|
function TranscriptModeFooter(t0) {
|
|
@@ -799230,7 +799295,7 @@ Note: ctrl + z now suspends Claude Code, ctrl + _ undoes input.
|
|
|
799230
799295
|
const w4 = Math.max(80, (process.stdout.columns ?? 80) - 6);
|
|
799231
799296
|
const raw = await renderMessagesToPlainText(deferredMessages, tools, w4);
|
|
799232
799297
|
const text2 = raw.replace(/[ \t]+$/gm, "");
|
|
799233
|
-
const path43 = join182(
|
|
799298
|
+
const path43 = join182(tmpdir18(), `cc-transcript-${Date.now()}.txt`);
|
|
799234
799299
|
await writeFile62(path43, text2);
|
|
799235
799300
|
const opened = openFileInExternalEditor(path43);
|
|
799236
799301
|
setStatus(opened ? `opening ${path43}` : `wrote ${path43} \xB7 no $VISUAL/$EDITOR set`);
|
|
@@ -809168,6 +809233,19 @@ function findClosestSubcommand(word, program3) {
|
|
|
809168
809233
|
return best;
|
|
809169
809234
|
}
|
|
809170
809235
|
|
|
809236
|
+
// src/utils/forwardSubagentTextGuard.ts
|
|
809237
|
+
function checkForwardSubagentTextGuard(effective, isNonInteractiveSession, outputFormat, cliFlag) {
|
|
809238
|
+
if (effective) {
|
|
809239
|
+
if (!isNonInteractiveSession || outputFormat !== "stream-json") {
|
|
809240
|
+
if (cliFlag) {
|
|
809241
|
+
return FORWARD_SUBAGENT_TEXT_ERROR;
|
|
809242
|
+
}
|
|
809243
|
+
}
|
|
809244
|
+
}
|
|
809245
|
+
return null;
|
|
809246
|
+
}
|
|
809247
|
+
var FORWARD_SUBAGENT_TEXT_ERROR = "Error: --forward-subagent-text requires --print and --output-format=stream-json.";
|
|
809248
|
+
|
|
809171
809249
|
// src/migrations/migrateAutoUpdatesToSettings.ts
|
|
809172
809250
|
function migrateAutoUpdatesToSettings() {
|
|
809173
809251
|
const globalConfig2 = getGlobalConfig();
|
|
@@ -819948,12 +820026,11 @@ ${hint}` : hint;
|
|
|
819948
820026
|
process.exit(1);
|
|
819949
820027
|
}
|
|
819950
820028
|
}
|
|
819951
|
-
|
|
819952
|
-
|
|
819953
|
-
|
|
819954
|
-
|
|
819955
|
-
|
|
819956
|
-
}
|
|
820029
|
+
{
|
|
820030
|
+
const guardError = checkForwardSubagentTextGuard(effectiveForwardSubagentText, isNonInteractiveSession, outputFormat, forwardSubagentText);
|
|
820031
|
+
if (guardError) {
|
|
820032
|
+
writeToStderr(guardError);
|
|
820033
|
+
process.exit(1);
|
|
819957
820034
|
}
|
|
819958
820035
|
}
|
|
819959
820036
|
if (options.sessionPersistence === false && !isNonInteractiveSession) {
|