@plurnk/plurnk-meta 1.17.0 → 1.19.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.
package/.env.defaults CHANGED
@@ -1,7 +1,8 @@
1
1
  # @plurnk/plurnk-meta — package discovery and product orientation.
2
2
 
3
- # Plugin trust: 0/empty/unset = all installed packages; 1 = @plurnk/* only;
4
- # comma-separated package names = @plurnk/* plus those packages. Also gates their defaults.
5
- PLURNK_PLUGINS_TRUSTED_ONLY=0
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
5
+ # here by the operator, never admitted by being present. Also gates their defaults.
6
+ PLURNK_PLUGINS_TRUSTED_ONLY=1
6
7
  # Whole-product orientation deadline, seconds; includes admitted-project search preparation.
7
8
  PLURNK_ACCEPTANCE_TIMEOUT=3600
package/DIVERGENCES.md CHANGED
@@ -26,7 +26,7 @@ advantage over conventional tool calling.
26
26
 
27
27
  ## Internal resource addressing
28
28
 
29
- Agent-visible state uses URI schemes such as `worker://`, `prompt://`, and
29
+ Agent-visible state uses URI schemes such as `worker://` and
30
30
  `log://`. The URI authority identifies the relevant worker namespace where the
31
31
  scheme supports one.
32
32
 
package/README.md CHANGED
@@ -5,7 +5,7 @@ The plurnk metaproject layer, published — what the family shares that no singl
5
5
  **Membership primitives** (`import Meta from "@plurnk/plurnk-meta"`): the shared implementation of exact family identity, trust, attribution normalization, enumeration, and root resolution consumed by the four family-owned scanners (schemes, mimetypes, providers, execs). [SPEC.md](./SPEC.md) owns the complete contract ({§plugin-discovery}).
6
6
 
7
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: unset/`""`/`"0"` off; any value on, `@plurnk/*` always trusted plus a comma-separated allowlist.
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
9
  - `Meta.normalizeAttribution(raw, packageName)` — normalize an always-on package declaration, including the reserved `@plurnk/` namespace rule ({§plugin-attribution}).
10
10
  - `Meta.runtimeAttribution(source, context, packageName)` — pull and normalize an optional synchronous plugin hook for one provider emission attempt.
11
11
  - `Meta.composeAttributions(...lists)` — flatten, deduplicate, and sort opaque tag lists.
package/SPEC.md CHANGED
@@ -110,10 +110,13 @@ objects without reopening a manifest or tracing tags through produced values.
110
110
 
111
111
  `Meta.isTrusted(packageName, env)` is the sole trust decision:
112
112
 
113
- - unset, empty, or `"0"` `PLURNK_PLUGINS_TRUSTED_ONLY` trusts every installed
114
- package;
113
+ - empty or `"0"` `PLURNK_PLUGINS_TRUSTED_ONLY` trusts every installed package;
115
114
  - any other value trusts every `@plurnk/*` package plus the comma-separated
116
- package-name allowlist in that value.
115
+ package-name allowlist in that value;
116
+ - an **unset** key is answered by this package's own `.env.defaults`, because the
117
+ gate decides whose panel joins the floor and so is asked before the floor
118
+ exists. A value in code would outrank the panel, so there is none
119
+ ({§operator-config-only-home}).
117
120
 
118
121
  Every family scanner applies that predicate after reading the inert package
119
122
  manifest and before importing or registering plugin code. An untrusted package
package/dist/index.d.ts CHANGED
@@ -9,7 +9,6 @@ export type PackageAttributions = ReadonlyMap<string, PluginAttribution>;
9
9
  export interface PluginAttributionContext {
10
10
  readonly workspaceId: string;
11
11
  readonly workerId: string;
12
- readonly primaryWorkerId: string;
13
12
  readonly loop: number;
14
13
  readonly turn: number;
15
14
  readonly attempt: number;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAuBA,MAAM,WAAW,gBAAgB;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;C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index.js CHANGED
@@ -17,8 +17,10 @@
17
17
  // land on the monorepo root's. Null when nothing is found;
18
18
  // the fallback is the caller's policy.
19
19
  import { readdir } from "node:fs/promises";
20
- import { existsSync } from "node:fs";
20
+ import { existsSync, readFileSync } from "node:fs";
21
+ import { parseEnv } from "node:util";
21
22
  import path from "node:path";
23
+ import { fileURLToPath } from "node:url";
22
24
  const SCHEME_TEACHING = Object.freeze({
23
25
  worker: "docs/worker.md",
24
26
  });
@@ -30,19 +32,37 @@ export const TEACHING_CORPUS = Object.freeze({
30
32
  skill: "skills/plurnk/SKILL.md",
31
33
  schemeDocs: SCHEME_TEACHING,
32
34
  });
35
+ const TRUSTED_ONLY = "PLURNK_PLUGINS_TRUSTED_ONLY";
33
36
  const RESERVED_ATTRIBUTION_PREFIX = "@plurnk/";
34
37
  const EMPTY_ATTRIBUTION = Object.freeze([]);
35
38
  export default class Meta {
39
+ static #shippedTrust;
36
40
  static declaresKind(manifest, kind) {
37
41
  if (typeof manifest !== "object" || manifest === null)
38
42
  return false;
39
43
  return manifest.kind === kind;
40
44
  }
41
- // unset / "" / "0" → gate OFF: everything installed is trusted.
45
+ // {§operator-config-only-home} — the trust gate is asked while the floor is still being
46
+ // assembled (it decides whose panel joins it), so an unset key cannot mean "the panel said
47
+ // nothing". This package owns the key, so it reads its own panel: the operator's environment
48
+ // first, then the shipped declaration. A value in code would outrank both.
49
+ static #panelTrust() {
50
+ if (Meta.#shippedTrust === undefined) {
51
+ const panel = path.join(fileURLToPath(new URL("..", import.meta.url)), ".env.defaults");
52
+ const declared = parseEnv(readFileSync(panel, "utf8"))[TRUSTED_ONLY];
53
+ if (declared === undefined) {
54
+ throw new Error(`@plurnk/plurnk-meta: ${TRUSTED_ONLY} is missing from its own .env.defaults — the shipped floor is not optional.`);
55
+ }
56
+ Meta.#shippedTrust = declared;
57
+ }
58
+ return Meta.#shippedTrust;
59
+ }
60
+ // "" / "0" → gate OFF: everything installed is trusted.
42
61
  // any other value → gate ON: @plurnk/* always trusted, plus a comma-separated
43
62
  // allowlist; "1" (naming no real package) = on, zero third-party.
44
63
  static isTrusted(packageName, env = process.env) {
45
- const value = env.PLURNK_PLUGINS_TRUSTED_ONLY?.trim() ?? "";
64
+ const stated = env[TRUSTED_ONLY];
65
+ const value = (stated === undefined ? Meta.#panelTrust() : stated).trim();
46
66
  if (value === "" || value === "0")
47
67
  return true;
48
68
  if (packageName.startsWith("@plurnk/"))
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,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,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,IAAI,MAAM,WAAW,CAAC;AA4B7B,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC;IAClC,MAAM,EAAE,gBAAgB;CAClB,CAAC,CAAC;AAEZ,6EAA6E;AAC7E,qEAAqE;AACrE,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC;IACzC,MAAM,EAAE,WAAW;IACnB,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,wBAAwB;IAC/B,UAAU,EAAE,eAAe;CAErB,CAAC,CAAC;AASZ,MAAM,2BAA2B,GAAG,UAAU,CAAC;AAC/C,MAAM,iBAAiB,GAAsB,MAAM,CAAC,MAAM,CAAC,EAAc,CAAC,CAAC;AAE3E,MAAM,CAAC,OAAO,OAAO,IAAI;IACrB,MAA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,CAAC;IACtB,CAAC;IAED,MAAM,CAAC,kBAAkB,CAAC,OAAe;QACrC,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAChC,OAAO,IAAI,EAAE,CAAC;YACV,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;YACjD,IAAI,UAAU,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/docs/worker.md CHANGED
@@ -10,8 +10,10 @@ an entry rather than controlling that worker.
10
10
  | Address | Meaning | Model access |
11
11
  | --- | --- | --- |
12
12
  | `worker://reviewer` | Named worker | WORK/FORK create; SEND messages; READ collects; KILL terminates. |
13
- | `worker://reviewer/notes.md` | Named scratch entry | Read and write from any worker in the workspace. |
14
- | `worker:///notes.md` | Shared commons entry | Read and write. |
13
+ | `message://reviewer/ab3d5678` | Retained message | READ/FIND/COPY inspect; SEND replies. Neither EDIT nor KILL changes its source. |
14
+ | `ops://reviewer/1` | What that loop said, or how it ended | READ/FIND/COPY inspect; source is immutable. |
15
+ | `worker://reviewer/example.md` | Named scratch entry | Read and write from any worker in the workspace. |
16
+ | `worker:///example.md` | Shared commons entry | Read and write. |
15
17
 
16
18
  The packet names your worker, its parent (`null` at a root), and the loop and turn you are producing under `## Worker`, below the log. Addresses are literal and keep
17
19
  the same meaning when passed to another worker. All scratch belongs to the
@@ -27,7 +29,8 @@ console.log(greet("world"));
27
29
  ````
28
30
 
29
31
  Control addresses contain only scheme and authority: no trailing slash,
30
- userinfo, port, query, fragment, or `[metadata]` modifier.
32
+ userinfo, port, query, or fragment. Messages and loop outcomes have separate
33
+ addresses; neither is a scratch entry or an actor control.
31
34
 
32
35
  An entry whose source has a readable projection (HTML, a notebook) carries it
33
36
  beside the source as `#readable`, text/markdown, in its own line coordinates;
@@ -37,51 +40,75 @@ projection follows every source write and is never written itself.
37
40
 
38
41
  ## Turn sources
39
42
 
40
- | Address | Read-only source in your worker's history |
43
+ | Address | Read-only source in the named worker's history |
41
44
  | --- | --- |
42
- | `ops:///<loop>/<turn>` | The exact submitted program, including interstitial text. |
43
- | `reasoning:///<loop>/<turn>` | Original provider reasoning when exposed, or a harness turn's authored rationale. |
45
+ | `ops://<worker>/<loop>/<turn>` | The exact submitted program, including interstitial text. |
46
+ | `reasoning://<worker>/<loop>/<turn>` | Original provider reasoning when exposed, or a harness turn's authored rationale. |
47
+ | `note://<worker>/<loop>/<turn>/<item>` | The literal NOTE body, from the program or exposed reasoning; the receipt gives its address. |
44
48
 
49
+ The worker name is required. Any worker in the workspace can READ these sources;
50
+ SEND an address to share a note deliberately. `log:///` remains your own context.
45
51
  READ brings the selected source into your log; KILL of that READ curates only
46
52
  its log projection, never the original evidence. No later reasoning is added
47
53
  automatically after initialization's example READ.
48
54
 
49
55
  A READ can retain your current turn's reasoning: the source exists when your
50
56
  OPs execute. The packet's `## Worker` block names the coordinate you are
51
- producing. For example, on `"loop":1,"turn":3`:
57
+ producing. For example, as `worker://reviewer` on `"loop":1,"turn":3`:
52
58
 
53
- ````READ (reasoning:///1/3) <1,-1>
59
+ ````READ (reasoning://reviewer/1/3) <1,-1>
54
60
  ````
55
61
 
56
62
  The ordinary READ receipt appears in subsequent packets. A turn that produced
57
63
  no reasoning reads empty; a turn that has not happened returns a missing-source
58
64
  result. READ never requests inference.
59
65
 
66
+ NOTE retains working memory without changing the loop state. Only NOTE also
67
+ executes from exposed reasoning; quoted examples and other reasoned operations
68
+ remain data. Notes are ordinary log items: KILL or trim their log projection
69
+ when no longer useful. Their read-only sources remain searchable and
70
+ READable, including after log curation or a FORK.
71
+
72
+ ````FIND (note://reviewer/**) /parser/
73
+ ````
74
+
75
+ ````READ (note://reviewer/1/3/2) <1,-1>
76
+ ````
77
+
60
78
  ## Delegation
61
79
 
80
+ Parents passively observe child mutations, messages, executor invocations, and
81
+ worker launches, including failed actions. Exploration and context
82
+ curation (NOTE, READ, FIND, BARE, WAIT, and log KILL) stay with the child, including
83
+ READs of executor output. These observations never wake the parent; replies and
84
+ child conclusions retain their ordinary delivery and wake behavior.
85
+
86
+ Open Messages names unanswered messages; an arrival receipt's `resource` links
87
+ to the same source. SEND to that address answers that message. A targetless SEND
88
+ answers your observed Open Messages; SEND to a worker control address gives it
89
+ new work instead. Curation of a message's log occurrences never deletes the
90
+ source or changes whether it was answered. Another worker may answer it;
91
+ the assigned worker and original sender receive that reply without a new request.
92
+
62
93
  **WORK to delegate, FORK to branch.** WORK starts a fresh log with your task
63
94
  prompt; FORK copies your history and named scratch into its new name, then
64
95
  diverges. Embedded addresses are preserved verbatim. Both share the workspace.
65
96
  Omit the address to allocate a short worker name, reported in the receipt;
66
97
  explicit names cannot replace an existing worker, even after it finishes.
98
+ Names match `[A-Za-z0-9][A-Za-z0-9_-]{0,62}` and are case-sensitive.
67
99
  A path outside the `worker://` scheme is the child's prompt resource, as for
68
- BARE: ````` ````WORK (specs/feature.md) ````` reads the file whole as the task,
100
+ BARE: `WORK (specs/feature.md)` reads the file whole as the task,
69
101
  an inline body follows it after a blank line, and the child is auto-named.
70
102
  Use SEND to give an existing worker a follow-up task.
71
103
 
72
- Directed SEND accepts `<delay,interval>` in whole minutes to schedule its body
73
- as a new task, rather than interrupting an unfinished task:
74
-
75
- ````SEND (worker://reviewer) <0,60>
76
- Check for new messages and report relevant findings.
77
- ````
104
+ SEND accepts `[{"attachments":["report.pdf","worker:///example.md"]}]`.
105
+ It delivers send-time copies through ordinary resource links, not native media
106
+ injection; the recipient READs what it needs. Missing sources fail before
107
+ delivery. The same option works on a targetless reply.
78
108
 
79
- `<60>` runs once after an hour; `<0,60>` starts immediately and repeats hourly.
80
- Delay is nonnegative; an interval is positive. Occurrences never overlap; missed
81
- ticks coalesce without a backlog. Each occurrence uses the original instruction
82
- and policy with fresh task limits. Success permits the next occurrence; an all-failed inventory or
83
- an engine failure ends the recurrence. KILL cancels current and future tasks.
84
- Queued future tasks remain live worker obligations, visible with their due times.
109
+ A SEND takes no scope. To deliver a message later or on a cadence, to a worker
110
+ or to yourself, add a rule with the `schedule` family; it arrives as an
111
+ ordinary message from `schedule://<alias>`.
85
112
 
86
113
  ## BARE inference
87
114
 
@@ -103,39 +130,44 @@ Their answers are ordinary BARE receipts, visible in the next packet.
103
130
 
104
131
  ## Lifecycle
105
132
 
106
- **Continue or wait.** TASK declares the current inventory. An `in_progress`
107
- item keeps the loop working while children run; `waiting` joins their activity:
133
+ **Continue or wait.** Ordinary operations keep the loop working while children
134
+ run; WAIT joins their activity:
108
135
 
109
136
  ````WORK (worker://capital-checker)
110
137
  Find the capital of France from a primary source
111
138
  ````
112
139
 
113
- ````TASK
114
- [{"content":"Await capital-checker's answer.","status":"waiting"}]
140
+ ````WAIT
141
+ Await capital-checker's answer.
115
142
  ````
116
143
 
117
- TASK with waiting intent accepts `<timeout,poll>` in whole minutes. It continues the same loop;
118
- neither a deadline nor a poll repeats a message or command.
119
-
120
- | Scope | Wake condition |
121
- | --- | --- |
122
- | Omitted / `<-1>` | Existing work completes or a message arrives; inherit open streams' polling. |
123
- | `<60>` | Also wake after at most 60 minutes, even without other work. |
124
- | `<-1,60>` | Also wake after 60 minutes to observe; no wait deadline. |
125
- | `<60,0>` | Deadline or an event; no periodic stream observation. |
126
-
127
- A wake ends that wait. Submit another waiting inventory to wait again. Waking
128
- retains the loop's prompts, turn allowance, and remaining execution time;
129
- parked time does not consume execution time. An untimed wait without live work
130
- continues. A terminal inventory with at least one completed item claims success;
131
- a nonempty all-failed inventory concludes unsuccessfully.
132
-
133
- Each child task's conclusion reaches its parent automatically as a log `SEND` from
134
- `worker://capital-checker`, waking a waiting parent. Success includes the body;
135
- failure preserves its status and Problem. ````` ````READ (worker://capital-checker) `````
136
- collects the same result explicitly. While the child is running it returns
137
- `425`; the inventory still chooses whether to continue or wait.
144
+ WAIT continues the same loop: with live work—a child or an open stream—the
145
+ loop parks and wakes when that work settles, when a message arrives, or on an
146
+ open stream's observation cadence; without live work it continues at once.
147
+ Several WAITs in one turn are one park, and what a WAIT names is its label. To wake later with nothing in flight,
148
+ add a rule with the `schedule` family targeting yourself.
149
+
150
+ WAIT on `schedule:///rules/<alias>` attaches its pending occurrence to this
151
+ loop. The attachment remains held across wakes and later bare WAITs; delivery
152
+ or withdrawal settles it. See `schedule.md` for the rule and attachment resources.
153
+ WAIT on other targets behaves as bare WAIT unless their scheme supports awaiting
154
+ an event. Scope and metadata decorations are ignored.
155
+
156
+ A wake ends the suspension, not its held work. Submit WAIT to wait again. Waking
157
+ retains the loop's messages, turn allowance, and remaining execution time;
158
+ parked time does not consume execution time. Conclude by observing the work's
159
+ results and answering every Open Message with SEND. A later observation turn
160
+ can conclude without repeating a response already delivered.
161
+
162
+ Each child task's conclusion wakes its waiting parent and arrives as an
163
+ `_plurnk` READ of `ops://capital-checker/1`, carrying what the child said. This is the
164
+ execution outcome, not another message, and it arrives once: an answer to the task you
165
+ delegated is not delivered again as a separate reply. A failure retains its status and Problem.
166
+ READ that address with a scope to inspect more of the exact result, even after
167
+ the child starts another task. Bare `READ (worker://capital-checker)` collects
168
+ the current result instead, naming its exact source in `resource`. While the child is running it returns
169
+ `425`; ordinary operations continue and WAIT explicitly joins.
138
170
  A result does not imply that every task in that worker has finished.
139
171
 
140
- ````` ````KILL (worker://<name>) ````` cancels that worker and its descendants, including
172
+ `KILL (worker://<name>)` cancels that worker and its descendants, including
141
173
  queued work and unread messages. History remains readable; a later SEND can start new work.
package/package.json CHANGED
@@ -1,7 +1,13 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-meta",
3
- "version": "1.17.0",
3
+ "version": "1.19.0",
4
4
  "description": "The plurnk metaproject layer, published: plugin-membership primitives (the ONE trust rule, scope-agnostic symlink-aware enumeration, deployment-root resolution), the project teaching corpus (personality, Recap, scheme docs), and the home for family tooling.",
5
+ "keywords": [
6
+ "plurnk",
7
+ "agent-skills",
8
+ "skill",
9
+ "documentation"
10
+ ],
5
11
  "license": "MIT",
6
12
  "type": "module",
7
13
  "engines": {
@@ -33,7 +39,7 @@
33
39
  },
34
40
  "scripts": {
35
41
  "test:lint": "tsc --noEmit",
36
- "test:unit": "node --conditions=plurnk-dev --test src/**/*.test.ts",
42
+ "test:unit": "node --conditions=plurnk-dev --env-file=.env.defaults --test src/**/*.test.ts",
37
43
  "test": "npm run test:lint && npm run test:unit",
38
44
  "build:clean": "rm -rf dist",
39
45
  "build:dist": "tsc -p tsconfig.build.json",
@@ -8,11 +8,12 @@ description: Configure Plurnk, select and tune models, and look up its worker an
8
8
  | Need | Reference |
9
9
  | --- | --- |
10
10
  | Configuration cascade, persistence, permissions, skills | [Configuration](references/configuration.md) |
11
+ | COPY/MOVE operands, source regions, destination placement | [Copy and move](references/copy-move.md) |
11
12
  | Model routes, reasoning, context, local endpoints | [Models](references/models.md) |
12
13
  | Every installed package's settings and defaults | [Complete .env.defaults](.env.defaults) |
13
14
  | Worker hierarchy, messaging, and delegation | [Worker reference](worker:///_plurnk/plurnk/worker.md) |
14
15
  | Which project files you can see, and why a file is missing | [Membership](worker:///_plurnk/plurnk/members.md) |
15
- | Agent Skills, MCP servers, and A2A agents: when to reach for one, how to add one | `worker:///_plurnk/plurnk/skills.md`, `mcp.md`, `agents.md` |
16
+ | Agent Skills, MCP servers, and A2A agents: when to reach for one, how to add one | `worker:///_plurnk/plurnk/skills.md`, `mcp.md`, `a2a.md` |
16
17
  | Running code: the shell and each interpreter's body, stdin, arguments, exit status | `worker:///_plurnk/plurnk/sh.md`, `node.md`, `python3.md`, … |
17
18
  | Enabled MCP server invocations and schemas | `worker:///_plurnk/tools/` |
18
19
  | Built-in executors and scheme references | `worker:///_plurnk/plurnk/` |