lotus-wisdom-mcp 0.6.0 → 0.7.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/bundle.js CHANGED
@@ -12508,6 +12508,19 @@ var LotusWisdomServer = class {
12508
12508
  if (data.stepNumber === 1) {
12509
12509
  this.resetProcess();
12510
12510
  }
12511
+ if (this.thoughtProcess.length === 0 && data.previousJourney && data.tag !== "begin") {
12512
+ const prevTags = data.previousJourney.split(" \u2192 ").map((t) => t.trim()).filter(Boolean);
12513
+ for (let i = 0; i < prevTags.length; i++) {
12514
+ this.thoughtProcess.push({
12515
+ tag: prevTags[i],
12516
+ content: "",
12517
+ stepNumber: i + 1,
12518
+ totalSteps: data.totalSteps,
12519
+ nextStepNeeded: true,
12520
+ wisdomDomain: getWisdomDomain(prevTags[i])
12521
+ });
12522
+ }
12523
+ }
12511
12524
  return {
12512
12525
  tag: data.tag,
12513
12526
  content: data.content,
@@ -12640,7 +12653,8 @@ var LotusWisdomServer = class {
12640
12653
  totalSteps: "Your estimate of total steps needed (can adjust as you go)",
12641
12654
  nextStepNeeded: "Set true to continue, false when ready to complete",
12642
12655
  isMeditation: "Set true when using the meditate tag for a contemplative pause",
12643
- meditationDuration: "Optional seconds (1-10) for meditation pauses"
12656
+ meditationDuration: "Optional seconds (1-10) for meditation pauses",
12657
+ previousJourney: "Pass the journey string from the previous response to maintain visual continuity (e.g. the journey field value)."
12644
12658
  },
12645
12659
  responses: {
12646
12660
  processing: "Normal steps return status=processing with journey tracking",
@@ -12735,15 +12749,27 @@ var LotusWisdomServer = class {
12735
12749
  }
12736
12750
  }
12737
12751
  // Method to get current journey summary with domain awareness
12738
- getJourneySummary() {
12739
- const domainJourney = this.thoughtProcess.map((step) => step.wisdomDomain).filter((domain, index, array) => index === 0 || domain !== array[index - 1]).join(" \u2192 ");
12752
+ getJourneySummary(previousJourney) {
12753
+ let steps = this.thoughtProcess;
12754
+ if (steps.length === 0 && previousJourney) {
12755
+ const prevTags = previousJourney.split(" \u2192 ").map((t) => t.trim()).filter(Boolean);
12756
+ steps = prevTags.map((tag, i) => ({
12757
+ tag,
12758
+ content: "",
12759
+ stepNumber: i + 1,
12760
+ totalSteps: prevTags.length,
12761
+ nextStepNeeded: true,
12762
+ wisdomDomain: getWisdomDomain(tag)
12763
+ }));
12764
+ }
12765
+ const domainJourney = steps.map((step) => step.wisdomDomain).filter((domain, index, array) => index === 0 || domain !== array[index - 1]).join(" \u2192 ");
12740
12766
  return {
12741
12767
  content: [{
12742
12768
  type: "text",
12743
12769
  text: JSON.stringify({
12744
- journeyLength: this.thoughtProcess.length,
12770
+ journeyLength: steps.length,
12745
12771
  domainJourney,
12746
- steps: this.thoughtProcess.map((step) => ({
12772
+ steps: steps.map((step) => ({
12747
12773
  tag: step.tag,
12748
12774
  domain: step.wisdomDomain,
12749
12775
  stepNumber: step.stepNumber,
@@ -12797,6 +12823,10 @@ var LOTUS_WISDOM_TOOL = {
12797
12823
  description: "Duration for meditation in seconds",
12798
12824
  minimum: 1,
12799
12825
  maximum: 10
12826
+ },
12827
+ previousJourney: {
12828
+ type: "string",
12829
+ description: `Pass the journey string from the previous step's response to maintain journey tracking (e.g. "begin \u2192 open \u2192 examine").`
12800
12830
  }
12801
12831
  },
12802
12832
  required: ["tag", "content", "stepNumber", "totalSteps", "nextStepNeeded"]
@@ -12807,7 +12837,12 @@ var JOURNEY_SUMMARY_TOOL = {
12807
12837
  description: "Get a summary of the current contemplative journey",
12808
12838
  inputSchema: {
12809
12839
  type: "object",
12810
- properties: {},
12840
+ properties: {
12841
+ previousJourney: {
12842
+ type: "string",
12843
+ description: "Pass the journey string from a previous response to reconstruct the current journey summary."
12844
+ }
12845
+ },
12811
12846
  required: []
12812
12847
  }
12813
12848
  };
@@ -12815,7 +12850,7 @@ function createServer() {
12815
12850
  const server = new Server(
12816
12851
  {
12817
12852
  name: "lotus-wisdom-server",
12818
- version: "0.6.0"
12853
+ version: "0.7.0"
12819
12854
  },
12820
12855
  {
12821
12856
  capabilities: {
@@ -12856,7 +12891,7 @@ function createServer() {
12856
12891
  if (journeyHtml) result._meta = { ui: { resourceUri: "ui://lotuswisdom/journey.html" }, "ui/resourceUri": "ui://lotuswisdom/journey.html" };
12857
12892
  return result;
12858
12893
  } else if (request.params.name === "lotuswisdom_summary") {
12859
- return wisdomServer.getJourneySummary();
12894
+ return wisdomServer.getJourneySummary(request.params.arguments?.previousJourney);
12860
12895
  }
12861
12896
  return {
12862
12897
  content: [{
@@ -12872,7 +12907,7 @@ async function main() {
12872
12907
  const server = createServer();
12873
12908
  const transport = new StdioServerTransport();
12874
12909
  await server.connect(transport);
12875
- console.error("Lotus Wisdom MCP Server v0.6.0 running");
12910
+ console.error("Lotus Wisdom MCP Server v0.7.0 running");
12876
12911
  }
12877
12912
  var isDirectRun = process.argv[1] && (process.argv[1].endsWith("bundle.js") || process.argv[1].endsWith("index.js") || process.argv[1].endsWith("index.ts"));
12878
12913
  if (isDirectRun) {
package/dist/index.js CHANGED
@@ -83,6 +83,20 @@ class LotusWisdomServer {
83
83
  if (data.stepNumber === 1) {
84
84
  this.resetProcess();
85
85
  }
86
+ // Reconstruct journey from previousJourney when server state is empty
87
+ if (this.thoughtProcess.length === 0 && data.previousJourney && data.tag !== 'begin') {
88
+ const prevTags = data.previousJourney.split(' → ').map((t) => t.trim()).filter(Boolean);
89
+ for (let i = 0; i < prevTags.length; i++) {
90
+ this.thoughtProcess.push({
91
+ tag: prevTags[i],
92
+ content: '',
93
+ stepNumber: i + 1,
94
+ totalSteps: data.totalSteps,
95
+ nextStepNeeded: true,
96
+ wisdomDomain: getWisdomDomain(prevTags[i]),
97
+ });
98
+ }
99
+ }
86
100
  return {
87
101
  tag: data.tag,
88
102
  content: data.content,
@@ -225,7 +239,8 @@ class LotusWisdomServer {
225
239
  totalSteps: 'Your estimate of total steps needed (can adjust as you go)',
226
240
  nextStepNeeded: 'Set true to continue, false when ready to complete',
227
241
  isMeditation: 'Set true when using the meditate tag for a contemplative pause',
228
- meditationDuration: 'Optional seconds (1-10) for meditation pauses'
242
+ meditationDuration: 'Optional seconds (1-10) for meditation pauses',
243
+ previousJourney: 'Pass the journey string from the previous response to maintain visual continuity (e.g. the journey field value).'
229
244
  },
230
245
  responses: {
231
246
  processing: 'Normal steps return status=processing with journey tracking',
@@ -338,8 +353,21 @@ class LotusWisdomServer {
338
353
  }
339
354
  }
340
355
  // Method to get current journey summary with domain awareness
341
- getJourneySummary() {
342
- const domainJourney = this.thoughtProcess
356
+ getJourneySummary(previousJourney) {
357
+ // Use server state if available, otherwise reconstruct from previousJourney
358
+ let steps = this.thoughtProcess;
359
+ if (steps.length === 0 && previousJourney) {
360
+ const prevTags = previousJourney.split(' → ').map(t => t.trim()).filter(Boolean);
361
+ steps = prevTags.map((tag, i) => ({
362
+ tag,
363
+ content: '',
364
+ stepNumber: i + 1,
365
+ totalSteps: prevTags.length,
366
+ nextStepNeeded: true,
367
+ wisdomDomain: getWisdomDomain(tag),
368
+ }));
369
+ }
370
+ const domainJourney = steps
343
371
  .map(step => step.wisdomDomain)
344
372
  .filter((domain, index, array) => index === 0 || domain !== array[index - 1])
345
373
  .join(' → ');
@@ -347,9 +375,9 @@ class LotusWisdomServer {
347
375
  content: [{
348
376
  type: "text",
349
377
  text: JSON.stringify({
350
- journeyLength: this.thoughtProcess.length,
378
+ journeyLength: steps.length,
351
379
  domainJourney: domainJourney,
352
- steps: this.thoughtProcess.map(step => ({
380
+ steps: steps.map(step => ({
353
381
  tag: step.tag,
354
382
  domain: step.wisdomDomain,
355
383
  stepNumber: step.stepNumber,
@@ -403,6 +431,10 @@ const LOTUS_WISDOM_TOOL = {
403
431
  description: "Duration for meditation in seconds",
404
432
  minimum: 1,
405
433
  maximum: 10
434
+ },
435
+ previousJourney: {
436
+ type: "string",
437
+ description: "Pass the journey string from the previous step's response to maintain journey tracking (e.g. \"begin → open → examine\")."
406
438
  }
407
439
  },
408
440
  required: ["tag", "content", "stepNumber", "totalSteps", "nextStepNeeded"]
@@ -414,7 +446,12 @@ const JOURNEY_SUMMARY_TOOL = {
414
446
  description: "Get a summary of the current contemplative journey",
415
447
  inputSchema: {
416
448
  type: "object",
417
- properties: {},
449
+ properties: {
450
+ previousJourney: {
451
+ type: "string",
452
+ description: "Pass the journey string from a previous response to reconstruct the current journey summary."
453
+ }
454
+ },
418
455
  required: []
419
456
  }
420
457
  };
@@ -422,7 +459,7 @@ const JOURNEY_SUMMARY_TOOL = {
422
459
  export default function createServer() {
423
460
  const server = new Server({
424
461
  name: "lotus-wisdom-server",
425
- version: "0.6.0",
462
+ version: "0.7.0",
426
463
  }, {
427
464
  capabilities: {
428
465
  tools: {},
@@ -464,7 +501,7 @@ export default function createServer() {
464
501
  return result;
465
502
  }
466
503
  else if (request.params.name === "lotuswisdom_summary") {
467
- return wisdomServer.getJourneySummary();
504
+ return wisdomServer.getJourneySummary(request.params.arguments?.previousJourney);
468
505
  }
469
506
  return {
470
507
  content: [{
@@ -481,7 +518,7 @@ async function main() {
481
518
  const server = createServer();
482
519
  const transport = new StdioServerTransport();
483
520
  await server.connect(transport);
484
- console.error("Lotus Wisdom MCP Server v0.6.0 running");
521
+ console.error("Lotus Wisdom MCP Server v0.7.0 running");
485
522
  }
486
523
  // Only run stdio when executed directly (not when imported by Smithery CLI)
487
524
  const isDirectRun = process.argv[1] && (process.argv[1].endsWith('bundle.js') ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lotus-wisdom-mcp",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Contemplative reasoning MCP server — Lotus Sutra wisdom framework with interactive ext-apps journey visualization.",
5
5
  "main": "dist/bundle.js",
6
6
  "module": "index.ts",