@hasna/todos 0.15.25 → 0.15.26

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.
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../src/task-manifest/sqlite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAE/B,KAAK,wBAAwB,EAC9B,MAAM,cAAc,CAAC;AAGtB,OAAO,EAGL,KAAK,4BAA4B,EACjC,KAAK,kCAAkC,EACvC,KAAK,mCAAmC,EAExC,KAAK,wBAAwB,EAC9B,MAAM,YAAY,CAAC;AAYpB,qBAAa,8BAA+B,YAAW,wBAAwB;IAI3E,OAAO,CAAC,QAAQ,CAAC,EAAE;IACnB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAJ3B,QAAQ,CAAC,IAAI,EAAG,QAAQ,CAAU;gBAGf,EAAE,EAAE,QAAQ,EACZ,QAAQ,SAAY;YAKzB,UAAU;IAuBlB,KAAK,CAAC,KAAK,EAAE,sBAAsB,EAAE,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC,4BAA4B,CAAC;IAyI/G,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,4BAA4B,CAAC;IAQnE,qBAAqB,CAAC,MAAM,EAAE,MAAM;IA2BpC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA+BzE,UAAU,CACd,KAAK,EAAE,kCAAkC,EACzC,OAAO,EAAE,wBAAwB,EACjC,qBAAqB,EAAE,MAAM,EAC7B,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,mCAAmC,CAAC;IA+K/C,OAAO,CAAC,QAAQ;CAajB"}
1
+ {"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../src/task-manifest/sqlite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAE/B,KAAK,wBAAwB,EAC9B,MAAM,cAAc,CAAC;AAGtB,OAAO,EAGL,KAAK,4BAA4B,EACjC,KAAK,kCAAkC,EACvC,KAAK,mCAAmC,EAExC,KAAK,wBAAwB,EAC9B,MAAM,YAAY,CAAC;AAYpB,qBAAa,8BAA+B,YAAW,wBAAwB;IAI3E,OAAO,CAAC,QAAQ,CAAC,EAAE;IACnB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAJ3B,QAAQ,CAAC,IAAI,EAAG,QAAQ,CAAU;gBAGf,EAAE,EAAE,QAAQ,EACZ,QAAQ,SAAY;YAKzB,UAAU;IAuBlB,KAAK,CAAC,KAAK,EAAE,sBAAsB,EAAE,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC,4BAA4B,CAAC;IAyI/G,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,4BAA4B,CAAC;IAQnE,qBAAqB,CAAC,MAAM,EAAE,MAAM;IA2BpC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA+BzE,UAAU,CACd,KAAK,EAAE,kCAAkC,EACzC,OAAO,EAAE,wBAAwB,EACjC,qBAAqB,EAAE,MAAM,EAC7B,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,mCAAmC,CAAC;IA+K/C,OAAO,CAAC,QAAQ;CAajB"}
@@ -5045,6 +5045,12 @@ function parseTodosTaskManifestBindingLookup(input) {
5045
5045
  return parsed.data;
5046
5046
  }
5047
5047
 
5048
+ // src/task-manifest/plan-slug.ts
5049
+ function taskManifestPlanSlug(manifest, planId) {
5050
+ const base = normalizeSlug(manifest.plan.key) || normalizeSlug(manifest.plan.name) || "plan";
5051
+ return `${base}-${planId}`;
5052
+ }
5053
+
5048
5054
  // src/task-manifest/backend.ts
5049
5055
  var UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
5050
5056
  function validateTaskManifestBindingLookupRows(rows, tenantId, planId) {
@@ -5395,7 +5401,7 @@ class SqliteTodosTaskManifestBackend {
5395
5401
  }
5396
5402
  }
5397
5403
  this.db.query(`INSERT INTO plans (id, project_id, name, description, status, task_list_id, slug, created_at, updated_at)
5398
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(input.graph.plan_id, manifest.project_id, manifest.plan.name, manifest.plan.description ?? null, manifest.plan.status ?? "active", manifest.task_list_id ?? null, null, input.now, input.now);
5404
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(input.graph.plan_id, manifest.project_id, manifest.plan.name, manifest.plan.description ?? null, manifest.plan.status ?? "active", manifest.task_list_id ?? null, taskManifestPlanSlug(manifest, input.graph.plan_id), input.now, input.now);
5399
5405
  fault(faults, "after_plan_write");
5400
5406
  for (const task2 of manifest.tasks) {
5401
5407
  const taskId = input.graph.task_ids[task2.key];
@@ -5618,7 +5624,7 @@ class SqliteTodosTaskManifestBackend {
5618
5624
  throw new TodosTaskManifestError("TODOS_TASK_MANIFEST_COMPENSATION_REFUSED", "Compensation refused: graph changed since apply", { actualReadback });
5619
5625
  }
5620
5626
  const plan = this.db.query("SELECT project_id, name, description, status, task_list_id, slug FROM plans WHERE id = ? LIMIT 1").get(applyResult.graph.plan_id);
5621
- if (!plan || plan["project_id"] !== manifest.project_id || plan["name"] !== manifest.plan.name || plan["description"] !== (manifest.plan.description ?? null) || plan["status"] !== (manifest.plan.status ?? "active") || plan["task_list_id"] !== (manifest.task_list_id ?? null) || plan["slug"] !== null) {
5627
+ if (!plan || plan["project_id"] !== manifest.project_id || plan["name"] !== manifest.plan.name || plan["description"] !== (manifest.plan.description ?? null) || plan["status"] !== (manifest.plan.status ?? "active") || plan["task_list_id"] !== (manifest.task_list_id ?? null) || plan["slug"] !== taskManifestPlanSlug(manifest, applyResult.graph.plan_id)) {
5622
5628
  throw new TodosTaskManifestError("TODOS_TASK_MANIFEST_COMPENSATION_REFUSED", "Compensation refused: plan changed since apply");
5623
5629
  }
5624
5630
  for (const task2 of manifest.tasks) {
@@ -6220,7 +6226,7 @@ function taskPayload(manifest, task2, taskId, planId, now) {
6220
6226
  function planPayload(input) {
6221
6227
  return {
6222
6228
  id: input.graph.plan_id,
6223
- slug: null,
6229
+ slug: taskManifestPlanSlug(input.manifest, input.graph.plan_id),
6224
6230
  project_id: input.manifest.project_id,
6225
6231
  task_list_id: input.manifest.task_list_id ?? null,
6226
6232
  agent_id: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/todos",
3
- "version": "0.15.25",
3
+ "version": "0.15.26",
4
4
  "description": "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -49,7 +49,8 @@
49
49
  }
50
50
  },
51
51
  "workspaces": [
52
- "dashboard"
52
+ "dashboard",
53
+ "ai"
53
54
  ],
54
55
  "files": [
55
56
  "dist",
@@ -120,6 +121,7 @@
120
121
  "zod": "^3.24.2"
121
122
  },
122
123
  "overrides": {
124
+ "ajv": "8.20.0",
123
125
  "fast-uri": "3.1.2"
124
126
  },
125
127
  "devDependencies": {