@swifty.js/swifty 0.0.37 → 0.0.38
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-R22FJPVN.js → acp-K6UNT7R2.js} +1 -1
- package/dist/{agent-WOWGQDBG.js → agent-TVRVBK2C.js} +1 -1
- package/dist/{chunk-LW273HD5.js → chunk-AN6IJDRD.js} +1 -1
- package/dist/{chunk-S2VEXEVV.js → chunk-CJZX34IA.js} +1 -1
- package/dist/{chunk-ENZ5LHRN.js → chunk-CTLUJRU3.js} +2 -2
- package/dist/{chunk-R62BGTT4.js → chunk-FITQ5CCD.js} +2 -2
- package/dist/{chunk-FOPUR6OB.js → chunk-Z4QZQ7X6.js} +14 -17
- package/dist/lib/{agent-ZSFK66FQ.js → agent-N64HDJ3J.js} +2 -2
- package/dist/lib/{chunk-O35GIE35.js → chunk-5QBKDZYN.js} +1 -1
- package/dist/lib/{chunk-5OJV33Y2.js → chunk-FPULYNJL.js} +2 -3
- package/dist/lib/{chunk-GWZDEU27.js → chunk-OM7DYLTN.js} +0 -1
- package/dist/lib/index.d.ts +10 -82
- package/dist/lib/index.js +52 -429
- package/dist/lib/{providers-WQ3UOLMF.js → providers-YRULZPXI.js} +1 -1
- package/dist/lib/{tool-filter-S3ZZOXFD.js → tool-filter-UULMJRDQ.js} +1 -1
- package/dist/main.js +153 -201
- package/dist/{providers-NWLGMQOZ.js → providers-6YCHQM6N.js} +1 -1
- package/dist/{server-TINTK5DM.js → server-OHPTZAGM.js} +1 -1
- package/dist/{tool-filter-QETBQPHL.js → tool-filter-NRC4U62K.js} +1 -1
- package/package.json +1 -2
|
@@ -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-FPULYNJL.js";
|
|
6
|
+
import "./chunk-5QBKDZYN.js";
|
|
7
7
|
import "./chunk-BQFVUVLI.js";
|
|
8
8
|
import "./chunk-HQSYRTER.js";
|
|
9
9
|
import "./chunk-OLFXCZVH.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
providers_exports
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5QBKDZYN.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-YRULZPXI.js").then(async ({ createTelemetryRuntime }) => {
|
|
108
108
|
runtime = await createTelemetryRuntime();
|
|
109
109
|
runtime.setMode(mode);
|
|
110
110
|
process.once("beforeExit", () => {
|
|
@@ -3298,7 +3298,6 @@ export {
|
|
|
3298
3298
|
TOOL_RESULT_PREVIEW_CHARS,
|
|
3299
3299
|
spillDir,
|
|
3300
3300
|
buildPersistedOutputPreview,
|
|
3301
|
-
persistLargeResult,
|
|
3302
3301
|
tool_result_exports,
|
|
3303
3302
|
events_exports,
|
|
3304
3303
|
Agent,
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -298,10 +298,10 @@ type AgentTaskStatus = "running" | "completed" | "failed" | "cancelled";
|
|
|
298
298
|
/**
|
|
299
299
|
* What a task wraps. Hosts use this to wait selectively: print-mode blocks on
|
|
300
300
|
* agent tasks (their results feed the final answer) but must not block on
|
|
301
|
-
* shell
|
|
301
|
+
* shell tasks, which can run indefinitely (dev servers) and are killed at
|
|
302
302
|
* exit instead. Absent kind means "agent" (the original TaskManager use).
|
|
303
303
|
*/
|
|
304
|
-
type TaskKind = "agent" | "shell"
|
|
304
|
+
type TaskKind = "agent" | "shell";
|
|
305
305
|
interface AgentTask {
|
|
306
306
|
id: string;
|
|
307
307
|
name: string;
|
|
@@ -346,7 +346,7 @@ declare class TaskManager {
|
|
|
346
346
|
stopAll(): Promise<void>;
|
|
347
347
|
/**
|
|
348
348
|
* Wait for tasks to settle. An optional filter selects which tasks to wait
|
|
349
|
-
* for (e.g. print-mode waits only for agent-kind tasks: shell
|
|
349
|
+
* for (e.g. print-mode waits only for agent-kind tasks: shell tasks may
|
|
350
350
|
* run indefinitely and are stopped, not awaited, at exit).
|
|
351
351
|
*/
|
|
352
352
|
waitAll(filter?: (task: AgentTask) => boolean): Promise<void>;
|
|
@@ -3715,7 +3715,7 @@ declare namespace registry {
|
|
|
3715
3715
|
* SOFTWARE.
|
|
3716
3716
|
*/
|
|
3717
3717
|
|
|
3718
|
-
/** Abort a running teammate or one-shot background Agent/Bash/PowerShell
|
|
3718
|
+
/** Abort a running teammate or one-shot background Agent/Bash/PowerShell task. */
|
|
3719
3719
|
declare class TaskStopTool implements Tool {
|
|
3720
3720
|
private teamManager;
|
|
3721
3721
|
private taskManager?;
|
|
@@ -6745,7 +6745,7 @@ declare namespace loader {
|
|
|
6745
6745
|
* SOFTWARE.
|
|
6746
6746
|
*/
|
|
6747
6747
|
|
|
6748
|
-
type AllTools = "InstallSkill" | "LoadSkill" | "Agent" | "TaskStop" | "TaskCreate" | "TaskGet" | "TaskList" | "TaskUpdate" | "TeamCreate" | "SpawnTeammate" | "SendMessage" | "ListTeams" | "TeamDelete" | "SyntheticOutput" | "AskUserQuestion" | "Bash" | "
|
|
6748
|
+
type AllTools = "InstallSkill" | "LoadSkill" | "Agent" | "TaskStop" | "TaskCreate" | "TaskGet" | "TaskList" | "TaskUpdate" | "TeamCreate" | "SpawnTeammate" | "SendMessage" | "ListTeams" | "TeamDelete" | "SyntheticOutput" | "AskUserQuestion" | "Bash" | "PowerShell" | "ComputerUse" | "EditFile" | "EnterWorktree" | "ExitPlanMode" | "ExitWorktree" | "ReadFile" | "ToolSearch" | "WriteFile" | "Glob" | "Grep" | "WebFetch" | "McpCall";
|
|
6749
6749
|
declare const MAIN_AGENT_ONLY_TOOLS: Set<AllTools>;
|
|
6750
6750
|
declare const SUBAGENT_DISALLOWED_TOOLS: Set<AllTools>;
|
|
6751
6751
|
declare const TEAMMATE_DISALLOWED_TOOLS: Set<AllTools>;
|
|
@@ -6862,8 +6862,8 @@ declare function applyBudget(toolResults: ToolResultBlock[], workDir: string, se
|
|
|
6862
6862
|
/**
|
|
6863
6863
|
* Spill an oversized tool output to disk and return the preview text. On
|
|
6864
6864
|
* write failure the content is returned unchanged. Called from agent/index.ts
|
|
6865
|
-
*
|
|
6866
|
-
*
|
|
6865
|
+
* when tool results enter the conversation history, in place of direct
|
|
6866
|
+
* truncation.
|
|
6867
6867
|
*/
|
|
6868
6868
|
declare function persistLargeResult(workDir: string, sessionId: string, toolUseId: string, content: string): string;
|
|
6869
6869
|
|
|
@@ -7089,15 +7089,6 @@ declare const POWERSHELL_DESCRIPTION = "Execute command in PowerShell; return st
|
|
|
7089
7089
|
* is available; mirrors BASH_BACKGROUND_DESCRIPTION with PS-flavored wording.
|
|
7090
7090
|
*/
|
|
7091
7091
|
declare const POWERSHELL_BACKGROUND_DESCRIPTION = "- Set run_in_background to true to run the command in the background. The call returns a task ID immediately and the result arrives later as a task notification; do not poll or Start-Sleep waiting for it. Use this for long-running commands you do not need the result of right away. Use TaskStop with the task_id to kill a background command early. A foreground command that exceeds its timeout is moved to the background automatically instead of being killed, unless it is a bare Start-Sleep.";
|
|
7092
|
-
declare const JAVASCRIPT_DESCRIPTION = "Execute JavaScript in a fresh isolated V8 context for pure computation.\n- Provide a function body and use return to produce a JSON-compatible result. Optional input is available as globalThis.input.\n- No filesystem, network, process, require, imports, timers, or host callbacks are available. Use Bash for Node.js or system operations.\n- timeout_ms defaults to 1000 (max 10000); memory_limit_mb defaults to 64 (max 256). Requires Node.js 24 or newer.";
|
|
7093
|
-
/**
|
|
7094
|
-
* Appended to the JavaScript schema description only when background execution
|
|
7095
|
-
* is available. No timeout auto-background here: timeout_ms is the isolate's
|
|
7096
|
-
* hard safety cap — V8 kills a synchronous script at the cap, and a wall-clock
|
|
7097
|
-
* deadline disposes the isolate when an evaluation is suspended on a promise —
|
|
7098
|
-
* so there is nothing left to keep running.
|
|
7099
|
-
*/
|
|
7100
|
-
declare const JAVASCRIPT_BACKGROUND_DESCRIPTION = "- Set run_in_background to true to evaluate in the background. The call returns a task ID immediately and the result arrives later as a task notification; do not poll. timeout_ms still caps the evaluation (max 10000). Use TaskStop with the task_id to abort it early.";
|
|
7101
7092
|
declare const READ_FILE_DESCRIPTION = "Read text with 1-based display line numbers, or images (png, jpg, jpeg, gif, webp) as visual content; not directories.\n- file_path is absolute or relative to the Agent's working directory. offset skips lines (0-based, default 0); limit defaults to 2000 lines, with a 50KB text output cap. Displayed line 101 starts at offset=100. Follow continuation/readback instructions for partial output.\n- Images ignore offset/limit. A successful read refreshes the file-state cache used by EditFile/WriteFile; re-read after an external-change error.";
|
|
7102
7093
|
declare const EDIT_FILE_DESCRIPTION = "Replace exact text in an existing file and return a diff. Prefer this over whole-file rewrites.\n- file_path is absolute or relative to the Agent's working directory. ReadFile is required first; stale file-state errors require a fresh read and revised edit.\n- old_string must be non-empty and unique unless replace_all=true (default false). Use enough context to disambiguate; preserve whitespace and exclude display line numbers.\n- new_string must differ from old_string; an empty string deletes the match.";
|
|
7103
7094
|
declare const WRITE_FILE_DESCRIPTION = "Write complete UTF-8 content to file_path, creating parent directories and overwriting existing content. Use for new files or complete rewrites; prefer EditFile for targeted changes.\n- file_path is absolute or relative to the Agent's working directory. Existing files require ReadFile first; re-read if the cached state is stale.\n- content includes any desired trailing newline; an empty string creates or truncates an empty file. Avoid unrelated files or unsolicited documentation.";
|
|
@@ -7110,15 +7101,13 @@ declare const descriptions_BASH_DESCRIPTION: typeof BASH_DESCRIPTION;
|
|
|
7110
7101
|
declare const descriptions_EDIT_FILE_DESCRIPTION: typeof EDIT_FILE_DESCRIPTION;
|
|
7111
7102
|
declare const descriptions_GLOB_DESCRIPTION: typeof GLOB_DESCRIPTION;
|
|
7112
7103
|
declare const descriptions_GREP_DESCRIPTION: typeof GREP_DESCRIPTION;
|
|
7113
|
-
declare const descriptions_JAVASCRIPT_BACKGROUND_DESCRIPTION: typeof JAVASCRIPT_BACKGROUND_DESCRIPTION;
|
|
7114
|
-
declare const descriptions_JAVASCRIPT_DESCRIPTION: typeof JAVASCRIPT_DESCRIPTION;
|
|
7115
7104
|
declare const descriptions_POWERSHELL_BACKGROUND_DESCRIPTION: typeof POWERSHELL_BACKGROUND_DESCRIPTION;
|
|
7116
7105
|
declare const descriptions_POWERSHELL_DESCRIPTION: typeof POWERSHELL_DESCRIPTION;
|
|
7117
7106
|
declare const descriptions_READ_FILE_DESCRIPTION: typeof READ_FILE_DESCRIPTION;
|
|
7118
7107
|
declare const descriptions_WEB_FETCH_DESCRIPTION: typeof WEB_FETCH_DESCRIPTION;
|
|
7119
7108
|
declare const descriptions_WRITE_FILE_DESCRIPTION: typeof WRITE_FILE_DESCRIPTION;
|
|
7120
7109
|
declare namespace descriptions {
|
|
7121
|
-
export { descriptions_BASH_BACKGROUND_DESCRIPTION as BASH_BACKGROUND_DESCRIPTION, descriptions_BASH_DESCRIPTION as BASH_DESCRIPTION, descriptions_EDIT_FILE_DESCRIPTION as EDIT_FILE_DESCRIPTION, descriptions_GLOB_DESCRIPTION as GLOB_DESCRIPTION, descriptions_GREP_DESCRIPTION as GREP_DESCRIPTION,
|
|
7110
|
+
export { descriptions_BASH_BACKGROUND_DESCRIPTION as BASH_BACKGROUND_DESCRIPTION, descriptions_BASH_DESCRIPTION as BASH_DESCRIPTION, descriptions_EDIT_FILE_DESCRIPTION as EDIT_FILE_DESCRIPTION, descriptions_GLOB_DESCRIPTION as GLOB_DESCRIPTION, descriptions_GREP_DESCRIPTION as GREP_DESCRIPTION, descriptions_POWERSHELL_BACKGROUND_DESCRIPTION as POWERSHELL_BACKGROUND_DESCRIPTION, descriptions_POWERSHELL_DESCRIPTION as POWERSHELL_DESCRIPTION, descriptions_READ_FILE_DESCRIPTION as READ_FILE_DESCRIPTION, descriptions_WEB_FETCH_DESCRIPTION as WEB_FETCH_DESCRIPTION, descriptions_WRITE_FILE_DESCRIPTION as WRITE_FILE_DESCRIPTION };
|
|
7122
7111
|
}
|
|
7123
7112
|
|
|
7124
7113
|
/**
|
|
@@ -7482,67 +7471,6 @@ declare namespace isDiffTool$1 {
|
|
|
7482
7471
|
export { isDiffTool$1_isDiffTool as isDiffTool };
|
|
7483
7472
|
}
|
|
7484
7473
|
|
|
7485
|
-
declare const JavaScriptEvaluationOptionsSchema: z$1.ZodObject<{
|
|
7486
|
-
input: z$1.ZodOptional<z$1.ZodJSONSchema>;
|
|
7487
|
-
timeoutMs: z$1.ZodDefault<z$1.ZodNumber>;
|
|
7488
|
-
memoryLimitMb: z$1.ZodDefault<z$1.ZodNumber>;
|
|
7489
|
-
}, z$1.core.$strip>;
|
|
7490
|
-
declare const JavaScriptEvaluationSchema: z$1.ZodObject<{
|
|
7491
|
-
logs: z$1.ZodArray<z$1.ZodString>;
|
|
7492
|
-
value: z$1.ZodJSONSchema;
|
|
7493
|
-
logsTruncated: z$1.ZodBoolean;
|
|
7494
|
-
}, z$1.core.$strip>;
|
|
7495
|
-
type JavaScriptEvaluation = z$1.infer<typeof JavaScriptEvaluationSchema>;
|
|
7496
|
-
type JavaScriptEvaluationOptions = z$1.input<typeof JavaScriptEvaluationOptionsSchema> & {
|
|
7497
|
-
abortSignal?: AbortSignal;
|
|
7498
|
-
};
|
|
7499
|
-
declare function isolatedVmSupported(nodeVersion?: string): boolean;
|
|
7500
|
-
declare function evaluateJavaScript(code: string, options?: JavaScriptEvaluationOptions): Promise<JavaScriptEvaluation>;
|
|
7501
|
-
declare class JavaScriptTool implements Tool {
|
|
7502
|
-
name: string;
|
|
7503
|
-
description: string;
|
|
7504
|
-
category: ToolCategory;
|
|
7505
|
-
/**
|
|
7506
|
-
* Background task registry, injected by the host — same contract as
|
|
7507
|
-
* BashTool.taskManager. Unlike the shell tools there is no timeout
|
|
7508
|
-
* auto-background: timeout_ms is the isolate's hard safety cap — V8 kills a
|
|
7509
|
-
* synchronous script at the cap, and a wall-clock deadline disposes the
|
|
7510
|
-
* isolate when an evaluation is suspended on a promise — so nothing is left
|
|
7511
|
-
* to keep running.
|
|
7512
|
-
*/
|
|
7513
|
-
taskManager: TaskManager | null;
|
|
7514
|
-
/** Running foreground evaluations eligible for manual backgrounding (Ctrl+B). */
|
|
7515
|
-
private foreground;
|
|
7516
|
-
private nextForegroundId;
|
|
7517
|
-
/** Instance-level background gate; see BashTool.backgroundEnabled. */
|
|
7518
|
-
backgroundEnabled(): boolean;
|
|
7519
|
-
/** True while at least one foreground evaluation runs. */
|
|
7520
|
-
hasForegroundTasks(): boolean;
|
|
7521
|
-
/** Move every running foreground evaluation to the background (Ctrl+B). */
|
|
7522
|
-
backgroundForegroundTasks(): number;
|
|
7523
|
-
schema(): ToolSchema;
|
|
7524
|
-
execute(ctx: ToolContext, args: Record<string, unknown>): Promise<ToolResult>;
|
|
7525
|
-
/**
|
|
7526
|
-
* Start the isolated evaluation. The returned handle mirrors the shell
|
|
7527
|
-
* tools: background() transitions the pending evaluation into a TaskManager
|
|
7528
|
-
* task — the isolate keeps running on its own thread, the tool call
|
|
7529
|
-
* resolves immediately, and completion arrives as a task notification.
|
|
7530
|
-
* While foreground, the caller's abort signal (Esc) disposes the isolate;
|
|
7531
|
-
* once backgrounded, only TaskStop or session shutdown can abort it.
|
|
7532
|
-
*/
|
|
7533
|
-
private startEvaluation;
|
|
7534
|
-
}
|
|
7535
|
-
|
|
7536
|
-
type javascript_JavaScriptEvaluation = JavaScriptEvaluation;
|
|
7537
|
-
type javascript_JavaScriptEvaluationOptions = JavaScriptEvaluationOptions;
|
|
7538
|
-
type javascript_JavaScriptTool = JavaScriptTool;
|
|
7539
|
-
declare const javascript_JavaScriptTool: typeof JavaScriptTool;
|
|
7540
|
-
declare const javascript_evaluateJavaScript: typeof evaluateJavaScript;
|
|
7541
|
-
declare const javascript_isolatedVmSupported: typeof isolatedVmSupported;
|
|
7542
|
-
declare namespace javascript {
|
|
7543
|
-
export { type javascript_JavaScriptEvaluation as JavaScriptEvaluation, type javascript_JavaScriptEvaluationOptions as JavaScriptEvaluationOptions, javascript_JavaScriptTool as JavaScriptTool, javascript_evaluateJavaScript as evaluateJavaScript, javascript_isolatedVmSupported as isolatedVmSupported };
|
|
7544
|
-
}
|
|
7545
|
-
|
|
7546
7474
|
/**
|
|
7547
7475
|
* Copyright (c) 2026 hangtiancheng
|
|
7548
7476
|
*
|
|
@@ -7814,7 +7742,7 @@ interface BackgroundableTool {
|
|
|
7814
7742
|
backgroundForegroundTasks(): number;
|
|
7815
7743
|
}
|
|
7816
7744
|
/** Tools that support background execution, in Ctrl+B priority order. */
|
|
7817
|
-
declare const BACKGROUNDABLE_TOOL_NAMES: readonly ["Bash", "PowerShell"
|
|
7745
|
+
declare const BACKGROUNDABLE_TOOL_NAMES: readonly ["Bash", "PowerShell"];
|
|
7818
7746
|
/**
|
|
7819
7747
|
* Share one background task registry across every backgroundable tool in the
|
|
7820
7748
|
* registry, so run_in_background, Ctrl+B and timeout auto-background deliver
|
|
@@ -8112,7 +8040,7 @@ declare namespace writeFile {
|
|
|
8112
8040
|
*/
|
|
8113
8041
|
|
|
8114
8042
|
declare namespace index$3 {
|
|
8115
|
-
export { askUser as AskUser, bash as Bash, computerUse as ComputerUse, descriptions as Descriptions, diff as Diff, editFile as EditFile, enterWorktree as EnterWorktree, exitCodeHints as ExitCodeHints, exitPlanMode as ExitPlanMode, exitWorktree as ExitWorktree, fileMutationQueue as FileMutationQueue, fileStateCache as FileStateCache, glob as Glob, grep as Grep, isDiffTool$1 as IsDiffTool,
|
|
8043
|
+
export { askUser as AskUser, bash as Bash, computerUse as ComputerUse, descriptions as Descriptions, diff as Diff, editFile as EditFile, enterWorktree as EnterWorktree, exitCodeHints as ExitCodeHints, exitPlanMode as ExitPlanMode, exitWorktree as ExitWorktree, fileMutationQueue as FileMutationQueue, fileStateCache as FileStateCache, glob as Glob, grep as Grep, isDiffTool$1 as IsDiffTool, mcpCall as McpCall, powershell as PowerShell, readFile as ReadFile, registry$1 as Registry, shellBackground as ShellBackground, shellOutput as ShellOutput, snippets as Snippets, syntheticOutput as SyntheticOutput, toolSearch as ToolSearch, types as Types, webFetch as WebFetchTool, writeFile as WriteFile };
|
|
8116
8044
|
}
|
|
8117
8045
|
|
|
8118
8046
|
/**
|