The four share files (index.ts, module.json, guard.test.ts), so they land as one commit. GIT1: seat.ts serves pull, open-pulls, tags, trees, file, contains, statuses, status, comment, view, note, merge-pull as tools on the seat, each answering the contract's shape and an error of kind refused, not-found or failed; a comment, view or note whose act id is held is answered held (note matched by id). merge-pull merges the head the caller names (its from-G judgements are GIT6, GIT7, GIT9). GIT2: seatevents.ts says pull-updated, pull-merged, pull-closed, forge-pull, forge-status, forge-delete and repo-writable on mesh.seat.git.event.<event>; the module's emits drop them. GIT3: merge.ts, check.ts, the acting tools, the owed watch, the gate's source read and check-gates-merge are gone. GIT10: catalog.ts follows the seat mesh-catalog (revision, catalog-revision); no write is granted before the first view. Builds: design 47 G §310, §311, §312, §313, §314, §163, §317, §278, §321, §196 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
24 lines
1.7 KiB
TypeScript
24 lines
1.7 KiB
TypeScript
// The states this module keeps on the bus and whether other modules may read them (novox/hq ADR 0495 clause 2; issue
|
|
// 1790): the module says it itself, from its code, as it starts (index.ts calls keeps with this list), and a reader is
|
|
// granted what it said (clause 3). A state is readable when another module's manifest reads it: mesh-provisioner reads
|
|
// `bound` (the forge accounts it binds), the condition keeper (mesh-conditions) reads `findings`. test/kept.test.ts holds the list to the manifest's `state`, and the catalogue's
|
|
// checks/readable every state another manifest reads to a readable announcement.
|
|
export const KEPT: readonly { readonly name: string; readonly readable?: boolean }[] = [
|
|
{ name: "announced" },
|
|
{ name: "bound", readable: true },
|
|
{ name: "findings", readable: true },
|
|
{ name: "first-views" },
|
|
];
|
|
|
|
/** The announcement of these states, in the layout mesh-sdk's go/announce reads (novox/hq ADR 0495 clause 2): version 1,
|
|
* the module, the machine when known, and the states sorted by name, `readable` only where true. It is said as the event
|
|
* `states`, which is the subject mesh.mod.gitea.event.states. gitea says it with the SDK's `emit` because the
|
|
* toolchain's SDK, which judges R4e's group, predates the SDK's `keeps` (0.1.15); switch to `keeps` once the toolchain's
|
|
* SDK is 0.1.15 or later (issue 1852). */
|
|
export function statesAnnouncement(module: string, node: string | undefined) {
|
|
const states = [...KEPT]
|
|
.sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0))
|
|
.map((k) => (k.readable ? { name: k.name, readable: true } : { name: k.name }));
|
|
return { v: 1, module, ...(node ? { node } : {}), states };
|
|
}
|