things-api 0.7.0 → 0.9.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 (154) hide show
  1. package/README.md +6 -3
  2. package/dist/cli/commands/area.d.ts +23 -0
  3. package/dist/cli/commands/area.js +164 -33
  4. package/dist/cli/commands/area.js.map +1 -1
  5. package/dist/cli/commands/project.d.ts +19 -0
  6. package/dist/cli/commands/project.js +142 -29
  7. package/dist/cli/commands/project.js.map +1 -1
  8. package/dist/cli/commands/reads.d.ts +10 -51
  9. package/dist/cli/commands/reads.js +454 -268
  10. package/dist/cli/commands/reads.js.map +1 -1
  11. package/dist/cli/commands/show.d.ts +9 -0
  12. package/dist/cli/commands/show.js +169 -0
  13. package/dist/cli/commands/show.js.map +1 -0
  14. package/dist/cli/commands/snapshot.js +1 -1
  15. package/dist/cli/commands/snapshot.js.map +1 -1
  16. package/dist/cli/commands/todo.d.ts +9 -0
  17. package/dist/cli/commands/todo.js +101 -16
  18. package/dist/cli/commands/todo.js.map +1 -1
  19. package/dist/cli/commands/writes.js +55 -1
  20. package/dist/cli/commands/writes.js.map +1 -1
  21. package/dist/cli/did-you-mean.d.ts +29 -0
  22. package/dist/cli/did-you-mean.js +53 -0
  23. package/dist/cli/did-you-mean.js.map +1 -0
  24. package/dist/cli/glyphs.d.ts +95 -0
  25. package/dist/cli/glyphs.js +282 -0
  26. package/dist/cli/glyphs.js.map +1 -0
  27. package/dist/cli/main.js +11 -1
  28. package/dist/cli/main.js.map +1 -1
  29. package/dist/cli/period.d.ts +32 -0
  30. package/dist/cli/period.js +129 -0
  31. package/dist/cli/period.js.map +1 -0
  32. package/dist/cli/read-driver.d.ts +76 -0
  33. package/dist/cli/read-driver.js +181 -0
  34. package/dist/cli/read-driver.js.map +1 -0
  35. package/dist/cli/render.d.ts +182 -0
  36. package/dist/cli/render.js +585 -0
  37. package/dist/cli/render.js.map +1 -0
  38. package/dist/cli/resolve-invocation.d.ts +78 -0
  39. package/dist/cli/resolve-invocation.js +178 -0
  40. package/dist/cli/resolve-invocation.js.map +1 -0
  41. package/dist/cli/shell-quote.d.ts +9 -0
  42. package/dist/cli/shell-quote.js +12 -0
  43. package/dist/cli/shell-quote.js.map +1 -0
  44. package/dist/cli/style.d.ts +5 -0
  45. package/dist/cli/style.js +5 -0
  46. package/dist/cli/style.js.map +1 -1
  47. package/dist/client.d.ts +45 -39
  48. package/dist/client.js +11 -74
  49. package/dist/client.js.map +1 -1
  50. package/dist/contracts.d.ts +66 -1
  51. package/dist/contracts.js +1 -1
  52. package/dist/contracts.js.map +1 -1
  53. package/dist/db/baselines/db-v26.js +7 -5
  54. package/dist/db/baselines/db-v26.js.map +1 -1
  55. package/dist/db/schema.d.ts +1 -1
  56. package/dist/db/schema.js +7 -1
  57. package/dist/db/schema.js.map +1 -1
  58. package/dist/mcp/server.js +227 -44
  59. package/dist/mcp/server.js.map +1 -1
  60. package/dist/model/entities.d.ts +21 -0
  61. package/dist/model/entities.js.map +1 -1
  62. package/dist/model/mappers.js +17 -1
  63. package/dist/model/mappers.js.map +1 -1
  64. package/dist/model/occurrences.d.ts +6 -1
  65. package/dist/model/occurrences.js +9 -2
  66. package/dist/model/occurrences.js.map +1 -1
  67. package/dist/model/recurrence.d.ts +30 -2
  68. package/dist/model/recurrence.js +20 -0
  69. package/dist/model/recurrence.js.map +1 -1
  70. package/dist/read/area-view.js +21 -5
  71. package/dist/read/area-view.js.map +1 -1
  72. package/dist/read/caps.d.ts +14 -0
  73. package/dist/read/caps.js +21 -0
  74. package/dist/read/caps.js.map +1 -0
  75. package/dist/read/detail.js +12 -2
  76. package/dist/read/detail.js.map +1 -1
  77. package/dist/read/log-boundary.d.ts +29 -0
  78. package/dist/read/log-boundary.js +38 -0
  79. package/dist/read/log-boundary.js.map +1 -0
  80. package/dist/read/pagination.d.ts +104 -0
  81. package/dist/read/pagination.js +208 -0
  82. package/dist/read/pagination.js.map +1 -0
  83. package/dist/read/predicates.d.ts +31 -0
  84. package/dist/read/predicates.js +48 -0
  85. package/dist/read/predicates.js.map +1 -0
  86. package/dist/read/project-view.js +28 -3
  87. package/dist/read/project-view.js.map +1 -1
  88. package/dist/read/queries.d.ts +21 -3
  89. package/dist/read/queries.js +35 -8
  90. package/dist/read/queries.js.map +1 -1
  91. package/dist/read/search-rank.d.ts +36 -0
  92. package/dist/read/search-rank.js +31 -0
  93. package/dist/read/search-rank.js.map +1 -0
  94. package/dist/read/show-target.d.ts +25 -0
  95. package/dist/read/show-target.js +41 -0
  96. package/dist/read/show-target.js.map +1 -0
  97. package/dist/read/sidebar-order.d.ts +19 -0
  98. package/dist/read/sidebar-order.js +92 -0
  99. package/dist/read/sidebar-order.js.map +1 -0
  100. package/dist/read/snapshot.js +2 -0
  101. package/dist/read/snapshot.js.map +1 -1
  102. package/dist/read/views.d.ts +64 -8
  103. package/dist/read/views.js +290 -155
  104. package/dist/read/views.js.map +1 -1
  105. package/dist/surface-copy.d.ts +23 -0
  106. package/dist/surface-copy.js +23 -0
  107. package/dist/surface-copy.js.map +1 -1
  108. package/dist/write/automation-probe.js +14 -6
  109. package/dist/write/automation-probe.js.map +1 -1
  110. package/dist/write/capabilities.d.ts +3 -0
  111. package/dist/write/capabilities.js +3 -0
  112. package/dist/write/capabilities.js.map +1 -1
  113. package/dist/write/checklist.d.ts +50 -0
  114. package/dist/write/checklist.js +61 -0
  115. package/dist/write/checklist.js.map +1 -0
  116. package/dist/write/clear-reminder.d.ts +3 -0
  117. package/dist/write/clear-reminder.js +205 -0
  118. package/dist/write/clear-reminder.js.map +1 -0
  119. package/dist/write/commands.js +122 -8
  120. package/dist/write/commands.js.map +1 -1
  121. package/dist/write/edit-checklist.d.ts +3 -0
  122. package/dist/write/edit-checklist.js +184 -0
  123. package/dist/write/edit-checklist.js.map +1 -0
  124. package/dist/write/failure-hints.d.ts +7 -0
  125. package/dist/write/failure-hints.js +25 -2
  126. package/dist/write/failure-hints.js.map +1 -1
  127. package/dist/write/guards.d.ts +1 -1
  128. package/dist/write/guards.js +16 -0
  129. package/dist/write/guards.js.map +1 -1
  130. package/dist/write/operations.d.ts +32 -1
  131. package/dist/write/operations.js +3 -0
  132. package/dist/write/operations.js.map +1 -1
  133. package/dist/write/pipeline.d.ts +3 -0
  134. package/dist/write/pipeline.js +23 -1
  135. package/dist/write/pipeline.js.map +1 -1
  136. package/dist/write/reversibility.d.ts +46 -0
  137. package/dist/write/reversibility.js +164 -0
  138. package/dist/write/reversibility.js.map +1 -0
  139. package/dist/write/undo.d.ts +29 -2
  140. package/dist/write/undo.js +357 -9
  141. package/dist/write/undo.js.map +1 -1
  142. package/dist/write/vectors/registry.js +2 -1
  143. package/dist/write/vectors/registry.js.map +1 -1
  144. package/dist/write/vectors/shortcuts.d.ts +9 -0
  145. package/dist/write/vectors/shortcuts.js +90 -0
  146. package/dist/write/vectors/shortcuts.js.map +1 -0
  147. package/dist/write/vectors/types.d.ts +11 -3
  148. package/dist/write/vectors/url-scheme.js +16 -0
  149. package/dist/write/vectors/url-scheme.js.map +1 -1
  150. package/dist/write/verify/delta.d.ts +1 -1
  151. package/dist/write/verify/delta.js +1 -1
  152. package/dist/write/verify/delta.js.map +1 -1
  153. package/package.json +1 -1
  154. package/shortcuts/things-proxy-find-items.shortcut +0 -0
@@ -1,56 +1,15 @@
1
1
  /**
2
- * Read-only list commands. Each renders a compact human table (UUIDs always
3
- * shown agents and humans both need stable references) or a --json envelope.
2
+ * Read-only list commands: option/description wiring per view, delegating to
3
+ * the read driver (../read-driver.ts) for envelope/output and to the pure
4
+ * renderers (../render.ts) for human lines. Each command renders a compact
5
+ * human table (UUIDs always shown — agents and humans both need stable
6
+ * references) or a --json envelope.
4
7
  */
5
- import type { Command } from "commander";
6
- import { type ThingsClient } from "../../client.ts";
7
- import { type ListItem, type SidebarSection } from "../../read/views.ts";
8
- interface GlobalReadOpts {
9
- json?: boolean;
10
- db?: string;
11
- }
12
- export declare function withClient(opts: GlobalReadOpts, kind: string, fn: (client: ThingsClient) => unknown, render: (data: never) => string[]): void;
13
- export interface FormatOpts {
14
- /**
15
- * Render a grouped project TITLE row: bold+underlined title, no type
16
- * marker — the styling carries the type (the GUI's project-header look).
17
- */
18
- projectTitle?: boolean;
19
- /** Container uuids already implied by surrounding output — their context suffix is dropped. */
20
- suppressProject?: string | null;
21
- suppressArea?: string | null;
22
- }
8
+ import { type Command } from "commander";
23
9
  /**
24
- * One item line: `<uuid-prefix> <marker> [meta …] <title> #tags (container)`.
25
- * Human output shows a SHORTENED uuid prefix (every command accepts unique
26
- * prefixes >= 6 chars); `uuidWidth` is the display length from
27
- * uuidDisplayWidth — never below 8 so a copied prefix stays unique across
28
- * the whole database, not just the rendered list. Tags follow the title
29
- * (`#`-prefixed, space-separated), mirroring the GUI. Exactly one space
30
- * separates every following token; meta tokens colorize on a TTY only
31
- * (../style.ts) — piped output stays plain. `--json` always carries full
32
- * uuids.
10
+ * Foreground the Things app on a resource via its share URI. A GUI action
11
+ * on this Mac NOT headless; the shared implementation behind every
12
+ * `open` command. Returns the URI it launched.
33
13
  */
34
- export declare function formatItem(item: ListItem, uuidWidth?: number, opts?: FormatOpts): string;
35
- /**
36
- * Display width for a list's uuid column: the shortest prefix that is
37
- * unique WITHIN the list, floored at UUID_DISPLAY_MIN (list-local
38
- * uniqueness at 2–3 chars would still collide database-wide).
39
- */
40
- export declare function uuidDisplayWidth(items: Array<{
41
- uuid: string;
42
- }>): number;
43
- /**
44
- * Sidebar-grouped views (anytime/someday), rendered the way the GUI reads:
45
- * the area-less block headerless first, then one `── <area> ──` header per
46
- * area; inside a section, loose to-dos first, then each project GROUP — a
47
- * blank line, the project's bold+underlined title row, then its members.
48
- * Container names implied by the grouping are not repeated on member rows
49
- * (an area header covers its rows; a project title row covers the to-dos
50
- * beneath it — a clustered child whose project row is absent, e.g. under a
51
- * tag filter, keeps its `(project)` suffix). `star` prefixes each item line
52
- * with the Today-membership star.
53
- */
54
- export declare function renderSections(sections: SidebarSection[], star?: boolean): string[];
14
+ export declare function openInThings(uuid: string): string;
55
15
  export declare function registerReadCommands(program: Command): void;
56
- export {};