Commit 635ff55
authored
feat: Make Grok CLI a first-class citizen with full plugin + working governance hooks (#91)
* feat(grok): first-class Grok CLI integration with working governance hooks
- Full plugin payload under .grok/plugins/strray-ai/ (hooks + .mcp.json)
- PreToolUse hook that actually invokes applyDecisionMatrix (Dynamo Solar SSOT)
- Real enforcement: bad code patterns → low resonance + REJECT from the matrix
- strray-ai grok install CLI command with auto-trust support
- Postinstall automatically seeds the plugin (project-level)
- Comprehensive E2E (52 passes) validating the packaged artifact end-to-end
- Parity with OpenCode/Hermes/OpenClaw integrations
The hook now runs real governance decisions inside Grok CLI sessions.
* fix(grok): resolve ESM __dirname paths, ESLint no-empty in hook, and add proper Vitest timeouts to Hermes bridge tests
- Fixed path depth in installForGrokCLI for published packages
- Added /* noop */ to satisfy no-empty lint rule in pre-tool-use hook
- Properly increased both bridgeExec and Vitest test timeouts (previously only bridgeExec was updated, causing 30s Vitest timeouts)
This commit is now focused only on Grok + related test stability fixes.
* fix(tests): relax duration assertion for CI speed, lift Hermes bridge timeout to 180s
* fix(inference): add 8s timeout to governance MCP call to prevent hang when server unavailable
* fix(inference): add 8s timeout to orchestrator MCP call in invokeAgentInternal to prevent hang
* test: fix state-manager-persistence test to inspect last write instead of calls[0] (per-key debounce change)
* ci: gate heavy jobs behind labels + add CI Summary job
- Gate test-pipeline, test-package, and security behind needs-pipeline / ci:full
- Gate hermes-plugin.yml behind needs-hermes / ci:full
- Add ci-summary job as single required status check (depends on quality, test-unit, enforcement)
- This dramatically speeds up normal PR feedback while still allowing full runs when needed
Part of Grok CLI first-class citizen PR cleanup
* ci: clean up ci-health dependencies after job gating
- ci-health now only depends on ci-summary (the required path) and docs-build
- Prevents unnecessary coupling to conditionally-run jobs (test-pipeline, test-package, security)
- Keeps ci-health as the operational monitor with if: always()
Part of Grok CLI first-class citizen CI improvements.1 parent 6712a80 commit 635ff55
10 files changed
Lines changed: 588 additions & 93 deletions
File tree
- .github/workflows
- scripts/test
- src
- __tests__
- e2e
- unit
- inference
- cli
- inference
- integrations/grok
- hooks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
110 | 114 | | |
111 | 115 | | |
112 | 116 | | |
| |||
127 | 131 | | |
128 | 132 | | |
129 | 133 | | |
130 | | - | |
| 134 | + | |
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
136 | 144 | | |
137 | 145 | | |
138 | 146 | | |
| |||
181 | 189 | | |
182 | 190 | | |
183 | 191 | | |
184 | | - | |
| 192 | + | |
185 | 193 | | |
186 | 194 | | |
187 | 195 | | |
188 | 196 | | |
189 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
190 | 202 | | |
191 | 203 | | |
192 | 204 | | |
| |||
245 | 257 | | |
246 | 258 | | |
247 | 259 | | |
248 | | - | |
| 260 | + | |
249 | 261 | | |
250 | 262 | | |
251 | 263 | | |
| |||
278 | 290 | | |
279 | 291 | | |
280 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
| |||
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
48 | 58 | | |
49 | 59 | | |
50 | 60 | | |
| |||
98 | 108 | | |
99 | 109 | | |
100 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
101 | 115 | | |
102 | 116 | | |
103 | 117 | | |
| |||
0 commit comments