@tangle-network/agent-runtime 0.319.5 → 0.319.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.
Files changed (36) hide show
  1. package/dist/{activation-DPpb2I8z.js → activation-CcfUmnAe.js} +2 -2
  2. package/dist/{activation-DPpb2I8z.js.map → activation-CcfUmnAe.js.map} +1 -1
  3. package/dist/agent.js +2 -2
  4. package/dist/{coordination-driver-woTI2Vpr.js → coordination-driver-Dim6ig4M.js} +2 -2
  5. package/dist/{coordination-driver-woTI2Vpr.js.map → coordination-driver-Dim6ig4M.js.map} +1 -1
  6. package/dist/{delegate-DrFainK0.js → delegate-STDZnzjY.js} +2 -2
  7. package/dist/{delegate-DrFainK0.js.map → delegate-STDZnzjY.js.map} +1 -1
  8. package/dist/durable.js +2 -2
  9. package/dist/{graph-joXNwtkE.js → graph-Df65qgYK.js} +4 -4
  10. package/dist/{graph-joXNwtkE.js.map → graph-Df65qgYK.js.map} +1 -1
  11. package/dist/{improvement-cycle-Dkrb5nVc.js → improvement-cycle-Bb5kkUi6.js} +18 -149
  12. package/dist/{improvement-cycle-Dkrb5nVc.js.map → improvement-cycle-Bb5kkUi6.js.map} +1 -1
  13. package/dist/index.js +7 -7
  14. package/dist/intelligence.js +3 -3
  15. package/dist/kernel.js +8 -8
  16. package/dist/{loop-runner-bin-OYVzvqiL.js → loop-runner-bin-BaGWLMYN.js} +3 -3
  17. package/dist/{loop-runner-bin-OYVzvqiL.js.map → loop-runner-bin-BaGWLMYN.js.map} +1 -1
  18. package/dist/loop-runner-bin.js +1 -1
  19. package/dist/mcp/bin.js +3 -3
  20. package/dist/mcp/index.js +4 -4
  21. package/dist/{provision-supervisor-CN16EdkE.js → provision-supervisor-CS_Negf6.js} +3 -3
  22. package/dist/{provision-supervisor-CN16EdkE.js.map → provision-supervisor-CS_Negf6.js.map} +1 -1
  23. package/dist/{runtime-BE4GW_q1.js → runtime-HY1z-MOb.js} +8 -8
  24. package/dist/{runtime-BE4GW_q1.js.map → runtime-HY1z-MOb.js.map} +1 -1
  25. package/dist/{search-executor-DuHd_fws.js → search-executor-OIy7kg74.js} +2 -2
  26. package/dist/{search-executor-DuHd_fws.js.map → search-executor-OIy7kg74.js.map} +1 -1
  27. package/dist/{server-CYdjyARj.js → server-BMG_Uted.js} +3 -3
  28. package/dist/{server-CYdjyARj.js.map → server-BMG_Uted.js.map} +1 -1
  29. package/dist/{supervise-CvKx8rlw.js → supervise-CDn-1ThW.js} +3 -3
  30. package/dist/{supervise-CvKx8rlw.js.map → supervise-CDn-1ThW.js.map} +1 -1
  31. package/dist/{supervisor--nmU6w86.js → supervisor-B_mWdKva.js} +44 -19
  32. package/dist/supervisor-B_mWdKva.js.map +1 -0
  33. package/dist/testing.js +12 -12
  34. package/dist/tui/index.js +1 -1
  35. package/package.json +3 -3
  36. package/dist/supervisor--nmU6w86.js.map +0 -1
@@ -1,6 +1,6 @@
1
- import { Nt as createExecutor, Tr as runAbortable, aa as detachedSnapshot, bi as terminateProcessTreeAndConfirm, ci as runSettledCommand, wr as linkAbort } from "./supervisor--nmU6w86.js";
1
+ import { Nt as createExecutor, Tr as runAbortable, aa as detachedSnapshot, bi as terminateProcessTreeAndConfirm, ci as runSettledCommand, wr as linkAbort } from "./supervisor-B_mWdKva.js";
2
2
  import { i as ConfigError } from "./errors-DodWX-cb.js";
3
- import { E as defaultStructuralRolloutPolicy, Q as streamAgentTurn, Y as optimizerMethod, Z as collectAgentTurn, a as reconcileInterruptedSearchCalls, b as improveSearchCost, c as searchExecutor, d as taggedLedger, i as isSearchEnvironmentFault, n as assertSearchLanes, s as searchCallTags, v as decideClosedSearch } from "./search-executor-DuHd_fws.js";
3
+ import { E as defaultStructuralRolloutPolicy, Q as streamAgentTurn, Y as optimizerMethod, Z as collectAgentTurn, a as reconcileInterruptedSearchCalls, b as improveSearchCost, c as searchExecutor, d as taggedLedger, i as isSearchEnvironmentFault, n as assertSearchLanes, s as searchCallTags, v as decideClosedSearch } from "./search-executor-OIy7kg74.js";
4
4
  import { B as verifyCanonicalCandidateDocument, L as immutableCandidateValue, M as canonicalCandidateBytes$1, N as canonicalCandidateDigest$1, P as canonicalCandidateDocument, R as omitTopLevelDigest, xt as armDeadlineTimer, z as sha256Bytes$1 } from "./workspace-streams-DFAhW7hF.js";
5
5
  import { a as concreteProfileModel, t as assertExecutableAgentProfile } from "./model-policy-CNe257pB.js";
6
6
  import { i as syncDurableDirectory, r as publishExclusiveDurableFile } from "./durable-file-DWQA4ooo.js";
@@ -3166,152 +3166,21 @@ function agentImprovementProfileDiffs(baselineInput, candidateInput, options) {
3166
3166
  return completeChanges;
3167
3167
  }
3168
3168
  function completeAgentProfileReplacementDiffs(baseline, candidate, options) {
3169
- const remove = {};
3170
- const set = {};
3171
- if (profileValuesDiffer(baseline.name, candidate.name) || profileValuesDiffer(baseline.description, candidate.description) || profileValuesDiffer(baseline.version, candidate.version)) {
3172
- remove.identity = true;
3173
- if (candidate.name !== void 0) set.name = candidate.name;
3174
- if (candidate.description !== void 0) set.description = candidate.description;
3175
- if (candidate.version !== void 0) set.version = candidate.version;
3176
- }
3177
- if (profileValuesDiffer(baseline.tags, candidate.tags)) {
3178
- remove.tags = true;
3179
- if (candidate.tags !== void 0) set.tags = candidate.tags;
3180
- }
3181
- if (profileValuesDiffer(baseline.prompt, candidate.prompt)) {
3182
- remove.prompt = true;
3183
- if (candidate.prompt !== void 0) set.prompt = candidate.prompt;
3184
- }
3185
- if (profileValuesDiffer(baseline.model, candidate.model)) {
3186
- remove.model = true;
3187
- if (candidate.model !== void 0) set.model = candidate.model;
3188
- }
3189
- if (profileValuesDiffer(baseline.harness, candidate.harness)) {
3190
- remove.harness = true;
3191
- if (candidate.harness !== void 0) set.harness = candidate.harness;
3192
- }
3193
- if (profileValuesDiffer(baseline.seats, candidate.seats)) {
3194
- remove.seats = true;
3195
- if (candidate.seats !== void 0) set.seats = candidate.seats;
3196
- }
3197
- if (profileValuesDiffer(baseline.permissions, candidate.permissions)) {
3198
- remove.permissions = true;
3199
- if (candidate.permissions !== void 0) set.permissions = candidate.permissions;
3200
- }
3201
- if (profileValuesDiffer(baseline.tools, candidate.tools)) {
3202
- remove.tools = true;
3203
- if (candidate.tools !== void 0) set.tools = candidate.tools;
3204
- }
3205
- if (profileValuesDiffer(baseline.mcp, candidate.mcp)) {
3206
- remove.mcp = true;
3207
- if (candidate.mcp !== void 0) set.mcp = candidate.mcp;
3208
- }
3209
- if (profileValuesDiffer(baseline.connections, candidate.connections)) {
3210
- remove.connections = true;
3211
- if (candidate.connections !== void 0) set.connections = candidate.connections;
3212
- }
3213
- if (profileValuesDiffer(baseline.subagents, candidate.subagents)) {
3214
- remove.subagents = true;
3215
- if (candidate.subagents !== void 0) set.subagents = candidate.subagents;
3216
- }
3217
- replaceChangedProfileResources(baseline.resources, candidate.resources, remove, set);
3218
- if (profileValuesDiffer(baseline.hooks, candidate.hooks)) {
3219
- remove.hooks = true;
3220
- if (candidate.hooks !== void 0) set.hooks = candidate.hooks;
3221
- }
3222
- if (profileValuesDiffer(baseline.modes, candidate.modes)) {
3223
- remove.modes = true;
3224
- if (candidate.modes !== void 0) set.modes = candidate.modes;
3225
- }
3226
- if (profileValuesDiffer(baseline.confidential, candidate.confidential)) {
3227
- remove.confidential = true;
3228
- if (candidate.confidential !== void 0) set.confidential = candidate.confidential;
3229
- }
3230
- if (profileValuesDiffer(baseline.metadata, candidate.metadata)) {
3231
- remove.metadata = true;
3232
- if (candidate.metadata !== void 0) set.metadata = candidate.metadata;
3233
- }
3234
- if (profileValuesDiffer(baseline.extensions, candidate.extensions)) {
3235
- remove.extensions = true;
3236
- if (candidate.extensions !== void 0) set.extensions = candidate.extensions;
3237
- }
3238
- if (Object.keys(remove).length === 0) throw new Error("complete profile differ found no changed fields");
3239
- const common = {
3240
- kind: "agent-profile-diff",
3241
- ...options.source ? { source: options.source } : {},
3242
- metadata: {
3243
- ...options.metadata ?? {},
3244
- surface: "agent-profile"
3245
- }
3246
- };
3247
- const reset = agentProfileDiffSchema.parse(defineAgentProfileDiff({
3248
- ...common,
3249
- id: `${options.id}:agent-profile:reset`,
3250
- title: "Reset changed agent profile fields",
3251
- remove
3252
- }));
3253
- if (Object.keys(set).length === 0) return [reset];
3254
- return [reset, agentProfileDiffSchema.parse(defineAgentProfileDiff({
3255
- ...common,
3256
- id: `${options.id}:agent-profile:set`,
3257
- title: "Set changed agent profile fields",
3258
- set
3259
- }))];
3260
- }
3261
- function replaceChangedProfileResources(baseline, candidate, remove, set) {
3262
- if (!profileValuesDiffer(baseline, candidate)) return;
3263
- const resourceRemoval = {};
3264
- const resourceSet = {};
3265
- let changedSubfields = 0;
3266
- if (profileValuesDiffer(baseline?.files, candidate?.files)) {
3267
- changedSubfields += 1;
3268
- resourceRemoval.files = true;
3269
- if (candidate?.files !== void 0) resourceSet.files = candidate.files;
3270
- }
3271
- if (profileValuesDiffer(baseline?.tools, candidate?.tools)) {
3272
- changedSubfields += 1;
3273
- resourceRemoval.tools = true;
3274
- if (candidate?.tools !== void 0) resourceSet.tools = candidate.tools;
3275
- }
3276
- if (profileValuesDiffer(baseline?.skills, candidate?.skills)) {
3277
- changedSubfields += 1;
3278
- resourceRemoval.skills = true;
3279
- if (candidate?.skills !== void 0) resourceSet.skills = candidate.skills;
3280
- }
3281
- if (profileValuesDiffer(baseline?.agents, candidate?.agents)) {
3282
- changedSubfields += 1;
3283
- resourceRemoval.agents = true;
3284
- if (candidate?.agents !== void 0) resourceSet.agents = candidate.agents;
3285
- }
3286
- if (profileValuesDiffer(baseline?.commands, candidate?.commands)) {
3287
- changedSubfields += 1;
3288
- resourceRemoval.commands = true;
3289
- if (candidate?.commands !== void 0) resourceSet.commands = candidate.commands;
3290
- }
3291
- if (profileValuesDiffer(baseline?.instructions, candidate?.instructions)) {
3292
- changedSubfields += 1;
3293
- resourceRemoval.instructions = true;
3294
- if (candidate?.instructions !== void 0) resourceSet.instructions = candidate.instructions;
3295
- }
3296
- if (profileValuesDiffer(baseline?.failOnError, candidate?.failOnError)) {
3297
- changedSubfields += 1;
3298
- resourceRemoval.failOnError = true;
3299
- if (candidate?.failOnError !== void 0) resourceSet.failOnError = candidate.failOnError;
3300
- }
3301
- if (changedSubfields === 0) {
3302
- remove.resources = true;
3303
- if (candidate !== void 0) set.resources = candidate;
3304
- return;
3305
- }
3306
- remove.resources = resourceRemoval;
3307
- if (Object.keys(resourceSet).length > 0) set.resources = resourceSet;
3308
- }
3309
- function profileValuesDiffer(baseline, candidate) {
3310
- const comparable = (value) => value === void 0 ? { present: false } : {
3311
- present: true,
3312
- value
3313
- };
3314
- return canonicalCandidateDigest$1(comparable(baseline)) !== canonicalCandidateDigest$1(comparable(candidate));
3169
+ const [first, ...rest] = diffAgentProfiles(baseline, candidate).map((change) => {
3170
+ const reset = change.remove !== void 0;
3171
+ return agentProfileDiffSchema.parse({
3172
+ ...change,
3173
+ ...options.source ? { source: options.source } : {},
3174
+ metadata: {
3175
+ ...options.metadata ?? {},
3176
+ surface: "agent-profile"
3177
+ },
3178
+ id: `${options.id}:agent-profile:${reset ? "reset" : "set"}`,
3179
+ title: reset ? "Reset changed agent profile fields" : "Set changed agent profile fields"
3180
+ });
3181
+ });
3182
+ if (!first) throw new Error("complete profile differ found no changed fields");
3183
+ return [first, ...rest];
3315
3184
  }
3316
3185
  function improvementSurfaceReplacement(target) {
3317
3186
  const value = target.desiredInput;
@@ -4221,4 +4090,4 @@ function sameOrderedValues(left, right) {
4221
4090
  //#endregion
4222
4091
  export { commandVerifier as $, agentImprovementTargetInput as A, assertCandidateValidator as B, optimizationActivationReceiptFromMetadata as C, agentImprovementProfileSurfaceDigest as D, agentImprovementProfileDiffs as E, isAgentImprovementProfileSurface as F, rawTraceDistiller as G, parseExecutionRef as H, isAgentProfileMeasuredSurface as I, normalizeRolloutPolicy as J, ROLLOUT_POLICY_EXTENSION as K, improve as L, agentProfileImprovementStateDigest as M, assertProfileImprovementTargetsShareIdentity as N, agentImprovementProfileSurfaceInput as O, buildAgentImprovementActivationTargets as P, agenticGenerator as Q, createCommandProfileTrainer as R, createOptimizationActivationReceipt as S, AGENT_PROFILE_MEASURED_SURFACES as T, privateValuePaths as U, assertProfileTrainingIsHeldOut as V, withMethodRuntimeControls as W, serializeRolloutPolicy as X, parseRolloutPolicy as Y, structuralRolloutPolicyFromProfile as Z, profilePolicyWithBudget as _, executeAgentCandidateExperimentCell as a, profileTaskScenarioIdentity as b, requireSealedCandidateExperiment as c, verifyAgentImprovementActivation as d, defaultBuildPrompt as et, verifyAgentImprovementProposal as f, profileImprovementMetadata as g, createProfileImprovementCostLedger as h, createAgentImprovementProposal as i, agentImprovementTargetProfileDiffs as j, agentImprovementTargetDigest as k, reviewAgentImprovementProposal as l, verifyCandidateExecutionEvidence as m, createAgentImprovementActivation as n, proposeAgentImprovement as o, verifyAgentImprovementReview as p, applyRolloutPolicyToProfile as q, createAgentImprovementMeasuredComparison as r, proposeAgentProfileImprovement as s, AgentCandidateExperimentCellExecutionError as t, runAgentCandidateExperiment as u, profilePreparationAccounting as v, AGENT_IMPROVEMENT_PROFILE_SURFACES as w, sealProfileImprovementBenchmark as x, profileStateDigest as y, searchMethod as z };
4223
4092
 
4224
- //# sourceMappingURL=improvement-cycle-Dkrb5nVc.js.map
4093
+ //# sourceMappingURL=improvement-cycle-Bb5kkUi6.js.map