@hasna/todos 0.15.27 → 0.15.29

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/contracts.js CHANGED
@@ -77,6 +77,12 @@ function sqliteTodosProjectRegistrationSchemaSql() {
77
77
  authority_id, tenant_id, corpus_id, operation_id, step_id,
78
78
  resource_kind, direction, idempotency_key
79
79
  );
80
+ CREATE INDEX IF NOT EXISTS idx_todos_project_registration_receipts_source_identity
81
+ ON todos_project_registration_receipts (
82
+ authority_id, tenant_id, corpus_id, route, package_version,
83
+ operation_id, step_id, resource_kind, direction, idempotency_key,
84
+ target_selector
85
+ );
80
86
  CREATE INDEX IF NOT EXISTS idx_todos_project_registration_receipts_step
81
87
  ON todos_project_registration_receipts (
82
88
  authority_id, tenant_id, corpus_id, operation_id, step_id,
@@ -176,6 +182,12 @@ function postgresTodosProjectRegistrationSchemaSql() {
176
182
  authority_id, tenant_id, corpus_id, operation_id, step_id,
177
183
  resource_kind, direction, idempotency_key
178
184
  )`,
185
+ `CREATE INDEX IF NOT EXISTS todos_project_registration_receipts_source_identity_idx
186
+ ON todos_project_registration_receipts (
187
+ authority_id, tenant_id, corpus_id, route, package_version,
188
+ operation_id, step_id, resource_kind, direction, idempotency_key,
189
+ target_selector
190
+ )`,
179
191
  `CREATE INDEX IF NOT EXISTS todos_project_registration_receipts_step_idx
180
192
  ON todos_project_registration_receipts (
181
193
  authority_id, tenant_id, corpus_id, operation_id, step_id,
@@ -12658,7 +12670,7 @@ var init_tasks = __esm(() => {
12658
12670
  // package.json
12659
12671
  var package_default = {
12660
12672
  name: "@hasna/todos",
12661
- version: "0.15.27",
12673
+ version: "0.15.29",
12662
12674
  description: "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
12663
12675
  type: "module",
12664
12676
  main: "dist/index.js",
package/dist/index.js CHANGED
@@ -77,6 +77,12 @@ function sqliteTodosProjectRegistrationSchemaSql() {
77
77
  authority_id, tenant_id, corpus_id, operation_id, step_id,
78
78
  resource_kind, direction, idempotency_key
79
79
  );
80
+ CREATE INDEX IF NOT EXISTS idx_todos_project_registration_receipts_source_identity
81
+ ON todos_project_registration_receipts (
82
+ authority_id, tenant_id, corpus_id, route, package_version,
83
+ operation_id, step_id, resource_kind, direction, idempotency_key,
84
+ target_selector
85
+ );
80
86
  CREATE INDEX IF NOT EXISTS idx_todos_project_registration_receipts_step
81
87
  ON todos_project_registration_receipts (
82
88
  authority_id, tenant_id, corpus_id, operation_id, step_id,
@@ -176,6 +182,12 @@ function postgresTodosProjectRegistrationSchemaSql() {
176
182
  authority_id, tenant_id, corpus_id, operation_id, step_id,
177
183
  resource_kind, direction, idempotency_key
178
184
  )`,
185
+ `CREATE INDEX IF NOT EXISTS todos_project_registration_receipts_source_identity_idx
186
+ ON todos_project_registration_receipts (
187
+ authority_id, tenant_id, corpus_id, route, package_version,
188
+ operation_id, step_id, resource_kind, direction, idempotency_key,
189
+ target_selector
190
+ )`,
179
191
  `CREATE INDEX IF NOT EXISTS todos_project_registration_receipts_step_idx
180
192
  ON todos_project_registration_receipts (
181
193
  authority_id, tenant_id, corpus_id, operation_id, step_id,
@@ -12771,7 +12783,7 @@ var init_dispatches = __esm(() => {
12771
12783
  // package.json
12772
12784
  var package_default = {
12773
12785
  name: "@hasna/todos",
12774
- version: "0.15.27",
12786
+ version: "0.15.29",
12775
12787
  description: "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
12776
12788
  type: "module",
12777
12789
  main: "dist/index.js",
@@ -34252,8 +34264,9 @@ class PostgresTodosProjectRegistrationTransaction {
34252
34264
  const result = await this.client.query(`
34253
34265
  SELECT * FROM todos_project_registration_receipts
34254
34266
  WHERE authority_id = $1 AND tenant_id = $2 AND corpus_id = $3
34255
- AND operation_id = $4 AND step_id = $5 AND resource_kind = $6
34256
- AND direction = $7 AND idempotency_key = $8 AND target_selector = $9
34267
+ AND route = $4 AND package_version = $5
34268
+ AND operation_id = $6 AND step_id = $7 AND resource_kind = $8
34269
+ AND direction = $9 AND idempotency_key = $10 AND target_selector = $11
34257
34270
  ORDER BY CASE outcome
34258
34271
  WHEN 'terminal_nonacceptance' THEN 0
34259
34272
  WHEN 'duplicate_of_accepted' THEN 1
@@ -34264,6 +34277,8 @@ class PostgresTodosProjectRegistrationTransaction {
34264
34277
  identity.authority_id,
34265
34278
  identity.tenant_id,
34266
34279
  identity.corpus_id,
34280
+ identity.route,
34281
+ identity.package_version,
34267
34282
  identity.operation_id,
34268
34283
  identity.step_id,
34269
34284
  identity.resource_kind,
@@ -34671,6 +34686,7 @@ class SqliteTodosProjectRegistrationTransaction {
34671
34686
  const row = this.db.query(`
34672
34687
  SELECT * FROM todos_project_registration_receipts
34673
34688
  WHERE authority_id = ? AND tenant_id = ? AND corpus_id = ?
34689
+ AND route = ? AND package_version = ?
34674
34690
  AND operation_id = ? AND step_id = ? AND resource_kind = ?
34675
34691
  AND direction = ? AND idempotency_key = ? AND target_selector = ?
34676
34692
  ORDER BY CASE outcome
@@ -34679,7 +34695,7 @@ class SqliteTodosProjectRegistrationTransaction {
34679
34695
  ELSE 2
34680
34696
  END, created_at DESC, receipt_id DESC
34681
34697
  LIMIT 1
34682
- `).get(identity.authority_id, identity.tenant_id, identity.corpus_id, identity.operation_id, identity.step_id, identity.resource_kind, identity.direction, identity.idempotency_key, identity.target_selector);
34698
+ `).get(identity.authority_id, identity.tenant_id, identity.corpus_id, identity.route, identity.package_version, identity.operation_id, identity.step_id, identity.resource_kind, identity.direction, identity.idempotency_key, identity.target_selector);
34683
34699
  return row ? receiptFromRow2(row) : null;
34684
34700
  }
34685
34701
  async getReceiptById(receiptId) {
@@ -34833,7 +34849,7 @@ class StagedSqliteTodosProjectRegistrationTransaction {
34833
34849
  }
34834
34850
  async lockStep(_identity) {}
34835
34851
  async getReceiptForLookup(identity) {
34836
- const staged = [...this.receipts.values()].filter((receipt) => receipt.authority_id === identity.authority_id && receipt.tenant_id === identity.tenant_id && receipt.corpus_id === identity.corpus_id && receipt.operation_id === identity.operation_id && receipt.step_id === identity.step_id && receipt.resource_kind === identity.resource_kind && receipt.direction === identity.direction && receipt.idempotency_key === identity.idempotency_key && receipt.target_selector === identity.target_selector);
34852
+ const staged = [...this.receipts.values()].filter((receipt) => receipt.authority_id === identity.authority_id && receipt.tenant_id === identity.tenant_id && receipt.corpus_id === identity.corpus_id && receipt.route === identity.route && receipt.package_version === identity.package_version && receipt.operation_id === identity.operation_id && receipt.step_id === identity.step_id && receipt.resource_kind === identity.resource_kind && receipt.direction === identity.direction && receipt.idempotency_key === identity.idempotency_key && receipt.target_selector === identity.target_selector);
34837
34853
  const stored = await this.direct.getReceiptForLookup(identity);
34838
34854
  if (stored)
34839
34855
  staged.push(stored);
@@ -35230,6 +35246,8 @@ var UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-
35230
35246
  var WORKSPACE_ID_PATTERN = /^wks_[A-Za-z0-9][A-Za-z0-9_-]{11,}$/;
35231
35247
  var OPERATION_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$/;
35232
35248
  var STEP_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{2,127}$/;
35249
+ var AUTHORITY_ROUTE_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{2,127}$/;
35250
+ var PACKAGE_VERSION_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._+-]{0,127}$/;
35233
35251
  var SHA256_PATTERN = /^[0-9a-f]{64}$/;
35234
35252
  var IDEMPOTENCY_PATTERN = /^prk_[0-9a-f]{48}$/;
35235
35253
 
@@ -35718,6 +35736,8 @@ class PackageOwnedTodosProjectRegistrationAuthority {
35718
35736
  async existingForwardResolution(transaction, request, callDigest) {
35719
35737
  const exact = await transaction.getReceiptForLookup({
35720
35738
  ...authorityScope(this.capabilityValue),
35739
+ route: this.capabilityValue.route,
35740
+ package_version: this.capabilityValue.package_version,
35721
35741
  operation_id: request.operation_id,
35722
35742
  step_id: request.step_id,
35723
35743
  resource_kind: request.resource_kind,
@@ -35870,6 +35890,8 @@ class PackageOwnedTodosProjectRegistrationAuthority {
35870
35890
  });
35871
35891
  const exact = await transaction.getReceiptForLookup({
35872
35892
  ...authorityScope(this.capabilityValue),
35893
+ route: this.capabilityValue.route,
35894
+ package_version: this.capabilityValue.package_version,
35873
35895
  operation_id: request.operation_id,
35874
35896
  step_id: request.step_id,
35875
35897
  resource_kind: request.resource_kind,
@@ -35920,9 +35942,18 @@ class PackageOwnedTodosProjectRegistrationAuthority {
35920
35942
  if (request.max_items !== 1) {
35921
35943
  throw new TodosProjectRegistrationError("TODOS_PROJECT_REGISTRATION_INVALID_BOUNDS", "max_items must be exactly 1 for terminal receipt lookup");
35922
35944
  }
35923
- if (request.authority !== "todos" || request.authority_route !== this.capabilityValue.route || request.package_version !== this.capabilityValue.package_version || request.authority_id !== this.capabilityValue.authority_id || request.tenant_id !== this.capabilityValue.tenant_id || request.corpus_id !== this.capabilityValue.corpus_id) {
35945
+ if (request.authority !== "todos" || request.authority_id !== this.capabilityValue.authority_id || request.tenant_id !== this.capabilityValue.tenant_id || request.corpus_id !== this.capabilityValue.corpus_id) {
35924
35946
  throw new TodosProjectRegistrationError("TODOS_PROJECT_REGISTRATION_CAPABILITY_MISMATCH", "receipt lookup does not match this authority capability identity");
35925
35947
  }
35948
+ requireString(request.authority_route, "authority_route", {
35949
+ min: 3,
35950
+ max: 128,
35951
+ pattern: AUTHORITY_ROUTE_PATTERN
35952
+ });
35953
+ requireString(request.package_version, "package_version", {
35954
+ max: 128,
35955
+ pattern: PACKAGE_VERSION_PATTERN
35956
+ });
35926
35957
  requireString(request.operation_id, "operation_id", {
35927
35958
  min: 8,
35928
35959
  max: 128,
@@ -35944,6 +35975,8 @@ class PackageOwnedTodosProjectRegistrationAuthority {
35944
35975
  }
35945
35976
  const receipt = await this.backend.getReceiptForLookup({
35946
35977
  ...authorityScope(this.capabilityValue),
35978
+ route: request.authority_route,
35979
+ package_version: request.package_version,
35947
35980
  operation_id: request.operation_id,
35948
35981
  step_id: request.step_id,
35949
35982
  resource_kind: request.resource_kind,
@@ -35982,6 +36015,8 @@ class PackageOwnedTodosProjectRegistrationAuthority {
35982
36015
  });
35983
36016
  const exact = await transaction.getReceiptForLookup({
35984
36017
  ...authorityScope(this.capabilityValue),
36018
+ route: this.capabilityValue.route,
36019
+ package_version: this.capabilityValue.package_version,
35985
36020
  operation_id: request.operation_id,
35986
36021
  step_id: request.step_id,
35987
36022
  resource_kind: request.resource_kind,
@@ -36076,6 +36111,8 @@ class PackageOwnedTodosProjectRegistrationAuthority {
36076
36111
  await this.storedAcceptedReceipt(request, accepted);
36077
36112
  const receipt = await this.backend.getReceiptForLookup({
36078
36113
  ...authorityScope(this.capabilityValue),
36114
+ route: this.capabilityValue.route,
36115
+ package_version: this.capabilityValue.package_version,
36079
36116
  operation_id: request.operation_id,
36080
36117
  step_id: request.step_id,
36081
36118
  resource_kind: request.resource_kind,
package/dist/mcp/index.js CHANGED
@@ -289,6 +289,12 @@ function sqliteTodosProjectRegistrationSchemaSql() {
289
289
  authority_id, tenant_id, corpus_id, operation_id, step_id,
290
290
  resource_kind, direction, idempotency_key
291
291
  );
292
+ CREATE INDEX IF NOT EXISTS idx_todos_project_registration_receipts_source_identity
293
+ ON todos_project_registration_receipts (
294
+ authority_id, tenant_id, corpus_id, route, package_version,
295
+ operation_id, step_id, resource_kind, direction, idempotency_key,
296
+ target_selector
297
+ );
292
298
  CREATE INDEX IF NOT EXISTS idx_todos_project_registration_receipts_step
293
299
  ON todos_project_registration_receipts (
294
300
  authority_id, tenant_id, corpus_id, operation_id, step_id,
@@ -388,6 +394,12 @@ function postgresTodosProjectRegistrationSchemaSql() {
388
394
  authority_id, tenant_id, corpus_id, operation_id, step_id,
389
395
  resource_kind, direction, idempotency_key
390
396
  )`,
397
+ `CREATE INDEX IF NOT EXISTS todos_project_registration_receipts_source_identity_idx
398
+ ON todos_project_registration_receipts (
399
+ authority_id, tenant_id, corpus_id, route, package_version,
400
+ operation_id, step_id, resource_kind, direction, idempotency_key,
401
+ target_selector
402
+ )`,
391
403
  `CREATE INDEX IF NOT EXISTS todos_project_registration_receipts_step_idx
392
404
  ON todos_project_registration_receipts (
393
405
  authority_id, tenant_id, corpus_id, operation_id, step_id,
@@ -35803,7 +35815,7 @@ var package_default;
35803
35815
  var init_package = __esm(() => {
35804
35816
  package_default = {
35805
35817
  name: "@hasna/todos",
35806
- version: "0.15.27",
35818
+ version: "0.15.29",
35807
35819
  description: "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
35808
35820
  type: "module",
35809
35821
  main: "dist/index.js",
@@ -49717,8 +49729,9 @@ class PostgresTodosProjectRegistrationTransaction {
49717
49729
  const result = await this.client.query(`
49718
49730
  SELECT * FROM todos_project_registration_receipts
49719
49731
  WHERE authority_id = $1 AND tenant_id = $2 AND corpus_id = $3
49720
- AND operation_id = $4 AND step_id = $5 AND resource_kind = $6
49721
- AND direction = $7 AND idempotency_key = $8 AND target_selector = $9
49732
+ AND route = $4 AND package_version = $5
49733
+ AND operation_id = $6 AND step_id = $7 AND resource_kind = $8
49734
+ AND direction = $9 AND idempotency_key = $10 AND target_selector = $11
49722
49735
  ORDER BY CASE outcome
49723
49736
  WHEN 'terminal_nonacceptance' THEN 0
49724
49737
  WHEN 'duplicate_of_accepted' THEN 1
@@ -49729,6 +49742,8 @@ class PostgresTodosProjectRegistrationTransaction {
49729
49742
  identity.authority_id,
49730
49743
  identity.tenant_id,
49731
49744
  identity.corpus_id,
49745
+ identity.route,
49746
+ identity.package_version,
49732
49747
  identity.operation_id,
49733
49748
  identity.step_id,
49734
49749
  identity.resource_kind,
@@ -50123,6 +50138,7 @@ class SqliteTodosProjectRegistrationTransaction {
50123
50138
  const row = this.db.query(`
50124
50139
  SELECT * FROM todos_project_registration_receipts
50125
50140
  WHERE authority_id = ? AND tenant_id = ? AND corpus_id = ?
50141
+ AND route = ? AND package_version = ?
50126
50142
  AND operation_id = ? AND step_id = ? AND resource_kind = ?
50127
50143
  AND direction = ? AND idempotency_key = ? AND target_selector = ?
50128
50144
  ORDER BY CASE outcome
@@ -50131,7 +50147,7 @@ class SqliteTodosProjectRegistrationTransaction {
50131
50147
  ELSE 2
50132
50148
  END, created_at DESC, receipt_id DESC
50133
50149
  LIMIT 1
50134
- `).get(identity.authority_id, identity.tenant_id, identity.corpus_id, identity.operation_id, identity.step_id, identity.resource_kind, identity.direction, identity.idempotency_key, identity.target_selector);
50150
+ `).get(identity.authority_id, identity.tenant_id, identity.corpus_id, identity.route, identity.package_version, identity.operation_id, identity.step_id, identity.resource_kind, identity.direction, identity.idempotency_key, identity.target_selector);
50135
50151
  return row ? receiptFromRow2(row) : null;
50136
50152
  }
50137
50153
  async getReceiptById(receiptId) {
@@ -50285,7 +50301,7 @@ class StagedSqliteTodosProjectRegistrationTransaction {
50285
50301
  }
50286
50302
  async lockStep(_identity) {}
50287
50303
  async getReceiptForLookup(identity) {
50288
- const staged = [...this.receipts.values()].filter((receipt) => receipt.authority_id === identity.authority_id && receipt.tenant_id === identity.tenant_id && receipt.corpus_id === identity.corpus_id && receipt.operation_id === identity.operation_id && receipt.step_id === identity.step_id && receipt.resource_kind === identity.resource_kind && receipt.direction === identity.direction && receipt.idempotency_key === identity.idempotency_key && receipt.target_selector === identity.target_selector);
50304
+ const staged = [...this.receipts.values()].filter((receipt) => receipt.authority_id === identity.authority_id && receipt.tenant_id === identity.tenant_id && receipt.corpus_id === identity.corpus_id && receipt.route === identity.route && receipt.package_version === identity.package_version && receipt.operation_id === identity.operation_id && receipt.step_id === identity.step_id && receipt.resource_kind === identity.resource_kind && receipt.direction === identity.direction && receipt.idempotency_key === identity.idempotency_key && receipt.target_selector === identity.target_selector);
50289
50305
  const stored = await this.direct.getReceiptForLookup(identity);
50290
50306
  if (stored)
50291
50307
  staged.push(stored);
@@ -51120,6 +51136,8 @@ class PackageOwnedTodosProjectRegistrationAuthority {
51120
51136
  async existingForwardResolution(transaction, request, callDigest) {
51121
51137
  const exact = await transaction.getReceiptForLookup({
51122
51138
  ...authorityScope(this.capabilityValue),
51139
+ route: this.capabilityValue.route,
51140
+ package_version: this.capabilityValue.package_version,
51123
51141
  operation_id: request.operation_id,
51124
51142
  step_id: request.step_id,
51125
51143
  resource_kind: request.resource_kind,
@@ -51272,6 +51290,8 @@ class PackageOwnedTodosProjectRegistrationAuthority {
51272
51290
  });
51273
51291
  const exact = await transaction.getReceiptForLookup({
51274
51292
  ...authorityScope(this.capabilityValue),
51293
+ route: this.capabilityValue.route,
51294
+ package_version: this.capabilityValue.package_version,
51275
51295
  operation_id: request.operation_id,
51276
51296
  step_id: request.step_id,
51277
51297
  resource_kind: request.resource_kind,
@@ -51322,9 +51342,18 @@ class PackageOwnedTodosProjectRegistrationAuthority {
51322
51342
  if (request.max_items !== 1) {
51323
51343
  throw new TodosProjectRegistrationError("TODOS_PROJECT_REGISTRATION_INVALID_BOUNDS", "max_items must be exactly 1 for terminal receipt lookup");
51324
51344
  }
51325
- if (request.authority !== "todos" || request.authority_route !== this.capabilityValue.route || request.package_version !== this.capabilityValue.package_version || request.authority_id !== this.capabilityValue.authority_id || request.tenant_id !== this.capabilityValue.tenant_id || request.corpus_id !== this.capabilityValue.corpus_id) {
51345
+ if (request.authority !== "todos" || request.authority_id !== this.capabilityValue.authority_id || request.tenant_id !== this.capabilityValue.tenant_id || request.corpus_id !== this.capabilityValue.corpus_id) {
51326
51346
  throw new TodosProjectRegistrationError("TODOS_PROJECT_REGISTRATION_CAPABILITY_MISMATCH", "receipt lookup does not match this authority capability identity");
51327
51347
  }
51348
+ requireString(request.authority_route, "authority_route", {
51349
+ min: 3,
51350
+ max: 128,
51351
+ pattern: AUTHORITY_ROUTE_PATTERN
51352
+ });
51353
+ requireString(request.package_version, "package_version", {
51354
+ max: 128,
51355
+ pattern: PACKAGE_VERSION_PATTERN
51356
+ });
51328
51357
  requireString(request.operation_id, "operation_id", {
51329
51358
  min: 8,
51330
51359
  max: 128,
@@ -51346,6 +51375,8 @@ class PackageOwnedTodosProjectRegistrationAuthority {
51346
51375
  }
51347
51376
  const receipt = await this.backend.getReceiptForLookup({
51348
51377
  ...authorityScope(this.capabilityValue),
51378
+ route: request.authority_route,
51379
+ package_version: request.package_version,
51349
51380
  operation_id: request.operation_id,
51350
51381
  step_id: request.step_id,
51351
51382
  resource_kind: request.resource_kind,
@@ -51384,6 +51415,8 @@ class PackageOwnedTodosProjectRegistrationAuthority {
51384
51415
  });
51385
51416
  const exact = await transaction.getReceiptForLookup({
51386
51417
  ...authorityScope(this.capabilityValue),
51418
+ route: this.capabilityValue.route,
51419
+ package_version: this.capabilityValue.package_version,
51387
51420
  operation_id: request.operation_id,
51388
51421
  step_id: request.step_id,
51389
51422
  resource_kind: request.resource_kind,
@@ -51478,6 +51511,8 @@ class PackageOwnedTodosProjectRegistrationAuthority {
51478
51511
  await this.storedAcceptedReceipt(request, accepted);
51479
51512
  const receipt = await this.backend.getReceiptForLookup({
51480
51513
  ...authorityScope(this.capabilityValue),
51514
+ route: this.capabilityValue.route,
51515
+ package_version: this.capabilityValue.package_version,
51481
51516
  operation_id: request.operation_id,
51482
51517
  step_id: request.step_id,
51483
51518
  resource_kind: request.resource_kind,
@@ -51522,7 +51557,7 @@ function createPostgresTodosProjectRegistrationAuthority(client, options = {}) {
51522
51557
  cursorTableName
51523
51558
  }), authorityOptions);
51524
51559
  }
51525
- var UUID_PATTERN, WORKSPACE_ID_PATTERN, OPERATION_PATTERN, STEP_PATTERN, SHA256_PATTERN, IDEMPOTENCY_PATTERN, WriteBoundaryError;
51560
+ var UUID_PATTERN, WORKSPACE_ID_PATTERN, OPERATION_PATTERN, STEP_PATTERN, AUTHORITY_ROUTE_PATTERN, PACKAGE_VERSION_PATTERN, SHA256_PATTERN, IDEMPOTENCY_PATTERN, WriteBoundaryError;
51526
51561
  var init_authority = __esm(() => {
51527
51562
  init_package_version();
51528
51563
  init_postgres2();
@@ -51532,6 +51567,8 @@ var init_authority = __esm(() => {
51532
51567
  WORKSPACE_ID_PATTERN = /^wks_[A-Za-z0-9][A-Za-z0-9_-]{11,}$/;
51533
51568
  OPERATION_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$/;
51534
51569
  STEP_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{2,127}$/;
51570
+ AUTHORITY_ROUTE_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{2,127}$/;
51571
+ PACKAGE_VERSION_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._+-]{0,127}$/;
51535
51572
  SHA256_PATTERN = /^[0-9a-f]{64}$/;
51536
51573
  IDEMPOTENCY_PATTERN = /^prk_[0-9a-f]{48}$/;
51537
51574
  WriteBoundaryError = class WriteBoundaryError extends Error {
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.27",
44
+ version: "0.15.29",
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",
@@ -1 +1 @@
1
- {"version":3,"file":"authority.d.ts","sourceRoot":"","sources":["../../src/project-registration/authority.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI3C,OAAO,KAAK,EAEV,+BAA+B,EAIhC,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,KAAK,8CAA8C,EACnD,KAAK,sCAAsC,EAC5C,MAAM,eAAe,CAAC;AAEvB,OAAO,EAIL,KAAK,iCAAiC,EACtC,KAAK,wCAAwC,EAE7C,KAAK,kCAAkC,EACvC,KAAK,iCAAiC,EAEtC,KAAK,2CAA2C,EAChD,KAAK,qCAAqC,EAC1C,KAAK,oCAAoC,EACzC,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,oCAAoC,EAC1C,MAAM,YAAY,CAAC;AA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C7C,8CAAmD,GACtD,iCAAiC,CAenC"}
@@ -30,6 +30,8 @@ export interface TodosProjectRegistrationBindingRow extends TodosProjectRegistra
30
30
  updated_at: string;
31
31
  }
32
32
  export interface TodosProjectRegistrationCallIdentity extends TodosProjectRegistrationAuthorityScope {
33
+ route: string;
34
+ package_version: string;
33
35
  operation_id: string;
34
36
  step_id: string;
35
37
  resource_kind: TodosProjectRegistrationResourceKind;
@@ -1 +1 @@
1
- {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../src/project-registration/backend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,EACP,QAAQ,EACT,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,iCAAiC,EACjC,+BAA+B,EAC/B,oCAAoC,EACrC,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,kCACf,SAAQ,+BAA+B;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,sCAAsC;IACrD,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,oCAAoC,GAC5C,SAAS,GACT,UAAU,GACV,wBAAwB,GACxB,SAAS,CAAC;AAEd,MAAM,WAAW,kCACf,SAAQ,sCAAsC;IAC9C,aAAa,EAAE,oCAAoC,CAAC;IACpD,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,SAAS,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,KAAK,EAAE,oCAAoC,CAAC;IAC5C,SAAS,EAAE,MAAM,GAAG,IA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AC,kCAAkC,GAAG,IAAI,CAAC;IAI/C,cAAc,CAClB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,kCAAkC,GAAG,IAAI,CAAC;IAI/C,UAAU,CACd,KAAK,EAAE,sCAAsC,EAC7C,YAAY,EAAE,oCAAoC,EAClD,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,kCAAkC,GAAG,IAAI,CAAC;IAI/C,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAI/C,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;CAGxD"}
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/project-registration/schema.ts"],"names":[],"mappings":"AAAA,wBAAgB,uCAAuC,IAAI,MAAM,CAmGhE;AAED,wBAAgB,yCAAyC,IAAI,MAAM,EAAE,CAiGpE"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/project-registration/schema.ts"],"names":[],"mappings":"AAAA,wBAAgB,uCAAuC,IAAI,MAAM,CAyGhE;AAED,wBAAgB,yCAAyC,IAAI,MAAM,EAAE,CAuGpE"}
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../src/project-registration/sqlite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQ3C,OAAO,KAAK,EAGV,OAAO,EACP,QAAQ,EAET,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,+BAA+B,EAC/B,0CAA0C,EAC1C,sCAAsC,EACtC,kCAAkC,EAClC,oCAAoC,EACpC,kCAAkC,EAEnC,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,YAAY,CAAC;AA4/BvE,qBAAa,qCACb,YAAW,+BAA+B;IAI5B,OAAO,CAAC,Q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IAAI,EAAG,QAAQ,CAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA4C;gBAEtC,EAAE,EAAE,QAAQ;IAKnC,WAAW,CAAC,CAAC,EACjB,EAAE,EAAE,CAAC,WAAW,EAAE,0CAA0C,KAAK,OAAO,CAAC,CAAC,CAAC,GAC1E,OAAO,CAAC,CAAC,CAAC;IAmCb,mBAAmB,CACjB,QAAQ,EAAE,oCAAoC,GAC7C,OAAO,CAAC,kCAAkC,GAAG,IAAI,CAAC;IAIrD,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kCAAkC,GAAG,IAAI,CAAC;IAIrF,UAAU,CACR,KAAK,EAAE,sCAAsC,EAC7C,YAAY,EAAE,oCAAoC,EAClD,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,kCAAkC,GAAG,IAAI,CAAC;IAIrD,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAI/C,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;CAGlD"}
@@ -1053,6 +1053,12 @@ function sqliteTodosProjectRegistrationSchemaSql() {
1053
1053
  authority_id, tenant_id, corpus_id, operation_id, step_id,
1054
1054
  resource_kind, direction, idempotency_key
1055
1055
  );
1056
+ CREATE INDEX IF NOT EXISTS idx_todos_project_registration_receipts_source_identity
1057
+ ON todos_project_registration_receipts (
1058
+ authority_id, tenant_id, corpus_id, route, package_version,
1059
+ operation_id, step_id, resource_kind, direction, idempotency_key,
1060
+ target_selector
1061
+ );
1056
1062
  CREATE INDEX IF NOT EXISTS idx_todos_project_registration_receipts_step
1057
1063
  ON todos_project_registration_receipts (
1058
1064
  authority_id, tenant_id, corpus_id, operation_id, step_id,
@@ -1152,6 +1158,12 @@ function postgresTodosProjectRegistrationSchemaSql() {
1152
1158
  authority_id, tenant_id, corpus_id, operation_id, step_id,
1153
1159
  resource_kind, direction, idempotency_key
1154
1160
  )`,
1161
+ `CREATE INDEX IF NOT EXISTS todos_project_registration_receipts_source_identity_idx
1162
+ ON todos_project_registration_receipts (
1163
+ authority_id, tenant_id, corpus_id, route, package_version,
1164
+ operation_id, step_id, resource_kind, direction, idempotency_key,
1165
+ target_selector
1166
+ )`,
1155
1167
  `CREATE INDEX IF NOT EXISTS todos_project_registration_receipts_step_idx
1156
1168
  ON todos_project_registration_receipts (
1157
1169
  authority_id, tenant_id, corpus_id, operation_id, step_id,
@@ -12661,7 +12673,7 @@ import { createHash as createHash6 } from "crypto";
12661
12673
  // package.json
12662
12674
  var package_default = {
12663
12675
  name: "@hasna/todos",
12664
- version: "0.15.27",
12676
+ version: "0.15.29",
12665
12677
  description: "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
12666
12678
  type: "module",
12667
12679
  main: "dist/index.js",
@@ -15877,8 +15889,9 @@ class PostgresTodosProjectRegistrationTransaction {
15877
15889
  const result = await this.client.query(`
15878
15890
  SELECT * FROM todos_project_registration_receipts
15879
15891
  WHERE authority_id = $1 AND tenant_id = $2 AND corpus_id = $3
15880
- AND operation_id = $4 AND step_id = $5 AND resource_kind = $6
15881
- AND direction = $7 AND idempotency_key = $8 AND target_selector = $9
15892
+ AND route = $4 AND package_version = $5
15893
+ AND operation_id = $6 AND step_id = $7 AND resource_kind = $8
15894
+ AND direction = $9 AND idempotency_key = $10 AND target_selector = $11
15882
15895
  ORDER BY CASE outcome
15883
15896
  WHEN 'terminal_nonacceptance' THEN 0
15884
15897
  WHEN 'duplicate_of_accepted' THEN 1
@@ -15889,6 +15902,8 @@ class PostgresTodosProjectRegistrationTransaction {
15889
15902
  identity.authority_id,
15890
15903
  identity.tenant_id,
15891
15904
  identity.corpus_id,
15905
+ identity.route,
15906
+ identity.package_version,
15892
15907
  identity.operation_id,
15893
15908
  identity.step_id,
15894
15909
  identity.resource_kind,
@@ -17950,6 +17965,7 @@ class SqliteTodosProjectRegistrationTransaction {
17950
17965
  const row = this.db.query(`
17951
17966
  SELECT * FROM todos_project_registration_receipts
17952
17967
  WHERE authority_id = ? AND tenant_id = ? AND corpus_id = ?
17968
+ AND route = ? AND package_version = ?
17953
17969
  AND operation_id = ? AND step_id = ? AND resource_kind = ?
17954
17970
  AND direction = ? AND idempotency_key = ? AND target_selector = ?
17955
17971
  ORDER BY CASE outcome
@@ -17958,7 +17974,7 @@ class SqliteTodosProjectRegistrationTransaction {
17958
17974
  ELSE 2
17959
17975
  END, created_at DESC, receipt_id DESC
17960
17976
  LIMIT 1
17961
- `).get(identity.authority_id, identity.tenant_id, identity.corpus_id, identity.operation_id, identity.step_id, identity.resource_kind, identity.direction, identity.idempotency_key, identity.target_selector);
17977
+ `).get(identity.authority_id, identity.tenant_id, identity.corpus_id, identity.route, identity.package_version, identity.operation_id, identity.step_id, identity.resource_kind, identity.direction, identity.idempotency_key, identity.target_selector);
17962
17978
  return row ? receiptFromRow2(row) : null;
17963
17979
  }
17964
17980
  async getReceiptById(receiptId) {
@@ -18112,7 +18128,7 @@ class StagedSqliteTodosProjectRegistrationTransaction {
18112
18128
  }
18113
18129
  async lockStep(_identity) {}
18114
18130
  async getReceiptForLookup(identity) {
18115
- const staged = [...this.receipts.values()].filter((receipt) => receipt.authority_id === identity.authority_id && receipt.tenant_id === identity.tenant_id && receipt.corpus_id === identity.corpus_id && receipt.operation_id === identity.operation_id && receipt.step_id === identity.step_id && receipt.resource_kind === identity.resource_kind && receipt.direction === identity.direction && receipt.idempotency_key === identity.idempotency_key && receipt.target_selector === identity.target_selector);
18131
+ const staged = [...this.receipts.values()].filter((receipt) => receipt.authority_id === identity.authority_id && receipt.tenant_id === identity.tenant_id && receipt.corpus_id === identity.corpus_id && receipt.route === identity.route && receipt.package_version === identity.package_version && receipt.operation_id === identity.operation_id && receipt.step_id === identity.step_id && receipt.resource_kind === identity.resource_kind && receipt.direction === identity.direction && receipt.idempotency_key === identity.idempotency_key && receipt.target_selector === identity.target_selector);
18116
18132
  const stored = await this.direct.getReceiptForLookup(identity);
18117
18133
  if (stored)
18118
18134
  staged.push(stored);
@@ -18509,6 +18525,8 @@ var UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-
18509
18525
  var WORKSPACE_ID_PATTERN = /^wks_[A-Za-z0-9][A-Za-z0-9_-]{11,}$/;
18510
18526
  var OPERATION_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$/;
18511
18527
  var STEP_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{2,127}$/;
18528
+ var AUTHORITY_ROUTE_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{2,127}$/;
18529
+ var PACKAGE_VERSION_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._+-]{0,127}$/;
18512
18530
  var SHA256_PATTERN = /^[0-9a-f]{64}$/;
18513
18531
  var IDEMPOTENCY_PATTERN = /^prk_[0-9a-f]{48}$/;
18514
18532
 
@@ -18997,6 +19015,8 @@ class PackageOwnedTodosProjectRegistrationAuthority {
18997
19015
  async existingForwardResolution(transaction, request, callDigest) {
18998
19016
  const exact = await transaction.getReceiptForLookup({
18999
19017
  ...authorityScope(this.capabilityValue),
19018
+ route: this.capabilityValue.route,
19019
+ package_version: this.capabilityValue.package_version,
19000
19020
  operation_id: request.operation_id,
19001
19021
  step_id: request.step_id,
19002
19022
  resource_kind: request.resource_kind,
@@ -19149,6 +19169,8 @@ class PackageOwnedTodosProjectRegistrationAuthority {
19149
19169
  });
19150
19170
  const exact = await transaction.getReceiptForLookup({
19151
19171
  ...authorityScope(this.capabilityValue),
19172
+ route: this.capabilityValue.route,
19173
+ package_version: this.capabilityValue.package_version,
19152
19174
  operation_id: request.operation_id,
19153
19175
  step_id: request.step_id,
19154
19176
  resource_kind: request.resource_kind,
@@ -19199,9 +19221,18 @@ class PackageOwnedTodosProjectRegistrationAuthority {
19199
19221
  if (request.max_items !== 1) {
19200
19222
  throw new TodosProjectRegistrationError("TODOS_PROJECT_REGISTRATION_INVALID_BOUNDS", "max_items must be exactly 1 for terminal receipt lookup");
19201
19223
  }
19202
- if (request.authority !== "todos" || request.authority_route !== this.capabilityValue.route || request.package_version !== this.capabilityValue.package_version || request.authority_id !== this.capabilityValue.authority_id || request.tenant_id !== this.capabilityValue.tenant_id || request.corpus_id !== this.capabilityValue.corpus_id) {
19224
+ if (request.authority !== "todos" || request.authority_id !== this.capabilityValue.authority_id || request.tenant_id !== this.capabilityValue.tenant_id || request.corpus_id !== this.capabilityValue.corpus_id) {
19203
19225
  throw new TodosProjectRegistrationError("TODOS_PROJECT_REGISTRATION_CAPABILITY_MISMATCH", "receipt lookup does not match this authority capability identity");
19204
19226
  }
19227
+ requireString(request.authority_route, "authority_route", {
19228
+ min: 3,
19229
+ max: 128,
19230
+ pattern: AUTHORITY_ROUTE_PATTERN
19231
+ });
19232
+ requireString(request.package_version, "package_version", {
19233
+ max: 128,
19234
+ pattern: PACKAGE_VERSION_PATTERN
19235
+ });
19205
19236
  requireString(request.operation_id, "operation_id", {
19206
19237
  min: 8,
19207
19238
  max: 128,
@@ -19223,6 +19254,8 @@ class PackageOwnedTodosProjectRegistrationAuthority {
19223
19254
  }
19224
19255
  const receipt = await this.backend.getReceiptForLookup({
19225
19256
  ...authorityScope(this.capabilityValue),
19257
+ route: request.authority_route,
19258
+ package_version: request.package_version,
19226
19259
  operation_id: request.operation_id,
19227
19260
  step_id: request.step_id,
19228
19261
  resource_kind: request.resource_kind,
@@ -19261,6 +19294,8 @@ class PackageOwnedTodosProjectRegistrationAuthority {
19261
19294
  });
19262
19295
  const exact = await transaction.getReceiptForLookup({
19263
19296
  ...authorityScope(this.capabilityValue),
19297
+ route: this.capabilityValue.route,
19298
+ package_version: this.capabilityValue.package_version,
19264
19299
  operation_id: request.operation_id,
19265
19300
  step_id: request.step_id,
19266
19301
  resource_kind: request.resource_kind,
@@ -19355,6 +19390,8 @@ class PackageOwnedTodosProjectRegistrationAuthority {
19355
19390
  await this.storedAcceptedReceipt(request, accepted);
19356
19391
  const receipt = await this.backend.getReceiptForLookup({
19357
19392
  ...authorityScope(this.capabilityValue),
19393
+ route: this.capabilityValue.route,
19394
+ package_version: this.capabilityValue.package_version,
19358
19395
  operation_id: request.operation_id,
19359
19396
  step_id: request.step_id,
19360
19397
  resource_kind: request.resource_kind,
package/dist/registry.js CHANGED
@@ -77,6 +77,12 @@ function sqliteTodosProjectRegistrationSchemaSql() {
77
77
  authority_id, tenant_id, corpus_id, operation_id, step_id,
78
78
  resource_kind, direction, idempotency_key
79
79
  );
80
+ CREATE INDEX IF NOT EXISTS idx_todos_project_registration_receipts_source_identity
81
+ ON todos_project_registration_receipts (
82
+ authority_id, tenant_id, corpus_id, route, package_version,
83
+ operation_id, step_id, resource_kind, direction, idempotency_key,
84
+ target_selector
85
+ );
80
86
  CREATE INDEX IF NOT EXISTS idx_todos_project_registration_receipts_step
81
87
  ON todos_project_registration_receipts (
82
88
  authority_id, tenant_id, corpus_id, operation_id, step_id,
@@ -176,6 +182,12 @@ function postgresTodosProjectRegistrationSchemaSql() {
176
182
  authority_id, tenant_id, corpus_id, operation_id, step_id,
177
183
  resource_kind, direction, idempotency_key
178
184
  )`,
185
+ `CREATE INDEX IF NOT EXISTS todos_project_registration_receipts_source_identity_idx
186
+ ON todos_project_registration_receipts (
187
+ authority_id, tenant_id, corpus_id, route, package_version,
188
+ operation_id, step_id, resource_kind, direction, idempotency_key,
189
+ target_selector
190
+ )`,
179
191
  `CREATE INDEX IF NOT EXISTS todos_project_registration_receipts_step_idx
180
192
  ON todos_project_registration_receipts (
181
193
  authority_id, tenant_id, corpus_id, operation_id, step_id,
@@ -12658,7 +12670,7 @@ var init_tasks = __esm(() => {
12658
12670
  // package.json
12659
12671
  var package_default = {
12660
12672
  name: "@hasna/todos",
12661
- version: "0.15.27",
12673
+ version: "0.15.29",
12662
12674
  description: "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
12663
12675
  type: "module",
12664
12676
  main: "dist/index.js",
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "packageName": "@hasna/todos",
3
- "packageVersion": "0.15.27",
3
+ "packageVersion": "0.15.29",
4
4
  "repository": "https://github.com/hasna/todos.git",
5
- "gitCommit": "193fbcfd5e29f70c6d016722014698261b2e3023",
6
- "gitTree": "fce50654ac59aabc7584bc954b7e273698e19011",
7
- "sourceTreeSha256": "40fbf9a04996f09ca424f3f42220409d186be9b8c91f07a1960ca93f7bcee464",
8
- "generatedAt": "2026-08-11T16:15:36.000Z"
5
+ "gitCommit": "f83953cfacc6e5d584c34b49299a6ebc97842a47",
6
+ "gitTree": "c1eb2cec20d22100cb2207a89efdb5c1f72cc52b",
7
+ "sourceTreeSha256": "60993895f109cd5f3f073d753761f6354456793cc0f998517565b36e1126ae03",
8
+ "generatedAt": "2026-08-11T19:03:26.000Z"
9
9
  }