@medicine-wheel/app 0.27.1 → 0.27.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.
@@ -5,7 +5,10 @@ export const dynamic = 'force-dynamic';
5
5
 
6
6
  /**
7
7
  * Ask the wheel's memory a question within a scope.
8
- * Body: { question, scope, peer?, reasoning_level?, limit? }.
8
+ * Body: { question, prompt?, scope, peer?, reasoning_level?, limit? }.
9
+ * `prompt` is what the memory provider is asked when the host wraps the
10
+ * question in its own template; the records match keeps `question`
11
+ * (jgwill/medicine-wheel#171).
9
12
  * The answer draws only on the ceremonies the scope reaches, and every source
10
13
  * names the wheel record it rests on. jgwill/medicine-wheel#149
11
14
  */
@@ -14,11 +17,15 @@ export async function POST(request: Request) {
14
17
  const question = typeof body?.question === 'string' ? body.question.trim() : '';
15
18
  if (!question) return NextResponse.json({ error: 'question is required' }, { status: 400 });
16
19
  if (question.length > 10000) return NextResponse.json({ error: 'question holds at most 10000 characters' }, { status: 400 });
20
+ if (body?.prompt !== undefined && typeof body.prompt !== 'string') return NextResponse.json({ error: 'prompt is a string' }, { status: 400 });
21
+ const prompt = typeof body?.prompt === 'string' ? body.prompt.trim() : '';
22
+ if (prompt.length > 20000) return NextResponse.json({ error: 'prompt holds at most 20000 characters' }, { status: 400 });
17
23
  const read = readScope(body?.scope);
18
24
  if ('error' in read) return NextResponse.json({ error: read.error }, { status: 400 });
19
25
  try {
20
26
  const answer = await wheelMemory().ask({
21
27
  question,
28
+ ...(prompt ? { prompt } : {}),
22
29
  scope: read.scope,
23
30
  ...(typeof body.peer === 'string' && body.peer ? { peer: body.peer } : {}),
24
31
  ...(typeof body.reasoning_level === 'string' ? { reasoning_level: body.reasoning_level } : {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medicine-wheel/app",
3
- "version": "0.27.1",
3
+ "version": "0.27.2",
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",
@@ -96,35 +96,35 @@
96
96
  "release:major": "npm run version:major && npm run publish:all && npm run release:commit"
97
97
  },
98
98
  "dependencies": {
99
- "@medicine-wheel/ceremonial-diary": "^0.27.1",
100
- "@medicine-wheel/ceremony-protocol": "^0.27.1",
101
- "@medicine-wheel/community-identity": "^0.27.1",
102
- "@medicine-wheel/community-review": "^0.27.1",
103
- "@medicine-wheel/consent-lifecycle": "^0.27.1",
104
- "@medicine-wheel/creative-orientation": "^0.27.1",
105
- "@medicine-wheel/data-store": "^0.27.1",
106
- "@medicine-wheel/data-store-postgres": "^0.27.1",
107
- "@medicine-wheel/episode-ui": "^0.27.1",
108
- "@medicine-wheel/episode-vessel": "^0.27.1",
109
- "@medicine-wheel/events": "^0.27.1",
110
- "@medicine-wheel/fire-keeper": "^0.27.1",
111
- "@medicine-wheel/github-ceremony": "^0.27.1",
112
- "@medicine-wheel/graph-viz": "^0.27.1",
113
- "@medicine-wheel/honcho": "^0.27.1",
114
- "@medicine-wheel/importance-unit": "^0.27.1",
115
- "@medicine-wheel/mcp": "^4.27.1",
116
- "@medicine-wheel/memory": "^0.27.1",
117
- "@medicine-wheel/narrative-cluster": "^0.27.1",
118
- "@medicine-wheel/narrative-engine": "^0.27.1",
119
- "@medicine-wheel/ontology-core": "^0.27.1",
120
- "@medicine-wheel/perception-layer": "^0.27.1",
121
- "@medicine-wheel/prompt-decomposition": "^0.27.1",
122
- "@medicine-wheel/relational-index": "^0.27.1",
123
- "@medicine-wheel/relational-query": "^0.27.1",
124
- "@medicine-wheel/session-reader": "^0.27.1",
125
- "@medicine-wheel/storage-provider": "^0.27.1",
126
- "@medicine-wheel/transformation-tracker": "^0.27.1",
127
- "@medicine-wheel/ui-components": "^0.27.1",
99
+ "@medicine-wheel/ceremonial-diary": "^0.27.2",
100
+ "@medicine-wheel/ceremony-protocol": "^0.27.2",
101
+ "@medicine-wheel/community-identity": "^0.27.2",
102
+ "@medicine-wheel/community-review": "^0.27.2",
103
+ "@medicine-wheel/consent-lifecycle": "^0.27.2",
104
+ "@medicine-wheel/creative-orientation": "^0.27.2",
105
+ "@medicine-wheel/data-store": "^0.27.2",
106
+ "@medicine-wheel/data-store-postgres": "^0.27.2",
107
+ "@medicine-wheel/episode-ui": "^0.27.2",
108
+ "@medicine-wheel/episode-vessel": "^0.27.2",
109
+ "@medicine-wheel/events": "^0.27.2",
110
+ "@medicine-wheel/fire-keeper": "^0.27.2",
111
+ "@medicine-wheel/github-ceremony": "^0.27.2",
112
+ "@medicine-wheel/graph-viz": "^0.27.2",
113
+ "@medicine-wheel/honcho": "^0.27.2",
114
+ "@medicine-wheel/importance-unit": "^0.27.2",
115
+ "@medicine-wheel/mcp": "^4.27.2",
116
+ "@medicine-wheel/memory": "^0.27.2",
117
+ "@medicine-wheel/narrative-cluster": "^0.27.2",
118
+ "@medicine-wheel/narrative-engine": "^0.27.2",
119
+ "@medicine-wheel/ontology-core": "^0.27.2",
120
+ "@medicine-wheel/perception-layer": "^0.27.2",
121
+ "@medicine-wheel/prompt-decomposition": "^0.27.2",
122
+ "@medicine-wheel/relational-index": "^0.27.2",
123
+ "@medicine-wheel/relational-query": "^0.27.2",
124
+ "@medicine-wheel/session-reader": "^0.27.2",
125
+ "@medicine-wheel/storage-provider": "^0.27.2",
126
+ "@medicine-wheel/transformation-tracker": "^0.27.2",
127
+ "@medicine-wheel/ui-components": "^0.27.2",
128
128
  "@neondatabase/serverless": "^0.10.0",
129
129
  "@xyflow/react": "^12.3.0",
130
130
  "clsx": "^2.1.1",