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.
@@ -4080,18 +4080,63 @@ var init_parser = __esm({
4080
4080
  }
4081
4081
  });
4082
4082
 
4083
+ // src/gadgets/typed-gadget.ts
4084
+ function Gadget(config) {
4085
+ class GadgetBase extends AbstractGadget {
4086
+ description = config.description;
4087
+ parameterSchema = config.schema;
4088
+ name = config.name;
4089
+ timeoutMs = config.timeoutMs;
4090
+ examples = config.examples;
4091
+ /**
4092
+ * Type helper property for accessing inferred parameter type.
4093
+ * This is used in the execute method signature: `execute(params: this['params'])`
4094
+ *
4095
+ * Note: This is just for type inference - the actual params in execute()
4096
+ * will be Record<string, unknown> which you can safely cast to this['params']
4097
+ */
4098
+ params;
4099
+ }
4100
+ return GadgetBase;
4101
+ }
4102
+ var init_typed_gadget = __esm({
4103
+ "src/gadgets/typed-gadget.ts"() {
4104
+ "use strict";
4105
+ init_gadget();
4106
+ }
4107
+ });
4108
+
4083
4109
  // src/gadgets/executor.ts
4084
- var GadgetExecutor;
4110
+ function getHostExportsInternal() {
4111
+ if (!cachedHostExports) {
4112
+ cachedHostExports = {
4113
+ AgentBuilder,
4114
+ Gadget,
4115
+ createGadget,
4116
+ ExecutionTree,
4117
+ LLMist,
4118
+ z: import_zod2.z
4119
+ };
4120
+ }
4121
+ return cachedHostExports;
4122
+ }
4123
+ var import_zod2, cachedHostExports, GadgetExecutor;
4085
4124
  var init_executor = __esm({
4086
4125
  "src/gadgets/executor.ts"() {
4087
4126
  "use strict";
4127
+ import_zod2 = require("zod");
4128
+ init_builder();
4129
+ init_client();
4088
4130
  init_constants();
4131
+ init_execution_tree();
4089
4132
  init_logger();
4090
4133
  init_block_params();
4091
4134
  init_cost_reporting_client();
4135
+ init_create_gadget();
4092
4136
  init_error_formatter();
4093
4137
  init_exceptions();
4094
4138
  init_parser();
4139
+ init_typed_gadget();
4095
4140
  GadgetExecutor = class {
4096
4141
  constructor(registry, requestHumanInput, logger, defaultGadgetTimeoutMs, errorFormatterOptions, client, mediaStore, agentConfig, subagentConfig, onSubagentEvent, tree, parentNodeId, baseDepth) {
4097
4142
  this.registry = registry;
@@ -4264,7 +4309,9 @@ var init_executor = __esm({
4264
4309
  // Tree context for subagent support - use gadget's own node ID
4265
4310
  tree: this.tree,
4266
4311
  nodeId: gadgetNodeId,
4267
- depth: gadgetDepth
4312
+ depth: gadgetDepth,
4313
+ // Host exports for external gadgets to use host's llmist classes
4314
+ hostExports: getHostExportsInternal()
4268
4315
  };
4269
4316
  let rawResult;
4270
4317
  if (timeoutMs && timeoutMs > 0) {