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.
Files changed (141) hide show
  1. package/README.md +2 -2
  2. package/dist/cli/canonical-ref.d.ts +21 -0
  3. package/dist/cli/canonical-ref.js +23 -0
  4. package/dist/cli/canonical-ref.js.map +1 -0
  5. package/dist/cli/commands/area.d.ts +5 -5
  6. package/dist/cli/commands/area.js +39 -18
  7. package/dist/cli/commands/area.js.map +1 -1
  8. package/dist/cli/commands/install-skill.d.ts +2 -2
  9. package/dist/cli/commands/install-skill.js +29 -0
  10. package/dist/cli/commands/install-skill.js.map +1 -1
  11. package/dist/cli/commands/mcp.js +12 -1
  12. package/dist/cli/commands/mcp.js.map +1 -1
  13. package/dist/cli/commands/project.js +74 -22
  14. package/dist/cli/commands/project.js.map +1 -1
  15. package/dist/cli/commands/reads.d.ts +5 -1
  16. package/dist/cli/commands/reads.js +31 -15
  17. package/dist/cli/commands/reads.js.map +1 -1
  18. package/dist/cli/commands/setup.js +11 -4
  19. package/dist/cli/commands/setup.js.map +1 -1
  20. package/dist/cli/commands/show.js +51 -32
  21. package/dist/cli/commands/show.js.map +1 -1
  22. package/dist/cli/commands/todo.js +2 -2
  23. package/dist/cli/commands/todo.js.map +1 -1
  24. package/dist/cli/commands/writes.js +138 -67
  25. package/dist/cli/commands/writes.js.map +1 -1
  26. package/dist/cli/did-you-mean.js +19 -5
  27. package/dist/cli/did-you-mean.js.map +1 -1
  28. package/dist/cli/dry-run.d.ts +55 -0
  29. package/dist/cli/dry-run.js +92 -0
  30. package/dist/cli/dry-run.js.map +1 -0
  31. package/dist/cli/glyphs.d.ts +9 -2
  32. package/dist/cli/glyphs.js +11 -5
  33. package/dist/cli/glyphs.js.map +1 -1
  34. package/dist/cli/help.js +7 -6
  35. package/dist/cli/help.js.map +1 -1
  36. package/dist/cli/main.js +7 -0
  37. package/dist/cli/main.js.map +1 -1
  38. package/dist/cli/read-driver.d.ts +47 -7
  39. package/dist/cli/read-driver.js +43 -21
  40. package/dist/cli/read-driver.js.map +1 -1
  41. package/dist/cli/ref-render.d.ts +14 -0
  42. package/dist/cli/ref-render.js +9 -0
  43. package/dist/cli/ref-render.js.map +1 -0
  44. package/dist/cli/render.d.ts +39 -25
  45. package/dist/cli/render.js +102 -62
  46. package/dist/cli/render.js.map +1 -1
  47. package/dist/cli/resolve-invocation.d.ts +5 -3
  48. package/dist/cli/resolve-invocation.js +13 -4
  49. package/dist/cli/resolve-invocation.js.map +1 -1
  50. package/dist/client.d.ts +100 -32
  51. package/dist/client.js +63 -19
  52. package/dist/client.js.map +1 -1
  53. package/dist/contracts.d.ts +34 -33
  54. package/dist/contracts.js +1 -1
  55. package/dist/contracts.js.map +1 -1
  56. package/dist/db/baselines/db-v26.js +4 -1
  57. package/dist/db/baselines/db-v26.js.map +1 -1
  58. package/dist/index.d.ts +8 -5
  59. package/dist/index.js +9 -2
  60. package/dist/index.js.map +1 -1
  61. package/dist/mcp/server.js +192 -139
  62. package/dist/mcp/server.js.map +1 -1
  63. package/dist/model/dates.d.ts +26 -0
  64. package/dist/model/dates.js +46 -4
  65. package/dist/model/dates.js.map +1 -1
  66. package/dist/model/entities.d.ts +11 -1
  67. package/dist/model/entities.js.map +1 -1
  68. package/dist/model/mappers.js +3 -0
  69. package/dist/model/mappers.js.map +1 -1
  70. package/dist/model/serialize.js +15 -3
  71. package/dist/model/serialize.js.map +1 -1
  72. package/dist/read/area-filter.d.ts +2 -2
  73. package/dist/read/area-filter.js +3 -3
  74. package/dist/read/area-filter.js.map +1 -1
  75. package/dist/read/project-view.d.ts +76 -1
  76. package/dist/read/project-view.js +80 -9
  77. package/dist/read/project-view.js.map +1 -1
  78. package/dist/read/queries.d.ts +71 -2
  79. package/dist/read/queries.js +199 -10
  80. package/dist/read/queries.js.map +1 -1
  81. package/dist/read/scope.d.ts +2 -2
  82. package/dist/read/scope.js +3 -3
  83. package/dist/read/scope.js.map +1 -1
  84. package/dist/read/shape.d.ts +87 -9
  85. package/dist/read/shape.js +483 -124
  86. package/dist/read/shape.js.map +1 -1
  87. package/dist/read/show-target.js +52 -33
  88. package/dist/read/show-target.js.map +1 -1
  89. package/dist/read/truncation.d.ts +73 -7
  90. package/dist/read/truncation.js +62 -29
  91. package/dist/read/truncation.js.map +1 -1
  92. package/dist/read/views.d.ts +20 -7
  93. package/dist/read/views.js +7 -7
  94. package/dist/read/views.js.map +1 -1
  95. package/dist/surface-copy.d.ts +13 -0
  96. package/dist/surface-copy.js +13 -0
  97. package/dist/surface-copy.js.map +1 -1
  98. package/dist/write/batch.js +0 -1
  99. package/dist/write/batch.js.map +1 -1
  100. package/dist/write/commands.d.ts +25 -1
  101. package/dist/write/commands.js +259 -122
  102. package/dist/write/commands.js.map +1 -1
  103. package/dist/write/guards.js +27 -11
  104. package/dist/write/guards.js.map +1 -1
  105. package/dist/write/move.d.ts +34 -9
  106. package/dist/write/move.js +730 -78
  107. package/dist/write/move.js.map +1 -1
  108. package/dist/write/operations.d.ts +50 -20
  109. package/dist/write/operations.js +2 -2
  110. package/dist/write/operations.js.map +1 -1
  111. package/dist/write/pipeline.js +25 -4
  112. package/dist/write/pipeline.js.map +1 -1
  113. package/dist/write/pre-state.d.ts +58 -28
  114. package/dist/write/pre-state.js +247 -49
  115. package/dist/write/pre-state.js.map +1 -1
  116. package/dist/write/reorder.js +266 -32
  117. package/dist/write/reorder.js.map +1 -1
  118. package/dist/write/resolution-timestamps.d.ts +34 -0
  119. package/dist/write/resolution-timestamps.js +286 -0
  120. package/dist/write/resolution-timestamps.js.map +1 -0
  121. package/dist/write/reversibility.js +5 -5
  122. package/dist/write/reversibility.js.map +1 -1
  123. package/dist/write/scope-guard.js +0 -5
  124. package/dist/write/scope-guard.js.map +1 -1
  125. package/dist/write/undo.d.ts +0 -6
  126. package/dist/write/undo.js +44 -4
  127. package/dist/write/undo.js.map +1 -1
  128. package/dist/write/vectors/applescript.js +14 -4
  129. package/dist/write/vectors/applescript.js.map +1 -1
  130. package/dist/write/vectors/url-scheme.js +0 -8
  131. package/dist/write/vectors/url-scheme.js.map +1 -1
  132. package/dist/write/verify/delta.d.ts +16 -2
  133. package/dist/write/verify/delta.js +21 -2
  134. package/dist/write/verify/delta.js.map +1 -1
  135. package/package.json +1 -1
  136. package/schema/envelope.schema.json +16 -78
  137. package/skills/things-cli/SKILL.md +10 -6
  138. package/skills/things-cli/references/contracts.md +3 -2
  139. package/skills/things-cli/references/errors.md +9 -1
  140. package/skills/things-cli/references/model.md +9 -7
  141. package/skills/things-cli/references/ordering.md +36 -10
@@ -13,7 +13,7 @@ export declare const API_VERSION = 1;
13
13
  * Package version, surfaced by `things --version` and the MCP serverInfo.
14
14
  * Kept in lockstep with package.json by a contract test.
15
15
  */
16
- export declare const PKG_VERSION = "0.12.0";
16
+ export declare const PKG_VERSION = "0.14.0";
17
17
  /**
18
18
  * Stable exit-code contract for the `things` CLI (mirrored by MCP error
19
19
  * codes). Part of the public API surface consumed by agents and scripts —
@@ -38,18 +38,6 @@ export declare const ExitCode: {
38
38
  readonly Environment: 7;
39
39
  };
40
40
  export type ExitCode = (typeof ExitCode)[keyof typeof ExitCode];
41
- /**
42
- * Per-section counts for a SPLIT flat view — currently only `today`'s
43
- * Today / This-Evening split. One entry per section IN RENDER ORDER, each
44
- * reporting the rows `shown` of the `total` that matched after all filters.
45
- * Lets a renderer keep a downstream section (This Evening) honest under a
46
- * single global cap without a pre-truncation copy of the view.
47
- */
48
- export interface SectionCount {
49
- key: "today" | "evening";
50
- shown: number;
51
- total: number;
52
- }
53
41
  /**
54
42
  * The single truncation-metadata shape for every read (the `meta.truncation`
55
43
  * field). `shown` items were returned of `total` that matched after all
@@ -59,31 +47,31 @@ export interface SectionCount {
59
47
  * (`shown < total`, or any block hid rows). The dropped remainder is
60
48
  * `total - shown`.
61
49
  *
62
- * Two optional per-shape breakdowns hang off it: `sections` for a split flat
63
- * view (the Today split — per render-section shown/total), and `blocks` for a
64
- * grouped view (anytime/someday/`area show` the identity-carrying per-block
65
- * nesting). Exactly one of them is present on the shapes that have it; both are
66
- * absent on a plain flat view.
50
+ * This is the WHOLE-VIEW rollup only. Per-bucket completeness rides INLINE on the
51
+ * data records (read-shape v2 R1): each `children`/`sections`/`projects` bucket
52
+ * carries its own `total`, present iff it was capped. The pre-v2 `blocks[]`
53
+ * descriptor-join sidecar is RETIRED from the wire entirely (doctrine v2 PR 5) —
54
+ * the per-block detail the TTY renderers need is internal render plumbing
55
+ * ({@link GroupBlock}), never serialized.
67
56
  */
68
57
  export interface Truncation {
69
58
  shown: number;
70
59
  total: number;
71
60
  limit: number | null;
72
61
  truncated: boolean;
73
- /** Per-section shown/total breakdown for a split flat view (Today); absent otherwise. */
74
- sections?: SectionCount[];
75
- /** Per-block nesting for a grouped view (anytime/someday/area card); absent otherwise. */
76
- blocks?: GroupBlock[];
77
62
  }
78
63
  /**
79
64
  * One identity-carrying block of a grouped catalogue (anytime/someday) or a
80
- * sectioned detail view (`area show`). Every header/section is always rendered;
81
- * only the innermost item lists are capped. Emitted for every block that has
82
- * rows to cap (`total > 0`) including a block whose rows were ALL dropped
83
- * (`shown: 0`), so no truncated header is untraceable. A block with no
84
- * cappable rows of its own (`total: 0`) is omitted UNLESS it wraps truncated
85
- * `children` an area whose only capped content is its project item-lists
86
- * still appears as their container.
65
+ * sectioned detail view (`area show`) INTERNAL render plumbing only, NEVER on
66
+ * the wire (the `blocks[]` truncation sidecar retired in doctrine v2 PR 5; each
67
+ * bucket's completeness now rides its inline `total`, R1). The grouped renderers
68
+ * consume these to draw per-block "… N more" drill-down footers. Every
69
+ * header/section is always rendered; only the innermost item lists are capped.
70
+ * Emitted for every block that has rows to cap (`total > 0`) — including a block
71
+ * whose rows were ALL dropped (`shown: 0`), so no truncated header is
72
+ * untraceable. A block with no cappable rows of its own (`total: 0`) is omitted
73
+ * UNLESS it wraps truncated `children` — an area whose only capped content is its
74
+ * project item-lists still appears as their container.
87
75
  *
88
76
  * Blocks are NESTED: an area/loose block carries its project blocks in
89
77
  * `children` — in anytime the project item-lists inside the area, in someday
@@ -119,10 +107,12 @@ export interface EnvelopeMeta {
119
107
  /** Wall-clock duration of the command in milliseconds. */
120
108
  elapsedMs: number;
121
109
  /**
122
- * The read's completeness metadata (the single truncation shape). Present on
123
- * any read that could drop rows — flat views (row `limit`), the Today split
124
- * (`sections`), and grouped views (anytime/someday/`area show`, `blocks`).
125
- * `meta.truncation.truncated` is the universal "did I see everything" check.
110
+ * The read's completeness metadata (the single truncation shape) the
111
+ * WHOLE-VIEW rollup. Present on any read that could drop rows — flat views (row
112
+ * `limit`), the `today` view, and grouped views (anytime/someday/`area show`).
113
+ * Per-bucket completeness rides INLINE on the data records' own `total` (R1),
114
+ * never on this envelope. `meta.truncation.truncated` is the universal "did I
115
+ * see everything" check.
126
116
  */
127
117
  truncation?: Truncation;
128
118
  /**
@@ -160,6 +150,17 @@ export interface EnvelopeMeta {
160
150
  title: string;
161
151
  };
162
152
  };
153
+ /**
154
+ * Whole-view aggregate counts (ADDITIVE). Present ONLY on the `today` view: the
155
+ * app's sidebar count split — `dueOrOverdue` (open members whose deadline is
156
+ * due or overdue) vs. `other` (the rest). A convenience aggregate an agent
157
+ * would otherwise recompute over the rows; it lives here so `data` stays pure
158
+ * domain rows. Both counts are OPEN members only, and a `0` is meaningful.
159
+ */
160
+ counts?: {
161
+ dueOrOverdue: number;
162
+ other: number;
163
+ };
163
164
  /**
164
165
  * The active container scope this response was jailed to (ADDITIVE). Present
165
166
  * ONLY when a scope is in force (the MCP `--scope` flag / `THINGS_API_SCOPE` /
package/dist/contracts.js CHANGED
@@ -13,7 +13,7 @@ export const API_VERSION = 1;
13
13
  * Package version, surfaced by `things --version` and the MCP serverInfo.
14
14
  * Kept in lockstep with package.json by a contract test.
15
15
  */
16
- export const PKG_VERSION = "0.12.0";
16
+ export const PKG_VERSION = "0.14.0";
17
17
  /**
18
18
  * Stable exit-code contract for the `things` CLI (mirrored by MCP error
19
19
  * codes). Part of the public API surface consumed by agents and scripts —
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC;AAE7B;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC;AAEpC;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,eAAe;IACf,EAAE,EAAE,CAAC;IACL,4DAA4D;IAC5D,UAAU,EAAE,CAAC;IACb,kEAAkE;IAClE,KAAK,EAAE,CAAC;IACR,uGAAuG;IACvG,YAAY,EAAE,CAAC;IACf,wFAAwF;IACxF,OAAO,EAAE,CAAC;IACV,gGAAgG;IAChG,YAAY,EAAE,CAAC;IACf,6DAA6D;IAC7D,WAAW,EAAE,CAAC;IACd,kFAAkF;IAClF,WAAW,EAAE,CAAC;CACN,CAAC;AAmUX,MAAM,UAAU,UAAU,CAAI,IAAY,EAAE,IAAO,EAAE,IAAkB;IACrE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAA6B,EAAE,IAAkB;IAC7E,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC5E,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,gBAAgB,CAA6B,EAAK;IAChE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,CAAC;IACpC,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CAAC,OAA4C;IACtE,OAAO,WAAW,OAAO,CAAC,MAAM,IAAI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E,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IACnD,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,IAAI,CAAC,CAAC,MAAM,KAAK,OAAO,CAAC,EAAE,CAAC;QACvE,OAAO,QAAQ,CAAC,YAAY,CAAC;IAC/B,CAAC;IACD,IAAI,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC;QAAE,OAAO,QAAQ,CAAC,OAAO,CAAC;IAClD,IAAI,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC;QAAE,OAAO,QAAQ,CAAC,WAAW,CAAC;IAC1D,OAAO,QAAQ,CAAC,YAAY,CAAC;AAC/B,CAAC"}
@@ -13,6 +13,9 @@ export const DB_V26 = {
13
13
  // deadlineSuppressionDate):
14
14
  // sha256:5526059b10ffffe1b67f796d031857d030403bd5b747374646a2803a55c0e5c3
15
15
  fingerprint: "sha256:784bd2f6533e6f85e053b0ec68958083d4ebca11c152ad1d2935178240d4c52b",
16
- knownThingsAppVersions: ["3.22.11"],
16
+ // Things 3.22.12 (build 32212016) ships the IDENTICAL DB v26 schema (fingerprint
17
+ // byte-identical) and an identical Things.sdef — a behavioral-only update, re-certified
18
+ // 2026-08-03 against golden-v2 (drift-runbook step 3; assumption-register *Confirmed under*).
19
+ knownThingsAppVersions: ["3.22.11", "3.22.12"],
17
20
  };
18
21
  //# sourceMappingURL=db-v26.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"db-v26.js","sourceRoot":"","sources":["../../../src/db/baselines/db-v26.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,MAAM,GAAa;IAC9B,eAAe,EAAE,EAAE;IACnB,oEAAoE;IACpE,0EAA0E;IAC1E,yEAAyE;IACzE,kEAAkE;IAClE,4BAA4B;IAC5B,4EAA4E;IAC5E,WAAW,EAAE,yEAAyE;IACtF,sBAAsB,EAAE,CAAC,SAAS,CAAC;CACpC,CAAC"}
1
+ {"version":3,"file":"db-v26.js","sourceRoot":"","sources":["../../../src/db/baselines/db-v26.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,MAAM,GAAa;IAC9B,eAAe,EAAE,EAAE;IACnB,oEAAoE;IACpE,0EAA0E;IAC1E,yEAAyE;IACzE,kEAAkE;IAClE,4BAA4B;IAC5B,4EAA4E;IAC5E,WAAW,EAAE,yEAAyE;IACtF,iFAAiF;IACjF,wFAAwF;IACxF,8FAA8F;IAC9F,sBAAsB,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;CAC/C,CAAC"}
package/dist/index.d.ts CHANGED
@@ -6,8 +6,9 @@
6
6
  * See docs/design/architecture.md.
7
7
  */
8
8
  export { openThings } from "./client.ts";
9
- export type { BoundedAreaView, BoundedList, BoundedSectionsView, BoundedTodayView, GroupedBound, ListBound, OpenOptions, ThingsClient, } from "./client.ts";
10
- export type { Truncation, GroupBlock, SectionCount } from "./contracts.ts";
9
+ export type { BoundedAreaView, BoundedList, BoundedSectionsView, BoundedTodayView, BoundedUpcomingList, GroupedBound, ListBound, OpenOptions, ThingsClient, } from "./client.ts";
10
+ export type { Truncation, GroupBlock } from "./contracts.ts";
11
+ export type { TodayBucketTotals, AreaBucketTotals, SectionTotals, UpcomingBlockTotals, } from "./read/truncation.ts";
11
12
  export { diagnose } from "./diagnose.ts";
12
13
  export type { DiagnoseOptions, DiagnoseReport, DiagnoseResult } from "./diagnose.ts";
13
14
  export { probeAutomation } from "./write/automation-probe.ts";
@@ -53,7 +54,7 @@ export { isLooseRef, looseShadowNotice, LOOSE_OPEN_REFUSAL, LOOSE_REF, LOOSE_TO_
53
54
  export type { AreaFilterTarget, AreaScopedRead, ViewFilterMeta } from "./read/area-filter.ts";
54
55
  export { ReferenceResolutionError } from "./read/queries.ts";
55
56
  export { candidateRef, CANDIDATE_CAP } from "./read/shape.ts";
56
- export type { CandidateRef, CandidateType } from "./read/shape.ts";
57
+ export type { CandidateRef, CandidateType, RefKind, RefPromoter } from "./read/shape.ts";
57
58
  export { ScopeResolutionError } from "./read/scope.ts";
58
59
  export type { ResolvedScope, ScopeMeta, ScopeSource } from "./read/scope.ts";
59
60
  export { splitWhenSugar, CLI_WHEN_LABELS, MCP_WHEN_LABELS } from "./model/when-sugar.ts";
@@ -65,8 +66,10 @@ export { aggregateExitCode, API_VERSION, blockedCode, errorEnvelope, ExitCode, m
65
66
  export type { Envelope, EnvelopeMeta, ErrorCode, ErrorEnvelope, OkEnvelope, WireData, WireEnvelope, WireOkEnvelope, WireOkKind, } from "./contracts.ts";
66
67
  export * from "./surface-copy.ts";
67
68
  export { omitEmpty } from "./model/serialize.ts";
68
- export { shapeReadPayload } from "./read/shape.ts";
69
- export { localToday } from "./model/dates.ts";
69
+ export { shapeReadPayload, withTodayBucketTotals, withAreaBucketTotals, withSectionTotals, withUpcomingBlockTotals, } from "./read/shape.ts";
70
+ export { makeRefPromoter, titleRoundTrips } from "./read/queries.ts";
71
+ export { fusedRef, REF_PREFIX_LEN } from "./read/queries.ts";
72
+ export { instantDateIso, localToday } from "./model/dates.ts";
70
73
  export { templateStatus } from "./model/recurrence.ts";
71
74
  export { isTodayMember } from "./read/views.ts";
72
75
  export { entityProvisional, entityWhen } from "./read/stage.ts";
package/dist/index.js CHANGED
@@ -53,8 +53,15 @@ export { aggregateExitCode, API_VERSION, blockedCode, errorEnvelope, ExitCode, m
53
53
  export * from "./surface-copy.js";
54
54
  // Pure model/read helpers the presentation layers reuse.
55
55
  export { omitEmpty } from "./model/serialize.js";
56
- export { shapeReadPayload } from "./read/shape.js";
57
- export { localToday } from "./model/dates.js";
56
+ export { shapeReadPayload, withTodayBucketTotals, withAreaBucketTotals, withSectionTotals, withUpcomingBlockTotals, } from "./read/shape.js";
57
+ // The emit-side ref-promotion oracle for the JSON round-trip law: build one over
58
+ // the live DB (memoized per response) and hand it to shapeReadPayload; the
59
+ // consumer surfaces get theirs from `client.refPromoter()`.
60
+ export { makeRefPromoter, titleRoundTrips } from "./read/queries.js";
61
+ // The fused TTY ref form `Title [8charPrefix]` (round-trippable as a decorated
62
+ // input ref) the consumer surfaces render for every disambiguation candidate.
63
+ export { fusedRef, REF_PREFIX_LEN } from "./read/queries.js";
64
+ export { instantDateIso, localToday } from "./model/dates.js";
58
65
  export { templateStatus } from "./model/recurrence.js";
59
66
  export { isTodayMember } from "./read/views.js";
60
67
  // The single-source time-axis derivation the wire emit boundary and the TTY
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAYzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAM9D,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA2B1E,8EAA8E;AAC9E,gEAAgE;AAChE,mDAAmD;AACnD,OAAO,EACL,eAAe,EACf,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AAmCnC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAQ/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAsBpF,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,Y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