@nuvin/agent-core 0.0.0-rc.0
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/VERSION +4 -0
- package/dist/agent/index.d.ts +19 -0
- package/dist/agent/index.js +1 -0
- package/dist/chunk-C6OLKGP6.js +1 -0
- package/dist/chunk-EJTTW4JQ.js +1 -0
- package/dist/chunk-NYZR4XKO.js +1 -0
- package/dist/chunk-U2BLX7Y5.js +1 -0
- package/dist/chunk-X7VAACWY.js +1 -0
- package/dist/formats/index.d.ts +25 -0
- package/dist/formats/index.js +1 -0
- package/dist/models/index.d.ts +344 -0
- package/dist/models/index.js +1 -0
- package/dist/provider-adapters-BHDQNPHa.d.ts +5 -0
- package/dist/shared/index.d.ts +17 -0
- package/dist/shared/index.js +1 -0
- package/dist/tools/index.d.ts +309 -0
- package/dist/tools/index.js +1 -0
- package/dist/types-BueDJWnx.d.ts +675 -0
- package/package.json +63 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { D as AutoReasoningEffort, u as ReasoningConfig, F as AnthropicThinkingConfig, G as OpenAiReasoningConfig } from '../types-BueDJWnx.js';
|
|
2
|
+
export { aF as AgentAssistantChunkEvent, aE as AgentAssistantMessageEvent, b9 as AgentDefinition, b8 as AgentDefinitionFactoryContext, aQ as AgentEvent, au as AgentEventContext, aU as AgentEventHandler, aN as AgentFinalMessageEvent, a as AgentInput, aP as AgentLifecycleEvent, aC as AgentModelRequestEvent, aD as AgentModelResponseEvent, A as AgentOptions, aJ as AgentReasoningChunkEvent, aI as AgentReasoningMessageEvent, b as AgentSendOptions, aK as AgentToolCallEvent, aL as AgentToolResultEvent, aM as AgentToolResultMessageEvent, aH as AgentToolUseChunkEvent, aG as AgentToolUseMessageEvent, aO as AgentTurnCompleteEvent, aB as AgentUserMessageEvent, a7 as AnthropicAdaptiveThinkingConfig, a1 as AnthropicAssistantContentBlock, a8 as AnthropicDisabledThinkingConfig, a6 as AnthropicEnabledThinkingConfig, Y as AnthropicRedactedThinkingBlock, a0 as AnthropicRedactedThinkingWireBlock, ak as AnthropicSignatureDeltaChunk, X as AnthropicThinkingBlock, aj as AnthropicThinkingDeltaChunk, a4 as AnthropicThinkingDisplay, a5 as AnthropicThinkingEffort, $ as AnthropicThinkingWireBlock, b7 as AnyExtensionRegistration, a_ as AnyToolDefinition, ac as AssistantContentBlock, a3 as AutoReasoningConfig, B as BaseChatModelOptions, at as ChatModel, j as ChatRequest, l as ChatResponse, v as ChatResponseChunk, h as CompileRequestInput, f as ContentBlock, ah as ContentDeltaChunk, C as ContentInput, bh as CreateManagedRunInput, t as EngineChatModel, b1 as ExtensionContext, b6 as ExtensionRegistration, E as ExtensionRegistry, ae as IdentifiedMessage, aW as InferJsonSchema, H as JsonObject, J as JsonPrimitive, W as JsonSchema, U as JsonSchemaArray, Q as JsonSchemaBoolean, N as JsonSchemaNumber, V as JsonSchemaObject, L as JsonSchemaString, K as JsonSchemaType, I as JsonValue, bc as ManagedAgentRun, bd as ManagedAgentRunHandle, bb as ManagedRunError, be as ManagedRunEvent, bf as ManagedRunEventHandler, ba as ManagedRunStatus, M as Message, g as MessageInput, ab as MessageProviderState, ad as MessageRole, w as ModelExecutionOptions, x as ModelInfo, an as ModelLimits, i as ModelRequest, k as ModelResponse, b3 as Observer, b5 as ObserverExtensionRegistration, bk as OpenAiFunctionCall, bl as OpenAiFunctionCallOutput, bs as OpenAiFunctionTool, bj as OpenAiInputMessage, bi as OpenAiInputText, bo as OpenAiOutputMessage, bm as OpenAiOutputTextPart, _ as OpenAiReasoningBlock, al as OpenAiReasoningDeltaChunk, a9 as OpenAiReasoningEffort, bp as OpenAiReasoningOutputItem, aa as OpenAiReasoningSummary, am as OpenAiReasoningSummaryDeltaChunk, Z as OpenAiReasoningSummaryText, bn as OpenAiRefusalPart, bq as OpenAiResponsesOutputItem, br as OpenAiResponsesReasoningParam, O as OpenAiResponsesRequest, b0 as PayloadByStage, as as PrepareRequestInput, r as PreparedRequest, s as ProviderCredential, y as ProviderCredentialKind, z as ProviderEndpoints, q as ProviderRequestMutator, P as ProviderSessionResolver, a2 as ReasoningVisibility, p as ResolvedProviderSession, R as RunTurnDeps, bg as RuntimeManagerOptions, a$ as Stage, S as SystemInput, e as TextBlock, aZ as ToolDefinition, av as ToolExecutionContext, aY as ToolGenerator, aq as ToolOutputEnvelope, aX as ToolOutputValue, o as ToolResult, n as ToolResultBlock, ap as ToolResultChunk, ao as ToolResultMeta, aV as ToolRuntime, ay as ToolRuntimeCompletedEvent, aR as ToolRuntimeDispatchDecision, aA as ToolRuntimeEvent, aT as ToolRuntimeEventHandler, ax as ToolRuntimeOutputChunkEvent, az as ToolRuntimeRejectedEvent, aw as ToolRuntimeStartedEvent, aS as ToolRuntimeToolCallHandler, af as ToolSchema, m as ToolUseBlock, ai as ToolUseDeltaChunk, b2 as Transformer, b4 as TransformerExtensionRegistration, c as TurnInput, T as TurnResult, ar as TurnResultStatus, d as TurnState, ag as Usage } from '../types-BueDJWnx.js';
|
|
3
|
+
|
|
4
|
+
declare class OperationAbortedError extends Error {
|
|
5
|
+
readonly code = "ABORT_ERR";
|
|
6
|
+
constructor(message?: string);
|
|
7
|
+
}
|
|
8
|
+
declare function toAbortError(reason: unknown): Error;
|
|
9
|
+
declare function isAbortError(error: unknown): boolean;
|
|
10
|
+
declare function throwIfAborted(signal?: AbortSignal): void;
|
|
11
|
+
declare function addAbortListener(signal: AbortSignal | undefined, onAbort: () => void): () => void;
|
|
12
|
+
|
|
13
|
+
declare function mapAutoReasoningEffortToBudgetTokens(effort: AutoReasoningEffort): number;
|
|
14
|
+
declare function resolveAnthropicThinkingConfig(reasoning: ReasoningConfig | undefined): AnthropicThinkingConfig | undefined;
|
|
15
|
+
declare function resolveOpenAiReasoningConfig(reasoning: ReasoningConfig | undefined): OpenAiReasoningConfig | undefined;
|
|
16
|
+
|
|
17
|
+
export { AnthropicThinkingConfig, AutoReasoningEffort, OpenAiReasoningConfig, OperationAbortedError, ReasoningConfig, addAbortListener, isAbortError, mapAutoReasoningEffortToBudgetTokens, resolveAnthropicThinkingConfig, resolveOpenAiReasoningConfig, throwIfAborted, toAbortError };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x12e2(){var _0x54425a=['nduZmtG0ofvMu1HlvG','mtG1nJGWnhP1zKnrzW','mJy1mJfUDLnYD1u','mujYANzbzG','mJeZotuXnKj4Bg5bsq','nJm5v1vRwvfQ','ndq2mde5yuzODgD0','nZKWohvtCvPnCW','mJruqMXkz2m','nxPKrMLfvG','mtmYntCWtgLIy3LX','mZyYmtiYEwjdBhDy'];_0x12e2=function(){return _0x54425a;};return _0x12e2();}(function(_0x2d5569,_0x216f6e){var _0x1c4ec1={_0x1b7536:0x283,_0x5566d9:0x287,_0x195e12:0x4ff,_0x3d82ef:0x503,_0x4a19fc:0x502,_0x28e319:0x4f8,_0x292e7b:0x4f4,_0x457404:0x4f3,_0x21d2e6:0x4fb,_0x3f699:0x280,_0x2cece4:0x281,_0x3a0fdb:0x27c,_0x73f0c4:0x289,_0x2f75d5:0x287,_0x29b8af:0x4fa,_0x572f77:0x4fd,_0x572c98:0x4fd,_0x2cc88b:0x28c,_0x5531c9:0x282},_0x52265a={_0x451f6e:0x336};function _0x1f401f(_0x573741,_0xf5a9cd,_0x5754ef,_0x3be0a7){return _0xdcb4(_0x573741-_0x52265a._0x451f6e,_0xf5a9cd);}var _0x163090=_0x2d5569();function _0x39f551(_0x4971a6,_0x1ce819,_0x13bc23,_0x31d60a){return _0xdcb4(_0x1ce819-0xc2,_0x4971a6);}while(!![]){try{var _0x37afca=parseInt(_0x39f551(0x282,_0x1c4ec1._0x1b7536,_0x1c4ec1._0x5566d9,0x288))/0x1*(parseInt(_0x1f401f(_0x1c4ec1._0x195e12,0x504,_0x1c4ec1._0x3d82ef,_0x1c4ec1._0x4a19fc))/0x2)+-parseInt(_0x1f401f(_0x1c4ec1._0x28e319,_0x1c4ec1._0x292e7b,_0x1c4ec1._0x457404,_0x1c4ec1._0x21d2e6))/0x3+parseInt(_0x39f551(_0x1c4ec1._0x3f699,_0x1c4ec1._0x2cece4,_0x1c4ec1._0x3a0fdb,0x27b))/0x4*(-parseInt(_0x39f551(0x28d,_0x1c4ec1._0x73f0c4,0x28c,_0x1c4ec1._0x2f75d5))/0x5)+-parseInt(_0x1f401f(0x4fc,_0x1c4ec1._0x29b8af,0x501,0x4f6))/0x6*(-parseInt(_0x1f401f(0x4fa,_0x1c4ec1._0x572f77,_0x1c4ec1._0x572c98,0x4f6))/0x7)+parseInt(_0x39f551(0x28a,_0x1c4ec1._0x2cc88b,0x288,0x286))/0x8+-parseInt(_0x39f551(_0x1c4ec1._0x73f0c4,0x285,_0x1c4ec1._0x3f699,0x283))/0x9*(parseInt(_0x39f551(0x286,0x28a,0x286,_0x1c4ec1._0x2f75d5))/0xa)+-parseInt(_0x39f551(0x288,_0x1c4ec1._0x5531c9,0x27e,0x27f))/0xb*(-parseInt(_0x39f551(0x28b,0x287,0x284,0x281))/0xc);if(_0x37afca===_0x216f6e)break;else _0x163090['push'](_0x163090['shift']());}catch(_0x2dfa54){_0x163090['push'](_0x163090['shift']());}}}(_0x12e2,0x7363f));function _0xdcb4(_0x227c97,_0x5adee4){_0x227c97=_0x227c97-0x1bf;var _0x12e277=_0x12e2();var _0xdcb404=_0x12e277[_0x227c97];if(_0xdcb4['RHJFZA']===undefined){var _0x1adb61=function(_0x461385){var _0x47618c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x277de7='',_0x38d230='';for(var _0xbb77c8=0x0,_0x18464c,_0x3c8b35,_0x4c42e0=0x0;_0x3c8b35=_0x461385['charAt'](_0x4c42e0++);~_0x3c8b35&&(_0x18464c=_0xbb77c8%0x4?_0x18464c*0x40+_0x3c8b35:_0x3c8b35,_0xbb77c8++%0x4)?_0x277de7+=String['fromCharCode'](0xff&_0x18464c>>(-0x2*_0xbb77c8&0x6)):0x0){_0x3c8b35=_0x47618c['indexOf'](_0x3c8b35);}for(var _0x3680c=0x0,_0x38226f=_0x277de7['length'];_0x3680c<_0x38226f;_0x3680c++){_0x38d230+='%'+('00'+_0x277de7['charCodeAt'](_0x3680c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x38d230);};_0xdcb4['FGeYrZ']=_0x1adb61,_0xdcb4['WuxcAL']={},_0xdcb4['RHJFZA']=!![];}var _0x3213ce=_0x12e277[0x0],_0x446830=_0x227c97+_0x3213ce,_0xb311cf=_0xdcb4['WuxcAL'][_0x446830];return!_0xb311cf?(_0xdcb404=_0xdcb4['FGeYrZ'](_0xdcb404),_0xdcb4['WuxcAL'][_0x446830]=_0xdcb404):_0xdcb404=_0xb311cf,_0xdcb404;}import{mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig}from'../chunk-NYZR4XKO.js';import{OperationAbortedError,addAbortListener,isAbortError,throwIfAborted,toAbortError}from'../chunk-X7VAACWY.js';export{OperationAbortedError,addAbortListener,isAbortError,mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig,throwIfAborted,toAbortError};
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { aZ as ToolDefinition, aq as ToolOutputEnvelope, a_ as AnyToolDefinition, aT as ToolRuntimeEventHandler, aS as ToolRuntimeToolCallHandler, aV as ToolRuntime, b8 as AgentDefinitionFactoryContext, A as AgentOptions, aX as ToolOutputValue, ap as ToolResultChunk, H as JsonObject, V as JsonSchemaObject, aW as InferJsonSchema, av as ToolExecutionContext, af as ToolSchema, I as JsonValue } from '../types-BueDJWnx.js';
|
|
2
|
+
|
|
3
|
+
interface BashToolInput {
|
|
4
|
+
command: string;
|
|
5
|
+
cwd?: string;
|
|
6
|
+
timeoutMs?: number;
|
|
7
|
+
ignoreOutput?: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface BashToolOptions {
|
|
10
|
+
defaultCwd?: string;
|
|
11
|
+
defaultTimeoutMs?: number;
|
|
12
|
+
description?: string;
|
|
13
|
+
env?: NodeJS.ProcessEnv;
|
|
14
|
+
name?: string;
|
|
15
|
+
shellPath?: string;
|
|
16
|
+
stripAnsi?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare function createBashTool(options?: BashToolOptions): ToolDefinition<{
|
|
19
|
+
command: string;
|
|
20
|
+
cwd?: string | undefined;
|
|
21
|
+
timeoutMs?: number | undefined;
|
|
22
|
+
ignoreOutput?: boolean | undefined;
|
|
23
|
+
}, string, ToolOutputEnvelope, {
|
|
24
|
+
type: "object";
|
|
25
|
+
properties: {
|
|
26
|
+
command: {
|
|
27
|
+
type: "string";
|
|
28
|
+
};
|
|
29
|
+
cwd: {
|
|
30
|
+
type: "string";
|
|
31
|
+
};
|
|
32
|
+
timeoutMs: {
|
|
33
|
+
type: "number";
|
|
34
|
+
};
|
|
35
|
+
ignoreOutput: {
|
|
36
|
+
type: "boolean";
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
required: readonly ["command"];
|
|
40
|
+
}>;
|
|
41
|
+
declare function createShellExecTool(options?: BashToolOptions): ToolDefinition<{
|
|
42
|
+
command: string;
|
|
43
|
+
cwd?: string | undefined;
|
|
44
|
+
timeoutMs?: number | undefined;
|
|
45
|
+
ignoreOutput?: boolean | undefined;
|
|
46
|
+
}, string, ToolOutputEnvelope, {
|
|
47
|
+
type: "object";
|
|
48
|
+
properties: {
|
|
49
|
+
command: {
|
|
50
|
+
type: "string";
|
|
51
|
+
};
|
|
52
|
+
cwd: {
|
|
53
|
+
type: "string";
|
|
54
|
+
};
|
|
55
|
+
timeoutMs: {
|
|
56
|
+
type: "number";
|
|
57
|
+
};
|
|
58
|
+
ignoreOutput: {
|
|
59
|
+
type: "boolean";
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
required: readonly ["command"];
|
|
63
|
+
}>;
|
|
64
|
+
|
|
65
|
+
interface FileEditToolOptions {
|
|
66
|
+
defaultCwd?: string;
|
|
67
|
+
name?: string;
|
|
68
|
+
}
|
|
69
|
+
declare function createFileEditTool(options?: FileEditToolOptions): ToolDefinition<{
|
|
70
|
+
filePath: string;
|
|
71
|
+
oldText: string;
|
|
72
|
+
newText: string;
|
|
73
|
+
dryRun?: boolean | undefined;
|
|
74
|
+
}, ToolOutputEnvelope, undefined, {
|
|
75
|
+
type: "object";
|
|
76
|
+
properties: {
|
|
77
|
+
filePath: {
|
|
78
|
+
type: "string";
|
|
79
|
+
};
|
|
80
|
+
oldText: {
|
|
81
|
+
type: "string";
|
|
82
|
+
};
|
|
83
|
+
newText: {
|
|
84
|
+
type: "string";
|
|
85
|
+
};
|
|
86
|
+
dryRun: {
|
|
87
|
+
type: "boolean";
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
required: readonly ["filePath", "oldText", "newText"];
|
|
91
|
+
}>;
|
|
92
|
+
|
|
93
|
+
interface FileNewToolOptions {
|
|
94
|
+
defaultCwd?: string;
|
|
95
|
+
name?: string;
|
|
96
|
+
}
|
|
97
|
+
declare function createFileNewTool(options?: FileNewToolOptions): ToolDefinition<{
|
|
98
|
+
filePath: string;
|
|
99
|
+
content: string;
|
|
100
|
+
}, ToolOutputEnvelope, undefined, {
|
|
101
|
+
type: "object";
|
|
102
|
+
properties: {
|
|
103
|
+
filePath: {
|
|
104
|
+
type: "string";
|
|
105
|
+
};
|
|
106
|
+
content: {
|
|
107
|
+
type: "string";
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
required: readonly ["filePath", "content"];
|
|
111
|
+
}>;
|
|
112
|
+
|
|
113
|
+
interface FileReadToolOptions {
|
|
114
|
+
defaultCwd?: string;
|
|
115
|
+
name?: string;
|
|
116
|
+
}
|
|
117
|
+
declare function createFileReadTool(options?: FileReadToolOptions): ToolDefinition<{
|
|
118
|
+
path: string;
|
|
119
|
+
lineStart?: number | undefined;
|
|
120
|
+
lineEnd?: number | undefined;
|
|
121
|
+
}, ToolOutputEnvelope, undefined, {
|
|
122
|
+
type: "object";
|
|
123
|
+
properties: {
|
|
124
|
+
path: {
|
|
125
|
+
type: "string";
|
|
126
|
+
};
|
|
127
|
+
lineStart: {
|
|
128
|
+
type: "number";
|
|
129
|
+
};
|
|
130
|
+
lineEnd: {
|
|
131
|
+
type: "number";
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
required: readonly ["path"];
|
|
135
|
+
}>;
|
|
136
|
+
|
|
137
|
+
interface GlobToolOptions {
|
|
138
|
+
defaultCwd?: string;
|
|
139
|
+
limit?: number;
|
|
140
|
+
name?: string;
|
|
141
|
+
}
|
|
142
|
+
declare function createGlobTool(options?: GlobToolOptions): ToolDefinition<{
|
|
143
|
+
pattern: string;
|
|
144
|
+
path?: string | undefined;
|
|
145
|
+
limit?: number | undefined;
|
|
146
|
+
}, ToolOutputEnvelope, undefined, {
|
|
147
|
+
type: "object";
|
|
148
|
+
properties: {
|
|
149
|
+
pattern: {
|
|
150
|
+
type: "string";
|
|
151
|
+
};
|
|
152
|
+
path: {
|
|
153
|
+
type: "string";
|
|
154
|
+
};
|
|
155
|
+
limit: {
|
|
156
|
+
type: "number";
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
required: readonly ["pattern"];
|
|
160
|
+
}>;
|
|
161
|
+
|
|
162
|
+
interface GrepToolOptions {
|
|
163
|
+
defaultCwd?: string;
|
|
164
|
+
limit?: number;
|
|
165
|
+
name?: string;
|
|
166
|
+
}
|
|
167
|
+
declare function createGrepTool(options?: GrepToolOptions): ToolDefinition<{
|
|
168
|
+
pattern: string;
|
|
169
|
+
path?: string | undefined;
|
|
170
|
+
limit?: number | undefined;
|
|
171
|
+
include?: string | undefined;
|
|
172
|
+
context?: number | undefined;
|
|
173
|
+
}, ToolOutputEnvelope, undefined, {
|
|
174
|
+
type: "object";
|
|
175
|
+
properties: {
|
|
176
|
+
pattern: {
|
|
177
|
+
type: "string";
|
|
178
|
+
};
|
|
179
|
+
path: {
|
|
180
|
+
type: "string";
|
|
181
|
+
};
|
|
182
|
+
include: {
|
|
183
|
+
type: "string";
|
|
184
|
+
};
|
|
185
|
+
limit: {
|
|
186
|
+
type: "number";
|
|
187
|
+
};
|
|
188
|
+
context: {
|
|
189
|
+
type: "number";
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
required: readonly ["pattern"];
|
|
193
|
+
}>;
|
|
194
|
+
|
|
195
|
+
interface InternalToolRuntimeOptions {
|
|
196
|
+
onEvent?: ToolRuntimeEventHandler;
|
|
197
|
+
onToolCall?: ToolRuntimeToolCallHandler;
|
|
198
|
+
}
|
|
199
|
+
declare function createInternalToolRuntime(tools?: AnyToolDefinition[], options?: InternalToolRuntimeOptions): ToolRuntime;
|
|
200
|
+
|
|
201
|
+
interface LsToolOptions {
|
|
202
|
+
defaultCwd?: string;
|
|
203
|
+
name?: string;
|
|
204
|
+
}
|
|
205
|
+
declare function createLsTool(options?: LsToolOptions): ToolDefinition<{
|
|
206
|
+
path: string;
|
|
207
|
+
limit: number;
|
|
208
|
+
}, ToolOutputEnvelope, undefined, {
|
|
209
|
+
type: "object";
|
|
210
|
+
properties: {
|
|
211
|
+
path: {
|
|
212
|
+
type: "string";
|
|
213
|
+
};
|
|
214
|
+
limit: {
|
|
215
|
+
type: "number";
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
}>;
|
|
219
|
+
|
|
220
|
+
declare function createMockToolRuntime(): ToolRuntime;
|
|
221
|
+
|
|
222
|
+
type RipgrepMatch = {
|
|
223
|
+
filePath: string;
|
|
224
|
+
isContext?: boolean;
|
|
225
|
+
lineNum: number;
|
|
226
|
+
lineText: string;
|
|
227
|
+
};
|
|
228
|
+
declare function filepath(): Promise<string>;
|
|
229
|
+
declare function files(opts: {
|
|
230
|
+
cwd: string;
|
|
231
|
+
glob?: string[];
|
|
232
|
+
}): AsyncGenerator<string>;
|
|
233
|
+
declare function search(opts: {
|
|
234
|
+
context?: number;
|
|
235
|
+
cwd: string;
|
|
236
|
+
file?: string;
|
|
237
|
+
glob?: string;
|
|
238
|
+
limit?: number;
|
|
239
|
+
pattern: string;
|
|
240
|
+
}): Promise<RipgrepMatch[]>;
|
|
241
|
+
|
|
242
|
+
interface DelegatedAgentFactoryContext extends AgentDefinitionFactoryContext {
|
|
243
|
+
parentSessionId: string;
|
|
244
|
+
runId: string;
|
|
245
|
+
}
|
|
246
|
+
type DelegatedAgentDefinition = AgentOptions | ((ctx: DelegatedAgentFactoryContext) => AgentOptions | Promise<AgentOptions>);
|
|
247
|
+
interface CreateDelegationToolsOptions {
|
|
248
|
+
agents?: Record<string, DelegatedAgentDefinition>;
|
|
249
|
+
}
|
|
250
|
+
declare function createAssignTaskTool(options: CreateDelegationToolsOptions): ToolDefinition<{
|
|
251
|
+
agentId: string;
|
|
252
|
+
task: string;
|
|
253
|
+
}, ToolOutputEnvelope, ToolOutputEnvelope, {
|
|
254
|
+
type: "object";
|
|
255
|
+
properties: {
|
|
256
|
+
agentId: {
|
|
257
|
+
type: "string";
|
|
258
|
+
};
|
|
259
|
+
task: {
|
|
260
|
+
type: "string";
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
required: string[];
|
|
264
|
+
}>;
|
|
265
|
+
declare const createDelegateToAgentTool: typeof createAssignTaskTool;
|
|
266
|
+
declare function createDelegationTools(options: CreateDelegationToolsOptions): ToolDefinition<{
|
|
267
|
+
agentId: string;
|
|
268
|
+
task: string;
|
|
269
|
+
}, ToolOutputEnvelope, ToolOutputEnvelope, {
|
|
270
|
+
type: "object";
|
|
271
|
+
properties: {
|
|
272
|
+
agentId: {
|
|
273
|
+
type: "string";
|
|
274
|
+
};
|
|
275
|
+
task: {
|
|
276
|
+
type: "string";
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
required: string[];
|
|
280
|
+
}>[];
|
|
281
|
+
|
|
282
|
+
declare function normalizeToolOutputValue(output: ToolOutputValue): ToolResultChunk;
|
|
283
|
+
declare function createToolOutput(output: string, structured?: JsonObject): ToolOutputEnvelope;
|
|
284
|
+
declare class ToolExecutionError extends Error {
|
|
285
|
+
readonly structured: JsonObject;
|
|
286
|
+
constructor(message: string, structured?: JsonObject);
|
|
287
|
+
}
|
|
288
|
+
declare function defineTool<TSchema extends JsonSchemaObject, TYield extends ToolOutputValue = ToolOutputValue, TReturn extends ToolOutputValue | undefined = ToolOutputValue | undefined>(definition: {
|
|
289
|
+
name: string;
|
|
290
|
+
description: string;
|
|
291
|
+
inputSchema: TSchema;
|
|
292
|
+
execute(input: InferJsonSchema<TSchema>, ctx: ToolExecutionContext): AsyncGenerator<TYield, TReturn, void>;
|
|
293
|
+
}): ToolDefinition<InferJsonSchema<TSchema>, TYield, TReturn, TSchema>;
|
|
294
|
+
declare class ToolRegistry {
|
|
295
|
+
private readonly toolsByName;
|
|
296
|
+
constructor(tools?: AnyToolDefinition[]);
|
|
297
|
+
register(tool: AnyToolDefinition): void;
|
|
298
|
+
get(name: string): AnyToolDefinition | undefined;
|
|
299
|
+
list(): AnyToolDefinition[];
|
|
300
|
+
listToolSchemas(): ToolSchema[];
|
|
301
|
+
}
|
|
302
|
+
declare function validateToolInput<TSchema extends JsonSchemaObject>(input: JsonValue, schema: TSchema): InferJsonSchema<TSchema>;
|
|
303
|
+
declare function deriveFinalToolOutput(chunks: ToolResultChunk[]): ToolResultChunk;
|
|
304
|
+
|
|
305
|
+
declare function resolveWorkspacePath(rootDir: string, inputPath: string): string;
|
|
306
|
+
declare function assertWorkspaceFile(filePath: string): Promise<void>;
|
|
307
|
+
declare function isProbablyBinary(buffer: Buffer): boolean;
|
|
308
|
+
|
|
309
|
+
export { type BashToolInput, type BashToolOptions, type CreateDelegationToolsOptions, type DelegatedAgentDefinition, type DelegatedAgentFactoryContext, type FileEditToolOptions, type FileNewToolOptions, type FileReadToolOptions, type GlobToolOptions, type GrepToolOptions, type LsToolOptions, type RipgrepMatch, ToolExecutionError, ToolRegistry, assertWorkspaceFile, createAssignTaskTool, createBashTool, createDelegateToAgentTool, createDelegationTools, createFileEditTool, createFileNewTool, createFileReadTool, createGlobTool, createGrepTool, createInternalToolRuntime, createLsTool, createMockToolRuntime, createShellExecTool, createToolOutput, defineTool, deriveFinalToolOutput, filepath, files, isProbablyBinary, normalizeToolOutputValue, resolveWorkspacePath, search, validateToolInput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0xa4c7a0,_0x372e8e){const _0x488dc8={_0x19b44c:0x40e,_0x495002:0x3ca,_0x454c3e:0x384,_0x82abe2:0x3c8,_0x2e97f8:0x402,_0x3fcb2c:0x3d6,_0x5ee9ec:0x3ec,_0x2b7e81:0x3d0,_0x4d8a1f:0x38f,_0x4f1365:0x32c,_0x31ec4b:0x394,_0x22fc35:0x354,_0x3b8611:0x412,_0xce374:0x3b1,_0x2a455a:0x3ff,_0x3c6667:0x441,_0x1b0bc1:0x404,_0x534fa0:0x3ee},_0x1245b2={_0x57e3ab:0x1e7};function _0x1221a1(_0x2d5bcc,_0x30ab54,_0x5c9335,_0xd84154){return _0xdaaf(_0x30ab54-_0x1245b2._0x57e3ab,_0x2d5bcc);}const _0x72d5e2=_0xa4c7a0();function _0x1dcc07(_0x444c45,_0x2d88c3,_0x1eaa0d,_0x4b9aa3){return _0xdaaf(_0x2d88c3-0x1c6,_0x4b9aa3);}while(!![]){try{const _0x13f1b5=-parseInt(_0x1221a1(_0x488dc8._0x19b44c,_0x488dc8._0x495002,_0x488dc8._0x454c3e,_0x488dc8._0x82abe2))/0x1+parseInt(_0x1dcc07(0x460,0x40e,0x417,0x3bc))/0x2*(parseInt(_0x1221a1(_0x488dc8._0x2e97f8,0x458,0x413,0x417))/0x3)+parseInt(_0x1221a1(0x421,_0x488dc8._0x3fcb2c,0x412,_0x488dc8._0x5ee9ec))/0x4*(-parseInt(_0x1221a1(0x38f,_0x488dc8._0x2b7e81,0x3ee,_0x488dc8._0x4d8a1f))/0x5)+-parseInt(_0x1221a1(_0x488dc8._0x4f1365,_0x488dc8._0x31ec4b,_0x488dc8._0x22fc35,0x37b))/0x6+-parseInt(_0x1dcc07(0x35d,0x387,0x38d,0x3a7))/0x7+-parseInt(_0x1dcc07(0x352,0x398,0x36a,0x34f))/0x8*(parseInt(_0x1221a1(_0x488dc8._0x3b8611,0x3be,0x3fa,_0x488dc8._0xce374))/0x9)+-parseInt(_0x1221a1(_0x488dc8._0x2a455a,_0x488dc8._0x3c6667,0x3f3,0x479))/0xa*(-parseInt(_0x1dcc07(0x455,_0x488dc8._0x1b0bc1,0x448,_0x488dc8._0x534fa0))/0xb);if(_0x13f1b5===_0x372e8e)break;else _0x72d5e2['push'](_0x72d5e2['shift']());}catch(_0x44e4fa){_0x72d5e2['push'](_0x72d5e2['shift']());}}}(_0x39d0,0xda6c6));import{Agent,ToolExecutionError,ToolRegistry,createInternalToolRuntime,createToolOutput,defineTool,deriveFinalToolOutput,normalizeToolOutputValue,validateToolInput}from'../chunk-EJTTW4JQ.js';import{getTextFromMessage}from'../chunk-C6OLKGP6.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'../chunk-X7VAACWY.js';function _0x39d0(){const _0x26b7be=['ugf0AcbPCYbUB3qGysbMAwXLoIa','igzHAwXLzc4','zMLSzq','zxHPDcbJB2rLia','ru5pru5u','u2vHCMnOigzVCIbHihjLz2v4ihbHDhrLCM4GAw4GD29YA3nWywnLigzPBguGy29UDgvUDhmU','ugfJA2fNzxm','C3jJl2zVCM1HDhmVChjVDMLKzxiTywrHChrLCNmUDgvZDc50CW','zNjVBq','Aw5KzxHpzG','CgLK','CMfUzg9T','tM8GBwf0y2HLCYbMB3vUzcbMB3iGCgf0DgvYBJOG','z2XVyG','ls1NBg9I','mteYotK3nvnPweHwtW','yxnZAwDU','A2LSBa','rxHLy3v0zsbHihnOzwXSignVBw1HBMqGD2L0Acb0Aw1LB3v0ihbYB3rLy3rPB24UienHChr1CMvZihn0zg91DcbHBMqGC3rKzxjYlIbeBYbUB3qGDxnLigzVCIbPBNrLCMfJDgL2zsbJB21Tyw5KCYb0Agf0ihjLCxvPCMuGDxnLCIbPBNb1Dc4','y29Kzq','B2zM','BNvTyMvY','DxbKyxrL','CNvUswq','C3jJl21VzgvSCY9HBNrOCM9WAwmTBw9KzwWUDhm','u2HLBgWGBM90igzVDw5KoIa','y21KlMv4zq','C3rYAw5N','Cgf0DgvYBIbPCYbYzxf1AxjLza','zNvUy3rPB24','cIHszxn1BhrZigfYzsb0CNvUy2f0zwqUienVBNnPzgvYihvZAw5NigeGBw9YzsbZCgvJAwzPyYbWyxrOig9YihbHDhrLCM4Ukq','l3vZCI9IAw4VyMfZAa','mJrrrKPVu1O','ls1NBg9IpseUz2L0lYO','B3v0Chv0','AgfZ','z2v0','mtmXmJi5ow5JwNLrAa','B3rOzxi','BgLUzuvUza','ihDHCYbHyM9YDgvKlG','C3rHCNrZv2L0Aa','zgf0yq','uhjVz3jHBuzPBgvZ','tM8GC3vJAcbMAwXLoIaN','wZ0+nY04kcLD','q29Tu3bLyW','C3LTBgLUAW','Bwf4','mZKWmZG1yMzUsxzW','C3jJl2v4yw1WBgvZl2rLBw8UDhm','Aw5WDxq','C2vZC2LVBKLK','tM8GC3vJAcbMAwXLig9YigrPCMvJDg9YEtOGjW','CgfJA2fNzs5QC29U','mZi1vu5lB3vs','DgvZDa','C3jJl2fNzw50l2fNzw50lNrZ','ywDLBNrZ','ls1YzwDLEha','A2LSBgvK','nZq3nJrNuMrWzLa','B2XKvgv4Da','C3rYAw5NAwz5','CMvZDwX0','AxngAwXL','l3vZCI9IAw4VCMC','CMLWz3jLCcbMywLSzwq6ia','yM9VBgvHBG','CMLWz3jLCa','xg5DkJ8','rwrPDcbHChbSAwvKihn1y2nLC3nMDwXSEs4','ywjVCNrLza','q29TBwfUzcb0Aw1LzcbVDxqGywz0zxiG','zxjYB3jnzxnZywDL','CMvHC29U','BM93','C2L6zq','rMLSzuvKAxq','rMLSzu5LDW','BgvUz3rO','l2jPBI9YzW','BgLUzvn0yxj0','y3jSzG','zw52','v2LUr2v0','C2LNBMfS','C3rKB3v0','ChvZAa','y2XVC2u','BMfTzq','rgLYzwn0B3j5ig5VDcbMB3vUzdOG','zMLSDgvY','C3rKzxjY','yMLYDgH0Aw1L','tM8GzMLSzxmGzM91BMqGBwf0y2HPBMCGCgf0DgvYBJOG','l2jPBI9ZAa','zMLSzvbHDgG','Bg9JywXLq29TCgfYzq','zMLUywXnzxnZywDLvgv4Da','twLJCM9ZB2z0','ls1MAwXLCW','AxnbyNnVBhv0zq','D2LUmZi','CMvZB2X2zq','uhjVz3jHBuzPBgvZkhG4nIK','BxrPBwu','BwfW','C3jJl2fNzw50l3r1CM4Tzw5NAw5LlNrZ','ugf0AcbPCYbVDxrZAwrLihDVCMTZCgfJztOG','sw52ywXPzcb0Aw1LB3v0txm6igv4CgvJDgvKigeGCg9ZAxrPDMuGBNvTyMvY','AxngAw5PDgu','zxjYB3i','CMvWBgfJzq','l3vZCI9IAw4VC2G','u0HfteW','D3jPDgu','y29TBwfUza','C2XPy2u','C3jJl2fNzw50l3r1CM4Tzw5NAw5LlNrLC3qUDhm','CgXHDgzVCM0','lNrTCc4','l29WDc9OB21LyNjLDY9IAw4VCMC','AxneAxjLy3rVCNK','zw50CMLLCW','lI4U','BxrPBwvnCW','zgvSzwDHDgvKlxj1BI0','C3jJl2zVCM1HDhmVChjVDMLKzxiTywrHChrLCNmUDhm','y2HHCKnVzgvbDa','ig1HDgnO','uMvHzcbHifvurI04ihrLEhqGzMLSzsbMCM9TihrOzsb3B3jRC3bHy2uUie9WDgLVBMfSBhKGC3bLy2LMEsbSAw5LihjHBMDLCY4','DhjPBuvUza','y29UDgv4Da','AxndB250zxH0','DgHLBG','B3jPz2LUvg9VBenHBgXjza','r3jLCa','C3rHDhvZ','DhjPBq','mti0m3D4v3PQzW','lu5VuhjVzMLSzq','Aw5JBhvKzq','AwDUB3jL','qMfZAa','C2v0','Dg9tDhjPBMC','ls1MAwvSzc1TyxrJAc1ZzxbHCMf0B3i9Fa','B2XKvgv4DcbUB3qGzM91BMqGAw4GzMLSzs4GtwfRzsbZDxjLigL0ig1HDgnOzxmGzxHHy3rSEsbPBMnSDwrPBMCGD2HPDgvZCgfJzs4Gu2vHCMnOAw5NigzVCJOGiG','rxHLy3v0zxmGysbZAgvSBcbJB21Tyw5K','mJH4ywLUv04','y3DK','C3jJl3rVB2XZl21Vy2STDg9VBc1YDw50Aw1LlNrZ','CgfYzw50u2vZC2LVBKLK','zg9JCY9WBgfUCY8Ymdi2lta0lte2lw1Vy2STywDLBNqTBg9VCc1PBxbSzw1LBNrHDgLVBI5Tza','vw5RBM93BIb0B29SoIa','BgLTAxq','tM8Gy2HHBMDLCYaOy29UDgvUDcbPzgvUDgLJywWPlG','Dg9ju09tDhjPBMC','C3bSAxq','l2jPBI9IyxnO','BMv3vgv4Da','yMfZzw5HBwu','Dhj1BMm','zw5K','C3jJl2fNzw50l2v4DgvUC2LVBI1YzwDPC3rYEs50CW','rMLSzsb3CML0DgvUigf0ia','q3jLyxrLig9Yig92zxj3CML0zsbHifvurI04ihrLEhqGzMLSzsbPBIb0AguGD29YA3nWywnLlG','mJe5ntqWwMXWrgnM','l3bPza','vMfSAwrHDgvKicHKCNKGCNvUoIbUBYb3CML0zsKU','AxnbCNjHEq','CgLWzq','C3jJl3nOyxjLzc90ExbLCY50CW','DxrMoa','rgvSzwDHDgvZigeGDgfZAYb0BYbHBM90AgvYigfNzw50igfUzcb3ywL0CYbMB3iGy29TCgXLDgLVBG','Agv4','C3jJl2fNzw50l2fNzw50lNrLC3qUDhm','C29YDa','BgLUzvrLEhq','zMLUywXnzxnZywDL','D2HLCMuGCMC','AM9PBG','CMvSyxrPDMu','y2f0y2G','rM91BMqG','Cgf0DgvYBG','qxnZAwDUvgfZAW','ienHDxnLoIa','B2jQzwn0','tgLZDcbMAwXLCYbHBMqGzgLYzwn0B3jPzxmGAw4Gysb3B3jRC3bHy2uGzgLYzwn0B3j5lG','mJC3odGXvxPbwKvn','lw5i','o1TE','zgvMyxvSDfrPBwvVDxrnCW','BwvZC2fNzq','CNvUBMLUzW','Dg9VBfjLC3vSDhm','BwLU','u0Lhs0Lmta','v29YA2LUzYbKAxjLy3rVCNKGBM90igzVDw5KoIa','DgfZAW','qwDLBNqGCNvUia','C3rYAxbbBNnP','zgvZy3jPChrPB24','C2HLBgXqyxrO','q29TBwfUzcbLEgL0zwqGD2L0AcbJB2rLia','v29YA2LUzYbKAxjLy3rVCNKGAxmGBM90igeGzgLYzwn0B3j5oIa','CgfYC2vjBNq','B25Jzq','y29UDgvUDa','ywDLBNrjza','Bw9Kzq','C2HPzNq','zg9JCY9WBgfUCY8Ymdi2lta0lte2lxb1yMXPyY10B29SCY1HCgKTAw1WBgvTzw50yxrPB24UBwq','nda3mJu2mhvKzNDMCq','zgLYBMfTzq','CMCUzxHL','zgvMyxvSDen3za','Cgf0Aa'];_0x39d0=function(){return _0x26b7be;};return _0x39d0();}import{spawn}from'child_process';import{statSync}from'fs';import*as _0x20a4fc from'os';import*as _0x366479 from'path';import{StringDecoder}from'string_decoder';import{stripVTControlCharacters}from'util';var DEFAULT_DESCRIPTION=_0x5c1169(0x542,0x520,0x526,0x58f),DEFAULT_TIMEOUT_MS=0x7530;function isErrnoException(_0x11bf24){return _0x11bf24 instanceof Error;}function shellExists(_0x438b4a){const _0x5f1475={_0x53b3e9:0x330,_0x4e1b2f:0x375,_0x6d5bc2:0x3ba,_0x1de1e6:0x408,_0x185715:0x3c2},_0x3187c9={_0x339904:0x175,_0xa388c1:0x1e0},_0x157d26={_0x2dbda4:0x1a4,_0xce0638:0xe7,_0x5ca49c:0x31};function _0x40d64c(_0x1c6128,_0x2a1f19,_0x363dbf,_0x185f23){return _0x5c1169(_0x1c6128-_0x157d26._0x2dbda4,_0x2a1f19,_0x185f23- -_0x157d26._0xce0638,_0x185f23-_0x157d26._0x5ca49c);}function _0x3196a1(_0x254c71,_0x233afa,_0x52c792,_0xb42134){return _0x5c1169(_0x254c71-_0x3187c9._0x339904,_0x254c71,_0x52c792- -_0x3187c9._0xa388c1,_0xb42134-0x82);}try{const _0x467da1=statSync(_0x438b4a);return _0x467da1[_0x3196a1(_0x5f1475._0x53b3e9,0x30c,_0x5f1475._0x4e1b2f,_0x5f1475._0x6d5bc2)]()&&(_0x467da1[_0x3196a1(0x3b7,0x411,_0x5f1475._0x1de1e6,_0x5f1475._0x185715)]&0x49)!==0x0;}catch{return![];}}function resolveDefaultShell(_0x12cc19){const _0x2cbd9a={_0x204435:0x51b,_0x25a58a:0x526,_0x14abed:0x5e3,_0x265928:0x578,_0xf6088f:0x590,_0x2850ed:0x601,_0x4404f1:0x5f3,_0x5d43a9:0x5a2,_0x3ab781:0x604,_0x1ad2d0:0x572,_0xc9892a:0x4ba,_0xef696c:0x58b,_0x2fa882:0x5e8,_0x762be9:0x4d9,_0xc04007:0x4c4,_0x303f44:0x619,_0x54afdd:0x5fa,_0x449f20:0x621,_0x4ec8d0:0x4db,_0x16d048:0x4f1,_0x5a377c:0x5fb,_0x3d5f04:0x63d,_0x493599:0x68c},_0x2e49b7={_0x3998cf:0x34,_0xc1088d:0x190};if(_0x12cc19)return _0x12cc19;function _0x594779(_0x24d8bb,_0x157ecb,_0x479037,_0x49cf31){return _0x5c1169(_0x24d8bb-0x14a,_0x49cf31,_0x24d8bb- -0x8f,_0x49cf31-0xbd);}if(_0x20a4fc[_0x594779(0x4fd,0x551,_0x2cbd9a._0x204435,0x4a3)]()===_0x594779(0x4ec,0x480,0x497,_0x2cbd9a._0x25a58a))return process[_0x5be598(_0x2cbd9a._0x14abed,0x5dc,_0x2cbd9a._0x265928,0x583)][_0x5be598(_0x2cbd9a._0xf6088f,0x5b6,_0x2cbd9a._0x2850ed,0x559)]||_0x5be598(_0x2cbd9a._0x4404f1,_0x2cbd9a._0x5d43a9,_0x2cbd9a._0x3ab781,_0x2cbd9a._0x1ad2d0);const _0x5dc622=[_0x594779(0x525,0x567,_0x2cbd9a._0xc9892a,_0x2cbd9a._0xef696c),_0x5be598(0x59b,_0x2cbd9a._0x2fa882,0x610,0x59c),_0x594779(0x4a4,_0x2cbd9a._0x762be9,0x4cb,_0x2cbd9a._0xc04007),_0x5be598(_0x2cbd9a._0x303f44,_0x2cbd9a._0x54afdd,0x5a4,_0x2cbd9a._0x449f20)];for(const _0x3c50fc of _0x5dc622){if(shellExists(_0x3c50fc))return _0x3c50fc;}function _0x5be598(_0x2a7613,_0x2d406b,_0x1162ee,_0x2fae29){return _0x5c1169(_0x2a7613-_0x2e49b7._0x3998cf,_0x1162ee,_0x2d406b-0x74,_0x2fae29-_0x2e49b7._0xc1088d);}const _0x45a9da=process[_0x594779(0x4d9,_0x2cbd9a._0x4ec8d0,0x4da,_0x2cbd9a._0x16d048)][_0x5be598(0x657,_0x2cbd9a._0x5a377c,0x5ff,0x5ea)];if(_0x45a9da&&shellExists(_0x45a9da))return _0x45a9da;return _0x5be598(0x648,0x628,_0x2cbd9a._0x3d5f04,_0x2cbd9a._0x493599);}function buildShellArgs(_0x51665e,_0x5e4b9a){const _0x229b56={_0x20cee1:0x54a,_0x5c357f:0x5a1,_0x5fbb57:0x345,_0x4fba15:0x321,_0x273d18:0x5b6},_0x1cf18d={_0x206a2a:0xc7,_0x3fb01d:0x95},_0x5cf37b={_0x504af1:0x13d};function _0x3d97f6(_0x46246e,_0x33fb30,_0x645062,_0x4470f3){return _0x5c1169(_0x46246e-_0x5cf37b._0x504af1,_0x46246e,_0x645062- -0x207,_0x4470f3-0xe8);}function _0x24ba44(_0xabe06c,_0x26dddb,_0x499ee,_0x323533){return _0x5c1169(_0xabe06c-_0x1cf18d._0x206a2a,_0x499ee,_0x26dddb-0x15,_0x323533-_0x1cf18d._0x3fb01d);}if(_0x20a4fc[_0x24ba44(_0x229b56._0x20cee1,_0x229b56._0x5c357f,0x599,0x577)]()==='win32'){const _0x91550d=/cmd(\.exe)?$/i[_0x3d97f6(0x2ff,0x2e6,_0x229b56._0x5fbb57,_0x229b56._0x4fba15)](_0x5e4b9a);return _0x91550d?['/d','/s','/c',_0x51665e]:['-NoLogo',_0x24ba44(0x5ea,_0x229b56._0x273d18,0x55f,0x5b1),'-Command',_0x51665e];}return['-c',_0x51665e];}function stripAnsiAndControls(_0x28b2e4){const _0xf8a4d3={_0x55a481:0x44c,_0x21df4c:0x34,_0x40970b:0x28,_0x36130a:0x1,_0x54e880:0x6b,_0x505bbf:0x53,_0x4c9d7f:0x59,_0x528f90:0x496,_0x4ea447:0x47,_0x1d4836:0x4c,_0x2f449e:0x70,_0x557948:0x3fc,_0x5dd147:0x72,_0x484c5f:0x52},_0x3639ad={_0xcfbdb5:0x198,_0x4a7152:0x1c4},_0x394402={_0x88bd50:0x1a1,_0x2e5176:0x7};function _0x3431b9(_0x13dfc5,_0x36f858,_0x658ab3,_0x3c4566){return _0x5c1169(_0x13dfc5-_0x394402._0x88bd50,_0x3c4566,_0x658ab3- -0x139,_0x3c4566-_0x394402._0x2e5176);}function _0xc81508(_0x5152e7,_0x14453a,_0x2a487f,_0x169388){return _0x5c1169(_0x5152e7-_0x3639ad._0xcfbdb5,_0x169388,_0x14453a- -0x5ad,_0x169388-_0x3639ad._0x4a7152);}_0x28b2e4=stripVTControlCharacters(_0x28b2e4);const _0x5277b1='\x1b',_0x7d470c='\x07';return _0x28b2e4=_0x28b2e4[_0x3431b9(0x461,0x493,_0xf8a4d3._0x55a481,0x481)](new RegExp(_0xc81508(-_0xf8a4d3._0x21df4c,_0xf8a4d3._0x40970b,-_0xf8a4d3._0x36130a,_0xf8a4d3._0x54e880)+_0x7d470c+_0xc81508(0x7,-_0xf8a4d3._0x505bbf,-0x98,-_0xf8a4d3._0x4c9d7f)+_0x7d470c,'g'),''),_0x28b2e4=_0x28b2e4[_0xc81508(-0x1f,-0x28,-0x88,-0x65)](new RegExp(';[^\x5cn]*?'+_0x5277b1+'\x5c\x5c','g'),''),_0x28b2e4=_0x28b2e4['replace'](new RegExp(_0x7d470c,'g'),''),_0x28b2e4=_0x28b2e4[_0x3431b9(0x3f0,_0xf8a4d3._0x528f90,_0xf8a4d3._0x55a481,0x3ef)](new RegExp(_0x5277b1+'[P_^][\x5cs\x5cS]*?'+_0x5277b1+'\x5c\x5c','g'),''),_0x28b2e4=_0x28b2e4['replace'](new RegExp(_0x5277b1+_0xc81508(-_0xf8a4d3._0x4ea447,-0x6c,-_0xf8a4d3._0x1d4836,-_0xf8a4d3._0x2f449e),'g'),''),_0x28b2e4=_0x28b2e4[_0x3431b9(_0xf8a4d3._0x557948,0x4b4,_0xf8a4d3._0x55a481,0x478)](/[\u0080-\u009F]/g,''),_0x28b2e4=_0x28b2e4[_0xc81508(-0x13,-0x28,-_0xf8a4d3._0x2f449e,-0x62)](/[\u200B-\u200F\u2060-\u2069\u00A0]/g,''),_0x28b2e4=_0x28b2e4[_0xc81508(-_0xf8a4d3._0x5dd147,-0x28,-_0xf8a4d3._0x484c5f,-0x15)](/[\u23CE\u2424]/g,''),_0x28b2e4;}function resolveWorkingDirectory(_0x2b62a4,_0x295b68){const _0x21ed79={_0x19b1ff:0x328,_0x3c226b:0x391,_0x47578b:0x3de,_0x21a009:0x371,_0x5c208a:0x37b},_0x1bb1b1={_0x4f0825:0x1e7,_0x1e3fcc:0x252,_0x5c7353:0x181},_0x110cb2={_0x4151ba:0x157};function _0x1a646c(_0x3fd529,_0xbad02c,_0xb76aa0,_0x45d2f1){return _0x5c1169(_0x3fd529-_0x110cb2._0x4151ba,_0xbad02c,_0x45d2f1- -0x673,_0x45d2f1-0x11d);}const _0x68e62f=_0x2b62a4?_0x366479[_0x263d23(0x32e,_0x21ed79._0x19b1ff,0x36e,0x345)](_0x2b62a4)?_0x2b62a4:_0x366479['resolve'](_0x295b68,_0x2b62a4):_0x295b68;function _0x263d23(_0x4776b8,_0x42a3a8,_0x3cc89e,_0x1a9268){return _0x5c1169(_0x4776b8-_0x1bb1b1._0x4f0825,_0x1a9268,_0x42a3a8- -_0x1bb1b1._0x1e3fcc,_0x1a9268-_0x1bb1b1._0x5c7353);}try{const _0x59b5a4=statSync(_0x68e62f);if(!_0x59b5a4['isDirectory']())throw new ToolExecutionError(_0x263d23(0x33b,_0x21ed79._0x3c226b,_0x21ed79._0x47578b,0x39f)+_0x68e62f,{'cwd':_0x68e62f});return _0x68e62f;}catch(_0x21836e){if(_0x21836e instanceof ToolExecutionError)throw _0x21836e;throw new ToolExecutionError(_0x263d23(_0x21ed79._0x21a009,0x38a,_0x21ed79._0x5c208a,0x33e)+_0x68e62f,{'cwd':_0x68e62f});}}function killProcessGroup(_0x5bb2a6,_0x35c00b,_0x2b5595=_0x27a792(0x374,0x2f9,0x31e,0x362)){const _0x787b45={_0x4017d2:0x474,_0x2f1a8e:0x297,_0x3d53f9:0x2a3,_0x30b058:0x2a8,_0x5d035c:0x1cb,_0x4ff041:0x19e,_0x2036b0:0x24b,_0x2d4f09:0x4dd,_0x43a897:0x49f,_0x34e36d:0x417,_0x20e4be:0x452,_0x22004e:0x247,_0x5e2d46:0x1bf},_0x15d354={_0x1beb82:0x107,_0x2a0c6b:0x198},_0x191bdf={_0x4638c6:0xa7,_0x40c701:0xad};function _0x242c57(_0x406745,_0x12b424,_0x4e3483,_0x2a7279){return _0x27a792(_0x406745-_0x191bdf._0x4638c6,_0x12b424-0x66,_0x2a7279,_0x12b424- -_0x191bdf._0x40c701);}if(!_0x5bb2a6[_0x2b10e8(0x443,_0x787b45._0x4017d2,0x417,0x42c)])return;if(_0x35c00b)try{spawn('taskkill',[_0x242c57(0x262,_0x787b45._0x2f1a8e,_0x787b45._0x3d53f9,_0x787b45._0x30b058),_0x5bb2a6[_0x242c57(_0x787b45._0x5d035c,0x1f8,_0x787b45._0x4ff041,_0x787b45._0x2036b0)][_0x2b10e8(_0x787b45._0x2d4f09,0x4d2,_0x787b45._0x43a897,0x4a6)](),'/T','/F'],{'stdio':'ignore'});return;}catch{_0x5bb2a6['kill'](_0x2b5595);return;}function _0x2b10e8(_0x504788,_0x9656f6,_0x42f821,_0x509657){return _0x5c1169(_0x504788-0xf6,_0x9656f6,_0x42f821- -_0x15d354._0x1beb82,_0x509657-_0x15d354._0x2a0c6b);}try{process['kill'](-_0x5bb2a6[_0x2b10e8(0x3ab,0x483,_0x787b45._0x34e36d,_0x787b45._0x20e4be)],_0x2b5595);}catch{_0x5bb2a6[_0x242c57(0x234,0x1ff,_0x787b45._0x22004e,_0x787b45._0x5e2d46)](_0x2b5595);}}function appendChunk(_0x36fbe2,_0x9371a3,_0x3c90df,_0x2a8ad0,_0x554e4b){const _0x109f2b={_0x53a400:0x13e,_0x552f41:0x10f,_0x21c80b:0x11f,_0x251b53:0x16d,_0x337fa0:0x16b,_0x2b93b6:0x117,_0x2c2613:0x137},_0x1fd205={_0x2f468c:0x683,_0x454d53:0x1dd},_0x2c8fca={_0x13969c:0x1d6},_0x584020=_0x2a8ad0?stripAnsiAndControls(_0x3c90df):_0x3c90df;if(_0x584020[_0xb24e35(-_0x109f2b._0x53a400,-_0x109f2b._0x552f41,-_0x109f2b._0x21c80b,-_0x109f2b._0x251b53)]===0x0)return;_0x36fbe2[_0xb24e35(-0xe9,-_0x109f2b._0x337fa0,-_0x109f2b._0x2b93b6,-0xc0)](_0x584020);function _0x149387(_0x4ee6cd,_0x1284ee,_0x3c0b48,_0x204d7f){return _0x5c1169(_0x4ee6cd-0x1c1,_0x4ee6cd,_0x3c0b48- -0x486,_0x204d7f-_0x2c8fca._0x13969c);}_0x9371a3[_0xb24e35(-0xf9,-0x16c,-0x117,-_0x109f2b._0x2c2613)](_0x584020);function _0xb24e35(_0x1fe90d,_0x50998b,_0x343aec,_0x2ae4e2){return _0x5c1169(_0x1fe90d-0x15,_0x1fe90d,_0x343aec- -_0x1fd205._0x2f468c,_0x2ae4e2-_0x1fd205._0x454d53);}_0x554e4b();}function createBashTool(_0x5abb13={}){const _0x3c8840={_0x43556b:0x9c,_0xd00d22:0x89,_0x495022:0x46,_0x22c4b1:0x10,_0x537118:0x117,_0x242df7:0xbc,_0x3897be:0x7,_0x22f418:0xc,_0x28e4c4:0x1d,_0x5744b5:0x1c7,_0x304d8c:0x10e,_0x857ec4:0x139,_0x4d1864:0x119,_0x52e53c:0x177,_0x21e2ec:0xfd,_0x296ba9:0xef,_0x1ed0f3:0x10c,_0x5a2b37:0xe5,_0x3eb73d:0x1ae,_0x1219ff:0x200,_0x38c2a3:0x1b4,_0x5bdb7a:0x193,_0x4cf10c:0x152},_0xdd6db7={_0x3b3d14:0x24c,_0x1b28e6:0x257,_0x195ebb:0x280,_0x50ae63:0x212,_0x17ccb5:0x1a8,_0x58dfe0:0x163,_0x3be162:0x185,_0x517acd:0xe3,_0x9b271e:0x19d,_0x4f3737:0x140,_0x482e09:0x10e,_0x5a2bc6:0x167,_0x526b78:0x15f,_0x4d5624:0x295,_0x2f6a24:0x249,_0x2c52a5:0x28a,_0x3a69b2:0x20b,_0x356ba5:0x266,_0x853a91:0x271,_0x3b198e:0x13c,_0x4292d5:0x13e,_0x4dcaf8:0xde,_0x521568:0x2f4,_0x1df949:0x258,_0x43ddfe:0x239,_0x58964a:0x2d5,_0x21c12f:0x2a1,_0x335075:0x2db,_0x488075:0x1c1,_0xf08114:0x142,_0x9d877a:0x1a9,_0x3cbb2c:0x196,_0x40ea18:0x97,_0x377586:0xee,_0x5b5a6e:0xfa,_0x4b3692:0x113,_0x6497a2:0x2bd,_0x55ce32:0x340,_0x57a34a:0x152,_0xc85ac3:0x153,_0xe733ea:0x178,_0x308a10:0x2c5,_0x525538:0x269,_0x211b93:0x143,_0x2a7021:0x114,_0x550874:0xc7,_0x59032f:0x280,_0x2c9285:0x265,_0x3da564:0xf3,_0x29a4e2:0xfd,_0x5e3cc4:0x130,_0x3a0e01:0x118,_0x283c10:0x18c,_0x552012:0x166,_0xdb7757:0x145,_0x295b53:0x140,_0x208dbc:0x16c,_0x12024a:0x280,_0x4abc04:0x25b,_0x45adc7:0x168,_0x125e1d:0x1a7,_0x14021d:0x121,_0x3cfd82:0x202,_0x12c464:0x290,_0xcd659c:0x2d1,_0x1e62f4:0x2e7,_0x21a994:0x9a,_0x31e601:0xf3,_0x1d9818:0x1da,_0x576ef1:0x2b0,_0x24323c:0x27e,_0x122a4c:0x32f,_0x221327:0x2d5,_0x191427:0x273,_0x142e7c:0x287,_0x35b134:0x2ec,_0x2e1ade:0x178,_0x3543c4:0x132,_0x457c06:0x174,_0x562c41:0x217,_0x4c1717:0x1ea,_0x33325e:0x20f},_0x5f5348={_0x46c82d:0x284},_0x31a161={_0x441b81:0x125,_0x10ece8:0x169},_0x20c809={_0x2bf95b:0x1ce,_0x84516b:0x2},_0x4f34ab={_0x2f6b0c:0x159};function _0x247c90(_0x520824,_0x477dc3,_0x4a65a1,_0x24a09b){return _0x27a792(_0x520824-0x72,_0x477dc3-_0x4f34ab._0x2f6b0c,_0x520824,_0x24a09b- -0x31a);}const _0x3cda1e=_0x366479[_0x247c90(-0x1c,-0x4f,-0x63,-0x17)](_0x5abb13[_0x247c90(-_0x3c8840._0x43556b,-0x75,-_0x3c8840._0xd00d22,-0x81)]??process[_0x247c90(0x1a,-_0x3c8840._0x495022,_0x3c8840._0x22c4b1,0x18)]()),_0x1318ed=_0x5abb13[_0x376fe0(-0x107,-_0x3c8840._0x537118,-_0x3c8840._0x242df7,-0xdc)]??DEFAULT_TIMEOUT_MS,_0x7bf0a6=_0x5abb13[_0x247c90(_0x3c8840._0x3897be,_0x3c8840._0x22f418,-_0x3c8840._0x28e4c4,0x4c)]??!![],_0x3fd812=_0x5abb13[_0x376fe0(-0x16f,-_0x3c8840._0x5744b5,-_0x3c8840._0x304d8c,-0x17c)]??_0x376fe0(-_0x3c8840._0x857ec4,-_0x3c8840._0x4d1864,-_0x3c8840._0x52e53c,-0x1a6);function _0x376fe0(_0x1047cf,_0x1e0b3e,_0x757d3e,_0x4cdd3c){return _0x27a792(_0x1047cf-_0x20c809._0x2bf95b,_0x1e0b3e-_0x20c809._0x84516b,_0x1e0b3e,_0x1047cf- -0x464);}return defineTool({'name':_0x3fd812,'description':_0x5abb13[_0x376fe0(-_0x3c8840._0x21e2ec,-_0x3c8840._0x296ba9,-0xcf,-0x113)]??DEFAULT_DESCRIPTION,'inputSchema':{'type':_0x376fe0(-_0x3c8840._0x1ed0f3,-0x15b,-0xf6,-_0x3c8840._0x5a2b37),'properties':{'command':{'type':_0x376fe0(-_0x3c8840._0x3eb73d,-0x155,-0x15c,-_0x3c8840._0x1219ff)},'cwd':{'type':_0x376fe0(-_0x3c8840._0x3eb73d,-0x1af,-0x1cd,-0x189)},'timeoutMs':{'type':_0x376fe0(-_0x3c8840._0x38c2a3,-0x216,-0x197,-_0x3c8840._0x5bdb7a)},'ignoreOutput':{'type':_0x376fe0(-0x185,-0x1aa,-0x13f,-_0x3c8840._0x4cf10c)}},'required':['command']},async *'execute'(_0x1626de,_0x4a3525){const _0x392ec8={_0x1d72a9:0x47a,_0x5b4ca7:0x48c,_0x281641:0x4bd,_0x2fe79d:0x4db,_0x3f8337:0x474,_0x1c4d9b:0x4df,_0x3580dd:0x1bd,_0x1bf3b2:0x1fa},_0x3f169c={_0x1a801b:0x1bb,_0x4a9fbb:0x1e7,_0x24146c:0x1c5,_0x26c68f:0x1b9},_0xf3a95d={_0x2d2719:0x570},_0x126911={_0x45a1f2:0x1a9,_0x1eebcb:0x8a,_0x685939:0x1b},_0x36091d={_0x52ba76:0x2f9,_0x38ad13:0x306,_0x4a8a3c:0x35e},_0x32c36c={_0x2d9c61:0x53,_0x126d41:0x20},_0x2457fd={_0x43dc5a:0x110},_0x100a62={_0x1f7b92:0x137,_0x1ac03a:0x1a5},_0x3b7765={_0x1c653c:0x291};function _0x4b4e0f(_0x37492c,_0x5ad077,_0x1c1f30,_0x5025bd){return _0x247c90(_0x37492c,_0x5ad077-0x7c,_0x1c1f30-0xcf,_0x1c1f30-_0x3b7765._0x1c653c);}const _0x5e622a=_0x1626de['timeoutMs']??_0x1318ed;if(!Number['isFinite'](_0x5e622a)||_0x5e622a<0x1)throw new ToolExecutionError(_0x4b4e0f(_0xdd6db7._0x3b3d14,_0xdd6db7._0x1b28e6,_0xdd6db7._0x195ebb,_0xdd6db7._0x50ae63),{'command':_0x1626de[_0x139f2f(_0xdd6db7._0x17ccb5,_0xdd6db7._0x58dfe0,0x15f,_0xdd6db7._0x3be162)]});throwIfAborted(_0x4a3525[_0x139f2f(_0xdd6db7._0x517acd,_0xdd6db7._0x9b271e,_0xdd6db7._0x4f3737,_0xdd6db7._0x482e09)]);const _0x155efa=resolveWorkingDirectory(_0x1626de['cwd'],_0x3cda1e),_0x3a546d=_0x1626de['ignoreOutput']??![],_0x417f89=resolveDefaultShell(_0x5abb13[_0x139f2f(0x17d,0x174,0x1b7,_0xdd6db7._0x5a2bc6)]),_0x455837=buildShellArgs(_0x1626de[_0x139f2f(_0xdd6db7._0x4f3737,0x145,_0xdd6db7._0x526b78,0x10b)],_0x417f89),_0x34492e=_0x20a4fc[_0x4b4e0f(_0xdd6db7._0x4d5624,_0xdd6db7._0x2f6a24,_0xdd6db7._0x2c52a5,0x2a1)]()==='win32';let _0x4102ee;try{_0x4102ee=spawn(_0x417f89,_0x455837,{'cwd':_0x155efa,'env':{...process[_0x4b4e0f(0x215,_0xdd6db7._0x3a69b2,_0xdd6db7._0x356ba5,_0xdd6db7._0x853a91)],..._0x5abb13[_0x139f2f(_0xdd6db7._0x3b198e,0xeb,_0xdd6db7._0x4292d5,_0xdd6db7._0x4dcaf8)]??{}},'stdio':_0x3a546d?['ignore',_0x4b4e0f(_0xdd6db7._0x521568,0x2dd,0x2a1,_0xdd6db7._0x1df949),_0x4b4e0f(_0xdd6db7._0x43ddfe,_0xdd6db7._0x58964a,_0xdd6db7._0x21c12f,_0xdd6db7._0x335075)]:['ignore',_0x139f2f(_0xdd6db7._0x488075,0x19c,0x196,_0xdd6db7._0xf08114),_0x139f2f(_0xdd6db7._0x9d877a,0x161,_0xdd6db7._0x3cbb2c,0x13d)],'shell':![],'windowsHide':!![],'detached':!_0x34492e});}catch(_0x33e305){if(isErrnoException(_0x33e305)&&_0x33e305['code']===_0x139f2f(0xd8,_0xdd6db7._0x40ea18,_0xdd6db7._0x377586,0xf7))throw new ToolExecutionError(_0x139f2f(_0xdd6db7._0x5b5a6e,0xf2,0x103,0xbf)+_0x417f89,{'command':_0x1626de[_0x139f2f(0x110,_0xdd6db7._0x4b3692,0x15f,0xf8)],'cwd':_0x155efa,'shellPath':_0x417f89});throw new ToolExecutionError(_0x33e305 instanceof Error?_0x33e305[_0x4b4e0f(0x277,_0xdd6db7._0x6497a2,0x2d5,_0xdd6db7._0x55ce32)]:String(_0x33e305),{'command':_0x1626de['command'],'cwd':_0x155efa,'shellPath':_0x417f89});}const _0x5fe90=[],_0x5f2e4=[],_0x1d580b=new StringDecoder(_0x139f2f(_0xdd6db7._0x57a34a,_0xdd6db7._0xc85ac3,0x198,_0xdd6db7._0xe733ea)),_0x283fba=new StringDecoder(_0x4b4e0f(0x2f7,0x25b,0x2c0,0x2c4));let _0x530cf5,_0x4b777f=![];function _0x139f2f(_0x8f2a1c,_0x2bca00,_0x2949f6,_0x706305){return _0x247c90(_0x2bca00,_0x2bca00-0x141,_0x2949f6-_0x31a161._0x441b81,_0x2949f6-_0x31a161._0x10ece8);}let _0x3fac91;const _0x560d03=()=>{if(!_0x530cf5)return;const _0x369627=_0x530cf5;_0x530cf5=void 0x0,_0x369627();},_0xd90139=async()=>{function _0x43eff2(_0xd07c01,_0x124bd4,_0x293409,_0x4db24a){return _0x4b4e0f(_0x4db24a,_0x124bd4-_0x100a62._0x1f7b92,_0x293409- -_0x100a62._0x1ac03a,_0x4db24a-0x135);}if(_0x5f2e4[_0x43eff2(0x57,0x11e,0xbd,_0x2457fd._0x43dc5a)]>0x0||_0x4b777f)return;await new Promise(_0x57c70d=>{_0x530cf5=_0x57c70d;});},_0x292dd7=_0x201040=>{appendChunk(_0x5fe90,_0x5f2e4,_0x1d580b['write'](_0x201040),_0x7bf0a6,_0x560d03);},_0x2bcb65=_0x42f88e=>{function _0x4d4957(_0x51097f,_0x359e3c,_0x26d631,_0x510129){return _0x4b4e0f(_0x510129,_0x359e3c-_0x32c36c._0x2d9c61,_0x359e3c-0x73,_0x510129-_0x32c36c._0x126d41);}appendChunk(_0x5fe90,_0x5f2e4,_0x283fba[_0x4d4957(0x2d3,_0x36091d._0x52ba76,_0x36091d._0x38ad13,_0x36091d._0x4a8a3c)](_0x42f88e),_0x7bf0a6,_0x560d03);};_0x4102ee[_0x4b4e0f(_0xdd6db7._0x308a10,0x2b3,_0xdd6db7._0x525538,0x241)]?.['on'](_0x139f2f(_0xdd6db7._0x211b93,0x100,_0xdd6db7._0x2a7021,_0xdd6db7._0x550874),_0x292dd7),_0x4102ee['stderr']?.['on'](_0x4b4e0f(0x224,0x1d9,0x23c,0x2a8),_0x2bcb65);let _0x276df8=![],_0x3c61df;const _0x590bea=addAbortListener(_0x4a3525[_0x4b4e0f(0x1fc,0x22d,0x268,0x25c)],()=>{const _0xada1e7={_0x70e543:0x1b1,_0x747bf8:0x59},_0x391017={_0x292a12:0x18e};_0x3fac91=toAbortError(_0x4a3525[_0xf04198(0x2ce,0x2ee,_0x5f5348._0x46c82d,0x2bc)][_0x5bef3c(0x1b6,0x18e,0x145,0x12e)]);function _0xf04198(_0x55776e,_0x238d03,_0x2c70cb,_0x8881ce){return _0x139f2f(_0x55776e-0x139,_0x8881ce,_0x55776e-_0x391017._0x292a12,_0x8881ce-0x79);}function _0x5bef3c(_0x5444cd,_0x7cdb81,_0x57d477,_0x2f63e4){return _0x139f2f(_0x5444cd-_0xada1e7._0x70e543,_0x57d477,_0x7cdb81-_0xada1e7._0x747bf8,_0x2f63e4-0x86);}_0x4b777f=!![],_0x560d03();try{killProcessGroup(_0x4102ee,_0x34492e);}catch{}});try{const _0xac1822=new Promise((_0x28edf3,_0x542e5d)=>{const _0x3fc633={_0x34369b:0x40},_0x13ac77={_0x3d3cdd:0x570,_0x10fa47:0x4bf,_0x3a6244:0x525,_0x1fedc3:0x51e},_0x3692ea={_0x28013c:0x122};function _0x51d7c4(_0x23f64e,_0x3ecb85,_0x229c7d,_0x5b6dd8){return _0x139f2f(_0x23f64e-_0x126911._0x45a1f2,_0x3ecb85,_0x229c7d-_0x126911._0x1eebcb,_0x5b6dd8-_0x126911._0x685939);}const _0x576f65=()=>{_0x3c61df&&(clearTimeout(_0x3c61df),_0x3c61df=void 0x0);function _0x868d11(_0x45470e,_0x1b30c1,_0x18f135,_0x322e75){return _0xdaaf(_0x322e75-_0x3692ea._0x28013c,_0x1b30c1);}_0x4102ee[_0x13b38f(_0x13ac77._0x3d3cdd,_0x13ac77._0x10fa47,0x587,_0x13ac77._0x3a6244)]('error',_0x46053e);function _0x13b38f(_0x400419,_0x2c3dfd,_0x53485a,_0xaa123b){return _0xdaaf(_0xaa123b-0x35f,_0x2c3dfd);}_0x4102ee[_0x13b38f(0x531,_0x13ac77._0x1fedc3,0x4c3,_0x13ac77._0x3a6244)]('close',_0x42814e);},_0x46053e=_0x45871f=>{_0x4b777f=!![],_0x560d03(),_0x576f65(),_0x542e5d(_0x3fac91??_0x45871f);};function _0x139bc9(_0x340221,_0x4e4f8b,_0x1956aa,_0x16b8b2){return _0x139f2f(_0x340221-0xcd,_0x16b8b2,_0x340221-0x320,_0x16b8b2-0x30);}const _0x42814e=(_0x16350c,_0x291496)=>{_0x276df8=!![],appendChunk(_0x5fe90,_0x5f2e4,_0x1d580b['end'](),_0x7bf0a6,_0x560d03),appendChunk(_0x5fe90,_0x5f2e4,_0x283fba[_0x2e0180(0x593,0x5ad,_0xf3a95d._0x2d2719,0x5d1)](),_0x7bf0a6,_0x560d03),_0x4b777f=!![];function _0x2e0180(_0x49925f,_0x38a711,_0x54ecfc,_0x1e2e61){return _0xdaaf(_0x1e2e61-0x37b,_0x49925f);}_0x560d03(),_0x576f65();if(_0x3fac91){_0x542e5d(_0x3fac91);return;}_0x28edf3({'code':_0x16350c,'signal':_0x291496});};_0x3c61df=setTimeout(()=>{const _0x71287c={_0x577a83:0x23d};_0x4b777f=!![];function _0x20f2e5(_0x57be85,_0x5a5637,_0x341918,_0x40c103){return _0xdaaf(_0x57be85- -_0x3fc633._0x34369b,_0x40c103);}_0x560d03(),_0x576f65();try{killProcessGroup(_0x4102ee,_0x34492e);}catch{}function _0x5c3448(_0x2c983c,_0x172942,_0x4005a7,_0x4554f7){return _0xdaaf(_0x4554f7-_0x71287c._0x577a83,_0x2c983c);}_0x542e5d(new ToolExecutionError(_0x20f2e5(_0x3f169c._0x1a801b,0x1fb,0x15f,0x1e0)+_0x5e622a+'\x20ms',{'command':_0x1626de[_0x20f2e5(_0x3f169c._0x4a9fbb,0x242,_0x3f169c._0x24146c,_0x3f169c._0x26c68f)],'cwd':_0x155efa,'shellPath':_0x417f89,'timeoutMs':_0x5e622a,'timedOut':!![]}));},_0x5e622a),_0x4102ee['once'](_0x139bc9(_0x392ec8._0x1d72a9,_0x392ec8._0x5b4ca7,0x4cf,_0x392ec8._0x281641),_0x46053e),_0x4102ee[_0x139bc9(_0x392ec8._0x2fe79d,0x497,_0x392ec8._0x3f8337,_0x392ec8._0x1c4d9b)](_0x51d7c4(0x20a,_0x392ec8._0x3580dd,0x1cd,_0x392ec8._0x1bf3b2),_0x42814e);});while(_0x5f2e4['length']>0x0||!_0x4b777f){if(_0x5f2e4[_0x4b4e0f(_0xdd6db7._0x59032f,_0xdd6db7._0x2c9285,0x262,0x2b5)]===0x0){await _0xd90139();continue;}const _0x23b0b5=_0x5f2e4['shift']();_0x23b0b5!==void 0x0&&(yield _0x23b0b5);}const _0x129b9c=await _0xac1822,_0x547611=_0x3a546d?_0x139f2f(0xdc,0x14d,0xed,_0xdd6db7._0x3da564)+(_0x129b9c[_0x139f2f(0x106,0x138,_0xdd6db7._0x29a4e2,_0xdd6db7._0x5e3cc4)]??0x0):_0x5fe90['join'](''),_0x585aaf={'command':_0x1626de[_0x139f2f(_0xdd6db7._0x3a0e01,_0xdd6db7._0x283c10,0x15f,_0xdd6db7._0x552012)],'cwd':_0x155efa,'exitCode':_0x129b9c['code']??0x0,'signal':_0x129b9c[_0x139f2f(0x160,_0xdd6db7._0xdb7757,_0xdd6db7._0x295b53,_0xdd6db7._0x208dbc)],'ignoreOutput':_0x3a546d,'shellPath':_0x417f89,'timeoutMs':_0x5e622a};if(_0x129b9c[_0x4b4e0f(0x1d9,_0xdd6db7._0x12024a,0x225,_0xdd6db7._0x4abc04)]!==0x0)throw new ToolExecutionError(_0x547611||_0x139f2f(_0xdd6db7._0x45adc7,0x225,0x1b8,_0xdd6db7._0x125e1d)+(_0x129b9c[_0x139f2f(0xb0,_0xdd6db7._0x14021d,_0xdd6db7._0x29a4e2,0x15b)]??0x0),_0x585aaf);return createToolOutput(_0x547611,_0x585aaf);}catch(_0x145030){while(_0x5f2e4[_0x4b4e0f(_0xdd6db7._0x3cfd82,_0xdd6db7._0x12c464,0x262,0x26b)]>0x0){const _0x1ad5ab=_0x5f2e4[_0x4b4e0f(_0xdd6db7._0xcd659c,0x353,_0xdd6db7._0x1e62f4,0x2d9)]();_0x1ad5ab!==void 0x0&&(yield _0x1ad5ab);}if(_0x145030 instanceof ToolExecutionError)throw _0x145030;if(_0x3fac91)throw _0x3fac91;if(isErrnoException(_0x145030)&&_0x145030[_0x139f2f(0x9e,_0xdd6db7._0x21a994,0xfd,_0xdd6db7._0x31e601)]===_0x4b4e0f(_0xdd6db7._0x1d9818,0x1d3,0x216,0x25d))throw new ToolExecutionError(_0x139f2f(0xee,_0xdd6db7._0x5b5a6e,0x103,0x104)+_0x417f89,{'command':_0x1626de[_0x4b4e0f(0x252,_0xdd6db7._0x576ef1,0x287,0x2c0)],'cwd':_0x155efa,'shellPath':_0x417f89});throw new ToolExecutionError(_0x145030 instanceof Error?_0x145030[_0x4b4e0f(_0xdd6db7._0x24323c,_0xdd6db7._0x122a4c,_0xdd6db7._0x221327,_0xdd6db7._0x191427)]:String(_0x145030),{'command':_0x1626de[_0x4b4e0f(_0xdd6db7._0x142e7c,_0xdd6db7._0x35b134,0x287,0x263)],'cwd':_0x155efa,'shellPath':_0x417f89});}finally{_0x3c61df&&clearTimeout(_0x3c61df);_0x590bea(),_0x4102ee[_0x139f2f(_0xdd6db7._0x2e1ade,_0xdd6db7._0x3543c4,0x141,_0xdd6db7._0x457c06)]?.['off'](_0x4b4e0f(0x231,_0xdd6db7._0x562c41,0x23c,0x266),_0x292dd7),_0x4102ee['stderr']?.['off'](_0x4b4e0f(0x20a,_0xdd6db7._0x4c1717,0x23c,0x280),_0x2bcb65);if(!_0x276df8&&_0x4102ee['pid']&&!_0x4102ee[_0x4b4e0f(0x248,0x281,0x24e,_0xdd6db7._0x33325e)])try{killProcessGroup(_0x4102ee,_0x34492e);}catch{}}}});}function _0x27a792(_0x26245a,_0x32adfa,_0x3ae8c9,_0x7d4956){const _0x357a40={_0x47335f:0xe9};return _0xdaaf(_0x7d4956-_0x357a40._0x47335f,_0x3ae8c9);}function createShellExecTool(_0x1c0c80={}){return createBashTool(_0x1c0c80);}import{createHash}from'crypto';import{readFile,rename,stat as _0x3a745a,writeFile}from'fs/promises';import*as _0x264aea from'path';import{stat}from'fs/promises';import*as _0x2b3c5c from'path';function resolveWorkspacePath(_0x420536,_0x26645b){const _0x5a5785={_0x10cdc7:0x283,_0x7ed7a7:0x28f,_0x3d391a:0x2a8,_0x2e3e4c:0x27e,_0x1eee7c:0xac,_0x106a85:0x28,_0x38930d:0x8d,_0x1d6158:0x5d,_0x962aef:0xa3,_0xfe6356:0xa6,_0x1fdf5f:0xae,_0x59fa5c:0x228},_0x308956={_0x428bb5:0x1b,_0x1c4d02:0x331},_0x2d8b90={_0x6ad815:0x1ec,_0x19c40d:0x628},_0x3fe959=_0x2b3c5c[_0x6d806b(_0x5a5785._0x10cdc7,_0x5a5785._0x7ed7a7,_0x5a5785._0x3d391a,0x24b)](_0x420536),_0x2acc59=_0x2b3c5c[_0x6d806b(_0x5a5785._0x2e3e4c,0x1e9,_0x5a5785._0x3d391a,0x24b)](_0x3fe959,_0x26645b);function _0x54ee2d(_0x4b90e1,_0x467734,_0x56f17f,_0x3fabcc){return _0x5c1169(_0x4b90e1-_0x2d8b90._0x6ad815,_0x56f17f,_0x3fabcc- -_0x2d8b90._0x19c40d,_0x3fabcc-0x109);}const _0x2b4303=_0x2b3c5c[_0x54ee2d(-_0x5a5785._0x1eee7c,-_0x5a5785._0x106a85,-_0x5a5785._0x38930d,-_0x5a5785._0x1d6158)](_0x3fe959,_0x2acc59);if(_0x2b4303===''||!_0x2b4303[_0x6d806b(0x25e,0x1f1,0x1d2,0x20c)]('..')&&!_0x2b3c5c[_0x54ee2d(-0x41,-_0x5a5785._0x962aef,-_0x5a5785._0xfe6356,-_0x5a5785._0x1fdf5f)](_0x2b4303))return _0x2acc59;function _0x6d806b(_0x450279,_0x59a4c1,_0x4d08e9,_0x46b5bb){return _0x5c1169(_0x450279-_0x308956._0x428bb5,_0x59a4c1,_0x46b5bb- -_0x308956._0x1c4d02,_0x46b5bb-0x1a5);}throw new ToolExecutionError(_0x6d806b(0x2b9,_0x5a5785._0x59fa5c,0x2b6,0x250)+_0x26645b,{'path':_0x26645b,'rootDir':_0x3fe959});}async function assertWorkspaceFile(_0xa1d3f7){const _0x502a1e={_0x5df1e:0x165,_0x1f16bb:0x1cb,_0x160337:0x21a,_0xbeaec1:0x1de},_0x4271a5={_0x2f732a:0x1c5,_0x568afa:0x15a},_0x57f153={_0x543db9:0x1e2,_0x569042:0x78,_0x301377:0x57};function _0x9068cb(_0x555ab9,_0x141caf,_0x5d9403,_0x200109){return _0x5c1169(_0x555ab9-_0x57f153._0x543db9,_0x555ab9,_0x5d9403- -_0x57f153._0x569042,_0x200109-_0x57f153._0x301377);}const _0x2f542f=await stat(_0xa1d3f7);function _0xe5dd69(_0x303b0b,_0x24b2c8,_0x3ed7ee,_0x3f7ee2){return _0x27a792(_0x303b0b-_0x4271a5._0x2f732a,_0x24b2c8-_0x4271a5._0x568afa,_0x303b0b,_0x24b2c8- -0x4a6);}if(!_0x2f542f[_0xe5dd69(-_0x502a1e._0x5df1e,-0x1ca,-_0x502a1e._0x1f16bb,-0x1cc)]())throw new ToolExecutionError(_0xe5dd69(-_0x502a1e._0x160337,-0x20b,-_0x502a1e._0xbeaec1,-0x226)+_0xa1d3f7,{'path':_0xa1d3f7});}function isProbablyBinary(_0x5c1884){return _0x5c1884['includes'](0x0);}function detectEol(_0x4d6b8b){const _0x3ba03c={_0x195370:0x364,_0xd11458:0x336,_0xa1d42f:0x352,_0x4a1433:0x335,_0x265a42:0x2f1},_0x1dc17a={_0x5f3664:0x1de};function _0x2d4604(_0x49292d,_0x1834ce,_0x331e71,_0x2c1c6b){return _0x27a792(_0x49292d-0x131,_0x1834ce-_0x1dc17a._0x5f3664,_0x1834ce,_0x49292d-0x263);}function _0x33429e(_0x29a03a,_0x57a587,_0x3c3caf,_0x3f5734){return _0x5c1169(_0x29a03a-0x98,_0x57a587,_0x3f5734- -0x219,_0x3f5734-0xce);}return/\r\n/[_0x33429e(_0x3ba03c._0x195370,0x36a,_0x3ba03c._0xd11458,0x333)](_0x4d6b8b['toString'](_0x33429e(0x3f6,_0x3ba03c._0xa1d42f,0x349,0x3a9)))?_0x33429e(_0x3ba03c._0x4a1433,0x357,_0x3ba03c._0x265a42,0x34e):'lf';}function normalizeToLf(_0x465768){return _0x465768['replace'](/\r\n/g,'\x0a');}function convertEol(_0x424b2e,_0x550a5a){const _0x5868d8={_0x1a8ab8:0x13c},_0x43eedf={_0x180e7c:0x111,_0x3a474d:0x211};function _0x39f9d6(_0x132170,_0x5a3f1d,_0x3047f4,_0x3f5000){return _0x27a792(_0x132170-0xa6,_0x5a3f1d-_0x43eedf._0x180e7c,_0x3047f4,_0x5a3f1d- -_0x43eedf._0x3a474d);}return _0x550a5a==='crlf'?_0x424b2e[_0x39f9d6(0x11d,0xfb,0x97,_0x5868d8._0x1a8ab8)](/\n/g,'\x0d\x0a'):_0x424b2e;}async function atomicWrite(_0x3d2501,_0x18658a){const _0x47c483={_0x18b971:0x32e,_0x243803:0x2f6,_0x32b148:0x3e8,_0x149e5f:0x38a,_0x44bb0d:0x1c8,_0x3607be:0x201,_0x3d1f70:0x1fb,_0x2ece24:0x1b4,_0x5dc2e4:0x258,_0x2ff023:0x1e3,_0x7f5a3f:0x19b,_0x1feb8c:0x180,_0x2b3ad2:0x33d,_0x2bc812:0x393,_0x4c5e25:0x366,_0x218add:0x1e1,_0xa8b322:0x1b7,_0x34a95a:0x1c5,_0x424cfa:0x233,_0x32c15a:0x160},_0x24d36e={_0x1984a0:0x4e};function _0x4a5668(_0x19c359,_0x56bdf4,_0x4e0947,_0x37d273){return _0x5c1169(_0x19c359-0x116,_0x37d273,_0x19c359- -0x1e2,_0x37d273-0x181);}const _0x1de9a3=_0x264aea[_0x4a5668(_0x47c483._0x18b971,0x386,0x2df,_0x47c483._0x243803)](_0x3d2501),_0xe4a0fc=_0x264aea[_0x4a5668(_0x47c483._0x32b148,0x423,_0x47c483._0x149e5f,0x416)](_0x1de9a3,_0x46ded3(0x22a,_0x47c483._0x44bb0d,_0x47c483._0x3607be,0x1d0)+_0x264aea[_0x46ded3(_0x47c483._0x3d1f70,0x1f1,_0x47c483._0x2ece24,_0x47c483._0x5dc2e4)](_0x3d2501)+'.'+Date[_0x46ded3(_0x47c483._0x2ff023,_0x47c483._0x7f5a3f,_0x47c483._0x1feb8c,0x161)]()+'.'+Math[_0x4a5668(_0x47c483._0x2b3ad2,_0x47c483._0x2bc812,0x321,_0x47c483._0x4c5e25)]()[_0x46ded3(0x1e9,_0x47c483._0x218add,_0x47c483._0xa8b322,0x198)](0x24)[_0x46ded3(0x185,_0x47c483._0x34a95a,_0x47c483._0x424cfa,_0x47c483._0x32c15a)](0x2));await writeFile(_0xe4a0fc,_0x18658a);function _0x46ded3(_0x5a397c,_0x3ff803,_0x5a02cf,_0x58ab8d){return _0x5c1169(_0x5a397c-_0x24d36e._0x1984a0,_0x58ab8d,_0x3ff803- -0x3c5,_0x58ab8d-0x1f4);}await rename(_0xe4a0fc,_0x3d2501);}function sha256(_0x4a7c04){const _0x24f86b={_0x175f16:0xcd,_0x15f615:0x60,_0x103204:0xf4,_0x47a291:0x27,_0x44ba52:0x53,_0x535a78:0x8a,_0x1c23e6:0x79},_0x13b9ac={_0x30f664:0x1a7},_0xb82b80={_0x34fdca:0x153};function _0x1c1ca1(_0x3c7634,_0x10a0c8,_0x47a549,_0x26cc88){return _0x27a792(_0x3c7634-0xf4,_0x10a0c8-_0xb82b80._0x34fdca,_0x10a0c8,_0x26cc88- -0x2d2);}function _0x401e24(_0x2421ef,_0x22a55d,_0x593172,_0x56812e){return _0x27a792(_0x2421ef-0x190,_0x22a55d-_0x13b9ac._0x30f664,_0x56812e,_0x2421ef- -0x37e);}return createHash('sha256')[_0x401e24(-_0x24f86b._0x175f16,-0x64,-_0x24f86b._0x15f615,-_0x24f86b._0x103204)](_0x4a7c04)['digest'](_0x1c1ca1(_0x24f86b._0x47a291,_0x24f86b._0x44ba52,_0x24f86b._0x535a78,_0x24f86b._0x1c23e6));}function countLines(_0x393949){const _0x16a653={_0x4f3fa3:0x307,_0x3742ae:0x454,_0x54bb81:0x3f5,_0x257bc5:0x462},_0x114463={_0x341e6c:0x6d,_0x5f2b8a:0x13},_0x2e838f={_0x2d40bf:0x37,_0x4d9566:0x102,_0x89029b:0x177};function _0x336086(_0x51d77a,_0x34b3a8,_0xf3a11f,_0x251fb5){return _0x27a792(_0x51d77a-_0x2e838f._0x2d40bf,_0x34b3a8-_0x2e838f._0x4d9566,_0x51d77a,_0x251fb5-_0x2e838f._0x89029b);}function _0x465799(_0x29e1ec,_0x264f6e,_0x1dd65b,_0x1c23a4){return _0x27a792(_0x29e1ec-_0x114463._0x341e6c,_0x264f6e-0x187,_0x264f6e,_0x1dd65b- -_0x114463._0x5f2b8a);}const _0x2d106b=_0x393949[_0x465799(0x291,_0x16a653._0x4f3fa3,0x2f9,0x29d)](/\n$/,'');return _0x2d106b[_0x336086(_0x16a653._0x3742ae,0x4bd,_0x16a653._0x54bb81,_0x16a653._0x257bc5)]===0x0?0x0:_0x2d106b['split']('\x0a')['length'];}function calculateLineNumbers(_0x43036d,_0x4dd6ab,_0x311d22,_0xf422aa){const _0x271f5d={_0x331ad2:0x3e9,_0x4ad363:0x390,_0x55af78:0x44b,_0x5c41dd:0x407,_0x21485a:0x427,_0x3fa1a7:0x44b,_0x33ea6c:0x36f,_0x31c749:0x374},_0x335b20={_0x413431:0x18c,_0xbaa5c0:0x173},_0x4dac2c={_0x21a129:0xee,_0x3005ca:0x1ad};function _0x528992(_0x4e0f08,_0x277c60,_0xf8d4dc,_0x7374c7){return _0x5c1169(_0x4e0f08-_0x4dac2c._0x21a129,_0xf8d4dc,_0x4e0f08- -0x1f5,_0x7374c7-_0x4dac2c._0x3005ca);}const _0x48e8bf=_0x43036d[_0xe5b287(_0x271f5d._0x331ad2,0x3fe,_0x271f5d._0x4ad363,_0x271f5d._0x55af78)](0x0,_0xf422aa)[_0xe5b287(_0x271f5d._0x5c41dd,_0x271f5d._0x21485a,_0x271f5d._0x3fa1a7,0x470)]('\x0a')[_0x528992(_0x271f5d._0x33ea6c,0x317,_0x271f5d._0x31c749,0x385)];function _0xe5b287(_0x146e8c,_0x5df28b,_0xfa003b,_0x52fbff){return _0x5c1169(_0x146e8c-0x28,_0x146e8c,_0x5df28b- -_0x335b20._0x413431,_0x52fbff-_0x335b20._0xbaa5c0);}const _0x5105d6=countLines(_0x4dd6ab),_0x2416f7=countLines(_0x311d22);return{'oldStartLine':_0x48e8bf,'oldEndLine':_0x48e8bf+_0x5105d6-0x1,'newStartLine':_0x48e8bf,'newEndLine':_0x48e8bf+_0x2416f7-0x1,'oldLineCount':_0x5105d6,'newLineCount':_0x2416f7};}function createFileEditTool(_0x426cb1={}){const _0x198dd5={_0x54c1c7:0x39,_0x41e99c:0x67,_0x2eaf10:0x7b,_0x504b22:0x82,_0x5a13ef:0x34,_0x20dbd4:0xaa,_0x19f536:0xb},_0x176de5={_0x5e0d02:0x45,_0x1fe539:0x5a,_0x3af165:0x9f,_0x3ed102:0x5b5,_0x306512:0x5e6,_0x2d761d:0x5a7,_0x489eee:0x59b,_0x39a9c6:0x57b,_0x2abe88:0x57b,_0x22a63b:0x57d,_0xd415bc:0x72,_0x1aa5f6:0x34,_0x5952eb:0x8b,_0x2a19d3:0x552,_0x2adff5:0x546,_0x5d42c4:0x556,_0x51864e:0x18,_0x5ca0fe:0x3e,_0x31a935:0x64,_0x5c65ac:0x574,_0xf5b696:0x5d1,_0xa83588:0x567,_0x48f59e:0x598,_0x28e922:0x5e7,_0x22d7e5:0x589,_0x252eb1:0x8d,_0x4ae912:0x1,_0x7626d:0x95,_0x281a60:0xcd,_0x53ef36:0x5eb,_0x5e0c78:0x60,_0x2ca196:0x2b,_0x5a20e5:0x78,_0x1df9a6:0x49,_0x3aecd5:0x74,_0x3a575f:0x52,_0x451237:0xb4,_0x28ab63:0xe0,_0x18b129:0x77,_0x12052a:0xdf,_0x295705:0x591,_0x3f9474:0x5ab,_0x46d93d:0x59c,_0x46f8be:0x58a,_0x7cb87b:0x5bc,_0x2f4dda:0x5aa,_0x2730ea:0x585,_0x56d22c:0x5c7,_0x475186:0x5ef,_0x12d1b6:0x57c},_0x12a20a={_0x22c62b:0xf9,_0x4e47b7:0x5d6},_0xbbb8c1={_0x414f2f:0x5ad,_0x5e0418:0x1c7},_0x53208b={_0x2736a3:0x117};function _0x3c5bf2(_0x88338b,_0x1cad53,_0x384cbc,_0x3c55ce){return _0x5c1169(_0x88338b-_0x53208b._0x2736a3,_0x384cbc,_0x88338b- -0x529,_0x3c55ce-0x9);}const _0x27556a=_0x264aea['resolve'](_0x426cb1['defaultCwd']??process['cwd']());function _0x363912(_0x64b3a1,_0x4daf90,_0x4ef969,_0x5a13ea){return _0x5c1169(_0x64b3a1-0xef,_0x4ef969,_0x5a13ea- -_0xbbb8c1._0x414f2f,_0x5a13ea-_0xbbb8c1._0x5e0418);}const _0x130c46=_0x426cb1['name']??_0x3c5bf2(_0x198dd5._0x54c1c7,_0x198dd5._0x41e99c,_0x198dd5._0x2eaf10,0x6b);return defineTool({'name':_0x130c46,'description':'Edit\x20a\x20UTF-8\x20text\x20file\x20by\x20replacing\x20the\x20first\x20exact\x20text\x20segment.','inputSchema':{'type':_0x363912(_0x198dd5._0x504b22,-0x29,-_0x198dd5._0x5a13ef,0x24),'properties':{'filePath':{'type':_0x3c5bf2(0x6,-0x60,-0x4,-0x24)},'oldText':{'type':'string'},'newText':{'type':'string'},'dryRun':{'type':_0x363912(-0xb2,-_0x198dd5._0x20dbd4,-0x63,-0x55)}},'required':[_0x3c5bf2(0x4c,0xb7,0x8e,0x80),_0x363912(-_0x198dd5._0x19f536,-0x99,-0xc,-0x5b),'newText']},async *'execute'(_0x1a0542){const _0x4fa251={_0x29cee8:0x3c},_0xf2cf63=resolveWorkspacePath(_0x27556a,_0x1a0542[_0x49a689(-_0x176de5._0x5e0d02,-_0x176de5._0x1fe539,-0x74,-_0x176de5._0x3af165)]);await assertWorkspaceFile(_0xf2cf63);const _0x26ba12=await _0x3a745a(_0xf2cf63),_0x4bd30c=await readFile(_0xf2cf63),_0x2abe24=detectEol(_0x4bd30c),_0xb503a0=normalizeToLf(_0x4bd30c[_0x3276d3(_0x176de5._0x3ed102,0x5a2,0x5cf,_0x176de5._0x306512)](_0x3276d3(_0x176de5._0x2d761d,0x5f8,0x5eb,_0x176de5._0x489eee))),_0x171cec=normalizeToLf(_0x1a0542[_0x3276d3(0x5cb,_0x176de5._0x39a9c6,_0x176de5._0x2abe88,_0x176de5._0x22a63b)]),_0x208951=normalizeToLf(_0x1a0542[_0x49a689(-_0x176de5._0xd415bc,-0x1b,-_0x176de5._0x1aa5f6,-_0x176de5._0x5952eb)]),_0x45b981=_0xb503a0[_0x3276d3(_0x176de5._0x2a19d3,0x539,_0x176de5._0x2adff5,_0x176de5._0x5d42c4)](_0x171cec);if(_0x45b981===-0x1){const _0x1af48d=_0x171cec[_0x49a689(-_0x176de5._0x51864e,-_0x176de5._0x5ca0fe,-0x5f,-0xc2)](0x0,0x64)[_0x49a689(-0x46,-0x45,-_0x176de5._0x31a935,-0x55)](/\n/g,'\x5cn');throw new ToolExecutionError(_0x3276d3(0x596,_0x176de5._0x5c65ac,_0x176de5._0xf5b696,_0x176de5._0xa83588)+_0x1af48d+(_0x171cec['length']>0x64?_0x3276d3(0x5a6,_0x176de5._0x48f59e,0x5ba,0x612):'')+'\x22',{'filePath':_0x1a0542[_0x3276d3(_0x176de5._0x28e922,0x5f7,0x59e,0x549)]});}const _0x1dc252=_0xb503a0[_0x3276d3(0x56b,_0x176de5._0x22d7e5,0x5b3,0x615)](0x0,_0x45b981)+_0x208951+_0xb503a0[_0x49a689(-_0x176de5._0x252eb1,-_0x176de5._0x4ae912,-0x5f,-_0x176de5._0x7626d)](_0x45b981+_0x171cec['length']),_0x28832a=convertEol(_0x1dc252,_0x2abe24),_0x4ce533=Buffer[_0x49a689(-0xcd,-0xe3,-_0x176de5._0x281a60,-0xd2)](_0x28832a,_0x3276d3(0x5cb,0x59c,_0x176de5._0x53ef36,0x5a7)),_0x410b8f=sha256(_0x4bd30c),_0x54ebd2=sha256(_0x4ce533);function _0x49a689(_0x41f094,_0x533c1c,_0x4bca6f,_0x4a1d49){return _0x363912(_0x41f094-0x166,_0x533c1c-0x32,_0x533c1c,_0x4bca6f- -_0x4fa251._0x29cee8);}const _0x46fe72=_0x410b8f===_0x54ebd2,_0x2c9dac=_0x1a0542['dryRun']??![];function _0x3276d3(_0x496db7,_0xd3d7af,_0x513a37,_0x5baf35){return _0x363912(_0x496db7-_0x12a20a._0x22c62b,_0xd3d7af-0x73,_0x496db7,_0x513a37-_0x12a20a._0x4e47b7);}return!_0x2c9dac&&!_0x46fe72&&await atomicWrite(_0xf2cf63,_0x4ce533),yield createToolOutput(_0x46fe72?_0x3276d3(0x56c,0x5b3,0x5da,_0x176de5._0x22a63b):_0x2c9dac?_0x49a689(-_0x176de5._0x5e0c78,-0x20,-_0x176de5._0x2ca196,0x27):_0x49a689(-0x7d,-_0x176de5._0x5a20e5,-0x8e,-_0x176de5._0x1df9a6),{'filePath':_0x1a0542[_0x49a689(-0xc6,-0x24,-_0x176de5._0x3aecd5,-_0x176de5._0x3a575f)],'resolvedPath':_0xf2cf63,'created':_0x26ba12[_0x49a689(-_0x176de5._0x451237,-_0x176de5._0x28ab63,-_0x176de5._0x18b129,-_0x176de5._0x12052a)]['toISOString'](),'modified':_0x26ba12[_0x3276d3(0x604,_0x176de5._0x295705,0x5a7,0x5cd)]['toISOString'](),'size':_0x26ba12[_0x3276d3(_0x176de5._0x3f9474,_0x176de5._0x46d93d,_0x176de5._0x46f8be,0x54d)],'eol':_0x2abe24,'oldTextLength':_0x171cec[_0x3276d3(_0x176de5._0x7cb87b,0x587,0x58d,_0x176de5._0x2f4dda)],'newTextLength':_0x208951[_0x3276d3(0x55b,_0x176de5._0x2730ea,0x58d,_0x176de5._0x56d22c)],'bytesWritten':_0x46fe72||_0x2c9dac?0x0:_0x4ce533[_0x3276d3(_0x176de5._0x475186,_0x176de5._0x12d1b6,0x58d,0x55e)],'beforeSha':_0x410b8f,'afterSha':_0x54ebd2,'dryRun':_0x2c9dac,'noChange':_0x46fe72,'lineNumbers':calculateLineNumbers(_0xb503a0,_0x171cec,_0x208951,_0x45b981)}),void 0x0;}});}import{mkdir,rename as _0x1de27e,stat as _0x2a9f9e,writeFile as _0x2d3dfb}from'fs/promises';import*as _0x4d93dc from'path';async function atomicWrite2(_0x5d1494,_0x53496b){const _0x4649f6={_0x140934:0x116,_0x15a165:0xb7,_0x309978:0xa1,_0x23213c:0x107,_0x321893:0x160,_0x21fcb3:0x16e,_0x48daef:0x14c,_0x246736:0x14f,_0x591a19:0x1b8,_0x31db89:0x1d2,_0x1cec12:0x154,_0x13910c:0x1a2,_0x17c013:0x14c},_0x1e29f0={_0x5d0c90:0x36,_0x2e6365:0x1c5},_0x546434={_0x42a4d3:0x160,_0x4ca735:0x66b};function _0x28979b(_0x236f25,_0xd61d94,_0x35d9dc,_0x54de7f){return _0x5c1169(_0x236f25-_0x546434._0x42a4d3,_0x35d9dc,_0xd61d94- -_0x546434._0x4ca735,_0x54de7f-0xa1);}const _0x171bd8=_0x4d93dc[_0x28979b(-0xfd,-0x15b,-0x15d,-_0x4649f6._0x140934)](_0x5d1494);await mkdir(_0x171bd8,{'recursive':!![]});function _0x484a7c(_0x156505,_0xb1c95,_0x40a398,_0x7f9b14){return _0x27a792(_0x156505-0x18d,_0xb1c95-_0x1e29f0._0x5d0c90,_0x156505,_0x7f9b14- -_0x1e29f0._0x2e6365);}const _0x1d0d2a=_0x4d93dc[_0x28979b(-_0x4649f6._0x15a165,-_0x4649f6._0x309978,-_0x4649f6._0x23213c,-0xf3)](_0x171bd8,_0x484a7c(_0x4649f6._0x321893,_0x4649f6._0x21fcb3,_0x4649f6._0x48daef,_0x4649f6._0x246736)+_0x4d93dc[_0x484a7c(_0x4649f6._0x591a19,_0x4649f6._0x31db89,0x1d4,0x178)](_0x5d1494)+'.'+Date[_0x484a7c(_0x4649f6._0x1cec12,0x171,0x123,0x122)]()+'.'+Math[_0x28979b(-_0x4649f6._0x13910c,-_0x4649f6._0x17c013,-0x141,-0x134)]()['toString'](0x24)['slice'](0x2));await _0x2d3dfb(_0x1d0d2a,_0x53496b),await _0x1de27e(_0x1d0d2a,_0x5d1494);}function createFileNewTool(_0x3cecb6={}){const _0x1fd026={_0x138357:0x57e,_0x12b9c6:0x5e3,_0xf5387c:0x573,_0x45bfb7:0x537,_0x223dee:0x36a,_0x4f0599:0x3cd,_0x5d30d9:0x3b0,_0x22af71:0x3a7,_0x1f6abe:0x5e1,_0x4ada72:0x597,_0x1b649c:0x53b,_0x370c16:0x35e,_0x2b24c8:0x35f,_0xed0e2b:0x31b,_0x287a6f:0x361},_0x2052d0={_0x399866:0x3d1,_0x52c957:0x436,_0x2eec91:0x439,_0x49c96c:0x405,_0x43c309:0x3b7,_0xc60971:0x354,_0x498e02:0xa7,_0x44f4c6:0x115,_0x141a54:0x12c,_0x52321f:0x112,_0x34ec89:0x11d,_0x28bd6f:0xb0,_0xf75a44:0x19f,_0x5b78e5:0x106,_0x2309b3:0x3d1,_0x15e117:0x3b2,_0x5032cb:0x410,_0x2e6e6d:0x124,_0xa31a14:0x18d,_0x4dd40b:0x118,_0x23c0d3:0x18e},_0x20bdbe={_0xf4aac:0xf2},_0x3f2998={_0x3a57a6:0xa8,_0x23aeda:0x121,_0x463f8a:0xaf},_0x5b397c={_0x4ad124:0x46,_0x5b1e86:0x289},_0x568eb9={_0x231a5c:0x3b,_0x2014d7:0x214},_0x16de83=_0x4d93dc['resolve'](_0x3cecb6['defaultCwd']??process['cwd']());function _0x2408fc(_0x2b6498,_0x747e25,_0x209954,_0x3b5327){return _0x5c1169(_0x2b6498-_0x568eb9._0x231a5c,_0x209954,_0x3b5327- -_0x568eb9._0x2014d7,_0x3b5327-0x45);}const _0x173264=_0x3cecb6[_0x384d88(_0x1fd026._0x138357,_0x1fd026._0x12b9c6,0x54f,0x51d)]??_0x384d88(_0x1fd026._0xf5387c,_0x1fd026._0x45bfb7,0x59b,0x54c);function _0x384d88(_0x387605,_0x2b7970,_0x1875c7,_0xfd9dec){return _0x27a792(_0x387605-0x1b3,_0x2b7970-_0x5b397c._0x4ad124,_0x1875c7,_0x387605-_0x5b397c._0x5b1e86);}return defineTool({'name':_0x173264,'description':_0x2408fc(_0x1fd026._0x223dee,_0x1fd026._0x4f0599,_0x1fd026._0x5d30d9,_0x1fd026._0x22af71),'inputSchema':{'type':_0x384d88(_0x1fd026._0x1f6abe,_0x1fd026._0x4ada72,0x5c1,0x574),'properties':{'filePath':{'type':_0x384d88(0x53f,0x57c,_0x1fd026._0x1b649c,0x51a)},'content':{'type':_0x2408fc(0x37d,_0x1fd026._0x370c16,_0x1fd026._0x2b24c8,_0x1fd026._0xed0e2b)}},'required':[_0x2408fc(0x366,0x332,0x395,_0x1fd026._0x287a6f),_0x384d88(0x5f6,0x638,0x5ab,0x636)]},async *'execute'(_0x4de3cb){const _0x3d2870=resolveWorkspacePath(_0x16de83,_0x4de3cb['filePath']),_0x22841c=await _0x2a9f9e(_0x3d2870)[_0x4176bc(_0x2052d0._0x399866,0x447,_0x2052d0._0x52c957,0x447)](()=>!![])[_0x4176bc(_0x2052d0._0x2eec91,0x401,0x467,_0x2052d0._0x49c96c)](()=>![]),_0x7b6634=Buffer[_0x4176bc(0x3e3,0x3db,_0x2052d0._0x43c309,_0x2052d0._0xc60971)](_0x4de3cb[_0x30ce0a(-0xf1,-_0x2052d0._0x498e02,-0x150,-0x8d)],_0x30ce0a(-_0x2052d0._0x44f4c6,-_0x2052d0._0x141a54,-_0x2052d0._0x52321f,-0xa8));await atomicWrite2(_0x3d2870,_0x7b6634);function _0x4176bc(_0x4bad57,_0x279191,_0xb1f7a2,_0xe4544a){return _0x2408fc(_0x4bad57-_0x3f2998._0x3a57a6,_0x279191-_0x3f2998._0x23aeda,_0xe4544a,_0xb1f7a2-_0x3f2998._0x463f8a);}yield createToolOutput(_0x30ce0a(-_0x2052d0._0x34ec89,-_0x2052d0._0x28bd6f,-0x116,-0x187)+_0x4de3cb[_0x30ce0a(-0x162,-0x13c,-_0x2052d0._0xf75a44,-_0x2052d0._0x5b78e5)]+'.',{'filePath':_0x4de3cb[_0x4176bc(_0x2052d0._0x2309b3,_0x2052d0._0x15e117,_0x2052d0._0x5032cb,0x467)],'resolvedPath':_0x3d2870,'bytes':_0x7b6634['length'],'lines':_0x4de3cb['content'][_0x30ce0a(-_0x2052d0._0x2e6e6d,-0xd9,-_0x2052d0._0xa31a14,-0x174)](/\r?\n/)[_0x30ce0a(-0x173,-_0x2052d0._0x4dd40b,-_0x2052d0._0x23c0d3,-0x157)],'created':new Date()[_0x30ce0a(-0x125,-0x115,-0x15e,-0x15d)](),'overwritten':_0x22841c});function _0x30ce0a(_0x4045e0,_0x138882,_0x20479d,_0x2d077b){return _0x384d88(_0x4045e0- -0x6e7,_0x138882-_0x20bdbe._0xf4aac,_0x2d077b,_0x2d077b-0xd2);}return void 0x0;}});}import{readFile as _0xd465f0,stat as _0x2cbc2b}from'fs/promises';import*as _0x292625 from'path';function stripUtfBom(_0x3ea0a6){const _0x18aff3={_0x421d1b:0x3dc,_0x32592c:0x3e3},_0x9505a2={_0x559264:0x13c,_0x196846:0x1b9};function _0x1e5bc3(_0x4c669d,_0x58d0fd,_0x81b868,_0x39476f){return _0x5c1169(_0x4c669d-_0x9505a2._0x559264,_0x81b868,_0x58d0fd- -_0x9505a2._0x196846,_0x39476f-0x48);}return _0x3ea0a6[_0x1e5bc3(0x3ba,_0x18aff3._0x421d1b,0x3cd,_0x18aff3._0x32592c)](0x0)===0xfeff?_0x3ea0a6['slice'](0x1):_0x3ea0a6;}function clampLine(_0x8587fc,_0x3fcee4){const _0x592ad3={_0x2143c9:0x89,_0x13861a:0x5b,_0x522351:0xcf,_0x4abfba:0xaa,_0x1ad92d:0x20b,_0x359c79:0x153,_0x3e335d:0x187,_0x10c21b:0x1b3},_0x2738c5={_0x293fe3:0x17f},_0x1750a9={_0x4c7a01:0xc1,_0xd2c99c:0x155};function _0xd35bd2(_0x506259,_0x2518db,_0x235492,_0x1317fa){return _0x5c1169(_0x506259-_0x1750a9._0x4c7a01,_0x2518db,_0x235492- -0x404,_0x1317fa-_0x1750a9._0xd2c99c);}function _0x5d0fb6(_0x2233e3,_0x8780c4,_0x56a201,_0x37b625){return _0x27a792(_0x2233e3-0x1ce,_0x8780c4-_0x2738c5._0x293fe3,_0x37b625,_0x2233e3- -0x242);}if(!Number['isFinite'](_0x8587fc))return 0x1;return Math[_0x5d0fb6(_0x592ad3._0x2143c9,_0x592ad3._0x13861a,_0x592ad3._0x522351,_0x592ad3._0x4abfba)](0x1,Math[_0xd35bd2(_0x592ad3._0x1ad92d,0x20d,0x1d6,0x227)](Math[_0xd35bd2(_0x592ad3._0x359c79,_0x592ad3._0x3e335d,_0x592ad3._0x10c21b,0x1b9)](_0x8587fc),_0x3fcee4));}function createFileReadTool(_0x2bc8ea={}){const _0x4c420e={_0x4a93ed:0x529,_0x5d838f:0x545,_0x29fe63:0x54d,_0x2addc9:0x597,_0x1ef13f:0x591,_0x26539e:0x5ae,_0x2308d3:0x5e7,_0x499a85:0x606,_0x45f46e:0x614,_0x2c728e:0x356,_0x97e612:0x38e,_0x25a93b:0x32f,_0x341a90:0x398,_0x577872:0x350,_0x4dad3f:0x387,_0x38ce5b:0x3be},_0x17c7c8={_0x242f42:0x153,_0x41b252:0x370,_0x151d2d:0x3fa,_0x4c8760:0x4ae,_0x5f3a72:0x3fd,_0xc6876d:0x478,_0x30cb2e:0x19e,_0x4496f8:0x16a,_0x501278:0x1a0,_0xfcb87a:0x194,_0x82b9ef:0x129,_0x4e1314:0x464,_0x1cbcbe:0x3ea,_0x539791:0x434,_0xe28572:0x4a1,_0x2f0e53:0x15f,_0x3fd91a:0x18d,_0x4ebd2a:0x1a1,_0x26fa6e:0x1f0,_0xc900:0x155,_0x3139c5:0x160,_0x40fadb:0x140,_0x37413f:0x3f6,_0x4edf5d:0x154,_0x471b75:0x1b2,_0x2098e1:0x181,_0x584636:0x18d,_0x9b3c1d:0x203,_0x2d8c55:0x440,_0x4c87b1:0x227,_0x411a73:0x1f3,_0x552cdd:0x190},_0x32ea48={_0x366a0e:0x1e5},_0x55abe9={_0xce59ad:0x17},_0x28b4b6=_0x292625['resolve'](_0x2bc8ea[_0x483acd(_0x4c420e._0x4a93ed,_0x4c420e._0x5d838f,_0x4c420e._0x29fe63,0x55a)]??process[_0x483acd(0x5c2,0x5f0,_0x4c420e._0x2addc9,_0x4c420e._0x1ef13f)]()),_0x58627a=_0x2bc8ea['name']??'FileRead';function _0x483acd(_0x20554b,_0x897e9c,_0x5d80c6,_0x53da06){return _0x5c1169(_0x20554b-0x1cc,_0x53da06,_0x20554b-_0x55abe9._0xce59ad,_0x53da06-0xd2);}function _0x2b2e51(_0x36ba3d,_0x5863a4,_0x27a456,_0x37d6ec){return _0x5c1169(_0x36ba3d-0x83,_0x36ba3d,_0x5863a4- -0x1d9,_0x37d6ec-0x134);}return defineTool({'name':_0x58627a,'description':_0x483acd(_0x4c420e._0x26539e,0x5fb,0x5df,_0x4c420e._0x2308d3),'inputSchema':{'type':_0x483acd(0x5e8,_0x4c420e._0x499a85,_0x4c420e._0x45f46e,0x62c),'properties':{'path':{'type':_0x2b2e51(0x361,_0x4c420e._0x2c728e,_0x4c420e._0x97e612,_0x4c420e._0x25a93b)},'lineStart':{'type':_0x2b2e51(_0x4c420e._0x341a90,_0x4c420e._0x577872,0x3a1,0x314)},'lineEnd':{'type':_0x2b2e51(0x2ea,0x350,_0x4c420e._0x4dad3f,_0x4c420e._0x38ce5b)}},'required':['path']},async *'execute'(_0x19b940){const _0x3b6eb4={_0x350e0f:0x8f},_0x5ab7ce=resolveWorkspacePath(_0x28b4b6,_0x19b940[_0x63396a(0x102,0x13c,_0x17c7c8._0x242f42,0x17d)]);await assertWorkspaceFile(_0x5ab7ce);const _0xc28b76=await _0x2cbc2b(_0x5ab7ce);function _0x63396a(_0x5ce8ab,_0x3786b1,_0x23f4f9,_0x23400d){return _0x483acd(_0x3786b1- -0x3ee,_0x3786b1-_0x32ea48._0x366a0e,_0x23f4f9-0xd9,_0x23400d);}const _0x3659b4=await _0xd465f0(_0x5ab7ce);if(isProbablyBinary(_0x3659b4))throw new ToolExecutionError('File\x20appears\x20to\x20be\x20binary:\x20'+_0x19b940[_0x480bba(0x3c9,_0x17c7c8._0x41b252,0x39d,_0x17c7c8._0x151d2d)],{'path':_0x19b940['path']});let _0x2cd619=_0x3659b4[_0x480bba(0x45c,_0x17c7c8._0x4c8760,0x45b,_0x17c7c8._0x5f3a72)](_0x480bba(_0x17c7c8._0xc6876d,0x48b,0x482,0x42e));const _0x357c86=_0x2cd619[_0x63396a(_0x17c7c8._0x30cb2e,0x1be,_0x17c7c8._0x4496f8,0x15b)](0x0)===0xfeff;_0x2cd619=stripUtfBom(_0x2cd619);function _0x480bba(_0x4c63ed,_0x1fc522,_0x220424,_0x38f657){return _0x2b2e51(_0x1fc522,_0x4c63ed-_0x3b6eb4._0x350e0f,_0x220424-0x81,_0x38f657-0x6c);}const _0x2037ca=_0x2cd619[_0x63396a(0x17a,0x1dc,0x1a7,_0x17c7c8._0x501278)](/\r?\n/),_0x487c7d={'path':_0x19b940[_0x63396a(0x18d,0x13c,_0x17c7c8._0xfcb87a,_0x17c7c8._0x82b9ef)],'resolvedPath':_0x5ab7ce,'created':_0xc28b76[_0x480bba(0x428,_0x17c7c8._0x4e1314,0x3f6,_0x17c7c8._0x1cbcbe)]['toISOString'](),'modified':_0xc28b76[_0x480bba(_0x17c7c8._0x539791,0x43f,_0x17c7c8._0xe28572,0x43b)]['toISOString'](),'size':_0xc28b76['size'],'encoding':'utf8','bomStripped':_0x357c86,'truncated':![],'totalLines':_0x2037ca[_0x63396a(_0x17c7c8._0x2f0e53,_0x17c7c8._0x3fd91a,_0x17c7c8._0x4ebd2a,_0x17c7c8._0x26fa6e)]};if(_0x19b940[_0x63396a(0x15d,0x18f,0x1af,_0x17c7c8._0xc900)]!==void 0x0||_0x19b940['lineEnd']!==void 0x0){const _0x5a2456=clampLine(_0x19b940[_0x63396a(_0x17c7c8._0x3139c5,0x18f,0x1d9,_0x17c7c8._0x40fadb)]??0x1,_0x2037ca[_0x480bba(0x41a,_0x17c7c8._0x37413f,0x438,0x3be)]),_0x431402=clampLine(_0x19b940[_0x63396a(0x146,0x164,_0x17c7c8._0x4edf5d,_0x17c7c8._0x471b75)]??_0x2037ca[_0x63396a(_0x17c7c8._0x2098e1,_0x17c7c8._0x3fd91a,0x1c3,_0x17c7c8._0x584636)],_0x2037ca['length']),_0x5e6a70=Math[_0x63396a(0x1e8,_0x17c7c8._0x9b3c1d,0x1cf,0x1c6)](_0x5a2456,_0x431402),_0x8c9078=Math['max'](_0x5a2456,_0x431402),_0x55e7d4=_0x2037ca[_0x480bba(_0x17c7c8._0x2d8c55,0x427,0x3eb,0x479)](_0x5e6a70-0x1,_0x8c9078)[_0x480bba(0x435,0x408,0x461,0x442)]((_0x4cd5cf,_0x527da)=>_0x5e6a70+_0x527da+'|'+_0x4cd5cf)[_0x63396a(_0x17c7c8._0x4c87b1,_0x17c7c8._0x411a73,0x1fc,_0x17c7c8._0x552cdd)]('\x0a');return yield createToolOutput(_0x55e7d4,{..._0x487c7d,'lineRange':{'lineStart':_0x5e6a70,'lineEnd':_0x8c9078,'linesTotal':_0x2037ca['length']}}),void 0x0;}return yield createToolOutput(_0x2cd619,_0x487c7d),void 0x0;}});}function _0x5c1169(_0x4f6408,_0x1a6343,_0x186186,_0x141e78){const _0x3af1fd={_0x77a42a:0x362};return _0xdaaf(_0x186186-_0x3af1fd._0x77a42a,_0x1a6343);}import{stat as _0x172043}from'fs/promises';import*as _0x336f02 from'path';import{execSync,spawn as _0x3d42e5}from'child_process';import{existsSync}from'fs';import{stat as _0x38c437}from'fs/promises';import*as _0x1264af from'os';import*as _0x2eea10 from'path';var cachedRgPath=null;function findSystemRipgrep(){const _0x5f2c6d={_0x2cd808:0x605,_0xd468c2:0x5c7,_0x4b13bc:0x5c4,_0x4bfc49:0x61c,_0x29196d:0x632,_0x250f57:0x639,_0x101f38:0x5e1,_0x213eee:0x5b8,_0x4d8ae5:0x10b,_0xe7e5ac:0xaf,_0x57344f:0x6f,_0x109f37:0xcb,_0x4c309f:0x593,_0x288e2e:0x535,_0x24614e:0x6a,_0x54fbae:0xf9,_0x4027ba:0xdf,_0x1013f9:0xe9,_0x213f22:0x643,_0x4ae319:0x651,_0x1f6ccd:0x5e1,_0x933ce2:0x601,_0x373033:0x582,_0x4b7f52:0xbb,_0x165685:0x68,_0x445a70:0x119,_0x14b2af:0xbb,_0x73d36b:0x5d2,_0x211ea0:0xe2,_0x46b6a3:0x8e,_0x32faa8:0x614,_0x49aff7:0x5e4,_0x19bb72:0x6f,_0x3ed053:0x9f,_0x20c14c:0x81,_0x5b28b7:0x78,_0x2f3502:0x19,_0x2e9486:0x7a,_0x40ff02:0x63d,_0x419f75:0x99,_0x56665c:0xcf,_0xd58cfa:0x90,_0x1ba2af:0x62c},_0x17b6a7={_0xf420c6:0x32},_0x5f0d1d={_0x25b7f1:0x1de},_0x2ac3dc=_0x1264af[_0x302bef(_0x5f2c6d._0x2cd808,0x62a,_0x5f2c6d._0xd468c2,_0x5f2c6d._0x4b13bc)]()===_0x302bef(0x5f4,_0x5f2c6d._0x4bfc49,_0x5f2c6d._0x29196d,_0x5f2c6d._0x250f57),_0x39d288=_0x2ac3dc?[_0x2eea10['join'](process[_0x302bef(_0x5f2c6d._0x101f38,0x640,0x61d,_0x5f2c6d._0x213eee)]['LOCALAPPDATA']||'',_0x2c298e(-0xc0,-0x11d,-_0x5f2c6d._0x4d8ae5,-_0x5f2c6d._0xe7e5ac),_0x2c298e(-0xcf,-_0x5f2c6d._0x57344f,-0xfd,-_0x5f2c6d._0x109f37),_0x302bef(_0x5f2c6d._0x4c309f,0x5c5,0x573,_0x5f2c6d._0x288e2e)),_0x2eea10[_0x2c298e(-0x6e,-0x59,-_0x5f2c6d._0x24614e,-0x30)](process['env'][_0x2c298e(-_0x5f2c6d._0x54fbae,-0x13e,-0x11b,-0xac)]||'',_0x2c298e(-_0x5f2c6d._0x4027ba,-0xdb,-0xec,-_0x5f2c6d._0x1013f9),_0x302bef(0x58a,0x56d,0x52d,0x5ea)),_0x2eea10[_0x302bef(_0x5f2c6d._0x213f22,0x632,0x688,_0x5f2c6d._0x4ae319)](process[_0x302bef(_0x5f2c6d._0x1f6ccd,_0x5f2c6d._0x933ce2,_0x5f2c6d._0x373033,0x574)][_0x2c298e(-_0x5f2c6d._0x4b7f52,-_0x5f2c6d._0x165685,-_0x5f2c6d._0x445a70,-_0x5f2c6d._0x14b2af)]||'',_0x302bef(_0x5f2c6d._0x73d36b,0x5e2,0x613,0x633),_0x302bef(0x58a,0x580,0x5d9,0x5cc))]:[_0x302bef(0x607,0x5f5,0x666,0x5a8),'/usr/local/bin/rg',_0x2c298e(-_0x5f2c6d._0x211ea0,-0x11a,-0x9a,-_0x5f2c6d._0x46b6a3),_0x302bef(0x5de,_0x5f2c6d._0x32faa8,0x59e,_0x5f2c6d._0x49aff7)];for(const _0xa6a83f of _0x39d288){if(existsSync(_0xa6a83f))return _0xa6a83f;}try{const _0x272a89=_0x2ac3dc?_0x2c298e(-_0x5f2c6d._0x19bb72,-_0x5f2c6d._0x3ed053,-_0x5f2c6d._0x20c14c,-0xbd):'which\x20rg',_0x2bd0ac=execSync(_0x272a89,{'encoding':'utf8','stdio':[_0x2c298e(-_0x5f2c6d._0x5b28b7,-_0x5f2c6d._0x2f3502,-0x9c,-_0x5f2c6d._0x2e9486),_0x302bef(_0x5f2c6d._0x250f57,0x68b,_0x5f2c6d._0x40ff02,0x67b),'ignore']})[_0x2c298e(-_0x5f2c6d._0x419f75,-_0x5f2c6d._0x56665c,-_0x5f2c6d._0xd58cfa,-0x42)]()[_0x302bef(_0x5f2c6d._0x1ba2af,0x687,0x5da,0x67e)](/\r?\n/)[0x0];if(_0x2bd0ac&&existsSync(_0x2bd0ac))return _0x2bd0ac;}catch{return null;}function _0x2c298e(_0x4e6ad8,_0x3dcb5b,_0x26cdab,_0x1c76f7){return _0x27a792(_0x4e6ad8-_0x5f0d1d._0x25b7f1,_0x3dcb5b-0x41,_0x1c76f7,_0x4e6ad8- -0x3bf);}function _0x302bef(_0x1021c8,_0x2b131b,_0x425590,_0x5e5f53){return _0x27a792(_0x1021c8-0xf2,_0x2b131b-_0x17b6a7._0xf420c6,_0x2b131b,_0x1021c8-0x2f2);}return null;}async function filepath(){if(cachedRgPath)return cachedRgPath;const _0x4fb33a=findSystemRipgrep();if(!_0x4fb33a)throw new Error('ripgrep\x20executable\x20not\x20found.\x20Install\x20rg\x20to\x20use\x20Glob\x20and\x20Grep\x20tools.');return cachedRgPath=_0x4fb33a,_0x4fb33a;}async function*files(_0x2c8871){const _0x476ffc={_0xad8062:0x60f,_0xbc9630:0x2c8,_0x5099cb:0x265,_0x38bf54:0x28f,_0x1c4b58:0x217,_0x4ae431:0x21f,_0x326997:0x29e,_0x74b330:0x281,_0x438b44:0x25f,_0x3ed068:0x57c,_0x268ca7:0x530,_0x343e4f:0x5dd,_0xa644a7:0x5d0,_0x5a8aeb:0x58c,_0x472a7b:0x1e0,_0x652185:0x585,_0x1dd82b:0x58e,_0x22bbfd:0x636,_0x28bc8f:0x60f,_0x569f00:0x5b4,_0x2123ae:0x5c5,_0x313234:0x607,_0x3f2609:0x5aa,_0x2e30ac:0x635,_0x25adfc:0x23d,_0xaaffe3:0x296,_0x2e28bb:0x247,_0x329973:0x241,_0xf5b88a:0x28a,_0x420070:0x27c,_0xb5e750:0x289,_0x594cc2:0x248,_0x4e9830:0x5c8,_0x297a55:0x5fb,_0x2ae7d9:0x610,_0x58386d:0x5c8,_0x1b7daa:0x65f},_0x56d533={_0x2c2ca9:0x18b,_0x1df7ca:0xb1},_0x143999={_0x523d4b:0x1bc};function _0x3dcb90(_0x135289,_0x2d76be,_0x8eb835,_0x220fbc){return _0x5c1169(_0x135289-0xca,_0x2d76be,_0x135289-0x64,_0x220fbc-_0x143999._0x523d4b);}function _0x32f978(_0x4200ac,_0x255e03,_0x4e6625,_0x4cfa84){return _0x27a792(_0x4200ac-0x130,_0x255e03-_0x56d533._0x2c2ca9,_0x4cfa84,_0x4e6625- -_0x56d533._0x1df7ca);}const _0x14fae4=await filepath(),_0x20563c=await _0x38c437(_0x2c8871[_0x3dcb90(_0x476ffc._0xad8062,0x61d,0x639,0x5b7)])['catch'](()=>null);if(!_0x20563c?.[_0x32f978(0x292,_0x476ffc._0xbc9630,_0x476ffc._0x5099cb,_0x476ffc._0x38bf54)]())throw Object[_0x32f978(_0x476ffc._0x1c4b58,0x1aa,0x1fa,0x211)](new Error(_0x32f978(0x206,0x25b,_0x476ffc._0x4ae431,0x21e)+_0x2c8871[_0x32f978(0x264,_0x476ffc._0x326997,_0x476ffc._0x74b330,_0x476ffc._0x438b44)]+'\x27'),{'code':_0x3dcb90(_0x476ffc._0x3ed068,0x539,0x5c2,_0x476ffc._0x268ca7)});const _0x47b876=[_0x3dcb90(_0x476ffc._0x343e4f,_0x476ffc._0xa644a7,_0x476ffc._0x5a8aeb,0x5c8),'--follow','--hidden',_0x32f978(_0x476ffc._0x472a7b,0x22c,0x20b,0x250)];for(const _0x2c2827 of _0x2c8871[_0x3dcb90(_0x476ffc._0x652185,0x572,0x585,0x566)]??[]){_0x47b876[_0x3dcb90(0x5d0,0x5dd,_0x476ffc._0x1dd82b,_0x476ffc._0x22bbfd)]('--glob='+_0x2c2827);}const _0x55324c=_0x3d42e5(_0x14fae4,_0x47b876,{'cwd':_0x2c8871[_0x3dcb90(_0x476ffc._0x28bc8f,0x627,_0x476ffc._0x569f00,_0x476ffc._0x2123ae)],'stdio':[_0x3dcb90(_0x476ffc._0x313234,0x5c0,_0x476ffc._0x3f2609,_0x476ffc._0x2e30ac),'pipe',_0x32f978(_0x476ffc._0x25adfc,0x25c,_0x476ffc._0xaaffe3,_0x476ffc._0x2e28bb)]});let _0x4779b5='';for await(const _0x19b1d2 of _0x55324c[_0x32f978(0x1d5,0x254,_0x476ffc._0x329973,0x293)]??[]){_0x4779b5+=_0x19b1d2[_0x32f978(0x247,_0x476ffc._0xf5b88a,_0x476ffc._0x420070,0x23a)]();const _0x1cb701=_0x4779b5[_0x32f978(0x266,0x26e,_0x476ffc._0xb5e750,_0x476ffc._0x594cc2)](/\r?\n/);_0x4779b5=_0x1cb701['pop']()??'';for(const _0x47aee of _0x1cb701){if(_0x47aee[_0x3dcb90(_0x476ffc._0x4e9830,0x58b,_0x476ffc._0x297a55,_0x476ffc._0x2ae7d9)]>0x0)yield _0x47aee;}}_0x4779b5['trim']()[_0x3dcb90(_0x476ffc._0x58386d,0x5fb,0x61f,0x5e7)]>0x0&&(yield _0x4779b5[_0x3dcb90(0x603,_0x476ffc._0x1b7daa,0x5ed,0x5fc)]());}function parseMatchLine(_0x52278c,_0xa267b){const _0x8ba80e={_0x3f3f78:0x132,_0x2fa3a7:0x149,_0x5c493d:0x1af,_0x506c2a:0x1c9,_0x415071:0x1ad,_0x43a2ba:0xfb,_0x5370e4:0x30a,_0x2545e6:0x30e,_0x4e310e:0x174,_0x1c88aa:0x202,_0x437a39:0x2e4,_0x2ae1b4:0x34f,_0x93a561:0x364,_0x68c8c6:0x358,_0x2bc4bd:0x36c,_0xd3d9f4:0x176,_0x559cdf:0x168,_0x3bf1bf:0x2be},_0x38c416={_0x5acb4a:0x97,_0x590be1:0x280,_0x1b57d5:0x1e3},_0x2dccb0={_0x5390e9:0x1a2};if(!_0x52278c||_0x52278c==='--')return null;function _0x1f2867(_0xcc45ec,_0x2c5e2d,_0x240566,_0xb6322a){return _0x27a792(_0xcc45ec-0x11e,_0x2c5e2d-0x1ed,_0xb6322a,_0x2c5e2d- -_0x2dccb0._0x5390e9);}const _0x1de7ca=_0x52278c['split']('|');if(_0xa267b&&_0x1de7ca[_0x1f2867(_0x8ba80e._0x3f3f78,_0x8ba80e._0x2fa3a7,0x15d,0x136)]>=0x4&&Number['isFinite'](Number[_0x1f2867(_0x8ba80e._0x5c493d,_0x8ba80e._0x506c2a,_0x8ba80e._0x415071,0x193)](_0x1de7ca[0x2]??'',0xa))){const _0x2fba08=Number[_0x1f2867(0x231,_0x8ba80e._0x506c2a,0x187,0x1ad)](_0x1de7ca[0x1]??'',0xa);if(!Number[_0x1f2867(0x1c3,0x168,0x109,_0x8ba80e._0x43a2ba)](_0x2fba08)||!_0x1de7ca[0x0])return null;return{'filePath':_0x1de7ca[0x0],'lineNum':_0x2fba08,'lineText':_0x1de7ca[_0x1bb43c(_0x8ba80e._0x5370e4,0x2c1,0x300,_0x8ba80e._0x2545e6)](0x3)[_0x1f2867(_0x8ba80e._0x4e310e,_0x8ba80e._0x5c493d,_0x8ba80e._0x1c88aa,0x1b8)]('|')};}function _0x1bb43c(_0x19af6a,_0x575d6c,_0x63189c,_0x6ef7f9){return _0x5c1169(_0x19af6a-_0x38c416._0x5acb4a,_0x63189c,_0x19af6a- -_0x38c416._0x590be1,_0x6ef7f9-_0x38c416._0x1b57d5);}if(_0x1de7ca[_0x1bb43c(_0x8ba80e._0x437a39,0x287,0x32e,_0x8ba80e._0x2ae1b4)]>=0x3){const _0x3b9104=Number[_0x1bb43c(_0x8ba80e._0x93a561,_0x8ba80e._0x68c8c6,0x3b1,_0x8ba80e._0x2bc4bd)](_0x1de7ca[0x1]??'',0xa);if(!Number[_0x1f2867(_0x8ba80e._0xd3d9f4,_0x8ba80e._0x559cdf,0x179,0x169)](_0x3b9104)||!_0x1de7ca[0x0])return null;return{'filePath':_0x1de7ca[0x0],'lineNum':_0x3b9104,'lineText':_0x1de7ca[_0x1bb43c(0x30a,_0x8ba80e._0x3bf1bf,0x2a5,0x312)](0x2)['join']('|'),..._0xa267b?{'isContext':!![]}:{}};}return null;}async function search(_0x39ce02){const _0x5dcaba={_0x9902ca:0x4dc,_0x212e79:0x4f9,_0x1abbcf:0x482,_0x2907bb:0x487,_0x5f0ff4:0x4e2,_0xe6e00e:0x4b0,_0x231ac9:0x51c,_0x1cc578:0x43a,_0x4f67c0:0x562,_0x58d46a:0x517,_0x57576c:0x3f4,_0x2e333b:0x478,_0xa64474:0x491,_0x4393ca:0x42e,_0x180783:0x5a1,_0x1b7d4b:0x4e2,_0xbcb19f:0x568,_0x428a09:0x50f,_0x16ead4:0x55d,_0x18488b:0x589,_0x716970:0x509,_0x5f5c60:0x5d6,_0x27c454:0x569,_0x1b8857:0x59a,_0x2df119:0x590,_0x18c9d2:0x570,_0x11026b:0x44c,_0x4d5ee5:0x432,_0x221921:0x465,_0x5b924c:0x543,_0x16323b:0x4e4,_0x4ebe09:0x4d2,_0x5d2285:0x4d1,_0x61f79b:0x47a,_0x1427ac:0x4b4,_0xbfae7f:0x482,_0x264764:0x42d,_0x3aeb0d:0x45f,_0x51c501:0x437,_0x55f4cb:0x4c6,_0x52cad9:0x514,_0x3d5844:0x482,_0x200966:0x521,_0x3d08aa:0x4e7,_0x2893f9:0x4e7,_0x4d9974:0x4e6,_0x12ae87:0x4f6,_0x157b3d:0x532,_0x1ac452:0x542,_0x4caf5a:0x513,_0x9537c8:0x53c,_0x484bca:0x52f},_0x16bc20={_0x29cfc5:0x594,_0x2d4812:0x346,_0x127605:0x299,_0x57e0e2:0x503,_0x54494d:0x546,_0x5353ea:0x503,_0x5be50e:0x47e,_0x3ef498:0x2ad,_0xe158c0:0x258,_0x3fc148:0x273,_0x281eb0:0x279,_0x1be2d5:0x2d0,_0x582b64:0x530,_0x33c0c2:0x588},_0x163112={_0x3616ae:0x40,_0x25e88d:0x6e,_0x40e7da:0x3bf,_0x5f2a0a:0x22,_0x83de02:0x11},_0x5d62ac={_0x9673e7:0x45e,_0x1317d1:0x46d},_0x2d02ff={_0x2b3539:0x14b},_0x4eb282={_0x56a189:0x2a},_0x409cce={_0x445f04:0x84},_0x34c1e5={_0x2d06b2:0x1cf,_0x47a286:0x18f},_0x540194=await filepath();function _0x431d04(_0x271a53,_0xe92fd3,_0x346ae4,_0x24d84f){return _0x27a792(_0x271a53-0x1c4,_0xe92fd3-_0x34c1e5._0x2d06b2,_0xe92fd3,_0x24d84f-_0x34c1e5._0x47a286);}function _0x2eda91(_0x2220f9,_0x2448c6,_0x115a52,_0x3ed852){return _0x27a792(_0x2220f9-0x1aa,_0x2448c6-_0x409cce._0x445f04,_0x115a52,_0x2448c6-0x23f);}if(_0x39ce02[_0x2eda91(0x532,_0x5dcaba._0x9902ca,_0x5dcaba._0x212e79,_0x5dcaba._0x1abbcf)]){const _0x1a16de=await _0x38c437(_0x39ce02['file'])[_0x431d04(0x546,0x492,_0x5dcaba._0x2907bb,_0x5dcaba._0x5f0ff4)](()=>null);if(!_0x1a16de?.[_0x2eda91(0x503,0x51b,_0x5dcaba._0xe6e00e,_0x5dcaba._0x231ac9)]())throw Object[_0x431d04(0x3d3,0x474,0x446,_0x5dcaba._0x1cc578)](new Error(_0x2eda91(_0x5dcaba._0x4f67c0,0x506,_0x5dcaba._0x58d46a,0x519)+_0x39ce02[_0x431d04(_0x5dcaba._0x57576c,_0x5dcaba._0x2e333b,_0x5dcaba._0xa64474,0x42c)]+'\x27'),{'code':_0x431d04(_0x5dcaba._0x2907bb,0x40f,0x3e1,_0x5dcaba._0x4393ca)});}else{const _0x56db86=await _0x38c437(_0x39ce02[_0x2eda91(0x552,0x571,_0x5dcaba._0x180783,0x59a)])[_0x431d04(0x52e,0x47d,0x4f4,_0x5dcaba._0x1b7d4b)](()=>null);if(!_0x56db86?.[_0x2eda91(0x54b,0x555,0x508,0x516)]())throw Object['assign'](new Error(_0x2eda91(_0x5dcaba._0xbcb19f,_0x5dcaba._0x428a09,_0x5dcaba._0x16ead4,0x4cf)+_0x39ce02[_0x2eda91(_0x5dcaba._0x18488b,0x571,_0x5dcaba._0x716970,_0x5dcaba._0x5f5c60)]+'\x27'),{'code':'ENOENT'});}const _0x45a4aa=[_0x2eda91(_0x5dcaba._0x27c454,_0x5dcaba._0x1b8857,_0x5dcaba._0x2df119,0x5da),_0x2eda91(_0x5dcaba._0x18c9d2,0x56d,0x509,0x506),'--field-context-separator=|',_0x431d04(_0x5dcaba._0x11026b,0x41b,_0x5dcaba._0x4d5ee5,_0x5dcaba._0x221921),_0x39ce02[_0x431d04(_0x5dcaba._0x5b924c,0x47a,0x4a4,_0x5dcaba._0x16323b)]],_0x57351b=typeof _0x39ce02[_0x431d04(_0x5dcaba._0x4ebe09,0x50d,0x481,0x4af)]==='number'&&_0x39ce02[_0x431d04(0x4c8,_0x5dcaba._0x5d2285,0x45f,0x4af)]>0x0;return _0x57351b&&_0x45a4aa[_0x431d04(0x420,_0x5dcaba._0x61f79b,_0x5dcaba._0x1427ac,_0x5dcaba._0xbfae7f)]('-C',String(_0x39ce02['context']),'--column'),_0x39ce02[_0x431d04(0x479,_0x5dcaba._0x264764,_0x5dcaba._0x3aeb0d,_0x5dcaba._0x51c501)]&&!_0x39ce02[_0x2eda91(_0x5dcaba._0x55f4cb,_0x5dcaba._0x9902ca,0x476,_0x5dcaba._0x52cad9)]&&_0x45a4aa[_0x431d04(0x4be,0x424,0x47f,_0x5dcaba._0x3d5844)](_0x2eda91(_0x5dcaba._0x200966,0x4e8,0x4f9,0x4e0),_0x39ce02[_0x2eda91(_0x5dcaba._0x3d08aa,_0x5dcaba._0x2893f9,_0x5dcaba._0x4d9974,0x53f)]),_0x45a4aa[_0x2eda91(_0x5dcaba._0x12ae87,_0x5dcaba._0x157b3d,_0x5dcaba._0x1ac452,_0x5dcaba._0x4caf5a)](_0x39ce02[_0x2eda91(0x4f9,0x4dc,_0x5dcaba._0x9537c8,_0x5dcaba._0x484bca)]??_0x39ce02['cwd']),await new Promise((_0x2af48e,_0xeb017e)=>{const _0x1b0958={_0x2fcd23:0x19d,_0x45f140:0xe},_0x2007f2={_0x3c85e0:0xa9,_0xe7c907:0x53b},_0x2f3425={_0x161aa1:0x109},_0x6f45d6={_0x21614c:0x118,_0x10993d:0xd8},_0x19dd3c=_0x3d42e5(_0x540194,_0x45a4aa,{'cwd':_0x39ce02[_0x53777e(0x51a,_0x16bc20._0x29cfc5,0x54b,0x544)],'stdio':[_0xd2d608(0x2df,_0x16bc20._0x2d4812,0x2df,_0x16bc20._0x127605),'pipe',_0x53777e(_0x16bc20._0x57e0e2,_0x16bc20._0x54494d,0x52c,0x559)]});function _0x53777e(_0x48f6d7,_0x1c10ea,_0x317940,_0x29d014){return _0x2eda91(_0x48f6d7-0xce,_0x29d014- -0x2d,_0x1c10ea,_0x29d014-_0x4eb282._0x56a189);}let _0x226887='';function _0xd2d608(_0x4b26ec,_0x3cb226,_0x1224d2,_0x597c4f){return _0x431d04(_0x4b26ec-0x17c,_0x3cb226,_0x1224d2-_0x2d02ff._0x2b3539,_0x4b26ec- -0x1da);}let _0x3a0cee='';_0x19dd3c['stdout']?.['on'](_0x53777e(_0x16bc20._0x5353ea,0x46b,_0x16bc20._0x5be50e,0x4d7),_0x4f7e2b=>{function _0x2f4ad6(_0x3fce99,_0x1af2e5,_0x739fcd,_0x2714a1){return _0x53777e(_0x3fce99-_0x6f45d6._0x21614c,_0x3fce99,_0x739fcd-_0x6f45d6._0x10993d,_0x1af2e5- -0x342);}_0x226887+=_0x4f7e2b[_0x2f4ad6(0x218,0x1fd,0x1fa,0x25f)]();}),_0x19dd3c[_0xd2d608(_0x16bc20._0x3ef498,_0x16bc20._0xe158c0,0x29a,_0x16bc20._0x3fc148)]?.['on'](_0xd2d608(0x27a,_0x16bc20._0x281eb0,0x273,_0x16bc20._0x1be2d5),_0x5c5d69=>{function _0x423fd8(_0x266183,_0xead0d8,_0x19b08a,_0x98938b){return _0xd2d608(_0x19b08a-0x17c,_0x98938b,_0x19b08a-0x118,_0x98938b-_0x2f3425._0x161aa1);}_0x3a0cee+=_0x5c5d69[_0x423fd8(0x452,0x404,_0x5d62ac._0x9673e7,_0x5d62ac._0x1317d1)]();}),_0x19dd3c['on']('close',_0x52244f=>{if(_0x52244f===0x1&&_0x226887===''){_0x2af48e([]);return;}if(_0x52244f!==0x0&&_0x52244f!==0x1){_0xeb017e(new Error(_0x1cde94(-0xb1,-_0x163112._0x3616ae,-0x4b,-_0x163112._0x25e88d)+_0x3a0cee));return;}const _0x582f6e=_0x39ce02[_0x4430fb(0x39a,0x358,0x2fb,_0x163112._0x40e7da)]??0x64;function _0x1cde94(_0x23cbb1,_0x478398,_0x48328a,_0x3db709){return _0x53777e(_0x23cbb1-0x125,_0x478398,_0x48328a-_0x2007f2._0x3c85e0,_0x48328a- -_0x2007f2._0xe7c907);}const _0x13b137=[];for(const _0x4caf87 of _0x226887[_0x1cde94(_0x163112._0x5f2a0a,0x1f,_0x163112._0x83de02,0x30)](/\r?\n/)){if(_0x13b137['length']>=_0x582f6e)break;const _0x4f8cae=parseMatchLine(_0x4caf87,_0x57351b);if(_0x4f8cae)_0x13b137['push'](_0x4f8cae);}function _0x4430fb(_0x42d778,_0x44b8b4,_0x344093,_0x5bc160){return _0xd2d608(_0x44b8b4-0x6c,_0x344093,_0x344093-_0x1b0958._0x2fcd23,_0x5bc160-_0x1b0958._0x45f140);}_0x2af48e(_0x13b137);}),_0x19dd3c['on'](_0x53777e(0x527,_0x16bc20._0x582b64,_0x16bc20._0x33c0c2,0x51d),_0xeb017e);});}function createGlobTool(_0x370afe={}){const _0x1d083e={_0x2e8bc7:0x473,_0x5b9671:0x4c5,_0x592d52:0x4ff,_0x1aec7e:0x423,_0xc2db9:0x423,_0x38a398:0x434,_0x294545:0x42d,_0x2208fa:0x4c2,_0x1a4457:0x4f9},_0x15435a={_0x1df1ad:0x26e,_0x59bfd8:0x253,_0x5999dd:0x1d0,_0xbf5106:0x12f,_0x2f74ed:0x148,_0x241103:0x26c,_0x24d2ce:0x236,_0x2bebc2:0x2d9,_0x2a5992:0x2a3,_0x34513e:0xf8,_0x5db0de:0xb3,_0x36251d:0xd3,_0x1599d7:0x90,_0x118db4:0x18d,_0x5241f5:0x165,_0x2c4094:0x16f,_0x4ec693:0x115,_0x316aad:0x146,_0x4cf38d:0x92,_0x2793d7:0xdc,_0x4c50ef:0xef,_0x3408b9:0x16c,_0xb5242e:0x138,_0xd0019a:0x20a,_0x37aedd:0x2ac,_0x293a4c:0x19b,_0x1afa08:0x20b,_0x64bd51:0x26a,_0x32923c:0x8c,_0x2b630e:0x4d,_0xda01ce:0x78,_0x3b2de4:0x225,_0x193de6:0x10a,_0x2ac16c:0xb0,_0x5b2254:0xd6,_0x1b3a72:0x24f,_0x48386e:0x1dd,_0x2ada52:0x80,_0x42a215:0x64,_0x488208:0xcf,_0x2c632c:0x64,_0x26186a:0x231,_0x261644:0x217,_0x3aa0e0:0x1ec,_0x33d5ce:0x18c,_0xcfc37a:0x26e,_0x364ce7:0x280,_0x2f816a:0x224,_0x1a3362:0xa4,_0x17a46b:0x77,_0x50a336:0xee,_0x2b6c18:0x94},_0xd84848={_0x1ed2f0:0x1b2},_0x208b84={_0x1f7be1:0xb},_0xc514d0=_0x336f02['resolve'](_0x370afe['defaultCwd']??process['cwd']()),_0x115806=_0x370afe[_0xa26ce7(0x4a4,_0x1d083e._0x2e8bc7,0x436,0x4f8)]??0x64,_0x412c7e=_0x370afe['name']??'Glob';function _0xa26ce7(_0x5bbf36,_0x509fec,_0x864b09,_0x67cb8e){return _0x27a792(_0x5bbf36-_0x208b84._0x1f7be1,_0x509fec-0x158,_0x67cb8e,_0x5bbf36-0x16d);}function _0x2eb036(_0x34f571,_0x21e05f,_0x4d968e,_0x341f66){return _0x27a792(_0x34f571-0x197,_0x21e05f-0x15f,_0x4d968e,_0x34f571- -_0xd84848._0x1ed2f0);}return defineTool({'name':_0x412c7e,'description':'Find\x20workspace\x20files\x20matching\x20a\x20glob\x20pattern.','inputSchema':{'type':_0xa26ce7(_0x1d083e._0x5b9671,0x4c5,_0x1d083e._0x592d52,0x46b),'properties':{'pattern':{'type':_0xa26ce7(_0x1d083e._0x1aec7e,0x42d,0x44b,0x476)},'path':{'type':_0xa26ce7(_0x1d083e._0xc2db9,_0x1d083e._0x38a398,0x3f4,_0x1d083e._0x294545)},'limit':{'type':'number'}},'required':[_0xa26ce7(_0x1d083e._0x2208fa,_0x1d083e._0x1a4457,0x515,0x4e7)]},async *'execute'(_0x46688c){const _0x40534c={_0x5e8625:0xcb,_0x643e51:0x1ce,_0x3ec17d:0x13c};if(_0x46688c[_0x99a921(_0x15435a._0x1df1ad,0x2cc,_0x15435a._0x59bfd8,0x252)]['trim']()['length']===0x0)throw new ToolExecutionError(_0x99a921(_0x15435a._0x5999dd,0x22d,0x21f,0x211),{});const _0x5c6b48=resolveWorkspacePath(_0xc514d0,_0x46688c[_0x312873(-0x132,-0xeb,-_0x15435a._0xbf5106,-_0x15435a._0x2f74ed)]??'.'),_0x15eef0=await _0x172043(_0x5c6b48)[_0x99a921(_0x15435a._0x241103,_0x15435a._0x24d2ce,_0x15435a._0x2bebc2,_0x15435a._0x2a5992)](()=>null);if(!_0x15eef0?.[_0x312873(-0x57,-_0x15435a._0x34513e,-_0x15435a._0x5db0de,-0xce)]())throw new ToolExecutionError(_0x312873(-0xeb,-0x137,-_0x15435a._0x36251d,-_0x15435a._0x1599d7)+(_0x46688c[_0x99a921(0x1b3,0x20d,_0x15435a._0x118db4,_0x15435a._0x5241f5)]??'.'),{'path':_0x46688c[_0x312873(-_0x15435a._0x2c4094,-_0x15435a._0x4ec693,-0x12f,-_0x15435a._0x316aad)]??'.'});const _0x3318f7=_0x46688c[_0x312873(-0x4f,-0x35,-_0x15435a._0x4cf38d,-_0x15435a._0x2793d7)]??_0x115806,_0x2dbee6=Math[_0x312873(-_0x15435a._0x4c50ef,-_0x15435a._0x3408b9,-0xfe,-_0x15435a._0xb5242e)](0x1,Math['trunc'](_0x3318f7)),_0x31fe14=[];let _0x3b7019=![];for await(const _0x4e6177 of files({'cwd':_0x5c6b48,'glob':[_0x46688c[_0x99a921(0x26e,_0x15435a._0xd0019a,_0x15435a._0x37aedd,0x21f)]]})){if(_0x31fe14[_0x99a921(0x204,_0x15435a._0x293a4c,_0x15435a._0x1afa08,_0x15435a._0x64bd51)]>=_0x2dbee6){_0x3b7019=!![];break;}const _0x57628d=await _0x172043(_0x336f02[_0x312873(-_0x15435a._0x32923c,-_0x15435a._0x2b630e,-_0x15435a._0xda01ce,-0xc)](_0x5c6b48,_0x4e6177))[_0x99a921(0x26c,0x21b,0x2c8,_0x15435a._0x3b2de4)](()=>null);_0x31fe14['push']({'path':_0x4e6177,'mtime':_0x57628d?.[_0x312873(-0xdb,-_0x15435a._0x193de6,-_0x15435a._0x2ac16c,-_0x15435a._0x5b2254)]??0x0});}_0x31fe14[_0x99a921(0x266,0x218,0x241,_0x15435a._0x1b3a72)]((_0x14796c,_0x40b964)=>_0x40b964['mtime']-_0x14796c[_0x99a921(0x21e,0x25e,0x1b6,0x27c)]);function _0x312873(_0x569bc3,_0x3a7a54,_0x2595db,_0x2d404f){return _0x2eb036(_0x2595db- -0x217,_0x3a7a54-0x1b,_0x569bc3,_0x2d404f-0xdd);}const _0x18b871=_0x31fe14[_0x99a921(0x21f,0x220,0x266,0x1e4)](_0xbb152b=>_0xbb152b['path']),_0x4799a6=_0x18b871[_0x99a921(0x204,_0x15435a._0x48386e,0x25d,0x1ad)]===0x0?_0x312873(-_0x15435a._0x2ada52,-_0x15435a._0x42a215,-_0x15435a._0x488208,-_0x15435a._0x2c632c)+_0x46688c[_0x99a921(0x26e,_0x15435a._0x26186a,0x210,0x203)]:''+_0x18b871[_0x99a921(0x26a,0x270,0x1fe,_0x15435a._0x261644)]('\x0a')+(_0x3b7019?_0x99a921(0x1d2,_0x15435a._0x3aa0e0,0x1b2,_0x15435a._0x33d5ce):'');function _0x99a921(_0x391afd,_0xbbb440,_0x2405c5,_0x209f7c){return _0x2eb036(_0x391afd-_0x40534c._0x5e8625,_0xbbb440-_0x40534c._0x643e51,_0x209f7c,_0x209f7c-_0x40534c._0x3ec17d);}return yield createToolOutput(_0x4799a6,{'pattern':_0x46688c[_0x99a921(_0x15435a._0xcfc37a,_0x15435a._0x364ce7,_0x15435a._0x2f816a,0x295)],'searchPath':_0x336f02[_0x312873(-_0x15435a._0x1a3362,-0x5e,-_0x15435a._0x17a46b,-0x25)](_0xc514d0,_0x5c6b48)||'.','matches':_0x18b871,'count':_0x18b871[_0x312873(-_0x15435a._0x50a336,-0x124,-0xde,-_0x15435a._0x2b6c18)],'truncated':_0x3b7019}),void 0x0;}});}import{stat as _0x5dd0c7}from'fs/promises';import*as _0x3d8664 from'path';var MAX_LINE_LENGTH=0x7d0;function createGrepTool(_0x4f6a82={}){const _0x550f83={_0x5ba71e:0x1c4,_0x1cc395:0x15f,_0x5d02e7:0x156,_0x2b3446:0x165,_0x1019ac:0x1ac,_0x4ed58a:0x177,_0x4e2f65:0x14b,_0x4eea3e:0x2b0,_0x1447cc:0x27c,_0x5885de:0x2a4,_0xb204b0:0x2ac,_0x1da4a0:0x1aa,_0x299ce0:0x2f4,_0x3c8f43:0x148,_0x19edf9:0x138,_0x43f3ce:0x1a2,_0x1ff649:0x261,_0x1a7f78:0x1b7,_0x25ab95:0x14c,_0x529008:0xf2,_0x54ebc6:0x143,_0x5c0916:0xdb,_0x551f5a:0x10a,_0x1c512e:0xfe,_0x14b2a5:0x1d7,_0x33e05a:0x222},_0x5b71f8={_0x54500e:0x1d8,_0x614b6d:0x1c9,_0x8fd5dd:0x422,_0x2b1dd5:0x4a6,_0x529239:0x41a,_0x1af0d0:0x43a,_0x2d0d4b:0x3dd,_0x26f437:0x42e,_0x488737:0x55,_0x393b46:0xb0,_0x5aecce:0x43f,_0x5cd3e9:0x413,_0x4f70c6:0x12c,_0x51965c:0x49a,_0x4a40a7:0x445,_0x1cb4a8:0x443,_0x4ff5af:0x4a1,_0x4b17cd:0x43d,_0x23f1a3:0x509,_0x1599ef:0x467,_0x41fe53:0x8e,_0xd5ede9:0xad,_0x48e059:0x48c,_0x3df7ed:0x481,_0x3731b7:0x4d1,_0x469ccd:0x407,_0x53fbe0:0x487,_0x4d8e55:0x45f,_0x2f3c5c:0x4c2,_0x3874b3:0x13e,_0x47476e:0x177,_0x133e7b:0x126,_0x3107c4:0x133,_0xd58037:0x125,_0x1ea0be:0x142,_0x24428f:0x41a,_0x22097e:0x4df,_0x28c74c:0x3ea,_0x4df14a:0x45f,_0x5de2c9:0x45a,_0x4eab20:0x4b3,_0x18cdb1:0x47a,_0x1b0484:0x4a3,_0x9e0a76:0x4cd,_0x13e18d:0x4e9,_0xe7beca:0xcb,_0x1d1f06:0x12e,_0x592a89:0x10d,_0x4c59f1:0x44e,_0x4a91d2:0x43c,_0x24dd81:0x4b8,_0x4bcf90:0x49b,_0x57497f:0x47e,_0xb32cf1:0x491,_0x483771:0x178,_0x26460f:0x133,_0x2c3a39:0x4e1,_0x27091a:0x45e,_0x591d0d:0x4b1,_0x4e1694:0x466,_0x1f5a8a:0x504,_0x535f94:0x14f,_0x5c3ea5:0x493,_0x5f4d1e:0x4b5,_0x2d0a47:0x508,_0x492154:0x480,_0x5b47c4:0x4a0,_0x19a03c:0x446,_0xcaca06:0x13f,_0x91594:0x48c,_0x56f921:0x4de,_0x14c7ba:0x105},_0x472b9d={_0x3f4852:0x4f},_0x32b4bf={_0x5a872d:0xa8},_0x54f7c0={_0x285557:0x5d,_0x59f432:0x17e},_0x21e9c4=_0x3d8664[_0x1a2d93(_0x550f83._0x5ba71e,0x1eb,0x185,0x1b6)](_0x4f6a82['defaultCwd']??process[_0x1a2d93(0x1c7,0x1d4,0x1b4,_0x550f83._0x1cc395)]()),_0x2574e7=_0x4f6a82[_0x1a2d93(_0x550f83._0x5d02e7,_0x550f83._0x2b3446,0x1b9,0x1ab)]??0x64;function _0x1a2d93(_0x197bf3,_0x4a99f0,_0x4c8739,_0x159bb3){return _0x27a792(_0x197bf3-0x119,_0x4a99f0-_0x54f7c0._0x285557,_0x197bf3,_0x4c8739- -_0x54f7c0._0x59f432);}const _0x4f454f=_0x4f6a82[_0x1a2d93(_0x550f83._0x1019ac,0x155,_0x550f83._0x4ed58a,_0x550f83._0x4e2f65)]??_0x316a14(_0x550f83._0x4eea3e,_0x550f83._0x1447cc,_0x550f83._0x5885de,_0x550f83._0xb204b0);function _0x316a14(_0x37ceb9,_0x270236,_0x55c6f9,_0x23af89){return _0x27a792(_0x37ceb9-0x160,_0x270236-0xc,_0x55c6f9,_0x270236- -_0x32b4bf._0x5a872d);}return defineTool({'name':_0x4f454f,'description':_0x316a14(0x1a9,0x1f8,0x23f,_0x550f83._0x1da4a0),'inputSchema':{'type':_0x316a14(_0x550f83._0x299ce0,0x2b0,0x24f,0x2aa),'properties':{'pattern':{'type':_0x1a2d93(_0x550f83._0x3c8f43,0x165,_0x550f83._0x19edf9,0x171)},'path':{'type':_0x316a14(_0x550f83._0x43f3ce,0x20e,_0x550f83._0x1ff649,_0x550f83._0x1a7f78)},'include':{'type':_0x1a2d93(_0x550f83._0x25ab95,_0x550f83._0x529008,_0x550f83._0x19edf9,0xd9)},'limit':{'type':_0x1a2d93(_0x550f83._0x54ebc6,0x152,0x132,_0x550f83._0x5c0916)},'context':{'type':_0x1a2d93(0x13b,_0x550f83._0x551f5a,0x132,_0x550f83._0x1c512e)}},'required':[_0x1a2d93(0x172,_0x550f83._0x1da4a0,_0x550f83._0x14b2a5,_0x550f83._0x33e05a)]},async *'execute'(_0x2c284c){const _0x3f0c9b={_0x12e64c:0x88,_0x5cf9c2:0x1a};if(_0x2c284c[_0x52abf6(_0x5b71f8._0x54500e,0x113,_0x5b71f8._0x614b6d,0x16b)]['trim']()[_0x468627(0x44e,0x424,_0x5b71f8._0x8fd5dd,_0x5b71f8._0x2b1dd5)]===0x0)throw new ToolExecutionError(_0x468627(_0x5b71f8._0x529239,_0x5b71f8._0x1af0d0,_0x5b71f8._0x2d0d4b,_0x5b71f8._0x26f437),{});const _0x5eb012=resolveWorkspacePath(_0x21e9c4,_0x2c284c[_0x52abf6(0x71,0xa8,_0x5b71f8._0x488737,_0x5b71f8._0x393b46)]??'.'),_0x2baec1=await _0x5dd0c7(_0x5eb012)['catch'](()=>null),_0x5cec4e=_0x2baec1?.[_0x468627(_0x5b71f8._0x5aecce,_0x5b71f8._0x5cd3e9,0x3d3,0x454)]()??![],_0x45f339=_0x2baec1?.[_0x52abf6(0x119,0x180,0x177,_0x5b71f8._0x4f70c6)]()??![];if(!_0x5cec4e&&!_0x45f339)throw new ToolExecutionError('Path\x20not\x20found:\x20'+(_0x2c284c['path']??'.'),{'path':_0x2c284c['path']??'.'});const _0x2ddf3e=_0x2c284c[_0x468627(_0x5b71f8._0x51965c,0x4e2,0x4bf,_0x5b71f8._0x4a40a7)]??_0x2574e7,_0x300b97=Math[_0x468627(0x42e,_0x5b71f8._0x1cb4a8,0x420,0x433)](0x1,Math[_0x468627(_0x5b71f8._0x4ff5af,_0x5b71f8._0x4b17cd,_0x5b71f8._0x23f1a3,_0x5b71f8._0x1599ef)](_0x2ddf3e)),_0x59801c=await search({'cwd':_0x45f339?_0x5eb012:_0x3d8664[_0x52abf6(0x9c,_0x5b71f8._0x41fe53,0xb3,_0x5b71f8._0xd5ede9)](_0x5eb012),'pattern':_0x2c284c['pattern'],'glob':_0x45f339?_0x2c284c[_0x468627(_0x5b71f8._0x48e059,_0x5b71f8._0x3df7ed,_0x5b71f8._0x3731b7,0x44d)]:void 0x0,'limit':_0x300b97,'file':_0x5cec4e?_0x5eb012:void 0x0,'context':_0x2c284c['context']}),_0x125635=new Map();for(const _0x2140cd of _0x59801c){if(!_0x125635[_0x468627(0x421,_0x5b71f8._0x469ccd,_0x5b71f8._0x53fbe0,0x43a)](_0x2140cd[_0x468627(_0x5b71f8._0x4d8e55,0x410,0x46b,_0x5b71f8._0x2f3c5c)])){const _0x451ef6=await _0x5dd0c7(_0x2140cd['filePath'])[_0x52abf6(_0x5b71f8._0x3874b3,0x106,_0x5b71f8._0x47476e,0x169)](()=>null);_0x125635[_0x52abf6(_0x5b71f8._0x133e7b,_0x5b71f8._0x3107c4,_0x5b71f8._0xd58037,_0x5b71f8._0x1ea0be)](_0x2140cd['filePath'],{'matches':[],'mtime':_0x451ef6?.[_0x468627(0x47c,_0x5b71f8._0x24428f,_0x5b71f8._0x22097e,_0x5b71f8._0x3df7ed)]??0x0});}_0x125635[_0x468627(0x422,_0x5b71f8._0x28c74c,0x413,0x41b)](_0x2140cd[_0x468627(_0x5b71f8._0x4df14a,0x46a,_0x5b71f8._0x5de2c9,_0x5b71f8._0x4eab20)])?.['matches']['push'](_0x2140cd);}const _0x6ac347=[..._0x125635[_0x468627(_0x5b71f8._0x18cdb1,_0x5b71f8._0x1b0484,_0x5b71f8._0x9e0a76,0x485)]()][_0x468627(0x4b0,0x46b,0x465,_0x5b71f8._0x13e18d)]((_0x5dd7b9,_0x50a0bf)=>_0x50a0bf[0x1][_0x52abf6(0x138,0x135,0xf4,0x11b)]-_0x5dd7b9[0x1][_0x52abf6(0xec,0xf8,0x173,0x11b)]),_0x3ba248=_0x59801c[_0x52abf6(_0x5b71f8._0xe7beca,_0x5b71f8._0x1d1f06,0xd9,_0x5b71f8._0x592a89)](_0x3ab134=>!_0x3ab134[_0x468627(0x484,0x47a,0x43e,0x48f)])['length'],_0x1937bf=_0x59801c[_0x468627(_0x5b71f8._0x4c59f1,0x46d,0x403,0x44f)]>=_0x300b97,_0x4ed8a9=_0x5cec4e?_0x3d8664['dirname'](_0x5eb012):_0x5eb012;function _0x52abf6(_0x3a3b1d,_0x3e6167,_0x4715d1,_0x374d3d){return _0x316a14(_0x3a3b1d-_0x3f0c9b._0x12e64c,_0x374d3d- -0x142,_0x3e6167,_0x374d3d-_0x3f0c9b._0x5cf9c2);}let _0x152840='';if(_0x59801c[_0x468627(0x44e,0x409,_0x5b71f8._0x4a91d2,0x4b4)]===0x0)_0x152840=_0x468627(0x40a,0x3e9,0x3b2,0x3d8)+_0x2c284c[_0x468627(_0x5b71f8._0x24dd81,0x4bd,_0x5b71f8._0x4bcf90,0x4aa)];else{_0x152840=_0x468627(0x4b7,0x4c1,_0x5b71f8._0x57497f,_0x5b71f8._0xb32cf1)+_0x3ba248+_0x52abf6(_0x5b71f8._0x483771,0x183,0x129,_0x5b71f8._0x26460f)+(_0x3ba248===0x1?'':'es')+'\x0a';for(const [_0x18a22b,_0x26c5aa]of _0x6ac347){const _0x2dd92b=_0x5cec4e?_0x3d8664[_0x468627(0x4a0,_0x5b71f8._0x2c3a39,0x4e6,_0x5b71f8._0x27091a)](_0x18a22b):_0x3d8664['relative'](_0x4ed8a9,_0x18a22b);_0x152840+='\x0a'+_0x2dd92b+':\x0a';for(const _0x1eaff7 of _0x26c5aa['matches']){const _0x1c98cc=_0x1eaff7['lineText']['length']>MAX_LINE_LENGTH?_0x1eaff7[_0x468627(_0x5b71f8._0x591d0d,_0x5b71f8._0x4e1694,0x4e3,_0x5b71f8._0x1f5a8a)][_0x52abf6(0x134,0xf7,_0x5b71f8._0x535f94,0x127)](0x0,MAX_LINE_LENGTH)+'...':_0x1eaff7[_0x468627(_0x5b71f8._0x591d0d,0x4e9,_0x5b71f8._0x5c3ea5,0x46f)],_0x317e2e=_0x1eaff7[_0x52abf6(0x129,0x12e,0xd0,0x137)]?'\x20\x20':'>\x20';_0x152840+=_0x317e2e+'Line\x20'+_0x1eaff7['lineNum']+':\x20'+_0x1c98cc+'\x0a';}}_0x1937bf&&(_0x152840+=_0x52abf6(0xf1,0x6e,0x105,0xcf));}const _0x13e3f2={'searchPath':_0x3d8664[_0x468627(_0x5b71f8._0x5f4d1e,_0x5b71f8._0x2d0a47,_0x5b71f8._0x492154,0x503)](_0x21e9c4,_0x5eb012)||'.','pattern':_0x2c284c[_0x468627(0x4b8,_0x5b71f8._0x5b47c4,_0x5b71f8._0x22097e,0x50e)],'matchCount':_0x3ba248,'fileCount':_0x125635[_0x468627(0x44b,_0x5b71f8._0x48e059,_0x5b71f8._0x19a03c,0x48a)],'truncated':_0x1937bf};function _0x468627(_0x4af0d1,_0x380840,_0x555585,_0x11d10d){return _0x1a2d93(_0x380840,_0x380840-_0x472b9d._0x3f4852,_0x4af0d1-0x2e1,_0x11d10d-0x192);}return _0x45f339&&_0x2c284c[_0x52abf6(0x189,0x162,0x12c,_0x5b71f8._0xcaca06)]!==void 0x0&&(_0x13e3f2[_0x468627(_0x5b71f8._0x91594,0x4e7,0x4b3,_0x5b71f8._0x56f921)]=_0x2c284c[_0x52abf6(0xfe,_0x5b71f8._0x14c7ba,0x155,0x13f)]),yield createToolOutput(_0x152840[_0x52abf6(0x13e,0xd3,0x199,0x13c)](),_0x13e3f2),void 0x0;}});}import{readdir,readFile as _0x17eab8,stat as _0x1b1301}from'fs/promises';function _0xdaaf(_0x399900,_0x351b45){_0x399900=_0x399900-0x1ac;const _0x39d05f=_0x39d0();let _0xdaaf81=_0x39d05f[_0x399900];if(_0xdaaf['lujMdu']===undefined){var _0x1e8ca6=function(_0x3096ef){const _0xa6b6b4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x20a4fc='',_0x366479='';for(let _0x3a745a=0x0,_0x264aea,_0x2b3c5c,_0x1de27e=0x0;_0x2b3c5c=_0x3096ef['charAt'](_0x1de27e++);~_0x2b3c5c&&(_0x264aea=_0x3a745a%0x4?_0x264aea*0x40+_0x2b3c5c:_0x2b3c5c,_0x3a745a++%0x4)?_0x20a4fc+=String['fromCharCode'](0xff&_0x264aea>>(-0x2*_0x3a745a&0x6)):0x0){_0x2b3c5c=_0xa6b6b4['indexOf'](_0x2b3c5c);}for(let _0x2a9f9e=0x0,_0x2d3dfb=_0x20a4fc['length'];_0x2a9f9e<_0x2d3dfb;_0x2a9f9e++){_0x366479+='%'+('00'+_0x20a4fc['charCodeAt'](_0x2a9f9e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x366479);};_0xdaaf['qzzoOz']=_0x1e8ca6,_0xdaaf['YgWjZL']={},_0xdaaf['lujMdu']=!![];}const _0x16f8f7=_0x39d05f[0x0],_0x199d02=_0x399900+_0x16f8f7,_0x32bb51=_0xdaaf['YgWjZL'][_0x199d02];return!_0x32bb51?(_0xdaaf81=_0xdaaf['qzzoOz'](_0xdaaf81),_0xdaaf['YgWjZL'][_0x199d02]=_0xdaaf81):_0xdaaf81=_0x32bb51,_0xdaaf81;}import*as _0x24d89d from'path';import*as _0x4e4793 from'yaml';async function countTextLines(_0x2b255f){const _0x5c18f8={_0x313599:0x4b6,_0x1da853:0x448,_0x25eee6:0x433,_0x99ab7c:0x422,_0x1895c0:0x3d6,_0x19c3df:0x43e,_0x3e2e6b:0x154,_0x1e07a0:0x112},_0x421e05={_0x248f90:0x1bd},_0x561e37={_0x5ab090:0x8,_0x2ac818:0xf5},_0x126ee9=await _0x17eab8(_0x2b255f)[_0x41db1a(_0x5c18f8._0x313599,_0x5c18f8._0x1da853,_0x5c18f8._0x25eee6,0x434)](()=>null);function _0x41db1a(_0x7b3b47,_0x489162,_0x1290d8,_0xc486a3){return _0x27a792(_0x7b3b47-0x78,_0x489162-_0x561e37._0x5ab090,_0x7b3b47,_0x489162-_0x561e37._0x2ac818);}if(!_0x126ee9||isProbablyBinary(_0x126ee9))return void 0x0;function _0xf067c5(_0x19fc5e,_0x11ad05,_0xcc323d,_0x24170c){return _0x5c1169(_0x19fc5e-0xe2,_0x19fc5e,_0xcc323d- -0x6ee,_0x24170c-_0x421e05._0x248f90);}return _0x126ee9[_0x41db1a(0x3e3,_0x5c18f8._0x99ab7c,0x46c,_0x5c18f8._0x1895c0)](_0x41db1a(0x3d8,_0x5c18f8._0x19c3df,0x422,0x4a2))[_0xf067c5(-_0x5c18f8._0x3e2e6b,-_0x5c18f8._0x1e07a0,-0x13b,-0x12d)](/\r?\n/)['length'];}function createLsTool(_0xa2f043={}){const _0x101985={_0x3cfda3:0xaf,_0xcf33d:0x162,_0x559af1:0xe4,_0x201085:0xaa,_0x2bed5f:0xe0,_0x23abc8:0xab,_0x1b4a8a:0x16f,_0x25aa55:0xe7,_0x117e21:0x14d},_0x1d866c={_0x2305ee:0x6c,_0x541afd:0x3d,_0x1b0332:0x99,_0x4d279c:0xc4,_0x50dd0c:0x5e0,_0x3fff3b:0x60c,_0x333d05:0x5a4,_0x44114c:0x5c0,_0x433f1f:0x607,_0x46c087:0x618,_0x5c414c:0x595,_0x25be3e:0x543,_0x5d0c9c:0x5e5,_0x1fe924:0x5db,_0x3635a9:0x5b5,_0x4738ab:0x161,_0x4b5d35:0x150,_0x1e33e5:0x58b,_0x11f9ee:0xac,_0x36fc5a:0xdb,_0x5e7ab3:0x111,_0x355d2e:0x94,_0xb840a5:0x9c,_0x4a0c37:0xb8,_0x118483:0x11c,_0x9e4702:0x14f,_0x21c697:0x180,_0x245e4f:0xa6,_0x285965:0xc9,_0x29496e:0x10e,_0x1e838e:0x5b2,_0x4624f0:0x554,_0x459cf7:0x611,_0x4415ed:0x5c3,_0x3aee36:0xd9,_0x14e547:0x13e,_0x26001a:0x16e,_0x13a0bd:0xe7,_0x130f18:0x120,_0x135308:0x617,_0x2e4d83:0x606,_0x4fa754:0xce,_0xdd94b6:0xbd,_0x48b50d:0xcd,_0xf3e20d:0x11d,_0x2939e5:0x11e,_0x5b0041:0x111,_0x9846da:0x5b5},_0x2dbee2={_0x127a7e:0xd3,_0x396dcd:0x1a},_0x4ca9f6={_0x2b2f62:0x118},_0x24a019={_0x3f8dec:0x4c,_0x23527e:0x1c2};function _0x130c5c(_0x5a62b7,_0x496cf8,_0x2dd3e3,_0x46f16f){return _0x5c1169(_0x5a62b7-_0x24a019._0x3f8dec,_0x5a62b7,_0x46f16f- -0x67c,_0x46f16f-_0x24a019._0x23527e);}const _0x38e1fa=_0x24d89d['resolve'](_0xa2f043['defaultCwd']??process['cwd']());function _0xd721e1(_0x312f8e,_0x58ef93,_0x3e667a,_0x119493){return _0x5c1169(_0x312f8e-0x9b,_0x3e667a,_0x312f8e- -0x2dc,_0x119493-_0x4ca9f6._0x2b2f62);}const _0x4a4a76=_0xa2f043[_0x130c5c(-_0x101985._0x3cfda3,-_0x101985._0xcf33d,-0x121,-0x10e)]??'Ls';return defineTool({'name':_0x4a4a76,'description':_0x130c5c(-_0x101985._0x559af1,-0x48,-0x10b,-_0x101985._0x201085),'inputSchema':{'type':_0x130c5c(-_0x101985._0x2bed5f,-0x4e,-0xfc,-_0x101985._0x23abc8),'properties':{'path':{'type':_0x130c5c(-0x161,-_0x101985._0x1b4a8a,-_0x101985._0x25aa55,-_0x101985._0x117e21)},'limit':{'type':_0x130c5c(-0xef,-0x148,-0x143,-0x153)}}},async *'execute'(_0xd46955){const _0x168c91={_0x117071:0x6b},_0x39ef91=_0xd46955[_0x1cdca9(_0x1d866c._0x2305ee,_0x1d866c._0x541afd,_0x1d866c._0x1b0332,_0x1d866c._0x4d279c)]??'.';function _0x1cdca9(_0x472dc4,_0x32e315,_0x4af19a,_0x34df52){return _0xd721e1(_0x4af19a- -0x19e,_0x32e315-_0x2dbee2._0x127a7e,_0x34df52,_0x34df52-_0x2dbee2._0x396dcd);}const _0x14f2b6=resolveWorkspacePath(_0x38e1fa,_0x39ef91),_0x263255=await _0x1b1301(_0x14f2b6)['catch'](()=>null);if(!_0x263255?.[_0x3bf0a3(_0x1d866c._0x50dd0c,_0x1d866c._0x3fff3b,0x5f2,_0x1d866c._0x333d05)]())throw new ToolExecutionError(_0x3bf0a3(_0x1d866c._0x44114c,_0x1d866c._0x433f1f,0x5fa,0x5f1)+_0x39ef91,{'path':_0x39ef91});const _0x2cc3b5=_0xd46955[_0x3bf0a3(0x601,0x5f2,_0x1d866c._0x46c087,0x5d1)]??0x3e8;function _0x3bf0a3(_0x2a0e61,_0x54add4,_0x3e0194,_0x45b05f){return _0xd721e1(_0x2a0e61-0x32d,_0x54add4-_0x168c91._0x117071,_0x45b05f,_0x45b05f-0x22);}const _0x719782=Math['min'](Math[_0x3bf0a3(_0x1d866c._0x5c414c,_0x1d866c._0x25be3e,0x5d1,_0x1d866c._0x5d0c9c)](Math['trunc'](_0x2cc3b5),0x1),0x2710),_0x10f39d=await readdir(_0x14f2b6),_0x27c245=[];for(const _0x15ad9e of _0x10f39d[_0x3bf0a3(_0x1d866c._0x1fe924,0x5cb,0x5a1,_0x1d866c._0x3635a9)](0x0,_0x719782)){const _0x1aef03=_0x24d89d[_0x1cdca9(_0x1d866c._0x4738ab,0x176,_0x1d866c._0x4b5d35,0x144)](_0x14f2b6,_0x15ad9e),_0x283cdd=await _0x1b1301(_0x1aef03)['catch'](()=>null);if(!_0x283cdd)continue;let _0x3f486d=_0x3bf0a3(_0x1d866c._0x1e33e5,0x55b,0x569,0x5e4);if(_0x283cdd[_0x1cdca9(0xfe,_0x1d866c._0x11f9ee,_0x1d866c._0x36fc5a,_0x1d866c._0x5e7ab3)]())_0x3f486d=_0x1cdca9(0xda,_0x1d866c._0x355d2e,_0x1d866c._0xb840a5,_0x1d866c._0x4a0c37);else{if(_0x283cdd[_0x1cdca9(_0x1d866c._0x118483,_0x1d866c._0x9e4702,0x115,_0x1d866c._0x21c697)]())_0x3f486d='directory';else{if(_0x283cdd['isSymbolicLink']())_0x3f486d=_0x1cdca9(0x89,_0x1d866c._0x245e4f,_0x1d866c._0x285965,_0x1d866c._0x29496e);}}const _0x19df9c={'name':_0x15ad9e,'type':_0x3f486d,'size':_0x283cdd[_0x3bf0a3(_0x1d866c._0x1e838e,_0x1d866c._0x4624f0,_0x1d866c._0x459cf7,_0x1d866c._0x4415ed)],'mtime':_0x283cdd[_0x1cdca9(0x15e,0x17e,0x118,_0x1d866c._0x3aee36)],'mode':_0x283cdd[_0x1cdca9(_0x1d866c._0x14e547,0x13e,_0x1d866c._0x26001a,0x13a)]},_0x1cd0b6=_0x3f486d===_0x1cdca9(0xfb,_0x1d866c._0x13a0bd,0x9c,0xa2)?await countTextLines(_0x1aef03):void 0x0;if(_0x1cd0b6!==void 0x0)_0x19df9c['lines']=_0x1cd0b6;_0x27c245[_0x1cdca9(0xa8,0xc4,0xf2,_0x1d866c._0x130f18)](_0x19df9c);}_0x27c245[_0x3bf0a3(_0x1d866c._0x135308,0x619,_0x1d866c._0x2e4d83,0x67d)]((_0x3c7368,_0x32eef3)=>_0x3c7368[_0x1cdca9(0x155,0x108,0xf4,0x136)][_0x3bf0a3(0x5c7,0x5a2,0x56a,0x583)](_0x32eef3[_0x1cdca9(0x86,0xb7,0xf4,0x86)]));const _0x3f1cda={'path':_0x39ef91,'total':_0x27c245[_0x1cdca9(0x88,_0x1d866c._0x4fa754,0xea,_0x1d866c._0xdd94b6)],'truncated':_0x10f39d['length']>_0x719782,'entries':_0x27c245};return yield createToolOutput(_0x4e4793[_0x1cdca9(0xea,0x13c,0xd9,_0x1d866c._0x48b50d)](_0x3f1cda,{'indent':0x2,'lineWidth':0x0})[_0x1cdca9(0x16b,_0x1d866c._0xf3e20d,_0x1d866c._0x2939e5,0x111)](),{'path':_0x39ef91,'total':_0x27c245[_0x1cdca9(0xe0,_0x1d866c._0x5b0041,0xea,0xb2)],'truncated':_0x10f39d[_0x3bf0a3(_0x1d866c._0x9846da,0x5ba,0x54f,0x5e0)]>_0x719782,'limit':_0x719782,'entries':_0x27c245}),void 0x0;}});}function getCommand(_0x1b4032){const _0x2e8241={_0x18eca9:0x11c,_0x1c708e:0x17b,_0xf30a38:0x140,_0x2dc83e:0x10a,_0x4bafe6:0x1a3,_0x270721:0x142,_0x2c7a9b:0x149},_0x57517f={_0x4c4c84:0x19b,_0x9a528c:0x459},_0x2213df={_0x32fdaa:0x3d,_0x49431f:0x474};function _0x5d186c(_0x36f824,_0x420a05,_0x30fb75,_0x4e70e7){return _0x27a792(_0x36f824-0x1d3,_0x420a05-_0x2213df._0x32fdaa,_0x36f824,_0x30fb75- -_0x2213df._0x49431f);}function _0x21bea6(_0x43a165,_0x3a628c,_0x100e20,_0x19838a){return _0x27a792(_0x43a165-0x139,_0x3a628c-_0x57517f._0x4c4c84,_0x43a165,_0x3a628c- -_0x57517f._0x9a528c);}if(_0x1b4032&&typeof _0x1b4032===_0x5d186c(-0xbc,-0x14d,-_0x2e8241._0x18eca9,-_0x2e8241._0x1c708e)&&!Array[_0x21bea6(-_0x2e8241._0xf30a38,-0x113,-_0x2e8241._0x2dc83e,-0x174)](_0x1b4032)&&typeof _0x1b4032['command']===_0x21bea6(-0x14f,-_0x2e8241._0x4bafe6,-0x20e,-0x19d))return _0x1b4032[_0x21bea6(-_0x2e8241._0x270721,-_0x2e8241._0x2c7a9b,-0x16f,-0x183)];return'ls\x20-la';}var MOCK_WORKSPACE_LISTING=['docs/plans/2026-04-16-agent-loop-core-design.md',_0x27a792(0x337,0x347,0x342,0x335),_0x27a792(0x299,0x267,0x2cb,0x295),_0x5c1169(0x599,0x53d,0x54a,0x535),_0x27a792(0x2ab,0x311,0x308,0x2d4),'src/formats/message-format.ts',_0x5c1169(0x518,0x58c,0x546,0x5ae),_0x5c1169(0x58e,0x5e0,0x5b9,0x5b5),'src/models/mock-model.ts',_0x27a792(0x38a,0x334,0x341,0x333),_0x5c1169(0x55f,0x563,0x594,0x601),_0x5c1169(0x5a7,0x578,0x580,0x572),_0x5c1169(0x60b,0x612,0x5c1,0x58f),_0x5c1169(0x625,0x572,0x5c5,0x599),_0x5c1169(0x56a,0x540,0x52c,0x4bf),_0x27a792(0x308,0x248,0x295,0x2a2),_0x5c1169(0x552,0x547,0x58b,0x563)][_0x5c1169(0x5a1,0x5d1,0x5ca,0x5dc)]('\x0a'),SHELL_EXEC_TOOL={'name':_0x5c1169(0x603,0x5b0,0x5a4,0x5a4),'description':_0x5c1169(0x555,0x5a8,0x5a9,0x57d),'input_schema':{'type':_0x27a792(0x3b6,0x340,0x38e,0x358),'properties':{'command':{'type':_0x5c1169(0x544,0x504,0x52f,0x535)}},'required':['command']}};function createMeta(){return{'transforms':[]};}function createOutputChunk(_0x2ea5f7){return{'output':_0x2ea5f7,'structured':{'value':_0x2ea5f7}};}function createUnknownToolResult(_0x3b2f74){const _0x2eebdc={_0x3fd59a:0x276,_0xa2e3b7:0x296,_0x175d49:0x22e,_0x55a3fa:0x295,_0x4a5acc:0x2a6,_0x55f2ea:0x3ed,_0x4c39ae:0x3ea},_0x17f332={_0x5abbcb:0xbc,_0x33e74f:0xf8};function _0x1c645b(_0xc46338,_0x5dcd17,_0x3ead7a,_0x44c372){return _0x5c1169(_0xc46338-0x1f3,_0xc46338,_0x5dcd17- -0x31a,_0x44c372-0xb2);}function _0x2fb096(_0x11ac5e,_0x427698,_0xbfb7c1,_0x56a1a9){return _0x27a792(_0x11ac5e-_0x17f332._0x5abbcb,_0x427698-0x14c,_0x56a1a9,_0xbfb7c1-_0x17f332._0x33e74f);}return{'callId':_0x3b2f74['id'],'toolName':_0x3b2f74[_0x1c645b(0x2a2,0x254,_0x2eebdc._0x3fd59a,0x29f)],'status':_0x1c645b(0x248,0x26a,_0x2eebdc._0xa2e3b7,_0x2eebdc._0x175d49),'output':_0x1c645b(0x228,_0x2eebdc._0x55a3fa,_0x2eebdc._0x4a5acc,0x2ef)+_0x3b2f74[_0x2fb096(0x3a5,0x409,_0x2eebdc._0x55f2ea,_0x2eebdc._0x4c39ae)],'structured':{'exitCode':0x1},'chunks':[],'meta':createMeta()};}function createSuccessToolResult(_0x36b571,_0x3c100e){const _0x53d309={_0x4ed467:0x29c,_0x54b429:0x271},_0x13150b={_0x4ffabf:0x27},_0x30f6d7={_0x3afb26:0x186,_0x4fd0f2:0x12d};function _0x306358(_0x2cf4a9,_0x56df5d,_0x4a1cc2,_0x1fa79a){return _0x27a792(_0x2cf4a9-_0x30f6d7._0x3afb26,_0x56df5d-_0x30f6d7._0x4fd0f2,_0x2cf4a9,_0x1fa79a-0x1a2);}function _0x5b336e(_0x468877,_0x4591b4,_0x587c2e,_0x382b82){return _0x5c1169(_0x468877-_0x13150b._0x4ffabf,_0x468877,_0x382b82- -0x2fd,_0x382b82-0x7d);}return{'callId':_0x36b571['id'],'toolName':_0x36b571[_0x5b336e(_0x53d309._0x4ed467,0x206,0x26e,_0x53d309._0x54b429)],'status':'ok','output':MOCK_WORKSPACE_LISTING,'structured':{'command':getCommand(_0x36b571[_0x5b336e(0x291,0x29e,0x1f2,0x24a)]),'exitCode':0x0},'chunks':[_0x3c100e],'meta':createMeta()};}function createMockToolRuntime(){const _0x35372b={_0xa19804:0x63,_0x378c6d:0x88},_0x126ec9={_0x10b8e7:0x57b,_0x548bb1:0x593,_0x3af334:0x5c5,_0x155314:0x571},_0x1ce61d={_0x42bcf5:0x3c9},_0x3bdaeb=async(_0x469927,_0x640dab)=>{function _0xa78773(_0x2c0697,_0x84cca4,_0x1aee88,_0x252f19){return _0xdaaf(_0x2c0697-0x308,_0x252f19);}if(_0x469927[_0x59cc08(_0x126ec9._0x10b8e7,_0x126ec9._0x548bb1,0x5d5,_0x126ec9._0x3af334)]!==_0xa78773(0x54a,_0x126ec9._0x155314,0x588,0x58e))return createUnknownToolResult(_0x469927);function _0x59cc08(_0x31b4c8,_0x3d491d,_0x3400a8,_0x1d1637){return _0xdaaf(_0x3400a8-_0x1ce61d._0x42bcf5,_0x1d1637);}const _0x486b1b=createOutputChunk(MOCK_WORKSPACE_LISTING);return createSuccessToolResult(_0x469927,_0x486b1b);};return{'listToolSchemas'(){return[SHELL_EXEC_TOOL];},async 'executeCalls'(_0x488cac,_0x2150c7){function _0xca86dc(_0x319791,_0x14503f,_0x55baa6,_0x2a1b6a){return _0xdaaf(_0x2a1b6a- -0x176,_0x14503f);}return await Promise['all'](_0x488cac[_0xca86dc(_0x35372b._0xa19804,_0x35372b._0x378c6d,0x92,0xa7)](async _0x3f5047=>{return await _0x3bdaeb(_0x3f5047,_0x2150c7);}));},async 'execute'(_0x5138e7,_0x177207){return await _0x3bdaeb(_0x5138e7,_0x177207);}};}var delegatedRunCounter=0x0;function createDelegatedRunId(){const _0x2eb313={_0x446f51:0x1d6,_0x3b471a:0x1b2},_0x2e80a4={_0x6563a7:0x46,_0x432037:0x1bf};function _0x3d2c40(_0x23c1c5,_0x544052,_0x104150,_0x2d2141){return _0x27a792(_0x23c1c5-_0x2e80a4._0x6563a7,_0x544052-_0x2e80a4._0x432037,_0x23c1c5,_0x2d2141- -0x4cc);}return delegatedRunCounter+=0x1,_0x3d2c40(-_0x2eb313._0x446f51,-0x15f,-0x1fe,-_0x2eb313._0x3b471a)+delegatedRunCounter;}async function resolveDelegatedAgentOptions(_0x44fa2c,_0x3fbb0d){const _0x518e90={_0x5456c5:0x473,_0x12fc3a:0x3fc},_0x4bf8f3={_0x4562c0:0x155};function _0x768a12(_0x29e9e6,_0x31591b,_0x47f524,_0x2cad71){return _0x27a792(_0x29e9e6-_0x4bf8f3._0x4562c0,_0x31591b-0x1d0,_0x31591b,_0x47f524-0x16c);}return typeof _0x44fa2c===_0x768a12(_0x518e90._0x5456c5,_0x518e90._0x12fc3a,0x424,0x3fe)?await _0x44fa2c(_0x3fbb0d):_0x44fa2c;}function getDelegatedAgentDefinition(_0x4cf1ca,_0x838328){const _0x2417aa={_0x387bf9:0x2ce,_0x20a4f9:0x304},_0x3ce15f={_0x23e737:0x2f};function _0x10421c(_0x132693,_0x1274f8,_0x47ac2f,_0x4ae1b0){return _0x27a792(_0x132693-0x130,_0x1274f8-0x145,_0x1274f8,_0x4ae1b0-_0x3ce15f._0x23e737);}return _0x4cf1ca[_0x10421c(0x354,0x362,_0x2417aa._0x387bf9,_0x2417aa._0x20a4f9)]?.[_0x838328];}function createRunSummary(_0x547db5){const _0x37ddd1={_0x3756c6:0x4b4,_0x35009:0x4d8,_0x11fed6:0x2a2,_0x5944cc:0x305,_0x2ad5d3:0x2a0,_0x527c38:0x29f,_0x1a062f:0x2c9,_0x518389:0x308,_0x423c0e:0x383,_0x57ac98:0x317,_0x564021:0x539,_0x40580e:0x539,_0x52ea9d:0x4ea,_0x15414d:0x516,_0x5725cb:0x46d,_0x20b7c9:0x503,_0x528b6f:0x4ac,_0x48958b:0x4f7,_0xbd598f:0x4bf,_0x25df0b:0x4e3,_0x3425e8:0x434,_0x27bbf5:0x457,_0x120c8d:0x4a2,_0x1bfbe4:0x346,_0x37e05a:0x33e,_0x5e37f7:0x332,_0x38bd8b:0x4ac},_0xfa4fa9={_0x1f6cf4:0x1c8,_0x5d934c:0x74,_0x5ec0f9:0x1c7},_0x47cac0={_0xe21dd5:0x196,_0x87e8ec:0x296,_0x44311d:0x12b};function _0x36eb5d(_0x46789a,_0x97d864,_0x981d11,_0x1f0a33){return _0x5c1169(_0x46789a-_0x47cac0._0xe21dd5,_0x981d11,_0x1f0a33- -_0x47cac0._0x87e8ec,_0x1f0a33-_0x47cac0._0x44311d);}function _0x3206a7(_0x4e3e65,_0x6b198b,_0x5400e3,_0x15ec9c){return _0x27a792(_0x4e3e65-_0xfa4fa9._0x1f6cf4,_0x6b198b-_0xfa4fa9._0x5d934c,_0x4e3e65,_0x15ec9c-_0xfa4fa9._0x5ec0f9);}return{'runId':_0x547db5[_0x3206a7(_0x37ddd1._0x3756c6,0x499,0x429,0x479)],'agentId':_0x547db5[_0x3206a7(0x4f5,_0x37ddd1._0x35009,0x519,0x535)],'sessionId':_0x547db5[_0x36eb5d(_0x37ddd1._0x11fed6,_0x37ddd1._0x5944cc,_0x37ddd1._0x2ad5d3,0x2b2)],'status':_0x547db5[_0x36eb5d(_0x37ddd1._0x527c38,0x34b,_0x37ddd1._0x1a062f,_0x37ddd1._0x518389)],'parentSessionId':_0x547db5[_0x36eb5d(0x2c4,0x328,_0x37ddd1._0x423c0e,_0x37ddd1._0x57ac98)],..._0x547db5['originToolCallId']!==void 0x0?{'originToolCallId':_0x547db5[_0x3206a7(_0x37ddd1._0x564021,_0x37ddd1._0x40580e,0x4c9,_0x37ddd1._0x52ea9d)]}:{},..._0x547db5[_0x3206a7(_0x37ddd1._0x15414d,_0x37ddd1._0x5725cb,_0x37ddd1._0x20b7c9,_0x37ddd1._0x528b6f)]!==void 0x0?{'errorMessage':_0x547db5[_0x3206a7(_0x37ddd1._0x48958b,0x485,_0x37ddd1._0xbd598f,0x4ac)]}:{},..._0x547db5[_0x3206a7(_0x37ddd1._0x25df0b,_0x37ddd1._0x3425e8,_0x37ddd1._0x27bbf5,_0x37ddd1._0x120c8d)]?.[_0x36eb5d(0x34a,_0x37ddd1._0x1bfbe4,_0x37ddd1._0x37e05a,_0x37ddd1._0x5e37f7)]!==void 0x0?{'finalMessageText':getTextFromMessage(_0x547db5[_0x3206a7(_0x37ddd1._0x38bd8b,0x4fa,0x49e,_0x37ddd1._0x120c8d)]['finalMessage'])}:{}};}function createRunSummaryOutput(_0x43cadb,_0xd7c991){const _0x32fcb2={_0x461d56:0x2c4,_0x4fb063:0x2b4,_0x320636:0x266,_0x435ff6:0x2a1},_0x18dde6={_0x34f249:0x190,_0x2b3d5a:0x2c3},_0x3d327b={_0x1207bd:0xd4};function _0x583d58(_0x47cd99,_0x2a1d18,_0x43215e,_0x491757){return _0x5c1169(_0x47cd99-0x19a,_0x2a1d18,_0x47cd99- -0x696,_0x491757-_0x3d327b._0x1207bd);}const _0x50e06f=createRunSummary(_0x43cadb);function _0x2d0be4(_0x1e9cb6,_0x258df3,_0x7bb56e,_0x82d225){return _0x5c1169(_0x1e9cb6-_0x18dde6._0x34f249,_0x258df3,_0x82d225- -_0x18dde6._0x2b3d5a,_0x82d225-0x160);}const _0x4da0e6=_0x50e06f[_0x2d0be4(0x272,_0x32fcb2._0x461d56,0x2c7,_0x32fcb2._0x4fb063)];return createToolOutput(typeof _0x4da0e6==='string'&&_0x4da0e6[_0x2d0be4(0x25d,_0x32fcb2._0x320636,0x24f,_0x32fcb2._0x435ff6)]>0x0?_0x4da0e6:_0xd7c991,_0x50e06f);}function getRunTerminalErrorMessage(_0x1caaf2){const _0xe7d3e8={_0x47862c:0x249,_0x24c5d0:0xa7,_0x2d4dc6:0x5a,_0x1ac5ad:0x8e,_0x548973:0x97,_0x1f3e1f:0xf,_0x2c97c2:0x1ea,_0x3a7a1a:0x1a6,_0x4e1848:0x1b9,_0x5a17e8:0xba,_0x5aed09:0x5b,_0xfd94e5:0xb,_0x1a73a5:0x1a6,_0x57b441:0x1b4},_0x4c2aaa={_0x305d48:0x1a0},_0x4266d8={_0x2fca0b:0xfd,_0x5c6a29:0xf1,_0x3183bb:0x2cb},_0x1739b2=_0x1caaf2?.['state'][_0x243c41(0x26c,_0xe7d3e8._0x47862c,0x270,0x239)]['at'](-0x1);function _0x2bd07b(_0x5d082e,_0x5ec0bc,_0x402bf7,_0xb540ee){return _0x27a792(_0x5d082e-_0x4266d8._0x2fca0b,_0x5ec0bc-_0x4266d8._0x5c6a29,_0xb540ee,_0x5ec0bc- -_0x4266d8._0x3183bb);}if(_0x1739b2?.[_0x2bd07b(_0xe7d3e8._0x24c5d0,_0xe7d3e8._0x2d4dc6,_0xe7d3e8._0x1ac5ad,0x36)]===_0x2bd07b(0x93,0x40,_0xe7d3e8._0x548973,-_0xe7d3e8._0x1f3e1f)&&_0x1739b2[_0x243c41(_0xe7d3e8._0x2c97c2,_0xe7d3e8._0x3a7a1a,_0xe7d3e8._0x4e1848,0x1b0)][_0x2bd07b(_0xe7d3e8._0x5a17e8,_0xe7d3e8._0x5aed09,0x58,_0xe7d3e8._0xfd94e5)]()['length']>0x0)return _0x1739b2[_0x243c41(0x1b5,_0xe7d3e8._0x1a73a5,_0xe7d3e8._0x57b441,0x192)];function _0x243c41(_0x8001c8,_0x23bc62,_0x103cdd,_0x117fa5){return _0x5c1169(_0x8001c8-_0x4c2aaa._0x305d48,_0x8001c8,_0x23bc62- -0x390,_0x117fa5-0xea);}return void 0x0;}function formatAbortedRunMessage(_0x2d493b,_0x2e2686){const _0x50778e={_0x3ef1e9:0x463,_0x40b093:0x47b,_0x36b072:0x339,_0x33d9df:0x40c,_0x20ea45:0x405,_0x39cdb2:0x43d,_0x4ea29f:0x495},_0x537eef={_0x11b624:0x9c},_0x3694a8={_0x5e9ef8:0xa4,_0x250137:0x88,_0x1cfb8a:0x76};function _0x4d10b2(_0x5d2143,_0xa17372,_0x4a1b7f,_0x4b401c){return _0x27a792(_0x5d2143-_0x3694a8._0x5e9ef8,_0xa17372-_0x3694a8._0x250137,_0x5d2143,_0xa17372-_0x3694a8._0x1cfb8a);}function _0x41b4af(_0x17c1e1,_0x80199d,_0x2b5243,_0x12d731){return _0x5c1169(_0x17c1e1-_0x537eef._0x11b624,_0x2b5243,_0x80199d- -0x193,_0x12d731-0x8e);}const _0x49b63a=_0x41b4af(_0x50778e._0x3ef1e9,0x44b,_0x50778e._0x40b093,0x436)+_0x2d493b+_0x4d10b2(0x361,_0x50778e._0x36b072,0x2f8,0x389);if(!_0x2e2686||_0x2e2686[_0x41b4af(0x3ad,_0x50778e._0x33d9df,0x431,0x3c9)]()[_0x41b4af(0x3e5,0x3d1,_0x50778e._0x20ea45,0x3eb)]===0x0||_0x2e2686===_0x49b63a)return _0x49b63a;return _0x49b63a+_0x41b4af(0x419,_0x50778e._0x39cdb2,0x42a,_0x50778e._0x4ea29f)+_0x2e2686;}function createAssignTaskTool(_0x4a3f3f){const _0xd35340={_0x3c95bc:0x7e,_0x39cfc9:0x6b,_0x5d4f95:0x518,_0x30fa4e:0x4e4,_0x560c7e:0x570,_0x359dbe:0x51e,_0x283a47:0x9b,_0x4bacac:0x6d,_0x26b4c9:0x5d,_0x1c54a6:0x61,_0x2801dc:0x4cd,_0x5ad928:0x46a,_0x1baf50:0x53c,_0x48b56d:0x516,_0x55dffe:0x59f,_0x59e62f:0xbe},_0x439660={_0x45f022:0x678,_0x397a92:0x6d1,_0x46acfd:0x6a8,_0x490a5e:0x670,_0x33d222:0x17e,_0x1bbe9a:0x1c5,_0x43172f:0x5ca,_0x50d542:0x62d,_0x242360:0x5d7,_0x3531c6:0x65a,_0x4da891:0x613,_0x567f3f:0x636,_0x52bc55:0x575,_0x2bc711:0x633,_0x44f2eb:0x63c,_0x54e6b6:0x10a,_0x2339f6:0xa7,_0x18f986:0xc1,_0x3d09a5:0x623,_0x2f39da:0x684,_0x33fcc3:0x17d,_0xba21c4:0x135,_0x12b3c7:0x609,_0xb760dd:0x1b4,_0x44af7e:0x618,_0x331f0c:0x65d,_0x37d88a:0x5c5,_0x15ed1:0x222,_0x37216c:0x5ad,_0x4c15e8:0x5b6,_0x5e438f:0x5b1,_0x57eaf7:0x5de,_0x536955:0x60e,_0x4a2fbd:0x61b,_0x37fa89:0x13b,_0x40abd2:0x138,_0x4ee72b:0x133,_0x12714f:0x659,_0x3b5cba:0x621,_0x4cbf6c:0x66e,_0x1526e9:0x672,_0x51d24b:0x137,_0x264e66:0x5d6,_0x4bb261:0x1b6,_0x5a9713:0x1eb,_0x3f9194:0x155,_0x4c2435:0x1bd,_0x1cfbb4:0x171,_0x4ad684:0x10a,_0x526cf7:0x162,_0x34d1f1:0x5e5,_0x2d5621:0x56a},_0x1f357e={_0x2bcf76:0x314,_0x5268db:0x36c,_0x17ba7a:0x33d},_0x13dff5={_0x4f0259:0xa1,_0x377b81:0x1ce},_0xa0cfd4={_0x137eee:0x15d};function _0x16b235(_0x36b2ea,_0x281e9a,_0x4b195d,_0x4e4319){return _0x27a792(_0x36b2ea-0x181,_0x281e9a-_0xa0cfd4._0x137eee,_0x36b2ea,_0x4b195d- -0x2eb);}function _0x188132(_0x28a789,_0x4237fd,_0x1fc0c0,_0x3d031e){return _0x27a792(_0x28a789-_0x13dff5._0x4f0259,_0x4237fd-0x1,_0x4237fd,_0x28a789-_0x13dff5._0x377b81);}return defineTool({'name':_0x16b235(0xa1,_0xd35340._0x3c95bc,_0xd35340._0x39cfc9,0x7),'description':_0x188132(_0xd35340._0x5d4f95,_0xd35340._0x30fa4e,_0xd35340._0x560c7e,_0xd35340._0x359dbe),'inputSchema':{'type':_0x16b235(_0xd35340._0x283a47,0x10,_0xd35340._0x4bacac,0xc6),'properties':{'agentId':{'type':_0x16b235(-_0xd35340._0x26b4c9,-0x30,-0x35,-_0xd35340._0x1c54a6)},'task':{'type':_0x188132(0x484,_0xd35340._0x2801dc,_0xd35340._0x5ad928,0x441)}},'required':[_0x188132(_0xd35340._0x1baf50,_0xd35340._0x48b56d,_0xd35340._0x55dffe,0x4ed),_0x16b235(_0xd35340._0x59e62f,0x4b,0x79,0x11)]},async *'execute'(_0x5a5fd2,_0x1b64dd){const _0x3c18c6={_0x467f1b:0x12d,_0x21b577:0x1c5},_0x57ad33={_0x3f0562:0x1be,_0x31ea7e:0x143,_0x5bada0:0x15};function _0x181417(_0x38ebee,_0x156be0,_0x135d39,_0x2eb016){return _0x16b235(_0x156be0,_0x156be0-_0x57ad33._0x3f0562,_0x38ebee-_0x57ad33._0x31ea7e,_0x2eb016-_0x57ad33._0x5bada0);}function _0x4ea3cf(_0x4245d6,_0x589563,_0x1645eb,_0x54235d){return _0x188132(_0x4245d6-_0x3c18c6._0x467f1b,_0x54235d,_0x1645eb-_0x3c18c6._0x21b577,_0x54235d-0x44);}const _0x525a41=createDelegatedRunId(),_0x2a6fbe={'agentId':_0x5a5fd2[_0x4ea3cf(0x669,_0x439660._0x45f022,0x663,_0x439660._0x397a92)],'parentSessionId':_0x1b64dd[_0x4ea3cf(0x5ca,0x5a2,0x5eb,0x5c7)],'runId':_0x525a41,..._0x1b64dd['toolCallId']!==void 0x0?{'toolCallId':_0x1b64dd['toolCallId']}:{}},_0x442fb0=getDelegatedAgentDefinition(_0x4a3f3f,_0x5a5fd2[_0x4ea3cf(0x669,_0x439660._0x46acfd,0x632,0x660)]);if(!_0x442fb0)throw new ToolExecutionError('Unknown\x20delegated\x20agent:\x20'+_0x5a5fd2[_0x4ea3cf(0x669,0x68c,_0x439660._0x490a5e,0x62d)],{'agentId':_0x5a5fd2[_0x181417(0x1c6,0x182,_0x439660._0x33d222,_0x439660._0x1bbe9a)]});const _0x23f9f8=new Agent(await resolveDelegatedAgentOptions(_0x442fb0,_0x2a6fbe));let _0x2f5664={'runId':_0x525a41,'agentId':_0x5a5fd2['agentId'],'sessionId':_0x23f9f8[_0x4ea3cf(_0x439660._0x43172f,0x5a1,_0x439660._0x50d542,_0x439660._0x242360)],'status':_0x4ea3cf(_0x439660._0x3531c6,_0x439660._0x4da891,0x671,0x5ff),'parentSessionId':_0x1b64dd[_0x4ea3cf(0x5ca,_0x439660._0x567f3f,_0x439660._0x52bc55,_0x439660._0x2bc711)],..._0x1b64dd['toolCallId']!==void 0x0?{'originToolCallId':_0x1b64dd['toolCallId']}:{}};const _0x144931=new AbortController(),_0x5db999=addAbortListener(_0x1b64dd[_0x4ea3cf(0x5ec,_0x439660._0x44f2eb,0x597,0x60c)],()=>{function _0x154296(_0xb8a555,_0x58cf88,_0x476560,_0x1a4779){return _0x4ea3cf(_0x1a4779- -0x2af,_0x58cf88-0x14b,_0x476560-0x29,_0x476560);}_0x144931['abort'](_0x1b64dd[_0x154296(_0x1f357e._0x2bcf76,_0x1f357e._0x5268db,0x339,_0x1f357e._0x17ba7a)]?.['reason']);});yield createToolOutput('Started\x20agent\x20run\x20'+_0x2f5664[_0x181417(_0x439660._0x54e6b6,_0x439660._0x2339f6,_0x439660._0x18f986,0x145)]+'.',{'runId':_0x2f5664['runId'],'agentId':_0x2f5664[_0x4ea3cf(0x669,0x64c,_0x439660._0x3d09a5,_0x439660._0x2f39da)],'sessionId':_0x2f5664['sessionId'],'status':_0x2f5664[_0x181417(_0x439660._0x33fcc3,0x132,_0x439660._0xba21c4,0x148)]});try{const _0x5df7b8=await _0x23f9f8['send'](_0x5a5fd2[_0x4ea3cf(0x65f,0x61a,_0x439660._0x12b3c7,0x625)],{'signal':_0x144931['signal']});_0x2f5664={..._0x2f5664,'status':_0x5df7b8[_0x181417(0x17d,0x1c8,_0x439660._0xb760dd,0x19b)],'result':_0x5df7b8};if(_0x5df7b8[_0x4ea3cf(0x620,_0x439660._0x44af7e,_0x439660._0x331f0c,_0x439660._0x37d88a)]!=='completed'){const _0x4f0101=getRunTerminalErrorMessage(_0x5df7b8),_0x64e5f9=formatAbortedRunMessage(_0x2f5664['runId'],_0x4f0101);throw new ToolExecutionError(_0x64e5f9,{...createRunSummary(_0x2f5664),'aborted':!![],'errorMessage':_0x64e5f9});}return createRunSummaryOutput(_0x2f5664,_0x181417(0x1bd,0x173,0x210,_0x439660._0x15ed1)+_0x2f5664[_0x4ea3cf(_0x439660._0x37216c,_0x439660._0x4c15e8,0x54d,_0x439660._0x5e438f)]+'\x20completed.');}catch(_0x28e240){if(_0x28e240 instanceof ToolExecutionError)throw _0x28e240;if(isAbortError(_0x28e240)||_0x144931['signal'][_0x4ea3cf(_0x439660._0x57eaf7,_0x439660._0x536955,_0x439660._0x4a2fbd,0x5e2)]||_0x1b64dd['signal'][_0x181417(_0x439660._0x37fa89,_0x439660._0x40abd2,0x10e,0x12b)]){const _0x22e07a=getRunTerminalErrorMessage(_0x2f5664[_0x181417(_0x439660._0x4ee72b,0xed,0x143,0x109)])??(_0x28e240 instanceof Error?_0x28e240[_0x4ea3cf(_0x439660._0x12714f,_0x439660._0x3b5cba,_0x439660._0x4cbf6c,_0x439660._0x1526e9)]:String(_0x28e240)),_0x286e18=formatAbortedRunMessage(_0x2f5664['runId'],_0x22e07a);_0x2f5664={..._0x2f5664,'status':_0x181417(_0x439660._0x37fa89,_0x439660._0x51d24b,0x144,0x140),'errorMessage':_0x286e18};throw new ToolExecutionError(_0x286e18,{...createRunSummary(_0x2f5664),'aborted':!![],'errorMessage':_0x286e18});}const _0x3ce55a=getRunTerminalErrorMessage(_0x2f5664[_0x4ea3cf(_0x439660._0x264e66,0x5fe,0x593,0x611)])??(_0x28e240 instanceof Error?_0x28e240[_0x181417(_0x439660._0x4bb261,_0x439660._0x5a9713,_0x439660._0x3f9194,0x1c2)]:String(_0x28e240))??_0x181417(_0x439660._0x4c2435,0x200,_0x439660._0x1cfbb4,0x1c9)+_0x2f5664[_0x181417(_0x439660._0x4ad684,0x11e,_0x439660._0x526cf7,0xf4)]+_0x4ea3cf(0x597,0x5ee,_0x439660._0x34d1f1,_0x439660._0x2d5621);_0x2f5664={..._0x2f5664,'status':'failed','errorMessage':_0x3ce55a};throw new ToolExecutionError(_0x3ce55a,{...createRunSummary(_0x2f5664),'errorMessage':_0x3ce55a});}finally{_0x5db999();}}});}var createDelegateToAgentTool=createAssignTaskTool;function createDelegationTools(_0x1c270f){return[createAssignTaskTool(_0x1c270f)];}export{ToolExecutionError,ToolRegistry,assertWorkspaceFile,createAssignTaskTool,createBashTool,createDelegateToAgentTool,createDelegationTools,createFileEditTool,createFileNewTool,createFileReadTool,createGlobTool,createGrepTool,createInternalToolRuntime,createLsTool,createMockToolRuntime,createShellExecTool,createToolOutput,defineTool,deriveFinalToolOutput,filepath,files,isProbablyBinary,normalizeToolOutputValue,resolveWorkspacePath,search,validateToolInput};
|