opencode-swarm 6.38.0 → 6.40.1
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/README.md +1 -1
- package/dist/cli/index.js +246 -94
- package/dist/commands/index.d.ts +1 -1
- package/dist/config/plan-schema.d.ts +2 -0
- package/dist/config/schema.d.ts +3 -2
- package/dist/index.js +1335 -921
- package/dist/services/compaction-service.d.ts +2 -2
- package/dist/session/snapshot-reader.d.ts +8 -0
- package/dist/tools/lint.d.ts +1 -2
- package/dist/tools/save-plan.d.ts +1 -0
- package/dist/tools/tool-names.d.ts +1 -1
- package/dist/utils/path-security.d.ts +26 -0
- package/package.json +4 -1
- /package/dist/commands/{write_retro.d.ts → write-retro.d.ts} +0 -0
|
@@ -21,8 +21,8 @@ export interface CompactionServiceHook {
|
|
|
21
21
|
}) => Promise<void>;
|
|
22
22
|
}
|
|
23
23
|
export declare function createCompactionService(config: CompactionConfig, directory: string, injectMessage: (sessionId: string, message: string) => void): CompactionServiceHook;
|
|
24
|
-
export declare function getCompactionMetrics(): {
|
|
24
|
+
export declare function getCompactionMetrics(sessionId?: string): {
|
|
25
25
|
compactionCount: number;
|
|
26
26
|
lastSnapshotAt: string | null;
|
|
27
27
|
};
|
|
28
|
-
export declare function resetCompactionState(): void;
|
|
28
|
+
export declare function resetCompactionState(sessionId?: string): void;
|
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { AgentSessionState } from '../state';
|
|
6
6
|
import type { SerializedAgentSession, SnapshotData } from './snapshot-writer';
|
|
7
|
+
/**
|
|
8
|
+
* Transient session fields that must be reset on rehydration.
|
|
9
|
+
* Centralised here to keep the reset logic DRY and auditable.
|
|
10
|
+
*/
|
|
11
|
+
export declare const TRANSIENT_SESSION_FIELDS: ReadonlyArray<{
|
|
12
|
+
name: string;
|
|
13
|
+
resetValue: unknown;
|
|
14
|
+
}>;
|
|
7
15
|
/**
|
|
8
16
|
* Deserialize a SerializedAgentSession back to AgentSessionState.
|
|
9
17
|
* Handles Map/Set conversion and migration safety defaults.
|
package/dist/tools/lint.d.ts
CHANGED
|
@@ -24,8 +24,7 @@ export interface LintErrorResult {
|
|
|
24
24
|
message?: string;
|
|
25
25
|
}
|
|
26
26
|
export type LintResult = LintSuccessResult | LintErrorResult;
|
|
27
|
-
export
|
|
28
|
-
export declare function containsControlChars(str: string): boolean;
|
|
27
|
+
export { containsControlChars, containsPathTraversal, } from '../utils/path-security';
|
|
29
28
|
export declare function validateArgs(args: unknown): args is {
|
|
30
29
|
mode: 'fix' | 'check';
|
|
31
30
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Used for constants and agent setup references.
|
|
4
4
|
*/
|
|
5
5
|
/** Union type of all valid tool names */
|
|
6
|
-
export type ToolName = 'diff' | 'syntax_check' | 'placeholder_scan' | 'imports' | 'lint' | 'secretscan' | 'sast_scan' | 'build_check' | 'pre_check_batch' | 'quality_budget' | 'symbols' | 'complexity_hotspots' | 'schema_drift' | 'todo_extract' | 'evidence_check' | 'check_gate_status' | 'completion_verify' | 'sbom_generate' | 'checkpoint' | 'pkg_audit' | 'test_runner' | 'detect_domains' | 'gitingest' | 'retrieve_summary' | 'extract_code_blocks' | 'phase_complete' | 'save_plan' | 'update_task_status' | 'write_retro' | 'declare_scope' | 'knowledge_query';
|
|
6
|
+
export type ToolName = 'diff' | 'syntax_check' | 'placeholder_scan' | 'imports' | 'lint' | 'secretscan' | 'sast_scan' | 'build_check' | 'pre_check_batch' | 'quality_budget' | 'symbols' | 'complexity_hotspots' | 'schema_drift' | 'todo_extract' | 'evidence_check' | 'check_gate_status' | 'completion_verify' | 'sbom_generate' | 'checkpoint' | 'pkg_audit' | 'test_runner' | 'detect_domains' | 'gitingest' | 'retrieve_summary' | 'extract_code_blocks' | 'phase_complete' | 'save_plan' | 'update_task_status' | 'write_retro' | 'declare_scope' | 'knowledge_query' | 'doc_scan' | 'doc_extract' | 'curator_analyze' | 'knowledgeAdd' | 'knowledgeRecall' | 'knowledgeRemove';
|
|
7
7
|
/** Readonly array of all tool names */
|
|
8
8
|
export declare const TOOL_NAMES: readonly ToolName[];
|
|
9
9
|
/** Set for O(1) tool name validation */
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical path security utilities.
|
|
3
|
+
* Consolidated from 6+ local implementations across the codebase.
|
|
4
|
+
* Use these instead of defining local copies.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Check if a string contains path traversal patterns.
|
|
8
|
+
* Based on the most comprehensive implementation (test-runner.ts).
|
|
9
|
+
* Checks: basic ../, isolated double dots, URL-encoded traversal,
|
|
10
|
+
* double-encoded traversal, Unicode homoglyphs, and encoded separators.
|
|
11
|
+
*/
|
|
12
|
+
export declare function containsPathTraversal(str: string): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Check if a string contains control characters that could be used
|
|
15
|
+
* for injection attacks. Matches null byte, tab, carriage return, and newline.
|
|
16
|
+
*/
|
|
17
|
+
export declare function containsControlChars(str: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Validate a directory path for safety.
|
|
20
|
+
* Rejects empty paths, paths with traversal, control characters, and absolute paths.
|
|
21
|
+
* Throws an Error if the directory is invalid.
|
|
22
|
+
*
|
|
23
|
+
* @param directory - The directory string to validate
|
|
24
|
+
* @throws Error if directory is invalid
|
|
25
|
+
*/
|
|
26
|
+
export declare function validateDirectory(directory: string): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.40.1",
|
|
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",
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
"opencode-swarm": "./dist/cli/index.js"
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
|
+
"engines": {
|
|
12
|
+
"bun": ">=1.0.0"
|
|
13
|
+
},
|
|
11
14
|
"license": "MIT",
|
|
12
15
|
"repository": {
|
|
13
16
|
"type": "git",
|
|
File without changes
|