@popcraft/kit 0.42.0 → 0.42.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/chunks/{agent-JYJFCR5K.js → agent-VKLTJCVX.js} +1 -1
  2. package/dist/chunks/{builtin-VTQJUBAI.js → builtin-LI7NVA22.js} +3 -3
  3. package/dist/chunks/{buy-credits-RN7T6PMX.js → buy-credits-NZHIJMZF.js} +2 -2
  4. package/dist/chunks/{check-template-BVFF6E2S.js → check-template-NOYVGWJ3.js} +2 -2
  5. package/dist/chunks/{chunk-KWDUK7WI.js → chunk-36EXDHNB.js} +3 -3
  6. package/dist/chunks/{chunk-JCXLQTQC.js → chunk-4EC3IC7R.js} +5 -5
  7. package/dist/chunks/{chunk-6CEGA6XJ.js → chunk-4T5WSZ7A.js} +2 -2
  8. package/dist/chunks/{chunk-JICRVL3I.js → chunk-5EUHQJMV.js} +8 -8
  9. package/dist/chunks/{chunk-6TZPPFT2.js → chunk-7FA7IP3D.js} +1 -1
  10. package/dist/chunks/{chunk-B4RL3JQJ.js → chunk-D4FMKIXQ.js} +1 -1
  11. package/dist/chunks/{chunk-6SLKOLFQ.js → chunk-DLWZSUAN.js} +2 -2
  12. package/dist/chunks/{chunk-GB76LHVT.js → chunk-GNQS5MQ4.js} +3 -3
  13. package/dist/chunks/{chunk-WKGVZSXX.js → chunk-HG2CLRXG.js} +4 -4
  14. package/dist/chunks/{chunk-AWQWZIRR.js → chunk-J2XOXKHG.js} +1 -1
  15. package/dist/chunks/{chunk-MXHWDGMK.js → chunk-K2EXVVF3.js} +41 -41
  16. package/dist/chunks/{chunk-RRHKKN3R.js → chunk-MJYGFAB5.js} +1 -1
  17. package/dist/chunks/{chunk-W3IKPBPS.js → chunk-MVFZPTDR.js} +11 -11
  18. package/dist/chunks/{chunk-YYSK4NSP.js → chunk-NKWDYQQ7.js} +4 -4
  19. package/dist/chunks/{chunk-FKAVUMT5.js → chunk-NYCRBX47.js} +2 -2
  20. package/dist/chunks/{chunk-RYVJ4JMF.js → chunk-PG5NRFXH.js} +4 -4
  21. package/dist/chunks/{chunk-IQWVVDEN.js → chunk-PPCC72KT.js} +2 -2
  22. package/dist/chunks/{chunk-NPACKSJP.js → chunk-QCJWNSI6.js} +1 -1
  23. package/dist/chunks/{chunk-VMNPYYT4.js → chunk-ZM34W4VY.js} +5 -5
  24. package/dist/chunks/{client-BZGDFO4N.js → client-FM2NEX6D.js} +2 -2
  25. package/dist/chunks/{client-BYKHH7JY.js → client-JZVIQVSB.js} +1 -1
  26. package/dist/chunks/{client-NBG2XIK7.js → client-LHOCKQJJ.js} +3 -3
  27. package/dist/chunks/{client-actions-MXCYTCCT.js → client-actions-DDPIU7CT.js} +5 -5
  28. package/dist/chunks/{dangerous-G5TEM2RC.js → dangerous-4Z63TA3Q.js} +3 -3
  29. package/dist/chunks/{delete-current-file-RBX6AWYQ.js → delete-current-file-D3ZQ65SK.js} +5 -5
  30. package/dist/chunks/{editor-seams-OTMKIRLS.js → editor-seams-LK2SIUFL.js} +10 -10
  31. package/dist/chunks/{editor-store-O5K2C5II.js → editor-store-UM6D6KKP.js} +1 -1
  32. package/dist/chunks/{export-watermark-SM6ZHBQM.js → export-watermark-7P562SBM.js} +5 -5
  33. package/dist/chunks/{eyedropper-TICU3FQV.js → eyedropper-BSIE5QOC.js} +1 -1
  34. package/dist/chunks/{generate-media-BL35BJSS.js → generate-media-URHSQCYD.js} +3 -3
  35. package/dist/chunks/{host-NHUVIGCE.js → host-2H2F6EEB.js} +6 -6
  36. package/dist/chunks/{integrations-2274TEIY.js → integrations-JAIYDOKW.js} +1 -1
  37. package/dist/chunks/{libraries-W4GLMZZ3.js → libraries-FVJQ56GS.js} +5 -5
  38. package/dist/chunks/{live-YD773ITD.js → live-F6LNHAPT.js} +1 -1
  39. package/dist/chunks/{media-tool-7PNKNPWB.js → media-tool-ALGALJSD.js} +1 -1
  40. package/dist/chunks/{new-file-DKIW545J.js → new-file-JWS4LTBE.js} +3 -3
  41. package/dist/chunks/{plugin-TYOID7NF.js → plugin-YGKY6B6D.js} +2 -2
  42. package/dist/chunks/{plugin-import-WJFL7WJN.js → plugin-import-U45QFU7D.js} +14 -14
  43. package/dist/chunks/{presence-FYYVYVQW.js → presence-DPFIY6YC.js} +2 -2
  44. package/dist/chunks/{project-HT6QMLTF.js → project-CKVK32RD.js} +1 -1
  45. package/dist/chunks/{publish-site-6OYPQ4TH.js → publish-site-OMUGP7EJ.js} +6 -6
  46. package/dist/chunks/{publish-store-X67WVFOI.js → publish-store-EIWT63ZG.js} +4 -4
  47. package/dist/chunks/{raster-actions-4FOBE6TB.js → raster-actions-DETRAMVL.js} +1 -1
  48. package/dist/chunks/{runner-R2JX67D7.js → runner-OFTVC4T3.js} +57 -38
  49. package/dist/chunks/{store-PBLSMMFU.js → store-OHJVC6YK.js} +6 -6
  50. package/dist/chunks/{sync-RZ5TB2JB.js → sync-L77E7OUC.js} +5 -5
  51. package/dist/chunks/{tabs-FMUNUYT3.js → tabs-IZUE265A.js} +8 -8
  52. package/dist/chunks/{team-WSJVPLFW.js → team-CEVRCCLM.js} +1 -1
  53. package/dist/chunks/{team-client-FTT6QZ75.js → team-client-TIHG3QV5.js} +1 -1
  54. package/dist/chunks/{tools-BQRISTBR.js → tools-MBMG27BW.js} +2 -2
  55. package/dist/chunks/{ui-commands-XVYI3WY7.js → ui-commands-CSLRJX4A.js} +12 -12
  56. package/dist/chunks/{versions-JZGBZO3V.js → versions-RM4R7HDD.js} +5 -5
  57. package/dist/index.js +1 -1
  58. package/package.json +1 -1
@@ -24,26 +24,26 @@ import {
24
24
  updateActiveThread,
25
25
  updateMessage,
26
26
  useAgentStore
27
- } from "./chunk-WKGVZSXX.js";
27
+ } from "./chunk-HG2CLRXG.js";
28
28
  import {
29
29
  registerBuiltinTools
30
- } from "./chunk-IQWVVDEN.js";
30
+ } from "./chunk-PPCC72KT.js";
31
31
  import {
32
32
  registerDangerousCommands
33
- } from "./chunk-W3IKPBPS.js";
33
+ } from "./chunk-MVFZPTDR.js";
34
34
  import "./chunk-QZ3CTIU6.js";
35
- import "./chunk-GB76LHVT.js";
36
- import "./chunk-MXHWDGMK.js";
35
+ import "./chunk-GNQS5MQ4.js";
36
+ import "./chunk-K2EXVVF3.js";
37
37
  import "./chunk-FJAQCJO7.js";
38
38
  import "./chunk-XMNUIVYM.js";
39
39
  import "./chunk-MPXJXQ3O.js";
40
40
  import {
41
41
  editBlockReason,
42
42
  editorToolContext
43
- } from "./chunk-YYSK4NSP.js";
43
+ } from "./chunk-NKWDYQQ7.js";
44
44
  import "./chunk-ME77WQN3.js";
45
45
  import "./chunk-AKHUQXQZ.js";
46
- import "./chunk-FKAVUMT5.js";
46
+ import "./chunk-NYCRBX47.js";
47
47
  import {
48
48
  buildDesignContext,
49
49
  joinWithin
@@ -57,13 +57,13 @@ import {
57
57
  getTool,
58
58
  runTool,
59
59
  toolSpecs
60
- } from "./chunk-B4RL3JQJ.js";
60
+ } from "./chunk-D4FMKIXQ.js";
61
61
  import {
62
62
  external_exports
63
63
  } from "./chunk-UFWLDGXB.js";
64
64
  import {
65
65
  provideAgentCapability
66
- } from "./chunk-KWDUK7WI.js";
66
+ } from "./chunk-36EXDHNB.js";
67
67
  import {
68
68
  defineCommand
69
69
  } from "./chunk-7QAUH2IL.js";
@@ -79,11 +79,11 @@ import "./chunk-QAJLU6TN.js";
79
79
  import "./chunk-NIHDNL6Y.js";
80
80
  import "./chunk-X4VTWPA2.js";
81
81
  import "./chunk-2JOESSON.js";
82
- import "./chunk-6TZPPFT2.js";
82
+ import "./chunk-7FA7IP3D.js";
83
83
  import {
84
84
  HYPERY_PAYMENT_SOURCE_HEADER,
85
85
  paymentSourceHeaders
86
- } from "./chunk-RRHKKN3R.js";
86
+ } from "./chunk-MJYGFAB5.js";
87
87
  import {
88
88
  aiAvailability,
89
89
  effectiveChatModel,
@@ -92,24 +92,24 @@ import {
92
92
  import "./chunk-G7UHA5MZ.js";
93
93
  import "./chunk-5A5JGIGA.js";
94
94
  import "./chunk-KGQ6PFVV.js";
95
- import "./chunk-RYVJ4JMF.js";
95
+ import "./chunk-PG5NRFXH.js";
96
96
  import "./chunk-JJMULIHS.js";
97
- import "./chunk-6CEGA6XJ.js";
97
+ import "./chunk-4T5WSZ7A.js";
98
98
  import "./chunk-3IBYIR5G.js";
99
99
  import "./chunk-KVUHB7BQ.js";
100
100
  import "./chunk-KAISI3NW.js";
101
101
  import {
102
102
  activeHyperyTeamId
103
- } from "./chunk-AWQWZIRR.js";
103
+ } from "./chunk-J2XOXKHG.js";
104
104
  import "./chunk-OH5PGOON.js";
105
105
  import "./chunk-N5JQUU2P.js";
106
106
  import "./chunk-GC3UNYQ4.js";
107
107
  import "./chunk-IDDPKV62.js";
108
108
  import "./chunk-44UBGODM.js";
109
- import "./chunk-NPACKSJP.js";
109
+ import "./chunk-QCJWNSI6.js";
110
110
  import {
111
111
  useEditorStore
112
- } from "./chunk-VMNPYYT4.js";
112
+ } from "./chunk-ZM34W4VY.js";
113
113
  import "./chunk-DZN3U34F.js";
114
114
  import "./chunk-MCNVBQ76.js";
115
115
  import "./chunk-UCPNVMCX.js";
@@ -244,10 +244,10 @@ init_define_POPCRAFT_COMPONENT_IDS();
244
244
  // lib/agent/gateway.ts
245
245
  init_define_POPCRAFT_COMPONENT_IDS();
246
246
 
247
- // node_modules/.pnpm/@hyperyai+sdk@2.0.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_9c6c02ef59997b8628e41c6dcc5668a2/node_modules/@hyperyai/sdk/dist/agents/index.js
247
+ // node_modules/.pnpm/@hyperyai+sdk@2.1.0_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_62022f8c0abbfd4c405f5fb20b5aa9ec/node_modules/@hyperyai/sdk/dist/agents/index.js
248
248
  init_define_POPCRAFT_COMPONENT_IDS();
249
249
 
250
- // node_modules/.pnpm/@hyperyai+sdk@2.0.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_9c6c02ef59997b8628e41c6dcc5668a2/node_modules/@hyperyai/sdk/dist/agents/core/hypery-model.js
250
+ // node_modules/.pnpm/@hyperyai+sdk@2.1.0_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_62022f8c0abbfd4c405f5fb20b5aa9ec/node_modules/@hyperyai/sdk/dist/agents/core/hypery-model.js
251
251
  init_define_POPCRAFT_COMPONENT_IDS();
252
252
  var delay = ((ms) => new Promise((settle) => setTimeout(() => settle(null), Math.max(0, Number(ms) || 0))));
253
253
  var utf8Complete = ((b) => {
@@ -443,7 +443,7 @@ function createHyperyModel(opts) {
443
443
  if (base.endsWith("/") ?? null) {
444
444
  base = base.slice(0, base.length - 1) ?? null;
445
445
  }
446
- return async (messages, tools, hooks, signal) => {
446
+ return async (messages, tools, hooks, signal, req) => {
447
447
  {
448
448
  let token = await (resolve(opts.token) ?? null);
449
449
  if (((__v) => __v == null ? "null" : typeof __v)(token) !== "string" || token === "") {
@@ -459,7 +459,8 @@ function createHyperyModel(opts) {
459
459
  }
460
460
  if (hasTools) {
461
461
  request.tools = tools;
462
- request.tool_choice = "auto";
462
+ let choice = req != null && ((__v) => __v == null ? "null" : typeof __v)(req) === "object" ? req.toolChoice ?? null : null;
463
+ request.tool_choice = choice != null ? choice : "auto";
463
464
  }
464
465
  let body = JSON.stringify(request) ?? null;
465
466
  if (body.length > limit) {
@@ -585,13 +586,13 @@ function createHyperyModel(opts) {
585
586
  }
586
587
  }
587
588
 
588
- // node_modules/.pnpm/@hyperyai+sdk@2.0.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_9c6c02ef59997b8628e41c6dcc5668a2/node_modules/@hyperyai/sdk/dist/agents/core/runtime.js
589
+ // node_modules/.pnpm/@hyperyai+sdk@2.1.0_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_62022f8c0abbfd4c405f5fb20b5aa9ec/node_modules/@hyperyai/sdk/dist/agents/core/runtime.js
589
590
  init_define_POPCRAFT_COMPONENT_IDS();
590
591
 
591
- // node_modules/.pnpm/@hyperyai+sdk@2.0.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_9c6c02ef59997b8628e41c6dcc5668a2/node_modules/@hyperyai/sdk/dist/agents/core/loop.js
592
+ // node_modules/.pnpm/@hyperyai+sdk@2.1.0_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_62022f8c0abbfd4c405f5fb20b5aa9ec/node_modules/@hyperyai/sdk/dist/agents/core/loop.js
592
593
  init_define_POPCRAFT_COMPONENT_IDS();
593
594
 
594
- // node_modules/.pnpm/@hyperyai+sdk@2.0.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_9c6c02ef59997b8628e41c6dcc5668a2/node_modules/@hyperyai/sdk/dist/agents/core/context.js
595
+ // node_modules/.pnpm/@hyperyai+sdk@2.1.0_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_62022f8c0abbfd4c405f5fb20b5aa9ec/node_modules/@hyperyai/sdk/dist/agents/core/context.js
595
596
  init_define_POPCRAFT_COMPONENT_IDS();
596
597
  var RENDER_TURN_PREFIX = "Result of ";
597
598
  var KEEP_IMAGE_TURNS = 2;
@@ -731,7 +732,7 @@ async function compactTranscript(messages, opts) {
731
732
  }
732
733
  }
733
734
 
734
- // node_modules/.pnpm/@hyperyai+sdk@2.0.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_9c6c02ef59997b8628e41c6dcc5668a2/node_modules/@hyperyai/sdk/dist/agents/core/loop.js
735
+ // node_modules/.pnpm/@hyperyai+sdk@2.1.0_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_62022f8c0abbfd4c405f5fb20b5aa9ec/node_modules/@hyperyai/sdk/dist/agents/core/loop.js
735
736
  var DEFAULT_MAX_ROUNDS = 40;
736
737
  var DEFAULT_MAX_PARALLEL = 4;
737
738
  var DEFAULT_ACTION_NUDGE = "You have not changed anything yet. Stop reading and do what was asked now, with the tools that make changes. If you truly cannot, say exactly what is blocking you.";
@@ -896,13 +897,25 @@ async function runAgentLoop(opts) {
896
897
  }
897
898
  };
898
899
  let modelHooks = { onTextDelta: hook(hooks, "onTextDelta") ?? null, onReasoningDelta: hook(hooks, "onReasoningDelta") ?? null, onToolProgress: hook(hooks, "onToolProgress") ?? null };
899
- let call = async (msgs, tools) => {
900
+ let choiceFor = (round2) => {
901
+ {
902
+ let c = opts.toolChoice ?? null;
903
+ if (((__v) => __v == null ? "null" : typeof __v)(c) === "function") {
904
+ c = c(round2) ?? null ?? null;
905
+ }
906
+ return c;
907
+ }
908
+ };
909
+ let call = async (msgs, tools, choice) => {
900
910
  {
901
911
  let attempt = 0;
902
912
  while (true) {
903
913
  try {
904
914
  {
905
- return await (opts.callModel(msgs, tools, modelHooks, signal) ?? null);
915
+ if (choice == null || tools.length === 0) {
916
+ return await (opts.callModel(msgs, tools, modelHooks, signal) ?? null);
917
+ }
918
+ return await (opts.callModel(msgs, tools, modelHooks, signal, { toolChoice: choice }) ?? null);
906
919
  }
907
920
  } catch (err) {
908
921
  {
@@ -933,7 +946,7 @@ async function runAgentLoop(opts) {
933
946
  if (onStart != null) {
934
947
  onStart(round) ?? null;
935
948
  }
936
- let turn = await (call(messages, specs) ?? null);
949
+ let turn = await (call(messages, specs, choiceFor(round) ?? null) ?? null);
937
950
  text = turn.text;
938
951
  let toolCalls = Array.isArray(turn.toolCalls) ?? null ? turn.toolCalls : [];
939
952
  if (toolCalls.length > 0) {
@@ -1049,14 +1062,14 @@ async function runAgentLoop(opts) {
1049
1062
  round = round + 1;
1050
1063
  }
1051
1064
  messages.push({ role: "user", content: "You have reached the tool limit for this turn. Summarise what you changed and what is left, without calling more tools." }) ?? null;
1052
- let final = await (call(messages, []) ?? null);
1065
+ let final = await (call(messages, [], null) ?? null);
1053
1066
  messages.push({ role: "assistant", content: final.text }) ?? null;
1054
1067
  await (save(maxRounds, true) ?? null);
1055
1068
  return { messages, text: final.text, rounds: maxRounds, exhausted: true, stopped: false, acted };
1056
1069
  }
1057
1070
  }
1058
1071
 
1059
- // node_modules/.pnpm/@hyperyai+sdk@2.0.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_9c6c02ef59997b8628e41c6dcc5668a2/node_modules/@hyperyai/sdk/dist/agents/core/runtime.js
1072
+ // node_modules/.pnpm/@hyperyai+sdk@2.1.0_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_62022f8c0abbfd4c405f5fb20b5aa9ec/node_modules/@hyperyai/sdk/dist/agents/core/runtime.js
1060
1073
  var delay2 = ((ms) => new Promise((settle) => setTimeout(() => settle(null), Math.max(0, Number(ms) || 0))));
1061
1074
  var REPORT_TOOL = "report_to_parent";
1062
1075
  var REPORT_SPEC = { readOnly: true, acts: false, spec: { type: "function", function: { name: REPORT_TOOL, description: "Send the main agent a progress update, or a question (set question) when you need a decision you cannot make yourself. It arrives between its steps and it answers with a message you read at your next step \u2014 keep working on what you can meanwhile. Your final answer still goes back by itself when you finish.", parameters: { type: "object", properties: { message: { type: "string", description: "What to tell the main agent." }, question: { type: "boolean", description: "This needs an answer." } }, required: ["message"] } } } };
@@ -1192,14 +1205,19 @@ function createAgentRuntime(host) {
1192
1205
  }
1193
1206
  let ctx = { session: session2, profile, readOnly: forceReadOnly || profile.readOnly === true, signal: control.signal };
1194
1207
  let tools = (host.childTools(ctx) ?? null).concat([REPORT_SPEC]) ?? null;
1195
- let messages = fresh ? [{ role: "system", content: host.childSystemPrompt(ctx) ?? null }, { role: "user", content: prompt }] : session2.transcript.concat([{ role: "user", content: "Message from the main agent:\n" + prompt }]) ?? null;
1196
1208
  let childModel = ((__v) => __v == null ? "null" : typeof __v)(host.childModel) === "function" ? host.childModel(ctx) ?? null : null;
1197
1209
  let budget = ((__v) => __v == null ? "null" : typeof __v)(profile.maxRounds) === "number" && profile.maxRounds > 0 ? profile.maxRounds : ((__v) => __v == null ? "null" : typeof __v)(host.maxRounds) === "number" && host.maxRounds > 0 ? host.maxRounds : 30;
1198
1210
  let ok = true;
1199
1211
  let summary = "";
1200
1212
  let rounds = 0;
1213
+ let wasStopped = () => {
1214
+ {
1215
+ return control.signal.aborted === true || parentSignal != null && parentSignal.aborted === true;
1216
+ }
1217
+ };
1201
1218
  try {
1202
1219
  {
1220
+ let messages = fresh ? [{ role: "system", content: await (host.childSystemPrompt(ctx) ?? null) }, { role: "user", content: prompt }] : session2.transcript.concat([{ role: "user", content: "Message from the main agent:\n" + prompt }]) ?? null;
1203
1221
  let outcome = await (runAgentLoop({ messages, tools, callModel: ((__v) => __v == null ? "null" : typeof __v)(childModel) === "function" ? childModel : host.callModel, signal: control.signal, stopped: () => {
1204
1222
  {
1205
1223
  return parentSignal != null && parentSignal.aborted === true;
@@ -1256,13 +1274,13 @@ function createAgentRuntime(host) {
1256
1274
  } catch (err) {
1257
1275
  {
1258
1276
  ok = false;
1259
- summary = "(agent error: " + (errorMessage2(err) ?? null) + ")";
1277
+ summary = wasStopped() ?? null ? "(stopped)" : "(agent error: " + (errorMessage2(err) ?? null) + ")";
1260
1278
  }
1261
1279
  }
1262
1280
  controls.delete(session2.id) ?? null;
1263
1281
  session2.rounds = session2.rounds + rounds;
1264
1282
  if (session2.status === "running") {
1265
- session2.status = ok ? "done" : "error";
1283
+ session2.status = ok ? "done" : wasStopped() ?? null ? "stopped" : "error";
1266
1284
  session2.summary = summary;
1267
1285
  session2.endedAt = now() ?? null;
1268
1286
  } else {
@@ -1514,7 +1532,7 @@ function createAgentRuntime(host) {
1514
1532
  }
1515
1533
  }
1516
1534
 
1517
- // node_modules/.pnpm/@hyperyai+sdk@2.0.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_9c6c02ef59997b8628e41c6dcc5668a2/node_modules/@hyperyai/sdk/dist/agents/core/store.js
1535
+ // node_modules/.pnpm/@hyperyai+sdk@2.1.0_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_62022f8c0abbfd4c405f5fb20b5aa9ec/node_modules/@hyperyai/sdk/dist/agents/core/store.js
1518
1536
  init_define_POPCRAFT_COMPONENT_IDS();
1519
1537
  async function loadAll(kv, prefix) {
1520
1538
  {
@@ -1547,7 +1565,7 @@ function sessionStore(kv, scope) {
1547
1565
  }
1548
1566
  }
1549
1567
 
1550
- // node_modules/.pnpm/@hyperyai+sdk@2.0.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_9c6c02ef59997b8628e41c6dcc5668a2/node_modules/@hyperyai/sdk/dist/agents/indexeddb.js
1568
+ // node_modules/.pnpm/@hyperyai+sdk@2.1.0_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_62022f8c0abbfd4c405f5fb20b5aa9ec/node_modules/@hyperyai/sdk/dist/agents/indexeddb.js
1551
1569
  init_define_POPCRAFT_COMPONENT_IDS();
1552
1570
  function indexedDbStore(name = "hypery-agents") {
1553
1571
  let db = null;
@@ -1580,7 +1598,7 @@ function indexedDbStore(name = "hypery-agents") {
1580
1598
  };
1581
1599
  }
1582
1600
 
1583
- // node_modules/.pnpm/@hyperyai+sdk@2.0.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_9c6c02ef59997b8628e41c6dcc5668a2/node_modules/@hyperyai/sdk/dist/agents/index.js
1601
+ // node_modules/.pnpm/@hyperyai+sdk@2.1.0_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_re_62022f8c0abbfd4c405f5fb20b5aa9ec/node_modules/@hyperyai/sdk/dist/agents/index.js
1584
1602
  function createHyperyModel2(opts) {
1585
1603
  return createHyperyModel({ ...opts, fetch: opts.fetch ?? ((url, init) => fetch(url, init)) });
1586
1604
  }
@@ -1861,7 +1879,7 @@ function subagentDelegate(deps = {}) {
1861
1879
  prompt: request.prompt,
1862
1880
  description: request.description,
1863
1881
  readOnly: deps.readOnly === true || request.readOnly === true,
1864
- background: request.background === true,
1882
+ background: request.background,
1865
1883
  signal: deps.signal,
1866
1884
  parentCallId: request.callId
1867
1885
  });
@@ -1928,7 +1946,8 @@ var delegateTask = defineCommand({
1928
1946
  prompt: args.prompt,
1929
1947
  description: args.description,
1930
1948
  readOnly: args.readonly === true,
1931
- background: args.run_in_background === true,
1949
+ background: args.run_in_background,
1950
+ // omitted → the profile's `background` default (the SDK applies it)
1932
1951
  callId: ctx.callId
1933
1952
  });
1934
1953
  if (reply.kind === "refused") return { summary: "task refused (nested)", data: { error: reply.reason } };
@@ -2282,7 +2301,7 @@ async function runTurn(text, mentions = []) {
2282
2301
  const abort = new AbortController();
2283
2302
  useAgentStore.setState({ running: true, abort, error: null });
2284
2303
  const ctx = editorToolContext(abort.signal);
2285
- const { createDesignPreview, DESIGN_TOOL } = await import("./live-YD773ITD.js");
2304
+ const { createDesignPreview, DESIGN_TOOL } = await import("./live-F6LNHAPT.js");
2286
2305
  const preview = createDesignPreview();
2287
2306
  registerTurnTools({ readOnly: !!editBlockReason(), signal: abort.signal });
2288
2307
  const runtime = agentRuntime();
@@ -46,9 +46,9 @@ import {
46
46
  updateActiveThread,
47
47
  updateMessage,
48
48
  useAgentStore
49
- } from "./chunk-WKGVZSXX.js";
49
+ } from "./chunk-HG2CLRXG.js";
50
50
  import "./chunk-QZ3CTIU6.js";
51
- import "./chunk-FKAVUMT5.js";
51
+ import "./chunk-NYCRBX47.js";
52
52
  import "./chunk-ZSTWA4Y3.js";
53
53
  import "./chunk-UFWLDGXB.js";
54
54
  import "./chunk-JNELJ6AN.js";
@@ -62,18 +62,18 @@ import "./chunk-QAJLU6TN.js";
62
62
  import "./chunk-NIHDNL6Y.js";
63
63
  import "./chunk-X4VTWPA2.js";
64
64
  import "./chunk-2JOESSON.js";
65
- import "./chunk-6TZPPFT2.js";
66
- import "./chunk-RRHKKN3R.js";
65
+ import "./chunk-7FA7IP3D.js";
66
+ import "./chunk-MJYGFAB5.js";
67
67
  import "./chunk-EWF6OIT7.js";
68
68
  import "./chunk-G7UHA5MZ.js";
69
69
  import "./chunk-5A5JGIGA.js";
70
70
  import "./chunk-KGQ6PFVV.js";
71
71
  import "./chunk-3IBYIR5G.js";
72
72
  import "./chunk-KAISI3NW.js";
73
- import "./chunk-AWQWZIRR.js";
73
+ import "./chunk-J2XOXKHG.js";
74
74
  import "./chunk-OH5PGOON.js";
75
75
  import "./chunk-N5JQUU2P.js";
76
- import "./chunk-VMNPYYT4.js";
76
+ import "./chunk-ZM34W4VY.js";
77
77
  import "./chunk-DZN3U34F.js";
78
78
  import "./chunk-MCNVBQ76.js";
79
79
  import "./chunk-UCPNVMCX.js";
@@ -20,17 +20,17 @@ import {
20
20
  uploadLocalDocument,
21
21
  uploadMediaNow,
22
22
  withDocUploadLock
23
- } from "./chunk-RYVJ4JMF.js";
23
+ } from "./chunk-PG5NRFXH.js";
24
24
  import "./chunk-JJMULIHS.js";
25
- import "./chunk-6CEGA6XJ.js";
25
+ import "./chunk-4T5WSZ7A.js";
26
26
  import "./chunk-3IBYIR5G.js";
27
27
  import "./chunk-KVUHB7BQ.js";
28
- import "./chunk-AWQWZIRR.js";
28
+ import "./chunk-J2XOXKHG.js";
29
29
  import "./chunk-OH5PGOON.js";
30
30
  import "./chunk-N5JQUU2P.js";
31
31
  import "./chunk-GC3UNYQ4.js";
32
- import "./chunk-NPACKSJP.js";
33
- import "./chunk-VMNPYYT4.js";
32
+ import "./chunk-QCJWNSI6.js";
33
+ import "./chunk-ZM34W4VY.js";
34
34
  import "./chunk-DZN3U34F.js";
35
35
  import "./chunk-MCNVBQ76.js";
36
36
  import "./chunk-UCPNVMCX.js";
@@ -6,16 +6,16 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  createNewFileOrExplain
9
- } from "./chunk-6CEGA6XJ.js";
9
+ } from "./chunk-4T5WSZ7A.js";
10
10
  import "./chunk-3IBYIR5G.js";
11
- import "./chunk-AWQWZIRR.js";
11
+ import "./chunk-J2XOXKHG.js";
12
12
  import "./chunk-OH5PGOON.js";
13
13
  import "./chunk-N5JQUU2P.js";
14
14
  import "./chunk-GC3UNYQ4.js";
15
15
  import {
16
16
  isUnsavedPlaceholder,
17
17
  useEditorStore
18
- } from "./chunk-VMNPYYT4.js";
18
+ } from "./chunk-ZM34W4VY.js";
19
19
  import "./chunk-DZN3U34F.js";
20
20
  import "./chunk-MCNVBQ76.js";
21
21
  import "./chunk-UCPNVMCX.js";
@@ -138,12 +138,12 @@ init_define_POPCRAFT_COMPONENT_IDS();
138
138
  var fail = (error) => ({ ok: false, error });
139
139
  async function run(id, params, approved) {
140
140
  const [{ runEditorCommand }, registry, { surfaceFor }, { registerDangerousCommands }, { currentAsker, setAsker }, { isUnsavedPlaceholder: isUnsavedPlaceholder2, useEditorStore: useEditorStore2 }] = await Promise.all([
141
- import("./ui-commands-XVYI3WY7.js"),
141
+ import("./ui-commands-CSLRJX4A.js"),
142
142
  import("./registry-C5LNLDPE.js"),
143
143
  import("./headless-WWRVWLY4.js"),
144
- import("./dangerous-G5TEM2RC.js"),
144
+ import("./dangerous-4Z63TA3Q.js"),
145
145
  import("./ask-QFX554YI.js"),
146
- import("./editor-store-O5K2C5II.js")
146
+ import("./editor-store-UM6D6KKP.js")
147
147
  ]);
148
148
  registerDangerousCommands();
149
149
  const command = registry.getCommand(id) ?? registry.getCommandByAgentName(id) ?? registry.getCommandByPluginMethod(id);
@@ -165,14 +165,14 @@ async function run(id, params, approved) {
165
165
  }
166
166
  }
167
167
  async function importFile(name, b64) {
168
- const { BUILTIN_IMPORT_ACCEPT, importViaPlugin } = await import("./plugin-import-WJFL7WJN.js");
168
+ const { BUILTIN_IMPORT_ACCEPT, importViaPlugin } = await import("./plugin-import-U45QFU7D.js");
169
169
  const ext = name.slice(name.lastIndexOf(".")).toLowerCase();
170
170
  if (!BUILTIN_IMPORT_ACCEPT.includes(ext)) return fail(`PopCraft opens ${BUILTIN_IMPORT_ACCEPT.join(", ")} files from the command line, not ${ext || name}.`);
171
171
  const bin = atob(b64);
172
172
  const bytes = new Uint8Array(bin.length);
173
173
  for (let i = 0; i < bin.length; i++) bytes[i] = bin.charCodeAt(i);
174
174
  const [{ createNewFileOrExplain: createNewFileOrExplain2 }, { cloudFilePath: cloudFilePath2, localDocPath }] = await Promise.all([
175
- import("./new-file-DKIW545J.js"),
175
+ import("./new-file-JWS4LTBE.js"),
176
176
  import("./tab-mode-6IGXLD53.js")
177
177
  ]);
178
178
  let opened = null;
@@ -18,7 +18,7 @@ import {
18
18
  startHyperyTeams,
19
19
  useHyperyTeam,
20
20
  useTeamPrompt
21
- } from "./chunk-AWQWZIRR.js";
21
+ } from "./chunk-J2XOXKHG.js";
22
22
  import "./chunk-OH5PGOON.js";
23
23
  import "./chunk-N5JQUU2P.js";
24
24
  import "./chunk-3HDEBECG.js";
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  activeTeamWorkspaceId,
12
12
  useHyperyTeam
13
- } from "./chunk-AWQWZIRR.js";
13
+ } from "./chunk-J2XOXKHG.js";
14
14
  import {
15
15
  api
16
16
  } from "./chunk-OH5PGOON.js";
@@ -11,9 +11,9 @@ import {
11
11
  registerTools,
12
12
  runTool,
13
13
  toolSpecs
14
- } from "./chunk-B4RL3JQJ.js";
14
+ } from "./chunk-D4FMKIXQ.js";
15
15
  import "./chunk-UFWLDGXB.js";
16
- import "./chunk-KWDUK7WI.js";
16
+ import "./chunk-36EXDHNB.js";
17
17
  import "./chunk-7QAUH2IL.js";
18
18
  import "./chunk-O3SVXXSI.js";
19
19
  import {
@@ -6,30 +6,30 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  registerAppCommands
9
- } from "./chunk-JICRVL3I.js";
9
+ } from "./chunk-5EUHQJMV.js";
10
10
  import {
11
11
  UI_CAPABILITIES,
12
12
  registerBuiltinCommands,
13
13
  runPaletteEntry
14
- } from "./chunk-MXHWDGMK.js";
14
+ } from "./chunk-K2EXVVF3.js";
15
15
  import "./chunk-FJAQCJO7.js";
16
16
  import "./chunk-XMNUIVYM.js";
17
17
  import "./chunk-MPXJXQ3O.js";
18
18
  import {
19
19
  editorToolContext
20
- } from "./chunk-YYSK4NSP.js";
20
+ } from "./chunk-NKWDYQQ7.js";
21
21
  import "./chunk-ME77WQN3.js";
22
22
  import "./chunk-AKHUQXQZ.js";
23
23
  import {
24
24
  notice
25
- } from "./chunk-FKAVUMT5.js";
25
+ } from "./chunk-NYCRBX47.js";
26
26
  import "./chunk-ZSTWA4Y3.js";
27
27
  import "./chunk-ASDSIW7N.js";
28
28
  import "./chunk-NMK2G32O.js";
29
29
  import "./chunk-3X3QMII3.js";
30
30
  import "./chunk-7THDQLQR.js";
31
31
  import "./chunk-UFWLDGXB.js";
32
- import "./chunk-KWDUK7WI.js";
32
+ import "./chunk-36EXDHNB.js";
33
33
  import "./chunk-7QAUH2IL.js";
34
34
  import "./chunk-JNELJ6AN.js";
35
35
  import "./chunk-MJ4V7HSO.js";
@@ -43,28 +43,28 @@ import "./chunk-QAJLU6TN.js";
43
43
  import "./chunk-NIHDNL6Y.js";
44
44
  import "./chunk-X4VTWPA2.js";
45
45
  import "./chunk-2JOESSON.js";
46
- import "./chunk-6TZPPFT2.js";
47
- import "./chunk-RRHKKN3R.js";
46
+ import "./chunk-7FA7IP3D.js";
47
+ import "./chunk-MJYGFAB5.js";
48
48
  import "./chunk-EWF6OIT7.js";
49
49
  import "./chunk-G7UHA5MZ.js";
50
50
  import "./chunk-5A5JGIGA.js";
51
51
  import "./chunk-KGQ6PFVV.js";
52
- import "./chunk-RYVJ4JMF.js";
52
+ import "./chunk-PG5NRFXH.js";
53
53
  import "./chunk-JJMULIHS.js";
54
- import "./chunk-6CEGA6XJ.js";
54
+ import "./chunk-4T5WSZ7A.js";
55
55
  import "./chunk-3IBYIR5G.js";
56
56
  import "./chunk-KVUHB7BQ.js";
57
57
  import "./chunk-KAISI3NW.js";
58
- import "./chunk-AWQWZIRR.js";
58
+ import "./chunk-J2XOXKHG.js";
59
59
  import "./chunk-OH5PGOON.js";
60
60
  import "./chunk-N5JQUU2P.js";
61
61
  import "./chunk-GC3UNYQ4.js";
62
62
  import "./chunk-IDDPKV62.js";
63
63
  import "./chunk-44UBGODM.js";
64
- import "./chunk-NPACKSJP.js";
64
+ import "./chunk-QCJWNSI6.js";
65
65
  import {
66
66
  useEditorStore
67
- } from "./chunk-VMNPYYT4.js";
67
+ } from "./chunk-ZM34W4VY.js";
68
68
  import "./chunk-DZN3U34F.js";
69
69
  import "./chunk-MCNVBQ76.js";
70
70
  import "./chunk-UCPNVMCX.js";
@@ -7,22 +7,22 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  syncStatus,
9
9
  uploadActiveDocument
10
- } from "./chunk-RYVJ4JMF.js";
10
+ } from "./chunk-PG5NRFXH.js";
11
11
  import "./chunk-JJMULIHS.js";
12
- import "./chunk-6CEGA6XJ.js";
12
+ import "./chunk-4T5WSZ7A.js";
13
13
  import "./chunk-3IBYIR5G.js";
14
14
  import "./chunk-KVUHB7BQ.js";
15
- import "./chunk-AWQWZIRR.js";
15
+ import "./chunk-J2XOXKHG.js";
16
16
  import {
17
17
  api
18
18
  } from "./chunk-OH5PGOON.js";
19
19
  import "./chunk-N5JQUU2P.js";
20
20
  import "./chunk-GC3UNYQ4.js";
21
- import "./chunk-NPACKSJP.js";
21
+ import "./chunk-QCJWNSI6.js";
22
22
  import {
23
23
  storedDocument,
24
24
  useEditorStore
25
- } from "./chunk-VMNPYYT4.js";
25
+ } from "./chunk-ZM34W4VY.js";
26
26
  import "./chunk-DZN3U34F.js";
27
27
  import "./chunk-MCNVBQ76.js";
28
28
  import "./chunk-UCPNVMCX.js";
package/dist/index.js CHANGED
@@ -298,7 +298,7 @@ function toTemplate(document, listing, options = {}) {
298
298
  }
299
299
  var mediaHash = (bytes) => hashBytesSync(bytes);
300
300
  async function checkTemplate(template, options = {}) {
301
- return (await import("./chunks/check-template-BVFF6E2S.js")).checkTemplate(template, options);
301
+ return (await import("./chunks/check-template-NOYVGWJ3.js")).checkTemplate(template, options);
302
302
  }
303
303
  export {
304
304
  HELPER_NAMES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popcraft/kit",
3
- "version": "0.42.0",
3
+ "version": "0.42.1",
4
4
  "description": "The PopCraft design kit: everything PopCraft's own templates are made with — the Kit, every helper, style system and theme kit, every official template source to read and remix, the build and every check the official templates pass — plus the design-script runner and .popcraft output.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://popcraft.app/docs/api/design-reference",