// Code generated by seatgen from the seat definitions; DO NOT EDIT. // The contract of the seat "mesh-module-assigner", defined whole (seats/mesh-module-assigner/seat.json): The seat that places modules on nodes (ADR 0567): the state of assignments and the proposals that change it. export declare const seat: "mesh-module-assigner"; export declare const verbs: { readonly assignments: "assignments"; readonly proposals: "proposals"; readonly propose: "propose"; readonly withdraw: "withdraw"; readonly again: "again"; readonly placement: "placement"; }; export declare const events: { readonly assignmentsProposed: "assignments-proposed"; readonly assignmentsWithdrawn: "assignments-withdrawn"; readonly assignmentsJudged: "assignments-judged"; readonly assignmentsChanged: "assignments-changed"; }; export declare const family: { readonly name: "mesh-module-assigner.events"; readonly maxAgeDays: 7 }; export declare const assignmentsProposedSubject: "mesh.seat.mesh-module-assigner.event.assignments-proposed"; export declare const assignmentsWithdrawnSubject: "mesh.seat.mesh-module-assigner.event.assignments-withdrawn"; export declare const assignmentsJudgedSubject: "mesh.seat.mesh-module-assigner.event.assignments-judged"; export declare const assignmentsChangedSubject: "mesh.seat.mesh-module-assigner.event.assignments-changed"; export declare const states: { readonly assignments: "assignments"; readonly proposals: "proposals"; readonly candidates: "candidates"; readonly pulses: "pulses"; readonly seatHolders: "seat-holders"; }; /** The key of one value of the state assignments under the form ".node". */ export declare function assignmentsByNodeNodeKey(node: string): string; /** The parts of a key of the form ".node", or undefined for a key of another form. */ export declare function parseAssignmentsByNodeNodeKey(_key: string): { node: string } | undefined; /** The key of one value of the state assignments under the form ".". */ export declare function assignmentsByNodeModuleKey(node: string, module: string): string; /** The parts of a key of the form ".", or undefined for a key of another form. */ export declare function parseAssignmentsByNodeModuleKey(_key: string): { node: string; module: string } | undefined; /** The key of one value of the state proposals under the form "". */ export declare function proposalsByProposalKey(proposal: string): string; /** The parts of a key of the form "", or undefined for a key of another form. */ export declare function parseProposalsByProposalKey(_key: string): { proposal: string } | undefined; /** The key of one value of the state candidates under the form ".". */ export declare function candidatesByProposalNodeKey(proposal: string, node: string): string; /** The parts of a key of the form ".", or undefined for a key of another form. */ export declare function parseCandidatesByProposalNodeKey(_key: string): { proposal: string; node: string } | undefined; /** The key of one value of the state pulses under the form "answer..". */ export declare function pulsesByAnswerProposalNodeKey(proposal: string, node: string): string; /** The parts of a key of the form "answer..", or undefined for a key of another form. */ export declare function parsePulsesByAnswerProposalNodeKey(_key: string): { proposal: string; node: string } | undefined; /** The key of one value of the state pulses under the form "ask.". */ export declare function pulsesByAskProposalKey(proposal: string): string; /** The parts of a key of the form "ask.", or undefined for a key of another form. */ export declare function parsePulsesByAskProposalKey(_key: string): { proposal: string } | undefined; /** The key of one value of the state seat-holders under the form "". */ export declare function seatHoldersBySeatKey(seat: string): string; /** The parts of a key of the form "", or undefined for a key of another form. */ export declare function parseSeatHoldersBySeatKey(_key: string): { seat: string } | undefined; /** The key of one value of the state seat-holders under the form ".". */ export declare function seatHoldersBySeatNodeKey(seat: string, node: string): string; /** The parts of a key of the form ".", or undefined for a key of another form. */ export declare function parseSeatHoldersBySeatNodeKey(_key: string): { seat: string; node: string } | undefined; /** what the want a candidate would write for a module carries of its build, in the want's own forms (the seat mesh-wants' state wants: `version` and `parts`; copied here because a seat definition cannot reuse another repository's seat's forms, design 47 G A-316) */ export interface AddedModule { /** the digest of each of the module's parts, by `:` (design 47 G section 379) */ "parts"?: Record; /** the module's released version, for people; none for a build of another watched branch (design 47 G section 379) */ "version"?: string; } /** one node's assignments assembled */ export interface Assignments { "decided": NodeDecided; "holds"?: Holding[]; "modules": PlacedModule[]; "node": string; /** by provision, the provider chosen for the node */ "pins"?: Record; "revision"?: string; "v"?: number; } /** who approved it, through which channel, when */ export interface AssignmentsEventWarrant { "at": string; "warrant": string; "words": string; } /** what each assignments event carries */ export interface AssignmentsEvent { /** for assignments-withdrawn, why it ended */ "ended"?: string; /** for assignments-changed, by node the revisions before and after and the modules added, removed or changed */ "nodes"?: Record[]; "proposal": Proposal; /** who approved it, through which channel, when */ "warrant"?: AssignmentsEventWarrant; } /** a tunnel found on the machine when it was adopted: everything but its private key */ export interface FoundTunnel { "address"?: string; "config"?: string; "interface": string; "mtu"?: number; "peers"?: FoundTunnelPeer[]; "port"?: number; "public-key"?: string; "range"?: string; "unit"?: string; } /** one peer of a found tunnel */ export interface FoundTunnelPeer { "address"?: string; "public-key": string; } /** one seat a module placed on the node holds */ export interface Holding { "claim": string; "kind"?: string; "module": string; "scope"?: string; "site"?: string; } /** the nodes that run a module from one watched branch */ export interface ModulePlacement { "branch": string; /** the fingerprint of the build these nodes run from the branch; absent, the newest delivered of the branch (design 47 H 750, H-A-39): one row per branch and build */ "build"?: string; "nodes": string[]; } /** what a person decides of a node; no secret and no key material */ export interface NodeDecided { "account"?: string; "account-home"?: string; "address"?: string; "adopted"?: boolean; "agent-account"?: string; "agent-account-home"?: string; "endpoint"?: string; "hub"?: boolean; /** on the hub, the name a person gave a peer of that tunnel, by its public key */ "peer-names"?: Record; "public-domain"?: string; "site"?: string; "taken"?: string[]; /** the tunnel found on the node when it was adopted */ "tunnel"?: FoundTunnel; } /** one module placed on a node */ export interface PlacedModule { /** by provision, the provider each requirement that keeps data is bound to */ "bindings"?: Record; /** the watched branch this node runs the module from; absent, the first watched branch of the module's registration (design 47 G 14) */ "branch"?: string; /** the fingerprint of the build the node runs; absent, the newest delivered of the branch (design 47 G 78, 402) */ "build"?: string; "has-layer"?: boolean; "has-mesh-wide"?: boolean; /** this node's settings layer of the module's assignments */ "layer"?: Record; /** the whole mesh's settings layer of the module's assignments */ "mesh-wide"?: Record; /** config values a person set in the whole mesh's layer, for a module in the settings form */ "mesh-wide-values"?: Record; "module": string; /** the host port each declared port is published on, by the port the software listens on */ "ports"?: Record; /** config values a person set in this node's layer, for a module in the settings form */ "values"?: Record; } /** an open proposal */ export interface Proposal { "again"?: string; "ask"?: string; "at": string; /** by node whose key it changes, the revision of the key it was laid over (0: none) */ "base": Record; "by": string; "changes": ProposalChange[]; "export-digest"?: string; "hand-back"?: boolean; "id": string; "must"?: string[]; "seed"?: boolean; /** answering, failed or asked */ "state": string; "v"?: number; "verdict"?: Verdict; "warrant"?: Warrant; "why": string; "withdrawn"?: string; "words"?: string; "written"?: string; } /** the public halves of a joining node's keys */ export interface ProposalChangeKeys { "identity": string; "overlay"?: string; "sealing": string; "serving"?: string; } /** one change of a proposal */ export interface ProposalChange { "bindings"?: Record; /** for place, the watched branch the node runs the module from; absent, the first watched branch of the module's registration (design 47 G 14) */ "branch"?: string; /** for place, the build of that branch the node runs, a return to an earlier build being this one value; absent, the newest delivered of the branch (ADR 0666 section 24) */ "build"?: string; "claim"?: string; "decided"?: NodeDecided; "field"?: string; /** the public halves of a joining node's keys */ "keys"?: ProposalChangeKeys; "kind"?: string; "layer"?: Record; "mesh-wide"?: Record; "mesh-wide-values"?: Record; "module"?: string; "node": string; /** place, take-off, pin, unpin, hold, unhold, decide, config, seed, add-node or remove-node */ "op": string; "ports"?: Record; "provider"?: Provider; "provision"?: string; "scope"?: string; "site"?: string; /** a decided field's value */ "value"?: unknown; "values"?: Record; /** the node's whole assignments, for a seed */ "whole"?: Assignments; } /** the module on a node that answers a requirement or holds a seat */ export interface Provider { "module": string; "node": string; } export interface SeatHoldersHoldersItem { "module": string; "node": string; } /** one key of seat-holders */ export interface SeatHolders { "holders": SeatHoldersHoldersItem[]; "node"?: string; /** the claim names no seat of the seat list */ "outside"?: boolean; "scope": string; "seat": string; "v"?: number; } /** the holder's judgement of a proposal's answers */ export interface Verdict { /** every node's answer to its candidate, by node */ "answers"?: Record>; "at": string; "carried"?: Record; "fails"?: string[]; "intended"?: Record; "notes"?: string[]; "silent"?: string[]; /** waits, pass or fail */ "state": string; "unintended"?: Record; "until"?: string; } /** the enrolment's warrant an add-node carries */ export interface Warrant { "address": string; "ask": string; "node": string; "warrant": string; } /** is what assignments takes. */ export interface AssignmentsInput { /** "true": the changes in order, from the stream and the state's revisions */ "history"?: "true" | "false"; /** one module: the nodes it is placed on */ "module"?: string; /** one node */ "node"?: string; /** "true": who holds each seat, and on which node (the state seat-holders); with node, that node's */ "seats"?: "true" | "false"; } /** is what assignments answers. */ export type AssignmentsAnswer = Record; /** is what proposals takes. */ export interface ProposalsInput { /** one proposal's id */ "id"?: string; } /** is what proposals answers. */ export type ProposalsAnswer = Record; /** is what propose takes. */ export interface ProposeInput { /** the changes, each an object with `op`: place (node, module, ports, bindings), take-off (node, module), pin (node, provision, provider {node, module}), unpin (node, provision), hold (node, module, claim, scope, kind, site), unhold (node, module, claim), decide (node, field, value: a decided field of the node, its address among them), config (node, module, mesh-wide, layer, mesh-wide-values, values), add-node (node, decided, keys: a joining node, mesh-enrolment's alone, the proposal's one change, with the enrolment's warrant, its tunnel key alone at the operator's yes; ADR 0587 ยง7), remove-node (node: a joining node never confirmed, taken off when its enrolment ends; mesh-enrolment's alone, on the same warrant) */ "changes": Record[]; /** for an add-node alone: the enrolment's warrant {node, address, ask, warrant}, naming the change's node and address */ "warrant"?: Record; /** why, shown to the operator with the proposal */ "why": string; } /** is what propose answers. */ export type ProposeAnswer = Record; /** is what withdraw takes. */ export interface WithdrawInput { /** the proposal's id */ "id": string; /** why, kept in the event */ "why": string; } /** is what withdraw answers. */ export type WithdrawAnswer = Record; /** is what again takes. */ export interface AgainInput { /** the proposal's id */ "id": string; } /** is what again answers. */ export type AgainAnswer = Record; /** is what placement takes. */ export interface PlacementInput { /** the module */ "module": string; } /** is what placement answers. */ export interface PlacementAnswer { /** one per branch and build, the nodes that run the module from it */ "placements": ModulePlacement[]; } /** is the body of the event assignments-proposed. */ export type AssignmentsProposedEvent = AssignmentsEvent; /** is the body of the event assignments-withdrawn. */ export type AssignmentsWithdrawnEvent = AssignmentsEvent; /** is the body of the event assignments-judged. */ export type AssignmentsJudgedEvent = AssignmentsEvent; /** is the body of the event assignments-changed. */ export type AssignmentsChangedEvent = AssignmentsEvent; export interface AssignmentsByNodeNodeValueModulesItem { /** the digest of the module key's value it stands for */ "digest": string; "module": string; } /** is one value of the state assignments under the key .node. */ export interface AssignmentsByNodeNodeValue { "decided": NodeDecided; "holds"?: Holding[]; /** the modules placed, in the order the composition reads them */ "modules": AssignmentsByNodeNodeValueModulesItem[]; "node": string; "pins"?: Record; "v"?: number; } /** is one value of the state assignments under the key .. */ export interface AssignmentsByNodeModuleValue { "node": string; "placed": PlacedModule; /** the value it replaces while a write is under way */ "previous"?: PlacedModule; "v"?: number; } /** is one value of the state proposals under the key . */ export type ProposalsByProposalValue = Proposal; /** is one value of the state candidates under the key .. */ export interface CandidatesByProposalNodeValue { /** by module name, each module the candidate adds to this node without a want there: the `version` and `parts` the want it would write carries (design 47 G A-316); the node-engine builds such a module from this entry */ "added"?: Record; /** the node's assignments with the proposal laid over it; absent when the proposal takes its key away */ "assignments"?: Assignments; "proposal": string; /** the proposal changes this node's composition through another's key */ "reached"?: boolean; "v"?: number; } /** is one value of the state pulses under the key answer... */ export interface PulsesByAnswerProposalNodeValue { "v"?: number; } /** is one value of the state pulses under the key ask.. */ export interface PulsesByAskProposalValue { "v"?: number; } /** is one value of the state seat-holders under the key . */ export type SeatHoldersBySeatValue = SeatHolders; /** is one value of the state seat-holders under the key .. */ export type SeatHoldersBySeatNodeValue = SeatHolders;