opencode-swarm 6.44.0 → 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.
@@ -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(directory: string, filePath: string, taskId: string): boolean;
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
  */
@@ -41,6 +41,14 @@ export declare function getAdditionalLinterCommand(linter: AdditionalLinter, mod
41
41
  export declare function detectAdditionalLinter(cwd: string): 'ruff' | 'clippy' | 'golangci-lint' | 'checkstyle' | 'ktlint' | 'dotnet-format' | 'cppcheck' | 'swiftlint' | 'dart-analyze' | 'rubocop' | null;
42
42
  /** Compute the local biome binary path for a given project directory. */
43
43
  export declare function getBiomeBinPath(directory: string): string;
44
+ /**
45
+ * Resolve the binary path for a linter, using the same hierarchy as detectAvailableLinter:
46
+ * 1. Local node_modules/.bin
47
+ * 2. Ancestor node_modules/.bin (monorepo)
48
+ * 3. process.env.PATH scan
49
+ * 4. Local path as fallback (may not exist)
50
+ */
51
+ export declare function resolveLinterBinPath(linter: SupportedLinter, projectDir: string): string;
44
52
  /** Compute the local eslint binary path for a given project directory. */
45
53
  export declare function getEslintBinPath(directory: string): string;
46
54
  export declare function detectAvailableLinter(directory?: string): Promise<SupportedLinter | null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.44.0",
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": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
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": "latest",
61
+ "bun-types": "1.3.8",
62
62
  "js-yaml": "^4.1.1",
63
63
  "typescript": "^5.7.3"
64
64
  }