hyperflash 1.0.0__tar.gz → 1.1.0__tar.gz
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.
- {hyperflash-1.0.0/src/hyperflash.egg-info → hyperflash-1.1.0}/PKG-INFO +91 -42
- {hyperflash-1.0.0 → hyperflash-1.1.0}/README.md +90 -41
- {hyperflash-1.0.0 → hyperflash-1.1.0}/pyproject.toml +1 -1
- {hyperflash-1.0.0 → hyperflash-1.1.0}/src/hyperflash/__init__.py +1 -1
- {hyperflash-1.0.0 → hyperflash-1.1.0}/src/hyperflash/cli.py +60 -3
- {hyperflash-1.0.0 → hyperflash-1.1.0}/src/hyperflash/polyglot.py +161 -14
- {hyperflash-1.0.0 → hyperflash-1.1.0/src/hyperflash.egg-info}/PKG-INFO +91 -42
- hyperflash-1.1.0/tests/test_cli.py +239 -0
- {hyperflash-1.0.0 → hyperflash-1.1.0}/tests/test_core.py +22 -0
- hyperflash-1.0.0/tests/test_cli.py +0 -115
- {hyperflash-1.0.0 → hyperflash-1.1.0}/LICENSE +0 -0
- {hyperflash-1.0.0 → hyperflash-1.1.0}/setup.cfg +0 -0
- {hyperflash-1.0.0 → hyperflash-1.1.0}/src/hyperflash/core.py +0 -0
- {hyperflash-1.0.0 → hyperflash-1.1.0}/src/hyperflash/mcp_server.py +0 -0
- {hyperflash-1.0.0 → hyperflash-1.1.0}/src/hyperflash.egg-info/SOURCES.txt +0 -0
- {hyperflash-1.0.0 → hyperflash-1.1.0}/src/hyperflash.egg-info/dependency_links.txt +0 -0
- {hyperflash-1.0.0 → hyperflash-1.1.0}/src/hyperflash.egg-info/entry_points.txt +0 -0
- {hyperflash-1.0.0 → hyperflash-1.1.0}/src/hyperflash.egg-info/requires.txt +0 -0
- {hyperflash-1.0.0 → hyperflash-1.1.0}/src/hyperflash.egg-info/top_level.txt +0 -0
- {hyperflash-1.0.0 → hyperflash-1.1.0}/tests/test_mcp.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hyperflash
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Universal Engineering Reliability Runtime & Multi-Agent Verification Guardrails
|
|
5
5
|
Author: Virat Ghatge
|
|
6
6
|
License: MIT
|
|
@@ -43,7 +43,7 @@ Dynamic: license-file
|
|
|
43
43
|
|
|
44
44
|
<br/>
|
|
45
45
|
|
|
46
|
-
[](https://pypi.org/project/hyperflash/)
|
|
47
47
|
[](https://github.com/Virat-Ghatge/hyperflash/stargazers)
|
|
48
48
|
[](https://github.com/Virat-Ghatge/hyperflash/network/members)
|
|
49
49
|
[](https://github.com/Virat-Ghatge/hyperflash/issues)
|
|
@@ -177,7 +177,7 @@ pip install hyperflash
|
|
|
177
177
|
Scaffold your preferred IDE or agent harness in 1 second:
|
|
178
178
|
|
|
179
179
|
```bash
|
|
180
|
-
# Configure Cursor, Claude Code, Windsurf, Git Hooks, and
|
|
180
|
+
# Configure Cursor, Claude Code, Windsurf, Git Hooks, Antigravity, and OpenCode in one command
|
|
181
181
|
hyperflash init
|
|
182
182
|
|
|
183
183
|
# Or target your specific harness:
|
|
@@ -186,6 +186,25 @@ hyperflash init --target claude
|
|
|
186
186
|
hyperflash init --target windsurf
|
|
187
187
|
hyperflash init --target git
|
|
188
188
|
hyperflash init --target antigravity
|
|
189
|
+
hyperflash init --target opencode
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### 🚀 Universal Agent Launcher
|
|
193
|
+
Launch your preferred coding environment with the native HyperFlash agent persona pre-activated:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
# Launch OpenCode with native HyperFlash agent
|
|
197
|
+
hyperflash launch opencode
|
|
198
|
+
|
|
199
|
+
# Launch Antigravity terminal session with HyperFlash agent
|
|
200
|
+
hyperflash launch antigravity # or: hyperflash launch agy
|
|
201
|
+
|
|
202
|
+
# Launch Claude Code with HyperFlash rules and /hyperflash command
|
|
203
|
+
hyperflash launch claude
|
|
204
|
+
|
|
205
|
+
# Launch Cursor or Windsurf with HyperFlash agent rules
|
|
206
|
+
hyperflash launch cursor
|
|
207
|
+
hyperflash launch windsurf
|
|
189
208
|
```
|
|
190
209
|
|
|
191
210
|
### 🔌 Universal MCP Server Integration
|
|
@@ -227,6 +246,18 @@ HyperFlash features a built-in Model Context Protocol (MCP) server running over
|
|
|
227
246
|
}
|
|
228
247
|
```
|
|
229
248
|
|
|
249
|
+
#### In OpenCode (`opencode.json`):
|
|
250
|
+
```json
|
|
251
|
+
{
|
|
252
|
+
"mcpServers": {
|
|
253
|
+
"hyperflash": {
|
|
254
|
+
"command": "hyperflash",
|
|
255
|
+
"args": ["mcp"]
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
230
261
|
### Or Clone & Run Local Shell Installer
|
|
231
262
|
If you are developing locally without `pip`:
|
|
232
263
|
|
|
@@ -282,32 +313,59 @@ HyperFlash integrates directly into the Antigravity Desktop IDE and the terminal
|
|
|
282
313
|
|
|
283
314
|
### 2. Claude Code (Anthropic CLI)
|
|
284
315
|
|
|
285
|
-
You can bring HyperFlash's invariants into Claude Code using project memory
|
|
316
|
+
You can bring HyperFlash's invariants into Claude Code using project memory, pre/post tool hooks, and native slash commands.
|
|
286
317
|
|
|
287
|
-
#### Step 1:
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
```
|
|
291
|
-
|
|
318
|
+
#### Step 1: Automatic Setup via CLI
|
|
319
|
+
```bash
|
|
320
|
+
hyperflash init --target claude
|
|
321
|
+
```
|
|
322
|
+
This automatically configures:
|
|
323
|
+
- `CLAUDE.md`: System reliability constitution.
|
|
324
|
+
- `.claude.json`: Local stdio MCP server for safe patching and AST symbol graphs.
|
|
325
|
+
- `.claude/commands/hyperflash.md`: Dedicated agent slash command.
|
|
292
326
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
327
|
+
#### Step 2: Activate HyperFlash in Claude Code
|
|
328
|
+
Inside any Claude Code terminal session, simply run:
|
|
329
|
+
```text
|
|
330
|
+
/hyperflash
|
|
331
|
+
```
|
|
332
|
+
Or launch Claude Code directly with HyperFlash active:
|
|
333
|
+
```bash
|
|
334
|
+
hyperflash launch claude
|
|
298
335
|
```
|
|
299
336
|
|
|
300
|
-
#### Step
|
|
301
|
-
|
|
337
|
+
#### Step 3: Run Deterministic Verification
|
|
338
|
+
Execute HyperFlash's verification hierarchy directly from Claude Code:
|
|
302
339
|
```bash
|
|
303
|
-
|
|
340
|
+
hyperflash verify --tier 6
|
|
304
341
|
```
|
|
305
342
|
|
|
306
343
|
---
|
|
307
344
|
|
|
308
345
|
### 3. OpenCode / OpenHands / SWE-Agent
|
|
309
346
|
|
|
310
|
-
|
|
347
|
+
OpenCode supports dedicated named agents natively. HyperFlash installs as a first-class persona with custom system prompts and tools.
|
|
348
|
+
|
|
349
|
+
#### Step 1: Automatic Setup via CLI
|
|
350
|
+
```bash
|
|
351
|
+
hyperflash init --target opencode
|
|
352
|
+
```
|
|
353
|
+
This configures:
|
|
354
|
+
- `OPENCODE.md`: OpenCode engineering constitution.
|
|
355
|
+
- `.opencode/agents/hyperflash.json`: Dedicated agent persona definition.
|
|
356
|
+
- `opencode.json`: Declares `agent: "hyperflash"`, registers agent configuration, and wires the `hyperflash` stdio MCP server.
|
|
357
|
+
|
|
358
|
+
#### Step 2: Launch OpenCode with HyperFlash Persona
|
|
359
|
+
```bash
|
|
360
|
+
# Direct OpenCode CLI
|
|
361
|
+
opencode --agent hyperflash
|
|
362
|
+
|
|
363
|
+
# Or via the universal runner
|
|
364
|
+
hyperflash launch opencode
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
#### Step 3: Custom Agent Harnesses (Python / Containers)
|
|
368
|
+
HyperFlash guardrails can also be evaluated programmatically inside any agent container:
|
|
311
369
|
|
|
312
370
|
```python
|
|
313
371
|
# In your custom agent loop or OpenHands execution environment
|
|
@@ -331,34 +389,25 @@ def run_hyperflash_guards(tool_call: dict) -> bool:
|
|
|
331
389
|
|
|
332
390
|
### 4. Cursor & Windsurf IDEs
|
|
333
391
|
|
|
334
|
-
|
|
392
|
+
HyperFlash delivers always-on rule enforcement and tool capabilities for modern AI-native IDEs.
|
|
393
|
+
|
|
394
|
+
#### Step 1: Automatic Setup via CLI
|
|
335
395
|
```bash
|
|
336
|
-
hyperflash init --target cursor # Configures .cursorrules
|
|
337
|
-
hyperflash init --target windsurf # Configures .windsurfrules
|
|
396
|
+
hyperflash init --target cursor # Configures .cursorrules, .cursor/rules/hyperflash.mdc, .cursor/mcp.json
|
|
397
|
+
hyperflash init --target windsurf # Configures .windsurfrules, .windsurf/rules/hyperflash.md, .windsurf/mcp.json
|
|
338
398
|
```
|
|
339
399
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
- Always view the entire target file before proposing edits.
|
|
345
|
-
- Never truncate code with comments like `// existing code remains the same`. Write the entire functional block.
|
|
346
|
-
- Always include exhaustive static type annotations on all parameters and return values.
|
|
347
|
-
- Before claiming a task is done, run terminal commands to verify compilation and tests.
|
|
348
|
-
- Emit a `decision:` and `pre_mortem:` YAML block before multi-file edits.
|
|
349
|
-
```
|
|
350
|
-
- **MCP Server (`.cursor/mcp.json` or `.windsurf/mcp.json`):**
|
|
351
|
-
```json
|
|
352
|
-
{
|
|
353
|
-
"mcpServers": {
|
|
354
|
-
"hyperflash": {
|
|
355
|
-
"command": "hyperflash",
|
|
356
|
-
"args": ["mcp"]
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
}
|
|
400
|
+
#### Step 2: Launch IDE with HyperFlash
|
|
401
|
+
```bash
|
|
402
|
+
hyperflash launch cursor
|
|
403
|
+
hyperflash launch windsurf
|
|
360
404
|
```
|
|
361
405
|
|
|
406
|
+
#### What Gets Configured:
|
|
407
|
+
- **Cursor Rules MDC (`.cursor/rules/hyperflash.mdc`):** Enforces `alwaysApply: true` so Cursor Composer and Agent mode strictly observe the 8 Invariants across all edits.
|
|
408
|
+
- **Windsurf Rules (`.windsurf/rules/hyperflash.md` & `.windsurfrules`):** Guides Cascade Agent with zero-elision and ground-before-mutating constraints.
|
|
409
|
+
- **MCP Integration (`mcp.json`):** Exposes `hyperflash_safe_patch`, `hyperflash_verify`, and `hyperflash_get_symbol_graph` directly to the IDE agent.
|
|
410
|
+
|
|
362
411
|
---
|
|
363
412
|
|
|
364
413
|
### 5. Git Pre-Commit & CI/CD Quality Gates
|
|
@@ -374,7 +423,7 @@ hyperflash init --target git
|
|
|
374
423
|
```yaml
|
|
375
424
|
repos:
|
|
376
425
|
- repo: https://github.com/Virat-Ghatge/hyperflash
|
|
377
|
-
rev: v1.
|
|
426
|
+
rev: v1.1.0
|
|
378
427
|
hooks:
|
|
379
428
|
- id: hyperflash-zero-elision
|
|
380
429
|
- id: hyperflash-verify
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
<br/>
|
|
20
20
|
|
|
21
|
-
[](https://pypi.org/project/hyperflash/)
|
|
22
22
|
[](https://github.com/Virat-Ghatge/hyperflash/stargazers)
|
|
23
23
|
[](https://github.com/Virat-Ghatge/hyperflash/network/members)
|
|
24
24
|
[](https://github.com/Virat-Ghatge/hyperflash/issues)
|
|
@@ -152,7 +152,7 @@ pip install hyperflash
|
|
|
152
152
|
Scaffold your preferred IDE or agent harness in 1 second:
|
|
153
153
|
|
|
154
154
|
```bash
|
|
155
|
-
# Configure Cursor, Claude Code, Windsurf, Git Hooks, and
|
|
155
|
+
# Configure Cursor, Claude Code, Windsurf, Git Hooks, Antigravity, and OpenCode in one command
|
|
156
156
|
hyperflash init
|
|
157
157
|
|
|
158
158
|
# Or target your specific harness:
|
|
@@ -161,6 +161,25 @@ hyperflash init --target claude
|
|
|
161
161
|
hyperflash init --target windsurf
|
|
162
162
|
hyperflash init --target git
|
|
163
163
|
hyperflash init --target antigravity
|
|
164
|
+
hyperflash init --target opencode
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### 🚀 Universal Agent Launcher
|
|
168
|
+
Launch your preferred coding environment with the native HyperFlash agent persona pre-activated:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
# Launch OpenCode with native HyperFlash agent
|
|
172
|
+
hyperflash launch opencode
|
|
173
|
+
|
|
174
|
+
# Launch Antigravity terminal session with HyperFlash agent
|
|
175
|
+
hyperflash launch antigravity # or: hyperflash launch agy
|
|
176
|
+
|
|
177
|
+
# Launch Claude Code with HyperFlash rules and /hyperflash command
|
|
178
|
+
hyperflash launch claude
|
|
179
|
+
|
|
180
|
+
# Launch Cursor or Windsurf with HyperFlash agent rules
|
|
181
|
+
hyperflash launch cursor
|
|
182
|
+
hyperflash launch windsurf
|
|
164
183
|
```
|
|
165
184
|
|
|
166
185
|
### 🔌 Universal MCP Server Integration
|
|
@@ -202,6 +221,18 @@ HyperFlash features a built-in Model Context Protocol (MCP) server running over
|
|
|
202
221
|
}
|
|
203
222
|
```
|
|
204
223
|
|
|
224
|
+
#### In OpenCode (`opencode.json`):
|
|
225
|
+
```json
|
|
226
|
+
{
|
|
227
|
+
"mcpServers": {
|
|
228
|
+
"hyperflash": {
|
|
229
|
+
"command": "hyperflash",
|
|
230
|
+
"args": ["mcp"]
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
```
|
|
235
|
+
|
|
205
236
|
### Or Clone & Run Local Shell Installer
|
|
206
237
|
If you are developing locally without `pip`:
|
|
207
238
|
|
|
@@ -257,32 +288,59 @@ HyperFlash integrates directly into the Antigravity Desktop IDE and the terminal
|
|
|
257
288
|
|
|
258
289
|
### 2. Claude Code (Anthropic CLI)
|
|
259
290
|
|
|
260
|
-
You can bring HyperFlash's invariants into Claude Code using project memory
|
|
291
|
+
You can bring HyperFlash's invariants into Claude Code using project memory, pre/post tool hooks, and native slash commands.
|
|
261
292
|
|
|
262
|
-
#### Step 1:
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
```
|
|
266
|
-
|
|
293
|
+
#### Step 1: Automatic Setup via CLI
|
|
294
|
+
```bash
|
|
295
|
+
hyperflash init --target claude
|
|
296
|
+
```
|
|
297
|
+
This automatically configures:
|
|
298
|
+
- `CLAUDE.md`: System reliability constitution.
|
|
299
|
+
- `.claude.json`: Local stdio MCP server for safe patching and AST symbol graphs.
|
|
300
|
+
- `.claude/commands/hyperflash.md`: Dedicated agent slash command.
|
|
267
301
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
302
|
+
#### Step 2: Activate HyperFlash in Claude Code
|
|
303
|
+
Inside any Claude Code terminal session, simply run:
|
|
304
|
+
```text
|
|
305
|
+
/hyperflash
|
|
306
|
+
```
|
|
307
|
+
Or launch Claude Code directly with HyperFlash active:
|
|
308
|
+
```bash
|
|
309
|
+
hyperflash launch claude
|
|
273
310
|
```
|
|
274
311
|
|
|
275
|
-
#### Step
|
|
276
|
-
|
|
312
|
+
#### Step 3: Run Deterministic Verification
|
|
313
|
+
Execute HyperFlash's verification hierarchy directly from Claude Code:
|
|
277
314
|
```bash
|
|
278
|
-
|
|
315
|
+
hyperflash verify --tier 6
|
|
279
316
|
```
|
|
280
317
|
|
|
281
318
|
---
|
|
282
319
|
|
|
283
320
|
### 3. OpenCode / OpenHands / SWE-Agent
|
|
284
321
|
|
|
285
|
-
|
|
322
|
+
OpenCode supports dedicated named agents natively. HyperFlash installs as a first-class persona with custom system prompts and tools.
|
|
323
|
+
|
|
324
|
+
#### Step 1: Automatic Setup via CLI
|
|
325
|
+
```bash
|
|
326
|
+
hyperflash init --target opencode
|
|
327
|
+
```
|
|
328
|
+
This configures:
|
|
329
|
+
- `OPENCODE.md`: OpenCode engineering constitution.
|
|
330
|
+
- `.opencode/agents/hyperflash.json`: Dedicated agent persona definition.
|
|
331
|
+
- `opencode.json`: Declares `agent: "hyperflash"`, registers agent configuration, and wires the `hyperflash` stdio MCP server.
|
|
332
|
+
|
|
333
|
+
#### Step 2: Launch OpenCode with HyperFlash Persona
|
|
334
|
+
```bash
|
|
335
|
+
# Direct OpenCode CLI
|
|
336
|
+
opencode --agent hyperflash
|
|
337
|
+
|
|
338
|
+
# Or via the universal runner
|
|
339
|
+
hyperflash launch opencode
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
#### Step 3: Custom Agent Harnesses (Python / Containers)
|
|
343
|
+
HyperFlash guardrails can also be evaluated programmatically inside any agent container:
|
|
286
344
|
|
|
287
345
|
```python
|
|
288
346
|
# In your custom agent loop or OpenHands execution environment
|
|
@@ -306,34 +364,25 @@ def run_hyperflash_guards(tool_call: dict) -> bool:
|
|
|
306
364
|
|
|
307
365
|
### 4. Cursor & Windsurf IDEs
|
|
308
366
|
|
|
309
|
-
|
|
367
|
+
HyperFlash delivers always-on rule enforcement and tool capabilities for modern AI-native IDEs.
|
|
368
|
+
|
|
369
|
+
#### Step 1: Automatic Setup via CLI
|
|
310
370
|
```bash
|
|
311
|
-
hyperflash init --target cursor # Configures .cursorrules
|
|
312
|
-
hyperflash init --target windsurf # Configures .windsurfrules
|
|
371
|
+
hyperflash init --target cursor # Configures .cursorrules, .cursor/rules/hyperflash.mdc, .cursor/mcp.json
|
|
372
|
+
hyperflash init --target windsurf # Configures .windsurfrules, .windsurf/rules/hyperflash.md, .windsurf/mcp.json
|
|
313
373
|
```
|
|
314
374
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
- Always view the entire target file before proposing edits.
|
|
320
|
-
- Never truncate code with comments like `// existing code remains the same`. Write the entire functional block.
|
|
321
|
-
- Always include exhaustive static type annotations on all parameters and return values.
|
|
322
|
-
- Before claiming a task is done, run terminal commands to verify compilation and tests.
|
|
323
|
-
- Emit a `decision:` and `pre_mortem:` YAML block before multi-file edits.
|
|
324
|
-
```
|
|
325
|
-
- **MCP Server (`.cursor/mcp.json` or `.windsurf/mcp.json`):**
|
|
326
|
-
```json
|
|
327
|
-
{
|
|
328
|
-
"mcpServers": {
|
|
329
|
-
"hyperflash": {
|
|
330
|
-
"command": "hyperflash",
|
|
331
|
-
"args": ["mcp"]
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
}
|
|
375
|
+
#### Step 2: Launch IDE with HyperFlash
|
|
376
|
+
```bash
|
|
377
|
+
hyperflash launch cursor
|
|
378
|
+
hyperflash launch windsurf
|
|
335
379
|
```
|
|
336
380
|
|
|
381
|
+
#### What Gets Configured:
|
|
382
|
+
- **Cursor Rules MDC (`.cursor/rules/hyperflash.mdc`):** Enforces `alwaysApply: true` so Cursor Composer and Agent mode strictly observe the 8 Invariants across all edits.
|
|
383
|
+
- **Windsurf Rules (`.windsurf/rules/hyperflash.md` & `.windsurfrules`):** Guides Cascade Agent with zero-elision and ground-before-mutating constraints.
|
|
384
|
+
- **MCP Integration (`mcp.json`):** Exposes `hyperflash_safe_patch`, `hyperflash_verify`, and `hyperflash_get_symbol_graph` directly to the IDE agent.
|
|
385
|
+
|
|
337
386
|
---
|
|
338
387
|
|
|
339
388
|
### 5. Git Pre-Commit & CI/CD Quality Gates
|
|
@@ -349,7 +398,7 @@ hyperflash init --target git
|
|
|
349
398
|
```yaml
|
|
350
399
|
repos:
|
|
351
400
|
- repo: https://github.com/Virat-Ghatge/hyperflash
|
|
352
|
-
rev: v1.
|
|
401
|
+
rev: v1.1.0
|
|
353
402
|
hooks:
|
|
354
403
|
- id: hyperflash-zero-elision
|
|
355
404
|
- id: hyperflash-verify
|
|
@@ -6,6 +6,8 @@ from __future__ import annotations
|
|
|
6
6
|
|
|
7
7
|
import argparse
|
|
8
8
|
import json
|
|
9
|
+
import shutil
|
|
10
|
+
import subprocess
|
|
9
11
|
import sys
|
|
10
12
|
from pathlib import Path
|
|
11
13
|
from typing import Any, Sequence
|
|
@@ -24,6 +26,7 @@ from hyperflash.polyglot import (
|
|
|
24
26
|
setup_claude,
|
|
25
27
|
setup_cursor,
|
|
26
28
|
setup_git_hooks,
|
|
29
|
+
setup_opencode,
|
|
27
30
|
setup_windsurf,
|
|
28
31
|
)
|
|
29
32
|
|
|
@@ -61,8 +64,12 @@ def cmd_init(args: argparse.Namespace) -> int:
|
|
|
61
64
|
files = setup_antigravity(workspace)
|
|
62
65
|
for f in files:
|
|
63
66
|
print(f" • Configured Antigravity: {f}")
|
|
67
|
+
elif target == "opencode":
|
|
68
|
+
files = setup_opencode(workspace)
|
|
69
|
+
for f in files:
|
|
70
|
+
print(f" • Configured OpenCode: {f}")
|
|
64
71
|
else:
|
|
65
|
-
print(f"❌ Unknown target '{target}'. Choose from all, cursor, claude, windsurf, git, antigravity.")
|
|
72
|
+
print(f"❌ Unknown target '{target}'. Choose from all, cursor, claude, windsurf, git, antigravity, opencode.")
|
|
66
73
|
return 1
|
|
67
74
|
|
|
68
75
|
print("✅ HyperFlash initialization complete. Guardrails are active.")
|
|
@@ -164,6 +171,42 @@ def cmd_check_elision(args: argparse.Namespace) -> int:
|
|
|
164
171
|
return 0
|
|
165
172
|
|
|
166
173
|
|
|
174
|
+
def cmd_launch(args: argparse.Namespace) -> int:
|
|
175
|
+
"""Handles 'hyperflash launch' command."""
|
|
176
|
+
harness: str = args.harness.lower()
|
|
177
|
+
extra_args: list[str] = list(getattr(args, "extra_args", []) or [])
|
|
178
|
+
|
|
179
|
+
cmd_map: dict[str, list[str]] = {
|
|
180
|
+
"opencode": ["opencode", "--agent", "hyperflash"],
|
|
181
|
+
"antigravity": ["agy", "--agent", "hyperflash"],
|
|
182
|
+
"agy": ["agy", "--agent", "hyperflash"],
|
|
183
|
+
"claude": ["claude"],
|
|
184
|
+
"cursor": ["cursor", "."],
|
|
185
|
+
"windsurf": ["windsurf", "."],
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
base_cmd = cmd_map.get(harness)
|
|
189
|
+
if not base_cmd:
|
|
190
|
+
print(f"❌ Unknown harness '{harness}'. Choose from opencode, claude, cursor, windsurf, antigravity, agy.")
|
|
191
|
+
return 1
|
|
192
|
+
|
|
193
|
+
binary_name = base_cmd[0]
|
|
194
|
+
if not shutil.which(binary_name):
|
|
195
|
+
print(f"❌ Harness '{harness}' not found in PATH. Please install it first.")
|
|
196
|
+
return 1
|
|
197
|
+
|
|
198
|
+
full_cmd: list[str] = base_cmd + extra_args
|
|
199
|
+
try:
|
|
200
|
+
proc = subprocess.run(full_cmd)
|
|
201
|
+
return proc.returncode
|
|
202
|
+
except FileNotFoundError:
|
|
203
|
+
print(f"❌ Harness '{harness}' not found in PATH. Please install it first.")
|
|
204
|
+
return 1
|
|
205
|
+
except Exception as exc:
|
|
206
|
+
print(f"❌ Error launching '{harness}': {exc}")
|
|
207
|
+
return 1
|
|
208
|
+
|
|
209
|
+
|
|
167
210
|
def build_parser() -> argparse.ArgumentParser:
|
|
168
211
|
"""Constructs the CLI argument parser."""
|
|
169
212
|
parser = argparse.ArgumentParser(
|
|
@@ -180,10 +223,10 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
180
223
|
subparsers = parser.add_subparsers(dest="command", help="Available subcommands")
|
|
181
224
|
|
|
182
225
|
# init
|
|
183
|
-
p_init = subparsers.add_parser("init", help="1-Click setup for Cursor, Claude Code, Windsurf, Git hooks, Antigravity")
|
|
226
|
+
p_init = subparsers.add_parser("init", help="1-Click setup for Cursor, Claude Code, Windsurf, Git hooks, Antigravity, OpenCode")
|
|
184
227
|
p_init.add_argument(
|
|
185
228
|
"--target",
|
|
186
|
-
choices=["all", "cursor", "claude", "windsurf", "git", "antigravity"],
|
|
229
|
+
choices=["all", "cursor", "claude", "windsurf", "git", "antigravity", "opencode"],
|
|
187
230
|
default="all",
|
|
188
231
|
help="Target platform to configure (default: all)",
|
|
189
232
|
)
|
|
@@ -194,6 +237,19 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
194
237
|
help="Workspace root directory (default: .)",
|
|
195
238
|
)
|
|
196
239
|
|
|
240
|
+
# launch
|
|
241
|
+
p_launch = subparsers.add_parser("launch", help="Launch your preferred coding harness with HyperFlash agent active")
|
|
242
|
+
p_launch.add_argument(
|
|
243
|
+
"harness",
|
|
244
|
+
choices=["opencode", "claude", "cursor", "windsurf", "antigravity", "agy"],
|
|
245
|
+
help="Target harness",
|
|
246
|
+
)
|
|
247
|
+
p_launch.add_argument(
|
|
248
|
+
"extra_args",
|
|
249
|
+
nargs=argparse.REMAINDER,
|
|
250
|
+
help="Additional arguments forwarded to harness",
|
|
251
|
+
)
|
|
252
|
+
|
|
197
253
|
# mcp
|
|
198
254
|
p_mcp = subparsers.add_parser("mcp", help="Launch stdio MCP server for universal tool integration")
|
|
199
255
|
p_mcp.add_argument(
|
|
@@ -288,6 +344,7 @@ def main(argv: Sequence[str] | None = None) -> None:
|
|
|
288
344
|
"decide": cmd_decide,
|
|
289
345
|
"status": cmd_status,
|
|
290
346
|
"check-elision": cmd_check_elision,
|
|
347
|
+
"launch": cmd_launch,
|
|
291
348
|
}
|
|
292
349
|
|
|
293
350
|
handler = dispatch.get(args.command)
|