aura-code 0.5.0 → 0.10.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 (294) hide show
  1. package/README.md +47 -164
  2. package/dist/agent/affect.d.ts +13 -0
  3. package/dist/agent/affect.js +34 -0
  4. package/dist/agent/affect.js.map +1 -0
  5. package/dist/agent/compactor.d.ts +27 -4
  6. package/dist/agent/compactor.js +185 -54
  7. package/dist/agent/compactor.js.map +1 -1
  8. package/dist/agent/confess.d.ts +35 -0
  9. package/dist/agent/confess.js +296 -0
  10. package/dist/agent/confess.js.map +1 -0
  11. package/dist/agent/domain-expertise.d.ts +22 -0
  12. package/dist/agent/domain-expertise.js +110 -0
  13. package/dist/agent/domain-expertise.js.map +1 -0
  14. package/dist/agent/executive-queue.d.ts +26 -0
  15. package/dist/agent/executive-queue.js +50 -0
  16. package/dist/agent/executive-queue.js.map +1 -0
  17. package/dist/agent/generational-flush.d.ts +28 -0
  18. package/dist/agent/generational-flush.js +48 -0
  19. package/dist/agent/generational-flush.js.map +1 -0
  20. package/dist/agent/loop-profile.d.ts +50 -0
  21. package/dist/agent/loop-profile.js +88 -0
  22. package/dist/agent/loop-profile.js.map +1 -0
  23. package/dist/agent/loop.d.ts +14 -5
  24. package/dist/agent/loop.js +167 -23
  25. package/dist/agent/loop.js.map +1 -1
  26. package/dist/agent/memory-consolidate.d.ts +14 -0
  27. package/dist/agent/memory-consolidate.js +141 -0
  28. package/dist/agent/memory-consolidate.js.map +1 -0
  29. package/dist/agent/mixture.d.ts +33 -0
  30. package/dist/agent/mixture.js +138 -0
  31. package/dist/agent/mixture.js.map +1 -0
  32. package/dist/agent/spawner.js +2 -2
  33. package/dist/agent/spawner.js.map +1 -1
  34. package/dist/agent/system-prompt.d.ts +1 -1
  35. package/dist/agent/system-prompt.js +49 -13
  36. package/dist/agent/system-prompt.js.map +1 -1
  37. package/dist/agent/unified-memory.d.ts +15 -0
  38. package/dist/agent/unified-memory.js +164 -0
  39. package/dist/agent/unified-memory.js.map +1 -0
  40. package/dist/checkpoints/engine.d.ts +44 -0
  41. package/dist/checkpoints/engine.js +324 -0
  42. package/dist/checkpoints/engine.js.map +1 -0
  43. package/dist/cli/command-palette.d.ts +26 -0
  44. package/dist/cli/command-palette.js +133 -0
  45. package/dist/cli/command-palette.js.map +1 -0
  46. package/dist/cli/context-health.d.ts +51 -0
  47. package/dist/cli/context-health.js +187 -0
  48. package/dist/cli/context-health.js.map +1 -0
  49. package/dist/cli/diamond.d.ts +67 -0
  50. package/dist/cli/diamond.js +222 -12
  51. package/dist/cli/diamond.js.map +1 -1
  52. package/dist/cli/dic.d.ts +2 -0
  53. package/dist/cli/dic.js +106 -0
  54. package/dist/cli/dic.js.map +1 -0
  55. package/dist/cli/diff-view.d.ts +18 -0
  56. package/dist/cli/diff-view.js +114 -0
  57. package/dist/cli/diff-view.js.map +1 -0
  58. package/dist/cli/display.d.ts +18 -4
  59. package/dist/cli/display.js +74 -146
  60. package/dist/cli/display.js.map +1 -1
  61. package/dist/cli/help-data.d.ts +7 -0
  62. package/dist/cli/help-data.js +80 -0
  63. package/dist/cli/help-data.js.map +1 -0
  64. package/dist/cli/index.js +1001 -788
  65. package/dist/cli/index.js.map +1 -1
  66. package/dist/cli/markdown.d.ts +5 -0
  67. package/dist/cli/markdown.js +128 -0
  68. package/dist/cli/markdown.js.map +1 -0
  69. package/dist/cli/model-select.d.ts +39 -0
  70. package/dist/cli/model-select.js +65 -0
  71. package/dist/cli/model-select.js.map +1 -0
  72. package/dist/cli/tui.d.ts +34 -0
  73. package/dist/cli/tui.js +1176 -0
  74. package/dist/cli/tui.js.map +1 -0
  75. package/dist/config/defaults.d.ts +6 -17
  76. package/dist/config/defaults.js +25 -39
  77. package/dist/config/defaults.js.map +1 -1
  78. package/dist/config/project-config.d.ts +2 -6
  79. package/dist/config/project-config.js +2 -2
  80. package/dist/config/project-config.js.map +1 -1
  81. package/dist/doctor/checks.d.ts +18 -0
  82. package/dist/doctor/checks.js +524 -0
  83. package/dist/doctor/checks.js.map +1 -0
  84. package/dist/doctor/index.d.ts +4 -0
  85. package/dist/doctor/index.js +229 -0
  86. package/dist/doctor/index.js.map +1 -0
  87. package/dist/doctor/repair.d.ts +19 -0
  88. package/dist/doctor/repair.js +126 -0
  89. package/dist/doctor/repair.js.map +1 -0
  90. package/dist/doctor/types.d.ts +38 -0
  91. package/dist/doctor/types.js +10 -0
  92. package/dist/doctor/types.js.map +1 -0
  93. package/dist/dream/dream.d.ts +79 -36
  94. package/dist/dream/dream.js +327 -117
  95. package/dist/dream/dream.js.map +1 -1
  96. package/dist/dream/episode.d.ts +17 -0
  97. package/dist/dream/episode.js +116 -0
  98. package/dist/dream/episode.js.map +1 -0
  99. package/dist/dream/okf.d.ts +10 -0
  100. package/dist/dream/okf.js +280 -0
  101. package/dist/dream/okf.js.map +1 -0
  102. package/dist/dream/parser.d.ts +60 -0
  103. package/dist/dream/parser.js +176 -0
  104. package/dist/dream/parser.js.map +1 -0
  105. package/dist/dream/reconcile.d.ts +69 -0
  106. package/dist/dream/reconcile.js +303 -0
  107. package/dist/dream/reconcile.js.map +1 -0
  108. package/dist/kanban/engine.d.ts +26 -0
  109. package/dist/kanban/engine.js +208 -0
  110. package/dist/kanban/engine.js.map +1 -0
  111. package/dist/kanban/types.d.ts +19 -0
  112. package/dist/kanban/types.js +9 -1
  113. package/dist/kanban/types.js.map +1 -1
  114. package/dist/machina/index.d.ts +16 -0
  115. package/dist/machina/index.js +61 -0
  116. package/dist/machina/index.js.map +1 -0
  117. package/dist/machina/render-html.d.ts +2 -0
  118. package/dist/machina/render-html.js +191 -0
  119. package/dist/machina/render-html.js.map +1 -0
  120. package/dist/machina/render-terminal.d.ts +2 -0
  121. package/dist/machina/render-terminal.js +99 -0
  122. package/dist/machina/render-terminal.js.map +1 -0
  123. package/dist/machina/repair.d.ts +23 -0
  124. package/dist/machina/repair.js +98 -0
  125. package/dist/machina/repair.js.map +1 -0
  126. package/dist/machina/spec.d.ts +61 -0
  127. package/dist/machina/spec.js +124 -0
  128. package/dist/machina/spec.js.map +1 -0
  129. package/dist/machina/verify.d.ts +39 -0
  130. package/dist/machina/verify.js +95 -0
  131. package/dist/machina/verify.js.map +1 -0
  132. package/dist/mining/extract.d.ts +34 -0
  133. package/dist/mining/extract.js +229 -0
  134. package/dist/mining/extract.js.map +1 -0
  135. package/dist/mining/refine.d.ts +28 -0
  136. package/dist/mining/refine.js +256 -0
  137. package/dist/mining/refine.js.map +1 -0
  138. package/dist/perception/extractor.js +5 -3
  139. package/dist/perception/extractor.js.map +1 -1
  140. package/dist/perception/graph-store.d.ts +0 -11
  141. package/dist/perception/graph-store.js +0 -33
  142. package/dist/perception/graph-store.js.map +1 -1
  143. package/dist/perception/index.d.ts +1 -1
  144. package/dist/perception/index.js +1 -2
  145. package/dist/perception/index.js.map +1 -1
  146. package/dist/plugins/commands.d.ts +38 -0
  147. package/dist/plugins/commands.js +134 -0
  148. package/dist/plugins/commands.js.map +1 -0
  149. package/dist/plugins/frontmatter.d.ts +14 -0
  150. package/dist/plugins/frontmatter.js +78 -0
  151. package/dist/plugins/frontmatter.js.map +1 -0
  152. package/dist/plugins/hooks.d.ts +12 -0
  153. package/dist/plugins/hooks.js +148 -0
  154. package/dist/plugins/hooks.js.map +1 -0
  155. package/dist/plugins/loader.d.ts +7 -0
  156. package/dist/plugins/loader.js +255 -0
  157. package/dist/plugins/loader.js.map +1 -0
  158. package/dist/plugins/market.d.ts +23 -0
  159. package/dist/plugins/market.js +281 -0
  160. package/dist/plugins/market.js.map +1 -0
  161. package/dist/plugins/types.d.ts +90 -0
  162. package/dist/plugins/types.js +20 -0
  163. package/dist/plugins/types.js.map +1 -0
  164. package/dist/providers/anthropic-oauth-draft.d.ts +119 -0
  165. package/dist/providers/anthropic-oauth-draft.js +414 -0
  166. package/dist/providers/anthropic-oauth-draft.js.map +1 -0
  167. package/dist/providers/anthropic.d.ts +4 -1
  168. package/dist/providers/anthropic.js +34 -6
  169. package/dist/providers/anthropic.js.map +1 -1
  170. package/dist/providers/factory.d.ts +71 -14
  171. package/dist/providers/factory.js +205 -124
  172. package/dist/providers/factory.js.map +1 -1
  173. package/dist/providers/google.js +8 -21
  174. package/dist/providers/google.js.map +1 -1
  175. package/dist/providers/live-models.d.ts +23 -0
  176. package/dist/providers/live-models.js +145 -0
  177. package/dist/providers/live-models.js.map +1 -0
  178. package/dist/providers/openai-compatible.d.ts +1 -12
  179. package/dist/providers/openai-compatible.js +71 -108
  180. package/dist/providers/openai-compatible.js.map +1 -1
  181. package/dist/providers/resilient-factory.js +1 -1
  182. package/dist/providers/resilient-factory.js.map +1 -1
  183. package/dist/rem/graph.d.ts +72 -0
  184. package/dist/rem/graph.js +139 -0
  185. package/dist/rem/graph.js.map +1 -0
  186. package/dist/rem/index.d.ts +16 -0
  187. package/dist/rem/index.js +60 -0
  188. package/dist/rem/index.js.map +1 -0
  189. package/dist/rem/render-html.d.ts +2 -0
  190. package/dist/rem/render-html.js +189 -0
  191. package/dist/rem/render-html.js.map +1 -0
  192. package/dist/rem/render-terminal.d.ts +4 -0
  193. package/dist/rem/render-terminal.js +94 -0
  194. package/dist/rem/render-terminal.js.map +1 -0
  195. package/dist/repl/queue.d.ts +22 -0
  196. package/dist/repl/queue.js +165 -0
  197. package/dist/repl/queue.js.map +1 -0
  198. package/dist/repl/side-channel.d.ts +23 -0
  199. package/dist/repl/side-channel.js +63 -0
  200. package/dist/repl/side-channel.js.map +1 -0
  201. package/dist/research/council.d.ts +5 -2
  202. package/dist/research/council.js +73 -10
  203. package/dist/research/council.js.map +1 -1
  204. package/dist/ruby/alternator.d.ts +11 -30
  205. package/dist/ruby/alternator.js +59 -38
  206. package/dist/ruby/alternator.js.map +1 -1
  207. package/dist/ruby/episode-capture.d.ts +0 -10
  208. package/dist/ruby/episode-capture.js +0 -33
  209. package/dist/ruby/episode-capture.js.map +1 -1
  210. package/dist/ruby/types.js +1 -1
  211. package/dist/ruby/types.js.map +1 -1
  212. package/dist/safety/path-jail.d.ts +17 -0
  213. package/dist/safety/path-jail.js +100 -0
  214. package/dist/safety/path-jail.js.map +1 -0
  215. package/dist/safety/permissions.d.ts +12 -21
  216. package/dist/safety/permissions.js +81 -216
  217. package/dist/safety/permissions.js.map +1 -1
  218. package/dist/safety/ssrf.d.ts +29 -0
  219. package/dist/safety/ssrf.js +185 -0
  220. package/dist/safety/ssrf.js.map +1 -0
  221. package/dist/server/index.js +64 -10
  222. package/dist/server/index.js.map +1 -1
  223. package/dist/setup/first-run.d.ts +0 -24
  224. package/dist/setup/first-run.js +10 -344
  225. package/dist/setup/first-run.js.map +1 -1
  226. package/dist/setup/key-store.d.ts +12 -0
  227. package/dist/setup/key-store.js +108 -0
  228. package/dist/setup/key-store.js.map +1 -0
  229. package/dist/setup/provider-registry.js +31 -18
  230. package/dist/setup/provider-registry.js.map +1 -1
  231. package/dist/setup/provider-test.d.ts +7 -0
  232. package/dist/setup/provider-test.js +73 -10
  233. package/dist/setup/provider-test.js.map +1 -1
  234. package/dist/setup/provider-wizard.d.ts +4 -1
  235. package/dist/setup/provider-wizard.js +92 -26
  236. package/dist/setup/provider-wizard.js.map +1 -1
  237. package/dist/setup/xiaomi.d.ts +1 -1
  238. package/dist/setup/xiaomi.js +3 -3
  239. package/dist/setup/xiaomi.js.map +1 -1
  240. package/dist/tools/browser.js +6 -4
  241. package/dist/tools/browser.js.map +1 -1
  242. package/dist/tools/clipboard.js +7 -1
  243. package/dist/tools/clipboard.js.map +1 -1
  244. package/dist/tools/dictate.d.ts +60 -0
  245. package/dist/tools/dictate.js +983 -0
  246. package/dist/tools/dictate.js.map +1 -0
  247. package/dist/tools/dictate_patched.js +1057 -0
  248. package/dist/tools/edit-file.js +10 -2
  249. package/dist/tools/edit-file.js.map +1 -1
  250. package/dist/tools/gmail-tool.d.ts +5 -1
  251. package/dist/tools/gmail-tool.js +151 -11
  252. package/dist/tools/gmail-tool.js.map +1 -1
  253. package/dist/tools/http-request.js +14 -4
  254. package/dist/tools/http-request.js.map +1 -1
  255. package/dist/tools/image-read.js +34 -2
  256. package/dist/tools/image-read.js.map +1 -1
  257. package/dist/tools/index.d.ts +16 -1
  258. package/dist/tools/index.js +59 -8
  259. package/dist/tools/index.js.map +1 -1
  260. package/dist/tools/mcp.js +12 -0
  261. package/dist/tools/mcp.js.map +1 -1
  262. package/dist/tools/read-file.js +10 -14
  263. package/dist/tools/read-file.js.map +1 -1
  264. package/dist/tools/telegram-audio-policy.d.ts +30 -0
  265. package/dist/tools/telegram-audio-policy.js +49 -0
  266. package/dist/tools/telegram-audio-policy.js.map +1 -0
  267. package/dist/tools/telegram-bot.js +1136 -539
  268. package/dist/tools/telegram-bot.js.map +1 -1
  269. package/dist/tools/telegram-voice.d.ts +18 -5
  270. package/dist/tools/telegram-voice.js +54 -12
  271. package/dist/tools/telegram-voice.js.map +1 -1
  272. package/dist/tools/telegram.d.ts +3 -3
  273. package/dist/tools/telegram.js +5 -84
  274. package/dist/tools/telegram.js.map +1 -1
  275. package/dist/tools/tools.d.ts +2 -14
  276. package/dist/tools/tools.js +79 -144
  277. package/dist/tools/tools.js.map +1 -1
  278. package/dist/tools/web-fetch.js +39 -7
  279. package/dist/tools/web-fetch.js.map +1 -1
  280. package/dist/tools/web-search.js +2 -3
  281. package/dist/tools/web-search.js.map +1 -1
  282. package/dist/util/errors.js +1 -15
  283. package/dist/util/errors.js.map +1 -1
  284. package/dist/util/json-repair.d.ts +11 -0
  285. package/dist/util/json-repair.js +31 -0
  286. package/dist/util/json-repair.js.map +1 -0
  287. package/dist/util/rate-limiter.js +2 -8
  288. package/dist/util/rate-limiter.js.map +1 -1
  289. package/dist/viz/index.js +793 -792
  290. package/dist/viz/index.js.map +1 -1
  291. package/dist/viz/reader.d.ts +33 -0
  292. package/dist/viz/reader.js +343 -0
  293. package/dist/viz/reader.js.map +1 -0
  294. package/package.json +13 -32
@@ -1,6 +1,14 @@
1
1
  "use strict";
2
2
  // ─────────────────────────────────────────────────────────────────────────────
3
- // Kanban Board Pipeline Types
3
+ // Kanban Board Types (merged: local board types + remote pipeline types)
4
4
  // ─────────────────────────────────────────────────────────────────────────────
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PRIORITY_ORDER = exports.DEFAULT_COLUMNS = void 0;
7
+ exports.DEFAULT_COLUMNS = ['backlog', 'todo', 'in-progress', 'review', 'done'];
8
+ exports.PRIORITY_ORDER = {
9
+ critical: 4,
10
+ high: 3,
11
+ medium: 2,
12
+ low: 1,
13
+ };
6
14
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/kanban/types.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,8BAA8B;AAC9B,gFAAgF"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/kanban/types.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yEAAyE;AACzE,gFAAgF;;;AAyBnE,QAAA,eAAe,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAC;AAEhF,QAAA,cAAc,GAAiC;IAC1D,QAAQ,EAAE,CAAC;IACX,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;CACP,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { type VerificationReport } from './verify.js';
2
+ export interface MachinaRunResult {
3
+ report: VerificationReport;
4
+ terminalOutput: string;
5
+ htmlPath?: string;
6
+ }
7
+ /**
8
+ * Run `:machina` — verify the AAM's structural claims against aura-code's
9
+ * own source tree (not the user's current project — see resolveAuraRepoRoot)
10
+ * and render the result. If `writeHtml` is true, also write a standalone
11
+ * `docs/machina.html` to the user's current project root for easy sharing.
12
+ */
13
+ export declare function runMachina(opts: {
14
+ outputRoot: string;
15
+ writeHtml?: boolean;
16
+ }): MachinaRunResult;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.runMachina = runMachina;
37
+ const fs = __importStar(require("fs"));
38
+ const path = __importStar(require("path"));
39
+ const verify_js_1 = require("./verify.js");
40
+ const render_terminal_js_1 = require("./render-terminal.js");
41
+ const render_html_js_1 = require("./render-html.js");
42
+ /**
43
+ * Run `:machina` — verify the AAM's structural claims against aura-code's
44
+ * own source tree (not the user's current project — see resolveAuraRepoRoot)
45
+ * and render the result. If `writeHtml` is true, also write a standalone
46
+ * `docs/machina.html` to the user's current project root for easy sharing.
47
+ */
48
+ function runMachina(opts) {
49
+ const repoRoot = (0, verify_js_1.resolveAuraRepoRoot)();
50
+ const report = (0, verify_js_1.verifyAamClaims)(repoRoot);
51
+ const terminalOutput = (0, render_terminal_js_1.renderMachinaTerminal)(report);
52
+ if (!opts.writeHtml) {
53
+ return { report, terminalOutput };
54
+ }
55
+ const dir = path.join(opts.outputRoot, 'docs');
56
+ fs.mkdirSync(dir, { recursive: true });
57
+ const htmlPath = path.join(dir, 'machina.html');
58
+ fs.writeFileSync(htmlPath, (0, render_html_js_1.wrapMachinaHtml)(report));
59
+ return { report, terminalOutput, htmlPath };
60
+ }
61
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/machina/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,gCAeC;AAjCD,uCAAyB;AACzB,2CAA6B;AAC7B,2CAA4F;AAC5F,6DAA6D;AAC7D,qDAAmD;AAQnD;;;;;GAKG;AACH,SAAgB,UAAU,CAAC,IAAiD;IAC1E,MAAM,QAAQ,GAAG,IAAA,+BAAmB,GAAE,CAAC;IACvC,MAAM,MAAM,GAAG,IAAA,2BAAe,EAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,cAAc,GAAG,IAAA,0CAAqB,EAAC,MAAM,CAAC,CAAC;IAErD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;QACpB,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;IACpC,CAAC;IAED,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAC/C,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;IAChD,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAA,gCAAe,EAAC,MAAM,CAAC,CAAC,CAAC;IAEpD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { VerificationReport } from './verify.js';
2
+ export declare function wrapMachinaHtml(report: VerificationReport): string;
@@ -0,0 +1,191 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.wrapMachinaHtml = wrapMachinaHtml;
4
+ const spec_js_1 = require("./spec.js");
5
+ function esc(s) {
6
+ return s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
7
+ }
8
+ const COMPONENT_LABEL = {
9
+ S: 'S — state space',
10
+ P: 'P — primitives',
11
+ O: 'O — oracle',
12
+ delta: 'δ — transition',
13
+ s0: 's₀ — initial state',
14
+ limit: 'limit / invariant',
15
+ };
16
+ /**
17
+ * A static SVG of the AAM tuple: s₀ feeding the loop, δ consulting O each
18
+ * iteration, gated by the safety check, looping back into S, with the
19
+ * compaction/maxTurns limits drawn as a boundary around the whole loop.
20
+ * Deliberately diagrammatic rather than data-driven (there is exactly one
21
+ * AAM, not a variable-size collection like the :rem graph) — fixed layout,
22
+ * no dependency on claim count.
23
+ */
24
+ function buildTupleSvg() {
25
+ return `<svg viewBox="0 0 760 360" xmlns="http://www.w3.org/2000/svg" class="machina-graph">
26
+ <rect x="40" y="30" width="680" height="260" rx="16" class="bound-box" />
27
+ <text x="60" y="58" class="bound-label">finite machine — maxTurns, context compaction</text>
28
+
29
+ <circle cx="140" cy="180" r="46" class="node s0-node" />
30
+ <text x="140" y="175" class="node-label" text-anchor="middle">s₀</text>
31
+ <text x="140" y="193" class="node-sub" text-anchor="middle">task + ∅</text>
32
+
33
+ <circle cx="330" cy="180" r="50" class="node delta-node" />
34
+ <text x="330" y="174" class="node-label" text-anchor="middle">δ</text>
35
+ <text x="330" y="192" class="node-sub" text-anchor="middle">transition</text>
36
+
37
+ <circle cx="540" cy="100" r="42" class="node oracle-node" />
38
+ <text x="540" y="95" class="node-label" text-anchor="middle">O</text>
39
+ <text x="540" y="113" class="node-sub" text-anchor="middle">oracle</text>
40
+
41
+ <circle cx="540" cy="260" r="38" class="node safety-node" />
42
+ <text x="540" y="256" class="node-label" text-anchor="middle">safety</text>
43
+ <text x="540" y="272" class="node-sub" text-anchor="middle">gate</text>
44
+
45
+ <line x1="186" y1="180" x2="280" y2="180" class="edge edge-start" marker-end="url(#arrow)" />
46
+ <line x1="372" y1="160" x2="498" y2="110" class="edge edge-oracle" marker-end="url(#arrow)" />
47
+ <line x1="500" y1="130" x2="378" y2="172" class="edge edge-oracle-back" marker-end="url(#arrow)" />
48
+ <line x1="375" y1="195" x2="502" y2="245" class="edge edge-safety" marker-end="url(#arrow)" />
49
+ <line x1="505" y1="230" x2="378" y2="190" class="edge edge-safety-back" marker-end="url(#arrow)" />
50
+ <path d="M 330 230 C 330 290, 220 290, 175 215" class="edge edge-loop" marker-end="url(#arrow)" fill="none" />
51
+ <text x="250" y="305" class="loop-label">loop: s′ → s, until done or T_max</text>
52
+
53
+ <defs>
54
+ <marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto">
55
+ <path d="M0,0 L8,4 L0,8 z" class="arrow-head" />
56
+ </marker>
57
+ </defs>
58
+ </svg>`;
59
+ }
60
+ function buildClaimsTable(report) {
61
+ const rows = report.results.map(r => {
62
+ const ok = r.status === 'verified';
63
+ const cls = ok ? 'ok' : (r.status === 'drifted' ? 'drift' : 'missing');
64
+ const glyph = ok ? '✓' : (r.status === 'drifted' ? '⚠' : '✗');
65
+ return `<tr class="${cls}">
66
+ <td class="glyph">${glyph}</td>
67
+ <td class="comp">${esc(COMPONENT_LABEL[r.component])}</td>
68
+ <td class="loc"><code>${esc(r.file)}:${r.line}${r.status === 'drifted' && r.foundLine ? ` → :${r.foundLine}` : ''}</code></td>
69
+ <td class="desc">${esc(r.description)}</td>
70
+ </tr>`;
71
+ }).join('\n');
72
+ return `<table class="claims-table">
73
+ <thead><tr><th></th><th>Component</th><th>Location</th><th>What's grounded there</th></tr></thead>
74
+ <tbody>${rows}</tbody>
75
+ </table>`;
76
+ }
77
+ function wrapMachinaHtml(report) {
78
+ const allOk = report.drifted.length === 0 && report.missing.length === 0;
79
+ const statusLine = allOk
80
+ ? `All ${report.verifiedCount} structural claims verified against the current source.`
81
+ : report.missing.length === 0
82
+ ? `All ${report.results.length} claims hold — ${report.drifted.length} stale anchor(s), content verified (run npm run repair-anchors).`
83
+ : `${report.verifiedCount + report.drifted.length}/${report.results.length} claims hold — ${report.missing.length} missing, ${report.drifted.length} drifted anchors.`;
84
+ return `<!DOCTYPE html>
85
+ <html lang="en">
86
+ <head>
87
+ <meta charset="UTF-8">
88
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
89
+ <title>Machina — the Abstract Agent Machine</title>
90
+ <style>
91
+ :root {
92
+ --bg: #fdf6f0; --card: #fffaf5; --text: #3e2f24; --muted: #8a7768;
93
+ --accent: #cc785c; --accent-2: #5a9e6e; --accent-3: #9e6ecc; --border: #e8d5c8;
94
+ --code-bg: #f4ede6; --hr: #e0cebc; --warn: #b15439;
95
+ --shadow: 0 2px 12px rgba(62,47,36,0.06); --radius: 12px;
96
+ --serif: 'Georgia', 'Times New Roman', serif;
97
+ --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
98
+ --mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
99
+ }
100
+ @media (prefers-color-scheme: dark) {
101
+ :root {
102
+ --bg: #1e1b18; --card: #26221e; --text: #ede0cc; --muted: #9e8e80;
103
+ --accent: #e08a6e; --accent-2: #6db880; --accent-3: #b48ee0; --border: #3a322a;
104
+ --code-bg: #2c2722; --hr: #3a322a; --warn: #e0876e;
105
+ --shadow: 0 2px 12px rgba(0,0,0,0.25);
106
+ }
107
+ }
108
+ * { box-sizing: border-box; margin: 0; padding: 0; }
109
+ body { background: var(--bg); color: var(--text); font-family: var(--serif); line-height: 1.75; font-size: 18px; }
110
+ .container { max-width: 860px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
111
+ .hero { text-align: center; padding: 2.5rem 0 2rem; border-bottom: 2px solid var(--border); margin-bottom: 2.5rem; }
112
+ .hero .badge { display: inline-block; background: var(--accent-3); color: #fff; font-family: var(--sans); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.3em 1em; border-radius: 100px; margin-bottom: 1.25rem; }
113
+ .hero h1 { font-family: var(--sans); font-size: 2.2rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
114
+ .hero .meta { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); }
115
+ .card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2.25rem 2.75rem; margin-bottom: 2rem; }
116
+ @media (max-width: 700px) { .card { padding: 1.25rem; border-radius: 8px; } .hero h1 { font-size: 1.6rem; } .container { padding: 1.5rem 0.75rem 3rem; } }
117
+ .card h2 { font-family: var(--sans); font-size: 1.3rem; color: var(--accent); border-bottom: 2px solid var(--border); padding-bottom: 0.5rem; margin-bottom: 1.25rem; }
118
+ .tuple { font-family: var(--mono); font-size: 1.3rem; text-align: center; color: var(--accent-3); margin: 1rem 0 1.5rem; }
119
+ .tuple-defs { font-family: var(--sans); font-size: 0.95rem; }
120
+ .tuple-defs dt { font-weight: 700; color: var(--accent); float: left; width: 2.4rem; }
121
+ .tuple-defs dd { margin: 0 0 0.75rem 2.4rem; color: var(--text); }
122
+ .machina-graph { width: 100%; height: auto; display: block; margin: 1rem 0; }
123
+ .bound-box { fill: none; stroke: var(--border); stroke-width: 2; stroke-dasharray: 6 5; }
124
+ .bound-label { font-family: var(--sans); font-size: 11px; fill: var(--muted); }
125
+ .node { stroke-width: 2; fill: var(--card); }
126
+ .s0-node { stroke: var(--accent-2); }
127
+ .delta-node { stroke: var(--accent); }
128
+ .oracle-node { stroke: var(--accent-3); }
129
+ .safety-node { stroke: var(--warn); }
130
+ .node-label { font-family: var(--sans); font-size: 16px; font-weight: 700; fill: var(--text); }
131
+ .node-sub { font-family: var(--sans); font-size: 10px; fill: var(--muted); }
132
+ .edge { stroke: var(--muted); stroke-width: 1.6; opacity: 0.7; }
133
+ .edge-loop { stroke: var(--accent); stroke-width: 2; }
134
+ .arrow-head { fill: var(--muted); }
135
+ .loop-label { font-family: var(--sans); font-size: 11px; fill: var(--muted); }
136
+ p.prose { font-family: var(--sans); font-size: 1rem; color: var(--text); margin-bottom: 0.75rem; }
137
+ .claims-table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.88rem; }
138
+ .claims-table th { text-align: left; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.5rem 0.6rem; border-bottom: 2px solid var(--border); }
139
+ .claims-table td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--hr); vertical-align: top; }
140
+ .claims-table .glyph { width: 1.5rem; text-align: center; }
141
+ .claims-table tr.ok .glyph { color: var(--accent-2); }
142
+ .claims-table tr.drift .glyph, .claims-table tr.missing .glyph { color: var(--warn); }
143
+ .claims-table code { font-family: var(--mono); font-size: 0.82em; background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
144
+ .status-line { font-family: var(--sans); font-weight: 600; padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1.25rem; }
145
+ .status-line.ok { background: color-mix(in srgb, var(--accent-2) 15%, transparent); color: var(--accent-2); }
146
+ .status-line.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
147
+ .footer { text-align: center; margin-top: 1rem; font-family: var(--sans); font-size: 0.8rem; color: var(--muted); opacity: 0.7; }
148
+ </style>
149
+ </head>
150
+ <body>
151
+ <div class="container">
152
+ <header class="hero">
153
+ <div class="badge">Aura &middot; Machina</div>
154
+ <h1>The Abstract Agent Machine</h1>
155
+ <div class="meta">A formal model of what aura-code is, independent of which oracle is plugged in</div>
156
+ </header>
157
+
158
+ <section class="card">
159
+ <p class="prose">${esc(spec_js_1.AAM_PREAMBLE)}</p>
160
+ <div class="tuple">AAM = (S, P, O, δ, s₀)</div>
161
+ <dl class="tuple-defs">
162
+ <dt>S</dt><dd>State space — conversation history plus loop counters. Every run lives inside S.</dd>
163
+ <dt>P</dt><dd>Primitives — the finite, fixed set of tool calls the machine can invoke. Finite and enumerable.</dd>
164
+ <dt>O</dt><dd>The oracle — the only swappable part of the tuple. LLM, human, rule table, or another AAM run recursively. Swapping O leaves S, P, δ, s₀ unchanged.</dd>
165
+ <dt>δ</dt><dd>Transition function — δ(s, O(s)) → s′: consult the oracle, run its output through the safety gate, execute tool calls against P, fold results into history.</dd>
166
+ <dt>s₀</dt><dd>Initial state — empty history plus the user's task as the first message.</dd>
167
+ </dl>
168
+ </section>
169
+
170
+ <section class="card">
171
+ <h2>The loop, diagrammed</h2>
172
+ ${buildTupleSvg()}
173
+ </section>
174
+
175
+ <section class="card">
176
+ <h2>Grounding — verified against the live source</h2>
177
+ <div class="status-line ${allOk ? 'ok' : 'warn'}">${esc(statusLine)}</div>
178
+ ${buildClaimsTable(report)}
179
+ </section>
180
+
181
+ <section class="card">
182
+ <h2>Why "unlimited" has a price</h2>
183
+ <p class="prose">${esc(spec_js_1.AAM_LIMITS_NOTE)}</p>
184
+ </section>
185
+
186
+ <footer class="footer"><p>Generated by Aura Code &middot; :machina &middot; claims verified against the checked-out source tree</p></footer>
187
+ </div>
188
+ </body>
189
+ </html>`;
190
+ }
191
+ //# sourceMappingURL=render-html.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-html.js","sourceRoot":"","sources":["../../src/machina/render-html.ts"],"names":[],"mappings":";;AAgFA,0CAkHC;AAlMD,uCAA0D;AAG1D,SAAS,GAAG,CAAC,CAAS;IACpB,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CA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AC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO;;aAEI,IAAI;WACN,CAAC;AACZ,CAAC;AAED,SAAgB,eAAe,CAAC,MAA0B;IACxD,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC;IACzE,MAAM,UAAU,GAAG,KAAK;QACtB,CAAC,CAAC,OAAO,MAAM,CAAC,aAAa,yDAAyD;QACtF,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC;YAC3B,CAAC,CAAC,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,kBAAkB,MAAM,CAAC,OAAO,CAAC,MAAM,kEAAkE;YACvI,CAAC,CAAC,GAAG,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,kBAAkB,MAAM,CAAC,OAAO,CAAC,MAAM,aAAa,MAAM,CAAC,OAAO,CAAC,MAAM,mBAAmB,CAAC;IAE3K,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA2Ec,GAAG,CAAC,sBAAY,CAAC;;;;;;;;;;;;;MAalC,aAAa,EAAE;;;;;8BAKS,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,KAAK,GAAG,CAAC,UAAU,CAAC;MACjE,gBAAgB,CAAC,MAAM,CAAC;;;;;uBAKP,GAAG,CAAC,yBAAe,CAAC;;;;;;QAMnC,CAAC;AACT,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { VerificationReport } from './verify.js';
2
+ export declare function renderMachinaTerminal(report: VerificationReport): string;
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.renderMachinaTerminal = renderMachinaTerminal;
7
+ const chalk_1 = __importDefault(require("chalk"));
8
+ const spec_js_1 = require("./spec.js");
9
+ const C = {
10
+ heading: chalk_1.default.hex('#cc785c').bold,
11
+ text: chalk_1.default.hex('#ede0cc'),
12
+ muted: chalk_1.default.hex('#8a7768'),
13
+ dim: chalk_1.default.hex('#4e3d30'),
14
+ good: chalk_1.default.hex('#5a9e6e'),
15
+ warn: chalk_1.default.hex('#b15439'),
16
+ math: chalk_1.default.hex('#9e6ecc'),
17
+ };
18
+ const COMPONENT_LABEL = {
19
+ S: 'S (state space)',
20
+ P: 'P (primitives)',
21
+ O: 'O (oracle)',
22
+ delta: 'δ (transition fn)',
23
+ s0: 's₀ (initial state)',
24
+ limit: 'limit / invariant',
25
+ };
26
+ function statusGlyph(status) {
27
+ if (status === 'verified')
28
+ return C.good('✓');
29
+ if (status === 'drifted')
30
+ return C.warn('⚠');
31
+ return C.warn('✗');
32
+ }
33
+ function renderMachinaTerminal(report) {
34
+ const lines = [];
35
+ lines.push('');
36
+ lines.push(C.heading(' Machina — the Abstract Agent Machine'));
37
+ lines.push('');
38
+ lines.push(C.text(wrapText(spec_js_1.AAM_PREAMBLE, 76, ' ')));
39
+ lines.push('');
40
+ lines.push(C.muted(' The tuple'));
41
+ lines.push(` ${C.math('AAM = (S, P, O, δ, s₀)')}`);
42
+ lines.push('');
43
+ lines.push(` ${C.heading('S')} ${C.text('state space — conversation history + loop counters')}`);
44
+ lines.push(` ${C.heading('P')} ${C.text('primitives — the finite, fixed set of tool calls')}`);
45
+ lines.push(` ${C.heading('O')} ${C.text('the oracle — swappable: LLM, human, rules, or another AAM')}`);
46
+ lines.push(` ${C.heading('δ')} ${C.text('transition — δ(s, O(s)) → s′, gated by the safety check')}`);
47
+ lines.push(` ${C.heading('s₀')} ${C.text("initial state — empty history + the user's task")}`);
48
+ lines.push('');
49
+ lines.push(C.muted(' Grounding — claims checked against the live source tree'));
50
+ for (const r of report.results) {
51
+ const label = COMPONENT_LABEL[r.component].padEnd(18);
52
+ lines.push(` ${statusGlyph(r.status)} ${C.dim(label)} ${C.text(r.file + ':' + r.line)}`);
53
+ lines.push(` ${C.muted(r.description)}`);
54
+ if (r.status === 'drifted') {
55
+ lines.push(` ${C.warn(`content OK — anchor stale: recorded :${r.line}, now at :${r.foundLine}`)}`);
56
+ }
57
+ else if (r.status === 'missing') {
58
+ lines.push(` ${C.warn(`expected "${r.mustContain}" — found: ${r.actualLine || '(file missing)'}`)}`);
59
+ }
60
+ }
61
+ lines.push('');
62
+ if (report.drifted.length === 0 && report.missing.length === 0) {
63
+ lines.push(C.good(` All ${report.verifiedCount} structural claims verified against the current source.`));
64
+ }
65
+ else if (report.missing.length === 0) {
66
+ lines.push(C.warn(` All ${report.results.length} claims hold — ${report.drifted.length} stale anchor(s) ` +
67
+ `(content moved, line numbers didn't follow). Run \`npm run repair-anchors\` to re-anchor.`));
68
+ }
69
+ else {
70
+ lines.push(C.warn(` ${report.verifiedCount + report.drifted.length}/${report.results.length} claims hold — ` +
71
+ `${report.missing.length} missing, ${report.drifted.length} stale anchors. ` +
72
+ `The code genuinely changed; this spec needs updating.`));
73
+ }
74
+ lines.push('');
75
+ lines.push(C.muted(' Why "unlimited" has a price'));
76
+ lines.push(C.text(wrapText(spec_js_1.AAM_LIMITS_NOTE, 76, ' ')));
77
+ lines.push('');
78
+ lines.push(C.muted(' :machina --html writes the full writeup + diagram to docs/machina.html'));
79
+ lines.push('');
80
+ return lines.join('\n');
81
+ }
82
+ function wrapText(text, width, indent) {
83
+ const words = text.split(/\s+/);
84
+ const out = [];
85
+ let line = '';
86
+ for (const w of words) {
87
+ if ((line + ' ' + w).trim().length > width) {
88
+ out.push(indent + line.trim());
89
+ line = w;
90
+ }
91
+ else {
92
+ line += ' ' + w;
93
+ }
94
+ }
95
+ if (line.trim())
96
+ out.push(indent + line.trim());
97
+ return out.join('\n');
98
+ }
99
+ //# sourceMappingURL=render-terminal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-terminal.js","sourceRoot":"","sources":["../../src/machina/render-terminal.ts"],"names":[],"mappings":";;;;;AA6BA,sDAsDC;AAnFD,kDAA0B;AAC1B,uCAA0D;AAG1D,MAAM,CAAC,GAAG;IACR,OAAO,EAAE,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI;IAClC,IAAI,EAAE,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC;IAC3B,GAAG,EAAE,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC;IACzB,IAAI,EAAE,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,MAAM,eAAe,GAA6C;IAChE,CAAC,EAAE,iBAAiB;IACpB,CAAC,EAAE,gBAAgB;IACnB,CAAC,EAAE,YAAY;IACf,KAAK,EAAE,mBAAmB;IAC1B,EAAE,EAAE,oBAAoB;IACxB,KAAK,EAAE,mBAAmB;CAC3B,CAAC;AAEF,SAAS,WAAW,CAAC,MAA6B;IAChD,IAAI,MAAM,KAAK,UAAU;QAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9C,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7C,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC;AAED,SAAgB,qBAAqB,CAAC,MAA0B;IAC9D,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,OA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GAAG,EAAE,CAAC;IACd,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,KAAK,EAAE,CAAC;YAC3C,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;YAC/B,IAAI,GAAG,CAAC,CAAC;QACX,CAAC;aAAM,CAAC;YACN,IAAI,IAAI,GAAG,GAAG,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IACD,IAAI,IAAI,CAAC,IAAI,EAAE;QAAE,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IAChD,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC"}
@@ -0,0 +1,23 @@
1
+ export interface AnchorUpdate {
2
+ id: string;
3
+ from: number;
4
+ to: number;
5
+ }
6
+ export interface RepairResult {
7
+ /** Anchors rewritten in spec.ts. */
8
+ updated: AnchorUpdate[];
9
+ /** Claims whose content is genuinely missing — not repairable, real drift. */
10
+ failing: string[];
11
+ }
12
+ /**
13
+ * Pure rewrite: for each update, find the claim object by its id and replace
14
+ * its `line: <from>` with `line: <to>`. An update whose recorded line no
15
+ * longer matches the source is skipped rather than guessed at.
16
+ */
17
+ export declare function rewriteSpecAnchors(source: string, updates: AnchorUpdate[]): string;
18
+ /**
19
+ * Verify all claims, then rewrite the stale anchors in src/machina/spec.ts.
20
+ * Returns what was rewritten and which claims are genuinely failing (those
21
+ * cannot be repaired — the content is gone, the spec itself must change).
22
+ */
23
+ export declare function repairAnchors(repoRoot?: string): RepairResult;
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.rewriteSpecAnchors = rewriteSpecAnchors;
37
+ exports.repairAnchors = repairAnchors;
38
+ /**
39
+ * Explicit anchor repair for AAM_CLAIMS — deliberately NOT part of verify.
40
+ *
41
+ * verify.ts is a read-only check: it reports stale anchors (status
42
+ * 'drifted') but never touches source. This module is the separate, opt-in
43
+ * path that rewrites spec.ts's line numbers to match where each claim's
44
+ * content actually lives now. Run it via `npm run repair-anchors`.
45
+ */
46
+ const fs = __importStar(require("fs"));
47
+ const path = __importStar(require("path"));
48
+ const verify_js_1 = require("./verify.js");
49
+ /**
50
+ * Pure rewrite: for each update, find the claim object by its id and replace
51
+ * its `line: <from>` with `line: <to>`. An update whose recorded line no
52
+ * longer matches the source is skipped rather than guessed at.
53
+ */
54
+ function rewriteSpecAnchors(source, updates) {
55
+ let out = source;
56
+ for (const u of updates) {
57
+ const idIdx = out.indexOf(`id: '${u.id}'`);
58
+ if (idIdx === -1)
59
+ continue;
60
+ const after = out.slice(idIdx);
61
+ const m = after.match(/line:\s*(\d+)/);
62
+ if (!m || Number(m[1]) !== u.from)
63
+ continue;
64
+ out = out.slice(0, idIdx) + after.replace(/line:\s*\d+/, `line: ${u.to}`);
65
+ }
66
+ return out;
67
+ }
68
+ /**
69
+ * Verify all claims, then rewrite the stale anchors in src/machina/spec.ts.
70
+ * Returns what was rewritten and which claims are genuinely failing (those
71
+ * cannot be repaired — the content is gone, the spec itself must change).
72
+ */
73
+ function repairAnchors(repoRoot = (0, verify_js_1.resolveAuraRepoRoot)()) {
74
+ const report = (0, verify_js_1.verifyAamClaims)(repoRoot);
75
+ const updated = report.drifted
76
+ .filter(r => typeof r.foundLine === 'number')
77
+ .map(r => ({ id: r.id, from: r.line, to: r.foundLine }));
78
+ if (updated.length > 0) {
79
+ const specPath = path.join(repoRoot, 'src', 'machina', 'spec.ts');
80
+ const source = fs.readFileSync(specPath, 'utf8');
81
+ fs.writeFileSync(specPath, rewriteSpecAnchors(source, updated));
82
+ }
83
+ return { updated, failing: report.missing.map(r => r.id) };
84
+ }
85
+ // Direct-run entry (`node dist/machina/repair.js`). Guarded so the module
86
+ // also loads under ESM-transformed test runners where `require` is undefined.
87
+ if (typeof require !== 'undefined' && require.main === module) {
88
+ const { updated, failing } = repairAnchors();
89
+ for (const u of updated)
90
+ console.log(`re-anchored '${u.id}': line ${u.from} → ${u.to}`);
91
+ if (updated.length === 0)
92
+ console.log('All anchors exact — nothing to repair.');
93
+ if (failing.length > 0) {
94
+ console.error(`Not repairable (content genuinely missing): ${failing.join(', ')} — the spec itself needs updating.`);
95
+ process.exitCode = 1;
96
+ }
97
+ }
98
+ //# sourceMappingURL=repair.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repair.js","sourceRoot":"","sources":["../../src/machina/repair.ts"],"names":[],"mappings":";;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@
1
+ /**
2
+ * `:machina` — the Abstract Agent Machine (AAM).
3
+ *
4
+ * This module states a formal model of what `aura-code` *is*, independent of
5
+ * which LLM happens to be plugged in, and then checks every structural claim
6
+ * it makes against the real source tree at run time (see verify.ts). A spec
7
+ * that asserts "the main loop is at loop.ts:127" and never re-checks that
8
+ * line drifts silently as the code changes — this one refuses to.
9
+ *
10
+ * ── The model ──────────────────────────────────────────────────────────────
11
+ * AAM is the 5-tuple (S, P, O, δ, s0):
12
+ *
13
+ * S — state space. A state is the full conversation history plus loop
14
+ * counters: s = (history, turns, usage). Every run lives inside S.
15
+ * P — primitives. The finite, fixed set of tool definitions the machine
16
+ * can invoke (read_file, run_command, edit, ...). P is finite and
17
+ * enumerable — this is NOT where unboundedness comes from.
18
+ * O — the oracle. A function history -> {text, tool_calls, stop_reason}.
19
+ * The oracle is the ONLY part of the tuple that is swappable: it can
20
+ * be an LLM, a human, a rule table, or another AAM run recursively.
21
+ * Swapping the oracle does not change S, P, δ, or s0.
22
+ * δ — the transition function. δ(s, o(s)) -> s'. Concretely: take the
23
+ * oracle's output, run it through the safety gate, execute any tool
24
+ * calls against P, fold the results back into history, and check
25
+ * halting conditions.
26
+ * s0 — the initial state: empty history + the user's task as the first
27
+ * message.
28
+ *
29
+ * ── Why this matters, precisely ────────────────────────────────────────────
30
+ * Because δ can simulate a Turing machine's transition function (the oracle
31
+ * can be made to emit "move tape head" tool calls and the primitives can
32
+ * implement a tape as a file), AAM is Turing-complete *in principle*, for
33
+ * an UNBOUNDED machine (infinite turns, infinite context). Turing-completeness
34
+ * is the ceiling for computability — a quantum computer does not raise this
35
+ * ceiling; it changes the *complexity* of specific problems (factoring,
36
+ * search), not which problems are solvable at all. So "make the oracle
37
+ * quantum" would be a speed upgrade to O, not a power upgrade to the tuple.
38
+ *
39
+ * Turing-completeness has a cost the spec must not hide: the Halting Problem
40
+ * is undecidable for an unbounded AAM — there is no general procedure that
41
+ * decides, for an arbitrary task, whether the loop ever stops. This is
42
+ * exactly why real aura-code is NOT the unbounded machine: maxTurns and the
43
+ * context compactor are deliberate, finite approximations that trade a
44
+ * sliver of theoretical power for guaranteed termination. The unbounded
45
+ * machine is elegant on paper and undecidable in practice; the bounded
46
+ * machine is what you can actually run.
47
+ */
48
+ export interface VerifiableClaim {
49
+ id: string;
50
+ /** Which part of the formal tuple this claim grounds. */
51
+ component: 'S' | 'P' | 'O' | 'delta' | 's0' | 'limit';
52
+ description: string;
53
+ file: string;
54
+ /** 1-indexed line number expected to contain `mustContain`. */
55
+ line: number;
56
+ /** A short, exact substring expected at that line — the actual verification check. */
57
+ mustContain: string;
58
+ }
59
+ export declare const AAM_CLAIMS: VerifiableClaim[];
60
+ export declare const AAM_PREAMBLE: string;
61
+ export declare const AAM_LIMITS_NOTE: string;