klaudius 0.18.0 → 0.19.0

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.
@@ -0,0 +1,36 @@
1
+ import{appendFileSync as d}from"fs";import{tmpdir as k}from"os";import{join as y}from"path";var p=y(k(),"klaudius-wizard-debug.log"),w=process.env.KLAUDIUS_WIZARD_DEBUG==="1",m=!1;function H(e,t){if(w)try{m||(m=!0,d(p,`
2
+ === klaudius wizard debug session \u2014 ${new Date().toISOString()} ===
3
+ node ${process.version}, platform ${process.platform}, tty=${process.stdin.isTTY}
4
+ `));let o=`${Date.now()} `,s=t===void 0?"":" "+JSON.stringify(t,null,0).slice(0,400);d(p,o+e+s+`
5
+ `)}catch{}}var z=p,h=!1;function F(){if(h)return;h=!0;let e=process.exit.bind(process);process.exit=(t=>{let o=new Error("process.exit called").stack??"(no stack)";return H("process.exit called",{code:t,stack:o.split(`
6
+ `).slice(0,8).join(" | ")}),e(t)})}function R(e,t,o){if(e==="custom")return[];if(!Object.hasOwn(g,e))return[];let s=g[e];return[{label:`standard ${s.label}`,smtpHost:s.smtpHost,imapHost:s.imapHost},...s.altHostSets??[]].filter(n=>!(n.smtpHost===t&&n.imapHost===o))}var g={gmail:{label:"Gmail",smtpHost:"smtp.gmail.com",smtpPort:587,imapHost:"imap.gmail.com",imapPort:993,sentFolder:"[Gmail]/Sent Mail",inboxFolder:"INBOX",appPasswordHelp:`Generate at https://myaccount.google.com/apppasswords
7
+ (2-step verification must be enabled on your Google account first;
8
+ Google won't accept your normal account password from third-party apps).`},outlook:{label:"Outlook / Office 365",smtpHost:"smtp-mail.outlook.com",smtpPort:587,imapHost:"outlook.office365.com",imapPort:993,sentFolder:"Sent Items",inboxFolder:"INBOX",appPasswordHelp:`Generate at https://account.microsoft.com/security \u2192 Advanced security options \u2192 App passwords
9
+ (2-step verification must be enabled first).`},ionos:{label:"IONOS",smtpHost:"smtp.ionos.co.uk",smtpPort:587,imapHost:"imap.ionos.co.uk",imapPort:993,sentFolder:"Sent Items",inboxFolder:"INBOX",appPasswordHelp:`Use your normal IONOS mailbox password.
10
+ (IONOS doesn't require app passwords for IMAP/SMTP unless you've enabled 2FA.)`,serverHelp:`IONOS runs country-specific mail servers. The standard servers here
11
+ are for IONOS UK (smtp.ionos.co.uk). If you signed up with IONOS in
12
+ another country, your servers use that country's domain instead \u2014
13
+ e.g. smtp.ionos.de (Germany) or smtp.ionos.com (US/international).
14
+ Not sure? Pick the standard servers \u2014 if they reject your login,
15
+ setup automatically tries the other regions for you.`,altHostSets:[{label:"IONOS Germany",smtpHost:"smtp.ionos.de",imapHost:"imap.ionos.de"},{label:"IONOS US / international",smtpHost:"smtp.ionos.com",imapHost:"imap.ionos.com"}],noAltWorkedHint:`None of IONOS's regional servers (.co.uk / .de / .com) accepted this login,
16
+ so the server isn't the problem \u2014 the mailbox password itself is likely
17
+ wrong (or 2FA is on, which means you need an app password instead).`},fastmail:{label:"Fastmail",smtpHost:"smtp.fastmail.com",smtpPort:587,imapHost:"imap.fastmail.com",imapPort:993,sentFolder:"Sent",inboxFolder:"INBOX",appPasswordHelp:`Generate at https://app.fastmail.com/settings/security/integrations
18
+ (Fastmail requires app passwords for IMAP/SMTP regardless of 2FA setting.)`},zoho:{label:"Zoho Mail",smtpHost:"smtp.zoho.com",smtpPort:587,imapHost:"imap.zoho.com",imapPort:993,sentFolder:"Sent",inboxFolder:"INBOX",appPasswordHelp:`Generate at https://accounts.zoho.com/u/h#security/app_passwords
19
+ (Zoho requires app passwords for IMAP/SMTP \u2014 your normal account password won't work.)
20
+
21
+ Heads up: Zoho's FREE plan doesn't include IMAP/SMTP access for new
22
+ accounts \u2014 no password will work until you're on a paid plan (Mail
23
+ Lite is ~$1/month).`,serverHelp:`Zoho runs different mail servers depending on your account:
24
+ \u2022 WHERE you signed up \u2014 log in at zoho.com \u2192 .com servers,
25
+ zoho.eu (Europe) \u2192 .eu servers, zoho.in (India) \u2192 .in servers
26
+ \u2022 WHAT you pay for \u2014 paid accounts on your own domain use the
27
+ 'pro' servers (smtppro.zoho.eu), personal/free use plain (smtp.zoho.eu)
28
+ Not sure? Pick the standard servers \u2014 if they reject your login,
29
+ setup automatically tries the other combinations for you.`,altHostSets:[{label:"Zoho Europe (personal)",smtpHost:"smtp.zoho.eu",imapHost:"imap.zoho.eu"},{label:"Zoho US (paid, own domain)",smtpHost:"smtppro.zoho.com",imapHost:"imappro.zoho.com"},{label:"Zoho Europe (paid, own domain)",smtpHost:"smtppro.zoho.eu",imapHost:"imappro.zoho.eu"},{label:"Zoho India (personal)",smtpHost:"smtp.zoho.in",imapHost:"imap.zoho.in"},{label:"Zoho India (paid, own domain)",smtpHost:"smtppro.zoho.in",imapHost:"imappro.zoho.in"}],noAltWorkedHint:`None of Zoho's servers (US / Europe / India, personal + paid) accepted this
30
+ login, so the server isn't the problem. Two likely causes:
31
+ \u2022 The app password itself is wrong \u2014 generate a fresh one at
32
+ https://accounts.zoho.com/u/h#security/app_passwords
33
+ \u2022 Your Zoho account is on the FREE plan, which doesn't include
34
+ IMAP/SMTP access \u2014 upgrading to Mail Lite (~$1/month) unlocks it.`}},N=`Use the app-specific password your provider issues for SMTP/IMAP
35
+ (check their security settings \u2014 most providers require a generated password
36
+ rather than your normal account password).`;function l(e){if(!(e instanceof Error))return String(e);let t=e.cause;if(!t||!(t instanceof Error))return e.message;let o=t.code,s=t.message;return o&&s&&s!==o?`${e.message} (${o}: ${s})`:o?`${e.message} (${o})`:s?`${e.message} (${s})`:e.message}async function D(e){let t;try{let n=await fetch(`https://api.telegram.org/bot${encodeURIComponent(e.botToken)}/getUpdates`);if(t=await n.json(),!t.ok){let r=t.description??`HTTP ${n.status}`;return/webhook/i.test(r)?{ok:!1,reason:"webhook_set",message:"This bot has a webhook set, so getUpdates is unavailable. Auto-detect can't run; you'll need to paste the chat ID manually."}:{ok:!1,reason:"bad_token",message:`Telegram rejected the bot token: ${r}. Double-check the token from @BotFather.`}}}catch(n){return{ok:!1,reason:"network",message:`Could not reach Telegram: ${l(n)}`}}let o=t.result??[];if(o.length===0)return{ok:!1,reason:"no_messages",message:"No messages yet. Send your bot a regular text message in Telegram, then retry."};let s=o[o.length-1],a=s?.message?.chat?.id??s?.edited_message?.chat?.id??s?.channel_post?.chat?.id;return a===void 0?{ok:!1,reason:"no_messages",message:"Got an update from Telegram but couldn't find a chat ID in it. Send another text message and retry."}:{ok:!0,chatId:String(a)}}async function T(e){try{let t=await fetch(`https://api.telegram.org/bot${encodeURIComponent(e.botToken)}/getMe`),o=await t.json();return o.ok?{ok:!0,botHandle:o.result?.username?`@${o.result.username}`:o.result?.first_name}:{ok:!1,failedAt:"token",message:`Telegram rejected the bot token: ${o.description??`HTTP ${t.status}`}. Generate a new token by messaging @BotFather \u2192 /mytoken or /newbot.`}}catch(t){return{ok:!1,failedAt:"token",message:`Could not reach Telegram: ${l(t)}`}}}async function B(e){let t=await T({botToken:e.botToken});if(!t.ok)return t;let o=t.botHandle;try{let s=await fetch(`https://api.telegram.org/bot${encodeURIComponent(e.botToken)}/sendMessage`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({chat_id:e.chatId,text:"\u2713 Klaudius connected. You'll get a notification here whenever outreach lands or a candidate replies. (You can ignore this setup message.)",disable_notification:!0})}),a=await s.json();if(!a.ok){let n=a.description??`HTTP ${s.status}`,r="";return/chat not found/i.test(n)?r=" The chat_id is wrong, or the bot hasn't been added to that chat yet. If it's a group, you must add the bot to the group first; then send /start to it.":(/bot was blocked/i.test(n)||/forbidden/i.test(n))&&(r=" The bot has been blocked by the chat, or never received a /start. Open Telegram, find your bot, and send /start to wake it up."),{ok:!1,failedAt:"chat",botHandle:o,message:`Telegram delivered the bot token check but couldn't send to chat_id ${e.chatId}: ${n}.${r}`}}}catch(s){return{ok:!1,failedAt:"chat",botHandle:o,message:`Could not reach Telegram for chat_id check: ${l(s)}`}}return{ok:!0,botHandle:o}}var I={\u0410:"A",\u0430:"a",\u0412:"B",\u0432:"b",\u0415:"E",\u0435:"e",\u041A:"K",\u043A:"k",\u041C:"M",\u043C:"m",\u041D:"H",\u043D:"h",\u041E:"O",\u043E:"o",\u0420:"P",\u0440:"p",\u0421:"C",\u0441:"c",\u0422:"T",\u0442:"t",\u0423:"Y",\u0443:"y",\u0425:"X",\u0445:"x",\u0406:"I",\u0456:"i",\u0405:"S",\u0455:"s",\u0408:"J",\u0458:"j",\u0417:"3",\u0437:"3",\u0427:"4",\u0431:"6",\u0391:"A",\u03B1:"a",\u0392:"B",\u03B2:"b",\u0395:"E",\u03B5:"e",\u0396:"Z",\u0397:"H",\u0399:"I",\u03B9:"i",\u039A:"K",\u03BA:"k",\u039C:"M",\u039D:"N",\u039F:"O",\u03BF:"o",\u03A1:"P",\u03C1:"p",\u03A4:"T",\u03C4:"t",\u03A5:"Y",\u03A7:"X",\u03C7:"x",\u03BD:"v","\u2010":"-","\u2011":"-","\u2012":"-","\u2013":"-","\u2014":"-","\u2015":"-","\u2212":"-","\uFF3F":"_"},P=/[\u200B-\u200F\u202A-\u202E\u2060\uFEFF\u00AD]/g,S=/[\u0000-\u001F\u007F]/g;function A(e){let t=e.replace(P,"").replace(S,"").trim();return{value:t,changed:t!==e,repairs:[],unrepairable:[]}}function f(e){let o=A(e).value.normalize("NFKC").replace(/\s+/g,"");o.length>=2&&(o[0]==='"'&&o.at(-1)==='"'||o[0]==="'"&&o.at(-1)==="'")&&(o=o.slice(1,-1).trim());let s=[],a=[],n="";for(let r of o){let i=r.codePointAt(0);if(i<128){n+=r;continue}let c=I[r],u=n.length+1;c?(s.push(`position ${u}: '${r}' (${O(i)}, U+${b(i)}) \u2192 '${c}'`),n+=c):(a.push({position:u,char:r,code:i}),n+=r)}return{value:n,changed:n!==e,repairs:s,unrepairable:a}}var v=/^AIza[0-9A-Za-z_-]{35}$/;function x(e){return v.test(e)}function Z(e){let t=f(e);if(t.value.length===0)return"Required \u2014 without this Klaudius can't find candidates.";if(t.unrepairable.length>0){let o=t.unrepairable[0];return`Character ${o.position} of this key is '${o.char}' (U+${b(o.code)}), which isn't a character a Google key can contain. Copy the key with the copy button next to it in the Cloud Console \u2014 reading it off a screenshot or retyping it introduces look-alike characters.`}}function K(e){let t=f(e).value;if(!x(t))return t.startsWith("AIza")?t.length!==39?`A Google API key is normally 39 characters \u2014 this one is ${t.length}. `+(t.length>39?"It looks like two keys ran together, so paste just the one key.":"It looks truncated, so copy it again with the copy button next to it in the Cloud Console."):"This key contains characters a Google key normally doesn't. Re-copy it with the copy button in the Cloud Console.":`A Google API key normally starts with "AIza" \u2014 this one starts with "${t.slice(0,4)}". Check you copied the API key itself (Cloud Console \u2192 Credentials), not a project ID or client ID.`}function b(e){return e.toString(16).toUpperCase().padStart(4,"0")}function O(e){return e>=1024&&e<=1279?"Cyrillic":e>=880&&e<=1023?"Greek":"non-Latin"}export{H as a,z as b,F as c,R as d,g as e,N as f,l as g,D as h,T as i,B as j,A as k,f as l,Z as m,K as n};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "klaudius",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "Scaffold and maintain a Klaudius project — an autonomous web agency pipeline that runs on Claude Code (find, build, deploy, outreach end-to-end).",
5
5
  "homepage": "https://klaudius.dev",
6
6
  "bugs": {
@@ -1,358 +0,0 @@
1
- import{a as b,e as ae,h as ne,j as te}from"./chunk-F4Q5743K.js";import{useEffect as ca,useMemo as da,useRef as ee,useState as M}from"react";import{Box as v,Text as E,useApp as ga,useInput as pa}from"ink";var oe={gmail:{label:"Gmail",smtpHost:"smtp.gmail.com",smtpPort:587,imapHost:"imap.gmail.com",imapPort:993,sentFolder:"[Gmail]/Sent Mail",inboxFolder:"INBOX",appPasswordHelp:`Generate at https://myaccount.google.com/apppasswords
2
- (2-step verification must be enabled on your Google account first;
3
- Google won't accept your normal account password from third-party apps).`},outlook:{label:"Outlook / Office 365",smtpHost:"smtp-mail.outlook.com",smtpPort:587,imapHost:"outlook.office365.com",imapPort:993,sentFolder:"Sent Items",inboxFolder:"INBOX",appPasswordHelp:`Generate at https://account.microsoft.com/security \u2192 Advanced security options \u2192 App passwords
4
- (2-step verification must be enabled first).`},ionos:{label:"IONOS",smtpHost:"smtp.ionos.co.uk",smtpPort:587,imapHost:"imap.ionos.co.uk",imapPort:993,sentFolder:"Sent Items",inboxFolder:"INBOX",appPasswordHelp:`Use your normal IONOS mailbox password.
5
- (IONOS doesn't require app passwords for IMAP/SMTP unless you've enabled 2FA.)`},fastmail:{label:"Fastmail",smtpHost:"smtp.fastmail.com",smtpPort:587,imapHost:"imap.fastmail.com",imapPort:993,sentFolder:"Sent",inboxFolder:"INBOX",appPasswordHelp:`Generate at https://app.fastmail.com/settings/security/integrations
6
- (Fastmail requires app passwords for IMAP/SMTP regardless of 2FA setting.)`},zoho:{label:"Zoho Mail",smtpHost:"smtp.zoho.com",smtpPort:587,imapHost:"imap.zoho.com",imapPort:993,sentFolder:"Sent",inboxFolder:"INBOX",appPasswordHelp:`Generate at https://accounts.zoho.com/u/h#security/app_passwords
7
- (Zoho requires app passwords for IMAP/SMTP \u2014 your normal account password won't work.)`}},ie=`Use the app-specific password your provider issues for SMTP/IMAP
8
- (check their security settings \u2014 most providers require a generated password
9
- rather than your normal account password).`;var Te=[{country:"the United Kingdom",code:"GB",language:"English",langCode:"en",aliases:["uk","united kingdom","great britain","britain","england","scotland","wales","northern ireland"]},{country:"Ireland",code:"IE",language:"English",langCode:"en"},{country:"France",code:"FR",language:"French",langCode:"fr"},{country:"Germany",code:"DE",language:"German",langCode:"de",aliases:["deutschland"]},{country:"Austria",code:"AT",language:"German",langCode:"de",aliases:["\xF6sterreich","osterreich"]},{country:"Switzerland",code:"CH",language:"German",langCode:"de",aliases:["schweiz","suisse","svizzera"]},{country:"Liechtenstein",code:"LI",language:"German",langCode:"de"},{country:"Luxembourg",code:"LU",language:"French",langCode:"fr",aliases:["l\xEBtzebuerg"]},{country:"the Netherlands",code:"NL",language:"Dutch",langCode:"nl",aliases:["netherlands","holland","nederland"]},{country:"Belgium",code:"BE",language:"Dutch",langCode:"nl",aliases:["belgi\xEB","belgique"]},{country:"Monaco",code:"MC",language:"French",langCode:"fr"},{country:"Andorra",code:"AD",language:"Catalan",langCode:"ca"},{country:"Italy",code:"IT",language:"Italian",langCode:"it",aliases:["italia"]},{country:"Spain",code:"ES",language:"Spanish",langCode:"es",aliases:["espa\xF1a","espana"]},{country:"Portugal",code:"PT",language:"Portuguese",langCode:"pt"},{country:"Malta",code:"MT",language:"English",langCode:"en"},{country:"San Marino",code:"SM",language:"Italian",langCode:"it"},{country:"Vatican City",code:"VA",language:"Italian",langCode:"it",aliases:["the vatican","holy see"]},{country:"Sweden",code:"SE",language:"Swedish",langCode:"sv",aliases:["sverige"]},{country:"Norway",code:"NO",language:"Norwegian",langCode:"no",aliases:["norge"]},{country:"Denmark",code:"DK",language:"Danish",langCode:"da",aliases:["danmark"]},{country:"Finland",code:"FI",language:"Finnish",langCode:"fi",aliases:["suomi"]},{country:"Iceland",code:"IS",language:"Icelandic",langCode:"is",aliases:["\xEDsland"]},{country:"Poland",code:"PL",language:"Polish",langCode:"pl",aliases:["polska"]},{country:"Czech Republic",code:"CZ",language:"Czech",langCode:"cs",aliases:["czechia","\u010Desko"]},{country:"Slovakia",code:"SK",language:"Slovak",langCode:"sk",aliases:["slovensko"]},{country:"Hungary",code:"HU",language:"Hungarian",langCode:"hu",aliases:["magyarorsz\xE1g"]},{country:"Slovenia",code:"SI",language:"Slovenian",langCode:"sl",aliases:["slovenija"]},{country:"Croatia",code:"HR",language:"Croatian",langCode:"hr",aliases:["hrvatska"]},{country:"Bosnia and Herzegovina",code:"BA",language:"Bosnian",langCode:"bs",aliases:["bosnia"]},{country:"Serbia",code:"RS",language:"Serbian",langCode:"sr",aliases:["srbija"]},{country:"Montenegro",code:"ME",language:"Montenegrin",langCode:"sr",aliases:["crna gora"]},{country:"Kosovo",code:"XK",language:"Albanian",langCode:"sq"},{country:"North Macedonia",code:"MK",language:"Macedonian",langCode:"mk",aliases:["macedonia"]},{country:"Albania",code:"AL",language:"Albanian",langCode:"sq",aliases:["shqip\xEBria"]},{country:"Bulgaria",code:"BG",language:"Bulgarian",langCode:"bg"},{country:"Romania",code:"RO",language:"Romanian",langCode:"ro",aliases:["rom\xE2nia"]},{country:"Moldova",code:"MD",language:"Romanian",langCode:"ro"},{country:"Greece",code:"GR",language:"Greek",langCode:"el",aliases:["\u03B5\u03BB\u03BB\u03AC\u03B4\u03B1"]},{country:"Cyprus",code:"CY",language:"Greek",langCode:"el"},{country:"Russia",code:"RU",language:"Russian",langCode:"ru",aliases:["\u0440\u043E\u0441\u0441\u0438\u044F"]},{country:"Ukraine",code:"UA",language:"Ukrainian",langCode:"uk",aliases:["\u0443\u043A\u0440\u0430\u0457\u043D\u0430"]},{country:"Belarus",code:"BY",language:"Belarusian",langCode:"be"},{country:"Estonia",code:"EE",language:"Estonian",langCode:"et",aliases:["eesti"]},{country:"Latvia",code:"LV",language:"Latvian",langCode:"lv",aliases:["latvija"]},{country:"Lithuania",code:"LT",language:"Lithuanian",langCode:"lt",aliases:["lietuva"]},{country:"Turkey",code:"TR",language:"Turkish",langCode:"tr",aliases:["t\xFCrkiye","turkiye"]},{country:"Armenia",code:"AM",language:"Armenian",langCode:"hy"},{country:"Azerbaijan",code:"AZ",language:"Azerbaijani",langCode:"az",aliases:["az\u0259rbaycan"]},{country:"Georgia",code:"GE",language:"Georgian",langCode:"ka",aliases:["\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD"]},{country:"Israel",code:"IL",language:"Hebrew",langCode:"he"},{country:"Palestine",code:"PS",language:"Arabic",langCode:"ar"},{country:"Lebanon",code:"LB",language:"Arabic",langCode:"ar"},{country:"Syria",code:"SY",language:"Arabic",langCode:"ar"},{country:"Jordan",code:"JO",language:"Arabic",langCode:"ar"},{country:"Iraq",code:"IQ",language:"Arabic",langCode:"ar"},{country:"Iran",code:"IR",language:"Persian",langCode:"fa",aliases:["islamic republic of iran"]},{country:"Saudi Arabia",code:"SA",language:"Arabic",langCode:"ar"},{country:"Yemen",code:"YE",language:"Arabic",langCode:"ar"},{country:"Oman",code:"OM",language:"Arabic",langCode:"ar"},{country:"the United Arab Emirates",code:"AE",language:"English",langCode:"en",aliases:["uae","united arab emirates","dubai","abu dhabi"]},{country:"Qatar",code:"QA",language:"Arabic",langCode:"ar"},{country:"Bahrain",code:"BH",language:"Arabic",langCode:"ar"},{country:"Kuwait",code:"KW",language:"Arabic",langCode:"ar"},{country:"Kazakhstan",code:"KZ",language:"Kazakh",langCode:"kk"},{country:"Uzbekistan",code:"UZ",language:"Uzbek",langCode:"uz"},{country:"Kyrgyzstan",code:"KG",language:"Kyrgyz",langCode:"ky"},{country:"Turkmenistan",code:"TM",language:"Turkmen",langCode:"tk"},{country:"Tajikistan",code:"TJ",language:"Tajik",langCode:"tg"},{country:"Afghanistan",code:"AF",language:"Persian",langCode:"fa"},{country:"India",code:"IN",language:"English",langCode:"en"},{country:"Pakistan",code:"PK",language:"English",langCode:"en"},{country:"Bangladesh",code:"BD",language:"Bengali",langCode:"bn"},{country:"Sri Lanka",code:"LK",language:"English",langCode:"en"},{country:"Nepal",code:"NP",language:"Nepali",langCode:"ne"},{country:"Bhutan",code:"BT",language:"English",langCode:"en"},{country:"the Maldives",code:"MV",language:"English",langCode:"en",aliases:["maldives"]},{country:"China",code:"CN",language:"Chinese",langCode:"zh",aliases:["\u4E2D\u56FD","people's republic of china","prc"]},{country:"Hong Kong",code:"HK",language:"English",langCode:"en",aliases:["hk"]},{country:"Macao",code:"MO",language:"Chinese",langCode:"zh",aliases:["macau"]},{country:"Taiwan",code:"TW",language:"Chinese",langCode:"zh",aliases:["\u53F0\u7063","republic of china"]},{country:"Japan",code:"JP",language:"Japanese",langCode:"ja",aliases:["\u65E5\u672C"]},{country:"South Korea",code:"KR",language:"Korean",langCode:"ko",aliases:["korea","republic of korea"]},{country:"North Korea",code:"KP",language:"Korean",langCode:"ko",aliases:["dprk"]},{country:"Mongolia",code:"MN",language:"Mongolian",langCode:"mn"},{country:"Thailand",code:"TH",language:"Thai",langCode:"th"},{country:"Vietnam",code:"VN",language:"Vietnamese",langCode:"vi",aliases:["viet nam"]},{country:"Cambodia",code:"KH",language:"Khmer",langCode:"km"},{country:"Laos",code:"LA",language:"Lao",langCode:"lo"},{country:"Myanmar",code:"MM",language:"Burmese",langCode:"my",aliases:["burma"]},{country:"Malaysia",code:"MY",language:"Malay",langCode:"ms"},{country:"Singapore",code:"SG",language:"English",langCode:"en"},{country:"Brunei",code:"BN",language:"Malay",langCode:"ms",aliases:["brunei darussalam"]},{country:"Indonesia",code:"ID",language:"Indonesian",langCode:"id"},{country:"the Philippines",code:"PH",language:"English",langCode:"en",aliases:["philippines"]},{country:"Timor-Leste",code:"TL",language:"Portuguese",langCode:"pt",aliases:["east timor"]},{country:"the United States",code:"US",language:"English",langCode:"en",aliases:["us","usa","united states","united states of america","america","states"]},{country:"Canada",code:"CA",language:"English",langCode:"en"},{country:"Mexico",code:"MX",language:"Spanish",langCode:"es",aliases:["m\xE9xico"]},{country:"Guatemala",code:"GT",language:"Spanish",langCode:"es"},{country:"Belize",code:"BZ",language:"English",langCode:"en"},{country:"El Salvador",code:"SV",language:"Spanish",langCode:"es"},{country:"Honduras",code:"HN",language:"Spanish",langCode:"es"},{country:"Nicaragua",code:"NI",language:"Spanish",langCode:"es"},{country:"Costa Rica",code:"CR",language:"Spanish",langCode:"es"},{country:"Panama",code:"PA",language:"Spanish",langCode:"es",aliases:["panam\xE1"]},{country:"Cuba",code:"CU",language:"Spanish",langCode:"es"},{country:"the Dominican Republic",code:"DO",language:"Spanish",langCode:"es",aliases:["dominican republic"]},{country:"Haiti",code:"HT",language:"French",langCode:"fr"},{country:"Jamaica",code:"JM",language:"English",langCode:"en"},{country:"the Bahamas",code:"BS",language:"English",langCode:"en",aliases:["bahamas"]},{country:"Trinidad and Tobago",code:"TT",language:"English",langCode:"en"},{country:"Barbados",code:"BB",language:"English",langCode:"en"},{country:"Saint Lucia",code:"LC",language:"English",langCode:"en"},{country:"Saint Vincent and the Grenadines",code:"VC",language:"English",langCode:"en"},{country:"Grenada",code:"GD",language:"English",langCode:"en"},{country:"Dominica",code:"DM",language:"English",langCode:"en"},{country:"Saint Kitts and Nevis",code:"KN",language:"English",langCode:"en"},{country:"Antigua and Barbuda",code:"AG",language:"English",langCode:"en"},{country:"Puerto Rico",code:"PR",language:"Spanish",langCode:"es"},{country:"Brazil",code:"BR",language:"Portuguese",langCode:"pt",aliases:["brasil"]},{country:"Argentina",code:"AR",language:"Spanish",langCode:"es"},{country:"Colombia",code:"CO",language:"Spanish",langCode:"es"},{country:"Chile",code:"CL",language:"Spanish",langCode:"es"},{country:"Peru",code:"PE",language:"Spanish",langCode:"es",aliases:["per\xFA"]},{country:"Venezuela",code:"VE",language:"Spanish",langCode:"es"},{country:"Ecuador",code:"EC",language:"Spanish",langCode:"es"},{country:"Bolivia",code:"BO",language:"Spanish",langCode:"es"},{country:"Paraguay",code:"PY",language:"Spanish",langCode:"es"},{country:"Uruguay",code:"UY",language:"Spanish",langCode:"es"},{country:"Guyana",code:"GY",language:"English",langCode:"en"},{country:"Suriname",code:"SR",language:"Dutch",langCode:"nl"},{country:"Australia",code:"AU",language:"English",langCode:"en",aliases:["aus","oz"]},{country:"New Zealand",code:"NZ",language:"English",langCode:"en",aliases:["nz","aotearoa"]},{country:"Fiji",code:"FJ",language:"English",langCode:"en"},{country:"Papua New Guinea",code:"PG",language:"English",langCode:"en",aliases:["png"]},{country:"Samoa",code:"WS",language:"English",langCode:"en"},{country:"Tonga",code:"TO",language:"English",langCode:"en"},{country:"Vanuatu",code:"VU",language:"English",langCode:"en"},{country:"Solomon Islands",code:"SB",language:"English",langCode:"en"},{country:"Kiribati",code:"KI",language:"English",langCode:"en"},{country:"Tuvalu",code:"TV",language:"English",langCode:"en"},{country:"Nauru",code:"NR",language:"English",langCode:"en"},{country:"Palau",code:"PW",language:"English",langCode:"en"},{country:"the Marshall Islands",code:"MH",language:"English",langCode:"en",aliases:["marshall islands"]},{country:"Micronesia",code:"FM",language:"English",langCode:"en",aliases:["federated states of micronesia"]},{country:"Egypt",code:"EG",language:"Arabic",langCode:"ar"},{country:"Libya",code:"LY",language:"Arabic",langCode:"ar"},{country:"Tunisia",code:"TN",language:"Arabic",langCode:"ar"},{country:"Algeria",code:"DZ",language:"Arabic",langCode:"ar"},{country:"Morocco",code:"MA",language:"Arabic",langCode:"ar",aliases:["maroc"]},{country:"Sudan",code:"SD",language:"Arabic",langCode:"ar"},{country:"South Sudan",code:"SS",language:"English",langCode:"en"},{country:"Mauritania",code:"MR",language:"Arabic",langCode:"ar"},{country:"Nigeria",code:"NG",language:"English",langCode:"en"},{country:"Ghana",code:"GH",language:"English",langCode:"en"},{country:"Senegal",code:"SN",language:"French",langCode:"fr",aliases:["s\xE9n\xE9gal"]},{country:"C\xF4te d'Ivoire",code:"CI",language:"French",langCode:"fr",aliases:["ivory coast"]},{country:"Mali",code:"ML",language:"French",langCode:"fr"},{country:"Burkina Faso",code:"BF",language:"French",langCode:"fr"},{country:"Niger",code:"NE",language:"French",langCode:"fr"},{country:"Guinea",code:"GN",language:"French",langCode:"fr",aliases:["guin\xE9e"]},{country:"Guinea-Bissau",code:"GW",language:"Portuguese",langCode:"pt"},{country:"Sierra Leone",code:"SL",language:"English",langCode:"en"},{country:"Liberia",code:"LR",language:"English",langCode:"en"},{country:"the Gambia",code:"GM",language:"English",langCode:"en",aliases:["gambia"]},{country:"Cabo Verde",code:"CV",language:"Portuguese",langCode:"pt",aliases:["cape verde"]},{country:"Togo",code:"TG",language:"French",langCode:"fr"},{country:"Benin",code:"BJ",language:"French",langCode:"fr",aliases:["b\xE9nin"]},{country:"Cameroon",code:"CM",language:"French",langCode:"fr",aliases:["cameroun"]},{country:"the Central African Republic",code:"CF",language:"French",langCode:"fr",aliases:["central african republic","car"]},{country:"Chad",code:"TD",language:"French",langCode:"fr",aliases:["tchad"]},{country:"Equatorial Guinea",code:"GQ",language:"Spanish",langCode:"es"},{country:"Gabon",code:"GA",language:"French",langCode:"fr"},{country:"the Republic of the Congo",code:"CG",language:"French",langCode:"fr",aliases:["congo","republic of the congo","congo-brazzaville"]},{country:"the Democratic Republic of the Congo",code:"CD",language:"French",langCode:"fr",aliases:["dr congo","drc","democratic republic of the congo","congo-kinshasa","zaire"]},{country:"S\xE3o Tom\xE9 and Pr\xEDncipe",code:"ST",language:"Portuguese",langCode:"pt",aliases:["sao tome and principe","sao tome"]},{country:"Ethiopia",code:"ET",language:"Amharic",langCode:"am"},{country:"Eritrea",code:"ER",language:"Tigrinya",langCode:"ti"},{country:"Djibouti",code:"DJ",language:"French",langCode:"fr"},{country:"Somalia",code:"SO",language:"Somali",langCode:"so"},{country:"Kenya",code:"KE",language:"English",langCode:"en"},{country:"Uganda",code:"UG",language:"English",langCode:"en"},{country:"Tanzania",code:"TZ",language:"English",langCode:"en",aliases:["united republic of tanzania"]},{country:"Rwanda",code:"RW",language:"English",langCode:"en"},{country:"Burundi",code:"BI",language:"French",langCode:"fr"},{country:"Madagascar",code:"MG",language:"French",langCode:"fr"},{country:"Mauritius",code:"MU",language:"English",langCode:"en"},{country:"the Seychelles",code:"SC",language:"English",langCode:"en",aliases:["seychelles"]},{country:"Comoros",code:"KM",language:"French",langCode:"fr"},{country:"South Africa",code:"ZA",language:"English",langCode:"en",aliases:["sa"]},{country:"Namibia",code:"NA",language:"English",langCode:"en"},{country:"Botswana",code:"BW",language:"English",langCode:"en"},{country:"Zimbabwe",code:"ZW",language:"English",langCode:"en"},{country:"Zambia",code:"ZM",language:"English",langCode:"en"},{country:"Malawi",code:"MW",language:"English",langCode:"en"},{country:"Mozambique",code:"MZ",language:"Portuguese",langCode:"pt",aliases:["mo\xE7ambique"]},{country:"Angola",code:"AO",language:"Portuguese",langCode:"pt"},{country:"Lesotho",code:"LS",language:"English",langCode:"en"},{country:"Eswatini",code:"SZ",language:"English",langCode:"en",aliases:["swaziland"]}],Ee=[{language:"English",code:"en"},{language:"Italian",code:"it",aliases:["italiano"]},{language:"Spanish",code:"es",aliases:["espa\xF1ol","espanol","castellano"]},{language:"French",code:"fr",aliases:["fran\xE7ais","francais"]},{language:"German",code:"de",aliases:["deutsch"]},{language:"Portuguese",code:"pt",aliases:["portugu\xEAs","portugues"]},{language:"Dutch",code:"nl",aliases:["nederlands","flemish"]},{language:"Swedish",code:"sv",aliases:["svenska"]},{language:"Norwegian",code:"no",aliases:["norsk"]},{language:"Danish",code:"da",aliases:["dansk"]},{language:"Icelandic",code:"is",aliases:["\xEDslenska"]},{language:"Catalan",code:"ca",aliases:["catal\xE0"]},{language:"Romanian",code:"ro",aliases:["rom\xE2n\u0103","romana"]},{language:"Polish",code:"pl",aliases:["polski"]},{language:"Czech",code:"cs",aliases:["\u010De\u0161tina","cestina"]},{language:"Slovak",code:"sk",aliases:["sloven\u010Dina"]},{language:"Slovenian",code:"sl",aliases:["sloven\u0161\u010Dina"]},{language:"Croatian",code:"hr",aliases:["hrvatski"]},{language:"Bosnian",code:"bs",aliases:["bosanski"]},{language:"Serbian",code:"sr",aliases:["\u0441\u0440\u043F\u0441\u043A\u0438"]},{language:"Montenegrin",code:"sr",aliases:["crnogorski"]},{language:"Macedonian",code:"mk",aliases:["\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438"]},{language:"Bulgarian",code:"bg",aliases:["\u0431\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438"]},{language:"Russian",code:"ru",aliases:["\u0440\u0443\u0441\u0441\u043A\u0438\u0439"]},{language:"Ukrainian",code:"uk",aliases:["\u0443\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430"]},{language:"Belarusian",code:"be",aliases:["\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F"]},{language:"Latvian",code:"lv",aliases:["latvie\u0161u"]},{language:"Lithuanian",code:"lt",aliases:["lietuvi\u0173"]},{language:"Greek",code:"el",aliases:["\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC","ellinik\xE1"]},{language:"Albanian",code:"sq",aliases:["shqip"]},{language:"Armenian",code:"hy",aliases:["\u0570\u0561\u0575\u0565\u0580\u0565\u0576"]},{language:"Persian",code:"fa",aliases:["farsi","dari","\u0641\u0627\u0631\u0633\u06CC"]},{language:"Hindi",code:"hi",aliases:["\u0939\u093F\u0928\u094D\u0926\u0940"]},{language:"Urdu",code:"ur",aliases:["\u0627\u0631\u062F\u0648"]},{language:"Bengali",code:"bn",aliases:["bangla","\u09AC\u09BE\u0982\u09B2\u09BE"]},{language:"Nepali",code:"ne",aliases:["\u0928\u0947\u092A\u093E\u0932\u0940"]},{language:"Sinhala",code:"si",aliases:["\u0DC3\u0DD2\u0D82\u0DC4\u0DBD","sinhalese"]},{language:"Finnish",code:"fi",aliases:["suomi"]},{language:"Estonian",code:"et",aliases:["eesti"]},{language:"Hungarian",code:"hu",aliases:["magyar"]},{language:"Turkish",code:"tr",aliases:["t\xFCrk\xE7e","turkce"]},{language:"Azerbaijani",code:"az",aliases:["az\u0259rbaycan dili","azeri"]},{language:"Kazakh",code:"kk",aliases:["\u049B\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456"]},{language:"Uzbek",code:"uz",aliases:["o'zbek"]},{language:"Kyrgyz",code:"ky",aliases:["\u043A\u044B\u0440\u0433\u044B\u0437\u0447\u0430"]},{language:"Turkmen",code:"tk",aliases:["t\xFCrkmen\xE7e"]},{language:"Arabic",code:"ar",aliases:["\u0627\u0644\u0639\u0631\u0628\u064A\u0629"]},{language:"Hebrew",code:"he",aliases:["\u05E2\u05D1\u05E8\u05D9\u05EA","ivrit"]},{language:"Amharic",code:"am",aliases:["\u12A0\u121B\u122D\u129B"]},{language:"Tigrinya",code:"ti",aliases:["\u1275\u130D\u122D\u129B"]},{language:"Chinese",code:"zh",aliases:["mandarin","\u4E2D\u6587","\u6C49\u8BED","putonghua"]},{language:"Japanese",code:"ja",aliases:["\u65E5\u672C\u8A9E","nihongo"]},{language:"Korean",code:"ko",aliases:["\uD55C\uAD6D\uC5B4"]},{language:"Thai",code:"th",aliases:["\u0E44\u0E17\u0E22"]},{language:"Vietnamese",code:"vi",aliases:["ti\u1EBFng vi\u1EC7t"]},{language:"Khmer",code:"km",aliases:["\u1781\u17D2\u1798\u17C2\u179A","cambodian"]},{language:"Lao",code:"lo",aliases:["\u0EA5\u0EB2\u0EA7"]},{language:"Burmese",code:"my",aliases:["\u1019\u103C\u1014\u103A\u1019\u102C","myanmar"]},{language:"Dzongkha",code:"dz",aliases:["\u0F62\u0FAB\u0F7C\u0F44\u0F0B\u0F41"]},{language:"Mongolian",code:"mn",aliases:["\u043C\u043E\u043D\u0433\u043E\u043B"]},{language:"Georgian",code:"ka",aliases:["\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8"]},{language:"Tajik",code:"tg",aliases:["\u0442\u043E\u04B7\u0438\u043A\u04E3"]},{language:"Malay",code:"ms",aliases:["bahasa malaysia","bahasa melayu"]},{language:"Indonesian",code:"id",aliases:["bahasa indonesia"]},{language:"Filipino",code:"fil",aliases:["tagalog","pilipino"]},{language:"Swahili",code:"sw",aliases:["kiswahili"]},{language:"Somali",code:"so",aliases:["af soomaali"]},{language:"Yoruba",code:"yo",aliases:["yor\xF9b\xE1"]},{language:"Hausa",code:"ha",aliases:["harshen hausa"]},{language:"Zulu",code:"zu",aliases:["isizulu"]},{language:"Afrikaans",code:"af"}];function O(e){return e.trim().toLowerCase()}function se(e){if(!e)return;let a=O(e);for(let n of Te)if(O(n.country)===a||n.aliases?.some(t=>O(t)===a))return n}function re(e){if(!e)return;let a=O(e);for(let n of Ee)if(O(n.language)===a||n.aliases?.some(t=>O(t)===a))return n}var L=class extends Error{constructor(){super("user pressed back"),this.name="BackSignal"}},U=class extends Error{constructor(){super("user cancelled"),this.name="CancelSignal"}},xe="Include the country code with a + (e.g. +12025550123 for US, +447123456789 for UK)",le=e=>/^\+\d{8,15}$/.test(e)?void 0:xe,Me=e=>/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(e)?void 0:"Enter a valid email",R=e=>a=>a.trim().length===0?`${e} is required`:void 0,Ne=/[\u2022\u2023\u2024\u2027\u00B7\u2219\u22C5\u25CF\u25CB\u25AA\u25AB\u204E\u2217\uFE61\u25E6\u2218]/,Oe="That looks like the masked \u2022\u2022\u2022\u2022\u2022 value your screen shows, not the token itself. Click the reveal/copy icon next to it and paste the real value (letters and numbers).",j=e=>Ne.test(e)?Oe:void 0,Be=e=>a=>j(a)??(a.trim().length===0?`${e} is required`:void 0),Ke=e=>{let a=e.replace(/\s+/g,"");return a.length===0?"Personal access token is required":j(a)??(/^sbp_[A-Za-z0-9._~+\/=-]{20,}$/.test(a)?void 0:"Doesn't look like a valid token \u2014 it should be 'sbp_' followed by letters and numbers.")},Re="one-off, no monthly fees",ue="per month";function D(e){if(!e)return!0;let a=e.trim();if(a==="")return!0;let n=a.replace(/[^\d.]/g,"");if(n==="")return/^\s*free\s*$/i.test(a);let t=parseFloat(n);return!isNaN(t)&&t===0}var Le={id:"ai-agent",title:"AI coding agent",isApplicable:()=>!0,execute:async(e,{prompt:a,info:n})=>(n({title:"Which AI coding agent do you use?",body:`Klaudius works with two AI coding agents in your terminal \u2014 Claude Code
10
- (Anthropic) or Codex (OpenAI). Pick whichever you already pay for.
11
-
12
- This choice only changes which agent runs the pipeline. Everything else \u2014
13
- the businesses found, the websites built, the outreach sent \u2014 is identical
14
- either way. You can switch later by re-running init in a fresh folder.`}),{aiAgent:await a({type:"select",message:"Which AI coding agent will drive Klaudius?",initialValue:e.aiAgent??"claude-code",options:[{value:"claude-code",label:"Claude Code (Anthropic)"},{value:"codex",label:"Codex (OpenAI)"}]})})},Fe={id:"location",title:"Location & language",isApplicable:()=>!0,execute:async(e,{prompt:a,info:n})=>{n({title:"Which country are you finding businesses in?",body:`Klaudius searches for businesses in this country, writes outreach in
15
- this country's language, and builds sites in this country's language.
16
- This is the country your customers are in \u2014 not necessarily where
17
- you live.
18
-
19
- Example: if you're based in Bulgaria but want to sell websites to UK
20
- businesses, pick United Kingdom here.
21
-
22
- You can run the pipeline against more than one country from the same
23
- install (\`/find Barcelona\` from a UK install works fine), but
24
- starting with one market makes it easier to learn that market's
25
- outreach rhythm.`});let t="__other__",i=[{value:"the United Kingdom",label:"United Kingdom"},{value:"the United States",label:"United States"},{value:"Italy",label:"Italy"},{value:"Spain",label:"Spain"},{value:"France",label:"France"},{value:"Germany",label:"Germany"},{value:"Ireland",label:"Ireland"},{value:"the Netherlands",label:"Netherlands"},{value:"Belgium",label:"Belgium"},{value:"Portugal",label:"Portugal"},{value:"Switzerland",label:"Switzerland"},{value:"Austria",label:"Austria"},{value:"Canada",label:"Canada"},{value:"Australia",label:"Australia"},{value:"New Zealand",label:"New Zealand"},{value:"Mexico",label:"Mexico"},{value:"Brazil",label:"Brazil"},{value:"Sweden",label:"Sweden"},{value:"Poland",label:"Poland"},{value:t,label:"Other (type it in)"}],s=e.country??"",o=i.some(C=>C.value===s),u=await a({type:"select",message:"Which country's businesses will Klaudius search for?",initialValue:o?s:s?t:"the United Kingdom",options:i}),r;u===t?r=await a({type:"text",message:"Type the country name (any common form is fine)",placeholder:"e.g. South Africa, Greece, Brazil",initialValue:o?"":s,validate:C=>C.trim().length===0?"Country is required":void 0,note:{title:"Free-form country",body:`We'll match what you type against our country lookup (covers all
26
- ISO 3166 sovereign states + common territories like Hong Kong and
27
- Puerto Rico). If we don't recognise the name, we'll ask you to type
28
- the 2-letter ISO country code directly on the next prompt \u2014 the
29
- same code Google Places uses for region biasing. Aliases like 'uk',
30
- 'usa', 'italia', 'maroc' all match.`}}):r=u;let l=se(r),d;l?d=l.code:d=(await a({type:"text",message:`What's the 2-letter ISO country code for ${r}?`,placeholder:"e.g. ID for Indonesia, ZA for South Africa, JO for Jordan",initialValue:e.countryCode??"",validate:C=>{let N=C.trim().toUpperCase();if(!/^[A-Z]{2}$/.test(N))return"Must be exactly 2 letters (ISO 3166-1 alpha-2 format)"},note:{title:`ISO code for ${r}`,body:`We didn't recognise "${r}" in our country lookup, so we need the
31
- 2-letter ISO 3166-1 alpha-2 code directly. Google Places uses this
32
- for region biasing on every search.
33
-
34
- Full list: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
35
-
36
- Quick reference for less common markets:
37
- Indonesia \u2192 ID Vietnam \u2192 VN Thailand \u2192 TH Egypt \u2192 EG
38
- Kenya \u2192 KE Nigeria \u2192 NG Pakistan \u2192 PK Iran \u2192 IR
39
- Saudi Arabia \u2192 SA Russia \u2192 RU Ukraine \u2192 UA Israel \u2192 IL`}})).trim().toUpperCase();let g=e.language??l?.language??"English",m=await a({type:"text",message:"What language should outreach + websites be written in?",placeholder:"e.g. Italian, Spanish, English",initialValue:g,validate:C=>C.trim().length===0?"Language is required":void 0,note:{title:"Outreach + website language",body:l?`Defaulting to ${g} (the usual operator-facing language
40
- for ${r}). Edit this if you'd rather write in something else \u2014
41
- e.g. an English-speaking operator running on Spain might pick "Spanish"
42
- to localise everything, or might pick "English" to keep their own voice.
43
- Klaudius will use this language for every outreach message it sends and
44
- every website it builds.`:`Pick the language you want every outreach message and every built
45
- website to be written in. If we don't recognise the language name
46
- we'll ask for the ISO language code on the next prompt.`}}),A=re(m),I;return A?I=A.code:I=(await a({type:"text",message:`What's the ISO language code for ${m}?`,placeholder:"e.g. id for Indonesian, sw for Swahili, fil for Filipino",initialValue:e.languageCode??"",validate:C=>{let N=C.trim().toLowerCase();if(!/^[a-z]{2,3}$/.test(N))return"Must be 2 or 3 lowercase letters (ISO 639-1 or BCP 47 code)"},note:{title:`ISO code for ${m}`,body:`We didn't recognise "${m}" in our language lookup, so we need
47
- the ISO language code directly. Google Places uses this for response
48
- language, and it becomes the <html lang="..."> value on every built
49
- site.
50
-
51
- Most languages have a 2-letter ISO 639-1 code. A few (Filipino \u2192
52
- "fil") use the 3-letter ISO 639-3 / BCP 47 code instead.
53
-
54
- Full list: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes`}})).trim().toLowerCase(),{country:l?l.country:r.trim(),countryCode:d,language:A?A.language:m.trim(),languageCode:I}}},Ge={id:"pricing",title:"Pricing",isApplicable:()=>!0,execute:async(e,{prompt:a})=>{let n=e.pricingTerms===ue,t=n?"":e.pricing??"$999",i=e.pricingMonthly??(n?e.pricing??"":""),s=await a({type:"text",message:"What's the upfront fee you'll charge clients per site?",placeholder:"e.g. $999, \xA3799, \u20AC899 \u2014 or 0 for monthly-only billing",initialValue:t,note:{title:"Upfront fee",body:`The one-time amount charged when a client signs up. Type 0 (or
55
- leave blank) if you only want to charge a monthly fee. You can
56
- also add a recurring monthly fee on the next prompt \u2014 combining
57
- the two is fine (e.g. $499 upfront + $49/month).
58
-
59
- Use the currency that matches your clients' region. Klaudius
60
- uses this string verbatim throughout outreach.`}}),o=await a({type:"text",message:"What's the monthly fee? (optional \u2014 leave blank for one-off only)",placeholder:"e.g. $49, \xA339, \u20AC45 \u2014 or blank for none",initialValue:i,validate:g=>{if(D(s)&&D(g))return"Set an upfront fee, a monthly fee, or both \u2014 they can't both be zero."},note:{title:"Monthly fee (optional)",body:`Leave blank to charge a one-off fee only. Fill it in to charge
61
- a recurring monthly fee \u2014 either on its own (if upfront was 0)
62
- or alongside the upfront fee.`}}),c=D(s),u=D(o),r,l,d;return c&&!u?(r=o.trim(),l=ue,d=o.trim()):!c&&u?(r=s.trim(),l=Re,d=void 0):(r=s.trim(),l=`upfront, then ${o.trim()}/month`,d=o.trim()),{pricing:r,pricingTerms:l,pricingMonthly:d}}},ze={id:"outreach-enabled",title:"Automated outreach",isApplicable:()=>!0,execute:async(e,{prompt:a})=>({outreachEnabled:await a({type:"confirm",message:"Use Klaudius's automated outreach features?",initialValue:e.outreachEnabled??!0,note:{title:"Automated outreach features",body:`After finding candidates and building websites for them, Klaudius can
63
- run outreach to them automatically (email, SMS, or WhatsApp).
64
- If you'd rather handle outreach manually, you can skip this here.`}})})},Ve={id:"operator-name",title:"Sign-off name",isApplicable:e=>e.outreachEnabled===!0,execute:async(e,{prompt:a})=>({name:await a({type:"text",message:"What name should sign off your outreach messages?",placeholder:"e.g. Mike Smith \u2014 or your business name if you'd rather",initialValue:e.name??e.emailFromName??"",validate:R("Name"),note:{title:"Sign-off name",body:`Klaudius signs off every outreach message and follow-up with this
65
- name \u2014 e.g. "Cordiali saluti, Marco" in Italian, "Best, Mike" in
66
- English. Use your first name, your full name, or your business name \u2014
67
- whatever you want clients to see as the sender.
68
-
69
- Klaudius composes the actual sign-off line at message time, picking
70
- natural phrasing for your language. If you'd rather pin an exact
71
- sign-off string instead, ask Klaudius to set it up for you once the
72
- wizard's done.`}}),signature:e.signature})},De={id:"channels",title:"Outreach channels & priority",isApplicable:e=>e.outreachEnabled===!0,execute:async(e,{prompt:a,info:n})=>{n({title:"Outreach channels & priority",body:`Different businesses have different contact methods publicly available \u2014 some
73
- list only an email, others only a phone number, others use WhatsApp as their
74
- primary channel. Klaudius lets you opt into multiple channels so it can reach
75
- more candidates, and you set a priority order for when a candidate has
76
- multiple contact methods available.
77
-
78
- How it works: for each candidate, Klaudius walks your priority list in order
79
- and picks the first channel that's viable for THAT candidate. If a channel's
80
- send fails for a per-recipient reason (e.g. number not on WhatsApp, hard
81
- email bounce), it cascades to your next-priority channel for that same
82
- candidate \u2014 so opting into multiple channels also gives you fallback coverage
83
- when one channel doesn't work.
84
-
85
- You'll be asked to pick your first-choice channel now, then optionally a
86
- second and third. The order matters: it's the order Klaudius tries.`});let t={email:"Email",sms:"SMS (iMessage or Twilio, configured next)",whatsapp:"WhatsApp (Baileys / phone-linked device)"},i=["email","sms","whatsapp"],s=e.outreachPriority??[],o=[],c=await a({type:"select",message:"Which channel should Klaudius try FIRST for each candidate?",initialValue:s[0]??"email",options:i.map(u=>({value:u,label:t[u]}))});for(o.push(c);o.length<i.length;){let u=i.filter(m=>!o.includes(m)),r=o.length===1?"second":"third",l=o[o.length-1],d=t[l].replace(/\s*\(.*\)$/,"").toLowerCase(),g=await a({type:"select",message:`Should Klaudius use another channel as ${r} priority (for candidates where ${d} isn't viable or fails)?`,initialValue:s[o.length]??"no",options:[...u.map(m=>({value:m,label:`Yes \u2014 also use ${t[m]}`})),{value:"no",label:"No, that's all"}]});if(g==="no")break;o.push(g)}return{outreachChannels:o,outreachPriority:o}}},Ue={id:"email",title:"Email setup",isApplicable:e=>e.outreachChannels?.includes("email")===!0,execute:async(e,{prompt:a,info:n})=>{n({title:"Email setup",body:`Klaudius needs an email account to send outreach FROM. This is the
87
- address candidates will see as the sender. Use a domain you control
88
- (your own, your business's) \u2014 not your personal address.`});let t=await a({type:"select",message:"Who hosts the email account you'll send outreach from?",initialValue:e.emailProvider??"gmail",options:[{value:"gmail",label:"Gmail"},{value:"fastmail",label:"Fastmail"},{value:"outlook",label:"Outlook / Office 365"},{value:"zoho",label:"Zoho Mail"},{value:"ionos",label:"IONOS"},{value:"custom",label:"Custom / other (enter SMTP/IMAP details manually)"}]}),i=t!=="custom"?oe[t]:void 0,s=await a({type:"text",message:"Email address to send outreach from",placeholder:"you@yourbusiness.com",initialValue:e.emailAddress??"",validate:Me}),o=i?.appPasswordHelp??ie,c=await a({type:"password",message:"Paste the app password",initialValue:e.emailPassword??"",validate:R("App password"),note:{title:"App password",body:`An app password is a separate, single-purpose password that your
89
- email provider issues for third-party apps like Klaudius. It is NOT
90
- your normal account login password.
91
-
92
- `+o+`
93
-
94
- Once generated, it's stored locally in this project's .env file.
95
- It is never sent to Klaudius's servers \u2014 only to your email
96
- provider when sending outreach.`}}),u,r,l,d,g,m;if(t==="custom"){u=await a({type:"text",message:"SMTP host (the server Klaudius connects to for sending)",placeholder:"e.g. smtp.yourprovider.com",initialValue:e.emailSmtpHost??"",validate:R("SMTP host")});let A=await a({type:"text",message:"SMTP port (usually 587 for STARTTLS or 465 for SSL)",initialValue:String(e.emailSmtpPort??587),validate:C=>/^\d+$/.test(C)?void 0:"Must be a number"});r=parseInt(A,10),l=await a({type:"text",message:"IMAP host (the server Klaudius connects to for reading replies)",placeholder:"e.g. imap.yourprovider.com",initialValue:e.emailImapHost??"",validate:R("IMAP host")});let I=await a({type:"text",message:"IMAP port (usually 993 for SSL)",initialValue:String(e.emailImapPort??993),validate:C=>/^\d+$/.test(C)?void 0:"Must be a number"});d=parseInt(I,10),g=await a({type:"text",message:"Sent folder name (so SMTP-sent messages also appear in your email client's Sent folder)",placeholder:'e.g. "Sent", "Sent Items"',initialValue:e.emailSentFolder??"Sent"}),m=await a({type:"text",message:"Inbox folder name (almost always INBOX)",initialValue:e.emailInboxFolder??"INBOX"})}else u=i.smtpHost,r=i.smtpPort,l=i.imapHost,d=i.imapPort,g=i.sentFolder,m=i.inboxFolder;return{emailProvider:t,emailAddress:s,emailPassword:c,emailFromName:e.name,emailSmtpHost:u,emailSmtpPort:r,emailImapHost:l,emailImapPort:d,emailSentFolder:g,emailInboxFolder:m}}},He={id:"sms",title:"SMS setup",isApplicable:e=>e.outreachChannels?.includes("sms")===!0,execute:async(e,{prompt:a,info:n})=>{n({title:"SMS setup",body:`Klaudius can send SMS one of two ways:
97
-
98
- \u2022 macOS iMessage \u2014 free, uses Messages.app on your Mac.
99
- Reaches other Apple users as iMessage for free. To reach
100
- non-Apple phones (e.g. Android), you need a one-time setup:
101
- 1. Sign in to Messages.app on this Mac with your Apple ID.
102
- 2. On your iPhone, sign in to the SAME Apple ID.
103
- 3. On your iPhone: Settings \u2192 Messages \u2192 Text Message
104
- Forwarding \u2192 toggle this Mac ON. (You'll be asked to
105
- enter a 6-digit code that appears on the Mac.)
106
- Once that's done, the iPhone doesn't need to be nearby.
107
- Apple keeps the relay working as long as both devices stay
108
- signed into the same Apple ID and have data/Wi-Fi.
109
-
110
- \u2022 Twilio \u2014 cross-platform, ~$0.01 per SMS. Sender is a phone
111
- number you buy from Twilio. Works on any OS, reaches any
112
- phone, no iPhone required. Recommended for consistent delivery.`});let t=await a({type:"select",message:"Which SMS provider?",initialValue:e.smsProvider??(process.platform==="darwin"?"imessage":"twilio"),options:[{value:"imessage",label:"macOS iMessage (free, Mac only)"},{value:"twilio",label:"Twilio (cross-platform, paid per-message \u2014 recommended)"}]}),i=await a({type:"text",message:"Your mobile number (used as a safe target for test sends so Klaudius doesn't accidentally message real candidates while you're testing)",placeholder:"+12025550123",initialValue:e.testPhone??"",validate:le}),s={smsProvider:t,testPhone:i};return t==="twilio"&&(s.twilioAccountSid=await a({type:"text",message:"Twilio Account SID (starts with AC...)",initialValue:e.twilioAccountSid??"",validate:o=>/^AC[a-zA-Z0-9]+$/.test(o)?void 0:"Should start with 'AC'"}),s.twilioAuthToken=await a({type:"password",message:"Twilio Auth Token",initialValue:e.twilioAuthToken??"",validate:Be("Twilio Auth Token")}),s.twilioPhoneNumber=await a({type:"text",message:"Twilio phone number (the number outreach will be sent FROM)",placeholder:"+15551234567",initialValue:e.twilioPhoneNumber??"",validate:le})),s}},We={id:"whatsapp",title:"WhatsApp setup",isApplicable:e=>e.outreachPriority?.includes("whatsapp")===!0,execute:async(e,{prompt:a,info:n})=>{n({title:"WhatsApp setup",body:`Klaudius connects to WhatsApp as a linked device on your phone \u2014 same way
113
- WhatsApp Web works. Setup is a one-time QR scan from the WhatsApp app on
114
- the phone whose number you want to use. Klaudius will guide you through
115
- that AFTER this wizard, once npm dependencies are installed.
116
-
117
- Multiple numbers (advanced): if you plan to send at higher volume, you can
118
- link 2-5 WhatsApp accounts. Klaudius round-robins across them for initial
119
- outreach (spreading the load and the ban risk); follow-ups always use the
120
- same account that started the thread. Each account is independent \u2014 one
121
- getting banned doesn't affect the others. For multi-number you need a
122
- separate phone number per account (they're tied to real SIMs).
123
-
124
- IMPORTANT: WhatsApp may suspend numbers used for cold outbound. Start with
125
- phone numbers you can afford to lose, and don't link your main personal
126
- number unless you're comfortable with that.
127
-
128
- You'll be asked how many accounts to link and a short label for each
129
- (used only locally \u2014 appears in logs, in the .env file, and in this
130
- project's per-account directory under ~/.klaudius/whatsapp/).`});let t=await a({type:"select",message:"How many WhatsApp numbers do you want to link?",initialValue:String(e.whatsappAccounts?.length??1),options:[{value:"1",label:"1 number (recommended starting point)"},{value:"2",label:"2 numbers (spread load across two)"},{value:"3",label:"3 numbers"},{value:"4",label:"4 numbers"},{value:"5",label:"5 numbers (maximum)"}]}),i=parseInt(t,10),s=["primary","secondary","tertiary","quaternary","quinary"],o=[];for(let c=0;c<i;c++){let u=await a({type:"text",message:i===1?"Label for this WhatsApp account (used only locally \u2014 'primary' is fine)":`Label for WhatsApp account ${c+1} of ${i} (e.g. 'primary', 'uk-1', 'us-east')`,initialValue:e.whatsappAccounts?.[c]??s[c],validate:r=>{let l=r.trim();if(!l)return"Required";if(l.length>30)return"Too long (max 30 characters)";if(l.startsWith("-")||l.endsWith("-"))return"Can't start or end with a hyphen";if(!/^[A-Za-z0-9_-]+$/.test(l))return"Letters, digits, underscore, hyphen only (no spaces)";if(o.includes(l))return"Duplicate label"}});o.push(u.trim())}return{whatsappAccounts:o}}},_e={id:"deploy-provider",title:"Deployment host",isApplicable:()=>!0,execute:async(e,{prompt:a,info:n})=>(n({title:"Where should Klaudius deploy the websites it builds?",body:`Every client site Klaudius builds is a static website, so it deploys
131
- cleanly to any of the hosts below \u2014 pick whichever you'd rather have
132
- an account with. All have a free tier that's plenty to get started.
133
-
134
- \u2022 Vercel \u2014 the default. One API token to set up.
135
- \u2022 Cloudflare Pages \u2014 one API token + your account ID. Free tier has
136
- no bandwidth cap, which suits high-volume operators.
137
- \u2022 Netlify \u2014 one API token. A good fit if you already host on it.
138
-
139
- This only changes where sites are hosted and which credential you set
140
- up next. Everything else \u2014 how sites are found, built, and pitched \u2014
141
- is identical.`}),{deployProvider:await a({type:"select",message:"Which host should Klaudius deploy client sites to?",initialValue:e.deployProvider??"vercel",options:[{value:"vercel",label:"Vercel (default)"},{value:"cloudflare",label:"Cloudflare Pages"},{value:"netlify",label:"Netlify"}]})})},$e={id:"vercel",title:"Vercel deployment",isApplicable:e=>(e.deployProvider??"vercel")==="vercel",execute:async(e,{prompt:a})=>({vercelToken:await a({type:"password",message:"Paste your Vercel API token",initialValue:e.vercelToken??"",validate:t=>t.trim().length===0?"Required \u2014 without this Klaudius can't deploy generated sites":void 0,note:{title:"Vercel deployment",body:`Klaudius deploys every generated client site to Vercel. We use a
142
- Vercel API token to do this without an interactive login.
143
-
144
- How to get one (one-time, ~30 seconds):
145
- 1. Open https://vercel.com/account/tokens
146
- 2. Click 'Create Token'
147
- 3. Name it 'Klaudius', set scope to your personal account, set
148
- expiration to 'No expiration' (recommended) or your preferred
149
- duration
150
- 4. Click Create, then copy the token shown
151
-
152
- Don't have a Vercel account yet? Sign up free at vercel.com.
153
- The Hobby (free) plan caps you at 200 projects and 100 deployments
154
- per day. If you grow past 200 active client sites you can either
155
- upgrade to Pro ($20/month, unlimited projects + 6,000 deploys/day),
156
- or simply switch to a new Vercel account each time you hit the
157
- 200-project ceiling.
158
-
159
- STUCK? Open Claude (or any LLM) in another tab/app and paste:
160
-
161
- "I need to create a personal Vercel API token for the
162
- Klaudius CLI tool. Walk me through generating one at
163
- vercel.com/account/tokens, including which scope and
164
- expiration to choose."`}})})},je={id:"cloudflare",title:"Cloudflare deployment",isApplicable:e=>e.deployProvider==="cloudflare",execute:async(e,{prompt:a})=>{let n=await a({type:"password",message:"Paste your Cloudflare API token",initialValue:e.cloudflareApiToken??"",validate:i=>i.trim().length===0?"Required \u2014 without this Klaudius can't deploy generated sites":void 0,note:{title:"Cloudflare API token",body:`Klaudius deploys every generated client site to Cloudflare Pages
165
- using \`wrangler\`. It authenticates with an API token (no interactive
166
- login), so no browser step at deploy time.
167
-
168
- How to create one (one-time, ~1 minute) \u2014 the SCOPE matters, an
169
- under-scoped token is the #1 thing that makes deploys fail later:
170
- 1. Open https://dash.cloudflare.com/profile/api-tokens
171
- 2. Click 'Create Token' \u2192 scroll to 'Create Custom Token' \u2192
172
- 'Get started'
173
- 3. Name it 'Klaudius'
174
- 4. Under 'Permissions' add exactly this row:
175
- Account \u2022 Cloudflare Pages \u2022 Edit
176
- 5. Under 'Account Resources' select your account (or 'All
177
- accounts')
178
- 6. Click 'Continue to summary' \u2192 'Create Token', then copy the
179
- token shown (you only see it once)
180
-
181
- Don't have a Cloudflare account yet? Sign up free at
182
- dash.cloudflare.com. The free Pages tier has unlimited sites and
183
- unlimited bandwidth \u2014 you won't outgrow it.
184
-
185
- STUCK? Open Claude (or any LLM) in another tab/app and paste:
186
-
187
- "I need a Cloudflare API token for the Klaudius CLI. Walk me
188
- through creating a Custom Token at
189
- dash.cloudflare.com/profile/api-tokens with the
190
- 'Account \u2192 Cloudflare Pages \u2192 Edit' permission, and tell me
191
- where to find my Account ID."`}}),t=await a({type:"text",message:"Paste your Cloudflare Account ID",placeholder:"e.g. 0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d",initialValue:e.cloudflareAccountId??"",validate:i=>{let s=i.trim();if(s.length===0)return"Required \u2014 wrangler needs it to pick the right account";if(!/^[0-9a-f]{32}$/i.test(s))return"Should be a 32-character hex string (copy it from the dashboard, not the token)"},note:{title:"Cloudflare Account ID",body:`This tells \`wrangler\` which account to deploy into. It's separate
192
- from the API token above.
193
-
194
- Where to find it:
195
- \u2022 Open https://dash.cloudflare.com and select your account
196
- \u2022 The Account ID is the 32-character hex string in the address
197
- bar (dash.cloudflare.com/<ACCOUNT_ID>), and is also shown on
198
- the account's Workers & Pages overview page under 'Account ID'
199
-
200
- Without it, wrangler shows an interactive account picker that would
201
- stall an unattended pipeline run, so Klaudius requires it up front.`}});return{cloudflareApiToken:n,cloudflareAccountId:t.trim()}}},qe={id:"netlify",title:"Netlify deployment",isApplicable:e=>e.deployProvider==="netlify",execute:async(e,{prompt:a})=>({netlifyAuthToken:await a({type:"password",message:"Paste your Netlify access token",initialValue:e.netlifyAuthToken??"",validate:t=>t.trim().length===0?"Required \u2014 without this Klaudius can't deploy generated sites":void 0,note:{title:"Netlify access token",body:`Klaudius deploys every generated client site to Netlify using the
202
- Netlify CLI. It authenticates with a personal access token (no
203
- interactive login), so there's no browser step at deploy time.
204
-
205
- How to create one (one-time, ~30 seconds):
206
- 1. Open
207
- https://app.netlify.com/user/applications#personal-access-tokens
208
- 2. Click 'New access token'
209
- 3. Name it 'Klaudius', leave the expiry at 'No expiration'
210
- (recommended) or pick a duration
211
- 4. Click 'Generate token', then copy it (you only see it once)
212
-
213
- Don't have a Netlify account yet? Sign up free at netlify.com. The
214
- free (Starter) tier includes 100 GB bandwidth/month across all your
215
- sites \u2014 plenty to start. Klaudius builds each site on your own
216
- machine and uploads the finished files, so it never spends your
217
- monthly build-minutes allowance.
218
-
219
- STUCK? Open Claude (or any LLM) in another tab/app and paste:
220
-
221
- "I need to create a personal access token for the Klaudius CLI
222
- tool in Netlify. Walk me through generating one at
223
- app.netlify.com/user/applications, including which expiry to
224
- choose."`}})})},Ye={id:"supabase",title:"Supabase",isApplicable:()=>!0,execute:async(e,{prompt:a,info:n})=>{n({title:"Supabase setup",body:`Supabase is your CRM. It's where Klaudius records every business it
225
- finds, where each one sits in your funnel (gathered \u2192 built \u2192 deployed
226
- \u2192 outreach sent \u2192 responded), and the follow-up state for every lead.
227
- You can browse it at any time from the Supabase dashboard, or ask
228
- Claude \u2014 your Klaudius project ships with the Supabase MCP wired in,
229
- so Claude can read the CRM live (e.g. 'who replied this week?',
230
- 'who haven't I followed up with?').
231
-
232
- The free tier (500 MB database, 5 GB bandwidth/month) is plenty:
233
- Klaudius's records are tiny text rows (a few KB per client at most),
234
- and the only reads/writes are the pipeline's own bookkeeping \u2014
235
- no public traffic to your CRM. Even with thousands of leads tracked
236
- you'll use a sliver of the limit.
237
-
238
- If you don't have a project yet: open https://supabase.com/dashboard
239
- and create one. The flow is:
240
- 1. Sign up (or sign in) with GitHub / Google / email
241
- 2. 'Create a new organization' page \u2014 name and type don't matter
242
- for Klaudius, pick anything you like
243
- 3. Plan page \u2014 pick Free
244
- 4. 'Create a new project' page \u2014 set a database password (any
245
- strong password \u2014 Klaudius doesn't use it directly, but you'll
246
- want it later if you ever connect to the database manually).
247
- Region defaults to the nearest one to you, leave it. Accept
248
- defaults for any other security settings on the page.
249
- 5. Click 'Create new project'.
250
-
251
- STUCK on any of the prompts below? Open Claude (or ChatGPT, or any LLM)
252
- in another tab/app and paste this prompt verbatim:
253
-
254
- "I'm setting up a Supabase project to use with the Klaudius CLI.
255
- The wizard is asking for: (1) project URL, (2) the secret/service-
256
- role key, (3) a personal access token. Walk me through where to
257
- find each one in the current Supabase dashboard UI, including the
258
- exact menu paths and any caveats for newer vs. legacy projects."`});let i=(await a({type:"text",message:"Paste your Supabase API URL",placeholder:"https://YOUR_REF.supabase.co",initialValue:e.supabaseUrl??"",validate:l=>/^https:\/\/[a-z0-9]+\.supabase\.co(\/rest\/v1\/?)?$/i.test(l.trim())?void 0:"Should look like https://xxxx.supabase.co (with or without /rest/v1/)",note:{title:"API URL",body:`In your Supabase dashboard, open your project, then go to:
259
- Settings \u2192 Data API \u2192 'API URL'
260
-
261
- It looks like https://xxxx.supabase.co. Click to copy and paste
262
- below.`}})).trim().replace(/\/rest\/v1\/?$/i,"").replace(/\/$/,""),s=i.match(/^https:\/\/([a-z0-9]+)\.supabase\.co/i)?.[1]??"",c=(await a({type:"password",message:"Paste the Supabase secret key (sb_secret_\u2026)",initialValue:e.supabaseServiceKey??"",validate:l=>{let d=l.trim(),g=j(d);if(g)return g;if(d.length<20)return"Looks too short";if(d.startsWith("sb_publishable_"))return"That's the publishable key. Klaudius needs the 'sb_secret_\u2026' key on the same page (different row, below the publishable one).";if(!d.startsWith("sb_secret_")&&!d.startsWith("eyJ"))return"Doesn't look like a Supabase secret key. Expected 'sb_secret_\u2026' (or a legacy JWT starting with 'eyJ\u2026' on older projects)."},note:{title:"Secret key",body:`Open this exact page:
263
- https://supabase.com/dashboard/project/${s}/settings/api-keys
264
-
265
- Under 'Secret keys', find the row whose value starts with
266
- 'sb_secret_'. Click to copy the full value.
267
-
268
- NEVER use the 'anon' / 'public' / 'sb_publishable_' key (those
269
- are client-side keys with no write permissions).
270
-
271
- Don't confuse this page with 'Edge Functions \u2192 Secrets' in the
272
- left sidebar \u2014 that's an unrelated feature (env vars for Edge
273
- Functions). The page you want is Settings (gear icon, bottom
274
- of the left sidebar) \u2192 API Keys.`}})).replace(/\s+/g,""),r=(await a({type:"password",message:"Paste the Supabase personal access token",initialValue:e.supabasePat??"",validate:Ke,note:{title:"Personal access token",body:`This is a separate credential from the secret key above \u2014 it's an
275
- ACCOUNT-wide token (not project-scoped) used by the Supabase MCP and
276
- by Klaudius's schema migration.
277
-
278
- Open this exact page:
279
- https://supabase.com/dashboard/account/tokens
280
-
281
- Click 'Generate new token', name it 'Klaudius', and set the
282
- expiration to 'Never' (recommended \u2014 saves you having to rotate
283
- it later). Copy the value (starts with 'sbp_') and paste it
284
- below.`}})).replace(/\s+/g,"");return{supabaseUrl:i,supabaseServiceKey:c,supabasePat:r,supabaseProjectRef:s}}},Ze={id:"google-places",title:"Google Places API",isApplicable:()=>!0,execute:async(e,{prompt:a})=>{let n=await a({type:"password",message:"Paste your Google Places API key",placeholder:"AIzaSy\u2026",initialValue:e.googlePlacesApiKey??"",validate:i=>te(i),note:{title:"Google Places API key",body:`Klaudius's /find skill queries Google's Places API to discover businesses
285
- without websites in your target region. Without a key, the pipeline has
286
- no source of leads \u2014 so this is required.
287
-
288
- Cost: Google gives every new account $300 in trial credit to spend over
289
- 90 days. That's far more than you'll need at solo-operator volume \u2014
290
- Klaudius's Places API calls are fractions of a cent each. If you do
291
- exhaust it, sign up again with a different Google account to get
292
- another $300 trial.
293
-
294
- How to get a key (~5 min):
295
- 1. Open https://console.cloud.google.com and sign in (or create a
296
- Google account if you don't have one yet).
297
- 2. On the welcome page, click 'Try for free' (or 'Start free' in the
298
- top banner) and complete the signup. Google asks for a card to
299
- verify identity, but won't charge it \u2014 the trial caps at the
300
- $300 credit unless you manually upgrade to a paid account.
301
- 3. Once the trial is active, Google auto-creates a project called
302
- 'My First Project'. Make sure it's selected in the project picker
303
- at the top of the console (it should be by default).
304
- 4. APIs & Services \u2192 Library \u2192 search 'Places API' \u2192 click
305
- 'Places API (New)' (NOT the legacy 'Places API') \u2192 Enable.
306
- 5. Google's 'Get Started on Google Maps Platform' page opens and
307
- auto-generates an API key for you (starts with 'AIzaSy\u2026').
308
- Click the copy icon next to it and paste below.
309
-
310
- Optional but recommended once you've pasted the key: lock it down via
311
- APIs & Services \u2192 Credentials \u2192 click your key \u2192 under 'API
312
- restrictions' restrict it to 'Places API (New)'. Klaudius works either
313
- way.
314
-
315
- STUCK? Open Claude (or any LLM) in another tab/app and paste this prompt:
316
-
317
- "I need a Google Places API (New) key for a CLI tool called
318
- Klaudius. Walk me through claiming the $300 Google Cloud free trial
319
- and getting the API key Google auto-generates after enabling
320
- Places API (New), including any signup gotchas."`}});return{googlePlacesApiKey:ne(n).value}}},Je={id:"telegram",title:"Telegram (optional)",isApplicable:()=>!0,clearOnSkip:["telegramBotToken","telegramChatId"],execute:async(e,{prompt:a})=>{if(!await a({type:"confirm",message:"Set up Telegram notifications? (sends a ping when outreach lands)",initialValue:!!e.telegramBotToken,note:{title:"Telegram notifications (optional)",body:`Klaudius can ping a Telegram chat when outreach is sent or when a
321
- candidate replies. This is OPTIONAL \u2014 skip it if you'd rather check
322
- the Supabase dashboard manually.
323
-
324
- If you say yes, you'll need a Telegram bot token (created via
325
- @BotFather, ~30 seconds) and your chat ID (your own user ID, for
326
- personal pings). The next two prompts walk you through both.`}}))return{telegramBotToken:void 0,telegramChatId:void 0};let t=await a({type:"password",message:"Paste your Telegram bot token",initialValue:e.telegramBotToken??"",validate:R("Bot token"),note:{title:"Bot token",body:`Telegram lets you create personal bots in ~30 seconds. Klaudius
327
- uses a bot to send you private notifications.
328
-
329
- How to create one:
330
- 1. Open Telegram (mobile, desktop, or web).
331
- 2. Search for the user '@BotFather' and open the chat.
332
- 3. Send /newbot.
333
- 4. BotFather asks for a display name \u2014 pick anything (e.g.
334
- 'Klaudius Notifier').
335
- 5. BotFather asks for a username \u2014 must end in 'bot' (e.g.
336
- 'KlaudiusNotifierBot'). Each username has to be globally
337
- unique, so add a personal suffix if it's taken.
338
- 6. BotFather replies with a token like
339
- '1234567890:AAEhBP_yourtokenhere\u2026'. Copy it and paste below.`}}),i=null,s=0,o=null,c=null;for(;i===null;){s++;let u=s>1,r=c==="network"?`${o}
340
-
341
- This is usually a network problem on your end (corporate WiFi or VPN
342
- blocking Telegram, ISP DNS issue, a momentary drop). Check your
343
- connection, try a different network if available, then press Enter
344
- to retry.`:`${o}
345
-
346
- Make sure you sent a regular text message (e.g. 'hi'), not
347
- just a /start tap \u2014 /start alone doesn't always register.
348
- Then press Enter to retry.`;await a({type:"text",message:u?c==="network"?"Check your network, then press Enter to retry":"Send another message to the bot, then press Enter to retry":"Send a message to your bot, then press Enter to detect chat ID",initialValue:"",placeholder:"(press Enter when you've sent the message)",validate:()=>{},note:{title:u?"Detect chat ID \u2014 retry":"Detect chat ID",body:u?r:`Klaudius will auto-detect your chat ID by asking Telegram for
349
- any messages your bot has received. To make that work:
350
-
351
- 1. In the Telegram app, search for the bot you just created
352
- (the username ending in 'bot') and open the chat.
353
- 2. Send it a regular text message \u2014 type 'hi' and tap send.
354
- If the chat starts with a 'Start' button, tap that first,
355
- THEN send 'hi'. /start alone doesn't always show up.
356
- 3. Press Enter below \u2014 Klaudius will detect the chat ID for
357
- you.`}});let l=await ae({botToken:t});if(l.ok&&l.chatId)i=l.chatId;else if(l.reason==="no_messages")o="No messages from you to your bot have been picked up yet.",c="no_messages";else if(l.reason==="network")o=l.message??"Could not reach Telegram.",c="network";else throw new Error(`Telegram chat ID auto-detect failed: ${l.message??"unknown error"}`)}return{telegramBotToken:t,telegramChatId:i}}},x=[Le,Fe,Ge,ze,Ve,De,Ue,He,We,_e,$e,je,qe,Ye,Ze,Je];import{Box as ce,Text as Xe}from"ink";import{jsx as de,jsxs as aa}from"react/jsx-runtime";var Qe={pending:"\u25CB",current:"\u25C9",done:"\u2713",skipped:"\xB7"},ea={pending:void 0,current:"cyan",done:"green",skipped:void 0};function ge({items:e}){return de(ce,{flexDirection:"column",width:28,flexShrink:0,children:e.map(a=>{let n=a.status==="skipped"||a.status==="pending";return de(ce,{children:aa(Xe,{color:ea[a.status],bold:a.status==="current",dimColor:n&&a.status!=="current",children:[Qe[a.status]," ",a.title]})},a.id)})})}import{useEffect as na,useState as pe}from"react";import{Box as q,Text as H,useInput as ta}from"ink";import oa from"ink-text-input";import{jsx as F,jsxs as Y}from"react/jsx-runtime";function he({spec:e,masked:a,onSubmit:n,onBack:t}){let i=typeof e.initialValue=="string"?e.initialValue:"",s=a&&i.length>0,[o,c]=pe(s?"":i),[u,r]=pe(null);na(()=>(b("TextPromptUI:mount",{masked:a,message:e.message.slice(0,60),initial:typeof e.initialValue=="string"?e.initialValue.slice(0,30):null}),()=>{b("TextPromptUI:unmount")}),[a,e.message,e.initialValue]),ta((d,g)=>{b("TextPromptUI:useInput fired",{input:d,ctrl:g.ctrl,escape:g.escape,return:g.return}),g.escape&&t()});let l=d=>{b("TextPromptUI:handleSubmit",{raw:d.slice(0,30)});let g=d.length===0&&s?i:d;if(e.validate){let m=e.validate(g);if(m){b("TextPromptUI:validate failed",{err:m}),r(m);return}}r(null),n(g)};return Y(q,{flexDirection:"column",children:[Y(H,{children:[F(H,{color:"cyan",children:"?"})," ",e.message]}),Y(q,{children:[F(H,{color:"green",children:"\u203A "}),F(oa,{value:o,onChange:c,onSubmit:l,placeholder:s?"type or paste a new value \u2014 or press Enter to keep the current one":e.placeholder,mask:a?"\u2022":void 0})]}),u&&F(q,{marginTop:0,children:F(H,{color:"red",children:u})})]})}import{useState as ia}from"react";import{Box as me,Text as Z,useInput as sa}from"ink";import{jsx as ye,jsxs as J}from"react/jsx-runtime";function fe({spec:e,onSubmit:a,onBack:n}){let t=e.options??[],i=typeof e.initialValue=="string"?Math.max(0,t.findIndex(c=>c.value===e.initialValue)):0,[s,o]=ia(i===-1?0:i);return sa((c,u)=>{if(u.escape)n();else if(u.upArrow)o(r=>(r-1+t.length)%t.length);else if(u.downArrow)o(r=>(r+1)%t.length);else if(u.return){let r=t[s];r&&a(r.value)}}),J(me,{flexDirection:"column",children:[J(Z,{children:[ye(Z,{color:"cyan",children:"?"})," ",e.message]}),ye(me,{flexDirection:"column",marginTop:0,children:t.map((c,u)=>{let r=u===s;return J(Z,{color:r?"cyan":void 0,bold:r,children:[r?"\u25CF ":"\u25CB ",c.label]},c.value)})})]})}import{useState as ra}from"react";import{Box as be,Text as G,useInput as la}from"ink";import{jsx as Ce,jsxs as z}from"react/jsx-runtime";function we({spec:e,onSubmit:a,onBack:n}){let[t,i]=ra(typeof e.initialValue=="boolean"?e.initialValue:!0);return la((s,o)=>{o.escape?n():o.leftArrow||o.rightArrow?i(c=>!c):s==="y"||s==="Y"?i(!0):s==="n"||s==="N"?i(!1):o.return&&a(t)}),z(be,{flexDirection:"column",children:[z(G,{children:[Ce(G,{color:"cyan",children:"?"})," ",e.message]}),z(be,{marginTop:0,children:[z(G,{color:t?"cyan":void 0,bold:t,children:[t?"\u25CF ":"\u25CB ","Yes"]}),Ce(G,{children:" "}),z(G,{color:t?void 0:"cyan",bold:!t,children:[t?"\u25CB ":"\u25CF ","No"]})]})]})}import{Box as Se,Text as ke}from"ink";import{jsx as X,jsxs as ua}from"react/jsx-runtime";function Q({title:e,body:a}){let n=a.split(`
358
- `);return ua(Se,{flexDirection:"column",borderStyle:"round",borderColor:"gray",paddingX:1,children:[X(ke,{color:"cyan",bold:!0,children:e}),X(Se,{flexDirection:"column",marginTop:0,children:n.map((t,i)=>X(ke,{dimColor:!1,children:t.length===0?" ":t},i))})]})}import{jsx as h,jsxs as V}from"react/jsx-runtime";function nn({defaults:e,onComplete:a,onlySection:n,banner:t}){let{exit:i}=ga(),s=ee({...e}),o=ee(new Map),[,c]=M(0),u=()=>c(y=>y+1),[r,l]=M(null),[d,g]=M(null),[m,A]=M([]),[I,C]=M(null),[N,ve]=M(!1),[W,Pe]=M({current:0,total:0}),B=()=>{let y=o.current;for(let w of x){let $=w.isApplicable(s.current),p=y.get(w.id);$?n&&w.id!==n?p!=="current"&&y.set(w.id,"done"):(p==="skipped"||!p)&&y.set(w.id,"pending"):y.set(w.id,"skipped")}};o.current.size===0&&B();let _=ee(!1);ca(()=>{if(b("WizardApp:useEffect fired",{startedAlready:_.current}),_.current){b("WizardApp:useEffect returning early (startedRef true)");return}_.current=!0,b("WizardApp:orchestrator starting");let y=0,w=p=>{let P=++y;return b("orchestrator:promptFn called",{id:P,type:p.type,message:p.message.slice(0,60)}),C(null),new Promise((S,f)=>{g({id:P,spec:p,resolve:T=>{b("orchestrator:prompt resolved",{id:P,type:p.type,value:typeof T=="string"?T.slice(0,30):T}),S(T)},reject:T=>{b("orchestrator:prompt rejected",{id:P,reason:T.message}),f(T)}})})},$=p=>{A(P=>[...P,p])};return(async()=>{try{let p=n?x.filter(f=>f.id===n):x,P=()=>p.filter(f=>f.isApplicable(s.current)).length,S=0;for(;S<p.length;){let f=p[S];if(!f.isApplicable(s.current)){o.current.set(f.id,"skipped"),S++,B(),u();continue}A([]);for(let k of x)k.id===f.id?o.current.set(k.id,"current"):o.current.get(k.id)==="current"&&o.current.set(k.id,"pending");l(f.id);let T=p.slice(0,S+1).filter(k=>k.isApplicable(s.current)).length;Pe({current:T,total:P()}),u();try{let k=await f.execute(s.current,{prompt:w,info:$});s.current={...s.current,...k},o.current.set(f.id,"done"),B(),S++}catch(k){if(k instanceof L){if(n&&f.clearOnSkip){for(let Ie of f.clearOnSkip)s.current[Ie]=void 0;o.current.set(f.id,"skipped"),B(),S++;continue}if(n)continue;o.current.set(f.id,"pending");let K=S-1;for(;K>=0&&!p[K].isApplicable(s.current);)K--;K<0||(S=K,o.current.set(p[S].id,"pending")),B(),u();continue}throw k}}b("orchestrator:all sections done, calling onComplete + exit"),ve(!0),g(null),l(null),u(),await new Promise(f=>setTimeout(f,200)),a(s.current),i()}catch(p){b("orchestrator:caught error",{name:p?.name,message:p?.message}),p instanceof U&&(i(),process.exit(0));let P=p instanceof Error?p.message:String(p);C(`Setup error: ${P}`),u()}})(),()=>{b("WizardApp:useEffect cleanup ran (component unmounting)")}},[i,a]),pa((y,w)=>{b("WizardApp:useInput fired",{input:y,ctrl:w.ctrl,escape:w.escape,return:w.return}),w.ctrl&&y==="c"&&(b("WizardApp:Ctrl+C \u2192 exiting"),i(),process.exit(0))});let Ae=da(()=>x.map(y=>({id:y.id,title:y.title,status:o.current.get(y.id)??"pending"})),[r,N,I]);return V(v,{flexDirection:"column",paddingY:1,children:[V(v,{marginBottom:1,children:[h(E,{bold:!0,color:"cyan",children:"Klaudius setup"}),h(E,{dimColor:!0,children:" \xB7 "}),h(E,{dimColor:!0,children:W.total>0?`Step ${W.current} of ${W.total}`:"Loading\u2026"})]}),V(v,{children:[h(ge,{items:Ae}),V(v,{flexDirection:"column",flexGrow:1,marginLeft:2,children:[t&&V(v,{marginBottom:1,borderStyle:"round",borderColor:"red",paddingX:1,flexDirection:"column",children:[h(E,{color:"red",bold:!0,children:"\u26A0 Heads up"}),h(E,{children:t})]}),!n&&r!==null&&r!=="ai-agent"&&h(v,{marginBottom:1,children:h(E,{color:"green",children:"Nothing here is permanent, you can customize any of this later."})}),m.map((y,w)=>h(v,{marginBottom:1,children:h(Q,{title:y.title,body:y.body})},w)),d?.spec.note&&h(v,{marginBottom:1,children:h(Q,{title:d.spec.note.title,body:d.spec.note.body})}),d&&ma(d),I&&h(v,{marginTop:1,children:h(E,{color:"red",children:I})}),N&&h(v,{marginTop:1,children:h(E,{color:"green",bold:!0,children:"\u2713 Setup complete. Continuing\u2026"})})]})]}),h(v,{marginTop:1,children:h(E,{dimColor:!0,children:ha(n,r)})})]})}function ha(e,a){if(e){let n=x.find(t=>t.id===a);return n?.clearOnSkip&&n.clearOnSkip.length>0?"\u21B5 confirm esc skip this section ctrl-c cancel":"\u21B5 confirm ctrl-c cancel"}return"\u21B5 confirm esc back to previous section ctrl-c cancel"}function ma(e){let a=t=>e.resolve(t),n=()=>e.reject(new L);switch(e.spec.type){case"text":case"password":return h(he,{spec:e.spec,masked:e.spec.type==="password",onSubmit:a,onBack:n},e.id);case"select":return h(fe,{spec:e.spec,onSubmit:a,onBack:n},e.id);case"confirm":return h(we,{spec:e.spec,onSubmit:a,onBack:n},e.id)}}export{nn as WizardApp};
@@ -1,6 +0,0 @@
1
- import{appendFileSync as g}from"fs";import{tmpdir as k}from"os";import{join as b}from"path";var u=b(k(),"klaudius-wizard-debug.log"),y=process.env.KLAUDIUS_WIZARD_DEBUG==="1",h=!1;function T(e,t){if(y)try{h||(h=!0,g(u,`
2
- === klaudius wizard debug session \u2014 ${new Date().toISOString()} ===
3
- node ${process.version}, platform ${process.platform}, tty=${process.stdin.isTTY}
4
- `));let n=`${Date.now()} `,o=t===void 0?"":" "+JSON.stringify(t,null,0).slice(0,400);g(u,n+e+o+`
5
- `)}catch{}}var E=u,p=!1;function G(){if(p)return;p=!0;let e=process.exit.bind(process);process.exit=(t=>{let n=new Error("process.exit called").stack??"(no stack)";return T("process.exit called",{code:t,stack:n.split(`
6
- `).slice(0,8).join(" | ")}),e(t)})}function c(e){if(!(e instanceof Error))return String(e);let t=e.cause;if(!t||!(t instanceof Error))return e.message;let n=t.code,o=t.message;return n&&o&&o!==n?`${e.message} (${n}: ${o})`:n?`${e.message} (${n})`:o?`${e.message} (${o})`:e.message}async function O(e){let t;try{let s=await fetch(`https://api.telegram.org/bot${encodeURIComponent(e.botToken)}/getUpdates`);if(t=await s.json(),!t.ok){let r=t.description??`HTTP ${s.status}`;return/webhook/i.test(r)?{ok:!1,reason:"webhook_set",message:"This bot has a webhook set, so getUpdates is unavailable. Auto-detect can't run; you'll need to paste the chat ID manually."}:{ok:!1,reason:"bad_token",message:`Telegram rejected the bot token: ${r}. Double-check the token from @BotFather.`}}}catch(s){return{ok:!1,reason:"network",message:`Could not reach Telegram: ${c(s)}`}}let n=t.result??[];if(n.length===0)return{ok:!1,reason:"no_messages",message:"No messages yet. Send your bot a regular text message in Telegram, then retry."};let o=n[n.length-1],a=o?.message?.chat?.id??o?.edited_message?.chat?.id??o?.channel_post?.chat?.id;return a===void 0?{ok:!1,reason:"no_messages",message:"Got an update from Telegram but couldn't find a chat ID in it. Send another text message and retry."}:{ok:!0,chatId:String(a)}}async function $(e){try{let t=await fetch(`https://api.telegram.org/bot${encodeURIComponent(e.botToken)}/getMe`),n=await t.json();return n.ok?{ok:!0,botHandle:n.result?.username?`@${n.result.username}`:n.result?.first_name}:{ok:!1,failedAt:"token",message:`Telegram rejected the bot token: ${n.description??`HTTP ${t.status}`}. Generate a new token by messaging @BotFather \u2192 /mytoken or /newbot.`}}catch(t){return{ok:!1,failedAt:"token",message:`Could not reach Telegram: ${c(t)}`}}}async function H(e){let t=await $({botToken:e.botToken});if(!t.ok)return t;let n=t.botHandle;try{let o=await fetch(`https://api.telegram.org/bot${encodeURIComponent(e.botToken)}/sendMessage`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({chat_id:e.chatId,text:"\u2713 Klaudius connected. You'll get a notification here whenever outreach lands or a candidate replies. (You can ignore this setup message.)",disable_notification:!0})}),a=await o.json();if(!a.ok){let s=a.description??`HTTP ${o.status}`,r="";return/chat not found/i.test(s)?r=" The chat_id is wrong, or the bot hasn't been added to that chat yet. If it's a group, you must add the bot to the group first; then send /start to it.":(/bot was blocked/i.test(s)||/forbidden/i.test(s))&&(r=" The bot has been blocked by the chat, or never received a /start. Open Telegram, find your bot, and send /start to wake it up."),{ok:!1,failedAt:"chat",botHandle:n,message:`Telegram delivered the bot token check but couldn't send to chat_id ${e.chatId}: ${s}.${r}`}}}catch(o){return{ok:!1,failedAt:"chat",botHandle:n,message:`Could not reach Telegram for chat_id check: ${c(o)}`}}return{ok:!0,botHandle:n}}var x={\u0410:"A",\u0430:"a",\u0412:"B",\u0432:"b",\u0415:"E",\u0435:"e",\u041A:"K",\u043A:"k",\u041C:"M",\u043C:"m",\u041D:"H",\u043D:"h",\u041E:"O",\u043E:"o",\u0420:"P",\u0440:"p",\u0421:"C",\u0441:"c",\u0422:"T",\u0442:"t",\u0423:"Y",\u0443:"y",\u0425:"X",\u0445:"x",\u0406:"I",\u0456:"i",\u0405:"S",\u0455:"s",\u0408:"J",\u0458:"j",\u0417:"3",\u0437:"3",\u0427:"4",\u0431:"6",\u0391:"A",\u03B1:"a",\u0392:"B",\u03B2:"b",\u0395:"E",\u03B5:"e",\u0396:"Z",\u0397:"H",\u0399:"I",\u03B9:"i",\u039A:"K",\u03BA:"k",\u039C:"M",\u039D:"N",\u039F:"O",\u03BF:"o",\u03A1:"P",\u03C1:"p",\u03A4:"T",\u03C4:"t",\u03A5:"Y",\u03A7:"X",\u03C7:"x",\u03BD:"v","\u2010":"-","\u2011":"-","\u2012":"-","\u2013":"-","\u2014":"-","\u2015":"-","\u2212":"-","\uFF3F":"_"},C=/[\u200B-\u200F\u202A-\u202E\u2060\uFEFF\u00AD]/g,w=/[\u0000-\u001F\u007F]/g;function I(e){let t=e.replace(C,"").replace(w,"").trim();return{value:t,changed:t!==e,repairs:[],unrepairable:[]}}function f(e){let n=I(e).value.normalize("NFKC").replace(/\s+/g,"");n.length>=2&&(n[0]==='"'&&n.at(-1)==='"'||n[0]==="'"&&n.at(-1)==="'")&&(n=n.slice(1,-1).trim());let o=[],a=[],s="";for(let r of n){let i=r.codePointAt(0);if(i<128){s+=r;continue}let l=x[r],d=s.length+1;l?(o.push(`position ${d}: '${r}' (${v(i)}, U+${m(i)}) \u2192 '${l}'`),s+=l):(a.push({position:d,char:r,code:i}),s+=r)}return{value:s,changed:s!==e,repairs:o,unrepairable:a}}var A=/^AIza[0-9A-Za-z_-]{35}$/;function _(e){return A.test(e)}function B(e){let t=f(e);if(t.value.length===0)return"Required \u2014 without this Klaudius can't find candidates.";if(t.unrepairable.length>0){let n=t.unrepairable[0];return`Character ${n.position} of this key is '${n.char}' (U+${m(n.code)}), which isn't a character a Google key can contain. Copy the key with the copy button next to it in the Cloud Console \u2014 reading it off a screenshot or retyping it introduces look-alike characters.`}}function j(e){let t=f(e).value;if(!_(t))return t.startsWith("AIza")?t.length!==39?`A Google API key is normally 39 characters \u2014 this one is ${t.length}. `+(t.length>39?"It looks like two keys ran together, so paste just the one key.":"It looks truncated, so copy it again with the copy button next to it in the Cloud Console."):"This key contains characters a Google key normally doesn't. Re-copy it with the copy button in the Cloud Console.":`A Google API key normally starts with "AIza" \u2014 this one starts with "${t.slice(0,4)}". Check you copied the API key itself (Cloud Console \u2192 Credentials), not a project ID or client ID.`}function m(e){return e.toString(16).toUpperCase().padStart(4,"0")}function v(e){return e>=1024&&e<=1279?"Cyrillic":e>=880&&e<=1023?"Greek":"non-Latin"}export{T as a,E as b,G as c,c as d,O as e,$ as f,H as g,I as h,f as i,B as j,j as k};