@foldkit/devtools-mcp 0.26.0-canary.54f8bcd443b4 → 0.26.0-canary.b6cabe30f0b0
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 +23 -32
- package/dist/install.d.ts.map +1 -1
- package/dist/install.js +2 -2
- package/dist/relayClient.d.ts +2 -2
- package/dist/relayClient.d.ts.map +1 -1
- package/dist/relayLocation.d.ts.map +1 -1
- package/dist/relayLocation.js +34 -5
- package/dist/relayRegistry.d.ts.map +1 -1
- package/dist/relayRegistry.js +14 -46
- package/dist/relayRegistryTrust.d.ts.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +140 -470
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +6 -6
- package/package.json +8 -8
- package/dist/relayLiveness.d.ts +0 -6
- package/dist/relayLiveness.d.ts.map +0 -1
- package/dist/relayLiveness.js +0 -80
package/dist/server.js
CHANGED
|
@@ -12,7 +12,7 @@ import * as Path from "node:path";
|
|
|
12
12
|
import { dirname, join, win32 } from "node:path";
|
|
13
13
|
import * as NodeUrl from "node:url";
|
|
14
14
|
import process$1 from "node:process";
|
|
15
|
-
import {
|
|
15
|
+
import { isIPv6 } from "node:net";
|
|
16
16
|
import { lstat, realpath } from "node:fs/promises";
|
|
17
17
|
//#region \0rolldown/runtime.js
|
|
18
18
|
var __create = Object.create;
|
|
@@ -3029,7 +3029,7 @@ const String$6 = /*#__PURE__*/ make$26((self, that) => self < that ? -1 : 1);
|
|
|
3029
3029
|
* @category instances
|
|
3030
3030
|
* @since 4.0.0
|
|
3031
3031
|
*/
|
|
3032
|
-
const Number$
|
|
3032
|
+
const Number$4 = /*#__PURE__*/ make$26((self, that) => {
|
|
3033
3033
|
if (globalThis.Number.isNaN(self) && globalThis.Number.isNaN(that)) return 0;
|
|
3034
3034
|
if (globalThis.Number.isNaN(self)) return -1;
|
|
3035
3035
|
if (globalThis.Number.isNaN(that)) return 1;
|
|
@@ -8012,7 +8012,7 @@ const exitPrimitive = /*#__PURE__*/ makePrimitive({
|
|
|
8012
8012
|
}
|
|
8013
8013
|
});
|
|
8014
8014
|
/** @internal */
|
|
8015
|
-
const timeoutOrElse$1 = /*#__PURE__*/ dual(2, (self, options) => flatMap$1(timeoutOption
|
|
8015
|
+
const timeoutOrElse$1 = /*#__PURE__*/ dual(2, (self, options) => flatMap$1(timeoutOption(self, options.duration), (option) => isNone(option) ? options.orElse() : succeed$5(option.value)));
|
|
8016
8016
|
/** @internal */
|
|
8017
8017
|
const timeoutErrorFromDuration = (duration) => new TimeoutError(`Operation timed out after '${format$1(duration)}'`);
|
|
8018
8018
|
/** @internal */
|
|
@@ -8024,7 +8024,7 @@ const timeout$1 = /*#__PURE__*/ dual(2, (self, duration) => {
|
|
|
8024
8024
|
});
|
|
8025
8025
|
});
|
|
8026
8026
|
/** @internal */
|
|
8027
|
-
const timeoutOption
|
|
8027
|
+
const timeoutOption = /*#__PURE__*/ dual(2, (self, duration) => raceFirst$1(asSome(self), as$1(sleep(duration), none())));
|
|
8028
8028
|
/** @internal */
|
|
8029
8029
|
const ScopeTypeId = "~effect/Scope";
|
|
8030
8030
|
/** @internal */
|
|
@@ -8701,7 +8701,7 @@ const logLevelToOrder = (level) => {
|
|
|
8701
8701
|
}
|
|
8702
8702
|
};
|
|
8703
8703
|
/** @internal */
|
|
8704
|
-
const isLogLevelGreaterThan = /*#__PURE__*/ isGreaterThan$1(/* @__PURE__ */ mapInput(Number$
|
|
8704
|
+
const isLogLevelGreaterThan = /*#__PURE__*/ isGreaterThan$1(/* @__PURE__ */ mapInput(Number$4, logLevelToOrder));
|
|
8705
8705
|
/** @internal */
|
|
8706
8706
|
const CurrentLoggers = /*#__PURE__*/ Reference("effect/Logger/CurrentLoggers", { defaultValue: () => /* @__PURE__ */ new Set([defaultLogger, tracerLogger]) });
|
|
8707
8707
|
/** @internal */
|
|
@@ -10606,72 +10606,6 @@ const ProtoTimeZone = {
|
|
|
10606
10606
|
({ ...ProtoTimeZone });
|
|
10607
10607
|
/** @internal */
|
|
10608
10608
|
const toDateUtc$1 = (self) => new Date(self.epochMilliseconds);
|
|
10609
|
-
//#endregion
|
|
10610
|
-
//#region ../../node_modules/.pnpm/effect@4.1.0/node_modules/effect/dist/Number.js
|
|
10611
|
-
/**
|
|
10612
|
-
* Exposes the global number constructor.
|
|
10613
|
-
*
|
|
10614
|
-
* **When to use**
|
|
10615
|
-
*
|
|
10616
|
-
* Use to access native JavaScript numeric coercion from the Effect module
|
|
10617
|
-
* namespace.
|
|
10618
|
-
*
|
|
10619
|
-
* **Gotchas**
|
|
10620
|
-
*
|
|
10621
|
-
* This follows native `Number` coercion rules, including empty strings
|
|
10622
|
-
* becoming `0` and invalid numeric strings becoming `NaN`.
|
|
10623
|
-
*
|
|
10624
|
-
* @see {@link parse} for parsing strings into an `Option`
|
|
10625
|
-
*
|
|
10626
|
-
* **Example** (Coercing values to numbers)
|
|
10627
|
-
*
|
|
10628
|
-
* ```ts import.meta.vitest
|
|
10629
|
-
* import { Number as N } from "effect"
|
|
10630
|
-
*
|
|
10631
|
-
* N.Number("42") // => 42
|
|
10632
|
-
* N.Number("3.14") // => 3.14
|
|
10633
|
-
* ```
|
|
10634
|
-
*
|
|
10635
|
-
* @stability stable
|
|
10636
|
-
* @category constructors
|
|
10637
|
-
* @since 4.0.0
|
|
10638
|
-
*/
|
|
10639
|
-
const Number$4 = globalThis.Number;
|
|
10640
|
-
/**
|
|
10641
|
-
* Parses a `number` from a `string` safely using the `Number()` function.
|
|
10642
|
-
* The following special string values are supported: "NaN", "Infinity", "-Infinity".
|
|
10643
|
-
*
|
|
10644
|
-
* **When to use**
|
|
10645
|
-
*
|
|
10646
|
-
* Use to parse numeric text without throwing on invalid input.
|
|
10647
|
-
*
|
|
10648
|
-
* **Example** (Parsing numbers from strings)
|
|
10649
|
-
*
|
|
10650
|
-
* ```ts import.meta.vitest
|
|
10651
|
-
* import { Number, Option } from "effect"
|
|
10652
|
-
*
|
|
10653
|
-
* Number.parse("42") // => Option.some(42)
|
|
10654
|
-
* Number.parse("3.14") // => Option.some(3.14)
|
|
10655
|
-
* Number.parse("NaN") // => Option.some(NaN)
|
|
10656
|
-
* Number.parse("Infinity") // => Option.some(Infinity)
|
|
10657
|
-
* Number.parse("-Infinity") // => Option.some(-Infinity)
|
|
10658
|
-
* Number.parse("not a number") // => Option.none()
|
|
10659
|
-
* ```
|
|
10660
|
-
*
|
|
10661
|
-
* @see {@link Number} for native constructor coercion
|
|
10662
|
-
*
|
|
10663
|
-
* @stability stable
|
|
10664
|
-
* @category constructors
|
|
10665
|
-
* @since 2.0.0
|
|
10666
|
-
*/
|
|
10667
|
-
const parse$1 = (s) => {
|
|
10668
|
-
if (s === "NaN") return some$1(NaN);
|
|
10669
|
-
if (s === "Infinity") return some$1(Infinity);
|
|
10670
|
-
if (s === "-Infinity") return some$1(-Infinity);
|
|
10671
|
-
if (s.trim() === "") return none();
|
|
10672
|
-
const n = Number$4(s);
|
|
10673
|
-
return Number$4.isNaN(n) ? none() : some$1(n);
|
|
10674
|
-
};
|
|
10675
10609
|
globalThis.String;
|
|
10676
10610
|
/**
|
|
10677
10611
|
* Removes whitespace from both ends of a string.
|
|
@@ -12724,38 +12658,6 @@ const orElseSucceed = orElseSucceed$1;
|
|
|
12724
12658
|
*/
|
|
12725
12659
|
const timeout = timeout$1;
|
|
12726
12660
|
/**
|
|
12727
|
-
* Runs an effect with a time limit and represents only the timeout case as
|
|
12728
|
-
* `Option.none`.
|
|
12729
|
-
*
|
|
12730
|
-
* **When to use**
|
|
12731
|
-
*
|
|
12732
|
-
* Use when a timeout of an `Effect` should be handled as `Option.none`.
|
|
12733
|
-
*
|
|
12734
|
-
* **Details**
|
|
12735
|
-
*
|
|
12736
|
-
* If the source effect succeeds before the timeout, the returned effect
|
|
12737
|
-
* succeeds with `Option.some(value)`. If the timeout wins, the source effect is
|
|
12738
|
-
* interrupted and the returned effect succeeds with `Option.none`. If the
|
|
12739
|
-
* source effect fails before the timeout, that failure is preserved.
|
|
12740
|
-
*
|
|
12741
|
-
* **Example** (Returning None on timeout)
|
|
12742
|
-
*
|
|
12743
|
-
* ```ts import.meta.vitest
|
|
12744
|
-
* import { Effect, Option } from "effect"
|
|
12745
|
-
*
|
|
12746
|
-
* const timedOutEffect = Effect.never.pipe(Effect.timeoutOption(0))
|
|
12747
|
-
* await Effect.runPromise(timedOutEffect) // => Option.none()
|
|
12748
|
-
* ```
|
|
12749
|
-
*
|
|
12750
|
-
* @see {@link timeout} for a version that raises a `TimeoutError`.
|
|
12751
|
-
* @see {@link timeoutOrElse} for a version that allows specifying both success and timeout handlers.
|
|
12752
|
-
*
|
|
12753
|
-
* @stability stable
|
|
12754
|
-
* @category delays & timeouts
|
|
12755
|
-
* @since 3.1.0
|
|
12756
|
-
*/
|
|
12757
|
-
const timeoutOption = timeoutOption$1;
|
|
12758
|
-
/**
|
|
12759
12661
|
* Applies a timeout to an effect, lazily evaluating `orElse` after interrupting
|
|
12760
12662
|
* the source if the timeout is reached.
|
|
12761
12663
|
*
|
|
@@ -19760,13 +19662,13 @@ function annotateKey(ast, annotations) {
|
|
|
19760
19662
|
}) : new Context(false, false, void 0, annotations));
|
|
19761
19663
|
}
|
|
19762
19664
|
/** @internal */
|
|
19763
|
-
const optionalKey
|
|
19665
|
+
const optionalKey = /*#__PURE__*/ memoizeIdempotent((ast) => {
|
|
19764
19666
|
const context = ast.context ? ast.context.isOptional === false ? new Context(true, ast.context.isMutable, ast.context.constructorDefault, ast.context.annotations) : ast.context : new Context(true, false);
|
|
19765
19667
|
return optionalKeyLastLink(replaceContext(ast, context));
|
|
19766
19668
|
});
|
|
19767
|
-
const optionalKeyLastLink = /*#__PURE__*/ applyToLastLink(optionalKey
|
|
19669
|
+
const optionalKeyLastLink = /*#__PURE__*/ applyToLastLink(optionalKey);
|
|
19768
19670
|
/** @internal */
|
|
19769
|
-
const optional$2 = /*#__PURE__*/ memoize((ast) => optionalKey
|
|
19671
|
+
const optional$2 = /*#__PURE__*/ memoize((ast) => optionalKey(new Union$1([ast, undefined_])));
|
|
19770
19672
|
/** @internal */
|
|
19771
19673
|
function withConstructorDefault$1(ast, defaultValue) {
|
|
19772
19674
|
return replaceContext(ast, ast.context ? new Context(ast.context.isOptional, ast.context.isMutable, defaultValue, ast.context.annotations) : new Context(false, false, defaultValue));
|
|
@@ -22355,30 +22257,6 @@ function isSchema(u) {
|
|
|
22355
22257
|
return hasProperty(u, TypeId$11) && u[TypeId$11] === TypeId$11;
|
|
22356
22258
|
}
|
|
22357
22259
|
/**
|
|
22358
|
-
* Creates an exact optional key schema for struct fields. Unlike `optional`,
|
|
22359
|
-
* this creates exact optional properties (not `| undefined`) that can be
|
|
22360
|
-
* completely omitted from the object.
|
|
22361
|
-
*
|
|
22362
|
-
* **Example** (Creating a struct with optional key)
|
|
22363
|
-
*
|
|
22364
|
-
* ```ts import.meta.vitest
|
|
22365
|
-
* import { Schema } from "effect"
|
|
22366
|
-
*
|
|
22367
|
-
* const schema = Schema.Struct({
|
|
22368
|
-
* name: Schema.String,
|
|
22369
|
-
* age: Schema.optionalKey(Schema.Number)
|
|
22370
|
-
* })
|
|
22371
|
-
*
|
|
22372
|
-
* // Type: { readonly name: string; readonly age?: number }
|
|
22373
|
-
* type Person = typeof schema["Type"]
|
|
22374
|
-
* ```
|
|
22375
|
-
*
|
|
22376
|
-
* @stability stable
|
|
22377
|
-
* @category combinators
|
|
22378
|
-
* @since 4.0.0
|
|
22379
|
-
*/
|
|
22380
|
-
const optionalKey = /*#__PURE__*/ lambda((schema) => make$10(optionalKey$1(schema.ast), { schema }));
|
|
22381
|
-
/**
|
|
22382
22260
|
* Marks a struct field as optional, allowing the key to be absent or
|
|
22383
22261
|
* `undefined`.
|
|
22384
22262
|
*
|
|
@@ -23133,7 +23011,7 @@ function encodeNumberPayload(number) {
|
|
|
23133
23011
|
* @since 4.0.0
|
|
23134
23012
|
*/
|
|
23135
23013
|
const isBetween = /*#__PURE__*/ makeIsBetween({
|
|
23136
|
-
order: Number$
|
|
23014
|
+
order: Number$4,
|
|
23137
23015
|
annotate: (options) => {
|
|
23138
23016
|
const exclusiveMinimum = options.exclusiveMinimum ? true : void 0;
|
|
23139
23017
|
const exclusiveMaximum = options.exclusiveMaximum ? true : void 0;
|
|
@@ -29696,7 +29574,7 @@ const runMain = /* @__PURE__ */ makeRunMain(({ fiber, teardown }) => {
|
|
|
29696
29574
|
process.on("SIGTERM", onSigint);
|
|
29697
29575
|
});
|
|
29698
29576
|
//#endregion
|
|
29699
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
29577
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js
|
|
29700
29578
|
function getEnumValues(entries) {
|
|
29701
29579
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
29702
29580
|
return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
|
|
@@ -30003,17 +29881,6 @@ function prefixIssues(path, issues) {
|
|
|
30003
29881
|
function unwrapMessage(message) {
|
|
30004
29882
|
return typeof message === "string" ? message : message?.message;
|
|
30005
29883
|
}
|
|
30006
|
-
/** The leading size checks of `defChecks` that set an upper bound, each paired with it. */
|
|
30007
|
-
function sizeCaps(defChecks) {
|
|
30008
|
-
const caps = [];
|
|
30009
|
-
for (const ch of defChecks ?? []) {
|
|
30010
|
-
const d = ch._zod.def;
|
|
30011
|
-
if (!/_(length|size)$|_equals$/.test(d.check)) break;
|
|
30012
|
-
const max = d.maximum ?? d.length ?? d.size;
|
|
30013
|
-
if (max >= 0) caps.push([max, ch]);
|
|
30014
|
-
}
|
|
30015
|
-
return caps;
|
|
30016
|
-
}
|
|
30017
29884
|
function attachSchema(issues, start, inst) {
|
|
30018
29885
|
var _a;
|
|
30019
29886
|
for (let i = start; i < issues.length; i++) (_a = issues[i]).schema ?? (_a.schema = inst);
|
|
@@ -30230,7 +30097,7 @@ function constantCatch(value) {
|
|
|
30230
30097
|
return fn;
|
|
30231
30098
|
}
|
|
30232
30099
|
//#endregion
|
|
30233
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
30100
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/core.js
|
|
30234
30101
|
var _a$1;
|
|
30235
30102
|
const _zodDesc = {
|
|
30236
30103
|
value: void 0,
|
|
@@ -30336,7 +30203,7 @@ function config(newConfig) {
|
|
|
30336
30203
|
return globalConfig;
|
|
30337
30204
|
}
|
|
30338
30205
|
//#endregion
|
|
30339
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
30206
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/errors.js
|
|
30340
30207
|
function _getMessage() {
|
|
30341
30208
|
const internals = this._zod;
|
|
30342
30209
|
internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
|
|
@@ -30452,7 +30319,7 @@ function formatError$1(error, mapper = (issue) => issue.message) {
|
|
|
30452
30319
|
return fieldErrors;
|
|
30453
30320
|
}
|
|
30454
30321
|
//#endregion
|
|
30455
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
30322
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/parse.js
|
|
30456
30323
|
function finalizeParams(callee, params) {
|
|
30457
30324
|
return {
|
|
30458
30325
|
callee: params?.callee ?? callee,
|
|
@@ -30656,7 +30523,7 @@ const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
30656
30523
|
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
30657
30524
|
};
|
|
30658
30525
|
//#endregion
|
|
30659
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
30526
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/regexes.js
|
|
30660
30527
|
/**
|
|
30661
30528
|
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
30662
30529
|
* (timestamps embedded in the id). Use {@link cuid2} instead.
|
|
@@ -30729,7 +30596,7 @@ const _null$2 = /^null$/i;
|
|
|
30729
30596
|
const lowercase = /^[^A-Z]*$/;
|
|
30730
30597
|
const uppercase = /^[^a-z]*$/;
|
|
30731
30598
|
//#endregion
|
|
30732
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
30599
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/checks.js
|
|
30733
30600
|
const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
|
|
30734
30601
|
var _a;
|
|
30735
30602
|
inst._zod ?? (inst._zod = {});
|
|
@@ -31025,7 +30892,7 @@ const $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (ins
|
|
|
31025
30892
|
};
|
|
31026
30893
|
});
|
|
31027
30894
|
//#endregion
|
|
31028
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
30895
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/doc.js
|
|
31029
30896
|
var Doc = class {
|
|
31030
30897
|
constructor(args = [], closed = {}) {
|
|
31031
30898
|
this.content = [];
|
|
@@ -31059,14 +30926,14 @@ var Doc = class {
|
|
|
31059
30926
|
}
|
|
31060
30927
|
};
|
|
31061
30928
|
//#endregion
|
|
31062
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
30929
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/versions.js
|
|
31063
30930
|
const version = {
|
|
31064
30931
|
major: 4,
|
|
31065
30932
|
minor: 6,
|
|
31066
|
-
patch:
|
|
30933
|
+
patch: 5
|
|
31067
30934
|
};
|
|
31068
30935
|
//#endregion
|
|
31069
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
30936
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/schemas.js
|
|
31070
30937
|
const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
|
|
31071
30938
|
var _a;
|
|
31072
30939
|
inst ?? (inst = {});
|
|
@@ -31579,26 +31446,6 @@ const $ZodNever = /*@__PURE__*/ $constructor("$ZodNever", (inst, def) => {
|
|
|
31579
31446
|
return payload;
|
|
31580
31447
|
};
|
|
31581
31448
|
});
|
|
31582
|
-
function capSize(inst, size) {
|
|
31583
|
-
const caps = sizeCaps(inst._zod.def.checks);
|
|
31584
|
-
if (!caps.length) return;
|
|
31585
|
-
const cap = Math.min(...caps.map((c) => c[0]));
|
|
31586
|
-
const parse = inst._zod.parse;
|
|
31587
|
-
inst._zod.parse = (payload, ctx) => {
|
|
31588
|
-
const n = size(payload.value);
|
|
31589
|
-
if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
31590
|
-
for (const [max, ch] of sizeCaps(inst._zod.def.checks)) if (n > max && ch._zod.def.when(payload)) {
|
|
31591
|
-
const start = payload.issues.length;
|
|
31592
|
-
ch._zod.check(payload);
|
|
31593
|
-
payload.issues[start].continue = false;
|
|
31594
|
-
attachSchema(payload.issues, start, inst);
|
|
31595
|
-
return payload;
|
|
31596
|
-
}
|
|
31597
|
-
}
|
|
31598
|
-
return parse(payload, ctx);
|
|
31599
|
-
};
|
|
31600
|
-
}
|
|
31601
|
-
const arraySize = (input) => Array.isArray(input) ? input.length : -1;
|
|
31602
31449
|
function handleArrayResult(result, final, index) {
|
|
31603
31450
|
if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
|
|
31604
31451
|
final.value[index] = result.value;
|
|
@@ -31636,7 +31483,6 @@ const $ZodArray = /*@__PURE__*/ $constructor("$ZodArray", (inst, def) => {
|
|
|
31636
31483
|
if (proms.length) return Promise.all(proms).then(() => payload);
|
|
31637
31484
|
return payload;
|
|
31638
31485
|
};
|
|
31639
|
-
capSize(inst, arraySize);
|
|
31640
31486
|
});
|
|
31641
31487
|
function handlePropertyResult(result, final, key, input, optin, optout) {
|
|
31642
31488
|
const isPresent = key in input;
|
|
@@ -31745,7 +31591,7 @@ const $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
|
|
|
31745
31591
|
}
|
|
31746
31592
|
return propValues;
|
|
31747
31593
|
});
|
|
31748
|
-
const isObject$
|
|
31594
|
+
const isObject$3 = isObject;
|
|
31749
31595
|
const catchall = def.catchall;
|
|
31750
31596
|
let value;
|
|
31751
31597
|
const memo = globalConfig.memoizer;
|
|
@@ -31753,7 +31599,7 @@ const $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
|
|
|
31753
31599
|
inst._zod.parse = (payload, ctx) => {
|
|
31754
31600
|
value ?? (value = _normalized.value);
|
|
31755
31601
|
const input = payload.value;
|
|
31756
|
-
if (!isObject$
|
|
31602
|
+
if (!isObject$3(input)) {
|
|
31757
31603
|
payload.issues.push({
|
|
31758
31604
|
expected: "object",
|
|
31759
31605
|
code: "invalid_type",
|
|
@@ -31883,7 +31729,7 @@ const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
31883
31729
|
return doc.compile();
|
|
31884
31730
|
};
|
|
31885
31731
|
let fastpass;
|
|
31886
|
-
const isObject$
|
|
31732
|
+
const isObject$2 = isObject;
|
|
31887
31733
|
const jit = !globalConfig.jitless;
|
|
31888
31734
|
const fastEnabled = jit && allowsEval.value;
|
|
31889
31735
|
const catchall = def.catchall;
|
|
@@ -31891,7 +31737,7 @@ const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
31891
31737
|
inst._zod.parse = (payload, ctx) => {
|
|
31892
31738
|
value ?? (value = _normalized.value);
|
|
31893
31739
|
const input = payload.value;
|
|
31894
|
-
if (!isObject$
|
|
31740
|
+
if (!isObject$2(input)) {
|
|
31895
31741
|
payload.issues.push({
|
|
31896
31742
|
expected: "object",
|
|
31897
31743
|
code: "invalid_type",
|
|
@@ -32540,7 +32386,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
32540
32386
|
}
|
|
32541
32387
|
}
|
|
32542
32388
|
//#endregion
|
|
32543
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
32389
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/memoizer.js
|
|
32544
32390
|
var $ZodCyclicError = class extends Error {
|
|
32545
32391
|
constructor() {
|
|
32546
32392
|
super(`Cannot parse a reference cycle that closes through a transform`);
|
|
@@ -32793,7 +32639,7 @@ function isBackEdge(ctx, value) {
|
|
|
32793
32639
|
return backEdges !== void 0 && isRef(value) && backEdges.has(value);
|
|
32794
32640
|
}
|
|
32795
32641
|
//#endregion
|
|
32796
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
32642
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/en.js
|
|
32797
32643
|
const error = () => {
|
|
32798
32644
|
const Sizable = {
|
|
32799
32645
|
string: {
|
|
@@ -32901,7 +32747,7 @@ function en_default() {
|
|
|
32901
32747
|
return { localeError: error() };
|
|
32902
32748
|
}
|
|
32903
32749
|
//#endregion
|
|
32904
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
32750
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/registries.js
|
|
32905
32751
|
var _a;
|
|
32906
32752
|
var $ZodRegistry = class {
|
|
32907
32753
|
constructor() {
|
|
@@ -32948,7 +32794,7 @@ function registry() {
|
|
|
32948
32794
|
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
32949
32795
|
const globalRegistry = globalThis.__zod_globalRegistry;
|
|
32950
32796
|
//#endregion
|
|
32951
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
32797
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/api.js
|
|
32952
32798
|
function snapshotChecks(def) {
|
|
32953
32799
|
if (def.checks) def.checks = [...def.checks];
|
|
32954
32800
|
return def;
|
|
@@ -33475,7 +33321,7 @@ function _check(fn, params) {
|
|
|
33475
33321
|
return ch;
|
|
33476
33322
|
}
|
|
33477
33323
|
//#endregion
|
|
33478
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
33324
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/to-json-schema.js
|
|
33479
33325
|
function assignProps(target, ...sources) {
|
|
33480
33326
|
for (const source of sources) for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProp(target, key, source[key]);
|
|
33481
33327
|
return target;
|
|
@@ -33919,7 +33765,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
33919
33765
|
return finalize(ctx, schema);
|
|
33920
33766
|
};
|
|
33921
33767
|
//#endregion
|
|
33922
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
33768
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/json-schema-processors.js
|
|
33923
33769
|
const narrowMin = (agg, key, value) => {
|
|
33924
33770
|
if (agg[key] === void 0 || value > agg[key]) agg[key] = value;
|
|
33925
33771
|
};
|
|
@@ -34374,7 +34220,7 @@ const optionalProcessor = (schema, ctx, _json, params) => {
|
|
|
34374
34220
|
seen.ref = def.innerType;
|
|
34375
34221
|
};
|
|
34376
34222
|
//#endregion
|
|
34377
|
-
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
34223
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
|
|
34378
34224
|
function isZ4Schema(s) {
|
|
34379
34225
|
return !!s._zod;
|
|
34380
34226
|
}
|
|
@@ -34417,7 +34263,7 @@ function getLiteralValue(schema) {
|
|
|
34417
34263
|
if (directValue !== void 0) return directValue;
|
|
34418
34264
|
}
|
|
34419
34265
|
//#endregion
|
|
34420
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
34266
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/errors.js
|
|
34421
34267
|
const _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
34422
34268
|
function _lazyMethod(proto, key, make) {
|
|
34423
34269
|
Object.defineProperty(proto, key, {
|
|
@@ -34467,7 +34313,7 @@ const initializer = (inst, issues) => {
|
|
|
34467
34313
|
};
|
|
34468
34314
|
const ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, void 0, { Parent: Error });
|
|
34469
34315
|
//#endregion
|
|
34470
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
34316
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/parse.js
|
|
34471
34317
|
const parse = /* @__PURE__ */ _parse(ZodRealError);
|
|
34472
34318
|
const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
34473
34319
|
const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -34481,7 +34327,7 @@ const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
|
34481
34327
|
const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
34482
34328
|
const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
34483
34329
|
//#endregion
|
|
34484
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
34330
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/schemas.js
|
|
34485
34331
|
function _ensureDefaultLocale() {
|
|
34486
34332
|
if (!globalConfig.localeError) config(en_default());
|
|
34487
34333
|
}
|
|
@@ -35393,12 +35239,12 @@ function preprocess(fn, schema) {
|
|
|
35393
35239
|
});
|
|
35394
35240
|
}
|
|
35395
35241
|
//#endregion
|
|
35396
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
35242
|
+
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/iso.js
|
|
35397
35243
|
function datetime(params) {
|
|
35398
35244
|
return /* @__PURE__ */ _isoDateTime(ZodISODateTime, params);
|
|
35399
35245
|
}
|
|
35400
35246
|
//#endregion
|
|
35401
|
-
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
35247
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
35402
35248
|
const LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
35403
35249
|
const SUPPORTED_PROTOCOL_VERSIONS = [
|
|
35404
35250
|
LATEST_PROTOCOL_VERSION,
|
|
@@ -37293,7 +37139,7 @@ var UrlElicitationRequiredError = class extends McpError {
|
|
|
37293
37139
|
}
|
|
37294
37140
|
};
|
|
37295
37141
|
//#endregion
|
|
37296
|
-
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
37142
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
|
|
37297
37143
|
/**
|
|
37298
37144
|
* Experimental task interfaces for MCP SDK.
|
|
37299
37145
|
* WARNING: These APIs are experimental and may change without notice.
|
|
@@ -37310,7 +37156,7 @@ function isTerminal(status) {
|
|
|
37310
37156
|
return status === "completed" || status === "failed" || status === "cancelled";
|
|
37311
37157
|
}
|
|
37312
37158
|
//#endregion
|
|
37313
|
-
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
37159
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
37314
37160
|
function getMethodLiteral(schema) {
|
|
37315
37161
|
const methodSchema = getObjectShape(schema)?.method;
|
|
37316
37162
|
if (!methodSchema) throw new Error("Schema is missing a method literal");
|
|
@@ -37358,7 +37204,6 @@ var Protocol = class {
|
|
|
37358
37204
|
this.setRequestHandler(GetTaskPayloadRequestSchema, async (request, extra) => {
|
|
37359
37205
|
const handleTaskResult = async () => {
|
|
37360
37206
|
const taskId = request.params.taskId;
|
|
37361
|
-
if (!await this._taskStore.getTask(taskId, extra.sessionId)) throw new McpError(ErrorCode.InvalidParams, `Task not found: ${taskId}`);
|
|
37362
37207
|
if (this._taskMessageQueue) {
|
|
37363
37208
|
let queuedMessage;
|
|
37364
37209
|
while (queuedMessage = await this._taskMessageQueue.dequeue(taskId, extra.sessionId)) {
|
|
@@ -37385,12 +37230,12 @@ var Protocol = class {
|
|
|
37385
37230
|
const task = await this._taskStore.getTask(taskId, extra.sessionId);
|
|
37386
37231
|
if (!task) throw new McpError(ErrorCode.InvalidParams, `Task not found: ${taskId}`);
|
|
37387
37232
|
if (!isTerminal(task.status)) {
|
|
37388
|
-
await this._waitForTaskUpdate(taskId, extra.signal
|
|
37233
|
+
await this._waitForTaskUpdate(taskId, extra.signal);
|
|
37389
37234
|
return await handleTaskResult();
|
|
37390
37235
|
}
|
|
37391
37236
|
if (isTerminal(task.status)) {
|
|
37392
37237
|
const result = await this._taskStore.getTaskResult(taskId, extra.sessionId);
|
|
37393
|
-
this._clearTaskQueue(taskId
|
|
37238
|
+
this._clearTaskQueue(taskId);
|
|
37394
37239
|
return {
|
|
37395
37240
|
...result,
|
|
37396
37241
|
_meta: {
|
|
@@ -37421,7 +37266,7 @@ var Protocol = class {
|
|
|
37421
37266
|
if (!task) throw new McpError(ErrorCode.InvalidParams, `Task not found: ${request.params.taskId}`);
|
|
37422
37267
|
if (isTerminal(task.status)) throw new McpError(ErrorCode.InvalidParams, `Cannot cancel task in terminal status: ${task.status}`);
|
|
37423
37268
|
await this._taskStore.updateTaskStatus(request.params.taskId, "cancelled", "Client cancelled task execution.", extra.sessionId);
|
|
37424
|
-
this._clearTaskQueue(request.params.taskId
|
|
37269
|
+
this._clearTaskQueue(request.params.taskId);
|
|
37425
37270
|
const cancelledTask = await this._taskStore.getTask(request.params.taskId, extra.sessionId);
|
|
37426
37271
|
if (!cancelledTask) throw new McpError(ErrorCode.InvalidParams, `Task not found after cancellation: ${request.params.taskId}`);
|
|
37427
37272
|
return {
|
|
@@ -37526,17 +37371,6 @@ var Protocol = class {
|
|
|
37526
37371
|
const handler = this._requestHandlers.get(request.method) ?? this.fallbackRequestHandler;
|
|
37527
37372
|
const capturedTransport = this._transport;
|
|
37528
37373
|
const relatedTaskId = request.params?._meta?.[RELATED_TASK_META_KEY]?.taskId;
|
|
37529
|
-
const sessionId = capturedTransport?.sessionId;
|
|
37530
|
-
const store = this._taskStore;
|
|
37531
|
-
let relatedTaskFound = true;
|
|
37532
|
-
let relatedTaskLookup;
|
|
37533
|
-
if (relatedTaskId && store && this._taskMessageQueue && sessionId !== void 0) {
|
|
37534
|
-
relatedTaskFound = false;
|
|
37535
|
-
relatedTaskLookup = (async () => {
|
|
37536
|
-
if (!await store.getTask(relatedTaskId, sessionId)) throw new McpError(ErrorCode.InvalidParams, `Task not found: ${relatedTaskId}`);
|
|
37537
|
-
relatedTaskFound = true;
|
|
37538
|
-
})();
|
|
37539
|
-
}
|
|
37540
37374
|
if (handler === void 0) {
|
|
37541
37375
|
const errorResponse = {
|
|
37542
37376
|
jsonrpc: "2.0",
|
|
@@ -37546,14 +37380,7 @@ var Protocol = class {
|
|
|
37546
37380
|
message: "Method not found"
|
|
37547
37381
|
}
|
|
37548
37382
|
};
|
|
37549
|
-
if (relatedTaskId &&
|
|
37550
|
-
const queuedError = {
|
|
37551
|
-
type: "error",
|
|
37552
|
-
message: errorResponse,
|
|
37553
|
-
timestamp: Date.now()
|
|
37554
|
-
};
|
|
37555
|
-
relatedTaskLookup.then(() => this._enqueueTaskMessage(relatedTaskId, queuedError, sessionId), () => capturedTransport?.send(errorResponse)).catch((error) => this._onerror(/* @__PURE__ */ new Error(`Failed to send an error response: ${error}`)));
|
|
37556
|
-
} else if (relatedTaskId && this._taskMessageQueue) this._enqueueTaskMessage(relatedTaskId, {
|
|
37383
|
+
if (relatedTaskId && this._taskMessageQueue) this._enqueueTaskMessage(relatedTaskId, {
|
|
37557
37384
|
type: "error",
|
|
37558
37385
|
message: errorResponse,
|
|
37559
37386
|
timestamp: Date.now()
|
|
@@ -37595,8 +37422,7 @@ var Protocol = class {
|
|
|
37595
37422
|
closeSSEStream: extra?.closeSSEStream,
|
|
37596
37423
|
closeStandaloneSSEStream: extra?.closeStandaloneSSEStream
|
|
37597
37424
|
};
|
|
37598
|
-
|
|
37599
|
-
if (relatedTaskLookup && abortController.signal.aborted) throw new McpError(ErrorCode.ConnectionClosed, "Request was cancelled");
|
|
37425
|
+
Promise.resolve().then(() => {
|
|
37600
37426
|
if (taskCreationParams) this.assertTaskHandlerCapability(request.method);
|
|
37601
37427
|
}).then(() => handler(request, fullExtra)).then(async (result) => {
|
|
37602
37428
|
if (abortController.signal.aborted) return;
|
|
@@ -37622,7 +37448,7 @@ var Protocol = class {
|
|
|
37622
37448
|
...error["data"] !== void 0 && { data: error["data"] }
|
|
37623
37449
|
}
|
|
37624
37450
|
};
|
|
37625
|
-
if (relatedTaskId && this._taskMessageQueue
|
|
37451
|
+
if (relatedTaskId && this._taskMessageQueue) await this._enqueueTaskMessage(relatedTaskId, {
|
|
37626
37452
|
type: "error",
|
|
37627
37453
|
message: errorResponse,
|
|
37628
37454
|
timestamp: Date.now()
|
|
@@ -38074,7 +37900,7 @@ var Protocol = class {
|
|
|
38074
37900
|
async _enqueueTaskMessage(taskId, message, sessionId) {
|
|
38075
37901
|
if (!this._taskStore || !this._taskMessageQueue) throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");
|
|
38076
37902
|
const maxQueueSize = this._options?.maxTaskQueueSize;
|
|
38077
|
-
await this._taskMessageQueue.enqueue(taskId, message, sessionId
|
|
37903
|
+
await this._taskMessageQueue.enqueue(taskId, message, sessionId, maxQueueSize);
|
|
38078
37904
|
}
|
|
38079
37905
|
/**
|
|
38080
37906
|
* Clears the message queue for a task and rejects any pending request resolvers.
|
|
@@ -38099,13 +37925,12 @@ var Protocol = class {
|
|
|
38099
37925
|
* Uses polling to check for updates at the task's configured poll interval.
|
|
38100
37926
|
* @param taskId The task ID to wait for
|
|
38101
37927
|
* @param signal Abort signal to cancel the wait
|
|
38102
|
-
* @param sessionId Session of the request that waits, passed to the task store
|
|
38103
37928
|
* @returns Promise that resolves when an update occurs or rejects if aborted
|
|
38104
37929
|
*/
|
|
38105
|
-
async _waitForTaskUpdate(taskId, signal
|
|
37930
|
+
async _waitForTaskUpdate(taskId, signal) {
|
|
38106
37931
|
let interval = this._options?.defaultTaskPollInterval ?? 1e3;
|
|
38107
37932
|
try {
|
|
38108
|
-
const task = await this._taskStore?.getTask(taskId
|
|
37933
|
+
const task = await this._taskStore?.getTask(taskId);
|
|
38109
37934
|
if (task?.pollInterval) interval = task.pollInterval;
|
|
38110
37935
|
} catch {}
|
|
38111
37936
|
return new Promise((resolve, reject) => {
|
|
@@ -40909,7 +40734,7 @@ var require_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40909
40734
|
};
|
|
40910
40735
|
}));
|
|
40911
40736
|
//#endregion
|
|
40912
|
-
//#region ../../node_modules/.pnpm/fast-uri@3.1.
|
|
40737
|
+
//#region ../../node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/utils.js
|
|
40913
40738
|
var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40914
40739
|
/** @type {(value: string) => boolean} */
|
|
40915
40740
|
const isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
@@ -41203,38 +41028,6 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41203
41028
|
return output.join("");
|
|
41204
41029
|
}
|
|
41205
41030
|
/**
|
|
41206
|
-
* Removes dot segments from the path of a relative reference (a path that does
|
|
41207
|
-
* not start with "/") without changing what it resolves to against any base.
|
|
41208
|
-
* Unlike `removeDotSegments`, leading ".." segments that cannot be collapsed
|
|
41209
|
-
* are kept, the result never becomes root-relative, and a result that would be
|
|
41210
|
-
* empty or start with an empty segment is prefixed with "." (an empty path
|
|
41211
|
-
* means "same document" and a leading "//" would introduce an authority).
|
|
41212
|
-
*
|
|
41213
|
-
* @param {string} path
|
|
41214
|
-
* @returns {string}
|
|
41215
|
-
*/
|
|
41216
|
-
function removeDotSegmentsRelative(path) {
|
|
41217
|
-
if (path === "" || path[0] === "/") return removeDotSegments(path);
|
|
41218
|
-
const segments = path.split("/");
|
|
41219
|
-
const last = segments.length - 1;
|
|
41220
|
-
/** @type {string[]} */
|
|
41221
|
-
const output = [];
|
|
41222
|
-
let trailingDirectory = false;
|
|
41223
|
-
for (let i = 0; i <= last; i++) {
|
|
41224
|
-
const segment = segments[i];
|
|
41225
|
-
if (segment === "." || segment === "..") {
|
|
41226
|
-
if (segment === "..") {
|
|
41227
|
-
if (output.length !== 0 && output[output.length - 1] !== "..") output.pop();
|
|
41228
|
-
else output.push("..");
|
|
41229
|
-
}
|
|
41230
|
-
trailingDirectory = i === last;
|
|
41231
|
-
} else output.push(segment);
|
|
41232
|
-
}
|
|
41233
|
-
if (trailingDirectory && output[output.length - 1] !== "..") output.push("");
|
|
41234
|
-
if (output.length === 0 || output[0] === "" || output[0].includes(":")) output.unshift(".");
|
|
41235
|
-
return output.join("/");
|
|
41236
|
-
}
|
|
41237
|
-
/**
|
|
41238
41031
|
* Re-escape RFC 3986 gen-delims that must not appear literally in the host.
|
|
41239
41032
|
* After the URI regex parses, these characters cannot be literal in the host
|
|
41240
41033
|
* field, so any that appear after decoding came from percent-encoding and
|
|
@@ -41538,7 +41331,6 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41538
41331
|
encodeFragment,
|
|
41539
41332
|
escapePreservingEscapes,
|
|
41540
41333
|
removeDotSegments,
|
|
41541
|
-
removeDotSegmentsRelative,
|
|
41542
41334
|
isIPv4,
|
|
41543
41335
|
isUUID,
|
|
41544
41336
|
normalizeIPv6,
|
|
@@ -41546,7 +41338,7 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41546
41338
|
};
|
|
41547
41339
|
}));
|
|
41548
41340
|
//#endregion
|
|
41549
|
-
//#region ../../node_modules/.pnpm/fast-uri@3.1.
|
|
41341
|
+
//#region ../../node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/schemes.js
|
|
41550
41342
|
var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
41551
41343
|
const { isUUID } = require_utils();
|
|
41552
41344
|
const URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
|
|
@@ -41730,26 +41522,20 @@ var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41730
41522
|
};
|
|
41731
41523
|
}));
|
|
41732
41524
|
//#endregion
|
|
41733
|
-
//#region ../../node_modules/.pnpm/fast-uri@3.1.
|
|
41525
|
+
//#region ../../node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/index.js
|
|
41734
41526
|
var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
41735
|
-
const { normalizeIPv6, removeDotSegments,
|
|
41527
|
+
const { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
41736
41528
|
const { SCHEMES, getSchemeHandler } = require_schemes();
|
|
41737
41529
|
const VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
|
|
41738
41530
|
const MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
|
|
41739
|
-
const MALFORMED_HOST_ERROR = "URI host is malformed.";
|
|
41740
|
-
const FORBIDDEN_DOMAIN_HOST_CHARACTER = /[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;
|
|
41741
41531
|
/**
|
|
41742
|
-
* RFC 3986 section 3.1 does not allow percent-encoding in a scheme, so the
|
|
41743
|
-
* scheme is validated as-is and never decoded. Decoding would let inert input
|
|
41744
|
-
* such as `%6Aavascript:` become a live `javascript:` scheme.
|
|
41745
|
-
*
|
|
41746
41532
|
* @param {string} scheme
|
|
41747
41533
|
* @returns {string}
|
|
41748
41534
|
*/
|
|
41749
|
-
function
|
|
41750
|
-
const
|
|
41751
|
-
if (!VALID_SCHEME.test(
|
|
41752
|
-
return
|
|
41535
|
+
function decodeValidScheme(scheme) {
|
|
41536
|
+
const decodedScheme = unescape(String(scheme));
|
|
41537
|
+
if (!VALID_SCHEME.test(decodedScheme)) throw new TypeError(MALFORMED_SCHEME_ERROR);
|
|
41538
|
+
return decodedScheme;
|
|
41753
41539
|
}
|
|
41754
41540
|
/**
|
|
41755
41541
|
* @template {import('./types/index').URIComponent|string} T
|
|
@@ -41777,7 +41563,6 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41777
41563
|
const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);
|
|
41778
41564
|
const resolvedHost = resolved.host;
|
|
41779
41565
|
const resolvedHostIsIP = resolvedHost !== void 0 && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
|
|
41780
|
-
if (hasForbiddenDomainHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP)) throw new Error(MALFORMED_HOST_ERROR);
|
|
41781
41566
|
canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
|
|
41782
41567
|
const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !/\P{ASCII}/u.test(resolvedHost);
|
|
41783
41568
|
if (resolved.error && !encodedASCIIHost) throw new Error(resolved.error);
|
|
@@ -41821,11 +41606,10 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41821
41606
|
} else {
|
|
41822
41607
|
if (relative.path[0] === "/") target.path = removeDotSegments(relative.path);
|
|
41823
41608
|
else {
|
|
41824
|
-
|
|
41825
|
-
if (baseHasAuthority && !base.path) target.path = "/" + relative.path;
|
|
41609
|
+
if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) target.path = "/" + relative.path;
|
|
41826
41610
|
else if (!base.path) target.path = relative.path;
|
|
41827
41611
|
else target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
|
|
41828
|
-
target.path =
|
|
41612
|
+
target.path = removeDotSegments(target.path);
|
|
41829
41613
|
}
|
|
41830
41614
|
target.query = relative.query;
|
|
41831
41615
|
}
|
|
@@ -41873,18 +41657,17 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41873
41657
|
};
|
|
41874
41658
|
const options = Object.assign({}, opts);
|
|
41875
41659
|
const uriTokens = [];
|
|
41876
|
-
if (component.scheme) component.scheme =
|
|
41660
|
+
if (component.scheme) component.scheme = decodeValidScheme(component.scheme);
|
|
41877
41661
|
const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
|
|
41878
41662
|
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
|
|
41879
41663
|
const hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;
|
|
41880
|
-
const
|
|
41881
|
-
const pathNoScheme = !options.skipEscape && schemelessReference;
|
|
41664
|
+
const pathNoScheme = !options.skipEscape && component.scheme === void 0 && !hasAuthority;
|
|
41882
41665
|
if (component.path !== void 0) {
|
|
41883
41666
|
if (!options.skipEscape) component.path = serializePathEncoding(component.path, pathNoScheme);
|
|
41884
41667
|
else component.path = normalizePercentEncoding(component.path);
|
|
41885
41668
|
}
|
|
41886
41669
|
if (options.reference !== "suffix" && component.scheme) {
|
|
41887
|
-
component.scheme =
|
|
41670
|
+
component.scheme = decodeValidScheme(component.scheme);
|
|
41888
41671
|
uriTokens.push(component.scheme, ":");
|
|
41889
41672
|
}
|
|
41890
41673
|
const authority = recomposeAuthority(component);
|
|
@@ -41895,8 +41678,8 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41895
41678
|
}
|
|
41896
41679
|
if (component.path !== void 0) {
|
|
41897
41680
|
let s = component.path;
|
|
41898
|
-
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) s =
|
|
41899
|
-
if (
|
|
41681
|
+
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) s = removeDotSegments(s);
|
|
41682
|
+
if (pathNoScheme) s = serializePathEncoding(s, true);
|
|
41900
41683
|
if (authority === void 0 && s[0] === "/" && s[1] === "/") s = "/%2F" + s.slice(2);
|
|
41901
41684
|
uriTokens.push(s);
|
|
41902
41685
|
}
|
|
@@ -41960,50 +41743,15 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41960
41743
|
* @returns {boolean} whether host conversion failed
|
|
41961
41744
|
*/
|
|
41962
41745
|
function canonicalizeHost(parsed, options, schemeHandler, isIP) {
|
|
41963
|
-
if (
|
|
41964
|
-
parsed.
|
|
41746
|
+
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) try {
|
|
41747
|
+
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
41748
|
+
} catch (e) {
|
|
41749
|
+
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
41965
41750
|
return true;
|
|
41966
41751
|
}
|
|
41967
|
-
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
41968
|
-
let url;
|
|
41969
|
-
try {
|
|
41970
|
-
url = new URL("http://" + parsed.host);
|
|
41971
|
-
} catch (e) {
|
|
41972
|
-
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
41973
|
-
return true;
|
|
41974
|
-
}
|
|
41975
|
-
if (!isHostOnlyURL(url)) {
|
|
41976
|
-
parsed.error = parsed.error || MALFORMED_HOST_ERROR;
|
|
41977
|
-
return true;
|
|
41978
|
-
}
|
|
41979
|
-
parsed.host = url.hostname;
|
|
41980
|
-
}
|
|
41981
41752
|
return false;
|
|
41982
41753
|
}
|
|
41983
41754
|
/**
|
|
41984
|
-
* Whether a domain host contains an ASCII character that RFC 3986 does not
|
|
41985
|
-
* allow in a reg-name (unreserved, sub-delims, or pct-encoded). Such a host is
|
|
41986
|
-
* rejected instead of being handed to the WHATWG URL parser, which would treat
|
|
41987
|
-
* "@" as a userinfo delimiter (silently dropping the data before it) and strip
|
|
41988
|
-
* TAB, LF, and CR. Non-ASCII characters remain allowed for IDNs.
|
|
41989
|
-
*
|
|
41990
|
-
* @param {import('./types/index').URIComponent} parsed
|
|
41991
|
-
* @param {import('./types/index').Options} options
|
|
41992
|
-
* @param {{ domainHost?: boolean }|undefined} schemeHandler
|
|
41993
|
-
* @param {boolean} isIP
|
|
41994
|
-
* @returns {boolean}
|
|
41995
|
-
*/
|
|
41996
|
-
function hasForbiddenDomainHost(parsed, options, schemeHandler, isIP) {
|
|
41997
|
-
return Boolean(parsed.host && isIP === false && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && FORBIDDEN_DOMAIN_HOST_CHARACTER.test(parsed.host));
|
|
41998
|
-
}
|
|
41999
|
-
/**
|
|
42000
|
-
* @param {URL} url
|
|
42001
|
-
* @returns {boolean}
|
|
42002
|
-
*/
|
|
42003
|
-
function isHostOnlyURL(url) {
|
|
42004
|
-
return url.username === "" && url.password === "" && url.port === "" && url.pathname === "/" && url.search === "" && url.hash === "" && url.hostname !== "";
|
|
42005
|
-
}
|
|
42006
|
-
/**
|
|
42007
41755
|
* @param {string} uri
|
|
42008
41756
|
* @param {import('./types/index').Options} [opts]
|
|
42009
41757
|
* @returns {{ parsed: import('./types/index').URIComponent, malformedAuthorityOrPort: boolean, malformedPercentEncoding: boolean, malformedSchemeSpecific: boolean, malformedHost: boolean, malformedScheme: boolean }}
|
|
@@ -42060,7 +41808,8 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
42060
41808
|
parsed.query = matches[7];
|
|
42061
41809
|
parsed.fragment = matches[8];
|
|
42062
41810
|
if (parsed.scheme !== void 0) {
|
|
42063
|
-
|
|
41811
|
+
const decodedScheme = unescape(parsed.scheme);
|
|
41812
|
+
if (VALID_SCHEME.test(decodedScheme)) parsed.scheme = decodedScheme.toLowerCase();
|
|
42064
41813
|
else {
|
|
42065
41814
|
parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
|
|
42066
41815
|
malformedScheme = true;
|
|
@@ -42083,7 +41832,7 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
42083
41832
|
malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
|
|
42084
41833
|
parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
|
|
42085
41834
|
if (malformedIPLiteral) {
|
|
42086
|
-
parsed.error = parsed.error ||
|
|
41835
|
+
parsed.error = parsed.error || "URI host is malformed.";
|
|
42087
41836
|
malformedAuthorityOrPort = true;
|
|
42088
41837
|
}
|
|
42089
41838
|
} else isIP = true;
|
|
@@ -42098,7 +41847,7 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
42098
41847
|
if (uri.indexOf("%") !== -1 && parsed.host !== void 0 && !malformedIPLiteral) {
|
|
42099
41848
|
let host = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);
|
|
42100
41849
|
if (!isIP) host = normalizePercentEncoding(host.toLowerCase());
|
|
42101
|
-
parsed.host =
|
|
41850
|
+
parsed.host = reescapeHostDelimiters(host, isIP);
|
|
42102
41851
|
}
|
|
42103
41852
|
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
|
|
42104
41853
|
if (parsed.path) parsed.path = normalizePathEncoding(parsed.path);
|
|
@@ -44846,7 +44595,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
44846
44595
|
exports.default = formatsPlugin;
|
|
44847
44596
|
}));
|
|
44848
44597
|
//#endregion
|
|
44849
|
-
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
44598
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
|
|
44850
44599
|
var import_ajv = /* @__PURE__ */ __toESM(require_ajv(), 1);
|
|
44851
44600
|
var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);
|
|
44852
44601
|
function createDefaultAjvInstance() {
|
|
@@ -44922,7 +44671,7 @@ var AjvJsonSchemaValidator = class {
|
|
|
44922
44671
|
}
|
|
44923
44672
|
};
|
|
44924
44673
|
//#endregion
|
|
44925
|
-
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
44674
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
|
|
44926
44675
|
/**
|
|
44927
44676
|
* Experimental server task features for MCP SDK.
|
|
44928
44677
|
* WARNING: These APIs are experimental and may change without notice.
|
|
@@ -45140,7 +44889,7 @@ var ExperimentalServerTasks = class {
|
|
|
45140
44889
|
}
|
|
45141
44890
|
};
|
|
45142
44891
|
//#endregion
|
|
45143
|
-
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
44892
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
|
|
45144
44893
|
/**
|
|
45145
44894
|
* Experimental task capability assertion helpers.
|
|
45146
44895
|
* WARNING: These APIs are experimental and may change without notice.
|
|
@@ -45185,7 +44934,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
|
|
|
45185
44934
|
}
|
|
45186
44935
|
}
|
|
45187
44936
|
//#endregion
|
|
45188
|
-
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
44937
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
|
|
45189
44938
|
/**
|
|
45190
44939
|
* An MCP server on top of a pluggable transport.
|
|
45191
44940
|
*
|
|
@@ -45264,7 +45013,14 @@ var Server = class extends Protocol {
|
|
|
45264
45013
|
setRequestHandler(requestSchema, handler) {
|
|
45265
45014
|
const methodSchema = getObjectShape(requestSchema)?.method;
|
|
45266
45015
|
if (!methodSchema) throw new Error("Schema is missing a method literal");
|
|
45267
|
-
|
|
45016
|
+
let methodValue;
|
|
45017
|
+
if (isZ4Schema(methodSchema)) {
|
|
45018
|
+
const v4Schema = methodSchema;
|
|
45019
|
+
methodValue = (v4Schema._zod?.def)?.value ?? v4Schema.value;
|
|
45020
|
+
} else {
|
|
45021
|
+
const v3Schema = methodSchema;
|
|
45022
|
+
methodValue = v3Schema._def?.value ?? v3Schema.value;
|
|
45023
|
+
}
|
|
45268
45024
|
if (typeof methodValue !== "string") throw new Error("Schema method literal must be a string");
|
|
45269
45025
|
if (methodValue === "tools/call") {
|
|
45270
45026
|
const wrappedHandler = async (request, extra) => {
|
|
@@ -45507,18 +45263,13 @@ var Server = class extends Protocol {
|
|
|
45507
45263
|
return this.notification({ method: "notifications/prompts/list_changed" });
|
|
45508
45264
|
}
|
|
45509
45265
|
};
|
|
45266
|
+
//#endregion
|
|
45267
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
45510
45268
|
/**
|
|
45511
45269
|
* Buffers a continuous stdio stream into discrete JSON-RPC messages.
|
|
45512
45270
|
*/
|
|
45513
45271
|
var ReadBuffer = class {
|
|
45514
|
-
constructor(options) {
|
|
45515
|
-
this._maxBufferSize = options?.maxBufferSize ?? 10485760;
|
|
45516
|
-
}
|
|
45517
45272
|
append(chunk) {
|
|
45518
|
-
if ((this._buffer?.length ?? 0) + chunk.length > this._maxBufferSize) {
|
|
45519
|
-
this.clear();
|
|
45520
|
-
throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
|
|
45521
|
-
}
|
|
45522
45273
|
this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
|
|
45523
45274
|
}
|
|
45524
45275
|
readMessage() {
|
|
@@ -45540,30 +45291,25 @@ function serializeMessage(message) {
|
|
|
45540
45291
|
return JSON.stringify(message) + "\n";
|
|
45541
45292
|
}
|
|
45542
45293
|
//#endregion
|
|
45543
|
-
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
45294
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
45544
45295
|
/**
|
|
45545
45296
|
* Server transport for stdio: this communicates with an MCP client by reading from the current process' stdin and writing to stdout.
|
|
45546
45297
|
*
|
|
45547
45298
|
* This transport is only available in Node.js environments.
|
|
45548
45299
|
*/
|
|
45549
45300
|
var StdioServerTransport = class {
|
|
45550
|
-
constructor(_stdin = process$1.stdin, _stdout = process$1.stdout
|
|
45301
|
+
constructor(_stdin = process$1.stdin, _stdout = process$1.stdout) {
|
|
45551
45302
|
this._stdin = _stdin;
|
|
45552
45303
|
this._stdout = _stdout;
|
|
45304
|
+
this._readBuffer = new ReadBuffer();
|
|
45553
45305
|
this._started = false;
|
|
45554
45306
|
this._ondata = (chunk) => {
|
|
45555
|
-
|
|
45556
|
-
|
|
45557
|
-
this.processReadBuffer();
|
|
45558
|
-
} catch (error) {
|
|
45559
|
-
this.onerror?.(error);
|
|
45560
|
-
this.close().catch(() => {});
|
|
45561
|
-
}
|
|
45307
|
+
this._readBuffer.append(chunk);
|
|
45308
|
+
this.processReadBuffer();
|
|
45562
45309
|
};
|
|
45563
45310
|
this._onerror = (error) => {
|
|
45564
45311
|
this.onerror?.(error);
|
|
45565
45312
|
};
|
|
45566
|
-
this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });
|
|
45567
45313
|
}
|
|
45568
45314
|
/**
|
|
45569
45315
|
* Starts listening for messages on stdin.
|
|
@@ -45627,9 +45373,9 @@ const printNextSteps = (alreadyRegistered) => {
|
|
|
45627
45373
|
console.log("");
|
|
45628
45374
|
console.log("Next steps:");
|
|
45629
45375
|
console.log("");
|
|
45630
|
-
console.log(" 1.
|
|
45376
|
+
console.log(" 1. Pass your Message Schema to Runtime.makeApplication (enables dispatch):");
|
|
45631
45377
|
console.log("");
|
|
45632
|
-
console.log(" devTools: {
|
|
45378
|
+
console.log(" devTools: { Message }");
|
|
45633
45379
|
console.log("");
|
|
45634
45380
|
console.log(" 2. Start your dev server, then restart your AI agent (Claude Code, Cursor, etc.).");
|
|
45635
45381
|
console.log("");
|
|
@@ -45711,7 +45457,6 @@ const getDirectPropertyNames = (propertySignatures) => {
|
|
|
45711
45457
|
}
|
|
45712
45458
|
return names;
|
|
45713
45459
|
};
|
|
45714
|
-
const callableTaggedStructs = /* @__PURE__ */ new WeakSet();
|
|
45715
45460
|
const makeCallable = (tag, fields) => {
|
|
45716
45461
|
const schema = TaggedStruct(tag, fields);
|
|
45717
45462
|
const propertyNames = Object.hasOwn(fields, "_tag") ? void 0 : getDirectPropertyNames(schema.ast.propertySignatures);
|
|
@@ -45731,7 +45476,7 @@ const makeCallable = (tag, fields) => {
|
|
|
45731
45476
|
}
|
|
45732
45477
|
return output;
|
|
45733
45478
|
} : make;
|
|
45734
|
-
|
|
45479
|
+
return new Proxy(function() {}, {
|
|
45735
45480
|
apply(_target, _thisArg, argumentsList) {
|
|
45736
45481
|
return construct(argumentsList[0]);
|
|
45737
45482
|
},
|
|
@@ -45745,8 +45490,6 @@ const makeCallable = (tag, fields) => {
|
|
|
45745
45490
|
return Reflect.getPrototypeOf(schema);
|
|
45746
45491
|
}
|
|
45747
45492
|
});
|
|
45748
|
-
callableTaggedStructs.add(callable);
|
|
45749
|
-
return callable;
|
|
45750
45493
|
};
|
|
45751
45494
|
const reservedUnionPropertyNames = /* @__PURE__ */ new Set(["members", "subset"]);
|
|
45752
45495
|
const taggedUnionTypeOnlyPropertyNames = /* @__PURE__ */ new Set([
|
|
@@ -45825,18 +45568,18 @@ function defineTaggedUnion(casesByTag) {
|
|
|
45825
45568
|
}
|
|
45826
45569
|
//#endregion
|
|
45827
45570
|
//#region ../foldkit/src/devTools/protocol.ts
|
|
45828
|
-
/** A serialized Command produced during a Message dispatch (or `init`). `args` is `Some` when the Command declared an args record. `
|
|
45571
|
+
/** A serialized Command produced during a Message dispatch (or `init`). `args` is `Some` when the Command declared an args record. `maybeSubmodelPath` is `None` until the result Message resolves, `Some([])` for a top-level result, and `Some(tags)` for a Submodel-routed result. */
|
|
45829
45572
|
const SerializedCommand = Struct({
|
|
45830
45573
|
name: String$2,
|
|
45831
45574
|
args: OptionFromNullOr(Record(String$2, Unknown)),
|
|
45832
|
-
|
|
45575
|
+
maybeSubmodelPath: OptionFromNullOr(ArraySchema(String$2))
|
|
45833
45576
|
});
|
|
45834
45577
|
/** A serialized Mount lifecycle event (start or end). `args` is `Some` when the Mount's definition declared an args record, and carries the runtime values used to construct the MountAction instance. */
|
|
45835
45578
|
const SerializedMount = Struct({
|
|
45836
45579
|
name: String$2,
|
|
45837
45580
|
args: OptionFromNullOr(Record(String$2, Unknown))
|
|
45838
45581
|
});
|
|
45839
|
-
/** A serialized history entry as it appears on the wire. `
|
|
45582
|
+
/** A serialized history entry as it appears on the wire. `submodelPath` lists `Got<Child>Message` wrapper tags from outer to inner when the entry came up through a Submodel chain; `maybeLeafTag` is `Some` with the innermost child Message tag when one exists. `mountStarts` lists Mounts that fired during the render after this Message; `mountEnds` lists Mounts whose elements were unmounted during that render. The Messages dispatched by mount Effects appear as their own entries elsewhere in history. */
|
|
45840
45583
|
const SerializedEntry = Struct({
|
|
45841
45584
|
index: Number$1,
|
|
45842
45585
|
tag: String$2,
|
|
@@ -45848,7 +45591,7 @@ const SerializedEntry = Struct({
|
|
|
45848
45591
|
isModelChanged: Boolean$1,
|
|
45849
45592
|
changedPaths: ArraySchema(String$2),
|
|
45850
45593
|
affectedPaths: ArraySchema(String$2),
|
|
45851
|
-
|
|
45594
|
+
submodelPath: ArraySchema(String$2),
|
|
45852
45595
|
maybeLeafTag: OptionFromNullOr(String$2)
|
|
45853
45596
|
});
|
|
45854
45597
|
/** Metadata about a single keyframe. The index identifies the point in history where the runtime can replay back to. */
|
|
@@ -45996,18 +45739,8 @@ const RELAY_REGISTRY_DIRECTORY_NAME = "foldkit-devtools-relays";
|
|
|
45996
45739
|
/** Environment variable that sets the relay registry directory. */
|
|
45997
45740
|
const RELAY_REGISTRY_DIRECTORY_VARIABLE = "FOLDKIT_DEVTOOLS_RELAY_DIRECTORY";
|
|
45998
45741
|
/**
|
|
45999
|
-
* Linux PID and network namespaces of the process that published a relay
|
|
46000
|
-
* record, as `/proc/self/ns` links name them.
|
|
46001
|
-
*/
|
|
46002
|
-
const RelayNamespaces = Struct({
|
|
46003
|
-
pid: String$2,
|
|
46004
|
-
network: String$2
|
|
46005
|
-
});
|
|
46006
|
-
/**
|
|
46007
45742
|
* Record published while a Vite relay listens. `root` selects the project;
|
|
46008
|
-
* `id` distinguishes a restarted relay from the one it replaced.
|
|
46009
|
-
* meaningful only inside the PID namespace in `namespaces`, which is absent
|
|
46010
|
-
* on platforms without namespaces and in records from older plugins.
|
|
45743
|
+
* `id` distinguishes a restarted relay from the one it replaced.
|
|
46011
45744
|
*/
|
|
46012
45745
|
const RelayRecord = Struct({
|
|
46013
45746
|
version: Literal(1),
|
|
@@ -46015,8 +45748,7 @@ const RelayRecord = Struct({
|
|
|
46015
45748
|
root: String$2,
|
|
46016
45749
|
url: String$2,
|
|
46017
45750
|
pid: Number$1,
|
|
46018
|
-
startedAt: Number$1
|
|
46019
|
-
namespaces: optionalKey(RelayNamespaces)
|
|
45751
|
+
startedAt: Number$1
|
|
46020
45752
|
});
|
|
46021
45753
|
//#endregion
|
|
46022
45754
|
//#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/constants.js
|
|
@@ -49854,74 +49586,6 @@ const handleIncomingMessage = (raw, pendingResponsesRef) => {
|
|
|
49854
49586
|
});
|
|
49855
49587
|
};
|
|
49856
49588
|
//#endregion
|
|
49857
|
-
//#region src/relayLiveness.ts
|
|
49858
|
-
const NAMESPACE_DIRECTORY = "/proc/self/ns";
|
|
49859
|
-
const PROBE_TIMEOUT$1 = seconds(1);
|
|
49860
|
-
const WEBSOCKET_PORT = 80;
|
|
49861
|
-
const SECURE_WEBSOCKET_PORT = 443;
|
|
49862
|
-
const IPV6_BRACKETS = /^\[|\]$/g;
|
|
49863
|
-
const readProcessNamespaces = gen(function* () {
|
|
49864
|
-
const fileSystem = yield* FileSystem;
|
|
49865
|
-
const pid = yield* fileSystem.readLink(`${NAMESPACE_DIRECTORY}/pid`);
|
|
49866
|
-
const network = yield* fileSystem.readLink(`${NAMESPACE_DIRECTORY}/net`);
|
|
49867
|
-
return some$1({
|
|
49868
|
-
pid,
|
|
49869
|
-
network
|
|
49870
|
-
});
|
|
49871
|
-
}).pipe(orElseSucceed(() => none()));
|
|
49872
|
-
const isProcessAlive = (pid) => {
|
|
49873
|
-
try {
|
|
49874
|
-
process.kill(pid, 0);
|
|
49875
|
-
return true;
|
|
49876
|
-
} catch (error) {
|
|
49877
|
-
return error instanceof Error && "code" in error && error.code === "EPERM";
|
|
49878
|
-
}
|
|
49879
|
-
};
|
|
49880
|
-
const relayAddress = (url) => flatMap$4(fromNullishOr(URL.parse(url)), (parsed) => {
|
|
49881
|
-
const host = parsed.hostname.replace(IPV6_BRACKETS, "");
|
|
49882
|
-
if (isNonEmpty$1(parsed.port)) return map$7(parse$1(parsed.port), (port) => ({
|
|
49883
|
-
host,
|
|
49884
|
-
port
|
|
49885
|
-
}));
|
|
49886
|
-
else if (parsed.protocol === "wss:") return some$1({
|
|
49887
|
-
host,
|
|
49888
|
-
port: SECURE_WEBSOCKET_PORT
|
|
49889
|
-
});
|
|
49890
|
-
else return some$1({
|
|
49891
|
-
host,
|
|
49892
|
-
port: WEBSOCKET_PORT
|
|
49893
|
-
});
|
|
49894
|
-
});
|
|
49895
|
-
const refusesConnections = ({ host, port }) => callback$1((resume) => {
|
|
49896
|
-
const socket = connect({
|
|
49897
|
-
host,
|
|
49898
|
-
port
|
|
49899
|
-
});
|
|
49900
|
-
const settle = (isRefused) => {
|
|
49901
|
-
socket.destroy();
|
|
49902
|
-
resume(succeed$1(isRefused));
|
|
49903
|
-
};
|
|
49904
|
-
socket.once("connect", () => settle(false));
|
|
49905
|
-
socket.once("error", (error) => settle("code" in error && error.code === "ECONNREFUSED"));
|
|
49906
|
-
return sync(() => socket.destroy());
|
|
49907
|
-
}).pipe(timeoutOption(PROBE_TIMEOUT$1), map$1(getOrElse(() => false)));
|
|
49908
|
-
const statusFromPort = (url) => match$5(relayAddress(url), {
|
|
49909
|
-
onNone: () => succeed$1("Running"),
|
|
49910
|
-
onSome: (address) => map$1(refusesConnections(address), (isRefused) => isRefused ? "Gone" : "Running")
|
|
49911
|
-
});
|
|
49912
|
-
const checkRelay = (record, maybeOwnNamespaces) => {
|
|
49913
|
-
const maybeRecordNamespaces = fromNullishOr(record.namespaces);
|
|
49914
|
-
const maybeBothNamespaces = all$2([maybeOwnNamespaces, maybeRecordNamespaces]);
|
|
49915
|
-
const hasNoNamespaces = isNone(maybeOwnNamespaces) && isNone(maybeRecordNamespaces);
|
|
49916
|
-
const isSamePidNamespace = exists(maybeBothNamespaces, ([own, recorded]) => own.pid === recorded.pid);
|
|
49917
|
-
const isOtherNetworkNamespace = exists(maybeBothNamespaces, ([own, recorded]) => own.network !== recorded.network);
|
|
49918
|
-
if (isSome(maybeRecordNamespaces) && isNone(maybeOwnNamespaces)) return succeed$1("Unreachable");
|
|
49919
|
-
else if (isOtherNetworkNamespace) return succeed$1("Unreachable");
|
|
49920
|
-
else if (isSamePidNamespace || hasNoNamespaces && process.platform !== "linux") return succeed$1(isProcessAlive(record.pid) ? "Running" : "Gone");
|
|
49921
|
-
else if (isNone(maybeRecordNamespaces) && isProcessAlive(record.pid)) return succeed$1("Running");
|
|
49922
|
-
else return statusFromPort(record.url);
|
|
49923
|
-
};
|
|
49924
|
-
//#endregion
|
|
49925
49589
|
//#region src/relayRegistryTrust.ts
|
|
49926
49590
|
const PERMISSIONS_BEYOND_OWNER = 63;
|
|
49927
49591
|
const PARENT_WRITE_PERMISSIONS = 18;
|
|
@@ -50264,20 +49928,6 @@ const relayRegistryTrust = { inspect: (directory) => gen(function* () {
|
|
|
50264
49928
|
const RUNTIME_DIRECTORY_VARIABLE = "XDG_RUNTIME_DIR";
|
|
50265
49929
|
const RECORD_FILE_EXTENSION = ".json";
|
|
50266
49930
|
const RETIRING_RECORD_SUFFIX = ".retiring";
|
|
50267
|
-
const AUTOMATIC_RELAY_HOST = "127.0.0.1";
|
|
50268
|
-
const AUTOMATIC_RELAY_PATH = "/__foldkit/devtools-mcp";
|
|
50269
|
-
const RELAY_TOKEN_PARAMETER = "token";
|
|
50270
|
-
const RELAY_TOKEN_PATTERN = /^[0-9a-f]{64}$/;
|
|
50271
|
-
const parseUrl = liftThrowable((url) => new URL(url));
|
|
50272
|
-
const hasValidPort = (url) => {
|
|
50273
|
-
const port = globalThis.Number(url.port);
|
|
50274
|
-
return url.port !== "" && globalThis.Number.isInteger(port) && port > 0 && port <= 65535;
|
|
50275
|
-
};
|
|
50276
|
-
const isPublishedRelayUrl = (value) => exists(parseUrl(value), (url) => {
|
|
50277
|
-
if (url.protocol !== "ws:" || url.username !== "" || url.password !== "" || url.hash !== "" || !hasValidPort(url)) return false;
|
|
50278
|
-
const parameters = fromIterable$5(url.searchParams);
|
|
50279
|
-
return url.hostname === AUTOMATIC_RELAY_HOST && url.pathname === AUTOMATIC_RELAY_PATH && length(parameters) === 1 && exists(head(parameters), ([name, token]) => name === RELAY_TOKEN_PARAMETER && RELAY_TOKEN_PATTERN.test(token));
|
|
50280
|
-
});
|
|
50281
49931
|
const decodeRelayRecord = decodeUnknownOption(fromJsonString(RelayRecord));
|
|
50282
49932
|
const relayRegistryDirectory = gen(function* () {
|
|
50283
49933
|
const path = yield* Path$1;
|
|
@@ -50288,6 +49938,14 @@ const relayRegistryDirectory = gen(function* () {
|
|
|
50288
49938
|
return path.join(getOrElse(maybeRuntimeDirectory, () => defaultParent), RELAY_REGISTRY_DIRECTORY_NAME);
|
|
50289
49939
|
});
|
|
50290
49940
|
}).pipe(orDie);
|
|
49941
|
+
const isProcessAlive = (pid) => {
|
|
49942
|
+
try {
|
|
49943
|
+
process.kill(pid, 0);
|
|
49944
|
+
return true;
|
|
49945
|
+
} catch (error) {
|
|
49946
|
+
return error instanceof Error && "code" in error && error.code === "EPERM";
|
|
49947
|
+
}
|
|
49948
|
+
};
|
|
50291
49949
|
const readRecordFile = (filePath) => gen(function* () {
|
|
50292
49950
|
const raw = yield* (yield* FileSystem).readFileString(filePath);
|
|
50293
49951
|
return decodeRelayRecord(raw);
|
|
@@ -50300,19 +49958,15 @@ const retireStaleRecord = (filePath, record) => gen(function* () {
|
|
|
50300
49958
|
if (!exists(maybeRetiringRecord, (retiringRecord) => retiringRecord.id === record.id)) yield* fileSystem.link(retiringPath, filePath).pipe(ignore);
|
|
50301
49959
|
yield* fileSystem.remove(retiringPath, { force: true }).pipe(ignore);
|
|
50302
49960
|
});
|
|
50303
|
-
const readLiveRecordFile = (filePath
|
|
49961
|
+
const readLiveRecordFile = (filePath) => gen(function* () {
|
|
50304
49962
|
const maybeRecord = yield* readRecordFile(filePath);
|
|
50305
|
-
if (
|
|
50306
|
-
|
|
50307
|
-
if (!isPublishedRelayUrl(record.url)) return none();
|
|
50308
|
-
const status = yield* checkRelay(record, maybeOwnNamespaces);
|
|
50309
|
-
if (status === "Gone") {
|
|
50310
|
-
yield* retireStaleRecord(filePath, record);
|
|
49963
|
+
if (isSome(maybeRecord) && !isProcessAlive(maybeRecord.value.pid)) {
|
|
49964
|
+
yield* retireStaleRecord(filePath, maybeRecord.value);
|
|
50311
49965
|
return none();
|
|
50312
|
-
}
|
|
50313
|
-
|
|
49966
|
+
}
|
|
49967
|
+
return maybeRecord;
|
|
50314
49968
|
});
|
|
50315
|
-
const newestFirst = mapInput(flip$1(Number$
|
|
49969
|
+
const newestFirst = mapInput(flip$1(Number$4), (record) => record.startedAt);
|
|
50316
49970
|
const isWithinRoot = (root, candidate, pathApi) => {
|
|
50317
49971
|
const relativePath = pathApi.relative(root, candidate);
|
|
50318
49972
|
return relativePath === "" || relativePath !== ".." && !relativePath.startsWith(`..${pathApi.sep}`) && !pathApi.isAbsolute(relativePath);
|
|
@@ -50353,8 +50007,7 @@ const discoverRelays = (projectRoot, registryReader) => gen(function* () {
|
|
|
50353
50007
|
const directory = maybeDirectory.value;
|
|
50354
50008
|
const fileNames = yield* fileSystem.readDirectory(directory).pipe(orElseSucceed(() => []));
|
|
50355
50009
|
const recordFileNames = filter$2(fileNames, endsWith(RECORD_FILE_EXTENSION));
|
|
50356
|
-
const
|
|
50357
|
-
const records = getSomes(yield* forEach$1(recordFileNames, (recordFileName) => readLiveRecordFile(path.join(directory, recordFileName), maybeOwnNamespaces)));
|
|
50010
|
+
const records = getSomes(yield* forEach$1(recordFileNames, (recordFileName) => readLiveRecordFile(path.join(directory, recordFileName))));
|
|
50358
50011
|
const realProjectRoot = yield* realRoot(projectRoot);
|
|
50359
50012
|
const rootedRecords = yield* forEach$1(records, (record) => map$1(realRoot(record.root), (root) => ({
|
|
50360
50013
|
record,
|
|
@@ -50372,6 +50025,10 @@ const discoverRelays = (projectRoot, registryReader) => gen(function* () {
|
|
|
50372
50025
|
//#region src/relayLocation.ts
|
|
50373
50026
|
const LEGACY_DEFAULT_PORT = 9988;
|
|
50374
50027
|
const DEFAULT_HOST = "localhost";
|
|
50028
|
+
const AUTOMATIC_RELAY_HOST = "127.0.0.1";
|
|
50029
|
+
const AUTOMATIC_RELAY_PATH = "/__foldkit/devtools-mcp";
|
|
50030
|
+
const RELAY_TOKEN_PARAMETER = "token";
|
|
50031
|
+
const RELAY_TOKEN_PATTERN = /^[0-9a-f]{64}$/;
|
|
50375
50032
|
const loadSettings = gen(function* () {
|
|
50376
50033
|
const maybeConfiguredPort = yield* option(String$1("FOLDKIT_DEVTOOLS_MCP_PORT"));
|
|
50377
50034
|
const maybeConfiguredHost = yield* option(String$1("FOLDKIT_DEVTOOLS_MCP_HOST"));
|
|
@@ -50389,6 +50046,16 @@ const fixedTarget = (url) => ({
|
|
|
50389
50046
|
url,
|
|
50390
50047
|
maybeProjectRoot: none()
|
|
50391
50048
|
});
|
|
50049
|
+
const parseUrl = liftThrowable((url) => new URL(url));
|
|
50050
|
+
const hasValidPort = (url) => {
|
|
50051
|
+
const port = globalThis.Number(url.port);
|
|
50052
|
+
return url.port !== "" && globalThis.Number.isInteger(port) && port > 0 && port <= 65535;
|
|
50053
|
+
};
|
|
50054
|
+
const isPublishedRelayUrl = (value) => exists(parseUrl(value), (url) => {
|
|
50055
|
+
if (url.protocol !== "ws:" || url.username !== "" || url.password !== "" || url.hash !== "" || !hasValidPort(url)) return false;
|
|
50056
|
+
const parameters = fromIterable$5(url.searchParams);
|
|
50057
|
+
return url.hostname === AUTOMATIC_RELAY_HOST && url.pathname === AUTOMATIC_RELAY_PATH && length(parameters) === 1 && exists(head(parameters), ([name, token]) => name === RELAY_TOKEN_PARAMETER && RELAY_TOKEN_PATTERN.test(token));
|
|
50058
|
+
});
|
|
50392
50059
|
const configuredRelayUrl = (settings) => {
|
|
50393
50060
|
const { maybeConfiguredHost, maybeConfiguredPort } = settings;
|
|
50394
50061
|
if (isSome(maybeConfiguredHost) || isSome(maybeConfiguredPort)) {
|
|
@@ -50399,11 +50066,14 @@ const configuredRelayUrl = (settings) => {
|
|
|
50399
50066
|
};
|
|
50400
50067
|
const resolveRelayTargets = (settings, registryReader) => match$5(configuredRelayUrl(settings), {
|
|
50401
50068
|
onSome: (url) => succeed$1([fixedTarget(url)]),
|
|
50402
|
-
onNone: () => map$1(discoverRelays(settings.projectRoot, registryReader),
|
|
50403
|
-
|
|
50404
|
-
|
|
50405
|
-
|
|
50406
|
-
|
|
50069
|
+
onNone: () => map$1(discoverRelays(settings.projectRoot, registryReader), (records) => {
|
|
50070
|
+
const trustedRecords = filter$2(records, (record) => isPublishedRelayUrl(record.url));
|
|
50071
|
+
return map$4(trustedRecords, (record) => ({
|
|
50072
|
+
key: record.id,
|
|
50073
|
+
url: record.url,
|
|
50074
|
+
maybeProjectRoot: some$1(record.root)
|
|
50075
|
+
}));
|
|
50076
|
+
})
|
|
50407
50077
|
});
|
|
50408
50078
|
//#endregion
|
|
50409
50079
|
//#region src/tools.ts
|
|
@@ -50476,7 +50146,7 @@ const DispatchMessagesInput = Struct({
|
|
|
50476
50146
|
});
|
|
50477
50147
|
const GetMessageSchemaInput = Struct({
|
|
50478
50148
|
runtime_id: RuntimeIdField,
|
|
50479
|
-
variant_tag: optional$1(String$2.annotate({ description: "Optional dot-separated path of variant `_tag` values. When omitted, the tool returns a small variant index (tag names plus payload field names plus a tagged-union indicator) so agents can enumerate the top-level union cheaply. When provided, the tool walks the path through each variant's single tagged-union payload field, narrows the schema along the chain, and collapses any union deeper than the path to a `{ \"_summary\": \"union\", \"variants\": [...] }` placeholder. Extend the path to drill further. Examples: `\"ScrolledSidebar\"` (one top-level variant), `\"GotMobileMenuDialogMessage.GotAnimationMessage\"` (two levels of a
|
|
50149
|
+
variant_tag: optional$1(String$2.annotate({ description: "Optional dot-separated path of variant `_tag` values. When omitted, the tool returns a small variant index (tag names plus payload field names plus a tagged-union indicator) so agents can enumerate the top-level union cheaply. When provided, the tool walks the path through each variant's single tagged-union payload field, narrows the schema along the chain, and collapses any union deeper than the path to a `{ \"_summary\": \"union\", \"variants\": [...] }` placeholder. Extend the path to drill further. Examples: `\"ScrolledSidebar\"` (one top-level variant), `\"GotMobileMenuDialogMessage.GotAnimationMessage\"` (two levels of a Submodel chain)." }))
|
|
50480
50150
|
});
|
|
50481
50151
|
/**
|
|
50482
50152
|
* Extract the inner JSON Schema from Effect's `JsonSchema.Document` wrapper.
|
|
@@ -50585,13 +50255,13 @@ const buildTools = (relayClient) => [
|
|
|
50585
50255
|
},
|
|
50586
50256
|
{
|
|
50587
50257
|
name: "foldkit_get_message",
|
|
50588
|
-
description: "Read a single Message history entry by absolute index. The response carries the SerializedEntry (tag, message body, commands, mountStarts, mountEnds, timestamp, `isModelChanged`, `changedPaths` for leaf-level mutations, `affectedPaths` adding their ancestor paths). Each entry in `commands` carries the Command name, `args` (`Some(record)` when the Command declared an args schema, `None` otherwise), and `
|
|
50258
|
+
description: "Read a single Message history entry by absolute index. The response carries the SerializedEntry (tag, message body, commands, mountStarts, mountEnds, timestamp, `isModelChanged`, `changedPaths` for leaf-level mutations, `affectedPaths` adding their ancestor paths). Each entry in `commands` carries the Command name, `args` (`Some(record)` when the Command declared an args schema, `None` otherwise), and `maybeSubmodelPath` (`None` before the result resolves, `Some([])` for a resolved top-level Command, or `Some(tags)` for a resolved Submodel Command). `mountStarts` lists Mounts that fired during the render after this Message; `mountEnds` lists Mounts whose elements were unmounted during that render. Each Mount carries its `name` and `args` (`Some(record)` when the Mount declared an args schema, `None` otherwise). For Submodel-routed entries (tag matches `Got*Message`), the entry also carries `submodelPath` listing wrapper tags from outer to inner and `maybeLeafTag` naming the innermost child Message. Model snapshots are not included; call foldkit_get_model_at with `index - 1` (before) and `index` (after) to inspect Model state around the entry.",
|
|
50589
50259
|
inputSchema: toInputSchema(GetMessageInput),
|
|
50590
50260
|
handle: runRuntimeTool(GetMessageInput, ({ index }) => Request.RequestGetMessage({ index }), relayClient)
|
|
50591
50261
|
},
|
|
50592
50262
|
{
|
|
50593
50263
|
name: "foldkit_get_init",
|
|
50594
|
-
description: "Read the runtime's initial Model, the Commands returned from the application's `init` function, and the Mounts that fired during the first render. The init entry is the synthetic row at index -1 in the DevTools panel; this tool exposes the same data without time-travelling the runtime. `maybeModel` is `None` until the runtime has finished its first render and recorded init, then stays `Some` for the rest of the runtime's life. `commands` lists init-time Commands in the order they were produced, each with its name, `args` (`Some(record)` when the Command declared an args schema, `None` otherwise), and `
|
|
50264
|
+
description: "Read the runtime's initial Model, the Commands returned from the application's `init` function, and the Mounts that fired during the first render. The init entry is the synthetic row at index -1 in the DevTools panel; this tool exposes the same data without time-travelling the runtime. `maybeModel` is `None` until the runtime has finished its first render and recorded init, then stays `Some` for the rest of the runtime's life. `commands` lists init-time Commands in the order they were produced, each with its name, `args` (`Some(record)` when the Command declared an args schema, `None` otherwise), and `maybeSubmodelPath` (`None` before the result resolves, `Some([])` for a resolved top-level Command, or `Some(tags)` for a resolved Submodel Command); `mountStarts` lists Mounts whose elements appeared in the initial render, each with its name and `args` (`Some(record)` when the Mount declared an args schema, `None` otherwise).",
|
|
50595
50265
|
inputSchema: toInputSchema(GetInitInput),
|
|
50596
50266
|
handle: runRuntimeTool(GetInitInput, () => Request.RequestGetInit(), relayClient)
|
|
50597
50267
|
},
|
|
@@ -50621,19 +50291,19 @@ const buildTools = (relayClient) => [
|
|
|
50621
50291
|
},
|
|
50622
50292
|
{
|
|
50623
50293
|
name: "foldkit_get_message_schema",
|
|
50624
|
-
description: "Describe the Message Schema for a Foldkit runtime so agents can construct valid payloads for `foldkit_dispatch_message`. Call with no arguments to receive a small variant index (every top-level variant's `_tag`, its payload field names, and which payload fields are themselves tagged-union shapes). Then call with `variant_tag: \"ChosenVariant\"` to drill in. The argument is a dot-separated path of variant `_tag` values: each segment names a variant, and the walker steps through the variant's single tagged-union payload field to reach the next. So `\"GotMobileMenuDialogMessage\"` narrows one level; `\"GotMobileMenuDialogMessage.GotAnimationMessage\"` narrows two levels of a
|
|
50294
|
+
description: "Describe the Message Schema for a Foldkit runtime so agents can construct valid payloads for `foldkit_dispatch_message`. Call with no arguments to receive a small variant index (every top-level variant's `_tag`, its payload field names, and which payload fields are themselves tagged-union shapes). Then call with `variant_tag: \"ChosenVariant\"` to drill in. The argument is a dot-separated path of variant `_tag` values: each segment names a variant, and the walker steps through the variant's single tagged-union payload field to reach the next. So `\"GotMobileMenuDialogMessage\"` narrows one level; `\"GotMobileMenuDialogMessage.GotAnimationMessage\"` narrows two levels of a Submodel chain. Discriminated unions deeper than the supplied path collapse to `{ \"_summary\": \"union\", \"variants\": [...] }` placeholders so the response stays compact even for deeply-nested apps; extend the path to drill further. `Schema.Option` fields render as `anyOf: [{_tag: \"Some\", value}, {_tag: \"None\"}]`. The full document follows the JSON Schema draft-2020-12 shape from `Schema.toJsonSchemaDocument`: `{ dialect, schema, definitions }`. Returns `maybeResult: None` when the runtime hasn't configured `DevToolsConfig.Message` (dispatch is also unavailable). Fields with no JSON representation, notably `Schema.instanceOf(File)` for user-uploaded files, render as `{type: \"null\"}`; those variants can't be dispatched via MCP because their values live in browser memory.",
|
|
50625
50295
|
inputSchema: toInputSchema(GetMessageSchemaInput),
|
|
50626
50296
|
handle: runRuntimeTool(GetMessageSchemaInput, ({ variant_tag }) => Request.RequestGetMessageSchema({ maybeVariantTag: fromNullishOr(variant_tag) }), relayClient)
|
|
50627
50297
|
},
|
|
50628
50298
|
{
|
|
50629
50299
|
name: "foldkit_dispatch_message",
|
|
50630
|
-
description: "Dispatch a Message into a Foldkit runtime, as if the application itself produced it. Requires
|
|
50300
|
+
description: "Dispatch a Message into a Foldkit runtime, as if the application itself produced it. Requires the runtime to have configured DevToolsConfig.Message; without it, dispatch is rejected. Call `foldkit_get_message_schema` with no arguments to enumerate the variants, then with `variant_tag` to learn one variant's exact payload shape, before constructing the Message object. The runtime decodes the payload and returns a clean error if it doesn't match. To dispatch several Messages in order with one call, use foldkit_dispatch_messages.",
|
|
50631
50301
|
inputSchema: toInputSchema(DispatchMessageInput),
|
|
50632
50302
|
handle: runRuntimeTool(DispatchMessageInput, ({ message }) => Request.RequestDispatchMessage({ message }), relayClient)
|
|
50633
50303
|
},
|
|
50634
50304
|
{
|
|
50635
50305
|
name: "foldkit_dispatch_messages",
|
|
50636
|
-
description: `Dispatch an ordered batch of Messages into a Foldkit runtime in one call, first to last, as if the application produced them in quick succession. Prefer this over repeated foldkit_dispatch_message calls when staging state that takes several Messages: reproducing a bug, filling a form, or building a history fixture. Takes 1 to 100 Messages. Validation is all-or-nothing: the runtime decodes every payload against the Message Schema before dispatching any of them, and one invalid entry rejects the whole batch with an error naming its zero-based position, so there is never a partially applied prefix to clean up.
|
|
50306
|
+
description: `Dispatch an ordered batch of Messages into a Foldkit runtime in one call, first to last, as if the application produced them in quick succession. Prefer this over repeated foldkit_dispatch_message calls when staging state that takes several Messages: reproducing a bug, filling a form, or building a history fixture. Takes 1 to 100 Messages. Validation is all-or-nothing: the runtime decodes every payload against the Message Schema before dispatching any of them, and one invalid entry rejects the whole batch with an error naming its zero-based position, so there is never a partially applied prefix to clean up. On success the response carries acceptedAtIndices, the predicted history index for each Message in request order; the runtime may still record its own Messages between entries (for example a Command completing mid-burst), exactly as with rapid user input, and Messages excluded from history via excludeFromHistory are dispatched but never recorded, so entries after one land below their predicted index. Requires DevToolsConfig.Message, like foldkit_dispatch_message.`,
|
|
50637
50307
|
inputSchema: toInputSchema(DispatchMessagesInput),
|
|
50638
50308
|
handle: runRuntimeTool(DispatchMessagesInput, ({ messages }) => Request.RequestDispatchMessages({ messages }), relayClient)
|
|
50639
50309
|
},
|