instar 0.27.2 → 0.28.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.
Files changed (59) hide show
  1. package/.claude/skills/build/SKILL.md +268 -0
  2. package/README.md +2 -1
  3. package/dashboard/index.html +501 -491
  4. package/dist/cli.js +81 -0
  5. package/dist/cli.js.map +1 -1
  6. package/dist/commands/init.d.ts.map +1 -1
  7. package/dist/commands/init.js +16 -9
  8. package/dist/commands/init.js.map +1 -1
  9. package/dist/commands/listener.d.ts +46 -0
  10. package/dist/commands/listener.d.ts.map +1 -0
  11. package/dist/commands/listener.js +467 -0
  12. package/dist/commands/listener.js.map +1 -0
  13. package/dist/commands/server.d.ts.map +1 -1
  14. package/dist/commands/server.js +101 -3
  15. package/dist/commands/server.js.map +1 -1
  16. package/dist/commands/setup.d.ts.map +1 -1
  17. package/dist/commands/setup.js +84 -21
  18. package/dist/commands/setup.js.map +1 -1
  19. package/dist/core/AgentRegistry.d.ts.map +1 -1
  20. package/dist/core/AgentRegistry.js +30 -2
  21. package/dist/core/AgentRegistry.js.map +1 -1
  22. package/dist/core/PostUpdateMigrator.d.ts +2 -1
  23. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  24. package/dist/core/PostUpdateMigrator.js +29 -28
  25. package/dist/core/PostUpdateMigrator.js.map +1 -1
  26. package/dist/core/types.d.ts +32 -0
  27. package/dist/core/types.d.ts.map +1 -1
  28. package/dist/lifeline/TelegramLifeline.d.ts.map +1 -1
  29. package/dist/lifeline/TelegramLifeline.js +10 -2
  30. package/dist/lifeline/TelegramLifeline.js.map +1 -1
  31. package/dist/server/routes.d.ts.map +1 -1
  32. package/dist/server/routes.js +87 -0
  33. package/dist/server/routes.js.map +1 -1
  34. package/dist/threadline/PipeSessionSpawner.d.ts +123 -0
  35. package/dist/threadline/PipeSessionSpawner.d.ts.map +1 -0
  36. package/dist/threadline/PipeSessionSpawner.js +343 -0
  37. package/dist/threadline/PipeSessionSpawner.js.map +1 -0
  38. package/dist/threadline/ThreadResumeMap.d.ts +22 -0
  39. package/dist/threadline/ThreadResumeMap.d.ts.map +1 -1
  40. package/dist/threadline/ThreadResumeMap.js +37 -0
  41. package/dist/threadline/ThreadResumeMap.js.map +1 -1
  42. package/dist/threadline/ThreadlineBootstrap.d.ts.map +1 -1
  43. package/dist/threadline/ThreadlineBootstrap.js +155 -72
  44. package/dist/threadline/ThreadlineBootstrap.js.map +1 -1
  45. package/dist/threadline/WakeSocketServer.d.ts +49 -0
  46. package/dist/threadline/WakeSocketServer.d.ts.map +1 -0
  47. package/dist/threadline/WakeSocketServer.js +115 -0
  48. package/dist/threadline/WakeSocketServer.js.map +1 -0
  49. package/dist/threadline/listener-daemon.d.ts +94 -0
  50. package/dist/threadline/listener-daemon.d.ts.map +1 -0
  51. package/dist/threadline/listener-daemon.js +550 -0
  52. package/dist/threadline/listener-daemon.js.map +1 -0
  53. package/package.json +2 -1
  54. package/src/data/builtin-manifest.json +91 -91
  55. package/upgrades/0.28.0.md +54 -0
  56. package/upgrades/NEXT.md +35 -0
  57. /package/.claude/skills/autonomous/{skill.md → SKILL.md} +0 -0
  58. /package/.claude/skills/secret-setup/{skill.md → SKILL.md} +0 -0
  59. /package/.claude/skills/setup-wizard/{skill.md → SKILL.md} +0 -0
@@ -0,0 +1,54 @@
1
+ # Upgrade Guide — v0.28.0
2
+
3
+ <!-- bump: minor -->
4
+ <!-- Valid values: patch, minor, major -->
5
+ <!-- patch = bug fixes, refactors, test additions, doc updates -->
6
+ <!-- minor = new features, new APIs, new capabilities (backwards-compatible) -->
7
+ <!-- major = breaking changes to existing APIs or behavior -->
8
+
9
+ ## What Changed
10
+
11
+ **Persistent Listener Daemon** — A standalone process that maintains a permanent WebSocket connection to the Threadline relay, independent of the agent server. Four phases shipped together:
12
+
13
+ 1. **Listener Daemon (Phase 1)**: Standalone Node.js daemon maintains relay WebSocket connection. Survives server restarts. Writes HMAC-signed entries to an inbox file. Signals the server via Unix domain socket for instant pickup. Managed via launchd on macOS with auto-restart on crash.
14
+
15
+ 2. **Pipe-Mode Sessions (Phase 2)**: Lightweight sessions for simple threadline queries. Uses a Haiku-class LLM classifier to distinguish "task" messages (which need full interactive sessions) from "query" messages (which can be answered and auto-exit). Injection-hardened prompt template with XML data tags. Read-only tool access with path grant-list.
16
+
17
+ 3. **Fast Failover (Phase 3)**: Failover time drops from 15 minutes to under 30 seconds. The daemon subscribes to relay presence changes and signals the server immediately when a peer agent disconnects.
18
+
19
+ 4. **Cross-Machine Session Sync (Phase 4)**: When failover occurs, active conversation threads can migrate between machines. ThreadResumeMap entries carry machine origin metadata so the new machine can resume sessions with the correct Claude session UUID.
20
+
21
+ ### New CLI commands:
22
+
23
+ Nine new commands under the listener subcommand for daemon lifecycle management, health checking, launchd integration, and data cleanup.
24
+
25
+ ### New API endpoints:
26
+
27
+ Three new authenticated endpoints for daemon health, metrics, and restart signaling.
28
+
29
+ ### Server-daemon coordination:
30
+
31
+ The server detects whether a listener daemon is running on boot. If so, it defers relay connection to the daemon (no displacement conflicts). Three-tier detection: config setting, PID file, recent health file.
32
+
33
+ ## What to Tell Your User
34
+
35
+ - **Always-on relay connection**: "Your agent now has a dedicated process that keeps the Threadline relay connection alive at all times, even when the server restarts. You will never miss a message from another agent because of a restart or update."
36
+
37
+ - **Faster cross-machine failover**: "If you run your agent on two machines, failover from one to the other now happens in under 30 seconds instead of 15 minutes. The relay detects when a machine goes offline and notifies the standby immediately."
38
+
39
+ - **Lightweight responses**: "Simple questions from other agents now get answered faster through pipe-mode sessions that start, respond, and clean up automatically. Complex tasks still get full interactive sessions."
40
+
41
+ - **Easy setup**: "Run the listener doctor command to check prerequisites, then start the listener to activate it. For auto-start on login, use the listener install command to set up launchd."
42
+
43
+ ## Summary of New Capabilities
44
+
45
+ | Capability | How to Use |
46
+ |-----------|-----------|
47
+ | Listener daemon | Start with the listener start command, check with listener status |
48
+ | Health monitoring | Listener doctor for pre-flight, listener status for runtime |
49
+ | Auto-start on login | Listener install creates a launchd plist (macOS) |
50
+ | Pipe-mode sessions | Automatic for simple queries from trusted agents (IQS 70 or above) |
51
+ | Fast failover | Automatic when daemon subscribes to relay presence changes |
52
+ | Cross-machine resume | Automatic during failover via ThreadResumeMap migration |
53
+ | Data cleanup | Listener purge removes all listener data (GDPR compliance) |
54
+ | Daemon log viewing | Listener logs shows daemon output with filtering options |
@@ -0,0 +1,35 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- bump: patch -->
4
+ <!-- Valid values: patch, minor, major -->
5
+ <!-- patch = bug fixes, refactors, test additions, doc updates -->
6
+ <!-- minor = new features, new APIs, new capabilities (backwards-compatible) -->
7
+ <!-- major = breaking changes to existing APIs or behavior -->
8
+
9
+ ## What Changed
10
+
11
+ <!-- Describe what changed technically. What new features, APIs, behavioral changes? -->
12
+ <!-- Write this for the AGENT — they need to understand the system deeply. -->
13
+
14
+ ## What to Tell Your User
15
+
16
+ <!-- Write talking points the agent should relay to their user. -->
17
+ <!-- This should be warm, conversational, user-facing — not a changelog. -->
18
+ <!-- Focus on what THEY can now do, not internal plumbing. -->
19
+ <!-- -->
20
+ <!-- PROHIBITED in this section (will fail validation): -->
21
+ <!-- camelCase config keys: silentReject, maxRetries, telegramNotify -->
22
+ <!-- Inline code backtick references like silentReject: false -->
23
+ <!-- Fenced code blocks -->
24
+ <!-- Instructions to edit files or run commands -->
25
+ <!-- -->
26
+ <!-- CORRECT style: "I can turn that on for you" not "set X to false" -->
27
+ <!-- The agent relays this to their user — keep it human. -->
28
+
29
+ - **[Feature name]**: "[Brief, friendly description of what this means for the user]"
30
+
31
+ ## Summary of New Capabilities
32
+
33
+ | Capability | How to Use |
34
+ |-----------|-----------|
35
+ | [Capability] | [Endpoint, command, or "automatic"] |