Files
mesh-delivery/modules/mesh-delivery-contracts/ts/seats/git/index.js
T
jschoubben 71a35a6376 MV1: move contracts and sdk under modules/, importers follow
The delivery repository's contracts and SDK live under modules/ as
mesh-delivery-contracts and mesh-delivery-sdk, their Go module paths
renamed to match the folders (the TypeScript names already did), and
every importer in mesh-delivery, mesh-catalog, mesh-host, mesh-tools
and mesh-sdk follows in the same group: a design as it should be, one
path per module, checked by the group's check building every importer.

Builds: design 47 G §427, §88

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 05:09:56 +01:00

82 lines
2.6 KiB
JavaScript

// Code generated by seatgen from the seat definitions; DO NOT EDIT.
// The contract of the seat "git", defined whole (seats/git/seat.json): The forge: every read and act a delivery part makes of the mesh's git repositories, and what the forge says happened (design 47 *The seat git*, ADR 0596 §1, §2). A failed read answers an error, never an empty answer. The act verbs are the forge bridge's alone.
export const seat = "git";
export const verbs = {
pull: "pull",
branch: "branch",
openPulls: "open-pulls",
tags: "tags",
trees: "trees",
file: "file",
contains: "contains",
statuses: "statuses",
status: "status",
comment: "comment",
view: "view",
note: "note",
mergePull: "merge-pull",
tag: "tag",
};
export const events = {
pullUpdated: "pull-updated",
pullMerged: "pull-merged",
pullClosed: "pull-closed",
forgePull: "forge-pull",
forgeStatus: "forge-status",
forgeDelete: "forge-delete",
repoWritable: "repo-writable",
branchMoved: "branch-moved",
};
export const family = { name: "git.events", maxAgeDays: 7 };
export const pullUpdatedSubject = "mesh.seat.git.event.pull-updated";
export const pullMergedSubject = "mesh.seat.git.event.pull-merged";
export const pullClosedSubject = "mesh.seat.git.event.pull-closed";
export const forgePullSubject = "mesh.seat.git.event.forge-pull";
export const forgeStatusSubject = "mesh.seat.git.event.forge-status";
export const forgeDeleteSubject = "mesh.seat.git.event.forge-delete";
export const repoWritableSubject = "mesh.seat.git.event.repo-writable";
export const branchMovedStream = "SEAT_git_branch-moved";
export const branchMovedSubject = "mesh.seat.git.event.branch-moved";
export const states = {
failedSteps: "failed-steps",
};
/** The key of one value of the state failed-steps under the form "<module>.<fingerprint>.<step>". */
export function failedStepsByModuleFingerprintStepKey(module, fingerprint, step) {
return module + "." + fingerprint + "." + step;
}
/** The parts of a key of the form "<module>.<fingerprint>.<step>", or undefined for a key of another form. */
export function parseFailedStepsByModuleFingerprintStepKey(_key) {
let _rest = _key;
const _at0 = _rest.indexOf(".");
if (_at0 <= 0) return undefined;
const module = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 1);
const _at2 = _rest.indexOf(".");
if (_at2 <= 0) return undefined;
const fingerprint = _rest.slice(0, _at2);
_rest = _rest.slice(_at2 + 1);
if (_rest === "") return undefined;
const step = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { module, fingerprint, step };
}