things-api 0.19.1 → 0.19.2
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 +1 -1
- package/deputy/prebuilt/Things API Helper.app/Contents/CodeResources +0 -0
- package/deputy/prebuilt/Things API Helper.app/Contents/Helpers/things-reader.app/Contents/MacOS/things-reader +0 -0
- package/deputy/prebuilt/Things API Helper.app/Contents/MacOS/things-deputy +0 -0
- package/dist/cli/commands/doctor.js +28 -8
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/ui-state.d.ts +11 -0
- package/dist/cli/commands/ui-state.js +27 -0
- package/dist/cli/commands/ui-state.js.map +1 -0
- package/dist/cli/help.js +2 -0
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/main.js +2 -0
- package/dist/cli/main.js.map +1 -1
- package/dist/contracts.d.ts +2 -2
- package/dist/contracts.js +1 -1
- package/dist/contracts.js.map +1 -1
- package/dist/deputy/osa.d.ts +42 -2
- package/dist/deputy/osa.js +79 -5
- package/dist/deputy/osa.js.map +1 -1
- package/dist/deputy/routing.d.ts +18 -0
- package/dist/deputy/routing.js +25 -0
- package/dist/deputy/routing.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/ui-state.d.ts +46 -0
- package/dist/ui-state.js +82 -0
- package/dist/ui-state.js.map +1 -0
- package/dist/write/accessibility-probe.js +4 -1
- package/dist/write/accessibility-probe.js.map +1 -1
- package/dist/write/automation-probe.js +7 -1
- package/dist/write/automation-probe.js.map +1 -1
- package/dist/write/failure-hints.d.ts +7 -1
- package/dist/write/failure-hints.js +24 -0
- package/dist/write/failure-hints.js.map +1 -1
- package/dist/write/field-limits.d.ts +100 -0
- package/dist/write/field-limits.js +144 -0
- package/dist/write/field-limits.js.map +1 -0
- package/dist/write/param-schema.d.ts +17 -0
- package/dist/write/param-schema.js +64 -4
- package/dist/write/param-schema.js.map +1 -1
- package/dist/write/pipeline.js +30 -0
- package/dist/write/pipeline.js.map +1 -1
- package/dist/write/promote-clone.d.ts +26 -0
- package/dist/write/promote-clone.js +201 -23
- package/dist/write/promote-clone.js.map +1 -1
- package/dist/write/vectors/types.d.ts +25 -3
- package/dist/write/vectors/ui-state.d.ts +157 -0
- package/dist/write/vectors/ui-state.js +237 -0
- package/dist/write/vectors/ui-state.js.map +1 -0
- package/dist/write/vectors/ui.d.ts +120 -4
- package/dist/write/vectors/ui.js +542 -65
- package/dist/write/vectors/ui.js.map +1 -1
- package/package.json +1 -1
- package/schema/envelope.schema.json +1 -0
- package/skills/things-cli/SKILL.md +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.js","sourceRoot":"","sources":["../../src/deputy/routing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EAAoB,UAAU,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EAEvB,kBAAkB,EAClB,yBAAyB,EACzB,gBAAgB,EAChB,eAAe,EACf,wBAAwB,EAExB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,GAChB,MAAM,eAAe,CAAC;AAsDvB,IAAI,KAAK,GAAwB,IAAI,CAAC;AACtC,IAAI,WAAW,GAAuB,IAAI,CAAC;AAE3C,gFAAgF;AA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AsD,CACvD,CAAC;IACJ,CAAC;IACD,EAAE,CAAC,UAAU,GAAG,IAAI,CAAC;IACrB,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAwC,EACxC,MAAyB,OAAO,CAAC,GAAG;IAEpC,IAAI,OAAO,EAAE,MAAM,KAAK,SAAS,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,KAAK,CAAC;IACnF,OAAO,iBAAiB,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export type { TodayBucketTotals, AreaBucketTotals, SectionTotals, UpcomingBlockT
|
|
|
12
12
|
export { diagnose } from "./diagnose.ts";
|
|
13
13
|
export type { DiagnoseOptions, DiagnoseReport, DiagnoseResult } from "./diagnose.ts";
|
|
14
14
|
export { opResult } from "./op-result.ts";
|
|
15
|
+
export { readUiStateReport, uiStateLines } from "./ui-state.ts";
|
|
16
|
+
export type { UiFocusOwner, UiSheetForm, UiSheetKind, UiState, UiStateDeps, UiStateReport, } from "./ui-state.ts";
|
|
15
17
|
export type { OpResultData, OpResultOptions, OpResultStatus } from "./op-result.ts";
|
|
16
18
|
export { probeAutomation } from "./write/automation-probe.ts";
|
|
17
19
|
export type { AutomationProbeDeps, AutomationProbeResult, AutomationProbeStatus, } from "./write/automation-probe.ts";
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
export { openThings } from "./client.js";
|
|
9
9
|
export { diagnose } from "./diagnose.js";
|
|
10
10
|
export { opResult } from "./op-result.js";
|
|
11
|
+
export { readUiStateReport, uiStateLines } from "./ui-state.js";
|
|
11
12
|
export { probeAutomation } from "./write/automation-probe.js";
|
|
12
13
|
export { createEnvironmentTracker, describeEnvironmentChanges, diffEnvironment, } from "./write/environment.js";
|
|
13
14
|
export { capabilitiesTable } from "./write/capabilities.js";
|
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;AAmBzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAmBzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAUhE,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,+EAA+E;AAC/E,+EAA+E;AAC/E,uEAAuE;AACvE,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA6BtF,8EAA8E;AAC9E,gEAAgE;AAChE,mDAAmD;AACnD,OAAO,EACL,eAAe,EACf,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AAoCnC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,iFAAiF;AACjF,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,EAAE,eAAe,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAWnF,+EAA+E;AAC/E,4EAA4E;AAC5E,4EAA4E;AAC5E,iFAAiF;AACjF,mEAAmE;AACnE,OAAO,EACL,aAAa,EACb,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,KAAK,EACL,WAAW,EACX,SAAS,GACV,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAWtC,MAAM,UAAU,aAAa;IAC3B,OAAO,MAAM,CAAC,iBAAiB,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `ui-state` diagnostic (issue #620): a read-only answer to "what is on the
|
|
3
|
+
* screen right now?", for the two questions a GUI drive and a sync problem both
|
|
4
|
+
* end up asking — is a dialog open in Things, and who owns the keyboard?
|
|
5
|
+
*
|
|
6
|
+
* It reads and reports; it never clicks, types, activates, or dismisses
|
|
7
|
+
* anything. The census itself lives with the ui vector
|
|
8
|
+
* (src/write/vectors/ui-state.ts) because the drive's per-step guard and its
|
|
9
|
+
* cleanup ladder use the same one shape; this module is the surface accessor —
|
|
10
|
+
* the capability gate plus the reporting shape the CLI renders.
|
|
11
|
+
*
|
|
12
|
+
* PERMISSIONS DOCTRINE. Reading another app's Accessibility tree is a granted
|
|
13
|
+
* capability, so the gate comes FIRST and prompt-free: a machine that has not
|
|
14
|
+
* granted it is told so, with the remediation, and nothing is attempted. No
|
|
15
|
+
* surface may raise a consent dialog outside the two setup ceremonies.
|
|
16
|
+
*/
|
|
17
|
+
import { type UiCapability } from "./capability.ts";
|
|
18
|
+
import { type UiState } from "./write/vectors/ui-state.ts";
|
|
19
|
+
export type { UiFocusOwner, UiSheetForm, UiSheetKind, UiState } from "./write/vectors/ui-state.ts";
|
|
20
|
+
export interface UiStateReport {
|
|
21
|
+
/** Could the screen be read at all on this machine? */
|
|
22
|
+
available: boolean;
|
|
23
|
+
/** One sentence: the summary when available, the reason when not. */
|
|
24
|
+
detail: string;
|
|
25
|
+
/** What to do about it; empty when there is nothing to fix. */
|
|
26
|
+
remediation: string[];
|
|
27
|
+
/** The census; null when unavailable, or when the read itself did not answer. */
|
|
28
|
+
state: UiState | null;
|
|
29
|
+
/** Consequences worth stating — currently the open-dialog sync gate. */
|
|
30
|
+
warnings: string[];
|
|
31
|
+
}
|
|
32
|
+
export interface UiStateDeps {
|
|
33
|
+
/** Test seam: the prompt-free capability verdict. */
|
|
34
|
+
capability?: () => UiCapability;
|
|
35
|
+
/** Test seam: the live census read. */
|
|
36
|
+
read?: () => Promise<UiState | null>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Read the current window/focus state, gated on the prompt-free capability
|
|
40
|
+
* verdict. Never throws: an unreadable screen is a REPORTED state, because the
|
|
41
|
+
* cases this diagnostic exists for are exactly the ones where something is
|
|
42
|
+
* wrong with the screen.
|
|
43
|
+
*/
|
|
44
|
+
export declare function readUiStateReport(deps?: UiStateDeps): Promise<UiStateReport>;
|
|
45
|
+
/** The human render, shared by `things ui-state` and `things doctor --ui-state`. */
|
|
46
|
+
export declare function uiStateLines(report: UiStateReport): string[];
|
package/dist/ui-state.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `ui-state` diagnostic (issue #620): a read-only answer to "what is on the
|
|
3
|
+
* screen right now?", for the two questions a GUI drive and a sync problem both
|
|
4
|
+
* end up asking — is a dialog open in Things, and who owns the keyboard?
|
|
5
|
+
*
|
|
6
|
+
* It reads and reports; it never clicks, types, activates, or dismisses
|
|
7
|
+
* anything. The census itself lives with the ui vector
|
|
8
|
+
* (src/write/vectors/ui-state.ts) because the drive's per-step guard and its
|
|
9
|
+
* cleanup ladder use the same one shape; this module is the surface accessor —
|
|
10
|
+
* the capability gate plus the reporting shape the CLI renders.
|
|
11
|
+
*
|
|
12
|
+
* PERMISSIONS DOCTRINE. Reading another app's Accessibility tree is a granted
|
|
13
|
+
* capability, so the gate comes FIRST and prompt-free: a machine that has not
|
|
14
|
+
* granted it is told so, with the remediation, and nothing is attempted. No
|
|
15
|
+
* surface may raise a consent dialog outside the two setup ceremonies.
|
|
16
|
+
*/
|
|
17
|
+
import { uiAllowed, uiCapability as uiCapabilityDefault } from "./capability.js";
|
|
18
|
+
import { describeUiState, SYNC_GATE_WARNING } from "./write/vectors/ui-state.js";
|
|
19
|
+
import { readLiveUiState } from "./write/vectors/ui.js";
|
|
20
|
+
/**
|
|
21
|
+
* Read the current window/focus state, gated on the prompt-free capability
|
|
22
|
+
* verdict. Never throws: an unreadable screen is a REPORTED state, because the
|
|
23
|
+
* cases this diagnostic exists for are exactly the ones where something is
|
|
24
|
+
* wrong with the screen.
|
|
25
|
+
*/
|
|
26
|
+
export async function readUiStateReport(deps = {}) {
|
|
27
|
+
const capability = (deps.capability ?? (() => uiCapabilityDefault()))();
|
|
28
|
+
if (!uiAllowed(capability)) {
|
|
29
|
+
return {
|
|
30
|
+
available: false,
|
|
31
|
+
detail: `the Things window cannot be read on this machine — ${capability.detail}`,
|
|
32
|
+
remediation: capability.remediation,
|
|
33
|
+
state: null,
|
|
34
|
+
warnings: [],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const state = await (deps.read ?? readLiveUiState)();
|
|
38
|
+
if (state === null) {
|
|
39
|
+
return {
|
|
40
|
+
available: true,
|
|
41
|
+
detail: "the window and focus state could not be read — Things may have stopped answering, or a " +
|
|
42
|
+
"system dialog is covering the screen",
|
|
43
|
+
remediation: ["check that Things is running and responding, then run this again"],
|
|
44
|
+
state: null,
|
|
45
|
+
warnings: [],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
if (!state.thingsRunning) {
|
|
49
|
+
return {
|
|
50
|
+
available: true,
|
|
51
|
+
detail: "Things is not running, so it has no window and no dialog open",
|
|
52
|
+
remediation: [],
|
|
53
|
+
state,
|
|
54
|
+
warnings: [],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
available: true,
|
|
59
|
+
detail: describeUiState(state),
|
|
60
|
+
remediation: [],
|
|
61
|
+
state,
|
|
62
|
+
warnings: state.sheetOpen ? [SYNC_GATE_WARNING] : [],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/** The human render, shared by `things ui-state` and `things doctor --ui-state`. */
|
|
66
|
+
export function uiStateLines(report) {
|
|
67
|
+
const lines = ["── Window state ──", `summary: ${report.detail}`];
|
|
68
|
+
const state = report.state;
|
|
69
|
+
if (state !== null) {
|
|
70
|
+
lines.push(`frontmost: ${state.frontmostApp ?? "unknown"}${state.thingsFrontmost ? " (Things)" : ""}`, `dialog: ${state.sheetKind}${state.sheetKind === "none"
|
|
71
|
+
? ""
|
|
72
|
+
: ` (${state.sheetForm}; ${state.sheetControls ?? "no census"})`}`, `focus: ${state.focusOwner === null
|
|
73
|
+
? "unknown"
|
|
74
|
+
: `${state.focusOwner.app} · ${state.focusOwner.role || "no focused element"}${state.focusOwner.subrole === null ? "" : ` / ${state.focusOwner.subrole}`}`}`, `inspectable: ${state.inspectable ? "yes" : "no — a system dialog macOS does not expose"}`);
|
|
75
|
+
}
|
|
76
|
+
for (const warning of report.warnings)
|
|
77
|
+
lines.push(` warning: ${warning}`);
|
|
78
|
+
for (const step of report.remediation)
|
|
79
|
+
lines.push(` next: ${step}`);
|
|
80
|
+
return lines;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=ui-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-state.js","sourceRoot":"","sources":["../src/ui-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,SAAS,EAAE,YAAY,IAAI,mBAAmB,EAAqB,MAAM,iBAAiB,CAAC;AACpG,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAgB,MAAM,6BAA6B,CAAC;AAC/F,O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
|
|
@@ -21,7 +21,10 @@ const PROBE_SCRIPT = 'tell application "System Events" to tell process "Things3"
|
|
|
21
21
|
function defaultRun(script, timeoutMs) {
|
|
22
22
|
// Deputy-routed when active (see automation-probe.ts) — in that mode the
|
|
23
23
|
// Accessibility question is about the deputy's grant, the one that matters.
|
|
24
|
-
|
|
24
|
+
// With the deputy inactive this probe is the ceremony exemption from the
|
|
25
|
+
// seam's no-silent-fallback rule (issue #620): its question IS "what does
|
|
26
|
+
// the calling identity hold?", so the host path is the correct answer.
|
|
27
|
+
return osaExecSync(script, timeoutMs, { hostDirect: "permitted" });
|
|
25
28
|
}
|
|
26
29
|
export function probeAccessibility(deps = {}) {
|
|
27
30
|
if (simFenceActive()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessibility-probe.js","sourceRoot":"","sources":["../../src/write/accessibility-probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAsBxD,yEAAyE;AACzE,oEAAoE;AACpE,MAAM,YAAY,GAChB,0GAA0G,CAAC;AAE7G,SAAS,UAAU,CAAC,MAAc,EAAE,SAAiB;IACnD,yEAAyE;IACzE,4EAA4E;IAC5E,OAAO,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"accessibility-probe.js","sourceRoot":"","sources":["../../src/write/accessibility-probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAsBxD,yEAAyE;AACzE,oEAAoE;A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AAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7F,IAAI,0DAA0D,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5E,OAAO;gBACL,MAAM,EAAE,QAAQ;gBAChB,MAAM,EACJ,wFAAwF;oBACxF,qFAAqF;oBACrF,gDAAgD;aACnD,CAAC;QACJ,CAAC;QACD,OAAO;YACL,MAAM,EAAE,cAAc;YACtB,MAAM,EAAE,wCAAwC,MAAM,CAAC,IAAI,EAAE,IAAI,eAAe,EAAE;SACnF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -31,7 +31,13 @@ function defaultRun(script, timeoutMs) {
|
|
|
31
31
|
// Routed through the deputy when it is active: the probe then answers the
|
|
32
32
|
// right question — whether the DEPUTY (the process that sends every
|
|
33
33
|
// AppleEvent in that mode) holds the grant, not this transient CLI process.
|
|
34
|
-
|
|
34
|
+
//
|
|
35
|
+
// `hostDirect: "permitted"` is the ceremony exemption from the seam's
|
|
36
|
+
// no-silent-fallback rule (issue #620): when the deputy is NOT carrying
|
|
37
|
+
// traffic, the question this probe asks is precisely "what does the calling
|
|
38
|
+
// identity hold?", and answering it from the host is the correct behavior.
|
|
39
|
+
// Refusing would blind the diagnostic someone runs when the deputy is down.
|
|
40
|
+
return osaExecSync(script, timeoutMs, { hostDirect: "permitted" });
|
|
35
41
|
}
|
|
36
42
|
export function probeAutomation(deps = {}) {
|
|
37
43
|
if (simFenceActive()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation-probe.js","sourceRoot":"","sources":["../../src/write/automation-probe.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAA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I,wBAAwB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;YACzF,OAAO;gBACL,MAAM,EAAE,SAAS;gBACjB,MAAM,EACJ,4EAA4E;oBAC5E,iDAAiD,iBAAiB,EAAE,aAAa;oBACjF,4EAA4E;oBAC5E,gFAAgF;oBAChF,kCAAkC;aACrC,CAAC;QACJ,CAAC;QACD,IAAI,+CAA+C,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;YACjE,OAAO;gBACL,MAAM,EAAE,QAAQ;gBAChB,MAAM,EACJ,qEAAqE,iBAAiB,EAAE,GAAG;oBAC3F,kFAAkF;oBAClF,uDAAuD;aAC1D,CAAC;QACJ,CAAC;QACD,OAAO;YACL,MAAM,EAAE,cAAc;YACtB,MAAM,EAAE,wCAAwC,MAAM,CAAC,IAAI,EAAE,IAAI,eAAe,EAAE;SACnF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -11,7 +11,13 @@ import { type EnvironmentChange } from "./environment.ts";
|
|
|
11
11
|
import type { VectorId } from "./vectors/types.ts";
|
|
12
12
|
export type LikelyCause = "permission-denied" | "permission-pending" | "feature-disabled" | "app-not-running" | "app-updated" | "app-behavior-change"
|
|
13
13
|
/** A GUI drive could not reach the Things window (locked screen / unresponsive app), #512. */
|
|
14
|
-
| "ui-unreachable"
|
|
14
|
+
| "ui-unreachable"
|
|
15
|
+
/**
|
|
16
|
+
* A modal dialog is standing in Things, which makes the app answer "no such
|
|
17
|
+
* item" for rows that are present and hold its Things Cloud sync (#620,
|
|
18
|
+
* MODALX1). The one cause of `-1728` on a uuid the database shows.
|
|
19
|
+
*/
|
|
20
|
+
| "modal-open" | "schema-drift" | "unknown";
|
|
15
21
|
export interface FailureHint {
|
|
16
22
|
likelyCause: LikelyCause;
|
|
17
23
|
hint: string;
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { describeEnvironmentChanges } from "./environment.js";
|
|
2
2
|
const DENIED = /-1743|not authori[sz]ed to send apple events/i;
|
|
3
3
|
const EVENT_TIMED_OUT = /-1712|event timed out/i;
|
|
4
|
+
/**
|
|
5
|
+
* `-1728 Can't get <kind> id "…"` on a row the database shows perfectly present.
|
|
6
|
+
*
|
|
7
|
+
* This has ONE cause worth naming, and it is not a missing item (MODALX1 §2.1,
|
|
8
|
+
* golden-v4 / 3.23): a modal dialog standing anywhere in Things EMPTIES the
|
|
9
|
+
* app's top-level scripting collections — `count to dos` reads 0 — while every
|
|
10
|
+
* by-id read still answers. AppleScript's `delete` re-resolves its object
|
|
11
|
+
* specifier through that emptied list, so it raises -1728 for a to-do it can
|
|
12
|
+
* still `get name of`. Dismiss the dialog and the identical command lands.
|
|
13
|
+
* This is the whole of the #620 "ghost clone".
|
|
14
|
+
*/
|
|
15
|
+
const CANT_GET_ID = /-1728|can[’']?t get (to do|project|tag|area)( id)?/i;
|
|
4
16
|
/**
|
|
5
17
|
* The app macOS attributes an Automation request to — the TERMINAL EMULATOR
|
|
6
18
|
* hosting the process tree, not the CLI binary (live-confirmed 2026-07-12:
|
|
@@ -28,6 +40,18 @@ export function classifyTransportFailure(input) {
|
|
|
28
40
|
environmentSuffix(input.environmentChanges),
|
|
29
41
|
};
|
|
30
42
|
}
|
|
43
|
+
if (input.vector === "applescript" && CANT_GET_ID.test(input.stderr)) {
|
|
44
|
+
return {
|
|
45
|
+
likelyCause: "modal-open",
|
|
46
|
+
hint: "Things answered that it cannot find that item — which is what it says about an item " +
|
|
47
|
+
"that IS there whenever a dialog is open somewhere in the app: while one stands, Things " +
|
|
48
|
+
"reports its own lists as empty to scripted callers, so a change addressed by id cannot " +
|
|
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." +
|
|
52
|
+
environmentSuffix(input.environmentChanges),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
31
55
|
if (input.vector === "shortcuts" && input.timedOut) {
|
|
32
56
|
return {
|
|
33
57
|
likelyCause: "permission-pending",
|
|
@@ -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;
|
|
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,CAAC;IACzC,OAAO,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,sBAAsB,IAAI,GAAG,CAAC,CAAC,CAAC,mBAAmB,CAAC;AACjG,CAAC;AAED,SAAS,iBAAiB,CAAC,OAA4B;IACrD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACpC,OAAO,CACL,mCAAmC,0BAA0B,CAAC,OAAO,CAAC,KAAK;QAC3E,4DAA4D,CAC7D,CAAC;AACJ,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,wBAAwB,CAAC,KAKxC;IACC,IAAI,KAAK,CAAC,MAAM,KAAK,aAAa,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QAChE,OAAO;YACL,WAAW,EAAE,mBAAmB;YAChC,IAAI,EACF,qFAAqF;gBACrF,qFAAqF;gBACrF,wDAAwD;gBACxD,iBAAiB,CAAC,KAAK,CAAC,kBAAkB,C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B,IAAI,EACF,iFAAiF;gBACjF,wFAAwF;gBACxF,wFAAwF;gBACxF,mFAAmF;gBACnF,uFAAuF;gBACvF,uFAAuF;SAC1F,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,aAAa,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,EAAE,CAAC;QAC3F,OAAO;YACL,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EACF,yFAAyF;gBACzF,uFAAuF;gBACvF,yDAAyD;SAC5D,CAAC;IACJ,CAAC;IACD,MAAM,YAAY,GAAG,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,eAAe,CAAC,CAAC;IACvF,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO;YACL,WAAW,EAAE,aAAa;YAC1B,IAAI,EACF,uBAAuB,YAAY,CAAC,IAAI,IAAI,SAAS,MAAM,YAAY,CAAC,EAAE,IAAI,SAAS,IAAI;gBAC3F,kFAAkF;gBAClF,qEAAqE;SACxE,CAAC;IACJ,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,KAAK,aAAa,EAAE,CAAC;QACnC,OAAO;YACL,WAAW,EAAE,qBAAqB;YAClC,IAAI,EACF,qFAAqF;gBACrF,mFAAmF;gBACnF,YAAY;SACf,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MEASURED ceilings on Things' content fields, and the counters that
|
|
3
|
+
* measure a candidate value in the units the app actually cuts by.
|
|
4
|
+
*
|
|
5
|
+
* Why this exists (#621): a notes body a little over 10,000 characters was
|
|
6
|
+
* accepted by the app as a TRUNCATED PREFIX — cut mid-word, no error, the row
|
|
7
|
+
* mutated. The read-after-write caught the difference and reported a generic
|
|
8
|
+
* mismatch, so the caller learned that something was wrong but not that a limit
|
|
9
|
+
* existed, what it was, or that half the write had landed. Every field below is
|
|
10
|
+
* the same trap: the app never refuses an over-long value, it stores a prefix.
|
|
11
|
+
*
|
|
12
|
+
* THE LAW (NOTECAP1, [docs/lab/notecap1-notes-ceiling.md] — Things 3.23 build
|
|
13
|
+
* 32300036, golden `things-lab-golden-v4`). Two field classes, three ceilings:
|
|
14
|
+
*
|
|
15
|
+
* 1. **notes — 10,000 GRAPHEME CLUSTERS *and* 40,000 UTF-16 CODE UNITS,
|
|
16
|
+
* whichever binds first, on the URL scheme.** The cluster rule is the one
|
|
17
|
+
* ordinary text meets: 15,000 emoji cut to 10,000 emoji, 15,000 `e`+U+0301
|
|
18
|
+
* pairs cut to 10,000 pairs, and a regional-indicator flag or an emoji +
|
|
19
|
+
* skin-tone modifier each count as ONE. The unit rule only shows up in text
|
|
20
|
+
* whose clusters are unusually wide — a ZWJ emoji family is one cluster but
|
|
21
|
+
* eleven UTF-16 units — and it cuts on a surrogate-safe boundary rather than
|
|
22
|
+
* a cluster one, so it CAN leave a dangling joiner.
|
|
23
|
+
*
|
|
24
|
+
* This ceiling belongs to the URL scheme, not to the database or the app's
|
|
25
|
+
* model: AppleScript's `set notes` stores 60 KB without complaint. Every
|
|
26
|
+
* notes-carrying operation here compiles to the URL scheme (`commands.ts`
|
|
27
|
+
* refuses any other vector), so it is the ceiling every caller meets.
|
|
28
|
+
*
|
|
29
|
+
* It applies PER URL PARAMETER VALUE, not to the resulting field: an
|
|
30
|
+
* `append-notes` fragment under the ceiling joins onto an existing body and
|
|
31
|
+
* the joined result lands whole, well past 10,000. So the FRAGMENT is what
|
|
32
|
+
* must be checked — validating the JOIN would refuse writes the app performs
|
|
33
|
+
* correctly.
|
|
34
|
+
*
|
|
35
|
+
* 2. **titles and names — 4,000 UTF-16 CODE UNITS, in the app's model.** To-do
|
|
36
|
+
* titles, project titles, heading titles, checklist-item titles, area names
|
|
37
|
+
* and tag names all cut at 4,000 UTF-16 units, and unlike notes the cut is
|
|
38
|
+
* the SAME through AppleScript, so it is a property of the app rather than
|
|
39
|
+
* of a transport. The unit is UTF-16, not clusters: an emoji title cuts at
|
|
40
|
+
* 1,993 emoji (3,999 units), not 4,000 emoji. The cut lands on a cluster
|
|
41
|
+
* boundary, which is why a value can stop one unit short of the ceiling.
|
|
42
|
+
*
|
|
43
|
+
* There is **no URL-length ceiling** below either: a 1,000,100-character
|
|
44
|
+
* `things:///update` dispatches cleanly and still cuts the notes at exactly
|
|
45
|
+
* 10,000 clusters, and padding the URL with 5,000 more characters of `title`
|
|
46
|
+
* does not move that cut. The transport is not the constraint, so there is
|
|
47
|
+
* nothing here for vector selection to route around.
|
|
48
|
+
*
|
|
49
|
+
* Fields with no measured app cap carry no limit here — these are refusals
|
|
50
|
+
* against a value the app would silently mangle, not policy.
|
|
51
|
+
*/
|
|
52
|
+
/**
|
|
53
|
+
* Count grapheme clusters — the unit the notes ceiling is expressed in.
|
|
54
|
+
*
|
|
55
|
+
* `String.prototype.length` is UTF-16 code units and would over-count every
|
|
56
|
+
* emoji and every combining pair, refusing an emoji-dense note at half the real
|
|
57
|
+
* ceiling. `Intl.Segmenter` counts extended grapheme clusters (UAX #29), which
|
|
58
|
+
* is what the measurement matched on every payload class probed.
|
|
59
|
+
*/
|
|
60
|
+
export declare function countGraphemes(value: string): number;
|
|
61
|
+
/** Which unit a ceiling is counted in. */
|
|
62
|
+
export type LengthUnit = "graphemes" | "utf16";
|
|
63
|
+
/** One measured ceiling: how many, of what. */
|
|
64
|
+
export interface LengthLimit {
|
|
65
|
+
max: number;
|
|
66
|
+
unit: LengthUnit;
|
|
67
|
+
}
|
|
68
|
+
/** Notes: 10,000 grapheme clusters, and 40,000 UTF-16 units, whichever binds. */
|
|
69
|
+
export declare const NOTES_LIMITS: readonly LengthLimit[];
|
|
70
|
+
/** Titles and names: 4,000 UTF-16 code units, on every vector. */
|
|
71
|
+
export declare const TITLE_LIMITS: readonly LengthLimit[];
|
|
72
|
+
/**
|
|
73
|
+
* How many checklist items ONE dispatch carries (NOTECAP1 CK-COUNT). Past this
|
|
74
|
+
* Things keeps the first 100 and drops the rest — the count-axis version of the
|
|
75
|
+
* same silent partial landing, and just as invisible: the to-do is created, the
|
|
76
|
+
* items beyond 100 simply never exist.
|
|
77
|
+
*/
|
|
78
|
+
export declare const CHECKLIST_MAX_ITEMS = 100;
|
|
79
|
+
/** Measure a value in one ceiling's own unit. */
|
|
80
|
+
export declare function measure(value: string, unit: LengthUnit): number;
|
|
81
|
+
/** How a unit is named to the caller, in the words that make the number checkable. */
|
|
82
|
+
export declare function unitName(unit: LengthUnit): string;
|
|
83
|
+
/**
|
|
84
|
+
* The refusal detail for an over-long field value, in the registry's house
|
|
85
|
+
* shape (`<path>: expected … — received …`). Names the maximum, its unit, and
|
|
86
|
+
* the size actually handed over, plus what the app would have done with it — so
|
|
87
|
+
* the caller can trim without guessing and knows why the call was not simply
|
|
88
|
+
* passed through. The FIRST exceeded ceiling is the one reported.
|
|
89
|
+
*
|
|
90
|
+
* Returns null when the value fits every ceiling.
|
|
91
|
+
*/
|
|
92
|
+
export declare function fieldLengthRefusal(path: string, value: string, limits: readonly LengthLimit[]): string | null;
|
|
93
|
+
/**
|
|
94
|
+
* The post-write reading of a field mismatch: when what landed is a strict
|
|
95
|
+
* PREFIX of what was asked for, the app truncated rather than ignored, and the
|
|
96
|
+
* item now holds a partial value. Returns the sentence naming that — how much
|
|
97
|
+
* landed, how much was asked for — or null when the mismatch is something else
|
|
98
|
+
* (a different value, a longer one, a non-string field).
|
|
99
|
+
*/
|
|
100
|
+
export declare function describeTruncation(field: string, expected: unknown, observed: unknown): string | null;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MEASURED ceilings on Things' content fields, and the counters that
|
|
3
|
+
* measure a candidate value in the units the app actually cuts by.
|
|
4
|
+
*
|
|
5
|
+
* Why this exists (#621): a notes body a little over 10,000 characters was
|
|
6
|
+
* accepted by the app as a TRUNCATED PREFIX — cut mid-word, no error, the row
|
|
7
|
+
* mutated. The read-after-write caught the difference and reported a generic
|
|
8
|
+
* mismatch, so the caller learned that something was wrong but not that a limit
|
|
9
|
+
* existed, what it was, or that half the write had landed. Every field below is
|
|
10
|
+
* the same trap: the app never refuses an over-long value, it stores a prefix.
|
|
11
|
+
*
|
|
12
|
+
* THE LAW (NOTECAP1, [docs/lab/notecap1-notes-ceiling.md] — Things 3.23 build
|
|
13
|
+
* 32300036, golden `things-lab-golden-v4`). Two field classes, three ceilings:
|
|
14
|
+
*
|
|
15
|
+
* 1. **notes — 10,000 GRAPHEME CLUSTERS *and* 40,000 UTF-16 CODE UNITS,
|
|
16
|
+
* whichever binds first, on the URL scheme.** The cluster rule is the one
|
|
17
|
+
* ordinary text meets: 15,000 emoji cut to 10,000 emoji, 15,000 `e`+U+0301
|
|
18
|
+
* pairs cut to 10,000 pairs, and a regional-indicator flag or an emoji +
|
|
19
|
+
* skin-tone modifier each count as ONE. The unit rule only shows up in text
|
|
20
|
+
* whose clusters are unusually wide — a ZWJ emoji family is one cluster but
|
|
21
|
+
* eleven UTF-16 units — and it cuts on a surrogate-safe boundary rather than
|
|
22
|
+
* a cluster one, so it CAN leave a dangling joiner.
|
|
23
|
+
*
|
|
24
|
+
* This ceiling belongs to the URL scheme, not to the database or the app's
|
|
25
|
+
* model: AppleScript's `set notes` stores 60 KB without complaint. Every
|
|
26
|
+
* notes-carrying operation here compiles to the URL scheme (`commands.ts`
|
|
27
|
+
* refuses any other vector), so it is the ceiling every caller meets.
|
|
28
|
+
*
|
|
29
|
+
* It applies PER URL PARAMETER VALUE, not to the resulting field: an
|
|
30
|
+
* `append-notes` fragment under the ceiling joins onto an existing body and
|
|
31
|
+
* the joined result lands whole, well past 10,000. So the FRAGMENT is what
|
|
32
|
+
* must be checked — validating the JOIN would refuse writes the app performs
|
|
33
|
+
* correctly.
|
|
34
|
+
*
|
|
35
|
+
* 2. **titles and names — 4,000 UTF-16 CODE UNITS, in the app's model.** To-do
|
|
36
|
+
* titles, project titles, heading titles, checklist-item titles, area names
|
|
37
|
+
* and tag names all cut at 4,000 UTF-16 units, and unlike notes the cut is
|
|
38
|
+
* the SAME through AppleScript, so it is a property of the app rather than
|
|
39
|
+
* of a transport. The unit is UTF-16, not clusters: an emoji title cuts at
|
|
40
|
+
* 1,993 emoji (3,999 units), not 4,000 emoji. The cut lands on a cluster
|
|
41
|
+
* boundary, which is why a value can stop one unit short of the ceiling.
|
|
42
|
+
*
|
|
43
|
+
* There is **no URL-length ceiling** below either: a 1,000,100-character
|
|
44
|
+
* `things:///update` dispatches cleanly and still cuts the notes at exactly
|
|
45
|
+
* 10,000 clusters, and padding the URL with 5,000 more characters of `title`
|
|
46
|
+
* does not move that cut. The transport is not the constraint, so there is
|
|
47
|
+
* nothing here for vector selection to route around.
|
|
48
|
+
*
|
|
49
|
+
* Fields with no measured app cap carry no limit here — these are refusals
|
|
50
|
+
* against a value the app would silently mangle, not policy.
|
|
51
|
+
*/
|
|
52
|
+
/**
|
|
53
|
+
* Printable ASCII plus LF and TAB: each of these is its own cluster, so the
|
|
54
|
+
* code-unit count IS the cluster count. CR is deliberately excluded — a CR LF
|
|
55
|
+
* pair is a SINGLE cluster, and counting it as two would refuse a CRLF-heavy
|
|
56
|
+
* body about twice as early as the app would cut it.
|
|
57
|
+
*/
|
|
58
|
+
const ONE_CLUSTER_PER_UNIT = /^[\x20-\x7e\n\t]*$/;
|
|
59
|
+
let segmenter;
|
|
60
|
+
/**
|
|
61
|
+
* Count grapheme clusters — the unit the notes ceiling is expressed in.
|
|
62
|
+
*
|
|
63
|
+
* `String.prototype.length` is UTF-16 code units and would over-count every
|
|
64
|
+
* emoji and every combining pair, refusing an emoji-dense note at half the real
|
|
65
|
+
* ceiling. `Intl.Segmenter` counts extended grapheme clusters (UAX #29), which
|
|
66
|
+
* is what the measurement matched on every payload class probed.
|
|
67
|
+
*/
|
|
68
|
+
export function countGraphemes(value) {
|
|
69
|
+
// Fast path for the overwhelming majority of real values; the segmenter walk
|
|
70
|
+
// is the expensive part on a 10,000-character body.
|
|
71
|
+
if (ONE_CLUSTER_PER_UNIT.test(value))
|
|
72
|
+
return value.length;
|
|
73
|
+
segmenter ??= new Intl.Segmenter(undefined, { granularity: "grapheme" });
|
|
74
|
+
let n = 0;
|
|
75
|
+
for (const _ of segmenter.segment(value))
|
|
76
|
+
n++;
|
|
77
|
+
return n;
|
|
78
|
+
}
|
|
79
|
+
/** Notes: 10,000 grapheme clusters, and 40,000 UTF-16 units, whichever binds. */
|
|
80
|
+
export const NOTES_LIMITS = [
|
|
81
|
+
{ max: 10_000, unit: "graphemes" },
|
|
82
|
+
{ max: 40_000, unit: "utf16" },
|
|
83
|
+
];
|
|
84
|
+
/** Titles and names: 4,000 UTF-16 code units, on every vector. */
|
|
85
|
+
export const TITLE_LIMITS = [{ max: 4_000, unit: "utf16" }];
|
|
86
|
+
/**
|
|
87
|
+
* How many checklist items ONE dispatch carries (NOTECAP1 CK-COUNT). Past this
|
|
88
|
+
* Things keeps the first 100 and drops the rest — the count-axis version of the
|
|
89
|
+
* same silent partial landing, and just as invisible: the to-do is created, the
|
|
90
|
+
* items beyond 100 simply never exist.
|
|
91
|
+
*/
|
|
92
|
+
export const CHECKLIST_MAX_ITEMS = 100;
|
|
93
|
+
/** Measure a value in one ceiling's own unit. */
|
|
94
|
+
export function measure(value, unit) {
|
|
95
|
+
return unit === "utf16" ? value.length : countGraphemes(value);
|
|
96
|
+
}
|
|
97
|
+
/** How a unit is named to the caller, in the words that make the number checkable. */
|
|
98
|
+
export function unitName(unit) {
|
|
99
|
+
return unit === "utf16" ? "UTF-16 code units" : "characters";
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The refusal detail for an over-long field value, in the registry's house
|
|
103
|
+
* shape (`<path>: expected … — received …`). Names the maximum, its unit, and
|
|
104
|
+
* the size actually handed over, plus what the app would have done with it — so
|
|
105
|
+
* the caller can trim without guessing and knows why the call was not simply
|
|
106
|
+
* passed through. The FIRST exceeded ceiling is the one reported.
|
|
107
|
+
*
|
|
108
|
+
* Returns null when the value fits every ceiling.
|
|
109
|
+
*/
|
|
110
|
+
export function fieldLengthRefusal(path, value, limits) {
|
|
111
|
+
for (const limit of limits) {
|
|
112
|
+
const n = measure(value, limit.unit);
|
|
113
|
+
if (n <= limit.max)
|
|
114
|
+
continue;
|
|
115
|
+
return (`${path}: expected at most ${limit.max.toLocaleString("en-US")} ${unitName(limit.unit)} — ` +
|
|
116
|
+
`received ${n.toLocaleString("en-US")}; Things stores a longer value as a truncated ` +
|
|
117
|
+
`prefix rather than refusing it, so nothing was sent`);
|
|
118
|
+
}
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* The post-write reading of a field mismatch: when what landed is a strict
|
|
123
|
+
* PREFIX of what was asked for, the app truncated rather than ignored, and the
|
|
124
|
+
* item now holds a partial value. Returns the sentence naming that — how much
|
|
125
|
+
* landed, how much was asked for — or null when the mismatch is something else
|
|
126
|
+
* (a different value, a longer one, a non-string field).
|
|
127
|
+
*/
|
|
128
|
+
export function describeTruncation(field, expected, observed) {
|
|
129
|
+
if (typeof expected !== "string" || typeof observed !== "string")
|
|
130
|
+
return null;
|
|
131
|
+
if (observed.length === 0 || observed.length >= expected.length)
|
|
132
|
+
return null;
|
|
133
|
+
if (!expected.startsWith(observed))
|
|
134
|
+
return null;
|
|
135
|
+
const ceilings = (field === "notes" ? NOTES_LIMITS : TITLE_LIMITS)
|
|
136
|
+
.map((l) => `${l.max.toLocaleString("en-US")} ${unitName(l.unit)}`)
|
|
137
|
+
.join(" / ");
|
|
138
|
+
return (`${field} was TRUNCATED, not ignored: ${observed.length.toLocaleString("en-US")} of the ` +
|
|
139
|
+
`${expected.length.toLocaleString("en-US")} UTF-16 code units requested landed, and the ` +
|
|
140
|
+
`stored value is a prefix of what was sent — the item now holds a partial value. Things ` +
|
|
141
|
+
`caps this field at ${ceilings} and stores a longer value as a prefix rather than ` +
|
|
142
|
+
`refusing it`);
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=field-limits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-limits.js","sourceRoot":"","sources":["../../src/write/field-limits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH;;;;;GAKG;AACH,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAElD,IAAI,SAAqC,CAAC;AAE1C;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,6EAA6E;IAC7E,oDAAoD;IACpD,IAAI,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,MAAM,CAAC;IAC1D,SAAS,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,CAAC;IACzE,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,KAAK,MAAM,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,CAAC,EAAE,CAAC;IAC9C,OAAO,CAAC,CAAC;AACX,CAAC;AAWD,iFAAiF;AACjF,MAAM,CAAC,MAAM,YAAY,GAA2B;IAClD,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE;CAC/B,CAAC;AAEF,kEAAkE;AAClE,MAAM,CAAC,MAAM,YAAY,GAA2B,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AAEpF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEvC,iDAAiD;AACjD,MAAM,UAAU,OAAO,CAAC,KAAa,EAAE,IAAgB;IACrD,OAAO,IAAI,KA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