@medicine-wheel/fire-keeper 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 +71 -0
- package/dist/ceremony-state.d.ts +63 -0
- package/dist/ceremony-state.d.ts.map +1 -0
- package/dist/ceremony-state.js +161 -0
- package/dist/ceremony-state.js.map +1 -0
- package/dist/check-back.d.ts +43 -0
- package/dist/check-back.d.ts.map +1 -0
- package/dist/check-back.js +138 -0
- package/dist/check-back.js.map +1 -0
- package/dist/decisions.d.ts +61 -0
- package/dist/decisions.d.ts.map +1 -0
- package/dist/decisions.js +111 -0
- package/dist/decisions.js.map +1 -0
- package/dist/gating.d.ts +55 -0
- package/dist/gating.d.ts.map +1 -0
- package/dist/gating.js +88 -0
- package/dist/gating.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/dist/keeper.d.ts +85 -0
- package/dist/keeper.d.ts.map +1 -0
- package/dist/keeper.js +245 -0
- package/dist/keeper.js.map +1 -0
- package/dist/messages.d.ts +166 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +10 -0
- package/dist/messages.js.map +1 -0
- package/dist/trajectory.d.ts +45 -0
- package/dist/trajectory.d.ts.map +1 -0
- package/dist/trajectory.js +85 -0
- package/dist/trajectory.js.map +1 -0
- package/dist/types.d.ts +161 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +10 -0
- package/dist/types.js.map +1 -0
- package/package.json +42 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @medicine-wheel/fire-keeper — Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Types for the Fire Keeper coordination agent.
|
|
5
|
+
* The Fire Keeper tends the ceremony fire, ensures relational integrity,
|
|
6
|
+
* and maintains Wilson alignment as an active agent — not a passive metric.
|
|
7
|
+
*/
|
|
8
|
+
import type { DirectionName } from '@medicine-wheel/ontology-core';
|
|
9
|
+
/**
|
|
10
|
+
* Extended ceremony phases reflecting the full lifecycle of a ceremony.
|
|
11
|
+
* - gathering: Reading context, collecting materials, honoring what exists
|
|
12
|
+
* - kindling: East work — establishing vision and intent
|
|
13
|
+
* - tending: South/West work — analysis, validation, deepening
|
|
14
|
+
* - harvesting: North work — producing grounded artifacts
|
|
15
|
+
* - resting: Ceremony pause — integration period
|
|
16
|
+
*/
|
|
17
|
+
export type CeremonyPhaseExtended = 'gathering' | 'kindling' | 'tending' | 'harvesting' | 'resting';
|
|
18
|
+
/** Status of a single quadrant (direction) within the ceremony */
|
|
19
|
+
export interface QuadrantStatus {
|
|
20
|
+
/** Whether this quadrant has been visited, is active, or is pending */
|
|
21
|
+
status: 'pending' | 'active' | 'visited' | 'complete';
|
|
22
|
+
/** Number of ImportanceUnits associated with this quadrant */
|
|
23
|
+
unitCount: number;
|
|
24
|
+
/** Deepest circle depth reached in this quadrant */
|
|
25
|
+
deepestCircle: number;
|
|
26
|
+
/** ISO timestamp of last visit, or null if never visited */
|
|
27
|
+
lastVisited: string | null;
|
|
28
|
+
}
|
|
29
|
+
/** Context passed to gating condition evaluators */
|
|
30
|
+
export interface FireKeeperContext {
|
|
31
|
+
/** Current ceremony state */
|
|
32
|
+
ceremonyState: CeremonyStateExtended;
|
|
33
|
+
/** The unit or action being evaluated */
|
|
34
|
+
unitId?: string;
|
|
35
|
+
/** Current Wilson alignment score (0–1) */
|
|
36
|
+
wilsonAlignment?: number;
|
|
37
|
+
/** OCAP compliance status */
|
|
38
|
+
ocapCompliant?: boolean;
|
|
39
|
+
/** Additional metadata */
|
|
40
|
+
metadata?: Record<string, unknown>;
|
|
41
|
+
}
|
|
42
|
+
/** A condition that must be satisfied before ceremony work can proceed */
|
|
43
|
+
export interface GatingCondition {
|
|
44
|
+
/** Human-readable description of the condition */
|
|
45
|
+
condition: string;
|
|
46
|
+
/** Whether this condition must be satisfied (vs. advisory) */
|
|
47
|
+
required: boolean;
|
|
48
|
+
/** Function that evaluates whether the condition is met */
|
|
49
|
+
evaluator: (context: FireKeeperContext) => boolean;
|
|
50
|
+
}
|
|
51
|
+
/** Tracked status of a gating condition within ceremony state */
|
|
52
|
+
export interface GatingConditionStatus {
|
|
53
|
+
/** Human-readable description of the condition */
|
|
54
|
+
condition: string;
|
|
55
|
+
/** Whether the condition has been satisfied */
|
|
56
|
+
satisfied: boolean;
|
|
57
|
+
/** ISO timestamp when satisfied, or null */
|
|
58
|
+
satisfiedAt: string | null;
|
|
59
|
+
/** Who/what satisfied the condition, or null */
|
|
60
|
+
satisfiedBy: string | null;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Permission tiers for agent escalation decisions.
|
|
64
|
+
* - observe: Read files, gather context (no human required)
|
|
65
|
+
* - analyze: Produce analysis, create ImportanceUnits (no human required)
|
|
66
|
+
* - propose: Draft artifacts, suggest schemas (Fire Keeper reviews)
|
|
67
|
+
* - act: Generate code, create commits, modify infrastructure (human required)
|
|
68
|
+
*/
|
|
69
|
+
export type PermissionTier = 'observe' | 'analyze' | 'propose' | 'act';
|
|
70
|
+
/**
|
|
71
|
+
* Types of decision points where human-in-the-loop is triggered.
|
|
72
|
+
* - value-conflict: Trajectory diverges from values or gating override requested
|
|
73
|
+
* - permission-escalation: Agent requests action beyond current tier
|
|
74
|
+
* - circle-completion-review: All four quadrants visited — human confirms
|
|
75
|
+
* - modality-choice: Work requires specific skills/modality selection
|
|
76
|
+
*/
|
|
77
|
+
export type DecisionPointType = 'value-conflict' | 'permission-escalation' | 'circle-completion-review' | 'modality-choice';
|
|
78
|
+
/** A decision point that may require human involvement */
|
|
79
|
+
export interface DecisionPoint {
|
|
80
|
+
/** Category of decision */
|
|
81
|
+
type: DecisionPointType;
|
|
82
|
+
/** Function that determines whether this decision point is triggered */
|
|
83
|
+
trigger: (context: FireKeeperContext) => boolean;
|
|
84
|
+
/** Whether human involvement is mandatory at this point */
|
|
85
|
+
requiresHuman: boolean;
|
|
86
|
+
}
|
|
87
|
+
/** A checkpoint in the ceremony's trajectory history */
|
|
88
|
+
export interface TrajectoryCheckpoint {
|
|
89
|
+
/** ISO timestamp */
|
|
90
|
+
timestamp: string;
|
|
91
|
+
/** Confidence score (0–1) that the ceremony is on track */
|
|
92
|
+
confidence: number;
|
|
93
|
+
/** Direction active at this checkpoint */
|
|
94
|
+
direction: DirectionName;
|
|
95
|
+
/** Human-readable note about what occurred */
|
|
96
|
+
note: string;
|
|
97
|
+
}
|
|
98
|
+
/** A milestone in the relational journey of the ceremony */
|
|
99
|
+
export interface RelationalMilestone {
|
|
100
|
+
/** Human-readable description of the milestone */
|
|
101
|
+
milestone: string;
|
|
102
|
+
/** Whether the milestone has been achieved */
|
|
103
|
+
complete: boolean;
|
|
104
|
+
/** Which quadrants are required for this milestone */
|
|
105
|
+
quadrantsRequired: DirectionName[];
|
|
106
|
+
/** Which quadrants have been touched so far */
|
|
107
|
+
quadrantsTouched: DirectionName[];
|
|
108
|
+
}
|
|
109
|
+
/** Emergency halt order when relational accountability is violated */
|
|
110
|
+
export interface StopWorkOrder {
|
|
111
|
+
/** Agent targeted by the stop work order */
|
|
112
|
+
targetAgentId: string;
|
|
113
|
+
/** Reason for the halt */
|
|
114
|
+
reason: string;
|
|
115
|
+
/** ImportanceUnit ID involved, if any */
|
|
116
|
+
unitId: string | null;
|
|
117
|
+
/** Condition that must be met before work can resume */
|
|
118
|
+
resumeCondition: string;
|
|
119
|
+
}
|
|
120
|
+
/** Full ceremony state tracked by the Fire Keeper per active inquiry */
|
|
121
|
+
export interface CeremonyStateExtended {
|
|
122
|
+
/** Reference to the active inquiry */
|
|
123
|
+
inquiryRef: string;
|
|
124
|
+
/** Current ceremony phase */
|
|
125
|
+
ceremonyPhase: CeremonyPhaseExtended;
|
|
126
|
+
/** Currently active direction */
|
|
127
|
+
activeDirection: DirectionName;
|
|
128
|
+
/** State of each quadrant */
|
|
129
|
+
quadrantState: Record<DirectionName, QuadrantStatus>;
|
|
130
|
+
/** Status of all gating conditions */
|
|
131
|
+
gatingConditions: GatingConditionStatus[];
|
|
132
|
+
/** Relational milestones for the ceremony */
|
|
133
|
+
relationalMilestones: RelationalMilestone[];
|
|
134
|
+
/** History of trajectory checkpoints */
|
|
135
|
+
trajectoryHistory: TrajectoryCheckpoint[];
|
|
136
|
+
}
|
|
137
|
+
/** Configuration for the Fire Keeper agent */
|
|
138
|
+
export interface FireKeeperConfig {
|
|
139
|
+
/** Minimum trajectory confidence before human intervention (default: 0.65) */
|
|
140
|
+
trajectoryThreshold: number;
|
|
141
|
+
/** Ordered permission tiers */
|
|
142
|
+
permissionTiers: PermissionTier[];
|
|
143
|
+
/** Gating conditions to enforce */
|
|
144
|
+
gatingConditions: GatingCondition[];
|
|
145
|
+
/** Decision points that trigger human-in-the-loop */
|
|
146
|
+
humanDecisionPoints: DecisionPoint[];
|
|
147
|
+
}
|
|
148
|
+
/** Runtime state of the Fire Keeper agent */
|
|
149
|
+
export interface FireKeeperState {
|
|
150
|
+
/** Whether the Fire Keeper is actively tending a ceremony */
|
|
151
|
+
active: boolean;
|
|
152
|
+
/** Active ceremony states, keyed by inquiry reference */
|
|
153
|
+
ceremonies: Record<string, CeremonyStateExtended>;
|
|
154
|
+
/** Current permission tier of the Fire Keeper itself */
|
|
155
|
+
currentTier: PermissionTier;
|
|
156
|
+
/** Active stop work orders */
|
|
157
|
+
activeStopWorkOrders: StopWorkOrder[];
|
|
158
|
+
/** Timestamp of last state update */
|
|
159
|
+
lastUpdated: string;
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAInE;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAC7B,WAAW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AE,MAAM,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IACrD,sCAAsC;IACtC,gBAAgB,EAAE,qBAAqB,EAAE,CAAC;IAC1C,6CAA6C;IAC7C,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;IAC5C,wCAAwC;IACxC,iBAAiB,EAAE,oBAAoB,EAAE,CAAC;CAC3C;AAID,8CAA8C;AAC9C,MAAM,WAAW,gBAAgB;IAC/B,8EAA8E;IAC9E,mBAAmB,EAAE,MAAM,CAAC;IAC5B,+BAA+B;IAC/B,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,mCAAmC;IACnC,gBAAgB,EAAE,eAAe,EAAE,CAAC;IACpC,qDAAqD;IACrD,mBAAmB,EAAE,aAAa,EAAE,CAAC;CACtC;AAID,6CAA6C;AAC7C,MAAM,WAAW,eAAe;IAC9B,6DAA6D;IAC7D,MAAM,EAAE,OAAO,CAAC;IAChB,yDAAyD;IACzD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IAClD,wDAAwD;IACxD,WAAW,EAAE,cAAc,CAAC;IAC5B,8BAA8B;IAC9B,oBAAoB,EAAE,aAAa,EAAE,CAAC;IACtC,qCAAqC;IACrC,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @medicine-wheel/fire-keeper — Type Definitions
|
|
4
|
+
*
|
|
5
|
+
* Types for the Fire Keeper coordination agent.
|
|
6
|
+
* The Fire Keeper tends the ceremony fire, ensures relational integrity,
|
|
7
|
+
* and maintains Wilson alignment as an active agent — not a passive metric.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@medicine-wheel/fire-keeper",
|
|
3
|
+
"version": "0.2.2",
|
|
4
|
+
"description": "Fire Keeper coordination agent for Medicine Wheel — tends the ceremony fire, ensures relational integrity through gating conditions, and maintains Wilson alignment as an active agent",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"require": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc",
|
|
18
|
+
"clean": "rm -rf dist",
|
|
19
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"README.md"
|
|
24
|
+
],
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@medicine-wheel/ontology-core": "^0.2.2",
|
|
27
|
+
"@medicine-wheel/ceremony-protocol": "^0.2.2"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"typescript": "^5.4.0"
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"medicine-wheel",
|
|
34
|
+
"fire-keeper",
|
|
35
|
+
"ceremony",
|
|
36
|
+
"governance",
|
|
37
|
+
"indigenous",
|
|
38
|
+
"wilson",
|
|
39
|
+
"relational-accountability"
|
|
40
|
+
],
|
|
41
|
+
"license": "MIT"
|
|
42
|
+
}
|