sunpeak 0.10.4 → 0.10.6
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/bin/commands/build.mjs +13 -13
- package/bin/commands/push.mjs +3 -4
- package/dist/chatgpt/index.cjs +1 -1
- package/dist/chatgpt/index.js +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/mcp/entry.cjs +1 -1
- package/dist/mcp/entry.js +1 -1
- package/dist/mcp/index.cjs +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/{server-CSybLAYo.cjs → server-B-T6Y3-J.cjs} +35 -47
- package/dist/{server-CSybLAYo.cjs.map → server-B-T6Y3-J.cjs.map} +1 -1
- package/dist/{server-310A1k9o.js → server-CnRhUNGQ.js} +35 -47
- package/dist/{server-310A1k9o.js.map → server-CnRhUNGQ.js.map} +1 -1
- package/dist/{simulator-url-BZBcq5tc.js → simulator-url-BUKX-wRa.js} +344 -270
- package/dist/{simulator-url-BZBcq5tc.js.map → simulator-url-BUKX-wRa.js.map} +1 -1
- package/dist/{simulator-url-D4tFBjeu.cjs → simulator-url-pSDp_VWO.cjs} +345 -271
- package/dist/{simulator-url-D4tFBjeu.cjs.map → simulator-url-pSDp_VWO.cjs.map} +1 -1
- package/package.json +2 -2
- package/template/dist/albums/albums.js +7 -47
- package/template/dist/albums/albums.json +1 -1
- package/template/dist/carousel/carousel.js +7 -47
- package/template/dist/carousel/carousel.json +1 -1
- package/template/dist/map/map.js +140 -187
- package/template/dist/map/map.json +1 -1
- package/template/dist/review/review.js +7 -47
- package/template/dist/review/review.json +1 -1
- package/template/node_modules/.vite/deps/_metadata.json +22 -22
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
package/dist/mcp/entry.cjs
CHANGED
package/dist/mcp/entry.js
CHANGED
package/dist/mcp/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const server = require("../server-
|
|
3
|
+
const server = require("../server-B-T6Y3-J.cjs");
|
|
4
4
|
exports.runMCPServer = server.runMCPServer;
|
|
5
5
|
//# sourceMappingURL=index.cjs.map
|
package/dist/mcp/index.js
CHANGED
|
@@ -23,13 +23,13 @@ function $constructor(name, initializer2, params) {
|
|
|
23
23
|
inst._zod.constr = _;
|
|
24
24
|
inst._zod.def = def;
|
|
25
25
|
}
|
|
26
|
-
const Parent =
|
|
26
|
+
const Parent = params?.Parent ?? Object;
|
|
27
27
|
class Definition extends Parent {
|
|
28
28
|
}
|
|
29
29
|
Object.defineProperty(Definition, "name", { value: name });
|
|
30
30
|
function _(def) {
|
|
31
31
|
var _a;
|
|
32
|
-
const inst =
|
|
32
|
+
const inst = params?.Parent ? new Definition() : this;
|
|
33
33
|
init(inst, def);
|
|
34
34
|
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
35
35
|
for (const fn of inst._zod.deferred) {
|
|
@@ -40,10 +40,9 @@ function $constructor(name, initializer2, params) {
|
|
|
40
40
|
Object.defineProperty(_, "init", { value: init });
|
|
41
41
|
Object.defineProperty(_, Symbol.hasInstance, {
|
|
42
42
|
value: (inst) => {
|
|
43
|
-
|
|
44
|
-
if ((params == null ? void 0 : params.Parent) && inst instanceof params.Parent)
|
|
43
|
+
if (params?.Parent && inst instanceof params.Parent)
|
|
45
44
|
return true;
|
|
46
|
-
return
|
|
45
|
+
return inst?._zod?.traits?.has(name);
|
|
47
46
|
}
|
|
48
47
|
});
|
|
49
48
|
Object.defineProperty(_, "name", { value: name });
|
|
@@ -130,8 +129,7 @@ function isObject(data) {
|
|
|
130
129
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
131
130
|
}
|
|
132
131
|
const allowsEval = cached(() => {
|
|
133
|
-
|
|
134
|
-
if (typeof navigator !== "undefined" && ((_a = navigator == null ? void 0 : navigator.userAgent) == null ? void 0 : _a.includes("Cloudflare"))) {
|
|
132
|
+
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
135
133
|
return false;
|
|
136
134
|
}
|
|
137
135
|
try {
|
|
@@ -162,7 +160,7 @@ function escapeRegex(str) {
|
|
|
162
160
|
}
|
|
163
161
|
function clone(inst, def, params) {
|
|
164
162
|
const cl = new inst._zod.constr(def ?? inst._zod.def);
|
|
165
|
-
if (!def ||
|
|
163
|
+
if (!def || params?.parent)
|
|
166
164
|
cl._zod.parent = inst;
|
|
167
165
|
return cl;
|
|
168
166
|
}
|
|
@@ -172,8 +170,8 @@ function normalizeParams(_params) {
|
|
|
172
170
|
return {};
|
|
173
171
|
if (typeof params === "string")
|
|
174
172
|
return { error: () => params };
|
|
175
|
-
if (
|
|
176
|
-
if (
|
|
173
|
+
if (params?.message !== void 0) {
|
|
174
|
+
if (params?.error !== void 0)
|
|
177
175
|
throw new Error("Cannot specify both `message` and `error` params");
|
|
178
176
|
params.error = params.message;
|
|
179
177
|
}
|
|
@@ -317,9 +315,8 @@ function required(Class, schema, mask) {
|
|
|
317
315
|
});
|
|
318
316
|
}
|
|
319
317
|
function aborted(x, startIndex = 0) {
|
|
320
|
-
var _a;
|
|
321
318
|
for (let i = startIndex; i < x.issues.length; i++) {
|
|
322
|
-
if (
|
|
319
|
+
if (x.issues[i]?.continue !== true)
|
|
323
320
|
return true;
|
|
324
321
|
}
|
|
325
322
|
return false;
|
|
@@ -333,18 +330,17 @@ function prefixIssues(path2, issues) {
|
|
|
333
330
|
});
|
|
334
331
|
}
|
|
335
332
|
function unwrapMessage(message) {
|
|
336
|
-
return typeof message === "string" ? message : message
|
|
333
|
+
return typeof message === "string" ? message : message?.message;
|
|
337
334
|
}
|
|
338
335
|
function finalizeIssue(iss, ctx, config2) {
|
|
339
|
-
var _a, _b, _c, _d, _e, _f;
|
|
340
336
|
const full = { ...iss, path: iss.path ?? [] };
|
|
341
337
|
if (!iss.message) {
|
|
342
|
-
const message = unwrapMessage(
|
|
338
|
+
const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
|
|
343
339
|
full.message = message;
|
|
344
340
|
}
|
|
345
341
|
delete full.inst;
|
|
346
342
|
delete full.continue;
|
|
347
|
-
if (!
|
|
343
|
+
if (!ctx?.reportInput) {
|
|
348
344
|
delete full.input;
|
|
349
345
|
}
|
|
350
346
|
return full;
|
|
@@ -448,8 +444,8 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
448
444
|
throw new $ZodAsyncError();
|
|
449
445
|
}
|
|
450
446
|
if (result.issues.length) {
|
|
451
|
-
const e = new (
|
|
452
|
-
captureStackTrace(e, _params
|
|
447
|
+
const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
448
|
+
captureStackTrace(e, _params?.callee);
|
|
453
449
|
throw e;
|
|
454
450
|
}
|
|
455
451
|
return result.value;
|
|
@@ -460,8 +456,8 @@ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
|
460
456
|
if (result instanceof Promise)
|
|
461
457
|
result = await result;
|
|
462
458
|
if (result.issues.length) {
|
|
463
|
-
const e = new (
|
|
464
|
-
captureStackTrace(e, params
|
|
459
|
+
const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
460
|
+
captureStackTrace(e, params?.callee);
|
|
465
461
|
throw e;
|
|
466
462
|
}
|
|
467
463
|
return result.value;
|
|
@@ -536,7 +532,7 @@ function datetime$1(args) {
|
|
|
536
532
|
return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
|
|
537
533
|
}
|
|
538
534
|
const string$1 = (params) => {
|
|
539
|
-
const regex = params ? `[\\s\\S]{${
|
|
535
|
+
const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
540
536
|
return new RegExp(`^${regex}$`);
|
|
541
537
|
};
|
|
542
538
|
const integer = /^\d+$/;
|
|
@@ -635,10 +631,9 @@ const $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf",
|
|
|
635
631
|
};
|
|
636
632
|
});
|
|
637
633
|
const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => {
|
|
638
|
-
var _a;
|
|
639
634
|
$ZodCheck.init(inst, def);
|
|
640
635
|
def.format = def.format || "float64";
|
|
641
|
-
const isInt =
|
|
636
|
+
const isInt = def.format?.includes("int");
|
|
642
637
|
const origin = isInt ? "int" : "number";
|
|
643
638
|
const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
|
|
644
639
|
inst._zod.onattach.push((inst2) => {
|
|
@@ -957,8 +952,8 @@ class Doc {
|
|
|
957
952
|
}
|
|
958
953
|
compile() {
|
|
959
954
|
const F = Function;
|
|
960
|
-
const args = this
|
|
961
|
-
const content =
|
|
955
|
+
const args = this?.args;
|
|
956
|
+
const content = this?.content ?? [``];
|
|
962
957
|
const lines = [...content.map((x) => ` ${x}`)];
|
|
963
958
|
return new F(...args, lines.join("\n"));
|
|
964
959
|
}
|
|
@@ -969,7 +964,6 @@ const version = {
|
|
|
969
964
|
patch: 0
|
|
970
965
|
};
|
|
971
966
|
const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
972
|
-
var _a2;
|
|
973
967
|
var _a;
|
|
974
968
|
inst ?? (inst = {});
|
|
975
969
|
inst._zod.def = def;
|
|
@@ -986,7 +980,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
986
980
|
}
|
|
987
981
|
if (checks.length === 0) {
|
|
988
982
|
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
989
|
-
|
|
983
|
+
inst._zod.deferred?.push(() => {
|
|
990
984
|
inst._zod.run = inst._zod.parse;
|
|
991
985
|
});
|
|
992
986
|
} else {
|
|
@@ -1003,7 +997,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
1003
997
|
}
|
|
1004
998
|
const currLen = payload.issues.length;
|
|
1005
999
|
const _ = ch._zod.check(payload);
|
|
1006
|
-
if (_ instanceof Promise &&
|
|
1000
|
+
if (_ instanceof Promise && ctx?.async === false) {
|
|
1007
1001
|
throw new $ZodAsyncError();
|
|
1008
1002
|
}
|
|
1009
1003
|
if (asyncResult || _ instanceof Promise) {
|
|
@@ -1042,15 +1036,11 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
1042
1036
|
}
|
|
1043
1037
|
inst["~standard"] = {
|
|
1044
1038
|
validate: (value) => {
|
|
1045
|
-
var _a3;
|
|
1046
1039
|
try {
|
|
1047
1040
|
const r = safeParse$1(inst, value);
|
|
1048
|
-
return r.success ? { value: r.data } : { issues:
|
|
1041
|
+
return r.success ? { value: r.data } : { issues: r.error?.issues };
|
|
1049
1042
|
} catch (_) {
|
|
1050
|
-
return safeParseAsync$1(inst, value).then((r) => {
|
|
1051
|
-
var _a4;
|
|
1052
|
-
return r.success ? { value: r.data } : { issues: (_a4 = r.error) == null ? void 0 : _a4.issues };
|
|
1053
|
-
});
|
|
1043
|
+
return safeParseAsync$1(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
|
|
1054
1044
|
}
|
|
1055
1045
|
},
|
|
1056
1046
|
vendor: "zod",
|
|
@@ -1058,9 +1048,8 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
1058
1048
|
};
|
|
1059
1049
|
});
|
|
1060
1050
|
const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
|
|
1061
|
-
var _a;
|
|
1062
1051
|
$ZodType.init(inst, def);
|
|
1063
|
-
inst._zod.pattern = [...
|
|
1052
|
+
inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string$1(inst._zod.bag);
|
|
1064
1053
|
inst._zod.parse = (payload, _) => {
|
|
1065
1054
|
if (def.coerce)
|
|
1066
1055
|
try {
|
|
@@ -1332,7 +1321,7 @@ function isValidJWT(token, algorithm = null) {
|
|
|
1332
1321
|
if (!header)
|
|
1333
1322
|
return false;
|
|
1334
1323
|
const parsedHeader = JSON.parse(atob(header));
|
|
1335
|
-
if ("typ" in parsedHeader &&
|
|
1324
|
+
if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT")
|
|
1336
1325
|
return false;
|
|
1337
1326
|
if (!parsedHeader.alg)
|
|
1338
1327
|
return false;
|
|
@@ -1608,7 +1597,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
1608
1597
|
return payload;
|
|
1609
1598
|
}
|
|
1610
1599
|
const proms = [];
|
|
1611
|
-
if (jit && fastEnabled &&
|
|
1600
|
+
if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
|
|
1612
1601
|
if (!fastpass)
|
|
1613
1602
|
fastpass = generateFastpass(def.shape);
|
|
1614
1603
|
payload = fastpass(payload, ctx);
|
|
@@ -1766,7 +1755,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
|
|
|
1766
1755
|
});
|
|
1767
1756
|
return payload;
|
|
1768
1757
|
}
|
|
1769
|
-
const opt = disc.value.get(input
|
|
1758
|
+
const opt = disc.value.get(input?.[def.discriminator]);
|
|
1770
1759
|
if (opt) {
|
|
1771
1760
|
return opt._zod.run(payload, ctx);
|
|
1772
1761
|
}
|
|
@@ -2774,10 +2763,10 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
2774
2763
|
};
|
|
2775
2764
|
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
2776
2765
|
inst.brand = () => inst;
|
|
2777
|
-
inst.register = (reg, meta) => {
|
|
2766
|
+
inst.register = ((reg, meta) => {
|
|
2778
2767
|
reg.add(inst, meta);
|
|
2779
2768
|
return inst;
|
|
2780
|
-
};
|
|
2769
|
+
});
|
|
2781
2770
|
inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
|
|
2782
2771
|
inst.safeParse = (data, params) => safeParse(inst, data, params);
|
|
2783
2772
|
inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -2806,8 +2795,7 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
2806
2795
|
};
|
|
2807
2796
|
Object.defineProperty(inst, "description", {
|
|
2808
2797
|
get() {
|
|
2809
|
-
|
|
2810
|
-
return (_a = globalRegistry.get(inst)) == null ? void 0 : _a.description;
|
|
2798
|
+
return globalRegistry.get(inst)?.description;
|
|
2811
2799
|
},
|
|
2812
2800
|
configurable: true
|
|
2813
2801
|
});
|
|
@@ -4943,7 +4931,7 @@ function createAppServer(config2) {
|
|
|
4943
4931
|
}
|
|
4944
4932
|
const toolCallData = toolCallDataMap.get(request.params.name);
|
|
4945
4933
|
toolInputParser.parse(args);
|
|
4946
|
-
const hasStructuredContent =
|
|
4934
|
+
const hasStructuredContent = toolCallData?.structuredContent != null;
|
|
4947
4935
|
console.log(
|
|
4948
4936
|
`[MCP] CallTool: ${request.params.name}${argsStr} → ${hasStructuredContent ? "structured" : "text"}`
|
|
4949
4937
|
);
|
|
@@ -4954,8 +4942,8 @@ function createAppServer(config2) {
|
|
|
4954
4942
|
text: `Rendered ${simulation.tool.description}!`
|
|
4955
4943
|
}
|
|
4956
4944
|
],
|
|
4957
|
-
structuredContent:
|
|
4958
|
-
_meta:
|
|
4945
|
+
structuredContent: toolCallData?.structuredContent ?? void 0,
|
|
4946
|
+
_meta: toolCallData?._meta ?? {}
|
|
4959
4947
|
};
|
|
4960
4948
|
});
|
|
4961
4949
|
return server;
|
|
@@ -5064,4 +5052,4 @@ function runMCPServer(config2) {
|
|
|
5064
5052
|
process.on("SIGINT", shutdown);
|
|
5065
5053
|
}
|
|
5066
5054
|
exports.runMCPServer = runMCPServer;
|
|
5067
|
-
//# sourceMappingURL=server-
|
|
5055
|
+
//# sourceMappingURL=server-B-T6Y3-J.cjs.map
|