@plurnk/plurnk-meta 1.29.0 → 2.0.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/.env.defaults CHANGED
@@ -1,8 +1,8 @@
1
1
  # @plurnk/plurnk-meta — package discovery and product orientation.
2
2
 
3
- # Plugin trust: 1 = @plurnk/* only; comma-separated package names = @plurnk/* plus those packages;
4
- # 0/empty = every installed package. A plugin runs inside the daemon, so a third party is named
3
+ # Extension trust: 1 = @plurnk/* only; comma-separated package names = @plurnk/* plus those packages;
4
+ # 0/empty = every installed package. An extension runs inside the daemon, so a third party is named
5
5
  # here by the operator, never admitted by being present. Also gates their defaults.
6
- PLURNK_PLUGINS_TRUSTED_ONLY=1
6
+ PLURNK_EXTENSIONS_TRUSTED_ONLY=1
7
7
  # Whole-product orientation deadline, seconds; includes admitted-project search preparation.
8
8
  PLURNK_ACCEPTANCE_TIMEOUT=3600
package/README.md CHANGED
@@ -1,26 +1,26 @@
1
1
  # @plurnk/plurnk-meta
2
2
 
3
- What plurnk's packages share that no single package owns: plugin discovery and trust, and the teaching material the service gives models.
3
+ What plurnk's packages share that no single package owns: extension discovery and trust, and the teaching material the service gives models.
4
4
 
5
- **Membership primitives** (`import Meta from "@plurnk/plurnk-meta"`): shared family identity, trust, attribution, enumeration, and root resolution for capability scanners. [SPEC.md](./SPEC.md) owns the complete contract ({§plugin-discovery}).
5
+ **Membership primitives** (`import Meta from "@plurnk/plurnk-meta"`): shared kind identity, trust, attribution, enumeration, and root resolution for each kind's scanner. [SPEC.md](./SPEC.md) owns the complete contract ({§extension-discovery}).
6
6
 
7
- - `Meta.declaresKind(manifest, kind)` — accepts one exact string family identity; arrays claim no family ({§plugin-family-kind}).
8
- - `Meta.isTrusted(packageName, env?)` — the `PLURNK_PLUGINS_TRUSTED_ONLY` gate: `""`/`"0"` off; any value on, `@plurnk/*` always trusted plus a comma-separated allowlist. An unset key is answered by this package's own panel, which ships the gate on.
9
- - `Meta.normalizeAttribution(raw, packageName)` — normalize an always-on package declaration, including the reserved `@plurnk/` namespace rule ({§plugin-attribution}).
10
- - `Meta.runtimeAttribution(source, context, packageName)` — pull and normalize an optional synchronous plugin hook for one provider emission attempt.
7
+ - `Meta.declaresKind(manifest, kind)` — accepts one exact string kind identity; arrays claim no kind ({§extension-kind}).
8
+ - `Meta.isTrusted(packageName, env?)` — the `PLURNK_EXTENSIONS_TRUSTED_ONLY` gate: `""`/`"0"` off; any value on, `@plurnk/*` always trusted plus a comma-separated allowlist. An unset key is answered by this package's own panel, which ships the gate on.
9
+ - `Meta.normalizeAttribution(raw, packageName)` — normalize an always-on package declaration, including the reserved `@plurnk/` namespace rule ({§extension-attribution}).
10
+ - `Meta.runtimeAttribution(source, context, packageName)` — pull and normalize an extension's optional synchronous `attributions` function for one provider emission attempt.
11
11
  - `Meta.composeAttributions(...lists)` — flatten, deduplicate, and sort opaque tag lists.
12
12
  - `Meta.packageDirs(nodeModulesDir)` — scope-agnostic, symlink-aware enumeration across Node's ancestor resolution chain as `{ dir, name }` candidates; the nearest package name wins. Ordering and filtering are the caller's policy.
13
13
  - `Meta.nearestNodeModules(fromDir)` — walk up to the nearest `node_modules` holding the ecosystem (witness: `@plurnk` scope); `null` when absent.
14
14
 
15
15
  **The teaching corpus**: authored policy, an optional Recap, the Plurnk skill entry, and built-in scheme references resolved from this installed package. Meta owns the source bytes and membership; core owns admission, resource composition, and projection. See [`CORPUS.md`](./CORPUS.md) and {§teaching-corpus}.
16
16
 
17
- Capability-library packages declare one `package.json#plurnk.kind`. Standard Agent Plugin bundles
18
- instead put that same native declaration under `plugin.json#extensions.ai.plurnk`.
19
- The capability's loader and lifetime stay unchanged; `kind: "module"` opts into the daemon lifecycle.
20
- Native families use npm installation, with user plugin-folder loading also available for modules.
17
+ Extension packages declare one `package.json#plurnk.kind`. Standard Agent Plugin bundles
18
+ instead put that same declaration under `plugin.json#extensions.ai.plurnk`.
19
+ The kind's loader and lifetime stay unchanged; `kind: "module"` opts into the daemon lifecycle.
20
+ Extensions install through npm, with user plugin-folder loading also available for modules.
21
21
  Never declare both. Shared manifest and filesystem
22
22
  validation is exported from `@plurnk/plurnk-meta/agent-plugin`; the portable component loader remains
23
- `@plurnk/plurnk-agent-plugins`. Native imports use the same operator trust gate.
23
+ `@plurnk/plurnk-agent-plugins`. Extension imports use the same operator trust gate.
24
24
 
25
- An admitted capability package may declare always-on `plurnk.attribution` tags and its loaded object
26
- may return per-attempt tags from `attributions(context)` ({§plugin-attribution}). MIT.
25
+ An admitted extension package may declare always-on `plurnk.attribution` tags and its loaded object
26
+ may return per-attempt tags from `attributions(context)` ({§extension-attribution}). MIT.
package/SPEC.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # plurnk-meta — Specification
2
2
 
3
- Contract for facts shared across the open plurnk package family. Capability
4
- frameworks own their family-specific declarations and runtime interfaces; this
3
+ Contract for facts shared across the open plurnk packages. Each kind's
4
+ framework owns its kind-specific declarations and runtime interfaces; this
5
5
  package owns the installed-membership primitives they share and the published
6
6
  teaching sources listed below.
7
7
 
@@ -19,6 +19,7 @@ sources into a consuming package would create a second teaching owner.
19
19
  | `docs/delegation.md` | Required | Worker delegation, lifecycle, and messaging | Pull-doc materialization with the worker scheme |
20
20
  | `docs/pattern.md` | Required | Operation-neutral pattern selection and literal source editing | Pull-doc materialization independent of schemes |
21
21
  | `skills/plurnk/SKILL.md` | Required | Standard Plurnk skill entry and chapter directory | Service-provided skill {§plurnk-skill} |
22
+ | `skills/plurnk/references/extensibility.md` | Required | How integrations and extensions reach the model, and each kind's contract | Skill chapter {§plurnk-skill} |
22
23
 
23
24
  Every teaching source, and every package's `docs/*.md`, is written to
24
25
  `TEACHING.md`, the style rule for model-facing prose: mechanism over advice,
@@ -50,50 +51,50 @@ discovery and enablement use the same Worker family as installed skills
50
51
  ({§skills-functionality}). Neither package copies skills into universal roots
51
52
  or invokes an installer merely to expose the service's own reference material.
52
53
 
53
- ## §plugin-discovery Installed capability discovery
54
+ ## §extension-discovery Installed extension discovery
54
55
 
55
56
  ```mermaid
56
57
  flowchart LR
57
58
  graph[Installed Node dependency graph] --> enumerate[Meta.packageDirs]
58
- enumerate --> scanner[Family-owned scanner]
59
+ enumerate --> scanner[Kind-owned scanner]
59
60
  manifest[package.json plurnk manifest] --> scanner
60
61
  policy[Meta.isTrusted] --> gate{Trusted?}
61
62
  scanner --> gate
62
63
  gate -->|yes| attribution[Meta.normalizeAttribution]
63
- attribution --> family[Family-owned validation, loading, and registry]
64
+ attribution --> framework[Framework-owned validation, loading, and registry]
64
65
  gate -->|no| skipped[Skipped-package evidence]
65
- family --> host[Composed host]
66
+ framework --> host[Composed host]
66
67
  skipped --> host
67
68
  ```
68
69
 
69
70
  | Layer | Owns | Does not own |
70
71
  | --------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
71
- | `plurnk-meta` | Node package enumeration, exact capability-family identity, the one trust predicate, and package-attribution normalization. | Family fields, capability collisions, plugin imports, or presentation. |
72
- | Family implementation | Family-field validation, deterministic ordering/collisions, trust enforcement before any plugin import, and trusted code loading. | A second trust or attribution policy, or cross-family composition. |
73
- | Composed host | Cross-family arbitration and presentation of skipped-package evidence. | Re-parsing manifests or importing a declined package. |
72
+ | `plurnk-meta` | Node package enumeration, exact kind identity, the one trust predicate, and package-attribution normalization. | Kind fields, capability collisions, extension imports, or presentation. |
73
+ | Kind framework | Kind-field validation, deterministic ordering/collisions, trust enforcement before any extension import, and trusted code loading. | A second trust or attribution policy, or cross-kind composition. |
74
+ | Composed host | Cross-kind arbitration and presentation of skipped-package evidence. | Re-parsing manifests or importing a declined package. |
74
75
 
75
76
  The installed dependency graph is the compatibility boundary. Enumeration is
76
77
  scope-agnostic and symlink-aware across Node's ancestor resolution chain; the
77
78
  nearest package with a given package name wins. Installing a package makes a
78
- valid declared capability discoverable. Environment values configure or bound
79
- installed capabilities; they never manufacture package existence.
79
+ valid declared extension discoverable. Environment values configure or bound
80
+ installed extensions; they never manufacture package existence.
80
81
 
81
- ### §plugin-family-kind One package, one capability family
82
+ ### §extension-kind One package, one kind
82
83
 
83
84
  The native declaration's `kind` is one exact string, in either manifest location
84
- at {§plugin-manifest-read}. Arrays and other shapes claim no family. A package may declare multiple named capabilities inside its one
85
- family-owned collection.
85
+ at {§extension-manifest-read}. Arrays and other shapes claim no kind. A package may declare multiple named capabilities inside its one
86
+ kind-owned collection.
86
87
 
87
- | `plurnk.kind` | Family-owned names |
88
+ | `plurnk.kind` | Kind-owned names |
88
89
  | ----------------- | -------------------------------------------------------- |
89
90
  | `"exec"` | `runtimes[]` |
90
91
  | `"mimetype"` | `handlers[]` |
91
92
  | `"provider"` | singular `name` |
92
93
  | `"scheme"` | `schemes[]`; singular `name` is the one-scheme shorthand |
93
- | `"http-materializer"` | `materializers[]` ({§http-materializer-plugins}) |
94
+ | `"http-materializer"` | `materializers[]` ({§http-materializer-extensions}) |
94
95
  | `"module"` | singular `module` export subpath ({§module-discovery}) |
95
96
 
96
- Coordinated capabilities spanning families use explicit daemon-module
97
+ Coordinated capabilities spanning kinds use explicit daemon-module
97
98
  composition ({§module-lifecycle}); a multi-kind manifest is not a parallel
98
99
  module mechanism.
99
100
 
@@ -153,71 +154,71 @@ diagnostic, never degrades into an unbounded one.
153
154
  `limit(environment?)` validates the same bound without rendering a diagnostic;
154
155
  an explicitly supplied environment is complete and never falls back to the process.
155
156
 
156
- ### §plugin-manifest-read One native capability declaration
157
+ ### §extension-manifest-read One extension declaration
157
158
 
158
159
  | Distribution | Declaration | Identity |
159
160
  |---|---|---|
160
- | Platform capability package | `package.json#plurnk` | npm package name |
161
+ | Extension package | `package.json#plurnk` | npm package name |
161
162
  | Agent Plugin bundle | `plugin.json#extensions.ai.plurnk` | npm package name when packaged for Node; otherwise the standard plugin name |
162
163
 
163
164
  The bundle uses the standard manifest validation at {§agent-plugins-manifest}.
164
- Its namespace contains the same `kind` and family-owned fields as a capability
165
- package. Each family's loader, import convention, registry and lifetime remain
166
- unchanged; bundling does not convert capabilities into daemon modules.
165
+ Its namespace contains the same `kind` and kind-owned fields as an extension
166
+ package. Each kind's loader, import convention, registry and lifetime remain
167
+ unchanged; bundling does not convert extensions into daemon modules.
167
168
  Use `kind: "module"` when the extension needs the daemon lifecycle ({§module-lifecycle}).
168
169
  Its Plurnk-specific files, including defaults, live under `ai.plurnk/`.
169
- A bundle never repeats its family declaration in `package.json`: two declarations
170
+ A bundle never repeats its kind declaration in `package.json`: two declarations
170
171
  are an error, not an override. npm exports and dependencies remain Node packaging
171
172
  metadata. The standard manifest is authoritative when present; an invalid one
172
173
  cannot fall through to a package declaration. Other clients' extension namespaces
173
- claim no native Plurnk capability.
174
+ claim no Plurnk extension.
174
175
 
175
- | Native family | Installation boundary |
176
+ | Kind | Installation boundary |
176
177
  |---|---|
177
178
  | `module` | npm or selected user plugin roots; never project roots ({§module-discovery}) |
178
- | `exec`, `mimetype`, `provider`, `scheme`, `http-materializer` | Existing npm discovery and family import conventions |
179
+ | `exec`, `mimetype`, `provider`, `scheme`, `http-materializer` | Existing npm discovery and each kind's import conventions |
179
180
 
180
- `Meta.moduleFile(manifest, relative)` resolves a family-owned file entry. A standard
181
+ `Meta.moduleFile(manifest, relative)` resolves a kind-owned file entry. A standard
181
182
  bundle's entry must be under `ai.plurnk/` and resolve inside the plugin root.
182
- npm export-based families retain Node's package export resolution. Declared file
183
+ npm export-based kinds retain Node's package export resolution. Declared file
183
184
  entry loaders use this shared containment boundary before importing.
184
185
 
185
- `Meta.readManifest(dir, kind?)` is the one read of a package's family claim:
186
+ `Meta.readManifest(dir, kind?)` is the one read of a package's kind claim:
186
187
  its declaration, parsed, with an object declaring exactly that
187
- `kind` ({§plugin-family-kind}); omitting the filter inspects any native family,
188
+ `kind` ({§extension-kind}); omitting the filter inspects any kind,
188
189
  as required by the configuration-floor collector. It answers `null` for a missing or
189
- malformed ordinary package manifest, a non-object, no declaration, or another family —
190
- none of those is a package of that family, and a scanner skips them without
190
+ malformed ordinary package manifest, a non-object, no declaration, or another kind —
191
+ none of those is a package of that kind, and a scanner skips them without
191
192
  evidence. The result carries the manifest path, the package name when
192
193
  `name` is a non-empty string (otherwise `null`; what an unnamed package is
193
- remains the family's decision), and the `plurnk` object untouched: family
194
- fields are validated by the family, after the trust gate. A scanner that
194
+ remains the kind's decision), and the `plurnk` object untouched: kind
195
+ fields are validated by the kind's framework, after the trust gate. A scanner that
195
196
  passes an `AbortSignal` receives the abort; it is never masked as an
196
- unreadable directory. No family reads a manifest any other way.
197
+ unreadable directory. No framework reads a manifest any other way.
197
198
 
198
- ### §plugin-attribution Plugin-authored attribution tags
199
+ ### §extension-attribution Extension-authored attribution tags
199
200
 
200
201
  | Surface | Contract |
201
202
  | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
202
203
  | Static declaration | Optional `plurnk.attribution` is one non-empty string or an array of non-empty strings. `null`, absence, and an empty array normalize to no tags. A declaration is an always-on source for the admitted package. |
203
- | Runtime declaration | A loaded plugin object may implement synchronous `attributions(context)`, returning the same declaration shape, `null`, or `undefined`. The hook is pulled once for each provider emission attempt; returning no tags omits that source. |
204
- | Hook context | `workspaceId`, `workerId`, and `primaryWorkerId` are opaque strings; `loop`, `turn`, and `attempt` are positive sequence numbers. The hook receives no engine, database, trust, or mutation capability. |
205
- | Trust | The family applies {§plugin-trust-boundary} before attribution validation or plugin import. Trust admits executable code; it does not make an authored tag truthful. |
206
- | Normalization | `Meta.normalizeAttribution(raw, packageName)` and `Meta.runtimeAttribution(source, context, packageName)` produce readonly ordered lists. A malformed trusted declaration, malformed hook, or thrown hook fails at the package boundary. |
204
+ | Runtime declaration | A loaded extension object may implement synchronous `attributions(context)`, returning the same declaration shape, `null`, or `undefined`. The function is pulled once for each provider emission attempt; returning no tags omits that source. |
205
+ | Function context | `workspaceId`, `workerId`, and `primaryWorkerId` are opaque strings; `loop`, `turn`, and `attempt` are positive sequence numbers. The function receives no engine, database, trust, or mutation capability. |
206
+ | Trust | The kind's framework applies {§extension-trust-boundary} before attribution validation or extension import. Trust admits executable code; it does not make an authored tag truthful. |
207
+ | Normalization | `Meta.normalizeAttribution(raw, packageName)` and `Meta.runtimeAttribution(source, context, packageName)` produce readonly ordered lists. A malformed trusted declaration, malformed function, or thrown function fails at the package boundary. |
207
208
  | Namespace reservation | A tag beginning `@plurnk/` is valid only when `packageName` also begins `@plurnk/`; a violating trusted package fails. Other tag vocabularies, collisions, and meanings are deliberately uninterpreted. |
208
- | Discovery result | Each family returns `packageAttributions`, keyed once by package name. Only non-empty static lists for packages represented after family admission are present. |
209
- | Host composition | The host flattens static and runtime lists from its admitted plugin objects, deduplicates and sorts the result, and treats it as an opaque folksonomy. It does not infer contribution, provenance, weight, trustworthiness, or causal value. |
209
+ | Discovery result | Each kind's discovery returns `packageAttributions`, keyed once by package name. Only non-empty static lists for packages represented after admission are present. |
210
+ | Host composition | The host flattens static and runtime lists from its admitted extension objects, deduplicates and sorts the result, and treats it as an opaque folksonomy. It does not infer contribution, provenance, weight, trustworthiness, or causal value. |
210
211
  | Published projections | Existing per-tag, per-handler, or name-keyed attribution fields may project the validated static declaration for 1.x compatibility; they do not own another policy. |
211
212
 
212
- Manifest acquisition and static validation occur once in the family discovery
213
- path. A composed host consumes the admitted package map and loaded plugin
213
+ Manifest acquisition and static validation occur once in each kind's discovery
214
+ path. A composed host consumes the admitted package map and loaded extension
214
215
  objects without reopening a manifest or tracing tags through produced values.
215
216
 
216
- ### §plugin-trust-boundary One policy, enforcement before import
217
+ ### §extension-trust-boundary One policy, enforcement before import
217
218
 
218
219
  `Meta.isTrusted(packageName, env)` is the sole trust decision:
219
220
 
220
- - empty or `"0"` `PLURNK_PLUGINS_TRUSTED_ONLY` trusts every installed package;
221
+ - empty or `"0"` `PLURNK_EXTENSIONS_TRUSTED_ONLY` trusts every installed package;
221
222
  - any other value trusts every `@plurnk/*` package plus the comma-separated
222
223
  package-name allowlist in that value;
223
224
  - an **unset** key is answered by this package's own `.env.defaults`, because the
@@ -225,9 +226,11 @@ objects without reopening a manifest or tracing tags through produced values.
225
226
  exists. A value in code would outrank the panel, so there is none
226
227
  ({§operator-config-only-home}).
227
228
 
228
- Every family scanner applies that predicate after reading the inert package
229
- manifest and before importing or registering plugin code. An untrusted package
230
- does not crash discovery: the family result preserves its package identity as
229
+ The setting's retired name, `PLURNK_PLUGINS_TRUSTED_ONLY`, fails hard and names its successor. <!-- lexicon-allow: the retired setting's name -->
230
+
231
+ Every kind's scanner applies that predicate after reading the inert package
232
+ manifest and before importing or registering extension code. An untrusted package
233
+ does not crash discovery: the scanner's result preserves its package identity as
231
234
  skipped evidence. The composed host decides how to present that evidence.
232
235
  Direct framework consumers receive the same safe load boundary and can choose
233
236
  their own presentation.
@@ -1,7 +1,7 @@
1
1
  import { lstat, readFile, realpath, stat } from "node:fs/promises";
2
2
  import { dirname, isAbsolute, join, relative, sep } from "node:path";
3
3
  import { validateManifest } from "./AgentPluginManifest.js";
4
- // {§agent-plugins-containment} Shared by portable components and native extension admission.
4
+ // {§agent-plugins-containment} Shared by portable components and extension admission.
5
5
  export default class AgentPluginFiles {
6
6
  static inside(root, candidate) {
7
7
  const path = relative(root, candidate);
@@ -1 +1 @@
1
- {"version":3,"file":"AgentPluginFiles.js","sourceRoot":"","sources":["../src/AgentPluginFiles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAuB,MAAM,0BAA0B,CAAC;AAEjF,6FAA6F;AAC7F,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACjC,MAAM,CAAC,MAAM,CAAC,IAAY,EAAE,SAAiB;QACzC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QACvC,OA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,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,gDAAgD,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;QACpH,CAAC;QACD,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,CAAC;YAC3C,OAAO,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,8CAA8C,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;QAClH,CAAC;QACD,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;YACnC,OAAO,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,mCAAmC,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;QACvG,CAAC;QACD,IAAI,KAAc,CAAC;QACnB,IAAI,CAAC;YACD,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QAC/E,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAI,CAAC,CAAC,KAAK,YAAY,WAAW,CAAC;gBAAE,MAAM,KAAK,CAAC;YACjD,OAAO,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,+BAA+B,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;QACnG,CAAC;QACD,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;CACJ"}
package/dist/index.d.ts CHANGED
@@ -6,31 +6,34 @@ export interface PackageCandidate {
6
6
  dir: string;
7
7
  name: string;
8
8
  }
9
- declare const PLUGIN_KINDS: readonly ["exec", "mimetype", "provider", "scheme", "http-materializer", "module"];
10
- export type PluginKind = typeof PLUGIN_KINDS[number];
11
- export interface PluginManifest {
9
+ declare const EXTENSION_KINDS: readonly ["exec", "mimetype", "provider", "scheme", "http-materializer", "module"];
10
+ export type ExtensionKind = typeof EXTENSION_KINDS[number];
11
+ export interface ExtensionManifest {
12
12
  readonly manifestPath: string;
13
13
  readonly packageName: string | null;
14
14
  readonly plurnk: Record<string, unknown>;
15
15
  }
16
- export type PluginAttributionDeclaration = string | string[];
17
- export type PluginAttribution = readonly string[];
18
- export type PackageAttributions = ReadonlyMap<string, PluginAttribution>;
19
- export interface PluginAttributionContext {
16
+ export type ExtensionAttributionDeclaration = string | string[];
17
+ export type ExtensionAttribution = readonly string[];
18
+ export type PackageAttributions = ReadonlyMap<string, ExtensionAttribution>;
19
+ export interface ExtensionAttributionContext {
20
20
  readonly workspaceId: string;
21
21
  readonly workerId: string;
22
22
  readonly loop: number;
23
23
  readonly turn: number;
24
24
  readonly attempt: number;
25
25
  }
26
- export interface PluginAttributionSource {
27
- attributions?(context: PluginAttributionContext): PluginAttributionDeclaration | null | undefined;
26
+ export interface ExtensionAttributionSource {
27
+ attributions?(context: ExtensionAttributionContext): ExtensionAttributionDeclaration | null | undefined;
28
28
  }
29
29
  export { observed, observedSync } from "./observe.ts";
30
30
  export declare const TEACHING_CORPUS: Readonly<{
31
31
  readonly policy: "POLICY.md";
32
32
  readonly recap: "recap.md";
33
33
  readonly skill: "skills/plurnk/SKILL.md";
34
+ readonly skillChapters: Readonly<{
35
+ readonly extensibility: "skills/plurnk/references/extensibility.md";
36
+ }>;
34
37
  readonly docs: Readonly<{
35
38
  readonly worker: Readonly<{
36
39
  source: "docs/worker.md";
@@ -46,18 +49,18 @@ export declare const TEACHING_CORPUS: Readonly<{
46
49
  }>;
47
50
  }>;
48
51
  }>;
49
- export type TeachingCorpusSource = typeof TEACHING_CORPUS.policy | typeof TEACHING_CORPUS.recap | typeof TEACHING_CORPUS.skill | (typeof TEACHING_CORPUS.docs)[keyof typeof TEACHING_CORPUS.docs]["source"];
52
+ export type TeachingCorpusSource = typeof TEACHING_CORPUS.policy | typeof TEACHING_CORPUS.recap | typeof TEACHING_CORPUS.skill | (typeof TEACHING_CORPUS.skillChapters)[keyof typeof TEACHING_CORPUS.skillChapters] | (typeof TEACHING_CORPUS.docs)[keyof typeof TEACHING_CORPUS.docs]["source"];
50
53
  export default class Meta {
51
54
  #private;
52
- static declaresKind(manifest: unknown, kind: PluginKind): boolean;
53
- static readManifest(dir: string, kind?: PluginKind, { signal }?: {
55
+ static declaresKind(manifest: unknown, kind: ExtensionKind): boolean;
56
+ static readManifest(dir: string, kind?: ExtensionKind, { signal }?: {
54
57
  signal?: AbortSignal;
55
- }): Promise<PluginManifest | null>;
56
- static moduleFile(manifest: PluginManifest, relative: string): Promise<string>;
58
+ }): Promise<ExtensionManifest | null>;
59
+ static moduleFile(manifest: ExtensionManifest, relative: string): Promise<string>;
57
60
  static isTrusted(packageName: string, env?: Record<string, string | undefined>): boolean;
58
- static normalizeAttribution(raw: unknown, packageName: string): PluginAttribution;
59
- static runtimeAttribution(source: unknown, context: PluginAttributionContext, packageName: string): PluginAttribution;
60
- static composeAttributions(...lists: readonly PluginAttribution[]): PluginAttribution;
61
+ static normalizeAttribution(raw: unknown, packageName: string): ExtensionAttribution;
62
+ static runtimeAttribution(source: unknown, context: ExtensionAttributionContext, packageName: string): ExtensionAttribution;
63
+ static composeAttributions(...lists: readonly ExtensionAttribution[]): ExtensionAttribution;
61
64
  static packageDirs(nodeModulesDir: string): Promise<PackageCandidate[]>;
62
65
  static nearestNodeModules(fromDir: string): string | null;
63
66
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkCA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AA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AE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GAAG,OAAO,CAOpG;IAED,MAAM,CAAC,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,oBAAoB,CAiBnF;IAKD,MAAM,CAAC,kBAAkB,CACrB,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,2BAA2B,EACpC,WAAW,EAAE,MAAM,GACpB,oBAAoB,CActB;IAED,MAAM,CAAC,mBAAmB,CAAC,GAAG,KAAK,EAAE,SAAS,oBAAoB,EAAE,GAAG,oBAAoB,CAI1F;IAkCD,OAAa,WAAW,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAyB5E;IAED,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CASxD;CACJ"}
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  // The metaproject layer's membership slice — the mechanics every discovery
2
- // surface shares ({§plugin-discovery} / {§operator-config-env-defaults}):
3
- // - declaresKind: the ONE package → capability-family representation.
4
- // - readManifest: the ONE native declaration read: a family's manifest, or null for
5
- // anything that is not a package of that family. Field
6
- // validation past the family claim is the caller's.
2
+ // surface shares ({§extension-discovery} / {§operator-config-env-defaults}):
3
+ // - declaresKind: the ONE package → kind representation.
4
+ // - readManifest: the ONE extension declaration read: a kind's manifest, or null for
5
+ // anything that is not a package of that kind. Field
6
+ // validation past the kind claim is the caller's.
7
7
  // - Knob: the ONE environment reader: the panel's value by name, or a
8
8
  // crash by name ({§env-knob}).
9
9
  // - ErrorDetail: the ONE diagnostic-preview bound, per package knob
10
10
  // ({§error-detail-bound}).
11
11
  // - isTrusted: THE trust rule. One implementation; a second definition
12
- // of membership trust anywhere in the family is a bug.
12
+ // of membership trust anywhere in the packages is a bug.
13
13
  // - normalizeAttribution:
14
14
  // one package declaration → one validated tag list.
15
15
  // - packageDirs: scope-agnostic, symlink-aware enumeration of the Node
@@ -34,7 +34,7 @@ export { default as Knob } from "./Knob.js";
34
34
  export { default as ConfigurationError } from "./ConfigurationError.js";
35
35
  export { default as ResourceEnvironment } from "./ResourceEnvironment.js";
36
36
  export { default as ErrorDetail } from "./ErrorDetail.js";
37
- const PLUGIN_KINDS = ["exec", "mimetype", "provider", "scheme", "http-materializer", "module"];
37
+ const EXTENSION_KINDS = ["exec", "mimetype", "provider", "scheme", "http-materializer", "module"];
38
38
  const REFERENCE_TEACHING = Object.freeze({
39
39
  worker: Object.freeze({ source: "docs/worker.md", scheme: "worker" }),
40
40
  delegation: Object.freeze({ source: "docs/delegation.md", scheme: "worker" }),
@@ -47,9 +47,15 @@ export const TEACHING_CORPUS = Object.freeze({
47
47
  policy: "POLICY.md",
48
48
  recap: "recap.md",
49
49
  skill: "skills/plurnk/SKILL.md",
50
+ skillChapters: Object.freeze({ extensibility: "skills/plurnk/references/extensibility.md" }),
50
51
  docs: REFERENCE_TEACHING,
51
52
  });
52
- const TRUSTED_ONLY = "PLURNK_PLUGINS_TRUSTED_ONLY";
53
+ const TRUSTED_ONLY = "PLURNK_EXTENSIONS_TRUSTED_ONLY";
54
+ // {§extension-trust-boundary} — a renamed setting's old name fails hard and names its successor.
55
+ const shedRenamed = (env, oldName, newName) => {
56
+ if (env[oldName] !== undefined)
57
+ throw new ConfigurationError(oldName, `${oldName} is retired: ${newName} is the extension trust setting.`);
58
+ };
53
59
  const RESERVED_ATTRIBUTION_PREFIX = "@plurnk/";
54
60
  const EMPTY_ATTRIBUTION = Object.freeze([]);
55
61
  export default class Meta {
@@ -59,8 +65,8 @@ export default class Meta {
59
65
  return false;
60
66
  return manifest.kind === kind;
61
67
  }
62
- // {§plugin-manifest-read} — null for a missing or malformed package.json, a non-object,
63
- // no `plurnk` object, or another family: none of those is a package of this family, and
68
+ // {§extension-manifest-read} — null for a missing or malformed package.json, a non-object,
69
+ // no `plurnk` object, or another kind: none of those is a package of this kind, and
64
70
  // discovery skips them without a word. An abort is the caller's contract and surfaces.
65
71
  static async readManifest(dir, kind, { signal } = {}) {
66
72
  const pluginPath = path.join(dir, "plugin.json");
@@ -80,13 +86,13 @@ export default class Meta {
80
86
  throw new ConfigurationError(pluginPath, `${pluginPath}: ${plugin.rejected.message}.`);
81
87
  }
82
88
  if (isObject(packageRecord?.plurnk) && packageRecord.plurnk.kind !== undefined) {
83
- throw new ConfigurationError(pluginPath, `${pluginPath}: native capabilities must not also be declared in package.json#plurnk.`);
89
+ throw new ConfigurationError(pluginPath, `${pluginPath}: an extension must not also be declared in package.json#plurnk.`);
84
90
  }
85
91
  const native = plugin.manifest.extensions?.["ai.plurnk"];
86
92
  if (native === undefined)
87
93
  return null;
88
- if (!PLUGIN_KINDS.some((family) => Meta.declaresKind(native, family))) {
89
- throw new ConfigurationError(pluginPath, `${pluginPath}: extensions.ai.plurnk.kind must name one native capability family.`);
94
+ if (!EXTENSION_KINDS.some((kind) => Meta.declaresKind(native, kind))) {
95
+ throw new ConfigurationError(pluginPath, `${pluginPath}: extensions.ai.plurnk.kind must name one extension kind.`);
90
96
  }
91
97
  if (kind !== undefined && !Meta.declaresKind(native, kind))
92
98
  return null;
@@ -98,13 +104,13 @@ export default class Meta {
98
104
  return null;
99
105
  const plurnk = packageRecord.plurnk;
100
106
  if (!isObject(plurnk) || !(kind === undefined
101
- ? PLUGIN_KINDS.some((family) => Meta.declaresKind(plurnk, family))
107
+ ? EXTENSION_KINDS.some((kind) => Meta.declaresKind(plurnk, kind))
102
108
  : Meta.declaresKind(plurnk, kind)))
103
109
  return null;
104
110
  const packageName = typeof packageRecord.name === "string" && packageRecord.name.length > 0 ? packageRecord.name : null;
105
111
  return { manifestPath: path.join(dir, "package.json"), packageName, plurnk };
106
112
  }
107
- // {§plugin-manifest-read} Family loaders resolve their own file declarations through this boundary.
113
+ // {§extension-manifest-read} Framework loaders resolve their own file declarations through this boundary.
108
114
  static async moduleFile(manifest, relative) {
109
115
  const dir = path.dirname(manifest.manifestPath);
110
116
  if (path.basename(manifest.manifestPath) !== "plugin.json")
@@ -161,6 +167,7 @@ export default class Meta {
161
167
  // any other value → gate ON: @plurnk/* always trusted, plus a comma-separated
162
168
  // allowlist; "1" (naming no real package) = on, zero third-party.
163
169
  static isTrusted(packageName, env = process.env) {
170
+ shedRenamed(env, "PLURNK_PLUGINS_TRUSTED_ONLY", TRUSTED_ONLY); // lexicon-allow: the shed names the retired setting
164
171
  const stated = env[TRUSTED_ONLY];
165
172
  const value = (stated === undefined ? Meta.#panelTrust() : stated).trim();
166
173
  if (value === "" || value === "0")
@@ -176,17 +183,17 @@ export default class Meta {
176
183
  const firstParty = packageName.startsWith(RESERVED_ATTRIBUTION_PREFIX);
177
184
  const tags = values.map((value) => {
178
185
  if (typeof value !== "string" || value.length === 0) {
179
- throw new Error(`plugin '${packageName}': plurnk.attribution must be a non-empty string or string[]`);
186
+ throw new Error(`extension '${packageName}': plurnk.attribution must be a non-empty string or string[]`);
180
187
  }
181
188
  if (value.startsWith(RESERVED_ATTRIBUTION_PREFIX) && !firstParty) {
182
- throw new Error(`plugin '${packageName}': '${RESERVED_ATTRIBUTION_PREFIX}' is reserved for `
189
+ throw new Error(`extension '${packageName}': '${RESERVED_ATTRIBUTION_PREFIX}' is reserved for `
183
190
  + `${RESERVED_ATTRIBUTION_PREFIX}-scoped packages — '${packageName}' cannot claim '${value}'`);
184
191
  }
185
192
  return value;
186
193
  });
187
194
  return Object.freeze(tags);
188
195
  }
189
- // {§plugin-attribution} — one synchronous runtime pull with the same shape
196
+ // {§extension-attribution} — one synchronous runtime pull with the same shape
190
197
  // and sole namespace reservation as the static declaration. Tags remain
191
198
  // opaque; this boundary validates structure, not meaning.
192
199
  static runtimeAttribution(source, context, packageName) {
@@ -196,14 +203,14 @@ export default class Meta {
196
203
  if (hook === undefined)
197
204
  return EMPTY_ATTRIBUTION;
198
205
  if (typeof hook !== "function") {
199
- throw new TypeError(`plugin '${packageName}': attributions must be a function when present`);
206
+ throw new TypeError(`extension '${packageName}': attributions must be a function when present`);
200
207
  }
201
208
  let raw;
202
209
  try {
203
210
  raw = hook.call(source, context);
204
211
  }
205
212
  catch (cause) {
206
- throw new Error(`plugin '${packageName}': attributions() failed`, { cause });
213
+ throw new Error(`extension '${packageName}': attributions() failed`, { cause });
207
214
  }
208
215
  return Meta.normalizeAttribution(raw, packageName);
209
216
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,0EAA0E;AAC1E,6EAA6E;AAC7E,4FAA4F;AAC5F,+EAA+E;AAC/E,4EAA4E;AAC5E,sFAAsF;AACtF,uDAAuD;AACvD,6EAA6E;AAC7E,mDAAmD;AACnD,kFAAkF;AAClF,+EAA+E;AAC/E,4BAA4B;AAC5B,4EAA4E;AAC5E,gFAAgF;AAChF,iFAAiF;AACjF,+EAA+E;AAC/E,6EAA6E;AAC7E,2CAA2C;AAC3C,8EAA8E;AAC9E,iFAAiF;AACjF,4EAA4E;AAC5E,kFAAkF;AAClF,mFAAmF;AACnF,+DAA+D;AAE/D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE9D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,M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AAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;gBAAE,OAAO,SAAS,CAAC;YAClE,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACjC,IAAI,MAAM,KAAK,GAAG;gBAAE,OAAO,IAAI,CAAC;YAChC,GAAG,GAAG,MAAM,CAAC;QACjB,CAAC;IACL,CAAC;CACJ"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-meta",
3
- "version": "1.29.0",
4
- "description": "Plugin discovery and trust primitives shared by plurnk plugin families, and the teaching material the plurnk service gives models: policy, Recap, the plurnk skill and scheme references.",
3
+ "version": "2.0.1",
4
+ "description": "Extension discovery and trust primitives shared by every plurnk kind, and the teaching material the plurnk service gives models: policy, Recap, the plurnk skill and scheme references.",
5
5
  "keywords": [
6
6
  "plurnk",
7
7
  "agent-skills",
@@ -67,5 +67,6 @@
67
67
  "type": "git",
68
68
  "url": "git+https://github.com/plurnk/plurnk-service.git",
69
69
  "directory": "plurnk-meta"
70
- }
70
+ },
71
+ "gitHead": "72efc3da1eb30f00b8846594d7a03696daefac29"
71
72
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: plurnk
3
- description: Configure Plurnk, select and tune models, and look up its worker and tool contracts.
3
+ description: Plurnk harness configurations, extensions, and definitions.
4
4
  ---
5
5
 
6
6
  # Plurnk
@@ -11,6 +11,8 @@ description: Configure Plurnk, select and tune models, and look up its worker an
11
11
  | COPY/MOVE operands, source regions, destination placement | [Copy and move](references/copy-move.md) |
12
12
  | Model routes, reasoning, output and context limits, cost | [Models](references/models.md) |
13
13
  | Every installed package's settings and defaults | [Complete .env.defaults](.env.defaults) |
14
+ | Plugins, extensions, clients and hooks: what each reaches and how it loads | [Extending Plurnk](references/extensibility.md) |
15
+ | Each installed package's contract and type declarations | `packages/<package name>/SPEC.md`, `dist/*.d.ts` |
14
16
  | Worker hierarchy, messaging, and delegation | [Worker reference](worker:///_plurnk/plurnk/worker.md) |
15
17
  | Which project files you can see, and why a file is missing | [Membership](worker:///_plurnk/plurnk/members.md) |
16
18
  | Agent Skills, MCP servers, and A2A agents: what each is and how one is added | `worker:///_plurnk/plurnk/skills.md`, `mcp.md`, `a2a.md` |
@@ -0,0 +1,162 @@
1
+ # Extending Plurnk
2
+
3
+ An integration points one way or both. Plurnk uses X when X's knowledge, tools,
4
+ agents or models reach the model. X uses Plurnk when X drives Plurnk as a
5
+ client or receives its lifecycle events. Each surface below states what it
6
+ reaches and where its code runs: nowhere, in an external process, or in the
7
+ daemon.
8
+
9
+ ## Choosing a surface
10
+
11
+ The surfaces run from least to most code and trust, and each is for what the ones
12
+ before it cannot do:
13
+
14
+ - **Configuration** when what the integration needs already exists: a setting in
15
+ the cascade, or a definition in `mcp.json` or a skill root.
16
+ - **A skill** when the model needs knowledge, or a script it runs with its existing
17
+ runtimes (`sh`, `node`).
18
+ - **An MCP server** when X has an API the model calls as tools. A server X already
19
+ publishes needs only its definition.
20
+ - **A plugin** when skills and MCP servers install together, or travel to other agents.
21
+ - **A client** when X drives Plurnk from outside: an application through AG-UI, an
22
+ agent through A2A.
23
+ - **A hook** when X hears about Plurnk's lifecycle events and answers nothing.
24
+ - **An extension** only when the model needs something new inside the daemon that
25
+ none of the above can add: a runtime, an address scheme, a media-type reader, a
26
+ model provider or a page materializer. The operator installs and trusts it, and
27
+ it loads when the daemon starts.
28
+ - **A module** only when the daemon itself serves or manages something: a family
29
+ behind the six verbs, an endpoint on Plurnk's listener, or an observer of its events.
30
+
31
+ ## Plurnk uses X
32
+
33
+ | Surface | Shape | The model sees | Code in the daemon |
34
+ | --- | --- | --- | --- |
35
+ | Skill | a directory holding `SKILL.md` | `skill://<name>/` | none |
36
+ | MCP server | one MCP definition | a runtime named for the server, its tools as invocation targets, and its resources as an address scheme | none: a process or a URL |
37
+ | A2A agent | one Agent Card URL | `a2a://<alias>`, a peer that takes tasks | none: a remote agent |
38
+ | Plugin | a directory holding `plugin.json`, `skills/` and `mcp.json` | its skills and MCP servers | none, unless it declares an extension |
39
+ | Extension | a package declaring one kind | a runtime, an address scheme, a media-type reader, a model provider, a page materializer, or what a module contributes | trusted, in the daemon |
40
+
41
+ Skills, MCP servers and A2A agents are definitions. The `skills`, `mcp` and
42
+ `a2a` runtimes add, enable, disable and remove them in the current workspace,
43
+ and `worker:///_plurnk/plurnk/skills.md`, `mcp.md` and `a2a.md` show each
44
+ definition's form. A definition needs no restart; an extension loads only when
45
+ the daemon starts.
46
+
47
+ ## X uses Plurnk
48
+
49
+ | Surface | Shape | Code in the daemon |
50
+ | --- | --- | --- |
51
+ | Application | an AG-UI client: `POST /agui` with `RunAgentInput` on the daemon's listener (`PLURNK_PORT`) returns an event stream | none |
52
+ | Agent | an A2A client of the exposure that `PLURNK_A2A_EXPOSE` mounts | none |
53
+ | Command | the executable in `PLURNK_HOOKS_COMMAND`, run once per event named in `PLURNK_HOOKS_EVENTS` with one JSON line on stdin; its output and exit status change nothing | none |
54
+ | Protocol server | a module that declares mounts and serves its routes on the daemon's listener | trusted, in the daemon |
55
+
56
+ ## Extensions
57
+
58
+ An extension is one package of one kind, declared once: under `plurnk` in its
59
+ `package.json`, or under `extensions.ai.plurnk` in a plugin's `plugin.json`.
60
+
61
+ | Kind | Adds | Kind-owned field | Contract |
62
+ | --- | --- | --- | --- |
63
+ | `exec` | runtimes the model invokes as fences | `runtimes` | `skill://plurnk/packages/@plurnk/plurnk-execs/SPEC.md` |
64
+ | `scheme` | address schemes | `schemes`, or `name` for one | `skill://plurnk/packages/@plurnk/plurnk-schemes/SPEC.md` |
65
+ | `mimetype` | readers for media types | `handlers` | `skill://plurnk/packages/@plurnk/plurnk-mimetypes/SPEC.md` |
66
+ | `provider` | a model provider | `name` | `skill://plurnk/packages/@plurnk/plurnk-providers/SPEC.md` |
67
+ | `http-materializer` | page rendering for web reads | `materializers` | `skill://plurnk/packages/@plurnk/plurnk-schemes-http/SPEC.md` |
68
+ | `module` | lifecycle membership: a definition family behind the six verbs, a protocol server, or an event observer | `module` | `skill://plurnk/packages/@plurnk/plurnk-modules/SPEC.md` |
69
+
70
+ - An extension loads when the daemon starts, from the service's installed npm
71
+ packages. A module also loads from a plugin in `$XDG_CONFIG_HOME/plurnk/plugins/`
72
+ or `~/.agents/plugins/`. A plugin in a project's `.agents/plugins/` contributes
73
+ its skills and MCP servers, never code, and a package written into the project
74
+ loads nothing until it is installed among the service's npm packages.
75
+ - `PLURNK_EXTENSIONS_TRUSTED_ONLY` gates loading: `@plurnk/*` packages always
76
+ load, a third-party package loads only when the setting lists its package
77
+ name, and `0` turns the gate off.
78
+ - A module exports one lifecycle object or a factory returning one. The daemon
79
+ runs every module's `setup` before any module's `start`, then `stop` and
80
+ `close` at shutdown; each member is optional.
81
+
82
+ A module exposing read-only resource folders can use `registerResourceTreeScheme`
83
+ from `@plurnk/plurnk-schemes`: it supplies names and original bytes; the host owns
84
+ MIME handling, entry projections and ordinary selection. See {§resource-tree-scheme}
85
+ in that package's contract. `@plurnk/plurnk-skills` is the built-in example; its
86
+ contract is `skill://plurnk/packages/@plurnk/plurnk-skills/SPEC.md`.
87
+
88
+ ## Examples
89
+
90
+ The [Tavily plugin](https://github.com/plurnk/plurnk-tavily-plugin) is a working,
91
+ separately installed example: a standard `plugin.json`, one HTTP materializer
92
+ extension, its own configuration floor, and public-interface installation tests.
93
+ It is not bundled with the service.
94
+
95
+ A plugin directory, under a plugin root or packaged for npm:
96
+
97
+ ```text
98
+ acme-tools/
99
+ ├── plugin.json
100
+ ├── mcp.json
101
+ └── skills/notes-format/SKILL.md
102
+ ```
103
+
104
+ Its `plugin.json`:
105
+
106
+ ```json
107
+ {
108
+ "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
109
+ "name": "acme-tools",
110
+ "description": "Acme skills and MCP servers."
111
+ }
112
+ ```
113
+
114
+ Its `mcp.json`, where `$schema` and each server's `type` are required: without `$schema` the
115
+ plugin carries no MCP servers, and an entry without `type` is skipped. A stdio server starts in the
116
+ plugin's directory:
117
+
118
+ ```json
119
+ {
120
+ "$schema": "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json",
121
+ "mcpServers": {
122
+ "files": { "type": "stdio", "command": "node", "args": ["server.mjs"] }
123
+ }
124
+ }
125
+ ```
126
+
127
+ A scheme extension's `package.json`; its default export is the scheme handler:
128
+
129
+ ```json
130
+ {
131
+ "name": "@acme/plurnk-scheme-notes",
132
+ "type": "module",
133
+ "exports": { ".": "./dist/index.js" },
134
+ "plurnk": { "kind": "scheme", "name": "notes" }
135
+ }
136
+ ```
137
+
138
+ A module's `package.json` and its `./module` export:
139
+
140
+ ```json
141
+ {
142
+ "name": "@acme/plurnk-module-pager",
143
+ "type": "module",
144
+ "exports": { "./module": "./dist/module.js" },
145
+ "plurnk": { "kind": "module", "module": "./module" }
146
+ }
147
+ ```
148
+
149
+ ```js
150
+ export default () => ({
151
+ setup(seam) {},
152
+ async stop() {},
153
+ });
154
+ ```
155
+
156
+ ## Contracts
157
+
158
+ `skill://plurnk/packages/` holds the `SPEC.md` of every installed package that
159
+ ships one, at `skill://plurnk/packages/<package name>/SPEC.md`, and beside it the
160
+ package's type declarations under `dist/`: `dist/index.d.ts` is the package root's,
161
+ and a relative import names a sibling file. FIND searches them by tag or term; each
162
+ contract's examples, tables and declarations are authoritative.