Skip to content

0.3.0-rc.20: TaskNotes settings record and tasknotes.task rc.6 - #25

Merged
callumalpass merged 1 commit into
mainfrom
agent/app-settings-record
Oct 27, 2026
Merged

callumalpass merged 1 commit into
mainfrom
agent/app-settings-record

Conversation

@callumalpass

@callumalpass callumalpass commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Part of the TaskNotes app-settings change. Order: tasknotes-spec rc.6 → mdbase-contracts rc.19 → publish this package → TaskNotes App ships → TaskNotes plugin upgrades collections. Cross-links are added once all PRs exist.

Not published. The version is bumped to 0.3.0-rc.20, but npm publish has not been run. The plugin and app PRs use a packed tarball (npm pack, vendored as tasknotes-model-0.3.0-rc.20.tgz) until this is published. Switch them to the registry version before merging.

Changes

  • Bindings follow tasknotes.task 0.3.0-rc.6, generated from tasknotes-spec. They no longer hold nlp, templating, time_tracking, archive moves, checkbox resets, the link write format or per-status automation. buildTaskNotesMdbaseResources returns those settings as appSettings.
  • New @tasknotes/model/settings:
    • A port of mdbase Reader's pure app-settings logic: resolve with defaults and warnings, patch only changed fields (null removes a field), detect conflicts, go read-only on a newer settings_version or another app's record, build new-record frontmatter, and write Markdown in place, keeping unknown fields, comments and the body.
    • The TaskNotes definition (dev.tasknotes, _settings/dev.tasknotes.md, settings_version 1).
    • resolveTaskNotesAppSettings, which reads the record, then the legacy binding, then the fallback. Status behaviour merges per status and per property.
    • Legacy helpers: taskNotesAppSettingsFromLegacyBinding, withoutTaskNotesAppSettings, and absentTaskNotesSettingsPatch (what a migration adds to a record that already exists).
    • Mappers to and from the model config.
    • buildTaskNotesSettingsResources: the tasknotes.settings 1.0.0 contract and schema, plus a tasknotes-settings type that implements mdbase.app-settings 1.0.0 and tasknotes.settings 1.0.0, with collection.unique on app.
  • The resolver accepts rc.6, rc.5 and rc.3 types, preferring the newest. resolveTaskNotesModelConfigFromMdbaseType(type, fallback, { settings }) applies record fields over the binding.
  • upgradeTaskNotesMdbaseTypeContract lifts an rc.5 type to rc.6 and returns the settings it removed.
  • patchTaskNotesMdbaseTypeSettings no longer patches the moved fields. Use buildTaskNotesSettingsPatch.
  • The contract target is _contracts/tasknotes.task/0.3.0-rc.6.md, so the rc.5 contract can stay where it is.
  • Other bumps:
    • type version 5
    • starter revision 6
    • TASKNOTES_MDBASE_PACK_VERSION 0.3.0-rc.19
    • new TASKNOTES_CONTRACT_DIGEST
    • the rc.5 digest kept in TASKNOTES_LEGACY_CONTRACT_DIGESTS

Decisions

  • exclude_from_cycle with no value anywhere defaults to "the status is skipped". An unedited starter therefore keeps cancelled out of the cycle.
  • nlp_triggers absent or null means each client uses its own defaults, matching rc.5, where the binding's nlp was optional.

Checks

  • npm test: 117/117 pass, including the new test/settings.test.mjs (precedence, rc.5 upgrade split, patch, conflicts, read-only, migration patch for an existing record).
  • npm run typecheck: clean.
  • npm run test:package: passes.
  • test/starter.test.mjs pins the rc.19 pack digests from the mdbase-contracts PR.

Related PRs

Order: contracts → model publish → App ships → plugin upgrades collections.

…c.6)

- Generate tasknotes.task 0.3.0-rc.6 bindings without nlp, templating,
  time tracking, archive moves, checkbox resets, link write format or
  per-status automation; return them as resources.appSettings.
- Add ./settings: Reader's app-settings logic plus the tasknotes.settings
  1.0.0 definition, legacy-binding fallback, migration patches and the
  published contract, schema and tasknotes-settings type.
- Read rc.5/rc.3 types; resolve record, then binding, then fallback.
- Contract at _contracts/tasknotes.task/0.3.0-rc.6.md; type version 5;
  starter revision 6; pack 0.3.0-rc.19; package 0.3.0-rc.20.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant