agy-context-saver 1.2.0 → 1.2.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 +60 -0
- package/README.md +28 -25
- package/mcp/index.js +2 -2
- package/package.json +2 -1
- package/plugin.json +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `Agy-Context-Saver` will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.2.1] - 2026-10-07
|
|
9
|
+
|
|
10
|
+
### Documentation & Developer Experience
|
|
11
|
+
- **MCP Prompts Documentation**: Formally documented the `/mcp:agy-context-saver:context_shield` prompt across `README.md` and the documentation site, clarifying the operational difference between user slash commands (Prompts) and autonomous agent capabilities (Tools).
|
|
12
|
+
- **Quickstart Optimization**: Repositioned the Quickstart installation block to the very top of `README.md` and `docs/index.md` for immediate onboarding.
|
|
13
|
+
- **Zensical Docs Site Overhaul**: Added `context_shield` reference and tip callouts across `docs/index.md`, `docs/tools.md`, and `docs/governance.md`; updated navigation title to `Tools & Prompts`.
|
|
14
|
+
- **Dynamic Test Assertions**: Updated installed MCP server verification test to dynamically synchronize with `package.json` version.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## [1.2.0] - 2026-10-07
|
|
19
|
+
|
|
20
|
+
### Performance & Forensics
|
|
21
|
+
- **Batch Full-Transcript Dereferencing**: Replaced sequential full-transcript scans with `batchFindFullSteps()`, reducing $N$-item dereferencing from $O(N)$ full-file passes down to a single streaming pass ($O(1)$) in 18.4ms.
|
|
22
|
+
- **Sliding-Window Turn Retention**: Bounded transcript memory retention in `read_transcript` (`WINDOW_SIZE = Math.max(100, lastTurns * 15)`) with an early-stopping block formatter, parsing 2,000 steps in 21.8ms under 24 KB memory.
|
|
23
|
+
- **Regex LRU Caching**: Added in-memory LRU cache (`regexCache`, capacity: 100) for query pattern compilation in `query_transcript`.
|
|
24
|
+
- **Short-Circuit Field Search**: Converted transcript search to test fields sequentially (`content` $\to$ `thinking` $\to$ `tool_calls`), avoiding heavy string concatenations.
|
|
25
|
+
- **Fast-Path Message Cleaning**: Added fast-path bypass in `cleanMessageContent` for strings $\le 120$ characters, eliminating redundant base64 regexes and newline splits.
|
|
26
|
+
- **Static Rules In-Memory Cache**: Cached `rules/AGENTS.md` in memory with `mtimeMs` file stat invalidation, eliminating disk I/O on `resources/read` and `prompts/get`.
|
|
27
|
+
|
|
28
|
+
### Execution Governor & Hook
|
|
29
|
+
- **Fast-Path Builtin Bypass**: Added `NON_REWRITABLE_BINARIES` set (`node`, `powershell`, `pwsh`, `cmd`, `dir`, `echo`, `cd`, `del`, etc.) and PowerShell cmdlet prefixes to bypass `spawnSync("rtk")`, dropping execution latency from ~30ms to $< 0.05$ms.
|
|
30
|
+
- **Persistent Command Rewrite LRU Cache**: Implemented persistent disk LRU cache (`agy-rtk-rewrite-cache.json` in `os.tmpdir()`) for rewritable commands, reducing repeat rewrite lookups to $< 0.1$ms.
|
|
31
|
+
- **Session Ledger State Partitioning**: Partitioned session state by conversation ID (`agy-session-${safeId}.json`) to eliminate cross-session file contention.
|
|
32
|
+
|
|
33
|
+
### Registration & Lifecycle
|
|
34
|
+
- **Idempotent Config & Schema Synchronization**: Added `safeWriteFileIfChanged` and `safeCopyFileIfChanged` across all configuration (`hooks.json`, `mcp_config.json`) and MCP tool schemas (`~/.gemini/antigravity/mcp/agy-context-saver/`), eliminating disk churn during repeat syncs.
|
|
35
|
+
- **RTK Provisioning Check Reuse**: Passed pre-detected RTK metadata to `ensureRtkInstalled()` to eliminate redundant `execSync` version checks during installation.
|
|
36
|
+
|
|
37
|
+
### Security & Reliability
|
|
38
|
+
- **Stdio Payload Safety Ceiling**: Added 10 MB payload guard (`MAX_STDIO_PAYLOAD_BYTES`) on the MCP stdio line reader, emitting standard JSON-RPC `-32600 Invalid Request` on oversized payloads.
|
|
39
|
+
- **New Performance Verification Suite**: Added `tests/test-performance-probes.mjs` verifying batch dereferencing, sliding window bounds, stdio safety ceiling, and idempotent writes.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## [1.1.0] - 2026-10-07
|
|
44
|
+
|
|
45
|
+
### Added
|
|
46
|
+
- **Closed Execution Topology & Governance Invariants**: Comprehensive PreToolUse hook intercepting native inspection tools (`view_file`, `grep_search`, `list_dir`, `find_by_name`) and hard-routing them to RTK.
|
|
47
|
+
- **Root-Based Antigravity State Protection**: Denied direct access to `.system_generated/` internal files to prevent transcript bloat and loop degradation.
|
|
48
|
+
- **Session-Wide Lifecycle Ledger**: Non-resettable session task polling counter with Tier 3 `force_ask` circuit breaker at 5 denials.
|
|
49
|
+
- **Evaluator & Benchmark Mutation Safeguard**: Gated mutation of evaluator or benchmark artifacts behind user confirmation.
|
|
50
|
+
- **Platform-Aware Windows Routing**: Windows-native routing for `rtk rg "<pattern>" .` and `rtk find <path>` to eliminate stdin hangs.
|
|
51
|
+
- **Universal MCP Server**: 6 core tools (`check_context_health`, `subagent_brief`, `get_installation_status`, `sync_installation`, `read_transcript`, `query_transcript`).
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## [1.0.0] - 2026-10-07
|
|
56
|
+
|
|
57
|
+
### Initial Release
|
|
58
|
+
- Initial release of Agy-Context-Saver.
|
|
59
|
+
- Antigravity Model Context Protocol (MCP) server.
|
|
60
|
+
- Background task lifecycle governance and reactive wakeup enforcement.
|
package/README.md
CHANGED
|
@@ -13,6 +13,23 @@ It permanently eliminates session degradation, memory bloat, and context window
|
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
+
## Quickstart (Instant Install)
|
|
17
|
+
|
|
18
|
+
Install and synchronize the governor and RTK across your Antigravity environment:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Fastest: one-line registration via npx
|
|
22
|
+
npx agy-context-saver install
|
|
23
|
+
|
|
24
|
+
# Or locally from this repository
|
|
25
|
+
npm run setup
|
|
26
|
+
|
|
27
|
+
# Audit health across all layers at any time
|
|
28
|
+
npm run status
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
16
33
|
## Architectural Division of Responsibilities
|
|
17
34
|
|
|
18
35
|
```text
|
|
@@ -65,23 +82,6 @@ It permanently eliminates session degradation, memory bloat, and context window
|
|
|
65
82
|
|
|
66
83
|
---
|
|
67
84
|
|
|
68
|
-
## Quickstart (Instant Install)
|
|
69
|
-
|
|
70
|
-
Install and synchronize the governor and RTK across your Antigravity environment:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
# Fastest: one-line registration via npx
|
|
74
|
-
npx agy-context-saver install
|
|
75
|
-
|
|
76
|
-
# Or locally from this repository
|
|
77
|
-
npm run setup
|
|
78
|
-
|
|
79
|
-
# Audit health across all layers at any time
|
|
80
|
-
npm run status
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
85
|
## Key Capabilities
|
|
86
86
|
|
|
87
87
|
- **Transparent RTK Rewriting**: Native `run_command` calls are automatically rewritten (e.g. `pytest` $\to$ `rtk pytest`) via Antigravity PreToolUse hooks.
|
|
@@ -154,14 +154,17 @@ node tests/test-lifecycle-rollback.mjs
|
|
|
154
154
|
|
|
155
155
|
---
|
|
156
156
|
|
|
157
|
-
##
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
157
|
+
## MCP Tools & Slash Commands
|
|
158
|
+
|
|
159
|
+
* **User Slash Command (`/mcp:...`)**:
|
|
160
|
+
- `/mcp:agy-context-saver:context_shield`: Injects 3-layer governance rules and RTK standards into any session with one click. *(MCP Prompts appear in your chat autocomplete menu; MCP Tools are called autonomously by the agent).*
|
|
161
|
+
* **Agent MCP Tools**:
|
|
162
|
+
1. `check_context_health`: Diagnoses conversation transcript turn budgets, payload size, RTK status, and polling loops.
|
|
163
|
+
2. `subagent_brief`: Formulates scope-isolated prompts for delegated subagents.
|
|
164
|
+
3. `read_transcript`: Reads recent conversation history in clean Markdown format (compact/full).
|
|
165
|
+
4. `query_transcript`: Forensic filtering and regex search engine for conversation logs.
|
|
166
|
+
5. `get_installation_status`: Inspects live Antigravity plugin link, hook, MCP server, tool schemas, and RTK binary.
|
|
167
|
+
6. `sync_installation`: Re-verifies and repairs all integration layers in ~25ms.
|
|
165
168
|
|
|
166
169
|
---
|
|
167
170
|
|
package/mcp/index.js
CHANGED
|
@@ -51,7 +51,7 @@ if (cliArg === "install" || cliArg === "--install") {
|
|
|
51
51
|
|
|
52
52
|
function printHelp() {
|
|
53
53
|
console.log(`
|
|
54
|
-
Agy-Context-Saver 🛡️ (v1.2.
|
|
54
|
+
Agy-Context-Saver 🛡️ (v1.2.1)
|
|
55
55
|
Universal MCP Server & Lifecycle Governor for Google Antigravity (Powered by RTK)
|
|
56
56
|
|
|
57
57
|
Usage:
|
|
@@ -98,7 +98,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
|
98
98
|
const rulesPath = path.resolve(__dirname, "../rules/AGENTS.md");
|
|
99
99
|
|
|
100
100
|
const SERVER_NAME = "agy-context-saver";
|
|
101
|
-
const SERVER_VERSION = "1.2.
|
|
101
|
+
const SERVER_VERSION = "1.2.1";
|
|
102
102
|
|
|
103
103
|
// --- Tools Specification ---
|
|
104
104
|
const TOOLS = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agy-context-saver",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Universal Model Context Protocol (MCP) server & lifecycle governor purpose-built for Google Antigravity",
|
|
5
5
|
"main": "mcp/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"install.ps1",
|
|
35
35
|
"install.sh",
|
|
36
36
|
"README.md",
|
|
37
|
+
"CHANGELOG.md",
|
|
37
38
|
"LICENSE"
|
|
38
39
|
],
|
|
39
40
|
"author": "paragon-ux",
|
package/plugin.json
CHANGED