@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.
- package/dist/cli/cloud-router.d.ts.map +1 -1
- package/dist/cli/commands/task-commands.d.ts.map +1 -1
- package/dist/cli/index.js +3086 -1332
- package/dist/contracts.js +213 -3
- package/dist/db/migrations.d.ts.map +1 -1
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1950 -26
- package/dist/lib/comment-cursor.d.ts +40 -0
- package/dist/lib/comment-cursor.d.ts.map +1 -0
- package/dist/mcp/index.js +2096 -391
- package/dist/mcp.js +7 -3
- package/dist/project-registration/authority.d.ts +45 -0
- package/dist/project-registration/authority.d.ts.map +1 -0
- package/dist/project-registration/backend.d.ts +83 -0
- package/dist/project-registration/backend.d.ts.map +1 -0
- package/dist/project-registration/http.d.ts +24 -0
- package/dist/project-registration/http.d.ts.map +1 -0
- package/dist/project-registration/index.d.ts +8 -0
- package/dist/project-registration/index.d.ts.map +1 -0
- package/dist/project-registration/postgres.d.ts +30 -0
- package/dist/project-registration/postgres.d.ts.map +1 -0
- package/dist/project-registration/schema.d.ts +3 -0
- package/dist/project-registration/schema.d.ts.map +1 -0
- package/dist/project-registration/sqlite.d.ts +17 -0
- package/dist/project-registration/sqlite.d.ts.map +1 -0
- package/dist/project-registration/types.d.ts +155 -0
- package/dist/project-registration/types.d.ts.map +1 -0
- package/dist/project-registration.d.ts +2 -0
- package/dist/project-registration.d.ts.map +1 -0
- package/dist/project-registration.js +17689 -0
- package/dist/registry.d.ts +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +220 -3
- package/dist/release-provenance.json +5 -5
- package/dist/server/cloud.d.ts +3 -0
- package/dist/server/cloud.d.ts.map +1 -1
- package/dist/server/index.js +4386 -2681
- package/dist/server/v1.d.ts +2 -1
- package/dist/server/v1.d.ts.map +1 -1
- package/dist/storage.js +206 -0
- 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"}
|