llmist 6.1.0 → 6.2.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.
@@ -4144,18 +4144,63 @@ var init_parser = __esm({
4144
4144
  }
4145
4145
  });
4146
4146
 
4147
+ // src/gadgets/typed-gadget.ts
4148
+ function Gadget(config) {
4149
+ class GadgetBase extends AbstractGadget {
4150
+ description = config.description;
4151
+ parameterSchema = config.schema;
4152
+ name = config.name;
4153
+ timeoutMs = config.timeoutMs;
4154
+ examples = config.examples;
4155
+ /**
4156
+ * Type helper property for accessing inferred parameter type.
4157
+ * This is used in the execute method signature: `execute(params: this['params'])`
4158
+ *
4159
+ * Note: This is just for type inference - the actual params in execute()
4160
+ * will be Record<string, unknown> which you can safely cast to this['params']
4161
+ */
4162
+ params;
4163
+ }
4164
+ return GadgetBase;
4165
+ }
4166
+ var init_typed_gadget = __esm({
4167
+ "src/gadgets/typed-gadget.ts"() {
4168
+ "use strict";
4169
+ init_gadget();
4170
+ }
4171
+ });
4172
+
4147
4173
  // src/gadgets/executor.ts
4148
- var GadgetExecutor;
4174
+ import { z as z4 } from "zod";
4175
+ function getHostExportsInternal() {
4176
+ if (!cachedHostExports) {
4177
+ cachedHostExports = {
4178
+ AgentBuilder,
4179
+ Gadget,
4180
+ createGadget,
4181
+ ExecutionTree,
4182
+ LLMist,
4183
+ z: z4
4184
+ };
4185
+ }
4186
+ return cachedHostExports;
4187
+ }
4188
+ var cachedHostExports, GadgetExecutor;
4149
4189
  var init_executor = __esm({
4150
4190
  "src/gadgets/executor.ts"() {
4151
4191
  "use strict";
4192
+ init_builder();
4193
+ init_client();
4152
4194
  init_constants();
4195
+ init_execution_tree();
4153
4196
  init_logger();
4154
4197
  init_block_params();
4155
4198
  init_cost_reporting_client();
4199
+ init_create_gadget();
4156
4200
  init_error_formatter();
4157
4201
  init_exceptions();
4158
4202
  init_parser();
4203
+ init_typed_gadget();
4159
4204
  GadgetExecutor = class {
4160
4205
  constructor(registry, requestHumanInput, logger, defaultGadgetTimeoutMs, errorFormatterOptions, client, mediaStore, agentConfig, subagentConfig, onSubagentEvent, tree, parentNodeId, baseDepth) {
4161
4206
  this.registry = registry;
@@ -4328,7 +4373,9 @@ var init_executor = __esm({
4328
4373
  // Tree context for subagent support - use gadget's own node ID
4329
4374
  tree: this.tree,
4330
4375
  nodeId: gadgetNodeId,
4331
- depth: gadgetDepth
4376
+ depth: gadgetDepth,
4377
+ // Host exports for external gadgets to use host's llmist classes
4378
+ hostExports: getHostExportsInternal()
4332
4379
  };
4333
4380
  let rawResult;
4334
4381
  if (timeoutMs && timeoutMs > 0) {
@@ -12222,12 +12269,6 @@ export {
12222
12269
  init_event_handlers,
12223
12270
  GadgetOutputStore,
12224
12271
  init_gadget_output_store,
12225
- GadgetCallParser,
12226
- init_parser,
12227
- GadgetExecutor,
12228
- init_executor,
12229
- StreamProcessor,
12230
- init_stream_processor,
12231
12272
  FALLBACK_CHARS_PER_TOKEN,
12232
12273
  init_constants2 as init_constants,
12233
12274
  AnthropicMessagesProvider,
@@ -12250,6 +12291,14 @@ export {
12250
12291
  init_options,
12251
12292
  LLMist,
12252
12293
  init_client,
12294
+ GadgetCallParser,
12295
+ init_parser,
12296
+ Gadget,
12297
+ init_typed_gadget,
12298
+ GadgetExecutor,
12299
+ init_executor,
12300
+ StreamProcessor,
12301
+ init_stream_processor,
12253
12302
  AgentBuilder,
12254
12303
  init_builder,
12255
12304
  validateAndApplyDefaults,
@@ -12294,4 +12343,4 @@ export {
12294
12343
  createEmptyStream,
12295
12344
  createErrorStream
12296
12345
  };
12297
- //# sourceMappingURL=chunk-VAJLPRJ6.js.map
12346
+ //# sourceMappingURL=chunk-36YSBSGB.js.map