@tangle-network/agent-runtime 0.349.0 → 0.352.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 (139) hide show
  1. package/dist/{activation-wBipBkCf.d.ts → activation-BidzGkUQ.d.ts} +2 -24
  2. package/dist/{activation-tNGW73Y9.js → activation-C6zNC2kx.js} +12 -14
  3. package/dist/{activation-tNGW73Y9.js.map → activation-C6zNC2kx.js.map} +1 -1
  4. package/dist/agent.d.ts +8 -12
  5. package/dist/agent.js +9 -12
  6. package/dist/agent.js.map +1 -1
  7. package/dist/{analyst-loop-DZw5QWT9.js → analyst-loop-BZvXCDKy.js} +2 -3
  8. package/dist/{analyst-loop-DZw5QWT9.js.map → analyst-loop-BZvXCDKy.js.map} +1 -1
  9. package/dist/analyst-loop.d.ts +3 -5
  10. package/dist/analyst-loop.js +1 -2
  11. package/dist/{bundle-1xaJEgjq.js → bundle-DeDkJbsr.js} +3 -4
  12. package/dist/{bundle-1xaJEgjq.js.map → bundle-DeDkJbsr.js.map} +1 -1
  13. package/dist/candidate-execution/index.d.ts +13 -33
  14. package/dist/candidate-execution/index.js +16 -18
  15. package/dist/candidate-execution/index.js.map +1 -1
  16. package/dist/chat-turn.d.ts +2 -0
  17. package/dist/chat-turn.js +1 -0
  18. package/dist/{coordination-manager-B2Z_MmL9.js → coordination-manager-B7QadgrI.js} +101 -132
  19. package/dist/{coordination-manager-B2Z_MmL9.js.map → coordination-manager-B7QadgrI.js.map} +1 -1
  20. package/dist/{delegate-Dr-63jFl.js → delegate-CoscoyEo.js} +19 -21
  21. package/dist/delegate-CoscoyEo.js.map +1 -0
  22. package/dist/durable.d.ts +16 -149
  23. package/dist/durable.js +57 -980
  24. package/dist/durable.js.map +1 -1
  25. package/dist/{errors-DodWX-cb.js → errors-AzSuGI23.js} +5 -3
  26. package/dist/errors-AzSuGI23.js.map +1 -0
  27. package/dist/execution-handle-Bd2_nUB6.js +167 -0
  28. package/dist/execution-handle-Bd2_nUB6.js.map +1 -0
  29. package/dist/execution-handle-CujvqgCn.d.ts +130 -0
  30. package/dist/{graph-DPejYB3C.js → graph-mojMML8e.js} +192 -14
  31. package/dist/graph-mojMML8e.js.map +1 -0
  32. package/dist/{improve-DwSahPi1.js → improve-Dm5ZE8mr.js} +36 -53
  33. package/dist/{improve-DwSahPi1.js.map → improve-Dm5ZE8mr.js.map} +1 -1
  34. package/dist/{improvement-adapter-sIthWkcN.d.ts → improvement-adapter-D5GRU1eY.d.ts} +2 -6
  35. package/dist/index.d.ts +41 -89
  36. package/dist/index.js +45 -61
  37. package/dist/index.js.map +1 -1
  38. package/dist/intelligence.d.ts +39 -59
  39. package/dist/intelligence.js +24 -33
  40. package/dist/intelligence.js.map +1 -1
  41. package/dist/journal-store-BJPMUydp.js +3925 -0
  42. package/dist/journal-store-BJPMUydp.js.map +1 -0
  43. package/dist/kernel.d.ts +5 -5
  44. package/dist/kernel.js +12 -11
  45. package/dist/{loop-runner-CP6MfO1b.js → loop-runner-5cL_vZi0.js} +5 -6
  46. package/dist/{loop-runner-CP6MfO1b.js.map → loop-runner-5cL_vZi0.js.map} +1 -1
  47. package/dist/{loop-runner-C6pGq-2l.d.ts → loop-runner-DyLD-aNb.d.ts} +3 -5
  48. package/dist/loop-runner-bin.d.ts +5 -8
  49. package/dist/loop-runner-bin.js +2 -3
  50. package/dist/mcp/bin.js +6 -8
  51. package/dist/mcp/bin.js.map +1 -1
  52. package/dist/mcp/index.d.ts +8 -18
  53. package/dist/mcp/index.js +17 -25
  54. package/dist/mcp/index.js.map +1 -1
  55. package/dist/mcp/memory-bin.js +4 -6
  56. package/dist/mcp/memory-bin.js.map +1 -1
  57. package/dist/{model-policy-CyCUwHed.js → model-policy-C-RGAUW4.js} +11 -13
  58. package/dist/{model-policy-CyCUwHed.js.map → model-policy-C-RGAUW4.js.map} +1 -1
  59. package/dist/placement.d.ts +12 -14
  60. package/dist/placement.js +1 -2
  61. package/dist/platform.d.ts +7 -13
  62. package/dist/platform.js +3 -6
  63. package/dist/platform.js.map +1 -1
  64. package/dist/{prepare-B9wWffjO.js → prepare-XWwsOh8O.js} +50 -69
  65. package/dist/{prepare-B9wWffjO.js.map → prepare-XWwsOh8O.js.map} +1 -1
  66. package/dist/{profile-JLJd2wFG.js → profile-C01SQZKa.js} +58 -92
  67. package/dist/profile-C01SQZKa.js.map +1 -0
  68. package/dist/{profile-materialization-bPm0gGLO.d.ts → profile-materialization-BRY22Oh8.d.ts} +1 -3
  69. package/dist/profiles.d.ts +25 -12
  70. package/dist/profiles.js +52 -11
  71. package/dist/profiles.js.map +1 -1
  72. package/dist/{protected-model-port-DVVh-hEk.d.ts → protected-model-port-IKqhTypD.d.ts} +2 -14
  73. package/dist/{protected-redaction-DFCeo4vg.js → protected-redaction-DilFZch5.js} +2 -3
  74. package/dist/{protected-redaction-DFCeo4vg.js.map → protected-redaction-DilFZch5.js.map} +1 -1
  75. package/dist/{provision-supervisor-C4v2vqDo.js → provision-supervisor-D9pO-iPl.js} +11 -15
  76. package/dist/{provision-supervisor-C4v2vqDo.js.map → provision-supervisor-D9pO-iPl.js.map} +1 -1
  77. package/dist/{run-cancellation-CzFhQGMa.js → run-cancellation-CoJRKvih.js} +6 -7
  78. package/dist/{run-cancellation-CzFhQGMa.js.map → run-cancellation-CoJRKvih.js.map} +1 -1
  79. package/dist/{runtime-CsvGCQpl.js → runtime-BJPXHWbc.js} +652 -215
  80. package/dist/runtime-BJPXHWbc.js.map +1 -0
  81. package/dist/{runtime-hooks-tXpAarhW.js → runtime-hooks-CsW2pfFk.js} +2 -3
  82. package/dist/{runtime-hooks-tXpAarhW.js.map → runtime-hooks-CsW2pfFk.js.map} +1 -1
  83. package/dist/{runtime-hooks-nsqxSUFL.d.ts → runtime-hooks-ZQqPw-0g.d.ts} +1 -3
  84. package/dist/{sandbox-profile-compat-DtuJWFrM.js → sandbox-profile-compat-CXjozdWL.js} +52 -653
  85. package/dist/sandbox-profile-compat-CXjozdWL.js.map +1 -0
  86. package/dist/{search-executor-CCb82Umc.js → search-executor-CQEHMXoT.js} +12 -15
  87. package/dist/{search-executor-CCb82Umc.js.map → search-executor-CQEHMXoT.js.map} +1 -1
  88. package/dist/{server-CKPwZU-I.js → server-U9NGgudQ.js} +19 -30
  89. package/dist/{server-CKPwZU-I.js.map → server-U9NGgudQ.js.map} +1 -1
  90. package/dist/{structural-rollout-DylC_fwU.js → structural-rollout-wMSxE7bn.js} +71 -70
  91. package/dist/structural-rollout-wMSxE7bn.js.map +1 -0
  92. package/dist/{substrate-CGDFTSRh.js → substrate-Db2pp6y3.js} +2 -3
  93. package/dist/{substrate-CGDFTSRh.js.map → substrate-Db2pp6y3.js.map} +1 -1
  94. package/dist/{supervise-BGfm2GlY.js → supervise-CNNhX0ab.js} +460 -195
  95. package/dist/supervise-CNNhX0ab.js.map +1 -0
  96. package/dist/supervision-discovery-CewADdEs.js +772 -0
  97. package/dist/supervision-discovery-CewADdEs.js.map +1 -0
  98. package/dist/{supervisor-wS9Ehz_x.js → supervisor-rK5Y8en6.js} +521 -4320
  99. package/dist/supervisor-rK5Y8en6.js.map +1 -0
  100. package/dist/{task-queue-0fKkoweu.d.ts → task-queue-kefGy79U.d.ts} +1 -3
  101. package/dist/task-queue.d.ts +1 -1
  102. package/dist/task-queue.js +1 -2
  103. package/dist/testing.d.ts +7 -15
  104. package/dist/testing.js +241 -244
  105. package/dist/testing.js.map +1 -1
  106. package/dist/tool-loop.d.ts +16 -19
  107. package/dist/tool-loop.js +2 -3
  108. package/dist/{tool-server-XV4aJwoQ.js → tool-server-CZWd_Opp.js} +3 -4
  109. package/dist/{tool-server-XV4aJwoQ.js.map → tool-server-CZWd_Opp.js.map} +1 -1
  110. package/dist/{top-snapshot-CflmaDgk.js → top-snapshot-DcV7VG4m.js} +179 -163
  111. package/dist/top-snapshot-DcV7VG4m.js.map +1 -0
  112. package/dist/tui/bin.js +50 -81
  113. package/dist/tui/bin.js.map +1 -1
  114. package/dist/tui/index.d.ts +27 -58
  115. package/dist/tui/index.js +2 -2
  116. package/dist/{types-C8BGOCBn.d.ts → types-0uzVKtFW.d.ts} +388 -484
  117. package/dist/{types-Cwrea-bU.d.ts → types-qsqfyQoY.d.ts} +1 -3
  118. package/dist/util-ebWMWzY0.js +624 -0
  119. package/dist/util-ebWMWzY0.js.map +1 -0
  120. package/dist/workspace-store/index.d.ts +12 -22
  121. package/dist/workspace-store/index.js +13 -10
  122. package/dist/workspace-store/index.js.map +1 -1
  123. package/dist/{workspace-streams-BiS4ABah.d.ts → workspace-streams-Dq2Fzk3c.d.ts} +1 -11
  124. package/package.json +31 -26
  125. package/skills/agent-graphs/SKILL.md +17 -4
  126. package/skills/be-ambitious/SKILL.md +46 -0
  127. package/skills/graph-designer/SKILL.md +9 -2
  128. package/dist/delegate-Dr-63jFl.js.map +0 -1
  129. package/dist/errors-DodWX-cb.js.map +0 -1
  130. package/dist/graph-DPejYB3C.js.map +0 -1
  131. package/dist/profile-JLJd2wFG.js.map +0 -1
  132. package/dist/record-events-D93DkpAx.js +0 -263
  133. package/dist/record-events-D93DkpAx.js.map +0 -1
  134. package/dist/runtime-CsvGCQpl.js.map +0 -1
  135. package/dist/sandbox-profile-compat-DtuJWFrM.js.map +0 -1
  136. package/dist/structural-rollout-DylC_fwU.js.map +0 -1
  137. package/dist/supervise-BGfm2GlY.js.map +0 -1
  138. package/dist/supervisor-wS9Ehz_x.js.map +0 -1
  139. package/dist/top-snapshot-CflmaDgk.js.map +0 -1
@@ -1,48 +1,28 @@
1
- import { Ir as provisionSupervisor } from "../types-C8BGOCBn.js";
2
- //#region src/tui/top-snapshot.d.ts
3
- /**
4
- * The snapshot reader for the supervisor-run TUI: turn the on-disk run layout into a `TopSnapshot`.
5
- * ANSI frame presentation lives in `./top-frame`; this module owns reading and projection.
6
- *
7
- * This module never derives a run path itself. Every directory and per-worker file it reads comes
8
- * from `../runtime/supervise/run-layout` — the same module the writers use — so the reader cannot
9
- * drift from the layout the way an independently-versioned copy of the contract would.
10
- *
11
- * Extracted from the `loops` repo (`src/top-model.ts`), which held a hand-joined copy of the
12
- * layout. Rendering is deliberately unchanged: raw ANSI, zero dependencies.
13
- *
14
- * This is the OPERATOR view: what is on disk right now, for a human watching a workspace. It
15
- * carries no model-call identity, so its per-supervisor totals cannot be joined with root stream
16
- * events without double counting. A client that needs one execution's totals reads
17
- * `projectPursuit` from `../durable` instead.
18
- *
19
- * @experimental
20
- */
1
+ import { Hr as provisionSupervisor, L as Spend, M as Budget, Wu as PursuitProjection } from "../types-0uzVKtFW.js";
21
2
  interface TopSnapshot {
22
3
  readonly root: string;
23
4
  readonly generatedAt: number;
24
5
  readonly supervisors: SupervisorView[];
6
+ /** Canonical facts, including unknown accounting and requested/observed identities. */
7
+ readonly pursuit?: PursuitProjection;
25
8
  /** `partial` when at least one discovered source could not be read completely. */
26
9
  readonly completeness: TopSnapshotCompleteness;
27
10
  /** One bounded entry per skipped or partially read source; empty when complete. */
28
11
  readonly diagnostics: ReadonlyArray<TopSnapshotDiagnostic>;
29
12
  /** Run directories found under the runs roots, readable or not. */
30
13
  readonly discovered: number;
31
- /** Run directories whose state.json parsed into a valid supervisor view. */
14
+ /** Run directories projected into a valid supervisor view. */
32
15
  readonly loaded: number;
33
16
  }
34
17
  type TopSnapshotCompleteness = 'complete' | 'partial';
35
- type TopSnapshotDiagnosticSource = 'supervisor-state' | 'journal' | 'progress' | 'worker-tail';
18
+ type TopSnapshotDiagnosticSource = 'observer-journal' | 'supervisor-state' | 'journal' | 'progress' | 'worker-tail';
36
19
  type TopSnapshotDiagnosticReason = 'unreadable' | 'partial-json' | 'invalid-state' | 'missing';
37
20
  /**
38
21
  * One skipped or partially read snapshot source. `path` is relative to the run directory and
39
22
  * never carries file contents, so a diagnostic is safe to show or log without leaking run data.
40
23
  */
41
- interface TopSnapshotDiagnostic {
42
- readonly source: TopSnapshotDiagnosticSource;
24
+ interface TopSnapshotDiagnostic extends SourceDiagnostic {
43
25
  readonly runId?: string;
44
- readonly path: string;
45
- readonly reason: TopSnapshotDiagnosticReason;
46
26
  }
47
27
  interface SupervisorBase {
48
28
  readonly id: string;
@@ -50,6 +30,7 @@ interface SupervisorBase {
50
30
  readonly task: string;
51
31
  readonly workspaceDir: string;
52
32
  readonly budget: number;
33
+ readonly budgetKnown?: boolean;
53
34
  readonly verifyCmd?: string;
54
35
  readonly workerModel?: string;
55
36
  readonly driverModel?: string;
@@ -92,7 +73,7 @@ interface WorkerView {
92
73
  readonly outRef?: string;
93
74
  readonly reason?: string;
94
75
  }
95
- interface SupervisorTotals {
76
+ interface SupervisorTotals extends Pick<SpendStats, 'tokensInput' | 'tokensOutput' | 'usd' | 'usdKnown' | 'tokensKnown'> {
96
77
  readonly workers: number;
97
78
  readonly running: number;
98
79
  readonly done: number;
@@ -100,10 +81,7 @@ interface SupervisorTotals {
100
81
  readonly cancelled: number;
101
82
  readonly inFlight: number;
102
83
  readonly settled: number;
103
- readonly tokensInput: number;
104
- readonly tokensOutput: number;
105
84
  readonly tokensTotal: number;
106
- readonly usd: number;
107
85
  readonly latencyMs: number;
108
86
  readonly workerLatency: Distribution;
109
87
  }
@@ -114,58 +92,46 @@ interface Distribution {
114
92
  readonly p90: number;
115
93
  readonly max: number;
116
94
  }
117
- interface BudgetStats {
118
- readonly maxIterations?: number;
119
- readonly maxTokens?: number;
120
- readonly maxUsd?: number;
121
- }
122
- interface SpendStats {
123
- readonly iterations: number;
95
+ type BudgetStats = Partial<Pick<Budget, 'maxIterations' | 'maxTokens' | 'maxUsd'>>;
96
+ interface SpendStats extends Readonly<Pick<Spend, 'iterations' | 'usd' | 'ms' | 'usdKnown' | 'tokensKnown'>> {
124
97
  readonly tokensInput: number;
125
98
  readonly tokensOutput: number;
126
- readonly usd: number;
127
- readonly ms: number;
128
99
  }
129
100
  type TopJournalEvent = {
130
- readonly kind: 'spawned';
131
101
  readonly id: string;
102
+ readonly seq?: number;
103
+ readonly at?: string;
104
+ } & ({
105
+ readonly kind: 'spawned';
132
106
  readonly parent?: string;
133
107
  readonly label?: string;
134
108
  readonly budget?: unknown;
135
109
  readonly runtime?: string;
136
- readonly seq?: number;
137
- readonly at?: string;
138
110
  } | {
139
111
  readonly kind: 'settled';
140
- readonly id: string;
141
112
  readonly status?: string;
142
113
  readonly outRef?: string;
143
114
  readonly verdict?: unknown;
144
115
  readonly spent?: unknown;
145
116
  readonly infra?: boolean;
146
- readonly seq?: number;
147
- readonly at?: string;
148
117
  } | {
149
118
  readonly kind: 'cancelled';
150
119
  readonly spent?: unknown;
151
- readonly id: string;
152
120
  readonly reason?: string;
153
- readonly seq?: number;
154
- readonly at?: string;
155
121
  } | {
156
122
  readonly kind: 'metered';
157
- readonly id: string;
158
123
  readonly spend?: unknown;
159
124
  readonly accountingOnly?: boolean;
160
- readonly seq?: number;
161
- readonly at?: string;
162
125
  } | {
163
126
  readonly kind: 'progress';
164
- readonly id: string;
165
127
  readonly spend?: unknown;
166
- readonly seq?: number;
167
- readonly at?: string;
168
- };
128
+ });
129
+ /** A diagnostic before its run id is attached; `loadTopSnapshot` adds `runId`. */
130
+ interface SourceDiagnostic {
131
+ readonly source: TopSnapshotDiagnosticSource;
132
+ readonly path: string;
133
+ readonly reason: TopSnapshotDiagnosticReason;
134
+ }
169
135
  /**
170
136
  * Read every supervisor run under one workspace into a single point-in-time snapshot.
171
137
  *
@@ -175,7 +141,10 @@ type TopJournalEvent = {
175
141
  * tell a removed run from a partial read. `now` is injectable so elapsed time is deterministic
176
142
  * under test.
177
143
  */
178
- declare function loadTopSnapshot(rootDir: string, now?: number): TopSnapshot;
179
- //#endregion
180
- export { type BudgetStats, type Distribution, type SpendStats, type SupervisorTotals, type SupervisorView, type TopJournalEvent, type TopSnapshot, type TopSnapshotCompleteness, type TopSnapshotDiagnostic, type TopSnapshotDiagnosticReason, type TopSnapshotDiagnosticSource, type WorkerView, loadTopSnapshot, provisionSupervisor };
144
+ export declare function loadTopSnapshot(rootDir: string, now?: number): TopSnapshot;
145
+ export declare function loadTopSnapshot(rootDir: string, options: {
146
+ runDir: string;
147
+ now?: number;
148
+ }): Promise<TopSnapshot>;
149
+ export { type BudgetStats, type Distribution, type SpendStats, type SupervisorTotals, type SupervisorView, type TopJournalEvent, type TopSnapshot, type TopSnapshotCompleteness, type TopSnapshotDiagnostic, type TopSnapshotDiagnosticReason, type TopSnapshotDiagnosticSource, type WorkerView, provisionSupervisor };
181
150
  //# sourceMappingURL=index.d.ts.map
package/dist/tui/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as provisionSupervisor } from "../provision-supervisor-C4v2vqDo.js";
2
- import { n as loadTopSnapshot } from "../top-snapshot-CflmaDgk.js";
1
+ import { t as provisionSupervisor } from "../provision-supervisor-D9pO-iPl.js";
2
+ import { n as loadTopSnapshot } from "../top-snapshot-DcV7VG4m.js";
3
3
  export { loadTopSnapshot, provisionSupervisor };