instar 0.12.19 → 0.12.20

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.
@@ -99,7 +99,7 @@ For fresh installs: you'll ask 1-2 questions in Phase 2 to resolve.
99
99
  Each wizard message should indicate progress: `[Step N of M]`
100
100
 
101
101
  Step counts by scenario:
102
- - Scenarios 1, 3: 5 steps (welcome, identity, telegram, config, launch)
102
+ - Scenarios 1, 3: 5 steps (welcome, identity, messaging, config, launch)
103
103
  - Scenarios 2, 4: 7 steps (+ backup setup, machine identity)
104
104
  - Scenarios 5, 8: 8 steps (+ registration, recovery key, user identity)
105
105
  - Scenarios 6, 7: 11 steps (full coordination)
@@ -178,8 +178,8 @@ When an agent is fully configured and the user selects "Update configuration":
178
178
  Present:
179
179
  > What would you like to change?
180
180
 
181
- 1. **"Update Telegram setup"** → Jump to Phase 3
182
- 2. **"Set up WhatsApp"** → Jump to Phase 4g
181
+ 1. **"Update messaging setup"** → Jump to Phase 3 (choose Telegram or WhatsApp)
182
+ 2. **"Add a second messaging channel"** → Jump to Phase 4g (WhatsApp) or Phase 3 (Telegram)
183
183
  3. **"Change agent personality"** → Jump to Phase 2c
184
184
  4. **"Add a user"** → New User Flow
185
185
  5. **"View current config"** → Display scenario and settings
@@ -471,7 +471,7 @@ ls package.json Cargo.toml pyproject.toml go.mod Gemfile pom.xml 2>/dev/null
471
471
 
472
472
  I see you're in **[repo-name]** — I'll set up a persistent agent for this project.
473
473
 
474
- Your agent will monitor, build, and maintain this codebase. You'll talk to it through Telegram — no terminal needed after setup.
474
+ Your agent will monitor, build, and maintain this codebase. You'll talk to it through messaging (Telegram or WhatsApp) — no terminal needed after setup.
475
475
 
476
476
  ---
477
477
 
@@ -485,7 +485,7 @@ If the user objects ("actually I want a personal agent, not a project agent"), a
485
485
 
486
486
  **Welcome to Instar!**
487
487
 
488
- You're not inside a project, so I'll set up a standalone agent — a persistent AI companion you talk to through Telegram.
488
+ You're not inside a project, so I'll set up a standalone agent — a persistent AI companion you talk to through messaging.
489
489
 
490
490
  It can research, schedule tasks, manage files, and grow over time.
491
491
 
@@ -507,19 +507,21 @@ npx instar init --standalone "<agent-name>" --port <port>
507
507
 
508
508
  This handles directory creation, registry entry, port allocation, and gitignore — you just need to write the identity and config files into the created directory.
509
509
 
510
- ### Key principle: Telegram is the interface, always
510
+ ### Key principle: Messaging is the interface
511
511
 
512
- Regardless of project or personal agent, **Telegram is how you talk to your agent**. This should be clear from the very first message. Don't present it as an optional add-on — it's the destination of this entire setup.
512
+ Regardless of project or personal agent, **a messaging platform is how you talk to your agent**. This should be clear from the very first message. Don't present it as an optional add-on — it's the destination of this entire setup.
513
513
 
514
- The terminal session is the on-ramp. Telegram is where the agent experience lives.
514
+ The terminal session is the on-ramp. Messaging (Telegram or WhatsApp) is where the agent experience lives.
515
+
516
+ **Telegram is recommended** for its topic threads, bot API, and forum-style organization — but WhatsApp is a fully supported alternative for users who prefer it or already live there.
515
517
 
516
518
  ## Phase 2: Identity Bootstrap — The Birth Conversation
517
519
 
518
520
  **This is the most important part.** Have a conversation to understand who the user is and who their agent will become. Keep it natural and concise.
519
521
 
520
- For **Personal Agents**: emphasize that this agent will be their persistent companion. It grows, learns, and communicates through Telegram. It's not a project tool — it's a presence.
522
+ For **Personal Agents**: emphasize that this agent will be their persistent companion. It grows, learns, and communicates through messaging. It's not a project tool — it's a presence.
521
523
 
522
- For **Project Agents**: emphasize that this agent will own the project's health and development. It monitors, builds, maintains — and you talk to it through Telegram, just like a personal agent.
524
+ For **Project Agents**: emphasize that this agent will own the project's health and development. It monitors, builds, maintains — and you talk to it through messaging, just like a personal agent.
523
525
 
524
526
  ### Step 2-pre: Scenario Narrowing Questions (Fresh Installs Only)
525
527
 
@@ -709,7 +711,7 @@ This project uses instar for persistent agent capabilities.
709
711
  - **Research before escalating** — Check tools first. Build solutions. "Needs human" is last resort.
710
712
  ```
711
713
 
712
- **If Telegram was configured**, also add a Telegram Relay section to CLAUDE.md:
714
+ **If Telegram was configured**, also add a Telegram Relay section to CLAUDE.md. If WhatsApp was configured instead, add an equivalent WhatsApp Relay section using the `/whatsapp/send` endpoint:
713
715
 
714
716
  ```markdown
715
717
  ## Telegram Relay
@@ -752,13 +754,13 @@ Check the prompt context for `SECRET_BACKEND_CONFIGURED`. If present:
752
754
 
753
755
  ---
754
756
 
755
- ## Phase 3: Telegram Setup — The Destination
757
+ ## Phase 3: Messaging Setup — The Destination
756
758
 
757
- **Telegram is NOT optional.** It is the primary interface for talking to your agent. Everything else in setup supports getting the user onto Telegram. Treat this as a required step, not an opt-in feature.
759
+ **Messaging is NOT optional.** It is the primary interface for talking to your agent. Everything else in setup supports getting the user onto a messaging platform. Treat this as a required step, not an opt-in feature.
758
760
 
759
- ### Step 3-pre: Check if Telegram Already Configured
761
+ ### Step 3-pre: Check if Messaging Already Configured
760
762
 
761
- **FIRST**, check if Phase 2.5 already restored Telegram credentials. If `SecretManager.restoreTelegramConfig()` returned valid credentials earlier, **skip this entire phase** and move to Phase 4. The user doesn't need to set up Telegram again.
763
+ **FIRST**, check if Phase 2.5 already restored messaging credentials. If `SecretManager.restoreTelegramConfig()` returned valid credentials earlier, **skip this entire phase** and move to Phase 4. The user doesn't need to set up messaging again.
762
764
 
763
765
  Also check if the config already has a valid Telegram token (e.g., from a restore flow):
764
766
  ```bash
@@ -769,38 +771,46 @@ if [ -n "$TOKEN" ]; then
769
771
  fi
770
772
  ```
771
773
 
772
- If the token is valid → skip Phase 3 entirely.
774
+ If the token is valid → skip Phase 3 entirely. Similarly, check for existing WhatsApp config.
773
775
 
774
- ### Step 3a: Set Expectations
776
+ ### Step 3a: Present Messaging Options
775
777
 
776
- Not everyone knows what Telegram is. Frame it as the core of the experience not an add-on:
778
+ Frame messaging as the core of the experience, then let the user choose their platform:
777
779
 
778
- > **Next: connecting your agent to Telegram.**
780
+ > **Next: connecting your agent to a messaging platform.**
779
781
  >
780
- > Telegram is how you'll actually talk to your agent day-to-day. Not the terminal — Telegram. It's a free messaging app with topic threads, mobile access, and bot support that makes it perfect for this.
782
+ > This is how you'll actually talk to your agent day-to-day. Not the terminal — just messaging on your phone or desktop.
781
783
  >
782
- > If you don't have it yet, install it now: https://telegram.org/apps
783
- > You'll need your phone to log in on the web too.
784
-
785
- Then ask: "Do you have Telegram installed? If not, take a minute to set it up — I'll wait."
784
+ > 1. **Telegram** (recommended) Topic threads for organized conversations, powerful bot API, forum-style groups. Best for power users who want structured channels.
785
+ > 2. **WhatsApp** Talk to your agent from the messaging app you already use. Simple, familiar, works everywhere.
786
+ >
787
+ > Which do you prefer? (You can always add the other one later.)
786
788
 
787
- **Do NOT offer "Skip for now" as an option.** Do NOT present this as optional. The user chose to set up an AI agent — Telegram is how they'll use it. If the user explicitly says they want to skip (unprompted), acknowledge it briefly but make the cost clear:
789
+ **Do NOT offer "Skip messaging entirely" as an option.** Do NOT present messaging as optional. The user chose to set up an AI agent — messaging is how they'll use it. If the user explicitly says they want to skip (unprompted), acknowledge it briefly but make the cost clear:
788
790
 
789
- > "Without Telegram, you'll only be able to talk to [agent name] by opening a terminal and running `instar chat`. No mobile access, no proactive messages, no topic threads. Most of what makes an Instar agent useful requires Telegram."
791
+ > "Without a messaging platform, you'll only be able to talk to [agent name] by opening a terminal and running `instar chat`. No mobile access, no proactive messages, no organized threads. Most of what makes an Instar agent useful requires messaging."
790
792
  >
791
- > "You can set it up later with `instar telegram setup`."
793
+ > "You can set it up later with `instar telegram setup` or `instar whatsapp connect`."
794
+
795
+ ### If User Chooses Telegram
796
+
797
+ Proceed with the Telegram setup flow below (Step 3b onward).
792
798
 
793
- ### Why Telegram
799
+ ### If User Chooses WhatsApp
794
800
 
795
- Frame it as established fact, not a sales pitch:
801
+ Jump to **Phase 4g: WhatsApp Setup**. WhatsApp is a first-class option — treat it with the same energy and completeness as Telegram setup.
796
802
 
797
- > Telegram is where your agent lives:
803
+ ### Why Telegram (when presenting the recommendation)
804
+
805
+ Frame it as a recommendation, not an assumption:
806
+
807
+ > Telegram is where most agents live:
798
808
  > - **Just talk** — no commands, no terminal, just conversation
799
809
  > - **Topic threads** — organized channels for different concerns
800
810
  > - **Mobile access** — your agent is always reachable
801
811
  > - **Proactive** — your agent reaches out when something matters
802
812
 
803
- For **both agent types**: Telegram IS the interface. Be direct: "This is how you'll talk to your agent." Don't hedge. Don't present alternatives. For project agents, add: "Your agent messages you about builds, issues, and progress — you just reply."
813
+ For **both agent types**: Messaging IS the interface. Be direct: "This is how you'll talk to your agent." For project agents, add: "Your agent messages you about builds, issues, and progress — you just reply."
804
814
 
805
815
  ### Browser Automation Strategy
806
816
 
@@ -1148,9 +1158,9 @@ Append if not present:
1148
1158
  .instar/logs/
1149
1159
  ```
1150
1160
 
1151
- ### 4f. Install Telegram Relay Script (if Telegram configured)
1161
+ ### 4f. Install Messaging Relay Script (if messaging configured)
1152
1162
 
1153
- If Telegram was set up in Phase 3, install the relay script that lets Claude sessions send messages back to Telegram:
1163
+ If Telegram was set up, install the relay script that lets Claude sessions send messages back to Telegram. If WhatsApp was set up (with or without Telegram), the server handles WhatsApp relay natively via the `/whatsapp/send` endpoint — no separate script needed.
1154
1164
 
1155
1165
  ```bash
1156
1166
  mkdir -p .claude/scripts
@@ -1174,11 +1184,15 @@ Then make it executable:
1174
1184
  chmod +x .claude/scripts/telegram-reply.sh
1175
1185
  ```
1176
1186
 
1177
- ### 4g. WhatsApp Setup (Optional)
1187
+ ### 4g. WhatsApp Setup
1178
1188
 
1179
- **WhatsApp is optional.** Unlike Telegram, WhatsApp is an additional communication channel — not the primary interface. Only offer it after Telegram is configured.
1189
+ WhatsApp is a **first-class messaging option**. The user may arrive here either:
1190
+ - **As their primary choice** from Phase 3 (chose WhatsApp over Telegram)
1191
+ - **As an additional channel** after Telegram is already configured
1180
1192
 
1181
- Present:
1193
+ **If arriving as primary choice from Phase 3**, skip the "want to add" prompt — they already chose this. Go straight to Step 4g-1.
1194
+
1195
+ **If arriving after Telegram setup**, present:
1182
1196
 
1183
1197
  > **Want to add WhatsApp as a second channel?**
1184
1198
  >
@@ -1430,7 +1444,7 @@ If the health check fails, retry once. If still failing, tell the user what happ
1430
1444
 
1431
1445
  ### Step 5b: Agent Greets the User in the Lifeline Topic
1432
1446
 
1433
- **If Telegram was configured, the new agent should reach out to the user in the Lifeline topic.** This is the magic moment — the agent comes alive.
1447
+ **If Telegram was configured, the new agent should reach out to the user in the Lifeline topic.** If WhatsApp was configured (without Telegram), send the greeting via WhatsApp instead. This is the magic moment — the agent comes alive.
1434
1448
 
1435
1449
  Send the greeting to the Lifeline topic (using the `message_thread_id` from Step 3e-vi):
1436
1450
 
@@ -1472,9 +1486,9 @@ This creates a macOS LaunchAgent or Linux systemd service. The agent will start
1472
1486
 
1473
1487
  After the server is running, auto-start is installed, and the greeting is sent:
1474
1488
 
1475
- > "All done! [Agent name] just messaged you in the Lifeline topic on Telegram. From here on, that's your primary channel — just talk to your agent there."
1489
+ > "All done! [Agent name] just messaged you on [Telegram/WhatsApp]. From here on, that's your primary channel — just talk to your agent there."
1476
1490
  >
1477
- > "I've set up auto-start — your agent will come back automatically when you log in. As long as your computer is on and awake, Telegram just works."
1491
+ > "I've set up auto-start — your agent will come back automatically when you log in. As long as your computer is on and awake, messaging just works."
1478
1492
 
1479
1493
  If auto-start install failed, explain the fallback:
1480
1494
 
@@ -1482,13 +1496,13 @@ If auto-start install failed, explain the fallback:
1482
1496
 
1483
1497
  Keep it matter-of-fact, not alarming.
1484
1498
 
1485
- **Do NOT present a list of CLI commands or next steps.** The setup wizard's job is done. The user's next action is opening Telegram and replying to their agent.
1499
+ **Do NOT present a list of CLI commands or next steps.** The setup wizard's job is done. The user's next action is opening their messaging app and replying to their agent.
1486
1500
 
1487
- **If Telegram was NOT configured:**
1501
+ **If no messaging platform was configured:**
1488
1502
 
1489
1503
  Start the server, then:
1490
1504
 
1491
- > "Server is running. You can talk to your agent through Claude Code sessions. When you're ready for a richer experience, just ask your agent to help set up Telegram."
1505
+ > "Server is running. You can talk to your agent through Claude Code sessions. When you're ready for a richer experience, just ask your agent to help set up Telegram or WhatsApp."
1492
1506
 
1493
1507
  ## Phase 6: Post-Setup Feedback (Optional)
1494
1508
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "0.12.19",
3
+ "version": "0.12.20",
4
4
  "description": "Persistent autonomy infrastructure for AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "./builtin-manifest.schema.json",
3
3
  "schemaVersion": 1,
4
- "generatedAt": "2026-03-07T03:58:07.804Z",
5
- "instarVersion": "0.12.19",
4
+ "generatedAt": "2026-03-07T19:05:25.547Z",
5
+ "instarVersion": "0.12.20",
6
6
  "entryCount": 166,
7
7
  "entries": {
8
8
  "hook:session-start": {
@@ -295,7 +295,7 @@
295
295
  "type": "skill",
296
296
  "domain": "skills",
297
297
  "sourcePath": ".claude/skills/setup-wizard/skill.md",
298
- "contentHash": "89e44d4dace655d6304cf7dd3668da3a9c89aa8cc26fe3ef82cd15ab6a922d7d",
298
+ "contentHash": "7cd0c49f7ed3b7a8bd962f981c52d62c5dedfa7e95dfdc0ce40206f303400f70",
299
299
  "since": "2025-01-01"
300
300
  },
301
301
  "route-group:health": {
@@ -0,0 +1,24 @@
1
+ # Upgrade Guide — v0.12.20
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
+ The setup wizard now presents both Telegram and WhatsApp as messaging options during Phase 3 (Messaging Setup), instead of assuming Telegram-only. Telegram remains the recommended default, but WhatsApp (Baileys or Business API) is offered as a first-class alternative. Phase 4g (WhatsApp Setup) now detects whether it's the primary choice or being added as a second channel and adjusts its flow accordingly.
12
+
13
+ Wizard completeness tests updated to match the new phase naming (`Phase 3: Messaging Setup`).
14
+
15
+ ## What to Tell Your User
16
+
17
+ - **Messaging choice during setup**: "You now get to choose between Telegram and WhatsApp when setting up your agent. Telegram is still recommended for its topic threads, but if you prefer WhatsApp, it's fully supported as your primary messaging platform."
18
+
19
+ ## Summary of New Capabilities
20
+
21
+ | Capability | How to Use |
22
+ |-----------|-----------|
23
+ | WhatsApp as primary messaging option | Choose option 2 during setup wizard Phase 3 |
24
+ | Add second messaging channel | Available in reconfigure menu after initial setup |