@vibecloudtr/cli 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +3 -3
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __commonJS=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports};var __copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod));var require_src=__commonJS({"node_modules/sisteransi/src/index.js"(exports,module){"use strict";var ESC2="\x1B",CSI2=`${ESC2}[`,beep="\x07",cursor3={to(x,y2){return y2?`${CSI2}${y2+1};${x+1}H`:`${CSI2}${x+1}G`},move(x,y2){let ret="";return x<0?ret+=`${CSI2}${-x}D`:x>0&&(ret+=`${CSI2}${x}C`),y2<0?ret+=`${CSI2}${-y2}A`:y2>0&&(ret+=`${CSI2}${y2}B`),ret},up:(count2=1)=>`${CSI2}${count2}A`,down:(count2=1)=>`${CSI2}${count2}B`,forward:(count2=1)=>`${CSI2}${count2}C`,backward:(count2=1)=>`${CSI2}${count2}D`,nextLine:(count2=1)=>`${CSI2}E`.repeat(count2),prevLine:(count2=1)=>`${CSI2}F`.repeat(count2),left:`${CSI2}G`,hide:`${CSI2}?25l`,show:`${CSI2}?25h`,save:`${ESC2}7`,restore:`${ESC2}8`},scroll={up:(count2=1)=>`${CSI2}S`.repeat(count2),down:(count2=1)=>`${CSI2}T`.repeat(count2)},erase3={screen:`${CSI2}2J`,up:(count2=1)=>`${CSI2}1J`.repeat(count2),down:(count2=1)=>`${CSI2}J`.repeat(count2),line:`${CSI2}2K`,lineEnd:`${CSI2}K`,lineStart:`${CSI2}1K`,lines(count2){let clear="";for(let i2=0;i2<count2;i2++)clear+=this.line+(i2<count2-1?cursor3.up():"");return count2&&(clear+=cursor3.left),clear}};module.exports={cursor:cursor3,scroll,erase:erase3,beep}}});var ERRCODES={ADMISSION_REJECTED:{httpStatus:400,async:!1,messageTR:"\u0130stek ge\xE7ersiz veya eksik bilgi i\xE7eriyor.",messageEN:"The request is invalid or missing information.",retryable:!1,fix:"fix the field the message names and retry"},APP_SOURCE_MISMATCH:{httpStatus:409,async:!1,messageTR:"Bu uygulama bu yolla yay\u0131nlanamaz: y\xFCklemeyle olu\u015Fturulan bir uygulamaya git referans\u0131, git'ten olu\u015Fturulan bir uygulamaya ar\u015Fiv yay\u0131nlanamaz.",messageEN:"This app cannot be deployed this way: an app created from an upload cannot take a git ref, and an app created from git cannot take an archive.",retryable:!1,fix:"for an upload app vibe deploy upload --project <slug> (MCP: deploy.upload_begin then deploy.upload_finish); for a git app vibe deploy start --project <slug>"},AUTH_UNAVAILABLE:{httpStatus:503,async:!1,messageTR:"Giri\u015F ve parola i\u015Flemleri \u015Fu anda yap\u0131lam\u0131yor; biraz sonra tekrar deneyin.",messageEN:"Sign-in and password operations are unavailable right now; try again shortly.",retryable:!0,fix:"retry in 30 s"},BACKUP_NOT_YET_TAKEN:{httpStatus:409,async:!1,messageTR:"Hen\xFCz bir yedek al\u0131nmam\u0131\u015F.",messageEN:"No backup has been taken yet.",retryable:!1,fix:"retry after the first backup"},BADGE_DOMAIN_PROXIED:{httpStatus:403,async:!1,messageTR:"Kendi proxy\u2019nizin arkas\u0131ndaki bir alan ad\u0131 i\xE7in bar\u0131nd\u0131rma rozeti a\xE7\u0131lamaz.",messageEN:"The hosting badge cannot be enabled for a domain behind your own proxy.",retryable:!1,fix:"turn the proxy off for the domain (setDomainProxy to NONE), then retry"},BADGE_DOMAIN_UNVERIFIED:{httpStatus:403,async:!1,messageTR:"Bu alan ad\u0131 do\u011Frulanmadan bar\u0131nd\u0131rma rozeti a\xE7\u0131lamaz.",messageEN:"The hosting badge cannot be enabled before this domain is verified.",retryable:!1,fix:"vibe domain verify <hostname> then retry"},BOT_CHECK_FAILED:{httpStatus:400,async:!1,messageTR:"Robot do\u011Frulamas\u0131 ge\xE7ilemedi; do\u011Frulama kutusunu yeniden i\u015Faretleyip tekrar g\xF6nderin.",messageEN:"The bot check did not pass; tick the verification box again and resubmit.",retryable:!1,fix:"tick the bot-check box on the console page again and resubmit \u2014 these endpoints take a token only that frame can produce"},BOT_CHECK_UNAVAILABLE:{httpStatus:503,async:!1,messageTR:"Robot do\u011Frulamas\u0131 \u015Fu anda yap\u0131lam\u0131yor; biraz sonra tekrar deneyin.",messageEN:"The bot check cannot be performed right now; try again shortly.",retryable:!0,fix:"retry in 30 s"},BRANCH_NAME_INVALID:{httpStatus:400,async:!1,messageTR:"Branch ad\u0131 yaln\u0131zca k\xFC\xE7\xFCk harf, rakam ve tire i\xE7erebilir (en fazla 24 karakter, `--` olmadan).",messageEN:"A branch name may contain only lowercase letters, digits and hyphens (at most 24 characters, no `--`).",retryable:!1,fix:"vibe branch create <another-name>"},BRANCH_TTL_INVALID:{httpStatus:400,async:!1,messageTR:"Branch s\xFCresi en fazla 5 g\xFCn olabilir.",messageEN:"A branch can live at most 5 days.",retryable:!1,fix:"vibe branch create --ttl 72h (default) or vibe branch extend --ttl <\u2264 5 days from creation>"},BUILD_CONFIG_CONFLICT:{httpStatus:400,async:!1,messageTR:"`next.config` i\xE7inde platformun \xE7al\u0131\u015Ft\u0131ramad\u0131\u011F\u0131 bir `output` de\u011Feri var.",messageEN:"`next.config` sets an `output` value the platform cannot run.",retryable:!1,fix:"remove the output line from next.config (or set the project outputMode to static), then vibe deploy start --project <slug>"},BUILD_CONFIG_INVALID:{httpStatus:0,async:!0,messageTR:"Derleme yap\u0131land\u0131rmas\u0131 ge\xE7ersiz: bir ortam de\u011Fi\u015Fkeni derlemeye aktar\u0131lam\u0131yor.",messageEN:"The build configuration is invalid: an environment variable cannot be passed to the build.",retryable:!1,fix:"fix the variable the failure message names: vibe config unset --project <slug> --name <NAME>, then vibe config set --project <slug> --name <VALID_NAME> --value <value> (or the console's environment page), then vibe deploy start --project <slug>"},BUILD_CONTENT_REJECTED:{httpStatus:0,async:!0,messageTR:"Derleme i\xE7erik taramas\u0131ndan ge\xE7emedi: yan\u0131lt\u0131c\u0131 veya zararl\u0131 i\xE7erik tespit edildi.",messageEN:"The build did not pass the content scan: misleading or harmful content was detected.",retryable:!1,fix:"read https://vibecloud.tr/acceptable-use; appeal via https://vibecloud.tr/contact"},BUILD_FAILED:{httpStatus:0,async:!0,messageTR:"Derleme ba\u015Far\u0131s\u0131z oldu.",messageEN:"The build failed.",retryable:!1,fix:"fix the build error in your code, then vibe deploy start --project <slug>"},BUILD_IN_PROGRESS:{httpStatus:409,async:!1,messageTR:"Bu uygulaman\u0131n bir derlemesi zaten s\u0131rada ya da s\xFCr\xFCyor; bitmesini bekleyin.",messageEN:"A build of this app is already queued or running; wait for it to finish.",retryable:!0,fix:"wait for the current build to finish, then deploy again"},BUILD_LOG_UNAVAILABLE:{httpStatus:409,async:!1,messageTR:"Bu derlemenin kayd\u0131 saklanmad\u0131; yeni bir derleme ba\u015Flatabilirsiniz.",messageEN:"This build's log was not kept; you can start a new build.",retryable:!1,fix:"vibe deploy start --project <slug> \u2014 the next build keeps its log"},BUILD_OUTPUT_UNSCANNABLE:{httpStatus:0,async:!0,messageTR:"Derleme \xE7\u0131kt\u0131s\u0131 taranam\u0131yor: boyut veya dosya say\u0131s\u0131 s\u0131n\u0131r\u0131n\u0131 a\u015F\u0131yor ya da sunulan bir klas\xF6rde sembolik ba\u011Flant\u0131 var.",messageEN:"The build output cannot be scanned: it exceeds the size or file-count limit, or a served folder contains a symbolic link.",retryable:!1,fix:"shrink the output or replace the link with the file, then vibe deploy start --project <slug>"},BUILD_PLATFORM_VALUE_UNAVAILABLE:{httpStatus:0,async:!0,messageTR:"Derleme i\xE7in gereken bir platform de\u011Feri (proje API adresi ya da anon anahtar\u0131) haz\u0131r olmad\u0131\u011F\u0131ndan derleme ba\u015Flat\u0131lamad\u0131; kaynak kodunuzla ilgili de\u011Fil.",messageEN:"The build could not start because a platform value it needs (the project API address or the anon key) was not ready; this is not about your source code.",retryable:!0,fix:"vibe deploy start --project <slug> \u2014 after vibe project status --project <slug> shows the project Ready"},BUILD_QUEUE_TIMEOUT:{httpStatus:0,async:!0,messageTR:"Derleme s\u0131rada \xE7ok uzun bekledi.",messageEN:"The build waited in the queue too long.",retryable:!0,fix:"vibe deploy start --project <slug>"},BUILD_REGISTRY_UNAVAILABLE:{httpStatus:0,async:!0,messageTR:"Derleme, platform taraf\u0131ndaki bir sorun nedeniyle yap\u0131lamad\u0131; kodunuzla ilgili bir sorun yok. Yeniden deneyin; sorun s\xFCrerse destekle ileti\u015Fime ge\xE7in.",messageEN:"The build could not run because of a problem on the platform's side; nothing is wrong with your code. Retry, and contact support if it persists.",retryable:!0,fix:"vibe deploy start --project <slug>"},BUILD_SCAN_REJECTED:{httpStatus:0,async:!0,messageTR:"Derleme g\xFCvenlik taramas\u0131ndan ge\xE7emedi.",messageEN:"The build did not pass the security scan.",retryable:!1,fix:"upgrade the package the message names to its fix version, then vibe deploy start --project <slug>"},BUILD_SCAN_TIMEOUT:{httpStatus:0,async:!0,messageTR:"Derleme \xE7\u0131kt\u0131s\u0131n\u0131n taramas\u0131 s\xFCresi i\xE7inde tamamlanamad\u0131.",messageEN:"The scan of the build output did not finish in time.",retryable:!0,fix:"vibe deploy start --project <slug>"},BUILD_SECRET_REJECTED:{httpStatus:0,async:!0,messageTR:"Kaynak kodda ya da derleme \xE7\u0131kt\u0131s\u0131nda gizli bir Supabase anahtar\u0131 (service_role / sb_secret_) bulundu; derleme durduruldu. \u0130stemci taraf\u0131nda anon anahtar\u0131n\u0131 kullan\u0131n.",messageEN:"A secret Supabase key (service_role / sb_secret_) was found in the source or build output; the build was stopped. Use the anon key on the client side.",retryable:!1,fix:"remove the service_role key from the source, use the anon key client-side, then vibe deploy start --project <slug>"},BUILD_SOURCE_REJECTED:{httpStatus:0,async:!0,messageTR:"Derleme kayna\u011F\u0131 reddedildi: repo adresi k\xFCme i\xE7i bir adrese \xE7\xF6z\xFCmleniyor.",messageEN:"The build source was rejected: the repository address resolves to an in-cluster address.",retryable:!1,fix:"use a public https git source and redeploy"},BUILD_SOURCE_UNAUTHORIZED:{httpStatus:0,async:!0,messageTR:"Derleme kayna\u011F\u0131 okunamad\u0131: repo \xF6zel ve platformun GitHub uygulamas\u0131 bu repoya eri\u015Femiyor.",messageEN:"The build source could not be read: the repository is private and the platform's GitHub App cannot access it.",retryable:!1,fix:`an owner or admin grants the repository in Ayarlar \u203A GitHub entegrasyonu ("GitHub'da repo eri\u015Fimini d\xFCzenle", or install the app when none is installed), then redeploy; if the repository is public, check its address and branch`},BUILD_SOURCE_UNAVAILABLE:{httpStatus:0,async:!0,messageTR:"Derleme kayna\u011F\u0131 platform taraf\u0131ndaki bir sorun nedeniyle okunamad\u0131; kodunuzla ya da GitHub ba\u011Flant\u0131n\u0131zla ilgili de\u011Fil.",messageEN:"The build source could not be read because of a platform-side fault; this is not about your code or your GitHub connection.",retryable:!1,fix:"none \u2014 a platform-side fault; open https://vibecloud.tr/contact, then vibe deploy start --project <slug> once it is fixed"},BUILD_TIMEOUT:{httpStatus:0,async:!0,messageTR:"Derleme zaman a\u015F\u0131m\u0131na u\u011Frad\u0131.",messageEN:"The build timed out.",retryable:!0,fix:"vibe deploy start --project <slug>"},CAPACITY_UNVERIFIED:{httpStatus:0,async:!0,messageTR:"Proje kurulumu bir platform denetimi nedeniyle gecikti; platform kurulumu kendisi yeniden deneyecek.",messageEN:"Project setup was delayed by a platform check; the platform retries it automatically.",retryable:!1,fix:"nothing to do: the platform re-sends the setup itself. Follow project.status and do not create another project"},CELL_APPS_VIP_UNDECLARED:{httpStatus:503,async:!1,messageTR:"Bu alan ad\u0131 i\xE7in y\xF6nlendirme kayd\u0131 hen\xFCz verilemiyor.",messageEN:"A routing record for this domain cannot be issued yet.",retryable:!1,fix:"none \u2014 a platform-side declaration; vibe domain add a subdomain (CNAME) in the meantime"},CELL_AT_CAPACITY:{httpStatus:503,async:!1,messageTR:"Kapasitemiz \u015Fu an dolu ve art\u0131r\u0131yoruz. Talebinizi kaydettik; yer a\xE7\u0131l\u0131nca e-posta ile haber verece\u011Fiz.",messageEN:"We are at capacity right now and adding more. Your request is recorded; we will email you when room opens up.",retryable:!0,fix:"wait for the availability e-mail"},CELL_UNREACHABLE:{httpStatus:503,async:!1,messageTR:"\u0130\u015Fleminiz \u015Fu anda iletilemedi.",messageEN:"Your operation could not be delivered right now.",retryable:!0,fix:"retry"},CERT_ISSUANCE_FAILED:{httpStatus:0,async:!0,messageTR:"Sertifika al\u0131namad\u0131.",messageEN:"The certificate could not be obtained.",retryable:!0,fix:"retry in 10 min"},CERT_RENEWAL_FAILED:{httpStatus:0,async:!1,messageTR:"",messageEN:"",retryable:!0,fix:""},CHECKOUT_CLOSED:{httpStatus:409,async:!1,messageTR:"Bu projenin \xF6deme s\xFCresi doldu; projeyi konsoldan silip yeniden olu\u015Fturun.",messageEN:"This project's payment window has closed; delete the project in the console and create it again.",retryable:!1,fix:"delete the project in the console, create it again, then complete the checkout"},COMMAND_DEAD_LETTERED:{httpStatus:500,async:!1,messageTR:"\u0130\u015Fleminiz tamamlanamad\u0131.",messageEN:"Your operation could not be completed.",retryable:!1,fix:"open https://vibecloud.tr/contact"},CONCURRENCY_LIMIT:{httpStatus:503,async:!1,messageTR:"Uygulaman\u0131z \u015Fu anda kapasitesinin \xFCzerinde istek al\u0131yor.",messageEN:"Your app is receiving more requests than its capacity right now.",retryable:!0,fix:"vibe project resize --project <slug> --package <next package>"},CONFIG_TOO_LARGE:{httpStatus:400,async:!1,messageTR:"Ortam de\u011Fi\u015Fkeni s\u0131n\u0131r\u0131n\u0131 a\u015Ft\u0131n\u0131z.",messageEN:"You have exceeded the environment variable limit.",retryable:!1,fix:"vibe config unset <KEY> until within limits"},CONFIRMATION_MISMATCH:{httpStatus:400,async:!1,messageTR:"Onay i\xE7in proje ad\u0131n\u0131 do\u011Fru yazman\u0131z gerekiyor.",messageEN:"You must type the project name correctly to confirm.",retryable:!1,fix:"repeat the command with the exact project slug"},CONSENT_BANNER_UNCONFIGURED:{httpStatus:409,async:!1,messageTR:"Banner\u0131n metinleri ve g\xF6r\xFCn\xFCm\xFC kaydedilmeden yerle\u015Ftirme kodu olu\u015Fturulamaz.",messageEN:"The embed code cannot be generated before the banner's text and appearance are saved.",retryable:!1,fix:"saveConsentBanner for the domain, then retry"},CONSENT_DOMAIN_UNVERIFIED:{httpStatus:403,async:!1,messageTR:"Bu alan ad\u0131 do\u011Frulanmadan r\u0131za hizmeti a\xE7\u0131lamaz.",messageEN:"The consent service cannot be enabled before this domain is verified.",retryable:!1,fix:"vibe domain verify <hostname> then retry"},CONSENT_EXPORT_TOO_LARGE:{httpStatus:422,async:!1,messageTR:"Se\xE7ilen d\xF6nemin r\u0131za kay\u0131tlar\u0131 tek dosyaya s\u0131\u011Fm\u0131yor; daha k\u0131sa bir d\xF6nem se\xE7in.",messageEN:"The consent records for the selected period do not fit in one file; choose a shorter period.",retryable:!1,fix:"narrow from/to and retry"},CONSENT_INPUT_INVALID:{httpStatus:400,async:!1,messageTR:"Banner ayarlar\u0131nda ge\xE7ersiz bir de\u011Fer var.",messageEN:"A banner setting has an invalid value.",retryable:!1,fix:"correct details.field and retry"},CONSENT_NOT_ENABLED:{httpStatus:409,async:!1,messageTR:"Bu alan ad\u0131nda \xE7erez izni banner\u0131 kapal\u0131; \xF6nce banner\u0131 a\xE7\u0131n.",messageEN:"The cookie consent banner is off on this domain; turn the banner on first.",retryable:!1,fix:"setConsentEnabled(enabled: true) for the domain, then retry"},CONTACT_DOMAIN_UNVERIFIED:{httpStatus:403,async:!1,messageTR:"Bu alan ad\u0131 do\u011Frulanmadan ileti\u015Fim formu a\xE7\u0131lamaz.",messageEN:"The contact form cannot be enabled before this domain is verified.",retryable:!1,fix:"vibe domain verify <hostname> then retry"},CONTACT_NOT_ENABLED:{httpStatus:409,async:!1,messageTR:"Bu alan ad\u0131nda ileti\u015Fim formu kapal\u0131; \xF6nce formu a\xE7\u0131n.",messageEN:"The contact form is off on this domain; switch it on first.",retryable:!1,fix:"setContactEnabled(enabled: true) then retry"},CREDENTIAL_KIND_FORBIDDEN:{httpStatus:403,async:!1,messageTR:"Bu i\u015Flem API anahtar\u0131 ile yap\u0131lamaz; konsoldan giri\u015F yap\u0131n.",messageEN:"This action cannot be done with an API key; sign in to the console.",retryable:!1,fix:"do this in the console signed in, or with vibe after vibe login \u2014 not with an API key (PAT)"},DEPLOY_WARMUP_FAILED:{httpStatus:0,async:!0,messageTR:"Yeni s\xFCr\xFCm haz\u0131r duruma gelemedi.",messageEN:"The new version could not become ready.",retryable:!0,fix:"fix the app startup error, then vibe deploy start --project <slug>"},DISPATCH_FAILED:{httpStatus:0,async:!0,messageTR:"Komut kuyru\u011Fa al\u0131namad\u0131.",messageEN:"The command could not be queued.",retryable:!0,fix:"retry"},DNS_RECORD_INVALID:{httpStatus:400,async:!1,messageTR:"DNS kayd\u0131 ge\xE7ersiz.",messageEN:"The DNS record is invalid.",retryable:!1,fix:"fix the record and retry"},DNS_RECORD_LIMIT:{httpStatus:422,async:!1,messageTR:"Bu b\xF6lgedeki kay\u0131t s\u0131n\u0131r\u0131na ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached the record limit for this zone.",retryable:!1,fix:"remove unused records"},DNS_RECORD_PRIVATE_ADDRESS:{httpStatus:400,async:!1,messageTR:"Bu adres \xF6zel bir a\u011F aral\u0131\u011F\u0131nda; herkese a\xE7\u0131k bir DNS kayd\u0131na yaz\u0131lamaz.",messageEN:"This address is in a private network range and cannot be published in a public DNS record.",retryable:!1,fix:"use a public address"},DNS_RECORD_RESERVED:{httpStatus:409,async:!1,messageTR:"Bu kay\u0131t platform taraf\u0131ndan y\xF6netiliyor ve de\u011Fi\u015Ftirilemez.",messageEN:"This record is managed by the platform and cannot be changed.",retryable:!1,fix:"vibe domain release <hostname>"},DNS_ZONE_CLAIMED:{httpStatus:409,async:!1,messageTR:"Bu alan ad\u0131 ba\u015Fka bir hesapta ad sunucusu ta\u015F\u0131ma i\xE7in bekliyor. Alan ad\u0131n\u0131n sizin oldu\u011Funu mevcut DNS sa\u011Flay\u0131c\u0131n\u0131zda bir TXT kayd\u0131yla kan\u0131tlayabilirsiniz.",messageEN:"This domain is pending a nameserver move in another account. You can prove it is yours with a TXT record at your current DNS provider.",retryable:!1,fix:"publish the returned TXT record, then vibe zone prove --name <zone>"},DNS_ZONE_NOT_APEX:{httpStatus:400,async:!1,messageTR:"Ad sunucular\u0131m\u0131za yaln\u0131zca kay\u0131tl\u0131 alan ad\u0131n\u0131n kendisi (\xF6r. sirket.com.tr) ta\u015F\u0131nabilir, alt alan ad\u0131 ta\u015F\u0131namaz.",messageEN:"Only a registrable domain (e.g. sirket.com.tr) can be moved to our nameservers, not a subdomain.",retryable:!1,fix:"vibe zone add --name <registrable-domain>"},DNS_ZONE_NOT_DELEGATED:{httpStatus:409,async:!1,messageTR:"Alan ad\u0131n\u0131n ad sunucular\u0131 hen\xFCz bizi g\xF6stermiyor.",messageEN:"The domain's nameservers do not point to us yet.",retryable:!0,fix:"vibe zone verify --name <zone>"},DOMAIN_CAA_BLOCKS_ISSUANCE:{httpStatus:409,async:!1,messageTR:"Alan ad\u0131n\u0131z\u0131n CAA kayd\u0131 sertifika verilmesini engelliyor.",messageEN:"Your domain's CAA record blocks certificate issuance.",retryable:!1,fix:"add a CAA record allowing letsencrypt.org, then vibe domain verify <hostname>"},DOMAIN_VERIFICATION_EXPIRED:{httpStatus:409,async:!1,messageTR:"Do\u011Frulama s\xFCresi doldu.",messageEN:"The verification window has expired.",retryable:!1,fix:"vibe domain add <hostname>"},DOMAIN_VERIFICATION_PENDING:{httpStatus:0,async:!0,messageTR:"DNS kayd\u0131 hen\xFCz g\xF6r\xFCnm\xFCyor.",messageEN:"The DNS record is not visible yet.",retryable:!0,fix:"vibe domain verify <hostname>"},DSAR_APPLY_DEFERRED:{httpStatus:503,async:!1,messageTR:"KVKK ba\u015Fvuru formunun haz\u0131rl\u0131\u011F\u0131 beklenenden uzun s\xFCrd\xFC; otomatik olarak yeniden deneniyor.",messageEN:"Preparing the KVKK request form took longer than expected; it is being retried automatically.",retryable:!0,fix:"nothing to do \u2014 the platform retries by itself; if the checklist turns FAILED, retryDsarProvisioning(projectId)"},DSAR_DEPROVISION_RESIDUE:{httpStatus:409,async:!1,messageTR:"KVKK ba\u015Fvuru hizmeti kapat\u0131lamad\u0131: projede h\xE2l\xE2 yan\u0131t bekleyen ba\u015Fvurular ya da belgeler var.",messageEN:"The KVKK request service could not be turned off: the project still has requests or documents awaiting a response.",retryable:!1,fix:"answer and close the remaining applications; the service is shut down once none remain. If none remain, contact support with the operation id"},DSAR_DOMAIN_UNVERIFIED:{httpStatus:403,async:!1,messageTR:"Bu alan ad\u0131 do\u011Frulanmadan KVKK ba\u015Fvuru hizmeti a\xE7\u0131lamaz.",messageEN:"The KVKK request service cannot be enabled before this domain is verified.",retryable:!1,fix:"vibe domain verify <hostname> then retry"},DSAR_MAIL_UNCONFIGURED:{httpStatus:409,async:!1,messageTR:"Projenizin e-posta sunucusu (SMTP) ayarlanmadan ba\u015Fvuru formu do\u011Frulama kodu g\xF6nderemez.",messageEN:"The request form cannot send verification codes until your project's email server (SMTP) is configured.",retryable:!1,fix:"configure the project's SMTP in the console's mail settings; the form opens by itself"},DSAR_NOT_ENABLED:{httpStatus:409,async:!1,messageTR:"Bu alan ad\u0131nda KVKK ba\u015Fvuru formu kapal\u0131; \xF6nce formu a\xE7\u0131n.",messageEN:"The KVKK request form is off on this domain; turn the form on first.",retryable:!1,fix:"setDsarEnabled(enabled: true) for the domain, then retry"},DSAR_PROVISIONING_FAILED:{httpStatus:503,async:!1,messageTR:"KVKK ba\u015Fvuru hizmeti bu projede kurulamad\u0131.",messageEN:"The KVKK request service could not be set up in this project.",retryable:!1,fix:"retryDsarProvisioning(projectId); if it fails again, contact support with the operation id"},DSAR_PROVISIONING_PENDING:{httpStatus:409,async:!1,messageTR:"KVKK ba\u015Fvuru formunun eri\u015Fim ayarlar\u0131nda s\xFCren bir i\u015Flem var; birka\xE7 dakika sonra yeniden deneyin.",messageEN:"An operation on the KVKK request form's access settings is in progress; retry in a few minutes.",retryable:!0,fix:"wait a few minutes for the operation in progress to finish (DsarConsole.provisioning shows it), then retry"},EGRESS_CIDR_REJECTED:{httpStatus:400,async:!1,messageTR:"A\u011F izin listesine yaln\u0131zca alan ad\u0131 eklenebilir.",messageEN:"Only domain names can be added to the network allowlist.",retryable:!1,fix:"remove the CIDR rule and retry"},ENTERPRISE_DEMOTION_BLOCKED:{httpStatus:409,async:!1,messageTR:"Organizasyonda a\xE7\u0131k limit a\u015F\u0131m\u0131, RLS korumas\u0131 kapal\u0131 ya da IP izin listesi tan\u0131ml\u0131 projeler varken kurumsal seviye kald\u0131r\u0131lamaz.",messageEN:"The enterprise tier cannot be removed while the organization has open overages, projects with RLS protection disabled, or projects with an IP allowlist.",retryable:!1,fix:""},ENTERPRISE_ONLY:{httpStatus:403,async:!1,messageTR:"Bu \xF6zellik yaln\u0131zca kurumsal organizasyonlarda kullan\u0131labilir.",messageEN:"This feature is only available in enterprise organizations.",retryable:!1,fix:"open https://vibecloud.tr/contact"},ENTERPRISE_REQUIRED:{httpStatus:403,async:!1,messageTR:"Pro paketler yaln\u0131zca kurumsal organizasyonlarda se\xE7ilebilir.",messageEN:"Pro packages can only be chosen in enterprise organizations.",retryable:!1,fix:"open https://vibecloud.tr/contact"},ENTITLEMENT_STALE:{httpStatus:409,async:!1,messageTR:"Hesap bilgileriniz g\xFCncelleniyor, tekrar deneyin.",messageEN:"Your account details are being updated; try again.",retryable:!0,fix:"retry"},ENTITLEMENT_UNAVAILABLE:{httpStatus:503,async:!1,messageTR:"Hesap bilgileriniz \u015Fu anda do\u011Frulanam\u0131yor.",messageEN:"Your account details cannot be verified right now.",retryable:!0,fix:"retry in 30 s"},EXPORT_EXPIRED:{httpStatus:410,async:!1,messageTR:"Ar\u015Fivin saklama s\xFCresi doldu ve silindi. Yeni bir d\u0131\u015Fa aktarma isteyebilirsiniz.",messageEN:"The archive's retention period ended and it was deleted. You can request a new export.",retryable:!1,fix:"request a new export"},EXPORT_NOT_ADDRESSABLE:{httpStatus:409,async:!1,messageTR:"Bu ar\u015Fivin bulundu\u011Fu b\xF6lge kay\u0131tl\u0131 de\u011Fil; l\xFCtfen bize yaz\u0131n.",messageEN:"The region holding this archive is not registered; please contact us.",retryable:!1,fix:"open https://vibecloud.tr/contact"},EXPORT_NOT_READY:{httpStatus:409,async:!1,messageTR:"Ar\u015Fiv hen\xFCz indirilemez; haz\u0131r oldu\u011Funda burada g\xF6r\xFCn\xFCr.",messageEN:"The archive cannot be downloaded yet; it appears here when ready.",retryable:!0,fix:"retry later"},EXTENSION_NOT_ALLOWED:{httpStatus:403,async:!1,messageTR:"Bu PostgreSQL eklentisi kullan\u0131lam\u0131yor.",messageEN:"This PostgreSQL extension is not available.",retryable:!1,fix:"remove the extension and retry"},FORBIDDEN_ROLE:{httpStatus:403,async:!1,messageTR:"Bu i\u015Flem i\xE7in yetkiniz yok.",messageEN:"You do not have permission for this action.",retryable:!1,fix:"ask an org ADMIN or OWNER to run this \u2014 https://vibecloud.tr/team"},FORBIDDEN_SCOPE:{httpStatus:403,async:!1,messageTR:"Bu eri\u015Fim jetonu bu i\u015Flem i\xE7in gereken yetkiyi ta\u015F\u0131m\u0131yor.",messageEN:"This access token does not carry the scope this action needs.",retryable:!1,fix:'vibe login --scope "<details.scope>"'},GITHUB_UNAVAILABLE:{httpStatus:503,async:!1,messageTR:"GitHub'a \u015Fu anda ula\u015F\u0131lam\u0131yor. Biraz sonra tekrar deneyin.",messageEN:"GitHub cannot be reached right now. Try again shortly.",retryable:!0,fix:"retry later"},HOSTNAME_BLOCKED:{httpStatus:403,async:!1,messageTR:"Bu alan ad\u0131 g\xFCvenlik nedeniyle kullan\u0131lamaz.",messageEN:"This domain cannot be used for security reasons.",retryable:!1,fix:"vibe domain add <a non-lookalike hostname>"},HOSTNAME_CLAIMED:{httpStatus:409,async:!1,messageTR:"Bu alan ad\u0131 ba\u015Fka bir hesap taraf\u0131ndan kullan\u0131l\u0131yor.",messageEN:"This domain is in use by another account.",retryable:!1,fix:"vibe domain add <another-hostname>"},HOSTNAME_INVALID:{httpStatus:400,async:!1,messageTR:"Alan ad\u0131 ge\xE7ersiz.",messageEN:"The domain is invalid.",retryable:!1,fix:"vibe domain add <a valid hostname>"},IDEMPOTENCY_KEY_REUSED:{httpStatus:409,async:!1,messageTR:"Bu i\u015Flem farkl\u0131 parametrelerle yeniden g\xF6nderildi.",messageEN:"This operation was resent with different parameters.",retryable:!1,fix:"retry with a new clientMutationId"},INGRESS_ALLOWLIST_REQUIRES_PRO:{httpStatus:403,async:!1,messageTR:"IP izin listesi yaln\u0131zca Pro paketlerde kullan\u0131labilir.",messageEN:"The IP allowlist is available on Pro packages only.",retryable:!1,fix:"send an empty cidrs list; a non-empty list needs a Pro package (enterprise tier)"},INTERNAL:{httpStatus:500,async:!1,messageTR:"Beklenmeyen bir hata olu\u015Ftu.",messageEN:"An unexpected error occurred.",retryable:!0,fix:"retry; if it persists open https://vibecloud.tr/contact with the traceId from details when present"},INVITATION_EMAIL_MISMATCH:{httpStatus:403,async:!1,messageTR:"Bu davet ba\u015Fka bir e-posta adresine g\xF6nderildi.",messageEN:"This invitation was sent to a different email address.",retryable:!1,fix:"sign in with the invited address, then open the link again"},INVITATION_NOT_FOUND:{httpStatus:404,async:!1,messageTR:"Bu davet bulunamad\u0131 ya da art\u0131k ge\xE7erli de\u011Fil.",messageEN:"This invitation was not found or is no longer valid.",retryable:!1,fix:"ask the organisation's admin for a new invitation"},KEY_ROTATION_IS_ATOMIC:{httpStatus:400,async:!1,messageTR:"Anahtarlar tek tek yenilenemez; \xFC\xE7\xFC birlikte yenilenir.",messageEN:"Keys cannot be rotated one at a time; all three rotate together.",retryable:!1,fix:"repeat without keyKind \u2014 all three keys rotate together"},LAST_SIGN_IN_METHOD:{httpStatus:409,async:!1,messageTR:"Bu, hesab\u0131n\u0131za girmenin tek yolu. Kald\u0131rmadan \xF6nce bir parola belirleyin veya ba\u015Fka bir giri\u015F y\xF6ntemi ba\u011Flay\u0131n.",messageEN:"This is the only way to sign in to your account. Set a password or link another sign-in method before removing it.",retryable:!1,fix:"set a password (the reset mail) or connect another sign-in method at https://vibecloud.tr/settings, then retry"},LOGIN_CHALLENGE_EXPIRED:{httpStatus:400,async:!1,messageTR:"Kodun s\xFCresi doldu. Yeni bir kod i\xE7in tekrar giri\u015F yap\u0131n.",messageEN:"The code has expired. Sign in again for a new one.",retryable:!1,fix:"sign in again for a new code"},LOGIN_CODE_INVALID:{httpStatus:400,async:!1,messageTR:"Kod yanl\u0131\u015F. E-postadaki 6 haneli kodu kontrol edin.",messageEN:"That code is wrong. Check the 6-digit code in the email.",retryable:!1,fix:"re-read the code from the mail, five tries in all"},LOG_DRAIN_RESIDENCY_ACK_REQUIRED:{httpStatus:422,async:!1,messageTR:"Yurt d\u0131\u015F\u0131 bir hedefe log aktar\u0131m\u0131 i\xE7in s\u0131n\u0131r \xF6tesi veri aktar\u0131m\u0131 onay\u0131 gerekir.",messageEN:"Sending logs to a destination abroad requires acknowledging the cross-border data transfer.",retryable:!1,fix:"residencyAck=true ile tekrar deneyin"},LOG_STORE_UNAVAILABLE:{httpStatus:503,async:!1,messageTR:"Uygulama g\xFCnl\xFCkleri \u015Fu anda kullan\u0131lam\u0131yor; l\xFCtfen daha sonra tekrar deneyin.",messageEN:"App logs are unavailable right now; please try again later.",retryable:!0,fix:"retry later"},MARKETING_DOMAIN_UNVERIFIED:{httpStatus:403,async:!1,messageTR:"Bu alan ad\u0131 do\u011Frulanmadan ticari ileti onay formu a\xE7\u0131lamaz.",messageEN:"The marketing consent form cannot be enabled before this domain is verified.",retryable:!1,fix:"vibe domain verify <hostname> then retry"},MARKETING_NOT_ENABLED:{httpStatus:409,async:!1,messageTR:"Bu alan ad\u0131nda ticari ileti onay formu kapal\u0131; \xF6nce formu a\xE7\u0131n.",messageEN:"The marketing consent form is off on this domain; switch it on first.",retryable:!1,fix:"setMarketingEnabled(enabled: true) then retry"},MARKETING_SENDER_NAME_INVALID:{httpStatus:400,async:!1,messageTR:"Ticari ileti onay formunu a\xE7mak i\xE7in iletileri g\xF6nderecek i\u015Fletmenin ticari unvan\u0131n\u0131 (esnafsan\u0131z ad\u0131n\u0131z\u0131 ve soyad\u0131n\u0131z\u0131) girin: 2-200 karakter, tek sat\u0131r.",messageEN:"Enter the trade name of the business that will send the messages (2 to 200 characters, one line) to switch the marketing consent form on.",retryable:!1,fix:'setMarketingEnabled(enabled: true, senderName: "<ticari unvan>")'},METRICS_UNAVAILABLE:{httpStatus:503,async:!1,messageTR:"\xD6l\xE7\xFCmler \u015Fu anda okunam\u0131yor; l\xFCtfen daha sonra tekrar deneyin.",messageEN:"Metrics cannot be read right now; please try again later.",retryable:!0,fix:"retry later"},MFA_ALREADY_ENROLLED:{httpStatus:409,async:!1,messageTR:"\u0130ki ad\u0131ml\u0131 do\u011Frulama zaten etkin.",messageEN:"Two-factor authentication is already enabled.",retryable:!1,fix:"open https://vibecloud.tr/settings"},MFA_CHALLENGE_FAILED:{httpStatus:403,async:!1,messageTR:"Do\u011Frulama kodu ge\xE7ersiz veya s\xFCresi dolmu\u015F.",messageEN:"The verification code is invalid or has expired.",retryable:!1,fix:"request a new code and retry once"},MFA_LOCKED:{httpStatus:429,async:!1,messageTR:"\xC7ok fazla hatal\u0131 do\u011Frulama kodu girildi; 15 dakika sonra tekrar deneyin.",messageEN:"Too many wrong verification codes; try again in 15 minutes.",retryable:!0,fix:"wait 15 minutes, then retry with a new code"},MFA_NOT_PENDING:{httpStatus:409,async:!1,messageTR:"Tamamlanacak bir do\u011Frulama kayd\u0131 yok.",messageEN:"There is no pending verification enrolment to complete.",retryable:!1,fix:"open https://vibecloud.tr/settings and start enrolment again"},MFA_REQUIRED:{httpStatus:403,async:!1,messageTR:"Bu i\u015Flem i\xE7in iki ad\u0131ml\u0131 do\u011Frulama gerekiyor.",messageEN:"This action requires two-factor authentication.",retryable:!1,fix:"send a current code from the user's authenticator in the Vibecloud-Otp header (vibe asks for it; an agent asks its user, never guesses); not enrolled: open details.enrolUrl (https://vibecloud.tr/settings#mfa)"},MIGRATION_IDENTITY_REQUIRED:{httpStatus:422,async:!1,messageTR:"Ge\xE7i\u015F kredisi i\xE7in vergi veya TC kimlik numaras\u0131 gerekir.",messageEN:"A migration credit requires a tax number or Turkish ID number.",retryable:!1,fix:"vergi/TC kimlik numaran\u0131z\u0131 fatura bilgilerine girin ve tekrar deneyin"},MIGRATION_NOT_COMPLETE:{httpStatus:409,async:!1,messageTR:"\u0130\xE7e aktar\u0131m hen\xFCz tamamlanmad\u0131: hedef \u015Femada kullan\u0131c\u0131 tablosu g\xF6r\xFCnm\xFCyor.",messageEN:"The import has not finished: no users table is visible in the target schema.",retryable:!0,fix:"i\xE7e aktar\u0131m\u0131 tamamlay\u0131n; hedefin \u015Femas\u0131 g\xF6zlemlendi\u011Finde tekrar deneyin"},MIGRATION_TARGET_NOT_EMPTY:{httpStatus:409,async:!1,messageTR:"Hedef proje bo\u015F de\u011Fil: i\xE7e aktar\u0131m yaln\u0131zca bo\u015F bir projeye yap\u0131labilir.",messageEN:"The target project is not empty: an import can only go into an empty project.",retryable:!1,fix:"vibe project create a fresh project and import into that, or empty the target yourself first"},NOT_FOUND:{httpStatus:404,async:!1,messageTR:"Kay\u0131t bulunamad\u0131.",messageEN:"Record not found.",retryable:!1,fix:"vibe project list"},ONBOARDING_INCOMPLETE:{httpStatus:400,async:!1,messageTR:"Fatura bilgileriniz eksik veya ge\xE7ersiz; e-Fatura i\xE7in tamamlay\u0131n.",messageEN:"The billing details are missing or invalid; complete them for the e-invoice.",retryable:!1,fix:"complete the billing details at https://vibecloud.tr/onboarding, then retry"},OPERATION_IN_PROGRESS:{httpStatus:409,async:!1,messageTR:"Bu proje \xFCzerinde ba\u015Fka bir i\u015Flem s\xFCr\xFCyor.",messageEN:"Another operation is in progress on this project.",retryable:!0,fix:"vibe project status --project <slug>, then retry when idle"},PACKAGE_FLOOR:{httpStatus:403,async:!1,messageTR:"Bu \xF6zellik daha \xFCst bir paket gerektirir.",messageEN:"This feature requires a higher package.",retryable:!1,fix:"vibe project resize --project <slug> --package <details.requiredPackage>"},PACKAGE_NOT_SERVED:{httpStatus:409,async:!1,messageTR:"Bu paket \u015Fu an bu b\xF6lgede sunulmuyor; l\xFCtfen destek ekibiyle ileti\u015Fime ge\xE7in.",messageEN:"This package is not offered in this region right now; please contact support.",retryable:!1,fix:"pick another package, or contact support"},PACKAGE_RETIRED:{httpStatus:400,async:!1,messageTR:"Bu paket art\u0131k sunulmuyor.",messageEN:"This package is no longer offered.",retryable:!1,fix:"pick a listed package from packages"},PARAMETER_NOT_ALLOWED:{httpStatus:400,async:!1,messageTR:"Bu ayar de\u011Fi\u015Ftirilemiyor.",messageEN:"This setting cannot be changed.",retryable:!1,fix:"remove the parameter and retry"},PAST_DUE:{httpStatus:402,async:!1,messageTR:"\xD6demesi gecikmi\u015F faturan\u0131z var.",messageEN:"You have an overdue invoice.",retryable:!1,fix:"settle the invoice at https://vibecloud.tr/billing"},PAYMENT_DETAILS_REJECTED:{httpStatus:422,async:!1,messageTR:"\xD6deme sa\u011Flay\u0131c\u0131s\u0131 girilen bilgileri kabul etmedi.",messageEN:"The payment provider rejected the details entered.",retryable:!1,fix:"correct the field the message names and submit again"},PAYMENT_NOT_RECEIVED:{httpStatus:0,async:!0,messageTR:"\xD6deme al\u0131nmad\u0131\u011F\u0131 i\xE7in proje serbest b\u0131rak\u0131ld\u0131.",messageEN:"The project was released because payment was not received.",retryable:!1,fix:"vibe project create again when ready to pay"},PAYMENT_PROVIDER_ERROR:{httpStatus:502,async:!1,messageTR:"\xD6deme sa\u011Flay\u0131c\u0131s\u0131na ula\u015F\u0131lamad\u0131.",messageEN:"The payment provider could not be reached.",retryable:!0,fix:"retry in 60 s"},PAYMENT_REQUIRED:{httpStatus:402,async:!1,messageTR:"Bu projenin \xF6demesi hen\xFCz al\u0131nmad\u0131.",messageEN:"Payment for this project has not been received yet.",retryable:!1,fix:"open details.checkoutUrl and complete the checkout, then retry"},PREVIEW_CLONE_DISABLED:{httpStatus:403,async:!1,messageTR:"Kopya modunda branch a\xE7mak i\xE7in organizasyon sahibi bu \xF6zelli\u011Fi a\xE7mal\u0131.",messageEN:"The organization owner must enable this feature to open branches in clone mode.",retryable:!1,fix:"ask the org owner to enable clone branches at https://vibecloud.tr/org/settings, or vibe branch create --mode schema"},PROJECT_SETUP_FAILED:{httpStatus:409,async:!1,messageTR:"Proje kurulamad\u0131.",messageEN:"The project could not be set up.",retryable:!1,fix:"do not retry. Delete the project (this ends its subscription) and contact support"},PROJECT_SETUP_PENDING:{httpStatus:409,async:!1,messageTR:"Projenin kurulumu yeniden deneniyor; servis birazdan ba\u015Flat\u0131labilir.",messageEN:"The project's setup is being retried; the service can be started shortly.",retryable:!0,fix:"retry in a minute: the project's setup is being re-sent"},PROJECT_STOPPED:{httpStatus:409,async:!1,messageTR:"Bu proje durduruldu. \xD6nce projeyi ba\u015Flat\u0131n.",messageEN:"This project is stopped. Start it first.",retryable:!1,fix:"vibe project start <project>"},PROJECT_TRANSFER_NOT_FOUND:{httpStatus:404,async:!1,messageTR:"Bu devir iste\u011Fi bulunamad\u0131 ya da art\u0131k ge\xE7erli de\u011Fil.",messageEN:"This project transfer was not found or is no longer valid.",retryable:!1,fix:"the source organisation's OWNER starts a new transfer"},PROJECT_TRANSFER_PENDING:{httpStatus:409,async:!1,messageTR:"Bu proje i\xE7in bekleyen bir devir iste\u011Fi var.",messageEN:"This project already has a pending transfer.",retryable:!1,fix:"wait for the target to answer, or cancel the pending transfer and start again"},PROJECT_TRANSFER_REFUSED:{httpStatus:409,async:!1,messageTR:"Bu proje \u015Fu anda devredilemez.",messageEN:"This project cannot be transferred right now.",retryable:!1,fix:"pay or settle the subscription first, or name another organisation"},PRO_REQUIRED:{httpStatus:403,async:!1,messageTR:"Kurumsal organizasyonlarda yaln\u0131zca Pro paketler se\xE7ilebilir.",messageEN:"Enterprise organizations can only choose Pro packages.",retryable:!1,fix:"vibe project resize --project <slug> --package <details.suggestedPackage>"},QUOTA_BUILDS_PER_DAY:{httpStatus:429,async:!1,messageTR:"G\xFCnl\xFCk derleme s\u0131n\u0131r\u0131n\u0131za ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached your daily build limit.",retryable:!0,fix:"retry after details.retryAfter"},QUOTA_BUILD_MINUTES:{httpStatus:403,async:!1,messageTR:"Ayl\u0131k derleme s\xFCresi s\u0131n\u0131r\u0131n\u0131za ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached your monthly build minutes limit.",retryable:!1,fix:"vibe project resize --project <slug> --package <next package>"},QUOTA_CONNECTIONS:{httpStatus:429,async:!1,messageTR:"Veritaban\u0131 ba\u011Flant\u0131 s\u0131n\u0131r\u0131n\u0131za ula\u015F\u0131ld\u0131.",messageEN:"The database connection limit has been reached.",retryable:!0,fix:"connect through the pooler URL from vibe db connect"},QUOTA_CUSTOM_DOMAINS:{httpStatus:403,async:!1,messageTR:"Alan ad\u0131 s\u0131n\u0131r\u0131n\u0131za ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached your custom domain limit.",retryable:!1,fix:"vibe domain release <hostname> or vibe project resize --project <slug> --package <next package>"},QUOTA_DB_STORAGE:{httpStatus:403,async:!1,messageTR:"Veritaban\u0131 depolama s\u0131n\u0131r\u0131n\u0131za ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached your database storage limit.",retryable:!1,fix:"vibe project resize --project <slug> --package <next package>"},QUOTA_EGRESS:{httpStatus:403,async:!1,messageTR:"Ayl\u0131k veri transferi s\u0131n\u0131r\u0131n\u0131za ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached your monthly data transfer limit.",retryable:!1,fix:"vibe project resize --project <slug> --package <next package>"},QUOTA_EGRESS_CARDINALITY:{httpStatus:429,async:!1,messageTR:"\xC7ok say\u0131da farkl\u0131 adrese ba\u011Flant\u0131 denendi.",messageEN:"Connections to too many distinct addresses were attempted.",retryable:!0,fix:"reduce the number of distinct destinations the app calls"},QUOTA_PREVIEW_BRANCHES:{httpStatus:403,async:!1,messageTR:"\xD6nizleme branch s\u0131n\u0131r\u0131n\u0131za ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached your preview branch limit.",retryable:!1,fix:"vibe branch delete <name> or vibe project resize --project <slug> --package <next package>"},QUOTA_PROJECTS_PER_ORG:{httpStatus:403,async:!1,messageTR:"Proje say\u0131s\u0131 s\u0131n\u0131r\u0131n\u0131za ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached your project limit.",retryable:!1,fix:"vibe project resize --project <slug> --package <next package> or remove a project"},QUOTA_RUNTIME_INSTANCES:{httpStatus:403,async:!1,messageTR:"\xC7al\u0131\u015Fan uygulama \xF6rne\u011Fi s\u0131n\u0131r\u0131n\u0131za ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached your running app instance limit.",retryable:!1,fix:"vibe project resize --project <slug> --package <next package>"},QUOTA_SEATS:{httpStatus:403,async:!1,messageTR:"Ekip \xFCyesi s\u0131n\u0131r\u0131n\u0131za ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached your team member limit.",retryable:!1,fix:"remove a member or withdraw an invitation at https://vibecloud.tr/team, or vibe project resize --project <slug> --package <next package>"},RATE_LIMITED:{httpStatus:429,async:!1,messageTR:"\xC7ok fazla istek g\xF6nderdiniz.",messageEN:"You have sent too many requests.",retryable:!0,fix:"retry after details.retryAfter"},READ_ONLY_STANDING:{httpStatus:402,async:!1,messageTR:"Hesab\u0131n\u0131z salt-okunur durumda.",messageEN:"Your account is read-only.",retryable:!1,fix:"settle the invoice at https://vibecloud.tr/billing"},REQUEST_TOO_LARGE:{httpStatus:413,async:!1,messageTR:"\u0130stek g\xF6vdesi \xE7ok b\xFCy\xFCk.",messageEN:"The request body is too large.",retryable:!1,fix:"send a smaller request \u2014 split the operation or trim the variables so the body stays under 1 MiB"},RESET_REVOCATION_INCOMPLETE:{httpStatus:500,async:!1,messageTR:"Parolan\u0131z de\u011Fi\u015Fti, ancak baz\u0131 oturum kapatma i\u015Flemleri tamamlanamad\u0131. Tamamlamak i\xE7in yeni bir parola s\u0131f\u0131rlama linki isteyin.",messageEN:"Your password was changed, but some sign-outs could not be completed. Request a new reset link to finish.",retryable:!1,fix:"request a new reset link from the console's *Parolam\u0131 unuttum*"},RESTORE_IN_PROGRESS:{httpStatus:409,async:!1,messageTR:"Bu proje i\xE7in bir kurtarma i\u015Flemi s\xFCr\xFCyor.",messageEN:"A restore is in progress for this project.",retryable:!0,fix:"retry when the restore finishes"},RESTORE_SOURCE_MISSING:{httpStatus:404,async:!1,messageTR:"Yedek bulunamad\u0131.",messageEN:"The backup was not found.",retryable:!1,fix:"vibe backups --project <slug>"},RESTORE_TARGET_UNREACHABLE:{httpStatus:409,async:!1,messageTR:"\u0130stenen zaman noktas\u0131 kurtarma penceresinin d\u0131\u015F\u0131nda.",messageEN:"The requested point in time is outside the recovery window.",retryable:!1,fix:"choose a point between details.pitrFloor and details.restoreCeiling"},RLS_DISABLE_FORBIDDEN:{httpStatus:403,async:!1,messageTR:"RLS yaln\u0131zca kurumsal organizasyonlarda kapat\u0131labilir.",messageEN:"RLS can only be disabled in enterprise organizations.",retryable:!1,fix:"keep RLS on; write a policy instead"},ROLLBACK_ACROSS_KEY_ROTATION:{httpStatus:409,async:!1,messageTR:"Bu s\xFCr\xFCm eski API anahtar\u0131yla derlenmi\u015F; geri d\xF6n\xFClemiyor.",messageEN:"This version was built with an old API key; it cannot be rolled back to.",retryable:!1,fix:"vibe deploy start --project <slug> (a fresh build carries the current keys)"},ROLLBACK_SECRET_REMOVED:{httpStatus:409,async:!1,messageTR:"Bu s\xFCr\xFCm art\u0131k tan\u0131ml\u0131 olmayan bir gizli de\u011Fi\u015Fkene ihtiya\xE7 duyuyor; geri d\xF6n\xFClemiyor.",messageEN:"This version needs a secret the app no longer declares; it cannot be rolled back to.",retryable:!1,fix:"vibe config secret --project <slug> --name <NAME> (value on stdin) for each secret the app no longer declares, then roll back again"},ROLLBACK_TARGET_REAPED:{httpStatus:409,async:!1,messageTR:"Bu s\xFCr\xFCme geri d\xF6n\xFClemiyor; art\u0131k saklanm\u0131yor (saklama s\xFCresi ge\xE7ti ya da uygulama statik siteye ge\xE7ti).",messageEN:"This version cannot be rolled back to; it is no longer kept (the retention period passed or the app moved to a static site).",retryable:!1,fix:"vibe deploy start --project <slug>"},SAVED_CARD_CHANGED:{httpStatus:409,async:!1,messageTR:"Kay\u0131tl\u0131 kart\u0131n\u0131z de\u011Fi\u015Fti; \xF6demeyi \u015Fimdi g\xF6sterilen kartla yeniden onaylay\u0131n.",messageEN:"Your saved card changed; confirm the payment again with the card now shown.",retryable:!1,fix:"read savedCardOffer again and confirm with the card it names"},SAVED_CARD_IN_PROGRESS:{httpStatus:409,async:!1,messageTR:"Bu proje i\xE7in kay\u0131tl\u0131 kartla bir \xF6deme s\xFCr\xFCyor.",messageEN:"A saved-card payment for this project is in progress.",retryable:!0,fix:"wait for Project.savedCardPurchase to finish"},SAVED_CARD_UNAVAILABLE:{httpStatus:409,async:!1,messageTR:"Kay\u0131tl\u0131 kart\u0131n\u0131zla \xF6deme \u015Fu an yap\u0131lam\u0131yor; \xF6deme formunu kullan\u0131n.",messageEN:"Paying with your saved card is not available right now; use the checkout form.",retryable:!1,fix:"use the hosted checkout (checkoutUrl)"},SECRET_IN_PLAINTEXT_ENV:{httpStatus:400,async:!1,messageTR:"Bu de\u011Fer gizli g\xF6r\xFCn\xFCyor; `env` yerine gizli anahtar olarak ekleyin.",messageEN:"This value looks secret; add it as a secret instead of `env`.",retryable:!1,fix:"vibe config secret <KEY>"},SECRET_WOULD_BE_PUBLIC:{httpStatus:400,async:!1,messageTR:"`NEXT_PUBLIC_` ile ba\u015Flayan bir de\u011Fer gizli tutulamaz; taray\u0131c\u0131ya g\xF6nderilir.",messageEN:"A value starting with `NEXT_PUBLIC_` cannot be kept secret; it is sent to the browser.",retryable:!1,fix:"rename the key without the NEXT_PUBLIC_ prefix, then vibe config secret <KEY>"},SERVICE_INIT_FAILED:{httpStatus:0,async:!0,messageTR:"Hizmet ba\u015Flat\u0131lamad\u0131.",messageEN:"The service could not be initialized.",retryable:!1,fix:"run the same init again: vibe db init --project <slug> (or auth init / storage init)"},SERVICE_NOT_INITIALIZED:{httpStatus:409,async:!1,messageTR:"Bu hizmet bu projede hen\xFCz ba\u015Flat\u0131lmad\u0131.",messageEN:"This service has not been initialized in this project yet.",retryable:!1,fix:"initialize it first: vibe db init (or auth init / storage init)"},SLUG_INVALID:{httpStatus:400,async:!1,messageTR:"Ad yaln\u0131zca k\xFC\xE7\xFCk harf, rakam ve tire i\xE7erebilir.",messageEN:"The name may contain only lowercase letters, digits and hyphens.",retryable:!1,fix:"vibe project create --name <slug: a-z0-9-, 3\u201340 chars>"},SLUG_RESERVED:{httpStatus:400,async:!1,messageTR:"Bu ad ayr\u0131lm\u0131\u015F.",messageEN:"This name is reserved.",retryable:!1,fix:"pick a slug that is not reserved: vibe project create --name <another-slug>, or rename the project to another slug"},SLUG_TAKEN:{httpStatus:409,async:!1,messageTR:"Bu ad zaten kullan\u0131l\u0131yor.",messageEN:"This name is already in use.",retryable:!1,fix:"vibe project create --name <another-slug>"},SUBSCRIPTION_CANCELLED:{httpStatus:409,async:!1,messageTR:"Bu projenin aboneli\u011Fi iptal edildi ya da sona erdi.",messageEN:"This project's subscription was cancelled or has ended.",retryable:!1,fix:"keep the current package until endsAt, or create a new project with the package you want"},SUBSCRIPTION_CARD_PER_PROJECT:{httpStatus:400,async:!1,messageTR:"Kart, her projenin aboneli\u011Finde ayr\u0131 tutulur; kart\u0131 projenin sat\u0131r\u0131ndan g\xFCncelleyin.",messageEN:"The card is held separately on each project's subscription; update it from the project's row.",retryable:!1,fix:"updateSubscriptionCard(projectId) for the project whose card should change"},SUBSCRIPTION_EXISTS:{httpStatus:409,async:!1,messageTR:"Bu projenin aboneli\u011Fi zaten var.",messageEN:"This project already has a subscription.",retryable:!1,fix:"open the project's billing row; nothing to pay"},SUBSCRIPTION_NOT_AT_PROVIDER:{httpStatus:409,async:!1,messageTR:"Bu projenin aboneli\u011Fi \xF6deme sa\u011Flay\u0131c\u0131s\u0131nda bulunamad\u0131; hi\xE7bir \u015Fey silinmedi veya iptal edilmedi.",messageEN:"This project's subscription was not found at the payment provider; nothing was deleted or cancelled.",retryable:!1,fix:"do not retry: contact support with the project id, the subscription record needs a manual check"},SUSPENDED:{httpStatus:402,async:!1,messageTR:"Hesab\u0131n\u0131z ask\u0131ya al\u0131nm\u0131\u015F.",messageEN:"Your account is suspended.",retryable:!1,fix:"open https://vibecloud.tr/contact"},TOGGLE_SUPERSEDED:{httpStatus:409,async:!1,messageTR:"Bu ayar de\u011Fi\u015Fikli\u011Finin yerine daha sonraki bir de\u011Fi\u015Fiklik uyguland\u0131.",messageEN:"A later change to this setting replaced this one.",retryable:!1,fix:"read the switch's current state; toggle again only if it is not what you want"},TOKEN_EXPIRED:{httpStatus:401,async:!1,messageTR:"Eri\u015Fim anahtar\u0131n\u0131z\u0131n s\xFCresi dolmu\u015F.",messageEN:"Your access token has expired.",retryable:!1,fix:"vibe login"},TOKEN_EXPIRY_INVALID:{httpStatus:400,async:!1,messageTR:"Eri\u015Fim anahtar\u0131 1 ile 90 g\xFCn aras\u0131nda ge\xE7erli olabilir ya da s\xFCresiz olabilir.",messageEN:"An access token is valid for 1 to 90 days, or has no expiry.",retryable:!1,fix:"vibe token create --expires-in-days 30"},TOKEN_REVOKED:{httpStatus:401,async:!1,messageTR:"Bu eri\u015Fim anahtar\u0131 iptal edilmi\u015F.",messageEN:"This access token has been revoked.",retryable:!1,fix:"vibe login"},TRIAL_ALREADY_USED:{httpStatus:403,async:!1,messageTR:"Deneme s\xFCresi bu hesap ya da vergi numaras\u0131 i\xE7in daha \xF6nce kullan\u0131ld\u0131; \xFCcretli bir paket se\xE7in.",messageEN:"The free trial has already been used for this account or tax number; choose a paid package.",retryable:!1,fix:"choose a paid package at https://vibecloud.tr/billing"},TRIAL_LIMIT:{httpStatus:403,async:!1,messageTR:"Deneme s\xFCr\xFCm\xFCnde bu i\u015Flem yap\u0131lamaz.",messageEN:"This action is not available on the trial.",retryable:!1,fix:"choose a package at https://vibecloud.tr/billing"},UNAUTHENTICATED:{httpStatus:401,async:!1,messageTR:"Oturumunuz do\u011Frulanamad\u0131.",messageEN:"Your session could not be verified.",retryable:!1,fix:"vibe login"},UNSUPPORTED_FRAMEWORK:{httpStatus:0,async:!0,messageTR:"Bu proje t\xFCr\xFC bu \xE7\u0131kt\u0131 modunda derlenemiyor.",messageEN:"This kind of project cannot be built in this output mode.",retryable:!1,fix:"a Vite SPA: vibe app config --project <slug> --output-mode static (rebuilds the current commit); an Express, Koa, hapi, NestJS, Fastify or Hono server: vibe app config --project <slug> --output-mode standalone; a Hono app: put @hono/node-server in dependencies, not devDependencies; TanStack Start: add nitro for standalone, or for static spa: { enabled: true, prerender: { outputPath: '/index.html' } }; React Router: standalone for SSR, static with ssr: false, and @react-router/serve in dependencies; SvelteKit: standalone with @sveltejs/adapter-node (Kit 2's adapter-auto also builds), static with @sveltejs/adapter-static; Astro: static with no adapter, standalone with @astrojs/node in dependencies and adapter: node({ mode: 'standalone' }); any other framework: read the build's failure message \u2014 it names what is not supported yet"},UNSUPPORTED_FRAMEWORK_VERSION:{httpStatus:0,async:!0,messageTR:"Bu framework s\xFCr\xFCm\xFC desteklenmiyor.",messageEN:"This framework version is not supported.",retryable:!1,fix:"set the framework dependency the failure message names (next, vite, express, koa, @hapi/hapi, @nestjs/core, fastify, hono, @hono/node-server, @tanstack/react-start, nitro, react-router, @react-router/dev, astro, @astrojs/node, nuxt, @sveltejs/kit or a @sveltejs/adapter-*) to a supported major in package.json and update the lockfile; a Go module: set go.mod's go line to a supported Go minor, with a patch no newer than the Go the failure message says the build uses (go mod edit -go=1.N.P); then vibe deploy start --project <slug>"},UNSUPPORTED_NATIVE_DEPENDENCY:{httpStatus:0,async:!0,messageTR:"Bu repo derleme s\u0131ras\u0131nda C++ derlemesi gerektiren bir paket bildiriyor, oysa derleme ortam\u0131 desteklemiyor.",messageEN:"This repository declares a package that needs a C++ compile during the build, which the build environment does not support.",retryable:!1,fix:"remove the dependency and use the project's PostgreSQL database instead (a database file on the container's disk is wiped on every deploy and restart anyway), commit, then vibe deploy start --project <slug>"},UNSUPPORTED_PHP:{httpStatus:0,async:!0,messageTR:"Projede PHP dosyas\u0131 var: platform PHP \xE7al\u0131\u015Ft\u0131rmaz. Derleme ad\u0131m\u0131 olmayan statik siteleri oldu\u011Fu gibi yay\u0131nlar. .php dosyalar\u0131n\u0131 kald\u0131r\u0131n ya da sitenin statik HTML \xE7\u0131kt\u0131s\u0131n\u0131 kullan\u0131n, sonra yeniden yay\u0131nlay\u0131n: klas\xF6r y\xFCklediyseniz yeniden y\xFCkleyin, Git'ten derleniyorsa de\u011Fi\u015Fikli\u011Fi g\xF6nderip yeni bir derleme ba\u015Flat\u0131n.",messageEN:"The project contains a PHP file: the platform does not run PHP. It publishes static sites with no build step as they are. Remove the .php files or use the site's static HTML output, then publish again: upload the folder again, or, if the app builds from git, commit the change and start a new deploy.",retryable:!1,fix:"remove the .php files or replace them with the site's static HTML output; an uploaded app: vibe deploy upload --dir <folder> --project <slug>; a git app: commit and push the change, or run vibe deploy start --project <slug>"},UNSUPPORTED_PROJECT_LAYOUT:{httpStatus:0,async:!0,messageTR:"Bu projenin yap\u0131s\u0131 desteklenmiyor: platform repo k\xF6k\xFCndeki tek bir HTTP sunucusu uygulamas\u0131n\u0131 derler.",messageEN:"This project's layout is not supported: the platform builds a single HTTP server app at the repository root.",retryable:!1,fix:"read the build's failure message \u2014 it names the cause: a NestJS monorepo (monorepo: true in nest-cli.json / .nest-cli.json) \u2192 move the app you deploy into its own repository with its package.json at the root; a nest-cli.json / .nest-cli.json with a projects map but no monorepo flag \u2192 the same, or remove projects; a config that is a symlink or a directory, over 1 MiB, or not valid JSON \u2192 commit it as a regular, valid JSON file under 1 MiB at the repository root (the Nest CLI reads the same file); nest build -c / --config (also glued or clustered, -capps.json, -pc x) \u2192 drop the flag and keep the configuration in nest-cli.json; no HTTP adapter \u2192 add @nestjs/platform-express or @nestjs/platform-fastify to dependencies and update the lockfile; commit, then vibe deploy start --project <slug>"},UNSUPPORTED_START_COMMAND:{httpStatus:0,async:!0,messageTR:"Uygulaman\u0131n ba\u015Flatma komutu desteklenmiyor: package.json `scripts.start` (NestJS'te `scripts.start:prod`) derlenmi\u015F bir dosyay\u0131 `node <dosya>` ile (React Router'da `react-router-serve build/server/index.js` ile) \xE7al\u0131\u015Ft\u0131rmal\u0131.",messageEN:"The app's start command is not supported: package.json `scripts.start` (`scripts.start:prod` for NestJS) must run a built file with `node <file>` (with `react-router-serve build/server/index.js` for React Router).",retryable:!1,fix:'set scripts.start to node <compiled file> (compile TypeScript in scripts.build; a NestJS app: scripts["start:prod"] = node dist/main and scripts.build = nest build; TanStack Start: node .output/server/index.mjs; React Router: react-router-serve ./build/server/index.js), commit, then vibe deploy start --project <slug>'}};function lookup(code){return Object.prototype.hasOwnProperty.call(ERRCODES,code)?ERRCODES[code]:void 0}function isRetryable(code){return lookup(code)?.retryable===!0}import{randomBytes}from"node:crypto";var current="tr";function selectLang(env){let explicit=env.VIBE_LANG;if(explicit==="en"||explicit==="tr")return current=explicit,current;let locale2=[env.LC_ALL,env.LC_MESSAGES,env.LANG].find(v=>v!==void 0&&v!=="");return current=locale2!==void 0&&/^en([_.-]|$)/i.test(locale2)?"en":"tr",current}function lang(){return current}var machine=!1;function setMachineOutput(on){machine=on}function machineOutput(){return machine}var M={"help.usage":{tr:"KULLANIM",en:"USAGE"},"help.flags":{tr:"BAYRAKLAR",en:"FLAGS"},"help.globalFlags":{tr:"GENEL BAYRAKLAR",en:"GLOBAL FLAGS"},"help.examples":{tr:"\xD6RNEKLER",en:"EXAMPLES"},"help.commands":{tr:"KOMUTLAR",en:"COMMANDS"},"help.learnMore":{tr:"DAHA FAZLA",en:"LEARN MORE"},"help.default":{tr:"varsay\u0131lan",en:"default"},"help.moreHelp":{tr:"Bir komutun ayr\u0131nt\u0131lar\u0131 i\xE7in: vibe <komut> --help",en:"For details on a command: vibe <command> --help"},"help.tagline":{tr:"T\xFCrkiye\u2019de bar\u0131nd\u0131r\u0131lan veritaban\u0131 ve uygulama platformu",en:"Database and app platform hosted in T\xFCrkiye"},"help.refusals":{tr:"KONSOLDAN YAPILIR (komut nedenini yazar)",en:"DONE IN THE CONSOLE (the command says why)"},"help.flag.help":{tr:"Bu yard\u0131m\u0131 g\xF6sterir",en:"Show this help"},"help.flag.json":{tr:"\xC7\u0131kt\u0131y\u0131 JSON olarak yazar",en:"Write the output as JSON"},"help.flag.noInput":{tr:"Hi\xE7bir soru sormaz",en:"Never prompt"},"help.flag.noColor":{tr:"Renkleri kapat\u0131r",en:"Turn colors off"},"help.flag.quiet":{tr:"Yaln\u0131zca sonucu yazar",en:"Print only the result"},"help.flag.verbose":{tr:"Ayr\u0131nt\u0131l\u0131 tan\u0131lama \xE7\u0131kt\u0131s\u0131",en:"Detailed diagnostic output"},"err.unknownCommand":{tr:'"{name}" bir vibe komutu de\u011Fil.',en:'"{name}" is not a vibe command.'},"err.unknownSubcommand":{tr:'"{name}", "vibe {topic}" alt\u0131nda bir komut de\u011Fil.',en:'"{name}" is not a "vibe {topic}" command.'},"err.didYouMean":{tr:"Bunu mu demek istediniz?",en:"Did you mean?"},"err.seeHelp":{tr:"Komutlar\u0131n listesi i\xE7in: vibe --help",en:"For the list of commands: vibe --help"},"err.seeCommandHelp":{tr:"Kullan\u0131m\u0131 i\xE7in: vibe {name} --help",en:"For its usage: vibe {name} --help"},"err.unknownFlag":{tr:'{flag} bayra\u011F\u0131 "vibe {name}" i\xE7in tan\u0131ml\u0131 de\u011Fil.',en:'{flag} is not a flag of "vibe {name}".'},"err.missingValue":{tr:"{flag} bir de\u011Fer ister.",en:"{flag} needs a value."},"err.noValue":{tr:"{flag} de\u011Fer almaz.",en:"{flag} takes no value."},"err.singleDash":{tr:"{arg} tan\u0131nmad\u0131: uzun bayraklar iki tire ile yaz\u0131l\u0131r, {fixed} gibi.",en:"{arg} was not recognized: long flags take two dashes, as in {fixed}."},"err.badFlags":{tr:"Bayraklar okunamad\u0131: {detail}",en:"Could not read the flags: {detail}"},"err.helpExtra":{tr:'"vibe help {name}" fazladan kelime ald\u0131: {extra}',en:'"vibe help {name}" got extra words: {extra}'},"err.needsSubcommand":{tr:'"vibe {topic}" bir alt komut ister.',en:'"vibe {topic}" needs a subcommand.'},"help.exitCodes":{tr:"\xC7IKI\u015E KODLARI",en:"EXIT CODES"},"help.exit.ok":{tr:"Ba\u015Far\u0131l\u0131",en:"Success"},"help.exit.failure":{tr:"\u0130\u015Flem ba\u015Far\u0131s\u0131z oldu",en:"The operation failed"},"help.exit.usage":{tr:"Komut veya bayrak yanl\u0131\u015F yaz\u0131ld\u0131",en:"The command or a flag was mistyped"},"help.exit.auth":{tr:"Giri\u015F gerekiyor: vibe login",en:"Login required: vibe login"},"help.exit.cancelled":{tr:"Kullan\u0131c\u0131 iptal etti (Ctrl-C)",en:"Cancelled by the user (Ctrl-C)"},"err.code":{tr:"Kod",en:"Code"},"err.cancelled":{tr:"\u0130ptal edildi.",en:"Cancelled."},"table.empty":{tr:"G\xF6sterilecek kay\u0131t yok.",en:"Nothing to show."}};function fill(owner,key,entry,vars){return entry[current].replace(/\{([a-zA-Z]+)\}/g,(_whole,name)=>{let v=vars[name];if(v===void 0)throw new Error(`i18n: ${owner}.${key} needs {${name}}`);return typeof v=="number"?String(v):v})}function t(key,vars={}){return fill("kernel",key,M[key],vars)}var CATALOGUES=[{owner:"kernel",entries:M}];function catalogue(owner,entries3){return CATALOGUES.push({owner,entries:entries3}),(key,vars={})=>fill(owner,key,entries3[key],vars)}function upper(s){return s.toLocaleUpperCase(current==="tr"?"tr-TR":"en-US")}var m=catalogue("http",{tooLarge:{tr:"{what} \xE7ok b\xFCy\xFCk ({limit} bayt s\u0131n\u0131r\u0131n\u0131 a\u015Ft\u0131); okuma durduruldu.",en:"The {what} is too large (over {limit} bytes); reading stopped."},unreadable:{tr:"{what} okunamad\u0131: {detail}",en:"Could not read the {what}: {detail}"},notJson:{tr:"ge\xE7erli JSON de\u011Fil ({bytes} bayt)",en:"not valid JSON ({bytes} bytes)"}}),BodyTooLargeError=class extends Error{limitBytes;constructor(what,limitBytes){super(m("tooLarge",{what,limit:limitBytes})),this.name="BodyTooLargeError",this.limitBytes=limitBytes}};async function readCappedBody(res,limitBytes,what){if(res.body===null)return"";let reader=res.body.getReader(),chunks=[],total=0;for(;;){let chunk=await readChunk(reader,what);if(chunk===void 0)break;if(total+=chunk.byteLength,total>limitBytes)throw await reader.cancel(),new BodyTooLargeError(what,limitBytes);chunks.push(chunk)}let joined=new Uint8Array(total),at=0;for(let chunk of chunks)joined.set(chunk,at),at+=chunk.byteLength;return new TextDecoder("utf-8").decode(joined)}async function readChunk(reader,what){try{let{done,value}=await reader.read();return done?void 0:value}catch(cause){throw new Error(m("unreadable",{what,detail:describeCause(cause)}),{cause})}}function withTimeout(signal,ms2){return AbortSignal.any([signal,AbortSignal.timeout(ms2)])}function isAbortError(err){return err instanceof Error&&err.name==="AbortError"}function describeJSONFailure(body){return m("notJson",{bytes:Buffer.byteLength(body,"utf8")})}function describeCause(err){if(err instanceof Error){let{cause}=err;return cause instanceof Error&&err.message==="fetch failed"?cause.message:err.message}return String(err)}function userAgent(env){let agent=detectEditor(env);return`vibecloud-cli/0.6.1 (${agent===""?"none":agent})`}var processUserAgent;function processAgent(){return processUserAgent===void 0&&(processUserAgent=userAgent(process.env)),processUserAgent}function detectEditor(env){if(env.CLAUDECODE!==void 0&&env.CLAUDECODE!=="")return"claude-code";if(env.CURSOR_TRACE_ID!==void 0&&env.CURSOR_TRACE_ID!=="")return"cursor";if(env.TERM_PROGRAM==="vscode"){let askpass=env.VSCODE_GIT_ASKPASS_MAIN===void 0?"":env.VSCODE_GIT_ASKPASS_MAIN;return/cursor/i.test(askpass)?"cursor":/windsurf/i.test(askpass)?"windsurf":"vscode"}return""}var m2=catalogue("client.transport",{noApi:{tr:"API adresi ayarlanmam\u0131\u015F. VIBECLOUD_API de\u011Fi\u015Fkenini ya da ayar dosyas\u0131n\u0131 kontrol edin.",en:"The API address is not set. Check VIBECLOUD_API or the settings file."},unreachable:{tr:"Sunucuya ula\u015F\u0131lamad\u0131; ba\u011Flant\u0131n\u0131z\u0131 kontrol edin.",en:"Could not reach the server; check your connection."},unreadable:{tr:"Yan\u0131t okunamad\u0131: {detail}",en:"Could not read the response: {detail}"},unparsable:{tr:"Yan\u0131t \xE7\xF6z\xFCmlenemedi: {detail}",en:"Could not parse the response: {detail}"},bodyWhat:{tr:"API yan\u0131t\u0131",en:"API response"},serverError:{tr:"Sunucu hatas\u0131 (HTTP {status}).",en:"Server error (HTTP {status})."},cancelled:{tr:"\u0130stek iptal edildi.",en:"The request was cancelled."},cancelledDetail:{tr:"\u0130stek iptal edildi: {detail}",en:"The request was cancelled: {detail}"}}),DEFAULT_TIMEOUT_MS=3e4,MAX_RESPONSE_BYTES=8<<20;function isRetryable2(resp){return resp.retryable}async function request(signal,target,method,path,body,extra){if(target.endpoint==="")return{response:void 0,error:new Error(`INTERNAL: ${m2("noApi")}`)};let headers2=new Headers;if(headers2.set("Accept","application/json"),body!==void 0&&headers2.set("Content-Type","application/json"),extra!==void 0)for(let[name,value]of extra)headers2.set(name,value);target.token!==""&&headers2.set("Authorization",`Bearer ${target.token}`),headers2.set("User-Agent",processAgent());let url=joinURL(target.endpoint,path),init={method,headers:headers2,signal:withTimeout(signal,DEFAULT_TIMEOUT_MS),redirect:headers2.has("Vibecloud-Otp")?"error":"follow"};body!==void 0&&(init.body=body);let res;try{res=await fetch(url,init)}catch(cause){return signal.aborted?{response:void 0,error:abortError(cause)}:{response:{data:void 0,errorCode:"CELL_UNREACHABLE",messageTR:m2("unreachable"),fix:"",details:{},retryable:!0,statusCode:0,raw:""},error:new Error(`CELL_UNREACHABLE: ${describeCause(cause)}`,{cause})}}let raw;try{raw=await readCappedBody(res,MAX_RESPONSE_BYTES,m2("bodyWhat"))}catch(cause){return signal.aborted?{response:void 0,error:abortError(cause)}:{response:void 0,error:new Error(`INTERNAL: ${m2("unreadable",{detail:describeCause(cause)})}`,{cause})}}if(res.status>=400){let response=decodeError(raw,res.status);return{response,error:new Error(`${response.errorCode}: ${response.messageTR}`)}}let data;if(raw.length>0)try{data=JSON.parse(raw)}catch(cause){return{response:void 0,error:new Error(`INTERNAL: ${m2("unparsable",{detail:describeJSONFailure(raw)})}`,{cause})}}return{response:{data,errorCode:"",messageTR:"",retryable:!1,fix:"",details:{},statusCode:res.status,raw},error:void 0}}function abortError(cause){return isAbortError(cause)?new Error(m2("cancelled"),{cause}):new Error(m2("cancelledDetail",{detail:describeCause(cause)}),{cause})}function decodeError(raw,statusCode){let wire=parseErrorBody(raw);if(wire!==void 0){let errorCode2=wire.code,messageTR=wire.message;messageTR===""&&(messageTR=wire.outerMessage);let record3=lookup(errorCode2),retryable=record3===void 0?wire.retryable:record3.retryable,fix=wire.fix;return fix===void 0&&(fix=record3===void 0?"":record3.fix),{data:void 0,errorCode:errorCode2,messageTR,retryable,fix,details:wire.details,statusCode,raw}}let errorCode=codeForStatus(statusCode),record2=lookup(errorCode);return{data:void 0,errorCode,messageTR:m2("serverError",{status:statusCode}),retryable:record2!==void 0&&record2.retryable,fix:record2===void 0?"":record2.fix,details:{},statusCode,raw}}function parseErrorBody(raw){let parsed;try{parsed=JSON.parse(raw)}catch{return}if(!isRecord(parsed))return;let errors=parsed.errors;if(!Array.isArray(errors)||errors.length===0)return;let first=errors[0];if(!isRecord(first))return;let extensions=isRecord(first.extensions)?first.extensions:{};return{code:readString(extensions.code),message:readString(extensions.message),fix:readOptionalString(extensions.fix),details:readDetails(extensions.details),retryable:extensions.retryable===!0,outerMessage:readString(first.message)}}function isRecord(value){return typeof value=="object"&&value!==null&&!Array.isArray(value)}function readDetails(value){return isRecord(value)?value:{}}function readString(value){return typeof value=="string"?value:""}function readOptionalString(value){return typeof value=="string"?value:void 0}function joinURL(endpoint,path){let base=endpoint.endsWith("/")?endpoint.slice(0,-1):endpoint,trimmed=path.startsWith("/")?path.slice(1):path;return trimmed===""?base:`${base}/${trimmed}`}function codeForStatus(status2){return status2===401?"UNAUTHENTICATED":status2===403?"FORBIDDEN_ROLE":status2===404?"NOT_FOUND":status2===429?"RATE_LIMITED":(status2>=500,"INTERNAL")}var m3=catalogue("client.retry",{waitCancelled:{tr:"Bekleme iptal edildi.",en:"The wait was cancelled."},cancelled:{tr:"\u0130stek iptal edildi.",en:"The request was cancelled."},unclassified:{tr:"s\u0131n\u0131fland\u0131r\u0131lamayan bir hata",en:"an unclassified error"},gaveUp:{tr:"{attempts} denemeden sonra vazge\xE7ildi: {detail}",en:"Gave up after {attempts} attempts: {detail}"}});function defaultRetryPolicy(){return{maxRetries:3,baseBackoffMs:1e3,maxBackoffMs:3e4}}function backoffMs(policy,attempt){let grown=policy.baseBackoffMs*2**attempt;return Math.min(grown,policy.maxBackoffMs)}async function delay(signal,ms2){return signal.aborted?new Error(m3("waitCancelled")):new Promise(resolve5=>{let timer=setTimeout(()=>{signal.removeEventListener("abort",onAbort),resolve5(void 0)},ms2);function onAbort(){clearTimeout(timer),resolve5(new Error(m3("waitCancelled")))}signal.addEventListener("abort",onAbort,{once:!0})})}async function retry(signal,policy,fn){let lastError,lastCoded;for(let i2=0;i2<=policy.maxRetries;i2++){if(i2>0){let aborted=await delay(signal,backoffMs(policy,i2-1));if(aborted!==void 0)return{response:void 0,error:aborted}}else if(signal.aborted)return{response:void 0,error:new Error(m3("cancelled"))};let{response,error}=await fn();if(response===void 0){lastError=error,lastCoded=void 0;continue}if(response.errorCode!==""){let failure=failureOf(response);if(!isRetryable2(response))return{response,error:failure};lastError=failure,lastCoded=response;continue}if(error!==void 0){lastError=error,lastCoded=void 0;continue}return{response,error:void 0}}let attempts=policy.maxRetries+1,detail2=lastError===void 0?m3("unclassified"):lastError.message;return{response:lastCoded,error:new Error(m3("gaveUp",{attempts,detail:detail2}),{cause:lastError})}}function failureOf(response){return new Error(`${response.errorCode}: ${response.messageTR}`)}function apiMessage(code,wire){let record2=code===""?void 0:lookup(code);return machineOutput()||lang()==="en"?wire!==""||record2===void 0?wire:record2.messageEN:record2!==void 0&&record2.messageTR!==""?record2.messageTR:wire}var m4=catalogue("client.graphql",{noKind:{tr:"clientMutationId: i\u015Flem ad\u0131 gerekli",en:"clientMutationId: the action name is required"},noMutationId:{tr:"mutation: clientMutationId gerekli",en:"mutation: clientMutationId is required"},noQuery:{tr:"sorgu gerekli",en:"the query is required"},noPolicy:{tr:"yeniden deneme politikas\u0131 ayarlanmam\u0131\u015F",en:"no retry policy is set"},encode:{tr:"Sorgu haz\u0131rlanamad\u0131: {detail}",en:"Could not prepare the query: {detail}"},nothing:{tr:"Yeniden deneme d\xF6ng\xFCs\xFC ne yan\u0131t ne hata d\xF6nd\xFCrd\xFC.",en:"The retry loop returned neither a response nor an error."},empty:{tr:"API bo\u015F bir yan\u0131t d\xF6nd\xFCrd\xFC.",en:"The API returned an empty response."},noTransport:{tr:"Ta\u015F\u0131ma katman\u0131 ne yan\u0131t ne hata d\xF6nd\xFCrd\xFC.",en:"The transport returned neither a response nor an error."},unparsable:{tr:"Yan\u0131t \xE7\xF6z\xFCmlenemedi: {detail}",en:"Could not parse the response: {detail}"}}),CSRF_HEADER="X-Client-Mutation-Id",OTP_HEADER="Vibecloud-Otp",APIError=class extends Error{code;messageTR;retryable;fix;details;constructor(code,messageTR,retryable,fix,details2){super(messageTR===""?code:`${code}: ${messageTR}`),this.name="APIError",this.code=code,this.messageTR=messageTR,this.retryable=retryable,this.fix=fix,this.details=details2}};function codeOf(err){let at=err;for(let depth=0;depth<8&&at instanceof Error;depth++){if(at instanceof APIError)return at.code;at=at.cause}return""}function fixOf(err){let at=err;for(let depth=0;depth<8&&at instanceof Error;depth++){if(at instanceof APIError)return at.fix;at=at.cause}return""}function detailsOf(err){let at=err;for(let depth=0;depth<8&&at instanceof Error;depth++){if(at instanceof APIError)return at.details;at=at.cause}return{}}function newMutationID(kind){if(kind==="")throw new Error(m4("noKind"));return`${kind}-${randomBytes(12).toString("hex")}`}async function query(signal,executor,document,vars){return execute(signal,executor,newMutationID("query"),document,vars)}async function mutate(signal,executor,mutationID,document,vars){if(mutationID==="")throw new Error(m4("noMutationId"));return execute(signal,executor,mutationID,document,vars)}async function mutateDangerous(signal,executor,mutationID,document,vars,otp){if(mutationID==="")throw new Error(m4("noMutationId"));return execute(signal,{endpoint:executor.endpoint,token:executor.token,retry:{maxRetries:0,baseBackoffMs:1,maxBackoffMs:1}},mutationID,document,vars,otp===""?new Map:new Map([[OTP_HEADER,otp]]))}async function execute(signal,executor,mutationID,document,vars,extra=new Map){if(document==="")throw new Error(m4("noQuery"));let policy=executor.retry;if(policy===void 0)throw new Error(m4("noPolicy"));let body;try{body=JSON.stringify(vars===void 0?{query:document}:{query:document,variables:vars})}catch(cause){throw new Error(`INTERNAL: ${m4("encode",{detail:cause instanceof Error?cause.message:String(cause)})}`,{cause})}let headers2=new Map([[CSRF_HEADER,mutationID],...extra]),{response,error}=await retry(signal,policy,()=>postGraphQL(signal,executor,body,headers2));if(error!==void 0)throw response!==void 0&&response.errorCode!==""?new APIError(response.errorCode,response.messageTR,response.retryable,response.fix,response.details):error;if(response===void 0)throw new Error(`INTERNAL: ${m4("nothing")}`);let payload=response.data;if(payload==null)throw new Error(`INTERNAL: ${m4("empty")}`);return payload}async function postGraphQL(signal,target,body,headers2){let attempt=await request(signal,target,"POST","",body,headers2);if(attempt.error!==void 0)return attempt;let response=attempt.response;if(response===void 0)return{response:void 0,error:new Error(`INTERNAL: ${m4("noTransport")}`)};let decoded;try{decoded=JSON.parse(response.raw)}catch(cause){return{response:{data:void 0,errorCode:"INTERNAL",messageTR:`API yaniti cozumlenemedi (HTTP ${response.statusCode})`,retryable:isRetryable("INTERNAL"),fix:"",details:{},statusCode:response.statusCode,raw:""},error:new Error(`INTERNAL: ${m4("unparsable",{detail:describeJSONFailure(response.raw)})}`,{cause})}}let errors=readErrors(decoded);if(errors.length>0){let first=errors[0];if(first!==void 0){let classified=applyGraphQLError(first,response.statusCode,response.raw);return{response:classified,error:new Error(`${classified.errorCode}: ${classified.messageTR}`)}}}return{response:{...response,data:readData(decoded)},error:void 0}}function applyGraphQLError(err,statusCode,raw){let errorCode=err.code,wire=err.extensionMessage;wire===""&&(wire=err.message),errorCode===""&&(errorCode="INTERNAL");let record2=lookup(errorCode),messageTR=apiMessage(errorCode,wire);if(record2!==void 0){let fix=err.fix===void 0?record2.fix:err.fix;return{data:void 0,errorCode,messageTR,retryable:record2.retryable,fix,details:err.details,statusCode,raw}}return messageTR===""&&(messageTR=`API hatasi (${errorCode})`),{data:void 0,errorCode,messageTR,retryable:err.retryable,fix:err.fix===void 0?"":err.fix,details:err.details,statusCode,raw}}function readErrors(decoded){if(!isRecord2(decoded))return[];let errors=decoded.errors;if(!Array.isArray(errors))return[];let out=[];for(let entry of errors){if(!isRecord2(entry)){out.push({message:"",code:"",extensionMessage:"",retryable:!1,fix:void 0,details:{}});continue}let extensions=isRecord2(entry.extensions)?entry.extensions:{};out.push({message:readString2(entry.message),code:readString2(extensions.code),extensionMessage:readString2(extensions.message),retryable:extensions.retryable===!0,fix:readOptionalString(extensions.fix),details:readDetails(extensions.details)})}return out}function readData(decoded){if(isRecord2(decoded))return decoded.data}function isRecord2(value){return typeof value=="object"&&value!==null&&!Array.isArray(value)}function readString2(value){return typeof value=="string"?value:""}import{parseArgs}from"node:util";import{mkdirSync,readFileSync,writeFileSync}from"node:fs";import{dirname,join}from"node:path";var LocalError=class extends Error{fix;constructor(message2,fix,options){super(message2,options),this.name="LocalError",this.fix=fix}};function localFixOf(err){let at=err;for(let depth=0;depth<8&&at instanceof Error;depth++){if(at instanceof LocalError)return at.fix;at=at.cause}return""}var m5=catalogue("linked",{unreadable:{tr:"{file} okunamad\u0131: {detail}",en:"Could not read {file}: {detail}"},malformed:{tr:'{file} ge\xE7erli bir ba\u011Flant\u0131 dosyas\u0131 de\u011Fil: "org" ve "project" alanlar\u0131 dolu olmal\u0131.',en:'{file} is not a valid link file: "org" and "project" must both be set.'},noProject:{tr:"Hangi proje oldu\u011Fu belirtilmedi: --project <ad> verin ya da bu dizini vibe init ile bir projeye ba\u011Flay\u0131n.",en:"No project given: pass --project <name>, or link this directory to a project with vibe init."},droppedByEnv:{tr:"Bu dizin {file} ile {org}/{project} projesine ba\u011Fl\u0131, ama VIBECLOUD_ORG ba\u015Fka bir organizasyonu ({env}) g\xF6steriyor; bu y\xFCzden ba\u011Flant\u0131 kullan\u0131lmad\u0131.",en:"This directory is linked to {org}/{project} ({file}), but VIBECLOUD_ORG names another organization ({env}), so the link was not used."},droppedByEnvFix:{tr:"--org {org} --project {project} verin ya da VIBECLOUD_ORG\u2019u kald\u0131r\u0131n",en:"pass --org {org} --project {project}, or unset VIBECLOUD_ORG"},droppedByFlag:{tr:"Bu dizin {org}/{project} projesine ba\u011Fl\u0131; --org {typed} verildi\u011Fi i\xE7in ba\u011Flant\u0131 kullan\u0131lmad\u0131.",en:"This directory is linked to {org}/{project}; the link was not used because --org {typed} was given."},droppedByFlagFix:{tr:"--org {typed} ile birlikte --project <ad> verin",en:"pass --project <name> together with --org {typed}"},noProjectFix:{tr:"--project <ad> verin ya da vibe init \xE7al\u0131\u015Ft\u0131r\u0131n",en:"pass --project <name>, or run vibe init"}}),LINK_DIR=".vibe",LINK_FILE="project.json";function findLinked(cwd){let dir=cwd;for(;;){let file=join(dir,LINK_DIR,LINK_FILE),text2;try{text2=readFileSync(file,"utf8")}catch(cause){if(!isMissing(cause))throw new Error(`INTERNAL: ${m5("unreadable",{file,detail:describe(cause)})}`,{cause})}if(text2!==void 0)return parseLinked(file,text2);let parent=dirname(dir);if(parent===dir)return;dir=parent}}function parseLinked(file,text2){let doc;try{doc=JSON.parse(text2)}catch(cause){throw new Error(`INTERNAL: ${m5("unreadable",{file,detail:describe(cause)})}`,{cause})}if(typeof doc!="object"||doc===null)throw new Error(`INTERNAL: ${m5("malformed",{file})}`);let{org,project:project2}=doc;if(typeof org!="string"||org===""||typeof project2!="string"||project2==="")throw new Error(`INTERNAL: ${m5("malformed",{file})}`);return{org,project:project2,file}}function writeLinked(dir,org,project2){let file=join(dir,LINK_DIR,LINK_FILE);return mkdirSync(join(dir,LINK_DIR),{recursive:!0}),writeFileSync(file,`${JSON.stringify({org,project:project2},null,2)}
|
|
1
|
+
var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __commonJS=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports};var __copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod));var require_src=__commonJS({"node_modules/sisteransi/src/index.js"(exports,module){"use strict";var ESC2="\x1B",CSI2=`${ESC2}[`,beep="\x07",cursor3={to(x,y2){return y2?`${CSI2}${y2+1};${x+1}H`:`${CSI2}${x+1}G`},move(x,y2){let ret="";return x<0?ret+=`${CSI2}${-x}D`:x>0&&(ret+=`${CSI2}${x}C`),y2<0?ret+=`${CSI2}${-y2}A`:y2>0&&(ret+=`${CSI2}${y2}B`),ret},up:(count2=1)=>`${CSI2}${count2}A`,down:(count2=1)=>`${CSI2}${count2}B`,forward:(count2=1)=>`${CSI2}${count2}C`,backward:(count2=1)=>`${CSI2}${count2}D`,nextLine:(count2=1)=>`${CSI2}E`.repeat(count2),prevLine:(count2=1)=>`${CSI2}F`.repeat(count2),left:`${CSI2}G`,hide:`${CSI2}?25l`,show:`${CSI2}?25h`,save:`${ESC2}7`,restore:`${ESC2}8`},scroll={up:(count2=1)=>`${CSI2}S`.repeat(count2),down:(count2=1)=>`${CSI2}T`.repeat(count2)},erase3={screen:`${CSI2}2J`,up:(count2=1)=>`${CSI2}1J`.repeat(count2),down:(count2=1)=>`${CSI2}J`.repeat(count2),line:`${CSI2}2K`,lineEnd:`${CSI2}K`,lineStart:`${CSI2}1K`,lines(count2){let clear="";for(let i2=0;i2<count2;i2++)clear+=this.line+(i2<count2-1?cursor3.up():"");return count2&&(clear+=cursor3.left),clear}};module.exports={cursor:cursor3,scroll,erase:erase3,beep}}});var ERRCODES={ADMISSION_REJECTED:{httpStatus:400,async:!1,messageTR:"\u0130stek ge\xE7ersiz veya eksik bilgi i\xE7eriyor.",messageEN:"The request is invalid or missing information.",retryable:!1,fix:"fix the field the message names and retry"},APP_SOURCE_MISMATCH:{httpStatus:409,async:!1,messageTR:"Bu uygulama bu yolla yay\u0131nlanamaz: y\xFCklemeyle olu\u015Fturulan bir uygulamaya git referans\u0131, git'ten olu\u015Fturulan bir uygulamaya ar\u015Fiv yay\u0131nlanamaz.",messageEN:"This app cannot be deployed this way: an app created from an upload cannot take a git ref, and an app created from git cannot take an archive.",retryable:!1,fix:"for an upload app vibe deploy upload --project <slug> (MCP: deploy.upload_begin then deploy.upload_finish); for a git app vibe deploy start --project <slug>"},AUTH_UNAVAILABLE:{httpStatus:503,async:!1,messageTR:"Giri\u015F ve parola i\u015Flemleri \u015Fu anda yap\u0131lam\u0131yor; biraz sonra tekrar deneyin.",messageEN:"Sign-in and password operations are unavailable right now; try again shortly.",retryable:!0,fix:"retry in 30 s"},BACKUP_NOT_YET_TAKEN:{httpStatus:409,async:!1,messageTR:"Hen\xFCz bir yedek al\u0131nmam\u0131\u015F.",messageEN:"No backup has been taken yet.",retryable:!1,fix:"retry after the first backup"},BADGE_DOMAIN_PROXIED:{httpStatus:403,async:!1,messageTR:"Kendi proxy\u2019nizin arkas\u0131ndaki bir alan ad\u0131 i\xE7in bar\u0131nd\u0131rma rozeti a\xE7\u0131lamaz.",messageEN:"The hosting badge cannot be enabled for a domain behind your own proxy.",retryable:!1,fix:"turn the proxy off for the domain (setDomainProxy to NONE), then retry"},BADGE_DOMAIN_UNVERIFIED:{httpStatus:403,async:!1,messageTR:"Bu alan ad\u0131 do\u011Frulanmadan bar\u0131nd\u0131rma rozeti a\xE7\u0131lamaz.",messageEN:"The hosting badge cannot be enabled before this domain is verified.",retryable:!1,fix:"vibe domain verify <hostname> then retry"},BOT_CHECK_FAILED:{httpStatus:400,async:!1,messageTR:"Robot do\u011Frulamas\u0131 ge\xE7ilemedi; do\u011Frulama kutusunu yeniden i\u015Faretleyip tekrar g\xF6nderin.",messageEN:"The bot check did not pass; tick the verification box again and resubmit.",retryable:!1,fix:"tick the bot-check box on the console page again and resubmit \u2014 these endpoints take a token only that frame can produce"},BOT_CHECK_UNAVAILABLE:{httpStatus:503,async:!1,messageTR:"Robot do\u011Frulamas\u0131 \u015Fu anda yap\u0131lam\u0131yor; biraz sonra tekrar deneyin.",messageEN:"The bot check cannot be performed right now; try again shortly.",retryable:!0,fix:"retry in 30 s"},BRANCH_NAME_INVALID:{httpStatus:400,async:!1,messageTR:"Branch ad\u0131 yaln\u0131zca k\xFC\xE7\xFCk harf, rakam ve tire i\xE7erebilir (en fazla 24 karakter, `--` olmadan).",messageEN:"A branch name may contain only lowercase letters, digits and hyphens (at most 24 characters, no `--`).",retryable:!1,fix:"vibe branch create <another-name>"},BRANCH_TTL_INVALID:{httpStatus:400,async:!1,messageTR:"Branch s\xFCresi en fazla 5 g\xFCn olabilir.",messageEN:"A branch can live at most 5 days.",retryable:!1,fix:"vibe branch create --ttl 72h (default) or vibe branch extend --ttl <\u2264 5 days from creation>"},BUILD_CONFIG_CONFLICT:{httpStatus:400,async:!1,messageTR:"`next.config` i\xE7inde platformun \xE7al\u0131\u015Ft\u0131ramad\u0131\u011F\u0131 bir `output` de\u011Feri var.",messageEN:"`next.config` sets an `output` value the platform cannot run.",retryable:!1,fix:"remove the output line from next.config (or set the project outputMode to static), then vibe deploy start --project <slug>"},BUILD_CONFIG_INVALID:{httpStatus:0,async:!0,messageTR:"Derleme yap\u0131land\u0131rmas\u0131 ge\xE7ersiz: bir ortam de\u011Fi\u015Fkeni derlemeye aktar\u0131lam\u0131yor.",messageEN:"The build configuration is invalid: an environment variable cannot be passed to the build.",retryable:!1,fix:"fix the variable the failure message names: vibe config unset --project <slug> --name <NAME>, then vibe config set --project <slug> --name <VALID_NAME> --value <value> (or the console's environment page), then vibe deploy start --project <slug>"},BUILD_CONTENT_REJECTED:{httpStatus:0,async:!0,messageTR:"Derleme i\xE7erik taramas\u0131ndan ge\xE7emedi: yan\u0131lt\u0131c\u0131 veya zararl\u0131 i\xE7erik tespit edildi.",messageEN:"The build did not pass the content scan: misleading or harmful content was detected.",retryable:!1,fix:"read https://vibecloud.tr/acceptable-use; appeal via https://vibecloud.tr/contact"},BUILD_FAILED:{httpStatus:0,async:!0,messageTR:"Derleme ba\u015Far\u0131s\u0131z oldu.",messageEN:"The build failed.",retryable:!1,fix:"fix the build error in your code, then vibe deploy start --project <slug>"},BUILD_IN_PROGRESS:{httpStatus:409,async:!1,messageTR:"Bu uygulaman\u0131n bir derlemesi zaten s\u0131rada ya da s\xFCr\xFCyor; bitmesini bekleyin.",messageEN:"A build of this app is already queued or running; wait for it to finish.",retryable:!0,fix:"wait for the current build to finish, then deploy again"},BUILD_LOG_UNAVAILABLE:{httpStatus:409,async:!1,messageTR:"Bu derlemenin kayd\u0131 saklanmad\u0131; yeni bir derleme ba\u015Flatabilirsiniz.",messageEN:"This build's log was not kept; you can start a new build.",retryable:!1,fix:"vibe deploy start --project <slug> \u2014 the next build keeps its log"},BUILD_OUTPUT_UNSCANNABLE:{httpStatus:0,async:!0,messageTR:"Derleme \xE7\u0131kt\u0131s\u0131 taranam\u0131yor: boyut veya dosya say\u0131s\u0131 s\u0131n\u0131r\u0131n\u0131 a\u015F\u0131yor ya da sunulan bir klas\xF6rde sembolik ba\u011Flant\u0131 var.",messageEN:"The build output cannot be scanned: it exceeds the size or file-count limit, or a served folder contains a symbolic link.",retryable:!1,fix:"shrink the output or replace the link with the file, then vibe deploy start --project <slug>"},BUILD_PLATFORM_VALUE_UNAVAILABLE:{httpStatus:0,async:!0,messageTR:"Derleme i\xE7in gereken bir platform de\u011Feri (proje API adresi ya da anon anahtar\u0131) haz\u0131r olmad\u0131\u011F\u0131ndan derleme ba\u015Flat\u0131lamad\u0131; kaynak kodunuzla ilgili de\u011Fil.",messageEN:"The build could not start because a platform value it needs (the project API address or the anon key) was not ready; this is not about your source code.",retryable:!0,fix:"vibe deploy start --project <slug> \u2014 after vibe project status --project <slug> shows the project Ready"},BUILD_QUEUE_TIMEOUT:{httpStatus:0,async:!0,messageTR:"Derleme s\u0131rada \xE7ok uzun bekledi.",messageEN:"The build waited in the queue too long.",retryable:!0,fix:"vibe deploy start --project <slug>"},BUILD_REGISTRY_UNAVAILABLE:{httpStatus:0,async:!0,messageTR:"Derleme, platform taraf\u0131ndaki bir sorun nedeniyle yap\u0131lamad\u0131; kodunuzla ilgili bir sorun yok. Yeniden deneyin; sorun s\xFCrerse destekle ileti\u015Fime ge\xE7in.",messageEN:"The build could not run because of a problem on the platform's side; nothing is wrong with your code. Retry, and contact support if it persists.",retryable:!0,fix:"vibe deploy start --project <slug>"},BUILD_SCAN_REJECTED:{httpStatus:0,async:!0,messageTR:"Derleme g\xFCvenlik taramas\u0131ndan ge\xE7emedi.",messageEN:"The build did not pass the security scan.",retryable:!1,fix:"upgrade the package the message names to its fix version, then vibe deploy start --project <slug>"},BUILD_SCAN_TIMEOUT:{httpStatus:0,async:!0,messageTR:"Derleme \xE7\u0131kt\u0131s\u0131n\u0131n taramas\u0131 s\xFCresi i\xE7inde tamamlanamad\u0131.",messageEN:"The scan of the build output did not finish in time.",retryable:!0,fix:"vibe deploy start --project <slug>"},BUILD_SECRET_REJECTED:{httpStatus:0,async:!0,messageTR:"Kaynak kodda ya da derleme \xE7\u0131kt\u0131s\u0131nda gizli bir Supabase anahtar\u0131 (service_role / sb_secret_) bulundu; derleme durduruldu. \u0130stemci taraf\u0131nda anon anahtar\u0131n\u0131 kullan\u0131n.",messageEN:"A secret Supabase key (service_role / sb_secret_) was found in the source or build output; the build was stopped. Use the anon key on the client side.",retryable:!1,fix:"remove the service_role key from the source, use the anon key client-side, then vibe deploy start --project <slug>"},BUILD_SOURCE_REJECTED:{httpStatus:0,async:!0,messageTR:"Derleme kayna\u011F\u0131 reddedildi: repo adresi k\xFCme i\xE7i bir adrese \xE7\xF6z\xFCmleniyor.",messageEN:"The build source was rejected: the repository address resolves to an in-cluster address.",retryable:!1,fix:"use a public https git source and redeploy"},BUILD_SOURCE_UNAUTHORIZED:{httpStatus:0,async:!0,messageTR:"Derleme kayna\u011F\u0131 okunamad\u0131: repo \xF6zel ve platformun GitHub uygulamas\u0131 bu repoya eri\u015Femiyor.",messageEN:"The build source could not be read: the repository is private and the platform's GitHub App cannot access it.",retryable:!1,fix:`an owner or admin grants the repository in Ayarlar \u203A GitHub entegrasyonu ("GitHub'da repo eri\u015Fimini d\xFCzenle", or install the app when none is installed), then redeploy; if the repository is public, check its address and branch`},BUILD_SOURCE_UNAVAILABLE:{httpStatus:0,async:!0,messageTR:"Derleme kayna\u011F\u0131 platform taraf\u0131ndaki bir sorun nedeniyle okunamad\u0131; kodunuzla ya da GitHub ba\u011Flant\u0131n\u0131zla ilgili de\u011Fil.",messageEN:"The build source could not be read because of a platform-side fault; this is not about your code or your GitHub connection.",retryable:!1,fix:"none \u2014 a platform-side fault; open https://vibecloud.tr/contact, then vibe deploy start --project <slug> once it is fixed"},BUILD_TIMEOUT:{httpStatus:0,async:!0,messageTR:"Derleme zaman a\u015F\u0131m\u0131na u\u011Frad\u0131.",messageEN:"The build timed out.",retryable:!0,fix:"vibe deploy start --project <slug>"},CAPACITY_UNVERIFIED:{httpStatus:0,async:!0,messageTR:"Proje kurulumu bir platform denetimi nedeniyle gecikti; platform kurulumu kendisi yeniden deneyecek.",messageEN:"Project setup was delayed by a platform check; the platform retries it automatically.",retryable:!1,fix:"nothing to do: the platform re-sends the setup itself. Follow project.status and do not create another project"},CELL_APPS_VIP_UNDECLARED:{httpStatus:503,async:!1,messageTR:"Bu alan ad\u0131 i\xE7in y\xF6nlendirme kayd\u0131 hen\xFCz verilemiyor.",messageEN:"A routing record for this domain cannot be issued yet.",retryable:!1,fix:"none \u2014 a platform-side declaration; vibe domain add a subdomain (CNAME) in the meantime"},CELL_AT_CAPACITY:{httpStatus:503,async:!1,messageTR:"Kapasitemiz \u015Fu an dolu ve art\u0131r\u0131yoruz. Talebinizi kaydettik; yer a\xE7\u0131l\u0131nca e-posta ile haber verece\u011Fiz.",messageEN:"We are at capacity right now and adding more. Your request is recorded; we will email you when room opens up.",retryable:!0,fix:"wait for the availability e-mail"},CELL_UNREACHABLE:{httpStatus:503,async:!1,messageTR:"\u0130\u015Fleminiz \u015Fu anda iletilemedi.",messageEN:"Your operation could not be delivered right now.",retryable:!0,fix:"retry"},CERT_ISSUANCE_FAILED:{httpStatus:0,async:!0,messageTR:"Sertifika al\u0131namad\u0131.",messageEN:"The certificate could not be obtained.",retryable:!0,fix:"retry in 10 min"},CERT_RENEWAL_FAILED:{httpStatus:0,async:!1,messageTR:"",messageEN:"",retryable:!0,fix:""},CHECKOUT_CLOSED:{httpStatus:409,async:!1,messageTR:"Bu projenin \xF6deme s\xFCresi doldu; projeyi konsoldan silip yeniden olu\u015Fturun.",messageEN:"This project's payment window has closed; delete the project in the console and create it again.",retryable:!1,fix:"delete the project in the console, create it again, then complete the checkout"},COMMAND_DEAD_LETTERED:{httpStatus:500,async:!1,messageTR:"\u0130\u015Fleminiz tamamlanamad\u0131.",messageEN:"Your operation could not be completed.",retryable:!1,fix:"open https://vibecloud.tr/contact"},CONCURRENCY_LIMIT:{httpStatus:503,async:!1,messageTR:"Uygulaman\u0131z \u015Fu anda kapasitesinin \xFCzerinde istek al\u0131yor.",messageEN:"Your app is receiving more requests than its capacity right now.",retryable:!0,fix:"vibe project resize --project <slug> --package <next package>"},CONFIG_TOO_LARGE:{httpStatus:400,async:!1,messageTR:"Ortam de\u011Fi\u015Fkeni s\u0131n\u0131r\u0131n\u0131 a\u015Ft\u0131n\u0131z.",messageEN:"You have exceeded the environment variable limit.",retryable:!1,fix:"vibe config unset <KEY> until within limits"},CONFIRMATION_MISMATCH:{httpStatus:400,async:!1,messageTR:"Onay i\xE7in proje ad\u0131n\u0131 do\u011Fru yazman\u0131z gerekiyor.",messageEN:"You must type the project name correctly to confirm.",retryable:!1,fix:"repeat the command with the exact project slug"},CONSENT_BANNER_UNCONFIGURED:{httpStatus:409,async:!1,messageTR:"Banner\u0131n metinleri ve g\xF6r\xFCn\xFCm\xFC kaydedilmeden yerle\u015Ftirme kodu olu\u015Fturulamaz.",messageEN:"The embed code cannot be generated before the banner's text and appearance are saved.",retryable:!1,fix:"saveConsentBanner for the domain, then retry"},CONSENT_DOMAIN_UNVERIFIED:{httpStatus:403,async:!1,messageTR:"Bu alan ad\u0131 do\u011Frulanmadan r\u0131za hizmeti a\xE7\u0131lamaz.",messageEN:"The consent service cannot be enabled before this domain is verified.",retryable:!1,fix:"vibe domain verify <hostname> then retry"},CONSENT_EXPORT_TOO_LARGE:{httpStatus:422,async:!1,messageTR:"Se\xE7ilen d\xF6nemin r\u0131za kay\u0131tlar\u0131 tek dosyaya s\u0131\u011Fm\u0131yor; daha k\u0131sa bir d\xF6nem se\xE7in.",messageEN:"The consent records for the selected period do not fit in one file; choose a shorter period.",retryable:!1,fix:"narrow from/to and retry"},CONSENT_INPUT_INVALID:{httpStatus:400,async:!1,messageTR:"Banner ayarlar\u0131nda ge\xE7ersiz bir de\u011Fer var.",messageEN:"A banner setting has an invalid value.",retryable:!1,fix:"correct details.field and retry"},CONSENT_NOT_ENABLED:{httpStatus:409,async:!1,messageTR:"Bu alan ad\u0131nda \xE7erez izni banner\u0131 kapal\u0131; \xF6nce banner\u0131 a\xE7\u0131n.",messageEN:"The cookie consent banner is off on this domain; turn the banner on first.",retryable:!1,fix:"setConsentEnabled(enabled: true) for the domain, then retry"},CONTACT_DOMAIN_UNVERIFIED:{httpStatus:403,async:!1,messageTR:"Bu alan ad\u0131 do\u011Frulanmadan ileti\u015Fim formu a\xE7\u0131lamaz.",messageEN:"The contact form cannot be enabled before this domain is verified.",retryable:!1,fix:"vibe domain verify <hostname> then retry"},CONTACT_NOT_ENABLED:{httpStatus:409,async:!1,messageTR:"Bu alan ad\u0131nda ileti\u015Fim formu kapal\u0131; \xF6nce formu a\xE7\u0131n.",messageEN:"The contact form is off on this domain; switch it on first.",retryable:!1,fix:"setContactEnabled(enabled: true) then retry"},CREDENTIAL_KIND_FORBIDDEN:{httpStatus:403,async:!1,messageTR:"Bu i\u015Flem API anahtar\u0131 ile yap\u0131lamaz; konsoldan giri\u015F yap\u0131n.",messageEN:"This action cannot be done with an API key; sign in to the console.",retryable:!1,fix:"do this in the console signed in, or with vibe after vibe login \u2014 not with an API key (PAT)"},DEPLOY_WARMUP_FAILED:{httpStatus:0,async:!0,messageTR:"Yeni s\xFCr\xFCm haz\u0131r duruma gelemedi.",messageEN:"The new version could not become ready.",retryable:!0,fix:"fix the app startup error, then vibe deploy start --project <slug>"},DISPATCH_FAILED:{httpStatus:0,async:!0,messageTR:"Komut kuyru\u011Fa al\u0131namad\u0131.",messageEN:"The command could not be queued.",retryable:!0,fix:"retry"},DNS_RECORD_INVALID:{httpStatus:400,async:!1,messageTR:"DNS kayd\u0131 ge\xE7ersiz.",messageEN:"The DNS record is invalid.",retryable:!1,fix:"fix the record and retry"},DNS_RECORD_LIMIT:{httpStatus:422,async:!1,messageTR:"Bu b\xF6lgedeki kay\u0131t s\u0131n\u0131r\u0131na ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached the record limit for this zone.",retryable:!1,fix:"remove unused records"},DNS_RECORD_PRIVATE_ADDRESS:{httpStatus:400,async:!1,messageTR:"Bu adres \xF6zel bir a\u011F aral\u0131\u011F\u0131nda; herkese a\xE7\u0131k bir DNS kayd\u0131na yaz\u0131lamaz.",messageEN:"This address is in a private network range and cannot be published in a public DNS record.",retryable:!1,fix:"use a public address"},DNS_RECORD_RESERVED:{httpStatus:409,async:!1,messageTR:"Bu kay\u0131t platform taraf\u0131ndan y\xF6netiliyor ve de\u011Fi\u015Ftirilemez.",messageEN:"This record is managed by the platform and cannot be changed.",retryable:!1,fix:"vibe domain release <hostname>"},DNS_ZONE_CLAIMED:{httpStatus:409,async:!1,messageTR:"Bu alan ad\u0131 ba\u015Fka bir hesapta ad sunucusu ta\u015F\u0131ma i\xE7in bekliyor. Alan ad\u0131n\u0131n sizin oldu\u011Funu mevcut DNS sa\u011Flay\u0131c\u0131n\u0131zda bir TXT kayd\u0131yla kan\u0131tlayabilirsiniz.",messageEN:"This domain is pending a nameserver move in another account. You can prove it is yours with a TXT record at your current DNS provider.",retryable:!1,fix:"publish the returned TXT record, then vibe zone prove --name <zone>"},DNS_ZONE_NOT_APEX:{httpStatus:400,async:!1,messageTR:"Ad sunucular\u0131m\u0131za yaln\u0131zca kay\u0131tl\u0131 alan ad\u0131n\u0131n kendisi (\xF6r. sirket.com.tr) ta\u015F\u0131nabilir, alt alan ad\u0131 ta\u015F\u0131namaz.",messageEN:"Only a registrable domain (e.g. sirket.com.tr) can be moved to our nameservers, not a subdomain.",retryable:!1,fix:"vibe zone add --name <registrable-domain>"},DNS_ZONE_NOT_DELEGATED:{httpStatus:409,async:!1,messageTR:"Alan ad\u0131n\u0131n ad sunucular\u0131 hen\xFCz bizi g\xF6stermiyor.",messageEN:"The domain's nameservers do not point to us yet.",retryable:!0,fix:"vibe zone verify --name <zone>"},DOMAIN_CAA_BLOCKS_ISSUANCE:{httpStatus:409,async:!1,messageTR:"Alan ad\u0131n\u0131z\u0131n CAA kayd\u0131 sertifika verilmesini engelliyor.",messageEN:"Your domain's CAA record blocks certificate issuance.",retryable:!1,fix:"add a CAA record allowing letsencrypt.org, then vibe domain verify <hostname>"},DOMAIN_VERIFICATION_EXPIRED:{httpStatus:409,async:!1,messageTR:"Do\u011Frulama s\xFCresi doldu.",messageEN:"The verification window has expired.",retryable:!1,fix:"vibe domain add <hostname>"},DOMAIN_VERIFICATION_PENDING:{httpStatus:0,async:!0,messageTR:"DNS kayd\u0131 hen\xFCz g\xF6r\xFCnm\xFCyor.",messageEN:"The DNS record is not visible yet.",retryable:!0,fix:"vibe domain verify <hostname>"},DSAR_APPLY_DEFERRED:{httpStatus:503,async:!1,messageTR:"KVKK ba\u015Fvuru formunun haz\u0131rl\u0131\u011F\u0131 beklenenden uzun s\xFCrd\xFC; otomatik olarak yeniden deneniyor.",messageEN:"Preparing the KVKK request form took longer than expected; it is being retried automatically.",retryable:!0,fix:"nothing to do \u2014 the platform retries by itself; if the checklist turns FAILED, retryDsarProvisioning(projectId)"},DSAR_DEPROVISION_RESIDUE:{httpStatus:409,async:!1,messageTR:"KVKK ba\u015Fvuru hizmeti kapat\u0131lamad\u0131: projede h\xE2l\xE2 yan\u0131t bekleyen ba\u015Fvurular ya da belgeler var.",messageEN:"The KVKK request service could not be turned off: the project still has requests or documents awaiting a response.",retryable:!1,fix:"answer and close the remaining applications; the service is shut down once none remain. If none remain, contact support with the operation id"},DSAR_DOMAIN_UNVERIFIED:{httpStatus:403,async:!1,messageTR:"Bu alan ad\u0131 do\u011Frulanmadan KVKK ba\u015Fvuru hizmeti a\xE7\u0131lamaz.",messageEN:"The KVKK request service cannot be enabled before this domain is verified.",retryable:!1,fix:"vibe domain verify <hostname> then retry"},DSAR_MAIL_UNCONFIGURED:{httpStatus:409,async:!1,messageTR:"Projenizin e-posta sunucusu (SMTP) ayarlanmadan ba\u015Fvuru formu do\u011Frulama kodu g\xF6nderemez.",messageEN:"The request form cannot send verification codes until your project's email server (SMTP) is configured.",retryable:!1,fix:"configure the project's SMTP in the console's mail settings; the form opens by itself"},DSAR_NOT_ENABLED:{httpStatus:409,async:!1,messageTR:"Bu alan ad\u0131nda KVKK ba\u015Fvuru formu kapal\u0131; \xF6nce formu a\xE7\u0131n.",messageEN:"The KVKK request form is off on this domain; turn the form on first.",retryable:!1,fix:"setDsarEnabled(enabled: true) for the domain, then retry"},DSAR_PROVISIONING_FAILED:{httpStatus:503,async:!1,messageTR:"KVKK ba\u015Fvuru hizmeti bu projede kurulamad\u0131.",messageEN:"The KVKK request service could not be set up in this project.",retryable:!1,fix:"retryDsarProvisioning(projectId); if it fails again, contact support with the operation id"},DSAR_PROVISIONING_PENDING:{httpStatus:409,async:!1,messageTR:"KVKK ba\u015Fvuru formunun eri\u015Fim ayarlar\u0131nda s\xFCren bir i\u015Flem var; birka\xE7 dakika sonra yeniden deneyin.",messageEN:"An operation on the KVKK request form's access settings is in progress; retry in a few minutes.",retryable:!0,fix:"wait a few minutes for the operation in progress to finish (DsarConsole.provisioning shows it), then retry"},EGRESS_CIDR_REJECTED:{httpStatus:400,async:!1,messageTR:"A\u011F izin listesine yaln\u0131zca alan ad\u0131 eklenebilir.",messageEN:"Only domain names can be added to the network allowlist.",retryable:!1,fix:"remove the CIDR rule and retry"},ENTERPRISE_DEMOTION_BLOCKED:{httpStatus:409,async:!1,messageTR:"Organizasyonda a\xE7\u0131k limit a\u015F\u0131m\u0131, RLS korumas\u0131 kapal\u0131 ya da IP izin listesi tan\u0131ml\u0131 projeler varken kurumsal seviye kald\u0131r\u0131lamaz.",messageEN:"The enterprise tier cannot be removed while the organization has open overages, projects with RLS protection disabled, or projects with an IP allowlist.",retryable:!1,fix:""},ENTERPRISE_ONLY:{httpStatus:403,async:!1,messageTR:"Bu \xF6zellik yaln\u0131zca kurumsal organizasyonlarda kullan\u0131labilir.",messageEN:"This feature is only available in enterprise organizations.",retryable:!1,fix:"open https://vibecloud.tr/contact"},ENTERPRISE_REQUIRED:{httpStatus:403,async:!1,messageTR:"Pro paketler yaln\u0131zca kurumsal organizasyonlarda se\xE7ilebilir.",messageEN:"Pro packages can only be chosen in enterprise organizations.",retryable:!1,fix:"open https://vibecloud.tr/contact"},ENTITLEMENT_STALE:{httpStatus:409,async:!1,messageTR:"Hesap bilgileriniz g\xFCncelleniyor, tekrar deneyin.",messageEN:"Your account details are being updated; try again.",retryable:!0,fix:"retry"},ENTITLEMENT_UNAVAILABLE:{httpStatus:503,async:!1,messageTR:"Hesap bilgileriniz \u015Fu anda do\u011Frulanam\u0131yor.",messageEN:"Your account details cannot be verified right now.",retryable:!0,fix:"retry in 30 s"},EXPORT_EXPIRED:{httpStatus:410,async:!1,messageTR:"Ar\u015Fivin saklama s\xFCresi doldu ve silindi. Yeni bir d\u0131\u015Fa aktarma isteyebilirsiniz.",messageEN:"The archive's retention period ended and it was deleted. You can request a new export.",retryable:!1,fix:"request a new export"},EXPORT_NOT_ADDRESSABLE:{httpStatus:409,async:!1,messageTR:"Bu ar\u015Fivin bulundu\u011Fu b\xF6lge kay\u0131tl\u0131 de\u011Fil; l\xFCtfen bize yaz\u0131n.",messageEN:"The region holding this archive is not registered; please contact us.",retryable:!1,fix:"open https://vibecloud.tr/contact"},EXPORT_NOT_READY:{httpStatus:409,async:!1,messageTR:"Ar\u015Fiv hen\xFCz indirilemez; haz\u0131r oldu\u011Funda burada g\xF6r\xFCn\xFCr.",messageEN:"The archive cannot be downloaded yet; it appears here when ready.",retryable:!0,fix:"retry later"},EXTENSION_NOT_ALLOWED:{httpStatus:403,async:!1,messageTR:"Bu PostgreSQL eklentisi kullan\u0131lam\u0131yor.",messageEN:"This PostgreSQL extension is not available.",retryable:!1,fix:"remove the extension and retry"},FORBIDDEN_ROLE:{httpStatus:403,async:!1,messageTR:"Bu i\u015Flem i\xE7in yetkiniz yok.",messageEN:"You do not have permission for this action.",retryable:!1,fix:"ask an org ADMIN or OWNER to run this \u2014 https://vibecloud.tr/team"},FORBIDDEN_SCOPE:{httpStatus:403,async:!1,messageTR:"Bu eri\u015Fim jetonu bu i\u015Flem i\xE7in gereken yetkiyi ta\u015F\u0131m\u0131yor.",messageEN:"This access token does not carry the scope this action needs.",retryable:!1,fix:'vibe login --scope "<details.scope>"'},GITHUB_UNAVAILABLE:{httpStatus:503,async:!1,messageTR:"GitHub'a \u015Fu anda ula\u015F\u0131lam\u0131yor. Biraz sonra tekrar deneyin.",messageEN:"GitHub cannot be reached right now. Try again shortly.",retryable:!0,fix:"retry later"},HOSTNAME_BLOCKED:{httpStatus:403,async:!1,messageTR:"Bu alan ad\u0131 g\xFCvenlik nedeniyle kullan\u0131lamaz.",messageEN:"This domain cannot be used for security reasons.",retryable:!1,fix:"vibe domain add <a non-lookalike hostname>"},HOSTNAME_CLAIMED:{httpStatus:409,async:!1,messageTR:"Bu alan ad\u0131 ba\u015Fka bir hesap taraf\u0131ndan kullan\u0131l\u0131yor.",messageEN:"This domain is in use by another account.",retryable:!1,fix:"vibe domain add <another-hostname>"},HOSTNAME_INVALID:{httpStatus:400,async:!1,messageTR:"Alan ad\u0131 ge\xE7ersiz.",messageEN:"The domain is invalid.",retryable:!1,fix:"vibe domain add <a valid hostname>"},IDEMPOTENCY_KEY_REUSED:{httpStatus:409,async:!1,messageTR:"Bu i\u015Flem farkl\u0131 parametrelerle yeniden g\xF6nderildi.",messageEN:"This operation was resent with different parameters.",retryable:!1,fix:"retry with a new clientMutationId"},INGRESS_ALLOWLIST_REQUIRES_PRO:{httpStatus:403,async:!1,messageTR:"IP izin listesi yaln\u0131zca Pro paketlerde kullan\u0131labilir.",messageEN:"The IP allowlist is available on Pro packages only.",retryable:!1,fix:"send an empty cidrs list; a non-empty list needs a Pro package (enterprise tier)"},INTERNAL:{httpStatus:500,async:!1,messageTR:"Beklenmeyen bir hata olu\u015Ftu.",messageEN:"An unexpected error occurred.",retryable:!0,fix:"retry; if it persists open https://vibecloud.tr/contact with the traceId from details when present"},INVITATION_EMAIL_MISMATCH:{httpStatus:403,async:!1,messageTR:"Bu davet ba\u015Fka bir e-posta adresine g\xF6nderildi.",messageEN:"This invitation was sent to a different email address.",retryable:!1,fix:"sign in with the invited address, then open the link again"},INVITATION_NOT_FOUND:{httpStatus:404,async:!1,messageTR:"Bu davet bulunamad\u0131 ya da art\u0131k ge\xE7erli de\u011Fil.",messageEN:"This invitation was not found or is no longer valid.",retryable:!1,fix:"ask the organisation's admin for a new invitation"},KEY_ROTATION_IS_ATOMIC:{httpStatus:400,async:!1,messageTR:"Anahtarlar tek tek yenilenemez; \xFC\xE7\xFC birlikte yenilenir.",messageEN:"Keys cannot be rotated one at a time; all three rotate together.",retryable:!1,fix:"repeat without keyKind \u2014 all three keys rotate together"},LAST_SIGN_IN_METHOD:{httpStatus:409,async:!1,messageTR:"Bu, hesab\u0131n\u0131za girmenin tek yolu. Kald\u0131rmadan \xF6nce bir parola belirleyin veya ba\u015Fka bir giri\u015F y\xF6ntemi ba\u011Flay\u0131n.",messageEN:"This is the only way to sign in to your account. Set a password or link another sign-in method before removing it.",retryable:!1,fix:"set a password (the reset mail) or connect another sign-in method at https://vibecloud.tr/settings, then retry"},LOGIN_CHALLENGE_EXPIRED:{httpStatus:400,async:!1,messageTR:"Kodun s\xFCresi doldu. Yeni bir kod i\xE7in tekrar giri\u015F yap\u0131n.",messageEN:"The code has expired. Sign in again for a new one.",retryable:!1,fix:"sign in again for a new code"},LOGIN_CODE_INVALID:{httpStatus:400,async:!1,messageTR:"Kod yanl\u0131\u015F. E-postadaki 6 haneli kodu kontrol edin.",messageEN:"That code is wrong. Check the 6-digit code in the email.",retryable:!1,fix:"re-read the code from the mail, five tries in all"},LOG_DRAIN_RESIDENCY_ACK_REQUIRED:{httpStatus:422,async:!1,messageTR:"Yurt d\u0131\u015F\u0131 bir hedefe log aktar\u0131m\u0131 i\xE7in s\u0131n\u0131r \xF6tesi veri aktar\u0131m\u0131 onay\u0131 gerekir.",messageEN:"Sending logs to a destination abroad requires acknowledging the cross-border data transfer.",retryable:!1,fix:"residencyAck=true ile tekrar deneyin"},LOG_STORE_UNAVAILABLE:{httpStatus:503,async:!1,messageTR:"Uygulama g\xFCnl\xFCkleri \u015Fu anda kullan\u0131lam\u0131yor; l\xFCtfen daha sonra tekrar deneyin.",messageEN:"App logs are unavailable right now; please try again later.",retryable:!0,fix:"retry later"},MARKETING_DOMAIN_UNVERIFIED:{httpStatus:403,async:!1,messageTR:"Bu alan ad\u0131 do\u011Frulanmadan ticari ileti onay formu a\xE7\u0131lamaz.",messageEN:"The marketing consent form cannot be enabled before this domain is verified.",retryable:!1,fix:"vibe domain verify <hostname> then retry"},MARKETING_NOT_ENABLED:{httpStatus:409,async:!1,messageTR:"Bu alan ad\u0131nda ticari ileti onay formu kapal\u0131; \xF6nce formu a\xE7\u0131n.",messageEN:"The marketing consent form is off on this domain; switch it on first.",retryable:!1,fix:"setMarketingEnabled(enabled: true) then retry"},MARKETING_SENDER_NAME_INVALID:{httpStatus:400,async:!1,messageTR:"Ticari ileti onay formunu a\xE7mak i\xE7in iletileri g\xF6nderecek i\u015Fletmenin ticari unvan\u0131n\u0131 (esnafsan\u0131z ad\u0131n\u0131z\u0131 ve soyad\u0131n\u0131z\u0131) girin: 2-200 karakter, tek sat\u0131r.",messageEN:"Enter the trade name of the business that will send the messages (2 to 200 characters, one line) to switch the marketing consent form on.",retryable:!1,fix:'setMarketingEnabled(enabled: true, senderName: "<ticari unvan>")'},METRICS_UNAVAILABLE:{httpStatus:503,async:!1,messageTR:"\xD6l\xE7\xFCmler \u015Fu anda okunam\u0131yor; l\xFCtfen daha sonra tekrar deneyin.",messageEN:"Metrics cannot be read right now; please try again later.",retryable:!0,fix:"retry later"},MFA_ALREADY_ENROLLED:{httpStatus:409,async:!1,messageTR:"\u0130ki ad\u0131ml\u0131 do\u011Frulama zaten etkin.",messageEN:"Two-factor authentication is already enabled.",retryable:!1,fix:"open https://vibecloud.tr/settings"},MFA_CHALLENGE_FAILED:{httpStatus:403,async:!1,messageTR:"Do\u011Frulama kodu ge\xE7ersiz veya s\xFCresi dolmu\u015F.",messageEN:"The verification code is invalid or has expired.",retryable:!1,fix:"request a new code and retry once"},MFA_LOCKED:{httpStatus:429,async:!1,messageTR:"\xC7ok fazla hatal\u0131 do\u011Frulama kodu girildi; 15 dakika sonra tekrar deneyin.",messageEN:"Too many wrong verification codes; try again in 15 minutes.",retryable:!0,fix:"wait 15 minutes, then retry with a new code"},MFA_NOT_PENDING:{httpStatus:409,async:!1,messageTR:"Tamamlanacak bir do\u011Frulama kayd\u0131 yok.",messageEN:"There is no pending verification enrolment to complete.",retryable:!1,fix:"open https://vibecloud.tr/settings and start enrolment again"},MFA_REQUIRED:{httpStatus:403,async:!1,messageTR:"Bu i\u015Flem i\xE7in iki ad\u0131ml\u0131 do\u011Frulama gerekiyor.",messageEN:"This action requires two-factor authentication.",retryable:!1,fix:"send a current code from the user's authenticator in the Vibecloud-Otp header (vibe asks for it; an agent asks its user, never guesses); not enrolled: open details.enrolUrl (https://vibecloud.tr/settings#mfa)"},MIGRATION_IDENTITY_REQUIRED:{httpStatus:422,async:!1,messageTR:"Ge\xE7i\u015F kredisi i\xE7in vergi veya TC kimlik numaras\u0131 gerekir.",messageEN:"A migration credit requires a tax number or Turkish ID number.",retryable:!1,fix:"vergi/TC kimlik numaran\u0131z\u0131 fatura bilgilerine girin ve tekrar deneyin"},MIGRATION_NOT_COMPLETE:{httpStatus:409,async:!1,messageTR:"\u0130\xE7e aktar\u0131m hen\xFCz tamamlanmad\u0131: hedef \u015Femada kullan\u0131c\u0131 tablosu g\xF6r\xFCnm\xFCyor.",messageEN:"The import has not finished: no users table is visible in the target schema.",retryable:!0,fix:"i\xE7e aktar\u0131m\u0131 tamamlay\u0131n; hedefin \u015Femas\u0131 g\xF6zlemlendi\u011Finde tekrar deneyin"},MIGRATION_TARGET_NOT_EMPTY:{httpStatus:409,async:!1,messageTR:"Hedef proje bo\u015F de\u011Fil: i\xE7e aktar\u0131m yaln\u0131zca bo\u015F bir projeye yap\u0131labilir.",messageEN:"The target project is not empty: an import can only go into an empty project.",retryable:!1,fix:"vibe project create a fresh project and import into that, or empty the target yourself first"},NOT_FOUND:{httpStatus:404,async:!1,messageTR:"Kay\u0131t bulunamad\u0131.",messageEN:"Record not found.",retryable:!1,fix:"vibe project list"},ONBOARDING_INCOMPLETE:{httpStatus:400,async:!1,messageTR:"Fatura bilgileriniz eksik veya ge\xE7ersiz; e-Fatura i\xE7in tamamlay\u0131n.",messageEN:"The billing details are missing or invalid; complete them for the e-invoice.",retryable:!1,fix:"complete the billing details at https://vibecloud.tr/onboarding, then retry"},OPERATION_IN_PROGRESS:{httpStatus:409,async:!1,messageTR:"Bu proje \xFCzerinde ba\u015Fka bir i\u015Flem s\xFCr\xFCyor.",messageEN:"Another operation is in progress on this project.",retryable:!0,fix:"vibe project status --project <slug>, then retry when idle"},PACKAGE_FLOOR:{httpStatus:403,async:!1,messageTR:"Bu \xF6zellik daha \xFCst bir paket gerektirir.",messageEN:"This feature requires a higher package.",retryable:!1,fix:"vibe project resize --project <slug> --package <details.requiredPackage>"},PACKAGE_NOT_SERVED:{httpStatus:409,async:!1,messageTR:"Bu paket \u015Fu an bu b\xF6lgede sunulmuyor; l\xFCtfen destek ekibiyle ileti\u015Fime ge\xE7in.",messageEN:"This package is not offered in this region right now; please contact support.",retryable:!1,fix:"pick another package, or contact support"},PACKAGE_RETIRED:{httpStatus:400,async:!1,messageTR:"Bu paket art\u0131k sunulmuyor.",messageEN:"This package is no longer offered.",retryable:!1,fix:"pick a listed package from packages"},PARAMETER_NOT_ALLOWED:{httpStatus:400,async:!1,messageTR:"Bu ayar de\u011Fi\u015Ftirilemiyor.",messageEN:"This setting cannot be changed.",retryable:!1,fix:"remove the parameter and retry"},PAST_DUE:{httpStatus:402,async:!1,messageTR:"\xD6demesi gecikmi\u015F faturan\u0131z var.",messageEN:"You have an overdue invoice.",retryable:!1,fix:"settle the invoice at https://vibecloud.tr/billing"},PAYMENT_DETAILS_REJECTED:{httpStatus:422,async:!1,messageTR:"\xD6deme sa\u011Flay\u0131c\u0131s\u0131 girilen bilgileri kabul etmedi.",messageEN:"The payment provider rejected the details entered.",retryable:!1,fix:"correct the field the message names and submit again"},PAYMENT_NOT_RECEIVED:{httpStatus:0,async:!0,messageTR:"\xD6deme al\u0131nmad\u0131\u011F\u0131 i\xE7in proje serbest b\u0131rak\u0131ld\u0131.",messageEN:"The project was released because payment was not received.",retryable:!1,fix:"vibe project create again when ready to pay"},PAYMENT_PROVIDER_ERROR:{httpStatus:502,async:!1,messageTR:"\xD6deme sa\u011Flay\u0131c\u0131s\u0131na ula\u015F\u0131lamad\u0131.",messageEN:"The payment provider could not be reached.",retryable:!0,fix:"retry in 60 s"},PAYMENT_REQUIRED:{httpStatus:402,async:!1,messageTR:"Bu projenin \xF6demesi hen\xFCz al\u0131nmad\u0131.",messageEN:"Payment for this project has not been received yet.",retryable:!1,fix:"open details.checkoutUrl and complete the checkout, then retry"},PREVIEW_CLONE_DISABLED:{httpStatus:403,async:!1,messageTR:"Kopya modunda branch a\xE7mak i\xE7in organizasyon sahibi bu \xF6zelli\u011Fi a\xE7mal\u0131.",messageEN:"The organization owner must enable this feature to open branches in clone mode.",retryable:!1,fix:"ask the org owner to enable clone branches at https://vibecloud.tr/org/settings, or vibe branch create --mode schema"},PROJECT_SETUP_FAILED:{httpStatus:409,async:!1,messageTR:"Proje kurulamad\u0131.",messageEN:"The project could not be set up.",retryable:!1,fix:"do not retry. Delete the project (this ends its subscription) and contact support"},PROJECT_SETUP_PENDING:{httpStatus:409,async:!1,messageTR:"Projenin kurulumu yeniden deneniyor; servis birazdan ba\u015Flat\u0131labilir.",messageEN:"The project's setup is being retried; the service can be started shortly.",retryable:!0,fix:"retry in a minute: the project's setup is being re-sent"},PROJECT_STOPPED:{httpStatus:409,async:!1,messageTR:"Bu proje durduruldu. \xD6nce projeyi ba\u015Flat\u0131n.",messageEN:"This project is stopped. Start it first.",retryable:!1,fix:"vibe project start <project>"},PROJECT_TRANSFER_NOT_FOUND:{httpStatus:404,async:!1,messageTR:"Bu devir iste\u011Fi bulunamad\u0131 ya da art\u0131k ge\xE7erli de\u011Fil.",messageEN:"This project transfer was not found or is no longer valid.",retryable:!1,fix:"the source organisation's OWNER starts a new transfer"},PROJECT_TRANSFER_PENDING:{httpStatus:409,async:!1,messageTR:"Bu proje i\xE7in bekleyen bir devir iste\u011Fi var.",messageEN:"This project already has a pending transfer.",retryable:!1,fix:"wait for the target to answer, or cancel the pending transfer and start again"},PROJECT_TRANSFER_REFUSED:{httpStatus:409,async:!1,messageTR:"Bu proje \u015Fu anda devredilemez.",messageEN:"This project cannot be transferred right now.",retryable:!1,fix:"pay or settle the subscription first, or name another organisation"},PRO_REQUIRED:{httpStatus:403,async:!1,messageTR:"Kurumsal organizasyonlarda yaln\u0131zca Pro paketler se\xE7ilebilir.",messageEN:"Enterprise organizations can only choose Pro packages.",retryable:!1,fix:"vibe project resize --project <slug> --package <details.suggestedPackage>"},QUOTA_BUILDS_PER_DAY:{httpStatus:429,async:!1,messageTR:"G\xFCnl\xFCk derleme s\u0131n\u0131r\u0131n\u0131za ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached your daily build limit.",retryable:!0,fix:"retry after details.retryAfter"},QUOTA_BUILD_MINUTES:{httpStatus:403,async:!1,messageTR:"Ayl\u0131k derleme s\xFCresi s\u0131n\u0131r\u0131n\u0131za ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached your monthly build minutes limit.",retryable:!1,fix:"vibe project resize --project <slug> --package <next package>"},QUOTA_CONNECTIONS:{httpStatus:429,async:!1,messageTR:"Veritaban\u0131 ba\u011Flant\u0131 s\u0131n\u0131r\u0131n\u0131za ula\u015F\u0131ld\u0131.",messageEN:"The database connection limit has been reached.",retryable:!0,fix:"connect through the pooler URL from vibe db connect"},QUOTA_CUSTOM_DOMAINS:{httpStatus:403,async:!1,messageTR:"Alan ad\u0131 s\u0131n\u0131r\u0131n\u0131za ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached your custom domain limit.",retryable:!1,fix:"vibe domain release <hostname> or vibe project resize --project <slug> --package <next package>"},QUOTA_DB_STORAGE:{httpStatus:403,async:!1,messageTR:"Veritaban\u0131 depolama s\u0131n\u0131r\u0131n\u0131za ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached your database storage limit.",retryable:!1,fix:"vibe project resize --project <slug> --package <next package>"},QUOTA_EGRESS:{httpStatus:403,async:!1,messageTR:"Ayl\u0131k veri transferi s\u0131n\u0131r\u0131n\u0131za ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached your monthly data transfer limit.",retryable:!1,fix:"vibe project resize --project <slug> --package <next package>"},QUOTA_EGRESS_CARDINALITY:{httpStatus:429,async:!1,messageTR:"\xC7ok say\u0131da farkl\u0131 adrese ba\u011Flant\u0131 denendi.",messageEN:"Connections to too many distinct addresses were attempted.",retryable:!0,fix:"reduce the number of distinct destinations the app calls"},QUOTA_PREVIEW_BRANCHES:{httpStatus:403,async:!1,messageTR:"\xD6nizleme branch s\u0131n\u0131r\u0131n\u0131za ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached your preview branch limit.",retryable:!1,fix:"vibe branch delete <name> or vibe project resize --project <slug> --package <next package>"},QUOTA_PROJECTS_PER_ORG:{httpStatus:403,async:!1,messageTR:"Proje say\u0131s\u0131 s\u0131n\u0131r\u0131n\u0131za ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached your project limit.",retryable:!1,fix:"vibe project resize --project <slug> --package <next package> or remove a project"},QUOTA_RUNTIME_INSTANCES:{httpStatus:403,async:!1,messageTR:"\xC7al\u0131\u015Fan uygulama \xF6rne\u011Fi s\u0131n\u0131r\u0131n\u0131za ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached your running app instance limit.",retryable:!1,fix:"vibe project resize --project <slug> --package <next package>"},QUOTA_SEATS:{httpStatus:403,async:!1,messageTR:"Ekip \xFCyesi s\u0131n\u0131r\u0131n\u0131za ula\u015Ft\u0131n\u0131z.",messageEN:"You have reached your team member limit.",retryable:!1,fix:"remove a member or withdraw an invitation at https://vibecloud.tr/team, or vibe project resize --project <slug> --package <next package>"},RATE_LIMITED:{httpStatus:429,async:!1,messageTR:"\xC7ok fazla istek g\xF6nderdiniz.",messageEN:"You have sent too many requests.",retryable:!0,fix:"retry after details.retryAfter"},READ_ONLY_STANDING:{httpStatus:402,async:!1,messageTR:"Hesab\u0131n\u0131z salt-okunur durumda.",messageEN:"Your account is read-only.",retryable:!1,fix:"settle the invoice at https://vibecloud.tr/billing"},REQUEST_TOO_LARGE:{httpStatus:413,async:!1,messageTR:"\u0130stek g\xF6vdesi \xE7ok b\xFCy\xFCk.",messageEN:"The request body is too large.",retryable:!1,fix:"send a smaller request \u2014 split the operation or trim the variables so the body stays under 1 MiB"},RESET_REVOCATION_INCOMPLETE:{httpStatus:500,async:!1,messageTR:"Parolan\u0131z de\u011Fi\u015Fti, ancak baz\u0131 oturum kapatma i\u015Flemleri tamamlanamad\u0131. Tamamlamak i\xE7in yeni bir parola s\u0131f\u0131rlama linki isteyin.",messageEN:"Your password was changed, but some sign-outs could not be completed. Request a new reset link to finish.",retryable:!1,fix:"request a new reset link from the console's *Parolam\u0131 unuttum*"},RESTORE_IN_PROGRESS:{httpStatus:409,async:!1,messageTR:"Bu proje i\xE7in bir kurtarma i\u015Flemi s\xFCr\xFCyor.",messageEN:"A restore is in progress for this project.",retryable:!0,fix:"retry when the restore finishes"},RESTORE_SOURCE_MISSING:{httpStatus:404,async:!1,messageTR:"Yedek bulunamad\u0131.",messageEN:"The backup was not found.",retryable:!1,fix:"vibe backups --project <slug>"},RESTORE_TARGET_UNREACHABLE:{httpStatus:409,async:!1,messageTR:"\u0130stenen zaman noktas\u0131 kurtarma penceresinin d\u0131\u015F\u0131nda.",messageEN:"The requested point in time is outside the recovery window.",retryable:!1,fix:"choose a point between details.pitrFloor and details.restoreCeiling"},RLS_DISABLE_FORBIDDEN:{httpStatus:403,async:!1,messageTR:"RLS yaln\u0131zca kurumsal organizasyonlarda kapat\u0131labilir.",messageEN:"RLS can only be disabled in enterprise organizations.",retryable:!1,fix:"keep RLS on; write a policy instead"},ROLLBACK_ACROSS_KEY_ROTATION:{httpStatus:409,async:!1,messageTR:"Bu s\xFCr\xFCm eski API anahtar\u0131yla derlenmi\u015F; geri d\xF6n\xFClemiyor.",messageEN:"This version was built with an old API key; it cannot be rolled back to.",retryable:!1,fix:"vibe deploy start --project <slug> (a fresh build carries the current keys)"},ROLLBACK_SECRET_REMOVED:{httpStatus:409,async:!1,messageTR:"Bu s\xFCr\xFCm art\u0131k tan\u0131ml\u0131 olmayan bir gizli de\u011Fi\u015Fkene ihtiya\xE7 duyuyor; geri d\xF6n\xFClemiyor.",messageEN:"This version needs a secret the app no longer declares; it cannot be rolled back to.",retryable:!1,fix:"vibe config secret --project <slug> --name <NAME> (value on stdin) for each secret the app no longer declares, then roll back again"},ROLLBACK_TARGET_REAPED:{httpStatus:409,async:!1,messageTR:"Bu s\xFCr\xFCme geri d\xF6n\xFClemiyor; art\u0131k saklanm\u0131yor (saklama s\xFCresi ge\xE7ti ya da uygulama statik siteye ge\xE7ti).",messageEN:"This version cannot be rolled back to; it is no longer kept (the retention period passed or the app moved to a static site).",retryable:!1,fix:"vibe deploy start --project <slug>"},SAVED_CARD_CHANGED:{httpStatus:409,async:!1,messageTR:"Kay\u0131tl\u0131 kart\u0131n\u0131z de\u011Fi\u015Fti; \xF6demeyi \u015Fimdi g\xF6sterilen kartla yeniden onaylay\u0131n.",messageEN:"Your saved card changed; confirm the payment again with the card now shown.",retryable:!1,fix:"read savedCardOffer again and confirm with the card it names"},SAVED_CARD_IN_PROGRESS:{httpStatus:409,async:!1,messageTR:"Bu proje i\xE7in kay\u0131tl\u0131 kartla bir \xF6deme s\xFCr\xFCyor.",messageEN:"A saved-card payment for this project is in progress.",retryable:!0,fix:"wait for Project.savedCardPurchase to finish"},SAVED_CARD_UNAVAILABLE:{httpStatus:409,async:!1,messageTR:"Kay\u0131tl\u0131 kart\u0131n\u0131zla \xF6deme \u015Fu an yap\u0131lam\u0131yor; \xF6deme formunu kullan\u0131n.",messageEN:"Paying with your saved card is not available right now; use the checkout form.",retryable:!1,fix:"use the hosted checkout (checkoutUrl)"},SECRET_IN_PLAINTEXT_ENV:{httpStatus:400,async:!1,messageTR:"Bu de\u011Fer gizli g\xF6r\xFCn\xFCyor; `env` yerine gizli anahtar olarak ekleyin.",messageEN:"This value looks secret; add it as a secret instead of `env`.",retryable:!1,fix:"vibe config secret <KEY>"},SECRET_WOULD_BE_PUBLIC:{httpStatus:400,async:!1,messageTR:"`NEXT_PUBLIC_` ile ba\u015Flayan bir de\u011Fer gizli tutulamaz; taray\u0131c\u0131ya g\xF6nderilir.",messageEN:"A value starting with `NEXT_PUBLIC_` cannot be kept secret; it is sent to the browser.",retryable:!1,fix:"rename the key without the NEXT_PUBLIC_ prefix, then vibe config secret <KEY>"},SERVICE_INIT_FAILED:{httpStatus:0,async:!0,messageTR:"Hizmet ba\u015Flat\u0131lamad\u0131.",messageEN:"The service could not be initialized.",retryable:!1,fix:"run the same init again: vibe db init --project <slug> (or auth init / storage init)"},SERVICE_NOT_INITIALIZED:{httpStatus:409,async:!1,messageTR:"Bu hizmet bu projede hen\xFCz ba\u015Flat\u0131lmad\u0131.",messageEN:"This service has not been initialized in this project yet.",retryable:!1,fix:"initialize it first: vibe db init (or auth init / storage init)"},SLUG_INVALID:{httpStatus:400,async:!1,messageTR:"Ad yaln\u0131zca k\xFC\xE7\xFCk harf, rakam ve tire i\xE7erebilir.",messageEN:"The name may contain only lowercase letters, digits and hyphens.",retryable:!1,fix:"vibe project create --name <slug: a-z0-9-, 3\u201340 chars>"},SLUG_RESERVED:{httpStatus:400,async:!1,messageTR:"Bu ad ayr\u0131lm\u0131\u015F.",messageEN:"This name is reserved.",retryable:!1,fix:"pick a slug that is not reserved: vibe project create --name <another-slug>, or rename the project to another slug"},SLUG_TAKEN:{httpStatus:409,async:!1,messageTR:"Bu ad zaten kullan\u0131l\u0131yor.",messageEN:"This name is already in use.",retryable:!1,fix:"vibe project create --name <another-slug>"},SUBSCRIPTION_CANCELLED:{httpStatus:409,async:!1,messageTR:"Bu projenin aboneli\u011Fi iptal edildi ya da sona erdi.",messageEN:"This project's subscription was cancelled or has ended.",retryable:!1,fix:"keep the current package until endsAt, or create a new project with the package you want"},SUBSCRIPTION_CARD_PER_PROJECT:{httpStatus:400,async:!1,messageTR:"Kart, her projenin aboneli\u011Finde ayr\u0131 tutulur; kart\u0131 projenin sat\u0131r\u0131ndan g\xFCncelleyin.",messageEN:"The card is held separately on each project's subscription; update it from the project's row.",retryable:!1,fix:"updateSubscriptionCard(projectId) for the project whose card should change"},SUBSCRIPTION_EXISTS:{httpStatus:409,async:!1,messageTR:"Bu projenin aboneli\u011Fi zaten var.",messageEN:"This project already has a subscription.",retryable:!1,fix:"open the project's billing row; nothing to pay"},SUBSCRIPTION_NOT_AT_PROVIDER:{httpStatus:409,async:!1,messageTR:"Bu projenin aboneli\u011Fi \xF6deme sa\u011Flay\u0131c\u0131s\u0131nda bulunamad\u0131; hi\xE7bir \u015Fey silinmedi veya iptal edilmedi.",messageEN:"This project's subscription was not found at the payment provider; nothing was deleted or cancelled.",retryable:!1,fix:"do not retry: contact support with the project id, the subscription record needs a manual check"},SUSPENDED:{httpStatus:402,async:!1,messageTR:"Hesab\u0131n\u0131z ask\u0131ya al\u0131nm\u0131\u015F.",messageEN:"Your account is suspended.",retryable:!1,fix:"open https://vibecloud.tr/contact"},TOGGLE_SUPERSEDED:{httpStatus:409,async:!1,messageTR:"Bu ayar de\u011Fi\u015Fikli\u011Finin yerine daha sonraki bir de\u011Fi\u015Fiklik uyguland\u0131.",messageEN:"A later change to this setting replaced this one.",retryable:!1,fix:"read the switch's current state; toggle again only if it is not what you want"},TOKEN_EXPIRED:{httpStatus:401,async:!1,messageTR:"Eri\u015Fim anahtar\u0131n\u0131z\u0131n s\xFCresi dolmu\u015F.",messageEN:"Your access token has expired.",retryable:!1,fix:"vibe login"},TOKEN_EXPIRY_INVALID:{httpStatus:400,async:!1,messageTR:"Eri\u015Fim anahtar\u0131 1 ile 90 g\xFCn aras\u0131nda ge\xE7erli olabilir ya da s\xFCresiz olabilir.",messageEN:"An access token is valid for 1 to 90 days, or has no expiry.",retryable:!1,fix:"vibe token create --expires-in-days 30"},TOKEN_REVOKED:{httpStatus:401,async:!1,messageTR:"Bu eri\u015Fim anahtar\u0131 iptal edilmi\u015F.",messageEN:"This access token has been revoked.",retryable:!1,fix:"vibe login"},TRIAL_ALREADY_USED:{httpStatus:403,async:!1,messageTR:"Deneme s\xFCresi bu hesap ya da vergi numaras\u0131 i\xE7in daha \xF6nce kullan\u0131ld\u0131; \xFCcretli bir paket se\xE7in.",messageEN:"The free trial has already been used for this account or tax number; choose a paid package.",retryable:!1,fix:"choose a paid package at https://vibecloud.tr/billing"},TRIAL_LIMIT:{httpStatus:403,async:!1,messageTR:"Deneme s\xFCr\xFCm\xFCnde bu i\u015Flem yap\u0131lamaz.",messageEN:"This action is not available on the trial.",retryable:!1,fix:"choose a package at https://vibecloud.tr/billing"},UNAUTHENTICATED:{httpStatus:401,async:!1,messageTR:"Oturumunuz do\u011Frulanamad\u0131.",messageEN:"Your session could not be verified.",retryable:!1,fix:"vibe login"},UNSUPPORTED_FRAMEWORK:{httpStatus:0,async:!0,messageTR:"Bu proje t\xFCr\xFC bu \xE7\u0131kt\u0131 modunda derlenemiyor.",messageEN:"This kind of project cannot be built in this output mode.",retryable:!1,fix:"a Vite SPA: vibe app config --project <slug> --output-mode static (rebuilds the current commit); an Express, Koa, hapi, NestJS, Fastify or Hono server: vibe app config --project <slug> --output-mode standalone; a Hono app: put @hono/node-server in dependencies, not devDependencies; TanStack Start: add nitro for standalone, or for static spa: { enabled: true, prerender: { outputPath: '/index.html' } }; React Router: standalone for SSR, static with ssr: false, and @react-router/serve in dependencies; SvelteKit: standalone with @sveltejs/adapter-node (Kit 2's adapter-auto also builds), static with @sveltejs/adapter-static; Astro: static with no adapter, standalone with @astrojs/node in dependencies and adapter: node({ mode: 'standalone' }); any other framework: read the build's failure message \u2014 it names what is not supported yet"},UNSUPPORTED_FRAMEWORK_VERSION:{httpStatus:0,async:!0,messageTR:"Bu framework s\xFCr\xFCm\xFC desteklenmiyor.",messageEN:"This framework version is not supported.",retryable:!1,fix:"set the framework dependency the failure message names (next, vite, express, koa, @hapi/hapi, @nestjs/core, fastify, hono, @hono/node-server, @tanstack/react-start, nitro, react-router, @react-router/dev, astro, @astrojs/node, nuxt, @sveltejs/kit or a @sveltejs/adapter-*) to a supported major in package.json and update the lockfile; a Go module: set go.mod's go line to a supported Go minor, with a patch no newer than the Go the failure message says the build uses (go mod edit -go=1.N.P); then vibe deploy start --project <slug>"},UNSUPPORTED_NATIVE_DEPENDENCY:{httpStatus:0,async:!0,messageTR:"Bu repo derleme s\u0131ras\u0131nda C++ derlemesi gerektiren bir paket bildiriyor, oysa derleme ortam\u0131 desteklemiyor.",messageEN:"This repository declares a package that needs a C++ compile during the build, which the build environment does not support.",retryable:!1,fix:"remove the dependency and use the project's PostgreSQL database instead (a database file on the container's disk is wiped on every deploy and restart anyway), commit, then vibe deploy start --project <slug>"},UNSUPPORTED_PHP:{httpStatus:0,async:!0,messageTR:"Projede PHP dosyas\u0131 var: platform PHP \xE7al\u0131\u015Ft\u0131rmaz. Derleme ad\u0131m\u0131 olmayan statik siteleri oldu\u011Fu gibi yay\u0131nlar. .php dosyalar\u0131n\u0131 kald\u0131r\u0131n ya da sitenin statik HTML \xE7\u0131kt\u0131s\u0131n\u0131 kullan\u0131n, sonra yeniden yay\u0131nlay\u0131n: klas\xF6r y\xFCklediyseniz yeniden y\xFCkleyin, Git'ten derleniyorsa de\u011Fi\u015Fikli\u011Fi g\xF6nderip yeni bir derleme ba\u015Flat\u0131n.",messageEN:"The project contains a PHP file: the platform does not run PHP. It publishes static sites with no build step as they are. Remove the .php files or use the site's static HTML output, then publish again: upload the folder again, or, if the app builds from git, commit the change and start a new deploy.",retryable:!1,fix:"remove the .php files or replace them with the site's static HTML output; an uploaded app: vibe deploy upload --dir <folder> --project <slug>; a git app: commit and push the change, or run vibe deploy start --project <slug>"},UNSUPPORTED_PROJECT_LAYOUT:{httpStatus:0,async:!0,messageTR:"Bu projenin yap\u0131s\u0131 desteklenmiyor: platform repo k\xF6k\xFCndeki tek bir HTTP sunucusu uygulamas\u0131n\u0131 derler.",messageEN:"This project's layout is not supported: the platform builds a single HTTP server app at the repository root.",retryable:!1,fix:"read the build's failure message \u2014 it names the cause: a NestJS monorepo (monorepo: true in nest-cli.json / .nest-cli.json) \u2192 move the app you deploy into its own repository with its package.json at the root; a nest-cli.json / .nest-cli.json with a projects map but no monorepo flag \u2192 the same, or remove projects; a config that is a symlink or a directory, over 1 MiB, or not valid JSON \u2192 commit it as a regular, valid JSON file under 1 MiB at the repository root (the Nest CLI reads the same file); nest build -c / --config (also glued or clustered, -capps.json, -pc x) \u2192 drop the flag and keep the configuration in nest-cli.json; no HTTP adapter \u2192 add @nestjs/platform-express or @nestjs/platform-fastify to dependencies and update the lockfile; commit, then vibe deploy start --project <slug>"},UNSUPPORTED_START_COMMAND:{httpStatus:0,async:!0,messageTR:"Uygulaman\u0131n ba\u015Flatma komutu desteklenmiyor: package.json `scripts.start` (NestJS'te `scripts.start:prod`) derlenmi\u015F bir dosyay\u0131 `node <dosya>` ile (React Router'da `react-router-serve build/server/index.js` ile) \xE7al\u0131\u015Ft\u0131rmal\u0131.",messageEN:"The app's start command is not supported: package.json `scripts.start` (`scripts.start:prod` for NestJS) must run a built file with `node <file>` (with `react-router-serve build/server/index.js` for React Router).",retryable:!1,fix:'set scripts.start to node <compiled file> (compile TypeScript in scripts.build; a NestJS app: scripts["start:prod"] = node dist/main and scripts.build = nest build; TanStack Start: node .output/server/index.mjs; React Router: react-router-serve ./build/server/index.js), commit, then vibe deploy start --project <slug>'}};function lookup(code){return Object.prototype.hasOwnProperty.call(ERRCODES,code)?ERRCODES[code]:void 0}function isRetryable(code){return lookup(code)?.retryable===!0}import{randomBytes}from"node:crypto";var current="tr";function selectLang(env){let explicit=env.VIBE_LANG;if(explicit==="en"||explicit==="tr")return current=explicit,current;let locale2=[env.LC_ALL,env.LC_MESSAGES,env.LANG].find(v=>v!==void 0&&v!=="");return current=locale2!==void 0&&/^en([_.-]|$)/i.test(locale2)?"en":"tr",current}function lang(){return current}var machine=!1;function setMachineOutput(on){machine=on}function machineOutput(){return machine}var M={"help.usage":{tr:"KULLANIM",en:"USAGE"},"help.flags":{tr:"BAYRAKLAR",en:"FLAGS"},"help.globalFlags":{tr:"GENEL BAYRAKLAR",en:"GLOBAL FLAGS"},"help.examples":{tr:"\xD6RNEKLER",en:"EXAMPLES"},"help.commands":{tr:"KOMUTLAR",en:"COMMANDS"},"help.learnMore":{tr:"DAHA FAZLA",en:"LEARN MORE"},"help.default":{tr:"varsay\u0131lan",en:"default"},"help.moreHelp":{tr:"Bir komutun ayr\u0131nt\u0131lar\u0131 i\xE7in: vibe <komut> --help",en:"For details on a command: vibe <command> --help"},"help.tagline":{tr:"T\xFCrkiye\u2019de bar\u0131nd\u0131r\u0131lan veritaban\u0131 ve uygulama platformu",en:"Database and app platform hosted in T\xFCrkiye"},"help.refusals":{tr:"KONSOLDAN YAPILIR (komut nedenini yazar)",en:"DONE IN THE CONSOLE (the command says why)"},"help.flag.help":{tr:"Bu yard\u0131m\u0131 g\xF6sterir",en:"Show this help"},"help.flag.json":{tr:"\xC7\u0131kt\u0131y\u0131 JSON olarak yazar",en:"Write the output as JSON"},"help.flag.noInput":{tr:"Hi\xE7bir soru sormaz",en:"Never prompt"},"help.flag.noColor":{tr:"Renkleri kapat\u0131r",en:"Turn colors off"},"help.flag.quiet":{tr:"Yaln\u0131zca sonucu yazar",en:"Print only the result"},"help.flag.verbose":{tr:"Ayr\u0131nt\u0131l\u0131 tan\u0131lama \xE7\u0131kt\u0131s\u0131",en:"Detailed diagnostic output"},"err.unknownCommand":{tr:'"{name}" bir vibe komutu de\u011Fil.',en:'"{name}" is not a vibe command.'},"err.unknownSubcommand":{tr:'"{name}", "vibe {topic}" alt\u0131nda bir komut de\u011Fil.',en:'"{name}" is not a "vibe {topic}" command.'},"err.didYouMean":{tr:"Bunu mu demek istediniz?",en:"Did you mean?"},"err.seeHelp":{tr:"Komutlar\u0131n listesi i\xE7in: vibe --help",en:"For the list of commands: vibe --help"},"err.seeCommandHelp":{tr:"Kullan\u0131m\u0131 i\xE7in: vibe {name} --help",en:"For its usage: vibe {name} --help"},"err.unknownFlag":{tr:'{flag} bayra\u011F\u0131 "vibe {name}" i\xE7in tan\u0131ml\u0131 de\u011Fil.',en:'{flag} is not a flag of "vibe {name}".'},"err.missingValue":{tr:"{flag} bir de\u011Fer ister.",en:"{flag} needs a value."},"err.noValue":{tr:"{flag} de\u011Fer almaz.",en:"{flag} takes no value."},"err.singleDash":{tr:"{arg} tan\u0131nmad\u0131: uzun bayraklar iki tire ile yaz\u0131l\u0131r, {fixed} gibi.",en:"{arg} was not recognized: long flags take two dashes, as in {fixed}."},"err.badFlags":{tr:"Bayraklar okunamad\u0131: {detail}",en:"Could not read the flags: {detail}"},"err.helpExtra":{tr:'"vibe help {name}" fazladan kelime ald\u0131: {extra}',en:'"vibe help {name}" got extra words: {extra}'},"err.needsSubcommand":{tr:'"vibe {topic}" bir alt komut ister.',en:'"vibe {topic}" needs a subcommand.'},"help.exitCodes":{tr:"\xC7IKI\u015E KODLARI",en:"EXIT CODES"},"help.exit.ok":{tr:"Ba\u015Far\u0131l\u0131",en:"Success"},"help.exit.failure":{tr:"\u0130\u015Flem ba\u015Far\u0131s\u0131z oldu",en:"The operation failed"},"help.exit.usage":{tr:"Komut veya bayrak yanl\u0131\u015F yaz\u0131ld\u0131",en:"The command or a flag was mistyped"},"help.exit.auth":{tr:"Giri\u015F gerekiyor: vibe login",en:"Login required: vibe login"},"help.exit.cancelled":{tr:"Kullan\u0131c\u0131 iptal etti (Ctrl-C)",en:"Cancelled by the user (Ctrl-C)"},"err.code":{tr:"Kod",en:"Code"},"err.cancelled":{tr:"\u0130ptal edildi.",en:"Cancelled."},"table.empty":{tr:"G\xF6sterilecek kay\u0131t yok.",en:"Nothing to show."}};function fill(owner,key,entry,vars){return entry[current].replace(/\{([a-zA-Z]+)\}/g,(_whole,name)=>{let v=vars[name];if(v===void 0)throw new Error(`i18n: ${owner}.${key} needs {${name}}`);return typeof v=="number"?String(v):v})}function t(key,vars={}){return fill("kernel",key,M[key],vars)}var CATALOGUES=[{owner:"kernel",entries:M}];function catalogue(owner,entries3){return CATALOGUES.push({owner,entries:entries3}),(key,vars={})=>fill(owner,key,entries3[key],vars)}function upper(s){return s.toLocaleUpperCase(current==="tr"?"tr-TR":"en-US")}var m=catalogue("http",{tooLarge:{tr:"{what} \xE7ok b\xFCy\xFCk ({limit} bayt s\u0131n\u0131r\u0131n\u0131 a\u015Ft\u0131); okuma durduruldu.",en:"The {what} is too large (over {limit} bytes); reading stopped."},unreadable:{tr:"{what} okunamad\u0131: {detail}",en:"Could not read the {what}: {detail}"},notJson:{tr:"ge\xE7erli JSON de\u011Fil ({bytes} bayt)",en:"not valid JSON ({bytes} bytes)"}}),BodyTooLargeError=class extends Error{limitBytes;constructor(what,limitBytes){super(m("tooLarge",{what,limit:limitBytes})),this.name="BodyTooLargeError",this.limitBytes=limitBytes}};async function readCappedBody(res,limitBytes,what){if(res.body===null)return"";let reader=res.body.getReader(),chunks=[],total=0;for(;;){let chunk=await readChunk(reader,what);if(chunk===void 0)break;if(total+=chunk.byteLength,total>limitBytes)throw await reader.cancel(),new BodyTooLargeError(what,limitBytes);chunks.push(chunk)}let joined=new Uint8Array(total),at=0;for(let chunk of chunks)joined.set(chunk,at),at+=chunk.byteLength;return new TextDecoder("utf-8").decode(joined)}async function readChunk(reader,what){try{let{done,value}=await reader.read();return done?void 0:value}catch(cause){throw new Error(m("unreadable",{what,detail:describeCause(cause)}),{cause})}}function withTimeout(signal,ms2){return AbortSignal.any([signal,AbortSignal.timeout(ms2)])}function isAbortError(err){return err instanceof Error&&err.name==="AbortError"}function describeJSONFailure(body){return m("notJson",{bytes:Buffer.byteLength(body,"utf8")})}function describeCause(err){if(err instanceof Error){let{cause}=err;return cause instanceof Error&&err.message==="fetch failed"?cause.message:err.message}return String(err)}function userAgent(env){let agent=detectEditor(env);return`vibecloud-cli/0.6.2 (${agent===""?"none":agent})`}var processUserAgent;function processAgent(){return processUserAgent===void 0&&(processUserAgent=userAgent(process.env)),processUserAgent}function detectEditor(env){if(env.CLAUDECODE!==void 0&&env.CLAUDECODE!=="")return"claude-code";if(env.CURSOR_TRACE_ID!==void 0&&env.CURSOR_TRACE_ID!=="")return"cursor";if(env.TERM_PROGRAM==="vscode"){let askpass=env.VSCODE_GIT_ASKPASS_MAIN===void 0?"":env.VSCODE_GIT_ASKPASS_MAIN;return/cursor/i.test(askpass)?"cursor":/windsurf/i.test(askpass)?"windsurf":"vscode"}return""}var m2=catalogue("client.transport",{noApi:{tr:"API adresi ayarlanmam\u0131\u015F. VIBECLOUD_API de\u011Fi\u015Fkenini ya da ayar dosyas\u0131n\u0131 kontrol edin.",en:"The API address is not set. Check VIBECLOUD_API or the settings file."},unreachable:{tr:"Sunucuya ula\u015F\u0131lamad\u0131; ba\u011Flant\u0131n\u0131z\u0131 kontrol edin.",en:"Could not reach the server; check your connection."},unreadable:{tr:"Yan\u0131t okunamad\u0131: {detail}",en:"Could not read the response: {detail}"},unparsable:{tr:"Yan\u0131t \xE7\xF6z\xFCmlenemedi: {detail}",en:"Could not parse the response: {detail}"},bodyWhat:{tr:"API yan\u0131t\u0131",en:"API response"},serverError:{tr:"Sunucu hatas\u0131 (HTTP {status}).",en:"Server error (HTTP {status})."},cancelled:{tr:"\u0130stek iptal edildi.",en:"The request was cancelled."},cancelledDetail:{tr:"\u0130stek iptal edildi: {detail}",en:"The request was cancelled: {detail}"}}),DEFAULT_TIMEOUT_MS=3e4,MAX_RESPONSE_BYTES=8<<20;function isRetryable2(resp){return resp.retryable}async function request(signal,target,method,path,body,extra){if(target.endpoint==="")return{response:void 0,error:new Error(`INTERNAL: ${m2("noApi")}`)};let headers2=new Headers;if(headers2.set("Accept","application/json"),body!==void 0&&headers2.set("Content-Type","application/json"),extra!==void 0)for(let[name,value]of extra)headers2.set(name,value);target.token!==""&&headers2.set("Authorization",`Bearer ${target.token}`),headers2.set("User-Agent",processAgent());let url=joinURL(target.endpoint,path),init={method,headers:headers2,signal:withTimeout(signal,DEFAULT_TIMEOUT_MS),redirect:headers2.has("Vibecloud-Otp")?"error":"follow"};body!==void 0&&(init.body=body);let res;try{res=await fetch(url,init)}catch(cause){return signal.aborted?{response:void 0,error:abortError(cause)}:{response:{data:void 0,errorCode:"CELL_UNREACHABLE",messageTR:m2("unreachable"),fix:"",details:{},retryable:!0,statusCode:0,raw:""},error:new Error(`CELL_UNREACHABLE: ${describeCause(cause)}`,{cause})}}let raw;try{raw=await readCappedBody(res,MAX_RESPONSE_BYTES,m2("bodyWhat"))}catch(cause){return signal.aborted?{response:void 0,error:abortError(cause)}:{response:void 0,error:new Error(`INTERNAL: ${m2("unreadable",{detail:describeCause(cause)})}`,{cause})}}if(res.status>=400){let response=decodeError(raw,res.status);return{response,error:new Error(`${response.errorCode}: ${response.messageTR}`)}}let data;if(raw.length>0)try{data=JSON.parse(raw)}catch(cause){return{response:void 0,error:new Error(`INTERNAL: ${m2("unparsable",{detail:describeJSONFailure(raw)})}`,{cause})}}return{response:{data,errorCode:"",messageTR:"",retryable:!1,fix:"",details:{},statusCode:res.status,raw},error:void 0}}function abortError(cause){return isAbortError(cause)?new Error(m2("cancelled"),{cause}):new Error(m2("cancelledDetail",{detail:describeCause(cause)}),{cause})}function decodeError(raw,statusCode){let wire=parseErrorBody(raw);if(wire!==void 0){let errorCode2=wire.code,messageTR=wire.message;messageTR===""&&(messageTR=wire.outerMessage);let record3=lookup(errorCode2),retryable=record3===void 0?wire.retryable:record3.retryable,fix=wire.fix;return fix===void 0&&(fix=record3===void 0?"":record3.fix),{data:void 0,errorCode:errorCode2,messageTR,retryable,fix,details:wire.details,statusCode,raw}}let errorCode=codeForStatus(statusCode),record2=lookup(errorCode);return{data:void 0,errorCode,messageTR:m2("serverError",{status:statusCode}),retryable:record2!==void 0&&record2.retryable,fix:record2===void 0?"":record2.fix,details:{},statusCode,raw}}function parseErrorBody(raw){let parsed;try{parsed=JSON.parse(raw)}catch{return}if(!isRecord(parsed))return;let errors=parsed.errors;if(!Array.isArray(errors)||errors.length===0)return;let first=errors[0];if(!isRecord(first))return;let extensions=isRecord(first.extensions)?first.extensions:{};return{code:readString(extensions.code),message:readString(extensions.message),fix:readOptionalString(extensions.fix),details:readDetails(extensions.details),retryable:extensions.retryable===!0,outerMessage:readString(first.message)}}function isRecord(value){return typeof value=="object"&&value!==null&&!Array.isArray(value)}function readDetails(value){return isRecord(value)?value:{}}function readString(value){return typeof value=="string"?value:""}function readOptionalString(value){return typeof value=="string"?value:void 0}function joinURL(endpoint,path){let base=endpoint.endsWith("/")?endpoint.slice(0,-1):endpoint,trimmed=path.startsWith("/")?path.slice(1):path;return trimmed===""?base:`${base}/${trimmed}`}function codeForStatus(status2){return status2===401?"UNAUTHENTICATED":status2===403?"FORBIDDEN_ROLE":status2===404?"NOT_FOUND":status2===429?"RATE_LIMITED":(status2>=500,"INTERNAL")}var m3=catalogue("client.retry",{waitCancelled:{tr:"Bekleme iptal edildi.",en:"The wait was cancelled."},cancelled:{tr:"\u0130stek iptal edildi.",en:"The request was cancelled."},unclassified:{tr:"s\u0131n\u0131fland\u0131r\u0131lamayan bir hata",en:"an unclassified error"},gaveUp:{tr:"{attempts} denemeden sonra vazge\xE7ildi: {detail}",en:"Gave up after {attempts} attempts: {detail}"}});function defaultRetryPolicy(){return{maxRetries:3,baseBackoffMs:1e3,maxBackoffMs:3e4}}function backoffMs(policy,attempt){let grown=policy.baseBackoffMs*2**attempt;return Math.min(grown,policy.maxBackoffMs)}async function delay(signal,ms2){return signal.aborted?new Error(m3("waitCancelled")):new Promise(resolve5=>{let timer=setTimeout(()=>{signal.removeEventListener("abort",onAbort),resolve5(void 0)},ms2);function onAbort(){clearTimeout(timer),resolve5(new Error(m3("waitCancelled")))}signal.addEventListener("abort",onAbort,{once:!0})})}async function retry(signal,policy,fn){let lastError,lastCoded;for(let i2=0;i2<=policy.maxRetries;i2++){if(i2>0){let aborted=await delay(signal,backoffMs(policy,i2-1));if(aborted!==void 0)return{response:void 0,error:aborted}}else if(signal.aborted)return{response:void 0,error:new Error(m3("cancelled"))};let{response,error}=await fn();if(response===void 0){lastError=error,lastCoded=void 0;continue}if(response.errorCode!==""){let failure=failureOf(response);if(!isRetryable2(response))return{response,error:failure};lastError=failure,lastCoded=response;continue}if(error!==void 0){lastError=error,lastCoded=void 0;continue}return{response,error:void 0}}let attempts=policy.maxRetries+1,detail2=lastError===void 0?m3("unclassified"):lastError.message;return{response:lastCoded,error:new Error(m3("gaveUp",{attempts,detail:detail2}),{cause:lastError})}}function failureOf(response){return new Error(`${response.errorCode}: ${response.messageTR}`)}function apiMessage(code,wire){let record2=code===""?void 0:lookup(code);return machineOutput()||lang()==="en"?wire!==""||record2===void 0?wire:record2.messageEN:record2!==void 0&&record2.messageTR!==""?record2.messageTR:wire}var m4=catalogue("client.graphql",{noKind:{tr:"clientMutationId: i\u015Flem ad\u0131 gerekli",en:"clientMutationId: the action name is required"},noMutationId:{tr:"mutation: clientMutationId gerekli",en:"mutation: clientMutationId is required"},noQuery:{tr:"sorgu gerekli",en:"the query is required"},noPolicy:{tr:"yeniden deneme politikas\u0131 ayarlanmam\u0131\u015F",en:"no retry policy is set"},encode:{tr:"Sorgu haz\u0131rlanamad\u0131: {detail}",en:"Could not prepare the query: {detail}"},nothing:{tr:"Yeniden deneme d\xF6ng\xFCs\xFC ne yan\u0131t ne hata d\xF6nd\xFCrd\xFC.",en:"The retry loop returned neither a response nor an error."},empty:{tr:"API bo\u015F bir yan\u0131t d\xF6nd\xFCrd\xFC.",en:"The API returned an empty response."},noTransport:{tr:"Ta\u015F\u0131ma katman\u0131 ne yan\u0131t ne hata d\xF6nd\xFCrd\xFC.",en:"The transport returned neither a response nor an error."},unparsable:{tr:"Yan\u0131t \xE7\xF6z\xFCmlenemedi: {detail}",en:"Could not parse the response: {detail}"}}),CSRF_HEADER="X-Client-Mutation-Id",OTP_HEADER="Vibecloud-Otp",APIError=class extends Error{code;messageTR;retryable;fix;details;constructor(code,messageTR,retryable,fix,details2){super(messageTR===""?code:`${code}: ${messageTR}`),this.name="APIError",this.code=code,this.messageTR=messageTR,this.retryable=retryable,this.fix=fix,this.details=details2}};function codeOf(err){let at=err;for(let depth=0;depth<8&&at instanceof Error;depth++){if(at instanceof APIError)return at.code;at=at.cause}return""}function fixOf(err){let at=err;for(let depth=0;depth<8&&at instanceof Error;depth++){if(at instanceof APIError)return at.fix;at=at.cause}return""}function detailsOf(err){let at=err;for(let depth=0;depth<8&&at instanceof Error;depth++){if(at instanceof APIError)return at.details;at=at.cause}return{}}function newMutationID(kind){if(kind==="")throw new Error(m4("noKind"));return`${kind}-${randomBytes(12).toString("hex")}`}async function query(signal,executor,document,vars){return execute(signal,executor,newMutationID("query"),document,vars)}async function mutate(signal,executor,mutationID,document,vars){if(mutationID==="")throw new Error(m4("noMutationId"));return execute(signal,executor,mutationID,document,vars)}async function mutateDangerous(signal,executor,mutationID,document,vars,otp){if(mutationID==="")throw new Error(m4("noMutationId"));return execute(signal,{endpoint:executor.endpoint,token:executor.token,retry:{maxRetries:0,baseBackoffMs:1,maxBackoffMs:1}},mutationID,document,vars,otp===""?new Map:new Map([[OTP_HEADER,otp]]))}async function execute(signal,executor,mutationID,document,vars,extra=new Map){if(document==="")throw new Error(m4("noQuery"));let policy=executor.retry;if(policy===void 0)throw new Error(m4("noPolicy"));let body;try{body=JSON.stringify(vars===void 0?{query:document}:{query:document,variables:vars})}catch(cause){throw new Error(`INTERNAL: ${m4("encode",{detail:cause instanceof Error?cause.message:String(cause)})}`,{cause})}let headers2=new Map([[CSRF_HEADER,mutationID],...extra]),{response,error}=await retry(signal,policy,()=>postGraphQL(signal,executor,body,headers2));if(error!==void 0)throw response!==void 0&&response.errorCode!==""?new APIError(response.errorCode,response.messageTR,response.retryable,response.fix,response.details):error;if(response===void 0)throw new Error(`INTERNAL: ${m4("nothing")}`);let payload=response.data;if(payload==null)throw new Error(`INTERNAL: ${m4("empty")}`);return payload}async function postGraphQL(signal,target,body,headers2){let attempt=await request(signal,target,"POST","",body,headers2);if(attempt.error!==void 0)return attempt;let response=attempt.response;if(response===void 0)return{response:void 0,error:new Error(`INTERNAL: ${m4("noTransport")}`)};let decoded;try{decoded=JSON.parse(response.raw)}catch(cause){return{response:{data:void 0,errorCode:"INTERNAL",messageTR:`API yaniti cozumlenemedi (HTTP ${response.statusCode})`,retryable:isRetryable("INTERNAL"),fix:"",details:{},statusCode:response.statusCode,raw:""},error:new Error(`INTERNAL: ${m4("unparsable",{detail:describeJSONFailure(response.raw)})}`,{cause})}}let errors=readErrors(decoded);if(errors.length>0){let first=errors[0];if(first!==void 0){let classified=applyGraphQLError(first,response.statusCode,response.raw);return{response:classified,error:new Error(`${classified.errorCode}: ${classified.messageTR}`)}}}return{response:{...response,data:readData(decoded)},error:void 0}}function applyGraphQLError(err,statusCode,raw){let errorCode=err.code,wire=err.extensionMessage;wire===""&&(wire=err.message),errorCode===""&&(errorCode="INTERNAL");let record2=lookup(errorCode),messageTR=apiMessage(errorCode,wire);if(record2!==void 0){let fix=err.fix===void 0?record2.fix:err.fix;return{data:void 0,errorCode,messageTR,retryable:record2.retryable,fix,details:err.details,statusCode,raw}}return messageTR===""&&(messageTR=`API hatasi (${errorCode})`),{data:void 0,errorCode,messageTR,retryable:err.retryable,fix:err.fix===void 0?"":err.fix,details:err.details,statusCode,raw}}function readErrors(decoded){if(!isRecord2(decoded))return[];let errors=decoded.errors;if(!Array.isArray(errors))return[];let out=[];for(let entry of errors){if(!isRecord2(entry)){out.push({message:"",code:"",extensionMessage:"",retryable:!1,fix:void 0,details:{}});continue}let extensions=isRecord2(entry.extensions)?entry.extensions:{};out.push({message:readString2(entry.message),code:readString2(extensions.code),extensionMessage:readString2(extensions.message),retryable:extensions.retryable===!0,fix:readOptionalString(extensions.fix),details:readDetails(extensions.details)})}return out}function readData(decoded){if(isRecord2(decoded))return decoded.data}function isRecord2(value){return typeof value=="object"&&value!==null&&!Array.isArray(value)}function readString2(value){return typeof value=="string"?value:""}import{parseArgs}from"node:util";import{mkdirSync,readFileSync,writeFileSync}from"node:fs";import{dirname,join}from"node:path";var LocalError=class extends Error{fix;constructor(message2,fix,options){super(message2,options),this.name="LocalError",this.fix=fix}};function localFixOf(err){let at=err;for(let depth=0;depth<8&&at instanceof Error;depth++){if(at instanceof LocalError)return at.fix;at=at.cause}return""}var m5=catalogue("linked",{unreadable:{tr:"{file} okunamad\u0131: {detail}",en:"Could not read {file}: {detail}"},malformed:{tr:'{file} ge\xE7erli bir ba\u011Flant\u0131 dosyas\u0131 de\u011Fil: "org" ve "project" alanlar\u0131 dolu olmal\u0131.',en:'{file} is not a valid link file: "org" and "project" must both be set.'},noProject:{tr:"Hangi proje oldu\u011Fu belirtilmedi: --project <ad> verin ya da bu dizini vibe init ile bir projeye ba\u011Flay\u0131n.",en:"No project given: pass --project <name>, or link this directory to a project with vibe init."},droppedByEnv:{tr:"Bu dizin {file} ile {org}/{project} projesine ba\u011Fl\u0131, ama VIBECLOUD_ORG ba\u015Fka bir organizasyonu ({env}) g\xF6steriyor; bu y\xFCzden ba\u011Flant\u0131 kullan\u0131lmad\u0131.",en:"This directory is linked to {org}/{project} ({file}), but VIBECLOUD_ORG names another organization ({env}), so the link was not used."},droppedByEnvFix:{tr:"--org {org} --project {project} verin ya da VIBECLOUD_ORG\u2019u kald\u0131r\u0131n",en:"pass --org {org} --project {project}, or unset VIBECLOUD_ORG"},droppedByFlag:{tr:"Bu dizin {org}/{project} projesine ba\u011Fl\u0131; --org {typed} verildi\u011Fi i\xE7in ba\u011Flant\u0131 kullan\u0131lmad\u0131.",en:"This directory is linked to {org}/{project}; the link was not used because --org {typed} was given."},droppedByFlagFix:{tr:"--org {typed} ile birlikte --project <ad> verin",en:"pass --project <name> together with --org {typed}"},noProjectFix:{tr:"--project <ad> verin ya da vibe init \xE7al\u0131\u015Ft\u0131r\u0131n",en:"pass --project <name>, or run vibe init"}}),LINK_DIR=".vibe",LINK_FILE="project.json";function findLinked(cwd){let dir=cwd;for(;;){let file=join(dir,LINK_DIR,LINK_FILE),text2;try{text2=readFileSync(file,"utf8")}catch(cause){if(!isMissing(cause))throw new Error(`INTERNAL: ${m5("unreadable",{file,detail:describe(cause)})}`,{cause})}if(text2!==void 0)return parseLinked(file,text2);let parent=dirname(dir);if(parent===dir)return;dir=parent}}function parseLinked(file,text2){let doc;try{doc=JSON.parse(text2)}catch(cause){throw new Error(`INTERNAL: ${m5("unreadable",{file,detail:describe(cause)})}`,{cause})}if(typeof doc!="object"||doc===null)throw new Error(`INTERNAL: ${m5("malformed",{file})}`);let{org,project:project2}=doc;if(typeof org!="string"||org===""||typeof project2!="string"||project2==="")throw new Error(`INTERNAL: ${m5("malformed",{file})}`);return{org,project:project2,file}}function writeLinked(dir,org,project2){let file=join(dir,LINK_DIR,LINK_FILE);return mkdirSync(join(dir,LINK_DIR),{recursive:!0}),writeFileSync(file,`${JSON.stringify({org,project:project2},null,2)}
|
|
2
2
|
`,{mode:420}),file}var dropped=new WeakMap;function noteDroppedLink(flags,info){dropped.set(flags,info)}function requireProject(flags){let project2=str(flags,"project");if(project2!=="")return project2;let why=dropped.get(flags);if(why===void 0)throw new LocalError(`SLUG_INVALID: ${m5("noProject")}`,m5("noProjectFix"));let{org,project:linkedProject,file}=why.link;throw why.because==="org-env"?new LocalError(`SLUG_INVALID: ${m5("droppedByEnv",{file,org,project:linkedProject,env:why.org})}`,m5("droppedByEnvFix",{org,project:linkedProject})):new LocalError(`SLUG_INVALID: ${m5("droppedByFlag",{org,project:linkedProject,typed:why.org})}`,m5("droppedByFlagFix",{typed:why.org}))}function isMissing(cause){return cause instanceof Error&&"code"in cause&&(cause.code==="ENOENT"||cause.code==="ENOTDIR")}function describe(err){return err instanceof Error?err.message:String(err)}var GROUPS=[{key:"start",tr:"BA\u015ELARKEN",en:"GETTING STARTED",topics:["init","login","logout","whoami","version"]},{key:"project",tr:"PROJE",en:"PROJECT",topics:["project","usage","db","auth","storage","rls","smtp","branch","backups","restore","transfer"]},{key:"deploy",tr:"YAYIN",en:"DEPLOY",topics:["app","deploy","config","logs"]},{key:"domains",tr:"ALAN ADLARI VE DNS",en:"DOMAINS AND DNS",topics:["domain","zone","record"]},{key:"account",tr:"HESAP VE ER\u0130\u015E\u0130M",en:"ACCOUNT AND ACCESS",topics:["org","team","access","token","key","mfa","billing","export"]},{key:"editor",tr:"ED\u0130T\xD6R",en:"EDITOR",topics:["mcp"]},{key:"migrate",tr:"TA\u015EIMA",en:"MIGRATE",topics:["migrate"]}];function topicGroup(topic){let g=GROUPS.find(group=>group.topics.includes(topic));if(g===void 0)throw new Error(`help: topic "${topic}" is in no help group; add it to GROUPS in groups.ts`);return g}function commandName(spec){return spec.path.join(" ")}var wrap=(open,close)=>s=>`\x1B[${open}m${s}\x1B[${close}m`,ANSI={bold:wrap(1,22),dim:wrap(2,22),green:wrap(32,39),red:wrap(31,39),yellow:wrap(33,39),cyan:wrap(36,39),underline:wrap(4,24)},id=s=>s,PLAIN={bold:id,dim:id,green:id,red:id,yellow:id,cyan:id,underline:id};function style(color){return color?ANSI:PLAIN}var MARK={ok:"\u2713",fail:"\u2717",warn:"!",hint:"\u203A",item:"\u2022",step:"\u25C7"};function stripAnsi(s){return s.replace(/\u001b\[[0-9;]*m/g,"")}function visibleWidth(s){return[...stripAnsi(s)].length}function padEndVisible(s,width){let pad2=width-visibleWidth(s);return pad2>0?s+" ".repeat(pad2):s}var DOCS="https://vibecloud.tr/docs/cli",TOPIC_SUMMARY={project:"Projeleri olu\u015Fturur, listeler ve durumlar\u0131n\u0131 g\xF6sterir",db:"Veritaban\u0131n\u0131 ba\u015Flat\u0131r, ba\u011Flant\u0131 bilgilerini ve \u015Femas\u0131n\u0131 g\xF6sterir",auth:"Kimlik do\u011Frulama servisini ba\u015Flat\u0131r",storage:"Depolama servisini ba\u015Flat\u0131r",branch:"\xD6nizleme branch\u2019lerini y\xF6netir",app:"Uygulamalar\u0131 listeler, olu\u015Fturur ve ayarlar",deploy:"Yay\u0131n ba\u015Flat\u0131r, y\xFCkler, iptal eder ve geri al\u0131r",domain:"Alan adlar\u0131n\u0131 ekler, do\u011Frular ve y\xF6netir",config:"Ortam de\u011Fi\u015Fkenlerini ve gizli de\u011Ferleri y\xF6netir",token:"Eri\u015Fim anahtarlar\u0131n\u0131 olu\u015Fturur, listeler ve iptal eder",team:"Organizasyonun \xFCyelerini g\xF6sterir, davet eder ve y\xF6netir",mcp:"MCP sunucusunu edit\xF6rlere ekler ve \xE7\u0131kar\u0131r",migrate:"Ba\u015Fka bir platformdaki projeyi buraya ta\u015F\u0131r",zone:"DNS b\xF6lgelerini ekler, do\u011Frular ve kald\u0131r\u0131r",record:"Bir DNS b\xF6lgesinin kay\u0131tlar\u0131n\u0131 listeler, ekler ve siler",key:"Projenin anahtarlar\u0131n\u0131 g\xF6sterir ve yeniler",access:"Bir \xFCyenin projeye yazma iznini verir ve kald\u0131r\u0131r",smtp:"Projenin e-postalar\u0131n\u0131 g\xF6nderen sunucuyu ayarlar",rls:"Sat\u0131r d\xFCzeyi g\xFCvenli\u011Fin zorlanmas\u0131n\u0131 ve istisnalar\u0131n\u0131 y\xF6netir",billing:"Projenin aboneli\u011Fini y\xF6netir",mfa:"\u0130ki ad\u0131ml\u0131 do\u011Frulamay\u0131 y\xF6netir",export:"Veri d\u0131\u015Fa aktar\u0131mlar\u0131n\u0131 indirir",transfer:"Projeleri kurulu\u015Flar aras\u0131nda devreder: istek, kabul, ret, geri \xE7ekme"},GLOBAL_FLAGS=[{flag:"-h, --help",key:"help.flag.help"},{flag:" --json",key:"help.flag.json"},{flag:" --no-input",key:"help.flag.noInput"},{flag:" --no-color",key:"help.flag.noColor"},{flag:"-q, --quiet",key:"help.flag.quiet"},{flag:" --verbose",key:"help.flag.verbose"}];function heading(out,text2){out.print(out.outStyle.bold(text2))}function listed(commands){return commands.filter(c2=>c2.listed&&c2.kind==="runs")}function printRootHelp(out,commands){out.print(`vibe \u2014 ${t("help.tagline")}`),out.print(""),heading(out,t("help.usage")),out.print(` vibe <${lang()==="en"?"command":"komut"}> [${lang()==="en"?"flags":"bayraklar"}]`);let runs=listed(commands),entries3=[];for(let c2 of runs){let topic=c2.path[0];if(c2.path.length===1)entries3.push({name:topic,summary:c2.summary});else if(!entries3.some(e=>e.name===topic)){let summary=TOPIC_SUMMARY[topic];if(summary===void 0)throw new Error(`help: topic "${topic}" has no TOPIC_SUMMARY entry in help.ts`);entries3.push({name:topic,summary})}}let refusals=commands.filter(c2=>c2.listed&&c2.kind==="refuses"),width=Math.max(...entries3.map(e=>e.name.length),...refusals.map(c2=>commandName(c2).length))+2;for(let e of entries3)topicGroup(e.name);for(let g of GROUPS){let inGroup=entries3.filter(e=>g.topics.includes(e.name));if(inGroup.length!==0){out.print(""),heading(out,g[lang()]);for(let e of inGroup)out.print(` ${padEndVisible(e.name,width)}${e.summary}`)}}if(refusals.length>0){out.print(""),heading(out,t("help.refusals"));for(let c2 of refusals)out.print(` ${padEndVisible(commandName(c2),width)}${c2.summary}`)}printGlobalFlags(out),out.print(""),out.print(t("help.moreHelp")),out.print(`${DOCS}`)}function printTopicHelp(out,topic,commands){let subs=commands.filter(c2=>c2.path[0]===topic&&c2.path.length===2&&c2.listed);heading(out,t("help.usage")),out.print(` vibe ${topic} <${lang()==="en"?"command":"komut"}> [${lang()==="en"?"flags":"bayraklar"}]`),out.print(""),heading(out,t("help.commands"));let names=subs.map(c2=>c2.path.slice(1).join(" ")),width=Math.max(...names.map(n3=>n3.length))+2;subs.forEach((c2,i2)=>out.print(` ${padEndVisible(names[i2],width)}${c2.summary}`)),printGlobalFlags(out),out.print(""),out.print(t("help.moreHelp"))}function printCommandHelp(out,spec){out.print(spec.description===void 0?spec.summary:spec.description),spec.note!==void 0&&out.print(spec.note),out.print(""),heading(out,t("help.usage")),out.print(` ${usageLine(spec)}`);let visible=spec.flags.filter(shown);if(visible.length>0){out.print(""),heading(out,t("help.flags"));let cells=visible.map(f=>[flagCell(f),flagSummary(f)]),width=Math.max(...cells.map(([c2])=>c2.length))+3;for(let[cell,summary]of cells)out.print(` ${padEndVisible(cell,width)}${summary}`)}if(spec.examples!==void 0&&spec.examples.length>0){out.print(""),heading(out,t("help.examples"));for(let e of spec.examples)out.print(` $ ${e}`)}printGlobalFlags(out),out.print(""),heading(out,t("help.learnMore")),out.print(` ${DOCS}/${spec.path.join("-")}`)}function printGlobalFlags(out){out.print(""),heading(out,t("help.globalFlags"));let width=Math.max(...GLOBAL_FLAGS.map(g=>g.flag.length))+3;for(let g of GLOBAL_FLAGS)out.print(` ${padEndVisible(g.flag,width)}${t(g.key)}`)}function usageLine(spec){let required4=spec.flags.filter(f=>f.required===!0).map(f=>`--${f.name} ${placeholder(f)}`),tail=spec.flags.some(f=>f.required!==!0&&shown(f))?` [${lang()==="en"?"flags":"bayraklar"}]`:"",arg=spec.arg===void 0?"":` ${spec.arg}`;return`vibe ${commandName(spec)}${arg}${required4.length>0?` ${required4.join(" ")}`:""}${tail}`}function shown(f){return f.accepted!==!0&&f.compat===void 0}function placeholder(f){return`<${f.placeholder===void 0?f.name:f.placeholder}>`}function flagCell(f){let short=f.short===void 0?" ":`-${f.short}, `;return f.type==="boolean"?`${short}--${f.name}`:`${short}--${f.name} ${placeholder(f)}`}function flagSummary(f){let d=f.literalDefault;return d===void 0||d===!1||d===""?f.summary:`${f.summary} (${t("help.default")}: ${String(d)})`}function helpPayload(spec){return{command:commandName(spec),summary:spec.summary,usage:usageLine(spec),flags:spec.flags.filter(shown).map(f=>({name:f.name,type:f.type,summary:f.summary,required:f.required===!0})),examples:spec.examples===void 0?[]:spec.examples}}function editDistance(a2,b){let d=Array.from({length:a2.length+1},(_,i2)=>Array.from({length:b.length+1},(_2,j)=>i2===0?j:j===0?i2:0));for(let i2=1;i2<=a2.length;i2++)for(let j=1;j<=b.length;j++){let row=d[i2],prev=d[i2-1],cost=a2[i2-1]===b[j-1]?0:1;row[j]=Math.min(prev[j]+1,row[j-1]+1,prev[j-1]+cost),i2>1&&j>1&&a2[i2-1]===b[j-2]&&a2[i2-2]===b[j-1]&&(row[j]=Math.min(row[j],d[i2-2][j-2]+1))}return d[a2.length][b.length]}function suggest(word2,candidates){let limit=Math.max(1,Math.floor(word2.length/3)),best;for(let c2 of candidates){let d=editDistance(word2,c2);d<=limit&&(best===void 0||d<best.d)&&(best={name:c2,d})}return best===void 0?void 0:best.name}var FlagError=class extends Error{constructor(message2){super(message2),this.name="FlagError"}};function parseFlags(argv,specs,commandName2){let valueShorts=new Set(specs.filter(s=>s.type==="string"&&s.short!==void 0).map(s=>s.short)),longs=specs.map(s=>s.name);for(let arg of argv){if(!/^-[a-zA-Z][a-zA-Z0-9-]+$/.test(arg))continue;let word2=arg.slice(1);if(!(valueShorts.has(arg.charAt(1))&&suggest(word2,longs)===void 0))return new FlagError(t("err.singleDash",{arg,fixed:`--${word2}`}))}let options={};for(let spec of specs)options[spec.name]=spec.short===void 0?{type:spec.type}:{type:spec.type,short:spec.short};let parsed;try{parsed=parseArgs({args:[...argv],options,strict:!0,allowPositionals:!0})}catch(cause){return new FlagError(explainParseFailure(cause,specs,commandName2))}let values=new Map;for(let[name,value]of Object.entries(parsed.values))value!==void 0&&values.set(name,Array.isArray(value)?value.at(-1):value);return{values,positionals:parsed.positionals}}function explainParseFailure(cause,specs,commandName2){let detail2=cause instanceof Error?cause.message:String(cause),quoted=/'(-{1,2}[^']+)'/.exec(detail2),flag=quoted===null?"":quoted[1];if(typeof cause=="object"&&cause!==null&&"code"in cause){let code=cause.code;if(code==="ERR_PARSE_ARGS_UNKNOWN_OPTION"&&flag!==""){let guess=suggest(flag.replace(/^-+/,""),specs.map(s=>s.name)),base=t("err.unknownFlag",{flag,name:commandName2});return guess===void 0?base:`${base} ${t("err.didYouMean")} --${guess}`}if(code==="ERR_PARSE_ARGS_INVALID_OPTION_VALUE"&&flag!==""){let long=/--([a-zA-Z0-9][a-zA-Z0-9-]*)/.exec(flag),spec=long===null?void 0:specs.find(s=>s.name===long[1]);return spec===void 0?t("err.missingValue",{flag:flag.split(" ")[0]}):spec.type==="boolean"?t("err.noValue",{flag:`--${spec.name}`}):t("err.missingValue",{flag:`--${spec.name}`})}}return t("err.badFlags",{detail:detail2})}function applyDefaults(values,specs,config,linked){let out=new Map(values),typedOrg=values.get("org"),typedProject=values.get("project"),link=linked!==void 0&&(typedOrg!==void 0?typedOrg===linked.org:config.organization===""||config.organization===linked.org)&&(typedProject===void 0||typedProject===linked.project)?linked:void 0;linked!==void 0&&link===void 0&&typedProject===void 0&¬eDroppedLink(out,typedOrg!==void 0?{link:linked,because:"org-flag",org:String(typedOrg)}:{link:linked,because:"org-env",org:config.organization});for(let spec of specs)if(!out.has(spec.name)){if(spec.defaultFrom==="config.organization"){out.set(spec.name,link===void 0?config.organization:link.org);continue}if(spec.defaultFrom==="linked.project"){out.set(spec.name,link===void 0?"":link.project);continue}if(spec.literalDefault!==void 0){out.set(spec.name,spec.literalDefault);continue}out.set(spec.name,spec.type==="boolean"?!1:"")}return out}function str(flags,name){let v=flags.get(name);if(typeof v=="string")return v;throw v===void 0?new Error(`args: ${name} bu komutta tan\u0131ml\u0131 de\u011Fil`):new Error(`args: ${name} bir metin se\xE7ene\u011Fi de\u011Fil`)}function bool(flags,name){let v=flags.get(name);if(typeof v=="boolean")return v;throw v===void 0?new Error(`args: ${name} bu komutta tan\u0131ml\u0131 de\u011Fil`):new Error(`args: ${name} bir true/false se\xE7ene\u011Fi de\u011Fil`)}import{chmodSync,closeSync,fchmodSync,fsyncSync,mkdirSync as mkdirSync2,openSync,readFileSync as readFileSync2,renameSync,rmSync,statSync,unlinkSync,writeSync}from"node:fs";import{execFileSync}from"node:child_process";import{randomBytes as randomBytes2}from"node:crypto";import{dirname as dirname2,join as join2}from"node:path";var m6=catalogue("auth.credential",{none:{tr:"oturum yok",en:"no session"},noPath:{tr:"oturum dosyas\u0131n\u0131n yolu gerekli",en:"the session file path is required"},unreadable:{tr:"Oturum dosyas\u0131 okunamad\u0131: {detail}",en:"Could not read the session file: {detail}"},corrupt:{tr:"Oturum dosyas\u0131 \xE7\xF6z\xFCmlenemedi; vibe login ile yeniden giri\u015F yap\u0131n. Ayr\u0131nt\u0131: {detail}",en:"Could not parse the session file; sign in again with vibe login. Detail: {detail}"},notObject:{tr:"belge bir JSON nesnesi de\u011Fil",en:"the document is not a JSON object"},noAccess:{tr:"Oturum dosyas\u0131nda eri\u015Fim token\u2019\u0131 yok; vibe login ile yeniden giri\u015F yap\u0131n.",en:"The session file holds no access token; sign in again with vibe login."},keyCase:{tr:"{key} alan\u0131 beklenen harf b\xFCy\xFCkl\xFC\u011F\xFCnde de\u011Fil, do\u011Frusu {folded}",en:"the field {key} has unexpected letter case; it should be {folded}"},notText:{tr:"{key} alan\u0131 metin olmal\u0131",en:"the field {key} must be text"},scopesList:{tr:"scopes alan\u0131 dizi olmal\u0131",en:"the scopes field must be an array"},scopesText:{tr:"scopes alan\u0131 yaln\u0131zca metin i\xE7erebilir",en:"the scopes field may hold only text"},expiryText:{tr:"expires_at alan\u0131 metin olmal\u0131",en:"the expires_at field must be text"},expiryParse:{tr:"expires_at \xE7\xF6z\xFCmlenemedi ({raw})",en:"could not parse expires_at ({raw})"},"what.dir":{tr:"dizini",en:"directory"},"what.file":{tr:"dosyas\u0131",en:"file"},permRead:{tr:"Oturum {what} i\xE7in izinler okunamad\u0131 ({path}): {detail}",en:"Could not read the permissions of the session {what} ({path}): {detail}"},permNarrow:{tr:"Oturum {what} {mode} izinleriyle duruyor ve daralt\u0131lamad\u0131 ({path}): {detail}",en:"The session {what} has mode {mode} and could not be narrowed ({path}): {detail}"},aclUnverified:{tr:"Oturum {what} i\xE7in eri\u015Fim listesi daralt\u0131lm\u0131\u015F g\xF6r\xFCn\xFCyor ama do\u011Frulanamad\u0131 ({path}); \u015Fu anda eri\u015Fimi olanlar: {principals}. Bu oturum makinedeki di\u011Fer hesaplara a\xE7\u0131k.",en:"The access list of the session {what} looks narrowed but could not be verified ({path}); it is open to: {principals}. This session is reachable by other accounts on the machine."},aclNarrow:{tr:"Oturum {what} i\xE7in eri\u015Fim listesi daralt\u0131lamad\u0131 ({path}): {detail}",en:"Could not narrow the access list of the session {what} ({path}): {detail}"},noUser:{tr:"USERNAME ortam de\u011Fi\u015Fkeni bo\u015F; oturum dosyas\u0131n\u0131n izinleri kimin ad\u0131na daralt\u0131lacak, belirlenemiyor.",en:"USERNAME is empty; there is no way to tell whom the session file should be narrowed to."},aclRead:{tr:"Oturum {what} i\xE7in eri\u015Fim listesi okunamad\u0131 ({path}): {detail}",en:"Could not read the access list of the session {what} ({path}): {detail}"},aclTooMany:{tr:"Oturum dosyas\u0131n\u0131n eri\u015Fim listesi beklenenden \xE7ok girdi ta\u015F\u0131yor ({path}); daraltma do\u011Frulanam\u0131yor.",en:"The session file\u2019s access list has more entries than expected ({path}); the narrowing cannot be verified."},noToken:{tr:"eri\u015Fim token\u2019\u0131 olmadan oturum kaydedilemez",en:"a session cannot be saved without an access token"},mkdir:{tr:"Oturum dizini olu\u015Fturulamad\u0131: {detail}",en:"Could not create the session directory: {detail}"},dirMode:{tr:"Oturum dizininin izinleri ayarlanamad\u0131: {detail}",en:"Could not set the permissions of the session directory: {detail}"},fileMode:{tr:"Oturum dosyas\u0131n\u0131n izinleri ayarlanamad\u0131: {detail}",en:"Could not set the permissions of the session file: {detail}"},write:{tr:"Oturum yaz\u0131lamad\u0131: {detail}",en:"Could not write the session: {detail}"},fsync:{tr:"Oturum diske yaz\u0131lamad\u0131: {detail}",en:"Could not flush the session to disk: {detail}"},close:{tr:"Ge\xE7ici oturum dosyas\u0131 kapat\u0131lamad\u0131: {detail}",en:"Could not close the temporary session file: {detail}"},rename:{tr:"Oturum dosyas\u0131 yerine ta\u015F\u0131namad\u0131: {detail}",en:"Could not move the session file into place: {detail}"},temp:{tr:"Ge\xE7ici oturum dosyas\u0131 olu\u015Fturulamad\u0131: {detail}",en:"Could not create the temporary session file: {detail}"},tempClash:{tr:"Ge\xE7ici oturum dosyas\u0131 olu\u015Fturulamad\u0131; {attempts} denemenin hepsinde ad \xE7ak\u0131\u015Ft\u0131: {detail}",en:"Could not create the temporary session file; all {attempts} attempts hit a name clash: {detail}"},stalled:{tr:"dosyaya yazma ilerlemedi ({offset}/{total} bayt)",en:"the write to the file made no progress ({offset}/{total} bytes)"},remove:{tr:"Oturum silinemedi: {detail}",en:"Could not remove the session: {detail}"}}),CREDENTIAL_KEYS=["access_token","refresh_token","expires_at","token_url","client_id","issuer","scopes"],REFRESH_SKEW_MS=6e4,CREDENTIAL_MODE=384,DIR_MODE=448,GO_ZERO_TIME_MS=-621355968e5,NoCredentialError=class extends Error{constructor(){super(m6("none")),this.name="NoCredentialError"}},GO_SPACE_CLASS="\\t\\n\\v\\f\\r \\u0085\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000",GO_LEADING_SPACE=new RegExp(`^[${GO_SPACE_CLASS}]+`),GO_TRAILING_SPACE=new RegExp(`[${GO_SPACE_CLASS}]+$`);function trimSpaceGo(s){return s.replace(GO_LEADING_SPACE,"").replace(GO_TRAILING_SPACE,"")}function load(path){if(path==="")throw new Error(m6("noPath"));let data;try{data=readFileSync2(path,"utf8")}catch(cause){throw isErrno(cause,"ENOENT")?new NoCredentialError:new Error(m6("unreadable",{detail:describe2(cause)}))}let tightened=tighten(path),trimmed=trimSpaceGo(data);if(trimmed==="")throw new NoCredentialError;return trimmed.startsWith("{")?{credential:parseDocument(trimmed),tightened}:{credential:{accessToken:trimmed},tightened}}function parseDocument(trimmed){let parsed;try{parsed=JSON.parse(trimmed)}catch(cause){throw new Error(m6("corrupt",{detail:describe2(cause)}))}if(typeof parsed!="object"||parsed===null||Array.isArray(parsed))throw new Error(m6("corrupt",{detail:m6("notObject")}));let doc=parsed;rejectCaseVariantKeys(doc);let accessToken2=readString3(doc,"access_token"),refreshToken=readString3(doc,"refresh_token"),tokenUrl=readString3(doc,"token_url"),clientId=readString3(doc,"client_id"),issuer=readString3(doc,"issuer"),scopes=readScopes(doc),expiresAt=readExpiry(doc);if(accessToken2===void 0||trimSpaceGo(accessToken2)==="")throw new Error(m6("noAccess"));let cred={accessToken:trimSpaceGo(accessToken2)};return refreshToken!==void 0&&(cred.refreshToken=refreshToken),expiresAt!==void 0&&(cred.expiresAt=expiresAt),tokenUrl!==void 0&&(cred.tokenUrl=tokenUrl),clientId!==void 0&&(cred.clientId=clientId),issuer!==void 0&&(cred.issuer=issuer),scopes!==void 0&&(cred.scopes=scopes),cred}function rejectCaseVariantKeys(doc){let canonical=new Set(CREDENTIAL_KEYS);for(let key of Object.keys(doc)){if(canonical.has(key))continue;let folded=key.toLowerCase();if(canonical.has(folded))throw new Error(m6("corrupt",{detail:m6("keyCase",{key,folded})}))}}function readString3(doc,key){let raw=doc[key];if(raw!=null){if(typeof raw!="string")throw new Error(m6("corrupt",{detail:m6("notText",{key})}));if(raw!=="")return raw}}function readScopes(doc){let raw=doc.scopes;if(raw==null)return;if(!Array.isArray(raw))throw new Error(m6("corrupt",{detail:m6("scopesList")}));let out=[];for(let item of raw){if(typeof item!="string")throw new Error(m6("corrupt",{detail:m6("scopesText")}));out.push(item)}if(out.length!==0)return out}function readExpiry(doc){let raw=doc.expires_at;if(raw==null)return;if(typeof raw!="string")throw new Error(m6("corrupt",{detail:m6("expiryText")}));let when3=new Date(raw);if(Number.isNaN(when3.getTime()))throw new Error(m6("corrupt",{detail:m6("expiryParse",{raw})}));if(when3.getTime()!==GO_ZERO_TIME_MS)return when3}function tighten(path){let targets=[{path:dirname2(path),mode:DIR_MODE,what:m6("what.dir")},{path,mode:CREDENTIAL_MODE,what:m6("what.file")}];if(process.platform==="win32"){let narrowed2=[];for(let target of targets)tightenWindows(target.path,target.what)&&narrowed2.push(target.path);return narrowed2}let narrowed=[];for(let target of targets){let perm;try{perm=statSync(target.path).mode&511}catch(cause){throw new Error(m6("permRead",{what:target.what,path:target.path,detail:describe2(cause)}))}if(perm&~target.mode){try{chmodSync(target.path,target.mode)}catch(cause){throw new Error(m6("permNarrow",{what:target.what,mode:formatMode(perm),path:target.path,detail:describe2(cause)}))}narrowed.push(target.path)}}return narrowed}function formatMode(perm){return(perm&511).toString(8).padStart(4,"0")}var MAX_ACL_ENTRIES=64;function tightenWindows(path,what){let user=windowsUser(),before=readAcl(path,what);if(isNarrowAcl(before,user))return!1;runIcacls(path,["/inheritance:r"],what);for(let args of narrowAclCommands(readAcl(path,what),user))runIcacls(path,args,what);let after=readAcl(path,what);if(!isNarrowAcl(after,user))throw new Error(m6("aclUnverified",{what,path,principals:after.map(e=>e.principal).join(", ")}));return!0}function runIcacls(path,args,what){try{execFileSync("icacls",[path,...args],{encoding:"utf8",windowsHide:!0,timeout:2e4,stdio:["ignore","pipe","pipe"]})}catch(cause){throw new Error(m6("aclNarrow",{what,path,detail:describe2(cause)}))}}function narrowAclCommands(entries3,user){let commands=[],seen=new Set;for(let entry of entries3){let key=entry.principal.toLowerCase();seen.has(key)||(seen.add(key),commands.push(["/remove",entry.principal]))}return commands.push(["/grant:r",`${user}:F`]),commands}function windowsUser(){let name=process.env.USERNAME;if(name===void 0||name.trim()==="")throw new Error(m6("noUser"));return name.trim()}function readAcl(path,what){let output;try{output=execFileSync("icacls",[path],{encoding:"utf8",windowsHide:!0,timeout:2e4,stdio:["ignore","pipe","pipe"]})}catch(cause){throw new Error(m6("aclRead",{what,path,detail:describe2(cause)}))}return parseIcacls(output,path)}function parseIcacls(output,path){let entries3=[],lowerPath=path.toLowerCase();for(let rawLine of output.split(/\r?\n/)){let line=rawLine,trimmedStart=line.trimStart();if(trimmedStart.toLowerCase().startsWith(lowerPath)&&(line=trimmedStart.slice(path.length)),line=line.trim(),line==="")continue;let sep3=line.indexOf(":(");if(sep3<0)continue;let principal=line.slice(0,sep3).trim();if(principal==="")continue;let rights=[];for(let group of line.slice(sep3+1).matchAll(/\(([^)]*)\)/g)){let value=group[1];value!==void 0&&rights.push(value.trim())}if(entries3.push({principal,rights}),entries3.length>MAX_ACL_ENTRIES)throw new Error(m6("aclTooMany",{path}))}return entries3}function isNarrowAcl(entries3,user){if(entries3.length!==1)return!1;let only=entries3[0];return only===void 0||only.rights.some(r2=>r2.toUpperCase()==="I")||!only.rights.some(r2=>r2.toUpperCase()==="F")?!1:sameAccount(only.principal,user)}function sameAccount(principal,user){return principal.slice(principal.lastIndexOf("\\")+1).toLowerCase()===user.toLowerCase()}var TEMP_ATTEMPTS=8;function save(path,cred){if(path==="")throw new Error(m6("noPath"));if(trimSpaceGo(cred.accessToken)==="")throw new Error(m6("noToken"));let dir=dirname2(path);try{mkdirSync2(dir,{recursive:!0,mode:DIR_MODE})}catch(cause){throw new Error(m6("mkdir",{detail:describe2(cause)}))}if(process.platform!=="win32")try{chmodSync(dir,DIR_MODE)}catch(cause){throw new Error(m6("dirMode",{detail:describe2(cause)}))}let body=encode(cred),{fd,tmpName}=createTemp(dir),committed=!1;try{if(process.platform!=="win32")try{fchmodSync(fd,CREDENTIAL_MODE)}catch(cause){throw new Error(m6("fileMode",{detail:describe2(cause)}))}try{writeAll(fd,body)}catch(cause){throw new Error(m6("write",{detail:describe2(cause)}))}try{fsyncSync(fd)}catch(cause){throw new Error(m6("fsync",{detail:describe2(cause)}))}try{closeSync(fd)}catch(cause){throw new Error(m6("close",{detail:describe2(cause)}))}try{renameSync(tmpName,path)}catch(cause){throw new Error(m6("rename",{detail:describe2(cause)}))}committed=!0}finally{if(!committed){try{closeSync(fd)}catch{}try{unlinkSync(tmpName)}catch{}}}process.platform==="win32"&&(tightenWindows(dir,"dizin"),tightenWindows(path,"dosya"))}function encode(cred){let doc={access_token:trimSpaceGo(cred.accessToken)};return cred.refreshToken!==void 0&&cred.refreshToken!==""&&(doc.refresh_token=cred.refreshToken),cred.expiresAt!==void 0&&(doc.expires_at=cred.expiresAt.toISOString()),cred.tokenUrl!==void 0&&cred.tokenUrl!==""&&(doc.token_url=cred.tokenUrl),cred.clientId!==void 0&&cred.clientId!==""&&(doc.client_id=cred.clientId),cred.issuer!==void 0&&cred.issuer!==""&&(doc.issuer=cred.issuer),cred.scopes!==void 0&&cred.scopes.length>0&&(doc.scopes=cred.scopes),JSON.stringify(doc,null,2)}function createTemp(dir){let last;for(let attempt=0;attempt<TEMP_ATTEMPTS;attempt+=1){let tmpName=join2(dir,`.token-${randomBytes2(6).toString("hex")}`);try{return{fd:openSync(tmpName,"wx",CREDENTIAL_MODE),tmpName}}catch(cause){if(!isErrno(cause,"EEXIST"))throw new Error(m6("temp",{detail:describe2(cause)}));last=cause}}throw new Error(m6("tempClash",{attempts:TEMP_ATTEMPTS,detail:describe2(last)}))}function writeAll(fd,body){let buf=Buffer.from(body,"utf8"),offset=0;for(;offset<buf.length;){let written=writeSync(fd,buf,offset,buf.length-offset);if(written<=0)throw new Error(m6("stalled",{offset,total:buf.length}));offset+=written}}function deleteCredential(path){if(path==="")throw new Error(m6("noPath"));try{rmSync(path,{force:!1,recursive:!1})}catch(cause){throw isErrno(cause,"ENOENT")?new NoCredentialError:new Error(m6("remove",{detail:describe2(cause)}))}}function opaque(cred){return isBlank(cred.refreshToken)&&isBlank(cred.tokenUrl)&&isBlank(cred.clientId)}function renewable(cred){return!isBlank(cred.refreshToken)&&!isBlank(cred.tokenUrl)&&!isBlank(cred.clientId)}function expired(cred,now){return cred.expiresAt===void 0?!1:now.getTime()+REFRESH_SKEW_MS>cred.expiresAt.getTime()}function boundOrgOf(accessToken2){let claims=claimsOf(accessToken2);if(claims===void 0)return"";let orgId=claims.org_id;return typeof orgId!="string"?"":orgId}function audienceOf(accessToken2){let claims=claimsOf(accessToken2);if(claims===void 0)return[];let aud=claims.aud;return typeof aud=="string"?aud===""?[]:[aud]:Array.isArray(aud)?aud.every(a2=>typeof a2=="string"&&a2!=="")?aud:[]:[]}function claimsOf(accessToken2){let parts=accessToken2.split(".");if(parts.length!==3)return;let payload=parts[1];if(payload===void 0||!/^[A-Za-z0-9_-]*$/.test(payload)||payload.length%4===1)return;let claims;try{claims=JSON.parse(Buffer.from(payload,"base64url").toString("utf8"))}catch{return}if(!(typeof claims!="object"||claims===null||Array.isArray(claims)))return claims}function isBlank(v){return v===void 0||v===""}function describe2(err){return err instanceof Error?err.message:String(err)}function isErrno(err,code){return typeof err=="object"&&err!==null&&"code"in err&&err.code===code}var m7=catalogue("client.poll",{badConfig:{tr:"poll: izleme ayarlar\u0131 ge\xE7ersiz; en az bir okuma yap\u0131lmal\u0131",en:"poll: invalid settings; at least one read is required"},timeout:{tr:"\u0130\u015Flem zaman a\u015F\u0131m\u0131na u\u011Frad\u0131; son durum: {state}",en:"The operation timed out; last state: {state}"},unreadable:{tr:"\u0130\u015Flem kayd\u0131 okunamad\u0131.",en:"Could not read the operation record."},stopped:{tr:"\u0130\u015Flemin takibi bitti; son durum: {state}",en:"Stopped following the operation; last state: {state}"}});var OP_SUCCEEDED="SUCCEEDED",OP_FAILED="FAILED",OP_DEAD_LETTERED="DEAD_LETTERED";function terminal(op){return op.state===OP_SUCCEEDED||op.state===OP_FAILED||op.state===OP_DEAD_LETTERED}function failed(op){return op.state===OP_FAILED||op.state===OP_DEAD_LETTERED}function defaultPollConfig(){return{timeoutMs:2*60*1e3,intervalMs:2e3,maxPolls:60}}async function poll(signal,config,operation,fetchOperation){if(config.maxPolls<=0)throw new Error(m7("badConfig"));let current2=operation;if(terminal(current2))return{operation:current2,error:void 0};let deadline=Date.now()+config.timeoutMs;for(let i2=0;i2<config.maxPolls;i2++){if(Date.now()>deadline)return{operation:current2,error:new Error(`BUILD_TIMEOUT: ${m7("timeout",{state:current2.state})}`)};let aborted=await delay(signal,config.intervalMs);if(aborted!==void 0)return{operation:current2,error:aborted};let next;try{next=await fetchOperation(signal)}catch(cause){return{operation:current2,error:cause instanceof Error?cause:new Error(String(cause))}}if(next===void 0)return{operation:current2,error:new Error(`NOT_FOUND: ${m7("unreadable")}`)};if(current2=next,terminal(current2))return{operation:current2,error:void 0}}return{operation:current2,error:new Error(m7("stopped",{state:current2.state}))}}var m8=catalogue("client",{noAction:{tr:"i\u015Flem ad\u0131 gerekli",en:"the action name is required"},dangerous:{tr:"{action} komut sat\u0131r\u0131ndan yap\u0131lamaz: ta\u015F\u0131d\u0131\u011F\u0131n\u0131z kimlik bilgisi ({kind}) iki ad\u0131ml\u0131 do\u011Frulamay\u0131 yan\u0131tlayamaz. Bu i\u015Flemi konsoldan yap\u0131n.",en:"{action} cannot be done from the command line: your credential ({kind}) cannot answer two-step verification. Do this from the console."},body:{tr:"\u0130stek g\xF6vdesi haz\u0131rlanamad\u0131: {detail}",en:"Could not prepare the request body: {detail}"},bodyJson:{tr:"\u0130stek g\xF6vdesi JSON\u2019a \xE7evrilemedi.",en:"Could not encode the request body as JSON."}}),CREDENTIAL_PAT="token",CREDENTIAL_OAUTH="oauth",CREDENTIAL_UNKNOWN="unknown",Client=class{endpoint;token;retry;poll;constructor(endpoint,token,retryPolicy,pollConfig){this.endpoint=endpoint,this.token=token,this.retry=retryPolicy,this.poll=pollConfig}credentialKind(){return this.token.startsWith("vibe_pat_")?CREDENTIAL_PAT:countDots(this.token)===2&&this.token.startsWith("eyJ")?CREDENTIAL_OAUTH:CREDENTIAL_UNKNOWN}boundOrg(){return boundOrgOf(this.token)}async call(signal,method,path,body){let payload;if(body!=null){try{payload=JSON.stringify(body)}catch(cause){return{response:void 0,error:new Error(`INTERNAL: ${m8("body",{detail:cause instanceof Error?cause.message:String(cause)})}`,{cause})}}if(payload===void 0)return{response:void 0,error:new Error(`INTERNAL: ${m8("bodyJson")}`)}}return request(signal,this,method,path,payload,void 0)}async query(signal,document,vars){return query(signal,this,document,vars)}async mutate(signal,mutationID,document,vars){return mutate(signal,this,mutationID,document,vars)}async mutateDangerous(signal,mutationID,document,vars,otp){return mutateDangerous(signal,this,mutationID,document,vars,otp)}};function countDots(s){let n3=0;for(let ch of s)ch==="."&&n3++;return n3}function newClient(endpoint,token){return new Client(endpoint,token,defaultRetryPolicy(),defaultPollConfig())}var m9=catalogue("auth.secureurl",{empty:{tr:"{what} adresi bo\u015F.",en:"The {what} address is empty."},unparsable:{tr:"{what} adresi \xE7\xF6z\xFCmlenemedi: {raw}",en:"Could not parse the {what} address: {raw}"},scheme:{tr:"{what} adresi https olmal\u0131 (bulunan: {scheme}).",en:"The {what} address must be https (found: {scheme})."},loopback:{tr:'{what} adresi https olmal\u0131; http yaln\u0131zca 127.0.0.1 ve ::1 i\xE7in kabul edilir (bulunan: {host}). "localhost" bilerek kabul edilmez: ad \xE7\xF6z\xFCmlemesi y\xF6nlendirilebilir ve bu adrese her istekte eri\u015Fim token\u2019\u0131 g\xF6nderilir.',en:'The {what} address must be https; http is accepted only for 127.0.0.1 and ::1 (found: {host}). "localhost" is refused on purpose: name resolution can be redirected, and every request to this address carries an access token.'}});function requireSecureURL(what,raw){if(raw==="")return new Error(m9("empty",{what}));let url;try{url=new URL(raw)}catch{return new Error(m9("unparsable",{what,raw}))}if(url.protocol==="https:")return;if(url.protocol!=="http:")return new Error(m9("scheme",{what,scheme:url.protocol.replace(":","")}));let host=url.hostname.startsWith("[")&&url.hostname.endsWith("]")?url.hostname.slice(1,-1):url.hostname;if(!(host==="127.0.0.1"||host==="::1"))return new Error(m9("loopback",{what,host}))}var m10=catalogue("auth.refresh",{reauth:{tr:"Oturum yenilenemedi; vibe login ile yeniden giri\u015F yap\u0131n.",en:"The session could not be renewed; sign in again with vibe login."},reauthDetail:{tr:"Oturum yenilenemedi ({detail}); vibe login ile yeniden giri\u015F yap\u0131n.",en:"The session could not be renewed ({detail}); sign in again with vibe login."},refused:{tr:"Yetkilendirme sunucusu iste\u011Fi reddetti ({code}, HTTP {status}).",en:"The authorization server refused the request ({code}, HTTP {status})."},refusedDetail:{tr:"Yetkilendirme sunucusu iste\u011Fi reddetti ({code}): {detail}",en:"The authorization server refused the request ({code}): {detail}"},noRefreshToken:{tr:"yenileme token\u2019\u0131 yok",en:"no refresh token"},incomplete:{tr:"yenileme i\xE7in gereken alanlar eksik",en:"the fields a renewal needs are missing"},tokenWhat:{tr:"token endpoint\u2019i",en:"token endpoint"},noEndpoint:{tr:"token adresi gerekli",en:"the token address is required"},unreachable:{tr:"Token adresine ula\u015F\u0131lamad\u0131: {detail}",en:"Could not reach the token address: {detail}"},bodyWhat:{tr:"token yan\u0131t\u0131",en:"token response"},elsewhere:{tr:"ba\u015Fka bir adres",en:"another address"},redirect:{tr:"Yetkilendirme sunucusu bir y\xF6nlendirme d\xF6nd\xFCrd\xFC ({where}); oturum bilgisi ba\u015Fka bir adrese g\xF6nderilmez.",en:"The authorization server answered with a redirect ({where}); session data is never sent elsewhere."},noAccess:{tr:"Token yan\u0131t\u0131 eri\u015Fim token\u2019\u0131 ta\u015F\u0131m\u0131yor.",en:"The token response carries no access token."},notBearer:{tr:'Token t\xFCr\xFC "{type}"; bu istemci yaln\u0131zca Bearer ta\u015F\u0131yabilir.',en:'The token type is "{type}"; this client can carry only Bearer.'},noExpiry:{tr:"Token yan\u0131t\u0131 expires_in ta\u015F\u0131m\u0131yor; yenileme i\xE7in ge\xE7erlilik s\xFCresi gerekli.",en:"The token response carries no expires_in; renewal needs the lifetime."},noRefresh:{tr:"Token yan\u0131t\u0131 yenileme token\u2019\u0131 ta\u015F\u0131m\u0131yor; eri\u015Fim token\u2019\u0131 15 dakikada t\xFCkenir ve geri d\xF6n\xFC\u015F olmaz.",en:"The token response carries no refresh token; the access token runs out in 15 minutes with no way back."},unparsable:{tr:"Token yan\u0131t\u0131 \xE7\xF6z\xFCmlenemedi: {detail}",en:"Could not parse the token response: {detail}"},notObject:{tr:"bir nesne bekleniyordu",en:"an object was expected"},notText:{tr:"{key} metin de\u011Fil",en:"{key} is not text"},notNumber:{tr:"{key} say\u0131 de\u011Fil",en:"{key} is not a number"}}),HTTP_TIMEOUT_MS=3e4,MAX_AUTH_BODY_BYTES=1<<20,ReauthRequiredError=class extends Error{constructor(detail2){super(detail2===void 0?m10("reauth"):m10("reauthDetail",{detail:detail2})),this.name="ReauthRequiredError"}},OAuthError=class extends Error{code;description;statusCode;constructor(code,description,statusCode){super(description===""?m10("refused",{code,status:statusCode}):m10("refusedDetail",{code,detail:description})),this.name="OAuthError",this.code=code,this.description=description,this.statusCode=statusCode}};async function refresh(signal,cred,now){if(!renewable(cred))throw new ReauthRequiredError(m10("noRefreshToken"));let{tokenUrl,refreshToken,clientId}=cred;if(tokenUrl===void 0||refreshToken===void 0||clientId===void 0)throw new ReauthRequiredError(m10("incomplete"));let insecure=requireSecureURL(m10("tokenWhat"),tokenUrl);if(insecure!==void 0)throw new Error(insecure.message);let form=new URLSearchParams;form.set("grant_type","refresh_token"),form.set("refresh_token",refreshToken),form.set("client_id",clientId);let tokens;try{tokens=await postForm(signal,tokenUrl,form)}catch(cause){throw cause instanceof OAuthError&&cause.code==="invalid_grant"?new ReauthRequiredError(cause.code):cause}let issuer=cred.issuer===void 0?"":cred.issuer;return credentialFrom(tokens,tokenUrl,issuer,clientId,now)}async function postForm(signal,endpoint,form){if(endpoint==="")throw new Error(m10("noEndpoint"));let res;try{res=await fetch(endpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":processAgent()},body:form.toString(),signal:withTimeout(signal,HTTP_TIMEOUT_MS),redirect:"manual"})}catch(cause){throw new Error(m10("unreachable",{detail:describeCause(cause)}),{cause})}refuseRedirect(res,endpoint);let body=await readCappedBody(res,MAX_AUTH_BODY_BYTES,m10("bodyWhat"));if(res.status!==200){let failure=parseOAuthError(body);throw failure===void 0?new OAuthError("unknown","",res.status):new OAuthError(failure.code,failure.description,res.status)}return parseTokenResponse(body)}function refuseRedirect(res,requestURL){if(res.status<300||res.status>=400)return;let where=m10("elsewhere"),location=res.headers.get("location");if(location!==null)try{where=new URL(location,requestURL).origin}catch{}throw new Error(m10("redirect",{where}))}function credentialFrom(tokens,tokenUrl,issuer,clientId,now){if(tokens.accessToken==="")throw new Error(m10("noAccess"));if(tokens.tokenType.toLowerCase()!=="bearer")throw new Error(m10("notBearer",{type:tokens.tokenType}));if(tokens.expiresIn<=0)throw new Error(m10("noExpiry"));if(tokens.refreshToken==="")throw new Error(m10("noRefresh"));let cred={accessToken:tokens.accessToken,refreshToken:tokens.refreshToken,expiresAt:new Date(now.getTime()+tokens.expiresIn*1e3),tokenUrl,clientId};issuer!==""&&(cred.issuer=issuer);let scopes=tokens.scope.split(/\s+/).filter(s=>s!=="");return scopes.length>0&&(cred.scopes=scopes),cred}function parseOAuthError(body){let parsed;try{parsed=JSON.parse(body)}catch{return}if(typeof parsed!="object"||parsed===null)return;let record2=parsed,code=record2.error;if(typeof code!="string"||code==="")return;let description=record2.error_description;return{code,description:typeof description=="string"?description:""}}function parseTokenResponse(body){let parsed;try{parsed=JSON.parse(body)}catch(cause){throw new Error(m10("unparsable",{detail:describeJSONFailure(body)}),{cause})}if(typeof parsed!="object"||parsed===null||Array.isArray(parsed))throw new Error(m10("unparsable",{detail:m10("notObject")}));let record2=parsed;return{accessToken:readString4(record2,"access_token"),tokenType:readString4(record2,"token_type"),expiresIn:readNumber(record2,"expires_in"),refreshToken:readString4(record2,"refresh_token"),scope:readString4(record2,"scope")}}function readString4(record2,key){let value=record2[key];if(value==null)return"";if(typeof value!="string")throw new Error(m10("unparsable",{detail:m10("notText",{key})}));return value}function readNumber(record2,key){let value=record2[key];if(value==null)return 0;if(typeof value!="number"||!Number.isFinite(value))throw new Error(m10("unparsable",{detail:m10("notNumber",{key})}));return value}var m11=catalogue("api",{"org.none":{tr:"Bu hesap hi\xE7bir organizasyona ba\u011Fl\u0131 de\u011Fil.",en:"This account belongs to no organization."},"org.mismatch":{tr:"--org {wanted} istendi, ancak oturumunuz {bound} organizasyonuna ba\u011Fl\u0131; komut ba\u015Fka bir organizasyonda \xE7al\u0131\u015Ft\u0131r\u0131lamaz. {wanted} i\xE7in o organizasyonda `vibe login` ile giri\u015F yap\u0131n.",en:"--org {wanted} was requested, but your session belongs to {bound}; a command cannot run in another organization. For {wanted}, sign in to that organization with `vibe login`."},"org.notFound":{tr:'"{org}" organizasyonu bulunamad\u0131. \xDCyesi oldu\u011Funuz organizasyonlar: {orgs}',en:'Organization "{org}" was not found. Your organizations: {orgs}'},"org.several":{tr:"Birden fazla organizasyona \xFCyesiniz ({orgs}). --org ile birini se\xE7in ya da VIBECLOUD_ORG de\u011Fi\u015Fkenini ayarlay\u0131n.",en:"You belong to several organizations ({orgs}). Choose one with --org or set VIBECLOUD_ORG."},"org.foreign":{tr:"Oturumunuz, bu hesab\u0131n \xFCyesi olmad\u0131\u011F\u0131 bir organizasyona ba\u011Fl\u0131. `vibe login` ile yeniden giri\u015F yap\u0131n. Hesab\u0131n g\xF6rd\xFC\u011F\xFC organizasyonlar: {orgs}",en:"Your session belongs to an organization this account is not a member of. Sign in again with `vibe login`. Organizations this account sees: {orgs}"},"number.missing":{tr:"API {field} alan\u0131n\u0131 say\u0131 olarak d\xF6nd\xFCrmedi.",en:"The API did not return {field} as a number."},unmeasured:{tr:"\xF6l\xE7\xFClmedi",en:"not measured"},notFound:{tr:"{kind} bulunamad\u0131: {name}",en:"{kind} not found: {name}"},"api.unset":{tr:"API adresi ayarlanmam\u0131\u015F. VIBECLOUD_API de\u011Fi\u015Fkenini kontrol edin.",en:"The API address is not set. Check VIBECLOUD_API."},"cred.none":{tr:"Giri\u015F yapmad\u0131n\u0131z.",en:"You are not signed in."},"cred.exposed":{tr:"Oturum dosyas\u0131 bu makinedeki di\u011Fer hesaplar\u0131n eri\u015Fimine a\xE7\u0131kt\u0131; izinler daralt\u0131ld\u0131:",en:"The session file was readable by other accounts on this machine; its permissions were narrowed:"},"cred.exposedAdvice":{tr:"Token\u2019\u0131 ba\u015Fkas\u0131 okumu\u015F ya da de\u011Fi\u015Ftirmi\u015F olabilir. \u015E\xFCpheleniyorsan\u0131z konsoldan iptal edin.",en:"Someone may have read or changed the token. If in doubt, revoke it from the console."},"cred.expired":{tr:"Oturumunuzun s\xFCresi doldu ve yenilenemiyor.",en:"Your session has expired and cannot be renewed."},"cred.otherServer":{tr:"Kay\u0131tl\u0131 oturum ba\u015Fka bir sunucu i\xE7in verilmi\u015F ({saved}); ayarl\u0131 sunucu {configured}. Oturum bu sunucuya g\xF6nderilmedi.",en:"The saved session was issued for another server ({saved}); the configured server is {configured}. The session was not sent to it."},"cred.otherServerFix":{tr:"Bu sunucuya `vibe login` ile giri\u015F yap\u0131n.",en:"Sign in to this server with `vibe login`."},"cred.noResource":{tr:"Kay\u0131tl\u0131 oturum {saved} i\xE7in verilmi\u015F, ama VIBECLOUD_API ayarl\u0131yken VIBECLOUD_OAUTH_RESOURCE ayarlanmam\u0131\u015F; oturumun bu sunucuya ait oldu\u011Fu do\u011Frulanam\u0131yor.",en:"The saved session was issued for {saved}, but VIBECLOUD_API is set and VIBECLOUD_OAUTH_RESOURCE is not, so the session cannot be matched to this server."},"cred.noResourceFix":{tr:"VIBECLOUD_OAUTH_RESOURCE de\u011Fi\u015Fkenini API adresine (/query olmadan) ayarlay\u0131n.",en:"Set VIBECLOUD_OAUTH_RESOURCE to the API address (without /query)."},"cred.saveFailed":{tr:"Yenilenen oturum diske yaz\u0131lamad\u0131 ve eski yenileme token\u2019\u0131 sunucuda harcand\u0131; oturum sona erdi. `vibe login` ile yeniden giri\u015F yap\u0131n. Ayr\u0131nt\u0131: {detail}",en:"The renewed session could not be written to disk and the old refresh token is already spent on the server; the session has ended. Sign in again with `vibe login`. Detail: {detail}"},"op.noId":{tr:"API bir i\u015Flem kimli\u011Fi d\xF6nd\xFCrmedi.",en:"The API returned no operation ID."},"op.kind":{tr:"i\u015Flem",en:"operation"},"op.running":{tr:"\u0130\u015Flem uygulan\u0131yor",en:"Applying the change"},"op.queued":{tr:"\u0130\u015Flem s\u0131rada",en:"Change queued"},"op.applied":{tr:"\u0130\u015Flem uyguland\u0131",en:"Change applied"},"op.stillPending":{tr:"\u0130\u015Flem h\xE2l\xE2 {state}; sonucu do\u011Frulanamad\u0131",en:"The change is still {state}; its outcome could not be confirmed"},"op.unconfirmed":{tr:"\u0130\u015Flem reddedilmedi, ama bitip bitmedi\u011Fi de do\u011Frulanamad\u0131 (son durum: {state}, i\u015Flem: {id}). Ayn\u0131 komutu yeniden \xE7al\u0131\u015Ft\u0131rmak ikinci bir i\u015Flem ba\u015Flat\u0131r.",en:"The change was not refused, but its completion could not be confirmed either (last state: {state}, operation: {id}). Running the same command again starts a second operation."},"op.failed":{tr:"i\u015Flem ba\u015Far\u0131s\u0131z oldu",en:"the operation failed"},"state.QUEUED":{tr:"s\u0131rada",en:"queued"},"state.RUNNING":{tr:"uygulan\u0131yor",en:"running"},"state.SUCCEEDED":{tr:"uyguland\u0131",en:"applied"},"state.FAILED":{tr:"ba\u015Far\u0131s\u0131z",en:"failed"},"state.DEAD_LETTERED":{tr:"uygulanamad\u0131",en:"not applied"}});function stateWord(state){switch(state){case"QUEUED":case"RUNNING":case"SUCCEEDED":case"FAILED":case"DEAD_LETTERED":return m11(`state.${state}`);default:return state}}function capitalize(s){let first=[...s][0];return first===void 0?s:upper(first)+s.slice(first.length)}var ORGS_QUERY="query { orgs { id slug displayName standing } }",OPERATION_QUERY=`query($id: ID!) {
|
|
3
3
|
operation(id: $id) { id state kind errorCode message }
|
|
4
4
|
}`;async function listOrgs(signal,c2){return(await c2.query(signal,ORGS_QUERY,{})).orgs}function orgSlugs(orgs){return orgs.map(o=>o.slug).sort()}async function resolveOrg(signal,c2,orgSlug){let orgs=await listOrgs(signal,c2);if(orgs.length===0)throw new Error(`NOT_FOUND: ${m11("org.none")}`);let bound=boundOrg(c2,orgs);if(bound!==void 0){if(orgSlug!==""&&orgSlug!==bound.slug)throw new Error(`FORBIDDEN_ROLE: ${m11("org.mismatch",{wanted:orgSlug,bound:bound.slug})}`);return bound}if(orgSlug!==""){let match=orgs.find(o=>o.slug===orgSlug);if(match!==void 0)return match;throw new Error(`NOT_FOUND: ${m11("org.notFound",{org:orgSlug,orgs:orgSlugs(orgs).join(", ")})}`)}let only=orgs[0];if(orgs.length===1&&only!==void 0)return only;throw new Error(m11("org.several",{orgs:orgSlugs(orgs).join(", ")}))}function boundOrg(c2,orgs){let id2=c2.boundOrg();if(id2==="")return;let match=orgs.find(o=>o.id===id2);if(match!==void 0)return match;throw new Error(`UNAUTHENTICATED: ${m11("org.foreign",{orgs:orgSlugs(orgs).join(", ")})}`)}function projectQuery(fields){return`query($orgId: ID!, $slug: Slug!) {
|
|
@@ -348,7 +348,7 @@ ${i2}
|
|
|
348
348
|
`)}catch(cause){return new Error(m37("emit.write",{detail:describe3(cause)}))}}};function describe3(err){return err instanceof Error?err.message:String(err)}function oneLine(value){let text2=typeof value=="string"?value:JSON.stringify(value);return(text2===void 0?String(value):text2).replace(/\r?\n/g," ")}function nextAction(code){switch(code){case"USAGE":return"";case"UNAUTHENTICATED":return m37("action.login");case"FORBIDDEN_ROLE":return m37("action.role");case"NOT_FOUND":return m37("action.notFound");case"RATE_LIMITED":return m37("action.rateLimited");case"CREDENTIAL_KIND_FORBIDDEN":case"MFA_REQUIRED":return m37("action.console");case"TOKEN_EXPIRED":case"TOKEN_REVOKED":return m37("action.newToken");case"PAST_DUE":case"READ_ONLY_STANDING":case"SUSPENDED":return m37("action.billing");case"PAYMENT_REQUIRED":return m37("action.payment");case"SECRET_WOULD_BE_PUBLIC":return m37("action.public");case"SECRET_IN_PLAINTEXT_ENV":return m37("action.plaintext");case"CELL_UNREACHABLE":case"OPERATION_IN_PROGRESS":case"PROJECT_SETUP_PENDING":return m37("action.retry");case"CAPACITY_UNVERIFIED":return m37("action.setupResent");case"CELL_AT_CAPACITY":return m37("action.capacity");case"PACKAGE_NOT_SERVED":return m37("action.package");case"BUILD_IN_PROGRESS":return m37("action.build");case"UNSUPPORTED_PHP":return"";case"":return"";default:return m37("action.support")}}function fixFor(code,wireFix,details2){if(wireFix!=="")return wireFix;if(code==="")return"";let record2=lookup(code);if(record2===void 0)return"";for(let m104 of record2.fix.matchAll(/details\.([A-Za-z0-9_]+)/g)){let key=m104[1];if(key===void 0||!(key in details2))return""}return record2.fix}import{homedir}from"node:os";import{mkdirSync as mkdirSync4}from"node:fs";import{readFileSync as readFileSync6}from"node:fs";import{dirname as dirname4}from"node:path";import{closeSync as closeSync2,fchmodSync as fchmodSync2,openSync as openSync2,realpathSync,renameSync as renameSync2,statSync as statSync2,unlinkSync as unlinkSync2,writeFileSync as writeFileSync3}from"node:fs";var m38=catalogue("fsatomic",{tmpLeft:{tr:"{detail} (ge\xE7ici dosya da silinemedi: {rm})",en:"{detail} (the temporary file could not be removed either: {rm})"}});function writeFileAtomic(target,content,exactMode){let path=resolveLink(target),tmp=`${path}.vibecloud-tmp`;try{let fd=openSync2(tmp,"w",420);try{exactMode!==void 0&&fchmodSync2(fd,exactMode),writeFileSync3(fd,content)}finally{closeSync2(fd)}}catch(cause){return removeQuietly(tmp),asError(cause)}try{renameSync2(tmp,path)}catch(cause){try{unlinkSync2(tmp)}catch(rmCause){return new Error(m38("tmpLeft",{detail:describe4(cause),rm:describe4(rmCause)}))}return asError(cause)}}function resolveLink(path){try{return realpathSync(path)}catch{return path}}function removeQuietly(path){try{unlinkSync2(path)}catch{}}function existingMode(path){try{return statSync2(path).mode&511}catch{return}}function isNotFound(err){return typeof err=="object"&&err!==null&&err.code==="ENOENT"}function describe4(err){return err instanceof Error?err.message:String(err)}function asError(err){return err instanceof Error?err:new Error(String(err))}import{readFileSync as readFileSync5}from"node:fs";import{dirname as dirname3}from"node:path";import{mkdirSync as mkdirSync3}from"node:fs";var m39=catalogue("mcp.ownership",{mkdir:{tr:"{dir} olu\u015Fturulamad\u0131: {detail}",en:"Could not create {dir}: {detail}"},write:{tr:"{file} yaz\u0131lamad\u0131: {detail}",en:"Could not write {file}: {detail}"}}),STATE_VERSION=1;function keyOf(editorID,path){return`${editorID}
|
|
349
349
|
${path}`}function empty(){return{version:STATE_VERSION,entries:{}}}function load2(stateFile){let text2;try{text2=readFileSync5(stateFile,"utf8")}catch(cause){return isNotFound(cause),empty()}let parsed;try{parsed=JSON.parse(text2)}catch{return empty()}if(parsed===null||typeof parsed!="object"||Array.isArray(parsed))return empty();let state=parsed;return state.version!==STATE_VERSION||state.entries===null||typeof state.entries!="object"?empty():{version:STATE_VERSION,entries:state.entries}}function same(a2,b){return JSON.stringify(a2)===JSON.stringify(b)}function owns(stateFile,editorID,path,current2){let recorded=load2(stateFile).entries[keyOf(editorID,path)];return recorded===void 0?!1:same(recorded,current2)}function record(stateFile,editorID,path,entry){let state=load2(stateFile);entry===void 0?delete state.entries[keyOf(editorID,path)]:state.entries[keyOf(editorID,path)]=entry;try{mkdirSync3(dirname3(stateFile),{recursive:!0,mode:448})}catch(cause){return new Error(m39("mkdir",{dir:dirname3(stateFile),detail:describe4(cause)}))}let failed2=writeFileAtomic(stateFile,`${JSON.stringify(state,null,2)}
|
|
350
350
|
`,existingMode(stateFile));if(failed2!==void 0)return new Error(m39("write",{file:stateFile,detail:failed2.message}))}var m40=catalogue("mcp.register",{unreadable:{tr:"{file} okunamad\u0131: {detail}",en:"Could not read {file}: {detail}"},notJson:{tr:"{file} ge\xE7erli JSON de\u011Fil ({detail}); dosyada JSON yorumlar\u0131 olabilir. \u0130\xE7eri\u011Finizi kaybetmemek i\xE7in \xFCzerine yaz\u0131lmayacak; girdiyi elle ekleyin.",en:"{file} is not valid JSON ({detail}); it may contain JSON comments. It will not be overwritten, so your content is safe; add the entry by hand."},notObject:{tr:"{file} bir JSON nesnesi de\u011Fil; \xFCzerine yaz\u0131lmayacak.",en:"{file} is not a JSON object; it will not be overwritten."},rootNotObject:{tr:'Yap\u0131land\u0131rmadaki "{key}" bir nesne de\u011Fil; \xFCzerine yaz\u0131lmayacak.',en:'"{key}" in the configuration is not an object; it will not be overwritten.'},foreign:{tr:'{file} i\xE7inde "{name}" adl\u0131, bu arac\u0131n yazmad\u0131\u011F\u0131 bir sunucu zaten var; \xFCzerine yaz\u0131lmayacak. Girdiyi silin ya da yeniden adland\u0131r\u0131n.',en:'{file} already has a server named "{name}" that this tool did not write; it will not be overwritten. Remove or rename that entry.'},write:{tr:"{file} yaz\u0131lamad\u0131: {detail}",en:"Could not write {file}: {detail}"},foreignRemove:{tr:'{file} i\xE7indeki "{name}" girdisini bu ara\xE7 yazmad\u0131; silinmeyecek.',en:'This tool did not write the "{name}" entry in {file}; it will not be removed.'},mkdir:{tr:"{dir} olu\u015Fturulamad\u0131: {detail}",en:"Could not create {dir}: {detail}"}});function readExisting(path){let text2;try{text2=readFileSync6(path,"utf8")}catch(cause){return isNotFound(cause)?{value:void 0,mode:void 0}:new Error(m40("unreadable",{file:path,detail:describe4(cause)}))}if(text2.trim()==="")return{value:{},mode:existingMode(path)};let parsed;try{parsed=JSON.parse(text2)}catch(cause){return new Error(m40("notJson",{file:path,detail:describe4(cause)}))}return parsed===null||typeof parsed!="object"||Array.isArray(parsed)?new Error(m40("notObject",{file:path})):{value:parsed,mode:existingMode(path)}}function serverMap(doc,rootKey){let current2=doc[rootKey];return current2===void 0?{}:current2===null||typeof current2!="object"||Array.isArray(current2)?new Error(m40("rootNotObject",{key:rootKey})):{...current2}}function serialise(doc){return`${JSON.stringify(doc,null,2)}
|
|
351
|
-
`}function register(editor,path,url,stateFile){let existing=readExisting(path);if(existing instanceof Error)return existing;let doc=existing.value===void 0?{}:{...existing.value},servers=serverMap(doc,editor.rootKey);if(servers instanceof Error)return servers;let current2=servers[SERVER_KEY];if(current2!==void 0&&!owns(stateFile,editor.id,path,current2))return new Error(m40("foreign",{file:path,name:SERVER_KEY}));let entry=editor.entry(url);if(current2!==void 0&&JSON.stringify(current2)===JSON.stringify(entry))return{editor:editor.id,path,action:"unchanged",url};servers[SERVER_KEY]=entry,doc[editor.rootKey]=servers;let failedDir=ensureDir(path);if(failedDir!==void 0)return failedDir;let failed2=writeFileAtomic(path,serialise(doc),existing.mode);if(failed2!==void 0)return new Error(m40("write",{file:path,detail:failed2.message}));let notRecorded=record(stateFile,editor.id,path,entry);return notRecorded!==void 0?notRecorded:{editor:editor.id,path,action:existing.value===void 0?"created":"updated",url}}function unregister(editor,path,stateFile){let existing=readExisting(path);if(existing instanceof Error)return existing;if(existing.value===void 0)return{editor:editor.id,path,action:"unchanged",url:""};let doc={...existing.value},servers=serverMap(doc,editor.rootKey);if(servers instanceof Error)return servers;let current2=servers[SERVER_KEY];if(current2===void 0)return{editor:editor.id,path,action:"unchanged",url:""};if(!owns(stateFile,editor.id,path,current2))return new Error(m40("foreignRemove",{file:path,name:SERVER_KEY}));delete servers[SERVER_KEY],doc[editor.rootKey]=servers;let failed2=writeFileAtomic(path,serialise(doc),existing.mode);if(failed2!==void 0)return new Error(m40("write",{file:path,detail:failed2.message}));let notRecorded=record(stateFile,editor.id,path,void 0);return notRecorded!==void 0?notRecorded:{editor:editor.id,path,action:"removed",url:""}}function status(editor,path,stateFile){let existing=readExisting(path);if(existing instanceof Error)return{editor:editor.id,path,registered:!1,url:"",problem:existing.message};if(existing.value===void 0)return{editor:editor.id,path,registered:!1,url:""};let servers=serverMap(existing.value,editor.rootKey);if(servers instanceof Error)return{editor:editor.id,path,registered:!1,url:"",problem:servers.message};let current2=servers[SERVER_KEY];if(current2===void 0||!owns(stateFile,editor.id,path,current2))return{editor:editor.id,path,registered:!1,url:""};let record2=current2,url=typeof record2.url=="string"?record2.url:record2.serverUrl;return{editor:editor.id,path,registered:!0,url:typeof url=="string"?url:""}}function ensureDir(path){try{mkdirSync4(dirname4(path),{recursive:!0});return}catch(cause){return new Error(m40("mkdir",{dir:dirname4(path),detail:describe4(cause)}))}}var m41=catalogue("mcp",{"editor.missing":{tr:"Edit\xF6r belirtilmedi: --editor gerekli ({ids}).",en:"No editor given: --editor is required ({ids})."},"editor.unknown":{tr:"Bilinmeyen edit\xF6r: {id}. Se\xE7enekler: {ids}",en:"Unknown editor: {id}. Choices: {ids}"},"editor.unresolved":{tr:"edit\xF6r \xE7\xF6z\xFClemedi",en:"the editor could not be resolved"},"action.created":{tr:"{editor} yap\u0131land\u0131rmas\u0131na eklendi",en:"Added to the {editor} configuration"},"action.updated":{tr:"{editor} yap\u0131land\u0131rmas\u0131 g\xFCncellendi",en:"The {editor} configuration was updated"},"action.unchanged":{tr:"{editor} yap\u0131land\u0131rmas\u0131 zaten g\xFCncel",en:"The {editor} configuration is already up to date"},"action.absent":{tr:"{editor} yap\u0131land\u0131rmas\u0131nda Vibecloud kayd\u0131 yoktu; bir \u015Fey de\u011Fi\u015Fmedi",en:"The {editor} configuration had no Vibecloud entry; nothing changed"},"action.removed":{tr:"{editor} yap\u0131land\u0131rmas\u0131ndan kald\u0131r\u0131ld\u0131",en:"Removed from the {editor} configuration"},file:{tr:"Dosya",en:"File"},server:{tr:"Sunucu",en:"Server"},scope:{tr:"Kapsam",en:"Scope"},"scope.project":{tr:"bu proje (edit\xF6r\xFCn belgeledi\u011Fi konum)",en:"this project (where the editor documents it)"},"col.editor":{tr:"edit\xF6r",en:"editor"},"col.state":{tr:"durum",en:"state"},"col.file":{tr:"dosya",en:"file"},registered:{tr:"Kay\u0131tl\u0131",en:"Registered"},unregistered:{tr:"Kay\u0131tl\u0131 de\u011Fil",en:"Not registered"},unreadable:{tr:"Okunamad\u0131",en:"Unreadable"},"problem.line":{tr:"{editor}: {problem}",en:"{editor}: {problem}"},"install.hint":{tr:"Bir edit\xF6re eklemek i\xE7in:",en:"To add it to an editor:"}}),EDITOR_FLAG={name:"editor",type:"string",placeholder:"edit\xF6r",summary:`Edit\xF6r: ${editorIDs().join(", ")}`};function pathEnv(){return{home:homedir(),cwd:process.cwd(),platform:process.platform,env:process.env}}function resolveEditor(out,flags,command,env){let id2=str(flags,"editor");if(id2==="")return out.printError("",m41("editor.missing",{ids:editorIDs().join(", ")})),new Error(`${command}: ${m41("editor.missing",{ids:editorIDs().join(", ")})}`);let editor=editorByID(id2);if(editor===void 0){let message2=m41("editor.unknown",{id:JSON.stringify(id2),ids:editorIDs().join(", ")});return out.printError("",message2),new Error(`${command}: ${message2}`)}let path=editor.resolvePath(env);return path instanceof Error?(out.printError("",path.message),path):{editor,path}}function actionLine(action,editor){return m41(`action.${action}`,{editor})}function details(out,rows){let width=Math.max(...rows.map(([k])=>k.length));for(let[k,v]of rows)out.say(` ${out.errStyle.dim(k.padEnd(width))} ${v}`)}function installWith(out,flags,url,env,stateFile){let resolved=resolveEditor(out,flags,"mcp install",env);if(resolved instanceof Error)throw resolved;let{editor,path}=resolved;if(editor===void 0)throw new Error(`mcp install: ${m41("editor.unresolved")}`);let result=register(editor,path,url,stateFile);if(result instanceof Error)throw out.printError("",result.message),new Error(`mcp install: ${result.message}`);emitDoc(out,{editor:result.editor,path:result.path,action:result.action,url:result.url,scope:editor.scope}),out.success(actionLine(result.action,editor.display));let rows=[[m41("file"),result.path],[m41("server"),result.url]];return editor.scope==="project"&&rows.push([m41("scope"),m41("scope.project")]),details(out,rows),0}function removeWith(out,flags,env,stateFile){let resolved=resolveEditor(out,flags,"mcp remove",env);if(resolved instanceof Error)throw resolved;let{editor,path}=resolved;if(editor===void 0)throw new Error(`mcp remove: ${m41("editor.unresolved")}`);let result=unregister(editor,path,stateFile);if(result instanceof Error)throw out.printError("",result.message),new Error(`mcp remove: ${result.message}`);return emitDoc(out,{editor:result.editor,path:result.path,action:result.action}),out.success(result.action==="unchanged"?m41("action.absent",{editor:editor.display}):actionLine(result.action,editor.display)),details(out,[[m41("file"),result.path]]),0}function listWith(out,env,stateFile){let rows=EDITORS.map(editor=>{let path=editor.resolvePath(env);if(path instanceof Error)return{editor:editor.id,display:editor.display,path:"",registered:!1,url:"",problem:path.message};let s=status(editor,path,stateFile);return{editor:editor.id,display:editor.display,path:s.path,registered:s.registered,url:s.url,...s.problem===void 0?{}:{problem:s.problem}}});emitDoc(out,{editors:rows});let st=out.outStyle;out.table([{header:upper(m41("col.editor"))},{header:upper(m41("col.state"))},{header:upper(m41("col.file")),flexible:!0}],rows.map(row=>[row.editor,row.problem!==void 0?st.red(m41("unreadable")):row.registered?st.green(m41("registered")):m41("unregistered"),row.path]),"");for(let row of rows)row.problem!==void 0&&out.warn(m41("problem.line",{editor:row.display,problem:row.problem}));return rows.some(row=>row.registered)||out.hint(m41("install.hint"),"vibe mcp install --editor <edit\xF6r>"),0}function runInstall(ctx){return Promise.resolve(installWith(ctx.out,ctx.flags,ctx.config.mcpEndpoint,pathEnv(),ctx.config.mcpStateFile))}function runRemove(ctx){return Promise.resolve(removeWith(ctx.out,ctx.flags,pathEnv(),ctx.config.mcpStateFile))}function runList(ctx){return Promise.resolve(listWith(ctx.out,pathEnv(),ctx.config.mcpStateFile))}var MCP_COMMANDS=[{path:["mcp","install"],summary:"Vibecloud MCP sunucusunu bir edit\xF6re ekler",description:"Vibecloud MCP sunucusunu bir edit\xF6r\xFCn yap\u0131land\u0131rma dosyas\u0131na ekler. Yaln\u0131zca bu dosyay\u0131 yazar; sunucuya ba\u011Flanmaz.",examples:["vibe mcp install --editor cursor","vibe mcp install --editor vscode"],kind:"runs",listed:!0,flags:[{...EDITOR_FLAG,required:!0}],run:runInstall,coverage:[{argv:["mcp","install"],ok:!1}]},{path:["mcp","list"],summary:"MCP sunucusunun kay\u0131tl\u0131 oldu\u011Fu edit\xF6rleri g\xF6sterir",examples:["vibe mcp list"],kind:"runs",listed:!0,flags:[],run:runList,coverage:[{argv:["mcp","list"],ok:!0}]},{path:["mcp","remove"],summary:"Vibecloud MCP sunucusunu bir edit\xF6rden \xE7\u0131kar\u0131r",examples:["vibe mcp remove --editor cursor"],kind:"runs",listed:!0,flags:[{...EDITOR_FLAG,required:!0}],run:runRemove,coverage:[{argv:["mcp","remove"],ok:!1}]}];var m42=catalogue("auth.metadata",{noApi:{tr:"API adresi gerekli",en:"the API address is required"},notUrl:{tr:"API adresi tam bir URL olmal\u0131 ({raw}).",en:"The API address must be a full URL ({raw})."},serverWhat:{tr:"yetkilendirme sunucusu",en:"authorization server"},authorizeWhat:{tr:"yetkilendirme endpoint\u2019i",en:"authorization endpoint"},tokenWhat:{tr:"token endpoint\u2019i",en:"token endpoint"},unreachable:{tr:"Yetkilendirme sunucusuna ula\u015F\u0131lamad\u0131 ({origin}): {detail}",en:"Could not reach the authorization server ({origin}): {detail}"},none:{tr:"Bu sunucuda bir OAuth yetkilendirme sunucusu yok ({url} HTTP 404). Kontrol d\xFCzlemi OAUTH_ISSUER ile yap\u0131land\u0131r\u0131lmadan vibe login \xE7al\u0131\u015Famaz.",en:"This server runs no OAuth authorization server ({url} HTTP 404). vibe login cannot work until the control plane is configured with OAUTH_ISSUER."},status:{tr:"Yetkilendirme sunucusunun ke\u015Fif belgesi HTTP {status} d\xF6nd\xFCrd\xFC ({url}).",en:"The authorization server\u2019s metadata returned HTTP {status} ({url})."},bodyWhat:{tr:"ke\u015Fif belgesi",en:"metadata document"},unparsable:{tr:"Ke\u015Fif belgesi \xE7\xF6z\xFCmlenemedi: {detail}",en:"Could not parse the metadata document: {detail}"},notObject:{tr:"bir nesne bekleniyordu",en:"an object was expected"},noIssuer:{tr:"Ke\u015Fif belgesinde issuer yok; yetkilendirme yan\u0131t\u0131ndaki iss onunla do\u011Frulan\u0131r.",en:"The metadata has no issuer; the iss of the authorization response is checked against it."},noField:{tr:"Ke\u015Fif belgesinde {field} yok.",en:"The metadata has no {field}."},unsupported:{tr:"Yetkilendirme sunucusu {what} desteklemiyor ({have}).",en:"The authorization server does not support {what} ({have})."},noScopes:{tr:"Ke\u015Fif belgesinde scopes_supported yok; istenecek yetkiler bilinmiyor.",en:"The metadata has no scopes_supported; the scopes to request are unknown."},notText:{tr:"{key} metin de\u011Fil",en:"{key} is not text"},notList:{tr:"{key} bir liste de\u011Fil",en:"{key} is not a list"},notTextList:{tr:"{key} yaln\u0131zca metin i\xE7ermeli",en:"{key} must hold only text"}}),METADATA_PATH="/.well-known/oauth-authorization-server";function originOf(apiEndpoint){if(apiEndpoint==="")throw new Error(m42("noApi"));let url;try{url=new URL(apiEndpoint)}catch{throw new Error(m42("notUrl",{raw:JSON.stringify(apiEndpoint)}))}if(url.host==="")throw new Error(m42("notUrl",{raw:JSON.stringify(apiEndpoint)}));return`${url.protocol}//${url.host}`}async function discover(signal,apiEndpoint){let origin=originOf(apiEndpoint),insecure=requireSecureURL(m42("serverWhat"),origin);if(insecure!==void 0)throw new Error(insecure.message);let url=origin+METADATA_PATH,res;try{res=await fetch(url,{method:"GET",headers:{Accept:"application/json","User-Agent":processAgent()},signal:withTimeout(signal,HTTP_TIMEOUT_MS),redirect:"manual"})}catch(cause){throw new Error(m42("unreachable",{origin,detail:describeCause(cause)}),{cause})}if(refuseRedirect(res,url),res.status===404)throw new Error(m42("none",{url}));if(res.status!==200)throw new Error(m42("status",{status:res.status,url}));let body=await readCappedBody(res,MAX_AUTH_BODY_BYTES,m42("bodyWhat")),parsed;try{parsed=JSON.parse(body)}catch(cause){throw new Error(m42("unparsable",{detail:describeJSONFailure(body)}),{cause})}if(typeof parsed!="object"||parsed===null||Array.isArray(parsed))throw new Error(m42("unparsable",{detail:m42("notObject")}));let doc=parsed,metadata={issuer:readString5(doc,"issuer"),authorizationEndpoint:readString5(doc,"authorization_endpoint"),tokenEndpoint:readString5(doc,"token_endpoint"),scopesSupported:readStringArray(doc,"scopes_supported"),responseTypesSupported:readStringArray(doc,"response_types_supported"),grantTypesSupported:readStringArray(doc,"grant_types_supported"),codeChallengeMethodsSupported:readStringArray(doc,"code_challenge_methods_supported"),deviceAuthorizationEndpoint:readString5(doc,"device_authorization_endpoint"),revocationEndpoint:readString5(doc,"revocation_endpoint")};if(metadata.issuer==="")throw new Error(m42("noIssuer"));if(metadata.authorizationEndpoint==="")throw new Error(m42("noField",{field:"authorization_endpoint"}));if(metadata.tokenEndpoint==="")throw new Error(m42("noField",{field:"token_endpoint"}));if(!metadata.responseTypesSupported.includes("code"))throw new Error(m42("unsupported",{what:"response_type=code",have:metadata.responseTypesSupported.join(", ")}));if(!metadata.grantTypesSupported.includes("authorization_code"))throw new Error(m42("unsupported",{what:"authorization_code",have:metadata.grantTypesSupported.join(", ")}));if(!metadata.codeChallengeMethodsSupported.includes("S256"))throw new Error(m42("unsupported",{what:"PKCE S256",have:metadata.codeChallengeMethodsSupported.join(", ")}));if(metadata.scopesSupported.length===0)throw new Error(m42("noScopes"));let badAuthorize=requireSecureURL(m42("authorizeWhat"),metadata.authorizationEndpoint);if(badAuthorize!==void 0)throw new Error(badAuthorize.message);let badToken=requireSecureURL(m42("tokenWhat"),metadata.tokenEndpoint);if(badToken!==void 0)throw new Error(badToken.message);return metadata}function readString5(doc,key){let value=doc[key];if(value==null)return"";if(typeof value!="string")throw new Error(m42("unparsable",{detail:m42("notText",{key})}));return value}function readStringArray(doc,key){let value=doc[key];if(value==null)return[];if(!Array.isArray(value))throw new Error(m42("unparsable",{detail:m42("notList",{key})}));let out=[];for(let entry of value){if(typeof entry!="string")throw new Error(m42("unparsable",{detail:m42("notTextList",{key})}));out.push(entry)}return out}import{createHash as createHash2,randomBytes as randomBytes3,timingSafeEqual}from"node:crypto";import{createServer}from"node:http";var WORDMARK={viewBox:"139 -1593 14901 1793",slash:"M444 200L1057-1460L752-1460L139 200",name:"M1457-1068L1871 0L2173 0L2583-1068L2294-1068L2040-345L2026-345L1769-1068M2777 0L3742 0L3742-234L3404-234L3404-1062L3371-1094L2777-1068L2777-835L3116-835L3116-234L2777-234M3025-1420C3025-1313 3102-1245 3215-1245C3328-1245 3404-1313 3404-1420C3404-1527 3328-1593 3215-1593C3102-1593 3025-1527 3025-1420M5032-537C5032-856 4911-1092 4636-1092C4485-1092 4385-1020 4323-938L4309-938L4309-1530L4022-1530L4022 0L4273 0L4288-129L4324-129C4375-47 4476 24 4628 24C4908 24 5032-216 5032-537M4309-263L4309-805C4369-839 4436-855 4501-855C4663-855 4742-760 4742-537C4742-313 4661-213 4500-213C4438-213 4372-228 4309-263M5208-537C5208-164 5431 24 5748 24C5955 24 6165-56 6244-289L5965-328C5924-237 5845-198 5749-198C5595-198 5510-302 5499-494L6246-494L6246-599C6246-931 6069-1092 5761-1092C5436-1092 5208-912 5208-537M5509-662C5541-812 5632-871 5752-871C5881-871 5966-804 5966-664L5966-662M7494-339L7217-373C7184-269 7114-198 6986-198C6829-198 6739-306 6739-533C6739-753 6823-871 6987-871C7117-871 7195-797 7215-674L7493-698C7472-965 7269-1092 6997-1092C6688-1092 6448-926 6448-533C6448-168 6656 24 6982 24C7211 24 7431-71 7494-339M7737 0L8703 0L8703-234L8364-234L8365-1524L8331-1556L7738-1530L7738-1297L8077-1297L8076-234L7737-234M9992-529C9992-920 9750-1092 9460-1092C9171-1092 8928-920 8928-529C8928-139 9171 24 9460 24C9750 24 9992-139 9992-529M9218-530C9218-784 9321-871 9460-871C9599-871 9702-784 9702-530C9702-276 9599-198 9460-198C9321-198 9218-276 9218-530M10222-1068L10222-283C10222-66 10318 24 10502 24C10665 24 10772-47 10876-160L10911-160L10927 0L11178 0L11178-1068L10891-1068L10891-315C10820-249 10740-205 10646-205C10565-205 10509-237 10509-357L10509-1068M11408-530C11408-211 11530 26 11804 26C11955 26 12055-46 12117-128L12152-128L12167 0L12418 0L12418-1530L12131-1530L12131-938L12116-938C12065-1020 11964-1091 11812-1091C11532-1091 11408-851 11408-530M11699-530C11699-754 11779-854 11940-854C12002-854 12068-839 12131-804L12131-262C12071-228 12005-212 11939-212C11777-212 11699-307 11699-530",chevron:"M13041-15L13797-562L13797-774L13041-1321L12897-1124L13519-674L13519-662L12897-212",bar:{x:14040,y:-260,width:1e3,height:260}};var m43=catalogue("auth.callbackpage",{"ok.title":{tr:"Giri\u015F yap\u0131ld\u0131",en:"Signed in"},"ok.body":{tr:"Bu sekmeyi kapat\u0131p terminale d\xF6nebilirsiniz.",en:"You can close this tab and go back to the terminal."},"fail.title":{tr:"Giri\u015F tamamlanmad\u0131",en:"Sign-in did not complete"},"fail.body":{tr:"Nedeni terminalde yaz\u0131l\u0131. Sorunu giderip komutu yeniden \xE7al\u0131\u015Ft\u0131r\u0131n.",en:"The terminal says why. Fix it and run the command again."}});function callbackPageHeaders(){return{"Content-Type":"text/html; charset=utf-8","Cache-Control":"no-store","Content-Security-Policy":"default-src 'none'; style-src 'unsafe-inline'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'","Referrer-Policy":"no-referrer"}}var STYLE=':root{--bg:#fff;--surface:#fff;--border:#e4e4e7;--fg:#09090b;--muted:#52525b;--accent:#2563eb;--success:#12883e;--danger:#dc2626;color-scheme:light dark}@media (prefers-color-scheme: dark){:root{--bg:#0a0a0a;--surface:#131313;--border:#2a2a2a;--fg:#fafafa;--muted:#a1a1a1;--accent:#3b82f6;--success:#34d058;--danger:#f04438}}*{box-sizing:border-box}html,body{height:100%;margin:0}body{background:var(--bg);color:var(--fg);font:15px/1.5 "Geist Variable",Geist,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased;display:flex;align-items:center;justify-content:center;padding:16px}main{width:100%;max-width:400px;display:flex;flex-direction:column;align-items:center;gap:24px}.wm{height:22px;width:auto;color:var(--fg)}.wm .m{fill:var(--muted)}.wm .n{fill:currentColor}.wm .a{fill:var(--accent)}.card{width:100%;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:32px 24px;text-align:center}.icon{width:44px;height:44px;margin:0 auto 16px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:1px solid var(--border)}.icon svg{width:22px;height:22px;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.ok svg{stroke:var(--success)}.fail svg{stroke:var(--danger)}h1{font-size:20px;line-height:1.3;font-weight:600;margin:0 0 6px;letter-spacing:-.01em}p{margin:0;color:var(--muted)}.bar{display:block;width:40px;height:3px;border-radius:2px;background:var(--accent);margin:20px auto 0;opacity:.85}';function wordmark(){let g=WORDMARK;return`<svg class="wm" viewBox="${g.viewBox}" role="img" aria-label="Vibecloud"><path class="m" d="${g.slash}"/><path class="n" d="${g.name}"/><path class="m" d="${g.chevron}"/><rect class="a" x="${g.bar.x}" y="${g.bar.y}" width="${g.bar.width}" height="${g.bar.height}" rx="${g.bar.height/2}"/></svg>`}var CHECK='<path d="M5 12.5l4.5 4.5L19 7.5"/>',CROSS='<path d="M7 7l10 10M17 7L7 17"/>';function callbackPage(outcome){let title=m43(outcome==="ok"?"ok.title":"fail.title"),body=m43(outcome==="ok"?"ok.body":"fail.body"),glyph=outcome==="ok"?CHECK:CROSS;return`<!doctype html><html lang="${lang()}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="color-scheme" content="light dark"><title>${title} \xB7 Vibecloud</title><style>${STYLE}</style></head><body><main>`+wordmark()+`<section class="card"><div class="icon ${outcome}"><svg viewBox="0 0 24 24" aria-hidden="true">${glyph}</svg></div><h1>${title}</h1><p>${body}</p><span class="bar" aria-hidden="true"></span></section></main></body></html>`}var m44=catalogue("auth.flow",{"need.client":{tr:"client_id gerekli",en:"client_id is required"},"need.resource":{tr:"audience (resource) gerekli",en:"resource (the audience) is required"},"need.scopes":{tr:"istenecek yetkiler gerekli",en:"the scopes to request are required"},"need.server":{tr:"yetkilendirme sunucusunun bilgileri gerekli",en:"the authorization server details are required"},"need.issuer":{tr:"yetkilendirme sunucusunun issuer bilgisi gerekli",en:"the authorization server\u2019s issuer is required"},cancelled:{tr:"Giri\u015F iptal edildi.",en:"Sign-in was cancelled."},timeout:{tr:"Giri\u015F yap\u0131lamad\u0131: {minutes} dakika i\xE7inde taray\u0131c\u0131dan yan\u0131t gelmedi.",en:"Sign-in did not complete: no answer came from the browser within {minutes} minutes."},state:{tr:"Yetkilendirme yan\u0131t\u0131ndaki state bu iste\u011Fe ait de\u011Fil; yan\u0131t reddedildi.",en:"The state in the authorization response does not belong to this request; it was refused."},noIss:{tr:"Yetkilendirme yan\u0131t\u0131 iss ta\u015F\u0131m\u0131yor; yan\u0131tlayan sunucu do\u011Frulanamaz.",en:"The authorization response carries no iss; which server answered cannot be verified."},wrongIss:{tr:"Yetkilendirme yan\u0131t\u0131 {got} sunucusundan geldi, beklenen {want}.",en:"The authorization response came from {got}; {want} was expected."},noCode:{tr:"Yetkilendirme yan\u0131t\u0131 bir kod ta\u015F\u0131m\u0131yor.",en:"The authorization response carries no code."},unreachable:{tr:"Yetkilendirme adresine ula\u015F\u0131lamad\u0131: {detail}",en:"Could not reach the authorization address: {detail}"},statusUnreadable:{tr:"Yetkilendirme adresi HTTP {status} d\xF6nd\xFCrd\xFC ve yan\u0131t okunamad\u0131: {detail}",en:"The authorization address returned HTTP {status} and the response could not be read: {detail}"},status:{tr:"Yetkilendirme adresi HTTP {status} d\xF6nd\xFCrd\xFC.",en:"The authorization address returned HTTP {status}."},unknownClient:{tr:"Bu sunucu {client} istemcisini tan\u0131m\u0131yor ({code}{detail}). CLI kendini sunucuya kaydetmez; istemci OAUTH_CLIENTS i\xE7inde kay\u0131tl\u0131 olmal\u0131 (Native: true ve {path} yolunu ta\u015F\u0131yan bir loopback adresiyle).",en:"This server does not know the client {client} ({code}{detail}). The CLI does not register itself; the client must be registered in OAUTH_CLIENTS (Native: true, with a loopback address on the path {path})."},badRequest:{tr:"Yetkilendirme iste\u011Fi reddedildi ({code}{detail}). En olas\u0131 neden: {client} istemcisi Native olarak kay\u0131tl\u0131 de\u011Fil ya da kay\u0131tl\u0131 loopback adresinin yolu {path} de\u011Fil. Port serbest b\u0131rak\u0131l\u0131r, yol b\u0131rak\u0131lmaz.",en:"The authorization request was refused ({code}{detail}). Most likely the client {client} is not registered as Native, or its registered loopback address is not on the path {path}. The port may vary; the path may not."},refused:{tr:"Yetkilendirme iste\u011Fi reddedildi ({code}){detail}",en:"The authorization request was refused ({code}){detail}"},accessDenied:{tr:"Yetkilendirme reddedildi ({code}). Taray\u0131c\u0131da konsola giri\u015F yap\u0131n, sonra komutu yeniden \xE7al\u0131\u015Ft\u0131r\u0131n{detail}",en:"Authorization was refused ({code}). Sign in to the console in the browser, then run the command again{detail}"},denied:{tr:"Yetkilendirme reddedildi ({code}){detail}",en:"Authorization was refused ({code}){detail}"},port:{tr:"D\xF6n\xFC\u015F i\xE7in yerel bir port a\xE7\u0131lamad\u0131: {detail}",en:"Could not open a local port for the callback: {detail}"},noAddress:{tr:"adres okunamad\u0131",en:"the address could not be read"},bodyWhat:{tr:"yetkilendirme yan\u0131t\u0131",en:"authorization response"}}),CALLBACK_PATH="/callback",LOGIN_TIMEOUT_MS=5*60*1e3,PREFLIGHT_TIMEOUT_MS=15e3;async function login(signal,config){if(config.clientId==="")throw new Error(m44("need.client"));if(config.resource==="")throw new Error(m44("need.resource"));if(config.scopes.length===0)throw new Error(m44("need.scopes"));if(config.metadata.authorizationEndpoint===""||config.metadata.tokenEndpoint==="")throw new Error(m44("need.server"));if(config.metadata.issuer==="")throw new Error(m44("need.issuer"));let verifier=randomString(32),state=randomString(32),challenge=createHash2("sha256").update(verifier,"utf8").digest("base64url"),slot=new OneSlot,server=createServer();server.headersTimeout=5e3,server.on("request",callbackHandler(slot,state));let port=await listenOnLoopback(server);try{let redirectURI=`http://127.0.0.1:${port}${CALLBACK_PATH}`,authURL=authorizationURL(config,redirectURI,state,challenge);await preflight(signal,authURL,config.clientId),await config.prompt(authURL);let waitSignal=withTimeout(signal,LOGIN_TIMEOUT_MS),got=await slot.take(waitSignal);if(got===void 0)throw signal.aborted?new Error(m44("cancelled")):new Error(m44("timeout",{minutes:LOGIN_TIMEOUT_MS/6e4}));let invalid=validateAuthorizationResponse(got,state,config.metadata.issuer);if(invalid!==void 0)throw invalid;return await exchange(signal,config,redirectURI,got.code,verifier)}finally{server.closeAllConnections(),server.close()}}function validateAuthorizationResponse(got,expectedState,expectedIssuer){if(!sameSecret(got.state,expectedState))return new Error(m44("state"));if(got.issuer==="")return new Error(m44("noIss"));if(got.issuer!==expectedIssuer)return new Error(m44("wrongIss",{got:JSON.stringify(sanitizeDisplay(got.issuer)),want:JSON.stringify(expectedIssuer)}));if(got.errorCode!=="")return authorizationError(got);if(got.code==="")return new Error(m44("noCode"))}async function preflight(signal,authURL,clientId){let res;try{res=await fetch(authURL,{method:"GET",headers:{Accept:"application/json","User-Agent":processAgent()},signal:withTimeout(signal,PREFLIGHT_TIMEOUT_MS),redirect:"manual"})}catch(cause){throw new Error(m44("unreachable",{detail:describeCause(cause)}),{cause})}if(res.status<400)return;let body;try{body=await readCappedBody(res,MAX_AUTH_BODY_BYTES,m44("bodyWhat"))}catch(cause){throw new Error(m44("statusUnreadable",{status:res.status,detail:describeCause(cause)}),{cause})}let failure=parseAuthorizeError(body);if(failure===void 0)throw new Error(m44("status",{status:res.status}));let code=sanitizeDisplay(failure.code);throw failure.code==="invalid_client"?new Error(m44("unknownClient",{client:JSON.stringify(clientId),code,detail:describe5(failure.description),path:CALLBACK_PATH})):failure.code==="invalid_request"?new Error(m44("badRequest",{client:JSON.stringify(clientId),code,detail:describe5(failure.description),path:CALLBACK_PATH})):new Error(m44("refused",{code,detail:describe5(failure.description)}))}var OneSlot=class{#filled=!1;#value;#waiter;offer(value){if(this.#filled)return!1;this.#filled=!0;let waiter=this.#waiter;return waiter!==void 0?(this.#waiter=void 0,waiter(value),!0):(this.#value=value,!0)}async take(signal){if(this.#value!==void 0){let value=this.#value;return this.#value=void 0,value}if(!signal.aborted)return new Promise(resolve5=>{let onAbort=()=>{this.#waiter=void 0,resolve5(void 0)};signal.addEventListener("abort",onAbort,{once:!0}),this.#waiter=value=>{signal.removeEventListener("abort",onAbort),resolve5(value)}})}};function callbackHandler(slot,state){return(req,res)=>{let target=req.url;if(target===void 0){res.writeHead(400,callbackPageHeaders()),res.end(callbackPage("fail"));return}let url=new URL(target,"http://127.0.0.1");if(url.pathname!==CALLBACK_PATH){res.writeHead(404,callbackPageHeaders()),res.end(callbackPage("fail"));return}let query2=url.searchParams,response={code:readParam(query2,"code"),state:readParam(query2,"state"),issuer:readParam(query2,"iss"),errorCode:readParam(query2,"error"),errorDesc:readParam(query2,"error_description")};if(!sameSecret(response.state,state)){res.writeHead(400,callbackPageHeaders()),res.end(callbackPage("fail"));return}if(slot.offer(response),response.errorCode!==""){res.writeHead(400,callbackPageHeaders()),res.end(callbackPage("fail"));return}res.writeHead(200,callbackPageHeaders()),res.end(callbackPage("ok"))}}function authorizationError(response){let code=sanitizeDisplay(response.errorCode);return response.errorCode==="access_denied"?new Error(m44("accessDenied",{code,detail:describe5(response.errorDesc)})):new Error(m44("denied",{code,detail:describe5(response.errorDesc)}))}function describe5(desc){let clean=sanitizeDisplay(desc);return clean===""?"":`: ${clean}`}function sanitizeDisplay(s){return s===""?"":s.replace(DISPLAY_UNSAFE,"")}var DISPLAY_UNSAFE=/[\u0000-\u001F\u007F-\u009F\u200E\u200F\u2028\u2029\u202A-\u202E\u2066-\u2069\uFEFF]/gu;function sameSecret(got,want){let a2=Buffer.from(got,"utf8"),b=Buffer.from(want,"utf8");return a2.length!==b.length?!1:timingSafeEqual(a2,b)}function authorizationURL(config,redirectURI,state,challenge){let query2=new URLSearchParams;query2.set("response_type","code"),query2.set("client_id",config.clientId),query2.set("redirect_uri",redirectURI),query2.set("scope",config.scopes.join(" ")),query2.set("state",state),query2.set("code_challenge",challenge),query2.set("code_challenge_method","S256"),query2.set("resource",config.resource);let separator=config.metadata.authorizationEndpoint.includes("?")?"&":"?";return config.metadata.authorizationEndpoint+separator+query2.toString()}async function exchange(signal,config,redirectURI,code,verifier){let form=new URLSearchParams;form.set("grant_type","authorization_code"),form.set("code",code),form.set("client_id",config.clientId),form.set("redirect_uri",redirectURI),form.set("code_verifier",verifier),form.set("resource",config.resource);let tokens=await postForm(signal,config.metadata.tokenEndpoint,form);return credentialFrom(tokens,config.metadata.tokenEndpoint,config.metadata.issuer,config.clientId,config.now())}function randomString(n3){return randomBytes3(n3).toString("base64url")}function readParam(query2,name){let value=query2.get(name);return value===null?"":value}function parseAuthorizeError(body){let parsed;try{parsed=JSON.parse(body)}catch{return}if(typeof parsed!="object"||parsed===null)return;let record2=parsed,code=record2.error;if(typeof code!="string"||code==="")return;let description=record2.error_description;return{code,description:typeof description=="string"?description:""}}async function listenOnLoopback(server){return new Promise((resolve5,reject)=>{server.once("error",err=>{reject(new Error(m44("port",{detail:err.message}),{cause:err}))}),server.listen(0,"127.0.0.1",()=>{let address=server.address();if(address===null||typeof address=="string"){reject(new Error(m44("port",{detail:m44("noAddress")})));return}resolve5(address.port)})})}var m45=catalogue("auth.device",{"need.client":{tr:"client_id gerekli",en:"client_id is required"},"need.resource":{tr:"audience (resource) gerekli",en:"resource (the audience) is required"},"need.scopes":{tr:"istenecek yetkiler gerekli",en:"the scopes to request are required"},"need.server":{tr:"yetkilendirme sunucusunun bilgileri gerekli",en:"the authorization server details are required"},unsupported:{tr:"Bu sunucu kodla giri\u015Fi (RFC 8628) sunmuyor; ke\u015Fif belgesinde {field} yok. Taray\u0131c\u0131yla giri\u015F i\xE7in vibe login kullan\u0131n. Sunucuda OAUTH_DEVICE_VERIFICATION_URI ayarlanmal\u0131.",en:"This server does not offer code sign-in (RFC 8628); its metadata has no {field}. Use vibe login to sign in with a browser. The server needs OAUTH_DEVICE_VERIFICATION_URI set."},cancelled:{tr:"Giri\u015F iptal edildi.",en:"Sign-in was cancelled."},timeout:{tr:"Kod onaylanmadan s\xFCresi doldu. vibe login --device ile yeni bir kod al\u0131n.",en:"The code expired before it was approved. Get a new one with vibe login --device."},denied:{tr:"Eri\u015Fim reddedildi: kod onay ekran\u0131nda reddedildi.",en:"Access denied: the code was declined on the approval page."},expired:{tr:"Kodun s\xFCresi doldu ya da kod kullan\u0131ld\u0131. vibe login --device ile yeni bir kod al\u0131n.",en:"The code expired or was already used. Get a new one with vibe login --device."},unreachable:{tr:"Kod al\u0131nacak adrese ula\u015F\u0131lamad\u0131: {detail}",en:"Could not reach the code endpoint: {detail}"},status:{tr:"Kod al\u0131nacak adres HTTP {status} d\xF6nd\xFCrd\xFC ({endpoint}).",en:"The code endpoint returned HTTP {status} ({endpoint})."},unparsable:{tr:"Kod yan\u0131t\u0131 \xE7\xF6z\xFCmlenemedi: {detail}",en:"Could not parse the code response: {detail}"},notObject:{tr:"bir nesne bekleniyordu",en:"an object was expected"},missing:{tr:"Kod yan\u0131t\u0131nda {key} eksik.",en:"The code response lacks {key}."},invalid:{tr:"Kod yan\u0131t\u0131nda {key} eksik ya da ge\xE7ersiz.",en:"The code response has a missing or invalid {key}."},endpointWhat:{tr:"cihaz kodu endpoint\u2019i",en:"code endpoint"},verifyWhat:{tr:"do\u011Frulama sayfas\u0131",en:"verification page"},completeWhat:{tr:"tek ad\u0131ml\u0131k do\u011Frulama sayfas\u0131",en:"one-step verification page"},bodyWhat:{tr:"kod yan\u0131t\u0131",en:"code response"},origin:{tr:"Kod yan\u0131t\u0131ndaki verification_uri_complete, do\u011Frulama adresiyle ayn\u0131 kaynakta de\u011Fil.",en:"The verification_uri_complete in the code response is not on the verification address\u2019s origin."}}),DEVICE_GRANT="urn:ietf:params:oauth:grant-type:device_code",SLOW_DOWN_STEP_S=5,DEVICE_LOGIN_TIMEOUT_MS=30*60*1e3;async function loginDevice(signal,config){if(config.clientId==="")throw new Error(m45("need.client"));if(config.resource==="")throw new Error(m45("need.resource"));if(config.scopes.length===0)throw new Error(m45("need.scopes"));if(config.metadata.tokenEndpoint===""||config.metadata.issuer==="")throw new Error(m45("need.server"));if(config.metadata.deviceAuthorizationEndpoint==="")throw new Error(m45("unsupported",{field:"device_authorization_endpoint"}));let started=await startDeviceAuthorization(signal,config);config.prompt(started.userCode,started.verificationURI,started.verificationURIComplete);let deadline=config.now().getTime()+Math.min(started.expiresIn*1e3,DEVICE_LOGIN_TIMEOUT_MS),intervalS=started.interval;for(;;){if(await config.sleep(intervalS*1e3,signal),signal.aborted)throw new Error(m45("cancelled"));if(config.now().getTime()>deadline)throw new Error(m45("timeout"));let form=new URLSearchParams;form.set("grant_type",DEVICE_GRANT),form.set("client_id",config.clientId),form.set("device_code",started.deviceCode);try{let tokens=await postForm(signal,config.metadata.tokenEndpoint,form);return credentialFrom(tokens,config.metadata.tokenEndpoint,config.metadata.issuer,config.clientId,config.now())}catch(cause){if(!(cause instanceof OAuthError))throw cause;switch(cause.code){case"authorization_pending":continue;case"slow_down":intervalS+=SLOW_DOWN_STEP_S;continue;case"access_denied":throw new Error(m45("denied"),{cause});case"expired_token":throw new Error(m45("expired"),{cause});default:throw cause}}}}async function startDeviceAuthorization(signal,config){let endpoint=config.metadata.deviceAuthorizationEndpoint,insecure=requireSecureURL(m45("endpointWhat"),endpoint);if(insecure!==void 0)throw new Error(insecure.message);let form=new URLSearchParams;form.set("client_id",config.clientId),form.set("scope",config.scopes.join(" ")),form.set("resource",config.resource);let res;try{res=await fetch(endpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":processAgent()},body:form.toString(),signal:withTimeout(signal,HTTP_TIMEOUT_MS),redirect:"manual"})}catch(cause){throw new Error(m45("unreachable",{detail:describeCause(cause)}),{cause})}refuseRedirect(res,endpoint);let body=await readCappedBody(res,MAX_AUTH_BODY_BYTES,m45("bodyWhat"));if(res.status!==200)throw new Error(m45("status",{status:res.status,endpoint}));return parseDeviceAuthorization(body)}function parseDeviceAuthorization(body){let parsed;try{parsed=JSON.parse(body)}catch(cause){throw new Error(m45("unparsable",{detail:describeJSONFailure(body)}),{cause})}if(typeof parsed!="object"||parsed===null||Array.isArray(parsed))throw new Error(m45("unparsable",{detail:m45("notObject")}));let doc=parsed,str4=k=>{let v=doc[k];if(typeof v!="string"||v==="")throw new Error(m45("missing",{key:k}));return v},num=k=>{let v=doc[k];if(typeof v!="number"||!Number.isFinite(v)||v<=0)throw new Error(m45("invalid",{key:k}));return v},out={deviceCode:str4("device_code"),userCode:str4("user_code"),verificationURI:str4("verification_uri"),verificationURIComplete:str4("verification_uri_complete"),expiresIn:num("expires_in"),interval:num("interval")},insecure=requireSecureURL(m45("verifyWhat"),out.verificationURI);if(insecure!==void 0)throw new Error(insecure.message);let insecureComplete=requireSecureURL(m45("completeWhat"),out.verificationURIComplete);if(insecureComplete!==void 0)throw new Error(insecureComplete.message);if(new URL(out.verificationURIComplete).origin!==new URL(out.verificationURI).origin)throw new Error(m45("origin"));return out}function sleepFor(ms2,signal){return new Promise(resolve5=>{if(signal.aborted){resolve5();return}let t3=setTimeout(done,ms2);function done(){signal.removeEventListener("abort",done),clearTimeout(t3),resolve5()}signal.addEventListener("abort",done,{once:!0})})}var m46=catalogue("auth.revoke",{noEndpoint:{tr:"iptal adresi gerekli",en:"the revocation address is required"},noToken:{tr:"iptal i\xE7in istemci kimli\u011Fi ve yenileme token\u2019\u0131 gerekli",en:"revocation needs the client ID and the refresh token"},what:{tr:"iptal endpoint\u2019i",en:"revocation endpoint"},unreachable:{tr:"\u0130ptal adresine ula\u015F\u0131lamad\u0131: {detail}",en:"Could not reach the revocation address: {detail}"},bodyWhat:{tr:"iptal yan\u0131t\u0131",en:"revocation response"}});async function revokeRefreshToken(signal,endpoint,clientId,refreshToken){if(endpoint==="")throw new Error(m46("noEndpoint"));if(clientId===""||refreshToken==="")throw new Error(m46("noToken"));let insecure=requireSecureURL(m46("what"),endpoint);if(insecure!==void 0)throw new Error(insecure.message);let form=new URLSearchParams;form.set("token",refreshToken),form.set("token_type_hint","refresh_token"),form.set("client_id",clientId);let res;try{res=await fetch(endpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":processAgent()},body:form.toString(),signal:withTimeout(signal,HTTP_TIMEOUT_MS),redirect:"manual"})}catch(cause){throw new Error(m46("unreachable",{detail:describeCause(cause)}),{cause})}refuseRedirect(res,endpoint);let body=await readCappedBody(res,MAX_AUTH_BODY_BYTES,m46("bodyWhat"));if(res.status===200)return;let code="unknown",description="";try{let parsed=JSON.parse(body);if(typeof parsed=="object"&&parsed!==null&&!Array.isArray(parsed)){let doc=parsed;typeof doc.error=="string"&&(code=doc.error),typeof doc.error_description=="string"&&(description=doc.error_description)}}catch{}throw new OAuthError(code,description,res.status)}var m47=catalogue("session",{"config.noApi":{tr:"API adresi ayarlanmam\u0131\u015F. VIBECLOUD_API de\u011Fi\u015Fkenini kontrol edin.",en:"The API address is not set. Check VIBECLOUD_API."},"config.noResource":{tr:"API kayna\u011F\u0131 (audience) ayarlanmam\u0131\u015F. VIBECLOUD_API ayarl\u0131yken giri\u015F, token\u2019\u0131n verilece\u011Fi API kayna\u011F\u0131n\u0131 da bilmeli.",en:"The API resource (audience) is not set. With VIBECLOUD_API set, sign-in must also know which API resource the token is for."},"config.noResourceFix":{tr:"VIBECLOUD_OAUTH_RESOURCE de\u011Fi\u015Fkenini API adresine (/query olmadan) ayarlay\u0131n ya da --resource verin.",en:"Set VIBECLOUD_OAUTH_RESOURCE to the API address (without /query), or pass --resource."},"bound.unknown":{tr:"belirlenemedi (token org_id ta\u015F\u0131m\u0131yor ya da okunamad\u0131)",en:"unknown (the token carries no readable org_id)"},"browser.open":{tr:"Taray\u0131c\u0131da \u015Fu adresi a\xE7\u0131n ve hesab\u0131n\u0131zla giri\u015F yap\u0131n:",en:"Open this address in a browser and sign in with your account:"},"browser.failed":{tr:"Taray\u0131c\u0131 a\xE7\u0131lamad\u0131; adresi kendiniz a\xE7\u0131n.",en:"Could not open a browser; open the address yourself."},"browser.wait":{tr:"Taray\u0131c\u0131da giri\u015F bekleniyor",en:"Waiting for the browser sign-in"},"device.code":{tr:"Tek kullan\u0131ml\u0131k kodunuz: {code}",en:"Your one-time code: {code}"},"device.open":{tr:"Giri\u015F yapm\u0131\u015F oldu\u011Funuz bir taray\u0131c\u0131da \u015Fu adresi a\xE7\u0131n ve kodu girin:",en:"In a signed-in browser, open this address and enter the code:"},"device.complete":{tr:"Tek ad\u0131mda: {url}",en:"In one step: {url}"},"device.wait":{tr:"Onay bekleniyor",en:"Waiting for approval"},"link.open":{tr:"Taray\u0131c\u0131da giri\u015F sayfas\u0131 a\xE7\u0131l\u0131yor. Hesab\u0131n\u0131za girin ya da hesap olu\u015Fturun, sonra kodu onaylay\u0131n:",en:"Opening the sign-in page in a browser. Sign in or create an account, then confirm the code:"},"link.waitManual":{tr:"Onay bekleniyor (taray\u0131c\u0131 a\xE7\u0131lamad\u0131; adresi kendiniz a\xE7\u0131n)",en:"Waiting for approval (could not open a browser; open the address yourself)"},approved:{tr:"Giri\u015F onayland\u0131",en:"Sign-in approved"},"probe.noAccount":{tr:"API bir hesap kimli\u011Fi d\xF6nd\xFCrmedi.",en:"The API returned no account ID."},"probe.removalFailed":{tr:" (oturum dosyas\u0131 silinemedi: {detail})",en:" (the session file could not be removed: {detail})"},"probe.rejected":{tr:"Yetkilendirme sunucusu bir token verdi ama API onu kabul etmedi; oturum saklanmad\u0131{removal}. En olas\u0131 neden: istenen audience (resource) bu platformun kabul etti\u011Fi de\u011Fer de\u011Fil. VIBECLOUD_OAUTH_RESOURCE de\u011Ferini kontrol edin; MCP sunucusunun audience de\u011Feri de\u011Fil, API\u2019ninki olmal\u0131.",en:"The authorization server issued a token but the API did not accept it; the session was not kept{removal}. Most likely the requested audience (resource) is not the one this deployment accepts. Check VIBECLOUD_OAUTH_RESOURCE; it must be the API\u2019s audience, not the MCP server\u2019s."},"probe.unreachable":{tr:"Oturum sakland\u0131 ama do\u011Frulanamad\u0131; API\u2019ye ula\u015F\u0131lamad\u0131: {detail}",en:"The session was kept but could not be verified; the API was unreachable: {detail}"},"role.noCli":{tr:"Giri\u015F yap\u0131ld\u0131, ama bu hesab\u0131n kurulu\u015Ftaki rol\xFC komut sat\u0131r\u0131 eri\u015Fimi vermiyor (fatura rol\xFC yaln\u0131zca konsolun Faturaland\u0131rma sayfas\u0131n\u0131 kullan\u0131r). Oturum iptal edildi ve saklanmad\u0131.",en:"Sign-in completed, but this account\u2019s role in the organization gives no command-line access (the billing role uses only the Billing page in the console). The session was revoked and not kept."},"role.noCliKept":{tr:"Bu hesab\u0131n kurulu\u015Ftaki rol\xFC komut sat\u0131r\u0131 eri\u015Fimi vermiyor, ama token iptal edilemedi; oturum sakland\u0131. Ba\u011Flant\u0131 d\xFCzelince vibe logout \xE7al\u0131\u015Ft\u0131r\u0131n.",en:"This account\u2019s role in the organization gives no command-line access, but the token could not be revoked; the session was kept. Run vibe logout once the connection is back."},"login.done":{tr:"{who} olarak giri\u015F yap\u0131ld\u0131",en:"Signed in as {who}"},"login.doneOrg":{tr:"{who} olarak giri\u015F yap\u0131ld\u0131 \xB7 {org}",en:"Signed in as {who} \xB7 {org}"},"login.multiOrg":{tr:"Hesab\u0131n\u0131z {count} organizasyonun \xFCyesi; bu oturum yaln\u0131zca \u015Fu organizasyonda \xE7al\u0131\u015F\u0131r: {org}",en:"Your account belongs to {count} organizations; this session works only in: {org}"},"login.whoamiHint":{tr:"Oturumun ayr\u0131nt\u0131lar\u0131 i\xE7in:",en:"For the session details:"},"login.orgInvisible":{tr:"{org} organizasyonu bu hesapla g\xF6r\xFCnm\xFCyor (g\xF6r\xFCnenler: {orgs}); oturum yine de sakland\u0131.",en:"Organization {org} is not visible to this account (visible: {orgs}); the session was kept anyway."},"login.orgMismatch":{tr:"--org {wanted} istendi, ancak oturum {bound} organizasyonuna ba\u011Fl\u0131. Oturum sakland\u0131 ve {bound} i\xE7in ge\xE7erli, {wanted} i\xE7in de\u011Fil. Yetkilendirme sunucusu organizasyonu giri\u015F yapan hesaptan al\u0131r, komuttan de\u011Fil.",en:"--org {wanted} was requested, but the session belongs to {bound}. The session was kept and is valid for {bound}, not for {wanted}. The authorization server takes the organization from the signed-in account, not from the command."},"env.note":{tr:"VIBECLOUD_TOKEN ayarl\u0131: komutlar onunla \xE7al\u0131\u015Fmaya devam eder. \xC7\u0131kmak i\xE7in de\u011Fi\u015Fkeni kald\u0131r\u0131n:",en:"VIBECLOUD_TOKEN is set: commands keep running with it. To sign out, unset it:"},"revoke.incomplete":{tr:"oturumda yenileme token\u2019\u0131, istemci kimli\u011Fi ya da token adresi yok",en:"the session has no refresh token, client ID or token address"},"revoke.issuerMismatch":{tr:"oturumu veren sunucu ({tokenUrl}) ke\u015Fif belgesindeki token adresiyle ({endpoint}) e\u015Fle\u015Fmiyor",en:"the server that issued the session ({tokenUrl}) does not match the token address in its metadata ({endpoint})"},"revoke.unsupported":{tr:"bu API s\xFCr\xFCm\xFC token iptalini (RFC 7009) sunmuyor",en:"this API version does not offer token revocation (RFC 7009)"},"logout.none":{tr:"Zaten giri\u015F yap\u0131lmam\u0131\u015F.",en:"You are not signed in."},"logout.unreadable":{tr:"Oturum dosyas\u0131 okunamad\u0131, bu y\xFCzden oturum sunucuda kapat\u0131lamaz ({detail}). Yaln\u0131zca bu makineden silmek i\xE7in: vibe logout --local",en:"The session file could not be read, so the session cannot be ended on the server ({detail}). To remove it from this machine only: vibe logout --local"},"logout.unreadableRemoved":{tr:"Oturum dosyas\u0131 bu makineden silindi",en:"The session file was removed from this machine"},"logout.unreadableNote":{tr:"Dosya okunamad\u0131\u011F\u0131 i\xE7in oturum sunucuda kapat\u0131lamad\u0131.",en:"The file could not be read, so the session was not ended on the server."},"logout.localDone":{tr:"\xC7\u0131k\u0131\u015F yap\u0131ld\u0131; oturum yaln\u0131zca bu makineden silindi",en:"Signed out; the session was removed from this machine only"},"logout.localPat":{tr:"Eri\u015Fim anahtar\u0131 ge\xE7erlili\u011Fini koruyor. Sona erdirmek i\xE7in konsolda Ayarlar > Eri\u015Fim anahtarlar\u0131 b\xF6l\xFCm\xFCnden iptal edin; parola s\u0131f\u0131rlamak anahtarlar\u0131 iptal etmez.",en:"The access key is still valid. To end it, revoke it in the console under Settings > Access keys; resetting the password does not revoke keys."},"logout.localOauth":{tr:"Oturum sunucuda kapat\u0131lmad\u0131: silinen token\u2019\u0131n bir kopyas\u0131 son kullan\u0131m\u0131ndan itibaren 400 g\xFCn ge\xE7erli kal\u0131r. Hepsini sona erdirmek i\xE7in parolan\u0131z\u0131 s\u0131f\u0131rlay\u0131n; bu, hesab\u0131n b\xFCt\xFCn oturumlar\u0131n\u0131 kapat\u0131r.",en:"The session was not ended on the server: a copy of the removed token stays valid for 400 days from its last use. To end them all, reset your password; that ends every session of the account."},"logout.incomplete":{tr:"Oturumda yenileme token\u2019\u0131 var ama iptal i\xE7in gereken token adresi ya da istemci kimli\u011Fi eksik. Yaln\u0131zca bu makineden silmek i\xE7in: vibe logout --local",en:"The session has a refresh token but lacks the token address or client ID needed to revoke it. To remove it from this machine only: vibe logout --local"},"logout.patDone":{tr:"\xC7\u0131k\u0131\u015F yap\u0131ld\u0131; eri\u015Fim anahtar\u0131 bu makineden silindi",en:"Signed out; the access key was removed from this machine"},"logout.patNote":{tr:"Anahtar\u0131n kendisi ge\xE7erlili\u011Fini koruyor. Sona erdirmek i\xE7in konsolda Ayarlar > Eri\u015Fim anahtarlar\u0131 b\xF6l\xFCm\xFCnden iptal edin.",en:"The key itself is still valid. To end it, revoke it in the console under Settings > Access keys."},"logout.revokeFailed":{tr:"Oturum sunucuda kapat\u0131lamad\u0131 ({detail}). Oturum dosyas\u0131 silinmedi: ba\u011Flant\u0131 d\xFCzelince vibe logout komutunu yeniden \xE7al\u0131\u015Ft\u0131r\u0131n. Yaln\u0131zca bu makineden silmek i\xE7in: vibe logout --local",en:"The session could not be ended on the server ({detail}). The session file was kept: run vibe logout again once the connection is back. To remove it from this machine only: vibe logout --local"},"logout.rotating":{tr:"Oturum bu komut \xE7al\u0131\u015F\u0131rken tekrar tekrar yenilendi; ba\u015Fka bir vibe s\xFCreci \xE7al\u0131\u015F\u0131yor. \xD6b\xFCr s\xFCre\xE7ler bitince vibe logout komutunu yeniden \xE7al\u0131\u015Ft\u0131r\u0131n.",en:"The session was renewed repeatedly while this ran; another vibe process is running. Run vibe logout again once the others have finished."},"logout.done":{tr:"\xC7\u0131k\u0131\u015F yap\u0131ld\u0131; oturum sunucuda kapat\u0131ld\u0131 ve bu makineden silindi",en:"Signed out; the session was ended on the server and removed from this machine"},"logout.accessNote":{tr:"Eri\u015Fim token\u2019\u0131 en fazla 15 dakika daha ge\xE7erli kal\u0131r; o iptal edilemez.",en:"The access token stays valid for at most 15 more minutes; it cannot be revoked."},"org.none":{tr:"Bu hesap hen\xFCz hi\xE7bir organizasyona ba\u011Fl\u0131 de\u011Fil.",en:"This account belongs to no organization yet."},"org.noneHint":{tr:"Bir organizasyon olu\u015Fturmak i\xE7in konsolda kayd\u0131 tamamlay\u0131n, sonra:",en:"Finish signing up in the console to create an organization, then:"},"org.opaque":{tr:"Bu oturum ba\u011Fl\u0131 oldu\u011Fu organizasyonu ta\u015F\u0131m\u0131yor; bu bilgi sunucuda saklan\u0131yor.",en:"This session does not carry which organization it belongs to; the server keeps that."},"col.org":{tr:"organizasyon",en:"organization"},"col.name":{tr:"ad",en:"name"},"col.standing":{tr:"durum",en:"standing"},"col.session":{tr:"oturum",en:"session"},"org.thisSession":{tr:"bu oturum",en:"this session"},"standing.ACTIVE":{tr:"Etkin",en:"Active"},"standing.TRIAL":{tr:"Deneme",en:"Trial"},"standing.PAST_DUE":{tr:"\xD6deme gecikti",en:"Past due"},"standing.READ_ONLY":{tr:"Salt okunur",en:"Read-only"},"standing.SUSPENDED":{tr:"Ask\u0131ya al\u0131nd\u0131",en:"Suspended"},"who.org":{tr:"Organizasyon",en:"Organization"},"who.others":{tr:"Di\u011Fer \xFCyelikler",en:"Other memberships"},"who.credential":{tr:"Oturum",en:"Session"},"who.expiry":{tr:"Eri\u015Fim token\u2019\u0131",en:"Access token"},"who.api":{tr:"Sunucu",en:"Server"},"who.dangerous":{tr:"Riskli i\u015Flemler",en:"Risky actions"},"who.dangerousValue":{tr:"yaln\u0131zca konsoldan (iki ad\u0131ml\u0131 do\u011Frulama gerekir)",en:"console only (two-step verification is required)"},"who.kind.env":{tr:"VIBECLOUD_TOKEN de\u011Fi\u015Fkeni",en:"the VIBECLOUD_TOKEN variable"},"who.kind.pat":{tr:"eri\u015Fim anahtar\u0131",en:"access key"},"who.kind.oauth":{tr:"vibe login oturumu",en:"vibe login session"},"who.expiry.none":{tr:"istemcide bir son kullanma tarihi yok",en:"no expiry known on this side"},"who.expiry.renews":{tr:"{when} sona erer, sonra kendili\u011Finden yenilenir",en:"expires {when}, then renews itself"},"who.expiry.at":{tr:"{when} sona erer",en:"expires {when}"},"who.noEmail":{tr:"e-posta yok",en:"no email"},"who.unknownOrg":{tr:"sunucuda saklan\u0131yor",en:"kept on the server"}}),PROBE_QUERY="query { viewer { id email } orgs { id slug displayName standing } }";function requireLoginConfig(cfg,out){if(cfg.apiEndpoint==="")return out.printRefusal("INTERNAL",m47("config.noApi"),["VIBECLOUD_API"],"","",{}),new Error("login: API endpoint required");if(cfg.oauthResource==="")return out.printLocalRefusal("INVALID_ARGUMENT",m47("config.noResource"),m47("config.noResourceFix")),new Error("login: OAuth resource required")}function boundSlug(token,orgs){let id2=boundOrgOf(token);if(id2==="")return"";let match=orgs.find(o=>o.id===id2);return match===void 0?"":match.slug}function boundLabel(token,orgs){let slug=boundSlug(token,orgs);if(slug!=="")return slug;let id2=boundOrgOf(token);return id2!==""?id2:m47("bound.unknown")}function orgSlugsOf(orgs){return orgs.map(o=>o.slug).sort()}function requestedScopes(explicit,metadata){return explicit.length>0?explicit:metadata.scopesSupported}function must(out,line){out.diagnostic(line)}async function promptBrowser(authorizationURL2,out){let st=out.errStyle;return must(out,m47("browser.open")),must(out,` ${st.bold(authorizationURL2)}`),await openBrowser(authorizationURL2)!==void 0&&out.warn(m47("browser.failed")),out.step(m47("browser.wait"))}function promptDevice(code,uri,complete,out){let st=out.errStyle;return must(out,`${st.yellow(MARK.warn)} ${m47("device.code",{code:st.bold(code)})}`),must(out,` ${m47("device.open")}`),must(out,` ${st.bold(uri)}`),must(out,` ${st.dim(m47("device.complete",{url:complete}))}`),out.step(m47("device.wait"))}function loginForInit(ctx,link){return runLogin(ctx,link)}function promptLink(code,complete,link,out){let st=out.errStyle,extra=link.extra.toString(),full=extra===""?complete:`${complete}${complete.includes("?")?"&":"?"}${extra}`;must(out,m47("link.open")),must(out,` ${st.bold(full)}`),must(out,`${st.yellow(MARK.warn)} ${m47("device.code",{code:st.bold(code)})}`);let waiting=out.step(m47("device.wait"));return link.open(full).then(failed2=>{failed2!==void 0&&waiting.update(m47("link.waitManual"))}),waiting}async function runLogin(ctx,link){let{signal,out,flags,config,now}=ctx,clientIdFlag=str(flags,"client-id"),clientId=clientIdFlag===""?config.oauthClientId:clientIdFlag,resourceFlag=str(flags,"resource"),resource=resourceFlag===""?config.oauthResource:resourceFlag,scopeFlag2=str(flags,"scope"),scopes=scopeFlag2===""?config.oauthScopes:scopeFlag2.split(/\s+/).filter(s=>s!==""),resolved={...config,oauthClientId:clientId,oauthResource:resource,oauthScopes:scopes},bad=requireLoginConfig(resolved,out);if(bad!==void 0)throw bad;let metadata;try{metadata=await discover(signal,resolved.apiEndpoint)}catch(cause){throw out.printError("INTERNAL",cause instanceof Error?cause.message:String(cause)),cause}let waiting,cred;try{cred=link!==null||bool(flags,"device")?await loginDevice(signal,{metadata,clientId:resolved.oauthClientId,resource:resolved.oauthResource,scopes:requestedScopes(resolved.oauthScopes,metadata),prompt:(code,uri,complete)=>{waiting=link===null?promptDevice(code,uri,complete,out):promptLink(code,complete,link,out)},now,sleep:link===null?sleepFor:link.sleep}):await login(signal,{metadata,clientId:resolved.oauthClientId,resource:resolved.oauthResource,scopes:requestedScopes(resolved.oauthScopes,metadata),prompt:async url=>{waiting=await promptBrowser(url,out)},now})}catch(cause){throw out.printError("UNAUTHENTICATED",cause instanceof Error?cause.message:String(cause)),cause}waiting!==void 0&&waiting.succeed(m47("approved")),save(resolved.tokenFile,cred);let client=newClient(resolved.apiEndpoint,cred.accessToken),probe;try{if(probe=await client.query(signal,PROBE_QUERY,{}),probe.viewer.id==="")throw new Error(`INTERNAL: ${m47("probe.noAccount")}`)}catch(cause){if(codeOf(cause)==="UNAUTHENTICATED"){let removal="";try{deleteCredential(resolved.tokenFile)}catch(rm){rm instanceof NoCredentialError||(removal=m47("probe.removalFailed",{detail:rm instanceof Error?rm.message:String(rm)}))}throw out.printError("UNAUTHENTICATED",m47("probe.rejected",{removal})),cause}if(codeOf(cause)==="FORBIDDEN_ROLE"&&await accountReadable(signal,client)){let{refreshToken,clientId:clientId2}=cred;if(refreshToken!==void 0&&clientId2!==void 0&&metadata.revocationEndpoint!=="")try{await revokeRefreshToken(signal,metadata.revocationEndpoint,clientId2,refreshToken)}catch(rv){throw out.printError("FORBIDDEN_ROLE",`${roleWithoutCliAccessKept()} (${rv instanceof Error?rv.message:String(rv)})`),cause}try{deleteCredential(resolved.tokenFile)}catch(rm){rm instanceof NoCredentialError||out.printError("INTERNAL",rm instanceof Error?rm.message:String(rm))}throw out.printError("FORBIDDEN_ROLE",roleWithoutCliAccess()),cause}throw printAPIError(new Error(m47("probe.unreachable",{detail:cause instanceof Error?cause.message:String(cause)})),out),cause}emitDoc(out,{account:probe.viewer.id,email:probe.viewer.email,boundOrg:boundLabel(cred.accessToken,probe.orgs),accountOrgs:probe.orgs,expiresAt:cred.expiresAt,scopes:cred.scopes,issuer:cred.issuer,canPerformDangerousActions:cred.scopes!==void 0&&cred.scopes.includes(DANGEROUS_SCOPE)});let who=probe.viewer.email===""?probe.viewer.id:probe.viewer.email,bound=boundSlug(cred.accessToken,probe.orgs);if(out.success(bound===""?m47("login.done",{who}):m47("login.doneOrg",{who,org:out.errStyle.bold(bound)})),link!==null)return 0;probe.orgs.length>1&&out.say(`${MARK.item} ${m47("login.multiOrg",{count:probe.orgs.length,org:boundLabel(cred.accessToken,probe.orgs)})}`);let wanted=str(flags,"org");if(wanted!==""){if(!probe.orgs.some(o=>o.slug===wanted))throw new Error(`NOT_FOUND: ${m47("login.orgInvisible",{org:wanted,orgs:orgSlugsOf(probe.orgs).join(", ")})}`);if(bound!==""&&bound!==wanted)throw new Error(`FORBIDDEN_ROLE: ${m47("login.orgMismatch",{wanted,bound})}`)}return out.hint(m47("login.whoamiHint"),"vibe whoami"),0}function envTokenNote(out){out.warn(m47("env.note")),out.hint("","unset VIBECLOUD_TOKEN")}var MAX_ROTATIONS_FOLLOWED=3;async function revokeAtIssuer(signal,cred){let{refreshToken,clientId,tokenUrl}=cred;if(refreshToken===void 0||clientId===void 0||tokenUrl===void 0)throw new Error(m47("revoke.incomplete"));let metadata=await discover(signal,tokenUrl);if(metadata.tokenEndpoint!==tokenUrl)throw new Error(m47("revoke.issuerMismatch",{tokenUrl,endpoint:metadata.tokenEndpoint}));if(metadata.revocationEndpoint==="")throw new Error(m47("revoke.unsupported"));await revokeRefreshToken(signal,metadata.revocationEndpoint,clientId,refreshToken)}function refuseLogout(out,message2,envToken){return out.printRefusal("INTERNAL",message2,void 0,"vibe logout --local","",{deleted:!1,serverSessionEnded:!1,envToken}),1}function removeLocal(out,path){try{deleteCredential(path)}catch(cause){if(cause instanceof NoCredentialError)return;throw out.printError("INTERNAL",cause instanceof Error?cause.message:String(cause)),cause}}async function runLogout(ctx){let{out,config,signal,flags}=ctx,localOnly=bool(flags,"local"),envToken=config.token!=="",cred;try{cred=load(config.tokenFile).credential}catch(cause){return cause instanceof NoCredentialError?(emitDoc(out,{deleted:!1,serverSessionEnded:!1,envToken}),out.say(m47("logout.none")),envToken&&envTokenNote(out),0):localOnly?(removeLocal(out,config.tokenFile),emitDoc(out,{deleted:!0,serverSessionEnded:!1,envToken}),out.success(m47("logout.unreadableRemoved")),out.warn(m47("logout.unreadableNote")),0):refuseLogout(out,m47("logout.unreadable",{detail:cause instanceof Error?cause.message:String(cause)}),envToken)}if(localOnly)return removeLocal(out,config.tokenFile),emitDoc(out,{deleted:!0,serverSessionEnded:!1,envToken}),out.success(m47("logout.localDone")),out.warn(opaque(cred)?m47("logout.localPat"):m47("logout.localOauth")),envToken&&envTokenNote(out),0;if(!opaque(cred)&&!renewable(cred))return refuseLogout(out,m47("logout.incomplete"),envToken);if(opaque(cred))return removeLocal(out,config.tokenFile),emitDoc(out,{deleted:!0,serverSessionEnded:!1,envToken}),out.success(m47("logout.patDone")),out.warn(m47("logout.patNote")),envToken&&envTokenNote(out),0;for(let round=0;;round++){try{await revokeAtIssuer(signal,cred)}catch(cause){return refuseLogout(out,m47("logout.revokeFailed",{detail:cause instanceof Error?cause.message:String(cause)}),envToken)}let current2;try{current2=load(config.tokenFile).credential}catch(cause){if(cause instanceof NoCredentialError)break;throw cause}if(current2.refreshToken===cred.refreshToken)break;if(round+1>=MAX_ROTATIONS_FOLLOWED||!renewable(current2))return refuseLogout(out,m47("logout.rotating"),envToken);cred=current2}return removeLocal(out,config.tokenFile),emitDoc(out,{deleted:!0,serverSessionEnded:!0,envToken}),out.success(m47("logout.done")),out.say(`${out.errStyle.dim(MARK.item)} ${m47("logout.accessNote")}`),envToken&&envTokenNote(out),0}var ORGS_QUERY2="query { orgs { id slug displayName standing } }";function roleWithoutCliAccess(){return m47("role.noCli")}function roleWithoutCliAccessKept(){return m47("role.noCliKept")}async function accountReadable(signal,client){try{return(await client.query(signal,"query { viewer { id } }",{})).viewer.id!==""}catch{return!1}}function standingWord(out,standing){let st=out.outStyle;switch(standing){case"ACTIVE":case"TRIAL":return st.green(m47(`standing.${standing}`));case"PAST_DUE":case"READ_ONLY":return st.yellow(m47(`standing.${standing}`));case"SUSPENDED":return st.red(m47("standing.SUSPENDED"));default:return standing}}async function runOrg(ctx){let{signal,out,config,now}=ctx,client=await apiClient(signal,config,now,out),orgs;try{orgs=(await client.query(signal,ORGS_QUERY2,{})).orgs}catch(cause){throw printAPIError(cause,out),cause}let boundId=client.boundOrg();return emitDoc(out,{orgs,boundOrgId:boundId}),out.table([{header:upper(m47("col.org"))},{header:upper(m47("col.name")),flexible:!0},{header:upper(m47("col.standing"))},{header:upper(m47("col.session"))}],orgs.map(o=>[o.slug,o.displayName,standingWord(out,o.standing),boundId!==""&&o.id===boundId?`${MARK.ok} ${m47("org.thisSession")}`:""]),m47("org.none")),orgs.length===0?(out.hint(m47("org.noneHint"),"vibe login"),0):(boundId===""&&out.say(`${MARK.item} ${m47("org.opaque")}`),0)}function detail(out,title,rows){out.print(out.outStyle.bold(title));let width=Math.max(...rows.map(([k])=>visibleWidth(k)));for(let[k,v]of rows)out.print(`${padEndVisible(k,width)} ${v}`)}async function runWhoami(ctx){let{signal,out,config,now}=ctx,client=await apiClient(signal,config,now,out),probe;try{probe=await client.query(signal,PROBE_QUERY,{})}catch(cause){throw printAPIError(cause,out),cause}let kind,expiresAt,renews=!1;if(config.token!=="")kind="env";else{let cred=load(config.tokenFile).credential;kind=opaque(cred)?"pat":"oauth",expiresAt=cred.expiresAt,renews=renewable(cred)}let boundId=client.boundOrg(),bound=probe.orgs.find(o=>o.id===boundId),others=probe.orgs.filter(o=>o.id!==boundId).map(o=>o.slug);emitDoc(out,{account:probe.viewer.id,email:probe.viewer.email,boundOrg:boundLabel(client.token,probe.orgs),accountOrgs:probe.orgs,credential:kind,...expiresAt===void 0?{}:{expiresAt},api:config.apiEndpoint});let orgValue=bound!==void 0?bound.displayName===""?bound.slug:`${bound.slug} (${bound.displayName})`:boundId!==""?boundId:m47("who.unknownOrg"),at=now(),expiry=expiresAt===void 0?m47("who.expiry.none"):renews?m47("who.expiry.renews",{when:relativeTime(expiresAt,at)}):m47("who.expiry.at",{when:relativeTime(expiresAt,at)}),rows=[[m47("who.org"),orgValue]];return bound!==void 0&&others.length>0&&rows.push([m47("who.others"),others.join(", ")]),bound===void 0&&probe.orgs.length>0&&rows.push([m47("who.others"),orgSlugsOf(probe.orgs).join(", ")]),rows.push([m47("who.credential"),m47(`who.kind.${kind}`)]),kind!=="env"&&rows.push([m47("who.expiry"),expiry]),rows.push([m47("who.api"),config.apiEndpoint]),rows.push([m47("who.dangerous"),m47("who.dangerousValue")]),detail(out,probe.viewer.email===""?probe.viewer.id:probe.viewer.email,rows),0}var SESSION_COMMANDS=[{path:["login"],summary:"Taray\u0131c\u0131yla giri\u015F yapar",description:"Taray\u0131c\u0131da hesab\u0131n\u0131zla giri\u015F yapar ve oturumu bu makinede saklar. Taray\u0131c\u0131 olmayan bir makinede (SSH, kapsay\u0131c\u0131, ajan) --device ile bir kod al\u0131n ve onu ba\u015Fka bir cihazda onaylay\u0131n.",note:"VIBECLOUD_API ayarl\u0131ysa VIBECLOUD_OAUTH_RESOURCE de gerekir",examples:["vibe login","vibe login --device"],kind:"runs",listed:!0,flags:[{...ORG_FLAG,summary:"Beklenen organizasyon (se\xE7mez; oturumun ona ba\u011Fl\u0131 oldu\u011Funu do\u011Frular)"},{name:"client-id",type:"string",placeholder:"kimlik",summary:"Kay\u0131tl\u0131 OAuth istemci kimli\u011Fi (VIBECLOUD_OAUTH_CLIENT_ID)"},{name:"resource",type:"string",placeholder:"url",summary:"Token\u2019\u0131n audience de\u011Feri (VIBECLOUD_OAUTH_RESOURCE)"},{name:"scope",type:"string",placeholder:"yetkiler",summary:"\u0130stenecek yetkiler, bo\u015Flukla ayr\u0131lm\u0131\u015F (VIBECLOUD_OAUTH_SCOPES; bo\u015Fsa sunucunun ilan ettikleri)"},{name:"device",type:"boolean",summary:"Kodla giri\u015F: kodu ba\u015Fka bir cihaz\u0131n taray\u0131c\u0131s\u0131nda onaylars\u0131n\u0131z"}],run:ctx=>runLogin(ctx,null),coverage:[{argv:["login","--client-id",""],ok:!1},{argv:["login","--device","--client-id",""],ok:!1}]},{path:["logout"],summary:"Oturumu kapat\u0131r ve bu makineden siler",description:"Oturumu sunucuda kapat\u0131r, sonra bu makineden siler. Sunucuya ula\u015F\u0131lamazsa oturum dosyas\u0131 saklan\u0131r; --local onu sunucuya ba\u011Flanmadan siler.",examples:["vibe logout","vibe logout --local"],kind:"runs",listed:!0,flags:[{name:"local",type:"boolean",summary:"Sunucuya ba\u011Flanmadan yaln\u0131zca bu makineden siler (token ge\xE7erli kal\u0131r)"}],run:runLogout,coverage:[{argv:["logout"],ok:!0}]},{path:["whoami"],summary:"Giri\u015F yap\u0131lan hesab\u0131 ve oturumu g\xF6sterir",examples:["vibe whoami","vibe whoami --json"],kind:"runs",listed:!0,flags:[],run:runWhoami,coverage:[{argv:["whoami"],ok:!1}]},{path:["org"],summary:"\xDCyesi oldu\u011Funuz organizasyonlar\u0131 listeler",description:"\xDCyesi oldu\u011Funuz organizasyonlar\u0131 listeler ve bu oturumun hangisinde \xE7al\u0131\u015Ft\u0131\u011F\u0131n\u0131 i\u015Faretler. Bir oturum yaln\u0131zca giri\u015F yapt\u0131\u011F\u0131 organizasyonda \xE7al\u0131\u015F\u0131r.",examples:["vibe org","vibe org --json"],kind:"runs",listed:!0,flags:[],run:runOrg,coverage:[{argv:["org"],ok:!1}]}];var m48=catalogue("init",{intro:{tr:"Bu dizini Vibecloud\u2019da yay\u0131na alal\u0131m.",en:"Let\u2019s put this directory live on Vibecloud."},"wait.invalid":{tr:"--wait saniye cinsinden bir tam say\u0131 olmal\u0131, {value} de\u011Fil.",en:"--wait must be a whole number of seconds, not {value}."},"wait.fix":{tr:"vibe init --wait 900",en:"vibe init --wait 900"},"slug.underived":{tr:"Proje ad\u0131 bu dizinden t\xFCretilemedi ({slug}); --project ile bir ad verin.",en:"Could not derive a project name from this directory ({slug}); pass one with --project."},"slug.invalid":{tr:"{slug} bir proje ad\u0131 olamaz; --project ile ge\xE7erli bir ad verin.",en:"{slug} cannot be a project name; pass a valid one with --project."},"slug.fix":{tr:"vibe init --project <ad> (k\xFC\xE7\xFCk harf, rakam ve tire; 3\u201340 karakter)",en:"vibe init --project <name> (lowercase letters, digits and dashes; 3\u201340 characters)"},"slug.rule":{tr:"K\xFC\xE7\xFCk harf, rakam ve tire kullan\u0131n; 3\u201340 karakter.",en:"Use lowercase letters, digits and dashes; 3\u201340 characters."},"slug.reserved":{tr:"Bu ad ayr\u0131lm\u0131\u015F; ba\u015Fka bir ad se\xE7in.",en:"This name is reserved; choose another."},"login.missing":{tr:"login komutu bulunamad\u0131.",en:"The login command is missing."},"login.failed":{tr:"Giri\u015F yap\u0131lamad\u0131.",en:"The login did not complete."},"step.failed":{tr:"{command} ba\u015Far\u0131s\u0131z oldu.",en:"{command} failed."},"org.pick":{tr:"Hangi organizasyonda?",en:"Which organization?"},"org.using":{tr:"Organizasyon: {name} ({slug})",en:"Organization: {name} ({slug})"},"org.gone":{tr:"Organizasyon bulunamad\u0131: {slug}",en:"Organization not found: {slug}"},"project.pick":{tr:"Hangi proje?",en:"Which project?"},"project.new":{tr:"Yeni proje olu\u015Ftur",en:"Create a new project"},"project.name":{tr:"Proje ad\u0131",en:"Project name"},"project.creating":{tr:"Proje olu\u015Fturuluyor: {slug} ({package})",en:"Creating project {slug} ({package})"},"project.created":{tr:"Proje olu\u015Fturuldu: {slug}",en:"Created project {slug}"},"project.existing":{tr:"Proje: {slug}",en:"Project: {slug}"},"package.pick":{tr:"Hangi paket?",en:"Which package?"},"package.price":{tr:"\u20BA{price} / ay, KDV hari\xE7",en:"\u20BA{price} / month, excl. VAT"},"package.none":{tr:"API bu organizasyon i\xE7in sat\u0131n al\u0131nabilir bir paket d\xF6nd\xFCrmedi.",en:"The API returned no package this organization can buy."},"package.required":{tr:"{slug} ad\u0131nda bir proje yok; olu\u015Fturmak i\xE7in --package gerekli (LUNA, TERRA veya SOL; kurumsal organizasyonlarda LUNA_PRO, TERRA_PRO veya SOL_PRO).",en:"There is no project named {slug}; creating one needs --package (LUNA, TERRA or SOL; LUNA_PRO, TERRA_PRO or SOL_PRO for enterprise organizations)."},"package.fix":{tr:"--package ile paketi se\xE7in: LUNA, TERRA veya SOL (kurumsal organizasyonlarda LUNA_PRO, TERRA_PRO veya SOL_PRO). Paket bir faturaland\u0131rma karar\u0131d\u0131r, varsay\u0131lan\u0131 yoktur.",en:"Choose the package with --package: LUNA, TERRA or SOL (LUNA_PRO, TERRA_PRO or SOL_PRO for enterprise organizations). The package is a billing decision and has no default."},"pay.link":{tr:"Proje, abonelik ba\u015Flay\u0131nca kurulur. \xD6deme sayfas\u0131: {url}",en:"The project is set up once its subscription starts. Payment page: {url}"},"pay.wait":{tr:"Abonelik bekleniyor",en:"Waiting for the subscription"},"pay.done":{tr:"Abonelik ba\u015Flad\u0131; proje kuruluyor",en:"Subscription started; setting up the project"},"pay.noBrowser":{tr:"Taray\u0131c\u0131 a\xE7\u0131lamad\u0131; adresi kendiniz a\xE7\u0131n.",en:"Could not open the browser; open the link yourself."},"pay.noUrl":{tr:"{slug} abonelik bekliyor, ancak API \xF6deme adresini d\xF6nd\xFCrmedi.",en:"{slug} is waiting for its subscription, but the API returned no payment link."},"pay.gone":{tr:"{slug} projesi art\u0131k yok: aboneli\u011Fi ba\u015Flamad\u0131\u011F\u0131 i\xE7in serbest b\u0131rak\u0131lm\u0131\u015F ya da silinmi\u015F.",en:"Project {slug} no longer exists: it was released because its subscription never started, or it was deleted."},"pay.goneFix":{tr:"Yeniden olu\u015Fturmak i\xE7in ayn\u0131 komutu --package ile \xE7al\u0131\u015Ft\u0131r\u0131n.",en:"Run the same command with --package to create it again."},"pay.timeout":{tr:"Abonelik ba\u015Flamad\u0131. Aboneli\u011Fi ba\u015Flatt\u0131ktan sonra ayn\u0131 komutu yeniden \xE7al\u0131\u015Ft\u0131r\u0131n; aboneli\u011Fi ba\u015Flamayan proje, olu\u015Fturulmas\u0131ndan 48 saat sonra serbest b\u0131rak\u0131l\u0131r: {url}",en:"The subscription has not started. Start it, then run the same command again; a project whose subscription never starts is released 48 hours after it was created: {url}"},"pay.left":{tr:"Abonelik hen\xFCz ba\u015Flamad\u0131",en:"The subscription has not started yet"},"svc.none":{tr:"Servis gerekmiyor: {reason}",en:"No service needed: {reason}"},"svc.confirm":{tr:"{label} gerekiyor ({reason}). \u015Eimdi ba\u015Flat\u0131ls\u0131n m\u0131?",en:"{label} is needed ({reason}). Initialize it now?"},"svc.declined":{tr:"ba\u015Flat\u0131lmas\u0131 istenmedi",en:"declined at the prompt"},"svc.skipped":{tr:"{label} ba\u015Flat\u0131lmad\u0131",en:"{label} was not initialized"},"svc.failed":{tr:"{label} ba\u015Flat\u0131lamad\u0131: {reason}",en:"{label} failed to initialize: {reason}"},"svc.waiting":{tr:"Uygulama, veritaban\u0131 haz\u0131r olunca ona ba\u011Flan\u0131r.",en:"The app connects to the database once it is ready."},"link.done":{tr:"Bu dizin {project} projesine ba\u011Fland\u0131 ({file})",en:"Linked this directory to {project} ({file})"},"link.failed":{tr:"Ba\u011Flant\u0131 dosyas\u0131 yaz\u0131lamad\u0131 ({file}): {detail}",en:"Could not write the link file ({file}): {detail}"},"app.twoApps":{tr:"Bu projede birden fazla uygulama var; yay\u0131nlanacak olan\u0131 vibe deploy start --app ile se\xE7in.",en:"This project has more than one app; choose the one to deploy with vibe deploy start --app."},"app.twoAppsFix":{tr:"vibe deploy start --app <uygulama>",en:"vibe deploy start --app <app>"},"repo.linked":{tr:"Repo: {repo}",en:"Repository: {repo}"},"repo.linking":{tr:"Repo ba\u011Flan\u0131yor: {repo}",en:"Connecting {repo}"},"repo.done":{tr:"Repo ba\u011Fland\u0131: {repo}",en:"Connected {repo}"},"repo.notHttps":{tr:"origin uzak adresi HTTPS\u2019e \xE7evrilemedi ({remote}); --repo ile HTTPS repo adresini verin.",en:"Could not turn the origin remote into an HTTPS URL ({remote}); pass the HTTPS URL with --repo."},"repo.fix":{tr:"vibe init --repo https://\u2026",en:"vibe init --repo https://\u2026"},"ref.noGit":{tr:"--ref bir git reposu ister; bu dizinin origin uzak adresi yok.",en:"--ref needs a git repository; this directory has no origin remote."},"upload.creating":{tr:"Uygulama olu\u015Fturuluyor (git reposu yok; bu dizin y\xFCklenerek yay\u0131nlanacak)",en:"Creating the app (no git repository; this directory will be uploaded)"},"upload.done":{tr:"Uygulama olu\u015Fturuldu; bu dizin y\xFCklenerek yay\u0131nlanacak",en:"Created the app; this directory will be uploaded"},"mcp.noEditor":{tr:"edit\xF6r alg\u0131lanamad\u0131; --editor ile se\xE7in ({ids})",en:"no editor detected; choose one with --editor ({ids})"},"mcp.skipped":{tr:"MCP kurulmad\u0131: {reason}",en:"MCP not installed: {reason}"},"mcp.installed":{tr:"MCP sunucusu eklendi: {editor}",en:"Added the MCP server to {editor}"},"mcp.failed":{tr:"MCP kurulamad\u0131: {reason}",en:"Could not install MCP: {reason}"},"deploy.start":{tr:"Yay\u0131nlan\u0131yor",en:"Deploying"},"deploy.live":{tr:"Yay\u0131nda",en:"Live"},"deploy.failed":{tr:"Yay\u0131nlama ba\u015Far\u0131s\u0131z: {phase}. Ayr\u0131nt\u0131lar i\xE7in: vibe project status --project {slug}",en:"The deploy failed: {phase}. For details: vibe project status --project {slug}"},"deploy.left":{tr:"H\xE2l\xE2 s\xFCr\xFCyor ({phase}); bekleme s\xFCresi doldu",en:"Still running ({phase}); stopped waiting"},"phase.PENDING":{tr:"S\u0131rada",en:"Queued"},"phase.BUILDING":{tr:"Derleniyor",en:"Building"},"phase.SCANNING":{tr:"G\xFCvenlik taramas\u0131 yap\u0131l\u0131yor",en:"Scanning"},"phase.DEPLOYING":{tr:"Da\u011F\u0131t\u0131l\u0131yor",en:"Deploying"},"phase.WARMING":{tr:"Uygulama ba\u015Flat\u0131l\u0131yor",en:"Starting the app"},"phase.LIVE":{tr:"Yay\u0131nda",en:"Live"},"phase.BUILD_FAILED":{tr:"derleme ba\u015Far\u0131s\u0131z",en:"build failed"},"phase.DEPLOY_FAILED":{tr:"yay\u0131n ba\u015Far\u0131s\u0131z",en:"deploy failed"},"phase.ROLLED_BACK":{tr:"geri al\u0131nd\u0131",en:"rolled back"},"next.status":{tr:"Durumu g\xF6rmek i\xE7in:",en:"To see its status:"},"next.progress":{tr:"\u0130lerlemeyi izlemek i\xE7in:",en:"To follow the progress:"},"next.deploy":{tr:"Yay\u0131nlamak i\xE7in:",en:"To deploy:"},"next.again":{tr:"Ayn\u0131 kurulumu soru sormadan yapmak i\xE7in:",en:"The same setup, without questions:"}});function deriveSlug(cwd){let raw="";try{let pkg=JSON.parse(readFileSync7(join7(cwd,"package.json"),"utf8"));typeof pkg.name=="string"&&(raw=pkg.name)}catch{}return raw===""&&(raw=basename(cwd)),slugify(raw)}function slugify(raw){let s=raw,slash=s.lastIndexOf("/");return s.startsWith("@")&&slash>0&&(s=s.slice(slash+1)),s.toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,40).replace(/^-+|-+$/g,"")}function slugProblem(value){if(!validSlug(value))return m48("slug.rule");if(isReserved(value))return m48("slug.reserved")}function packageName2(pkg){return pkg.split("_").map(w=>w.charAt(0)+w.slice(1).toLowerCase()).join(" ")}function phaseWord4(phase){switch(phase){case"PENDING":case"BUILDING":case"SCANNING":case"DEPLOYING":case"WARMING":case"LIVE":case"BUILD_FAILED":case"DEPLOY_FAILED":case"ROLLED_BACK":return m48(`phase.${phase}`);default:return phase}}function processEnv(){return{home:homedir2(),cwd:process.cwd(),platform:process.platform,env:process.env,gitRemote:()=>new Promise(resolve5=>{execFile("git",["remote","get-url","origin"],{cwd:process.cwd()},(err,stdout2)=>{resolve5(err===null?stdout2.trim():"")})}),sleep:(ms2,signal)=>new Promise(resolve5=>{let t3=setTimeout(done,ms2);function done(){clearTimeout(t3),signal.removeEventListener("abort",done),resolve5()}signal.addEventListener("abort",done,{once:!0})}),stderr:process.stderr,openBrowser,prompter:clackPrompter(process.stdin,process.stderr)}}var NULL_WRITER={write:()=>{}},ForwardStep=class extends Step{#target;constructor(target,label){super(label,{stream:NULL_WRITER,animate:!1,style:style(!1),now:Date.now}),this.#target=target}update(label){this.#target.update(label)}},StepOutput=class extends Output{#parent;#stage;constructor(parent,stage){super("human",NULL_WRITER,NULL_WRITER,PLAIN_TERM),this.#parent=parent,this.#stage=stage}print(){}step(label){return this.#stage===null?this.#parent.step(label):new ForwardStep(this.#stage,label)}warn(text2){this.#parent.warn(text2)}printRefusal(...args){this.#parent.printRefusal(...args)}};function stepOutput(out,command,stage){if(out.mode!=="json")return{sub:new StepOutput(out,stage),data:()=>{}};let text2="",sub=new Output("json",{write:chunk=>text2+=chunk},NULL_WRITER,PLAIN_TERM);return sub.command=command,{sub,data:()=>{if(text2==="")return;let doc=JSON.parse(text2);if(!doc.ok)throw new Error(`init: ${command}: ${doc.error===void 0?m48("step.failed",{command}):doc.error.message}`);return doc.data}}}function conversation(out,env){return out.mode==="json"?new Output("human",env.stderr,env.stderr,PLAIN_TERM):out}var TERMINAL_PHASES2=new Set(["LIVE","BUILD_FAILED","DEPLOY_FAILED","ROLLED_BACK"]);function settled2(before,app,left){return TERMINAL_PHASES2.has(app.phase)?before===void 0||app.phase!==before.phase||app.deploymentId!==before.deploymentId||app.currentRevision!==before.currentRevision||app.lastBuildFinishedAt!==before.lastBuildFinishedAt?!0:left:!1}async function followDeploy(ctx,env,client,org,slug,before,waitSeconds,step){let{signal,now}=ctx,deadline=now().getTime()+waitSeconds*1e3,left=!1,app=await resolveDeployApp(signal,await client(),org,slug,"");for(;;){if(step.update(`${m48("deploy.start")}: ${phaseWord4(app.phase)}`),TERMINAL_PHASES2.has(app.phase)||(left=!0),settled2(before,app,left)||now().getTime()>=deadline||signal.aborted)return app;await env.sleep(5e3,signal),app=await resolveDeployApp(signal,await client(),org,slug,"")}}var PAYMENT_WAIT_SECONDS=30*60;async function projectPhase(signal,c2,org,slug){let res=await c2.query(signal,projectQuery("phase"),projectVars(org,slug));return res.projectBySlug===null||res.projectBySlug===void 0?null:res.projectBySlug.phase}async function awaitPayment(ctx,env,client,org,slug,checkoutUrl,openCheckout){let{signal,out,now}=ctx,say=conversation(out,env);say.say(`${MARK.item} ${m48("pay.link",{url:checkoutUrl})}`),openCheckout&&await env.openBrowser(checkoutUrl)!==void 0&&say.warn(m48("pay.noBrowser"));let step=say.step(m48("pay.wait")),waitSeconds=env.paymentWaitSeconds===void 0?PAYMENT_WAIT_SECONDS:env.paymentWaitSeconds,deadline=now().getTime()+waitSeconds*1e3;for(;;){let phase=await projectPhase(signal,await client(),org,slug);if(phase===null)throw step.fail(),new LocalError(`NOT_FOUND: ${m48("pay.gone",{slug})}`,m48("pay.goneFix"));if(phase!=="AWAITING_PAYMENT"){step.succeed(m48("pay.done"));return}if(now().getTime()>=deadline||signal.aborted)throw step.leave(m48("pay.left")),out.printAPIError("PAYMENT_REQUIRED",m48("pay.timeout",{url:checkoutUrl}),"",{checkoutUrl}),new Error(`PAYMENT_REQUIRED: ${m48("pay.left")}`);await env.sleep(5e3,signal)}}var ORG_CHOICES="query { orgs { slug displayName } }",PROJECT_CHOICES=`query($id: ID!, $first: Int!) {
|
|
351
|
+
`}function register(editor,path,url,stateFile){let existing=readExisting(path);if(existing instanceof Error)return existing;let doc=existing.value===void 0?{}:{...existing.value},servers=serverMap(doc,editor.rootKey);if(servers instanceof Error)return servers;let current2=servers[SERVER_KEY];if(current2!==void 0&&!owns(stateFile,editor.id,path,current2))return new Error(m40("foreign",{file:path,name:SERVER_KEY}));let entry=editor.entry(url);if(current2!==void 0&&JSON.stringify(current2)===JSON.stringify(entry))return{editor:editor.id,path,action:"unchanged",url};servers[SERVER_KEY]=entry,doc[editor.rootKey]=servers;let failedDir=ensureDir(path);if(failedDir!==void 0)return failedDir;let failed2=writeFileAtomic(path,serialise(doc),existing.mode);if(failed2!==void 0)return new Error(m40("write",{file:path,detail:failed2.message}));let notRecorded=record(stateFile,editor.id,path,entry);return notRecorded!==void 0?notRecorded:{editor:editor.id,path,action:existing.value===void 0?"created":"updated",url}}function unregister(editor,path,stateFile){let existing=readExisting(path);if(existing instanceof Error)return existing;if(existing.value===void 0)return{editor:editor.id,path,action:"unchanged",url:""};let doc={...existing.value},servers=serverMap(doc,editor.rootKey);if(servers instanceof Error)return servers;let current2=servers[SERVER_KEY];if(current2===void 0)return{editor:editor.id,path,action:"unchanged",url:""};if(!owns(stateFile,editor.id,path,current2))return new Error(m40("foreignRemove",{file:path,name:SERVER_KEY}));delete servers[SERVER_KEY],doc[editor.rootKey]=servers;let failed2=writeFileAtomic(path,serialise(doc),existing.mode);if(failed2!==void 0)return new Error(m40("write",{file:path,detail:failed2.message}));let notRecorded=record(stateFile,editor.id,path,void 0);return notRecorded!==void 0?notRecorded:{editor:editor.id,path,action:"removed",url:""}}function status(editor,path,stateFile){let existing=readExisting(path);if(existing instanceof Error)return{editor:editor.id,path,registered:!1,url:"",problem:existing.message};if(existing.value===void 0)return{editor:editor.id,path,registered:!1,url:""};let servers=serverMap(existing.value,editor.rootKey);if(servers instanceof Error)return{editor:editor.id,path,registered:!1,url:"",problem:servers.message};let current2=servers[SERVER_KEY];if(current2===void 0||!owns(stateFile,editor.id,path,current2))return{editor:editor.id,path,registered:!1,url:""};let record2=current2,url=typeof record2.url=="string"?record2.url:record2.serverUrl;return{editor:editor.id,path,registered:!0,url:typeof url=="string"?url:""}}function ensureDir(path){try{mkdirSync4(dirname4(path),{recursive:!0});return}catch(cause){return new Error(m40("mkdir",{dir:dirname4(path),detail:describe4(cause)}))}}var m41=catalogue("mcp",{"editor.missing":{tr:"Edit\xF6r belirtilmedi: --editor gerekli ({ids}).",en:"No editor given: --editor is required ({ids})."},"editor.unknown":{tr:"Bilinmeyen edit\xF6r: {id}. Se\xE7enekler: {ids}",en:"Unknown editor: {id}. Choices: {ids}"},"editor.unresolved":{tr:"edit\xF6r \xE7\xF6z\xFClemedi",en:"the editor could not be resolved"},"action.created":{tr:"{editor} yap\u0131land\u0131rmas\u0131na eklendi",en:"Added to the {editor} configuration"},"action.updated":{tr:"{editor} yap\u0131land\u0131rmas\u0131 g\xFCncellendi",en:"The {editor} configuration was updated"},"action.unchanged":{tr:"{editor} yap\u0131land\u0131rmas\u0131 zaten g\xFCncel",en:"The {editor} configuration is already up to date"},"action.absent":{tr:"{editor} yap\u0131land\u0131rmas\u0131nda Vibecloud kayd\u0131 yoktu; bir \u015Fey de\u011Fi\u015Fmedi",en:"The {editor} configuration had no Vibecloud entry; nothing changed"},"action.removed":{tr:"{editor} yap\u0131land\u0131rmas\u0131ndan kald\u0131r\u0131ld\u0131",en:"Removed from the {editor} configuration"},file:{tr:"Dosya",en:"File"},server:{tr:"Sunucu",en:"Server"},scope:{tr:"Kapsam",en:"Scope"},"scope.project":{tr:"bu proje (edit\xF6r\xFCn belgeledi\u011Fi konum)",en:"this project (where the editor documents it)"},"col.editor":{tr:"edit\xF6r",en:"editor"},"col.state":{tr:"durum",en:"state"},"col.file":{tr:"dosya",en:"file"},registered:{tr:"Kay\u0131tl\u0131",en:"Registered"},unregistered:{tr:"Kay\u0131tl\u0131 de\u011Fil",en:"Not registered"},unreadable:{tr:"Okunamad\u0131",en:"Unreadable"},"problem.line":{tr:"{editor}: {problem}",en:"{editor}: {problem}"},"install.hint":{tr:"Bir edit\xF6re eklemek i\xE7in:",en:"To add it to an editor:"}}),EDITOR_FLAG={name:"editor",type:"string",placeholder:"edit\xF6r",summary:`Edit\xF6r: ${editorIDs().join(", ")}`};function pathEnv(){return{home:homedir(),cwd:process.cwd(),platform:process.platform,env:process.env}}function resolveEditor(out,flags,command,env){let id2=str(flags,"editor");if(id2==="")return out.printError("",m41("editor.missing",{ids:editorIDs().join(", ")})),new Error(`${command}: ${m41("editor.missing",{ids:editorIDs().join(", ")})}`);let editor=editorByID(id2);if(editor===void 0){let message2=m41("editor.unknown",{id:JSON.stringify(id2),ids:editorIDs().join(", ")});return out.printError("",message2),new Error(`${command}: ${message2}`)}let path=editor.resolvePath(env);return path instanceof Error?(out.printError("",path.message),path):{editor,path}}function actionLine(action,editor){return m41(`action.${action}`,{editor})}function details(out,rows){let width=Math.max(...rows.map(([k])=>k.length));for(let[k,v]of rows)out.say(` ${out.errStyle.dim(k.padEnd(width))} ${v}`)}function installWith(out,flags,url,env,stateFile){let resolved=resolveEditor(out,flags,"mcp install",env);if(resolved instanceof Error)throw resolved;let{editor,path}=resolved;if(editor===void 0)throw new Error(`mcp install: ${m41("editor.unresolved")}`);let result=register(editor,path,url,stateFile);if(result instanceof Error)throw out.printError("",result.message),new Error(`mcp install: ${result.message}`);emitDoc(out,{editor:result.editor,path:result.path,action:result.action,url:result.url,scope:editor.scope}),out.success(actionLine(result.action,editor.display));let rows=[[m41("file"),result.path],[m41("server"),result.url]];return editor.scope==="project"&&rows.push([m41("scope"),m41("scope.project")]),details(out,rows),0}function removeWith(out,flags,env,stateFile){let resolved=resolveEditor(out,flags,"mcp remove",env);if(resolved instanceof Error)throw resolved;let{editor,path}=resolved;if(editor===void 0)throw new Error(`mcp remove: ${m41("editor.unresolved")}`);let result=unregister(editor,path,stateFile);if(result instanceof Error)throw out.printError("",result.message),new Error(`mcp remove: ${result.message}`);return emitDoc(out,{editor:result.editor,path:result.path,action:result.action}),out.success(result.action==="unchanged"?m41("action.absent",{editor:editor.display}):actionLine(result.action,editor.display)),details(out,[[m41("file"),result.path]]),0}function listWith(out,env,stateFile){let rows=EDITORS.map(editor=>{let path=editor.resolvePath(env);if(path instanceof Error)return{editor:editor.id,display:editor.display,path:"",registered:!1,url:"",problem:path.message};let s=status(editor,path,stateFile);return{editor:editor.id,display:editor.display,path:s.path,registered:s.registered,url:s.url,...s.problem===void 0?{}:{problem:s.problem}}});emitDoc(out,{editors:rows});let st=out.outStyle;out.table([{header:upper(m41("col.editor"))},{header:upper(m41("col.state"))},{header:upper(m41("col.file")),flexible:!0}],rows.map(row=>[row.editor,row.problem!==void 0?st.red(m41("unreadable")):row.registered?st.green(m41("registered")):m41("unregistered"),row.path]),"");for(let row of rows)row.problem!==void 0&&out.warn(m41("problem.line",{editor:row.display,problem:row.problem}));return rows.some(row=>row.registered)||out.hint(m41("install.hint"),"vibe mcp install --editor <edit\xF6r>"),0}function runInstall(ctx){return Promise.resolve(installWith(ctx.out,ctx.flags,ctx.config.mcpEndpoint,pathEnv(),ctx.config.mcpStateFile))}function runRemove(ctx){return Promise.resolve(removeWith(ctx.out,ctx.flags,pathEnv(),ctx.config.mcpStateFile))}function runList(ctx){return Promise.resolve(listWith(ctx.out,pathEnv(),ctx.config.mcpStateFile))}var MCP_COMMANDS=[{path:["mcp","install"],summary:"Vibecloud MCP sunucusunu bir edit\xF6re ekler",description:"Vibecloud MCP sunucusunu bir edit\xF6r\xFCn yap\u0131land\u0131rma dosyas\u0131na ekler. Yaln\u0131zca bu dosyay\u0131 yazar; sunucuya ba\u011Flanmaz.",examples:["vibe mcp install --editor cursor","vibe mcp install --editor vscode"],kind:"runs",listed:!0,flags:[{...EDITOR_FLAG,required:!0}],run:runInstall,coverage:[{argv:["mcp","install"],ok:!1}]},{path:["mcp","list"],summary:"MCP sunucusunun kay\u0131tl\u0131 oldu\u011Fu edit\xF6rleri g\xF6sterir",examples:["vibe mcp list"],kind:"runs",listed:!0,flags:[],run:runList,coverage:[{argv:["mcp","list"],ok:!0}]},{path:["mcp","remove"],summary:"Vibecloud MCP sunucusunu bir edit\xF6rden \xE7\u0131kar\u0131r",examples:["vibe mcp remove --editor cursor"],kind:"runs",listed:!0,flags:[{...EDITOR_FLAG,required:!0}],run:runRemove,coverage:[{argv:["mcp","remove"],ok:!1}]}];var m42=catalogue("auth.metadata",{noApi:{tr:"API adresi gerekli",en:"the API address is required"},notUrl:{tr:"API adresi tam bir URL olmal\u0131 ({raw}).",en:"The API address must be a full URL ({raw})."},serverWhat:{tr:"yetkilendirme sunucusu",en:"authorization server"},authorizeWhat:{tr:"yetkilendirme endpoint\u2019i",en:"authorization endpoint"},tokenWhat:{tr:"token endpoint\u2019i",en:"token endpoint"},unreachable:{tr:"Yetkilendirme sunucusuna ula\u015F\u0131lamad\u0131 ({origin}): {detail}",en:"Could not reach the authorization server ({origin}): {detail}"},none:{tr:"Bu sunucuda bir OAuth yetkilendirme sunucusu yok ({url} HTTP 404). Kontrol d\xFCzlemi OAUTH_ISSUER ile yap\u0131land\u0131r\u0131lmadan vibe login \xE7al\u0131\u015Famaz.",en:"This server runs no OAuth authorization server ({url} HTTP 404). vibe login cannot work until the control plane is configured with OAUTH_ISSUER."},status:{tr:"Yetkilendirme sunucusunun ke\u015Fif belgesi HTTP {status} d\xF6nd\xFCrd\xFC ({url}).",en:"The authorization server\u2019s metadata returned HTTP {status} ({url})."},bodyWhat:{tr:"ke\u015Fif belgesi",en:"metadata document"},unparsable:{tr:"Ke\u015Fif belgesi \xE7\xF6z\xFCmlenemedi: {detail}",en:"Could not parse the metadata document: {detail}"},notObject:{tr:"bir nesne bekleniyordu",en:"an object was expected"},noIssuer:{tr:"Ke\u015Fif belgesinde issuer yok; yetkilendirme yan\u0131t\u0131ndaki iss onunla do\u011Frulan\u0131r.",en:"The metadata has no issuer; the iss of the authorization response is checked against it."},noField:{tr:"Ke\u015Fif belgesinde {field} yok.",en:"The metadata has no {field}."},unsupported:{tr:"Yetkilendirme sunucusu {what} desteklemiyor ({have}).",en:"The authorization server does not support {what} ({have})."},noScopes:{tr:"Ke\u015Fif belgesinde scopes_supported yok; istenecek yetkiler bilinmiyor.",en:"The metadata has no scopes_supported; the scopes to request are unknown."},notText:{tr:"{key} metin de\u011Fil",en:"{key} is not text"},notList:{tr:"{key} bir liste de\u011Fil",en:"{key} is not a list"},notTextList:{tr:"{key} yaln\u0131zca metin i\xE7ermeli",en:"{key} must hold only text"}}),METADATA_PATH="/.well-known/oauth-authorization-server";function originOf(apiEndpoint){if(apiEndpoint==="")throw new Error(m42("noApi"));let url;try{url=new URL(apiEndpoint)}catch{throw new Error(m42("notUrl",{raw:JSON.stringify(apiEndpoint)}))}if(url.host==="")throw new Error(m42("notUrl",{raw:JSON.stringify(apiEndpoint)}));return`${url.protocol}//${url.host}`}async function discover(signal,apiEndpoint){let origin=originOf(apiEndpoint),insecure=requireSecureURL(m42("serverWhat"),origin);if(insecure!==void 0)throw new Error(insecure.message);let url=origin+METADATA_PATH,res;try{res=await fetch(url,{method:"GET",headers:{Accept:"application/json","User-Agent":processAgent()},signal:withTimeout(signal,HTTP_TIMEOUT_MS),redirect:"manual"})}catch(cause){throw new Error(m42("unreachable",{origin,detail:describeCause(cause)}),{cause})}if(refuseRedirect(res,url),res.status===404)throw new Error(m42("none",{url}));if(res.status!==200)throw new Error(m42("status",{status:res.status,url}));let body=await readCappedBody(res,MAX_AUTH_BODY_BYTES,m42("bodyWhat")),parsed;try{parsed=JSON.parse(body)}catch(cause){throw new Error(m42("unparsable",{detail:describeJSONFailure(body)}),{cause})}if(typeof parsed!="object"||parsed===null||Array.isArray(parsed))throw new Error(m42("unparsable",{detail:m42("notObject")}));let doc=parsed,metadata={issuer:readString5(doc,"issuer"),authorizationEndpoint:readString5(doc,"authorization_endpoint"),tokenEndpoint:readString5(doc,"token_endpoint"),scopesSupported:readStringArray(doc,"scopes_supported"),responseTypesSupported:readStringArray(doc,"response_types_supported"),grantTypesSupported:readStringArray(doc,"grant_types_supported"),codeChallengeMethodsSupported:readStringArray(doc,"code_challenge_methods_supported"),deviceAuthorizationEndpoint:readString5(doc,"device_authorization_endpoint"),revocationEndpoint:readString5(doc,"revocation_endpoint")};if(metadata.issuer==="")throw new Error(m42("noIssuer"));if(metadata.authorizationEndpoint==="")throw new Error(m42("noField",{field:"authorization_endpoint"}));if(metadata.tokenEndpoint==="")throw new Error(m42("noField",{field:"token_endpoint"}));if(!metadata.responseTypesSupported.includes("code"))throw new Error(m42("unsupported",{what:"response_type=code",have:metadata.responseTypesSupported.join(", ")}));if(!metadata.grantTypesSupported.includes("authorization_code"))throw new Error(m42("unsupported",{what:"authorization_code",have:metadata.grantTypesSupported.join(", ")}));if(!metadata.codeChallengeMethodsSupported.includes("S256"))throw new Error(m42("unsupported",{what:"PKCE S256",have:metadata.codeChallengeMethodsSupported.join(", ")}));if(metadata.scopesSupported.length===0)throw new Error(m42("noScopes"));let badAuthorize=requireSecureURL(m42("authorizeWhat"),metadata.authorizationEndpoint);if(badAuthorize!==void 0)throw new Error(badAuthorize.message);let badToken=requireSecureURL(m42("tokenWhat"),metadata.tokenEndpoint);if(badToken!==void 0)throw new Error(badToken.message);return metadata}function readString5(doc,key){let value=doc[key];if(value==null)return"";if(typeof value!="string")throw new Error(m42("unparsable",{detail:m42("notText",{key})}));return value}function readStringArray(doc,key){let value=doc[key];if(value==null)return[];if(!Array.isArray(value))throw new Error(m42("unparsable",{detail:m42("notList",{key})}));let out=[];for(let entry of value){if(typeof entry!="string")throw new Error(m42("unparsable",{detail:m42("notTextList",{key})}));out.push(entry)}return out}import{createHash as createHash2,randomBytes as randomBytes3,timingSafeEqual}from"node:crypto";import{createServer}from"node:http";var WORDMARK={viewBox:"139 -1593 14901 1793",slash:"M444 200L1057-1460L752-1460L139 200",name:"M1457-1068L1871 0L2173 0L2583-1068L2294-1068L2040-345L2026-345L1769-1068M2777 0L3742 0L3742-234L3404-234L3404-1062L3371-1094L2777-1068L2777-835L3116-835L3116-234L2777-234M3025-1420C3025-1313 3102-1245 3215-1245C3328-1245 3404-1313 3404-1420C3404-1527 3328-1593 3215-1593C3102-1593 3025-1527 3025-1420M5032-537C5032-856 4911-1092 4636-1092C4485-1092 4385-1020 4323-938L4309-938L4309-1530L4022-1530L4022 0L4273 0L4288-129L4324-129C4375-47 4476 24 4628 24C4908 24 5032-216 5032-537M4309-263L4309-805C4369-839 4436-855 4501-855C4663-855 4742-760 4742-537C4742-313 4661-213 4500-213C4438-213 4372-228 4309-263M5208-537C5208-164 5431 24 5748 24C5955 24 6165-56 6244-289L5965-328C5924-237 5845-198 5749-198C5595-198 5510-302 5499-494L6246-494L6246-599C6246-931 6069-1092 5761-1092C5436-1092 5208-912 5208-537M5509-662C5541-812 5632-871 5752-871C5881-871 5966-804 5966-664L5966-662M7494-339L7217-373C7184-269 7114-198 6986-198C6829-198 6739-306 6739-533C6739-753 6823-871 6987-871C7117-871 7195-797 7215-674L7493-698C7472-965 7269-1092 6997-1092C6688-1092 6448-926 6448-533C6448-168 6656 24 6982 24C7211 24 7431-71 7494-339M7737 0L8703 0L8703-234L8364-234L8365-1524L8331-1556L7738-1530L7738-1297L8077-1297L8076-234L7737-234M9992-529C9992-920 9750-1092 9460-1092C9171-1092 8928-920 8928-529C8928-139 9171 24 9460 24C9750 24 9992-139 9992-529M9218-530C9218-784 9321-871 9460-871C9599-871 9702-784 9702-530C9702-276 9599-198 9460-198C9321-198 9218-276 9218-530M10222-1068L10222-283C10222-66 10318 24 10502 24C10665 24 10772-47 10876-160L10911-160L10927 0L11178 0L11178-1068L10891-1068L10891-315C10820-249 10740-205 10646-205C10565-205 10509-237 10509-357L10509-1068M11408-530C11408-211 11530 26 11804 26C11955 26 12055-46 12117-128L12152-128L12167 0L12418 0L12418-1530L12131-1530L12131-938L12116-938C12065-1020 11964-1091 11812-1091C11532-1091 11408-851 11408-530M11699-530C11699-754 11779-854 11940-854C12002-854 12068-839 12131-804L12131-262C12071-228 12005-212 11939-212C11777-212 11699-307 11699-530",chevron:"M13041-15L13797-562L13797-774L13041-1321L12897-1124L13519-674L13519-662L12897-212",bar:{x:14040,y:-260,width:1e3,height:260}};var m43=catalogue("auth.callbackpage",{"ok.title":{tr:"Giri\u015F yap\u0131ld\u0131",en:"Signed in"},"ok.body":{tr:"Bu sekmeyi kapat\u0131p terminale d\xF6nebilirsiniz.",en:"You can close this tab and go back to the terminal."},"fail.title":{tr:"Giri\u015F tamamlanmad\u0131",en:"Sign-in did not complete"},"fail.body":{tr:"Nedeni terminalde yaz\u0131l\u0131. Sorunu giderip komutu yeniden \xE7al\u0131\u015Ft\u0131r\u0131n.",en:"The terminal says why. Fix it and run the command again."}});function callbackPageHeaders(){return{"Content-Type":"text/html; charset=utf-8","Cache-Control":"no-store","Content-Security-Policy":"default-src 'none'; style-src 'unsafe-inline'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'","Referrer-Policy":"no-referrer"}}var STYLE=':root{--bg:#fff;--surface:#fff;--border:#e4e4e7;--fg:#09090b;--muted:#52525b;--accent:#2563eb;--success:#12883e;--danger:#dc2626;color-scheme:light dark}@media (prefers-color-scheme: dark){:root{--bg:#0a0a0a;--surface:#131313;--border:#2a2a2a;--fg:#fafafa;--muted:#a1a1a1;--accent:#3b82f6;--success:#34d058;--danger:#f04438}}*{box-sizing:border-box}html,body{height:100%;margin:0}body{background:var(--bg);color:var(--fg);font:15px/1.5 "Geist Variable",Geist,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased;display:flex;align-items:center;justify-content:center;padding:16px}main{width:100%;max-width:400px;display:flex;flex-direction:column;align-items:center;gap:24px}.wm{height:22px;width:auto;color:var(--fg)}.wm .m{fill:var(--muted)}.wm .n{fill:currentColor}.wm .a{fill:var(--accent)}.card{width:100%;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:32px 24px;text-align:center}.icon{width:44px;height:44px;margin:0 auto 16px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:1px solid var(--border)}.icon svg{width:22px;height:22px;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.ok svg{stroke:var(--success)}.fail svg{stroke:var(--danger)}h1{font-size:20px;line-height:1.3;font-weight:600;margin:0 0 6px;letter-spacing:-.01em}p{margin:0;color:var(--muted)}.bar{display:block;width:40px;height:3px;border-radius:2px;background:var(--accent);margin:20px auto 0;opacity:.85}';function wordmark(){let g=WORDMARK;return`<svg class="wm" viewBox="${g.viewBox}" role="img" aria-label="Vibecloud"><path class="m" d="${g.slash}"/><path class="n" d="${g.name}"/><path class="m" d="${g.chevron}"/><rect class="a" x="${g.bar.x}" y="${g.bar.y}" width="${g.bar.width}" height="${g.bar.height}" rx="${g.bar.height/2}"/></svg>`}var CHECK='<path d="M5 12.5l4.5 4.5L19 7.5"/>',CROSS='<path d="M7 7l10 10M17 7L7 17"/>';function callbackPage(outcome){let title=m43(outcome==="ok"?"ok.title":"fail.title"),body=m43(outcome==="ok"?"ok.body":"fail.body"),glyph=outcome==="ok"?CHECK:CROSS;return`<!doctype html><html lang="${lang()}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="color-scheme" content="light dark"><title>${title} \xB7 Vibecloud</title><style>${STYLE}</style></head><body><main>`+wordmark()+`<section class="card"><div class="icon ${outcome}"><svg viewBox="0 0 24 24" aria-hidden="true">${glyph}</svg></div><h1>${title}</h1><p>${body}</p><span class="bar" aria-hidden="true"></span></section></main></body></html>`}var m44=catalogue("auth.flow",{"need.client":{tr:"client_id gerekli",en:"client_id is required"},"need.resource":{tr:"audience (resource) gerekli",en:"resource (the audience) is required"},"need.scopes":{tr:"istenecek yetkiler gerekli",en:"the scopes to request are required"},"need.server":{tr:"yetkilendirme sunucusunun bilgileri gerekli",en:"the authorization server details are required"},"need.issuer":{tr:"yetkilendirme sunucusunun issuer bilgisi gerekli",en:"the authorization server\u2019s issuer is required"},cancelled:{tr:"Giri\u015F iptal edildi.",en:"Sign-in was cancelled."},timeout:{tr:"Giri\u015F yap\u0131lamad\u0131: {minutes} dakika i\xE7inde taray\u0131c\u0131dan yan\u0131t gelmedi.",en:"Sign-in did not complete: no answer came from the browser within {minutes} minutes."},state:{tr:"Yetkilendirme yan\u0131t\u0131ndaki state bu iste\u011Fe ait de\u011Fil; yan\u0131t reddedildi.",en:"The state in the authorization response does not belong to this request; it was refused."},noIss:{tr:"Yetkilendirme yan\u0131t\u0131 iss ta\u015F\u0131m\u0131yor; yan\u0131tlayan sunucu do\u011Frulanamaz.",en:"The authorization response carries no iss; which server answered cannot be verified."},wrongIss:{tr:"Yetkilendirme yan\u0131t\u0131 {got} sunucusundan geldi, beklenen {want}.",en:"The authorization response came from {got}; {want} was expected."},noCode:{tr:"Yetkilendirme yan\u0131t\u0131 bir kod ta\u015F\u0131m\u0131yor.",en:"The authorization response carries no code."},unreachable:{tr:"Yetkilendirme adresine ula\u015F\u0131lamad\u0131: {detail}",en:"Could not reach the authorization address: {detail}"},statusUnreadable:{tr:"Yetkilendirme adresi HTTP {status} d\xF6nd\xFCrd\xFC ve yan\u0131t okunamad\u0131: {detail}",en:"The authorization address returned HTTP {status} and the response could not be read: {detail}"},status:{tr:"Yetkilendirme adresi HTTP {status} d\xF6nd\xFCrd\xFC.",en:"The authorization address returned HTTP {status}."},unknownClient:{tr:"Bu sunucu {client} istemcisini tan\u0131m\u0131yor ({code}{detail}). CLI kendini sunucuya kaydetmez; istemci OAUTH_CLIENTS i\xE7inde kay\u0131tl\u0131 olmal\u0131 (Native: true ve {path} yolunu ta\u015F\u0131yan bir loopback adresiyle).",en:"This server does not know the client {client} ({code}{detail}). The CLI does not register itself; the client must be registered in OAUTH_CLIENTS (Native: true, with a loopback address on the path {path})."},badRequest:{tr:"Yetkilendirme iste\u011Fi reddedildi ({code}{detail}). En olas\u0131 neden: {client} istemcisi Native olarak kay\u0131tl\u0131 de\u011Fil ya da kay\u0131tl\u0131 loopback adresinin yolu {path} de\u011Fil. Port serbest b\u0131rak\u0131l\u0131r, yol b\u0131rak\u0131lmaz.",en:"The authorization request was refused ({code}{detail}). Most likely the client {client} is not registered as Native, or its registered loopback address is not on the path {path}. The port may vary; the path may not."},refused:{tr:"Yetkilendirme iste\u011Fi reddedildi ({code}){detail}",en:"The authorization request was refused ({code}){detail}"},accessDenied:{tr:"Yetkilendirme reddedildi ({code}). Taray\u0131c\u0131da konsola giri\u015F yap\u0131n, sonra komutu yeniden \xE7al\u0131\u015Ft\u0131r\u0131n{detail}",en:"Authorization was refused ({code}). Sign in to the console in the browser, then run the command again{detail}"},denied:{tr:"Yetkilendirme reddedildi ({code}){detail}",en:"Authorization was refused ({code}){detail}"},port:{tr:"D\xF6n\xFC\u015F i\xE7in yerel bir port a\xE7\u0131lamad\u0131: {detail}",en:"Could not open a local port for the callback: {detail}"},noAddress:{tr:"adres okunamad\u0131",en:"the address could not be read"},bodyWhat:{tr:"yetkilendirme yan\u0131t\u0131",en:"authorization response"}}),CALLBACK_PATH="/callback",LOGIN_TIMEOUT_MS=5*60*1e3,PREFLIGHT_TIMEOUT_MS=15e3;async function login(signal,config){if(config.clientId==="")throw new Error(m44("need.client"));if(config.resource==="")throw new Error(m44("need.resource"));if(config.scopes.length===0)throw new Error(m44("need.scopes"));if(config.metadata.authorizationEndpoint===""||config.metadata.tokenEndpoint==="")throw new Error(m44("need.server"));if(config.metadata.issuer==="")throw new Error(m44("need.issuer"));let verifier=randomString(32),state=randomString(32),challenge=createHash2("sha256").update(verifier,"utf8").digest("base64url"),slot=new OneSlot,server=createServer();server.headersTimeout=5e3,server.on("request",callbackHandler(slot,state));let port=await listenOnLoopback(server);try{let redirectURI=`http://127.0.0.1:${port}${CALLBACK_PATH}`,authURL=authorizationURL(config,redirectURI,state,challenge);await preflight(signal,authURL,config.clientId),await config.prompt(authURL);let waitSignal=withTimeout(signal,LOGIN_TIMEOUT_MS),got=await slot.take(waitSignal);if(got===void 0)throw signal.aborted?new Error(m44("cancelled")):new Error(m44("timeout",{minutes:LOGIN_TIMEOUT_MS/6e4}));let invalid=validateAuthorizationResponse(got,state,config.metadata.issuer);if(invalid!==void 0)throw invalid;return await exchange(signal,config,redirectURI,got.code,verifier)}finally{server.closeAllConnections(),server.close()}}function validateAuthorizationResponse(got,expectedState,expectedIssuer){if(!sameSecret(got.state,expectedState))return new Error(m44("state"));if(got.issuer==="")return new Error(m44("noIss"));if(got.issuer!==expectedIssuer)return new Error(m44("wrongIss",{got:JSON.stringify(sanitizeDisplay(got.issuer)),want:JSON.stringify(expectedIssuer)}));if(got.errorCode!=="")return authorizationError(got);if(got.code==="")return new Error(m44("noCode"))}async function preflight(signal,authURL,clientId){let res;try{res=await fetch(authURL,{method:"GET",headers:{Accept:"application/json","User-Agent":processAgent()},signal:withTimeout(signal,PREFLIGHT_TIMEOUT_MS),redirect:"manual"})}catch(cause){throw new Error(m44("unreachable",{detail:describeCause(cause)}),{cause})}if(res.status<400)return;let body;try{body=await readCappedBody(res,MAX_AUTH_BODY_BYTES,m44("bodyWhat"))}catch(cause){throw new Error(m44("statusUnreadable",{status:res.status,detail:describeCause(cause)}),{cause})}let failure=parseAuthorizeError(body);if(failure===void 0)throw new Error(m44("status",{status:res.status}));let code=sanitizeDisplay(failure.code);throw failure.code==="invalid_client"?new Error(m44("unknownClient",{client:JSON.stringify(clientId),code,detail:describe5(failure.description),path:CALLBACK_PATH})):failure.code==="invalid_request"?new Error(m44("badRequest",{client:JSON.stringify(clientId),code,detail:describe5(failure.description),path:CALLBACK_PATH})):new Error(m44("refused",{code,detail:describe5(failure.description)}))}var OneSlot=class{#filled=!1;#value;#waiter;offer(value){if(this.#filled)return!1;this.#filled=!0;let waiter=this.#waiter;return waiter!==void 0?(this.#waiter=void 0,waiter(value),!0):(this.#value=value,!0)}async take(signal){if(this.#value!==void 0){let value=this.#value;return this.#value=void 0,value}if(!signal.aborted)return new Promise(resolve5=>{let onAbort=()=>{this.#waiter=void 0,resolve5(void 0)};signal.addEventListener("abort",onAbort,{once:!0}),this.#waiter=value=>{signal.removeEventListener("abort",onAbort),resolve5(value)}})}};function callbackHandler(slot,state){return(req,res)=>{let target=req.url;if(target===void 0){res.writeHead(400,callbackPageHeaders()),res.end(callbackPage("fail"));return}let url=new URL(target,"http://127.0.0.1");if(url.pathname!==CALLBACK_PATH){res.writeHead(404,callbackPageHeaders()),res.end(callbackPage("fail"));return}let query2=url.searchParams,response={code:readParam(query2,"code"),state:readParam(query2,"state"),issuer:readParam(query2,"iss"),errorCode:readParam(query2,"error"),errorDesc:readParam(query2,"error_description")};if(!sameSecret(response.state,state)){res.writeHead(400,callbackPageHeaders()),res.end(callbackPage("fail"));return}if(slot.offer(response),response.errorCode!==""){res.writeHead(400,callbackPageHeaders()),res.end(callbackPage("fail"));return}res.writeHead(200,callbackPageHeaders()),res.end(callbackPage("ok"))}}function authorizationError(response){let code=sanitizeDisplay(response.errorCode);return response.errorCode==="access_denied"?new Error(m44("accessDenied",{code,detail:describe5(response.errorDesc)})):new Error(m44("denied",{code,detail:describe5(response.errorDesc)}))}function describe5(desc){let clean=sanitizeDisplay(desc);return clean===""?"":`: ${clean}`}function sanitizeDisplay(s){return s===""?"":s.replace(DISPLAY_UNSAFE,"")}var DISPLAY_UNSAFE=/[\u0000-\u001F\u007F-\u009F\u200E\u200F\u2028\u2029\u202A-\u202E\u2066-\u2069\uFEFF]/gu;function sameSecret(got,want){let a2=Buffer.from(got,"utf8"),b=Buffer.from(want,"utf8");return a2.length!==b.length?!1:timingSafeEqual(a2,b)}function authorizationURL(config,redirectURI,state,challenge){let query2=new URLSearchParams;query2.set("response_type","code"),query2.set("client_id",config.clientId),query2.set("redirect_uri",redirectURI),query2.set("scope",config.scopes.join(" ")),query2.set("state",state),query2.set("code_challenge",challenge),query2.set("code_challenge_method","S256"),query2.set("resource",config.resource);let separator=config.metadata.authorizationEndpoint.includes("?")?"&":"?";return config.metadata.authorizationEndpoint+separator+query2.toString()}async function exchange(signal,config,redirectURI,code,verifier){let form=new URLSearchParams;form.set("grant_type","authorization_code"),form.set("code",code),form.set("client_id",config.clientId),form.set("redirect_uri",redirectURI),form.set("code_verifier",verifier),form.set("resource",config.resource);let tokens=await postForm(signal,config.metadata.tokenEndpoint,form);return credentialFrom(tokens,config.metadata.tokenEndpoint,config.metadata.issuer,config.clientId,config.now())}function randomString(n3){return randomBytes3(n3).toString("base64url")}function readParam(query2,name){let value=query2.get(name);return value===null?"":value}function parseAuthorizeError(body){let parsed;try{parsed=JSON.parse(body)}catch{return}if(typeof parsed!="object"||parsed===null)return;let record2=parsed,code=record2.error;if(typeof code!="string"||code==="")return;let description=record2.error_description;return{code,description:typeof description=="string"?description:""}}async function listenOnLoopback(server){return new Promise((resolve5,reject)=>{server.once("error",err=>{reject(new Error(m44("port",{detail:err.message}),{cause:err}))}),server.listen(0,"127.0.0.1",()=>{let address=server.address();if(address===null||typeof address=="string"){reject(new Error(m44("port",{detail:m44("noAddress")})));return}resolve5(address.port)})})}var m45=catalogue("auth.device",{"need.client":{tr:"client_id gerekli",en:"client_id is required"},"need.resource":{tr:"audience (resource) gerekli",en:"resource (the audience) is required"},"need.scopes":{tr:"istenecek yetkiler gerekli",en:"the scopes to request are required"},"need.server":{tr:"yetkilendirme sunucusunun bilgileri gerekli",en:"the authorization server details are required"},unsupported:{tr:"Bu sunucu kodla giri\u015Fi (RFC 8628) sunmuyor; ke\u015Fif belgesinde {field} yok. Taray\u0131c\u0131yla giri\u015F i\xE7in vibe login kullan\u0131n. Sunucuda OAUTH_DEVICE_VERIFICATION_URI ayarlanmal\u0131.",en:"This server does not offer code sign-in (RFC 8628); its metadata has no {field}. Use vibe login to sign in with a browser. The server needs OAUTH_DEVICE_VERIFICATION_URI set."},cancelled:{tr:"Giri\u015F iptal edildi.",en:"Sign-in was cancelled."},timeout:{tr:"Kod onaylanmadan s\xFCresi doldu. vibe login --device ile yeni bir kod al\u0131n.",en:"The code expired before it was approved. Get a new one with vibe login --device."},denied:{tr:"Eri\u015Fim reddedildi: kod onay ekran\u0131nda reddedildi.",en:"Access denied: the code was declined on the approval page."},expired:{tr:"Kodun s\xFCresi doldu ya da kod kullan\u0131ld\u0131. vibe login --device ile yeni bir kod al\u0131n.",en:"The code expired or was already used. Get a new one with vibe login --device."},unreachable:{tr:"Kod al\u0131nacak adrese ula\u015F\u0131lamad\u0131: {detail}",en:"Could not reach the code endpoint: {detail}"},status:{tr:"Kod al\u0131nacak adres HTTP {status} d\xF6nd\xFCrd\xFC ({endpoint}).",en:"The code endpoint returned HTTP {status} ({endpoint})."},unparsable:{tr:"Kod yan\u0131t\u0131 \xE7\xF6z\xFCmlenemedi: {detail}",en:"Could not parse the code response: {detail}"},notObject:{tr:"bir nesne bekleniyordu",en:"an object was expected"},missing:{tr:"Kod yan\u0131t\u0131nda {key} eksik.",en:"The code response lacks {key}."},invalid:{tr:"Kod yan\u0131t\u0131nda {key} eksik ya da ge\xE7ersiz.",en:"The code response has a missing or invalid {key}."},endpointWhat:{tr:"cihaz kodu endpoint\u2019i",en:"code endpoint"},verifyWhat:{tr:"do\u011Frulama sayfas\u0131",en:"verification page"},completeWhat:{tr:"tek ad\u0131ml\u0131k do\u011Frulama sayfas\u0131",en:"one-step verification page"},bodyWhat:{tr:"kod yan\u0131t\u0131",en:"code response"},origin:{tr:"Kod yan\u0131t\u0131ndaki verification_uri_complete, do\u011Frulama adresiyle ayn\u0131 kaynakta de\u011Fil.",en:"The verification_uri_complete in the code response is not on the verification address\u2019s origin."}}),DEVICE_GRANT="urn:ietf:params:oauth:grant-type:device_code",SLOW_DOWN_STEP_S=5,DEVICE_LOGIN_TIMEOUT_MS=30*60*1e3;async function loginDevice(signal,config){if(config.clientId==="")throw new Error(m45("need.client"));if(config.resource==="")throw new Error(m45("need.resource"));if(config.scopes.length===0)throw new Error(m45("need.scopes"));if(config.metadata.tokenEndpoint===""||config.metadata.issuer==="")throw new Error(m45("need.server"));if(config.metadata.deviceAuthorizationEndpoint==="")throw new Error(m45("unsupported",{field:"device_authorization_endpoint"}));let started=await startDeviceAuthorization(signal,config);config.prompt(started.userCode,started.verificationURI,started.verificationURIComplete);let deadline=config.now().getTime()+Math.min(started.expiresIn*1e3,DEVICE_LOGIN_TIMEOUT_MS),intervalS=started.interval;for(;;){if(await config.sleep(intervalS*1e3,signal),signal.aborted)throw new Error(m45("cancelled"));if(config.now().getTime()>deadline)throw new Error(m45("timeout"));let form=new URLSearchParams;form.set("grant_type",DEVICE_GRANT),form.set("client_id",config.clientId),form.set("device_code",started.deviceCode);try{let tokens=await postForm(signal,config.metadata.tokenEndpoint,form);return credentialFrom(tokens,config.metadata.tokenEndpoint,config.metadata.issuer,config.clientId,config.now())}catch(cause){if(!(cause instanceof OAuthError))throw cause;switch(cause.code){case"authorization_pending":continue;case"slow_down":intervalS+=SLOW_DOWN_STEP_S;continue;case"access_denied":throw new Error(m45("denied"),{cause});case"expired_token":throw new Error(m45("expired"),{cause});default:throw cause}}}}async function startDeviceAuthorization(signal,config){let endpoint=config.metadata.deviceAuthorizationEndpoint,insecure=requireSecureURL(m45("endpointWhat"),endpoint);if(insecure!==void 0)throw new Error(insecure.message);let form=new URLSearchParams;form.set("client_id",config.clientId),form.set("scope",config.scopes.join(" ")),form.set("resource",config.resource);let res;try{res=await fetch(endpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":processAgent()},body:form.toString(),signal:withTimeout(signal,HTTP_TIMEOUT_MS),redirect:"manual"})}catch(cause){throw new Error(m45("unreachable",{detail:describeCause(cause)}),{cause})}refuseRedirect(res,endpoint);let body=await readCappedBody(res,MAX_AUTH_BODY_BYTES,m45("bodyWhat"));if(res.status!==200)throw new Error(m45("status",{status:res.status,endpoint}));return parseDeviceAuthorization(body)}function parseDeviceAuthorization(body){let parsed;try{parsed=JSON.parse(body)}catch(cause){throw new Error(m45("unparsable",{detail:describeJSONFailure(body)}),{cause})}if(typeof parsed!="object"||parsed===null||Array.isArray(parsed))throw new Error(m45("unparsable",{detail:m45("notObject")}));let doc=parsed,str4=k=>{let v=doc[k];if(typeof v!="string"||v==="")throw new Error(m45("missing",{key:k}));return v},num=k=>{let v=doc[k];if(typeof v!="number"||!Number.isFinite(v)||v<=0)throw new Error(m45("invalid",{key:k}));return v},out={deviceCode:str4("device_code"),userCode:str4("user_code"),verificationURI:str4("verification_uri"),verificationURIComplete:str4("verification_uri_complete"),expiresIn:num("expires_in"),interval:num("interval")},insecure=requireSecureURL(m45("verifyWhat"),out.verificationURI);if(insecure!==void 0)throw new Error(insecure.message);let insecureComplete=requireSecureURL(m45("completeWhat"),out.verificationURIComplete);if(insecureComplete!==void 0)throw new Error(insecureComplete.message);if(new URL(out.verificationURIComplete).origin!==new URL(out.verificationURI).origin)throw new Error(m45("origin"));return out}function sleepFor(ms2,signal){return new Promise(resolve5=>{if(signal.aborted){resolve5();return}let t3=setTimeout(done,ms2);function done(){signal.removeEventListener("abort",done),clearTimeout(t3),resolve5()}signal.addEventListener("abort",done,{once:!0})})}var m46=catalogue("auth.revoke",{noEndpoint:{tr:"iptal adresi gerekli",en:"the revocation address is required"},noToken:{tr:"iptal i\xE7in istemci kimli\u011Fi ve yenileme token\u2019\u0131 gerekli",en:"revocation needs the client ID and the refresh token"},what:{tr:"iptal endpoint\u2019i",en:"revocation endpoint"},unreachable:{tr:"\u0130ptal adresine ula\u015F\u0131lamad\u0131: {detail}",en:"Could not reach the revocation address: {detail}"},bodyWhat:{tr:"iptal yan\u0131t\u0131",en:"revocation response"}});async function revokeRefreshToken(signal,endpoint,clientId,refreshToken){if(endpoint==="")throw new Error(m46("noEndpoint"));if(clientId===""||refreshToken==="")throw new Error(m46("noToken"));let insecure=requireSecureURL(m46("what"),endpoint);if(insecure!==void 0)throw new Error(insecure.message);let form=new URLSearchParams;form.set("token",refreshToken),form.set("token_type_hint","refresh_token"),form.set("client_id",clientId);let res;try{res=await fetch(endpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":processAgent()},body:form.toString(),signal:withTimeout(signal,HTTP_TIMEOUT_MS),redirect:"manual"})}catch(cause){throw new Error(m46("unreachable",{detail:describeCause(cause)}),{cause})}refuseRedirect(res,endpoint);let body=await readCappedBody(res,MAX_AUTH_BODY_BYTES,m46("bodyWhat"));if(res.status===200)return;let code="unknown",description="";try{let parsed=JSON.parse(body);if(typeof parsed=="object"&&parsed!==null&&!Array.isArray(parsed)){let doc=parsed;typeof doc.error=="string"&&(code=doc.error),typeof doc.error_description=="string"&&(description=doc.error_description)}}catch{}throw new OAuthError(code,description,res.status)}var m47=catalogue("session",{"config.noApi":{tr:"API adresi ayarlanmam\u0131\u015F. VIBECLOUD_API de\u011Fi\u015Fkenini kontrol edin.",en:"The API address is not set. Check VIBECLOUD_API."},"config.noResource":{tr:"API kayna\u011F\u0131 (audience) ayarlanmam\u0131\u015F. VIBECLOUD_API ayarl\u0131yken giri\u015F, token\u2019\u0131n verilece\u011Fi API kayna\u011F\u0131n\u0131 da bilmeli.",en:"The API resource (audience) is not set. With VIBECLOUD_API set, sign-in must also know which API resource the token is for."},"config.noResourceFix":{tr:"VIBECLOUD_OAUTH_RESOURCE de\u011Fi\u015Fkenini API adresine (/query olmadan) ayarlay\u0131n ya da --resource verin.",en:"Set VIBECLOUD_OAUTH_RESOURCE to the API address (without /query), or pass --resource."},"bound.unknown":{tr:"belirlenemedi (token org_id ta\u015F\u0131m\u0131yor ya da okunamad\u0131)",en:"unknown (the token carries no readable org_id)"},"browser.open":{tr:"Taray\u0131c\u0131da \u015Fu adresi a\xE7\u0131n ve hesab\u0131n\u0131zla giri\u015F yap\u0131n:",en:"Open this address in a browser and sign in with your account:"},"browser.failed":{tr:"Taray\u0131c\u0131 a\xE7\u0131lamad\u0131; adresi kendiniz a\xE7\u0131n.",en:"Could not open a browser; open the address yourself."},"browser.wait":{tr:"Taray\u0131c\u0131da giri\u015F bekleniyor",en:"Waiting for the browser sign-in"},"device.code":{tr:"Tek kullan\u0131ml\u0131k kodunuz: {code}",en:"Your one-time code: {code}"},"device.open":{tr:"Giri\u015F yapm\u0131\u015F oldu\u011Funuz bir taray\u0131c\u0131da \u015Fu adresi a\xE7\u0131n ve kodu girin:",en:"In a signed-in browser, open this address and enter the code:"},"device.complete":{tr:"Tek ad\u0131mda: {url}",en:"In one step: {url}"},"device.wait":{tr:"Onay bekleniyor",en:"Waiting for approval"},"link.open":{tr:"Taray\u0131c\u0131da giri\u015F sayfas\u0131 a\xE7\u0131l\u0131yor. Hesab\u0131n\u0131za girin ya da hesap olu\u015Fturun, sonra kodu onaylay\u0131n:",en:"Opening the sign-in page in a browser. Sign in or create an account, then confirm the code:"},"link.waitManual":{tr:"Onay bekleniyor (taray\u0131c\u0131 a\xE7\u0131lamad\u0131; adresi kendiniz a\xE7\u0131n)",en:"Waiting for approval (could not open a browser; open the address yourself)"},approved:{tr:"Giri\u015F onayland\u0131",en:"Sign-in approved"},"probe.noAccount":{tr:"API bir hesap kimli\u011Fi d\xF6nd\xFCrmedi.",en:"The API returned no account ID."},"probe.removalFailed":{tr:" (oturum dosyas\u0131 silinemedi: {detail})",en:" (the session file could not be removed: {detail})"},"probe.rejected":{tr:"Yetkilendirme sunucusu bir token verdi ama API onu kabul etmedi; oturum saklanmad\u0131{removal}. En olas\u0131 neden: istenen audience (resource) bu platformun kabul etti\u011Fi de\u011Fer de\u011Fil. VIBECLOUD_OAUTH_RESOURCE de\u011Ferini kontrol edin; MCP sunucusunun audience de\u011Feri de\u011Fil, API\u2019ninki olmal\u0131.",en:"The authorization server issued a token but the API did not accept it; the session was not kept{removal}. Most likely the requested audience (resource) is not the one this deployment accepts. Check VIBECLOUD_OAUTH_RESOURCE; it must be the API\u2019s audience, not the MCP server\u2019s."},"probe.unreachable":{tr:"Oturum sakland\u0131 ama do\u011Frulanamad\u0131; API\u2019ye ula\u015F\u0131lamad\u0131: {detail}",en:"The session was kept but could not be verified; the API was unreachable: {detail}"},"role.noCli":{tr:"Giri\u015F yap\u0131ld\u0131, ama bu hesab\u0131n kurulu\u015Ftaki rol\xFC komut sat\u0131r\u0131 eri\u015Fimi vermiyor (fatura rol\xFC yaln\u0131zca konsolun Faturaland\u0131rma sayfas\u0131n\u0131 kullan\u0131r). Oturum iptal edildi ve saklanmad\u0131.",en:"Sign-in completed, but this account\u2019s role in the organization gives no command-line access (the billing role uses only the Billing page in the console). The session was revoked and not kept."},"role.noCliKept":{tr:"Bu hesab\u0131n kurulu\u015Ftaki rol\xFC komut sat\u0131r\u0131 eri\u015Fimi vermiyor, ama token iptal edilemedi; oturum sakland\u0131. Ba\u011Flant\u0131 d\xFCzelince vibe logout \xE7al\u0131\u015Ft\u0131r\u0131n.",en:"This account\u2019s role in the organization gives no command-line access, but the token could not be revoked; the session was kept. Run vibe logout once the connection is back."},"login.done":{tr:"{who} olarak giri\u015F yap\u0131ld\u0131",en:"Signed in as {who}"},"login.doneOrg":{tr:"{who} olarak giri\u015F yap\u0131ld\u0131 \xB7 {org}",en:"Signed in as {who} \xB7 {org}"},"login.multiOrg":{tr:"Hesab\u0131n\u0131z {count} organizasyonun \xFCyesi; bu oturum yaln\u0131zca \u015Fu organizasyonda \xE7al\u0131\u015F\u0131r: {org}",en:"Your account belongs to {count} organizations; this session works only in: {org}"},"login.whoamiHint":{tr:"Oturumun ayr\u0131nt\u0131lar\u0131 i\xE7in:",en:"For the session details:"},"login.orgInvisible":{tr:"{org} organizasyonu bu hesapla g\xF6r\xFCnm\xFCyor (g\xF6r\xFCnenler: {orgs}); oturum yine de sakland\u0131.",en:"Organization {org} is not visible to this account (visible: {orgs}); the session was kept anyway."},"login.orgMismatch":{tr:"--org {wanted} istendi, ancak oturum {bound} organizasyonuna ba\u011Fl\u0131. Oturum sakland\u0131 ve {bound} i\xE7in ge\xE7erli, {wanted} i\xE7in de\u011Fil. Yetkilendirme sunucusu organizasyonu giri\u015F yapan hesaptan al\u0131r, komuttan de\u011Fil.",en:"--org {wanted} was requested, but the session belongs to {bound}. The session was kept and is valid for {bound}, not for {wanted}. The authorization server takes the organization from the signed-in account, not from the command."},"env.note":{tr:"VIBECLOUD_TOKEN ayarl\u0131: komutlar onunla \xE7al\u0131\u015Fmaya devam eder. \xC7\u0131kmak i\xE7in de\u011Fi\u015Fkeni kald\u0131r\u0131n:",en:"VIBECLOUD_TOKEN is set: commands keep running with it. To sign out, unset it:"},"revoke.incomplete":{tr:"oturumda yenileme token\u2019\u0131, istemci kimli\u011Fi ya da token adresi yok",en:"the session has no refresh token, client ID or token address"},"revoke.issuerMismatch":{tr:"oturumu veren sunucu ({tokenUrl}) ke\u015Fif belgesindeki token adresiyle ({endpoint}) e\u015Fle\u015Fmiyor",en:"the server that issued the session ({tokenUrl}) does not match the token address in its metadata ({endpoint})"},"revoke.unsupported":{tr:"bu API s\xFCr\xFCm\xFC token iptalini (RFC 7009) sunmuyor",en:"this API version does not offer token revocation (RFC 7009)"},"logout.none":{tr:"Zaten giri\u015F yap\u0131lmam\u0131\u015F.",en:"You are not signed in."},"logout.unreadable":{tr:"Oturum dosyas\u0131 okunamad\u0131, bu y\xFCzden oturum sunucuda kapat\u0131lamaz ({detail}). Yaln\u0131zca bu makineden silmek i\xE7in: vibe logout --local",en:"The session file could not be read, so the session cannot be ended on the server ({detail}). To remove it from this machine only: vibe logout --local"},"logout.unreadableRemoved":{tr:"Oturum dosyas\u0131 bu makineden silindi",en:"The session file was removed from this machine"},"logout.unreadableNote":{tr:"Dosya okunamad\u0131\u011F\u0131 i\xE7in oturum sunucuda kapat\u0131lamad\u0131.",en:"The file could not be read, so the session was not ended on the server."},"logout.localDone":{tr:"\xC7\u0131k\u0131\u015F yap\u0131ld\u0131; oturum yaln\u0131zca bu makineden silindi",en:"Signed out; the session was removed from this machine only"},"logout.localPat":{tr:"Eri\u015Fim anahtar\u0131 ge\xE7erlili\u011Fini koruyor. Sona erdirmek i\xE7in konsolda Ayarlar > Eri\u015Fim anahtarlar\u0131 b\xF6l\xFCm\xFCnden iptal edin; parola s\u0131f\u0131rlamak anahtarlar\u0131 iptal etmez.",en:"The access key is still valid. To end it, revoke it in the console under Settings > Access keys; resetting the password does not revoke keys."},"logout.localOauth":{tr:"Oturum sunucuda kapat\u0131lmad\u0131: silinen token\u2019\u0131n bir kopyas\u0131 son kullan\u0131m\u0131ndan itibaren 400 g\xFCn ge\xE7erli kal\u0131r. Hepsini sona erdirmek i\xE7in parolan\u0131z\u0131 s\u0131f\u0131rlay\u0131n; bu, hesab\u0131n b\xFCt\xFCn oturumlar\u0131n\u0131 kapat\u0131r.",en:"The session was not ended on the server: a copy of the removed token stays valid for 400 days from its last use. To end them all, reset your password; that ends every session of the account."},"logout.incomplete":{tr:"Oturumda yenileme token\u2019\u0131 var ama iptal i\xE7in gereken token adresi ya da istemci kimli\u011Fi eksik. Yaln\u0131zca bu makineden silmek i\xE7in: vibe logout --local",en:"The session has a refresh token but lacks the token address or client ID needed to revoke it. To remove it from this machine only: vibe logout --local"},"logout.patDone":{tr:"\xC7\u0131k\u0131\u015F yap\u0131ld\u0131; eri\u015Fim anahtar\u0131 bu makineden silindi",en:"Signed out; the access key was removed from this machine"},"logout.patNote":{tr:"Anahtar\u0131n kendisi ge\xE7erlili\u011Fini koruyor. Sona erdirmek i\xE7in konsolda Ayarlar > Eri\u015Fim anahtarlar\u0131 b\xF6l\xFCm\xFCnden iptal edin.",en:"The key itself is still valid. To end it, revoke it in the console under Settings > Access keys."},"logout.revokeFailed":{tr:"Oturum sunucuda kapat\u0131lamad\u0131 ({detail}). Oturum dosyas\u0131 silinmedi: ba\u011Flant\u0131 d\xFCzelince vibe logout komutunu yeniden \xE7al\u0131\u015Ft\u0131r\u0131n. Yaln\u0131zca bu makineden silmek i\xE7in: vibe logout --local",en:"The session could not be ended on the server ({detail}). The session file was kept: run vibe logout again once the connection is back. To remove it from this machine only: vibe logout --local"},"logout.rotating":{tr:"Oturum bu komut \xE7al\u0131\u015F\u0131rken tekrar tekrar yenilendi; ba\u015Fka bir vibe s\xFCreci \xE7al\u0131\u015F\u0131yor. \xD6b\xFCr s\xFCre\xE7ler bitince vibe logout komutunu yeniden \xE7al\u0131\u015Ft\u0131r\u0131n.",en:"The session was renewed repeatedly while this ran; another vibe process is running. Run vibe logout again once the others have finished."},"logout.done":{tr:"\xC7\u0131k\u0131\u015F yap\u0131ld\u0131; oturum sunucuda kapat\u0131ld\u0131 ve bu makineden silindi",en:"Signed out; the session was ended on the server and removed from this machine"},"logout.accessNote":{tr:"Eri\u015Fim token\u2019\u0131 en fazla 15 dakika daha ge\xE7erli kal\u0131r; o iptal edilemez.",en:"The access token stays valid for at most 15 more minutes; it cannot be revoked."},"org.none":{tr:"Bu hesap hen\xFCz hi\xE7bir organizasyona ba\u011Fl\u0131 de\u011Fil.",en:"This account belongs to no organization yet."},"org.noneHint":{tr:"Bir organizasyon olu\u015Fturmak i\xE7in konsolda kayd\u0131 tamamlay\u0131n, sonra:",en:"Finish signing up in the console to create an organization, then:"},"org.opaque":{tr:"Bu oturum ba\u011Fl\u0131 oldu\u011Fu organizasyonu ta\u015F\u0131m\u0131yor; bu bilgi sunucuda saklan\u0131yor.",en:"This session does not carry which organization it belongs to; the server keeps that."},"col.org":{tr:"organizasyon",en:"organization"},"col.name":{tr:"ad",en:"name"},"col.standing":{tr:"durum",en:"standing"},"col.session":{tr:"oturum",en:"session"},"org.thisSession":{tr:"bu oturum",en:"this session"},"standing.ACTIVE":{tr:"Etkin",en:"Active"},"standing.TRIAL":{tr:"Deneme",en:"Trial"},"standing.PAST_DUE":{tr:"\xD6deme gecikti",en:"Past due"},"standing.READ_ONLY":{tr:"Salt okunur",en:"Read-only"},"standing.SUSPENDED":{tr:"Ask\u0131ya al\u0131nd\u0131",en:"Suspended"},"who.org":{tr:"Organizasyon",en:"Organization"},"who.others":{tr:"Di\u011Fer \xFCyelikler",en:"Other memberships"},"who.credential":{tr:"Oturum",en:"Session"},"who.expiry":{tr:"Eri\u015Fim token\u2019\u0131",en:"Access token"},"who.api":{tr:"Sunucu",en:"Server"},"who.dangerous":{tr:"Riskli i\u015Flemler",en:"Risky actions"},"who.dangerousValue":{tr:"yaln\u0131zca konsoldan (iki ad\u0131ml\u0131 do\u011Frulama gerekir)",en:"console only (two-step verification is required)"},"who.kind.env":{tr:"VIBECLOUD_TOKEN de\u011Fi\u015Fkeni",en:"the VIBECLOUD_TOKEN variable"},"who.kind.pat":{tr:"eri\u015Fim anahtar\u0131",en:"access key"},"who.kind.oauth":{tr:"vibe login oturumu",en:"vibe login session"},"who.expiry.none":{tr:"istemcide bir son kullanma tarihi yok",en:"no expiry known on this side"},"who.expiry.renews":{tr:"{when} sona erer, sonra kendili\u011Finden yenilenir",en:"expires {when}, then renews itself"},"who.expiry.at":{tr:"{when} sona erer",en:"expires {when}"},"who.noEmail":{tr:"e-posta yok",en:"no email"},"who.unknownOrg":{tr:"sunucuda saklan\u0131yor",en:"kept on the server"}}),PROBE_QUERY="query { viewer { id email } orgs { id slug displayName standing } }";function requireLoginConfig(cfg,out){if(cfg.apiEndpoint==="")return out.printRefusal("INTERNAL",m47("config.noApi"),["VIBECLOUD_API"],"","",{}),new Error("login: API endpoint required");if(cfg.oauthResource==="")return out.printLocalRefusal("INVALID_ARGUMENT",m47("config.noResource"),m47("config.noResourceFix")),new Error("login: OAuth resource required")}function boundSlug(token,orgs){let id2=boundOrgOf(token);if(id2==="")return"";let match=orgs.find(o=>o.id===id2);return match===void 0?"":match.slug}function boundLabel(token,orgs){let slug=boundSlug(token,orgs);if(slug!=="")return slug;let id2=boundOrgOf(token);return id2!==""?id2:m47("bound.unknown")}function orgSlugsOf(orgs){return orgs.map(o=>o.slug).sort()}function requestedScopes(explicit,metadata){return explicit.length>0?explicit:metadata.scopesSupported}function must(out,line){out.diagnostic(line)}async function promptBrowser(authorizationURL2,out){let st=out.errStyle;return must(out,m47("browser.open")),must(out,` ${st.bold(authorizationURL2)}`),await openBrowser(authorizationURL2)!==void 0&&out.warn(m47("browser.failed")),out.step(m47("browser.wait"))}function promptDevice(code,uri,complete,out){let st=out.errStyle;return must(out,`${st.yellow(MARK.warn)} ${m47("device.code",{code:st.bold(code)})}`),must(out,` ${m47("device.open")}`),must(out,` ${st.bold(uri)}`),must(out,` ${st.dim(m47("device.complete",{url:complete}))}`),out.step(m47("device.wait"))}function loginForInit(ctx,link){return runLogin(ctx,link)}function promptLink(code,complete,link,out){let st=out.errStyle,extra=link.extra.toString(),full=extra===""?complete:`${complete}${complete.includes("?")?"&":"?"}${extra}`;must(out,m47("link.open")),must(out,` ${st.bold(full)}`),must(out,`${st.yellow(MARK.warn)} ${m47("device.code",{code:st.bold(code)})}`);let waiting=out.step(m47("device.wait"));return link.open(full).then(failed2=>{failed2!==void 0&&waiting.update(m47("link.waitManual"))}),waiting}async function runLogin(ctx,link){let{signal,out,flags,config,now}=ctx,clientIdFlag=str(flags,"client-id"),clientId=clientIdFlag===""?config.oauthClientId:clientIdFlag,resourceFlag=str(flags,"resource"),resource=resourceFlag===""?config.oauthResource:resourceFlag,scopeFlag2=str(flags,"scope"),scopes=scopeFlag2===""?config.oauthScopes:scopeFlag2.split(/\s+/).filter(s=>s!==""),resolved={...config,oauthClientId:clientId,oauthResource:resource,oauthScopes:scopes},bad=requireLoginConfig(resolved,out);if(bad!==void 0)throw bad;let metadata;try{metadata=await discover(signal,resolved.apiEndpoint)}catch(cause){throw out.printError("INTERNAL",cause instanceof Error?cause.message:String(cause)),cause}let waiting,cred;try{cred=link!==null||bool(flags,"device")?await loginDevice(signal,{metadata,clientId:resolved.oauthClientId,resource:resolved.oauthResource,scopes:requestedScopes(resolved.oauthScopes,metadata),prompt:(code,uri,complete)=>{waiting=link===null?promptDevice(code,uri,complete,out):promptLink(code,complete,link,out)},now,sleep:link===null?sleepFor:link.sleep}):await login(signal,{metadata,clientId:resolved.oauthClientId,resource:resolved.oauthResource,scopes:requestedScopes(resolved.oauthScopes,metadata),prompt:async url=>{waiting=await promptBrowser(url,out)},now})}catch(cause){throw out.printLocalRefusal("UNAUTHENTICATED",cause instanceof Error?cause.message:String(cause),""),cause}waiting!==void 0&&waiting.succeed(m47("approved")),save(resolved.tokenFile,cred);let client=newClient(resolved.apiEndpoint,cred.accessToken),probe;try{if(probe=await client.query(signal,PROBE_QUERY,{}),probe.viewer.id==="")throw new Error(`INTERNAL: ${m47("probe.noAccount")}`)}catch(cause){if(codeOf(cause)==="UNAUTHENTICATED"){let removal="";try{deleteCredential(resolved.tokenFile)}catch(rm){rm instanceof NoCredentialError||(removal=m47("probe.removalFailed",{detail:rm instanceof Error?rm.message:String(rm)}))}throw out.printLocalRefusal("UNAUTHENTICATED",m47("probe.rejected",{removal}),""),cause}if(codeOf(cause)==="FORBIDDEN_ROLE"&&await accountReadable(signal,client)){let{refreshToken,clientId:clientId2}=cred;if(refreshToken!==void 0&&clientId2!==void 0&&metadata.revocationEndpoint!=="")try{await revokeRefreshToken(signal,metadata.revocationEndpoint,clientId2,refreshToken)}catch(rv){throw out.printError("FORBIDDEN_ROLE",`${roleWithoutCliAccessKept()} (${rv instanceof Error?rv.message:String(rv)})`),cause}try{deleteCredential(resolved.tokenFile)}catch(rm){rm instanceof NoCredentialError||out.printError("INTERNAL",rm instanceof Error?rm.message:String(rm))}throw out.printError("FORBIDDEN_ROLE",roleWithoutCliAccess()),cause}throw printAPIError(new Error(m47("probe.unreachable",{detail:cause instanceof Error?cause.message:String(cause)})),out),cause}emitDoc(out,{account:probe.viewer.id,email:probe.viewer.email,boundOrg:boundLabel(cred.accessToken,probe.orgs),accountOrgs:probe.orgs,expiresAt:cred.expiresAt,scopes:cred.scopes,issuer:cred.issuer,canPerformDangerousActions:cred.scopes!==void 0&&cred.scopes.includes(DANGEROUS_SCOPE)});let who=probe.viewer.email===""?probe.viewer.id:probe.viewer.email,bound=boundSlug(cred.accessToken,probe.orgs);if(out.success(bound===""?m47("login.done",{who}):m47("login.doneOrg",{who,org:out.errStyle.bold(bound)})),link!==null)return 0;probe.orgs.length>1&&out.say(`${MARK.item} ${m47("login.multiOrg",{count:probe.orgs.length,org:boundLabel(cred.accessToken,probe.orgs)})}`);let wanted=str(flags,"org");if(wanted!==""){if(!probe.orgs.some(o=>o.slug===wanted))throw new Error(`NOT_FOUND: ${m47("login.orgInvisible",{org:wanted,orgs:orgSlugsOf(probe.orgs).join(", ")})}`);if(bound!==""&&bound!==wanted)throw new Error(`FORBIDDEN_ROLE: ${m47("login.orgMismatch",{wanted,bound})}`)}return out.hint(m47("login.whoamiHint"),"vibe whoami"),0}function envTokenNote(out){out.warn(m47("env.note")),out.hint("","unset VIBECLOUD_TOKEN")}var MAX_ROTATIONS_FOLLOWED=3;async function revokeAtIssuer(signal,cred){let{refreshToken,clientId,tokenUrl}=cred;if(refreshToken===void 0||clientId===void 0||tokenUrl===void 0)throw new Error(m47("revoke.incomplete"));let metadata=await discover(signal,tokenUrl);if(metadata.tokenEndpoint!==tokenUrl)throw new Error(m47("revoke.issuerMismatch",{tokenUrl,endpoint:metadata.tokenEndpoint}));if(metadata.revocationEndpoint==="")throw new Error(m47("revoke.unsupported"));await revokeRefreshToken(signal,metadata.revocationEndpoint,clientId,refreshToken)}function refuseLogout(out,message2,envToken){return out.printRefusal("INTERNAL",message2,void 0,"vibe logout --local","",{deleted:!1,serverSessionEnded:!1,envToken}),1}function removeLocal(out,path){try{deleteCredential(path)}catch(cause){if(cause instanceof NoCredentialError)return;throw out.printError("INTERNAL",cause instanceof Error?cause.message:String(cause)),cause}}async function runLogout(ctx){let{out,config,signal,flags}=ctx,localOnly=bool(flags,"local"),envToken=config.token!=="",cred;try{cred=load(config.tokenFile).credential}catch(cause){return cause instanceof NoCredentialError?(emitDoc(out,{deleted:!1,serverSessionEnded:!1,envToken}),out.say(m47("logout.none")),envToken&&envTokenNote(out),0):localOnly?(removeLocal(out,config.tokenFile),emitDoc(out,{deleted:!0,serverSessionEnded:!1,envToken}),out.success(m47("logout.unreadableRemoved")),out.warn(m47("logout.unreadableNote")),0):refuseLogout(out,m47("logout.unreadable",{detail:cause instanceof Error?cause.message:String(cause)}),envToken)}if(localOnly)return removeLocal(out,config.tokenFile),emitDoc(out,{deleted:!0,serverSessionEnded:!1,envToken}),out.success(m47("logout.localDone")),out.warn(opaque(cred)?m47("logout.localPat"):m47("logout.localOauth")),envToken&&envTokenNote(out),0;if(!opaque(cred)&&!renewable(cred))return refuseLogout(out,m47("logout.incomplete"),envToken);if(opaque(cred))return removeLocal(out,config.tokenFile),emitDoc(out,{deleted:!0,serverSessionEnded:!1,envToken}),out.success(m47("logout.patDone")),out.warn(m47("logout.patNote")),envToken&&envTokenNote(out),0;for(let round=0;;round++){try{await revokeAtIssuer(signal,cred)}catch(cause){return refuseLogout(out,m47("logout.revokeFailed",{detail:cause instanceof Error?cause.message:String(cause)}),envToken)}let current2;try{current2=load(config.tokenFile).credential}catch(cause){if(cause instanceof NoCredentialError)break;throw cause}if(current2.refreshToken===cred.refreshToken)break;if(round+1>=MAX_ROTATIONS_FOLLOWED||!renewable(current2))return refuseLogout(out,m47("logout.rotating"),envToken);cred=current2}return removeLocal(out,config.tokenFile),emitDoc(out,{deleted:!0,serverSessionEnded:!0,envToken}),out.success(m47("logout.done")),out.say(`${out.errStyle.dim(MARK.item)} ${m47("logout.accessNote")}`),envToken&&envTokenNote(out),0}var ORGS_QUERY2="query { orgs { id slug displayName standing } }";function roleWithoutCliAccess(){return m47("role.noCli")}function roleWithoutCliAccessKept(){return m47("role.noCliKept")}async function accountReadable(signal,client){try{return(await client.query(signal,"query { viewer { id } }",{})).viewer.id!==""}catch{return!1}}function standingWord(out,standing){let st=out.outStyle;switch(standing){case"ACTIVE":case"TRIAL":return st.green(m47(`standing.${standing}`));case"PAST_DUE":case"READ_ONLY":return st.yellow(m47(`standing.${standing}`));case"SUSPENDED":return st.red(m47("standing.SUSPENDED"));default:return standing}}async function runOrg(ctx){let{signal,out,config,now}=ctx,client=await apiClient(signal,config,now,out),orgs;try{orgs=(await client.query(signal,ORGS_QUERY2,{})).orgs}catch(cause){throw printAPIError(cause,out),cause}let boundId=client.boundOrg();return emitDoc(out,{orgs,boundOrgId:boundId}),out.table([{header:upper(m47("col.org"))},{header:upper(m47("col.name")),flexible:!0},{header:upper(m47("col.standing"))},{header:upper(m47("col.session"))}],orgs.map(o=>[o.slug,o.displayName,standingWord(out,o.standing),boundId!==""&&o.id===boundId?`${MARK.ok} ${m47("org.thisSession")}`:""]),m47("org.none")),orgs.length===0?(out.hint(m47("org.noneHint"),"vibe login"),0):(boundId===""&&out.say(`${MARK.item} ${m47("org.opaque")}`),0)}function detail(out,title,rows){out.print(out.outStyle.bold(title));let width=Math.max(...rows.map(([k])=>visibleWidth(k)));for(let[k,v]of rows)out.print(`${padEndVisible(k,width)} ${v}`)}async function runWhoami(ctx){let{signal,out,config,now}=ctx,client=await apiClient(signal,config,now,out),probe;try{probe=await client.query(signal,PROBE_QUERY,{})}catch(cause){throw printAPIError(cause,out),cause}let kind,expiresAt,renews=!1;if(config.token!=="")kind="env";else{let cred=load(config.tokenFile).credential;kind=opaque(cred)?"pat":"oauth",expiresAt=cred.expiresAt,renews=renewable(cred)}let boundId=client.boundOrg(),bound=probe.orgs.find(o=>o.id===boundId),others=probe.orgs.filter(o=>o.id!==boundId).map(o=>o.slug);emitDoc(out,{account:probe.viewer.id,email:probe.viewer.email,boundOrg:boundLabel(client.token,probe.orgs),accountOrgs:probe.orgs,credential:kind,...expiresAt===void 0?{}:{expiresAt},api:config.apiEndpoint});let orgValue=bound!==void 0?bound.displayName===""?bound.slug:`${bound.slug} (${bound.displayName})`:boundId!==""?boundId:m47("who.unknownOrg"),at=now(),expiry=expiresAt===void 0?m47("who.expiry.none"):renews?m47("who.expiry.renews",{when:relativeTime(expiresAt,at)}):m47("who.expiry.at",{when:relativeTime(expiresAt,at)}),rows=[[m47("who.org"),orgValue]];return bound!==void 0&&others.length>0&&rows.push([m47("who.others"),others.join(", ")]),bound===void 0&&probe.orgs.length>0&&rows.push([m47("who.others"),orgSlugsOf(probe.orgs).join(", ")]),rows.push([m47("who.credential"),m47(`who.kind.${kind}`)]),kind!=="env"&&rows.push([m47("who.expiry"),expiry]),rows.push([m47("who.api"),config.apiEndpoint]),rows.push([m47("who.dangerous"),m47("who.dangerousValue")]),detail(out,probe.viewer.email===""?probe.viewer.id:probe.viewer.email,rows),0}var SESSION_COMMANDS=[{path:["login"],summary:"Taray\u0131c\u0131yla giri\u015F yapar",description:"Taray\u0131c\u0131da hesab\u0131n\u0131zla giri\u015F yapar ve oturumu bu makinede saklar. Taray\u0131c\u0131 olmayan bir makinede (SSH, kapsay\u0131c\u0131, ajan) --device ile bir kod al\u0131n ve onu ba\u015Fka bir cihazda onaylay\u0131n.",note:"VIBECLOUD_API ayarl\u0131ysa VIBECLOUD_OAUTH_RESOURCE de gerekir",examples:["vibe login","vibe login --device"],kind:"runs",listed:!0,flags:[{...ORG_FLAG,summary:"Beklenen organizasyon (se\xE7mez; oturumun ona ba\u011Fl\u0131 oldu\u011Funu do\u011Frular)"},{name:"client-id",type:"string",placeholder:"kimlik",summary:"Kay\u0131tl\u0131 OAuth istemci kimli\u011Fi (VIBECLOUD_OAUTH_CLIENT_ID)"},{name:"resource",type:"string",placeholder:"url",summary:"Token\u2019\u0131n audience de\u011Feri (VIBECLOUD_OAUTH_RESOURCE)"},{name:"scope",type:"string",placeholder:"yetkiler",summary:"\u0130stenecek yetkiler, bo\u015Flukla ayr\u0131lm\u0131\u015F (VIBECLOUD_OAUTH_SCOPES; bo\u015Fsa sunucunun ilan ettikleri)"},{name:"device",type:"boolean",summary:"Kodla giri\u015F: kodu ba\u015Fka bir cihaz\u0131n taray\u0131c\u0131s\u0131nda onaylars\u0131n\u0131z"}],run:ctx=>runLogin(ctx,null),coverage:[{argv:["login","--client-id",""],ok:!1},{argv:["login","--device","--client-id",""],ok:!1}]},{path:["logout"],summary:"Oturumu kapat\u0131r ve bu makineden siler",description:"Oturumu sunucuda kapat\u0131r, sonra bu makineden siler. Sunucuya ula\u015F\u0131lamazsa oturum dosyas\u0131 saklan\u0131r; --local onu sunucuya ba\u011Flanmadan siler.",examples:["vibe logout","vibe logout --local"],kind:"runs",listed:!0,flags:[{name:"local",type:"boolean",summary:"Sunucuya ba\u011Flanmadan yaln\u0131zca bu makineden siler (token ge\xE7erli kal\u0131r)"}],run:runLogout,coverage:[{argv:["logout"],ok:!0}]},{path:["whoami"],summary:"Giri\u015F yap\u0131lan hesab\u0131 ve oturumu g\xF6sterir",examples:["vibe whoami","vibe whoami --json"],kind:"runs",listed:!0,flags:[],run:runWhoami,coverage:[{argv:["whoami"],ok:!1}]},{path:["org"],summary:"\xDCyesi oldu\u011Funuz organizasyonlar\u0131 listeler",description:"\xDCyesi oldu\u011Funuz organizasyonlar\u0131 listeler ve bu oturumun hangisinde \xE7al\u0131\u015Ft\u0131\u011F\u0131n\u0131 i\u015Faretler. Bir oturum yaln\u0131zca giri\u015F yapt\u0131\u011F\u0131 organizasyonda \xE7al\u0131\u015F\u0131r.",examples:["vibe org","vibe org --json"],kind:"runs",listed:!0,flags:[],run:runOrg,coverage:[{argv:["org"],ok:!1}]}];var m48=catalogue("init",{intro:{tr:"Bu dizini Vibecloud\u2019da yay\u0131na alal\u0131m.",en:"Let\u2019s put this directory live on Vibecloud."},"wait.invalid":{tr:"--wait saniye cinsinden bir tam say\u0131 olmal\u0131, {value} de\u011Fil.",en:"--wait must be a whole number of seconds, not {value}."},"wait.fix":{tr:"vibe init --wait 900",en:"vibe init --wait 900"},"slug.underived":{tr:"Proje ad\u0131 bu dizinden t\xFCretilemedi ({slug}); --project ile bir ad verin.",en:"Could not derive a project name from this directory ({slug}); pass one with --project."},"slug.invalid":{tr:"{slug} bir proje ad\u0131 olamaz; --project ile ge\xE7erli bir ad verin.",en:"{slug} cannot be a project name; pass a valid one with --project."},"slug.fix":{tr:"vibe init --project <ad> (k\xFC\xE7\xFCk harf, rakam ve tire; 3\u201340 karakter)",en:"vibe init --project <name> (lowercase letters, digits and dashes; 3\u201340 characters)"},"slug.rule":{tr:"K\xFC\xE7\xFCk harf, rakam ve tire kullan\u0131n; 3\u201340 karakter.",en:"Use lowercase letters, digits and dashes; 3\u201340 characters."},"slug.reserved":{tr:"Bu ad ayr\u0131lm\u0131\u015F; ba\u015Fka bir ad se\xE7in.",en:"This name is reserved; choose another."},"login.missing":{tr:"login komutu bulunamad\u0131.",en:"The login command is missing."},"login.failed":{tr:"Giri\u015F yap\u0131lamad\u0131.",en:"The login did not complete."},"step.failed":{tr:"{command} ba\u015Far\u0131s\u0131z oldu.",en:"{command} failed."},"org.pick":{tr:"Hangi organizasyonda?",en:"Which organization?"},"org.using":{tr:"Organizasyon: {name} ({slug})",en:"Organization: {name} ({slug})"},"org.gone":{tr:"Organizasyon bulunamad\u0131: {slug}",en:"Organization not found: {slug}"},"project.pick":{tr:"Hangi proje?",en:"Which project?"},"project.new":{tr:"Yeni proje olu\u015Ftur",en:"Create a new project"},"project.name":{tr:"Proje ad\u0131",en:"Project name"},"project.creating":{tr:"Proje olu\u015Fturuluyor: {slug} ({package})",en:"Creating project {slug} ({package})"},"project.created":{tr:"Proje olu\u015Fturuldu: {slug}",en:"Created project {slug}"},"project.existing":{tr:"Proje: {slug}",en:"Project: {slug}"},"package.pick":{tr:"Hangi paket?",en:"Which package?"},"package.price":{tr:"\u20BA{price} / ay, KDV hari\xE7",en:"\u20BA{price} / month, excl. VAT"},"package.none":{tr:"API bu organizasyon i\xE7in sat\u0131n al\u0131nabilir bir paket d\xF6nd\xFCrmedi.",en:"The API returned no package this organization can buy."},"package.required":{tr:"{slug} ad\u0131nda bir proje yok; olu\u015Fturmak i\xE7in --package gerekli (LUNA, TERRA veya SOL; kurumsal organizasyonlarda LUNA_PRO, TERRA_PRO veya SOL_PRO).",en:"There is no project named {slug}; creating one needs --package (LUNA, TERRA or SOL; LUNA_PRO, TERRA_PRO or SOL_PRO for enterprise organizations)."},"package.fix":{tr:"--package ile paketi se\xE7in: LUNA, TERRA veya SOL (kurumsal organizasyonlarda LUNA_PRO, TERRA_PRO veya SOL_PRO). Paket bir faturaland\u0131rma karar\u0131d\u0131r, varsay\u0131lan\u0131 yoktur.",en:"Choose the package with --package: LUNA, TERRA or SOL (LUNA_PRO, TERRA_PRO or SOL_PRO for enterprise organizations). The package is a billing decision and has no default."},"pay.link":{tr:"Proje, abonelik ba\u015Flay\u0131nca kurulur. \xD6deme sayfas\u0131: {url}",en:"The project is set up once its subscription starts. Payment page: {url}"},"pay.wait":{tr:"Abonelik bekleniyor",en:"Waiting for the subscription"},"pay.done":{tr:"Abonelik ba\u015Flad\u0131; proje kuruluyor",en:"Subscription started; setting up the project"},"pay.noBrowser":{tr:"Taray\u0131c\u0131 a\xE7\u0131lamad\u0131; adresi kendiniz a\xE7\u0131n.",en:"Could not open the browser; open the link yourself."},"pay.noUrl":{tr:"{slug} abonelik bekliyor, ancak API \xF6deme adresini d\xF6nd\xFCrmedi.",en:"{slug} is waiting for its subscription, but the API returned no payment link."},"pay.gone":{tr:"{slug} projesi art\u0131k yok: aboneli\u011Fi ba\u015Flamad\u0131\u011F\u0131 i\xE7in serbest b\u0131rak\u0131lm\u0131\u015F ya da silinmi\u015F.",en:"Project {slug} no longer exists: it was released because its subscription never started, or it was deleted."},"pay.goneFix":{tr:"Yeniden olu\u015Fturmak i\xE7in ayn\u0131 komutu --package ile \xE7al\u0131\u015Ft\u0131r\u0131n.",en:"Run the same command with --package to create it again."},"pay.timeout":{tr:"Abonelik ba\u015Flamad\u0131. Aboneli\u011Fi ba\u015Flatt\u0131ktan sonra ayn\u0131 komutu yeniden \xE7al\u0131\u015Ft\u0131r\u0131n; aboneli\u011Fi ba\u015Flamayan proje, olu\u015Fturulmas\u0131ndan 48 saat sonra serbest b\u0131rak\u0131l\u0131r: {url}",en:"The subscription has not started. Start it, then run the same command again; a project whose subscription never starts is released 48 hours after it was created: {url}"},"pay.left":{tr:"Abonelik hen\xFCz ba\u015Flamad\u0131",en:"The subscription has not started yet"},"svc.none":{tr:"Servis gerekmiyor: {reason}",en:"No service needed: {reason}"},"svc.confirm":{tr:"{label} gerekiyor ({reason}). \u015Eimdi ba\u015Flat\u0131ls\u0131n m\u0131?",en:"{label} is needed ({reason}). Initialize it now?"},"svc.declined":{tr:"ba\u015Flat\u0131lmas\u0131 istenmedi",en:"declined at the prompt"},"svc.skipped":{tr:"{label} ba\u015Flat\u0131lmad\u0131",en:"{label} was not initialized"},"svc.failed":{tr:"{label} ba\u015Flat\u0131lamad\u0131: {reason}",en:"{label} failed to initialize: {reason}"},"svc.waiting":{tr:"Uygulama, veritaban\u0131 haz\u0131r olunca ona ba\u011Flan\u0131r.",en:"The app connects to the database once it is ready."},"link.done":{tr:"Bu dizin {project} projesine ba\u011Fland\u0131 ({file})",en:"Linked this directory to {project} ({file})"},"link.failed":{tr:"Ba\u011Flant\u0131 dosyas\u0131 yaz\u0131lamad\u0131 ({file}): {detail}",en:"Could not write the link file ({file}): {detail}"},"app.twoApps":{tr:"Bu projede birden fazla uygulama var; yay\u0131nlanacak olan\u0131 vibe deploy start --app ile se\xE7in.",en:"This project has more than one app; choose the one to deploy with vibe deploy start --app."},"app.twoAppsFix":{tr:"vibe deploy start --app <uygulama>",en:"vibe deploy start --app <app>"},"repo.linked":{tr:"Repo: {repo}",en:"Repository: {repo}"},"repo.linking":{tr:"Repo ba\u011Flan\u0131yor: {repo}",en:"Connecting {repo}"},"repo.done":{tr:"Repo ba\u011Fland\u0131: {repo}",en:"Connected {repo}"},"repo.notHttps":{tr:"origin uzak adresi HTTPS\u2019e \xE7evrilemedi ({remote}); --repo ile HTTPS repo adresini verin.",en:"Could not turn the origin remote into an HTTPS URL ({remote}); pass the HTTPS URL with --repo."},"repo.fix":{tr:"vibe init --repo https://\u2026",en:"vibe init --repo https://\u2026"},"ref.noGit":{tr:"--ref bir git reposu ister; bu dizinin origin uzak adresi yok.",en:"--ref needs a git repository; this directory has no origin remote."},"upload.creating":{tr:"Uygulama olu\u015Fturuluyor (git reposu yok; bu dizin y\xFCklenerek yay\u0131nlanacak)",en:"Creating the app (no git repository; this directory will be uploaded)"},"upload.done":{tr:"Uygulama olu\u015Fturuldu; bu dizin y\xFCklenerek yay\u0131nlanacak",en:"Created the app; this directory will be uploaded"},"mcp.noEditor":{tr:"edit\xF6r alg\u0131lanamad\u0131; --editor ile se\xE7in ({ids})",en:"no editor detected; choose one with --editor ({ids})"},"mcp.skipped":{tr:"MCP kurulmad\u0131: {reason}",en:"MCP not installed: {reason}"},"mcp.installed":{tr:"MCP sunucusu eklendi: {editor}",en:"Added the MCP server to {editor}"},"mcp.failed":{tr:"MCP kurulamad\u0131: {reason}",en:"Could not install MCP: {reason}"},"deploy.start":{tr:"Yay\u0131nlan\u0131yor",en:"Deploying"},"deploy.live":{tr:"Yay\u0131nda",en:"Live"},"deploy.failed":{tr:"Yay\u0131nlama ba\u015Far\u0131s\u0131z: {phase}. Ayr\u0131nt\u0131lar i\xE7in: vibe project status --project {slug}",en:"The deploy failed: {phase}. For details: vibe project status --project {slug}"},"deploy.left":{tr:"H\xE2l\xE2 s\xFCr\xFCyor ({phase}); bekleme s\xFCresi doldu",en:"Still running ({phase}); stopped waiting"},"phase.PENDING":{tr:"S\u0131rada",en:"Queued"},"phase.BUILDING":{tr:"Derleniyor",en:"Building"},"phase.SCANNING":{tr:"G\xFCvenlik taramas\u0131 yap\u0131l\u0131yor",en:"Scanning"},"phase.DEPLOYING":{tr:"Da\u011F\u0131t\u0131l\u0131yor",en:"Deploying"},"phase.WARMING":{tr:"Uygulama ba\u015Flat\u0131l\u0131yor",en:"Starting the app"},"phase.LIVE":{tr:"Yay\u0131nda",en:"Live"},"phase.BUILD_FAILED":{tr:"derleme ba\u015Far\u0131s\u0131z",en:"build failed"},"phase.DEPLOY_FAILED":{tr:"yay\u0131n ba\u015Far\u0131s\u0131z",en:"deploy failed"},"phase.ROLLED_BACK":{tr:"geri al\u0131nd\u0131",en:"rolled back"},"next.status":{tr:"Durumu g\xF6rmek i\xE7in:",en:"To see its status:"},"next.progress":{tr:"\u0130lerlemeyi izlemek i\xE7in:",en:"To follow the progress:"},"next.deploy":{tr:"Yay\u0131nlamak i\xE7in:",en:"To deploy:"},"next.again":{tr:"Ayn\u0131 kurulumu soru sormadan yapmak i\xE7in:",en:"The same setup, without questions:"}});function deriveSlug(cwd){let raw="";try{let pkg=JSON.parse(readFileSync7(join7(cwd,"package.json"),"utf8"));typeof pkg.name=="string"&&(raw=pkg.name)}catch{}return raw===""&&(raw=basename(cwd)),slugify(raw)}function slugify(raw){let s=raw,slash=s.lastIndexOf("/");return s.startsWith("@")&&slash>0&&(s=s.slice(slash+1)),s.toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,40).replace(/^-+|-+$/g,"")}function slugProblem(value){if(!validSlug(value))return m48("slug.rule");if(isReserved(value))return m48("slug.reserved")}function packageName2(pkg){return pkg.split("_").map(w=>w.charAt(0)+w.slice(1).toLowerCase()).join(" ")}function phaseWord4(phase){switch(phase){case"PENDING":case"BUILDING":case"SCANNING":case"DEPLOYING":case"WARMING":case"LIVE":case"BUILD_FAILED":case"DEPLOY_FAILED":case"ROLLED_BACK":return m48(`phase.${phase}`);default:return phase}}function processEnv(){return{home:homedir2(),cwd:process.cwd(),platform:process.platform,env:process.env,gitRemote:()=>new Promise(resolve5=>{execFile("git",["remote","get-url","origin"],{cwd:process.cwd()},(err,stdout2)=>{resolve5(err===null?stdout2.trim():"")})}),sleep:(ms2,signal)=>new Promise(resolve5=>{let t3=setTimeout(done,ms2);function done(){clearTimeout(t3),signal.removeEventListener("abort",done),resolve5()}signal.addEventListener("abort",done,{once:!0})}),stderr:process.stderr,openBrowser,prompter:clackPrompter(process.stdin,process.stderr)}}var NULL_WRITER={write:()=>{}},ForwardStep=class extends Step{#target;constructor(target,label){super(label,{stream:NULL_WRITER,animate:!1,style:style(!1),now:Date.now}),this.#target=target}update(label){this.#target.update(label)}},StepOutput=class extends Output{#parent;#stage;constructor(parent,stage){super("human",NULL_WRITER,NULL_WRITER,PLAIN_TERM),this.#parent=parent,this.#stage=stage}print(){}step(label){return this.#stage===null?this.#parent.step(label):new ForwardStep(this.#stage,label)}warn(text2){this.#parent.warn(text2)}printRefusal(...args){this.#parent.printRefusal(...args)}};function stepOutput(out,command,stage){if(out.mode!=="json")return{sub:new StepOutput(out,stage),data:()=>{}};let text2="",sub=new Output("json",{write:chunk=>text2+=chunk},NULL_WRITER,PLAIN_TERM);return sub.command=command,{sub,data:()=>{if(text2==="")return;let doc=JSON.parse(text2);if(!doc.ok)throw new Error(`init: ${command}: ${doc.error===void 0?m48("step.failed",{command}):doc.error.message}`);return doc.data}}}function conversation(out,env){return out.mode==="json"?new Output("human",env.stderr,env.stderr,PLAIN_TERM):out}var TERMINAL_PHASES2=new Set(["LIVE","BUILD_FAILED","DEPLOY_FAILED","ROLLED_BACK"]);function settled2(before,app,left){return TERMINAL_PHASES2.has(app.phase)?before===void 0||app.phase!==before.phase||app.deploymentId!==before.deploymentId||app.currentRevision!==before.currentRevision||app.lastBuildFinishedAt!==before.lastBuildFinishedAt?!0:left:!1}async function followDeploy(ctx,env,client,org,slug,before,waitSeconds,step){let{signal,now}=ctx,deadline=now().getTime()+waitSeconds*1e3,left=!1,app=await resolveDeployApp(signal,await client(),org,slug,"");for(;;){if(step.update(`${m48("deploy.start")}: ${phaseWord4(app.phase)}`),TERMINAL_PHASES2.has(app.phase)||(left=!0),settled2(before,app,left)||now().getTime()>=deadline||signal.aborted)return app;await env.sleep(5e3,signal),app=await resolveDeployApp(signal,await client(),org,slug,"")}}var PAYMENT_WAIT_SECONDS=30*60;async function projectPhase(signal,c2,org,slug){let res=await c2.query(signal,projectQuery("phase"),projectVars(org,slug));return res.projectBySlug===null||res.projectBySlug===void 0?null:res.projectBySlug.phase}async function awaitPayment(ctx,env,client,org,slug,checkoutUrl,openCheckout){let{signal,out,now}=ctx,say=conversation(out,env);say.say(`${MARK.item} ${m48("pay.link",{url:checkoutUrl})}`),openCheckout&&await env.openBrowser(checkoutUrl)!==void 0&&say.warn(m48("pay.noBrowser"));let step=say.step(m48("pay.wait")),waitSeconds=env.paymentWaitSeconds===void 0?PAYMENT_WAIT_SECONDS:env.paymentWaitSeconds,deadline=now().getTime()+waitSeconds*1e3;for(;;){let phase=await projectPhase(signal,await client(),org,slug);if(phase===null)throw step.fail(),new LocalError(`NOT_FOUND: ${m48("pay.gone",{slug})}`,m48("pay.goneFix"));if(phase!=="AWAITING_PAYMENT"){step.succeed(m48("pay.done"));return}if(now().getTime()>=deadline||signal.aborted)throw step.leave(m48("pay.left")),out.printAPIError("PAYMENT_REQUIRED",m48("pay.timeout",{url:checkoutUrl}),"",{checkoutUrl}),new Error(`PAYMENT_REQUIRED: ${m48("pay.left")}`);await env.sleep(5e3,signal)}}var ORG_CHOICES="query { orgs { slug displayName } }",PROJECT_CHOICES=`query($id: ID!, $first: Int!) {
|
|
352
352
|
org(id: $id) { projects(first: $first) { edges { node { slug package } } } }
|
|
353
353
|
}`,PACKAGE_CHOICES=`query($id: ID!) {
|
|
354
354
|
org(id: $id) { tier }
|
|
@@ -929,7 +929,7 @@ ${m99("report.applicationNote")}
|
|
|
929
929
|
} }
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
|
-
}`;function orgScoped(rows,pick,field2){let first=rows[0];if(first===void 0)throw new Error(`INTERNAL: ${m101("noRows",{field:field2})}`);let value=pick(first);for(let row of rows){let other=pick(row);if(other!==value)throw new Error(`INTERNAL: ${m101("disagree",{field:field2,first:first.slug,a:String(value),other:row.slug,b:String(other)})}`)}return value}function sharedCap(rows,pick){let first=rows[0];if(first===void 0)return null;let value=pick(first);for(let row of rows)if(pick(row)!==value)return null;return value}function orgUsageLine(used,cap,shared,unit){return shared?cap===null?`${used} / ${m101("unlimited")} ${unit}`:`${used} / ${amount(cap,0,"cap")} ${unit}`:`${used} ${unit} ${m101("perPackage")}`}function capOrUnlimited(value,field2){return value==null?m101("unlimited"):amount(value,0,field2)}function standingWord2(standing,st){switch(standing){case"ACTIVE":case"TRIAL":return`${st.green(MARK.ok)} ${st.green(m101(`standing.${standing}`))}`;case"READ_ONLY":return`${st.yellow(MARK.warn)} ${st.yellow(m101("standing.READ_ONLY"))}`;case"PAST_DUE":case"SUSPENDED":return`${st.red(MARK.fail)} ${st.red(m101(`standing.${standing}`))}`;default:return standing}}async function orgUsage(signal,c2,org,out,now){let res;try{res=await c2.query(signal,ORG_USAGE_QUERY,{id:org.id,first:100})}catch(cause){throw printAPIError(cause,out),cause}if(res.org===null||res.org===void 0){let err=new Error(`NOT_FOUND: ${m101("orgNotFound",{slug:org.slug})}`);throw printAPIError(err,out),err}let o=res.org,rows=o.projects.edges.map(e=>e.node);emitDoc(out,{org:o.slug,standing:o.standing,totalCount:o.projects.totalCount,projects:rows});let st=out.outStyle,name=o.displayName!==""&&o.displayName!==o.slug?` \xB7 ${o.displayName}`:"";if(out.print(`${st.bold(o.slug)}${name} \xB7 ${standingWord2(o.standing,st)}`),rows.length===0){out.say(m101("noProjects")),out.hint(m101("createHint"),"vibe project create --name <ad> --package <paket>");return}out.print(""),out.print(st.bold(m101("orgWide")));let first=rows[0],egressCapShared=rows.every(r2=>r2.caps.egressGB===first.caps.egressGB),publicCapShared=rows.every(r2=>r2.caps.publicBucketEgressGB===first.caps.publicBucketEgressGB),buildCapShared=rows.every(r2=>r2.caps.buildMinutesPerMonth===first.caps.buildMinutesPerMonth),orgLines=[[m101("egress"),orgUsageLine(measuredAmount(orgScoped(rows,r2=>r2.usage.egressGB,"usage.egressGB"),2,"usage.egressGB"),sharedCap(rows,r2=>r2.caps.egressGB),egressCapShared,"GB")],[m101("publicEgress"),orgUsageLine(measuredAmount(orgScoped(rows,r2=>r2.usage.publicEgressGB,"usage.publicEgressGB"),2,"usage.publicEgressGB"),sharedCap(rows,r2=>r2.caps.publicBucketEgressGB),publicCapShared,"GB")],[m101("build"),orgUsageLine(amount(orgScoped(rows,r2=>r2.usage.buildMinutesThisMonth,"usage.buildMinutesThisMonth"),1,"usage.buildMinutesThisMonth"),sharedCap(rows,r2=>r2.caps.buildMinutesPerMonth),buildCapShared,m101("minutes"))]];for(let line of detailLines(orgLines," "))out.print(line);let at=now();for(let p of rows){out.print(""),out.print(`${st.bold(p.slug)} \xB7 ${packageName(p.package)} \xB7 ${phaseWord2(p.phase,st)}`);let lines=[[m101("db"),`${measuredAmount(p.usage.dbStorageGB,2,"usage.dbStorageGB")} / ${amount(p.caps.dbStorageGB,0,"caps.dbStorageGB")} GB`],[m101("files"),`${measuredAmount(p.usage.fileStorageGB,2,"usage.fileStorageGB")} / ${amount(p.caps.fileStorageGB,0,"caps.fileStorageGB")} GB`],[m101("connections"),`${measuredAmount(p.usage.connections,0,"usage.connections")} / ${amount(p.caps.maxConnections,0,"caps.maxConnections")} ${m101("connectionsUnit")}`],[m101("mau"),`${measuredAmount(p.usage.monthlyActiveUsers,0,"usage.monthlyActiveUsers")} / `+capOrUnlimited(p.caps.monthlyActiveUsers,"caps.monthlyActiveUsers")],[m101("observed"),p.usage.observedAt===null||p.usage.observedAt===void 0?m101("neverObserved"):relativeTime(new Date(p.usage.observedAt),at)]];for(let line of detailLines(lines," "))out.print(line)}}var USAGE_COMMANDS=[{path:["usage"],summary:"Kullan\u0131m\u0131 ve kotalar\u0131 g\xF6sterir",description:"Organizasyonun kullan\u0131m\u0131n\u0131 kotalar\u0131yla birlikte g\xF6sterir: \xF6nce organizasyon geneli, sonra her proje.",examples:["vibe usage","vibe usage --org acme --json"],kind:"runs",listed:!0,flags:[ORG_FLAG],run:async({signal,out,flags,rest,config,now})=>{let stray=rest[0];if(stray!==void 0)throw new Error(m101("stray",{word:stray}));let c2=await apiClient(signal,config,now,out),org=await orgFor(signal,c2,str(flags,"org"),out);return await orgUsage(signal,c2,org,out,now),0},coverage:[{argv:["usage"],ok:!1}]}];var m102=catalogue("version",{runtime:{tr:"\xC7al\u0131\u015Fma ortam\u0131",en:"Runtime"},manifest:{tr:"vibecloud.app.yaml bi\xE7imi",en:"vibecloud.app.yaml format"}});function runVersion(ctx){let{out}=ctx;emitDoc(out,{version:"0.6.1",package:"@vibecloudtr/cli",node:process.versions.node,platform:process.platform,arch:process.arch,apiGroup:GROUP,apiVersion:VERSION}),out.print(out.outStyle.bold("vibe 0.6.1"));let rows=[[m102("runtime"),`Node.js ${process.versions.node} \xB7 ${process.platform}/${process.arch}`],[m102("manifest"),`${GROUP}/${VERSION}`]],width=Math.max(...rows.map(([k])=>k.length));for(let[k,v]of rows)out.print(`${k.padEnd(width)} ${v}`);return Promise.resolve(0)}var VERSION_COMMANDS=[{path:["version"],summary:"S\xFCr\xFCm bilgisini g\xF6sterir",examples:["vibe version","vibe version --json"],kind:"runs",listed:!0,flags:[],run:runVersion,coverage:[{argv:["version"],ok:!0}]}];var COMMANDS=[...SESSION_COMMANDS,...INIT_COMMANDS,...PROJECT_COMMANDS,...USAGE_COMMANDS,...DB_COMMANDS,...SERVICE_COMMANDS,...APP_COMMANDS,...DEPLOY_COMMANDS,...DOMAIN_COMMANDS,...DNS_COMMANDS,...BRANCH_COMMANDS,...CONFIG_COMMANDS,...LOGS_COMMANDS,...DANGEROUS_COMMANDS,...PROJECT_POWER_COMMANDS,...PROJECT_TRANSFER_COMMANDS,...DANGEROUS_PROJECT_COMMANDS,...DANGEROUS_ORG_COMMANDS,...TOKEN_COMMANDS,...TEAM_COMMANDS,...MCP_COMMANDS,...MIGRATE_COMMANDS,...VERSION_COMMANDS];import{homedir as homedir3}from"node:os";import{isAbsolute as isAbsolute4,join as join20,dirname as dirname7}from"node:path";import{mkdirSync as mkdirSync6}from"node:fs";var m103=catalogue("config.env",{noHome:{tr:"Ev dizini bulunamad\u0131; oturumun nereye yaz\u0131laca\u011F\u0131 belirlenemiyor.",en:"No home directory; there is nowhere to write the session."},relativeHome:{tr:"Ev dizini mutlak bir yol de\u011Fil ({home}); oturum \xE7al\u0131\u015F\u0131lan dizine yaz\u0131lamaz. HOME de\u011Ferini kontrol edin.",en:"The home directory is not an absolute path ({home}); the session cannot be written into the working directory. Check HOME."},api:{tr:"VIBECLOUD_API: {detail}",en:"VIBECLOUD_API: {detail}"},mcp:{tr:"VIBECLOUD_MCP: {detail}",en:"VIBECLOUD_MCP: {detail}"},token:{tr:"VIBECLOUD_TOKEN bir vibe_pat_ eri\u015Fim anahtar\u0131 olmal\u0131 (konsolda Ayarlar > Eri\u015Fim anahtarlar\u0131).",en:"VIBECLOUD_TOKEN must be a vibe_pat_ access key (console: Settings > Access keys)."},mkdir:{tr:"Oturum dizini olu\u015Fturulamad\u0131: {detail}",en:"Could not create the session directory: {detail}"}}),DEFAULT_API_ENDPOINT="https://api.vibecloud.tr/query",DEFAULT_MCP_ENDPOINT="https://mcp.vibecloud.tr/mcp",DEFAULT_OAUTH_CLIENT_ID="vibe-cli",DEFAULT_OAUTH_RESOURCE="https://api.vibecloud.tr";function loadConfig(env=process.env){let homeVar=env.HOME,home;if(homeVar!==void 0&&homeVar!==""?home=homeVar:home=homedir3(),home==="")throw new Error(m103("noHome"));if(!isAbsolute4(home))throw new Error(m103("relativeHome",{home:JSON.stringify(home)}));let orgVar=env.VIBECLOUD_ORG,organization=orgVar===void 0||orgVar===""?"":orgVar,apiVar=env.VIBECLOUD_API,apiEndpoint=apiVar===void 0||apiVar===""?DEFAULT_API_ENDPOINT:apiVar,insecure=requireSecureURL("API",apiEndpoint);if(insecure!==void 0)throw new Error(m103("api",{detail:insecure.message}));let mcpVar=env.VIBECLOUD_MCP,mcpEndpoint=mcpVar===void 0||mcpVar===""?DEFAULT_MCP_ENDPOINT:mcpVar,insecureMCP=requireSecureURL("MCP",mcpEndpoint);if(insecureMCP!==void 0)throw new Error(m103("mcp",{detail:insecureMCP.message}));let idVar=env.VIBECLOUD_OAUTH_CLIENT_ID,oauthClientId=idVar===void 0||idVar===""?DEFAULT_OAUTH_CLIENT_ID:idVar,resVar=env.VIBECLOUD_OAUTH_RESOURCE,oauthResource;resVar!==void 0&&resVar!==""?oauthResource=resVar:apiVar===void 0||apiVar===""?oauthResource=DEFAULT_OAUTH_RESOURCE:oauthResource="";let scopeVar=env.VIBECLOUD_OAUTH_SCOPES,oauthScopes=scopeVar===void 0||scopeVar===""?[]:scopeVar.split(/\s+/).filter(s=>s!==""),tokenVar=env.VIBECLOUD_TOKEN,token=tokenVar===void 0?"":tokenVar.trim();if(token!==""&&!token.startsWith("vibe_pat_"))throw new Error(m103("token"));let tokenFile=join20(home,".vibecloud","token"),mcpStateFile=join20(home,".vibecloud","mcp.json");try{mkdirSync6(dirname7(tokenFile),{recursive:!0,mode:448})}catch(cause){throw new Error(m103("mkdir",{detail:cause instanceof Error?cause.message:String(cause)}))}return{organization,tokenFile,apiEndpoint,oauthClientId,oauthResource,oauthScopes,mcpEndpoint,mcpStateFile,token}}function entries2(commands,kind){return commands.filter(c2=>c2.listed&&c2.kind===kind).map(c2=>{let e={name:commandName(c2),summary:c2.summary,group:topicGroup(c2.path[0]).key};return c2.note===void 0?e:{...e,note:c2.note}})}function usagePayload(commands){return{commands:entries2(commands,"runs"),refusals:entries2(commands,"refuses")}}function capabilities(stream,env,opts){let tty=stream.isTTY===!0,noColorEnv=env.NO_COLOR!==void 0&&env.NO_COLOR!=="",dumb=env.TERM==="dumb",forced=env.FORCE_COLOR!==void 0&&env.FORCE_COLOR!==""&&env.FORCE_COLOR!=="0",color=!opts.noColorFlag&&!noColorEnv&&!dumb&&(tty||forced),ci=env.CI!==void 0&&env.CI!==""&&env.CI!=="false",width=typeof stream.columns=="number"&&stream.columns>0?stream.columns:80;return{color,animate:tty&&!dumb&&!ci,width}}function interactive(stdin2,stderr,noInput){return!noInput&&stdin2.isTTY===!0&&stderr.isTTY===!0}function resolve4(argv,commands=COMMANDS){let[head,...tail]=argv;if(head===void 0)return;let second=tail[0];if(second!==void 0&&!second.startsWith("-")){let twoWord=commands.find(c2=>c2.path[0]===head&&c2.path[1]===second);if(twoWord!==void 0)return{spec:twoWord,rest:tail.slice(1)}}let oneWord=commands.find(c2=>c2.path.length===1&&c2.path[0]===head);if(oneWord!==void 0)return{spec:oneWord,rest:tail}}function reportedName(argv){let[head,...tail]=argv;if(head===void 0)return"usage";let second=tail[0];return second!==void 0&&!second.startsWith("-")?`${head} ${second}`:head}function normalizeArgv(argv){if(argv.length!==1)return argv;let[only]=argv;return only==="--version"||only==="-v"?["version"]:only==="--help"||only==="-h"?[]:argv}var EXIT_FAILURE=1,EXIT_USAGE=2,EXIT_AUTH=4,USAGE_CODE="USAGE";function extractGlobals(argv,takesValue){let rest=[],help2=!1,json=!1,noColor=!1,noInput=!1,quiet=!1,verbose=!1,passthrough=!1,valueNext=!1;for(let arg of argv){if(passthrough||valueNext){valueNext=!1,rest.push(arg);continue}switch(arg){case"--":passthrough=!0,rest.push(arg);break;case"-h":case"--help":help2=!0;break;case"--json":json=!0;break;case"--no-color":noColor=!0;break;case"--no-input":noInput=!0;break;case"-q":case"--quiet":quiet=!0;break;case"--verbose":verbose=!0;break;default:valueNext=takesValue(arg),rest.push(arg)}}return{argv:rest,help:help2,json,noColor,noInput,quiet,verbose}}function valueFlagOf(spec){return arg=>spec.flags.some(f=>f.type!=="boolean"&&(arg===`--${f.name}`||f.short!==void 0&&arg===`-${f.short}`))}function topics(commands){return new Set(commands.filter(c2=>c2.path.length===2).map(c2=>c2.path[0]))}async function run(rawArgv,opts={}){let env=opts.env===void 0?process.env:opts.env,stdout2=opts.stdout===void 0?process.stdout:opts.stdout,stderr=opts.stderr===void 0?process.stderr:opts.stderr,stdin2=opts.stdin===void 0?process.stdin:opts.stdin,commands=opts.commands===void 0?COMMANDS:opts.commands;selectLang(env);let first=extractGlobals(rawArgv,()=>!1),routed=resolve4(normalizeArgv(first.argv),commands),globals=routed===void 0?first:extractGlobals(rawArgv,valueFlagOf(routed.spec)),argv=normalizeArgv(globals.argv),mode2=globals.json||env.VIBECLOUD_OUTPUT==="json"?"json":"human";setMachineOutput(mode2==="json");let term={stdout:{...capabilities(stdout2,env,{noColorFlag:globals.noColor}),tty:stdout2.isTTY===!0},stderr:{...capabilities(stderr,env,{noColorFlag:globals.noColor}),tty:stderr.isTTY===!0},quiet:globals.quiet,verbose:globals.verbose},out=new Output(mode2,stdout2,stderr,term);if(argv.length===0)return out.command="usage",printRootHelp(out,commands),emitOrFail(out,stderr,usagePayload(commands));if(argv[0]==="help")return help(out,stderr,argv.slice(1),commands);out.command=reportedName(argv);let known=topics(commands),head=argv[0],second=argv[1];if(known.has(head)&&second===void 0)return out.command=head,printTopicHelp(out,head,commands),emitOrFail(out,stderr,{topic:head});if(known.has(head)&&second!==void 0&&second.startsWith("-"))return out.command=head,usageFailure(out,t("err.needsSubcommand",{topic:head}),t("err.seeCommandHelp",{name:head}),`vibe ${head} --help`);let resolved=resolve4(argv,commands);if(resolved===void 0)return unknownCommand(out,argv,commands,known,"");let{spec,rest}=resolved;if(globals.help)return printCommandHelp(out,spec),emitOrFail(out,stderr,helpPayload(spec));let config;try{config=loadConfig(env)}catch(cause){return finish(out,"INTERNAL",asError2(cause))}let parsed=parseFlags(rest,spec.flags,commandName(spec));if(parsed instanceof FlagError)return usageFailure(out,parsed.message,t("err.seeCommandHelp",{name:commandName(spec)}),`vibe ${commandName(spec)} --help`);let linked;if(spec.flags.some(f=>f.defaultFrom!==void 0))try{linked=findLinked(opts.cwd===void 0?process.cwd():opts.cwd)}catch(cause){return finish(out,"INTERNAL",asError2(cause))}let flags=applyDefaults(parsed.values,spec.flags,config,linked),provided=new Set(parsed.values.keys()),ctx={signal:opts.signal===void 0?new AbortController().signal:opts.signal,out,flags,provided,rest:parsed.positionals,config,now:opts.now===void 0?()=>new Date:opts.now,interactive:mode2==="human"&&interactive(stdin2,stderr,globals.noInput)};try{return await spec.run(ctx)}catch(cause){return finish(out,"",asError2(cause))}}function help(out,stderr,words,commands){if(words.length===0)return out.command="usage",printRootHelp(out,commands),emitOrFail(out,stderr,usagePayload(commands));if(out.command=`help ${words.join(" ")}`,words.length===1&&words[0]==="exit-codes")return printExitCodes(out),emitOrFail(out,stderr,{exitCodes:EXIT_CODES.map(e=>({code:e.code,meaning:t(e.key)}))});let resolved=resolve4(words,commands);if(resolved!==void 0&&resolved.spec.listed){let name=commandName(resolved.spec);return resolved.rest.length>0?usageFailure(out,t("err.helpExtra",{name,extra:resolved.rest.join(" ")}),`vibe help ${name}`,`vibe help ${name}`):(printCommandHelp(out,resolved.spec),emitOrFail(out,stderr,helpPayload(resolved.spec)))}let head=words[0];return words.length===1&&topics(commands).has(head)?(printTopicHelp(out,head,commands),emitOrFail(out,stderr,{topic:head})):unknownCommand(out,words,commands,topics(commands),"help ")}function unknownCommand(out,argv,commands,known,prefix){let head=argv[0],second=argv[1];if(known.has(head)&&second!==void 0){let subs=commands.filter(c2=>c2.path[0]===head&&c2.path.length===2&&c2.listed).map(c2=>c2.path[1]),guess2=suggest(second,subs),message3=t("err.unknownSubcommand",{name:second,topic:head});if(guess2===void 0)return usageFailure(out,message3,t("err.seeCommandHelp",{name:head}),`vibe ${prefix}${head}${prefix===""?" --help":""}`);let fixed2=`vibe ${prefix}${[head,guess2,...argv.slice(2)].join(" ")}`;return usageFailure(out,message3,`${t("err.didYouMean")} ${fixed2}`,fixed2)}let firstWords=[...new Set(commands.filter(c2=>c2.listed).map(c2=>c2.path[0]))],guess=suggest(head,firstWords),message2=t("err.unknownCommand",{name:head});if(guess===void 0)return usageFailure(out,message2,t("err.seeHelp"),"vibe --help");let fixed=`vibe ${prefix}${[guess,...argv.slice(1)].join(" ")}`;return usageFailure(out,message2,`${t("err.didYouMean")} ${fixed}`,fixed)}function usageFailure(out,message2,hint,fix){if(out.mode==="json"){let emitErr=out.emitError(USAGE_CODE,new Error(message2),fix,{});emitErr!==void 0&&out.diagnostic(emitErr.message)}else out.printFailure(message2,[`${out.errStyle.dim(MARK.hint)} ${hint}`]);return EXIT_USAGE}function emitOrFail(out,stderr,data){let emitErr=out.emit(data);return emitErr!==void 0?(stderr.write(`${emitErr.message}
|
|
932
|
+
}`;function orgScoped(rows,pick,field2){let first=rows[0];if(first===void 0)throw new Error(`INTERNAL: ${m101("noRows",{field:field2})}`);let value=pick(first);for(let row of rows){let other=pick(row);if(other!==value)throw new Error(`INTERNAL: ${m101("disagree",{field:field2,first:first.slug,a:String(value),other:row.slug,b:String(other)})}`)}return value}function sharedCap(rows,pick){let first=rows[0];if(first===void 0)return null;let value=pick(first);for(let row of rows)if(pick(row)!==value)return null;return value}function orgUsageLine(used,cap,shared,unit){return shared?cap===null?`${used} / ${m101("unlimited")} ${unit}`:`${used} / ${amount(cap,0,"cap")} ${unit}`:`${used} ${unit} ${m101("perPackage")}`}function capOrUnlimited(value,field2){return value==null?m101("unlimited"):amount(value,0,field2)}function standingWord2(standing,st){switch(standing){case"ACTIVE":case"TRIAL":return`${st.green(MARK.ok)} ${st.green(m101(`standing.${standing}`))}`;case"READ_ONLY":return`${st.yellow(MARK.warn)} ${st.yellow(m101("standing.READ_ONLY"))}`;case"PAST_DUE":case"SUSPENDED":return`${st.red(MARK.fail)} ${st.red(m101(`standing.${standing}`))}`;default:return standing}}async function orgUsage(signal,c2,org,out,now){let res;try{res=await c2.query(signal,ORG_USAGE_QUERY,{id:org.id,first:100})}catch(cause){throw printAPIError(cause,out),cause}if(res.org===null||res.org===void 0){let err=new Error(`NOT_FOUND: ${m101("orgNotFound",{slug:org.slug})}`);throw printAPIError(err,out),err}let o=res.org,rows=o.projects.edges.map(e=>e.node);emitDoc(out,{org:o.slug,standing:o.standing,totalCount:o.projects.totalCount,projects:rows});let st=out.outStyle,name=o.displayName!==""&&o.displayName!==o.slug?` \xB7 ${o.displayName}`:"";if(out.print(`${st.bold(o.slug)}${name} \xB7 ${standingWord2(o.standing,st)}`),rows.length===0){out.say(m101("noProjects")),out.hint(m101("createHint"),"vibe project create --name <ad> --package <paket>");return}out.print(""),out.print(st.bold(m101("orgWide")));let first=rows[0],egressCapShared=rows.every(r2=>r2.caps.egressGB===first.caps.egressGB),publicCapShared=rows.every(r2=>r2.caps.publicBucketEgressGB===first.caps.publicBucketEgressGB),buildCapShared=rows.every(r2=>r2.caps.buildMinutesPerMonth===first.caps.buildMinutesPerMonth),orgLines=[[m101("egress"),orgUsageLine(measuredAmount(orgScoped(rows,r2=>r2.usage.egressGB,"usage.egressGB"),2,"usage.egressGB"),sharedCap(rows,r2=>r2.caps.egressGB),egressCapShared,"GB")],[m101("publicEgress"),orgUsageLine(measuredAmount(orgScoped(rows,r2=>r2.usage.publicEgressGB,"usage.publicEgressGB"),2,"usage.publicEgressGB"),sharedCap(rows,r2=>r2.caps.publicBucketEgressGB),publicCapShared,"GB")],[m101("build"),orgUsageLine(amount(orgScoped(rows,r2=>r2.usage.buildMinutesThisMonth,"usage.buildMinutesThisMonth"),1,"usage.buildMinutesThisMonth"),sharedCap(rows,r2=>r2.caps.buildMinutesPerMonth),buildCapShared,m101("minutes"))]];for(let line of detailLines(orgLines," "))out.print(line);let at=now();for(let p of rows){out.print(""),out.print(`${st.bold(p.slug)} \xB7 ${packageName(p.package)} \xB7 ${phaseWord2(p.phase,st)}`);let lines=[[m101("db"),`${measuredAmount(p.usage.dbStorageGB,2,"usage.dbStorageGB")} / ${amount(p.caps.dbStorageGB,0,"caps.dbStorageGB")} GB`],[m101("files"),`${measuredAmount(p.usage.fileStorageGB,2,"usage.fileStorageGB")} / ${amount(p.caps.fileStorageGB,0,"caps.fileStorageGB")} GB`],[m101("connections"),`${measuredAmount(p.usage.connections,0,"usage.connections")} / ${amount(p.caps.maxConnections,0,"caps.maxConnections")} ${m101("connectionsUnit")}`],[m101("mau"),`${measuredAmount(p.usage.monthlyActiveUsers,0,"usage.monthlyActiveUsers")} / `+capOrUnlimited(p.caps.monthlyActiveUsers,"caps.monthlyActiveUsers")],[m101("observed"),p.usage.observedAt===null||p.usage.observedAt===void 0?m101("neverObserved"):relativeTime(new Date(p.usage.observedAt),at)]];for(let line of detailLines(lines," "))out.print(line)}}var USAGE_COMMANDS=[{path:["usage"],summary:"Kullan\u0131m\u0131 ve kotalar\u0131 g\xF6sterir",description:"Organizasyonun kullan\u0131m\u0131n\u0131 kotalar\u0131yla birlikte g\xF6sterir: \xF6nce organizasyon geneli, sonra her proje.",examples:["vibe usage","vibe usage --org acme --json"],kind:"runs",listed:!0,flags:[ORG_FLAG],run:async({signal,out,flags,rest,config,now})=>{let stray=rest[0];if(stray!==void 0)throw new Error(m101("stray",{word:stray}));let c2=await apiClient(signal,config,now,out),org=await orgFor(signal,c2,str(flags,"org"),out);return await orgUsage(signal,c2,org,out,now),0},coverage:[{argv:["usage"],ok:!1}]}];var m102=catalogue("version",{runtime:{tr:"\xC7al\u0131\u015Fma ortam\u0131",en:"Runtime"},manifest:{tr:"vibecloud.app.yaml bi\xE7imi",en:"vibecloud.app.yaml format"}});function runVersion(ctx){let{out}=ctx;emitDoc(out,{version:"0.6.2",package:"@vibecloudtr/cli",node:process.versions.node,platform:process.platform,arch:process.arch,apiGroup:GROUP,apiVersion:VERSION}),out.print(out.outStyle.bold("vibe 0.6.2"));let rows=[[m102("runtime"),`Node.js ${process.versions.node} \xB7 ${process.platform}/${process.arch}`],[m102("manifest"),`${GROUP}/${VERSION}`]],width=Math.max(...rows.map(([k])=>k.length));for(let[k,v]of rows)out.print(`${k.padEnd(width)} ${v}`);return Promise.resolve(0)}var VERSION_COMMANDS=[{path:["version"],summary:"S\xFCr\xFCm bilgisini g\xF6sterir",examples:["vibe version","vibe version --json"],kind:"runs",listed:!0,flags:[],run:runVersion,coverage:[{argv:["version"],ok:!0}]}];var COMMANDS=[...SESSION_COMMANDS,...INIT_COMMANDS,...PROJECT_COMMANDS,...USAGE_COMMANDS,...DB_COMMANDS,...SERVICE_COMMANDS,...APP_COMMANDS,...DEPLOY_COMMANDS,...DOMAIN_COMMANDS,...DNS_COMMANDS,...BRANCH_COMMANDS,...CONFIG_COMMANDS,...LOGS_COMMANDS,...DANGEROUS_COMMANDS,...PROJECT_POWER_COMMANDS,...PROJECT_TRANSFER_COMMANDS,...DANGEROUS_PROJECT_COMMANDS,...DANGEROUS_ORG_COMMANDS,...TOKEN_COMMANDS,...TEAM_COMMANDS,...MCP_COMMANDS,...MIGRATE_COMMANDS,...VERSION_COMMANDS];import{homedir as homedir3}from"node:os";import{isAbsolute as isAbsolute4,join as join20,dirname as dirname7}from"node:path";import{mkdirSync as mkdirSync6}from"node:fs";var m103=catalogue("config.env",{noHome:{tr:"Ev dizini bulunamad\u0131; oturumun nereye yaz\u0131laca\u011F\u0131 belirlenemiyor.",en:"No home directory; there is nowhere to write the session."},relativeHome:{tr:"Ev dizini mutlak bir yol de\u011Fil ({home}); oturum \xE7al\u0131\u015F\u0131lan dizine yaz\u0131lamaz. HOME de\u011Ferini kontrol edin.",en:"The home directory is not an absolute path ({home}); the session cannot be written into the working directory. Check HOME."},api:{tr:"VIBECLOUD_API: {detail}",en:"VIBECLOUD_API: {detail}"},mcp:{tr:"VIBECLOUD_MCP: {detail}",en:"VIBECLOUD_MCP: {detail}"},token:{tr:"VIBECLOUD_TOKEN bir vibe_pat_ eri\u015Fim anahtar\u0131 olmal\u0131 (konsolda Ayarlar > Eri\u015Fim anahtarlar\u0131).",en:"VIBECLOUD_TOKEN must be a vibe_pat_ access key (console: Settings > Access keys)."},mkdir:{tr:"Oturum dizini olu\u015Fturulamad\u0131: {detail}",en:"Could not create the session directory: {detail}"}}),DEFAULT_API_ENDPOINT="https://api.vibecloud.tr/query",DEFAULT_MCP_ENDPOINT="https://mcp.vibecloud.tr/mcp",DEFAULT_OAUTH_CLIENT_ID="vibe-cli",DEFAULT_OAUTH_RESOURCE="https://api.vibecloud.tr";function loadConfig(env=process.env){let homeVar=env.HOME,home;if(homeVar!==void 0&&homeVar!==""?home=homeVar:home=homedir3(),home==="")throw new Error(m103("noHome"));if(!isAbsolute4(home))throw new Error(m103("relativeHome",{home:JSON.stringify(home)}));let orgVar=env.VIBECLOUD_ORG,organization=orgVar===void 0||orgVar===""?"":orgVar,apiVar=env.VIBECLOUD_API,apiEndpoint=apiVar===void 0||apiVar===""?DEFAULT_API_ENDPOINT:apiVar,insecure=requireSecureURL("API",apiEndpoint);if(insecure!==void 0)throw new Error(m103("api",{detail:insecure.message}));let mcpVar=env.VIBECLOUD_MCP,mcpEndpoint=mcpVar===void 0||mcpVar===""?DEFAULT_MCP_ENDPOINT:mcpVar,insecureMCP=requireSecureURL("MCP",mcpEndpoint);if(insecureMCP!==void 0)throw new Error(m103("mcp",{detail:insecureMCP.message}));let idVar=env.VIBECLOUD_OAUTH_CLIENT_ID,oauthClientId=idVar===void 0||idVar===""?DEFAULT_OAUTH_CLIENT_ID:idVar,resVar=env.VIBECLOUD_OAUTH_RESOURCE,oauthResource;resVar!==void 0&&resVar!==""?oauthResource=resVar:apiVar===void 0||apiVar===""?oauthResource=DEFAULT_OAUTH_RESOURCE:oauthResource="";let scopeVar=env.VIBECLOUD_OAUTH_SCOPES,oauthScopes=scopeVar===void 0||scopeVar===""?[]:scopeVar.split(/\s+/).filter(s=>s!==""),tokenVar=env.VIBECLOUD_TOKEN,token=tokenVar===void 0?"":tokenVar.trim();if(token!==""&&!token.startsWith("vibe_pat_"))throw new Error(m103("token"));let tokenFile=join20(home,".vibecloud","token"),mcpStateFile=join20(home,".vibecloud","mcp.json");try{mkdirSync6(dirname7(tokenFile),{recursive:!0,mode:448})}catch(cause){throw new Error(m103("mkdir",{detail:cause instanceof Error?cause.message:String(cause)}))}return{organization,tokenFile,apiEndpoint,oauthClientId,oauthResource,oauthScopes,mcpEndpoint,mcpStateFile,token}}function entries2(commands,kind){return commands.filter(c2=>c2.listed&&c2.kind===kind).map(c2=>{let e={name:commandName(c2),summary:c2.summary,group:topicGroup(c2.path[0]).key};return c2.note===void 0?e:{...e,note:c2.note}})}function usagePayload(commands){return{commands:entries2(commands,"runs"),refusals:entries2(commands,"refuses")}}function capabilities(stream,env,opts){let tty=stream.isTTY===!0,noColorEnv=env.NO_COLOR!==void 0&&env.NO_COLOR!=="",dumb=env.TERM==="dumb",forced=env.FORCE_COLOR!==void 0&&env.FORCE_COLOR!==""&&env.FORCE_COLOR!=="0",color=!opts.noColorFlag&&!noColorEnv&&!dumb&&(tty||forced),ci=env.CI!==void 0&&env.CI!==""&&env.CI!=="false",width=typeof stream.columns=="number"&&stream.columns>0?stream.columns:80;return{color,animate:tty&&!dumb&&!ci,width}}function interactive(stdin2,stderr,noInput){return!noInput&&stdin2.isTTY===!0&&stderr.isTTY===!0}function resolve4(argv,commands=COMMANDS){let[head,...tail]=argv;if(head===void 0)return;let second=tail[0];if(second!==void 0&&!second.startsWith("-")){let twoWord=commands.find(c2=>c2.path[0]===head&&c2.path[1]===second);if(twoWord!==void 0)return{spec:twoWord,rest:tail.slice(1)}}let oneWord=commands.find(c2=>c2.path.length===1&&c2.path[0]===head);if(oneWord!==void 0)return{spec:oneWord,rest:tail}}function reportedName(argv){let[head,...tail]=argv;if(head===void 0)return"usage";let second=tail[0];return second!==void 0&&!second.startsWith("-")?`${head} ${second}`:head}function normalizeArgv(argv){if(argv.length!==1)return argv;let[only]=argv;return only==="--version"||only==="-v"?["version"]:only==="--help"||only==="-h"?[]:argv}var EXIT_FAILURE=1,EXIT_USAGE=2,EXIT_AUTH=4,USAGE_CODE="USAGE";function extractGlobals(argv,takesValue){let rest=[],help2=!1,json=!1,noColor=!1,noInput=!1,quiet=!1,verbose=!1,passthrough=!1,valueNext=!1;for(let arg of argv){if(passthrough||valueNext){valueNext=!1,rest.push(arg);continue}switch(arg){case"--":passthrough=!0,rest.push(arg);break;case"-h":case"--help":help2=!0;break;case"--json":json=!0;break;case"--no-color":noColor=!0;break;case"--no-input":noInput=!0;break;case"-q":case"--quiet":quiet=!0;break;case"--verbose":verbose=!0;break;default:valueNext=takesValue(arg),rest.push(arg)}}return{argv:rest,help:help2,json,noColor,noInput,quiet,verbose}}function valueFlagOf(spec){return arg=>spec.flags.some(f=>f.type!=="boolean"&&(arg===`--${f.name}`||f.short!==void 0&&arg===`-${f.short}`))}function topics(commands){return new Set(commands.filter(c2=>c2.path.length===2).map(c2=>c2.path[0]))}async function run(rawArgv,opts={}){let env=opts.env===void 0?process.env:opts.env,stdout2=opts.stdout===void 0?process.stdout:opts.stdout,stderr=opts.stderr===void 0?process.stderr:opts.stderr,stdin2=opts.stdin===void 0?process.stdin:opts.stdin,commands=opts.commands===void 0?COMMANDS:opts.commands;selectLang(env);let first=extractGlobals(rawArgv,()=>!1),routed=resolve4(normalizeArgv(first.argv),commands),globals=routed===void 0?first:extractGlobals(rawArgv,valueFlagOf(routed.spec)),argv=normalizeArgv(globals.argv),mode2=globals.json||env.VIBECLOUD_OUTPUT==="json"?"json":"human";setMachineOutput(mode2==="json");let term={stdout:{...capabilities(stdout2,env,{noColorFlag:globals.noColor}),tty:stdout2.isTTY===!0},stderr:{...capabilities(stderr,env,{noColorFlag:globals.noColor}),tty:stderr.isTTY===!0},quiet:globals.quiet,verbose:globals.verbose},out=new Output(mode2,stdout2,stderr,term);if(argv.length===0)return out.command="usage",printRootHelp(out,commands),emitOrFail(out,stderr,usagePayload(commands));if(argv[0]==="help")return help(out,stderr,argv.slice(1),commands);out.command=reportedName(argv);let known=topics(commands),head=argv[0],second=argv[1];if(known.has(head)&&second===void 0)return out.command=head,printTopicHelp(out,head,commands),emitOrFail(out,stderr,{topic:head});if(known.has(head)&&second!==void 0&&second.startsWith("-"))return out.command=head,usageFailure(out,t("err.needsSubcommand",{topic:head}),t("err.seeCommandHelp",{name:head}),`vibe ${head} --help`);let resolved=resolve4(argv,commands);if(resolved===void 0)return unknownCommand(out,argv,commands,known,"");let{spec,rest}=resolved;if(globals.help)return printCommandHelp(out,spec),emitOrFail(out,stderr,helpPayload(spec));let config;try{config=loadConfig(env)}catch(cause){return finish(out,"INTERNAL",asError2(cause))}let parsed=parseFlags(rest,spec.flags,commandName(spec));if(parsed instanceof FlagError)return usageFailure(out,parsed.message,t("err.seeCommandHelp",{name:commandName(spec)}),`vibe ${commandName(spec)} --help`);let linked;if(spec.flags.some(f=>f.defaultFrom!==void 0))try{linked=findLinked(opts.cwd===void 0?process.cwd():opts.cwd)}catch(cause){return finish(out,"INTERNAL",asError2(cause))}let flags=applyDefaults(parsed.values,spec.flags,config,linked),provided=new Set(parsed.values.keys()),ctx={signal:opts.signal===void 0?new AbortController().signal:opts.signal,out,flags,provided,rest:parsed.positionals,config,now:opts.now===void 0?()=>new Date:opts.now,interactive:mode2==="human"&&interactive(stdin2,stderr,globals.noInput)};try{return await spec.run(ctx)}catch(cause){return finish(out,"",asError2(cause))}}function help(out,stderr,words,commands){if(words.length===0)return out.command="usage",printRootHelp(out,commands),emitOrFail(out,stderr,usagePayload(commands));if(out.command=`help ${words.join(" ")}`,words.length===1&&words[0]==="exit-codes")return printExitCodes(out),emitOrFail(out,stderr,{exitCodes:EXIT_CODES.map(e=>({code:e.code,meaning:t(e.key)}))});let resolved=resolve4(words,commands);if(resolved!==void 0&&resolved.spec.listed){let name=commandName(resolved.spec);return resolved.rest.length>0?usageFailure(out,t("err.helpExtra",{name,extra:resolved.rest.join(" ")}),`vibe help ${name}`,`vibe help ${name}`):(printCommandHelp(out,resolved.spec),emitOrFail(out,stderr,helpPayload(resolved.spec)))}let head=words[0];return words.length===1&&topics(commands).has(head)?(printTopicHelp(out,head,commands),emitOrFail(out,stderr,{topic:head})):unknownCommand(out,words,commands,topics(commands),"help ")}function unknownCommand(out,argv,commands,known,prefix){let head=argv[0],second=argv[1];if(known.has(head)&&second!==void 0){let subs=commands.filter(c2=>c2.path[0]===head&&c2.path.length===2&&c2.listed).map(c2=>c2.path[1]),guess2=suggest(second,subs),message3=t("err.unknownSubcommand",{name:second,topic:head});if(guess2===void 0)return usageFailure(out,message3,t("err.seeCommandHelp",{name:head}),`vibe ${prefix}${head}${prefix===""?" --help":""}`);let fixed2=`vibe ${prefix}${[head,guess2,...argv.slice(2)].join(" ")}`;return usageFailure(out,message3,`${t("err.didYouMean")} ${fixed2}`,fixed2)}let firstWords=[...new Set(commands.filter(c2=>c2.listed).map(c2=>c2.path[0]))],guess=suggest(head,firstWords),message2=t("err.unknownCommand",{name:head});if(guess===void 0)return usageFailure(out,message2,t("err.seeHelp"),"vibe --help");let fixed=`vibe ${prefix}${[guess,...argv.slice(1)].join(" ")}`;return usageFailure(out,message2,`${t("err.didYouMean")} ${fixed}`,fixed)}function usageFailure(out,message2,hint,fix){if(out.mode==="json"){let emitErr=out.emitError(USAGE_CODE,new Error(message2),fix,{});emitErr!==void 0&&out.diagnostic(emitErr.message)}else out.printFailure(message2,[`${out.errStyle.dim(MARK.hint)} ${hint}`]);return EXIT_USAGE}function emitOrFail(out,stderr,data){let emitErr=out.emit(data);return emitErr!==void 0?(stderr.write(`${emitErr.message}
|
|
933
933
|
`),EXIT_FAILURE):0}var EXIT_CODES=[{code:0,key:"help.exit.ok"},{code:EXIT_FAILURE,key:"help.exit.failure"},{code:EXIT_USAGE,key:"help.exit.usage"},{code:EXIT_AUTH,key:"help.exit.auth"},{code:130,key:"help.exit.cancelled"}];function printExitCodes(out){out.print(out.outStyle.bold(t("help.exitCodes")));for(let e of EXIT_CODES)out.print(` ${String(e.code).padEnd(5)}${t(e.key)}`)}var AUTH_CODES=new Set(["UNAUTHENTICATED","TOKEN_EXPIRED","TOKEN_REVOKED"]);function finish(out,code,err){let resolved=code===""?codeOfError(err):code,exit=AUTH_CODES.has(resolved)?EXIT_AUTH:EXIT_FAILURE,local=localFixOf(err);if(local!=="")return out.mode==="human"&&out.refused()?exit:out.mode==="json"&&out.emitted()?(out.emittedSuccess()&&out.diagnostic(err.message),exit):(out.printLocalRefusal(resolved,err.message,local),out.trace(err),exit);let fix=codeOf(err)===""?"":fixFor(resolved,fixOf(err),detailsOf(err));if(out.mode==="human")return out.refused()||out.printRefusal(resolved,err.message,void 0,void 0,fix,detailsOf(err)),out.trace(err),exit;if(out.emitted())return out.emittedSuccess()&&out.diagnostic(err.message),exit;let emitErr=out.emitError(resolved,err,fix,detailsOf(err));return emitErr!==void 0&&out.diagnostic(emitErr.message),exit}function codeOfError(err){let fromCause=codeOf(err);if(fromCause!=="")return fromCause;let colon=err.message.indexOf(":");if(colon<=0)return"";let head=err.message.slice(0,colon);return lookup(head)===void 0?"":head}function asError2(cause){return cause instanceof Error?cause:new Error(String(cause))}async function main(){for(let stream of[process.stdout,process.stderr])stream.on("error",err=>{if(err.code!=="EPIPE")throw err});process.exitCode=await run(process.argv.slice(2))}export{main};
|
|
934
934
|
/*! Bundled license information:
|
|
935
935
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibecloudtr/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Vibecloud (vibecloud.tr) is a Supabase-compatible backend and Next.js hosting platform that runs in Türkiye. The vibe CLI: projects, databases, deploys and domains from one command.",
|
|
5
5
|
"license": "Elastic-2.0",
|
|
6
6
|
"type": "module",
|