@tangle-network/agent-runtime 0.283.0 → 0.284.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/dist/{activation-DL1VoNrT.d.ts → activation-CxiJixSO.d.ts} +2 -2
- package/dist/{activation-B_vuAOSo.js → activation-DXFzDCmr.js} +2 -2
- package/dist/{activation-B_vuAOSo.js.map → activation-DXFzDCmr.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/candidate-execution/index.d.ts +2 -38
- package/dist/{coordination-driver-BmkANXc5.js → coordination-driver-BJzVI1oV.js} +2 -2
- package/dist/{coordination-driver-BmkANXc5.js.map → coordination-driver-BJzVI1oV.js.map} +1 -1
- package/dist/{delegate-BfHKdHzV.js → delegate-CfoEXPam.js} +2 -2
- package/dist/{delegate-BfHKdHzV.js.map → delegate-CfoEXPam.js.map} +1 -1
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +2 -2
- package/dist/{graph-XmlRTlaI.js → graph-RCV6ri8A.js} +4 -4
- package/dist/{graph-XmlRTlaI.js.map → graph-RCV6ri8A.js.map} +1 -1
- package/dist/{improvement-cycle-BFerq3l4.js → improvement-cycle-DxBnEP8q.js} +3 -3
- package/dist/{improvement-cycle-BFerq3l4.js.map → improvement-cycle-DxBnEP8q.js.map} +1 -1
- package/dist/{index-CkLB8mJF.d.ts → index-BmGVkjsc.d.ts} +66 -5
- package/dist/index.d.ts +13 -6
- package/dist/index.js +51 -9
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +4 -4
- package/dist/intelligence.js +4 -4
- package/dist/kernel.d.ts +3 -3
- package/dist/kernel.js +9 -9
- package/dist/{loop-runner-bin-D8P3T5rT.js → loop-runner-bin-BPy7y5rd.js} +3 -3
- package/dist/{loop-runner-bin-D8P3T5rT.js.map → loop-runner-bin-BPy7y5rd.js.map} +1 -1
- package/dist/{loop-runner-bin-CINywrHK.d.ts → loop-runner-bin-CqwbQ0et.d.ts} +2 -2
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +2 -2
- package/dist/mcp/index.js +4 -4
- package/dist/{protected-model-port-BlLP8ja6.d.ts → protected-model-port-DDnU39ul.d.ts} +2 -2
- package/dist/{provision-supervisor-BNUmrHwC.js → provision-supervisor-CqRp0Rzo.js} +3 -3
- package/dist/{provision-supervisor-BNUmrHwC.js.map → provision-supervisor-CqRp0Rzo.js.map} +1 -1
- package/dist/{runtime-CM3KCe9V.js → runtime-lin_kRwN.js} +102 -10
- package/dist/runtime-lin_kRwN.js.map +1 -0
- package/dist/{search-method-Dlor0kKQ.js → search-method-Hjmqa4B8.js} +2 -2
- package/dist/{search-method-Dlor0kKQ.js.map → search-method-Hjmqa4B8.js.map} +1 -1
- package/dist/{server-BnMcTE7J.js → server-a2wdjRG1.js} +3 -3
- package/dist/{server-BnMcTE7J.js.map → server-a2wdjRG1.js.map} +1 -1
- package/dist/{stream-agent-turn-Bk79CnTw.d.ts → stream-agent-turn-IIqBKeLB.d.ts} +149 -5
- package/dist/{supervise-DL_Hj1uk.js → supervise-C71s4_OJ.js} +3 -3
- package/dist/{supervise-DL_Hj1uk.js.map → supervise-C71s4_OJ.js.map} +1 -1
- package/dist/{supervisor-YAc4U8HQ.js → supervisor-D4NnNHZd.js} +470 -70
- package/dist/supervisor-D4NnNHZd.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +12 -12
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{types-CuXu5zuS.d.ts → workspace-archive-DpyZV2Cj.d.ts} +38 -2
- package/package.json +5 -4
- package/skills/profile-authoring/SKILL.md +1 -1
- package/dist/runtime-CM3KCe9V.js.map +0 -1
- package/dist/supervisor-YAc4U8HQ.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { $i as
|
|
1
|
+
import { $i as executableAgentSpecSnapshot, $n as canonicalObservedModelParts, $t as isTraceAnalysisStore, Aa as zeroSpend, Ca as randomSuffix, Et as rollingDispatch, Gn as probeSandboxCapabilities, Gt as encodeResultBlob, Ht as InMemorySpawnJournal, Kt as insideCursorNamespace, M as withDriverExecutor, Mi as readCommittedJsonLines, Mt as createExecutorRegistry, Ni as writeAllBytes, O as verdictFromJudgeScore, Pt as createWorktreeCliExecutor, Qi as executableAgentProfileSnapshot, Qn as runBrainLoop, Ra as armDeadlineTimer, Ta as stringifySafe, Un as runAgentRounds, Ut as SpawnEventIndex, Vn as defaultSelectWinner, Vt as InMemoryResultBlobStore, W as settledToIteration, Wn as createSandboxLineage, Wt as assertContentAddress, Xn as readPromptOptions, Yn as assertBoxlessPromptOptions, Zn as routerBrain, _ as CheckUnavailableError, _a as chargedTokens, ba as hasCompleteCacheBreakdown, ea as detachedFrozen, fa as notifySandboxEventObserver, ga as addSpend, ji as prepareJsonlAppend, jr as contentAddress, jt as createExecutor, r as createSupervisor, ta as detachedSnapshot, ur as createPushTraceSource, va as cloneSpend, wa as sleep, xa as isAbortError } from "./supervisor-D4NnNHZd.js";
|
|
2
2
|
import { i as ConfigError, m as ValidationError, n as AnalystError, s as PlannerError } from "./errors-DodWX-cb.js";
|
|
3
|
-
import { Q as sample, X as refine, Z as runAgentic, c as reconcileInterruptedSearchCalls, ct as strategyAuthorMethod, et as ObservationError, it as profileChatClient, nt as observe, o as dedicatedLane, r as runtimeShipDecision, rt as renderReport, u as searchExecutor } from "./search-method-
|
|
3
|
+
import { Q as sample, X as refine, Z as runAgentic, c as reconcileInterruptedSearchCalls, ct as strategyAuthorMethod, et as ObservationError, it as profileChatClient, nt as observe, o as dedicatedLane, r as runtimeShipDecision, rt as renderReport, u as searchExecutor } from "./search-method-Hjmqa4B8.js";
|
|
4
4
|
import { c as profileModelExecutionSettings, i as concreteModelId, l as profileProviderModel, o as enforceTokenLimits, t as assertExecutableAgentProfile } from "./model-policy-BbSCSak0.js";
|
|
5
5
|
import { A as sha256Bytes$1, O as immutableCandidateValue, f as WorkspaceScanLimitError, h as captureMaterializedWorkspace, w as canonicalCandidateDigest$1 } from "./workspace-archive-MhowMCmp.js";
|
|
6
6
|
import { i as notifyRuntimeHookEvent } from "./runtime-hooks-tXpAarhW.js";
|
|
7
7
|
import { i as redactProtectedValue, r as redactProtectedReason } from "./protected-redaction-DylCC_ot.js";
|
|
8
|
-
import { S as foldCoordinationRecords, y as createInMemoryRunContext } from "./coordination-driver-
|
|
9
|
-
import { C as gateOnDeliverable, r as supervise, w as mapExecutorResult } from "./supervise-
|
|
8
|
+
import { S as foldCoordinationRecords, y as createInMemoryRunContext } from "./coordination-driver-BJzVI1oV.js";
|
|
9
|
+
import { C as gateOnDeliverable, r as supervise, w as mapExecutorResult } from "./supervise-C71s4_OJ.js";
|
|
10
10
|
import "./run-layout-vwd4SwX_.js";
|
|
11
|
-
import "./provision-supervisor-
|
|
12
|
-
import "./delegate-
|
|
13
|
-
import "./graph-
|
|
11
|
+
import "./provision-supervisor-CqRp0Rzo.js";
|
|
12
|
+
import "./delegate-CfoEXPam.js";
|
|
13
|
+
import "./graph-RCV6ri8A.js";
|
|
14
14
|
import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, sha256Bytes, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
|
|
15
15
|
import { CODING_HARNESSES, DEFAULT_TRACE_ANALYST_KINDS, InMemoryTraceStore, OUTPUT_VALUE, benjaminiHochberg, buildTrajectory, computeFindingId as computeFindingId$1, confidenceInterval, createTraceAnalyst, expandProfileAxes, makeFinding as makeFinding$1, pairedBootstrap, paretoFrontier, wilcoxonSignedRank, wilson } from "@tangle-network/agent-eval";
|
|
16
16
|
import { createAgentRunOutcomeTracker } from "@tangle-network/sandbox/runtime";
|
|
@@ -18,7 +18,7 @@ import { createHash, randomUUID } from "node:crypto";
|
|
|
18
18
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
19
19
|
import { appendFileSync, chmodSync, constants, copyFileSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readlinkSync, renameSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
|
|
20
20
|
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
21
|
-
import { chmod, lstat, mkdir, mkdtemp, open, opendir, readFile, readdir, readlink, realpath, rm, stat, symlink, writeFile } from "node:fs/promises";
|
|
21
|
+
import { chmod, link, lstat, mkdir, mkdtemp, open, opendir, readFile, readdir, readlink, realpath, rm, stat, symlink, unlink, writeFile } from "node:fs/promises";
|
|
22
22
|
import { tmpdir } from "node:os";
|
|
23
23
|
import { isDeepStrictEqual, promisify } from "node:util";
|
|
24
24
|
import { redact } from "@tangle-network/agent-eval/traces";
|
|
@@ -4959,6 +4959,98 @@ function requireSpend(rolled, id, root) {
|
|
|
4959
4959
|
return spend;
|
|
4960
4960
|
}
|
|
4961
4961
|
//#endregion
|
|
4962
|
+
//#region src/runtime/private-cas.ts
|
|
4963
|
+
const DIGEST = /^sha256:([0-9a-f]{64})$/u;
|
|
4964
|
+
const SAFE_NAMESPACE = /^[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}$/u;
|
|
4965
|
+
async function realDirectory(path) {
|
|
4966
|
+
const entry = await lstat(path);
|
|
4967
|
+
if (!entry.isDirectory() || entry.isSymbolicLink()) throw new Error(`private CAS directory is not a real directory: ${path}`);
|
|
4968
|
+
}
|
|
4969
|
+
async function checkDirectories(path, create) {
|
|
4970
|
+
const parts = resolve(path).split(sep);
|
|
4971
|
+
let current = sep;
|
|
4972
|
+
for (const part of parts) {
|
|
4973
|
+
if (!part) continue;
|
|
4974
|
+
current = join(current, part);
|
|
4975
|
+
if (create) try {
|
|
4976
|
+
await mkdir(current, { mode: 448 });
|
|
4977
|
+
} catch (error) {
|
|
4978
|
+
if (error.code !== "EEXIST") throw error;
|
|
4979
|
+
}
|
|
4980
|
+
await realDirectory(current);
|
|
4981
|
+
}
|
|
4982
|
+
}
|
|
4983
|
+
/** Private host-local content-addressed storage scoped to one recorded run identity. */
|
|
4984
|
+
function createPrivateCasArtifactPort(root, namespace) {
|
|
4985
|
+
if (!isAbsolute(root)) throw new Error("private CAS root must be absolute");
|
|
4986
|
+
if (!SAFE_NAMESPACE.test(namespace) || namespace === "." || namespace === "..") throw new Error("private CAS namespace must be one safe identifier");
|
|
4987
|
+
const store = join(resolve(root), "sha256");
|
|
4988
|
+
const destination = (digest) => {
|
|
4989
|
+
const match = DIGEST.exec(digest);
|
|
4990
|
+
if (!match) throw new Error("private CAS digest must be sha256:<64 lowercase hex>");
|
|
4991
|
+
return join(store, match[1].slice(0, 2), match[1]);
|
|
4992
|
+
};
|
|
4993
|
+
const port = {
|
|
4994
|
+
async put({ bytes, signal }) {
|
|
4995
|
+
signal?.throwIfAborted();
|
|
4996
|
+
const sha = createHash("sha256").update(bytes).digest("hex");
|
|
4997
|
+
const digest = `sha256:${sha}`;
|
|
4998
|
+
const path = destination(digest);
|
|
4999
|
+
const directory = join(store, sha.slice(0, 2));
|
|
5000
|
+
await checkDirectories(directory, true);
|
|
5001
|
+
const temporary = join(directory, `.${sha}.${randomUUID()}.tmp`);
|
|
5002
|
+
const file = await open(temporary, constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | constants.O_NOFOLLOW, 384);
|
|
5003
|
+
try {
|
|
5004
|
+
await file.writeFile(bytes);
|
|
5005
|
+
await file.sync();
|
|
5006
|
+
} finally {
|
|
5007
|
+
await file.close();
|
|
5008
|
+
}
|
|
5009
|
+
try {
|
|
5010
|
+
signal?.throwIfAborted();
|
|
5011
|
+
try {
|
|
5012
|
+
await link(temporary, path);
|
|
5013
|
+
} catch (error) {
|
|
5014
|
+
if (error.code !== "EEXIST") throw error;
|
|
5015
|
+
}
|
|
5016
|
+
const dir = await open(directory, constants.O_RDONLY | constants.O_DIRECTORY | constants.O_NOFOLLOW);
|
|
5017
|
+
try {
|
|
5018
|
+
await dir.sync();
|
|
5019
|
+
} finally {
|
|
5020
|
+
await dir.close();
|
|
5021
|
+
}
|
|
5022
|
+
} finally {
|
|
5023
|
+
await unlink(temporary).catch(() => void 0);
|
|
5024
|
+
}
|
|
5025
|
+
const ref = {
|
|
5026
|
+
locator: {
|
|
5027
|
+
kind: "private-cas",
|
|
5028
|
+
namespace,
|
|
5029
|
+
digest
|
|
5030
|
+
},
|
|
5031
|
+
sha256: digest,
|
|
5032
|
+
byteLength: bytes.byteLength
|
|
5033
|
+
};
|
|
5034
|
+
await port.read(ref);
|
|
5035
|
+
return ref;
|
|
5036
|
+
},
|
|
5037
|
+
async read(ref) {
|
|
5038
|
+
if (ref.locator.kind !== "private-cas" || ref.locator.namespace !== namespace || ref.locator.digest !== ref.sha256) throw new Error("private CAS locator does not match its digest and namespace");
|
|
5039
|
+
const path = destination(ref.sha256);
|
|
5040
|
+
await checkDirectories(join(store, DIGEST.exec(ref.sha256)[1].slice(0, 2)), false);
|
|
5041
|
+
const file = await open(path, constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
5042
|
+
try {
|
|
5043
|
+
const bytes = await file.readFile();
|
|
5044
|
+
if (`sha256:${createHash("sha256").update(bytes).digest("hex")}` !== ref.sha256 || bytes.byteLength !== ref.byteLength) throw new Error("private CAS object failed digest or length verification");
|
|
5045
|
+
return bytes;
|
|
5046
|
+
} finally {
|
|
5047
|
+
await file.close();
|
|
5048
|
+
}
|
|
5049
|
+
}
|
|
5050
|
+
};
|
|
5051
|
+
return port;
|
|
5052
|
+
}
|
|
5053
|
+
//#endregion
|
|
4962
5054
|
//#region src/runtime/run-benchmark.ts
|
|
4963
5055
|
/**
|
|
4964
5056
|
* runBenchmark — the packaged optimization suite. Define a domain by implementing an
|
|
@@ -8305,6 +8397,6 @@ function tail(s) {
|
|
|
8305
8397
|
return s.slice(-400);
|
|
8306
8398
|
}
|
|
8307
8399
|
//#endregion
|
|
8308
|
-
export {
|
|
8400
|
+
export { InMemoryCorpus as $, mcpSecretEnvMetadataKey as $t, unsafeInProcessRunner as A, runIsolatedCheck as At, SandboxRunAbortError as B, renderPairwiseMarkdown as Bt, withUntrackedArtifacts as C, superviseDispatch as Ct, patchDelivered as D, declaredCheckDigest as Dt, createSqlRunContext as E, declaredCheckDeliverable as Et, strategyTournament as F, leaderboard as Ft, equalKOnCost as G, SqlResultBlobStore as Gt, printBenchmarkReport as H, defaultAuditorInstruction as Ht, assertStrategyContract as I, pairwiseSignificance as It, runPersonified as J, connectStdioMcp as Jt, trajectoryReport as K, SqlSpawnJournal as Kt, authorStrategy as L, renderLeaderboardHtml as Lt, chatWorkerSeam as M, deterministicCompletion as Mt, createChatSessionStore as N, sentinelCompletion as Nt, runCoderChecks as O, declaredCheckJudge as Ot, runStrategyEvolution as P, stopSentinel as Pt, FileCorpus as Q, envKeyProvider as Qt, strategyAuthorContract as R, renderLeaderboardMarkdown as Rt, copyUntrackedIntoClone as S, loopDispatch as St, createFencedSqlRunContext as T, checkProgramDigest as Tt, runBenchmark as U, SqlRunOwnershipError as Ut, openSandboxRun as V, auditIntent as Vt, createPrivateCasArtifactPort as W, openSqlRunStore as Wt, createShapeRegistry as X, createMcpEnvironment as Xt, builtinShapes as Y, materializeLocalMcp as Yt, registerShape as Z, sanitizeMcpToolSchema as Zt, NOTE_MAX_CHARS as _, defineLeaderboard as _t, localShell as a, pipeline as at, composeWorkerEvidence as b, inlineSandboxClient as bt, createVerifierEnvironment as c, widen as ct, harvestSurfaceDiffs as d, createScopeAnalyst as dt, resolveMcpServerLaunch as en, renderCorpusToInstructions as et, analystsFromRegistry as f, registryScopeAnalyst as ft, EVIDENCE_MAX_CHARS as g, harvestCorpus as gt, worktreeFanout as h, HarvestError as ht, jjWorkspace as i, panel as it, chatTransportExecutor as j, completionAuthorizes as jt, codeModeSupervisorTools as k, readDeclaredCheck as kt, boxSurfaceReader as l, assertTraceDerivedFindings as lt, superviseSurface as m, inProcessSandboxClient as mt, makeFinding$1 as n, secretEnvOfMcpServer as nn, flatWidenGate as nt, runInWorkspace as o, selectValidWinner as ot, failuresAnalyst as p, observationFromRegistry as pt, definePersona as q, McpSpawnFault as qt, gitWorkspace as r, createTangleSandboxExactProcessProvider as rn, loopUntil as rt, createWaterfallCollector as s, verify as st, computeFindingId$1 as t, resolveSecretEnv as tn, fanout as tt, fsSurfaceReader as u, buildSteerContext as ut, VERIFY_TAIL_CHARS as v, resolveSandboxClient as vt, analyzeTrace as w, assertDeclaredCheck as wt, settledWorkerOut as x, loopCampaignDispatch as xt, closingWorkerNote as y, localSandboxClient as yt, strategyAuthorSystemPrompt as z, renderLeaderboardSvg as zt };
|
|
8309
8401
|
|
|
8310
|
-
//# sourceMappingURL=runtime-
|
|
8402
|
+
//# sourceMappingURL=runtime-lin_kRwN.js.map
|