G A-92: the node-engine's seat definition gains the state bounds, key <what>.<id>, in its old section

Builds: design 47 G §560, §557, §627, A-77, A-92

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
2026-11-11 23:44:36 +01:00
parent 3658ceb1b6
commit 2ae0c67930
6 changed files with 126 additions and 0 deletions
+16
View File
@@ -74,6 +74,7 @@ export declare const states: {
readonly packages: "packages";
readonly health: "health";
readonly findings: "findings";
readonly bounds: "bounds";
};
/** The key of one value of the state have under the form "<node>.<module>". */
@@ -124,6 +125,12 @@ export declare function findingsByKeyKey(key: string): string;
/** The parts of a key of the form "<key>", or undefined for a key of another form. */
export declare function parseFindingsByKeyKey(_key: string): { key: string } | undefined;
/** The key of one value of the state bounds under the form "<what>.<id>". */
export declare function boundsByWhatIDKey(what: string, id: string): string;
/** The parts of a key of the form "<what>.<id>", or undefined for a key of another form. */
export declare function parseBoundsByWhatIDKey(_key: string): { what: string; id: string } | undefined;
/** the hashes of the users of the list, sealed to the vault */
export interface AccountsHanded {
/** when */
@@ -1297,3 +1304,12 @@ export interface FindingsByKeyValue {
"v": number;
}
/** is one value of the state bounds under the key <what>.<id>. */
export interface BoundsByWhatIDValue {
"module"?: string;
/** when the wait began, RFC 3339 */
"since": string;
/** layout version, 1 */
"v": number;
}
+20
View File
@@ -90,6 +90,7 @@ export const states = {
packages: "packages",
health: "health",
findings: "findings",
bounds: "bounds",
};
/** The key of one value of the state have under the form "<node>.<module>". */
@@ -230,3 +231,22 @@ export function parseFindingsByKeyKey(_key) {
return { key };
}
/** The key of one value of the state bounds under the form "<what>.<id>". */
export function boundsByWhatIDKey(what, id) {
return what + "." + id;
}
/** The parts of a key of the form "<what>.<id>", or undefined for a key of another form. */
export function parseBoundsByWhatIDKey(_key) {
let _rest = _key;
const _at0 = _rest.indexOf(".");
if (_at0 <= 0) return undefined;
const what = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 1);
if (_rest === "") return undefined;
const id = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { what, id };
}