things-api 0.19.0 → 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 +3 -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/audit/schema.d.ts +19 -2
- package/dist/audit/schema.js.map +1 -1
- package/dist/capability.d.ts +166 -4
- package/dist/capability.js +303 -13
- package/dist/capability.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts +13 -1
- package/dist/cli/commands/doctor.js +52 -22
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/helpers.js +14 -3
- package/dist/cli/commands/helpers.js.map +1 -1
- package/dist/cli/commands/mcp.js +8 -0
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/repeat-flags.js +34 -2
- package/dist/cli/commands/repeat-flags.js.map +1 -1
- package/dist/cli/commands/setup.js +16 -3
- package/dist/cli/commands/setup.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/commands/writes.js +102 -67
- package/dist/cli/commands/writes.js.map +1 -1
- package/dist/cli/help.js +2 -0
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/interrupt.d.ts +54 -6
- package/dist/cli/interrupt.js +78 -12
- package/dist/cli/interrupt.js.map +1 -1
- package/dist/cli/main.js +10 -5
- package/dist/cli/main.js.map +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/contracts.d.ts +4 -4
- package/dist/contracts.js +1 -1
- package/dist/contracts.js.map +1 -1
- package/dist/deputy/install.d.ts +15 -1
- package/dist/deputy/install.js +46 -6
- package/dist/deputy/install.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 +34 -0
- package/dist/deputy/routing.js +95 -0
- package/dist/deputy/routing.js.map +1 -1
- package/dist/deputy/wake.d.ts +61 -0
- package/dist/deputy/wake.js +149 -0
- package/dist/deputy/wake.js.map +1 -0
- package/dist/diagnose.d.ts +6 -4
- package/dist/diagnose.js +20 -4
- package/dist/diagnose.js.map +1 -1
- package/dist/direct-setup.d.ts +31 -5
- package/dist/direct-setup.js +200 -26
- package/dist/direct-setup.js.map +1 -1
- package/dist/host-access.d.ts +12 -0
- package/dist/host-access.js +12 -0
- package/dist/host-access.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.js +23 -9
- package/dist/mcp/server.js.map +1 -1
- package/dist/op-result.js +8 -1
- package/dist/op-result.js.map +1 -1
- package/dist/session-grant.js +16 -1
- package/dist/session-grant.js.map +1 -1
- package/dist/surface-copy.d.ts +11 -3
- package/dist/surface-copy.js +11 -3
- package/dist/surface-copy.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/wizard.js +8 -1
- package/dist/wizard.js.map +1 -1
- 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/availability.d.ts +0 -15
- package/dist/write/availability.js +7 -62
- package/dist/write/availability.js.map +1 -1
- package/dist/write/batch.js +17 -6
- package/dist/write/batch.js.map +1 -1
- package/dist/write/commands.d.ts +10 -6
- package/dist/write/commands.js +120 -31
- package/dist/write/commands.js.map +1 -1
- package/dist/write/failure-hints.d.ts +36 -7
- package/dist/write/failure-hints.js +33 -14
- 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/guards.js +3 -2
- package/dist/write/guards.js.map +1 -1
- package/dist/write/move.js +9 -12
- package/dist/write/move.js.map +1 -1
- package/dist/write/operations.d.ts +15 -8
- package/dist/write/operations.js +9 -0
- package/dist/write/operations.js.map +1 -1
- package/dist/write/opid.d.ts +67 -23
- package/dist/write/opid.js +141 -19
- package/dist/write/opid.js.map +1 -1
- package/dist/write/param-schema.d.ts +17 -44
- package/dist/write/param-schema.js +74 -7
- package/dist/write/param-schema.js.map +1 -1
- package/dist/write/pipeline.d.ts +38 -7
- package/dist/write/pipeline.js +134 -18
- package/dist/write/pipeline.js.map +1 -1
- package/dist/write/pre-state.d.ts +30 -16
- package/dist/write/pre-state.js +88 -20
- package/dist/write/pre-state.js.map +1 -1
- package/dist/write/promote-clone.d.ts +26 -0
- package/dist/write/promote-clone.js +333 -41
- package/dist/write/promote-clone.js.map +1 -1
- package/dist/write/repeat-collateral.d.ts +31 -0
- package/dist/write/repeat-collateral.js +153 -0
- package/dist/write/repeat-collateral.js.map +1 -0
- package/dist/write/resolution-timestamps.js +25 -2
- package/dist/write/resolution-timestamps.js.map +1 -1
- package/dist/write/template-mutation.js +163 -16
- package/dist/write/template-mutation.js.map +1 -1
- package/dist/write/vectors/applescript.js +3 -10
- package/dist/write/vectors/applescript.js.map +1 -1
- package/dist/write/vectors/simulator.js +8 -2
- package/dist/write/vectors/simulator.js.map +1 -1
- package/dist/write/vectors/types.d.ts +236 -4
- package/dist/write/vectors/ui-certification.js +63 -13
- package/dist/write/vectors/ui-certification.js.map +1 -1
- package/dist/write/vectors/ui-chord.d.ts +144 -0
- package/dist/write/vectors/ui-chord.js +428 -0
- package/dist/write/vectors/ui-chord.js.map +1 -0
- package/dist/write/vectors/ui-drag.d.ts +8 -4
- package/dist/write/vectors/ui-drag.js +2 -0
- package/dist/write/vectors/ui-drag.js.map +1 -1
- package/dist/write/vectors/ui-recipes.d.ts +51 -3
- package/dist/write/vectors/ui-recipes.js +452 -44
- package/dist/write/vectors/ui-recipes.js.map +1 -1
- 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 +386 -13
- package/dist/write/vectors/ui.js +1543 -124
- package/dist/write/vectors/ui.js.map +1 -1
- package/dist/write/vectors/url-scheme.js +3 -0
- package/dist/write/vectors/url-scheme.js.map +1 -1
- package/dist/write/verify/delta.d.ts +41 -0
- package/dist/write/verify/delta.js +36 -2
- package/dist/write/verify/delta.js.map +1 -1
- package/dist/write/verify/poller.d.ts +4 -1
- package/dist/write/verify/poller.js +14 -0
- package/dist/write/verify/poller.js.map +1 -1
- package/package.json +1 -1
- package/schema/envelope.schema.json +2 -1
- package/skills/things-cli/SKILL.md +2 -2
package/dist/capability.js
CHANGED
|
@@ -57,14 +57,19 @@
|
|
|
57
57
|
* already read that file. Where the row cannot be read the verdict is an honest
|
|
58
58
|
* "unknown", which the write gate refuses on rather than resolving with a dialog.
|
|
59
59
|
*/
|
|
60
|
+
import { execFileSync } from "node:child_process";
|
|
61
|
+
import { homedir } from "node:os";
|
|
62
|
+
import { join } from "node:path";
|
|
60
63
|
import { DatabaseSync } from "node:sqlite";
|
|
61
64
|
import { loadConfig } from "./config.js";
|
|
62
|
-
import {
|
|
65
|
+
import { readContainerFileSync } from "./deputy/files.js";
|
|
66
|
+
import { deputyRouting, deputyRoutesDb, helpersExpected, settleDeputyAutomation, } from "./deputy/routing.js";
|
|
67
|
+
import { THINGS_BUNDLE_ID, wakeSystemEvents, wakeThings } from "./deputy/wake.js";
|
|
63
68
|
import { fdaGranted, hostApp, hostDisplayName, resetHostAccessForTests, tccDbPath, } from "./host-access.js";
|
|
64
69
|
import { sessionGrantValid } from "./session-grant.js";
|
|
65
70
|
export { fdaGranted, hostApp, hostDisplayName, tccDbPath, } from "./host-access.js";
|
|
66
71
|
/** The Things application's bundle identifier — the Automation grant's target. */
|
|
67
|
-
export
|
|
72
|
+
export { THINGS_BUNDLE_ID } from "./deputy/wake.js";
|
|
68
73
|
/** True when this verdict permits opening the live container. */
|
|
69
74
|
export function readAllowed(capability) {
|
|
70
75
|
return capability.mode !== "none" && capability.mode !== "helpers-unavailable";
|
|
@@ -73,9 +78,25 @@ export function readAllowed(capability) {
|
|
|
73
78
|
export function uiAllowed(capability) {
|
|
74
79
|
return capability.mode === "helpers" || capability.mode === "direct-escape";
|
|
75
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* True when a URL-scheme MUTATION may be dispatched.
|
|
83
|
+
*
|
|
84
|
+
* `unreadable` is permissive, and deliberately so — the asymmetry with the
|
|
85
|
+
* write gate is the point. There, an unknown standing is refused because
|
|
86
|
+
* resolving it means sending the Apple Event that IS the dialog. Here,
|
|
87
|
+
* dispatching costs nothing on a machine whose answer is already "enabled",
|
|
88
|
+
* which is every settled machine; only the two states we have positively READ
|
|
89
|
+
* as not-enabled are refused. What catches the unreadable case instead is the
|
|
90
|
+
* read-after-write verify plus its likely-cause hint (src/write/failure-hints.ts).
|
|
91
|
+
*/
|
|
92
|
+
export function urlSchemeAllowed(capability) {
|
|
93
|
+
return capability.mode === "enabled" || capability.mode === "unreadable";
|
|
94
|
+
}
|
|
76
95
|
/** True when app automation may be dispatched. */
|
|
77
96
|
export function writeAllowed(capability) {
|
|
78
|
-
return capability.mode === "deputy" ||
|
|
97
|
+
return (capability.mode === "deputy" ||
|
|
98
|
+
capability.mode === "direct-granted" ||
|
|
99
|
+
capability.mode === "direct-escape");
|
|
79
100
|
}
|
|
80
101
|
// ── The prompt-free probes ───────────────────────────────────────────────────
|
|
81
102
|
/**
|
|
@@ -108,6 +129,21 @@ function automationAuthValueDefault(env, client, target) {
|
|
|
108
129
|
}
|
|
109
130
|
}
|
|
110
131
|
}
|
|
132
|
+
// ── The lab escapes (not consumer surface) ───────────────────────────────────
|
|
133
|
+
/**
|
|
134
|
+
* Is one of the lab's documented escapes set? ({@link UI_DIRECT_ESCAPE_ENV},
|
|
135
|
+
* {@link WRITE_DIRECT_ESCAPE_ENV}.)
|
|
136
|
+
*
|
|
137
|
+
* Both are read in exactly one place each — the capability function for the
|
|
138
|
+
* vector they cover — and both spell "on" the same way, as the literal `1`.
|
|
139
|
+
* Anything else is off, deliberately: an escape that answered to `true`, `yes`
|
|
140
|
+
* or a stray empty string would be a config surface, and these are neither
|
|
141
|
+
* config nor consumer surface. They are documented in docs/lab/harness.md and
|
|
142
|
+
* exported by the lab's guest environment; nothing shipped mentions them.
|
|
143
|
+
*/
|
|
144
|
+
function labEscapeSet(env, name) {
|
|
145
|
+
return (env[name] ?? "") === "1";
|
|
146
|
+
}
|
|
111
147
|
// ── Read capability (Article I + II) ─────────────────────────────────────────
|
|
112
148
|
/**
|
|
113
149
|
* Errnos that mean a plain "no" rather than something worth telling the user
|
|
@@ -117,12 +153,26 @@ function automationAuthValueDefault(env, client, target) {
|
|
|
117
153
|
* into "you lack permission".
|
|
118
154
|
*/
|
|
119
155
|
const ORDINARY_DENIALS = new Set(["EPERM", "EACCES", "ENOENT"]);
|
|
120
|
-
/**
|
|
156
|
+
/**
|
|
157
|
+
* The ways a machine can earn read capability, phrased for a human.
|
|
158
|
+
*
|
|
159
|
+
* The ask-again line is deliberately CONDITIONAL, because of what this process
|
|
160
|
+
* can and cannot know. A container that will not open carries no cause: "this
|
|
161
|
+
* host app was never asked" and "this host app was asked and the human clicked
|
|
162
|
+
* Don't Allow" are the same observation from here, and the app-data class
|
|
163
|
+
* cannot be told apart without opening the container — which is the very act
|
|
164
|
+
* that raises the dialog (Article I corollary). What IS measured is the price
|
|
165
|
+
* of a refusal (APDP1, docs/lab/apdp1-grant-pinning.md): it stands for the
|
|
166
|
+
* whole life of that host-app instance, every later open failing instantly and
|
|
167
|
+
* silently, and macOS never re-asks inside it. So the line names the relaunch
|
|
168
|
+
* as the way to be asked again without asserting that anyone refused anything.
|
|
169
|
+
*/
|
|
121
170
|
function readRemediation(hostName) {
|
|
122
171
|
return [
|
|
123
172
|
"run `things helpers setup` — reads then flow through a helper that holds its own durable grant",
|
|
173
|
+
"or run `things setup` — it asks for read access once, while you are at the machine",
|
|
174
|
+
`if that dialog was already refused, quit and reopen ${hostName} first — macOS does not ask a second time inside one run of an app`,
|
|
124
175
|
`or grant Full Disk Access to ${hostName} in System Settings ▸ Privacy & Security ▸ Full Disk Access`,
|
|
125
|
-
"or run `things setup`, which walks through both",
|
|
126
176
|
];
|
|
127
177
|
}
|
|
128
178
|
/**
|
|
@@ -188,9 +238,15 @@ export function readCapability(options = {}, deps = {}) {
|
|
|
188
238
|
// app instance. Only consulted when FDA has already said no.
|
|
189
239
|
const session = sessionGrantValid(host.bundleId, deps);
|
|
190
240
|
if (session.valid) {
|
|
241
|
+
const name = hostDisplayName(deps);
|
|
191
242
|
return {
|
|
192
243
|
mode: "session-grant",
|
|
193
|
-
|
|
244
|
+
// MEASURED (APDP1): the grant belongs to the host app INSTANCE, so it
|
|
245
|
+
// covers every process under it — this command, other tabs and windows,
|
|
246
|
+
// anything they spawn — and it ends when that app quits. The copy states
|
|
247
|
+
// both halves, because the reach is the part that is worth knowing and
|
|
248
|
+
// the expiry is the part that must never read as durable.
|
|
249
|
+
detail: `${name} holds access to the Things data folder — every command running under ${name}, in any tab or window, reads it without a dialog until ${name} quits`,
|
|
194
250
|
remediation: [],
|
|
195
251
|
host,
|
|
196
252
|
};
|
|
@@ -231,6 +287,27 @@ function classifyAuthValue(value) {
|
|
|
231
287
|
return "granted";
|
|
232
288
|
return "unknown";
|
|
233
289
|
}
|
|
290
|
+
/**
|
|
291
|
+
* The LAB's escape hatch for the AppleScript vector — the write-side twin of
|
|
292
|
+
* {@link UI_DIRECT_ESCAPE_ENV}, and just as deliberately not consumer surface.
|
|
293
|
+
*
|
|
294
|
+
* A guest shell in a golden clone descends from sshd, not from an application
|
|
295
|
+
* bundle, so `hostApp()` finds no `__CFBundleIdentifier` and macOS has no
|
|
296
|
+
* identity to have recorded an Automation grant against. The verdict is
|
|
297
|
+
* therefore `direct-unknown` in every clone, which blocks every AppleScript-
|
|
298
|
+
* vector verb and every composite carrying an AppleScript leg. What the clone
|
|
299
|
+
* actually has is an in-guest Automation grant on the runner's own processes
|
|
300
|
+
* (the same AXVM1 layer the ui escape leans on), so the block is an artefact of
|
|
301
|
+
* UNKNOWABILITY, not of a missing grant. Setting this to `1` says so.
|
|
302
|
+
*
|
|
303
|
+
* Bounded, and the bound is the point: it is consulted ONLY on the
|
|
304
|
+
* bundle-id-less path. A host that has an identity is answered from its TCC row
|
|
305
|
+
* as it always was, so the escape can never mask a recorded refusal
|
|
306
|
+
* (`direct-denied`) or manufacture a grant for a real user's terminal.
|
|
307
|
+
* Documented in docs/lab/harness.md and exported by the lab's guest
|
|
308
|
+
* environment; nothing consumer-facing mentions it.
|
|
309
|
+
*/
|
|
310
|
+
export const WRITE_DIRECT_ESCAPE_ENV = "THINGS_API_WRITE_DIRECT";
|
|
234
311
|
/**
|
|
235
312
|
* May this process drive Things over Apple Events, and on whose authority?
|
|
236
313
|
*
|
|
@@ -240,11 +317,49 @@ function classifyAuthValue(value) {
|
|
|
240
317
|
* last state is deliberately NOT resolved here: resolving it means sending a
|
|
241
318
|
* real Apple Event, which is what raises the dialog, and Article I reserves
|
|
242
319
|
* that for `things setup`.
|
|
320
|
+
*
|
|
321
|
+
* LIVENESS BEFORE AUTHORIZATION (#617). The deputy's `not-running` is the
|
|
322
|
+
* ask-false determination having no answer for a CLOSED Things — a fact about
|
|
323
|
+
* the app's process, not about the grant. Two rules follow, and both matter:
|
|
324
|
+
*
|
|
325
|
+
* - while the deputy is standing, that value NEVER falls through to the direct
|
|
326
|
+
* host branch. A silent direct engagement would put consent back on the
|
|
327
|
+
* terminal (the routing doctrine's no-fallback rule), and on a machine with
|
|
328
|
+
* no host record it would refuse a fully onboarded user with "run
|
|
329
|
+
* `things setup`" — the #610 false-onboarding loop, one vector over;
|
|
330
|
+
* - a `dispatch` caller resolves it by STARTING Things (a background
|
|
331
|
+
* LaunchServices dispatch, never an Apple Event) and re-reading the
|
|
332
|
+
* standing. Only what comes back is an authorization fact.
|
|
243
333
|
*/
|
|
244
|
-
export function writeCapability(deps = {}) {
|
|
334
|
+
export function writeCapability(options = {}, deps = {}) {
|
|
245
335
|
const env = deps.env ?? process.env;
|
|
246
336
|
const host = hostApp(deps);
|
|
247
|
-
const
|
|
337
|
+
const handshake = (deps.deputyAutomation ?? (() => deputyRouting(env).hello?.automation?.things))();
|
|
338
|
+
let deputyThings = handshake;
|
|
339
|
+
if (handshake === "not-running") {
|
|
340
|
+
let wake = null;
|
|
341
|
+
if (options.purpose === "dispatch") {
|
|
342
|
+
wake = (deps.wakeThings ?? (() => wakeThings(env)))();
|
|
343
|
+
deputyThings = wake.standing;
|
|
344
|
+
}
|
|
345
|
+
if (deputyThings === undefined || deputyThings === "not-running") {
|
|
346
|
+
return {
|
|
347
|
+
mode: "deputy-target-dormant",
|
|
348
|
+
detail: wake === null
|
|
349
|
+
? "Things is not running, so app control for it cannot be read — macOS answers for a " +
|
|
350
|
+
"running app only, and whatever the helpers hold is unreadable while it is down"
|
|
351
|
+
: `Things is not running and ${wake.detail} — app control for it cannot be read while it is down`,
|
|
352
|
+
remediation: [
|
|
353
|
+
"open Things, then rerun this command",
|
|
354
|
+
`or start it in the background with \`open -g -b ${THINGS_BUNDLE_ID}\``,
|
|
355
|
+
],
|
|
356
|
+
host,
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
// A real standing at last: hand it to the routing layer, whose own
|
|
360
|
+
// onboarding gate deferred on the same non-answer (./deputy/routing.ts).
|
|
361
|
+
(deps.settleDeputyAutomation ?? settleDeputyAutomation)(deputyThings);
|
|
362
|
+
}
|
|
248
363
|
if (deputyThings === "granted") {
|
|
249
364
|
return {
|
|
250
365
|
mode: "deputy",
|
|
@@ -254,6 +369,14 @@ export function writeCapability(deps = {}) {
|
|
|
254
369
|
};
|
|
255
370
|
}
|
|
256
371
|
if (host.bundleId === null) {
|
|
372
|
+
if (labEscapeSet(env, WRITE_DIRECT_ESCAPE_ENV)) {
|
|
373
|
+
return {
|
|
374
|
+
mode: "direct-escape",
|
|
375
|
+
detail: `${WRITE_DIRECT_ESCAPE_ENV}=1 — Apple Events are sent directly under this process (lab escape)`,
|
|
376
|
+
remediation: [],
|
|
377
|
+
host,
|
|
378
|
+
};
|
|
379
|
+
}
|
|
257
380
|
return {
|
|
258
381
|
mode: "direct-unknown",
|
|
259
382
|
detail: "this process does not descend from an application bundle, so macOS has no identity " +
|
|
@@ -310,7 +433,8 @@ export class WriteCapabilityError extends Error {
|
|
|
310
433
|
}
|
|
311
434
|
// ── UI capability (Article IV) ───────────────────────────────────────────────
|
|
312
435
|
/**
|
|
313
|
-
* The LAB's escape hatch, and deliberately not consumer
|
|
436
|
+
* The LAB's escape hatch for the ui vector, and deliberately not consumer
|
|
437
|
+
* surface (its write-side twin is {@link WRITE_DIRECT_ESCAPE_ENV}). The VM lab and
|
|
314
438
|
* the guest e2e bundle drive the UI vector DIRECT — the in-guest Accessibility
|
|
315
439
|
* grant is held by the runner's own processes (the AXVM1 layer), there is no
|
|
316
440
|
* helper bundle in a disposable clone, and there is nobody to answer a dialog
|
|
@@ -340,7 +464,11 @@ function deputyGuiStandingDefault(env) {
|
|
|
340
464
|
*
|
|
341
465
|
* Every answer is prompt-free: the config key is a file read, and the deputy's
|
|
342
466
|
* `hello` carries `AXIsProcessTrusted()` plus its own `AEDeterminePermission`
|
|
343
|
-
* verdict for System Events.
|
|
467
|
+
* verdict for System Events. The one state that needs more than a read is a
|
|
468
|
+
* DORMANT System Events, which macOS reaps whenever it has been idle: the
|
|
469
|
+
* target is started in the background — never by sending it an event — and the
|
|
470
|
+
* determination re-read, so `not-running` resolves to the truth instead of
|
|
471
|
+
* masquerading as a missing grant (./deputy/wake.ts).
|
|
344
472
|
*/
|
|
345
473
|
export function uiCapability(deps = {}) {
|
|
346
474
|
const env = deps.env ?? process.env;
|
|
@@ -357,7 +485,7 @@ export function uiCapability(deps = {}) {
|
|
|
357
485
|
host,
|
|
358
486
|
};
|
|
359
487
|
}
|
|
360
|
-
if ((env
|
|
488
|
+
if (labEscapeSet(env, UI_DIRECT_ESCAPE_ENV)) {
|
|
361
489
|
return {
|
|
362
490
|
mode: "direct-escape",
|
|
363
491
|
detail: `${UI_DIRECT_ESCAPE_ENV}=1 — GUI-driving runs directly under this process (lab escape)`,
|
|
@@ -374,14 +502,38 @@ export function uiCapability(deps = {}) {
|
|
|
374
502
|
host,
|
|
375
503
|
};
|
|
376
504
|
}
|
|
505
|
+
// LIVENESS BEFORE AUTHORIZATION (#610). System Events is an on-demand agent
|
|
506
|
+
// macOS reaps when idle, and the ask-false determination cannot answer for a
|
|
507
|
+
// target that is down — so the deputy's `not-running` describes the PROCESS,
|
|
508
|
+
// not the grant, and treating it as a missing grant sends a fully onboarded
|
|
509
|
+
// machine back through onboarding. Start it (a background launch raises no
|
|
510
|
+
// dialog; waking it with an Apple event would), then re-read the
|
|
511
|
+
// determination. Only after that is the standing an authorization fact.
|
|
512
|
+
let systemEvents = standing.systemEvents;
|
|
513
|
+
let wake = null;
|
|
514
|
+
if (systemEvents === "not-running") {
|
|
515
|
+
wake = (deps.wakeSystemEvents ?? (() => wakeSystemEvents(env)))();
|
|
516
|
+
systemEvents = wake.standing;
|
|
517
|
+
}
|
|
518
|
+
if (wake !== null && (systemEvents === undefined || systemEvents === "not-running")) {
|
|
519
|
+
return {
|
|
520
|
+
mode: "target-unreachable",
|
|
521
|
+
detail: `System Events is not running and ${wake.detail} — the Things window is driven through it`,
|
|
522
|
+
remediation: [
|
|
523
|
+
'start it with `open -g -a "System Events"`, then rerun this command',
|
|
524
|
+
"or log out and back in — System Events is a macOS component of your login session",
|
|
525
|
+
],
|
|
526
|
+
host,
|
|
527
|
+
};
|
|
528
|
+
}
|
|
377
529
|
const missing = [];
|
|
378
530
|
if (standing.axTrusted !== true) {
|
|
379
531
|
missing.push(standing.axTrusted === undefined
|
|
380
532
|
? "Accessibility (these helpers predate the permission handshake — rebuild)"
|
|
381
533
|
: "Accessibility");
|
|
382
534
|
}
|
|
383
|
-
if (
|
|
384
|
-
missing.push(`automation → System Events (${
|
|
535
|
+
if (systemEvents !== "granted") {
|
|
536
|
+
missing.push(`automation → System Events (${systemEvents ?? "unknown"})`);
|
|
385
537
|
}
|
|
386
538
|
if (missing.length === 0) {
|
|
387
539
|
return {
|
|
@@ -398,6 +550,133 @@ export function uiCapability(deps = {}) {
|
|
|
398
550
|
host,
|
|
399
551
|
};
|
|
400
552
|
}
|
|
553
|
+
// ── URL-scheme capability (Things' own in-app authorization) ─────────────────
|
|
554
|
+
/**
|
|
555
|
+
* Where the app records the answer. MEASURED (URLEN1, Things 3.23): this is the
|
|
556
|
+
* ONLY home — the un-TCC'd user domain `~/Library/Preferences/
|
|
557
|
+
* com.culturedcode.ThingsMac.plist` carries window frames and Sparkle keys and
|
|
558
|
+
* nothing else, under any spelling of the name, so there is no consent-free
|
|
559
|
+
* copy to prefer. The authoritative one lives inside the group container.
|
|
560
|
+
*/
|
|
561
|
+
const THINGS_PREFS_PLIST = join("Library/Group Containers/JLMPQHK86H.com.culturedcode.ThingsMac", "Library/Preferences/JLMPQHK86H.com.culturedcode.ThingsMac.plist");
|
|
562
|
+
/**
|
|
563
|
+
* Read standings that ALREADY cover the Things group container, so opening a
|
|
564
|
+
* file inside it adds no consent class that is not already settled.
|
|
565
|
+
*
|
|
566
|
+
* `explicit-db` is deliberately absent: a caller-supplied database path says
|
|
567
|
+
* nothing about the container, and opening it to find out is the "try it and
|
|
568
|
+
* see" the Article I corollary forbids. Such a caller gets `unreadable`, which
|
|
569
|
+
* is permissive — exactly the right direction for a path outside the doctrine.
|
|
570
|
+
*/
|
|
571
|
+
const CONTAINER_REACHABLE = new Set([
|
|
572
|
+
"helpers",
|
|
573
|
+
"direct-fda",
|
|
574
|
+
"session-grant",
|
|
575
|
+
]);
|
|
576
|
+
function extractUriSchemeEnabledDefault(plistBytes) {
|
|
577
|
+
return execFileSync("plutil", ["-extract", "uriSchemeEnabled", "raw", "-o", "-", "--", "-"], {
|
|
578
|
+
input: plistBytes,
|
|
579
|
+
encoding: "utf8",
|
|
580
|
+
timeout: 5000,
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
/** The one line every not-enabled verdict ends with. */
|
|
584
|
+
const URL_SETTINGS_PATH = "Things ▸ Settings ▸ General ▸ Enable Things URLs";
|
|
585
|
+
/**
|
|
586
|
+
* Has Things been authorized to act on `things:///` commands, and how do we know?
|
|
587
|
+
*
|
|
588
|
+
* Stateless per invocation, like every other verdict here: the setting is the
|
|
589
|
+
* user's to flip at any moment, and a cached "yes" would be a stored onboarding
|
|
590
|
+
* flag by another name. The common case costs one file read plus one `plutil`.
|
|
591
|
+
*
|
|
592
|
+
* WHY THIS IS GATED ON THE READ STANDING. The plist lives inside the Things
|
|
593
|
+
* group container, which is the same `kTCCServiceSystemPolicyAppData` class as
|
|
594
|
+
* the database — so the open is itself what would raise the app-data modal on a
|
|
595
|
+
* machine that holds no standing. This function therefore never opens it
|
|
596
|
+
* speculatively: it asks {@link readCapability} first and reports `unreadable`
|
|
597
|
+
* unless the container is already reachable (helpers, FDA, or a live session
|
|
598
|
+
* grant). Where the helpers are serving, the read rides the reader's own
|
|
599
|
+
* security-scoped bookmark over the container, so the prefs plist is inside the
|
|
600
|
+
* granted subtree and no host grant is involved at all.
|
|
601
|
+
*
|
|
602
|
+
* MEASURED, all three states (URLEN1, golden-v4 / Things 3.23):
|
|
603
|
+
*
|
|
604
|
+
* - `1` — URL mutations execute.
|
|
605
|
+
* - `0` — every mutating verb (`add`, token-bearing `update`, the `json`
|
|
606
|
+
* batch) is dropped in TOTAL SILENCE: zero row delta, no dialog, no window
|
|
607
|
+
* of any kind, and nothing to wait for. Navigation URLs (`things:///show`)
|
|
608
|
+
* still work, so this gate covers mutations only.
|
|
609
|
+
* - absent — nobody has answered the app's own first-use "Things URL Scheme"
|
|
610
|
+
* dialog (Cancel / Enable). The dispatched request PARKS behind that dialog
|
|
611
|
+
* rather than being dropped, which is what #611 saw: with nobody at the
|
|
612
|
+
* machine, the verify window expired and the write reported a silent no-op.
|
|
613
|
+
*/
|
|
614
|
+
export function urlSchemeCapability(deps = {}) {
|
|
615
|
+
const host = hostApp(deps);
|
|
616
|
+
const standing = (deps.readStanding ?? (() => readCapability({}, deps)))();
|
|
617
|
+
if (!CONTAINER_REACHABLE.has(standing.mode)) {
|
|
618
|
+
return {
|
|
619
|
+
mode: "unreadable",
|
|
620
|
+
detail: "the app's preferences are inside the Things data folder, which this process has no " +
|
|
621
|
+
`standing to open (${standing.mode}) — whether ${URL_SETTINGS_PATH} is on is unknown`,
|
|
622
|
+
remediation: [],
|
|
623
|
+
host,
|
|
624
|
+
};
|
|
625
|
+
}
|
|
626
|
+
let bytes;
|
|
627
|
+
try {
|
|
628
|
+
bytes = (deps.readPrefsPlist ?? (() => readContainerFileSync(join(homedir(), THINGS_PREFS_PLIST))))();
|
|
629
|
+
}
|
|
630
|
+
catch {
|
|
631
|
+
return {
|
|
632
|
+
mode: "unreadable",
|
|
633
|
+
detail: `the app's preferences file could not be read — whether ${URL_SETTINGS_PATH} is on is unknown`,
|
|
634
|
+
remediation: [],
|
|
635
|
+
host,
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
let raw;
|
|
639
|
+
try {
|
|
640
|
+
raw = (deps.extractUriSchemeEnabled ?? extractUriSchemeEnabledDefault)(bytes).trim();
|
|
641
|
+
}
|
|
642
|
+
catch {
|
|
643
|
+
// The file was readable and carries no such key. An unparseable file lands
|
|
644
|
+
// here too, and that is the safe direction: the refusal names a setting the
|
|
645
|
+
// human can flip, and flipping it rewrites the file and clears the verdict.
|
|
646
|
+
return {
|
|
647
|
+
mode: "never-asked",
|
|
648
|
+
detail: "nobody has answered Things' own 'Things URL Scheme' dialog on this machine — the app " +
|
|
649
|
+
"holds the first URL command behind it, and a command dispatched now waits there " +
|
|
650
|
+
"instead of running",
|
|
651
|
+
remediation: [
|
|
652
|
+
`turn on ${URL_SETTINGS_PATH}, then retry`,
|
|
653
|
+
"or send one `things:///` command while you are at the machine and click Enable",
|
|
654
|
+
],
|
|
655
|
+
host,
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
if (raw === "1" || raw === "true") {
|
|
659
|
+
return { mode: "enabled", detail: `${URL_SETTINGS_PATH} is on`, remediation: [], host };
|
|
660
|
+
}
|
|
661
|
+
if (raw === "0" || raw === "false") {
|
|
662
|
+
return {
|
|
663
|
+
mode: "disabled",
|
|
664
|
+
detail: `${URL_SETTINGS_PATH} is off — the app puts URL commands in an alert on its own ` +
|
|
665
|
+
"window and holds them there instead of running them",
|
|
666
|
+
remediation: [`turn on ${URL_SETTINGS_PATH}, then retry`],
|
|
667
|
+
host,
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
// A shape we have never seen. Reporting it verbatim beats guessing which way
|
|
671
|
+
// the app would read it, and `unreadable` lets the write proceed and be judged
|
|
672
|
+
// by the verify rather than refused on a value nobody has measured.
|
|
673
|
+
return {
|
|
674
|
+
mode: "unreadable",
|
|
675
|
+
detail: `the app records an unrecognized value for ${URL_SETTINGS_PATH} (${raw})`,
|
|
676
|
+
remediation: [],
|
|
677
|
+
host,
|
|
678
|
+
};
|
|
679
|
+
}
|
|
401
680
|
/** Thrown when GUI-driving is refused for want of capability (Article IV). */
|
|
402
681
|
export class UiCapabilityError extends Error {
|
|
403
682
|
remediation;
|
|
@@ -409,6 +688,17 @@ export class UiCapabilityError extends Error {
|
|
|
409
688
|
this.capability = capability;
|
|
410
689
|
}
|
|
411
690
|
}
|
|
691
|
+
/** Thrown when a URL-scheme mutation is refused for want of the app's own authorization. */
|
|
692
|
+
export class UrlSchemeCapabilityError extends Error {
|
|
693
|
+
remediation;
|
|
694
|
+
capability;
|
|
695
|
+
constructor(capability) {
|
|
696
|
+
super(`Things will not act on URL commands: ${capability.detail}. ${capability.remediation.join("; ")}.`);
|
|
697
|
+
this.name = "UrlSchemeCapabilityError";
|
|
698
|
+
this.remediation = capability.remediation;
|
|
699
|
+
this.capability = capability;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
412
702
|
/** Test seam: forget the one memo this module keeps (the host's display name). */
|
|
413
703
|
export function resetCapabilityForTests() {
|
|
414
704
|
resetHostAccessForTests();
|
package/dist/capability.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability.js","sourceRoot":"","sources":["../src/capability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EACL,UAAU,EAGV,OAAO,EACP,eAAe,EACf,uBAAuB,EACvB,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EACL,UAAU,EAGV,OAAO,EACP,eAAe,EACf,SAAS,GACV,MAAM,kBAAkB,CAAC;AAE1B,kFAAkF;AAClF,MAAM,CAAC,MAAM,gBAAgB,GAAG,4BAA4B,CAAC;AA0D7D,iEAAiE;AACjE,MAAM,UAAU,WAAW,CAAC,UAA0B;IACpD,OAAO,UAAU,CAAC,IAAI,KAAK,MAAM,IAAI,UAAU,CAAC,IAAI,KAAK,qBAAqB,CAAC;AACjF,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,SAAS,CAAC,UAAwB;IAChD,OAAO,UAAU,CAAC,IAAI,KAAK,SAAS,IAAI,UAAU,CAAC,IAAI,KAAK,eAAe,CAAC;AAC9E,CAAC;AAED,kDAAkD;AAClD,MAAM,UAAU,YAAY,CAAC,UAA2B;IACtD,OAAO,UAAU,CAAC,IAAI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c,CAAC;YACzD,IAAI;SACL,CAAC;IACJ,CAAC;IACD,6EAA6E;IAC7E,+EAA+E;IAC/E,oEAAoE;IACpE,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,6CAA6C,iBAAiB,KAAK,GAAG,GAAG;QACjF,WAAW,EAAE,EAAE;QACf,IAAI;KACL,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACjC,WAAW,CAAW;IACtB,UAAU,CAAe;IAClC,YAAY,UAAwB;QAClC,KAAK,CACH,uCAAuC,UAAU,CAAC,MAAM,KAAK,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAClG,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;QAChC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;QAC1C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF;AAED,4FAA4F;AAC5F,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IACxC,WAAW,CAAW;IACtB,UAAU,CAAsB;IACzC,YAAY,UAA+B;QACzC,KAAK,CACH,wCAAwC,UAAU,CAAC,MAAM,KAAK,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CACnG,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;QACvC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;QAC1C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF;AAED,kFAAkF;AAClF,MAAM,UAAU,uBAAuB;IACrC,uBAAuB,EAAE,CAAC;AAC5B,CAAC"}
|
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
* Exit codes: 0 healthy; 5 drift/unknown-version; 7 environment problems.
|
|
4
4
|
*/
|
|
5
5
|
import type { Command } from "commander";
|
|
6
|
-
import { type DiagnoseResult } from "../../index.ts";
|
|
6
|
+
import { type DiagnoseReport, type DiagnoseResult } from "../../index.ts";
|
|
7
7
|
export declare const runDoctor: (dbPath?: string) => DiagnoseResult;
|
|
8
|
+
/**
|
|
9
|
+
* The `── Permissions ──` section: one row per vector, and for each the STATE,
|
|
10
|
+
* the PROVENANCE (which identity actually holds the grant — the question the
|
|
11
|
+
* three summary rows above cannot answer), and the remediation when it is
|
|
12
|
+
* missing (docs/design/permissions-doctrine.md, Article II).
|
|
13
|
+
*
|
|
14
|
+
* Every value here comes from the prompt-free verdict `diagnose` already took.
|
|
15
|
+
* Doctor was an Article I violation once — it opened the container to find out
|
|
16
|
+
* whether it could — and this section must never regress that: it renders, it
|
|
17
|
+
* does not probe.
|
|
18
|
+
*/
|
|
19
|
+
export declare function permissionLines(report: DiagnoseReport): string[];
|
|
8
20
|
export declare function registerDoctor(program: Command): void;
|