@plurnk/plurnk-execs 0.4.8 → 0.4.9
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/dist/BaseExecutor.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import type { SchemeHandler, SchemeManifest } from "@plurnk/plurnk-schemes";
|
|
1
2
|
import type { ChannelDecl, Effect, ExecArgs, ExecResult, ExecutorMetadata, RuntimeAvailability } from "./types.ts";
|
|
2
|
-
export default abstract class BaseExecutor {
|
|
3
|
+
export default abstract class BaseExecutor implements SchemeHandler {
|
|
3
4
|
readonly runtime: string;
|
|
4
5
|
readonly glyph: string;
|
|
5
6
|
constructor({ runtime, glyph }: ExecutorMetadata);
|
|
7
|
+
get manifest(): SchemeManifest;
|
|
8
|
+
get defaultChannel(): string;
|
|
6
9
|
abstract get channels(): Readonly<Record<string, ChannelDecl>>;
|
|
7
10
|
abstract run(args: ExecArgs): Promise<ExecResult>;
|
|
8
11
|
probe(): Promise<RuntimeAvailability>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseExecutor.d.ts","sourceRoot":"","sources":["../src/BaseExecutor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseExecutor.d.ts","sourceRoot":"","sources":["../src/BaseExecutor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAWnH,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,YAAa,YAAW,aAAa;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;gBAEX,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,gBAAgB;IAahD,IAAI,QAAQ,IAAI,cAAc,CAS7B;IAID,IAAI,cAAc,IAAI,MAAM,CAE3B;IAOD,QAAQ,KAAK,QAAQ,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IAO/D,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAY3C,KAAK,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAW3C,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM;CAGzC"}
|
package/dist/BaseExecutor.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OutputScheme } from "@plurnk/plurnk-schemes";
|
|
1
2
|
// Base class for runtime executors (parallel to plurnk-mimetypes' BaseHandler).
|
|
2
3
|
// A `@plurnk/plurnk-execs-*` sibling subclasses this and implements `run()`.
|
|
3
4
|
// The framework instantiates one executor per matched runtime tag, injecting
|
|
@@ -14,6 +15,27 @@ export default class BaseExecutor {
|
|
|
14
15
|
this.runtime = runtime;
|
|
15
16
|
this.glyph = glyph;
|
|
16
17
|
}
|
|
18
|
+
// --- executor-is-a-scheme face (schemes#20 / service#240) ---------------
|
|
19
|
+
// The executor's output is addressed at `<tag>://<coord>` and READ back. Its
|
|
20
|
+
// scheme manifest is DERIVED from the runtime declaration — no separate
|
|
21
|
+
// authoring — via schemes' `manifestFromRuntime`. The default READ over that
|
|
22
|
+
// output (slice/match) is the consumer's: `DefaultRead` is a pure resolver
|
|
23
|
+
// needing a Mimetypes instance the executor isn't handed, and the consumer
|
|
24
|
+
// holds the output store. Rich executors (MCP, sqlite) override `read`/`find`
|
|
25
|
+
// on the SchemeHandler face for custom semantics over their own output.
|
|
26
|
+
get manifest() {
|
|
27
|
+
return OutputScheme.manifestFromRuntime({
|
|
28
|
+
name: this.runtime,
|
|
29
|
+
glyph: this.glyph,
|
|
30
|
+
channels: Object.fromEntries(Object.entries(this.channels).map(([name, decl]) => [name, decl.mimetype])),
|
|
31
|
+
defaultChannel: this.defaultChannel,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
// The channel a bare `READ <tag>://<coord>` resolves to. Defaults to the
|
|
35
|
+
// first declared channel; subprocess runtimes override to `stdout`.
|
|
36
|
+
get defaultChannel() {
|
|
37
|
+
return Object.keys(this.channels)[0] ?? "";
|
|
38
|
+
}
|
|
17
39
|
// Whether this runtime's execution environment is usable in the current
|
|
18
40
|
// deployment. Default: available (pure / in-process runtimes — e.g. node,
|
|
19
41
|
// sqlite, where the daemon itself satisfies the dependency). Subclasses
|
package/dist/BaseExecutor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseExecutor.js","sourceRoot":"","sources":["../src/BaseExecutor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseExecutor.js","sourceRoot":"","sources":["../src/BaseExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAItD,gFAAgF;AAChF,6EAA6E;AAC7E,6EAA6E;AAC7E,yEAAyE;AACzE,EAAE;AACF,2EAA2E;AAC3E,6EAA6E;AAC7E,2EAA2E;AAC3E,mDAAmD;AACnD,MAAM,CAAC,OAAO,OAAgB,YAAY;IAC7B,OAAO,CAAS;IAChB,KAAK,CAAS;IAEvB,YAAY,EAAE,OAAO,EAAE,KAAK,EAAoB;QAC5C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,2EAA2E;IAC3E,6EAA6E;IAC7E,wEAAwE;IACxE,6EAA6E;IAC7E,2EAA2E;IAC3E,2EAA2E;IAC3E,8EAA8E;IAC9E,wEAAwE;IACxE,IAAI,QAAQ;QACR,OAAO,YAAY,CAAC,mBAAmB,CAAC;YACpC,IAAI,EAAE,IAAI,CAAC,OAAO;YAClB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,QAAQ,EAAE,MAAM,CAAC,WAAW,CACxB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAC7E;YACD,cAAc,EAAE,IAAI,CAAC,cAAc;SACtC,CAAC,CAAC;IACP,CAAC;IAED,yEAAyE;IACzE,oEAAoE;IACpE,IAAI,cAAc;QACd,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/C,CAAC;IAgBD,wEAAwE;IACxE,0EAA0E;IAC1E,wEAAwE;IACxE,iEAAiE;IACjE,EAAE;IACF,0EAA0E;IAC1E,yEAAyE;IACzE,2EAA2E;IAC3E,yEAAyE;IACzE,4DAA4D;IAC5D,KAAK,CAAC,KAAK;QACP,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IAC/B,CAAC;IAED,uEAAuE;IACvE,2EAA2E;IAC3E,0EAA0E;IAC1E,yEAAyE;IACzE,qEAAqE;IACrE,4EAA4E;IAC5E,iEAAiE;IACjE,MAAM,CAAC,OAAsB;QACzB,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurnk/plurnk-execs",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.9",
|
|
4
4
|
"description": "Framework + contract for the @plurnk/plurnk-execs-* runtime executor family.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plurnk",
|
|
@@ -47,6 +47,10 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/node": "^25.8.0",
|
|
50
|
-
"typescript": "^6.0.3"
|
|
50
|
+
"typescript": "^6.0.3",
|
|
51
|
+
"@plurnk/plurnk-schemes": "^0.18.0"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@plurnk/plurnk-schemes": "^0.18.0"
|
|
51
55
|
}
|
|
52
56
|
}
|