@tangle-network/agent-runtime 0.89.0 → 0.90.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.
Files changed (69) hide show
  1. package/README.md +51 -18
  2. package/dist/agent.d.ts +53 -2
  3. package/dist/agent.js +168 -6
  4. package/dist/agent.js.map +1 -1
  5. package/dist/analyst-loop.d.ts +1 -1
  6. package/dist/chunk-5QOB7H74.js +387 -0
  7. package/dist/chunk-5QOB7H74.js.map +1 -0
  8. package/dist/{chunk-4WXGK6GV.js → chunk-7ON74BQO.js} +2 -2
  9. package/dist/{chunk-7LO5GMAO.js → chunk-CMYMTRGA.js} +14 -5
  10. package/dist/chunk-CMYMTRGA.js.map +1 -0
  11. package/dist/{chunk-UD4BHQMI.js → chunk-IVGYLCFH.js} +2 -2
  12. package/dist/{chunk-UD4BHQMI.js.map → chunk-IVGYLCFH.js.map} +1 -1
  13. package/dist/{chunk-VNOOH22O.js → chunk-OOL3675H.js} +85 -4
  14. package/dist/chunk-OOL3675H.js.map +1 -0
  15. package/dist/{chunk-5AVV7KAH.js → chunk-QK4DV5PR.js} +2 -2
  16. package/dist/chunk-R2VAJGR3.js +214 -0
  17. package/dist/chunk-R2VAJGR3.js.map +1 -0
  18. package/dist/{chunk-N7EJV7N3.js → chunk-RYBVU4M3.js} +3592 -3562
  19. package/dist/chunk-RYBVU4M3.js.map +1 -0
  20. package/dist/{chunk-BQPFZE2C.js → chunk-WRUSWK4F.js} +5 -5
  21. package/dist/{chunk-PIPPLSOF.js → chunk-ZV4LXYCJ.js} +451 -24
  22. package/dist/chunk-ZV4LXYCJ.js.map +1 -0
  23. package/dist/{worktree-harness-CX_McRLp.d.ts → completion-gate-DkAnUmpb.d.ts} +45 -45
  24. package/dist/{coordination-CuDLO8wj.d.ts → coordination-rRj5hjJK.d.ts} +415 -227
  25. package/dist/environment-provider.d.ts +3 -3
  26. package/dist/index.d.ts +255 -16
  27. package/dist/index.js +463 -72
  28. package/dist/index.js.map +1 -1
  29. package/dist/intelligence.d.ts +228 -84
  30. package/dist/intelligence.js +259 -166
  31. package/dist/intelligence.js.map +1 -1
  32. package/dist/knowledge.d.ts +120 -0
  33. package/dist/knowledge.js +28 -0
  34. package/dist/knowledge.js.map +1 -0
  35. package/dist/lifecycle.d.ts +2 -2
  36. package/dist/lifecycle.js +2 -2
  37. package/dist/{local-harness-sI0S_XNA.d.ts → local-harness-dcD5WTTr.d.ts} +3 -0
  38. package/dist/{loop-runner-bin-hQDUL8Ld.d.ts → loop-runner-bin-DTbZVGfM.d.ts} +2 -2
  39. package/dist/loop-runner-bin.d.ts +6 -6
  40. package/dist/loop-runner-bin.js +7 -7
  41. package/dist/loops.d.ts +34 -369
  42. package/dist/loops.js +31 -5
  43. package/dist/mcp/bin.js +5 -5
  44. package/dist/mcp/index.d.ts +10 -11
  45. package/dist/mcp/index.js +10 -10
  46. package/dist/{mcp-serve-verifier-FL7-ZEb_.d.ts → mcp-serve-verifier-XsX8rkB9.d.ts} +12 -1
  47. package/dist/{openai-tools-BnrOmGjN.d.ts → openai-tools-C4ZfUD4L.d.ts} +1 -1
  48. package/dist/profiles.d.ts +196 -5
  49. package/dist/profiles.js +8 -0
  50. package/dist/profiles.js.map +1 -1
  51. package/dist/{router-client-r8y_VFVM.d.ts → router-client-DJImUDlm.d.ts} +1 -1
  52. package/dist/structural-rollout-MwlpgQ-6.d.ts +446 -0
  53. package/dist/supervise-DPmYPk0j.d.ts +131 -0
  54. package/dist/{types-ESeMOj94.d.ts → types-SyuwunY_.d.ts} +1 -1
  55. package/dist/{types-Driepl87.d.ts → types-eMNgWgFi.d.ts} +2 -2
  56. package/dist/{worktree-fanout-D6xR2CIA.d.ts → worktree-fanout-BDFQIO-Y.d.ts} +234 -234
  57. package/package.json +12 -4
  58. package/skills/agent-runtime-adoption/SKILL.md +74 -24
  59. package/skills/build-with-agent-runtime/SKILL.md +23 -20
  60. package/skills/loop-writer/SKILL.md +6 -5
  61. package/skills/supervise/SKILL.md +2 -2
  62. package/dist/chunk-7LO5GMAO.js.map +0 -1
  63. package/dist/chunk-N7EJV7N3.js.map +0 -1
  64. package/dist/chunk-PIPPLSOF.js.map +0 -1
  65. package/dist/chunk-VNOOH22O.js.map +0 -1
  66. package/dist/otel-export-BKmNwiCb.d.ts +0 -180
  67. /package/dist/{chunk-4WXGK6GV.js.map → chunk-7ON74BQO.js.map} +0 -0
  68. /package/dist/{chunk-5AVV7KAH.js.map → chunk-QK4DV5PR.js.map} +0 -0
  69. /package/dist/{chunk-BQPFZE2C.js.map → chunk-WRUSWK4F.js.map} +0 -0
@@ -0,0 +1,120 @@
1
+ import { KnowledgeReadinessSpec, BuildEvalKnowledgeBundleOptions, KnowledgeBaseQualityOptions, KnowledgeImprovementResult, KnowledgeImprovementOptions } from '@tangle-network/agent-knowledge';
2
+ import { E as ExecutorConfig } from './coordination-rRj5hjJK.js';
3
+ import { a as SuperviseOptions, S as SupervisorProfile } from './supervise-DPmYPk0j.js';
4
+ import { B as Budget, b as SupervisedResult } from './types-eMNgWgFi.js';
5
+ import { D as DeliverableSpec } from './completion-gate-DkAnUmpb.js';
6
+ import '@tangle-network/agent-interface';
7
+ import './substrate-DO2GHNg2.js';
8
+ import './types-SyuwunY_.js';
9
+ import '@tangle-network/agent-eval';
10
+ import '@tangle-network/sandbox';
11
+ import './router-client-DJImUDlm.js';
12
+ import './local-harness-dcD5WTTr.js';
13
+ import 'node:child_process';
14
+ import './environment-provider.js';
15
+ import '@tangle-network/agent-interface/environment-provider';
16
+
17
+ /** Standing prompt for a supervisor that grows a shared knowledge base through spawned researchers. */
18
+ declare const RESEARCH_SUPERVISOR_SYSTEM_PROMPT: string;
19
+ interface KnowledgeReadinessCheckInput {
20
+ root: string;
21
+ goal: string;
22
+ readinessSpecs?: readonly unknown[];
23
+ readinessTaskId?: string;
24
+ readiness?: unknown;
25
+ }
26
+ type KnowledgeReadinessCheckResult = boolean | {
27
+ ready: boolean;
28
+ summary?: string;
29
+ metadata?: Record<string, unknown>;
30
+ };
31
+ type KnowledgeReadinessCheck = (input: KnowledgeReadinessCheckInput) => Promise<KnowledgeReadinessCheckResult> | KnowledgeReadinessCheckResult;
32
+ interface SupervisedKnowledgeUpdateInput {
33
+ goal?: string;
34
+ root?: string;
35
+ candidateRoot?: string;
36
+ findings?: readonly unknown[];
37
+ metadata?: Record<string, unknown>;
38
+ }
39
+ interface SupervisedKnowledgeUpdateResult {
40
+ applied: boolean;
41
+ summary: string;
42
+ supervised: SupervisedResult<unknown>;
43
+ metadata: Record<string, unknown>;
44
+ }
45
+ interface SupervisedKnowledgeUpdateOptions {
46
+ root: string;
47
+ goal: string;
48
+ readiness: KnowledgeReadinessCheck;
49
+ readinessSpecs?: readonly unknown[];
50
+ readinessTaskId?: string;
51
+ readinessOptions?: unknown;
52
+ findings?: readonly unknown[];
53
+ metadata?: Record<string, unknown>;
54
+ budget: Budget;
55
+ backend?: ExecutorConfig;
56
+ makeWorkerAgent?: SuperviseOptions['makeWorkerAgent'];
57
+ harness?: string;
58
+ supervisorModel?: string;
59
+ supervisorSystemPrompt?: string;
60
+ superviseOptions?: Partial<Omit<SuperviseOptions, 'budget' | 'backend' | 'deliverable' | 'makeWorkerAgent' | 'allowedModels'>>;
61
+ allowedModels?: readonly string[];
62
+ runSupervised?: (profile: SupervisorProfile, task: unknown, opts: SuperviseOptions) => Promise<SupervisedResult<unknown>>;
63
+ }
64
+ type SupervisedKnowledgeUpdater = (input: SupervisedKnowledgeUpdateInput) => Promise<SupervisedKnowledgeUpdateResult>;
65
+ /** Build the completion check a supervised KB update uses to stop only when the KB is ready. */
66
+ declare function knowledgeReadinessDeliverable(options: Pick<SupervisedKnowledgeUpdateOptions, 'root' | 'goal' | 'readiness' | 'readinessSpecs' | 'readinessTaskId' | 'readinessOptions'>): DeliverableSpec<unknown>;
67
+ /** Create an `improveKnowledgeBase` update callback backed by runtime supervision. */
68
+ declare function createSupervisedKnowledgeUpdater(options: SupervisedKnowledgeUpdateOptions): SupervisedKnowledgeUpdater;
69
+ /** Run a runtime supervisor that updates one candidate knowledge base and stops on readiness. */
70
+ declare function runSupervisedKnowledgeUpdate(options: SupervisedKnowledgeUpdateOptions): Promise<SupervisedKnowledgeUpdateResult>;
71
+ /** Format the supervisor task with the KB root, readiness requirements, current findings, and metadata. */
72
+ declare function formatSupervisedKnowledgeTask(options: Pick<SupervisedKnowledgeUpdateOptions, 'root' | 'goal' | 'readinessSpecs' | 'readinessTaskId' | 'findings' | 'metadata'>): string;
73
+
74
+ interface RunKnowledgeImprovementJobOptions extends Omit<KnowledgeImprovementOptions, 'updateKnowledge'> {
75
+ budget: Budget;
76
+ readinessCheck?: KnowledgeReadinessCheck;
77
+ backend?: ExecutorConfig;
78
+ makeWorkerAgent?: SuperviseOptions['makeWorkerAgent'];
79
+ harness?: string;
80
+ supervisorModel?: string;
81
+ supervisorSystemPrompt?: string;
82
+ superviseOptions?: Partial<Omit<SuperviseOptions, 'budget' | 'backend' | 'deliverable' | 'makeWorkerAgent' | 'allowedModels'>>;
83
+ allowedModels?: readonly string[];
84
+ runSupervised?: (profile: SupervisorProfile, task: unknown, opts: SuperviseOptions) => Promise<SupervisedResult<unknown>>;
85
+ onMeasurement?: (measurement: KnowledgeImprovementJobMeasurement) => Promise<void> | void;
86
+ }
87
+ interface KnowledgeImprovementJobMeasurement {
88
+ startedAt: string;
89
+ finishedAt: string;
90
+ durationMs: number;
91
+ updateCalls: number;
92
+ updateDurationMs: number;
93
+ supervisedSpent: {
94
+ iterations: number;
95
+ inputTokens: number;
96
+ outputTokens: number;
97
+ usd: number;
98
+ ms: number;
99
+ };
100
+ }
101
+ interface KnowledgeImprovementJobResult {
102
+ improvement: KnowledgeImprovementResult;
103
+ measurement: KnowledgeImprovementJobMeasurement;
104
+ promoted: boolean;
105
+ blocked: boolean;
106
+ }
107
+ interface AgentKnowledgeReadinessCheckOptions {
108
+ goal: string;
109
+ readinessSpecs?: readonly KnowledgeReadinessSpec[];
110
+ readinessTaskId?: string;
111
+ readiness?: Omit<BuildEvalKnowledgeBundleOptions, 'taskId' | 'index' | 'specs'>;
112
+ strict?: boolean;
113
+ kbQuality?: KnowledgeBaseQualityOptions;
114
+ }
115
+ /** Build the default readiness check backed by `@tangle-network/agent-knowledge` validation and scoring. */
116
+ declare function createAgentKnowledgeReadinessCheck(options: AgentKnowledgeReadinessCheckOptions): KnowledgeReadinessCheck;
117
+ /** Run the full KB improvement job: candidate workspace, runtime supervisor update, readiness check, and promotion. */
118
+ declare function runKnowledgeImprovementJob(options: RunKnowledgeImprovementJobOptions): Promise<KnowledgeImprovementJobResult>;
119
+
120
+ export { type AgentKnowledgeReadinessCheckOptions, type KnowledgeImprovementJobMeasurement, type KnowledgeImprovementJobResult, type KnowledgeReadinessCheck, type KnowledgeReadinessCheckInput, type KnowledgeReadinessCheckResult, RESEARCH_SUPERVISOR_SYSTEM_PROMPT, type RunKnowledgeImprovementJobOptions, type SupervisedKnowledgeUpdateInput, type SupervisedKnowledgeUpdateOptions, type SupervisedKnowledgeUpdateResult, type SupervisedKnowledgeUpdater, createAgentKnowledgeReadinessCheck, createSupervisedKnowledgeUpdater, formatSupervisedKnowledgeTask, knowledgeReadinessDeliverable, runKnowledgeImprovementJob, runSupervisedKnowledgeUpdate };
@@ -0,0 +1,28 @@
1
+ import {
2
+ RESEARCH_SUPERVISOR_SYSTEM_PROMPT,
3
+ createAgentKnowledgeReadinessCheck,
4
+ createSupervisedKnowledgeUpdater,
5
+ formatSupervisedKnowledgeTask,
6
+ knowledgeReadinessDeliverable,
7
+ runKnowledgeImprovementJob,
8
+ runSupervisedKnowledgeUpdate
9
+ } from "./chunk-R2VAJGR3.js";
10
+ import "./chunk-5QOB7H74.js";
11
+ import "./chunk-RYBVU4M3.js";
12
+ import "./chunk-DPEUKJRO.js";
13
+ import "./chunk-IVGYLCFH.js";
14
+ import "./chunk-BZF3KQ6G.js";
15
+ import "./chunk-FVJ7M3DA.js";
16
+ import "./chunk-CMYMTRGA.js";
17
+ import "./chunk-YEJR7IXO.js";
18
+ import "./chunk-DGUM43GV.js";
19
+ export {
20
+ RESEARCH_SUPERVISOR_SYSTEM_PROMPT,
21
+ createAgentKnowledgeReadinessCheck,
22
+ createSupervisedKnowledgeUpdater,
23
+ formatSupervisedKnowledgeTask,
24
+ knowledgeReadinessDeliverable,
25
+ runKnowledgeImprovementJob,
26
+ runSupervisedKnowledgeUpdate
27
+ };
28
+ //# sourceMappingURL=knowledge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -2,8 +2,8 @@ import { AgentProfile } from '@tangle-network/agent-interface';
2
2
  import { a as ProfileArtifact, A as ArtifactKind, b as ArtifactStatus, c as ArtifactInput, E as EvalRunner, d as EvalResult, G as GenerateContext, C as CandidateGenerator, e as PromotionVerdict, P as PromotionGate } from './generator-YkAQrOoD.js';
3
3
  export { f as ArtifactPayloads, H as HeldOutPromotionGateOptions, M as MarginalLift, g as MeasureMarginalLiftOptions, h as heldOutPromotionGate, m as measureMarginalLift, t as thresholdPromotionGate } from './generator-YkAQrOoD.js';
4
4
  import { LlmClientOptions, AnalystFinding } from '@tangle-network/agent-eval';
5
- import { M as McpServeSpec } from './mcp-serve-verifier-FL7-ZEb_.js';
6
- import { L as LocalHarness } from './local-harness-sI0S_XNA.js';
5
+ import { M as McpServeSpec } from './mcp-serve-verifier-XsX8rkB9.js';
6
+ import { L as LocalHarness } from './local-harness-dcD5WTTr.js';
7
7
  import '@tangle-network/agent-eval/campaign';
8
8
  import 'node:child_process';
9
9
 
package/dist/lifecycle.js CHANGED
@@ -4,8 +4,8 @@ import {
4
4
  mcpBuildPrompt,
5
5
  mcpServeVerifier,
6
6
  toolBuildPrompt
7
- } from "./chunk-VNOOH22O.js";
8
- import "./chunk-7LO5GMAO.js";
7
+ } from "./chunk-OOL3675H.js";
8
+ import "./chunk-CMYMTRGA.js";
9
9
  import {
10
10
  ValidationError
11
11
  } from "./chunk-YEJR7IXO.js";
@@ -39,6 +39,9 @@ interface RunLocalHarnessOptions {
39
39
  command?: string;
40
40
  args: ReadonlyArray<string>;
41
41
  };
42
+ /** Allow autonomous Claude edits without an interactive permission prompt.
43
+ * Use only when `cwd` is an isolated candidate worktree. */
44
+ dangerouslySkipPermissions?: boolean;
42
45
  /** Wall-clock kill deadline (ms). Default 5 min. Subprocess SIGTERMed on expiry. */
43
46
  timeoutMs?: number;
44
47
  /** Caller cancellation. SIGTERM is sent on abort. */
@@ -2,8 +2,8 @@ import { Scenario } from '@tangle-network/agent-eval/campaign';
2
2
  import { SelfImproveOptions, SelfImproveResult } from '@tangle-network/agent-eval/contract';
3
3
  import { R as RunAnalystLoopOpts, a as RunAnalystLoopResult } from './types-BC3bZpH0.js';
4
4
  import { F as FactCandidate, C as CreateKbGateOptions } from './kb-gate-CwHO0vz6.js';
5
- import { B as Budget } from './types-Driepl87.js';
6
- import { A as AuthoredHarness, W as WinnerStrategy, a as WorktreeFanoutOptions, b as WorktreePatchArtifact } from './worktree-fanout-D6xR2CIA.js';
5
+ import { B as Budget } from './types-eMNgWgFi.js';
6
+ import { A as AuthoredHarness, W as WinnerStrategy, a as WorktreeFanoutOptions, b as WorktreePatchArtifact } from './worktree-fanout-BDFQIO-Y.js';
7
7
 
8
8
  /**
9
9
  *
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
- export { L as LoopRunnerCliArgs, e as LoopRunnerCliResult, p as parseLoopRunnerArgv, k as runLoopRunnerCli } from './loop-runner-bin-hQDUL8Ld.js';
2
+ export { L as LoopRunnerCliArgs, e as LoopRunnerCliResult, p as parseLoopRunnerArgv, k as runLoopRunnerCli } from './loop-runner-bin-DTbZVGfM.js';
3
3
  import '@tangle-network/agent-eval/campaign';
4
4
  import '@tangle-network/agent-eval/contract';
5
5
  import './types-BC3bZpH0.js';
6
6
  import '@tangle-network/agent-eval';
7
7
  import './kb-gate-CwHO0vz6.js';
8
- import './types-Driepl87.js';
8
+ import './types-eMNgWgFi.js';
9
9
  import '@tangle-network/agent-interface';
10
10
  import '@tangle-network/sandbox';
11
- import './types-ESeMOj94.js';
12
- import './worktree-fanout-D6xR2CIA.js';
13
- import './worktree-harness-CX_McRLp.js';
14
- import './local-harness-sI0S_XNA.js';
11
+ import './types-SyuwunY_.js';
12
+ import './worktree-fanout-BDFQIO-Y.js';
13
+ import './completion-gate-DkAnUmpb.js';
14
+ import './local-harness-dcD5WTTr.js';
15
15
  import 'node:child_process';
@@ -2,17 +2,17 @@
2
2
  import {
3
3
  parseLoopRunnerArgv,
4
4
  runLoopRunnerCli
5
- } from "./chunk-BQPFZE2C.js";
5
+ } from "./chunk-WRUSWK4F.js";
6
6
  import "./chunk-SGKPNBXE.js";
7
- import "./chunk-PIPPLSOF.js";
8
- import "./chunk-N7EJV7N3.js";
9
- import "./chunk-UD4BHQMI.js";
10
- import "./chunk-BZF3KQ6G.js";
7
+ import "./chunk-ZV4LXYCJ.js";
11
8
  import "./chunk-ZQZX77MM.js";
9
+ import "./chunk-RYBVU4M3.js";
10
+ import "./chunk-DPEUKJRO.js";
11
+ import "./chunk-IVGYLCFH.js";
12
+ import "./chunk-BZF3KQ6G.js";
12
13
  import "./chunk-FVJ7M3DA.js";
13
- import "./chunk-7LO5GMAO.js";
14
+ import "./chunk-CMYMTRGA.js";
14
15
  import "./chunk-YEJR7IXO.js";
15
- import "./chunk-DPEUKJRO.js";
16
16
  import "./chunk-DGUM43GV.js";
17
17
  export {
18
18
  parseLoopRunnerArgv,