@swifty.js/swifty 0.0.26 → 0.0.28
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/README.md +14 -6
- package/dist/agent-3NON2EXE.js +4 -0
- package/dist/anthropic-BJ5GN2VT.js +4 -0
- package/dist/checker-N5TIJEN5.js +4 -0
- package/dist/{chunk-H7VXSMJR.js → chunk-C3WGLVVZ.js} +10 -10
- package/dist/chunk-D34FUVGU.js +4 -0
- package/dist/chunk-FPQ2LBL4.js +10 -0
- package/dist/chunk-JGSIQXEN.js +4 -0
- package/dist/{chunk-5KXBVL2A.js → chunk-K5ZK27BX.js} +1 -1
- package/dist/chunk-LZBOXJX2.js +301 -0
- package/dist/chunk-OTVZGPHD.js +121 -0
- package/dist/chunk-QCKJLO6X.js +4 -0
- package/dist/chunk-R63ASIIW.js +407 -0
- package/dist/chunk-WX3B64R4.js +4 -0
- package/dist/chunk-Y6SQB5FG.js +4 -0
- package/dist/{devtools-3OAJUZGE.js → devtools-OJ75EP3T.js} +1 -1
- package/dist/glob.wasm +0 -0
- package/dist/lib/agent-XYO2MXXK.js +11 -0
- package/dist/lib/{anthropic-RYPJDHQM.js → anthropic-TGJGAP5R.js} +4 -5
- package/dist/lib/{checker-6BW4222R.js → checker-AXHPKVBY.js} +2 -2
- package/dist/lib/{chunk-HK2Z6WP4.js → chunk-2IVEVG5N.js} +5 -1
- package/dist/lib/{chunk-2AUSNVIB.js → chunk-ALJAVRRX.js} +28 -34
- package/dist/lib/{chunk-GNI7YX6F.js → chunk-DJ6AILPN.js} +70 -24
- package/dist/lib/chunk-DV6RV5WU.js +2345 -0
- package/dist/lib/{chunk-3LU4APFB.js → chunk-FBSPZQGC.js} +126 -73
- package/dist/lib/chunk-IB5IQK2S.js +136 -0
- package/dist/lib/{chunk-PZ42NAFA.js → chunk-KG4MJGKQ.js} +19 -21
- package/dist/lib/{chunk-XFSN4LMA.js → chunk-P4F46PEF.js} +43 -14
- package/dist/lib/glob.wasm +0 -0
- package/dist/lib/index.d.ts +145 -123
- package/dist/lib/index.js +2186 -1726
- package/dist/lib/{openai-VX5VBXZ4.js → openai-5UCIIDPO.js} +2 -3
- package/dist/lib/{tool-filter-VF7TZRE5.js → tool-filter-R6HDDJHE.js} +1 -1
- package/dist/main.js +226 -196
- package/dist/{node-OES65R33.js → node-4LTSRXL2.js} +1 -1
- package/dist/{openai-6MXNADYN.js → openai-YLS2LUAI.js} +14 -14
- package/dist/server-GX72MJQF.js +244 -0
- package/dist/{tool-filter-NO7I3HFD.js → tool-filter-VBP6WOGO.js} +1 -1
- package/package.json +36 -32
- package/dist/agent-GAABBZRW.js +0 -4
- package/dist/anthropic-7QRAPLOY.js +0 -4
- package/dist/checker-3RWAYF2U.js +0 -4
- package/dist/chunk-7MHXMDYC.js +0 -35
- package/dist/chunk-A2VR3BC4.js +0 -4
- package/dist/chunk-FZPTNGTU.js +0 -4
- package/dist/chunk-MWZIARZE.js +0 -130
- package/dist/chunk-NR62AA5K.js +0 -4
- package/dist/chunk-QN27QEFS.js +0 -4
- package/dist/chunk-RMMK4PO5.js +0 -389
- package/dist/chunk-SIWLMWHH.js +0 -93
- package/dist/chunk-VC6OXOMP.js +0 -238
- package/dist/chunk-W37Y53LX.js +0 -4
- package/dist/chunk-XBHVVB5A.js +0 -10
- package/dist/lib/agent-U7MIUCKT.js +0 -9
- package/dist/lib/chunk-2QILP24G.js +0 -1120
- package/dist/lib/chunk-OO2CLOEE.js +0 -88
- package/dist/lib/chunk-RKJYTYQM.js +0 -1285
- package/dist/server-P2VE5HLJ.js +0 -244
package/dist/lib/index.d.ts
CHANGED
|
@@ -47,6 +47,88 @@ declare class RecoveryState {
|
|
|
47
47
|
buildRecoveryAttachment(toolSchemaNames: string[]): string;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
/**
|
|
51
|
+
* Copyright (c) 2026 hangtiancheng
|
|
52
|
+
*
|
|
53
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
54
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
55
|
+
* in the Software without restriction, including without limitation the rights
|
|
56
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
57
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
58
|
+
* furnished to do so, subject to the following conditions:
|
|
59
|
+
*
|
|
60
|
+
* The above copyright notice and this permission notice shall be included in
|
|
61
|
+
* all copies or substantial portions of the Software.
|
|
62
|
+
*
|
|
63
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
64
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
65
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
66
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
67
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
68
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
69
|
+
* SOFTWARE.
|
|
70
|
+
*/
|
|
71
|
+
type DecisionEffect = "allow" | "deny" | "ask";
|
|
72
|
+
type PermissionMode = "default" | "acceptEdits" | "plan" | "bypassPermissions";
|
|
73
|
+
interface Decision {
|
|
74
|
+
effect: DecisionEffect;
|
|
75
|
+
reason: string;
|
|
76
|
+
}
|
|
77
|
+
type RuleEffect = DecisionEffect;
|
|
78
|
+
interface Rule {
|
|
79
|
+
tool: string;
|
|
80
|
+
pattern: string;
|
|
81
|
+
effect: RuleEffect;
|
|
82
|
+
}
|
|
83
|
+
declare function extractContent(toolName: string, args: Record<string, unknown>): string;
|
|
84
|
+
declare class PathSandbox {
|
|
85
|
+
private allowedRoots;
|
|
86
|
+
private denyWritePaths;
|
|
87
|
+
private projectDir;
|
|
88
|
+
constructor(projectDir: string);
|
|
89
|
+
addRoot(root: string): void;
|
|
90
|
+
addDenyWrite(path: string): void;
|
|
91
|
+
/**
|
|
92
|
+
* Check whether a path is in the deny-write list.
|
|
93
|
+
* denyWrite has the highest priority — even if the path is within an allowed root, writes are still denied.
|
|
94
|
+
*/
|
|
95
|
+
checkDenyWrite(filePath: string): Decision | null;
|
|
96
|
+
check(filePath: string): Decision | null;
|
|
97
|
+
}
|
|
98
|
+
declare function evaluateRules(rules: Rule[], toolName: string, content: string): RuleEffect | null;
|
|
99
|
+
declare class RuleEngine {
|
|
100
|
+
private userPath;
|
|
101
|
+
private projectPath;
|
|
102
|
+
private localPath;
|
|
103
|
+
private cache;
|
|
104
|
+
constructor(workDir: string);
|
|
105
|
+
private rulesFor;
|
|
106
|
+
snapshot(): Rule[];
|
|
107
|
+
evaluate(toolName: string, content: string): RuleEffect | null;
|
|
108
|
+
appendLocalRule(rule: Rule): void;
|
|
109
|
+
}
|
|
110
|
+
declare function isSafeCommand(command: string): boolean;
|
|
111
|
+
declare class PermissionChecker {
|
|
112
|
+
private readonly workDir;
|
|
113
|
+
mode: PermissionMode;
|
|
114
|
+
planFilePath: string;
|
|
115
|
+
sandboxEnabled: boolean;
|
|
116
|
+
sandboxAutoAllow: boolean;
|
|
117
|
+
private sandbox;
|
|
118
|
+
private ruleEngine;
|
|
119
|
+
constructor(workDir: string, mode?: PermissionMode);
|
|
120
|
+
forWorkDir(workDir: string): PermissionChecker;
|
|
121
|
+
check(toolName: string, category: "read" | "write" | "command", args: Record<string, unknown>): Decision;
|
|
122
|
+
allowExtraRoot(path: string): void;
|
|
123
|
+
allowAlways(toolName: string, args: Record<string, unknown>): void;
|
|
124
|
+
/**
|
|
125
|
+
* Generate a human-readable description of the tool action for display in HITL confirmation dialogs.
|
|
126
|
+
* Prioritizes extracting fields defined in contentFields (e.g., command, file_path);
|
|
127
|
+
* falls back to a key:value summary of parameters if no match is found.
|
|
128
|
+
*/
|
|
129
|
+
describeToolAction(toolName: string, args: Record<string, unknown>): string;
|
|
130
|
+
}
|
|
131
|
+
|
|
50
132
|
/**
|
|
51
133
|
* Copyright (c) 2026 hangtiancheng
|
|
52
134
|
*
|
|
@@ -72,6 +154,7 @@ declare class FileStateCache {
|
|
|
72
154
|
private cache;
|
|
73
155
|
/** Called after a successful ReadFile to register the file as "seen". */
|
|
74
156
|
record(filePath: string, lastModifiedTimeMs: number): void;
|
|
157
|
+
has(filePath: string): boolean;
|
|
75
158
|
/**
|
|
76
159
|
* Gate check before EditFile / WriteFile
|
|
77
160
|
*/
|
|
@@ -173,6 +256,8 @@ interface ToolContext {
|
|
|
173
256
|
abortSignal?: AbortSignal;
|
|
174
257
|
fileHistory?: FileHistory | undefined;
|
|
175
258
|
fileStateCache?: FileStateCache | undefined;
|
|
259
|
+
permissionChecker?: PermissionChecker;
|
|
260
|
+
onPermissionRequest?: (toolName: string, args: Record<string, unknown>, decision: Decision) => Promise<"allow" | "deny" | "allowAlways">;
|
|
176
261
|
}
|
|
177
262
|
/**
|
|
178
263
|
* How MCP tools enter the context, written into ToolRegistry by mcp/strategy
|
|
@@ -321,6 +406,7 @@ declare class ConversationManager {
|
|
|
321
406
|
hasReminderContaining(marker: string): boolean;
|
|
322
407
|
injectLongTermMemory(instructions: string, memories: string, skills?: string): void;
|
|
323
408
|
appendMessages(msgs: Message[]): void;
|
|
409
|
+
fork(): ConversationManager;
|
|
324
410
|
len(): number;
|
|
325
411
|
truncateTo(index: number): void;
|
|
326
412
|
reset(): void;
|
|
@@ -374,11 +460,12 @@ declare const ProviderConfigSchema: z.ZodObject<{
|
|
|
374
460
|
max_output_tokens: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
375
461
|
}, z.core.$strip>;
|
|
376
462
|
type ProviderConfig = z.infer<typeof ProviderConfigSchema>;
|
|
377
|
-
declare
|
|
378
|
-
declare
|
|
379
|
-
declare
|
|
380
|
-
declare function
|
|
381
|
-
declare function
|
|
463
|
+
declare const DEFAULT_PROVIDER_THINKING = true;
|
|
464
|
+
declare const DEFAULT_CONTEXT_WINDOW = 1000000;
|
|
465
|
+
declare const DEFAULT_MAX_OUTPUT_TOKENS = 128000;
|
|
466
|
+
declare function withProviderDefaults(provider: ProviderConfig): ProviderConfig;
|
|
467
|
+
declare function getContextWindow(provider: ProviderConfig): number;
|
|
468
|
+
declare function getMaxOutputTokens(provider: ProviderConfig): number;
|
|
382
469
|
declare function resolveAPIKey(p: ProviderConfig): string;
|
|
383
470
|
declare const MCPServerConfigSchema: z.ZodObject<{
|
|
384
471
|
name: z.ZodString;
|
|
@@ -466,7 +553,9 @@ declare const AppConfigSchema: z.ZodObject<{
|
|
|
466
553
|
declare function forkEnabled(cfg: AppConfig): boolean;
|
|
467
554
|
type AppConfig = z.infer<typeof AppConfigSchema>;
|
|
468
555
|
declare function mergeConfig(base: AppConfig, override: AppConfig): AppConfig;
|
|
469
|
-
declare function loadConfig(path?: string
|
|
556
|
+
declare function loadConfig(path?: string, options?: {
|
|
557
|
+
allowEmptyProviders?: boolean;
|
|
558
|
+
}): AppConfig;
|
|
470
559
|
|
|
471
560
|
/**
|
|
472
561
|
* Copyright (c) 2026 hangtiancheng
|
|
@@ -503,6 +592,10 @@ interface HookResult {
|
|
|
503
592
|
success: boolean;
|
|
504
593
|
reject: boolean;
|
|
505
594
|
}
|
|
595
|
+
interface HookRuntimeOptions {
|
|
596
|
+
workDir?: string;
|
|
597
|
+
abortSignal?: AbortSignal;
|
|
598
|
+
}
|
|
506
599
|
declare class HookEngine {
|
|
507
600
|
private hooks;
|
|
508
601
|
private firedOnce;
|
|
@@ -511,8 +604,8 @@ declare class HookEngine {
|
|
|
511
604
|
constructor(hooks: HookConfig[]);
|
|
512
605
|
recordNotification(message: string): void;
|
|
513
606
|
drainNotifications(): string[];
|
|
514
|
-
fire(event: EventName, context: HookContext): Promise<HookResult[]>;
|
|
515
|
-
firePreToolHooks(toolName: string, args: Record<string, unknown
|
|
607
|
+
fire(event: EventName, context: HookContext, options?: HookRuntimeOptions): Promise<HookResult[]>;
|
|
608
|
+
firePreToolHooks(toolName: string, args: Record<string, unknown>, options?: HookRuntimeOptions): Promise<{
|
|
516
609
|
rejected: boolean;
|
|
517
610
|
reason: string;
|
|
518
611
|
}>;
|
|
@@ -675,7 +768,6 @@ declare class AnthropicClient implements LLMClient {
|
|
|
675
768
|
private systemPrompt;
|
|
676
769
|
private maxOutputTokens;
|
|
677
770
|
/** Currently not used */
|
|
678
|
-
private contextWindow;
|
|
679
771
|
constructor(config: ProviderConfig, systemPrompt: string);
|
|
680
772
|
setSystemPrompt(prompt: string): void;
|
|
681
773
|
setMaxOutputTokens(maxTokens: number): void;
|
|
@@ -785,86 +877,6 @@ declare class MemoryManager {
|
|
|
785
877
|
renderReminder(memories: RelevantMemory[]): string;
|
|
786
878
|
}
|
|
787
879
|
|
|
788
|
-
/**
|
|
789
|
-
* Copyright (c) 2026 hangtiancheng
|
|
790
|
-
*
|
|
791
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
792
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
793
|
-
* in the Software without restriction, including without limitation the rights
|
|
794
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
795
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
796
|
-
* furnished to do so, subject to the following conditions:
|
|
797
|
-
*
|
|
798
|
-
* The above copyright notice and this permission notice shall be included in
|
|
799
|
-
* all copies or substantial portions of the Software.
|
|
800
|
-
*
|
|
801
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
802
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
803
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
804
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
805
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
806
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
807
|
-
* SOFTWARE.
|
|
808
|
-
*/
|
|
809
|
-
type DecisionEffect = "allow" | "deny" | "ask";
|
|
810
|
-
type PermissionMode = "default" | "acceptEdits" | "plan" | "bypassPermissions";
|
|
811
|
-
interface Decision {
|
|
812
|
-
effect: DecisionEffect;
|
|
813
|
-
reason: string;
|
|
814
|
-
}
|
|
815
|
-
type RuleEffect = DecisionEffect;
|
|
816
|
-
interface Rule {
|
|
817
|
-
tool: string;
|
|
818
|
-
pattern: string;
|
|
819
|
-
effect: RuleEffect;
|
|
820
|
-
}
|
|
821
|
-
declare function extractContent(toolName: string, args: Record<string, unknown>): string;
|
|
822
|
-
declare class PathSandbox {
|
|
823
|
-
private allowedRoots;
|
|
824
|
-
private denyWritePaths;
|
|
825
|
-
private projectDir;
|
|
826
|
-
constructor(projectDir: string);
|
|
827
|
-
addRoot(root: string): void;
|
|
828
|
-
addDenyWrite(path: string): void;
|
|
829
|
-
/**
|
|
830
|
-
* Check whether a path is in the deny-write list.
|
|
831
|
-
* denyWrite has the highest priority — even if the path is within an allowed root, writes are still denied.
|
|
832
|
-
*/
|
|
833
|
-
checkDenyWrite(filePath: string): Decision | null;
|
|
834
|
-
check(filePath: string): Decision | null;
|
|
835
|
-
}
|
|
836
|
-
declare function evaluateRules(rules: Rule[], toolName: string, content: string): RuleEffect | null;
|
|
837
|
-
declare class RuleEngine {
|
|
838
|
-
private userPath;
|
|
839
|
-
private projectPath;
|
|
840
|
-
private localPath;
|
|
841
|
-
private cache;
|
|
842
|
-
constructor(workDir: string);
|
|
843
|
-
private rulesFor;
|
|
844
|
-
snapshot(): Rule[];
|
|
845
|
-
evaluate(toolName: string, content: string): RuleEffect | null;
|
|
846
|
-
appendLocalRule(rule: Rule): void;
|
|
847
|
-
}
|
|
848
|
-
declare function isSafeCommand(command: string): boolean;
|
|
849
|
-
declare class PermissionChecker {
|
|
850
|
-
mode: PermissionMode;
|
|
851
|
-
planFilePath: string;
|
|
852
|
-
sandboxEnabled: boolean;
|
|
853
|
-
sandboxAutoAllow: boolean;
|
|
854
|
-
private sandbox;
|
|
855
|
-
private ruleEngine;
|
|
856
|
-
constructor(workDir: string, mode?: PermissionMode);
|
|
857
|
-
check(toolName: string, category: "read" | "write" | "command", args: Record<string, unknown>): Decision;
|
|
858
|
-
allowExtraRoot(path: string): void;
|
|
859
|
-
allowAlways(toolName: string, args: Record<string, unknown>): void;
|
|
860
|
-
/**
|
|
861
|
-
* Generate a human-readable description of the tool action for display in HITL confirmation dialogs.
|
|
862
|
-
* Prioritizes extracting fields defined in contentFields (e.g., command, file_path);
|
|
863
|
-
* falls back to a key:value summary of parameters if no match is found.
|
|
864
|
-
*/
|
|
865
|
-
describeToolAction(toolName: string, args: Record<string, unknown>): string;
|
|
866
|
-
}
|
|
867
|
-
|
|
868
880
|
/**
|
|
869
881
|
* Copyright (c) 2026 hangtiancheng
|
|
870
882
|
*
|
|
@@ -1218,6 +1230,7 @@ declare class Agent {
|
|
|
1218
1230
|
private memoryRecallValue?;
|
|
1219
1231
|
private onMemoriesSurfaced?;
|
|
1220
1232
|
constructor(config: AgentConfig);
|
|
1233
|
+
private restoreContext;
|
|
1221
1234
|
run(): AsyncGenerator<AgentEvent>;
|
|
1222
1235
|
private fireLifecycle;
|
|
1223
1236
|
private interruptibleSleep;
|
|
@@ -1672,6 +1685,8 @@ interface Member {
|
|
|
1672
1685
|
name: string;
|
|
1673
1686
|
active: boolean;
|
|
1674
1687
|
cancel?: () => void;
|
|
1688
|
+
/** Resolves when the in-process teammate's current loop has fully stopped. */
|
|
1689
|
+
done?: Promise<void>;
|
|
1675
1690
|
mailbox: FileMailbox;
|
|
1676
1691
|
uiState?: TeammateUIState;
|
|
1677
1692
|
/** Optional: Conversation manager for the teammate; when set, the transcript is persisted on exit. */
|
|
@@ -1688,7 +1703,7 @@ interface Member {
|
|
|
1688
1703
|
worktreePath?: string;
|
|
1689
1704
|
joinedAt?: number;
|
|
1690
1705
|
}
|
|
1691
|
-
type RunAgent = (task: string, onEvent?: AgentEventCallback) => Promise<string>;
|
|
1706
|
+
type RunAgent = (task: string, onEvent?: AgentEventCallback, abortSignal?: AbortSignal) => Promise<string>;
|
|
1692
1707
|
declare class Team {
|
|
1693
1708
|
name: string;
|
|
1694
1709
|
mode: TeamMode;
|
|
@@ -2113,8 +2128,8 @@ declare function estimateMessages(messages: Message[]): number;
|
|
|
2113
2128
|
declare function estimateTokens(conv: ConversationManager): number;
|
|
2114
2129
|
declare function computeKeepStartIndex(messages: Message[]): number;
|
|
2115
2130
|
declare function currentContextTokens(conv: ConversationManager, anchor?: UsageAnchor): number;
|
|
2116
|
-
declare function manageContext(conv: ConversationManager, client: LLMClient, contextWindow: number, maxOutput: number, trackingState: AutoCompactTrackingState, recoveryState: RecoveryState | null, toolSchemaNames: string[], toolSchemas: ToolSchema[], sessionFilePath?: string): Promise<CompactResult>;
|
|
2117
|
-
declare function forceCompact(conv: ConversationManager, client: LLMClient, recoveryState: RecoveryState | null, toolSchemaNames: string[], toolSchemas: ToolSchema[], sessionFilePath?: string): Promise<CompactResult>;
|
|
2131
|
+
declare function manageContext(conv: ConversationManager, client: LLMClient, contextWindow: number, maxOutput: number, trackingState: AutoCompactTrackingState, recoveryState: RecoveryState | null, toolSchemaNames: string[], toolSchemas: ToolSchema[], sessionFilePath?: string, abortSignal?: AbortSignal): Promise<CompactResult>;
|
|
2132
|
+
declare function forceCompact(conv: ConversationManager, client: LLMClient, recoveryState: RecoveryState | null, toolSchemaNames: string[], toolSchemas: ToolSchema[], sessionFilePath?: string, abortSignal?: AbortSignal): Promise<CompactResult>;
|
|
2118
2133
|
|
|
2119
2134
|
/**
|
|
2120
2135
|
* Copyright (c) 2026 hangtiancheng
|
|
@@ -2174,11 +2189,11 @@ declare const REJECTED_TOOL_RESULT = "The user rejected this tool use. Nothing w
|
|
|
2174
2189
|
* Returns a copy of the messages with the pairing relationships repaired; the input
|
|
2175
2190
|
* is not modified.
|
|
2176
2191
|
*
|
|
2177
|
-
*
|
|
2178
|
-
*
|
|
2179
|
-
*
|
|
2180
|
-
* conversation history: the history should faithfully record what actually
|
|
2181
|
-
* while the patching exists only to make this particular request valid.
|
|
2192
|
+
* Results must immediately follow their assistant turn, before any ordinary user
|
|
2193
|
+
* content. Group consecutive result messages, fill missing results at that turn
|
|
2194
|
+
* boundary, and drop orphan or duplicate results. The patched content is not written
|
|
2195
|
+
* back to the conversation history: the history should faithfully record what actually
|
|
2196
|
+
* happened, while the patching exists only to make this particular request valid.
|
|
2182
2197
|
*/
|
|
2183
2198
|
declare function ensureToolPairing(messages: Message[]): Message[];
|
|
2184
2199
|
|
|
@@ -2449,7 +2464,7 @@ declare class MCPClient {
|
|
|
2449
2464
|
getInstructions(): string;
|
|
2450
2465
|
listTools(): Promise<MCPTool[]>;
|
|
2451
2466
|
/** Calls a tool and preserves both its text fallback and provider-native rich content. */
|
|
2452
|
-
callTool(name: string, args: Record<string, unknown
|
|
2467
|
+
callTool(name: string, args: Record<string, unknown>, abortSignal?: AbortSignal): Promise<ToolResult>;
|
|
2453
2468
|
disconnect(): Promise<void>;
|
|
2454
2469
|
}
|
|
2455
2470
|
|
|
@@ -2635,7 +2650,7 @@ declare class MCPToolWrapper implements MCPToolLike {
|
|
|
2635
2650
|
/** In eager mode the defer flag is cleared so MCP tools go straight into tools[]. */
|
|
2636
2651
|
setDeferLoading(on: boolean): void;
|
|
2637
2652
|
schema(): ToolSchema;
|
|
2638
|
-
execute(
|
|
2653
|
+
execute(ctx: ToolContext, args: Record<string, unknown>): Promise<ToolResult>;
|
|
2639
2654
|
}
|
|
2640
2655
|
|
|
2641
2656
|
/**
|
|
@@ -2733,8 +2748,6 @@ declare class MemoryExtractor {
|
|
|
2733
2748
|
private buildExtractionPrompt;
|
|
2734
2749
|
/** Core extraction logic: child agent + tools */
|
|
2735
2750
|
private doExtract;
|
|
2736
|
-
/** Extract file paths from WriteFile/EditFile tool calls in conversation messages */
|
|
2737
|
-
private extractWrittenPaths;
|
|
2738
2751
|
/**
|
|
2739
2752
|
* Text protocol fallback: when the sub-agent did not invoke any tools but
|
|
2740
2753
|
* instead emitted structured text blocks (MEMORY_NAME/MEMORY_TYPE/MEMORY_DESC/MEMORY_BODY,
|
|
@@ -3052,6 +3065,11 @@ declare class SkillCatalog {
|
|
|
3052
3065
|
get(name: string): Skill | undefined;
|
|
3053
3066
|
has(name: string): boolean;
|
|
3054
3067
|
}
|
|
3068
|
+
declare function parseSkillFile(content: string): {
|
|
3069
|
+
meta: SkillMeta;
|
|
3070
|
+
body: string;
|
|
3071
|
+
frontmatter: Record<string, unknown>;
|
|
3072
|
+
} | null;
|
|
3055
3073
|
/**
|
|
3056
3074
|
* Build the Skill listing for the system prompt: only names and one-line
|
|
3057
3075
|
* descriptions are included; the full SOP is fetched on demand via LoadSkill.
|
|
@@ -3194,6 +3212,7 @@ declare class RemoteServer {
|
|
|
3194
3212
|
private opts;
|
|
3195
3213
|
private agentHandle;
|
|
3196
3214
|
private streaming;
|
|
3215
|
+
private compactController;
|
|
3197
3216
|
private turnCount;
|
|
3198
3217
|
private readonly eventLogger;
|
|
3199
3218
|
private pendingPermissions;
|
|
@@ -3243,6 +3262,7 @@ declare class RemoteServer {
|
|
|
3243
3262
|
run(): Promise<void>;
|
|
3244
3263
|
/** Stops the server and cleans up all connections. */
|
|
3245
3264
|
stop(): void;
|
|
3265
|
+
private cancelActiveRun;
|
|
3246
3266
|
}
|
|
3247
3267
|
|
|
3248
3268
|
/**
|
|
@@ -3293,6 +3313,8 @@ declare function buildTeammateRegistry(opts: {
|
|
|
3293
3313
|
catalog: SkillCatalog;
|
|
3294
3314
|
skillHost: SkillHost;
|
|
3295
3315
|
mcpServers?: MCPServerConfig[];
|
|
3316
|
+
/** The running teammate retains this manager and disconnects it on exit. */
|
|
3317
|
+
mcpManager?: MCPManager;
|
|
3296
3318
|
/** Used to decide the MCP loading mode: total schema volume is weighed against the context window */
|
|
3297
3319
|
baseUrl?: string;
|
|
3298
3320
|
contextWindow?: number;
|
|
@@ -3618,7 +3640,7 @@ declare class InstallSkillTool implements Tool {
|
|
|
3618
3640
|
private onInstalled?;
|
|
3619
3641
|
name: string;
|
|
3620
3642
|
description: string;
|
|
3621
|
-
category: "
|
|
3643
|
+
category: "write";
|
|
3622
3644
|
constructor(workDir: string, catalog: SkillCatalog, onInstalled?: (() => void) | undefined);
|
|
3623
3645
|
schema(): ToolSchema;
|
|
3624
3646
|
execute(ctx: ToolContext, args: Record<string, unknown>): Promise<ToolResult>;
|
|
@@ -3747,22 +3769,22 @@ declare class AgentTool implements Tool {
|
|
|
3747
3769
|
private teamRunAgentFactory?;
|
|
3748
3770
|
private spawnHandler;
|
|
3749
3771
|
private forkHandler?;
|
|
3750
|
-
constructor(workDir: string, registry: ToolRegistry, spawnHandler: (def: AgentDefinition, prompt: string, bg: boolean, modelOverride?: string, workDirOverride?: string) => Promise<string>, conversation?: ConversationManager, forkHandler?: (prompt: string, conversation: ConversationManager, registry: ToolRegistry, modelOverride?: string) => Promise<string>);
|
|
3772
|
+
constructor(workDir: string, registry: ToolRegistry, spawnHandler: (def: AgentDefinition, prompt: string, bg: boolean, modelOverride?: string, workDirOverride?: string, context?: ToolContext) => Promise<string>, conversation?: ConversationManager, forkHandler?: (prompt: string, conversation: ConversationManager, registry: ToolRegistry, modelOverride?: string, context?: ToolContext) => Promise<string>);
|
|
3751
3773
|
/**
|
|
3752
3774
|
* Sets the team manager and teammate run callback, enabling the team_name parameter.
|
|
3753
3775
|
* Once configured, the Agent tool can spawn teammates directly without requiring a separate SpawnTeammate tool.
|
|
3754
3776
|
*/
|
|
3755
|
-
setTeamManager(mgr: TeamManager, runAgentFactory: (registry: ToolRegistry, checker?: PermissionChecker) => RunAgent): void;
|
|
3777
|
+
setTeamManager(mgr: TeamManager, runAgentFactory: (registry: ToolRegistry, checker?: PermissionChecker, workDir?: string) => RunAgent): void;
|
|
3756
3778
|
schema(): ToolSchema;
|
|
3757
3779
|
private buildDescription;
|
|
3758
|
-
execute(
|
|
3780
|
+
execute(ctx: ToolContext, args: Record<string, unknown>): Promise<ToolResult>;
|
|
3759
3781
|
/**
|
|
3760
3782
|
* Team-member mode: Spawns a persistent teammate in the specified team.
|
|
3761
3783
|
* Delegates to Team.spawnTeammate() to start the idle-poll main loop.
|
|
3762
3784
|
*/
|
|
3763
3785
|
private runAsTeammate;
|
|
3764
3786
|
/**
|
|
3765
|
-
* Fork mode: Inherits parent conversation context
|
|
3787
|
+
* Fork mode: Inherits a snapshot of parent conversation context.
|
|
3766
3788
|
* Unlike definition mode, the forked subagent can see the full history of the parent conversation,
|
|
3767
3789
|
* achieving byte alignment for the prompt-cache prefix to improve cache hit rate.
|
|
3768
3790
|
*/
|
|
@@ -3829,10 +3851,17 @@ type AgentEventSink = (event: {
|
|
|
3829
3851
|
};
|
|
3830
3852
|
text?: string;
|
|
3831
3853
|
}) => void;
|
|
3854
|
+
interface SubagentRunOptions {
|
|
3855
|
+
abortSignal?: AbortSignal;
|
|
3856
|
+
background?: boolean;
|
|
3857
|
+
onPermissionRequest?: AgentConfig["onPermissionRequest"];
|
|
3858
|
+
permissionMode?: PermissionChecker["mode"];
|
|
3859
|
+
conversation?: ConversationManager;
|
|
3860
|
+
}
|
|
3832
3861
|
declare function spawnSubagent(definition: AgentDefinition, prompt: string, parentClient: LLMClient, parentRegistry: ToolRegistry, parentProvider: ProviderConfig, workDir: string, onProgress?: (p: {
|
|
3833
3862
|
turn?: number;
|
|
3834
3863
|
lastTool?: string;
|
|
3835
|
-
}) => void, onEvent?: AgentEventSink, modelOverride?: string, checkerOverride?: PermissionChecker): Promise<string>;
|
|
3864
|
+
}) => void, onEvent?: AgentEventSink, modelOverride?: string, checkerOverride?: PermissionChecker, options?: SubagentRunOptions): Promise<string>;
|
|
3836
3865
|
|
|
3837
3866
|
/**
|
|
3838
3867
|
* Copyright (c) 2026 hangtiancheng
|
|
@@ -4401,13 +4430,13 @@ declare class BashTool implements Tool {
|
|
|
4401
4430
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
4402
4431
|
* SOFTWARE.
|
|
4403
4432
|
*/
|
|
4404
|
-
declare const BASH_DESCRIPTION = "\nExecute a shell command and return stdout and stderr.\n\nOn Windows, prefer the PowerShell tool over Bash for shell commands.\n\nIMPORTANT: Avoid using this tool to run cat, head, tail, sed, awk or echo commands. Instead use the dedicated ReadFile, EditFile, or WriteFile tools which provide a better experience.\n\nUsage Notes\n\n-
|
|
4405
|
-
declare const POWERSHELL_DESCRIPTION = "\nExecute a PowerShell command and return stdout and stderr.\n\nThis is the RECOMMENDED shell tool on Windows -- prefer it over Bash there. It runs powershell.exe on Windows and pwsh (PowerShell Core) on other platforms.\n\nIMPORTANT: Avoid using this tool to run Get-Content, Select-String, or Write-Output/echo commands. Instead use the dedicated ReadFile, EditFile, or WriteFile tools which provide a better experience.\n\nUsage Notes\n\n-
|
|
4406
|
-
declare const READ_FILE_DESCRIPTION = "\nRead a file and return its contents with line numbers.\n\nUsage Notes\n\n-
|
|
4407
|
-
declare const EDIT_FILE_DESCRIPTION = "\nReplace an
|
|
4408
|
-
declare const WRITE_FILE_DESCRIPTION = "\nWrite content to a file, creating parent directories if needed. Overwrites existing files.\n\nUsage Notes\n\n- If modifying an existing file, prefer EditFile over WriteFile -- it only sends the diff.\n- Use this tool only to create new files or for complete rewrites.\n- You MUST read existing files with ReadFile before overwriting them.\n-
|
|
4409
|
-
declare const GLOB_DESCRIPTION = "\nFind files matching a glob pattern, returning relative
|
|
4410
|
-
declare const GREP_DESCRIPTION = "\nSearch file content using a regex pattern (case-insensitive), returning file:line:content matches.\n\nUsage Notes\n\n-
|
|
4433
|
+
declare const BASH_DESCRIPTION = "\nExecute a shell command and return stdout and stderr.\n\nOn Windows, prefer the PowerShell tool over Bash for shell commands.\n\nIMPORTANT: Avoid using this tool to run cat, head, tail, sed, awk or echo commands. Instead use the dedicated ReadFile, EditFile, or WriteFile tools which provide a better experience.\n\nUsage Notes\n\n- Each call starts in the Agent's working directory with a fresh shell. Changes made by cd, variables, functions, and shell options do not persist to the next call.\n- Always quote file paths containing spaces with double quotes.\n- To run in a subdirectory, use cd with a quoted path followed by && and the command in the same call.\n- Optional timeout in seconds (max 600s). Default 120s.\n- When issuing multiple independent commands, make separate tool calls instead of chaining with &&.\n- Use && to chain sequential dependent commands. Use ; only when you don't care if earlier commands failed.\n\nGit Safety Protocol\n\n- NEVER run destructive git commands (push --force, reset --hard, checkout ., clean -f, branch -D) unless the user explicitly requests it.\n- NEVER skip hooks (--no-verify) unless the user explicitly requests it.\n- Prefer creating a new commit rather than amending an existing one.\n- Commit identity: adds a header: Co-Authored-By: Swifty <usr161043261@outlook.com>\n\nAvoiding unnecessary sleep commands. Do NOT retry failing commands in a sleep loop -- diagnose the root cause instead.\nWhen using find, search from \".\" or a specific path, not \"/\" -- scanning the full filesystem is too expensive.\n";
|
|
4434
|
+
declare const POWERSHELL_DESCRIPTION = "\nExecute a PowerShell command and return stdout and stderr.\n\nThis is the RECOMMENDED shell tool on Windows -- prefer it over Bash there. It runs powershell.exe on Windows and pwsh (PowerShell Core) on other platforms.\n\nIMPORTANT: Avoid using this tool to run Get-Content, Select-String, or Write-Output/echo commands. Instead use the dedicated ReadFile, EditFile, or WriteFile tools which provide a better experience.\n\nUsage Notes\n\n- Each call starts in the Agent's working directory with a fresh shell. Set-Location, variables, and shell options do not persist to the next call.\n- Always quote file paths containing spaces with double quotes.\n- To run in a subdirectory, use Set-Location -LiteralPath with a quoted path in the same call.\n- Optional timeout in seconds (max 600s). Default 120s.\n- When issuing multiple independent commands, make separate tool calls instead of chaining with ;.\n- A semicolon does not stop after failure. Check $LASTEXITCODE after native commands and use -ErrorAction Stop for dependent cmdlets. Do not assume PowerShell 7 syntax is available on Windows PowerShell.\n\nGit Safety Protocol\n\n- NEVER run destructive git commands (push --force, reset --hard, checkout ., clean -f, branch -D) unless the user explicitly requests it.\n- NEVER skip hooks (--no-verify) unless the user explicitly requests it.\n- Prefer creating a new commit rather than amending an existing one.\n- Commit identity: adds a header: Co-Authored-By: Swifty <usr161043261@outlook.com>\n\nAvoiding unnecessary Start-Sleep commands. Do NOT retry failing commands in a sleep loop -- diagnose the root cause instead.\nWhen using Get-ChildItem -Recurse, search from \".\" or a specific path, not the drive root -- scanning the full filesystem is too expensive.\n";
|
|
4435
|
+
declare const READ_FILE_DESCRIPTION = "\nRead a file and return its contents with line numbers.\n\nUsage Notes\n\n- file_path may be absolute or relative to the Agent's working directory.\n- By default reads up to 2000 lines from the beginning of the file.\n- offset is the number of lines to skip (0-based); limit is the maximum number of lines to return. To start at displayed line 101, use offset=100. Only read what you need.\n- Results are returned with line numbers (1-based) for easy reference.\n- This tool reads files, not directories. Use Glob to find files and Grep to locate relevant lines.\n- Large output may be saved to a readback file. Follow the returned path or request a narrower range when more content is needed.\n- A successful read refreshes the file state used by EditFile and WriteFile. If a write reports that a file changed externally, read it again before retrying.\n- This tool can read image files (png, jpg, jpeg, gif, webp). Image contents are returned as visual content for multimodal analysis. Line numbers and offset/limit parameters do NOT apply to image files.\n";
|
|
4436
|
+
declare const EDIT_FILE_DESCRIPTION = "\nReplace an exact text string in an existing file and return a diff of the change.\n\nUsage Notes\n\n- You MUST read the file with ReadFile before editing, this tool will fail otherwise.\n- Preserve exact whitespace and indentation from the file; exclude ReadFile's line-number prefixes.\n- Always prefer editing existing files over creating new ones.\n- By default old_string must occur exactly once. Include more surrounding context to disambiguate, or set replace_all=true only when every occurrence should change.\n- Use the smallest old_string that is clearly unique -- 2-4 adjacent lines is usually sufficient.\n- old_string must be non-empty. new_string must differ from old_string and may be empty to delete the matched text.\n- file_path may be absolute or relative to the Agent's working directory. A stale-file error requires another ReadFile and a revised edit.\n";
|
|
4437
|
+
declare const WRITE_FILE_DESCRIPTION = "\nWrite content to a file, creating parent directories if needed. Overwrites existing files.\n\nUsage Notes\n\n- If modifying an existing file, prefer EditFile over WriteFile -- it only sends the diff.\n- Use this tool only to create new files or for complete rewrites.\n- You MUST read existing files with ReadFile before overwriting them.\n- file_path may be absolute or relative to the Agent's working directory. content is the complete UTF-8 text, including any desired trailing newline; an empty string creates or truncates an empty file.\n- Create documentation when the requested task or active workflow requires it; avoid unrelated files.\n";
|
|
4438
|
+
declare const GLOB_DESCRIPTION = "\nFind files matching a glob pattern, returning paths relative to the search base, sorted by modification time (newest first).\n\nUsage Notes\n\n- Supports patterns like \"**/*.ts\", \"src/js/*.js\", \"*.{ts,tsx}\".\n- Search from \".\" or a specific path, never from \"/\".\n- Hidden (dot) files and directories are included.\n- Automatically skips .git, node_modules, __pycache__, and similar directories.\n- Returns at most 1000 matches. When limited, narrow the search; the result is not an exhaustive listing.\n- Use this instead of find or ls command via Bash.\n";
|
|
4439
|
+
declare const GREP_DESCRIPTION = "\nSearch file content using a regex pattern (case-insensitive), returning file:line:content matches.\n\nUsage Notes\n\n- Searches one line at a time using JavaScript-style regular expressions (e.g., \"log.*Error\"). Escape backslashes in JSON strings. Multiline matches and every PCRE extension are not supported.\n- Filter files with the include parameter (e.g., \"*.ts\", \"*.{ts,tsx}\", \"src/**/*.js\").\n- Include patterns containing \"/\" match the path relative to the working directory; bare patterns like \"*.ts\" match file names at any depth.\n- Search from \".\" or a specific path, never from \"/\".\n- Automatically skips .git, node_modules, __pycache__, and similar directories.\n- Use this instead of grep or rg commands via Bash.\n- Returns at most 500 matching lines. Narrow the search if the result limit is reached. Use ReadFile for surrounding context.\n";
|
|
4411
4440
|
|
|
4412
4441
|
/**
|
|
4413
4442
|
* Copyright (c) 2026 hangtiancheng
|
|
@@ -4663,14 +4692,7 @@ declare class McpCallTool implements Tool {
|
|
|
4663
4692
|
deferred: boolean;
|
|
4664
4693
|
constructor(registry: ToolRegistry);
|
|
4665
4694
|
schema(): ToolSchema;
|
|
4666
|
-
|
|
4667
|
-
* Try in order: full name / server+short name / unique short-name suffix match.
|
|
4668
|
-
*
|
|
4669
|
-
* The model very often passes only the short name (roughly three in ten calls in
|
|
4670
|
-
* practice), so this must be tolerant — otherwise it needlessly costs a retry
|
|
4671
|
-
* round.
|
|
4672
|
-
*/
|
|
4673
|
-
private resolve;
|
|
4695
|
+
resolveTarget(args: Record<string, unknown>): MCPToolLike | undefined;
|
|
4674
4696
|
private availableNames;
|
|
4675
4697
|
execute(ctx: ToolContext, args: Record<string, unknown>): Promise<ToolResult>;
|
|
4676
4698
|
}
|
|
@@ -5344,4 +5366,4 @@ declare class TaskUpdateTool implements Tool {
|
|
|
5344
5366
|
execute(ctx: ToolContext, args: Record<string, unknown>): Promise<ToolResult>;
|
|
5345
5367
|
}
|
|
5346
5368
|
|
|
5347
|
-
export { ASYNC_AGENT_ALLOWED_TOOLS, Agent, type AgentConfig, type AgentDefinition, type AgentEvent, type AgentEventCallback, AgentEventLogger, type AgentEventSink, type AgentProgress, AgentProgressSchema, type AgentTask, AgentTool, AnthropicClient, type AppConfig, AskUserQuestionTool, type Asker, AuthenticationError, AutoCompactTrackingState, BASH_DESCRIPTION, BUILTIN_AGENTS, type Backup, BashTool, BwrapSandbox, CHARS_PER_TOKEN, COMPACT_BOUNDARY, CUSTOM_AGENT_DISALLOWED_TOOLS, CodeReviewManager, type CodeReviewMember, type CodeReviewTeam, type Command, type CommandContext, CommandRegistry, type CommandType, CommandUsageTracker, type CommentIssue, type CommentResolution, type CompactBoundaryPayload, type CompactResult, ConfigError, type ConnectResult, ContextTooLongError, ConversationManager, type CriticAssessment, type CriticEvaluation, DEFAULT_EAGER_THRESHOLD_PERCENT, type Decision, type DecisionEffect, type DetectedIde, type DiffResult, EDIT_FILE_DESCRIPTION, EditFileTool, EnterWorktreeTool, type EnvironmentContext, type EventLogger, type EventName, ExitPlanModeTool, ExitWorktreeTool, FORK_QUERY_SOURCE, type FileFeedback, FileHistory, type FileMailMessage, FileMailbox, FileStateCache, GLOB_DESCRIPTION, GREP_DESCRIPTION, GlobTool, GrepTool, type HookConfig, HookConfigSchema, type HookContext, HookEngine, type HookResult, INTERRUPTED_TOOL_RESULT, type IdeAtMention, type IdeConnection, ImageTooLargeError, InstallSkillTool, type InstructionSource, type KeptMessage, type LLMClient, LLMError, ListTeamsTool, LoadSkillTool, MAX_DIMENSION_PX, MAX_HISTORY_ENTRIES, MAX_IMAGES_PER_MESSAGE, MAX_IMAGE_BYTES_PASSTHROUGH, MCPClient, MCPManager, type MCPServerConfig, type MCPTool, type MCPToolLike, MCPToolWrapper, MCP_CALL_TOOL_NAME, MCP_NAME_SEP, MCP_TOOL_PREFIX, MSG_PLAN_APPROVAL_REQUEST, MSG_PLAN_APPROVAL_RESPONSE, MSG_SHUTDOWN_REQUEST, MSG_SHUTDOWN_RESPONSE, MSG_TEXT, type MaxTokensSetter, McpCallTool, type McpLoadingMode, type Member, MemoryConsolidator, MemoryExtractor, type MemoryFile, type MemoryHeader, MemoryManager, type Message, NATIVE_TOOL_USE_BETA, NameRegistry, NetworkError, OpenAIClient, OpenAICompatClient, type OpenAIMessageParam, POWERSHELL_DESCRIPTION, PathSandbox, PermissionChecker, type PermissionMode, PowerShellTool, type PrintArgs, PromptBuilder, type ProviderConfig, ProviderConfigSchema, type Question, type QuestionOption, READ_FILE_DESCRIPTION, REJECTED_TOOL_RESULT, RateLimitError, ReadFileTool, type RecallResult, RecoveryState, type RelevantMemory, type RemoteAgentHandle, RemoteServer, type RestoredMessage, type ReviewComment, type ReviewRequest, ReviewSession, type ReviewSummary, RuleEngine, type RunAgent, type RunCallbacks, SHUTDOWN_PREFIX, SKIP_DIRS, SUBAGENT_DISALLOWED_TOOLS, type Sandbox, type SandboxConfig, type SandboxYamlConfig, type SaveClipboardImageResult, SeatbeltSandbox, type Section, SendMessageTool, type SessionInfo, type SessionMessage, type SharedTask, SharedTaskStore, type Skill, SkillCatalog, type SkillForkHost, type SkillHost, type SkillMeta, type Snapshot, type SpawnConfig, SpawnTeammateTool, type Task$1 as StoredTask, type StreamEvent, StreamingExecutor, SyntheticOutputTool, TEAMMATE_DISALLOWED_TOOLS, TOOL_RESULT_PREVIEW_CHARS, TOOL_SEARCH_TOOL_NAME, type Task, TaskCreateTool$1 as TaskCreateTool, TaskGetTool$1 as TaskGetTool, TaskList, TaskListTool$1 as TaskListTool, TaskManager, type TaskStatus, TaskStopTool, TaskStore, type TaskUpdateFields, TaskUpdateTool$1 as TaskUpdateTool, Team, TeamCreateTool, TeamDeleteTool, type TeamFile, TeamManager, type TeamMemberEntry, TeamMemberEntrySchema, type TeamMode, TaskCreateTool as TeamTaskCreateTool, TaskGetTool as TeamTaskGetTool, TaskListTool as TeamTaskListTool, TaskUpdateTool as TeamTaskUpdateTool, type TeammateUIState, TeammateUIStateSchema, type ThinkingBlock, type Tool, type ToolActivity, ToolActivitySchema, type ToolCategory, type ToolContext, ToolRegistry, type ToolResult, type ToolResultBlock, type ToolResultContentBlock, type ToolResultRecord, type ToolSchema, ToolSearchTool, type ToolUseBlock, type ToolUseRecord, type TranscriptEntry, type UsageAnchor, type UsageInfo, WRITE_FILE_DESCRIPTION, WebSocketTransport, type WorktreeResult, WriteFileTool,
|
|
5369
|
+
export { ASYNC_AGENT_ALLOWED_TOOLS, Agent, type AgentConfig, type AgentDefinition, type AgentEvent, type AgentEventCallback, AgentEventLogger, type AgentEventSink, type AgentProgress, AgentProgressSchema, type AgentTask, AgentTool, AnthropicClient, type AppConfig, AskUserQuestionTool, type Asker, AuthenticationError, AutoCompactTrackingState, BASH_DESCRIPTION, BUILTIN_AGENTS, type Backup, BashTool, BwrapSandbox, CHARS_PER_TOKEN, COMPACT_BOUNDARY, CUSTOM_AGENT_DISALLOWED_TOOLS, CodeReviewManager, type CodeReviewMember, type CodeReviewTeam, type Command, type CommandContext, CommandRegistry, type CommandType, CommandUsageTracker, type CommentIssue, type CommentResolution, type CompactBoundaryPayload, type CompactResult, ConfigError, type ConnectResult, ContextTooLongError, ConversationManager, type CriticAssessment, type CriticEvaluation, DEFAULT_CONTEXT_WINDOW, DEFAULT_EAGER_THRESHOLD_PERCENT, DEFAULT_MAX_OUTPUT_TOKENS, DEFAULT_PROVIDER_THINKING, type Decision, type DecisionEffect, type DetectedIde, type DiffResult, EDIT_FILE_DESCRIPTION, EditFileTool, EnterWorktreeTool, type EnvironmentContext, type EventLogger, type EventName, ExitPlanModeTool, ExitWorktreeTool, FORK_QUERY_SOURCE, type FileFeedback, FileHistory, type FileMailMessage, FileMailbox, FileStateCache, GLOB_DESCRIPTION, GREP_DESCRIPTION, GlobTool, GrepTool, type HookConfig, HookConfigSchema, type HookContext, HookEngine, type HookResult, type HookRuntimeOptions, INTERRUPTED_TOOL_RESULT, type IdeAtMention, type IdeConnection, ImageTooLargeError, InstallSkillTool, type InstructionSource, type KeptMessage, type LLMClient, LLMError, ListTeamsTool, LoadSkillTool, MAX_DIMENSION_PX, MAX_HISTORY_ENTRIES, MAX_IMAGES_PER_MESSAGE, MAX_IMAGE_BYTES_PASSTHROUGH, MCPClient, MCPManager, type MCPServerConfig, type MCPTool, type MCPToolLike, MCPToolWrapper, MCP_CALL_TOOL_NAME, MCP_NAME_SEP, MCP_TOOL_PREFIX, MSG_PLAN_APPROVAL_REQUEST, MSG_PLAN_APPROVAL_RESPONSE, MSG_SHUTDOWN_REQUEST, MSG_SHUTDOWN_RESPONSE, MSG_TEXT, type MaxTokensSetter, McpCallTool, type McpLoadingMode, type Member, MemoryConsolidator, MemoryExtractor, type MemoryFile, type MemoryHeader, MemoryManager, type Message, NATIVE_TOOL_USE_BETA, NameRegistry, NetworkError, OpenAIClient, OpenAICompatClient, type OpenAIMessageParam, POWERSHELL_DESCRIPTION, PathSandbox, PermissionChecker, type PermissionMode, PowerShellTool, type PrintArgs, PromptBuilder, type ProviderConfig, ProviderConfigSchema, type Question, type QuestionOption, READ_FILE_DESCRIPTION, REJECTED_TOOL_RESULT, RateLimitError, ReadFileTool, type RecallResult, RecoveryState, type RelevantMemory, type RemoteAgentHandle, RemoteServer, type RestoredMessage, type ReviewComment, type ReviewRequest, ReviewSession, type ReviewSummary, RuleEngine, type RunAgent, type RunCallbacks, SHUTDOWN_PREFIX, SKIP_DIRS, SUBAGENT_DISALLOWED_TOOLS, type Sandbox, type SandboxConfig, type SandboxYamlConfig, type SaveClipboardImageResult, SeatbeltSandbox, type Section, SendMessageTool, type SessionInfo, type SessionMessage, type SharedTask, SharedTaskStore, type Skill, SkillCatalog, type SkillForkHost, type SkillHost, type SkillMeta, type Snapshot, type SpawnConfig, SpawnTeammateTool, type Task$1 as StoredTask, type StreamEvent, StreamingExecutor, type SubagentRunOptions, SyntheticOutputTool, TEAMMATE_DISALLOWED_TOOLS, TOOL_RESULT_PREVIEW_CHARS, TOOL_SEARCH_TOOL_NAME, type Task, TaskCreateTool$1 as TaskCreateTool, TaskGetTool$1 as TaskGetTool, TaskList, TaskListTool$1 as TaskListTool, TaskManager, type TaskStatus, TaskStopTool, TaskStore, type TaskUpdateFields, TaskUpdateTool$1 as TaskUpdateTool, Team, TeamCreateTool, TeamDeleteTool, type TeamFile, TeamManager, type TeamMemberEntry, TeamMemberEntrySchema, type TeamMode, TaskCreateTool as TeamTaskCreateTool, TaskGetTool as TeamTaskGetTool, TaskListTool as TeamTaskListTool, TaskUpdateTool as TeamTaskUpdateTool, type TeammateUIState, TeammateUIStateSchema, type ThinkingBlock, type Tool, type ToolActivity, ToolActivitySchema, type ToolCategory, type ToolContext, ToolRegistry, type ToolResult, type ToolResultBlock, type ToolResultContentBlock, type ToolResultRecord, type ToolSchema, ToolSearchTool, type ToolUseBlock, type ToolUseRecord, type TranscriptEntry, type UsageAnchor, type UsageInfo, WRITE_FILE_DESCRIPTION, WebSocketTransport, type WorktreeResult, WriteFileTool, append, applyBudget, applyMode, approved, asCriticEvaluation, asError, asErrorString, asImageMediaType, asRecord, asString, boolArg, buildAnthropicMessages, buildChatCompletionMessages, buildDiff, buildMcpToolName, buildOpenAIInput, buildPlanModeExitReminder, buildPlanModeReentryReminder, buildPlanModeReminder, buildSkillSection, buildSystemPrompt, buildTeammateRegistry, buildWorktreeNotice, cleanExpiredSessions, clipboardImageFileName, cloneRegistryForFork, closeLogger, coerceBySchema, computeCompactThreshold, computeKeepStartIndex, connectToIde, contentToText, coordinatorActive, coordinatorReminder, coordinatorToolFilter, createAgentWorktree, createChildLogger, createClient, createDefaultCodeReviewTeam, createDefaultRegistry, createModelResolver, createProgress, createRemoteAgent, createSandbox, currentContextTokens, decideAndApply, decideMode, detectBackend, detectBackendFromEnv, detectEnvironment, detectIde, discoverInstructions, doingTasksSection, ensureToolPairing, environmentSection, estimateMessages, estimateSchemaTokens, estimateTokens, evaluateRules, executingActionsSection, expandAtRefs, expandAtRefsWithImages, extractContent, fetchModelContextWindow, fileHistoryDir, filterToolsForAgent, forceCompact, forkEnabled, formatTokens, getContextWindow, getCurrentBranch, getCurrentPlanPath, getMaxOutputTokens, getMediaType, getNameRegistry, getOrCreatePlanPath, getSessionFilePath, handleCodeReviewCommand, hasWorktreeChanges, identitySection, initLogger, intArg, isCoordinatorTool, isCriticEvaluation, isDiffTool, isImagePath, isMcpToolLike, isObject, isOfficialAnthropicEndpoint, isPngBuffer, isRecord, isSafeCommand, isShutdownRequest, isSpillReadback, isToolResultContentBlock, listSessions, load, loadAgentDefinitions, loadConfig, loadImageAttachment, loadInstructions, loadPlan, loadSession, loadTranscript, loadUserCommands, logger, manageContext, markLastUserTailForCache, markToolsForCache, maybeResizeAndDownsampleImage, mcpCallPermissionContent, mcpContentToToolOutput, mcpToolNamePrefix, measureSchemaChars, memoryAge, memoryAgeDays, memoryFreshnessText, mergeConfig, needsToolSearchBeta, newRequestId, newSessionId, normalizeToolResultContentBlock, outputEfficiencySection, parse, parsePrintFlags, parseSkillFile, parseTeammateFlags, persistLargeResult, planApprovalRequest, planApprovalResponse, planExists, quickSort, randomCompletionVerb, randomVerb, readTeamFile, readWorktreeHeadSha, rebuildFromSession, record, recordError, recordExit, recordTokens, recordToolUse, recover, removeAgentWorktree, renderBody, replaceToolResultContent, resetPlanPath, resolveAPIKey, resolveGitDir, resolveModelId, runFork, runInline, runPrintMode, runTeammate, safeJSONParse, sanitizeNameSegment, sanitizeSegment, sanitizeTeamName, saveClipboardImage, saveCompactBoundary, saveMessage, savePlan, saveTranscript, shutdownRequest, shutdownResponse, sniffMediaType, spawnSubagent, spawnTeammate, storeClipboardImage, strArg, strList, summarizeActivities, systemSection, teamConfigPath, teamDir, teamsBaseDir, toDisplayPreview, toTry, toneStyleSection, toolResultsToRecords, toolUsesToRecords, usingToolsSection, validate, version, withProviderDefaults, writeTeamFile };
|