instar 0.6.11 → 0.6.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.
@@ -0,0 +1,11 @@
1
+ > Why do I have a folder named ".vercel" in my project?
2
+ The ".vercel" folder is created when you link a directory to a Vercel project.
3
+
4
+ > What does the "project.json" file contain?
5
+ The "project.json" file contains:
6
+ - The ID of the Vercel project that you linked ("projectId")
7
+ - The ID of the user or team your Vercel project is owned by ("orgId")
8
+
9
+ > Should I commit the ".vercel" folder?
10
+ No, you should not share the ".vercel" folder with anyone.
11
+ Upon creation, it will be automatically added to your ".gitignore" file.
@@ -0,0 +1 @@
1
+ {"projectId":"prj_evM5LcItYL3IAmw8zNvEPGrHeaya","orgId":"team_dHctwIDcV3X9ydapQlCPHFGI","projectName":"claude-agent-kit"}
package/README.md CHANGED
@@ -95,6 +95,7 @@ instar feedback --type bug --title "Session timeout" --description "Details..."
95
95
  - **[Identity System](#identity-that-survives-context-death)** -- AGENT.md + USER.md + MEMORY.md with hooks that enforce continuity across compaction.
96
96
  - **[Telegram Integration](#telegram-integration)** -- Two-way messaging. Each job gets its own topic. Your group becomes a living dashboard.
97
97
  - **[Relationship Tracking](#relationships-as-fundamental-infrastructure)** -- Cross-platform identity resolution, significance scoring, context injection.
98
+ - **[Evolution System](#evolution-system)** -- Four subsystems for structured growth: proposal queue, learning registry, gap tracking, and commitment follow-through.
98
99
  - **[Self-Evolution](#self-evolution)** -- The agent modifies its own jobs, hooks, skills, and infrastructure. It builds what it needs.
99
100
  - **[Behavioral Hooks](#behavioral-hooks)** -- Structural guardrails: identity injection, dangerous command guards, grounding before messaging.
100
101
  - **[Default Coherence Jobs](#default-coherence-jobs)** -- Health checks, reflection, relationship maintenance. A circadian rhythm out of the box.
@@ -285,6 +286,20 @@ The server runs 24/7 in the background, surviving terminal disconnects and auto-
285
286
  | GET | `/telegram/topics` | List topic-session mappings |
286
287
  | POST | `/telegram/reply/:topicId` | Send message to a topic |
287
288
  | GET | `/telegram/topics/:topicId/messages` | Topic message history (`?limit=20`) |
289
+ | GET | `/evolution` | Full evolution dashboard |
290
+ | GET | `/evolution/proposals` | List proposals (`?status=`, `?type=`) |
291
+ | POST | `/evolution/proposals` | Create a proposal |
292
+ | PATCH | `/evolution/proposals/:id` | Update proposal status |
293
+ | GET | `/evolution/learnings` | List learnings (`?applied=`, `?category=`) |
294
+ | POST | `/evolution/learnings` | Record a learning |
295
+ | PATCH | `/evolution/learnings/:id/apply` | Mark learning applied |
296
+ | GET | `/evolution/gaps` | List capability gaps |
297
+ | POST | `/evolution/gaps` | Report a gap |
298
+ | PATCH | `/evolution/gaps/:id/address` | Mark gap addressed |
299
+ | GET | `/evolution/actions` | List action items |
300
+ | POST | `/evolution/actions` | Create an action item |
301
+ | GET | `/evolution/actions/overdue` | List overdue actions |
302
+ | PATCH | `/evolution/actions/:id` | Update action status |
288
303
 
289
304
  ### Identity That Survives Context Death
290
305
 
@@ -312,6 +327,28 @@ Every person the agent interacts with gets a relationship record that grows over
312
327
  - **Context injection** -- The agent *knows* who it's talking to before the conversation starts
313
328
  - **Stale detection** -- Surfaces relationships that haven't been contacted in a while
314
329
 
330
+ ### Evolution System
331
+
332
+ Self-evolution isn't just "the agent can edit files." It's a structured system with four subsystems that turn running into growing:
333
+
334
+ **Evolution Queue** -- Staged self-improvement proposals. The agent identifies something that could be better, proposes a change, and a review job evaluates and implements it. Not impulsive self-modification -- deliberate, staged improvement with a paper trail.
335
+
336
+ **Learning Registry** -- Structured, searchable insights. When the agent discovers a pattern, solves a tricky problem, or learns a user preference, it records it in a format that future sessions can query. An insight-harvest job synthesizes patterns across learnings into evolution proposals.
337
+
338
+ **Capability Gap Tracker** -- The agent tracks what it's missing. When it can't fulfill a request, encounters a limitation, or notices a workflow gap, it records the gap with severity and a proposed solution. This is the difference between "I can't do that" and "I can't do that *yet*, and here's what I need."
339
+
340
+ **Action Queue** -- Commitment tracking with stale detection. When the agent promises to follow up, creates a TODO, or identifies work that needs doing, it gets tracked. A commitment-check job surfaces overdue items so nothing falls through the cracks.
341
+
342
+ Built-in skills (`/evolve`, `/learn`, `/gaps`, `/commit-action`) make recording effortless. A post-action reflection hook nudges the agent to pause after significant actions (commits, deploys) and consider what it learned. Three default jobs drive the cycle:
343
+
344
+ | Job | Schedule | Purpose |
345
+ |-----|----------|---------|
346
+ | **evolution-review** | Every 6h | Review proposals, implement approved ones |
347
+ | **insight-harvest** | Every 8h | Synthesize learnings into proposals |
348
+ | **commitment-check** | Every 4h | Surface overdue action items |
349
+
350
+ All state is file-based JSON in `.instar/state/evolution/`. No database, no external dependencies.
351
+
315
352
  ### Self-Evolution
316
353
 
317
354
  The agent can edit its own job definitions, write new scripts, update its identity, create hooks, and modify its configuration. When asked to do something it can't do yet, the expected behavior is: **"Let me build that capability."**
@@ -331,8 +368,11 @@ Automatic hooks fire via Claude Code's hook system:
331
368
  |------|------|-------------|
332
369
  | **Dangerous command guard** | PreToolUse (blocking) | Blocks destructive operations structurally |
333
370
  | **Grounding before messaging** | PreToolUse (advisory) | Forces identity re-read before external communication |
334
- | **Session start** | PostToolUse | Injects identity context at session start |
335
- | **Compaction recovery** | Notification (compact) | Restores identity when context compresses |
371
+ | **Deferral detector** | PreToolUse (advisory) | Catches the agent deferring work it could do itself |
372
+ | **External communication guard** | PreToolUse (advisory) | Identity grounding before posting to external platforms |
373
+ | **Post-action reflection** | PreToolUse (advisory) | Nudges learning capture after commits, deploys, and significant actions |
374
+ | **Session start** | SessionStart | Injects identity context at session start |
375
+ | **Compaction recovery** | SessionStart (compact) | Restores identity when context compresses |
336
376
 
337
377
  ### Default Coherence Jobs
338
378
 
@@ -343,10 +383,15 @@ Ships out of the box:
343
383
  | **health-check** | Every 5 min | Haiku | Verify infrastructure health |
344
384
  | **reflection-trigger** | Every 4h | Sonnet | Reflect on recent work |
345
385
  | **relationship-maintenance** | Daily | Sonnet | Review stale relationships |
346
- | **update-check** | Daily | Haiku | Detect new Instar versions |
386
+ | **update-check** | Every 30 min | Haiku | Detect new Instar versions |
347
387
  | **feedback-retry** | Every 6h | Haiku | Retry un-forwarded feedback items |
388
+ | **dispatch-check** | Every 30 min | Haiku | Poll for intelligence dispatches |
389
+ | **self-diagnosis** | Every 2h | Sonnet | Proactive infrastructure scanning |
390
+ | **evolution-review** | Every 6h | Sonnet | Review and implement evolution proposals |
391
+ | **insight-harvest** | Every 8h | Sonnet | Synthesize learnings into proposals |
392
+ | **commitment-check** | Every 4h | Haiku | Surface overdue action items |
348
393
 
349
- These give the agent a **circadian rhythm** -- regular self-maintenance without user intervention.
394
+ These give the agent a **circadian rhythm** -- regular self-maintenance, evolution, and growth without user intervention.
350
395
 
351
396
  ### The Feedback Loop: A Rising Tide Lifts All Ships
352
397
 
@@ -375,13 +420,15 @@ One agent's growing pain becomes every agent's growth.
375
420
  AGENT.md # Agent identity (who am I?)
376
421
  USER.md # User context (who am I working with?)
377
422
  MEMORY.md # Persistent learnings across sessions
378
- hooks/ # Behavioral scripts (guards, identity injection)
423
+ hooks/ # Behavioral scripts (guards, identity injection, reflection)
379
424
  state/ # Runtime state (sessions, jobs)
425
+ evolution/ # Evolution queue, learnings, gaps, actions (JSON)
380
426
  relationships/ # Per-person relationship files
381
427
  logs/ # Server logs
382
428
  .claude/ # Claude Code configuration
383
429
  settings.json # Hook registrations
384
430
  scripts/ # Health watchdog, Telegram relay, smart-fetch
431
+ skills/ # Built-in + agent-created skills (evolve, learn, gaps, commit-action)
385
432
  ```
386
433
 
387
434
  Everything is file-based. No database. JSON state files the agent can read and modify. tmux for session management -- battle-tested, survives disconnects, fully scriptable.
package/dist/cli.js CHANGED
@@ -21,7 +21,7 @@ import fs from 'node:fs';
21
21
  import path from 'node:path';
22
22
  import { Command } from 'commander';
23
23
  import { initProject } from './commands/init.js';
24
- import { runSetup } from './commands/setup.js';
24
+ // setup.ts is imported dynamically — it depends on @inquirer/prompts which requires Node 20.12+
25
25
  import { startServer, stopServer } from './commands/server.js';
26
26
  import { showStatus } from './commands/status.js';
27
27
  import { addUser, listUsers } from './commands/user.js';
@@ -257,13 +257,33 @@ program
257
257
  .description('Persistent autonomy infrastructure for AI agents')
258
258
  .version(getInstarVersion())
259
259
  .option('--classic', 'Use the classic inquirer-based setup wizard instead of Claude')
260
- .action((opts) => runSetup(opts)); // Default: run interactive setup when no subcommand given
260
+ .action(async (opts) => {
261
+ const [major, minor] = process.versions.node.split('.').map(Number);
262
+ if (major < 20 || (major === 20 && minor < 12)) {
263
+ console.error(`\n Instar setup requires Node.js 20.12 or later.`);
264
+ console.error(` You're running Node.js ${process.versions.node}.`);
265
+ console.error(`\n Upgrade: https://nodejs.org/en/download\n`);
266
+ process.exit(1);
267
+ }
268
+ const { runSetup } = await import('./commands/setup.js');
269
+ return runSetup(opts);
270
+ }); // Default: run interactive setup when no subcommand given
261
271
  // ── Setup (explicit alias) ────────────────────────────────────────
262
272
  program
263
273
  .command('setup')
264
274
  .description('Interactive setup wizard (same as running `instar` with no args)')
265
275
  .option('--classic', 'Use the classic inquirer-based setup wizard instead of Claude')
266
- .action((opts) => runSetup(opts));
276
+ .action(async (opts) => {
277
+ const [major, minor] = process.versions.node.split('.').map(Number);
278
+ if (major < 20 || (major === 20 && minor < 12)) {
279
+ console.error(`\n Instar setup requires Node.js 20.12 or later.`);
280
+ console.error(` You're running Node.js ${process.versions.node}.`);
281
+ console.error(`\n Upgrade: https://nodejs.org/en/download\n`);
282
+ process.exit(1);
283
+ }
284
+ const { runSetup } = await import('./commands/setup.js');
285
+ return runSetup(opts);
286
+ });
267
287
  // ── Init ─────────────────────────────────────────────────────────
268
288
  program
269
289
  .command('init [project-name]')