antigravity-plugin-context-mode 1.3.0 ā 1.3.1
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/CHANGELOG.md +7 -0
- package/README.md +25 -12
- package/package.json +2 -2
- package/server.js +97 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `antigravity-plugin-context-mode` will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.3.1] - 2026-11-16
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **1-Click CLI Installer (`npx antigravity-plugin-context-mode install`)**: Added automated CLI installation handler to `server.js`. Running `npx antigravity-plugin-context-mode install` automatically detects the user's OS and copies plugin manifests, hooks, skills, and MCP tools directly into `~/.gemini/config/plugins/antigravity-plugin-context-mode` (or workspace-scoped via `--workspace`).
|
|
9
|
+
- **CLI Uninstaller (`npx antigravity-plugin-context-mode uninstall`)**: Easily remove the installed plugin from the Antigravity discovery directory with clean terminal confirmation.
|
|
10
|
+
- **CLI Flags (`--help`, `-h`, `--version`, `-v`)**: Quick terminal reference for command options while maintaining 100% backward compatibility with MCP stdio JSON-RPC protocol execution.
|
|
11
|
+
|
|
5
12
|
## [1.3.0] - 2026-11-15
|
|
6
13
|
|
|
7
14
|
### Added
|
package/README.md
CHANGED
|
@@ -3,12 +3,15 @@
|
|
|
3
3
|
> **Stop context bloat. Save 90%+ of your prompt tokens. Keep your agent fast, focused, and less forgetful.**
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/antigravity-plugin-context-mode)
|
|
6
|
+
[](https://domush.github.io/antigravity-plugin-context-mode/)
|
|
6
7
|
[](LICENSE)
|
|
7
8
|
[]()
|
|
8
9
|
[]()
|
|
9
10
|
|
|
10
11
|
**Antigravity Context Mode** is a free, local-first plugin built specifically for the **Google Antigravity App**. It prevents terminal commands, build outputs, multi-megabyte source files, and massive datasets from flooding your conversation history ā saving thousands of tokens per turn and stopping "agent amnesia" in its tracks.
|
|
11
12
|
|
|
13
|
+
> š **Live Website, Simulator & Changelog:** [domush.github.io/antigravity-plugin-context-mode](https://domush.github.io/antigravity-plugin-context-mode/)
|
|
14
|
+
|
|
12
15
|
---
|
|
13
16
|
<img width="817" height="690" alt="Antigravity Context Mode Dashboard" src="https://github.com/user-attachments/assets/dbf6d666-58d0-48f3-bc02-9783acf3fb37" />
|
|
14
17
|
|
|
@@ -80,28 +83,38 @@ Tested live on real-world build logs, source files, and datasets in the Antigrav
|
|
|
80
83
|
|
|
81
84
|
## Quick Start & Installation
|
|
82
85
|
|
|
83
|
-
###
|
|
84
|
-
|
|
86
|
+
### Method 1: 1-Click CLI Installer (Fastest)
|
|
87
|
+
Run this command from any terminal:
|
|
85
88
|
|
|
86
89
|
```bash
|
|
87
|
-
|
|
88
|
-
git clone https://github.com/Domush/antigravity-plugin-context-mode.git ~/.gemini/config/plugins/antigravity-plugin-context-mode
|
|
90
|
+
npx antigravity-plugin-context-mode install
|
|
89
91
|
```
|
|
90
92
|
|
|
91
|
-
|
|
93
|
+
This automatically detects your operating system, unpacks the latest release into `~/.gemini/config/plugins/antigravity-plugin-context-mode`, and activates hooks and MCP tools. Restart the Antigravity App to activate!
|
|
94
|
+
|
|
95
|
+
> **Workspace-only install:** To install only for the current project, add `--workspace`:
|
|
96
|
+
> ```bash
|
|
97
|
+
> npx antigravity-plugin-context-mode install --workspace
|
|
98
|
+
> ```
|
|
99
|
+
|
|
100
|
+
---
|
|
92
101
|
|
|
93
|
-
###
|
|
94
|
-
If you
|
|
102
|
+
### Method 2: Git Clone (Ideal for Easy Updates)
|
|
103
|
+
If you prefer managing the plugin via Git for easy `git pull` updates:
|
|
95
104
|
|
|
105
|
+
**Windows (PowerShell):**
|
|
106
|
+
```powershell
|
|
107
|
+
git clone https://github.com/Domush/antigravity-plugin-context-mode.git "$env:USERPROFILE\.gemini\config\plugins\antigravity-plugin-context-mode"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**macOS / Linux:**
|
|
96
111
|
```bash
|
|
97
|
-
|
|
98
|
-
mkdir -p .agents/plugins
|
|
99
|
-
git clone https://github.com/Domush/antigravity-plugin-context-mode.git .agents/plugins/antigravity-plugin-context-mode
|
|
112
|
+
git clone https://github.com/Domush/antigravity-plugin-context-mode.git ~/.gemini/config/plugins/antigravity-plugin-context-mode
|
|
100
113
|
```
|
|
101
114
|
|
|
102
|
-
|
|
115
|
+
**To update later:**
|
|
103
116
|
```bash
|
|
104
|
-
|
|
117
|
+
cd ~/.gemini/config/plugins/antigravity-plugin-context-mode && git pull
|
|
105
118
|
```
|
|
106
119
|
|
|
107
120
|
---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antigravity-plugin-context-mode",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Native Antigravity plugin for context-mode: SQLite FTS5 indexing, sandboxed execution, and lifecycle hook protection against context window bloat",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"bugs": {
|
|
13
13
|
"url": "https://github.com/Domush/antigravity-plugin-context-mode/issues"
|
|
14
14
|
},
|
|
15
|
-
"homepage": "https://github.
|
|
15
|
+
"homepage": "https://domush.github.io/antigravity-plugin-context-mode/",
|
|
16
16
|
"keywords": [
|
|
17
17
|
"antigravity",
|
|
18
18
|
"antigravity-plugin",
|
package/server.js
CHANGED
|
@@ -13,6 +13,103 @@ try {
|
|
|
13
13
|
if (pkg.version) pkgVersion = pkg.version;
|
|
14
14
|
} catch {}
|
|
15
15
|
|
|
16
|
+
// Handle CLI subcommands (e.g. npx antigravity-plugin-context-mode install)
|
|
17
|
+
const cliArg = process.argv[2];
|
|
18
|
+
if (
|
|
19
|
+
cliArg === "install" ||
|
|
20
|
+
cliArg === "uninstall" ||
|
|
21
|
+
cliArg === "--help" ||
|
|
22
|
+
cliArg === "-h" ||
|
|
23
|
+
cliArg === "--version" ||
|
|
24
|
+
cliArg === "-v"
|
|
25
|
+
) {
|
|
26
|
+
if (cliArg === "--version" || cliArg === "-v") {
|
|
27
|
+
console.log(`antigravity-plugin-context-mode v${pkgVersion}`);
|
|
28
|
+
process.exit(0);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (cliArg === "--help" || cliArg === "-h") {
|
|
32
|
+
console.log(`
|
|
33
|
+
Antigravity Context Mode CLI (v${pkgVersion})
|
|
34
|
+
|
|
35
|
+
Usage:
|
|
36
|
+
npx antigravity-plugin-context-mode install [options] Install plugin into Google Antigravity
|
|
37
|
+
npx antigravity-plugin-context-mode uninstall [options] Remove installed plugin
|
|
38
|
+
npx antigravity-plugin-context-mode Start MCP stdio JSON-RPC server
|
|
39
|
+
|
|
40
|
+
Options:
|
|
41
|
+
--global, -g Install globally in ~/.gemini/config/plugins/ (default)
|
|
42
|
+
--workspace, -w Install in current workspace (.gemini/plugins/antigravity-plugin-context-mode)
|
|
43
|
+
`);
|
|
44
|
+
process.exit(0);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const isWorkspace = process.argv.includes("--workspace") || process.argv.includes("-w");
|
|
48
|
+
const homeDir = process.env.USERPROFILE || process.env.HOME || "";
|
|
49
|
+
|
|
50
|
+
let targetDir = "";
|
|
51
|
+
if (isWorkspace) {
|
|
52
|
+
targetDir = path.join(process.cwd(), ".gemini", "plugins", "antigravity-plugin-context-mode");
|
|
53
|
+
} else {
|
|
54
|
+
targetDir = path.join(homeDir, ".gemini", "config", "plugins", "antigravity-plugin-context-mode");
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (cliArg === "uninstall") {
|
|
58
|
+
if (fs.existsSync(targetDir)) {
|
|
59
|
+
fs.rmSync(targetDir, { recursive: true, force: true });
|
|
60
|
+
console.log(`\nā Antigravity Context Mode successfully removed from:`);
|
|
61
|
+
console.log(` ${targetDir}\n`);
|
|
62
|
+
} else {
|
|
63
|
+
console.log(`\nā¹ Plugin not found at: ${targetDir}\n`);
|
|
64
|
+
}
|
|
65
|
+
process.exit(0);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (cliArg === "install") {
|
|
69
|
+
console.log(`\nš¦ Installing Antigravity Context Mode v${pkgVersion}...`);
|
|
70
|
+
try {
|
|
71
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
72
|
+
|
|
73
|
+
const filesToCopy = [
|
|
74
|
+
"plugin.json",
|
|
75
|
+
"hooks.json",
|
|
76
|
+
"mcp_config.json",
|
|
77
|
+
"server.js",
|
|
78
|
+
"package.json",
|
|
79
|
+
"README.md",
|
|
80
|
+
"LICENSE",
|
|
81
|
+
"CHANGELOG.md"
|
|
82
|
+
];
|
|
83
|
+
|
|
84
|
+
const dirsToCopy = ["lib", "hooks", "skills", "rules", "assets"];
|
|
85
|
+
|
|
86
|
+
for (const file of filesToCopy) {
|
|
87
|
+
const src = path.join(__dirname, file);
|
|
88
|
+
const dest = path.join(targetDir, file);
|
|
89
|
+
if (fs.existsSync(src)) {
|
|
90
|
+
fs.copyFileSync(src, dest);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
for (const dir of dirsToCopy) {
|
|
95
|
+
const srcDir = path.join(__dirname, dir);
|
|
96
|
+
const destDir = path.join(targetDir, dir);
|
|
97
|
+
if (fs.existsSync(srcDir)) {
|
|
98
|
+
fs.cpSync(srcDir, destDir, { recursive: true });
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
console.log(`\n⨠Installation complete!`);
|
|
103
|
+
console.log(`š Location: ${targetDir}`);
|
|
104
|
+
console.log(`š Restart or open the Google Antigravity App to activate Context Mode.\n`);
|
|
105
|
+
} catch (err) {
|
|
106
|
+
console.error(`\nā Installation failed: ${err.message}\n`);
|
|
107
|
+
process.exit(1);
|
|
108
|
+
}
|
|
109
|
+
process.exit(0);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
16
113
|
const store = new ContextModeStore();
|
|
17
114
|
let currentCwd = process.cwd();
|
|
18
115
|
let currentSessionId =
|