@tangle-network/agent-runtime 0.325.0 → 0.325.3

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 (66) hide show
  1. package/dist/{activation-Q3CJgiCu.d.ts → activation-BMsOQxMD.d.ts} +2 -2
  2. package/dist/{activation--9-iyGR8.js → activation-C1O2zCvn.js} +3 -3
  3. package/dist/{activation--9-iyGR8.js.map → activation-C1O2zCvn.js.map} +1 -1
  4. package/dist/agent.d.ts +2 -2
  5. package/dist/agent.js +2 -2
  6. package/dist/{bundle-BJJmfEsw.js → bundle-KZGUQqRM.js} +2 -2
  7. package/dist/{bundle-BJJmfEsw.js.map → bundle-KZGUQqRM.js.map} +1 -1
  8. package/dist/candidate-execution/index.js +5 -5
  9. package/dist/{coordination-driver-DkkUVe9g.js → coordination-driver-g2IGDTZ5.js} +4 -4
  10. package/dist/{coordination-driver-DkkUVe9g.js.map → coordination-driver-g2IGDTZ5.js.map} +1 -1
  11. package/dist/{delegate-BDsaIl2K.js → delegate-BQc-9bkv.js} +2 -2
  12. package/dist/{delegate-BDsaIl2K.js.map → delegate-BQc-9bkv.js.map} +1 -1
  13. package/dist/durable.d.ts +1 -1
  14. package/dist/durable.js +5 -5
  15. package/dist/{graph-Cuz6Ubzd.js → graph-N80-QQQD.js} +4 -4
  16. package/dist/{graph-Cuz6Ubzd.js.map → graph-N80-QQQD.js.map} +1 -1
  17. package/dist/{improvement-cycle-B5Z8cHKx.js → improvement-cycle-IncBZK-W.js} +6 -6
  18. package/dist/{improvement-cycle-B5Z8cHKx.js.map → improvement-cycle-IncBZK-W.js.map} +1 -1
  19. package/dist/index.d.ts +4 -4
  20. package/dist/index.js +9 -9
  21. package/dist/intelligence.d.ts +2 -2
  22. package/dist/intelligence.js +7 -7
  23. package/dist/kernel.d.ts +2 -2
  24. package/dist/kernel.js +9 -9
  25. package/dist/{loop-runner-bin-C16VR9cI.js → loop-runner-bin-CcpZdDHc.js} +3 -3
  26. package/dist/{loop-runner-bin-C16VR9cI.js.map → loop-runner-bin-CcpZdDHc.js.map} +1 -1
  27. package/dist/{loop-runner-bin-Co7JKSwi.d.ts → loop-runner-bin-ECJA--ZN.d.ts} +2 -2
  28. package/dist/loop-runner-bin.d.ts +1 -1
  29. package/dist/loop-runner-bin.js +1 -1
  30. package/dist/mcp/bin.js +3 -3
  31. package/dist/mcp/index.d.ts +2 -2
  32. package/dist/mcp/index.js +5 -5
  33. package/dist/{openai-tools-CbgZrQJ_.d.ts → openai-tools-C_dJoluR.d.ts} +2 -2
  34. package/dist/placement.d.ts +1 -1
  35. package/dist/{prepare-DpavgJT8.js → prepare-BrgoOJmU.js} +8 -7
  36. package/dist/{prepare-DpavgJT8.js.map → prepare-BrgoOJmU.js.map} +1 -1
  37. package/dist/{profile-ZS7_KLwK.js → profile-ChWlsNCI.js} +30 -55
  38. package/dist/profile-ChWlsNCI.js.map +1 -0
  39. package/dist/{profile-materialization-C5-t3HJ7.d.ts → profile-materialization-BnoEf1co.d.ts} +3 -8
  40. package/dist/profiles.d.ts +1 -1
  41. package/dist/{protected-model-port-BLyyfL3l.js → protected-model-port-CJzC-FRs.js} +4 -4
  42. package/dist/{protected-model-port-BLyyfL3l.js.map → protected-model-port-CJzC-FRs.js.map} +1 -1
  43. package/dist/{provision-supervisor-4BoHpGFJ.js → provision-supervisor-BpydSDTn.js} +4 -4
  44. package/dist/{provision-supervisor-4BoHpGFJ.js.map → provision-supervisor-BpydSDTn.js.map} +1 -1
  45. package/dist/{runtime-B9X_U-aV.js → runtime-C-ic9jfY.js} +9 -9
  46. package/dist/{runtime-B9X_U-aV.js.map → runtime-C-ic9jfY.js.map} +1 -1
  47. package/dist/{workspace-streams-CcoARX4v.js → sandbox-profile-compat-Dq7ujONv.js} +40 -6
  48. package/dist/sandbox-profile-compat-Dq7ujONv.js.map +1 -0
  49. package/dist/{search-executor-C-b4NaFl.js → search-executor-CKIXXaiX.js} +3 -3
  50. package/dist/{search-executor-C-b4NaFl.js.map → search-executor-CKIXXaiX.js.map} +1 -1
  51. package/dist/{server-CcHaXgUT.js → server-B9_c16pR.js} +4 -4
  52. package/dist/{server-CcHaXgUT.js.map → server-B9_c16pR.js.map} +1 -1
  53. package/dist/{supervise-BlaB4CeL.js → supervise-CgEHAUEr.js} +22 -9
  54. package/dist/supervise-CgEHAUEr.js.map +1 -0
  55. package/dist/{supervisor-fq4JGynd.js → supervisor-CESg1FQx.js} +12 -11
  56. package/dist/supervisor-CESg1FQx.js.map +1 -0
  57. package/dist/testing.d.ts +1 -1
  58. package/dist/testing.js +14 -14
  59. package/dist/tui/index.d.ts +1 -1
  60. package/dist/tui/index.js +1 -1
  61. package/dist/{types-5r334mcg.d.ts → types-CTjiMrcF.d.ts} +2 -2
  62. package/package.json +9 -9
  63. package/dist/profile-ZS7_KLwK.js.map +0 -1
  64. package/dist/supervise-BlaB4CeL.js.map +0 -1
  65. package/dist/supervisor-fq4JGynd.js.map +0 -1
  66. package/dist/workspace-streams-CcoARX4v.js.map +0 -1
@@ -1825,7 +1825,7 @@ function parseRepositoryMetadata(bytes, limits) {
1825
1825
  } catch (error) {
1826
1826
  throw new Error("candidate workspace archive repository metadata is invalid", { cause: error });
1827
1827
  }
1828
- if (!isRecord(value) || !["bundle,headCommit,headTree,kind", "bundle,headCommit,headTree,kind,workingTree"].includes(Object.keys(value).sort().join(",")) || value.kind !== archiveKind || typeof value.headCommit !== "string" || typeof value.headTree !== "string" || !isRecord(value.bundle) || Object.keys(value.bundle).sort().join(",") !== "byteLength,sha256" || typeof value.bundle.sha256 !== "string" || !/^sha256:[a-f0-9]{64}$/.test(value.bundle.sha256) || !Number.isSafeInteger(value.bundle.byteLength) || value.bundle.byteLength <= 0 || value.bundle.byteLength > limits.maxRepositoryBundleBytes) throw new Error("candidate workspace archive repository is invalid");
1828
+ if (!isRecord$1(value) || !["bundle,headCommit,headTree,kind", "bundle,headCommit,headTree,kind,workingTree"].includes(Object.keys(value).sort().join(",")) || value.kind !== archiveKind || typeof value.headCommit !== "string" || typeof value.headTree !== "string" || !isRecord$1(value.bundle) || Object.keys(value.bundle).sort().join(",") !== "byteLength,sha256" || typeof value.bundle.sha256 !== "string" || !/^sha256:[a-f0-9]{64}$/.test(value.bundle.sha256) || !Number.isSafeInteger(value.bundle.byteLength) || value.bundle.byteLength <= 0 || value.bundle.byteLength > limits.maxRepositoryBundleBytes) throw new Error("candidate workspace archive repository is invalid");
1829
1829
  if (!Buffer.from(canonicalCandidateBytes$1(value)).equals(Buffer.from(bytes))) throw new Error("candidate workspace archive repository metadata is not canonical");
1830
1830
  assertGitObjectId(value.headCommit, "repository HEAD");
1831
1831
  assertGitObjectId(value.headTree, "repository HEAD tree");
@@ -1833,7 +1833,7 @@ function parseRepositoryMetadata(bytes, limits) {
1833
1833
  let workingTree;
1834
1834
  if ("workingTree" in value) {
1835
1835
  const working = value.workingTree;
1836
- if (!isRecord(working) || Object.keys(working).join(",") !== "indexManifest" || !isRecord(working.indexManifest) || Object.keys(working.indexManifest).sort().join(",") !== "byteLength,sha256" || typeof working.indexManifest.sha256 !== "string" || !/^sha256:[a-f0-9]{64}$/.test(working.indexManifest.sha256) || !Number.isSafeInteger(working.indexManifest.byteLength) || working.indexManifest.byteLength < 0 || working.indexManifest.byteLength > limits.maxArchiveBytes) throw new Error("candidate workspace archive repository index is invalid");
1836
+ if (!isRecord$1(working) || Object.keys(working).join(",") !== "indexManifest" || !isRecord$1(working.indexManifest) || Object.keys(working.indexManifest).sort().join(",") !== "byteLength,sha256" || typeof working.indexManifest.sha256 !== "string" || !/^sha256:[a-f0-9]{64}$/.test(working.indexManifest.sha256) || !Number.isSafeInteger(working.indexManifest.byteLength) || working.indexManifest.byteLength < 0 || working.indexManifest.byteLength > limits.maxArchiveBytes) throw new Error("candidate workspace archive repository index is invalid");
1837
1837
  workingTree = { indexManifest: {
1838
1838
  sha256: working.indexManifest.sha256,
1839
1839
  byteLength: working.indexManifest.byteLength
@@ -2058,7 +2058,7 @@ function normalizeWorkspaceFiles(input, limits) {
2058
2058
  const files = [];
2059
2059
  for (let index = 0; index < fileCount; index++) {
2060
2060
  const inputFile = input[index];
2061
- if (!isRecord(inputFile) || Object.keys(inputFile).sort().join(",") !== "bytes,mode,path") throw new Error(`candidate workspace file ${index} is invalid`);
2061
+ if (!isRecord$1(inputFile) || Object.keys(inputFile).sort().join(",") !== "bytes,mode,path") throw new Error(`candidate workspace file ${index} is invalid`);
2062
2062
  const descriptors = Object.getOwnPropertyDescriptors(inputFile);
2063
2063
  if (!("value" in (descriptors.path ?? {})) || !("value" in (descriptors.mode ?? {})) || !("value" in (descriptors.bytes ?? {}))) throw new Error(`candidate workspace file ${index} must use fixed values`);
2064
2064
  const path = safeArchivePath(descriptors.path?.value, limits.maxPathBytes);
@@ -2140,7 +2140,7 @@ function hasControlCharacter(value) {
2140
2140
  }
2141
2141
  return false;
2142
2142
  }
2143
- function isRecord(value) {
2143
+ function isRecord$1(value) {
2144
2144
  return typeof value === "object" && value !== null && !Array.isArray(value);
2145
2145
  }
2146
2146
  function requireTypedArrayGetter(name) {
@@ -2489,6 +2489,40 @@ function asError(error) {
2489
2489
  return error instanceof Error ? error : new Error(String(error));
2490
2490
  }
2491
2491
  //#endregion
2492
- export { promptCacheTokenClasses as $, markPutStreamVerified as A, verifyCanonicalCandidateDocument as B, readMaterializedWorkspaceFiles as C, checkInIdleMs as Ct, verifyMaterializedProfileWorkspace as D, teardownSurfaces as Dt, verifyBytes as E, teardownExecutor as Et, deepFreezeCandidate as F, cloneTokenUsage as G, addTokenUsage as H, embeddedCandidateArtifact as I, fnv1a32Hex as J, deleteBoxSafe as K, immutableCandidateValue as L, canonicalCandidateBytes$1 as M, canonicalCandidateDigest$1 as N, verifyMaterializedWorkspace as O, canonicalCandidateDocument as P, mapWithConcurrency as Q, omitTopLevelDigest as R, captureMaterializedWorkspace as S, boundedChildDeadlineAt as St, scanMaterializedWorkspaceManifest as T, singleFlightTeardown as Tt, chargedTokens as U, addSpend as V, cloneSpend as W, isAbortError as X, hasCompleteCacheBreakdown as Y, isAsyncIterable as Z, assertExactObjectKeys as _, DEADLINE_CHECK_IN_MESSAGE as _t, verifyAgentCandidateWorkspaceArtifacts as a, throwAbort as at, artifactCacheKey as b, ROOT_DEADLINE_REASON as bt, captureAgentCandidateWorkspaceFiles as c, withTimeout as ct, workspaceLimits as d, addResourceSpend as dt, randomSuffix as et, persistCandidateOutputArtifact as f, assertResources as ft, verifyTaskOutcomePatch as g, CHILD_DEADLINE_REASON as gt, verifyTaskCheckout as h, ACCEPTED_RESULT_GRACE_MS as ht, readAgentCandidateWorkspaceArtifactFiles as i, stringifySafe as it, verifiedArtifactChunks as j, verifyWorkspaceSnapshotArtifacts as k, createAgentCandidateWorkspacePort as l, zeroSpend as lt, verifyCandidateCode as m, withBudgetResources as mt, captureAgentCandidateWorkspaceTreeToArtifacts as n, roundBoxMinutes as nt, verifyAgentCandidateWorkspaceTree as o, throwIfAborted as ot, readCandidateGitHubResource as p, resourceTelemetry as pt, errorMessage as q, materializeAgentCandidateWorkspaceFromArtifacts as r, sleep as rt, captureAgentCandidateWorkspace as s, unmeteredSpend as st, captureAgentCandidateWorkspaceToArtifacts as t, randomUuid as tt, verifyAgentCandidateWorkspaceArchive as u, zeroTokenUsage as ut, isWellFormedUnicode as v, DEFAULT_CHECK_IN_IDLE_MS as vt, readVerifiedArtifact as w, isDeadlineAbortReason as wt, candidateWorkspaceManifest as x, armDeadlineTimer as xt, WorkspaceScanLimitError as y, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as yt, sha256Bytes$1 as z };
2492
+ //#region src/runtime/sandbox-profile-compat.ts
2493
+ /**
2494
+ * Interface 5.3 admits proxy secrets and private config values, but the current Sandbox SDK
2495
+ * carries Interface 4.0. Refuse these fields before either candidate conversion or a direct
2496
+ * Sandbox create can silently lose them. Remove this guard when Sandbox carries the fields.
2497
+ */
2498
+ function assertSandboxProfileCompatibility(profile, context = "candidate profile") {
2499
+ if (!isRecord(profile)) return;
2500
+ if (profile.proxySecrets !== void 0) refuseSandboxProfileField("proxySecrets", context);
2501
+ if (isRecord(profile.mcp)) for (const [name, server] of Object.entries(profile.mcp)) {
2502
+ if (!isRecord(server)) continue;
2503
+ refuseNonPublicConfigValues(server.args, `mcp.${name}.args`, context);
2504
+ refuseNonPublicConfigValues(server.env, `mcp.${name}.env`, context);
2505
+ }
2506
+ if (isRecord(profile.hooks)) for (const [event, hooks] of Object.entries(profile.hooks)) {
2507
+ if (!Array.isArray(hooks)) continue;
2508
+ for (const [index, hook] of hooks.entries()) {
2509
+ if (!isRecord(hook)) continue;
2510
+ refuseNonPublicConfigValues(hook.args, `hooks.${event}[${index}].args`, context);
2511
+ refuseNonPublicConfigValues(hook.env, `hooks.${event}[${index}].env`, context);
2512
+ }
2513
+ }
2514
+ }
2515
+ function refuseNonPublicConfigValues(values, path, context) {
2516
+ const entries = Array.isArray(values) ? values.map((value, index) => [`${path}[${index}]`, value]) : isRecord(values) ? Object.entries(values).map(([name, value]) => [`${path}.${name}`, value]) : [];
2517
+ for (const [field, value] of entries) if (isRecord(value) && value.kind !== "public") refuseSandboxProfileField(`${field} (${String(value.kind)})`, context);
2518
+ }
2519
+ function refuseSandboxProfileField(field, context = "candidate profile") {
2520
+ throw new ValidationError(`${context} field ${field} is refused: Sandbox's Interface 4.0.0 cannot carry it yet, and Runtime does not drop it`);
2521
+ }
2522
+ function isRecord(value) {
2523
+ return value !== null && typeof value === "object" && !Array.isArray(value);
2524
+ }
2525
+ //#endregion
2526
+ export { isAsyncIterable as $, verifyMaterializedWorkspace as A, omitTopLevelDigest as B, candidateWorkspaceManifest as C, armDeadlineTimer as Ct, scanMaterializedWorkspaceManifest as D, singleFlightTeardown as Dt, readVerifiedArtifact as E, isDeadlineAbortReason as Et, canonicalCandidateDigest$1 as F, chargedTokens as G, verifyCanonicalCandidateDocument as H, canonicalCandidateDocument as I, deleteBoxSafe as J, cloneSpend as K, deepFreezeCandidate as L, markPutStreamVerified as M, verifiedArtifactChunks as N, verifyBytes as O, teardownExecutor as Ot, canonicalCandidateBytes$1 as P, isAbortError as Q, embeddedCandidateArtifact as R, artifactCacheKey as S, ROOT_DEADLINE_REASON as St, readMaterializedWorkspaceFiles as T, checkInIdleMs as Tt, addSpend as U, sha256Bytes$1 as V, addTokenUsage as W, fnv1a32Hex as X, errorMessage as Y, hasCompleteCacheBreakdown as Z, verifyTaskCheckout as _, ACCEPTED_RESULT_GRACE_MS as _t, materializeAgentCandidateWorkspaceFromArtifacts as a, sleep as at, isWellFormedUnicode as b, DEFAULT_CHECK_IN_IDLE_MS as bt, verifyAgentCandidateWorkspaceTree as c, throwIfAborted as ct, createAgentCandidateWorkspacePort as d, zeroSpend as dt, mapWithConcurrency as et, verifyAgentCandidateWorkspaceArchive as f, zeroTokenUsage as ft, verifyCandidateCode as g, withBudgetResources as gt, readCandidateGitHubResource as h, resourceTelemetry as ht, captureAgentCandidateWorkspaceTreeToArtifacts as i, roundBoxMinutes as it, verifyWorkspaceSnapshotArtifacts as j, verifyMaterializedProfileWorkspace as k, teardownSurfaces as kt, captureAgentCandidateWorkspace as l, unmeteredSpend as lt, persistCandidateOutputArtifact as m, assertResources as mt, refuseSandboxProfileField as n, randomSuffix as nt, readAgentCandidateWorkspaceArtifactFiles as o, stringifySafe as ot, workspaceLimits as p, addResourceSpend as pt, cloneTokenUsage as q, captureAgentCandidateWorkspaceToArtifacts as r, randomUuid as rt, verifyAgentCandidateWorkspaceArtifacts as s, throwAbort as st, assertSandboxProfileCompatibility as t, promptCacheTokenClasses as tt, captureAgentCandidateWorkspaceFiles as u, withTimeout as ut, verifyTaskOutcomePatch as v, CHILD_DEADLINE_REASON as vt, captureMaterializedWorkspace as w, boundedChildDeadlineAt as wt, WorkspaceScanLimitError as x, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as xt, assertExactObjectKeys as y, DEADLINE_CHECK_IN_MESSAGE as yt, immutableCandidateValue as z };
2493
2527
 
2494
- //# sourceMappingURL=workspace-streams-CcoARX4v.js.map
2528
+ //# sourceMappingURL=sandbox-profile-compat-Dq7ujONv.js.map