@theokit/agents 4.1.0 → 4.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.
package/dist/bridge.js CHANGED
@@ -43,7 +43,7 @@ import {
43
43
  streamAgentUIMessages,
44
44
  toAgentFactory,
45
45
  translateSdkEvent
46
- } from "./chunk-OKG5LRGV.js";
46
+ } from "./chunk-KONWCESJ.js";
47
47
  import "./chunk-7QVYU63E.js";
48
48
  export {
49
49
  AGENT_BRAND,
@@ -3026,6 +3026,26 @@ var AgentRunnerBuilder = class {
3026
3026
  }
3027
3027
  };
3028
3028
 
3029
+ // src/loop/goal-runner.ts
3030
+ import { runGoalLoop } from "@theokit/sdk";
3031
+ var GoalRunner = class {
3032
+ static {
3033
+ __name(this, "GoalRunner");
3034
+ }
3035
+ agent;
3036
+ constructor(agent) {
3037
+ this.agent = agent;
3038
+ }
3039
+ /**
3040
+ * Drive `goal` to completion against the bound agent. Returns the SAME async generator `runGoalLoop`
3041
+ * returns — yielding `GoalEvent`s, resolving a `GoalResult`. `deps` (judge/clock overrides) threads
3042
+ * straight through; a test seam for the judge lives there, exactly as on the free function.
3043
+ */
3044
+ run(goal, options, deps) {
3045
+ return runGoalLoop(this.agent, goal, options, deps);
3046
+ }
3047
+ };
3048
+
3029
3049
  // src/bridge/agent-orchestrator.ts
3030
3050
  function requireApiKey(opts, agentName) {
3031
3051
  const apiKey = opts.apiKey ?? "";
@@ -3477,6 +3497,7 @@ export {
3477
3497
  DelegationError,
3478
3498
  AgentRunner,
3479
3499
  AgentRunnerBuilder,
3500
+ GoalRunner,
3480
3501
  delegate,
3481
3502
  createToolHooksPlugin,
3482
3503
  runWithApiErrorHandling,
@@ -3489,4 +3510,4 @@ export {
3489
3510
  generateAgentManifest,
3490
3511
  agentsPlugin
3491
3512
  };
3492
- //# sourceMappingURL=chunk-OKG5LRGV.js.map
3513
+ //# sourceMappingURL=chunk-KONWCESJ.js.map