instar 1.3.520 → 1.3.522
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 +119 -2
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +32 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/ReplicatedRecordEnvelope.d.ts +380 -0
- package/dist/core/ReplicatedRecordEnvelope.d.ts.map +1 -0
- package/dist/core/ReplicatedRecordEnvelope.js +464 -0
- package/dist/core/ReplicatedRecordEnvelope.js.map +1 -0
- package/dist/core/devGatedFeatures.d.ts.map +1 -1
- package/dist/core/devGatedFeatures.js +6 -0
- package/dist/core/devGatedFeatures.js.map +1 -1
- package/dist/core/stateSyncConfig.d.ts +94 -0
- package/dist/core/stateSyncConfig.d.ts.map +1 -0
- package/dist/core/stateSyncConfig.js +126 -0
- package/dist/core/stateSyncConfig.js.map +1 -0
- package/dist/core/types.d.ts +76 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/monitoring/OrphanedWorkSentinel.d.ts +148 -0
- package/dist/monitoring/OrphanedWorkSentinel.d.ts.map +1 -0
- package/dist/monitoring/OrphanedWorkSentinel.js +177 -0
- package/dist/monitoring/OrphanedWorkSentinel.js.map +1 -0
- package/dist/monitoring/guardManifest.d.ts.map +1 -1
- package/dist/monitoring/guardManifest.js +14 -0
- package/dist/monitoring/guardManifest.js.map +1 -1
- package/dist/monitoring/orphanedWorkGit.d.ts +30 -0
- package/dist/monitoring/orphanedWorkGit.d.ts.map +1 -0
- package/dist/monitoring/orphanedWorkGit.js +124 -0
- package/dist/monitoring/orphanedWorkGit.js.map +1 -0
- package/dist/server/AgentServer.d.ts +3 -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 +3 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +11 -0
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +47 -47
- package/upgrades/1.3.521.md +69 -0
- package/upgrades/1.3.522.md +25 -0
- package/upgrades/side-effects/multi-machine-replicated-store-foundation-step2-journal-kind.md +104 -0
- package/upgrades/side-effects/orphaned-work-sentinel.md +40 -0
- package/upgrades/1.3.520.md +0 -50
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Side-effects review — OrphanedWorkSentinel (silent-uncommitted-death backstop)
|
|
2
|
+
|
|
3
|
+
## 1. What changed
|
|
4
|
+
|
|
5
|
+
A new dark, dev-gated, signal-only monitoring sentinel that detects agent worktrees with uncommitted work whose owning session is dead + settled, records them durably, and raises ONE deduped agent-health attention item. Optional off-by-default non-destructive preservation patch.
|
|
6
|
+
|
|
7
|
+
- `src/monitoring/OrphanedWorkSentinel.ts` — class + pure classifier + config.
|
|
8
|
+
- `src/monitoring/orphanedWorkGit.ts` — git/fs-backed deps (reuses `agentWorktreeGit` helpers).
|
|
9
|
+
- Config type (`src/core/types.ts`), default with `enabled` OMITTED (`src/config/ConfigDefaults.ts`).
|
|
10
|
+
- Dev-gate registration (`src/core/devGatedFeatures.ts`).
|
|
11
|
+
- Server wiring (`src/commands/server.ts`), route ctx + `GET /orphaned-work` (`src/server/AgentServer.ts`, `src/server/routes.ts`).
|
|
12
|
+
- Route classification in `src/server/CapabilityIndex.ts` (INTERNAL — observability the agent reads).
|
|
13
|
+
- 3-tier tests: unit (classifier + real-git deps), integration (route), e2e (feature alive).
|
|
14
|
+
|
|
15
|
+
## 2. Blast radius
|
|
16
|
+
|
|
17
|
+
Read-only on the fleet (dark; route 503s). On a dev agent: a background timer runs one git/lsof scan per `scanIntervalMs` (default 10 min) over the agent's `.worktrees/`, records to `state/orphaned-work.jsonl`, and may raise ONE agent-health attention item per stranded worktree episode (deduped on path+content-signature; the agent-health lane routes to the calm "🩺 Agent Health" topic — never a per-item topic flood).
|
|
18
|
+
|
|
19
|
+
## 3. Destructive actions
|
|
20
|
+
|
|
21
|
+
None by default. The only mutation is the optional `preserveWork` sub-flag (off for everyone): it writes a patch FILE under the state dir from `git diff HEAD` (read-only) + the untracked file list. It never touches the worktree, its index, or any ref, and never deletes anything.
|
|
22
|
+
|
|
23
|
+
## 4. Reversibility
|
|
24
|
+
|
|
25
|
+
Fully reversible: it ships dark; disabling the dev-gate (or `enabled: false`) stops it. No data migration, no schema change. The durable jsonl + patch files are additive and bounded.
|
|
26
|
+
|
|
27
|
+
## 5. Failure modes
|
|
28
|
+
|
|
29
|
+
- `lsof`/git read failure → empty/clean signal → SKIP (never a false orphan). Recording/attention are best-effort (wrapped) and never throw the scan pass. Server wiring is wrapped in try/catch (non-fatal). Episode dedupe prevents re-alert spam; `maxFlagsPerPass` bounds blast radius.
|
|
30
|
+
|
|
31
|
+
## 6. Operator-surface quality
|
|
32
|
+
|
|
33
|
+
N/A — this change touches NO operator surface (no dashboard renderer/markup, no approval/grant/secret form). The only user-facing output is a plain-language agent-health attention item, authored in plain English ("a build died here with uncommitted changes — open the worktree to finish it, or discard"). No raw internals are surfaced to the user.
|
|
34
|
+
|
|
35
|
+
## 7. Standards
|
|
36
|
+
|
|
37
|
+
- Dev-agent dark-gate: `enabled` OMITTED + registered in `DEV_GATED_FEATURES` (lint + wiring test green).
|
|
38
|
+
- Migration Parity: default added to `ConfigDefaults.ts` → `applyDefaults` propagates to existing agents automatically.
|
|
39
|
+
- Testing Integrity: all 3 tiers + real-git wiring-integrity test.
|
|
40
|
+
- Capability discoverability: route prefix classified INTERNAL.
|
package/upgrades/1.3.520.md
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# Upgrade Guide — vNEXT
|
|
2
|
-
|
|
3
|
-
<!-- assembled-by: assemble-next-md -->
|
|
4
|
-
<!-- bump: minor -->
|
|
5
|
-
|
|
6
|
-
## What Changed
|
|
7
|
-
|
|
8
|
-
Two cohesive changes (topic 22367, CMT-1434):
|
|
9
|
-
|
|
10
|
-
1. **Mandates dashboard tab redesign.** The Mandates card now leads with the Grant
|
|
11
|
-
form as its primary, always-open block; Revoke is demoted to a quiet, collapsed
|
|
12
|
-
control beneath it. Raw JSON bounds, agent fingerprints, and scope slugs are
|
|
13
|
-
replaced with a plain-language summary sentence; identifiers survive only on a
|
|
14
|
-
muted "For support" line. Existing grants read as plain English ("Adam Admin can
|
|
15
|
-
deploy to production until 9:37 PM — authorized by you"), and the decision-audit
|
|
16
|
-
table stacks into labelled rows at phone width so the reason column is never
|
|
17
|
-
truncated. Renderer + markup + CSS only — the mandate API, payloads, and
|
|
18
|
-
PIN-never-retained discipline are unchanged. Ships via `dashboard/` static
|
|
19
|
-
serving, so it reaches every agent through the normal update path.
|
|
20
|
-
|
|
21
|
-
2. **New constitutional standard: Operator-Surface Quality** (sibling to
|
|
22
|
-
Mobile-Complete Operator Actions) in `docs/STANDARDS-REGISTRY.md`. Where
|
|
23
|
-
Mobile-Complete asks "can the operator do this from a phone?", this asks "is it
|
|
24
|
-
actually good when they do?" — lead with the primary action, zero raw internals,
|
|
25
|
-
de-emphasized destructive actions, plain language, phone-width layout. It lands
|
|
26
|
-
with teeth: a new operator-surface-quality question in the instar-dev
|
|
27
|
-
side-effects review template, and a pre-commit gate
|
|
28
|
-
(`scripts/instar-dev-precommit.js`) that blocks any commit touching an operator
|
|
29
|
-
surface unless the review answers it. The standard names that gate, so the
|
|
30
|
-
Standards-Enforcement-Coverage audit classifies it as an enforced gate.
|
|
31
|
-
|
|
32
|
-
## What to Tell Your User
|
|
33
|
-
|
|
34
|
-
- **A cleaner Mandates screen on your phone**: "I gave the Mandates tab a real
|
|
35
|
-
overhaul. The action you actually came to do — granting someone permission — is
|
|
36
|
-
now front and centre, the risky Revoke button is tucked quietly out of the way,
|
|
37
|
-
and the screen reads in plain English instead of raw data. The history list also
|
|
38
|
-
finally fits your phone without cutting off the reason column."
|
|
39
|
-
- **A new quality bar for everything you touch**: "I also turned this into a
|
|
40
|
-
standing rule for myself: any screen you use to approve or decide something has to
|
|
41
|
-
be genuinely good to use on your phone, not just technically reachable. I added an
|
|
42
|
-
automatic check that holds me to it whenever I build one of those screens."
|
|
43
|
-
|
|
44
|
-
## Summary of New Capabilities
|
|
45
|
-
|
|
46
|
-
| Capability | How to Use |
|
|
47
|
-
|-----------|-----------|
|
|
48
|
-
| Redesigned Mandates tab (humanized, mobile-first) | Open the Mandates tab in the dashboard |
|
|
49
|
-
| Operator-Surface Quality standard | docs/STANDARDS-REGISTRY.md (constitution) |
|
|
50
|
-
| Operator-surface-quality pre-commit gate | automatic during instar-dev work |
|