@medicine-wheel/app 0.21.0 → 0.23.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.
@@ -63,6 +63,16 @@ export async function POST(request: Request) {
63
63
  ceremonies_linked: body.ceremonies_linked ?? [],
64
64
  wilson_alignment: body.wilson_alignment,
65
65
  cycle_id: body.cycle_id,
66
+ // Chart-level fields the structural tension tools write since 0.23.0
67
+ // (rispecs/delayed-resolution.spec.md). Before, every field outside the
68
+ // list above was dropped here, so in HTTP mode an issue link, a status or
69
+ // a sub-chart's backlink to its parent never reached the store.
70
+ ...(body.github_issue !== undefined ? { github_issue: body.github_issue } : {}),
71
+ ...(body.status !== undefined ? { status: body.status } : {}),
72
+ ...(body.parent_chart_id !== undefined ? { parent_chart_id: body.parent_chart_id } : {}),
73
+ ...(body.parent_action_step_id !== undefined ? { parent_action_step_id: body.parent_action_step_id } : {}),
74
+ ...(body.level !== undefined ? { level: body.level } : {}),
75
+ ...(body.due_date_history !== undefined ? { due_date_history: body.due_date_history } : {}),
66
76
  };
67
77
 
68
78
  appendJsonl(getChartsFile(), chart);
package/dist/cli/mw.js CHANGED
@@ -280,6 +280,12 @@ ${C.bold}🌿 mw — Medicine Wheel CLI${C.reset}
280
280
  mw chart create <outcome> <reality> <dir> Create STC
281
281
  mw chart list [--direction east] List charts
282
282
  mw chart progress <id> Get progress
283
+ mw chart get <id> The chart, whole
284
+ mw chart delay <chart> <step> <resolve_by> <reason> --by <who>
285
+ [--primary <text>] [--wake-on <cue>] Choose to delay a step's resolution
286
+ [--session <id> --cwd <dir> --resume <cmd>] ...with the session to rehydrate
287
+ mw chart delayed [--within <days>] [--all] Delays by resolve_by, owed first
288
+ mw chart end-delay <chart> <step> <rehydrated|released> --by <who> [--note <text>]
283
289
  mw mmot <chart_id> <expected> <actual> <analysis> MMOT review
284
290
 
285
291
  RELATIONS
@@ -666,7 +672,19 @@ function cmdWeb(positional) {
666
672
  mcpCall('get_relational_web', { node_id: nodeId, depth });
667
673
  }
668
674
  // ── Chart / STC ───────────────────────────────────────────────────
669
- function cmdChart(positional) {
675
+ function chartUsage(line) {
676
+ console.error(`${C.south}Usage: ${line}${C.reset}`);
677
+ process.exitCode = EXIT_USAGE;
678
+ }
679
+ function flagText(flags, ...keys) {
680
+ for (const key of keys) {
681
+ const v = flags[key];
682
+ if (typeof v === 'string' && v.trim() !== '')
683
+ return v;
684
+ }
685
+ return undefined;
686
+ }
687
+ function cmdChart(positional, flags = {}) {
670
688
  const sub = positional[0] ?? 'list';
671
689
  switch (sub) {
672
690
  case 'create':
@@ -682,8 +700,65 @@ function cmdChart(positional) {
682
700
  case 'progress':
683
701
  mcpCall('get_chart_progress', { chart_id: positional[1] ?? '' });
684
702
  break;
703
+ case 'get':
704
+ mcpCall('get_chart', { chart_id: positional[1] ?? '' });
705
+ break;
706
+ case 'delay': {
707
+ const [, chartId, stepId, resolveBy, reason] = positional;
708
+ const by = flagText(flags, 'by');
709
+ if (!chartId || !stepId || !resolveBy || !reason || !by) {
710
+ chartUsage('mw chart delay <chart_id> <step_id> <resolve_by> <reason> --by <who> [--primary <text>] [--wake-on <cue>] [--session <id>] [--cwd <dir>] [--resume <command>]');
711
+ return;
712
+ }
713
+ const sessionId = flagText(flags, 'session');
714
+ const wakeOn = flagText(flags, 'wake-on');
715
+ mcpCall('delay_resolution', {
716
+ chart_id: chartId,
717
+ step_id: stepId,
718
+ resolve_by: resolveBy,
719
+ reason,
720
+ chosen_by: by,
721
+ ...(flagText(flags, 'primary') ? { primary_choice: flagText(flags, 'primary') } : {}),
722
+ ...(wakeOn ? { wake_on: [wakeOn] } : {}),
723
+ ...(sessionId
724
+ ? {
725
+ session: {
726
+ session_id: sessionId,
727
+ ...(flagText(flags, 'cwd') ? { cwd: flagText(flags, 'cwd') } : {}),
728
+ ...(flagText(flags, 'resume') ? { resume_command: flagText(flags, 'resume') } : {}),
729
+ ...(flagText(flags, 'host') ? { host: flagText(flags, 'host') } : {}),
730
+ },
731
+ }
732
+ : {}),
733
+ });
734
+ break;
735
+ }
736
+ case 'delayed': {
737
+ const within = flagText(flags, 'within');
738
+ mcpCall('list_delayed_resolutions', {
739
+ ...(within !== undefined ? { due_within_days: Number(within) } : {}),
740
+ ...(flags['all'] === true ? { include_ended: true } : {}),
741
+ });
742
+ break;
743
+ }
744
+ case 'end-delay': {
745
+ const [, chartId, stepId, outcome] = positional;
746
+ const by = flagText(flags, 'by');
747
+ if (!chartId || !stepId || (outcome !== 'rehydrated' && outcome !== 'released') || !by) {
748
+ chartUsage('mw chart end-delay <chart_id> <step_id> <rehydrated|released> --by <who> [--note <text>]');
749
+ return;
750
+ }
751
+ mcpCall('end_delayed_resolution', {
752
+ chart_id: chartId,
753
+ step_id: stepId,
754
+ outcome,
755
+ ended_by: by,
756
+ ...(flagText(flags, 'note') ? { end_note: flagText(flags, 'note') } : {}),
757
+ });
758
+ break;
759
+ }
685
760
  default:
686
- unknownSub('chart', sub, ['create', 'list', 'progress']);
761
+ unknownSub('chart', sub, ['create', 'list', 'progress', 'get', 'delay', 'delayed', 'end-delay']);
687
762
  }
688
763
  }
689
764
  // ── MMOT ──────────────────────────────────────────────────────────
@@ -911,7 +986,7 @@ async function main() {
911
986
  break;
912
987
  case 'chart':
913
988
  case 'stc':
914
- cmdChart(rest);
989
+ cmdChart(rest, flags);
915
990
  break;
916
991
  case 'mmot':
917
992
  cmdMmot(rest);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medicine-wheel/app",
3
- "version": "0.21.0",
3
+ "version": "0.23.0",
4
4
  "description": "Medicine Wheel — Interactive visual layer for Indigenous relational research with Four Directions, ceremonies, and narrative arcs",
5
5
  "bin": {
6
6
  "mw": "dist/cli/mw.js",
@@ -94,33 +94,33 @@
94
94
  "release:major": "npm run version:major && npm run publish:all && npm run release:commit"
95
95
  },
96
96
  "dependencies": {
97
- "@medicine-wheel/ceremonial-diary": "^0.21.0",
98
- "@medicine-wheel/ceremony-protocol": "^0.21.0",
99
- "@medicine-wheel/community-identity": "^0.21.0",
100
- "@medicine-wheel/community-review": "^0.21.0",
101
- "@medicine-wheel/consent-lifecycle": "^0.21.0",
102
- "@medicine-wheel/creative-orientation": "^0.21.0",
103
- "@medicine-wheel/data-store": "^0.21.0",
104
- "@medicine-wheel/data-store-postgres": "^0.21.0",
105
- "@medicine-wheel/events": "^0.21.0",
106
- "@medicine-wheel/fire-keeper": "^0.21.0",
107
- "@medicine-wheel/github-ceremony": "^0.21.0",
108
- "@medicine-wheel/graph-viz": "^0.21.0",
109
- "@medicine-wheel/honcho": "^0.21.0",
110
- "@medicine-wheel/importance-unit": "^0.21.0",
111
- "@medicine-wheel/mcp": "^4.21.0",
112
- "@medicine-wheel/memory": "^0.21.0",
113
- "@medicine-wheel/narrative-cluster": "^0.21.0",
114
- "@medicine-wheel/narrative-engine": "^0.21.0",
115
- "@medicine-wheel/ontology-core": "^0.21.0",
116
- "@medicine-wheel/perception-layer": "^0.21.0",
117
- "@medicine-wheel/prompt-decomposition": "^0.21.0",
118
- "@medicine-wheel/relational-index": "^0.21.0",
119
- "@medicine-wheel/relational-query": "^0.21.0",
120
- "@medicine-wheel/session-reader": "^0.21.0",
121
- "@medicine-wheel/storage-provider": "^0.21.0",
122
- "@medicine-wheel/transformation-tracker": "^0.21.0",
123
- "@medicine-wheel/ui-components": "^0.21.0",
97
+ "@medicine-wheel/ceremonial-diary": "^0.23.0",
98
+ "@medicine-wheel/ceremony-protocol": "^0.23.0",
99
+ "@medicine-wheel/community-identity": "^0.23.0",
100
+ "@medicine-wheel/community-review": "^0.23.0",
101
+ "@medicine-wheel/consent-lifecycle": "^0.23.0",
102
+ "@medicine-wheel/creative-orientation": "^0.23.0",
103
+ "@medicine-wheel/data-store": "^0.23.0",
104
+ "@medicine-wheel/data-store-postgres": "^0.23.0",
105
+ "@medicine-wheel/events": "^0.23.0",
106
+ "@medicine-wheel/fire-keeper": "^0.23.0",
107
+ "@medicine-wheel/github-ceremony": "^0.23.0",
108
+ "@medicine-wheel/graph-viz": "^0.23.0",
109
+ "@medicine-wheel/honcho": "^0.23.0",
110
+ "@medicine-wheel/importance-unit": "^0.23.0",
111
+ "@medicine-wheel/mcp": "^4.23.0",
112
+ "@medicine-wheel/memory": "^0.23.0",
113
+ "@medicine-wheel/narrative-cluster": "^0.23.0",
114
+ "@medicine-wheel/narrative-engine": "^0.23.0",
115
+ "@medicine-wheel/ontology-core": "^0.23.0",
116
+ "@medicine-wheel/perception-layer": "^0.23.0",
117
+ "@medicine-wheel/prompt-decomposition": "^0.23.0",
118
+ "@medicine-wheel/relational-index": "^0.23.0",
119
+ "@medicine-wheel/relational-query": "^0.23.0",
120
+ "@medicine-wheel/session-reader": "^0.23.0",
121
+ "@medicine-wheel/storage-provider": "^0.23.0",
122
+ "@medicine-wheel/transformation-tracker": "^0.23.0",
123
+ "@medicine-wheel/ui-components": "^0.23.0",
124
124
  "@miadi/episode-vessel": "^0.2.1",
125
125
  "@neondatabase/serverless": "^0.10.0",
126
126
  "@xyflow/react": "^12.3.0",