@tangle-network/agent-runtime 0.92.0 → 0.93.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.
- package/README.md +14 -4
- package/dist/agent.js +47 -45
- package/dist/agent.js.map +1 -1
- package/dist/candidate-execution/index.d.ts +48 -4
- package/dist/candidate-execution/index.js +6 -2
- package/dist/{chunk-A62TP7SK.js → chunk-26WCEARH.js} +295 -40
- package/dist/chunk-26WCEARH.js.map +1 -0
- package/dist/{chunk-PH65PR4F.js → chunk-3VU2OWOY.js} +106 -2
- package/dist/chunk-3VU2OWOY.js.map +1 -0
- package/dist/{chunk-I7WVPJBZ.js → chunk-BVVRQ4YC.js} +4 -4
- package/dist/{chunk-3BE7KTMU.js → chunk-FDJ7AHXG.js} +2 -2
- package/dist/{chunk-APVPRF4Y.js → chunk-J2K6WIG6.js} +13 -7
- package/dist/{chunk-APVPRF4Y.js.map → chunk-J2K6WIG6.js.map} +1 -1
- package/dist/{chunk-7VJJJ2T2.js → chunk-LQQPGRKT.js} +2 -2
- package/dist/{chunk-IGGZGKJD.js → chunk-P6B3Z7PR.js} +3 -3
- package/dist/{chunk-GDAQUFG6.js → chunk-R5GWDTM3.js} +2 -2
- package/dist/{chunk-AUEIDTR3.js → chunk-TKJ3Q6CQ.js} +2 -2
- package/dist/{chunk-6O5USWVH.js → chunk-UO2L5VTP.js} +2 -2
- package/dist/{chunk-RSWM2ZKM.js → chunk-VMHKMNEU.js} +40 -11
- package/dist/chunk-VMHKMNEU.js.map +1 -0
- package/dist/{improve-CUVCq7xg.d.ts → improve-DDhQaaJT.d.ts} +17 -5
- package/dist/index.d.ts +3 -3
- package/dist/index.js +14 -10
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +6 -8
- package/dist/intelligence.js +25 -134
- package/dist/intelligence.js.map +1 -1
- package/dist/knowledge.js +3 -3
- package/dist/loop-runner-bin.js +5 -5
- package/dist/loops.js +4 -4
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.js +6 -6
- package/dist/{prepare-Z08a4heC.d.ts → prepare-DiVGKcwS.d.ts} +7 -2
- package/package.json +33 -19
- package/skills/build-with-agent-runtime/SKILL.md +2 -1
- package/dist/chunk-A62TP7SK.js.map +0 -1
- package/dist/chunk-PH65PR4F.js.map +0 -1
- package/dist/chunk-RSWM2ZKM.js.map +0 -1
- /package/dist/{chunk-I7WVPJBZ.js.map → chunk-BVVRQ4YC.js.map} +0 -0
- /package/dist/{chunk-3BE7KTMU.js.map → chunk-FDJ7AHXG.js.map} +0 -0
- /package/dist/{chunk-7VJJJ2T2.js.map → chunk-LQQPGRKT.js.map} +0 -0
- /package/dist/{chunk-IGGZGKJD.js.map → chunk-P6B3Z7PR.js.map} +0 -0
- /package/dist/{chunk-GDAQUFG6.js.map → chunk-R5GWDTM3.js.map} +0 -0
- /package/dist/{chunk-AUEIDTR3.js.map → chunk-TKJ3Q6CQ.js.map} +0 -0
- /package/dist/{chunk-6O5USWVH.js.map → chunk-UO2L5VTP.js.map} +0 -0
package/dist/knowledge.js
CHANGED
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
knowledgeReadinessDeliverable,
|
|
7
7
|
runKnowledgeImprovementJob,
|
|
8
8
|
runSupervisedKnowledgeUpdate
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LQQPGRKT.js";
|
|
10
10
|
import "./chunk-5QOB7H74.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-UO2L5VTP.js";
|
|
12
12
|
import "./chunk-DPEUKJRO.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-J2K6WIG6.js";
|
|
14
14
|
import "./chunk-3D2RHC4K.js";
|
|
15
15
|
import "./chunk-VSWBYWFK.js";
|
|
16
16
|
import "./chunk-3MDZX7YU.js";
|
package/dist/loop-runner-bin.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
parseLoopRunnerArgv,
|
|
4
4
|
runLoopRunnerCli
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-P6B3Z7PR.js";
|
|
6
6
|
import "./chunk-SGKPNBXE.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-BVVRQ4YC.js";
|
|
8
|
+
import "./chunk-FDJ7AHXG.js";
|
|
9
9
|
import "./chunk-ZQZX77MM.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-UO2L5VTP.js";
|
|
11
11
|
import "./chunk-DPEUKJRO.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-J2K6WIG6.js";
|
|
13
13
|
import "./chunk-3D2RHC4K.js";
|
|
14
14
|
import "./chunk-VSWBYWFK.js";
|
|
15
15
|
import "./chunk-3MDZX7YU.js";
|
package/dist/loops.js
CHANGED
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
watchTrace,
|
|
79
79
|
widen,
|
|
80
80
|
worktreeFanout
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-BVVRQ4YC.js";
|
|
82
82
|
import {
|
|
83
83
|
adaptiveRefine,
|
|
84
84
|
breadthStrategy,
|
|
@@ -104,7 +104,7 @@ import {
|
|
|
104
104
|
selectBestIndex,
|
|
105
105
|
structuralRollout,
|
|
106
106
|
visibleCheckScore
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-FDJ7AHXG.js";
|
|
108
108
|
import {
|
|
109
109
|
acquireSandbox,
|
|
110
110
|
asAuthoredProfile,
|
|
@@ -133,7 +133,7 @@ import {
|
|
|
133
133
|
supervisorAgent,
|
|
134
134
|
supervisorInstructions,
|
|
135
135
|
workerFromBackend
|
|
136
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-UO2L5VTP.js";
|
|
137
137
|
import "./chunk-DPEUKJRO.js";
|
|
138
138
|
import {
|
|
139
139
|
assertModelAllowed,
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
routerToolLoop,
|
|
147
147
|
settledToIteration,
|
|
148
148
|
spendFromUsageEvents
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-J2K6WIG6.js";
|
|
150
150
|
import {
|
|
151
151
|
InMemoryResultBlobStore,
|
|
152
152
|
InMemorySpawnJournal,
|
package/dist/mcp/bin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readTraceContextFromEnv
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-R5GWDTM3.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveRouterBaseUrl
|
|
7
7
|
} from "../chunk-NURIQBJQ.js";
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
DelegationTaskQueue,
|
|
10
10
|
FileDelegationStore,
|
|
11
11
|
createMcpServer
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-UO2L5VTP.js";
|
|
13
13
|
import "../chunk-DPEUKJRO.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-J2K6WIG6.js";
|
|
15
15
|
import "../chunk-3D2RHC4K.js";
|
|
16
16
|
import "../chunk-VSWBYWFK.js";
|
|
17
17
|
import "../chunk-3MDZX7YU.js";
|
package/dist/mcp/index.js
CHANGED
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
createPropagatingTraceEmitter,
|
|
6
6
|
readTraceContextFromEnv,
|
|
7
7
|
traceContextToEnv
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-R5GWDTM3.js";
|
|
9
9
|
import {
|
|
10
10
|
mcpToolsForRuntimeMcp,
|
|
11
11
|
mcpToolsForRuntimeMcpSubset
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-TKJ3Q6CQ.js";
|
|
13
13
|
import {
|
|
14
14
|
createKbGate
|
|
15
15
|
} from "../chunk-SGKPNBXE.js";
|
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
assertTraceDerivedFindings,
|
|
18
18
|
runCoderChecks,
|
|
19
19
|
selectValidWinner
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-
|
|
20
|
+
} from "../chunk-BVVRQ4YC.js";
|
|
21
|
+
import "../chunk-FDJ7AHXG.js";
|
|
22
22
|
import {
|
|
23
23
|
DELEGATE_DESCRIPTION,
|
|
24
24
|
DELEGATE_FEEDBACK_DESCRIPTION,
|
|
@@ -68,9 +68,9 @@ import {
|
|
|
68
68
|
validateDelegateUiAuditArgs,
|
|
69
69
|
validateDelegationHistoryArgs,
|
|
70
70
|
validateDelegationStatusArgs
|
|
71
|
-
} from "../chunk-
|
|
71
|
+
} from "../chunk-UO2L5VTP.js";
|
|
72
72
|
import "../chunk-DPEUKJRO.js";
|
|
73
|
-
import "../chunk-
|
|
73
|
+
import "../chunk-J2K6WIG6.js";
|
|
74
74
|
import "../chunk-3D2RHC4K.js";
|
|
75
75
|
import "../chunk-VSWBYWFK.js";
|
|
76
76
|
import {
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import { AgentCandidateBundle, AgentCandidateArtifactRef, AgentCandidateTermination, AgentCandidateTaskOutcomeEvidence, Sha256Digest, AgentCandidateContainer, AgentCandidateOciPlatform, AgentCandidateGitHubRepository, AgentCandidateWorkspaceSnapshotEvidence, AgentCandidateResolvedModel, AgentCandidateAttemptPolicy, AgentCandidateExecutionLimits, AgentCandidateModelAccessNetwork, AgentCandidateCapturedArtifact, AgentCandidateWorkspaceManifestMaterialV1, AgentCandidateProfilePlanEvidence, AgentCandidateExecutionPlanEvidence, AgentCandidateMaterializationReceipt, AgentCandidateInstructionDelivery, AgentCandidateEffectiveMemory, AgentCandidateRunReceiptV2, AgentCandidateSpend, ReasoningEffort } from '@tangle-network/agent-interface';
|
|
1
2
|
import { BenchmarkEvaluation, TraceStore } from '@tangle-network/agent-eval';
|
|
2
|
-
|
|
3
|
+
|
|
4
|
+
/** Exact candidate wire shape before the runtime computes its canonical digest. */
|
|
5
|
+
type AgentCandidateBundleInput = Omit<AgentCandidateBundle, 'digest'>;
|
|
6
|
+
/** Validate and content-address a candidate bundle before it crosses an approval boundary. */
|
|
7
|
+
declare function sealAgentCandidateBundle(input: AgentCandidateBundleInput): AgentCandidateBundle;
|
|
3
8
|
|
|
4
9
|
declare const verifiedCandidateBrand: unique symbol;
|
|
5
10
|
declare const preparedCandidateBrand: unique symbol;
|
|
@@ -710,4 +715,4 @@ interface PrepareAgentCandidateExecutionOptions {
|
|
|
710
715
|
/** Materializes a verified candidate into one immutable evaluator-owned execution plan. */
|
|
711
716
|
declare function prepareAgentCandidateExecution(candidate: VerifiedAgentCandidate, task: AgentCandidateTaskExecution, ports: AgentCandidateExecutionPorts, options?: PrepareAgentCandidateExecutionOptions): Promise<PreparedAgentCandidateExecution>;
|
|
712
717
|
|
|
713
|
-
export {
|
|
718
|
+
export { InMemoryAgentCandidateExecutionClaimStore as $, type AgentCandidateTaskExecution as A, type AgentCandidateExecutorProfileFile as B, type AgentCandidateExecutorRequest as C, type AgentCandidateExecutorStopRequest as D, type ExecutePreparedAgentCandidateOptions as E, type AgentCandidateExecutorTaskOutcomeCapture as F, type AgentCandidateExecutorWorkspaceFile as G, type AgentCandidateExecutorWorkspaceInput as H, type AgentCandidateMemoryPort as I, type AgentCandidateMemoryResetResult as J, type AgentCandidateModelLimits as K, type AgentCandidateModelPort as L, type AgentCandidateOutputArtifactPort as M, type AgentCandidateOutputPurpose as N, type AgentCandidateProtectedModelActivation as O, type PrepareAgentCandidateExecutionOptions as P, type AgentCandidateProtectedModelCall as Q, type AgentCandidateProtectedModelReservation as R, type AgentCandidateProtectedModelSettlement as S, type AgentCandidateProtectedRunCapture as T, type AgentCandidateRepositoryPort as U, type AgentCandidateRetryRejection as V, type AgentCandidateVerificationPorts as W, type AgentCandidateWorkspacePort as X, CANDIDATE_TRACE_ENV as Y, CANDIDATE_TRACE_TAGS as Z, type CanonicalCandidateDocument as _, type AgentCandidateExecutionPorts as a, type PreparedAgentCandidateExecution as a0, type PreparedAgentCandidateInstruction as a1, type PreparedAgentCandidateLaunch as a2, type PreparedAgentCandidateTrace as a3, type ResolvedAgentCandidateContainer as a4, type VerifiedAgentCandidate as a5, type VerifiedAgentCandidateTaskOutcome as a6, executePreparedAgentCandidate as a7, prepareAgentCandidateExecution as a8, sealAgentCandidateBundle as a9, type AgentCandidateRunFinalization as b, type AgentCandidateBundleInput as c, type AgentCandidateArtifactPort as d, type AgentCandidateBenchmarkGraderIdentity as e, type AgentCandidateBenchmarkGraderPort as f, type AgentCandidateContainerPort as g, type AgentCandidateExecutionAttemptRecord as h, type AgentCandidateExecutionAttemptRef as i, type AgentCandidateExecutionClaim as j, type AgentCandidateExecutionClaimResult as k, type AgentCandidateExecutionClaimStore as l, type AgentCandidateExecutionCleanupHandles as m, type AgentCandidateExecutionFailureClass as n, type AgentCandidateExecutionFinishResult as o, type AgentCandidateExecutionLease as p, type AgentCandidateExecutionPhase as q, type AgentCandidateExecutionPhaseResult as r, type AgentCandidateExecutionRecoveryEvidence as s, type AgentCandidateExecutionStageResult as t, type AgentCandidateExecutionTerminalRecord as u, type AgentCandidateExecutionTerminalResult as v, type AgentCandidateExecutionUsage as w, type AgentCandidateExecutorFinalCapture as x, type AgentCandidateExecutorMemoryCapture as y, type AgentCandidateExecutorPort as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.93.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": {
|
|
@@ -87,9 +87,24 @@
|
|
|
87
87
|
"publishConfig": {
|
|
88
88
|
"access": "public"
|
|
89
89
|
},
|
|
90
|
+
"scripts": {
|
|
91
|
+
"build": "tsup",
|
|
92
|
+
"dev": "tsup --watch",
|
|
93
|
+
"prepare": "(git rev-parse --git-dir > /dev/null 2>&1 && git config core.hooksPath .githooks) || true; tsup",
|
|
94
|
+
"test": "vitest run",
|
|
95
|
+
"test:watch": "vitest",
|
|
96
|
+
"lint": "biome check src tests examples",
|
|
97
|
+
"lint:fix": "biome check --write src tests examples",
|
|
98
|
+
"typecheck": "tsc --noEmit && pnpm run typecheck:examples",
|
|
99
|
+
"typecheck:examples": "tsc --noEmit -p tsconfig.examples.json",
|
|
100
|
+
"verify:package": "node scripts/verify-package-exports.mjs",
|
|
101
|
+
"docs:api": "typedoc && node scripts/gen-primitive-catalog.mjs",
|
|
102
|
+
"docs:freshness": "node scripts/check-docs-freshness.mjs",
|
|
103
|
+
"docs:check": "pnpm run docs:api && git diff --exit-code -- docs/api && pnpm run docs:freshness"
|
|
104
|
+
},
|
|
90
105
|
"devDependencies": {
|
|
91
106
|
"@biomejs/biome": "^2.4.15",
|
|
92
|
-
"@tangle-network/agent-eval": "^0.
|
|
107
|
+
"@tangle-network/agent-eval": "^0.114.0",
|
|
93
108
|
"@tangle-network/agent-interface": "^0.25.0",
|
|
94
109
|
"@tangle-network/sandbox": "^0.9.7",
|
|
95
110
|
"@types/node": "^25.9.3",
|
|
@@ -101,12 +116,25 @@
|
|
|
101
116
|
"typescript": "^5.7.0",
|
|
102
117
|
"vitest": "^3.0.0"
|
|
103
118
|
},
|
|
119
|
+
"pnpm": {
|
|
120
|
+
"minimumReleaseAge": 4320,
|
|
121
|
+
"minimumReleaseAgeExclude": [
|
|
122
|
+
"@tangle-network/agent-eval",
|
|
123
|
+
"@tangle-network/agent-interface",
|
|
124
|
+
"@tangle-network/agent-profile-materialize",
|
|
125
|
+
"@tangle-network/sandbox"
|
|
126
|
+
],
|
|
127
|
+
"onlyBuiltDependencies": [
|
|
128
|
+
"esbuild"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
104
131
|
"engines": {
|
|
105
132
|
"node": ">=20"
|
|
106
133
|
},
|
|
107
134
|
"license": "MIT",
|
|
135
|
+
"packageManager": "pnpm@10.28.0",
|
|
108
136
|
"peerDependencies": {
|
|
109
|
-
"@tangle-network/agent-eval": ">=0.
|
|
137
|
+
"@tangle-network/agent-eval": ">=0.114.0 <1.0.0",
|
|
110
138
|
"@tangle-network/agent-interface": ">=0.25.0 <1.0.0",
|
|
111
139
|
"@tangle-network/sandbox": ">=0.8.0 <1.0.0",
|
|
112
140
|
"playwright": "^1.40.0"
|
|
@@ -121,20 +149,6 @@
|
|
|
121
149
|
},
|
|
122
150
|
"dependencies": {
|
|
123
151
|
"@tangle-network/agent-knowledge": "^1.11.2",
|
|
124
|
-
"@tangle-network/agent-profile-materialize": "0.3.
|
|
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"
|
|
152
|
+
"@tangle-network/agent-profile-materialize": "0.3.2"
|
|
139
153
|
}
|
|
140
|
-
}
|
|
154
|
+
}
|
|
@@ -92,7 +92,8 @@ 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
|
-
| **
|
|
95
|
+
| **Freeze a measured profile/diff + code surface for execution** | `buildAgentCandidateBundle(...)` then `verifyAgentCandidateBundle(...)` — `/candidate-execution` | canonical-api §2 |
|
|
96
|
+
| **Optimize any agent/code surface** (one call) — START HERE | `improve(profile, findings, { surface, gate })` — root `.`; prompt, skill-document, and curated-memory 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
97
|
| **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
98
|
| **Gate: ship/hold from a `BenchmarkReport`** (per-task cells) | `promotionGate({ report, incumbent, candidate })` — `/loops` | canonical-api §3.4 |
|
|
98
99
|
| **Run the full multi-generation flywheel + certify** | `runStrategyEvolution(config)` — `/loops` | canonical-api §3.4 |
|