aura-code 0.3.7 → 0.6.3

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 (160) hide show
  1. package/README.md +56 -4
  2. package/dist/agent/compactor.d.ts +26 -0
  3. package/dist/agent/compactor.js +156 -0
  4. package/dist/agent/compactor.js.map +1 -0
  5. package/dist/agent/context.d.ts +4 -0
  6. package/dist/agent/context.js +38 -0
  7. package/dist/agent/context.js.map +1 -1
  8. package/dist/agent/design.d.ts +17 -0
  9. package/dist/agent/design.js +175 -0
  10. package/dist/agent/design.js.map +1 -0
  11. package/dist/agent/loop.js +24 -1
  12. package/dist/agent/loop.js.map +1 -1
  13. package/dist/agent/system-prompt.d.ts +1 -1
  14. package/dist/agent/system-prompt.js +14 -3
  15. package/dist/agent/system-prompt.js.map +1 -1
  16. package/dist/cli/display.js +46 -5
  17. package/dist/cli/display.js.map +1 -1
  18. package/dist/cli/index.js +323 -46
  19. package/dist/cli/index.js.map +1 -1
  20. package/dist/config/defaults.js +8 -1
  21. package/dist/config/defaults.js.map +1 -1
  22. package/dist/config/project-config.d.ts +6 -0
  23. package/dist/config/project-config.js +2 -0
  24. package/dist/config/project-config.js.map +1 -1
  25. package/dist/dream/dream.d.ts +71 -0
  26. package/dist/dream/dream.js +217 -0
  27. package/dist/dream/dream.js.map +1 -0
  28. package/dist/dream/okf.d.ts +10 -0
  29. package/dist/dream/okf.js +280 -0
  30. package/dist/dream/okf.js.map +1 -0
  31. package/dist/dream/parser.d.ts +60 -0
  32. package/dist/dream/parser.js +176 -0
  33. package/dist/dream/parser.js.map +1 -0
  34. package/dist/dream/reconcile.d.ts +69 -0
  35. package/dist/dream/reconcile.js +303 -0
  36. package/dist/dream/reconcile.js.map +1 -0
  37. package/dist/kanban/index.d.ts +5 -0
  38. package/dist/kanban/index.js +11 -0
  39. package/dist/kanban/index.js.map +1 -0
  40. package/dist/kanban/pipeline.d.ts +16 -0
  41. package/dist/kanban/pipeline.js +910 -0
  42. package/dist/kanban/pipeline.js.map +1 -0
  43. package/dist/kanban/server.d.ts +5 -0
  44. package/dist/kanban/server.js +820 -0
  45. package/dist/kanban/server.js.map +1 -0
  46. package/dist/kanban/types.d.ts +75 -0
  47. package/dist/kanban/types.js +6 -0
  48. package/dist/kanban/types.js.map +1 -0
  49. package/dist/learnlight/driven.d.ts +2 -0
  50. package/dist/learnlight/driven.js +109 -0
  51. package/dist/learnlight/driven.js.map +1 -0
  52. package/dist/learnlight/index.d.ts +4 -0
  53. package/dist/learnlight/index.js +32 -0
  54. package/dist/learnlight/index.js.map +1 -0
  55. package/dist/learnlight/lesson-prep.d.ts +36 -0
  56. package/dist/learnlight/lesson-prep.js +224 -0
  57. package/dist/learnlight/lesson-prep.js.map +1 -0
  58. package/dist/learnlight/report.d.ts +2 -0
  59. package/dist/learnlight/report.js +37 -0
  60. package/dist/learnlight/report.js.map +1 -0
  61. package/dist/learnlight/types.d.ts +72 -0
  62. package/dist/learnlight/types.js +6 -0
  63. package/dist/learnlight/types.js.map +1 -0
  64. package/dist/machina/index.d.ts +16 -0
  65. package/dist/machina/index.js +61 -0
  66. package/dist/machina/index.js.map +1 -0
  67. package/dist/machina/render-html.d.ts +2 -0
  68. package/dist/machina/render-html.js +189 -0
  69. package/dist/machina/render-html.js.map +1 -0
  70. package/dist/machina/render-terminal.d.ts +2 -0
  71. package/dist/machina/render-terminal.js +92 -0
  72. package/dist/machina/render-terminal.js.map +1 -0
  73. package/dist/machina/spec.d.ts +61 -0
  74. package/dist/machina/spec.js +124 -0
  75. package/dist/machina/spec.js.map +1 -0
  76. package/dist/machina/verify.d.ts +27 -0
  77. package/dist/machina/verify.js +85 -0
  78. package/dist/machina/verify.js.map +1 -0
  79. package/dist/perception/graph-store.d.ts +11 -0
  80. package/dist/perception/graph-store.js +33 -0
  81. package/dist/perception/graph-store.js.map +1 -1
  82. package/dist/perception/index.d.ts +1 -1
  83. package/dist/perception/index.js +2 -1
  84. package/dist/perception/index.js.map +1 -1
  85. package/dist/providers/anthropic.js +1 -1
  86. package/dist/providers/anthropic.js.map +1 -1
  87. package/dist/providers/factory.d.ts +49 -0
  88. package/dist/providers/factory.js +99 -0
  89. package/dist/providers/factory.js.map +1 -1
  90. package/dist/providers/google.js +1 -1
  91. package/dist/providers/google.js.map +1 -1
  92. package/dist/providers/openai-compatible.js +81 -50
  93. package/dist/providers/openai-compatible.js.map +1 -1
  94. package/dist/rem/graph.d.ts +72 -0
  95. package/dist/rem/graph.js +139 -0
  96. package/dist/rem/graph.js.map +1 -0
  97. package/dist/rem/index.d.ts +16 -0
  98. package/dist/rem/index.js +60 -0
  99. package/dist/rem/index.js.map +1 -0
  100. package/dist/rem/render-html.d.ts +2 -0
  101. package/dist/rem/render-html.js +189 -0
  102. package/dist/rem/render-html.js.map +1 -0
  103. package/dist/rem/render-terminal.d.ts +4 -0
  104. package/dist/rem/render-terminal.js +94 -0
  105. package/dist/rem/render-terminal.js.map +1 -0
  106. package/dist/research/council.d.ts +27 -0
  107. package/dist/research/council.js +263 -0
  108. package/dist/research/council.js.map +1 -0
  109. package/dist/research/research.d.ts +24 -0
  110. package/dist/research/research.js +116 -0
  111. package/dist/research/research.js.map +1 -0
  112. package/dist/ruby/alternator.d.ts +36 -1
  113. package/dist/ruby/alternator.js +40 -31
  114. package/dist/ruby/alternator.js.map +1 -1
  115. package/dist/ruby/stats.js +10 -11
  116. package/dist/ruby/stats.js.map +1 -1
  117. package/dist/ruby/types.js +1 -1
  118. package/dist/ruby/types.js.map +1 -1
  119. package/dist/safety/permissions.d.ts +8 -0
  120. package/dist/safety/permissions.js +12 -0
  121. package/dist/safety/permissions.js.map +1 -1
  122. package/dist/setup/provider-registry.js +14 -0
  123. package/dist/setup/provider-registry.js.map +1 -1
  124. package/dist/setup/provider-test.js +24 -2
  125. package/dist/setup/provider-test.js.map +1 -1
  126. package/dist/setup/telegram-wizard.d.ts +57 -0
  127. package/dist/setup/telegram-wizard.js +343 -0
  128. package/dist/setup/telegram-wizard.js.map +1 -0
  129. package/dist/tools/audio-transcribe.d.ts +20 -0
  130. package/dist/tools/audio-transcribe.js +39 -28
  131. package/dist/tools/audio-transcribe.js.map +1 -1
  132. package/dist/tools/browser.js +8 -10
  133. package/dist/tools/browser.js.map +1 -1
  134. package/dist/tools/gmail-tool.d.ts +15 -0
  135. package/dist/tools/gmail-tool.js +361 -0
  136. package/dist/tools/gmail-tool.js.map +1 -0
  137. package/dist/tools/read-file.js +13 -0
  138. package/dist/tools/read-file.js.map +1 -1
  139. package/dist/tools/telegram-bot.js +103 -20
  140. package/dist/tools/telegram-bot.js.map +1 -1
  141. package/dist/tools/telegram-voice.d.ts +22 -0
  142. package/dist/tools/telegram-voice.js +203 -0
  143. package/dist/tools/telegram-voice.js.map +1 -0
  144. package/dist/tools/telegram.d.ts +6 -1
  145. package/dist/tools/telegram.js +115 -5
  146. package/dist/tools/telegram.js.map +1 -1
  147. package/dist/tools/video-render.d.ts +11 -0
  148. package/dist/tools/video-render.js +189 -0
  149. package/dist/tools/video-render.js.map +1 -0
  150. package/dist/tools/web-search.d.ts +20 -0
  151. package/dist/tools/web-search.js +134 -38
  152. package/dist/tools/web-search.js.map +1 -1
  153. package/dist/util/errors.js +6 -0
  154. package/dist/util/errors.js.map +1 -1
  155. package/dist/viz/index.js +816 -30
  156. package/dist/viz/index.js.map +1 -1
  157. package/dist/viz/reader.d.ts +33 -0
  158. package/dist/viz/reader.js +343 -0
  159. package/dist/viz/reader.js.map +1 -0
  160. package/package.json +3 -1
@@ -0,0 +1,176 @@
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.parseDreamMarkdown = parseDreamMarkdown;
37
+ exports.parseDreamFile = parseDreamFile;
38
+ exports.loadExistingDreams = loadExistingDreams;
39
+ const fs = __importStar(require("fs"));
40
+ const path = __importStar(require("path"));
41
+ const SECTION_HEADERS = {
42
+ lessons: /^##\s+Lessons\s*$/i,
43
+ patterns: /^##\s+Patterns\s*$/i,
44
+ openThreads: /^##\s+Open\s+threads\s*$/i,
45
+ tomorrowBrief: /^##\s+Tomorrow\s+brief\s*$/i,
46
+ };
47
+ /** Match a bullet line: `- text`, `* text`, optionally indented. */
48
+ const BULLET_RE = /^\s*[-*]\s+(.*)$/;
49
+ /** Match a `[tag]` prefix at the very start of bullet text. */
50
+ const TAG_RE = /^\[([^\]]+)\]\s*(.*)$/;
51
+ /** Match the "# Dream — DATE" title line (em dash or plain hyphen). */
52
+ const TITLE_RE = /^#\s+Dream\s*[—–-]\s*(\d{4}-\d{2}-\d{2})/;
53
+ function extractDateFromFilename(filePath) {
54
+ const base = path.basename(filePath, '.md');
55
+ const m = base.match(/^(\d{4}-\d{2}-\d{2})$/);
56
+ return m ? m[1] : '';
57
+ }
58
+ function extractDateFromContent(md) {
59
+ for (const line of md.split(/\r?\n/)) {
60
+ const m = line.match(TITLE_RE);
61
+ if (m)
62
+ return m[1];
63
+ }
64
+ return '';
65
+ }
66
+ function parseBullet(line, sourceDate) {
67
+ const m = line.match(BULLET_RE);
68
+ if (!m)
69
+ return null;
70
+ const body = m[1].trim();
71
+ if (!body)
72
+ return null;
73
+ const tagMatch = body.match(TAG_RE);
74
+ if (tagMatch) {
75
+ const tag = tagMatch[1].trim();
76
+ const text = tagMatch[2].trim();
77
+ if (!text) {
78
+ // `- [tag]` with no actual content — treat as untagged with the tag as text
79
+ return { text: `[${tag}]`, sourceDate };
80
+ }
81
+ return { tag, text, sourceDate };
82
+ }
83
+ return { text: body, sourceDate };
84
+ }
85
+ /**
86
+ * Parse dream markdown content. Caller supplies the source date (preferred
87
+ * from filename for cross-OS consistency); falls back to the title line if
88
+ * the filename doesn't encode it.
89
+ */
90
+ function parseDreamMarkdown(md, sourceDate) {
91
+ const date = sourceDate || extractDateFromContent(md);
92
+ const lines = md.split(/\r?\n/);
93
+ const sections = {
94
+ lessons: [],
95
+ patterns: [],
96
+ openThreads: [],
97
+ tomorrowBrief: [],
98
+ };
99
+ let current = null;
100
+ for (const line of lines) {
101
+ // Detect section transitions.
102
+ let matched = null;
103
+ for (const [key, re] of Object.entries(SECTION_HEADERS)) {
104
+ if (re.test(line)) {
105
+ matched = key;
106
+ break;
107
+ }
108
+ }
109
+ if (matched) {
110
+ current = matched;
111
+ continue;
112
+ }
113
+ // Any other `##` heading ends the current section.
114
+ if (/^##\s+/.test(line)) {
115
+ current = null;
116
+ continue;
117
+ }
118
+ if (current)
119
+ sections[current].push(line);
120
+ }
121
+ const lessons = [];
122
+ const patterns = [];
123
+ const openThreads = [];
124
+ for (const line of sections.lessons) {
125
+ const b = parseBullet(line, date);
126
+ if (b)
127
+ lessons.push(b);
128
+ }
129
+ for (const line of sections.patterns) {
130
+ const b = parseBullet(line, date);
131
+ if (b)
132
+ patterns.push(b);
133
+ }
134
+ for (const line of sections.openThreads) {
135
+ const b = parseBullet(line, date);
136
+ if (b)
137
+ openThreads.push(b);
138
+ }
139
+ // Tomorrow brief is free prose — join non-empty lines.
140
+ const tomorrowBrief = sections.tomorrowBrief
141
+ .map(l => l.trim())
142
+ .filter(Boolean)
143
+ .join(' ')
144
+ .trim();
145
+ return { date, lessons, patterns, openThreads, tomorrowBrief };
146
+ }
147
+ /** Read and parse a single dream file from disk. */
148
+ function parseDreamFile(filePath) {
149
+ const md = fs.readFileSync(filePath, 'utf8');
150
+ const sourceDate = extractDateFromFilename(filePath) || extractDateFromContent(md);
151
+ const parsed = parseDreamMarkdown(md, sourceDate);
152
+ return { ...parsed, path: filePath };
153
+ }
154
+ /**
155
+ * Load and parse every `YYYY-MM-DD.md` dream file in `<projectRoot>/dreams/`.
156
+ * Returned oldest-first (chronological), so reconciliation can iterate
157
+ * forward in time when reasoning about strengthening / conflicts.
158
+ *
159
+ * Ignores `.last.json` and `.reconciled.md` (handled separately).
160
+ * Returns `[]` if the dreams directory doesn't exist yet.
161
+ */
162
+ function loadExistingDreams(projectRoot) {
163
+ const dir = path.join(projectRoot, 'dreams');
164
+ let entries;
165
+ try {
166
+ entries = fs.readdirSync(dir);
167
+ }
168
+ catch {
169
+ return [];
170
+ }
171
+ const dreamFiles = entries
172
+ .filter(name => /^\d{4}-\d{2}-\d{2}\.md$/.test(name))
173
+ .sort(); // lexical sort works for ISO dates
174
+ return dreamFiles.map(name => parseDreamFile(path.join(dir, name)));
175
+ }
176
+ //# sourceMappingURL=parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/dream/parser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwGA,gDA2DC;AAGD,wCAKC;AAUD,gDAYC;AAjMD,uCAAyB;AACzB,2CAA6B;AAgD7B,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Aa,EAAE,CAAC;AACjE,CAAC;AAED,oDAAoD;AACpD,SAAgB,cAAc,CAAC,QAAgB;IAC7C,MAAM,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC7C,MAAM,UAAU,GAAG,uBAAuB,CAAC,QAAQ,CAAC,IAAI,sBAAsB,CAAC,EAAE,CAAC,CAAC;IACnF,MAAM,MAAM,GAAG,kBAAkB,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;IAClD,OAAO,EAAE,GAAG,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AACvC,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAAC,WAAmB;IACpD,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAC7C,IAAI,OAAiB,CAAC;IACtB,IAAI,CAAC;QACH,OAAO,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,UAAU,GAAG,OAAO;SACvB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACpD,IAAI,EAAE,CAAC,CAAC,mCAAmC;IAC9C,OAAO,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AACtE,CAAC"}
@@ -0,0 +1,69 @@
1
+ import type { LLMProvider } from '../providers/types.js';
2
+ import type { ParsedDream } from './parser.js';
3
+ /**
4
+ * Dream reconciliation — the "sleep-time compute" layer.
5
+ *
6
+ * Takes all parsed dreams (from parser.ts's `loadExistingDreams`) and
7
+ * produces a RECONCILED VIEW: a single `.reconciled.md` file containing
8
+ * the agent's current best understanding, with annotations showing where
9
+ * each belief came from and how it evolved.
10
+ *
11
+ * Six verdicts:
12
+ * KEEP — unique claim, no conflict, retained as-is.
13
+ * STRENGTHEN — same claim appeared across multiple dreams. Confidence up.
14
+ * MERGE — two related-but-distinct claims combined into one.
15
+ * SUPERSEDE — newer claim replaces an older one.
16
+ * CONFLICT — two claims contradict each other. Both surfaced, not resolved.
17
+ * DROP — exact duplicate or obsolete. Removed from the projection.
18
+ *
19
+ * Confidence is MECHANICAL, not model-generated:
20
+ * confidence = (number of source dreams contributing to this bullet) / totalDreams
21
+ * This makes the number defensible. A model-generated "0.72" is theater;
22
+ * "appears in 8 of 14 dreams → 0.57" is data.
23
+ *
24
+ * Output: `dreams/.reconciled.md` — a projection, not a replacement.
25
+ * Old dream files stay untouched (append-only audit trail).
26
+ *
27
+ * The reconciliation log is also appended to today's dream file as a
28
+ * `## Reconciliation` section for traceability.
29
+ */
30
+ export type VerdictAction = 'KEEP' | 'STRENGTHEN' | 'MERGE' | 'SUPERSEDE' | 'CONFLICT' | 'DROP';
31
+ export interface ReconciledBullet {
32
+ section: 'lessons' | 'patterns' | 'openThreads';
33
+ tag?: string;
34
+ text: string;
35
+ action: VerdictAction;
36
+ /** Human-readable lineage, e.g. "from 2026-06-24, strengthened 2026-06-26" */
37
+ annotation: string;
38
+ sourceDates: string[];
39
+ /** Mechanical: sourceDates.length / totalDreams. */
40
+ confidence: number;
41
+ /** For CONFLICT: the opposing claim and its date. */
42
+ conflictsWith?: {
43
+ text: string;
44
+ date: string;
45
+ };
46
+ }
47
+ export interface ReconciliationResult {
48
+ bullets: ReconciledBullet[];
49
+ totalDreams: number;
50
+ /** Markdown string written to .reconciled.md (also returned for appending to dream file). */
51
+ reconciledMd: string;
52
+ /** Compact log appended to today's dream file. */
53
+ logSection: string;
54
+ }
55
+ /**
56
+ * Run memory reconciliation across all existing dreams.
57
+ *
58
+ * Called by `runDream()` after the new dream is written, gated at ≥3 dreams.
59
+ * If this fails, the dream file is still intact — reconciliation is
60
+ * enhancement, not critical path.
61
+ *
62
+ * @returns The result, or null if reconciliation was skipped or failed.
63
+ */
64
+ export declare function reconcileDreams(opts: {
65
+ projectRoot: string;
66
+ provider: LLMProvider;
67
+ /** Pre-loaded dreams (avoids re-reading disk). */
68
+ dreams: ParsedDream[];
69
+ }): Promise<ReconciliationResult | null>;
@@ -0,0 +1,303 @@
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.reconcileDreams = reconcileDreams;
37
+ const fs = __importStar(require("fs"));
38
+ const path = __importStar(require("path"));
39
+ const SECTIONS = ['lessons', 'patterns', 'openThreads'];
40
+ function formatBulletsForPrompt(dreams) {
41
+ const blocks = [];
42
+ for (const section of SECTIONS) {
43
+ const label = section === 'openThreads' ? 'Open threads' : section.charAt(0).toUpperCase() + section.slice(1);
44
+ const bullets = [];
45
+ for (const dream of dreams) {
46
+ for (const b of dream[section]) {
47
+ const tag = b.tag ? `[${b.tag}] ` : '';
48
+ bullets.push(` - (${b.sourceDate}) ${tag}${b.text}`);
49
+ }
50
+ }
51
+ if (bullets.length > 0) {
52
+ blocks.push(`### ${label}\n${bullets.join('\n')}`);
53
+ }
54
+ }
55
+ return blocks.join('\n\n');
56
+ }
57
+ function buildReconciliationPrompt(dreams) {
58
+ const system = `You are Aura's memory reconciliation system. You are given ALL bullets from ${dreams.length} dream files (the agent's nightly consolidation journal), grouped by section (Lessons, Patterns, Open threads). Each bullet is prefixed with its source date.
59
+
60
+ Your job: produce a RECONCILED memory — the current best understanding — by analyzing all bullets across all dreams.
61
+
62
+ For each bullet in your output, assign exactly ONE verdict:
63
+
64
+ - KEEP: unique claim, no overlap with others, retained as-is.
65
+ - STRENGTHEN: the same claim (or very similar) appeared in multiple dreams. Cite all dates.
66
+ - MERGE: two related but distinct claims combined into one clearer statement. Cite both source dates.
67
+ - SUPERSEDE: a newer claim replaces an older one (the old one is outdated). Cite both dates and state which is old vs new.
68
+ - CONFLICT: two claims contradict each other. Surface BOTH — do NOT resolve. State what conflicts with what.
69
+ - DROP: exact duplicate of another bullet already in the output. Do not include it.
70
+
71
+ IMPORTANT RULES:
72
+ - Do NOT invent new claims. Only work with what's in the input.
73
+ - Do NOT silently merge contradictions. If something changed, mark it CONFLICT or SUPERSEDE.
74
+ - Prefer CONFLICT over SUPERSEDE when you're unsure which is more current.
75
+ - Tags like [tooling], [bug], [todo] should be preserved when present.
76
+ - Open threads marked [todo] should be kept unless explicitly resolved by a later dream's lesson.
77
+
78
+ Respond with ONLY a JSON array. No markdown fences, no preamble, no explanation.
79
+
80
+ Each element:
81
+ {
82
+ "section": "lessons" | "patterns" | "openThreads",
83
+ "tag": "optional tag without brackets, or null",
84
+ "text": "the reconciled bullet text",
85
+ "action": "KEEP" | "STRENGTHEN" | "MERGE" | "SUPERSEDE" | "CONFLICT" | "DROP",
86
+ "sourceDates": ["2026-06-24", "2026-06-26"],
87
+ "conflictsWith": { "text": "the opposing claim", "date": "2026-06-24" } // only for CONFLICT, otherwise omit
88
+ }`;
89
+ const user = `Here are all ${dreams.length} dreams' bullets:\n\n${formatBulletsForPrompt(dreams)}`;
90
+ return { system, user };
91
+ }
92
+ const VALID_ACTIONS = new Set(['KEEP', 'STRENGTHEN', 'MERGE', 'SUPERSEDE', 'CONFLICT', 'DROP']);
93
+ function parseVerdicts(raw, totalDreams) {
94
+ // Strip markdown fences if the model wrapped the JSON
95
+ let cleaned = raw.trim();
96
+ if (cleaned.startsWith('```')) {
97
+ cleaned = cleaned.replace(/^```(?:json)?\s*\n?/, '').replace(/\n?```\s*$/, '');
98
+ }
99
+ let parsed;
100
+ try {
101
+ parsed = JSON.parse(cleaned);
102
+ }
103
+ catch {
104
+ // Try to extract a JSON array from the response
105
+ const match = cleaned.match(/\[[\s\S]*\]/);
106
+ if (!match)
107
+ return [];
108
+ try {
109
+ parsed = JSON.parse(match[0]);
110
+ }
111
+ catch {
112
+ return [];
113
+ }
114
+ }
115
+ if (!Array.isArray(parsed))
116
+ return [];
117
+ const results = [];
118
+ for (const v of parsed) {
119
+ if (!v.text || !v.section || !v.action)
120
+ continue;
121
+ const action = v.action.toUpperCase();
122
+ if (!VALID_ACTIONS.has(action))
123
+ continue;
124
+ if (action === 'DROP')
125
+ continue; // dropped bullets don't appear in output
126
+ if (!SECTIONS.includes(v.section))
127
+ continue;
128
+ const sourceDates = Array.isArray(v.sourceDates) ? v.sourceDates.filter(d => typeof d === 'string') : [];
129
+ const confidence = totalDreams > 0 ? Math.round((sourceDates.length / totalDreams) * 100) / 100 : 0;
130
+ const bullet = {
131
+ section: v.section,
132
+ tag: (typeof v.tag === 'string' && v.tag.trim()) ? v.tag.trim() : undefined,
133
+ text: v.text.trim(),
134
+ action,
135
+ annotation: buildAnnotation(action, sourceDates, v.conflictsWith),
136
+ sourceDates,
137
+ confidence,
138
+ };
139
+ if (action === 'CONFLICT' && v.conflictsWith && typeof v.conflictsWith.text === 'string') {
140
+ bullet.conflictsWith = {
141
+ text: v.conflictsWith.text.trim(),
142
+ date: typeof v.conflictsWith.date === 'string' ? v.conflictsWith.date : 'unknown',
143
+ };
144
+ }
145
+ results.push(bullet);
146
+ }
147
+ return results;
148
+ }
149
+ function buildAnnotation(action, sourceDates, conflict) {
150
+ const dates = sourceDates.join(', ');
151
+ switch (action) {
152
+ case 'KEEP':
153
+ return sourceDates.length === 1 ? `from ${dates}` : `from ${dates}`;
154
+ case 'STRENGTHEN':
155
+ return `from ${sourceDates[0]}, strengthened ${sourceDates.slice(1).join(', ')}`;
156
+ case 'MERGE':
157
+ return `merged from ${dates}`;
158
+ case 'SUPERSEDE':
159
+ return sourceDates.length >= 2
160
+ ? `superseded ${sourceDates[0]}, current from ${sourceDates[sourceDates.length - 1]}`
161
+ : `superseded, current from ${dates}`;
162
+ case 'CONFLICT':
163
+ return conflict?.date ? `conflicts with ${conflict.date}` : `conflicting claims from ${dates}`;
164
+ case 'DROP':
165
+ return 'dropped';
166
+ }
167
+ }
168
+ // ── Output formatting ────────────────────────────────────────────────────────
169
+ function buildReconciledMd(bullets, totalDreams) {
170
+ const now = new Date().toISOString().slice(0, 10);
171
+ // Frontmatter
172
+ const avgConfidence = bullets.length > 0
173
+ ? Math.round((bullets.reduce((s, b) => s + b.confidence, 0) / bullets.length) * 100) / 100
174
+ : 0;
175
+ const frontmatter = [
176
+ '---',
177
+ `generated: ${now}`,
178
+ `source_dreams: ${totalDreams}`,
179
+ `total_beliefs: ${bullets.length}`,
180
+ `average_confidence: ${avgConfidence}`,
181
+ `last_reconciliation: ${now}`,
182
+ '---',
183
+ ].join('\n');
184
+ // Group by section
185
+ const bySection = {
186
+ lessons: [],
187
+ patterns: [],
188
+ openThreads: [],
189
+ };
190
+ for (const b of bullets)
191
+ bySection[b.section].push(b);
192
+ // Render each section
193
+ const renderBullets = (items) => {
194
+ if (items.length === 0)
195
+ return '- none\n';
196
+ return items
197
+ .map(b => {
198
+ const tag = b.tag ? `[${b.tag}] ` : '';
199
+ const conf = ` (confidence: ${b.confidence})`;
200
+ return `- ${tag}${b.text} *${b.annotation}*${conf}`;
201
+ })
202
+ .join('\n') + '\n';
203
+ };
204
+ // Separate conflicts section
205
+ const conflicts = bullets.filter(b => b.action === 'CONFLICT');
206
+ const conflictsSection = conflicts.length > 0
207
+ ? '\n## Conflicts\n\n' + conflicts.map(b => {
208
+ const against = b.conflictsWith
209
+ ? `"${b.conflictsWith.text}" (${b.conflictsWith.date})`
210
+ : 'unknown prior belief';
211
+ return `- **${b.text}** vs ${against}`;
212
+ }).join('\n') + '\n'
213
+ : '';
214
+ // Stats summary
215
+ const actionCounts = {};
216
+ for (const b of bullets)
217
+ actionCounts[b.action] = (actionCounts[b.action] ?? 0) + 1;
218
+ const statsLine = Object.entries(actionCounts)
219
+ .map(([k, v]) => `${v} ${k}`)
220
+ .join(', ');
221
+ return [
222
+ frontmatter,
223
+ '',
224
+ `# Aura — Reconciled Memory`,
225
+ '',
226
+ `> Projected from ${totalDreams} dream(s). ${statsLine}.`,
227
+ '',
228
+ '## Lessons',
229
+ '',
230
+ renderBullets(bySection.lessons),
231
+ '## Patterns',
232
+ '',
233
+ renderBullets(bySection.patterns),
234
+ '## Open threads',
235
+ '',
236
+ renderBullets(bySection.openThreads),
237
+ conflictsSection,
238
+ '---',
239
+ '',
240
+ '*Generated by Aura Code · dream reconciliation · event-sourced memory.*',
241
+ ].join('\n');
242
+ }
243
+ function buildLogSection(bullets, totalDreams) {
244
+ const actionCounts = {};
245
+ for (const b of bullets)
246
+ actionCounts[b.action] = (actionCounts[b.action] ?? 0) + 1;
247
+ const statsLine = Object.entries(actionCounts)
248
+ .map(([k, v]) => `${v} ${k}`)
249
+ .join(', ');
250
+ const conflicts = bullets.filter(b => b.action === 'CONFLICT');
251
+ const conflictLines = conflicts.length > 0
252
+ ? '\n' + conflicts.map(b => {
253
+ const vs = b.conflictsWith ? ` vs "${b.conflictsWith.text}" (${b.conflictsWith.date})` : '';
254
+ return `- CONFLICT: "${b.text}"${vs}`;
255
+ }).join('\n')
256
+ : '';
257
+ return [
258
+ `\n## Reconciliation`,
259
+ '',
260
+ `> Reconciled ${totalDreams} dream(s): ${statsLine}.`,
261
+ `> Projection written to \`dreams/.reconciled.md\`.`,
262
+ conflictLines,
263
+ ].join('\n').trimEnd() + '\n';
264
+ }
265
+ // ── Public API ───────────────────────────────────────────────────────────────
266
+ /**
267
+ * Run memory reconciliation across all existing dreams.
268
+ *
269
+ * Called by `runDream()` after the new dream is written, gated at ≥3 dreams.
270
+ * If this fails, the dream file is still intact — reconciliation is
271
+ * enhancement, not critical path.
272
+ *
273
+ * @returns The result, or null if reconciliation was skipped or failed.
274
+ */
275
+ async function reconcileDreams(opts) {
276
+ const { projectRoot, provider, dreams } = opts;
277
+ if (dreams.length < 3)
278
+ return null; // 3-dream gate
279
+ const totalDreams = dreams.length;
280
+ const { system, user } = buildReconciliationPrompt(dreams);
281
+ let rawResponse;
282
+ try {
283
+ const res = await provider.complete(system, [{ role: 'user', content: user }], []);
284
+ rawResponse = (res.text ?? '').trim();
285
+ if (!rawResponse)
286
+ return null;
287
+ }
288
+ catch {
289
+ return null; // reconciliation is best-effort
290
+ }
291
+ const bullets = parseVerdicts(rawResponse, totalDreams);
292
+ if (bullets.length === 0)
293
+ return null;
294
+ const reconciledMd = buildReconciledMd(bullets, totalDreams);
295
+ const logSection = buildLogSection(bullets, totalDreams);
296
+ // Write .reconciled.md
297
+ const dir = path.join(projectRoot, 'dreams');
298
+ fs.mkdirSync(dir, { recursive: true });
299
+ const outPath = path.join(dir, '.reconciled.md');
300
+ fs.writeFileSync(outPath, reconciledMd);
301
+ return { bullets, totalDreams, reconciledMd, logSection };
302
+ }
303
+ //# sourceMappingURL=reconcile.js.map
@@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IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QACtC,IAAI,CAAC,WAAW;YAAE,OAAO,IAAI,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC,CAAC,gCAAgC;IAC/C,CAAC;IAED,MAAM,OAAO,GAAG,aAAa,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACxD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAEtC,MAAM,YAAY,GAAG,iBAAiB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAC7D,MAAM,UAAU,GAAG,eAAe,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAEzD,uBAAuB;IACvB,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAC7C,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACvC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;IACjD,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAExC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;AAC5D,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { startKanbanServer } from './server.js';
2
+ export type { KanbanServerOptions } from './server.js';
3
+ export { runPipeline, getBoardTasks, getRowLabels } from './pipeline.js';
4
+ export type { OnProgress, PipelineOptions } from './pipeline.js';
5
+ export type { KanbanTask, PipelinePhase, PipelineRow, TaskStatus, PhaseResult, TaskExecution, PipelineReport, RowReport, ProgressEvent, } from './types.js';
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRowLabels = exports.getBoardTasks = exports.runPipeline = exports.startKanbanServer = void 0;
4
+ // Kanban Pipeline Module
5
+ var server_js_1 = require("./server.js");
6
+ Object.defineProperty(exports, "startKanbanServer", { enumerable: true, get: function () { return server_js_1.startKanbanServer; } });
7
+ var pipeline_js_1 = require("./pipeline.js");
8
+ Object.defineProperty(exports, "runPipeline", { enumerable: true, get: function () { return pipeline_js_1.runPipeline; } });
9
+ Object.defineProperty(exports, "getBoardTasks", { enumerable: true, get: function () { return pipeline_js_1.getBoardTasks; } });
10
+ Object.defineProperty(exports, "getRowLabels", { enumerable: true, get: function () { return pipeline_js_1.getRowLabels; } });
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/kanban/index.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,yCAAgD;AAAvC,8GAAA,iBAAiB,OAAA;AAE1B,6CAAyE;AAAhE,0GAAA,WAAW,OAAA;AAAE,4GAAA,aAAa,OAAA;AAAE,2GAAA,YAAY,OAAA"}
@@ -0,0 +1,16 @@
1
+ import type { KanbanTask, PipelineRow, PipelineReport, ProgressEvent } from './types.js';
2
+ export type OnProgress = (event: ProgressEvent) => void;
3
+ export interface PipelineOptions {
4
+ /** Project root for running shell commands / tests. */
5
+ projectRoot: string;
6
+ /** Callback for real-time progress events. */
7
+ onProgress?: OnProgress;
8
+ }
9
+ /**
10
+ * Run every row through its pipeline phases.
11
+ * Tasks that originate in a given phase are only processed from that phase
12
+ * onward (e.g. a task in "execute" skips read and plan).
13
+ */
14
+ export declare function runPipeline(opts: PipelineOptions): Promise<PipelineReport>;
15
+ export declare function getBoardTasks(): KanbanTask[];
16
+ export declare function getRowLabels(): Record<PipelineRow, string>;