things-api 0.12.0 → 0.14.0
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/README.md +2 -2
- package/dist/cli/canonical-ref.d.ts +21 -0
- package/dist/cli/canonical-ref.js +23 -0
- package/dist/cli/canonical-ref.js.map +1 -0
- package/dist/cli/commands/area.d.ts +5 -5
- package/dist/cli/commands/area.js +39 -18
- package/dist/cli/commands/area.js.map +1 -1
- package/dist/cli/commands/install-skill.d.ts +2 -2
- package/dist/cli/commands/install-skill.js +29 -0
- package/dist/cli/commands/install-skill.js.map +1 -1
- package/dist/cli/commands/mcp.js +12 -1
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/project.js +74 -22
- package/dist/cli/commands/project.js.map +1 -1
- package/dist/cli/commands/reads.d.ts +5 -1
- package/dist/cli/commands/reads.js +31 -15
- package/dist/cli/commands/reads.js.map +1 -1
- package/dist/cli/commands/setup.js +11 -4
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/cli/commands/show.js +51 -32
- package/dist/cli/commands/show.js.map +1 -1
- package/dist/cli/commands/todo.js +2 -2
- package/dist/cli/commands/todo.js.map +1 -1
- package/dist/cli/commands/writes.js +138 -67
- package/dist/cli/commands/writes.js.map +1 -1
- package/dist/cli/did-you-mean.js +19 -5
- package/dist/cli/did-you-mean.js.map +1 -1
- package/dist/cli/dry-run.d.ts +55 -0
- package/dist/cli/dry-run.js +92 -0
- package/dist/cli/dry-run.js.map +1 -0
- package/dist/cli/glyphs.d.ts +9 -2
- package/dist/cli/glyphs.js +11 -5
- package/dist/cli/glyphs.js.map +1 -1
- package/dist/cli/help.js +7 -6
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/main.js +7 -0
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/read-driver.d.ts +47 -7
- package/dist/cli/read-driver.js +43 -21
- package/dist/cli/read-driver.js.map +1 -1
- package/dist/cli/ref-render.d.ts +14 -0
- package/dist/cli/ref-render.js +9 -0
- package/dist/cli/ref-render.js.map +1 -0
- package/dist/cli/render.d.ts +39 -25
- package/dist/cli/render.js +102 -62
- package/dist/cli/render.js.map +1 -1
- package/dist/cli/resolve-invocation.d.ts +5 -3
- package/dist/cli/resolve-invocation.js +13 -4
- package/dist/cli/resolve-invocation.js.map +1 -1
- package/dist/client.d.ts +100 -32
- package/dist/client.js +63 -19
- package/dist/client.js.map +1 -1
- package/dist/contracts.d.ts +34 -33
- package/dist/contracts.js +1 -1
- package/dist/contracts.js.map +1 -1
- package/dist/db/baselines/db-v26.js +4 -1
- package/dist/db/baselines/db-v26.js.map +1 -1
- package/dist/index.d.ts +8 -5
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.js +192 -139
- package/dist/mcp/server.js.map +1 -1
- package/dist/model/dates.d.ts +26 -0
- package/dist/model/dates.js +46 -4
- package/dist/model/dates.js.map +1 -1
- package/dist/model/entities.d.ts +11 -1
- package/dist/model/entities.js.map +1 -1
- package/dist/model/mappers.js +3 -0
- package/dist/model/mappers.js.map +1 -1
- package/dist/model/serialize.js +15 -3
- package/dist/model/serialize.js.map +1 -1
- package/dist/read/area-filter.d.ts +2 -2
- package/dist/read/area-filter.js +3 -3
- package/dist/read/area-filter.js.map +1 -1
- package/dist/read/project-view.d.ts +76 -1
- package/dist/read/project-view.js +80 -9
- package/dist/read/project-view.js.map +1 -1
- package/dist/read/queries.d.ts +71 -2
- package/dist/read/queries.js +199 -10
- package/dist/read/queries.js.map +1 -1
- package/dist/read/scope.d.ts +2 -2
- package/dist/read/scope.js +3 -3
- package/dist/read/scope.js.map +1 -1
- package/dist/read/shape.d.ts +87 -9
- package/dist/read/shape.js +483 -124
- package/dist/read/shape.js.map +1 -1
- package/dist/read/show-target.js +52 -33
- package/dist/read/show-target.js.map +1 -1
- package/dist/read/truncation.d.ts +73 -7
- package/dist/read/truncation.js +62 -29
- package/dist/read/truncation.js.map +1 -1
- package/dist/read/views.d.ts +20 -7
- package/dist/read/views.js +7 -7
- package/dist/read/views.js.map +1 -1
- package/dist/surface-copy.d.ts +13 -0
- package/dist/surface-copy.js +13 -0
- package/dist/surface-copy.js.map +1 -1
- package/dist/write/batch.js +0 -1
- package/dist/write/batch.js.map +1 -1
- package/dist/write/commands.d.ts +25 -1
- package/dist/write/commands.js +259 -122
- package/dist/write/commands.js.map +1 -1
- package/dist/write/guards.js +27 -11
- package/dist/write/guards.js.map +1 -1
- package/dist/write/move.d.ts +34 -9
- package/dist/write/move.js +730 -78
- package/dist/write/move.js.map +1 -1
- package/dist/write/operations.d.ts +50 -20
- package/dist/write/operations.js +2 -2
- package/dist/write/operations.js.map +1 -1
- package/dist/write/pipeline.js +25 -4
- package/dist/write/pipeline.js.map +1 -1
- package/dist/write/pre-state.d.ts +58 -28
- package/dist/write/pre-state.js +247 -49
- package/dist/write/pre-state.js.map +1 -1
- package/dist/write/reorder.js +266 -32
- package/dist/write/reorder.js.map +1 -1
- package/dist/write/resolution-timestamps.d.ts +34 -0
- package/dist/write/resolution-timestamps.js +286 -0
- package/dist/write/resolution-timestamps.js.map +1 -0
- package/dist/write/reversibility.js +5 -5
- package/dist/write/reversibility.js.map +1 -1
- package/dist/write/scope-guard.js +0 -5
- package/dist/write/scope-guard.js.map +1 -1
- package/dist/write/undo.d.ts +0 -6
- package/dist/write/undo.js +44 -4
- package/dist/write/undo.js.map +1 -1
- package/dist/write/vectors/applescript.js +14 -4
- package/dist/write/vectors/applescript.js.map +1 -1
- package/dist/write/vectors/url-scheme.js +0 -8
- package/dist/write/vectors/url-scheme.js.map +1 -1
- package/dist/write/verify/delta.d.ts +16 -2
- package/dist/write/verify/delta.js +21 -2
- package/dist/write/verify/delta.js.map +1 -1
- package/package.json +1 -1
- package/schema/envelope.schema.json +16 -78
- package/skills/things-cli/SKILL.md +10 -6
- package/skills/things-cli/references/contracts.md +3 -2
- package/skills/things-cli/references/errors.md +9 -1
- package/skills/things-cli/references/model.md +9 -7
- package/skills/things-cli/references/ordering.md +36 -10
package/dist/model/serialize.js
CHANGED
|
@@ -26,10 +26,22 @@
|
|
|
26
26
|
* can be "" (an untitled to-do) and MUST still be present.
|
|
27
27
|
*/
|
|
28
28
|
const IDENTITY_KEYS = new Set(["uuid", "type", "title", "name"]);
|
|
29
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* A to-do/project/heading row: uuid + a task-type discriminant. `type` is
|
|
31
|
+
* PRESENCE-KEYED on the shaped wire — omitted on a to-do (absent `type` = to-do,
|
|
32
|
+
* the same convention the wire uses), present for project/heading — so a
|
|
33
|
+
* type-less row with a uuid + title (and no competing `visible` area
|
|
34
|
+
* discriminant) IS a to-do here. Shaping runs before this transform, so the
|
|
35
|
+
* type has already been dropped by the time we prune.
|
|
36
|
+
*/
|
|
30
37
|
function isTaskEntity(o) {
|
|
31
|
-
|
|
32
|
-
|
|
38
|
+
const t = o["type"];
|
|
39
|
+
if (t === "to-do" || t === "project" || t === "heading")
|
|
40
|
+
return true;
|
|
41
|
+
return (t === undefined &&
|
|
42
|
+
typeof o["uuid"] === "string" &&
|
|
43
|
+
typeof o["title"] === "string" &&
|
|
44
|
+
typeof o["visible"] !== "boolean");
|
|
33
45
|
}
|
|
34
46
|
/** An area: uuid + the `visible` flag (distinguishes it from a bare Ref). */
|
|
35
47
|
function isAreaEntity(o) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialize.js","sourceRoot":"","sources":["../../src/model/serialize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;;GAIG;AACH,MAAM,aAAa,GAAwB,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAItF
|
|
1
|
+
{"version":3,"file":"serialize.js","sourceRoot":"","sources":["../../src/model/serialize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;;GAIG;AACH,MAAM,aAAa,G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C,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;AAC3F,CAAC;AAED,SAAS,KAAK,CAAC,KAAc;IAC3B,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACxD,+EAA+E;IAC/E,IAAI,KAAK,YAAY,IAAI;QAAE,OAAO,KAAK,CAAC;IACxC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAClD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,CAAC,GAAG,KAAY,CAAC;QACvB,MAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;QACrC,MAAM,GAAG,GAAQ,EAAE,CAAC;QACpB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;YACjC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YACjB,IAAI,WAAW,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC;gBAAE,SAAS;YACnE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAI,OAAU;IACrC,OAAO,KAAK,CAAC,OAAO,CAAM,CAAC;AAC7B,CAAC"}
|
|
@@ -68,8 +68,8 @@ export declare function filterListByArea<T extends ListItem>(items: T[], areaUui
|
|
|
68
68
|
*/
|
|
69
69
|
export declare function filterSectionsByArea(sections: SidebarSection[], areaUuid: string): SidebarSection[];
|
|
70
70
|
/**
|
|
71
|
-
* Filter the Today split to the target area. The
|
|
72
|
-
* surviving OPEN members so
|
|
71
|
+
* Filter the Today split to the target area. The counts are recomputed over the
|
|
72
|
+
* surviving OPEN members so they reflect exactly the rows the view now returns —
|
|
73
73
|
* the same treatment {@link todayView} gives its `eveningOnly` filter — never a
|
|
74
74
|
* count that includes dropped rows.
|
|
75
75
|
*/
|
package/dist/read/area-filter.js
CHANGED
|
@@ -44,8 +44,8 @@ export function filterSectionsByArea(sections, areaUuid) {
|
|
|
44
44
|
.filter((s) => s.items.length > 0);
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* Filter the Today split to the target area. The
|
|
48
|
-
* surviving OPEN members so
|
|
47
|
+
* Filter the Today split to the target area. The counts are recomputed over the
|
|
48
|
+
* surviving OPEN members so they reflect exactly the rows the view now returns —
|
|
49
49
|
* the same treatment {@link todayView} gives its `eveningOnly` filter — never a
|
|
50
50
|
* count that includes dropped rows.
|
|
51
51
|
*/
|
|
@@ -54,6 +54,6 @@ export function filterTodayByArea(view, areaUuid, todayIso) {
|
|
|
54
54
|
const evening = view.evening.filter((i) => itemInArea(i, areaUuid));
|
|
55
55
|
const open = [...today, ...evening].filter((i) => i.status === "open");
|
|
56
56
|
const dueOrOverdue = open.filter((i) => i.deadline !== null && i.deadline <= todayIso).length;
|
|
57
|
-
return { today, evening,
|
|
57
|
+
return { today, evening, counts: { dueOrOverdue, other: open.length - dueOrOverdue } };
|
|
58
58
|
}
|
|
59
59
|
//# sourceMappingURL=area-filter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"area-filter.js","sourceRoot":"","sources":["../../src/read/area-filter.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AA6BzD;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAAgB,EAAE,GAAW;IAC7D,0EAA0E;IAC1E,6EAA6E;IAC7E,yEAAyE;IACzE,gFAAgF;IAChF,IAAI,UA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CAAC;IAChE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;IACpE,MAAM,IAAI,GAAG,CAAC,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;IACvE,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,IAAI,IAAI,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAAC,MAAM,CAAC;IAC9F,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,GAAG,YAAY,EAAE,EAAE,CAAC;AACzF,CAAC"}
|
|
@@ -31,11 +31,63 @@ export interface ProjectHeadingGroup {
|
|
|
31
31
|
/** This heading's repeating template rows (invisible in list views). */
|
|
32
32
|
repeating: Todo[];
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* An ARCHIVED heading rendered inside the logged region (HEADARC2-A). Unlike a
|
|
36
|
+
* live {@link ProjectHeadingGroup}, an archived heading is itself a logged item,
|
|
37
|
+
* and its children — ALL of them, whatever their own state — nest beneath it as
|
|
38
|
+
* a grouped section (most-recently-completed first). That includes any odd OPEN
|
|
39
|
+
* child a GUI "Put Back" left stranded under the archived heading (HEADARC2-C):
|
|
40
|
+
* the group renders what is there, it does NOT filter to status=3.
|
|
41
|
+
*/
|
|
42
|
+
export interface LoggedHeadingGroup {
|
|
43
|
+
/** The archived heading (status "completed"); the wire emits its `archived`. */
|
|
44
|
+
heading: Heading;
|
|
45
|
+
/** Every child of the archived heading, most-recently-completed first. */
|
|
46
|
+
items: Todo[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* A container's full child set for the read-shape v2 wire (PR 2): a heading (any
|
|
50
|
+
* lifecycle class — open, archived-unswept, archived-SWEPT) with EVERY one of its
|
|
51
|
+
* children, live AND logged alike, in project `index` order. The wire boundary
|
|
52
|
+
* ({@link src/read/shape.ts} `shapeProjectView`) buckets these by DERIVED STAGE —
|
|
53
|
+
* logged → the heading's own `children.logbook`, the rest into
|
|
54
|
+
* `anytime`/`upcoming`/`someday` — so one entity lands in exactly one place
|
|
55
|
+
* (doctrine v2 R5 / #V12). The structured render buckets ({@link
|
|
56
|
+
* ProjectView.headings}, {@link ProjectView.loggedHeadings}) are the SAME
|
|
57
|
+
* headings + children re-grouped into the GUI layout for the byte-stable TTY.
|
|
58
|
+
*/
|
|
59
|
+
export interface ProjectHeadingContainer {
|
|
60
|
+
heading: Heading;
|
|
61
|
+
/** EVERY child of this heading (live AND logged/swept), project `index` order. */
|
|
62
|
+
children: Todo[];
|
|
63
|
+
}
|
|
34
64
|
export interface ProjectView {
|
|
35
65
|
project: Project;
|
|
66
|
+
/**
|
|
67
|
+
* Read-shape v2 wire (PR 2): the un-headed BODY's children — live AND logged
|
|
68
|
+
* alike — in project `index` order. The wire boundary buckets these by derived
|
|
69
|
+
* stage into the body's `children.{anytime,upcoming,someday,logbook}` record set
|
|
70
|
+
* (one entity, one place — R5/#V12). This is the wire representation of the body;
|
|
71
|
+
* the structured render buckets below (`active`, `scheduled`, `someday`,
|
|
72
|
+
* `repeating`, and the un-headed slice of `logged`) are the SAME children
|
|
73
|
+
* re-grouped into the GUI layout for the byte-stable TTY — the library owns the
|
|
74
|
+
* clock + sweep boundary, so the two are always consistent (one child fetch).
|
|
75
|
+
*/
|
|
76
|
+
bodyChildren: Todo[];
|
|
77
|
+
/**
|
|
78
|
+
* Read-shape v2 wire (PR 2): EVERY heading — open, archived-unswept, AND
|
|
79
|
+
* archived-SWEPT — in project `index` order, each carrying ALL its children (R5:
|
|
80
|
+
* all lifecycle classes, one entity one place). Under a content scope
|
|
81
|
+
* (`--overdue` / `--tag`) a heading whose children were all filtered out
|
|
82
|
+
* collapses, exactly as the render groups do. The wire boundary nests each
|
|
83
|
+
* container's stage-bucketed `children` under its heading node; the structured
|
|
84
|
+
* `headings` / `loggedHeadings` below re-group the SAME headings + children into
|
|
85
|
+
* the GUI render layout for the byte-stable TTY.
|
|
86
|
+
*/
|
|
87
|
+
headingContainers: ProjectHeadingContainer[];
|
|
36
88
|
/** Open, unscheduled/current UNHEADED children, by index. */
|
|
37
89
|
active: Todo[];
|
|
38
|
-
/**
|
|
90
|
+
/** OPEN headings in project order, each with its own sub-buckets. An archived heading never renders here. */
|
|
39
91
|
headings: ProjectHeadingGroup[];
|
|
40
92
|
/** UNHEADED future-dated children grouped by date ascending. */
|
|
41
93
|
scheduled: IsoDateGroup<Todo>[];
|
|
@@ -43,7 +95,20 @@ export interface ProjectView {
|
|
|
43
95
|
someday: Todo[];
|
|
44
96
|
/** UNHEADED repeating template rows owned by this project (invisible in list views). */
|
|
45
97
|
repeating: Todo[];
|
|
98
|
+
/**
|
|
99
|
+
* The flat logged region: swept children of OPEN headings (each carrying its
|
|
100
|
+
* heading ref) plus swept un-headed children, most-recently-completed first.
|
|
101
|
+
* Children of ARCHIVED headings are NOT here — they group under their heading
|
|
102
|
+
* in {@link ProjectView.loggedHeadings}.
|
|
103
|
+
*/
|
|
46
104
|
logged: Todo[];
|
|
105
|
+
/**
|
|
106
|
+
* The archived-heading GROUPS of the logged region (HEADARC2-A), in project
|
|
107
|
+
* (heading `index`) order — each an archived heading with its children nested.
|
|
108
|
+
* Rendered only under `--show-logged`, after the flat {@link ProjectView.logged}
|
|
109
|
+
* rows (the flat-then-grouped ordering is a defensible choice, not GUI-probed).
|
|
110
|
+
*/
|
|
111
|
+
loggedHeadings: LoggedHeadingGroup[];
|
|
47
112
|
/**
|
|
48
113
|
* PLOG1 (additive): count of untrashed OPEN (status=0) children this project
|
|
49
114
|
* still holds while it is ITSELF completed or canceled — including once swept
|
|
@@ -54,6 +119,16 @@ export interface ProjectView {
|
|
|
54
119
|
* child.
|
|
55
120
|
*/
|
|
56
121
|
openChildrenWhileResolved: number;
|
|
122
|
+
/**
|
|
123
|
+
* HEADARC2-C (additive): count of untrashed OPEN (status=0) children buried
|
|
124
|
+
* under an ARCHIVED heading of this project — the heading analog of the §6¾
|
|
125
|
+
* odd state. The GUI's "Put Back" of a trashed open child restores it in place
|
|
126
|
+
* under the archived heading WITHOUT reopening the heading, leaving an open,
|
|
127
|
+
* actionable to-do invisible to every live view (reachable only by expanding
|
|
128
|
+
* this card's logged region). Counted regardless of the PROJECT's own status.
|
|
129
|
+
* 0 when no archived heading holds an open child.
|
|
130
|
+
*/
|
|
131
|
+
openChildrenUnderArchivedHeading: number;
|
|
57
132
|
}
|
|
58
133
|
export declare class ProjectNotFoundError extends Error {
|
|
59
134
|
constructor(uuid: string);
|
|
@@ -72,30 +72,63 @@ export function projectView(db, uuid, now, filter = {}, zone) {
|
|
|
72
72
|
todo: mapTodo(r, refs, childTags.get(r.uuid) ?? [], packedToday),
|
|
73
73
|
}));
|
|
74
74
|
markLogged([project, ...todos.map((t) => t.todo)], boundary);
|
|
75
|
+
// TRINARY heading split (the completion≠logged law, applied to headings): an
|
|
76
|
+
// OPEN heading — or an archived one NOT yet past the log-move boundary — stays
|
|
77
|
+
// a LIVE group IN PLACE (an archived-unswept heading carries `archived` yet
|
|
78
|
+
// renders among the live groups, exactly as a completed-unswept to-do row
|
|
79
|
+
// stays checked in place, §above / log-boundary.ts). Only a SWEPT archived
|
|
80
|
+
// heading moves into the logged region as a grouped section (HEADARC2-A).
|
|
81
|
+
const headingSwept = (h) => h.status !== "open" && h.stopped !== null && h.stopped <= boundary;
|
|
82
|
+
const liveHeadings = headings.filter((h) => !headingSwept(h));
|
|
83
|
+
const sweptHeadings = headings.filter((h) => headingSwept(h));
|
|
84
|
+
const liveHeadingSet = new Set(liveHeadings.map((h) => h.uuid));
|
|
85
|
+
const sweptHeadingSet = new Set(sweptHeadings.map((h) => h.uuid));
|
|
86
|
+
// The owning-project ref stamped on every headed child — so the heading ref a
|
|
87
|
+
// flat logged row carries promotes its `headingUuid` in the project's scope
|
|
88
|
+
// (the round-trip predicate is project-scoped), mirroring the list views.
|
|
89
|
+
const projectRef = { uuid: project.uuid, title: project.title };
|
|
75
90
|
// Project-level (UNHEADED) buckets.
|
|
76
91
|
const active = [];
|
|
77
92
|
const scheduledRows = [];
|
|
78
93
|
const repeating = [];
|
|
79
94
|
const someday = [];
|
|
80
95
|
const logged = [];
|
|
81
|
-
//
|
|
82
|
-
//
|
|
96
|
+
// Children of a SWEPT archived heading — grouped under their heading in the
|
|
97
|
+
// logged region (keyed by heading uuid), ALL of them regardless of state.
|
|
98
|
+
const sweptHeadingChildren = new Map();
|
|
99
|
+
// Per-heading LIVE sub-buckets, keyed by heading uuid (§9 fidelity fix): a
|
|
100
|
+
// headed scheduled/someday/repeating child nests under its heading, NOT at the
|
|
83
101
|
// project level.
|
|
84
102
|
const headingItems = new Map();
|
|
85
103
|
const headingScheduled = new Map();
|
|
86
104
|
const headingSomeday = new Map();
|
|
87
105
|
const headingRepeating = new Map();
|
|
88
|
-
//
|
|
89
|
-
//
|
|
90
|
-
// vanishing (mirrors the render's
|
|
91
|
-
const
|
|
92
|
-
const headingUuidOf = (row) => row.heading !== null && headingSet.has(row.heading) ? row.heading : null;
|
|
106
|
+
// A child whose heading FK is not a LIVE heading (an unknown/trashed heading,
|
|
107
|
+
// OR a swept archived heading handled above) falls back to the project-level
|
|
108
|
+
// (unheaded) buckets rather than vanishing (mirrors the render's loose fallback).
|
|
109
|
+
const liveHeadingUuidOf = (row) => row.heading !== null && liveHeadingSet.has(row.heading) ? row.heading : null;
|
|
93
110
|
// Every untrashed, non-template OPEN child, regardless of which bucket it
|
|
94
111
|
// lands in below — surfaced (only when the project is itself resolved) as
|
|
95
112
|
// the PLOG1 stranded-open-child count.
|
|
96
113
|
let openChildren = 0;
|
|
114
|
+
// Open children buried under a SWEPT archived heading — the §6¾ odd state for
|
|
115
|
+
// headings (HEADARC2-C), surfaced regardless of the project's own status.
|
|
116
|
+
let openChildrenUnderArchivedHeading = 0;
|
|
97
117
|
for (const { row, todo } of todos) {
|
|
98
|
-
|
|
118
|
+
if (todo.heading !== null)
|
|
119
|
+
todo.headingProject = projectRef;
|
|
120
|
+
// A child of a SWEPT archived heading groups under it in the logged region,
|
|
121
|
+
// WHATEVER its own state — including the odd OPEN child a GUI Put-Back
|
|
122
|
+
// stranded (HEADARC2-C): render what is there, do NOT filter to status=3.
|
|
123
|
+
if (row.heading !== null && sweptHeadingSet.has(row.heading)) {
|
|
124
|
+
pushInto(sweptHeadingChildren, row.heading, todo);
|
|
125
|
+
if (row.status === 0 && !todo.repeating.isTemplate) {
|
|
126
|
+
openChildren += 1; // also stranded when the project itself is resolved
|
|
127
|
+
openChildrenUnderArchivedHeading += 1;
|
|
128
|
+
}
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
const h = liveHeadingUuidOf(row);
|
|
99
132
|
if (todo.repeating.isTemplate) {
|
|
100
133
|
if (h !== null)
|
|
101
134
|
pushInto(headingRepeating, h, todo);
|
|
@@ -151,7 +184,7 @@ export function projectView(db, uuid, now, filter = {}, zone) {
|
|
|
151
184
|
// section; a heading with any surviving child (in ANY sub-bucket) is kept.
|
|
152
185
|
// With no scope active every heading renders (its own empty state).
|
|
153
186
|
const contentScoped = overdue || tf.sql !== "";
|
|
154
|
-
const headingGroups =
|
|
187
|
+
const headingGroups = liveHeadings
|
|
155
188
|
.map((heading) => ({
|
|
156
189
|
heading,
|
|
157
190
|
items: headingItems.get(heading.uuid) ?? [],
|
|
@@ -164,15 +197,53 @@ export function projectView(db, uuid, now, filter = {}, zone) {
|
|
|
164
197
|
g.scheduled.length > 0 ||
|
|
165
198
|
g.someday.length > 0 ||
|
|
166
199
|
g.repeating.length > 0);
|
|
200
|
+
// The logged-region archived-heading groups, in project (heading index) order;
|
|
201
|
+
// each group's children most-recently-completed first (open odd children, with
|
|
202
|
+
// no stopDate, sort last — the same null-last convention the flat logged list
|
|
203
|
+
// uses). Under a content scope (--overdue / --tag) an empty group collapses.
|
|
204
|
+
const loggedHeadings = sweptHeadings
|
|
205
|
+
.map((heading) => ({
|
|
206
|
+
heading,
|
|
207
|
+
items: (sweptHeadingChildren.get(heading.uuid) ?? []).toSorted((a, b) => (b.stopped?.getTime() ?? 0) - (a.stopped?.getTime() ?? 0)),
|
|
208
|
+
}))
|
|
209
|
+
.filter((g) => !contentScoped || g.items.length > 0);
|
|
210
|
+
// Read-shape v2 wire containers (PR 2): partition EVERY child by its heading
|
|
211
|
+
// membership, preserving the `index`-order fetch. A child whose heading FK is
|
|
212
|
+
// not one of THIS project's headings (an unknown/trashed heading, or none) falls
|
|
213
|
+
// back to the un-headed BODY — mirroring the render's loose fallback. Each
|
|
214
|
+
// container's children (live AND swept/logged alike) are bucketed by DERIVED
|
|
215
|
+
// STAGE at the wire boundary (src/read/shape.ts) — logged → its per-container
|
|
216
|
+
// `logbook`, the rest into `anytime`/`upcoming`/`someday` — so one entity lands
|
|
217
|
+
// in exactly one place (R5 / #V12). Built from the SAME `todos` (already
|
|
218
|
+
// `headingProject`-stamped above), so the wire and the render buckets never drift.
|
|
219
|
+
const knownHeadingSet = new Set(headings.map((h) => h.uuid));
|
|
220
|
+
const bodyChildren = [];
|
|
221
|
+
const headingChildren = new Map();
|
|
222
|
+
for (const { row, todo } of todos) {
|
|
223
|
+
const hUuid = row.heading;
|
|
224
|
+
if (hUuid !== null && knownHeadingSet.has(hUuid))
|
|
225
|
+
pushInto(headingChildren, hUuid, todo);
|
|
226
|
+
else
|
|
227
|
+
bodyChildren.push(todo);
|
|
228
|
+
}
|
|
229
|
+
// Every heading in `index` order, ALL lifecycle classes (R5). Under a content
|
|
230
|
+
// scope an emptied heading collapses (matching the live/logged render groups).
|
|
231
|
+
const headingContainers = headings
|
|
232
|
+
.map((heading) => ({ heading, children: headingChildren.get(heading.uuid) ?? [] }))
|
|
233
|
+
.filter((c) => !contentScoped || c.children.length > 0);
|
|
167
234
|
return {
|
|
168
235
|
project,
|
|
236
|
+
bodyChildren,
|
|
237
|
+
headingContainers,
|
|
169
238
|
active,
|
|
170
239
|
headings: headingGroups,
|
|
171
240
|
scheduled,
|
|
172
241
|
someday,
|
|
173
242
|
repeating,
|
|
174
243
|
logged,
|
|
244
|
+
loggedHeadings,
|
|
175
245
|
openChildrenWhileResolved: project.status === "open" ? 0 : openChildren,
|
|
246
|
+
openChildrenUnderArchivedHeading,
|
|
176
247
|
};
|
|
177
248
|
}
|
|
178
249
|
//# sourceMappingURL=project-view.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-view.js","sourceRoot":"","sources":["../../src/read/project-view.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEnF,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAgB,MAAM,qBAAqB,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAClG,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAmB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"project-view.js","sourceRoot":"","sources":["../../src/read/project-view.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEnF,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAgB,MAAM,qBAAqB,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,eAAe,EA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C;IAC7D,MAAM,YAAY,GAAW,EAAE,CAAC;IAChC,MAAM,eAAe,GAAG,IAAI,GAAG,EAAkB,CAAC;IAClD,KAAK,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,KAAK,EAAE,CAAC;QAClC,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC;QAC1B,IAAI,KAAK,KAAK,IAAI,IAAI,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC;YAAE,QAAQ,CAAC,eAAe,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;;YACpF,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IACD,8EAA8E;IAC9E,+EAA+E;IAC/E,MAAM,iBAAiB,GAA8B,QAAQ;SAC1D,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;SAClF,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,aAAa,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAE1D,OAAO;QACL,OAAO;QACP,YAAY;QACZ,iBAAiB;QACjB,MAAM;QACN,QAAQ,EAAE,aAAa;QACvB,SAAS;QACT,OAAO;QACP,SAAS;QACT,MAAM;QACN,cAAc;QACd,yBAAyB,EAAE,OAAO,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY;QACvE,gCAAgC;KACjC,CAAC;AACJ,CAAC"}
|
package/dist/read/queries.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import type { DatabaseSync } from "node:sqlite";
|
|
6
6
|
import { type Ref } from "../model/entities.ts";
|
|
7
7
|
import type { ChecklistRow, TaskRow } from "../model/mappers.ts";
|
|
8
|
-
import { type CandidateRef } from "./shape.ts";
|
|
8
|
+
import { type CandidateRef, type RefKind, type RefPromoter } from "./shape.ts";
|
|
9
9
|
/** Rows that repeat via a template are normal; template rows are invisible in list views. */
|
|
10
10
|
export declare const NOT_TEMPLATE = "(t.rt1_recurrenceRule IS NULL AND t.repeater IS NULL)";
|
|
11
11
|
/**
|
|
@@ -129,6 +129,9 @@ export declare function resolveTaskUuidPrefix(db: DatabaseSync, refRaw: string,
|
|
|
129
129
|
* docs/design/reference-resolution.md.
|
|
130
130
|
*/
|
|
131
131
|
export declare function normalizeNameKey(s: string): string;
|
|
132
|
+
/** The fused TTY ref form `Title [8charPrefix]` — the round-trippable decorated ref every candidate renders. */
|
|
133
|
+
export declare const REF_PREFIX_LEN = 8;
|
|
134
|
+
export declare function fusedRef(title: string, uuid: string): string;
|
|
132
135
|
export interface NamedResolution {
|
|
133
136
|
resolved: {
|
|
134
137
|
uuid: string;
|
|
@@ -206,10 +209,49 @@ export declare function resolveProjectWriteTarget(db: DatabaseSync, refRaw: stri
|
|
|
206
209
|
};
|
|
207
210
|
}, includeTrashed?: boolean, includeNonOpen?: boolean): string;
|
|
208
211
|
export declare function resolveTagUuid(db: DatabaseSync, ref: string): string;
|
|
212
|
+
/** Options shared by the read-side project resolvers (a name-tier narrowing subset). */
|
|
213
|
+
interface ReadProjectOptions {
|
|
214
|
+
prefixTier?: boolean;
|
|
215
|
+
scopeWhere?: string;
|
|
216
|
+
scopeBinds?: (string | number)[];
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* A read-side PROJECT NAME resolution verdict under the liveness law (never
|
|
220
|
+
* throws) — the shared core behind the throwing {@link resolveProjectUuid}
|
|
221
|
+
* (`project show`) and the cross-kind {@link classifyShowTarget} router.
|
|
222
|
+
*
|
|
223
|
+
* The uuid / partial-uuid tiers reach EVERY project row (explicit intent stays
|
|
224
|
+
* able to view a trashed project by id); the NAME tiers resolve against LIVE
|
|
225
|
+
* (untrashed) rows only, so a dead twin never shadows a live one nor inflates
|
|
226
|
+
* an ambiguity count. When the live pool is empty, the TRASHED pool is consulted
|
|
227
|
+
* for the reads-only ergonomic fallback: a UNIQUELY-named trashed project still
|
|
228
|
+
* resolves by name (the render discloses it — the card's own `(trashed)` marker
|
|
229
|
+
* / `stage: "trash"`), while several dead twins report honestly instead.
|
|
230
|
+
*/
|
|
231
|
+
export interface ReadProjectVerdict {
|
|
232
|
+
/** The resolved winner — a live unique, a uuid/partial-uuid, or the unique-dead fallback; else null. */
|
|
233
|
+
resolved: {
|
|
234
|
+
uuid: string;
|
|
235
|
+
title: string;
|
|
236
|
+
} | null;
|
|
237
|
+
/** ALL live name-matching rows at the deciding tier (0, 1, or many). */
|
|
238
|
+
liveRows: {
|
|
239
|
+
uuid: string;
|
|
240
|
+
title: string;
|
|
241
|
+
}[];
|
|
242
|
+
/** 0 / 1 / >1 — the LIVE match count (the ambiguity count when > 1). */
|
|
243
|
+
liveMatches: number;
|
|
244
|
+
/** Count of TRASHED-name twins — feeds the disclosure tail / dead-hint. */
|
|
245
|
+
trashedMatches: number;
|
|
246
|
+
}
|
|
247
|
+
export declare function readProjectNameVerdict(db: DatabaseSync, ref: string, options?: ReadProjectOptions): ReadProjectVerdict;
|
|
209
248
|
/**
|
|
210
249
|
* Write destinations stay strict (a trashed project is not a valid target);
|
|
211
250
|
* READ surfaces pass `trashed: true` so a project in the Trash can still be
|
|
212
|
-
* viewed
|
|
251
|
+
* viewed. Under `trashed: true` the read-side liveness law applies: an explicit
|
|
252
|
+
* uuid / partial-uuid reaches any project, but a NAME resolves against LIVE rows
|
|
253
|
+
* only (a dead same-name twin never shadows a live one), with the reads-only
|
|
254
|
+
* unique-dead fallback + trash disclosure ({@link readProjectNameVerdict}).
|
|
213
255
|
*/
|
|
214
256
|
export declare function resolveProjectUuid(db: DatabaseSync, ref: string, options?: {
|
|
215
257
|
trashed?: boolean;
|
|
@@ -217,6 +259,14 @@ export declare function resolveProjectUuid(db: DatabaseSync, ref: string, option
|
|
|
217
259
|
scopeWhere?: string;
|
|
218
260
|
scopeBinds?: (string | number)[];
|
|
219
261
|
}): string;
|
|
262
|
+
/**
|
|
263
|
+
* The disclosure tail appended to a read-side project ambiguity when the
|
|
264
|
+
* uuid-reachable pool holds additional TRASHED twins of the ambiguous name. The
|
|
265
|
+
* ambiguity COUNT stays over live rows (coherent with the rendered candidate
|
|
266
|
+
* list); the dead ones are disclosed separately rather than inflating it. Empty
|
|
267
|
+
* when none are trashed.
|
|
268
|
+
*/
|
|
269
|
+
export declare function trashDisclosureTail(deadCount: number): string;
|
|
220
270
|
export declare function resolveAreaUuid(db: DatabaseSync, ref: string, options?: {
|
|
221
271
|
prefixTier?: boolean;
|
|
222
272
|
scopeWhere?: string;
|
|
@@ -245,6 +295,24 @@ export declare function resolveHeadingUuid(db: DatabaseSync, projectUuid: string
|
|
|
245
295
|
uuid: string;
|
|
246
296
|
title: string;
|
|
247
297
|
};
|
|
298
|
+
/**
|
|
299
|
+
* Does a container ref's bare TITLE round-trip through its own resolver, in its
|
|
300
|
+
* own scope, back to THIS entity's uuid? The single predicate the emit boundary
|
|
301
|
+
* consults for the JSON round-trip law — true only when the sole resolution is
|
|
302
|
+
* `entityUuid` (not-found / ambiguous / a different entity all → false, i.e. the
|
|
303
|
+
* title must promote its uuid sibling). See {@link resolveTitleForRoundTrip}.
|
|
304
|
+
*/
|
|
305
|
+
export declare function titleRoundTrips(db: DatabaseSync, kind: RefKind, title: string, entityUuid: string, projectUuid?: string): boolean;
|
|
306
|
+
/**
|
|
307
|
+
* Build the {@link RefPromoter} the read-shaping transform ({@link shapeReadPayload})
|
|
308
|
+
* consults to decide flat-ref uuid promotion, memoized per (kind, title, scope)
|
|
309
|
+
* for ONE response emission so a large view never re-runs a resolution it has
|
|
310
|
+
* already made. A fresh promoter (fresh memo) per response — the consumer
|
|
311
|
+
* surfaces build one via the client. The memo caches the RESOLVED uuid (or null),
|
|
312
|
+
* independent of the comparison target, so twin entities sharing a title share
|
|
313
|
+
* the one resolution.
|
|
314
|
+
*/
|
|
315
|
+
export declare function makeRefPromoter(db: DatabaseSync): RefPromoter;
|
|
248
316
|
/**
|
|
249
317
|
* A row's EFFECTIVE area: its own `area` link, else the area of its project,
|
|
250
318
|
* else the area of its heading's project. To-dos nested in a project (or under a
|
|
@@ -323,3 +391,4 @@ export declare function fetchTagsForTasks(db: DatabaseSync, taskUuids: string[])
|
|
|
323
391
|
export declare function makeHeadingProjectResolver(db: DatabaseSync): (headingUuid: string) => Ref | null;
|
|
324
392
|
/** Lazy uuid -> Ref resolver over TMTask + TMArea titles, cached per instance. */
|
|
325
393
|
export declare function makeRefResolver(db: DatabaseSync): (uuid: string | null) => Ref | null;
|
|
394
|
+
export {};
|