@swifty.js/swifty 0.0.35 → 0.0.36
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/{acp-A4KRKOHD.js → acp-ZU5LZRUP.js} +1 -1
- package/dist/{agent-VDWIGFIV.js → agent-YDU6HB4S.js} +1 -1
- package/dist/{anthropic-AR2Y4FBR.js → anthropic-GDT73MMP.js} +1 -1
- package/dist/{chunk-IOLGXPUQ.js → chunk-EEEW3GG4.js} +1 -1
- package/dist/chunk-I7XJSLRI.js +4 -0
- package/dist/{chunk-TOM34LJB.js → chunk-MNP6IJ7C.js} +17 -17
- package/dist/{chunk-4B4SGVJH.js → chunk-MTAGHTBG.js} +21 -21
- package/dist/{chunk-TNF3EHFY.js → chunk-Q3NPRV5P.js} +1 -1
- package/dist/chunk-RDVRYI56.js +610 -0
- package/dist/esm-PDXUGWFK.js +229 -0
- package/dist/lib/{agent-TC4HSVMS.js → agent-ZMIS6IH6.js} +2 -2
- package/dist/lib/{chunk-RUDYC7OS.js → chunk-BHSNJT6Z.js} +1 -1
- package/dist/lib/{chunk-OJTISIYU.js → chunk-PJ7354ZG.js} +1 -1
- package/dist/lib/{chunk-S5VWPTME.js → chunk-YUDCYSKO.js} +22 -7
- package/dist/lib/index.d.ts +500 -98
- package/dist/lib/index.js +1140 -375
- package/dist/lib/{permissions-BW4QPZXV.js → permissions-77UJQITR.js} +1 -1
- package/dist/lib/{providers-ROWSB6ND.js → providers-5SJFTU2G.js} +1 -1
- package/dist/main.js +176 -175
- package/dist/{providers-2J4JJYQD.js → providers-FQCJFM3Q.js} +1 -1
- package/dist/{server-ZYK4L22D.js → server-C6H5ZWUG.js} +1 -1
- package/package.json +1 -1
- package/dist/chunk-F4FOFPKL.js +0 -611
- package/dist/chunk-YBS5ATGZ.js +0 -4
- package/dist/esm-VBV56AO5.js +0 -229
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
Agent,
|
|
3
3
|
events_exports,
|
|
4
4
|
streaming_executor_exports
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-YUDCYSKO.js";
|
|
6
|
+
import "./chunk-PJ7354ZG.js";
|
|
7
7
|
import "./chunk-BQFVUVLI.js";
|
|
8
8
|
import "./chunk-HQSYRTER.js";
|
|
9
9
|
import "./chunk-OLFXCZVH.js";
|
|
@@ -583,7 +583,7 @@ var PermissionChecker = class _PermissionChecker {
|
|
|
583
583
|
}
|
|
584
584
|
/**
|
|
585
585
|
* Generate a human-readable description of the tool action for display in HITL confirmation dialogs.
|
|
586
|
-
* Prioritizes extracting fields defined in
|
|
586
|
+
* Prioritizes extracting fields defined in CONTENT_FIELDS (e.g., command, file_path);
|
|
587
587
|
* falls back to a key:value summary of parameters if no match is found.
|
|
588
588
|
*/
|
|
589
589
|
describeToolAction(toolName, args) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
providers_exports
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PJ7354ZG.js";
|
|
4
4
|
import {
|
|
5
5
|
normalizeToolResultContentBlock
|
|
6
6
|
} from "./chunk-BQFVUVLI.js";
|
|
@@ -104,7 +104,7 @@ async function initializeTelemetry() {
|
|
|
104
104
|
if (!shouldInitialize()) {
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
|
-
initialization = import("./providers-
|
|
107
|
+
initialization = import("./providers-5SJFTU2G.js").then(async ({ createTelemetryRuntime }) => {
|
|
108
108
|
runtime = await createTelemetryRuntime();
|
|
109
109
|
runtime.setMode(mode);
|
|
110
110
|
process.once("beforeExit", () => {
|
|
@@ -2377,9 +2377,11 @@ var tool_result_exports = {};
|
|
|
2377
2377
|
__export(tool_result_exports, {
|
|
2378
2378
|
TOOL_RESULT_PREVIEW_CHARS: () => TOOL_RESULT_PREVIEW_CHARS,
|
|
2379
2379
|
applyBudget: () => applyBudget,
|
|
2380
|
+
buildPersistedOutputPreview: () => buildPersistedOutputPreview,
|
|
2380
2381
|
isSpillReadback: () => isSpillReadback,
|
|
2381
2382
|
persistLargeResult: () => persistLargeResult,
|
|
2382
2383
|
replaceToolResultContent: () => replaceToolResultContent,
|
|
2384
|
+
spillDir: () => spillDir,
|
|
2383
2385
|
toDisplayPreview: () => toDisplayPreview
|
|
2384
2386
|
});
|
|
2385
2387
|
import { writeFileSync as writeFileSync4, mkdirSync as mkdirSync4 } from "fs";
|
|
@@ -2421,10 +2423,8 @@ function replaceToolResultContent(result, content) {
|
|
|
2421
2423
|
];
|
|
2422
2424
|
}
|
|
2423
2425
|
}
|
|
2424
|
-
function
|
|
2425
|
-
const sizeKB = Math.floor(
|
|
2426
|
-
const preview = content.slice(0, TOOL_RESULT_PREVIEW_CHARS);
|
|
2427
|
-
const hasMore = content.length > TOOL_RESULT_PREVIEW_CHARS;
|
|
2426
|
+
function buildPersistedOutputPreview(totalChars, preview, spillPath) {
|
|
2427
|
+
const sizeKB = Math.floor(totalChars / 1024);
|
|
2428
2428
|
let msg = `<persisted-output>
|
|
2429
2429
|
`;
|
|
2430
2430
|
msg += `Output too large (${String(sizeKB)}KB). Full content saved to:
|
|
@@ -2433,12 +2433,19 @@ ${spillPath}
|
|
|
2433
2433
|
`;
|
|
2434
2434
|
msg += `Preview (first 2KB):
|
|
2435
2435
|
${preview}`;
|
|
2436
|
-
if (
|
|
2436
|
+
if (totalChars > TOOL_RESULT_PREVIEW_CHARS) {
|
|
2437
2437
|
msg += "\n...";
|
|
2438
2438
|
}
|
|
2439
2439
|
msg += "\n</persisted-output>";
|
|
2440
2440
|
return msg;
|
|
2441
2441
|
}
|
|
2442
|
+
function buildSpillPreview(content, spillPath) {
|
|
2443
|
+
return buildPersistedOutputPreview(
|
|
2444
|
+
content.length,
|
|
2445
|
+
content.slice(0, TOOL_RESULT_PREVIEW_CHARS),
|
|
2446
|
+
spillPath
|
|
2447
|
+
);
|
|
2448
|
+
}
|
|
2442
2449
|
function isSpillReadback(toolName, args, workDir, sessionId) {
|
|
2443
2450
|
if (toolName !== "ReadFile" || !args) {
|
|
2444
2451
|
return false;
|
|
@@ -2517,6 +2524,7 @@ var Agent = class {
|
|
|
2517
2524
|
recoveryState;
|
|
2518
2525
|
maxIterations;
|
|
2519
2526
|
notificationFn;
|
|
2527
|
+
taskManager;
|
|
2520
2528
|
onLoopComplete;
|
|
2521
2529
|
compactTracking = new AutoCompactTrackingState();
|
|
2522
2530
|
onPermissionRequest;
|
|
@@ -2550,6 +2558,7 @@ var Agent = class {
|
|
|
2550
2558
|
this.recoveryState = config.recoveryState ?? new RecoveryState();
|
|
2551
2559
|
this.maxIterations = config.maxIterations ?? 0;
|
|
2552
2560
|
this.notificationFn = config.notificationFn;
|
|
2561
|
+
this.taskManager = config.taskManager;
|
|
2553
2562
|
this.onLoopComplete = config.onLoopComplete;
|
|
2554
2563
|
this.onPermissionRequest = config.onPermissionRequest;
|
|
2555
2564
|
this.activeSkills = config.activeSkills ?? /* @__PURE__ */ new Map();
|
|
@@ -3021,6 +3030,8 @@ ${body}`)
|
|
|
3021
3030
|
this.registry,
|
|
3022
3031
|
{
|
|
3023
3032
|
workDir: this.workDir,
|
|
3033
|
+
sessionId: this.sessionId,
|
|
3034
|
+
taskManager: this.taskManager,
|
|
3024
3035
|
abortSignal: this.abortSignal,
|
|
3025
3036
|
fileHistory: this.fileHistory,
|
|
3026
3037
|
fileStateCache: this.fileStateCache,
|
|
@@ -3276,6 +3287,10 @@ export {
|
|
|
3276
3287
|
plan_file_exports,
|
|
3277
3288
|
coordinator_exports,
|
|
3278
3289
|
plan_mode_exports,
|
|
3290
|
+
TOOL_RESULT_PREVIEW_CHARS,
|
|
3291
|
+
spillDir,
|
|
3292
|
+
buildPersistedOutputPreview,
|
|
3293
|
+
persistLargeResult,
|
|
3279
3294
|
tool_result_exports,
|
|
3280
3295
|
events_exports,
|
|
3281
3296
|
Agent,
|