@stackmemoryai/stackmemory 0.3.22 → 0.3.25

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 (44) hide show
  1. package/dist/cli/commands/ralph.js +294 -0
  2. package/dist/cli/commands/ralph.js.map +7 -0
  3. package/dist/cli/index.js +2 -0
  4. package/dist/cli/index.js.map +2 -2
  5. package/dist/integrations/ralph/bridge/ralph-stackmemory-bridge.js +586 -0
  6. package/dist/integrations/ralph/bridge/ralph-stackmemory-bridge.js.map +7 -0
  7. package/dist/integrations/ralph/context/context-budget-manager.js +297 -0
  8. package/dist/integrations/ralph/context/context-budget-manager.js.map +7 -0
  9. package/dist/integrations/ralph/context/stackmemory-context-loader.js +356 -0
  10. package/dist/integrations/ralph/context/stackmemory-context-loader.js.map +7 -0
  11. package/dist/integrations/ralph/index.js +14 -0
  12. package/dist/integrations/ralph/index.js.map +7 -0
  13. package/dist/integrations/ralph/learning/pattern-learner.js +397 -0
  14. package/dist/integrations/ralph/learning/pattern-learner.js.map +7 -0
  15. package/dist/integrations/ralph/lifecycle/iteration-lifecycle.js +444 -0
  16. package/dist/integrations/ralph/lifecycle/iteration-lifecycle.js.map +7 -0
  17. package/dist/integrations/ralph/orchestration/multi-loop-orchestrator.js +459 -0
  18. package/dist/integrations/ralph/orchestration/multi-loop-orchestrator.js.map +7 -0
  19. package/dist/integrations/ralph/performance/performance-optimizer.js +354 -0
  20. package/dist/integrations/ralph/performance/performance-optimizer.js.map +7 -0
  21. package/dist/integrations/ralph/ralph-integration-demo.js +178 -0
  22. package/dist/integrations/ralph/ralph-integration-demo.js.map +7 -0
  23. package/dist/integrations/ralph/state/state-reconciler.js +400 -0
  24. package/dist/integrations/ralph/state/state-reconciler.js.map +7 -0
  25. package/dist/integrations/ralph/swarm/git-workflow-manager.js +309 -0
  26. package/dist/integrations/ralph/swarm/git-workflow-manager.js.map +7 -0
  27. package/dist/integrations/ralph/swarm/swarm-coordinator.js +656 -0
  28. package/dist/integrations/ralph/swarm/swarm-coordinator.js.map +7 -0
  29. package/dist/integrations/ralph/types.js +1 -0
  30. package/dist/integrations/ralph/types.js.map +7 -0
  31. package/dist/integrations/ralph/visualization/ralph-debugger.js +581 -0
  32. package/dist/integrations/ralph/visualization/ralph-debugger.js.map +7 -0
  33. package/package.json +1 -1
  34. package/scripts/deploy-ralph-swarm.sh +365 -0
  35. package/scripts/ralph-integration-test.js +274 -0
  36. package/scripts/ralph-loop-implementation.js +404 -0
  37. package/scripts/swarm-monitor.js +509 -0
  38. package/scripts/test-parallel-swarms.js +443 -0
  39. package/scripts/test-pre-publish-quick.sh +4 -2
  40. package/scripts/test-swarm-git-workflow.js +338 -0
  41. package/scripts/testing/ralph-cli-test.js +88 -0
  42. package/scripts/testing/ralph-integration-validation.js +727 -0
  43. package/scripts/testing/ralph-swarm-test-scenarios.js +613 -0
  44. package/scripts/validate-swarm-implementation.js +467 -0
@@ -0,0 +1,586 @@
1
+ import { v4 as uuidv4 } from "uuid";
2
+ import * as fs from "fs/promises";
3
+ import * as path from "path";
4
+ import { execSync } from "child_process";
5
+ import { logger } from "../../../core/monitoring/logger.js";
6
+ import { FrameManager } from "../../../core/context/frame-manager.js";
7
+ import { SessionManager } from "../../../core/session/session-manager.js";
8
+ import { ContextBudgetManager } from "../context/context-budget-manager.js";
9
+ import { StateReconciler } from "../state/state-reconciler.js";
10
+ import { IterationLifecycle } from "../lifecycle/iteration-lifecycle.js";
11
+ import { PerformanceOptimizer } from "../performance/performance-optimizer.js";
12
+ class RalphStackMemoryBridge {
13
+ state;
14
+ config;
15
+ frameManager;
16
+ sessionManager;
17
+ recoveryState;
18
+ ralphDir = ".ralph";
19
+ constructor(options) {
20
+ this.config = this.mergeConfig(options?.config);
21
+ this.state = {
22
+ initialized: false,
23
+ contextManager: new ContextBudgetManager(this.config.contextBudget),
24
+ stateReconciler: new StateReconciler(this.config.stateReconciliation),
25
+ performanceOptimizer: new PerformanceOptimizer(this.config.performance)
26
+ };
27
+ this.sessionManager = SessionManager.getInstance();
28
+ this.setupLifecycleHooks(options);
29
+ logger.info("Ralph-StackMemory Bridge initialized", {
30
+ config: {
31
+ maxTokens: this.config.contextBudget.maxTokens,
32
+ asyncSaves: this.config.performance.asyncSaves,
33
+ checkpoints: this.config.lifecycle.checkpoints.enabled
34
+ }
35
+ });
36
+ }
37
+ /**
38
+ * Initialize bridge with session
39
+ */
40
+ async initialize(options) {
41
+ logger.info("Initializing bridge", options);
42
+ try {
43
+ await this.sessionManager.initialize();
44
+ const session = await this.sessionManager.getOrCreateSession({
45
+ sessionId: options?.sessionId
46
+ });
47
+ this.state.currentSession = session;
48
+ this.frameManager = new FrameManager();
49
+ if (options?.loopId) {
50
+ await this.resumeLoop(options.loopId);
51
+ } else if (options?.task && options?.criteria) {
52
+ await this.createNewLoop(options.task, options.criteria);
53
+ } else {
54
+ await this.attemptRecovery();
55
+ }
56
+ this.state.initialized = true;
57
+ logger.info("Bridge initialized successfully");
58
+ } catch (error) {
59
+ logger.error("Bridge initialization failed", { error: error.message });
60
+ throw error;
61
+ }
62
+ }
63
+ /**
64
+ * Create new Ralph loop with StackMemory integration
65
+ */
66
+ async createNewLoop(task, criteria) {
67
+ logger.info("Creating new Ralph loop", { task: task.substring(0, 100) });
68
+ const loopId = uuidv4();
69
+ const startTime = Date.now();
70
+ const loopState = {
71
+ loopId,
72
+ task,
73
+ criteria,
74
+ iteration: 0,
75
+ status: "initialized",
76
+ startTime,
77
+ lastUpdateTime: startTime,
78
+ startCommit: await this.getCurrentGitCommit()
79
+ };
80
+ await this.initializeRalphDirectory(loopState);
81
+ const rootFrame = await this.createRootFrame(loopState);
82
+ await this.saveLoopState(loopState);
83
+ this.state.activeLoop = loopState;
84
+ logger.info("Ralph loop created", {
85
+ loopId,
86
+ frameId: rootFrame.frame_id
87
+ });
88
+ return loopState;
89
+ }
90
+ /**
91
+ * Resume existing loop
92
+ */
93
+ async resumeLoop(loopId) {
94
+ logger.info("Resuming loop", { loopId });
95
+ const sources = await this.gatherStateSources(loopId);
96
+ const reconciledState = await this.state.stateReconciler.reconcile(sources);
97
+ if (this.config.stateReconciliation.validateConsistency) {
98
+ const validation = await this.state.stateReconciler.validateConsistency(reconciledState);
99
+ if (validation.errors.length > 0) {
100
+ logger.error("State validation failed", { errors: validation.errors });
101
+ throw new Error(`Invalid state: ${validation.errors.join(", ")}`);
102
+ }
103
+ }
104
+ this.state.activeLoop = reconciledState;
105
+ const context = await this.loadIterationContext(reconciledState);
106
+ logger.info("Loop resumed", {
107
+ loopId,
108
+ iteration: reconciledState.iteration,
109
+ status: reconciledState.status
110
+ });
111
+ return reconciledState;
112
+ }
113
+ /**
114
+ * Run worker iteration
115
+ */
116
+ async runWorkerIteration() {
117
+ if (!this.state.activeLoop) {
118
+ throw new Error("No active loop");
119
+ }
120
+ const iterationNumber = this.state.activeLoop.iteration + 1;
121
+ logger.info("Starting worker iteration", { iteration: iterationNumber });
122
+ let context = await this.loadIterationContext(this.state.activeLoop);
123
+ context = this.state.contextManager.allocateBudget(context);
124
+ if (this.config.contextBudget.compressionEnabled) {
125
+ context = this.state.contextManager.compressContext(context);
126
+ }
127
+ const lifecycle = this.getLifecycle();
128
+ context = await lifecycle.startIteration(iterationNumber, context);
129
+ const iteration = await this.executeWorkerIteration(context);
130
+ await this.saveIterationResults(iteration);
131
+ await lifecycle.completeIteration(iteration);
132
+ this.state.activeLoop.iteration = iterationNumber;
133
+ this.state.activeLoop.lastUpdateTime = Date.now();
134
+ await this.saveLoopState(this.state.activeLoop);
135
+ logger.info("Worker iteration completed", {
136
+ iteration: iterationNumber,
137
+ changes: iteration.changes.length,
138
+ success: iteration.validation.testsPass
139
+ });
140
+ return iteration;
141
+ }
142
+ /**
143
+ * Run reviewer iteration
144
+ */
145
+ async runReviewerIteration() {
146
+ if (!this.state.activeLoop) {
147
+ throw new Error("No active loop");
148
+ }
149
+ logger.info("Starting reviewer iteration", {
150
+ iteration: this.state.activeLoop.iteration
151
+ });
152
+ const evaluation = await this.evaluateCompletion();
153
+ if (evaluation.complete) {
154
+ this.state.activeLoop.status = "completed";
155
+ this.state.activeLoop.completionData = evaluation;
156
+ await this.saveLoopState(this.state.activeLoop);
157
+ const lifecycle = this.getLifecycle();
158
+ await lifecycle.handleCompletion(this.state.activeLoop);
159
+ logger.info("Task completed successfully");
160
+ return { complete: true };
161
+ }
162
+ const feedback = this.generateFeedback(evaluation);
163
+ this.state.activeLoop.feedback = feedback;
164
+ await this.saveLoopState(this.state.activeLoop);
165
+ logger.info("Reviewer iteration completed", {
166
+ complete: false,
167
+ feedbackLength: feedback.length
168
+ });
169
+ return { complete: false, feedback };
170
+ }
171
+ /**
172
+ * Rehydrate session from StackMemory
173
+ */
174
+ async rehydrateSession(sessionId) {
175
+ logger.info("Rehydrating session", { sessionId });
176
+ const session = await this.sessionManager.getSession(sessionId);
177
+ if (!session) {
178
+ throw new Error(`Session not found: ${sessionId}`);
179
+ }
180
+ const frames = await this.loadSessionFrames(sessionId);
181
+ const ralphFrames = frames.filter((f) => f.type === "task" && f.name.startsWith("ralph-"));
182
+ if (ralphFrames.length === 0) {
183
+ throw new Error("No Ralph loops found in session");
184
+ }
185
+ const latestLoop = ralphFrames[ralphFrames.length - 1];
186
+ const loopState = await this.reconstructLoopState(latestLoop);
187
+ const context = await this.buildContextFromFrames(frames, loopState);
188
+ this.state.activeLoop = loopState;
189
+ logger.info("Session rehydrated", {
190
+ loopId: loopState.loopId,
191
+ iteration: loopState.iteration,
192
+ frameCount: frames.length
193
+ });
194
+ return context;
195
+ }
196
+ /**
197
+ * Create checkpoint
198
+ */
199
+ async createCheckpoint() {
200
+ if (!this.state.activeLoop) {
201
+ throw new Error("No active loop");
202
+ }
203
+ const lifecycle = this.getLifecycle();
204
+ const iteration = {
205
+ number: this.state.activeLoop.iteration,
206
+ timestamp: Date.now(),
207
+ analysis: {
208
+ filesCount: 0,
209
+ testsPass: true,
210
+ testsFail: 0,
211
+ lastChange: await this.getCurrentGitCommit()
212
+ },
213
+ plan: {
214
+ summary: "Checkpoint",
215
+ steps: [],
216
+ priority: "low"
217
+ },
218
+ changes: [],
219
+ validation: {
220
+ testsPass: true,
221
+ lintClean: true,
222
+ buildSuccess: true,
223
+ errors: [],
224
+ warnings: []
225
+ }
226
+ };
227
+ const checkpoint = await lifecycle.createCheckpoint(iteration);
228
+ logger.info("Checkpoint created", {
229
+ id: checkpoint.id,
230
+ iteration: checkpoint.iteration
231
+ });
232
+ return checkpoint;
233
+ }
234
+ /**
235
+ * Restore from checkpoint
236
+ */
237
+ async restoreFromCheckpoint(checkpointId) {
238
+ const lifecycle = this.getLifecycle();
239
+ await lifecycle.restoreFromCheckpoint(checkpointId);
240
+ const sources = await this.gatherStateSources(this.state.activeLoop?.loopId || "");
241
+ const reconciledState = await this.state.stateReconciler.reconcile(sources);
242
+ this.state.activeLoop = reconciledState;
243
+ logger.info("Restored from checkpoint", {
244
+ checkpointId,
245
+ iteration: reconciledState.iteration
246
+ });
247
+ }
248
+ /**
249
+ * Get performance metrics
250
+ */
251
+ getPerformanceMetrics() {
252
+ return this.state.performanceOptimizer.getMetrics();
253
+ }
254
+ /**
255
+ * Cleanup resources
256
+ */
257
+ async cleanup() {
258
+ logger.info("Cleaning up bridge resources");
259
+ await this.state.performanceOptimizer.flushBatch();
260
+ this.getLifecycle().cleanup();
261
+ this.state.performanceOptimizer.cleanup();
262
+ logger.info("Bridge cleanup completed");
263
+ }
264
+ /**
265
+ * Merge configuration with defaults
266
+ */
267
+ mergeConfig(config) {
268
+ return {
269
+ contextBudget: {
270
+ maxTokens: 4e3,
271
+ priorityWeights: {
272
+ task: 0.3,
273
+ recentWork: 0.25,
274
+ feedback: 0.2,
275
+ gitHistory: 0.15,
276
+ dependencies: 0.1
277
+ },
278
+ compressionEnabled: true,
279
+ adaptiveBudgeting: true,
280
+ ...config?.contextBudget
281
+ },
282
+ stateReconciliation: {
283
+ precedence: ["git", "files", "memory"],
284
+ conflictResolution: "automatic",
285
+ syncInterval: 5e3,
286
+ validateConsistency: true,
287
+ ...config?.stateReconciliation
288
+ },
289
+ lifecycle: {
290
+ hooks: {
291
+ preIteration: true,
292
+ postIteration: true,
293
+ onStateChange: true,
294
+ onError: true,
295
+ onComplete: true
296
+ },
297
+ checkpoints: {
298
+ enabled: true,
299
+ frequency: 5,
300
+ retentionDays: 7
301
+ },
302
+ ...config?.lifecycle
303
+ },
304
+ performance: {
305
+ asyncSaves: true,
306
+ batchSize: 10,
307
+ compressionLevel: 2,
308
+ cacheEnabled: true,
309
+ parallelOperations: true,
310
+ ...config?.performance
311
+ }
312
+ };
313
+ }
314
+ /**
315
+ * Setup lifecycle hooks
316
+ */
317
+ setupLifecycleHooks(options) {
318
+ const hooks = {
319
+ preIteration: async (context) => {
320
+ logger.debug("Pre-iteration hook", {
321
+ iteration: context.task.currentIteration
322
+ });
323
+ return context;
324
+ },
325
+ postIteration: async (iteration) => {
326
+ await this.saveIterationFrame(iteration);
327
+ },
328
+ onStateChange: async (oldState, newState) => {
329
+ await this.updateStateFrame(oldState, newState);
330
+ },
331
+ onError: async (error, context) => {
332
+ logger.error("Iteration error", { error: error.message, context });
333
+ await this.saveErrorFrame(error, context);
334
+ },
335
+ onComplete: async (state) => {
336
+ await this.closeRootFrame(state);
337
+ }
338
+ };
339
+ const lifecycle = new IterationLifecycle(this.config.lifecycle, hooks);
340
+ this.state.lifecycle = lifecycle;
341
+ }
342
+ /**
343
+ * Get lifecycle instance
344
+ */
345
+ getLifecycle() {
346
+ return this.state.lifecycle;
347
+ }
348
+ /**
349
+ * Initialize Ralph directory structure
350
+ */
351
+ async initializeRalphDirectory(state) {
352
+ await fs.mkdir(this.ralphDir, { recursive: true });
353
+ await fs.mkdir(path.join(this.ralphDir, "history"), { recursive: true });
354
+ await fs.writeFile(path.join(this.ralphDir, "task.md"), state.task);
355
+ await fs.writeFile(path.join(this.ralphDir, "completion-criteria.md"), state.criteria);
356
+ await fs.writeFile(path.join(this.ralphDir, "iteration.txt"), "0");
357
+ await fs.writeFile(path.join(this.ralphDir, "feedback.txt"), "");
358
+ await fs.writeFile(
359
+ path.join(this.ralphDir, "state.json"),
360
+ JSON.stringify(state, null, 2)
361
+ );
362
+ }
363
+ /**
364
+ * Create root frame for Ralph loop
365
+ */
366
+ async createRootFrame(state) {
367
+ if (!this.frameManager) {
368
+ throw new Error("Frame manager not initialized");
369
+ }
370
+ const frame = {
371
+ type: "task",
372
+ name: `ralph-${state.loopId}`,
373
+ inputs: {
374
+ task: state.task,
375
+ criteria: state.criteria,
376
+ loopId: state.loopId
377
+ },
378
+ digest_json: {
379
+ type: "ralph_loop",
380
+ status: "started"
381
+ }
382
+ };
383
+ return await this.frameManager.pushFrame(frame);
384
+ }
385
+ /**
386
+ * Load iteration context from StackMemory
387
+ */
388
+ async loadIterationContext(state) {
389
+ const frames = await this.loadRelevantFrames(state.loopId);
390
+ return {
391
+ task: {
392
+ description: state.task,
393
+ criteria: state.criteria.split("\n").filter(Boolean),
394
+ currentIteration: state.iteration,
395
+ feedback: state.feedback,
396
+ priority: "medium"
397
+ },
398
+ history: {
399
+ recentIterations: await this.loadRecentIterations(state.loopId),
400
+ gitCommits: await this.loadGitCommits(),
401
+ changedFiles: await this.loadChangedFiles(),
402
+ testResults: []
403
+ },
404
+ environment: {
405
+ projectPath: process.cwd(),
406
+ branch: await this.getCurrentBranch(),
407
+ dependencies: {},
408
+ configuration: {}
409
+ },
410
+ memory: {
411
+ relevantFrames: frames,
412
+ decisions: [],
413
+ patterns: [],
414
+ blockers: []
415
+ },
416
+ tokenCount: 0
417
+ };
418
+ }
419
+ /**
420
+ * Execute worker iteration
421
+ */
422
+ async executeWorkerIteration(context) {
423
+ return {
424
+ number: context.task.currentIteration + 1,
425
+ timestamp: Date.now(),
426
+ analysis: {
427
+ filesCount: 10,
428
+ testsPass: true,
429
+ testsFail: 0,
430
+ lastChange: "Mock change"
431
+ },
432
+ plan: {
433
+ summary: "Mock iteration plan",
434
+ steps: ["Step 1", "Step 2"],
435
+ priority: "medium"
436
+ },
437
+ changes: [],
438
+ validation: {
439
+ testsPass: true,
440
+ lintClean: true,
441
+ buildSuccess: true,
442
+ errors: [],
443
+ warnings: []
444
+ }
445
+ };
446
+ }
447
+ /**
448
+ * Save iteration results
449
+ */
450
+ async saveIterationResults(iteration) {
451
+ await this.state.performanceOptimizer.saveIteration(iteration);
452
+ const iterDir = path.join(
453
+ this.ralphDir,
454
+ "history",
455
+ `iteration-${String(iteration.number).padStart(3, "0")}`
456
+ );
457
+ await fs.mkdir(iterDir, { recursive: true });
458
+ await fs.writeFile(
459
+ path.join(iterDir, "artifacts.json"),
460
+ JSON.stringify(iteration, null, 2)
461
+ );
462
+ }
463
+ /**
464
+ * Save iteration frame to StackMemory
465
+ */
466
+ async saveIterationFrame(iteration) {
467
+ if (!this.frameManager || !this.state.activeLoop) return;
468
+ const frame = {
469
+ type: "subtask",
470
+ name: `iteration-${iteration.number}`,
471
+ inputs: {
472
+ iterationNumber: iteration.number,
473
+ loopId: this.state.activeLoop.loopId
474
+ },
475
+ outputs: {
476
+ changes: iteration.changes.length,
477
+ success: iteration.validation.testsPass
478
+ },
479
+ digest_json: iteration
480
+ };
481
+ await this.state.performanceOptimizer.saveFrame(frame);
482
+ }
483
+ /**
484
+ * Additional helper methods
485
+ */
486
+ async getCurrentGitCommit() {
487
+ try {
488
+ return execSync("git rev-parse HEAD", { encoding: "utf8" }).trim();
489
+ } catch {
490
+ return "";
491
+ }
492
+ }
493
+ async getCurrentBranch() {
494
+ try {
495
+ return execSync("git branch --show-current", { encoding: "utf8" }).trim();
496
+ } catch {
497
+ return "main";
498
+ }
499
+ }
500
+ async saveLoopState(state) {
501
+ await fs.writeFile(
502
+ path.join(this.ralphDir, "state.json"),
503
+ JSON.stringify(state, null, 2)
504
+ );
505
+ }
506
+ async gatherStateSources(loopId) {
507
+ const sources = [];
508
+ sources.push(await this.state.stateReconciler.getGitState());
509
+ sources.push(await this.state.stateReconciler.getFileState());
510
+ sources.push(await this.state.stateReconciler.getMemoryState(loopId));
511
+ return sources;
512
+ }
513
+ async attemptRecovery() {
514
+ logger.info("Attempting crash recovery");
515
+ try {
516
+ const stateFile = path.join(this.ralphDir, "state.json");
517
+ const exists = await fs.stat(stateFile).then(() => true).catch(() => false);
518
+ if (exists) {
519
+ const stateData = await fs.readFile(stateFile, "utf8");
520
+ const state = JSON.parse(stateData);
521
+ if (state.status !== "completed") {
522
+ logger.info("Found incomplete loop", { loopId: state.loopId });
523
+ await this.resumeLoop(state.loopId);
524
+ }
525
+ }
526
+ } catch (error) {
527
+ logger.error("Recovery failed", { error: error.message });
528
+ }
529
+ }
530
+ async evaluateCompletion() {
531
+ return {
532
+ complete: false,
533
+ criteria: {},
534
+ unmet: ["criteria1", "criteria2"]
535
+ };
536
+ }
537
+ generateFeedback(evaluation) {
538
+ if (evaluation.unmet.length === 0) {
539
+ return "All criteria met";
540
+ }
541
+ return `Still need to address:
542
+ ${evaluation.unmet.map((c) => `- ${c}`).join("\n")}`;
543
+ }
544
+ async loadRelevantFrames(loopId) {
545
+ return [];
546
+ }
547
+ async loadRecentIterations(loopId) {
548
+ return [];
549
+ }
550
+ async loadGitCommits() {
551
+ return [];
552
+ }
553
+ async loadChangedFiles() {
554
+ return [];
555
+ }
556
+ async loadSessionFrames(sessionId) {
557
+ return [];
558
+ }
559
+ async reconstructLoopState(frame) {
560
+ return {
561
+ loopId: frame.inputs.loopId || "",
562
+ task: frame.inputs.task || "",
563
+ criteria: frame.inputs.criteria || "",
564
+ iteration: 0,
565
+ status: "running",
566
+ startTime: frame.created_at,
567
+ lastUpdateTime: Date.now()
568
+ };
569
+ }
570
+ async buildContextFromFrames(frames, state) {
571
+ return await this.loadIterationContext(state);
572
+ }
573
+ async updateStateFrame(oldState, newState) {
574
+ logger.debug("State frame updated");
575
+ }
576
+ async saveErrorFrame(error, context) {
577
+ logger.debug("Error frame saved");
578
+ }
579
+ async closeRootFrame(state) {
580
+ logger.debug("Root frame closed");
581
+ }
582
+ }
583
+ export {
584
+ RalphStackMemoryBridge
585
+ };
586
+ //# sourceMappingURL=ralph-stackmemory-bridge.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/integrations/ralph/bridge/ralph-stackmemory-bridge.ts"],
4
+ "sourcesContent": ["/**\n * Ralph-StackMemory Bridge\n * Main integration point connecting Ralph Wiggum loops with StackMemory persistence\n */\n\nimport { v4 as uuidv4 } from 'uuid';\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { execSync } from 'child_process';\nimport { logger } from '../../../core/monitoring/logger.js';\nimport { FrameManager } from '../../../core/context/frame-manager.js';\nimport { SessionManager } from '../../../core/session/session-manager.js';\nimport { ContextBudgetManager } from '../context/context-budget-manager.js';\nimport { StateReconciler } from '../state/state-reconciler.js';\nimport { IterationLifecycle, LifecycleHooks } from '../lifecycle/iteration-lifecycle.js';\nimport { PerformanceOptimizer } from '../performance/performance-optimizer.js';\nimport {\n RalphLoopState,\n RalphIteration,\n BridgeState,\n BridgeOptions,\n RalphStackMemoryConfig,\n IterationContext,\n Frame,\n FrameType,\n RecoveryState,\n Checkpoint,\n StateSource,\n} from '../types.js';\n\nexport class RalphStackMemoryBridge {\n private state: BridgeState;\n private config: RalphStackMemoryConfig;\n private frameManager?: FrameManager;\n private sessionManager: SessionManager;\n private recoveryState?: RecoveryState;\n private readonly ralphDir = '.ralph';\n\n constructor(options?: BridgeOptions) {\n // Initialize configuration\n this.config = this.mergeConfig(options?.config);\n\n // Initialize managers\n this.state = {\n initialized: false,\n contextManager: new ContextBudgetManager(this.config.contextBudget),\n stateReconciler: new StateReconciler(this.config.stateReconciliation),\n performanceOptimizer: new PerformanceOptimizer(this.config.performance),\n };\n\n this.sessionManager = SessionManager.getInstance();\n\n // Setup lifecycle hooks\n this.setupLifecycleHooks(options);\n\n logger.info('Ralph-StackMemory Bridge initialized', {\n config: {\n maxTokens: this.config.contextBudget.maxTokens,\n asyncSaves: this.config.performance.asyncSaves,\n checkpoints: this.config.lifecycle.checkpoints.enabled,\n },\n });\n }\n\n /**\n * Initialize bridge with session\n */\n async initialize(options?: {\n sessionId?: string;\n loopId?: string;\n task?: string;\n criteria?: string;\n }): Promise<void> {\n logger.info('Initializing bridge', options);\n\n try {\n // Initialize session manager\n await this.sessionManager.initialize();\n\n // Get or create session\n const session = await this.sessionManager.getOrCreateSession({\n sessionId: options?.sessionId,\n });\n\n this.state.currentSession = session;\n\n // Initialize frame manager\n this.frameManager = new FrameManager();\n\n // Check for existing loop or create new\n if (options?.loopId) {\n await this.resumeLoop(options.loopId);\n } else if (options?.task && options?.criteria) {\n await this.createNewLoop(options.task, options.criteria);\n } else {\n // Try to recover from crash\n await this.attemptRecovery();\n }\n\n this.state.initialized = true;\n logger.info('Bridge initialized successfully');\n } catch (error: any) {\n logger.error('Bridge initialization failed', { error: error.message });\n throw error;\n }\n }\n\n /**\n * Create new Ralph loop with StackMemory integration\n */\n async createNewLoop(task: string, criteria: string): Promise<RalphLoopState> {\n logger.info('Creating new Ralph loop', { task: task.substring(0, 100) });\n\n const loopId = uuidv4();\n const startTime = Date.now();\n\n // Create Ralph loop state\n const loopState: RalphLoopState = {\n loopId,\n task,\n criteria,\n iteration: 0,\n status: 'initialized',\n startTime,\n lastUpdateTime: startTime,\n startCommit: await this.getCurrentGitCommit(),\n };\n\n // Initialize Ralph directory structure\n await this.initializeRalphDirectory(loopState);\n\n // Create root frame in StackMemory\n const rootFrame = await this.createRootFrame(loopState);\n\n // Save initial state\n await this.saveLoopState(loopState);\n\n this.state.activeLoop = loopState;\n\n logger.info('Ralph loop created', {\n loopId,\n frameId: rootFrame.frame_id,\n });\n\n return loopState;\n }\n\n /**\n * Resume existing loop\n */\n async resumeLoop(loopId: string): Promise<RalphLoopState> {\n logger.info('Resuming loop', { loopId });\n\n // Get state from all sources\n const sources = await this.gatherStateSources(loopId);\n\n // Reconcile state\n const reconciledState = await this.state.stateReconciler!.reconcile(sources);\n\n // Validate consistency\n if (this.config.stateReconciliation.validateConsistency) {\n const validation = await this.state.stateReconciler!.validateConsistency(reconciledState);\n \n if (validation.errors.length > 0) {\n logger.error('State validation failed', { errors: validation.errors });\n throw new Error(`Invalid state: ${validation.errors.join(', ')}`);\n }\n }\n\n this.state.activeLoop = reconciledState;\n\n // Load context from StackMemory\n const context = await this.loadIterationContext(reconciledState);\n\n logger.info('Loop resumed', {\n loopId,\n iteration: reconciledState.iteration,\n status: reconciledState.status,\n });\n\n return reconciledState;\n }\n\n /**\n * Run worker iteration\n */\n async runWorkerIteration(): Promise<RalphIteration> {\n if (!this.state.activeLoop) {\n throw new Error('No active loop');\n }\n\n const iterationNumber = this.state.activeLoop.iteration + 1;\n logger.info('Starting worker iteration', { iteration: iterationNumber });\n\n // Load and prepare context\n let context = await this.loadIterationContext(this.state.activeLoop);\n \n // Apply context budget management\n context = this.state.contextManager!.allocateBudget(context);\n \n if (this.config.contextBudget.compressionEnabled) {\n context = this.state.contextManager!.compressContext(context);\n }\n\n // Start iteration with lifecycle\n const lifecycle = this.getLifecycle();\n context = await lifecycle.startIteration(iterationNumber, context);\n\n // Execute iteration work\n const iteration = await this.executeWorkerIteration(context);\n\n // Save iteration results\n await this.saveIterationResults(iteration);\n\n // Complete iteration with lifecycle\n await lifecycle.completeIteration(iteration);\n\n // Update loop state\n this.state.activeLoop.iteration = iterationNumber;\n this.state.activeLoop.lastUpdateTime = Date.now();\n await this.saveLoopState(this.state.activeLoop);\n\n logger.info('Worker iteration completed', {\n iteration: iterationNumber,\n changes: iteration.changes.length,\n success: iteration.validation.testsPass,\n });\n\n return iteration;\n }\n\n /**\n * Run reviewer iteration\n */\n async runReviewerIteration(): Promise<{ complete: boolean; feedback?: string }> {\n if (!this.state.activeLoop) {\n throw new Error('No active loop');\n }\n\n logger.info('Starting reviewer iteration', {\n iteration: this.state.activeLoop.iteration,\n });\n\n // Evaluate against criteria\n const evaluation = await this.evaluateCompletion();\n\n if (evaluation.complete) {\n // Mark as complete\n this.state.activeLoop.status = 'completed';\n this.state.activeLoop.completionData = evaluation;\n await this.saveLoopState(this.state.activeLoop);\n\n // Handle completion\n const lifecycle = this.getLifecycle();\n await lifecycle.handleCompletion(this.state.activeLoop);\n\n logger.info('Task completed successfully');\n return { complete: true };\n }\n\n // Generate feedback for next iteration\n const feedback = this.generateFeedback(evaluation);\n this.state.activeLoop.feedback = feedback;\n \n await this.saveLoopState(this.state.activeLoop);\n\n logger.info('Reviewer iteration completed', {\n complete: false,\n feedbackLength: feedback.length,\n });\n\n return { complete: false, feedback };\n }\n\n /**\n * Rehydrate session from StackMemory\n */\n async rehydrateSession(sessionId: string): Promise<IterationContext> {\n logger.info('Rehydrating session', { sessionId });\n\n // Get session from StackMemory\n const session = await this.sessionManager.getSession(sessionId);\n \n if (!session) {\n throw new Error(`Session not found: ${sessionId}`);\n }\n\n // Load frames from session\n const frames = await this.loadSessionFrames(sessionId);\n\n // Extract Ralph loop information\n const ralphFrames = frames.filter(f => f.type === 'task' && f.name.startsWith('ralph-'));\n \n if (ralphFrames.length === 0) {\n throw new Error('No Ralph loops found in session');\n }\n\n // Get most recent Ralph loop\n const latestLoop = ralphFrames[ralphFrames.length - 1];\n\n // Reconstruct loop state\n const loopState = await this.reconstructLoopState(latestLoop);\n\n // Build context from frames\n const context = await this.buildContextFromFrames(frames, loopState);\n\n this.state.activeLoop = loopState;\n\n logger.info('Session rehydrated', {\n loopId: loopState.loopId,\n iteration: loopState.iteration,\n frameCount: frames.length,\n });\n\n return context;\n }\n\n /**\n * Create checkpoint\n */\n async createCheckpoint(): Promise<Checkpoint> {\n if (!this.state.activeLoop) {\n throw new Error('No active loop');\n }\n\n const lifecycle = this.getLifecycle();\n \n // Create dummy iteration for checkpoint\n const iteration: RalphIteration = {\n number: this.state.activeLoop.iteration,\n timestamp: Date.now(),\n analysis: {\n filesCount: 0,\n testsPass: true,\n testsFail: 0,\n lastChange: await this.getCurrentGitCommit(),\n },\n plan: {\n summary: 'Checkpoint',\n steps: [],\n priority: 'low',\n },\n changes: [],\n validation: {\n testsPass: true,\n lintClean: true,\n buildSuccess: true,\n errors: [],\n warnings: [],\n },\n };\n\n const checkpoint = await lifecycle.createCheckpoint(iteration);\n\n logger.info('Checkpoint created', {\n id: checkpoint.id,\n iteration: checkpoint.iteration,\n });\n\n return checkpoint;\n }\n\n /**\n * Restore from checkpoint\n */\n async restoreFromCheckpoint(checkpointId: string): Promise<void> {\n const lifecycle = this.getLifecycle();\n await lifecycle.restoreFromCheckpoint(checkpointId);\n\n // Reload loop state\n const sources = await this.gatherStateSources(this.state.activeLoop?.loopId || '');\n const reconciledState = await this.state.stateReconciler!.reconcile(sources);\n \n this.state.activeLoop = reconciledState;\n\n logger.info('Restored from checkpoint', {\n checkpointId,\n iteration: reconciledState.iteration,\n });\n }\n\n /**\n * Get performance metrics\n */\n getPerformanceMetrics() {\n return this.state.performanceOptimizer!.getMetrics();\n }\n\n /**\n * Cleanup resources\n */\n async cleanup(): Promise<void> {\n logger.info('Cleaning up bridge resources');\n\n // Flush any pending saves\n await this.state.performanceOptimizer!.flushBatch();\n\n // Clean up lifecycle\n this.getLifecycle().cleanup();\n\n // Clean up optimizer\n this.state.performanceOptimizer!.cleanup();\n\n logger.info('Bridge cleanup completed');\n }\n\n /**\n * Merge configuration with defaults\n */\n private mergeConfig(config?: Partial<RalphStackMemoryConfig>): RalphStackMemoryConfig {\n return {\n contextBudget: {\n maxTokens: 4000,\n priorityWeights: {\n task: 0.3,\n recentWork: 0.25,\n feedback: 0.2,\n gitHistory: 0.15,\n dependencies: 0.1,\n },\n compressionEnabled: true,\n adaptiveBudgeting: true,\n ...config?.contextBudget,\n },\n stateReconciliation: {\n precedence: ['git', 'files', 'memory'],\n conflictResolution: 'automatic',\n syncInterval: 5000,\n validateConsistency: true,\n ...config?.stateReconciliation,\n },\n lifecycle: {\n hooks: {\n preIteration: true,\n postIteration: true,\n onStateChange: true,\n onError: true,\n onComplete: true,\n },\n checkpoints: {\n enabled: true,\n frequency: 5,\n retentionDays: 7,\n },\n ...config?.lifecycle,\n },\n performance: {\n asyncSaves: true,\n batchSize: 10,\n compressionLevel: 2,\n cacheEnabled: true,\n parallelOperations: true,\n ...config?.performance,\n },\n };\n }\n\n /**\n * Setup lifecycle hooks\n */\n private setupLifecycleHooks(options?: BridgeOptions): void {\n const hooks: LifecycleHooks = {\n preIteration: async (context) => {\n logger.debug('Pre-iteration hook', {\n iteration: context.task.currentIteration,\n });\n return context;\n },\n postIteration: async (iteration) => {\n // Save to StackMemory\n await this.saveIterationFrame(iteration);\n },\n onStateChange: async (oldState, newState) => {\n // Update StackMemory with state change\n await this.updateStateFrame(oldState, newState);\n },\n onError: async (error, context) => {\n logger.error('Iteration error', { error: error.message, context });\n // Save error frame\n await this.saveErrorFrame(error, context);\n },\n onComplete: async (state) => {\n // Close root frame\n await this.closeRootFrame(state);\n },\n };\n\n const lifecycle = new IterationLifecycle(this.config.lifecycle, hooks);\n (this.state as any).lifecycle = lifecycle;\n }\n\n /**\n * Get lifecycle instance\n */\n private getLifecycle(): IterationLifecycle {\n return (this.state as any).lifecycle;\n }\n\n /**\n * Initialize Ralph directory structure\n */\n private async initializeRalphDirectory(state: RalphLoopState): Promise<void> {\n await fs.mkdir(this.ralphDir, { recursive: true });\n await fs.mkdir(path.join(this.ralphDir, 'history'), { recursive: true });\n\n // Write initial files\n await fs.writeFile(path.join(this.ralphDir, 'task.md'), state.task);\n await fs.writeFile(path.join(this.ralphDir, 'completion-criteria.md'), state.criteria);\n await fs.writeFile(path.join(this.ralphDir, 'iteration.txt'), '0');\n await fs.writeFile(path.join(this.ralphDir, 'feedback.txt'), '');\n await fs.writeFile(\n path.join(this.ralphDir, 'state.json'),\n JSON.stringify(state, null, 2)\n );\n }\n\n /**\n * Create root frame for Ralph loop\n */\n private async createRootFrame(state: RalphLoopState): Promise<Frame> {\n if (!this.frameManager) {\n throw new Error('Frame manager not initialized');\n }\n\n const frame: Partial<Frame> = {\n type: 'task' as FrameType,\n name: `ralph-${state.loopId}`,\n inputs: {\n task: state.task,\n criteria: state.criteria,\n loopId: state.loopId,\n },\n digest_json: {\n type: 'ralph_loop',\n status: 'started',\n },\n };\n\n return await this.frameManager.pushFrame(frame as any);\n }\n\n /**\n * Load iteration context from StackMemory\n */\n private async loadIterationContext(state: RalphLoopState): Promise<IterationContext> {\n const frames = await this.loadRelevantFrames(state.loopId);\n \n return {\n task: {\n description: state.task,\n criteria: state.criteria.split('\\n').filter(Boolean),\n currentIteration: state.iteration,\n feedback: state.feedback,\n priority: 'medium',\n },\n history: {\n recentIterations: await this.loadRecentIterations(state.loopId),\n gitCommits: await this.loadGitCommits(),\n changedFiles: await this.loadChangedFiles(),\n testResults: [],\n },\n environment: {\n projectPath: process.cwd(),\n branch: await this.getCurrentBranch(),\n dependencies: {},\n configuration: {},\n },\n memory: {\n relevantFrames: frames,\n decisions: [],\n patterns: [],\n blockers: [],\n },\n tokenCount: 0,\n };\n }\n\n /**\n * Execute worker iteration\n */\n private async executeWorkerIteration(context: IterationContext): Promise<RalphIteration> {\n // This would integrate with the actual Ralph loop implementation\n // For now, returning a mock iteration\n return {\n number: context.task.currentIteration + 1,\n timestamp: Date.now(),\n analysis: {\n filesCount: 10,\n testsPass: true,\n testsFail: 0,\n lastChange: 'Mock change',\n },\n plan: {\n summary: 'Mock iteration plan',\n steps: ['Step 1', 'Step 2'],\n priority: 'medium',\n },\n changes: [],\n validation: {\n testsPass: true,\n lintClean: true,\n buildSuccess: true,\n errors: [],\n warnings: [],\n },\n };\n }\n\n /**\n * Save iteration results\n */\n private async saveIterationResults(iteration: RalphIteration): Promise<void> {\n // Save with performance optimization\n await this.state.performanceOptimizer!.saveIteration(iteration);\n\n // Save iteration artifacts to Ralph directory\n const iterDir = path.join(\n this.ralphDir,\n 'history',\n `iteration-${String(iteration.number).padStart(3, '0')}`\n );\n \n await fs.mkdir(iterDir, { recursive: true });\n await fs.writeFile(\n path.join(iterDir, 'artifacts.json'),\n JSON.stringify(iteration, null, 2)\n );\n }\n\n /**\n * Save iteration frame to StackMemory\n */\n private async saveIterationFrame(iteration: RalphIteration): Promise<void> {\n if (!this.frameManager || !this.state.activeLoop) return;\n\n const frame: Partial<Frame> = {\n type: 'subtask' as FrameType,\n name: `iteration-${iteration.number}`,\n inputs: {\n iterationNumber: iteration.number,\n loopId: this.state.activeLoop.loopId,\n },\n outputs: {\n changes: iteration.changes.length,\n success: iteration.validation.testsPass,\n },\n digest_json: iteration,\n };\n\n await this.state.performanceOptimizer!.saveFrame(frame as Frame);\n }\n\n /**\n * Additional helper methods\n */\n private async getCurrentGitCommit(): Promise<string> {\n try {\n // execSync already imported at top\n return execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim();\n } catch {\n return '';\n }\n }\n\n private async getCurrentBranch(): Promise<string> {\n try {\n // execSync already imported at top\n return execSync('git branch --show-current', { encoding: 'utf8' }).trim();\n } catch {\n return 'main';\n }\n }\n\n private async saveLoopState(state: RalphLoopState): Promise<void> {\n await fs.writeFile(\n path.join(this.ralphDir, 'state.json'),\n JSON.stringify(state, null, 2)\n );\n }\n\n private async gatherStateSources(loopId: string): Promise<StateSource[]> {\n const sources: StateSource[] = [];\n\n // Get git state\n sources.push(await this.state.stateReconciler!.getGitState());\n\n // Get file state\n sources.push(await this.state.stateReconciler!.getFileState());\n\n // Get memory state\n sources.push(await this.state.stateReconciler!.getMemoryState(loopId));\n\n return sources;\n }\n\n private async attemptRecovery(): Promise<void> {\n logger.info('Attempting crash recovery');\n\n try {\n // Check for incomplete loops in file system\n const stateFile = path.join(this.ralphDir, 'state.json');\n const exists = await fs.stat(stateFile).then(() => true).catch(() => false);\n\n if (exists) {\n const stateData = await fs.readFile(stateFile, 'utf8');\n const state = JSON.parse(stateData) as RalphLoopState;\n\n if (state.status !== 'completed') {\n logger.info('Found incomplete loop', { loopId: state.loopId });\n await this.resumeLoop(state.loopId);\n }\n }\n } catch (error: any) {\n logger.error('Recovery failed', { error: error.message });\n }\n }\n\n private async evaluateCompletion(): Promise<any> {\n // This would evaluate completion criteria\n // Placeholder implementation\n return {\n complete: false,\n criteria: {},\n unmet: ['criteria1', 'criteria2'],\n };\n }\n\n private generateFeedback(evaluation: any): string {\n if (evaluation.unmet.length === 0) {\n return 'All criteria met';\n }\n return `Still need to address:\\n${evaluation.unmet.map((c: string) => `- ${c}`).join('\\n')}`;\n }\n\n private async loadRelevantFrames(loopId: string): Promise<Frame[]> {\n // This would load frames from StackMemory\n // Placeholder implementation\n return [];\n }\n\n private async loadRecentIterations(loopId: string): Promise<any[]> {\n // Load recent iteration summaries\n return [];\n }\n\n private async loadGitCommits(): Promise<any[]> {\n // Load recent git commits\n return [];\n }\n\n private async loadChangedFiles(): Promise<string[]> {\n // Load recently changed files\n return [];\n }\n\n private async loadSessionFrames(sessionId: string): Promise<Frame[]> {\n // Load frames from session\n return [];\n }\n\n private async reconstructLoopState(frame: Frame): Promise<RalphLoopState> {\n // Reconstruct loop state from frame\n return {\n loopId: frame.inputs.loopId || '',\n task: frame.inputs.task || '',\n criteria: frame.inputs.criteria || '',\n iteration: 0,\n status: 'running',\n startTime: frame.created_at,\n lastUpdateTime: Date.now(),\n };\n }\n\n private async buildContextFromFrames(\n frames: Frame[],\n state: RalphLoopState\n ): Promise<IterationContext> {\n // Build context from frames\n return await this.loadIterationContext(state);\n }\n\n private async updateStateFrame(\n oldState: RalphLoopState,\n newState: RalphLoopState\n ): Promise<void> {\n // Update state in StackMemory\n logger.debug('State frame updated');\n }\n\n private async saveErrorFrame(error: Error, context: any): Promise<void> {\n // Save error as frame\n logger.debug('Error frame saved');\n }\n\n private async closeRootFrame(state: RalphLoopState): Promise<void> {\n // Close the root frame\n logger.debug('Root frame closed');\n }\n}"],
5
+ "mappings": "AAKA,SAAS,MAAM,cAAc;AAC7B,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,SAAS,gBAAgB;AACzB,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,0BAA0C;AACnD,SAAS,4B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