@plurnk/plurnk-execs 0.4.16 β 0.4.18
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/SPEC.md +32 -2
- package/package.json +7 -8
package/SPEC.md
CHANGED
|
@@ -103,7 +103,7 @@ The envelope is mirrored locally (`TelemetryEvent`, `ContentOffset`, `LogCoordin
|
|
|
103
103
|
"plurnk": {
|
|
104
104
|
"kind": "exec",
|
|
105
105
|
"runtimes": [
|
|
106
|
-
{ "name": "search", "glyph": "π", "example": "EXEC[search]:france population:EXEC", "documentation": "# search\n\n`!bang` / `:lang` ride the queryβ¦" },
|
|
106
|
+
{ "name": "search", "glyph": "π", "example": "<<EXEC[search]:france population:EXEC", "documentation": "# search\n\n`!bang` / `:lang` ride the queryβ¦" },
|
|
107
107
|
{ "name": "news", "glyph": "π°" }
|
|
108
108
|
]
|
|
109
109
|
}
|
|
@@ -114,7 +114,7 @@ A package may claim multiple tags backed by one handler. Tags form a **flat glob
|
|
|
114
114
|
|
|
115
115
|
Each entry's optional **`attribution`** is the package's raw `plurnk.attribution` (`string | string[]`) β credit a consumer unions onto the model call when the package's tags are active (plurnk-service#249). It's **package-level** (every tag of a package carries the same value) and surfaced **raw**: the consumer owns the reservation policy (e.g. `@plurnk/`-scoped attribution only from `@plurnk/`-scoped packages). `undefined` when the package omits it.
|
|
116
116
|
|
|
117
|
-
Each entry's optional **`example`** is a one-line, self-documenting usage example
|
|
117
|
+
Each entry's optional **`example`** is a one-line, self-documenting usage example surfaced **verbatim** by the consumer in its `# Plurnk System Tools` capability sheet so the model learns the tag's syntax + purpose in one line instead of a separate prose description (plurnk-execs#7). It MUST be the **complete canonical op, `<<`-delimited** β `<<EXEC[tag]:body:EXEC` (or `<<EXEC[tag](target):body:EXEC`) β because the consumer renders it verbatim into the sheet; an example missing the `<<` opener teaches the model a malformed op. Defaults to `""` when omitted. Kept to a single line on purpose β the sheet is hot-path and token-sensitive; the generic `(target)` slot is documented once at the op level, not repeated per tag.
|
|
118
118
|
|
|
119
119
|
Each entry's optional **`documentation`** is full markdown β the flags, modes, and gotchas the one-liner can't carry. It is the depth a consumer can serve on demand, separate from the always-on `example` (progressive disclosure). The **source of truth is a `docs/<tag>.md` file** in the package (the docs convention; ship it via `files`), which `discover()` reads into `documentation`; the inline `documentation` manifest field is the fallback when no file ships. Defaults to `""`. The execs contract is the two fields; **how** the consumer surfaces them to the model β an in-context one-liner, the full doc fetched when the model wants it β is the consumer's (plurnk-service's) concern, not specified here.
|
|
120
120
|
|
|
@@ -142,6 +142,36 @@ Two guarantees frame the hook:
|
|
|
142
142
|
|
|
143
143
|
Each runtime package's **default export** is its `BaseExecutor` subclass (also a named export β `export { default as Sh }` / `export { default }`); the consumer instantiates it per matched tag with the tag + glyph from the registry.
|
|
144
144
|
|
|
145
|
+
### Β§3.2 Activation (Active / Available)
|
|
146
|
+
|
|
147
|
+
Discovery answers *what is installed/configured*; **activation** answers *what is offered to the model right now*. They are distinct axes and must not be conflated β `discover()` stays static truth, activation is a runtime overlay the consumer owns on top of it (plurnk-execs#10). This generalizes across the **shared exec/scheme namespace**: a registered capability is a tag claimed once that is both `EXEC[tag]` and `tag://`, and activation operates on it whichever family it came from. MCP is not a category here β it is one *route* for registering a capability (alongside package discovery and env), so its tags activate by the same rules as any other.
|
|
148
|
+
|
|
149
|
+
**Two states, no third.** A registered capability is **Active** (in the `# Plurnk System Tools` sheet, dispatchable) or **Available** (registered, inert). "Disabled" is the *verb* (ActiveβAvailable), not a state. The consumer's capability sheet surfaces two buckets:
|
|
150
|
+
|
|
151
|
+
- **Tools Active** β the full one-line `example` each (the hot-path teaching cost).
|
|
152
|
+
- **Tools Available** β name + glyph + `attribution` each (a word, not a line).
|
|
153
|
+
|
|
154
|
+
This split *is* the progressive disclosure that bounds the sheet: N available servers cost N words, not N lines.
|
|
155
|
+
|
|
156
|
+
**Default-activation rule** (the consumer applies it; execs supplies the signals β `packageName` scope, source route, `attribution`):
|
|
157
|
+
|
|
158
|
+
| Source route | Trust | Default |
|
|
159
|
+
|---|---|---|
|
|
160
|
+
| Installed package (boot discovery) | first-party (`@plurnk/*`) | **Active** |
|
|
161
|
+
| Installed package (boot discovery) | third-party | **Available** |
|
|
162
|
+
| Env-declared (e.g. `PLURNK_MCP_<server>`, model-alias style) | β | **Available** |
|
|
163
|
+
| Runtime hotload (`/mcp`, gated β below) | β | **Active** on add |
|
|
164
|
+
|
|
165
|
+
The principle: *Active = the operator unambiguously committed this capability ON* (installed a first-party package; explicitly hotloaded). Configuring connection details (env) or installing a third-party package is the lighter act β Available, opt-in. Mirrors `PLURNK_MODEL_*` β declare many aliases, activate a subset.
|
|
166
|
+
|
|
167
|
+
**Reachability is orthogonal.** Whether a capability is Active/Available (activation) is independent of whether it is reachable/unreachable (the Β§2.2 `probe()` health flag). A configured MCP server that is down is *Available but unreachable*. Do not overload "available" across the two axes.
|
|
168
|
+
|
|
169
|
+
**Capability vs substrate.** enable/disable targets **capability** tags only (execs and executor-backed schemes). Core **substrate** schemes (`file://`, the addressing/ops ground) are always-active and never toggleable β `/disable file` must not be able to brick the address space. For an executor-backed scheme, `disable` gates *new production*; existing `tag://` entries stay READable (reads are pure).
|
|
170
|
+
|
|
171
|
+
**Security β one gate, on introduction not activation.** `enable` / `disable` are **not** trust-gated: a client (and the model itself) may freely activate any *registered* capability. This is safe because the registered set is operator-bounded β only env-declared or package-installed capabilities exist β *unless* the single daemon gate **`PLURNK_MCP_INSTALL`** (default off) opens the runtime-hotload route, permitting *arbitrary* tooling to be **added**. Gate the introduction of capabilities, never their activation. The trust gate (Β§3) still bounds *registration*; activation rides on top of an already-trusted set.
|
|
172
|
+
|
|
173
|
+
Execs owns none of the overlay machinery β the live Active/Available state, the `/enable` `/disable` `/mcp` commands, and the gate enforcement are the consumer's (plurnk-service#240). Execs' contribution is the static signals above and (for the hotload route) an MCP executor that accepts a runtime-injected server config and re-checks `PLURNK_MCP_INSTALL` at its connect path (defense in depth).
|
|
174
|
+
|
|
145
175
|
## Β§4 Subprocess helper (legacy path)
|
|
146
176
|
|
|
147
177
|
`resolveRuntime(runtime, command) β SpawnArgs` and `isKnownRuntime(runtime)` / `KNOWN_RUNTIMES` translate a subprocess runtime tag into `node:child_process.spawn` arguments:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurnk/plurnk-execs",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.18",
|
|
4
4
|
"description": "Framework + contract for the @plurnk/plurnk-execs-* runtime executor family.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plurnk",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"url": "git+https://github.com/plurnk/plurnk-execs.git"
|
|
18
18
|
},
|
|
19
19
|
"engines": {
|
|
20
|
-
"node": ">=
|
|
20
|
+
"node": ">=26"
|
|
21
21
|
},
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"author": "@wikitopian",
|
|
@@ -45,12 +45,11 @@
|
|
|
45
45
|
"build": "npm run build:dist",
|
|
46
46
|
"prepare": "npm run build"
|
|
47
47
|
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"@types/node": "^25.8.0",
|
|
50
|
-
"typescript": "^6.0.3",
|
|
51
|
-
"@plurnk/plurnk-schemes": "^0.21.0"
|
|
52
|
-
},
|
|
53
48
|
"dependencies": {
|
|
54
|
-
"@plurnk/plurnk-schemes": "^0.
|
|
49
|
+
"@plurnk/plurnk-schemes": "^0.29.13"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@types/node": "^26.0.0",
|
|
53
|
+
"typescript": "^6.0.3"
|
|
55
54
|
}
|
|
56
55
|
}
|