@plurnk/plurnk-schemes 3.3.0 → 3.3.2
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 +6 -6
- package/SPEC.md +119 -745
- package/dist/ByteSource.d.ts +13 -0
- package/dist/ByteSource.d.ts.map +1 -1
- package/dist/ByteSource.js +62 -1
- package/dist/ByteSource.js.map +1 -1
- package/dist/MessageScheme.js +1 -1
- package/dist/MessageScheme.js.map +1 -1
- package/dist/MetadataOptions.d.ts +2 -7
- package/dist/MetadataOptions.d.ts.map +1 -1
- package/dist/MetadataOptions.js +5 -8
- package/dist/MetadataOptions.js.map +1 -1
- package/dist/MimetypeClassifier.d.ts +5 -0
- package/dist/MimetypeClassifier.d.ts.map +1 -1
- package/dist/MimetypeClassifier.js +33 -5
- package/dist/MimetypeClassifier.js.map +1 -1
- package/dist/OutputScheme.js +2 -2
- package/dist/OutputScheme.js.map +1 -1
- package/dist/PacketSections.d.ts +9 -1
- package/dist/PacketSections.d.ts.map +1 -1
- package/dist/PacketSections.js +1 -1
- package/dist/PacketSections.js.map +1 -1
- package/dist/ResourceNames.js +1 -1
- package/dist/ResourceNames.js.map +1 -1
- package/dist/Results.d.ts.map +1 -1
- package/dist/Results.js +4 -1
- package/dist/Results.js.map +1 -1
- package/dist/SchemeDiscovery.d.ts.map +1 -1
- package/dist/SchemeDiscovery.js +9 -48
- package/dist/SchemeDiscovery.js.map +1 -1
- package/dist/Slicer.js +11 -11
- package/dist/Slicer.js.map +1 -1
- package/dist/Summarize.js +2 -2
- package/dist/Summarize.js.map +1 -1
- package/dist/ctx.d.ts +2 -3
- package/dist/ctx.d.ts.map +1 -1
- package/dist/edit-receipt.d.ts +4 -0
- package/dist/edit-receipt.d.ts.map +1 -1
- package/dist/handler.d.ts +26 -2
- package/dist/handler.d.ts.map +1 -1
- package/dist/index.d.ts +7 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -11
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/FileByteSource.d.ts +0 -9
- package/dist/FileByteSource.d.ts.map +0 -1
- package/dist/FileByteSource.js +0 -43
- package/dist/FileByteSource.js.map +0 -1
- package/dist/GeneratedByteSource.d.ts +0 -8
- package/dist/GeneratedByteSource.d.ts.map +0 -1
- package/dist/GeneratedByteSource.js +0 -21
- package/dist/GeneratedByteSource.js.map +0 -1
- package/dist/PathMimetype.d.ts +0 -6
- package/dist/PathMimetype.d.ts.map +0 -1
- package/dist/PathMimetype.js +0 -30
- package/dist/PathMimetype.js.map +0 -1
- package/dist/edit-statement.d.ts +0 -5
- package/dist/edit-statement.d.ts.map +0 -1
- package/dist/edit-statement.js +0 -2
- package/dist/edit-statement.js.map +0 -1
- package/dist/module-slice.d.ts +0 -22
- package/dist/module-slice.d.ts.map +0 -1
- package/dist/module-slice.js +0 -2
- package/dist/module-slice.js.map +0 -1
- package/dist/packet.d.ts +0 -10
- package/dist/packet.d.ts.map +0 -1
- package/dist/packet.js +0 -4
- package/dist/packet.js.map +0 -1
- package/dist/resource-tree.d.ts +0 -15
- package/dist/resource-tree.d.ts.map +0 -1
- package/dist/resource-tree.js +0 -2
- 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,
|
|
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-
|
|
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 (`^
|
|
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 `
|
|
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
|
|
@@ -123,8 +123,8 @@ That's the whole contract: declare, `implements SchemeHandler`, manifest with se
|
|
|
123
123
|
- `PathMimetype.resolve(pathname, default, mimetypes)` — path-extension mimetype resolver.
|
|
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
|
-
- `PacketSections.assertDrafts(value, subject?)` — validates the exact
|
|
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 (
|
|
126
|
+
- `PacketSections.assertDrafts(value, subject?)` — validates the exact unweighted 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 ({§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
|