@tangle-network/agent-runtime 0.79.4 → 0.80.1

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 (35) hide show
  1. package/README.md +6 -0
  2. package/dist/agent.js +3 -3
  3. package/dist/{chunk-AHZ3YBL6.js → chunk-3RAXZ6LB.js} +195 -64
  4. package/dist/chunk-3RAXZ6LB.js.map +1 -0
  5. package/dist/{chunk-44CX5JU6.js → chunk-3TAQW75Y.js} +53 -5
  6. package/dist/chunk-3TAQW75Y.js.map +1 -0
  7. package/dist/{chunk-NXZEVWKP.js → chunk-CR5MQUYO.js} +2 -2
  8. package/dist/{chunk-RUJZK6VH.js → chunk-KELG3Z5H.js} +2 -2
  9. package/dist/{chunk-U6AP535M.js → chunk-KNZ54YYO.js} +3 -3
  10. package/dist/{chunk-IPEQ3ERC.js → chunk-XRKP3XW3.js} +2 -2
  11. package/dist/{chunk-IPEQ3ERC.js.map → chunk-XRKP3XW3.js.map} +1 -1
  12. package/dist/{coordination-BFVtgRax.d.ts → coordination-BI9tpcmF.d.ts} +12 -3
  13. package/dist/environment-provider.d.ts +1 -1
  14. package/dist/index.d.ts +4 -4
  15. package/dist/index.js +5 -5
  16. package/dist/intelligence.d.ts +1 -1
  17. package/dist/intelligence.js +1 -1
  18. package/dist/{loop-runner-bin-CTVja8e0.d.ts → loop-runner-bin-CBkLsyFg.d.ts} +2 -2
  19. package/dist/loop-runner-bin.d.ts +4 -4
  20. package/dist/loop-runner-bin.js +4 -4
  21. package/dist/loops.d.ts +32 -12
  22. package/dist/loops.js +5 -3
  23. package/dist/mcp/bin.js +3 -3
  24. package/dist/mcp/index.d.ts +6 -6
  25. package/dist/mcp/index.js +5 -5
  26. package/dist/{router-client-Ak2IGuXq.d.ts → router-client-D6Ocf4jG.d.ts} +19 -0
  27. package/dist/{types-DYW0tloU.d.ts → types-By9LXllv.d.ts} +7 -0
  28. package/dist/{worktree-fanout-DaUDwCA_.d.ts → worktree-fanout-D9Z2dMS9.d.ts} +2 -2
  29. package/dist/{worktree-harness-Dt6s_m3z.d.ts → worktree-harness-Dx8XULW3.d.ts} +1 -1
  30. package/package.json +1 -1
  31. package/dist/chunk-44CX5JU6.js.map +0 -1
  32. package/dist/chunk-AHZ3YBL6.js.map +0 -1
  33. /package/dist/{chunk-NXZEVWKP.js.map → chunk-CR5MQUYO.js.map} +0 -0
  34. /package/dist/{chunk-RUJZK6VH.js.map → chunk-KELG3Z5H.js.map} +0 -0
  35. /package/dist/{chunk-U6AP535M.js.map → chunk-KNZ54YYO.js.map} +0 -0
package/dist/mcp/index.js CHANGED
@@ -2,11 +2,11 @@ import {
2
2
  createPropagatingTraceEmitter,
3
3
  readTraceContextFromEnv,
4
4
  traceContextToEnv
5
- } from "../chunk-NXZEVWKP.js";
5
+ } from "../chunk-CR5MQUYO.js";
6
6
  import {
7
7
  mcpToolsForRuntimeMcp,
8
8
  mcpToolsForRuntimeMcpSubset
9
- } from "../chunk-RUJZK6VH.js";
9
+ } from "../chunk-KELG3Z5H.js";
10
10
  import {
11
11
  createKbGate
12
12
  } from "../chunk-FNMGYYSS.js";
@@ -14,7 +14,7 @@ import {
14
14
  assertTraceDerivedFindings,
15
15
  runCoderChecks,
16
16
  selectValidWinner
17
- } from "../chunk-AHZ3YBL6.js";
17
+ } from "../chunk-3RAXZ6LB.js";
18
18
  import {
19
19
  DELEGATE_DESCRIPTION,
20
20
  DELEGATE_FEEDBACK_DESCRIPTION,
@@ -64,8 +64,8 @@ import {
64
64
  validateDelegateUiAuditArgs,
65
65
  validateDelegationHistoryArgs,
66
66
  validateDelegationStatusArgs
67
- } from "../chunk-44CX5JU6.js";
68
- import "../chunk-IPEQ3ERC.js";
67
+ } from "../chunk-3TAQW75Y.js";
68
+ import "../chunk-XRKP3XW3.js";
69
69
  import {
70
70
  deleteBoxSafe,
71
71
  sleep,
@@ -82,7 +82,17 @@ interface RouterConfig {
82
82
  complete?: (body: Record<string, unknown>) => Promise<unknown>;
83
83
  }
84
84
  interface RouterChatResult {
85
+ /** The final answer, with any inline `<think>...</think>` block stripped into `reasoning`. */
85
86
  content: string;
87
+ /**
88
+ * Thinking-model reasoning, when the provider surfaced it — either as a separate
89
+ * `reasoning`/`reasoning_content` message field (OpenRouter style) or inlined into
90
+ * `content` as a `<think>` block (Groq style). Undefined for non-thinking models.
91
+ * Downstream parsers that match single-token answers must read `content`, which is
92
+ * clean either way; before this split, Groq-style inlining made the same model look
93
+ * broken on one provider and fine on another.
94
+ */
95
+ reasoning?: string;
86
96
  /** REAL usage, or undefined when the provider reported none. */
87
97
  usage?: {
88
98
  input: number;
@@ -98,6 +108,15 @@ declare function routerChatWithUsage(cfg: RouterConfig, messages: Array<{
98
108
  temperature?: number;
99
109
  signal?: AbortSignal;
100
110
  maxTokens?: number;
111
+ /**
112
+ * Reasoning control for thinking models, forwarded as `reasoning_effort`.
113
+ * 'none' is the load-bearing value: binary/single-token decisions (routing,
114
+ * gating) on a thinking model otherwise burn the whole token budget inside
115
+ * the think block — on slow backends (CPU-local) that turns into a client
116
+ * timeout, not just waste. Providers that ignore the field are handled by
117
+ * the reasoning/content split in `parseChatResult`.
118
+ */
119
+ reasoningEffort?: 'none' | 'low' | 'medium' | 'high';
101
120
  }): Promise<RouterChatResult>;
102
121
  /** A tool-call the model emitted (provider-neutral; mirrors the runtime's ToolCallRequest). */
103
122
  interface RouterToolCall {
@@ -274,6 +274,13 @@ interface Scope<Out> {
274
274
  /** ray.wait n=1 over this scope's in-memory live set; resolves as each child settles;
275
275
  * `null` when the live set is empty. */
276
276
  next(): Promise<Settled<Out> | null>;
277
+ /**
278
+ * Non-blocking twin of `next()`: deliver an ALREADY-settled, undelivered child, or `null`
279
+ * when none is ready — never awaits a live child. The driver's post-loop drain reads this so
280
+ * a child that settled while the driver was busy (or after it stopped pulling) still reaches
281
+ * the finalize ledger instead of being silently lost.
282
+ */
283
+ nextResolved(): Promise<Settled<Out> | null>;
277
284
  /**
278
285
  * Steer a RUNNING child out-of-band — deliver a message to its executor's inbox (the driver's
279
286
  * `send` verb: next-instruction, interrupt, or resume). Returns `true` if the message was
@@ -1,9 +1,9 @@
1
1
  import { AgentProfile } from '@tangle-network/agent-interface';
2
2
  import { AnalystFinding, DefaultVerdict } from '@tangle-network/agent-eval';
3
- import { A as AgentSpec, b as ExecutorRegistry, B as Budget, c as Agent, S as SpawnJournal, d as ResultBlobStore, e as RootHandle, f as SupervisedResult, N as NodeId, g as Settled, h as Spend, i as Scope, a as Executor } from './types-DYW0tloU.js';
3
+ import { A as AgentSpec, b as ExecutorRegistry, B as Budget, c as Agent, S as SpawnJournal, d as ResultBlobStore, e as RootHandle, f as SupervisedResult, N as NodeId, g as Settled, h as Spend, i as Scope, a as Executor } from './types-By9LXllv.js';
4
4
  import { R as RuntimeHooks, I as Iteration } from './types-BF-MEsQB.js';
5
5
  import { BackendType } from '@tangle-network/sandbox';
6
- import { W as WorktreeHarnessResult, G as GitRunner, a as WorktreeCheckRunner, D as DeliverableSpec } from './worktree-harness-Dt6s_m3z.js';
6
+ import { W as WorktreeHarnessResult, G as GitRunner, a as WorktreeCheckRunner, D as DeliverableSpec } from './worktree-harness-Dx8XULW3.js';
7
7
  import { L as LocalHarness, r as runLocalHarness } from './local-harness-DU7yV6mG.js';
8
8
 
9
9
  /**
@@ -1,4 +1,4 @@
1
- import { a as Executor } from './types-DYW0tloU.js';
1
+ import { a as Executor } from './types-By9LXllv.js';
2
2
  import { L as LocalHarness } from './local-harness-DU7yV6mG.js';
3
3
 
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-runtime",
3
- "version": "0.79.4",
3
+ "version": "0.80.1",
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": {