@plurnk/plurnk-meta 2.1.1 → 2.1.3
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/CORPUS.md +6 -6
- package/DIVERGENCES.md +11 -11
- package/README.md +3 -3
- package/SPEC.md +36 -227
- package/dist/AgentPlugin.d.ts +48 -2
- package/dist/AgentPlugin.d.ts.map +1 -1
- package/dist/AgentPlugin.js +139 -2
- package/dist/AgentPlugin.js.map +1 -1
- package/dist/ConfigurationError.d.ts +1 -0
- package/dist/ConfigurationError.d.ts.map +1 -1
- package/dist/ConfigurationError.js +5 -0
- package/dist/ConfigurationError.js.map +1 -1
- package/dist/ErrorDetail.js +1 -1
- package/dist/ErrorDetail.js.map +1 -1
- package/dist/Knob.d.ts.map +1 -1
- package/dist/Knob.js +5 -4
- package/dist/Knob.js.map +1 -1
- package/dist/ResourceEnvironment.js +1 -1
- package/dist/ResourceEnvironment.js.map +1 -1
- package/dist/index.d.ts +28 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +50 -11
- package/dist/index.js.map +1 -1
- package/dist/observe.js.map +1 -1
- package/dist/outbound-http.d.ts +3 -0
- package/dist/outbound-http.d.ts.map +1 -0
- package/dist/outbound-http.js +43 -0
- package/dist/outbound-http.js.map +1 -0
- package/docs/delegation.md +25 -23
- package/docs/pattern.md +2 -14
- package/docs/session.md +79 -0
- package/package.json +3 -3
- package/skills/plurnk/SKILL.md +6 -6
- package/skills/plurnk/references/extensibility.md +9 -13
- package/dist/AgentPluginFiles.d.ts +0 -10
- package/dist/AgentPluginFiles.d.ts.map +0 -1
- package/dist/AgentPluginFiles.js +0 -68
- package/dist/AgentPluginFiles.js.map +0 -1
- package/dist/AgentPluginFormat.d.ts +0 -10
- package/dist/AgentPluginFormat.d.ts.map +0 -1
- package/dist/AgentPluginFormat.js +0 -10
- package/dist/AgentPluginFormat.js.map +0 -1
- package/dist/AgentPluginManifest.d.ts +0 -32
- package/dist/AgentPluginManifest.d.ts.map +0 -1
- package/dist/AgentPluginManifest.js +0 -52
- package/dist/AgentPluginManifest.js.map +0 -1
- package/docs/worker.md +0 -80
package/docs/session.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# `session://` — sessions and their entries
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Coordinate sessions (WORK, FORK), request isolated BARE inference, and manage workspace entries.
|
|
6
|
+
|
|
7
|
+
Sessions inhabit one workspace. The authority selects a session; a path selects
|
|
8
|
+
an entry rather than controlling that session.
|
|
9
|
+
|
|
10
|
+
| Address | Meaning | Model access |
|
|
11
|
+
| --- | --- | --- |
|
|
12
|
+
| `session://exampleSessionName` | Named session | WORK/FORK create; SEND messages; READ collects; KILL terminates. |
|
|
13
|
+
| `message://exampleSessionName/ab3d5678` | Retained message | READ/FIND/COPY inspect; SEND replies. Neither EDIT nor KILL changes its source. |
|
|
14
|
+
| `ops://exampleSessionName/1` | What that loop said, or how it ended | READ/FIND/COPY inspect; source is immutable. |
|
|
15
|
+
| `session://exampleSessionName/example.md` | Named scratch entry | Read and write from any session in the workspace. |
|
|
16
|
+
| `persona://examplePersona/PERSONA.md` | Discovered persona role | READ/FIND/COPY inspect; COPY to `session://<name>/AGENTS.md` binds role. |
|
|
17
|
+
| `workspace:///example.md` | Shared commons entry | Read and write. |
|
|
18
|
+
|
|
19
|
+
The packet's `## Session` block, below the log, names your session, its parent
|
|
20
|
+
(`null` at a root), the loop and turn you are producing, and its `owner`
|
|
21
|
+
(`address` and `interactive`). Addresses are
|
|
22
|
+
literal and keep the same meaning when passed to another session. Scratch
|
|
23
|
+
belongs to the workspace; a namespace does not require a namesake session, and if
|
|
24
|
+
`session://exampleSessionName/AGENTS.md` exists when that session starts (or is written later), its next turn reads the unread revision.
|
|
25
|
+
Generated references live under `plurnk:///` and `mcp:///`, and reference refreshes
|
|
26
|
+
may replace them. EDIT creates or changes an entry, never a session; KILL with
|
|
27
|
+
an entry path deletes that entry, not its session. A control address is scheme
|
|
28
|
+
and authority only: no trailing slash, userinfo, port, query, or fragment.
|
|
29
|
+
Messages and loop outcomes have their own addresses; neither is a scratch
|
|
30
|
+
entry or an actor control.
|
|
31
|
+
|
|
32
|
+
An entry whose source has a readable projection (HTML, a notebook) carries it
|
|
33
|
+
beside the source as `#readable`, text/markdown, in its own line coordinates;
|
|
34
|
+
the default channel stays the source, and a pattern matches the channel it
|
|
35
|
+
addresses. The projection follows every source write and is never written
|
|
36
|
+
itself.
|
|
37
|
+
|
|
38
|
+
A READ of an image, PDF or audio source retains its bytes: on a route whose
|
|
39
|
+
model takes that media, every later packet carries them as a native part
|
|
40
|
+
captioned with the READ's log coordinate, until you KILL that READ row. The
|
|
41
|
+
service never re-sends media; a captioned part is your own earlier READ, not a
|
|
42
|
+
new arrival.
|
|
43
|
+
|
|
44
|
+
## Delegation
|
|
45
|
+
|
|
46
|
+
[Delegation and messages](plurnk:///delegation.md) covers session
|
|
47
|
+
creation, child observations, waiting, completion, and reply routing.
|
|
48
|
+
|
|
49
|
+
## BARE inference
|
|
50
|
+
|
|
51
|
+
BARE makes one isolated call to the model, not a persistent session. Nothing
|
|
52
|
+
reaches it but the fence body: no log, no files, no web, no tools, no memory of
|
|
53
|
+
this loop. It answers from the body and the model's own knowledge alone.
|
|
54
|
+
|
|
55
|
+
```BARE
|
|
56
|
+
A self-contained prompt, with everything it needs pasted in.
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The prompt is not truncated to fit; provider capacity still applies.
|
|
60
|
+
Consecutive BARE calls run concurrently and settle before the turn continues.
|
|
61
|
+
Their answers are ordinary BARE receipts, visible in the next packet.
|
|
62
|
+
|
|
63
|
+
## Turn sources
|
|
64
|
+
|
|
65
|
+
| Address | Read-only source in the named session's history |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| `ops://<session>/<loop>/<turn>` | The exact submitted program, including interstitial text. |
|
|
68
|
+
| `reasoning://<session>/<loop>/<turn>` | Original provider reasoning when exposed, or a harness turn's authored rationale. |
|
|
69
|
+
| `note://<session>/<loop>/<turn>/<item>` | The literal NOTE body, from the program or exposed reasoning; the receipt gives its address. |
|
|
70
|
+
|
|
71
|
+
The session name is required. Any session in the workspace can READ these
|
|
72
|
+
sources; `log:///` remains your own context. READ brings the selected source
|
|
73
|
+
into your log, and KILL of that READ curates only its log projection, never the
|
|
74
|
+
original evidence. The current turn's reasoning exists when its OPs execute, so
|
|
75
|
+
`READ (reasoning://exampleSessionName/1/3) <1,-1>` from `session://exampleSessionName` on loop 1,
|
|
76
|
+
turn 3 retains it; a turn that produced no reasoning reads empty, and a turn
|
|
77
|
+
that has not happened returns a missing-source result. READ never requests
|
|
78
|
+
inference. Notes are ordinary log items whose read-only sources stay searchable
|
|
79
|
+
(`FIND (note://exampleSessionName/**) /parser/`) and READable after curation or a FORK.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurnk/plurnk-meta",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
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",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"test:lint": "tsc --noEmit",
|
|
51
|
-
"test:unit": "node --conditions=plurnk-dev --env-file=.env.defaults --test src/**/*.test.ts",
|
|
51
|
+
"test:unit": "node --conditions=plurnk-dev --env-file=.env.defaults --experimental-test-coverage --test-coverage-include-all '--test-coverage-include=src/**' --test ${PLURNK_TEST_CONCURRENCY:+--test-concurrency=$PLURNK_TEST_CONCURRENCY} 'src/**/*.test.ts'",
|
|
52
52
|
"test": "npm run test:lint && npm run test:unit",
|
|
53
53
|
"build:clean": "rm -rf dist",
|
|
54
54
|
"build:dist": "tsc -p tsconfig.build.json",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"url": "git+https://github.com/plurnk/plurnk-service.git",
|
|
69
69
|
"directory": "plurnk-meta"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "db65532b51408a2014f7ff53a288d834ff6694f2"
|
|
72
72
|
}
|
package/skills/plurnk/SKILL.md
CHANGED
|
@@ -13,12 +13,12 @@ description: Plurnk harness configurations, extensions, and definitions.
|
|
|
13
13
|
| Every installed package's settings and defaults | [Complete .env.defaults](.env.defaults) |
|
|
14
14
|
| Plugins, extensions, clients and hooks: what each reaches and how it loads | [Extending Plurnk](references/extensibility.md) |
|
|
15
15
|
| Each installed package's contract and type declarations | `packages/<package name>/SPEC.md`, `dist/*.d.ts` |
|
|
16
|
-
|
|
|
17
|
-
| Which project files you can see, and why a file is missing | [Membership](
|
|
18
|
-
| Agent Skills, MCP servers,
|
|
19
|
-
| Running code: the shell and each interpreter's body, stdin, arguments, exit status | `
|
|
20
|
-
| Enabled MCP server invocations and schemas | `
|
|
21
|
-
| Built-in executors and scheme references | `
|
|
16
|
+
| Session hierarchy, messaging, and delegation | [Session reference](plurnk:///session.md) |
|
|
17
|
+
| Which project files you can see, and why a file is missing | [Membership](mcp:///plurnk_members.md) |
|
|
18
|
+
| Agent Skills, MCP servers, environment variables, and schedules | `mcp:///plurnk_skills.md`, `mcp:///plurnk_mcp.md`, `mcp:///plurnk_env.md`, `mcp:///plurnk_schedule.md` |
|
|
19
|
+
| Running code: the shell and each interpreter's body, stdin, arguments, exit status | `plurnk:///sh.md`, `plurnk:///js.md`, `plurnk:///python3.md`, … |
|
|
20
|
+
| Enabled MCP server invocations and schemas | `mcp:///` |
|
|
21
|
+
| Built-in executors and scheme references | `plurnk:///` |
|
|
22
22
|
|
|
23
23
|
READ the relevant reference; FIND can select paths and search their bodies.
|
|
24
24
|
Defaults describe available settings, not the operator's effective configuration.
|
|
@@ -14,12 +14,11 @@ before it cannot do:
|
|
|
14
14
|
- **Configuration** when what the integration needs already exists: a setting in
|
|
15
15
|
the cascade, or a definition in `mcp.json` or a skill root.
|
|
16
16
|
- **A skill** when the model needs knowledge, or a script it runs with its existing
|
|
17
|
-
runtimes (`sh`, `
|
|
17
|
+
runtimes (`sh`, `js`).
|
|
18
18
|
- **An MCP server** when X has an API the model calls as tools. A server X already
|
|
19
19
|
publishes needs only its definition.
|
|
20
20
|
- **A plugin** when skills and MCP servers install together, or travel to other agents.
|
|
21
|
-
- **A client** when X drives Plurnk from outside
|
|
22
|
-
agent through A2A.
|
|
21
|
+
- **A client** when X drives Plurnk from outside through ACP.
|
|
23
22
|
- **A hook** when X hears about Plurnk's lifecycle events and answers nothing.
|
|
24
23
|
- **An extension** only when the model needs something new inside the daemon that
|
|
25
24
|
none of the above can add: a runtime, an address scheme, a media-type reader, a
|
|
@@ -34,13 +33,12 @@ before it cannot do:
|
|
|
34
33
|
| --- | --- | --- | --- |
|
|
35
34
|
| Skill | a directory holding `SKILL.md` | `skill://<name>/` | none |
|
|
36
35
|
| 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
36
|
| Plugin | a directory holding `plugin.json`, `skills/` and `mcp.json` | its skills and MCP servers | none, unless it declares an extension |
|
|
39
37
|
| 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
38
|
|
|
41
|
-
Skills
|
|
42
|
-
`
|
|
43
|
-
and `
|
|
39
|
+
Skills and MCP servers are definitions. The `plurnk_skills` and
|
|
40
|
+
`plurnk_mcp` runtimes (`add`, `replace`, `enable`, `disable`, and `remove` tools) manage them in the current workspace,
|
|
41
|
+
and `mcp:///plurnk_skills.md` and `mcp:///plurnk_mcp.md` show each
|
|
44
42
|
definition's form. A definition needs no restart; an extension loads only when
|
|
45
43
|
the daemon starts.
|
|
46
44
|
|
|
@@ -48,8 +46,7 @@ the daemon starts.
|
|
|
48
46
|
|
|
49
47
|
| Surface | Shape | Code in the daemon |
|
|
50
48
|
| --- | --- | --- |
|
|
51
|
-
| Application | an
|
|
52
|
-
| Agent | an A2A client of the exposure that `PLURNK_A2A_EXPOSE` mounts | none |
|
|
49
|
+
| Application | an ACP v2 client: WebSocket or Streamable HTTP JSON-RPC 2.0 at `/acp` on the daemon's listener (`PLURNK_PORT`) | none |
|
|
53
50
|
| 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
51
|
| Protocol server | a module that declares mounts and serves its routes on the daemon's listener | trusted, in the daemon |
|
|
55
52
|
|
|
@@ -68,8 +65,8 @@ An extension is one package of one kind, declared once: under `plurnk` in its
|
|
|
68
65
|
| `module` | lifecycle membership: a definition family behind the shared management verbs, a protocol server, or an event observer | `module` | `skill://plurnk/packages/@plurnk/plurnk-modules/SPEC.md` |
|
|
69
66
|
|
|
70
67
|
- 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
|
|
68
|
+
packages. A module also loads from a plugin in `$XDG_CONFIG_HOME/plurnk/plugins/`,
|
|
69
|
+
`$XDG_CONFIG_HOME/agents/plugins/`, or `~/.agents/plugins/`. A plugin in a project's `.agents/plugins/` contributes
|
|
73
70
|
its skills and MCP servers, never code, and a package written into the project
|
|
74
71
|
loads nothing until it is installed among the service's npm packages.
|
|
75
72
|
- `PLURNK_EXTENSIONS_TRUSTED_ONLY` gates loading: `@plurnk/*` packages always
|
|
@@ -81,8 +78,7 @@ An extension is one package of one kind, declared once: under `plurnk` in its
|
|
|
81
78
|
|
|
82
79
|
A module exposing read-only resource folders can use `registerResourceTreeScheme`
|
|
83
80
|
from `@plurnk/plurnk-schemes`: it supplies names and original bytes; the host owns
|
|
84
|
-
MIME handling, entry projections and ordinary selection.
|
|
85
|
-
in that package's contract. `@plurnk/plurnk-skills` is the built-in example; its
|
|
81
|
+
MIME handling, entry projections and ordinary selection (`skill://plurnk/packages/@plurnk/plurnk-schemes/SPEC.md`). `@plurnk/plurnk-skills` is the built-in example; its
|
|
86
82
|
contract is `skill://plurnk/packages/@plurnk/plurnk-skills/SPEC.md`.
|
|
87
83
|
|
|
88
84
|
## Examples
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type ManifestResult } from "./AgentPluginManifest.ts";
|
|
2
|
-
export default class AgentPluginFiles {
|
|
3
|
-
static inside(root: string, candidate: string): boolean;
|
|
4
|
-
static resolved(path: string): Promise<string | null>;
|
|
5
|
-
static contained(root: string, candidate: string): Promise<boolean>;
|
|
6
|
-
static manifest(directory: string, { signal }?: {
|
|
7
|
-
signal?: AbortSignal;
|
|
8
|
-
}): Promise<ManifestResult | null>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=AgentPluginFiles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AgentPluginFiles.d.ts","sourceRoot":"","sources":["../src/AgentPluginFiles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAGjF,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACjC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAGtD;IAED,OAAa,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQ1D;IAED,OAAa,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAMxE;IAGD,OAAa,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,GAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAO,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CA6BlH;CACJ"}
|
package/dist/AgentPluginFiles.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { lstat, readFile, realpath, stat } from "node:fs/promises";
|
|
2
|
-
import { dirname, isAbsolute, join, relative, sep } from "node:path";
|
|
3
|
-
import { validateManifest } from "./AgentPluginManifest.js";
|
|
4
|
-
// {§agent-plugins-containment} Shared by portable components and extension admission.
|
|
5
|
-
export default class AgentPluginFiles {
|
|
6
|
-
static inside(root, candidate) {
|
|
7
|
-
const path = relative(root, candidate);
|
|
8
|
-
return path !== ".." && !path.startsWith(`..${sep}`) && !isAbsolute(path);
|
|
9
|
-
}
|
|
10
|
-
static async resolved(path) {
|
|
11
|
-
try {
|
|
12
|
-
return await realpath(path);
|
|
13
|
-
}
|
|
14
|
-
catch (cause) {
|
|
15
|
-
const code = cause.code;
|
|
16
|
-
if (code === "ENOENT" || code === "ENOTDIR")
|
|
17
|
-
return null;
|
|
18
|
-
throw cause;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
static async contained(root, candidate) {
|
|
22
|
-
if (!AgentPluginFiles.inside(root, candidate))
|
|
23
|
-
return false;
|
|
24
|
-
const real = await AgentPluginFiles.resolved(candidate);
|
|
25
|
-
if (real !== null)
|
|
26
|
-
return AgentPluginFiles.inside(root, real);
|
|
27
|
-
// A missing leaf can still escape through an existing symlinked parent.
|
|
28
|
-
return candidate !== root && AgentPluginFiles.contained(root, dirname(candidate));
|
|
29
|
-
}
|
|
30
|
-
// null is absence, not an invalid manifest that permits another format to take its place.
|
|
31
|
-
static async manifest(directory, { signal } = {}) {
|
|
32
|
-
signal?.throwIfAborted();
|
|
33
|
-
const authored = join(directory, "plugin.json");
|
|
34
|
-
try {
|
|
35
|
-
await lstat(authored);
|
|
36
|
-
}
|
|
37
|
-
catch (cause) {
|
|
38
|
-
const code = cause.code;
|
|
39
|
-
if (code === "ENOENT" || code === "ENOTDIR")
|
|
40
|
-
return null;
|
|
41
|
-
throw cause;
|
|
42
|
-
}
|
|
43
|
-
const root = await AgentPluginFiles.resolved(directory);
|
|
44
|
-
if (root === null)
|
|
45
|
-
return null;
|
|
46
|
-
const location = await AgentPluginFiles.resolved(authored);
|
|
47
|
-
if (location === null) {
|
|
48
|
-
return { rejected: { section: "5.1", message: "plugin.json does not resolve to a regular file" }, ignored: [] };
|
|
49
|
-
}
|
|
50
|
-
if (!AgentPluginFiles.inside(root, location)) {
|
|
51
|
-
return { rejected: { section: "4.1", message: "plugin.json resolves outside the plugin root" }, ignored: [] };
|
|
52
|
-
}
|
|
53
|
-
if (!(await stat(location)).isFile()) {
|
|
54
|
-
return { rejected: { section: "5.1", message: "plugin.json is not a regular file" }, ignored: [] };
|
|
55
|
-
}
|
|
56
|
-
let value;
|
|
57
|
-
try {
|
|
58
|
-
value = JSON.parse(await readFile(location, { encoding: "utf8", signal }));
|
|
59
|
-
}
|
|
60
|
-
catch (cause) {
|
|
61
|
-
if (!(cause instanceof SyntaxError))
|
|
62
|
-
throw cause;
|
|
63
|
-
return { rejected: { section: "5.2", message: "plugin.json is not valid JSON" }, ignored: [] };
|
|
64
|
-
}
|
|
65
|
-
return validateManifest(value);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
//# sourceMappingURL=AgentPluginFiles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,sFAA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,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"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const AGENT_PLUGINS_VERSION = "1.0.0";
|
|
2
|
-
export declare const PLUGIN_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json";
|
|
3
|
-
export declare const MCP_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json";
|
|
4
|
-
export declare const schemaVersion: (identifier: string, kind: "plugin" | "mcp") => string | null;
|
|
5
|
-
export declare const expandPlaceholders: (value: string, { root, data }: {
|
|
6
|
-
root: string;
|
|
7
|
-
data: string;
|
|
8
|
-
}) => string;
|
|
9
|
-
export declare const isObject: (value: unknown) => value is Record<string, unknown>;
|
|
10
|
-
//# sourceMappingURL=AgentPluginFormat.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AgentPluginFormat.d.ts","sourceRoot":"","sources":["../src/AgentPluginFormat.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,qBAAqB,UAAU,CAAC;AAC7C,eAAO,MAAM,aAAa,+DAA+D,CAAC;AAC1F,eAAO,MAAM,UAAU,4DAA4D,CAAC;AAGpF,eAAO,MAAM,aAAa,eAAgB,MAAM,QAAQ,QAAQ,GAAG,KAAK,KAAG,MAAM,GAAG,IACsC,CAAC;AAG3H,eAAO,MAAM,kBAAkB,UAAW,MAAM,kBAAkB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,KAAG,MAC8B,CAAC;AAElI,eAAO,MAAM,QAAQ,UAAW,OAAO,KAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CACD,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// {§agent-plugins-manifest} Shared inert Agent Plugins format primitives.
|
|
2
|
-
export const AGENT_PLUGINS_VERSION = "1.0.0";
|
|
3
|
-
export const PLUGIN_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json";
|
|
4
|
-
export const MCP_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json";
|
|
5
|
-
// A canonical identifier names its version; any other string is not an Agent Plugins identifier.
|
|
6
|
-
export const schemaVersion = (identifier, kind) => new RegExp(`^https://agent-plugins\\.org/schemas/([^/]+)/${kind}\\.schema\\.json$`, "u").exec(identifier)?.[1] ?? null;
|
|
7
|
-
// {§agent-plugins-expansion} One textual pass: text a replacement introduces is never scanned again.
|
|
8
|
-
export const expandPlaceholders = (value, { root, data }) => value.replaceAll(/\$\{(PLUGIN_ROOT|PLUGIN_DATA)\}/gu, (_placeholder, name) => (name === "PLUGIN_ROOT" ? root : data));
|
|
9
|
-
export const isObject = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
10
|
-
//# sourceMappingURL=AgentPluginFormat.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AgentPluginFormat.js","sourceRoot":"","sources":["../src/AgentPluginFormat.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAC;AAC7C,MAAM,CAAC,MAAM,aAAa,GAAG,4DAA4D,CAAC;AAC1F,MAAM,CAAC,MAAM,UAAU,GAAG,yDAAyD,CAAC;AAEpF,iGAAiG;AACjG,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,UAAkB,EAAE,IAAsB,EAAiB,EAAE,CACvF,IAAI,MAAM,CAAC,gDAAgD,IAAI,mBAAmB,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AAE3H,qGAAqG;AACrG,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAa,EAAE,EAAE,IAAI,EAAE,IAAI,EAAkC,EAAU,EAAE,CACxG,KAAK,CAAC,UAAU,CAAC,mCAAmC,EAAE,CAAC,YAAY,EAAE,IAAY,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAElI,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAoC,EAAE,CACzE,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { PLUGIN_SCHEMA } from "./AgentPluginFormat.ts";
|
|
2
|
-
export { AGENT_PLUGINS_VERSION, MCP_SCHEMA, PLUGIN_SCHEMA, expandPlaceholders, isObject, schemaVersion } from "./AgentPluginFormat.ts";
|
|
3
|
-
export interface Finding {
|
|
4
|
-
readonly section: string;
|
|
5
|
-
readonly message: string;
|
|
6
|
-
}
|
|
7
|
-
export interface PluginAuthor {
|
|
8
|
-
readonly name?: string;
|
|
9
|
-
readonly email?: string;
|
|
10
|
-
readonly url?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface PluginManifest {
|
|
13
|
-
readonly $schema: typeof PLUGIN_SCHEMA;
|
|
14
|
-
readonly name: string;
|
|
15
|
-
readonly version?: string;
|
|
16
|
-
readonly description?: string;
|
|
17
|
-
readonly author?: PluginAuthor;
|
|
18
|
-
readonly homepage?: string;
|
|
19
|
-
readonly repository?: string;
|
|
20
|
-
readonly license?: string;
|
|
21
|
-
readonly keywords?: readonly string[];
|
|
22
|
-
readonly extensions?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
23
|
-
}
|
|
24
|
-
export type ManifestResult = {
|
|
25
|
-
readonly manifest: PluginManifest;
|
|
26
|
-
readonly ignored: readonly Finding[];
|
|
27
|
-
} | {
|
|
28
|
-
readonly rejected: Finding;
|
|
29
|
-
readonly ignored: readonly Finding[];
|
|
30
|
-
};
|
|
31
|
-
export declare const validateManifest: (value: unknown) => ManifestResult;
|
|
32
|
-
//# sourceMappingURL=AgentPluginManifest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AgentPluginManifest.d.ts","sourceRoot":"","sources":["../src/AgentPluginManifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA2B,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,aAAa,EAAE,kBAAkB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvI,MAAM,WAAW,OAAO;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACzB;AAGD,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,OAAO,EAAE,OAAO,aAAa,CAAC;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;CACrF;AAED,MAAM,MAAM,cAAc,GACpB;IAAE,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,OAAO,EAAE,CAAA;CAAE,GAC3E;IAAE,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,OAAO,EAAE,CAAA;CAAE,CAAC;AAQ3E,eAAO,MAAM,gBAAgB,UAAW,OAAO,KAAG,cAkCjD,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { PLUGIN_SCHEMA, isObject, schemaVersion } from "./AgentPluginFormat.js";
|
|
2
|
-
export { AGENT_PLUGINS_VERSION, MCP_SCHEMA, PLUGIN_SCHEMA, expandPlaceholders, isObject, schemaVersion } from "./AgentPluginFormat.js";
|
|
3
|
-
const FIELDS = new Set(["$schema", "name", "version", "description", "author", "homepage", "repository", "license", "keywords", "extensions"]);
|
|
4
|
-
const STRINGS = ["version", "description", "homepage", "repository", "license"];
|
|
5
|
-
const AUTHOR = new Set(["name", "email", "url"]);
|
|
6
|
-
const NAME = /^(?!.*(?:--|\.\.))[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/u;
|
|
7
|
-
// {§agent-plugins-manifest} Unknown fields and a non-object `extensions` are the only non-fatal violations.
|
|
8
|
-
export const validateManifest = (value) => {
|
|
9
|
-
if (!isObject(value))
|
|
10
|
-
return { rejected: { section: "5.2", message: "plugin.json must contain a top-level JSON object" }, ignored: [] };
|
|
11
|
-
const ignored = Object.keys(value).filter((key) => !FIELDS.has(key))
|
|
12
|
-
.map((key) => ({ section: "5.2", message: `unknown top-level field ${JSON.stringify(key)} is ignored` }));
|
|
13
|
-
const reject = (section, message) => ({ rejected: { section, message }, ignored });
|
|
14
|
-
const { $schema, name, author, keywords, extensions } = value;
|
|
15
|
-
if (typeof $schema !== "string")
|
|
16
|
-
return reject("5.3", "required field $schema is missing or not a string");
|
|
17
|
-
if ($schema !== PLUGIN_SCHEMA) {
|
|
18
|
-
const version = schemaVersion($schema, "plugin");
|
|
19
|
-
return reject("5.2", version === null
|
|
20
|
-
? `$schema ${JSON.stringify($schema)} is not a canonical Agent Plugins manifest identifier`
|
|
21
|
-
: `Agent Plugins ${version} is not supported; this client implements 1.0.0`);
|
|
22
|
-
}
|
|
23
|
-
if (typeof name !== "string")
|
|
24
|
-
return reject("5.3", "required field name is missing or not a string");
|
|
25
|
-
if (name.length === 0 || name.length > 64 || !NAME.test(name))
|
|
26
|
-
return reject("5.5", `name ${JSON.stringify(name)} violates the plugin name constraints`);
|
|
27
|
-
const nonString = STRINGS.find((field) => value[field] !== undefined && typeof value[field] !== "string");
|
|
28
|
-
if (nonString !== undefined)
|
|
29
|
-
return reject("5.4", `${nonString} must be a string`);
|
|
30
|
-
if (author !== undefined) {
|
|
31
|
-
if (!isObject(author))
|
|
32
|
-
return reject("5.4", "author must be an object");
|
|
33
|
-
const invalid = Object.keys(author).find((key) => !AUTHOR.has(key) || typeof author[key] !== "string");
|
|
34
|
-
if (invalid !== undefined)
|
|
35
|
-
return reject("5.4", `author may hold only string name, email, and url; found ${JSON.stringify(invalid)}`);
|
|
36
|
-
}
|
|
37
|
-
if (keywords !== undefined && !(Array.isArray(keywords) && keywords.every((keyword) => typeof keyword === "string"))) {
|
|
38
|
-
return reject("5.4", "keywords must be an array of strings");
|
|
39
|
-
}
|
|
40
|
-
if (extensions !== undefined && !isObject(extensions)) {
|
|
41
|
-
ignored.push({ section: "8.1", message: "extensions is not an object and is ignored" });
|
|
42
|
-
}
|
|
43
|
-
else if (extensions !== undefined) {
|
|
44
|
-
const member = Object.keys(extensions).find((namespace) => !isObject(extensions[namespace]));
|
|
45
|
-
if (member !== undefined)
|
|
46
|
-
return reject("8.1", `extensions member ${JSON.stringify(member)} must be an object`);
|
|
47
|
-
}
|
|
48
|
-
const manifest = Object.fromEntries(Object.entries(value)
|
|
49
|
-
.filter(([key]) => FIELDS.has(key) && !(key === "extensions" && !isObject(extensions))));
|
|
50
|
-
return { manifest: manifest, ignored };
|
|
51
|
-
};
|
|
52
|
-
//# sourceMappingURL=AgentPluginManifest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AgentPluginManifest.js","sourceRoot":"","sources":["../src/AgentPluginManifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,aAAa,EAAE,kBAAkB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AA+BvI,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC;AAC/I,MAAM,OAAO,GAAG,CAAC,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,CAAU,CAAC;AACzF,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AACjD,MAAM,IAAI,GAAG,sDAAsD,CAAC;AA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O,OAAO,KAAK,QAAQ,CAAC,CAAC,EAAE,CAAC;QACnH,OAAO,MAAM,CAAC,KAAK,EAAE,sCAAsC,CAAC,CAAC;IACjE,CAAC;IACD,IAAI,UAAU,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,4CAA4C,EAAE,CAAC,CAAC;IAC5F,CAAC;SAAM,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAClC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAC7F,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC,KAAK,EAAE,qBAAqB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IACpH,CAAC;IACD,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;SACpD,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,YAAY,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7F,OAAO,EAAE,QAAQ,EAAE,QAAqC,EAAE,OAAO,EAAE,CAAC;AACxE,CAAC,CAAC"}
|
package/docs/worker.md
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# `worker://` — workers and their entries
|
|
2
|
-
|
|
3
|
-
## Summary
|
|
4
|
-
|
|
5
|
-
Coordinate workers (WORK, FORK), request isolated BARE inference, and manage workspace entries.
|
|
6
|
-
|
|
7
|
-
Workers inhabit one workspace. The authority selects a worker; a path selects
|
|
8
|
-
an entry rather than controlling that worker.
|
|
9
|
-
|
|
10
|
-
| Address | Meaning | Model access |
|
|
11
|
-
| --- | --- | --- |
|
|
12
|
-
| `worker://exampleWorkerName` | Named worker | WORK/FORK create; SEND messages; READ collects; KILL terminates. |
|
|
13
|
-
| `message://exampleWorkerName/ab3d5678` | Retained message | READ/FIND/COPY inspect; SEND replies. Neither EDIT nor KILL changes its source. |
|
|
14
|
-
| `ops://exampleWorkerName/1` | What that loop said, or how it ended | READ/FIND/COPY inspect; source is immutable. |
|
|
15
|
-
| `worker://exampleWorkerName/example.md` | Named scratch entry | Read and write from any worker in the workspace. |
|
|
16
|
-
| `worker:///example.md` | Shared commons entry | Read and write. |
|
|
17
|
-
|
|
18
|
-
The packet's `## Worker` block, below the log, names your worker, its parent
|
|
19
|
-
(`null` at a root), and the loop and turn you are producing. Addresses are
|
|
20
|
-
literal and keep the same meaning when passed to another worker. Scratch
|
|
21
|
-
belongs to the workspace; a namespace does not require a namesake worker.
|
|
22
|
-
Generated references live under `worker:///_plurnk/`, and reference refreshes
|
|
23
|
-
may replace them. EDIT creates or changes an entry, never a worker; KILL with
|
|
24
|
-
an entry path deletes that entry, not its worker. A control address is scheme
|
|
25
|
-
and authority only: no trailing slash, userinfo, port, query, or fragment.
|
|
26
|
-
Messages and loop outcomes have their own addresses; neither is a scratch
|
|
27
|
-
entry or an actor control.
|
|
28
|
-
|
|
29
|
-
An entry whose source has a readable projection (HTML, a notebook) carries it
|
|
30
|
-
beside the source as `#readable`, text/markdown, in its own line coordinates;
|
|
31
|
-
the default channel stays the source, and a pattern matches the channel it
|
|
32
|
-
addresses. The projection follows every source write and is never written
|
|
33
|
-
itself.
|
|
34
|
-
|
|
35
|
-
A READ of an image, PDF or audio source retains its bytes: on a route whose
|
|
36
|
-
model takes that media, every later packet carries them as a native part
|
|
37
|
-
captioned with the READ's log coordinate, until you KILL that READ row. The
|
|
38
|
-
service never re-sends media; a captioned part is your own earlier READ, not a
|
|
39
|
-
new arrival.
|
|
40
|
-
|
|
41
|
-
## Delegation
|
|
42
|
-
|
|
43
|
-
[Delegation and messages](worker:///_plurnk/plurnk/delegation.md) covers worker
|
|
44
|
-
creation, child observations, waiting, completion, and reply routing.
|
|
45
|
-
|
|
46
|
-
## BARE inference
|
|
47
|
-
|
|
48
|
-
BARE makes one isolated call to the model, not a persistent worker. Nothing
|
|
49
|
-
reaches it but the fence body: no log, no files, no web, no tools, no memory of
|
|
50
|
-
this loop. It answers from the body and the model's own knowledge alone, so it
|
|
51
|
-
cannot look anything up, and what it does not know it will guess. Use it to
|
|
52
|
-
isolate a sub-problem whose complete inputs fit in the body — a long text to
|
|
53
|
-
judge, a tangle to reason through without the log in view — never to search,
|
|
54
|
-
recall, or fetch.
|
|
55
|
-
|
|
56
|
-
```BARE
|
|
57
|
-
A self-contained prompt, with everything it needs pasted in.
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
The prompt is not truncated to fit; provider capacity still applies.
|
|
61
|
-
Consecutive BARE calls run concurrently and settle before the turn continues.
|
|
62
|
-
Their answers are ordinary BARE receipts, visible in the next packet.
|
|
63
|
-
|
|
64
|
-
## Turn sources
|
|
65
|
-
|
|
66
|
-
| Address | Read-only source in the named worker's history |
|
|
67
|
-
| --- | --- |
|
|
68
|
-
| `ops://<worker>/<loop>/<turn>` | The exact submitted program, including interstitial text. |
|
|
69
|
-
| `reasoning://<worker>/<loop>/<turn>` | Original provider reasoning when exposed, or a harness turn's authored rationale. |
|
|
70
|
-
| `note://<worker>/<loop>/<turn>/<item>` | The literal NOTE body, from the program or exposed reasoning; the receipt gives its address. |
|
|
71
|
-
|
|
72
|
-
The worker name is required. Any worker in the workspace can READ these
|
|
73
|
-
sources; `log:///` remains your own context. READ brings the selected source
|
|
74
|
-
into your log, and KILL of that READ curates only its log projection, never the
|
|
75
|
-
original evidence. The current turn's reasoning exists when its OPs execute, so
|
|
76
|
-
`READ (reasoning://exampleWorkerName/1/3) <1,-1>` from `worker://exampleWorkerName` on loop 1,
|
|
77
|
-
turn 3 retains it; a turn that produced no reasoning reads empty, and a turn
|
|
78
|
-
that has not happened returns a missing-source result. READ never requests
|
|
79
|
-
inference. Notes are ordinary log items whose read-only sources stay searchable
|
|
80
|
-
(`FIND (note://exampleWorkerName/**) /parser/`) and READable after curation or a FORK.
|