@ours.network/fleet 1.1.0-nightly.2 → 1.1.0-nightly.21

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 (202) hide show
  1. package/README.md +204 -55
  2. package/dist/agent-recovery-gate.d.ts +17 -0
  3. package/dist/agent-recovery-gate.js +135 -0
  4. package/dist/application/capabilities.js +18 -6
  5. package/dist/application/fleet-query-service.js +20 -5
  6. package/dist/application/role-command-service.js +9 -0
  7. package/dist/application/role-creation-service.d.ts +6 -25
  8. package/dist/application/role-creation-service.js +34 -72
  9. package/dist/application/role-repository.d.ts +4 -2
  10. package/dist/application/role-repository.js +6 -3
  11. package/dist/application/session-control.d.ts +3 -1
  12. package/dist/application/session-control.js +4 -2
  13. package/dist/application/task-room-service.d.ts +58 -6
  14. package/dist/application/task-room-service.js +435 -79
  15. package/dist/briefing.js +74 -24
  16. package/dist/build-info.json +4 -4
  17. package/dist/canonical-json.d.ts +2 -0
  18. package/dist/canonical-json.js +10 -0
  19. package/dist/cli.js +241 -76
  20. package/dist/config-yaml.d.ts +1 -1
  21. package/dist/config.d.ts +75 -3
  22. package/dist/config.js +274 -34
  23. package/dist/creation.d.ts +1 -1
  24. package/dist/creation.js +3 -2
  25. package/dist/daemon-recovery.d.ts +93 -0
  26. package/dist/daemon-recovery.js +328 -0
  27. package/dist/docs.d.ts +1 -1
  28. package/dist/docs.js +192 -66
  29. package/dist/doctor.d.ts +2 -0
  30. package/dist/doctor.js +54 -4
  31. package/dist/fleet-command-audit.d.ts +165 -0
  32. package/dist/fleet-command-audit.js +555 -0
  33. package/dist/fleet-proxy.d.ts +7 -2
  34. package/dist/fleet-proxy.js +30 -8
  35. package/dist/harness/agent-session.d.ts +5 -0
  36. package/dist/harness/claude-code-session.d.ts +2 -0
  37. package/dist/harness/claude-code-session.js +6 -1
  38. package/dist/harness/claude-code.js +2 -0
  39. package/dist/harness/codex-app-server-proxy.d.ts +40 -0
  40. package/dist/harness/codex-app-server-proxy.js +348 -14
  41. package/dist/harness/codex-session.d.ts +11 -2
  42. package/dist/harness/codex-session.js +22 -2
  43. package/dist/harness/codex.d.ts +5 -1
  44. package/dist/harness/codex.js +110 -10
  45. package/dist/harness/types.d.ts +1 -1
  46. package/dist/index.d.ts +5 -4
  47. package/dist/index.js +4 -3
  48. package/dist/init-guidance.d.ts +1 -1
  49. package/dist/init-guidance.js +4 -3
  50. package/dist/init-wizard.d.ts +98 -0
  51. package/dist/init-wizard.js +629 -0
  52. package/dist/lifecycle-summary.d.ts +134 -0
  53. package/dist/lifecycle-summary.js +179 -0
  54. package/dist/loops/config.d.ts +10 -1
  55. package/dist/loops/config.js +38 -5
  56. package/dist/model-env.d.ts +2 -2
  57. package/dist/model-env.js +1 -1
  58. package/dist/model-recovery.d.ts +1 -1
  59. package/dist/ops.js +2 -17
  60. package/dist/owner-channel/channel.d.ts +58 -0
  61. package/dist/owner-channel/channel.js +321 -42
  62. package/dist/owner-channel/commands.d.ts +6 -1
  63. package/dist/owner-channel/commands.js +34 -19
  64. package/dist/owner-channel/state.d.ts +2 -0
  65. package/dist/owner-channel/state.js +8 -2
  66. package/dist/permissions.js +1 -1
  67. package/dist/preset-bootstrap.d.ts +10 -0
  68. package/dist/preset-bootstrap.js +85 -0
  69. package/dist/preset-migration.d.ts +42 -0
  70. package/dist/preset-migration.js +414 -0
  71. package/dist/reports/artifact.d.ts +10 -0
  72. package/dist/reports/artifact.js +32 -0
  73. package/dist/reports/index.d.ts +5 -0
  74. package/dist/reports/index.js +5 -0
  75. package/dist/reports/render.d.ts +6 -0
  76. package/dist/reports/render.js +240 -0
  77. package/dist/reports/service.d.ts +42 -0
  78. package/dist/reports/service.js +57 -0
  79. package/dist/reports/tasks.d.ts +52 -0
  80. package/dist/reports/tasks.js +177 -0
  81. package/dist/reports/types.d.ts +315 -0
  82. package/dist/reports/types.js +6 -0
  83. package/dist/resolved-plan.js +13 -1
  84. package/dist/rooms-tasks/cli.d.ts +2 -0
  85. package/dist/rooms-tasks/cli.js +514 -75
  86. package/dist/rooms-tasks/close.d.ts +9 -1
  87. package/dist/rooms-tasks/close.js +20 -4
  88. package/dist/rooms-tasks/config.js +16 -14
  89. package/dist/rooms-tasks/cowork-adapter.d.ts +1 -0
  90. package/dist/rooms-tasks/cowork-adapter.js +6 -0
  91. package/dist/rooms-tasks/deletion.d.ts +51 -0
  92. package/dist/rooms-tasks/deletion.js +217 -0
  93. package/dist/rooms-tasks/external-worker.d.ts +1 -0
  94. package/dist/rooms-tasks/external-worker.js +14 -9
  95. package/dist/rooms-tasks/launch-snapshot.d.ts +19 -0
  96. package/dist/rooms-tasks/launch-snapshot.js +181 -0
  97. package/dist/rooms-tasks/member-overrides.d.ts +30 -0
  98. package/dist/rooms-tasks/member-overrides.js +204 -0
  99. package/dist/rooms-tasks/provision.js +184 -49
  100. package/dist/rooms-tasks/room-state.d.ts +1 -0
  101. package/dist/rooms-tasks/room-state.js +12 -1
  102. package/dist/rooms-tasks/task-state.d.ts +115 -3
  103. package/dist/rooms-tasks/task-state.js +361 -11
  104. package/dist/rooms-tasks/templates.d.ts +4 -2
  105. package/dist/rooms-tasks/templates.js +42 -78
  106. package/dist/rooms-tasks/terminal.d.ts +3 -0
  107. package/dist/rooms-tasks/terminal.js +7 -3
  108. package/dist/rooms-tasks/types.d.ts +96 -17
  109. package/dist/rooms-tasks/types.js +14 -4
  110. package/dist/runner.d.ts +12 -2
  111. package/dist/runner.js +124 -43
  112. package/dist/session/acp.d.ts +9 -1
  113. package/dist/session/acp.js +35 -9
  114. package/dist/session/arbiter.d.ts +2 -1
  115. package/dist/session/arbiter.js +2 -0
  116. package/dist/session/codex-app-server-transport.d.ts +53 -0
  117. package/dist/session/codex-app-server-transport.js +184 -0
  118. package/dist/session/codex-app-server.d.ts +122 -0
  119. package/dist/session/codex-app-server.js +1031 -0
  120. package/dist/session/control.d.ts +14 -1
  121. package/dist/session/control.js +38 -0
  122. package/dist/session/conversation-types.d.ts +4 -4
  123. package/dist/session/types.d.ts +24 -6
  124. package/dist/session/types.js +28 -0
  125. package/dist/spawn.d.ts +15 -31
  126. package/dist/spawn.js +117 -237
  127. package/dist/temp-lifecycle.d.ts +1 -1
  128. package/dist/watchdog/config.d.ts +10 -7
  129. package/dist/watchdog/config.js +29 -19
  130. package/dist/watchdog/run.js +4 -13
  131. package/dist/web/fleet-config-service.d.ts +1 -0
  132. package/dist/web/fleet-config-service.js +27 -8
  133. package/dist/web/runtime.js +11 -6
  134. package/dist/web/server.js +28 -1
  135. package/dist/web/topology-promote.js +8 -1
  136. package/dist/web-app/assets/index-C0h3ALvs.js +10 -0
  137. package/dist/web-app/index.html +1 -1
  138. package/package.json +3 -2
  139. package/presets/brain-catalog.json +16 -0
  140. package/presets/fleet/agent_templates/Critic.yaml +4 -0
  141. package/presets/fleet/agent_templates/Developer.yaml +4 -0
  142. package/presets/fleet/agent_templates/LocalCoordinator.yaml +4 -0
  143. package/presets/fleet/agents/FleetCoordinator.yaml +3 -0
  144. package/presets/fleet/brains/claude-default.yaml +5 -0
  145. package/presets/fleet/brains/claude-fable-5-high.yaml +5 -0
  146. package/presets/fleet/brains/claude-fable-5-low.yaml +5 -0
  147. package/presets/fleet/brains/claude-fable-5-max.yaml +5 -0
  148. package/presets/fleet/brains/claude-fable-5-medium.yaml +5 -0
  149. package/presets/fleet/brains/claude-fable-5-xhigh.yaml +5 -0
  150. package/presets/fleet/brains/claude-opus-5-high.yaml +5 -0
  151. package/presets/fleet/brains/claude-opus-5-low.yaml +5 -0
  152. package/presets/fleet/brains/claude-opus-5-max.yaml +5 -0
  153. package/presets/fleet/brains/claude-opus-5-medium.yaml +5 -0
  154. package/presets/fleet/brains/claude-opus-5-xhigh.yaml +5 -0
  155. package/presets/fleet/brains/claude-sonnet-5-high.yaml +5 -0
  156. package/presets/fleet/brains/claude-sonnet-5-low.yaml +5 -0
  157. package/presets/fleet/brains/claude-sonnet-5-max.yaml +5 -0
  158. package/presets/fleet/brains/claude-sonnet-5-medium.yaml +5 -0
  159. package/presets/fleet/brains/claude-sonnet-5-xhigh.yaml +5 -0
  160. package/presets/fleet/brains/codex-gpt-5-3-codex-spark-high.yaml +5 -0
  161. package/presets/fleet/brains/codex-gpt-5-3-codex-spark-low.yaml +5 -0
  162. package/presets/fleet/brains/codex-gpt-5-3-codex-spark-medium.yaml +5 -0
  163. package/presets/fleet/brains/codex-gpt-5-3-codex-spark-xhigh.yaml +5 -0
  164. package/presets/fleet/brains/codex-gpt-5-4-high.yaml +5 -0
  165. package/presets/fleet/brains/codex-gpt-5-4-low.yaml +5 -0
  166. package/presets/fleet/brains/codex-gpt-5-4-medium.yaml +5 -0
  167. package/presets/fleet/brains/codex-gpt-5-4-mini-high.yaml +5 -0
  168. package/presets/fleet/brains/codex-gpt-5-4-mini-low.yaml +5 -0
  169. package/presets/fleet/brains/codex-gpt-5-4-mini-medium.yaml +5 -0
  170. package/presets/fleet/brains/codex-gpt-5-4-mini-xhigh.yaml +5 -0
  171. package/presets/fleet/brains/codex-gpt-5-4-xhigh.yaml +5 -0
  172. package/presets/fleet/brains/codex-gpt-5-5-high.yaml +5 -0
  173. package/presets/fleet/brains/codex-gpt-5-5-low.yaml +5 -0
  174. package/presets/fleet/brains/codex-gpt-5-5-medium.yaml +5 -0
  175. package/presets/fleet/brains/codex-gpt-5-5-xhigh.yaml +5 -0
  176. package/presets/fleet/brains/codex-gpt-5-6-luna-high.yaml +5 -0
  177. package/presets/fleet/brains/codex-gpt-5-6-luna-low.yaml +5 -0
  178. package/presets/fleet/brains/codex-gpt-5-6-luna-max.yaml +5 -0
  179. package/presets/fleet/brains/codex-gpt-5-6-luna-medium.yaml +5 -0
  180. package/presets/fleet/brains/codex-gpt-5-6-luna-xhigh.yaml +5 -0
  181. package/presets/fleet/brains/codex-gpt-5-6-sol-high.yaml +5 -0
  182. package/presets/fleet/brains/codex-gpt-5-6-sol-low.yaml +5 -0
  183. package/presets/fleet/brains/codex-gpt-5-6-sol-max.yaml +5 -0
  184. package/presets/fleet/brains/codex-gpt-5-6-sol-medium.yaml +5 -0
  185. package/presets/fleet/brains/codex-gpt-5-6-sol-ultra.yaml +5 -0
  186. package/presets/fleet/brains/codex-gpt-5-6-sol-xhigh.yaml +5 -0
  187. package/presets/fleet/brains/codex-gpt-5-6-terra-high.yaml +5 -0
  188. package/presets/fleet/brains/codex-gpt-5-6-terra-low.yaml +5 -0
  189. package/presets/fleet/brains/codex-gpt-5-6-terra-max.yaml +5 -0
  190. package/presets/fleet/brains/codex-gpt-5-6-terra-medium.yaml +5 -0
  191. package/presets/fleet/brains/codex-gpt-5-6-terra-ultra.yaml +5 -0
  192. package/presets/fleet/brains/codex-gpt-5-6-terra-xhigh.yaml +5 -0
  193. package/presets/fleet/roles/Coordinator.yaml +30 -0
  194. package/presets/fleet/roles/Critic.yaml +19 -0
  195. package/presets/fleet/roles/Developer.yaml +19 -0
  196. package/presets/fleet/roles/LocalCoordinator.yaml +25 -0
  197. package/presets/fleet/room_templates/pair.yaml +10 -0
  198. package/presets/fleet/room_templates/single.yaml +7 -0
  199. package/presets/fleet/room_templates/team.yaml +12 -0
  200. package/presets/fleet.yaml +7 -0
  201. package/presets/manifest.json +6 -0
  202. package/dist/web-app/assets/index-BbE9EX6n.js +0 -10
@@ -0,0 +1,315 @@
1
+ export declare const REPORT_KINDS: readonly ["overview", "tasks", "task-lists", "task", "rooms", "room", "room-members", "agents", "agent-status", "templates", "template", "template-validation", "loops", "loop-status", "loop-validation", "watchdog", "watchdog-runs", "version", "config", "doctor", "manual"];
2
+ export type ReportKind = typeof REPORT_KINDS[number];
3
+ export type ReportTone = 'neutral' | 'good' | 'warning' | 'bad' | 'unknown';
4
+ export interface ReportValue {
5
+ label: string;
6
+ value: string | number | boolean | null;
7
+ tone?: ReportTone;
8
+ /** Internal artifact link only; the renderer derives the fragment. */
9
+ target?: {
10
+ section: string;
11
+ id?: string;
12
+ };
13
+ multiline?: boolean;
14
+ }
15
+ export type ReportViewer = {
16
+ surface: 'cli';
17
+ authority: 'local-owner';
18
+ } | {
19
+ surface: 'rest';
20
+ sessionId: string;
21
+ roomCids: string[];
22
+ } | {
23
+ surface: 'messenger';
24
+ authenticatedCid: string;
25
+ roomCids: string[];
26
+ };
27
+ export type ReportRequest = {
28
+ kind: 'overview';
29
+ viewer: ReportViewer;
30
+ } | {
31
+ kind: 'tasks';
32
+ viewer: ReportViewer;
33
+ state?: string;
34
+ list?: string;
35
+ groupByList?: boolean;
36
+ } | {
37
+ kind: 'task-lists';
38
+ viewer: ReportViewer;
39
+ } | {
40
+ kind: 'task';
41
+ viewer: ReportViewer;
42
+ taskId: string;
43
+ } | {
44
+ kind: 'rooms';
45
+ viewer: ReportViewer;
46
+ state?: string;
47
+ } | {
48
+ kind: 'room';
49
+ viewer: ReportViewer;
50
+ roomId: string;
51
+ } | {
52
+ kind: 'room-members';
53
+ viewer: ReportViewer;
54
+ roomId: string;
55
+ } | {
56
+ kind: 'agents';
57
+ viewer: ReportViewer;
58
+ } | {
59
+ kind: 'agent-status';
60
+ viewer: ReportViewer;
61
+ role: string;
62
+ } | {
63
+ kind: 'templates' | 'template-validation';
64
+ viewer: ReportViewer;
65
+ } | {
66
+ kind: 'template';
67
+ viewer: ReportViewer;
68
+ name: string;
69
+ } | {
70
+ kind: 'loops' | 'loop-validation';
71
+ viewer: ReportViewer;
72
+ role?: string;
73
+ } | {
74
+ kind: 'loop-status';
75
+ viewer: ReportViewer;
76
+ role?: string;
77
+ loop?: string;
78
+ } | {
79
+ kind: 'watchdog';
80
+ viewer: ReportViewer;
81
+ watchdog: string;
82
+ runId?: string;
83
+ } | {
84
+ kind: 'watchdog-runs';
85
+ viewer: ReportViewer;
86
+ watchdog: string;
87
+ } | {
88
+ kind: 'version' | 'config' | 'doctor' | 'manual';
89
+ viewer: ReportViewer;
90
+ };
91
+ export interface ReportTable {
92
+ kind: 'table';
93
+ id: string;
94
+ title: string;
95
+ description?: string;
96
+ columns: string[];
97
+ rows: Array<{
98
+ id?: string;
99
+ cells: ReportValue[];
100
+ }>;
101
+ empty?: string;
102
+ truncated?: {
103
+ shown: number;
104
+ total: number;
105
+ };
106
+ }
107
+ export interface ReportDetails {
108
+ kind: 'details';
109
+ id: string;
110
+ title: string;
111
+ description?: string;
112
+ values: ReportValue[];
113
+ paragraphs?: string[];
114
+ }
115
+ export interface ReportNotice {
116
+ kind: 'notice';
117
+ id: string;
118
+ title: string;
119
+ tone: ReportTone;
120
+ text: string;
121
+ }
122
+ export interface ReportCards {
123
+ kind: 'cards';
124
+ id: string;
125
+ title: string;
126
+ description?: string;
127
+ items: Array<{
128
+ id: string;
129
+ title: string;
130
+ subtitle?: string;
131
+ tone?: ReportTone;
132
+ values: ReportValue[];
133
+ paragraphs?: string[];
134
+ open?: boolean;
135
+ }>;
136
+ empty?: string;
137
+ truncated?: {
138
+ shown: number;
139
+ total: number;
140
+ };
141
+ }
142
+ export interface ReportRecords {
143
+ kind: 'records';
144
+ id: string;
145
+ title: string;
146
+ description?: string;
147
+ items: Array<{
148
+ id: string;
149
+ title: string;
150
+ subtitle: string;
151
+ tone?: ReportTone;
152
+ open?: boolean;
153
+ groups: Array<{
154
+ title: string;
155
+ values: ReportValue[];
156
+ }>;
157
+ }>;
158
+ empty?: string;
159
+ truncated?: {
160
+ shown: number;
161
+ total: number;
162
+ };
163
+ }
164
+ export interface ReportListBoard {
165
+ kind: 'list-board';
166
+ id: string;
167
+ title: string;
168
+ description?: string;
169
+ items: Array<{
170
+ id: string;
171
+ name: string;
172
+ builtIn: boolean;
173
+ createdAt: string | null;
174
+ counts: {
175
+ total: number;
176
+ active: number;
177
+ blocked: number;
178
+ terminal: number;
179
+ };
180
+ taskTarget: {
181
+ section: string;
182
+ };
183
+ recent: ReportValue[];
184
+ recentTotal: number;
185
+ }>;
186
+ truncated?: {
187
+ shown: number;
188
+ total: number;
189
+ };
190
+ }
191
+ export interface ReportInbox {
192
+ kind: 'inbox';
193
+ id: string;
194
+ title: string;
195
+ description: string;
196
+ lists: Array<{
197
+ id: string;
198
+ name: string;
199
+ count: number;
200
+ blocked: number;
201
+ selected: boolean;
202
+ }>;
203
+ selected: {
204
+ name: string;
205
+ total: number;
206
+ shown: number;
207
+ };
208
+ attention: Array<{
209
+ id: string;
210
+ title: string;
211
+ brief: string;
212
+ status: string;
213
+ blocker: string;
214
+ updated: string;
215
+ groups: Array<{
216
+ title: string;
217
+ values: ReportValue[];
218
+ }>;
219
+ }>;
220
+ active: Array<{
221
+ id: string;
222
+ title: string;
223
+ brief: string;
224
+ status: string;
225
+ updated: string;
226
+ groups: Array<{
227
+ title: string;
228
+ values: ReportValue[];
229
+ }>;
230
+ }>;
231
+ terminal: Array<{
232
+ id: string;
233
+ title: string;
234
+ brief: string;
235
+ status: string;
236
+ updated: string;
237
+ outcome: string;
238
+ }>;
239
+ }
240
+ export interface ReportTaskNavigator {
241
+ kind: 'task-navigator';
242
+ id: string;
243
+ title: string;
244
+ description: string;
245
+ lists: Array<{
246
+ id: string;
247
+ name: string;
248
+ count: number;
249
+ blocked: number;
250
+ }>;
251
+ defaultList: string;
252
+ panels: Array<{
253
+ id: string;
254
+ name: string;
255
+ total: number;
256
+ shown: number;
257
+ description: string;
258
+ tasks: Array<{
259
+ id: string;
260
+ title: string;
261
+ brief: string;
262
+ status: string;
263
+ blocked?: string;
264
+ updated: string;
265
+ groups: Array<{
266
+ title: string;
267
+ values: ReportValue[];
268
+ }>;
269
+ }>;
270
+ }>;
271
+ }
272
+ export type ReportSection = ReportTable | ReportDetails | ReportNotice | ReportCards | ReportRecords | ReportListBoard | ReportInbox | ReportTaskNavigator;
273
+ export interface ReportViewModel {
274
+ schemaVersion: 1;
275
+ reportKind: ReportKind;
276
+ title: string;
277
+ description?: string;
278
+ generatedAt: string;
279
+ source: {
280
+ name: string;
281
+ version: string;
282
+ buildId?: string;
283
+ };
284
+ filters?: Record<string, string>;
285
+ observedAt?: Record<string, string>;
286
+ summary?: ReportValue[];
287
+ sections: ReportSection[];
288
+ unavailable?: string[];
289
+ }
290
+ export interface ReportArtifactMetadata {
291
+ schemaVersion: 1;
292
+ reportKind: ReportKind;
293
+ filename: string;
294
+ mediaType: 'text/html; charset=utf-8';
295
+ byteSize: number;
296
+ source: {
297
+ name: string;
298
+ version: string;
299
+ buildId?: string;
300
+ };
301
+ generatedAt: string;
302
+ filters: Record<string, string>;
303
+ truncated: boolean;
304
+ unavailable: string[];
305
+ observedAt: Record<string, string>;
306
+ truncation: Array<{
307
+ section: string;
308
+ shown: number;
309
+ total: number;
310
+ }>;
311
+ }
312
+ export interface ReportArtifact {
313
+ metadata: ReportArtifactMetadata;
314
+ html: string;
315
+ }
@@ -0,0 +1,6 @@
1
+ export const REPORT_KINDS = [
2
+ 'overview', 'tasks', 'task-lists', 'task', 'rooms', 'room', 'room-members',
3
+ 'agents', 'agent-status', 'templates', 'template', 'template-validation',
4
+ 'loops', 'loop-status', 'loop-validation', 'watchdog', 'watchdog-runs',
5
+ 'version', 'config', 'doctor', 'manual',
6
+ ];
@@ -1,9 +1,15 @@
1
1
  import { analyzeRolePermissions } from './permissions.js';
2
2
  import { dirname, relative } from 'node:path';
3
+ import { createHash } from 'node:crypto';
3
4
  import { isSensitiveConfigKey } from './sensitive-config.js';
4
5
  export const RESOLVED_PLAN_SCHEMA_VERSION = 2;
5
6
  const sortedObject = (value) => Object.fromEntries(Object.entries(value).sort(([a], [b]) => a.localeCompare(b)));
6
7
  export const redactSensitive = (value, key = '') => {
8
+ if (key === 'prompt' && typeof value === 'string')
9
+ return {
10
+ bytes: Buffer.byteLength(value, 'utf8'),
11
+ sha256: createHash('sha256').update(value).digest('hex'),
12
+ };
7
13
  if (isSensitiveConfigKey(key))
8
14
  return '<redacted>';
9
15
  if (Array.isArray(value))
@@ -26,6 +32,9 @@ export function resolvedPlan(cfg) {
26
32
  })),
27
33
  startStaggerMs: cfg.startStaggerMs,
28
34
  diagnostics: cfg.diagnostics.map(diagnostic => ({ ...diagnostic })),
35
+ agentTemplates: Object.fromEntries(Object.entries(cfg.agentTemplates ?? {})
36
+ .sort(([a], [b]) => a.localeCompare(b))
37
+ .map(([name, definition]) => [name, redactSensitive(definition)])),
29
38
  roles: cfg.roles.map(role => resolvedRolePlan(role, manifestDir)),
30
39
  loops: cfg.loops.map(loop => sortedObject({
31
40
  name: loop.name, selectors: [...loop.selectors], roles: [...loop.roleNames],
@@ -45,9 +54,11 @@ export function resolvedPlan(cfg) {
45
54
  }
46
55
  export function resolvedRolePlan(role, manifestDir = dirname(role.sourceFile)) {
47
56
  const analysis = analyzeRolePermissions(role);
57
+ const effectiveLoops = role.temporaryLoopSource ? (role.temporaryLoops ?? []) : (role.loops ?? []);
48
58
  return {
49
59
  name: role.name,
50
60
  sourceFile: role.sourceFile,
61
+ agentTemplate: role.agentTemplate ?? null,
51
62
  references: Object.values(role.provenance ?? {}).flatMap(item => item.viaReference ? [item.viaReference] : [])
52
63
  .filter((item, index, all) => all.findIndex(other => JSON.stringify(other) === JSON.stringify(item)) === index)
53
64
  .sort((a, b) => a.kind.localeCompare(b.kind) || a.id.localeCompare(b.id)
@@ -83,7 +94,8 @@ export function resolvedRolePlan(role, manifestDir = dirname(role.sourceFile)) {
83
94
  },
84
95
  monitor: role.monitor,
85
96
  ownerChannel: role.owner_channel ?? null,
86
- loops: (role.loops ?? []).map(loop => ({
97
+ temporaryLoopSource: role.temporaryLoopSource ?? null,
98
+ loops: effectiveLoops.map(loop => ({
87
99
  name: loop.name, enabled: loop.enabled, intervalMs: loop.intervalMs,
88
100
  initialDelayMs: loop.initialDelayMs, jitterMs: loop.jitterMs,
89
101
  definitionHash: loop.definitionHash, prompt: { bytes: loop.promptBytes, sha256: loop.promptHash },
@@ -1,4 +1,6 @@
1
1
  import type { Command } from 'commander';
2
+ import { type MemberOverrides } from './member-overrides.js';
3
+ export declare function cliMemberOverrides(membersFile?: string, argv?: string[]): MemberOverrides | undefined;
2
4
  export declare function registerTemplateCommands(parent: Command, cOpt: (cmd: Command) => Command): void;
3
5
  export declare function registerTaskCommands(parent: Command, cOpt: (cmd: Command) => Command): void;
4
6
  export declare function registerRoomCommands(parent: Command, cOpt: (cmd: Command) => Command): void;