lotus-wisdom-mcp 0.8.5 → 0.9.1

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 CHANGED
@@ -13,7 +13,7 @@ Available at: https://lotus-wisdom-mcp.linxule.workers.dev/mcp
13
13
  * Multi-faceted problem-solving approach inspired by the Lotus Sutra
14
14
  * Step-by-step thought process with different thinking techniques
15
15
  * Meditation pauses to allow insights to emerge naturally
16
- * **Interactive visualization** via MCP ext-apps (Claude Desktop, Cursor, ChatGPT) — adapts to the host light/dark theme and is keyboard-accessible
16
+ * **Interactive visualization** via MCP ext-apps (Claude Desktop, Cursor, ChatGPT) — a pixel halo that lights one segment per step, in night and day variants that follow the host theme; keyboard-accessible and respects reduced motion
17
17
  * **MCP Prompts** (`contemplate`, `deep-inquiry`) for one-step guided contemplative sessions
18
18
  * **Structured tool output** (`structuredContent` + `outputSchema`) alongside the text response
19
19
  * Tracks both tag journey and wisdom domain movements
@@ -54,7 +54,7 @@ The server organizes thoughts using wisdom domains (all valid values for the `ta
54
54
 
55
55
  ### Thought Visualization
56
56
 
57
- In clients that support MCP ext-apps, each step renders inline as an interactive "Living Trace" (see [Interactive Visualization](#interactive-visualization-ext-apps) below). For every client, each step also returns:
57
+ In clients that support MCP ext-apps, each step renders inline as an interactive halo (see [Interactive Visualization](#interactive-visualization-ext-apps) below). For every client, each step also returns:
58
58
 
59
59
  * Journey tracking showing both the tag path and the wisdom-domain movements
60
60
  * Domain-specific labels and the current contemplation text
@@ -92,7 +92,15 @@ A tool for problem-solving using the Lotus Sutra's wisdom framework, with variou
92
92
  * `meditationDuration` (integer, optional): Duration for meditation in seconds (1-10)
93
93
  * `previousJourney` (string, optional): The `journey` string from a previous response, e.g. `"begin → open → examine"`. Lets the AI carry journey continuity forward in stateless clients (such as the remote Worker), where the server keeps no session state.
94
94
 
95
- **Returns:** a JSON text block and `structuredContent` validated against the tool's `outputSchema`. For `begin`, the full framework is in the text block; structured output contains its status, welcome, and contemplation fields. Other result variants retain their fields in both representations.
95
+ **Returns:** a JSON text block and `structuredContent` validated against the tool's
96
+ `outputSchema`. Every successful response includes `journey` for continuity,
97
+ including `begin` and completion. Completion also retains `finalJourney` for
98
+ compatibility. For `begin`, the full framework is in the text block; structured
99
+ output contains its status, welcome, contemplation, journey, domain journey,
100
+ and step counts. Other result variants retain their fields in both representations.
101
+
102
+ A meditation step with `nextStepNeeded: false` completes the inquiry with
103
+ `WISDOM_READY`; ongoing meditation steps return `MEDITATION_COMPLETE`.
96
104
 
97
105
  Response statuses include:
98
106
 
@@ -408,16 +416,32 @@ bun install --frozen-lockfile
408
416
  bun run typecheck
409
417
  bun run test
410
418
  bun run build
419
+ bun run test:package
411
420
  bun run start
412
421
  ```
413
422
 
414
423
  The build installs the app's locked dependencies and rebuilds the tracked
415
- `dist/bundle.js` and `dist/journey.html` artifacts. Check app types and build
416
- regressions with `cd app && bunx tsc --noEmit && bun run test`; see
417
- [worker validation](worker/README.md#local-dev) for the worker typecheck,
418
- dry-run build, and local HTTP regression. The app's local Vite plugin inlines
419
- JavaScript and CSS into one HTML resource, with tests for dynamic imports and
420
- HTML escaping.
424
+ `dist/bundle.js` and `dist/journey.html` artifacts. Check the app with
425
+ `cd app && bunx tsc --noEmit && bun run test`. The suite covers the single-file
426
+ build (the local Vite plugin inlines JavaScript and CSS into one HTML resource;
427
+ tests cover dynamic imports and HTML escaping) and the journey itself:
428
+ continuity across frames, meditation, reset between inquiries, exploration of
429
+ the completed panel only, and every tag's character rendering from embedded
430
+ outlines. See [worker validation](worker/README.md#local-dev) for the worker
431
+ typecheck, dry-run build, and local HTTP regression.
432
+
433
+ To see a journey the way a chat shows it, one frame per call, run
434
+ `cd app && bunx vite build` and open `app/preview.html`. The halo's characters
435
+ are generated into `app/src/glyphs.ts`; `app/scripts/glyphs.py` regenerates
436
+ them from a Noto Serif TC subset and documents how to fetch it.
437
+
438
+ `bun run test:package` packs the built files, installs the tarball in a temporary
439
+ consumer directory, and starts npm's executable link. It checks the MCP version,
440
+ tool discovery, a complete inquiry ending in meditation, a fresh inquiry reset,
441
+ and the packaged journey HTML. CI runs this check
442
+ after building and before publishing, so a broken launcher or missing package
443
+ asset blocks the release. It requires npm registry access to install production
444
+ dependencies and removes its temporary files on completion.
421
445
 
422
446
  Dependabot uses the `bun` ecosystem for the root, app, and worker packages so
423
447
  updates include their `bun.lock` files. CI verifies all three packages on pull
@@ -428,10 +452,11 @@ If npm publishes successfully but MCP Registry registration fails, retry only
428
452
  registration for the existing tag:
429
453
 
430
454
  ```bash
431
- gh workflow run publish-mcp.yml --ref main -f registry_tag=v0.8.1
455
+ gh workflow run publish-mcp.yml --ref main -f registry_tag=vX.Y.Z
432
456
  ```
433
457
 
434
- This revalidates the tagged source and waits for npm availability before
458
+ Replace `vX.Y.Z` with the existing published version's tag. This revalidates the
459
+ tagged source and waits for npm availability before
435
460
  registration. It does not republish npm or move the release tag.
436
461
 
437
462
  Enable debug mode:
@@ -442,14 +467,15 @@ LOTUS_DEBUG=true bun run start
442
467
 
443
468
  ## Interactive Visualization (ext-apps)
444
469
 
445
- In MCP clients that support ext-apps (Claude Desktop, Cursor, ChatGPT), the tool renders an interactive "Living Trace" visualization inline in the chat:
470
+ In MCP clients that support ext-apps (Claude Desktop, Cursor, ChatGPT), each step renders inline as a small panel: a ring of pixels modeled on the LED halos (光背) wired behind temple statues, the step's character at its center, and the contemplation beside it. Each tool call gets its own panel, so a journey reads down the conversation one frame at a time.
446
471
 
447
- * **Journey trace**: SVG circles colored by wisdom domain appear as steps arrive
448
- * **Domain colors**: Process (gold), Skillful Means (amber), Non-Dual (green), Meta-Cognitive (blue), Meditation (teal)
449
- * **Meditation breathing**: Hollow circles with gentle inhale/exhale animation
450
- * **Completion**: Journey resolves into a gradient path showing the full domain arc
451
- * **Click to explore**: Pin any step to read its contemplation text
452
- * **Collapse for long journeys**: Shows last 8 steps with a "+N" cluster for earlier ones
472
+ * **The ring**: one segment per step, shaded with the ASCII ramp: a ▒ track for steps still estimated to come, ▓ for earlier steps, solid █ for the current one, which dithers in as it arrives. The ring re-divides as `totalSteps` changes and closes exactly when the journey completes.
473
+ * **Color is attention**: only the current step is in color; the rest is ink. The colors are the six of the Buddha's aura from the Buddhist flag: Entry white, Process red, Skillful Means yellow, Non-Dual orange, Meta-Cognitive blue, and Meditation the flag's sixth band, a pixel mosaic of all five. When the circle closes it turns white, every color at once (ink in daylight).
474
+ * **A character for each tag**: every character comes from Kumārajīva's Lotus Sutra or from Tiantai's reading of it, in traditional forms. open, express, recognize and embody spell 開示悟入, the four aims of the Buddha's appearance in chapter 2, the chapter on skillful means, which also gives 巧 (upaya: 巧說諸法, "skillfully expounds the teachings") and 直 (direct: 正直捨方便, "directly setting means aside"). 照 (reflect) is the light across eighteen thousand worlds (ch. 1), 出 (transcend) the children leaving the burning house (ch. 3), 證 (verify) Many Treasures bearing witness (ch. 11), 淨 (refine) the purified senses (ch. 19). examine and meditate make Tiantai's 止觀. Hover a character for its pinyin and source. Characters are drawn from embedded Noto Serif TC outlines (SIL OFL 1.1), so they look the same with or without CJK fonts.
475
+ * **Meditation**: the meditation segment breathes by pixel density three times, then rests.
476
+ * **Completion**: the circle closes and turns white, segment by segment. Nothing is added underneath.
477
+ * **Look back**: only the completed panel is interactive. Hover or focus a segment to see that step in its color with its character and tag; click or press Enter to pin it; arrow keys walk the ring. Panels for steps still in progress are for reading and do not respond to the pointer. Steps carried over from earlier frames show their place; their words stay in those frames.
478
+ * **Quiet by design**: nothing loops, nothing glows, and with `prefers-reduced-motion` every state appears without animation. The design came out of a Lotus Wisdom journey on its own UI; after `cd app && bunx vite build`, open `app/preview.html` to replay that journey as a chat shows it, one frame per call.
453
479
 
454
480
  Clients without ext-apps support are unaffected — they receive the same JSON tool responses as before.
455
481
 
@@ -492,7 +518,48 @@ Contributions are welcome! Please feel free to submit issues or pull requests on
492
518
 
493
519
  ## Version
494
520
 
495
- Current version: 0.8.1
521
+ Current version: 0.9.1
522
+
523
+ ### What's New in 0.9.1
524
+
525
+ - Updated the MCP SDK, MCP Apps, Cloudflare Agents, and Worker tooling from
526
+ the grouped Dependabot updates.
527
+ - Refreshed transitive `@hono/node-server` and `qs` dependencies to patched
528
+ versions, clearing the dependency audit findings in the server and worker.
529
+ - Retained the SDK v1 compatibility handler and aligned the worker's MCP
530
+ dependencies with Cloudflare Agents' required peer versions.
531
+ - Removed the temporary Undici override now that Worker tooling requires the
532
+ patched version directly.
533
+
534
+ ### What's New in 0.9.0
535
+
536
+ - Redesigned the journey visualization as a pixel halo: one segment per step,
537
+ a traditional character at its center, and the contemplation beside it.
538
+ Earlier steps appear in ink, future steps as a dim track, and the current
539
+ step in its domain color. The completed circle turns white in the night theme.
540
+ - Added embedded Noto Serif TC glyph outlines, with pinyin and source notes on
541
+ hover, so the characters render without installed CJK fonts or font requests.
542
+ - Gave each event a finite animation and made only the completed panel
543
+ explorable by hover, focus, pin, and keyboard navigation.
544
+ - Kept completed panels at a steady height while looking back, with internal
545
+ scrolling for longer earlier text, and fixed a rapid-hover content fade race.
546
+ - Added a daylight palette that follows the host theme, reduced-motion styles,
547
+ DOM regressions, and a development preview showing one frame per tool call.
548
+ - Includes the journey reliability and dependency security fixes below; 0.8.6
549
+ was prepared but not published separately.
550
+
551
+ ### Reliability fixes prepared for 0.8.6 (included in 0.9.0)
552
+
553
+ - Preserved the opening step in stateless journeys by returning continuity
554
+ metadata from `begin`, including in structured output.
555
+ - Fixed completion on meditation steps and added `journey` to completion
556
+ responses while retaining `finalJourney`.
557
+ - Reset the visualization between inquiries in reused iframes, including
558
+ pending animations, collapsed steps, pins, and completion effects.
559
+ - Added response-driven journey regressions for the installed CLI and worker,
560
+ plus DOM tests for consecutive inquiries and animation races.
561
+ - Updated dependencies and patched vulnerable transitive packages. The worker
562
+ temporarily overrides Undici until Wrangler's Miniflare dependency is patched.
496
563
 
497
564
  ### What's New in 0.8.1
498
565
 
package/dist/bundle.js CHANGED
@@ -3337,6 +3337,37 @@ var require_utils = __commonJS({
3337
3337
  }
3338
3338
  return output2.join("");
3339
3339
  }
3340
+ function removeDotSegmentsRelative(path) {
3341
+ if (path === "" || path[0] === "/") {
3342
+ return removeDotSegments(path);
3343
+ }
3344
+ const segments = path.split("/");
3345
+ const last = segments.length - 1;
3346
+ const output2 = [];
3347
+ let trailingDirectory = false;
3348
+ for (let i = 0; i <= last; i++) {
3349
+ const segment = segments[i];
3350
+ if (segment === "." || segment === "..") {
3351
+ if (segment === "..") {
3352
+ if (output2.length !== 0 && output2[output2.length - 1] !== "..") {
3353
+ output2.pop();
3354
+ } else {
3355
+ output2.push("..");
3356
+ }
3357
+ }
3358
+ trailingDirectory = i === last;
3359
+ } else {
3360
+ output2.push(segment);
3361
+ }
3362
+ }
3363
+ if (trailingDirectory && output2[output2.length - 1] !== "..") {
3364
+ output2.push("");
3365
+ }
3366
+ if (output2.length === 0 || output2[0] === "" || output2[0].includes(":")) {
3367
+ output2.unshift(".");
3368
+ }
3369
+ return output2.join("/");
3370
+ }
3340
3371
  var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
3341
3372
  var HOST_DELIM_RE = /[@/?#:]/g;
3342
3373
  var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
@@ -3597,6 +3628,7 @@ var require_utils = __commonJS({
3597
3628
  encodeFragment,
3598
3629
  escapePreservingEscapes,
3599
3630
  removeDotSegments,
3631
+ removeDotSegmentsRelative,
3600
3632
  isIPv4,
3601
3633
  isUUID,
3602
3634
  normalizeIPv6,
@@ -3820,16 +3852,18 @@ var require_schemes = __commonJS({
3820
3852
  var require_fast_uri = __commonJS({
3821
3853
  "node_modules/fast-uri/index.js"(exports, module) {
3822
3854
  "use strict";
3823
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3855
+ var { normalizeIPv6, removeDotSegments, removeDotSegmentsRelative, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3824
3856
  var { SCHEMES, getSchemeHandler } = require_schemes();
3825
3857
  var VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
3826
3858
  var MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
3827
- function decodeValidScheme(scheme) {
3828
- const decodedScheme = unescape(String(scheme));
3829
- if (!VALID_SCHEME.test(decodedScheme)) {
3859
+ var MALFORMED_HOST_ERROR = "URI host is malformed.";
3860
+ var FORBIDDEN_DOMAIN_HOST_CHARACTER = /[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;
3861
+ function validateScheme(scheme) {
3862
+ const stringScheme = String(scheme);
3863
+ if (!VALID_SCHEME.test(stringScheme)) {
3830
3864
  throw new TypeError(MALFORMED_SCHEME_ERROR);
3831
3865
  }
3832
- return decodedScheme;
3866
+ return stringScheme;
3833
3867
  }
3834
3868
  function normalize(uri, options) {
3835
3869
  if (typeof uri === "string") {
@@ -3866,6 +3900,9 @@ var require_fast_uri = __commonJS({
3866
3900
  const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);
3867
3901
  const resolvedHost = resolved.host;
3868
3902
  const resolvedHostIsIP = resolvedHost !== void 0 && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
3903
+ if (hasForbiddenDomainHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP)) {
3904
+ throw new Error(MALFORMED_HOST_ERROR);
3905
+ }
3869
3906
  canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
3870
3907
  const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !/\P{ASCII}/u.test(resolvedHost);
3871
3908
  if (resolved.error && !encodedASCIIHost) {
@@ -3907,14 +3944,15 @@ var require_fast_uri = __commonJS({
3907
3944
  if (relative.path[0] === "/") {
3908
3945
  target.path = removeDotSegments(relative.path);
3909
3946
  } else {
3910
- if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
3947
+ const baseHasAuthority = base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0;
3948
+ if (baseHasAuthority && !base.path) {
3911
3949
  target.path = "/" + relative.path;
3912
3950
  } else if (!base.path) {
3913
3951
  target.path = relative.path;
3914
3952
  } else {
3915
3953
  target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
3916
3954
  }
3917
- target.path = removeDotSegments(target.path);
3955
+ target.path = base.scheme === void 0 && !baseHasAuthority && target.path[0] !== "/" ? removeDotSegmentsRelative(target.path) : removeDotSegments(target.path);
3918
3956
  }
3919
3957
  target.query = relative.query;
3920
3958
  }
@@ -3952,12 +3990,13 @@ var require_fast_uri = __commonJS({
3952
3990
  const options = Object.assign({}, opts);
3953
3991
  const uriTokens = [];
3954
3992
  if (component.scheme) {
3955
- component.scheme = decodeValidScheme(component.scheme);
3993
+ component.scheme = validateScheme(component.scheme);
3956
3994
  }
3957
3995
  const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
3958
3996
  if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
3959
3997
  const hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;
3960
- const pathNoScheme = !options.skipEscape && component.scheme === void 0 && !hasAuthority;
3998
+ const schemelessReference = (component.scheme === void 0 || options.reference === "suffix") && !hasAuthority;
3999
+ const pathNoScheme = !options.skipEscape && schemelessReference;
3961
4000
  if (component.path !== void 0) {
3962
4001
  if (!options.skipEscape) {
3963
4002
  component.path = serializePathEncoding(component.path, pathNoScheme);
@@ -3966,7 +4005,7 @@ var require_fast_uri = __commonJS({
3966
4005
  }
3967
4006
  }
3968
4007
  if (options.reference !== "suffix" && component.scheme) {
3969
- component.scheme = decodeValidScheme(component.scheme);
4008
+ component.scheme = validateScheme(component.scheme);
3970
4009
  uriTokens.push(component.scheme, ":");
3971
4010
  }
3972
4011
  const authority = recomposeAuthority(component);
@@ -3982,9 +4021,9 @@ var require_fast_uri = __commonJS({
3982
4021
  if (component.path !== void 0) {
3983
4022
  let s = component.path;
3984
4023
  if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
3985
- s = removeDotSegments(s);
4024
+ s = schemelessReference && s[0] !== "/" ? removeDotSegmentsRelative(s) : removeDotSegments(s);
3986
4025
  }
3987
- if (pathNoScheme) {
4026
+ if (schemelessReference) {
3988
4027
  s = serializePathEncoding(s, true);
3989
4028
  }
3990
4029
  if (authority === void 0 && s[0] === "/" && s[1] === "/") {
@@ -4031,16 +4070,34 @@ var require_fast_uri = __commonJS({
4031
4070
  return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
4032
4071
  }
4033
4072
  function canonicalizeHost(parsed, options, schemeHandler, isIP) {
4073
+ if (hasForbiddenDomainHost(parsed, options, schemeHandler, isIP)) {
4074
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
4075
+ return true;
4076
+ }
4034
4077
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
4078
+ let url2;
4035
4079
  try {
4036
- parsed.host = new URL("http://" + parsed.host).hostname;
4080
+ url2 = new URL("http://" + parsed.host);
4037
4081
  } catch (e) {
4038
4082
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
4039
4083
  return true;
4040
4084
  }
4085
+ if (!isHostOnlyURL(url2)) {
4086
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
4087
+ return true;
4088
+ }
4089
+ parsed.host = url2.hostname;
4041
4090
  }
4042
4091
  return false;
4043
4092
  }
4093
+ function hasForbiddenDomainHost(parsed, options, schemeHandler, isIP) {
4094
+ return Boolean(
4095
+ parsed.host && isIP === false && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && FORBIDDEN_DOMAIN_HOST_CHARACTER.test(parsed.host)
4096
+ );
4097
+ }
4098
+ function isHostOnlyURL(url2) {
4099
+ return url2.username === "" && url2.password === "" && url2.port === "" && url2.pathname === "/" && url2.search === "" && url2.hash === "" && url2.hostname !== "";
4100
+ }
4044
4101
  function parseWithStatus(uri, opts) {
4045
4102
  const options = Object.assign({}, opts);
4046
4103
  const parsed = {
@@ -4095,9 +4152,8 @@ var require_fast_uri = __commonJS({
4095
4152
  parsed.query = matches[7];
4096
4153
  parsed.fragment = matches[8];
4097
4154
  if (parsed.scheme !== void 0) {
4098
- const decodedScheme = unescape(parsed.scheme);
4099
- if (VALID_SCHEME.test(decodedScheme)) {
4100
- parsed.scheme = decodedScheme.toLowerCase();
4155
+ if (VALID_SCHEME.test(parsed.scheme)) {
4156
+ parsed.scheme = parsed.scheme.toLowerCase();
4101
4157
  } else {
4102
4158
  parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
4103
4159
  malformedScheme = true;
@@ -4125,7 +4181,7 @@ var require_fast_uri = __commonJS({
4125
4181
  malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
4126
4182
  parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
4127
4183
  if (malformedIPLiteral) {
4128
- parsed.error = parsed.error || "URI host is malformed.";
4184
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
4129
4185
  malformedAuthorityOrPort = true;
4130
4186
  }
4131
4187
  } else {
@@ -4153,7 +4209,7 @@ var require_fast_uri = __commonJS({
4153
4209
  if (!isIP) {
4154
4210
  host = normalizePercentEncoding(host.toLowerCase());
4155
4211
  }
4156
- parsed.host = reescapeHostDelimiters(host, isIP);
4212
+ parsed.host = isIP || options.scheme !== "null" ? reescapeHostDelimiters(host, isIP) : host;
4157
4213
  }
4158
4214
  if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
4159
4215
  if (parsed.path) {
@@ -35699,6 +35755,15 @@ var McpServer = class {
35699
35755
  this._promptHandlersInitialized = false;
35700
35756
  this.server = new Server(serverInfo, options);
35701
35757
  this._maxToolInputElements = resolveMaxToolInputElements(options?.maxToolInputElements);
35758
+ if (options?.capabilities?.tools) {
35759
+ this.setToolRequestHandlers();
35760
+ }
35761
+ if (options?.capabilities?.resources) {
35762
+ this.setResourceRequestHandlers();
35763
+ }
35764
+ if (options?.capabilities?.prompts) {
35765
+ this.setPromptRequestHandlers();
35766
+ }
35702
35767
  }
35703
35768
  /**
35704
35769
  * Access experimental features.
@@ -36753,11 +36818,16 @@ function processThought(input2, thoughtProcess) {
36753
36818
  const nextProcess = [...process3, step];
36754
36819
  if (input2.tag === "begin") {
36755
36820
  return {
36756
- result: buildFrameworkResponse(input2.content),
36821
+ result: {
36822
+ ...buildFrameworkResponse(input2.content),
36823
+ ...buildJourney(nextProcess),
36824
+ stepNumber: input2.stepNumber,
36825
+ totalSteps
36826
+ },
36757
36827
  thoughtProcess: nextProcess
36758
36828
  };
36759
36829
  }
36760
- if (input2.tag === "meditate") {
36830
+ if (input2.tag === "meditate" && input2.nextStepNeeded) {
36761
36831
  const { journey: journey2 } = buildJourney(nextProcess);
36762
36832
  return {
36763
36833
  result: {
@@ -36785,6 +36855,7 @@ function processThought(input2, thoughtProcess) {
36785
36855
  totalSteps: input2.stepNumber,
36786
36856
  journeyLength: nextProcess.length,
36787
36857
  finalJourney: journey2,
36858
+ journey: journey2,
36788
36859
  domainJourney: domainJourney2
36789
36860
  },
36790
36861
  thoughtProcess: nextProcess
@@ -36826,14 +36897,18 @@ function structuredContentFor(result) {
36826
36897
  return {
36827
36898
  status: result.status,
36828
36899
  contemplation: result.contemplation ?? "",
36829
- welcome: result.welcome ?? ""
36900
+ welcome: result.welcome ?? "",
36901
+ ...result.journey !== void 0 ? { journey: result.journey } : {},
36902
+ ...result.domainJourney !== void 0 ? { domainJourney: result.domainJourney } : {},
36903
+ ...result.stepNumber !== void 0 ? { stepNumber: result.stepNumber } : {},
36904
+ ...result.totalSteps !== void 0 ? { totalSteps: result.totalSteps } : {}
36830
36905
  };
36831
36906
  }
36832
36907
  return result;
36833
36908
  }
36834
36909
 
36835
36910
  // src/shared/version.ts
36836
- var VERSION = "0.8.5";
36911
+ var VERSION = "0.9.1";
36837
36912
 
36838
36913
  // src/shared/tool-defs.ts
36839
36914
  var SERVER_NAME = "lotus-wisdom";