llmist 0.1.1
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/LICENSE +21 -0
- package/README.md +394 -0
- package/dist/chunk-DCW33WV7.js +901 -0
- package/dist/chunk-DCW33WV7.js.map +1 -0
- package/dist/chunk-JEBGLCDW.js +22 -0
- package/dist/chunk-JEBGLCDW.js.map +1 -0
- package/dist/chunk-TP7HE3MN.js +4450 -0
- package/dist/chunk-TP7HE3MN.js.map +1 -0
- package/dist/cli.cjs +5333 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +987 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.cjs +5511 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1101 -0
- package/dist/index.d.ts +1101 -0
- package/dist/index.js +421 -0
- package/dist/index.js.map +1 -0
- package/dist/mock-stream-D4erlo7B.d.cts +2602 -0
- package/dist/mock-stream-D4erlo7B.d.ts +2602 -0
- package/dist/testing/index.cjs +5260 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +274 -0
- package/dist/testing/index.d.ts +274 -0
- package/dist/testing/index.js +34 -0
- package/dist/testing/index.js.map +1 -0
- package/package.json +102 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createGadget
|
|
3
|
+
} from "./chunk-JEBGLCDW.js";
|
|
4
|
+
import {
|
|
5
|
+
MockBuilder,
|
|
6
|
+
MockManager,
|
|
7
|
+
MockProviderAdapter,
|
|
8
|
+
createMockAdapter,
|
|
9
|
+
createMockClient,
|
|
10
|
+
createMockStream,
|
|
11
|
+
createTextMockStream,
|
|
12
|
+
getMockManager,
|
|
13
|
+
mockLLM,
|
|
14
|
+
validateAndApplyDefaults,
|
|
15
|
+
validateGadgetParams
|
|
16
|
+
} from "./chunk-DCW33WV7.js";
|
|
17
|
+
import {
|
|
18
|
+
AgentBuilder,
|
|
19
|
+
AnthropicMessagesProvider,
|
|
20
|
+
BaseGadget,
|
|
21
|
+
BreakLoopException,
|
|
22
|
+
ConversationManager,
|
|
23
|
+
DEFAULT_PROMPTS,
|
|
24
|
+
GadgetExecutor,
|
|
25
|
+
GadgetRegistry,
|
|
26
|
+
GeminiGenerativeProvider,
|
|
27
|
+
HumanInputException,
|
|
28
|
+
LLMMessageBuilder,
|
|
29
|
+
LLMist,
|
|
30
|
+
MODEL_ALIASES,
|
|
31
|
+
ModelIdentifierParser,
|
|
32
|
+
ModelRegistry,
|
|
33
|
+
OpenAIChatProvider,
|
|
34
|
+
StreamParser,
|
|
35
|
+
StreamProcessor,
|
|
36
|
+
collectEvents,
|
|
37
|
+
collectText,
|
|
38
|
+
complete,
|
|
39
|
+
createAnthropicProviderFromEnv,
|
|
40
|
+
createGeminiProviderFromEnv,
|
|
41
|
+
createLogger,
|
|
42
|
+
createOpenAIProviderFromEnv,
|
|
43
|
+
defaultLogger,
|
|
44
|
+
discoverProviderAdapters,
|
|
45
|
+
getModelId,
|
|
46
|
+
getProvider,
|
|
47
|
+
hasProviderPrefix,
|
|
48
|
+
init_anthropic,
|
|
49
|
+
init_builder,
|
|
50
|
+
init_client,
|
|
51
|
+
init_conversation_manager,
|
|
52
|
+
init_discovery,
|
|
53
|
+
init_event_handlers,
|
|
54
|
+
init_exceptions,
|
|
55
|
+
init_executor,
|
|
56
|
+
init_gemini,
|
|
57
|
+
init_logger,
|
|
58
|
+
init_messages,
|
|
59
|
+
init_model_registry,
|
|
60
|
+
init_model_shortcuts,
|
|
61
|
+
init_openai,
|
|
62
|
+
init_options,
|
|
63
|
+
init_parser,
|
|
64
|
+
init_prompt_config,
|
|
65
|
+
init_quick_methods,
|
|
66
|
+
init_registry,
|
|
67
|
+
init_stream_processor,
|
|
68
|
+
resolveModel,
|
|
69
|
+
resolvePromptTemplate,
|
|
70
|
+
resolveRulesTemplate,
|
|
71
|
+
runWithHandlers,
|
|
72
|
+
stream
|
|
73
|
+
} from "./chunk-TP7HE3MN.js";
|
|
74
|
+
|
|
75
|
+
// src/index.ts
|
|
76
|
+
init_builder();
|
|
77
|
+
init_event_handlers();
|
|
78
|
+
import { z } from "zod";
|
|
79
|
+
|
|
80
|
+
// src/agent/hook-presets.ts
|
|
81
|
+
var HookPresets = class _HookPresets {
|
|
82
|
+
/**
|
|
83
|
+
* Preset: Basic logging of all events.
|
|
84
|
+
*
|
|
85
|
+
* Logs LLM calls and gadget executions to console.
|
|
86
|
+
*
|
|
87
|
+
* @param options - Logging options
|
|
88
|
+
* @returns Hook configuration
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```typescript
|
|
92
|
+
* .withHooks(HookPresets.logging())
|
|
93
|
+
* .withHooks(HookPresets.logging({ verbose: true }))
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
static logging(options = {}) {
|
|
97
|
+
return {
|
|
98
|
+
observers: {
|
|
99
|
+
onLLMCallStart: async (ctx) => {
|
|
100
|
+
console.log(`[LLM] Starting call (iteration ${ctx.iteration})`);
|
|
101
|
+
},
|
|
102
|
+
onLLMCallComplete: async (ctx) => {
|
|
103
|
+
const tokens = ctx.usage?.totalTokens ?? "unknown";
|
|
104
|
+
console.log(`[LLM] Completed (tokens: ${tokens})`);
|
|
105
|
+
if (options.verbose && ctx.finalMessage) {
|
|
106
|
+
console.log(`[LLM] Response: ${ctx.finalMessage}`);
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
onGadgetExecutionStart: async (ctx) => {
|
|
110
|
+
console.log(`[GADGET] Executing ${ctx.gadgetName}`);
|
|
111
|
+
if (options.verbose) {
|
|
112
|
+
console.log(`[GADGET] Parameters:`, JSON.stringify(ctx.parameters, null, 2));
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
onGadgetExecutionComplete: async (ctx) => {
|
|
116
|
+
console.log(`[GADGET] Completed ${ctx.gadgetName}`);
|
|
117
|
+
if (options.verbose) {
|
|
118
|
+
const display = ctx.error ?? ctx.finalResult ?? "(no result)";
|
|
119
|
+
console.log(`[GADGET] Result: ${display}`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Preset: Performance timing for all operations.
|
|
127
|
+
*
|
|
128
|
+
* Measures and logs execution time for LLM calls and gadgets.
|
|
129
|
+
*
|
|
130
|
+
* @returns Hook configuration
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```typescript
|
|
134
|
+
* .withHooks(HookPresets.timing())
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
static timing() {
|
|
138
|
+
const timings = /* @__PURE__ */ new Map();
|
|
139
|
+
return {
|
|
140
|
+
observers: {
|
|
141
|
+
onLLMCallStart: async (ctx) => {
|
|
142
|
+
timings.set(`llm-${ctx.iteration}`, Date.now());
|
|
143
|
+
},
|
|
144
|
+
onLLMCallComplete: async (ctx) => {
|
|
145
|
+
const start = timings.get(`llm-${ctx.iteration}`);
|
|
146
|
+
if (start) {
|
|
147
|
+
const duration = Date.now() - start;
|
|
148
|
+
console.log(`\u23F1\uFE0F LLM call took ${duration}ms`);
|
|
149
|
+
timings.delete(`llm-${ctx.iteration}`);
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
onGadgetExecutionStart: async (ctx) => {
|
|
153
|
+
const key = `gadget-${ctx.gadgetName}-${Date.now()}`;
|
|
154
|
+
timings.set(key, Date.now());
|
|
155
|
+
ctx._timingKey = key;
|
|
156
|
+
},
|
|
157
|
+
onGadgetExecutionComplete: async (ctx) => {
|
|
158
|
+
const key = ctx._timingKey;
|
|
159
|
+
if (key) {
|
|
160
|
+
const start = timings.get(key);
|
|
161
|
+
if (start) {
|
|
162
|
+
const duration = Date.now() - start;
|
|
163
|
+
console.log(`\u23F1\uFE0F Gadget ${ctx.gadgetName} took ${duration}ms`);
|
|
164
|
+
timings.delete(key);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Preset: Token usage tracking.
|
|
173
|
+
*
|
|
174
|
+
* Tracks and logs cumulative token usage across all LLM calls.
|
|
175
|
+
*
|
|
176
|
+
* @returns Hook configuration
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```typescript
|
|
180
|
+
* .withHooks(HookPresets.tokenTracking())
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
static tokenTracking() {
|
|
184
|
+
let totalTokens = 0;
|
|
185
|
+
let totalCalls = 0;
|
|
186
|
+
return {
|
|
187
|
+
observers: {
|
|
188
|
+
onLLMCallComplete: async (ctx) => {
|
|
189
|
+
totalCalls++;
|
|
190
|
+
if (ctx.usage?.totalTokens) {
|
|
191
|
+
totalTokens += ctx.usage.totalTokens;
|
|
192
|
+
console.log(`\u{1F4CA} Tokens this call: ${ctx.usage.totalTokens}`);
|
|
193
|
+
console.log(`\u{1F4CA} Total tokens: ${totalTokens} (across ${totalCalls} calls)`);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Preset: Error logging.
|
|
201
|
+
*
|
|
202
|
+
* Logs detailed error information for debugging.
|
|
203
|
+
*
|
|
204
|
+
* @returns Hook configuration
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* ```typescript
|
|
208
|
+
* .withHooks(HookPresets.errorLogging())
|
|
209
|
+
* ```
|
|
210
|
+
*/
|
|
211
|
+
static errorLogging() {
|
|
212
|
+
return {
|
|
213
|
+
observers: {
|
|
214
|
+
onLLMCallError: async (ctx) => {
|
|
215
|
+
console.error(`\u274C LLM Error (iteration ${ctx.iteration}):`, ctx.error.message);
|
|
216
|
+
console.error(` Model: ${ctx.options.model}`);
|
|
217
|
+
console.error(` Recovered: ${ctx.recovered}`);
|
|
218
|
+
},
|
|
219
|
+
onGadgetExecutionComplete: async (ctx) => {
|
|
220
|
+
if (ctx.error) {
|
|
221
|
+
console.error(`\u274C Gadget Error: ${ctx.gadgetName}`);
|
|
222
|
+
console.error(` Error: ${ctx.error}`);
|
|
223
|
+
console.error(` Parameters:`, JSON.stringify(ctx.parameters, null, 2));
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Preset: Silent (no output).
|
|
231
|
+
*
|
|
232
|
+
* Useful for testing or when you want complete control.
|
|
233
|
+
*
|
|
234
|
+
* @returns Empty hook configuration
|
|
235
|
+
*
|
|
236
|
+
* @example
|
|
237
|
+
* ```typescript
|
|
238
|
+
* .withHooks(HookPresets.silent())
|
|
239
|
+
* ```
|
|
240
|
+
*/
|
|
241
|
+
static silent() {
|
|
242
|
+
return {};
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Merge multiple hook configurations.
|
|
246
|
+
*
|
|
247
|
+
* Combines hook presets or custom configurations into a single object.
|
|
248
|
+
* When multiple hooks target the same lifecycle event, they are composed
|
|
249
|
+
* to run sequentially (all handlers will execute).
|
|
250
|
+
*
|
|
251
|
+
* @param hookSets - Array of hook configurations to merge
|
|
252
|
+
* @returns Merged hook configuration with composed handlers
|
|
253
|
+
*
|
|
254
|
+
* @example
|
|
255
|
+
* ```typescript
|
|
256
|
+
* .withHooks(HookPresets.merge(
|
|
257
|
+
* HookPresets.logging({ verbose: true }),
|
|
258
|
+
* HookPresets.timing(),
|
|
259
|
+
* HookPresets.tokenTracking(),
|
|
260
|
+
* {
|
|
261
|
+
* // Custom hook
|
|
262
|
+
* observers: {
|
|
263
|
+
* onLLMCallComplete: async (ctx) => {
|
|
264
|
+
* saveToDatabase(ctx);
|
|
265
|
+
* }
|
|
266
|
+
* }
|
|
267
|
+
* }
|
|
268
|
+
* ))
|
|
269
|
+
* // All onLLMCallComplete handlers from logging, timing, tokenTracking,
|
|
270
|
+
* // and the custom hook will execute in order
|
|
271
|
+
* ```
|
|
272
|
+
*/
|
|
273
|
+
static merge(...hookSets) {
|
|
274
|
+
const merged = {
|
|
275
|
+
observers: {},
|
|
276
|
+
interceptors: {},
|
|
277
|
+
controllers: {}
|
|
278
|
+
};
|
|
279
|
+
for (const hooks of hookSets) {
|
|
280
|
+
if (hooks.observers) {
|
|
281
|
+
for (const [key, handler] of Object.entries(hooks.observers)) {
|
|
282
|
+
const typedKey = key;
|
|
283
|
+
if (merged.observers[typedKey]) {
|
|
284
|
+
const existing = merged.observers[typedKey];
|
|
285
|
+
merged.observers[typedKey] = async (ctx) => {
|
|
286
|
+
await existing(ctx);
|
|
287
|
+
await handler(ctx);
|
|
288
|
+
};
|
|
289
|
+
} else {
|
|
290
|
+
merged.observers[typedKey] = handler;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
if (hooks.interceptors) {
|
|
295
|
+
Object.assign(merged.interceptors, hooks.interceptors);
|
|
296
|
+
}
|
|
297
|
+
if (hooks.controllers) {
|
|
298
|
+
Object.assign(merged.controllers, hooks.controllers);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
return merged;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Preset: Complete monitoring suite.
|
|
305
|
+
*
|
|
306
|
+
* Combines logging, timing, and token tracking.
|
|
307
|
+
*
|
|
308
|
+
* @param options - Options for monitoring
|
|
309
|
+
* @returns Merged hook configuration
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* ```typescript
|
|
313
|
+
* .withHooks(HookPresets.monitoring())
|
|
314
|
+
* .withHooks(HookPresets.monitoring({ verbose: true }))
|
|
315
|
+
* ```
|
|
316
|
+
*/
|
|
317
|
+
static monitoring(options = {}) {
|
|
318
|
+
return _HookPresets.merge(
|
|
319
|
+
_HookPresets.logging(options),
|
|
320
|
+
_HookPresets.timing(),
|
|
321
|
+
_HookPresets.tokenTracking(),
|
|
322
|
+
_HookPresets.errorLogging()
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
// src/agent/index.ts
|
|
328
|
+
init_conversation_manager();
|
|
329
|
+
init_stream_processor();
|
|
330
|
+
|
|
331
|
+
// src/index.ts
|
|
332
|
+
init_client();
|
|
333
|
+
init_messages();
|
|
334
|
+
init_model_registry();
|
|
335
|
+
init_model_shortcuts();
|
|
336
|
+
init_options();
|
|
337
|
+
init_prompt_config();
|
|
338
|
+
init_quick_methods();
|
|
339
|
+
init_exceptions();
|
|
340
|
+
init_executor();
|
|
341
|
+
init_parser();
|
|
342
|
+
init_registry();
|
|
343
|
+
|
|
344
|
+
// src/gadgets/typed-gadget.ts
|
|
345
|
+
function Gadget(config) {
|
|
346
|
+
class GadgetBase extends BaseGadget {
|
|
347
|
+
description = config.description;
|
|
348
|
+
parameterSchema = config.schema;
|
|
349
|
+
name = config.name;
|
|
350
|
+
timeoutMs = config.timeoutMs;
|
|
351
|
+
/**
|
|
352
|
+
* Type helper property for accessing inferred parameter type.
|
|
353
|
+
* This is used in the execute method signature: `execute(params: this['params'])`
|
|
354
|
+
*
|
|
355
|
+
* Note: This is just for type inference - the actual params in execute()
|
|
356
|
+
* will be Record<string, unknown> which you can safely cast to this['params']
|
|
357
|
+
*/
|
|
358
|
+
params;
|
|
359
|
+
}
|
|
360
|
+
return GadgetBase;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// src/index.ts
|
|
364
|
+
init_logger();
|
|
365
|
+
init_anthropic();
|
|
366
|
+
init_discovery();
|
|
367
|
+
init_gemini();
|
|
368
|
+
init_openai();
|
|
369
|
+
export {
|
|
370
|
+
AgentBuilder,
|
|
371
|
+
AnthropicMessagesProvider,
|
|
372
|
+
BaseGadget,
|
|
373
|
+
BreakLoopException,
|
|
374
|
+
ConversationManager,
|
|
375
|
+
DEFAULT_PROMPTS,
|
|
376
|
+
Gadget,
|
|
377
|
+
GadgetExecutor,
|
|
378
|
+
GadgetRegistry,
|
|
379
|
+
GeminiGenerativeProvider,
|
|
380
|
+
HookPresets,
|
|
381
|
+
HumanInputException,
|
|
382
|
+
LLMMessageBuilder,
|
|
383
|
+
LLMist,
|
|
384
|
+
MODEL_ALIASES,
|
|
385
|
+
MockBuilder,
|
|
386
|
+
MockManager,
|
|
387
|
+
MockProviderAdapter,
|
|
388
|
+
ModelIdentifierParser,
|
|
389
|
+
ModelRegistry,
|
|
390
|
+
OpenAIChatProvider,
|
|
391
|
+
StreamParser,
|
|
392
|
+
StreamProcessor,
|
|
393
|
+
collectEvents,
|
|
394
|
+
collectText,
|
|
395
|
+
complete,
|
|
396
|
+
createAnthropicProviderFromEnv,
|
|
397
|
+
createGadget,
|
|
398
|
+
createGeminiProviderFromEnv,
|
|
399
|
+
createLogger,
|
|
400
|
+
createMockAdapter,
|
|
401
|
+
createMockClient,
|
|
402
|
+
createMockStream,
|
|
403
|
+
createOpenAIProviderFromEnv,
|
|
404
|
+
createTextMockStream,
|
|
405
|
+
defaultLogger,
|
|
406
|
+
discoverProviderAdapters,
|
|
407
|
+
getMockManager,
|
|
408
|
+
getModelId,
|
|
409
|
+
getProvider,
|
|
410
|
+
hasProviderPrefix,
|
|
411
|
+
mockLLM,
|
|
412
|
+
resolveModel,
|
|
413
|
+
resolvePromptTemplate,
|
|
414
|
+
resolveRulesTemplate,
|
|
415
|
+
runWithHandlers,
|
|
416
|
+
stream,
|
|
417
|
+
validateAndApplyDefaults,
|
|
418
|
+
validateGadgetParams,
|
|
419
|
+
z
|
|
420
|
+
};
|
|
421
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/agent/hook-presets.ts","../src/agent/index.ts","../src/gadgets/typed-gadget.ts"],"sourcesContent":["// Re-export Zod's z for schema definitions\n// Using llmist's z ensures .describe() metadata is preserved in JSON schemas\nexport { z } from \"zod\";\n// Syntactic sugar: Agent builder and event handlers\nexport type { HistoryMessage } from \"./agent/builder.js\";\nexport { AgentBuilder } from \"./agent/builder.js\";\nexport type { EventHandlers } from \"./agent/event-handlers.js\";\nexport { collectEvents, collectText, runWithHandlers } from \"./agent/event-handlers.js\";\n// Syntactic sugar: Hook presets\nexport type { LoggingOptions } from \"./agent/hook-presets.js\";\nexport { HookPresets } from \"./agent/hook-presets.js\";\n// Agent infrastructure\n// New clean hooks system\nexport type {\n AfterGadgetExecutionAction,\n AfterGadgetExecutionControllerContext,\n AfterLLMCallAction,\n AfterLLMCallControllerContext,\n AfterLLMErrorAction,\n AgentHooks,\n AgentOptions,\n BeforeGadgetExecutionAction,\n BeforeLLMCallAction,\n // Interceptor contexts\n ChunkInterceptorContext,\n Controllers,\n GadgetExecutionControllerContext,\n GadgetParameterInterceptorContext,\n GadgetResultInterceptorContext,\n IConversationManager,\n Interceptors,\n // Controller contexts and actions\n LLMCallControllerContext,\n LLMErrorControllerContext,\n MessageInterceptorContext,\n ObserveChunkContext,\n ObserveGadgetCompleteContext,\n ObserveGadgetStartContext,\n // Observer contexts\n ObserveLLMCallContext,\n ObserveLLMCompleteContext,\n ObserveLLMErrorContext,\n Observers,\n StreamProcessingResult,\n StreamProcessorOptions,\n} from \"./agent/index.js\";\nexport { ConversationManager, StreamProcessor } from \"./agent/index.js\";\nexport type { LLMistOptions } from \"./core/client.js\";\nexport { LLMist } from \"./core/client.js\";\nexport type { LLMMessage, LLMRole } from \"./core/messages.js\";\nexport { LLMMessageBuilder } from \"./core/messages.js\";\n// Model catalog\nexport type {\n CostEstimate,\n ModelFeatures,\n ModelLimits,\n ModelPricing,\n ModelSpec,\n} from \"./core/model-catalog.js\";\nexport { ModelRegistry } from \"./core/model-registry.js\";\n\n// Syntactic sugar: Model shortcuts and quick methods\nexport {\n getModelId,\n getProvider,\n hasProviderPrefix,\n MODEL_ALIASES,\n resolveModel,\n} from \"./core/model-shortcuts.js\";\nexport type {\n LLMGenerationOptions,\n LLMStream,\n LLMStreamChunk,\n ModelDescriptor,\n ProviderIdentifier,\n TokenUsage,\n} from \"./core/options.js\";\nexport { ModelIdentifierParser } from \"./core/options.js\";\nexport type { PromptConfig, PromptContext, PromptTemplate } from \"./core/prompt-config.js\";\nexport {\n DEFAULT_PROMPTS,\n resolvePromptTemplate,\n resolveRulesTemplate,\n} from \"./core/prompt-config.js\";\nexport type { QuickOptions } from \"./core/quick-methods.js\";\nexport { complete, stream } from \"./core/quick-methods.js\";\nexport type { CreateGadgetConfig } from \"./gadgets/create-gadget.js\";\nexport { createGadget } from \"./gadgets/create-gadget.js\";\n// Gadget infrastructure\nexport { BreakLoopException, HumanInputException } from \"./gadgets/exceptions.js\";\nexport { GadgetExecutor } from \"./gadgets/executor.js\";\nexport { BaseGadget } from \"./gadgets/gadget.js\";\nexport { StreamParser } from \"./gadgets/parser.js\";\nexport type { GadgetClass, GadgetOrClass } from \"./gadgets/registry.js\";\nexport { GadgetRegistry } from \"./gadgets/registry.js\";\n\n// Syntactic sugar: Typed gadgets and helpers\nexport type { GadgetConfig } from \"./gadgets/typed-gadget.js\";\nexport { Gadget } from \"./gadgets/typed-gadget.js\";\nexport type {\n GadgetExecutionResult,\n ParsedGadgetCall,\n StreamEvent,\n TextOnlyAction,\n TextOnlyContext,\n TextOnlyCustomHandler,\n TextOnlyGadgetConfig,\n TextOnlyHandler,\n TextOnlyStrategy,\n} from \"./gadgets/types.js\";\nexport type { ValidationIssue, ValidationResult } from \"./gadgets/validation.js\";\nexport { validateAndApplyDefaults, validateGadgetParams } from \"./gadgets/validation.js\";\nexport type { LoggerOptions } from \"./logging/logger.js\";\nexport { createLogger, defaultLogger } from \"./logging/logger.js\";\nexport {\n AnthropicMessagesProvider,\n createAnthropicProviderFromEnv,\n} from \"./providers/anthropic.js\";\nexport { discoverProviderAdapters } from \"./providers/discovery.js\";\nexport { createGeminiProviderFromEnv, GeminiGenerativeProvider } from \"./providers/gemini.js\";\nexport { createOpenAIProviderFromEnv, OpenAIChatProvider } from \"./providers/openai.js\";\nexport type { ProviderAdapter } from \"./providers/provider.js\";\n\n// Testing/Mock infrastructure\nexport type {\n MockMatcher,\n MockMatcherContext,\n MockOptions,\n MockRegistration,\n MockResponse,\n MockStats,\n} from \"./testing/index.js\";\nexport {\n createMockAdapter,\n createMockClient,\n createMockStream,\n createTextMockStream,\n getMockManager,\n MockBuilder,\n MockManager,\n MockProviderAdapter,\n mockLLM,\n} from \"./testing/index.js\";\n","/**\n * Common hook presets for logging, timing, and monitoring.\n *\n * @example\n * ```typescript\n * import { HookPresets } from 'llmist/hooks';\n *\n * const agent = LLMist.createAgent()\n * .withHooks(HookPresets.logging())\n * .ask(\"...\");\n *\n * // Or combine multiple presets\n * const agent = LLMist.createAgent()\n * .withHooks(HookPresets.merge(\n * HookPresets.logging({ verbose: true }),\n * HookPresets.timing(),\n * HookPresets.tokenTracking()\n * ))\n * .ask(\"...\");\n * ```\n */\n\nimport type { AgentHooks } from \"./hooks.js\";\n\n/**\n * Options for logging preset.\n */\nexport interface LoggingOptions {\n /** Include verbose details like parameters and results */\n verbose?: boolean;\n}\n\n/**\n * Common hook presets.\n */\nexport class HookPresets {\n /**\n * Preset: Basic logging of all events.\n *\n * Logs LLM calls and gadget executions to console.\n *\n * @param options - Logging options\n * @returns Hook configuration\n *\n * @example\n * ```typescript\n * .withHooks(HookPresets.logging())\n * .withHooks(HookPresets.logging({ verbose: true }))\n * ```\n */\n static logging(options: LoggingOptions = {}): AgentHooks {\n return {\n observers: {\n onLLMCallStart: async (ctx) => {\n console.log(`[LLM] Starting call (iteration ${ctx.iteration})`);\n },\n onLLMCallComplete: async (ctx) => {\n const tokens = ctx.usage?.totalTokens ?? \"unknown\";\n console.log(`[LLM] Completed (tokens: ${tokens})`);\n if (options.verbose && ctx.finalMessage) {\n console.log(`[LLM] Response: ${ctx.finalMessage}`);\n }\n },\n onGadgetExecutionStart: async (ctx) => {\n console.log(`[GADGET] Executing ${ctx.gadgetName}`);\n if (options.verbose) {\n console.log(`[GADGET] Parameters:`, JSON.stringify(ctx.parameters, null, 2));\n }\n },\n onGadgetExecutionComplete: async (ctx) => {\n console.log(`[GADGET] Completed ${ctx.gadgetName}`);\n if (options.verbose) {\n const display = ctx.error ?? ctx.finalResult ?? \"(no result)\";\n console.log(`[GADGET] Result: ${display}`);\n }\n },\n },\n };\n }\n\n /**\n * Preset: Performance timing for all operations.\n *\n * Measures and logs execution time for LLM calls and gadgets.\n *\n * @returns Hook configuration\n *\n * @example\n * ```typescript\n * .withHooks(HookPresets.timing())\n * ```\n */\n static timing(): AgentHooks {\n const timings = new Map<string, number>();\n\n return {\n observers: {\n onLLMCallStart: async (ctx) => {\n timings.set(`llm-${ctx.iteration}`, Date.now());\n },\n onLLMCallComplete: async (ctx) => {\n const start = timings.get(`llm-${ctx.iteration}`);\n if (start) {\n const duration = Date.now() - start;\n console.log(`⏱️ LLM call took ${duration}ms`);\n timings.delete(`llm-${ctx.iteration}`);\n }\n },\n onGadgetExecutionStart: async (ctx) => {\n const key = `gadget-${ctx.gadgetName}-${Date.now()}`;\n timings.set(key, Date.now());\n // Store key for lookup in complete handler\n (ctx as any)._timingKey = key;\n },\n onGadgetExecutionComplete: async (ctx) => {\n const key = (ctx as any)._timingKey;\n if (key) {\n const start = timings.get(key);\n if (start) {\n const duration = Date.now() - start;\n console.log(`⏱️ Gadget ${ctx.gadgetName} took ${duration}ms`);\n timings.delete(key);\n }\n }\n },\n },\n };\n }\n\n /**\n * Preset: Token usage tracking.\n *\n * Tracks and logs cumulative token usage across all LLM calls.\n *\n * @returns Hook configuration\n *\n * @example\n * ```typescript\n * .withHooks(HookPresets.tokenTracking())\n * ```\n */\n static tokenTracking(): AgentHooks {\n let totalTokens = 0;\n let totalCalls = 0;\n\n return {\n observers: {\n onLLMCallComplete: async (ctx) => {\n totalCalls++;\n if (ctx.usage?.totalTokens) {\n totalTokens += ctx.usage.totalTokens;\n console.log(`📊 Tokens this call: ${ctx.usage.totalTokens}`);\n console.log(`📊 Total tokens: ${totalTokens} (across ${totalCalls} calls)`);\n }\n },\n },\n };\n }\n\n /**\n * Preset: Error logging.\n *\n * Logs detailed error information for debugging.\n *\n * @returns Hook configuration\n *\n * @example\n * ```typescript\n * .withHooks(HookPresets.errorLogging())\n * ```\n */\n static errorLogging(): AgentHooks {\n return {\n observers: {\n onLLMCallError: async (ctx) => {\n console.error(`❌ LLM Error (iteration ${ctx.iteration}):`, ctx.error.message);\n console.error(` Model: ${ctx.options.model}`);\n console.error(` Recovered: ${ctx.recovered}`);\n },\n onGadgetExecutionComplete: async (ctx) => {\n if (ctx.error) {\n console.error(`❌ Gadget Error: ${ctx.gadgetName}`);\n console.error(` Error: ${ctx.error}`);\n console.error(` Parameters:`, JSON.stringify(ctx.parameters, null, 2));\n }\n },\n },\n };\n }\n\n /**\n * Preset: Silent (no output).\n *\n * Useful for testing or when you want complete control.\n *\n * @returns Empty hook configuration\n *\n * @example\n * ```typescript\n * .withHooks(HookPresets.silent())\n * ```\n */\n static silent(): AgentHooks {\n return {};\n }\n\n /**\n * Merge multiple hook configurations.\n *\n * Combines hook presets or custom configurations into a single object.\n * When multiple hooks target the same lifecycle event, they are composed\n * to run sequentially (all handlers will execute).\n *\n * @param hookSets - Array of hook configurations to merge\n * @returns Merged hook configuration with composed handlers\n *\n * @example\n * ```typescript\n * .withHooks(HookPresets.merge(\n * HookPresets.logging({ verbose: true }),\n * HookPresets.timing(),\n * HookPresets.tokenTracking(),\n * {\n * // Custom hook\n * observers: {\n * onLLMCallComplete: async (ctx) => {\n * saveToDatabase(ctx);\n * }\n * }\n * }\n * ))\n * // All onLLMCallComplete handlers from logging, timing, tokenTracking,\n * // and the custom hook will execute in order\n * ```\n */\n static merge(...hookSets: AgentHooks[]): AgentHooks {\n const merged: AgentHooks = {\n observers: {},\n interceptors: {},\n controllers: {},\n };\n\n // Compose observers: run all handlers for the same event\n for (const hooks of hookSets) {\n if (hooks.observers) {\n for (const [key, handler] of Object.entries(hooks.observers)) {\n const typedKey = key as keyof typeof hooks.observers;\n if (merged.observers![typedKey]) {\n // Compose: run both existing and new handler\n const existing = merged.observers![typedKey];\n merged.observers![typedKey] = async (ctx: any) => {\n await existing(ctx);\n await handler(ctx);\n };\n } else {\n merged.observers![typedKey] = handler as any;\n }\n }\n }\n\n // Interceptors: last one wins (complex signatures make composition impractical)\n // Each interceptor has different parameters (chunk, message, parameters, etc.)\n // so we can't meaningfully compose them like we do with observers\n if (hooks.interceptors) {\n Object.assign(merged.interceptors!, hooks.interceptors);\n }\n\n // Controllers: last one wins (can't meaningfully compose boolean returns)\n if (hooks.controllers) {\n Object.assign(merged.controllers!, hooks.controllers);\n }\n }\n\n return merged;\n }\n\n /**\n * Preset: Complete monitoring suite.\n *\n * Combines logging, timing, and token tracking.\n *\n * @param options - Options for monitoring\n * @returns Merged hook configuration\n *\n * @example\n * ```typescript\n * .withHooks(HookPresets.monitoring())\n * .withHooks(HookPresets.monitoring({ verbose: true }))\n * ```\n */\n static monitoring(options: LoggingOptions = {}): AgentHooks {\n return HookPresets.merge(\n HookPresets.logging(options),\n HookPresets.timing(),\n HookPresets.tokenTracking(),\n HookPresets.errorLogging(),\n );\n }\n}\n","/**\n * Agent module - Composable, single-responsibility architecture for LLM agents.\n * This module provides a cleaner alternative to the monolithic AgentLoop.\n */\n\nexport type { AgentOptions } from \"./agent.js\";\nexport { ConversationManager } from \"./conversation-manager.js\";\n// New clean hooks system\nexport type {\n AfterGadgetExecutionAction,\n AfterGadgetExecutionControllerContext,\n AfterLLMCallAction,\n AfterLLMCallControllerContext,\n AfterLLMErrorAction,\n AgentHooks,\n BeforeGadgetExecutionAction,\n BeforeLLMCallAction,\n // Interceptor contexts\n ChunkInterceptorContext,\n Controllers,\n GadgetExecutionControllerContext,\n GadgetParameterInterceptorContext,\n GadgetResultInterceptorContext,\n Interceptors,\n // Controller contexts and actions\n LLMCallControllerContext,\n LLMErrorControllerContext,\n MessageInterceptorContext,\n ObserveChunkContext,\n ObserveGadgetCompleteContext,\n ObserveGadgetStartContext,\n // Observer contexts\n ObserveLLMCallContext,\n ObserveLLMCompleteContext,\n ObserveLLMErrorContext,\n Observers,\n} from \"./hooks.js\";\nexport type { IConversationManager } from \"./interfaces.js\";\n\n// StreamProcessor for advanced use cases\nexport {\n type StreamProcessingResult,\n StreamProcessor,\n type StreamProcessorOptions,\n} from \"./stream-processor.js\";\n","/**\n * Type-safe gadget factory with automatic parameter inference.\n *\n * Gadget eliminates the need for manual type assertions\n * by automatically inferring parameter types from the Zod schema.\n *\n * @example\n * ```typescript\n * class Calculator extends Gadget({\n * description: \"Performs arithmetic operations\",\n * schema: z.object({\n * operation: z.enum([\"add\", \"subtract\"]),\n * a: z.number(),\n * b: z.number(),\n * }),\n * }) {\n * // ✨ params is automatically typed!\n * execute(params: this['params']): string {\n * const { operation, a, b } = params; // All typed!\n * return operation === \"add\" ? String(a + b) : String(a - b);\n * }\n * }\n * ```\n */\n\nimport type { ZodType } from \"zod\";\nimport { BaseGadget } from \"./gadget.js\";\n\n/**\n * Infer the TypeScript type from a Zod schema.\n */\ntype InferSchema<T> = T extends ZodType<infer U> ? U : never;\n\n/**\n * Configuration for creating a typed gadget.\n */\nexport interface GadgetConfig<TSchema extends ZodType> {\n /** Human-readable description of what the gadget does */\n description: string;\n\n /** Zod schema for parameter validation */\n schema: TSchema;\n\n /** Optional custom name (defaults to class name) */\n name?: string;\n\n /** Optional timeout in milliseconds */\n timeoutMs?: number;\n}\n\n/**\n * Factory function to create a typed gadget base class.\n *\n * The returned class automatically infers parameter types from the Zod schema,\n * eliminating the need for manual type assertions in the execute method.\n *\n * @param config - Configuration with description and schema\n * @returns Base class to extend with typed execute method\n *\n * @example\n * ```typescript\n * import { z } from 'zod';\n * import { Gadget } from 'llmist';\n *\n * class Calculator extends Gadget({\n * description: \"Performs arithmetic operations\",\n * schema: z.object({\n * operation: z.enum([\"add\", \"subtract\", \"multiply\", \"divide\"]),\n * a: z.number().describe(\"First number\"),\n * b: z.number().describe(\"Second number\"),\n * }),\n * }) {\n * execute(params: this['params']): string {\n * // params is automatically typed as:\n * // { operation: \"add\" | \"subtract\" | \"multiply\" | \"divide\"; a: number; b: number }\n * const { operation, a, b } = params;\n *\n * switch (operation) {\n * case \"add\": return String(a + b);\n * case \"subtract\": return String(a - b);\n * case \"multiply\": return String(a * b);\n * case \"divide\": return String(a / b);\n * }\n * }\n * }\n * ```\n *\n * @example\n * ```typescript\n * // With async execution\n * class WeatherGadget extends Gadget({\n * description: \"Fetches weather for a city\",\n * schema: z.object({\n * city: z.string().min(1).describe(\"City name\"),\n * }),\n * timeoutMs: 10000,\n * }) {\n * async execute(params: this['params']): Promise<string> {\n * const { city } = params; // Automatically typed as { city: string }\n * const weather = await fetchWeather(city);\n * return `Weather in ${city}: ${weather}`;\n * }\n * }\n * ```\n */\nexport function Gadget<TSchema extends ZodType>(config: GadgetConfig<TSchema>) {\n abstract class GadgetBase extends BaseGadget {\n description = config.description;\n parameterSchema = config.schema;\n name = config.name;\n timeoutMs = config.timeoutMs;\n\n /**\n * Type helper property for accessing inferred parameter type.\n * This is used in the execute method signature: `execute(params: this['params'])`\n *\n * Note: This is just for type inference - the actual params in execute()\n * will be Record<string, unknown> which you can safely cast to this['params']\n */\n readonly params!: InferSchema<TSchema>;\n\n /**\n * Execute the gadget. Subclasses should cast params to this['params'].\n *\n * @param params - Validated parameters from the LLM\n * @returns Result as a string (or Promise<string> for async gadgets)\n *\n * @example\n * ```typescript\n * execute(params: Record<string, unknown>): string {\n * const typed = params as this['params'];\n * // Now 'typed' is fully typed!\n * return String(typed.a + typed.b);\n * }\n * ```\n */\n abstract execute(params: Record<string, unknown>): string | Promise<string>;\n }\n\n return GadgetBase as {\n new (): GadgetBase & { params: InferSchema<TSchema> };\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA;AAEA;AALA,SAAS,SAAS;;;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