@popcraft/cli 0.34.0 → 0.34.2
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/popcraft.mjs +66 -25
- package/package.json +2 -2
package/dist/popcraft.mjs
CHANGED
|
@@ -1196,7 +1196,7 @@ function operations(spec = openapi) {
|
|
|
1196
1196
|
}
|
|
1197
1197
|
async function call(target2, method, path, opts = {}) {
|
|
1198
1198
|
const qs = new URLSearchParams(opts.query ?? {}).toString();
|
|
1199
|
-
const headers = { "user-agent": `popcraft-cli/${"0.34.
|
|
1199
|
+
const headers = { "user-agent": `popcraft-cli/${"0.34.2"}`, ...opts.headers };
|
|
1200
1200
|
if (target2.token) headers.authorization = `Bearer ${target2.token}`;
|
|
1201
1201
|
if (opts.contentType) headers["content-type"] = opts.contentType;
|
|
1202
1202
|
try {
|
|
@@ -33056,6 +33056,7 @@ var init_en2 = __esm({
|
|
|
33056
33056
|
"dataSection.recordHint": "Which record this layer shows",
|
|
33057
33057
|
"dataSection.text": "Text",
|
|
33058
33058
|
"dataSection.title": "Data",
|
|
33059
|
+
"deleteAccountDialog.appStoreSubscription": "A subscription bought in the App Store isn't cancelled with your account. Cancel it in Settings \u2192 Apple Account \u2192 Subscriptions.",
|
|
33059
33060
|
"deleteAccountDialog.cancel": "Cancel",
|
|
33060
33061
|
"deleteAccountDialog.couldNotDelete": "Your account could not be deleted. Try again.",
|
|
33061
33062
|
"deleteAccountDialog.deleteAccount": "Delete account",
|
|
@@ -37747,6 +37748,7 @@ var require_es = __commonJS({
|
|
|
37747
37748
|
"dataSection.recordHint": "Qu\xE9 registro muestra esta capa",
|
|
37748
37749
|
"dataSection.text": "Texto",
|
|
37749
37750
|
"dataSection.title": "Datos",
|
|
37751
|
+
"deleteAccountDialog.appStoreSubscription": "Una suscripci\xF3n comprada en la App Store no se cancela con tu cuenta. Canc\xE9lala en Ajustes \u2192 Cuenta de Apple \u2192 Suscripciones.",
|
|
37750
37752
|
"deleteAccountDialog.cancel": "Cancelar",
|
|
37751
37753
|
"deleteAccountDialog.couldNotDelete": "No se pudo eliminar tu cuenta. Int\xE9ntalo de nuevo.",
|
|
37752
37754
|
"deleteAccountDialog.deleteAccount": "Eliminar cuenta",
|
|
@@ -42437,6 +42439,7 @@ var require_fr = __commonJS({
|
|
|
42437
42439
|
"dataSection.recordHint": "L\u2019enregistrement que cette couche affiche",
|
|
42438
42440
|
"dataSection.text": "Texte",
|
|
42439
42441
|
"dataSection.title": "Donn\xE9es",
|
|
42442
|
+
"deleteAccountDialog.appStoreSubscription": "Un abonnement achet\xE9 dans l\u2019App Store n\u2019est pas annul\xE9 avec votre compte. Annulez-le dans R\xE9glages \u2192 Compte Apple \u2192 Abonnements.",
|
|
42440
42443
|
"deleteAccountDialog.cancel": "Annuler",
|
|
42441
42444
|
"deleteAccountDialog.couldNotDelete": "Votre compte n\u2019a pas pu \xEAtre supprim\xE9. Veuillez r\xE9essayer.",
|
|
42442
42445
|
"deleteAccountDialog.deleteAccount": "Supprimer le compte",
|
|
@@ -47127,6 +47130,7 @@ var require_de = __commonJS({
|
|
|
47127
47130
|
"dataSection.recordHint": "Welchen Datensatz diese Ebene anzeigt",
|
|
47128
47131
|
"dataSection.text": "Text",
|
|
47129
47132
|
"dataSection.title": "Daten",
|
|
47133
|
+
"deleteAccountDialog.appStoreSubscription": "Ein im App Store gekauftes Abonnement wird nicht mit Ihrem Konto gek\xFCndigt. K\xFCndigen Sie es in Einstellungen \u2192 Apple-Account \u2192 Abonnements.",
|
|
47130
47134
|
"deleteAccountDialog.cancel": "Abbrechen",
|
|
47131
47135
|
"deleteAccountDialog.couldNotDelete": "Dein Konto konnte nicht gel\xF6scht werden. Versuche es erneut.",
|
|
47132
47136
|
"deleteAccountDialog.deleteAccount": "Konto l\xF6schen",
|
|
@@ -51817,6 +51821,7 @@ var require_it = __commonJS({
|
|
|
51817
51821
|
"dataSection.recordHint": "Quale record mostra questo livello",
|
|
51818
51822
|
"dataSection.text": "Testo",
|
|
51819
51823
|
"dataSection.title": "Dati",
|
|
51824
|
+
"deleteAccountDialog.appStoreSubscription": "Un abbonamento acquistato nell\u2019App Store non viene annullato con il tuo account. Annullalo in Impostazioni \u2192 Account Apple \u2192 Abbonamenti.",
|
|
51820
51825
|
"deleteAccountDialog.cancel": "Annulla",
|
|
51821
51826
|
"deleteAccountDialog.couldNotDelete": "Impossibile eliminare il tuo account. Riprova.",
|
|
51822
51827
|
"deleteAccountDialog.deleteAccount": "Elimina account",
|
|
@@ -56507,6 +56512,7 @@ var require_pt_BR = __commonJS({
|
|
|
56507
56512
|
"dataSection.recordHint": "Qual registro esta camada mostra",
|
|
56508
56513
|
"dataSection.text": "Texto",
|
|
56509
56514
|
"dataSection.title": "Dados",
|
|
56515
|
+
"deleteAccountDialog.appStoreSubscription": "Uma assinatura comprada na App Store n\xE3o \xE9 cancelada com sua conta. Cancele-a em Ajustes \u2192 Conta Apple \u2192 Assinaturas.",
|
|
56510
56516
|
"deleteAccountDialog.cancel": "Cancelar",
|
|
56511
56517
|
"deleteAccountDialog.couldNotDelete": "Sua conta n\xE3o p\xF4de ser exclu\xEDda. Tente novamente.",
|
|
56512
56518
|
"deleteAccountDialog.deleteAccount": "Excluir conta",
|
|
@@ -61197,6 +61203,7 @@ var require_ja = __commonJS({
|
|
|
61197
61203
|
"dataSection.recordHint": "\u3053\u306E\u30EC\u30A4\u30E4\u30FC\u304C\u8868\u793A\u3059\u308B\u30EC\u30B3\u30FC\u30C9",
|
|
61198
61204
|
"dataSection.text": "\u30C6\u30AD\u30B9\u30C8",
|
|
61199
61205
|
"dataSection.title": "\u30C7\u30FC\u30BF",
|
|
61206
|
+
"deleteAccountDialog.appStoreSubscription": "App Store\u3067\u8CFC\u5165\u3057\u305F\u30B5\u30D6\u30B9\u30AF\u30EA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u3068\u4E00\u7DD2\u306B\u30AD\u30E3\u30F3\u30BB\u30EB\u3055\u308C\u307E\u305B\u3093\u3002\u8A2D\u5B9A \u2192 Apple\u30A2\u30AB\u30A6\u30F3\u30C8 \u2192 \u30B5\u30D6\u30B9\u30AF\u30EA\u30D7\u30B7\u30E7\u30F3\u3067\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
61200
61207
|
"deleteAccountDialog.cancel": "\u30AD\u30E3\u30F3\u30BB\u30EB",
|
|
61201
61208
|
"deleteAccountDialog.couldNotDelete": "\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u524A\u9664\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",
|
|
61202
61209
|
"deleteAccountDialog.deleteAccount": "\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u524A\u9664",
|
|
@@ -65887,6 +65894,7 @@ var require_ko = __commonJS({
|
|
|
65887
65894
|
"dataSection.recordHint": "\uC774 \uB808\uC774\uC5B4\uAC00 \uC5B4\uB5A4 \uB808\uCF54\uB4DC\uB97C \uD45C\uC2DC\uD558\uB294\uC9C0",
|
|
65888
65895
|
"dataSection.text": "\uD14D\uC2A4\uD2B8",
|
|
65889
65896
|
"dataSection.title": "\uB370\uC774\uD130",
|
|
65897
|
+
"deleteAccountDialog.appStoreSubscription": "App Store\uC5D0\uC11C \uAD6C\uB9E4\uD55C \uAD6C\uB3C5\uC740 \uACC4\uC815\uACFC \uD568\uAED8 \uCDE8\uC18C\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC124\uC815 \u2192 Apple \uACC4\uC815 \u2192 \uAD6C\uB3C5\uC5D0\uC11C \uCDE8\uC18C\uD558\uC138\uC694.",
|
|
65890
65898
|
"deleteAccountDialog.cancel": "\uCDE8\uC18C",
|
|
65891
65899
|
"deleteAccountDialog.couldNotDelete": "\uACC4\uC815\uC744 \uC0AD\uC81C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694.",
|
|
65892
65900
|
"deleteAccountDialog.deleteAccount": "\uACC4\uC815 \uC0AD\uC81C",
|
|
@@ -70577,6 +70585,7 @@ var require_zh_CN = __commonJS({
|
|
|
70577
70585
|
"dataSection.recordHint": "\u6B64\u56FE\u5C42\u663E\u793A\u54EA\u4E2A\u8BB0\u5F55",
|
|
70578
70586
|
"dataSection.text": "\u6587\u672C",
|
|
70579
70587
|
"dataSection.title": "\u6570\u636E",
|
|
70588
|
+
"deleteAccountDialog.appStoreSubscription": "\u5728 App Store \u4E2D\u8D2D\u4E70\u7684\u8BA2\u9605\u4E0D\u4F1A\u968F\u60A8\u7684\u8D26\u6237\u4E00\u8D77\u53D6\u6D88\u3002\u8BF7\u5728\u201C\u8BBE\u7F6E\u201D\u2192\u201CApple \u8D26\u6237\u201D\u2192\u201C\u8BA2\u9605\u201D\u4E2D\u53D6\u6D88\u3002",
|
|
70580
70589
|
"deleteAccountDialog.cancel": "\u53D6\u6D88",
|
|
70581
70590
|
"deleteAccountDialog.couldNotDelete": "\u60A8\u7684\u8D26\u6237\u672A\u80FD\u5220\u9664\u3002\u8BF7\u91CD\u8BD5\u3002",
|
|
70582
70591
|
"deleteAccountDialog.deleteAccount": "\u5220\u9664\u8D26\u6237",
|
|
@@ -75267,6 +75276,7 @@ var require_zh_TW = __commonJS({
|
|
|
75267
75276
|
"dataSection.recordHint": "\u6B64\u5716\u5C64\u986F\u793A\u54EA\u500B\u8A18\u9304",
|
|
75268
75277
|
"dataSection.text": "\u6587\u5B57",
|
|
75269
75278
|
"dataSection.title": "\u8CC7\u6599",
|
|
75279
|
+
"deleteAccountDialog.appStoreSubscription": "\u5728 App Store \u8CFC\u8CB7\u7684\u8A02\u95B1\u4E0D\u6703\u96A8\u60A8\u7684\u5E33\u865F\u53D6\u6D88\u3002\u8ACB\u5728\u300C\u8A2D\u5B9A\u300D\u2192\u300CApple \u5E33\u865F\u300D\u2192\u300C\u8A02\u95B1\u9805\u76EE\u300D\u4E2D\u53D6\u6D88\u3002",
|
|
75270
75280
|
"deleteAccountDialog.cancel": "\u53D6\u6D88",
|
|
75271
75281
|
"deleteAccountDialog.couldNotDelete": "\u60A8\u7684\u5E33\u6236\u7121\u6CD5\u522A\u9664\u3002\u8ACB\u518D\u8A66\u4E00\u6B21\u3002",
|
|
75272
75282
|
"deleteAccountDialog.deleteAccount": "\u522A\u9664\u5E33\u6236",
|
|
@@ -79957,6 +79967,7 @@ var require_ru = __commonJS({
|
|
|
79957
79967
|
"dataSection.recordHint": "\u041A\u0430\u043A\u0443\u044E \u0437\u0430\u043F\u0438\u0441\u044C \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u044D\u0442\u043E\u0442 \u0441\u043B\u043E\u0439",
|
|
79958
79968
|
"dataSection.text": "\u0422\u0435\u043A\u0441\u0442",
|
|
79959
79969
|
"dataSection.title": "\u0414\u0430\u043D\u043D\u044B\u0435",
|
|
79970
|
+
"deleteAccountDialog.appStoreSubscription": "\u041F\u043E\u0434\u043F\u0438\u0441\u043A\u0430, \u043A\u0443\u043F\u043B\u0435\u043D\u043D\u0430\u044F \u0432 App Store, \u043D\u0435 \u043E\u0442\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F \u0432\u043C\u0435\u0441\u0442\u0435 \u0441 \u0432\u0430\u0448\u0435\u0439 \u0443\u0447\u0435\u0442\u043D\u043E\u0439 \u0437\u0430\u043F\u0438\u0441\u044C\u044E. \u041E\u0442\u043C\u0435\u043D\u0438\u0442\u0435 \u0435\u0435 \u0432 \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u2192 \u0423\u0447\u0435\u0442\u043D\u0430\u044F \u0437\u0430\u043F\u0438\u0441\u044C Apple \u2192 \u041F\u043E\u0434\u043F\u0438\u0441\u043A\u0438.",
|
|
79960
79971
|
"deleteAccountDialog.cancel": "\u041E\u0442\u043C\u0435\u043D\u0430",
|
|
79961
79972
|
"deleteAccountDialog.couldNotDelete": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0430\u0448\u0443 \u0443\u0447\u0435\u0442\u043D\u0443\u044E \u0437\u0430\u043F\u0438\u0441\u044C. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437.",
|
|
79962
79973
|
"deleteAccountDialog.deleteAccount": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0443\u0447\u0435\u0442\u043D\u0443\u044E \u0437\u0430\u043F\u0438\u0441\u044C",
|
|
@@ -84647,6 +84658,7 @@ var require_ar = __commonJS({
|
|
|
84647
84658
|
"dataSection.recordHint": "\u0623\u064A \u0633\u062C\u0644 \u064A\u0639\u0631\u0636\u0647 \u0647\u0630\u0627 \u0627\u0644\u0637\u0628\u0642\u0629",
|
|
84648
84659
|
"dataSection.text": "\u0646\u0635",
|
|
84649
84660
|
"dataSection.title": "\u0628\u064A\u0627\u0646\u0627\u062A",
|
|
84661
|
+
"deleteAccountDialog.appStoreSubscription": "\u0644\u0627 \u064A\u062A\u0645 \u0625\u0644\u063A\u0627\u0621 \u0627\u0644\u0627\u0634\u062A\u0631\u0627\u0643 \u0627\u0644\u0630\u064A \u062A\u0645 \u0634\u0631\u0627\u0624\u0647 \u0645\u0646 App Store \u0645\u0639 \u062D\u0633\u0627\u0628\u0643. \u0642\u0645 \u0628\u0625\u0644\u063A\u0627\u0626\u0647 \u0641\u064A \u0627\u0644\u0625\u0639\u062F\u0627\u062F\u0627\u062A \u2190 \u062D\u0633\u0627\u0628 Apple \u2190 \u0627\u0644\u0627\u0634\u062A\u0631\u0627\u0643\u0627\u062A.",
|
|
84650
84662
|
"deleteAccountDialog.cancel": "\u0625\u0644\u063A\u0627\u0621",
|
|
84651
84663
|
"deleteAccountDialog.couldNotDelete": "\u062A\u0639\u0630\u0631 \u062D\u0630\u0641 \u062D\u0633\u0627\u0628\u0643. \u064A\u0631\u062C\u0649 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649.",
|
|
84652
84664
|
"deleteAccountDialog.deleteAccount": "\u062D\u0630\u0641 \u0627\u0644\u062D\u0633\u0627\u0628",
|
|
@@ -89337,6 +89349,7 @@ var require_hi = __commonJS({
|
|
|
89337
89349
|
"dataSection.recordHint": "\u092F\u0939 \u0932\u0947\u092F\u0930 \u0915\u094C\u0928 \u0938\u093E \u0930\u093F\u0915\u0949\u0930\u094D\u0921 \u0926\u093F\u0916\u093E\u0924\u0940 \u0939\u0948",
|
|
89338
89350
|
"dataSection.text": "\u091F\u0947\u0915\u094D\u0938\u094D\u091F",
|
|
89339
89351
|
"dataSection.title": "\u0921\u0947\u091F\u093E",
|
|
89352
|
+
"deleteAccountDialog.appStoreSubscription": "\u0910\u092A \u0938\u094D\u091F\u094B\u0930 \u092E\u0947\u0902 \u0916\u0930\u0940\u0926\u0940 \u0917\u0908 \u0938\u0926\u0938\u094D\u092F\u0924\u093E \u0906\u092A\u0915\u0947 \u0916\u093E\u0924\u0947 \u0915\u0947 \u0938\u093E\u0925 \u0930\u0926\u094D\u0926 \u0928\u0939\u0940\u0902 \u0939\u094B\u0924\u0940 \u0939\u0948\u0964 \u0907\u0938\u0947 \u0938\u0947\u091F\u093F\u0902\u0917\u094D\u0938 \u2192 Apple \u0916\u093E\u0924\u093E \u2192 \u0938\u0926\u0938\u094D\u092F\u0924\u093E \u092E\u0947\u0902 \u0930\u0926\u094D\u0926 \u0915\u0930\u0947\u0902\u0964",
|
|
89340
89353
|
"deleteAccountDialog.cancel": "\u0930\u0926\u094D\u0926 \u0915\u0930\u0947\u0902",
|
|
89341
89354
|
"deleteAccountDialog.couldNotDelete": "\u0906\u092A\u0915\u093E \u0916\u093E\u0924\u093E \u0939\u091F\u093E\u092F\u093E \u0928\u0939\u0940\u0902 \u091C\u093E \u0938\u0915\u093E\u0964 \u092B\u093F\u0930 \u0938\u0947 \u0915\u094B\u0936\u093F\u0936 \u0915\u0930\u0947\u0902\u0964",
|
|
89342
89355
|
"deleteAccountDialog.deleteAccount": "\u0916\u093E\u0924\u093E \u0939\u091F\u093E\u090F\u0901",
|
|
@@ -95275,7 +95288,6 @@ async function sha256Prefix(bytes2) {
|
|
|
95275
95288
|
}
|
|
95276
95289
|
var init_media_hash = __esm({
|
|
95277
95290
|
"lib/storage/media-hash.ts"() {
|
|
95278
|
-
"use strict";
|
|
95279
95291
|
}
|
|
95280
95292
|
});
|
|
95281
95293
|
|
|
@@ -261666,7 +261678,6 @@ function planEntryAction({ home }) {
|
|
|
261666
261678
|
var STORAGE_KEY2, useHyperyTeam, TEAM_PROMPT_ENABLED, TEAM_PROMPTED_KEY, PROMPTED_KEY, useTeamPrompt, started;
|
|
261667
261679
|
var init_team = __esm({
|
|
261668
261680
|
"lib/client/cloud/team.ts"() {
|
|
261669
|
-
"use strict";
|
|
261670
261681
|
init_esm();
|
|
261671
261682
|
init_api4();
|
|
261672
261683
|
init_session();
|
|
@@ -310182,7 +310193,6 @@ async function dispatchShaped(key5, options) {
|
|
|
310182
310193
|
var onViolation;
|
|
310183
310194
|
var init_dispatch = __esm({
|
|
310184
310195
|
"lib/commands/dispatch.ts"() {
|
|
310185
|
-
"use strict";
|
|
310186
310196
|
init_errors();
|
|
310187
310197
|
init_registry();
|
|
310188
310198
|
init_confirm();
|
|
@@ -310353,7 +310363,6 @@ function downloadBlob(blob, filename) {
|
|
|
310353
310363
|
}
|
|
310354
310364
|
var init_download = __esm({
|
|
310355
310365
|
"lib/io/download.ts"() {
|
|
310356
|
-
"use strict";
|
|
310357
310366
|
}
|
|
310358
310367
|
});
|
|
310359
310368
|
|
|
@@ -316133,6 +316142,7 @@ function videoPixelSize(resolution, aspect) {
|
|
|
316133
316142
|
var VIDEO_ASPECTS, VIDEO_RESOLUTIONS, SEEDANCE_ASPECTS, range, VIDEO_MODELS, DEFAULT_VIDEO_MODEL, videoModel, VIDEO_LIMITS;
|
|
316134
316143
|
var init_video_models = __esm({
|
|
316135
316144
|
"lib/ai/video-models.ts"() {
|
|
316145
|
+
"use strict";
|
|
316136
316146
|
VIDEO_ASPECTS = ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9"];
|
|
316137
316147
|
VIDEO_RESOLUTIONS = ["480p", "720p", "1080p"];
|
|
316138
316148
|
SEEDANCE_ASPECTS = ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9"];
|
|
@@ -316498,7 +316508,7 @@ async function renderDocument(doc2, nodeIds, options) {
|
|
|
316498
316508
|
if (frame2) doc2 = { ...doc2, nodes: bakeMotion3(doc2.nodes, frame2.id, options.at) };
|
|
316499
316509
|
}
|
|
316500
316510
|
}
|
|
316501
|
-
return selectionReferenceImages2(doc2, [...nodeIds], { maxEdge: options?.maxEdge, max: 8, format: "
|
|
316511
|
+
return selectionReferenceImages2(doc2, [...nodeIds], { maxEdge: options?.maxEdge, max: 8, format: "JPG", ...options?.bands ? { bands: options.bands } : {} });
|
|
316502
316512
|
}
|
|
316503
316513
|
function generateCapability(ctx2) {
|
|
316504
316514
|
return async (prompt2, options = {}) => {
|
|
@@ -326484,7 +326494,7 @@ var init_package = __esm({
|
|
|
326484
326494
|
"packages/runtime/package.json"() {
|
|
326485
326495
|
package_default = {
|
|
326486
326496
|
name: "@popcraft/runtime",
|
|
326487
|
-
version: "0.34.
|
|
326497
|
+
version: "0.34.2",
|
|
326488
326498
|
description: "What code exported from PopCraft shares: the meaning of expressions (operators and functions) and, as it grows, the parts of a design's behaviour that are common code rather than generated React.",
|
|
326489
326499
|
license: "MIT",
|
|
326490
326500
|
homepage: "https://popcraft.app/docs/exporting/nextjs",
|
|
@@ -351150,7 +351160,6 @@ function exportsOf(source3) {
|
|
|
351150
351160
|
var CODE_LIMITS, packageOf;
|
|
351151
351161
|
var init_source2 = __esm({
|
|
351152
351162
|
"lib/code/source.ts"() {
|
|
351153
|
-
"use strict";
|
|
351154
351163
|
CODE_LIMITS = { modules: 100, sourceLength: 2e5, packages: 12 };
|
|
351155
351164
|
packageOf = (spec) => spec.split("/").slice(0, spec.startsWith("@") ? 2 : 1).join("/");
|
|
351156
351165
|
}
|
|
@@ -351193,7 +351202,6 @@ function compileModule(module2) {
|
|
|
351193
351202
|
var import_sucrase, BUILT_IN, memo4;
|
|
351194
351203
|
var init_compile2 = __esm({
|
|
351195
351204
|
"lib/code/compile.ts"() {
|
|
351196
|
-
"use strict";
|
|
351197
351205
|
import_sucrase = __toESM(require_dist2());
|
|
351198
351206
|
init_source2();
|
|
351199
351207
|
init_source2();
|
|
@@ -360168,7 +360176,6 @@ var init_publish = __esm({
|
|
|
360168
360176
|
var storeOpsSeam;
|
|
360169
360177
|
var init_seams = __esm({
|
|
360170
360178
|
"lib/commands/seams.ts"() {
|
|
360171
|
-
"use strict";
|
|
360172
360179
|
storeOpsSeam = (st) => ({
|
|
360173
360180
|
booleanOperation: (op4) => st().booleanOperation(op4),
|
|
360174
360181
|
flatten: () => st().flattenSelection(),
|
|
@@ -363367,27 +363374,35 @@ async function authHeaders2() {
|
|
|
363367
363374
|
};
|
|
363368
363375
|
}
|
|
363369
363376
|
async function streamChat(opts, handlers = {}, signal) {
|
|
363377
|
+
const body = JSON.stringify({
|
|
363378
|
+
model: opts.model,
|
|
363379
|
+
messages: opts.messages,
|
|
363380
|
+
stream: true,
|
|
363381
|
+
max_tokens: opts.maxTokens ?? (opts.tools?.length ? 16384 : 4096),
|
|
363382
|
+
...opts.temperature !== void 0 ? { temperature: opts.temperature } : {},
|
|
363383
|
+
...opts.tools?.length ? { tools: opts.tools, tool_choice: opts.toolChoice ?? "auto" } : {}
|
|
363384
|
+
});
|
|
363385
|
+
if (body.length > MAX_REQUEST_BYTES) {
|
|
363386
|
+
throw new StreamError(
|
|
363387
|
+
`This message is too large to send (${(body.length / 1e6).toFixed(1)} MB with its images). Attach fewer or smaller images.`,
|
|
363388
|
+
"too_large",
|
|
363389
|
+
413
|
|
363390
|
+
);
|
|
363391
|
+
}
|
|
363370
363392
|
const res = await fetch(`${HYPERY_GATEWAY_URL}/api/v1/chat/completions`, {
|
|
363371
363393
|
method: "POST",
|
|
363372
363394
|
headers: await authHeaders2(),
|
|
363373
363395
|
signal,
|
|
363374
|
-
body
|
|
363375
|
-
model: opts.model,
|
|
363376
|
-
messages: opts.messages,
|
|
363377
|
-
stream: true,
|
|
363378
|
-
max_tokens: opts.maxTokens ?? (opts.tools?.length ? 16384 : 4096),
|
|
363379
|
-
...opts.temperature !== void 0 ? { temperature: opts.temperature } : {},
|
|
363380
|
-
...opts.tools?.length ? { tools: opts.tools, tool_choice: opts.toolChoice ?? "auto" } : {}
|
|
363381
|
-
})
|
|
363396
|
+
body
|
|
363382
363397
|
}).catch((err2) => {
|
|
363383
363398
|
if (err2.name === "AbortError") throw err2;
|
|
363384
363399
|
throw new StreamError("Could not reach Hypery. Check your connection.", "network", 0);
|
|
363385
363400
|
});
|
|
363386
363401
|
if (!res.ok || !res.body) {
|
|
363387
|
-
const
|
|
363388
|
-
let payload =
|
|
363402
|
+
const body2 = await res.text().catch(() => "");
|
|
363403
|
+
let payload = body2;
|
|
363389
363404
|
try {
|
|
363390
|
-
payload = JSON.parse(
|
|
363405
|
+
payload = JSON.parse(body2);
|
|
363391
363406
|
} catch {
|
|
363392
363407
|
}
|
|
363393
363408
|
throw new StreamError(streamErrorMessage(payload, `The AI request failed (${res.status}).`), errorCodeFor(res.status, payload), res.status);
|
|
@@ -363436,7 +363451,7 @@ function errorCodeFor(status3, payload) {
|
|
|
363436
363451
|
if (status3 === 429) return "ai_rate_limited";
|
|
363437
363452
|
return "ai_upstream";
|
|
363438
363453
|
}
|
|
363439
|
-
var IDLE_TIMEOUT_MS;
|
|
363454
|
+
var IDLE_TIMEOUT_MS, MAX_REQUEST_BYTES;
|
|
363440
363455
|
var init_gateway = __esm({
|
|
363441
363456
|
"lib/agent/gateway.ts"() {
|
|
363442
363457
|
"use strict";
|
|
@@ -363446,6 +363461,7 @@ var init_gateway = __esm({
|
|
|
363446
363461
|
init_shared();
|
|
363447
363462
|
init_stream_parse();
|
|
363448
363463
|
IDLE_TIMEOUT_MS = 18e4;
|
|
363464
|
+
MAX_REQUEST_BYTES = 44e5;
|
|
363449
363465
|
}
|
|
363450
363466
|
});
|
|
363451
363467
|
|
|
@@ -363477,6 +363493,28 @@ function pruneOldImages(messages, keep = KEEP_IMAGE_TURNS) {
|
|
|
363477
363493
|
messages[i2] = { ...m, content: `${text} [${images === 1 ? "image" : `${images} images`} omitted: superseded by a later render \u2014 render again if you need to look.]`.trim() };
|
|
363478
363494
|
}
|
|
363479
363495
|
}
|
|
363496
|
+
function fitImagesToBudget(messages, budget) {
|
|
363497
|
+
if (sizeOf2(messages) <= budget) return;
|
|
363498
|
+
const renderTurns = messages.map((m, i2) => ({ m, i: i2 })).filter(({ m }) => m.role === "user" && Array.isArray(m.content) && m.content[0]?.type === "text" && !!m.content[0].text?.startsWith(RENDER_TURN_PREFIX)).map(({ i: i2 }) => i2);
|
|
363499
|
+
for (const i2 of renderTurns) {
|
|
363500
|
+
if (sizeOf2(messages) <= budget) return;
|
|
363501
|
+
const m = messages[i2];
|
|
363502
|
+
if (!Array.isArray(m.content)) continue;
|
|
363503
|
+
const parts = [...m.content];
|
|
363504
|
+
let dropped = 0;
|
|
363505
|
+
for (let j = parts.length - 1; j >= 0 && sizeOf2(messages) > budget; j--) {
|
|
363506
|
+
if (parts[j].type !== "image_url") continue;
|
|
363507
|
+
parts.splice(j, 1);
|
|
363508
|
+
dropped++;
|
|
363509
|
+
messages[i2] = { ...m, content: [...parts] };
|
|
363510
|
+
}
|
|
363511
|
+
if (dropped) {
|
|
363512
|
+
const note2 = `[${dropped === 1 ? "1 image" : `${dropped} images`} omitted to keep the request under the size limit \u2014 look at fewer layers at once, or pass a smaller maxEdge.]`;
|
|
363513
|
+
const rest = messages[i2].content;
|
|
363514
|
+
messages[i2] = { ...m, content: rest.some((p2) => p2.type === "image_url") ? [...rest, { type: "text", text: note2 }] : `${rest.flatMap((p2) => p2.type === "text" ? [p2.text] : []).join(" ")} ${note2}`.trim() };
|
|
363515
|
+
}
|
|
363516
|
+
}
|
|
363517
|
+
}
|
|
363480
363518
|
async function runAgentLoop(opts) {
|
|
363481
363519
|
const maxRounds = opts.maxRounds ?? DEFAULT_MAX_ROUNDS;
|
|
363482
363520
|
const maxResultChars = opts.maxResultChars ?? 8e3;
|
|
@@ -363488,6 +363526,7 @@ async function runAgentLoop(opts) {
|
|
|
363488
363526
|
if (opts.stopped?.()) return { messages, text, rounds, exhausted: false, stopped: true };
|
|
363489
363527
|
for (const note2 of opts.drainNotifications?.() ?? []) messages.push({ role: "user", content: note2 });
|
|
363490
363528
|
pruneOldImages(messages);
|
|
363529
|
+
fitImagesToBudget(messages, MAX_REQUEST_BYTES - JSON.stringify(specs).length - REQUEST_MARGIN_BYTES);
|
|
363491
363530
|
opts.hooks?.onAssistantStart?.(rounds);
|
|
363492
363531
|
const turn = await opts.callModel(messages, specs, {
|
|
363493
363532
|
onTextDelta: opts.hooks?.onTextDelta,
|
|
@@ -363546,14 +363585,17 @@ async function runAgentLoop(opts) {
|
|
|
363546
363585
|
messages.push({ role: "assistant", content: final.text });
|
|
363547
363586
|
return { messages, text: final.text, rounds, exhausted: true, stopped: false };
|
|
363548
363587
|
}
|
|
363549
|
-
var DEFAULT_MAX_ROUNDS, DEFAULT_MAX_PARALLEL, KEEP_IMAGE_TURNS, RENDER_TURN_PREFIX;
|
|
363588
|
+
var DEFAULT_MAX_ROUNDS, DEFAULT_MAX_PARALLEL, KEEP_IMAGE_TURNS, RENDER_TURN_PREFIX, REQUEST_MARGIN_BYTES, sizeOf2;
|
|
363550
363589
|
var init_loop = __esm({
|
|
363551
363590
|
"lib/agent/loop.ts"() {
|
|
363552
363591
|
"use strict";
|
|
363592
|
+
init_gateway();
|
|
363553
363593
|
DEFAULT_MAX_ROUNDS = 12;
|
|
363554
363594
|
DEFAULT_MAX_PARALLEL = 4;
|
|
363555
363595
|
KEEP_IMAGE_TURNS = 2;
|
|
363556
363596
|
RENDER_TURN_PREFIX = "Result of ";
|
|
363597
|
+
REQUEST_MARGIN_BYTES = 64e3;
|
|
363598
|
+
sizeOf2 = (messages) => JSON.stringify(messages).length;
|
|
363557
363599
|
}
|
|
363558
363600
|
});
|
|
363559
363601
|
|
|
@@ -397520,7 +397562,6 @@ function designRecorder() {
|
|
|
397520
397562
|
var installed;
|
|
397521
397563
|
var init_recorders = __esm({
|
|
397522
397564
|
"lib/agent/design-script/recorders.ts"() {
|
|
397523
|
-
"use strict";
|
|
397524
397565
|
installed = null;
|
|
397525
397566
|
}
|
|
397526
397567
|
});
|
|
@@ -409896,7 +409937,7 @@ init_resources();
|
|
|
409896
409937
|
init_desktop();
|
|
409897
409938
|
init_hypery();
|
|
409898
409939
|
import { createInterface } from "node:readline";
|
|
409899
|
-
var VERSION2 = "0.34.
|
|
409940
|
+
var VERSION2 = "0.34.2";
|
|
409900
409941
|
var HELP = `popcraft ${VERSION2} \u2014 the PopCraft command line
|
|
409901
409942
|
|
|
409902
409943
|
Files (headless, on .popcraft files):
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@popcraft/cli",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.2",
|
|
4
4
|
"description": "The PopCraft command line: edit .popcraft files headlessly, call the REST API, publish to the marketplace and manage the desktop app's local plugins, themes, fonts, skills and agents.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://popcraft.app/docs/api/cli",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"esbuild": "0.28.2"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@popcraft/kit": "0.34.
|
|
37
|
+
"@popcraft/kit": "0.34.2"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "node build.mjs",
|