@hasna/todos 0.15.13 → 0.15.14

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/dist/cli/index.js CHANGED
@@ -2123,7 +2123,7 @@ var package_default;
2123
2123
  var init_package = __esm(() => {
2124
2124
  package_default = {
2125
2125
  name: "@hasna/todos",
2126
- version: "0.15.13",
2126
+ version: "0.15.14",
2127
2127
  description: "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
2128
2128
  type: "module",
2129
2129
  main: "dist/index.js",
@@ -22171,18 +22171,16 @@ function registerTaskCommands(program2) {
22171
22171
  try {
22172
22172
  const roster = await rosterPromise;
22173
22173
  if (!roster.degraded) {
22174
- if (tasks.length === 0) {
22174
+ const notice = describeAssigneeFilter(assignedFilter, { agents: roster.agents });
22175
+ if (notice.kind === "ambiguous") {
22176
+ console.error(chalk3.yellow(`Warning: ${notice.message}`));
22177
+ } else if (tasks.length === 0) {
22175
22178
  const target = canonicalAgentRef(assignedFilter);
22176
22179
  const known = roster.agents.some((a) => canonicalAgentRef(a.name) === target || canonicalAgentRef(a.id) === target);
22177
22180
  if (!known) {
22178
22181
  console.error(chalk3.yellow(`Warning: no agent named '${assignedFilter}' is registered, so this empty result may be a
22179
22182
  ` + ` mistyped name rather than an empty queue. Check with 'todos agents'.`));
22180
22183
  }
22181
- } else {
22182
- const notice = describeAssigneeFilter(assignedFilter, { agents: roster.agents });
22183
- if (notice.kind === "ambiguous") {
22184
- console.error(chalk3.yellow(`Warning: ${notice.message}`));
22185
- }
22186
22184
  }
22187
22185
  }
22188
22186
  } catch {}
@@ -35212,21 +35210,21 @@ class PostgresJsonRecordStore {
35212
35210
  ), existing AS (
35213
35211
  SELECT payload FROM ${this.tableName}
35214
35212
  WHERE service = $1 AND object_type = 'plan_project_link_rollback_receipts'
35215
- AND object_id = $5 AND deleted_at IS NULL
35213
+ AND object_id = $4 AND deleted_at IS NULL
35216
35214
  FOR UPDATE
35217
35215
  ), checks AS (
35218
35216
  SELECT
35219
35217
  EXISTS (SELECT 1 FROM target_plan) AS plan_found,
35220
35218
  COALESCE((SELECT payload->>'updated_at' = $3 FROM target_plan), false) AS plan_revision_ok,
35221
- COALESCE((SELECT jsonb_object_agg(object_id, COALESCE(payload->'project_id', 'null'::jsonb) ORDER BY object_id) FROM member_tasks), '{}'::jsonb) = $7::jsonb
35222
- AND COALESCE((SELECT jsonb_agg(object_id ORDER BY object_id) FROM member_tasks), '[]'::jsonb) = $8::jsonb AS membership_ok,
35219
+ COALESCE((SELECT jsonb_object_agg(object_id, COALESCE(payload->'project_id', 'null'::jsonb) ORDER BY object_id) FROM member_tasks), '{}'::jsonb) = $6::jsonb
35220
+ AND COALESCE((SELECT jsonb_agg(object_id ORDER BY object_id) FROM member_tasks), '[]'::jsonb) = $7::jsonb AS membership_ok,
35223
35221
  EXISTS (SELECT 1 FROM existing) AS has_existing
35224
35222
  ), updated_plan AS (
35225
35223
  UPDATE ${this.tableName} r SET
35226
- payload = r.payload || jsonb_build_object('project_id', $9::jsonb, 'updated_at', $10::text),
35227
- updated_at = $10::timestamptz,
35224
+ payload = r.payload || jsonb_build_object('project_id', $8::jsonb, 'updated_at', $9::text),
35225
+ updated_at = $9::timestamptz,
35228
35226
  version = COALESCE(r.version, 0) + 1,
35229
- source_machine_id = COALESCE($11, r.source_machine_id)
35227
+ source_machine_id = COALESCE($10, r.source_machine_id)
35230
35228
  FROM checks
35231
35229
  WHERE r.service = $1 AND r.object_type = 'plans' AND r.object_id = $2 AND r.deleted_at IS NULL
35232
35230
  AND checks.plan_found AND checks.plan_revision_ok AND checks.membership_ok AND NOT checks.has_existing
@@ -35234,20 +35232,20 @@ class PostgresJsonRecordStore {
35234
35232
  ), updated_tasks AS (
35235
35233
  UPDATE ${this.tableName} r SET
35236
35234
  payload = r.payload || jsonb_build_object(
35237
- 'project_id', COALESCE($12::jsonb -> r.object_id, 'null'::jsonb),
35238
- 'updated_at', $10::text,
35235
+ 'project_id', COALESCE($11::jsonb -> r.object_id, 'null'::jsonb),
35236
+ 'updated_at', $9::text,
35239
35237
  'version', COALESCE((r.payload->>'version')::int, 0) + 1
35240
35238
  ),
35241
- updated_at = $10::timestamptz,
35239
+ updated_at = $9::timestamptz,
35242
35240
  version = COALESCE(r.version, 0) + 1,
35243
- source_machine_id = COALESCE($11, r.source_machine_id)
35241
+ source_machine_id = COALESCE($10, r.source_machine_id)
35244
35242
  WHERE r.service = $1 AND r.object_type = 'tasks' AND r.deleted_at IS NULL
35245
35243
  AND r.payload->>'plan_id' = $2 AND EXISTS (SELECT 1 FROM updated_plan)
35246
35244
  RETURNING 1
35247
35245
  ), task_gate AS (SELECT count(*) AS count FROM updated_tasks), inserted AS (
35248
35246
  INSERT INTO ${this.tableName}
35249
35247
  (service, object_type, object_id, payload, updated_at, deleted_at, source_machine_id, version)
35250
- SELECT $1, 'plan_project_link_rollback_receipts', $5, $6::jsonb, $10::timestamptz, NULL, $11, 1
35248
+ SELECT $1, 'plan_project_link_rollback_receipts', $4, $5::jsonb, $9::timestamptz, NULL, $10, 1
35251
35249
  FROM checks, task_gate
35252
35250
  WHERE NOT checks.has_existing AND EXISTS (SELECT 1 FROM updated_plan)
35253
35251
  RETURNING payload
@@ -35261,7 +35259,6 @@ class PostgresJsonRecordStore {
35261
35259
  this.service,
35262
35260
  input.plan_id,
35263
35261
  input.expected_plan_revision,
35264
- input.receipt_id,
35265
35262
  input.rollback_receipt_id,
35266
35263
  jsonbParam(rollback),
35267
35264
  jsonbParam(currentTaskProjects),
package/dist/contracts.js CHANGED
@@ -12379,7 +12379,7 @@ var init_tasks = __esm(() => {
12379
12379
  // package.json
12380
12380
  var package_default = {
12381
12381
  name: "@hasna/todos",
12382
- version: "0.15.13",
12382
+ version: "0.15.14",
12383
12383
  description: "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
12384
12384
  type: "module",
12385
12385
  main: "dist/index.js",
package/dist/index.js CHANGED
@@ -12492,7 +12492,7 @@ var init_dispatches = __esm(() => {
12492
12492
  // package.json
12493
12493
  var package_default = {
12494
12494
  name: "@hasna/todos",
12495
- version: "0.15.13",
12495
+ version: "0.15.14",
12496
12496
  description: "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
12497
12497
  type: "module",
12498
12498
  main: "dist/index.js",
@@ -27580,21 +27580,21 @@ class PostgresJsonRecordStore {
27580
27580
  ), existing AS (
27581
27581
  SELECT payload FROM ${this.tableName}
27582
27582
  WHERE service = $1 AND object_type = 'plan_project_link_rollback_receipts'
27583
- AND object_id = $5 AND deleted_at IS NULL
27583
+ AND object_id = $4 AND deleted_at IS NULL
27584
27584
  FOR UPDATE
27585
27585
  ), checks AS (
27586
27586
  SELECT
27587
27587
  EXISTS (SELECT 1 FROM target_plan) AS plan_found,
27588
27588
  COALESCE((SELECT payload->>'updated_at' = $3 FROM target_plan), false) AS plan_revision_ok,
27589
- COALESCE((SELECT jsonb_object_agg(object_id, COALESCE(payload->'project_id', 'null'::jsonb) ORDER BY object_id) FROM member_tasks), '{}'::jsonb) = $7::jsonb
27590
- AND COALESCE((SELECT jsonb_agg(object_id ORDER BY object_id) FROM member_tasks), '[]'::jsonb) = $8::jsonb AS membership_ok,
27589
+ COALESCE((SELECT jsonb_object_agg(object_id, COALESCE(payload->'project_id', 'null'::jsonb) ORDER BY object_id) FROM member_tasks), '{}'::jsonb) = $6::jsonb
27590
+ AND COALESCE((SELECT jsonb_agg(object_id ORDER BY object_id) FROM member_tasks), '[]'::jsonb) = $7::jsonb AS membership_ok,
27591
27591
  EXISTS (SELECT 1 FROM existing) AS has_existing
27592
27592
  ), updated_plan AS (
27593
27593
  UPDATE ${this.tableName} r SET
27594
- payload = r.payload || jsonb_build_object('project_id', $9::jsonb, 'updated_at', $10::text),
27595
- updated_at = $10::timestamptz,
27594
+ payload = r.payload || jsonb_build_object('project_id', $8::jsonb, 'updated_at', $9::text),
27595
+ updated_at = $9::timestamptz,
27596
27596
  version = COALESCE(r.version, 0) + 1,
27597
- source_machine_id = COALESCE($11, r.source_machine_id)
27597
+ source_machine_id = COALESCE($10, r.source_machine_id)
27598
27598
  FROM checks
27599
27599
  WHERE r.service = $1 AND r.object_type = 'plans' AND r.object_id = $2 AND r.deleted_at IS NULL
27600
27600
  AND checks.plan_found AND checks.plan_revision_ok AND checks.membership_ok AND NOT checks.has_existing
@@ -27602,20 +27602,20 @@ class PostgresJsonRecordStore {
27602
27602
  ), updated_tasks AS (
27603
27603
  UPDATE ${this.tableName} r SET
27604
27604
  payload = r.payload || jsonb_build_object(
27605
- 'project_id', COALESCE($12::jsonb -> r.object_id, 'null'::jsonb),
27606
- 'updated_at', $10::text,
27605
+ 'project_id', COALESCE($11::jsonb -> r.object_id, 'null'::jsonb),
27606
+ 'updated_at', $9::text,
27607
27607
  'version', COALESCE((r.payload->>'version')::int, 0) + 1
27608
27608
  ),
27609
- updated_at = $10::timestamptz,
27609
+ updated_at = $9::timestamptz,
27610
27610
  version = COALESCE(r.version, 0) + 1,
27611
- source_machine_id = COALESCE($11, r.source_machine_id)
27611
+ source_machine_id = COALESCE($10, r.source_machine_id)
27612
27612
  WHERE r.service = $1 AND r.object_type = 'tasks' AND r.deleted_at IS NULL
27613
27613
  AND r.payload->>'plan_id' = $2 AND EXISTS (SELECT 1 FROM updated_plan)
27614
27614
  RETURNING 1
27615
27615
  ), task_gate AS (SELECT count(*) AS count FROM updated_tasks), inserted AS (
27616
27616
  INSERT INTO ${this.tableName}
27617
27617
  (service, object_type, object_id, payload, updated_at, deleted_at, source_machine_id, version)
27618
- SELECT $1, 'plan_project_link_rollback_receipts', $5, $6::jsonb, $10::timestamptz, NULL, $11, 1
27618
+ SELECT $1, 'plan_project_link_rollback_receipts', $4, $5::jsonb, $9::timestamptz, NULL, $10, 1
27619
27619
  FROM checks, task_gate
27620
27620
  WHERE NOT checks.has_existing AND EXISTS (SELECT 1 FROM updated_plan)
27621
27621
  RETURNING payload
@@ -27629,7 +27629,6 @@ class PostgresJsonRecordStore {
27629
27629
  this.service,
27630
27630
  input.plan_id,
27631
27631
  input.expected_plan_revision,
27632
- input.receipt_id,
27633
27632
  input.rollback_receipt_id,
27634
27633
  jsonbParam(rollback),
27635
27634
  jsonbParam(currentTaskProjects),
package/dist/mcp/index.js CHANGED
@@ -35415,7 +35415,7 @@ var package_default;
35415
35415
  var init_package = __esm(() => {
35416
35416
  package_default = {
35417
35417
  name: "@hasna/todos",
35418
- version: "0.15.13",
35418
+ version: "0.15.14",
35419
35419
  description: "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
35420
35420
  type: "module",
35421
35421
  main: "dist/index.js",
@@ -47421,21 +47421,21 @@ class PostgresJsonRecordStore {
47421
47421
  ), existing AS (
47422
47422
  SELECT payload FROM ${this.tableName}
47423
47423
  WHERE service = $1 AND object_type = 'plan_project_link_rollback_receipts'
47424
- AND object_id = $5 AND deleted_at IS NULL
47424
+ AND object_id = $4 AND deleted_at IS NULL
47425
47425
  FOR UPDATE
47426
47426
  ), checks AS (
47427
47427
  SELECT
47428
47428
  EXISTS (SELECT 1 FROM target_plan) AS plan_found,
47429
47429
  COALESCE((SELECT payload->>'updated_at' = $3 FROM target_plan), false) AS plan_revision_ok,
47430
- COALESCE((SELECT jsonb_object_agg(object_id, COALESCE(payload->'project_id', 'null'::jsonb) ORDER BY object_id) FROM member_tasks), '{}'::jsonb) = $7::jsonb
47431
- AND COALESCE((SELECT jsonb_agg(object_id ORDER BY object_id) FROM member_tasks), '[]'::jsonb) = $8::jsonb AS membership_ok,
47430
+ COALESCE((SELECT jsonb_object_agg(object_id, COALESCE(payload->'project_id', 'null'::jsonb) ORDER BY object_id) FROM member_tasks), '{}'::jsonb) = $6::jsonb
47431
+ AND COALESCE((SELECT jsonb_agg(object_id ORDER BY object_id) FROM member_tasks), '[]'::jsonb) = $7::jsonb AS membership_ok,
47432
47432
  EXISTS (SELECT 1 FROM existing) AS has_existing
47433
47433
  ), updated_plan AS (
47434
47434
  UPDATE ${this.tableName} r SET
47435
- payload = r.payload || jsonb_build_object('project_id', $9::jsonb, 'updated_at', $10::text),
47436
- updated_at = $10::timestamptz,
47435
+ payload = r.payload || jsonb_build_object('project_id', $8::jsonb, 'updated_at', $9::text),
47436
+ updated_at = $9::timestamptz,
47437
47437
  version = COALESCE(r.version, 0) + 1,
47438
- source_machine_id = COALESCE($11, r.source_machine_id)
47438
+ source_machine_id = COALESCE($10, r.source_machine_id)
47439
47439
  FROM checks
47440
47440
  WHERE r.service = $1 AND r.object_type = 'plans' AND r.object_id = $2 AND r.deleted_at IS NULL
47441
47441
  AND checks.plan_found AND checks.plan_revision_ok AND checks.membership_ok AND NOT checks.has_existing
@@ -47443,20 +47443,20 @@ class PostgresJsonRecordStore {
47443
47443
  ), updated_tasks AS (
47444
47444
  UPDATE ${this.tableName} r SET
47445
47445
  payload = r.payload || jsonb_build_object(
47446
- 'project_id', COALESCE($12::jsonb -> r.object_id, 'null'::jsonb),
47447
- 'updated_at', $10::text,
47446
+ 'project_id', COALESCE($11::jsonb -> r.object_id, 'null'::jsonb),
47447
+ 'updated_at', $9::text,
47448
47448
  'version', COALESCE((r.payload->>'version')::int, 0) + 1
47449
47449
  ),
47450
- updated_at = $10::timestamptz,
47450
+ updated_at = $9::timestamptz,
47451
47451
  version = COALESCE(r.version, 0) + 1,
47452
- source_machine_id = COALESCE($11, r.source_machine_id)
47452
+ source_machine_id = COALESCE($10, r.source_machine_id)
47453
47453
  WHERE r.service = $1 AND r.object_type = 'tasks' AND r.deleted_at IS NULL
47454
47454
  AND r.payload->>'plan_id' = $2 AND EXISTS (SELECT 1 FROM updated_plan)
47455
47455
  RETURNING 1
47456
47456
  ), task_gate AS (SELECT count(*) AS count FROM updated_tasks), inserted AS (
47457
47457
  INSERT INTO ${this.tableName}
47458
47458
  (service, object_type, object_id, payload, updated_at, deleted_at, source_machine_id, version)
47459
- SELECT $1, 'plan_project_link_rollback_receipts', $5, $6::jsonb, $10::timestamptz, NULL, $11, 1
47459
+ SELECT $1, 'plan_project_link_rollback_receipts', $4, $5::jsonb, $9::timestamptz, NULL, $10, 1
47460
47460
  FROM checks, task_gate
47461
47461
  WHERE NOT checks.has_existing AND EXISTS (SELECT 1 FROM updated_plan)
47462
47462
  RETURNING payload
@@ -47470,7 +47470,6 @@ class PostgresJsonRecordStore {
47470
47470
  this.service,
47471
47471
  input.plan_id,
47472
47472
  input.expected_plan_revision,
47473
- input.receipt_id,
47474
47473
  input.rollback_receipt_id,
47475
47474
  jsonbParam(rollback),
47476
47475
  jsonbParam(currentTaskProjects),
package/dist/mcp.js CHANGED
@@ -41,7 +41,7 @@ var __require = import.meta.require;
41
41
  // package.json
42
42
  var package_default = {
43
43
  name: "@hasna/todos",
44
- version: "0.15.13",
44
+ version: "0.15.14",
45
45
  description: "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
46
46
  type: "module",
47
47
  main: "dist/index.js",
@@ -12382,7 +12382,7 @@ import { createHash as createHash5 } from "crypto";
12382
12382
  // package.json
12383
12383
  var package_default = {
12384
12384
  name: "@hasna/todos",
12385
- version: "0.15.13",
12385
+ version: "0.15.14",
12386
12386
  description: "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
12387
12387
  type: "module",
12388
12388
  main: "dist/index.js",
@@ -14268,21 +14268,21 @@ class PostgresJsonRecordStore {
14268
14268
  ), existing AS (
14269
14269
  SELECT payload FROM ${this.tableName}
14270
14270
  WHERE service = $1 AND object_type = 'plan_project_link_rollback_receipts'
14271
- AND object_id = $5 AND deleted_at IS NULL
14271
+ AND object_id = $4 AND deleted_at IS NULL
14272
14272
  FOR UPDATE
14273
14273
  ), checks AS (
14274
14274
  SELECT
14275
14275
  EXISTS (SELECT 1 FROM target_plan) AS plan_found,
14276
14276
  COALESCE((SELECT payload->>'updated_at' = $3 FROM target_plan), false) AS plan_revision_ok,
14277
- COALESCE((SELECT jsonb_object_agg(object_id, COALESCE(payload->'project_id', 'null'::jsonb) ORDER BY object_id) FROM member_tasks), '{}'::jsonb) = $7::jsonb
14278
- AND COALESCE((SELECT jsonb_agg(object_id ORDER BY object_id) FROM member_tasks), '[]'::jsonb) = $8::jsonb AS membership_ok,
14277
+ COALESCE((SELECT jsonb_object_agg(object_id, COALESCE(payload->'project_id', 'null'::jsonb) ORDER BY object_id) FROM member_tasks), '{}'::jsonb) = $6::jsonb
14278
+ AND COALESCE((SELECT jsonb_agg(object_id ORDER BY object_id) FROM member_tasks), '[]'::jsonb) = $7::jsonb AS membership_ok,
14279
14279
  EXISTS (SELECT 1 FROM existing) AS has_existing
14280
14280
  ), updated_plan AS (
14281
14281
  UPDATE ${this.tableName} r SET
14282
- payload = r.payload || jsonb_build_object('project_id', $9::jsonb, 'updated_at', $10::text),
14283
- updated_at = $10::timestamptz,
14282
+ payload = r.payload || jsonb_build_object('project_id', $8::jsonb, 'updated_at', $9::text),
14283
+ updated_at = $9::timestamptz,
14284
14284
  version = COALESCE(r.version, 0) + 1,
14285
- source_machine_id = COALESCE($11, r.source_machine_id)
14285
+ source_machine_id = COALESCE($10, r.source_machine_id)
14286
14286
  FROM checks
14287
14287
  WHERE r.service = $1 AND r.object_type = 'plans' AND r.object_id = $2 AND r.deleted_at IS NULL
14288
14288
  AND checks.plan_found AND checks.plan_revision_ok AND checks.membership_ok AND NOT checks.has_existing
@@ -14290,20 +14290,20 @@ class PostgresJsonRecordStore {
14290
14290
  ), updated_tasks AS (
14291
14291
  UPDATE ${this.tableName} r SET
14292
14292
  payload = r.payload || jsonb_build_object(
14293
- 'project_id', COALESCE($12::jsonb -> r.object_id, 'null'::jsonb),
14294
- 'updated_at', $10::text,
14293
+ 'project_id', COALESCE($11::jsonb -> r.object_id, 'null'::jsonb),
14294
+ 'updated_at', $9::text,
14295
14295
  'version', COALESCE((r.payload->>'version')::int, 0) + 1
14296
14296
  ),
14297
- updated_at = $10::timestamptz,
14297
+ updated_at = $9::timestamptz,
14298
14298
  version = COALESCE(r.version, 0) + 1,
14299
- source_machine_id = COALESCE($11, r.source_machine_id)
14299
+ source_machine_id = COALESCE($10, r.source_machine_id)
14300
14300
  WHERE r.service = $1 AND r.object_type = 'tasks' AND r.deleted_at IS NULL
14301
14301
  AND r.payload->>'plan_id' = $2 AND EXISTS (SELECT 1 FROM updated_plan)
14302
14302
  RETURNING 1
14303
14303
  ), task_gate AS (SELECT count(*) AS count FROM updated_tasks), inserted AS (
14304
14304
  INSERT INTO ${this.tableName}
14305
14305
  (service, object_type, object_id, payload, updated_at, deleted_at, source_machine_id, version)
14306
- SELECT $1, 'plan_project_link_rollback_receipts', $5, $6::jsonb, $10::timestamptz, NULL, $11, 1
14306
+ SELECT $1, 'plan_project_link_rollback_receipts', $4, $5::jsonb, $9::timestamptz, NULL, $10, 1
14307
14307
  FROM checks, task_gate
14308
14308
  WHERE NOT checks.has_existing AND EXISTS (SELECT 1 FROM updated_plan)
14309
14309
  RETURNING payload
@@ -14317,7 +14317,6 @@ class PostgresJsonRecordStore {
14317
14317
  this.service,
14318
14318
  input.plan_id,
14319
14319
  input.expected_plan_revision,
14320
- input.receipt_id,
14321
14320
  input.rollback_receipt_id,
14322
14321
  jsonbParam(rollback),
14323
14322
  jsonbParam(currentTaskProjects),
package/dist/registry.js CHANGED
@@ -12379,7 +12379,7 @@ var init_tasks = __esm(() => {
12379
12379
  // package.json
12380
12380
  var package_default = {
12381
12381
  name: "@hasna/todos",
12382
- version: "0.15.13",
12382
+ version: "0.15.14",
12383
12383
  description: "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
12384
12384
  type: "module",
12385
12385
  main: "dist/index.js",
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "packageName": "@hasna/todos",
3
- "packageVersion": "0.15.13",
3
+ "packageVersion": "0.15.14",
4
4
  "repository": "https://github.com/hasna/todos.git",
5
- "gitCommit": "a1feb3e6fb445b23cbd716a674a2a1f14c740cd7",
6
- "gitTree": "9d7ba8d8369f52d081b9d2ac6e25d307c060403e",
7
- "sourceTreeSha256": "d5a4955fff7d2926054ac14178973cfde3aaeae3f2a02312fad199b1522d22d2",
8
- "generatedAt": "2026-08-08T14:50:18.000Z"
5
+ "gitCommit": "4d16148e3f681812194915ef928e8a27128cc94f",
6
+ "gitTree": "1e631ce3b1722775945c69eca46308733254d33e",
7
+ "sourceTreeSha256": "31446e7b7098639b18a4fe77b54cd095757d04d94b1bd22916e4d37211cef7ae",
8
+ "generatedAt": "2026-08-08T16:31:43.000Z"
9
9
  }
@@ -70,7 +70,7 @@ var package_default;
70
70
  var init_package = __esm(() => {
71
71
  package_default = {
72
72
  name: "@hasna/todos",
73
- version: "0.15.13",
73
+ version: "0.15.14",
74
74
  description: "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
75
75
  type: "module",
76
76
  main: "dist/index.js",
@@ -3073,21 +3073,21 @@ class PostgresJsonRecordStore {
3073
3073
  ), existing AS (
3074
3074
  SELECT payload FROM ${this.tableName}
3075
3075
  WHERE service = $1 AND object_type = 'plan_project_link_rollback_receipts'
3076
- AND object_id = $5 AND deleted_at IS NULL
3076
+ AND object_id = $4 AND deleted_at IS NULL
3077
3077
  FOR UPDATE
3078
3078
  ), checks AS (
3079
3079
  SELECT
3080
3080
  EXISTS (SELECT 1 FROM target_plan) AS plan_found,
3081
3081
  COALESCE((SELECT payload->>'updated_at' = $3 FROM target_plan), false) AS plan_revision_ok,
3082
- COALESCE((SELECT jsonb_object_agg(object_id, COALESCE(payload->'project_id', 'null'::jsonb) ORDER BY object_id) FROM member_tasks), '{}'::jsonb) = $7::jsonb
3083
- AND COALESCE((SELECT jsonb_agg(object_id ORDER BY object_id) FROM member_tasks), '[]'::jsonb) = $8::jsonb AS membership_ok,
3082
+ COALESCE((SELECT jsonb_object_agg(object_id, COALESCE(payload->'project_id', 'null'::jsonb) ORDER BY object_id) FROM member_tasks), '{}'::jsonb) = $6::jsonb
3083
+ AND COALESCE((SELECT jsonb_agg(object_id ORDER BY object_id) FROM member_tasks), '[]'::jsonb) = $7::jsonb AS membership_ok,
3084
3084
  EXISTS (SELECT 1 FROM existing) AS has_existing
3085
3085
  ), updated_plan AS (
3086
3086
  UPDATE ${this.tableName} r SET
3087
- payload = r.payload || jsonb_build_object('project_id', $9::jsonb, 'updated_at', $10::text),
3088
- updated_at = $10::timestamptz,
3087
+ payload = r.payload || jsonb_build_object('project_id', $8::jsonb, 'updated_at', $9::text),
3088
+ updated_at = $9::timestamptz,
3089
3089
  version = COALESCE(r.version, 0) + 1,
3090
- source_machine_id = COALESCE($11, r.source_machine_id)
3090
+ source_machine_id = COALESCE($10, r.source_machine_id)
3091
3091
  FROM checks
3092
3092
  WHERE r.service = $1 AND r.object_type = 'plans' AND r.object_id = $2 AND r.deleted_at IS NULL
3093
3093
  AND checks.plan_found AND checks.plan_revision_ok AND checks.membership_ok AND NOT checks.has_existing
@@ -3095,20 +3095,20 @@ class PostgresJsonRecordStore {
3095
3095
  ), updated_tasks AS (
3096
3096
  UPDATE ${this.tableName} r SET
3097
3097
  payload = r.payload || jsonb_build_object(
3098
- 'project_id', COALESCE($12::jsonb -> r.object_id, 'null'::jsonb),
3099
- 'updated_at', $10::text,
3098
+ 'project_id', COALESCE($11::jsonb -> r.object_id, 'null'::jsonb),
3099
+ 'updated_at', $9::text,
3100
3100
  'version', COALESCE((r.payload->>'version')::int, 0) + 1
3101
3101
  ),
3102
- updated_at = $10::timestamptz,
3102
+ updated_at = $9::timestamptz,
3103
3103
  version = COALESCE(r.version, 0) + 1,
3104
- source_machine_id = COALESCE($11, r.source_machine_id)
3104
+ source_machine_id = COALESCE($10, r.source_machine_id)
3105
3105
  WHERE r.service = $1 AND r.object_type = 'tasks' AND r.deleted_at IS NULL
3106
3106
  AND r.payload->>'plan_id' = $2 AND EXISTS (SELECT 1 FROM updated_plan)
3107
3107
  RETURNING 1
3108
3108
  ), task_gate AS (SELECT count(*) AS count FROM updated_tasks), inserted AS (
3109
3109
  INSERT INTO ${this.tableName}
3110
3110
  (service, object_type, object_id, payload, updated_at, deleted_at, source_machine_id, version)
3111
- SELECT $1, 'plan_project_link_rollback_receipts', $5, $6::jsonb, $10::timestamptz, NULL, $11, 1
3111
+ SELECT $1, 'plan_project_link_rollback_receipts', $4, $5::jsonb, $9::timestamptz, NULL, $10, 1
3112
3112
  FROM checks, task_gate
3113
3113
  WHERE NOT checks.has_existing AND EXISTS (SELECT 1 FROM updated_plan)
3114
3114
  RETURNING payload
@@ -3122,7 +3122,6 @@ class PostgresJsonRecordStore {
3122
3122
  this.service,
3123
3123
  input.plan_id,
3124
3124
  input.expected_plan_revision,
3125
- input.receipt_id,
3126
3125
  input.rollback_receipt_id,
3127
3126
  jsonbParam(rollback),
3128
3127
  jsonbParam(currentTaskProjects),
package/dist/storage.js CHANGED
@@ -15721,21 +15721,21 @@ class PostgresJsonRecordStore {
15721
15721
  ), existing AS (
15722
15722
  SELECT payload FROM ${this.tableName}
15723
15723
  WHERE service = $1 AND object_type = 'plan_project_link_rollback_receipts'
15724
- AND object_id = $5 AND deleted_at IS NULL
15724
+ AND object_id = $4 AND deleted_at IS NULL
15725
15725
  FOR UPDATE
15726
15726
  ), checks AS (
15727
15727
  SELECT
15728
15728
  EXISTS (SELECT 1 FROM target_plan) AS plan_found,
15729
15729
  COALESCE((SELECT payload->>'updated_at' = $3 FROM target_plan), false) AS plan_revision_ok,
15730
- COALESCE((SELECT jsonb_object_agg(object_id, COALESCE(payload->'project_id', 'null'::jsonb) ORDER BY object_id) FROM member_tasks), '{}'::jsonb) = $7::jsonb
15731
- AND COALESCE((SELECT jsonb_agg(object_id ORDER BY object_id) FROM member_tasks), '[]'::jsonb) = $8::jsonb AS membership_ok,
15730
+ COALESCE((SELECT jsonb_object_agg(object_id, COALESCE(payload->'project_id', 'null'::jsonb) ORDER BY object_id) FROM member_tasks), '{}'::jsonb) = $6::jsonb
15731
+ AND COALESCE((SELECT jsonb_agg(object_id ORDER BY object_id) FROM member_tasks), '[]'::jsonb) = $7::jsonb AS membership_ok,
15732
15732
  EXISTS (SELECT 1 FROM existing) AS has_existing
15733
15733
  ), updated_plan AS (
15734
15734
  UPDATE ${this.tableName} r SET
15735
- payload = r.payload || jsonb_build_object('project_id', $9::jsonb, 'updated_at', $10::text),
15736
- updated_at = $10::timestamptz,
15735
+ payload = r.payload || jsonb_build_object('project_id', $8::jsonb, 'updated_at', $9::text),
15736
+ updated_at = $9::timestamptz,
15737
15737
  version = COALESCE(r.version, 0) + 1,
15738
- source_machine_id = COALESCE($11, r.source_machine_id)
15738
+ source_machine_id = COALESCE($10, r.source_machine_id)
15739
15739
  FROM checks
15740
15740
  WHERE r.service = $1 AND r.object_type = 'plans' AND r.object_id = $2 AND r.deleted_at IS NULL
15741
15741
  AND checks.plan_found AND checks.plan_revision_ok AND checks.membership_ok AND NOT checks.has_existing
@@ -15743,20 +15743,20 @@ class PostgresJsonRecordStore {
15743
15743
  ), updated_tasks AS (
15744
15744
  UPDATE ${this.tableName} r SET
15745
15745
  payload = r.payload || jsonb_build_object(
15746
- 'project_id', COALESCE($12::jsonb -> r.object_id, 'null'::jsonb),
15747
- 'updated_at', $10::text,
15746
+ 'project_id', COALESCE($11::jsonb -> r.object_id, 'null'::jsonb),
15747
+ 'updated_at', $9::text,
15748
15748
  'version', COALESCE((r.payload->>'version')::int, 0) + 1
15749
15749
  ),
15750
- updated_at = $10::timestamptz,
15750
+ updated_at = $9::timestamptz,
15751
15751
  version = COALESCE(r.version, 0) + 1,
15752
- source_machine_id = COALESCE($11, r.source_machine_id)
15752
+ source_machine_id = COALESCE($10, r.source_machine_id)
15753
15753
  WHERE r.service = $1 AND r.object_type = 'tasks' AND r.deleted_at IS NULL
15754
15754
  AND r.payload->>'plan_id' = $2 AND EXISTS (SELECT 1 FROM updated_plan)
15755
15755
  RETURNING 1
15756
15756
  ), task_gate AS (SELECT count(*) AS count FROM updated_tasks), inserted AS (
15757
15757
  INSERT INTO ${this.tableName}
15758
15758
  (service, object_type, object_id, payload, updated_at, deleted_at, source_machine_id, version)
15759
- SELECT $1, 'plan_project_link_rollback_receipts', $5, $6::jsonb, $10::timestamptz, NULL, $11, 1
15759
+ SELECT $1, 'plan_project_link_rollback_receipts', $4, $5::jsonb, $9::timestamptz, NULL, $10, 1
15760
15760
  FROM checks, task_gate
15761
15761
  WHERE NOT checks.has_existing AND EXISTS (SELECT 1 FROM updated_plan)
15762
15762
  RETURNING payload
@@ -15770,7 +15770,6 @@ class PostgresJsonRecordStore {
15770
15770
  this.service,
15771
15771
  input.plan_id,
15772
15772
  input.expected_plan_revision,
15773
- input.receipt_id,
15774
15773
  input.rollback_receipt_id,
15775
15774
  jsonbParam(rollback),
15776
15775
  jsonbParam(currentTaskProjects),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/todos",
3
- "version": "0.15.13",
3
+ "version": "0.15.14",
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",