archer-wizard 0.2.0 → 0.2.2
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/ARCHITECTURE.md +378 -0
- package/README.md +72 -46
- package/dist/lib/ascii.js +1 -1
- package/dist/lib/ascii.js.map +1 -1
- package/dist/types/index.d.ts +1 -5
- package/dist/types/index.d.ts.map +1 -1
- package/dist/wizard/detector.js +3 -3
- package/dist/wizard/detector.js.map +1 -1
- package/dist/wizard/index.d.ts.map +1 -1
- package/dist/wizard/index.js +57 -23
- package/dist/wizard/index.js.map +1 -1
- package/dist/wizard/injector.d.ts.map +1 -1
- package/dist/wizard/injector.js +17 -7
- package/dist/wizard/injector.js.map +1 -1
- package/dist/wizard/rules.d.ts.map +1 -1
- package/dist/wizard/rules.js +50 -28
- package/dist/wizard/rules.js.map +1 -1
- package/dist/wizard/scanner.d.ts.map +1 -1
- package/dist/wizard/scanner.js +0 -23
- package/dist/wizard/scanner.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/ascii.ts +1 -1
- package/src/types/index.ts +1 -5
- package/src/wizard/detector.ts +3 -3
- package/src/wizard/index.ts +54 -24
- package/src/wizard/injector.ts +23 -7
- package/src/wizard/rules.ts +50 -28
- package/src/wizard/scanner.ts +0 -23
package/ARCHITECTURE.md
ADDED
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
# Archer MCP — Complete Architecture Deep Dive
|
|
2
|
+
|
|
3
|
+
Archer is an **MCP server + persistent daemon** system that gives AI agents real-time event intelligence over Supabase databases. It operates in two modes: a **setup wizard** (interactive CLI) and an **MCP server** (stdio transport for AI agents), backed by a **TCP daemon** that holds Supabase Realtime channels independently of agent sessions.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## High-Level Architecture
|
|
8
|
+
|
|
9
|
+
```mermaid
|
|
10
|
+
graph TB
|
|
11
|
+
subgraph "User's Machine"
|
|
12
|
+
CLI["npx archer-wizard<br/>(wizard mode)"]
|
|
13
|
+
MCP["MCP Server<br/>(--mcp mode)"]
|
|
14
|
+
Daemon["Daemon Process<br/>(detached, TCP :44380)"]
|
|
15
|
+
State["~/.archer/state.json"]
|
|
16
|
+
PID["~/.archer/daemon.pid"]
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
subgraph "Agent Configs"
|
|
20
|
+
Cursor["Cursor mcp.json"]
|
|
21
|
+
Claude["Claude Desktop config"]
|
|
22
|
+
Windsurf["Windsurf mcp_config.json"]
|
|
23
|
+
OpenCode["OpenCode config"]
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
subgraph "External"
|
|
27
|
+
Supabase["Supabase Realtime"]
|
|
28
|
+
Webhook["User Webhook URLs"]
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
CLI -->|"scans .env files"| CLI
|
|
32
|
+
CLI -->|"injects archer entry"| Cursor & Claude & Windsurf & OpenCode
|
|
33
|
+
|
|
34
|
+
MCP -->|"TCP IPC"| Daemon
|
|
35
|
+
Daemon -->|"persists"| State
|
|
36
|
+
Daemon -->|"writes"| PID
|
|
37
|
+
Daemon -->|"Realtime channels"| Supabase
|
|
38
|
+
Supabase -->|"postgres_changes event"| Daemon
|
|
39
|
+
Daemon -->|"POST payload"| Webhook
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Entry Point — [index.ts](file:///Users/amirlankalmukhan/archer-mcp/src/index.ts)
|
|
45
|
+
|
|
46
|
+
The single entry point routes between two modes based on CLI flags:
|
|
47
|
+
|
|
48
|
+
| Flag | Mode | Function |
|
|
49
|
+
|---|---|---|
|
|
50
|
+
| `--mcp` | MCP Server | Starts stdio MCP server, auto-starts daemon via `ensureDaemon()` |
|
|
51
|
+
| *(none)* | Setup Wizard | Runs interactive `clack`-based CLI setup |
|
|
52
|
+
| `--daemon` | Daemon Process | Internal: starts the TCP daemon directly (used by lifecycle spawner) |
|
|
53
|
+
|
|
54
|
+
**MCP Server setup** registers 3 tools (`archer_watch`, `archer_unwatch`, `archer_watches`) on a `StdioServerTransport`, then calls `ensureDaemon()` to guarantee the background process is running.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Module 1: Daemon (`src/daemon/`)
|
|
59
|
+
|
|
60
|
+
The daemon is the heart of Archer — a **detached Node.js process** that holds Supabase Realtime subscriptions and delivers webhooks, surviving agent session restarts.
|
|
61
|
+
|
|
62
|
+
### IPC Protocol — [types.ts](file:///Users/amirlankalmukhan/archer-mcp/src/daemon/types.ts)
|
|
63
|
+
|
|
64
|
+
Defines JSON-over-TCP protocol on `127.0.0.1:44380`:
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
// Request types (MCP → Daemon)
|
|
68
|
+
type IpcRequestType = 'add_watch' | 'remove_watch' | 'list_watches' | 'ping';
|
|
69
|
+
|
|
70
|
+
// WatchConfig carries everything needed to subscribe
|
|
71
|
+
interface WatchConfig {
|
|
72
|
+
id: string; // UUID
|
|
73
|
+
table: string;
|
|
74
|
+
event: '*' | 'INSERT' | 'UPDATE' | 'DELETE';
|
|
75
|
+
filter?: string;
|
|
76
|
+
webhookUrl: string;
|
|
77
|
+
supabaseUrl: string; // per-watch credentials for multi-project
|
|
78
|
+
supabaseKey: string;
|
|
79
|
+
createdAt: string; // ISO timestamp
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Key constant: `ARCHER_DIR = ~/.archer` — stores `state.json` + `daemon.pid`.
|
|
84
|
+
|
|
85
|
+
### Persistent Store — [store.ts](file:///Users/amirlankalmukhan/archer-mcp/src/daemon/store.ts)
|
|
86
|
+
|
|
87
|
+
Implements **atomic JSON persistence** at `~/.archer/state.json`:
|
|
88
|
+
|
|
89
|
+
- `loadState()` — reads + parses, returns empty `{ watches: {} }` on failure
|
|
90
|
+
- `saveState()` — writes to temp file first, then `fs.renameSync` for atomicity (no partial writes)
|
|
91
|
+
- State shape: `{ watches: Record<string, WatchConfig> }`
|
|
92
|
+
|
|
93
|
+
### TCP Server & Channel Manager — [process.ts](file:///Users/amirlankalmukhan/archer-mcp/src/daemon/process.ts)
|
|
94
|
+
|
|
95
|
+
The main daemon loop (~190 lines). On startup:
|
|
96
|
+
|
|
97
|
+
1. Loads persisted state from `state.json`
|
|
98
|
+
2. **Reconnects all saved watches** — for each `WatchConfig`, creates a Supabase client + Realtime channel
|
|
99
|
+
3. Starts TCP server on port `44380`
|
|
100
|
+
|
|
101
|
+
**IPC request handling:**
|
|
102
|
+
|
|
103
|
+
| Request | Action |
|
|
104
|
+
|---|---|
|
|
105
|
+
| `add_watch` | Creates Supabase client, subscribes to `postgres_changes` channel, saves to state, begins delivering webhooks |
|
|
106
|
+
| `remove_watch` | Unsubscribes channel, removes from in-memory map + state file |
|
|
107
|
+
| `list_watches` | Returns all `WatchConfig` entries from state |
|
|
108
|
+
| `ping` | Returns `{ status: 'ok', watches: count }` |
|
|
109
|
+
|
|
110
|
+
**Channel subscription pattern:**
|
|
111
|
+
- Event `*` → subscribes to `INSERT`, `UPDATE`, `DELETE` separately
|
|
112
|
+
- Specific event → subscribes to just that one
|
|
113
|
+
- Filter support via Supabase's `filter` parameter on `postgres_changes`
|
|
114
|
+
|
|
115
|
+
**Webhook delivery** happens inline on each Realtime event — builds a payload with Archer metadata + the row data, then POSTs to the configured URL with retry logic (3 attempts, 2s delay).
|
|
116
|
+
|
|
117
|
+
### IPC Client — [client.ts](file:///Users/amirlankalmukhan/archer-mcp/src/daemon/client.ts)
|
|
118
|
+
|
|
119
|
+
Used by MCP tools to talk to the daemon:
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
Tool → sendIpcRequest() → TCP connect → JSON write → read response → parse
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
- `connectToDaemon()` — creates a `net.Socket`, connects to `127.0.0.1:44380`
|
|
126
|
+
- `sendIpcRequest()` — sends JSON line, reads response, returns parsed `IpcResponse`
|
|
127
|
+
- 5-second timeout on connections
|
|
128
|
+
|
|
129
|
+
### Lifecycle Manager — [lifecycle.ts](file:///Users/amirlankalmukhan/archer-mcp/src/daemon/lifecycle.ts)
|
|
130
|
+
|
|
131
|
+
Manages the daemon as a detached child process:
|
|
132
|
+
|
|
133
|
+
- `ensureDaemon()` — checks if daemon is already running (PID file + `ping`), spawns if not
|
|
134
|
+
- `startDaemon()` — `child_process.spawn` with `detached: true`, `stdio: 'ignore'`, saves PID file
|
|
135
|
+
- `stopDaemon()` — reads PID file, sends `SIGTERM`, removes PID file
|
|
136
|
+
- `isDaemonRunning()` — reads PID, sends `kill(pid, 0)` to check, falls back to TCP `ping`
|
|
137
|
+
|
|
138
|
+
Spawns: `node dist/daemon/run.js` as a fully detached process.
|
|
139
|
+
|
|
140
|
+
### Runner — [run.ts](file:///Users/amirlankalmukhan/archer-mcp/src/daemon/run.ts)
|
|
141
|
+
|
|
142
|
+
7-line entry point for the detached child process — just imports and calls `startDaemonProcess()`.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Module 2: MCP Tools (`src/tools/`)
|
|
147
|
+
|
|
148
|
+
Three tools exposed via the Model Context Protocol:
|
|
149
|
+
|
|
150
|
+
### archer_watch — [watch.ts](file:///Users/amirlankalmukhan/archer-mcp/src/tools/watch.ts)
|
|
151
|
+
|
|
152
|
+
Creates a persistent real-time watch. Accepts:
|
|
153
|
+
- `table` (required) — Supabase table name
|
|
154
|
+
- `event` — `INSERT` | `UPDATE` | `DELETE` | `*` (default: `*`)
|
|
155
|
+
- `filter` — optional Supabase filter expression
|
|
156
|
+
- `webhookUrl` (required) — destination for event payloads
|
|
157
|
+
|
|
158
|
+
**Flow:** Reads `SUPABASE_URL` + `SUPABASE_SERVICE_ROLE_KEY` from env → generates UUID → builds `WatchConfig` → sends `add_watch` IPC to daemon → returns watch ID to agent.
|
|
159
|
+
|
|
160
|
+
### archer_unwatch — [unwatch.ts](file:///Users/amirlankalmukhan/archer-mcp/src/tools/unwatch.ts)
|
|
161
|
+
|
|
162
|
+
Removes a watch by ID. Sends `remove_watch` IPC to daemon.
|
|
163
|
+
|
|
164
|
+
### archer_watches — [watches.ts](file:///Users/amirlankalmukhan/archer-mcp/src/tools/watches.ts)
|
|
165
|
+
|
|
166
|
+
Lists all active watches. Sends `list_watches` IPC to daemon, formats response as a readable list showing table, event, filter, webhook URL, and creation time.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Module 3: Setup Wizard (`src/wizard/`)
|
|
171
|
+
|
|
172
|
+
Interactive CLI that discovers credentials and injects Archer into AI agent configs.
|
|
173
|
+
|
|
174
|
+
### Orchestrator — [index.ts](file:///Users/amirlankalmukhan/archer-mcp/src/wizard/index.ts)
|
|
175
|
+
|
|
176
|
+
10-step `clack`-based flow:
|
|
177
|
+
|
|
178
|
+
1. Show ASCII art banner
|
|
179
|
+
2. Start clack intro
|
|
180
|
+
3. Scan project for Supabase credentials
|
|
181
|
+
4. Detect project framework (Next.js / Vite)
|
|
182
|
+
5. Prompt for any missing credentials
|
|
183
|
+
6. Detect installed AI agents
|
|
184
|
+
7. Inject Archer MCP config into agents
|
|
185
|
+
8. Filter successful injections
|
|
186
|
+
9. Inject agent rules (tool documentation)
|
|
187
|
+
10. Show success box
|
|
188
|
+
|
|
189
|
+
### Scanner — [scanner.ts](file:///Users/amirlankalmukhan/archer-mcp/src/wizard/scanner.ts)
|
|
190
|
+
|
|
191
|
+
Discovers Supabase credentials from the user's project:
|
|
192
|
+
|
|
193
|
+
**Env file priority:** `.env.local` > `.env` > `.env.development` > `.env.production`
|
|
194
|
+
|
|
195
|
+
**Key aliases searched:**
|
|
196
|
+
| Credential | Aliases |
|
|
197
|
+
|---|---|
|
|
198
|
+
| URL | `SUPABASE_URL`, `NEXT_PUBLIC_SUPABASE_URL`, `VITE_SUPABASE_URL` |
|
|
199
|
+
| Service Key | `SUPABASE_SERVICE_ROLE_KEY`, `SUPABASE_SERVICE_KEY` |
|
|
200
|
+
| Anon Key | `SUPABASE_ANON_KEY`, `NEXT_PUBLIC_SUPABASE_ANON_KEY`, `VITE_SUPABASE_ANON_KEY` |
|
|
201
|
+
|
|
202
|
+
Also **scans the entire codebase** (recursive file search, skipping `node_modules` and hidden dirs) for hardcoded credential patterns as a fallback.
|
|
203
|
+
|
|
204
|
+
`promptForMissing()` — interactive prompts with Zod validation for any credentials not found.
|
|
205
|
+
|
|
206
|
+
### Detector — [detector.ts](file:///Users/amirlankalmukhan/archer-mcp/src/wizard/detector.ts)
|
|
207
|
+
|
|
208
|
+
Discovers installed AI agents by checking platform-specific config paths:
|
|
209
|
+
|
|
210
|
+
| Agent | macOS Config Path |
|
|
211
|
+
|---|---|
|
|
212
|
+
| Cursor | `~/.cursor/mcp.json` |
|
|
213
|
+
| Claude Code | `~/Library/Application Support/Claude/claude_desktop_config.json` |
|
|
214
|
+
| OpenCode | `~/.config/opencode/opencode.json` |
|
|
215
|
+
| Antigravity | `~/.config/antigravity/config.json` |
|
|
216
|
+
| Windsurf | `~/.codeium/windsurf/mcp_config.json` |
|
|
217
|
+
|
|
218
|
+
Cross-platform: has `darwin`, `linux`, `win32` paths for each agent.
|
|
219
|
+
|
|
220
|
+
An agent is considered "installed" if its config file or parent directory exists.
|
|
221
|
+
|
|
222
|
+
### Injector — [injector.ts](file:///Users/amirlankalmukhan/archer-mcp/src/wizard/injector.ts)
|
|
223
|
+
|
|
224
|
+
Writes Archer's MCP server entry into each agent's config JSON:
|
|
225
|
+
|
|
226
|
+
```json
|
|
227
|
+
// Standard format (Cursor, Claude, Windsurf, Antigravity)
|
|
228
|
+
{ "command": "npx", "args": ["-y", "archer-wizard@latest", "--mcp"],
|
|
229
|
+
"env": { "SUPABASE_URL": "...", "SUPABASE_SERVICE_ROLE_KEY": "..." } }
|
|
230
|
+
|
|
231
|
+
// OpenCode format
|
|
232
|
+
{ "type": "local", "command": ["npx", "-y", "archer-wizard@latest", "--mcp"],
|
|
233
|
+
"environment": { ... } }
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Reads existing config, merges without overwriting other MCP servers, writes back.
|
|
237
|
+
|
|
238
|
+
### Rules — [rules.ts](file:///Users/amirlankalmukhan/archer-mcp/src/wizard/rules.ts)
|
|
239
|
+
|
|
240
|
+
Injects a **markdown documentation block** into each agent's rules file so the agent knows about Archer's tools. Uses `<!-- archer:start -->` / `<!-- archer:end -->` comment markers for idempotent updates.
|
|
241
|
+
|
|
242
|
+
Content includes: tool descriptions, parameter docs, usage examples, trigger words ("watch", "monitor", "alert me", etc.).
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Module 4: Shared Libraries (`src/lib/`)
|
|
247
|
+
|
|
248
|
+
### ascii.ts — [ascii.ts](file:///Users/amirlankalmukhan/archer-mcp/src/lib/ascii.ts)
|
|
249
|
+
|
|
250
|
+
Terminal UI utilities:
|
|
251
|
+
- `showAsciiArt()` — green block-character ARCHER banner
|
|
252
|
+
- Status loggers: `logAction` (◆ blue), `logSuccess` (✓ green), `logError` (✗ red), `logProgress` (● white), `logReady` (▶ green)
|
|
253
|
+
- `maskCredential()` — shows first 3-8 chars + `******`
|
|
254
|
+
- `showSuccessBox()` — bordered box with setup summary
|
|
255
|
+
- `stderr*` variants — for MCP mode (stdout is reserved for JSON-RPC)
|
|
256
|
+
|
|
257
|
+
### supabase.ts — [supabase.ts](file:///Users/amirlankalmukhan/archer-mcp/src/lib/supabase.ts)
|
|
258
|
+
|
|
259
|
+
Supabase client factory + channel helpers:
|
|
260
|
+
- Singleton client from `SUPABASE_URL` + `SUPABASE_SERVICE_ROLE_KEY` env vars
|
|
261
|
+
- `createAuthChannel()` — listens to `auth.users` INSERT events
|
|
262
|
+
- `createTableChannel()` — listens to arbitrary table events in `public` schema
|
|
263
|
+
- `removeChannel()` — cleanup helper
|
|
264
|
+
|
|
265
|
+
### webhook.ts — [webhook.ts](file:///Users/amirlankalmukhan/archer-mcp/src/lib/webhook.ts)
|
|
266
|
+
|
|
267
|
+
HTTP webhook delivery with retry:
|
|
268
|
+
- 3 attempts, 2-second delay between retries
|
|
269
|
+
- Headers: `Content-Type: application/json`, `User-Agent: Archer/0.1.0`, `X-Archer-Event: <event>`
|
|
270
|
+
- `buildWebhookPayload()` — wraps data in `{ archer: { watchId, event, source, firedAt }, data }`
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Module 5: Type System (`src/types/index.ts`)
|
|
275
|
+
|
|
276
|
+
All shared types in one file, Zod-validated where applicable:
|
|
277
|
+
|
|
278
|
+
| Type | Purpose |
|
|
279
|
+
|---|---|
|
|
280
|
+
| `Framework` | `'nextjs' \| 'vite' \| 'unknown'` |
|
|
281
|
+
| `ScanResult` | Scanner output: credentials, framework, source file |
|
|
282
|
+
| `AgentInfo` | Detected agent: name, install status, config path |
|
|
283
|
+
| `WatchEvent` | Zod enum: `auth.signup`, `table.insert/update/delete` |
|
|
284
|
+
| `WatchInput` | Zod schema with refinement: table required for non-auth events |
|
|
285
|
+
| `WatchResult` | Tool response: success, watchId, message |
|
|
286
|
+
| `WebhookPayload` | Structured payload with archer metadata + data |
|
|
287
|
+
| `PostgresEvent` | `'INSERT' \| 'UPDATE' \| 'DELETE'` |
|
|
288
|
+
| `InjectionResult` | Agent injection outcome |
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
## Data Flow: End-to-End Watch Lifecycle
|
|
293
|
+
|
|
294
|
+
```mermaid
|
|
295
|
+
sequenceDiagram
|
|
296
|
+
participant Agent as AI Agent
|
|
297
|
+
participant MCP as MCP Server
|
|
298
|
+
participant Daemon as Daemon (:44380)
|
|
299
|
+
participant SB as Supabase
|
|
300
|
+
participant WH as Webhook URL
|
|
301
|
+
|
|
302
|
+
Agent->>MCP: archer_watch({ table, event, webhookUrl })
|
|
303
|
+
MCP->>MCP: Read SUPABASE_URL/KEY from env
|
|
304
|
+
MCP->>MCP: Generate UUID watchId
|
|
305
|
+
MCP->>Daemon: TCP: add_watch(WatchConfig)
|
|
306
|
+
Daemon->>Daemon: Create Supabase client
|
|
307
|
+
Daemon->>SB: Subscribe postgres_changes channel
|
|
308
|
+
Daemon->>Daemon: Save to state.json (atomic)
|
|
309
|
+
Daemon->>MCP: TCP: { success, watchId }
|
|
310
|
+
MCP->>Agent: "Watch created: {watchId}"
|
|
311
|
+
|
|
312
|
+
Note over SB,Daemon: Later, a database change occurs...
|
|
313
|
+
|
|
314
|
+
SB->>Daemon: Realtime: row INSERT/UPDATE/DELETE
|
|
315
|
+
Daemon->>Daemon: Build webhook payload
|
|
316
|
+
Daemon->>WH: POST { archer: {...}, data: {...} }
|
|
317
|
+
WH->>Daemon: 200 OK
|
|
318
|
+
|
|
319
|
+
Note over Agent,Daemon: Agent session can restart...
|
|
320
|
+
Note over Daemon: Daemon survives, keeps watching
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## Key Design Decisions
|
|
326
|
+
|
|
327
|
+
| Decision | Rationale |
|
|
328
|
+
|---|---|
|
|
329
|
+
| **TCP IPC over Unix sockets** | Cross-platform (macOS, Linux, Windows) |
|
|
330
|
+
| **JSON lines protocol** | Simple, debuggable, no binary framing |
|
|
331
|
+
| **Detached daemon process** | Survives parent MCP server lifecycle |
|
|
332
|
+
| **Per-watch credentials** | Multi-project Supabase support |
|
|
333
|
+
| **Atomic state writes** | Temp file + rename prevents corruption |
|
|
334
|
+
| **Auto-start daemon** | `ensureDaemon()` on MCP boot — zero friction |
|
|
335
|
+
| **Agent-aware config injection** | Different JSON shapes for OpenCode vs others |
|
|
336
|
+
| **Idempotent rules injection** | HTML comment markers for safe re-runs |
|
|
337
|
+
| **Env file priority chain** | `.env.local` wins over `.env` — matches Next.js convention |
|
|
338
|
+
| **Codebase-wide credential scan** | Fallback when env files are missing |
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
## File Map (17 source files)
|
|
343
|
+
|
|
344
|
+
```
|
|
345
|
+
src/
|
|
346
|
+
├── index.ts ← Entry point: --mcp / --daemon / wizard
|
|
347
|
+
├── daemon/
|
|
348
|
+
│ ├── types.ts ← IPC protocol, WatchConfig, constants
|
|
349
|
+
│ ├── store.ts ← Atomic JSON persistence (~/.archer/state.json)
|
|
350
|
+
│ ├── process.ts ← TCP server, Supabase channels, webhook delivery
|
|
351
|
+
│ ├── client.ts ← IPC client (tools → daemon)
|
|
352
|
+
│ ├── lifecycle.ts ← Start/stop/ensure daemon, PID management
|
|
353
|
+
│ └── run.ts ← Detached process entry point
|
|
354
|
+
├── tools/
|
|
355
|
+
│ ├── watch.ts ← archer_watch tool
|
|
356
|
+
│ ├── unwatch.ts ← archer_unwatch tool
|
|
357
|
+
│ └── watches.ts ← archer_watches tool
|
|
358
|
+
├── wizard/
|
|
359
|
+
│ ├── index.ts ← 10-step clack CLI orchestrator
|
|
360
|
+
│ ├── scanner.ts ← Credential discovery (env files + codebase)
|
|
361
|
+
│ ├── detector.ts ← AI agent detection (5 agents, 3 platforms)
|
|
362
|
+
│ ├── injector.ts ← MCP config injection
|
|
363
|
+
│ └── rules.ts ← Agent rules/docs injection
|
|
364
|
+
├── lib/
|
|
365
|
+
│ ├── ascii.ts ← Terminal UI (banner, loggers, stderr)
|
|
366
|
+
│ ├── supabase.ts ← Client factory + channel helpers
|
|
367
|
+
│ └── webhook.ts ← HTTP delivery with retry
|
|
368
|
+
└── types/
|
|
369
|
+
└── index.ts ← All shared types + Zod schemas
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
## Verification
|
|
373
|
+
|
|
374
|
+
- ✅ TypeScript build (`npm run build`) — zero errors
|
|
375
|
+
- ✅ All source files compiled to `dist/`
|
|
376
|
+
- ✅ IPC protocol uses JSON-over-TCP on `127.0.0.1:44380`
|
|
377
|
+
- ✅ State persists to `~/.archer/state.json` with atomic writes
|
|
378
|
+
- ✅ 5 AI agents supported across 3 platforms (macOS/Linux/Windows)
|
package/README.md
CHANGED
|
@@ -17,21 +17,18 @@
|
|
|
17
17
|
|
|
18
18
|
## what is Archer
|
|
19
19
|
|
|
20
|
-
Zapier was built for apps talking to apps.
|
|
21
|
-
**Archer was built for the world talking to AI agents.**
|
|
22
|
-
|
|
23
20
|
Every AI agent today is reactive. Cursor, Claude Code, opencode — they sit completely idle until you manually talk to them. Nobody built the layer that lets them feel what's happening in real time and act on their own.
|
|
24
21
|
|
|
25
22
|
Archer is that layer.
|
|
26
23
|
|
|
27
|
-
You
|
|
24
|
+
You tell your agent what to watch. Archer monitors your data sources 24/7. The moment something changes — your agent fires, already loaded with full context. No prompting. No polling. No manual triggers.
|
|
28
25
|
|
|
29
26
|
---
|
|
30
27
|
|
|
31
28
|
## install
|
|
32
29
|
|
|
33
30
|
```bash
|
|
34
|
-
npx archer@latest
|
|
31
|
+
npx archer-wizard@latest
|
|
35
32
|
```
|
|
36
33
|
|
|
37
34
|
Run this inside any project folder. Archer handles everything else automatically.
|
|
@@ -41,13 +38,13 @@ Run this inside any project folder. Archer handles everything else automatically
|
|
|
41
38
|
## how it works
|
|
42
39
|
|
|
43
40
|
```
|
|
44
|
-
your data source ──→ Archer watches 24/7 ──→
|
|
41
|
+
your data source ──→ Archer watches 24/7 ──→ event detected ──→ agent fires
|
|
45
42
|
```
|
|
46
43
|
|
|
47
44
|
1. **scans** your project for data source credentials automatically
|
|
48
45
|
2. **detects** which AI agents you have installed on your machine
|
|
49
46
|
3. **injects** itself into all their configs — one confirmation, no manual JSON
|
|
50
|
-
4. **teaches** every agent when to call `
|
|
47
|
+
4. **teaches** every agent when to call `archer_watch` automatically via rules
|
|
51
48
|
5. your agent now has a nervous system — it feels the world and acts on its own
|
|
52
49
|
|
|
53
50
|
---
|
|
@@ -61,72 +58,102 @@ npx archer-wizard@latest
|
|
|
61
58
|
# 2. Archer scans your .env, finds your credentials, injects into your agents
|
|
62
59
|
|
|
63
60
|
# 3. open your AI agent and say:
|
|
64
|
-
"watch my users table for new
|
|
61
|
+
"watch my users table for new inserts and fire https://your-webhook-url"
|
|
65
62
|
|
|
66
63
|
# 4. insert a row in your database
|
|
67
64
|
|
|
68
|
-
# 5. your
|
|
65
|
+
# 5. your webhook fires with full event context
|
|
69
66
|
```
|
|
70
67
|
|
|
71
68
|
---
|
|
72
69
|
|
|
73
|
-
##
|
|
70
|
+
## MCP tools
|
|
71
|
+
|
|
72
|
+
Once Archer is set up, your AI agent has access to these tools natively. You never call them directly — your agent calls them when you describe what you want.
|
|
73
|
+
|
|
74
|
+
### `archer_watch`
|
|
75
|
+
|
|
76
|
+
Create a persistent real-time watch on a table. Watches survive agent session restarts.
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
archer_watch({
|
|
80
|
+
table: string, // table or resource to watch (required)
|
|
81
|
+
event?: string, // INSERT | UPDATE | DELETE | * (default: *)
|
|
82
|
+
filter?: string, // e.g. "status=eq.active", "amount=gt.1000"
|
|
83
|
+
webhookUrl?: string // URL to receive POST when event fires
|
|
84
|
+
})
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### `archer_unwatch`
|
|
74
88
|
|
|
75
|
-
|
|
89
|
+
Remove an active watch by its ID.
|
|
76
90
|
|
|
77
91
|
```typescript
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
event: string, // what to listen for
|
|
81
|
-
table?: string, // table name for table events
|
|
82
|
-
condition?: string, // plain english condition (optional)
|
|
83
|
-
webhookUrl: string // where to fire when condition is met
|
|
92
|
+
archer_unwatch({
|
|
93
|
+
watchId: string // the watch ID returned by archer_watch
|
|
84
94
|
})
|
|
85
95
|
```
|
|
86
96
|
|
|
87
|
-
|
|
97
|
+
### `archer_watches`
|
|
98
|
+
|
|
99
|
+
List all active watches — their IDs, tables, events, filters, and webhook URLs.
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
archer_watches()
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## talk to your agent
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
"watch my users table and fire https://your-webhook.com when a new row is inserted"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
"monitor the orders table for updates where status equals shipped"
|
|
115
|
+
```
|
|
88
116
|
|
|
89
117
|
```
|
|
90
|
-
"
|
|
91
|
-
when a new user signs up with a .edu email"
|
|
118
|
+
"alert me at https://your-webhook.com every time a row is deleted from sessions"
|
|
92
119
|
```
|
|
93
120
|
|
|
94
121
|
```
|
|
95
|
-
"
|
|
122
|
+
"show me all active watches"
|
|
96
123
|
```
|
|
97
124
|
|
|
98
125
|
```
|
|
99
|
-
"
|
|
126
|
+
"stop watching the payments table"
|
|
100
127
|
```
|
|
101
128
|
|
|
102
129
|
---
|
|
103
130
|
|
|
104
|
-
## supported events
|
|
131
|
+
## supported events
|
|
105
132
|
|
|
106
133
|
| event | description |
|
|
107
134
|
|---|---|
|
|
108
|
-
| `
|
|
109
|
-
| `
|
|
110
|
-
| `
|
|
111
|
-
|
|
|
135
|
+
| `INSERT` | new row inserted into a table |
|
|
136
|
+
| `UPDATE` | existing row updated |
|
|
137
|
+
| `DELETE` | row deleted |
|
|
138
|
+
| `*` | all changes (default) |
|
|
112
139
|
|
|
113
140
|
---
|
|
114
141
|
|
|
115
142
|
## webhook payload
|
|
116
143
|
|
|
117
|
-
Every time Archer fires, your
|
|
144
|
+
Every time Archer fires, your webhook receives this:
|
|
118
145
|
|
|
119
146
|
```json
|
|
120
147
|
{
|
|
121
148
|
"archer": {
|
|
122
149
|
"watchId": "uuid",
|
|
123
|
-
"event": "
|
|
124
|
-
"
|
|
150
|
+
"event": "INSERT",
|
|
151
|
+
"table": "users",
|
|
125
152
|
"firedAt": "ISO timestamp"
|
|
126
153
|
},
|
|
127
154
|
"data": {
|
|
128
155
|
"id": "row-id",
|
|
129
|
-
"email": "user@
|
|
156
|
+
"email": "user@example.com",
|
|
130
157
|
"created_at": "timestamp"
|
|
131
158
|
}
|
|
132
159
|
}
|
|
@@ -143,22 +170,20 @@ Archer auto-detects and injects into all of these:
|
|
|
143
170
|
| Cursor | ✓ supported |
|
|
144
171
|
| Claude Code | ✓ supported |
|
|
145
172
|
| opencode | ✓ supported |
|
|
146
|
-
| Google Antigravity | ✓ supported |
|
|
147
173
|
| Windsurf | ✓ supported |
|
|
174
|
+
| Antigravity | ✓ supported |
|
|
148
175
|
|
|
149
176
|
---
|
|
150
177
|
|
|
151
178
|
## supported data sources
|
|
152
179
|
|
|
153
|
-
Archer is built universal — any data source, any platform.
|
|
154
|
-
|
|
155
180
|
| source | status |
|
|
156
181
|
|---|---|
|
|
157
182
|
| Supabase | ✓ available now |
|
|
183
|
+
| PostgreSQL | coming soon |
|
|
184
|
+
| MySQL | coming soon |
|
|
158
185
|
| GitHub | coming soon |
|
|
159
186
|
| Stripe | coming soon |
|
|
160
|
-
| Linear | coming soon |
|
|
161
|
-
| Vercel | coming soon |
|
|
162
187
|
| custom webhooks | coming soon |
|
|
163
188
|
|
|
164
189
|
---
|
|
@@ -174,17 +199,17 @@ Archer scans these files automatically in priority order:
|
|
|
174
199
|
.env.production
|
|
175
200
|
```
|
|
176
201
|
|
|
177
|
-
It recognizes
|
|
202
|
+
It recognizes common aliases automatically:
|
|
178
203
|
|
|
179
204
|
```bash
|
|
180
205
|
# standard
|
|
181
206
|
SUPABASE_URL=https://yourproject.supabase.co
|
|
182
207
|
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
|
|
183
208
|
|
|
184
|
-
# Next.js
|
|
209
|
+
# Next.js
|
|
185
210
|
NEXT_PUBLIC_SUPABASE_URL=...
|
|
186
211
|
|
|
187
|
-
# Vite
|
|
212
|
+
# Vite
|
|
188
213
|
VITE_SUPABASE_URL=...
|
|
189
214
|
```
|
|
190
215
|
|
|
@@ -210,12 +235,14 @@ npx archer-wizard@latest realtime channel
|
|
|
210
235
|
↓ ↓
|
|
211
236
|
wizard scans .env Archer subscribes to changes 24/7
|
|
212
237
|
↓ ↓
|
|
213
|
-
injects into agents
|
|
238
|
+
injects into agents event detected → webhook fires
|
|
214
239
|
↓ ↓
|
|
215
|
-
agent calls
|
|
240
|
+
agent calls archer_watch your agent wakes up with full context
|
|
216
241
|
```
|
|
217
242
|
|
|
218
|
-
No AI at runtime. Once a
|
|
243
|
+
No AI at runtime. Once a watch is defined it is pure logic — fast, cheap, reliable.
|
|
244
|
+
|
|
245
|
+
For a deep dive into how Archer is built internally — daemon IPC, state persistence, MCP tools, and the wizard pipeline — see [ARCHITECTURE.md](./ARCHITECTURE.md).
|
|
219
246
|
|
|
220
247
|
---
|
|
221
248
|
|
|
@@ -229,20 +256,19 @@ No AI at runtime. Once a condition is defined it is pure logic — fast, cheap,
|
|
|
229
256
|
|
|
230
257
|
Everything runs locally on your machine using your own credentials. The architecture is universal from day one — the simplicity is intentional.
|
|
231
258
|
|
|
232
|
-
|
|
259
|
+
---
|
|
233
260
|
|
|
234
261
|
```bash
|
|
235
|
-
#
|
|
262
|
+
# install from npm
|
|
236
263
|
npx archer-wizard@latest
|
|
237
264
|
|
|
238
|
-
#
|
|
265
|
+
# or from source
|
|
239
266
|
git clone https://github.com/amirlan-labs/archer-mcp
|
|
240
267
|
cd archer-mcp
|
|
241
268
|
npm install
|
|
242
269
|
npm run dev
|
|
243
270
|
```
|
|
244
271
|
|
|
245
|
-
|
|
246
272
|
<div align="center">
|
|
247
273
|
|
|
248
274
|
*agents stop waiting. the world starts talking.*
|
package/dist/lib/ascii.js
CHANGED
|
@@ -50,7 +50,7 @@ export function showSuccessBox(agentCount) {
|
|
|
50
50
|
` ${pc.green('▶')} Archer is ready`,
|
|
51
51
|
'',
|
|
52
52
|
` injected into ${agentCount} agent${agentCount !== 1 ? 's' : ''}`,
|
|
53
|
-
' connected to your
|
|
53
|
+
' connected to your backend',
|
|
54
54
|
'',
|
|
55
55
|
' open your AI agent and say:',
|
|
56
56
|
` ${pc.dim('"watch my users table for new signups"')}`,
|
package/dist/lib/ascii.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ascii.js","sourceRoot":"","sources":["../../src/lib/ascii.ts"],"names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C,GAAG,CAAC,KAAK,OAAO,IAAI,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,OAAe;IACzC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,OAAO,IAAI,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,OAAe;IACzC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,OAAO,IAAI,CAAC,CAAC;AACzD,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -76,9 +76,5 @@ export interface InjectionResult {
|
|
|
76
76
|
success: boolean;
|
|
77
77
|
error?: string;
|
|
78
78
|
}
|
|
79
|
-
export
|
|
80
|
-
command: string;
|
|
81
|
-
args: string[];
|
|
82
|
-
env: Record<string, string>;
|
|
83
|
-
}
|
|
79
|
+
export type McpServerEntry = Record<string, unknown>;
|
|
84
80
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAItD,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,SAAS,CAAC;IACrB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IAC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