ntn-skills 0.2.0 → 0.3.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/CHANGELOG.md +128 -0
- package/CONTRIBUTING.md +19 -7
- package/README.md +82 -36
- package/README.zh-CN.md +82 -36
- package/SECURITY.md +9 -1
- package/THIRD_PARTY_NOTICES.md +38 -1
- package/dist/ntn-skills.js +47883 -5518
- package/docs/README.md +7 -3
- package/docs/historical-operations.md +60 -0
- package/docs/host-integration.md +81 -14
- package/docs/portable-converter.md +45 -0
- package/docs/protocol.md +380 -48
- package/docs/releasing.md +4 -2
- package/docs/remote-proof-converter.md +127 -0
- package/docs/usage.md +348 -67
- package/package.json +10 -6
- package/skills/notion/ntn-skills-maintain/SKILL.md +64 -0
- package/skills/notion/ntn-skills-maintain/references/operations.md +76 -0
- package/skills/notion/ntn-skills-sync/SKILL.md +54 -0
- package/skills/notion/ntn-skills-sync/references/synchronization.md +84 -0
- package/skills/ntn-skills/SKILL.md +40 -29
- package/skills/ntn-skills/references/commands.md +83 -81
- package/skills/ntn-skills/references/integration.md +44 -23
package/docs/README.md
CHANGED
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Start with the repository README in [English](../README.md) or [简体中文](../README.zh-CN.md) for requirements, installation and the first successful read. Source development/build instructions belong to [Contributing](../CONTRIBUTING.md#development-setup). Detailed guides below are maintained in English.
|
|
4
4
|
|
|
5
|
-
- [Usage guide](usage.md): installation, authentication, discovery, fixed/current reads,
|
|
5
|
+
- [Usage guide](usage.md): installation, authentication, discovery, fixed/current reads, one pinned apply for file/metadata changes, source/local connection and recurring runs, publication progress and original-operation recovery, cache policy, upgrade and uninstall.
|
|
6
6
|
- [CLI and ref contract](protocol.md): identities, selectors, fixed snapshots, JSON responses, storage, synchronization/recovery, cache boundaries and errors.
|
|
7
|
-
- [Host integration](host-integration.md): metadata injection, activation state and
|
|
7
|
+
- [Host integration](host-integration.md): metadata injection, activation state, ordinary `$...@builtin` selection across OMP/Pi/Tern, `/context-broker` session controls and explicit local distribution, plus Read/Write adapters.
|
|
8
|
+
- [Historical operator commands](historical-operations.md): retained one-off actions in the independent migration artifact; absent from the daily CLI.
|
|
8
9
|
- [Releasing](releasing.md): immutable tags, first publication, Trusted Publishing, registry verification and repair.
|
|
9
|
-
- [
|
|
10
|
+
- [Independent portable conversion](portable-converter.md): v1 archive inventories, offline preserved-byte conversion, explicit owned remote plan/apply and proof prerequisite; excluded from normal runtime.
|
|
11
|
+
- [Entrypoint Skill](../skills/ntn-skills/SKILL.md): discover/read remote workflows and route other tasks; available as `notion/ntn-skills` in the builtin catalog.
|
|
12
|
+
- [Content maintenance Skill](../skills/notion/ntn-skills-maintain/SKILL.md): create/update selected Notion content, References and portable copies, then verify or recover writes.
|
|
13
|
+
- [Synchronization Skill](../skills/notion/ntn-skills-sync/SKILL.md): connect upstream sources and local directories, run recurring synchronization, review conflicts and continue original operations. All three support independent local management; [usage, receipts and identity rules](usage.md#optional-official-skills) keep package installation separate from remote publication.
|
|
10
14
|
- [Contributing](../CONTRIBUTING.md), [security policy](../SECURITY.md) and [changelog](../CHANGELOG.md): compatibility, maintenance and release status.
|
|
11
15
|
- [Sync/cache CLI design](https://github.com/yoyooyooo/notion-skills-cli/blob/main/docs/sync-cache-cli-design.md): repository-only accepted design and rationale for implemented commands; protocol owns current semantics.
|
|
12
16
|
- [Sync/cache acceptance matrix](https://github.com/yoyooyooo/notion-skills-cli/blob/main/.cursor/skills/verify-ntn-skills/features/sync-cache-verification-plan.md): repository-only acceptance/evidence requirements and [command coverage map](https://github.com/yoyooyooo/notion-skills-cli/blob/main/.cursor/skills/verify-ntn-skills/features/README.md#accepted-design-coverage). Runtime outcomes belong in each external run ledger. These maintenance files are excluded from the npm package; use the source checkout while changes are unpublished.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Historical operator commands
|
|
2
|
+
|
|
3
|
+
Ordinary maintenance uses `ntn-skills apply`, `sync local run`, `sync upstream run` and the original `operation list/show/reconcile/resume`. Historical one-off actions are available only in the independent `ntn-skills-state-migration` artifact. They are not prerequisites for creating, reading, editing or synchronizing current content.
|
|
4
|
+
|
|
5
|
+
The artifact contains two executables:
|
|
6
|
+
|
|
7
|
+
| Executable | Responsibility |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| `ntn-skills-migrate` | Offline import of explicitly selected legacy local state with stopped writers and an external backup |
|
|
10
|
+
| `ntn-skills-operator` | Existing guarded historical publication, adoption and targeted repair actions; these may contact and modify Notion |
|
|
11
|
+
|
|
12
|
+
The normal `ntn-skills` package does not install these executables. Maintainers build the independent artifact from the source repository with `bun scripts/build-migration.ts /absolute/new-package-directory`, then pack that directory. Install the resulting supplied archive explicitly when a retained historical operation requires it. Help works offline:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
ntn-skills-operator --help
|
|
16
|
+
ntn-skills-operator upstream --help
|
|
17
|
+
ntn-skills-operator operation --help
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Keep the original state/configuration roots and operation identities. Moving a command to this artifact does not change its original guards or authorize another request after an unknown outcome. Follow the `next.argv` returned by the retained operation. When that selects ordinary `ntn-skills operation resume`, continue through the ordinary CLI.
|
|
21
|
+
|
|
22
|
+
## Available historical actions
|
|
23
|
+
|
|
24
|
+
| Group | Commands |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| Frozen editable-file publication | `upstream publish-files` |
|
|
27
|
+
| Existing publication adoption | `upstream content-adopt-plan`, `content-adopt-apply` |
|
|
28
|
+
| Retained source conversion repairs | `upstream source-rich-text-repair-{plan,apply,reconcile,show}`, `source-root-fidelity-{plan,apply,reconcile,show}`, `source-root-completion-{plan,apply,reconcile,show}` |
|
|
29
|
+
| Existing map checkpoint adoption | `upstream map-checkpoint-adopt-plan`, `map-checkpoint-adopt-apply` |
|
|
30
|
+
| Historical subscription creation evidence | `upstream adopt-plan`, `adopt-apply`, `prepare-plan`, `prepare-apply` |
|
|
31
|
+
| Explicit one-member replacement | `upstream rebuild`, `restore-deleted` |
|
|
32
|
+
| Bounded body completion | `operation body-completion-plan`, `body-completion-apply`, `body-completion-reconcile` |
|
|
33
|
+
| Separately reviewed creation attempt | `operation supersede-plan`, `supersede-apply` |
|
|
34
|
+
| Historical marker inspection/acceptance | `operation inspect-edit`, `accept-edit` |
|
|
35
|
+
|
|
36
|
+
Stable edits made directly in Notion after a committed publication are available through an ordinary current read. They do not need an inspect/accept ceremony. Current reads still reject incomplete publications, malformed ownership and incomplete content; they never settle a pending operation or change synchronization ownership. Existing pinned snapshots keep their prior bytes.
|
|
37
|
+
|
|
38
|
+
## Explicit one-member replacement
|
|
39
|
+
|
|
40
|
+
`ntn-skills-operator upstream rebuild SUBSCRIPTION_ID MEMBER_KEY --operation p_OPERATION` is an explicit one-member rebuild. The operation ID matches `p_` plus 1–100 letters, digits or hyphens. The first use fetches that member from the current upstream source and freezes those bytes, revision and subscription configuration. The same operation resumes that frozen source; only a different operation fetches again. Rebuild runs on the shared target's publisher subscription.
|
|
41
|
+
|
|
42
|
+
An owned previous page is moved to Notion Trash and verified there before publication. Missing permission or a lost response stays unknown and is not treated as success or as proof of Trash. Publication creates a distinct page: native rendered main Markdown plus References child pages for supporting Markdown, with scripts and non-Markdown assets in Files/the source bundle. It does not require the old page ID or byte-identical Markdown round-trip. The selected member may share an invocation name with another exact page; ordinary create, replace and upstream apply still reject that collision. Only the selected member mapping changes; another member changing meanwhile stops the rebuild. The member page `Default Context` is retained separately from the subscription Router `Default Context`. Omitting it preserves the previous member page checkbox, including false when there is no previous page; an explicit boolean writes only the new member page and fails with `PROPERTY_UNAVAILABLE` when that checkbox property is absent. The first operation freezes the current source revision and the complete source manifest so cross-member resource resolution stays bound to those bytes. A repeated name or alias is addressed by exact page ID.
|
|
43
|
+
|
|
44
|
+
Trash, publication and the member-map write are separate Notion and local steps, not one atomic transaction. Interruptions keep the original unknown outcome. Repeat the same command and operation to continue from the retained stage; do not replay that unknown request or start recovery by choosing a new operation.
|
|
45
|
+
|
|
46
|
+
`ntn-skills-operator upstream restore-deleted SUBSCRIPTION_ID MEMBER_KEY --operation p_OPERATION` uses the same frozen publication and member-map transaction without moving an active page to Trash. The original page must already be in Notion Trash and still be readable with the expected publisher, member key, content database and member Default Context. Live or foreign pages fail with `UPSTREAM_TARGET_CONFLICT`; missing, inaccessible and other failed reads retain their original errors. Repeat the same command and operation after interruption; switching between restore and rebuild with one operation ID fails with `UPSTREAM_OPERATION_MISMATCH`. An unresolved member-map write retains its unknown state and is never replayed.
|
|
47
|
+
|
|
48
|
+
## A separate creation attempt after an unknown result
|
|
49
|
+
|
|
50
|
+
`ntn-skills-operator operation supersede-plan ORIGINAL --intent-index ZERO_BASED_INDEX --operator-intent TEXT` records a separately reviewed new creation intent when the original unknown page POST cannot be recovered. Planning saves complete current-scope discovery with zero exact original candidates, the original receipt/intent digests, frozen source, parent/sibling guards and any upstream mapping. Its guard hash expires after five minutes. A complete API-visible zero count does not prove the original POST never succeeded: its object may appear later, and the plan explicitly records that risk. `ntn-skills-operator operation supersede-apply PLAN_ID --guard-hash HASH` consumes one new creation attempt through the same publication engine, retaining the original unknown receipt unchanged. An uncertain new attempt requires reconciliation/review and cannot itself be superseded. Root upstream pointers move only after the new publication commits and a full-payload guarded compare-and-swap succeeds; owned child replacement preserves exact root/sibling guards and source paths without name adoption.
|
|
51
|
+
|
|
52
|
+
## Historical subscription identity evidence
|
|
53
|
+
|
|
54
|
+
An old uncertain add without identity proof retains its original audit. `ntn-skills-operator upstream adopt-plan --evidence FILE` requires strict JSON containing `operation_id`, `scope`, `database_id`, `data_source_id`, `target_database_id`, `source_config_hash`, exact `page_id`, `created_time` and an explicit `creation_evidence` reference. It reads that page and matches its creation time, parent and complete configuration. Review its plan hash, then `ntn-skills-operator upstream adopt-apply OPERATION_ID --plan-hash HASH` rechecks the exact page version and binds locally with zero remote writes. Names never prove identity. An original GET-only failure can instead use `ntn-skills-operator upstream prepare-plan --evidence FILE` and reviewed `ntn-skills-operator upstream prepare-apply OPERATION_ID --plan-hash HASH`: evidence binds the original failure receipt and frozen executable hashes, exact failed data-source GET and anchored awaited-preflight-before-POST source lines. Preparation preserves the original command inside its audit and permits the original add operation ID to perform its single first POST. Neither recovery command changes remote content or deletes existing pages.
|
|
55
|
+
|
|
56
|
+
## Frozen editable-file publication
|
|
57
|
+
|
|
58
|
+
`ntn-skills-operator upstream publish-files PLAN MEMBER --operation NEW` publishes the exact frozen candidate and moves its original parent pointer only after committed live verification; run its returned selected `ntn-skills sync upstream apply` to accept the member and publish the subscription map. If that file publication has an unknown terminal append on its own known page, `--supersede OLD_OPERATION` explicitly creates a distinct page with a new operation. The old page/receipt/request remain untouched and unresolved; the new command checks the original owner, frozen bytes and writing marker, and cannot replace an accepted target. A timeout or repeated absent read is never proof that the old write failed.
|
|
59
|
+
|
|
60
|
+
For exact flags, use the selected operator command's `--help`. The [public protocol](protocol.md) owns ordinary result/recovery semantics and [local-state upgrade](protocol.md#local-sqlite-authority-and-explicit-upgrade).
|
package/docs/host-integration.md
CHANGED
|
@@ -4,32 +4,89 @@ Start with [installation and Quick start](../README.md#installation) before conf
|
|
|
4
4
|
|
|
5
5
|
## Portable shell integration
|
|
6
6
|
|
|
7
|
-
The host needs Node.js 22.
|
|
7
|
+
The host needs Node.js 22.22.3+ within 22.x, or Node.js 24.20.0+ on PATH to launch the installed `ntn-skills` executable. Install the built package with npm using [the consumer installation instructions](../README.md#installation); online operations also need the official `ntn` CLI. Bun belongs to the repository's development/build path.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Context Broker exposes the three bundled Skills directly through ordinary `$` discovery. For a shell-only host using native local Skill discovery, expose the [entrypoint Skill](../skills/ntn-skills/SKILL.md) with `ctl builtin install notion/ntn-skills`: the CLI stores it centrally and links it into `~/.agents/skills` by default. Add `--agent-dir DIR` only for a host that needs another supported Skill root. A suitable default instruction is:
|
|
10
10
|
|
|
11
|
-
> When a task may benefit from
|
|
11
|
+
> When a task may benefit from the Notion Skill library, choose from its supplied metadata. If no remote catalog is supplied, use ntn-skills to discover it. Read only the selected workflow and keep supporting files on that version. Route Notion content changes to ntn-skills-maintain and source subscriptions and ongoing local-directory synchronization to ntn-skills-sync.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Default awareness is metadata and routing, not preloaded Skill bodies. The entrypoint calls `ntn-skills read skill://...` through a shell tool when no native adapter exists; it cannot register a protocol handler.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
When enabled, the OMP/Pi Context Broker supplies a short `<ntn-skills-guidance>` block by default. It contains the resolved CLI argv, each enabled source's id and optional database, `list --query`, exact-ref `read`, pinned `files`/resource reads, local resource use and help entrypoints. Deduplication uses the effective context: repeat, fork and persisted continuation retain one copy; compaction or rewind that removes it restores it before the next model request, even without invoking a Skill. The guidance remains available with zero Notion sources and uses the package's resolved Node/CLI argv when no global CLI is installed. Custom CLI and multiple sources retain their own exact argv and database scopes; no source is implicitly selected merely because it is first. This guidance is independent of remote catalog discovery and selected workflow activation. The broker owns its implementation and [host lifecycle contract](https://github.com/yoyooyooo/pi-context-broker/blob/main/packages/context-broker/docs/reference.md#host-discovery-and-selected-activation).
|
|
16
|
+
|
|
17
|
+
The guidance includes per-source `list-args`, `read-args`, `files-args` and `resource-read-args` arrays carrying the configured database. Append one array to the executable argv and replace its placeholders. A successful read returns top-level `content`, pinned `ref` and `snapshot_id`; `record` is metadata. `files SNAPSHOT` lists resources and `read SNAPSHOT --path RELATIVE` reads a named file without a shell resolving a URI argument as a filesystem path. The CLI also supports relative `read RELATIVE --from PINNED_REF` where the host passes URI arguments literally. Complete bodies already supplied by the host/Broker or a successful read can be used directly for introductions and summaries. Resolve a requested relative file directly from a visible entry directory; read other supporting files only when needed. Retain JSON output to inspect CLI `ok`/`error` and snapshot identity. Inspection describes the workflow without running its setup or repository checks.
|
|
18
|
+
|
|
19
|
+
For selected Notion Skills, Broker payloads also provide pinned `skill-ref` and `snapshot-id`. When `hash` or `basename` path mode hides the local directory, use the supplied command and database scope with `files SNAPSHOT` or `read SNAPSHOT --path RELATIVE`. Skill introductions describe the workflow, style and prerequisites without executing or adopting them. A development host may use a public `ntn-skills` shim described in [Contributing](../CONTRIBUTING.md#development-setup); source paths belong to that shim rather than consumer prompts.
|
|
20
|
+
|
|
21
|
+
The three builtin IDs are `notion/ntn-skills` (discovery/consumption), `notion/ntn-skills-maintain` (Notion content changes) and `notion/ntn-skills-sync` (ongoing synchronization/recovery). Their supporting files are included, and each installs independently. Use `ctl builtin list/read` offline, `ctl builtin install ID`, `ctl builtin status [ID]` and `ctl builtin update ID` for centralized management. Optional repeated `--agent-dir DIR` adds distribution links at `DIR/skills/<name>` alongside the default shared link; all targets use the same installed tree. `ctl builtin export` remains an unregistered portable copy. See [usage](usage.md#optional-official-skills) for conflicts, migration and reload requirements.
|
|
22
|
+
|
|
23
|
+
Global configuration defaults to `~/.config/ntn-skills/config.json`; retained snapshots/recovery state to `~/.local/state/ntn-skills`; disposable observations to `~/.cache/ntn-skills`. Set `NTN_SKILLS_CONFIG_HOME`, `NTN_SKILLS_HOME` and `NTN_SKILLS_CACHE_HOME` to isolate all three complete application directories; XDG config/state/cache bases are also supported. Authentication selects config.token > non-empty NOTION_API_TOKEN > existing ntn login; a shared config token overrides a host's environment credential. Pass a token to `ctl config set-token --stdin` through a trusted stdin pipe, never arguments/logs. `ctl config clear-token` restores fallback; sanitized config reports token presence, not validity. Separate roots do not isolate official `ntn` login; where local login identity cannot be distinguished safely, current reads validate identity online and unpinned offline lookup fails. [Storage and scope contract](protocol.md#environment-and-local-storage).
|
|
16
24
|
|
|
17
25
|
`NTN_SKILLS_NTN_BIN` selects the official CLI executable (default `ntn`). `NOTION_WORKSPACE_ID` and `NOTION_API_BASE_URL` enter the authentication scope and are inherited by `ntn`; its authentication rules govern workspace selection, and `ntn api` honors the API base URL override. Use a trusted executable and endpoint, since authenticated API requests may reach that endpoint. Signed archive downloads follow the service's returned URLs independently. See [the environment contract](protocol.md#environment-and-local-storage).
|
|
18
26
|
|
|
19
|
-
|
|
27
|
+
`NTN_SKILLS_REQUEST_TIMEOUT_MS` sets each network attempt's timeout in milliseconds (default 30000). It covers each official Notion CLI request and each archive, attachment or source-provider HTTP download independently. A complete read has no aggregate deadline; cancellation still interrupts the active request and its owned process tree.
|
|
28
|
+
|
|
29
|
+
The CLI sends no analytics requests of its own. Online calls use official `ntn` and signed Notion downloads; `ntn` has its own policies. Local access covers configuration/state/cache, explicit inputs and requested outputs. Snapshots, upload staging, sync plans/baselines/receipts contain private bytes and have no automatic garbage collection. Content/catalog freshness defaults are five minutes/60 seconds and do not control retention. Uninstalling leaves all roots in place; preserve pinned versions and unfinished recovery receipts. Cache clearing retires only disposable SQL observations; it does not move files. [Cleanup guidance](usage.md#upgrade-and-uninstall) and [security policy](../SECURITY.md).
|
|
30
|
+
|
|
31
|
+
## Bundled Skills in hosts
|
|
32
|
+
|
|
33
|
+
OMP/Pi and Tern expose package Skills through the same ordinary `$` selection path as other Skills:
|
|
34
|
+
|
|
35
|
+
| Task | Exact package selection |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| Discover and consume the library | `$ntn-skills@builtin` |
|
|
38
|
+
| Create or change Notion content | `$ntn-skills-maintain@builtin` |
|
|
39
|
+
| Connect and synchronize source/local content | `$ntn-skills-sync@builtin` |
|
|
40
|
+
|
|
41
|
+
The explicit `@builtin` suffix selects package identity even when a local directory or Notion page has the same name. Builtin instructions and supporting references work offline with no configured Notion source or global `ntn-skills` installation. The broker supplies its bundled CLI argv for content work; remote operations still need an existing Notion connection. Reading or previewing a Skill does not activate its instructions until it is selected for the task.
|
|
42
|
+
|
|
43
|
+
Pi/OMP use ordinary `$` discovery and loading. Tern's automatic menu is owned by the Broker; a manual selection inserts the exact token into the existing composer. `/context-broker` controls session status, source/View selection and refresh. The former `/ntn-skills` management/save commands and separate CLI/schema palettes are removed. Content maintenance is expressed as a task for the selected builtin, which uses the public CLI command surface.
|
|
44
|
+
|
|
45
|
+
Independent local installation remains available through ordinary `ctl builtin install/status/update/export` commands for native hosts or explicitly managed copies. It uses the central XDG data tree and registered distribution links described in the [local contract](protocol.md#official-built-in-skills). Package builtins, managed local copies and remote Notion copies retain separate identities and versions. Reload or restart native host discovery after updating a managed local copy; OMP uses `/restart` when extension code itself changes.
|
|
20
46
|
|
|
21
47
|
## Startup metadata integration
|
|
22
48
|
|
|
23
|
-
|
|
49
|
+
Startup discovery runs unfiltered `ntn-skills list` for the complete explicit-selection catalog, retaining name/description/ID/alias/ref metadata, databases, `source`, `freshness`, `fetched_at` and `coverage`. Separately, the selected View determines which entries are advertised to the model before its first user-triggered request; the full catalog is not automatically injected. Join database_id to title/domain alias; keep these separate from invocation alias. List paginates without bodies/manifests; `--query` retains the full queried database map. Catalog default age is 60 seconds; use `--refresh` for fresh discovery or intentional `--offline` for cached discovery. Preserve failed_sources identities and incomplete/search-limited coverage. Hosts retain both same-alias pages across databases and select by database scope/page-ID ref rather than a name-only map.
|
|
50
|
+
|
|
51
|
+
Cold catalog discovery validates subscription Router membership against the complete current metadata inventories already queried for the selected content databases and subscription source. It does not refetch each Router's member pages or read bodies merely to populate completion. Missing or conflicting member metadata remains a coverage failure. Selecting a Router still freshly validates its active map and members; a cached directory does not authorize activation.
|
|
24
52
|
|
|
25
|
-
|
|
53
|
+
Only automatic subscription Routers with at least two verified published active Skills appear in the catalog. Zero/single-member subscriptions preserve independent Skill records and upstream display labels; they do not produce Router completion candidates. Current exact Router activation enforces the same minimum. Manually authored content-table Routers keep their explicit membership behavior. Upgrades invalidate old CLI catalogs and subscription Router observations; refresh the host catalog rather than retaining an obsolete candidate. Pinned snapshots remain immutable historical reads.
|
|
54
|
+
|
|
55
|
+
Online subscription activation queries fresh member metadata from every target data source, filtered by the publisher relation and fully paginated. It validates each active member's exact database/data-source parent, ownership, key, published hash and committed marker, then reuses those validated rows when materializing the Router snapshot. Missing members, inaccessible queries and missing or repeating pagination cursors fail the read.
|
|
56
|
+
|
|
57
|
+
Each listed `name` is the exact human-readable Notion display title; authored frontmatter `name` retains its original spelling. Names must be nonempty and contain no control characters; Unicode, digits, spaces and hyphens are allowed. The separate callable `alias` uses NFC normalization and lowercase, trims surrounding whitespace, replaces whitespace runs with `-`, and percent-encodes characters outside Unicode letters, marks, numbers, `_` and `-`. For example, `Tty7` stays `Tty7` with alias `tty7`, and `Review/2026` has alias `review%2F2026`. Use the alias for host invocation while preserving the display title and source frontmatter. Aliases never identify records: retain collisions and select exact page IDs or refs. References mode generates frontmatter from the exact title; native exports need not match the alias or directory. Propagate `INVALID_SKILL_NAME` and `INVALID_SKILL` for malformed content.
|
|
58
|
+
|
|
59
|
+
The OMP/Pi adapter contract selects default discovery from a Notion View. The host chooses a session override, then source `default_view_id`, then the first View in API order. Use `views --database SELECTOR`, `list --view VIEW_ID_OR_URL` or `list --default-view --database SELECTOR`. View membership has no extra `default_context` intersection; that boolean remains ordinary page metadata. Keep unfiltered `list` for full `$` invocation, search and exact reads. An invalid explicit/default ID is reported without fallback; verified zero Views gives an empty default directory. Startup prepares metadata and optional snapshots without provider calls or body activation. `before_agent_start` supplies one current metadata directory before the first and subsequent user-triggered requests. A View switch replaces only Broker-owned metadata for the next request, preserving unrelated local Skills and loaded snapshots. Session overrides follow active-branch entries across resume/fork and do not mutate configuration. Preparation remains distinct from loaded context; Prompt is never default-discovered or prefetched.
|
|
26
60
|
|
|
27
61
|
On activation, call `ntn-skills read <ref>` with an actual current ref returned by list. Require `ok: true` and retain `content`, `source`, `freshness`, pinned `ref`, `snapshot_id` and `version_id`. Ordinary reads may select content validated within five minutes (`source=local_cache`); use `--refresh` when activation requires current remote access/content (`source=notion`). Hosts must preserve the observation time/age/limit/stale status, not infer freshness from snapshot creation. Once selected, the complete snapshot fixes supporting instructions for the task. List all files with `["files", snapshot_id]` and follow pinned refs (`source=local_snapshot`); pinned versions do not claim latest freshness. Inspecting, summarizing, editing or configuring a Skill does not activate its instructions. Downloaded contents/scripts never execute automatically. [Read walkthrough](usage.md#reading-a-fixed-version).
|
|
28
62
|
|
|
29
|
-
|
|
63
|
+
Preserve optional `freshness.validation="metadata"`: ordinary current Skill reads can revalidate an already aligned source-bundle checkpoint using root/reference metadata, full References membership and immutable attachment identity, then reuse the local file set. `source=notion` can therefore describe remote metadata validation rather than new body downloads. This is a cache validator and can miss edits with unchanged reported versions. `--refresh` or explicit `--max-age 0` forces complete body/resource validation; mutations and synchronization retain strong reads. A cold machine without a checkpoint validates fully, and permission errors never become stale success.
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
All --database flags accept one ID, URL or exact case-sensitive registered alias. Register domains with ctl database register frontend --database DATABASE_ID, then invoke ["read", name, "--database", "frontend"]. Database titles are display labels only. Repeated --database values return INVALID_ARGUMENT before online access/mutation. ctl config set default_database accepts the same selector but stores its ID and affects create only. ctl database unregister frontend removes only that local alias offline. Pinned requests with an alias constraint resolve it locally and enforce cached database ownership. See [database selection](protocol.md#identity-and-references).
|
|
30
67
|
|
|
31
68
|
Databases with rich-text Description and References are discoverable alongside native Skills databases. References mode reads page Markdown, materializes included pages under references/, and rewrites Notion page links relative to the containing file. The version includes every reference page, so child-only edits can cause WRITE_CONFLICT. Host adapters use the same commands and pinned refs for either storage mode. See [References pages](protocol.md#references-pages).
|
|
32
69
|
|
|
70
|
+
References materialization restores local Markdown block boundaries around tables, fenced code and paragraphs after lists, and joins split emphasis around inline code. Snapshot identities include the materialization version; existing pinned snapshots remain immutable, so hosts must activate a current version to receive changed materialization. Automatic import verification covers saved instructions, code languages and source bytes; it does not establish host reload or workflow execution.
|
|
71
|
+
|
|
72
|
+
## Broker source consumption
|
|
73
|
+
|
|
74
|
+
`pi-context-broker` provides a one-way Notion source adapter in its own repository against these public commands, including host registration, selected-View background preparation and selected-page read/export. Installation, host configuration and verification belong to that broker repository; this CLI package does not install the adapter or establish that it is installed in a user's host. The CLI owns metadata, credential scopes and immutable export bytes; the broker owns its source index, host registration and activation policy. No CLI-side broker-specific API or remote write is required.
|
|
75
|
+
|
|
76
|
+
Discover with an argument array such as `["list", "--database", databaseSelector]`. Keep `scope`, `fetched_at`, `source`, `freshness`, the database map and the complete `coverage` object, including `failed_sources`. Rows contain page IDs and current refs without bodies or file manifests. Key records by source ID plus page ID; preserve same-name rows across databases and scopes. A metadata index alone is insufficient for executing a workflow.
|
|
77
|
+
|
|
78
|
+
Consumers may call `["ctl", "cache", "identity", "--database", databaseSelector]` before selecting their persisted metadata index; omit `--database` for unscoped discovery. The response supplies an opaque credential/remote-catalog identity and `catalog_max_age_ms` without network access or credential output. The CLI resolves database aliases, IDs and URLs locally. Share one index for that identity across projects and Pi/OMP; working directory, executable spelling, host/source labels and cache policy do not define different Notion content. Recompute list age from its original `freshness.validated_at` under the current discovery policy; process startup must not reset TTL. A host may display expired metadata while refreshing, but selected activation still validates scope and the fixed snapshot. If a custom command lacks this optional capability, use its normal list contract. [Cache identity contract](protocol.md#read-policy-and-cache-management).
|
|
79
|
+
|
|
80
|
+
The database map records content and upstream roles separately. Validate each locator against its exact database/data-source pair and `coverage.queried_data_sources`: content pages require a content source, subscription Routers require an upstream source. A selected content database constrains a subscription's `target_database_id`, not its upstream locator. Keep source ID, namespace and scope attached through registration and exact-ref activation; incomplete coverage remains a source failure. Successful explicit reads alone do not demonstrate catalog discovery.
|
|
81
|
+
|
|
82
|
+
When the user selects a workflow, invoke `["read", pageId, "--database", databaseSelector]`. Require a successful exit and `ok: true`; compare the returned `scope` with the discovery scope before associating instructions with that record. A scope change requires rediscovery. Retain the returned page, version and snapshot IDs plus the pinned ref and freshness; online validation failures remain failures rather than empty instructions. Current read scope identifies the selected credential observation, whereas pinned read scope identifies the original snapshot and does not prove present permission.
|
|
83
|
+
|
|
84
|
+
Materialize that fixed version with `["export", snapshotId, "--projection", "snapshot", "--format", "directory", "--output", ownedSnapshotDirectory]`. Explicit snapshot selection is offline and never changes Notion. Require `projection:"snapshot"`; match response `main_path` and `entrypoint` to portable v2 `.ntn-skills.json`'s `main` and the selected record's dynamic entrypoint. Do not assume `SKILL.md`: kind and entrypoint belong to the selected record. Require complete entry bytes equal to `read.content`, including a Router's generated Members index. Verify every receipt file's `path`, `bytes`, SHA-256 `hash` and `role` (`entrypoint`, `resource`, `source_bundle`, `manifest`) against the complete exported tree. Preserve its containing directory and all relative resources. The manifest contains format, version 2, kind, name, description and main, but excludes page/version/snapshot IDs and scope; retain those response identities separately. Default `--projection source` preserves authored portable bytes and can differ from the read view.
|
|
85
|
+
|
|
86
|
+
Repeat an export to identical output to receive `reused: true`; differing output returns `OUTPUT_CONFLICT` without overwrite. Consumers must retain that error rather than replacing the directory silently. Spawn the installed `ntn-skills` executable or its declared Node.js bin using argument arrays. Isolate config/state/cache roots per intended credential scope and never store tokens in broker source configuration. A saved CLI token takes precedence over the environment, so separate roots alone are insufficient if personal configuration is copied in. Unpinned offline lookup cannot reuse another credential scope; explicit pinned snapshots remain locally readable without credentials.
|
|
87
|
+
|
|
88
|
+
Repository verification provides a read-only `consumption` mode and installed npm consumer smoke. They cover the CLI boundary only; broker default-catalog, Read interception and native skill commands require separate broker-host evidence. Verification recipes are repository-only and are not shipped or advertised as an installed host integration.
|
|
89
|
+
|
|
33
90
|
## Built-in Read protocol integration
|
|
34
91
|
|
|
35
92
|
An adapter implements the host's URI dispatch contract:
|
|
@@ -48,19 +105,29 @@ An adapter may expose one of `--refresh`, `--offline` or `--max-age DURATION` fo
|
|
|
48
105
|
|
|
49
106
|
## Explicit write integration
|
|
50
107
|
|
|
51
|
-
For authorized
|
|
108
|
+
For an authorized file/metadata change, invoke `["apply", pinnedMainRef, "--input", changedFolder]`, adding only requested `--remove`, `--name`, `--description` or other property flags. The sparse input contains only added/changed files; omitted files remain intact. The CLI assembles one complete change from the pinned baseline and returns its verified snapshot and original publication operation ID. Adopt the new snapshot explicitly for subsequent work while existing activations retain their old version. A host's single-file Write tool may use `["write", pinnedFileRef, "--input", localFile]`. Never route writes into immutable local snapshot objects.
|
|
109
|
+
|
|
110
|
+
`write` changes only the selected logical file. Read-view or submitted frontmatter is file content and never changes Name, Description or Default Context. For authorized property changes, invoke `["update", exactTarget, "--name", title]`, adding only requested `--description` or `--default-context true|false` flags; retain a pinned baseline and propagate version/property conflicts. Create is create-only and rejects an existing name; use exact-target replace for intentional whole-content replacement.
|
|
52
111
|
|
|
53
|
-
Use `--dry-run` to report a concrete target/action. Propagate conflicts and partial/unknown results without automatic retries. Create
|
|
112
|
+
Use `--dry-run` to report a concrete target/action. Propagate conflicts and partial/unknown results without automatic retries. Create chooses explicit database > configured default > sole fresh discovery. Inputs are ZIP/folder/Markdown; `--name` explicitly overrides the human title without changing page identity or rewriting authored frontmatter to an alias, while `--description` overrides Description. `replace INPUT --target EXACT` requires a page ID/URL, page-ID main ref or snapshot ID, preserves page ID through rename and fails without create/name fallback; database is a constraint. Names and reference-file targets cannot select replacement. References become editable pages; omitted references remain in Notion. Files preserves original bytes/frontmatter/assets; page-only output is normalized. Success returns verified snapshot metadata. [Mutation contract](protocol.md#mutation-contract).
|
|
113
|
+
|
|
114
|
+
Authorized publication commands can add `--progress`; drain stderr separately for stage/timing JSONL while parsing one final stdout JSON result. Preserve `operation_id` and the state-relative `receipt_path`. Invoke `["operation", "resume", operationId, "--progress"]` to revalidate and continue frozen input on the same target. Surface conflicts and unresolved outcomes for inspection; do not reconstruct a new create/replace from the display name. [Publication recovery contract](protocol.md#mutation-contract).
|
|
115
|
+
|
|
116
|
+
Completed recovery replays the retained result, including a single-file write's `path`, target-file `ref` and original `previous_version_id`; do not substitute the main-file ref. Validation reads are provisional until their complete checks pass, and checkpoint/continuation reads reject changed retained observations after a process exit.
|
|
54
117
|
|
|
55
118
|
For portable output, invoke `["export", selector, "--output", localPath]`, optionally with `--format zip|directory`. Pinned selection is offline; current selection uses bounded content policy, with `--refresh` for fresh remote validation. Preserve `.ntn-skills.json` for reimport. Identical destinations return `reused=true`; differing destinations fail with `OUTPUT_CONFLICT`. Export never mutates Notion. [Portable contract](protocol.md#portable-export-contract).
|
|
56
119
|
|
|
57
120
|
## Explicit local synchronization
|
|
58
121
|
|
|
59
|
-
|
|
122
|
+
Source subscription integration uses `["sync", "upstream", leaf, ...args]`; discover its official schema with `["schema", "sync", "upstream", leaf]`. The root `upstream` path is removed. `sync upstream run` requires exactly one mode: repeatable `--target SUBSCRIPTION_ID` or `--all`. Preserve exact subscription IDs, frozen plan IDs and durable operation IDs in host actions and recovery flows.
|
|
123
|
+
|
|
124
|
+
Start a Git subscription with `["sync", "upstream", "connect", source, "--database", databaseSelector]`, then invoke `run --target SUBSCRIPTION_ID` for recurring updates. A run continues an original pending publication before a fresh plan. It can restore a still-selected tracked member only when the exact owned original page is readable and confirmed in Notion Trash. Missing permission or a failed read remains a failure. Preserve returned subscription, original operation and restored member identities; do not direct routine recovery to historical operator commands.
|
|
125
|
+
|
|
126
|
+
Connect a logical distribution directory with `["sync", "local", "connect", pageId, "--path", directory, "--as", label]`, then use `sync local run LABEL` or `run --all`. An absent ordinary local directory initializes from Notion; existing differing content requires an explicit `--from notion|local`. Run settles only verifiably converged retained effects and preserves unresolved operations without replaying content writes. Separate `plan LABEL --output FILE` and `apply --plan FILE` remain available when a reviewed artifact is required, with the original binding, digest, scope/version, baseline, hashes and link checks.
|
|
60
127
|
|
|
61
|
-
`sync status` is local/provisional unless refreshed; it cannot activate or advance a baseline. Baselines advance only after verified convergence. Preserve operation receipts on interruptions; `
|
|
128
|
+
`sync local status` is local/provisional unless refreshed; it cannot activate or advance a baseline. Baselines advance only after verified convergence. Preserve operation receipts on interruptions; `operation reconcile OPERATION_ID` reads actual outcomes without replay, and affected resources stay fenced while outcome is unresolved. Logical directory/parent/per-file links survive writes to final destinations; link drift rejects a saved plan. Commit-boundary guards do not supply an atomic guarantee against external link retargeting. Removed/replaced bytes require system Trash retention. `sync local unbind LABEL` deactivates configuration while retaining content/baselines/plans/receipts. [Workflow and limits](usage.md#synchronizing-local-skills).
|
|
62
129
|
|
|
63
|
-
Expose offline `cache status` for effective roots/observations and `cache clear TARGET [--database SELECTOR]` or `cache clear --all` with optional `--dry-run`. Clear retires only disposable observations
|
|
130
|
+
Expose offline `ctl cache status` for effective roots/observations and `ctl cache clear TARGET [--database SELECTOR]` or `ctl cache clear --all` with optional `--dry-run`. Clear retires only disposable SQL observations; immutable versions and sync state remain. `ctl config set cache_policy.read_max_age_ms 300000` and `ctl config set cache_policy.catalog_max_age_ms 60000` control defaults in integer milliseconds. `ctl config unset KEY` restores the selected cache default while preserving authentication/sources/bindings and the sibling cache setting. [Cache usage](usage.md#cache-policy-and-cleanup).
|
|
64
131
|
|
|
65
132
|
|
|
66
133
|
This repository ships the portable Skill, CLI, and adapter contract. It does not register adapters into unrelated Agent applications or alter their global configuration.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Independent portable conversion
|
|
2
|
+
|
|
3
|
+
Normal create, replace, preserved source ZIP reading and export accept portable manifest v2 only. A v1 manifest returns `PORTABLE_UPGRADE_REQUIRED`. Missing Kind on a Notion row still means Skill; it is unrelated to archive conversion. No normal command, environment variable or configuration enables historical decoding.
|
|
4
|
+
|
|
5
|
+
Build the separate operator package with `bun scripts/build-portable-converter.ts /absolute/new-package-directory`; pack/install that directory independently using ordinary npm peer resolution. It is excluded from the normal CLI build entry and package file list.
|
|
6
|
+
|
|
7
|
+
## Offline preserved input
|
|
8
|
+
|
|
9
|
+
`ntn-skills-portable-convert offline --input OLD_DIRECTORY_OR_ZIP --output NEW_DIRECTORY [--kind skill|router|prompt]` validates the exact v1 manifest, all paths, duplicate entries, main file and projection/reference types. It writes `converted.zip` and `audit.json` into a new directory outside the input. Original bytes remain untouched. Every input and output entry has a byte length and SHA-256 inventory. Explicit kind is recorded; omitted kind records `audited-default-skill`. Binary files are never decoded as text. Malformed input fails before output creation.
|
|
10
|
+
|
|
11
|
+
## Owned remote source archives
|
|
12
|
+
|
|
13
|
+
Production conversion belongs to the AH270 runner after its actual approval gate. First inventory the exact owned page set read-only, including the reported 12-page production scope; record page/database IDs, kind, raw source bundle bytes/hash, main/resources, current authored content, publication proof, Default Context, Members and ownership. This implementation does not claim those pages were inventoried or converted.
|
|
14
|
+
|
|
15
|
+
For each approved exact page:
|
|
16
|
+
|
|
17
|
+
1. If Publication is v1, use `proof-plan --input OWNED_ALLOWLIST --output NEW_PLAN` and `proof-apply --plan PLAN --expected-plan-hash HASH --ledger NEW_LEDGER --apply` in this independent artifact. They invoke the existing remote-proof converter with its exact historical source-format/audit allowlist, complete guard/readback and no-resend ledger; the isolated source interpretation host preserves original source bytes/hash. Historical proof conversion only admits Skill, matching portable v1's audited default; a different kind requires explicit evidence review. No proof bypass or force option exists. See [proof converter contract](remote-proof-converter.md).
|
|
18
|
+
2. Run `ntn-skills-portable-convert remote-plan --target PAGE_UUID --database DATABASE_UUID --kind skill --output NEW_PLAN_JSON`. Planning reads the current source twice, retains original snapshot file hashes/version and raw page/property/proof/credential guards, and writes no remote state. Source archive interpretation is selected only in this independent operator host; raw downloaded archive bytes remain the version/proof input.
|
|
19
|
+
3. Review the plan, all authored files/resources and page scope, then compute SHA-256 of the exact plan bytes. Run `ntn-skills-portable-convert remote-apply --plan PLAN --expected-plan-hash HASH --ledger NEW_ATTEMPT_JSON --apply` only after the production gate. Apply rereads the complete current source and guards; any changed content/version/identity rejects. It durably installs an exclusive attempt with its allocated publication operation ID before calling the same `replaceSkill` publication use case as the CLI. That use case owns exact target/version validation, mutation intents, source uploads, preservation of other properties and final v2 publication proof/readback.
|
|
20
|
+
4. Read the current page with the normal strict CLI and verify full main/reference/binary inventory. Retain plan, attempt and normal operation receipt. Recover with the original files using `remote-reconcile --plan PLAN --expected-plan-hash HASH --ledger ATTEMPT --expected-page PAGE_UUID`, followed by the same flags on `remote-resume --apply`. Reconcile makes no remote writes. Only a known-root replacement with zero mutation intents and unchanged original inventory, credential, metadata, version, source proof and intended output can return `needs_prepare_revalidation`; resume revalidates those bounds and continues the original operation on the same page. Any pending, unknown or failed mutation request, including an uncertain page/upload allocation, returns `NO_REPLAY` through this tool. If all requests were acknowledged and the original integrity intent is bound to the same root, the tool delegates to existing core publication reconcile/resume under its isolated source decoder. It never replaces those guards with the original pre-mutation plan. A known pending upload reuses its acknowledged upload ID; expired/failed artifacts do not cause automatic allocation. Completed operations return their retained verified result without another write.
|
|
21
|
+
5. Historical attempt files without an operation ID require an explicit `--operation-id ORIGINAL_OPERATION_ID` on recovery. The typed core recovery use case must first prove exact page/source/scope, frozen content hashes and original integrity intent before the tool durably adds that identity to the existing ledger. It never searches by name, creates a replacement ledger or allocates a second operation. A mismatch or missing receipt stops recovery. Old cache/operation records that cannot be proved retain the independent migration's public review envelope, never execute old payloads.
|
|
22
|
+
|
|
23
|
+
Recovery consumes the approved output bytes exactly and verifies their hashes against the original publication receipt and retained intended-content hash. A newer converter's Markdown/frontmatter formatting is not allowed to rewrite that frozen authorization. New apply still reconstructs and checks its complete current source output; recovery after acknowledged mutations uses the core engine's retained post-mutation guards.
|
|
24
|
+
|
|
25
|
+
Publication continuation compares actual Notion readback through the same Markdown materialization used by consumers. A quote followed by an independent paragraph or list can require a separator omitted by Notion's Markdown response. Restoration requires complete ordered block evidence, a stable page revision and a unique text mapping; plain Markdown alone cannot authorize splitting a legal lazy quote continuation. Missing or ambiguous evidence preserves the conflict. Structural evidence participates in new snapshot versions, while original source ZIP bytes, reviewed output and retained receipt guards remain unchanged.
|
|
26
|
+
|
|
27
|
+
A completed whole-page Markdown replacement can cover an earlier acknowledged block repair on that same page after the writer retires obsolete block guards. Reconciliation must trace the earlier repair's saved parent chain, prove the later full replacement and its current body against all retained guards, and validate the complete original publication journal. Pending writes, another page's replacement, partial updates or an incomplete ownership chain cannot provide coverage. The read-only result identifies both intent indices; original intent status, response and guards remain audit history, and the covered repair is not replayed.
|
|
28
|
+
|
|
29
|
+
A failed References write formally reconciled as `known_not_applied` remains failed audit history. A later completed replacement of the same native rich-text property can cover its obsolete value only when the complete frozen reference inventory, acknowledged child allocations, current property, bodies and retained guards all verify. Reconciliation records the covering intent and does not trust an old replay pointer as mutation authority. Known root and child creates use their unique original completed POST acknowledgements, exact page IDs, parents, markers and reference bindings; uncertain allocations still require creation-correlation proof. Deferred References retries do not claim a future intent index before their actual replacement is dispatched.
|
|
30
|
+
|
|
31
|
+
When a previously reviewed plan has never installed an attempt, an operator can explicitly request a current-baseline successor with `ntn-skills-portable-convert remote-replan --from-plan ORIGINAL.json --expected-plan-hash OLD_SHA256 --ledger ORIGINAL_ATTEMPT_PATH --preserve-output`. This performs remote reads and returns a new JSON plan on stdout; it never edits the original plan. Its `portable-remote-reviewed-upgrade` format retains the complete original plan bytes, SHA-256 and attempt path in `lineage`, captures the actual current snapshot and preserves every reviewed output byte. It rejects an existing original attempt or a retained same-page/scope publication, an unchanged materialization version, or any change to raw source, metadata, proof, references, ZIP or resources. Only the proved generated entry name representation may differ.
|
|
32
|
+
|
|
33
|
+
Review the successor separately, then use `remote-apply --plan NEW.json --expected-plan-hash NEW_SHA256 --ledger NEW_ATTEMPT_PATH --apply`. The new attempt path must differ from the original, which must still be absent. Existing attempts continue through their original reconcile/resume contract and cannot use replan to escape their guards. Normal CLI source interpretation remains strict current v2; this independently packaged operator carries the historical input and explicit lineage contract.
|
|
34
|
+
|
|
35
|
+
When an existing known-root operation has zero mutation intents but its original snapshot was generated by an older materialization revision, use the independent tool's explicit recovery review instead of creating another plan or operation:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
ntn-skills-portable-convert remote-recovery-plan --plan ORIGINAL.json --expected-plan-hash ORIGINAL_SHA256 --ledger ORIGINAL_ATTEMPT --expected-page PAGE_UUID --operation-id ORIGINAL_OPERATION_ID
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This read-only command returns a `portable-remote-recovery-review` JSON document. Save those exact bytes and review their SHA-256. It binds the complete original plan/hash, absolute original ledger path and ledger-byte hash, original operation/page, unchanged output and an actual current snapshot. The public core recovery gate must prove zero mutation intents, an unbound integrity page and a writing marker. Raw metadata, credential/proof guards, complete References, source ZIP and resource hashes must remain equal; only generated entry naming and materialization snapshot/version fields may differ.
|
|
42
|
+
|
|
43
|
+
Resume that same operation with the original plan and ledger plus `--recovery-plan REVIEW.json --expected-recovery-plan-hash REVIEW_SHA256 --apply` on `remote-resume`. The tool rechecks the review hash, original operation/ledger hash, complete current authority and the reviewed current version before the core accepts the continuation baseline. It preserves historical receipt bounds and executes the existing publication using that current baseline's strict version guard. Wrong operation/ledger, changed authored content/metadata/resources, forged current baselines, or any mutation intent reject this branch. Pending or unknown writes must use the existing reconciliation path; a recovery review cannot authorize their replay. Normal runtime callers do not enable materialization-version continuation.
|
|
44
|
+
|
|
45
|
+
The portable converter never PATCHes Notion directly; its proof commands retain the proof converter's sole guarded Publication-property write. Neither path clears Files nor substitutes offline bytes for newer user edits. `remote-plan` accepts an explicitly selected unmanaged page with an empty Publication property and binds that exact state in its reviewed guard. Applying the unchanged plan republishes the reviewed content on the same page and creates a current proof. `proof-plan` instead requires an existing committed historical proof; it cannot enroll unmanaged pages. Changed source or guards reject apply.
|