@tangle-network/agent-runtime 0.94.5 → 0.94.7
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/agent.d.ts +1 -1
- package/dist/agent.js +4 -4
- package/dist/{agentic-generator-CL1q0H91.d.ts → agentic-generator-1g7GDba7.d.ts} +73 -6
- package/dist/analyst-loop.d.ts +1 -1
- package/dist/analyst-loop.js +2 -2
- package/dist/candidate-execution/index.d.ts +39 -4
- package/dist/candidate-execution/index.js +8 -2
- package/dist/{chunk-MZH4HORF.js → chunk-5BT2NMML.js} +689 -3
- package/dist/chunk-5BT2NMML.js.map +1 -0
- package/dist/{chunk-GKZ6DFDN.js → chunk-7HH22XN4.js} +105 -27
- package/dist/chunk-7HH22XN4.js.map +1 -0
- package/dist/{chunk-JMT5VYY3.js → chunk-7NCP74SL.js} +174 -48
- package/dist/chunk-7NCP74SL.js.map +1 -0
- package/dist/{chunk-WQA5Y6PD.js → chunk-EP6RVHMX.js} +3 -3
- package/dist/chunk-EP6RVHMX.js.map +1 -0
- package/dist/{chunk-LWNMCOEA.js → chunk-FRXDOBFP.js} +3 -3
- package/dist/chunk-GHXW56PO.js +526 -0
- package/dist/chunk-GHXW56PO.js.map +1 -0
- package/dist/{chunk-KHLE3C5G.js → chunk-HKMKUESZ.js} +169 -50
- package/dist/chunk-HKMKUESZ.js.map +1 -0
- package/dist/{chunk-63TIZHMI.js → chunk-KYPVUEJ4.js} +4 -4
- package/dist/{chunk-FVJ7M3DA.js → chunk-M22PL4GH.js} +1 -1
- package/dist/chunk-M22PL4GH.js.map +1 -0
- package/dist/{chunk-4VMRCEI6.js → chunk-MSUWXCHD.js} +2 -2
- package/dist/{chunk-ZQZX77MM.js → chunk-QDSOD7RC.js} +2 -2
- package/dist/{chunk-RNWDH5Z3.js → chunk-TNUBPPZA.js} +2 -2
- package/dist/{completion-gate-CfX2thvL.d.ts → completion-gate-tzwyyD-E.d.ts} +2 -2
- package/dist/{coordination-pOGZuYS7.d.ts → coordination-o0TzS7Ms.d.ts} +5 -5
- package/dist/environment-provider.d.ts +2 -2
- package/dist/{improve-Ciuvu2jh.d.ts → improve-DZeatcs7.d.ts} +19 -8
- package/dist/index.d.ts +22 -19
- package/dist/index.js +45 -22
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +7 -7
- package/dist/intelligence.js +42 -18
- package/dist/intelligence.js.map +1 -1
- package/dist/knowledge.d.ts +7 -7
- package/dist/knowledge.js +4 -4
- package/dist/lifecycle.d.ts +3 -3
- package/dist/lifecycle.js +2 -2
- package/dist/{local-harness-CePtFrwu.d.ts → local-harness-ZLMkKdZc.d.ts} +1 -1
- package/dist/{loop-runner-bin-B4PwjVaF.d.ts → loop-runner-bin-iTSxSmpv.d.ts} +2 -2
- package/dist/loop-runner-bin.d.ts +6 -6
- package/dist/loop-runner-bin.js +6 -6
- package/dist/loops.d.ts +36 -23
- package/dist/loops.js +4 -4
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +10 -10
- package/dist/mcp/index.js +5 -5
- package/dist/{mcp-serve-verifier-D7hCZIkT.d.ts → mcp-serve-verifier-BO4MEsR3.d.ts} +1 -1
- package/dist/{openai-tools-BMOu1t3A.d.ts → openai-tools-0wACz8f8.d.ts} +1 -1
- package/dist/{prepare-BKxAiUcH.d.ts → prepare-DIeVgQG3.d.ts} +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/{sanitize-Dr3SliRC.d.ts → sanitize-Dcbjp0tU.d.ts} +1 -1
- package/dist/{supervise-Y3w878fN.d.ts → supervise-CRwaJIkd.d.ts} +4 -4
- package/dist/{types-Kjr5W6OF.d.ts → types-CKmyZ9TP.d.ts} +4 -7
- package/dist/{types-DHLXdLVN.d.ts → types-CogNCaw7.d.ts} +1 -1
- package/dist/{worktree-fanout-DmBvR-_O.d.ts → worktree-fanout-BJy24LYe.d.ts} +4 -4
- package/package.json +6 -4
- package/dist/chunk-4WWSICFY.js +0 -210
- package/dist/chunk-4WWSICFY.js.map +0 -1
- package/dist/chunk-FVJ7M3DA.js.map +0 -1
- package/dist/chunk-GKZ6DFDN.js.map +0 -1
- package/dist/chunk-JMT5VYY3.js.map +0 -1
- package/dist/chunk-KHLE3C5G.js.map +0 -1
- package/dist/chunk-MZH4HORF.js.map +0 -1
- package/dist/chunk-WQA5Y6PD.js.map +0 -1
- /package/dist/{chunk-LWNMCOEA.js.map → chunk-FRXDOBFP.js.map} +0 -0
- /package/dist/{chunk-63TIZHMI.js.map → chunk-KYPVUEJ4.js.map} +0 -0
- /package/dist/{chunk-4VMRCEI6.js.map → chunk-MSUWXCHD.js.map} +0 -0
- /package/dist/{chunk-ZQZX77MM.js.map → chunk-QDSOD7RC.js.map} +0 -0
- /package/dist/{chunk-RNWDH5Z3.js.map → chunk-TNUBPPZA.js.map} +0 -0
package/dist/intelligence.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { AgentProfile, AgentCandidateBundle, Sha256Digest, AgentProfileDiff, AgentProfileMcpServer } from '@tangle-network/agent-interface';
|
|
2
|
-
import { e as LoopTraceEvent, a as RuntimeStreamEvent } from './types-
|
|
3
|
-
import { b as ToolSpec, c as RuntimeTelemetryOptions } from './sanitize-
|
|
2
|
+
import { e as LoopTraceEvent, a as RuntimeStreamEvent } from './types-CKmyZ9TP.js';
|
|
3
|
+
import { b as ToolSpec, c as RuntimeTelemetryOptions } from './sanitize-Dcbjp0tU.js';
|
|
4
4
|
import { AnalystFinding } from '@tangle-network/agent-eval/analyst';
|
|
5
5
|
import { Scenario, SelfImproveResult } from '@tangle-network/agent-eval/contract';
|
|
6
6
|
import { R as RunAnalystLoopOpts, a as RunAnalystLoopResult } from './types-BC3bZpH0.js';
|
|
7
|
-
import { A as AgentCandidateBundleInput, a as AgentCandidateTaskExecution, b as AgentCandidateExecutionPorts, P as PrepareAgentCandidateExecutionOptions, E as ExecutePreparedAgentCandidateOptions, c as AgentCandidateRunFinalization } from './prepare-
|
|
8
|
-
import { I as ImproveSurface, a as ImproveOptions, b as ImproveResult } from './improve-
|
|
7
|
+
import { A as AgentCandidateBundleInput, a as AgentCandidateTaskExecution, b as AgentCandidateExecutionPorts, P as PrepareAgentCandidateExecutionOptions, E as ExecutePreparedAgentCandidateOptions, c as AgentCandidateRunFinalization } from './prepare-DIeVgQG3.js';
|
|
8
|
+
import { I as ImproveSurface, a as ImproveOptions, b as ImproveResult } from './improve-DZeatcs7.js';
|
|
9
9
|
import '@tangle-network/agent-eval';
|
|
10
10
|
import '@tangle-network/sandbox';
|
|
11
|
-
import './local-harness-CePtFrwu.js';
|
|
12
|
-
import 'node:child_process';
|
|
13
|
-
import './agentic-generator-CL1q0H91.js';
|
|
14
11
|
import '@tangle-network/agent-eval/campaign';
|
|
12
|
+
import './local-harness-ZLMkKdZc.js';
|
|
13
|
+
import 'node:child_process';
|
|
14
|
+
import './agentic-generator-1g7GDba7.js';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
*
|
package/dist/intelligence.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
applyImprovementWinnerToProfile,
|
|
3
3
|
improve
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7NCP74SL.js";
|
|
5
5
|
import {
|
|
6
6
|
assertCandidateProfileBinding,
|
|
7
7
|
canonicalCandidateDigest,
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
prepareAgentCandidateExecution,
|
|
14
14
|
sealAgentCandidateBundle,
|
|
15
15
|
verifyAgentCandidateBundle
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-HKMKUESZ.js";
|
|
17
17
|
import {
|
|
18
18
|
runAnalystLoop
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-QDSOD7RC.js";
|
|
20
|
+
import "./chunk-GHXW56PO.js";
|
|
21
21
|
import {
|
|
22
22
|
buildLoopOtelSpans,
|
|
23
23
|
buildRuntimeEventOtelSpans,
|
|
@@ -26,8 +26,8 @@ import {
|
|
|
26
26
|
} from "./chunk-ISTDY47H.js";
|
|
27
27
|
import "./chunk-WIPGQ4GT.js";
|
|
28
28
|
import "./chunk-3MDZX7YU.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-M22PL4GH.js";
|
|
30
|
+
import "./chunk-EP6RVHMX.js";
|
|
31
31
|
import "./chunk-YEJR7IXO.js";
|
|
32
32
|
import "./chunk-DGUM43GV.js";
|
|
33
33
|
|
|
@@ -417,6 +417,26 @@ function isJsonSchema(v) {
|
|
|
417
417
|
// src/intelligence/improvement-cycle.ts
|
|
418
418
|
import { assertNoJudgeVerdict } from "@tangle-network/agent-eval/analyst";
|
|
419
419
|
import { agentCandidateBundleSchema } from "@tangle-network/agent-interface";
|
|
420
|
+
async function rethrowAfterImprovementDispose(cause, improvement) {
|
|
421
|
+
const disposeErrors = [];
|
|
422
|
+
for (let attempt = 0; attempt < 2; attempt += 1) {
|
|
423
|
+
try {
|
|
424
|
+
await improvement.dispose();
|
|
425
|
+
} catch (disposeCause) {
|
|
426
|
+
disposeErrors.push(disposeCause);
|
|
427
|
+
continue;
|
|
428
|
+
}
|
|
429
|
+
if (disposeErrors.length === 0) throw cause;
|
|
430
|
+
throw new AggregateError(
|
|
431
|
+
[cause, ...disposeErrors],
|
|
432
|
+
"proposeAgentImprovement failed; the improvement cleanup retry succeeded"
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
throw new AggregateError(
|
|
436
|
+
[cause, ...disposeErrors],
|
|
437
|
+
"proposeAgentImprovement failed and its improvement resources could not be cleaned"
|
|
438
|
+
);
|
|
439
|
+
}
|
|
420
440
|
async function proposeAgentImprovement(options) {
|
|
421
441
|
const writeBackSurface = options.improvement.skills?.writeBack ? "skill" : options.improvement.memory?.writeBack ? "memory" : null;
|
|
422
442
|
if (writeBackSurface) {
|
|
@@ -433,18 +453,22 @@ async function proposeAgentImprovement(options) {
|
|
|
433
453
|
"proposeAgentImprovement findings"
|
|
434
454
|
);
|
|
435
455
|
const improvement = await improve(options.profile, [...findings], options.improvement);
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
456
|
+
try {
|
|
457
|
+
const candidateBundle = improvement.shipped && options.buildCandidate ? await options.buildCandidate({ analysis, improvement }) : void 0;
|
|
458
|
+
const proposal = createAgentImprovementProposal({
|
|
459
|
+
runId: options.runId,
|
|
460
|
+
surface: options.improvement.surface ?? "prompt",
|
|
461
|
+
baselineProfile: options.profile,
|
|
462
|
+
candidateProfile: improvement.profile,
|
|
463
|
+
findings,
|
|
464
|
+
evaluation: improvement.raw,
|
|
465
|
+
...candidateBundle ? { candidateBundle } : {},
|
|
466
|
+
...options.now ? { now: options.now } : {}
|
|
467
|
+
});
|
|
468
|
+
return { analysis, improvement, proposal };
|
|
469
|
+
} catch (cause) {
|
|
470
|
+
return rethrowAfterImprovementDispose(cause, improvement);
|
|
471
|
+
}
|
|
448
472
|
}
|
|
449
473
|
function createAgentImprovementProposal(options) {
|
|
450
474
|
const findings = assertNoJudgeVerdict(
|