deployai 0.1.0-beta.23 → 0.1.0-beta.25

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 (3) hide show
  1. package/README.md +3 -3
  2. package/dist/index.js +221 -47
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -50,7 +50,7 @@ Node 20 or newer. No other setup: the CLI talks to https://deployai.co.il.
50
50
  | `deployai rollback v5` | Puts version 5 back live, with no rebuild. |
51
51
  | `deployai promote v5` | Puts version 5 live. New database changes (SQL) are shown and run first, after a yes; SQL that removes data needs the database name typed. An agent passes `--approve-sql <code>` only after the owner said yes, and never for SQL that removes data. |
52
52
  | `deployai sql v5` | The database changes version 5 runs before it goes live. |
53
- | `deployai status` | Site state, address, live version, the newest version when it is not live yet (with the promote command once it is ready), and queue. |
53
+ | `deployai status` | Site state, address, live version, the newest version when it is not live yet (with the promote command once it is ready), and queue. When the live site is closed to the country you run this from, it says so and how to open it, or to use a VPN. |
54
54
  | `deployai deploy --guest` | No login needed: puts the site live as a temporary site with a claim link. More below. |
55
55
  | `deployai pull` | Downloads the code of the linked site's live version into this empty folder. Needs login. |
56
56
  | `deployai pull --history` | The same, with the site's history as git commits, one per version up to the live one, oldest first. |
@@ -65,9 +65,9 @@ Node 20 or newer. No other setup: the CLI talks to https://deployai.co.il.
65
65
  | `deployai samples [name] [folder]` | Lists the six sample sites, or downloads one. More below. |
66
66
  | `deployai start <id>` | The one line copied on the DeployAI site. Prepares this folder, then prints the steps for your agent. A site's line logs in first; a temporary site needs no login. More below. |
67
67
  | `deployai speed <url>` | Google PageSpeed test of a page: lab results, real visitor data when Google has it and the biggest opportunities. `--desktop` tests a desktop load. |
68
- | `deployai addons` | The marketplace add-ons of the linked site: which it has, which are done and which is next. Works once the DeployAI marketplace is open; the server checks that the site has each add-on. |
68
+ | `deployai addons` | The marketplace add-ons of the linked site: which it has, which are done and which is next. The server checks that the site has each add-on. It runs what the site has even before the marketplace opens. |
69
69
  | `deployai addon next` | Prints the next add-on of the site for your agent. `deployai addon run <name>` prints one by name. |
70
- | `deployai addons run` | Runs every add-on the site has that is not done, in the run order, with no ask between them. The owner still approves each plan. |
70
+ | `deployai addons run` | With more than one add-on waiting, prints a question for the owner. `--one-by-one` (recommended): after each add-on, the owner chooses whether to publish. `--all`: they all finish first, then one publish at the end. The owner still approves each plan. |
71
71
  | `deployai addon done <runId>` | Saves the report of a finished add-on (`--status done\|failed\|skipped`, `--report .deployai/addon-report.json`) and prints the next one. |
72
72
  | `deployai telemetry status\|on\|off` | Shows exactly what is sent, or turns it on or off. |
73
73
 
package/dist/index.js CHANGED
@@ -21293,6 +21293,8 @@ var SqlPlanResponse = external_exports.object({
21293
21293
  hash: external_exports.string(),
21294
21294
  /** Only the owner approves SQL; a teammate gets the dashboard page to send them. */
21295
21295
  canApprove: external_exports.boolean(),
21296
+ /** The logged-in account's email when it cannot approve, so the CLI can say who is logged in. Never the owner's. */
21297
+ account: external_exports.string().optional(),
21296
21298
  url: external_exports.string()
21297
21299
  });
21298
21300
  var StatusResponse = external_exports.object({
@@ -21313,7 +21315,9 @@ var StatusResponse = external_exports.object({
21313
21315
  goingLive: external_exports.boolean().optional(),
21314
21316
  /** The go live check found it broken and the previous version came back (D-297, D-528). */
21315
21317
  wentBack: external_exports.object({ previous: external_exports.number(), reason: external_exports.string() }).nullable().optional()
21316
- }).nullable().optional()
21318
+ }).nullable().optional(),
21319
+ /** The live site's country rule shuts out the country this call came from (D-682). `settingsUrl` is null when only the owner can change it. */
21320
+ closedHere: external_exports.object({ country: external_exports.string(), countries: external_exports.array(external_exports.string()), settingsUrl: external_exports.string().nullable() }).nullable().optional()
21317
21321
  });
21318
21322
  var ApiError = external_exports.object({
21319
21323
  error: external_exports.string(),
@@ -21329,6 +21333,8 @@ var AddonItem = external_exports.object({
21329
21333
  name: external_exports.string(),
21330
21334
  owned: external_exports.boolean(),
21331
21335
  status: AddonRunStatus,
21336
+ /** Its work no longer matches the live site (D-683); status is then todo. */
21337
+ outdated: external_exports.boolean().optional(),
21332
21338
  lastRunAt: external_exports.string().nullable(),
21333
21339
  /** Null when owned. */
21334
21340
  buyUrl: external_exports.string().nullable()
@@ -21651,6 +21657,17 @@ var ARCH_FLOWS = [
21651
21657
  }
21652
21658
  ];
21653
21659
 
21660
+ // ../shared/src/domain-sales.ts
21661
+ var IL_TLDS = ["co.il", "org.il", "net.il"];
21662
+ var DEFAULT_LIVEDNS_POINTS = { 5: 9100, 10: 8900, 20: 8700, 50: 8500, 100: 8200 };
21663
+ var pointCost = (points, pack) => Math.round(points[pack] / (1 + VAT_RATE));
21664
+ var DEFAULT_DOMAIN_REGISTRARS = {
21665
+ cloudflare: { enabled: true, feeRate: 0.03, maxUsdCentsPerDay: 1e4 },
21666
+ livedns: { enabled: true, feeRate: 0.01, pack: 5, costAgorot: pointCost(DEFAULT_LIVEDNS_POINTS, 5) },
21667
+ manual: { enabled: true, feeRate: 0.01, costAgorot: 7500 }
21668
+ };
21669
+ var LIVEDNS_TLDS = [...IL_TLDS, "com", "net", "org"];
21670
+
21654
21671
  // ../shared/src/cost-model.ts
21655
21672
  var DEFAULT_FLEET = {
21656
21673
  mix: { basic: 0.65, business: 0.3, agency: 0.05 },
@@ -21807,6 +21824,7 @@ var PLAN_FEATURES = [
21807
21824
  { key: "pageViews", limit: "maxPageViewsMonth" },
21808
21825
  { key: "deploys", limit: "maxDeploysDay" },
21809
21826
  { key: "emails", limit: "maxEmailsMonth" },
21827
+ { key: "domainEmail", limit: "includedEmailDomains" },
21810
21828
  { key: "versions", limit: "maxVersionsMb" },
21811
21829
  { key: "helpDeploys" },
21812
21830
  { key: "helpEmail" },
@@ -21824,6 +21842,7 @@ var MIGRATION_DIR = ".deployai/migration";
21824
21842
  var BRIEF_FILE = ".deployai/brief.md";
21825
21843
  var CHECK = { cmd: "npx deployai@latest check", say: "Fix every blocker it lists, then run it again until it shows none." };
21826
21844
  var DEPLOY_ASK_RULE = 'Never deploy on your own, and never after each small edit: every deploy is a full build. Deploy only when what the owner asked for is done. Then say in short what changed and ask: "Put it live, see a preview first, or not yet?" Put it live: deploy with --live. Preview first: deploy without it and send the owner the preview address. Not yet: keep working, and the next change goes up in the same deploy. If the owner said to always put changes live, deploy with --live without asking. Database changes still get their own yes.';
21845
+ var ASK_OWNER_RULE = "When a question to the owner has set answers, use your tool's own question feature with clickable choices if it has one, for example AskUserQuestion in Claude Code, AskQuestion in Cursor, askQuestions in Copilot in VS Code, or request_user_input in Codex. Use the owner's language, with each answer as its own choice. If your tool has no such feature, or it is refused or fails, ask the same question once in plain text and go on. Never change a mode or a setting to get it. A yes or no question has set answers too. A question about going live names the site and its address when you know it, and says anyone will be able to see it, so the owner's answer is about this exact site (D-691). Open details, like a phone number or hours, stay in plain text, in one short list.";
21827
21846
  var ASK = { say: DEPLOY_ASK_RULE };
21828
21847
  var GUEST_ASK = { say: 'Deploy only when what the owner asked for is done. Say in short what you made and ask: "Put it up now, or not yet?" On Not yet, keep working and ask again when the next request is done.' };
21829
21848
  var FAVICON = { cmd: "npx deployai@latest brand favicon", say: "Gives the site an icon if it has none, made from the site itself: the old site's icon, else its logo, else the first letter of its name in its own color. Add the head lines it prints to every page. It changes nothing when the site has an icon." };
@@ -21831,6 +21850,7 @@ var LOGIN = { cmd: "npx deployai@latest login", say: "The owner approves it in t
21831
21850
  var PROMOTE = { cmd: "npx deployai@latest promote v<N>", say: "Only when deploy ran without --live, and only after the owner approves the preview. N is the version number deploy printed. Then give the owner the live address." };
21832
21851
  var DEPLOY_SAY = "Add --live only if the owner chose to put it live right away. It waits for the build: with --live it ends with the live address, else with the preview address to send the owner. When it prints database changes, a yes to going live does not cover them (D-541): show the owner the changes and ask the question it prints, and only after a yes run the promote --approve-sql command it printed; changes it says remove data only the owner approves, never you. Write the -m message in a few words in the language of the owner, about what they see changed.";
21833
21852
  var BUILD = { say: "This folder had no site, so start wrote a starter page. Do not ask where the site comes from or which way to start: build a first version of the owner's site in its place now. Use what you know (the instructions above, .deployai/brief.md if it exists, the folder name) and choose the layout, colors and wording yourself. Ask at most one short question, and only if you cannot tell what the site is for. Leave out what you do not know (phone, prices, hours) instead of asking for it. Then show it to the owner and offer to add those details. Run check only after that." };
21853
+ var ADDONS_RUN = { cmd: "npx deployai@latest addons run", say: "With more than one add-on waiting, it prints a question: one by one (recommended) or all at once. Ask the owner, run the command for their answer, work through each step it prints, and report each add-on as it says." };
21834
21854
  var MIGRATE_STEPS = [
21835
21855
  { cmd: "npx deployai@latest blocks inbox", say: "Only if the old site has a contact or quote form: the form with its own messages page for the owner." },
21836
21856
  { cmd: "npx deployai@latest blocks blog", say: "Only if the old site has posts, news or articles: the blog, with the posts as Markdown files." },
@@ -21839,22 +21859,37 @@ var MIGRATE_STEPS = [
21839
21859
  { cmd: "npx deployai@latest brand images <the old site address> <one address of each kind of page>", say: "Measures every image against where it shows and changes nothing. Add each weak one to .deployai/migration/plan.md as Needs me, with what it shows. A move keeps the images as they are: only the owner chooses to replace one, and a photo of a real person, product or place is never replaced with a made up one." },
21840
21860
  { ...CHECK },
21841
21861
  LOGIN,
21842
- { cmd: 'npx deployai@latest link --create "<the site name>"', say: "Makes the site in the owner's account and links this folder. The add-ons come with it for free while the offer lasts." },
21862
+ { cmd: 'npx deployai@latest link --create "<the site name>"', say: "Makes the site in the owner's account and links this folder. The add-ons come with it for free while the offer lasts. Do not run them now: the last step offers them, once the move is done." },
21843
21863
  { cmd: 'npx deployai@latest deploy -m "moved from the old site"', say: "Without --live: the first version of a moved site is always a preview. It waits for the build and prints the preview address." },
21844
- { cmd: "npx deployai@latest migrate verify <preview address>", say: "Compares every old address with the preview: a page that moved, lost its title or description, or does not open. Fix each one, deploy again and run it again until it lists none." },
21845
- { cmd: "npx deployai@latest addons run", say: "Runs every add-on of the site in one go. Work through each step it prints, run check between add-ons, and report each one as it says." },
21864
+ { cmd: "npx deployai@latest migrate verify <preview address>", say: "Compares every old address with the preview: a page that moved, lost its title or description, or does not open, and any credit to a site builder still on it. Fix each one, deploy again and run it again until it lists none. A credit the owner asked to keep is the only one that may stay: say so in .deployai/migration/plan.md." },
21846
21865
  { say: 'Send the owner the preview address and the table from .deployai/migration/plan.md. Ask: "Put it live now, or change something first?" Deploy again for each change.' },
21847
21866
  PROMOTE,
21848
21867
  { say: "Only after it is live: tell the owner how to connect their domain in the dashboard (Domains), to keep their email records (MX) as they are, and to keep the old hosting for a few weeks before they cancel it." }
21849
21868
  ];
21869
+ var MOVE_ADDONS = { cmd: "npx deployai@latest addons", say: 'The move is done, so offer the second part: the free add-ons. This lists the ones this site has; never offer the ones to buy here. If none is waiting, finish. Else tell the owner in one short line what the waiting ones add, in plain words, and ask once: "Your site moved. Go on to the free add-ons?" with three answers. One by one (recommended): run npx deployai@latest addons run --one-by-one, and after each add-on the owner chooses whether to publish. All at once: run npx deployai@latest addons run --all, with one publish at the end. Not now: finish here, and tell them the add-ons stay with this site, on its page in the dashboard, with no time limit. Never start an add-on without their answer.' };
21850
21870
  var managedStatus = (stage, note, say) => ({ cmd: `npx deployai@latest migrate status ${stage} "${note}"`, say });
21871
+ var stepWith = (part) => MIGRATE_STEPS.find((step) => step.cmd?.includes(part));
21851
21872
  var MANAGED_STEPS = [
21852
21873
  managedStatus("building", "<what is done>", "First, once the plan in .deployai/migration/plan.md is agreed: the request shows the build started."),
21853
- ...MIGRATE_STEPS.slice(0, 11),
21874
+ stepWith("migrate media"),
21875
+ { say: "A first look, before the rest of the site: build the real home page now, as step 3 says, with the owner's logo, colors, photos and words from the scan, and only the contact details found there. Its menu and buttons lead only to what already works on this one page; leave the rest out for now. Never write coming soon or under construction." },
21876
+ FAVICON,
21877
+ CHECK,
21878
+ LOGIN,
21879
+ stepWith("link --create"),
21880
+ { cmd: 'npx deployai@latest deploy -m "first look"', say: "Never with --live, and do not ask first: this one deploy is a private preview that visitors and Google do not see, and the old site and its domain stay as they are. It waits for the build and prints the preview address. Deploy it once, not for each small fix. If it fails and you cannot fix it soon, skip the next step and go on: the full preview is what the owner approves." },
21881
+ managedStatus("first_look", "<preview address>", "The owner gets one email that leads to this private link. Then build the rest of the site with the steps below."),
21882
+ stepWith("blocks inbox"),
21883
+ stepWith("blocks blog"),
21884
+ stepWith("brand images"),
21885
+ CHECK,
21886
+ stepWith("moved from the old site"),
21887
+ managedStatus("first_look", "<the new preview address>", "A site keeps one preview, so this deploy ended the old link. Report the new one, and again after any deploy below, until preview_ready. It sends no second email."),
21888
+ stepWith("migrate verify"),
21854
21889
  managedStatus("preview_ready", "<preview address>", "The owner gets an email with the preview address."),
21855
- ...MIGRATE_STEPS.slice(11, 13),
21890
+ ...MIGRATE_STEPS.slice(10, 12),
21856
21891
  managedStatus("live", "<live address>", "Only after it is live. Then the team transfers the site to the owner."),
21857
- ...MIGRATE_STEPS.slice(13)
21892
+ ...MIGRATE_STEPS.slice(12)
21858
21893
  ];
21859
21894
  var PULL = { cmd: "npx deployai@latest pull", say: "This folder was empty, so it downloads the code of the live site first. Work on that code." };
21860
21895
  function startSteps(kind, opts = {}) {
@@ -21866,6 +21901,7 @@ function stepsOf(kind, opts) {
21866
21901
  return [...opts.starter ? [BUILD] : [], FAVICON, CHECK, ASK, LOGIN, { cmd: 'npx deployai@latest deploy -m "first version"', say: DEPLOY_SAY }, PROMOTE];
21867
21902
  case "update": {
21868
21903
  const deploy = { cmd: 'npx deployai@latest deploy -m "<what changed, in a few words>"', say: DEPLOY_SAY };
21904
+ if (opts.addons) return [LOGIN, ...opts.emptyFolder ? [PULL] : [], ADDONS_RUN, CHECK, ASK, deploy, PROMOTE];
21869
21905
  return opts.emptyFolder ? [LOGIN, PULL, CHECK, ASK, deploy, PROMOTE] : [CHECK, ASK, LOGIN, deploy, PROMOTE];
21870
21906
  }
21871
21907
  case "move":
@@ -21879,7 +21915,7 @@ function stepsOf(kind, opts) {
21879
21915
  PROMOTE
21880
21916
  ];
21881
21917
  case "migrate":
21882
- return (opts.managed ? MANAGED_STEPS : MIGRATE_STEPS).map((step) => ({ ...step }));
21918
+ return (opts.managed ? MANAGED_STEPS : [...MIGRATE_STEPS, MOVE_ADDONS]).map((step) => ({ ...step }));
21883
21919
  case "guest":
21884
21920
  return [
21885
21921
  ...opts.starter ? [BUILD] : [],
@@ -21894,7 +21930,7 @@ function stepsOf(kind, opts) {
21894
21930
  }
21895
21931
  }
21896
21932
  var allowCommandsUrl = (lang = "he") => `${HELP_ORIGIN}${lang === "he" ? "" : "/en"}/go-live#allow`;
21897
- 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.`;
21933
+ var runCommandsRule = (lang = "he") => `Run every npx deployai@latest command yourself. If your tool shows the owner its own approval for a command, that approval is the question, so do not ask again. If it needs approval and shows the owner nothing, ask the owner one short yes or no question that names the command, for example "Run npx deployai@latest check?", and run it when they say yes. Never ask the owner to copy, paste or type a command. Right after the first command runs, before any other work, ask the owner once, unless your tool already allows our commands here: "Let your coding tool run DeployAI commands in this folder without asking each time? It adds one allow rule for npx deployai@latest to the tool's settings in this folder. Going live still waits for your answer." Only on yes run npx deployai@latest allow (add your tool's name if it asks: claude-code, cursor, copilot, codex or antigravity). Either way go on without stopping, and do not ask again. Never change your tool's settings any other way. If a command is still blocked after their yes, also by a safety check of your tool, never retry it, change it or run it another way. Say in plain words what was stopped, send them ${allowCommandsUrl(lang)}, which shows how to approve it in their tool, and ask: "Your coding tool stopped this step. I approved it, or not yet?" If the stopped command was a deploy with --live, also offer a preview first. On I approved it, try once more.`;
21898
21934
  var START_FAIL_LINE = "If anything fails, tell the owner in plain words what happened and what you will do next.";
21899
21935
 
21900
21936
  // ../shared/src/cli-map.ts
@@ -21906,7 +21942,8 @@ var CLI_MAP_NODES = [
21906
21942
  n("page-new", "site", "/dashboard/new", "\u05D0\u05EA\u05E8 \u05D7\u05D3\u05E9: \u05D4\u05D3\u05D5\u05D2\u05DE\u05D4, \u05D4\u05E9\u05DD \u05D5\u05D4\u05E4\u05E8\u05D8\u05D9\u05DD \u05E0\u05E9\u05DE\u05E8\u05D9\u05DD \u05D1\u05D0\u05EA\u05E8, \u05D5\u05D4 id \u05E0\u05D5\u05E9\u05D0 \u05D0\u05EA \u05DB\u05D5\u05DC\u05DD.", "New site: the sample, name and details are saved on the site, and the id carries them all."),
21907
21943
  n("page-site", "site", "/project/<id>", "\u05E2\u05DE\u05D5\u05D3 \u05D4\u05D0\u05EA\u05E8: \u05E9\u05D5\u05E8\u05EA \u05D4\u05EA\u05D7\u05DC\u05D4 \u05E2\u05D3 \u05D4\u05D2\u05E8\u05E1\u05D4 \u05D4\u05E8\u05D0\u05E9\u05D5\u05E0\u05D4, \u05D5\u05D0\u05D7\u05E8\u05D9\u05D4 \u05E9\u05D5\u05E8\u05EA \u05E2\u05D3\u05DB\u05D5\u05DF.", "The site page: a new site line until the first version, then an update line."),
21908
21944
  n("page-move-url", "site", "/move", "\u05D4\u05E2\u05D1\u05D9\u05E8\u05D5 \u05D0\u05EA \u05D4\u05D0\u05EA\u05E8 \u05E9\u05DC\u05D9: \u05DB\u05EA\u05D5\u05D1\u05EA \u05D4\u05D0\u05EA\u05E8 \u05D4\u05D9\u05E9\u05DF, \u05D4\u05E4\u05DC\u05D8\u05E4\u05D5\u05E8\u05DE\u05D4, \u05E1\u05D5\u05D2 \u05D4\u05D0\u05EA\u05E8 \u05D5\u05D4\u05E2\u05D9\u05E6\u05D5\u05D1. \u05D4 id \u05E0\u05D5\u05E9\u05D0 \u05D0\u05EA \u05DB\u05D5\u05DC\u05DD.", "Move my site: the old site address, the platform, the kind of site and the design. The id carries them all."),
21909
- n("page-refresh", "site", "/project/<id>/refresh", "\u05E8\u05E2\u05E0\u05D5\u05DF \u05D4\u05E2\u05D9\u05E6\u05D5\u05D1: \u05E9\u05D5\u05E8\u05D4 \u05DC\u05E2\u05D9\u05E6\u05D5\u05D1 \u05D7\u05D3\u05E9 \u05DC\u05D0\u05EA\u05E8 \u05D7\u05D9, \u05DE\u05EA\u05D5\u05DA \u05D4\u05D0\u05EA\u05E8\u05D9\u05DD \u05E9\u05DC\u05D9.", "Freshen it up: a line for a new look on a live site, from My sites."),
21945
+ n("page-addons", "site", "/project/<id>/addons", "\u05D4\u05E8\u05E6\u05EA \u05EA\u05D5\u05E1\u05E4\u05D9\u05DD: \u05E9\u05D5\u05E8\u05D4 \u05E9\u05DE\u05E8\u05D9\u05E6\u05D4 \u05D0\u05EA \u05D4\u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05E9\u05DC \u05D4\u05D0\u05EA\u05E8, \u05D2\u05DD \u05DE\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05E8\u05D9\u05E7\u05D4.", "Run add-ons: a line that runs the site's add-ons, from an empty folder too."),
21946
+ n("page-refresh", "site", "/project/<id>/refresh", "\u05E8\u05E2\u05E0\u05D5\u05DF \u05D4\u05E2\u05D9\u05E6\u05D5\u05D1: \u05E9\u05D5\u05E8\u05D4 \u05DC\u05E2\u05D9\u05E6\u05D5\u05D1 \u05D7\u05D3\u05E9 \u05DC\u05D0\u05EA\u05E8 \u05D7\u05D9, \u05DE\u05EA\u05D5\u05DA \u05D4\u05D0\u05EA\u05E8\u05D9\u05DD \u05E9\u05DC\u05D9.", "Freshen it up, hidden for now (D-663): a line for a new look on a live site."),
21910
21947
  n("page-move", "site", "/dashboard", "\u05D9\u05E9 \u05DC\u05D9 \u05DB\u05D1\u05E8 \u05D0\u05EA\u05E8: \u05E9\u05D5\u05E8\u05D4 \u05DC\u05D4\u05E2\u05D1\u05E8\u05EA \u05D4\u05D0\u05EA\u05E8 \u05E9\u05D1\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4.", "I already have a site: a line to move the site in the folder."),
21911
21948
  // The CLI: every command (packages/cli/src/cli.ts).
21912
21949
  n("cmd-start", "cli", "start <id>", "\u05DE\u05DB\u05D9\u05DF \u05D0\u05EA \u05D4\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05DC\u05E4\u05D9 \u05DB\u05DC \u05D4\u05D1\u05D7\u05D9\u05E8\u05D5\u05EA: \u05EA\u05D9\u05E7\u05D9\u05D9\u05D4, \u05D3\u05D5\u05D2\u05DE\u05D4 \u05D5\u05D4\u05EA\u05E7\u05E0\u05D4, \u05E7\u05D5\u05D1\u05E5 \u05D4\u05E4\u05E8\u05D8\u05D9\u05DD \u05D5\u05D7\u05D9\u05D1\u05D5\u05E8 \u05DC\u05D0\u05EA\u05E8. \u05DE\u05D3\u05E4\u05D9\u05E1 \u05DC\u05E1\u05D5\u05DB\u05DF \u05D0\u05EA \u05D4\u05D8\u05E7\u05E1\u05D8 \u05D5\u05D0\u05EA \u05D4\u05E4\u05E7\u05D5\u05D3\u05D5\u05EA.", "Prepares the folder with every choice: folder, sample and install, the details file and the site link. Prints the text and the commands for the agent."),
@@ -21962,7 +21999,9 @@ var CLI_MAP_NODES = [
21962
21999
  n("text-details", "agent", "site.details / site.ask-details", "\u05E7\u05D5\u05E8\u05D0\u05D9\u05DD \u05D0\u05EA \u05D4\u05E4\u05E8\u05D8\u05D9\u05DD \u05DE .deployai/brief.md, \u05D0\u05D5 \u05E9\u05D5\u05D0\u05DC\u05D9\u05DD \u05D0\u05EA \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8.", "Read the details from .deployai/brief.md, or ask the owner."),
21963
22000
  n("text-update", "agent", "site.update", "\u05E2\u05D5\u05E9\u05D9\u05DD \u05D0\u05EA \u05D4\u05E9\u05D9\u05E0\u05D5\u05D9 \u05E9\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05D1\u05D9\u05E7\u05E9.", "Make the change the owner asked for."),
21964
22001
  n("text-refresh", "agent", "site.refresh", "\u05E2\u05D9\u05E6\u05D5\u05D1 \u05D7\u05D3\u05E9 \u05DC\u05D0\u05EA\u05E8 \u05D7\u05D9: \u05DB\u05DC \u05E2\u05DE\u05D5\u05D3, \u05DB\u05EA\u05D5\u05D1\u05EA, \u05DE\u05D9\u05DC\u05D4 \u05D5\u05DE\u05D5\u05EA\u05D2 \u05E0\u05E9\u05D0\u05E8\u05D9\u05DD, \u05EA\u05E6\u05D5\u05D2\u05D4 \u05DE\u05E7\u05D3\u05D9\u05DE\u05D4 \u05DC\u05E4\u05E0\u05D9 \u05E9\u05E2\u05D5\u05DC\u05D4.", "A new look for a live site: every page, address, word and the brand stay, a preview before it goes live."),
21965
- n("text-migrate", "agent", "site.migrate", "\u05D1\u05D5\u05E0\u05D9\u05DD \u05DE\u05D7\u05D3\u05E9 \u05D0\u05EA \u05D4\u05D0\u05EA\u05E8 \u05D4\u05D9\u05E9\u05DF \u05E2\u05DC \u05D4\u05D3\u05D5\u05D2\u05DE\u05D4, \u05E9\u05D5\u05DE\u05E8\u05D9\u05DD \u05DB\u05DC \u05DB\u05EA\u05D5\u05D1\u05EA \u05D5\u05DB\u05D5\u05EA\u05E8\u05EA, \u05EA\u05D5\u05DB\u05E0\u05D9\u05EA \u05E2\u05DD \u05E1\u05D8\u05D8\u05D5\u05E1 \u05DC\u05DB\u05DC \u05D9\u05DB\u05D5\u05DC\u05EA.", "Rebuild the old site on the sample, keep every address and title, a plan with a status for each feature."),
22002
+ n("text-run-addons", "agent", "site.addons", "\u05DE\u05E8\u05D9\u05E6\u05D9\u05DD \u05D0\u05EA \u05D4\u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05E9\u05DC \u05D0\u05EA\u05E8 \u05D7\u05D9, \u05D0\u05D7\u05D3 \u05D0\u05D7\u05E8\u05D9 \u05D4\u05E9\u05E0\u05D9: \u05D4\u05D0\u05EA\u05E8 \u05E0\u05E9\u05D0\u05E8 \u05DB\u05DE\u05D5 \u05E9\u05D4\u05D5\u05D0 \u05E2\u05D3 \u05E9\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05DE\u05D0\u05E9\u05E8.", "Run a live site's add-ons one by one: the site stays as it is until the owner approves."),
22003
+ n("text-migrate-keep", "agent", "site.migrate-keep", "\u05D1\u05E8\u05D9\u05E8\u05EA \u05D4\u05DE\u05D7\u05D3\u05DC: \u05DE\u05E2\u05D1\u05D9\u05E8\u05D9\u05DD \u05D0\u05EA \u05D4\u05D0\u05EA\u05E8 \u05D4\u05D9\u05E9\u05DF \u05DB\u05DE\u05D5 \u05E9\u05D4\u05D5\u05D0, \u05E2\u05DD \u05D4\u05E2\u05D9\u05E6\u05D5\u05D1 \u05D5\u05D4\u05E1\u05E7\u05E8\u05D9\u05E4\u05D8\u05D9\u05DD \u05E9\u05DC\u05D5, \u05D5\u05DE\u05E9\u05D5\u05D5\u05D9\u05DD \u05E6\u05D9\u05DC\u05D5\u05DE\u05D9 \u05DE\u05E1\u05DA. \u05DE\u05E0\u05E7\u05D9\u05DD \u05E8\u05E7 \u05DE\u05D4 \u05E9\u05DE\u05D1\u05E7\u05E8 \u05DC\u05D0 \u05E8\u05D5\u05D0\u05D4.", "The default: move the old site exactly as it is, with its own front end, and compare screenshots. Clean up only what a visitor cannot see."),
22004
+ n("text-migrate", "agent", "site.migrate", "\u05D1\u05E0\u05D9\u05D9\u05D4 \u05DE\u05D7\u05D3\u05E9, \u05E8\u05E7 \u05DB\u05E9\u05D4\u05E6\u05D5\u05D5\u05EA \u05D1\u05D7\u05E8 \u05D1\u05D6\u05D4 \u05D1\u05D1\u05E7\u05E9\u05EA \u05D4\u05E2\u05D1\u05E8\u05D4: \u05D1\u05D5\u05E0\u05D9\u05DD \u05DE\u05D7\u05D3\u05E9 \u05D0\u05EA \u05D4\u05D0\u05EA\u05E8 \u05D4\u05D9\u05E9\u05DF \u05E2\u05DC \u05D4\u05D3\u05D5\u05D2\u05DE\u05D4, \u05E9\u05D5\u05DE\u05E8\u05D9\u05DD \u05DB\u05DC \u05DB\u05EA\u05D5\u05D1\u05EA \u05D5\u05DB\u05D5\u05EA\u05E8\u05EA, \u05EA\u05D5\u05DB\u05E0\u05D9\u05EA \u05E2\u05DD \u05E1\u05D8\u05D8\u05D5\u05E1 \u05DC\u05DB\u05DC \u05D9\u05DB\u05D5\u05DC\u05EA.", "Rebuild the old site on the sample, keep every address and title, a plan with a status for each feature."),
21966
22005
  n("text-move", "agent", "site.move", "\u05DE\u05E2\u05D1\u05D9\u05E8\u05D9\u05DD \u05D0\u05EA\u05E8 \u05E7\u05D9\u05D9\u05DD \u05D1\u05DC\u05D9 \u05DC\u05E9\u05E0\u05D5\u05EA \u05D0\u05EA \u05D4\u05E2\u05D9\u05E6\u05D5\u05D1 \u05D0\u05D5 \u05D4\u05DE\u05E1\u05D2\u05E8\u05EA.", "Move an existing site without changing its design or framework."),
21967
22006
  n("text-guest", "agent", "site.guest / site.guest-sample", "\u05D0\u05EA\u05E8 \u05D6\u05DE\u05E0\u05D9: \u05D4\u05DE\u05D2\u05D1\u05DC\u05D5\u05EA, \u05D5\u05DE\u05D4 \u05DC\u05E9\u05D0\u05D5\u05DC \u05D0\u05EA \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8.", "A temporary site: the limits, and what to ask the owner."),
21968
22007
  n("text-addons", "agent", "core.workflow-frame", "\u05D4\u05DE\u05E1\u05D2\u05E8\u05EA \u05E9\u05DC \u05DB\u05DC \u05EA\u05D5\u05E1\u05E3. \u05D4\u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05E2\u05E6\u05DE\u05DD \u05D1\u05E2\u05DE\u05D5\u05D3 \u05D4\u05EA\u05D5\u05E1\u05E4\u05D9\u05DD.", "The frame of every add-on. The add-ons themselves are on the marketplace page.")
@@ -21974,6 +22013,7 @@ var CLI_MAP_EDGES = [
21974
22013
  e("page-new", "cmd-start"),
21975
22014
  e("page-site", "cmd-start"),
21976
22015
  e("page-refresh", "cmd-start"),
22016
+ e("page-addons", "cmd-start"),
21977
22017
  e("page-move", "cmd-start"),
21978
22018
  e("cmd-start", "api-starts"),
21979
22019
  e("cmd-start", "cmd-login"),
@@ -21984,6 +22024,7 @@ var CLI_MAP_EDGES = [
21984
22024
  e("cmd-start", "text-details"),
21985
22025
  e("cmd-start", "text-update"),
21986
22026
  e("cmd-start", "text-refresh"),
22027
+ e("cmd-start", "text-run-addons"),
21987
22028
  e("cmd-start", "text-move"),
21988
22029
  e("cmd-start", "text-guest"),
21989
22030
  e("cmd-login", "api-device"),
@@ -22007,6 +22048,7 @@ var CLI_MAP_EDGES = [
22007
22048
  e("cmd-rollback", "api-promote"),
22008
22049
  e("cmd-start", "cmd-brand"),
22009
22050
  e("page-move-url", "cmd-start"),
22051
+ e("cmd-start", "text-migrate-keep"),
22010
22052
  e("cmd-start", "text-migrate"),
22011
22053
  e("cmd-start", "cmd-migrate"),
22012
22054
  e("cmd-blocks", "api-blocks"),
@@ -22019,17 +22061,6 @@ var CLI_MAP_EDGES = [
22019
22061
  e("cmd-env", "api-env")
22020
22062
  ];
22021
22063
 
22022
- // ../shared/src/domain-sales.ts
22023
- var IL_TLDS = ["co.il", "org.il", "net.il"];
22024
- var DEFAULT_LIVEDNS_POINTS = { 5: 9100, 10: 8900, 20: 8700, 50: 8500, 100: 8200 };
22025
- var pointCost = (points, pack) => Math.round(points[pack] / (1 + VAT_RATE));
22026
- var DEFAULT_DOMAIN_REGISTRARS = {
22027
- cloudflare: { enabled: true, feeRate: 0.03, maxUsdCentsPerDay: 1e4 },
22028
- livedns: { enabled: true, feeRate: 0.01, pack: 5, costAgorot: pointCost(DEFAULT_LIVEDNS_POINTS, 5) },
22029
- manual: { enabled: true, feeRate: 0.01, costAgorot: 7500 }
22030
- };
22031
- var LIVEDNS_TLDS = [...IL_TLDS, "com", "net", "org"];
22032
-
22033
22064
  // ../shared/src/env-scopes.ts
22034
22065
  var ENV_KEYS = {
22035
22066
  DEPLOYAI_SPACE: { scope: "own", section: "app", required: ["local", "server"], sample: { local: "dev", server: "prod" }, about: "Which entry of packages/shared/src/spaces.ts this machine runs: dev on your computer, prod on the server. Every Cloudflare name, bucket and address comes from there." },
@@ -22183,6 +22214,8 @@ var BUILD_WITH = [
22183
22214
  "Images: resize at build time or serve them as they are; no native image modules at runtime.",
22184
22215
  // D-616: an icon is part of a finished site, and the command keeps one the site has.
22185
22216
  "Icon: every site has one. npx deployai@latest brand favicon keeps the one it has, or makes one from the site itself: its logo, or the first letter of its name in its own color.",
22217
+ // D-661: the site carries its owner's name. Our badge comes with the Free plan, so nothing here may hide it (D-179).
22218
+ `Footer: the site carries its own name, not its builder's. No "Built with" or "Powered by" credit for a platform or tool. Use \xA9 <year> <name>, with a year that follows the date. Ask the owner, Remove or Keep, about a credit to a real designer or agency. Keep a credit a template's license requires. Never remove or hide the DeployAI badge: the hosting adds it on the Free plan, and a paid plan removes it.`,
22186
22219
  "Passwords: bcryptjs or Web Crypto, never native bcrypt.",
22187
22220
  // D-633: Safari on an iPhone is its own engine, so every site gets these whatever add-ons it has.
22188
22221
  "iPhone: Safari is its own browser engine, so working in Chrome or on Android proves nothing. Full height sections use svh or dvh, never 100vh. Typing fields are at least 16px, or the page zooms. A video that plays by itself has muted and playsinline. Bars fixed to the bottom pad with env(safe-area-inset-bottom). Nothing needs a hover. Newer CSS and browser features need a working fallback.",
@@ -22411,7 +22444,7 @@ ${t.join("\n")}` : "tags: []",
22411
22444
  return { file: file2, text: front + (p.content?.rendered ?? "").replace(sameHost, "").trim() + "\n" };
22412
22445
  });
22413
22446
  }
22414
- var AGENT_STAGES = ["scanning", "building", "preview_ready", "customer_review", "live", "blocked"];
22447
+ var AGENT_STAGES = ["scanning", "building", "first_look", "preview_ready", "customer_review", "live", "blocked"];
22415
22448
  var STAGE_NOTE_MAX = 300;
22416
22449
  var isAgentStage = (s) => AGENT_STAGES.includes(s);
22417
22450
  var stageNote = (s) => (s ?? "").replace(/[\u0000-\u001f\u007f]+/g, " ").replace(/\s+/g, " ").trim().slice(0, STAGE_NOTE_MAX);
@@ -22671,6 +22704,33 @@ function logoInPage(html) {
22671
22704
  }
22672
22705
  return null;
22673
22706
  }
22707
+ var NOT_WORD_BEFORE = "(?<![\\p{L}\\p{N}])";
22708
+ var NOT_WORD_AFTER = "(?![\\p{L}\\p{N}])";
22709
+ var BUILDER_NAMES = "wix(?:\\.com)?|squarespace|wordpress(?:\\.(?:com|org))?|webflow|shopify|woocommerce|weebly|godaddy|jimdo|elementor|wpbakery|divi|lovable|bolt(?:\\.new)?|v0|replit|base44|manus|framer|astro|next\\.?js|nuxt|gatsby|hostinger|vercel|netlify|cloudflare|github\\s+pages|durable|site123|mobirise|duda|webnode|ucraft|tilda|carrd|bluehost|hostgator|cursor|claude|chatgpt|gemini|\u05D5\u05D5\u05D9\u05E7\u05E1|\u05D5\u05D9\u05E7\u05E1|\u05D5\u05D5\u05E8\u05D3\u05E4\u05E8\u05E1|\u05D5\u05E8\u05D3\u05E4\u05E8\u05E1|\u05E9\u05D5\u05E4\u05D9\u05E4\u05D9\u05D9";
22710
+ var BUILDER_CREDITS = [
22711
+ new RegExp(`${NOT_WORD_BEFORE}(?:proudly\\s+)?(?:built|made|created|designed|developed|powered|hosted|published|generated|running|runs|edit|site|website)(?:\\s+\\p{L}+)?\\s+(?:with|by|on|using|in|at)\\s+(?:the\\s+)?(?:${BUILDER_NAMES})${NOT_WORD_AFTER}`, "giu"),
22712
+ new RegExp(`${NOT_WORD_BEFORE}just\\s+another\\s+wordpress\\s+site${NOT_WORD_AFTER}`, "giu"),
22713
+ new RegExp(`${NOT_WORD_BEFORE}(?:\u05E0\u05D1\u05E0\u05D4|\u05E0\u05D1\u05E0\u05EA\u05D4|\u05E0\u05D5\u05E6\u05E8|\u05E0\u05D5\u05E6\u05E8\u05D4|\u05D1\u05E0\u05D5\u05D9|\u05D1\u05E0\u05D5\u05D9\u05D4|\u05DE\u05D5\u05E4\u05E2\u05DC|\u05DE\u05D5\u05E4\u05E2\u05DC\u05EA|\u05DE\u05D1\u05D5\u05E1\u05E1|\u05DE\u05D1\u05D5\u05E1\u05E1\u05EA|\u05DE\u05D0\u05D5\u05D7\u05E1\u05DF|\u05DE\u05D0\u05D5\u05D7\u05E1\u05E0\u05EA|\u05DE\u05EA\u05D0\u05E8\u05D7|\u05DE\u05EA\u05D0\u05E8\u05D7\u05EA)\\s+(?:\u05D1-?|\u05E2\u05DC\\s+\u05D9\u05D3\u05D9\\s+|\u05D1\u05D0\u05DE\u05E6\u05E2\u05D5\u05EA\\s+|\u05E2\u05DD\\s+|\u05E2\u05DC\\s+)\\s*(?:${BUILDER_NAMES})${NOT_WORD_AFTER}`, "giu")
22714
+ ];
22715
+ var BUILDER_TRACES = [
22716
+ /<meta\b[^>]*\bname=["']?generator\b[^>]*>/gi,
22717
+ /lovable-badge|edit-with-lovable|cdn\.gpteng\.co|wix-?ads|webflow-badge|framer-badge|bolt-badge|replit-badge/gi,
22718
+ new RegExp(`<title\\b[^>]*>[^<]*[|\\-\u2013\u2014:\xB7]\\s*(?:${BUILDER_NAMES})\\s*</title>`, "giu")
22719
+ ];
22720
+ var FOOTER_TAIL = 1500;
22721
+ var pageText = (html) => html.replace(/<!--[\s\S]*?-->/g, " ").replace(/<(script|style)\b[\s\S]*?<\/\1\s*>/gi, " ").replace(/<[^>]*>/g, " ").replace(/&nbsp;|&#160;/gi, " ").replace(/\s+/g, " ");
22722
+ function builderCredits(html) {
22723
+ const found = /* @__PURE__ */ new Set();
22724
+ const say = (text) => {
22725
+ const t = text.replace(/\s+/g, " ").trim();
22726
+ found.add(t.length > 80 ? `${t.slice(0, 77)}...` : t);
22727
+ };
22728
+ const footers = [...html.matchAll(/<footer\b[\s\S]*?<\/footer\s*>/gi)].map((m) => pageText(m[0])).join(" ");
22729
+ const end = footers || pageText(html).slice(-FOOTER_TAIL);
22730
+ for (const re of BUILDER_CREDITS) for (const m of end.matchAll(re)) say(m[0]);
22731
+ for (const re of BUILDER_TRACES) for (const m of html.matchAll(re)) say(m[0]);
22732
+ return [...found];
22733
+ }
22674
22734
 
22675
22735
  // ../shared/src/deploy-tools.ts
22676
22736
  var AI_AGENT_NAMES = [
@@ -22868,7 +22928,7 @@ var M = {
22868
22928
  pasteFix: " Paste the prompt below into your AI editor, then run: npx deployai@latest check",
22869
22929
  copied: " (copied to clipboard)",
22870
22930
  runDeploy: ' Run: npx deployai@latest deploy -m "<message>"',
22871
- moveOfferGranted: "Moved from /move: the site got {n} add-ons free. Run them all with: npx deployai@latest addons run",
22931
+ moveOfferGranted: "Moved from /move: the site got {n} add-ons free. They wait until the move is done, and the last step offers them.",
22872
22932
  moveOfferCap: "The free add-ons for moved sites were already used on 3 sites of this account.",
22873
22933
  moveOfferOver: "The free add-ons offer for moved sites is over.",
22874
22934
  initHint: " So your agent follows the DeployAI rules, run: npx deployai@latest init",
@@ -22919,12 +22979,18 @@ var M = {
22919
22979
  promoteReady: " After the owner approves the preview: npx deployai@latest promote v{n} (to put it live)",
22920
22980
  askOwner: ' Version {n} is ready and not live. Ask the owner: "Version {n} is ready. Do you want to put it live?"',
22921
22981
  showPreview: " Send them the preview first: {url}",
22982
+ creditLeft: " The site still shows a builder's credit: {text}",
22983
+ creditFix: " Remove it and put the site's own name and the year in its place, unless the owner asked to keep it.",
22922
22984
  askLiveFirst: "Put it live as soon as the build is done? No shows you the preview first. (y/N) ",
22923
22985
  askLiveNow: "Put v{n} live now? (y/N) ",
22924
22986
  waitBuild: "Waiting for the build of v{n}. Ctrl+C stops the waiting, not the build.",
22925
22987
  waitState: " v{n}: {s}",
22926
22988
  buildSlow: "The build of v{n} is taking longer than usual.",
22927
22989
  liveNow: "v{n} is live: {url}",
22990
+ closedHere: "This site opens only to visitors from {countries}. From here ({country}) it shows a blocked page.",
22991
+ closedHereOpen: " Open it to {country}: {url}",
22992
+ closedHereAsk: " Ask the site owner to open it to {country}.",
22993
+ closedHereVpn: " Or use a VPN through a country it is open to.",
22928
22994
  promoteLater: " To put it live later: npx deployai@latest promote v{n}",
22929
22995
  notPublished: "not published yet",
22930
22996
  none: "none",
@@ -23026,7 +23092,8 @@ var M = {
23026
23092
  sqlDestructive: "These remove or overwrite data, and a rollback does not bring it back:",
23027
23093
  sqlRunningNow: "The database changes of v{n} are already running. It goes live when they finish.",
23028
23094
  sqlRunningNowShort: "The database changes are already running. The version goes live when they finish: {url}",
23029
- sqlOwnerOnly: "Only the site owner approves database changes. Send them this page: {url}",
23095
+ sqlOwnerOnly: "This account does not own the site, and only the site's owner approves database changes. Send the owner this page: {url}\nIf you own the site, log in with the account that owns it: npx deployai@latest login. Then run this again.",
23096
+ sqlNotOwner: "This CLI is logged in as {account}, which does not own the site, and only the site's owner approves database changes. Send the owner this page: {url}\nIf you own the site, log in with the account that owns it: npx deployai@latest login. Then run this again.",
23030
23097
  sqlDashboard: "These database changes are sorted out in the dashboard: {url}",
23031
23098
  sqlTypeDatabase: "To run them and put v{n} live, type the database name ({db}): ",
23032
23099
  sqlAskRun: "Run them on {db} and put v{n} live? (y/N) ",
@@ -23087,7 +23154,7 @@ var M = {
23087
23154
  pasteFix: " \u05D4\u05D3\u05D1\u05D9\u05E7\u05D5 \u05D0\u05EA \u05D4\u05E4\u05E8\u05D5\u05DE\u05E4\u05D8 \u05E9\u05DC\u05DE\u05D8\u05D4 \u05DC\u05E1\u05D5\u05DB\u05DF, \u05D5\u05D0\u05D6 \u05D4\u05E8\u05D9\u05E6\u05D5: npx deployai@latest check",
23088
23155
  copied: " (\u05D4\u05D5\u05E2\u05EA\u05E7)",
23089
23156
  runDeploy: ' \u05D4\u05E8\u05D9\u05E6\u05D5: npx deployai@latest deploy -m "<message>"',
23090
- moveOfferGranted: "\u05D4\u05D0\u05EA\u05E8 \u05E2\u05D1\u05E8 \u05DE /move \u05D5\u05E7\u05D9\u05D1\u05DC {n} \u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05D1\u05D7\u05D9\u05E0\u05DD. \u05DE\u05E8\u05D9\u05E6\u05D9\u05DD \u05D0\u05EA \u05DB\u05D5\u05DC\u05DD \u05E2\u05DD: npx deployai@latest addons run",
23157
+ moveOfferGranted: "\u05D4\u05D0\u05EA\u05E8 \u05E2\u05D1\u05E8 \u05DE /move \u05D5\u05E7\u05D9\u05D1\u05DC {n} \u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05D1\u05D7\u05D9\u05E0\u05DD. \u05D4\u05DD \u05DE\u05D7\u05DB\u05D9\u05DD \u05DC\u05E1\u05D5\u05E3 \u05D4\u05DE\u05E2\u05D1\u05E8, \u05D5\u05D4\u05E9\u05DC\u05D1 \u05D4\u05D0\u05D7\u05E8\u05D5\u05DF \u05DE\u05E6\u05D9\u05E2 \u05D0\u05D5\u05EA\u05DD.",
23091
23158
  moveOfferCap: "\u05D4\u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05D4\u05D7\u05D9\u05E0\u05DE\u05D9\u05D9\u05DD \u05DC\u05D0\u05EA\u05E8\u05D9\u05DD \u05E9\u05E2\u05D1\u05E8\u05D5 \u05DB\u05D1\u05E8 \u05E0\u05D5\u05E6\u05DC\u05D5 \u05D1 3 \u05D0\u05EA\u05E8\u05D9\u05DD \u05D1\u05D7\u05E9\u05D1\u05D5\u05DF \u05D4\u05D6\u05D4.",
23092
23159
  moveOfferOver: "\u05DE\u05D1\u05E6\u05E2 \u05D4\u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05D4\u05D7\u05D9\u05E0\u05DE\u05D9\u05D9\u05DD \u05DC\u05D0\u05EA\u05E8\u05D9\u05DD \u05E9\u05E2\u05D1\u05E8\u05D5 \u05D4\u05E1\u05EA\u05D9\u05D9\u05DD.",
23093
23160
  initHint: " \u05DB\u05D3\u05D9 \u05E9\u05D4\u05E1\u05D5\u05DB\u05DF \u05D9\u05E2\u05D1\u05D5\u05D3 \u05DC\u05E4\u05D9 \u05D4\u05DB\u05DC\u05DC\u05D9\u05DD \u05E9\u05DC DeployAI, \u05D4\u05E8\u05D9\u05E6\u05D5: npx deployai@latest init",
@@ -23138,12 +23205,18 @@ var M = {
23138
23205
  promoteReady: " \u05D0\u05D7\u05E8\u05D9 \u05E9\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05D0\u05D9\u05E9\u05E8 \u05D0\u05EA \u05D4\u05EA\u05E6\u05D5\u05D2\u05D4 \u05D4\u05DE\u05E7\u05D3\u05D9\u05DE\u05D4: npx deployai@latest promote v{n} (\u05DB\u05D3\u05D9 \u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05D0\u05D5\u05EA\u05D4 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8)",
23139
23206
  askOwner: ' \u05D2\u05E8\u05E1\u05D4 {n} \u05DE\u05D5\u05DB\u05E0\u05D4 \u05D5\u05E2\u05D5\u05D3 \u05DC\u05D0 \u05D1\u05D0\u05D5\u05D5\u05D9\u05E8. \u05E9\u05D0\u05DC\u05D5 \u05D0\u05EA \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8: "\u05D2\u05E8\u05E1\u05D4 {n} \u05DE\u05D5\u05DB\u05E0\u05D4. \u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05D0\u05D5\u05EA\u05D4 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8?"',
23140
23207
  showPreview: " \u05E9\u05DC\u05D7\u05D5 \u05E7\u05D5\u05D3\u05DD \u05D0\u05EA \u05D4\u05EA\u05E6\u05D5\u05D2\u05D4 \u05D4\u05DE\u05E7\u05D3\u05D9\u05DE\u05D4: {url}",
23208
+ creditLeft: " \u05D4\u05D0\u05EA\u05E8 \u05E2\u05D3\u05D9\u05D9\u05DF \u05DE\u05E6\u05D9\u05D2 \u05E7\u05E8\u05D3\u05D9\u05D8 \u05E9\u05DC \u05D1\u05D5\u05E0\u05D4 \u05D0\u05EA\u05E8\u05D9\u05DD: {text}",
23209
+ creditFix: " \u05D4\u05E1\u05D9\u05E8\u05D5 \u05D0\u05D5\u05EA\u05D5 \u05D5\u05E9\u05D9\u05DE\u05D5 \u05D1\u05DE\u05E7\u05D5\u05DE\u05D5 \u05D0\u05EA \u05E9\u05DD \u05D4\u05D0\u05EA\u05E8 \u05D5\u05D4\u05E9\u05E0\u05D4, \u05D0\u05DC\u05D0 \u05D0\u05DD \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05D1\u05D9\u05E7\u05E9 \u05DC\u05D4\u05E9\u05D0\u05D9\u05E8 \u05D0\u05D5\u05EA\u05D5.",
23141
23210
  askLiveFirst: "\u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05DE\u05D9\u05D3 \u05DB\u05E9\u05D4\u05D1\u05E0\u05D9\u05D9\u05D4 \u05DE\u05E1\u05EA\u05D9\u05D9\u05DE\u05EA? \u05DC\u05D0 \u05DE\u05E6\u05D9\u05D2 \u05E7\u05D5\u05D3\u05DD \u05D0\u05EA \u05D4\u05EA\u05E6\u05D5\u05D2\u05D4 \u05D4\u05DE\u05E7\u05D3\u05D9\u05DE\u05D4. (y/N) ",
23142
23211
  askLiveNow: "\u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05D0\u05EA v{n} \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05E2\u05DB\u05E9\u05D9\u05D5? (y/N) ",
23143
23212
  waitBuild: "\u05DE\u05D7\u05DB\u05D9\u05DD \u05DC\u05D1\u05E0\u05D9\u05D9\u05D4 \u05E9\u05DC v{n}. Ctrl+C \u05DE\u05E4\u05E1\u05D9\u05E7 \u05D0\u05EA \u05D4\u05D4\u05DE\u05EA\u05E0\u05D4, \u05DC\u05D0 \u05D0\u05EA \u05D4\u05D1\u05E0\u05D9\u05D9\u05D4.",
23144
23213
  waitState: " v{n}: {s}",
23145
23214
  buildSlow: "\u05D4\u05D1\u05E0\u05D9\u05D9\u05D4 \u05E9\u05DC v{n} \u05DC\u05D5\u05E7\u05D7\u05EA \u05D9\u05D5\u05EA\u05E8 \u05D6\u05DE\u05DF \u05DE\u05D4\u05E8\u05D2\u05D9\u05DC.",
23146
23215
  liveNow: "v{n} \u05D1\u05D0\u05D5\u05D5\u05D9\u05E8: {url}",
23216
+ closedHere: "\u05D4\u05D0\u05EA\u05E8 \u05E4\u05EA\u05D5\u05D7 \u05E8\u05E7 \u05DC\u05DE\u05D1\u05E7\u05E8\u05D9\u05DD \u05DE: {countries}. \u05DE\u05DB\u05D0\u05DF ({country}) \u05DE\u05D5\u05E6\u05D2 \u05D3\u05E3 \u05D7\u05E1\u05D5\u05DD.",
23217
+ closedHereOpen: " \u05E4\u05EA\u05D7\u05D5 \u05D0\u05D5\u05EA\u05D5 \u05D2\u05DD \u05DC\u05BE{country}: {url}",
23218
+ closedHereAsk: " \u05D1\u05E7\u05E9\u05D5 \u05DE\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05DC\u05E4\u05EA\u05D5\u05D7 \u05D0\u05D5\u05EA\u05D5 \u05D2\u05DD \u05DC\u05BE{country}.",
23219
+ closedHereVpn: " \u05D0\u05D5 \u05D4\u05E9\u05EA\u05DE\u05E9\u05D5 \u05D1\u05BEVPN \u05D3\u05E8\u05DA \u05DE\u05D3\u05D9\u05E0\u05D4 \u05E9\u05D4\u05D0\u05EA\u05E8 \u05E4\u05EA\u05D5\u05D7 \u05D1\u05D4.",
23147
23220
  promoteLater: " \u05DB\u05D3\u05D9 \u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05D0\u05D7\u05E8 \u05DB\u05DA: npx deployai@latest promote v{n}",
23148
23221
  notPublished: "\u05E2\u05D3\u05D9\u05D9\u05DF \u05DC\u05D0 \u05D1\u05D0\u05D5\u05D5\u05D9\u05E8",
23149
23222
  none: "\u05D0\u05D9\u05DF",
@@ -23245,7 +23318,8 @@ var M = {
23245
23318
  sqlDestructive: "\u05D0\u05DC\u05D4 \u05DE\u05D5\u05D7\u05E7\u05D9\u05DD \u05D0\u05D5 \u05D3\u05D5\u05E8\u05E1\u05D9\u05DD \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD, \u05D5\u05D7\u05D6\u05E8\u05D4 \u05DC\u05D2\u05E8\u05E1\u05D4 \u05E7\u05D5\u05D3\u05DE\u05EA \u05DC\u05D0 \u05DE\u05D7\u05D6\u05D9\u05E8\u05D4 \u05D0\u05D5\u05EA\u05DD:",
23246
23319
  sqlRunningNow: "\u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05E9\u05DC v{n} \u05DB\u05D1\u05E8 \u05E8\u05E6\u05D9\u05DD. \u05D4\u05D9\u05D0 \u05E2\u05D5\u05DC\u05D4 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05DB\u05E9\u05D4\u05DD \u05DE\u05E1\u05EA\u05D9\u05D9\u05DE\u05D9\u05DD.",
23247
23320
  sqlRunningNowShort: "\u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05DB\u05D1\u05E8 \u05E8\u05E6\u05D9\u05DD. \u05D4\u05D2\u05E8\u05E1\u05D4 \u05E2\u05D5\u05DC\u05D4 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05DB\u05E9\u05D4\u05DD \u05DE\u05E1\u05EA\u05D9\u05D9\u05DE\u05D9\u05DD: {url}",
23248
- sqlOwnerOnly: "\u05E8\u05E7 \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05DE\u05D0\u05E9\u05E8 \u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD. \u05E9\u05DC\u05D7\u05D5 \u05D0\u05EA \u05D4\u05D3\u05E3 \u05D4\u05D6\u05D4 \u05DC\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8: {url}",
23321
+ sqlOwnerOnly: "\u05D4\u05D7\u05E9\u05D1\u05D5\u05DF \u05D4\u05D6\u05D4 \u05D0\u05D9\u05E0\u05D5 \u05D4\u05D1\u05E2\u05DC\u05D9\u05DD \u05E9\u05DC \u05D4\u05D0\u05EA\u05E8, \u05D5\u05E8\u05E7 \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05DE\u05D0\u05E9\u05E8 \u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD. \u05E9\u05DC\u05D7\u05D5 \u05D0\u05EA \u05D4\u05D3\u05E3 \u05D4\u05D6\u05D4 \u05DC\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8: {url}\n\u05D0\u05DD \u05D4\u05D0\u05EA\u05E8 \u05E9\u05DC\u05DB\u05DD, \u05D4\u05EA\u05D7\u05D1\u05E8\u05D5 \u05E2\u05DD \u05D4\u05D7\u05E9\u05D1\u05D5\u05DF \u05E9\u05D1\u05D1\u05E2\u05DC\u05D5\u05EA\u05D5 \u05D4\u05D0\u05EA\u05E8: npx deployai@latest login \u05D5\u05D0\u05D6 \u05D4\u05E8\u05D9\u05E6\u05D5 \u05E9\u05D5\u05D1.",
23322
+ sqlNotOwner: "\u05D4-CLI \u05DE\u05D7\u05D5\u05D1\u05E8 \u05D1\u05EA\u05D5\u05E8 {account}, \u05E9\u05D0\u05D9\u05E0\u05D5 \u05D4\u05D1\u05E2\u05DC\u05D9\u05DD \u05E9\u05DC \u05D4\u05D0\u05EA\u05E8, \u05D5\u05E8\u05E7 \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05DE\u05D0\u05E9\u05E8 \u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD. \u05E9\u05DC\u05D7\u05D5 \u05D0\u05EA \u05D4\u05D3\u05E3 \u05D4\u05D6\u05D4 \u05DC\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8: {url}\n\u05D0\u05DD \u05D4\u05D0\u05EA\u05E8 \u05E9\u05DC\u05DB\u05DD, \u05D4\u05EA\u05D7\u05D1\u05E8\u05D5 \u05E2\u05DD \u05D4\u05D7\u05E9\u05D1\u05D5\u05DF \u05E9\u05D1\u05D1\u05E2\u05DC\u05D5\u05EA\u05D5 \u05D4\u05D0\u05EA\u05E8: npx deployai@latest login \u05D5\u05D0\u05D6 \u05D4\u05E8\u05D9\u05E6\u05D5 \u05E9\u05D5\u05D1.",
23249
23323
  sqlDashboard: "\u05D0\u05EA \u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D4\u05D0\u05DC\u05D4 \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05DE\u05E1\u05D3\u05E8\u05D9\u05DD \u05D1\u05DC\u05D5\u05D7 \u05D4\u05D1\u05E7\u05E8\u05D4: {url}",
23250
23324
  sqlTypeDatabase: "\u05DB\u05D3\u05D9 \u05DC\u05D4\u05E8\u05D9\u05E5 \u05D0\u05D5\u05EA\u05DD \u05D5\u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05D0\u05EA v{n} \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8, \u05D4\u05E7\u05DC\u05D9\u05D3\u05D5 \u05D0\u05EA \u05E9\u05DD \u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD ({db}): ",
23251
23325
  sqlAskRun: "\u05DC\u05D4\u05E8\u05D9\u05E5 \u05D0\u05D5\u05EA\u05DD \u05E2\u05DC {db} \u05D5\u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05D0\u05EA v{n} \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8? (y/N) ",
@@ -23291,7 +23365,7 @@ function messages(root) {
23291
23365
  }
23292
23366
 
23293
23367
  // src/version.ts
23294
- var CLI_VERSION = "0.1.0-beta.23";
23368
+ var CLI_VERSION = "0.1.0-beta.25";
23295
23369
 
23296
23370
  // src/api.ts
23297
23371
  function apiContext(apiFlag) {
@@ -24261,6 +24335,10 @@ ${KEEP_DATA_RULES.join("\n")}
24261
24335
 
24262
24336
  ${runCommandsRule()}
24263
24337
 
24338
+ ## Asking the owner
24339
+
24340
+ ${ASK_OWNER_RULE}
24341
+
24264
24342
  Never stop building for an account, a plan or a limit. Build what the owner asks; say once, in one plain line, what going live will need, and ask about it only at the deploy step.
24265
24343
 
24266
24344
  ## When to deploy
@@ -24361,7 +24439,8 @@ var PROMPT_RULES = [
24361
24439
  "Explain every step to the user in simple words, in the language they write to you in.",
24362
24440
  "For the database, use D1 as shown in the DeployAI CRUD sample.",
24363
24441
  "Follow DEPLOYAI.md for every future change. If it is missing, run: npx deployai@latest init",
24364
- runCommandsRule()
24442
+ runCommandsRule(),
24443
+ ASK_OWNER_RULE
24365
24444
  ];
24366
24445
  var DATA_CODES = /* @__PURE__ */ new Set(["fs_write", "unsupported_db_postgres", "unsupported_db_mysql", "unsupported_db_mongodb", "unsupported_db_sqlite_file", "native_module_bcrypt"]);
24367
24446
  var MAX_LOCATIONS = 3;
@@ -24771,7 +24850,8 @@ function allowCommand(tool) {
24771
24850
  ignoreInGit(root, rel);
24772
24851
  }
24773
24852
  out(added ? `Done: Claude Code runs npx deployai@latest commands in this folder without asking (${rel}).` : "Already allowed in this folder.");
24774
- out("Other commands still ask. The owner can take it back with /permissions.");
24853
+ out("Other commands still ask, and going live still waits for the owner. The owner can take it back with /permissions.");
24854
+ out(`If a safety check of the tool still stops a command, do not run it another way: send the owner ${allowCommandsUrl()} (D-691).`);
24775
24855
  return;
24776
24856
  }
24777
24857
  if (picked === "cursor") {
@@ -24941,8 +25021,41 @@ function pageAssets(html, base) {
24941
25021
  }
24942
25022
  add(html.match(/<meta[^>]+property=["']og:image["'][^>]*content=["']([^"']+)/i)?.[1]);
24943
25023
  for (const m of html.matchAll(/url\(["']?([^"')]+\.(?:jpe?g|png|gif|webp|svg|avif))/gi)) add(m[1]);
25024
+ const own2 = (u) => {
25025
+ if (!u) return;
25026
+ try {
25027
+ if (new URL(u.trim(), base).hostname.replace(/^www\./, "") === new URL(base).hostname.replace(/^www\./, "")) add(u);
25028
+ } catch {
25029
+ }
25030
+ };
25031
+ for (const m of html.matchAll(/<script\b[^>]*\ssrc=["']([^"']+)/gi)) own2(m[1]);
25032
+ for (const u of stylesheetLinks(html, base, 50)) own2(u);
25033
+ return [...found];
25034
+ }
25035
+ function stylesheetAssets(css, cssUrl) {
25036
+ const host = new URL(cssUrl).hostname.replace(/^www\./, "");
25037
+ const found = /* @__PURE__ */ new Set();
25038
+ for (const m of css.matchAll(/url\(\s*["']?([^"')]+)/gi)) {
25039
+ const u = m[1].trim();
25040
+ if (u.startsWith("data:") || u.startsWith("#")) continue;
25041
+ try {
25042
+ const url2 = new URL(u, cssUrl);
25043
+ url2.hash = "";
25044
+ if (!url2.search) url2.search = "";
25045
+ if (/^https?:$/.test(url2.protocol) && url2.hostname.replace(/^www\./, "") === host) found.add(url2.toString());
25046
+ } catch {
25047
+ }
25048
+ }
24944
25049
  return [...found];
24945
25050
  }
25051
+ async function addStylesheetAssets(assets) {
25052
+ for (const url2 of [...assets].filter((a) => /\.css(\?|$)/i.test(a)).slice(0, 50)) {
25053
+ const res = await get(url2, "text/css,*/*;q=0.8");
25054
+ if (!res?.ok) continue;
25055
+ stylesheetAssets(await res.text(), url2).forEach((a) => assets.add(a));
25056
+ await sleep2(PAUSE_MS);
25057
+ }
25058
+ }
24946
25059
  var ICON_MAX_BYTES = 2 * 1024 * 1024;
24947
25060
  async function saveOldIcons(html, pageUrl, origin, dir) {
24948
25061
  const wanted = [];
@@ -25030,6 +25143,7 @@ async function migrateScanCommand(root, raw, opts = {}) {
25030
25143
  }
25031
25144
  };
25032
25145
  await Promise.all(Array.from({ length: SCAN_WORKERS }, worker));
25146
+ await addStylesheetAssets(assets);
25033
25147
  const wordpressApi = platform3 === "wordpress" ? await wordpressContent(base, dir) : false;
25034
25148
  if (wordpressApi) {
25035
25149
  const media = readJson2(join9(dir, "content", "media.json")) ?? [];
@@ -25046,7 +25160,7 @@ async function migrateScanCommand(root, raw, opts = {}) {
25046
25160
  out();
25047
25161
  out(`Saved in ${rel}:`);
25048
25162
  out(` inventory.json ${pages.length} pages with their address, title, description and headings${broken ? ` (${broken} already broken on the old site)` : ""}`);
25049
- out(` assets.json ${assets.size} images and files`);
25163
+ out(` assets.json ${assets.size} images, stylesheets, scripts, fonts and files`);
25050
25164
  if (icons) out(` icons/ ${icons} icons and logo of the old site, for: npx deployai@latest brand favicon`);
25051
25165
  if (wordpressApi) {
25052
25166
  out(" content/ the WordPress pages, posts, categories, tags, media and authors as JSON");
@@ -25083,7 +25197,8 @@ async function migrateMediaCommand(root) {
25083
25197
  const target = mediaTarget(dir, url2);
25084
25198
  const res = target ? await get(url2, "*/*") : null;
25085
25199
  const size = Number(res?.headers.get("content-length") ?? 0);
25086
- if (!target || !res?.ok || !res.body || size > MEDIA_FILE_CAP) {
25200
+ const pageForFile = !/\.html?$/i.test(new URL(url2).pathname) && /text\/html/i.test(res?.headers.get("content-type") ?? "");
25201
+ if (!target || !res?.ok || !res.body || size > MEDIA_FILE_CAP || pageForFile) {
25087
25202
  if (!state.failed.includes(url2)) state.failed.push(url2);
25088
25203
  done.add(url2);
25089
25204
  continue;
@@ -25161,6 +25276,7 @@ async function migrateVerifyCommand(root, previewRaw) {
25161
25276
  if (!hosts.length) throw new CliError("Nothing scanned yet. Run: npx deployai@latest migrate scan <the old site address>", 1, "usage");
25162
25277
  const redirects = allowedRedirects(root);
25163
25278
  const findings = [];
25279
+ const credits = /* @__PURE__ */ new Map();
25164
25280
  let checked = 0;
25165
25281
  for (const host of hosts) {
25166
25282
  const inv = readJson2(join9(hostDir(root, host), "inventory.json"));
@@ -25174,6 +25290,7 @@ async function migrateVerifyCommand(root, previewRaw) {
25174
25290
  u.searchParams.delete("deployai_preview");
25175
25291
  const body = res.ok ? await res.text() : "";
25176
25292
  const seo = body ? readPageSeo(body) : null;
25293
+ for (const c of builderCredits(body)) if (!credits.has(c)) credits.set(c, old.path);
25177
25294
  next = { status: res.status, finalPath: u.pathname + u.search, title: seo?.title ?? null, description: seo?.description ?? null };
25178
25295
  }
25179
25296
  const f = comparePage(old, next, redirects.get(old.path.split("?")[0]));
@@ -25183,7 +25300,13 @@ async function migrateVerifyCommand(root, previewRaw) {
25183
25300
  }
25184
25301
  const words = { missing: "not found on the preview", moved: "moved to", error: "answers", title_lost: "lost its title", description_lost: "lost its description" };
25185
25302
  const report2 = join9(root, MIGRATION_DIR, "verify.json");
25186
- writeJson(report2, { checkedAt: (/* @__PURE__ */ new Date()).toISOString(), preview: preview.origin, checked, findings });
25303
+ writeJson(report2, { checkedAt: (/* @__PURE__ */ new Date()).toISOString(), preview: preview.origin, checked, findings, credits: [...credits.keys()] });
25304
+ if (credits.size) {
25305
+ out(`A builder's credit is still on the preview:`);
25306
+ for (const [text, path] of credits) out(` ${path} ${text}`);
25307
+ out("Remove each and put the site's own name and the year in its place, unless the owner asked to keep it, then deploy again and run verify again.");
25308
+ process.exitCode = 1;
25309
+ }
25187
25310
  if (!findings.length) {
25188
25311
  out(`All ${checked} old addresses open on the preview with their title and description.`);
25189
25312
  return;
@@ -25504,6 +25627,17 @@ async function statusCommand(root, ctx) {
25504
25627
  const projectId = linkedProjectId(root);
25505
25628
  printStatus(root, ctx, projectId, await fetchStatus(ctx, projectId));
25506
25629
  }
25630
+ function printClosedHere(root, s) {
25631
+ if (!s.closedHere) return;
25632
+ const { country, countries, settingsUrl } = s.closedHere;
25633
+ const t = messages(root);
25634
+ const names = new Intl.DisplayNames([cliLang(root)], { type: "region" });
25635
+ const name = (code) => names.of(code) ?? code;
25636
+ out();
25637
+ out(t("closedHere", { countries: countries.map(name).join(", "), country: name(country) }));
25638
+ out(settingsUrl ? t("closedHereOpen", { country: name(country), url: settingsUrl }) : t("closedHereAsk", { country: name(country) }));
25639
+ out(t("closedHereVpn"));
25640
+ }
25507
25641
  function printStatus(root, ctx, projectId, s) {
25508
25642
  const p = s.project;
25509
25643
  const t = messages(root);
@@ -25521,6 +25655,7 @@ function printStatus(root, ctx, projectId, s) {
25521
25655
  [t("queue"), s.queue.running ? t("buildingNow") : s.queue.position > 0 ? queueText(s.queue.position, root) : t("idle")]
25522
25656
  ])
25523
25657
  );
25658
+ printClosedHere(root, s);
25524
25659
  if (s.latest?.goingLive) {
25525
25660
  out();
25526
25661
  out(t("goingLive", { n: s.latest.number }));
@@ -25577,6 +25712,9 @@ function printSqlPlan(root, plan) {
25577
25712
  for (const d of plan.destructive) out(` ${d.file}: ${d.statement}`);
25578
25713
  }
25579
25714
  }
25715
+ function notOwnerLine(t, plan) {
25716
+ return plan.account ? t("sqlNotOwner", { account: plan.account, url: plan.url }) : t("sqlOwnerOnly", { url: plan.url });
25717
+ }
25580
25718
  async function approveSqlStep(root, ctx, projectId, n2, approve) {
25581
25719
  const t = messages(root);
25582
25720
  const plan = await fetchSqlPlan(ctx, projectId, n2);
@@ -25586,7 +25724,7 @@ async function approveSqlStep(root, ctx, projectId, n2, approve) {
25586
25724
  }
25587
25725
  printSqlPlan(root, plan);
25588
25726
  out();
25589
- if (!plan.canApprove) throw new CliError(t("sqlOwnerOnly", { url: plan.url }), 1, "sql_owner_only");
25727
+ if (!plan.canApprove) throw new CliError(notOwnerLine(t, plan), 1, "sql_owner_only");
25590
25728
  if (!plan.database || plan.stuck.length) throw new CliError(t("sqlDashboard", { url: plan.url }), 1, "sql_dashboard");
25591
25729
  if (isInteractive()) {
25592
25730
  if (plan.destructive.length) {
@@ -25630,7 +25768,7 @@ async function sqlCommand(root, ctx, version2) {
25630
25768
  if (plan.migrationStatus !== "waiting" && plan.migrationStatus !== "failed") return;
25631
25769
  out();
25632
25770
  out(t("nextStep"));
25633
- if (!plan.canApprove) out(t("sqlOwnerOnly", { url: plan.url }));
25771
+ if (!plan.canApprove) out(notOwnerLine(t, plan));
25634
25772
  else if (plan.destructive.length) out(t("sqlAgentDestructive", { n: n2, url: plan.url }));
25635
25773
  else out(t("sqlAgentThen", { n: n2, hash: plan.hash }));
25636
25774
  }
@@ -25751,6 +25889,7 @@ async function deployVersion(root, ctx, opts, guest) {
25751
25889
  }
25752
25890
  await afterBuild(root, ctx, project.projectId, res.number, { live, pollMs: opts.pollMs ?? 3e3 });
25753
25891
  }
25892
+ var CREDIT_WAIT_MS = 1e4;
25754
25893
  var sleep3 = (ms2) => new Promise((r) => setTimeout(r, ms2));
25755
25894
  async function poll(root, ctx, projectId, n2, pollMs, maxMs, done) {
25756
25895
  const end = Date.now() + maxMs;
@@ -25778,6 +25917,7 @@ async function afterBuild(root, ctx, projectId, n2, o) {
25778
25917
  return;
25779
25918
  }
25780
25919
  const ready = built.latest?.number === n2 && built.latest.status === "ready" && built.project.liveVersion !== n2;
25920
+ if (ready && built.latest?.preview) await creditHint(root, built.latest.preview);
25781
25921
  const sqlWaits = ready && built.latest?.migrationStatus === "waiting";
25782
25922
  let approval = null;
25783
25923
  let live = o.live;
@@ -25810,6 +25950,7 @@ async function afterBuild(root, ctx, projectId, n2, o) {
25810
25950
  out();
25811
25951
  if (after?.project.liveVersion === n2 && !after.latest?.wentBack) {
25812
25952
  out(t("liveNow", { n: n2, url: after.project.url ?? "" }));
25953
+ printClosedHere(root, after);
25813
25954
  return;
25814
25955
  }
25815
25956
  if (!after) {
@@ -25819,6 +25960,19 @@ async function afterBuild(root, ctx, projectId, n2, o) {
25819
25960
  printStatus(root, ctx, projectId, after);
25820
25961
  process.exitCode = 1;
25821
25962
  }
25963
+ async function creditHint(root, url2) {
25964
+ try {
25965
+ const res = await fetch(url2, { headers: { accept: "text/html" }, signal: AbortSignal.timeout(CREDIT_WAIT_MS) });
25966
+ if (!res.ok || !/html/i.test(res.headers.get("content-type") ?? "")) return;
25967
+ const credits = builderCredits(await res.text());
25968
+ if (!credits.length) return;
25969
+ const t = messages(root);
25970
+ out(t("creditLeft", { text: credits.join(", ") }));
25971
+ out(t("creditFix"));
25972
+ out();
25973
+ } catch {
25974
+ }
25975
+ }
25822
25976
  function pageHint(res, root) {
25823
25977
  if (!res.page) return;
25824
25978
  const t = messages(root);
@@ -26179,7 +26333,7 @@ async function startCommand(cwd, ctx, id, opts = {}) {
26179
26333
  const empty = !filesIn(root).length;
26180
26334
  const starter = (kind === "new" || kind === "guest") && !sample && empty;
26181
26335
  const signedIn = Boolean(choices.projectId && tokenIfOwnApi(ctxNow));
26182
- const steps = startSteps(kind, { emptyFolder: kind === "update" && empty, starter, managed: Boolean(choices.migration?.requestId), signedIn });
26336
+ const steps = startSteps(kind, { emptyFolder: kind === "update" && empty, starter, managed: Boolean(choices.migration?.requestId), signedIn, addons: Boolean(choices.runAddons) });
26183
26337
  updateProject(root, { lang: langOf(choices.ownerLanguage) });
26184
26338
  const t = messages(root);
26185
26339
  if (sample && !sameSite) {
@@ -26251,6 +26405,7 @@ ${choices.brief}
26251
26405
  steps.forEach((s, i) => out(`${i + 1}. ${s.cmd ? `Run ${s.cmd}. ` : ""}${s.say}`));
26252
26406
  out();
26253
26407
  out(runCommandsRule(langOf(choices.ownerLanguage)));
26408
+ out(ASK_OWNER_RULE);
26254
26409
  out(START_FAIL_LINE);
26255
26410
  }
26256
26411
 
@@ -26273,7 +26428,7 @@ async function addonsCommand(root, ctx) {
26273
26428
  }
26274
26429
  const owned = r.addons.filter((a) => a.owned);
26275
26430
  out(owned.length ? "Add-ons of this site" : "This site has no add-ons yet.");
26276
- owned.forEach((a, i) => out(` ${String(i + 1).padStart(2)}. ${a.key.padEnd(17)} ${STATUS_WORDS[a.status] ?? a.status}`));
26431
+ owned.forEach((a, i) => out(` ${String(i + 1).padStart(2)}. ${a.key.padEnd(17)} ${a.outdated ? "out of date: the site changed after it ran" : STATUS_WORDS[a.status] ?? a.status}`));
26277
26432
  const forSale = r.addons.filter((a) => !a.owned && a.buyUrl);
26278
26433
  if (forSale.length) {
26279
26434
  out();
@@ -26286,10 +26441,11 @@ async function addonsCommand(root, ctx) {
26286
26441
  out("Every add-on of this site is done or skipped. To run one again: npx deployai@latest addon run <name>");
26287
26442
  return;
26288
26443
  }
26289
- out(`Next: ${r.next}. Run them all in one go: npx deployai@latest addons run (or one: npx deployai@latest addon run <name>)`);
26444
+ out(`Next: ${r.next}. To run what is waiting: npx deployai@latest addons run (or one: npx deployai@latest addon run <name>)`);
26290
26445
  }
26291
- async function addonsRunCommand(root, ctx) {
26446
+ async function addonsRunCommand(root, ctx, opts = {}) {
26292
26447
  requireToken(ctx);
26448
+ if (opts.all && opts.oneByOne) throw new CliError("Choose one: --one-by-one or --all.", 1, "usage");
26293
26449
  const projectId = linkedProjectId2(root);
26294
26450
  const r = await apiRequest(ctx, `/api/cli/addons?projectId=${encodeURIComponent(projectId)}`, AddonsResponse);
26295
26451
  if (!r.open) {
@@ -26302,10 +26458,27 @@ async function addonsRunCommand(root, ctx) {
26302
26458
  out(r.addons.some((a) => a.owned) ? "Every add-on of this site is done or skipped. To run one again: npx deployai@latest addon run <name>" : "This site has no add-ons yet. See them: npx deployai@latest addons");
26303
26459
  return;
26304
26460
  }
26305
- updateProject(root, { addonsAll: true });
26306
- out(`Running every add-on of this site in one go: ${todo.map((a) => a.key).join(", ")}.`);
26307
- out("Do each one fully, run npx deployai@latest check after it, and report it with addon done as it says; the next one starts right after, without asking. The owner still approves each plan before you change any file. Tell the owner in one line which add-on you are on.");
26308
- out();
26461
+ const all = opts.all === true || !opts.oneByOne && readProject(root)?.addonsAll === true;
26462
+ if (!all && !opts.oneByOne && todo.length > 1) {
26463
+ out(`This site has ${todo.length} add-ons waiting: ${todo.map((a) => a.key).join(", ")}.`);
26464
+ out('Ask the owner: "Run the add-ons one by one, or all at once?"');
26465
+ out("- One by one (recommended): after each add-on, choose whether to publish.");
26466
+ out(" Run: npx deployai@latest addons run --one-by-one");
26467
+ out("- All at once: they all finish first, then one publish at the end.");
26468
+ out(" Run: npx deployai@latest addons run --all");
26469
+ out("If the owner has no preference, use one by one.");
26470
+ return;
26471
+ }
26472
+ updateProject(root, { addonsAll: all });
26473
+ if (all) {
26474
+ out(`Running every add-on of this site in one go: ${todo.map((a) => a.key).join(", ")}.`);
26475
+ out('Do each one fully, build the site, run npx deployai@latest check after it, and report it with addon done as it says; the next one starts right after, without asking. Do not deploy between add-ons: tell the owner once, "I will publish once, after all the add-ons are done." The owner still approves each plan before you change any file. Tell the owner in one line which add-on you are on.');
26476
+ out();
26477
+ } else if (todo.length > 1) {
26478
+ out(`Running the add-ons of this site one by one: ${todo.map((a) => a.key).join(", ")}.`);
26479
+ out("The owner approves each plan before you change any file, and after each add-on chooses whether to publish and whether to go on.");
26480
+ out();
26481
+ }
26309
26482
  await addonNextCommand(root, ctx);
26310
26483
  }
26311
26484
  async function addonBuyCommand(root, ctx, key) {
@@ -26367,11 +26540,12 @@ async function addonDoneCommand(root, ctx, runId, opts) {
26367
26540
  const r = await apiRequest(ctx, `/api/cli/addons/runs/${encodeURIComponent(runId.trim())}`, AddonDoneResponse, { method: "POST", body: body.data });
26368
26541
  out(`Saved: add-on ${body.data.status}.`);
26369
26542
  const all = readProject(root)?.addonsAll === true;
26370
- if (r.next && all) out(`Next: ${r.next}. Run npx deployai@latest check, then at once: npx deployai@latest addon next`);
26543
+ if (r.next && all) out(`Next: ${r.next}. Do not deploy yet: everything goes up in one deploy after the last add-on. Run npx deployai@latest check, then at once: npx deployai@latest addon next`);
26371
26544
  else if (r.next) out(`Next: ${r.next}. Tell the site owner what is next, and only with their OK run: npx deployai@latest addon next`);
26372
26545
  else {
26373
26546
  if (all) updateProject(root, { addonsAll: false });
26374
26547
  out("Every add-on of this site is done or skipped.");
26548
+ if (all) out('Now the one publish. Run npx deployai@latest check, then ask the owner once, naming the site and its address: "Put it live, see a preview first, or not yet?" If a check waits for a preview, offer only a preview or not yet. Then run once: npx deployai@latest deploy -m "<the add-ons, in a few words>", with --live only if they chose to put it live. Run the checks that waited on that preview and fix what they find; deploy again only if a fix was needed.');
26375
26549
  }
26376
26550
  }
26377
26551
 
@@ -27145,15 +27319,15 @@ ${AGENT_FEEDBACK_RULES.join("\n\n")}
27145
27319
  migrate.command("media").description("download the images and files the old site uses, at their old paths; run again to go on").action((_opts, cmd) => migrateMediaCommand(root(cmd)));
27146
27320
  migrate.command("redirects").description("write public/_redirects for the old addresses that cannot stay (feeds, attachment pages)").action((_opts, cmd) => migrateRedirectsCommand(root(cmd)));
27147
27321
  migrate.command("verify").description("open every old address on the preview: lists pages that moved, are missing or lost their title or description").argument("<preview>", "the preview address deploy printed").action(async (preview, _opts, cmd) => migrateVerifyCommand(root(cmd), preview));
27148
- migrate.command("status").description("a managed move: report a stage to the request (scanning, building, preview_ready, customer_review, live, blocked)").argument("<stage>", "the stage").argument("[note]", "one line: the preview address, what is done, or why it is blocked").action((stage, note, _opts, cmd) => migrateStatusCommand(root(cmd), ctx(cmd), stage, note));
27322
+ migrate.command("status").description("a managed move: report a stage to the request (scanning, building, first_look, preview_ready, customer_review, live, blocked)").argument("<stage>", "the stage").argument("[note]", "one line: the preview address, what is done, or why it is blocked").action((stage, note, _opts, cmd) => migrateStatusCommand(root(cmd), ctx(cmd), stage, note));
27149
27323
  program.command("blocks").description("list our building blocks, or add one to this site (inbox, blog); never writes over a file").argument("[name]", "inbox or blog").action((name, _opts, cmd) => blocksCommand(root(cmd), ctx(cmd), name));
27150
27324
  const brand = program.command("brand").description("the site's icons and share image, made by code from the site's own name, colors and logo");
27151
27325
  brand.command("favicon").description("gives the site an icon if it has none: the old site's, else its logo, else a letter").option("--from <file>", "the logo or picture to use").option("--name <name>", "the site's name, for the letter").option("--color <#rrggbb>", "the background color").option("--force", "replace the icon the site has").option("--check", "only say whether the site has an icon").action((opts, cmd) => brandFaviconCommand(root(cmd), opts));
27152
27326
  brand.command("icons").description("makes every icon size and the 1200 by 630 share image from the site itself").option("--from <file>", "use this picture instead of the logo it finds").option("--name <name>", "correct the name it reads").option("--line <text>", "correct the line it reads").option("--color <#rrggbb>", "correct the color it reads").option("--check", "only list what is missing").action((opts, cmd) => brandIconsCommand(root(cmd), opts));
27153
27327
  brand.command("images").description("reports images too weak for where they show, by measuring them; never changes one").argument("[pages...]", "up to 10 page addresses to measure in a browser").option("--json", "print the result as JSON").action((pages, opts, cmd) => brandImagesCommand(root(cmd), pages, opts));
27154
- program.command("addons").description("the add-ons of this site: which it has, which are done and which is next; addons run runs them all in one go").argument("[action]", "run: every add-on that is not done, one after the other").action((action, _opts, cmd) => {
27328
+ program.command("addons").description("the add-ons of this site: which it has, which are done and which is next; addons run asks how to run what is waiting").argument("[action]", "run: the add-ons that are not done, one by one or all at once").option("--one-by-one", "after each add-on, the owner chooses whether to publish (recommended)").option("--all", "finish every add-on first, then one publish at the end").action((action, opts, cmd) => {
27155
27329
  if (!action) return addonsCommand(root(cmd), ctx(cmd));
27156
- if (action === "run") return addonsRunCommand(root(cmd), ctx(cmd));
27330
+ if (action === "run") return addonsRunCommand(root(cmd), ctx(cmd), opts);
27157
27331
  throw new CliError(`Unknown: addons ${action}. Use npx deployai@latest addons, or npx deployai@latest addons run`, 1, "usage");
27158
27332
  });
27159
27333
  const addon = program.command("addon").description("run the add-ons of this site, one at a time");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deployai",
3
- "version": "0.1.0-beta.23",
3
+ "version": "0.1.0-beta.25",
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",