@tangle-network/agent-runtime 0.168.0 → 0.170.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/dist/{activation-CIwer0zU.js → activation-8RxHIo02.js} +2 -2
- package/dist/{activation-CIwer0zU.js.map → activation-8RxHIo02.js.map} +1 -1
- package/dist/agent.js +1 -1
- package/dist/authored-code-C2TGxNtf.js +44 -0
- package/dist/authored-code-C2TGxNtf.js.map +1 -0
- package/dist/graph.d.ts +94 -22
- package/dist/graph.js +155 -1
- package/dist/graph.js.map +1 -1
- package/dist/{improvement-cycle-BAKN_f4x.js → improvement-cycle-BYCnKZ_G.js} +24 -3
- package/dist/improvement-cycle-BYCnKZ_G.js.map +1 -0
- package/dist/index.js +4 -4
- package/dist/intelligence.js +2 -2
- package/dist/kernel.js +1 -1
- package/dist/{knowledge-D-7PXKUV.js → knowledge-D3211Z_x.js} +2 -2
- package/dist/{knowledge-D-7PXKUV.js.map → knowledge-D3211Z_x.js.map} +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{loop-runner-bin-DHxQ_VQD.js → loop-runner-bin-B_g5JOKA.js} +2 -2
- package/dist/{loop-runner-bin-DHxQ_VQD.js.map → loop-runner-bin-B_g5JOKA.js.map} +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/{runtime-D5l-enW9.js → runtime-C-7uhhFs.js} +3 -13
- package/dist/{runtime-D5l-enW9.js.map → runtime-C-7uhhFs.js.map} +1 -1
- package/dist/testing.js +9 -9
- package/package.json +1 -1
- package/skills/codemode/SKILL.md +48 -0
- package/dist/improvement-cycle-BAKN_f4x.js.map +0 -1
package/dist/testing.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ct as immutableCandidateValue, et as parseExactAgentProfile, it as canonicalCandidateDigest$1, q as applyExactAgentProfileDiff } from "./prepare-BAyaNoZu.js";
|
|
2
|
-
import { f as verifyAgentImprovementProposal } from "./improvement-cycle-
|
|
2
|
+
import { f as verifyAgentImprovementProposal } from "./improvement-cycle-BYCnKZ_G.js";
|
|
3
3
|
import { c as supervisorAgentWithTestBrain, ft as driverAgent, r as superviseWithTestBrain } from "./supervise-rEE46ruH.js";
|
|
4
4
|
import { i as runGraphWithTestBrain } from "./graph-ZDMygFIo.js";
|
|
5
5
|
import { SANDBOX_SIZE_PRESET_NAMES } from "@tangle-network/agent-interface";
|
|
6
6
|
//#region src/testing/fixtures/agent-improvement-proposal.json
|
|
7
7
|
var agent_improvement_proposal_default = {
|
|
8
8
|
changedSurfaces: ["prompt"],
|
|
9
|
-
digest: "sha256:
|
|
9
|
+
digest: "sha256:62b716af557ebbb5fb1ac82cb343bef5d5d9333afc4dffaa642ef03a8023b047",
|
|
10
10
|
evaluation: {
|
|
11
11
|
"decision": {
|
|
12
12
|
"contributingChecks": [
|
|
@@ -4577,7 +4577,7 @@ var agent_improvement_proposal_default = {
|
|
|
4577
4577
|
],
|
|
4578
4578
|
"metadata": {
|
|
4579
4579
|
"fixture": "agent-improvement-proposal",
|
|
4580
|
-
"runtimeVersion": "0.
|
|
4580
|
+
"runtimeVersion": "0.170.0"
|
|
4581
4581
|
},
|
|
4582
4582
|
"objectives": [
|
|
4583
4583
|
{
|
|
@@ -4688,8 +4688,8 @@ var agent_improvement_proposal_default = {
|
|
|
4688
4688
|
"baselineContentHash": "sha256:5c21ee53e513fc604cb09754e21c392b24a424da0ef37dbf8f1ee4a8a0b08f09",
|
|
4689
4689
|
"candidateContentHash": "sha256:60fcbb1c728194bd51d7d19cb732d1c3f1881dce7e0a6266b41c8b98cfd65693",
|
|
4690
4690
|
"kind": "agent-eval-loop",
|
|
4691
|
-
"recordDigest": "sha256:
|
|
4692
|
-
"runId": "agent-runtime-0.
|
|
4691
|
+
"recordDigest": "sha256:9d28a3e26e57d69dd9798413154f710161b43b635bf0b19f182aa87fb3c390af",
|
|
4692
|
+
"runId": "agent-runtime-0.170.0-proposal-fixture",
|
|
4693
4693
|
"schema": "agent-candidate-experiment"
|
|
4694
4694
|
}
|
|
4695
4695
|
},
|
|
@@ -4712,13 +4712,13 @@ var agent_improvement_proposal_default = {
|
|
|
4712
4712
|
}],
|
|
4713
4713
|
kind: "agent-improvement-proposal",
|
|
4714
4714
|
proposedAt: "2026-07-10T01:00:00.000Z",
|
|
4715
|
-
runId: "agent-runtime-0.
|
|
4715
|
+
runId: "agent-runtime-0.170.0-proposal-fixture"
|
|
4716
4716
|
};
|
|
4717
4717
|
//#endregion
|
|
4718
4718
|
//#region src/testing/fixtures/agent-profile-improvement-proposal.json
|
|
4719
4719
|
var agent_profile_improvement_proposal_default = {
|
|
4720
4720
|
changedSurfaces: ["prompt", "skills"],
|
|
4721
|
-
digest: "sha256:
|
|
4721
|
+
digest: "sha256:6f1d98a819ac4bb1c873eb79ea0e430acee97f1dd11714dacb32b27b9f46748c",
|
|
4722
4722
|
evaluation: {
|
|
4723
4723
|
"decision": {
|
|
4724
4724
|
"contributingChecks": [
|
|
@@ -6352,7 +6352,7 @@ var agent_profile_improvement_proposal_default = {
|
|
|
6352
6352
|
],
|
|
6353
6353
|
"metadata": {
|
|
6354
6354
|
"fixture": "agent-profile-improvement-proposal",
|
|
6355
|
-
"runtimeVersion": "0.
|
|
6355
|
+
"runtimeVersion": "0.170.0"
|
|
6356
6356
|
},
|
|
6357
6357
|
"objectives": [
|
|
6358
6358
|
{
|
|
@@ -6463,7 +6463,7 @@ var agent_profile_improvement_proposal_default = {
|
|
|
6463
6463
|
"baselineContentHash": "sha256:21c495a37c418c10bde64fbaa188beddeed31f1f051ea60a6a6582a9ee0db704",
|
|
6464
6464
|
"candidateContentHash": "sha256:103f77bc8481601eef1ad5fe6ba84a40dffabc3a44f421f8c8559121edab84e9",
|
|
6465
6465
|
"kind": "agent-eval-loop",
|
|
6466
|
-
"recordDigest": "sha256:
|
|
6466
|
+
"recordDigest": "sha256:1e7e4b7cf942418b42ccb1eae9db4c237bce187aac1d8ac2fb63e76367e9e6c4",
|
|
6467
6467
|
"runId": "profile-improvement-1",
|
|
6468
6468
|
"schema": "agent-profile-improvement-experiment"
|
|
6469
6469
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.170.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": {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codemode
|
|
3
|
+
description: Batch mechanical tool work as one program so loops and intermediates stay out of context.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Codemode
|
|
7
|
+
|
|
8
|
+
Use this policy when a task needs three or more mechanical tool or command calls whose intermediate results need no judgment.
|
|
9
|
+
One call per model turn spends a round trip per step and pushes every intermediate value through the context window.
|
|
10
|
+
Write one program instead: the loop, the branch, and the intermediates stay in the program, and only the decision-relevant summary returns.
|
|
11
|
+
|
|
12
|
+
This is the pattern the ecosystem calls code mode (Cloudflare's Code Mode, Anthropic's code execution with MCP, the CodeAct paper).
|
|
13
|
+
In a coding harness you already have the whole capability: a shell, a filesystem, and the tools this profile grants.
|
|
14
|
+
|
|
15
|
+
## Run The Work
|
|
16
|
+
|
|
17
|
+
1. List the calls the task needs and mark which results require your judgment.
|
|
18
|
+
2. Put every judgment-free stretch into one script; keep each judgment point in your own turn.
|
|
19
|
+
3. Hold intermediates in variables or files inside the workspace, never in your reply.
|
|
20
|
+
4. Make the script print only the decision-relevant summary: counts, failures, the final value.
|
|
21
|
+
5. Prefer one script that fans out over N items to N separate tool calls with identical shape.
|
|
22
|
+
6. Stop batching the moment a result changes what you would do next; read it, decide, then batch again.
|
|
23
|
+
|
|
24
|
+
## Boundaries That Are Not Yours To Move
|
|
25
|
+
|
|
26
|
+
Spawning, steering, and settling agents go through your coordination tools, never through a script.
|
|
27
|
+
A script that reaches those verbs over HTTP bypasses the budget pool and the journal, so the run's spend and record lie.
|
|
28
|
+
An operation that costs money must run where the runtime meters it; do not wrap metered work in a script that hides the spend.
|
|
29
|
+
The lint on authored code refuses imports, `process`, and network access; it is a lint, not a sandbox, so treat generated code you did not review as untrusted.
|
|
30
|
+
|
|
31
|
+
## Router-Brained Agents
|
|
32
|
+
|
|
33
|
+
A raw chat model has no shell, so this policy does not apply to it directly.
|
|
34
|
+
Give such a node a code action space with the graph engine's `codemode` kind: an `operations` table projects the API the model sees, a host `codeRunner` executes, and each operation's spend reaches the settlement.
|
|
35
|
+
A supervisor that only needs one small computation can carry an `extraTools` entry instead of a codemode node.
|
|
36
|
+
|
|
37
|
+
## Common Mistakes
|
|
38
|
+
|
|
39
|
+
- Batching a step whose output should have changed your plan, then discovering it three steps later.
|
|
40
|
+
- Printing a whole dataset into the reply instead of writing it to a file and printing the summary.
|
|
41
|
+
- Re-running an expensive script to re-read a value the first run already produced; write results to files.
|
|
42
|
+
- Moving supervision into a script because the coordination verbs are reachable over local HTTP.
|
|
43
|
+
|
|
44
|
+
## Then consider
|
|
45
|
+
|
|
46
|
+
- `supervise` when the batched work is really delegation to workers with their own judgment.
|
|
47
|
+
- `agent-graphs` when the shape of the work is a fixed topology rather than one agent's loop.
|
|
48
|
+
- `loop-writer` when no shipped composition API can express the control policy you need.
|