opencode-swarm 6.31.3 → 6.32.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 +96 -110
- package/dist/cli/index.js +12 -3
- package/dist/config/schema.d.ts +12 -0
- package/dist/hooks/guardrails.d.ts +4 -3
- package/dist/index.js +270 -186
- package/dist/utils/tool-output.d.ts +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,24 +1,42 @@
|
|
|
1
1
|
# OpenCode Swarm
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div align="center">
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Your AI writes the code. Swarm makes sure it actually works.**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/opencode-swarm)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
[](https://github.com/zaxbysauce/opencode-swarm)
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
[Website](https://swarmai.site/) · [Getting Started](docs/getting-started.md) · [Configuration](docs/configuration.md) · [Architecture](docs/architecture.md)
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
</div>
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
---
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
OpenCode Swarm is a plugin for [OpenCode](https://opencode.ai) that turns a single AI coding session into an **architect-led team of 9 specialized agents**. One agent writes the code. A different agent reviews it. Another writes and runs tests. Another checks security. **Nothing ships until every required gate passes.**
|
|
16
18
|
|
|
17
19
|
```bash
|
|
18
20
|
npm install -g opencode-swarm
|
|
19
21
|
```
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
### Why Swarm?
|
|
24
|
+
|
|
25
|
+
Most AI coding tools let one model write code and ask that same model whether the code is good. That misses too much. Swarm separates planning, implementation, review, testing, and documentation into specialized internal roles — and enforces gated execution so agents never mutate the codebase in parallel.
|
|
26
|
+
|
|
27
|
+
### Key Features
|
|
28
|
+
|
|
29
|
+
- 🏗️ **9 specialized agents** — architect, coder, reviewer, test engineer, critic, explorer, SME, docs, designer
|
|
30
|
+
- 🔒 **Gated pipeline** — code never ships without reviewer + test engineer approval
|
|
31
|
+
- 🔁 **Resumable sessions** — all state saved to `.swarm/`; pick up any project any day
|
|
32
|
+
- 🌐 **11 languages** — TypeScript, Python, Go, Rust, Java, Kotlin, C#, C/C++, Swift, Dart, Ruby
|
|
33
|
+
- 🛡️ **Built-in security** — SAST, secrets scanning, dependency audit per task
|
|
34
|
+
- 🆓 **Free tier** — works with OpenCode Zen's free model roster
|
|
35
|
+
- ⚙️ **Fully configurable** — override any agent's model, disable agents, tune guardrails
|
|
36
|
+
|
|
37
|
+
> **You select a Swarm architect once in the OpenCode GUI.** The architect coordinates all other agents automatically — you never manually switch between internal roles. If you use the default OpenCode `Build` / `Plan` modes, the plugin is bypassed entirely.
|
|
38
|
+
|
|
39
|
+
---
|
|
22
40
|
|
|
23
41
|
## What Actually Happens
|
|
24
42
|
|
|
@@ -59,92 +77,57 @@ All project state lives in `.swarm/`:
|
|
|
59
77
|
└── drift-report-phase-N.json # Plan-vs-reality drift reports
|
|
60
78
|
```
|
|
61
79
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## Why This Exists
|
|
67
|
-
|
|
68
|
-
Most AI coding tools let one model write code and then ask that same model whether the code is good. That misses too much.
|
|
69
|
-
|
|
70
|
-
Swarm separates planning, implementation, review, testing, and documentation into specialized internal roles, and it enforces gated execution instead of letting multiple agents mutate the codebase in parallel.
|
|
80
|
+
Swarm is resumable by design. If `.swarm/` already exists, the architect goes straight into **RESUME** → **EXECUTE** instead of repeating discovery.
|
|
71
81
|
|
|
72
82
|
---
|
|
73
83
|
|
|
74
84
|
## Quick Start
|
|
75
85
|
|
|
76
|
-
|
|
86
|
+
> **Prerequisites:** [OpenCode](https://opencode.ai) installed and working. An API key for at least one LLM provider (or use the free OpenCode Zen tier — no key required).
|
|
87
|
+
|
|
88
|
+
### Step 1 — Install
|
|
77
89
|
|
|
78
90
|
```bash
|
|
79
91
|
npm install -g opencode-swarm
|
|
80
92
|
```
|
|
81
93
|
|
|
82
|
-
### 2
|
|
94
|
+
### Step 2 — Open your project in OpenCode
|
|
83
95
|
|
|
84
96
|
```bash
|
|
97
|
+
cd /your/project
|
|
85
98
|
opencode
|
|
86
99
|
```
|
|
87
100
|
|
|
88
|
-
### 3
|
|
101
|
+
### Step 3 — Select a Swarm architect and describe your goal
|
|
89
102
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
```text
|
|
93
|
-
/swarm diagnose
|
|
94
|
-
/swarm agents
|
|
95
|
-
/swarm config
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
What they tell you:
|
|
99
|
-
|
|
100
|
-
* `/swarm diagnose` verifies Swarm health and setup
|
|
101
|
-
* `/swarm agents` shows the registered internal agents and model assignments
|
|
102
|
-
* `/swarm config` shows the resolved configuration currently in effect
|
|
103
|
-
|
|
104
|
-
### 4. Select a Swarm architect and start
|
|
105
|
-
|
|
106
|
-
1. **Choose a Swarm architect** in the OpenCode GUI (the exact name depends on your configuration — you can define multiple architects with different model assignments)
|
|
107
|
-
2. Then describe what you want to build.
|
|
103
|
+
1. In the OpenCode GUI, open the **agent/mode dropdown** and select a **Swarm architect** (e.g., `architect`).
|
|
104
|
+
2. Type what you want to build:
|
|
108
105
|
|
|
109
106
|
```text
|
|
110
107
|
Build a REST API with user registration, login, and JWT auth.
|
|
111
108
|
```
|
|
112
109
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
### 5. Understand first run vs later runs
|
|
110
|
+
That's it. The architect coordinates all other agents automatically.
|
|
116
111
|
|
|
117
|
-
|
|
112
|
+
> **First time?** Run `/swarm diagnose` to verify Swarm is healthy, `/swarm agents` to see registered agents, and `/swarm config` to see the resolved configuration.
|
|
118
113
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
Use these commands any time:
|
|
114
|
+
### Step 4 — Monitor progress
|
|
122
115
|
|
|
123
116
|
```text
|
|
124
|
-
/swarm status
|
|
125
|
-
/swarm plan
|
|
126
|
-
/swarm
|
|
117
|
+
/swarm status # Current phase and task
|
|
118
|
+
/swarm plan # Full project plan
|
|
119
|
+
/swarm evidence # Review and test results per task
|
|
127
120
|
```
|
|
128
121
|
|
|
129
|
-
###
|
|
130
|
-
|
|
131
|
-
If you want a completely fresh Swarm run for the current project:
|
|
122
|
+
### Step 5 — Start over if needed
|
|
132
123
|
|
|
133
124
|
```text
|
|
134
125
|
/swarm reset --confirm
|
|
135
126
|
```
|
|
136
127
|
|
|
137
|
-
|
|
128
|
+
### Step 6 — Configure models (optional)
|
|
138
129
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
By default, Swarm works with its default model setup. If you want to override agent models, create:
|
|
142
|
-
|
|
143
|
-
```text
|
|
144
|
-
.opencode/opencode-swarm.json
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
Example:
|
|
130
|
+
Swarm works with its defaults out of the box. To override models, create `.opencode/opencode-swarm.json`:
|
|
148
131
|
|
|
149
132
|
```json
|
|
150
133
|
{
|
|
@@ -155,17 +138,17 @@ Example:
|
|
|
155
138
|
}
|
|
156
139
|
```
|
|
157
140
|
|
|
158
|
-
You only need to specify the agents you want to override.
|
|
141
|
+
You only need to specify the agents you want to override. The `architect` inherits the model currently selected in the OpenCode UI unless you set it explicitly.
|
|
142
|
+
|
|
143
|
+
See the [full configuration reference](#configuration-reference) and the [free-tier model setup](#free-tier-opencode-zen-models) for more options.
|
|
159
144
|
|
|
160
|
-
|
|
145
|
+
---
|
|
161
146
|
|
|
162
147
|
## Common First-Run Questions
|
|
163
148
|
|
|
164
149
|
### "Do I need to select a Swarm architect?"
|
|
165
150
|
|
|
166
|
-
**Yes.** You must explicitly choose a Swarm architect agent in the OpenCode GUI before starting your session.
|
|
167
|
-
|
|
168
|
-
If you use the default OpenCode `Build` / `Plan` options without selecting a Swarm architect, the plugin is bypassed entirely.
|
|
151
|
+
**Yes.** You must explicitly choose a Swarm architect agent in the OpenCode GUI before starting your session. If you use the default OpenCode `Build` / `Plan` options, the plugin is bypassed entirely.
|
|
169
152
|
|
|
170
153
|
### "Why did the second run start coding immediately?"
|
|
171
154
|
|
|
@@ -195,7 +178,7 @@ Run:
|
|
|
195
178
|
|
|
196
179
|
Swarm works with any LLM provider supported by OpenCode. Different agents benefit from different models — the architect needs strong reasoning, the coder needs strong code generation, and the reviewer benefits from a model different from the coder (to catch blind spots).
|
|
197
180
|
|
|
198
|
-
### Free Tier
|
|
181
|
+
### Free Tier — OpenCode Zen Models {#free-tier-opencode-zen-models}
|
|
199
182
|
|
|
200
183
|
OpenCode Zen provides free models via the `opencode/` provider prefix. These are excellent starting points and require no API key:
|
|
201
184
|
|
|
@@ -644,7 +627,7 @@ Optional enhancement: Semgrep (if on PATH).
|
|
|
644
627
|
</details>
|
|
645
628
|
|
|
646
629
|
<details>
|
|
647
|
-
<summary><strong>Full Configuration Reference</strong></summary>
|
|
630
|
+
<summary id="configuration-reference"><strong>Full Configuration Reference</strong></summary>
|
|
648
631
|
|
|
649
632
|
Config file location: `~/.config/opencode/opencode-swarm.json` (global) or `.opencode/opencode-swarm.json` (project). Project config merges over global.
|
|
650
633
|
|
|
@@ -939,34 +922,54 @@ The following tools can be assigned to agents via overrides:
|
|
|
939
922
|
|
|
940
923
|
---
|
|
941
924
|
|
|
942
|
-
|
|
925
|
+
<details>
|
|
926
|
+
<summary><strong>Recent Changes (v6.12 – v6.31)</strong></summary>
|
|
943
927
|
|
|
944
|
-
|
|
928
|
+
> For the complete version history, see [CHANGELOG.md](CHANGELOG.md) or [docs/releases/](docs/releases/).
|
|
945
929
|
|
|
946
|
-
|
|
930
|
+
### v6.31.0 — process.cwd() Cleanup + Watchdog + Knowledge Tools
|
|
947
931
|
|
|
948
|
-
- **
|
|
949
|
-
-
|
|
932
|
+
- **process.cwd() cleanup**: All 14 source files now use plugin-injected `directory` parameter. Five tools migrated to `createSwarmTool` wrapper.
|
|
933
|
+
- **`curator_analyze` tool**: Architect can now explicitly trigger phase analysis and apply curator recommendations.
|
|
934
|
+
- **Watchdog system**: `scope_guard` (blocks out-of-scope writes), `delegation_ledger` (tracks per-session tool calls), and loop-detector escalation.
|
|
935
|
+
- **Self-correcting workflow**: `self_review` advisory hook after task transitions; `checkStaleImports` heuristic for unused import detection.
|
|
936
|
+
- **Knowledge memory tools**: `knowledge_recall`, `knowledge_add`, `knowledge_remove` — any agent can now directly access the persistent knowledge base.
|
|
950
937
|
|
|
951
|
-
### v6.
|
|
938
|
+
### v6.30.1 — Bug Fixes
|
|
952
939
|
|
|
953
|
-
|
|
940
|
+
- **Package manager detection**: `incremental_verify` now detects bun/npm/pnpm/yarn from lockfiles instead of always using `bun`.
|
|
941
|
+
- **spawnAsync OOM fix**: 512KB output cap prevents infinite-output commands from OOM-crashing.
|
|
942
|
+
- **Windows spawn fix**: `npx.cmd`, `npm.cmd`, `pnpm.cmd`, `yarn.cmd` resolved correctly on Windows.
|
|
943
|
+
- **Curator config fix**: `applyCuratorKnowledgeUpdates` now receives fully-populated `KnowledgeConfig`.
|
|
944
|
+
- **Rehydration race guard**: Concurrent `loadSnapshot` calls no longer silently drop workflow state.
|
|
954
945
|
|
|
955
|
-
|
|
956
|
-
- **Slop-detector hardening**: Enhanced detection of AI-generated placeholder code with multi-language heuristics (comments like `// TODO`, `// FIXME`, `// HACK`, language-specific patterns for Go/Rust/C#/Python). Advisory warnings injected into coder context when slop patterns detected.
|
|
957
|
-
- **CODEBASE REALITY CHECK**: Architect dispatches Explorer before planning to verify current state of referenced items. Produces a CODEBASE REALITY REPORT with statuses: NOT STARTED, PARTIALLY DONE, ALREADY COMPLETE, or ASSUMPTION INCORRECT. Skipped for greenfield projects.
|
|
958
|
-
- **Evidence schema fix**: Evidence bundles now correctly validate against schema; invalid entries are filtered.
|
|
959
|
-
- **Curator/docs alignment**: Curator health check in `/swarm diagnose` reports curator.enabled status and validates curator-summary.json.
|
|
946
|
+
### v6.29.4 — Cross-Task Regression Sweep
|
|
960
947
|
|
|
961
|
-
|
|
948
|
+
- **Regression sweep**: Architect dispatches `scope:"graph"` test runs after each task to catch cross-task regressions (found 15 in RAGAPPv2 retrospective).
|
|
949
|
+
- **Curator data pipeline**: Curator outputs now visible to the architect via advisory injection.
|
|
950
|
+
- **Full-suite opt-in**: Explicit flag unlocks full `bun test` execution when needed.
|
|
962
951
|
|
|
963
|
-
|
|
952
|
+
### v6.29.3 — Curator Visibility + Documentation Refresh
|
|
953
|
+
|
|
954
|
+
- **Curator status in diagnose**: `/swarm diagnose` now reports whether Curator is enabled/disabled and validates `curator-summary.json`.
|
|
955
|
+
- **README and config docs refreshed**: Updated `.swarm/` directory tree, Curator configuration options, and drift report artifacts.
|
|
956
|
+
|
|
957
|
+
### v6.29.2 — Multi-Language Incremental Verify + Slop-Detector Hardening
|
|
958
|
+
|
|
959
|
+
- **Multi-language incremental_verify**: Post-coder typecheck supports TypeScript/JavaScript, Go, Rust, and C#.
|
|
960
|
+
- **Slop-detector hardening**: Multi-language heuristics for placeholder code detection across Go/Rust/C#/Python.
|
|
961
|
+
- **CODEBASE REALITY CHECK**: Explorer verifies referenced items before planning (NOT STARTED / PARTIALLY DONE / ALREADY COMPLETE / ASSUMPTION INCORRECT).
|
|
962
|
+
- **Evidence schema fix**: Evidence bundles now correctly validate against schema.
|
|
963
|
+
|
|
964
|
+
### v6.29.1 — Advisory Hook Message Injection
|
|
964
965
|
|
|
965
|
-
- **Advisory hook message injection**: Enhanced message formatting for self-coding detection, partial gate tracking, batch detection, and scope violation warnings.
|
|
966
|
+
- **Advisory hook message injection**: Enhanced message formatting for self-coding detection, partial gate tracking, batch detection, and scope violation warnings.
|
|
966
967
|
|
|
967
|
-
### v6.
|
|
968
|
+
### v6.26 through v6.28 — Session Durability + Turbo Mode
|
|
968
969
|
|
|
969
|
-
|
|
970
|
+
- **Turbo Mode**: Accelerated task delegation for faster pipeline execution.
|
|
971
|
+
- **Session durability**: Directory-based evidence writes, task ID recovery from `plan.json` for cold/resumed sessions.
|
|
972
|
+
- **Gate recovery fix** (v6.26.1): `update_task_status(completed)` no longer blocks pure-verification tasks without a prior coder delegation.
|
|
970
973
|
|
|
971
974
|
### v6.22 — Curator Background Analysis + Session State Persistence
|
|
972
975
|
|
|
@@ -1068,33 +1071,16 @@ This release adds runtime detection hooks to catch and warn about architect work
|
|
|
1068
1071
|
|
|
1069
1072
|
These hooks are advisory (warnings only) and help maintain workflow discipline during long sessions.
|
|
1070
1073
|
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
## v6.19 Features
|
|
1074
|
-
|
|
1075
|
-
### Critic Sounding Board
|
|
1076
|
-
Before escalating to the user, the Architect consults the critic in SOUNDING_BOARD mode. The critic returns one of four verdicts: UNNECESSARY, REPHRASE, APPROVED, or RESOLVE.
|
|
1077
|
-
|
|
1078
|
-
### Escalation Discipline
|
|
1079
|
-
Three-tier escalation hierarchy ensures systematic problem resolution:
|
|
1080
|
-
1. **Tier 1**: Self-resolve using existing context
|
|
1081
|
-
2. **Tier 2**: Critic consultation via sounding board
|
|
1082
|
-
3. **Tier 3**: User escalation (requires critic APPROVED)
|
|
1074
|
+
### v6.19 — Critic Sounding Board + Complexity-Scaled Review
|
|
1083
1075
|
|
|
1084
|
-
|
|
1085
|
-
|
|
1076
|
+
- **Critic sounding board**: Before escalating to the user, the Architect consults the critic in SOUNDING_BOARD mode. Returns: UNNECESSARY, REPHRASE, APPROVED, or RESOLVE.
|
|
1077
|
+
- **Escalation discipline**: Three-tier hierarchy — self-resolve → critic consult → user escalation (requires critic APPROVED).
|
|
1078
|
+
- **Retry circuit breaker**: After 3 coder rejections, the Architect simplifies the approach instead of adding more logic.
|
|
1079
|
+
- **Intent reconstruction**: Reviewer reconstructs developer intent from task specs and diffs before evaluating changes.
|
|
1080
|
+
- **Complexity-scaled review**: TRIVIAL → Tier 1 only; MODERATE → Tiers 1–2; COMPLEX → all three tiers.
|
|
1081
|
+
- **`meta.summary` convention**: Agents include one-line summaries in state events for downstream agent consumption.
|
|
1086
1082
|
|
|
1087
|
-
|
|
1088
|
-
The mega-reviewer reconstructs developer intent from task specs and diffs before evaluating changes.
|
|
1089
|
-
|
|
1090
|
-
### Complexity-Scaled Review
|
|
1091
|
-
Changes classified as TRIVIAL, MODERATE, or COMPLEX receive appropriate review depth:
|
|
1092
|
-
- TRIVIAL → Tier 1 only
|
|
1093
|
-
- MODERATE → Tiers 1-2
|
|
1094
|
-
- COMPLEX → All three tiers
|
|
1095
|
-
|
|
1096
|
-
### meta.summary Convention
|
|
1097
|
-
Agents include one-line summaries in state events for downstream consumption by other agents.
|
|
1083
|
+
</details>
|
|
1098
1084
|
|
|
1099
1085
|
---
|
|
1100
1086
|
|
package/dist/cli/index.js
CHANGED
|
@@ -17856,7 +17856,10 @@ var PhaseCompleteConfigSchema = exports_external.object({
|
|
|
17856
17856
|
enabled: exports_external.boolean().default(true),
|
|
17857
17857
|
required_agents: exports_external.array(exports_external.enum(["coder", "reviewer", "test_engineer"])).default(["coder", "reviewer", "test_engineer"]),
|
|
17858
17858
|
require_docs: exports_external.boolean().default(true),
|
|
17859
|
-
policy: exports_external.enum(["enforce", "warn"]).default("enforce")
|
|
17859
|
+
policy: exports_external.enum(["enforce", "warn"]).default("enforce"),
|
|
17860
|
+
regression_sweep: exports_external.object({
|
|
17861
|
+
enforce: exports_external.boolean().default(false)
|
|
17862
|
+
}).optional()
|
|
17860
17863
|
});
|
|
17861
17864
|
var SummaryConfigSchema = exports_external.object({
|
|
17862
17865
|
enabled: exports_external.boolean().default(true),
|
|
@@ -18202,9 +18205,15 @@ var PluginConfigSchema = exports_external.object({
|
|
|
18202
18205
|
tool_output: exports_external.object({
|
|
18203
18206
|
truncation_enabled: exports_external.boolean().default(true),
|
|
18204
18207
|
max_lines: exports_external.number().min(10).max(500).default(150),
|
|
18205
|
-
per_tool: exports_external.record(exports_external.string(), exports_external.number()).optional()
|
|
18208
|
+
per_tool: exports_external.record(exports_external.string(), exports_external.number()).optional(),
|
|
18209
|
+
truncation_tools: exports_external.array(exports_external.string()).optional().describe("Tools to apply output truncation to. Defaults to diff, symbols, bash, shell, test_runner, lint, pre_check_batch, complexity_hotspots, pkg_audit, sbom_generate, schema_drift.")
|
|
18206
18210
|
}).optional(),
|
|
18207
18211
|
slop_detector: SlopDetectorConfigSchema.optional(),
|
|
18212
|
+
todo_gate: exports_external.object({
|
|
18213
|
+
enabled: exports_external.boolean().default(true),
|
|
18214
|
+
max_high_priority: exports_external.number().int().min(-1).default(0).describe("Max new high-priority TODOs (FIXME/HACK/XXX) before warning. 0 = warn on any. Set to -1 to disable."),
|
|
18215
|
+
block_on_threshold: exports_external.boolean().default(false).describe("If true, block phase completion when threshold exceeded. Default: advisory only.")
|
|
18216
|
+
}).optional(),
|
|
18208
18217
|
incremental_verify: IncrementalVerifyConfigSchema.optional(),
|
|
18209
18218
|
compaction_service: CompactionConfigSchema.optional()
|
|
18210
18219
|
});
|
|
@@ -36016,7 +36025,7 @@ function detectAdditionalLinter(cwd) {
|
|
|
36016
36025
|
}
|
|
36017
36026
|
async function detectAvailableLinter(directory) {
|
|
36018
36027
|
const _DETECT_TIMEOUT = 2000;
|
|
36019
|
-
const projectDir = directory
|
|
36028
|
+
const projectDir = directory;
|
|
36020
36029
|
const isWindows = process.platform === "win32";
|
|
36021
36030
|
const biomeBin = isWindows ? path17.join(projectDir, "node_modules", ".bin", "biome.EXE") : path17.join(projectDir, "node_modules", ".bin", "biome");
|
|
36022
36031
|
const eslintBin = isWindows ? path17.join(projectDir, "node_modules", ".bin", "eslint.cmd") : path17.join(projectDir, "node_modules", ".bin", "eslint");
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -209,6 +209,9 @@ export declare const PhaseCompleteConfigSchema: z.ZodObject<{
|
|
|
209
209
|
enforce: "enforce";
|
|
210
210
|
warn: "warn";
|
|
211
211
|
}>>;
|
|
212
|
+
regression_sweep: z.ZodOptional<z.ZodObject<{
|
|
213
|
+
enforce: z.ZodDefault<z.ZodBoolean>;
|
|
214
|
+
}, z.core.$strip>>;
|
|
212
215
|
}, z.core.$strip>;
|
|
213
216
|
export type PhaseCompleteConfig = z.infer<typeof PhaseCompleteConfigSchema>;
|
|
214
217
|
export declare const SummaryConfigSchema: z.ZodObject<{
|
|
@@ -489,6 +492,9 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
489
492
|
enforce: "enforce";
|
|
490
493
|
warn: "warn";
|
|
491
494
|
}>>;
|
|
495
|
+
regression_sweep: z.ZodOptional<z.ZodObject<{
|
|
496
|
+
enforce: z.ZodDefault<z.ZodBoolean>;
|
|
497
|
+
}, z.core.$strip>>;
|
|
492
498
|
}, z.core.$strip>>;
|
|
493
499
|
qa_retry_limit: z.ZodDefault<z.ZodNumber>;
|
|
494
500
|
inject_phase_reminders: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -737,6 +743,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
737
743
|
truncation_enabled: z.ZodDefault<z.ZodBoolean>;
|
|
738
744
|
max_lines: z.ZodDefault<z.ZodNumber>;
|
|
739
745
|
per_tool: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
746
|
+
truncation_tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
740
747
|
}, z.core.$strip>>;
|
|
741
748
|
slop_detector: z.ZodOptional<z.ZodObject<{
|
|
742
749
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -745,6 +752,11 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
745
752
|
diffLineThreshold: z.ZodDefault<z.ZodNumber>;
|
|
746
753
|
importHygieneThreshold: z.ZodDefault<z.ZodNumber>;
|
|
747
754
|
}, z.core.$strip>>;
|
|
755
|
+
todo_gate: z.ZodOptional<z.ZodObject<{
|
|
756
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
757
|
+
max_high_priority: z.ZodDefault<z.ZodNumber>;
|
|
758
|
+
block_on_threshold: z.ZodDefault<z.ZodBoolean>;
|
|
759
|
+
}, z.core.$strip>>;
|
|
748
760
|
incremental_verify: z.ZodOptional<z.ZodObject<{
|
|
749
761
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
750
762
|
command: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
@@ -28,11 +28,12 @@ export declare function setStoredInputArgs(callID: string, args: unknown): void;
|
|
|
28
28
|
export declare function deleteStoredInputArgs(callID: string): void;
|
|
29
29
|
/**
|
|
30
30
|
* Creates guardrails hooks for circuit breaker protection
|
|
31
|
-
* @param
|
|
32
|
-
* @param
|
|
31
|
+
* @param directory Working directory from plugin init context (required)
|
|
32
|
+
* @param directoryOrConfig Guardrails configuration object (when passed as second arg, replaces legacy config param)
|
|
33
|
+
* @param config Guardrails configuration (optional)
|
|
33
34
|
* @returns Tool before/after hooks and messages transform hook
|
|
34
35
|
*/
|
|
35
|
-
export declare function createGuardrailsHooks(directoryOrConfig?: string | GuardrailsConfig, config?: GuardrailsConfig): {
|
|
36
|
+
export declare function createGuardrailsHooks(directory: string, directoryOrConfig?: string | GuardrailsConfig, config?: GuardrailsConfig): {
|
|
36
37
|
toolBefore: (input: {
|
|
37
38
|
tool: string;
|
|
38
39
|
sessionID: string;
|