@medicine-wheel/ontology-core 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,93 @@
1
+ # @medicine-wheel/ontology-core
2
+
3
+ Foundational ontology layer for the Medicine Wheel Developer Suite — unified types, RDF vocabulary, Zod schemas, constants, and semantic query helpers grounded in Indigenous relational ontology.
4
+
5
+ ## Overview
6
+
7
+ This package is the **single source of truth** for the Medicine Wheel data model, consumed by both `mcp-medicine-wheel` (server) and `mcp-medicine-wheel-ui` (client).
8
+
9
+ ### What it provides
10
+
11
+ | Module | Description |
12
+ |--------|-------------|
13
+ | `types` | TypeScript type definitions for all entities (nodes, relations, ceremonies, beats, cycles) |
14
+ | `vocabulary` | RDF namespace IRIs and predicate constants (`mw:`, `ids:`, `ocap:`, `rel:`, `cer:`, `beat:`) |
15
+ | `schemas` | Zod validation schemas for runtime data integrity |
16
+ | `constants` | Direction definitions, color maps, icons, Ojibwe names, act mappings |
17
+ | `queries` | Semantic query helpers — traversal, Wilson alignment, OCAP® compliance |
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ npm install @medicine-wheel/ontology-core
23
+ ```
24
+
25
+ Or link locally:
26
+ ```bash
27
+ npm link ../medicine-wheel/src/ontology-core
28
+ ```
29
+
30
+ ## Usage
31
+
32
+ ```typescript
33
+ import {
34
+ // Types
35
+ type RelationalNode, type Relation, type DirectionName,
36
+
37
+ // Constants
38
+ DIRECTIONS, DIRECTION_COLORS, NODE_TYPE_COLORS,
39
+
40
+ // RDF Vocabulary
41
+ MW, CER, OCAP, REL,
42
+
43
+ // Zod Schemas
44
+ RelationalNodeSchema, RelationSchema,
45
+
46
+ // Query Helpers
47
+ computeWilsonAlignment, checkOcapCompliance, traverseRelationalWeb,
48
+ } from '@medicine-wheel/ontology-core';
49
+ ```
50
+
51
+ ## Key Concepts
52
+
53
+ ### Relational-First Schema
54
+
55
+ In Indigenous relational ontology, relationships are not just labeled edges — they are beings with their own lifecycles, obligations, protocols, and accountability. The `Relation` type reflects this:
56
+
57
+ ```typescript
58
+ interface Relation {
59
+ id: string;
60
+ from_id: string;
61
+ to_id: string;
62
+ relationship_type: string; // kinship, treaty, ceremony, mentorship...
63
+ strength: number; // 0–1
64
+ direction?: DirectionName;
65
+ ceremony_context?: { ... }; // Ceremony linkage
66
+ obligations: RelationalObligation[];
67
+ ocap: OcapFlags; // OCAP® governance
68
+ accountability: AccountabilityTracking; // Wilson's 3 R's
69
+ }
70
+ ```
71
+
72
+ ### OCAP® Governance
73
+
74
+ Every relation carries `OcapFlags` (Ownership, Control, Access, Possession) — the First Nations principles of data sovereignty.
75
+
76
+ ### Wilson Alignment
77
+
78
+ Shawn Wilson's three R's (Respect, Reciprocity, Responsibility) are tracked per relation and aggregated across cycles. Use `computeWilsonAlignment()` and `findAccountabilityGaps()` to monitor relational health.
79
+
80
+ ### RDF Vocabulary
81
+
82
+ All concepts have IRI constants for semantic web interoperability:
83
+
84
+ ```typescript
85
+ MW.Direction // https://ontology.medicine-wheel.dev/mw#Direction
86
+ CER.Ceremony // https://ontology.medicine-wheel.dev/cer#Ceremony
87
+ OCAP.ownership // https://ontology.medicine-wheel.dev/ocap#ownership
88
+ ```
89
+
90
+ ## License
91
+
92
+ MIT — IAIP Collaborative, Shawinigan, QC
93
+
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @medicine-wheel/ontology-core — Constants
3
+ *
4
+ * Canonical constants for the Medicine Wheel ontology.
5
+ * Single source of truth — no more duplication between server and UI.
6
+ */
7
+ import type { Direction, DirectionName, NodeType, CeremonyType, SunName, CeremonyPhase, PersonRole, RSISRelationType, GovernanceAccess, DirectionInfo } from './types';
8
+ export declare const DIRECTIONS: Direction[];
9
+ export declare const DIRECTION_COLORS: Record<DirectionName, string>;
10
+ export declare const NODE_TYPE_COLORS: Record<NodeType, string>;
11
+ export declare const CEREMONY_ICONS: Record<CeremonyType, string>;
12
+ export declare const DIRECTION_MAP: Record<DirectionName, Direction>;
13
+ export declare const DIRECTION_NAMES: readonly DirectionName[];
14
+ export declare const NODE_TYPES: readonly NodeType[];
15
+ export declare const CEREMONY_TYPES: readonly CeremonyType[];
16
+ export declare const OJIBWE_NAMES: Record<DirectionName, string>;
17
+ export declare const DIRECTION_SEASONS: Record<DirectionName, string>;
18
+ export declare const DIRECTION_ACTS: Record<DirectionName, number>;
19
+ export declare const ACT_DIRECTIONS: Record<number, DirectionName>;
20
+ export declare const SUN_NAMES: SunName[];
21
+ export declare const SUN_DESCRIPTIONS: Record<SunName, string>;
22
+ export declare const CEREMONY_PHASES: CeremonyPhase[];
23
+ export declare const CEREMONY_PHASE_DESCRIPTIONS: Record<CeremonyPhase, string>;
24
+ export declare const PERSON_ROLES: PersonRole[];
25
+ export declare const RSIS_RELATION_TYPES: RSISRelationType[];
26
+ export declare const GOVERNANCE_ACCESS_LEVELS: GovernanceAccess[];
27
+ export declare const DIRECTION_INFO: Record<DirectionName, DirectionInfo>;
28
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAChD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EACtF,MAAM,SAAS,CAAC;AAIjB,eAAO,MAAM,UAAU,EAAE,SAAS,EA6CjC,CAAC;AAIF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAK1D,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAOrD,CAAC;AAIF,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAMvD,CAAC;AAIF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,aAAa,EAAE,SAAS,CAEtB,CAAC;AAEtC,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAAgD,CAAC;AAErG,eAAO,MAAM,UAAU,EAAE,SAAS,QAAQ,EAEhC,CAAC;AAEX,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,EAExC,CAAC;AAIX,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAKtD,CAAC;AAIF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAK3D,CAAC;AAIF,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAKxD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAKxD,CAAC;AAIF,eAAO,MAAM,SAAS,EAAE,OAAO,EAG9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAOpD,CAAC;AAIF,eAAO,MAAM,eAAe,EAAE,aAAa,EAAqD,CAAC;AAEjG,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAKrE,CAAC;AAIF,eAAO,MAAM,YAAY,EAAE,UAAU,EAAsD,CAAC;AAI5F,eAAO,MAAM,mBAAmB,EAAE,gBAAgB,EAEjD,CAAC;AAIF,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,EAA0D,CAAC;AAIlH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,aAAa,EAAE,aAAa,CAK/D,CAAC"}
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+ /**
3
+ * @medicine-wheel/ontology-core — Constants
4
+ *
5
+ * Canonical constants for the Medicine Wheel ontology.
6
+ * Single source of truth — no more duplication between server and UI.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.DIRECTION_INFO = exports.GOVERNANCE_ACCESS_LEVELS = exports.RSIS_RELATION_TYPES = exports.PERSON_ROLES = exports.CEREMONY_PHASE_DESCRIPTIONS = exports.CEREMONY_PHASES = exports.SUN_DESCRIPTIONS = exports.SUN_NAMES = exports.ACT_DIRECTIONS = exports.DIRECTION_ACTS = exports.DIRECTION_SEASONS = exports.OJIBWE_NAMES = exports.CEREMONY_TYPES = exports.NODE_TYPES = exports.DIRECTION_NAMES = exports.DIRECTION_MAP = exports.CEREMONY_ICONS = exports.NODE_TYPE_COLORS = exports.DIRECTION_COLORS = exports.DIRECTIONS = void 0;
10
+ // ── Direction Definitions ───────────────────────────────────────────────────
11
+ exports.DIRECTIONS = [
12
+ {
13
+ name: 'east',
14
+ ojibwe: 'Waabinong',
15
+ season: 'Spring',
16
+ color: '#FFD700',
17
+ lifeStage: 'Good Life',
18
+ ages: 'Birth - 7 years',
19
+ medicine: ['Tobacco (Asemaa)'],
20
+ teachings: ['New beginnings', 'Vision', 'Illumination', 'Spiritual connection'],
21
+ practices: ['Morning prayers', 'Setting intentions', 'Vision quests', 'Opening ceremonies'],
22
+ },
23
+ {
24
+ name: 'south',
25
+ ojibwe: 'Zhaawanong',
26
+ season: 'Summer',
27
+ color: '#DC143C',
28
+ lifeStage: 'Fast Life',
29
+ ages: '7 - 14 years',
30
+ medicine: ['Cedar (Giizhik)'],
31
+ teachings: ['Growth', 'Youth energy', 'Trust', 'Physical strength'],
32
+ practices: ['Land-based learning', 'Youth mentorship', 'Physical engagement', 'Cedar ceremonies'],
33
+ },
34
+ {
35
+ name: 'west',
36
+ ojibwe: 'Epangishmok',
37
+ season: 'Fall',
38
+ color: '#1a1a2e',
39
+ lifeStage: 'Truth & Planning',
40
+ ages: '35 - 49 years',
41
+ medicine: ['Sage (Mashkodewashk)', "Strawberry (Ode'imin)"],
42
+ teachings: ['Reflection', 'Truth', 'Introspection', 'Emotional processing'],
43
+ practices: ['Talking circles', 'Emotional processing', 'Forgiveness ceremonies', 'Sunset prayers'],
44
+ },
45
+ {
46
+ name: 'north',
47
+ ojibwe: 'Kiiwedinong',
48
+ season: 'Winter',
49
+ color: '#E8E8E8',
50
+ lifeStage: 'Elder',
51
+ ages: '49+ years',
52
+ medicine: ['Cedar', 'Stories'],
53
+ teachings: ['Wisdom', 'Completion', 'Ancestral knowledge', 'Generosity'],
54
+ practices: ['Story archiving', 'Spirit feeding', 'Elder council', 'Knowledge sharing'],
55
+ },
56
+ ];
57
+ // ── Color Maps ──────────────────────────────────────────────────────────────
58
+ exports.DIRECTION_COLORS = {
59
+ east: '#FFD700',
60
+ south: '#DC143C',
61
+ west: '#1a1a2e',
62
+ north: '#E8E8E8',
63
+ };
64
+ exports.NODE_TYPE_COLORS = {
65
+ human: '#e8913a',
66
+ land: '#4a9e5c',
67
+ spirit: '#9a5cc6',
68
+ ancestor: '#c9a23a',
69
+ future: '#5a9ec6',
70
+ knowledge: '#d4b844',
71
+ };
72
+ // ── Ceremony Icons ──────────────────────────────────────────────────────────
73
+ exports.CEREMONY_ICONS = {
74
+ smudging: '🌿',
75
+ talking_circle: '🔴',
76
+ spirit_feeding: '🕯️',
77
+ opening: '🌅',
78
+ closing: '🌙',
79
+ };
80
+ // ── Direction Lookup Helpers ────────────────────────────────────────────────
81
+ exports.DIRECTION_MAP = Object.fromEntries(exports.DIRECTIONS.map(d => [d.name, d]));
82
+ exports.DIRECTION_NAMES = ['east', 'south', 'west', 'north'];
83
+ exports.NODE_TYPES = [
84
+ 'human', 'land', 'spirit', 'ancestor', 'future', 'knowledge'
85
+ ];
86
+ exports.CEREMONY_TYPES = [
87
+ 'smudging', 'talking_circle', 'spirit_feeding', 'opening', 'closing'
88
+ ];
89
+ // ── Ojibwe Name Lookup ──────────────────────────────────────────────────────
90
+ exports.OJIBWE_NAMES = {
91
+ east: 'Waabinong',
92
+ south: 'Zhaawanong',
93
+ west: 'Epangishmok',
94
+ north: 'Kiiwedinong',
95
+ };
96
+ // ── Season Lookup ───────────────────────────────────────────────────────────
97
+ exports.DIRECTION_SEASONS = {
98
+ east: 'Spring',
99
+ south: 'Summer',
100
+ west: 'Fall',
101
+ north: 'Winter',
102
+ };
103
+ // ── Act Mapping (narrative structure) ───────────────────────────────────────
104
+ exports.DIRECTION_ACTS = {
105
+ east: 1,
106
+ south: 2,
107
+ west: 3,
108
+ north: 4,
109
+ };
110
+ exports.ACT_DIRECTIONS = {
111
+ 1: 'east',
112
+ 2: 'south',
113
+ 3: 'west',
114
+ 4: 'north',
115
+ };
116
+ // ── RSIS Thematic Suns ──────────────────────────────────────────────────────
117
+ exports.SUN_NAMES = [
118
+ 'NovelEmergence', 'CreativeActualization', 'WovenMeaning',
119
+ 'FirstCause', 'EmbodiedPractice', 'SustainedPresence',
120
+ ];
121
+ exports.SUN_DESCRIPTIONS = {
122
+ NovelEmergence: 'Emergence of new knowledge and understanding',
123
+ CreativeActualization: 'Creative manifestation and bringing ideas into form',
124
+ WovenMeaning: 'Integration and meaning-making across knowledge domains',
125
+ FirstCause: 'Root causes, origins, and foundational principles',
126
+ EmbodiedPractice: 'Lived experience, embodiment, and practical application',
127
+ SustainedPresence: 'Ongoing commitment, maintenance, and enduring engagement',
128
+ };
129
+ // ── RSIS Ceremony Phases ────────────────────────────────────────────────────
130
+ exports.CEREMONY_PHASES = ['opening', 'council', 'integration', 'closure'];
131
+ exports.CEREMONY_PHASE_DESCRIPTIONS = {
132
+ opening: 'What wants to emerge? Focus on intention and vision.',
133
+ council: 'Cross-Sun perspectives on code relationships.',
134
+ integration: 'Weaving insights into synthesis artifacts.',
135
+ closure: 'Reciprocity summaries and seeding observations.',
136
+ };
137
+ // ── RSIS Person Roles ───────────────────────────────────────────────────────
138
+ exports.PERSON_ROLES = ['steward', 'contributor', 'elder', 'firekeeper'];
139
+ // ── RSIS Relation Types ─────────────────────────────────────────────────────
140
+ exports.RSIS_RELATION_TYPES = [
141
+ 'STEWARDS', 'BORN_FROM', 'SERVES', 'GIVES_BACK_TO', 'ALIGNED_WITH', 'KINSHIP_OF',
142
+ ];
143
+ // ── RSIS Governance Access Levels ───────────────────────────────────────────
144
+ exports.GOVERNANCE_ACCESS_LEVELS = ['open', 'ceremony_required', 'restricted', 'sacred'];
145
+ // ── RSIS Direction Info (simplified, with emoji) ────────────────────────────
146
+ exports.DIRECTION_INFO = {
147
+ east: { name: 'east', emoji: '🌸', focus: 'Vision, intention, emergence', guidance: 'What wants to emerge? What seeds are being planted?' },
148
+ south: { name: 'south', emoji: '🧠', focus: 'Architecture, structure, planning', guidance: 'What structures support the vision? What patterns serve advancement?' },
149
+ west: { name: 'west', emoji: '⚡', focus: 'Implementation, creation, manifestation', guidance: 'What is being built? How does creation serve the inquiries?' },
150
+ north: { name: 'north', emoji: '🕸️', focus: 'Reflection, integration, wisdom', guidance: 'What has been learned? What reciprocity needs tending?' },
151
+ };
152
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAOH,+EAA+E;AAElE,QAAA,UAAU,GAAgB;IACrC;QACE,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,WAAW;QACnB,MAAM,EAAE,QAAQ;QAChB,KAAK,EAAE,SAAS;QAChB,SAAS,EAAE,WAAW;QACtB,IAAI,EAAE,iBAAiB;QACvB,QAAQ,EAAE,CAAC,kBAAkB,CAAC;QAC9B,SAAS,EAAE,CAAC,gBAAgB,EAAE,QAAQ,EAAE,cAAc,EAAE,sBAAsB,CAAC;QAC/E,SAAS,EAAE,CAAC,iBAAiB,EAAE,oBAAoB,EAAE,eAAe,EAAE,oBAAoB,CAAC;KAC5F;IACD;QACE,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,YAAY;QACpB,MAAM,EAAE,QAAQ;QAChB,KAAK,EAAE,SAAS;QAChB,SAAS,EAAE,WAAW;QACtB,IAAI,EAAE,cAAc;QACpB,QAAQ,EAAE,CAAC,iBAAiB,CAAC;QAC7B,SAAS,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,OAAO,EAAE,mBAAmB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yCAAyC,EAAE,QAAQ,EAAE,6DAA6D,EAAE;IAC/J,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,iCAAiC,EAAE,QAAQ,EAAE,wDAAwD,EAAE;CACrJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @medicine-wheel/ontology-core
3
+ *
4
+ * Foundational ontology layer for the Medicine Wheel Developer Suite.
5
+ * Unified types, RDF vocabulary, Zod schemas, constants, and semantic
6
+ * query helpers — grounded in Indigenous relational ontology.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ export type { DirectionName, Direction, NodeType, RelationalNode, RelationalEdge, ObligationCategory, RelationalObligation, OcapFlags, AccountabilityTracking, Relation, CeremonyType, CeremonyGuidance, CeremonyLog, NarrativeBeat, MedicineWheelCycle, TensionPhase, StructuralTensionChart, ActionStep, DirectionResponse, MWTool, MWResource, MWPrompt, EpistemicSource, AxiologicalPillar, LandRelation, AncestorRelation, FutureRelation, CosmicRelation, SunName, CeremonyPhase, GovernanceAccess, PersonRole, RSISRelationType, GovernanceProtectedPath, GovernanceConfig, RSISConfig, KinshipHubInfo, KinshipRelation, ReciprocityFlow, ReciprocityBalance, CeremonyLineageEntry, DirectionDetail, DirectionDistribution, DirectionInfo, MedicineWheelView, } from './types';
11
+ export { MW_NS, IDS_NS, OCAP_NS, REL_NS, CER_NS, BEAT_NS, RDF_NS, RDFS_NS, OWL_NS, SKOS_NS, PROV_NS, SHACL_NS, PREFIXES, MW, CER, OCAP, REL, IDS, BEAT, prefixed, expandIRI, compactIRI, } from './vocabulary';
12
+ export { DIRECTIONS, DIRECTION_COLORS, NODE_TYPE_COLORS, CEREMONY_ICONS, DIRECTION_MAP, DIRECTION_NAMES, NODE_TYPES, CEREMONY_TYPES, OJIBWE_NAMES, DIRECTION_SEASONS, DIRECTION_ACTS, ACT_DIRECTIONS, SUN_NAMES, SUN_DESCRIPTIONS, CEREMONY_PHASES, CEREMONY_PHASE_DESCRIPTIONS, PERSON_ROLES, RSIS_RELATION_TYPES, GOVERNANCE_ACCESS_LEVELS, DIRECTION_INFO, } from './constants';
13
+ export { DirectionNameSchema, NodeTypeSchema, CeremonyTypeSchema, ObligationCategorySchema, TensionPhaseSchema, EpistemicSourceSchema, AxiologicalPillarSchema, ConsentStateSchema, AccessLevelSchema, PossessionLocationSchema, DirectionSchema, RelationalNodeSchema, RelationalEdgeSchema, RelationalObligationSchema, OcapFlagsSchema, AccountabilityTrackingSchema, CeremonyContextSchema, RelationSchema, CeremonyGuidanceSchema, CeremonyLogSchema, NarrativeBeatSchema, MedicineWheelCycleSchema, ActionStepSchema, StructuralTensionChartSchema, DirectionResponseSchema, } from './schemas';
14
+ export type { ValidatedDirection, ValidatedRelationalNode, ValidatedRelationalEdge, ValidatedRelation, ValidatedOcapFlags, ValidatedAccountabilityTracking, ValidatedCeremonyLog, ValidatedNarrativeBeat, ValidatedMedicineWheelCycle, ValidatedStructuralTensionChart, } from './schemas';
15
+ export { nodesByDirection, nodesByType, nodeById, relationsForNode, relationsByType, neighborIds, traverseRelationalWeb, computeWilsonAlignment, aggregateWilsonAlignment, cycleWilsonAlignment, findAccountabilityGaps, checkOcapCompliance, auditOcapCompliance, beatsByDirection, beatsByAct, allDirectionsVisited, ceremoniesByDirection, ceremonyCounts, relationalCompleteness, } from './queries';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,YAAY,EACV,aAAa,EACb,SAAS,EACT,QAAQ,EACR,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,SAAS,EACT,sBAAsB,EACtB,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,sBAAsB,EACtB,UAAU,EACV,iBAAiB,EACjB,MA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nB,wBAAwB,EACxB,gBAAgB,EAChB,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,WAAW,CAAC;AAGnB,YAAY,EACV,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,+BAA+B,EAC/B,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACd,sBAAsB,GACvB,MAAM,WAAW,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ /**
3
+ * @medicine-wheel/ontology-core
4
+ *
5
+ * Foundational ontology layer for the Medicine Wheel Developer Suite.
6
+ * Unified types, RDF vocabulary, Zod schemas, constants, and semantic
7
+ * query helpers — grounded in Indigenous relational ontology.
8
+ *
9
+ * @packageDocumentation
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ConsentStateSchema = exports.AxiologicalPillarSchema = exports.EpistemicSourceSchema = exports.TensionPhaseSchema = exports.ObligationCategorySchema = exports.CeremonyTypeSchema = exports.NodeTypeSchema = exports.DirectionNameSchema = exports.DIRECTION_INFO = exports.GOVERNANCE_ACCESS_LEVELS = exports.RSIS_RELATION_TYPES = exports.PERSON_ROLES = exports.CEREMONY_PHASE_DESCRIPTIONS = exports.CEREMONY_PHASES = exports.SUN_DESCRIPTIONS = exports.SUN_NAMES = exports.ACT_DIRECTIONS = exports.DIRECTION_ACTS = exports.DIRECTION_SEASONS = exports.OJIBWE_NAMES = exports.CEREMONY_TYPES = exports.NODE_TYPES = exports.DIRECTION_NAMES = exports.DIRECTION_MAP = exports.CEREMONY_ICONS = exports.NODE_TYPE_COLORS = exports.DIRECTION_COLORS = exports.DIRECTIONS = exports.compactIRI = exports.expandIRI = exports.prefixed = exports.BEAT = exports.IDS = exports.REL = exports.OCAP = exports.CER = exports.MW = exports.PREFIXES = exports.SHACL_NS = exports.PROV_NS = exports.SKOS_NS = exports.OWL_NS = exports.RDFS_NS = exports.RDF_NS = exports.BEAT_NS = exports.CER_NS = exports.REL_NS = exports.OCAP_NS = exports.IDS_NS = exports.MW_NS = void 0;
13
+ exports.relationalCompleteness = exports.ceremonyCounts = exports.ceremoniesByDirection = exports.allDirectionsVisited = exports.beatsByAct = exports.beatsByDirection = exports.auditOcapCompliance = exports.checkOcapCompliance = exports.findAccountabilityGaps = exports.cycleWilsonAlignment = exports.aggregateWilsonAlignment = exports.computeWilsonAlignment = exports.traverseRelationalWeb = exports.neighborIds = exports.relationsByType = exports.relationsForNode = exports.nodeById = exports.nodesByType = exports.nodesByDirection = exports.DirectionResponseSchema = exports.StructuralTensionChartSchema = exports.ActionStepSchema = exports.MedicineWheelCycleSchema = exports.NarrativeBeatSchema = exports.CeremonyLogSchema = exports.CeremonyGuidanceSchema = exports.RelationSchema = exports.CeremonyContextSchema = exports.AccountabilityTrackingSchema = exports.OcapFlagsSchema = exports.RelationalObligationSchema = exports.RelationalEdgeSchema = exports.RelationalNodeSchema = exports.DirectionSchema = exports.PossessionLocationSchema = exports.AccessLevelSchema = void 0;
14
+ // ── RDF Vocabulary ──────────────────────────────────────────────────────────
15
+ var vocabulary_1 = require("./vocabulary");
16
+ Object.defineProperty(exports, "MW_NS", { enumerable: true, get: function () { return vocabulary_1.MW_NS; } });
17
+ Object.defineProperty(exports, "IDS_NS", { enumerable: true, get: function () { return vocabulary_1.IDS_NS; } });
18
+ Object.defineProperty(exports, "OCAP_NS", { enumerable: true, get: function () { return vocabulary_1.OCAP_NS; } });
19
+ Object.defineProperty(exports, "REL_NS", { enumerable: true, get: function () { return vocabulary_1.REL_NS; } });
20
+ Object.defineProperty(exports, "CER_NS", { enumerable: true, get: function () { return vocabulary_1.CER_NS; } });
21
+ Object.defineProperty(exports, "BEAT_NS", { enumerable: true, get: function () { return vocabulary_1.BEAT_NS; } });
22
+ Object.defineProperty(exports, "RDF_NS", { enumerable: true, get: function () { return vocabulary_1.RDF_NS; } });
23
+ Object.defineProperty(exports, "RDFS_NS", { enumerable: true, get: function () { return vocabulary_1.RDFS_NS; } });
24
+ Object.defineProperty(exports, "OWL_NS", { enumerable: true, get: function () { return vocabulary_1.OWL_NS; } });
25
+ Object.defineProperty(exports, "SKOS_NS", { enumerable: true, get: function () { return vocabulary_1.SKOS_NS; } });
26
+ Object.defineProperty(exports, "PROV_NS", { enumerable: true, get: function () { return vocabulary_1.PROV_NS; } });
27
+ Object.defineProperty(exports, "SHACL_NS", { enumerable: true, get: function () { return vocabulary_1.SHACL_NS; } });
28
+ Object.defineProperty(exports, "PREFIXES", { enumerable: true, get: function () { return vocabulary_1.PREFIXES; } });
29
+ Object.defineProperty(exports, "MW", { enumerable: true, get: function () { return vocabulary_1.MW; } });
30
+ Object.defineProperty(exports, "CER", { enumerable: true, get: function () { return vocabulary_1.CER; } });
31
+ Object.defineProperty(exports, "OCAP", { enumerable: true, get: function () { return vocabulary_1.OCAP; } });
32
+ Object.defineProperty(exports, "REL", { enumerable: true, get: function () { return vocabulary_1.REL; } });
33
+ Object.defineProperty(exports, "IDS", { enumerable: true, get: function () { return vocabulary_1.IDS; } });
34
+ Object.defineProperty(exports, "BEAT", { enumerable: true, get: function () { return vocabulary_1.BEAT; } });
35
+ Object.defineProperty(exports, "prefixed", { enumerable: true, get: function () { return vocabulary_1.prefixed; } });
36
+ Object.defineProperty(exports, "expandIRI", { enumerable: true, get: function () { return vocabulary_1.expandIRI; } });
37
+ Object.defineProperty(exports, "compactIRI", { enumerable: true, get: function () { return vocabulary_1.compactIRI; } });
38
+ // ── Constants ───────────────────────────────────────────────────────────────
39
+ var constants_1 = require("./constants");
40
+ Object.defineProperty(exports, "DIRECTIONS", { enumerable: true, get: function () { return constants_1.DIRECTIONS; } });
41
+ Object.defineProperty(exports, "DIRECTION_COLORS", { enumerable: true, get: function () { return constants_1.DIRECTION_COLORS; } });
42
+ Object.defineProperty(exports, "NODE_TYPE_COLORS", { enumerable: true, get: function () { return constants_1.NODE_TYPE_COLORS; } });
43
+ Object.defineProperty(exports, "CEREMONY_ICONS", { enumerable: true, get: function () { return constants_1.CEREMONY_ICONS; } });
44
+ Object.defineProperty(exports, "DIRECTION_MAP", { enumerable: true, get: function () { return constants_1.DIRECTION_MAP; } });
45
+ Object.defineProperty(exports, "DIRECTION_NAMES", { enumerable: true, get: function () { return constants_1.DIRECTION_NAMES; } });
46
+ Object.defineProperty(exports, "NODE_TYPES", { enumerable: true, get: function () { return constants_1.NODE_TYPES; } });
47
+ Object.defineProperty(exports, "CEREMONY_TYPES", { enumerable: true, get: function () { return constants_1.CEREMONY_TYPES; } });
48
+ Object.defineProperty(exports, "OJIBWE_NAMES", { enumerable: true, get: function () { return constants_1.OJIBWE_NAMES; } });
49
+ Object.defineProperty(exports, "DIRECTION_SEASONS", { enumerable: true, get: function () { return constants_1.DIRECTION_SEASONS; } });
50
+ Object.defineProperty(exports, "DIRECTION_ACTS", { enumerable: true, get: function () { return constants_1.DIRECTION_ACTS; } });
51
+ Object.defineProperty(exports, "ACT_DIRECTIONS", { enumerable: true, get: function () { return constants_1.ACT_DIRECTIONS; } });
52
+ // RSIS constants
53
+ Object.defineProperty(exports, "SUN_NAMES", { enumerable: true, get: function () { return constants_1.SUN_NAMES; } });
54
+ Object.defineProperty(exports, "SUN_DESCRIPTIONS", { enumerable: true, get: function () { return constants_1.SUN_DESCRIPTIONS; } });
55
+ Object.defineProperty(exports, "CEREMONY_PHASES", { enumerable: true, get: function () { return constants_1.CEREMONY_PHASES; } });
56
+ Object.defineProperty(exports, "CEREMONY_PHASE_DESCRIPTIONS", { enumerable: true, get: function () { return constants_1.CEREMONY_PHASE_DESCRIPTIONS; } });
57
+ Object.defineProperty(exports, "PERSON_ROLES", { enumerable: true, get: function () { return constants_1.PERSON_ROLES; } });
58
+ Object.defineProperty(exports, "RSIS_RELATION_TYPES", { enumerable: true, get: function () { return constants_1.RSIS_RELATION_TYPES; } });
59
+ Object.defineProperty(exports, "GOVERNANCE_ACCESS_LEVELS", { enumerable: true, get: function () { return constants_1.GOVERNANCE_ACCESS_LEVELS; } });
60
+ Object.defineProperty(exports, "DIRECTION_INFO", { enumerable: true, get: function () { return constants_1.DIRECTION_INFO; } });
61
+ // ── Zod Schemas ─────────────────────────────────────────────────────────────
62
+ var schemas_1 = require("./schemas");
63
+ Object.defineProperty(exports, "DirectionNameSchema", { enumerable: true, get: function () { return schemas_1.DirectionNameSchema; } });
64
+ Object.defineProperty(exports, "NodeTypeSchema", { enumerable: true, get: function () { return schemas_1.NodeTypeSchema; } });
65
+ Object.defineProperty(exports, "CeremonyTypeSchema", { enumerable: true, get: function () { return schemas_1.CeremonyTypeSchema; } });
66
+ Object.defineProperty(exports, "ObligationCategorySchema", { enumerable: true, get: function () { return schemas_1.ObligationCategorySchema; } });
67
+ Object.defineProperty(exports, "TensionPhaseSchema", { enumerable: true, get: function () { return schemas_1.TensionPhaseSchema; } });
68
+ Object.defineProperty(exports, "EpistemicSourceSchema", { enumerable: true, get: function () { return schemas_1.EpistemicSourceSchema; } });
69
+ Object.defineProperty(exports, "AxiologicalPillarSchema", { enumerable: true, get: function () { return schemas_1.AxiologicalPillarSchema; } });
70
+ Object.defineProperty(exports, "ConsentStateSchema", { enumerable: true, get: function () { return schemas_1.ConsentStateSchema; } });
71
+ Object.defineProperty(exports, "AccessLevelSchema", { enumerable: true, get: function () { return schemas_1.AccessLevelSchema; } });
72
+ Object.defineProperty(exports, "PossessionLocationSchema", { enumerable: true, get: function () { return schemas_1.PossessionLocationSchema; } });
73
+ Object.defineProperty(exports, "DirectionSchema", { enumerable: true, get: function () { return schemas_1.DirectionSchema; } });
74
+ Object.defineProperty(exports, "RelationalNodeSchema", { enumerable: true, get: function () { return schemas_1.RelationalNodeSchema; } });
75
+ Object.defineProperty(exports, "RelationalEdgeSchema", { enumerable: true, get: function () { return schemas_1.RelationalEdgeSchema; } });
76
+ Object.defineProperty(exports, "RelationalObligationSchema", { enumerable: true, get: function () { return schemas_1.RelationalObligationSchema; } });
77
+ Object.defineProperty(exports, "OcapFlagsSchema", { enumerable: true, get: function () { return schemas_1.OcapFlagsSchema; } });
78
+ Object.defineProperty(exports, "AccountabilityTrackingSchema", { enumerable: true, get: function () { return schemas_1.AccountabilityTrackingSchema; } });
79
+ Object.defineProperty(exports, "CeremonyContextSchema", { enumerable: true, get: function () { return schemas_1.CeremonyContextSchema; } });
80
+ Object.defineProperty(exports, "RelationSchema", { enumerable: true, get: function () { return schemas_1.RelationSchema; } });
81
+ Object.defineProperty(exports, "CeremonyGuidanceSchema", { enumerable: true, get: function () { return schemas_1.CeremonyGuidanceSchema; } });
82
+ Object.defineProperty(exports, "CeremonyLogSchema", { enumerable: true, get: function () { return schemas_1.CeremonyLogSchema; } });
83
+ Object.defineProperty(exports, "NarrativeBeatSchema", { enumerable: true, get: function () { return schemas_1.NarrativeBeatSchema; } });
84
+ Object.defineProperty(exports, "MedicineWheelCycleSchema", { enumerable: true, get: function () { return schemas_1.MedicineWheelCycleSchema; } });
85
+ Object.defineProperty(exports, "ActionStepSchema", { enumerable: true, get: function () { return schemas_1.ActionStepSchema; } });
86
+ Object.defineProperty(exports, "StructuralTensionChartSchema", { enumerable: true, get: function () { return schemas_1.StructuralTensionChartSchema; } });
87
+ Object.defineProperty(exports, "DirectionResponseSchema", { enumerable: true, get: function () { return schemas_1.DirectionResponseSchema; } });
88
+ // ── Semantic Query Helpers ──────────────────────────────────────────────────
89
+ var queries_1 = require("./queries");
90
+ Object.defineProperty(exports, "nodesByDirection", { enumerable: true, get: function () { return queries_1.nodesByDirection; } });
91
+ Object.defineProperty(exports, "nodesByType", { enumerable: true, get: function () { return queries_1.nodesByType; } });
92
+ Object.defineProperty(exports, "nodeById", { enumerable: true, get: function () { return queries_1.nodeById; } });
93
+ Object.defineProperty(exports, "relationsForNode", { enumerable: true, get: function () { return queries_1.relationsForNode; } });
94
+ Object.defineProperty(exports, "relationsByType", { enumerable: true, get: function () { return queries_1.relationsByType; } });
95
+ Object.defineProperty(exports, "neighborIds", { enumerable: true, get: function () { return queries_1.neighborIds; } });
96
+ Object.defineProperty(exports, "traverseRelationalWeb", { enumerable: true, get: function () { return queries_1.traverseRelationalWeb; } });
97
+ Object.defineProperty(exports, "computeWilsonAlignment", { enumerable: true, get: function () { return queries_1.computeWilsonAlignment; } });
98
+ Object.defineProperty(exports, "aggregateWilsonAlignment", { enumerable: true, get: function () { return queries_1.aggregateWilsonAlignment; } });
99
+ Object.defineProperty(exports, "cycleWilsonAlignment", { enumerable: true, get: function () { return queries_1.cycleWilsonAlignment; } });
100
+ Object.defineProperty(exports, "findAccountabilityGaps", { enumerable: true, get: function () { return queries_1.findAccountabilityGaps; } });
101
+ Object.defineProperty(exports, "checkOcapCompliance", { enumerable: true, get: function () { return queries_1.checkOcapCompliance; } });
102
+ Object.defineProperty(exports, "auditOcapCompliance", { enumerable: true, get: function () { return queries_1.auditOcapCompliance; } });
103
+ Object.defineProperty(exports, "beatsByDirection", { enumerable: true, get: function () { return queries_1.beatsByDirection; } });
104
+ Object.defineProperty(exports, "beatsByAct", { enumerable: true, get: function () { return queries_1.beatsByAct; } });
105
+ Object.defineProperty(exports, "allDirectionsVisited", { enumerable: true, get: function () { return queries_1.allDirectionsVisited; } });
106
+ Object.defineProperty(exports, "ceremoniesByDirection", { enumerable: true, get: function () { return queries_1.ceremoniesByDirection; } });
107
+ Object.defineProperty(exports, "ceremonyCounts", { enumerable: true, get: function () { return queries_1.ceremonyCounts; } });
108
+ Object.defineProperty(exports, "relationalCompleteness", { enumerable: true, get: function () { return queries_1.relationalCompleteness; } });
109
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @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OAAA;AACd,iHAAA,sBAAsB,OAAA"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * @medicine-wheel/ontology-core — Semantic Query Helpers
3
+ *
4
+ * Functions for traversing relational webs, computing Wilson alignment
5
+ * metrics, and checking OCAP® compliance. These helpers operate on
6
+ * in-memory collections — the storage layer (Redis, etc.) is external.
7
+ */
8
+ import type { DirectionName, NodeType, RelationalNode, Relation, RelationalEdge, NarrativeBeat, MedicineWheelCycle, CeremonyLog, OcapFlags, AccountabilityTracking } from './types';
9
+ /** Find all nodes aligned with a given direction */
10
+ export declare function nodesByDirection(nodes: RelationalNode[], direction: DirectionName): RelationalNode[];
11
+ /** Find all nodes of a given type */
12
+ export declare function nodesByType(nodes: RelationalNode[], type: NodeType): RelationalNode[];
13
+ /** Find a node by ID */
14
+ export declare function nodeById(nodes: RelationalNode[], id: string): RelationalNode | undefined;
15
+ /** Get all relations connected to a given node (as source or target) */
16
+ export declare function relationsForNode(relations: Relation[], nodeId: string): Relation[];
17
+ /** Get all relations of a given type */
18
+ export declare function relationsByType(relations: Relation[], type: string): Relation[];
19
+ /** Get neighbor node IDs for a given node through its relations */
20
+ export declare function neighborIds(relations: Relation[] | RelationalEdge[], nodeId: string): string[];
21
+ /** Traverse the relational web from a starting node up to a given depth */
22
+ export declare function traverseRelationalWeb(nodes: RelationalNode[], relations: Relation[] | RelationalEdge[], startNodeId: string, maxDepth?: number): {
23
+ visited: Set<string>;
24
+ paths: string[][];
25
+ };
26
+ /**
27
+ * Compute Wilson alignment score for a single accountability tracking object.
28
+ * Wilson's three R's (Respect, Reciprocity, Responsibility) are averaged.
29
+ */
30
+ export declare function computeWilsonAlignment(accountability: AccountabilityTracking): number;
31
+ /**
32
+ * Compute aggregate Wilson alignment across a collection of relations.
33
+ * Returns 0 if no relations exist.
34
+ */
35
+ export declare function aggregateWilsonAlignment(relations: Relation[]): number;
36
+ /**
37
+ * Compute Wilson alignment for a Medicine Wheel cycle based on its
38
+ * ceremonies conducted and relations mapped.
39
+ */
40
+ export declare function cycleWilsonAlignment(cycle: MedicineWheelCycle, relations: Relation[]): number;
41
+ /**
42
+ * Identify relations with low Wilson alignment (below threshold).
43
+ * These represent accountability gaps requiring ceremonial attention.
44
+ */
45
+ export declare function findAccountabilityGaps(relations: Relation[], threshold?: number): Relation[];
46
+ /**
47
+ * Check whether OCAP® flags meet compliance requirements.
48
+ * Full compliance requires: ownership specified, control specified,
49
+ * access not 'public' (for Indigenous data), and compliant flag true.
50
+ */
51
+ export declare function checkOcapCompliance(ocap: OcapFlags): {
52
+ compliant: boolean;
53
+ issues: string[];
54
+ };
55
+ /**
56
+ * Check OCAP® compliance across all relations.
57
+ * Returns summary with overall status and per-relation issues.
58
+ */
59
+ export declare function auditOcapCompliance(relations: Relation[]): {
60
+ overall_compliant: boolean;
61
+ compliant_count: number;
62
+ non_compliant_count: number;
63
+ issues: {
64
+ relation_id: string;
65
+ issues: string[];
66
+ }[];
67
+ };
68
+ /** Get beats for a specific direction */
69
+ export declare function beatsByDirection(beats: NarrativeBeat[], direction: DirectionName): NarrativeBeat[];
70
+ /** Get beats for a specific act number */
71
+ export declare function beatsByAct(beats: NarrativeBeat[], act: number): NarrativeBeat[];
72
+ /** Check whether all four directions have been visited in a set of beats */
73
+ export declare function allDirectionsVisited(beats: NarrativeBeat[]): boolean;
74
+ /** Get ceremonies for a specific direction */
75
+ export declare function ceremoniesByDirection(ceremonies: CeremonyLog[], direction: DirectionName): CeremonyLog[];
76
+ /** Count ceremonies across all directions */
77
+ export declare function ceremonyCounts(ceremonies: CeremonyLog[]): Record<DirectionName, number>;
78
+ /**
79
+ * Assess relational completeness of a node — how well connected it is
80
+ * across all obligation categories (human, land, spirit, future).
81
+ */
82
+ export declare function relationalCompleteness(nodeId: string, relations: Relation[]): {
83
+ total_relations: number;
84
+ obligation_categories_covered: string[];
85
+ missing_categories: string[];
86
+ ceremony_coverage: number;
87
+ };
88
+ //# sourceMappingURL=queries.d.ts.map
@@ -0,0 +1 @@
1
+ {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