sunpeak 0.10.3 → 0.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +12 -12
- 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/@openai_apps-sdk-ui_components_Avatar.js +1 -2
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Avatar.js.map +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Button.js +618 -13
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Button.js.map +4 -4
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Checkbox.js +3 -3
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Checkbox.js.map +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Input.js +2 -2
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js +7 -7
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js.map +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +2812 -151
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js.map +4 -4
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Textarea.js +6 -6
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Textarea.js.map +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_theme.js +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_theme.js.map +1 -1
- package/template/node_modules/.vite/deps/_metadata.json +43 -43
- package/template/node_modules/.vite/deps/{chunk-TSEQUROC.js → chunk-2UDYPUBJ.js} +99 -99
- package/template/node_modules/.vite/deps/{chunk-TSEQUROC.js.map → chunk-2UDYPUBJ.js.map} +1 -1
- package/template/node_modules/.vite/deps/chunk-6QVG4F2X.js +93 -0
- package/template/node_modules/.vite/deps/chunk-6QVG4F2X.js.map +7 -0
- package/template/node_modules/.vite/deps/{chunk-2DZGWGIP.js → chunk-P5LK4A7U.js} +3 -3
- package/template/node_modules/.vite/deps/{chunk-2DZGWGIP.js.map → chunk-P5LK4A7U.js.map} +1 -1
- package/template/node_modules/.vite/deps/{chunk-DYQDWJMS.js → chunk-RYYR2YMB.js} +2 -6
- package/template/node_modules/.vite/deps/{chunk-DYQDWJMS.js.map → chunk-RYYR2YMB.js.map} +1 -1
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/template/node_modules/.vite/deps/chunk-LVZJNEGE.js +0 -628
- package/template/node_modules/.vite/deps/chunk-LVZJNEGE.js.map +0 -7
|
@@ -22,13 +22,13 @@ function $constructor(name, initializer2, params) {
|
|
|
22
22
|
inst._zod.constr = _;
|
|
23
23
|
inst._zod.def = def;
|
|
24
24
|
}
|
|
25
|
-
const Parent =
|
|
25
|
+
const Parent = params?.Parent ?? Object;
|
|
26
26
|
class Definition extends Parent {
|
|
27
27
|
}
|
|
28
28
|
Object.defineProperty(Definition, "name", { value: name });
|
|
29
29
|
function _(def) {
|
|
30
30
|
var _a;
|
|
31
|
-
const inst =
|
|
31
|
+
const inst = params?.Parent ? new Definition() : this;
|
|
32
32
|
init(inst, def);
|
|
33
33
|
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
34
34
|
for (const fn of inst._zod.deferred) {
|
|
@@ -39,10 +39,9 @@ function $constructor(name, initializer2, params) {
|
|
|
39
39
|
Object.defineProperty(_, "init", { value: init });
|
|
40
40
|
Object.defineProperty(_, Symbol.hasInstance, {
|
|
41
41
|
value: (inst) => {
|
|
42
|
-
|
|
43
|
-
if ((params == null ? void 0 : params.Parent) && inst instanceof params.Parent)
|
|
42
|
+
if (params?.Parent && inst instanceof params.Parent)
|
|
44
43
|
return true;
|
|
45
|
-
return
|
|
44
|
+
return inst?._zod?.traits?.has(name);
|
|
46
45
|
}
|
|
47
46
|
});
|
|
48
47
|
Object.defineProperty(_, "name", { value: name });
|
|
@@ -129,8 +128,7 @@ function isObject(data) {
|
|
|
129
128
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
130
129
|
}
|
|
131
130
|
const allowsEval = cached(() => {
|
|
132
|
-
|
|
133
|
-
if (typeof navigator !== "undefined" && ((_a = navigator == null ? void 0 : navigator.userAgent) == null ? void 0 : _a.includes("Cloudflare"))) {
|
|
131
|
+
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
134
132
|
return false;
|
|
135
133
|
}
|
|
136
134
|
try {
|
|
@@ -161,7 +159,7 @@ function escapeRegex(str) {
|
|
|
161
159
|
}
|
|
162
160
|
function clone(inst, def, params) {
|
|
163
161
|
const cl = new inst._zod.constr(def ?? inst._zod.def);
|
|
164
|
-
if (!def ||
|
|
162
|
+
if (!def || params?.parent)
|
|
165
163
|
cl._zod.parent = inst;
|
|
166
164
|
return cl;
|
|
167
165
|
}
|
|
@@ -171,8 +169,8 @@ function normalizeParams(_params) {
|
|
|
171
169
|
return {};
|
|
172
170
|
if (typeof params === "string")
|
|
173
171
|
return { error: () => params };
|
|
174
|
-
if (
|
|
175
|
-
if (
|
|
172
|
+
if (params?.message !== void 0) {
|
|
173
|
+
if (params?.error !== void 0)
|
|
176
174
|
throw new Error("Cannot specify both `message` and `error` params");
|
|
177
175
|
params.error = params.message;
|
|
178
176
|
}
|
|
@@ -316,9 +314,8 @@ function required(Class, schema, mask) {
|
|
|
316
314
|
});
|
|
317
315
|
}
|
|
318
316
|
function aborted(x, startIndex = 0) {
|
|
319
|
-
var _a;
|
|
320
317
|
for (let i = startIndex; i < x.issues.length; i++) {
|
|
321
|
-
if (
|
|
318
|
+
if (x.issues[i]?.continue !== true)
|
|
322
319
|
return true;
|
|
323
320
|
}
|
|
324
321
|
return false;
|
|
@@ -332,18 +329,17 @@ function prefixIssues(path2, issues) {
|
|
|
332
329
|
});
|
|
333
330
|
}
|
|
334
331
|
function unwrapMessage(message) {
|
|
335
|
-
return typeof message === "string" ? message : message
|
|
332
|
+
return typeof message === "string" ? message : message?.message;
|
|
336
333
|
}
|
|
337
334
|
function finalizeIssue(iss, ctx, config2) {
|
|
338
|
-
var _a, _b, _c, _d, _e, _f;
|
|
339
335
|
const full = { ...iss, path: iss.path ?? [] };
|
|
340
336
|
if (!iss.message) {
|
|
341
|
-
const message = unwrapMessage(
|
|
337
|
+
const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
|
|
342
338
|
full.message = message;
|
|
343
339
|
}
|
|
344
340
|
delete full.inst;
|
|
345
341
|
delete full.continue;
|
|
346
|
-
if (!
|
|
342
|
+
if (!ctx?.reportInput) {
|
|
347
343
|
delete full.input;
|
|
348
344
|
}
|
|
349
345
|
return full;
|
|
@@ -447,8 +443,8 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
447
443
|
throw new $ZodAsyncError();
|
|
448
444
|
}
|
|
449
445
|
if (result.issues.length) {
|
|
450
|
-
const e = new (
|
|
451
|
-
captureStackTrace(e, _params
|
|
446
|
+
const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
447
|
+
captureStackTrace(e, _params?.callee);
|
|
452
448
|
throw e;
|
|
453
449
|
}
|
|
454
450
|
return result.value;
|
|
@@ -459,8 +455,8 @@ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
|
459
455
|
if (result instanceof Promise)
|
|
460
456
|
result = await result;
|
|
461
457
|
if (result.issues.length) {
|
|
462
|
-
const e = new (
|
|
463
|
-
captureStackTrace(e, params
|
|
458
|
+
const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
459
|
+
captureStackTrace(e, params?.callee);
|
|
464
460
|
throw e;
|
|
465
461
|
}
|
|
466
462
|
return result.value;
|
|
@@ -535,7 +531,7 @@ function datetime$1(args) {
|
|
|
535
531
|
return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
|
|
536
532
|
}
|
|
537
533
|
const string$1 = (params) => {
|
|
538
|
-
const regex = params ? `[\\s\\S]{${
|
|
534
|
+
const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
539
535
|
return new RegExp(`^${regex}$`);
|
|
540
536
|
};
|
|
541
537
|
const integer = /^\d+$/;
|
|
@@ -634,10 +630,9 @@ const $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf",
|
|
|
634
630
|
};
|
|
635
631
|
});
|
|
636
632
|
const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => {
|
|
637
|
-
var _a;
|
|
638
633
|
$ZodCheck.init(inst, def);
|
|
639
634
|
def.format = def.format || "float64";
|
|
640
|
-
const isInt =
|
|
635
|
+
const isInt = def.format?.includes("int");
|
|
641
636
|
const origin = isInt ? "int" : "number";
|
|
642
637
|
const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
|
|
643
638
|
inst._zod.onattach.push((inst2) => {
|
|
@@ -956,8 +951,8 @@ class Doc {
|
|
|
956
951
|
}
|
|
957
952
|
compile() {
|
|
958
953
|
const F = Function;
|
|
959
|
-
const args = this
|
|
960
|
-
const content =
|
|
954
|
+
const args = this?.args;
|
|
955
|
+
const content = this?.content ?? [``];
|
|
961
956
|
const lines = [...content.map((x) => ` ${x}`)];
|
|
962
957
|
return new F(...args, lines.join("\n"));
|
|
963
958
|
}
|
|
@@ -968,7 +963,6 @@ const version = {
|
|
|
968
963
|
patch: 0
|
|
969
964
|
};
|
|
970
965
|
const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
971
|
-
var _a2;
|
|
972
966
|
var _a;
|
|
973
967
|
inst ?? (inst = {});
|
|
974
968
|
inst._zod.def = def;
|
|
@@ -985,7 +979,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
985
979
|
}
|
|
986
980
|
if (checks.length === 0) {
|
|
987
981
|
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
988
|
-
|
|
982
|
+
inst._zod.deferred?.push(() => {
|
|
989
983
|
inst._zod.run = inst._zod.parse;
|
|
990
984
|
});
|
|
991
985
|
} else {
|
|
@@ -1002,7 +996,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
1002
996
|
}
|
|
1003
997
|
const currLen = payload.issues.length;
|
|
1004
998
|
const _ = ch._zod.check(payload);
|
|
1005
|
-
if (_ instanceof Promise &&
|
|
999
|
+
if (_ instanceof Promise && ctx?.async === false) {
|
|
1006
1000
|
throw new $ZodAsyncError();
|
|
1007
1001
|
}
|
|
1008
1002
|
if (asyncResult || _ instanceof Promise) {
|
|
@@ -1041,15 +1035,11 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
1041
1035
|
}
|
|
1042
1036
|
inst["~standard"] = {
|
|
1043
1037
|
validate: (value) => {
|
|
1044
|
-
var _a3;
|
|
1045
1038
|
try {
|
|
1046
1039
|
const r = safeParse$1(inst, value);
|
|
1047
|
-
return r.success ? { value: r.data } : { issues:
|
|
1040
|
+
return r.success ? { value: r.data } : { issues: r.error?.issues };
|
|
1048
1041
|
} catch (_) {
|
|
1049
|
-
return safeParseAsync$1(inst, value).then((r) => {
|
|
1050
|
-
var _a4;
|
|
1051
|
-
return r.success ? { value: r.data } : { issues: (_a4 = r.error) == null ? void 0 : _a4.issues };
|
|
1052
|
-
});
|
|
1042
|
+
return safeParseAsync$1(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
|
|
1053
1043
|
}
|
|
1054
1044
|
},
|
|
1055
1045
|
vendor: "zod",
|
|
@@ -1057,9 +1047,8 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
1057
1047
|
};
|
|
1058
1048
|
});
|
|
1059
1049
|
const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
|
|
1060
|
-
var _a;
|
|
1061
1050
|
$ZodType.init(inst, def);
|
|
1062
|
-
inst._zod.pattern = [...
|
|
1051
|
+
inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string$1(inst._zod.bag);
|
|
1063
1052
|
inst._zod.parse = (payload, _) => {
|
|
1064
1053
|
if (def.coerce)
|
|
1065
1054
|
try {
|
|
@@ -1331,7 +1320,7 @@ function isValidJWT(token, algorithm = null) {
|
|
|
1331
1320
|
if (!header)
|
|
1332
1321
|
return false;
|
|
1333
1322
|
const parsedHeader = JSON.parse(atob(header));
|
|
1334
|
-
if ("typ" in parsedHeader &&
|
|
1323
|
+
if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT")
|
|
1335
1324
|
return false;
|
|
1336
1325
|
if (!parsedHeader.alg)
|
|
1337
1326
|
return false;
|
|
@@ -1607,7 +1596,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
1607
1596
|
return payload;
|
|
1608
1597
|
}
|
|
1609
1598
|
const proms = [];
|
|
1610
|
-
if (jit && fastEnabled &&
|
|
1599
|
+
if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
|
|
1611
1600
|
if (!fastpass)
|
|
1612
1601
|
fastpass = generateFastpass(def.shape);
|
|
1613
1602
|
payload = fastpass(payload, ctx);
|
|
@@ -1765,7 +1754,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
|
|
|
1765
1754
|
});
|
|
1766
1755
|
return payload;
|
|
1767
1756
|
}
|
|
1768
|
-
const opt = disc.value.get(input
|
|
1757
|
+
const opt = disc.value.get(input?.[def.discriminator]);
|
|
1769
1758
|
if (opt) {
|
|
1770
1759
|
return opt._zod.run(payload, ctx);
|
|
1771
1760
|
}
|
|
@@ -2773,10 +2762,10 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
2773
2762
|
};
|
|
2774
2763
|
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
2775
2764
|
inst.brand = () => inst;
|
|
2776
|
-
inst.register = (reg, meta) => {
|
|
2765
|
+
inst.register = ((reg, meta) => {
|
|
2777
2766
|
reg.add(inst, meta);
|
|
2778
2767
|
return inst;
|
|
2779
|
-
};
|
|
2768
|
+
});
|
|
2780
2769
|
inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
|
|
2781
2770
|
inst.safeParse = (data, params) => safeParse(inst, data, params);
|
|
2782
2771
|
inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -2805,8 +2794,7 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
2805
2794
|
};
|
|
2806
2795
|
Object.defineProperty(inst, "description", {
|
|
2807
2796
|
get() {
|
|
2808
|
-
|
|
2809
|
-
return (_a = globalRegistry.get(inst)) == null ? void 0 : _a.description;
|
|
2797
|
+
return globalRegistry.get(inst)?.description;
|
|
2810
2798
|
},
|
|
2811
2799
|
configurable: true
|
|
2812
2800
|
});
|
|
@@ -4942,7 +4930,7 @@ function createAppServer(config2) {
|
|
|
4942
4930
|
}
|
|
4943
4931
|
const toolCallData = toolCallDataMap.get(request.params.name);
|
|
4944
4932
|
toolInputParser.parse(args);
|
|
4945
|
-
const hasStructuredContent =
|
|
4933
|
+
const hasStructuredContent = toolCallData?.structuredContent != null;
|
|
4946
4934
|
console.log(
|
|
4947
4935
|
`[MCP] CallTool: ${request.params.name}${argsStr} → ${hasStructuredContent ? "structured" : "text"}`
|
|
4948
4936
|
);
|
|
@@ -4953,8 +4941,8 @@ function createAppServer(config2) {
|
|
|
4953
4941
|
text: `Rendered ${simulation.tool.description}!`
|
|
4954
4942
|
}
|
|
4955
4943
|
],
|
|
4956
|
-
structuredContent:
|
|
4957
|
-
_meta:
|
|
4944
|
+
structuredContent: toolCallData?.structuredContent ?? void 0,
|
|
4945
|
+
_meta: toolCallData?._meta ?? {}
|
|
4958
4946
|
};
|
|
4959
4947
|
});
|
|
4960
4948
|
return server;
|
|
@@ -5065,4 +5053,4 @@ function runMCPServer(config2) {
|
|
|
5065
5053
|
export {
|
|
5066
5054
|
runMCPServer as r
|
|
5067
5055
|
};
|
|
5068
|
-
//# sourceMappingURL=server-
|
|
5056
|
+
//# sourceMappingURL=server-CnRhUNGQ.js.map
|