/**
 * SubstrateCoordinateBoundary — stable lane, coordinate, and capability nouns.
 *
 * @module domain/services/coordinate/SubstrateCoordinateBoundary
 */
export const SUBSTRATE_LANE_KINDS = Object.freeze([
    'worldline',
    'strand',
    'braid',
]);
export const SUBSTRATE_COORDINATE_KINDS = Object.freeze([
    'live',
    'frontier',
    'checkpoint',
    'strand-base',
]);
export const SUBSTRATE_CAPABILITY_NAMES = Object.freeze([
    'worldline.commit',
    'worldline.live',
    'worldline.seek',
    'worldline.observer',
    'worldline.optic',
    'strand.create',
    'strand.braid',
    'strand.patch',
    'strand.intent',
    'coordinate.compare',
    'coordinate.transfer-plan',
    'sync.exchange',
]);
export const SESSION_POLICY_CAPABILITY_NAMES = Object.freeze([
    'debugger.cursor',
    'debugger.layout',
    'debugger.selection',
    'debugger.theme',
    'session.history',
    'session.shortcut',
]);
function includesName(names, name) {
    return names.includes(name);
}
export default class SubstrateCoordinateBoundary {
    laneKinds = SUBSTRATE_LANE_KINDS;
    coordinateKinds = SUBSTRATE_COORDINATE_KINDS;
    substrateCapabilities = SUBSTRATE_CAPABILITY_NAMES;
    sessionPolicyCapabilities = SESSION_POLICY_CAPABILITY_NAMES;
    authorityFor(capabilityName) {
        if (includesName(SUBSTRATE_CAPABILITY_NAMES, capabilityName)) {
            return 'substrate';
        }
        if (includesName(SESSION_POLICY_CAPABILITY_NAMES, capabilityName)) {
            return 'session-policy';
        }
        return null;
    }
}
