instar 0.9.11 → 0.9.13

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.
Files changed (53) hide show
  1. package/dist/commands/init.d.ts.map +1 -1
  2. package/dist/commands/init.js +78 -0
  3. package/dist/commands/init.js.map +1 -1
  4. package/dist/commands/server.d.ts.map +1 -1
  5. package/dist/commands/server.js +86 -7
  6. package/dist/commands/server.js.map +1 -1
  7. package/dist/core/CanonicalState.d.ts +132 -0
  8. package/dist/core/CanonicalState.d.ts.map +1 -0
  9. package/dist/core/CanonicalState.js +297 -0
  10. package/dist/core/CanonicalState.js.map +1 -0
  11. package/dist/core/CoherenceGate.d.ts +122 -0
  12. package/dist/core/CoherenceGate.d.ts.map +1 -0
  13. package/dist/core/CoherenceGate.js +347 -0
  14. package/dist/core/CoherenceGate.js.map +1 -0
  15. package/dist/core/ContextHierarchy.d.ts +100 -0
  16. package/dist/core/ContextHierarchy.d.ts.map +1 -0
  17. package/dist/core/ContextHierarchy.js +454 -0
  18. package/dist/core/ContextHierarchy.js.map +1 -0
  19. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  20. package/dist/core/PostUpdateMigrator.js +140 -0
  21. package/dist/core/PostUpdateMigrator.js.map +1 -1
  22. package/dist/core/ProjectMapper.d.ts +97 -0
  23. package/dist/core/ProjectMapper.d.ts.map +1 -0
  24. package/dist/core/ProjectMapper.js +364 -0
  25. package/dist/core/ProjectMapper.js.map +1 -0
  26. package/dist/index.d.ts +8 -0
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +4 -0
  29. package/dist/index.js.map +1 -1
  30. package/dist/messaging/TelegramAdapter.d.ts +5 -0
  31. package/dist/messaging/TelegramAdapter.d.ts.map +1 -1
  32. package/dist/messaging/TelegramAdapter.js +7 -0
  33. package/dist/messaging/TelegramAdapter.js.map +1 -1
  34. package/dist/monitoring/StallTriageNurse.d.ts.map +1 -1
  35. package/dist/monitoring/StallTriageNurse.js +77 -13
  36. package/dist/monitoring/StallTriageNurse.js.map +1 -1
  37. package/dist/scaffold/templates.d.ts.map +1 -1
  38. package/dist/scaffold/templates.js +10 -0
  39. package/dist/scaffold/templates.js.map +1 -1
  40. package/dist/scheduler/JobLoader.d.ts.map +1 -1
  41. package/dist/scheduler/JobLoader.js +1 -0
  42. package/dist/scheduler/JobLoader.js.map +1 -1
  43. package/dist/server/AgentServer.d.ts +4 -0
  44. package/dist/server/AgentServer.d.ts.map +1 -1
  45. package/dist/server/AgentServer.js +4 -0
  46. package/dist/server/AgentServer.js.map +1 -1
  47. package/dist/server/routes.d.ts +8 -0
  48. package/dist/server/routes.d.ts.map +1 -1
  49. package/dist/server/routes.js +228 -0
  50. package/dist/server/routes.js.map +1 -1
  51. package/package.json +1 -1
  52. package/upgrades/0.9.12.md +42 -0
  53. package/upgrades/0.9.13.md +55 -0
@@ -0,0 +1,55 @@
1
+ # Upgrade Guide: Instar (latest)
2
+
3
+ ## What Changed
4
+
5
+ ### Stall Triage Nurse — Full Recovery Pipeline
6
+
7
+ The Stall Triage Nurse has been upgraded from a basic nudge-and-hope system to a comprehensive recovery pipeline that keeps the user informed at every step.
8
+
9
+ #### Intelligence Provider Wiring (Fixed)
10
+
11
+ Previously, the nurse was constructed without an intelligence provider, causing LLM diagnosis to always fail and fall back to a generic nudge. Now it properly receives an Anthropic API provider (preferred) or Claude CLI provider (fallback), enabling real LLM-powered diagnosis of stuck sessions.
12
+
13
+ #### Smarter Heuristic Fallback
14
+
15
+ When LLM diagnosis is unavailable, instead of always defaulting to nudge (the weakest action), the nurse now uses heuristics:
16
+ - Dead/missing session → immediate restart
17
+ - Error indicators in terminal output → restart
18
+ - 5+ minutes unresponsive → interrupt (skips nudge)
19
+ - Otherwise → nudge
20
+
21
+ #### Stricter Verification
22
+
23
+ Previously, any tmux output change after an action was treated as "recovered" — even just echoing a newline. Now the nurse checks for actual work indicators (tool calls, telegram-reply, significant output growth). A session that echoes a prompt line after a nudge but doesn't process the message is correctly identified as still stuck.
24
+
25
+ #### Force-Restart as Last Resort
26
+
27
+ After exhausting all escalation attempts, if `restart` wasn't already tried, the nurse now automatically restarts the session. Previously it would give up and the user would have to manually intervene.
28
+
29
+ #### User-Facing Status Messages Throughout
30
+
31
+ Every escalation step now sends a status message to the user:
32
+ - "That didn't work. Escalating — sending interrupt signal..."
33
+ - "That didn't work. Escalating — killing stuck process..."
34
+ - "Recovery attempts exhausted. Restarting session with full conversation context..."
35
+ - If all else fails: "I wasn't able to recover automatically. You can send a new message or use /restart."
36
+
37
+ #### Stall Tracking Cleanup (Fixed)
38
+
39
+ The `clearStallForTopic` dependency was a no-op — an empty function with a comment saying "will clear naturally." Now it properly calls `TelegramAdapter.clearStallTracking()`, ensuring stall tracking is cleaned up after recovery.
40
+
41
+ ## What to Tell Your User
42
+
43
+ - **Automatic recovery with updates**: "When my session gets stuck, I'll now automatically try progressively stronger recovery actions — from nudging to interrupting to restarting. You'll see status messages explaining what's happening at each step. In most cases, you won't need to do anything."
44
+ - **Smarter diagnosis**: "I can now diagnose why a session is stuck and choose the right recovery action, instead of just trying a nudge and hoping for the best."
45
+
46
+ ## Summary of New Capabilities
47
+
48
+ | Capability | How to Use |
49
+ |-----------|-----------|
50
+ | LLM-powered diagnosis | Automatic — nurse now has access to intelligence provider |
51
+ | Heuristic fallback | Automatic — when LLM unavailable, uses terminal output analysis |
52
+ | Escalation status messages | Automatic — user sees each recovery step in Telegram |
53
+ | Force-restart safety net | Automatic — restarts session if all else fails |
54
+ | Stricter verification | Automatic — checks for real work activity, not just any output change |
55
+ | Stall tracking cleanup | Automatic — properly clears pending message tracking after recovery |