opencode-swarm 7.88.0 → 7.88.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.
- package/.opencode/skills/brainstorm/SKILL.md +2 -1
- package/.opencode/skills/clarify/SKILL.md +7 -1
- package/.opencode/skills/clarify-spec/SKILL.md +1 -1
- package/.opencode/skills/issue-ingest/SKILL.md +3 -2
- package/.opencode/skills/plan/SKILL.md +7 -1
- package/.opencode/skills/specify/SKILL.md +3 -2
- package/README.md +1 -1
- package/dist/cli/{guardrail-explain-sw5bjxtk.js → guardrail-explain-qd243wrm.js} +2 -2
- package/dist/cli/{index-fwb5f2gr.js → index-09smngfp.js} +1 -1
- package/dist/cli/{index-dkytd370.js → index-tjr1m8wf.js} +2 -2
- package/dist/cli/{index-jch711dq.js → index-y72bw1wb.js} +543 -236
- package/dist/cli/index.js +1 -1
- package/dist/commands/pr-monitor-status.d.ts +1 -1
- package/dist/index.js +1371 -1006
- package/dist/memory/config.d.ts +1 -0
- package/dist/memory/gateway.d.ts +1 -0
- package/dist/memory/provider-pool.d.ts +50 -0
- package/dist/memory/sqlite-provider.d.ts +3 -0
- package/package.json +1 -1
package/dist/memory/config.d.ts
CHANGED
package/dist/memory/gateway.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export declare class MemoryGateway {
|
|
|
32
32
|
private readonly config;
|
|
33
33
|
private readonly provider;
|
|
34
34
|
private readonly now;
|
|
35
|
+
private disposed;
|
|
35
36
|
constructor(context: MemoryContext, options?: MemoryGatewayOptions);
|
|
36
37
|
isEnabled(): boolean;
|
|
37
38
|
dispose(): Promise<void>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { MemoryConfig } from './config';
|
|
2
|
+
import type { MemoryProposalStore, MemoryProvider } from './provider';
|
|
3
|
+
/**
|
|
4
|
+
* Return true if the provider is currently managed by the pool.
|
|
5
|
+
*
|
|
6
|
+
* Pooled providers have a `close()` that delegates to `releaseProvider`.
|
|
7
|
+
* Any caller (gateway, commands, tools) can safely call `close()` to release
|
|
8
|
+
* its reference; the pool handles refcount tracking and real close on drain.
|
|
9
|
+
*/
|
|
10
|
+
export declare function isPooledProvider(provider: MemoryProvider & Partial<MemoryProposalStore>): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Return an existing provider for `directory`, or create and cache a new one.
|
|
13
|
+
*
|
|
14
|
+
* The pool key is the canonical absolute path returned by `realpathSync(directory)`.
|
|
15
|
+
* If `realpathSync` fails (broken symlink, permission error, etc.) the resolved
|
|
16
|
+
* absolute path is used as a fallback key.
|
|
17
|
+
*
|
|
18
|
+
* Every access (hit or miss) updates the LRU ordering so the most-used entries
|
|
19
|
+
* survive eviction. Cache hits increment the reference count so the pool knows
|
|
20
|
+
* how many active callers are using the provider.
|
|
21
|
+
*
|
|
22
|
+
* Note: this function returns synchronously. The provider's actual database
|
|
23
|
+
* open happens lazily inside `provider.initialize()`, which callers await
|
|
24
|
+
* separately (and which is protected by the provider's own init mutex).
|
|
25
|
+
*/
|
|
26
|
+
export declare function getOrCreateProvider(directory: string, config: MemoryConfig): MemoryProvider & MemoryProposalStore;
|
|
27
|
+
/**
|
|
28
|
+
* Release a pooled provider back to the pool by decrementing its refCount.
|
|
29
|
+
*
|
|
30
|
+
* **Lifecycle contract:** refCount is per-PROVIDER, not per-ACQUISITION.
|
|
31
|
+
* Each acquisition (getOrCreateProvider call) MUST be released exactly once
|
|
32
|
+
* via provider.close() (which calls releaseProvider internally) or
|
|
33
|
+
* MemoryGateway.dispose() (which is one-shot via a `disposed` flag).
|
|
34
|
+
*
|
|
35
|
+
* Calling close() MORE THAN ONCE per acquisition may corrupt refCount.
|
|
36
|
+
* MemoryGateway prevents this with its one-shot dispose flag. Callers that
|
|
37
|
+
* use provider.close() directly (e.g., commands/memory.ts) must ensure
|
|
38
|
+
* they call it exactly once per acquisition — typically by using the
|
|
39
|
+
* provider in a single synchronous or try/finally block.
|
|
40
|
+
*
|
|
41
|
+
* Idle entries (refCount=0) remain in the pool for reuse until LRU eviction.
|
|
42
|
+
* Active entries (refCount>0) are deferred-closed on eviction until all
|
|
43
|
+
* references release.
|
|
44
|
+
*/
|
|
45
|
+
export declare function releaseProvider(provider: MemoryProvider & Partial<MemoryProposalStore>): void;
|
|
46
|
+
/**
|
|
47
|
+
* Evict and close every cached provider. Intended for test teardown only —
|
|
48
|
+
* production code should rely on LRU eviction.
|
|
49
|
+
*/
|
|
50
|
+
export declare function clearPool(): void;
|
|
@@ -26,6 +26,8 @@ export declare class SQLiteMemoryProvider implements MemoryProvider, MemoryPropo
|
|
|
26
26
|
private memories;
|
|
27
27
|
private proposals;
|
|
28
28
|
private lastAutomaticJsonlMigration;
|
|
29
|
+
private recallCountSinceLastCompaction;
|
|
30
|
+
private isCompacting;
|
|
29
31
|
constructor(rootDirectory: string, config?: Partial<MemoryConfig>);
|
|
30
32
|
private databasePath;
|
|
31
33
|
initialize(): Promise<void>;
|
|
@@ -61,6 +63,7 @@ export declare class SQLiteMemoryProvider implements MemoryProvider, MemoryPropo
|
|
|
61
63
|
markMigration(version: number, name: string): void;
|
|
62
64
|
private selectRecallCandidates;
|
|
63
65
|
private runMigrations;
|
|
66
|
+
private backfillScopeKeys;
|
|
64
67
|
private initializeFtsIndex;
|
|
65
68
|
private recreateFtsIndex;
|
|
66
69
|
private rebuildFtsIndex;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.88.
|
|
3
|
+
"version": "7.88.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",
|