ace-swarm 2.1.2 → 2.3.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 (121) hide show
  1. package/CHANGELOG.md +52 -1
  2. package/README.md +86 -40
  3. package/assets/.agents/ACE/AGENT_REGISTRY.md +7 -1
  4. package/assets/.agents/ACE/agent-eval/instructions.md +41 -1
  5. package/assets/.agents/ACE/agent-memory/instructions.md +35 -1
  6. package/assets/.agents/ACE/agent-observability/instructions.md +35 -1
  7. package/assets/.agents/ACE/agent-release/instructions.md +34 -1
  8. package/assets/.agents/ACE/agent-security/instructions.md +35 -1
  9. package/assets/.agents/ACE/agent-skeptic/instructions.md +49 -0
  10. package/assets/.agents/ACE/orchestrator/AGENTS.md +11 -0
  11. package/assets/.github/hooks/ace-copilot.json +16 -16
  12. package/assets/agent-state/ACE_WORKFLOW.md +65 -0
  13. package/assets/agent-state/INTERFACE_REGISTRY.md +1 -0
  14. package/assets/agent-state/MODULES/schemas/ACE_RUNTIME_PROFILE.schema.json +79 -0
  15. package/assets/agent-state/MODULES/schemas/VERICIFY_PROCESS_POST_LOG.schema.json +1 -0
  16. package/assets/scripts/ace-hook-dispatch.mjs +447 -0
  17. package/assets/scripts/copilot-hook-dispatch.mjs +1 -265
  18. package/assets/scripts/render-mcp-configs.sh +328 -1
  19. package/assets/tasks/README.md +26 -0
  20. package/dist/ace-autonomy.d.ts +137 -0
  21. package/dist/ace-autonomy.d.ts.map +1 -0
  22. package/dist/ace-autonomy.js +472 -0
  23. package/dist/ace-autonomy.js.map +1 -0
  24. package/dist/ace-context.d.ts +29 -0
  25. package/dist/ace-context.d.ts.map +1 -0
  26. package/dist/ace-context.js +240 -0
  27. package/dist/ace-context.js.map +1 -0
  28. package/dist/ace-internal-tools.d.ts +8 -0
  29. package/dist/ace-internal-tools.d.ts.map +1 -0
  30. package/dist/ace-internal-tools.js +76 -0
  31. package/dist/ace-internal-tools.js.map +1 -0
  32. package/dist/ace-server-instructions.d.ts +12 -0
  33. package/dist/ace-server-instructions.d.ts.map +1 -0
  34. package/dist/ace-server-instructions.js +299 -0
  35. package/dist/ace-server-instructions.js.map +1 -0
  36. package/dist/agent-runtime/role-adapters.d.ts.map +1 -1
  37. package/dist/agent-runtime/role-adapters.js +47 -6
  38. package/dist/agent-runtime/role-adapters.js.map +1 -1
  39. package/dist/helpers.d.ts.map +1 -1
  40. package/dist/helpers.js +90 -0
  41. package/dist/helpers.js.map +1 -1
  42. package/dist/internal-tool-runtime.d.ts +21 -0
  43. package/dist/internal-tool-runtime.d.ts.map +1 -0
  44. package/dist/internal-tool-runtime.js +136 -0
  45. package/dist/internal-tool-runtime.js.map +1 -0
  46. package/dist/local-model-runtime.d.ts +36 -0
  47. package/dist/local-model-runtime.d.ts.map +1 -0
  48. package/dist/local-model-runtime.js +161 -0
  49. package/dist/local-model-runtime.js.map +1 -0
  50. package/dist/model-bridge.d.ts +54 -0
  51. package/dist/model-bridge.d.ts.map +1 -0
  52. package/dist/model-bridge.js +587 -0
  53. package/dist/model-bridge.js.map +1 -0
  54. package/dist/orchestrator-supervisor.d.ts +100 -0
  55. package/dist/orchestrator-supervisor.d.ts.map +1 -0
  56. package/dist/orchestrator-supervisor.js +399 -0
  57. package/dist/orchestrator-supervisor.js.map +1 -0
  58. package/dist/prompts.d.ts.map +1 -1
  59. package/dist/prompts.js +101 -0
  60. package/dist/prompts.js.map +1 -1
  61. package/dist/public-surface.d.ts.map +1 -1
  62. package/dist/public-surface.js +6 -0
  63. package/dist/public-surface.js.map +1 -1
  64. package/dist/resources.d.ts.map +1 -1
  65. package/dist/resources.js +29 -0
  66. package/dist/resources.js.map +1 -1
  67. package/dist/runtime-executor.d.ts.map +1 -1
  68. package/dist/runtime-executor.js +121 -0
  69. package/dist/runtime-executor.js.map +1 -1
  70. package/dist/runtime-profile.d.ts +18 -0
  71. package/dist/runtime-profile.d.ts.map +1 -1
  72. package/dist/runtime-profile.js +39 -3
  73. package/dist/runtime-profile.js.map +1 -1
  74. package/dist/schemas.js +1 -1
  75. package/dist/schemas.js.map +1 -1
  76. package/dist/server.d.ts +5 -1
  77. package/dist/server.d.ts.map +1 -1
  78. package/dist/server.js +9 -1
  79. package/dist/server.js.map +1 -1
  80. package/dist/shared.d.ts +3 -3
  81. package/dist/shared.d.ts.map +1 -1
  82. package/dist/shared.js +1 -0
  83. package/dist/shared.js.map +1 -1
  84. package/dist/tools-agent.d.ts +1 -0
  85. package/dist/tools-agent.d.ts.map +1 -1
  86. package/dist/tools-agent.js +456 -1
  87. package/dist/tools-agent.js.map +1 -1
  88. package/dist/tools-framework.d.ts.map +1 -1
  89. package/dist/tools-framework.js +366 -128
  90. package/dist/tools-framework.js.map +1 -1
  91. package/dist/tools-memory.d.ts.map +1 -1
  92. package/dist/tools-memory.js +80 -0
  93. package/dist/tools-memory.js.map +1 -1
  94. package/dist/tui/agent-runner.d.ts +6 -0
  95. package/dist/tui/agent-runner.d.ts.map +1 -1
  96. package/dist/tui/agent-runner.js +15 -1
  97. package/dist/tui/agent-runner.js.map +1 -1
  98. package/dist/tui/agent-worker.d.ts +3 -1
  99. package/dist/tui/agent-worker.d.ts.map +1 -1
  100. package/dist/tui/agent-worker.js +117 -9
  101. package/dist/tui/agent-worker.js.map +1 -1
  102. package/dist/tui/chat.d.ts +19 -0
  103. package/dist/tui/chat.d.ts.map +1 -1
  104. package/dist/tui/chat.js +108 -0
  105. package/dist/tui/chat.js.map +1 -1
  106. package/dist/tui/index.d.ts +1 -0
  107. package/dist/tui/index.d.ts.map +1 -1
  108. package/dist/tui/index.js +3 -0
  109. package/dist/tui/index.js.map +1 -1
  110. package/dist/vericify-bridge.d.ts +5 -1
  111. package/dist/vericify-bridge.d.ts.map +1 -1
  112. package/dist/vericify-bridge.js +10 -0
  113. package/dist/vericify-bridge.js.map +1 -1
  114. package/dist/vericify-context.d.ts +10 -0
  115. package/dist/vericify-context.d.ts.map +1 -0
  116. package/dist/vericify-context.js +72 -0
  117. package/dist/vericify-context.js.map +1 -0
  118. package/dist/workspace-manager.d.ts.map +1 -1
  119. package/dist/workspace-manager.js +13 -2
  120. package/dist/workspace-manager.js.map +1 -1
  121. package/package.json +2 -1
@@ -2,6 +2,10 @@
2
2
  set -euo pipefail
3
3
 
4
4
  mkdir -p .mcp-config
5
+ mkdir -p .github/hooks
6
+ mkdir -p .claude
7
+ mkdir -p .cursor
8
+ mkdir -p .vscode
5
9
 
6
10
  cat > .mcp-config/vscode.mcp.json <<'JSON'
7
11
  {
@@ -49,9 +53,332 @@ cat > .mcp-config/antigravity.mcp.json <<'JSON'
49
53
  JSON
50
54
 
51
55
  cat > .mcp-config/codex.config.toml <<'TOML'
56
+ # ACE instructions are scaffolded into AGENTS.md during bootstrap.
52
57
  [mcp_servers.ace-swarm]
53
58
  command = "npx"
54
59
  args = ["-y", "ace-swarm", "mcp"]
55
60
  TOML
56
61
 
57
- echo "Wrote .mcp-config bundle for codex, vscode, claude, cursor, antigravity"
62
+ cat > CLAUDE.md <<'MD'
63
+ # ACE Instructions For Claude Code
64
+
65
+ This workspace is ACE-governed. Ground truth lives in `agent-state/TASK.md`,
66
+ `agent-state/STATUS.md`, `agent-state/SCOPE.md`, and `agent-state/EVIDENCE_LOG.md`.
67
+
68
+ Before significant work, call `recall_context`. Use `route_task` and
69
+ `get_agent_instructions` for role guidance. After meaningful edits or state
70
+ changes, call `execute_gates` and persist evidence/handoffs in ACE artifacts.
71
+ MD
72
+
73
+ cat > .github/copilot-instructions.md <<'MD'
74
+ # ACE Instructions For GitHub Copilot
75
+
76
+ This workspace is ACE-governed. Read file-backed ACE state before acting:
77
+ `agent-state/TASK.md`, `agent-state/STATUS.md`, `agent-state/SCOPE.md`, and
78
+ `agent-state/EVIDENCE_LOG.md`.
79
+
80
+ Before significant work, call `recall_context`. Route with `route_task`.
81
+ After material changes, call `execute_gates` and update durable ACE artifacts.
82
+ MD
83
+
84
+ cat > .cursorrules <<'MD'
85
+ # ACE Instructions For Cursor
86
+
87
+ This workspace is ACE-governed. Do not rely on chat history for state. Use
88
+ `recall_context` to load task, scope, and status from `agent-state/*`.
89
+
90
+ Use `route_task` and `get_agent_instructions` for role guidance. After edits,
91
+ run `execute_gates` and persist evidence/handoffs in ACE artifacts.
92
+ MD
93
+
94
+ cat > AGENTS.md <<'MD'
95
+ # ACE Instructions For Codex
96
+
97
+ This workspace is ACE-governed. File-backed ACE state is authoritative:
98
+ `agent-state/TASK.md`, `agent-state/STATUS.md`, `agent-state/SCOPE.md`, and
99
+ `agent-state/EVIDENCE_LOG.md`.
100
+
101
+ Before significant work, call `recall_context`. Use `route_task` and
102
+ `get_agent_instructions` for role guidance. After meaningful edits or state
103
+ changes, call `execute_gates` and persist evidence or handoffs.
104
+ MD
105
+
106
+ cat > .github/hooks/ace-copilot.json <<'JSON'
107
+ {
108
+ "hooks": {
109
+ "SessionStart": [
110
+ {
111
+ "type": "command",
112
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs",
113
+ "windows": "node .\\\\scripts\\\\ace\\\\ace-hook-dispatch.mjs",
114
+ "timeout": 10
115
+ }
116
+ ],
117
+ "UserPromptSubmit": [
118
+ {
119
+ "type": "command",
120
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs",
121
+ "windows": "node .\\\\scripts\\\\ace\\\\ace-hook-dispatch.mjs",
122
+ "timeout": 10
123
+ }
124
+ ],
125
+ "PreToolUse": [
126
+ {
127
+ "type": "command",
128
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs",
129
+ "windows": "node .\\\\scripts\\\\ace\\\\ace-hook-dispatch.mjs",
130
+ "timeout": 10
131
+ }
132
+ ],
133
+ "PostToolUse": [
134
+ {
135
+ "type": "command",
136
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs",
137
+ "windows": "node .\\\\scripts\\\\ace\\\\ace-hook-dispatch.mjs",
138
+ "timeout": 10
139
+ }
140
+ ],
141
+ "PreCompact": [
142
+ {
143
+ "type": "command",
144
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs",
145
+ "windows": "node .\\\\scripts\\\\ace\\\\ace-hook-dispatch.mjs",
146
+ "timeout": 10
147
+ }
148
+ ],
149
+ "SubagentStart": [
150
+ {
151
+ "type": "command",
152
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs",
153
+ "windows": "node .\\\\scripts\\\\ace\\\\ace-hook-dispatch.mjs",
154
+ "timeout": 10
155
+ }
156
+ ],
157
+ "SubagentStop": [
158
+ {
159
+ "type": "command",
160
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs",
161
+ "windows": "node .\\\\scripts\\\\ace\\\\ace-hook-dispatch.mjs",
162
+ "timeout": 10
163
+ }
164
+ ],
165
+ "Stop": [
166
+ {
167
+ "type": "command",
168
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs",
169
+ "windows": "node .\\\\scripts\\\\ace\\\\ace-hook-dispatch.mjs",
170
+ "timeout": 10
171
+ }
172
+ ]
173
+ }
174
+ }
175
+ JSON
176
+
177
+ cat > .claude/settings.json <<'JSON'
178
+ {
179
+ "hooks": {
180
+ "SessionStart": [
181
+ {
182
+ "matcher": "",
183
+ "hooks": [
184
+ {
185
+ "type": "command",
186
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs"
187
+ }
188
+ ]
189
+ }
190
+ ],
191
+ "UserPromptSubmit": [
192
+ {
193
+ "matcher": "",
194
+ "hooks": [
195
+ {
196
+ "type": "command",
197
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs"
198
+ }
199
+ ]
200
+ }
201
+ ],
202
+ "PreToolUse": [
203
+ {
204
+ "matcher": "",
205
+ "hooks": [
206
+ {
207
+ "type": "command",
208
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs"
209
+ }
210
+ ]
211
+ }
212
+ ],
213
+ "PostToolUse": [
214
+ {
215
+ "matcher": "",
216
+ "hooks": [
217
+ {
218
+ "type": "command",
219
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs"
220
+ }
221
+ ]
222
+ }
223
+ ],
224
+ "PreCompact": [
225
+ {
226
+ "matcher": "",
227
+ "hooks": [
228
+ {
229
+ "type": "command",
230
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs"
231
+ }
232
+ ]
233
+ }
234
+ ],
235
+ "SubagentStart": [
236
+ {
237
+ "matcher": "",
238
+ "hooks": [
239
+ {
240
+ "type": "command",
241
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs"
242
+ }
243
+ ]
244
+ }
245
+ ],
246
+ "SubagentStop": [
247
+ {
248
+ "matcher": "",
249
+ "hooks": [
250
+ {
251
+ "type": "command",
252
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs"
253
+ }
254
+ ]
255
+ }
256
+ ],
257
+ "Stop": [
258
+ {
259
+ "matcher": "",
260
+ "hooks": [
261
+ {
262
+ "type": "command",
263
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs"
264
+ }
265
+ ]
266
+ }
267
+ ]
268
+ }
269
+ }
270
+ JSON
271
+
272
+ cat > .vscode/ace-hooks.json <<'JSON'
273
+ {
274
+ "hooks": {
275
+ "SessionStart": [
276
+ {
277
+ "type": "command",
278
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs",
279
+ "windows": "node .\\\\scripts\\\\ace\\\\ace-hook-dispatch.mjs",
280
+ "timeout": 10
281
+ }
282
+ ],
283
+ "UserPromptSubmit": [
284
+ {
285
+ "type": "command",
286
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs",
287
+ "windows": "node .\\\\scripts\\\\ace\\\\ace-hook-dispatch.mjs",
288
+ "timeout": 10
289
+ }
290
+ ],
291
+ "PreToolUse": [
292
+ {
293
+ "type": "command",
294
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs",
295
+ "windows": "node .\\\\scripts\\\\ace\\\\ace-hook-dispatch.mjs",
296
+ "timeout": 10
297
+ }
298
+ ],
299
+ "PostToolUse": [
300
+ {
301
+ "type": "command",
302
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs",
303
+ "windows": "node .\\\\scripts\\\\ace\\\\ace-hook-dispatch.mjs",
304
+ "timeout": 10
305
+ }
306
+ ],
307
+ "PreCompact": [
308
+ {
309
+ "type": "command",
310
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs",
311
+ "windows": "node .\\\\scripts\\\\ace\\\\ace-hook-dispatch.mjs",
312
+ "timeout": 10
313
+ }
314
+ ],
315
+ "SubagentStart": [
316
+ {
317
+ "type": "command",
318
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs",
319
+ "windows": "node .\\\\scripts\\\\ace\\\\ace-hook-dispatch.mjs",
320
+ "timeout": 10
321
+ }
322
+ ],
323
+ "SubagentStop": [
324
+ {
325
+ "type": "command",
326
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs",
327
+ "windows": "node .\\\\scripts\\\\ace\\\\ace-hook-dispatch.mjs",
328
+ "timeout": 10
329
+ }
330
+ ],
331
+ "Stop": [
332
+ {
333
+ "type": "command",
334
+ "command": "node ./scripts/ace/ace-hook-dispatch.mjs",
335
+ "windows": "node .\\\\scripts\\\\ace\\\\ace-hook-dispatch.mjs",
336
+ "timeout": 10
337
+ }
338
+ ]
339
+ }
340
+ }
341
+ JSON
342
+
343
+ cp .vscode/ace-hooks.json .cursor/hooks.json
344
+ cp .vscode/ace-hooks.json .mcp-config/gemini.hooks.json
345
+ cp .vscode/ace-hooks.json .mcp-config/antigravity.hooks.json
346
+
347
+ cat > .mcp-config/codex.hooks.toml <<'TOML'
348
+ # ACE lifecycle hook scaffold for Codex-compatible runtimes.
349
+ # Merge these entries into the host hook config that supports SessionStart/SubagentStart hooks.
350
+
351
+ [[hooks]]
352
+ event = "SessionStart"
353
+ command = "node ./scripts/ace/ace-hook-dispatch.mjs"
354
+
355
+ [[hooks]]
356
+ event = "UserPromptSubmit"
357
+ command = "node ./scripts/ace/ace-hook-dispatch.mjs"
358
+
359
+ [[hooks]]
360
+ event = "PreToolUse"
361
+ command = "node ./scripts/ace/ace-hook-dispatch.mjs"
362
+
363
+ [[hooks]]
364
+ event = "PostToolUse"
365
+ command = "node ./scripts/ace/ace-hook-dispatch.mjs"
366
+
367
+ [[hooks]]
368
+ event = "PreCompact"
369
+ command = "node ./scripts/ace/ace-hook-dispatch.mjs"
370
+
371
+ [[hooks]]
372
+ event = "SubagentStart"
373
+ command = "node ./scripts/ace/ace-hook-dispatch.mjs"
374
+
375
+ [[hooks]]
376
+ event = "SubagentStop"
377
+ command = "node ./scripts/ace/ace-hook-dispatch.mjs"
378
+
379
+ [[hooks]]
380
+ event = "Stop"
381
+ command = "node ./scripts/ace/ace-hook-dispatch.mjs"
382
+ TOML
383
+
384
+ echo "Wrote MCP configs, host instruction files, and ACE hook configs for codex, vscode, claude, cursor, copilot, gemini, and antigravity"
@@ -14,9 +14,35 @@ This directory contains shared execution artifacts consumed by ACE prompts, tool
14
14
  - `agent-state/job-locks.json`: collision-free scheduler locks.
15
15
  - `agent-state/scheduler-lease.json`: active scheduler lease ownership.
16
16
 
17
+ ## When To Read This Directory
18
+
19
+ - Before starting non-trivial work that needs explicit task, role, or handoff structure.
20
+ - Before issuing or consuming a `SWARM_HANDOFF`.
21
+ - When recovering blocked or deferred work through the scheduler and TODO surfaces.
22
+ - When a repeated failure should become a durable lesson or guardrail.
23
+
24
+ ## Common Workflows
25
+
26
+ 1. Start work: check `todo.md`, then use `role_tasks.md` to confirm the bounded contract for the active role.
27
+ 2. Route work: begin from `SWARM_HANDOFF.template.json`, then compare with the example payloads before publishing.
28
+ 3. Recover work: inspect `agent-state/job-queue.json`, `agent-state/job-locks.json`, and `agent-state/scheduler-lease.json` together instead of in isolation.
29
+ 4. Harden work: write repeatable failures to `lessons.md` so the same mistake does not re-enter the loop.
30
+
17
31
  ## Operating Rules
18
32
 
19
33
  1. Update `todo.md` before non-trivial work and after verification.
20
34
  2. Log every repeatable correction pattern in `lessons.md`.
21
35
  3. Use `SWARM_HANDOFF.template.json` as the base for all routing payloads.
22
36
  4. Keep acceptance criteria measurable and tied to file-based evidence.
37
+
38
+ ## Validation Rules
39
+
40
+ - Handoffs must reference real artifacts, owners, and acceptance criteria.
41
+ - Scheduler state is advisory unless it matches current task and status artifacts.
42
+ - Lessons should capture a failure pattern, a guardrail, and a verification check, not just an anecdote.
43
+
44
+ ## Common Failure Modes
45
+
46
+ - `todo.md` is stale while work has already moved; refresh it before trusting downstream routing.
47
+ - A handoff exists without evidence or acceptance criteria; treat it as incomplete, not merely “draft.”
48
+ - Scheduler files disagree with task or status truth; route the contradiction through ops instead of guessing which surface won.
@@ -0,0 +1,137 @@
1
+ export declare const ACE_TASK_CONTRACT_FILES: readonly ["agent-state/TASK.md", "agent-state/SCOPE.md", "agent-state/QUALITY_GATES.md", "agent-state/HANDOFF.json"];
2
+ export declare const ACE_DEFAULT_STATE_SOURCES: readonly ["agent-state/TASK.md", "agent-state/SCOPE.md", "agent-state/QUALITY_GATES.md", "agent-state/STATUS.md", "agent-state/HANDOFF.json", "agent-state/EVIDENCE_LOG.md"];
3
+ export declare const ACE_DEFAULT_CONTINUITY_SOURCES: readonly ["agent-state/TASK.md", "agent-state/SCOPE.md", "agent-state/QUALITY_GATES.md", "agent-state/HANDOFF.json", "agent-state/STATUS.md", "agent-state/DECISIONS.md", "agent-state/RISKS.md", "agent-state/EVIDENCE_LOG.md"];
4
+ export interface AutonomyPolicyConfig {
5
+ orchestrator_preflight?: boolean | null;
6
+ recall_context?: boolean | null;
7
+ state_sources?: string[] | null;
8
+ before_run_checks?: string[] | null;
9
+ stop_checks?: string[] | null;
10
+ review_mode?: string | null;
11
+ }
12
+ export interface NormalizedAutonomyPolicy {
13
+ orchestrator_preflight: boolean;
14
+ recall_context: boolean;
15
+ state_sources: string[];
16
+ before_run_checks: string[];
17
+ stop_checks: string[];
18
+ review_mode: string | null;
19
+ }
20
+ export interface ContinuityPolicyConfig {
21
+ enabled?: boolean | null;
22
+ source_paths?: string[] | null;
23
+ max_sources?: number | null;
24
+ max_excerpt_chars?: number | null;
25
+ max_total_chars?: number | null;
26
+ max_status_events?: number | null;
27
+ max_run_ledger_entries?: number | null;
28
+ include_snapshot?: boolean | null;
29
+ }
30
+ export interface NormalizedContinuityPolicy {
31
+ enabled: boolean;
32
+ source_paths: string[];
33
+ max_sources: number;
34
+ max_excerpt_chars: number;
35
+ max_total_chars: number;
36
+ max_status_events: number;
37
+ max_run_ledger_entries: number;
38
+ include_snapshot: boolean;
39
+ }
40
+ export interface AceFileStatus {
41
+ path: string;
42
+ present: boolean;
43
+ valid: boolean;
44
+ note: string;
45
+ }
46
+ export interface AceTaskContractAssessment {
47
+ ok: boolean;
48
+ summary: string;
49
+ missing: string[];
50
+ invalid: string[];
51
+ blockers: string[];
52
+ files: AceFileStatus[];
53
+ handoff_status?: string;
54
+ handoff_reason?: string;
55
+ }
56
+ export interface AceStateSlice {
57
+ path: string;
58
+ present: boolean;
59
+ excerpt: string;
60
+ }
61
+ export interface AceContextSnapshot {
62
+ name: string;
63
+ timestamp: string;
64
+ summary: string;
65
+ path: string;
66
+ content: string;
67
+ }
68
+ export interface AceRecallContext {
69
+ task_contract: AceTaskContractAssessment;
70
+ state_slices: AceStateSlice[];
71
+ snapshot?: AceContextSnapshot;
72
+ }
73
+ export interface AceContinuityPacketSource {
74
+ path: string;
75
+ excerpt: string;
76
+ chars: number;
77
+ }
78
+ export interface AceContinuityPacketEvent {
79
+ timestamp: string;
80
+ source_module: string;
81
+ event_type: string;
82
+ status: string;
83
+ summary: string;
84
+ }
85
+ export interface AceContinuityPacketRunEntry {
86
+ timestamp: string;
87
+ tool: string;
88
+ category: string;
89
+ message: string;
90
+ artifacts: string[];
91
+ }
92
+ export interface AceContinuityPacket {
93
+ generated_at: string;
94
+ summary: string;
95
+ highlights: string[];
96
+ task_contract_ok: boolean;
97
+ blockers: string[];
98
+ included_sources: AceContinuityPacketSource[];
99
+ missing_sources: string[];
100
+ dropped_sources: string[];
101
+ recent_status_events: AceContinuityPacketEvent[];
102
+ recent_run_ledger: AceContinuityPacketRunEntry[];
103
+ snapshot?: {
104
+ name: string;
105
+ timestamp: string;
106
+ summary: string;
107
+ path: string;
108
+ };
109
+ budget_report: {
110
+ max_sources: number;
111
+ max_excerpt_chars: number;
112
+ max_total_chars: number;
113
+ max_status_events: number;
114
+ max_run_ledger_entries: number;
115
+ used_chars: number;
116
+ };
117
+ }
118
+ export declare const DEFAULT_AUTONOMY_POLICY: NormalizedAutonomyPolicy;
119
+ export declare const DEFAULT_CONTINUITY_POLICY: NormalizedContinuityPolicy;
120
+ export declare function normalizeAutonomyPolicy(input?: AutonomyPolicyConfig | null): NormalizedAutonomyPolicy;
121
+ export declare function normalizeContinuityPolicy(input?: ContinuityPolicyConfig | null): NormalizedContinuityPolicy;
122
+ export declare function readAceTaskContractAssessment(): AceTaskContractAssessment;
123
+ export declare function readAceContextSnapshot(name?: string): AceContextSnapshot | undefined;
124
+ export declare function buildAceRecallContext(input?: {
125
+ state_sources?: readonly string[];
126
+ snapshot_name?: string;
127
+ excerpt_chars?: number;
128
+ }): AceRecallContext;
129
+ export declare function buildAceContinuityPacket(input?: {
130
+ state_sources?: readonly string[];
131
+ snapshot_name?: string;
132
+ policy?: ContinuityPolicyConfig | NormalizedContinuityPolicy | null;
133
+ }): AceContinuityPacket;
134
+ export declare function formatAceRecallMarkdown(recall: AceRecallContext): string;
135
+ export declare function formatAceContinuityPacketMarkdown(packet: AceContinuityPacket): string;
136
+ export declare function buildAutonomyHookEnv(policy: NormalizedAutonomyPolicy, continuity?: NormalizedContinuityPolicy): Record<string, string>;
137
+ //# sourceMappingURL=ace-autonomy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ace-autonomy.d.ts","sourceRoot":"","sources":["../src/ace-autonomy.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,uBAAuB,sHAK1B,CAAC;AAEX,eAAO,MAAM,yBAAyB,8KAO5B,CAAC;AAEX,eAAO,MAAM,8BAA8B,kOASjC,CAAC;AAEX,MAAM,WAAW,oBAAoB;IACnC,sBAAsB,CAAC,EAAE,OAAO,GAAG,IAAI,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