@plurnk/plurnk-schemes 1.0.5 → 1.0.6
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 +3 -3
- package/SPEC.md +38 -22
- package/dist/OutputScheme.js +1 -1
- package/dist/OutputScheme.js.map +1 -1
- package/dist/SchemeDiscovery.d.ts +1 -0
- package/dist/SchemeDiscovery.d.ts.map +1 -1
- package/dist/SchemeDiscovery.js +61 -30
- package/dist/SchemeDiscovery.js.map +1 -1
- package/dist/ctx.d.ts +2 -2
- package/dist/ctx.d.ts.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ export default class Foo implements SchemeHandler {
|
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
Implement only the op methods you support — `read` / `find` / `edit` / `copy` / `move` / `send` / … — all optional; the engine calls `handler[op.toLowerCase()](statement, ctx)` and returns **501** for any op you omit. `implements SchemeHandler` gives you compile-time signature checking. The statement + path types (`ReadStatement`, `SendStatement`, `UrlPath`, …) are **re-exported from this package**, so you depend on and
|
|
40
|
+
Implement only the op methods you support — `read` / `find` / `edit` / `copy` / `move` / `send` / … — all optional; the engine calls `handler[op.toLowerCase()](statement, ctx)` and returns **501** for any op you omit. `implements SchemeHandler` gives you compile-time signature checking. The statement + path types (`ReadStatement`, `SendStatement`, `UrlPath`, …) are **re-exported from this package**, so you depend on and peer (`^1`) **only `@plurnk/plurnk-schemes`** — grammar rides underneath.
|
|
41
41
|
|
|
42
42
|
### 3. Declare the manifest — including self-doc
|
|
43
43
|
|
|
@@ -52,7 +52,7 @@ static manifest: SchemeManifest = {
|
|
|
52
52
|
channels: { body: "text/markdown" },
|
|
53
53
|
defaultChannel: "body",
|
|
54
54
|
category: "data",
|
|
55
|
-
scope: "
|
|
55
|
+
scope: "workspace",
|
|
56
56
|
writableBy: ["model", "client"],
|
|
57
57
|
volatile: false,
|
|
58
58
|
modelVisible: true,
|
|
@@ -91,7 +91,7 @@ That's the whole contract: declare, `implements SchemeHandler`, manifest with se
|
|
|
91
91
|
- `Results.error` / `.logCoordinate` / `.isEntry` / `.isProposal` / `.isPassthrough` / `.isErrorStatus` — result builders + guards.
|
|
92
92
|
- `SchemeDiscovery.discover({ cwd? })` — scope-agnostic `node_modules` scan for `plurnk.kind:"scheme"` packages (trust-gated, fail-hard on prefix collision); returns descriptors for the consumer to register (SPEC §6).
|
|
93
93
|
|
|
94
|
-
The **capability ctx** (`SchemeCtx`) is the DB-free authoring surface for siblings — interfaces only; plurnk-
|
|
94
|
+
The **capability ctx** (`SchemeCtx`) is the DB-free authoring surface for siblings — interfaces only; the consumer (`plurnk-core`) injects the db-backed impl (see SPEC §3.bis). Those implementations themselves (CRUD primitives, entry-op handlers, channel writes, subscription registry) stay in the consumer.
|
|
95
95
|
|
|
96
96
|
## Tests
|
|
97
97
|
|
package/SPEC.md
CHANGED
|
@@ -22,7 +22,7 @@ class Known {
|
|
|
22
22
|
channels: { body: "text/markdown", preview: "text/markdown" },
|
|
23
23
|
defaultChannel: "body",
|
|
24
24
|
category: "data",
|
|
25
|
-
scope: "
|
|
25
|
+
scope: "workspace",
|
|
26
26
|
writableBy: ["model", "client"],
|
|
27
27
|
volatile: false,
|
|
28
28
|
modelVisible: true,
|
|
@@ -36,8 +36,8 @@ class Known {
|
|
|
36
36
|
| `name` | Matches `package.json#plurnk.name`. Addressing/routing identity (the URI prefix). |
|
|
37
37
|
| `channels` | `Record<channelName, mimetype>`. Channel names lowercase. Empty = dynamic per-call. |
|
|
38
38
|
| `defaultChannel` | Channel name targeted when path has no `#fragment`. Empty when channels is empty. |
|
|
39
|
-
| `category` | `"data"` (entry-bearing) \| `"logging"` (`log://` rows) \| `"control"` (addresses sister processes/runs, owns no entries — e.g. `
|
|
40
|
-
| `scope` | `"
|
|
39
|
+
| `category` | `"data"` (entry-bearing) \| `"logging"` (`log://` rows) \| `"control"` (addresses sister processes/runs, owns no entries — e.g. `worker://`). |
|
|
40
|
+
| `scope` | `"workspace"` \| `"worker"` (grammar 0.67 `default_scope`; `worker` = per-worker scratch backing `worker://`). |
|
|
41
41
|
| `writableBy` | Subset of `["model", "client", "system", "plugin"]`. Consumer returns 403 for outside-set writes. |
|
|
42
42
|
| `volatile` | Boolean. |
|
|
43
43
|
| `modelVisible` | Boolean. |
|
|
@@ -76,7 +76,7 @@ export interface SchemeHandler {
|
|
|
76
76
|
}
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
A sibling does `export default class X implements SchemeHandler` (with `static manifest: SchemeManifest`) and gets compile-time signature checking. The op set is exactly grammar's `PlurnkStatement` dispatch union and moves with the framework's grammar bump (0.74.57 added `work?`/`fork?`; `LOOK`/`BUFF` are grammar `ClientStatement` ops, client-facing and never dispatched to a scheme, so they're intentionally absent here). **The statement + path types (`ReadStatement`, `SendStatement`, `UrlPath`, …) are re-exported from this barrel**, so a sibling depends on and
|
|
79
|
+
A sibling does `export default class X implements SchemeHandler` (with `static manifest: SchemeManifest`) and gets compile-time signature checking. The op set is exactly grammar's `PlurnkStatement` dispatch union and moves with the framework's grammar bump (0.74.57 added `work?`/`fork?`; `LOOK`/`BUFF` are grammar `ClientStatement` ops, client-facing and never dispatched to a scheme, so they're intentionally absent here). **The statement + path types (`ReadStatement`, `SendStatement`, `UrlPath`, …) are re-exported from this barrel**, so a sibling depends on and peers (`^1`) ONLY `@plurnk/plurnk-schemes` — grammar rides underneath as the framework's transitive dep (§3).
|
|
80
80
|
|
|
81
81
|
Two surfaces are NOT yet in `SchemeHandler`, pending their result types migrating here from plurnk-service v0: the **CRUD primitives** (`readEntry`/`writeEntry`/`deleteEntry`, required for entry-bearing schemes) and the **proposal lifecycle** (the optional `ProposalAware.applyResolution` hook, already exported via §3.bis). Until then a scheme declares those methods directly.
|
|
82
82
|
|
|
@@ -136,15 +136,15 @@ Behavior ships as `export default class` (one class per file, static methods)
|
|
|
136
136
|
|
|
137
137
|
### §3.bis Capability ctx — the DB-free authoring surface {§capability-ctx}
|
|
138
138
|
|
|
139
|
-
The contract that lets a third-party `@plurnk/plurnk-schemes-*` sibling be authored without importing `@plurnk/plurnk-service` or touching a raw DB handle (forbidden by §5). **Interfaces only**: this repo exports the shapes; plurnk-
|
|
139
|
+
The contract that lets a third-party `@plurnk/plurnk-schemes-*` sibling be authored without importing `@plurnk/plurnk-service` or touching a raw DB handle (forbidden by §5). **Interfaces only**: this repo exports the shapes; the consumer (`plurnk-core`) injects a db-backed implementation behind them. Design converged on [plurnk-service#180](https://github.com/plurnk/plurnk-service/issues/180).
|
|
140
140
|
|
|
141
|
-
`SchemeCtx` carries per-dispatch identity (`
|
|
141
|
+
`SchemeCtx` carries per-dispatch identity (`workspaceId`/`workerId`/`loopId`/`turnId`/`writer`/`signal`) plus **five live capability namespaces** replacing raw `db`:
|
|
142
142
|
|
|
143
143
|
- `entries` — CRUD over the scheme's own namespace (`read`/`write`/`delete`).
|
|
144
144
|
- `channels` — content writes + state (`append`/`replace`/`setState`).
|
|
145
145
|
- `tags` — entry tags (`add`/`remove`/`list`).
|
|
146
|
-
- `notify` — between-turn client signal (`streamEvent`, metadata-only); not model-facing. (No `
|
|
147
|
-
- `subscriptions` — streaming lifecycle: `open(pathname, handle)` returns a
|
|
146
|
+
- `notify` — between-turn client signal (`streamEvent`, metadata-only); not model-facing. (No `wakeWorker`: the run-wake carries subscription-close context that only exists at stream completion, so it lives on `subscriptions.close`. Only streaming schemes wake a worker, always via close.)
|
|
147
|
+
- `subscriptions` — streaming lifecycle: `open(pathname, handle)` returns a worker+teardown-composed `AbortSignal` and takes a force-cancel `SubscriptionHandle`; `notifyChunk(channel, chunk, mimetype?)` is **fused** (append + stream/event in one call), with an optional per-call `mimetype` that retypes the channel to the content's actual type (passed statelessly per chunk; the impl writes only on change; the manifest channel mimetype is the pre-fetch seed default — plurnk-service#226); `close(reason, outcome?)` composites channel state + registry close + run wake. Designed against Exec (two-channel, cancel-tested).
|
|
148
148
|
|
|
149
149
|
There is **no `visibility` capability**: entry-level SHOW/HIDE was removed in plurnk-service's index/visibility teardown — SHOW/HIDE now collapse/expand `log://` rows, a log-side concern with no entry-visibility for a scheme to set (plurnk-service#180).
|
|
150
150
|
|
|
@@ -154,16 +154,7 @@ There is **no `visibility` capability**: entry-level SHOW/HIDE was removed in pl
|
|
|
154
154
|
|
|
155
155
|
## §4 What's NOT in this repo
|
|
156
156
|
|
|
157
|
-
DB-coupled
|
|
158
|
-
|
|
159
|
-
- `_entry-ops.ts` (read/edit/show/hide session entries)
|
|
160
|
-
- `_entry-crud.ts` (CRUD primitives + write-time tokenization helper)
|
|
161
|
-
- `_entry-send.ts` (SEND[410]/[499] dispatcher)
|
|
162
|
-
- `_entry-find.ts` (pathname-glob FIND)
|
|
163
|
-
- `ChannelWrite.ts` (channel append + subscription registry)
|
|
164
|
-
- `PlurnkSchemeContext` (per-call helper with DB handle)
|
|
165
|
-
|
|
166
|
-
These migrate when the v1 namespaced ctx API lands (entries / channels / visibility / tags / subscriptions / proposals / crossScheme / notify). v0 scope: types + pure helpers only.
|
|
157
|
+
DB-coupled entry/channel machinery — CRUD + write-time tokenization, the SEND/FIND dispatchers, the channel-write/subscription registry, the per-call DB-handle context — lives in the consumer (`plurnk-core`), never here. This package is types + pure helpers only; a scheme reaches the substrate through the §3.bis capability ctx, never a raw DB handle.
|
|
167
158
|
|
|
168
159
|
## §5 Forbidden (for third-party schemes) {§forbidden}
|
|
169
160
|
|
|
@@ -186,9 +177,34 @@ These migrate when the v1 namespaced ctx API lands (entries / channels / visibil
|
|
|
186
177
|
|
|
187
178
|
A scheme handler is discovered and registered with **zero first-party involvement** — install it, it lights up. The contract:
|
|
188
179
|
|
|
189
|
-
- **Declare** `plurnk.kind: "scheme"`
|
|
190
|
-
- **`SchemeDiscovery` owns the scan (this package).** `SchemeDiscovery.discover({ cwd? })` walks *all* of `node_modules` — scoped (`@acme/foo`) and unscoped — and returns `{ schemes: {name, packageName, attribution?}[], skipped }` for every package declaring `plurnk.kind === "scheme"
|
|
180
|
+
- **Declare** `plurnk.kind: "scheme"` in `package.json` — or, for a dual-faced package (e.g. MCP: exec + scheme), an array that **includes** `"scheme"` (`kind: ["exec", "scheme"]`, #483); every family scanner accepts a package whose kind is or includes its own, string form as the single-kind sugar. Then name the scheme(s) it owns, in one of two forms: `plurnk.schemes: [{ name, export }, …]` (canonical — one entry per scheme, `export` naming the handler-class export) or `plurnk.name: "<scheme>"` (sugar for exactly one scheme, the `default` export). One package may own several names; each name has exactly one owner (#473). This mirrors execs' `plurnk.runtimes: [{ name, glyph, example }]` — `plurnk.kind` plus a plural family-noun array of named capabilities is the shared manifest covenant across families; `export` is schemes' family-specific field (a scheme instantiates a class per name, where an executor dispatches tags through one).
|
|
181
|
+
- **`SchemeDiscovery` owns the scan (this package).** `SchemeDiscovery.discover({ cwd? })` walks *all* of `node_modules` — scoped (`@acme/foo`) and unscoped — and returns `{ schemes: {name, packageName, exportName?, attribution?}[], skipped }` for every package declaring `plurnk.kind === "scheme"`. Scope-agnostic, so a third party under their own scope is found with no first-party allow-list (plurnk-service#227); two names claiming one prefix fail-hard (across packages or within one), as does a malformed `plurnk.schemes` (locality of error, not a silent skip). It returns **descriptors, not handlers** — contract-only, it never imports a scheme package; the consumer imports each `packageName` and registers `new mod[exportName ?? "default"]()`, applying in-tree precedence. The scan primitives — package enumeration, the `PLURNK_PLUGINS_TRUSTED_ONLY` trust gate, the deployment-root `node_modules` walk — are one implementation in `@plurnk/plurnk-meta`, shared by all four family-head scanners; `SchemeDiscovery` adds only the scheme-descriptor shape on top.
|
|
191
182
|
- **`attribution` rides the descriptor verbatim.** A package may declare `plurnk.attribution` (a credit string, or an array of them); the scan passes it through untouched as `SchemeInfo.attribution` (`string | string[] | undefined`) — anything that isn't a string or string-array is dropped. The framework neither validates nor normalizes it: the `@plurnk`-tags-only-from-`@plurnk`-packages reservation policy is the **consumer's** to enforce on the surfaced credit (plurnk-service#26).
|
|
192
|
-
- **The framework stays contract-only.** `@plurnk/plurnk-schemes` never depends on a scheme package — that would nest daughters under it and the top-level scan would miss them. Daughters peer
|
|
193
|
-
-
|
|
183
|
+
- **The framework stays contract-only.** `@plurnk/plurnk-schemes` never depends on a scheme package — that would nest daughters under it and the top-level scan would miss them. Daughters peer the framework (`^1`); it arrives transitively and is itself ignored by the scan (no `plurnk.kind`).
|
|
184
|
+
- **The default bundle is the daemon's own `dependencies`**, not an aggregator package (the `-all` metapackages are retired). Installing `plurnk-core` surfaces the first-party schemes; any other leaf — first-party or third-party — is added by installing it, and scope-agnostic discovery lights it up identically. No bundle is ever a gate.
|
|
194
185
|
- **Trust.** An operator can require host-level trust before a discovered plugin registers (`PLURNK_PLUGINS_TRUSTED_ONLY`, plurnk-service#229) — the scope-agnostic scan widens reach, the trust gate bounds it.
|
|
186
|
+
|
|
187
|
+
## §7 Standards divergences register (#491, parent #408)
|
|
188
|
+
|
|
189
|
+
Doctrine: every plurnkism carries a DGR (documented good reason) or converges. Verified against RFC 3986 §3.2/§3.2.2, RFC 8089, RFC 7595, RFC 9110 + WHATWG Fetch, WHATWG EventSource (HTML §9.2), RFC 6455. This register is standing SPEC and grows with the lane; audit landed 2026-07-16.
|
|
190
|
+
|
|
191
|
+
### §7.1 URI shape of the invented schemes
|
|
192
|
+
|
|
193
|
+
| surface | standard neighbor | disposition |
|
|
194
|
+
|---|---|---|
|
|
195
|
+
| Unregistered schemes (`known`/`log`/`plurnk`/`worker`/`mcp`) | IANA URI scheme registry; RFC 7595 asks registration for web-facing schemes | **Convergent** — an internal, model-facing address space never emitted on the open web; RFC 7595's registration concern doesn't attach. Provisional registration becomes due only if one is ever exposed externally. |
|
|
196
|
+
| `scheme:///path` (empty authority: `known`/`log`/`plurnk`) | RFC 3986 §3.2 / RFC 8089 — `file:///path` is the canonical empty-authority form; terser `scheme:path` (mailto/urn) also legal | **Convergent with the `file://` precedent.** DGR for choosing `///` over the terser form: the `//` marks URL-shaped hierarchical addressing for a floor-grade model — one URI shape everywhere. |
|
|
197
|
+
| `scheme://name/path` (reg-name authority: `worker://self/…`, `mcp://<server>/…`) | RFC 3986 §3.2.2 — authority admits a registered name, not required DNS-resolvable; authority "governs the namespace" | **Convergent by construction** — the worker/server name governing its path namespace is the RFC's stated intent; mirrors `docker://`, `git://`. |
|
|
198
|
+
|
|
199
|
+
### §7.2 Protocol handling (the http/wss package)
|
|
200
|
+
|
|
201
|
+
| surface | standard neighbor | disposition |
|
|
202
|
+
|---|---|---|
|
|
203
|
+
| READ of HTML returns the post-JS rendered DOM, not the raw body | RFC 9110 / Fetch: a client hands back the response body verbatim | **DGR** (http SPEC §render-lifecycle): the scheme is model-facing content *acquisition*, not a byte-faithful HTTP client — a raw SPA body is unusable to the reader. Non-HTML streams verbatim (convergent). |
|
|
204
|
+
| Manual per-hop redirects, operator-capped hops | Fetch: `redirect: "follow"`, 20-hop cap, engine-internal | **DGR**: each hop is SSRF re-guarded (http SPEC §prefetch) — impossible under engine-followed redirects. The method/body downgrade itself (301/302 non-GET→GET, 303→GET, 307/308 preserve) follows Fetch exactly (convergent). |
|
|
205
|
+
| SSE consumed as a `data:`-payload read-projection | WHATWG EventSource: typed-event dispatch, `Last-Event-ID` auto-reconnect, `retry:` | **DGR** (http SPEC §sse): the model READs a flat text channel; event framing is transport, not content. Field *parsing* (data-join, one-space strip, CR/CRLF normalize) is spec-conformant. Reconnection is a tracked follow-up (#468), not a rejected concept. |
|
|
206
|
+
| WebSocket via the platform `WebSocket`; ws/wss SSRF-guarded | RFC 6455; no SSRF guard in the standard client | **Convergent by construction, plus a security addition** (the guard). Binary frames stringify loosely day-one — a scope gap tracked on #468, not a spec deviation. |
|
|
207
|
+
|
|
208
|
+
### §7.3 Covenant vs npm
|
|
209
|
+
|
|
210
|
+
`plurnk.kind` / `plurnk.schemes[]` in `package.json` (§6) is the ordinary namespaced-key npm extension pattern; `exports` conditions (`plurnk-dev`) are standard Node resolution. **Convergent** — no register row needed beyond §6 itself.
|
package/dist/OutputScheme.js
CHANGED
package/dist/OutputScheme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutputScheme.js","sourceRoot":"","sources":["../src/OutputScheme.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,4EAA4E;AAC5E,4EAA4E;AAC5E,+EAA+E;AAC/E,8EAA8E;AAC9E,+EAA+E;AAe/E,MAAM,CAAC,OAAO,OAAO,YAAY;IAC7B,uEAAuE;IACvE,wEAAwE;IACxE,6EAA6E;IAC7E,wEAAwE;IACxE,qEAAqE;IACrE,0EAA0E;IAC1E,MAAM,CAAC,mBAAmB,CAAC,IAAiB;QACxC,OAAO;YACH,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"OutputScheme.js","sourceRoot":"","sources":["../src/OutputScheme.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,4EAA4E;AAC5E,4EAA4E;AAC5E,+EAA+E;AAC/E,8EAA8E;AAC9E,+EAA+E;AAe/E,MAAM,CAAC,OAAO,OAAO,YAAY;IAC7B,uEAAuE;IACvE,wEAAwE;IACxE,6EAA6E;IAC7E,wEAAwE;IACxE,qEAAqE;IACrE,0EAA0E;IAC1E,MAAM,CAAC,mBAAmB,CAAC,IAAiB;QACxC,OAAO;YACH,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,WAAW;YAClB,UAAU,EAAE,CAAC,QAAQ,CAAC;YACtB,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,IAAI;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;SACxB,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemeDiscovery.d.ts","sourceRoot":"","sources":["../src/SchemeDiscovery.ts"],"names":[],"mappings":"AA2BA,MAAM,WAAW,UAAU;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAM7B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;CACrD;AAED,MAAM,WAAW,qBAAqB;IAClC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IAC5C,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7C,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,OAAO,eAAe;;IAChC,OAAa,QAAQ,CAAC,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,
|
|
1
|
+
{"version":3,"file":"SchemeDiscovery.d.ts","sourceRoot":"","sources":["../src/SchemeDiscovery.ts"],"names":[],"mappings":"AA2BA,MAAM,WAAW,UAAU;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAM7B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAM7B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;CACrD;AAED,MAAM,WAAW,qBAAqB;IAClC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IAC5C,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7C,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,OAAO,eAAe;;IAChC,OAAa,QAAQ,CAAC,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA8BnF;CAqFJ"}
|
package/dist/SchemeDiscovery.js
CHANGED
|
@@ -9,24 +9,29 @@ export default class SchemeDiscovery {
|
|
|
9
9
|
const skipped = new Set();
|
|
10
10
|
for (const dir of dirs) {
|
|
11
11
|
signal?.throwIfAborted();
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
12
|
+
const infos = await SchemeDiscovery.#readSchemeInfos(dir, signal);
|
|
13
|
+
if (infos.length === 0)
|
|
14
14
|
continue;
|
|
15
15
|
// Host plugin-trust gate: an untrusted third-party package is
|
|
16
|
-
// discovered but not surfaced for registration — recorded, never
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
// discovered but not surfaced for registration — recorded, never
|
|
17
|
+
// crashed on. All of a package's schemes share its packageName, so
|
|
18
|
+
// one trust check gates the whole package.
|
|
19
|
+
if (!Meta.isTrusted(infos[0].packageName)) {
|
|
20
|
+
skipped.add(infos[0].packageName);
|
|
19
21
|
continue;
|
|
20
22
|
}
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
for (const info of infos) {
|
|
24
|
+
const existing = byName.get(info.name);
|
|
25
|
+
// Two packages (or two entries) claiming one scheme prefix is an
|
|
26
|
+
// unresolvable ambiguity — fail-hard, mirroring execs' runtime-
|
|
27
|
+
// collision rule. One NAME one owner, even as one PACKAGE owns
|
|
28
|
+
// several names. (In-tree precedence is the consumer's concern.)
|
|
29
|
+
if (existing !== undefined) {
|
|
30
|
+
throw new Error(`scheme name collision: '${info.name}' claimed by both `
|
|
31
|
+
+ `${existing.packageName} and ${info.packageName}`);
|
|
32
|
+
}
|
|
33
|
+
byName.set(info.name, info);
|
|
28
34
|
}
|
|
29
|
-
byName.set(info.name, info);
|
|
30
35
|
}
|
|
31
36
|
return { schemes: [...byName.values()], skipped: [...skipped].sort() };
|
|
32
37
|
}
|
|
@@ -51,9 +56,13 @@ export default class SchemeDiscovery {
|
|
|
51
56
|
static #isAbort(err) {
|
|
52
57
|
return err instanceof Error && err.name === "AbortError";
|
|
53
58
|
}
|
|
54
|
-
//
|
|
55
|
-
//
|
|
56
|
-
|
|
59
|
+
// The SchemeInfo(s) for a package declaring plurnk.kind:"scheme"; [] for
|
|
60
|
+
// anything else (non-package dir, non-scheme, no declaration). A package
|
|
61
|
+
// declares EITHER `plurnk.schemes: [{ name, export }, …]` (canonical, one
|
|
62
|
+
// entry per scheme it owns) OR `plurnk.name: "<scheme>"` (sugar for exactly
|
|
63
|
+
// one, default export) — #473. A malformed `plurnk.schemes` is an authoring
|
|
64
|
+
// contract violation and fails hard (locality of error), not a silent skip.
|
|
65
|
+
static async #readSchemeInfos(dir, signal) {
|
|
57
66
|
let raw;
|
|
58
67
|
try {
|
|
59
68
|
raw = await fs.readFile(path.join(dir, "package.json"), { encoding: "utf-8", signal });
|
|
@@ -61,35 +70,57 @@ export default class SchemeDiscovery {
|
|
|
61
70
|
catch (err) {
|
|
62
71
|
if (SchemeDiscovery.#isAbort(err))
|
|
63
72
|
throw err;
|
|
64
|
-
return
|
|
73
|
+
return [];
|
|
65
74
|
}
|
|
66
75
|
let pkg;
|
|
67
76
|
try {
|
|
68
77
|
pkg = JSON.parse(raw);
|
|
69
78
|
}
|
|
70
79
|
catch {
|
|
71
|
-
return
|
|
80
|
+
return [];
|
|
72
81
|
}
|
|
73
82
|
if (typeof pkg !== "object" || pkg === null)
|
|
74
|
-
return
|
|
83
|
+
return [];
|
|
75
84
|
const record = pkg;
|
|
76
85
|
const plurnk = record.plurnk;
|
|
77
86
|
if (typeof plurnk !== "object" || plurnk === null)
|
|
78
|
-
return
|
|
87
|
+
return [];
|
|
79
88
|
const plurnkRec = plurnk;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
89
|
+
// is-or-includes (#483): a dual-faced package (e.g. MCP — exec + scheme)
|
|
90
|
+
// declares `kind: ["exec", "scheme"]`; the string form stays as the
|
|
91
|
+
// single-kind sugar. A scanner accepts a package whose kind IS or
|
|
92
|
+
// INCLUDES its own — one protocol, one package, both faces.
|
|
93
|
+
const kind = plurnkRec.kind;
|
|
94
|
+
const isScheme = kind === "scheme" || (Array.isArray(kind) && kind.includes("scheme"));
|
|
95
|
+
if (!isScheme)
|
|
96
|
+
return [];
|
|
84
97
|
if (typeof record.name !== "string" || record.name === "")
|
|
85
|
-
return
|
|
98
|
+
return [];
|
|
99
|
+
const packageName = record.name;
|
|
86
100
|
const attribution = SchemeDiscovery.#attribution(plurnkRec.attribution);
|
|
87
101
|
// Only carry the key when credit is actually present — an absent
|
|
88
|
-
// attribution leaves the property off entirely (not `undefined`)
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
102
|
+
// attribution leaves the property off entirely (not `undefined`).
|
|
103
|
+
const withAttr = (info) => attribution === undefined ? info : { ...info, attribution };
|
|
104
|
+
const declared = plurnkRec.schemes;
|
|
105
|
+
if (declared !== undefined) {
|
|
106
|
+
if (!Array.isArray(declared) || declared.length === 0) {
|
|
107
|
+
throw new Error(`${packageName}: plurnk.schemes must be a non-empty array of { name, export }`);
|
|
108
|
+
}
|
|
109
|
+
return declared.map((entry) => {
|
|
110
|
+
if (typeof entry !== "object" || entry === null)
|
|
111
|
+
throw new Error(`${packageName}: each plurnk.schemes entry must be an object`);
|
|
112
|
+
const e = entry;
|
|
113
|
+
if (typeof e.name !== "string" || e.name === "")
|
|
114
|
+
throw new Error(`${packageName}: a plurnk.schemes entry is missing a non-empty name`);
|
|
115
|
+
if (typeof e.export !== "string" || e.export === "")
|
|
116
|
+
throw new Error(`${packageName}: plurnk.schemes entry '${e.name}' is missing a non-empty export`);
|
|
117
|
+
return withAttr({ name: e.name, packageName, exportName: e.export });
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
if (typeof plurnkRec.name === "string" && plurnkRec.name !== "") {
|
|
121
|
+
return [withAttr({ name: plurnkRec.name, packageName })]; // sugar: single scheme, default export
|
|
122
|
+
}
|
|
123
|
+
return [];
|
|
93
124
|
}
|
|
94
125
|
// Pass `plurnk.attribution` through verbatim when it's a string or an array
|
|
95
126
|
// of strings; anything else (number, object, mixed array) is not credit and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemeDiscovery.js","sourceRoot":"","sources":["../src/SchemeDiscovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,IAAI,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"SchemeDiscovery.js","sourceRoot":"","sources":["../src/SchemeDiscovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,IAAI,MAAM,qBAAqB,CAAC;AAqDvC,MAAM,CAAC,OAAO,OAAO,eAAe;IAChC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,GAAoB,EAAE;QAC/C,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAC3B,MAAM,IAAI,GAAG,OAAO,CAAC,WAAW,IAAI,MAAM,eAAe,CAAC,mBAAmB,CAAC,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,M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AO,EAAE,CAAC;IACd,CAAC;IAED,4EAA4E;IAC5E,4EAA4E;IAC5E,yEAAyE;IACzE,yBAAyB;IACzB,MAAM,CAAC,YAAY,CAAC,KAAc;QAC9B,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC;QAC5C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC;YAAE,OAAO,KAAK,CAAC;QACpF,OAAO,SAAS,CAAC;IACrB,CAAC;CACJ"}
|
package/dist/ctx.d.ts
CHANGED
|
@@ -61,8 +61,8 @@ export interface CrossSchemeCaps {
|
|
|
61
61
|
readonly _deferred: "see plurnk-service#180 — designed when first cross-scheme COPY/MOVE forces the FROM/TO shape";
|
|
62
62
|
}
|
|
63
63
|
export interface SchemeCtx {
|
|
64
|
-
readonly
|
|
65
|
-
readonly
|
|
64
|
+
readonly workspaceId: number;
|
|
65
|
+
readonly workerId: number;
|
|
66
66
|
readonly loopId: number;
|
|
67
67
|
readonly turnId: number;
|
|
68
68
|
readonly writer: WriterTier;
|
package/dist/ctx.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ctx.d.ts","sourceRoot":"","sources":["../src/ctx.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAIjE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAItE,MAAM,WAAW,SAAS;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE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AC5B,QAAQ,CAAC,SAAS,EAAE,8FAA8F,CAAC;CACtH;AAMD,MAAM,WAAW,SAAS;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAG5B,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC;IAEzC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,aAAa,EAAE,gBAAgB,CAAC;IACzC,QAAQ,CAAC,WAAW,EAAE,eAAe,CAAC;CACzC;AAUD,MAAM,WAAW,aAAa;IAC1B,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACtG"}
|
package/dist/types.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface SchemeManifest {
|
|
|
10
10
|
readonly channels: Record<string, string>;
|
|
11
11
|
readonly defaultChannel: string;
|
|
12
12
|
readonly category: "data" | "logging" | "control";
|
|
13
|
-
readonly scope: "
|
|
13
|
+
readonly scope: "workspace" | "worker";
|
|
14
14
|
readonly writableBy: ReadonlyArray<WriterTier>;
|
|
15
15
|
readonly volatile: boolean;
|
|
16
16
|
readonly modelVisible: boolean;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,UAAU,G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AIlD,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,QAAQ,CAAC;IACvC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAI/B,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAMpC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAKxB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzC;AAED,MAAM,WAAW,SAAS;IACtB,QAAQ,CAAC,IAAI,EAAE,KAAK,GAAG,KAAK,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CACjC;AAED,eAAO,MAAM,kBAAkB,EAAE,SAM/B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurnk/plurnk-schemes",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Framework + contract for the @plurnk/plurnk-schemes-* URI handler family.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plurnk",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"prepack": "npm run build"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@plurnk/plurnk-grammar": "1.0.
|
|
50
|
-
"@plurnk/plurnk-mimetypes": "1.0.
|
|
49
|
+
"@plurnk/plurnk-grammar": "1.0.6",
|
|
50
|
+
"@plurnk/plurnk-mimetypes": "1.0.6"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@plurnk/plurnk-meta": "1.0.
|
|
53
|
+
"@plurnk/plurnk-meta": "1.0.6"
|
|
54
54
|
}
|
|
55
55
|
}
|