opencode-swarm 7.87.0 → 7.87.2

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.
@@ -7,6 +7,24 @@ export interface RecallScoringDiagnostics {
7
7
  noSignalCount: number;
8
8
  belowThresholdCount: number;
9
9
  }
10
+ /**
11
+ * Recall scoring weight coefficients. Sum is 1.13 (scores are an unnormalised
12
+ * weighted sum; may exceed 1.0). minScore thresholds in DEFAULT_MEMORY_CONFIG
13
+ * are calibrated against these weights.
14
+ *
15
+ * Pinned by tests/unit/memory/scoring.test.ts to detect drift.
16
+ */
17
+ export declare const SCORING_WEIGHTS: {
18
+ readonly textOverlap: 0.38;
19
+ readonly tagOverlap: 0.16;
20
+ readonly fileOverlap: 0.12;
21
+ readonly symbolOverlap: 0.08;
22
+ readonly taskTermOverlap: 0.08;
23
+ readonly scopeSpecificityBoost: 0.12;
24
+ readonly kindProfileBoost: 0.06;
25
+ readonly roleBoost: 0.05;
26
+ readonly confidence: 0.08;
27
+ };
10
28
  export declare function sameScope(a: MemoryScopeRef, b: MemoryScopeRef): boolean;
11
29
  export declare function scopeAllowed(recordScope: MemoryScopeRef, allowedScopes: MemoryScopeRef[]): boolean;
12
30
  export declare function scoreMemoryRecord(record: MemoryRecord, request: RecallRequest): RecallResultItem | null;
@@ -3,6 +3,12 @@ import { type JsonlMigrationReport } from './jsonl-migration';
3
3
  import type { MemoryCompactOptions, MemoryCompactResult, MemoryProposalStore, MemoryProvider, MemoryRecallUsageEvent, MemoryRecallUsageFilter } from './provider';
4
4
  import type { RecallScoringDiagnostics } from './scoring';
5
5
  import type { AppliedMemoryChange, MemoryListFilter, MemoryProposal, MemoryRecord, RecallRequest, RecallResultItem, ResolvedCuratorMemoryDecision } from './types';
6
+ interface Migration {
7
+ version: number;
8
+ name: string;
9
+ sql: string;
10
+ }
11
+ export declare const MIGRATIONS: Migration[];
6
12
  export interface SQLiteJsonlImportResult {
7
13
  importedMemories: number;
8
14
  importedProposals: number;
@@ -14,6 +20,7 @@ export declare class SQLiteMemoryProvider implements MemoryProvider, MemoryPropo
14
20
  private readonly rootDirectory;
15
21
  private readonly config;
16
22
  private initialized;
23
+ private initPromise;
17
24
  private db;
18
25
  private ftsAvailable;
19
26
  private memories;
@@ -22,6 +29,7 @@ export declare class SQLiteMemoryProvider implements MemoryProvider, MemoryPropo
22
29
  constructor(rootDirectory: string, config?: Partial<MemoryConfig>);
23
30
  private databasePath;
24
31
  initialize(): Promise<void>;
32
+ private doInitialize;
25
33
  upsert(record: MemoryRecord): Promise<MemoryRecord>;
26
34
  get(id: string): Promise<MemoryRecord | null>;
27
35
  delete(id: string, reason?: string): Promise<void>;
@@ -75,9 +83,11 @@ export declare class SQLiteMemoryProvider implements MemoryProvider, MemoryPropo
75
83
  private insertEvent;
76
84
  private requireDb;
77
85
  }
86
+ declare function splitSql(sql: string): string[];
78
87
  declare function buildFtsQuery(request: RecallRequest): string | null;
79
88
  declare function extractFtsTerms(text: string): Set<string>;
80
89
  export declare const _test_exports: {
90
+ splitSql: typeof splitSql;
81
91
  buildFtsQuery: typeof buildFtsQuery;
82
92
  extractFtsTerms: typeof extractFtsTerms;
83
93
  FTS_SCHEMA_MIGRATION_NAME: string;
@@ -8,5 +8,6 @@ export declare function saveCheckpointRecord(label: string, directory: string):
8
8
  success: boolean;
9
9
  sha?: string;
10
10
  error?: string;
11
+ warning?: string;
11
12
  };
12
13
  export declare const checkpoint: ToolDefinition;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Maximum number of transient retries for spawn/subprocess calls.
3
+ * Mirrors the guardrails `max_transient_retries` default (invariant 9).
4
+ */
5
+ export declare const MAX_TRANSIENT_RETRIES = 5;
6
+ /**
7
+ * Base backoff delay in milliseconds for exponential transient-retry.
8
+ * Actual delay = RETRY_BASE_DELAY_MS * 2^attempt.
9
+ */
10
+ export declare const RETRY_BASE_DELAY_MS = 200;
11
+ /**
12
+ * Returns true only for ETIMEDOUT spawn errors — the only error class
13
+ * considered transient (retryable) in this codebase.
14
+ *
15
+ * ENOENT is intentionally excluded: it means "binary not at this candidate
16
+ * path," which is handled by the caller's candidate-iteration loop, not by
17
+ * retrying the same path.
18
+ */
19
+ export declare function isTransientSpawnError(error: unknown): boolean;
20
+ /**
21
+ * Blocking exponential backoff for use inside synchronous retry loops
22
+ * (e.g. spawnSync call sites).
23
+ *
24
+ * Uses Atomics.wait on a SharedArrayBuffer for an efficient sleep; falls
25
+ * back to a busy-wait loop on platforms/threads where Atomics.wait is not
26
+ * available (e.g. the main thread on some Node.js builds).
27
+ *
28
+ * @param attempt Zero-based retry attempt index. Delay = RETRY_BASE_DELAY_MS * 2^attempt.
29
+ */
30
+ export declare function transientBackoff(attempt: number): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.87.0",
3
+ "version": "7.87.2",
4
4
  "description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",