@plurnk/plurnk-execs 0.4.41 → 0.4.43
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 +11 -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 +1 -1
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 runtimes are active"** — 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 line states a factual **state** (`… are active`), never a permission — `permitted`/`forbidden`/`disabled` reads as a behavioral prohibition a confused model over-applies, and also leaks a cause the line must stay agnostic to. The exact wording is validated by the consumer's ask-mode probe, not asserted here.
|
|
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 runtimes are active";
|
|
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;AAGzD,MAAM,CAAC,OAAO,OAAO,SAAS;IAG1B,MAAM,CAAC,QAAQ,CAAC,eAAe,iCAAiC;IAEhE,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,11 @@
|
|
|
1
|
+
// The EXEC family's per-loop capability contribution (SPEC §3.4, execs#24).
|
|
2
|
+
export default class Advertise {
|
|
3
|
+
// A factual state, not a permission verb — "permitted"/"forbidden" reads as a
|
|
4
|
+
// behavioral prohibition the model over-applies (SPEC §3.4).
|
|
5
|
+
static NO_EXECS_NOTICE = "No EXEC runtimes are active";
|
|
6
|
+
static contribute(registry, isPermitted) {
|
|
7
|
+
const permitted = [...registry.values()].filter(({ runtime }) => isPermitted(runtime));
|
|
8
|
+
return { permitted, notice: permitted.length === 0 ? Advertise.NO_EXECS_NOTICE : null };
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=advertise.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advertise.js","sourceRoot":"","sources":["../src/advertise.ts"],"names":[],"mappings":"AAEA,4EAA4E;AAC5E,MAAM,CAAC,OAAO,OAAO,SAAS;IAC1B,8EAA8E;IAC9E,6DAA6D;IAC7D,MAAM,CAAU,eAAe,GAAG,6BAA6B,CAAC;IAEhE,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;A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