@theokit/sdk 4.22.0 → 4.23.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.
Files changed (58) hide show
  1. package/dist/compaction.cjs +31 -0
  2. package/dist/compaction.cjs.map +1 -1
  3. package/dist/compaction.d.cts +79 -0
  4. package/dist/compaction.d.ts +79 -0
  5. package/dist/compaction.js +28 -1
  6. package/dist/compaction.js.map +1 -1
  7. package/dist/{cron-Bhdyjl0B.d.ts → cron-B_NkE_VM.d.ts} +15 -1
  8. package/dist/{cron-M2Xz7lq2.d.cts → cron-x3muPNgg.d.cts} +15 -1
  9. package/dist/cron.cjs +461 -332
  10. package/dist/cron.cjs.map +1 -1
  11. package/dist/cron.d.cts +2 -2
  12. package/dist/cron.d.ts +2 -2
  13. package/dist/cron.js +461 -332
  14. package/dist/cron.js.map +1 -1
  15. package/dist/{errors-gE8612p9.d.cts → errors-BdL-buYn.d.cts} +1 -1
  16. package/dist/{errors-CG2RpeW-.d.ts → errors-DHZtSNnj.d.ts} +1 -1
  17. package/dist/errors.d.cts +2 -2
  18. package/dist/eval.cjs +461 -332
  19. package/dist/eval.cjs.map +1 -1
  20. package/dist/eval.js +461 -332
  21. package/dist/eval.js.map +1 -1
  22. package/dist/index.cjs +634 -503
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +21 -12
  25. package/dist/index.d.ts +21 -12
  26. package/dist/index.js +634 -503
  27. package/dist/index.js.map +1 -1
  28. package/dist/internal/global-singleton.d.ts +13 -0
  29. package/dist/internal/llm/openai-messages.d.ts +2 -0
  30. package/dist/internal/local-agent/mcp-pool.d.ts +41 -0
  31. package/dist/internal/local-agent/real-local-run.d.ts +2 -0
  32. package/dist/internal/persistence/index.cjs +3 -1
  33. package/dist/internal/persistence/index.cjs.map +1 -1
  34. package/dist/internal/persistence/index.js +3 -1
  35. package/dist/internal/persistence/index.js.map +1 -1
  36. package/dist/internal/providers/registry.d.ts +1 -0
  37. package/dist/internal/runtime/lifecycle/context-budget-event.d.ts +25 -0
  38. package/dist/internal/runtime/lifecycle/goal-marker.d.ts +13 -0
  39. package/dist/internal/runtime/lifecycle/run-until.d.ts +0 -1
  40. package/dist/internal/session/agent-session.d.ts +1 -1
  41. package/dist/internal/session/session-cache.d.ts +20 -0
  42. package/dist/models.cjs +11 -15
  43. package/dist/models.cjs.map +1 -1
  44. package/dist/models.js +11 -15
  45. package/dist/models.js.map +1 -1
  46. package/dist/persistence.cjs +3 -1
  47. package/dist/persistence.cjs.map +1 -1
  48. package/dist/persistence.js +3 -1
  49. package/dist/persistence.js.map +1 -1
  50. package/dist/provider-catalog.json +144 -469
  51. package/dist/{run-DFM1H2jW.d.cts → run-OJbGyweZ.d.cts} +20 -1
  52. package/dist/{run-DFM1H2jW.d.ts → run-OJbGyweZ.d.ts} +20 -1
  53. package/dist/types/agent.d.ts +14 -0
  54. package/dist/types/run-events.d.ts +20 -1
  55. package/dist/workflow.cjs.map +1 -1
  56. package/dist/workflow.js.map +1 -1
  57. package/package.json +2 -2
  58. package/dist/goal-loop.d.ts +0 -35
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@theokit/sdk",
3
- "version": "4.22.0",
4
- "description": "TypeScript SDK for the Theo agent harness \u2014 same surface, local or cloud.",
3
+ "version": "4.23.0",
4
+ "description": "TypeScript SDK for the Theo agent harness same surface, local or cloud.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/usetheodev/theokit-sdk#readme",
7
7
  "bugs": "https://github.com/usetheodev/theokit-sdk/issues",
@@ -1,35 +0,0 @@
1
- /**
2
- * M56 (agent-builder goal transparency) — PUBLIC goal-loop driver for CUSTOM agent surfaces.
3
- *
4
- * `LocalAgent.runUntil` binds the goal loop to a registered local agent. Surfaces that route turns
5
- * through their OWN transport (e.g. a TUI store facade, so every goal turn renders in the same
6
- * timeline as a manual turn) need the SAME loop over a minimal `send → wait` shape. This export
7
- * gives them exactly that: the canonical `runUntilImpl` (judge + continuation + token budget +
8
- * Codex states) with the default judge wired from the DI registry.
9
- *
10
- * @public
11
- */
12
- import type { RunUntilDeps } from "./internal/runtime/lifecycle/run-until.js";
13
- /**
14
- * Stable marker on the FIRST LINE of every goal-continuation prompt. Surfaces detect it to render the
15
- * turn collapsed, exclude it from backtrack windows, and skip it in compaction preservation.
16
- */
17
- export declare const GOAL_CONTINUATION_MARKER = "[[theokit:goal-continuation]]";
18
- import type { GoalEvent, GoalOptions, GoalResult } from "./types/goal-events.js";
19
- /** The minimal surface the goal loop drives — anything that can send a prompt and wait for it. */
20
- export interface GoalLoopAgent {
21
- send(prompt: string): Promise<{
22
- wait(): Promise<{
23
- result?: string;
24
- usage?: {
25
- totalTokens?: number;
26
- };
27
- }>;
28
- }>;
29
- }
30
- /**
31
- * Run the goal-driven loop (`send → judge → continuation`) over ANY `send → wait` surface.
32
- * Identical semantics to `Agent.runUntil` (ADRs D115-D121 + M55 token budget / states).
33
- * `depsOverride` is a test seam for injecting a fake judge.
34
- */
35
- export declare function runGoalLoop(agent: GoalLoopAgent, goal: string, options?: GoalOptions, depsOverride?: RunUntilDeps): AsyncGenerator<GoalEvent, GoalResult, void>;