deployai 0.1.0-beta.15 → 0.1.0-beta.17

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 (2) hide show
  1. package/dist/index.js +411 -92
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -98,6 +98,14 @@ var ISSUES = [
98
98
  agentLine: "{loc} runs a WebSocket server{detail}.",
99
99
  fixForAgent: "A standalone WebSocket server cannot run here. Use polling or server-sent events for live updates, or ask the developer before redesigning this feature."
100
100
  },
101
+ {
102
+ code: "durable_objects",
103
+ severity: "blocker",
104
+ titleEn: "Uses Durable Objects, not supported yet",
105
+ titleHe: "\u05D4\u05D0\u05EA\u05E8 \u05DE\u05E9\u05EA\u05DE\u05E9 \u05D1\u05BEDurable Objects, \u05E9\u05E2\u05D5\u05D3 \u05DC\u05D0 \u05E0\u05EA\u05DE\u05DB\u05D9\u05DD",
106
+ agentLine: "{loc} declares Durable Objects{detail}.",
107
+ fixForAgent: "Durable Objects do not run on customer sites yet. Keep the data in D1 (SQLite) and remove durable_objects from the wrangler config. For live updates use polling or server-sent events."
108
+ },
101
109
  {
102
110
  code: "bundle_too_large",
103
111
  severity: "blocker",
@@ -705,6 +713,120 @@ function frameworkDisplay(d) {
705
713
  if (notes.length) s += ` (${notes.join(", ")})`;
706
714
  return s;
707
715
  }
716
+ function jsoncToJson(src) {
717
+ let out2 = "";
718
+ let i = 0;
719
+ const n2 = src.length;
720
+ while (i < n2) {
721
+ const c = src[i];
722
+ if (c === '"') {
723
+ let j = i + 1;
724
+ while (j < n2 && src[j] !== '"') j += src[j] === "\\" ? 2 : 1;
725
+ out2 += src.slice(i, j + 1);
726
+ i = j + 1;
727
+ } else if (c === "/" && src[i + 1] === "/") {
728
+ while (i < n2 && src[i] !== "\n") i++;
729
+ } else if (c === "/" && src[i + 1] === "*") {
730
+ i += 2;
731
+ while (i < n2 && !(src[i] === "*" && src[i + 1] === "/")) i++;
732
+ i += 2;
733
+ } else {
734
+ out2 += c;
735
+ i++;
736
+ }
737
+ }
738
+ return out2.replace(/,(\s*[}\]])/g, "$1");
739
+ }
740
+ function durableObjectsOf(v) {
741
+ const list = v && typeof v === "object" ? v.bindings : null;
742
+ if (!Array.isArray(list)) return [];
743
+ return list.map((x) => x && typeof x === "object" && typeof x.name === "string" ? x.name : "");
744
+ }
745
+ function bindingsOf(list) {
746
+ if (!Array.isArray(list)) return [];
747
+ return list.map((x) => x && typeof x === "object" && typeof x.binding === "string" ? { binding: x.binding } : null).filter((x) => x !== null);
748
+ }
749
+ function parseWranglerConfig(fileName, text) {
750
+ const empty = { d1: [], r2: [], vars: [], main: null, assetsDir: null, compatibilityDate: null, compatibilityFlags: [], durableObjects: [] };
751
+ if (/\.toml$/.test(fileName)) return parseWranglerToml(text);
752
+ let j;
753
+ try {
754
+ j = JSON.parse(jsoncToJson(text));
755
+ } catch {
756
+ return empty;
757
+ }
758
+ if (!j || typeof j !== "object") return empty;
759
+ const assets = j.assets;
760
+ const vars = j.vars && typeof j.vars === "object" && !Array.isArray(j.vars) ? Object.keys(j.vars) : [];
761
+ return {
762
+ d1: bindingsOf(j.d1_databases),
763
+ r2: bindingsOf(j.r2_buckets),
764
+ vars,
765
+ main: typeof j.main === "string" ? j.main : null,
766
+ assetsDir: assets && typeof assets.directory === "string" ? assets.directory : null,
767
+ compatibilityDate: typeof j.compatibility_date === "string" ? j.compatibility_date : null,
768
+ compatibilityFlags: Array.isArray(j.compatibility_flags) ? j.compatibility_flags.filter((x) => typeof x === "string") : [],
769
+ durableObjects: durableObjectsOf(j.durable_objects)
770
+ };
771
+ }
772
+ function tomlString(v) {
773
+ const m = /^\s*(?:"((?:[^"\\]|\\.)*)"|'([^']*)')/.exec(v);
774
+ return m ? m[1] ?? m[2] ?? "" : null;
775
+ }
776
+ function parseWranglerToml(text) {
777
+ const decl = { d1: [], r2: [], vars: [], main: null, assetsDir: null, compatibilityDate: null, compatibilityFlags: [], durableObjects: [] };
778
+ let section = "";
779
+ for (const rawLine of text.split(/\r?\n/)) {
780
+ const line = rawLine.replace(/\s+#.*$/, "").replace(/^#.*$/, "").trim();
781
+ if (!line) continue;
782
+ const arr = /^\[\[\s*([\w.]+)\s*\]\]$/.exec(line);
783
+ if (arr) {
784
+ section = `[[${arr[1]}]]`;
785
+ if (arr[1] === "d1_databases") decl.d1.push({ binding: "" });
786
+ if (arr[1] === "r2_buckets") decl.r2.push({ binding: "" });
787
+ if (arr[1] === "durable_objects.bindings") decl.durableObjects.push("");
788
+ continue;
789
+ }
790
+ const tbl = /^\[\s*([\w.]+)\s*\]$/.exec(line);
791
+ if (tbl) {
792
+ section = tbl[1];
793
+ continue;
794
+ }
795
+ const kv = /^([\w-]+|"[^"]+")\s*=\s*(.*)$/.exec(line);
796
+ if (!kv) continue;
797
+ const key = kv[1].replace(/^"|"$/g, "");
798
+ const value = kv[2];
799
+ if (section === "") {
800
+ if (key === "main") decl.main = tomlString(value);
801
+ if (key === "compatibility_date") decl.compatibilityDate = tomlString(value);
802
+ if (key === "compatibility_flags") decl.compatibilityFlags = [...value.matchAll(/"([^"]+)"|'([^']+)'/g)].map((m) => m[1] ?? m[2]);
803
+ if (key === "d1_databases" || key === "r2_buckets") {
804
+ const target = key === "d1_databases" ? decl.d1 : decl.r2;
805
+ for (const m of value.matchAll(/binding\s*=\s*(?:"([^"]+)"|'([^']+)')/g)) target.push({ binding: m[1] ?? m[2] });
806
+ }
807
+ if (key === "vars") for (const m of value.matchAll(/([\w-]+)\s*=/g)) decl.vars.push(m[1]);
808
+ if (key === "durable_objects") for (const m of value.matchAll(/\bname\s*=\s*(?:"([^"]+)"|'([^']+)')/g)) decl.durableObjects.push(m[1] ?? m[2]);
809
+ } else if (section === "durable_objects" && key === "bindings") {
810
+ for (const m of value.matchAll(/\bname\s*=\s*(?:"([^"]+)"|'([^']+)')/g)) decl.durableObjects.push(m[1] ?? m[2]);
811
+ } else if (section === "[[durable_objects.bindings]]" && key === "name") {
812
+ const v = tomlString(value);
813
+ if (v != null) decl.durableObjects[decl.durableObjects.length - 1] = v;
814
+ } else if (section === "vars") {
815
+ decl.vars.push(key);
816
+ } else if (section === "assets" && key === "directory") {
817
+ decl.assetsDir = tomlString(value);
818
+ } else if (section === "[[d1_databases]]" && key === "binding") {
819
+ const v = tomlString(value);
820
+ if (v != null) decl.d1[decl.d1.length - 1].binding = v;
821
+ } else if (section === "[[r2_buckets]]" && key === "binding") {
822
+ const v = tomlString(value);
823
+ if (v != null) decl.r2[decl.r2.length - 1].binding = v;
824
+ }
825
+ }
826
+ decl.d1 = decl.d1.filter((b) => b.binding);
827
+ decl.r2 = decl.r2.filter((b) => b.binding);
828
+ return decl;
829
+ }
708
830
 
709
831
  // ../shared/src/issue-help.ts
710
832
  var HELP_ORIGIN = "https://deployai.co.il";
@@ -835,6 +957,19 @@ var ISSUE_HELP = {
835
957
  fix: ["Remove timers, job queues and scheduled task libraries from the site.", "If you need a task that runs on a clock, your agent asks you before building it."]
836
958
  }
837
959
  },
960
+ durable_objects: {
961
+ he: {
962
+ what: "\u05D4\u05D2\u05D3\u05E8\u05D5\u05EA \u05D4\u05D0\u05EA\u05E8 (wrangler) \u05DE\u05D1\u05E7\u05E9\u05D5\u05EA Durable Objects, \u05D0\u05D7\u05E1\u05D5\u05DF \u05DC\u05DE\u05E6\u05D1 \u05D7\u05D9 \u05DB\u05DE\u05D5 \u05E6\u05F3\u05D0\u05D8 \u05D0\u05D5 \u05DE\u05D5\u05E0\u05D9\u05DD.",
963
+ why: "\u05D0\u05EA\u05E8\u05D9\u05DD \u05E9\u05DC \u05DC\u05E7\u05D5\u05D7\u05D5\u05EA \u05E2\u05D5\u05D3 \u05DC\u05D0 \u05D9\u05DB\u05D5\u05DC\u05D9\u05DD \u05DC\u05D4\u05E9\u05EA\u05DE\u05E9 \u05D1\u05D4\u05DD. \u05D4\u05D0\u05EA\u05E8 \u05D4\u05D9\u05D4 \u05E2\u05D5\u05DC\u05D4 \u05D5\u05E0\u05D5\u05E4\u05DC \u05D1\u05D1\u05E7\u05E9\u05D4 \u05D4\u05E8\u05D0\u05E9\u05D5\u05E0\u05D4 \u05E9\u05DE\u05D2\u05D9\u05E2\u05D4 \u05D0\u05DC\u05D9\u05D4\u05DD, \u05DC\u05DB\u05DF \u05D4\u05D5\u05D0 \u05DC\u05D0 \u05D9\u05E2\u05DC\u05D4.",
964
+ fix: ["\u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05E0\u05E9\u05DE\u05E8\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05E9\u05DC \u05D4\u05D0\u05EA\u05E8.", "\u05DC\u05E2\u05D3\u05DB\u05D5\u05E0\u05D9\u05DD \u05D7\u05D9\u05D9\u05DD \u05D1\u05D5\u05D3\u05E7\u05D9\u05DD \u05DE\u05D7\u05D3\u05E9 \u05DB\u05DC \u05DB\u05DE\u05D4 \u05E9\u05E0\u05D9\u05D5\u05EA, \u05D0\u05D5 \u05DE\u05E9\u05EA\u05DE\u05E9\u05D9\u05DD \u05D1\u05D6\u05E8\u05DD \u05E2\u05D3\u05DB\u05D5\u05E0\u05D9\u05DD \u05DE\u05D4\u05E9\u05E8\u05EA."],
965
+ prompt: "Durable Objects \u05DC\u05D0 \u05E8\u05E6\u05D9\u05DD \u05E2\u05D3\u05D9\u05D9\u05DF \u05D1\u05D0\u05EA\u05E8\u05D9\u05DD \u05E9\u05DC \u05DC\u05E7\u05D5\u05D7\u05D5\u05EA. \u05E9\u05DE\u05D5\u05E8 \u05D0\u05EA \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05D1\u05BED1 (SQLite) \u05D5\u05D4\u05E1\u05E8 \u05D0\u05EA durable_objects \u05DE\u05E7\u05D5\u05D1\u05E5 \u05D4\u05BEwrangler. \u05DC\u05E2\u05D3\u05DB\u05D5\u05E0\u05D9\u05DD \u05D7\u05D9\u05D9\u05DD \u05D4\u05E9\u05EA\u05DE\u05E9 \u05D1\u05BEpolling \u05D0\u05D5 \u05D1\u05BEserver-sent events."
966
+ },
967
+ en: {
968
+ what: "The site settings (wrangler) ask for Durable Objects, storage for live state such as a chat or counters.",
969
+ why: "Customer sites cannot use them yet. The site would go live and then fail on the first request that reaches one, so it will not go live.",
970
+ fix: ["Keep the data in the site database.", "For live updates, check again every few seconds, or use a stream of updates from the server."]
971
+ }
972
+ },
838
973
  websocket_server: {
839
974
  he: {
840
975
  what: "\u05D4\u05D0\u05EA\u05E8 \u05DE\u05E4\u05E2\u05D9\u05DC \u05E9\u05E8\u05EA WebSocket, \u05D7\u05D9\u05D1\u05D5\u05E8 \u05E4\u05EA\u05D5\u05D7 \u05E9\u05E0\u05E9\u05D0\u05E8 \u05E4\u05E2\u05D9\u05DC \u05DB\u05D3\u05D9 \u05DC\u05E9\u05DC\u05D5\u05D7 \u05E2\u05D3\u05DB\u05D5\u05E0\u05D9\u05DD \u05D7\u05D9\u05D9\u05DD.",
@@ -18997,8 +19132,8 @@ function currencyCode2(_params) {
18997
19132
  return _stringFormat(ZodCustomStringFormat, "currency_code", currencyCode, _params);
18998
19133
  }
18999
19134
  function hash(alg, params) {
19000
- const enc2 = params?.enc ?? "hex";
19001
- const format = `${alg}_${enc2}`;
19135
+ const enc4 = params?.enc ?? "hex";
19136
+ const format = `${alg}_${enc4}`;
19002
19137
  const regex = regexes_exports[format];
19003
19138
  if (!regex)
19004
19139
  throw new Error(`Unrecognized hash format: ${format}`);
@@ -21260,7 +21395,9 @@ var ARCH_NODES = [
21260
21395
  { id: "demos", kind: "worker", zone: "cloudflare", label: "deployai-demos", summary: "\u05D4\u05D3\u05DE\u05D5\u05D0\u05D9\u05DD \u05D1\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05DB\u05DE\u05D5 shop.deploy-net.com, \u05E2\u05DC \u05DB\u05DC \u05D3\u05D5\u05DE\u05D9\u05D9\u05DF \u05D0\u05EA\u05E8\u05D9\u05DD: \u05DE\u05D5\u05E9\u05DA \u05D0\u05EA /demo/<key> \u05DE\u05D4\u05D0\u05EA\u05E8 \u05E9\u05DC\u05E0\u05D5 \u05D5\u05DE\u05E1\u05D9\u05E8 \u05D0\u05EA \u05D4\u05E7\u05D9\u05D3\u05D5\u05DE\u05EA, noindex.", summaryEn: "The demos on hosts like shop.deploy-net.com, on every sites domain: fetches /demo/<key> from our site and strips the prefix, noindex.", code: ["workers/demos/src", "scripts/deploy-demos.ts", "packages/shared/src/demos.ts"], env: ["CHROME_PATH", "SHOTS_BASE"], docs: ["workers/demos/README.md"], decisions: ["D-112", "D-293"] },
21261
21396
  { id: "tools-worker", kind: "worker", zone: "cloudflare", label: "deployai-tools", summary: "\u05DE\u05D5\u05E8\u05D9\u05D3 \u05D0\u05EA \u05D4\u05E2\u05DE\u05D5\u05D3\u05D9\u05DD \u05D5\u05D4\u05EA\u05DE\u05D5\u05E0\u05D5\u05EA \u05E9\u05D4\u05DB\u05DC\u05D9\u05DD \u05D4\u05D7\u05D9\u05E0\u05DE\u05D9\u05D9\u05DD \u05D1\u05D5\u05D3\u05E7\u05D9\u05DD, \u05DB\u05D3\u05D9 \u05E9\u05DB\u05EA\u05D5\u05D1\u05EA \u05E9\u05DE\u05D1\u05E7\u05E8 \u05D4\u05E7\u05DC\u05D9\u05D3 \u05DC\u05D0 \u05EA\u05D9\u05D8\u05E2\u05DF \u05DE\u05D4\u05E9\u05E8\u05EA \u05E9\u05DC\u05E0\u05D5. \u05E8\u05E7 \u05E9\u05DE\u05D5\u05EA \u05E6\u05D9\u05D1\u05D5\u05E8\u05D9\u05D9\u05DD, \u05DB\u05DC \u05EA\u05E9\u05D5\u05D1\u05EA DNS \u05D5\u05DB\u05DC \u05D4\u05E4\u05E0\u05D9\u05D4 \u05E0\u05D1\u05D3\u05E7\u05D5\u05EA.", summaryEn: "Downloads the pages and images the free tools test, so an address a visitor typed is never fetched from our server. Public names only; every DNS answer and redirect is checked.", code: ["workers/tools/src", "scripts/deploy-tools.ts", "packages/shared/src/safe-url.ts"], env: ["TOOLS_FETCH_SECRET"], decisions: ["D-199"] },
21262
21397
  { id: "uptime-worker", kind: "worker", zone: "cloudflare", label: "deployai-uptime", summary: "\u05D1\u05D5\u05D3\u05E7 \u05DE\u05D1\u05D7\u05D5\u05E5 \u05DB\u05DC 2 \u05D3\u05E7\u05D5\u05EA \u05E9-/api/health \u05E2\u05D5\u05E0\u05D4, \u05DB\u05D9 \u05E9\u05E8\u05EA \u05E9\u05E0\u05E4\u05DC \u05DC\u05D0 \u05D9\u05DB\u05D5\u05DC \u05DC\u05D3\u05D5\u05D5\u05D7 \u05E2\u05DC \u05E2\u05E6\u05DE\u05D5. \u05E9\u05D5\u05DE\u05E8 \u05D0\u05EA \u05D4\u05EA\u05D5\u05E6\u05D0\u05D4 \u05D1\u05BEKV, \u05D5\u05E9\u05EA\u05D9 \u05E0\u05E4\u05D9\u05DC\u05D5\u05EA \u05D1\u05E8\u05E6\u05E3 \u05E9\u05D5\u05DC\u05D7\u05D5\u05EA \u05DE\u05D9\u05D9\u05DC \u05DC\u05E6\u05D5\u05D5\u05EA.", summaryEn: "Checks from outside every 2 minutes that /api/health answers, because a server that is down cannot report itself. Keeps the result in KV; two failures in a row email the team.", code: ["workers/uptime/src", "scripts/deploy-uptime.ts", "apps/web/src/app/api/health/route.ts"], env: ["UPTIME_ALERT_TO", "UPTIME_ALERT_TOKEN"], decisions: ["D-331"] },
21263
- { id: "dispatch", kind: "worker", zone: "cloudflare", label: "deployai-dispatch", summary: 'Worker \u05D0\u05D7\u05D3 \u05E2\u05DC */* \u05E9\u05DE\u05E0\u05EA\u05D1 \u05DB\u05DC \u05DB\u05EA\u05D5\u05D1\u05EA \u05DC\u05D0\u05EA\u05E8, \u05E1\u05D5\u05E4\u05E8 \u05D1\u05D9\u05E7\u05D5\u05E8\u05D9\u05DD, \u05DE\u05D2\u05D1\u05D9\u05DC \u05E7\u05E6\u05D1 \u05D5\u05DE\u05D5\u05E1\u05D9\u05E3 \u05D0\u05EA \u05D4\u05EA\u05D2 "\u05D1\u05D0\u05D5\u05D5\u05D9\u05E8 \u05E2\u05DD DeployAI" \u05DC\u05D0\u05EA\u05E8\u05D9\u05DD \u05E9\u05D1\u05D7\u05D1\u05D9\u05DC\u05D4 \u05E9\u05DC\u05D4\u05DD \u05D9\u05E9 \u05EA\u05D2, \u05D0\u05E3 \u05E4\u05E2\u05DD \u05DC\u05D0 \u05DC\u05D0\u05EA\u05E8 \u05D6\u05DE\u05E0\u05D9.', summaryEn: 'One Worker on */* that routes every address to its site, counts visits, limits the rate and adds the "Live with DeployAI" badge to sites whose plan has the badge, never to a temporary site.', code: ["workers/dispatch/src", "scripts/deploy-dispatch.ts"], env: ["DISPATCH_RATE_LIMIT_PERIOD", "PROBE_SECRET"], docs: ["workers/dispatch/README.md"], decisions: ["D-087", "D-113", "D-179", "D-238", "D-245", "D-528"] },
21398
+ { id: "app-uptime", kind: "worker", zone: "customer", label: "Uptime app site", summary: "\u05D0\u05EA\u05E8 \u05E0\u05D9\u05D8\u05D5\u05E8 \u05D6\u05DE\u05D9\u05E0\u05D5\u05EA \u05E9\u05DC \u05DC\u05E7\u05D5\u05D7: \u05D0\u05EA\u05E8 \u05D1\u05E4\u05E0\u05D9 \u05E2\u05E6\u05DE\u05D5 (site-<slug> \u05D1\u05DE\u05E8\u05D7\u05D1 \u05D4\u05E9\u05DE\u05D5\u05EA), \u05E2\u05DD \u05D4\u05E7\u05D5\u05D3 \u05E9\u05DC\u05E0\u05D5 \u05D1\u05DC\u05D1\u05D3, \u05E9\u05DE\u05EA\u05E2\u05D3\u05DB\u05DF \u05D1\u05DB\u05DC \u05D4\u05E2\u05DC\u05D0\u05D4 \u05E9\u05DC \u05D4\u05E9\u05E8\u05EA. Durable Object \u05E2\u05DD SQLite \u05D1\u05D0\u05D5\u05EA\u05D5 Worker \u05E9\u05D5\u05DE\u05E8 \u05D0\u05EA \u05D4\u05E0\u05D9\u05D8\u05D5\u05E8\u05D9\u05DD \u05D5\u05DE\u05E8\u05D9\u05E5 \u05D0\u05EA \u05D4\u05D1\u05D3\u05D9\u05E7\u05D5\u05EA \u05DE\u05E9\u05E2\u05D5\u05DF \u05DE\u05E2\u05D5\u05E8\u05E8 \u05DE\u05E9\u05DC\u05D5, \u05DE\u05E6\u05D9\u05D2 \u05D3\u05E3 \u05E1\u05D8\u05D8\u05D5\u05E1 \u05E6\u05D9\u05D1\u05D5\u05E8\u05D9 \u05D5\u05D3\u05E3 \u05E0\u05D9\u05D4\u05D5\u05DC \u05DC\u05D1\u05E2\u05DC\u05D9\u05DD (\u05DB\u05E0\u05D9\u05E1\u05D4 \u05E2\u05DD DeployAI \u05D0\u05D5 \u05E1\u05D9\u05E1\u05DE\u05D4 \u05DE\u05E9\u05DC\u05D5), \u05D5\u05E9\u05D5\u05DC\u05D7 \u05DE\u05D9\u05D9\u05DC \u05D3\u05E8\u05DA \u05D4\u05D0\u05E4\u05DC\u05D9\u05E7\u05E6\u05D9\u05D4 \u05D5\u05BEwebhook \u05D7\u05EA\u05D5\u05DD. \u05D4\u05E4\u05DC\u05D8\u05E4\u05D5\u05E8\u05DE\u05D4 \u05E4\u05D5\u05E0\u05D4 \u05D0\u05DC\u05D9\u05D5 \u05D1\u05BE/__app/ \u05E2\u05DD \u05D0\u05E1\u05D9\u05DE\u05D5\u05DF \u05D7\u05EA\u05D5\u05DD \u05D1\u05DE\u05E4\u05EA\u05D7 \u05E9\u05DC \u05D4\u05D0\u05EA\u05E8 \u05D4\u05D6\u05D4 \u05D1\u05DC\u05D1\u05D3.", summaryEn: "A customer's Uptime site: a site of its own (site-<slug> in the namespace) that runs only our code, upgraded on every server deploy. A SQLite Durable Object in the same Worker keeps the monitors and runs the checks from its own alarm; it serves a public status page and the owner's admin (sign in with DeployAI or its own password), emails through the app and sends a signed webhook. The platform calls it on /__app/ with a token signed with this site's own key.", code: ["workers/app-uptime/src", "scripts/build-app-uptime.ts", "apps/web/src/server/apps.ts", "apps/web/src/server/apps-uptime.ts", "packages/shared/src/uptime.ts"], env: ["APPS_SIGNING_SECRET", "APP_TRIAL_KEYS"], decisions: ["D-556", "D-559"] },
21399
+ { id: "app-cron", kind: "worker", zone: "customer", label: "Cron Trigger app site", summary: "\u05D0\u05EA\u05E8 \u05EA\u05D6\u05DE\u05D5\u05DF \u05DE\u05E9\u05D9\u05DE\u05D5\u05EA \u05E9\u05DC \u05DC\u05E7\u05D5\u05D7: \u05D0\u05EA\u05E8 \u05D1\u05E4\u05E0\u05D9 \u05E2\u05E6\u05DE\u05D5 (site-<slug> \u05D1\u05DE\u05E8\u05D7\u05D1 \u05D4\u05E9\u05DE\u05D5\u05EA) \u05E2\u05DD \u05D4\u05E7\u05D5\u05D3 \u05E9\u05DC\u05E0\u05D5 \u05D1\u05DC\u05D1\u05D3. Durable Object \u05E2\u05DD SQLite \u05D1\u05D0\u05D5\u05EA\u05D5 Worker \u05E9\u05D5\u05DE\u05E8 \u05D0\u05EA \u05D4\u05DE\u05E9\u05D9\u05DE\u05D5\u05EA \u05D5\u05DE\u05E8\u05D9\u05E5 \u05D0\u05D5\u05EA\u05DF \u05DE\u05E9\u05E2\u05D5\u05DF \u05DE\u05E2\u05D5\u05E8\u05E8 \u05DE\u05E9\u05DC\u05D5 \u05DC\u05E4\u05D9 \u05DC\u05D5\u05D7 \u05D6\u05DE\u05E0\u05D9\u05DD \u05D1\u05E9\u05E2\u05D5\u05DF \u05D9\u05E9\u05E8\u05D0\u05DC, \u05E2\u05DD \u05DE\u05D2\u05D1\u05DC\u05EA \u05D6\u05DE\u05DF \u05DC\u05DB\u05DC \u05E8\u05D9\u05E6\u05D4 (10 \u05E9\u05E0\u05D9\u05D5\u05EA, 3 \u05D0\u05D7\u05E8\u05D9 \u05E1\u05E3 \u05D4\u05E8\u05D9\u05E6\u05D5\u05EA \u05D4\u05D0\u05D9\u05D8\u05D9\u05D5\u05EA \u05E9\u05DC \u05D4\u05D7\u05D5\u05D3\u05E9), \u05E9\u05D5\u05DE\u05E8 \u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D4 \u05D5\u05E9\u05D5\u05DC\u05D7 \u05DE\u05D9\u05D9\u05DC \u05D3\u05E8\u05DA \u05D4\u05D0\u05E4\u05DC\u05D9\u05E7\u05E6\u05D9\u05D4 \u05D5\u05BEwebhook \u05D7\u05EA\u05D5\u05DD \u05D1\u05BEPro.", summaryEn: "A customer's Cron Trigger site: a site of its own (site-<slug> in the namespace) that runs only our code. A SQLite Durable Object in the same Worker keeps the jobs and runs them from its own alarm on a schedule in Israel time, with a time limit per run (10 seconds, 3 after the month's slow-run threshold), keeps their history, and emails through the app and sends a signed webhook with Pro.", code: ["workers/app-cron/src", "scripts/build-app-cron.ts", "apps/web/src/server/apps.ts", "apps/web/src/server/apps-notify.ts", "packages/shared/src/cron.ts"], decisions: ["D-567", "D-568"] },
21400
+ { id: "dispatch", kind: "worker", zone: "cloudflare", label: "deployai-dispatch", summary: 'Worker \u05D0\u05D7\u05D3 \u05E2\u05DC */* \u05E9\u05DE\u05E0\u05EA\u05D1 \u05DB\u05DC \u05DB\u05EA\u05D5\u05D1\u05EA \u05DC\u05D0\u05EA\u05E8, \u05E1\u05D5\u05E4\u05E8 \u05D1\u05D9\u05E7\u05D5\u05E8\u05D9\u05DD, \u05DE\u05D2\u05D1\u05D9\u05DC \u05E7\u05E6\u05D1 \u05D5\u05DE\u05D5\u05E1\u05D9\u05E3 \u05D0\u05EA \u05D4\u05EA\u05D2 "\u05D1\u05D0\u05D5\u05D5\u05D9\u05E8 \u05E2\u05DD DeployAI" \u05DC\u05D0\u05EA\u05E8\u05D9\u05DD \u05E9\u05D1\u05D7\u05D1\u05D9\u05DC\u05D4 \u05E9\u05DC\u05D4\u05DD \u05D9\u05E9 \u05EA\u05D2, \u05D0\u05E3 \u05E4\u05E2\u05DD \u05DC\u05D0 \u05DC\u05D0\u05EA\u05E8 \u05D6\u05DE\u05E0\u05D9.', summaryEn: 'One Worker on */* that routes every address to its site, counts visits, limits the rate and adds the "Live with DeployAI" badge to sites whose plan has the badge, never to a temporary site.', code: ["workers/dispatch/src", "scripts/deploy-dispatch.ts"], env: ["DISPATCH_RATE_LIMIT_PERIOD", "PROBE_SECRET", "APP_GATE_SECRET"], docs: ["workers/dispatch/README.md"], decisions: ["D-087", "D-113", "D-179", "D-238", "D-245", "D-528"] },
21264
21401
  // Customer sites
21265
21402
  { id: "site", kind: "worker", zone: "customer", label: SITE, summary: "\u05D4\u05D0\u05EA\u05E8 \u05E9\u05DC \u05D4\u05DC\u05E7\u05D5\u05D7: Worker \u05DC\u05DB\u05DC \u05D0\u05EA\u05E8, \u05E2\u05DD \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD \u05D5\u05D4\u05E7\u05D5\u05D3 \u05E9\u05DC\u05D5.", summaryEn: "The customer's site: a Worker per site, with its files and code.", portability: "Customer sites", decisions: ["D-113", "D-245"] },
21266
21403
  { id: "site-d1", kind: "db", zone: "customer", label: `D1 ${SITE_DATA}`, summary: "\u05DE\u05E1\u05D3 \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05DC\u05DB\u05DC \u05D0\u05EA\u05E8, \u05E0\u05D5\u05E6\u05E8 \u05E4\u05E2\u05DD \u05D0\u05D7\u05EA \u05D5\u05DE\u05D7\u05D5\u05D1\u05E8 \u05D1\u05DB\u05DC \u05D4\u05E2\u05DC\u05D0\u05D4.", summaryEn: "A database per site, created once and bound on every upload.", code: ["apps/web/src/server/site-data.ts"], portability: "Customer site data", decisions: ["D-076"] },
@@ -21285,6 +21422,14 @@ var ARCH_EDGES = [
21285
21422
  { id: "worker-build", from: "worker", to: "build", kind: "deploy", label: "build job" },
21286
21423
  { id: "worker-tools", from: "worker", to: "tools-worker", kind: "http", label: "tool page fetch" },
21287
21424
  { id: "uptime-web", from: "uptime-worker", to: "web", kind: "http", label: "health check" },
21425
+ { id: "web-app-uptime", from: "web", to: "app-uptime", kind: "http", label: "signed /__app/ calls" },
21426
+ { id: "web-app-cron", from: "web", to: "app-cron", kind: "http", label: "signed /__app/ calls" },
21427
+ { id: "app-cron-web", from: "app-cron", to: "web", kind: "http", label: "failure and slow-run email" },
21428
+ { id: "cfapi-app-cron", from: "cfapi", to: "app-cron", kind: "deploy", label: "upload app bundle" },
21429
+ { id: "dispatcher-app-cron", from: dispatchBindingId("DISPATCHER"), to: "app-cron", kind: "http", label: "dispatch" },
21430
+ { id: "app-uptime-web", from: "app-uptime", to: "web", kind: "http", label: "alert email, my sites" },
21431
+ { id: "cfapi-app-uptime", from: "cfapi", to: "app-uptime", kind: "deploy", label: "upload app bundle" },
21432
+ { id: "dispatcher-app-uptime", from: dispatchBindingId("DISPATCHER"), to: "app-uptime", kind: "http", label: "dispatch" },
21288
21433
  { id: "worker-pagespeed", from: "worker", to: "pagespeed", kind: "api", label: "speed, a11y, SEO" },
21289
21434
  { id: "web-turnstile", from: "web", to: "turnstile", kind: "api", label: "tool form check" },
21290
21435
  { id: "build-npm", from: "build", to: "npm", kind: "http", label: "install" },
@@ -21512,6 +21657,10 @@ var PLAN_FEATURES = [
21512
21657
  ];
21513
21658
  var KEYS = new Set(PLAN_FEATURES.map((f) => f.key));
21514
21659
 
21660
+ // ../shared/src/app-lifecycle.ts
21661
+ var APP_HOLD_MS = 30 * 6e4;
21662
+ var APP_RENEW_GRACE_MS = 8 * 864e5;
21663
+
21515
21664
  // ../shared/src/start-flow.ts
21516
21665
  var START_ID_RE = /^[a-hjkmnp-z2-9]{10}$/;
21517
21666
  var MIGRATION_DIR = ".deployai/migration";
@@ -21579,8 +21728,8 @@ function startSteps(kind, opts = {}) {
21579
21728
  ];
21580
21729
  }
21581
21730
  }
21582
- var allowCommandsUrl = (lang = "he") => `${HELP_ORIGIN}${lang === "he" ? "" : "/en"}/connect-ai#allow`;
21583
- var runCommandsRule = (lang = "he") => `Run every npx deployai@latest command yourself. If your tool asks before it runs one, ask the owner one short yes or no question that names the command, for example "Run npx deployai@latest check? (yes or no)", and run it when they say yes. Never ask the owner to copy, paste or type a command. Never change your tool's own settings to allow it. If it is still blocked after their yes, tell them in plain words and send them ${allowCommandsUrl(lang)}, which shows them the one setting that allows it.`;
21731
+ var allowCommandsUrl = (lang = "he") => `${HELP_ORIGIN}${lang === "he" ? "" : "/en"}/go-live#allow`;
21732
+ var runCommandsRule = (lang = "he") => `Run every npx deployai@latest command yourself. If your tool asks before it runs one, ask the owner one short yes or no question that names the command, for example "Run npx deployai@latest check? (yes or no)", and run it when they say yes. Never ask the owner to copy, paste or type a command. After the first command runs, ask the owner once: "Allow DeployAI commands in this folder without asking each time? (yes or no)", and only on yes run npx deployai@latest allow (add your tool's name if it asks: claude-code, cursor, copilot, codex or antigravity). Never change your tool's settings any other way. If it is still blocked after their yes, tell them in plain words and send them ${allowCommandsUrl(lang)}, which shows them the one setting that allows it.`;
21584
21733
  var START_FAIL_LINE = "If anything fails, tell the owner in plain words what happened and what you will do next.";
21585
21734
 
21586
21735
  // ../shared/src/cli-map.ts
@@ -21619,6 +21768,7 @@ var CLI_MAP_NODES = [
21619
21768
  n("cmd-addon-run", "cli", "addon run / done", "\u05EA\u05D5\u05E1\u05E3 \u05D0\u05D7\u05D3 \u05DC\u05E4\u05D9 \u05E9\u05DD, \u05D5\u05D3\u05D9\u05D5\u05D5\u05D7 \u05E9\u05D4\u05E9\u05DC\u05D1 \u05D4\u05E1\u05EA\u05D9\u05D9\u05DD.", "One add-on by name, and the report that a step is done."),
21620
21769
  n("cmd-env", "cli", "env list / set / remove", "\u05DE\u05E9\u05EA\u05E0\u05D9 \u05D4\u05E1\u05D1\u05D9\u05D1\u05D4 \u05E9\u05DC \u05D4\u05D0\u05EA\u05E8. \u05E1\u05D5\u05D3 \u05DB\u05D1\u05E8\u05D9\u05E8\u05EA \u05DE\u05D7\u05D3\u05DC, \u05D5\u05DC\u05D0 \u05DE\u05D5\u05E6\u05D2 \u05E9\u05D5\u05D1.", "The site's environment variables. A secret by default, never shown again."),
21621
21770
  n("cmd-speed", "cli", "speed <url>", "\u05D1\u05D3\u05D9\u05E7\u05EA \u05DE\u05D4\u05D9\u05E8\u05D5\u05EA \u05E9\u05DC \u05DB\u05EA\u05D5\u05D1\u05EA \u05D7\u05D9\u05D4.", "A speed test of a live address."),
21771
+ n("cmd-allow", "cli", "allow [tool]", "\u05D0\u05D7\u05E8\u05D9 \u05E9\u05D4\u05D1\u05E2\u05DC\u05D9\u05DD \u05D0\u05D9\u05E9\u05E8: \u05DB\u05DC\u05D9 \u05D4\u05E7\u05D5\u05D3 \u05DE\u05E4\u05E1\u05D9\u05E7 \u05DC\u05E9\u05D0\u05D5\u05DC \u05DC\u05E4\u05E0\u05D9 \u05DB\u05DC \u05E4\u05E7\u05D5\u05D3\u05EA DeployAI, \u05E8\u05E7 \u05D1\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D4\u05D6\u05D5.", "After the owner says yes: the coding tool stops asking before every DeployAI command, in this folder only."),
21622
21772
  n("cmd-telemetry", "cli", "telemetry", "\u05D4\u05E4\u05E2\u05DC\u05D4 \u05D0\u05D5 \u05DB\u05D9\u05D1\u05D5\u05D9 \u05E9\u05DC \u05E0\u05EA\u05D5\u05E0\u05D9 \u05E9\u05D9\u05DE\u05D5\u05E9 \u05D0\u05E0\u05D5\u05E0\u05D9\u05DE\u05D9\u05D9\u05DD.", "Turns anonymous usage data on or off."),
21623
21773
  // The server routes the CLI calls.
21624
21774
  n("api-starts", "server", "GET /api/starts/:id", "\u05D4\u05D1\u05D7\u05D9\u05E8\u05D5\u05EA \u05D5\u05D4\u05D8\u05E7\u05E1\u05D8 \u05DC\u05E1\u05D5\u05DB\u05DF. 7 \u05D9\u05DE\u05D9\u05DD, 5 \u05E9\u05DC\u05D9\u05E4\u05D5\u05EA \u05DC\u05D0\u05EA\u05E8.", "The choices and the agent text. 7 days, 5 fetches for a site."),
@@ -21812,6 +21962,8 @@ var ENV_KEYS = {
21812
21962
  TURNSTILE_SECRET: { scope: "server", section: "tools", about: "The Turnstile secret key of the same widget." },
21813
21963
  TOOLS_FETCH_SECRET: { scope: "same", section: "tools", about: "Shared secret between the app and the tools Worker, 32 random characters or more. pnpm tools:deploy uploads it." },
21814
21964
  APPS_SIGNING_SECRET: { scope: "own", section: "tools", about: 'Signs the 60 second tokens from the app to the Uptime app Worker, and the alert calls back from it (D-556); pnpm app-uptime:deploy uploads it. Unset: Apps answer "not set up". openssl rand -hex 32' },
21965
+ APP_GATE_SECRET: { scope: "own", section: "tools", about: "The gate on app sites (D-567): our server signs every /__app/op call with it and the dispatch Worker lets those paths reach an app only with a valid signature, so the public never starts a paused app. pnpm dispatch:deploy sends it to the dispatch Worker. Unset: no platform call reaches an app site. openssl rand -hex 32" },
21966
+ APP_TRIAL_KEYS: { scope: "own", section: "tools", about: "The trial key ring (D-567, docs/30 F3): v1:<hex>! (the ! marks the current key). Trial records keep only an HMAC of the mailbox under these keys. To rotate, add a key, deploy, then move the ! (docs/30). Unset: no trial can start. v1: then openssl rand -hex 32, then !" },
21815
21967
  UPTIME_ALERT_TO: { scope: "own", section: "tools", about: "Who gets the down and back up emails of the uptime Worker, comma separated. Without it no email is sent." },
21816
21968
  UPTIME_ALERT_TOKEN: { scope: "own", section: "tools", about: "A Cloudflare token with Email Sending edit only, stored as the uptime Worker's secret. Default CF_API_TOKEN." },
21817
21969
  A11Y_RENDER: { scope: "same", section: "tools", about: "0 turns off Cloudflare Browser Rendering for the online accessibility check (D-191)." },
@@ -21838,12 +21990,10 @@ var CLOUDFLARE_SPACES = {
21838
21990
  "demosScript": "deployai-demos",
21839
21991
  "toolsScript": "deployai-tools",
21840
21992
  "uptimeScript": "deployai-uptime-dev",
21841
- "appUptimeScript": "deployai-app-uptime-dev",
21842
21993
  "s3Endpoint": "https://e9c7bdb938b1c7c41496164fdea06f35.r2.cloudflarestorage.com",
21843
21994
  "bucket": "deployai-files-dev",
21844
21995
  "backupBucket": null,
21845
- "toolsWorkerUrl": "https://deployai-tools.deployai-co-il-e9c.workers.dev",
21846
- "appUptimeUrl": "https://deployai-app-uptime-dev.deployai-co-il-e9c.workers.dev"
21996
+ "toolsWorkerUrl": "https://deployai-tools.deployai-co-il-e9c.workers.dev"
21847
21997
  },
21848
21998
  "prod": {
21849
21999
  "accountId": "e9c7bdb938b1c7c41496164fdea06f35",
@@ -21858,12 +22008,10 @@ var CLOUDFLARE_SPACES = {
21858
22008
  "demosScript": "deployai-demos",
21859
22009
  "toolsScript": "deployai-tools",
21860
22010
  "uptimeScript": "deployai-uptime",
21861
- "appUptimeScript": "deployai-app-uptime",
21862
22011
  "s3Endpoint": "https://e9c7bdb938b1c7c41496164fdea06f35.r2.cloudflarestorage.com",
21863
22012
  "bucket": "deployai-files",
21864
22013
  "backupBucket": "deployai-db-backups",
21865
- "toolsWorkerUrl": "https://deployai-tools.deployai-co-il-e9c.workers.dev",
21866
- "appUptimeUrl": "https://deployai-app-uptime.deployai-co-il-e9c.workers.dev"
22014
+ "toolsWorkerUrl": "https://deployai-tools.deployai-co-il-e9c.workers.dev"
21867
22015
  }
21868
22016
  };
21869
22017
  var BRAND = "https://deployai.co.il";
@@ -21902,7 +22050,7 @@ var SPACE_ADDRESSES = {
21902
22050
  var build = (name, cf, a) => ({ name, ...cf, ...a, brandDomain: new URL(a.brandUrl).hostname, s3Region: "auto" });
21903
22051
  var SPACES = {
21904
22052
  ...Object.fromEntries(Object.keys(CLOUDFLARE_SPACES).filter((n2) => SPACE_ADDRESSES[n2]).map((n2) => [n2, build(n2, CLOUDFLARE_SPACES[n2], SPACE_ADDRESSES[n2])])),
21905
- test: build("test", { ...CLOUDFLARE_SPACES.prod, kvNamespaceId: "", sitesZoneId: null, backupBucket: null, toolsWorkerUrl: "", appUptimeUrl: "" }, { ...SPACE_ADDRESSES.prod, appUrl: "http://localhost:3000", siteUrl: "http://localhost:3000", trustedOrigins: [], storage: "local" })
22053
+ test: build("test", { ...CLOUDFLARE_SPACES.prod, kvNamespaceId: "", sitesZoneId: null, backupBucket: null, toolsWorkerUrl: "" }, { ...SPACE_ADDRESSES.prod, appUrl: "http://localhost:3000", siteUrl: "http://localhost:3000", trustedOrigins: [], storage: "local" })
21906
22054
  };
21907
22055
 
21908
22056
  // ../shared/src/agent-rules.ts
@@ -21914,6 +22062,8 @@ var BUILD_WITH = [
21914
22062
  "Images: resize at build time or serve them as they are; no native image modules at runtime.",
21915
22063
  "Passwords: bcryptjs or Web Crypto, never native bcrypt.",
21916
22064
  "Server code runs per request: no long-running processes, background servers or child processes.",
22065
+ // D-574: a customer site cannot use Durable Objects yet; it would deploy and fail on its first request that reaches one.
22066
+ "No Durable Objects yet: keep state in D1, and use polling or server-sent events for live updates.",
21917
22067
  // D-535: the agent knows our built-in email, so it never adds an email provider or asks the owner for keys to email them.
21918
22068
  "Email to the site owner (a form answer, a new order): the built-in email, with no email provider or keys. POST JSON { subject, text, replyTo } to `${DEPLOYAI_API}/api/site/notify` with the header Authorization: Bearer DEPLOYAI_KEY (both are environment variables every upload gets). It reaches only the owner. On a temporary site it works once the owner has a free account: keep building, and say so only when it is time to go live. Email to customers needs an HTTP email API (Resend, Postmark), never SMTP."
21919
22069
  ];
@@ -21965,19 +22115,77 @@ function stackSummary(s) {
21965
22115
 
21966
22116
  // ../shared/src/ui-sources.ts
21967
22117
  var UI_SOURCES = [
21968
- { key: "shadcn", name: "shadcn/ui", url: "https://ui.shadcn.com", install: "npx shadcn@latest add <component>", license: "MIT", terms: "Free for any use; keep the license notice.", use: "Forms, dialogs, menus, tabs, tables: the plain building blocks.", frameworks: "React (Astro with the React integration)", checkedOn: "2026-10-30" },
21969
- { key: "magicui", name: "Magic UI", url: "https://magicui.design", install: 'npx shadcn@latest add "https://magicui.design/r/<component>.json"', license: "MIT", terms: "Free components only (not Magic UI Pro); keep the license notice.", use: "Marketing sections: animated backgrounds, marquees, number tickers, bento grids.", frameworks: "React", checkedOn: "2026-10-30" },
21970
- { key: "aceternity", name: "Aceternity UI", url: "https://ui.aceternity.com", install: 'npx shadcn@latest add "https://ui.aceternity.com/registry/<component>.json"', license: "Aceternity licence", terms: "Free components only (not Pro or templates). Allowed in the owner's own site; never publish the component source on its own or sell it as a template.", use: "Hero effects: spotlight, background beams, cards with motion, scroll effects.", frameworks: "React", checkedOn: "2026-10-30" },
21971
- { key: "reactbits", name: "React Bits", url: "https://reactbits.dev", install: "Copy the component from its page (or its shadcn registry line on that page)", license: "MIT + Commons Clause", terms: "Allowed as part of a website; never sell the components themselves.", use: "Text animations, backgrounds, small interactive effects.", frameworks: "React", checkedOn: "2026-10-30" },
21972
- { key: "embla", name: "Embla Carousel", url: "https://www.embla-carousel.com", install: "npm install embla-carousel", license: "MIT", terms: "Free for any use.", use: "Sliders and carousels, with plain JavaScript in any framework.", frameworks: "Any (plain JS, React, Vue, Svelte)", checkedOn: "2026-10-30" },
21973
- { key: "swiper", name: "Swiper", url: "https://swiperjs.com", install: "npm install swiper", license: "MIT", terms: "Free for any use.", use: "Galleries and touch sliders, like many WordPress themes use.", frameworks: "Any (plain JS, React, Vue)", checkedOn: "2026-10-30" },
21974
- { key: "motion", name: "Motion", url: "https://motion.dev", install: "npm install motion", license: "MIT", terms: "The free library only (not Motion+).", use: "Animations on scroll and on enter, in plain JS or React.", frameworks: "Any (plain JS, React, Vue)", checkedOn: "2026-10-30" }
22118
+ { key: "shadcn", name: "shadcn/ui", url: "https://ui.shadcn.com", install: "npx shadcn@latest add <component>", license: "MIT", terms: "Free for any use; keep the license notice.", use: "Forms, dialogs, menus, tabs, tables: the plain building blocks.", frameworks: "React (Astro with the React integration)", react: true, fits: ["business", "shop", "blog", "portfolio", "restaurant", "clinic"], licenseUrl: "https://github.com/shadcn-ui/ui/blob/main/LICENSE.md", checkedOn: "2026-10-30" },
22119
+ { key: "magicui", name: "Magic UI", url: "https://magicui.design", install: 'npx shadcn@latest add "https://magicui.design/r/<component>.json"', license: "MIT", terms: "Free components only (not Magic UI Pro); keep the license notice.", use: "Marketing sections: animated backgrounds, marquees, number tickers, bento grids.", frameworks: "React", react: true, fits: ["business", "portfolio", "restaurant"], licenseUrl: "https://github.com/magicuidesign/magicui/blob/main/LICENSE.md", checkedOn: "2026-10-30" },
22120
+ { key: "aceternity", name: "Aceternity UI", url: "https://ui.aceternity.com", install: 'npx shadcn@latest add "https://ui.aceternity.com/registry/<component>.json"', license: "Aceternity licence", terms: "Free components only (not Pro or templates). Allowed in the owner's own site; never publish the component source on its own or sell it as a template.", use: "Hero effects: spotlight, background beams, cards with motion, scroll effects.", frameworks: "React", react: true, fits: ["business", "portfolio"], licenseUrl: "https://ui.aceternity.com/licence", checkedOn: "2026-10-30" },
22121
+ { key: "reactbits", name: "React Bits", url: "https://reactbits.dev", install: "Copy the component from its page (or its shadcn registry line on that page)", license: "MIT + Commons Clause", terms: "Allowed as part of a website; never sell the components themselves.", use: "Text animations, backgrounds, small interactive effects.", frameworks: "React", react: true, fits: ["portfolio", "business"], licenseUrl: "https://github.com/DavidHDev/react-bits/blob/main/LICENSE.md", checkedOn: "2026-10-30" },
22122
+ { key: "embla", name: "Embla Carousel", url: "https://www.embla-carousel.com", install: "npm install embla-carousel", license: "MIT", terms: "Free for any use.", use: "Sliders and carousels, with plain JavaScript in any framework.", frameworks: "Any (plain JS, React, Vue, Svelte)", react: false, fits: ["shop", "restaurant", "portfolio", "business"], licenseUrl: "https://github.com/davidjerleke/embla-carousel/blob/master/LICENSE", checkedOn: "2026-10-30" },
22123
+ { key: "swiper", name: "Swiper", url: "https://swiperjs.com", install: "npm install swiper", license: "MIT", terms: "Free for any use.", use: "Galleries and touch sliders, like many WordPress themes use.", frameworks: "Any (plain JS, React, Vue)", react: false, fits: ["restaurant", "portfolio", "shop"], licenseUrl: "https://github.com/nolimits4web/swiper/blob/master/LICENSE", checkedOn: "2026-10-30" },
22124
+ { key: "motion", name: "Motion", url: "https://motion.dev", install: "npm install motion", license: "MIT", terms: "The free library only (not Motion+).", use: "Animations on scroll and on enter, in plain JS or React.", frameworks: "Any (plain JS, React, Vue)", react: false, fits: ["business", "shop", "blog", "portfolio", "restaurant", "clinic"], licenseUrl: "https://github.com/motiondivision/motion/blob/main/LICENSE.md", checkedOn: "2026-10-30" },
22125
+ // Plain HTML and Tailwind kits (D-562): no React, so they fit the Astro samples as they are. Licenses read 2026-11-01.
22126
+ { key: "daisyui", name: "DaisyUI", url: "https://daisyui.com", install: 'npm i -D daisyui, then add @plugin "daisyui"; to the main CSS file (Tailwind 4)', license: "MIT", terms: "Free for any use; keep the license notice. Never the paid themes, templates or blocks from its store.", use: "Whole-site parts with themes: buttons, cards, navbars, forms, modals.", frameworks: "Any with Tailwind (plain HTML, Astro, React)", react: false, fits: ["business", "shop", "blog", "portfolio", "restaurant", "clinic"], licenseUrl: "https://github.com/saadeghi/daisyui/blob/master/LICENSE", checkedOn: "2026-11-01" },
22127
+ { key: "hyperui", name: "HyperUI", url: "https://hyperui.dev", install: "Copy the HTML from the component page", license: "MIT", terms: "Free for any use; keep the license notice.", use: "Marketing sections (hero, call to action, pricing, FAQ, footer) and shop blocks.", frameworks: "Any with Tailwind (plain HTML, Astro, React)", react: false, fits: ["business", "shop", "clinic", "restaurant"], licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", checkedOn: "2026-11-01" },
22128
+ { key: "flowbite", name: "Flowbite", url: "https://flowbite.com", install: "npm install flowbite, add its theme and plugin lines to the main CSS file as its Tailwind 4 guide says, then copy the component HTML", license: "MIT", terms: "The open-source library only; keep the license notice. Never Flowbite Pro blocks, the Figma kit or paid templates (they are not MIT).", use: "Interactive parts: dropdowns, modals, tabs, carousels, forms, tables.", frameworks: "Any (plain HTML, Astro, React, Vue, Svelte)", react: false, fits: ["business", "shop", "clinic"], licenseUrl: "https://github.com/themesberg/flowbite/blob/main/LICENSE.md", checkedOn: "2026-11-01" },
22129
+ { key: "preline", name: "Preline UI", url: "https://preline.co", install: "npm i preline, add its CSS and script lines as its install guide says, then copy the component HTML", license: "MIT + Preline Fair Use", terms: "Free in the owner's own site, commercial too. Never build a competing UI kit or builder from it; never anything marked Pro.", use: "Full sections with small scripts: hero, navbars, pricing, account pages.", frameworks: "Any (plain HTML, Astro, React, Vue)", react: false, fits: ["business", "clinic", "restaurant", "shop"], licenseUrl: "https://github.com/htmlstreamofficial/preline/blob/main/LICENSE", checkedOn: "2026-11-01" },
22130
+ { key: "uiverse", name: "Uiverse", url: "https://uiverse.io", install: "Copy the HTML and CSS (or Tailwind) from the element page", license: "MIT", terms: "Free for any use; keep the license notice. Made by many people, so check each one on a phone and with the keyboard.", use: "Small eye-catching pieces: buttons, loaders, toggles, cards.", frameworks: "Any (plain HTML and CSS)", react: false, fits: ["portfolio", "business", "restaurant"], licenseUrl: "https://github.com/uiverse-io/galaxy/blob/main/LICENSE", checkedOn: "2026-11-01" },
22131
+ // React, for forms and app parts on a site that already uses React islands.
22132
+ { key: "originui", name: "Origin UI (coss ui)", url: "https://coss.com/ui", install: "npx shadcn@latest add <the registry address on the component page>", license: "MIT", terms: "Free for any use; keep the license notice.", use: "Form and app parts: inputs, selects, buttons, tables, dialogs.", frameworks: "React (Astro with the React integration)", react: true, fits: ["clinic", "shop", "business"], licenseUrl: "https://github.com/origin-space/originui/blob/main/LICENSE", checkedOn: "2026-11-01" }
21975
22133
  ];
21976
22134
  function uiSourcesText() {
21977
22135
  return [
21978
22136
  "UI sources you may use for visual sections (install each from its own place, never copy from elsewhere; free tiers only; add a line per component to .deployai/migration/credits.md with its source, URL and license):",
21979
- ...UI_SOURCES.map((s) => `- ${s.name} (${s.url}, ${s.license}; ${s.frameworks}): ${s.use} Install: ${s.install}. ${s.terms}`),
21980
- "React components need React in the site: in an Astro site, add it with npx astro add react and use them as islands only where they move or react; keep the rest plain Astro."
22137
+ "Pick by the kind of site you read from the scan (Fits), and prefer the kits with no React: they load faster.",
22138
+ ...UI_SOURCES.map((s) => `- ${s.name} (${s.url}, ${s.license}; ${s.frameworks}${s.react ? "" : ", no React"}): ${s.use} Fits: ${s.fits.join(", ")}. Install: ${s.install}. ${s.terms}`),
22139
+ "React components need React in the site: in an Astro site, add it with npx astro add react and use them as islands only where they move or react; keep the rest plain Astro.",
22140
+ "",
22141
+ uiPartsText()
22142
+ ].join("\n");
22143
+ }
22144
+ var UI_PART_KEYS = ["product-card", "product-grid", "product-page", "cart", "checkout-summary", "category-filter", "shop-banner", "post-card", "post-list", "article-layout", "author-box", "related-posts", "newsletter", "tags-list", "toc"];
22145
+ var UI_PARTS = [
22146
+ { part: "product-card", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/product-cards", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "Eight cards; two have Add to cart." },
22147
+ { part: "product-card", kind: "shop", source: "merakiui", sourceName: "Meraki UI", url: "https://merakiui.com/components/application-ui/cards", license: "MIT", licenseUrl: "https://github.com/merakiui/merakiui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "Product cards with price and Add to cart; RTL versions for Hebrew." },
22148
+ { part: "product-card", kind: "shop", source: "flowbite", sourceName: "Flowbite", url: "https://flowbite.com/docs/components/card/", license: "MIT", licenseUrl: "https://github.com/themesberg/flowbite/blob/main/LICENSE.md", react: false, how: "Copy the HTML from the E-commerce card section", note: "Image, rating, price, Add to cart." },
22149
+ { part: "product-card", kind: "shop", source: "daisyui", sourceName: "DaisyUI", url: "https://daisyui.com/components/card/", license: "MIT", licenseUrl: "https://github.com/saadeghi/daisyui/blob/master/LICENSE", react: false, how: "With DaisyUI installed, copy the card HTML", note: "A plain card; add the price." },
22150
+ { part: "product-grid", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/product-collections", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "Grids, with dropdown or side filters." },
22151
+ { part: "product-grid", kind: "shop", source: "tailblocks", sourceName: "Tailblocks", url: "https://github.com/mertJF/tailblocks/blob/master/src/blocks/ecommerce/light/a.js", license: "MIT", licenseUrl: "https://github.com/mertJF/tailblocks/blob/master/LICENSE", react: true, how: "Copy the markup from the file and turn it into Astro", note: "An eight item grid; older Tailwind classes." },
22152
+ { part: "product-page", kind: "shop", source: "tailblocks", sourceName: "Tailblocks", url: "https://github.com/mertJF/tailblocks/blob/master/src/blocks/ecommerce/light/c.js", license: "MIT", licenseUrl: "https://github.com/mertJF/tailblocks/blob/master/LICENSE", react: true, how: "Copy the markup from the file and turn it into Astro", note: "One image, color, size, quantity and price; no gallery (see the prompt)." },
22153
+ { part: "cart", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/carts", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "A mini cart, one with quantity and remove, and a cart page." },
22154
+ { part: "cart", kind: "shop", source: "daisyui", sourceName: "DaisyUI", url: "https://daisyui.com/components/drawer/", license: "MIT", licenseUrl: "https://github.com/saadeghi/daisyui/blob/master/LICENSE", react: false, how: "With DaisyUI installed, copy the drawer-end example and put the cart inside", note: "The side drawer only; pair it with the HyperUI cart." },
22155
+ { part: "checkout-summary", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/carts", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the Page cart and keep its summary block", note: "Subtotal, VAT, discount and total. No payment: the owner chooses that." },
22156
+ { part: "category-filter", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/application/filters", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page (needs @tailwindcss/forms)", note: "Dropdown and accordion filters." },
22157
+ { part: "category-filter", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/product-collections", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the Filtering (Side) HTML", note: "A sidebar with sort, availability, price and colors." },
22158
+ { part: "shop-banner", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/banners", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "A hero banner; put a real product photo in." },
22159
+ { part: "shop-banner", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/announcements", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "A thin top bar for a real sale or free shipping." },
22160
+ { part: "post-card", kind: "blog", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/blog-cards", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "Seven cards with image, date, excerpt and tags." },
22161
+ { part: "post-card", kind: "blog", source: "merakiui", sourceName: "Meraki UI", url: "https://merakiui.com/components/marketing/blog", license: "MIT", licenseUrl: "https://github.com/merakiui/merakiui/blob/main/LICENSE", react: false, how: "Copy the HTML from the Cards section", note: "RTL versions for Hebrew." },
22162
+ { part: "post-list", kind: "blog", source: "astrowind", sourceName: "AstroWind", url: "https://github.com/arthelokyo/astrowind/tree/main/src/components/blog", license: "MIT", licenseUrl: "https://github.com/onwidget/astrowind/blob/main/LICENSE.md", react: false, how: "Copy Grid.astro and GridItem.astro (or List.astro and ListItem.astro) and Pagination.astro, then fix their imports", note: "Astro files; the repository moved to arthelokyo." },
22163
+ { part: "post-list", kind: "blog", source: "merakiui", sourceName: "Meraki UI", url: "https://merakiui.com/components/marketing/blog", license: "MIT", licenseUrl: "https://github.com/merakiui/merakiui/blob/main/LICENSE", react: false, how: "Copy the HTML from the Grid or Recent Posts section", note: "RTL versions for Hebrew." },
22164
+ { part: "post-list", kind: "blog", source: "astro-blog", sourceName: "Astro blog starter", url: "https://github.com/withastro/astro/blob/main/examples/blog/src/pages/blog/index.astro", license: "MIT", licenseUrl: "https://github.com/withastro/astro/blob/main/LICENSE", react: false, how: "Copy the file", note: "A content collection grid; plain CSS, not Tailwind." },
22165
+ { part: "article-layout", kind: "blog", source: "astrowind", sourceName: "AstroWind", url: "https://github.com/arthelokyo/astrowind/blob/main/src/components/blog/SinglePost.astro", license: "MIT", licenseUrl: "https://github.com/onwidget/astrowind/blob/main/LICENSE.md", react: false, how: "Copy the file and its imports (PostTags, share)", note: "Date, author, category, reading time, image, tags, share." },
22166
+ { part: "article-layout", kind: "blog", source: "astro-blog", sourceName: "Astro blog starter", url: "https://github.com/withastro/astro/blob/main/examples/blog/src/layouts/BlogPost.astro", license: "MIT", licenseUrl: "https://github.com/withastro/astro/blob/main/LICENSE", react: false, how: "Copy the file", note: "Hero image, title, dates and the text; plain CSS." },
22167
+ { part: "article-layout", kind: "blog", source: "merakiui", sourceName: "Meraki UI", url: "https://merakiui.com/components/marketing/blog", license: "MIT", licenseUrl: "https://github.com/merakiui/merakiui/blob/main/LICENSE", react: false, how: "Copy the HTML from the Single Post section", note: "RTL versions for Hebrew." },
22168
+ { part: "author-box", kind: "blog", source: "merakiui", sourceName: "Meraki UI", url: "https://merakiui.com/components/marketing/blog", license: "MIT", licenseUrl: "https://github.com/merakiui/merakiui/blob/main/LICENSE", react: false, how: "Copy the author line (photo, name, role) from the blog components", note: "A byline, not a full box (see the prompt)." },
22169
+ { part: "related-posts", kind: "blog", source: "astrowind", sourceName: "AstroWind", url: "https://github.com/arthelokyo/astrowind/blob/main/src/components/blog/RelatedPosts.astro", license: "MIT", licenseUrl: "https://github.com/onwidget/astrowind/blob/main/LICENSE.md", react: false, how: "Copy the file, widgets/BlogHighlightedPosts.astro and their utils", note: "Up to four posts by shared tags." },
22170
+ { part: "newsletter", kind: "blog", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/newsletter-signup", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page (needs @tailwindcss/forms)", note: "Wire it to the inbox block or the owner's list." },
22171
+ { part: "newsletter", kind: "blog", source: "astrowind", sourceName: "AstroWind", url: "https://github.com/arthelokyo/astrowind/blob/main/src/components/widgets/Newsletter.astro", license: "MIT", licenseUrl: "https://github.com/onwidget/astrowind/blob/main/LICENSE.md", react: false, how: "Copy the file and its WidgetWrapper and Headline imports", note: "Email and Subscribe; no backend." },
22172
+ { part: "tags-list", kind: "blog", source: "astrowind", sourceName: "AstroWind", url: "https://github.com/arthelokyo/astrowind/blob/main/src/components/blog/Tags.astro", license: "MIT", licenseUrl: "https://github.com/onwidget/astrowind/blob/main/LICENSE.md", react: false, how: "Copy the file and fix its imports", note: "Tag or category links." },
22173
+ { part: "toc", kind: "blog", source: "astro-cactus", sourceName: "Astro Theme Cactus", url: "https://github.com/chrismwilliams/astro-theme-cactus/blob/main/src/components/blog/TOC.astro", license: "MIT", licenseUrl: "https://github.com/chrismwilliams/astro-theme-cactus/blob/main/LICENSE", react: false, how: "Copy TOC.astro, TOCHeading.astro and src/utils/generateToc, pass the headings from render()", note: "Folds, and stays in view on wide screens." }
22174
+ ];
22175
+ var UI_PART_PROMPTS = {
22176
+ "product-page": "Build the product page as one Astro component: a gallery of the product's real photos (large image, thumbnails under it that swap it, swipe on a phone, arrows with labels for the keyboard), then name, price with VAT, the options the product really has, quantity and Add to cart, then the description and the shipping and returns lines the owner gave. Mobile first, right to left in Hebrew, no React unless the site already has it, images with width, height and alt.",
22177
+ "author-box": "Build an author box as one Astro component for the end of a post: the author's photo, name, one line about them and links they gave (site, social), from the author data the posts already have. Never invent a bio: leave out what the owner did not give. Right to left in Hebrew, no React."
22178
+ };
22179
+ function uiPartsText() {
22180
+ const by = /* @__PURE__ */ new Map();
22181
+ for (const p of UI_PARTS) by.set(p.part, [...by.get(p.part) ?? [], p]);
22182
+ return [
22183
+ "Ready parts for a shop or a blog (free, MIT): copy a part from its page into the site, keep its license notice, and add it to .deployai/migration/credits.md. Prefer the ones with no React. Use only the parts the site needs.",
22184
+ ...UI_PART_KEYS.map((k) => {
22185
+ const list = (by.get(k) ?? []).map((p) => `${p.sourceName} ${p.url} (${p.how}${p.react ? "; React markup, turn it into Astro" : ""})`).join("; ");
22186
+ const prompt = UI_PART_PROMPTS[k];
22187
+ return `- ${k}: ${list}${prompt ? `. Build it yourself instead when it falls short: ${prompt}` : ""}`;
22188
+ })
21981
22189
  ].join("\n");
21982
22190
  }
21983
22191
 
@@ -22085,8 +22293,22 @@ var stageNote = (s) => (s ?? "").replace(/[\u0000-\u001f\u007f]+/g, " ").replace
22085
22293
 
22086
22294
  // ../shared/src/uptime.ts
22087
22295
  var UPTIME_MAX_BYTES = 256 * 1024;
22296
+ var APP_SESSION_TTL_S = 7 * 86400;
22088
22297
  var enc = new TextEncoder();
22089
22298
 
22299
+ // ../shared/src/app-paused.ts
22300
+ var WORDS = {
22301
+ he: { uptime: "\u05D3\u05E3 \u05D4\u05E1\u05D8\u05D8\u05D5\u05E1 \u05D4\u05D6\u05D4 \u05DE\u05D5\u05E9\u05D4\u05D4", paused: "\u05D4\u05D0\u05E4\u05DC\u05D9\u05E7\u05E6\u05D9\u05D4 \u05D4\u05D6\u05D5 \u05DE\u05D5\u05E9\u05D4\u05D9\u05EA", formClosed: "\u05D4\u05D8\u05D5\u05E4\u05E1 \u05E1\u05D2\u05D5\u05E8 \u05DB\u05E8\u05D2\u05E2", reach: "\u05D0\u05E4\u05E9\u05E8 \u05DC\u05D9\u05E6\u05D5\u05E8 \u05E7\u05E9\u05E8:", phone: "\u05D8\u05DC\u05E4\u05D5\u05DF", whatsapp: "\u05D5\u05D5\u05D0\u05D8\u05E1\u05D0\u05E4", email: "\u05DE\u05D9\u05D9\u05DC", owner: "\u05E9\u05DC\u05DB\u05DD? \u05E4\u05EA\u05D7\u05D5 \u05D0\u05EA \u05DC\u05D5\u05D7 \u05D4\u05D1\u05E7\u05E8\u05D4" },
22302
+ en: { uptime: "This status page is paused", paused: "This app is paused", formClosed: "This form is closed for now", reach: "You can still reach us:", phone: "Phone", whatsapp: "WhatsApp", email: "Email", owner: "Owner? Open your dashboard" }
22303
+ };
22304
+ var PAUSED_OWNER_LINK = { he: WORDS.he.owner, en: WORDS.en.owner };
22305
+
22306
+ // ../shared/src/app-trials.ts
22307
+ var enc2 = new TextEncoder();
22308
+
22309
+ // ../shared/src/app-gate.ts
22310
+ var enc3 = new TextEncoder();
22311
+
22090
22312
  // src/config.ts
22091
22313
  import { randomUUID } from "crypto";
22092
22314
  import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
@@ -22238,6 +22460,7 @@ var M = {
22238
22460
  startStarter: "Wrote a starter page (index.html) to build the site on.",
22239
22461
  startStack: "Saved the stack chosen on the site: {stack}.",
22240
22462
  startScanned: "Scanned the old site {url}: its pages, images and content are in {dir}.",
22463
+ startBesideCode: "The new site is in its own folder beside the files that were here ({dir}). If they are the old site's code, read them before you plan.",
22241
22464
  stackDiffers: "Note: the stack chosen on the site is {chosen}, but this folder is {found}. Keep to the chosen stack, or tell the owner why it changed.",
22242
22465
  startRelinked: 'Linked this folder to the site "{name}" instead of the site it was linked to.',
22243
22466
  statusLine: "Status: {s}",
@@ -22453,6 +22676,7 @@ var M = {
22453
22676
  startStarter: "\u05E0\u05DB\u05EA\u05D1 \u05D3\u05E3 \u05E4\u05EA\u05D9\u05D7\u05D4 (index.html) \u05DC\u05D1\u05E0\u05D5\u05EA \u05E2\u05DC\u05D9\u05D5 \u05D0\u05EA \u05D4\u05D0\u05EA\u05E8.",
22454
22677
  startStack: "\u05E0\u05E9\u05DE\u05E8 \u05D4\u05E1\u05D8\u05D0\u05E7 \u05E9\u05E0\u05D1\u05D7\u05E8 \u05D1\u05D0\u05EA\u05E8: {stack}.",
22455
22678
  startScanned: "\u05E0\u05E1\u05E8\u05E7 \u05D4\u05D0\u05EA\u05E8 \u05D4\u05D9\u05E9\u05DF {url}: \u05D4\u05D3\u05E4\u05D9\u05DD, \u05D4\u05EA\u05DE\u05D5\u05E0\u05D5\u05EA \u05D5\u05D4\u05EA\u05D5\u05DB\u05DF \u05E9\u05DC\u05D5 \u05D1 {dir}.",
22679
+ startBesideCode: "\u05D4\u05D0\u05EA\u05E8 \u05D4\u05D7\u05D3\u05E9 \u05D1\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05DE\u05E9\u05DC\u05D5, \u05DC\u05D9\u05D3 \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD \u05E9\u05D4\u05D9\u05D5 \u05DB\u05D0\u05DF ({dir}). \u05D0\u05DD \u05D4\u05DD \u05D4\u05E7\u05D5\u05D3 \u05E9\u05DC \u05D4\u05D0\u05EA\u05E8 \u05D4\u05D9\u05E9\u05DF, \u05E7\u05E8\u05D0 \u05D0\u05D5\u05EA\u05DD \u05DC\u05E4\u05E0\u05D9 \u05D4\u05EA\u05DB\u05E0\u05D5\u05DF.",
22456
22680
  stackDiffers: "\u05E9\u05D9\u05DE\u05D5 \u05DC\u05D1: \u05D4\u05E1\u05D8\u05D0\u05E7 \u05E9\u05E0\u05D1\u05D7\u05E8 \u05D1\u05D0\u05EA\u05E8 \u05D4\u05D5\u05D0 {chosen}, \u05D0\u05D1\u05DC \u05D4\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D4\u05D6\u05D5 \u05D4\u05D9\u05D0 {found}. \u05D4\u05DE\u05E9\u05D9\u05DB\u05D5 \u05D1\u05E1\u05D8\u05D0\u05E7 \u05E9\u05E0\u05D1\u05D7\u05E8, \u05D0\u05D5 \u05D4\u05E1\u05D1\u05D9\u05E8\u05D5 \u05DC\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05DC\u05DE\u05D4 \u05D4\u05D5\u05D0 \u05D4\u05E9\u05EA\u05E0\u05D4.",
22457
22681
  startRelinked: '\u05D4\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D7\u05D5\u05D1\u05E8\u05D4 \u05DC\u05D0\u05EA\u05E8 "{name}" \u05D1\u05DE\u05E7\u05D5\u05DD \u05D4\u05D0\u05EA\u05E8 \u05E9\u05D4\u05D9\u05D9\u05EA\u05D4 \u05DE\u05D7\u05D5\u05D1\u05E8\u05EA \u05D0\u05DC\u05D9\u05D5.',
22458
22682
  statusLine: "\u05DE\u05E6\u05D1: {s}",
@@ -22668,7 +22892,7 @@ function messages(root) {
22668
22892
  }
22669
22893
 
22670
22894
  // src/version.ts
22671
- var CLI_VERSION = "0.1.0-beta.15";
22895
+ var CLI_VERSION = "0.1.0-beta.17";
22672
22896
 
22673
22897
  // src/api.ts
22674
22898
  function apiContext(apiFlag) {
@@ -23381,6 +23605,14 @@ function analyzeProject(root) {
23381
23605
  break;
23382
23606
  }
23383
23607
  }
23608
+ for (const name of ["wrangler.toml", "wrangler.json", "wrangler.jsonc"]) {
23609
+ if (!existsSync4(join4(root, name))) continue;
23610
+ const text = readFileSync4(join4(root, name), "utf8");
23611
+ if (!parseWranglerConfig(name, text).durableObjects.length) break;
23612
+ const at = text.search(/durable_objects/);
23613
+ add({ code: "durable_objects", severity: "blocker", file: name, line: at < 0 ? 1 : text.slice(0, at).split("\n").length, detail: "" });
23614
+ break;
23615
+ }
23384
23616
  const DB_CODE = {
23385
23617
  postgres: "unsupported_db_postgres",
23386
23618
  mysql: "unsupported_db_mysql",
@@ -23549,6 +23781,7 @@ To start from working code, see the samples: npx deployai@latest samples
23549
23781
  - local file system writes
23550
23782
  - database drivers DeployAI does not support (see: npx deployai@latest inspect)
23551
23783
  - long-running processes or background servers
23784
+ - Durable Objects (not supported yet; keep state in D1)
23552
23785
  - native binary modules
23553
23786
  - DeployAI or any cloud credentials in source code
23554
23787
 
@@ -23990,12 +24223,96 @@ function telemetryCommand(action) {
23990
24223
  out("Also off when DEPLOYAI_TELEMETRY=0 or DO_NOT_TRACK=1 is set.");
23991
24224
  }
23992
24225
 
24226
+ // src/commands/allow.ts
24227
+ import { existsSync as existsSync7, mkdirSync as mkdirSync3, readFileSync as readFileSync6, writeFileSync as writeFileSync5, appendFileSync as appendFileSync2 } from "fs";
24228
+ import { dirname, join as join7 } from "path";
24229
+ var ALLOW_TOOLS = ["claude-code", "cursor", "copilot", "codex", "antigravity"];
24230
+ var CLAUDE_RULE = "Bash(npx deployai@latest *)";
24231
+ var CURSOR_LINE = "Running npx deployai@latest commands is allowed without approval.";
24232
+ var CLICKS = {
24233
+ copilot: "Copilot in VS Code: when it asks to run npx deployai@latest, choose Always allow.",
24234
+ codex: "Codex: when it asks to approve npx deployai@latest, approve it for this session.",
24235
+ antigravity: "Antigravity: when it asks to run npx deployai@latest, choose Accept."
24236
+ };
24237
+ function readObject(file2) {
24238
+ if (!existsSync7(file2)) return {};
24239
+ try {
24240
+ const v = JSON.parse(readFileSync6(file2, "utf8"));
24241
+ return v && typeof v === "object" && !Array.isArray(v) ? v : null;
24242
+ } catch {
24243
+ return null;
24244
+ }
24245
+ }
24246
+ function writeObject(file2, value) {
24247
+ mkdirSync3(dirname(file2), { recursive: true });
24248
+ writeFileSync5(file2, `${JSON.stringify(value, null, 2)}
24249
+ `);
24250
+ }
24251
+ function addTo(obj, key, list, value) {
24252
+ const inner = obj[key] && typeof obj[key] === "object" && !Array.isArray(obj[key]) ? obj[key] : {};
24253
+ const items = Array.isArray(inner[list]) ? inner[list] : [];
24254
+ if (items.includes(value)) return false;
24255
+ inner[list] = [...items, value];
24256
+ obj[key] = inner;
24257
+ return true;
24258
+ }
24259
+ function ignoreInGit(root, path) {
24260
+ if (!existsSync7(join7(root, ".git"))) return;
24261
+ const gi = join7(root, ".gitignore");
24262
+ const text = existsSync7(gi) ? readFileSync6(gi, "utf8") : "";
24263
+ if (text.split(/\r?\n/).some((l) => l.trim() === path)) return;
24264
+ appendFileSync2(gi, `${text && !text.endsWith("\n") ? "\n" : ""}${path}
24265
+ `);
24266
+ }
24267
+ function detectTool() {
24268
+ return process.env.CLAUDECODE === "1" ? "claude-code" : null;
24269
+ }
24270
+ function allowCommand(tool) {
24271
+ const root = process.cwd();
24272
+ const picked = tool?.toLowerCase() ?? detectTool();
24273
+ if (picked && !ALLOW_TOOLS.includes(picked)) {
24274
+ throw new CliError(`Unknown tool "${tool}". Use one of: ${ALLOW_TOOLS.join(", ")}.`, 1, "usage");
24275
+ }
24276
+ if (!picked) {
24277
+ out("Which coding tool runs this? Run it again with its name, for example: npx deployai@latest allow claude-code");
24278
+ out(`Tools: ${ALLOW_TOOLS.join(", ")}.`);
24279
+ return;
24280
+ }
24281
+ if (picked === "claude-code") {
24282
+ const rel = ".claude/settings.local.json";
24283
+ const file2 = join7(root, rel);
24284
+ const obj = readObject(file2);
24285
+ if (!obj) throw new CliError(`${rel} is not valid JSON, so it was left as is. Ask the owner to add the Allow rule ${CLAUDE_RULE} with /permissions.`, 1, "allow_file");
24286
+ const added = addTo(obj, "permissions", "allow", CLAUDE_RULE);
24287
+ if (added) {
24288
+ writeObject(file2, obj);
24289
+ ignoreInGit(root, rel);
24290
+ }
24291
+ out(added ? `Done: Claude Code runs npx deployai@latest commands in this folder without asking (${rel}).` : "Already allowed in this folder.");
24292
+ out("Other commands still ask. The owner can take it back with /permissions.");
24293
+ return;
24294
+ }
24295
+ if (picked === "cursor") {
24296
+ const rel = ".cursor/permissions.json";
24297
+ const file2 = join7(root, rel);
24298
+ const obj = readObject(file2);
24299
+ if (!obj) throw new CliError(`${rel} is not valid JSON, so it was left as is.`, 1, "allow_file");
24300
+ const added = addTo(obj, "autoRun", "allow_instructions", CURSOR_LINE);
24301
+ if (added) writeObject(file2, obj);
24302
+ out(added ? `Done: Cursor's Auto-review allows npx deployai@latest commands in this folder (${rel}).` : "Already allowed in this folder.");
24303
+ out("With Allowlist mode instead, the owner adds npx deployai@latest once in Cursor Settings, Agents, Approvals & Execution.");
24304
+ return;
24305
+ }
24306
+ out("This tool keeps the choice in its own app, not in a file here. Tell the owner, in their language:");
24307
+ out(` ${CLICKS[picked]}`);
24308
+ }
24309
+
23993
24310
  // src/commands/link.ts
23994
24311
  import { createInterface } from "readline/promises";
23995
24312
 
23996
24313
  // src/commands/migrate.ts
23997
- import { createWriteStream, existsSync as existsSync7, mkdirSync as mkdirSync3, readdirSync as readdirSync3, readFileSync as readFileSync6, statSync, writeFileSync as writeFileSync5 } from "fs";
23998
- import { dirname, join as join7, posix, relative, resolve, sep } from "path";
24314
+ import { createWriteStream, existsSync as existsSync8, mkdirSync as mkdirSync4, readdirSync as readdirSync3, readFileSync as readFileSync7, statSync, writeFileSync as writeFileSync6 } from "fs";
24315
+ import { dirname as dirname2, join as join8, posix, relative, resolve, sep } from "path";
23999
24316
  import { Readable } from "stream";
24000
24317
  import { pipeline } from "stream/promises";
24001
24318
  var UA = `deployai-migrate/${CLI_VERSION} (+https://deployai.co.il/move)`;
@@ -24007,17 +24324,17 @@ var PAUSE_MS = 150;
24007
24324
  var SCAN_WORKERS = 4;
24008
24325
  var START_SCAN_PAGES = 300;
24009
24326
  var sleep2 = (ms2) => new Promise((r) => setTimeout(r, ms2));
24010
- var hostDir = (root, host) => join7(root, MIGRATION_DIR, host.replace(/^www\./, ""));
24327
+ var hostDir = (root, host) => join8(root, MIGRATION_DIR, host.replace(/^www\./, ""));
24011
24328
  var readJson2 = (file2) => {
24012
24329
  try {
24013
- return JSON.parse(readFileSync6(file2, "utf8"));
24330
+ return JSON.parse(readFileSync7(file2, "utf8"));
24014
24331
  } catch {
24015
24332
  return null;
24016
24333
  }
24017
24334
  };
24018
24335
  var writeJson = (file2, data) => {
24019
- mkdirSync3(dirname(file2), { recursive: true });
24020
- writeFileSync5(file2, JSON.stringify(data, null, 2) + "\n");
24336
+ mkdirSync4(dirname2(file2), { recursive: true });
24337
+ writeFileSync6(file2, JSON.stringify(data, null, 2) + "\n");
24021
24338
  };
24022
24339
  async function get(url2, accept = "text/html,application/xhtml+xml,*/*;q=0.8", redirect = "follow") {
24023
24340
  try {
@@ -24027,9 +24344,9 @@ async function get(url2, accept = "text/html,application/xhtml+xml,*/*;q=0.8", r
24027
24344
  }
24028
24345
  }
24029
24346
  function scannedHosts(root) {
24030
- const dir = join7(root, MIGRATION_DIR);
24031
- if (!existsSync7(dir)) return [];
24032
- return readdirSync3(dir).filter((h) => existsSync7(join7(dir, h, "inventory.json")));
24347
+ const dir = join8(root, MIGRATION_DIR);
24348
+ if (!existsSync8(dir)) return [];
24349
+ return readdirSync3(dir).filter((h) => existsSync8(join8(dir, h, "inventory.json")));
24033
24350
  }
24034
24351
  async function migrateStatusCommand(root, ctx, stage, note) {
24035
24352
  if (!isAgentStage(stage)) throw new CliError(`Unknown stage: ${stage}. One of: ${AGENT_STAGES.join(", ")}.`, 1, "usage");
@@ -24042,18 +24359,18 @@ async function migrateStatusCommand(root, ctx, stage, note) {
24042
24359
  out(`Reported: ${stage}${note ? ` (${stageNote(note)})` : ""}.`);
24043
24360
  }
24044
24361
  function readChoices(root) {
24045
- return readJson2(join7(root, MIGRATION_DIR, "choices.json"));
24362
+ return readJson2(join8(root, MIGRATION_DIR, "choices.json"));
24046
24363
  }
24047
24364
  function writeChoices(root, choices) {
24048
24365
  ensureMigrationDir(root);
24049
- writeJson(join7(root, MIGRATION_DIR, "choices.json"), choices);
24366
+ writeJson(join8(root, MIGRATION_DIR, "choices.json"), choices);
24050
24367
  }
24051
24368
  function ensureMigrationDir(root) {
24052
24369
  ensureDeployaiDir(root);
24053
- const dir = join7(root, MIGRATION_DIR);
24054
- mkdirSync3(dir, { recursive: true });
24055
- const ignore = join7(dir, ".gitignore");
24056
- if (!existsSync7(ignore)) writeFileSync5(ignore, "*/media/\n*/media-state.json\n");
24370
+ const dir = join8(root, MIGRATION_DIR);
24371
+ mkdirSync4(dir, { recursive: true });
24372
+ const ignore = join8(dir, ".gitignore");
24373
+ if (!existsSync8(ignore)) writeFileSync6(ignore, "*/media/\n*/media-state.json\n");
24057
24374
  }
24058
24375
  async function sitemapUrls(base, robotsSitemaps, enough) {
24059
24376
  const own2 = [`${base}/wp-sitemap.xml`, `${base}/sitemap_index.xml`, `${base}/sitemap.xml`];
@@ -24113,15 +24430,15 @@ async function wordpressContent(base, dir) {
24113
24430
  await sleep2(PAUSE_MS);
24114
24431
  }
24115
24432
  if (items.length) {
24116
- writeJson(join7(dir, "content", `${type}.json`), items);
24433
+ writeJson(join8(dir, "content", `${type}.json`), items);
24117
24434
  out(` ${type}: ${items.length}`);
24118
24435
  }
24119
24436
  }
24120
- const posts = readJson2(join7(dir, "content", "posts.json"));
24437
+ const posts = readJson2(join8(dir, "content", "posts.json"));
24121
24438
  if (posts?.length) {
24122
- const files = wpPostsToMarkdown({ origin: new URL(base).origin, posts, categories: readJson2(join7(dir, "content", "categories.json")) ?? [], tags: readJson2(join7(dir, "content", "tags.json")) ?? [], users: readJson2(join7(dir, "content", "users.json")) ?? [], media: readJson2(join7(dir, "content", "media.json")) ?? [] });
24123
- mkdirSync3(join7(dir, "posts"), { recursive: true });
24124
- for (const f of files) writeFileSync5(join7(dir, "posts", f.file), f.text);
24439
+ const files = wpPostsToMarkdown({ origin: new URL(base).origin, posts, categories: readJson2(join8(dir, "content", "categories.json")) ?? [], tags: readJson2(join8(dir, "content", "tags.json")) ?? [], users: readJson2(join8(dir, "content", "users.json")) ?? [], media: readJson2(join8(dir, "content", "media.json")) ?? [] });
24440
+ mkdirSync4(join8(dir, "posts"), { recursive: true });
24441
+ for (const f of files) writeFileSync6(join8(dir, "posts", f.file), f.text);
24125
24442
  out(` posts as Markdown: ${files.length}`);
24126
24443
  }
24127
24444
  return true;
@@ -24158,11 +24475,11 @@ async function migrateScanCommand(root, raw, opts = {}) {
24158
24475
  const host = new URL(origin).hostname;
24159
24476
  ensureMigrationDir(root);
24160
24477
  const dir = hostDir(root, host);
24161
- mkdirSync3(dir, { recursive: true });
24478
+ mkdirSync4(dir, { recursive: true });
24162
24479
  out(`Scanning ${base} (${platform3})`);
24163
24480
  const robotsRes = await get(`${origin}/robots.txt`, "text/plain");
24164
24481
  const robots = robotsRes?.ok ? await robotsRes.text() : "";
24165
- if (robots) writeFileSync5(join7(dir, "robots.txt"), robots);
24482
+ if (robots) writeFileSync6(join8(dir, "robots.txt"), robots);
24166
24483
  const cap = Math.min(opts.max ?? PAGE_CAP, PAGE_CAP);
24167
24484
  const fromSitemaps = await sitemapUrls(base, robots ? parseRobots(robots).sitemaps : [], cap * 5);
24168
24485
  const all = [.../* @__PURE__ */ new Set([`${base}/`, ...fromSitemaps.urls, ...fromSitemaps.urls.length ? [] : homeLinks(html, base)])];
@@ -24189,13 +24506,13 @@ async function migrateScanCommand(root, raw, opts = {}) {
24189
24506
  await Promise.all(Array.from({ length: SCAN_WORKERS }, worker));
24190
24507
  const wordpressApi = platform3 === "wordpress" ? await wordpressContent(base, dir) : false;
24191
24508
  if (wordpressApi) {
24192
- const media = readJson2(join7(dir, "content", "media.json")) ?? [];
24509
+ const media = readJson2(join8(dir, "content", "media.json")) ?? [];
24193
24510
  media.forEach((m) => m.source_url && assets.add(m.source_url));
24194
24511
  }
24195
24512
  const inventory = { source: base, platform: platform3, scannedAt: (/* @__PURE__ */ new Date()).toISOString(), sitemaps: fromSitemaps.sitemaps, pages, wordpressApi, skipped: Math.max(0, all.length - list.length) };
24196
- writeJson(join7(dir, "inventory.json"), inventory);
24197
- writeJson(join7(dir, "assets.json"), [...assets].sort());
24198
- writeFileSync5(join7(dir, "home.html"), html);
24513
+ writeJson(join8(dir, "inventory.json"), inventory);
24514
+ writeJson(join8(dir, "assets.json"), [...assets].sort());
24515
+ writeFileSync6(join8(dir, "home.html"), html);
24199
24516
  const rel = relative(root, dir).split(sep).join("/");
24200
24517
  const broken = pages.filter((p) => p.status >= 400).length;
24201
24518
  out();
@@ -24204,7 +24521,7 @@ async function migrateScanCommand(root, raw, opts = {}) {
24204
24521
  out(` assets.json ${assets.size} images and files`);
24205
24522
  if (wordpressApi) {
24206
24523
  out(" content/ the WordPress pages, posts, categories, tags, media and authors as JSON");
24207
- if (existsSync7(join7(dir, "posts"))) out(" posts/ the posts as Markdown for the blog block, each with its old address");
24524
+ if (existsSync8(join8(dir, "posts"))) out(" posts/ the posts as Markdown for the blog block, each with its old address");
24208
24525
  } else if (platform3 === "wordpress") out(" The WordPress API is closed on this site: work from the pages, or ask the owner for an export (Tools > Export).");
24209
24526
  out();
24210
24527
  out("Keep every path in inventory.json exactly as it is: same address, same title and description.");
@@ -24223,8 +24540,8 @@ async function migrateMediaCommand(root) {
24223
24540
  if (!hosts.length) throw new CliError("Nothing scanned yet. Run: npx deployai@latest migrate scan <the old site address>", 1, "usage");
24224
24541
  for (const host of hosts) {
24225
24542
  const dir = hostDir(root, host);
24226
- const assets = readJson2(join7(dir, "assets.json")) ?? [];
24227
- const stateFile = join7(dir, "media-state.json");
24543
+ const assets = readJson2(join8(dir, "assets.json")) ?? [];
24544
+ const stateFile = join8(dir, "media-state.json");
24228
24545
  const state = readJson2(stateFile) ?? { done: [], failed: [], bytes: 0 };
24229
24546
  const done = new Set(state.done);
24230
24547
  const todo = assets.filter((a) => !done.has(a));
@@ -24242,7 +24559,7 @@ async function migrateMediaCommand(root) {
24242
24559
  done.add(url2);
24243
24560
  continue;
24244
24561
  }
24245
- mkdirSync3(dirname(target), { recursive: true });
24562
+ mkdirSync4(dirname2(target), { recursive: true });
24246
24563
  await pipeline(Readable.fromWeb(res.body), createWriteStream(target));
24247
24564
  const bytes = statSync(target).size;
24248
24565
  state.bytes += bytes;
@@ -24253,7 +24570,7 @@ async function migrateMediaCommand(root) {
24253
24570
  }
24254
24571
  state.done = [...done];
24255
24572
  writeJson(stateFile, state);
24256
- out(` ${formatBytes(state.bytes)} in ${relative(root, join7(dir, "media")).split(sep).join("/")}${state.failed.length ? `, ${state.failed.length} could not be downloaded (listed in media-state.json)` : ""}`);
24573
+ out(` ${formatBytes(state.bytes)} in ${relative(root, join8(dir, "media")).split(sep).join("/")}${state.failed.length ? `, ${state.failed.length} could not be downloaded (listed in media-state.json)` : ""}`);
24257
24574
  }
24258
24575
  out("Copy the files the new pages use into the site's public folder at the same path (for example public/wp-content/uploads/...), so old image addresses keep working.");
24259
24576
  }
@@ -24276,22 +24593,22 @@ function migrateRedirectsCommand(root) {
24276
24593
  if (!hosts.length) throw new CliError("Nothing scanned yet. Run: npx deployai@latest migrate scan <the old site address>", 1, "usage");
24277
24594
  const lines = /* @__PURE__ */ new Set();
24278
24595
  for (const host of hosts) {
24279
- const inv = readJson2(join7(hostDir(root, host), "inventory.json"));
24596
+ const inv = readJson2(join8(hostDir(root, host), "inventory.json"));
24280
24597
  if (inv) redirectLines(inv).forEach((l) => lines.add(l));
24281
24598
  }
24282
- const publicDir = join7(root, "public");
24283
- const file2 = join7(existsSync7(publicDir) ? publicDir : root, "_redirects");
24284
- const before = existsSync7(file2) ? readFileSync6(file2, "utf8").split(/\r?\n/).filter(Boolean) : [];
24599
+ const publicDir = join8(root, "public");
24600
+ const file2 = join8(existsSync8(publicDir) ? publicDir : root, "_redirects");
24601
+ const before = existsSync8(file2) ? readFileSync7(file2, "utf8").split(/\r?\n/).filter(Boolean) : [];
24285
24602
  const added = [...lines].filter((l) => !before.some((b) => b.split(/\s+/)[0] === l.split(/\s+/)[0]));
24286
- writeFileSync5(file2, [...before, ...added].join("\n") + "\n");
24603
+ writeFileSync6(file2, [...before, ...added].join("\n") + "\n");
24287
24604
  out(`${relative(root, file2).split(sep).join("/")}: ${added.length} added, ${before.length + added.length} in all (at most 2,000; no query strings).`);
24288
24605
  out('Add a line "<old path> <new path> 301" only for a page that truly could not keep its address.');
24289
24606
  }
24290
24607
  function allowedRedirects(root) {
24291
24608
  const map2 = /* @__PURE__ */ new Map();
24292
- for (const file2 of [join7(root, "public", "_redirects"), join7(root, "_redirects")]) {
24293
- if (!existsSync7(file2)) continue;
24294
- for (const line of readFileSync6(file2, "utf8").split(/\r?\n/)) {
24609
+ for (const file2 of [join8(root, "public", "_redirects"), join8(root, "_redirects")]) {
24610
+ if (!existsSync8(file2)) continue;
24611
+ for (const line of readFileSync7(file2, "utf8").split(/\r?\n/)) {
24295
24612
  const [from, to] = line.trim().split(/\s+/);
24296
24613
  if (from && to && !from.startsWith("#")) map2.set(from, to);
24297
24614
  }
@@ -24317,7 +24634,7 @@ async function migrateVerifyCommand(root, previewRaw) {
24317
24634
  const findings = [];
24318
24635
  let checked = 0;
24319
24636
  for (const host of hosts) {
24320
- const inv = readJson2(join7(hostDir(root, host), "inventory.json"));
24637
+ const inv = readJson2(join8(hostDir(root, host), "inventory.json"));
24321
24638
  for (const old of inv?.pages ?? []) {
24322
24639
  if (old.status >= 300) continue;
24323
24640
  const res = await get(previewUrl(preview, old.path));
@@ -24336,7 +24653,7 @@ async function migrateVerifyCommand(root, previewRaw) {
24336
24653
  }
24337
24654
  }
24338
24655
  const words = { missing: "not found on the preview", moved: "moved to", error: "answers", title_lost: "lost its title", description_lost: "lost its description" };
24339
- const report = join7(root, MIGRATION_DIR, "verify.json");
24656
+ const report = join8(root, MIGRATION_DIR, "verify.json");
24340
24657
  writeJson(report, { checkedAt: (/* @__PURE__ */ new Date()).toISOString(), preview: preview.origin, checked, findings });
24341
24658
  if (!findings.length) {
24342
24659
  out(`All ${checked} old addresses open on the preview with their title and description.`);
@@ -24463,7 +24780,7 @@ async function askYes(question) {
24463
24780
  }
24464
24781
 
24465
24782
  // src/tar.ts
24466
- import { readFileSync as readFileSync7 } from "fs";
24783
+ import { readFileSync as readFileSync8 } from "fs";
24467
24784
  import { gzipSync } from "zlib";
24468
24785
  var BLOCK = 512;
24469
24786
  function writeString(buf, offset, length, value) {
@@ -24547,7 +24864,7 @@ function packFiles(files) {
24547
24864
  return createTarGz(
24548
24865
  files.map((f) => ({
24549
24866
  name: f.rel,
24550
- data: readFileSync7(f.abs),
24867
+ data: readFileSync8(f.abs),
24551
24868
  mtimeMs: f.mtimeMs,
24552
24869
  mode: f.mode & 64 ? 493 : 420
24553
24870
  }))
@@ -25026,13 +25343,13 @@ async function claimCommand(root, ctx, opts) {
25026
25343
 
25027
25344
  // src/commands/pull.ts
25028
25345
  import { spawnSync as spawnSync2 } from "child_process";
25029
- import { existsSync as existsSync9, readdirSync as readdirSync5, rmSync } from "fs";
25030
- import { join as join9 } from "path";
25346
+ import { existsSync as existsSync10, readdirSync as readdirSync5, rmSync } from "fs";
25347
+ import { join as join10 } from "path";
25031
25348
 
25032
25349
  // src/commands/samples.ts
25033
25350
  import { createInterface as createInterface3 } from "readline/promises";
25034
- import { existsSync as existsSync8, mkdirSync as mkdirSync4, readdirSync as readdirSync4, writeFileSync as writeFileSync6 } from "fs";
25035
- import { dirname as dirname2, join as join8, relative as relative2, resolve as resolve2, sep as sep2 } from "path";
25351
+ import { existsSync as existsSync9, mkdirSync as mkdirSync5, readdirSync as readdirSync4, writeFileSync as writeFileSync7 } from "fs";
25352
+ import { dirname as dirname3, join as join9, relative as relative2, resolve as resolve2, sep as sep2 } from "path";
25036
25353
  import { gunzipSync } from "zlib";
25037
25354
  var SAMPLES = [
25038
25355
  { key: "landing", title: "Landing page: a full one-page site with WhatsApp sign-up", stack: "static HTML and CSS" },
@@ -25053,7 +25370,7 @@ function listSamples(apiUrl) {
25053
25370
  out(`See them live: ${apiUrl}/samples`);
25054
25371
  }
25055
25372
  function filesIn(dir) {
25056
- return existsSync8(dir) ? readdirSync4(dir).filter((f) => !IGNORED.has(f)) : [];
25373
+ return existsSync9(dir) ? readdirSync4(dir).filter((f) => !IGNORED.has(f)) : [];
25057
25374
  }
25058
25375
  function freeFolder(cwd, key) {
25059
25376
  for (let n2 = 1; ; n2++) {
@@ -25082,7 +25399,7 @@ async function askWhere(cwd, key, count) {
25082
25399
  }
25083
25400
  }
25084
25401
  async function downloadSample(ctx, key, root) {
25085
- mkdirSync4(root, { recursive: true });
25402
+ mkdirSync5(root, { recursive: true });
25086
25403
  let res;
25087
25404
  try {
25088
25405
  res = await fetch(`${ctx.apiUrl}/samples-src/${key}.tar.gz`, {
@@ -25104,7 +25421,7 @@ function extractInto(gz, root, damaged) {
25104
25421
  } catch {
25105
25422
  throw new CliError(damaged, 1, "api");
25106
25423
  }
25107
- mkdirSync4(root, { recursive: true });
25424
+ mkdirSync5(root, { recursive: true });
25108
25425
  const base = resolve2(root);
25109
25426
  let written = 0;
25110
25427
  for (const e2 of entries) {
@@ -25112,8 +25429,8 @@ function extractInto(gz, root, damaged) {
25112
25429
  if (privateProjectFile(e2.name.replace(/\\/g, "/"))) continue;
25113
25430
  const target = resolve2(base, e2.name);
25114
25431
  if (target !== base && !target.startsWith(base + sep2)) continue;
25115
- mkdirSync4(dirname2(target), { recursive: true });
25116
- writeFileSync6(target, e2.data);
25432
+ mkdirSync5(dirname3(target), { recursive: true });
25433
+ writeFileSync7(target, e2.data);
25117
25434
  written++;
25118
25435
  }
25119
25436
  return written;
@@ -25137,7 +25454,7 @@ async function samplesCommand(cwd, ctx, key, opts = {}) {
25137
25454
  }
25138
25455
  const written = await downloadSample(ctx, sample.key, root);
25139
25456
  const base = resolve2(root);
25140
- const hasPackage = existsSync8(join8(base, "package.json"));
25457
+ const hasPackage = existsSync9(join9(base, "package.json"));
25141
25458
  out(base === resolve2(cwd) ? `Downloaded the ${sample.key} sample: ${written} files.` : `Downloaded the ${sample.key} sample into the new folder ${relative2(cwd, base)}: ${written} files. Work in that folder from now on.`);
25142
25459
  out("");
25143
25460
  const t = messages(base);
@@ -25191,7 +25508,7 @@ var git = (root, args, env = {}) => spawnSync2("git", args, { cwd: root, encodin
25191
25508
  function clearTree(root) {
25192
25509
  for (const name of readdirSync5(root)) {
25193
25510
  if (name === ".git" || name === ".deployai") continue;
25194
- rmSync(join9(root, name), { recursive: true, force: true });
25511
+ rmSync(join10(root, name), { recursive: true, force: true });
25195
25512
  }
25196
25513
  }
25197
25514
  async function pullHistory(root, ctx, projectId) {
@@ -25201,7 +25518,7 @@ async function pullHistory(root, ctx, projectId) {
25201
25518
  const live = versions.find((v) => v.isLive)?.number ?? Math.max(0, ...versions.filter((v) => v.status === "ready").map((v) => v.number));
25202
25519
  const chosen = versions.filter((v) => v.number <= live && v.status !== "failed" && v.status !== "queued").sort((a, b) => a.number - b.number);
25203
25520
  if (!chosen.length) throw new CliError(t("pullNoSource"), 1, "not_found");
25204
- if (!existsSync9(join9(root, ".git")) && git(root, ["init", "-q"]).status !== 0) throw new CliError(t("pullNoGit"), 1, "usage");
25521
+ if (!existsSync10(join10(root, ".git")) && git(root, ["init", "-q"]).status !== 0) throw new CliError(t("pullNoGit"), 1, "usage");
25205
25522
  for (const v of chosen) {
25206
25523
  const gz = await fetchSource(root, ctx, projectId, v.number).catch(() => null);
25207
25524
  if (!gz) continue;
@@ -25218,12 +25535,12 @@ async function pullHistory(root, ctx, projectId) {
25218
25535
 
25219
25536
  // src/commands/start.ts
25220
25537
  import { spawnSync as spawnSync3 } from "child_process";
25221
- import { existsSync as existsSync10, writeFileSync as writeFileSync8 } from "fs";
25222
- import { join as join11, relative as relative3, resolve as resolve3 } from "path";
25538
+ import { existsSync as existsSync11, writeFileSync as writeFileSync9 } from "fs";
25539
+ import { join as join12, relative as relative3, resolve as resolve3 } from "path";
25223
25540
 
25224
25541
  // src/commands/starter.ts
25225
- import { writeFileSync as writeFileSync7 } from "fs";
25226
- import { join as join10 } from "path";
25542
+ import { writeFileSync as writeFileSync8 } from "fs";
25543
+ import { join as join11 } from "path";
25227
25544
  var esc2 = (s) => s.replace(/[&<>"]/g, (c) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;" })[c]);
25228
25545
  var TEXT = {
25229
25546
  he: { title: "\u05D4\u05D0\u05EA\u05E8 \u05E9\u05DC\u05D9", soon: "\u05D4\u05D0\u05EA\u05E8 \u05D1\u05D1\u05E0\u05D9\u05D9\u05D4, \u05D1\u05E7\u05E8\u05D5\u05D1 \u05DB\u05D0\u05DF." },
@@ -25271,8 +25588,8 @@ DeployAI wrote this page so the folder starts as a working site. Build the owner
25271
25588
  - Delete this README or replace it with notes about the site.
25272
25589
  `;
25273
25590
  function writeStarter(root, name, lang, stack) {
25274
- writeFileSync7(join10(root, "index.html"), page(name ?? "", lang, stack));
25275
- writeFileSync7(join10(root, "README.md"), README);
25591
+ writeFileSync8(join11(root, "index.html"), page(name ?? "", lang, stack));
25592
+ writeFileSync8(join11(root, "README.md"), README);
25276
25593
  }
25277
25594
 
25278
25595
  // src/commands/start.ts
@@ -25315,13 +25632,14 @@ async function startCommand(cwd, ctx, id, opts = {}) {
25315
25632
  if (sample && !sameSite) {
25316
25633
  const written = await downloadSample(ctx, sample.key, root);
25317
25634
  done.push(t("startDownloaded", { key: sample.key, n: written }));
25318
- if (existsSync10(join11(root, "package.json"))) {
25635
+ if (existsSync11(join12(root, "package.json"))) {
25319
25636
  if (opts.install !== false && install(root)) done.push(t("startInstalled"));
25320
25637
  else steps.unshift({ cmd: "npm install", say: "Installs the sample's packages." });
25321
25638
  }
25322
25639
  }
25323
25640
  if (kind === "migrate" && choices.migration) {
25324
25641
  writeChoices(root, { ...choices.migration, startId: key });
25642
+ if (root !== here) done.push(t("startBesideCode", { dir: here }));
25325
25643
  for (const url2 of choices.migration.sourceUrls) {
25326
25644
  try {
25327
25645
  const skipped = await migrateScanCommand(root, url2, { max: START_SCAN_PAGES });
@@ -25339,7 +25657,7 @@ async function startCommand(cwd, ctx, id, opts = {}) {
25339
25657
  const stackText = choices.stack ? stackBlock(choices.stack) : "";
25340
25658
  if (choices.brief || stackText) {
25341
25659
  ensureDeployaiDir(root);
25342
- writeFileSync8(join11(root, BRIEF_FILE), [choices.brief ? `# The owner's details
25660
+ writeFileSync9(join12(root, BRIEF_FILE), [choices.brief ? `# The owner's details
25343
25661
 
25344
25662
  ${choices.brief}
25345
25663
  ` : "", stackText].filter(Boolean).join("\n"));
@@ -25384,7 +25702,7 @@ ${choices.brief}
25384
25702
  }
25385
25703
 
25386
25704
  // src/commands/addon.ts
25387
- import { readFileSync as readFileSync8 } from "fs";
25705
+ import { readFileSync as readFileSync9 } from "fs";
25388
25706
  import { resolve as resolve4 } from "path";
25389
25707
  function linkedProjectId2(root) {
25390
25708
  const id = readProject(root)?.projectId;
@@ -25485,7 +25803,7 @@ async function addonDoneCommand(root, ctx, runId, opts) {
25485
25803
  let report;
25486
25804
  if (opts.report) {
25487
25805
  try {
25488
- report = JSON.parse(readFileSync8(resolve4(root, opts.report), "utf8"));
25806
+ report = JSON.parse(readFileSync9(resolve4(root, opts.report), "utf8"));
25489
25807
  } catch {
25490
25808
  throw new CliError(`Cannot read the report file ${opts.report} as JSON.`, 1, "usage");
25491
25809
  }
@@ -25542,8 +25860,8 @@ async function speedCommand(ctx, url2, opts) {
25542
25860
  }
25543
25861
 
25544
25862
  // src/commands/blocks.ts
25545
- import { existsSync as existsSync11, mkdirSync as mkdirSync5, writeFileSync as writeFileSync9 } from "fs";
25546
- import { dirname as dirname3, resolve as resolve5, sep as sep3 } from "path";
25863
+ import { existsSync as existsSync12, mkdirSync as mkdirSync6, writeFileSync as writeFileSync10 } from "fs";
25864
+ import { dirname as dirname4, resolve as resolve5, sep as sep3 } from "path";
25547
25865
  import { gunzipSync as gunzipSync2 } from "zlib";
25548
25866
  var BLOCKS = [
25549
25867
  { key: "inbox", title: "Contact form with the site's own messages page for the owner, and an email on each message (D1)" },
@@ -25583,12 +25901,12 @@ async function blocksCommand(root, ctx, name) {
25583
25901
  if (e2.type !== "0" && e2.type !== "\0") continue;
25584
25902
  const target = resolve5(base, e2.name);
25585
25903
  if (target === base || !target.startsWith(base + sep3)) continue;
25586
- if (existsSync11(target)) {
25904
+ if (existsSync12(target)) {
25587
25905
  kept.push(e2.name);
25588
25906
  continue;
25589
25907
  }
25590
- mkdirSync5(dirname3(target), { recursive: true });
25591
- writeFileSync9(target, e2.data);
25908
+ mkdirSync6(dirname4(target), { recursive: true });
25909
+ writeFileSync10(target, e2.data);
25592
25910
  written.push(e2.name);
25593
25911
  }
25594
25912
  out(`Added the ${block.key} block: ${written.length} files.`);
@@ -25657,6 +25975,7 @@ function buildProgram() {
25657
25975
  program.command("logout").description("cancel the login token and remove it from this computer").action((_opts, cmd) => logoutCommand(ctx(cmd)));
25658
25976
  program.command("whoami").description("show the logged in user").action((_opts, cmd) => whoamiCommand(ctx(cmd)));
25659
25977
  program.command("telemetry").description("show what is sent, or turn telemetry on or off").argument("[action]", "status, on or off", "status").action((action) => telemetryCommand(action));
25978
+ program.command("allow").description("stop your coding tool asking before every DeployAI command, in this folder only (run it after the owner says yes)").argument("[tool]", "claude-code, cursor, copilot, codex or antigravity (Claude Code is found by itself)").action((tool) => allowCommand(tool));
25660
25979
  program.command("link").description("link this folder to a DeployAI project").argument("[project]", "project slug or id").option("--create <name>", "create a new project and link it").action(
25661
25980
  (project, opts, cmd) => linkCommand(root(cmd), ctx(cmd), project, opts)
25662
25981
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deployai",
3
- "version": "0.1.0-beta.15",
3
+ "version": "0.1.0-beta.17",
4
4
  "description": "Check a site built with an AI editor, see what has to change, and publish it to DeployAI. Hebrew first.",
5
5
  "keywords": [
6
6
  "deployai",