opencode-swarm 6.44.1 → 6.44.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/dist/agents/critic.d.ts +1 -1
- package/dist/cli/index.js +358 -309
- package/dist/index.js +709 -600
- package/dist/knowledge/hive-promoter.d.ts +23 -0
- package/dist/parallel/file-locks.d.ts +12 -5
- package/package.json +3 -3
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hive promotion logic for manually promoting lessons to the hive knowledge store.
|
|
3
|
+
*/
|
|
4
|
+
export interface LessonValidationResult {
|
|
5
|
+
valid: boolean;
|
|
6
|
+
reason?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Validate a lesson text for dangerous content or raw shell commands.
|
|
10
|
+
*/
|
|
11
|
+
export declare function validateLesson(text: string): LessonValidationResult;
|
|
12
|
+
/**
|
|
13
|
+
* Return the platform-appropriate path to the hive knowledge file.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getHiveFilePath(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Promote a lesson text directly to the hive knowledge store.
|
|
18
|
+
*/
|
|
19
|
+
export declare function promoteToHive(_directory: string, lesson: string, category?: string): Promise<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Promote an existing lesson from .swarm/knowledge.jsonl to the hive by ID.
|
|
22
|
+
*/
|
|
23
|
+
export declare function promoteFromSwarm(directory: string, lessonId: string): Promise<string>;
|
|
@@ -4,21 +4,28 @@ export interface FileLock {
|
|
|
4
4
|
taskId: string;
|
|
5
5
|
timestamp: string;
|
|
6
6
|
expiresAt: number;
|
|
7
|
+
_release?: () => Promise<void>;
|
|
7
8
|
}
|
|
8
9
|
/**
|
|
9
|
-
* Try to acquire a lock on a file
|
|
10
|
+
* Try to acquire a lock on a file using proper-lockfile
|
|
10
11
|
*/
|
|
11
|
-
export declare function tryAcquireLock(directory: string, filePath: string, agent: string, taskId: string): {
|
|
12
|
+
export declare function tryAcquireLock(directory: string, filePath: string, agent: string, taskId: string): Promise<{
|
|
12
13
|
acquired: true;
|
|
13
14
|
lock: FileLock;
|
|
14
15
|
} | {
|
|
15
16
|
acquired: false;
|
|
16
17
|
existing?: FileLock;
|
|
17
|
-
}
|
|
18
|
+
}>;
|
|
18
19
|
/**
|
|
19
|
-
* Release a lock on a file
|
|
20
|
+
* Release a lock on a file.
|
|
21
|
+
*
|
|
22
|
+
* The preferred release path is `lockResult.lock._release()` at the call site.
|
|
23
|
+
* This function is kept for API compatibility but is a no-op: callers that
|
|
24
|
+
* stored a proper-lockfile release function on `lock._release` should call
|
|
25
|
+
* that directly. Callers that do not have the release function (e.g. tests
|
|
26
|
+
* that write lock sentinel files by hand) can ignore the return value.
|
|
20
27
|
*/
|
|
21
|
-
export declare function releaseLock(
|
|
28
|
+
export declare function releaseLock(_directory: string, _filePath: string, _taskId: string): Promise<boolean>;
|
|
22
29
|
/**
|
|
23
30
|
* Check if a file is locked
|
|
24
31
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "6.44.
|
|
3
|
+
"version": "6.44.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",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"LICENSE"
|
|
38
38
|
],
|
|
39
39
|
"scripts": {
|
|
40
|
-
"clean": "
|
|
40
|
+
"clean": "bun -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
41
41
|
"build": "bun run clean && bun run scripts/copy-grammars.ts && bun build src/index.ts --outdir dist --target bun --format esm && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm && bun run scripts/copy-grammars.ts --to-dist && tsc --emitDeclarationOnly",
|
|
42
42
|
"typecheck": "tsc --noEmit",
|
|
43
43
|
"test": "bun test",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@biomejs/biome": "2.3.14",
|
|
61
|
-
"bun-types": "
|
|
61
|
+
"bun-types": "1.3.8",
|
|
62
62
|
"js-yaml": "^4.1.1",
|
|
63
63
|
"typescript": "^5.7.3"
|
|
64
64
|
}
|