instar 0.26.4 → 0.26.5
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 +61 -7
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +143 -1
- package/dist/commands/server.js.map +1 -1
- package/dist/core/SessionManager.d.ts +31 -0
- package/dist/core/SessionManager.d.ts.map +1 -1
- package/dist/core/SessionManager.js +164 -20
- package/dist/core/SessionManager.js.map +1 -1
- package/dist/core/types.d.ts +0 -4
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/messaging/imessage/IMessageAdapter.d.ts +16 -0
- package/dist/messaging/imessage/IMessageAdapter.d.ts.map +1 -1
- package/dist/messaging/imessage/IMessageAdapter.js +60 -2
- package/dist/messaging/imessage/IMessageAdapter.js.map +1 -1
- package/dist/messaging/imessage/types.d.ts +11 -0
- package/dist/messaging/imessage/types.d.ts.map +1 -1
- package/dist/messaging/slack/SlackAdapter.d.ts.map +1 -1
- package/dist/messaging/slack/SlackAdapter.js +46 -12
- package/dist/messaging/slack/SlackAdapter.js.map +1 -1
- package/dist/scaffold/templates.d.ts +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +32 -1
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/server/AgentServer.d.ts +1 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +1 -0
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/routes.d.ts +1 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +155 -0
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +65 -49
- package/src/templates/hooks/intercept-imsg-send.js +68 -0
- package/src/templates/scripts/imessage-reply.sh +130 -0
- package/upgrades/0.26.5.md +15 -0
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<h1 align="center">instar</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
<strong>Persistent Claude Code agents with scheduling, sessions, memory, and
|
|
8
|
+
<strong>Persistent Claude Code agents with scheduling, sessions, memory, and messaging.</strong>
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
npx instar
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
One command. Guided setup. Talking to your agent from
|
|
34
|
+
One command. Guided setup. Talking to your agent from your phone within minutes.
|
|
35
35
|
|
|
36
36
|
---
|
|
37
37
|
|
|
38
|
-
Instar turns Claude Code from a powerful CLI tool into a **coherent, autonomous partner**. Persistent identity, memory that survives every restart, job scheduling, two-way Telegram
|
|
38
|
+
Instar turns Claude Code from a powerful CLI tool into a **coherent, autonomous partner**. Persistent identity, memory that survives every restart, job scheduling, two-way messaging (Telegram, WhatsApp, iMessage), and the infrastructure to evolve.
|
|
39
39
|
|
|
40
40
|
## Quick Start
|
|
41
41
|
|
|
@@ -48,10 +48,10 @@ npx instar
|
|
|
48
48
|
# 2. Start your agent
|
|
49
49
|
instar server start
|
|
50
50
|
|
|
51
|
-
# 3. Message it
|
|
51
|
+
# 3. Message it from your phone — it responds, runs jobs, and remembers everything
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
The wizard discovers your environment, configures messaging (Telegram and/or
|
|
54
|
+
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.**
|
|
55
55
|
|
|
56
56
|
**Requirements:** Node.js 20+ · [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) · [API key](https://console.anthropic.com/) or Claude subscription
|
|
57
57
|
|
|
@@ -60,7 +60,7 @@ The wizard discovers your environment, configures messaging (Telegram and/or Wha
|
|
|
60
60
|
## How It Works
|
|
61
61
|
|
|
62
62
|
```
|
|
63
|
-
You (Telegram / WhatsApp / Terminal)
|
|
63
|
+
You (Telegram / WhatsApp / iMessage / Terminal)
|
|
64
64
|
│
|
|
65
65
|
conversation
|
|
66
66
|
│
|
|
@@ -103,6 +103,7 @@ Instar solves the six dimensions of agent coherence:
|
|
|
103
103
|
| **Job Scheduler** | Cron-based tasks with priority levels, model tiering, and quota awareness | [→](https://instar.sh/features/scheduler/) |
|
|
104
104
|
| **Telegram** | Two-way messaging via forum topics. Each topic maps to a Claude session | [→](https://instar.sh/features/telegram/) |
|
|
105
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) | |
|
|
106
107
|
| **Lifeline** | Persistent supervisor. Detects crashes, auto-recovers, queues messages | [→](https://instar.sh/features/lifeline/) |
|
|
107
108
|
| **Conversational Memory** | Per-topic SQLite with FTS5, rolling summaries, context re-injection | [→](https://instar.sh/features/memory/) |
|
|
108
109
|
| **Evolution System** | Proposals, learnings, gap tracking, commitment follow-through | [→](https://instar.sh/features/evolution/) |
|
|
@@ -158,7 +159,7 @@ Different tools solve different problems. Here's where Instar fits:
|
|
|
158
159
|
| **Persistence** | Multi-layered memory across sessions | Session-bound context | Plugin-based memory | Framework-dependent |
|
|
159
160
|
| **Identity** | Hooks enforce identity at every boundary | Manual CLAUDE.md | Not addressed | Not addressed |
|
|
160
161
|
| **Scheduling** | Native cron with priority & quotas | None | None | External required |
|
|
161
|
-
| **Messaging** | Telegram + WhatsApp (two-way) | None | 22+ channels, voice, device apps | External required |
|
|
162
|
+
| **Messaging** | Telegram + WhatsApp + iMessage (two-way) | None | 22+ channels, voice, device apps | External required |
|
|
162
163
|
| **Safety** | LLM-supervised gates, decision journaling | Permission prompts | Behavioral hooks | Guardrails libraries |
|
|
163
164
|
| **Process model** | One process per session, isolated | Single process | All agents in one Gateway | Single orchestrator |
|
|
164
165
|
| **State storage** | 100% file-based (JSON/JSONL/SQLite) | Session only | Database-backed | Framework-dependent |
|
|
@@ -197,6 +198,59 @@ The AI systems we build today set precedents for how AI is treated tomorrow. **T
|
|
|
197
198
|
|
|
198
199
|
</details>
|
|
199
200
|
|
|
201
|
+
## iMessage Setup (macOS)
|
|
202
|
+
|
|
203
|
+
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.
|
|
204
|
+
|
|
205
|
+
### Prerequisites
|
|
206
|
+
|
|
207
|
+
1. **macOS** with Messages.app signed into an Apple ID
|
|
208
|
+
2. **Full Disk Access** for your terminal app (System Settings → Privacy & Security → Full Disk Access → add Terminal.app or iTerm)
|
|
209
|
+
3. **imsg CLI** installed:
|
|
210
|
+
```bash
|
|
211
|
+
brew install steipete/tap/imsg
|
|
212
|
+
```
|
|
213
|
+
4. **Automation permission** for Messages.app — macOS will prompt on first send
|
|
214
|
+
|
|
215
|
+
### Configuration
|
|
216
|
+
|
|
217
|
+
Add to your `.instar/config.json`:
|
|
218
|
+
|
|
219
|
+
```json
|
|
220
|
+
{
|
|
221
|
+
"messaging": [
|
|
222
|
+
{
|
|
223
|
+
"type": "imessage",
|
|
224
|
+
"enabled": true,
|
|
225
|
+
"config": {
|
|
226
|
+
"authorizedSenders": ["+14081234567"],
|
|
227
|
+
"cliPath": "/opt/homebrew/bin/imsg"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
`authorizedSenders` is required (fail-closed). Only messages from these phone numbers or email addresses will be processed.
|
|
235
|
+
|
|
236
|
+
### How it works
|
|
237
|
+
|
|
238
|
+
- **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.
|
|
239
|
+
- **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.
|
|
240
|
+
- **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.
|
|
241
|
+
|
|
242
|
+
### Endpoints
|
|
243
|
+
|
|
244
|
+
| Endpoint | Description |
|
|
245
|
+
|----------|-------------|
|
|
246
|
+
| `GET /imessage/status` | Connection state |
|
|
247
|
+
| `POST /imessage/validate-send/:recipient` | Validate recipient + issue single-use send token (outbound safety layer) |
|
|
248
|
+
| `POST /imessage/reply/:recipient` | Confirm delivery with send token (called by imessage-reply.sh after `imsg send`) |
|
|
249
|
+
| `GET /imessage/chats` | List recent conversations |
|
|
250
|
+
| `GET /imessage/chats/:chatId/history` | Message history for a chat |
|
|
251
|
+
| `GET /imessage/search?q=query` | Search messages |
|
|
252
|
+
| `GET /imessage/log-stats` | Outbound audit log statistics |
|
|
253
|
+
|
|
200
254
|
## Origin
|
|
201
255
|
|
|
202
256
|
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.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA0PH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA0PH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAgzCD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA6qHtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
|
package/dist/commands/server.js
CHANGED
|
@@ -1017,6 +1017,115 @@ function wireWhatsAppRouting(whatsapp, sessionManager) {
|
|
|
1017
1017
|
}
|
|
1018
1018
|
});
|
|
1019
1019
|
}
|
|
1020
|
+
/**
|
|
1021
|
+
* Wire iMessage message routing — mirrors Telegram's session patterns exactly.
|
|
1022
|
+
*
|
|
1023
|
+
* Routes incoming iMessages to Claude Code sessions using the same flow as Telegram:
|
|
1024
|
+
* 1. Existing alive session → injectIMessageMessage (with pendingInjections tracking)
|
|
1025
|
+
* 2. Existing dead session → respawn via spawnInteractiveSession(bootstrapMessage)
|
|
1026
|
+
* 3. No session → auto-spawn via spawnInteractiveSession(bootstrapMessage)
|
|
1027
|
+
*
|
|
1028
|
+
* Key design: the bootstrap message (with inline context) is passed as the
|
|
1029
|
+
* initialMessage to spawnInteractiveSession, which handles wait-for-ready and
|
|
1030
|
+
* injection internally — the same code path that Telegram uses successfully.
|
|
1031
|
+
*/
|
|
1032
|
+
function wireIMessageRouting(imessage, sessionManager) {
|
|
1033
|
+
const spawningSenders = new Set();
|
|
1034
|
+
// Wire session alive check for stall detection
|
|
1035
|
+
imessage.setIsSessionAlive((sessionName) => sessionManager.isSessionAlive(sessionName));
|
|
1036
|
+
const replyScript = '.claude/scripts/imessage-reply.sh';
|
|
1037
|
+
/**
|
|
1038
|
+
* Build a bootstrap message for spawning an iMessage session.
|
|
1039
|
+
* Follows Telegram's spawnSessionForTopic pattern: context is INLINE in the
|
|
1040
|
+
* bootstrap message, not a file reference. For long messages, writes to a temp
|
|
1041
|
+
* file with a strong read instruction (matching Telegram's BOOTSTRAP_FILE_THRESHOLD).
|
|
1042
|
+
*/
|
|
1043
|
+
function buildBootstrapMessage(sender, text, senderName) {
|
|
1044
|
+
// Get conversation history from chat.db (includes both user AND agent messages)
|
|
1045
|
+
const conversationContext = imessage.getConversationContext(sender, 30);
|
|
1046
|
+
const parts = [];
|
|
1047
|
+
if (conversationContext) {
|
|
1048
|
+
parts.push(`CONTINUATION — You are resuming an EXISTING conversation via iMessage.`, `Read the context below before responding.`, ``, conversationContext, ``, `IMPORTANT: Your response MUST acknowledge and continue the conversation above. Do NOT introduce yourself or ask "how can I help" — the user has been talking to you. Pick up where the conversation left off.`, ``);
|
|
1049
|
+
}
|
|
1050
|
+
// Sanitize sender name to prevent injection via chat.db display_name
|
|
1051
|
+
const safeSenderName = senderName ? senderName.replace(/[\[\]`$\\]/g, '') : undefined;
|
|
1052
|
+
// iMessage relay instructions
|
|
1053
|
+
parts.push(`--- iMessage SESSION (${sender}) ---`, `This is a PERSISTENT conversational session via iMessage.`, `MANDATORY: After EVERY response, relay your message back to the user:`, ` cat <<'EOF' | ${replyScript} "${sender}"`, ` Your response text here`, ` EOF`, ``, `CRITICAL: After replying, STAY AT THE PROMPT and wait for follow-up messages.`, `Do NOT exit. More messages will be injected as [imessage:${sender}] prefixed text.`, `Strip the [imessage:...] prefix before interpreting messages.`, `Only relay conversational text — not tool output or internal reasoning.`, `--- END iMessage SESSION ---`, ``, `The user's latest message:`, `[imessage:${sender}${safeSenderName ? ` from ${safeSenderName}` : ''}] ${text}`);
|
|
1054
|
+
let bootstrapMessage = parts.join('\n');
|
|
1055
|
+
// Large bootstrap messages: write to temp file with strong read instruction
|
|
1056
|
+
// (matches Telegram's BOOTSTRAP_FILE_THRESHOLD pattern)
|
|
1057
|
+
const BOOTSTRAP_FILE_THRESHOLD = 500;
|
|
1058
|
+
if (bootstrapMessage.length > BOOTSTRAP_FILE_THRESHOLD) {
|
|
1059
|
+
const tmpDir = '/tmp/instar-imessage';
|
|
1060
|
+
fs.mkdirSync(tmpDir, { recursive: true, mode: 0o700 });
|
|
1061
|
+
// Clean up old temp files (>1 hour) to prevent unbounded accumulation
|
|
1062
|
+
try {
|
|
1063
|
+
const cutoff = Date.now() - 3_600_000;
|
|
1064
|
+
for (const f of fs.readdirSync(tmpDir)) {
|
|
1065
|
+
const fp = path.join(tmpDir, f);
|
|
1066
|
+
try {
|
|
1067
|
+
if (fs.statSync(fp).mtimeMs < cutoff)
|
|
1068
|
+
fs.unlinkSync(fp);
|
|
1069
|
+
}
|
|
1070
|
+
catch { /* ignore */ }
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
catch { /* non-critical */ }
|
|
1074
|
+
const senderSlug = sender.replace(/[^a-zA-Z0-9]/g, '').slice(-8);
|
|
1075
|
+
const filepath = path.join(tmpDir, `bootstrap-${senderSlug}-${Date.now()}-${Math.random().toString(36).slice(2, 8)}.txt`);
|
|
1076
|
+
fs.writeFileSync(filepath, bootstrapMessage, { mode: 0o600 });
|
|
1077
|
+
console.log(`[imessage→session] Bootstrap too large (${bootstrapMessage.length} chars), wrote to ${filepath}`);
|
|
1078
|
+
bootstrapMessage = `[IMPORTANT: Read ${filepath} — it contains your full session context, conversation history, and the user's latest message. You MUST read this file before responding.]`;
|
|
1079
|
+
}
|
|
1080
|
+
return bootstrapMessage;
|
|
1081
|
+
}
|
|
1082
|
+
imessage.onMessage(async (msg) => {
|
|
1083
|
+
const sender = msg.channel?.identifier;
|
|
1084
|
+
if (!sender)
|
|
1085
|
+
return;
|
|
1086
|
+
const text = msg.content;
|
|
1087
|
+
const senderName = msg.metadata?.senderName ?? undefined;
|
|
1088
|
+
const senderNorm = sender.toLowerCase();
|
|
1089
|
+
// Skip empty messages (reactions, read receipts, lookback artifacts)
|
|
1090
|
+
if (!text || !text.trim())
|
|
1091
|
+
return;
|
|
1092
|
+
// Check for existing session
|
|
1093
|
+
const targetSession = imessage.getSessionForSender(sender);
|
|
1094
|
+
// Guard: skip if spawn already in progress for this sender
|
|
1095
|
+
if (spawningSenders.has(senderNorm)) {
|
|
1096
|
+
console.log(`[imessage→session] Spawn already in progress for ${senderNorm} — skipping`);
|
|
1097
|
+
return;
|
|
1098
|
+
}
|
|
1099
|
+
if (targetSession && sessionManager.isSessionAlive(targetSession)) {
|
|
1100
|
+
// Session alive — inject directly (same as Telegram's injectTelegramMessage path)
|
|
1101
|
+
console.log(`[imessage→session] Injecting into ${targetSession}: "${text.slice(0, 80)}"`);
|
|
1102
|
+
sessionManager.injectIMessageMessage(targetSession, sender, text, senderName);
|
|
1103
|
+
imessage.trackMessageInjection(sender, targetSession, text);
|
|
1104
|
+
}
|
|
1105
|
+
else {
|
|
1106
|
+
// Session dead or missing — spawn with full context (same as Telegram's spawnSessionForTopic)
|
|
1107
|
+
spawningSenders.add(senderNorm);
|
|
1108
|
+
// Use a hash of the full sender to avoid collisions (slice(-6) collides easily)
|
|
1109
|
+
const crypto = await import('node:crypto');
|
|
1110
|
+
const senderHash = crypto.createHash('sha1').update(sender.toLowerCase()).digest('hex').slice(0, 8);
|
|
1111
|
+
const sessionName = `im-${senderHash}`;
|
|
1112
|
+
const bootstrapMessage = buildBootstrapMessage(sender, text, senderName);
|
|
1113
|
+
// Pass bootstrap as initialMessage — spawnInteractiveSession handles
|
|
1114
|
+
// wait-for-ready and injection internally (same code path as Telegram)
|
|
1115
|
+
sessionManager.spawnInteractiveSession(bootstrapMessage, sessionName)
|
|
1116
|
+
.then((newSession) => {
|
|
1117
|
+
imessage.registerSession(sender, newSession);
|
|
1118
|
+
console.log(`[imessage→session] Spawned "${newSession}" for ${imessage.constructor.maskIdentifier?.(sender) || sender}`);
|
|
1119
|
+
})
|
|
1120
|
+
.catch((err) => {
|
|
1121
|
+
console.error(`[imessage→session] Spawn failed:`, err);
|
|
1122
|
+
})
|
|
1123
|
+
.finally(() => {
|
|
1124
|
+
spawningSenders.delete(senderNorm);
|
|
1125
|
+
});
|
|
1126
|
+
}
|
|
1127
|
+
});
|
|
1128
|
+
}
|
|
1020
1129
|
/**
|
|
1021
1130
|
* Ensure the Agent Attention topic exists — the agent's direct line to the user.
|
|
1022
1131
|
* Created once on first server start, persisted in state.
|
|
@@ -2617,6 +2726,39 @@ export async function startServer(options) {
|
|
|
2617
2726
|
});
|
|
2618
2727
|
}
|
|
2619
2728
|
}
|
|
2729
|
+
// ── iMessage adapter initialization ────────────────────────────────
|
|
2730
|
+
let imessageAdapter;
|
|
2731
|
+
const imessageConfig = config.messaging?.find(m => m.type === 'imessage' && m.enabled);
|
|
2732
|
+
if (imessageConfig) {
|
|
2733
|
+
try {
|
|
2734
|
+
const { IMessageAdapter } = await import('../messaging/imessage/index.js');
|
|
2735
|
+
imessageAdapter = new IMessageAdapter(imessageConfig.config, config.stateDir);
|
|
2736
|
+
// Wire session routing (following Telegram/WhatsApp pattern)
|
|
2737
|
+
wireIMessageRouting(imessageAdapter, sessionManager);
|
|
2738
|
+
// Set agent name for mention-based triggering
|
|
2739
|
+
const imAgentName = imessageConfig.config?.agentName || config.projectName;
|
|
2740
|
+
if (imAgentName)
|
|
2741
|
+
imessageAdapter.setAgentName(imAgentName);
|
|
2742
|
+
await imessageAdapter.start();
|
|
2743
|
+
const triggerInfo = imessageAdapter.getTriggerMode() === 'mention'
|
|
2744
|
+
? `trigger: @${imAgentName}`
|
|
2745
|
+
: 'trigger: all messages';
|
|
2746
|
+
console.log(pc.green(` iMessage adapter: connected (${triggerInfo})`));
|
|
2747
|
+
console.log(pc.green(' iMessage message routing: wired'));
|
|
2748
|
+
}
|
|
2749
|
+
catch (err) {
|
|
2750
|
+
const reason = err instanceof Error ? err.message : String(err);
|
|
2751
|
+
console.error(pc.red(` iMessage init failed: ${reason}`));
|
|
2752
|
+
imessageAdapter = undefined;
|
|
2753
|
+
degradationReporter.report({
|
|
2754
|
+
feature: 'iMessage',
|
|
2755
|
+
primary: 'iMessage messaging adapter',
|
|
2756
|
+
fallback: 'Other messaging channels',
|
|
2757
|
+
reason: `iMessage init failed: ${reason}`,
|
|
2758
|
+
impact: 'iMessage messaging unavailable.',
|
|
2759
|
+
});
|
|
2760
|
+
}
|
|
2761
|
+
}
|
|
2620
2762
|
// Initialize SemanticMemory — the knowledge graph that unifies all memory systems.
|
|
2621
2763
|
// Uses the same better-sqlite3 as TopicMemory; shares the rebuild path.
|
|
2622
2764
|
let semanticMemory;
|
|
@@ -4451,7 +4593,7 @@ export async function startServer(options) {
|
|
|
4451
4593
|
return { content: lines.join('\n'), truncated: false, elapsedMs: Date.now() - start };
|
|
4452
4594
|
}, { description: 'Feature discovery state and behavioral contract summary' });
|
|
4453
4595
|
}
|
|
4454
|
-
const server = new AgentServer({ config, sessionManager, state, scheduler, telegram, relationships, feedback, feedbackAnomalyDetector, dispatches, updateChecker, autoUpdater, autoDispatcher, quotaTracker, quotaManager, publisher, viewer, tunnel, evolution, watchdog, topicMemory, triageNurse, projectMapper, coherenceGate: scopeVerifier, contextHierarchy, canonicalState, operationGate, sentinel, adaptiveTrust, memoryMonitor, orphanReaper, coherenceMonitor, commitmentTracker, semanticMemory, activitySentinel, messageRouter, summarySentinel, spawnManager, systemReviewer, capabilityMapper, selfKnowledgeTree, coverageAuditor, topicResumeMap: _topicResumeMap ?? undefined, autonomyManager, trustElevationTracker, autonomousEvolution, coordinator: coordinator.enabled ? coordinator : undefined, localSigningKeyPem, whatsapp: whatsappAdapter, slack: slackAdapter, whatsappBusinessBackend, messageBridge, hookEventReceiver, worktreeMonitor, subagentTracker, instructionsVerifier, handshakeManager: threadlineHandshake, threadlineRouter, threadlineRelayClient, listenerManager: listenerManager ?? undefined, responseReviewGate, telemetryHeartbeat, pasteManager, featureRegistry, discoveryEvaluator, liveConfig });
|
|
4596
|
+
const server = new AgentServer({ config, sessionManager, state, scheduler, telegram, relationships, feedback, feedbackAnomalyDetector, dispatches, updateChecker, autoUpdater, autoDispatcher, quotaTracker, quotaManager, publisher, viewer, tunnel, evolution, watchdog, topicMemory, triageNurse, projectMapper, coherenceGate: scopeVerifier, contextHierarchy, canonicalState, operationGate, sentinel, adaptiveTrust, memoryMonitor, orphanReaper, coherenceMonitor, commitmentTracker, semanticMemory, activitySentinel, messageRouter, summarySentinel, spawnManager, systemReviewer, capabilityMapper, selfKnowledgeTree, coverageAuditor, topicResumeMap: _topicResumeMap ?? undefined, autonomyManager, trustElevationTracker, autonomousEvolution, coordinator: coordinator.enabled ? coordinator : undefined, localSigningKeyPem, whatsapp: whatsappAdapter, slack: slackAdapter, imessage: imessageAdapter, whatsappBusinessBackend, messageBridge, hookEventReceiver, worktreeMonitor, subagentTracker, instructionsVerifier, handshakeManager: threadlineHandshake, threadlineRouter, threadlineRelayClient, listenerManager: listenerManager ?? undefined, responseReviewGate, telemetryHeartbeat, pasteManager, featureRegistry, discoveryEvaluator, liveConfig });
|
|
4455
4597
|
await server.start();
|
|
4456
4598
|
// Connect DegradationReporter downstream systems now that everything is initialized.
|
|
4457
4599
|
// Any degradation events queued during startup will drain to feedback + telegram.
|