agy-context-saver 1.5.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 +42 -0
- package/README.md +40 -2
- package/assets/logo.svg +51 -0
- package/install.ps1 +86 -42
- package/mcp/index.js +174 -30
- package/package.json +18 -2
- package/plugin.json +9 -2
- package/rules/AGENTS.md +9 -4
- package/scripts/execution-guard-hook.mjs +174 -22
- package/scripts/install-register.mjs +177 -63
- package/scripts/provision-rtk.mjs +67 -14
- package/scripts/release-preflight.mjs +147 -0
- package/skills/context-governance/SKILL.md +26 -50
|
@@ -43,11 +43,13 @@ Performs streaming inspection of `transcript.jsonl` to calculate turn budgets, s
|
|
|
43
43
|
- `transcriptPath` (string, required): Absolute path to `transcript.jsonl`.
|
|
44
44
|
|
|
45
45
|
### 2. `subagent_brief`
|
|
46
|
-
Generates a strictly formatted, scope-isolated prompt for delegating research or debugging to a subagent (`invoke_subagent`).
|
|
46
|
+
Generates a strictly formatted, scope-isolated prompt for delegating research or debugging to a subagent (`invoke_subagent`). Enforces the **Pointer-Over-Wire (POW)** protocol: deliverables exceeding 1 KB must be written to workspace scratch files (e.g. `scratch/<task>_findings.md`), transmitting only an executive summary, scoreboard, and clickable `file:///` link in-band.
|
|
47
47
|
- **Parameters**:
|
|
48
48
|
- `objective` (string, required): Core investigative or implementation goal.
|
|
49
|
+
- `role` (string, optional): Subagent role / title.
|
|
49
50
|
- `scopeFiles` (array of strings, optional): Specific file targets.
|
|
50
51
|
- `expectedDeliverable` (string, optional): Expected concise synthesis format.
|
|
52
|
+
- `subagents` (array, optional): Batch of subagent objects for multi-role delegation.
|
|
51
53
|
|
|
52
54
|
### 3. `read_transcript`
|
|
53
55
|
Quickly reads recent conversation turns from an Antigravity transcript in clean Markdown format with zero JSON noise.
|
|
@@ -57,11 +59,13 @@ Quickly reads recent conversation turns from an Antigravity transcript in clean
|
|
|
57
59
|
- `lastTurns` (number, default: 3): Number of turns to display.
|
|
58
60
|
|
|
59
61
|
### 4. `query_transcript`
|
|
60
|
-
Granular query and forensic filtering engine for transcripts with keyword/regex search and
|
|
62
|
+
Granular query and forensic filtering engine for transcripts with keyword/regex search, auto-dereferencing of truncated payloads, and surgical step projection.
|
|
61
63
|
- **Parameters**:
|
|
62
64
|
- `conversationId` (string, required): Conversation UUID or path.
|
|
63
65
|
- `query` (string, optional): Search keyword or regex.
|
|
64
66
|
- `roles` (array, default: ["user", "assistant"]): Filter by role.
|
|
67
|
+
- `stepIndex` (number, optional): Specific step to dereference from `transcript_full.jsonl`.
|
|
68
|
+
- `field` (string, optional): Field projection (`"content"`, `"thinking"`, `"tool_calls"`).
|
|
65
69
|
|
|
66
70
|
### 5. `get_installation_status`
|
|
67
71
|
Audits the Antigravity integration layers (Native Plugin Link, Lifecycle Hook in `hooks.json`, MCP Server in `mcp_config.json`, Tool Schemas, and RTK binary/hook).
|
|
@@ -73,58 +77,30 @@ Re-verifies, repairs, and synchronizes the installation and tool schemas in ~25m
|
|
|
73
77
|
|
|
74
78
|
---
|
|
75
79
|
|
|
76
|
-
##
|
|
80
|
+
## 3-Layer Governance Invariants
|
|
77
81
|
|
|
78
|
-
1. **Reactive
|
|
79
|
-
- Never busy-wait on `manage_task(Action='status')` or
|
|
82
|
+
1. **Layer 1: Reactive Lifecycle & Polling Immunity**:
|
|
83
|
+
- Never busy-wait on `manage_task(Action='status')` or rapid polling timers.
|
|
80
84
|
- Stop calling tools and yield the turn for native Reactive Wakeup (`<SYSTEM_MESSAGE>`).
|
|
81
|
-
-
|
|
85
|
+
- Diagnostic status inspections follow exponential backoff: $\min(600, \text{round}(30 \times 2.5^{\text{pollCount}-1}))$.
|
|
86
|
+
- 5 cumulative denials trigger the `force_ask` circuit breaker.
|
|
87
|
+
- For operations $>15\text{s}$, schedule coordinated watchdog timers: `schedule(DurationSeconds=45, TimerCondition="task-X")` and output a structured Pre-Yield Status Card.
|
|
82
88
|
|
|
83
|
-
2. **
|
|
84
|
-
-
|
|
89
|
+
2. **Layer 2: Transparent CLI & Codebase Streamlining**:
|
|
90
|
+
- Shell commands transparently rewrite via RTK (`rtk git`, `rtk pytest`, `rtk cargo`, etc.).
|
|
91
|
+
- Codebase inspection is hard-routed to `rtk read`, `rtk find`, and `rtk rg "<pattern>" .`.
|
|
92
|
+
- Direct access to `.system_generated/` is strictly denied; use `read_transcript` and `query_transcript`.
|
|
85
93
|
|
|
86
|
-
3. **
|
|
87
|
-
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
- Mutating benchmark definitions, prompt templates, or evaluators requires explicit user confirmation.
|
|
94
|
+
3. **Layer 3: Orchestration, Delegation & Pointer-Over-Wire (POW)**:
|
|
95
|
+
- Synchronous wait window expands to 10,000ms to eliminate unnecessary detachment.
|
|
96
|
+
- Heavy exploratory work is delegated to subagents (`invoke_subagent`).
|
|
97
|
+
- Subagents strictly follow Pointer-Over-Wire: write reports $>1\text{ KB}$ to disk; transmit only summary, scoreboard, and clickable file link.
|
|
91
98
|
|
|
92
99
|
---
|
|
93
100
|
|
|
94
|
-
##
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
npm run status
|
|
101
|
-
# or
|
|
102
|
-
node mcp/index.js status
|
|
103
|
-
```
|
|
104
|
-
*Expected*: Reports `HEALTHY & ACTIVE 🛡️` across plugin link, hook, MCP server, schemas, and RTK.
|
|
105
|
-
|
|
106
|
-
2. **Run Full Test Suite**:
|
|
107
|
-
```bash
|
|
108
|
-
npm test
|
|
109
|
-
```
|
|
110
|
-
*Expected*: All 5 suites pass (Unit hook tests, MCP protocol tests, E2E probes, live system validation, lifecycle rollback).
|
|
111
|
-
|
|
112
|
-
3. **Run Targeted Suite Tests**:
|
|
113
|
-
- Governance Hook: `node tests/test-hook.mjs`
|
|
114
|
-
- MCP Protocol & JSON-RPC: `node tests/test-mcp.mjs`
|
|
115
|
-
- E2E Probes: `node tests/test-e2e-probes.mjs`
|
|
116
|
-
- Live System Checks: `node tests/test-installed-verification.mjs`
|
|
117
|
-
- Lifecycle & Rollback: `node tests/test-lifecycle-rollback.mjs`
|
|
118
|
-
|
|
119
|
-
4. **Verify MCP Tools Inside Antigravity**:
|
|
120
|
-
- `get_installation_status`: Call with `{}` to audit all 4 layers + RTK.
|
|
121
|
-
- `check_context_health`: Call with `{ "transcriptPath": "<path-to-transcript.jsonl>" }`.
|
|
122
|
-
- `read_transcript`: Call with `{ "conversationId": "<uuid>", "lastTurns": 3, "mode": "compact" }`.
|
|
123
|
-
- `query_transcript`: Call with `{ "conversationId": "<uuid>", "query": "<term>", "summaryOnly": true }`.
|
|
124
|
-
- `subagent_brief`: Call with `{ "objective": "<goal>", "scopeFiles": ["..."] }`.
|
|
125
|
-
|
|
126
|
-
5. **Operational Guardrails**:
|
|
127
|
-
- ❌ Never launch `npm start` or `node mcp/index.js` interactively without stdin redirection (it is a stdio JSON-RPC daemon).
|
|
128
|
-
- ❌ Never loop on `manage_task(Action='status')` or use task watchdog timers (circuit breaker freezes at 5 denials).
|
|
129
|
-
- ❌ Never run `npm run uninstall` as an isolated test (always follow immediately with `npm run setup`).
|
|
130
|
-
- ❌ On Windows, never run `rtk rg` without an explicit directory (e.g. use `rtk rg "pattern" .`).
|
|
101
|
+
## Quick Verification & Health Check
|
|
102
|
+
|
|
103
|
+
To verify installation health and run test validation:
|
|
104
|
+
- **Health Check**: `npm run status` (verifies plugin link, hook, MCP config, schemas, RTK).
|
|
105
|
+
- **Test Suite**: `npm test` (runs all 8 test suites).
|
|
106
|
+
- Detailed verification playbooks and release steps reside in `docs/publishing.md`.
|