@plurnk/plurnk-schemes 3.3.0 → 3.3.1

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.
Files changed (70) hide show
  1. package/README.md +5 -5
  2. package/SPEC.md +119 -745
  3. package/dist/ByteSource.d.ts +13 -0
  4. package/dist/ByteSource.d.ts.map +1 -1
  5. package/dist/ByteSource.js +62 -1
  6. package/dist/ByteSource.js.map +1 -1
  7. package/dist/MessageScheme.js +1 -1
  8. package/dist/MessageScheme.js.map +1 -1
  9. package/dist/MetadataOptions.d.ts +1 -2
  10. package/dist/MetadataOptions.d.ts.map +1 -1
  11. package/dist/MetadataOptions.js +3 -6
  12. package/dist/MetadataOptions.js.map +1 -1
  13. package/dist/MimetypeClassifier.d.ts +5 -0
  14. package/dist/MimetypeClassifier.d.ts.map +1 -1
  15. package/dist/MimetypeClassifier.js +33 -5
  16. package/dist/MimetypeClassifier.js.map +1 -1
  17. package/dist/OutputScheme.js +2 -2
  18. package/dist/OutputScheme.js.map +1 -1
  19. package/dist/PacketSections.d.ts +9 -1
  20. package/dist/PacketSections.d.ts.map +1 -1
  21. package/dist/PacketSections.js +1 -1
  22. package/dist/PacketSections.js.map +1 -1
  23. package/dist/ResourceNames.js +1 -1
  24. package/dist/ResourceNames.js.map +1 -1
  25. package/dist/SchemeDiscovery.d.ts.map +1 -1
  26. package/dist/SchemeDiscovery.js +9 -48
  27. package/dist/SchemeDiscovery.js.map +1 -1
  28. package/dist/Slicer.js +11 -11
  29. package/dist/Slicer.js.map +1 -1
  30. package/dist/Summarize.js +2 -2
  31. package/dist/Summarize.js.map +1 -1
  32. package/dist/ctx.d.ts +2 -3
  33. package/dist/ctx.d.ts.map +1 -1
  34. package/dist/edit-receipt.d.ts +4 -0
  35. package/dist/edit-receipt.d.ts.map +1 -1
  36. package/dist/handler.d.ts +26 -2
  37. package/dist/handler.d.ts.map +1 -1
  38. package/dist/index.d.ts +7 -15
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +3 -11
  41. package/dist/index.js.map +1 -1
  42. package/package.json +4 -4
  43. package/dist/FileByteSource.d.ts +0 -9
  44. package/dist/FileByteSource.d.ts.map +0 -1
  45. package/dist/FileByteSource.js +0 -43
  46. package/dist/FileByteSource.js.map +0 -1
  47. package/dist/GeneratedByteSource.d.ts +0 -8
  48. package/dist/GeneratedByteSource.d.ts.map +0 -1
  49. package/dist/GeneratedByteSource.js +0 -21
  50. package/dist/GeneratedByteSource.js.map +0 -1
  51. package/dist/PathMimetype.d.ts +0 -6
  52. package/dist/PathMimetype.d.ts.map +0 -1
  53. package/dist/PathMimetype.js +0 -30
  54. package/dist/PathMimetype.js.map +0 -1
  55. package/dist/edit-statement.d.ts +0 -5
  56. package/dist/edit-statement.d.ts.map +0 -1
  57. package/dist/edit-statement.js +0 -2
  58. package/dist/edit-statement.js.map +0 -1
  59. package/dist/module-slice.d.ts +0 -22
  60. package/dist/module-slice.d.ts.map +0 -1
  61. package/dist/module-slice.js +0 -2
  62. package/dist/module-slice.js.map +0 -1
  63. package/dist/packet.d.ts +0 -10
  64. package/dist/packet.d.ts.map +0 -1
  65. package/dist/packet.js +0 -4
  66. package/dist/packet.js.map +0 -1
  67. package/dist/resource-tree.d.ts +0 -15
  68. package/dist/resource-tree.d.ts.map +0 -1
  69. package/dist/resource-tree.js +0 -2
  70. package/dist/resource-tree.js.map +0 -1
package/README.md CHANGED
@@ -9,7 +9,7 @@ Framework + contract for `@plurnk/plurnk-schemes-*` URI handler packages. Consum
9
9
 
10
10
  ## Write a scheme
11
11
 
12
- Ship a scheme by publishing a package — **under any scope** (`@acme/whatever`; discovery keys on `plurnk.kind`, not the `@plurnk` scope) — that declares itself and default-exports a `SchemeHandler`. Install it and it lights up; there is no first-party allow-list (scope-agnostic discovery, SPEC §6).
12
+ Ship a scheme by publishing a package — **under any scope** (`@acme/whatever`; discovery keys on `plurnk.kind`, not the `@plurnk` scope) — that declares itself and default-exports a `SchemeHandler`. Install it and it lights up; there is no first-party allow-list (scope-agnostic discovery, {§scheme-discovery}).
13
13
 
14
14
  ### 1. Declare in `package.json`
15
15
 
@@ -60,10 +60,10 @@ them or author COPY/MOVE effect envelopes. A regional `editBatch`
60
60
  returns `EditBatchResult` with its typed `EditBatchReceipt`; the engine validates
61
61
  and projects it.
62
62
  The optional synchronous `attributions(context)` hook may return no, one, or
63
- many opaque tags for each provider emission attempt ({§extension-attribution}).
63
+ many opaque tags for each provider emission attempt ({§extension-discovery}).
64
64
  `implements SchemeHandler` gives compile-time signature checking. The statement
65
65
  and path types (`FindStatement`, `SendStatement`, `UrlPath`, etc.) are re-exported
66
- from this package, so you depend on and peer (`^1`) only
66
+ from this package, so you depend on and peer (`^3.0.0`) only
67
67
  `@plurnk/plurnk-schemes`; grammar rides underneath.
68
68
 
69
69
  ### 3. Declare the manifest — including self-doc
@@ -89,7 +89,7 @@ static manifest: SchemeManifest = {
89
89
  };
90
90
  ```
91
91
 
92
- - **`documentation`** — the **deep doc** (ops, channels, edge cases) with an exact H2 `Summary`. The consumer materializes it as a pull-able `worker:///_plurnk/plurnk/<name>.md` entry: FIND catalogs the summary and the model READs the body on demand, off the hot path. It is analogous to executor supplemental `details`. **Convention:** keep it in a **`docs/<name>.md`** file (root) and load it at module init with the snippet above — `../` resolves the same from `src/` (test) and `dist/` (built); add `docs/**/*` to `files`. A missing file fails-hard at import.
92
+ - **`documentation`** — the **deep doc** (ops, channels, edge cases) with an exact H2 `Summary`. The consumer materializes it as a pull-able `plurnk:///<name>.md` entry: FIND catalogs the summary and the model READs the body on demand, off the hot path. It is analogous to executor supplemental `details`. **Convention:** keep it in a **`docs/<name>.md`** file (root) and load it at module init with the snippet above — `../` resolves the same from `src/` (test) and `dist/` (built); add `docs/**/*` to `files`. A missing file fails-hard at import.
93
93
  - **`glyph`** — optional opaque client display metadata. It is discoverable through the client capability wire and never rendered into model teaching; clients choose fallback, fonts, and theme.
94
94
 
95
95
  Declare `lineAnchors: true` when stable textual representations should publish
@@ -124,7 +124,7 @@ That's the whole contract: declare, `implements SchemeHandler`, manifest with se
124
124
  - `Matcher.matchAgainstContent(body, content, mimetype, mimetypes)` - boolean resource selection over `Mimetypes.query` (glob/regex/jsonpath/xpath), returning locator/exact-region `MatchEvidence`.
125
125
  - `Results.problem` / `.failure` / `.assert` / `.assertReadResult` / `.assertMatchEvidenceList` / `.attachInstance` / `.isEntry` / `.isProposal` / `.isPassthrough` / `.isErrorStatus` - RFC 9457 result builders, validators, durable-occurrence attachment, and guards.
126
126
  - `PacketSections.assertDrafts(value, subject?)` — validates the exact tokenless section-draft list returned by a packet transformer.
127
- - `SchemeDiscovery.discover({ cwd? })` — scope-agnostic `node_modules` scan for `plurnk.kind:"scheme"` packages (trust-gated, fail-hard on prefix collision); returns descriptors plus canonical static attribution lists for represented packages (SPEC §6, {§extension-attribution}).
127
+ - `SchemeDiscovery.discover({ cwd? })` — scope-agnostic `node_modules` scan for `plurnk.kind:"scheme"` packages (trust-gated, fail-hard on prefix collision); returns descriptors plus canonical static attribution lists for represented packages ({§scheme-discovery}, {§extension-discovery}).
128
128
 
129
129
  `SchemeCtx` is the stable semantic API for trusted in-process schemes, not a
130
130
  sandbox. The consumer injects its implementation; database layout and private