process.Conn.Keeps, stdio.Keeps and the TypeScript keeps publish the announcement on the module's own subject; afterwards a state the code did not announce is refused at the call, so announcement and code cannot drift. The package goes to 0.1.15 for keeps.
12 lines
670 B
JavaScript
12 lines
670 B
JavaScript
// A launched bundle that says what it keeps (novox/hq ADR 0495 clause 2; issue 1790): it announces its states as it is
|
|
// imported, and a state of its own it did not announce is refused at the call.
|
|
import { keeps, state } from "../../dist/state/index.js";
|
|
import { registerModuleTools } from "../../dist/tools/index.js";
|
|
import { serveRegisteredOverStdio } from "../../dist/stdio/index.js";
|
|
|
|
await keeps([{ name: "servers", readable: true }, { name: "own" }]);
|
|
registerModuleTools("keeper", () => [
|
|
{ name: "unannounced", description: "reads a state it did not announce", input: {}, run: async () => state("drafts").get("k") },
|
|
]);
|
|
await serveRegisteredOverStdio();
|