@tangle-network/agent-runtime 0.173.0 → 0.174.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 (39) hide show
  1. package/dist/{activation-DkZiIzqK.js → activation-CsdJWRXX.js} +2 -2
  2. package/dist/{activation-DkZiIzqK.js.map → activation-CsdJWRXX.js.map} +1 -1
  3. package/dist/agent.js +2 -2
  4. package/dist/{authoring-B4aR-Tea.js → authoring-DsLNInAz.js} +2 -2
  5. package/dist/{authoring-B4aR-Tea.js.map → authoring-DsLNInAz.js.map} +1 -1
  6. package/dist/durable.js +1 -1
  7. package/dist/{graph-CoSt0kup.js → graph-BbeHgLXH.js} +2 -2
  8. package/dist/{graph-CoSt0kup.js.map → graph-BbeHgLXH.js.map} +1 -1
  9. package/dist/graph.js +9 -4
  10. package/dist/graph.js.map +1 -1
  11. package/dist/{improvement-cycle-lP-F7B60.js → improvement-cycle-DKGDCukL.js} +155 -8
  12. package/dist/improvement-cycle-DKGDCukL.js.map +1 -0
  13. package/dist/index.d.ts +1 -1
  14. package/dist/index.js +7 -7
  15. package/dist/intelligence.d.ts +1 -1
  16. package/dist/intelligence.js +3 -3
  17. package/dist/kernel.js +6 -6
  18. package/dist/{knowledge-DCepYOlH.js → knowledge-BaAX0HVu.js} +3 -3
  19. package/dist/{knowledge-DCepYOlH.js.map → knowledge-BaAX0HVu.js.map} +1 -1
  20. package/dist/knowledge.js +1 -1
  21. package/dist/{loop-runner-bin-CTCi_rSV.js → loop-runner-bin-D63Tytdk.js} +3 -3
  22. package/dist/{loop-runner-bin-CTCi_rSV.js.map → loop-runner-bin-D63Tytdk.js.map} +1 -1
  23. package/dist/loop-runner-bin.js +1 -1
  24. package/dist/mcp/bin.js +3 -3
  25. package/dist/mcp/index.js +4 -4
  26. package/dist/{openai-tools-B4BPplKi.js → openai-tools-BBgjWYNw.js} +2 -2
  27. package/dist/{openai-tools-B4BPplKi.js.map → openai-tools-BBgjWYNw.js.map} +1 -1
  28. package/dist/{redact-6S20u4Ii.d.ts → redact-DvLf4x1m.d.ts} +49 -5
  29. package/dist/{runtime-l9Q9-Dal.js → runtime-CojgP-hr.js} +6 -6
  30. package/dist/{runtime-l9Q9-Dal.js.map → runtime-CojgP-hr.js.map} +1 -1
  31. package/dist/{structural-rollout-CIK7nvSH.js → structural-rollout-BUYA61iV.js} +2 -2
  32. package/dist/{structural-rollout-CIK7nvSH.js.map → structural-rollout-BUYA61iV.js.map} +1 -1
  33. package/dist/{supervise-Dq_D3QbE.js → supervise-Ci0RfWQF.js} +2 -2
  34. package/dist/{supervise-Dq_D3QbE.js.map → supervise-Ci0RfWQF.js.map} +1 -1
  35. package/dist/{supervisor-cAFpYJWF.js → supervisor-Bt1XLCVq.js} +2 -2
  36. package/dist/{supervisor-cAFpYJWF.js.map → supervisor-Bt1XLCVq.js.map} +1 -1
  37. package/dist/testing.js +11 -11
  38. package/package.json +1 -1
  39. package/dist/improvement-cycle-lP-F7B60.js.map +0 -1
@@ -49,11 +49,38 @@ interface CandidateGenerator {
49
49
  }
50
50
  //#endregion
51
51
  //#region src/improvement/agentic-generator.d.ts
52
- /** Outcome of verifying a candidate worktree. `feedback` (compiler errors,
53
- * failing test output) is fed into the next shot when `ok` is false. */
52
+ /**
53
+ * Outcome of verifying a candidate worktree.
54
+ *
55
+ * `ok` answers "is this tree shippable". `keepGoing` answers "should the budget
56
+ * stop here", and `score` ranks this tree against the other trees the same
57
+ * candidate produced — three separate questions, so a verifier can pass a tree
58
+ * and still spend the shots it was given.
59
+ *
60
+ * `feedback` (compiler errors, failing test output, or the reason a passing
61
+ * tree is being sent back) is fed into the next shot.
62
+ */
54
63
  interface VerifyResult {
55
64
  ok: boolean;
56
65
  feedback?: string;
66
+ /**
67
+ * Spend the remaining shots instead of returning this tree now.
68
+ *
69
+ * Read only when `ok` is true: a failed verification already spends the next
70
+ * shot. Omitted means the first passing tree ends the candidate.
71
+ */
72
+ keepGoing?: boolean;
73
+ /**
74
+ * How good this tree is, for ranking it against the other passing trees of
75
+ * this candidate. Higher wins; a tie keeps the LATER tree, which is the one
76
+ * already on disk and the one the author refined last.
77
+ *
78
+ * Only a passing tree is ranked — a tree that failed verification is never a
79
+ * candidate, whatever it scored. Score every passing tree or none of them: a
80
+ * scored tree cannot be ranked against an unscored one, and mixing the two
81
+ * fails the run rather than guessing an order.
82
+ */
83
+ score?: number;
57
84
  }
58
85
  /** Verifies the edited worktree. Sync or async; throws only on a setup fault
59
86
  * (a candidate that fails verification returns `{ok:false}`, it does not
@@ -104,10 +131,25 @@ type AgenticGeneratorShotDisposition = {
104
131
  readonly worktreePath: string;
105
132
  readonly stage: 'raw-trace-evidence' | 'verification';
106
133
  readonly feedback: string | null;
134
+ } | {
135
+ /** The tree passed verification and the verifier asked for another shot,
136
+ * so it was snapshotted and the budget continues. */
137
+ readonly kind: 'kept';
138
+ readonly worktreePath: string;
139
+ /** The rank the verifier gave this tree, or null when it scored nothing. */
140
+ readonly score: number | null;
141
+ /** Whether this tree is now the best one this candidate has produced. */
142
+ readonly best: boolean;
143
+ readonly feedback: string | null;
107
144
  } | {
108
145
  readonly kind: 'accepted';
109
146
  readonly worktreePath: string;
110
147
  readonly verified: boolean;
148
+ /** One-based shot whose tree was put back into the worktree because it
149
+ * outranked the tree on disk; null when the tree on disk is the one that
150
+ * ships. Non-null is the record that best-of-n moved bytes rather than
151
+ * only ranking them. */
152
+ readonly restoredFromShot: number | null;
111
153
  } | {
112
154
  readonly kind: 'setup-error';
113
155
  readonly worktreePath: string;
@@ -144,8 +186,10 @@ interface AgenticGeneratorOptions {
144
186
  /** Verify the worktree after each dirtying shot. When set, a candidate that
145
187
  * fails verification is NOT returned — the failure feeds the next shot
146
188
  * (verify-in-session), up to `maxShots`; a candidate that never verifies is
147
- * discarded (`applied:false`), never shipped. Omitted means the first dirty
148
- * shot is the candidate. See `commandVerifier`. */
189
+ * discarded (`applied:false`), never shipped. A verifier that returns
190
+ * `keepGoing` passes a tree AND spends the remaining shots, and the
191
+ * best-scoring tree is the one that ships. Omitted means the first dirty
192
+ * shot is the candidate. See `commandVerifier` and `VerifyResult`. */
149
193
  verify?: Verifier;
150
194
  /** Test seam — inject the worktree-dirty check (defaults to `git status`). */
151
195
  isDirty?: (worktreePath: string) => boolean;
@@ -550,4 +594,4 @@ declare function defaultRedactor(value: unknown): unknown;
550
594
  declare function resolveRedactor(redact: Redactor | false | undefined): Redactor;
551
595
  //#endregion
552
596
  export { agenticGenerator as $, ImprovementCandidate as A, ImprovementProfilePopulationLineage as B, ImproveProfileComponents as C, ImproveScenarioPartitions as D, ImproveRuntimeCodeGeneratorOptions as E, ImprovementProfileCandidatePopulationAvailable as F, ReadonlyAgentProfile as G, ImprovementProfilePopulationObservationSource as H, ImprovementProfileCandidatePopulationUnavailable as I, AgenticGeneratorShotDisposition as J, AgenticGeneratorExecutorForWorktree as K, ImprovementProfilePopulationArtifactSource as L, ImprovementMaterializedProfilePopulationCandidate as M, ImprovementProfileCandidate as N, ImproveSkillsOptions as O, ImprovementProfileCandidatePopulation as P, VerifyResult as Q, ImprovementProfilePopulationCandidate as R, ImproveProfileAgent as S, ImproveResult as T, ImprovementRefusedProfilePopulationCandidate as U, ImprovementProfilePopulationLineageNode as V, DeepReadonly as W, AgenticGeneratorShotReceipt as X, AgenticGeneratorShotExecution as Y, Verifier as Z, ImproveMethodOptions as _, ImproveCandidateValidationInput as a, ImproveOptimizationRunOptions as b, ImproveCodeOptions as c, ImproveCost as d, commandVerifier as et, ImproveCustomCodeGeneratorOptions as f, ImproveMethodLineage as g, ImproveMethodFactory as h, improve as i, ImprovementCodeCandidate as j, ImproveSurface as k, ImproveCodeResult as l, ImproveMethodContext as m, defaultRedactor as n, CandidateGenerator as nt, ImproveCandidateValidator as o, ImproveLineage as p, AgenticGeneratorOptions as q, resolveRedactor as r, ImproveCodeBaseOptions as s, Redactor as t, defaultBuildPrompt as tt, ImproveCodeRunOptions as u, ImproveMethodResult as v, ImproveProfileSurface as w, ImproveOptions as x, ImproveMethodSource as y, ImprovementProfilePopulationCandidateSource as z };
553
- //# sourceMappingURL=redact-6S20u4Ii.d.ts.map
597
+ //# sourceMappingURL=redact-DvLf4x1m.d.ts.map
@@ -9,14 +9,14 @@ import { i as redactProtectedValue, r as redactProtectedReason } from "./protect
9
9
  import { c as notifySandboxEventObserver, m as parseCanonicalTransportEvent, p as extractTransportEventIdentity } from "./sandbox-events-BVjstFgb.js";
10
10
  import { n as executableAgentSpecSnapshot, t as executableAgentProfileSnapshot } from "./executable-spec-CkGvdPds.js";
11
11
  import { c as profileModelExecutionSettings, i as concreteModelId, l as profileProviderModel, o as enforceTokenLimits, t as assertExecutableAgentProfile } from "./model-policy-Sw4ywhtL.js";
12
- import { Ct as createSandboxLineage, Dt as runBrainLoop, Et as routerBrain, K as createWorktreeCliExecutor, Ot as canonicalObservedModel, St as runAgentRounds, U as createExecutor, W as createExecutorRegistry, bt as defaultSelectWinner, et as createPushTraceSource, f as withDriverExecutor, k as rollingDispatch, n as createSupervisor, wt as probeSandboxCapabilities, y as settledToIteration } from "./supervisor-cAFpYJWF.js";
12
+ import { Ct as createSandboxLineage, Dt as runBrainLoop, Et as routerBrain, K as createWorktreeCliExecutor, Ot as canonicalObservedModel, St as runAgentRounds, U as createExecutor, W as createExecutorRegistry, bt as defaultSelectWinner, et as createPushTraceSource, f as withDriverExecutor, k as rollingDispatch, n as createSupervisor, wt as probeSandboxCapabilities, y as settledToIteration } from "./supervisor-Bt1XLCVq.js";
13
13
  import "./environment-provider-Bn3652YU.js";
14
14
  import { i as notifyRuntimeHookEvent } from "./runtime-hooks-tXpAarhW.js";
15
- import { C as observe, O as strategyAuthorMethod, T as profileChatClient, b as sample, v as refine, x as sampleThenRefine, y as runAgentic } from "./structural-rollout-CIK7nvSH.js";
16
- import { At as gateOnDeliverable, jt as mapExecutorResult, n as supervise } from "./supervise-Dq_D3QbE.js";
15
+ import { C as observe, O as strategyAuthorMethod, T as profileChatClient, b as sample, v as refine, x as sampleThenRefine, y as runAgentic } from "./structural-rollout-BUYA61iV.js";
16
+ import { At as gateOnDeliverable, jt as mapExecutorResult, n as supervise } from "./supervise-Ci0RfWQF.js";
17
17
  import { t as assertAuthoredCode } from "./authored-code-DzYtiflw.js";
18
- import "./authoring-B4aR-Tea.js";
19
- import "./graph-CoSt0kup.js";
18
+ import "./authoring-DsLNInAz.js";
19
+ import "./graph-BbeHgLXH.js";
20
20
  import { AgentEnvironmentCapabilitiesSchema, AgentExactRunControlRefSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStatusSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentNativeContextContinuationResultSchema, AgentTurnResultSchema, InteractionAcknowledgementSchema, InteractionResponseCommandSchema, NativeContextBoundaryProofSchema, NativeContextContinuationRequestSchema, RuntimeEventEnvelopeSchema, TerminalReplayWindowSchema, TerminalSessionRefSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionControlClaimRequestDigest, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionRunRef, agentInteractiveSessionStatusMatchesRef, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentNativeContextContinuationResultMatchesRequest, agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, exactAgentInteractiveSessionStart, nativeContextContinuationTurnDigest, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
21
21
  import { CODING_HARNESSES, DEFAULT_TRACE_ANALYST_KINDS, InMemoryTraceStore, OUTPUT_VALUE, benjaminiHochberg, buildTrajectory, computeFindingId as computeFindingId$1, confidenceInterval, expandProfileAxes, makeFinding as makeFinding$1, pairedBootstrap, paretoFrontier, wilcoxonSignedRank, wilson } from "@tangle-network/agent-eval";
22
22
  import { heldoutSignificance, runProfileMatrix } from "@tangle-network/agent-eval/campaign";
@@ -7360,4 +7360,4 @@ function tail(s) {
7360
7360
  //#endregion
7361
7361
  export { equalKOnCost as $, chatWorkerSeam as A, completionAuthorizes as At, SandboxRunAbortError as B, auditIntent as Bt, withUntrackedArtifacts as C, defineLeaderboard as Ct, codeModeSupervisorTools as D, loopCampaignDispatch as Dt, runCoderChecks as E, inlineSandboxClient as Et, selectChampion as F, pairwiseSignificance as Ft, reconnectRetainedInteractiveRun as G, createMcpEnvironment as Gt, printBenchmarkReport as H, McpSpawnFault as Ht, assertStrategyContract as I, renderLeaderboardHtml as It, reconnectRetainedRun as J, mcpSecretEnvMetadataKey as Jt, recoverRetainedInteractiveRun as K, sanitizeMcpToolSchema as Kt, authorStrategy as L, renderLeaderboardMarkdown as Lt, discriminatingMeans as M, sentinelCompletion as Mt, pickChampion as N, stopSentinel as Nt, unsafeInProcessRunner as O, loopDispatch as Ot, runStrategyEvolution as P, leaderboard as Pt, promotionGate as Q, strategyAuthorContract as R, renderLeaderboardSvg as Rt, copyUntrackedIntoClone as S, harvestCorpus as St, patchDelivered as T, localSandboxClient as Tt, runBenchmark as U, connectStdioMcp as Ut, openSandboxRun as V, defaultAuditorInstruction as Vt, claimRetainedInteractiveControl as W, materializeLocalMcp as Wt, startRetainedRun as X, resolveSecretEnv as Xt, recoverRetainedRun as Y, resolveMcpServerLaunch as Yt, startRetainedRunInEnvironment as Z, secretEnvOfMcpServer as Zt, NOTE_MAX_CHARS as _, assertTraceDerivedFindings as _t, localShell as a, registerShape as at, composeWorkerEvidence as b, registryScopeAnalyst as bt, createVerifierEnvironment as c, renderCorpusToInstructions as ct, harvestSurfaceDiffs as d, loopUntil as dt, trajectoryReport as et, analystsFromRegistry as f, panel as ft, EVIDENCE_MAX_CHARS as g, widen as gt, worktreeFanout as h, verify as ht, jjWorkspace as i, createShapeRegistry as it, createChatSessionStore as j, deterministicCompletion as jt, chatTransportExecutor as k, superviseDispatch as kt, boxSurfaceReader as l, fanout as lt, superviseSurface as m, selectValidWinner as mt, makeFinding$1 as n, runPersonified as nt, runInWorkspace as o, FileCorpus as ot, failuresAnalyst as p, pipeline as pt, startRetainedInteractiveRun as q, envKeyProvider as qt, gitWorkspace as r, builtinShapes as rt, createWaterfallCollector as s, InMemoryCorpus as st, computeFindingId$1 as t, definePersona as tt, fsSurfaceReader as u, flatWidenGate as ut, VERIFY_TAIL_CHARS as v, buildSteerContext as vt, analyzeTrace as w, resolveSandboxClient as wt, settledWorkerOut as x, inProcessSandboxClient as xt, closingWorkerNote as y, createScopeAnalyst as yt, strategyAuthorSystemPrompt as z, renderPairwiseMarkdown as zt };
7362
7362
 
7363
- //# sourceMappingURL=runtime-l9Q9-Dal.js.map
7363
+ //# sourceMappingURL=runtime-CojgP-hr.js.map