stdio (TypeScript): a stopping tool runner's fault reaches the bundle as such and is asked again (H-A-544)

As in the Go stdio: the runtime's answer names its typed fault in the error's data
error-kind, kept on the error as errorKind (isStopping); a broker request (mesh/ask)
met by stopping is asked again after a pause at the kept-call pace (the settings
kept-call-pace-first and -max, 1 s doubling to 30 s by default) until the new
runner answers or 60 s end, then the fault is the caller's. A plain refusal is
never asked again; a TypeScript bundle (the forge, the registries' holder) meets a
restarting runner as a Go one does.

Builds: design 47 H2 H-A-542, H-A-544
This commit is contained in:
2026-11-23 11:51:56 +01:00
parent 78a0c4d154
commit 6459dee6aa
3 changed files with 125 additions and 3 deletions
+16
View File
@@ -0,0 +1,16 @@
// A launched bundle whose one tool asks a seat's verb through the runtime, and says how the ask ended: its answer, or
// whether its fault was the typed fault stopping (design 47 H2 H-A-542, H-A-544).
import { broker } from "../../dist/messaging/index.js";
import { registerModuleTools } from "../../dist/tools/index.js";
import { serveRegisteredOverStdio, isStopping } from "../../dist/stdio/index.js";
registerModuleTools("builder", () => [
{ name: "publish", description: "asks the registry", input: {}, run: async () => {
try {
return { answer: await broker().request("seat:go-package-registry.publish", {}) };
} catch (err) {
return { stopping: isStopping(err), words: err.message };
}
} },
]);
await serveRegisteredOverStdio();