@tangle-network/agent-runtime 0.311.2 → 0.312.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.
Files changed (57) hide show
  1. package/dist/{activation-Dvl9gE_g.js → activation-CE5vCzYS.js} +2 -2
  2. package/dist/{activation-Dvl9gE_g.js.map → activation-CE5vCzYS.js.map} +1 -1
  3. package/dist/{activation-BxR-Im_k.d.ts → activation-K-k4BRp9.d.ts} +2 -3
  4. package/dist/agent.d.ts +1 -2
  5. package/dist/agent.js +2 -2
  6. package/dist/{coordination-driver-CIfgl4Yj.js → coordination-driver-Cp2z1zz6.js} +14 -14
  7. package/dist/coordination-driver-Cp2z1zz6.js.map +1 -0
  8. package/dist/{delegate-05Ddb4_L.js → delegate-DPkyIx3C.js} +2 -2
  9. package/dist/{delegate-05Ddb4_L.js.map → delegate-DPkyIx3C.js.map} +1 -1
  10. package/dist/durable.d.ts +1 -2
  11. package/dist/durable.js +2 -2
  12. package/dist/{graph-BNVGyp1P.js → graph-DP0X2bVC.js} +5 -5
  13. package/dist/graph-DP0X2bVC.js.map +1 -0
  14. package/dist/{improvement-cycle-Ig1_rWAw.js → improvement-cycle-D5r4auxT.js} +3 -3
  15. package/dist/{improvement-cycle-Ig1_rWAw.js.map → improvement-cycle-D5r4auxT.js.map} +1 -1
  16. package/dist/{index-B0c5PmmO.d.ts → index-BdIi1eIV.d.ts} +11256 -2501
  17. package/dist/index.d.ts +4 -6
  18. package/dist/index.js +7 -7
  19. package/dist/intelligence.d.ts +2 -3
  20. package/dist/intelligence.js +3 -3
  21. package/dist/kernel.d.ts +2 -4
  22. package/dist/kernel.js +8 -8
  23. package/dist/{loop-runner-bin-Beh7PECB.js → loop-runner-bin-Cn7244xv.js} +3 -3
  24. package/dist/{loop-runner-bin-Beh7PECB.js.map → loop-runner-bin-Cn7244xv.js.map} +1 -1
  25. package/dist/{loop-runner-bin-drXESgaI.d.ts → loop-runner-bin-CoKHGqxE.d.ts} +2 -3
  26. package/dist/loop-runner-bin.d.ts +1 -1
  27. package/dist/loop-runner-bin.js +1 -1
  28. package/dist/mcp/bin.js +3 -3
  29. package/dist/mcp/index.d.ts +2 -5
  30. package/dist/mcp/index.js +4 -4
  31. package/dist/{openai-tools-CJHfmFzg.d.ts → openai-tools-C2GoLNjj.d.ts} +2 -2
  32. package/dist/profiles.d.ts +1 -1
  33. package/dist/{provision-supervisor-CfKlAMTb.js → provision-supervisor-BahNK2L0.js} +3 -3
  34. package/dist/{provision-supervisor-CfKlAMTb.js.map → provision-supervisor-BahNK2L0.js.map} +1 -1
  35. package/dist/{runtime-DsnHqwNx.js → runtime-DRrpUP7n.js} +8 -8
  36. package/dist/{runtime-DsnHqwNx.js.map → runtime-DRrpUP7n.js.map} +1 -1
  37. package/dist/{search-executor-BNLvgp0X.js → search-executor-BuwMU5TF.js} +2 -2
  38. package/dist/{search-executor-BNLvgp0X.js.map → search-executor-BuwMU5TF.js.map} +1 -1
  39. package/dist/{server-Bx4d5imQ.js → server-DMqPF86Y.js} +3 -3
  40. package/dist/{server-Bx4d5imQ.js.map → server-DMqPF86Y.js.map} +1 -1
  41. package/dist/{supervise-D6MgxpMI.js → supervise-CGMzXi_j.js} +47 -20
  42. package/dist/supervise-CGMzXi_j.js.map +1 -0
  43. package/dist/{supervisor-WYRLsCp1.js → supervisor-DgcmBicU.js} +33 -23
  44. package/dist/supervisor-DgcmBicU.js.map +1 -0
  45. package/dist/testing.d.ts +1 -2
  46. package/dist/testing.js +12 -12
  47. package/dist/tui/index.d.ts +1 -1
  48. package/dist/tui/index.js +1 -1
  49. package/package.json +1 -1
  50. package/skills/profile-authoring/SKILL.md +1 -1
  51. package/dist/coordination-driver-CIfgl4Yj.js.map +0 -1
  52. package/dist/graph-BNVGyp1P.js.map +0 -1
  53. package/dist/stream-agent-turn-fd2XzrTv.d.ts +0 -2252
  54. package/dist/substrate-GW6LFx4A.d.ts +0 -284
  55. package/dist/supervise-D6MgxpMI.js.map +0 -1
  56. package/dist/supervisor-WYRLsCp1.js.map +0 -1
  57. package/dist/types-RlLmOHFR.d.ts +0 -6210
@@ -1,284 +0,0 @@
1
- import { ka as Validator, ra as Driver, ta as AgentRunSpec, wa as OutputAdapter } from "./types-RlLmOHFR.js";
2
- import { AgentProfile } from "@tangle-network/agent-interface";
3
- //#region src/profiles/coder.d.ts
4
- /**
5
- *
6
- * `CoderTask` + `coderTaskToPrompt` — the per-task DATA + pure formatter for code-modification tasks
7
- * (§1.5: the system authors profiles; there is no hardcoded coder profile constant). A domain
8
- * customizes the worker by authoring its own `AgentProfile` and handing it to a leaf executor
9
- * (`createWorktreeCliExecutor`) or a fanout (`worktreeFanout`); "is it delivered" is a
10
- * `DeliverableSpec` (`patchDelivered`), not a bundled validator. This formatter renders a `CoderTask`
11
- * into the per-task instruction that profile receives.
12
- *
13
- * @experimental
14
- */
15
- /** @experimental The per-task inputs `coderTaskToPrompt` renders + the worktree gate enforces. */
16
- interface CoderTask {
17
- /** What the agent must accomplish. Free-form prose. */
18
- goal: string;
19
- /** Absolute path inside the sandbox where the repo lives. */
20
- repoRoot: string;
21
- /** Default `main`. The branch the agent diffs against. */
22
- baseBranch?: string;
23
- /** Default `pnpm test --run`. */
24
- testCmd?: string;
25
- /** Default `pnpm typecheck`. */
26
- typecheckCmd?: string;
27
- /** Files the agent may inspect for context. Surfaced verbatim in the prompt. */
28
- contextFiles?: string[];
29
- /**
30
- * Paths the agent must not touch. The mechanical gate hard-fails on any match.
31
- * Use glob-free literal path prefixes for unambiguous enforcement.
32
- */
33
- forbiddenPaths?: string[];
34
- /** Default 400. Hard cap; the gate hard-fails when exceeded. */
35
- maxDiffLines?: number;
36
- }
37
- /** Render a `CoderTask` into the per-task instruction handed to the coder profile. @experimental */
38
- declare function coderTaskToPrompt(task: CoderTask): string;
39
- //#endregion
40
- //#region src/profiles/researcher.d.ts
41
- /** Source families a researcher profile may prefer for a task. One owner: the delegation
42
- * vocabulary (`DelegateResearchArgs.sources`) re-exports this type rather than restating it.
43
- * @experimental */
44
- type ResearchSource = 'web' | 'corpus' | 'twitter' | 'github' | 'docs';
45
- /** Task contract for a source-grounded research agent. @experimental */
46
- interface ResearchTask {
47
- /** The research question to answer. */
48
- question: string;
49
- /** Bound: e.g. "audience for cpg-founder ICP". */
50
- scope?: string;
51
- /** Multi-tenant scope (customer-id, workspace-id). Validator enforces. */
52
- knowledgeNamespace: string;
53
- sources?: ResearchSource[];
54
- recencyWindow?: {
55
- since?: Date;
56
- until?: Date;
57
- };
58
- maxItems?: number;
59
- /** Per-item minimum confidence in [0, 1]. Validator scores recall vs this. */
60
- minConfidence?: number;
61
- }
62
- /**
63
- * Knowledge item emitted by the researcher.
64
- *
65
- * Profile-local type. When agent-knowledge promotes `KnowledgeClaim` →
66
- * top-level `KnowledgeItem` substrate-wide, these fields collapse 1:1.
67
- *
68
- * @experimental
69
- */
70
- interface KnowledgeItem {
71
- id: string;
72
- /** Multi-tenant scope. MUST equal `task.knowledgeNamespace`. */
73
- namespace: string;
74
- /** The factual claim, in the researcher's words. */
75
- claim: string;
76
- /** Provenance — at least one entry required. */
77
- evidence: Array<{
78
- source: string;
79
- quote?: string;
80
- url?: string;
81
- capturedAt: number;
82
- }>;
83
- /** Researcher's self-reported confidence in [0, 1]. */
84
- confidence: number;
85
- /** Prior item ids this supersedes (chain). */
86
- supersedes?: string[];
87
- /** Set if the agent is retracting an earlier item. Unix ms. */
88
- retractedAt?: number;
89
- authoredBy: {
90
- kind: 'human' | 'agent';
91
- id: string;
92
- };
93
- }
94
- /**
95
- * A proposed write to the knowledge base. The profile does NOT apply
96
- * these — the caller decides.
97
- *
98
- * @experimental
99
- */
100
- type KnowledgeUpdate = {
101
- kind: 'insert';
102
- namespace: string;
103
- item: KnowledgeItem;
104
- } | {
105
- kind: 'supersede';
106
- namespace: string;
107
- previousId: string;
108
- item: KnowledgeItem;
109
- } | {
110
- kind: 'retract';
111
- namespace: string;
112
- itemId: string;
113
- reason: string;
114
- };
115
- /**
116
- * Researcher output. Required fields are typed; optional fields preserve
117
- * the agent's free-form intelligence (`notes`, `raw`). The validator
118
- * enforces the typed minimum.
119
- *
120
- * @experimental
121
- */
122
- interface ResearchOutput {
123
- items: KnowledgeItem[];
124
- citations: Array<{
125
- url: string;
126
- quote: string;
127
- confidence: number;
128
- }>;
129
- proposedWrites: KnowledgeUpdate[];
130
- gaps?: string[];
131
- notes?: string;
132
- /** Anything the agent emitted beyond the typed fields. */
133
- raw?: unknown;
134
- }
135
- /** Options for the source-grounded researcher profile preset. @experimental */
136
- interface ResearcherProfileOptions {
137
- /** Caller-owned exact harness/provider/model identity. */
138
- profile: AgentProfile;
139
- /** Custom system prompt replacement. Default = built-in researcher preset. */
140
- systemPrompt?: string;
141
- /** Stable name for `AgentRunSpec.name`. Default = `profile.name`. */
142
- name?: string;
143
- /**
144
- * Default 0.7. Minimum (citations with quote) / items ratio for `valid=true`.
145
- * Below this floor, citation_density scores < 1 and the item set is gated.
146
- */
147
- citationDensityMin?: number;
148
- }
149
- /** Build a source-grounded researcher profile with output parsing and validation. @experimental */
150
- declare function researcherProfile(options: ResearcherProfileOptions & {
151
- task?: ResearchTask;
152
- }): {
153
- profile: AgentProfile;
154
- taskToPrompt: (task: ResearchTask) => string;
155
- output: OutputAdapter<ResearchOutput>;
156
- validator: Validator<ResearchOutput>;
157
- agentRunSpec: AgentRunSpec<ResearchTask>;
158
- };
159
- /** @experimental */
160
- interface MultiHarnessResearcherFanoutOptions {
161
- /** Exact execution profiles, one per parallel researcher. */
162
- profiles: ReadonlyArray<AgentProfile>;
163
- /** Default citation density floor for the shared validator. */
164
- citationDensityMin?: number;
165
- /** Optional task — narrows the validator's namespace check. */
166
- task?: ResearchTask;
167
- }
168
- /**
169
- * Build a fanout topology over multiple harnesses. The kernel round-robins
170
- * `agentRuns` across the N parallel iterations and the `FanoutVote` driver
171
- * picks the highest-scoring valid output.
172
- *
173
- * @experimental
174
- */
175
- declare function multiHarnessResearcherFanout(options: MultiHarnessResearcherFanoutOptions): {
176
- agentRuns: AgentRunSpec<ResearchTask>[];
177
- output: OutputAdapter<ResearchOutput>;
178
- validator: Validator<ResearchOutput>;
179
- driver: Driver<ResearchTask, ResearchOutput, 'done'>;
180
- };
181
- /**
182
- * Build a validator that closes over a specific `ResearchTask`'s constraints.
183
- *
184
- * Checks in order:
185
- * 1. Items must be non-empty.
186
- * 2. Every item carries `evidence.length >= 1`.
187
- * 3. Every item + proposedWrite is scoped to `task.knowledgeNamespace`
188
- * (hard-fail on any namespace mismatch — defence in depth for the
189
- * multi-tenant invariant).
190
- * 4. Citation density (citations with quote / items) >= floor.
191
- *
192
- * Aggregate score:
193
- * 0.4 · citation_density
194
- * + 0.2 · source_diversity (distinct sources / max(items, 1))
195
- * + 0.2 · recency_match (mean fraction within `recencyWindow`)
196
- * + 0.2 · (1 − gaps/maxGaps), maxGaps = max(items, 1)
197
- *
198
- * @experimental
199
- */
200
- declare function createResearcherValidator(task: ResearchTask, config?: {
201
- citationDensityMin?: number;
202
- namespaceCheck?: boolean;
203
- }): Validator<ResearchOutput>;
204
- //#endregion
205
- //#region src/profiles/ui-auditor/substrate.d.ts
206
- /**
207
- *
208
- * UI audit finding shapes — the unit of evidence a contributor can act on.
209
- *
210
- * A finding describes a single, actionable UI problem: lens, severity,
211
- * route, observation, impact, suggested fix, and screenshot evidence.
212
- * Findings are produced by the auditor profile, persisted by the issue
213
- * writer as self-contained GitHub-issue Markdown, and surfaced over MCP.
214
- *
215
- * The shapes are deliberately constraining — the validator + writer
216
- * hard-fail on missing screenshot evidence, missing lens, missing title.
217
- *
218
- * @experimental
219
- */
220
- /**
221
- * Canonical audit lenses. Each lens scopes a finding to a single class of
222
- * problem so a single audit pass can iterate them without pile-on findings
223
- * under a generic label.
224
- */
225
- type UiLens = 'consistency' | 'hierarchy' | 'layout' | 'ux-flow' | 'duplication' | 'accessibility' | 'responsive' | 'states' | 'content' | 'interaction' | 'performance-perceived' | 'other';
226
- /** Frozen tuple of lenses for validation + iteration. */
227
- declare const UI_LENSES: readonly UiLens[];
228
- /**
229
- * Severity scale.
230
- * - `critical` — blocks a core task or is an accessibility blocker.
231
- * - `high` — confusing, broken-looking, or noticeable friction.
232
- * - `med` — visible polish issue, would be caught in code review.
233
- * - `low` — nitpick worth fixing eventually.
234
- */
235
- type UiFindingSeverity = 'low' | 'med' | 'high' | 'critical';
236
- /** Frozen severity tuple, ordered worst → least bad for sort/report. */
237
- declare const UI_FINDING_SEVERITIES: readonly UiFindingSeverity[];
238
- /** Pointer to a screenshot referenced by a finding (workspace-relative path). */
239
- interface UiFindingScreenshot {
240
- path: string;
241
- viewport?: string;
242
- label?: string;
243
- }
244
- /**
245
- * A single UI audit finding — the unit of work a contributor can act on.
246
- *
247
- * Every field except the documented optionals is required. The auditor
248
- * validator + writer hard-fail on missing screenshot evidence, missing
249
- * lens, missing title, etc.
250
- */
251
- interface UiFinding {
252
- /** Monotonic id assigned by the writer when persisting. Optional in-transit. */
253
- id?: number;
254
- title: string;
255
- lens: UiLens;
256
- severity: UiFindingSeverity;
257
- /** Logical route the finding was observed on (e.g. `home`, `checkout-step-2`). */
258
- route: string;
259
- /** Fully qualified URL the finding was observed at. */
260
- url?: string;
261
- /** Viewport string the offending capture was taken at (e.g. `1280x800`). */
262
- viewport?: string;
263
- /** CSS selector pinning the offending element, when one can be identified. */
264
- selector?: string;
265
- /** 1–3 sentences describing what the screenshot shows that is wrong. */
266
- observation: string;
267
- /** Who is affected and how. */
268
- impact: string;
269
- /** A specific change a contributor could apply without asking back. */
270
- suggestedFix: string;
271
- /** Optional explicit reproduction steps. Writer synthesizes from route/url/selector when omitted. */
272
- reproSteps?: string;
273
- /** Free-form tags. */
274
- tags?: readonly string[];
275
- /** Screenshot references — must be non-empty for actionable findings. */
276
- screenshots: readonly UiFindingScreenshot[];
277
- /** Cross-references to similar findings already on file, by id. */
278
- similarTo?: readonly number[];
279
- /** ISO-8601 creation timestamp set by the writer when persisted. */
280
- createdAt?: string;
281
- }
282
- //#endregion
283
- export { CoderTask as _, UiFindingSeverity as a, KnowledgeUpdate as c, ResearchSource as d, ResearchTask as f, researcherProfile as g, multiHarnessResearcherFanout as h, UiFindingScreenshot as i, MultiHarnessResearcherFanoutOptions as l, createResearcherValidator as m, UI_LENSES as n, UiLens as o, ResearcherProfileOptions as p, UiFinding as r, KnowledgeItem as s, UI_FINDING_SEVERITIES as t, ResearchOutput as u, coderTaskToPrompt as v };
284
- //# sourceMappingURL=substrate-GW6LFx4A.d.ts.map