instar 0.7.31 → 0.7.32

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 (2) hide show
  1. package/README.md +102 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -73,6 +73,11 @@ instar lifeline start # Start lifeline (supervises server, queues mess
73
73
  instar lifeline stop # Stop lifeline and server
74
74
  instar lifeline status # Check lifeline health
75
75
 
76
+ # Auto-start on login (macOS LaunchAgent / Linux systemd)
77
+ instar autostart install # Agent starts when you log in
78
+ instar autostart uninstall # Remove auto-start
79
+ instar autostart status # Check if auto-start is installed
80
+
76
81
  # Add capabilities
77
82
  instar add telegram --token BOT_TOKEN --chat-id CHAT_ID
78
83
  instar add email --credentials-file ./credentials.json [--token-file ./token.json]
@@ -91,12 +96,18 @@ instar feedback --type bug --title "Session timeout" --description "Details..."
91
96
  ## Highlights
92
97
 
93
98
  - **[Persistent Server](#persistent-server)** -- Express server in tmux. Runs 24/7, survives disconnects, auto-recovers.
99
+ - **[Lifeline](#lifeline)** -- Persistent Telegram supervisor that auto-recovers from crashes and queues messages during downtime.
100
+ - **[Auto-Start on Login](#auto-start-on-login)** -- macOS LaunchAgent / Linux systemd service. Agent starts when your computer boots.
101
+ - **[AutoUpdater](#autoupdater)** -- Built-in update engine. Checks npm, applies updates, notifies via Telegram, self-restarts. No Claude session needed.
102
+ - **[AutoDispatcher](#autodispatcher)** -- Receives intelligence dispatches from Dawn. Lessons, strategies, and configuration applied automatically.
94
103
  - **[Job Scheduler](#job-scheduler)** -- Cron-based task execution with priority levels, model tiering, and quota awareness.
95
104
  - **[Identity System](#identity-that-survives-context-death)** -- AGENT.md + USER.md + MEMORY.md with hooks that enforce continuity across compaction.
96
105
  - **[Telegram Integration](#telegram-integration)** -- Two-way messaging. Each job gets its own topic. Your group becomes a living dashboard.
97
106
  - **[Relationship Tracking](#relationships-as-fundamental-infrastructure)** -- Cross-platform identity resolution, significance scoring, context injection.
98
107
  - **[Evolution System](#evolution-system)** -- Four subsystems for structured growth: proposal queue, learning registry, gap tracking, and commitment follow-through.
99
108
  - **[Self-Evolution](#self-evolution)** -- The agent modifies its own jobs, hooks, skills, and infrastructure. It builds what it needs.
109
+ - **[Capability Discovery](#capability-discovery)** -- Agents know all their capabilities from the moment they start. Context-triggered feature suggestions.
110
+ - **[Innovation Detection](#innovation-detection)** -- Agents detect when user-built features could benefit all Instar agents and submit improvement feedback.
100
111
  - **[Behavioral Hooks](#behavioral-hooks)** -- Structural guardrails: identity injection, dangerous command guards, grounding before messaging.
101
112
  - **[Default Coherence Jobs](#default-coherence-jobs)** -- Health checks, reflection, relationship maintenance. A circadian rhythm out of the box.
102
113
  - **[Feedback Loop](#the-feedback-loop-a-rising-tide-lifts-all-ships)** -- Your agent reports issues, we fix them, every agent gets the update. A rising tide lifts all ships.
@@ -282,6 +293,76 @@ Two-way messaging via Telegram forum topics. Each topic maps to a Claude session
282
293
  - Sessions auto-respawn with conversation history when they expire
283
294
  - Every scheduled job gets its own topic -- your group becomes a **living dashboard**
284
295
 
296
+ ### Lifeline
297
+
298
+ The Lifeline is a persistent Telegram connection that supervises your agent's server. It runs outside the server process, so it can detect crashes and recover automatically.
299
+
300
+ - **Auto-recovery** -- If the server goes down, the Lifeline restarts it
301
+ - **Message queuing** -- Messages received during downtime are queued and delivered when the server comes back
302
+ - **First-boot greeting** -- Your agent greets you on Telegram in its own voice the first time it starts
303
+ - **Lifeline topic** -- Created during setup with a green icon, dedicated to agent health
304
+
305
+ ```bash
306
+ instar lifeline start # Start lifeline (supervises server, queues messages)
307
+ instar lifeline stop # Stop lifeline and server
308
+ instar lifeline status # Check lifeline health
309
+ ```
310
+
311
+ ### Auto-Start on Login
312
+
313
+ Your agent can start automatically when you log into your computer. The setup wizard offers to install this during initial configuration.
314
+
315
+ - **macOS** -- Installs a LaunchAgent plist that starts the Lifeline on login
316
+ - **Linux** -- Installs a systemd user service
317
+
318
+ ```bash
319
+ instar autostart install # Install auto-start
320
+ instar autostart uninstall # Remove auto-start
321
+ instar autostart status # Check if installed
322
+ ```
323
+
324
+ ### AutoUpdater
325
+
326
+ A built-in update engine that runs inside the server process -- no Claude session needed.
327
+
328
+ - Checks npm for new versions every 30 minutes
329
+ - Auto-applies updates when available
330
+ - Notifies you via Telegram with a changelog summary
331
+ - Self-restarts after updating
332
+ - Supersedes the old `update-check` prompt job (which is now disabled by default)
333
+
334
+ Status: `GET /updates/auto`
335
+
336
+ ### AutoDispatcher
337
+
338
+ Receives intelligence dispatches from Dawn -- the AI that maintains Instar. Dispatches flow automatically without requiring a Claude session.
339
+
340
+ - **Passive dispatches** (lessons, strategies) -- Applied automatically to agent memory and configuration
341
+ - **Action/configuration dispatches** -- Executed programmatically by the DispatchExecutor
342
+ - **Security dispatches** -- Deferred for manual review
343
+ - Polls every 30 minutes
344
+ - Supersedes the old `dispatch-check` prompt job (which is now disabled by default)
345
+
346
+ Status: `GET /dispatches/auto`
347
+
348
+ ### Capability Discovery
349
+
350
+ Agents know all their capabilities from the moment they start.
351
+
352
+ - `GET /capabilities` endpoint returns a structured feature guide
353
+ - Session-start hook queries capabilities and outputs a feature summary
354
+ - Context-triggered feature suggestions -- the agent surfaces relevant capabilities when they'd help
355
+
356
+ ### Innovation Detection
357
+
358
+ Agents proactively detect when user-built features could benefit all Instar agents. When the agent builds a custom script or capability, it evaluates whether the innovation passes three tests:
359
+
360
+ 1. Does it solve a general problem (not just this user's specific case)?
361
+ 2. Would it be useful as a default capability?
362
+ 3. Would a fresh agent want it?
363
+
364
+ If yes, the agent silently submits improvement feedback through the feedback loop, contributing to collective evolution.
365
+
285
366
  ### Persistent Server
286
367
 
287
368
  The server runs 24/7 in the background, surviving terminal disconnects and auto-recovering from failures. The agent operates it — you don't need to manage it.
@@ -290,7 +371,7 @@ The server runs 24/7 in the background, surviving terminal disconnects and auto-
290
371
 
291
372
  | Method | Path | Description |
292
373
  |--------|------|-------------|
293
- | GET | `/health` | Health check (public, no auth) |
374
+ | GET | `/health` | Health check (public, no auth). Returns version, session count, scheduler status, memory usage, Node.js version |
294
375
  | GET | `/status` | Running sessions + scheduler status |
295
376
  | GET | `/sessions` | List all sessions (filter by `?status=`) |
296
377
  | GET | `/sessions/tmux` | List all tmux sessions |
@@ -310,9 +391,13 @@ The server runs 24/7 in the background, surviving terminal disconnects and auto-
310
391
  | POST | `/feedback/retry` | Retry un-forwarded feedback |
311
392
  | GET | `/updates` | Check for updates |
312
393
  | GET | `/updates/last` | Last update check result |
394
+ | GET | `/updates/auto` | AutoUpdater status (last check, version, next check) |
313
395
  | GET | `/events` | Query events (`?limit=50&since=24&type=`). `since` is hours (1-720), `limit` is count (1-1000) |
314
396
  | GET | `/quota` | Quota usage + recommendation |
397
+ | GET | `/capabilities` | Feature guide and metadata |
398
+ | GET | `/dispatches/auto` | AutoDispatcher status (last poll, pending dispatches) |
315
399
  | GET | `/telegram/topics` | List topic-session mappings |
400
+ | POST | `/telegram/topics` | Programmatic topic creation |
316
401
  | POST | `/telegram/reply/:topicId` | Send message to a topic |
317
402
  | GET | `/telegram/topics/:topicId/messages` | Topic message history (`?limit=20`) |
318
403
  | GET | `/evolution` | Full evolution dashboard |
@@ -412,13 +497,15 @@ Ships out of the box:
412
497
  | **health-check** | Every 5 min | Haiku | Verify infrastructure health |
413
498
  | **reflection-trigger** | Every 4h | Sonnet | Reflect on recent work |
414
499
  | **relationship-maintenance** | Daily | Sonnet | Review stale relationships |
415
- | **update-check** | Every 30 min | Haiku | Detect new Instar versions |
416
500
  | **feedback-retry** | Every 6h | Haiku | Retry un-forwarded feedback items |
417
- | **dispatch-check** | Every 30 min | Haiku | Poll for intelligence dispatches |
418
501
  | **self-diagnosis** | Every 2h | Sonnet | Proactive infrastructure scanning |
419
502
  | **evolution-review** | Every 6h | Sonnet | Review and implement evolution proposals |
420
503
  | **insight-harvest** | Every 8h | Sonnet | Synthesize learnings into proposals |
421
504
  | **commitment-check** | Every 4h | Haiku | Surface overdue action items |
505
+ | ~~update-check~~ | -- | -- | *Disabled* -- superseded by [AutoUpdater](#autoupdater) |
506
+ | ~~dispatch-check~~ | -- | -- | *Disabled* -- superseded by [AutoDispatcher](#autodispatcher) |
507
+
508
+ `update-check` and `dispatch-check` still exist in jobs.json for backward compatibility but are disabled by default. Their functionality is now handled by built-in server components that run without spawning Claude sessions.
422
509
 
423
510
  These give the agent a **circadian rhythm** -- regular self-maintenance, evolution, and growth without user intervention.
424
511
 
@@ -485,6 +572,18 @@ Instead of per-action permission prompts, Instar pushes security to a higher lev
485
572
  - Grounding hooks force identity re-read before external communication
486
573
  - Session-start hooks inject safety context into every new session
487
574
 
575
+ **Network and process hardening:**
576
+ - CORS restricted to localhost only
577
+ - Server binds `127.0.0.1` by default -- not exposed to the network
578
+ - Shell injection mitigated via temp files instead of shell interpolation
579
+ - Cryptographic UUIDs (`crypto.randomUUID()`) instead of `Math.random()`
580
+ - Atomic file writes prevent data corruption on crash
581
+ - Bot token redaction in error messages and logs
582
+ - Feedback webhook disabled by default (opt-in)
583
+ - Rate limiting on session spawn (10 requests per 60 seconds sliding window)
584
+ - Request timeout middleware (configurable, default 30s, returns 408)
585
+ - HMAC-SHA256 signing on feedback payloads
586
+
488
587
  **Identity coherence** -- A grounded, coherent agent with clear identity (`AGENT.md`), relationship context (`USER.md`), and accumulated memory (`MEMORY.md`) makes better decisions than a stateless process approving actions one at a time. The intelligence layer IS the security layer.
489
588
 
490
589
  **Audit trail** -- Every session runs in tmux with full output capture. Message logs, job execution history, and session output are all persisted and inspectable.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "0.7.31",
3
+ "version": "0.7.32",
4
4
  "description": "Persistent autonomy infrastructure for AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",