things-api 0.15.0 → 0.16.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.
- package/README.md +4 -4
- package/dist/audit/schema.d.ts +8 -0
- package/dist/audit/schema.js.map +1 -1
- package/dist/cli/commands/install-skill.js +9 -2
- package/dist/cli/commands/install-skill.js.map +1 -1
- package/dist/cli/commands/repeat-flags.d.ts +11 -1
- package/dist/cli/commands/repeat-flags.js +23 -0
- package/dist/cli/commands/repeat-flags.js.map +1 -1
- package/dist/cli/commands/todo.js +49 -2
- package/dist/cli/commands/todo.js.map +1 -1
- package/dist/cli/commands/writes.js +182 -61
- package/dist/cli/commands/writes.js.map +1 -1
- package/dist/cli/help.js +14 -11
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/read-driver.d.ts +2 -2
- package/dist/cli/skill.d.ts +24 -0
- package/dist/cli/skill.js +40 -0
- package/dist/cli/skill.js.map +1 -1
- package/dist/client.d.ts +53 -12
- package/dist/client.js +6 -1
- package/dist/client.js.map +1 -1
- package/dist/contracts.d.ts +1 -1
- package/dist/contracts.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.js +132 -31
- package/dist/mcp/server.js.map +1 -1
- package/dist/model/entities.d.ts +35 -0
- package/dist/model/entities.js.map +1 -1
- package/dist/read/detail.js +49 -1
- package/dist/read/detail.js.map +1 -1
- package/dist/read/queries.d.ts +12 -0
- package/dist/read/queries.js +14 -0
- package/dist/read/queries.js.map +1 -1
- package/dist/read/shape.d.ts +25 -22
- package/dist/read/shape.js +81 -55
- package/dist/read/shape.js.map +1 -1
- package/dist/read/stage.d.ts +5 -5
- package/dist/read/stage.js +2 -2
- package/dist/read/views.d.ts +1 -1
- package/dist/read/views.js +4 -4
- package/dist/surface-copy.d.ts +2 -2
- package/dist/surface-copy.js +2 -2
- package/dist/write/batch.d.ts +28 -3
- package/dist/write/batch.js +162 -46
- package/dist/write/batch.js.map +1 -1
- package/dist/write/clone.d.ts +4 -0
- package/dist/write/clone.js +531 -0
- package/dist/write/clone.js.map +1 -0
- package/dist/write/commands.js +90 -4
- package/dist/write/commands.js.map +1 -1
- package/dist/write/guards.d.ts +1 -1
- package/dist/write/guards.js +33 -5
- package/dist/write/guards.js.map +1 -1
- package/dist/write/make-repeating-project.d.ts +2 -3
- package/dist/write/make-repeating-project.js +2 -73
- package/dist/write/make-repeating-project.js.map +1 -1
- package/dist/write/move.js +8 -1
- package/dist/write/move.js.map +1 -1
- package/dist/write/operations.d.ts +131 -9
- package/dist/write/operations.js +4 -1
- package/dist/write/operations.js.map +1 -1
- package/dist/write/pipeline.d.ts +38 -0
- package/dist/write/pipeline.js +68 -3
- package/dist/write/pipeline.js.map +1 -1
- package/dist/write/pre-state.js +7 -1
- package/dist/write/pre-state.js.map +1 -1
- package/dist/write/preserve-modified.d.ts +55 -0
- package/dist/write/preserve-modified.js +106 -0
- package/dist/write/preserve-modified.js.map +1 -0
- package/dist/write/promote-clone.d.ts +32 -0
- package/dist/write/promote-clone.js +620 -0
- package/dist/write/promote-clone.js.map +1 -0
- package/dist/write/resolution-timestamps.js +22 -0
- package/dist/write/resolution-timestamps.js.map +1 -1
- package/dist/write/reversibility.js +27 -14
- package/dist/write/reversibility.js.map +1 -1
- package/dist/write/undo.d.ts +11 -1
- package/dist/write/undo.js +126 -10
- package/dist/write/undo.js.map +1 -1
- package/dist/write/vectors/simulator.js +32 -1
- package/dist/write/vectors/simulator.js.map +1 -1
- package/dist/write/vectors/ui-certification.d.ts +1 -1
- package/dist/write/vectors/ui-certification.js +10 -3
- package/dist/write/vectors/ui-certification.js.map +1 -1
- package/package.json +1 -1
- package/skills/things-cli/SKILL.md +3 -2
- package/skills/things-cli/references/banner.md +1 -1
- package/skills/things-cli/references/contracts.md +17 -9
- package/skills/things-cli/references/data-model.md +2 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A typed TypeScript library + CLI (`things`) for programmatic interaction with [Things 3](https://culturedcode.com/things/) by Cultured Code.
|
|
4
4
|
|
|
5
|
-
**Status: read + write + MCP layers live and published to npm (v0.
|
|
5
|
+
**Status: read + write + MCP layers live and published to npm (v0.16.0 — see [CHANGELOG.md](CHANGELOG.md)).** Reads go straight to the local SQLite database (UI-exact Today ordering, sidebar-grouped Anytime/Someday with container-status cascade, decoded repeat rules, occurrence projections); writes run a verified pipeline over four write vectors — two lab-validated headless surfaces (the URL scheme + AppleScript) and two opt-in surfaces (Apple Shortcuts and an Accessibility-driven GUI vector) — with hazard guards, disruption-tier policy, a JSONL audit trail, batch mode, audit-replay undo (transactional across compound operations), full project lifecycle (complete/cancel/reopen/restore), heading rename/archive/unarchive with children policies, container detach, granular stateful checklists, tag hierarchy management incl. un-nesting, completion/creation backdating, Logbook imports, tiered fuzzy name resolution (uuid prefixes, `things:///show?id=` share links), and kind-neutral in-place reordering within any container or view (one `things reorder <refs…> [--start|--end|--before|--after] --in <target>` verb — Today/Evening, a project, an area, a heading's children, someday, inbox — plus `project move-heading` for the headings themselves and `area reorder` for the sidebar). The Apple Shortcuts surface is wired for the two headless capabilities nothing else can do: creating a heading in an existing project (`things project add-heading`) and clearing a reminder from a date-scheduled item (`things todo clear-reminder`). Both run through bundled proxy shortcuts (`things setup shortcuts`) and are gated on their presence. The fourth vector — the Accessibility-driven GUI vector — is off by default and drives the local Things app to reach transforms that exist on no scriptable surface (repeat-rule editing on existing to-dos and projects, convert-to-project, sidebar area reorder); see [Accessibility GUI vector](#accessibility-gui-vector-optional-off-by-default) below. Single-item permanent delete stays interactive-only (its macOS consent has no always-allow) and is out of the headless pipeline. See [docs/design/](docs/design/) for the architecture and VM-lab design, [docs/lab/](docs/lab/harness.md) for the probe harness and campaign results the write layer is grounded in, and [docs/atlas/](docs/atlas/schema-v26.md) for the database↔UI map.
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
8
|
things today --json # read: your Today list, Evening split, UI order
|
|
@@ -36,7 +36,7 @@ things setup shortcuts # opens an install sheet per missing shortcut — click
|
|
|
36
36
|
|
|
37
37
|
On each shortcut's first run macOS asks for permission — choose **Always Allow** so later runs are unattended (the two delete shortcuts re-ask on every run by design; Apple offers no always-allow for deletion). `things setup shortcuts --check` and `things doctor` report installation state.
|
|
38
38
|
|
|
39
|
-
Once installed, these Shortcuts-only operations become available as ordinary commands: `things
|
|
39
|
+
Once installed, these Shortcuts-only operations become available as ordinary commands: `things project add-heading <project> <title>` (create a heading in an existing project) and `things todo clear-reminder <uuid>` (clear a date-scheduled to-do's reminder while keeping its date). Both are also exposed over MCP (the `heading` tool's add-heading action, and `clear_reminder`). If a required shortcut is missing, the command is blocked up front with a pointer back to `things setup shortcuts` — nothing is dispatched.
|
|
40
40
|
|
|
41
41
|
### Accessibility GUI vector (optional, off by default)
|
|
42
42
|
|
|
@@ -73,7 +73,7 @@ Edits under `src/` take effect immediately. The bin launcher ([bin/things.js](bi
|
|
|
73
73
|
The CLI is designed to be driven by coding agents with no out-of-band knowledge. The contract:
|
|
74
74
|
|
|
75
75
|
1. **Discovery**: `things --help` (a grouped one-line-per-command index; orientation detail lives behind `things help <topic>` — `agent`, `filters`, `ids`, `output`, `writes`), per-command `things <command> --help` (behavior, side effects, and the exact acknowledgement flag names a write needs — regression-tested as API; by design it does **not** carry vector/tier/hazard vocabulary, which is banned from help text by [docs/design/surface-copy.md](docs/design/surface-copy.md) — that classification lives in `capabilities`), and `things capabilities [--op <op>] --json` (the lab-validated operation × vector support matrix with disruption tiers, hazards, per-op certification status, and probe-evidence ids). Command invocation follows one grammar (`things <view>` · `things <type> <verb> <subject>` · loose `things <verb> <subject>` · bare `things <subject>`) with a single precedence chain — registered command/alias → view keyword → reference resolution — specified in [docs/design/cli-grammar.md](docs/design/cli-grammar.md).
|
|
76
|
-
2. **Structured output**: every command takes `--json` → versioned envelope `{ apiVersion, ok, kind, data|error, meta }` on stdout; human chatter goes to stderr only. List views are **bounded by default**: the flat/chronological views (`inbox`, `today`, `upcoming`, `logbook`, `trash`, `search`, `changes`) return at most 50 items — raise with `--limit <n>` or lift with `--all` — and carry exact truncation counts in `meta.truncation { shown, total, limit, truncated }` (the split `today` view
|
|
76
|
+
2. **Structured output**: every command takes `--json` → versioned envelope `{ apiVersion, ok, kind, data|error, meta }` on stdout; human chatter goes to stderr only. List views are **bounded by default**: the flat/chronological views (`inbox`, `today`, `upcoming`, `logbook`, `trash`, `search`, `changes`) return at most 50 items — raise with `--limit <n>` or lift with `--all` — and carry exact truncation counts in `meta.truncation { shown, total, limit, truncated }` (the split `today` view returns `data.children = { today, evening }` — two keyed buckets, each carrying an inline `total` when that bucket was capped). The grouped catalogues (`anytime`, `someday`) always show every area and project row and cap per block instead (no `--limit`): `--area-limit <n>` (default 30) per area block on both, `--project-limit <n>` (default 3) per project block on anytime, `--show-active-project-items [n]` for someday's trailing active-projects section — and each capped block carries its own inline `total` on the bucket record it describes (present iff its rows were truncated), so a hidden count maps directly to the bucket it was hidden from; the whole-view `shown`/`total`/`limit`/`truncated` rollup still rides `meta.truncation` (the separate per-block `blocks[]` sidecar has been retired). A read whose database schema no longer matches this build's validated fingerprint carries a non-blocking `meta.warnings` note (the read still returns best-effort; the same drift hard-blocks writes). Same defaults and metadata apply over MCP.
|
|
77
77
|
3. **Stable exit codes**: `0` ok · `2` usage · `3` verify-failed (mutation executed, expected delta never appeared) · `4` blocked (hazard guard or disruption policy; error carries `remediation`) · `5` drift-blocked · `6` unsupported (op has no supported vector — `things batch` also aggregates to 6 when its only failures are unsupported ops) · `7` environment.
|
|
78
78
|
4. **Plan before executing**: every write supports `--dry-run` — compiled invocation (token-redacted), chosen vector, tier, hazards checked, expected delta. Nothing runs, nothing is audited.
|
|
79
79
|
5. **No prompts, ever**: risky semantics are explicit flags — `--children require-resolved|auto-complete` (project completion cascades), `--acknowledge-checklist-reset` (checklist replacement destroys per-item state), `--acknowledge-project-reopen` (open child reopens a resolved project), `--dangerously-permanent` (area/tag delete and empty-trash skip the Trash), `--dangerously-drive-gui` (each Accessibility GUI-vector call).
|
|
@@ -141,6 +141,6 @@ The catalog is consolidated around a few verb-parameterized tools (a discriminat
|
|
|
141
141
|
- **Create**: `add_area`, `add_tag`.
|
|
142
142
|
- **Headings & reminders** (Shortcuts-backed where headless-impossible): `heading` (`action` create / rename / archive / unarchive / convert_to_project), `clear_reminder`.
|
|
143
143
|
- **Recurrence via the Accessibility GUI ("ui") vector** (two-key gated — `ui-enabled` config + `dangerously_drive_gui` per call): `repeat` (`scope` todo / project; `action` start / reschedule / pause / resume / create). The `heading` convert_to_project action and the `reorder` areas scope ride the same gated GUI surface.
|
|
144
|
-
- **Generic & discovery**: `run_operation` (the full
|
|
144
|
+
- **Generic & discovery**: `run_operation` (the full 56-op catalog), `batch`, `reorder` (item ordering across scopes, plus `scope=areas` for the sidebar area order), `undo`, `capabilities`, `doctor`.
|
|
145
145
|
|
|
146
146
|
Every write tool takes `dry_run`; the GUI-driven variants additionally require `dangerously_drive_gui`; tools carry read-only/destructive annotations; hazard blocks come back as structured tool errors carrying the same remediation text the CLI prints. Tool descriptions follow the consumer-voice contract in [docs/design/surface-copy.md](docs/design/surface-copy.md).
|
package/dist/audit/schema.d.ts
CHANGED
|
@@ -33,6 +33,14 @@ export interface AuditRecord {
|
|
|
33
33
|
* of re-created). Absent on records with no client idempotency id.
|
|
34
34
|
*/
|
|
35
35
|
opId?: string;
|
|
36
|
+
/**
|
|
37
|
+
* `--preserve-modified` capture (ADDITIVE): the pre-write `userModificationDate`
|
|
38
|
+
* of each captured target row (uuid → epoch seconds, or null for a row the op
|
|
39
|
+
* created), recorded on the `ok` record only when the flag was active. Cheap
|
|
40
|
+
* provenance that enables a future SYMMETRIC undo (restore the umd the mutation
|
|
41
|
+
* bumped) without a separate read. Absent on writes made without the flag.
|
|
42
|
+
*/
|
|
43
|
+
preModDates?: Record<string, number | null>;
|
|
36
44
|
/** Normalized requested delta (params as given, post-normalization). */
|
|
37
45
|
requested: Record<string, unknown>;
|
|
38
46
|
/** Asserted-field subset of the pre-state (null when target didn't exist). */
|
package/dist/audit/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/audit/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/audit/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAiEzC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,SAAS,CACvB,MAA0E;IAE1E,IAAI,MAAM,CAAC,GAAG,EAAE,IAAI,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;IACzD,yEAAyE;IACzE,wEAAwE;IACxE,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC;QAC9B,MAAM,CAAC,EAAE;QACT,MAAM,CAAC,EAAE;QACT,MAAM,CAAC,KAAK;QACZ,MAAM,CAAC,IAAI;QACX,MAAM,CAAC,IAAI,IAAI,EAAE;KAClB,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAChF,OAAO,KAAK,MAAM,EAAE,CAAC;AACvB,CAAC"}
|
|
@@ -23,7 +23,7 @@ import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, write
|
|
|
23
23
|
import { tmpdir } from "node:os";
|
|
24
24
|
import { dirname, join } from "node:path";
|
|
25
25
|
import { ExitCode, okEnvelope, simFenceActive } from "../../index.js";
|
|
26
|
-
import { bundledSkillDir, compareSemver, installedSkillVersion, isLegacyDevStamp, resolveHome, SKILL_NAME, skillLocations, stampSkillVersion, } from "../skill.js";
|
|
26
|
+
import { appendDevBugReportingSection, bundledSkillDir, compareSemver, installedSkillVersion, isDevVersion, isLegacyDevStamp, resolveHome, SKILL_NAME, skillLocations, stampSkillVersion, } from "../skill.js";
|
|
27
27
|
import { CLI_VERSION } from "../version.js";
|
|
28
28
|
/**
|
|
29
29
|
* Materialize a stamped copy of the bundled skill in a temp dir and run `fn`
|
|
@@ -42,7 +42,14 @@ export function withStampedSkillDir(srcDir, version, fn) {
|
|
|
42
42
|
const staged = join(tmp, SKILL_NAME);
|
|
43
43
|
cpSync(srcDir, staged, { recursive: true });
|
|
44
44
|
const mdPath = join(staged, "SKILL.md");
|
|
45
|
-
|
|
45
|
+
let md = stampSkillVersion(readFileSync(mdPath, "utf8"), version);
|
|
46
|
+
// A dev checkout (`-dev` version) gets the "Filing bugs and feature requests"
|
|
47
|
+
// CTA appended; a published install (stamped release version) never does.
|
|
48
|
+
// Done at the source copy so every location the installer materializes —
|
|
49
|
+
// canonical, ~/.claude, and any skills-CLI-detected agent dir — inherits it.
|
|
50
|
+
if (isDevVersion(version))
|
|
51
|
+
md = appendDevBugReportingSection(md);
|
|
52
|
+
writeFileSync(mdPath, md);
|
|
46
53
|
return fn(staged);
|
|
47
54
|
}
|
|
48
55
|
finally {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-skill.js","sourceRoot":"","sources":["../../../src/cli/commands/install-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACL,MAAM,EACN,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,MAAM,EACN,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,EAAqB,MAAM,gBAAgB,CAAC;AACzF,OAAO,EACL,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,cAAc,EACd,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAqC5C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,mBAAmB,CAAI,MAAc,EAAE,OAAe,EAAE,EAAsB;IAC5F,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,yBAAyB,CAAC,CAAC,CAAC;IACnE,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;QACrC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QACxC,
|
|
1
|
+
{"version":3,"file":"install-skill.js","sourceRoot":"","sources":["../../../src/cli/commands/install-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACL,MAAM,EACN,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,MAAM,EACN,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,EAAqB,MAAM,gBAAgB,CAAC;AACzF,OAAO,EACL,4BAA4B,EAC5B,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,YAAY,EACZ,gBAAg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AI,CAAC,CAAC;YAChD,CAAC;YACD,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAC;YAC/B,OAAO;QACT,CAAC;QACD,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC,IAAI,EAAE;YAC5C,IAAI,EAAE,WAAW,EAAE;YACnB,aAAa,EAAE,WAAW;YAC1B,SAAS,EAAE,cAAc,EAAE;YAC3B,YAAY,EAAE,mBAAmB;YACjC,QAAQ,EAAE,eAAe;SAC1B,CAAC,CAAC;QACH,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;YACvB,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,eAAe,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CACxE,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvD,CAAC;QACD,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC9B,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -6,11 +6,21 @@
|
|
|
6
6
|
* command with none of them behaves exactly as before.
|
|
7
7
|
*/
|
|
8
8
|
import type { Command } from "commander";
|
|
9
|
-
import type { RepeatFrequency, RepeatRuleParams } from "../../index.ts";
|
|
9
|
+
import type { AddRepeatingRuleFields, RepeatFrequency, RepeatRuleParams } from "../../index.ts";
|
|
10
10
|
/** The extended fields (everything a rule carries beyond uuid/frequency/interval). */
|
|
11
11
|
export type RepeatRuleFlagFields = Omit<RepeatRuleParams, "uuid" | "frequency" | "interval">;
|
|
12
12
|
/** Attach the full-vocabulary options to a repeat command. */
|
|
13
13
|
export declare function addRepeatRuleFlags(cmd: Command): Command;
|
|
14
|
+
/**
|
|
15
|
+
* The CALENDAR-ANCHOR subset of the rule flags — for the add-repeating
|
|
16
|
+
* composites, whose base add already owns `--deadline <date>` / `--reminder`
|
|
17
|
+
* (the item's own), so the rule-level `--deadline` / `--reminder` /
|
|
18
|
+
* `--start-days-earlier` (which would collide) are intentionally absent. A
|
|
19
|
+
* deadlined repeat is set with a follow-up `reschedule-repeat`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function addRepeatCalendarFlags(cmd: Command): Command;
|
|
22
|
+
/** Map the calendar-anchor rule flags (add-repeating), excluding the base-add-owned fields. */
|
|
23
|
+
export declare function addRepeatingRuleFieldsFromOpts(opts: Record<string, unknown>, frequency: RepeatFrequency, interval: number): AddRepeatingRuleFields;
|
|
14
24
|
/**
|
|
15
25
|
* Build the extended rule fields from CLI options (present keys only —
|
|
16
26
|
* exactOptionalPropertyTypes). Combination validity is enforced downstream
|
|
@@ -13,6 +13,29 @@ export function addRepeatRuleFlags(cmd) {
|
|
|
13
13
|
.option("--deadline", "give each occurrence a deadline")
|
|
14
14
|
.option("--start-days-earlier <n>", "with --deadline: start each occurrence N days before its deadline");
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* The CALENDAR-ANCHOR subset of the rule flags — for the add-repeating
|
|
18
|
+
* composites, whose base add already owns `--deadline <date>` / `--reminder`
|
|
19
|
+
* (the item's own), so the rule-level `--deadline` / `--reminder` /
|
|
20
|
+
* `--start-days-earlier` (which would collide) are intentionally absent. A
|
|
21
|
+
* deadlined repeat is set with a follow-up `reschedule-repeat`.
|
|
22
|
+
*/
|
|
23
|
+
export function addRepeatCalendarFlags(cmd) {
|
|
24
|
+
return cmd
|
|
25
|
+
.option("--after-completion", "repeat N units AFTER each occurrence is completed (not on a fixed schedule)")
|
|
26
|
+
.option("--weekdays <days>", "weekly only: comma-separated weekdays, e.g. monday,wednesday,friday")
|
|
27
|
+
.option("--on-day <day>", "monthly/yearly only: a day of the month (1–31, or 'last')")
|
|
28
|
+
.option("--on-weekday <weekday>", "monthly/yearly only: a weekday for an nth-weekday rule (with --on-ordinal)")
|
|
29
|
+
.option("--on-ordinal <n>", "monthly/yearly only: which weekday (1–5, or 'last') with --on-weekday")
|
|
30
|
+
.option("--yearly-month <n>", "yearly only: the month (1–12)")
|
|
31
|
+
.option("--ends-after <n>", "stop after N occurrences (1–999)")
|
|
32
|
+
.option("--ends-on <date>", "YYYY-MM-DD — stop after this date");
|
|
33
|
+
}
|
|
34
|
+
/** Map the calendar-anchor rule flags (add-repeating), excluding the base-add-owned fields. */
|
|
35
|
+
export function addRepeatingRuleFieldsFromOpts(opts, frequency, interval) {
|
|
36
|
+
const { reminder: _r, deadline: _d, startDaysEarlier: _s, ...rest } = repeatRuleFlagsFromOpts(opts, frequency);
|
|
37
|
+
return { frequency, interval, ...rest };
|
|
38
|
+
}
|
|
16
39
|
// The raw CLI strings are cast to the vocabulary types WITHOUT validation here —
|
|
17
40
|
// assertRepeatRule downstream refuses a bad day/ordinal/weekday with a clear
|
|
18
41
|
// message, so the CLI never has to duplicate the domain checks.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repeat-flags.js","sourceRoot":"","sources":["../../../src/cli/commands/repeat-flags.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"repeat-flags.js","sourceRoot":"","sources":["../../../src/cli/commands/repeat-flags.ts"],"names":[],"mappings":"AAsBA,8DAA8D;AAC9D,MAAM,UAAU,kBAAkB,CAAC,GAAY;IAC7C,OAAO,GAAG;SACP,MAAM,CACL,oBAAoB,EACpB,6EAA6E,CAC9E;SACA,MAAM,CACL,mBAAmB,EACnB,qEAAqE,CACtE;SACA,MAAM,CAAC,gBAAgB,EAAE,2DAA2D,CAAC;SACrF,MAAM,CACL,wBAAwB,EACxB,4EAA4E,CAC7E;SACA,MAAM,CACL,kBAAkB,EAClB,uEAAuE,CACxE;SACA,MAAM,CAAC,oBAAoB,EAAE,+BAA+B,CAAC;SAC7D,MAAM,CAAC,kBAAkB,EAAE,kCAAkC,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|
|
7
7
|
import { DidYouMeanError } from "../did-you-mean.js";
|
|
8
8
|
// The opened resource shows its tags green (GUI: list pills are gray).
|
|
9
9
|
const tagList = (tags) => green(`#${tags.map((t) => t.title).join(" #")}`);
|
|
10
|
+
/** The unit noun the after-completion caption phrases (singular; pluralized by the caller). */
|
|
11
|
+
const REPEAT_UNIT_NOUN = {
|
|
12
|
+
daily: "day",
|
|
13
|
+
weekly: "week",
|
|
14
|
+
monthly: "month",
|
|
15
|
+
yearly: "year",
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The GUI's lower-corner repeat caption for a repeating INSTANCE, from its
|
|
19
|
+
* template's joined context (src/read/detail.ts `repeats`): FIXED mode reads
|
|
20
|
+
* `on <date>` (the "Repeats on Aug 19" projection); after-completion reads
|
|
21
|
+
* `<N> <unit>(s) after completion` (the "Repeats 1 day after completion" form —
|
|
22
|
+
* N/unit are the rule's own interval + frequency, singular/plural correct).
|
|
23
|
+
* Returns null when the context carries no renderable caption (no decodable rule,
|
|
24
|
+
* or a fixed rule with no projected date). The `paused` flag is surfaced
|
|
25
|
+
* SEPARATELY so the caller can fold it into the merged `repeats:` line with the
|
|
26
|
+
* instance-of handle. See {@link renderDetail}.
|
|
27
|
+
*/
|
|
28
|
+
function repeatContextValue(ctx, todayIso) {
|
|
29
|
+
const rule = ctx.rule;
|
|
30
|
+
if (rule === undefined)
|
|
31
|
+
return null;
|
|
32
|
+
if (rule.type === "fixed") {
|
|
33
|
+
return ctx.next != null ? `on ${shortDate(ctx.next, todayIso)}` : null;
|
|
34
|
+
}
|
|
35
|
+
const noun = REPEAT_UNIT_NOUN[rule.unit] ?? rule.unit;
|
|
36
|
+
const n = rule.interval;
|
|
37
|
+
return `${n} ${noun}${n === 1 ? "" : "s"} after completion`;
|
|
38
|
+
}
|
|
10
39
|
/**
|
|
11
40
|
* The detail card, project-card grammar: type-labeled title row (the box
|
|
12
41
|
* carries open/completed/canceled; only `trashed` needs words), uri, then
|
|
@@ -83,8 +112,26 @@ export function renderDetail(item) {
|
|
|
83
112
|
const state = item.repeating.nextOccurrence != null && st === "waiting" ? "scheduled" : st;
|
|
84
113
|
meta("repeating", `TEMPLATE, ${state} (occurrences appear in upcoming)`);
|
|
85
114
|
}
|
|
86
|
-
if (item.repeating.isInstance)
|
|
87
|
-
|
|
115
|
+
if (item.repeating.isInstance) {
|
|
116
|
+
// ONE merged line: the GUI's lower-corner caption plus the instance-of write
|
|
117
|
+
// handle, e.g. `repeats: on Aug 19 (instance of <uuid>)` /
|
|
118
|
+
// `repeats: 1 day after completion (instance of <uuid>)`; a paused template
|
|
119
|
+
// folds in as `(paused; instance of <uuid>)`. With no renderable caption
|
|
120
|
+
// (dangling FK / undecodable rule) the line is just `instance of <uuid>`
|
|
121
|
+
// (paused appended). JSON wire is unchanged (`instanceOf` + `repeats` stay
|
|
122
|
+
// separate keys, src/read/shape.ts).
|
|
123
|
+
const tmpl = item.repeating.templateUuid;
|
|
124
|
+
const instanceOf = `instance of ${tmpl}`;
|
|
125
|
+
const ctx = item.repeating.repeats;
|
|
126
|
+
const caption = ctx !== undefined ? repeatContextValue(ctx, todayIso) : null;
|
|
127
|
+
const paused = ctx?.paused === true;
|
|
128
|
+
if (caption !== null) {
|
|
129
|
+
meta("repeats", `${caption} (${paused ? "paused; " : ""}${instanceOf})`);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
meta("repeats", `${instanceOf}${paused ? dim(" (paused)") : ""}`);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
88
135
|
if (item.notes !== "")
|
|
89
136
|
lines.push("", item.notes);
|
|
90
137
|
if (item.type === "to-do" && item.checklist && item.checklist.length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"todo.js","sourceRoot":"","sources":["../../../src/cli/commands/todo.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"todo.js","sourceRoot":"","sources":["../../../src/cli/comm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