/** * @medicine-wheel/ontology-core — Type Definitions * * Unified TypeScript types for the Medicine Wheel data model. * Single source of truth consumed by both mcp-medicine-wheel (server) * and mcp-medicine-wheel-ui (client). * * Grounded in Indigenous relational ontology: relationships are * first-class entities, not just labeled edges. */ import type { KinshipEdgeName } from './kinship'; export type DirectionName = 'east' | 'south' | 'west' | 'north'; export interface Direction { name: DirectionName; ojibwe: string; season: string; color: string; lifeStage: string; ages: string; medicine: string[]; teachings: string[]; practices: string[]; } export type NodeType = 'human' | 'land' | 'spirit' | 'ancestor' | 'future' | 'knowledge' /** A circle of people who hold ceremony together (a talking circle, a story circle). Added 0.14.0. */ | 'circle'; export interface RelationalNode { id: string; name: string; type: NodeType; direction?: DirectionName; metadata: Record; created_at: string; updated_at: string; } export interface RelationalEdge { id: string; from_id: string; to_id: string; relationship_type: string; strength: number; ceremony_honored: boolean; obligations: string[]; created_at: string; } export type ObligationCategory = 'human' | 'land' | 'spirit' | 'future'; export interface RelationalObligation { category: ObligationCategory; obligations: string[]; } export interface OcapFlags { /** Who owns this data/relation */ ownership: string; /** Who controls access and use */ control: string; /** Who may access this data */ access: 'community' | 'researchers' | 'public' | 'restricted'; /** Where is this data physically held */ possession: 'on-premise' | 'community-server' | 'cloud-sovereign' | 'cloud-shared'; /** Whether OCAP® compliance has been verified */ compliant: boolean; /** Who is the data steward */ steward?: string; /** Whether consent was given for this specific use */ consent_given?: boolean; /** Scope of the consent */ consent_scope?: string; /** Current state of consent: active, withdrawn, expired, or pending */ consent_state?: 'active' | 'withdrawn' | 'expired' | 'pending'; /** ISO 8601 timestamp of when consent was last affirmed */ consent_last_affirmed?: string; } export interface AccountabilityTracking { /** Wilson's three R's scores (0–1) */ respect: number; reciprocity: number; responsibility: number; /** Computed Wilson alignment (0–1) */ wilson_alignment: number; /** Relations that have been honored through ceremony */ relations_honored: string[]; /** Last ceremony that touched this relation */ last_ceremony_id?: string; /** Notes on accountability status */ notes?: string; } /** * Context that authorizes and bounds a relation — the metadata that makes a * relation valid in some circles and not others. Optional and additive: * existing relations carry none. Consumed by the protocol-guard stack in * `@medicine-wheel/relational-query` to permit or escalate traversal. */ export interface RelationContext { /** Who authorized this relation (person, council, ceremony, or source dataset). */ authorized_by?: string; /** The ceremony state or scope in which this relation is currently valid. */ active_context?: string; /** Condition describing when the relation is traversable (free-form expression). */ valid_when?: string; /** Condition describing when the relation must NOT be traversed. */ forbidden_when?: string; /** Identities permitted to traverse this relation. */ authorized_kin?: string[]; } /** * First-class Relation entity. * Extends RelationalEdge with ceremony context, OCAP® metadata, * and accountability tracking — making relationships ontological * units with their own lifecycles. */ export interface Relation { id: string; /** Source entity */ from_id: string; /** Target entity */ to_id: string; /** Type of relationship (e.g., kinship, treaty, ceremony, mentorship) */ relationship_type: string; /** * Governed kinship-edge name from the kinship vocabulary (e.g. * 'holds-responsibility-for'). Optional and additive — `relationship_type` * is retained for back-compat; `kinship_type` references the registry in * `kinship.ts` and carries symmetry + inverse for directional reasoning. */ kinship_type?: KinshipEdgeName; /** Relational strength (0–1) */ strength: number; /** Direction alignment */ direction?: DirectionName; /** Ceremony context */ ceremony_context?: { ceremony_id?: string; ceremony_type?: CeremonyType; ceremony_honored: boolean; }; /** Relational obligations */ obligations: RelationalObligation[]; /** OCAP® governance */ ocap: OcapFlags; /** Wilson relational accountability tracking */ accountability: AccountabilityTracking; /** Context that authorizes and bounds this relation (feeds protocol guards). */ context?: RelationContext; /** Metadata */ metadata: Record; created_at: string; updated_at: string; } export type CeremonyType = 'smudging' | 'talking_circle' | 'spirit_feeding' | 'opening' | 'closing'; export interface CeremonyGuidance { opening_practice: string; intention: string; protocol: string; medicines_used: string[]; timeline?: string; } export interface CeremonyLog { id: string; type: CeremonyType; direction: DirectionName; participants: string[]; medicines_used: string[]; intentions: string[]; timestamp: string; research_context?: string; /** Relations honored during this ceremony */ relations_honored?: string[]; /** OCAP® governance for ceremony data */ ocap?: OcapFlags; /** * Episode binding, typed (0.14.0). Before this the binding lived as a JSON * string inside `research_context` (`{"episode_path","episode_number","source"}`), * written by gmtermux and Miadi; readers still accept that form. `episode_path` * is the chronicle directory name (`YYYY-MM-DD-episode-NNN-slug`). */ episode_path?: string; episode_number?: number; /** Who or what opened the ceremony — e.g. 'gmtermux:3768', 'miadi:/api/ceremony/list', 'mcp'. */ source?: string; /** For a `closing`: the id of the ceremony it closes. Before 0.14.0 this rode in `research_context`. */ closes?: string; /** The circle (node of type `circle`) this ceremony is held in, when any. */ circle_id?: string; /** * The node this ceremony is held about, when it gathers around something: a * review (`review:`), a knowledge node, any node. Added 0.15.5 (#146). */ subject_id?: string; } export interface NarrativeBeat { id: string; direction: DirectionName; title: string; description: string; prose?: string; ceremonies: string[]; learnings: string[]; timestamp: string; act: number; relations_honored: string[]; /** The research cycle this beat belongs to. Absent on beats recorded before cycles were bound. */ cycle_id?: string; /** Set when this beat was telescoped out of a coarser one. */ parent_beat_id?: string; /** IDs of beats this one was telescoped into. */ sub_beats?: string[]; /** How this beat entered the wheel — authored by hand, derived by a processor, or witnessed from an event stream. */ origin?: BeatOrigin; /** In a talking circle: the node id (or name) of the one who spoke this beat. Added 0.14.0. */ speaker?: string; /** In a talking circle: node ids (or names) of those who witnessed this beat. Added 0.14.0. */ witnesses?: string[]; } /** Provenance of a beat: who or what put it on the wheel. */ export interface BeatOrigin { /** Producer identity — e.g. 'hand', 'narrative-cluster', 'github-ceremony', 'session-reader'. */ producer: string; /** Identifier of the thing the beat was derived from (cluster id, event id, commit sha…). */ source_ref?: string; /** Free-text note on how the derivation was made. */ method?: string; } export interface MedicineWheelCycle { id: string; research_question: string; start_date: string; current_direction: DirectionName; beats: string[]; ceremonies_conducted: number; relations_mapped: number; wilson_alignment: number; ocap_compliant: boolean; } export type TensionPhase = 'germination' | 'assimilation' | 'completion'; export interface StructuralTensionChart { id: string; desired_outcome: string; current_reality: string; action_steps: ActionStep[]; phase: TensionPhase; direction?: DirectionName; created_at: string; updated_at: string; } export interface ActionStep { id: string; title: string; description?: string; completed: boolean; direction?: DirectionName; due_date?: string; } export interface DirectionResponse { direction: string; stage: string; ceremony_guidance: CeremonyGuidance; relational_obligations: RelationalObligation[]; suggested_practices: unknown[]; accountability_checkpoint?: unknown; relational_accountability_summary?: unknown; } export type SunName = 'NovelEmergence' | 'CreativeActualization' | 'WovenMeaning' | 'FirstCause' | 'EmbodiedPractice' | 'SustainedPresence'; export type CeremonyPhase = 'opening' | 'council' | 'integration' | 'closure'; export type GovernanceAccess = 'open' | 'ceremony_required' | 'restricted' | 'sacred'; export type PersonRole = 'steward' | 'contributor' | 'elder' | 'firekeeper'; export type RSISRelationType = 'STEWARDS' | 'BORN_FROM' | 'SERVES' | 'GIVES_BACK_TO' | 'ALIGNED_WITH' | 'KINSHIP_OF'; export interface GovernanceProtectedPath { path: string; authority: string[]; access: GovernanceAccess; description?: string; } export interface GovernanceConfig { protected_paths?: GovernanceProtectedPath[]; ceremony_required_changes?: string[]; index_exclusions?: string[]; } export interface RSISConfig { enabled: boolean; charts?: string[]; kinship_paths?: string[]; ceremony?: { current_cycle?: string; host_sun?: SunName; phase?: CeremonyPhase; }; directions?: { auto_classify_commits?: boolean; heuristics?: 'default' | string; }; governance?: GovernanceConfig; } export interface KinshipHubInfo { path: string; identity: string; lineage: string; humanAccountabilities: string[]; moreThanHumanAccountabilities: string[]; boundaries: string[]; } export interface KinshipRelation { from: string; to: string; type: string; } export interface ReciprocityFlow { from: string; to: string; type: string; count: number; } export interface ReciprocityBalance { entity: string; giving: number; receiving: number; } export interface CeremonyLineageEntry { ceremonyId: string; ceremonyName: string; sun: string; cycle: string; phase: CeremonyPhase; stewards: string[]; } export interface DirectionDetail { name: string; direction: DirectionName; reason: string; } export interface DirectionDistribution { east: number; south: number; west: number; north: number; } export interface DirectionInfo { name: DirectionName; emoji: string; focus: string; guidance: string; } export interface MedicineWheelView { suns: Array<{ name: SunName; inquiryCount: number; }>; directions: Record; reciprocity: { flows: ReciprocityFlow[]; balance: ReciprocityBalance[]; }; kinship: { hubs: KinshipHubInfo[]; relations: KinshipRelation[]; }; } /** * The relational origin dimension of knowledge. * Canonical definition — re-exported by importance-unit. * - `land` — place-grounded, embodied knowing * - `dream` — liminal, spirit-state knowing * - `code` — technical, implementation knowing * - `vision` — intentional, architectural knowing */ export type EpistemicSource = 'land' | 'dream' | 'code' | 'vision'; /** * Wilson's four pillars of a research paradigm. * Every piece of knowledge addresses at least one pillar. */ export type AxiologicalPillar = 'ontology' | 'epistemology' | 'methodology' | 'axiology'; /** * A relation grounded in place — rivers, forests, land forms. * Land teaches through embodied presence and seasonal rhythms. */ export interface LandRelation extends Relation { relationship_type: 'land-kinship' | 'land-teaching' | 'land-stewardship'; /** The specific place or land feature this relation connects to */ place?: string; /** Seasonal context of the relation */ season?: string; } /** * A relation with ancestors — those who came before. * Ancestor relations carry intergenerational obligations. */ export interface AncestorRelation extends Relation { relationship_type: 'ancestor-teaching' | 'ancestor-obligation' | 'ancestor-lineage'; /** Name or identifier of the ancestor(s) */ ancestor?: string; /** The lineage or tradition this relation belongs to */ lineage?: string; } /** * A relation with future generations — those yet to come. * Future relations carry forward-looking responsibility. */ export interface FutureRelation extends Relation { relationship_type: 'future-obligation' | 'future-gift' | 'future-teaching'; /** Number of generations this relation looks forward */ generationsForward?: number; } /** * A relation with cosmic or spirit entities. * Cosmic relations honor the more-than-human world. */ export interface CosmicRelation extends Relation { relationship_type: 'cosmic-kinship' | 'spirit-teaching' | 'cosmic-reciprocity'; /** The cosmic or spirit entity this relation connects to */ entity?: string; } /** Discriminator for film/production entities riding on `knowledge` nodes. */ export type ProductionEntityKind = 'shot' | 'rush' | 'sequence' | 'scene' | 'recording' | 'collaborator' | 'edit-brief'; /** * A relation grounded in film/media production. Knowledge emerges through * witnessed relationship (Wilson; Renaud) rather than extractive capture — * `witnessed-by` records the participant that witnessed a rush, not merely a * source that owns it. */ export interface ProductionRelation extends Relation { relationship_type: 'shot-of' | 'rush-of' | 'sequence-of' | 'witnessed-by' | 'directed-by' | 'sounds-in'; /** The production session / episode this relation belongs to. */ production_id?: string; /** Timecode or transcript offset anchoring this relation. */ timecode?: string; } /** Discriminator for infrastructure entities riding on existing nodes. */ export type InfraEntityKind = 'host' | 'tenant' | 'service'; /** * Which closed `NodeType` each infrastructure kind rides, and which direction it * serves. * * The directions are not decoration. A service is **west** — the thing that * executes. A tenant is **south** — an account is a being whose readiness is a * precondition. A host carries no direction of its own: it is the ground the * others stand on, and giving the land a direction would put the wheel inside * one of its own quadrants. */ export declare const INFRA_ENTITY_BINDING: { readonly host: { readonly nodeType: "land"; readonly direction: undefined; }; readonly tenant: { readonly nodeType: "human"; readonly direction: "south"; }; readonly service: { readonly nodeType: "knowledge"; readonly direction: "west"; }; }; /** `'host' | 'tenant' | 'service'` — the registered infrastructure kinds. */ export declare const INFRA_ENTITY_KINDS: readonly InfraEntityKind[]; /** Discriminator for academic entities riding on existing nodes. */ export type AcademicEntityKind = 'faculty' | 'research-field' | 'program' | 'institution'; /** * Which closed `NodeType` each academic kind rides, and which direction it * serves. A faculty member is **south** — protocol and consent, a relation * being established before any action. A research field is **east** — a mode * of inquiry, the door a work is seen through. A program is **south** — the * structure consent-based entry moves through (application, supervision). An * institution carries no direction of its own: like a host, it is the ground * the others stand on. */ export declare const ACADEMIC_ENTITY_BINDING: { readonly faculty: { readonly nodeType: "human"; readonly direction: "south"; }; readonly 'research-field': { readonly nodeType: "knowledge"; readonly direction: "east"; }; readonly program: { readonly nodeType: "knowledge"; readonly direction: "south"; }; readonly institution: { readonly nodeType: "land"; readonly direction: undefined; }; }; /** The registered academic kinds. */ export declare const ACADEMIC_ENTITY_KINDS: readonly AcademicEntityKind[]; /** * Appointment status of a faculty member. `unverified` is a first-class value, * not an absence: a claim the evidence does not yet earn keeps the weaker word. * The supervisor requirement (the principal supervisor must be a full-time * member of the department — Renaud, ep067) is checkable only against this. */ export type AcademicAppointment = 'full-time' | 'part-time' | 'tenure-track' | 'tenured' | 'affiliated' | 'emeritus' | 'unverified'; /** * A relation grounded in academic kinship. `field-aligns-with` records that a * research field and a work recognize each other; an alignment claim carries * its `grounding` — the vessel, roster or issue where it was measured — so the * edge can be challenged at its source rather than argued from memory. */ export interface AcademicRelation extends Relation { relationship_type: 'researches-in' | 'appointed-at' | 'supervises-in' | 'field-aligns-with' | 'profiled-in' | 'corresponds-with'; /** Where the claim was measured — a vessel path, a roster, or owner/repo#n. */ grounding?: string; /** Appointment status, when the relation is `appointed-at`. */ appointment?: AcademicAppointment; } export interface MWTool { name: string; description: string; inputSchema: unknown; handler: (args: unknown) => Promise; } export interface MWResource { uri: string; name: string; description: string; mimeType: string; content: unknown; } export interface MWPrompt { name: string; description: string; arguments?: unknown[]; handler: (args: unknown) => Promise; } //# sourceMappingURL=types.d.ts.map