@plurnk/plurnk-schemes 1.2.0 → 1.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.
package/README.md CHANGED
@@ -32,7 +32,7 @@ export default class Foo implements SchemeHandler {
32
32
  static manifest: SchemeManifest = { /* step 3 */ };
33
33
 
34
34
  async read(statement: ReadStatement, ctx: SchemeCtx): Promise<SchemeResult> {
35
- /* … reach the substrate ONLY through ctx capabilities (SPEC §3.bis, §5) … */
35
+ /* … use ctx's stable domain capabilities (SPEC §3.bis) … */
36
36
  }
37
37
  }
38
38
  ```
@@ -78,8 +78,8 @@ That's the whole contract: declare, `implements SchemeHandler`, manifest with se
78
78
 
79
79
  - Manifest/flags: `SchemeManifest` (incl. `example` / `documentation` / `glyph` self-doc), `SchemeFlagAffinity`, `WriterTier`, `LoopFlags`, `DEFAULT_LOOP_FLAGS`.
80
80
  - Behavior contract: `SchemeHandler` + optional `PacketSectionTransformer` (`PacketSection`); the re-exported scheme-facing grammar types (`PlurnkStatement` + per-op statements + `ParsedPath` / `LocalPath` / `UrlPath`).
81
- - Result families: `SchemeResult` / `EntryResult` / `ProposalResult` / `PassthroughResult` / `SchemeResultBase` / `TelemetryEvent`.
82
- - Capability ctx: `SchemeCtx` + `EntryCaps` / `ChannelCaps` / `TagCaps` / `NotifyCaps` / `SubscriptionCaps` / `CrossSchemeCaps`, plus `EntryData` / `ChannelState` / `SubscriptionHandle` / `ProposalAware`.
81
+ - Results: universal `SchemeResult` plus optional `EntryResult` / `ProposalResult` / `PassthroughResult` authoring shapes, `SchemeResultBase`, and `TelemetryEvent`.
82
+ - Capability ctx: `SchemeCtx` and its entry, channel, tag, notification, projection, and subscription domains. Entry schemes can reuse typed standard operations with semantic commons/worker ownership.
83
83
 
84
84
  ### Helpers (`export default class`, static methods)
85
85
 
@@ -91,7 +91,9 @@ 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; 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.
94
+ `SchemeCtx` is the stable semantic API for trusted in-process schemes, not a
95
+ sandbox. The consumer injects its implementation; database layout and private
96
+ service modules remain outside the compatibility contract.
95
97
 
96
98
  ## Tests
97
99
 
package/SPEC.md CHANGED
@@ -41,6 +41,7 @@ class Known {
41
41
  | `writableBy` | Subset of `["model", "client", "system", "plugin"]`. Consumer returns 403 for outside-set writes. |
42
42
  | `volatile` | Boolean. |
43
43
  | `modelVisible` | Boolean. |
44
+ | `folderScopes?` | `true` declares that a trailing slash on READ is a collection scope. Absent/false means `/` is ordinary resource syntax. Matcher bodies and explicit globs remain queries independently. |
44
45
  | `flags?` | Optional `SchemeFlagAffinity`. |
45
46
  | `example?` | The scheme's terse **hot-path** one-liner (e.g. `"READ(foo://thing/42)"`) — renders in the live catalogue every turn, so keep it to one canonical usage line. Omit → not advertised. Depth goes in `documentation`. |
46
47
  | `documentation?` | The **deep doc** (semantics / channels / edge cases). Consumer materializes it as a pull-able `worker://plurnk/docs/<name>.md` entry READ on demand; never hits the hot path. Mirrors `ExecInfo.documentation` (schemes#25). |
@@ -60,6 +61,7 @@ Sister scheme handlers implement op methods consumed by plurnk-service via dispa
60
61
  import type { SchemeHandler } from "@plurnk/plurnk-schemes";
61
62
 
62
63
  export interface SchemeHandler {
64
+ close?(): Promise<void>;
63
65
  read?(statement: ReadStatement, ctx: SchemeCtx): Promise<SchemeResult>;
64
66
  find?(statement: FindStatement, ctx: SchemeCtx): Promise<SchemeResult>;
65
67
  open?(statement: OpenStatement, ctx: SchemeCtx): Promise<SchemeResult>;
@@ -73,12 +75,15 @@ export interface SchemeHandler {
73
75
  fork?(statement: ForkStatement, ctx: SchemeCtx): Promise<SchemeResult>;
74
76
  kill?(statement: KillStatement, ctx: SchemeCtx): Promise<SchemeResult>;
75
77
  plan?(statement: PlanStatement, ctx: SchemeCtx): Promise<SchemeResult>;
78
+ applyResolution?(request: ProposalApplyRequest, ctx: SchemeCtx): Promise<ProposalApplyResult>;
76
79
  }
77
80
  ```
78
81
 
79
82
  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
83
 
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.
84
+ `close?()` is the process-lifecycle hook for pooled resources such as browser processes, sockets, and client connections. The consumer calls it once per unique handler instance after in-flight scheme work drains and before backing stores close. Stateless handlers omit it.
85
+
86
+ The entry CRUD primitives (`readEntry`/`writeEntry`/`deleteEntry`) are not handler operations; schemes use `ctx.entries`. Proposal application is the optional `applyResolution` handler hook described in §3.bis.
82
87
 
83
88
  ## §3 Helpers exported by this repo
84
89
 
@@ -89,8 +94,8 @@ Two surfaces are NOT yet in `SchemeHandler`, pending their result types migratin
89
94
  - Behavior contract: `SchemeHandler` (§2). Scheme-facing grammar types re-exported here so siblings pin only this package: `PlurnkStatement` + the per-op statement types (`ReadStatement`, `FindStatement`, `OpenStatement`, `FoldStatement`, `EditStatement`, `CopyStatement`, `MoveStatement`, `SendStatement`, `ExecStatement`, `WorkStatement`, `ForkStatement`, `KillStatement`, `PlanStatement`) and path types (`ParsedPath` = `LocalPath` | `UrlPath` | `RegexPath`).
90
95
  - Discovery: `SchemeDiscovery` (behavior class) with `SchemeInfo` / `SchemeDiscoveryResult` / `DiscoverOptions` (§6).
91
96
  - Executor-scheme (RFC schemes#20 — "an executor is a scheme"): `OutputScheme.manifestFromRuntime(decl)` derives a read-only-output `SchemeManifest` from an executor's `RuntimeDecl` (zero scheme-authoring); `DefaultRead.read(content, mimetype, statement, mimetypes)` → `ReadResolution` is the free `<L>`/matcher read over produced output (reuses `Slicer`/`Matcher`); `Summarize.summarize(content, mimetype)` → `OrientIndex` is the structural-only EXEC-receipt index (no content — universal-receipt containment). A per-tag executor-scheme supplies its manifest via instance `get manifest()` (§2 `SchemeHandler.manifest?`).
92
- - Result families: `SchemeResult` (`EntryResult` | `ProposalResult` | `PassthroughResult`), `SchemeResultBase`, `TelemetryEvent`. Keyed on scheme-shape, not op. `error` is a grammar `TelemetryEvent`, present iff `status >= 400`. Guards `isEntryResult` / `isProposalResult` / `isPassthroughResult` / `isErrorStatus`; builders `schemeError(scheme, kind, message?, position?)`, `logCoordinate(coordinate, op?)`.
93
- - Capability ctx (PR-2, see §3.bis): `SchemeCtx` + `EntryCaps` / `ChannelCaps` / `TagCaps` / `NotifyCaps` / `SubscriptionCaps` / `CrossSchemeCaps`, plus `EntryData`, `ChannelState`, `SubscriptionHandle`, `ProposalAware`.
97
+ - Results: `SchemeResult` is the universal `{ status, ...schemeMetadata }` contract. `EntryResult`, `ProposalResult`, and `PassthroughResult` are optional conventional shapes, not engine routing discriminators. Their `error` is a grammar `TelemetryEvent`, present iff `status >= 400`. Guards inspect those optional shapes; proposal routing itself is engine-owned and follows status plus operation semantics.
98
+ - Capability ctx (see §3.bis): `SchemeCtx` and its domain capabilities. Entry authors additionally receive `EntryOperationCaps`, semantic `EntryOwner`, and typed standard-operation results.
94
99
 
95
100
  Behavior ships as `export default class` (one class per file, static methods) — the ecosystem class paradigm. Type-only modules, the barrel, and the frozen `DEFAULT_LOOP_FLAGS` constant are the only non-class files.
96
101
 
@@ -120,7 +125,7 @@ Behavior ships as `export default class` (one class per file, static methods)
120
125
 
121
126
  ### Result families — `Results`
122
127
 
123
- - `Results.isEntry` / `Results.isProposal` / `Results.isPassthrough` — `shape` discriminator guards over `SchemeResult`.
128
+ - `Results.isEntry` / `Results.isProposal` / `Results.isPassthrough` — guards for the optional conventional result shapes.
124
129
  - `Results.isErrorStatus(status)` — `status >= 400`.
125
130
  - `Results.error(scheme, kind, message?, position?)` — build a scheme-sourced `TelemetryEvent` (`source: "scheme:<name>"`).
126
131
  - `Results.logCoordinate(coordinate, op?)` — build a `LogCoordinate` position.
@@ -134,44 +139,53 @@ Behavior ships as `export default class` (one class per file, static methods)
134
139
  - Empty match array → status 204
135
140
  - Matches → status 200, body rendered as lean `<source-line>:\t<value>` lines (one match per line, the `N:\t` convention READ emits). Value bare for a single-line string, JSON-encoded otherwise so the one-match-per-line invariant holds (preserves `<L><K>` pick-Kth composition). The resolved query path (`matching`) is dropped — the structured `{matched, matching}` wrapper was a model-legibility barrier (schemes#12).
136
141
 
137
- ### §3.bis Capability ctx — the DB-free authoring surface {§capability-ctx}
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; 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
-
141
- `SchemeCtx` carries per-dispatch identity (`workspaceId`/`workerId`/`loopId`/`turnId`/`writer`/`signal`) plus **five live capability namespaces** replacing raw `db`:
142
-
143
- - `entries` CRUD over the scheme's own namespace (`read`/`write`/`delete`).
142
+ ### §3.bis Capability ctx — the stable trusted-extension surface {§capability-ctx}
143
+
144
+ Scheme plugins are trusted in-process Node.js code. `SchemeCtx` is not a
145
+ sandbox or a security boundary; an installed plugin already has the process's
146
+ authority. It is the stable semantic API that keeps plugins independent of
147
+ database schemas, prepared-statement names, and private service modules.
148
+ **Interfaces only**: this repo exports the contract and the consumer injects
149
+ its implementation.
150
+
151
+ `SchemeCtx` carries per-dispatch identity (`workspaceId`/`workerId`/`loopId`/`turnId`/`writer`/`signal`) plus **six live capability namespaces** replacing raw `db`:
152
+
153
+ - `entries` — direct storage over the scheme's own namespace
154
+ (`read`/`write`/`delete`) plus `operations`, the standard PLURNK
155
+ `READ`/`EDIT`/`FIND`/`SEND` implementation for entry-bearing schemes.
156
+ Standard operations are bound to the handler's manifest. Their optional
157
+ owner is semantic: `"commons"` (default) or the current `"worker"`; database
158
+ owner IDs are not part of the plugin contract. A handler may implement its
159
+ own op method instead. In particular, a handler with `find()` owns FIND and
160
+ fan-out; one without it receives the standard stored-entry behavior.
144
161
  - `channels` — content writes + state (`append`/`replace`/`setState`).
145
162
  - `tags` — entry tags (`add`/`remove`/`list`).
146
163
  - `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.)
164
+ - `projection` — `readable(content, mimetype)` asks the consumer's configured mimetype family for the model-facing text projection. Acquisition schemes own bytes/DOM; they do not instantiate or second-guess the reader family. `null` means no readable projection.
147
165
  - `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
166
 
149
167
  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
168
 
151
- `crossScheme` is a **deferred** placeholder no FROM/TO methods committed until the first real cross-scheme COPY/MOVE forces the shape.
152
-
153
- **Proposals are not a capability.** A side-effecting scheme proposes by *returning* a `ProposalResult` (status 202); the engine owns the resolution lifecycle (await/accept/reject, YOLO/noProposals auto-resolve, timeout) and it is invisible to the sibling. The only sibling-side surface is the optional `ProposalAware.applyResolution(pathname, proposal, ctx)` hook the engine calls on accept.
169
+ **Proposals are not a capability.** A side-effecting scheme proposes by *returning* a `ProposalResult` (status 202); the engine owns the resolution lifecycle. On acceptance it calls the handler's optional `applyResolution({ attrs, body }, ctx)` hook. `attrs` is the payload returned by the proposing operation and `body` is the resolver-approved body, when present. The hook returns `{ status, outcome?, body? }`: a status below 400 completes the accept; a failure rejects it with the returned outcome.
154
170
 
155
171
  ## §4 What's NOT in this repo
156
172
 
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.
158
-
159
- ## §5 Forbidden (for third-party schemes) {§forbidden}
160
-
161
- | |
162
- |---|
163
- | Imports from `@plurnk/plurnk-service/*` |
164
- | Direct database access |
165
- | Writes outside the scheme's own namespace |
166
- | Direct invocation of peer schemes |
167
- | Mutating `ctx` |
168
- | Holding `ctx` references past the op handler's return |
169
- | Reading or writing `log_entries` directly |
170
- | Calling consumer-internal methods |
171
- | Writing to `console`, stdout, stderr |
172
- | Spawning subprocesses (unless the scheme is specifically a subprocess scheme) |
173
- | Opening network connections (unless specifically a network scheme) |
174
- | Caching across op invocations (state in instance fields beyond config) |
173
+ DB-coupled entry/channel machinery — CRUD + write-time tokenization, the
174
+ standard entry operations, channel writes, and subscription registry — lives
175
+ in the consumer. This package defines their stable interfaces and pure helpers.
176
+
177
+ ## §5 Trusted extension contract {§trusted-extension}
178
+
179
+ Installed schemes may legitimately own network connections, subprocesses,
180
+ caches, pools, or other host resources. Use `close()` to release resources
181
+ owned by the handler. These powers are why installation is a trust decision and
182
+ why contained interoperability belongs in MCP rather than an in-process plugin.
183
+
184
+ The supported compatibility boundary is `@plurnk/plurnk-schemes`. Plugins
185
+ should not import private service modules, depend on database layout, or call
186
+ prepared statements directly: those are unstable implementation details, not
187
+ additional plugin capabilities. Use `SchemeCtx` or propose a new semantic
188
+ capability when the public surface cannot express a coherent extension.
175
189
 
176
190
  ## §6 Discovery & registration (third-party)
177
191
 
@@ -180,33 +194,6 @@ A scheme handler is discovered and registered with **zero first-party involvemen
180
194
  - **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
195
  - **`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.
182
196
  - **`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).
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`).
197
+ - **The framework stays contract-only.** `@plurnk/plurnk-schemes` does not depend on scheme plugins. The daemon declares its bundled plugins as direct dependencies, and additional plugins are installed at the application root. Plugins declare the framework as a peer dependency using the repository's normal same-minor compatibility range; the framework itself is ignored by discovery because it has no `plurnk.kind`.
184
198
  - **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.
185
199
  - **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 §2.3/§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, updated for the #527 actor-addressing retirements.
190
-
191
- ### §7.1 URI shape of the invented schemes
192
-
193
- `known`/`unknown`/`plurnk`/`exec` retired under #527 (the worker-as-host addressing model); the live internals are `worker`/`prompt`/`log`, plus the open-ended capability schemes (`mcp`, `jq`, `sh`, …). The `worker://` authority carving (empty = commons, `~` = self, `<name>` = ancestry-gated, `plurnk` = kernel) is core SPEC §worker-authority-carving; this register judges only the URI *shape* against the RFCs.
194
-
195
- | surface | standard neighbor | disposition |
196
- |---|---|---|
197
- | Unregistered schemes (`worker`/`prompt`/`log`/`mcp`, + capability schemes) | 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. |
198
- | `scheme:///path` (empty authority: `log:///`, `prompt:///` self-only; `worker:///` = the commons) | 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. (Empty `worker://` authority is the commons *principal*, not absence.) |
199
- | `scheme://name/path` (reg-name authority: `worker://~/…` self, `worker://<name>/…`, `worker://plurnk/…`, `mcp://<server>/…`) | RFC 3986 §3.2.2 — authority admits a registered name, not required DNS-resolvable; §2.3 — `~` is unreserved (a legal authority character) | **Convergent by construction** — the worker/server name governing its path namespace is the RFC's stated intent; `~` as the self-token is unreserved-legal; mirrors `docker://`, `git://`. |
200
-
201
- ### §7.2 Protocol handling (the http/wss package)
202
-
203
- | surface | standard neighbor | disposition |
204
- |---|---|---|
205
- | 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). |
206
- | 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). |
207
- | 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. |
208
- | 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. |
209
-
210
- ### §7.3 Covenant vs npm
211
-
212
- `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.
@@ -1 +1 @@
1
- {"version":3,"file":"OutputScheme.d.ts","sourceRoot":"","sources":["../src/OutputScheme.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAKjD,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,OAAO,YAAY;IAO7B,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,cAAc,CAc5D;CACJ"}
1
+ {"version":3,"file":"OutputScheme.d.ts","sourceRoot":"","sources":["../src/OutputScheme.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAKjD,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,OAAO,YAAY;IAO7B,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,cAAc,CAe5D;CACJ"}
@@ -21,6 +21,7 @@ export default class OutputScheme {
21
21
  writableBy: ["plugin"],
22
22
  volatile: true,
23
23
  modelVisible: true,
24
+ folderScopes: true,
24
25
  foldedByDefault: true,
25
26
  glyph: decl.glyph,
26
27
  example: decl.example,
@@ -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,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
+ {"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,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,IAAI;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;SACxB,CAAC;IACN,CAAC;CACJ"}
package/dist/Results.d.ts CHANGED
@@ -1,7 +1,11 @@
1
1
  import type { LogCoordinate, TelemetryEvent } from "@plurnk/plurnk-grammar";
2
2
  export type { TelemetryEvent };
3
- export interface SchemeResultBase {
3
+ export interface SchemeResult {
4
4
  readonly status: number;
5
+ readonly error?: unknown;
6
+ readonly [field: string]: unknown;
7
+ }
8
+ export interface SchemeResultBase extends SchemeResult {
5
9
  readonly error?: TelemetryEvent;
6
10
  }
7
11
  export interface EntryResult extends SchemeResultBase {
@@ -28,7 +32,6 @@ export interface PassthroughResult extends SchemeResultBase {
28
32
  readonly matches?: number | null;
29
33
  readonly reason?: string;
30
34
  }
31
- export type SchemeResult = EntryResult | ProposalResult | PassthroughResult;
32
35
  export default class Results {
33
36
  static isEntry(result: SchemeResult): result is EntryResult;
34
37
  static isProposal(result: SchemeResult): result is ProposalResult;
@@ -1 +1 @@
1
- {"version":3,"file":"Results.d.ts","sourceRoot":"","sources":["../src/Results.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE5E,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC;CACnC;AAED,MAAM,WAAW,WAAY,SAAQ,gBAAgB;IACjD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACpD,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WA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ClC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,OAAO,OAAO;IACxB,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,WAAW,CAE1D;IAED,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,cAAc,CAEhE;IAED,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,iBAAiB,CAEtE;IAID,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE5C;IAMD,MAAM,CAAC,KAAK,CACR,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,EACvB,QAAQ,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,GACtC,cAAc,CAQhB;IAMD,MAAM,CAAC,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,aAAa,CAMnE;CACJ"}
package/dist/Results.js CHANGED
@@ -3,12 +3,11 @@
3
3
  // forked in-tree (plurnk-service `_entry-ops.ts` vs the local redefinitions
4
4
  // in `File.ts` / `Exec.ts` / `Log.ts`).
5
5
  //
6
- // The shape keys on SCHEME-SHAPE, not op. EDIT against `known://` and EDIT
7
- // against `file://` produce structurally different results because the
8
- // schemes are differently shaped, not because EDIT is. So a family is the
9
- // superset of fields its shape can return across every op (entry-shape READ
10
- // returns content; entry-shape EDIT returns entryId) fields optional per
11
- // op, discriminated by `shape`.
6
+ // SchemeResult expresses the engine's actual universal invariant: every
7
+ // handler result has a numeric status and may carry scheme-owned metadata.
8
+ // EntryResult, ProposalResult, and PassthroughResult are optional authoring
9
+ // aids for schemes that benefit from those conventional shapes; the engine
10
+ // does not require or branch on their `shape` discriminator.
12
11
  //
13
12
  // Three shapes cover the current set:
14
13
  // entry — entries + entry_channels backed (known/unknown/skill/plurnk)
@@ -20,13 +19,13 @@
20
19
  // `packet.user.telemetry.errors[]` unchanged.
21
20
  export default class Results {
22
21
  static isEntry(result) {
23
- return result.shape === "entry";
22
+ return "shape" in result && result.shape === "entry";
24
23
  }
25
24
  static isProposal(result) {
26
- return result.shape === "proposal";
25
+ return "shape" in result && result.shape === "proposal";
27
26
  }
28
27
  static isPassthrough(result) {
29
- return result.shape === "passthrough";
28
+ return "shape" in result && result.shape === "passthrough";
30
29
  }
31
30
  // A result is an error result iff its status is in the 4xx/5xx range. The
32
31
  // `error` envelope is expected on those and absent otherwise.
@@ -1 +1 @@
1
- {"version":3,"file":"Results.js","sourceRoot":"","sources":["../src/Results.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,yEAAyE;AACzE,4EAA4E;AAC5E,wCAAwC;AACxC,EAAE;AACF,2EAA2E;AAC3E,uEAAuE;AACvE,0EAA0E;AAC1E,4EAA4E;AAC5E,2EAA2E;AAC3E,gCAAgC;AAChC,EAAE;AACF,sCAAsC;AACtC,+EAA+E;AAC/E,gEAAgE;AAChE,gFAAgF;AAChF,EAAE;AACF,4EAA4E;AAC5E,4DAA4D;AAC5D,8CAA8C;AA2C9C,MAAM,CAAC,OAAO,OAAO,OAAO;IACxB,MAAM,CAAC,OAAO,CAAC,MAAoB;QAC/B,OAAO,MAAM,CAAC,KAAK,KAAK,OAAO,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,MAAoB;QAClC,OAAO,MAAM,CAAC,KAAK,KAAK,UAAU,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,aAAa,CAAC,MAAoB;QACrC,OAAO,MAAM,CAAC,KAAK,KAAK,aAAa,CAAC;IAC1C,CAAC;IAED,0EAA0E;IAC1E,8DAA8D;IAC9D,MAAM,CA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- import type { ProposalResult, SchemeResult } from "./Results.ts";
2
+ import type { EditStatement, FindStatement, ReadStatement, SendStatement } from "@plurnk/plurnk-grammar";
3
+ import type { SchemeResult } from "./Results.ts";
3
4
  export type ChannelState = "static" | "active" | "closed" | "errored";
4
5
  export interface EntryData {
5
6
  readonly channels: Record<string, {
@@ -9,17 +10,74 @@ export interface EntryData {
9
10
  }>;
10
11
  readonly tags: ReadonlyArray<string>;
11
12
  }
13
+ export type EntryOwner = "commons" | "worker";
14
+ export interface EntryEditResult extends SchemeResult {
15
+ readonly entryId: number | null;
16
+ readonly channel: string | null;
17
+ readonly span?: string | null;
18
+ readonly error?: string;
19
+ }
20
+ export interface EntryReadResult extends SchemeResult {
21
+ readonly content: string | null;
22
+ readonly mimetype: string | null;
23
+ readonly channel: string | null;
24
+ readonly startLine?: number | null;
25
+ readonly matches?: number | null;
26
+ readonly reason?: string;
27
+ readonly error?: string;
28
+ readonly awaitWorker?: string;
29
+ }
30
+ export interface EntryCatalogItem {
31
+ readonly path: string;
32
+ readonly seconds?: number;
33
+ readonly tags?: ReadonlyArray<string>;
34
+ readonly channels: Readonly<Record<string, {
35
+ mimetype: string;
36
+ tokens: number;
37
+ lines: number;
38
+ }>>;
39
+ readonly matchSpan?: {
40
+ lineStart: number;
41
+ lineEnd: number;
42
+ };
43
+ readonly matchPath?: string;
44
+ }
45
+ export interface EntryMatch {
46
+ readonly pathname: string;
47
+ readonly span: {
48
+ lineStart: number;
49
+ lineEnd: number;
50
+ } | null;
51
+ readonly path?: string;
52
+ }
53
+ export interface EntryFindResult extends SchemeResult {
54
+ readonly content: string | null;
55
+ readonly mimetype: string | null;
56
+ readonly results: ReadonlyArray<EntryCatalogItem>;
57
+ readonly itemsTokenTotal: number;
58
+ readonly pathnames: ReadonlyArray<string>;
59
+ readonly matches: ReadonlyArray<EntryMatch>;
60
+ readonly overflow?: number;
61
+ readonly error?: string;
62
+ }
63
+ export interface EntryOperationCaps {
64
+ edit(statement: EditStatement, owner?: EntryOwner): Promise<EntryEditResult>;
65
+ read(statement: ReadStatement, owner?: EntryOwner): Promise<EntryReadResult>;
66
+ find(statement: FindStatement, owner?: EntryOwner): Promise<EntryFindResult>;
67
+ send(statement: SendStatement, owner?: EntryOwner): Promise<SchemeResult>;
68
+ }
12
69
  export interface EntryCaps {
13
- read(pathname: string): Promise<{
70
+ readonly operations: EntryOperationCaps;
71
+ read(pathname: string, owner?: EntryOwner): Promise<{
14
72
  status: number;
15
73
  entry: EntryData | null;
16
74
  }>;
17
- write(pathname: string, entry: EntryData): Promise<{
75
+ write(pathname: string, entry: EntryData, owner?: EntryOwner): Promise<{
18
76
  status: number;
19
77
  created: boolean;
20
78
  entryId: number | null;
21
79
  }>;
22
- delete(pathname: string): Promise<{
80
+ delete(pathname: string, owner?: EntryOwner): Promise<{
23
81
  status: number;
24
82
  }>;
25
83
  }
@@ -49,17 +107,22 @@ export interface TagCaps {
49
107
  export interface NotifyCaps {
50
108
  streamEvent(pathname: string, channel: string, state: ChannelState, contentLength: number): void;
51
109
  }
110
+ export interface ProjectionCaps {
111
+ readable(content: string, mimetype: string): Promise<{
112
+ content: string;
113
+ mimetype: string;
114
+ } | null>;
115
+ }
52
116
  export interface SubscriptionCaps {
53
- open(pathname: string, handle: SubscriptionHandle): Promise<AbortSignal>;
117
+ open(pathname: string, handle: SubscriptionHandle, options?: {
118
+ publishedChannel?: string;
119
+ }): Promise<AbortSignal>;
54
120
  notifyChunk(channel: string, chunk: string, mimetype?: string): Promise<void>;
55
121
  close(reason: "done" | "error", outcome?: string): Promise<void>;
56
122
  }
57
123
  export interface SubscriptionHandle {
58
124
  cancel(): void | Promise<void>;
59
125
  }
60
- export interface CrossSchemeCaps {
61
- readonly _deferred: "see plurnk-service#180 — designed when first cross-scheme COPY/MOVE forces the FROM/TO shape";
62
- }
63
126
  export interface SchemeCtx {
64
127
  readonly workspaceId: number;
65
128
  readonly workerId: number;
@@ -71,10 +134,19 @@ export interface SchemeCtx {
71
134
  readonly channels: ChannelCaps;
72
135
  readonly tags: TagCaps;
73
136
  readonly notify: NotifyCaps;
137
+ readonly projection: ProjectionCaps;
74
138
  readonly subscriptions: SubscriptionCaps;
75
- readonly crossScheme: CrossSchemeCaps;
139
+ }
140
+ export interface ProposalApplyRequest {
141
+ readonly attrs: object;
142
+ readonly body?: string;
143
+ }
144
+ export interface ProposalApplyResult {
145
+ readonly status: number;
146
+ readonly outcome?: string;
147
+ readonly body?: string;
76
148
  }
77
149
  export interface ProposalAware {
78
- applyResolution(pathname: string, proposal: ProposalResult, ctx: SchemeCtx): Promise<SchemeResult>;
150
+ applyResolution(request: ProposalApplyRequest, ctx: SchemeCtx): Promise<ProposalApplyResult>;
79
151
  }
80
152
  //# sourceMappingURL=ctx.d.ts.map
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,YAAY,CAAA;KAAE,CAAC,CAAC;IAC/F,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACxC;AAMD,MAAM,WAAW,SAAS;IACtB,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;IAC7E,KAAK,CAAC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AAC,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,UAAU,EAAE,cAAc,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,gBAAgB,CAAC;CAC5C;AAWD,MAAM,WAAW,oBAAoB;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC1B,eAAe,CAAC,OAAO,EAAE,oBAAoB,EAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;CAChG"}
package/dist/ctx.js CHANGED
@@ -1,17 +1,7 @@
1
- // Capability context the DB-free authoring surface for
2
- // `@plurnk/plurnk-schemes-*` siblings (keystone PR-2; design converged on
3
- // plurnk-service#180). The full contract the five live namespaces, why
4
- // `visibility` is absent, why `proposals` / `crossScheme` are NOT namespaces —
5
- // is SPEC §capability-ctx. This module is its typed mirror.
6
- //
7
- // WHY it exists: today a sibling receives plurnk-service's raw `Db` handle on
8
- // `ctx.db` and reaches straight through it — but SPEC §forbidden bars a third-party
9
- // scheme from importing `@plurnk/plurnk-service/*` or touching the database, so
10
- // `ctx.db` is an illegal contract and a real sibling is unbuildable. This module
11
- // exports INTERFACES only; plurnk-service injects a db-backed implementation
12
- // behind them (the existing `scheme-types.ts` seam, widened — not new
13
- // machinery). In-tree schemes keep using `db` directly during transition; the
14
- // cap impl is a thin adapter over the same `_entry-*.ts` / `ChannelWrite`
15
- // helpers, cut over scheme-by-scheme.
1
+ // Stable context for trusted `@plurnk/plurnk-schemes-*` extensions. This is a
2
+ // semantic compatibility boundary, not a sandbox: installed Node.js plugins
3
+ // already have host-process authority. The interfaces keep extension code
4
+ // independent of database schemas and private service modules while the
5
+ // consumer injects their implementation.
16
6
  export {};
17
7
  //# sourceMappingURL=ctx.js.map
package/dist/ctx.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ctx.js","sourceRoot":"","sources":["../src/ctx.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,0EAA0E;AAC1E,yEAAyE;AACzE,+EAA+E;AAC/E,4DAA4D;AAC5D,EAAE;AACF,8EAA8E;AAC9E,oFAAoF;AACpF,gFAAgF;AAChF,iFAAiF;AACjF,6EAA6E;AAC7E,sEAAsE;AACtE,8EAA8E;AAC9E,0EAA0E;AAC1E,sCAAsC"}
1
+ {"version":3,"file":"ctx.js","sourceRoot":"","sources":["../src/ctx.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,4EAA4E;AAC5E,0EAA0E;AAC1E,wEAAwE;AACxE,yCAAyC"}
package/dist/handler.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  import type { FindStatement, ReadStatement, OpenStatement, FoldStatement, EditStatement, CopyStatement, MoveStatement, SendStatement, ExecStatement, WorkStatement, ForkStatement, KillStatement, PlanStatement } from "@plurnk/plurnk-grammar";
2
- import type { SchemeCtx } from "./ctx.ts";
2
+ import type { ProposalApplyRequest, ProposalApplyResult, SchemeCtx } from "./ctx.ts";
3
3
  import type { SchemeResult } from "./Results.ts";
4
4
  import type { SchemeManifest } from "./types.ts";
5
5
  export interface SchemeHandler {
6
6
  readonly manifest?: SchemeManifest;
7
+ close?(): Promise<void>;
8
+ applyResolution?(request: ProposalApplyRequest, ctx: SchemeCtx): Promise<ProposalApplyResult>;
7
9
  read?(statement: ReadStatement, ctx: SchemeCtx): Promise<SchemeResult>;
8
10
  find?(statement: FindStatement, ctx: SchemeCtx): Promise<SchemeResult>;
9
11
  open?(statement: OpenStatement, ctx: SchemeCtx): Promise<SchemeResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../src/handler.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EACR,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EAChB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,WAAW,aAAa;IAM1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAEnC,IAAI,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACvE,IAAI,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACvE,IAAI,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACvE,IAAI,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACvE,IAAI,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACvE,IAAI,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACvE,IAAI,CAAC,CAAC,SAA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E,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACvE,IAAI,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACvE,IAAI,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CAC1E"}
package/dist/index.d.ts CHANGED
@@ -17,7 +17,7 @@ export { default as DefaultRead } from "./DefaultRead.ts";
17
17
  export type { ReadResolution } from "./DefaultRead.ts";
18
18
  export { default as Results } from "./Results.ts";
19
19
  export type { EntryResult, PassthroughResult, ProposalResult, SchemeResult, SchemeResultBase, TelemetryEvent, } from "./Results.ts";
20
- export type { ChannelCaps, ChannelState, CrossSchemeCaps, EntryCaps, EntryData, NotifyCaps, ProposalAware, SchemeCtx, SubscriptionCaps, SubscriptionHandle, TagCaps, } from "./ctx.ts";
20
+ export type { ChannelCaps, ChannelState, EntryCaps, EntryCatalogItem, EntryData, EntryEditResult, EntryFindResult, EntryMatch, EntryOperationCaps, EntryOwner, EntryReadResult, ProjectionCaps, NotifyCaps, ProposalApplyRequest, ProposalApplyResult, ProposalAware, SchemeCtx, SubscriptionCaps, SubscriptionHandle, TagCaps, } from "./ctx.ts";
21
21
  export type { SchemeHandler } from "./handler.ts";
22
22
  export type { PacketSection, PacketSectionTransformer } from "./packet.ts";
23
23
  export type { PlurnkStatement, FindStatement, ReadStatement, OpenStatement, FoldStatement, EditStatement, CopyStatement, MoveStatement, SendStatement, ExecStatement, WorkStatement, ForkStatement, KillStatement, PlanStatement, ParsedPath, LocalPath, UrlPath, RegexPath, } from "@plurnk/plurnk-grammar";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,YAAY,EACR,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,UAAU,GACb,MAAM,YAAY,CAAC;AACpB,OA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AAC/F,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtD,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5D,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,YAAY,EACR,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,cAAc,GACjB,MAAM,cAAc,CAAC;AAItB,YAAY,EACR,WAAW,EACX,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,eAAe,EACf,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,cAAc,EACd,UAAU,EACV,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,OAAO,GACV,MAAM,UAAU,CAAC;AAOlB,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,YAAY,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC3E,YAAY,EACR,eAAe,EACf,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,UAAU,EACV,SAAS,EACT,OAAO,EACP,SAAS,GACZ,MAAM,wBAAwB,CAAC"}
package/dist/types.d.ts CHANGED
@@ -14,6 +14,7 @@ export interface SchemeManifest {
14
14
  readonly writableBy: ReadonlyArray<WriterTier>;
15
15
  readonly volatile: boolean;
16
16
  readonly modelVisible: boolean;
17
+ readonly folderScopes?: boolean;
17
18
  readonly foldedByDefault?: boolean;
18
19
  readonly flags?: SchemeFlagAffinity;
19
20
  readonly example?: string;
@@ -23,7 +24,7 @@ export interface SchemeManifest {
23
24
  }
24
25
  export interface LoopFlags {
25
26
  readonly mode: "ask" | "act";
26
- readonly yolo: boolean;
27
+ readonly auto: boolean;
27
28
  readonly noWeb: boolean;
28
29
  readonly noInteraction: boolean;
29
30
  readonly noProposals: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAElE,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IACvC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAGhC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;IAIlD,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,CAA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,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,YAAY,CAAC,EAAE,OAAO,CAAC;IAIhC,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/dist/types.js CHANGED
@@ -9,7 +9,7 @@
9
9
  // types every sibling needs to declare itself.
10
10
  export const DEFAULT_LOOP_FLAGS = Object.freeze({
11
11
  mode: "act",
12
- yolo: false,
12
+ auto: false,
13
13
  noWeb: false,
14
14
  noInteraction: false,
15
15
  noProposals: false,
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,qCAAqC;AACrC,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAC7E,yEAAyE;AACzE,sEAAsE;AACtE,uEAAuE;AACvE,+CAA+C;AAqD/C,MAAM,CAAC,MAAM,kBAAkB,GAAc,MAAM,CAAC,MAAM,CAAC;IACvD,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,KAAK;IACZ,aAAa,EAAE,KAAK;IACpB,WAAW,EAAE,KAAK;CACrB,CAAC,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,qCAAqC;AACrC,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAC7E,yEAAyE;AACzE,sEAAsE;AACtE,uEAAuE;AACvE,+CAA+C;AAyD/C,MAAM,CAAC,MAAM,kBAAkB,GAAc,MAAM,CAAC,MAAM,CAAC;IACvD,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,KAAK;IACZ,aAAa,EAAE,KAAK;IACpB,WAAW,EAAE,KAAK;CACrB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-schemes",
3
- "version": "1.2.0",
4
- "description": "Framework + contract for the @plurnk/plurnk-schemes-* URI handler family.",
3
+ "version": "1.3.1",
4
+ "description": "Framework + contract for the @plurnk/plurnk-schemes-* URI handler packages.",
5
5
  "keywords": [
6
6
  "plurnk",
7
7
  "scheme",
@@ -47,10 +47,10 @@
47
47
  "prepack": "npm run build"
48
48
  },
49
49
  "peerDependencies": {
50
- "@plurnk/plurnk-grammar": "1.2.0",
51
- "@plurnk/plurnk-mimetypes": "1.2.0"
50
+ "@plurnk/plurnk-grammar": "^1.3.1",
51
+ "@plurnk/plurnk-mimetypes": "^1.3.1"
52
52
  },
53
53
  "dependencies": {
54
- "@plurnk/plurnk-meta": "1.2.0"
54
+ "@plurnk/plurnk-meta": "1.3.1"
55
55
  }
56
56
  }