instar 1.2.31 → 1.2.33
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/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +102 -3
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +6 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/SessionManager.d.ts +7 -0
- package/dist/core/SessionManager.d.ts.map +1 -1
- package/dist/core/SessionManager.js +23 -0
- package/dist/core/SessionManager.js.map +1 -1
- package/dist/core/types.d.ts +42 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/monitoring/CompactionSentinel.d.ts +9 -0
- package/dist/monitoring/CompactionSentinel.d.ts.map +1 -1
- package/dist/monitoring/CompactionSentinel.js +9 -0
- package/dist/monitoring/CompactionSentinel.js.map +1 -1
- package/dist/monitoring/PresenceProxy.d.ts +9 -0
- package/dist/monitoring/PresenceProxy.d.ts.map +1 -1
- package/dist/monitoring/PresenceProxy.js +9 -0
- package/dist/monitoring/PresenceProxy.js.map +1 -1
- package/dist/monitoring/RateLimitSentinel.d.ts +140 -0
- package/dist/monitoring/RateLimitSentinel.d.ts.map +1 -0
- package/dist/monitoring/RateLimitSentinel.js +308 -0
- package/dist/monitoring/RateLimitSentinel.js.map +1 -0
- package/dist/monitoring/SessionActivitySentinel.d.ts +16 -0
- package/dist/monitoring/SessionActivitySentinel.d.ts.map +1 -1
- package/dist/monitoring/SessionActivitySentinel.js +18 -0
- package/dist/monitoring/SessionActivitySentinel.js.map +1 -1
- package/dist/monitoring/SessionWatchdog.d.ts +11 -0
- package/dist/monitoring/SessionWatchdog.d.ts.map +1 -1
- package/dist/monitoring/SessionWatchdog.js +47 -0
- package/dist/monitoring/SessionWatchdog.js.map +1 -1
- package/dist/monitoring/rateLimitDetection.d.ts +45 -0
- package/dist/monitoring/rateLimitDetection.d.ts.map +1 -0
- package/dist/monitoring/rateLimitDetection.js +71 -0
- package/dist/monitoring/rateLimitDetection.js.map +1 -0
- package/dist/server/AgentServer.d.ts +1 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +1 -0
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/CapabilityIndex.d.ts.map +1 -1
- package/dist/server/CapabilityIndex.js +1 -0
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/routes.d.ts +1 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +24 -0
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +48 -48
- package/upgrades/1.2.29.md +24 -0
- package/upgrades/1.2.32.md +37 -0
- package/upgrades/1.2.33.md +57 -0
- package/upgrades/side-effects/feat-periodic-sentinel-scan.md +65 -0
- package/upgrades/side-effects/rate-limit-internal-prefix.md +41 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Side-Effects Review — `/rate-limit` registered in `INTERNAL_PREFIXES`
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `rate-limit-internal-prefix`
|
|
4
|
+
**Date:** 2026-05-22
|
|
5
|
+
**Author:** echo
|
|
6
|
+
**Trigger:** CI shard 1/4 (Node 20 + 22) deterministic failure in `tests/unit/capabilities-discoverability.test.ts:122` — the discoverability lint requires every route prefix in `routes.ts` to be either claimed by `CAPABILITY_INDEX` (agent-discoverable) or allowlisted in `INTERNAL_PREFIXES` (intentionally hidden). My PR added `GET /rate-limit/status` to `routes.ts` but did not classify the new `rate-limit` prefix.
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
One-line addition to `INTERNAL_PREFIXES` in `src/server/CapabilityIndex.ts`:
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
{ prefix: 'rate-limit', reason: 'operator-only rate-limit-sentinel observability — agent-facing surface is the sentinel’s own notices' },
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
This matches the exact pattern of five sibling sentinel/observability prefixes already in `INTERNAL_PREFIXES`:
|
|
17
|
+
- `quota` — operator-only quota observability
|
|
18
|
+
- `watchdog` — operator-only watchdog state
|
|
19
|
+
- `prompt-gate` — operator-only prompt-gate observability
|
|
20
|
+
- `delivery-queue` — operator-only relay queue observability
|
|
21
|
+
- `scope-coherence` — operator-only scope-coherence observability
|
|
22
|
+
|
|
23
|
+
## Decision-point inventory
|
|
24
|
+
|
|
25
|
+
**Choice:** `INTERNAL_PREFIXES` vs. `CAPABILITY_INDEX`.
|
|
26
|
+
|
|
27
|
+
Picked `INTERNAL_PREFIXES`. Reasoning: `GET /rate-limit/status` is read-only observability with no agent-facing action. The agent-facing surface of the rate-limit feature is the sentinel's **proactive** Telegram notices ("backing off", "still throttled", "back online", "still can't get through"). An agent doesn't poll `/rate-limit/status` — the sentinel pushes information to the user. Every sibling sentinel observability route makes the same choice for the same reason.
|
|
28
|
+
|
|
29
|
+
## 1–7. Analysis
|
|
30
|
+
|
|
31
|
+
1. **Over-block.** Hiding `/rate-limit/status` from `/capabilities` discovery — could that suppress a real agent capability? No. The route returns status data only; there's no agent action to invoke. The capability the agent has is "the sentinel will message me when a throttle hits"; that's surfaced through the sentinel's notifications, not through a route the agent reads.
|
|
32
|
+
2. **Under-block.** Could marking it internal silently swallow a future agent-facing route under the same prefix? `/rate-limit/*` is one operator-only route today. If a future change adds a genuinely agent-facing `/rate-limit/<action>`, that change would need to either split the prefix or move the entry to `CAPABILITY_INDEX` — and the discoverability lint will catch it because every new route is enumerated and re-classified.
|
|
33
|
+
3. **Level-of-abstraction fit.** The deny-allowlist (`INTERNAL_PREFIXES`) is exactly the layer the lint reads. No other layer would fix the lint.
|
|
34
|
+
4. **Signal-vs-authority compliance.** This is a classification (signal), not a behavioral gate (authority). The route still behaves identically. The change shapes what `/capabilities` includes; nothing else.
|
|
35
|
+
5. **Interactions.** Zero coupling to other allowlist entries. The lint operates per-prefix; adding one entry can't affect the classification of another.
|
|
36
|
+
6. **Rollback cost.** Trivial — one-line removal. The route would then surface as unclassified and the lint would block again, signalling the rollback to whoever ran it.
|
|
37
|
+
7. **Test coverage.** Covered by the existing 85-test `capabilities-discoverability.test.ts` suite, which dynamically generates one test per route prefix. The lint that caught this on CI is the same lint that now passes for `rate-limit`.
|
|
38
|
+
|
|
39
|
+
## Rollback
|
|
40
|
+
|
|
41
|
+
Remove the single line from `INTERNAL_PREFIXES` in `src/server/CapabilityIndex.ts`. CI will immediately re-fail with the same error message that triggered this fix.
|