things-api 0.19.3 → 0.20.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 (139) hide show
  1. package/README.md +1 -1
  2. package/deputy/prebuilt/Things API Helper.app/Contents/CodeResources +0 -0
  3. package/deputy/prebuilt/Things API Helper.app/Contents/Helpers/things-reader.app/Contents/MacOS/things-reader +0 -0
  4. package/deputy/prebuilt/Things API Helper.app/Contents/MacOS/things-deputy +0 -0
  5. package/dist/audit/schema.d.ts +42 -10
  6. package/dist/audit/schema.js +21 -0
  7. package/dist/audit/schema.js.map +1 -1
  8. package/dist/cli/commands/doctor.js +3 -1
  9. package/dist/cli/commands/doctor.js.map +1 -1
  10. package/dist/cli/commands/op-result.js +25 -7
  11. package/dist/cli/commands/op-result.js.map +1 -1
  12. package/dist/cli/commands/repeat-flags.d.ts +19 -1
  13. package/dist/cli/commands/repeat-flags.js +71 -0
  14. package/dist/cli/commands/repeat-flags.js.map +1 -1
  15. package/dist/cli/commands/rescue.d.ts +12 -0
  16. package/dist/cli/commands/rescue.js +83 -0
  17. package/dist/cli/commands/rescue.js.map +1 -0
  18. package/dist/cli/commands/writes.js +86 -32
  19. package/dist/cli/commands/writes.js.map +1 -1
  20. package/dist/cli/help.js +25 -25
  21. package/dist/cli/help.js.map +1 -1
  22. package/dist/cli/main.js +12 -2
  23. package/dist/cli/main.js.map +1 -1
  24. package/dist/cli/resolve-invocation.d.ts +9 -1
  25. package/dist/cli/resolve-invocation.js +71 -0
  26. package/dist/cli/resolve-invocation.js.map +1 -1
  27. package/dist/cli/unknown-command.d.ts +26 -0
  28. package/dist/cli/unknown-command.js +135 -0
  29. package/dist/cli/unknown-command.js.map +1 -0
  30. package/dist/contracts.d.ts +4 -3
  31. package/dist/contracts.js +1 -1
  32. package/dist/index.d.ts +4 -2
  33. package/dist/index.js +1 -0
  34. package/dist/index.js.map +1 -1
  35. package/dist/mcp/server.js +62 -10
  36. package/dist/mcp/server.js.map +1 -1
  37. package/dist/model/entities.d.ts +11 -0
  38. package/dist/model/entities.js.map +1 -1
  39. package/dist/model/mappers.js +15 -0
  40. package/dist/model/mappers.js.map +1 -1
  41. package/dist/op-result.d.ts +24 -2
  42. package/dist/op-result.js +77 -20
  43. package/dist/op-result.js.map +1 -1
  44. package/dist/process-instance.d.ts +41 -0
  45. package/dist/process-instance.js +82 -0
  46. package/dist/process-instance.js.map +1 -0
  47. package/dist/rescue.d.ts +247 -0
  48. package/dist/rescue.js +811 -0
  49. package/dist/rescue.js.map +1 -0
  50. package/dist/session-grant.js +4 -15
  51. package/dist/session-grant.js.map +1 -1
  52. package/dist/ui-state.d.ts +8 -4
  53. package/dist/ui-state.js +8 -4
  54. package/dist/ui-state.js.map +1 -1
  55. package/dist/write/batch.js +4 -1
  56. package/dist/write/batch.js.map +1 -1
  57. package/dist/write/clone.js +12 -6
  58. package/dist/write/clone.js.map +1 -1
  59. package/dist/write/commands.d.ts +9 -0
  60. package/dist/write/commands.js +135 -50
  61. package/dist/write/commands.js.map +1 -1
  62. package/dist/write/disclosures.d.ts +275 -0
  63. package/dist/write/disclosures.js +277 -0
  64. package/dist/write/disclosures.js.map +1 -0
  65. package/dist/write/experimental.d.ts +16 -0
  66. package/dist/write/experimental.js +19 -0
  67. package/dist/write/experimental.js.map +1 -1
  68. package/dist/write/failure-hints.js +3 -2
  69. package/dist/write/failure-hints.js.map +1 -1
  70. package/dist/write/guards.d.ts +1 -1
  71. package/dist/write/guards.js +102 -3
  72. package/dist/write/guards.js.map +1 -1
  73. package/dist/write/heading.js +4 -7
  74. package/dist/write/heading.js.map +1 -1
  75. package/dist/write/lock.d.ts +85 -1
  76. package/dist/write/lock.js +121 -6
  77. package/dist/write/lock.js.map +1 -1
  78. package/dist/write/make-repeating-project.js +2 -1
  79. package/dist/write/make-repeating-project.js.map +1 -1
  80. package/dist/write/operations.d.ts +52 -6
  81. package/dist/write/operations.js +22 -0
  82. package/dist/write/operations.js.map +1 -1
  83. package/dist/write/opid.d.ts +69 -8
  84. package/dist/write/opid.js +116 -20
  85. package/dist/write/opid.js.map +1 -1
  86. package/dist/write/param-schema.js +14 -2
  87. package/dist/write/param-schema.js.map +1 -1
  88. package/dist/write/pipeline.d.ts +82 -3
  89. package/dist/write/pipeline.js +204 -60
  90. package/dist/write/pipeline.js.map +1 -1
  91. package/dist/write/planner.d.ts +7 -0
  92. package/dist/write/planner.js +12 -0
  93. package/dist/write/planner.js.map +1 -1
  94. package/dist/write/preserve-modified.d.ts +17 -8
  95. package/dist/write/preserve-modified.js.map +1 -1
  96. package/dist/write/promote-clone.js +106 -53
  97. package/dist/write/promote-clone.js.map +1 -1
  98. package/dist/write/reorder.js +45 -39
  99. package/dist/write/reorder.js.map +1 -1
  100. package/dist/write/repeat-rule.d.ts +25 -1
  101. package/dist/write/repeat-rule.js +69 -0
  102. package/dist/write/repeat-rule.js.map +1 -1
  103. package/dist/write/resolution-timestamps.js +104 -78
  104. package/dist/write/resolution-timestamps.js.map +1 -1
  105. package/dist/write/reversibility.js +2 -2
  106. package/dist/write/reversibility.js.map +1 -1
  107. package/dist/write/spawn-expectation.d.ts +135 -0
  108. package/dist/write/spawn-expectation.js +237 -0
  109. package/dist/write/spawn-expectation.js.map +1 -0
  110. package/dist/write/template-mutation.js +34 -35
  111. package/dist/write/template-mutation.js.map +1 -1
  112. package/dist/write/undo.js +45 -5
  113. package/dist/write/undo.js.map +1 -1
  114. package/dist/write/vectors/simulator.js +48 -2
  115. package/dist/write/vectors/simulator.js.map +1 -1
  116. package/dist/write/vectors/types.d.ts +12 -0
  117. package/dist/write/vectors/ui-recipes.js +11 -1
  118. package/dist/write/vectors/ui-recipes.js.map +1 -1
  119. package/dist/write/vectors/ui-state.d.ts +64 -6
  120. package/dist/write/vectors/ui-state.js +91 -4
  121. package/dist/write/vectors/ui-state.js.map +1 -1
  122. package/dist/write/vectors/ui.d.ts +69 -3
  123. package/dist/write/vectors/ui.js +293 -146
  124. package/dist/write/vectors/ui.js.map +1 -1
  125. package/dist/write/vectors/url-scheme.js +26 -0
  126. package/dist/write/vectors/url-scheme.js.map +1 -1
  127. package/dist/write/verify/delta.d.ts +17 -2
  128. package/dist/write/verify/delta.js +46 -16
  129. package/dist/write/verify/delta.js.map +1 -1
  130. package/dist/write/verify/poller.d.ts +3 -2
  131. package/dist/write/verify/poller.js +3 -1
  132. package/dist/write/verify/poller.js.map +1 -1
  133. package/package.json +1 -1
  134. package/schema/envelope.schema.json +1 -2
  135. package/skills/things-cli/SKILL.md +4 -2
  136. package/skills/things-cli/references/repeating.md +1 -1
  137. package/dist/cli/commands/ui-state.d.ts +0 -11
  138. package/dist/cli/commands/ui-state.js +0 -27
  139. package/dist/cli/commands/ui-state.js.map +0 -1
@@ -0,0 +1,275 @@
1
+ /**
2
+ * The mutation-result DISCLOSURE REGISTRY — the single place every non-fatal
3
+ * thing a successful write can tell its caller is enumerated and TIERED (#632).
4
+ *
5
+ * Field feedback (M1, v0.19.3): a successful `make-repeating` handed back ~10
6
+ * flat `warnings` strings — the app-drive play-by-play, the mechanism
7
+ * disclosure, the landed-rule prose, hints and caveats, all in one undifferentiated
8
+ * array, then echoed AGAIN as stderr `warning:` lines after the JSON. An agent
9
+ * reading that cannot tell "you should probably do something" from "here is what
10
+ * happened", and pays context for both twice. So:
11
+ *
12
+ * - `warning` — ACTIONABLE. The caller should consider doing something: a
13
+ * placement that needs a follow-up reorder, a series that will now spawn, an
14
+ * ambiguity worth re-reading, a consent prompt to expect. If nothing follows
15
+ * from a line, it is not a warning.
16
+ * - `note` — a matter-of-fact DISCLOSURE. What landed, how it was applied, what
17
+ * `undo` will and will not reach. Informative, never a call to action.
18
+ * - `failure-only` — diagnostic detail that earns its place only when something
19
+ * went wrong. It never rides a success result's arrays; it is recorded on the
20
+ * change-history record (retrievable with `things op-result`), it rides the
21
+ * failure detail, and `--verbose` opts a success back into it.
22
+ *
23
+ * The registry IS the classification law: `DisclosureId` is derived from it, so
24
+ * a new disclosure cannot be emitted without an explicit tier and rationale, and
25
+ * `test/unit/disclosure-tiers.test.ts` enforces that every producer routes
26
+ * through {@link disclose} rather than pushing a bare string.
27
+ */
28
+ export type DisclosureTier = "warning" | "note" | "failure-only";
29
+ export interface DisclosureSpec {
30
+ tier: DisclosureTier;
31
+ /** Why THIS tier — the rationale that keeps the classification from drifting. */
32
+ why: string;
33
+ }
34
+ /**
35
+ * Every disclosure a mutation result can carry, with its tier and the reason for
36
+ * it. Adding a producer means adding an entry here first — that is the point.
37
+ */
38
+ export declare const DISCLOSURES: {
39
+ readonly "auto-launch": {
40
+ readonly tier: "note";
41
+ readonly why: "a side effect worth stating, but the write already succeeded — nothing follows for the caller";
42
+ };
43
+ readonly "template-delete-series-stops": {
44
+ readonly tier: "warning";
45
+ readonly why: "the caller asked to delete one item and stopped a whole series; they may want to re-create it";
46
+ };
47
+ readonly "template-delete-occurrences-left": {
48
+ readonly tier: "warning";
49
+ readonly why: "rows the caller did not name are still live and now orphaned — theirs to clean up or keep";
50
+ };
51
+ readonly "template-delete-irreversible": {
52
+ readonly tier: "warning";
53
+ readonly why: "`things undo` will refuse this one; recovery needs a manual step in the app";
54
+ };
55
+ readonly "transport-recovered": {
56
+ readonly tier: "warning";
57
+ readonly why: "it exists to stop a retry the caller would otherwise make — the most actionable line we emit";
58
+ };
59
+ readonly "environment-changed": {
60
+ readonly tier: "warning";
61
+ readonly why: "a macOS consent prompt may appear on the next capability use; the caller should be at the keyboard";
62
+ };
63
+ readonly "ui-mechanism": {
64
+ readonly tier: "note";
65
+ readonly why: "how the change was applied — compressed to a few words; `vector`/`tier` carry it structurally anyway";
66
+ };
67
+ readonly "ui-step-trace": {
68
+ readonly tier: "failure-only";
69
+ readonly why: "the drive play-by-play made the field bug reports rich, and costs context on every success; the change-history record keeps it, `--verbose` opts back in, failures always carry it";
70
+ };
71
+ readonly "ui-recipe-uncertified": {
72
+ readonly tier: "note";
73
+ readonly why: "a lab-certification caveat about the recipe, not about this result — nothing to act on";
74
+ };
75
+ readonly "already-in-state": {
76
+ readonly tier: "note";
77
+ readonly why: "the requested state is the state — the caller got what they asked for and nothing follows";
78
+ };
79
+ readonly "heading-placement-failed": {
80
+ readonly tier: "warning";
81
+ readonly why: "the heading landed somewhere the caller did not ask for; a follow-up move is needed";
82
+ };
83
+ readonly "clone-child-states-lost": {
84
+ readonly tier: "warning";
85
+ readonly why: "the copy is knowingly unfaithful — the caller must resolve the child states themselves if they matter";
86
+ };
87
+ readonly "clone-non-atomic-legs": {
88
+ readonly tier: "note";
89
+ readonly why: "mechanism disclosure: how the copy was assembled; every leg verified or the whole thing failed";
90
+ };
91
+ readonly "clone-created-date-coarse": {
92
+ readonly tier: "note";
93
+ readonly why: "a fidelity fact about what was copied; there is no finer option to choose instead";
94
+ };
95
+ readonly "reconciled-replay": {
96
+ readonly tier: "note";
97
+ readonly why: "the undo pointer for a replayed key — states what `undo` cannot reach, which is disclosure, not a task";
98
+ };
99
+ readonly "reorder-fallback": {
100
+ readonly tier: "note";
101
+ readonly why: "mechanism disclosure: the placement was realized a different way, and it did land as asked";
102
+ };
103
+ readonly "reorder-today-cohort-restamp": {
104
+ readonly tier: "warning";
105
+ readonly why: "rows the caller never named had their Today grouping changed — collateral they may need to inspect";
106
+ };
107
+ readonly "reorder-templates-silent": {
108
+ readonly tier: "warning";
109
+ readonly why: "a change-date-diffing sync or watcher will MISS this move; a caller relying on one must reconcile another way";
110
+ };
111
+ readonly "reorder-templates-unmoved": {
112
+ readonly tier: "warning";
113
+ readonly why: "part of the requested placement did not happen — the caller's order is not what they asked for";
114
+ };
115
+ readonly "reorder-scratch-cleaned": {
116
+ readonly tier: "note";
117
+ readonly why: "mechanism disclosure: a throwaway container was used to realize the placement, and it is gone again";
118
+ };
119
+ readonly "reorder-scratch-orphaned": {
120
+ readonly tier: "warning";
121
+ readonly why: "an empty container is sitting in the caller's sidebar/project list and only they can remove it";
122
+ };
123
+ readonly "landed-rule": {
124
+ readonly tier: "note";
125
+ readonly why: "the plain-language echo of what landed; the request was honored, so there is nothing to do";
126
+ };
127
+ readonly "promote-source-trashed": {
128
+ readonly tier: "note";
129
+ readonly why: "an undo pointer — where the original went and what reverses it";
130
+ };
131
+ readonly "promote-placement": {
132
+ readonly tier: "warning";
133
+ readonly why: "the new occurrence sits at a default position and the prior slot was NOT restored — it names the reorder to run";
134
+ };
135
+ readonly "promote-duplicate-trashed": {
136
+ readonly tier: "note";
137
+ readonly why: "the compound already removed the redundant occurrence; the caller is told, not asked";
138
+ };
139
+ readonly "promote-duplicate-orphaned": {
140
+ readonly tier: "warning";
141
+ readonly why: "the redundant occurrence is still there and WILL double-book — it names the delete to run";
142
+ };
143
+ readonly "reanchor-series-moved": {
144
+ readonly tier: "warning";
145
+ readonly why: "the caller moved ONE date and the whole recurring pattern moved with it (a weekly item moved to a Thursday now repeats on Thursdays) — they may want to restate the rule instead";
146
+ };
147
+ readonly "reanchor-slots-skipped": {
148
+ readonly tier: "warning";
149
+ readonly why: "occurrences the caller never named will now never appear — silently skipped rows are theirs to re-create if they mattered";
150
+ };
151
+ readonly "reanchor-irreversible": {
152
+ readonly tier: "warning";
153
+ readonly why: "`things undo` will refuse this one; the only way back is another move or the app's own undo";
154
+ };
155
+ readonly "promote-off-rule-first": {
156
+ readonly tier: "warning";
157
+ readonly why: "the series landed two-phase (a first occurrence off its own rule) — the caller may want to correct it";
158
+ };
159
+ readonly "template-clone-new-series": {
160
+ readonly tier: "note";
161
+ readonly why: "an identity disclosure about what was minted; nothing follows unless the caller assumed otherwise";
162
+ };
163
+ readonly "template-clone-created-best-effort": {
164
+ readonly tier: "note";
165
+ readonly why: "a fidelity caveat about a flag that was honored as far as it goes";
166
+ };
167
+ readonly "template-clone-source-paused": {
168
+ readonly tier: "warning";
169
+ readonly why: "the new series is spawning although the source was suspended — it names the pause to run";
170
+ };
171
+ readonly "resolution-non-atomic-legs": {
172
+ readonly tier: "note";
173
+ readonly why: "mechanism disclosure, same class as the clone leg list";
174
+ };
175
+ readonly "occurrence-resolved": {
176
+ readonly tier: "note";
177
+ readonly why: "which occurrence was written and whether it was created for the call — a statement of what happened";
178
+ };
179
+ readonly "occurrence-next": {
180
+ readonly tier: "note";
181
+ readonly why: "when the series comes back; matter-of-fact, and the caller asked for exactly this";
182
+ };
183
+ readonly "occurrence-mint-irreversible": {
184
+ readonly tier: "note";
185
+ readonly why: "an undo pointer: what `undo` restores and what it cannot un-create";
186
+ };
187
+ readonly "occurrence-exception-scope": {
188
+ readonly tier: "note";
189
+ readonly why: "states that the series itself is untouched — a scope disclosure, not a task";
190
+ };
191
+ readonly "instance-pending": {
192
+ readonly tier: "note";
193
+ readonly why: "the expectation MET: this rule shape is not supposed to have an occurrence yet, so it is a fact, not a surprise";
194
+ };
195
+ readonly "instance-missing": {
196
+ readonly tier: "warning";
197
+ readonly why: "the expectation MISSED: the app should have materialized an occurrence and did not — the series may be wrong";
198
+ };
199
+ readonly "instance-unexpected": {
200
+ readonly tier: "warning";
201
+ readonly why: "the expectation MISSED the other way: an occurrence exists that the measured laws say should not — worth a look";
202
+ };
203
+ readonly "instance-ambiguous": {
204
+ readonly tier: "warning";
205
+ readonly why: "several rows link back to the template and we picked one — the caller should confirm which occurrence they hold";
206
+ };
207
+ readonly "promote-source-unlinked": {
208
+ readonly tier: "warning";
209
+ readonly why: "an unexpected post-op state: the original survived without joining the series — the caller should re-read both";
210
+ };
211
+ };
212
+ /** Every classified disclosure. The registry is the union — no unclassified ids exist. */
213
+ export type DisclosureId = keyof typeof DISCLOSURES;
214
+ /** The ids of a given tier, derived from the registry (single source of truth). */
215
+ type IdsOfTier<T extends DisclosureTier> = {
216
+ [K in DisclosureId]: (typeof DISCLOSURES)[K]["tier"] extends T ? K : never;
217
+ }[DisclosureId];
218
+ export type WarningDisclosureId = IdsOfTier<"warning">;
219
+ export type NoteDisclosureId = IdsOfTier<"note">;
220
+ export type FailureOnlyDisclosureId = IdsOfTier<"failure-only">;
221
+ /** The ids a SUCCESS result may carry — `failure-only` is excluded at compile time. */
222
+ export type SuccessDisclosureId = Exclude<DisclosureId, FailureOnlyDisclosureId>;
223
+ /**
224
+ * The two tiers a successful mutation result carries, in the order they were
225
+ * disclosed. Empty arrays are dropped at the wire boundary ({@link attach}).
226
+ */
227
+ export interface Disclosures {
228
+ warnings: string[];
229
+ notes: string[];
230
+ }
231
+ /** A fresh, empty pair of tiers. */
232
+ export declare function newDisclosures(): Disclosures;
233
+ /**
234
+ * Record one disclosure under its registered tier. The id is compile-time
235
+ * checked against the registry, so the tier is never decided at the call site —
236
+ * which is what makes the classification auditable in one file.
237
+ */
238
+ export declare function disclose(bag: Disclosures, id: SuccessDisclosureId, text: string): void;
239
+ /** {@link disclose} for a producer that yields several lines under one id. */
240
+ export declare function discloseAll(bag: Disclosures, id: SuccessDisclosureId, texts: readonly string[]): void;
241
+ /**
242
+ * Fold an inner result's already-tiered disclosures into an outer bag. Compound
243
+ * orchestrators (clone→promote, composites, replays) build their result on top
244
+ * of a leg's — the leg's classification is already made, so it is CARRIED, never
245
+ * reclassified.
246
+ */
247
+ export declare function carry(bag: Disclosures, from: {
248
+ warnings?: readonly string[];
249
+ notes?: readonly string[];
250
+ } | undefined): void;
251
+ /**
252
+ * The two tiers as a SPREADABLE fragment, omitting each EMPTY array (the
253
+ * omit-when-empty wire policy: an absent key means "none", and neither tier ever
254
+ * appears as `[]`). For building a result literal in place; {@link attach} wraps
255
+ * an already-built one.
256
+ */
257
+ export declare function tiers(bag: Disclosures): {
258
+ warnings?: string[];
259
+ notes?: string[];
260
+ };
261
+ /**
262
+ * Project the tiers onto an existing result object (see {@link tiers}). Both
263
+ * keys are REPLACED, so folding a leg's result into an outer one cannot leave a
264
+ * stale array behind.
265
+ */
266
+ export declare function attach<T extends object>(result: T, bag: Disclosures): T & {
267
+ warnings?: string[];
268
+ notes?: string[];
269
+ };
270
+ /** The tiers already on a result, as a bag the caller can add to. */
271
+ export declare function disclosuresOf(from: {
272
+ warnings?: readonly string[];
273
+ notes?: readonly string[];
274
+ }): Disclosures;
275
+ export {};
@@ -0,0 +1,277 @@
1
+ /**
2
+ * The mutation-result DISCLOSURE REGISTRY — the single place every non-fatal
3
+ * thing a successful write can tell its caller is enumerated and TIERED (#632).
4
+ *
5
+ * Field feedback (M1, v0.19.3): a successful `make-repeating` handed back ~10
6
+ * flat `warnings` strings — the app-drive play-by-play, the mechanism
7
+ * disclosure, the landed-rule prose, hints and caveats, all in one undifferentiated
8
+ * array, then echoed AGAIN as stderr `warning:` lines after the JSON. An agent
9
+ * reading that cannot tell "you should probably do something" from "here is what
10
+ * happened", and pays context for both twice. So:
11
+ *
12
+ * - `warning` — ACTIONABLE. The caller should consider doing something: a
13
+ * placement that needs a follow-up reorder, a series that will now spawn, an
14
+ * ambiguity worth re-reading, a consent prompt to expect. If nothing follows
15
+ * from a line, it is not a warning.
16
+ * - `note` — a matter-of-fact DISCLOSURE. What landed, how it was applied, what
17
+ * `undo` will and will not reach. Informative, never a call to action.
18
+ * - `failure-only` — diagnostic detail that earns its place only when something
19
+ * went wrong. It never rides a success result's arrays; it is recorded on the
20
+ * change-history record (retrievable with `things op-result`), it rides the
21
+ * failure detail, and `--verbose` opts a success back into it.
22
+ *
23
+ * The registry IS the classification law: `DisclosureId` is derived from it, so
24
+ * a new disclosure cannot be emitted without an explicit tier and rationale, and
25
+ * `test/unit/disclosure-tiers.test.ts` enforces that every producer routes
26
+ * through {@link disclose} rather than pushing a bare string.
27
+ */
28
+ /**
29
+ * Every disclosure a mutation result can carry, with its tier and the reason for
30
+ * it. Adding a producer means adding an entry here first — that is the point.
31
+ */
32
+ export const DISCLOSURES = {
33
+ // ---------------------------------------------------------------- pipeline
34
+ "auto-launch": {
35
+ tier: "note",
36
+ why: "a side effect worth stating, but the write already succeeded — nothing follows for the caller",
37
+ },
38
+ "template-delete-series-stops": {
39
+ tier: "warning",
40
+ why: "the caller asked to delete one item and stopped a whole series; they may want to re-create it",
41
+ },
42
+ "template-delete-occurrences-left": {
43
+ tier: "warning",
44
+ why: "rows the caller did not name are still live and now orphaned — theirs to clean up or keep",
45
+ },
46
+ "template-delete-irreversible": {
47
+ tier: "warning",
48
+ why: "`things undo` will refuse this one; recovery needs a manual step in the app",
49
+ },
50
+ "transport-recovered": {
51
+ tier: "warning",
52
+ why: "it exists to stop a retry the caller would otherwise make — the most actionable line we emit",
53
+ },
54
+ "environment-changed": {
55
+ tier: "warning",
56
+ why: "a macOS consent prompt may appear on the next capability use; the caller should be at the keyboard",
57
+ },
58
+ "ui-mechanism": {
59
+ tier: "note",
60
+ why: "how the change was applied — compressed to a few words; `vector`/`tier` carry it structurally anyway",
61
+ },
62
+ "ui-step-trace": {
63
+ tier: "failure-only",
64
+ why: "the drive play-by-play made the field bug reports rich, and costs context on every success; the change-history record keeps it, `--verbose` opts back in, failures always carry it",
65
+ },
66
+ "ui-recipe-uncertified": {
67
+ tier: "note",
68
+ why: "a lab-certification caveat about the recipe, not about this result — nothing to act on",
69
+ },
70
+ "already-in-state": {
71
+ tier: "note",
72
+ why: "the requested state is the state — the caller got what they asked for and nothing follows",
73
+ },
74
+ // ----------------------------------------------------------------- heading
75
+ "heading-placement-failed": {
76
+ tier: "warning",
77
+ why: "the heading landed somewhere the caller did not ask for; a follow-up move is needed",
78
+ },
79
+ // ------------------------------------------------------------------- clone
80
+ "clone-child-states-lost": {
81
+ tier: "warning",
82
+ why: "the copy is knowingly unfaithful — the caller must resolve the child states themselves if they matter",
83
+ },
84
+ "clone-non-atomic-legs": {
85
+ tier: "note",
86
+ why: "mechanism disclosure: how the copy was assembled; every leg verified or the whole thing failed",
87
+ },
88
+ "clone-created-date-coarse": {
89
+ tier: "note",
90
+ why: "a fidelity fact about what was copied; there is no finer option to choose instead",
91
+ },
92
+ // ------------------------------------------------------------ idempotency
93
+ "reconciled-replay": {
94
+ tier: "note",
95
+ why: "the undo pointer for a replayed key — states what `undo` cannot reach, which is disclosure, not a task",
96
+ },
97
+ // ---------------------------------------------------------------- reorder
98
+ "reorder-fallback": {
99
+ tier: "note",
100
+ why: "mechanism disclosure: the placement was realized a different way, and it did land as asked",
101
+ },
102
+ "reorder-today-cohort-restamp": {
103
+ tier: "warning",
104
+ why: "rows the caller never named had their Today grouping changed — collateral they may need to inspect",
105
+ },
106
+ "reorder-templates-silent": {
107
+ tier: "warning",
108
+ why: "a change-date-diffing sync or watcher will MISS this move; a caller relying on one must reconcile another way",
109
+ },
110
+ "reorder-templates-unmoved": {
111
+ tier: "warning",
112
+ why: "part of the requested placement did not happen — the caller's order is not what they asked for",
113
+ },
114
+ "reorder-scratch-cleaned": {
115
+ tier: "note",
116
+ why: "mechanism disclosure: a throwaway container was used to realize the placement, and it is gone again",
117
+ },
118
+ "reorder-scratch-orphaned": {
119
+ tier: "warning",
120
+ why: "an empty container is sitting in the caller's sidebar/project list and only they can remove it",
121
+ },
122
+ // ------------------------------------------------------- promote (repeat)
123
+ "landed-rule": {
124
+ tier: "note",
125
+ why: "the plain-language echo of what landed; the request was honored, so there is nothing to do",
126
+ },
127
+ "promote-source-trashed": {
128
+ tier: "note",
129
+ why: "an undo pointer — where the original went and what reverses it",
130
+ },
131
+ "promote-placement": {
132
+ tier: "warning",
133
+ why: "the new occurrence sits at a default position and the prior slot was NOT restored — it names the reorder to run",
134
+ },
135
+ "promote-duplicate-trashed": {
136
+ tier: "note",
137
+ why: "the compound already removed the redundant occurrence; the caller is told, not asked",
138
+ },
139
+ "promote-duplicate-orphaned": {
140
+ tier: "warning",
141
+ why: "the redundant occurrence is still there and WILL double-book — it names the delete to run",
142
+ },
143
+ "reanchor-series-moved": {
144
+ tier: "warning",
145
+ why: "the caller moved ONE date and the whole recurring pattern moved with it (a weekly item moved to a Thursday now repeats on Thursdays) — they may want to restate the rule instead",
146
+ },
147
+ "reanchor-slots-skipped": {
148
+ tier: "warning",
149
+ why: "occurrences the caller never named will now never appear — silently skipped rows are theirs to re-create if they mattered",
150
+ },
151
+ "reanchor-irreversible": {
152
+ tier: "warning",
153
+ why: "`things undo` will refuse this one; the only way back is another move or the app's own undo",
154
+ },
155
+ "promote-off-rule-first": {
156
+ tier: "warning",
157
+ why: "the series landed two-phase (a first occurrence off its own rule) — the caller may want to correct it",
158
+ },
159
+ "template-clone-new-series": {
160
+ tier: "note",
161
+ why: "an identity disclosure about what was minted; nothing follows unless the caller assumed otherwise",
162
+ },
163
+ "template-clone-created-best-effort": {
164
+ tier: "note",
165
+ why: "a fidelity caveat about a flag that was honored as far as it goes",
166
+ },
167
+ "template-clone-source-paused": {
168
+ tier: "warning",
169
+ why: "the new series is spawning although the source was suspended — it names the pause to run",
170
+ },
171
+ // --------------------------------------------------- resolution timestamps
172
+ "resolution-non-atomic-legs": {
173
+ tier: "note",
174
+ why: "mechanism disclosure, same class as the clone leg list",
175
+ },
176
+ // ---------------------------------------------- template-target composites
177
+ "occurrence-resolved": {
178
+ tier: "note",
179
+ why: "which occurrence was written and whether it was created for the call — a statement of what happened",
180
+ },
181
+ "occurrence-next": {
182
+ tier: "note",
183
+ why: "when the series comes back; matter-of-fact, and the caller asked for exactly this",
184
+ },
185
+ "occurrence-mint-irreversible": {
186
+ tier: "note",
187
+ why: "an undo pointer: what `undo` restores and what it cannot un-create",
188
+ },
189
+ "occurrence-exception-scope": {
190
+ tier: "note",
191
+ why: "states that the series itself is untouched — a scope disclosure, not a task",
192
+ },
193
+ // -------------------------------------------- instance derivation (#634)
194
+ "instance-pending": {
195
+ tier: "note",
196
+ why: "the expectation MET: this rule shape is not supposed to have an occurrence yet, so it is a fact, not a surprise",
197
+ },
198
+ "instance-missing": {
199
+ tier: "warning",
200
+ why: "the expectation MISSED: the app should have materialized an occurrence and did not — the series may be wrong",
201
+ },
202
+ "instance-unexpected": {
203
+ tier: "warning",
204
+ why: "the expectation MISSED the other way: an occurrence exists that the measured laws say should not — worth a look",
205
+ },
206
+ "instance-ambiguous": {
207
+ tier: "warning",
208
+ why: "several rows link back to the template and we picked one — the caller should confirm which occurrence they hold",
209
+ },
210
+ "promote-source-unlinked": {
211
+ tier: "warning",
212
+ why: "an unexpected post-op state: the original survived without joining the series — the caller should re-read both",
213
+ },
214
+ };
215
+ /** A fresh, empty pair of tiers. */
216
+ export function newDisclosures() {
217
+ return { warnings: [], notes: [] };
218
+ }
219
+ /**
220
+ * Record one disclosure under its registered tier. The id is compile-time
221
+ * checked against the registry, so the tier is never decided at the call site —
222
+ * which is what makes the classification auditable in one file.
223
+ */
224
+ export function disclose(bag, id, text) {
225
+ if (text === "")
226
+ return;
227
+ const spec = DISCLOSURES[id];
228
+ if (spec.tier === "warning")
229
+ bag.warnings.push(text);
230
+ else
231
+ bag.notes.push(text);
232
+ }
233
+ /** {@link disclose} for a producer that yields several lines under one id. */
234
+ export function discloseAll(bag, id, texts) {
235
+ for (const text of texts)
236
+ disclose(bag, id, text);
237
+ }
238
+ /**
239
+ * Fold an inner result's already-tiered disclosures into an outer bag. Compound
240
+ * orchestrators (clone→promote, composites, replays) build their result on top
241
+ * of a leg's — the leg's classification is already made, so it is CARRIED, never
242
+ * reclassified.
243
+ */
244
+ export function carry(bag, from) {
245
+ if (from === undefined)
246
+ return;
247
+ bag.warnings.push(...(from.warnings ?? []));
248
+ bag.notes.push(...(from.notes ?? []));
249
+ }
250
+ /**
251
+ * The two tiers as a SPREADABLE fragment, omitting each EMPTY array (the
252
+ * omit-when-empty wire policy: an absent key means "none", and neither tier ever
253
+ * appears as `[]`). For building a result literal in place; {@link attach} wraps
254
+ * an already-built one.
255
+ */
256
+ export function tiers(bag) {
257
+ return {
258
+ ...(bag.warnings.length > 0 && { warnings: bag.warnings }),
259
+ ...(bag.notes.length > 0 && { notes: bag.notes }),
260
+ };
261
+ }
262
+ /**
263
+ * Project the tiers onto an existing result object (see {@link tiers}). Both
264
+ * keys are REPLACED, so folding a leg's result into an outer one cannot leave a
265
+ * stale array behind.
266
+ */
267
+ export function attach(result, bag) {
268
+ const { warnings: _w, notes: _n, ...rest } = result;
269
+ return { ...rest, ...tiers(bag) };
270
+ }
271
+ /** The tiers already on a result, as a bag the caller can add to. */
272
+ export function disclosuresOf(from) {
273
+ const bag = newDisclosures();
274
+ carry(bag, from);
275
+ return bag;
276
+ }
277
+ //# sourceMappingURL=disclosures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disclosures.js","sourceRoot":"","sources":["../../src/write/disclosures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAUH;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,4EAA4E;IAC5E,aAAa,EAAE;QACb,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,+FAA+F;KACrG;IACD,8BAA8B,EAAE;QAC9B,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,+FAA+F;KACrG;IACD,kCAAkC,EAAE;QAClC,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,2FAA2F;KACjG;IACD,8BAA8B,EAAE;QAC9B,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,6EAA6E;KACnF;IACD,qBAAqB,EAAE;QACrB,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,8FAA8F;KACpG;IACD,qBAAqB,EAAE;QACrB,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,oGAAoG;KAC1G;IACD,cAAc,EAAE;QACd,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,sGAAsG;KAC5G;IACD,eAAe,EAAE;QACf,IAAI,EAAE,cAAc;QACpB,GAAG,EAAE,oLAAoL;KAC1L;IACD,uBAAuB,EAAE;QACvB,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,wFAAwF;KAC9F;IACD,kBAAkB,EAAE;QAClB,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,2FAA2F;KACjG;IAED,4EAA4E;IAC5E,0BAA0B,EAAE;QAC1B,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,qFAAqF;KAC3F;IAED,4EAA4E;IAC5E,yBAAyB,EAAE;QACzB,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,uGAAuG;KAC7G;IACD,uBAAuB,EAAE;QACvB,IAAI,EAAE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AC,KAAK,EAAE,CAAC;KAClD,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,MAAM,CACpB,MAAS,EACT,GAAgB;IAEhB,MAAM,EACJ,QAAQ,EAAE,EAAE,EACZ,KAAK,EAAE,EAAE,EACT,GAAG,IAAI,EACR,GAAG,MAGH,CAAC;IACF,OAAO,EAAE,GAAI,IAAU,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;AAC3C,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,aAAa,CAAC,IAG7B;IACC,MAAM,GAAG,GAAG,cAAc,EAAE,CAAC;IAC7B,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACjB,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -24,3 +24,19 @@ export declare function compareAppVersions(a: string | null, b: string | null):
24
24
  * checks there, exactly as before.
25
25
  */
26
26
  export declare function privateReorderIsNoOp(installedVersion: string | null): boolean;
27
+ /**
28
+ * The first Things version that accepts a dated `when=` on a repeating template
29
+ * instead of dying on it — the series RE-ANCHOR (REANCH1 §6,
30
+ * docs/lab/reanch1-url-reanchor.md). On 3.22.14 every dated spelling kills the
31
+ * process with zero delta, five deaths for five arms; on 3.23 a strictly-future
32
+ * date re-anchors the series cleanly. The capability appeared WITHOUT an
33
+ * announcement, so it is version-gated rather than assumed.
34
+ */
35
+ export declare const URL_REANCHOR_FROM = "3.23";
36
+ /**
37
+ * True when the installed Things is known to carry the URL series re-anchor —
38
+ * a readable version at least {@link URL_REANCHOR_FROM}. An UNKNOWN or
39
+ * unparseable version reads false: this gate stands in front of a write that
40
+ * KILLS the app on every older build, so it fails closed.
41
+ */
42
+ export declare function urlReanchorSupported(installedVersion: string | null): boolean;
@@ -86,4 +86,23 @@ export function privateReorderIsNoOp(installedVersion) {
86
86
  const cmp = compareAppVersions(installedVersion, PRIVATE_REORDER_NO_OP_FROM);
87
87
  return cmp !== null && cmp >= 0;
88
88
  }
89
+ /**
90
+ * The first Things version that accepts a dated `when=` on a repeating template
91
+ * instead of dying on it — the series RE-ANCHOR (REANCH1 §6,
92
+ * docs/lab/reanch1-url-reanchor.md). On 3.22.14 every dated spelling kills the
93
+ * process with zero delta, five deaths for five arms; on 3.23 a strictly-future
94
+ * date re-anchors the series cleanly. The capability appeared WITHOUT an
95
+ * announcement, so it is version-gated rather than assumed.
96
+ */
97
+ export const URL_REANCHOR_FROM = "3.23";
98
+ /**
99
+ * True when the installed Things is known to carry the URL series re-anchor —
100
+ * a readable version at least {@link URL_REANCHOR_FROM}. An UNKNOWN or
101
+ * unparseable version reads false: this gate stands in front of a write that
102
+ * KILLS the app on every older build, so it fails closed.
103
+ */
104
+ export function urlReanchorSupported(installedVersion) {
105
+ const cmp = compareAppVersions(installedVersion, URL_REANCHOR_FROM);
106
+ return cmp !== null && cmp >= 0;
107
+ }
89
108
  //# sourceMappingURL=experimental.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"experimental.js","sourceRoot":"","sources":["../../src/write/experimental.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,CAAC,MAAM,uBAAuB,GAAG,0CAA0C,CAAC;AAElF,MAAM,WAAW,GAAG,iBAAiB,uBAAuB,GAAG,CAAC;AAChE,MAAM,aAAa,GAAG,8CAA8C,CAAC;AAErE;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,eAAuB,aAAa;IAC7E,IAAI,OAAiB,CAAC;IACtB,IAAI,CAAC;QACH,OAAO,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OA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H,MAAM,UAAU,oBAAoB,CAAC,gBAA+B;IAClE,MAAM,GAAG,GAAG,kBAAkB,CAAC,gBAAgB,EAAE,0BAA0B,CAAC,CAAC;IAC7E,OAAO,GAAG,KAAK,IAAI,IAAI,GAAG,IAAI,CAAC,CAAC;AAClC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC;AAExC;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,gBAA+B;IAClE,MAAM,GAAG,GAAG,kBAAkB,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IACpE,OAAO,GAAG,KAAK,IAAI,IAAI,GAAG,IAAI,CAAC,CAAC;AAClC,CAAC"}
@@ -47,8 +47,9 @@ export function classifyTransportFailure(input) {
47
47
  "that IS there whenever a dialog is open somewhere in the app: while one stands, Things " +
48
48
  "reports its own lists as empty to scripted callers, so a change addressed by id cannot " +
49
49
  "resolve. It also stops sending changes to Things Cloud until the dialog is dismissed. " +
50
- "Run `things ui-state` to see what is open, dismiss it (click Cancel, or press Escape " +
51
- "with Things in front), then run the same command again — nothing was changed." +
50
+ "Run `things rescue status` to see what is open and whether it can be closed from here, " +
51
+ "`things rescue dismiss` to close it, then run the same command again — nothing was " +
52
+ "changed." +
52
53
  environmentSuffix(input.environmentChanges),
53
54
  };
54
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"failure-hints.js","sourceRoot":"","sources":["../../src/write/failure-hints.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,0BAA0B,EAA0B,MAAM,kBAAkB,CAAC;AA0BtF,MAAM,MAAM,GAAG,+CAA+C,CAAC;AAC/D,MAAM,eAAe,GAAG,wBAAwB,CAAC;AACjD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,GAAG,qDAAqD,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CA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