@plurnk/plurnk-schemes 1.1.1 β†’ 1.2.0

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 (3) hide show
  1. package/README.md +3 -3
  2. package/SPEC.md +3 -3
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -58,17 +58,17 @@ static manifest: SchemeManifest = {
58
58
  modelVisible: true,
59
59
  glyph: "🦊", // display icon; omit β†’ the name is shown
60
60
  example: "READ(foo://thing/42)", // terse hot-path one-liner, rendered every turn
61
- documentation, // deep doc from docs/foo.md, pulled at plurnk://docs/foo.md
61
+ documentation, // deep doc from docs/foo.md, pulled at worker://plurnk/docs/foo.md
62
62
  };
63
63
  ```
64
64
 
65
65
  - **`example`** β€” the scheme's terse **hot-path** one-liner, rendered in the live catalogue every turn (like an execs runtime's `example`). Keep it to one canonical usage line; depth goes in `documentation`. Omit β†’ not advertised.
66
- - **`documentation`** β€” the **deep doc** (ops, channels, edge cases). The consumer materializes it as a pull-able `plurnk://docs/<name>.md` entry the model READs on demand β€” off the hot path. Mirrors `ExecInfo.documentation`. **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.
66
+ - **`documentation`** β€” the **deep doc** (ops, channels, edge cases). The consumer materializes it as a pull-able `worker://plurnk/docs/<name>.md` entry the model READs on demand β€” off the hot path. Mirrors `ExecInfo.documentation`. **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.
67
67
  - **`glyph`** β€” a display icon (emoji / nerdfont). Omit it and the scheme `name` is rendered in its place.
68
68
 
69
69
  ### 4. Self-doc: terse pushes, depth pulls
70
70
 
71
- `example`/`glyph` render every turn β€” keep them terse. `documentation` is the deep prose; the consumer materializes it at `plurnk://docs/<name>.md` for the model to READ on demand. Don't dump prose into `example` (it floods the hot path) β€” put it in `documentation`.
71
+ `example`/`glyph` render every turn β€” keep them terse. `documentation` is the deep prose; the consumer materializes it at `worker://plurnk/docs/<name>.md` for the model to READ on demand. Don't dump prose into `example` (it floods the hot path) β€” put it in `documentation`.
72
72
 
73
73
  That's the whole contract: declare, `implements SchemeHandler`, manifest with self-doc. Publish, install, discovered.
74
74
 
package/SPEC.md CHANGED
@@ -43,14 +43,14 @@ class Known {
43
43
  | `modelVisible` | Boolean. |
44
44
  | `flags?` | Optional `SchemeFlagAffinity`. |
45
45
  | `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
- | `documentation?` | The **deep doc** (semantics / channels / edge cases). Consumer materializes it as a pull-able `plurnk://docs/<name>.md` entry READ on demand; never hits the hot path. Mirrors `ExecInfo.documentation` (schemes#25). |
46
+ | `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). |
47
47
  | `glyph?` | Display icon (emoji / nerdfont). Omit β†’ consumer renders the `name` (`glyph ?? name`). |
48
48
  | `foldedByDefault?` | Entries land FOLDED, off the ranked manifest surface (READable via address, not poured into the ranked view). For executor-output streams (`<tag>://`) β€” containment one level up (schemes#20/service#240). Absent/false β†’ ranked/first-class. |
49
49
  | `storedScheme?` | Value persisted to `entries.scheme`, which may differ from the addressing `name`. Resolution: `storedScheme === undefined ? name : storedScheme`. Absent β†’ defaults to `name` (additive; existing manifests unchanged). Explicit `null` β†’ persists BARE (e.g. File: bare paths, `entries.scheme` NULL, routing name `"file"`). |
50
50
 
51
- **Self-doc split (terse pushes, depth pulls).** {Β§manifest-self-doc} `example` + `glyph` are the hot-path listing rendered every turn β€” keep them terse. `documentation` is the deep prose (every op, channel, status code, gotcha); the consumer materializes it as a pull-able **`plurnk://docs/<name>.md`** entry the model READs on demand, off the hot path. Both live on the manifest; the consumer decides what's pushed vs pulled.
51
+ **Self-doc split (terse pushes, depth pulls).** {Β§manifest-self-doc} `example` + `glyph` are the hot-path listing rendered every turn β€” keep them terse. `documentation` is the deep prose (every op, channel, status code, gotcha); the consumer materializes it as a pull-able **`worker://plurnk/docs/<name>.md`** entry the model READs on demand, off the hot path. Both live on the manifest; the consumer decides what's pushed vs pulled.
52
52
 
53
- **Authoring convention β€” `docs/<name>.md`.** The contract field stays a plain `string`, but a sibling SHOULD keep the deep doc in a **`docs/<name>.md`** file at the package root rather than inline, and load it into the manifest at module init β€” e.g. `documentation: await readFile(new URL("../docs/<name>.md", import.meta.url), "utf-8")` (top-level await; `../` resolves identically from `src/` in test and `dist/` once built). Ship it by adding `docs/**/*` to `files`. This keeps prose out of the handler source and gives editors real Markdown; the contract and the consumer's `plurnk://docs/<name>.md` materialization are unchanged. A missing file fails-hard at import (no silent empty doc).
53
+ **Authoring convention β€” `docs/<name>.md`.** The contract field stays a plain `string`, but a sibling SHOULD keep the deep doc in a **`docs/<name>.md`** file at the package root rather than inline, and load it into the manifest at module init β€” e.g. `documentation: await readFile(new URL("../docs/<name>.md", import.meta.url), "utf-8")` (top-level await; `../` resolves identically from `src/` in test and `dist/` once built). Ship it by adding `docs/**/*` to `files`. This keeps prose out of the handler source and gives editors real Markdown; the contract and the consumer's `worker://plurnk/docs/<name>.md` materialization are unchanged. A missing file fails-hard at import (no silent empty doc).
54
54
 
55
55
  ## Β§2 Interface
56
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-schemes",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "Framework + contract for the @plurnk/plurnk-schemes-* URI handler family.",
5
5
  "keywords": [
6
6
  "plurnk",
@@ -47,10 +47,10 @@
47
47
  "prepack": "npm run build"
48
48
  },
49
49
  "peerDependencies": {
50
- "@plurnk/plurnk-grammar": "1.1.1",
51
- "@plurnk/plurnk-mimetypes": "1.1.1"
50
+ "@plurnk/plurnk-grammar": "1.2.0",
51
+ "@plurnk/plurnk-mimetypes": "1.2.0"
52
52
  },
53
53
  "dependencies": {
54
- "@plurnk/plurnk-meta": "1.1.1"
54
+ "@plurnk/plurnk-meta": "1.2.0"
55
55
  }
56
56
  }