@tangle-network/agent-runtime 0.94.0 → 0.94.2

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 (56) hide show
  1. package/dist/agent.js +4 -4
  2. package/dist/{agentic-generator-B8oeE2Yv.d.ts → agentic-generator-B7Cyl6cn.d.ts} +1 -1
  3. package/dist/candidate-execution/index.js +3 -3
  4. package/dist/{chunk-4GBT4WQ6.js → chunk-7ESP4C3O.js} +2 -2
  5. package/dist/{chunk-55P6V5JT.js → chunk-DNK3L7QB.js} +2 -2
  6. package/dist/chunk-JFAGXZKR.js +950 -0
  7. package/dist/chunk-JFAGXZKR.js.map +1 -0
  8. package/dist/{chunk-7I2AOKCI.js → chunk-KHLE3C5G.js} +2 -2
  9. package/dist/{chunk-OO4EK3JB.js → chunk-L4CACVIJ.js} +6 -3
  10. package/dist/chunk-L4CACVIJ.js.map +1 -0
  11. package/dist/{chunk-4E2GM63H.js → chunk-MZH4HORF.js} +2 -2
  12. package/dist/{chunk-RTVVH2KL.js → chunk-OAVVQAOQ.js} +2 -2
  13. package/dist/{chunk-MRYPFDHJ.js → chunk-PV6Q3OKU.js} +3 -3
  14. package/dist/{chunk-FHZHADIM.js → chunk-TTWMSNFZ.js} +64 -10
  15. package/dist/chunk-TTWMSNFZ.js.map +1 -0
  16. package/dist/{chunk-3D2RHC4K.js → chunk-WIPGQ4GT.js} +1 -1
  17. package/dist/{chunk-3D2RHC4K.js.map → chunk-WIPGQ4GT.js.map} +1 -1
  18. package/dist/{chunk-H2D3DCEB.js → chunk-ZLPKMFOE.js} +2 -2
  19. package/dist/{completion-gate-BDkEYB_-.d.ts → completion-gate-Bz7VYs7a.d.ts} +22 -2
  20. package/dist/{coordination-EGoRbbsd.d.ts → coordination-CdU8LyvB.d.ts} +7 -3
  21. package/dist/environment-provider.d.ts +1 -1
  22. package/dist/{improve-ZzTEkpF_.d.ts → improve-mrYmy_1e.d.ts} +2 -2
  23. package/dist/index.d.ts +11 -11
  24. package/dist/index.js +11 -11
  25. package/dist/intelligence.d.ts +3 -3
  26. package/dist/intelligence.js +5 -5
  27. package/dist/knowledge.d.ts +5 -5
  28. package/dist/knowledge.js +4 -4
  29. package/dist/lifecycle.d.ts +3 -3
  30. package/dist/lifecycle.js +2 -2
  31. package/dist/{local-harness-dcD5WTTr.d.ts → local-harness-C2HDGiOY.d.ts} +65 -1
  32. package/dist/{loop-runner-bin-BRXC1RwC.d.ts → loop-runner-bin-BSvtOPMv.d.ts} +2 -2
  33. package/dist/loop-runner-bin.d.ts +5 -5
  34. package/dist/loop-runner-bin.js +5 -5
  35. package/dist/loops.d.ts +11 -11
  36. package/dist/loops.js +4 -4
  37. package/dist/mcp/bin.js +3 -3
  38. package/dist/mcp/index.d.ts +7 -7
  39. package/dist/mcp/index.js +7 -5
  40. package/dist/mcp/index.js.map +1 -1
  41. package/dist/{mcp-serve-verifier-Bg4C3p5S.d.ts → mcp-serve-verifier-C65X30mY.d.ts} +1 -1
  42. package/dist/{supervise-Gmf709kn.d.ts → supervise-U6DTnQu6.d.ts} +3 -3
  43. package/dist/{types-Cg_teUPO.d.ts → types-Bb-CqxJH.d.ts} +3 -0
  44. package/dist/{worktree-fanout-BrB4att3.d.ts → worktree-fanout-DqzIBWMW.d.ts} +16 -13
  45. package/package.json +1 -1
  46. package/dist/chunk-FHZHADIM.js.map +0 -1
  47. package/dist/chunk-OO4EK3JB.js.map +0 -1
  48. package/dist/chunk-PX6SXX3M.js +0 -146
  49. package/dist/chunk-PX6SXX3M.js.map +0 -1
  50. /package/dist/{chunk-4GBT4WQ6.js.map → chunk-7ESP4C3O.js.map} +0 -0
  51. /package/dist/{chunk-55P6V5JT.js.map → chunk-DNK3L7QB.js.map} +0 -0
  52. /package/dist/{chunk-7I2AOKCI.js.map → chunk-KHLE3C5G.js.map} +0 -0
  53. /package/dist/{chunk-4E2GM63H.js.map → chunk-MZH4HORF.js.map} +0 -0
  54. /package/dist/{chunk-RTVVH2KL.js.map → chunk-OAVVQAOQ.js.map} +0 -0
  55. /package/dist/{chunk-MRYPFDHJ.js.map → chunk-PV6Q3OKU.js.map} +0 -0
  56. /package/dist/{chunk-H2D3DCEB.js.map → chunk-ZLPKMFOE.js.map} +0 -0
@@ -200,6 +200,9 @@ interface Budget {
200
200
  interface Spend {
201
201
  iterations: number;
202
202
  tokens: LoopTokenUsage;
203
+ /** Dollar accounting is known unless explicitly false. A false value must not be treated as $0
204
+ * when enforcing a dollar-denominated comparison or limit. */
205
+ usdKnown?: boolean;
203
206
  usd: number;
204
207
  ms: number;
205
208
  }
@@ -1,10 +1,10 @@
1
1
  import { AgentProfile } from '@tangle-network/agent-interface';
2
2
  import { AnalystFinding, DefaultVerdict } from '@tangle-network/agent-eval';
3
- import { d as AgentSpec, e as ExecutorRegistry, B as Budget, A as Agent, f as SpawnJournal, a as ResultBlobStore, g as RootHandle, b as SupervisedResult, N as NodeId, h as Settled, i as Spend, S as Scope, c as Executor } from './types-Cg_teUPO.js';
3
+ import { d as AgentSpec, e as ExecutorRegistry, B as Budget, A as Agent, f as SpawnJournal, a as ResultBlobStore, g as RootHandle, b as SupervisedResult, N as NodeId, h as Settled, i as Spend, S as Scope, c as Executor } from './types-Bb-CqxJH.js';
4
4
  import { R as RuntimeHooks, I as Iteration } from './types-DWA64rbJ.js';
5
5
  import { BackendType } from '@tangle-network/sandbox';
6
- import { W as WorktreeHarnessResult, G as GitRunner, a as WorktreeCheckRunner, D as DeliverableSpec } from './completion-gate-BDkEYB_-.js';
7
- import { L as LocalHarness, r as runLocalHarness } from './local-harness-dcD5WTTr.js';
6
+ import { W as WorktreeHarnessResult, G as GitRunner, a as WorktreeCheckRunner, D as DeliverableSpec } from './completion-gate-Bz7VYs7a.js';
7
+ import { L as LocalHarness, r as runLocalHarness } from './local-harness-C2HDGiOY.js';
8
8
 
9
9
  /**
10
10
  *
@@ -802,12 +802,10 @@ interface CoderCheckConstraints {
802
802
  * result onto the `Executor` port (artifact + spend) and owns the teardown point. The §1.5 payload
803
803
  * (authored systemPrompt + model) reaches the harness inside the core, not here.
804
804
  *
805
- * Token accounting: a harness CLI does not surface usage, so this executor defaults to
806
- * `budgetExempt: true` its spend is NOT metered against the conserved pool and its iterations are
807
- * EXCLUDED from the equal-k arms by construction (mirrors `cliExecutor`). The exemption is an
808
- * explicit, documented `budgetExempt` option rather than a buried hardcode: set it `false` ONLY for
809
- * a harness that genuinely surfaces real token/usd usage to meter into the pool — otherwise the
810
- * executor would meter a fabricated zero, which the no-silent-zeros rule forbids.
805
+ * Token accounting: ordinary harness CLI runs remain `budgetExempt`. Reproducible Codex mode
806
+ * parses the CLI's terminal JSONL usage and is metered by default; an absent usage event fails the
807
+ * run instead of recording fabricated zero tokens. Codex does not report dollar cost, so that
808
+ * channel is explicitly marked unknown on the resulting `Spend`.
811
809
  *
812
810
  * @experimental
813
811
  */
@@ -831,6 +829,12 @@ interface WorktreeCliExecutorOptions {
831
829
  baseRef?: string;
832
830
  /** Wall-clock cap per harness subprocess (ms). Default 5 min (the `runLocalHarness` default). */
833
831
  harnessTimeoutMs?: number;
832
+ /** Run Codex with an ephemeral session, isolated config/instructions, network disabled, and
833
+ * JSONL usage capture. Requires `harness: 'codex'`; metered by default. */
834
+ codexReproducible?: boolean;
835
+ /** Absolute host paths denied to reproducible Codex (for benchmark answer copies, credentials,
836
+ * or other task-specific ambient state). */
837
+ codexReadDeniedPaths?: ReadonlyArray<string>;
834
838
  /**
835
839
  * Shell command run in the live worktree to derive the tests-PASS signal (e.g. `pnpm test`).
836
840
  * Its exit code becomes `artifact.checks.tests.passed`. Omit to skip (no signal derived).
@@ -850,10 +854,9 @@ interface WorktreeCliExecutorOptions {
850
854
  * outcomes without spawning a real shell. Defaults to a `/bin/sh -c` spawn in the worktree. */
851
855
  runCommand?: WorktreeCheckRunner;
852
856
  /**
853
- * Exclude this leaf's spend from the conserved pool + equal-k arms. Defaults to `true` because a
854
- * coding-harness CLI does not surface token usage, so metering it would record a fabricated zero
855
- * (the no-silent-zeros rule forbids that). Set `false` ONLY for a harness that surfaces real
856
- * token/usd usage worth metering — the executor would then debit the (real) spend it captures.
857
+ * Exclude this leaf's spend from accounting. Defaults to `true` for ordinary CLI runs and
858
+ * `false` for `codexReproducible`, which captures real token usage. A metered custom runner must
859
+ * likewise return `LocalHarnessResult.usage`.
857
860
  */
858
861
  budgetExempt?: boolean;
859
862
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-runtime",
3
- "version": "0.94.0",
3
+ "version": "0.94.2",
4
4
  "description": "Shared task-lifecycle skeleton for agents: a recursive loop kernel for chat turns, one-shot tasks, and multi-attempt loops, with trace capture and eval-gated self-improvement. Domain behavior lives in adapters; scoring and ship-gates in @tangle-network/agent-eval.",
5
5
  "homepage": "https://github.com/tangle-network/agent-runtime#readme",
6
6
  "repository": {