@swifty.js/swifty 0.0.27 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -37
- package/dist/agent-YR6YK26C.js +4 -0
- package/dist/anthropic-5GRR5JCT.js +4 -0
- package/dist/checker-N5TIJEN5.js +4 -0
- package/dist/chunk-D34FUVGU.js +4 -0
- package/dist/{chunk-UGJVMFGH.js → chunk-K5ZK27BX.js} +1 -1
- package/dist/chunk-LIMEBKCY.js +408 -0
- package/dist/chunk-OTVZGPHD.js +121 -0
- package/dist/chunk-POHIQUFP.js +301 -0
- package/dist/chunk-QCKJLO6X.js +4 -0
- package/dist/chunk-QFSCPD63.js +4 -0
- package/dist/chunk-TMEX7RFA.js +4 -0
- package/dist/chunk-Y6SQB5FG.js +4 -0
- package/dist/lib/agent-5WEKVRTD.js +11 -0
- package/dist/lib/{anthropic-RYPJDHQM.js → anthropic-KWO3KLNV.js} +4 -5
- package/dist/lib/{checker-6BW4222R.js → checker-AXHPKVBY.js} +2 -2
- package/dist/lib/{chunk-HK2Z6WP4.js → chunk-2IVEVG5N.js} +5 -1
- package/dist/lib/{chunk-XFSN4LMA.js → chunk-3FBS5NB7.js} +71 -18
- package/dist/lib/{chunk-GNI7YX6F.js → chunk-DJ6AILPN.js} +70 -24
- package/dist/lib/chunk-GCY44T7S.js +2346 -0
- package/dist/lib/{chunk-PZ42NAFA.js → chunk-KG4MJGKQ.js} +19 -21
- package/dist/lib/{chunk-2AUSNVIB.js → chunk-KZSBR4FO.js} +44 -37
- package/dist/lib/chunk-PIL7M52F.js +127 -0
- package/dist/lib/chunk-Z4CYHTII.js +392 -0
- package/dist/lib/index.d.ts +227 -132
- package/dist/lib/index.js +2195 -1602
- package/dist/lib/{openai-VX5VBXZ4.js → openai-PBF7EWNJ.js} +2 -3
- package/dist/lib/{tool-filter-VF7TZRE5.js → tool-filter-R6HDDJHE.js} +1 -1
- package/dist/main.js +203 -194
- package/dist/{openai-5FDSLJNM.js → openai-QQ2K7GPF.js} +14 -14
- package/dist/{server-F666APPN.js → server-G23HCFLI.js} +21 -21
- package/dist/{tool-filter-NO7I3HFD.js → tool-filter-VBP6WOGO.js} +1 -1
- package/package.json +2 -2
- package/dist/agent-OMC6YIMW.js +0 -4
- package/dist/anthropic-T5K4BQPB.js +0 -4
- package/dist/checker-TOQVEG3P.js +0 -4
- package/dist/chunk-5I2WXSGV.js +0 -90
- package/dist/chunk-A2VR3BC4.js +0 -4
- package/dist/chunk-A57FEYSN.js +0 -4
- package/dist/chunk-BRC5L644.js +0 -130
- package/dist/chunk-FZPTNGTU.js +0 -4
- package/dist/chunk-G6YIQW3Z.js +0 -238
- package/dist/chunk-I2XG2PXV.js +0 -4
- package/dist/chunk-LVSHXIBK.js +0 -389
- package/dist/chunk-SULWNDNC.js +0 -4
- package/dist/chunk-WO6DL7OB.js +0 -35
- package/dist/lib/agent-U7MIUCKT.js +0 -9
- package/dist/lib/chunk-2QILP24G.js +0 -1120
- package/dist/lib/chunk-3LU4APFB.js +0 -339
- package/dist/lib/chunk-OO2CLOEE.js +0 -88
- package/dist/lib/chunk-RKJYTYQM.js +0 -1285
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createChildLogger
|
|
3
|
+
} from "./chunk-EY7HE52Q.js";
|
|
4
|
+
|
|
5
|
+
// src/llm/errors.ts
|
|
6
|
+
var LLMError = class extends Error {
|
|
7
|
+
constructor(message) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = "LLMError";
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
var AuthenticationError = class extends LLMError {
|
|
13
|
+
constructor(message) {
|
|
14
|
+
super(message);
|
|
15
|
+
this.name = "AuthenticationError";
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
var RateLimitError = class extends LLMError {
|
|
19
|
+
retryAfter;
|
|
20
|
+
constructor(message, retryAfter) {
|
|
21
|
+
super(message);
|
|
22
|
+
this.name = "RateLimitError";
|
|
23
|
+
this.retryAfter = retryAfter;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
var NetworkError = class extends LLMError {
|
|
27
|
+
constructor(message) {
|
|
28
|
+
super(message);
|
|
29
|
+
this.name = "NetworkError";
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
var ContextTooLongError = class extends LLMError {
|
|
33
|
+
constructor(message) {
|
|
34
|
+
super(message);
|
|
35
|
+
this.name = "ContextTooLongError";
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// src/config/config.ts
|
|
40
|
+
import { existsSync, readFileSync } from "fs";
|
|
41
|
+
import { homedir } from "os";
|
|
42
|
+
import { join } from "path";
|
|
43
|
+
import { safeParse } from "@modelcontextprotocol/sdk/server/zod-compat.js";
|
|
44
|
+
import yaml from "js-yaml";
|
|
45
|
+
import { z } from "zod";
|
|
46
|
+
var log = createChildLogger({ module: "config" });
|
|
47
|
+
var ENV_KEY_MAP = {
|
|
48
|
+
anthropic: "ANTHROPIC_API_KEY",
|
|
49
|
+
openai: "OPENAI_API_KEY",
|
|
50
|
+
"openai-compat": "OPENAI_API_KEY"
|
|
51
|
+
};
|
|
52
|
+
function isKeyofTypeofEnvKeyMap(k) {
|
|
53
|
+
return VALID_PROTOCOLS.has(k);
|
|
54
|
+
}
|
|
55
|
+
var VALID_PROTOCOLS = new Set(Object.keys(ENV_KEY_MAP));
|
|
56
|
+
var ConfigError = class extends Error {
|
|
57
|
+
constructor(message) {
|
|
58
|
+
super(message);
|
|
59
|
+
this.name = "ConfigError";
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
function globalConfigPath() {
|
|
63
|
+
return join(homedir(), ".swifty", "config.yaml");
|
|
64
|
+
}
|
|
65
|
+
var THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
66
|
+
var ThinkingConfigSchema = z.union([z.boolean(), z.enum(THINKING_LEVELS)]);
|
|
67
|
+
var ProviderConfigSchema = z.object({
|
|
68
|
+
name: z.string(),
|
|
69
|
+
/**
|
|
70
|
+
* enum: ["anthropic", "openai", "openai-compat"]
|
|
71
|
+
*/
|
|
72
|
+
protocol: z.enum(["anthropic", "openai", "openai-compat"]),
|
|
73
|
+
base_url: z.string(),
|
|
74
|
+
model: z.string(),
|
|
75
|
+
api_key: z.string().optional(),
|
|
76
|
+
thinking: ThinkingConfigSchema.optional(),
|
|
77
|
+
context_window: z.coerce.number().optional(),
|
|
78
|
+
/**
|
|
79
|
+
* The model's output ceiling (PI's `model.maxTokens`). Clamped to the
|
|
80
|
+
* context window; reasoning shares this ceiling instead of raising it.
|
|
81
|
+
*/
|
|
82
|
+
max_output_tokens: z.coerce.number().optional()
|
|
83
|
+
});
|
|
84
|
+
var DEFAULT_THINKING_LEVEL = "high";
|
|
85
|
+
var DEFAULT_CONTEXT_WINDOW = 1e6;
|
|
86
|
+
var DEFAULT_MAX_OUTPUT_TOKENS = 128e3;
|
|
87
|
+
var THINKING_BUDGETS = {
|
|
88
|
+
minimal: 1024,
|
|
89
|
+
low: 2048,
|
|
90
|
+
medium: 8192,
|
|
91
|
+
high: 16384,
|
|
92
|
+
xhigh: 32768,
|
|
93
|
+
max: 65536
|
|
94
|
+
};
|
|
95
|
+
function isValidThinkingLevel(value) {
|
|
96
|
+
return THINKING_LEVELS.includes(value);
|
|
97
|
+
}
|
|
98
|
+
function defaultThinkingLevelFor(protocol) {
|
|
99
|
+
return protocol === "anthropic" ? DEFAULT_THINKING_LEVEL : "off";
|
|
100
|
+
}
|
|
101
|
+
function getThinkingLevel(provider) {
|
|
102
|
+
const thinking = provider.thinking;
|
|
103
|
+
if (thinking === void 0) {
|
|
104
|
+
return defaultThinkingLevelFor(provider.protocol);
|
|
105
|
+
}
|
|
106
|
+
if (typeof thinking === "boolean") {
|
|
107
|
+
return thinking ? defaultThinkingLevelFor(provider.protocol) : "off";
|
|
108
|
+
}
|
|
109
|
+
return thinking;
|
|
110
|
+
}
|
|
111
|
+
function thinkingBudgetForLevel(level) {
|
|
112
|
+
return level === "off" ? 0 : THINKING_BUDGETS[level];
|
|
113
|
+
}
|
|
114
|
+
function toReasoningEffort(level) {
|
|
115
|
+
return level === "off" ? "none" : level;
|
|
116
|
+
}
|
|
117
|
+
function withProviderDefaults(provider) {
|
|
118
|
+
return {
|
|
119
|
+
...provider,
|
|
120
|
+
thinking: getThinkingLevel(provider),
|
|
121
|
+
context_window: getContextWindow(provider),
|
|
122
|
+
max_output_tokens: getMaxOutputTokens(provider)
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function getContextWindow(provider) {
|
|
126
|
+
return Number.isSafeInteger(provider.context_window) && (provider.context_window ?? 0) > 0 ? provider.context_window ?? DEFAULT_CONTEXT_WINDOW : DEFAULT_CONTEXT_WINDOW;
|
|
127
|
+
}
|
|
128
|
+
function getMaxOutputTokens(provider) {
|
|
129
|
+
const configured = provider.max_output_tokens;
|
|
130
|
+
const maxOutput = Number.isSafeInteger(configured) && (configured ?? 0) > 0 ? configured ?? DEFAULT_MAX_OUTPUT_TOKENS : DEFAULT_MAX_OUTPUT_TOKENS;
|
|
131
|
+
return Math.min(maxOutput, getContextWindow(provider));
|
|
132
|
+
}
|
|
133
|
+
function resolveAPIKey(p) {
|
|
134
|
+
if (p.api_key) {
|
|
135
|
+
return p.api_key;
|
|
136
|
+
}
|
|
137
|
+
const envVar = isKeyofTypeofEnvKeyMap(p.protocol) ? ENV_KEY_MAP[p.protocol] : "";
|
|
138
|
+
if (!envVar) {
|
|
139
|
+
return "";
|
|
140
|
+
}
|
|
141
|
+
return process.env[envVar] ?? "";
|
|
142
|
+
}
|
|
143
|
+
var MCPServerConfigSchema = z.object({
|
|
144
|
+
name: z.string(),
|
|
145
|
+
command: z.string().optional(),
|
|
146
|
+
args: z.array(z.string()).optional(),
|
|
147
|
+
url: z.string().optional(),
|
|
148
|
+
transport: z.string().optional(),
|
|
149
|
+
headers: z.record(z.string(), z.string()).optional(),
|
|
150
|
+
env: z.record(z.string(), z.string()).optional()
|
|
151
|
+
});
|
|
152
|
+
var HookConfigSchema = z.object({
|
|
153
|
+
id: z.string().optional(),
|
|
154
|
+
event: z.string(),
|
|
155
|
+
condition: z.string().optional(),
|
|
156
|
+
action: z.object({
|
|
157
|
+
type: z.string(),
|
|
158
|
+
command: z.string().optional(),
|
|
159
|
+
url: z.string().optional(),
|
|
160
|
+
method: z.string().optional(),
|
|
161
|
+
prompt: z.string().optional()
|
|
162
|
+
}),
|
|
163
|
+
reject: z.boolean().optional(),
|
|
164
|
+
once: z.boolean().optional(),
|
|
165
|
+
async: z.boolean().optional(),
|
|
166
|
+
on_error: z.string().optional()
|
|
167
|
+
});
|
|
168
|
+
var SandboxYamlConfigSchema = z.object({
|
|
169
|
+
enabled: z.boolean().optional(),
|
|
170
|
+
auto_allow: z.boolean().optional(),
|
|
171
|
+
network_enabled: z.boolean().optional()
|
|
172
|
+
});
|
|
173
|
+
var AppConfigSchema = z.looseObject({
|
|
174
|
+
providers: z.array(ProviderConfigSchema),
|
|
175
|
+
permission_mode: z.string().optional(),
|
|
176
|
+
mcp_servers: z.array(MCPServerConfigSchema).default([]),
|
|
177
|
+
hooks: z.array(HookConfigSchema).default([]),
|
|
178
|
+
sandbox: SandboxYamlConfigSchema.optional(),
|
|
179
|
+
enable_coordinator_mode: z.boolean().optional(),
|
|
180
|
+
/**
|
|
181
|
+
* Whether to fork when subagent_type is omitted. Enabled by default, so this
|
|
182
|
+
* field is left as undefined to represent "not specified in config". Using a
|
|
183
|
+
* concrete boolean would make it impossible to distinguish "not set" from
|
|
184
|
+
* "explicitly false", and the latter could never be turned back off.
|
|
185
|
+
*/
|
|
186
|
+
enable_fork: z.boolean().optional()
|
|
187
|
+
});
|
|
188
|
+
function forkEnabled(cfg) {
|
|
189
|
+
return cfg.enable_fork !== false;
|
|
190
|
+
}
|
|
191
|
+
function isRecord(value) {
|
|
192
|
+
return typeof value === "object" && value !== null;
|
|
193
|
+
}
|
|
194
|
+
function loadSingleFile(path) {
|
|
195
|
+
const data = readFileSync(path, "utf-8");
|
|
196
|
+
const raw = yaml.load(data);
|
|
197
|
+
if (!isRecord(raw)) {
|
|
198
|
+
log.error({ path }, "invalid yaml");
|
|
199
|
+
return { providers: [], mcp_servers: [], hooks: [] };
|
|
200
|
+
}
|
|
201
|
+
const parsed = safeParse(AppConfigSchema, raw);
|
|
202
|
+
if (parsed.success) {
|
|
203
|
+
const data2 = parsed.data;
|
|
204
|
+
return {
|
|
205
|
+
...data2,
|
|
206
|
+
providers: data2.providers.map(withProviderDefaults)
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
log.error({ error: parsed.error }, "config error");
|
|
210
|
+
let providers = [];
|
|
211
|
+
let permissionMode;
|
|
212
|
+
let mcpServers = [];
|
|
213
|
+
let hooks = [];
|
|
214
|
+
let sandbox = void 0;
|
|
215
|
+
let enableCoordinatorMode = false;
|
|
216
|
+
let enableFork = true;
|
|
217
|
+
if ("providers" in raw) {
|
|
218
|
+
const parsed2 = safeParse(z.array(ProviderConfigSchema), raw.providers);
|
|
219
|
+
if (parsed2.success) {
|
|
220
|
+
providers = parsed2.data.map(withProviderDefaults);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
if ("permission_mode" in raw && typeof raw.permission_mode === "string") {
|
|
224
|
+
permissionMode = raw.permission_mode;
|
|
225
|
+
}
|
|
226
|
+
if ("mcp_servers" in raw) {
|
|
227
|
+
const parsed2 = safeParse(z.array(MCPServerConfigSchema), raw.mcp_servers);
|
|
228
|
+
if (parsed2.success) {
|
|
229
|
+
mcpServers = parsed2.data;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if ("hooks" in raw) {
|
|
233
|
+
const parsed2 = safeParse(z.array(HookConfigSchema), raw.hooks);
|
|
234
|
+
if (parsed2.success) {
|
|
235
|
+
hooks = parsed2.data;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
if ("sandbox" in raw) {
|
|
239
|
+
const parsed2 = safeParse(SandboxYamlConfigSchema, raw.sandbox);
|
|
240
|
+
if (parsed2.success) {
|
|
241
|
+
sandbox = parsed2.data;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
if ("enable_coordinator_mode" in raw) {
|
|
245
|
+
enableCoordinatorMode = Boolean(raw.enable_coordinator_mode);
|
|
246
|
+
}
|
|
247
|
+
if ("enable_fork" in raw) {
|
|
248
|
+
enableFork = Boolean(raw.enable_fork);
|
|
249
|
+
}
|
|
250
|
+
return {
|
|
251
|
+
providers,
|
|
252
|
+
permission_mode: permissionMode,
|
|
253
|
+
mcp_servers: mcpServers,
|
|
254
|
+
hooks,
|
|
255
|
+
sandbox,
|
|
256
|
+
enable_coordinator_mode: enableCoordinatorMode,
|
|
257
|
+
enable_fork: enableFork
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
function validateProviders(config) {
|
|
261
|
+
if (config.providers.length === 0) {
|
|
262
|
+
throw new ConfigError("At least one provider MUST be configured.");
|
|
263
|
+
}
|
|
264
|
+
const requiredFields = ["name", "protocol", "base_url", "model"];
|
|
265
|
+
for (let i = 0; i < config.providers.length; i++) {
|
|
266
|
+
const p = config.providers[i];
|
|
267
|
+
const values = {
|
|
268
|
+
name: p.name,
|
|
269
|
+
protocol: p.protocol,
|
|
270
|
+
base_url: p.base_url,
|
|
271
|
+
model: p.model
|
|
272
|
+
};
|
|
273
|
+
const missing = requiredFields.filter((field) => !values[field].trim());
|
|
274
|
+
if (missing.length > 0) {
|
|
275
|
+
throw new ConfigError(`Provider #${String(i + 1)}: missing fields: ${missing.join(", ")}`);
|
|
276
|
+
}
|
|
277
|
+
if (!VALID_PROTOCOLS.has(p.protocol)) {
|
|
278
|
+
throw new ConfigError(
|
|
279
|
+
`Provider #${String(i + 1)}: invalid protocol '${p.protocol}', MUST be one of: ${Array.from(VALID_PROTOCOLS).join(", ")}`
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
function loadConfig(path, options = {}) {
|
|
285
|
+
if (path) {
|
|
286
|
+
const config2 = loadSingleFile(path);
|
|
287
|
+
if (!options.allowEmptyProviders || config2.providers.length > 0) {
|
|
288
|
+
validateProviders(config2);
|
|
289
|
+
}
|
|
290
|
+
return config2;
|
|
291
|
+
}
|
|
292
|
+
const candidate = globalConfigPath();
|
|
293
|
+
if (!existsSync(candidate)) {
|
|
294
|
+
if (options.allowEmptyProviders) {
|
|
295
|
+
return { providers: [], mcp_servers: [], hooks: [] };
|
|
296
|
+
}
|
|
297
|
+
const legacy = [
|
|
298
|
+
join(process.cwd(), ".swifty/config.yaml"),
|
|
299
|
+
join(process.cwd(), ".swifty/config.local.yaml")
|
|
300
|
+
].filter((legacyPath) => existsSync(legacyPath)).join(", ");
|
|
301
|
+
throw new ConfigError(
|
|
302
|
+
`No config file found, expected ${candidate}.` + (legacy ? ` Found project config at ${legacy}; move it to ${candidate}.` : "")
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
const config = loadSingleFile(candidate);
|
|
306
|
+
if (!options.allowEmptyProviders || config.providers.length > 0) {
|
|
307
|
+
validateProviders(config);
|
|
308
|
+
}
|
|
309
|
+
return config;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// src/conversation/pairing.ts
|
|
313
|
+
var INTERRUPTED_TOOL_RESULT = "Tool execution was interrupted. The tool may or may not have completed; verify before relying on its effects.";
|
|
314
|
+
var REJECTED_TOOL_RESULT = "The user rejected this tool use. Nothing was changed (for file edits, the new content was NOT written).";
|
|
315
|
+
function ensureToolPairing(messages) {
|
|
316
|
+
const out = [];
|
|
317
|
+
for (let i = 0; i < messages.length; i++) {
|
|
318
|
+
const m = messages[i];
|
|
319
|
+
if (m.role === "assistant" && m.toolUses?.length) {
|
|
320
|
+
out.push(m);
|
|
321
|
+
const pending = new Set(m.toolUses.map((tu) => tu.toolUseId));
|
|
322
|
+
const results = [];
|
|
323
|
+
const resultMessages = [];
|
|
324
|
+
while (i + 1 < messages.length) {
|
|
325
|
+
const next = messages[i + 1];
|
|
326
|
+
if (next.role !== "user" || !next.toolResults?.length || next.toolUses?.length) {
|
|
327
|
+
break;
|
|
328
|
+
}
|
|
329
|
+
i++;
|
|
330
|
+
resultMessages.push(next);
|
|
331
|
+
for (const tr of next.toolResults) {
|
|
332
|
+
if (pending.delete(tr.toolUseId)) {
|
|
333
|
+
results.push(tr);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
for (const toolUseId of pending) {
|
|
338
|
+
results.push({ toolUseId, content: INTERRUPTED_TOOL_RESULT, isError: true });
|
|
339
|
+
}
|
|
340
|
+
out.push({
|
|
341
|
+
...resultMessages[0] ?? { role: "user", content: "" },
|
|
342
|
+
toolResults: results
|
|
343
|
+
});
|
|
344
|
+
for (const remaining of resultMessages.slice(1)) {
|
|
345
|
+
if (remaining.content.length > 0 || remaining.thinkingBlocks?.length) {
|
|
346
|
+
out.push({ ...remaining, toolResults: [] });
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
continue;
|
|
350
|
+
}
|
|
351
|
+
if ((m.toolResults?.length ?? 0) > 0) {
|
|
352
|
+
if (m.content.length === 0 && !m.toolUses?.length && !m.thinkingBlocks?.length) {
|
|
353
|
+
continue;
|
|
354
|
+
}
|
|
355
|
+
out.push({ ...m, toolResults: [] });
|
|
356
|
+
} else {
|
|
357
|
+
out.push(m);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
return out;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export {
|
|
364
|
+
LLMError,
|
|
365
|
+
AuthenticationError,
|
|
366
|
+
RateLimitError,
|
|
367
|
+
NetworkError,
|
|
368
|
+
ContextTooLongError,
|
|
369
|
+
ConfigError,
|
|
370
|
+
globalConfigPath,
|
|
371
|
+
THINKING_LEVELS,
|
|
372
|
+
ProviderConfigSchema,
|
|
373
|
+
DEFAULT_THINKING_LEVEL,
|
|
374
|
+
DEFAULT_CONTEXT_WINDOW,
|
|
375
|
+
DEFAULT_MAX_OUTPUT_TOKENS,
|
|
376
|
+
THINKING_BUDGETS,
|
|
377
|
+
isValidThinkingLevel,
|
|
378
|
+
defaultThinkingLevelFor,
|
|
379
|
+
getThinkingLevel,
|
|
380
|
+
thinkingBudgetForLevel,
|
|
381
|
+
toReasoningEffort,
|
|
382
|
+
withProviderDefaults,
|
|
383
|
+
getContextWindow,
|
|
384
|
+
getMaxOutputTokens,
|
|
385
|
+
resolveAPIKey,
|
|
386
|
+
HookConfigSchema,
|
|
387
|
+
forkEnabled,
|
|
388
|
+
loadConfig,
|
|
389
|
+
INTERRUPTED_TOOL_RESULT,
|
|
390
|
+
REJECTED_TOOL_RESULT,
|
|
391
|
+
ensureToolPairing
|
|
392
|
+
};
|