@medicine-wheel/mcp 4.0.0
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/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +115 -0
- package/dist/index.js.map +1 -0
- package/dist/jsonl-store.d.ts +184 -0
- package/dist/jsonl-store.d.ts.map +1 -0
- package/dist/jsonl-store.js +393 -0
- package/dist/jsonl-store.js.map +1 -0
- package/dist/prompts/index.d.ts +3 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +229 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/resources/index.d.ts +3 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +252 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/store.d.ts +15 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +16 -0
- package/dist/store.js.map +1 -0
- package/dist/tools/ceremony-lifecycle.d.ts +10 -0
- package/dist/tools/ceremony-lifecycle.d.ts.map +1 -0
- package/dist/tools/ceremony-lifecycle.js +275 -0
- package/dist/tools/ceremony-lifecycle.js.map +1 -0
- package/dist/tools/coordination.d.ts +10 -0
- package/dist/tools/coordination.d.ts.map +1 -0
- package/dist/tools/coordination.js +136 -0
- package/dist/tools/coordination.js.map +1 -0
- package/dist/tools/discovery.d.ts +11 -0
- package/dist/tools/discovery.d.ts.map +1 -0
- package/dist/tools/discovery.js +552 -0
- package/dist/tools/discovery.js.map +1 -0
- package/dist/tools/east.d.ts +3 -0
- package/dist/tools/east.d.ts.map +1 -0
- package/dist/tools/east.js +271 -0
- package/dist/tools/east.js.map +1 -0
- package/dist/tools/epistemic.d.ts +10 -0
- package/dist/tools/epistemic.d.ts.map +1 -0
- package/dist/tools/epistemic.js +159 -0
- package/dist/tools/epistemic.js.map +1 -0
- package/dist/tools/governance-transformation.d.ts +10 -0
- package/dist/tools/governance-transformation.d.ts.map +1 -0
- package/dist/tools/governance-transformation.js +181 -0
- package/dist/tools/governance-transformation.js.map +1 -0
- package/dist/tools/integrations.d.ts +9 -0
- package/dist/tools/integrations.d.ts.map +1 -0
- package/dist/tools/integrations.js +643 -0
- package/dist/tools/integrations.js.map +1 -0
- package/dist/tools/north.d.ts +3 -0
- package/dist/tools/north.d.ts.map +1 -0
- package/dist/tools/north.js +436 -0
- package/dist/tools/north.js.map +1 -0
- package/dist/tools/reasoning-observability.d.ts +10 -0
- package/dist/tools/reasoning-observability.d.ts.map +1 -0
- package/dist/tools/reasoning-observability.js +90 -0
- package/dist/tools/reasoning-observability.js.map +1 -0
- package/dist/tools/south.d.ts +3 -0
- package/dist/tools/south.d.ts.map +1 -0
- package/dist/tools/south.js +295 -0
- package/dist/tools/south.js.map +1 -0
- package/dist/tools/structural-tension.d.ts +15 -0
- package/dist/tools/structural-tension.d.ts.map +1 -0
- package/dist/tools/structural-tension.js +695 -0
- package/dist/tools/structural-tension.js.map +1 -0
- package/dist/tools/west.d.ts +3 -0
- package/dist/tools/west.d.ts.map +1 -0
- package/dist/tools/west.js +313 -0
- package/dist/tools/west.js.map +1 -0
- package/dist/types.d.ts +28 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +9 -0
- package/dist/types.js.map +1 -0
- package/dist/validators/index.d.ts +3 -0
- package/dist/validators/index.d.ts.map +1 -0
- package/dist/validators/index.js +388 -0
- package/dist/validators/index.js.map +1 -0
- package/package.json +48 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
export const eastTools = [
|
|
2
|
+
{
|
|
3
|
+
name: "east_vision_inquiry",
|
|
4
|
+
description: "EAST Direction (Waabinong) - Spring, New Beginnings, Vision. Invoke tobacco medicine for new research inquiries, map relational obligations, and receive ceremony guidance for opening phases. Ages 0-7: Good Life stage.",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: "object",
|
|
7
|
+
properties: {
|
|
8
|
+
research_question: {
|
|
9
|
+
type: "string",
|
|
10
|
+
description: "The research question or inquiry you are beginning",
|
|
11
|
+
},
|
|
12
|
+
relations_involved: {
|
|
13
|
+
type: "array",
|
|
14
|
+
items: { type: "string" },
|
|
15
|
+
description: "List of relations involved (youth, Elders, land, ancestors, future generations, etc.)",
|
|
16
|
+
},
|
|
17
|
+
cultural_context: {
|
|
18
|
+
type: "string",
|
|
19
|
+
description: "Indigenous territory/cultural context (e.g., Anishinaabe, Innu, Mi'kmaq)",
|
|
20
|
+
},
|
|
21
|
+
timeline_phase: {
|
|
22
|
+
type: "string",
|
|
23
|
+
enum: ["pre-research", "planning", "beginning"],
|
|
24
|
+
description: "Current phase of research",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
required: ["research_question", "relations_involved"],
|
|
28
|
+
},
|
|
29
|
+
handler: async (args) => {
|
|
30
|
+
const { research_question, relations_involved = [], cultural_context = "Indigenous territory", timeline_phase = "pre-research", } = args;
|
|
31
|
+
return {
|
|
32
|
+
direction: "EAST (Waabinong — Yellow — Spring — Tobacco)",
|
|
33
|
+
stage: "Birth-7 Years: Good Life (New Beginnings)",
|
|
34
|
+
ceremony_guidance: {
|
|
35
|
+
opening_practice: "Smudging with tobacco",
|
|
36
|
+
intention: "Honor spirits entering research circle; thank land & ancestors",
|
|
37
|
+
protocol: "Place tobacco on ground; offer gratitude for all relations; acknowledge that knowledge belongs to community",
|
|
38
|
+
medicines_used: ["Tobacco"],
|
|
39
|
+
timeline: "Week 1",
|
|
40
|
+
},
|
|
41
|
+
relational_obligations: {
|
|
42
|
+
human_relations: [
|
|
43
|
+
"Listen deeply to community stories; honor perspectives as valid",
|
|
44
|
+
"Invite Elders as co-investigators; their wisdom validates research",
|
|
45
|
+
"Ensure community engagement & reciprocal benefit",
|
|
46
|
+
"Live congruently with research values; demonstrate respect through actions",
|
|
47
|
+
],
|
|
48
|
+
land_relations: [
|
|
49
|
+
`Acknowledge ${cultural_context} territory and land's role in knowledge`,
|
|
50
|
+
"Ground research in place; land teaches",
|
|
51
|
+
"Recognize how knowledge connects to natural cycles",
|
|
52
|
+
],
|
|
53
|
+
spirit_relations: [
|
|
54
|
+
"Protect stories; don't extract or commodify knowledge",
|
|
55
|
+
"Invoke ancestral guidance; honor those who came before",
|
|
56
|
+
"Treat information as alive; it teaches through relationship",
|
|
57
|
+
],
|
|
58
|
+
future_relations: [
|
|
59
|
+
"Consider next 7 generations in all decisions",
|
|
60
|
+
"Archive knowledge for community (not just academic publication)",
|
|
61
|
+
"Ensure data sovereignty; community retains control",
|
|
62
|
+
"Research as opportunity for healing & revitalization",
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
suggested_practices: [
|
|
66
|
+
{
|
|
67
|
+
name: "Spirit Invitation Ceremony",
|
|
68
|
+
description: "Gather community, Elders, researchers in talking circle; invite spirits via storytelling",
|
|
69
|
+
medicines_used: ["Tobacco", "Sage"],
|
|
70
|
+
timeline: "Week 1",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "Elder Co-Investigator Onboarding",
|
|
74
|
+
description: "Formal role definition; co-authorship; decision-making authority",
|
|
75
|
+
reciprocal_benefit: "Honorarium, co-authorship, community publication",
|
|
76
|
+
timeline: "Week 2",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "Community Advisory Circle",
|
|
80
|
+
description: "Community guides research design; perspectives shape methods",
|
|
81
|
+
protocol: "Talking circle format; stories shared before data collection planned",
|
|
82
|
+
timeline: "Week 2-3",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "Land-Based Opening",
|
|
86
|
+
description: "Conduct first ceremony on land to ground research relationally",
|
|
87
|
+
acknowledgment: `Thank land, acknowledge Indigenous history of ${cultural_context}`,
|
|
88
|
+
timeline: "Week 3",
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
accountability_checkpoint: {
|
|
92
|
+
question: `Does this research honor the spirits of community, land, and ancestors in ${cultural_context}?`,
|
|
93
|
+
next_steps: [
|
|
94
|
+
"Schedule smudging ceremony",
|
|
95
|
+
"Identify Elder co-investigator",
|
|
96
|
+
"Form community advisory circle",
|
|
97
|
+
"Develop OCAP® data stewardship agreement",
|
|
98
|
+
"Define reciprocal benefit for community",
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
relational_accountability_summary: {
|
|
102
|
+
wilson_paradigm_alignment: "Research beginning to embody relational accountability; spirit invocation in place",
|
|
103
|
+
two_eyed_seeing: "Community knowledge (Indigenous) + research rigor (Western) = bridged perspective",
|
|
104
|
+
medicine_wheel: "East direction: New beginning honoring; community as springtime of research",
|
|
105
|
+
next_phase: "South (Summer) will focus on growth practices & embodied learning",
|
|
106
|
+
},
|
|
107
|
+
research_question,
|
|
108
|
+
relations_involved,
|
|
109
|
+
timeline_phase,
|
|
110
|
+
};
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: "east_spirit_invocation",
|
|
115
|
+
description: "Guidance for opening ceremonies, invoking spirits, and establishing sacred research space. Provides tobacco protocol and gratitude practices.",
|
|
116
|
+
inputSchema: {
|
|
117
|
+
type: "object",
|
|
118
|
+
properties: {
|
|
119
|
+
ceremony_type: {
|
|
120
|
+
type: "string",
|
|
121
|
+
enum: ["research_opening", "land_acknowledgment", "elder_invitation"],
|
|
122
|
+
description: "Type of opening ceremony",
|
|
123
|
+
},
|
|
124
|
+
participants: {
|
|
125
|
+
type: "array",
|
|
126
|
+
items: { type: "string" },
|
|
127
|
+
description: "Who will participate (Elders, youth, researchers, etc.)",
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
required: ["ceremony_type"],
|
|
131
|
+
},
|
|
132
|
+
handler: async (args) => {
|
|
133
|
+
const { ceremony_type, participants = [] } = args;
|
|
134
|
+
return {
|
|
135
|
+
direction: "EAST - Spirit Invocation",
|
|
136
|
+
ceremony_type,
|
|
137
|
+
protocol: {
|
|
138
|
+
preparation: [
|
|
139
|
+
"Gather tobacco or other appropriate medicine",
|
|
140
|
+
"Prepare sacred space (clean, respectful environment)",
|
|
141
|
+
"Invite participants with proper notice and respect",
|
|
142
|
+
"Ensure Elder presence and guidance",
|
|
143
|
+
],
|
|
144
|
+
opening: [
|
|
145
|
+
"Begin with silence or song",
|
|
146
|
+
"Offer tobacco to the four directions",
|
|
147
|
+
"State intention clearly and humbly",
|
|
148
|
+
"Acknowledge all relations (human, land, spirit, ancestors)",
|
|
149
|
+
],
|
|
150
|
+
during: [
|
|
151
|
+
"Listen deeply; create space for all voices",
|
|
152
|
+
"Honor storytelling; don't interrupt or extract",
|
|
153
|
+
"Remain present and attentive",
|
|
154
|
+
"Follow Elder guidance for ceremony flow",
|
|
155
|
+
],
|
|
156
|
+
closing: [
|
|
157
|
+
"Express gratitude to all who participated",
|
|
158
|
+
"Thank spirits, land, and ancestors",
|
|
159
|
+
"Confirm next steps and ongoing relationships",
|
|
160
|
+
"Ensure reciprocity is clear",
|
|
161
|
+
],
|
|
162
|
+
},
|
|
163
|
+
medicines: {
|
|
164
|
+
tobacco: "Primary medicine for East; gratitude, humility, connection to all life",
|
|
165
|
+
usage: "Offer to land, carry in pouch, burn in ceremony",
|
|
166
|
+
teaching: "Tobacco carries prayers; use with respect and intention",
|
|
167
|
+
},
|
|
168
|
+
participants,
|
|
169
|
+
reminder: "Research is ceremony. This is not a checkbox but a sacred act of building relationships.",
|
|
170
|
+
};
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
name: "east_new_relation_mapper",
|
|
175
|
+
description: "Map all relational obligations at the start of research: human, land, spirit, ancestors, future generations. Ensures nothing is forgotten.",
|
|
176
|
+
inputSchema: {
|
|
177
|
+
type: "object",
|
|
178
|
+
properties: {
|
|
179
|
+
project_title: {
|
|
180
|
+
type: "string",
|
|
181
|
+
description: "Title of the research project",
|
|
182
|
+
},
|
|
183
|
+
community: {
|
|
184
|
+
type: "string",
|
|
185
|
+
description: "Community or territory involved",
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
required: ["project_title", "community"],
|
|
189
|
+
},
|
|
190
|
+
handler: async (args) => {
|
|
191
|
+
const { project_title, community } = args;
|
|
192
|
+
return {
|
|
193
|
+
direction: "EAST - Relational Mapping",
|
|
194
|
+
project_title,
|
|
195
|
+
community,
|
|
196
|
+
relational_web: {
|
|
197
|
+
human_relations: {
|
|
198
|
+
description: "People directly and indirectly involved",
|
|
199
|
+
mapping: [
|
|
200
|
+
"Elders: Co-investigators, wisdom holders, ceremony guides",
|
|
201
|
+
"Community members: Participants, advisory board, decision-makers",
|
|
202
|
+
"Youth: Future knowledge holders, participants, mentees",
|
|
203
|
+
"Researchers: Responsible for living congruently with topic",
|
|
204
|
+
"Family networks: Extended relations, kinship systems",
|
|
205
|
+
"Future researchers: Those who will build on this work",
|
|
206
|
+
],
|
|
207
|
+
obligations: [
|
|
208
|
+
"Obtain informed consent that honors community protocols",
|
|
209
|
+
"Ensure co-authorship and equitable credit",
|
|
210
|
+
"Provide ongoing updates and transparency",
|
|
211
|
+
"Deliver reciprocal benefits (honoraria, capacity building, publications)",
|
|
212
|
+
],
|
|
213
|
+
},
|
|
214
|
+
land_relations: {
|
|
215
|
+
description: "Territory, waters, ecology as active participants",
|
|
216
|
+
mapping: [
|
|
217
|
+
`${community} territory: Acknowledge Indigenous sovereignty`,
|
|
218
|
+
"Waters: Rivers, lakes as knowledge holders",
|
|
219
|
+
"Plants & animals: Relatives in ecosystem",
|
|
220
|
+
"Seasons & cycles: Timing of research respects natural rhythms",
|
|
221
|
+
],
|
|
222
|
+
obligations: [
|
|
223
|
+
"Land acknowledgment at every gathering",
|
|
224
|
+
"Conduct ceremonies on land (with permission)",
|
|
225
|
+
"Minimize environmental impact",
|
|
226
|
+
"Learn from land; it teaches if we listen",
|
|
227
|
+
],
|
|
228
|
+
},
|
|
229
|
+
spirit_relations: {
|
|
230
|
+
description: "Non-physical beings, ancestors, knowledge spirits",
|
|
231
|
+
mapping: [
|
|
232
|
+
"Ancestors: Those who came before; wisdom carriers",
|
|
233
|
+
"Spirit of knowledge: Information has life; treat with respect",
|
|
234
|
+
"Guardians of place: Spirits protecting territory",
|
|
235
|
+
"Creator/Great Mystery: Source of all relations",
|
|
236
|
+
],
|
|
237
|
+
obligations: [
|
|
238
|
+
"Invoke spirits at ceremonies; invite their guidance",
|
|
239
|
+
"Don't extract knowledge; co-create with spirit present",
|
|
240
|
+
"Honor sacred protocols (smudging, offerings)",
|
|
241
|
+
"Feed ancestors (spirit feeding ceremonies)",
|
|
242
|
+
],
|
|
243
|
+
},
|
|
244
|
+
future_relations: {
|
|
245
|
+
description: "Next 7 generations and beyond",
|
|
246
|
+
mapping: [
|
|
247
|
+
"Unborn children: Their inheritance of knowledge",
|
|
248
|
+
"Future scholars: Will they benefit or be harmed?",
|
|
249
|
+
"Community continuity: Strengthening culture for future",
|
|
250
|
+
"Healing lineages: Breaking colonial patterns",
|
|
251
|
+
],
|
|
252
|
+
obligations: [
|
|
253
|
+
"Archive knowledge for community ownership (OCAP®)",
|
|
254
|
+
"Build capacity for future Indigenous researchers",
|
|
255
|
+
"Ensure sustainability of research relationships",
|
|
256
|
+
"Leave community stronger than you found it",
|
|
257
|
+
],
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
wilson_teaching: "Once you are in relationship, you are responsible for that relationship's wellbeing. This mapping ensures you know all your relations.",
|
|
261
|
+
next_steps: [
|
|
262
|
+
"Review with Elder co-investigator",
|
|
263
|
+
"Present to community advisory board for validation",
|
|
264
|
+
"Incorporate into OCAP® data governance agreement",
|
|
265
|
+
"Revisit quarterly to update and honor ongoing relationships",
|
|
266
|
+
],
|
|
267
|
+
};
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
];
|
|
271
|
+
//# sourceMappingURL=east.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"east.js","sourceRoot":"","sources":["../../src/tools/east.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAW;IAC/B;QACE,IAAI,EAAE,qBAAqB;QAC3B,WAAW,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AkD;4BAClD,iDAAiD;4BACjD,4CAA4C;yBAC7C;qBACF;iBACF;gBACD,eAAe,EAAE,wIAAwI;gBACzJ,UAAU,EAAE;oBACV,mCAAmC;oBACnC,oDAAoD;oBACpD,kDAAkD;oBAClD,6DAA6D;iBAC9D;aACF,CAAC;QACJ,CAAC;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Epistemic Tools — Importance Units & Relational Indexing
|
|
3
|
+
*
|
|
4
|
+
* These tools leverage the @medicine-wheel/importance-unit and
|
|
5
|
+
* @medicine-wheel/relational-index packages to manage weighted knowledge
|
|
6
|
+
* and track the spiral journey of understanding.
|
|
7
|
+
*/
|
|
8
|
+
import type { Tool } from "../types.js";
|
|
9
|
+
export declare const epistemicTools: Tool[];
|
|
10
|
+
//# sourceMappingURL=epistemic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"epistemic.d.ts","sourceRoot":"","sources":["../../src/tools/epistemic.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAcH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAGxC,eAAO,MAAM,cAAc,EAAE,IAAI,EA0JhC,CAAC"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Epistemic Tools — Importance Units & Relational Indexing
|
|
3
|
+
*
|
|
4
|
+
* These tools leverage the @medicine-wheel/importance-unit and
|
|
5
|
+
* @medicine-wheel/relational-index packages to manage weighted knowledge
|
|
6
|
+
* and track the spiral journey of understanding.
|
|
7
|
+
*/
|
|
8
|
+
import { createUnit, circleBack, detectDeepening } from "@medicine-wheel/importance-unit";
|
|
9
|
+
import { store } from "../store.js";
|
|
10
|
+
export const epistemicTools = [
|
|
11
|
+
{
|
|
12
|
+
name: "mw_create_importance_unit",
|
|
13
|
+
description: "Create a relationally-accountable ImportanceUnit. Assigns epistemic weight based on source (land, dream, code, vision) and initializes circle depth at 1.",
|
|
14
|
+
inputSchema: {
|
|
15
|
+
type: "object",
|
|
16
|
+
properties: {
|
|
17
|
+
summary: {
|
|
18
|
+
type: "string",
|
|
19
|
+
description: "The relational meaning of this unit — what it holds, not just what it says",
|
|
20
|
+
},
|
|
21
|
+
source: {
|
|
22
|
+
type: "string",
|
|
23
|
+
enum: ["land", "dream", "code", "vision"],
|
|
24
|
+
description: "Relational origin dimension of knowledge",
|
|
25
|
+
},
|
|
26
|
+
direction: {
|
|
27
|
+
type: "string",
|
|
28
|
+
enum: ["east", "south", "west", "north"],
|
|
29
|
+
description: "Medicine Wheel quadrant alignment",
|
|
30
|
+
},
|
|
31
|
+
createdBy: {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "Agent or person creating this unit",
|
|
34
|
+
},
|
|
35
|
+
axiologicalPillar: {
|
|
36
|
+
type: "string",
|
|
37
|
+
enum: ["ontology", "epistemology", "methodology", "axiology"],
|
|
38
|
+
description: "Wilson's axiological pillar addressed",
|
|
39
|
+
},
|
|
40
|
+
inquiryRef: {
|
|
41
|
+
type: "string",
|
|
42
|
+
description: "Reference to the parent inquiry or research cycle",
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
required: ["summary", "source", "direction", "createdBy"],
|
|
46
|
+
},
|
|
47
|
+
handler: async (args) => {
|
|
48
|
+
try {
|
|
49
|
+
const { summary, source, direction, createdBy, axiologicalPillar, inquiryRef } = args;
|
|
50
|
+
const unit = createUnit({
|
|
51
|
+
summary,
|
|
52
|
+
source: source,
|
|
53
|
+
direction,
|
|
54
|
+
createdBy,
|
|
55
|
+
axiologicalPillar: axiologicalPillar,
|
|
56
|
+
inquiryRef
|
|
57
|
+
});
|
|
58
|
+
// Map to flat knowledge node for existing UI compatibility
|
|
59
|
+
store.createNode({
|
|
60
|
+
id: unit.id,
|
|
61
|
+
type: "knowledge",
|
|
62
|
+
name: summary.slice(0, 50) + (summary.length > 50 ? "..." : ""),
|
|
63
|
+
description: summary,
|
|
64
|
+
direction: unit.direction,
|
|
65
|
+
metadata: {
|
|
66
|
+
...unit.meta,
|
|
67
|
+
source: unit.source,
|
|
68
|
+
epistemicWeight: unit.epistemicWeight,
|
|
69
|
+
circleDepth: unit.circleDepth,
|
|
70
|
+
axiologicalPillar: unit.axiologicalPillar,
|
|
71
|
+
is_importance_unit: true,
|
|
72
|
+
full_content: unit.content
|
|
73
|
+
},
|
|
74
|
+
created_at: unit.meta.createdAt,
|
|
75
|
+
updated_at: unit.meta.createdAt
|
|
76
|
+
});
|
|
77
|
+
return {
|
|
78
|
+
status: "created",
|
|
79
|
+
unit_id: unit.id,
|
|
80
|
+
epistemic_weight: unit.epistemicWeight,
|
|
81
|
+
circle_depth: unit.circleDepth,
|
|
82
|
+
message: `ImportanceUnit created with ${source}-state authority.`,
|
|
83
|
+
teaching: "Knowledge has spirit; treat respectfully, not as property."
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
return { status: "error", message: String(error) };
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "mw_circle_back",
|
|
93
|
+
description: "Circle back to an existing ImportanceUnit to deepen its knowledge. Increments circle depth and records what shifted in this pass.",
|
|
94
|
+
inputSchema: {
|
|
95
|
+
type: "object",
|
|
96
|
+
properties: {
|
|
97
|
+
unit_id: {
|
|
98
|
+
type: "string",
|
|
99
|
+
description: "ID of the ImportanceUnit to deepen",
|
|
100
|
+
},
|
|
101
|
+
shift: {
|
|
102
|
+
type: "string",
|
|
103
|
+
description: "What changed or deepened in this circle pass",
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
required: ["unit_id", "shift"],
|
|
107
|
+
},
|
|
108
|
+
handler: async (args) => {
|
|
109
|
+
try {
|
|
110
|
+
const { unit_id, shift } = args;
|
|
111
|
+
const node = store.getNode(unit_id);
|
|
112
|
+
if (!node || !node.metadata?.is_importance_unit) {
|
|
113
|
+
return { status: "error", message: `ImportanceUnit ${unit_id} not found.` };
|
|
114
|
+
}
|
|
115
|
+
// Reconstruct IU from stored node
|
|
116
|
+
const currentUnit = {
|
|
117
|
+
id: node.id,
|
|
118
|
+
direction: node.direction,
|
|
119
|
+
epistemicWeight: node.metadata.epistemicWeight,
|
|
120
|
+
source: node.metadata.source,
|
|
121
|
+
circleDepth: node.metadata.circleDepth,
|
|
122
|
+
content: node.metadata.full_content,
|
|
123
|
+
meta: {
|
|
124
|
+
createdBy: node.metadata.createdBy,
|
|
125
|
+
createdAt: node.created_at,
|
|
126
|
+
traceId: node.metadata.traceId
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
const deepened = circleBack(currentUnit, shift);
|
|
130
|
+
const analysis = detectDeepening(deepened);
|
|
131
|
+
// Update store
|
|
132
|
+
store.createNode({
|
|
133
|
+
...node,
|
|
134
|
+
metadata: {
|
|
135
|
+
...node.metadata,
|
|
136
|
+
epistemicWeight: deepened.epistemicWeight,
|
|
137
|
+
circleDepth: deepened.circleDepth,
|
|
138
|
+
full_content: deepened.content,
|
|
139
|
+
lastCircledAt: deepened.meta.lastCircledAt
|
|
140
|
+
},
|
|
141
|
+
updated_at: deepened.meta.lastCircledAt || node.updated_at
|
|
142
|
+
});
|
|
143
|
+
return {
|
|
144
|
+
status: "deepened",
|
|
145
|
+
unit_id: deepened.id,
|
|
146
|
+
new_circle_depth: deepened.circleDepth,
|
|
147
|
+
new_epistemic_weight: deepened.epistemicWeight,
|
|
148
|
+
is_deepening: analysis.isDeepening,
|
|
149
|
+
message: `Unit deepened to circle ${deepened.circleDepth}.`,
|
|
150
|
+
teaching: "Repetition is ceremony and deepening, not redundancy."
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
catch (error) {
|
|
154
|
+
return { status: "error", message: String(error) };
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
];
|
|
159
|
+
//# sourceMappingURL=epistemic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1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
5
|
+
* @medicine-wheel/consent-lifecycle, and @medicine-wheel/transformation-tracker
|
|
6
|
+
* to manage the relational health and validity of the research process.
|
|
7
|
+
*/
|
|
8
|
+
import type { Tool } from "../types.js";
|
|
9
|
+
export declare const governanceTransformationTools: Tool[];
|
|
10
|
+
//# sourceMappingURL=governance-transformation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"governance-transformation.d.ts","sourceRoot":"","sources":["../../src/tools/governance-transformation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAkBH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAGxC,eAAO,MAAM,6BAA6B,EAAE,IAAI,EA+K/C,CAAC"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Governance & Transformation Tools
|
|
3
|
+
*
|
|
4
|
+
* These tools leverage @medicine-wheel/community-review,
|
|
5
|
+
* @medicine-wheel/consent-lifecycle, and @medicine-wheel/transformation-tracker
|
|
6
|
+
* to manage the relational health and validity of the research process.
|
|
7
|
+
*/
|
|
8
|
+
import { createReviewCircle } from "@medicine-wheel/community-review";
|
|
9
|
+
import { grantConsent } from "@medicine-wheel/consent-lifecycle";
|
|
10
|
+
import { snapshotUnderstanding, wilsonValidityCheck } from "@medicine-wheel/transformation-tracker";
|
|
11
|
+
import { store } from "../store.js";
|
|
12
|
+
export const governanceTransformationTools = [
|
|
13
|
+
{
|
|
14
|
+
name: "mw_review_circle_open",
|
|
15
|
+
description: "Open a community review circle for an artifact. Initializes in 'gathering' status, awaiting reviewers and talking circle entries.",
|
|
16
|
+
inputSchema: {
|
|
17
|
+
type: "object",
|
|
18
|
+
properties: {
|
|
19
|
+
artifactId: {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "ID of the artifact (e.g., knowledge node, cycle, chart) to review",
|
|
22
|
+
},
|
|
23
|
+
artifactType: {
|
|
24
|
+
type: "string",
|
|
25
|
+
enum: ["research", "ceremony", "knowledge", "code", "narrative"],
|
|
26
|
+
description: "Type of artifact being reviewed",
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
required: ["artifactId", "artifactType"],
|
|
30
|
+
},
|
|
31
|
+
handler: async (args) => {
|
|
32
|
+
try {
|
|
33
|
+
const { artifactId, artifactType } = args;
|
|
34
|
+
const circle = createReviewCircle(artifactId, artifactType);
|
|
35
|
+
// Persist as a specialized node for UI visibility
|
|
36
|
+
store.createNode({
|
|
37
|
+
id: circle.id,
|
|
38
|
+
type: "knowledge",
|
|
39
|
+
name: `Review Circle: ${artifactId}`,
|
|
40
|
+
description: `Community review for ${artifactType} [${artifactId}]`,
|
|
41
|
+
metadata: {
|
|
42
|
+
is_review_circle: true,
|
|
43
|
+
circle_status: circle.status,
|
|
44
|
+
artifact_id: circle.artifactId,
|
|
45
|
+
artifact_type: circle.artifactType,
|
|
46
|
+
full_circle_state: circle
|
|
47
|
+
},
|
|
48
|
+
created_at: circle.createdAt,
|
|
49
|
+
updated_at: circle.createdAt
|
|
50
|
+
});
|
|
51
|
+
return {
|
|
52
|
+
status: "opened",
|
|
53
|
+
circle_id: circle.id,
|
|
54
|
+
message: "Community review circle initiated.",
|
|
55
|
+
teaching: "Validation comes through community consensus, not individual judgment."
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
return { status: "error", message: String(error) };
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "mw_consent_grant",
|
|
65
|
+
description: "Record the initial granting of relational consent. Transitions from 'pending' to 'granted' and establishes the initial scope.",
|
|
66
|
+
inputSchema: {
|
|
67
|
+
type: "object",
|
|
68
|
+
properties: {
|
|
69
|
+
id: { type: "string", description: "Unique consent identifier" },
|
|
70
|
+
grantor: { type: "string", description: "Who gave consent" },
|
|
71
|
+
grantee: { type: "string", description: "Who received consent" },
|
|
72
|
+
scopeDescription: { type: "string", description: "Human-readable description of the consent scope" },
|
|
73
|
+
dataTypes: { type: "array", items: { type: "string" }, description: "Types of data covered" },
|
|
74
|
+
purposes: { type: "array", items: { type: "string" }, description: "Consented purposes" }
|
|
75
|
+
},
|
|
76
|
+
required: ["grantor", "grantee", "scopeDescription"],
|
|
77
|
+
},
|
|
78
|
+
handler: async (args) => {
|
|
79
|
+
try {
|
|
80
|
+
const { id, grantor, grantee, scopeDescription, dataTypes = [], purposes = [] } = args;
|
|
81
|
+
const record = {
|
|
82
|
+
id: id || `consent:${Date.now()}`,
|
|
83
|
+
grantor,
|
|
84
|
+
grantee,
|
|
85
|
+
scope: {
|
|
86
|
+
description: scopeDescription,
|
|
87
|
+
dataTypes,
|
|
88
|
+
purposes,
|
|
89
|
+
restrictions: []
|
|
90
|
+
},
|
|
91
|
+
state: 'pending',
|
|
92
|
+
ceremonies: [],
|
|
93
|
+
history: [],
|
|
94
|
+
communityLevel: false,
|
|
95
|
+
dependentRelations: [],
|
|
96
|
+
ocapFlags: { compliant: false }
|
|
97
|
+
};
|
|
98
|
+
const granted = grantConsent(record);
|
|
99
|
+
store.createNode({
|
|
100
|
+
id: granted.id,
|
|
101
|
+
type: "knowledge",
|
|
102
|
+
name: `Consent: ${grantor} ──▶ ${grantee}`,
|
|
103
|
+
description: scopeDescription,
|
|
104
|
+
metadata: {
|
|
105
|
+
is_consent_record: true,
|
|
106
|
+
consent_state: granted.state,
|
|
107
|
+
full_record: granted
|
|
108
|
+
},
|
|
109
|
+
created_at: new Date().toISOString(),
|
|
110
|
+
updated_at: new Date().toISOString()
|
|
111
|
+
});
|
|
112
|
+
return {
|
|
113
|
+
status: "granted",
|
|
114
|
+
consent_id: granted.id,
|
|
115
|
+
message: "Relational consent granted.",
|
|
116
|
+
teaching: "Consent is a relationship, not an event. You are now responsible for its wellbeing."
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
return { status: "error", message: String(error) };
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: "mw_snapshot_transformation",
|
|
126
|
+
description: "Capture a snapshot of researcher understanding and perform a Wilson validity audit. Tracks growth, community impact, and relational shifts.",
|
|
127
|
+
inputSchema: {
|
|
128
|
+
type: "object",
|
|
129
|
+
properties: {
|
|
130
|
+
researchCycleId: { type: "string", description: "ID of the research cycle being tracked" },
|
|
131
|
+
understanding: { type: "string", description: "Free-text description of current understanding" },
|
|
132
|
+
direction: { type: "string", enum: ["east", "south", "west", "north"], description: "Current direction alignment" },
|
|
133
|
+
ceremonyPhase: { type: "string", enum: ["opening", "council", "integration", "closure"], description: "Current ceremony phase" },
|
|
134
|
+
keyInsights: { type: "array", items: { type: "string" }, description: "New insights gained" },
|
|
135
|
+
openQuestions: { type: "array", items: { type: "string" }, description: "Remaining open questions" }
|
|
136
|
+
},
|
|
137
|
+
required: ["researchCycleId", "understanding", "direction", "ceremonyPhase"],
|
|
138
|
+
},
|
|
139
|
+
handler: async (args) => {
|
|
140
|
+
try {
|
|
141
|
+
const { researchCycleId, understanding, direction, ceremonyPhase, keyInsights = [], openQuestions = [] } = args;
|
|
142
|
+
// Simple log initialization (in real use, we'd load existing log)
|
|
143
|
+
const log = {
|
|
144
|
+
id: `trans:${researchCycleId}`,
|
|
145
|
+
researchCycleId,
|
|
146
|
+
snapshots: [],
|
|
147
|
+
reflections: [],
|
|
148
|
+
communityImpacts: [],
|
|
149
|
+
relationalShifts: [],
|
|
150
|
+
reciprocityLedger: [],
|
|
151
|
+
sevenGenerationScore: 0,
|
|
152
|
+
overallTransformation: 0
|
|
153
|
+
};
|
|
154
|
+
const snapshot = {
|
|
155
|
+
timestamp: new Date().toISOString(),
|
|
156
|
+
direction,
|
|
157
|
+
ceremonyPhase,
|
|
158
|
+
understanding,
|
|
159
|
+
relationsCount: 0, // Should be calculated from store in full implementation
|
|
160
|
+
wilsonAlignment: 0.5,
|
|
161
|
+
keyInsights,
|
|
162
|
+
openQuestions
|
|
163
|
+
};
|
|
164
|
+
const updatedLog = snapshotUnderstanding(log, snapshot);
|
|
165
|
+
const validity = wilsonValidityCheck(updatedLog);
|
|
166
|
+
return {
|
|
167
|
+
status: "snapshot_taken",
|
|
168
|
+
wilson_validity: validity,
|
|
169
|
+
overall_valid: validity.overallValid,
|
|
170
|
+
score: validity.score,
|
|
171
|
+
recommendations: validity.recommendations,
|
|
172
|
+
teaching: "If research doesn't change you, you haven't done it right."
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
catch (error) {
|
|
176
|
+
return { status: "error", message: String(error) };
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
];
|
|
181
|
+
//# sourceMappingURL=governance-transformation.js.map
|