@hasna/todos 0.15.5 → 0.15.7

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.
Files changed (43) hide show
  1. package/dist/cli/cloud-router.d.ts.map +1 -1
  2. package/dist/cli/commands/task-commands.d.ts.map +1 -1
  3. package/dist/cli/index.js +3086 -1332
  4. package/dist/contracts.js +213 -3
  5. package/dist/db/migrations.d.ts.map +1 -1
  6. package/dist/db/schema.d.ts.map +1 -1
  7. package/dist/index.d.ts +2 -0
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +1950 -26
  10. package/dist/lib/comment-cursor.d.ts +40 -0
  11. package/dist/lib/comment-cursor.d.ts.map +1 -0
  12. package/dist/mcp/index.js +2096 -391
  13. package/dist/mcp.js +7 -3
  14. package/dist/project-registration/authority.d.ts +45 -0
  15. package/dist/project-registration/authority.d.ts.map +1 -0
  16. package/dist/project-registration/backend.d.ts +83 -0
  17. package/dist/project-registration/backend.d.ts.map +1 -0
  18. package/dist/project-registration/http.d.ts +24 -0
  19. package/dist/project-registration/http.d.ts.map +1 -0
  20. package/dist/project-registration/index.d.ts +8 -0
  21. package/dist/project-registration/index.d.ts.map +1 -0
  22. package/dist/project-registration/postgres.d.ts +30 -0
  23. package/dist/project-registration/postgres.d.ts.map +1 -0
  24. package/dist/project-registration/schema.d.ts +3 -0
  25. package/dist/project-registration/schema.d.ts.map +1 -0
  26. package/dist/project-registration/sqlite.d.ts +17 -0
  27. package/dist/project-registration/sqlite.d.ts.map +1 -0
  28. package/dist/project-registration/types.d.ts +155 -0
  29. package/dist/project-registration/types.d.ts.map +1 -0
  30. package/dist/project-registration.d.ts +2 -0
  31. package/dist/project-registration.d.ts.map +1 -0
  32. package/dist/project-registration.js +17689 -0
  33. package/dist/registry.d.ts +1 -1
  34. package/dist/registry.d.ts.map +1 -1
  35. package/dist/registry.js +220 -3
  36. package/dist/release-provenance.json +5 -5
  37. package/dist/server/cloud.d.ts +3 -0
  38. package/dist/server/cloud.d.ts.map +1 -1
  39. package/dist/server/index.js +4386 -2681
  40. package/dist/server/v1.d.ts +2 -1
  41. package/dist/server/v1.d.ts.map +1 -1
  42. package/dist/storage.js +206 -0
  43. package/package.json +7 -3
@@ -0,0 +1,40 @@
1
+ import type { TaskComment } from "../types/index.js";
2
+ /**
3
+ * Keyset cursor for the task-comment read model, and the pure pager that walks
4
+ * it. Both the `/v1` server and the CLI encode and decode the same cursor, so
5
+ * the codec lives here rather than beside either consumer — a second copy of
6
+ * this keyset logic is exactly how the two ends drift into disagreeing about
7
+ * what a cursor means.
8
+ *
9
+ * ORDERING CONTRACT, measured against the live deployment rather than assumed:
10
+ * a page carries the NEWEST `limit` comments in ASCENDING display order, so the
11
+ * newest comment is the LAST element. `next_cursor` encodes the FIRST (oldest)
12
+ * element of the page, and walking it moves toward OLDER history.
13
+ */
14
+ export interface CommentCursor {
15
+ created_at: string;
16
+ id: string;
17
+ }
18
+ export declare const MAX_COMMENT_CURSOR_LENGTH = 1024;
19
+ export declare function encodeCommentCursor(comment: Pick<TaskComment, "created_at" | "id">): string;
20
+ export declare function decodeCommentCursor(value: string): CommentCursor;
21
+ /** True when `comment` sorts strictly before `before` on the `(created_at, id)` keyset. */
22
+ export declare function isStrictlyOlder(comment: Pick<TaskComment, "created_at" | "id">, before: CommentCursor): boolean;
23
+ export interface CommentPageResult<T> {
24
+ comments: T[];
25
+ count: number;
26
+ has_more: boolean;
27
+ next_cursor: string | null;
28
+ limit: number;
29
+ }
30
+ /**
31
+ * Page an already-materialised, ascending comment list. Used by the local
32
+ * (SQLite) read path, where the whole history is in hand; the cloud path gets
33
+ * the identical shape from the server, which applies the same rule against the
34
+ * database.
35
+ */
36
+ export declare function pageComments<T extends Pick<TaskComment, "created_at" | "id">>(all: readonly T[], options: {
37
+ limit: number;
38
+ before?: CommentCursor;
39
+ }): CommentPageResult<T>;
40
+ //# sourceMappingURL=comment-cursor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment-cursor.d.ts","sourceRoot":"","sources":["../../src/lib/comment-cursor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,eAAO,MAAM,yBAAyB,OAAQ,CAAC;AAE/C,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC,GAAG,MAAM,CAG3F;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAgBhE;AAED,2FAA2F;AAC3F,wBAAgB,eAAe,CAC7B,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC,EAC/C,MAAM,EAAE,aAAa,GACpB,OAAO,CAGT;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,QAAQ,EAAE,CAAC,EAAE,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,IAAI,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC,EAC3E,GAAG,EAAE,SAAS,CAAC,EAAE,EACjB,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,aAAa,CAAA;CAAE,GACjD,iBAAiB,CAAC,CAAC,CAAC,CAetB"}