@stackmemoryai/stackmemory 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/src/agents/core/agent-task-manager.js +3 -3
  2. package/dist/src/agents/verifiers/formatter-verifier.js +1 -1
  3. package/dist/src/agents/verifiers/llm-judge.js +2 -2
  4. package/dist/src/cli/commands/context-rehydrate.js +2 -2
  5. package/dist/src/cli/commands/log.js +1 -1
  6. package/dist/src/cli/commands/onboard.js +4 -4
  7. package/dist/src/cli/commands/search.js +3 -3
  8. package/dist/src/cli/commands/setup.js +1 -1
  9. package/dist/src/cli/commands/signup.js +1 -1
  10. package/dist/src/cli/commands/skills.js +2 -2
  11. package/dist/src/cli/commands/worktree.js +1 -1
  12. package/dist/src/core/config/config-manager.js +3 -1
  13. package/dist/src/core/config/types.js +7 -0
  14. package/dist/src/core/context/dual-stack-manager.js +2 -2
  15. package/dist/src/core/context/frame-database.js +38 -0
  16. package/dist/src/core/context/frame-enrichment.js +93 -0
  17. package/dist/src/core/context/frame-handoff-manager.js +1 -1
  18. package/dist/src/core/context/frame-manager.js +4 -4
  19. package/dist/src/core/context/rehydration.js +6 -6
  20. package/dist/src/core/database/sqlite-adapter.js +136 -15
  21. package/dist/src/core/digest/frame-digest-integration.js +1 -1
  22. package/dist/src/core/digest/hybrid-digest-generator.js +1 -1
  23. package/dist/src/core/digest/hybrid-digest.js +3 -3
  24. package/dist/src/core/errors/recovery.js +1 -1
  25. package/dist/src/core/extensions/loader.js +10 -10
  26. package/dist/src/core/extensions/plugin-system.js +1 -1
  27. package/dist/src/core/monitoring/logger.js +2 -2
  28. package/dist/src/core/monitoring/metrics.js +2 -2
  29. package/dist/src/core/monitoring/progress-tracker.js +2 -2
  30. package/dist/src/core/performance/lazy-context-loader.js +1 -1
  31. package/dist/src/core/performance/performance-benchmark.js +8 -8
  32. package/dist/src/core/performance/performance-profiler.js +2 -2
  33. package/dist/src/core/performance/streaming-jsonl-parser.js +1 -1
  34. package/dist/src/core/projects/project-isolation.js +1 -1
  35. package/dist/src/core/projects/project-manager.js +5 -5
  36. package/dist/src/core/session/clear-survival.js +3 -3
  37. package/dist/src/core/session/handoff-generator.js +1 -1
  38. package/dist/src/core/session/session-manager.js +4 -4
  39. package/dist/src/core/skills/skill-storage.js +2 -2
  40. package/dist/src/core/storage/remote-storage.js +2 -2
  41. package/dist/src/core/trace/cli-trace-wrapper.js +3 -3
  42. package/dist/src/core/trace/debug-trace.js +2 -2
  43. package/dist/src/core/trace/trace-detector.js +1 -1
  44. package/dist/src/core/worktree/worktree-manager.js +2 -2
  45. package/dist/src/features/analytics/api/analytics-api.js +1 -1
  46. package/dist/src/features/analytics/core/analytics-service.js +2 -2
  47. package/dist/src/features/analytics/queries/metrics-queries.js +1 -1
  48. package/dist/src/features/web/server/index.js +8 -8
  49. package/dist/src/integrations/anthropic/client.js +4 -4
  50. package/dist/src/integrations/claude-code/post-task-hooks.js +3 -3
  51. package/dist/src/integrations/claude-code/subagent-client.js +2 -2
  52. package/dist/src/integrations/diffmem/client.js +1 -1
  53. package/dist/src/integrations/linear/client.js +1 -1
  54. package/dist/src/integrations/linear/migration.js +1 -1
  55. package/dist/src/integrations/linear/oauth-server.js +2 -2
  56. package/dist/src/integrations/linear/sync.js +1 -1
  57. package/dist/src/integrations/linear/webhook-handler.js +2 -2
  58. package/dist/src/integrations/linear/webhook-server.js +2 -2
  59. package/dist/src/integrations/linear/webhook.js +2 -2
  60. package/dist/src/integrations/mcp/handlers/discovery-handlers.js +3 -3
  61. package/dist/src/integrations/mcp/handlers/linear-handlers.js +1 -1
  62. package/dist/src/integrations/mcp/handlers/skill-handlers.js +2 -2
  63. package/dist/src/integrations/mcp/handlers/task-handlers.js +2 -2
  64. package/dist/src/integrations/mcp/handlers/trace-handlers.js +1 -1
  65. package/dist/src/integrations/mcp/refactored-server.js +2 -2
  66. package/dist/src/integrations/mcp/remote-server.js +1 -1
  67. package/dist/src/integrations/mcp/server.js +4 -4
  68. package/dist/src/integrations/ralph/bridge/ralph-stackmemory-bridge.js +13 -13
  69. package/dist/src/integrations/ralph/context/stackmemory-context-loader.js +1 -1
  70. package/dist/src/integrations/ralph/learning/pattern-learner.js +3 -3
  71. package/dist/src/integrations/ralph/orchestration/multi-loop-orchestrator.js +1 -1
  72. package/dist/src/integrations/ralph/patterns/compounding-engineering-pattern.js +2 -2
  73. package/dist/src/integrations/ralph/patterns/extended-coherence-sessions.js +19 -19
  74. package/dist/src/integrations/ralph/patterns/oracle-worker-pattern.js +5 -5
  75. package/dist/src/integrations/ralph/performance/performance-optimizer.js +1 -1
  76. package/dist/src/integrations/ralph/recovery/crash-recovery.js +1 -1
  77. package/dist/src/integrations/ralph/state/state-reconciler.js +1 -1
  78. package/dist/src/integrations/ralph/swarm/git-workflow-manager.js +4 -4
  79. package/dist/src/integrations/ralph/swarm/swarm-coordinator.js +8 -8
  80. package/dist/src/integrations/ralph/visualization/ralph-debugger.js +3 -3
  81. package/dist/src/orchestrators/multimodal/harness.js +3 -3
  82. package/dist/src/servers/production/auth-middleware.js +2 -2
  83. package/package.json +1 -1
@@ -228,7 +228,7 @@ class PostTaskHooks extends EventEmitter {
228
228
  /**
229
229
  * Run linter on changed files
230
230
  */
231
- async runLinter(files) {
231
+ async runLinter(_files) {
232
232
  const start = Date.now();
233
233
  try {
234
234
  if (!this.config.testFrameworks.lintCommand) {
@@ -264,7 +264,7 @@ class PostTaskHooks extends EventEmitter {
264
264
  /**
265
265
  * Run tests
266
266
  */
267
- async runTests(files) {
267
+ async runTests(_files) {
268
268
  const start = Date.now();
269
269
  try {
270
270
  if (!this.config.testFrameworks.testCommand) {
@@ -300,7 +300,7 @@ class PostTaskHooks extends EventEmitter {
300
300
  /**
301
301
  * Check test coverage
302
302
  */
303
- async checkTestCoverage(files) {
303
+ async checkTestCoverage(_files) {
304
304
  const start = Date.now();
305
305
  try {
306
306
  if (!this.config.testFrameworks.coverageCommand) {
@@ -424,7 +424,7 @@ Context (JSON): ${JSON.stringify(request.context)}`;
424
424
  /**
425
425
  * Get mock response for testing
426
426
  */
427
- async getMockResponse(request, startTime, subagentId) {
427
+ async getMockResponse(request, startTime, _subagentId) {
428
428
  await new Promise(
429
429
  (resolve) => setTimeout(resolve, Math.random() * 20 + 10)
430
430
  );
@@ -536,7 +536,7 @@ function greetUser(name: string): string {
536
536
  if (fs.existsSync(filePath)) {
537
537
  try {
538
538
  fs.unlinkSync(filePath);
539
- } catch (e) {
539
+ } catch {
540
540
  }
541
541
  }
542
542
  }
@@ -39,7 +39,7 @@ class DiffMemClient {
39
39
  });
40
40
  clearTimeout(timeoutId);
41
41
  if (!response.ok) {
42
- const errorBody = await response.text().catch(() => "");
42
+ const _errorBody = await response.text().catch(() => "");
43
43
  throw new DiffMemClientError(
44
44
  `Request failed: ${response.statusText}`,
45
45
  "HTTP_ERROR",
@@ -105,7 +105,7 @@ class LinearClient {
105
105
  body: JSON.stringify({ query, variables })
106
106
  });
107
107
  this.updateRateLimitState(response);
108
- } catch (e) {
108
+ } catch {
109
109
  }
110
110
  }
111
111
  if (response.status === 429) {
@@ -191,7 +191,7 @@ class LinearMigrator {
191
191
  * Migrate a single task
192
192
  */
193
193
  async migrateTask(sourceTask, targetTeamId) {
194
- const stateMapping = {
194
+ const _stateMapping = {
195
195
  backlog: "backlog",
196
196
  unstarted: "unstarted",
197
197
  started: "started",
@@ -8,7 +8,7 @@ import { logger } from "../../core/monitoring/logger.js";
8
8
  import { LinearAuthManager } from "./auth.js";
9
9
  import chalk from "chalk";
10
10
  import { IntegrationError, ErrorCode } from "../../core/errors/index.js";
11
- function getEnv(key, defaultValue) {
11
+ function _getEnv(key, defaultValue) {
12
12
  const value = process.env[key];
13
13
  if (value === void 0) {
14
14
  if (defaultValue !== void 0) return defaultValue;
@@ -19,7 +19,7 @@ function getEnv(key, defaultValue) {
19
19
  }
20
20
  return value;
21
21
  }
22
- function getOptionalEnv(key) {
22
+ function _getOptionalEnv(key) {
23
23
  return process.env[key];
24
24
  }
25
25
  class LinearOAuthServer {
@@ -472,7 +472,7 @@ Frame: ${task.frame_id}`
472
472
  this.mappings.set(mapping.stackmemoryId, mapping);
473
473
  }
474
474
  logger.info(`Loaded ${this.mappings.size} task mappings from disk`);
475
- } catch (error) {
475
+ } catch {
476
476
  logger.warn("Failed to load mappings, starting fresh");
477
477
  }
478
478
  }
@@ -9,7 +9,7 @@ import { IntegrationError, ErrorCode } from "../../core/errors/index.js";
9
9
  import { logger } from "../../core/monitoring/logger.js";
10
10
  import { ClaudeCodeSubagentClient } from "../claude-code/subagent-client.js";
11
11
  const AUTOMATION_LABELS = ["automated", "claude-code", "stackmemory"];
12
- function getEnv(key, defaultValue) {
12
+ function _getEnv(key, defaultValue) {
13
13
  const value = process.env[key];
14
14
  if (value === void 0) {
15
15
  if (defaultValue !== void 0) return defaultValue;
@@ -20,7 +20,7 @@ function getEnv(key, defaultValue) {
20
20
  }
21
21
  return value;
22
22
  }
23
- function getOptionalEnv(key) {
23
+ function _getOptionalEnv(key) {
24
24
  return process.env[key];
25
25
  }
26
26
  class LinearWebhookHandler {
@@ -9,7 +9,7 @@ import { LinearSyncService } from "./sync-service.js";
9
9
  import { IntegrationError, ErrorCode } from "../../core/errors/index.js";
10
10
  import { logger } from "../../core/monitoring/logger.js";
11
11
  import chalk from "chalk";
12
- function getEnv(key, defaultValue) {
12
+ function _getEnv(key, defaultValue) {
13
13
  const value = process.env[key];
14
14
  if (value === void 0) {
15
15
  if (defaultValue !== void 0) return defaultValue;
@@ -20,7 +20,7 @@ function getEnv(key, defaultValue) {
20
20
  }
21
21
  return value;
22
22
  }
23
- function getOptionalEnv(key) {
23
+ function _getOptionalEnv(key) {
24
24
  return process.env[key];
25
25
  }
26
26
  class LinearWebhookServer {
@@ -5,7 +5,7 @@ const __dirname = __pathDirname(__filename);
5
5
  import { logger } from "../../core/monitoring/logger.js";
6
6
  import { IntegrationError, ErrorCode } from "../../core/errors/index.js";
7
7
  import crypto from "crypto";
8
- function getEnv(key, defaultValue) {
8
+ function _getEnv(key, defaultValue) {
9
9
  const value = process.env[key];
10
10
  if (value === void 0) {
11
11
  if (defaultValue !== void 0) return defaultValue;
@@ -16,7 +16,7 @@ function getEnv(key, defaultValue) {
16
16
  }
17
17
  return value;
18
18
  }
19
- function getOptionalEnv(key) {
19
+ function _getOptionalEnv(key) {
20
20
  return process.env[key];
21
21
  }
22
22
  class LinearWebhookHandler {
@@ -279,7 +279,7 @@ class DiscoveryHandlers {
279
279
  }
280
280
  return Array.from(files);
281
281
  }
282
- async searchCodebase(keywords, includePatterns, excludePatterns, depth, maxFiles) {
282
+ async searchCodebase(keywords, includePatterns, excludePatterns, depth, _maxFiles) {
283
283
  const files = [];
284
284
  const maxResults = depth === "shallow" ? 10 : depth === "medium" ? 25 : 50;
285
285
  for (const keyword of keywords.slice(0, 10)) {
@@ -322,8 +322,8 @@ class DiscoveryHandlers {
322
322
  }
323
323
  return files;
324
324
  }
325
- rankFiles(discovered, recent, keywords) {
326
- const recentSet = new Set(recent);
325
+ rankFiles(discovered, recent, _keywords) {
326
+ const _recentSet = new Set(recent);
327
327
  for (const recentFile of recent) {
328
328
  const existing = discovered.find((f) => f.path === recentFile);
329
329
  if (existing) {
@@ -164,7 +164,7 @@ ${issueLines.join("\n")}` : "No issues found matching filters.";
164
164
  /**
165
165
  * Get Linear integration status
166
166
  */
167
- async handleLinearStatus(args) {
167
+ async handleLinearStatus(_args) {
168
168
  try {
169
169
  let authStatus = false;
170
170
  try {
@@ -3,7 +3,7 @@ import { dirname as __pathDirname } from 'path';
3
3
  const __filename = __fileURLToPath(import.meta.url);
4
4
  const __dirname = __pathDirname(__filename);
5
5
  import { logger } from "../../../core/monitoring/logger.js";
6
- function getEnv(key, defaultValue) {
6
+ function _getEnv(key, defaultValue) {
7
7
  const value = process.env[key];
8
8
  if (value === void 0) {
9
9
  if (defaultValue !== void 0) return defaultValue;
@@ -11,7 +11,7 @@ function getEnv(key, defaultValue) {
11
11
  }
12
12
  return value;
13
13
  }
14
- function getOptionalEnv(key) {
14
+ function _getOptionalEnv(key) {
15
15
  return process.env[key];
16
16
  }
17
17
  import {
@@ -109,7 +109,7 @@ class TaskHandlers {
109
109
  const {
110
110
  status,
111
111
  priority,
112
- limit = 20,
112
+ _limit = 20,
113
113
  include_completed = false,
114
114
  tags = [],
115
115
  search
@@ -168,7 +168,7 @@ ${summaryText}`
168
168
  /**
169
169
  * Get task metrics and analytics
170
170
  */
171
- async handleGetTaskMetrics(args) {
171
+ async handleGetTaskMetrics(_args) {
172
172
  try {
173
173
  const metrics = await this.deps.taskStore.getMetrics();
174
174
  const metricsText = `
@@ -240,7 +240,7 @@ Navigated to: ${url}`
240
240
  */
241
241
  async handleExecuteScript(args) {
242
242
  try {
243
- const { session_id, script, args: scriptArgs = [] } = args;
243
+ const { session_id, script, args: _scriptArgs = [] } = args;
244
244
  if (!session_id) {
245
245
  throw new Error("Session ID is required");
246
246
  }
@@ -24,7 +24,7 @@ import { logger } from "../../core/monitoring/logger.js";
24
24
  import { MCPHandlerFactory } from "./handlers/index.js";
25
25
  import { MCPToolDefinitions } from "./tool-definitions.js";
26
26
  import { ToolScoringMiddleware } from "./middleware/tool-scoring.js";
27
- function getEnv(key, defaultValue) {
27
+ function _getEnv(key, defaultValue) {
28
28
  const value = process.env[key];
29
29
  if (value === void 0) {
30
30
  if (defaultValue !== void 0) return defaultValue;
@@ -32,7 +32,7 @@ function getEnv(key, defaultValue) {
32
32
  }
33
33
  return value;
34
34
  }
35
- function getOptionalEnv(key) {
35
+ function _getOptionalEnv(key) {
36
36
  return process.env[key];
37
37
  }
38
38
  class StackMemoryMCP {
@@ -376,7 +376,7 @@ ${summary}...`, 0.8);
376
376
  );
377
377
  }
378
378
  async handleGetContext(args) {
379
- const { query = "", limit = 10 } = args;
379
+ const { _query = "", limit = 10 } = args;
380
380
  const contexts = Array.from(this.contexts.values()).sort((a, b) => b.importance - a.importance).slice(0, limit);
381
381
  const response = contexts.map(
382
382
  (ctx) => `[${ctx.type.toUpperCase()}] (importance: ${ctx.importance.toFixed(2)})
@@ -52,7 +52,7 @@ import {
52
52
  DEFAULT_IMPLEMENTER,
53
53
  DEFAULT_MAX_ITERS
54
54
  } from "../../orchestrators/multimodal/constants.js";
55
- function getEnv(key, defaultValue) {
55
+ function _getEnv(key, defaultValue) {
56
56
  const value = process.env[key];
57
57
  if (value === void 0) {
58
58
  if (defaultValue !== void 0) return defaultValue;
@@ -60,7 +60,7 @@ function getEnv(key, defaultValue) {
60
60
  }
61
61
  return value;
62
62
  }
63
- function getOptionalEnv(key) {
63
+ function _getOptionalEnv(key) {
64
64
  return process.env[key];
65
65
  }
66
66
  class LocalStackMemoryMCP {
@@ -2701,7 +2701,7 @@ ${formattedTraces.map(
2701
2701
  ]
2702
2702
  };
2703
2703
  }
2704
- async handleGetTraceStatistics(args) {
2704
+ async handleGetTraceStatistics(_args) {
2705
2705
  this.traceDetector.flush();
2706
2706
  const stats = this.traceDetector.getStatistics();
2707
2707
  const typeBreakdown = Object.entries(stats.tracesByType).map(([type, count]) => ` ${type}: ${count}`).join("\n");
@@ -2723,7 +2723,7 @@ ${typeBreakdown}`
2723
2723
  ]
2724
2724
  };
2725
2725
  }
2726
- async handleFlushTraces(args) {
2726
+ async handleFlushTraces(_args) {
2727
2727
  this.traceDetector.flush();
2728
2728
  return {
2729
2729
  content: [
@@ -137,7 +137,7 @@ class RalphStackMemoryBridge {
137
137
  }
138
138
  }
139
139
  this.state.activeLoop = reconciledState;
140
- const context = await this.loadIterationContext(reconciledState);
140
+ const _context = await this.loadIterationContext(reconciledState);
141
141
  logger.info("Loop resumed", {
142
142
  loopId,
143
143
  iteration: reconciledState.iteration,
@@ -376,7 +376,7 @@ class RalphStackMemoryBridge {
376
376
  /**
377
377
  * Setup lifecycle hooks
378
378
  */
379
- setupLifecycleHooks(options) {
379
+ setupLifecycleHooks(_options) {
380
380
  const hooks = {
381
381
  preIteration: async (context) => {
382
382
  logger.debug("Pre-iteration hook", {
@@ -612,7 +612,7 @@ class RalphStackMemoryBridge {
612
612
  */
613
613
  async generateIterationPlan(context, analysis) {
614
614
  const task = context.task.task || "Complete assigned work";
615
- const criteria = context.task.criteria || "Meet completion criteria";
615
+ const _criteria = context.task.criteria || "Meet completion criteria";
616
616
  const steps = [];
617
617
  if (!analysis.testsPass) {
618
618
  steps.push("Fix failing tests");
@@ -642,7 +642,7 @@ class RalphStackMemoryBridge {
642
642
  /**
643
643
  * Execute planned changes
644
644
  */
645
- async executeIterationChanges(plan, context) {
645
+ async executeIterationChanges(plan, _context) {
646
646
  const changes = [];
647
647
  for (let i = 0; i < plan.steps.length; i++) {
648
648
  const step = plan.steps[i];
@@ -664,7 +664,7 @@ class RalphStackMemoryBridge {
664
664
  /**
665
665
  * Validate iteration results
666
666
  */
667
- async validateIterationResults(changes) {
667
+ async validateIterationResults(_changes) {
668
668
  const validation = {
669
669
  testsPass: true,
670
670
  lintClean: true,
@@ -683,7 +683,7 @@ class RalphStackMemoryBridge {
683
683
  const { execSync: execSync2 } = await import("child_process");
684
684
  execSync2("npm run lint", { stdio: "pipe", timeout: 3e4 });
685
685
  validation.lintClean = true;
686
- } catch (error) {
686
+ } catch {
687
687
  validation.lintClean = false;
688
688
  validation.warnings.push("Lint warnings detected");
689
689
  }
@@ -693,7 +693,7 @@ class RalphStackMemoryBridge {
693
693
  const { execSync: execSync2 } = await import("child_process");
694
694
  execSync2("npm run build", { stdio: "pipe", timeout: 6e4 });
695
695
  validation.buildSuccess = true;
696
- } catch (error) {
696
+ } catch {
697
697
  validation.buildSuccess = false;
698
698
  validation.errors.push("Build failed");
699
699
  }
@@ -819,10 +819,10 @@ class RalphStackMemoryBridge {
819
819
  return `Still need to address:
820
820
  ${evaluation.unmet.map((c) => `- ${c}`).join("\n")}`;
821
821
  }
822
- async loadRelevantFrames(loopId) {
822
+ async loadRelevantFrames(_loopId) {
823
823
  return [];
824
824
  }
825
- async loadRecentIterations(loopId) {
825
+ async loadRecentIterations(_loopId) {
826
826
  return [];
827
827
  }
828
828
  async loadGitCommits() {
@@ -831,7 +831,7 @@ ${evaluation.unmet.map((c) => `- ${c}`).join("\n")}`;
831
831
  async loadChangedFiles() {
832
832
  return [];
833
833
  }
834
- async loadSessionFrames(sessionId) {
834
+ async loadSessionFrames(_sessionId) {
835
835
  return [];
836
836
  }
837
837
  async reconstructLoopState(frame) {
@@ -848,13 +848,13 @@ ${evaluation.unmet.map((c) => `- ${c}`).join("\n")}`;
848
848
  async buildContextFromFrames(frames, state) {
849
849
  return await this.loadIterationContext(state);
850
850
  }
851
- async updateStateFrame(oldState, newState) {
851
+ async updateStateFrame(_oldState, _newState) {
852
852
  logger.debug("State frame updated");
853
853
  }
854
- async saveErrorFrame(error, context) {
854
+ async saveErrorFrame(_error, _context) {
855
855
  logger.debug("Error frame saved");
856
856
  }
857
- async closeRootFrame(state) {
857
+ async closeRootFrame(_state) {
858
858
  logger.debug("Root frame closed");
859
859
  }
860
860
  }
@@ -380,7 +380,7 @@ Date: ${new Date(decision.timestamp).toLocaleDateString()}
380
380
  /**
381
381
  * Get examples of a specific pattern
382
382
  */
383
- async getPatternExamples(pattern) {
383
+ async getPatternExamples(_pattern) {
384
384
  return [];
385
385
  }
386
386
  }
@@ -396,13 +396,13 @@ class PatternLearner {
396
396
  metadata: { criteriaWord: word }
397
397
  }));
398
398
  }
399
- extractSuccessFactors(loops) {
399
+ extractSuccessFactors(_loops) {
400
400
  return [];
401
401
  }
402
- analyzeFailurePoints(loops) {
402
+ analyzeFailurePoints(_loops) {
403
403
  return [];
404
404
  }
405
- analyzeIterationSequences(loops) {
405
+ analyzeIterationSequences(_loops) {
406
406
  return [];
407
407
  }
408
408
  groupByTaskType(loops) {
@@ -243,7 +243,7 @@ class MultiLoopOrchestrator {
243
243
  );
244
244
  if (phase.parallelExecution && phase.tasks.length > 1) {
245
245
  const parallelResult = await this.executeParallelLoops(phase.tasks);
246
- for (const [taskId, taskResult] of parallelResult.results) {
246
+ for (const [_taskId, taskResult] of parallelResult.results) {
247
247
  if (taskResult.success) {
248
248
  result.completedLoops.push(taskResult.loopId);
249
249
  } else {
@@ -69,7 +69,7 @@ class CompoundingEngineeringManager {
69
69
  /**
70
70
  * Extract actionable learnings from development session
71
71
  */
72
- async extractLearningsFromSession(id, featureName, sessionData, agentOutputs, userFeedback) {
72
+ async extractLearningsFromSession(id, featureName, sessionData, agentOutputs, _userFeedback) {
73
73
  const successes = this.identifySuccesses(sessionData, agentOutputs);
74
74
  const failures = this.identifyFailures(sessionData, agentOutputs);
75
75
  const patterns = this.extractPatterns(sessionData, agentOutputs);
@@ -293,7 +293,7 @@ export async function ${hookName.replace(/-/g, "")}Hook() {
293
293
  try {
294
294
  const content = await fs.readFile(knowledgePath, "utf-8");
295
295
  this.knowledgeBase = JSON.parse(content);
296
- } catch (error) {
296
+ } catch {
297
297
  logger.info("Starting fresh knowledge base");
298
298
  }
299
299
  }
@@ -129,7 +129,7 @@ class ExtendedCoherenceManager {
129
129
  * Monitor active sessions for coherence degradation
130
130
  */
131
131
  async monitorActiveSessionsHealth() {
132
- for (const [sessionId, session] of this.activeSessions) {
132
+ for (const [_sessionId, session] of this.activeSessions) {
133
133
  if (session.state.status === "active") {
134
134
  await this.assessSessionCoherence(session);
135
135
  }
@@ -253,7 +253,7 @@ class ExtendedCoherenceManager {
253
253
  }
254
254
  session.interventions.push(intervention);
255
255
  session.state.interventionCount++;
256
- const previousStatus = session.state.status;
256
+ const _previousStatus = session.state.status;
257
257
  session.state.status = "degraded";
258
258
  setTimeout(async () => {
259
259
  const newMetrics = await this.calculateCoherenceMetrics(session);
@@ -410,37 +410,37 @@ Begin your extended coherence work session now.
410
410
  `;
411
411
  }
412
412
  // Placeholder implementations for helper methods
413
- async getRecentAgentOutputs(session) {
413
+ async getRecentAgentOutputs(_session) {
414
414
  return [];
415
415
  }
416
- assessOutputQuality(outputs) {
416
+ assessOutputQuality(_outputs) {
417
417
  return 0.8;
418
418
  }
419
- assessContextRetention(outputs, task) {
419
+ assessContextRetention(_outputs, _task) {
420
420
  return 0.7;
421
421
  }
422
- assessTaskRelevance(outputs, task) {
422
+ assessTaskRelevance(_outputs, _task) {
423
423
  return 0.9;
424
424
  }
425
- calculateRepetitionRate(outputs) {
425
+ calculateRepetitionRate(_outputs) {
426
426
  return 0.1;
427
427
  }
428
- calculateDivergenceRate(outputs, task) {
428
+ calculateDivergenceRate(_outputs, _task) {
429
429
  return 0.05;
430
430
  }
431
- calculateErrorRate(outputs) {
431
+ calculateErrorRate(_outputs) {
432
432
  return 0.02;
433
433
  }
434
- calculateProgressRate(session) {
434
+ calculateProgressRate(_session) {
435
435
  return 2.5;
436
436
  }
437
- async getMemoryUsage(session) {
437
+ async getMemoryUsage(_session) {
438
438
  return 150;
439
439
  }
440
- async getContextWindowUsage(session) {
440
+ async getContextWindowUsage(_session) {
441
441
  return 65;
442
442
  }
443
- generateBreakpoints(taskConfig) {
443
+ generateBreakpoints(_taskConfig) {
444
444
  return [
445
445
  "Initial analysis complete",
446
446
  "Core implementation finished",
@@ -451,19 +451,19 @@ Begin your extended coherence work session now.
451
451
  async generateContextSummary(session) {
452
452
  return `Session ${session.id} context summary`;
453
453
  }
454
- async generateContextRefreshPrompt(session) {
454
+ async generateContextRefreshPrompt(_session) {
455
455
  return "Context refresh prompt";
456
456
  }
457
- async applyContextRefresh(session, prompt) {
457
+ async applyContextRefresh(_session, _prompt) {
458
458
  }
459
- async loadLatestCheckpoint(session) {
459
+ async loadLatestCheckpoint(_session) {
460
460
  return null;
461
461
  }
462
- async restartAgentFromCheckpoint(session, checkpoint) {
462
+ async restartAgentFromCheckpoint(_session, _checkpoint) {
463
463
  }
464
- async restartAgentFromBeginning(session) {
464
+ async restartAgentFromBeginning(_session) {
465
465
  }
466
- async provideGuidance(session, reason) {
466
+ async provideGuidance(_session, _reason) {
467
467
  }
468
468
  /**
469
469
  * Get extended coherence capabilities
@@ -168,7 +168,7 @@ Remember: Your intelligence is expensive. Focus on high-value strategic thinking
168
168
  const allocatedTasks = [];
169
169
  for (const task of decomposition) {
170
170
  const workerModel = this.selectWorkerForTask(task);
171
- const workerPrompt = this.buildWorkerPrompt(task, workerModel);
171
+ const _workerPrompt = this.buildWorkerPrompt(task, workerModel);
172
172
  allocatedTasks.push({
173
173
  ...task,
174
174
  assignedModel: "worker"
@@ -196,7 +196,7 @@ Remember: Your intelligence is expensive. Focus on high-value strategic thinking
196
196
  /**
197
197
  * Build focused prompt for worker models
198
198
  */
199
- buildWorkerPrompt(task, worker) {
199
+ buildWorkerPrompt(task, _worker) {
200
200
  return `
201
201
  # WORKER ROLE: Focused Task Execution
202
202
 
@@ -265,7 +265,7 @@ Execute your task now.
265
265
  /**
266
266
  * Integrate worker results under Oracle coordination
267
267
  */
268
- async integrateResults(workerResults, reviewResult) {
268
+ async integrateResults(workerResults, _reviewResult) {
269
269
  const swarmId = uuidv4();
270
270
  const successfulTasks = workerResults.filter(
271
271
  (result) => result.status === "fulfilled"
@@ -281,7 +281,7 @@ Execute your task now.
281
281
  /**
282
282
  * Parse task decomposition from Oracle output
283
283
  */
284
- parseTaskDecomposition(output) {
284
+ parseTaskDecomposition(_output) {
285
285
  return [];
286
286
  }
287
287
  /**
@@ -309,7 +309,7 @@ Execute your task now.
309
309
  * Calculate what this would cost with all-Oracle approach
310
310
  */
311
311
  calculateTraditionalCost() {
312
- const totalSpent = this.costTracker.oracleSpent + this.costTracker.workerSpent + this.costTracker.reviewerSpent;
312
+ const _totalSpent = this.costTracker.oracleSpent + this.costTracker.workerSpent + this.costTracker.reviewerSpent;
313
313
  const avgWorkerCost = this.workerPool[0]?.costPerToken || 1e-3;
314
314
  const workerTokensAsOracle = this.costTracker.workerSpent / avgWorkerCost;
315
315
  return this.costTracker.oracleSpent + workerTokensAsOracle * this.oracle.costPerToken;
@@ -279,7 +279,7 @@ class PerformanceOptimizer {
279
279
  /**
280
280
  * Internal frame load
281
281
  */
282
- async loadFramesInternal(query) {
282
+ async loadFramesInternal(_query) {
283
283
  return [];
284
284
  }
285
285
  /**
@@ -250,7 +250,7 @@ class CrashRecoverySystem {
250
250
  {
251
251
  errorType: "git_conflict",
252
252
  condition: (error) => error.message.includes("git") || error.message.includes("branch"),
253
- action: async (report, recovery) => {
253
+ action: async (_report, _recovery) => {
254
254
  logger.info("Attempting git conflict resolution");
255
255
  try {
256
256
  const { execSync } = await import("child_process");
@@ -117,7 +117,7 @@ class StateReconciler {
117
117
  const currentCommit = execSync("git rev-parse HEAD", {
118
118
  encoding: "utf8"
119
119
  }).trim();
120
- const branch = execSync("git branch --show-current", {
120
+ const _branch = execSync("git branch --show-current", {
121
121
  encoding: "utf8"
122
122
  }).trim();
123
123
  const uncommittedChanges = execSync("git status --porcelain", {
@@ -29,7 +29,7 @@ class GitWorkflowManager {
29
29
  try {
30
30
  this.baselineBranch = this.getCurrentBranch();
31
31
  this.mainBranch = this.getMainBranch();
32
- } catch (error) {
32
+ } catch {
33
33
  logger.warn("Git not initialized, workflow features disabled");
34
34
  this.config.enableGitWorkflow = false;
35
35
  }
@@ -178,7 +178,7 @@ class GitWorkflowManager {
178
178
  execSync(`git checkout --theirs ${file}`, { encoding: "utf8" });
179
179
  execSync(`git add ${file}`, { encoding: "utf8" });
180
180
  }
181
- } catch (error) {
181
+ } catch {
182
182
  logger.error(`Could not auto-resolve conflict in ${file}`);
183
183
  }
184
184
  }
@@ -299,7 +299,7 @@ class GitWorkflowManager {
299
299
  deleteBranch(branchName) {
300
300
  try {
301
301
  execSync(`git branch -d ${branchName}`, { encoding: "utf8" });
302
- } catch (error) {
302
+ } catch {
303
303
  execSync(`git branch -D ${branchName}`, { encoding: "utf8" });
304
304
  }
305
305
  }
@@ -370,7 +370,7 @@ class GitWorkflowManager {
370
370
  );
371
371
  }, intervalMs);
372
372
  }
373
- async createPullRequest(agent, task, branchName) {
373
+ async createPullRequest(agent, task, _branchName) {
374
374
  try {
375
375
  const title = `[Swarm ${agent.role}] ${task.title}`;
376
376
  const body = `