@tangle-network/agent-knowledge 10.7.0 → 10.8.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/CHANGELOG.md +40 -0
- package/dist/benchmarks/index.js +1 -1
- package/dist/{benchmarks-B6fCb6AD.js → benchmarks-Qk94Gnj4.js} +48 -10
- package/dist/benchmarks-Qk94Gnj4.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index-DZeFm-BP.d.ts.map +1 -1
- package/dist/index.d.ts +43 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -27
- package/dist/index.js.map +1 -1
- package/dist/{inspect-DALsvG10.js → inspect-yYqLQuM4.js} +86 -13
- package/dist/inspect-yYqLQuM4.js.map +1 -0
- package/dist/memory/index.js +2 -2
- package/dist/{memory-BRGsy2QN.js → memory-DFSo2iLi.js} +3 -12
- package/dist/memory-DFSo2iLi.js.map +1 -0
- package/package.json +7 -6
- package/dist/benchmarks-B6fCb6AD.js.map +0 -1
- package/dist/inspect-DALsvG10.js.map +0 -1
- package/dist/memory-BRGsy2QN.js.map +0 -1
package/dist/memory/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as deterministicRng, D as toOffPolicyTrajectory, E as retrievalHoldoutConfigHash, S as applySessionStickyRetrievalHoldout, T as resetRetrievalHoldoutRegistry, _ as createAgentMemoryBranch, a as createNeo4jAgentMemoryAdapter, b as renderMemoryContext, c as runAgentMemoryImprovement, d as compareAgentMemoryLearning, f as runAgentMemoryLearningExperiment, g as buildAgentMemorySequencesFromBenchmarkCases, h as buildAgentMemorySequenceScenarios, i as AgentMemoryWriteInputSchema, l as createGraphitiMemoryAdapter, m as agentMemorySequenceJudge, n as AgentMemoryKindSchema, o as createMem0MemoryAdapter, p as runAgentMemoryExperiment, r as AgentMemoryScopeSchema, s as mem0MemoryAdapterIdentity, t as AgentMemoryHitSchema, u as graphitiMemoryAdapterIdentity, v as forkAgentMemoryBranchSnapshot, w as emitRetrievalHoldoutBypass, x as applyRetrievalHoldout, y as defaultGetMemoryContext } from "../memory-
|
|
2
|
-
import { C as sleepForMemoryRecovery,
|
|
1
|
+
import { C as deterministicRng, D as toOffPolicyTrajectory, E as retrievalHoldoutConfigHash, S as applySessionStickyRetrievalHoldout, T as resetRetrievalHoldoutRegistry, _ as createAgentMemoryBranch, a as createNeo4jAgentMemoryAdapter, b as renderMemoryContext, c as runAgentMemoryImprovement, d as compareAgentMemoryLearning, f as runAgentMemoryLearningExperiment, g as buildAgentMemorySequencesFromBenchmarkCases, h as buildAgentMemorySequenceScenarios, i as AgentMemoryWriteInputSchema, l as createGraphitiMemoryAdapter, m as agentMemorySequenceJudge, n as AgentMemoryKindSchema, o as createMem0MemoryAdapter, p as runAgentMemoryExperiment, r as AgentMemoryScopeSchema, s as mem0MemoryAdapterIdentity, t as AgentMemoryHitSchema, u as graphitiMemoryAdapterIdentity, v as forkAgentMemoryBranchSnapshot, w as emitRetrievalHoldoutBypass, x as applyRetrievalHoldout, y as defaultGetMemoryContext } from "../memory-DFSo2iLi.js";
|
|
2
|
+
import { C as sleepForMemoryRecovery, G as memoryWriteResultToSourceRecord, S as runBoundedMemoryLifecycle, W as memoryHitToSourceRecord, b as memoryRecoveryDelayMs, f as acquireAgentMemoryRunLease, h as DEFAULT_MEMORY_CLEANUP_TIMEOUT_MS, m as AgentMemoryLifecycleUnsafeError, p as AgentMemoryLifecycleTimeoutError, x as resolveMemoryCleanupTimeoutMs, y as createMemoryExecutionPool } from "../benchmarks-Qk94Gnj4.js";
|
|
3
3
|
export { AgentMemoryHitSchema, AgentMemoryKindSchema, AgentMemoryLifecycleTimeoutError, AgentMemoryLifecycleUnsafeError, AgentMemoryScopeSchema, AgentMemoryWriteInputSchema, DEFAULT_MEMORY_CLEANUP_TIMEOUT_MS, acquireAgentMemoryRunLease, agentMemorySequenceJudge, applyRetrievalHoldout, applySessionStickyRetrievalHoldout, buildAgentMemorySequenceScenarios, buildAgentMemorySequencesFromBenchmarkCases, compareAgentMemoryLearning, createAgentMemoryBranch, createGraphitiMemoryAdapter, createMem0MemoryAdapter, createMemoryExecutionPool, createNeo4jAgentMemoryAdapter, defaultGetMemoryContext, deterministicRng, emitRetrievalHoldoutBypass, forkAgentMemoryBranchSnapshot, graphitiMemoryAdapterIdentity, mem0MemoryAdapterIdentity, memoryHitToSourceRecord, memoryRecoveryDelayMs, memoryWriteResultToSourceRecord, renderMemoryContext, resetRetrievalHoldoutRegistry, resolveMemoryCleanupTimeoutMs, retrievalHoldoutConfigHash, runAgentMemoryExperiment, runAgentMemoryImprovement, runAgentMemoryLearningExperiment, runBoundedMemoryLifecycle, sleepForMemoryRecovery, toOffPolicyTrajectory };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as stableId, t as sha256 } from "./ids-Bevz_pXV.js";
|
|
2
|
-
import { A as reserveRecoveryAttempts, C as sleepForMemoryRecovery, D as hasSettledPaidCall, E as assertNoInterruptedPaidCalls,
|
|
2
|
+
import { A as reserveRecoveryAttempts, B as normalizeUsd, C as sleepForMemoryRecovery, D as hasSettledPaidCall, E as assertNoInterruptedPaidCalls, G as memoryWriteResultToSourceRecord, O as readActiveAttemptJournal, S as runBoundedMemoryLifecycle, T as appendDurableJournalEvent, V as rankCandidates, W as memoryHitToSourceRecord, _ as MEMORY_OPERATION_CANCELLATION_TIMEOUT_MS, b as memoryRecoveryDelayMs, f as acquireAgentMemoryRunLease, g as MEMORY_CAMPAIGN_DISPATCH_SHUTDOWN_TIMEOUT_MS, k as reconcileInterruptedMemoryPaidCalls, u as scoreMemoryBenchmarkArtifact, v as createBoundedMemoryAdapter, w as appendAttemptJournalEvent, x as resolveMemoryCleanupTimeoutMs, y as createMemoryExecutionPool, z as mean$1 } from "./benchmarks-Qk94Gnj4.js";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
5
5
|
import { canonicalJson, comparePairedArms, mulberry32 } from "@tangle-network/agent-eval";
|
|
@@ -1274,7 +1274,7 @@ function agentMemorySequenceJudge() {
|
|
|
1274
1274
|
//#region src/memory/experiment/metrics.ts
|
|
1275
1275
|
function rankAgentMemoryExperiment(candidates, scenarios, campaign, costByCandidate) {
|
|
1276
1276
|
const scenarioById = new Map(scenarios.map((scenario) => [scenario.id, scenario]));
|
|
1277
|
-
return candidates.map((candidate) => {
|
|
1277
|
+
return rankCandidates(candidates.map((candidate) => {
|
|
1278
1278
|
const candidateScenarios = scenarios.filter((scenario) => scenario.candidateId === candidate.id);
|
|
1279
1279
|
const cells = campaign.cells.filter((cell) => scenarioById.get(cell.scenarioId)?.candidateId === candidate.id);
|
|
1280
1280
|
const successful = cells.filter((cell) => !cell.error && cell.artifact);
|
|
@@ -1293,9 +1293,6 @@ function rankAgentMemoryExperiment(candidates, scenarios, campaign, costByCandid
|
|
|
1293
1293
|
durationMs: cells.reduce((sum, cell) => sum + cell.durationMs, 0),
|
|
1294
1294
|
dimensions: meanDimensions(dimensionRows)
|
|
1295
1295
|
};
|
|
1296
|
-
}).sort((a, b) => Number(a.cellsFailed > 0) - Number(b.cellsFailed > 0) || b.scoreMean - a.scoreMean || b.passRate - a.passRate || a.totalCostUsd - b.totalCostUsd || a.candidateId.localeCompare(b.candidateId)).map((row, index) => ({
|
|
1297
|
-
...row,
|
|
1298
|
-
rank: index + 1
|
|
1299
1296
|
}));
|
|
1300
1297
|
}
|
|
1301
1298
|
function memoryExperimentCostByCandidate(costLedger, runDir, scenarios, candidateIdsInput) {
|
|
@@ -1342,15 +1339,9 @@ function countDimensions(rows) {
|
|
|
1342
1339
|
for (const row of rows) for (const key of new Set(row)) counts.set(key, (counts.get(key) ?? 0) + 1);
|
|
1343
1340
|
return Object.fromEntries(counts);
|
|
1344
1341
|
}
|
|
1345
|
-
function mean$1(values) {
|
|
1346
|
-
return values.length === 0 ? 0 : values.reduce((sum, value) => sum + value, 0) / values.length;
|
|
1347
|
-
}
|
|
1348
1342
|
function format(value) {
|
|
1349
1343
|
return Number.isFinite(value) ? value.toFixed(4) : "0.0000";
|
|
1350
1344
|
}
|
|
1351
|
-
function normalizeUsd(value) {
|
|
1352
|
-
return Number(value.toFixed(12));
|
|
1353
|
-
}
|
|
1354
1345
|
//#endregion
|
|
1355
1346
|
//#region src/memory/experiment/probe-evaluation.ts
|
|
1356
1347
|
function scoreAgentMemoryProbe(sequence, step, probe, evidence) {
|
|
@@ -5391,4 +5382,4 @@ const AgentMemoryWriteInputSchema = z.object({
|
|
|
5391
5382
|
//#endregion
|
|
5392
5383
|
export { runSerializedKnowledgeOptimization as A, deterministicRng as C, toOffPolicyTrajectory as D, retrievalHoldoutConfigHash as E, assertImmutableRef as M, jsonCandidateCodec as O, applySessionStickyRetrievalHoldout as S, resetRetrievalHoldoutRegistry as T, createAgentMemoryBranch as _, createNeo4jAgentMemoryAdapter as a, renderMemoryContext as b, runAgentMemoryImprovement as c, compareAgentMemoryLearning as d, runAgentMemoryLearningExperiment as f, buildAgentMemorySequencesFromBenchmarkCases as g, buildAgentMemorySequenceScenarios as h, AgentMemoryWriteInputSchema as i, scenarioContentFingerprint as j, jsonObjectCandidateCodec as k, createGraphitiMemoryAdapter as l, agentMemorySequenceJudge as m, AgentMemoryKindSchema as n, createMem0MemoryAdapter as o, runAgentMemoryExperiment as p, AgentMemoryScopeSchema as r, mem0MemoryAdapterIdentity as s, AgentMemoryHitSchema as t, graphitiMemoryAdapterIdentity as u, forkAgentMemoryBranchSnapshot as v, emitRetrievalHoldoutBypass as w, applyRetrievalHoldout as x, defaultGetMemoryContext as y };
|
|
5393
5384
|
|
|
5394
|
-
//# sourceMappingURL=memory-
|
|
5385
|
+
//# sourceMappingURL=memory-DFSo2iLi.js.map
|