@tangle-network/agent-runtime 0.99.0 → 0.100.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.
@@ -4,16 +4,16 @@ import {
4
4
  import {
5
5
  captureAgentCandidateWorkspace,
6
6
  sealAgentCandidateBundle
7
- } from "./chunk-BLQIYRVR.js";
7
+ } from "./chunk-BXZ7GPL4.js";
8
8
  import {
9
9
  createAgentImprovementActivationResult
10
- } from "./chunk-JSPW2Y3P.js";
10
+ } from "./chunk-VOPHC4LB.js";
11
11
  import {
12
12
  canonicalCandidateBytes,
13
13
  embeddedCandidateArtifact,
14
14
  omitTopLevelDigest,
15
15
  persistCandidateOutputArtifact
16
- } from "./chunk-YOLKCWRV.js";
16
+ } from "./chunk-HGSHPVJ6.js";
17
17
  import {
18
18
  supervise
19
19
  } from "./chunk-UQ6PNNXM.js";
@@ -471,4 +471,4 @@ export {
471
471
  runKnowledgeImprovementJob,
472
472
  buildKnowledgeImprovementExperimentBundles
473
473
  };
474
- //# sourceMappingURL=chunk-6WSFXKQU.js.map
474
+ //# sourceMappingURL=chunk-LV6WCT43.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sealAgentCandidateBundle
3
- } from "./chunk-BLQIYRVR.js";
3
+ } from "./chunk-BXZ7GPL4.js";
4
4
  import {
5
5
  RecoveryAgentCandidateTraceStore,
6
6
  applyExactAgentProfileDiff,
@@ -36,7 +36,7 @@ import {
36
36
  terminalRecord,
37
37
  usdToNanos,
38
38
  withinCandidateCleanupDeadline
39
- } from "./chunk-YOLKCWRV.js";
39
+ } from "./chunk-HGSHPVJ6.js";
40
40
 
41
41
  // src/candidate-execution/builder.ts
42
42
  import { verifyCodeSurface } from "@tangle-network/agent-eval/campaign";
@@ -1007,4 +1007,4 @@ export {
1007
1007
  createProtectedAgentCandidateModelPort,
1008
1008
  recoverExpiredAgentCandidateExecution
1009
1009
  };
1010
- //# sourceMappingURL=chunk-6XKPVJAZ.js.map
1010
+ //# sourceMappingURL=chunk-U4PRAATQ.js.map
@@ -9,12 +9,14 @@ import {
9
9
  executePreparedAgentCandidate,
10
10
  immutableCandidateValue,
11
11
  omitTopLevelDigest,
12
+ omitUndefinedObjectFields,
12
13
  parseAgentCandidateProfileActivation,
14
+ parseExactAgentProfile,
13
15
  prepareAgentCandidateExecution,
14
16
  verifiedResourceTextByDigest,
15
17
  verifyAgentCandidateBundle,
16
18
  verifyCanonicalCandidateDocument
17
- } from "./chunk-YOLKCWRV.js";
19
+ } from "./chunk-HGSHPVJ6.js";
18
20
  import {
19
21
  assertModelAllowed,
20
22
  harnessInvocation,
@@ -1411,6 +1413,38 @@ function agentImprovementTargetInput(bundle, surface) {
1411
1413
  function isAgentImprovementProfileSurface(surface) {
1412
1414
  return AGENT_IMPROVEMENT_PROFILE_SURFACES.includes(surface);
1413
1415
  }
1416
+ function agentImprovementProfileSurfaceInput(profile, surface) {
1417
+ const parsed = parseExactAgentProfile(
1418
+ omitUndefinedObjectFields(profile, "agent improvement profile"),
1419
+ "agent improvement profile"
1420
+ );
1421
+ return immutableCandidateValue(profileSurfaceInput(parsed, surface));
1422
+ }
1423
+ function profileSurfaceInput(profile, surface) {
1424
+ switch (surface) {
1425
+ case "prompt":
1426
+ return { prompt: profile.prompt ?? null };
1427
+ case "skills":
1428
+ return profile.resources?.skills ?? null;
1429
+ case "tools":
1430
+ return {
1431
+ tools: profile.tools ?? null,
1432
+ resources: profile.resources?.tools ?? null
1433
+ };
1434
+ case "mcp":
1435
+ return profile.mcp ?? null;
1436
+ case "hooks":
1437
+ return profile.hooks ?? null;
1438
+ case "subagents":
1439
+ return {
1440
+ subagents: profile.subagents ?? null,
1441
+ resources: profile.resources?.agents ?? null
1442
+ };
1443
+ }
1444
+ }
1445
+ function agentImprovementProfileSurfaceDigest(profile, surface) {
1446
+ return canonicalCandidateDigest(agentImprovementProfileSurfaceInput(profile, surface));
1447
+ }
1414
1448
  function agentImprovementTargetProfileDiffs(target, options) {
1415
1449
  const { remove, set } = improvementSurfaceReplacement(target);
1416
1450
  const common = {
@@ -1545,20 +1579,12 @@ function assertCodeCandidatePair(baselineBundle, candidateBundle) {
1545
1579
  function improvementSurfaceValues(bundle) {
1546
1580
  const profile = agentCandidateProfileAsAgentProfile(bundle.profile);
1547
1581
  return {
1548
- prompt: {
1549
- prompt: profile.prompt ?? null
1550
- },
1551
- skills: profile.resources?.skills ?? null,
1552
- tools: {
1553
- tools: profile.tools ?? null,
1554
- resources: profile.resources?.tools ?? null
1555
- },
1556
- mcp: profile.mcp ?? null,
1557
- hooks: profile.hooks ?? null,
1558
- subagents: {
1559
- subagents: profile.subagents ?? null,
1560
- resources: profile.resources?.agents ?? null
1561
- },
1582
+ prompt: agentImprovementProfileSurfaceInput(profile, "prompt"),
1583
+ skills: agentImprovementProfileSurfaceInput(profile, "skills"),
1584
+ tools: agentImprovementProfileSurfaceInput(profile, "tools"),
1585
+ mcp: agentImprovementProfileSurfaceInput(profile, "mcp"),
1586
+ hooks: agentImprovementProfileSurfaceInput(profile, "hooks"),
1587
+ subagents: agentImprovementProfileSurfaceInput(profile, "subagents"),
1562
1588
  "agent-profile": { profile: opaqueProfileSlice(profile), execution: bundle.execution },
1563
1589
  memory: {
1564
1590
  instructions: profile.resources?.instructions ?? null,
@@ -2179,6 +2205,8 @@ export {
2179
2205
  AGENT_IMPROVEMENT_PROFILE_SURFACES,
2180
2206
  buildAgentImprovementActivationTargets,
2181
2207
  isAgentImprovementProfileSurface,
2208
+ agentImprovementProfileSurfaceInput,
2209
+ agentImprovementProfileSurfaceDigest,
2182
2210
  agentImprovementTargetProfileDiffs,
2183
2211
  AgentCandidateExperimentCellExecutionError,
2184
2212
  runAgentCandidateExperiment,
@@ -2196,4 +2224,4 @@ export {
2196
2224
  verifyAgentImprovementActivationResult,
2197
2225
  executeAgentImprovementActivation
2198
2226
  };
2199
- //# sourceMappingURL=chunk-JSPW2Y3P.js.map
2227
+ //# sourceMappingURL=chunk-VOPHC4LB.js.map