agy-context-saver 1.8.1 → 2.0.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.
@@ -1,33 +0,0 @@
1
- # Agy-Context-Saver MCP Server Instructions
2
-
3
- ## Overview
4
- Agy-Context-Saver is the universal Model Context Protocol server and lifecycle governor for Google Antigravity, paired with RTK (Rust Token Killer) for transparent CLI output reduction.
5
-
6
- ## Core Rules for Antigravity Agents
7
- 1. **Reactive Wakeup (Zero Task Polling)**:
8
- - When background tasks run, DO NOT call `manage_task(Action='status')` or `schedule` polling timers.
9
- - Stop calling tools and yield the turn. The system notifies you automatically via `<SYSTEM_MESSAGE>`.
10
- - Repeated polling triggers an escalating circuit breaker (frozen at 5 denials).
11
- 2. **Never Read Internal State Directly**:
12
- - Access to `.system_generated/` via `view_file` is strictly denied to prevent transcript explosion.
13
- - Use `read_transcript` or `query_transcript` to inspect conversation history cleanly.
14
- 3. **Unified 3-Tier Codebase & File Inspection**:
15
- - **Tier 1 — Structural Discovery (`waymark_ask` with `plain: true`)**: First locate exact `[StartLine, EndLine]` coordinates via `waymark_ask(..., plain: true)` across all 23 supported formats (code ASTs + `markdown`, `yaml`, `json`, `toml`, `bash`). Always set `plain: true` (~19–466 tokens, zero shell quoting or stdin hazards).
16
- - **Tier 2 — Precision Workspace File Reading (`view_file` Hybrid Slice Policy)**: Pass the `StartLine` and `EndLine` span from `waymark_ask` into `view_file` (bounded slices of `1–150` lines) to preserve 1-indexed line coordinates for `replace_file_content` and avoid terminal stdout truncation. Partial slices of `151–800` lines are denied; an explicit one-pass full-file audit (`StartLine: 1, EndLine: <TotalLines>`) is permitted only when the file on disk is $\le 800$ lines and $\le 45\text{ KiB}$ (`46,080` bytes).
17
- - **Tier 3 — RTK Boundaries (`rtk read`, `rtk find`, `rtk rg`)**:
18
- - **Spillovers & Task Logs**: Read `.system_generated/steps/<step>/output.txt` spillovers and completed `tasks/<taskId>.log` files via `rtk read <path>` (with `--head-lines` / `--tail-lines`). Never use `rtk read -l minimal|aggressive` or `-m` to derive line numbers for edits.
19
- - **Directory/File Discovery**: Use `rtk find <path>` (Windows & POSIX) or `rtk ls <path>` (POSIX).
20
- - **Prose / Regex Search**: Use `rtk rg "<pattern>" <path>` (explicit `<path>` required on Windows to avoid stdin stalls) strictly for free-text/regex searches inside body prose or string values when the symbol, heading, or config key name is unknown.
21
-
22
- ## Available MCP Tools
23
- - `check_context_health`: Diagnoses transcript turn counts, byte payload, and polling loops. Accepts `transcriptPath` or `conversationId`.
24
- - `read_transcript`: Streams recent turns from `transcript.jsonl` or `transcript_full.jsonl` formatted as clean Markdown.
25
- - `query_transcript`: Forensic regex search and filtering engine across transcript steps with optional `summaryOnly: true`, plus surgical step extraction via `stepIndex` and `field`.
26
- - `get_installation_status`: Audits live health of the plugin link, hook, MCP server, tool schemas, and RTK.
27
- - `sync_installation`: Synchronizes and repairs all 4 integration layers in ~25ms.
28
-
29
- ## Diagnostic & CLI Playbook
30
- - Audit Status: `npm run status` or `node mcp/index.js status`
31
- - Run Test Suite: `npm test`
32
- - CLI Help: `node mcp/index.js --help`
33
- - ⚠️ Warning: Do not run `npm start` or `node mcp/index.js` without subcommands interactively (it is a stdio JSON-RPC server).
package/mcp_config.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "agy-context-saver": {
4
- "command": "node",
5
- "args": ["mcp/index.js"]
6
- }
7
- }
8
- }