squadrant 0.23.0 → 0.24.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/dist/index.js +150 -142
- package/dist/index.js.map +1 -1
- package/dist/squadrantd.js +46 -25
- package/dist/squadrantd.js.map +1 -1
- package/package.json +1 -1
- package/plugin/skills/gate/SKILL.md +8 -0
- package/plugin/skills/set-gate/SKILL.md +66 -0
package/package.json
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gate
|
|
3
|
+
description: Shortcut for squadrant:set-gate — get or set the permission gate mode (on | off | auto). Use when the user types /gate or asks about the permission gate.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# gate — shortcut for squadrant:set-gate
|
|
7
|
+
|
|
8
|
+
Shorthand alias. **Invoke the `set-gate` skill** (via the Skill tool) and follow it exactly. All logic lives there — this file intentionally holds none, so the two never drift.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: set-gate
|
|
3
|
+
description: Read or set the permission gate mode (on | off | auto). Use when the user wants to flip the gate on to test an unattended crew, off when the classifier misbehaves, or to check the current mode.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# squadrant:set-gate — Permission Gate Mode
|
|
7
|
+
|
|
8
|
+
`defaults.gate.mode` (#782/#828) controls whether squadrant's own classifier decides a router-backed crew/captain's `PermissionRequest`, instead of Claude Code's built-in auto-mode classifier (which is hardcoded to Claude Sonnet 5 and fails closed on a router backend).
|
|
9
|
+
|
|
10
|
+
## Modes
|
|
11
|
+
|
|
12
|
+
| Mode | Meaning |
|
|
13
|
+
|------|---------|
|
|
14
|
+
| **on** | squadrant's gate decides — the configured `engine` (`router` or `auto-gate`) classifies each request. |
|
|
15
|
+
| **off** | The gate never touches a `PermissionRequest` — the agent's normal permission flow is untouched. |
|
|
16
|
+
| **auto** | Yield to the agent's own built-in classifier. Default when the field is absent — zero behavior change. |
|
|
17
|
+
|
|
18
|
+
## Get current mode
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
squadrant gate mode
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Prints the effective mode and where it came from: `env` (the `SQUADRANT_GATE` override), `config` (`defaults.gate.mode`), or `default` (`auto`, field absent).
|
|
25
|
+
|
|
26
|
+
## Set mode
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
squadrant gate mode on
|
|
30
|
+
squadrant gate mode off
|
|
31
|
+
squadrant gate mode auto
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
- Validates the value (errors with the 3 valid options if invalid).
|
|
35
|
+
- Writes `defaults.gate.mode` via the existing `saveConfig` atomic path.
|
|
36
|
+
- Prints `old → new`.
|
|
37
|
+
- No daemon bounce needed — `defaults.gate.mode` is not daemon-cached; the CLI reads it live on every hook invocation.
|
|
38
|
+
- If `SQUADRANT_GATE` is set in the current shell session, it still overrides the config value for that session — the command warns when this is the case.
|
|
39
|
+
|
|
40
|
+
## Status (classifier + credential, nice-to-have)
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
squadrant gate status
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Prints the effective mode + source, the resolved `engine`, the resolved classifier `model`, and whether the engine's credential resolves (`present`/`absent`). **Never** prints the credential value itself.
|
|
47
|
+
|
|
48
|
+
## Manual edit (fallback)
|
|
49
|
+
|
|
50
|
+
If the CLI is unavailable, edit `~/.config/squadrant/config.json` directly:
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"defaults": {
|
|
55
|
+
"gate": {
|
|
56
|
+
"mode": "on"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Valid values: `"on"` | `"off"` | `"auto"`. Absent field is equivalent to `"auto"`.
|
|
63
|
+
|
|
64
|
+
## Precedence
|
|
65
|
+
|
|
66
|
+
Env (`SQUADRANT_GATE`) always wins over config, which always wins over the `auto` default. Router-backed crews/captains inject `SQUADRANT_GATE=on` automatically — that session-level override is not undone by changing config.
|