@cybedefend/vibedefend 1.7.0 → 1.8.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 +19 -12
- package/dist/clients/antigravity.js +327 -0
- package/dist/clients/antigravity.js.map +1 -0
- package/dist/clients/registry.js +2 -0
- package/dist/clients/registry.js.map +1 -1
- package/dist/hook-runner.js +902 -227
- package/dist/hooks/install.js +1 -1
- package/dist/hooks/install.js.map +1 -1
- package/dist/hooks/runtime/antigravity-session.js +400 -0
- package/dist/hooks/runtime/antigravity-session.js.map +1 -0
- package/dist/hooks/runtime/emit.js +206 -0
- package/dist/hooks/runtime/emit.js.map +1 -1
- package/dist/hooks/runtime/exit-deadlock-guard.js +46 -0
- package/dist/hooks/runtime/exit-deadlock-guard.js.map +1 -0
- package/dist/hooks/runtime/fetch-rules.js +39 -3
- package/dist/hooks/runtime/fetch-rules.js.map +1 -1
- package/dist/hooks/runtime/pre-invocation.js +45 -0
- package/dist/hooks/runtime/pre-invocation.js.map +1 -0
- package/dist/hooks/runtime/runner-args.js +12 -0
- package/dist/hooks/runtime/runner-args.js.map +1 -0
- package/dist/hooks/runtime/session-activation.js +10 -4
- package/dist/hooks/runtime/session-activation.js.map +1 -1
- package/dist/hooks/runtime/session-review.js +42 -0
- package/dist/hooks/runtime/session-review.js.map +1 -1
- package/dist/hooks/runtime/session-start.js +21 -1
- package/dist/hooks/runtime/session-start.js.map +1 -1
- package/dist/hooks/runtime/sniff.js +325 -70
- package/dist/hooks/runtime/sniff.js.map +1 -1
- package/dist/hooks/runtime/work-dir.js +3 -0
- package/dist/hooks/runtime/work-dir.js.map +1 -1
- package/dist/hooks/shim.js +102 -5
- package/dist/hooks/shim.js.map +1 -1
- package/dist/json-file.js +6 -3
- package/dist/json-file.js.map +1 -1
- package/dist/shim.js +53 -3
- package/dist/utils.js +9 -0
- package/dist/utils.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -59,16 +59,16 @@ npm install -g @cybedefend/vibedefend && vibedefend install
|
|
|
59
59
|
|
|
60
60
|
VibeDefend auto-detects and wires whichever of these you have installed.
|
|
61
61
|
|
|
62
|
-
| Capability | Claude Code | Cursor | OpenAI Codex | Windsurf | VS Code Copilot |
|
|
63
|
-
|
|
64
|
-
| **MCP server install** | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
65
|
-
| **Business + Security Rules** *(injected pre-write)* | ✅ edit + shell⁴ | ✅ | ✅ edit + shell⁴ | ⚠️ writes only | ✅ |
|
|
66
|
-
| **Action Guards** *(hard block on deny)* | ✅ all tools | ✅ all tools | ✅ all tools | ⚠️ writes + MCP fallback¹ | ❌ not yet wired |
|
|
67
|
-
| **Session Start** *(loads doctrine + proposals inbox)* | ✅ | ✅ | ✅ | ⚠️ proxied² | ✅ |
|
|
68
|
-
| **Session Review** *(end-of-session gap analysis + pre-commit diff scan)* | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
69
|
-
| **PreCompact** *(long-session gap analysis)* | ✅ | ✅ | ❌ no event | ❌ no event | ✅ |
|
|
70
|
-
| **Doctrine backstop** *(per-prompt reminder)* | ✅ | ❌ | ✱ via MCP³ | ❌ | ❌ |
|
|
71
|
-
| **Min version** | latest | ≥ 1.7 | latest | latest | ≥ 1.110 |
|
|
62
|
+
| Capability | Claude Code | Cursor | OpenAI Codex | Windsurf | VS Code Copilot | Google Antigravity |
|
|
63
|
+
|---|:---:|:---:|:---:|:---:|:---:|:---:|
|
|
64
|
+
| **MCP server install** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
65
|
+
| **Business + Security Rules** *(injected pre-write)* | ✅ edit + shell⁴ | ✅ | ✅ edit + shell⁴ | ⚠️ writes only | ✅ | ⚠️ edit + shell⁴, after the edit⁵ |
|
|
66
|
+
| **Action Guards** *(hard block on deny)* | ✅ all tools | ✅ all tools | ✅ all tools | ⚠️ writes + MCP fallback¹ | ❌ not yet wired | ✅ all tools⁶ |
|
|
67
|
+
| **Session Start** *(loads doctrine + proposals inbox)* | ✅ | ✅ | ✅ | ⚠️ proxied² | ✅ | ✅ |
|
|
68
|
+
| **Session Review** *(end-of-session gap analysis + pre-commit diff scan)* | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
69
|
+
| **PreCompact** *(long-session gap analysis)* | ✅ | ✅ | ❌ no event | ❌ no event | ✅ | ❌ no event |
|
|
70
|
+
| **Doctrine backstop** *(per-prompt reminder)* | ✅ | ❌ | ✱ via MCP³ | ❌ | ❌ | ❌ |
|
|
71
|
+
| **Min version** | latest | ≥ 1.7 | latest | latest | ≥ 1.110 | ≥ 2.0 (app / IDE) |
|
|
72
72
|
|
|
73
73
|
**Legend** — ✅ supported · ⚠️ supported with caveats · ❌ not exposed by the agent · ✱ alternate mechanism
|
|
74
74
|
|
|
@@ -78,7 +78,11 @@ VibeDefend auto-detects and wires whichever of these you have installed.
|
|
|
78
78
|
|
|
79
79
|
³ Codex follows the doctrine via the MCP server's `Server.instructions` field on each session, removing the need for a per-prompt reminder hook.
|
|
80
80
|
|
|
81
|
-
⁴ On Claude Code and
|
|
81
|
+
⁴ On Claude Code, Codex and Antigravity (its `run_command` tool) the rules hook also fires on shell commands that write files (`>` / `>>` redirections, heredocs, `tee`, `sed -i`, `perl -pi`, `cp` / `mv`, `dd of=`, `bash -c '…'`), so an agent that edits through the shell gets the same rules as one using the edit tool. Read-only commands fetch nothing. Inline interpreters (`python -c`, `node -e`) and `git apply` / `patch` are not inspected. Cursor, Windsurf and VS Code Copilot: edit tools only.
|
|
82
|
+
|
|
83
|
+
⁵ Antigravity has no channel to inject context into the model from its PreToolUse hook, so rules fetched before a write are held and delivered at the agent's next model call (its PreInvocation event) instead — one step later than on every other client, but before the agent acts on what it just read.
|
|
84
|
+
|
|
85
|
+
⁶ `agy --dangerously-skip-permissions` runs no hook at all, on any event. On Windows, a home path with a space in it is not supported — Antigravity has no way to quote the hook command it runs, so the installer detects this and refuses to wire a dead command rather than silently blocking every tool call. Antigravity's MCP servers are **not** wrapped by the VibeDefend MCP proxy (like Codex today): the CybeDefend server is registered directly against the region's URL.
|
|
82
86
|
|
|
83
87
|
**Codex setup gotcha:** Codex 0.131+ requires you to approve each hook via the `/hooks` panel inside Codex *before* they fire. After running `vibedefend install`, open Codex, run `/hooks`, and trust the `cybedefend` entries — until you do that the panel will show `Installed N / Active 0`.
|
|
84
88
|
|
|
@@ -276,7 +280,10 @@ deletes `~/.cybedefend/`, keeping only your own `~/.cybedefend/regions.json`.
|
|
|
276
280
|
Repositories keep their committed `.cybedefend/config.json`. A Windsurf
|
|
277
281
|
`.windsurfrules` block is removed from the current directory only: in any other
|
|
278
282
|
repo you wired for Windsurf, delete it by hand. Codex's `[features] hooks = true`
|
|
279
|
-
flag stays set, since other hooks may rely on it.
|
|
283
|
+
flag stays set, since other hooks may rely on it. Antigravity's `hooks.json` and
|
|
284
|
+
`mcp_config.json` are user-global (shared by the app, the IDE extension and
|
|
285
|
+
`agy`, never per-project), so uninstall drops our `cybedefend-*` groups and MCP
|
|
286
|
+
server from there once, for every project — there is no per-repo cleanup to do.
|
|
280
287
|
|
|
281
288
|
## Sibling: `cybedefend-cli`
|
|
282
289
|
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Antigravity adapter.
|
|
3
|
+
*
|
|
4
|
+
* Antigravity shares one hooks file between the app, the IDE extension and
|
|
5
|
+
* `agy` — global, never per-project: `~/.gemini/config/hooks.json` (Windows:
|
|
6
|
+
* `%USERPROFILE%\.gemini\config\hooks.json`). Its top-level keys are hook
|
|
7
|
+
* GROUP names, not event names (contrast Cursor/Codex/Windsurf, which key by
|
|
8
|
+
* event). Each group nests its handlers under the events it fires on:
|
|
9
|
+
*
|
|
10
|
+
* PreToolUse (and other tool events):
|
|
11
|
+
* { "<group>": { "PreToolUse": [{ "matcher": "<regex>", "hooks": [
|
|
12
|
+
* { "type": "command", "command": "…", "timeout": 30 } ] }] } }
|
|
13
|
+
* Every other event (SessionStart, PreInvocation, Stop, …) lists the
|
|
14
|
+
* handler directly, with no matcher/hooks nesting:
|
|
15
|
+
* { "<group>": { "SessionStart": [
|
|
16
|
+
* { "type": "command", "command": "…", "timeout": 30 } ] } }
|
|
17
|
+
* A group may also carry a sibling `"enabled"` boolean, which the user can
|
|
18
|
+
* flip in the Antigravity UI; `writeSettings` preserves it across a
|
|
19
|
+
* reinstall (see `writeSettings` below).
|
|
20
|
+
*
|
|
21
|
+
* We write 5 groups, one per moment, all prefixed `cybedefend-`:
|
|
22
|
+
* - cybedefend-session-start SessionStart → session-start
|
|
23
|
+
* - cybedefend-rules PreToolUse → fetch-rules (matcher "*", self-filtered)
|
|
24
|
+
* - cybedefend-rules-delivery PreInvocation → pre-invocation (injects stashed rules)
|
|
25
|
+
* - cybedefend-guards PreToolUse → guard-check (matcher "*", every tool)
|
|
26
|
+
* - cybedefend-session-review Stop → session-review (only when enabled)
|
|
27
|
+
*
|
|
28
|
+
* A top-level key is OURS when its name starts with `cybedefend-` AND its
|
|
29
|
+
* JSON references our managed hook dir (`textReferencesHookRunner`). That
|
|
30
|
+
* is a stronger bar than the prefix alone — a user's own `cybedefend-mine`
|
|
31
|
+
* group, wired to a command of their own, is never touched. `writeSettings`
|
|
32
|
+
* drops our groups wholesale and rewrites them fresh (so a re-install can
|
|
33
|
+
* never duplicate a handler inside a group — there's nothing to dedupe,
|
|
34
|
+
* each key is written exactly once, and an old group of ours under a
|
|
35
|
+
* command shape a previous version wrote is replaced, never kept alongside
|
|
36
|
+
* the new one), and `uninstall` only drops them.
|
|
37
|
+
*
|
|
38
|
+
* Hook commands: Antigravity runs a POSIX hook through `sh -c "<command>"`
|
|
39
|
+
* and a Windows one through `cmd /C "<command>"` — never execve directly —
|
|
40
|
+
* so:
|
|
41
|
+
* - POSIX: `node <runner> <sub> --client antigravity || echo '<fallback>'`.
|
|
42
|
+
* A missing `node`/runner (or any runner crash) then answers the same
|
|
43
|
+
* fallback a healthy run would print on its own early-exit path, instead
|
|
44
|
+
* of blocking every tool call fail-closed forever.
|
|
45
|
+
* - Windows: `node <runner> <sub> --client antigravity`, no quoting and no
|
|
46
|
+
* `|| echo '<fallback>'`. `agy` escapes embedded quotes, and the
|
|
47
|
+
* fallback JSON (`{"decision":"allow"}`) is itself quote-bearing, so
|
|
48
|
+
* there is no way to nest it inside the already-quoted `cmd /C "…"`
|
|
49
|
+
* invocation without `agy` mangling it on the way in. The runner path
|
|
50
|
+
* can't be quoted either, so a path containing whitespace can't be
|
|
51
|
+
* spawned at all — `detect()`, AND `writeSettings()` itself (belt and
|
|
52
|
+
* suspenders: a manually-ticked client that `detect()` never got to
|
|
53
|
+
* veto, or `vibedefend doctor` re-wiring from `detect().installed`
|
|
54
|
+
* alone), both check this (`antigravityWindowsBlock`) and refuse to
|
|
55
|
+
* wire a command that would never run.
|
|
56
|
+
*
|
|
57
|
+
* The fallback is `{"decision":"allow"}` for the two PreToolUse subcommands
|
|
58
|
+
* (fetch-rules, guard-check) — a dead runner must fail OPEN there, exactly
|
|
59
|
+
* like every other client's hook does when it can't execute — and `{}` for
|
|
60
|
+
* every other subcommand, which Antigravity expects verbatim on success.
|
|
61
|
+
*/
|
|
62
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
63
|
+
import { readJson, writeJson } from '../json-file.js';
|
|
64
|
+
import { home, log, stripBom } from '../utils.js';
|
|
65
|
+
import { HOOK_RUNNER_PATH, toPosixPath, quoteCommandPath, textReferencesHookRunner } from '../hooks/install.js';
|
|
66
|
+
import { PRE_TOOL_USE_SUBCOMMANDS } from '../hooks/runtime/emit.js';
|
|
67
|
+
import { mcpStatus, readJsonServerEntry } from './mcp-url.js';
|
|
68
|
+
import { deleteKeys, editJsonFile } from './unwire.js';
|
|
69
|
+
import { configDirExists, probeBinaryVersion } from './detect.js';
|
|
70
|
+
const ANTIGRAVITY_HOOKS = home('.gemini', 'config', 'hooks.json');
|
|
71
|
+
const ANTIGRAVITY_MCP = home('.gemini', 'config', 'mcp_config.json');
|
|
72
|
+
/**
|
|
73
|
+
* The `command` field of an Antigravity hook handler, targeting `sub` on
|
|
74
|
+
* `--client antigravity`. `--client` and `antigravity` are two separate
|
|
75
|
+
* argv tokens — the runner's arg parser skips anything before the
|
|
76
|
+
* subcommand and ignores a combined `--client=antigravity`.
|
|
77
|
+
*/
|
|
78
|
+
export function antigravityHookCommand(sub, opts = {}) {
|
|
79
|
+
const platform = opts.platform ?? process.platform;
|
|
80
|
+
// Forward-slash first (Windows-shell safe), as `hookCommand` does.
|
|
81
|
+
const runnerPath = toPosixPath(opts.runnerPath ?? HOOK_RUNNER_PATH);
|
|
82
|
+
if (platform === 'win32') {
|
|
83
|
+
// No quoting (a quoted path can't be spawned) and no `|| echo` fallback:
|
|
84
|
+
// the fallback JSON is quote-bearing and `agy` escapes embedded quotes,
|
|
85
|
+
// so nesting it inside the already-quoted `cmd /C "…"` invocation would
|
|
86
|
+
// be mangled rather than run.
|
|
87
|
+
return `node ${runnerPath} ${sub} --client antigravity`;
|
|
88
|
+
}
|
|
89
|
+
const fallback = PRE_TOOL_USE_SUBCOMMANDS.has(sub) ? '{"decision":"allow"}' : '{}';
|
|
90
|
+
return `node ${quoteCommandPath(runnerPath)} ${sub} --client antigravity || echo '${fallback}'`;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* `null` unless Antigravity on Windows cannot spawn `runnerPath` at all — a
|
|
94
|
+
* whitespace path with no safe quoting mechanism available. Used by both
|
|
95
|
+
* `detect()` and `writeSettings()` (to report/refuse instead of wiring a
|
|
96
|
+
* dead command) and by tests.
|
|
97
|
+
*/
|
|
98
|
+
export function antigravityWindowsBlock(platform, runnerPath) {
|
|
99
|
+
if (platform !== 'win32')
|
|
100
|
+
return null;
|
|
101
|
+
if (!/\s/.test(runnerPath))
|
|
102
|
+
return null;
|
|
103
|
+
return `Antigravity on Windows cannot run a hook whose path contains a space: ${runnerPath}`;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The 5 (or 4, with session review off) `cybedefend-*` hook groups, keyed by
|
|
107
|
+
* group name — ready to be merged as whole top-level keys into `hooks.json`.
|
|
108
|
+
*/
|
|
109
|
+
export function buildAntigravityHookGroups(opts) {
|
|
110
|
+
const cmd = (sub) => antigravityHookCommand(sub, { platform: opts.platform, runnerPath: opts.runnerPath });
|
|
111
|
+
const groups = {
|
|
112
|
+
'cybedefend-session-start': {
|
|
113
|
+
SessionStart: [{ type: 'command', command: cmd('session-start'), timeout: 30 }],
|
|
114
|
+
},
|
|
115
|
+
'cybedefend-rules': {
|
|
116
|
+
PreToolUse: [
|
|
117
|
+
{
|
|
118
|
+
// Every tool (Ruling R14): Antigravity's tool names change with the
|
|
119
|
+
// model (`write_to_file` or `write_file`, `replace_file_content` or
|
|
120
|
+
// `edit_file`, …), and a matcher that missed one silently dropped
|
|
121
|
+
// the rules for every write. fetch-rules keeps only the write and
|
|
122
|
+
// shell tools itself and answers `allow` at once on any other.
|
|
123
|
+
matcher: '*',
|
|
124
|
+
hooks: [{ type: 'command', command: cmd('fetch-rules'), timeout: 30 }],
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
},
|
|
128
|
+
'cybedefend-rules-delivery': {
|
|
129
|
+
PreInvocation: [{ type: 'command', command: cmd('pre-invocation'), timeout: 10 }],
|
|
130
|
+
},
|
|
131
|
+
'cybedefend-guards': {
|
|
132
|
+
PreToolUse: [
|
|
133
|
+
{
|
|
134
|
+
matcher: '*',
|
|
135
|
+
hooks: [{ type: 'command', command: cmd('guard-check'), timeout: 30 }],
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
if (opts.enableSessionReview) {
|
|
141
|
+
groups['cybedefend-session-review'] = {
|
|
142
|
+
Stop: [{ type: 'command', command: cmd('session-review'), timeout: 30 }],
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
return groups;
|
|
146
|
+
}
|
|
147
|
+
/** Top-level keys of `file` that are ours: prefix `cybedefend-` AND the JSON references our managed hook dir. */
|
|
148
|
+
function ourGroupKeys(file) {
|
|
149
|
+
return Object.keys(file).filter((key) => key.startsWith('cybedefend-') && textReferencesHookRunner(JSON.stringify(file[key])));
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Delete every top-level key of `file` that is ours (prefix `cybedefend-`
|
|
153
|
+
* AND its JSON references our managed hook dir). A user's own
|
|
154
|
+
* `cybedefend-*` group that doesn't mention our runner is left alone — the
|
|
155
|
+
* prefix alone is not a strong enough signal to delete someone else's
|
|
156
|
+
* config. Returns whether anything was removed.
|
|
157
|
+
*/
|
|
158
|
+
function dropOurGroups(file) {
|
|
159
|
+
const keys = ourGroupKeys(file);
|
|
160
|
+
for (const key of keys)
|
|
161
|
+
delete file[key];
|
|
162
|
+
return keys.length > 0;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* The names of our groups the user has switched off (`"enabled": false`,
|
|
166
|
+
* Antigravity's own per-group toggle) before they get dropped and rewritten
|
|
167
|
+
* — so `writeSettings` can carry that flag over onto the fresh replacement
|
|
168
|
+
* instead of silently re-enabling a group the user turned off.
|
|
169
|
+
*/
|
|
170
|
+
function disabledOurGroups(file) {
|
|
171
|
+
const disabled = new Set();
|
|
172
|
+
for (const key of ourGroupKeys(file)) {
|
|
173
|
+
const group = file[key];
|
|
174
|
+
if (group && typeof group === 'object' && group.enabled === false) {
|
|
175
|
+
disabled.add(key);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return disabled;
|
|
179
|
+
}
|
|
180
|
+
function detect() {
|
|
181
|
+
const version = probeBinaryVersion('agy') ?? undefined;
|
|
182
|
+
const hasConfigDir = configDirExists(home('.gemini', 'antigravity')) ||
|
|
183
|
+
configDirExists(home('.gemini', 'antigravity-ide')) ||
|
|
184
|
+
configDirExists(home('.gemini', 'antigravity-cli'));
|
|
185
|
+
const hasApp = process.platform === 'darwin' && existsSync('/Applications/Antigravity.app');
|
|
186
|
+
const installed = version !== undefined || hasConfigDir || hasApp;
|
|
187
|
+
// Computed regardless of `installed`: a Windows home with a whitespace
|
|
188
|
+
// path is the more actionable reason to surface, and `writeSettings` is
|
|
189
|
+
// reachable even from a "not installed" detection (a client manually
|
|
190
|
+
// ticked in the install picker, or `vibedefend doctor` re-wiring from
|
|
191
|
+
// `detect().installed` alone without re-checking `supportsHooks`).
|
|
192
|
+
const windowsBlock = antigravityWindowsBlock(process.platform, HOOK_RUNNER_PATH);
|
|
193
|
+
if (!installed) {
|
|
194
|
+
return {
|
|
195
|
+
installed: false,
|
|
196
|
+
supportsHooks: false,
|
|
197
|
+
reason: windowsBlock ??
|
|
198
|
+
'`agy` CLI not on PATH, no ~/.gemini/antigravity(-ide|-cli)/ directory, ' +
|
|
199
|
+
'and no /Applications/Antigravity.app.',
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
// No version gate — hooks shipped with Antigravity's first release.
|
|
203
|
+
if (windowsBlock) {
|
|
204
|
+
return { installed: true, version, supportsHooks: false, reason: windowsBlock };
|
|
205
|
+
}
|
|
206
|
+
return { installed: true, version, supportsHooks: true };
|
|
207
|
+
}
|
|
208
|
+
function supports(event) {
|
|
209
|
+
// Antigravity has no PreCompact and no UserPromptSubmit event. Action
|
|
210
|
+
// Guards (guard-check) and rules delivery (pre-invocation) are wired
|
|
211
|
+
// unconditionally below — they aren't part of the LifecycleEvent surface
|
|
212
|
+
// `supports()` is asked about.
|
|
213
|
+
return event === 'fetch-rules' || event === 'session-start' || event === 'stop';
|
|
214
|
+
}
|
|
215
|
+
function writeSettings(opts) {
|
|
216
|
+
// Belt and suspenders: `detect()` is what normally keeps this adapter out
|
|
217
|
+
// of the picker on an unspawnable Windows path, but `writeSettings` can
|
|
218
|
+
// still be reached directly (a client ticked by hand before `detect()`
|
|
219
|
+
// ran, or a re-wire driven only by `detect().installed`). Never wire a
|
|
220
|
+
// command that would block every Antigravity tool call for want of a
|
|
221
|
+
// runnable hook — and clean up anything an earlier, unguarded install
|
|
222
|
+
// left behind.
|
|
223
|
+
const windowsBlock = antigravityWindowsBlock(process.platform, HOOK_RUNNER_PATH);
|
|
224
|
+
if (windowsBlock) {
|
|
225
|
+
log.warn(windowsBlock);
|
|
226
|
+
editJsonFile(ANTIGRAVITY_HOOKS, dropOurGroups);
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
const file = readJson(ANTIGRAVITY_HOOKS, {});
|
|
230
|
+
const disabled = disabledOurGroups(file);
|
|
231
|
+
dropOurGroups(file);
|
|
232
|
+
const groups = buildAntigravityHookGroups({ enableSessionReview: opts.enableSessionReview });
|
|
233
|
+
for (const key of disabled) {
|
|
234
|
+
const group = groups[key];
|
|
235
|
+
if (group && typeof group === 'object') {
|
|
236
|
+
group.enabled = false;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
Object.assign(file, groups);
|
|
240
|
+
writeJson(ANTIGRAVITY_HOOKS, file);
|
|
241
|
+
log.ok(`Antigravity hooks wired into ${ANTIGRAVITY_HOOKS}`);
|
|
242
|
+
log.hint('`agy --dangerously-skip-permissions` runs no hook at all.');
|
|
243
|
+
log.hint('Rules reach the agent at its next model call (PreInvocation), not immediately after the edit that triggered them.');
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Register the CybeDefend MCP server in `~/.gemini/config/mcp_config.json`.
|
|
247
|
+
* This is NOT wrapped by the VibeDefend MCP proxy (like Codex today) — the
|
|
248
|
+
* entry points straight at the region's URL.
|
|
249
|
+
*/
|
|
250
|
+
function registerMcp(opts) {
|
|
251
|
+
log.step(`Registering MCP "${opts.region.mcpName}" in Antigravity`);
|
|
252
|
+
log.hint(`URL: ${opts.region.mcpUrl}`);
|
|
253
|
+
const file = readJson(ANTIGRAVITY_MCP, {});
|
|
254
|
+
file.mcpServers ??= {};
|
|
255
|
+
file.mcpServers[opts.region.mcpName] = { serverUrl: opts.region.mcpUrl };
|
|
256
|
+
writeJson(ANTIGRAVITY_MCP, file);
|
|
257
|
+
log.ok(`MCP "${opts.region.mcpName}" registered in ${ANTIGRAVITY_MCP}`);
|
|
258
|
+
log.hint('Antigravity opens a browser sign-in the first time it connects.');
|
|
259
|
+
return true;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Pure introspection — never throws, as Windsurf's does. `hooksWired` from a
|
|
263
|
+
* raw-text marker check on `hooks.json`, `mcpRegistered` from the
|
|
264
|
+
* `serverUrl` of our entry in `mcp_config.json` — it must point at this
|
|
265
|
+
* region, not just exist. Both reads strip a leading BOM first, since
|
|
266
|
+
* either file may carry one.
|
|
267
|
+
*/
|
|
268
|
+
function inspect(region) {
|
|
269
|
+
let hooksWired = false;
|
|
270
|
+
try {
|
|
271
|
+
if (existsSync(ANTIGRAVITY_HOOKS)) {
|
|
272
|
+
hooksWired = textReferencesHookRunner(stripBom(readFileSync(ANTIGRAVITY_HOOKS, 'utf8')));
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
catch {
|
|
276
|
+
/* missing/unreadable → false */
|
|
277
|
+
}
|
|
278
|
+
const entry = readJsonServerEntry(() => stripBom(readFileSync(ANTIGRAVITY_MCP, 'utf8')), 'mcpServers', region.mcpName);
|
|
279
|
+
return { hooksWired, ...mcpStatus(entry?.serverUrl, region) };
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Drop our `cybedefend-*` groups from `hooks.json` (whole top-level keys —
|
|
283
|
+
* see `dropOurGroups`) and our servers from `mcp_config.json`. Every other
|
|
284
|
+
* key / server is left untouched.
|
|
285
|
+
*
|
|
286
|
+
* The two files are independent, so both steps always run even when one
|
|
287
|
+
* throws (a malformed `hooks.json` must not leave our MCP server behind) —
|
|
288
|
+
* only once both have been attempted does this re-throw the FIRST error, if
|
|
289
|
+
* any.
|
|
290
|
+
*/
|
|
291
|
+
function uninstall(opts) {
|
|
292
|
+
let hooksRemoved = false;
|
|
293
|
+
let hooksError;
|
|
294
|
+
try {
|
|
295
|
+
hooksRemoved = editJsonFile(ANTIGRAVITY_HOOKS, dropOurGroups);
|
|
296
|
+
}
|
|
297
|
+
catch (err) {
|
|
298
|
+
hooksError = err;
|
|
299
|
+
}
|
|
300
|
+
let mcpRemoved = [];
|
|
301
|
+
let mcpError;
|
|
302
|
+
try {
|
|
303
|
+
editJsonFile(ANTIGRAVITY_MCP, (file) => {
|
|
304
|
+
mcpRemoved = deleteKeys(file.mcpServers, opts.mcpNames);
|
|
305
|
+
return mcpRemoved.length > 0;
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
catch (err) {
|
|
309
|
+
mcpError = err;
|
|
310
|
+
}
|
|
311
|
+
if (hooksError)
|
|
312
|
+
throw hooksError;
|
|
313
|
+
if (mcpError)
|
|
314
|
+
throw mcpError;
|
|
315
|
+
return { hookFiles: hooksRemoved ? [ANTIGRAVITY_HOOKS] : [], mcpRemoved };
|
|
316
|
+
}
|
|
317
|
+
export const antigravityAdapter = {
|
|
318
|
+
id: 'antigravity',
|
|
319
|
+
label: 'Google Antigravity',
|
|
320
|
+
detect,
|
|
321
|
+
supports,
|
|
322
|
+
writeSettings,
|
|
323
|
+
registerMcp,
|
|
324
|
+
inspect,
|
|
325
|
+
uninstall,
|
|
326
|
+
};
|
|
327
|
+
//# sourceMappingURL=antigravity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../../src/clients/antigravity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,C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AAC;QACH,YAAY,GAAG,YAAY,CAA0B,iBAAiB,EAAE,aAAa,CAAC,CAAC;IACzF,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,UAAU,GAAG,GAAG,CAAC;IACnB,CAAC;IAED,IAAI,UAAU,GAAa,EAAE,CAAC;IAC9B,IAAI,QAAiB,CAAC;IACtB,IAAI,CAAC;QACH,YAAY,CAAqB,eAAe,EAAE,CAAC,IAAI,EAAE,EAAE;YACzD,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YACxD,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,QAAQ,GAAG,GAAG,CAAC;IACjB,CAAC;IAED,IAAI,UAAU;QAAE,MAAM,UAAU,CAAC;IACjC,IAAI,QAAQ;QAAE,MAAM,QAAQ,CAAC;IAE7B,OAAO,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,UAAU,EAAE,CAAC;AAC5E,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAkB;IAC/C,EAAE,EAAE,aAAa;IACjB,KAAK,EAAE,oBAAoB;IAC3B,MAAM;IACN,QAAQ;IACR,aAAa;IACb,WAAW;IACX,OAAO;IACP,SAAS;CACV,CAAC"}
|
package/dist/clients/registry.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* order. Claude Code first because it has the most mature hook surface
|
|
7
7
|
* and is the assumed default; the others follow alphabetically.
|
|
8
8
|
*/
|
|
9
|
+
import { antigravityAdapter } from './antigravity.js';
|
|
9
10
|
import { claudeCodeAdapter } from './claude-code.js';
|
|
10
11
|
import { codexAdapter } from './codex.js';
|
|
11
12
|
import { cursorAdapter } from './cursor.js';
|
|
@@ -17,6 +18,7 @@ export const ALL_ADAPTERS = [
|
|
|
17
18
|
vscodeAdapter,
|
|
18
19
|
windsurfAdapter,
|
|
19
20
|
codexAdapter,
|
|
21
|
+
antigravityAdapter,
|
|
20
22
|
];
|
|
21
23
|
/** Look up an adapter by ID. Throws if not found (programming error). */
|
|
22
24
|
export function adapterFor(id) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/clients/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAIhD,MAAM,CAAC,MAAM,YAAY,GAA6B;IACpD,iBAAiB;IACjB,aAAa;IACb,aAAa;IACb,eAAe;IACf,YAAY;
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/clients/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAIhD,MAAM,CAAC,MAAM,YAAY,GAA6B;IACpD,iBAAiB;IACjB,aAAa;IACb,aAAa;IACb,eAAe;IACf,YAAY;IACZ,kBAAkB;CACV,CAAC;AAEX,yEAAyE;AACzE,MAAM,UAAU,UAAU,CAAC,EAAY;IACrC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