ubiquitous-invention/packages/database/package.json
Randall Stillwell e99aa733c9 chore(agent-coordination): wire Cursor MCP + one-shot importer for dogfooding
Connect Echodo to itself: Cursor sessions can now call this repo's MCP
server (`claim_task`, `complete_task`) over stdio, and operators can
bootstrap the DB from `plans/` without leaving a long-running file
watcher in place.

- `.cursor/mcp.json`: register `echodo` MCP server. Spawns
  `pnpm -s --filter @tasks/mcp-server mcp`. The `mcp` script invokes tsx
  with `--env-file=../../.env` so DATABASE_URL is picked up at the
  per-session process boundary without leaking into committed config.
- `import:markdown-backlog`: new one-shot importer (sibling of the
  existing watch script). Until the DB → markdown export side lands
  (see follow-up task), running the watcher continuously would clobber
  agent-driven status flips on every sweep. The one-shot variant runs a
  single `syncMarkdownBacklogScan` pass and exits.
- File `Task-export-db-to-markdown-frontmatter.md` documenting the
  remaining direction of the sync loop.

Smoke-tested end-to-end against the homelab DB: full `claim_task` →
`complete_task` round-trip via real MCP stdio protocol, with agent_runs
+ audit_log rows landing as expected and the backlog item status
restored via `finalStatus`.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 08:57:21 -05:00

38 lines
1 KiB
JSON

{
"name": "@tasks/database",
"version": "0.1.0",
"private": true,
"type": "module",
"main": "./src/index.ts",
"types": "./src/index.ts",
"exports": {
".": "./src/index.ts",
"./schema": "./src/schema/index.ts",
"./client": "./src/client.ts",
"./markdown-backlog": "./src/markdown-backlog/index.ts"
},
"scripts": {
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
"db:push": "drizzle-kit push",
"db:studio": "drizzle-kit studio",
"type-check": "tsc --noEmit",
"test": "vitest run",
"test:watch": "vitest",
"watch:markdown-backlog": "tsx src/scripts/watch-markdown-backlog.ts",
"import:markdown-backlog": "tsx src/scripts/import-markdown-backlog.ts"
},
"dependencies": {
"drizzle-orm": "^0.38.0",
"postgres": "^3.4.5",
"yaml": "^2.8.3",
"zod": "^3.24.0"
},
"devDependencies": {
"@types/node": "^22.10.0",
"chokidar": "^5.0.0",
"drizzle-kit": "^0.30.0",
"tsx": "^4.19.2",
"typescript": "^5.7.0"
}
}