@cardor/agent-harness-kit 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/README.md +218 -0
- package/bin/ahk.js +2 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +113 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/build.d.ts +6 -0
- package/dist/commands/build.d.ts.map +1 -0
- package/dist/commands/build.js +39 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/export.d.ts +8 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +33 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/health.d.ts +2 -0
- package/dist/commands/health.d.ts.map +1 -0
- package/dist/commands/health.js +38 -0
- package/dist/commands/health.js.map +1 -0
- package/dist/commands/init-helpers.d.ts +9 -0
- package/dist/commands/init-helpers.d.ts.map +1 -0
- package/dist/commands/init-helpers.js +40 -0
- package/dist/commands/init-helpers.js.map +1 -0
- package/dist/commands/init.d.ts +9 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +202 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/migrate.d.ts +6 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +45 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/serve.d.ts +6 -0
- package/dist/commands/serve.d.ts.map +1 -0
- package/dist/commands/serve.js +13 -0
- package/dist/commands/serve.js.map +1 -0
- package/dist/commands/status.d.ts +6 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +71 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/sync.d.ts +7 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +57 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/task/add.d.ts +2 -0
- package/dist/commands/task/add.d.ts.map +1 -0
- package/dist/commands/task/add.js +59 -0
- package/dist/commands/task/add.js.map +1 -0
- package/dist/commands/task/done.d.ts +2 -0
- package/dist/commands/task/done.d.ts.map +1 -0
- package/dist/commands/task/done.js +45 -0
- package/dist/commands/task/done.js.map +1 -0
- package/dist/commands/task/index.d.ts +4 -0
- package/dist/commands/task/index.d.ts.map +1 -0
- package/dist/commands/task/index.js +4 -0
- package/dist/commands/task/index.js.map +1 -0
- package/dist/commands/task/list.d.ts +7 -0
- package/dist/commands/task/list.d.ts.map +1 -0
- package/dist/commands/task/list.js +42 -0
- package/dist/commands/task/list.js.map +1 -0
- package/dist/core/config.d.ts +5 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +77 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/db.d.ts +56 -0
- package/dist/core/db.d.ts.map +1 -0
- package/dist/core/db.js +344 -0
- package/dist/core/db.js.map +1 -0
- package/dist/core/materializer/claude-code.d.ts +8 -0
- package/dist/core/materializer/claude-code.d.ts.map +1 -0
- package/dist/core/materializer/claude-code.js +83 -0
- package/dist/core/materializer/claude-code.js.map +1 -0
- package/dist/core/materializer/index.d.ts +8 -0
- package/dist/core/materializer/index.d.ts.map +1 -0
- package/dist/core/materializer/index.js +13 -0
- package/dist/core/materializer/index.js.map +1 -0
- package/dist/core/materializer/opencode.d.ts +8 -0
- package/dist/core/materializer/opencode.d.ts.map +1 -0
- package/dist/core/materializer/opencode.js +76 -0
- package/dist/core/materializer/opencode.js.map +1 -0
- package/dist/core/materializer/templates.d.ts +25 -0
- package/dist/core/materializer/templates.d.ts.map +1 -0
- package/dist/core/materializer/templates.js +319 -0
- package/dist/core/materializer/templates.js.map +1 -0
- package/dist/core/mcp-server.d.ts +3 -0
- package/dist/core/mcp-server.d.ts.map +1 -0
- package/dist/core/mcp-server.js +264 -0
- package/dist/core/mcp-server.js.map +1 -0
- package/dist/core/sqlite-adapter.d.ts +14 -0
- package/dist/core/sqlite-adapter.d.ts.map +1 -0
- package/dist/core/sqlite-adapter.js +20 -0
- package/dist/core/sqlite-adapter.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/tests/db.test.d.ts +2 -0
- package/dist/tests/db.test.d.ts.map +1 -0
- package/dist/tests/db.test.js +106 -0
- package/dist/tests/db.test.js.map +1 -0
- package/dist/tests/slugify.test.d.ts +2 -0
- package/dist/tests/slugify.test.d.ts.map +1 -0
- package/dist/tests/slugify.test.js +26 -0
- package/dist/tests/slugify.test.js.map +1 -0
- package/dist/tests/templates.test.d.ts +2 -0
- package/dist/tests/templates.test.d.ts.map +1 -0
- package/dist/tests/templates.test.js +64 -0
- package/dist/tests/templates.test.js.map +1 -0
- package/dist/types.d.ts +141 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +56 -0
package/README.md
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# agent-harness-kit
|
|
2
|
+
|
|
3
|
+
CLI scaffolding for multi-agent harness systems.
|
|
4
|
+
Binary: `ahk` · Works with Claude Code, OpenCode, and any MCP-compatible AI tool.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Requirements
|
|
9
|
+
|
|
10
|
+
- Node.js ≥ 22 **or** Bun (any recent version)
|
|
11
|
+
- npm ≥ 9
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Local development setup
|
|
16
|
+
|
|
17
|
+
### 1. Clone and install dependencies
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
git clone <repo-url>
|
|
21
|
+
cd agent-harness-kit
|
|
22
|
+
npm install
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 2. Build the TypeScript source
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm run build
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
This compiles `src/` → `dist/`. You must re-run this every time you change source files.
|
|
32
|
+
|
|
33
|
+
> Tip: run `npm run dev` in a separate terminal to watch for changes and rebuild automatically.
|
|
34
|
+
|
|
35
|
+
### 3. Link the binary globally
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm link
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This registers `ahk` as a global command on your machine by symlinking `bin/ahk.js` into your global `node_modules/.bin/`.
|
|
42
|
+
|
|
43
|
+
Verify it worked:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
ahk --version
|
|
47
|
+
# 0.1.0
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Testing from an external project folder
|
|
53
|
+
|
|
54
|
+
Once linked, you can use `ahk` from **any directory** — no need to be inside `agent-harness-kit/`.
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Create a test project folder anywhere
|
|
58
|
+
mkdir ~/projects/my-test-app
|
|
59
|
+
cd ~/projects/my-test-app
|
|
60
|
+
|
|
61
|
+
# Run the interactive scaffold
|
|
62
|
+
ahk init
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Follow the prompts. After init, your folder will contain:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
my-test-app/
|
|
69
|
+
├── agent-harness-kit.config.ts ← your harness config
|
|
70
|
+
├── AGENTS.md ← navigation map for agents
|
|
71
|
+
├── health.sh ← implement your health checks here
|
|
72
|
+
├── .harness/
|
|
73
|
+
│ ├── harness.db ← SQLite source of truth
|
|
74
|
+
│ ├── current.md ← auto-generated session snapshot
|
|
75
|
+
│ └── feature_list.json ← human-editable task list
|
|
76
|
+
└── .claude/
|
|
77
|
+
├── agents/
|
|
78
|
+
│ ├── lead.md
|
|
79
|
+
│ ├── explorer.md
|
|
80
|
+
│ ├── builder.md
|
|
81
|
+
│ └── reviewer.md
|
|
82
|
+
└── mcp.json ← Claude Code picks this up automatically
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Development loop
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
# Terminal 1 — watch and rebuild on save
|
|
91
|
+
cd agent-harness-kit
|
|
92
|
+
npm run dev
|
|
93
|
+
|
|
94
|
+
# Terminal 2 — test commands from your external project
|
|
95
|
+
cd ~/projects/my-test-app
|
|
96
|
+
ahk status
|
|
97
|
+
ahk task add
|
|
98
|
+
ahk health
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Because `npm link` creates a symlink (not a copy), every rebuild in terminal 1 is immediately available in terminal 2 — no re-linking needed.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Available commands
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
ahk init Interactive harness scaffold
|
|
109
|
+
ahk build Regenerate AGENTS.md + provider files from config
|
|
110
|
+
ahk build --watch Rebuild on config file changes
|
|
111
|
+
ahk health Run health.sh and report result
|
|
112
|
+
ahk status Show task table and active actions
|
|
113
|
+
ahk status --json Same, as JSON
|
|
114
|
+
ahk sync Sync feature_list.json ↔ SQLite
|
|
115
|
+
ahk sync --dry-run Preview changes without applying
|
|
116
|
+
ahk serve Start MCP server on stdio (used by Claude Code)
|
|
117
|
+
ahk task add Add a task interactively
|
|
118
|
+
ahk task list List all tasks
|
|
119
|
+
ahk task list --status pending|in_progress|done|blocked
|
|
120
|
+
ahk task done <id|slug> Mark a task as done (runs health check first)
|
|
121
|
+
ahk migrate --to <provider> Move provider files to claude-code or opencode
|
|
122
|
+
ahk export --json Export tasks + actions as JSON
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Remove the global link
|
|
128
|
+
|
|
129
|
+
When you no longer need the local link:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
npm unlink -g agent-harness-kit
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## MCP server
|
|
138
|
+
|
|
139
|
+
`ahk serve` starts the MCP server on stdio. You never need to call it manually — after `ahk init`, the generated `.claude/mcp.json` (Claude Code) or `opencode.json` (OpenCode) tells the AI tool to spawn it automatically when you open the project.
|
|
140
|
+
|
|
141
|
+
**Tools exposed to agents:**
|
|
142
|
+
|
|
143
|
+
| Tool | Description |
|
|
144
|
+
|------|-------------|
|
|
145
|
+
| `actions.start(taskId, agent)` | Start an action, returns `actionId` |
|
|
146
|
+
| `actions.write(actionId, section, content)` | Record a section (result, tools\_used, …) |
|
|
147
|
+
| `actions.complete(actionId, summary)` | Close the action |
|
|
148
|
+
| `actions.get(taskId)` | Full action history for a task |
|
|
149
|
+
| `tasks.get([status])` | List tasks, optionally filtered |
|
|
150
|
+
| `tasks.claim(id, agent)` | Atomically claim a pending task |
|
|
151
|
+
| `tasks.update(id, status)` | Change task status |
|
|
152
|
+
| `docs.search(query)` | Search the project docs folder |
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Runtime compatibility
|
|
157
|
+
|
|
158
|
+
| Runtime | Support |
|
|
159
|
+
|---------|---------|
|
|
160
|
+
| Node.js ≥ 22 | ✅ uses `node:sqlite` built-in |
|
|
161
|
+
| Bun (any) | ✅ uses `bun:sqlite` built-in |
|
|
162
|
+
| Node.js < 22 | ❌ `node:sqlite` not available |
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Running tests
|
|
167
|
+
|
|
168
|
+
Tests use the Node.js built-in test runner — no extra dependencies needed.
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
npm run build
|
|
172
|
+
npm test
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Publishing to npm
|
|
178
|
+
|
|
179
|
+
The package is published under the `@cardor` scope as `@cardor/agent-harness-kit`.
|
|
180
|
+
|
|
181
|
+
### Prerequisites
|
|
182
|
+
|
|
183
|
+
1. Be a member of the `@cardor` npm organization (or have publish access).
|
|
184
|
+
2. Be logged in to npm:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
npm login
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Manual publish
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
# 1. Bump the version (patch | minor | major)
|
|
194
|
+
npm version patch
|
|
195
|
+
|
|
196
|
+
# 2. Build, run tests, and publish (prepublishOnly does build + test automatically)
|
|
197
|
+
npm publish --access public
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
> `--access public` is required for scoped packages on the free npm plan.
|
|
201
|
+
|
|
202
|
+
### Check what will be packed before publishing
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
npm pack --dry-run
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
This lists every file that would be included in the tarball without actually uploading anything. Make sure `dist/` and `bin/` are listed, and that `src/`, `node_modules/`, and `.harness/` are **not**.
|
|
209
|
+
|
|
210
|
+
### Patch release checklist
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
[ ] git pull --rebase origin main
|
|
214
|
+
[ ] npm run build && npm test # must be green
|
|
215
|
+
[ ] npm version patch # bumps package.json + creates git tag
|
|
216
|
+
[ ] git push && git push --tags # CI will publish automatically (see below)
|
|
217
|
+
[ ] npm publish --access public # only if publishing manually
|
|
218
|
+
```
|
package/bin/ahk.js
ADDED
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { runInit } from './commands/init.js';
|
|
4
|
+
import { runBuild } from './commands/build.js';
|
|
5
|
+
import { runHealth } from './commands/health.js';
|
|
6
|
+
import { runStatus } from './commands/status.js';
|
|
7
|
+
import { runSync } from './commands/sync.js';
|
|
8
|
+
import { runServe } from './commands/serve.js';
|
|
9
|
+
import { runMigrate } from './commands/migrate.js';
|
|
10
|
+
import { runExport } from './commands/export.js';
|
|
11
|
+
import { runTaskAdd, runTaskList, runTaskDone } from './commands/task/index.js';
|
|
12
|
+
const require = createRequire(import.meta.url);
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
14
|
+
const pkg = require('../package.json');
|
|
15
|
+
const cwd = process.cwd();
|
|
16
|
+
const program = new Command();
|
|
17
|
+
program
|
|
18
|
+
.name('ahk')
|
|
19
|
+
.description('agent-harness-kit — CLI scaffolding for multi-agent harness systems')
|
|
20
|
+
.version(pkg.version, '-v, --version');
|
|
21
|
+
// ─── init ─────────────────────────────────────────────────────────────────────
|
|
22
|
+
program
|
|
23
|
+
.command('init')
|
|
24
|
+
.description('Scaffold a harness interactively in the current directory')
|
|
25
|
+
.option('--name <name>', 'Project name (skip prompt)')
|
|
26
|
+
.option('--provider <provider>', 'AI provider: claude-code | opencode (skip prompt)')
|
|
27
|
+
.option('--docs <path>', 'Docs folder path (skip prompt)')
|
|
28
|
+
.option('--tasks <adapter>', 'Task adapter: local | jira | linear (skip prompt)')
|
|
29
|
+
.action(async (opts) => {
|
|
30
|
+
await runInit(cwd, opts);
|
|
31
|
+
});
|
|
32
|
+
// ─── build ────────────────────────────────────────────────────────────────────
|
|
33
|
+
program
|
|
34
|
+
.command('build')
|
|
35
|
+
.description('Regenerate AGENTS.md and provider files from agent-harness-kit.config.ts')
|
|
36
|
+
.option('--watch', 'Rebuild on config changes')
|
|
37
|
+
.action(async (opts) => {
|
|
38
|
+
await runBuild(cwd, opts);
|
|
39
|
+
});
|
|
40
|
+
// ─── health ───────────────────────────────────────────────────────────────────
|
|
41
|
+
program
|
|
42
|
+
.command('health')
|
|
43
|
+
.description('Run health.sh and report result')
|
|
44
|
+
.action(async () => {
|
|
45
|
+
await runHealth(cwd);
|
|
46
|
+
});
|
|
47
|
+
// ─── status ───────────────────────────────────────────────────────────────────
|
|
48
|
+
program
|
|
49
|
+
.command('status')
|
|
50
|
+
.description('Show task table and active actions')
|
|
51
|
+
.option('--json', 'Output as JSON')
|
|
52
|
+
.action(async (opts) => {
|
|
53
|
+
await runStatus(cwd, opts);
|
|
54
|
+
});
|
|
55
|
+
// ─── sync ─────────────────────────────────────────────────────────────────────
|
|
56
|
+
program
|
|
57
|
+
.command('sync')
|
|
58
|
+
.description('Sync feature_list.json ↔ SQLite')
|
|
59
|
+
.option('--dry-run', 'Show what would change without applying')
|
|
60
|
+
.option('--direction <direction>', 'in | out | both (default: both)')
|
|
61
|
+
.action(async (opts) => {
|
|
62
|
+
await runSync(cwd, { dryRun: opts['dry-run'], direction: opts.direction });
|
|
63
|
+
});
|
|
64
|
+
// ─── serve ────────────────────────────────────────────────────────────────────
|
|
65
|
+
program
|
|
66
|
+
.command('serve')
|
|
67
|
+
.description('Start the MCP server (stdio)')
|
|
68
|
+
.option('--port <port>', 'Port hint stored in config (default: 3742)', parseInt)
|
|
69
|
+
.action(async (opts) => {
|
|
70
|
+
await runServe(cwd, { port: opts.port });
|
|
71
|
+
});
|
|
72
|
+
// ─── task ─────────────────────────────────────────────────────────────────────
|
|
73
|
+
const task = program.command('task').description('Manage tasks');
|
|
74
|
+
task
|
|
75
|
+
.command('add')
|
|
76
|
+
.description('Add a task interactively')
|
|
77
|
+
.action(async () => {
|
|
78
|
+
await runTaskAdd(cwd);
|
|
79
|
+
});
|
|
80
|
+
task
|
|
81
|
+
.command('list')
|
|
82
|
+
.description('List tasks')
|
|
83
|
+
.option('--status <status>', 'Filter by status: pending | in_progress | done | blocked')
|
|
84
|
+
.option('--json', 'Output as JSON')
|
|
85
|
+
.action(async (opts) => {
|
|
86
|
+
await runTaskList(cwd, opts);
|
|
87
|
+
});
|
|
88
|
+
task
|
|
89
|
+
.command('done <id|slug>')
|
|
90
|
+
.description('Mark a task as done')
|
|
91
|
+
.action(async (idOrSlug) => {
|
|
92
|
+
await runTaskDone(cwd, idOrSlug);
|
|
93
|
+
});
|
|
94
|
+
// ─── migrate ──────────────────────────────────────────────────────────────────
|
|
95
|
+
program
|
|
96
|
+
.command('migrate')
|
|
97
|
+
.description('Migrate provider-specific files to a different provider')
|
|
98
|
+
.option('--to <provider>', 'Target provider: claude-code | opencode')
|
|
99
|
+
.action(async (opts) => {
|
|
100
|
+
await runMigrate(cwd, opts);
|
|
101
|
+
});
|
|
102
|
+
// ─── export ───────────────────────────────────────────────────────────────────
|
|
103
|
+
program
|
|
104
|
+
.command('export')
|
|
105
|
+
.description('Export the database')
|
|
106
|
+
.option('--sql', 'SQL dump')
|
|
107
|
+
.option('--json', 'JSON export of tasks and actions')
|
|
108
|
+
.option('--output <path>', 'Output file path (default: stdout)')
|
|
109
|
+
.action(async (opts) => {
|
|
110
|
+
await runExport(cwd, opts);
|
|
111
|
+
});
|
|
112
|
+
program.parse();
|
|
113
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAG3C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,WAAW,EA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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAMA,UAAU,YAAY;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,wBAAsB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAc7E"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as p from '@clack/prompts';
|
|
2
|
+
import pc from 'picocolors';
|
|
3
|
+
import { watch } from 'node:fs';
|
|
4
|
+
import { loadConfig } from '../core/config.js';
|
|
5
|
+
import { getMaterializer } from '../core/materializer/index.js';
|
|
6
|
+
export async function runBuild(cwd, opts) {
|
|
7
|
+
await buildOnce(cwd);
|
|
8
|
+
if (opts.watch) {
|
|
9
|
+
p.log.info(`Watching agent-harness-kit.config.ts for changes...`);
|
|
10
|
+
watch(cwd, { recursive: false }, async (_, filename) => {
|
|
11
|
+
if (filename?.startsWith('agent-harness-kit.config')) {
|
|
12
|
+
p.log.step('Config changed — rebuilding...');
|
|
13
|
+
await buildOnce(cwd);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
// Keep process alive
|
|
17
|
+
await new Promise(() => { });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
async function buildOnce(cwd) {
|
|
21
|
+
const spinner = p.spinner();
|
|
22
|
+
spinner.start('Loading config...');
|
|
23
|
+
try {
|
|
24
|
+
const config = await loadConfig(cwd);
|
|
25
|
+
spinner.message('Rebuilding files...');
|
|
26
|
+
const materializer = getMaterializer(config.provider);
|
|
27
|
+
await materializer.build(config, cwd);
|
|
28
|
+
spinner.stop(pc.green('Build complete'));
|
|
29
|
+
p.log.success('AGENTS.md');
|
|
30
|
+
p.log.success(`Agent definitions (${config.provider})`);
|
|
31
|
+
p.log.success('MCP config');
|
|
32
|
+
}
|
|
33
|
+
catch (err) {
|
|
34
|
+
spinner.stop(pc.red('Build failed'));
|
|
35
|
+
p.log.error(err instanceof Error ? err.message : String(err));
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=build.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAA;AACnC,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAM/D,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,GAAW,EAAE,IAAkB;IAC5D,MAAM,SAAS,CAAC,GAAG,CAAC,CAAA;IAEpB,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,qDAAqD,CAAC,CAAA;QACjE,KAAK,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE;YACrD,IAAI,QAAQ,EAAE,UAAU,CAAC,0BAA0B,CAAC,EAAE,CAAC;gBACrD,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAA;gBAC5C,MAAM,SAAS,CAAC,GAAG,CAAC,CAAA;YACtB,CAAC;QACH,CAAC,CAAC,CAAA;QACF,qBAAqB;QACrB,MAAM,IAAI,OAAO,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;IAC7B,CAAC;AACH,CAAC;AAED,KAAK,UAAU,SAAS,CAAC,GAAW;IAClC,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,EAAE,CAAA;IAC3B,OAAO,CAAC,KAAK,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,CAAC,IAAI,CAAC,CA4B/E"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import pc from 'picocolors';
|
|
2
|
+
import { writeFileSync } from 'node:fs';
|
|
3
|
+
import { loadConfig } from '../core/config.js';
|
|
4
|
+
import { openDB } from '../core/db.js';
|
|
5
|
+
export async function runExport(cwd, opts) {
|
|
6
|
+
if (!opts.sql && !opts.json) {
|
|
7
|
+
console.error(pc.red('Specify --sql or --json'));
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
const config = await loadConfig(cwd);
|
|
11
|
+
const db = openDB(config, cwd);
|
|
12
|
+
try {
|
|
13
|
+
if (opts.json) {
|
|
14
|
+
const data = db.exportJson();
|
|
15
|
+
const out = JSON.stringify(data, null, 2) + '\n';
|
|
16
|
+
if (opts.output) {
|
|
17
|
+
writeFileSync(opts.output, out, 'utf8');
|
|
18
|
+
console.log(pc.green(`✓ Exported JSON → ${opts.output}`));
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
process.stdout.write(out);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
if (opts.sql) {
|
|
25
|
+
console.error(pc.dim('SQL dump requires direct SQLite access — use: sqlite3 .harness/harness.db .dump'));
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
finally {
|
|
30
|
+
db.close();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=export.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAQtC,MAAM,CAAC,KAAK,UAAU,SAA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":"health.d.ts","sourceRoot":"","sources":["../../src/commands/health.ts"],"names":[],"mappings":"AAMA,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkC1D"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import pc from 'picocolors';
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { existsSync } from 'node:fs';
|
|
4
|
+
import { join, resolve } from 'node:path';
|
|
5
|
+
import { loadConfig } from '../core/config.js';
|
|
6
|
+
export async function runHealth(cwd) {
|
|
7
|
+
let scriptPath;
|
|
8
|
+
try {
|
|
9
|
+
const config = await loadConfig(cwd);
|
|
10
|
+
scriptPath = resolve(cwd, config.health.scriptPath);
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
scriptPath = join(cwd, 'health.sh');
|
|
14
|
+
}
|
|
15
|
+
if (!existsSync(scriptPath)) {
|
|
16
|
+
console.error(pc.red(`✗ health.sh not found: ${scriptPath}`));
|
|
17
|
+
console.error(' Run ahk init first.');
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
const result = spawnSync('bash', [scriptPath], {
|
|
21
|
+
cwd,
|
|
22
|
+
stdio: 'inherit',
|
|
23
|
+
encoding: 'utf8',
|
|
24
|
+
});
|
|
25
|
+
if (result.error) {
|
|
26
|
+
console.error(pc.red(`✗ Failed to run health.sh: ${result.error.message}`));
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
if (result.status === 0) {
|
|
30
|
+
console.log(pc.green('✓ Health check passed'));
|
|
31
|
+
process.exit(0);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
console.error(pc.red(`✗ Health check failed (exit ${result.status ?? 'unknown'})`));
|
|
35
|
+
process.exit(result.status ?? 1);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=health.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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AAC,CAAC,CAAC,CAAA;IACjB,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAA;QAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,+BAA+B,MAAM,CAAC,MAAM,IAAI,SAAS,GAAG,CAAC,CAAC,CAAA;QACnF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,CAAA;IAClC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HarnessConfig, Provider } from '../types.js';
|
|
2
|
+
export declare function applyConfigDefaults(params: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
provider: Provider;
|
|
6
|
+
docsPath: string;
|
|
7
|
+
tasksAdapter: string;
|
|
8
|
+
}): HarnessConfig;
|
|
9
|
+
//# sourceMappingURL=init-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-helpers.d.ts","sourceRoot":"","sources":["../../src/commands/init-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE1D,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAC1C,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,QAAQ,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;CACrB,GAAG,aAAa,CAsChB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export function applyConfigDefaults(params) {
|
|
2
|
+
return {
|
|
3
|
+
provider: params.provider,
|
|
4
|
+
project: {
|
|
5
|
+
name: params.name,
|
|
6
|
+
description: params.description,
|
|
7
|
+
docsPath: params.docsPath,
|
|
8
|
+
agentsMd: './AGENTS.md',
|
|
9
|
+
},
|
|
10
|
+
agents: {
|
|
11
|
+
lead: { instructionsPath: null },
|
|
12
|
+
explorer: { instructionsPath: null, allowedPaths: [params.docsPath, './src'] },
|
|
13
|
+
builder: { instructionsPath: null, writablePaths: ['./src', './tests'] },
|
|
14
|
+
reviewer: { instructionsPath: null },
|
|
15
|
+
custom: [],
|
|
16
|
+
},
|
|
17
|
+
storage: {
|
|
18
|
+
dir: '.harness',
|
|
19
|
+
dbPath: '.harness/harness.db',
|
|
20
|
+
tasks: { adapter: params.tasksAdapter },
|
|
21
|
+
sections: {
|
|
22
|
+
toolsUsed: true,
|
|
23
|
+
filesModified: true,
|
|
24
|
+
result: true,
|
|
25
|
+
blockers: true,
|
|
26
|
+
nextSteps: false,
|
|
27
|
+
},
|
|
28
|
+
markdownFallback: { enabled: true, path: '.harness/current.md' },
|
|
29
|
+
},
|
|
30
|
+
health: {
|
|
31
|
+
scriptPath: './health.sh',
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
tools: {
|
|
35
|
+
mcp: { enabled: true, port: 3742 },
|
|
36
|
+
scripts: { enabled: true, outputDir: './.harness/scripts' },
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=init-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-helpers.js","sourceRoot":"","sources":["../../src/commands/init-helpers.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,mBAAmB,CAAC,MAMnC;IACC,OAAO;QACL,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,OAAO,EAAE;YACP,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,Q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