@tangle-network/agent-knowledge 19.1.5 → 20.0.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 +19 -2
- package/README.md +17 -91
- package/dist/benchmarks/index.d.ts +2 -2
- package/dist/benchmarks/index.js +2 -2
- package/dist/benchmarks-jir3ZP-M.js +162 -0
- package/dist/benchmarks-jir3ZP-M.js.map +1 -0
- package/dist/cli.js +2 -3
- package/dist/cli.js.map +1 -1
- package/dist/index-BhvSH4E4.d.ts +512 -0
- package/dist/index-BhvSH4E4.d.ts.map +1 -0
- package/dist/index-OAxtm6is.d.ts +9 -0
- package/dist/index-OAxtm6is.d.ts.map +1 -0
- package/dist/index.d.ts +197 -1332
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +561 -3653
- package/dist/index.js.map +1 -1
- package/dist/{inspect-C6c4zuKp.js → inspect-CMigdsD5.js} +282 -24
- package/dist/inspect-CMigdsD5.js.map +1 -0
- package/dist/memory/index.d.ts +3 -3
- package/dist/memory/index.js +3 -3
- package/dist/memory-BH6oT1Qe.js +2728 -0
- package/dist/memory-BH6oT1Qe.js.map +1 -0
- package/dist/source-record-CdWvzvO6.js +39 -0
- package/dist/source-record-CdWvzvO6.js.map +1 -0
- package/dist/types-BWV_Fvp7.d.ts +224 -0
- package/dist/types-BWV_Fvp7.d.ts.map +1 -0
- package/dist/{types-m2QB86fF.d.ts → types-BekdNwGD.d.ts} +4 -19
- package/dist/types-BekdNwGD.d.ts.map +1 -0
- package/dist/viz/index.d.ts +1 -1
- package/docs/architecture.md +2 -30
- package/docs/eval/investment-material-facts.md +2 -0
- package/docs/results/research-driving.md +8 -8
- package/docs/verified-research-ab.md +12 -10
- package/package.json +6 -12
- package/skills/build-with-agent-knowledge/SKILL.md +2 -15
- package/dist/benchmarks-BjXxjAke.js +0 -2824
- package/dist/benchmarks-BjXxjAke.js.map +0 -1
- package/dist/index-Bh9wLd0_.d.ts +0 -1097
- package/dist/index-Bh9wLd0_.d.ts.map +0 -1
- package/dist/index-DZeFm-BP.d.ts +0 -680
- package/dist/index-DZeFm-BP.d.ts.map +0 -1
- package/dist/inspect-C6c4zuKp.js.map +0 -1
- package/dist/memory-CUk1mgPY.js +0 -5778
- package/dist/memory-CUk1mgPY.js.map +0 -1
- package/dist/search-BBr5eUyT.js +0 -275
- package/dist/search-BBr5eUyT.js.map +0 -1
- package/dist/sources/index.d.ts +0 -376
- package/dist/sources/index.d.ts.map +0 -1
- package/dist/sources/index.js +0 -615
- package/dist/sources/index.js.map +0 -1
- package/dist/types-m2QB86fF.d.ts.map +0 -1
- package/docs/eval/rag-eval-roadmap.md +0 -123
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { r as stableId, t as sha256 } from "./ids-Bevz_pXV.js";
|
|
2
|
+
//#region src/memory/source-record.ts
|
|
3
|
+
function memoryHitToSourceRecord(hit, options = {}) {
|
|
4
|
+
const contentHash = sha256(`${hit.uri}\n${hit.text}`);
|
|
5
|
+
return {
|
|
6
|
+
id: stableId("src", `${hit.uri}:${contentHash}`),
|
|
7
|
+
uri: hit.uri,
|
|
8
|
+
title: hit.title ?? `${hit.kind}:${hit.id}`,
|
|
9
|
+
mediaType: "text/plain",
|
|
10
|
+
contentHash,
|
|
11
|
+
text: hit.text,
|
|
12
|
+
validUntil: hit.validUntil,
|
|
13
|
+
lastVerifiedAt: hit.lastVerifiedAt,
|
|
14
|
+
createdAt: (options.now ?? (() => /* @__PURE__ */ new Date()))().toISOString(),
|
|
15
|
+
metadata: {
|
|
16
|
+
...hit.metadata ?? {},
|
|
17
|
+
source: "agent-memory",
|
|
18
|
+
memoryId: hit.id,
|
|
19
|
+
memoryKind: hit.kind,
|
|
20
|
+
score: hit.score,
|
|
21
|
+
normalizedScore: hit.normalizedScore,
|
|
22
|
+
confidence: hit.confidence,
|
|
23
|
+
scope: options.scope
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function memoryWriteResultToSourceRecord(result, text, options = {}) {
|
|
28
|
+
return memoryHitToSourceRecord({
|
|
29
|
+
id: result.id,
|
|
30
|
+
uri: result.uri,
|
|
31
|
+
kind: result.kind,
|
|
32
|
+
text,
|
|
33
|
+
metadata: result.metadata
|
|
34
|
+
}, options);
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { memoryWriteResultToSourceRecord as n, memoryHitToSourceRecord as t };
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=source-record-CdWvzvO6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-record-CdWvzvO6.js","names":[],"sources":["../src/memory/source-record.ts"],"sourcesContent":["import { sha256, stableId } from '../ids'\nimport type { SourceRecord } from '../types'\nimport type { AgentMemoryHit, AgentMemoryScope, AgentMemoryWriteResult } from './types'\n\nexport function memoryHitToSourceRecord(\n hit: AgentMemoryHit,\n options: { now?: () => Date; scope?: AgentMemoryScope } = {},\n): SourceRecord {\n const contentHash = sha256(`${hit.uri}\\n${hit.text}`)\n return {\n id: stableId('src', `${hit.uri}:${contentHash}`),\n uri: hit.uri,\n title: hit.title ?? `${hit.kind}:${hit.id}`,\n mediaType: 'text/plain',\n contentHash,\n text: hit.text,\n validUntil: hit.validUntil,\n lastVerifiedAt: hit.lastVerifiedAt,\n createdAt: (options.now ?? (() => new Date()))().toISOString(),\n metadata: {\n ...(hit.metadata ?? {}),\n source: 'agent-memory',\n memoryId: hit.id,\n memoryKind: hit.kind,\n score: hit.score,\n normalizedScore: hit.normalizedScore,\n confidence: hit.confidence,\n scope: options.scope,\n },\n }\n}\n\nexport function memoryWriteResultToSourceRecord(\n result: AgentMemoryWriteResult,\n text: string,\n options: { now?: () => Date; scope?: AgentMemoryScope } = {},\n): SourceRecord {\n return memoryHitToSourceRecord(\n {\n id: result.id,\n uri: result.uri,\n kind: result.kind,\n text,\n metadata: result.metadata,\n },\n options,\n )\n}\n"],"mappings":";;AAIA,SAAgB,wBACd,KACA,UAA0D,CAAC,GAC7C;CACd,MAAM,cAAc,OAAO,GAAG,IAAI,IAAI,IAAI,IAAI,MAAM;CACpD,OAAO;EACL,IAAI,SAAS,OAAO,GAAG,IAAI,IAAI,GAAG,aAAa;EAC/C,KAAK,IAAI;EACT,OAAO,IAAI,SAAS,GAAG,IAAI,KAAK,GAAG,IAAI;EACvC,WAAW;EACX;EACA,MAAM,IAAI;EACV,YAAY,IAAI;EAChB,gBAAgB,IAAI;EACpB,YAAY,QAAQ,8BAAc,IAAI,KAAK,GAAA,CAAI,CAAC,CAAC,YAAY;EAC7D,UAAU;GACR,GAAI,IAAI,YAAY,CAAC;GACrB,QAAQ;GACR,UAAU,IAAI;GACd,YAAY,IAAI;GAChB,OAAO,IAAI;GACX,iBAAiB,IAAI;GACrB,YAAY,IAAI;GAChB,OAAO,QAAQ;EACjB;CACF;AACF;AAEA,SAAgB,gCACd,QACA,MACA,UAA0D,CAAC,GAC7C;CACd,OAAO,wBACL;EACE,IAAI,OAAO;EACX,KAAK,OAAO;EACZ,MAAM,OAAO;EACb;EACA,UAAU,OAAO;CACnB,GACA,OACF;AACF"}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { k as SourceRecord } from "./types-BekdNwGD.js";
|
|
2
|
+
//#region src/memory/types.d.ts
|
|
3
|
+
type AgentMemoryKind = 'message' | 'entity' | 'fact' | 'preference' | 'observation' | 'reasoning-trace';
|
|
4
|
+
interface AgentMemoryScope {
|
|
5
|
+
tenantId?: string;
|
|
6
|
+
userId?: string;
|
|
7
|
+
agentId?: string;
|
|
8
|
+
teamId?: string;
|
|
9
|
+
runId?: string;
|
|
10
|
+
sessionId?: string;
|
|
11
|
+
namespace?: string;
|
|
12
|
+
tags?: Record<string, string>;
|
|
13
|
+
}
|
|
14
|
+
interface AgentMemoryHit {
|
|
15
|
+
id: string;
|
|
16
|
+
uri: string;
|
|
17
|
+
kind: AgentMemoryKind;
|
|
18
|
+
text: string;
|
|
19
|
+
title?: string;
|
|
20
|
+
score?: number;
|
|
21
|
+
normalizedScore?: number;
|
|
22
|
+
confidence?: number;
|
|
23
|
+
createdAt?: string;
|
|
24
|
+
validUntil?: string;
|
|
25
|
+
lastVerifiedAt?: string;
|
|
26
|
+
metadata?: Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
interface AgentMemoryContext {
|
|
29
|
+
query: string;
|
|
30
|
+
text: string;
|
|
31
|
+
hits: AgentMemoryHit[];
|
|
32
|
+
sourceRecords: SourceRecord[];
|
|
33
|
+
metadata?: Record<string, unknown>;
|
|
34
|
+
}
|
|
35
|
+
interface AgentMemorySearchOptions {
|
|
36
|
+
scope?: AgentMemoryScope;
|
|
37
|
+
limit?: number;
|
|
38
|
+
minScore?: number;
|
|
39
|
+
kinds?: AgentMemoryKind[];
|
|
40
|
+
metadata?: Record<string, unknown>;
|
|
41
|
+
/**
|
|
42
|
+
* Opt-in randomized retrieval holdout (epsilon-dropout) for treatment-effect logging.
|
|
43
|
+
* Absent by default; when absent, retrieval behavior is unchanged. See ./holdout.
|
|
44
|
+
*/
|
|
45
|
+
holdout?: RetrievalHoldoutConfig;
|
|
46
|
+
}
|
|
47
|
+
interface AgentMemoryWriteInput {
|
|
48
|
+
kind: AgentMemoryKind;
|
|
49
|
+
text: string;
|
|
50
|
+
id?: string;
|
|
51
|
+
title?: string;
|
|
52
|
+
role?: 'system' | 'user' | 'assistant' | 'tool';
|
|
53
|
+
entityName?: string;
|
|
54
|
+
entityType?: string;
|
|
55
|
+
category?: string;
|
|
56
|
+
predicate?: string;
|
|
57
|
+
subject?: string;
|
|
58
|
+
object?: string;
|
|
59
|
+
confidence?: number;
|
|
60
|
+
scope?: AgentMemoryScope;
|
|
61
|
+
metadata?: Record<string, unknown>;
|
|
62
|
+
}
|
|
63
|
+
interface AgentMemoryWriteResult {
|
|
64
|
+
accepted: boolean;
|
|
65
|
+
id: string;
|
|
66
|
+
uri: string;
|
|
67
|
+
kind: AgentMemoryKind;
|
|
68
|
+
sourceRecord?: SourceRecord;
|
|
69
|
+
metadata?: Record<string, unknown>;
|
|
70
|
+
}
|
|
71
|
+
type AgentMemoryBranchIsolation = {
|
|
72
|
+
mode: 'scoped';
|
|
73
|
+
/** False when writes may outlive the worker process that issued them. */
|
|
74
|
+
processExitSafe?: boolean;
|
|
75
|
+
/** Wait before clearing an abandoned branch so accepted asynchronous writes become visible. */
|
|
76
|
+
recoveryDelayMs?: number;
|
|
77
|
+
} | {
|
|
78
|
+
mode: 'instance';
|
|
79
|
+
branchId: string;
|
|
80
|
+
/** True only when the dedicated instance also enforces every logical scope. */
|
|
81
|
+
supportsLogicalScopes?: boolean;
|
|
82
|
+
} | {
|
|
83
|
+
mode: 'unsupported';
|
|
84
|
+
reason: string;
|
|
85
|
+
};
|
|
86
|
+
interface AgentMemoryAdapter {
|
|
87
|
+
readonly id: string;
|
|
88
|
+
/** How this adapter prevents candidate branches from reading each other's state. */
|
|
89
|
+
readonly branchIsolation?: AgentMemoryBranchIsolation;
|
|
90
|
+
search(query: string, options?: AgentMemorySearchOptions): Promise<AgentMemoryHit[]>;
|
|
91
|
+
getContext(query: string, options?: AgentMemorySearchOptions): Promise<AgentMemoryContext>;
|
|
92
|
+
write(input: AgentMemoryWriteInput): Promise<AgentMemoryWriteResult>;
|
|
93
|
+
/** Delete exactly this scope. Repeated and concurrent calls for the same scope must be safe. */
|
|
94
|
+
clear?(scope?: AgentMemoryScope): Promise<void>;
|
|
95
|
+
flush?(): Promise<void>;
|
|
96
|
+
close?(): Promise<void>;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Optional session-level retrieval dropout for estimating whether delivered memories affect
|
|
100
|
+
* task outcomes. The feature is disabled unless configured, and consumers persist events
|
|
101
|
+
* through `onEvent`.
|
|
102
|
+
*/
|
|
103
|
+
interface RetrievalHoldoutConfig {
|
|
104
|
+
/** Per-session probability that one eligible watchlist item is suppressed. 0 logs the full schema without ever dropping. */
|
|
105
|
+
epsilon: number;
|
|
106
|
+
/** Item ids eligible for suppression. Empty or absent means no item can ever be dropped. */
|
|
107
|
+
watchlist?: string[];
|
|
108
|
+
/** Ties every event to the exact epsilon/watchlist in force, for audit and replay. */
|
|
109
|
+
configVersion?: string;
|
|
110
|
+
/** Copied onto every event so multi-adapter logs stay attributable. */
|
|
111
|
+
adapterId?: string;
|
|
112
|
+
/** Corpus/store version stamp; an edited item under the same id is a different treatment. */
|
|
113
|
+
corpusVersion?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Emit plaintext sessionId and scope on events. Default false: events carry only
|
|
116
|
+
* sessionIdHash/scopeHash, so PII-bearing identifiers (tenantId/userId/tags) never reach a
|
|
117
|
+
* consumer-controlled sink unless the consumer explicitly owns that decision. Note that
|
|
118
|
+
* replaying assignment draws from logs alone needs the plaintext sessionId, so
|
|
119
|
+
* privacy-preserving logs require the consumer's own sessionId mapping for replay.
|
|
120
|
+
*/
|
|
121
|
+
includePlaintextIdentifiers?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Cap on tracked sessions per experiment config in the sticky wrapper's registry.
|
|
124
|
+
* The default is 10,000.
|
|
125
|
+
*/
|
|
126
|
+
maxTrackedSessions?: number;
|
|
127
|
+
/**
|
|
128
|
+
* Uniform-[0,1) generator keyed by a string. Defaults to a sha256-derived deterministic
|
|
129
|
+
* generator so every assignment is replayable from the logged keys alone.
|
|
130
|
+
*/
|
|
131
|
+
rng?: (key: string) => number;
|
|
132
|
+
/** Receives one event per retrieval call, including calls where nothing is dropped. */
|
|
133
|
+
onEvent: (event: RetrievalHoldoutEvent) => void;
|
|
134
|
+
}
|
|
135
|
+
interface RetrievalHoldoutEligibleItem {
|
|
136
|
+
id: string;
|
|
137
|
+
/** 1-based position in the post-filter hit list. */
|
|
138
|
+
rank: number;
|
|
139
|
+
score?: number;
|
|
140
|
+
kind: string;
|
|
141
|
+
/** sha256(hit.text) prefix; effects are estimated per (id, contentHash) pair. */
|
|
142
|
+
contentHash: string;
|
|
143
|
+
}
|
|
144
|
+
interface RetrievalHoldoutEvent {
|
|
145
|
+
v: 1;
|
|
146
|
+
eventId: string;
|
|
147
|
+
ts: string;
|
|
148
|
+
adapterId?: string;
|
|
149
|
+
/** Plaintext session id, emitted only when `includePlaintextIdentifiers` is true. */
|
|
150
|
+
sessionId?: string;
|
|
151
|
+
/** Consumer-supplied experiment/outcome join id (scope.tags.taskId); deliberately plaintext. */
|
|
152
|
+
taskId?: string;
|
|
153
|
+
/** 1-based call counter within the session; 0 when the call is outside session randomization. */
|
|
154
|
+
callIndex: number;
|
|
155
|
+
/**
|
|
156
|
+
* sha256(sessionId) prefix used as the privacy-preserving join key and assignment seed.
|
|
157
|
+
*/
|
|
158
|
+
sessionIdHash?: string;
|
|
159
|
+
queryHash?: string;
|
|
160
|
+
/** Verbatim scope, emitted only when `includePlaintextIdentifiers` is true. */
|
|
161
|
+
scope?: AgentMemoryScope;
|
|
162
|
+
/** sha256 prefix of the canonical-JSON scope (keys sorted, undefined stripped). */
|
|
163
|
+
scopeHash?: string;
|
|
164
|
+
config: {
|
|
165
|
+
epsilon: number;
|
|
166
|
+
watchlist: string[];
|
|
167
|
+
configVersion?: string;
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* Value-hash of the experiment-defining knobs, sha256({epsilon, sorted watchlist}) prefix.
|
|
171
|
+
* The estimator groups events by it; the sticky-session registry is keyed by it.
|
|
172
|
+
*/
|
|
173
|
+
configHash: string;
|
|
174
|
+
/**
|
|
175
|
+
* False when no sessionId is available or the adapter answered without retrieval
|
|
176
|
+
* (see bypassReason), so the fraction-under-experiment denominator stays honest.
|
|
177
|
+
*/
|
|
178
|
+
holdoutEligible: boolean;
|
|
179
|
+
/** Present only on adapter paths that bypassed retrieval, where no suppression could apply. */
|
|
180
|
+
bypassReason?: RetrievalHoldoutBypassReason;
|
|
181
|
+
/** The full post-filter eligibility set E, logged on every call (control arm + interference probes). */
|
|
182
|
+
eligible: RetrievalHoldoutEligibleItem[];
|
|
183
|
+
/** Ids in watchlist ∩ E, in eligibility order. */
|
|
184
|
+
watchlistEligible: string[];
|
|
185
|
+
sessionHoldout: boolean;
|
|
186
|
+
/** The session's sticky drop target once drawn; distinguishes "target absent from E" from "not yet drawn". */
|
|
187
|
+
sessionTargetId: string | null;
|
|
188
|
+
/** The item suppressed in THIS call, or null. */
|
|
189
|
+
droppedId: string | null;
|
|
190
|
+
/** 1/|watchlist ∩ E| recorded at draw time; the exact inverse-propensity weight input. */
|
|
191
|
+
pickPropensity: number | null;
|
|
192
|
+
/** epsilon * pickPropensity, recorded at draw time so analysis never re-derives assignment probabilities. */
|
|
193
|
+
dropPropensity: number | null;
|
|
194
|
+
deliveredIds: string[];
|
|
195
|
+
corpusVersion?: string;
|
|
196
|
+
}
|
|
197
|
+
interface RetrievalHoldoutSessionState {
|
|
198
|
+
sessionId: string;
|
|
199
|
+
/** Calls observed so far in this session. */
|
|
200
|
+
callCount: number;
|
|
201
|
+
sessionHoldout: boolean;
|
|
202
|
+
/** Sticky drop target; drawn once at the first call whose eligibility set intersects the watchlist. */
|
|
203
|
+
targetId: string | null;
|
|
204
|
+
pickPropensity: number | null;
|
|
205
|
+
}
|
|
206
|
+
interface RetrievalHoldoutCallContext {
|
|
207
|
+
sessionId?: string;
|
|
208
|
+
taskId?: string;
|
|
209
|
+
/** Raw query; only its sha256 prefix is logged. */
|
|
210
|
+
query?: string;
|
|
211
|
+
scope?: AgentMemoryScope;
|
|
212
|
+
/** State returned by the previous call of this session; threading it is what makes suppression sticky. */
|
|
213
|
+
session?: RetrievalHoldoutSessionState;
|
|
214
|
+
}
|
|
215
|
+
interface RetrievalHoldoutResult {
|
|
216
|
+
delivered: AgentMemoryHit[];
|
|
217
|
+
event: RetrievalHoldoutEvent;
|
|
218
|
+
session?: RetrievalHoldoutSessionState;
|
|
219
|
+
}
|
|
220
|
+
/** Adapter context paths that answer without retrieval, so no holdout draw can happen. */
|
|
221
|
+
type RetrievalHoldoutBypassReason = 'short-term-context' | 'raw-string-context';
|
|
222
|
+
//#endregion
|
|
223
|
+
export { AgentMemoryKind as a, AgentMemoryWriteInput as c, RetrievalHoldoutCallContext as d, RetrievalHoldoutConfig as f, RetrievalHoldoutSessionState as g, RetrievalHoldoutResult as h, AgentMemoryHit as i, AgentMemoryWriteResult as l, RetrievalHoldoutEvent as m, AgentMemoryBranchIsolation as n, AgentMemoryScope as o, RetrievalHoldoutEligibleItem as p, AgentMemoryContext as r, AgentMemorySearchOptions as s, AgentMemoryAdapter as t, RetrievalHoldoutBypassReason as u };
|
|
224
|
+
//# sourceMappingURL=types-BWV_Fvp7.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-BWV_Fvp7.d.ts","names":[],"sources":["../src/memory/types.ts"],"mappings":";;KAEY;UAQK;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;;UAGQ;EACf;EACA;EACA,MAAM;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;;UAGI;EACf;EACA;EACA,MAAM;EACN,eAAe;EACf,WAAW;;UAGI;EACf,QAAQ;EACR;EACA;EACA,QAAQ;EACR,WAAW;;;;;EAKX,UAAU;;UAGK;EACf,MAAM;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ;EACR,WAAW;;UAGI;EACf;EACA;EACA;EACA,MAAM;EACN,eAAe;EACf,WAAW;;KAGD;EAEN;;EAEA;;EAEA;;EAGA;EACA;;EAEA;;EAEA;EAAqB;;UAEV;WACN;;WAEA,kBAAkB;EAC3B,OAAO,eAAe,UAAU,2BAA2B,QAAQ;EACnE,WAAW,eAAe,UAAU,2BAA2B,QAAQ;EACvE,MAAM,OAAO,wBAAwB,QAAQ;;EAE7C,OAAO,QAAQ,mBAAmB;EAClC,UAAU;EACV,UAAU;;;;;;;UASK;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;EAQA;;;;;EAKA;;;;;EAKA,OAAO;;EAEP,UAAU,OAAO;;UAGF;EACf;;EAEA;EACA;EACA;;EAEA;;UAGe;EACf;EACA;EACA;EACA;;EAEA;;EAEA;;EAEA;;;;EAIA;EACA;;EAEA,QAAQ;;EAER;EACA;IAAU;IAAiB;IAAqB;;;;;;EAKhD;;;;;EAKA;;EAEA,eAAe;;EAEf,UAAU;;EAEV;EACA;;EAEA;;EAEA;;EAEA;;EAEA;EACA;EACA;;UAGe;EACf;;EAEA;EACA;;EAEA;EACA;;UAGe;EACf;EACA;;EAEA;EACA,QAAQ;;EAER,UAAU;;UAGK;EACf,WAAW;EACX,OAAO;EACP,UAAU;;;KAIA"}
|
|
@@ -51,20 +51,6 @@ interface KnowledgeRelation {
|
|
|
51
51
|
weight?: number;
|
|
52
52
|
metadata?: Record<string, unknown>;
|
|
53
53
|
}
|
|
54
|
-
/** A caller-declared vertex of a labeled relation graph. */
|
|
55
|
-
interface KnowledgeRelationNode {
|
|
56
|
-
id: KnowledgeId;
|
|
57
|
-
/** Caller vocabulary, such as `run`, `claim`, `page`, or `model`. */
|
|
58
|
-
kind: string;
|
|
59
|
-
label?: string;
|
|
60
|
-
metadata?: Record<string, unknown>;
|
|
61
|
-
}
|
|
62
|
-
/** A labeled multi-edge graph with one edge per `(sourceId, targetId, predicate)`. */
|
|
63
|
-
interface KnowledgeRelationGraph {
|
|
64
|
-
/** Declared nodes in declaration order; empty when the graph was built from relations alone. */
|
|
65
|
-
nodes: KnowledgeRelationNode[];
|
|
66
|
-
edges: KnowledgeRelation[];
|
|
67
|
-
}
|
|
68
54
|
interface KnowledgeUnit {
|
|
69
55
|
id: KnowledgeId;
|
|
70
56
|
title: string;
|
|
@@ -191,8 +177,7 @@ interface KnowledgeWriteParseResult {
|
|
|
191
177
|
/**
|
|
192
178
|
* The event vocabulary, as a value so the runtime schema is DERIVED from it
|
|
193
179
|
* rather than restated. A restated copy in `schemas.ts` drifted: it omitted
|
|
194
|
-
* `research.iteration`, which
|
|
195
|
-
* produces, so every attempt to store one would have been rejected. Nothing
|
|
180
|
+
* `research.iteration`, which the research loop produces, so every attempt to store one would have been rejected. Nothing
|
|
196
181
|
* caught it because nothing ever stored an event. Add a type here and the
|
|
197
182
|
* schema accepts it in the same edit.
|
|
198
183
|
*/
|
|
@@ -228,7 +213,7 @@ interface DeepQuestion {
|
|
|
228
213
|
/** The round this question was raised in. */
|
|
229
214
|
raisedRound: number;
|
|
230
215
|
}
|
|
231
|
-
/** One live tracked claim
|
|
216
|
+
/** One live tracked claim, with Set fields; `ResearchClaimRecord` is its durable form. */
|
|
232
217
|
interface TrackedClaim {
|
|
233
218
|
id: string;
|
|
234
219
|
/** The claim text as first extracted (kept for prompts/audit). */
|
|
@@ -338,5 +323,5 @@ interface KnowledgeRelease {
|
|
|
338
323
|
metadata?: Record<string, unknown>;
|
|
339
324
|
}
|
|
340
325
|
//#endregion
|
|
341
|
-
export {
|
|
342
|
-
//# sourceMappingURL=types-
|
|
326
|
+
export { SourceRegistry as A, KnowledgeWriteParseResult as C, ResearchSourceVersion as D, ResearchClaimRecord as E, SourceAnchor as O, KnowledgeWriteBlock as S, ResearchClaimLedger as T, KnowledgePolicy as _, KnowledgeBaseCandidate as a, KnowledgeSearchResult as b, KnowledgeEventType as c, KnowledgeGraphNode as d, KnowledgeId as f, KnowledgePageInvalidation as g, KnowledgePage as h, KNOWLEDGE_EVENT_TYPES as i, TrackedClaim as j, SourceRecord as k, KnowledgeGraph as l, KnowledgeLintFinding as m, DeepQuestion as n, KnowledgeClaim as o, KnowledgeIndex as p, DeepQuestionKind as r, KnowledgeEvent as s, ClaimRef as t, KnowledgeGraphEdge as u, KnowledgeRelation as v, ResearchClaimEvidence as w, KnowledgeUnit as x, KnowledgeRelease as y };
|
|
327
|
+
//# sourceMappingURL=types-BekdNwGD.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-BekdNwGD.d.ts","names":[],"sources":["../src/types.ts"],"mappings":";KAAY;UAEK;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;;UAGI;EACf,IAAI;EACJ;EACA;EACA;EACA;EACA;EACA,UAAU;;EAEV;;EAEA;EACA,WAAW;EACX;;UAGe;EACf;EACA,SAAS;;UAGM;EACf;EACA;EACA;;UAGe;EACf,IAAI;EACJ;EACA,MAAM;EACN;EACA;EACA,WAAW;;UAGI;EACf,UAAU;EACV,UAAU;EACV;EACA;EACA,WAAW;;UAGI;EACf,IAAI;EACJ;EACA;EACA,SAAS;EACT,YAAY;EACZ;EACA;EACA,WAAW;EACX;;;;;;;;;;UAWe;EACf;EACA;EACA;EACA;EACA;EACA,WAAW;;UAGI;EACf,IAAI;EACJ;EACA;EACA;EACA,aAAa;EACb;EACA;EACA;;EAEA,QAAQ;;EAER,cAAc;;EAEd,eAAe;;UAGA;EACf,IAAI;EACJ;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf,QAAQ;EACR,QAAQ;EACR;EACA;;UAGe;EACf,OAAO;EACP,OAAO;;UAGQ;EACf;EACA;EACA,SAAS;EACT,OAAO;EACP,OAAO;;UAGQ;EACf,MAAM;;;;;;;EAON;;EAEA;;;;;;;;EAQA;EACA;EACA;EACA;;UAGe;EACf;EAkBA;EACA;EACA;EACA,WAAW;;UAGI;EACf;EACA;EACA;EACA;EACA,WAAW;;UAGI;EACf,IAAI;EACJ,OAAO;EACP;EACA;EACA;EACA;EACA,WAAW;;UAGI;EACf;EACA;;UAGe;EACf,QAAQ;EACR;;;;;;;;;cAUW;KAWD,6BAA6B;UAExB;EACf;EACA,MAAM;EACN;EACA;EACA;EACA,WAAW;;;KAID;;;;;;;;;UAUK;EACf,MAAM;EACN;;EAEA;;EAEA;;EAEA;;EAEA;;;UAIe;EACf;;EAEA;;EAEA,iBAAiB;;EAEjB;;EAEA,aAAa;;;;;;EAMb;EACA;;;;;;;;;UAUe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;;;UAIe;;EAEf,UAAU;;EAEV;;EAEA;;;;;;;;;;;UAYe;;EAEf;EACA;EACA;;EAEA,UAAU;EACV;;EAEA;;EAEA;EACA;;;;;;;;;;UAWe;;EAEf;EACA;;EAEA;;EAEA;;EAEA;;;;;EAKA;;;;;EAKA,eAAe;;EAEf,mBAAmB;EACnB,QAAQ;EACR,WAAW;;UAGI;EACf;EACA;EACA;EACA;EACA;EACA;EACA,WAAW"}
|
package/dist/viz/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as KnowledgeGraphNode, l as KnowledgeGraph, u as KnowledgeGraphEdge } from "../types-
|
|
1
|
+
import { d as KnowledgeGraphNode, l as KnowledgeGraph, u as KnowledgeGraphEdge } from "../types-BekdNwGD.js";
|
|
2
2
|
//#region src/viz/index.d.ts
|
|
3
3
|
export interface KnowledgeVizNode extends KnowledgeGraphNode {
|
|
4
4
|
degree: number;
|
package/docs/architecture.md
CHANGED
|
@@ -8,7 +8,6 @@ It owns the small set of primitives every serious agent knowledge system needs:
|
|
|
8
8
|
- generated knowledge pages and units
|
|
9
9
|
- claims with source references
|
|
10
10
|
- deterministic indexing, graph construction, search, and lint
|
|
11
|
-
- labeled relation graphs with one edge per `(source, target, predicate)` and neighbor, walk, and reachability queries
|
|
12
11
|
- retrieval/RAG candidate surfaces, gold-target scoring, and eval-loop adapters
|
|
13
12
|
- safe LLM write proposals
|
|
14
13
|
- eval-gated release confidence through `@tangle-network/agent-eval`
|
|
@@ -57,15 +56,10 @@ They reach it through `mergeClaimLedger(id, merge)`, which holds the mutation lo
|
|
|
57
56
|
The combining rule is `mergeClaimLedgers`: support and contradiction edges union, `contested` and `addressed` latch on, `firstSeenRound` moves earlier, and every collection is sorted.
|
|
58
57
|
The merge is commutative, associative, and idempotent, so the bytes on disk depend on the evidence rather than on scheduling.
|
|
59
58
|
Ledgers for two different goals refuse to merge (`ClaimLedgerGoalConflictError`) rather than pooling unrelated evidence into one corroboration count.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
After the exact submitted bytes are durable, `runVerifiedResearchLoop` passes the resulting `SourceRecord` to `commitSources`.
|
|
59
|
+
`TrackedClaim` keeps its published `Set` fields; the ledger stores a separate `ResearchClaimRecord` with sorted arrays so JSON serialization cannot erase those sets.
|
|
60
|
+
A `ResearchClaimEvidence` observation records the expected registry id, original URI, and full content hash; it cannot affect claim support or completion by itself.
|
|
63
61
|
The ledger materializes only observations whose complete source identity matches a confirmed record, so reusing one URI for different bytes cannot activate the wrong claims and a crash on either side resumes safely.
|
|
64
62
|
Unversioned URI-only ledgers cannot prove which bytes produced their observations; reads and writes fail with `ClaimLedgerMigrationRequiredError` and preserve the original file for an explicit archive-and-reverify migration.
|
|
65
|
-
Before synchronous question generation, the persistent driver records `preparedRounds`; a resume reconstructs and checkpoints any prepared round whose questions were interrupted, and the loop publishes its `research.iteration` event only after that checkpoint succeeds.
|
|
66
|
-
The research loop requires storage readiness and the driver's optional `isComplete()` result before it reports completion.
|
|
67
|
-
An unfinished driver can generate steering with no remaining storage gaps, so passing source requirements does not stop research prematurely.
|
|
68
|
-
Drivers without `isComplete()` use storage readiness alone.
|
|
69
63
|
Without readiness specifications, the loop runs to its round limit and never reports ready.
|
|
70
64
|
|
|
71
65
|
Every write in this layer goes through `durable-fs` (`writeFileDurable`, `writeJsonDurableWithinRoot`): temp file, fsync, atomic rename, and parent fsync.
|
|
@@ -93,25 +87,3 @@ Applications must bind external state through their existing memory branch or ev
|
|
|
93
87
|
6. Search and graph-lint the knowledge base.
|
|
94
88
|
7. Evaluate candidate KB and retrieval variants with an `agent-eval` improvement loop, then fold the resulting run records into release confidence with `knowledgeReleaseReport`.
|
|
95
89
|
8. Promote only variants that pass downstream gates.
|
|
96
|
-
|
|
97
|
-
## CLI
|
|
98
|
-
|
|
99
|
-
The CLI is intentionally fast and local:
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
agent-knowledge init
|
|
103
|
-
agent-knowledge source-add ./source.md
|
|
104
|
-
agent-knowledge sources
|
|
105
|
-
agent-knowledge apply-write-blocks ./proposal.txt
|
|
106
|
-
agent-knowledge index
|
|
107
|
-
agent-knowledge search "query"
|
|
108
|
-
agent-knowledge inspect
|
|
109
|
-
agent-knowledge explain knowledge/concepts/example.md
|
|
110
|
-
agent-knowledge graph
|
|
111
|
-
agent-knowledge lint
|
|
112
|
-
agent-knowledge validate --strict
|
|
113
|
-
agent-knowledge export --format json
|
|
114
|
-
agent-knowledge viz
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
It does not call an LLM. It operates over markdown and cached JSON indexes so fleet jobs and dev containers can use it cheaply.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Held-out investment-research eval set: material facts + provenance
|
|
2
2
|
|
|
3
|
+
> Historical record. The investment-thesis set and task were removed in Knowledge 20.0.0; see commit bc2abe0cee1047350a27af37200b94b6801d1f6b for the code.
|
|
4
|
+
|
|
3
5
|
This is the answer key and the provenance ledger for `tests/eval/investment-thesis-set.ts`.
|
|
4
6
|
|
|
5
7
|
**What the set measures.** Give a research loop a company + ticker + an as-of
|
|
@@ -58,7 +58,7 @@ So we need a metric for research **quality**, not hygiene. We use:
|
|
|
58
58
|
|
|
59
59
|
## 2. The held-out exam (the firewall)
|
|
60
60
|
|
|
61
|
-
[`tests/loops/held-out-exam.ts`](
|
|
61
|
+
[`tests/loops/held-out-exam.ts`](https://github.com/tangle-network/agent-knowledge/blob/bc2abe0cee1047350a27af37200b94b6801d1f6b/tests/loops/held-out-exam.ts). 5 ML topics,
|
|
62
62
|
4 questions each = **20 deep questions**. Each is a *depth* question by
|
|
63
63
|
construction, comparative, mechanism-level, or contradiction-aware, chosen so a
|
|
64
64
|
single web search for the topic name does **not** surface the answer:
|
|
@@ -100,16 +100,16 @@ between arms (if any) would be real depth, not grader slack.
|
|
|
100
100
|
|
|
101
101
|
## 3. The three arms, at equal compute
|
|
102
102
|
|
|
103
|
-
[`tests/loops/research-driving-ab.test.ts`](
|
|
103
|
+
[`tests/loops/research-driving-ab.test.ts`](https://github.com/tangle-network/agent-knowledge/blob/bc2abe0cee1047350a27af37200b94b6801d1f6b/tests/loops/research-driving-ab.test.ts).
|
|
104
104
|
All three arms run the **same** real web worker
|
|
105
|
-
([`createWebResearchWorker`](
|
|
105
|
+
([`createWebResearchWorker`](https://github.com/tangle-network/agent-knowledge/blob/bc2abe0cee1047350a27af37200b94b6801d1f6b/src/web-research-worker.ts), glm-5.2 query-gen
|
|
106
106
|
→ live `/v1/search` → `politeFetch` → `htmlToText`). They differ **only** in the
|
|
107
107
|
driver:
|
|
108
108
|
|
|
109
109
|
- **(A) single-agent collection**: the worker alone, no driver. It collects.
|
|
110
|
-
- **(B) verify/dedup**: [`createVerifyingResearchDriver`](
|
|
110
|
+
- **(B) verify/dedup**: [`createVerifyingResearchDriver`](https://github.com/tangle-network/agent-knowledge/blob/bc2abe0cee1047350a27af37200b94b6801d1f6b/src/web-research-worker.ts):
|
|
111
111
|
a second glm-5.2 pass filters each source for relevance / near-duplicates.
|
|
112
|
-
- **(C) DRIVING**: [`createResearchDrivingDriver`](
|
|
112
|
+
- **(C) DRIVING**: [`createResearchDrivingDriver`](https://github.com/tangle-network/agent-knowledge/blob/bc2abe0cee1047350a27af37200b94b6801d1f6b/src/research-driving-driver.ts):
|
|
113
113
|
the driver extracts each source's claims (glm-5.2), tracks independent-source
|
|
114
114
|
support + contradictions, and folds comparative / mechanism / gap /
|
|
115
115
|
contradiction sub-questions into the worker's next prompt.
|
|
@@ -258,8 +258,8 @@ AGENT_KNOWLEDGE_LIVE=1 RQ_PROBE=1 RQ_PROBE_ROUNDS=3 TANGLE_API_KEY=<…> \
|
|
|
258
258
|
cheaper slice. The exam is held out by construction, no flag shows it to a loop.
|
|
259
259
|
|
|
260
260
|
**Source:** the exam and grader:
|
|
261
|
-
[`tests/loops/held-out-exam.ts`](
|
|
261
|
+
[`tests/loops/held-out-exam.ts`](https://github.com/tangle-network/agent-knowledge/blob/bc2abe0cee1047350a27af37200b94b6801d1f6b/tests/loops/held-out-exam.ts);
|
|
262
262
|
the 3-arm A/B and multi-round probe:
|
|
263
|
-
[`tests/loops/research-driving-ab.test.ts`](
|
|
263
|
+
[`tests/loops/research-driving-ab.test.ts`](https://github.com/tangle-network/agent-knowledge/blob/bc2abe0cee1047350a27af37200b94b6801d1f6b/tests/loops/research-driving-ab.test.ts);
|
|
264
264
|
the driving driver under test:
|
|
265
|
-
[`src/research-driving-driver.ts`](
|
|
265
|
+
[`src/research-driving-driver.ts`](https://github.com/tangle-network/agent-knowledge/blob/bc2abe0cee1047350a27af37200b94b6801d1f6b/src/research-driving-driver.ts).
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# A verifier agent mostly deduplicates: a controlled A/B on two-agent web research, and what its cost buys
|
|
2
2
|
|
|
3
|
+
> Historical record. The research loop, drivers, web worker, and investment-thesis task this paper measured were removed in Knowledge 20.0.0; code links point to the last commit that contained them.
|
|
4
|
+
|
|
3
5
|
*Tangle Network · `agent-knowledge`*
|
|
4
6
|
|
|
5
7
|
## Abstract
|
|
@@ -476,13 +478,13 @@ per-company A/B: [`docs/results/investment-thesis.md`](results/investment-thesis
|
|
|
476
478
|
## 10. Reproduce
|
|
477
479
|
|
|
478
480
|
The loop, the worker, the verifier, the claim-grounding mode, the adaptive driver, the
|
|
479
|
-
driving driver, the held-out exam, the cost instrumentation, and every A/B are
|
|
480
|
-
|
|
481
|
+
driving driver, the held-out exam, the cost instrumentation, and every A/B are at commit
|
|
482
|
+
`bc2abe0cee1047350a27af37200b94b6801d1f6b`. Each live test gates a cheap one-call glm-5.2 smoke before any
|
|
481
483
|
multi-topic burn.
|
|
482
484
|
|
|
483
485
|
```bash
|
|
484
486
|
git clone https://github.com/tangle-network/agent-knowledge
|
|
485
|
-
cd agent-knowledge && pnpm install
|
|
487
|
+
cd agent-knowledge && git checkout bc2abe0cee1047350a27af37200b94b6801d1f6b && pnpm install
|
|
486
488
|
|
|
487
489
|
# offline A/B: deterministic, no credentials (a controlled lower bound that
|
|
488
490
|
# exercises the same harness against a planted source pool)
|
|
@@ -523,13 +525,13 @@ AGENT_KNOWLEDGE_LIVE=1 RQ_PROBE=1 RQ_PROBE_ROUNDS=3 TANGLE_API_KEY=<…> \
|
|
|
523
525
|
topic list; the live arms run the loops on each at equal compute and report the paired
|
|
524
526
|
bootstrap and per-arm cost.
|
|
525
527
|
|
|
526
|
-
**Source:** the loop, [`src/verified-research-loop.ts`](
|
|
527
|
-
the live worker + verifier + cost instrumentation, [`src/web-research-worker.ts`](
|
|
528
|
-
the misattribution check, [`src/claim-grounding.ts`](
|
|
529
|
-
the adaptive driver, [`src/adaptive-driver.ts`](
|
|
530
|
-
the driving driver, [`src/research-driving-driver.ts`](
|
|
531
|
-
the held-out exam + $0 grader, [`tests/loops/held-out-exam.ts`](
|
|
532
|
-
the A/B harnesses, [`tests/loops/`](
|
|
528
|
+
**Source:** the loop, [`src/verified-research-loop.ts`](https://github.com/tangle-network/agent-knowledge/blob/bc2abe0cee1047350a27af37200b94b6801d1f6b/src/verified-research-loop.ts);
|
|
529
|
+
the live worker + verifier + cost instrumentation, [`src/web-research-worker.ts`](https://github.com/tangle-network/agent-knowledge/blob/bc2abe0cee1047350a27af37200b94b6801d1f6b/src/web-research-worker.ts);
|
|
530
|
+
the misattribution check, [`src/claim-grounding.ts`](https://github.com/tangle-network/agent-knowledge/blob/bc2abe0cee1047350a27af37200b94b6801d1f6b/src/claim-grounding.ts);
|
|
531
|
+
the adaptive driver, [`src/adaptive-driver.ts`](https://github.com/tangle-network/agent-knowledge/blob/bc2abe0cee1047350a27af37200b94b6801d1f6b/src/adaptive-driver.ts);
|
|
532
|
+
the driving driver, [`src/research-driving-driver.ts`](https://github.com/tangle-network/agent-knowledge/blob/bc2abe0cee1047350a27af37200b94b6801d1f6b/src/research-driving-driver.ts);
|
|
533
|
+
the held-out exam + $0 grader, [`tests/loops/held-out-exam.ts`](https://github.com/tangle-network/agent-knowledge/blob/bc2abe0cee1047350a27af37200b94b6801d1f6b/tests/loops/held-out-exam.ts);
|
|
534
|
+
the A/B harnesses, [`tests/loops/`](https://github.com/tangle-network/agent-knowledge/tree/bc2abe0cee1047350a27af37200b94b6801d1f6b/tests/loops/).
|
|
533
535
|
Per-result detail: [`docs/results/cost-quality.md`](results/cost-quality.md),
|
|
534
536
|
[`docs/results/claim-grounding.md`](results/claim-grounding.md),
|
|
535
537
|
[`docs/results/adaptive.md`](results/adaptive.md),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-knowledge",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0",
|
|
4
4
|
"description": "Build, search, evaluate, and improve source-backed knowledge bases.",
|
|
5
5
|
"homepage": "https://github.com/tangle-network/agent-knowledge#readme",
|
|
6
6
|
"repository": {
|
|
@@ -34,11 +34,6 @@
|
|
|
34
34
|
"import": "./dist/memory/index.js",
|
|
35
35
|
"default": "./dist/memory/index.js"
|
|
36
36
|
},
|
|
37
|
-
"./sources": {
|
|
38
|
-
"types": "./dist/sources/index.d.ts",
|
|
39
|
-
"import": "./dist/sources/index.js",
|
|
40
|
-
"default": "./dist/sources/index.js"
|
|
41
|
-
},
|
|
42
37
|
"./benchmarks": {
|
|
43
38
|
"types": "./dist/benchmarks/index.d.ts",
|
|
44
39
|
"import": "./dist/benchmarks/index.js",
|
|
@@ -81,19 +76,18 @@
|
|
|
81
76
|
"dependencies": {
|
|
82
77
|
"@types/proper-lockfile": "4.1.4",
|
|
83
78
|
"proper-lockfile": "4.1.2",
|
|
84
|
-
"zod": "4.6.5"
|
|
85
|
-
"@tangle-network/tcloud": ">=0.8.0 <0.9.0"
|
|
79
|
+
"zod": "4.6.5"
|
|
86
80
|
},
|
|
87
81
|
"peerDependencies": {
|
|
88
|
-
"@tangle-network/agent-eval": ">=0.
|
|
89
|
-
"@tangle-network/agent-interface": "^
|
|
82
|
+
"@tangle-network/agent-eval": ">=0.209.1 <0.210.0",
|
|
83
|
+
"@tangle-network/agent-interface": "^3.0.0"
|
|
90
84
|
},
|
|
91
85
|
"devDependencies": {
|
|
92
86
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
93
87
|
"@biomejs/biome": "^2.5.14",
|
|
94
88
|
"@neo4j-labs/agent-memory": "0.5.0",
|
|
95
|
-
"@tangle-network/agent-eval": "0.
|
|
96
|
-
"@tangle-network/agent-interface": "
|
|
89
|
+
"@tangle-network/agent-eval": "0.209.1",
|
|
90
|
+
"@tangle-network/agent-interface": "3.0.0",
|
|
97
91
|
"@types/node": "^26.6.2",
|
|
98
92
|
"mem0ai": "3.3.0",
|
|
99
93
|
"oxc-parser": "0.151.0",
|
|
@@ -11,17 +11,7 @@ Do not copy signatures from this skill.
|
|
|
11
11
|
|
|
12
12
|
## Choose The Job
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|---|---|
|
|
16
|
-
| Start a source-backed Markdown knowledge base | File knowledge base and source registry |
|
|
17
|
-
| Search an existing package knowledge base | File search provider or a product search adapter |
|
|
18
|
-
| Improve knowledge without editing live files | Isolated knowledge candidates |
|
|
19
|
-
| Tune retrieval on labeled questions | Retrieval improvement loop |
|
|
20
|
-
| Diagnose and repair retrieval, sources, pages, and answers together | RAG knowledge improvement loop |
|
|
21
|
-
| Compare memory systems | Memory adapter and experiment APIs |
|
|
22
|
-
| Run retrieval, answer, knowledge, or memory cases | Knowledge benchmark APIs |
|
|
23
|
-
| Let agents research or edit candidates | Runtime knowledge integration |
|
|
24
|
-
|
|
14
|
+
Pick the API from the installed README's "Choose an API" table.
|
|
25
15
|
Use the narrowest capability that solves the product problem.
|
|
26
16
|
Do not add an agent loop when deterministic ingestion or indexing is enough.
|
|
27
17
|
|
|
@@ -42,9 +32,7 @@ The agent's current answer is not a gold answer.
|
|
|
42
32
|
|
|
43
33
|
## Keep The Boundary Clean
|
|
44
34
|
|
|
45
|
-
|
|
46
|
-
It does not own model choice, prompts, browsing, agent scheduling, product authorization, or product storage transactions.
|
|
47
|
-
|
|
35
|
+
The README's "Package boundaries" section states what the package owns.
|
|
48
36
|
Supply callbacks for research, retrieval, answer generation, and scoring.
|
|
49
37
|
Use `@tangle-network/agent-runtime` when those callbacks should run agents.
|
|
50
38
|
Use existing vector, graph, search, and memory systems through adapters instead of rebuilding their databases here.
|
|
@@ -79,7 +67,6 @@ Reject stale promotion rather than replacing newer knowledge.
|
|
|
79
67
|
|
|
80
68
|
Report service and measurement failures separately from product failures.
|
|
81
69
|
Keep candidate-generation cases separate from the final decision set.
|
|
82
|
-
Bundled benchmark samples prove adapter wiring only; use complete external datasets for benchmark claims.
|
|
83
70
|
|
|
84
71
|
## Completion
|
|
85
72
|
|