@tangle-network/agent-runtime 0.103.1 → 0.104.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 +4 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +5 -5
- package/dist/analyst-loop.d.ts +1 -1
- package/dist/{chunk-TUSOOIDV.js → chunk-2QJSNOGK.js} +2 -2
- package/dist/{chunk-ZOYN3JR5.js → chunk-2UABGGUB.js} +3 -3
- package/dist/{chunk-6WZZXQV5.js → chunk-2X65HYMI.js} +1 -1
- package/dist/chunk-2X65HYMI.js.map +1 -0
- package/dist/{chunk-AAN2MB2X.js → chunk-3PPVCS75.js} +3 -3
- package/dist/chunk-3PPVCS75.js.map +1 -0
- package/dist/{chunk-EAQ5YRRY.js → chunk-5HNDYWUT.js} +39 -22
- package/dist/chunk-5HNDYWUT.js.map +1 -0
- package/dist/{chunk-3LJF5XSE.js → chunk-ATDFUJYI.js} +6 -6
- package/dist/chunk-ATDFUJYI.js.map +1 -0
- package/dist/{chunk-LFM4JBRW.js → chunk-FJI3EXU3.js} +46 -5
- package/dist/chunk-FJI3EXU3.js.map +1 -0
- package/dist/{chunk-5AITUUHO.js → chunk-HAO4CXHP.js} +2 -2
- package/dist/{chunk-M6MD6JBS.js → chunk-KRBFHMV6.js} +429 -1
- package/dist/chunk-KRBFHMV6.js.map +1 -0
- package/dist/{chunk-AYU35OTU.js → chunk-PZZKQVQV.js} +1 -1
- package/dist/chunk-PZZKQVQV.js.map +1 -0
- package/dist/{chunk-QYCKIV6C.js → chunk-STJEHM5F.js} +2 -2
- package/dist/{completion-gate-DLINnrkM.d.ts → completion-gate-Bv47cOnn.d.ts} +2 -2
- package/dist/{coordination-DTehA977.d.ts → coordination-CxtzMxSM.d.ts} +27 -27
- package/dist/environment-provider.d.ts +18 -7
- package/dist/environment-provider.js +3 -1
- package/dist/{improve-B40dRu0X.d.ts → improve--2A0gK1-.d.ts} +10 -4
- package/dist/index.d.ts +13 -13
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +46 -9
- package/dist/intelligence.js +117 -20
- package/dist/intelligence.js.map +1 -1
- package/dist/knowledge.d.ts +5 -5
- package/dist/knowledge.js +7 -7
- package/dist/{loop-runner-bin-DhIXsLAd.d.ts → loop-runner-bin-DUOGtvOl.d.ts} +3 -3
- package/dist/loop-runner-bin.d.ts +5 -5
- package/dist/loop-runner-bin.js +6 -6
- package/dist/loops.d.ts +66 -41
- package/dist/loops.js +9 -5
- package/dist/mcp/bin.js +4 -4
- package/dist/mcp/index.d.ts +6 -6
- package/dist/mcp/index.js +10 -10
- package/dist/mcp/index.js.map +1 -1
- package/dist/primeintellect/index.d.ts +1 -1
- package/dist/primeintellect/index.js.map +1 -1
- package/dist/profiles.d.ts +6 -6
- package/dist/profiles.js.map +1 -1
- package/dist/{structural-rollout-BFPIy3iw.d.ts → structural-rollout-C4mabf87.d.ts} +3 -3
- package/dist/{supervise-Cp8bNcJi.d.ts → supervise-7q9F5brx.d.ts} +3 -3
- package/dist/testing.js +8 -8
- package/dist/testing.js.map +1 -1
- package/dist/{types-DK11_O4L.d.ts → types-BCoemcXU.d.ts} +4 -4
- package/dist/{types-lZTE_LBd.d.ts → types-CvNwMzQt.d.ts} +4 -4
- package/dist/{worktree-fanout-DiiJWjJO.d.ts → worktree-fanout-WsOzt8qu.d.ts} +5 -5
- package/package.json +3 -3
- package/dist/chunk-3LJF5XSE.js.map +0 -1
- package/dist/chunk-6WZZXQV5.js.map +0 -1
- package/dist/chunk-AAN2MB2X.js.map +0 -1
- package/dist/chunk-AYU35OTU.js.map +0 -1
- package/dist/chunk-EAQ5YRRY.js.map +0 -1
- package/dist/chunk-LFM4JBRW.js.map +0 -1
- package/dist/chunk-M6MD6JBS.js.map +0 -1
- /package/dist/{chunk-TUSOOIDV.js.map → chunk-2QJSNOGK.js.map} +0 -0
- /package/dist/{chunk-ZOYN3JR5.js.map → chunk-2UABGGUB.js.map} +0 -0
- /package/dist/{chunk-5AITUUHO.js.map → chunk-HAO4CXHP.js.map} +0 -0
- /package/dist/{chunk-QYCKIV6C.js.map → chunk-STJEHM5F.js.map} +0 -0
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
defaultStructuralRolloutPolicy,
|
|
22
22
|
optimizerMethod
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-STJEHM5F.js";
|
|
24
24
|
import {
|
|
25
25
|
assertModelAllowed,
|
|
26
26
|
harnessInvocation,
|
|
27
27
|
runLocalHarness,
|
|
28
28
|
runSettledCommand
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-2X65HYMI.js";
|
|
30
30
|
import {
|
|
31
31
|
runAnalystLoop
|
|
32
32
|
} from "./chunk-FD2MBMOH.js";
|
|
@@ -1466,6 +1466,23 @@ function materializeImprovementProfileCandidate(profile, surface, winner, skills
|
|
|
1466
1466
|
}
|
|
1467
1467
|
return immutableCandidateValue(parsed.data);
|
|
1468
1468
|
}
|
|
1469
|
+
function profileImprovementAgent(input) {
|
|
1470
|
+
return (surfaceValue, scenario, ctx) => {
|
|
1471
|
+
const profile = materializeImprovementProfileCandidate(
|
|
1472
|
+
input.baselineProfile,
|
|
1473
|
+
input.surface,
|
|
1474
|
+
surfaceValue,
|
|
1475
|
+
input.skills
|
|
1476
|
+
);
|
|
1477
|
+
const dispatchedProfile = profile ?? (input.surface === "rollout-policy" && surfaceValue === "" ? input.baselineProfile : void 0);
|
|
1478
|
+
if (!dispatchedProfile) {
|
|
1479
|
+
throw new ConfigError(
|
|
1480
|
+
`improve(): surface '${input.surface}' cannot run through profileDispatch; use opts.agent for a non-profile surface`
|
|
1481
|
+
);
|
|
1482
|
+
}
|
|
1483
|
+
return input.dispatch(dispatchedProfile, scenario, ctx);
|
|
1484
|
+
};
|
|
1485
|
+
}
|
|
1469
1486
|
function inlineSkill(profile, options) {
|
|
1470
1487
|
const resourceName = options?.resourceName.trim();
|
|
1471
1488
|
if (!resourceName) {
|
|
@@ -1515,6 +1532,8 @@ async function improve(profile, findings, opts) {
|
|
|
1515
1532
|
const {
|
|
1516
1533
|
surface = "prompt",
|
|
1517
1534
|
gate = "holdout",
|
|
1535
|
+
agent,
|
|
1536
|
+
profileDispatch,
|
|
1518
1537
|
generator,
|
|
1519
1538
|
allowedModels,
|
|
1520
1539
|
rawTraceContext,
|
|
@@ -1530,6 +1549,18 @@ async function improve(profile, findings, opts) {
|
|
|
1530
1549
|
`improve(): input is not a valid AgentProfile: ${parsedProfile.error.message}`
|
|
1531
1550
|
);
|
|
1532
1551
|
}
|
|
1552
|
+
if (agent !== void 0 && profileDispatch !== void 0) {
|
|
1553
|
+
throw new ConfigError("improve(): provide exactly one of opts.agent or opts.profileDispatch");
|
|
1554
|
+
}
|
|
1555
|
+
if (agent === void 0 && profileDispatch === void 0) {
|
|
1556
|
+
throw new ConfigError("improve(): provide exactly one of opts.agent or opts.profileDispatch");
|
|
1557
|
+
}
|
|
1558
|
+
const baselineProfile = immutableCandidateValue(parsedProfile.data);
|
|
1559
|
+
if (profileDispatch && surface === "code") {
|
|
1560
|
+
throw new ConfigError(
|
|
1561
|
+
"improve(): surface 'code' cannot use profileDispatch because code candidates require isolated worktree execution; use opts.agent"
|
|
1562
|
+
);
|
|
1563
|
+
}
|
|
1533
1564
|
if (surface === "code" && generator) {
|
|
1534
1565
|
throw new ConfigError(
|
|
1535
1566
|
"improve(): surface 'code' forbids opts.generator because an external SurfaceProposer cannot transfer checkout ownership; pass opts.code.generator instead"
|
|
@@ -1555,11 +1586,21 @@ async function improve(profile, findings, opts) {
|
|
|
1555
1586
|
);
|
|
1556
1587
|
}
|
|
1557
1588
|
const budget = gate === "none" ? { ...sharedOptions.budget, generations: 0 } : { ...sharedOptions.budget };
|
|
1589
|
+
const effectiveAgent = profileDispatch === void 0 ? agent : profileImprovementAgent({
|
|
1590
|
+
baselineProfile,
|
|
1591
|
+
surface,
|
|
1592
|
+
...skills === void 0 ? {} : { skills },
|
|
1593
|
+
dispatch: profileDispatch
|
|
1594
|
+
});
|
|
1595
|
+
if (!effectiveAgent) {
|
|
1596
|
+
throw new ConfigError("improve(): provide exactly one of opts.agent or opts.profileDispatch");
|
|
1597
|
+
}
|
|
1558
1598
|
let raw;
|
|
1559
1599
|
try {
|
|
1560
1600
|
raw = await selfImprove({
|
|
1561
1601
|
...sharedOptions,
|
|
1562
|
-
|
|
1602
|
+
agent: effectiveAgent,
|
|
1603
|
+
baselineSurface: preparedCode?.baseline ?? baselineSurfaceFor(baselineProfile, surface, skills),
|
|
1563
1604
|
proposer,
|
|
1564
1605
|
budget,
|
|
1565
1606
|
findings,
|
|
@@ -1598,7 +1639,7 @@ async function improve(profile, findings, opts) {
|
|
|
1598
1639
|
}
|
|
1599
1640
|
const dispose = idempotentDispose(async () => preparedCode?.cleanup());
|
|
1600
1641
|
const candidateProfile = materializeImprovementProfileCandidate(
|
|
1601
|
-
|
|
1642
|
+
baselineProfile,
|
|
1602
1643
|
surface,
|
|
1603
1644
|
winnerSurface,
|
|
1604
1645
|
skills
|
|
@@ -2358,4 +2399,4 @@ export {
|
|
|
2358
2399
|
verifyAgentImprovementActivation,
|
|
2359
2400
|
verifyCandidateExecutionEvidence
|
|
2360
2401
|
};
|
|
2361
|
-
//# sourceMappingURL=chunk-
|
|
2402
|
+
//# sourceMappingURL=chunk-FJI3EXU3.js.map
|