@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.
Files changed (78) hide show
  1. package/dist/index.d.ts +3 -0
  2. package/dist/index.d.ts.map +1 -0
  3. package/dist/index.js +115 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/jsonl-store.d.ts +184 -0
  6. package/dist/jsonl-store.d.ts.map +1 -0
  7. package/dist/jsonl-store.js +393 -0
  8. package/dist/jsonl-store.js.map +1 -0
  9. package/dist/prompts/index.d.ts +3 -0
  10. package/dist/prompts/index.d.ts.map +1 -0
  11. package/dist/prompts/index.js +229 -0
  12. package/dist/prompts/index.js.map +1 -0
  13. package/dist/resources/index.d.ts +3 -0
  14. package/dist/resources/index.d.ts.map +1 -0
  15. package/dist/resources/index.js +252 -0
  16. package/dist/resources/index.js.map +1 -0
  17. package/dist/store.d.ts +15 -0
  18. package/dist/store.d.ts.map +1 -0
  19. package/dist/store.js +16 -0
  20. package/dist/store.js.map +1 -0
  21. package/dist/tools/ceremony-lifecycle.d.ts +10 -0
  22. package/dist/tools/ceremony-lifecycle.d.ts.map +1 -0
  23. package/dist/tools/ceremony-lifecycle.js +275 -0
  24. package/dist/tools/ceremony-lifecycle.js.map +1 -0
  25. package/dist/tools/coordination.d.ts +10 -0
  26. package/dist/tools/coordination.d.ts.map +1 -0
  27. package/dist/tools/coordination.js +136 -0
  28. package/dist/tools/coordination.js.map +1 -0
  29. package/dist/tools/discovery.d.ts +11 -0
  30. package/dist/tools/discovery.d.ts.map +1 -0
  31. package/dist/tools/discovery.js +552 -0
  32. package/dist/tools/discovery.js.map +1 -0
  33. package/dist/tools/east.d.ts +3 -0
  34. package/dist/tools/east.d.ts.map +1 -0
  35. package/dist/tools/east.js +271 -0
  36. package/dist/tools/east.js.map +1 -0
  37. package/dist/tools/epistemic.d.ts +10 -0
  38. package/dist/tools/epistemic.d.ts.map +1 -0
  39. package/dist/tools/epistemic.js +159 -0
  40. package/dist/tools/epistemic.js.map +1 -0
  41. package/dist/tools/governance-transformation.d.ts +10 -0
  42. package/dist/tools/governance-transformation.d.ts.map +1 -0
  43. package/dist/tools/governance-transformation.js +181 -0
  44. package/dist/tools/governance-transformation.js.map +1 -0
  45. package/dist/tools/integrations.d.ts +9 -0
  46. package/dist/tools/integrations.d.ts.map +1 -0
  47. package/dist/tools/integrations.js +643 -0
  48. package/dist/tools/integrations.js.map +1 -0
  49. package/dist/tools/north.d.ts +3 -0
  50. package/dist/tools/north.d.ts.map +1 -0
  51. package/dist/tools/north.js +436 -0
  52. package/dist/tools/north.js.map +1 -0
  53. package/dist/tools/reasoning-observability.d.ts +10 -0
  54. package/dist/tools/reasoning-observability.d.ts.map +1 -0
  55. package/dist/tools/reasoning-observability.js +90 -0
  56. package/dist/tools/reasoning-observability.js.map +1 -0
  57. package/dist/tools/south.d.ts +3 -0
  58. package/dist/tools/south.d.ts.map +1 -0
  59. package/dist/tools/south.js +295 -0
  60. package/dist/tools/south.js.map +1 -0
  61. package/dist/tools/structural-tension.d.ts +15 -0
  62. package/dist/tools/structural-tension.d.ts.map +1 -0
  63. package/dist/tools/structural-tension.js +695 -0
  64. package/dist/tools/structural-tension.js.map +1 -0
  65. package/dist/tools/west.d.ts +3 -0
  66. package/dist/tools/west.d.ts.map +1 -0
  67. package/dist/tools/west.js +313 -0
  68. package/dist/tools/west.js.map +1 -0
  69. package/dist/types.d.ts +28 -0
  70. package/dist/types.d.ts.map +1 -0
  71. package/dist/types.js +9 -0
  72. package/dist/types.js.map +1 -0
  73. package/dist/validators/index.d.ts +3 -0
  74. package/dist/validators/index.d.ts.map +1 -0
  75. package/dist/validators/index.js +388 -0
  76. package/dist/validators/index.js.map +1 -0
  77. package/package.json +48 -0
  78. package/tsconfig.json +20 -0
@@ -0,0 +1,136 @@
1
+ /**
2
+ * Coordination Tools — Fire Keeper & Ceremony Protocol
3
+ *
4
+ * These tools leverage the @medicine-wheel/fire-keeper and
5
+ * @medicine-wheel/ceremony-protocol packages to ensure relational integrity
6
+ * and active stewardship of the research process.
7
+ */
8
+ import { FireKeeper, relationalCheckBack, DEFAULT_GATES } from "@medicine-wheel/fire-keeper";
9
+ import { enforceCeremonyGate, getPhaseFraming } from "@medicine-wheel/ceremony-protocol";
10
+ // Initialize Fire Keeper with default configuration
11
+ const keeper = new FireKeeper({
12
+ trajectoryThreshold: 0.65,
13
+ permissionTiers: ['observe', 'analyze', 'propose', 'act'],
14
+ gatingConditions: DEFAULT_GATES,
15
+ humanDecisionPoints: []
16
+ });
17
+ export const coordinationTools = [
18
+ {
19
+ name: "mw_fire_keeper_status",
20
+ description: "Check the status of the Fire Keeper and active ceremonies. Monitors trajectory confidence and active stop-work orders.",
21
+ inputSchema: {
22
+ type: "object",
23
+ properties: {
24
+ inquiryRef: {
25
+ type: "string",
26
+ description: "Reference to the active inquiry or research cycle",
27
+ }
28
+ },
29
+ required: ["inquiryRef"],
30
+ },
31
+ handler: async (args) => {
32
+ try {
33
+ const { inquiryRef } = args;
34
+ const alignment = keeper.checkRelationalAlignment(inquiryRef);
35
+ const state = keeper.checkCeremonyState(inquiryRef);
36
+ return {
37
+ status: alignment.aligned ? "aligned" : "tension",
38
+ confidence: alignment.confidence,
39
+ issues: alignment.issues,
40
+ phase: state?.ceremonyPhase,
41
+ phase_framing: state ? getPhaseFraming(state.ceremonyPhase) : "No active ceremony",
42
+ teaching: "The Fire Keeper tends the fire so the ceremony can proceed with relational integrity."
43
+ };
44
+ }
45
+ catch (error) {
46
+ return { status: "error", message: String(error) };
47
+ }
48
+ }
49
+ },
50
+ {
51
+ name: "mw_relational_check_back",
52
+ description: "Perform the sacred 4-step relational check-back before any autonomous action. Verifies if an action honors relations, strengthens the spirit-body relationship, is accountable to all directions, and would be approved by an Elder.",
53
+ inputSchema: {
54
+ type: "object",
55
+ properties: {
56
+ action: {
57
+ type: "string",
58
+ description: "Description of the proposed action to verify",
59
+ },
60
+ inquiryRef: {
61
+ type: "string",
62
+ description: "Reference to the active inquiry",
63
+ }
64
+ },
65
+ required: ["action", "inquiryRef"],
66
+ },
67
+ handler: async (args) => {
68
+ try {
69
+ const { action, inquiryRef } = args;
70
+ const state = keeper.checkCeremonyState(inquiryRef);
71
+ if (!state) {
72
+ return { status: "error", message: `No active ceremony found for ${inquiryRef}` };
73
+ }
74
+ // Build context for check-back
75
+ const context = {
76
+ ceremonyState: state,
77
+ wilsonAlignment: keeper.checkRelationalAlignment(inquiryRef).confidence,
78
+ ocapCompliant: true
79
+ };
80
+ const result = relationalCheckBack(action, context);
81
+ return {
82
+ approved: result.approved,
83
+ summary: result.summary,
84
+ steps: result.steps.map(s => ({
85
+ step: s.step,
86
+ question: s.question,
87
+ passed: s.passed,
88
+ reason: s.reason
89
+ })),
90
+ teaching: "Before you act, listen. Every action moves the web."
91
+ };
92
+ }
93
+ catch (error) {
94
+ return { status: "error", message: String(error) };
95
+ }
96
+ }
97
+ },
98
+ {
99
+ name: "mw_enforce_gate",
100
+ description: "Enforce a ceremony gate on a file path based on current governance configuration. Blocks changes to restricted or sacred paths without proper authority.",
101
+ inputSchema: {
102
+ type: "object",
103
+ properties: {
104
+ filePath: {
105
+ type: "string",
106
+ description: "The path to the file or resource to check",
107
+ },
108
+ governanceConfig: {
109
+ type: "object",
110
+ description: "Current governance configuration (optional, uses defaults if omitted)",
111
+ }
112
+ },
113
+ required: ["filePath"],
114
+ },
115
+ handler: async (args) => {
116
+ try {
117
+ const { filePath, governanceConfig = {} } = args;
118
+ const result = enforceCeremonyGate(filePath, governanceConfig);
119
+ return {
120
+ blocked: result.blocked,
121
+ ...(result.blocked ? {
122
+ reason: result.reason,
123
+ required_authority: result.requiredAuthority
124
+ } : {
125
+ message: "Path access permitted by ceremony gate."
126
+ }),
127
+ teaching: "Boundaries are not barriers; they are protocols of respect."
128
+ };
129
+ }
130
+ catch (error) {
131
+ return { status: "error", message: String(error) };
132
+ }
133
+ }
134
+ }
135
+ ];
136
+ //# sourceMappingURL=coordination.js.map
@@ -0,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B;qBACtD,CAAC,CAAC,CAAC;wBACF,OAAO,EAAE,yCAAyC;qBACnD,CAAC;oBACF,QAAQ,EAAE,6DAA6D;iBACxE,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YACrD,CAAC;QACH,CAAC;KACF;CACF,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Discovery Tools - Enable browsing and searching of medicine wheel data
3
+ *
4
+ * These tools address the gap: users couldn't find ceremonies, nodes, beats, or cycles
5
+ * without already knowing IDs. Discovery enables relational exploration.
6
+ *
7
+ * Adapted to use in-memory store instead of Redis/NCP.
8
+ */
9
+ import type { Tool } from "../types.js";
10
+ export declare const discoveryTools: Tool[];
11
+ //# sourceMappingURL=discovery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/tools/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAGxC,eAAO,MAAM,cAAc,EAAE,IAAI,EAgiBhC,CAAC"}