opencode-swarm 7.32.3 → 7.33.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.
- package/dist/cli/index.js +6 -2
- package/dist/config/schema.d.ts +16 -2
- package/dist/index.js +777 -391
- package/dist/memory/config.d.ts +5 -1
- package/dist/memory/gateway.d.ts +2 -0
- package/dist/memory/index.d.ts +2 -1
- package/dist/memory/provider.d.ts +1 -0
- package/dist/memory/sqlite-provider.d.ts +39 -0
- package/package.json +1 -1
package/dist/memory/config.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { MemoryKind } from './types';
|
|
2
2
|
export interface MemoryConfig {
|
|
3
3
|
enabled: boolean;
|
|
4
|
-
provider: 'local-jsonl';
|
|
4
|
+
provider: 'local-jsonl' | 'sqlite';
|
|
5
5
|
storageDir: string;
|
|
6
|
+
sqlite: {
|
|
7
|
+
path: string;
|
|
8
|
+
busyTimeoutMs: number;
|
|
9
|
+
};
|
|
6
10
|
recall: {
|
|
7
11
|
defaultMaxItems: number;
|
|
8
12
|
defaultTokenBudget: number;
|
package/dist/memory/gateway.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export declare class MemoryGateway {
|
|
|
34
34
|
private readonly now;
|
|
35
35
|
constructor(context: MemoryContext, options?: MemoryGatewayOptions);
|
|
36
36
|
isEnabled(): boolean;
|
|
37
|
+
dispose(): Promise<void>;
|
|
37
38
|
deriveAllowedScopes(): MemoryScopeRef[];
|
|
38
39
|
recall(input: RecallMemoryInput): Promise<RecallBundle>;
|
|
39
40
|
propose(input: ProposeMemoryInput): Promise<MemoryProposal>;
|
|
@@ -52,3 +53,4 @@ export declare class MemoryGateway {
|
|
|
52
53
|
private assertEnabled;
|
|
53
54
|
}
|
|
54
55
|
export declare function createMemoryGateway(context: MemoryContext, options?: MemoryGatewayOptions): MemoryGateway;
|
|
56
|
+
export declare function createConfiguredMemoryProvider(directory: string, config: MemoryConfig): MemoryProvider & MemoryProposalStore;
|
package/dist/memory/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export type { MemoryConfig } from './config';
|
|
|
2
2
|
export { DEFAULT_MEMORY_CONFIG, resolveMemoryConfig } from './config';
|
|
3
3
|
export { MemoryDisabledError, MemoryValidationError } from './errors';
|
|
4
4
|
export type { MemoryGatewayOptions, ProposeMemoryInput, RecallMemoryInput, } from './gateway';
|
|
5
|
-
export { createMemoryGateway, MemoryGateway } from './gateway';
|
|
5
|
+
export { createConfiguredMemoryProvider, createMemoryGateway, MemoryGateway, } from './gateway';
|
|
6
6
|
export { createMemoryLifecycleHooks, type MemoryLifecycleHookOptions, type MemoryLifecycleHooks, } from './injector';
|
|
7
7
|
export { LocalJsonlMemoryProvider } from './local-jsonl-provider';
|
|
8
8
|
export { buildRecallPromptBlock } from './prompt-block';
|
|
@@ -12,4 +12,5 @@ export { findSecrets, redactSecrets } from './redaction';
|
|
|
12
12
|
export { MEMORY_RECALL_PROFILES, type MemoryRecallProfile, normalizeMemoryAgentRole, resolveMemoryRecallProfile, } from './role-profiles';
|
|
13
13
|
export { appendMemoryRunLog, sanitizeRunId } from './run-log';
|
|
14
14
|
export { computeMemoryContentHash, createBundleId, createMemoryId, createProposalId, isExpired, normalizeMemoryText, validateMemoryProposal, validateMemoryRecordRules, } from './schema';
|
|
15
|
+
export { SQLiteMemoryProvider } from './sqlite-provider';
|
|
15
16
|
export type { MemoryContext, MemoryKind, MemoryListFilter, MemoryProposal, MemoryRecord, MemoryScopeRef, MemoryScopeType, RecallBundle, RecallInjectionSkipReason, RecallMode, RecallRequest, RecallResultItem, } from './types';
|
|
@@ -19,6 +19,7 @@ export interface MemoryRecallUsageEvent {
|
|
|
19
19
|
export interface MemoryProvider {
|
|
20
20
|
readonly name: string;
|
|
21
21
|
initialize?(): Promise<void>;
|
|
22
|
+
close?(): Promise<void> | void;
|
|
22
23
|
upsert(record: MemoryRecord): Promise<MemoryRecord>;
|
|
23
24
|
get(id: string): Promise<MemoryRecord | null>;
|
|
24
25
|
delete(id: string, reason?: string): Promise<void>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type MemoryConfig } from './config';
|
|
2
|
+
import type { MemoryProposalStore, MemoryProvider, MemoryRecallUsageEvent } from './provider';
|
|
3
|
+
import type { RecallScoringDiagnostics } from './scoring';
|
|
4
|
+
import type { MemoryListFilter, MemoryProposal, MemoryRecord, RecallRequest, RecallResultItem } from './types';
|
|
5
|
+
export declare class SQLiteMemoryProvider implements MemoryProvider, MemoryProposalStore {
|
|
6
|
+
readonly name = "sqlite";
|
|
7
|
+
private readonly rootDirectory;
|
|
8
|
+
private readonly config;
|
|
9
|
+
private initialized;
|
|
10
|
+
private db;
|
|
11
|
+
private memories;
|
|
12
|
+
private proposals;
|
|
13
|
+
constructor(rootDirectory: string, config?: Partial<MemoryConfig>);
|
|
14
|
+
private databasePath;
|
|
15
|
+
initialize(): Promise<void>;
|
|
16
|
+
upsert(record: MemoryRecord): Promise<MemoryRecord>;
|
|
17
|
+
get(id: string): Promise<MemoryRecord | null>;
|
|
18
|
+
delete(id: string, reason?: string): Promise<void>;
|
|
19
|
+
recall(request: RecallRequest): Promise<RecallResultItem[]>;
|
|
20
|
+
recallWithDiagnostics(request: RecallRequest): Promise<{
|
|
21
|
+
items: RecallResultItem[];
|
|
22
|
+
diagnostics: RecallScoringDiagnostics;
|
|
23
|
+
}>;
|
|
24
|
+
recordRecallUsage(event: MemoryRecallUsageEvent): Promise<void>;
|
|
25
|
+
list(filter?: MemoryListFilter): Promise<MemoryRecord[]>;
|
|
26
|
+
createProposal(proposal: MemoryProposal): Promise<MemoryProposal>;
|
|
27
|
+
listProposals(filter?: {
|
|
28
|
+
status?: MemoryProposal['status'];
|
|
29
|
+
limit?: number;
|
|
30
|
+
}): Promise<MemoryProposal[]>;
|
|
31
|
+
close(): void;
|
|
32
|
+
private runMigrations;
|
|
33
|
+
private loadMemories;
|
|
34
|
+
private loadProposals;
|
|
35
|
+
private writeMemory;
|
|
36
|
+
private event;
|
|
37
|
+
private insertEvent;
|
|
38
|
+
private requireDb;
|
|
39
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.33.0",
|
|
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",
|