@cardor/agent-harness-kit 1.2.3 → 1.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/README.md +1 -0
- package/dist/agent-templates/lead.md +11 -0
- package/dist/cli.js +15 -3
- package/dist/cli.js.map +1 -1
- package/dist/{mysql-IMDWH2CU.js → mysql-LQXFOAQE.js} +5 -1
- package/dist/{mysql-IMDWH2CU.js.map → mysql-LQXFOAQE.js.map} +1 -1
- package/dist/{postgres-TYINLEAT.js → postgres-KQMJNRS2.js} +5 -1
- package/dist/{postgres-TYINLEAT.js.map → postgres-KQMJNRS2.js.map} +1 -1
- package/dist/{sqlite-5R6LB3RX.js → sqlite-NXFRDHK6.js} +9 -1
- package/dist/sqlite-NXFRDHK6.js.map +1 -0
- package/package.json +5 -2
- package/dist/sqlite-5R6LB3RX.js.map +0 -1
package/README.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
**A provider-agnostic scaffolding kit for running structured multi-agent workflows in your codebase.**
|
|
4
4
|
|
|
5
5
|

|
|
6
|
+

|
|
6
7
|

|
|
7
8
|
[](https://snyk.io/test/npm/@cardor/agent-harness-kit)
|
|
8
9
|
|
|
@@ -168,6 +168,17 @@ tasks.update(taskId, 'done')
|
|
|
168
168
|
bash health.sh → must be green before closing
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## PR Context Order
|
|
175
|
+
|
|
176
|
+
When creating a PR via the CLI, gather context in this order:
|
|
177
|
+
|
|
178
|
+
1. **First** — Search the feature task DB via MCP (agent-harness-kit tools: `tasks.get`, `actions.get`, `docs.search`)
|
|
179
|
+
2. **Second** — Review chat history for relevant discussion, decisions, and requirements
|
|
180
|
+
3. **Third** — Use git CLI to inspect file changes (`git diff`, `git status`, `git log`)
|
|
181
|
+
|
|
171
182
|
## Hard rules
|
|
172
183
|
|
|
173
184
|
- **One task at a time.** Never pick a second task while one is in progress.
|
package/dist/cli.js
CHANGED
|
@@ -745,6 +745,7 @@ function startDashboardServer(db, dbPath, staticPath, port) {
|
|
|
745
745
|
c.res.headers.set("Access-Control-Allow-Origin", "*");
|
|
746
746
|
});
|
|
747
747
|
app.get("/api/stats", async (c) => {
|
|
748
|
+
await db.reconnect();
|
|
748
749
|
const summary = await tasks.getStatusSummary();
|
|
749
750
|
const byStatus = { pending: 0, in_progress: 0, done: 0, blocked: 0 };
|
|
750
751
|
for (const { status, total } of summary) byStatus[status] = total;
|
|
@@ -755,9 +756,11 @@ function startDashboardServer(db, dbPath, staticPath, port) {
|
|
|
755
756
|
return c.json({ ok: true });
|
|
756
757
|
});
|
|
757
758
|
app.get("/api/tasks", async (c) => {
|
|
759
|
+
await db.reconnect();
|
|
758
760
|
return c.json(await tasks.getAllWithAcceptanceCounts());
|
|
759
761
|
});
|
|
760
762
|
app.get("/api/tasks/:id", async (c) => {
|
|
763
|
+
await db.reconnect();
|
|
761
764
|
const id = parseInt(c.req.param("id"));
|
|
762
765
|
const task2 = await tasks.getById(id);
|
|
763
766
|
if (!task2) return c.json({ error: "Not found" }, 404);
|
|
@@ -766,25 +769,31 @@ function startDashboardServer(db, dbPath, staticPath, port) {
|
|
|
766
769
|
return c.json({ ...task2, acceptance, actions: taskActions });
|
|
767
770
|
});
|
|
768
771
|
app.get("/api/tools/top", async (c) => {
|
|
772
|
+
await db.reconnect();
|
|
769
773
|
const limit = parseInt(c.req.query("limit") ?? "20");
|
|
770
774
|
return c.json(await actions.getTopTools(limit));
|
|
771
775
|
});
|
|
772
776
|
app.get("/api/tools/recent", async (c) => {
|
|
777
|
+
await db.reconnect();
|
|
773
778
|
const limit = parseInt(c.req.query("limit") ?? "50");
|
|
774
779
|
return c.json(await stats.getRecentTools(limit));
|
|
775
780
|
});
|
|
776
781
|
app.get("/api/files/top", async (c) => {
|
|
782
|
+
await db.reconnect();
|
|
777
783
|
const limit = parseInt(c.req.query("limit") ?? "20");
|
|
778
784
|
return c.json(await stats.getTopFiles(limit));
|
|
779
785
|
});
|
|
780
786
|
app.get("/api/files/recent", async (c) => {
|
|
787
|
+
await db.reconnect();
|
|
781
788
|
const limit = parseInt(c.req.query("limit") ?? "50");
|
|
782
789
|
return c.json(await stats.getRecentFiles(limit));
|
|
783
790
|
});
|
|
784
791
|
app.get("/api/agents/stats", async (c) => {
|
|
792
|
+
await db.reconnect();
|
|
785
793
|
return c.json(await stats.getAgentStats());
|
|
786
794
|
});
|
|
787
795
|
app.get("/api/timeline", async (c) => {
|
|
796
|
+
await db.reconnect();
|
|
788
797
|
const limit = parseInt(c.req.query("limit") ?? "50");
|
|
789
798
|
return c.json(await stats.getTimeline(limit));
|
|
790
799
|
});
|
|
@@ -1326,6 +1335,9 @@ var HarnessDB = class {
|
|
|
1326
1335
|
sections: await this.actions.getAllSections()
|
|
1327
1336
|
};
|
|
1328
1337
|
}
|
|
1338
|
+
async reconnect() {
|
|
1339
|
+
await this.driver.reconnect();
|
|
1340
|
+
}
|
|
1329
1341
|
async close() {
|
|
1330
1342
|
await this.driver.close();
|
|
1331
1343
|
}
|
|
@@ -1363,13 +1375,13 @@ async function openDB(config, cwd2) {
|
|
|
1363
1375
|
const dbConfig = config.database;
|
|
1364
1376
|
let driver;
|
|
1365
1377
|
if (dbConfig.type === "postgres") {
|
|
1366
|
-
const { PostgresDriver } = await import("./postgres-
|
|
1378
|
+
const { PostgresDriver } = await import("./postgres-KQMJNRS2.js");
|
|
1367
1379
|
driver = new PostgresDriver(dbConfig);
|
|
1368
1380
|
} else if (dbConfig.type === "mysql") {
|
|
1369
|
-
const { MySQLDriver } = await import("./mysql-
|
|
1381
|
+
const { MySQLDriver } = await import("./mysql-LQXFOAQE.js");
|
|
1370
1382
|
driver = new MySQLDriver(dbConfig);
|
|
1371
1383
|
} else {
|
|
1372
|
-
const { SQLiteDriver } = await import("./sqlite-
|
|
1384
|
+
const { SQLiteDriver } = await import("./sqlite-NXFRDHK6.js");
|
|
1373
1385
|
if (dbConfig.type !== "sqlite") {
|
|
1374
1386
|
throw new Error("Invalid database type");
|
|
1375
1387
|
}
|