meow-agent 0.1.0
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/LICENSE +21 -0
- package/README.md +164 -0
- package/dist/index.js +6068 -0
- package/eslint.config.js +26 -0
- package/package.json +53 -0
- package/src/index.ts +92 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 stancsz
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# MEOW — Autonomous Multi-Agent Coding Harness
|
|
2
|
+
|
|
3
|
+
 [![npm]](https://www.npmjs.com/package/meow-agent)
|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
**MEOW** (Meta-Orchestrator Operating on World) is a sovereign coding harness that runs locally in your terminal, coordinates specialist agents, and structural quality gates prevent hallucination from reaching output. Built on TypeScript and SQLite-vec.
|
|
8
|
+
|
|
9
|
+
**Learn more at [github.com/stancsz/meow](https://github.com/stancsz/meow)**
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Get Started
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Install
|
|
17
|
+
npm install -g meow-agent
|
|
18
|
+
|
|
19
|
+
# Run a task (headless — no TTY required)
|
|
20
|
+
meow -p "fix the stalled REPL in src/cli/repl.ts"
|
|
21
|
+
|
|
22
|
+
# Interactive REPL
|
|
23
|
+
meow
|
|
24
|
+
|
|
25
|
+
# Interactive TUI
|
|
26
|
+
meow --tui
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or clone and run:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
git clone https://github.com/stancsz/meow.git
|
|
33
|
+
cd meow
|
|
34
|
+
npm install
|
|
35
|
+
npx tsx src/index.ts "your task here"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## What MEOW Does
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
Task arrives
|
|
44
|
+
│
|
|
45
|
+
▼
|
|
46
|
+
L4 SPECIALIST (Claude Code / Aider) — implements
|
|
47
|
+
│
|
|
48
|
+
▼
|
|
49
|
+
MISSION REVIEWER — scores output across 7 criteria
|
|
50
|
+
│
|
|
51
|
+
├── score >= threshold ──► COMMIT
|
|
52
|
+
│
|
|
53
|
+
└── score < threshold ──► RETRY (with review notes)
|
|
54
|
+
│
|
|
55
|
+
┌──────────────┴──────────────┐
|
|
56
|
+
▼ ▼
|
|
57
|
+
CONVERGENCE CHECK STAGNATION CHECK
|
|
58
|
+
─ token budget? ─ 2 iters no improvement?
|
|
59
|
+
─ max iters hit? ─ diminishing returns?
|
|
60
|
+
│ │
|
|
61
|
+
▼ ▼
|
|
62
|
+
STOP / REPORT ADAPT / DECOMPOSE
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
MEOW does NOT grind until the user kills it. It evaluates whether continued iteration is productive and stops when it is not.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Quality Gates
|
|
70
|
+
|
|
71
|
+
Every output passes through structural gates before it can be committed:
|
|
72
|
+
|
|
73
|
+
| Gate | Checks | Fail action |
|
|
74
|
+
|------|--------|-------------|
|
|
75
|
+
| `NO_MOCKS` | No `TODO`, `FIXME`, placeholder code | Retry with note |
|
|
76
|
+
| `TYPE_CHECK` | `tsc --noEmit` passes | Retry |
|
|
77
|
+
| `LINT_CLEAN` | ESLint reports 0 errors | Retry |
|
|
78
|
+
| `REAL_TESTS` | Test files exist and non-empty | Warn (non-fatal) |
|
|
79
|
+
| `MISSION_COMPLETE` | Goal keywords in output | Retry if missing |
|
|
80
|
+
| `SOP_COMPLIANCE` | Think-Plan-Verify in output | Retry if missing |
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Convergence Logic
|
|
85
|
+
|
|
86
|
+
MEOW stops iterating when:
|
|
87
|
+
|
|
88
|
+
- **Stagnation** — No score improvement for 2 consecutive iterations
|
|
89
|
+
- **Token budget exceeded** — Cumulative spend crosses threshold
|
|
90
|
+
- **Diminishing returns** — Score improvement falls below minimum delta
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Execution Modes
|
|
95
|
+
|
|
96
|
+
| Mode | Behavior |
|
|
97
|
+
|------|----------|
|
|
98
|
+
| `SEQUENTIAL` | One task at a time. Full review between each step. |
|
|
99
|
+
| `SHIP` | Pass through all specialists with final review only. |
|
|
100
|
+
| `PARALLEL` | Run independent tasks concurrently. |
|
|
101
|
+
| `AUDIT_ONLY` | Score existing output without executing. |
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Architecture
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
L1 LIAISON — Human-facing. Receives tasks, escalates ambiguity.
|
|
109
|
+
L2 ARCHITECT — Mid-layer planner. Breaks tasks, sequences dependencies.
|
|
110
|
+
L3 ORCHESTRATOR — Execution coordinator. TaskQueue, convergence checks.
|
|
111
|
+
L4 SPECIALISTS — Claude Code / Aider subprocesses.
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Key files:**
|
|
115
|
+
|
|
116
|
+
| File | Purpose |
|
|
117
|
+
|------|---------|
|
|
118
|
+
| `src/agent/agent.ts` | MEOW-3-RULE: 3-retry loop + fixMeow() |
|
|
119
|
+
| `src/agent/summoner.ts` | Spawns specialist agents as subprocesses |
|
|
120
|
+
| `src/agent/mission_reviewer.ts` | 7-criterion scoring, quality gates |
|
|
121
|
+
| `src/orchestrator/Orchestrator.ts` | Convergence checks, task dispatch |
|
|
122
|
+
| `src/kernel/kernel.ts` | Heartbeat loop, watchdog, respawn |
|
|
123
|
+
| `src/db/database.ts` | SQLite + sqlite-vec for persistence |
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## MEOW-3-RULE
|
|
128
|
+
|
|
129
|
+
MEOW uses `meow -p` as the primary interface (not `claude -p`):
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
Task arrives → meow -p "task" (MEOW gets 3 retry attempts)
|
|
133
|
+
↓ fails × 3
|
|
134
|
+
claude -p "fix MEOW" (fixes MEOW's own code, NOT the task)
|
|
135
|
+
↓
|
|
136
|
+
User re-invokes same task → meow -p → succeeds
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
`claude -p` only runs when MEOW's own code/prompts/tools are broken. It patches MEOW, then MEOW retries and completes the task.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Configuration
|
|
144
|
+
|
|
145
|
+
| Variable | Description | Default |
|
|
146
|
+
|----------|-------------|---------|
|
|
147
|
+
| `ANTHROPIC_API_KEY` | API key for LLM calls | (required) |
|
|
148
|
+
| `ANTHROPIC_BASE_URL` | LLM endpoint | MiniMax gateway |
|
|
149
|
+
| `ANTHROPIC_MODEL` | Model name | `claude-sonnet-4` |
|
|
150
|
+
| `MEOW_DB` | SQLite database path | `~/.meow/meow.db` |
|
|
151
|
+
| `MEOW_MODE` | Execution mode | `SEQUENTIAL` |
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Requirements
|
|
156
|
+
|
|
157
|
+
- Node.js 18+ (Bun is **NOT** supported — `better-sqlite3` native addons require Node)
|
|
158
|
+
- TypeScript 5.0+
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## License
|
|
163
|
+
|
|
164
|
+
MIT — see [LICENSE](LICENSE)
|