archer-wizard 0.2.2 → 0.2.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/.github/workflows/publish.yml +25 -0
- package/README.md +96 -141
- package/package.json +26 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Publish to npm
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- uses: actions/setup-node@v4
|
|
15
|
+
with:
|
|
16
|
+
node-version: '20'
|
|
17
|
+
registry-url: 'https://registry.npmjs.org'
|
|
18
|
+
|
|
19
|
+
- run: npm ci
|
|
20
|
+
|
|
21
|
+
- run: npm run build
|
|
22
|
+
|
|
23
|
+
- run: npm publish --access public
|
|
24
|
+
env:
|
|
25
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/README.md
CHANGED
|
@@ -11,120 +11,99 @@
|
|
|
11
11
|
|
|
12
12
|
**event intelligence layer for AI agents**
|
|
13
13
|
|
|
14
|
+
[](https://www.npmjs.com/package/archer-wizard)
|
|
15
|
+
[](LICENSE)
|
|
16
|
+
|
|
14
17
|
</div>
|
|
15
18
|
|
|
16
19
|
---
|
|
17
20
|
|
|
18
|
-
|
|
19
|
-
|
|
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.
|
|
21
|
-
|
|
22
|
-
Archer is that layer.
|
|
23
|
-
|
|
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.
|
|
21
|
+
Every AI agent today is reactive. It sits idle until you talk to it. Archer gives your agent a nervous system — it watches your database 24/7, and fires the moment something changes.
|
|
25
22
|
|
|
26
23
|
---
|
|
27
24
|
|
|
28
|
-
##
|
|
25
|
+
## quickstart
|
|
29
26
|
|
|
30
27
|
```bash
|
|
31
28
|
npx archer-wizard@latest
|
|
32
29
|
```
|
|
33
30
|
|
|
34
|
-
Run this inside any project folder. Archer
|
|
31
|
+
Run this inside any project folder. Archer scans for credentials, detects your agents, and injects itself — one command, no manual config.
|
|
35
32
|
|
|
36
33
|
---
|
|
37
34
|
|
|
38
|
-
##
|
|
35
|
+
## installation
|
|
39
36
|
|
|
40
|
-
|
|
41
|
-
your data source ──→ Archer watches 24/7 ──→ event detected ──→ agent fires
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
1. **scans** your project for data source credentials automatically
|
|
45
|
-
2. **detects** which AI agents you have installed on your machine
|
|
46
|
-
3. **injects** itself into all their configs — one confirmation, no manual JSON
|
|
47
|
-
4. **teaches** every agent when to call `archer_watch` automatically via rules
|
|
48
|
-
5. your agent now has a nervous system — it feels the world and acts on its own
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## quickstart
|
|
37
|
+
### one-liner (recommended)
|
|
53
38
|
|
|
54
39
|
```bash
|
|
55
|
-
# 1. run inside your project
|
|
56
40
|
npx archer-wizard@latest
|
|
41
|
+
```
|
|
57
42
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
43
|
+
Archer will:
|
|
44
|
+
1. Scan your `.env` files for Supabase credentials
|
|
45
|
+
2. Detect which AI agents are installed on your machine
|
|
46
|
+
3. Inject itself into all their MCP configs automatically
|
|
47
|
+
4. Teach every agent when to call `archer_watch` via rules
|
|
62
48
|
|
|
63
|
-
|
|
49
|
+
### with explicit credentials
|
|
64
50
|
|
|
65
|
-
|
|
51
|
+
```bash
|
|
52
|
+
SUPABASE_URL=https://xyz.supabase.co \
|
|
53
|
+
SUPABASE_SERVICE_ROLE_KEY=your-key \
|
|
54
|
+
npx archer-wizard@latest
|
|
66
55
|
```
|
|
67
56
|
|
|
68
57
|
---
|
|
69
58
|
|
|
70
59
|
## MCP tools
|
|
71
60
|
|
|
72
|
-
Once
|
|
61
|
+
Once set up, your agent has these tools available natively. You describe what you want in plain English — the agent calls them.
|
|
73
62
|
|
|
74
|
-
|
|
63
|
+
```bash
|
|
64
|
+
# Tell your agent:
|
|
65
|
+
"watch the users table and fire https://your-webhook.com on new inserts"
|
|
66
|
+
"monitor orders where status equals shipped"
|
|
67
|
+
"show all active watches"
|
|
68
|
+
"stop watching the payments table"
|
|
69
|
+
```
|
|
75
70
|
|
|
76
|
-
|
|
71
|
+
### `archer_watch`
|
|
77
72
|
|
|
78
73
|
```typescript
|
|
79
74
|
archer_watch({
|
|
80
|
-
table: string,
|
|
81
|
-
event?: string,
|
|
82
|
-
filter?: string,
|
|
83
|
-
webhookUrl
|
|
75
|
+
table: string, // table to watch (required)
|
|
76
|
+
event?: string, // INSERT | UPDATE | DELETE | * (default: *)
|
|
77
|
+
filter?: string, // e.g. "status=eq.active", "amount=gt.1000"
|
|
78
|
+
webhookUrl: string // URL to POST when the event fires
|
|
84
79
|
})
|
|
85
80
|
```
|
|
86
81
|
|
|
87
82
|
### `archer_unwatch`
|
|
88
83
|
|
|
89
|
-
Remove an active watch by its ID.
|
|
90
|
-
|
|
91
84
|
```typescript
|
|
92
85
|
archer_unwatch({
|
|
93
|
-
watchId: string
|
|
86
|
+
watchId: string // ID returned by archer_watch
|
|
94
87
|
})
|
|
95
88
|
```
|
|
96
89
|
|
|
97
90
|
### `archer_watches`
|
|
98
91
|
|
|
99
|
-
List all active watches — their IDs, tables, events, filters, and webhook URLs.
|
|
100
|
-
|
|
101
92
|
```typescript
|
|
102
|
-
archer_watches()
|
|
93
|
+
archer_watches() // list all active watches with status
|
|
103
94
|
```
|
|
104
95
|
|
|
105
96
|
---
|
|
106
97
|
|
|
107
|
-
##
|
|
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
|
-
```
|
|
116
|
-
|
|
117
|
-
```
|
|
118
|
-
"alert me at https://your-webhook.com every time a row is deleted from sessions"
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
```
|
|
122
|
-
"show me all active watches"
|
|
123
|
-
```
|
|
98
|
+
## supported agents
|
|
124
99
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
100
|
+
| agent | config location |
|
|
101
|
+
|---|---|
|
|
102
|
+
| Cursor | `~/.cursor/mcp.json` |
|
|
103
|
+
| Claude Code | `~/Library/Application Support/Claude/claude_desktop_config.json` |
|
|
104
|
+
| Windsurf | `~/.codeium/windsurf/mcp_config.json` |
|
|
105
|
+
| OpenCode | `~/.config/opencode/opencode.json` |
|
|
106
|
+
| Antigravity | `~/.config/antigravity/config.json` |
|
|
128
107
|
|
|
129
108
|
---
|
|
130
109
|
|
|
@@ -133,67 +112,51 @@ archer_watches()
|
|
|
133
112
|
| event | description |
|
|
134
113
|
|---|---|
|
|
135
114
|
| `INSERT` | new row inserted into a table |
|
|
136
|
-
| `UPDATE` | existing row
|
|
137
|
-
| `DELETE` | row
|
|
138
|
-
| `*` | all
|
|
115
|
+
| `UPDATE` | existing row modified |
|
|
116
|
+
| `DELETE` | row removed |
|
|
117
|
+
| `*` | all of the above (default) |
|
|
118
|
+
| `filter` | narrow by any Supabase filter expression |
|
|
139
119
|
|
|
140
120
|
---
|
|
141
121
|
|
|
142
122
|
## webhook payload
|
|
143
123
|
|
|
144
|
-
Every
|
|
124
|
+
Every event POSTs this to your webhook URL:
|
|
145
125
|
|
|
146
126
|
```json
|
|
147
127
|
{
|
|
148
128
|
"archer": {
|
|
149
|
-
"watchId": "
|
|
129
|
+
"watchId": "550e8400-e29b-41d4-a716-446655440000",
|
|
150
130
|
"event": "INSERT",
|
|
151
131
|
"table": "users",
|
|
152
|
-
"firedAt": "
|
|
132
|
+
"firedAt": "2025-03-16T09:15:00.000Z"
|
|
153
133
|
},
|
|
154
134
|
"data": {
|
|
155
135
|
"id": "row-id",
|
|
156
136
|
"email": "user@example.com",
|
|
157
|
-
"created_at": "
|
|
137
|
+
"created_at": "2025-03-16T09:15:00.000Z"
|
|
158
138
|
}
|
|
159
139
|
}
|
|
160
140
|
```
|
|
161
141
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
## supported agents
|
|
165
|
-
|
|
166
|
-
Archer auto-detects and injects into all of these:
|
|
142
|
+
Headers included on every request:
|
|
167
143
|
|
|
168
|
-
|
|
|
144
|
+
| header | value |
|
|
169
145
|
|---|---|
|
|
170
|
-
|
|
|
171
|
-
|
|
|
172
|
-
|
|
|
173
|
-
| Windsurf | ✓ supported |
|
|
174
|
-
| Antigravity | ✓ supported |
|
|
146
|
+
| `Content-Type` | `application/json` |
|
|
147
|
+
| `User-Agent` | `Archer/0.2.2` |
|
|
148
|
+
| `X-Archer-Event` | event type (INSERT / UPDATE / DELETE) |
|
|
175
149
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
## supported data sources
|
|
179
|
-
|
|
180
|
-
| source | status |
|
|
181
|
-
|---|---|
|
|
182
|
-
| Supabase | ✓ available now |
|
|
183
|
-
| PostgreSQL | coming soon |
|
|
184
|
-
| MySQL | coming soon |
|
|
185
|
-
| GitHub | coming soon |
|
|
186
|
-
| Stripe | coming soon |
|
|
187
|
-
| custom webhooks | coming soon |
|
|
150
|
+
Archer retries failed deliveries 3 times with a 2s delay.
|
|
188
151
|
|
|
189
152
|
---
|
|
190
153
|
|
|
191
|
-
##
|
|
154
|
+
## credential discovery
|
|
192
155
|
|
|
193
|
-
Archer scans these files automatically in priority order:
|
|
156
|
+
Archer scans these files automatically, in priority order:
|
|
194
157
|
|
|
195
158
|
```
|
|
196
|
-
.env.local
|
|
159
|
+
.env.local ← checked first
|
|
197
160
|
.env
|
|
198
161
|
.env.development
|
|
199
162
|
.env.production
|
|
@@ -201,73 +164,65 @@ Archer scans these files automatically in priority order:
|
|
|
201
164
|
|
|
202
165
|
It recognizes common aliases automatically:
|
|
203
166
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
SUPABASE_URL
|
|
207
|
-
SUPABASE_SERVICE_ROLE_KEY
|
|
167
|
+
| credential | aliases checked |
|
|
168
|
+
|---|---|
|
|
169
|
+
| Supabase URL | `SUPABASE_URL`, `NEXT_PUBLIC_SUPABASE_URL`, `VITE_SUPABASE_URL` |
|
|
170
|
+
| Service key | `SUPABASE_SERVICE_ROLE_KEY`, `SUPABASE_SERVICE_KEY` |
|
|
171
|
+
| Anon key | `SUPABASE_ANON_KEY`, `NEXT_PUBLIC_SUPABASE_ANON_KEY`, `VITE_SUPABASE_ANON_KEY` |
|
|
172
|
+
|
|
173
|
+
If no env file is found, Archer scans your codebase for hardcoded values as a fallback.
|
|
208
174
|
|
|
209
|
-
|
|
210
|
-
NEXT_PUBLIC_SUPABASE_URL=...
|
|
175
|
+
---
|
|
211
176
|
|
|
212
|
-
|
|
213
|
-
|
|
177
|
+
## how it works
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
your agent calls archer_watch
|
|
181
|
+
↓
|
|
182
|
+
Archer daemon starts (detached, persists across sessions)
|
|
183
|
+
↓
|
|
184
|
+
subscribes to Supabase Realtime channel
|
|
185
|
+
↓
|
|
186
|
+
database change detected
|
|
187
|
+
↓
|
|
188
|
+
POST to your webhook URL (3 retries)
|
|
214
189
|
```
|
|
215
190
|
|
|
216
|
-
|
|
191
|
+
**The daemon runs at `127.0.0.1:44380` and survives MCP server restarts.** Watches are persisted to `~/.archer/state.json` — they resume automatically after machine restarts.
|
|
217
192
|
|
|
218
193
|
---
|
|
219
194
|
|
|
220
195
|
## requirements
|
|
221
196
|
|
|
222
197
|
- Node.js 18 or higher
|
|
223
|
-
-
|
|
224
|
-
-
|
|
225
|
-
- realtime enabled on tables you want to watch
|
|
198
|
+
- At least one supported AI agent installed
|
|
199
|
+
- A Supabase project with [Realtime enabled](https://supabase.com/docs/guides/realtime) on the tables you want to watch
|
|
226
200
|
|
|
227
201
|
---
|
|
228
202
|
|
|
229
|
-
##
|
|
230
|
-
|
|
231
|
-
```
|
|
232
|
-
developer's machine data source
|
|
233
|
-
─────────────────── ───────────
|
|
234
|
-
npx archer-wizard@latest realtime channel
|
|
235
|
-
↓ ↓
|
|
236
|
-
wizard scans .env Archer subscribes to changes 24/7
|
|
237
|
-
↓ ↓
|
|
238
|
-
injects into agents event detected → webhook fires
|
|
239
|
-
↓ ↓
|
|
240
|
-
agent calls archer_watch your agent wakes up with full context
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
No AI at runtime. Once a watch is defined it is pure logic — fast, cheap, reliable.
|
|
203
|
+
## supported data sources
|
|
244
204
|
|
|
245
|
-
|
|
205
|
+
| source | status |
|
|
206
|
+
|---|---|
|
|
207
|
+
| Supabase | ✓ available |
|
|
208
|
+
| PostgreSQL (direct) | coming soon |
|
|
209
|
+
| MySQL | coming soon |
|
|
210
|
+
| GitHub events | coming soon |
|
|
211
|
+
| Stripe webhooks | coming soon |
|
|
246
212
|
|
|
247
213
|
---
|
|
248
214
|
|
|
249
|
-
##
|
|
250
|
-
|
|
251
|
-
- no dashboard
|
|
252
|
-
- no account required
|
|
253
|
-
- no sign in
|
|
254
|
-
- no API key
|
|
255
|
-
- no cloud service
|
|
215
|
+
## architecture
|
|
256
216
|
|
|
257
|
-
|
|
217
|
+
See [ARCHITECTURE.md](./ARCHITECTURE.md) for a full deep dive — daemon IPC protocol, state persistence, MCP tool implementation, and the setup wizard pipeline.
|
|
258
218
|
|
|
259
219
|
---
|
|
260
220
|
|
|
261
|
-
|
|
262
|
-
# install from npm
|
|
263
|
-
npx archer-wizard@latest
|
|
221
|
+
## no account. no cloud. no dashboard.
|
|
264
222
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
npm install
|
|
269
|
-
npm run dev
|
|
270
|
-
```
|
|
223
|
+
Archer runs entirely on your machine using your own credentials. No sign-in, no API keys, no data leaves your infrastructure.
|
|
224
|
+
|
|
225
|
+
---
|
|
271
226
|
|
|
272
227
|
<div align="center">
|
|
273
228
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "archer-wizard",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "event intelligence layer for AI agents",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"mcp",
|
|
7
|
+
"model-context-protocol",
|
|
8
|
+
"ai-agent",
|
|
9
|
+
"agent",
|
|
10
|
+
"supabase",
|
|
11
|
+
"realtime",
|
|
12
|
+
"database-events",
|
|
13
|
+
"webhook",
|
|
14
|
+
"cursor",
|
|
15
|
+
"claude",
|
|
16
|
+
"windsurf",
|
|
17
|
+
"opencode",
|
|
18
|
+
"wizard",
|
|
19
|
+
"event-intelligence",
|
|
20
|
+
"data-monitoring",
|
|
21
|
+
"automation",
|
|
22
|
+
"postgres",
|
|
23
|
+
"database-trigger"
|
|
24
|
+
],
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/amirlan-labs/archer-mcp"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://github.com/amirlan-labs/archer-mcp#readme",
|
|
5
30
|
"type": "module",
|
|
6
31
|
"bin": {
|
|
7
32
|
"archer": "dist/index.js",
|