@plurnk/plurnk-execs 0.4.40 → 0.4.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SPEC.md +10 -0
- package/dist/advertise.d.ts +9 -0
- package/dist/advertise.d.ts.map +1 -0
- package/dist/advertise.js +30 -0
- package/dist/advertise.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/SPEC.md
CHANGED
|
@@ -216,6 +216,16 @@ The two compose within a layer (an allowlisted tag can still be individually kil
|
|
|
216
216
|
|
|
217
217
|
Framework surface: **`Policy.isEnabled(tag, env?)`** (one layer, defaults to `process.env`) and **`Policy.enabledAcross(tag, layers)`** (the intersection). To disable all standard execs except search: `PLURNK_EXECS_ONLY=search`.
|
|
218
218
|
|
|
219
|
+
### §3.4 The empty-set notice (the legible no)
|
|
220
|
+
|
|
221
|
+
When a loop leaves **zero** EXEC runtimes in the §3.2 *Active* bucket, the capability sheet must carry a positive statement — **"No EXEC operations permitted"** — not silent absence. The grammar still teaches `EXEC` as a valid op (the GBNF permits it); with no availability signal either way, the model reads the bare op mention as *unknown* and confabulates runtimes, burning its strikes on a gate that correctly refuses them (execs#24). The negative line closes that window: a legible *no* where silence invited a guess.
|
|
222
|
+
|
|
223
|
+
**One contributor, both cases.** `Advertise.contribute(registry, isPermitted)` returns the permitted runtimes **and** the notice from the *same* filter — a non-empty result never carries a notice, so the N-runtime sheet and the 0-runtime line cannot drift out of sync.
|
|
224
|
+
|
|
225
|
+
**Cause-agnostic.** `isPermitted` resolves whether a registered tag survives *this* loop's gates: execs supplies the §3.3 policy cascade as the baseline predicate, and the consumer composes stricter gates into it — the effect-typed **host bar** by which a loop mode (ask-mode) bars host-effecting ops. But *why* the set is empty — policy zeroing every tag, or the host bar catching them all — is never execs' business. Execs owns the §2.3 `effect()` classification and the count; the consumer owns the loop-mode decision and reduces it to the effect-typed bar it composes into the predicate. Nothing about the mode reaches execs. The word is **"permitted,"** not "disabled": one word must not imply one cause.
|
|
226
|
+
|
|
227
|
+
Execs owns the notice content and the tally. It does **not** own the mode, the sheet's rendering, or the decision of when a loop bars host effects — only the single line spoken when its own count of surviving runtimes reaches zero.
|
|
228
|
+
|
|
219
229
|
## §4 Subprocess helper (legacy path)
|
|
220
230
|
|
|
221
231
|
`resolveRuntime(runtime, command) → SpawnArgs` and `isKnownRuntime(runtime)` / `KNOWN_RUNTIMES` translate a subprocess runtime tag into `node:child_process.spawn` arguments:
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ExecInfo, ExecRegistry } from "./types.ts";
|
|
2
|
+
export default class Advertise {
|
|
3
|
+
static readonly NO_EXECS_NOTICE = "No EXEC operations permitted";
|
|
4
|
+
static contribute(registry: ExecRegistry, isPermitted: (tag: string) => boolean): {
|
|
5
|
+
permitted: ExecInfo[];
|
|
6
|
+
notice: string | null;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=advertise.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advertise.d.ts","sourceRoot":"","sources":["../src/advertise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAqBzD,MAAM,CAAC,OAAO,OAAO,SAAS;IAI1B,MAAM,CAAC,QAAQ,CAAC,eAAe,kCAAkC;IAEjE,MAAM,CAAC,UAAU,CACb,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,GACtC;QAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAGlD;CACJ"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// The EXEC family's capability contribution to the consumer's `# Plurnk System
|
|
2
|
+
// Tools` sheet for ONE loop (SPEC §3.4). Its whole job is the legible no: when
|
|
3
|
+
// a loop leaves ZERO EXEC runtimes Active (§3.2), the sheet must carry a
|
|
4
|
+
// positive statement rather than silent absence — the grammar still teaches
|
|
5
|
+
// `EXEC` as a valid op, so a bare op mention with no availability signal reads
|
|
6
|
+
// as *unknown*, and the model confabulates runtimes that the gate then refuses
|
|
7
|
+
// (execs#24). The negative line closes that window.
|
|
8
|
+
//
|
|
9
|
+
// One contributor, both cases. `permitted` and the `notice` fall out of the
|
|
10
|
+
// SAME filter, so the N-runtime sheet and the 0-runtime line cannot drift: a
|
|
11
|
+
// non-empty result never carries a notice.
|
|
12
|
+
//
|
|
13
|
+
// Cause-agnostic by contract. `isPermitted` resolves whether a registered tag
|
|
14
|
+
// survives THIS loop's gates — execs supplies the §3.3 policy cascade as the
|
|
15
|
+
// baseline, and the consumer composes stricter gates into it (the effect-typed
|
|
16
|
+
// host bar of ask-mode, execs#24). WHY the set is empty is never execs'
|
|
17
|
+
// business: execs owns the §2.3 `effect()` classification and this tally; the
|
|
18
|
+
// consumer owns the loop-mode decision. Execs counts survivors and speaks the
|
|
19
|
+
// count — nothing about the mode reaches this module.
|
|
20
|
+
export default class Advertise {
|
|
21
|
+
// The single family-level line spoken when zero EXEC runtimes survive.
|
|
22
|
+
// "permitted", not "disabled": true whether §3.3 policy zeroed every tag or
|
|
23
|
+
// an effect-typed host bar caught them all — one word must not imply one cause.
|
|
24
|
+
static NO_EXECS_NOTICE = "No EXEC operations permitted";
|
|
25
|
+
static contribute(registry, isPermitted) {
|
|
26
|
+
const permitted = [...registry.values()].filter(({ runtime }) => isPermitted(runtime));
|
|
27
|
+
return { permitted, notice: permitted.length === 0 ? Advertise.NO_EXECS_NOTICE : null };
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=advertise.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advertise.js","sourceRoot":"","sources":["../src/advertise.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,+EAA+E;AAC/E,yEAAyE;AACzE,4EAA4E;AAC5E,+EAA+E;AAC/E,+EAA+E;AAC/E,oDAAoD;AACpD,EAAE;AACF,4EAA4E;AAC5E,6EAA6E;AAC7E,2CAA2C;AAC3C,EAAE;AACF,8EAA8E;AAC9E,6EAA6E;AAC7E,+EAA+E;AAC/E,wEAAwE;AACxE,8EAA8E;AAC9E,8EAA8E;AAC9E,sDAAsD;AACtD,MAAM,CAAC,OAAO,OAAO,SAAS;IAC1B,uEAAuE;IACvE,4EAA4E;IAC5E,gFAAgF;IAChF,MAAM,CAAU,eAAe,GAAG,8BAA8B,CAAC;IAEjE,MAAM,CAAC,UAAU,CACb,QAAsB,EACtB,WAAqC;QAErC,MAAM,SAAS,GAAG,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;QACvF,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC5F,CAAC;CACJ"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { default as BaseExecutor } from "./BaseExecutor.ts";
|
|
|
4
4
|
export { default as SubprocessExecutor } from "./SubprocessExecutor.ts";
|
|
5
5
|
export declare const discover: typeof Discover.scan;
|
|
6
6
|
export { default as Policy } from "./policy.ts";
|
|
7
|
+
export { default as Advertise } from "./advertise.ts";
|
|
7
8
|
export declare const KNOWN_RUNTIMES: ReadonlySet<string>;
|
|
8
9
|
export declare const isKnownRuntime: typeof Runtime.isKnown;
|
|
9
10
|
export declare const resolveRuntime: typeof Runtime.resolve;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,OAAO,MAAM,cAAc,CAAC;AAGnC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAKxE,eAAO,MAAM,QAAQ,sBAAgB,CAAC;AAMtC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,OAAO,MAAM,cAAc,CAAC;AAGnC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAKxE,eAAO,MAAM,QAAQ,sBAAgB,CAAC;AAMtC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAMhD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAKtD,eAAO,MAAM,cAAc,qBAAgB,CAAC;AAC5C,eAAO,MAAM,cAAc,wBAAkB,CAAC;AAC9C,eAAO,MAAM,cAAc,wBAAkB,CAAC;AAG9C,YAAY,EACR,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,MAAM,EACN,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,eAAe,EACf,SAAS,EACT,eAAe,GAClB,MAAM,YAAY,CAAC;AAGpB,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -12,6 +12,11 @@ export const discover = Discover.scan;
|
|
|
12
12
|
// client layer — Policy.enabledAcross(tag, [serviceEnv, clientLayer]) — so the
|
|
13
13
|
// cascade is byte-identical at both tiers.
|
|
14
14
|
export { default as Policy } from "./policy.js";
|
|
15
|
+
// The EXEC family's per-loop capability contribution (SPEC §3.4). Turns a zero
|
|
16
|
+
// count of permitted runtimes into a single legible "No EXEC operations
|
|
17
|
+
// permitted" line instead of silent absence, which the model reads as unknown
|
|
18
|
+
// availability and fills by confabulating runtimes (execs#24).
|
|
19
|
+
export { default as Advertise } from "./advertise.js";
|
|
15
20
|
// Runtime-tag → spawn-args helper (subprocess family; legacy scheme path,
|
|
16
21
|
// SPEC §4). Same shape: behavior on the `Runtime` class, the documented
|
|
17
22
|
// function/constant names re-exported over its statics.
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,oBAAoB;AACpB,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAExE,uEAAuE;AACvE,8EAA8E;AAC9E,4DAA4D;AAC5D,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC;AAEtC,4EAA4E;AAC5E,6EAA6E;AAC7E,+EAA+E;AAC/E,2CAA2C;AAC3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAEhD,0EAA0E;AAC1E,wEAAwE;AACxE,wDAAwD;AACxD,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC;AAC5C,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;AAC9C,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,oBAAoB;AACpB,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAExE,uEAAuE;AACvE,8EAA8E;AAC9E,4DAA4D;AAC5D,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC;AAEtC,4EAA4E;AAC5E,6EAA6E;AAC7E,+EAA+E;AAC/E,2CAA2C;AAC3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAEhD,+EAA+E;AAC/E,wEAAwE;AACxE,8EAA8E;AAC9E,+DAA+D;AAC/D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEtD,0EAA0E;AAC1E,wEAAwE;AACxE,wDAAwD;AACxD,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC;AAC5C,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;AAC9C,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurnk/plurnk-execs",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.42",
|
|
4
4
|
"description": "Framework + contract for the @plurnk/plurnk-execs-* runtime executor family.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plurnk",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"prepare": "npm run build"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@plurnk/plurnk-schemes": "0.33.
|
|
49
|
+
"@plurnk/plurnk-schemes": "0.33.19"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^26.0.1",
|