Skip to content

feat: support runtime-maintained NAP-NAVIGATION history - #280

Open
dskvr wants to merge 7 commits into
mainfrom
feat/nap-navigation
Open

dskvr wants to merge 7 commits into
mainfrom
feat/nap-navigation

Conversation

@dskvr

@dskvr dskvr commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Napplets can now report committed advertised intent locations and read runtime-owned history through navigation.report/get. The reference runtime assigns visits, enforces manifest parameter allowlists and revision ordering, and revisits the exact retained entry through a correlated intent delivery to the same live instance.

  • Adds core types, NAP and SDK root/subpath APIs, explicit runtime injection, npm/JSR exports, and Vite requirement inference.
  • Implements endpoint isolation, retries, rejected-report high-water ordering, retention, traversal timeout, redirects, supersession, late reports, and termination. Browser/CLI conformance hosts bind eligibility to host-verified manifest metadata.
  • Updates package/site docs and authoring skills; adds release changesets.

Targets the published NAP-NAVIGATION draft and companion INTENT delivery draft. The maintainer confirmed the companion remains intended despite its closed/unmerged PR. Breaking pre-1.0 change: IntentDelivery.id is required; sender: null identifies shell-originated delivery. Runtime integrations must implement the same draft contract.

Validation: full build (12 tasks), type-check (19 tasks), recursive unit suites (881 passing; 3 existing ignored), JSR exports, 11 skills contracts, and assembled-site crawl (26 URLs) pass. Includes 224 conformance tests and real Chromium manifest-bound navigation coverage. Independent review findings for reset lifetime and sparse-array allocation were fixed with regressions. Pinned AI-slop scan is 98/100 with no code findings; only the unchanged transitive deepmerge low advisory remains, with no fix available.

No external production shell testing, merge, or publication included.

dskvr and others added 3 commits October 30, 2026 18:53
Implement the published navigation and companion intent-delivery drafts across types, domain bindings, SDK exports, runtime injection, manifest inference, and the reference conformance runtime. Host-verified manifests determine retained invocation eligibility; traversal correlates reports with target-scoped delivery IDs.

Constraint: Navigation depends on the companion published INTENT delivery draft; its closed PR remains intended by the maintainer.
Rejected: Napplet-owned history snapshots or browser History API interception | Neither belongs to the current draft contract
Confidence: high
Scope-risk: moderate
Directive: Preserve endpoint lifetime, report high-water ordering, and delivery-to-visit association when updating these drafts
Tested: Full build (12 tasks), type-check (19 tasks), recursive unit suites, real Chromium manifest-bound navigation, JSR exports, skills contracts
Not-tested: Production shell implementations outside this repository
Co-Authored-By: Codex <codex@openai.com>
Document committed-location reporting, runtime-owned history, optional-domain availability, report recovery, and target-scoped delivery correlation. Record verification and review evidence alongside the quick-task plan.

Confidence: high
Scope-risk: narrow
Tested: Documentation build, 26 assembled-site links, 11 skills contracts, strict TypeScript check of reporting example
Directive: Recheck the linked living drafts before changing interoperability guidance
Co-Authored-By: Codex <codex@openai.com>
Record completion against the open PR and preserve the checked source revision for future protocol updates.

Confidence: high
Scope-risk: narrow
Tested: Open PR #280 and passing full build, types, 881 units, export and documentation checks recorded in task summary
Co-Authored-By: Codex <codex@openai.com>
@dskvr
dskvr requested review from hzrd149 and a balanced review from Copilot October 30, 2026 18:01

This comment was marked as low quality.

dskvr and others added 4 commits November 4, 2026 14:59
Merge main at f28c2fd so navigation sits on the contracts main introduced
since merge base f683914. Transport and identity come from main; domain
lists and export maps keep both navigation and llm.

Fits that a text resolution would miss:
- catalog: add a navigation entry, classified exploratory, because
  NAP_IMPLEMENTATIONS is keyed by every NapDomain
- docs: add navigation to NAP_DOC_GROUPS, which drives the sidebar and index,
  and move the PR's intent delivery wording onto apps/docs/naps/intent.md
- boot: carry the verified endpoint over the hello port with
  shell.handleFrom(endpoint, envelope) instead of the default endpoint
- handler: run the navigation branch first, then main's domain filter, so
  correlated LLM invalid-request answers stay intact
- tests: move the navigation shim tests onto main's fake port shell, and give
  same-id LLM and maturity fixtures distinct ids because the endpoint registry
  keeps the first binding for an id

The PR's IntentDelivery.id, nullable sender and delivery-id-keyed controls are
carried through unchanged; they implement earlier draft revisions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…points

These gaps exist only because main's host policy and the PR's endpoint registry
now meet.

- hasDomain intersects endpoint grants with the host ceiling, so a host with a
  narrow ceiling no longer serves history or delivers intents that it withheld
- revoking a port binding ends the endpoint before the host removes the frame,
  in both attachReferenceShell and the boot harness, so a replaced document
  can't inherit the prior document's history or deliveries
- detach() stays host teardown and leaves the endpoint alive
- changeset notes that navigation is exploratory and needs a named opt-in

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both sides of the merge added an import from @napplet/conformance to server.ts.
It type-checked but dropped the aislop score below its 98/100 baseline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dskvr

dskvr commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged main into this branch, so the conflicts are gone. It was a plain merge at f28c2fdd with no force-push. Build, type-check, unit suites, the browser navigation round trip and the skills, JSR and maturity checks all pass locally.

The merge needed a few changes beyond the conflict hunks:

  • Catalog and docs: navigation now has its catalog entry and docs group, and the intent guidance moved to main's per-domain page.
  • Host ceiling and revocation: navigation now honors both. Without this, a narrow host would still serve history, and a replaced document could inherit the old one's. There are new tests for this.
  • Existing tests: the navigation shim tests moved to the MessagePort shell. The llm and maturity fixtures now use their own endpoint ids, because the registry here keeps the first binding for an id. Could someone check that's the behavior we want? A narrower handleFrom on a live id is silently ignored.

Mergeable doesn't mean ready to land, though. Both drafts moved on 2026-10-31, after this was built, and the current text contradicts part of what's here:

Draft Current text What this PR has
NAP-INTENT (#128 at 74f9bf85) "No intent delivery identifier is exposed", and intent.deliver "has no request or delivery id" Required IntentDelivery.id, plus retryIntent and failNavigationDelivery keyed on it
NAP-INTENT "The runtime MUST NOT fabricate, reserve, or null a sender for this purpose" sender: null for shell-originated delivery
NAP-NAVIGATION (#126 at 9a4b179e) "navigation adds no fields to the intent payload or delivery", and revisits settle by location "instead of delivery ids" NavigationReport.deliveryId and delivery-id settlement

I left all of that as it was, since this was only meant to resolve conflicts. Mind if we reconcile it with the current drafts before merging? The changeset and docs also say this follows the published drafts, so they'd change too. I also haven't checked the new rule that rejects mode with a null location.

Nit: the description says #128 is closed, and apps/docs/naps/navigation.md repeats that, but it's open now.

Not proven: boot.ts ending the endpoint on revoke has no direct test (the equivalent path in attachReferenceShell does), and pnpm test:conformance uses a fixture that doesn't touch navigation.

🤖 Generated with Claude Code

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.

2 participants