@tangle-network/agent-runtime 0.9.0 → 0.11.1

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.
@@ -0,0 +1,262 @@
1
+ import "./chunk-DGUM43GV.js";
2
+
3
+ // src/analyst-loop/run-analyst-loop.ts
4
+ import { diffFindings } from "@tangle-network/agent-eval";
5
+ async function runAnalystLoop(opts) {
6
+ const log = opts.log ?? defaultLog;
7
+ const strategy = opts.priorFindingsStrategy ?? "per-kind";
8
+ const emit = makeEmitter(opts.onEvent);
9
+ const startedAt = Date.now();
10
+ const baselineRunId = resolveBaselineRunId(opts);
11
+ const priorAll = baselineRunId ? opts.findingsStore?.loadRun(baselineRunId) ?? [] : [];
12
+ log("baseline resolved", { baselineRunId, prior_findings: priorAll.length });
13
+ await emit({
14
+ type: "baseline-resolved",
15
+ runId: opts.runId,
16
+ baselineRunId,
17
+ priorFindingCount: priorAll.length
18
+ });
19
+ const priorFindings = buildPriorFindingsInput(priorAll, strategy, opts.registry.list());
20
+ const analystResult = await runRegistry(opts, priorFindings, emit);
21
+ log("analyst run complete", {
22
+ findings: analystResult.findings.length,
23
+ cost_usd: analystResult.total_cost_usd,
24
+ per_analyst: analystResult.per_analyst.map((s) => ({
25
+ id: s.analyst_id,
26
+ status: s.status,
27
+ n: s.findings_count
28
+ }))
29
+ });
30
+ if (opts.findingsStore && analystResult.findings.length > 0) {
31
+ await opts.findingsStore.append(opts.runId, analystResult.findings);
32
+ await emit({
33
+ type: "findings-persisted",
34
+ runId: opts.runId,
35
+ count: analystResult.findings.length
36
+ });
37
+ }
38
+ let diff = null;
39
+ if (baselineRunId && analystResult.findings.length > 0) {
40
+ diff = diffFindings(
41
+ priorAll.map((f) => ({ ...f })),
42
+ analystResult.findings.map((f) => ({ ...f, run_id: opts.runId }))
43
+ );
44
+ log("diff vs baseline", {
45
+ appeared: diff.appeared.length,
46
+ disappeared: diff.disappeared.length,
47
+ persisted: diff.persisted.length,
48
+ changed: diff.changed.length
49
+ });
50
+ await emit({
51
+ type: "diff-computed",
52
+ runId: opts.runId,
53
+ baselineRunId,
54
+ appeared: diff.appeared.length,
55
+ disappeared: diff.disappeared.length,
56
+ persisted: diff.persisted.length,
57
+ changed: diff.changed.length
58
+ });
59
+ }
60
+ let knowledge = null;
61
+ if (opts.knowledgeAdapter) {
62
+ knowledge = await runKnowledgeAdapter(opts, analystResult.findings, log, emit);
63
+ }
64
+ let improvement = null;
65
+ if (opts.improvementAdapter) {
66
+ improvement = await runImprovementAdapter(opts, analystResult.findings, log, emit);
67
+ }
68
+ await emit({
69
+ type: "loop-completed",
70
+ runId: opts.runId,
71
+ durationMs: Date.now() - startedAt
72
+ });
73
+ return {
74
+ runId: opts.runId,
75
+ baselineRunId,
76
+ analystResult,
77
+ diff,
78
+ knowledge,
79
+ improvement
80
+ };
81
+ }
82
+ function makeEmitter(onEvent) {
83
+ if (!onEvent) return async () => {
84
+ };
85
+ return async (event) => {
86
+ await onEvent(event);
87
+ };
88
+ }
89
+ async function runRegistry(opts, priorFindings, emit) {
90
+ const reg = opts.registry;
91
+ if (typeof reg.runStream === "function" && opts.onEvent) {
92
+ let final = null;
93
+ for await (const ev of reg.runStream(opts.runId, opts.inputs, { priorFindings })) {
94
+ await emit({ type: "analyst", runId: opts.runId, event: ev });
95
+ if (ev.type === "run-completed") final = ev.result;
96
+ }
97
+ if (!final) {
98
+ throw new Error("runAnalystLoop: registry.runStream ended without run-completed event");
99
+ }
100
+ return final;
101
+ }
102
+ return opts.registry.run(opts.runId, opts.inputs, { priorFindings });
103
+ }
104
+ function resolveBaselineRunId(opts) {
105
+ if (opts.baselineRunId === null) return null;
106
+ if (typeof opts.baselineRunId === "string") return opts.baselineRunId;
107
+ if (!opts.findingsStore) return null;
108
+ const all = opts.findingsStore.loadAll();
109
+ let last = null;
110
+ for (const row of all) {
111
+ if (row.run_id === opts.runId) continue;
112
+ last = row.run_id;
113
+ }
114
+ return last;
115
+ }
116
+ function buildPriorFindingsInput(prior, strategy, registry) {
117
+ if (strategy === "none" || prior.length === 0) return void 0;
118
+ const stripped = prior.map(({ run_id: _run_id, ...rest }) => rest);
119
+ if (strategy === "wildcard") {
120
+ return { "*": stripped };
121
+ }
122
+ void registry;
123
+ return stripped;
124
+ }
125
+ async function runKnowledgeAdapter(opts, findings, log, emit) {
126
+ const adapter = opts.knowledgeAdapter;
127
+ const batch = await adapter.proposeFromFindings(findings);
128
+ log("knowledge.proposeFromFindings", {
129
+ proposals: batch.proposals.length,
130
+ skipped: batch.skipped,
131
+ errors: batch.errors.length
132
+ });
133
+ await emit({
134
+ type: "knowledge-proposed",
135
+ runId: opts.runId,
136
+ proposalCount: batch.proposals.length,
137
+ skipped: batch.skipped,
138
+ errors: batch.errors.length
139
+ });
140
+ const auto = opts.autoApply?.knowledge ?? false;
141
+ const threshold = opts.autoApply?.knowledgeConfidenceThreshold ?? 0.85;
142
+ if (!auto || !adapter.apply) {
143
+ await emit({
144
+ type: "knowledge-applied",
145
+ runId: opts.runId,
146
+ writtenCount: 0,
147
+ withheldForReview: batch.proposals.length
148
+ });
149
+ return {
150
+ proposals: batch.proposals,
151
+ applied: [],
152
+ skipped: batch.skipped,
153
+ errors: batch.errors,
154
+ withheld_for_review: batch.proposals.length
155
+ };
156
+ }
157
+ const findingsById = new Map(findings.map((f) => [f.finding_id, f]));
158
+ const safe = [];
159
+ let withheld = 0;
160
+ for (const p of batch.proposals) {
161
+ const src = p.sourceFindingId ? findingsById.get(p.sourceFindingId) : void 0;
162
+ if (!src) {
163
+ withheld += 1;
164
+ continue;
165
+ }
166
+ if (src.confidence < threshold) {
167
+ withheld += 1;
168
+ continue;
169
+ }
170
+ safe.push(p);
171
+ }
172
+ const result = await adapter.apply(safe);
173
+ log("knowledge.apply", {
174
+ applied: result.written.length,
175
+ withheld_for_review: withheld,
176
+ warnings: result.warnings.length
177
+ });
178
+ await emit({
179
+ type: "knowledge-applied",
180
+ runId: opts.runId,
181
+ writtenCount: result.written.length,
182
+ withheldForReview: withheld
183
+ });
184
+ return {
185
+ proposals: batch.proposals,
186
+ applied: result.written,
187
+ skipped: batch.skipped,
188
+ errors: batch.errors,
189
+ withheld_for_review: withheld
190
+ };
191
+ }
192
+ async function runImprovementAdapter(opts, findings, log, emit) {
193
+ const adapter = opts.improvementAdapter;
194
+ const batch = await adapter.proposeFromFindings(findings);
195
+ log("improvement.proposeFromFindings", {
196
+ edits: batch.edits.length,
197
+ skipped: batch.skipped,
198
+ errors: batch.errors.length
199
+ });
200
+ await emit({
201
+ type: "improvement-proposed",
202
+ runId: opts.runId,
203
+ editCount: batch.edits.length,
204
+ skipped: batch.skipped,
205
+ errors: batch.errors.length
206
+ });
207
+ const auto = opts.autoApply?.improvement ?? false;
208
+ const threshold = opts.autoApply?.improvementConfidenceThreshold ?? 0.9;
209
+ if (!auto || !adapter.apply) {
210
+ await emit({
211
+ type: "improvement-applied",
212
+ runId: opts.runId,
213
+ appliedCount: 0,
214
+ withheldForReview: batch.edits.length
215
+ });
216
+ return {
217
+ edits: batch.edits,
218
+ applied: [],
219
+ skipped: batch.skipped,
220
+ errors: batch.errors,
221
+ withheld_for_review: batch.edits.length
222
+ };
223
+ }
224
+ const findingsById = new Map(findings.map((f) => [f.finding_id, f]));
225
+ const safe = [];
226
+ let withheld = 0;
227
+ for (const e of batch.edits) {
228
+ const src = e.sourceFindingId ? findingsById.get(e.sourceFindingId) : void 0;
229
+ if (!src || src.confidence < threshold) {
230
+ withheld += 1;
231
+ continue;
232
+ }
233
+ safe.push(e);
234
+ }
235
+ const result = await adapter.apply(safe);
236
+ log("improvement.apply", {
237
+ applied: result.applied.length,
238
+ withheld_for_review: withheld,
239
+ warnings: result.warnings.length
240
+ });
241
+ await emit({
242
+ type: "improvement-applied",
243
+ runId: opts.runId,
244
+ appliedCount: result.applied.length,
245
+ withheldForReview: withheld
246
+ });
247
+ return {
248
+ edits: batch.edits,
249
+ applied: result.applied,
250
+ skipped: batch.skipped,
251
+ errors: batch.errors,
252
+ withheld_for_review: withheld
253
+ };
254
+ }
255
+ function defaultLog(msg, fields) {
256
+ if (fields) console.log(`[analyst-loop] ${msg}`, fields);
257
+ else console.log(`[analyst-loop] ${msg}`);
258
+ }
259
+ export {
260
+ runAnalystLoop
261
+ };
262
+ //# sourceMappingURL=analyst-loop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/analyst-loop/run-analyst-loop.ts"],"sourcesContent":["/**\n * `runAnalystLoop` — the one call agent apps reach for to close the\n * recursive-self-improvement loop.\n *\n * 1. Load baseline findings (last run, or the slice the caller specifies)\n * 2. Run the analyst registry with priorFindings injected\n * 3. Persist the new run's findings to the ledger\n * 4. Diff the new run against the baseline\n * 5. Hand the findings to the knowledge adapter → proposals (and\n * optionally apply them) → wiki edits\n * 6. Hand the findings to the improvement adapter → prompt / tool /\n * scaffolding edits (review-only by default)\n * 7. Return a single report the consumer renders / persists / acts on.\n *\n * Adapters are optional: the loop works as a \"run + diff + report\"\n * primitive when no adapters are wired; it closes end-to-end when\n * both adapters are wired.\n */\n\nimport type { AnalystFinding, AnalystRunResult, FindingsDiff } from '@tangle-network/agent-eval'\nimport { diffFindings } from '@tangle-network/agent-eval'\n\nimport type {\n AnalystLoopEvent,\n AnalystRegistryStreamingLike,\n ImprovementReport,\n KnowledgeReport,\n RunAnalystLoopOpts,\n RunAnalystLoopResult,\n} from './types'\n\nexport async function runAnalystLoop<TProposal = unknown, TEdit = unknown>(\n opts: RunAnalystLoopOpts,\n): Promise<RunAnalystLoopResult<TProposal, TEdit>> {\n const log = opts.log ?? defaultLog\n const strategy = opts.priorFindingsStrategy ?? 'per-kind'\n const emit = makeEmitter(opts.onEvent)\n const startedAt = Date.now()\n\n // 1. Resolve baseline + load prior findings.\n const baselineRunId = resolveBaselineRunId(opts)\n const priorAll: ReadonlyArray<AnalystFinding & { run_id: string }> = baselineRunId\n ? (opts.findingsStore?.loadRun(baselineRunId) ?? [])\n : []\n log('baseline resolved', { baselineRunId, prior_findings: priorAll.length })\n await emit({\n type: 'baseline-resolved',\n runId: opts.runId,\n baselineRunId,\n priorFindingCount: priorAll.length,\n })\n\n // 2. Run the registry. Strategy controls how analysts see priors.\n // When the registry exposes runStream, forward each event verbatim\n // so subscribers see per-analyst progress in real time.\n const priorFindings = buildPriorFindingsInput(priorAll, strategy, opts.registry.list())\n const analystResult = await runRegistry(opts, priorFindings, emit)\n log('analyst run complete', {\n findings: analystResult.findings.length,\n cost_usd: analystResult.total_cost_usd,\n per_analyst: analystResult.per_analyst.map((s) => ({\n id: s.analyst_id,\n status: s.status,\n n: s.findings_count,\n })),\n })\n\n // 3. Persist the new run before any side-effecting adapter runs so\n // the ledger is the source of truth even if an adapter throws.\n if (opts.findingsStore && analystResult.findings.length > 0) {\n await opts.findingsStore.append(opts.runId, analystResult.findings)\n await emit({\n type: 'findings-persisted',\n runId: opts.runId,\n count: analystResult.findings.length,\n })\n }\n\n // 4. Diff vs baseline.\n let diff: FindingsDiff | null = null\n if (baselineRunId && analystResult.findings.length > 0) {\n diff = diffFindings(\n priorAll.map((f) => ({ ...f })),\n analystResult.findings.map((f) => ({ ...f, run_id: opts.runId })),\n )\n log('diff vs baseline', {\n appeared: diff.appeared.length,\n disappeared: diff.disappeared.length,\n persisted: diff.persisted.length,\n changed: diff.changed.length,\n })\n await emit({\n type: 'diff-computed',\n runId: opts.runId,\n baselineRunId,\n appeared: diff.appeared.length,\n disappeared: diff.disappeared.length,\n persisted: diff.persisted.length,\n changed: diff.changed.length,\n })\n }\n\n // 5. Knowledge adapter — proposals + optional auto-apply.\n let knowledge: KnowledgeReport<TProposal> | null = null\n if (opts.knowledgeAdapter) {\n knowledge = await runKnowledgeAdapter(opts, analystResult.findings, log, emit)\n }\n\n // 6. Improvement adapter — prompt / tool / scaffolding edits.\n let improvement: ImprovementReport<TEdit> | null = null\n if (opts.improvementAdapter) {\n improvement = await runImprovementAdapter(opts, analystResult.findings, log, emit)\n }\n\n await emit({\n type: 'loop-completed',\n runId: opts.runId,\n durationMs: Date.now() - startedAt,\n })\n\n return {\n runId: opts.runId,\n baselineRunId,\n analystResult,\n diff,\n knowledge,\n improvement,\n }\n}\n\ntype Emitter = (event: AnalystLoopEvent) => Promise<void>\n\nfunction makeEmitter(onEvent: RunAnalystLoopOpts['onEvent']): Emitter {\n if (!onEvent) return async () => {}\n return async (event) => {\n await onEvent(event)\n }\n}\n\nasync function runRegistry(\n opts: RunAnalystLoopOpts,\n priorFindings: ReturnType<typeof buildPriorFindingsInput>,\n emit: Emitter,\n): Promise<AnalystRunResult> {\n const reg = opts.registry as AnalystRegistryStreamingLike\n if (typeof reg.runStream === 'function' && opts.onEvent) {\n let final: AnalystRunResult | null = null\n for await (const ev of reg.runStream(opts.runId, opts.inputs, { priorFindings })) {\n await emit({ type: 'analyst', runId: opts.runId, event: ev })\n if (ev.type === 'run-completed') final = ev.result\n }\n if (!final) {\n throw new Error('runAnalystLoop: registry.runStream ended without run-completed event')\n }\n return final\n }\n return opts.registry.run(opts.runId, opts.inputs, { priorFindings })\n}\n\nfunction resolveBaselineRunId(opts: RunAnalystLoopOpts): string | null {\n if (opts.baselineRunId === null) return null\n if (typeof opts.baselineRunId === 'string') return opts.baselineRunId\n if (!opts.findingsStore) return null\n const all = opts.findingsStore.loadAll()\n let last: string | null = null\n for (const row of all) {\n if (row.run_id === opts.runId) continue\n last = row.run_id\n }\n return last\n}\n\nfunction buildPriorFindingsInput(\n prior: ReadonlyArray<AnalystFinding & { run_id: string }>,\n strategy: 'per-kind' | 'wildcard' | 'none',\n registry: ReadonlyArray<{ id: string }>,\n): ReadonlyArray<AnalystFinding> | Record<string, ReadonlyArray<AnalystFinding>> | undefined {\n if (strategy === 'none' || prior.length === 0) return undefined\n const stripped = prior.map(({ run_id: _run_id, ...rest }) => rest as AnalystFinding)\n if (strategy === 'wildcard') {\n return { '*': stripped }\n }\n void registry\n return stripped\n}\n\nasync function runKnowledgeAdapter<TProposal>(\n opts: RunAnalystLoopOpts,\n findings: ReadonlyArray<AnalystFinding>,\n log: NonNullable<RunAnalystLoopOpts['log']>,\n emit: Emitter,\n): Promise<KnowledgeReport<TProposal>> {\n const adapter = opts.knowledgeAdapter!\n const batch = await adapter.proposeFromFindings(findings)\n log('knowledge.proposeFromFindings', {\n proposals: batch.proposals.length,\n skipped: batch.skipped,\n errors: batch.errors.length,\n })\n await emit({\n type: 'knowledge-proposed',\n runId: opts.runId,\n proposalCount: batch.proposals.length,\n skipped: batch.skipped,\n errors: batch.errors.length,\n })\n\n const auto = opts.autoApply?.knowledge ?? false\n const threshold = opts.autoApply?.knowledgeConfidenceThreshold ?? 0.85\n\n if (!auto || !adapter.apply) {\n await emit({\n type: 'knowledge-applied',\n runId: opts.runId,\n writtenCount: 0,\n withheldForReview: batch.proposals.length,\n })\n return {\n proposals: batch.proposals as TProposal[],\n applied: [],\n skipped: batch.skipped,\n errors: batch.errors,\n withheld_for_review: batch.proposals.length,\n }\n }\n\n const findingsById = new Map(findings.map((f) => [f.finding_id, f]))\n const safe: TProposal[] = []\n let withheld = 0\n for (const p of batch.proposals as Array<TProposal & { sourceFindingId?: string }>) {\n const src = p.sourceFindingId ? findingsById.get(p.sourceFindingId) : undefined\n if (!src) {\n withheld += 1\n continue\n }\n if (src.confidence < threshold) {\n withheld += 1\n continue\n }\n safe.push(p)\n }\n const result = await adapter.apply(safe)\n log('knowledge.apply', {\n applied: result.written.length,\n withheld_for_review: withheld,\n warnings: result.warnings.length,\n })\n await emit({\n type: 'knowledge-applied',\n runId: opts.runId,\n writtenCount: result.written.length,\n withheldForReview: withheld,\n })\n return {\n proposals: batch.proposals as TProposal[],\n applied: result.written,\n skipped: batch.skipped,\n errors: batch.errors,\n withheld_for_review: withheld,\n }\n}\n\nasync function runImprovementAdapter<TEdit>(\n opts: RunAnalystLoopOpts,\n findings: ReadonlyArray<AnalystFinding>,\n log: NonNullable<RunAnalystLoopOpts['log']>,\n emit: Emitter,\n): Promise<ImprovementReport<TEdit>> {\n const adapter = opts.improvementAdapter!\n const batch = await adapter.proposeFromFindings(findings)\n log('improvement.proposeFromFindings', {\n edits: batch.edits.length,\n skipped: batch.skipped,\n errors: batch.errors.length,\n })\n await emit({\n type: 'improvement-proposed',\n runId: opts.runId,\n editCount: batch.edits.length,\n skipped: batch.skipped,\n errors: batch.errors.length,\n })\n\n const auto = opts.autoApply?.improvement ?? false\n const threshold = opts.autoApply?.improvementConfidenceThreshold ?? 0.9\n\n if (!auto || !adapter.apply) {\n await emit({\n type: 'improvement-applied',\n runId: opts.runId,\n appliedCount: 0,\n withheldForReview: batch.edits.length,\n })\n return {\n edits: batch.edits as TEdit[],\n applied: [],\n skipped: batch.skipped,\n errors: batch.errors,\n withheld_for_review: batch.edits.length,\n }\n }\n\n const findingsById = new Map(findings.map((f) => [f.finding_id, f]))\n const safe: TEdit[] = []\n let withheld = 0\n for (const e of batch.edits as Array<TEdit & { sourceFindingId?: string }>) {\n const src = e.sourceFindingId ? findingsById.get(e.sourceFindingId) : undefined\n if (!src || src.confidence < threshold) {\n withheld += 1\n continue\n }\n safe.push(e)\n }\n const result = await adapter.apply(safe)\n log('improvement.apply', {\n applied: result.applied.length,\n withheld_for_review: withheld,\n warnings: result.warnings.length,\n })\n await emit({\n type: 'improvement-applied',\n runId: opts.runId,\n appliedCount: result.applied.length,\n withheldForReview: withheld,\n })\n return {\n edits: batch.edits as TEdit[],\n applied: result.applied,\n skipped: batch.skipped,\n errors: batch.errors,\n withheld_for_review: withheld,\n }\n}\n\nfunction defaultLog(msg: string, fields?: Record<string, unknown>): void {\n if (fields) console.log(`[analyst-loop] ${msg}`, fields)\n else console.log(`[analyst-loop] ${msg}`)\n}\n"],"mappings":";;;AAoBA,SAAS,oBAAoB;AAW7B,eAAsB,eACpB,MACiD;AACjD,QAAM,MAAM,KAAK,OAAO;AACxB,QAAM,WAAW,KAAK,yBAAyB;AAC/C,QAAM,OAAO,YAAY,KAAK,OAAO;AACrC,QAAM,YAAY,KAAK,IAAI;AAG3B,QAAM,gBAAgB,qBAAqB,IAAI;AAC/C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AAAA,IACb,SAAS,OAAO;AAAA,IAChB,SAAS,MAAM;AAAA,IACf,QAAQ,MAAM;AAAA,IACd,qBAAqB;AAAA,EACvB;AACF;AAEA,SAAS,WAAW,KAAa,QAAwC;AACvE,MAAI,OAAQ,SAAQ,IAAI,kBAAkB,GAAG,IAAI,MAAM;AAAA,MAClD,SAAQ,IAAI,kBAAkB,GAAG,EAAE;AAC1C;","names":[]}
@@ -0,0 +1,11 @@
1
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
+ }) : x)(function(x) {
4
+ if (typeof require !== "undefined") return require.apply(this, arguments);
5
+ throw Error('Dynamic require of "' + x + '" is not supported');
6
+ });
7
+
8
+ export {
9
+ __require
10
+ };
11
+ //# sourceMappingURL=chunk-DGUM43GV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}