@tangle-network/agent-runtime 0.91.0 → 0.92.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 (86) hide show
  1. package/README.md +4 -2
  2. package/dist/agent.d.ts +3 -3
  3. package/dist/agent.js +88 -9
  4. package/dist/agent.js.map +1 -1
  5. package/dist/{mcp-serve-verifier-XsX8rkB9.d.ts → agentic-generator-B8oeE2Yv.d.ts} +6 -33
  6. package/dist/analyst-loop.d.ts +1 -1
  7. package/dist/candidate-execution/index.d.ts +104 -0
  8. package/dist/candidate-execution/index.js +34 -0
  9. package/dist/candidate-execution/index.js.map +1 -0
  10. package/dist/chunk-3BE7KTMU.js +1229 -0
  11. package/dist/chunk-3BE7KTMU.js.map +1 -0
  12. package/dist/chunk-3D2RHC4K.js +73 -0
  13. package/dist/chunk-3D2RHC4K.js.map +1 -0
  14. package/dist/chunk-3MDZX7YU.js +125 -0
  15. package/dist/chunk-3MDZX7YU.js.map +1 -0
  16. package/dist/{chunk-NC66AM3S.js → chunk-6O5USWVH.js} +32 -1413
  17. package/dist/chunk-6O5USWVH.js.map +1 -0
  18. package/dist/chunk-6O73TRHW.js +142 -0
  19. package/dist/chunk-6O73TRHW.js.map +1 -0
  20. package/dist/{chunk-JRS3YSRZ.js → chunk-7VJJJ2T2.js} +2 -2
  21. package/dist/chunk-A62TP7SK.js +4784 -0
  22. package/dist/chunk-A62TP7SK.js.map +1 -0
  23. package/dist/chunk-APVPRF4Y.js +2166 -0
  24. package/dist/chunk-APVPRF4Y.js.map +1 -0
  25. package/dist/{chunk-DWWII6N2.js → chunk-AUEIDTR3.js} +2 -2
  26. package/dist/{chunk-FF77IBQM.js → chunk-FRBHUNQ7.js} +2 -141
  27. package/dist/chunk-FRBHUNQ7.js.map +1 -0
  28. package/dist/{chunk-7ON74BQO.js → chunk-GDAQUFG6.js} +2 -2
  29. package/dist/{chunk-AD7JW4QG.js → chunk-I7WVPJBZ.js} +23 -1231
  30. package/dist/chunk-I7WVPJBZ.js.map +1 -0
  31. package/dist/{chunk-IOUUITQA.js → chunk-IGGZGKJD.js} +3 -3
  32. package/dist/chunk-PH65PR4F.js +860 -0
  33. package/dist/chunk-PH65PR4F.js.map +1 -0
  34. package/dist/chunk-RSWM2ZKM.js +659 -0
  35. package/dist/chunk-RSWM2ZKM.js.map +1 -0
  36. package/dist/{chunk-BZF3KQ6G.js → chunk-VSWBYWFK.js} +4 -122
  37. package/dist/chunk-VSWBYWFK.js.map +1 -0
  38. package/dist/{completion-gate-DkAnUmpb.d.ts → completion-gate-BLaiN0-X.d.ts} +1 -1
  39. package/dist/{coordination-rRj5hjJK.d.ts → coordination-DxJ83oZA.d.ts} +12 -5
  40. package/dist/environment-provider.d.ts +2 -2
  41. package/dist/environment-provider.js +2 -1
  42. package/dist/improve-CUVCq7xg.d.ts +152 -0
  43. package/dist/{improvement-adapter-CDR8QNVM.d.ts → improvement-adapter-BieWeK5J.d.ts} +16 -0
  44. package/dist/index.d.ts +27 -1092
  45. package/dist/index.js +108 -6491
  46. package/dist/index.js.map +1 -1
  47. package/dist/intelligence.d.ts +160 -13
  48. package/dist/intelligence.js +535 -59
  49. package/dist/intelligence.js.map +1 -1
  50. package/dist/knowledge.d.ts +6 -6
  51. package/dist/knowledge.js +6 -4
  52. package/dist/lifecycle.d.ts +2 -1
  53. package/dist/lifecycle.js +5 -3
  54. package/dist/lifecycle.js.map +1 -1
  55. package/dist/{loop-runner-bin-DTbZVGfM.d.ts → loop-runner-bin-kKUNGLyV.d.ts} +2 -2
  56. package/dist/loop-runner-bin.d.ts +5 -5
  57. package/dist/loop-runner-bin.js +8 -5
  58. package/dist/loops.d.ts +16 -16
  59. package/dist/loops.js +47 -41
  60. package/dist/mcp/bin.js +6 -4
  61. package/dist/mcp/bin.js.map +1 -1
  62. package/dist/mcp/index.d.ts +8 -8
  63. package/dist/mcp/index.js +9 -6
  64. package/dist/mcp/index.js.map +1 -1
  65. package/dist/mcp-serve-verifier-Bg4C3p5S.d.ts +34 -0
  66. package/dist/{openai-tools-C4ZfUD4L.d.ts → openai-tools-E3woykz9.d.ts} +1 -1
  67. package/dist/prepare-Z08a4heC.d.ts +713 -0
  68. package/dist/profiles.d.ts +1 -1
  69. package/dist/{router-client-DJImUDlm.d.ts → sanitize-C9go6tXj.d.ts} +113 -1
  70. package/dist/{structural-rollout-MwlpgQ-6.d.ts → structural-rollout-DHGDbhvR.d.ts} +3 -3
  71. package/dist/{supervise-DPmYPk0j.d.ts → supervise-T2pazU3G.d.ts} +4 -4
  72. package/dist/{types-SyuwunY_.d.ts → types-B00NtbCs.d.ts} +1 -1
  73. package/dist/{types-eMNgWgFi.d.ts → types-DAdIm4AC.d.ts} +1 -1
  74. package/dist/{worktree-fanout-BDFQIO-Y.d.ts → worktree-fanout-BUb2Ag02.d.ts} +3 -3
  75. package/package.json +26 -35
  76. package/skills/build-with-agent-runtime/SKILL.md +1 -1
  77. package/dist/chunk-AD7JW4QG.js.map +0 -1
  78. package/dist/chunk-BZF3KQ6G.js.map +0 -1
  79. package/dist/chunk-FF77IBQM.js.map +0 -1
  80. package/dist/chunk-IVGYLCFH.js +0 -381
  81. package/dist/chunk-IVGYLCFH.js.map +0 -1
  82. package/dist/chunk-NC66AM3S.js.map +0 -1
  83. /package/dist/{chunk-JRS3YSRZ.js.map → chunk-7VJJJ2T2.js.map} +0 -0
  84. /package/dist/{chunk-DWWII6N2.js.map → chunk-AUEIDTR3.js.map} +0 -0
  85. /package/dist/{chunk-7ON74BQO.js.map → chunk-GDAQUFG6.js.map} +0 -0
  86. /package/dist/{chunk-IOUUITQA.js.map → chunk-IGGZGKJD.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { a as UiFinding, U as UiLens } from './substrate-DO2GHNg2.js';
2
2
  export { C as CoderTask, b as UI_FINDING_SEVERITIES, c as UI_LENSES, d as UiFindingScreenshot, e as UiFindingSeverity, f as coderTaskToPrompt } from './substrate-DO2GHNg2.js';
3
3
  import { AgentProfile, SandboxEvent } from '@tangle-network/sandbox';
4
- import { V as Validator, A as AgentRunSpec, c as OutputAdapter, D as Driver, S as SandboxClient } from './types-SyuwunY_.js';
4
+ import { V as Validator, e as AgentRunSpec, d as OutputAdapter, D as Driver, S as SandboxClient } from './types-B00NtbCs.js';
5
5
  import { AgentProfile as AgentProfile$1 } from '@tangle-network/agent-interface';
6
6
  import '@tangle-network/agent-eval';
7
7
 
@@ -1,3 +1,6 @@
1
+ import { ControlEvalResult, KnowledgeReadinessReport, KnowledgeRequirement } from '@tangle-network/agent-eval';
2
+ import { A as AgentRuntimeEvent, b as RuntimeStreamEvent, c as AgentTaskStatus } from './types-B00NtbCs.js';
3
+
1
4
  /**
2
5
  * THE canonical agentic tool-loop. One inference turn → run any requested tools → fold the
3
6
  * results back as `tool` messages → repeat, until the model answers without a tool call or the
@@ -213,4 +216,113 @@ declare function routerBrain(cfg: RouterConfig, opts?: {
213
216
  temperature?: number;
214
217
  }): ToolLoopChat;
215
218
 
216
- export { type RouterConfig as R, type ToolLoopChat as T, type ToolLoopCompactionOptions as a, type ToolSpec as b, type RouterChatResult as c, type RouterChatToolsResult as d, type RouterToolCall as e, type RouterToolLoopResult as f, type ToolLoopCompaction as g, routerChatWithTools as h, routerChatWithUsage as i, routerToolLoop as j, routerBrain as r };
219
+ /**
220
+ *
221
+ * Sanitization for runtime telemetry. The rule: nothing user-controlled leaks
222
+ * unless the caller opts in with a `RuntimeTelemetryOptions` flag. This is the
223
+ * envelope that ends up in `agent_run.metadata.runtimeEvents` on every
224
+ * consumer, so the default must be safe.
225
+ *
226
+ * @stable
227
+ */
228
+
229
+ /** @stable */
230
+ interface RuntimeTelemetryOptions {
231
+ /**
232
+ * Include raw task inputs. Off by default because task inputs often contain
233
+ * customer facts, credentials, source text, or internal IDs.
234
+ */
235
+ includeInputs?: boolean;
236
+ /** Include requirement descriptions. Secret requirements are always redacted. */
237
+ includeRequirementDescriptions?: boolean;
238
+ /** Include evidence IDs. Off by default; counts are safer for shared reports. */
239
+ includeEvidenceIds?: boolean;
240
+ /** Include user answers from question preflight. Off by default. */
241
+ includeUserAnswers?: boolean;
242
+ /** Include action payloads and action results for control steps. Off by default. */
243
+ includeControlPayloads?: boolean;
244
+ /** Include task metadata. Off by default because metadata may carry IDs or policy internals. */
245
+ includeMetadata?: boolean;
246
+ /** Include eval detail/evidence strings. Off by default because validators may echo private input. */
247
+ includeEvalDetails?: boolean;
248
+ }
249
+ /** @stable */
250
+ interface SanitizedKnowledgeRequirement {
251
+ id: string;
252
+ description?: string;
253
+ requiredFor: string[];
254
+ category: KnowledgeRequirement['category'];
255
+ acquisitionMode: KnowledgeRequirement['acquisitionMode'];
256
+ importance: KnowledgeRequirement['importance'];
257
+ freshness: KnowledgeRequirement['freshness'];
258
+ sensitivity: KnowledgeRequirement['sensitivity'];
259
+ confidenceNeeded: number;
260
+ currentConfidence: number;
261
+ evidenceCount: number;
262
+ evidenceIds?: string[];
263
+ fallbackPolicy: KnowledgeRequirement['fallbackPolicy'];
264
+ }
265
+ /** @stable */
266
+ interface SanitizedKnowledgeReadinessReport {
267
+ taskId: string;
268
+ readinessScore: number;
269
+ recommendedAction: KnowledgeReadinessReport['recommendedAction'];
270
+ severity: KnowledgeReadinessReport['severity'];
271
+ reason: string;
272
+ blockingMissingRequirements: SanitizedKnowledgeRequirement[];
273
+ nonBlockingGaps: SanitizedKnowledgeRequirement[];
274
+ evidenceCount: number;
275
+ evidenceIds?: string[];
276
+ missingRequirementIds: string[];
277
+ }
278
+ /** Strip PII and large blobs from a `KnowledgeReadinessReport` for safe telemetry emission. @stable */
279
+ declare function sanitizeKnowledgeReadinessReport(report: KnowledgeReadinessReport, options?: RuntimeTelemetryOptions): SanitizedKnowledgeReadinessReport;
280
+ /** Reduce an `AgentRuntimeEvent` to a PII-safe, serializable plain object for telemetry. @stable */
281
+ declare function sanitizeAgentRuntimeEvent<TState, TAction, TActionResult, TEval extends ControlEvalResult>(event: AgentRuntimeEvent<TState, TAction, TActionResult, TEval>, options?: RuntimeTelemetryOptions): Record<string, unknown>;
282
+ /** Reduce a `RuntimeStreamEvent` to a PII-safe, serializable plain object for telemetry. @stable */
283
+ declare function sanitizeRuntimeStreamEvent(event: RuntimeStreamEvent, options?: RuntimeTelemetryOptions): Record<string, unknown>;
284
+ /** @stable */
285
+ interface RuntimeEventCollector<TState = unknown, TAction = unknown, TActionResult = unknown, TEval extends ControlEvalResult = ControlEvalResult> {
286
+ onEvent: (event: AgentRuntimeEvent<TState, TAction, TActionResult, TEval>) => void;
287
+ events: Array<Record<string, unknown>>;
288
+ }
289
+ /** @stable */
290
+ type RuntimeStreamEventSink = (event: RuntimeStreamEvent) => void;
291
+ /** @stable */
292
+ interface RuntimeStreamEventSummary {
293
+ /** Total count of sanitized events collected. */
294
+ eventCount: number;
295
+ /** Count of events per `type`. Useful for log-line summaries. */
296
+ eventCountsByType: Record<string, number>;
297
+ /** First session id observed in a `session_created` / `session_resumed` event, if any. */
298
+ firstSessionId?: string;
299
+ /** Last `final` event's status, if a final event was observed. */
300
+ finalStatus?: AgentTaskStatus;
301
+ /** Last `final` event's reason, if a final event was observed. */
302
+ finalReason?: string;
303
+ /** Concatenated `text_delta.text` across the stream, even when payloads are redacted. */
304
+ finalText: string;
305
+ }
306
+ /** @stable */
307
+ interface RuntimeStreamEventCollector {
308
+ onEvent: RuntimeStreamEventSink;
309
+ events: Array<Record<string, unknown>>;
310
+ /** Snapshot of a small streaming-flavored summary derived from collected events. */
311
+ summary(): RuntimeStreamEventSummary;
312
+ }
313
+ /** Build an in-memory collector that sanitizes and accumulates `AgentRuntimeEvent`s for inspection. @stable */
314
+ declare function createRuntimeEventCollector<TState = unknown, TAction = unknown, TActionResult = unknown, TEval extends ControlEvalResult = ControlEvalResult>(options?: RuntimeTelemetryOptions): RuntimeEventCollector<TState, TAction, TActionResult, TEval>;
315
+ /**
316
+ *
317
+ * Streaming-event counterpart of `createRuntimeEventCollector`. Pass each
318
+ * event yielded by `runAgentTaskStream` through `onEvent` and read the
319
+ * sanitized copies off `events`; the same `RuntimeTelemetryOptions` redaction
320
+ * flags apply. Kept distinct from `createRuntimeEventCollector` because the
321
+ * stream and non-stream event shapes overlap on `type` literals — dispatching
322
+ * on `type` alone would misroute events.
323
+ *
324
+ * @stable
325
+ */
326
+ declare function createRuntimeStreamEventCollector(options?: RuntimeTelemetryOptions): RuntimeStreamEventCollector;
327
+
328
+ export { type RouterConfig as R, type SanitizedKnowledgeReadinessReport as S, type ToolLoopChat as T, type ToolLoopCompactionOptions as a, type ToolSpec as b, type RuntimeTelemetryOptions as c, type RuntimeEventCollector as d, type RuntimeStreamEventCollector as e, createRuntimeEventCollector as f, createRuntimeStreamEventCollector as g, sanitizeKnowledgeReadinessReport as h, sanitizeRuntimeStreamEvent as i, type RouterChatResult as j, type RouterChatToolsResult as k, type RouterToolCall as l, type RouterToolLoopResult as m, type ToolLoopCompaction as n, routerChatWithTools as o, routerChatWithUsage as p, routerToolLoop as q, routerBrain as r, sanitizeAgentRuntimeEvent as s };
@@ -1,6 +1,6 @@
1
- import { R as RuntimeHooks, a as SelectionReceipt } from './types-SyuwunY_.js';
2
- import { C as Corpus, O as Outcome } from './worktree-fanout-BDFQIO-Y.js';
3
- import { A as Agent, B as Budget, S as Scope } from './types-eMNgWgFi.js';
1
+ import { R as RuntimeHooks, a as SelectionReceipt } from './types-B00NtbCs.js';
2
+ import { C as Corpus, O as Outcome } from './worktree-fanout-BUb2Ag02.js';
3
+ import { A as Agent, B as Budget, S as Scope } from './types-DAdIm4AC.js';
4
4
 
5
5
  /**
6
6
  * The general agentic primitive — sequential (depth) and parallel (breadth) over a shared,
@@ -1,7 +1,7 @@
1
- import { S as Scope, a as ResultBlobStore, B as Budget, A as Agent, b as SupervisedResult } from './types-eMNgWgFi.js';
2
- import { M as MakeWorkerAgent, A as AnalystRegistry, E as ExecutorConfig } from './coordination-rRj5hjJK.js';
3
- import { R as RouterConfig, T as ToolLoopChat, a as ToolLoopCompactionOptions } from './router-client-DJImUDlm.js';
4
- import { D as DeliverableSpec } from './completion-gate-DkAnUmpb.js';
1
+ import { S as Scope, a as ResultBlobStore, B as Budget, A as Agent, b as SupervisedResult } from './types-DAdIm4AC.js';
2
+ import { M as MakeWorkerAgent, A as AnalystRegistry, E as ExecutorConfig } from './coordination-DxJ83oZA.js';
3
+ import { R as RouterConfig, T as ToolLoopChat, a as ToolLoopCompactionOptions } from './sanitize-C9go6tXj.js';
4
+ import { D as DeliverableSpec } from './completion-gate-BLaiN0-X.js';
5
5
 
6
6
  /** The supervisor's profile — the subset of an `AgentProfile` that selects + shapes its brain.
7
7
  * `harness` is the backend-as-data discriminant; `systemPrompt` is the standing instruction. */
@@ -1308,4 +1308,4 @@ interface ExecCtx {
1308
1308
  parentSpanId?: string;
1309
1309
  }
1310
1310
 
1311
- export { type MountRecorder as $, type AgentRunSpec as A, type BackendErrorDetail as B, type RuntimeHookContext as C, type Driver as D, type ExecCtx as E, type RuntimeHookErrorContext as F, type RuntimeHookEvent as G, type RuntimeHookPhase as H, type Iteration as I, type RuntimeHookTarget as J, type KnowledgeReadinessDecision as K, type LoopTokenUsage as L, type RuntimeRunHandle as M, type RuntimeRunPersistenceAdapter as N, type OpenAIChatTool as O, type RuntimeRunRow as P, composeRuntimeHooks as Q, type RuntimeHooks as R, type SandboxClient as S, defineRuntimeHooks as T, notifyRuntimeDecisionPoint as U, type Validator as V, notifyRuntimeHookEvent as W, startRuntimeRun as X, type LoopWinner as Y, type LoopLineageOptions as Z, type LoopResult as _, type SelectionReceipt as a, type LoopDecisionPayload as a0, type LoopEndedPayload as a1, type LoopIterationDispatchPayload as a2, type LoopIterationEndedPayload as a3, type LoopIterationStartedPayload as a4, type LoopPlanDescription as a5, type LoopPlanPayload as a6, type LoopStartedPayload as a7, type LoopTeardownFailedPayload as a8, type MountManifestEntry as a9, type RunProvenance as aa, type ValidationCtx as ab, type RuntimeStreamEvent as b, type OutputAdapter as c, type LoopTraceEvent as d, type LoopSandboxPlacement as e, type LoopTraceEmitter as f, type AgentBackendInput as g, type OpenAIChatToolChoice as h, type OpenAIChatResponseFormat as i, type AgentExecutionBackend as j, type AgentBackendContext as k, type RunAgentTaskOptions as l, type AgentTaskRunResult as m, type RunAgentTaskStreamOptions as n, type AgentRuntimeEvent as o, type AgentTaskStatus as p, type RuntimeSessionStore as q, type RuntimeSession as r, type AgentAdapter as s, type AgentKnowledgeProvider as t, type AgentRuntimeEventSink as u, type AgentTaskContext as v, type AgentTaskSpec as w, type RuntimeDecisionEvidenceRef as x, type RuntimeDecisionKind as y, type RuntimeDecisionPoint as z };
1311
+ export { type MountRecorder as $, type AgentRuntimeEvent as A, type BackendErrorDetail as B, type RuntimeHookContext as C, type Driver as D, type ExecCtx as E, type RuntimeHookErrorContext as F, type RuntimeHookEvent as G, type RuntimeHookPhase as H, type Iteration as I, type RuntimeHookTarget as J, type KnowledgeReadinessDecision as K, type LoopTokenUsage as L, type RuntimeRunHandle as M, type RuntimeRunPersistenceAdapter as N, type OpenAIChatTool as O, type RuntimeRunRow as P, composeRuntimeHooks as Q, type RuntimeHooks as R, type SandboxClient as S, defineRuntimeHooks as T, notifyRuntimeDecisionPoint as U, type Validator as V, notifyRuntimeHookEvent as W, startRuntimeRun as X, type LoopWinner as Y, type LoopLineageOptions as Z, type LoopResult as _, type SelectionReceipt as a, type LoopDecisionPayload as a0, type LoopEndedPayload as a1, type LoopIterationDispatchPayload as a2, type LoopIterationEndedPayload as a3, type LoopIterationStartedPayload as a4, type LoopPlanDescription as a5, type LoopPlanPayload as a6, type LoopStartedPayload as a7, type LoopTeardownFailedPayload as a8, type MountManifestEntry as a9, type RunProvenance as aa, type ValidationCtx as ab, type RuntimeStreamEvent as b, type AgentTaskStatus as c, type OutputAdapter as d, type AgentRunSpec as e, type LoopSandboxPlacement as f, type LoopTraceEvent as g, type LoopTraceEmitter as h, type AgentBackendInput as i, type OpenAIChatToolChoice as j, type OpenAIChatResponseFormat as k, type AgentExecutionBackend as l, type AgentBackendContext as m, type RunAgentTaskOptions as n, type AgentTaskRunResult as o, type RunAgentTaskStreamOptions as p, type RuntimeSessionStore as q, type RuntimeSession as r, type AgentAdapter as s, type AgentKnowledgeProvider as t, type AgentRuntimeEventSink as u, type AgentTaskContext as v, type AgentTaskSpec as w, type RuntimeDecisionEvidenceRef as x, type RuntimeDecisionKind as y, type RuntimeDecisionPoint as z };
@@ -1,7 +1,7 @@
1
1
  import { DefaultVerdict } from '@tangle-network/agent-eval';
2
2
  import { AgentProfile } from '@tangle-network/agent-interface';
3
3
  import { BackendType } from '@tangle-network/sandbox';
4
- import { L as LoopTokenUsage, R as RuntimeHooks } from './types-SyuwunY_.js';
4
+ import { L as LoopTokenUsage, R as RuntimeHooks } from './types-B00NtbCs.js';
5
5
 
6
6
  /**
7
7
  *
@@ -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 { N as NodeId, d as Settled, e as Spend, f as AgentSpec, S as Scope, g as SpawnJournal, a as ResultBlobStore, h as ExecutorRegistry, B as Budget, A as Agent, i as RootHandle, b as SupervisedResult, c as Executor } from './types-eMNgWgFi.js';
4
- import { I as Iteration, R as RuntimeHooks } from './types-SyuwunY_.js';
3
+ import { N as NodeId, d as Settled, e as Spend, f as AgentSpec, S as Scope, g as SpawnJournal, a as ResultBlobStore, h as ExecutorRegistry, B as Budget, A as Agent, i as RootHandle, b as SupervisedResult, c as Executor } from './types-DAdIm4AC.js';
4
+ import { I as Iteration, R as RuntimeHooks } from './types-B00NtbCs.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-DkAnUmpb.js';
6
+ import { W as WorktreeHarnessResult, G as GitRunner, a as WorktreeCheckRunner, D as DeliverableSpec } from './completion-gate-BLaiN0-X.js';
7
7
  import { L as LocalHarness, r as runLocalHarness } from './local-harness-dcD5WTTr.js';
8
8
 
9
9
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-runtime",
3
- "version": "0.91.0",
3
+ "version": "0.92.0",
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": {
@@ -64,6 +64,11 @@
64
64
  "import": "./dist/platform.js",
65
65
  "default": "./dist/platform.js"
66
66
  },
67
+ "./candidate-execution": {
68
+ "types": "./dist/candidate-execution/index.d.ts",
69
+ "import": "./dist/candidate-execution/index.js",
70
+ "default": "./dist/candidate-execution/index.js"
71
+ },
67
72
  "./mcp": {
68
73
  "types": "./dist/mcp/index.d.ts",
69
74
  "import": "./dist/mcp/index.js",
@@ -82,25 +87,10 @@
82
87
  "publishConfig": {
83
88
  "access": "public"
84
89
  },
85
- "scripts": {
86
- "build": "tsup",
87
- "dev": "tsup --watch",
88
- "prepare": "(git rev-parse --git-dir > /dev/null 2>&1 && git config core.hooksPath .githooks) || true; tsup",
89
- "test": "vitest run",
90
- "test:watch": "vitest",
91
- "lint": "biome check src tests examples",
92
- "lint:fix": "biome check --write src tests examples",
93
- "typecheck": "tsc --noEmit && pnpm run typecheck:examples",
94
- "typecheck:examples": "tsc --noEmit -p tsconfig.examples.json",
95
- "verify:package": "node scripts/verify-package-exports.mjs",
96
- "docs:api": "typedoc && node scripts/gen-primitive-catalog.mjs",
97
- "docs:freshness": "node scripts/check-docs-freshness.mjs",
98
- "docs:check": "pnpm run docs:api && git diff --exit-code -- docs/api && pnpm run docs:freshness"
99
- },
100
90
  "devDependencies": {
101
91
  "@biomejs/biome": "^2.4.15",
102
- "@tangle-network/agent-eval": "^0.108.1",
103
- "@tangle-network/agent-interface": "^0.24.0",
92
+ "@tangle-network/agent-eval": "^0.113.0",
93
+ "@tangle-network/agent-interface": "^0.25.0",
104
94
  "@tangle-network/sandbox": "^0.9.7",
105
95
  "@types/node": "^25.9.3",
106
96
  "playwright": "^1.61.0",
@@ -111,26 +101,13 @@
111
101
  "typescript": "^5.7.0",
112
102
  "vitest": "^3.0.0"
113
103
  },
114
- "pnpm": {
115
- "minimumReleaseAge": 4320,
116
- "minimumReleaseAgeExclude": [
117
- "@tangle-network/agent-eval",
118
- "@tangle-network/agent-interface",
119
- "@tangle-network/agent-profile-materialize",
120
- "@tangle-network/sandbox"
121
- ],
122
- "onlyBuiltDependencies": [
123
- "esbuild"
124
- ]
125
- },
126
104
  "engines": {
127
105
  "node": ">=20"
128
106
  },
129
107
  "license": "MIT",
130
- "packageManager": "pnpm@10.28.0",
131
108
  "peerDependencies": {
132
109
  "@tangle-network/agent-eval": ">=0.101.0 <1.0.0",
133
- "@tangle-network/agent-interface": ">=0.24.0 <1.0.0",
110
+ "@tangle-network/agent-interface": ">=0.25.0 <1.0.0",
134
111
  "@tangle-network/sandbox": ">=0.8.0 <1.0.0",
135
112
  "playwright": "^1.40.0"
136
113
  },
@@ -143,7 +120,21 @@
143
120
  }
144
121
  },
145
122
  "dependencies": {
146
- "@tangle-network/agent-knowledge": "^1.11.1",
147
- "@tangle-network/agent-profile-materialize": "0.3.0"
123
+ "@tangle-network/agent-knowledge": "^1.11.2",
124
+ "@tangle-network/agent-profile-materialize": "0.3.1"
125
+ },
126
+ "scripts": {
127
+ "build": "tsup",
128
+ "dev": "tsup --watch",
129
+ "test": "vitest run",
130
+ "test:watch": "vitest",
131
+ "lint": "biome check src tests examples",
132
+ "lint:fix": "biome check --write src tests examples",
133
+ "typecheck": "tsc --noEmit && pnpm run typecheck:examples",
134
+ "typecheck:examples": "tsc --noEmit -p tsconfig.examples.json",
135
+ "verify:package": "node scripts/verify-package-exports.mjs",
136
+ "docs:api": "typedoc && node scripts/gen-primitive-catalog.mjs",
137
+ "docs:freshness": "node scripts/check-docs-freshness.mjs",
138
+ "docs:check": "pnpm run docs:api && git diff --exit-code -- docs/api && pnpm run docs:freshness"
148
139
  }
149
- }
140
+ }
@@ -92,7 +92,7 @@ to its native default (`HARNESS_NATIVE_MODEL`) — never silently dropped.
92
92
  | **Spawn N coding agents on isolated git worktrees, keep the one whose patch passes checks** | `worktreeFanout` + `createWorktreeCliExecutor` + `gateOnDeliverable(DeliverableSpec)` over a raw `WorktreePatchArtifact`, winner via `selectValidWinner` — `/loops` — NOT a hand-rolled spawn-loop / "coder" role | canonical-api §3.1 / §5 |
93
93
  | **Sandbox coding rollout** (fresh box/round, or persistent+resume) | `runLoop(options)` / `openSandboxRun(client, opts, deliverable)` — `/loops` | canonical-api §3.1 |
94
94
  | **Optimize a CODE surface** in a gated loop | `improvementDriver({ worktree, generator })` — root `.` | canonical-api §3.4 |
95
- | **Optimize a PROMPT/config surface** (one call) — START HERE | `improve(profile, findings, { surface, gate })` — root `.` (the one pluggable RSI verb; picks the default proposer from `surface` `gepaProposer` for prompt, `skillOptProposer` for skills and wraps `selfImprove`; drop to `selfImprove({ agent, scenarios, judge, baselineSurface })` from `agent-eval/contract` only for the lower-level loop) | canonical-api §3.4 |
95
+ | **Optimize any agent/code surface** (one call) — START HERE | `improve(profile, findings, { surface, gate })` — root `.`; prompt and skill-document surfaces have built-in proposers, config/whole-profile surfaces accept a proposer, rollout policy enumerates bounded variants, and code gets isolated incumbent/candidate worktrees; drop to `selfImprove({ agent, scenarios, judge, baselineSurface })` only for lower-level control | canonical-api §3.4 |
96
96
  | **Gate: ship/hold a candidate** (campaign ctx) | `defaultProductionGate` / `heldOutGate` / `composeGate` — `agent-eval/contract`; `neutralizationGate` (footprint-matched PLACEBO gate — proves a held-out lift is CONTENT, not added prompt/mount footprint) — `agent-eval/campaign` | canonical-api §3.4 |
97
97
  | **Gate: ship/hold from a `BenchmarkReport`** (per-task cells) | `promotionGate({ report, incumbent, candidate })` — `/loops` | canonical-api §3.4 |
98
98
  | **Run the full multi-generation flywheel + certify** | `runStrategyEvolution(config)` — `/loops` | canonical-api §3.4 |