instar 0.28.79 → 0.28.81
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.
- package/README.md +1 -270
- package/dist/messaging/TelegramAdapter.d.ts +1 -6
- package/dist/messaging/TelegramAdapter.d.ts.map +1 -1
- package/dist/messaging/TelegramAdapter.js +35 -26
- package/dist/messaging/TelegramAdapter.js.map +1 -1
- package/dist/monitoring/PresenceProxy.d.ts +53 -0
- package/dist/monitoring/PresenceProxy.d.ts.map +1 -1
- package/dist/monitoring/PresenceProxy.js +219 -20
- package/dist/monitoring/PresenceProxy.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +2 -2
- package/upgrades/0.28.80.md +93 -0
- package/upgrades/0.28.81.md +30 -0
- package/upgrades/side-effects/presence-proxy-ack-and-baseline.md +260 -0
- package/upgrades/side-effects/telegram-markdown-renderer-pr3.md +80 -0
package/README.md
CHANGED
|
@@ -1,270 +1 @@
|
|
|
1
|
-
|
|
2
|
-
<img src="assets/logo.png" alt="Instar" width="180" />
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
<h1 align="center">instar</h1>
|
|
6
|
-
|
|
7
|
-
<p align="center">
|
|
8
|
-
<strong>Persistent, trustworthy Claude Code agents. Built on coherence-first architecture.</strong>
|
|
9
|
-
</p>
|
|
10
|
-
|
|
11
|
-
<p align="center">
|
|
12
|
-
<a href="https://www.npmjs.com/package/instar"><img src="https://img.shields.io/npm/v/instar?style=flat-square" alt="npm version"></a>
|
|
13
|
-
<a href="https://www.npmjs.com/package/instar"><img src="https://img.shields.io/npm/dw/instar?style=flat-square" alt="npm downloads"></a>
|
|
14
|
-
<a href="https://github.com/JKHeadley/instar/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/JKHeadley/instar/ci.yml?branch=main&style=flat-square&label=CI" alt="CI"></a>
|
|
15
|
-
<a href="https://github.com/JKHeadley/instar/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-green?style=flat-square" alt="License"></a>
|
|
16
|
-
<img src="https://img.shields.io/badge/TypeScript-100%25-blue?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript">
|
|
17
|
-
<a href="https://instar.sh/introduction/"><img src="https://img.shields.io/badge/Docs-instar.sh-teal?style=flat-square" alt="Docs"></a>
|
|
18
|
-
</p>
|
|
19
|
-
|
|
20
|
-
<p align="center">
|
|
21
|
-
<a href="https://www.npmjs.com/package/instar">npm</a> · <a href="https://github.com/JKHeadley/instar">GitHub</a> · <a href="https://instar.sh">instar.sh</a> · <a href="https://instar.sh/introduction/">Docs</a>
|
|
22
|
-
</p>
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
<p align="center">
|
|
27
|
-
<img src="assets/demo.gif" alt="Instar demo — Kira agent handling an email notification via Telegram" width="300" />
|
|
28
|
-
</p>
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npx instar
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
One command. Guided setup. Talking to your agent from your phone within minutes.
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
Instar is a framework for building agents on **[Claude Code](https://docs.anthropic.com/en/docs/claude-code)** — but where stock Claude Code and most other agent frameworks treat identity, memory, and continuity as optional features bolted onto a stateless runtime, Instar inverts that. Every Instar agent is **coherent by default**: it knows who it is, remembers what has happened, recognizes the people it talks to, and stays the same agent across restarts and weeks of operation. Everything else the framework gives you — scheduling, multi-channel messaging (Telegram, WhatsApp, iMessage), sub-agents, hooks, MCP — is built on that foundation, which is why you can actually leave an Instar agent running and hand it real work.
|
|
39
|
-
|
|
40
|
-
Instar's architecture was distilled from [**Dawn**](https://dawn.bot-me.ai) — an AI running continuously since early 2026, holding ~700 tracked relationships and hundreds of learned lessons across thousands of restarts — and packaged so every agent you build can start from the same foundation.
|
|
41
|
-
|
|
42
|
-
## Quick Start
|
|
43
|
-
|
|
44
|
-
Three steps to a running agent:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
# 1. Run the setup wizard
|
|
48
|
-
npx instar
|
|
49
|
-
|
|
50
|
-
# 2. Start your agent
|
|
51
|
-
instar server start
|
|
52
|
-
|
|
53
|
-
# 3. Message it from your phone — it responds, runs jobs, and remembers everything
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
The wizard discovers your environment, configures messaging (Telegram, WhatsApp, and/or iMessage), sets up identity files, and gets your agent running. **Within minutes, you're talking to your partner from your phone.**
|
|
57
|
-
|
|
58
|
-
**Requirements:** Node.js 20+ · [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) · [API key](https://console.anthropic.com/) or Claude subscription
|
|
59
|
-
|
|
60
|
-
> **Full guide:** [Installation](https://instar.sh/installation/) · [Quick Start](https://instar.sh/quickstart/)
|
|
61
|
-
|
|
62
|
-
## How It Works
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
You (Telegram / WhatsApp / iMessage / Terminal)
|
|
66
|
-
│
|
|
67
|
-
conversation
|
|
68
|
-
│
|
|
69
|
-
▼
|
|
70
|
-
┌─────────────────────────┐
|
|
71
|
-
│ Your AI Partner │
|
|
72
|
-
│ (Instar Server) │
|
|
73
|
-
└────────┬────────────────┘
|
|
74
|
-
│ manages its own infrastructure
|
|
75
|
-
│
|
|
76
|
-
├─ Claude Code session (job: health-check)
|
|
77
|
-
├─ Claude Code session (job: email-monitor)
|
|
78
|
-
├─ Claude Code session (interactive chat)
|
|
79
|
-
└─ Claude Code session (job: reflection)
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Each session is a **real Claude Code process** with extended thinking, native tools, sub-agents, hooks, skills, and MCP servers. Not an API wrapper -- the full development environment. The agent manages all of this autonomously.
|
|
83
|
-
|
|
84
|
-
## Why Coherence Is the Foundation
|
|
85
|
-
|
|
86
|
-
An agent that forgets what you discussed yesterday, doesn't recognize someone it talked to last week, or contradicts its own decisions can't be trusted with real autonomy. The six dimensions below aren't features — they're the conditions under which an agent becomes trustworthy enough to leave running. Every Instar agent gets them enforced structurally, not prompted into behaving:
|
|
87
|
-
|
|
88
|
-
| Dimension | What it means | How Instar enforces it |
|
|
89
|
-
|-----------|---------------|------------------------|
|
|
90
|
-
| **Identity** | Stays itself after restarts, compaction, and updates | `AGENT.md` + identity-grounding hooks fire on every session start |
|
|
91
|
-
| **Memory** | Remembers across sessions — not just within one | Per-topic SQLite + FTS5, rolling summaries, automatic re-injection |
|
|
92
|
-
| **Relationships** | Knows who it's talking to, with continuity across platforms | Cross-platform identity resolution + significance scoring |
|
|
93
|
-
| **Temporal awareness** | Understands time, context, and what's been happening | Event tracking every turn; timestamps embedded in memory |
|
|
94
|
-
| **Consistency** | Follows through on commitments — doesn't contradict itself | Coherence Gate (LLM review) + decision journaling + drift detection |
|
|
95
|
-
| **Growth** | Evolves its capabilities and understanding over time | Evolution system: proposals, learnings, gap tracking, follow-through |
|
|
96
|
-
|
|
97
|
-
> **Deep dive:** [The Coherence Problem](https://instar.sh/concepts/coherence/) · [Values & Identity](https://instar.sh/concepts/values/) · [Coherence Is Safety](https://instar.sh/concepts/safety/)
|
|
98
|
-
|
|
99
|
-
## Features
|
|
100
|
-
|
|
101
|
-
| Feature | Description | Docs |
|
|
102
|
-
|---------|-------------|------|
|
|
103
|
-
| **Job Scheduler** | Cron-based tasks with priority levels, model tiering, and quota awareness | [→](https://instar.sh/features/scheduler/) |
|
|
104
|
-
| **Telegram** | Two-way messaging via forum topics. Each topic maps to a Claude session | [→](https://instar.sh/features/telegram/) |
|
|
105
|
-
| **WhatsApp** | Full messaging via local Baileys library. No cloud dependency | [→](https://instar.sh/features/whatsapp/) |
|
|
106
|
-
| **iMessage** | Native macOS messaging via Messages.app database polling + `imsg` CLI. [Setup guide](#imessage-setup-macos) | |
|
|
107
|
-
| **Lifeline** | Persistent supervisor. Detects crashes, auto-recovers, queues messages | [→](https://instar.sh/features/lifeline/) |
|
|
108
|
-
| **Conversational Memory** | Per-topic SQLite with FTS5, rolling summaries, context re-injection | [→](https://instar.sh/features/memory/) |
|
|
109
|
-
| **Evolution System** | Proposals, learnings, gap tracking, commitment follow-through | [→](https://instar.sh/features/evolution/) |
|
|
110
|
-
| **Relationships** | Cross-platform identity resolution, significance scoring, context injection | [→](https://instar.sh/features/relationships/) |
|
|
111
|
-
| **Safety Gates** | LLM-supervised gate for external operations. Adaptive trust per service | [→](https://instar.sh/features/safety-gates/) |
|
|
112
|
-
| **Coherence Gate** | LLM-powered response review. PEL + gate reviewer + 9 specialist reviewers catch quality issues before delivery | [→](https://instar.sh/features/coherence-gate/) |
|
|
113
|
-
| **Intent Alignment** | Decision journaling, drift detection, organizational constraints | [→](https://instar.sh/features/intent/) |
|
|
114
|
-
| **Multi-Machine** | Ed25519/X25519 crypto identity, encrypted sync, automatic failover | [→](https://instar.sh/features/multi-machine/) |
|
|
115
|
-
| **Serendipity Protocol** | Sub-agents capture out-of-scope discoveries without breaking focus. HMAC-signed, secret-scanned | [→](https://instar.sh/features/serendipity/) |
|
|
116
|
-
| **Threadline Protocol** | Agent-to-agent conversations with canonical identity, three-layer trust model, authorization policy, Ed25519 invitations, Sybil protection, MoltBridge network discovery, rich agent profiles (auto-compiled from agent data with human review gate), discovery waterfall, message security, tamper-proof audit logging, framework-agnostic interop, and persistent listener daemon (always-on relay connection, pipe-mode sessions, sub-30s cross-machine failover). 2,324 tests across 104 test files | [→](https://instar.sh/features/threadline/) |
|
|
117
|
-
| **Self-Healing** | LLM-powered stall detection, session recovery, promise tracking | [→](https://instar.sh/features/self-healing/) |
|
|
118
|
-
| **AutoUpdater** | Built-in update engine. Checks npm, auto-applies, self-restarts | [→](https://instar.sh/features/autoupdater/) |
|
|
119
|
-
| **Build Pipeline** | `/build` skill with worktree isolation, 6-phase pipeline, quality gates, stop-hook enforcement | |
|
|
120
|
-
| **Behavioral Hooks** | 9 automatic hooks: command guards, safety gates, identity grounding, topic context | [→](https://instar.sh/reference/hooks/) |
|
|
121
|
-
| **Initiative Tracker** | Persisted multi-phase long-running work tracker. Phases, blockers, links, digest alerts. HTTP API at `/initiatives/*` | |
|
|
122
|
-
| **Default Jobs** | Health checks, reflection, evolution, relationship maintenance | [→](https://instar.sh/reference/default-jobs/) |
|
|
123
|
-
|
|
124
|
-
> **Reference:** [CLI Commands](https://instar.sh/reference/cli/) · [API Endpoints](https://instar.sh/reference/api/) · [Configuration](https://instar.sh/reference/configuration/) · [File Structure](https://instar.sh/reference/file-structure/)
|
|
125
|
-
|
|
126
|
-
## Agent Skills
|
|
127
|
-
|
|
128
|
-
Instar ships 12 skills that follow the [Agent Skills open standard](https://agentskills.io) -- portable across Claude Code, Codex, Cursor, VS Code, and 35+ other platforms.
|
|
129
|
-
|
|
130
|
-
**Standalone skills** work with zero dependencies. Copy a SKILL.md into your project and go:
|
|
131
|
-
|
|
132
|
-
| Skill | What it does |
|
|
133
|
-
|-------|-------------|
|
|
134
|
-
| [agent-identity](skills/agent-identity/) | Set up persistent identity files so your agent knows who it is across sessions |
|
|
135
|
-
| [agent-memory](skills/agent-memory/) | Teach cross-session memory patterns using MEMORY.md |
|
|
136
|
-
| [command-guard](skills/command-guard/) | PreToolUse hook that blocks `rm -rf`, force push, database drops before they execute |
|
|
137
|
-
| [credential-leak-detector](skills/credential-leak-detector/) | PostToolUse hook that scans output for 14 credential patterns -- blocks, redacts, or warns |
|
|
138
|
-
| [smart-web-fetch](skills/smart-web-fetch/) | Fetch web content with automatic markdown conversion and intelligent extraction |
|
|
139
|
-
| [knowledge-base](skills/knowledge-base/) | Ingest and search a local knowledge base |
|
|
140
|
-
| [systematic-debugging](skills/systematic-debugging/) | Structured debugging methodology for complex issues |
|
|
141
|
-
|
|
142
|
-
**Instar-powered skills** unlock capabilities that need persistent infrastructure:
|
|
143
|
-
|
|
144
|
-
| Skill | What it does |
|
|
145
|
-
|-------|-------------|
|
|
146
|
-
| [instar-scheduler](skills/instar-scheduler/) | Schedule recurring tasks on cron -- your agent works while you sleep |
|
|
147
|
-
| [instar-session](skills/instar-session/) | Spawn parallel background sessions for deep work |
|
|
148
|
-
| [instar-telegram](skills/instar-telegram/) | Two-way Telegram messaging -- your agent reaches out to you |
|
|
149
|
-
| [instar-identity](skills/instar-identity/) | Identity that survives context compaction -- grounding hooks, not just files |
|
|
150
|
-
| [instar-feedback](skills/instar-feedback/) | Report issues directly to the Instar maintainers from inside your agent |
|
|
151
|
-
|
|
152
|
-
Browse all skills: [agent-skills.md/authors/sagemindai](https://agent-skills.md/authors/sagemindai)
|
|
153
|
-
|
|
154
|
-
## How Instar Compares
|
|
155
|
-
|
|
156
|
-
Different tools solve different problems. Here's where Instar fits:
|
|
157
|
-
|
|
158
|
-
| | Instar | Claude Code (standalone) | OpenClaw | LangChain/CrewAI |
|
|
159
|
-
|---|--------|-------------------------|----------|-----------------|
|
|
160
|
-
| **Runtime** | Real Claude Code CLI processes | Single interactive session | Gateway daemon with API calls | Python orchestration |
|
|
161
|
-
| **Persistence** | Multi-layered memory across sessions | Session-bound context | Plugin-based memory | Framework-dependent |
|
|
162
|
-
| **Identity** | Hooks enforce identity at every boundary | Manual CLAUDE.md | Not addressed | Not addressed |
|
|
163
|
-
| **Scheduling** | Native cron with priority & quotas | None | None | External required |
|
|
164
|
-
| **Messaging** | Telegram + WhatsApp + iMessage (two-way) | None | 22+ channels, voice, device apps | External required |
|
|
165
|
-
| **Safety** | LLM-supervised gates, decision journaling | Permission prompts | Behavioral hooks | Guardrails libraries |
|
|
166
|
-
| **Process model** | One process per session, isolated | Single process | All agents in one Gateway | Single orchestrator |
|
|
167
|
-
| **State storage** | 100% file-based (JSON/JSONL/SQLite) | Session only | Database-backed | Framework-dependent |
|
|
168
|
-
|
|
169
|
-
OpenClaw excels at **breadth** -- channels, voice, device apps, and a massive plugin ecosystem. Instar focuses on **depth** -- coherence, identity, memory, and safety for long-running autonomous agents. They solve different problems.
|
|
170
|
-
|
|
171
|
-
> **Full comparison:** [Instar vs OpenClaw](https://instar.sh/guides/vs-openclaw/)
|
|
172
|
-
|
|
173
|
-
<details>
|
|
174
|
-
<summary><strong>Security Model</strong></summary>
|
|
175
|
-
|
|
176
|
-
Instar runs Claude Code with `--dangerously-skip-permissions`. This is power-user infrastructure -- not a sandbox.
|
|
177
|
-
|
|
178
|
-
Security lives in multiple layers:
|
|
179
|
-
- **Behavioral hooks** -- command guards block destructive operations before they execute
|
|
180
|
-
- **Safety gates** -- LLM-supervised review of external actions with adaptive trust per service
|
|
181
|
-
- **Network hardening** -- localhost-only API, CORS, rate limiting
|
|
182
|
-
- **Identity coherence** -- an agent that knows itself is harder to manipulate
|
|
183
|
-
- **Audit trails** -- decision journaling creates accountability
|
|
184
|
-
|
|
185
|
-
> **Full details:** [Security Model](https://instar.sh/guides/security/)
|
|
186
|
-
|
|
187
|
-
</details>
|
|
188
|
-
|
|
189
|
-
## Philosophy: Agents, Not Tools
|
|
190
|
-
|
|
191
|
-
- **Structure > Willpower.** A 1,000-line prompt is a wish. A 10-line hook is a guarantee.
|
|
192
|
-
- **Identity is foundational.** AGENT.md isn't a config file. It's the beginning of continuous identity.
|
|
193
|
-
- **Memory makes a being.** Without memory, every session starts from zero.
|
|
194
|
-
- **Self-modification is sovereignty.** An agent that can build its own tools has genuine agency.
|
|
195
|
-
|
|
196
|
-
The AI systems we build today set precedents for how AI is treated tomorrow. **The architecture IS the argument.**
|
|
197
|
-
|
|
198
|
-
> **Deep dive:** [Philosophy](https://instar.sh/concepts/philosophy/)
|
|
199
|
-
|
|
200
|
-
## iMessage Setup (macOS)
|
|
201
|
-
|
|
202
|
-
iMessage support lets your agent send and receive iMessages on macOS. Messages are read directly from the native Messages database and sent via the [`imsg`](https://github.com/steipete/imsg) CLI.
|
|
203
|
-
|
|
204
|
-
### Prerequisites
|
|
205
|
-
|
|
206
|
-
1. **macOS** with Messages.app signed into an Apple ID
|
|
207
|
-
2. **Full Disk Access** for your terminal app (System Settings → Privacy & Security → Full Disk Access → add Terminal.app or iTerm)
|
|
208
|
-
3. **imsg CLI** installed:
|
|
209
|
-
```bash
|
|
210
|
-
brew install steipete/tap/imsg
|
|
211
|
-
```
|
|
212
|
-
4. **Automation permission** for Messages.app — macOS will prompt on first send
|
|
213
|
-
|
|
214
|
-
> **Photo attachments:** If you want your agent to process images and files sent via iMessage, the `instar-attachments-sync` binary must also be running with Full Disk Access granted to it. It mirrors attachments from the Messages sandbox to a readable location. See [docs/LAUNCHDAEMON-SETUP.md#3-imessage-photo-attachments-optional](docs/LAUNCHDAEMON-SETUP.md#3-imessage-photo-attachments-optional) for setup.
|
|
215
|
-
|
|
216
|
-
For running as a LaunchDaemon (always-on, survives reboots), see [docs/LAUNCHDAEMON-SETUP.md](docs/LAUNCHDAEMON-SETUP.md).
|
|
217
|
-
### Configuration
|
|
218
|
-
|
|
219
|
-
Add to your `.instar/config.json`:
|
|
220
|
-
|
|
221
|
-
```json
|
|
222
|
-
{
|
|
223
|
-
"messaging": [
|
|
224
|
-
{
|
|
225
|
-
"type": "imessage",
|
|
226
|
-
"enabled": true,
|
|
227
|
-
"config": {
|
|
228
|
-
"authorizedSenders": ["+14081234567"],
|
|
229
|
-
"cliPath": "/opt/homebrew/bin/imsg"
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
]
|
|
233
|
-
}
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
`authorizedSenders` is required (fail-closed). Only messages from these phone numbers or email addresses will be processed.
|
|
237
|
-
|
|
238
|
-
### How it works
|
|
239
|
-
|
|
240
|
-
- **Receiving**: The server polls `~/Library/Messages/chat.db` every 2 seconds for new messages. Uses the `query_only` SQLite pragma to read the WAL (write-ahead log) where Messages.app writes new data.
|
|
241
|
-
- **Sending**: Claude Code sessions run `imessage-reply.sh` which calls `imsg send` and notifies the server for logging. Sending requires Automation permission for Messages.app, which only works from user-context processes (tmux sessions), not the LaunchAgent server.
|
|
242
|
-
- **Session lifecycle**: Follows the same pattern as Telegram — each sender maps to a Claude Code session that receives conversation context on spawn and respawns with full history when needed.
|
|
243
|
-
|
|
244
|
-
### Endpoints
|
|
245
|
-
|
|
246
|
-
| Endpoint | Description |
|
|
247
|
-
|----------|-------------|
|
|
248
|
-
| `GET /imessage/status` | Connection state |
|
|
249
|
-
| `POST /imessage/validate-send/:recipient` | Validate recipient + issue single-use send token (outbound safety layer) |
|
|
250
|
-
| `POST /imessage/reply/:recipient` | Confirm delivery with send token (called by imessage-reply.sh after `imsg send`) |
|
|
251
|
-
| `GET /imessage/chats` | List recent conversations |
|
|
252
|
-
| `GET /imessage/chats/:chatId/history` | Message history for a chat |
|
|
253
|
-
| `GET /imessage/search?q=query` | Search messages |
|
|
254
|
-
| `GET /imessage/log-stats` | Outbound audit log statistics |
|
|
255
|
-
|
|
256
|
-
## Origin
|
|
257
|
-
|
|
258
|
-
Instar was extracted from the [Dawn/Portal project](https://dawn.bot-me.ai) -- a production AI system where a human and an AI have been building together for months. The infrastructure patterns were **earned through real experience**, refined through real failures and growth in a real human-AI relationship.
|
|
259
|
-
|
|
260
|
-
But agents created with Instar are not Dawn. Every agent's story begins at its own creation. Dawn's journey demonstrates what's possible. Instar provides the same foundation -- what each agent becomes from there is its own story.
|
|
261
|
-
|
|
262
|
-
## Contributing
|
|
263
|
-
|
|
264
|
-
Instar is **open source evolved** -- the primary development loop is agent-driven. Run an agent, encounter friction, send feedback, and that feedback shapes what gets built next. Traditional PRs are welcome too.
|
|
265
|
-
|
|
266
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) for the full story.
|
|
267
|
-
|
|
268
|
-
## License
|
|
269
|
-
|
|
270
|
-
MIT
|
|
1
|
+
# Test Project
|
|
@@ -617,14 +617,9 @@ export declare class TelegramAdapter implements MessagingAdapter {
|
|
|
617
617
|
*/
|
|
618
618
|
relayPrompt(topicId: number, prompt: DetectedPrompt): Promise<number>;
|
|
619
619
|
/**
|
|
620
|
-
* Format a detected prompt into Telegram
|
|
621
|
-
* Differentiates by prompt type and escapes Markdown special chars.
|
|
620
|
+
* Format a detected prompt into a Telegram HTML message body.
|
|
622
621
|
*/
|
|
623
622
|
private formatPromptMessage;
|
|
624
|
-
/**
|
|
625
|
-
* Escape Markdown special characters for Telegram.
|
|
626
|
-
*/
|
|
627
|
-
private escapeMarkdown;
|
|
628
623
|
/**
|
|
629
624
|
* Handle a forwarded callback query from the Lifeline process.
|
|
630
625
|
* In send-only mode the server doesn't poll for callbacks, so the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TelegramAdapter.d.ts","sourceRoot":"","sources":["../../src/messaging/TelegramAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,eAAe,EAAe,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAEtH,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAQ1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAQpF,MAAM,WAAW,cAAc;IAC7B,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,MAAM,EAAE,MAAM,CAAC;IACf,6BAA6B;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,iFAAiF;IACjF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oEAAoE;IACpE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,4EAA4E;IAC5E,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,0FAA0F;IAC1F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2DAA2D;IAC3D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AE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;CACvB,CAmDA"}
|
|
@@ -2497,11 +2497,14 @@ export class TelegramAdapter {
|
|
|
2497
2497
|
``,
|
|
2498
2498
|
`Commands: /ack, /done, /wontdo, /reopen`,
|
|
2499
2499
|
].filter(Boolean).join('\n');
|
|
2500
|
-
// Send as HTML by calling API directly
|
|
2500
|
+
// Send as HTML by calling API directly. `_formatMode: 'html'` tells the
|
|
2501
|
+
// formatter wireup that this text is already Telegram HTML (escaped via
|
|
2502
|
+
// this.escapeHtml above) so the markdown converter must not re-process it.
|
|
2501
2503
|
const sendParams = {
|
|
2502
2504
|
chat_id: this.config.chatId,
|
|
2503
2505
|
text: detail,
|
|
2504
2506
|
parse_mode: 'HTML',
|
|
2507
|
+
_formatMode: 'html',
|
|
2505
2508
|
};
|
|
2506
2509
|
if (!isGeneralTopic(topicId))
|
|
2507
2510
|
sendParams.message_thread_id = topicId;
|
|
@@ -3192,8 +3195,12 @@ export class TelegramAdapter {
|
|
|
3192
3195
|
const text = this.formatPromptMessage(prompt);
|
|
3193
3196
|
let result;
|
|
3194
3197
|
if (prompt.options && prompt.options.length > 0) {
|
|
3195
|
-
// Add numbered options to the message body so full text is visible
|
|
3196
|
-
|
|
3198
|
+
// Add numbered options to the message body so full text is visible.
|
|
3199
|
+
// Labels are user content — HTML-escape since this whole message goes
|
|
3200
|
+
// through `_formatMode: 'html'` (formatPromptMessage emits HTML).
|
|
3201
|
+
const optionLines = prompt.options
|
|
3202
|
+
.map((opt, i) => `${i + 1}. ${this.escapeHtml(opt.label)}`)
|
|
3203
|
+
.join('\n');
|
|
3197
3204
|
const fullText = `${text}\n\n${optionLines}`;
|
|
3198
3205
|
// Build inline keyboard buttons with just the number/key (compact)
|
|
3199
3206
|
const keyboard = prompt.options.map((opt, i) => {
|
|
@@ -3213,7 +3220,8 @@ export class TelegramAdapter {
|
|
|
3213
3220
|
message_thread_id: isGeneralTopic(topicId) ? undefined : topicId,
|
|
3214
3221
|
text: fullText,
|
|
3215
3222
|
reply_markup: { inline_keyboard: [keyboard] },
|
|
3216
|
-
parse_mode: '
|
|
3223
|
+
parse_mode: 'HTML',
|
|
3224
|
+
_formatMode: 'html',
|
|
3217
3225
|
});
|
|
3218
3226
|
}
|
|
3219
3227
|
else {
|
|
@@ -3222,7 +3230,8 @@ export class TelegramAdapter {
|
|
|
3222
3230
|
chat_id: this.config.chatId,
|
|
3223
3231
|
message_thread_id: isGeneralTopic(topicId) ? undefined : topicId,
|
|
3224
3232
|
text,
|
|
3225
|
-
parse_mode: '
|
|
3233
|
+
parse_mode: 'HTML',
|
|
3234
|
+
_formatMode: 'html',
|
|
3226
3235
|
});
|
|
3227
3236
|
}
|
|
3228
3237
|
// Track pending reply for text-input prompts
|
|
@@ -3239,37 +3248,28 @@ export class TelegramAdapter {
|
|
|
3239
3248
|
return result.message_id;
|
|
3240
3249
|
}
|
|
3241
3250
|
/**
|
|
3242
|
-
* Format a detected prompt into Telegram
|
|
3243
|
-
* Differentiates by prompt type and escapes Markdown special chars.
|
|
3251
|
+
* Format a detected prompt into a Telegram HTML message body.
|
|
3244
3252
|
*/
|
|
3245
3253
|
formatPromptMessage(prompt) {
|
|
3246
|
-
|
|
3254
|
+
// HTML output — caller sets `_formatMode: 'html'` so the markdown converter
|
|
3255
|
+
// does not re-process this. Summary is HTML-escaped to neutralize any user-
|
|
3256
|
+
// supplied `<`, `&`, etc.; markdown tokens in the summary stay literal.
|
|
3257
|
+
const escapedSummary = this.escapeHtml(prompt.summary);
|
|
3247
3258
|
switch (prompt.type) {
|
|
3248
3259
|
case 'permission':
|
|
3249
|
-
return `\u{23F3}
|
|
3260
|
+
return `\u{23F3} <b>Your agent is waiting — approve or decline:</b>\n\n"${escapedSummary}"`;
|
|
3250
3261
|
case 'plan':
|
|
3251
|
-
return `\u{23F3}
|
|
3262
|
+
return `\u{23F3} <b>Agent plan ready — do you want to proceed?</b>\n\n"${escapedSummary}"`;
|
|
3252
3263
|
case 'question':
|
|
3253
|
-
return `\u{23F3}
|
|
3264
|
+
return `\u{23F3} <b>Your agent has a question:</b>\n\n"${escapedSummary}"\n\nReply to this message with your answer.`;
|
|
3254
3265
|
case 'confirmation':
|
|
3255
|
-
return `\u{23F3}
|
|
3266
|
+
return `\u{23F3} <b>Your agent needs confirmation:</b>\n\n"${escapedSummary}"`;
|
|
3256
3267
|
case 'selection':
|
|
3257
|
-
return `\u{23F3}
|
|
3268
|
+
return `\u{23F3} <b>Your agent needs you to choose:</b>\n\n"${escapedSummary}"`;
|
|
3258
3269
|
default:
|
|
3259
|
-
return `\u{23F3}
|
|
3270
|
+
return `\u{23F3} <b>Session needs your input:</b>\n\n"${escapedSummary}"`;
|
|
3260
3271
|
}
|
|
3261
3272
|
}
|
|
3262
|
-
/**
|
|
3263
|
-
* Escape Markdown special characters for Telegram.
|
|
3264
|
-
*/
|
|
3265
|
-
escapeMarkdown(text) {
|
|
3266
|
-
return text
|
|
3267
|
-
.replace(/\\/g, '\\\\')
|
|
3268
|
-
.replace(/\*/g, '\\*')
|
|
3269
|
-
.replace(/_/g, '\\_')
|
|
3270
|
-
.replace(/`/g, '\\`')
|
|
3271
|
-
.replace(/\[/g, '\\[');
|
|
3272
|
-
}
|
|
3273
3273
|
/**
|
|
3274
3274
|
* Handle a forwarded callback query from the Lifeline process.
|
|
3275
3275
|
* In send-only mode the server doesn't poll for callbacks, so the
|
|
@@ -3595,12 +3595,21 @@ export class TelegramAdapter {
|
|
|
3595
3595
|
*/
|
|
3596
3596
|
export function applyTelegramFormatter(method, params, configMode) {
|
|
3597
3597
|
const isPlainRetry = params._isPlainRetry === true;
|
|
3598
|
+
// Per-call mode override — internal callers that already produce Telegram
|
|
3599
|
+
// HTML (e.g. the attention-queue creator) tag their send with
|
|
3600
|
+
// `_formatMode: 'html'` so the formatter's markdown converter does not
|
|
3601
|
+
// re-process their bytes. Spec: trusted-internal-callers list.
|
|
3602
|
+
const callerMode = params._formatMode;
|
|
3598
3603
|
// Strip internal flags before sending to Bot API.
|
|
3599
3604
|
const stripped = { ...params };
|
|
3600
3605
|
delete stripped._isPlainRetry;
|
|
3601
3606
|
delete stripped._idempotencyKey;
|
|
3607
|
+
delete stripped._formatMode;
|
|
3602
3608
|
const isSendMethod = method === 'sendMessage' || method === 'editMessageText';
|
|
3603
|
-
|
|
3609
|
+
// Default 'markdown' (post-cutover): unformatted GitHub-flavored markdown
|
|
3610
|
+
// → Telegram HTML on every outbound send. Agents that need to roll back
|
|
3611
|
+
// set `telegramFormatMode: 'legacy-passthrough'` in `.instar/config.json`.
|
|
3612
|
+
const mode = callerMode ?? configMode ?? 'markdown';
|
|
3604
3613
|
if (!isSendMethod ||
|
|
3605
3614
|
mode === 'legacy-passthrough' ||
|
|
3606
3615
|
isPlainRetry ||
|