opencode-swarm 7.49.1 → 7.50.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/README.md CHANGED
@@ -39,8 +39,8 @@ Most AI coding tools let one model write code and ask that same model whether th
39
39
  - 🔁 **Resumable sessions** — all state saved to `.swarm/`; pick up any project any day
40
40
  - 🌐 **20 languages** — TypeScript, Python, Go, Rust, Java, Kotlin, C/C++, C#, Ruby, Swift, Dart, PHP, JavaScript, CSS, Bash, PowerShell, INI, Regex (extending: see [docs/adding-a-language.md](docs/adding-a-language.md))
41
41
  - 🛡️ **Built-in security** — SAST, secrets scanning, dependency audit per task
42
+ - 🔒 **Scope enforcement** — Validates write targets against declared scope with cross-process persistence, TTL expiry, and scope-aware destructive command blocking. **Handles both single-string and array-based path arguments** (`files[]`, `paths[]`, `targetFiles[]`) to prevent scope bypass via multi-file tool calls.
42
43
  - 📝 **Shell write detection** — Static analysis of POSIX/PowerShell/cmd commands to detect file writes (redirects, builtins, in-place editors, network downloads, archive extraction, git destructive ops) before execution
43
- - 🔒 **Scope enforcement** — Validates write targets against declared scope with cross-process persistence, TTL expiry, and scope-aware destructive command blocking
44
44
  - 🆓 **Free tier** — works with OpenCode Zen's free model roster
45
45
  - ⚙️ **Fully configurable** — override any agent's model, disable agents, tune guardrails
46
46
 
package/dist/cli/index.js CHANGED
@@ -52,7 +52,7 @@ var package_default;
52
52
  var init_package = __esm(() => {
53
53
  package_default = {
54
54
  name: "opencode-swarm",
55
- version: "7.49.1",
55
+ version: "7.50.0",
56
56
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
57
57
  main: "dist/index.js",
58
58
  types: "dist/index.d.ts",
@@ -16987,6 +16987,10 @@ var init_tool_metadata = __esm(() => {
16987
16987
  lean_turbo_status: {
16988
16988
  description: "returns Lean Turbo configuration and active status for the current session",
16989
16989
  agents: ["architect"]
16990
+ },
16991
+ apply_patch: {
16992
+ description: "Apply a unified diff patch to workspace files with exact context matching, atomic writes, and path validation",
16993
+ agents: ["coder"]
16990
16994
  }
16991
16995
  };
16992
16996
  TOOL_NAMES = Object.keys(TOOL_METADATA);
@@ -41,3 +41,27 @@ export declare function createScopeGuardHook(config: Partial<ScopeGuardConfig>,
41
41
  * @returns true if the file is within scope, false otherwise
42
42
  */
43
43
  export declare function isFileInScope(filePath: string, scopeEntries: string[], directory?: string): boolean;
44
+ /**
45
+ * Sanitize a raw file path string to prevent log injection and null-byte attacks.
46
+ * Replaces C0 control characters (0x00-0x1F), DEL (0x7F), C1 control characters
47
+ * (0x80-0x9F), and strips remaining ANSI CSI sequences.
48
+ *
49
+ * All matched control characters are replaced with underscores rather than removed,
50
+ * so that the resulting string can still be passed to `path.resolve()` without
51
+ * triggering `ERR_INVALID_ARG_VALUE` on embedded null bytes.
52
+ *
53
+ * Extracted from the original inline sanitization in the scope guard
54
+ * to support reuse across single-path and multi-path code paths.
55
+ *
56
+ * @param raw - The unsanitized file path string
57
+ * @returns The sanitized file path string safe for logging and scope matching
58
+ */
59
+ declare function sanitizePath(raw: string): string;
60
+ /**
61
+ * Internal implementation details exposed for unit testing.
62
+ * DO NOT use these in production code.
63
+ */
64
+ export declare const _internals: {
65
+ sanitizePath: typeof sanitizePath;
66
+ };
67
+ export {};