agy-context-saver 1.4.0 → 1.6.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/CHANGELOG.md +61 -0
- package/README.md +48 -4
- package/assets/logo.svg +51 -0
- package/hooks.json +1 -1
- package/install.ps1 +86 -42
- package/mcp/index.js +323 -101
- package/package.json +18 -2
- package/plugin.json +9 -2
- package/rules/AGENTS.md +9 -4
- package/scripts/execution-guard-hook.mjs +347 -280
- package/scripts/install-register.mjs +178 -64
- package/scripts/provision-rtk.mjs +67 -14
- package/scripts/release-preflight.mjs +147 -0
- package/skills/context-governance/SKILL.md +26 -50
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agy-context-saver",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
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": {
|
|
@@ -12,7 +12,22 @@
|
|
|
12
12
|
"setup": "node scripts/install-register.mjs",
|
|
13
13
|
"uninstall": "node scripts/install-register.mjs --uninstall",
|
|
14
14
|
"status": "node scripts/install-register.mjs --status",
|
|
15
|
-
"
|
|
15
|
+
"preflight": "node scripts/release-preflight.mjs",
|
|
16
|
+
"test": "node tests/test-hook.mjs && node tests/test-mcp.mjs && node tests/test-output-governance.mjs && node tests/test-e2e-probes.mjs && node tests/test-performance-probes.mjs && node tests/test-installed-verification.mjs && node tests/test-lifecycle-rollback.mjs && node tests/test-subagent-trials.mjs && node tests/test-check-only-readonly.mjs && node tests/test-malformed-config-preservation.mjs"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/paragon-ux/Agy-Context-Saver.git"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://paragon-ux.github.io/agy-context-saver/",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/paragon-ux/Agy-Context-Saver/issues"
|
|
25
|
+
},
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=22"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
16
31
|
},
|
|
17
32
|
"keywords": [
|
|
18
33
|
"antigravity",
|
|
@@ -24,6 +39,7 @@
|
|
|
24
39
|
"agentic-coding"
|
|
25
40
|
],
|
|
26
41
|
"files": [
|
|
42
|
+
"assets",
|
|
27
43
|
"mcp",
|
|
28
44
|
"scripts",
|
|
29
45
|
"rules",
|
package/plugin.json
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agy-context-saver",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"displayName": "Antigravity Context Shield & Governor",
|
|
4
|
+
"version": "1.6.0",
|
|
5
|
+
"description": "Deterministic background polling governor, RTK terminal optimizer, and subagent context preservation shield for Antigravity.",
|
|
6
|
+
"logo": "assets/logo.svg",
|
|
7
|
+
"suggestedPrompts": [
|
|
8
|
+
"Audit context health and token consumption for this session",
|
|
9
|
+
"Formulate an isolated subagent brief under Pointer-Over-Wire protocol",
|
|
10
|
+
"Inspect recent conversation turns without raw JSON transcript bloat"
|
|
11
|
+
]
|
|
5
12
|
}
|
package/rules/AGENTS.md
CHANGED
|
@@ -55,12 +55,14 @@
|
|
|
55
55
|
- **Fail-Fast Flags are Opt-In**: Fail-fast flags (`-x`, `--maxfail=1`) are opt-in. Use them when quickly debugging a localized failure, but omit them when assessing the full blast radius across the codebase to avoid the "whack-a-mole" loop.
|
|
56
56
|
- **Coordinated Watchdog Mandatory for Full Sweeps**: When running full multi-minute test sweeps without `-x`, agents **MUST** pair execution with the **Coordinated Watchdog Protocol** (`schedule(DurationSeconds=45, ...)`) and output a **Pre-Yield Status Card**. Never yield silently.
|
|
57
57
|
- **Subagent Delegation for Deep Audits**: When a comprehensive repository-wide test audit is required, delegate the sweep to a subagent (`invoke_subagent`) to keep the main thread responsive.
|
|
58
|
-
- **Subagent Delegation
|
|
58
|
+
- **Subagent Delegation & Pointer-Over-Wire (POW)**:
|
|
59
|
+
- Delegate heavy multi-file exploration, deep research, and repo sweeps to subagents (`invoke_subagent`). Subagents absorb intermediate steps and return high-signal summaries.
|
|
60
|
+
- **POW Protocol**: Payloads or deliverables exceeding 1 KB must be written to workspace scratch files (e.g. `scratch/<task>_findings.md` or artifacts). Transmit **ONLY** an Executive Summary (3–5 sentences), a Scoreboard / Verdict table, and a clickable file link (`file:///...`) in `send_message` to prevent transport truncation and parent context bloat.
|
|
59
61
|
- **Benchmark / Evaluator Integrity**: Never mutate benchmark definitions, prompt templates, or scoring artifacts during an active evaluation without explicit user confirmation.
|
|
60
62
|
|
|
61
63
|
---
|
|
62
64
|
|
|
63
|
-
##
|
|
65
|
+
## Appendix: Zero-Guesswork Testing & Verification Playbook
|
|
64
66
|
When an agent or developer tests this framework, follow this exact sequence without guessing:
|
|
65
67
|
|
|
66
68
|
1. **Verify Live Registration & Health (Fast, non-blocking)**:
|
|
@@ -75,21 +77,24 @@ When an agent or developer tests this framework, follow this exact sequence with
|
|
|
75
77
|
```bash
|
|
76
78
|
npm test
|
|
77
79
|
```
|
|
78
|
-
*Expected*: All
|
|
80
|
+
*Expected*: All 8 test suites pass (Hook unit tests, MCP protocol tests, output governance, E2E probes, performance probes, live system validation, lifecycle rollback, subagent trials).
|
|
79
81
|
|
|
80
82
|
3. **Verify Individual Layers On-Demand**:
|
|
81
83
|
- Governance Hook: `node tests/test-hook.mjs`
|
|
82
84
|
- MCP Protocol & JSON-RPC: `node tests/test-mcp.mjs`
|
|
85
|
+
- Output Governance: `node tests/test-output-governance.mjs`
|
|
83
86
|
- E2E Probes: `node tests/test-e2e-probes.mjs`
|
|
87
|
+
- Performance Probes: `node tests/test-performance-probes.mjs`
|
|
84
88
|
- Live System Checks: `node tests/test-installed-verification.mjs`
|
|
85
89
|
- Lifecycle & Rollback: `node tests/test-lifecycle-rollback.mjs`
|
|
90
|
+
- Subagent Delegation Trials: `node tests/test-subagent-trials.mjs`
|
|
86
91
|
|
|
87
92
|
4. **Verify MCP Tools in Antigravity**:
|
|
88
93
|
- `get_installation_status`: Inspect live integration layers.
|
|
89
94
|
- `check_context_health`: Pass `{ "transcriptPath": "<path-to-transcript.jsonl>" }`.
|
|
90
95
|
- `read_transcript`: Pass `{ "conversationId": "<uuid>", "lastTurns": 3, "mode": "compact" }`.
|
|
91
96
|
- `query_transcript`: Pass `{ "conversationId": "<uuid>", "query": "<pattern>", "summaryOnly": true }`.
|
|
92
|
-
- `subagent_brief`: Pass `{ "objective": "<goal>", "scopeFiles": ["..."] }
|
|
97
|
+
- `subagent_brief`: Pass `{ "objective": "<goal>", "role": "<role>", "scopeFiles": ["..."] }` or pass multiple via `{ "subagents": [...] }` to generate ready-to-use `invoke_subagent` JSON payloads.
|
|
93
98
|
|
|
94
99
|
5. **Operational Anti-Patterns (What NOT to do)**:
|
|
95
100
|
- ❌ **Do NOT run `npm start` or `node mcp/index.js` interactively**: It starts the stdio JSON-RPC daemon and waits indefinitely on stdin.
|