rapidkit 0.35.0 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ export{b as printAnalyzeReport,a as runAnalyze}from'./chunk-Y2ZPG7KN.js';
@@ -0,0 +1 @@
1
+ export{b as AUTOPILOT_RELEASE_ALIAS_FILENAME,a as AUTOPILOT_RELEASE_LAST_RUN_FILENAME,c as runAutopilotRelease}from'./chunk-UY4LZEXK.js';
@@ -0,0 +1,2 @@
1
+ import {d,b,a}from'./chunk-VPNHGQIV.js';import U from'crypto';import f from'path';import w from'fs-extra';import {spawnSync}from'child_process';function j(e,t){let r=spawnSync("git",t,{cwd:e,encoding:"utf8",stdio:["ignore","pipe","ignore"]});return r.status!==0?{ok:false,stdout:""}:{ok:true,stdout:(r.stdout??"").trim()}}function J(e){let t=[],r=[],o=[];for(let c of e.split(`
2
+ `)){if(!c.trim())continue;let n=c.slice(0,2),s=c.slice(3).trim();if(s){if(n==="??"){r.push(s);continue}n.includes("D")&&o.push(s),t.push(s);}}return {changedFiles:[...new Set(t)].sort(),untrackedFiles:[...new Set(r)].sort(),deletedFiles:[...new Set(o)].sort()}}function _(e,t){let r={available:false,dirty:false,changedFiles:[],untrackedFiles:[],deletedFiles:[]},o=j(e,["rev-parse","--is-inside-work-tree"]);if(!o.ok||o.stdout!=="true")return r;let c=j(e,["rev-parse","--abbrev-ref","HEAD"]),n=j(e,["rev-parse","HEAD"]),s=j(e,["status","--porcelain=v1","--untracked-files=all"]),i=J(s.stdout),p=i.changedFiles.length>0||i.untrackedFiles.length>0||i.deletedFiles.length>0;return {available:true,branch:c.ok?c.stdout:void 0,commit:n.ok?n.stdout:void 0,ref:t?.ref,dirty:p,changedFiles:i.changedFiles,untrackedFiles:i.untrackedFiles,deletedFiles:i.deletedFiles}}var V="workspace-model-snapshot.v1",G="workspace-model-diff.v1",E=".rapidkit/reports/workspace-model-snapshot.json",N=".rapidkit/reports/workspace-model-diff-last-run.json",Q="workspace-impact.v1",X=".rapidkit/reports/workspace-impact-last-run.json";function B(e){let t=e.trim().toLowerCase();return t==="git"||t.startsWith("git:")}function Y(e){let t=e.trim();return t.toLowerCase()==="git"?"HEAD":t.toLowerCase().startsWith("git:")&&t.slice(4).trim()||"HEAD"}function F(e){if(Array.isArray(e))return e.map(t=>F(t));if(e&&typeof e=="object"){let t={};for(let r of Object.keys(e).sort())t[r]=F(e[r]);return t}return e}function u(e){return JSON.stringify(F(e))}function S(e){let t={...e,generatedAt:"<ignored>",validation:e.validation?{...e.validation,issues:e.validation.issues.map(r=>({...r})).sort((r,o)=>{let c=`${r.severity}:${r.code}:${r.target}:${r.message}`,n=`${o.severity}:${o.code}:${o.target}:${o.message}`;return c.localeCompare(n)})}:void 0};return U.createHash("sha256").update(u(t)).digest("hex")}function L(e,t){return f.isAbsolute(t)?t:f.join(e,t)}async function Z(e){let t=await w.readJson(e);if(!t||typeof t!="object"||Array.isArray(t))throw new Error(`Workspace model input is not a JSON object: ${e}`);let r=t;if(r.schemaVersion===V){let o=r;if(!o.model||o.model.schemaVersion!==a)throw new Error(`Invalid workspace model snapshot: ${e}`);return {model:o.model,hash:o.modelHash||S(o.model)}}if(r.schemaVersion===a){let o=r;return {model:o,hash:S(o)}}throw new Error(`Unsupported workspace model input schema: ${String(r.schemaVersion)}`)}async function ee(e){let t=await w.readJson(e);if(!t||typeof t!="object"||Array.isArray(t))throw new Error(`Workspace diff input is not a JSON object: ${e}`);let r=t;if(r.schemaVersion!==G)return null;let o=r;if(!o.currentModel||o.currentModel.schemaVersion!==a||!o.summary||!Array.isArray(o.changes))throw new Error(`Invalid workspace model diff report: ${e}`);return o}async function Pe(e){let t=e.model??await d({workspacePath:e.workspacePath,includeAbsolutePaths:e.includeAbsolutePaths,includeEvidence:e.includeEvidence,observableScanDepth:e.observableScanDepth,now:e.now});return {schemaVersion:V,generatedAt:(e.now??new Date).toISOString(),modelHash:S(t),modelRef:b,model:t}}async function Me(e,t){let r=f.join(t,E);return await w.ensureDir(f.dirname(r)),await w.writeJson(r,e,{spaces:2}),r}function C(e){return {name:e.name,path:e.path,kind:e.kind,runtime:e.runtime,framework:e.framework,generator:e.generator,supportTier:e.supportTier,commands:e.commands,importantFiles:e.importantFiles}}function h(e,t){e.push(t);}function te(e,t){let r=[],o=["name","profile","type"],c=["workspaceType","surfaces","runtimeFamilies","businessCapabilities"];for(let n of o){let s=e.workspace[n],i=t.workspace[n];u(s)!==u(i)&&h(r,{type:"workspace.changed",severity:"info",target:`workspace.${n}`,message:`Workspace metadata field changed: ${String(n)}`,before:s,after:i});}for(let n of c){let s=e.identity[n],i=t.identity[n];u(s)!==u(i)&&h(r,{type:"workspace.changed",severity:"info",target:`identity.${n}`,message:`Workspace identity field changed: ${String(n)}`,before:s,after:i});}return u(e.policies)!==u(t.policies)&&h(r,{type:"workspace.changed",severity:"warning",target:"policies",message:"Workspace policy summary changed.",before:e.policies,after:t.policies}),u(e.evidence)!==u(t.evidence)&&h(r,{type:"workspace.changed",severity:"info",target:"evidence",message:"Workspace evidence summary changed.",before:e.evidence,after:t.evidence}),u(e.discovery)!==u(t.discovery)&&h(r,{type:"workspace.changed",severity:"info",target:"discovery",message:"Workspace discovery settings changed.",before:e.discovery,after:t.discovery}),e.contracts.exists!==t.contracts.exists&&h(r,{type:"workspace.changed",severity:t.contracts.exists?"info":"warning",target:t.contracts.workspaceContractPath,message:"Workspace contract presence changed.",before:e.contracts.exists,after:t.contracts.exists}),r}function re(e,t){let r=e.validation??null,o=t.validation??null;return u(r)===u(o)?[]:[{type:"validation.changed",severity:o?.status==="failed"?"critical":"warning",target:"validation",message:"Workspace model validation changed.",before:r,after:o}]}function oe(e,t){let r=[],o=new Map(e.projects.map(n=>[n.path,n])),c=new Map(t.projects.map(n=>[n.path,n]));for(let[n,s]of c.entries()){let i=o.get(n);if(!i){h(r,{type:"project.added",severity:"info",target:n,message:`Project added: ${s.name}`,after:C(s)});continue}let p=C(i),d=C(s);if(u(p)!==u(d)){let g=i.runtime!==s.runtime||i.framework!==s.framework;h(r,{type:"project.changed",severity:g?"warning":"info",target:n,message:`Project changed: ${s.name}`,before:p,after:d});}}for(let[n,s]of o.entries())c.has(n)||h(r,{type:"project.removed",severity:"warning",target:n,message:`Project removed: ${s.name}`,before:C(s)});return r.sort((n,s)=>`${n.type}:${n.target}`.localeCompare(`${s.type}:${s.target}`))}async function ne(e){let t=f.resolve(e.workspacePath),r=B(e.fromPath),o=r?Y(e.fromPath):void 0,c=e.fromPath;if(r){let m=f.join(t,E);if(!await w.pathExists(m))throw new Error("Git-aware workspace diff requires an existing snapshot at .rapidkit/reports/workspace-model-snapshot.json. Run: npx rapidkit workspace snapshot --json");c=E;}let n=L(t,c),s=await Z(n),i=e.model??await d({workspacePath:t,includeAbsolutePaths:e.includeAbsolutePaths,includeEvidence:e.includeEvidence,observableScanDepth:e.observableScanDepth,now:e.now}),p=S(i),d$1=[...te(s.model,i),...oe(s.model,i),...re(s.model,i)],g;e.includeGitObservation!==false&&(g=e.gitObservation??_(t,{ref:o}),g.available&&ie(d$1,g,i));let y=d$1.filter(m=>m.type.startsWith("git.")).length,v=s.hash!==p,O=r?`git:${o??"HEAD"}`:f.relative(t,n).split(f.sep).join("/");return {schemaVersion:G,generatedAt:(e.now??new Date).toISOString(),fromRef:O,toRef:b,fromHash:s.hash,toHash:p,summary:{changed:v||y>0,addedProjects:d$1.filter(m=>m.type==="project.added").length,removedProjects:d$1.filter(m=>m.type==="project.removed").length,changedProjects:d$1.filter(m=>m.type==="project.changed").length,workspaceChanges:d$1.filter(m=>m.type==="workspace.changed").length,validationChanges:d$1.filter(m=>m.type==="validation.changed").length,gitChangedFiles:y},git:g?.available?ce(g,o):{available:false,dirty:false,changedFiles:0,untrackedFiles:0,deletedFiles:0},changes:d$1,currentModel:i}}async function je(e,t){let r=f.join(t,N);return await w.ensureDir(f.dirname(r)),await w.writeJson(r,e,{spaces:2}),r}function R(e){return {none:0,low:1,medium:2,high:3,critical:4}[e]}function T(e){return e.reduce((t,r)=>R(r)>R(t)?r:t,"none")}function H(e){return e.join(" ")}function W(e,t,r,o){return {id:e,label:t,scope:o.scope,project:o.project,display:H(["npx","rapidkit",...r]),execute:H(["npx","--yes","--package","rapidkit","rapidkit",...r]),required:o.required!==false}}function ae(e){let t=`project:${e.name}`;return [W(`project.${e.name}.test`,`Run tests for ${e.name}`,["workspace","run","test","--scope",t,"--json"],{scope:"project",project:e.name,required:e.commands.fleetStages.includes("test")}),W(`project.${e.name}.build`,`Run build for ${e.name}`,["workspace","run","build","--scope",t,"--json"],{scope:"project",project:e.name,required:e.commands.fleetStages.includes("build")})]}function A(){return [W("workspace.doctor","Run workspace doctor",["doctor","workspace","--json"],{scope:"workspace"}),W("workspace.contract.verify","Verify workspace contract",["workspace","contract","verify","--json"],{scope:"workspace"}),W("workspace.readiness","Run release readiness",["readiness","--json"],{scope:"workspace"}),W("workspace.analyze","Run workspace analyze",["analyze","--json"],{scope:"workspace",required:false}),W("workspace.pipeline","Run governance pipeline",["pipeline","--json"],{scope:"workspace",required:false})]}function se(e,t){let r=t.split(f.sep).join("/");return e.projects.filter(c=>{let n=c.path.split(f.sep).join("/");return r===n||r.startsWith(`${n}/`)}).sort((c,n)=>n.path.length-c.path.length)[0]}function ie(e,t,r){let o=new Set(e.map(n=>n.target)),c=(n,s)=>{let i=s.split(f.sep).join("/"),p=`git:${i}`;if(o.has(p))return;let d=se(r,i),g=d?`${d.name} (${d.path})`:"workspace";h(e,{type:n,severity:n==="git.deleted"?"warning":"info",target:p,message:`Git ${n==="git.untracked"?"untracked":n==="git.deleted"?"deleted":"changed"} file affects ${g}: ${i}`,after:{path:i,project:d?.name,projectPath:d?.path}}),o.add(p);};for(let n of t.changedFiles)c("git.file.changed",n);for(let n of t.untrackedFiles)c("git.untracked",n);for(let n of t.deletedFiles)c("git.deleted",n);}function ce(e,t){return {available:true,ref:t??e.ref,branch:e.branch,commit:e.commit,dirty:e.dirty,changedFiles:e.changedFiles.length,untrackedFiles:e.untrackedFiles.length,deletedFiles:e.deletedFiles.length}}function pe(e){let t=new Set,r=[];for(let o of e){let c=`${o.scope}:${o.project??""}:${o.display}`;t.has(c)||(t.add(c),r.push(o));}return r}function de(e){return e.type==="project.removed"?"high":e.severity==="critical"?"critical":e.severity==="warning"?"high":("medium")}function le(e,t){return e.severity==="critical"?"critical":e.target==="policies"||e.target.includes("contract")?"high":e.type==="validation.changed"?(t?.projectCount??0)===0?"low":"high":e.target==="evidence"?"low":e.severity==="warning"?"medium":"low"}function fe(e){return e.affectedProjects>0||e.projectCount>0||!e.changes.every(r=>r.severity==="critical"?false:r.type.startsWith("git.")||r.type==="validation.changed")?e.risk:R(e.risk)>=R("high")||e.risk==="medium"?"low":e.risk}function me(e,t){if(!e||e==="workspace")return true;let r=(e.startsWith("project:")?e.slice(8):e).trim().toLowerCase();return [t.name,t.path,f.basename(t.path),t.absolutePath].filter(o=>typeof o=="string"&&o.trim().length>0).map(o=>o.trim().toLowerCase()).includes(r)}function ue(e){if(!e.changed)return {headline:"No workspace model impact detected.",bullets:["The current workspace model matches the provided snapshot/report."],unsafeAssumptions:["Do not claim runtime verification passed unless a report exists."]};let t=e.affectedProjects.map(r=>r.project?.name??r.target);return {headline:`Workspace impact risk: ${e.risk}.`,bullets:[`Affected projects: ${t.length?t.join(", "):"none"}.`,`Workspace-level items: ${e.workspaceImpact.length}.`,"Use the verification plan before recommending apply, rollback, or release actions."],unsafeAssumptions:["Do not infer test/build success from impact alone.","Do not apply fixes without project scope and verification evidence.","Use display commands for users and execute commands for automation."]}}async function Ce(e){let t=f.resolve(e.workspacePath),r=B(e.fromPath),o=e.diff;if(!o&&!r){let a=L(t,e.fromPath);o=await ee(a)??void 0;}o||(o=await ne({workspacePath:t,fromPath:e.fromPath,includeAbsolutePaths:e.includeAbsolutePaths,includeEvidence:e.includeEvidence,includeGitObservation:e.includeGitObservation,gitObservation:e.gitObservation,now:e.now,model:e.model}));let c=new Map(o.currentModel.projects.map(a=>[a.path,a])),n=new Map(o.currentModel.projects.map(a=>[a.name,a])),s=o.changes.filter(a=>a.type.startsWith("project.")),i=new Map;for(let a of s){let l=(c.get(a.target)??(typeof a.before?.name=="string"?n.get(a.before.name):void 0))?.path??a.target,b=i.get(l)??[];b.push(a),i.set(l,b);}let p=[];for(let[a,k]of i.entries()){let l=c.get(a);if(l&&!me(e.scope,l))continue;let b=T(k.map(de)),x=l?.name??(typeof k[0]?.before?.name=="string"?String(k[0].before.name):a);p.push({id:`project:${x}`,scope:"project",target:a,title:`Project impact: ${x}`,summary:k.map(P=>P.message).join(" "),risk:b,reasons:k.map(P=>`${P.type}: ${P.message}`),project:l?{name:l.name,path:l.path,kind:l.kind,runtime:l.runtime,framework:l.framework,supportTier:l.supportTier,...l.generator?{generator:l.generator}:{}}:void 0,verification:l?ae(l):A()});}let d=o.changes.filter(a=>!a.type.startsWith("project.")),g=o.currentModel.summary?.projectCount??o.currentModel.projects.length,y=d.map(a=>({id:`workspace:${a.target}`,scope:"workspace",target:a.target,title:`Workspace impact: ${a.target}`,summary:a.message,risk:le(a,{projectCount:g}),reasons:[`${a.type}: ${a.message}`],verification:A()})),v=pe([...p.flatMap(a=>a.verification),...y.flatMap(a=>a.verification),...o.summary.changed?A():[]]).filter(a=>a.required),O=T([...p.map(a=>a.risk),...y.map(a=>a.risk)]),m=fe({risk:O,affectedProjects:p.length,projectCount:g,changes:o.changes}),$={changed:o.summary.changed,risk:m,affectedProjects:p.length,workspaceItems:y.length,recommendedCommands:v.length};return {schemaVersion:Q,generatedAt:(e.now??new Date).toISOString(),fromRef:o.fromRef,diffRef:N,workspace:{name:o.currentModel.workspace.name,profile:o.currentModel.workspace.profile,type:o.currentModel.workspace.type},summary:$,affectedProjects:p.sort((a,k)=>a.target.localeCompare(k.target)),workspaceImpact:y.sort((a,k)=>a.target.localeCompare(k.target)),verificationPlan:v,agentBrief:ue({changed:$.changed,risk:m,affectedProjects:p,workspaceImpact:y}),diff:o}}async function Se(e,t){let r=f.join(t,X);return await w.ensureDir(f.dirname(r)),await w.writeJson(r,e,{spaces:2}),r}export{V as a,G as b,E as c,N as d,Q as e,X as f,B as g,Y as h,Pe as i,Me as j,ne as k,je as l,A as m,Ce as n,Se as o};
@@ -0,0 +1,4 @@
1
+ import {a as a$1,b as b$1,d as d$1,c,f}from'./chunk-YBS2HGO3.js';import {a,b}from'./chunk-KMUWWZRT.js';import {c as c$1}from'./chunk-NFUXULIF.js';import u from'chalk';import d from'fs';import m from'fs-extra';import l from'path';function C(t,e){let a=l.resolve(t);if(!b(a))return a;let s=l.join(e,".rapidkit","workspace.contract.json");if(d.existsSync(s))try{let i=JSON.parse(d.readFileSync(s,"utf-8")),n=Array.isArray(i.projects)?i.projects:[];for(let c of n){let y=p(c),f=typeof y.relativePath=="string"?y.relativePath.trim():"";if(f)return l.join(e,f)}}catch{}let r=k(e),o=Array.isArray(r.payload?.projects)?r.payload.projects:[];for(let i of o){let n=p(i),c=typeof n.path=="string"?n.path.trim():"";if(c)return l.resolve(c)}return a}function $(t){let e=a$1(t);return b$1(e,t)?"go":d$1(e,t)?"java":c(e,t)?"node":f(e,t)?"python":"unknown"}function x(t,e){if(!d.existsSync(t))return null;let a=d.readdirSync(t).filter(s=>s.endsWith(".json")&&e.some(r=>r.test(s))).map(s=>l.join(t,s));return a.length===0?null:(a.sort((s,r)=>d.statSync(r).mtimeMs-d.statSync(s).mtimeMs),a[0])}function p(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}function G(t){let e=l.join(t,".rapidkit","workspace.contract.json");if(d.existsSync(e))try{let r=JSON.parse(d.readFileSync(e,"utf-8")),o=Array.isArray(r.projects)?r.projects:[];if(o.length>0)return o.length}catch{}let a=k(t);return (Array.isArray(a.payload?.projects)?a.payload.projects:[]).length}function z(t,e,a){let s=l.join(t,".rapidkit","toolchain.lock");if(!d.existsSync(s))return {gate:"env",status:"fail",summary:"toolchain.lock is missing",details:["Run rapidkit bootstrap to pin runtime versions and generate a reproducible toolchain."],evidencePath:s};try{let r=JSON.parse(d.readFileSync(s,"utf-8")),o=p(r.runtime),n=["python","node","go","java"].filter(c=>{let y=p(o[c]);return typeof y.version=="string"&&y.version.trim().length>0});if(n.length===0)return {gate:"env",status:"fail",summary:"No runtime versions are pinned in toolchain.lock",details:["Pin at least one runtime version via rapidkit setup <runtime> and re-run bootstrap."],evidencePath:s};if(e!=="unknown"){let c=p(o[e]);if(typeof c.version!="string"||c.version.trim().length===0)return {gate:"env",status:"fail",summary:`${a?.hasRegisteredProjects?"Project runtime":"Workspace"} (${e}) is not pinned in toolchain.lock`,details:[`Run rapidkit setup ${e} and rapidkit bootstrap to lock ${e} for this workspace.`],evidencePath:s}}return {gate:"env",status:"pass",summary:`Pinned runtimes: ${n.join(", ")}`,details:[],evidencePath:s}}catch{return {gate:"env",status:"fail",summary:"toolchain.lock is invalid JSON",details:["Regenerate lockfile with rapidkit bootstrap."],evidencePath:s}}}function k(t){let e=l.join(t,".rapidkit","reports","doctor-last-run.json");if(!d.existsSync(e))return {payload:null,path:e};try{let a=JSON.parse(d.readFileSync(e,"utf-8"));return c$1(a,"workspace")?{payload:a,path:e}:{payload:null,path:e}}catch{return {payload:null,path:e}}}function V(t){let e=k(t);if(!e.payload)return {gate:{gate:"doctor",status:"fail",summary:"Doctor evidence is missing",details:["Run rapidkit doctor workspace --json before release readiness checks."],evidencePath:e.path},payload:null};let a=p(e.payload.summary),s=Number(a.totalIssues??0);return a.hasSystemErrors?{gate:{gate:"doctor",status:"fail",summary:"Doctor reported system errors",details:["Resolve system-level doctor errors before proceeding."],evidencePath:e.path},payload:e.payload}:s>0?{gate:{gate:"doctor",status:"warn",summary:`Doctor found ${s} issue(s)`,details:["Run rapidkit doctor workspace --fix and re-run readiness checks."],evidencePath:e.path},payload:e.payload}:{gate:{gate:"doctor",status:"pass",summary:"Doctor checks passed without issues",details:[],evidencePath:e.path},payload:e.payload}}function E(t){let e=l.join(t,".rapidkit","reports","analyze-last-run.json");if(!d.existsSync(e))return {gate:"analyze",status:"fail",summary:"Analyze evidence is missing",details:["Run rapidkit analyze --json before release readiness checks."],evidencePath:e};try{let a=JSON.parse(d.readFileSync(e,"utf-8")),s=p(a.summary),r=String(s.verdict??"").toLowerCase(),o=Number(s.score??0),i=p(s.findings),n=Number(i.fail??0);return r==="blocked"||n>0?{gate:"analyze",status:"fail",summary:`Analyze verdict is blocked (score ${o}/100)`,details:["Resolve analyze findings and regenerate analyze-last-run.json."],evidencePath:e}:r==="needs-attention"?{gate:"analyze",status:"warn",summary:`Analyze needs attention (score ${o}/100)`,details:["Review analyze warnings before release."],evidencePath:e}:{gate:"analyze",status:"pass",summary:`Analyze passed (score ${o}/100)`,details:[],evidencePath:e}}catch{return {gate:"analyze",status:"fail",summary:"Analyze evidence is invalid JSON",details:["Re-run rapidkit analyze --json to regenerate evidence."],evidencePath:e}}}function J(t){try{let e=JSON.parse(d.readFileSync(t,"utf-8")),a=String(e.status??"").toLowerCase(),s=p(e.summary),r=Number(s.failedChecks??0);return a==="fail"||r>0?{gate:"verify",status:"fail",summary:"Verify-pack contract reports failed checks",details:["Fix failed verify checks and regenerate verify-pack contract evidence."],evidencePath:t}:a==="pass"?{gate:"verify",status:"pass",summary:"Verify-pack contract passed",details:[],evidencePath:t}:{gate:"verify",status:"warn",summary:"Verify-pack contract status is not explicit",details:["Ensure contract status is pass/fail and keep schema aligned with v1 contract."],evidencePath:t}}catch{return {gate:"verify",status:"fail",summary:"Verify-pack contract is invalid JSON",details:["Regenerate verify-pack contract artifact."],evidencePath:t}}}async function L(t,e){if(e.skipVerify)return {gate:"verify",status:"pass",summary:"Verify gate skipped (--skip-verify)",details:["Verification was explicitly skipped for this readiness run."]};let a=l.join(t,".rapidkit","reports"),s=x(a,[/verify-pack-contract/i,/^verify.*\.json$/i]);if(s)return J(s);let r=l.join(a,"workspace-contract-verify-last-run.json"),o=x(a,[/workspace-contract-verify-last-run/i,/workspace-contract-verify/i]);if(o)try{let i=JSON.parse(d.readFileSync(o,"utf-8")),n=String(i.status??"").toLowerCase();if(n==="passed"||n==="pass")return {gate:"verify",status:"pass",summary:"Workspace contract verification passed (CLI cache)",details:[],evidencePath:o};if(n==="failed"||n==="fail")return {gate:"verify",status:"fail",summary:"Workspace contract verification failed (CLI cache)",details:(Array.isArray(i.violations)?i.violations:[]).slice(0,5),evidencePath:o}}catch{}try{let{verifyWorkspaceContract:i}=await import('./workspace-contract-A6QP7FPA.js'),n=await i({workspacePath:t}),c={schemaVersion:"v1",source:"cli",generatedAt:new Date().toISOString(),status:n.status,contractPath:n.contractPath,projectCount:n.projectCount,checks:n.checks,violations:n.violations};return await m.ensureDir(a),await m.writeJSON(r,c,{spaces:2}),n.status==="failed"?{gate:"verify",status:"fail",summary:"Workspace contract verification failed (CLI)",details:n.violations.slice(0,5),evidencePath:r}:{gate:"verify",status:"pass",summary:"Workspace contract verification passed (CLI)",details:[],evidencePath:r}}catch(i){return {gate:"verify",status:"fail",summary:"No verify evidence and workspace contract verification unavailable",details:["Run rapidkit workspace contract verify --json or export verify-pack contract from CI.",i instanceof Error?i.message:String(i)],evidencePath:l.join(a,"*verify*.json")}}}function D(t,e){let a=l.join(e,".rapidkit","reports","doctor-last-run.json");if(!t)return {gate:"dependency",status:"warn",summary:"Dependency risk check skipped (doctor evidence missing)",details:["Run rapidkit doctor workspace --json to include dependency findings."],evidencePath:a};let s=Array.isArray(t.projects)?t.projects:[],r=s.reduce((i,n)=>{let c=Number(n.vulnerabilities??0);return Number.isFinite(c)?i+Math.max(0,c):i},0),o=s.filter(i=>i.depsInstalled===false).length;return r>0?{gate:"dependency",status:"fail",summary:`${r} dependency vulnerability(ies) reported`,details:["Resolve vulnerabilities (npm/pip/go audit pipelines) before release."],evidencePath:a}:o>0?{gate:"dependency",status:"warn",summary:`${o} project(s) report missing dependencies`,details:["Run project init/bootstrap and regenerate doctor evidence."],evidencePath:a}:{gate:"dependency",status:"pass",summary:"No dependency vulnerabilities reported",details:[],evidencePath:a}}function I(t){return t.some(e=>e.status==="fail")?"fail":t.some(e=>e.status==="warn")?"warn":"pass"}async function W(t,e){let a=l.join(t,".rapidkit","reports","release-readiness-last-run.json");return await m.ensureDir(l.dirname(a)),await m.writeJSON(a,e,{spaces:2}),a}async function F(t={}){let e=l.resolve(t.startPath??process.cwd()),a$1=a(e)??e,s=C(e,a$1),r=$(s),o=G(a$1)>0,i=z(a$1,r,{hasRegisteredProjects:o}),n=V(a$1),c=E(a$1),y=await L(a$1,{skipVerify:t.skipVerify}),f=D(n.payload,a$1),v=[i,n.gate,c,y,f],R=I(v),h={schemaVersion:"v1",generatedAt:new Date().toISOString(),workspacePath:a$1,projectPath:s,action:t.action,overallStatus:R,blocking:R==="fail",blockingReasons:v.filter(g=>g.status==="fail").map(g=>`${g.gate}: ${g.summary}`),gates:v};return t.writeReport!==false&&(h.evidencePath=await W(a$1,h)),h}function K(t){return t==="pass"?u.green("PASS"):t==="warn"?u.yellow("WARN"):u.red("FAIL")}function M(t){return t==="pass"?u.green("PASS"):t==="warn"?u.yellow("WARN"):u.red("FAIL")}async function _(t){let e=await F({writeReport:true,skipVerify:t.skipVerify===true});if(t.json)console.log(JSON.stringify(e,null,2));else {console.log(u.bold.cyan(`
2
+ \u{1F6A6} RapidKit Release Readiness
3
+ `)),console.log(u.bold(`Workspace: ${u.cyan(l.basename(e.workspacePath))}`)),console.log(u.gray(`Path: ${e.workspacePath}`)),console.log(`Overall: ${M(e.overallStatus)}`);for(let a of e.gates){console.log(` - ${a.gate}: ${K(a.status)} ${a.summary}`);for(let s of a.details)console.log(u.gray(` ${s}`));a.evidencePath&&console.log(u.gray(` evidence: ${a.evidencePath}`));}e.evidencePath&&console.log(u.gray(`
4
+ Evidence saved: ${e.evidencePath}`));}t.strict&&e.overallStatus!=="pass"&&process.exit(1);}export{F as a,_ as b};
@@ -1,6 +1,6 @@
1
1
  import {a}from'./chunk-A5FBGRJA.js';import {c}from'./chunk-NFUXULIF.js';import {a as a$1}from'./chunk-VKLL63TL.js';import {b}from'./chunk-AC6KIKII.js';import {j}from'./chunk-Z5LKRG57.js';import {promises}from'fs';import o from'path';import i from'chalk';import N from'ora';import {execa}from'execa';function O(e){let t=a(e.path),r=Array.isArray(e.projects)?e.projects:[],a$1=[],c=new Set;for(let p of r){if(!p||typeof p.name!="string"||typeof p.path!="string")continue;let n=a(p.path);c.has(n)||(c.add(n),a$1.push({name:p.name,path:n}));}return {name:e.name,path:t,mode:e.mode,projects:a$1}}function P(e){let t=[],r=new Set;for(let a of e.workspaces||[]){if(!a||typeof a.name!="string"||typeof a.path!="string")continue;let c=O(a);r.has(c.path)||(r.add(c.path),t.push(c));}return {workspaces:t}}async function B(e,t){try{let r=a(e),a$1=j(),c=o.join(a$1,"workspaces.json");await promises.mkdir(a$1,{recursive:true});let p={workspaces:[]};try{let s=await promises.readFile(c,"utf8"),l=JSON.parse(s);l&&Array.isArray(l.workspaces)&&(p=P(l));}catch{}p.workspaces.some(s=>s.path===r)||(p.workspaces.push({name:t,path:r,mode:"full",projects:[]}),await promises.writeFile(c,JSON.stringify(p,null,2)));}catch{console.warn(i.gray("Note: Could not register workspace in shared registry"));}}async function oe(e,t=false){let r=a(e),a$1={workspacePath:r,workspaceFound:false,added:[],skipped:0};try{let c=j(),p=o.join(c,"workspaces.json"),n={workspaces:[]};try{let f=await promises.readFile(p,"utf8"),h=JSON.parse(f);h&&Array.isArray(h.workspaces)&&(n=P(h));}catch{return t||console.log("\u26A0\uFE0F Workspace registry not found"),a$1}let s=n.workspaces.find(f=>f.path===r);if(!s)return t||console.log("\u26A0\uFE0F Workspace not registered in registry"),a$1;Array.isArray(s.projects)||(s.projects=[]);let l=0,k=0,u=[],m=[e],y=new Set;for(;m.length>0;){let f=m.shift();if(!f||y.has(f))continue;y.add(f);let h=await promises.readdir(f,{withFileTypes:true});for(let w of h){if(!w.isDirectory()||w.name.startsWith(".")||["node_modules","dist","build","target","coverage","htmlcov"].includes(w.name))continue;let b=o.join(f,w.name),g=a(b),$=o.join(g,".rapidkit","context.json"),D=o.join(g,".rapidkit","project.json");try{let S=false;try{await promises.access($),S=true;}catch{await promises.access(D),S=true;}if(S){let v=o.basename(g);s.projects.some(_=>_.path===g||_.name===v)?k++:(s.projects.push({name:v,path:g}),l++,u.push(g),t||console.log(`\u2714 Added: ${o.relative(e,g)}`));continue}}catch{}m.push(b);}}return l>0?(await promises.writeFile(p,JSON.stringify(n,null,2)),t||console.log(`
2
2
  \u2705 Synced ${l} project(s) to registry`)):t||console.log(`
3
- \u2705 All projects already registered (${k} found)`),{workspacePath:r,workspaceFound:true,added:u,skipped:k}}catch(c){return t||console.error("\u274C Failed to sync projects:",c.message),a$1}}async function ne(e,t,r){try{let a$1=a(e),c=a(r),p=j(),n=o.join(p,"workspaces.json"),s={workspaces:[]};try{let m=await promises.readFile(n,"utf8"),y=JSON.parse(m);y&&Array.isArray(y.workspaces)&&(s=P(y));}catch{return}let l=s.workspaces.find(m=>m.path===a$1);if(!l)return;Array.isArray(l.projects)||(l.projects=[]);let k=l.projects.findIndex(m=>m.path===c||m.name===t),u={name:t,path:c};if(k>=0){let m=l.projects[k];(m.name!==u.name||m.path!==u.path)&&(l.projects[k]=u,await promises.writeFile(n,JSON.stringify(s,null,2)));}else l.projects.push({name:t,path:c}),await promises.writeFile(n,JSON.stringify(s,null,2));}catch{}}async function se(e,t){let r=N("Creating RapidKit workspace...").start();try{await promises.mkdir(e,{recursive:true}),await promises.mkdir(o.join(e,".rapidkit"),{recursive:true});let a={workspace_name:t.name,author:t.author,rapidkit_version:b(),created_at:new Date().toISOString(),type:"workspace"};await promises.writeFile(o.join(e,".rapidkit","config.json"),JSON.stringify(a,null,2));let{syncWorkspaceFoundationFiles:c}=await import('./create-LUXJGSNL.js');await c(e,{workspaceName:t.name,installMethod:"venv",writeMarker:true,writeGitignore:false,onlyIfMissing:true});let p=T();await promises.writeFile(o.join(e,"rapidkit"),p),await promises.chmod(o.join(e,"rapidkit"),493);let n=z();await promises.writeFile(o.join(e,"rapidkit.cmd"),n);let s=U(t.name);if(await promises.writeFile(o.join(e,"README.md"),s),await promises.writeFile(o.join(e,".gitignore"),`# RapidKit workspace
3
+ \u2705 All projects already registered (${k} found)`),{workspacePath:r,workspaceFound:true,added:u,skipped:k}}catch(c){return t||console.error("\u274C Failed to sync projects:",c.message),a$1}}async function ne(e,t,r){try{let a$1=a(e),c=a(r),p=j(),n=o.join(p,"workspaces.json"),s={workspaces:[]};try{let m=await promises.readFile(n,"utf8"),y=JSON.parse(m);y&&Array.isArray(y.workspaces)&&(s=P(y));}catch{return}let l=s.workspaces.find(m=>m.path===a$1);if(!l)return;Array.isArray(l.projects)||(l.projects=[]);let k=l.projects.findIndex(m=>m.path===c||m.name===t),u={name:t,path:c};if(k>=0){let m=l.projects[k];(m.name!==u.name||m.path!==u.path)&&(l.projects[k]=u,await promises.writeFile(n,JSON.stringify(s,null,2)));}else l.projects.push({name:t,path:c}),await promises.writeFile(n,JSON.stringify(s,null,2));}catch{}}async function se(e,t){let r=N("Creating RapidKit workspace...").start();try{await promises.mkdir(e,{recursive:true}),await promises.mkdir(o.join(e,".rapidkit"),{recursive:true});let a={workspace_name:t.name,author:t.author,rapidkit_version:b(),created_at:new Date().toISOString(),type:"workspace"};await promises.writeFile(o.join(e,".rapidkit","config.json"),JSON.stringify(a,null,2));let{syncWorkspaceFoundationFiles:c}=await import('./create-7R4CGABE.js');await c(e,{workspaceName:t.name,installMethod:"venv",writeMarker:true,writeGitignore:false,onlyIfMissing:true});let p=T();await promises.writeFile(o.join(e,"rapidkit"),p),await promises.chmod(o.join(e,"rapidkit"),493);let n=z();await promises.writeFile(o.join(e,"rapidkit.cmd"),n);let s=U(t.name);if(await promises.writeFile(o.join(e,"README.md"),s),await promises.writeFile(o.join(e,".gitignore"),`# RapidKit workspace
4
4
  .env
5
5
  .env.*
6
6
  !.env.example
@@ -1,12 +1,12 @@
1
- import {i,d as d$2,l,k,f as f$1,g as g$1,h}from'./chunk-IATULVMR.js';import {a,d,b as b$1}from'./chunk-RV6HBTFC.js';import {b}from'./chunk-AC6KIKII.js';import {a as a$1}from'./chunk-VM2TOHNX.js';import {a as a$2,e,d as d$1,f,c,k as k$1}from'./chunk-Z5LKRG57.js';import {promises}from'fs';import*as P from'fs-extra';import g from'path';import Y from'inquirer';import t from'chalk';import F from'ora';import {execa}from'execa';function A(){return c()}async function H(e,o,n,a){let l=d(o,b(),n);a&&(l.metadata||(l.metadata={}),l.metadata.python={version:a}),await b$1(e,l);}async function L(e){await P.outputFile(g.join(e,".gitignore"),`.venv/
1
+ import {i,d as d$2,l,k,f as f$1,g as g$1,h}from'./chunk-IATULVMR.js';import {a,d,b as b$2}from'./chunk-RV6HBTFC.js';import {b as b$1}from'./chunk-AC6KIKII.js';import {a as a$1}from'./chunk-VM2TOHNX.js';import {a as a$2,e,d as d$1,f,c,k as k$1}from'./chunk-Z5LKRG57.js';import {promises}from'fs';import*as b from'fs-extra';import g from'path';import q from'inquirer';import t from'chalk';import F from'ora';import {execa}from'execa';function A(){return c()}async function H(e,o,n,a){let s=d(o,b$1(),n);a&&(s.metadata||(s.metadata={}),s.metadata.python={version:a}),await b$2(e,s);}async function L(e){await b.outputFile(g.join(e,".gitignore"),`.venv/
2
2
  __pycache__/
3
3
  *.pyc
4
4
  .env
5
5
  .rapidkit-workspace/
6
6
 
7
- `,"utf-8");}async function U(e,o){let n=o.replace(/[^a-z0-9-]/gi,"-").toLowerCase();await P.outputFile(g.join(e,"poetry.toml"),`[virtualenvs]
7
+ `,"utf-8");}async function U(e,o){let n=o.replace(/[^a-z0-9-]/gi,"-").toLowerCase();await b.outputFile(g.join(e,"poetry.toml"),`[virtualenvs]
8
8
  in-project = true
9
- `,"utf-8"),await P.outputFile(g.join(e,"pyproject.toml"),`[tool.poetry]
9
+ `,"utf-8"),await b.outputFile(g.join(e,"pyproject.toml"),`[tool.poetry]
10
10
  name = "${n}"
11
11
  version = "0.1.0"
12
12
  description = "RapidKit workspace"
@@ -20,7 +20,7 @@ rapidkit-core = "*"
20
20
  [build-system]
21
21
  requires = ["poetry-core"]
22
22
  build-backend = "poetry.core.masonry.api"
23
- `,"utf-8");}function ht(e,o,n,a){return JSON.stringify({schema_version:"1.0",workspace_name:e,rapidkit_version:b(),created_at:new Date().toISOString(),created_by:"rapidkit-npm",profile:a||"minimal",engine:{install_method:o,python_version:n||null}},null,2)}function ft(e,o,n,a,l){return JSON.stringify({schema_version:"1.0",generated_by:"rapidkit-npm",generated_at:new Date().toISOString(),runtime:{python:{version:o||null,install_method:e},node:{version:n||process.version},go:{version:a||null},java:{version:null,build_tool:null,build_tool_version:null},dotnet:{version:l||null,sdk:l||null}}},null,2)}function wt(){return `version: "1.0"
23
+ `,"utf-8");}function ht(e,o,n,a,s){return JSON.stringify({schema_version:"1.0",workspace_name:e,rapidkit_version:b$1(),created_at:new Date().toISOString(),created_by:"rapidkit-npm",profile:a||"minimal",...s?.profileRequested?{profile_requested:s.profileRequested}:{},...s?.bootstrapNote?{bootstrap_note:s.bootstrapNote}:{},engine:{install_method:o,python_version:n||null}},null,2)}function ft(e,o,n,a,s){return JSON.stringify({schema_version:"1.0",generated_by:"rapidkit-npm",generated_at:new Date().toISOString(),runtime:{python:{version:o||null,install_method:e},node:{version:n||process.version},go:{version:a||null},java:{version:null,build_tool:null,build_tool_version:null},dotnet:{version:s||null,sdk:s||null}}},null,2)}function wt(){return `version: "1.0"
24
24
  mode: warn # "warn" or "strict"
25
25
  dependency_sharing_mode: isolated # "isolated" or "shared-runtime-caches" or "shared-node-deps"
26
26
  # change profile (recommended): npx rapidkit bootstrap --profile polyglot
@@ -35,12 +35,12 @@ cache:
35
35
  prune_on_bootstrap: false
36
36
  self_heal: true
37
37
  verify_integrity: false
38
- `}async function kt(){try{let{stdout:e}=await execa("go",["version"],{timeout:3e3,stdio:"pipe"}),o=e.match(/go(\d+\.\d+(?:\.\d+)?)/i);return o?o[1]:void 0}catch{return}}async function Pt(){try{let{stdout:e}=await execa("dotnet",["--version"],{timeout:3e3,stdio:"pipe"}),o=e.trim();return o.length>0?o:void 0}catch{return}}async function z(e,o,n,a,l){let[d,c]=await Promise.all([kt(),Pt()]);await P.outputFile(g.join(e,".rapidkit","workspace.json"),ht(o,n,a,l),"utf-8"),await P.outputFile(g.join(e,".rapidkit","toolchain.lock"),ft(n,a,process.version,d,c),"utf-8"),await P.outputFile(g.join(e,".rapidkit","policies.yml"),wt(),"utf-8"),await P.outputFile(g.join(e,".rapidkit","cache-config.yml"),vt(),"utf-8");}async function de(e,o){let{workspaceName:n=g.basename(e),installMethod:a$1="venv",pythonVersion:l,profile:d$1,writeMarker:c=true,writeGitignore:p=true,onlyIfMissing:u=true}=o||{},h=[],[m,r]=await Promise.all([kt(),Pt()]),i=[{relPath:g.join(".rapidkit","workspace.json"),content:ht(n,a$1,l,d$1)},{relPath:g.join(".rapidkit","toolchain.lock"),content:ft(a$1,l,process.version,m,r)},{relPath:g.join(".rapidkit","policies.yml"),content:wt()},{relPath:g.join(".rapidkit","cache-config.yml"),content:vt()}];for(let f of i){let y=g.join(e,f.relPath);u&&await P.pathExists(y)||(await P.outputFile(y,f.content,"utf-8"),h.push(f.relPath));}if(c&&(!!!await a(e)||!u)){let y=d(n,b(),a$1);l&&(y.metadata||(y.metadata={}),y.metadata.python={version:l}),await b$1(e,y),h.push(".rapidkit-workspace");}if(p){let f=g.join(e,".gitignore");(!u||!await P.pathExists(f))&&(await L(e),h.push(".gitignore"));}return h}var bt=new Set(["go-only","java-only","dotnet-only","node-only","minimal"]),Tt={"python-only":"minimal",polyglot:"node-only",enterprise:"polyglot"};function Kt(e){let o=e,n=new Set;for(;!bt.has(o);){if(n.has(o))return "minimal";n.add(o);let a=Tt[o];if(!a)return "minimal";o=a;}return o}var T="3.10",xt=["3.10","3.11","3.12"];async function gt(e){try{let{stdout:o}=await execa(e,["--version"],{timeout:3e3}),n=o.match(/Python (\d+\.\d+\.\d+)/);if(n)return n[1]}catch{}return null}async function Nt(e,o){try{await promises.writeFile(g.join(e,".python-version"),`${o}
39
- `,"utf-8"),a$1.debug(`Created .python-version with ${o}`);}catch(n){a$1.warn(`Failed to create .python-version: ${n}`);}}function N(){let n=[...(process.env.PATH||"").split(g.delimiter).filter(Boolean)];for(let a of k$1())n.includes(a)||n.unshift(a);process.env.PATH=n.join(g.delimiter);}async function tt(e,o){N(),e.start("Checking pipx installation");try{return await execa("pipx",["--version"]),e.succeed("pipx found"),{kind:"binary"}}catch{}let n=A();try{return await execa(n,["-m","pipx","--version"]),e.succeed("pipx found"),{kind:"python-module",pythonCmd:n}}catch{}if(o)throw new h;e.stop?.();let{installPipx:a}=await Y.prompt([{type:"confirm",name:"installPipx",message:"pipx is not installed. Install it now (user install via python -m pip)?",default:true}]);if(!a)throw new h;e.start("Installing pipx (user install)");try{try{await execa(n,["-m","pip","install","--user","--upgrade","pip"]);}catch{}await execa(n,["-m","pip","install","--user","--upgrade","pipx"]);}catch(l){let d=l,c=String(d?.stderr||d?.shortMessage||d?.message||"");throw new k("Install pipx with python -m pip",l instanceof Error?l:new Error(c))}e.succeed("pipx installed"),N();try{return await execa(n,["-m","pipx","--version"]),{kind:"python-module",pythonCmd:n}}catch(l){let d=l,c=String(d?.stderr||d?.shortMessage||d?.message||"pipx not runnable after install");throw new k("Verify pipx after install",new Error(`${c}
38
+ `}async function kt(){try{let{stdout:e}=await execa("go",["version"],{timeout:3e3,stdio:"pipe"}),o=e.match(/go(\d+\.\d+(?:\.\d+)?)/i);return o?o[1]:void 0}catch{return}}async function Pt(){try{let{stdout:e}=await execa("dotnet",["--version"],{timeout:3e3,stdio:"pipe"}),o=e.trim();return o.length>0?o:void 0}catch{return}}async function z(e,o,n,a,s,d){let[c,p]=await Promise.all([kt(),Pt()]);await b.outputFile(g.join(e,".rapidkit","workspace.json"),ht(o,n,a,s,d),"utf-8"),await b.outputFile(g.join(e,".rapidkit","toolchain.lock"),ft(n,a,process.version,c,p),"utf-8"),await b.outputFile(g.join(e,".rapidkit","policies.yml"),wt(),"utf-8"),await b.outputFile(g.join(e,".rapidkit","cache-config.yml"),vt(),"utf-8");}async function de(e,o){let{workspaceName:n=g.basename(e),installMethod:a$1="venv",pythonVersion:s,profile:d$1,writeMarker:c=true,writeGitignore:p=true,onlyIfMissing:u=true}=o||{},h=[],[m,r]=await Promise.all([kt(),Pt()]),i=[{relPath:g.join(".rapidkit","workspace.json"),content:ht(n,a$1,s,d$1)},{relPath:g.join(".rapidkit","toolchain.lock"),content:ft(a$1,s,process.version,m,r)},{relPath:g.join(".rapidkit","policies.yml"),content:wt()},{relPath:g.join(".rapidkit","cache-config.yml"),content:vt()}];for(let f of i){let y=g.join(e,f.relPath);u&&await b.pathExists(y)||(await b.outputFile(y,f.content,"utf-8"),h.push(f.relPath));}if(c&&(!!!await a(e)||!u)){let y=d(n,b$1(),a$1);s&&(y.metadata||(y.metadata={}),y.metadata.python={version:s}),await b$2(e,y),h.push(".rapidkit-workspace");}if(p){let f=g.join(e,".gitignore");(!u||!await b.pathExists(f))&&(await L(e),h.push(".gitignore"));}return h}var bt=new Set(["go-only","java-only","dotnet-only","node-only","minimal"]),Tt={"python-only":"minimal",polyglot:"node-only",enterprise:"polyglot"};function Kt(e){let o=e,n=new Set;for(;!bt.has(o);){if(n.has(o))return "minimal";n.add(o);let a=Tt[o];if(!a)return "minimal";o=a;}return o}var T="3.10",xt=["3.10","3.11","3.12"];async function gt(e){try{let{stdout:o}=await execa(e,["--version"],{timeout:3e3}),n=o.match(/Python (\d+\.\d+\.\d+)/);if(n)return n[1]}catch{}return null}async function Nt(e,o){try{await promises.writeFile(g.join(e,".python-version"),`${o}
39
+ `,"utf-8"),a$1.debug(`Created .python-version with ${o}`);}catch(n){a$1.warn(`Failed to create .python-version: ${n}`);}}function N(){let n=[...(process.env.PATH||"").split(g.delimiter).filter(Boolean)];for(let a of k$1())n.includes(a)||n.unshift(a);process.env.PATH=n.join(g.delimiter);}async function tt(e,o){N(),e.start("Checking pipx installation");try{return await execa("pipx",["--version"]),e.succeed("pipx found"),{kind:"binary"}}catch{}let n=A();try{return await execa(n,["-m","pipx","--version"]),e.succeed("pipx found"),{kind:"python-module",pythonCmd:n}}catch{}if(o)throw new h;e.stop?.();let{installPipx:a}=await q.prompt([{type:"confirm",name:"installPipx",message:"pipx is not installed. Install it now (user install via python -m pip)?",default:true}]);if(!a)throw new h;e.start("Installing pipx (user install)");try{try{await execa(n,["-m","pip","install","--user","--upgrade","pip"]);}catch{}await execa(n,["-m","pip","install","--user","--upgrade","pipx"]);}catch(s){let d=s,c=String(d?.stderr||d?.shortMessage||d?.message||"");throw new k("Install pipx with python -m pip",s instanceof Error?s:new Error(c))}e.succeed("pipx installed"),N();try{return await execa(n,["-m","pipx","--version"]),{kind:"python-module",pythonCmd:n}}catch(s){let d=s,c=String(d?.stderr||d?.shortMessage||d?.message||"pipx not runnable after install");throw new k("Verify pipx after install",new Error(`${c}
40
40
 
41
- Try reopening your terminal or run: ${n} -m pipx ensurepath`))}}async function K(e,o){return e.kind==="binary"?execa("pipx",o):execa(e.pythonCmd,["-m","pipx",...o])}function Ot(e){let o=e.match(/^(\d+)\.(\d+)/);return o?`${o[1]}.${o[2]}`:null}function mt(e){if(!e)return null;let o=e.match(/Python\s+(\d+)\.(\d+)(?:\.\d+)?/i);return o?`${o[1]}.${o[2]}`:null}function lt(e,o){let[n,a]=e.split(".").map(c=>Number(c)),[l,d]=o.split(".").map(c=>Number(c));return n!==l?n-l:a-d}function V(e,o){return lt(e,o)>=0}async function Ft(e$1){let o=new Set,n=e(14,10);for(let r of n)try{let i=await execa(r.command,r.args,{timeout:2500}),f=mt(`${i.stdout||""}
41
+ Try reopening your terminal or run: ${n} -m pipx ensurepath`))}}async function K(e,o){return e.kind==="binary"?execa("pipx",o):execa(e.pythonCmd,["-m","pipx",...o])}function Ot(e){let o=e.match(/^(\d+)\.(\d+)/);return o?`${o[1]}.${o[2]}`:null}function mt(e){if(!e)return null;let o=e.match(/Python\s+(\d+)\.(\d+)(?:\.\d+)?/i);return o?`${o[1]}.${o[2]}`:null}function lt(e,o){let[n,a]=e.split(".").map(c=>Number(c)),[s,d]=o.split(".").map(c=>Number(c));return n!==s?n-s:a-d}function V(e,o){return lt(e,o)>=0}async function Ft(e$1){let o=new Set,n=e(14,10);for(let r of n)try{let i=await execa(r.command,r.args,{timeout:2500}),f=mt(`${i.stdout||""}
42
42
  ${i.stderr||""}`);f&&V(f,T)&&o.add(f);}catch{}let a=null;try{let r=await execa(A(),["--version"],{timeout:2500}),i=mt(`${r.stdout||""}
43
- ${r.stderr||""}`);i&&V(i,T)&&(a=i,o.add(i));}catch{}let l=xt.filter(r=>V(r,T)),d=new Set([...l,...o]),c=Array.from(d).sort((r,i)=>lt(i,r)),p=e$1?Ot(e$1):null,u=p&&V(p,T)?p:a||c[0]||T;return d.has(u)||d.add(u),{choices:Array.from(d).sort((r,i)=>lt(i,r)).map(r=>{let i=[];return r===a&&i.push("current system"),r===T&&i.push("minimum supported"),o.has(r)&&r!==a&&i.push("detected"),{name:i.length>0?`${r} (${i.join(", ")})`:r,value:r}}),defaultValue:u}}async function Lt(){N();let e=false,o=false;try{await execa("poetry",["--version"],{timeout:2500}),e=true;}catch{e=false;}try{await execa("pipx",["--version"],{timeout:2500}),o=true;}catch{let n=c();try{await execa(n,["-m","pipx","--version"],{timeout:2500}),o=true;}catch{o=false;}}return {poetry:e,pipx:o}}async function It(){N();try{return await execa("poetry",["--version"],{timeout:2500}),true}catch{return false}}function Vt(e,o){return e==="poetry"&&o.poetry?"poetry":e==="pipx"&&o.pipx?"pipx":e==="venv"?"venv":o.poetry?"poetry":"venv"}async function Gt(e,o){N(),e.start("Checking Poetry installation");try{await execa("poetry",["--version"]),e.succeed("Poetry found");return}catch{}if(o)throw new g$1;let{installPoetry:n}=await Y.prompt([{type:"confirm",name:"installPoetry",message:"Poetry is not installed. Install it now using pipx?",default:true}]);if(!n)throw new g$1;let a=await tt(e,o);e.start("Installing Poetry with pipx");try{await K(a,["install","poetry"]);}catch(l){let d=l,c=String(d?.stderr||d?.shortMessage||d?.message||"");if(/already\s+installed|already\s+seems\s+to\s+be\s+installed|exists/i.test(c))try{await K(a,["upgrade","poetry"]);}catch{}else throw new k("Install Poetry with pipx",l instanceof Error?l:new Error(c))}e.succeed("Poetry installed"),N();try{await execa("poetry",["--version"]);}catch(l){let d=l,c=String(d?.stderr||d?.shortMessage||d?.message||"Poetry not found on PATH");throw new k("Verify Poetry after pipx install",new Error(`${c}
43
+ ${r.stderr||""}`);i&&V(i,T)&&(a=i,o.add(i));}catch{}let s=xt.filter(r=>V(r,T)),d=new Set([...s,...o]),c=Array.from(d).sort((r,i)=>lt(i,r)),p=e$1?Ot(e$1):null,u=p&&V(p,T)?p:a||c[0]||T;return d.has(u)||d.add(u),{choices:Array.from(d).sort((r,i)=>lt(i,r)).map(r=>{let i=[];return r===a&&i.push("current system"),r===T&&i.push("minimum supported"),o.has(r)&&r!==a&&i.push("detected"),{name:i.length>0?`${r} (${i.join(", ")})`:r,value:r}}),defaultValue:u}}async function Lt(){N();let e=false,o=false;try{await execa("poetry",["--version"],{timeout:2500}),e=true;}catch{e=false;}try{await execa("pipx",["--version"],{timeout:2500}),o=true;}catch{let n=c();try{await execa(n,["-m","pipx","--version"],{timeout:2500}),o=true;}catch{o=false;}}return {poetry:e,pipx:o}}async function Rt(){N();try{return await execa("poetry",["--version"],{timeout:2500}),true}catch{return false}}function Vt(e,o){return e==="poetry"&&o.poetry?"poetry":e==="pipx"&&o.pipx?"pipx":e==="venv"?"venv":o.poetry?"poetry":"venv"}async function Gt(e,o){N(),e.start("Checking Poetry installation");try{await execa("poetry",["--version"]),e.succeed("Poetry found");return}catch{}if(o)throw new g$1;let{installPoetry:n}=await q.prompt([{type:"confirm",name:"installPoetry",message:"Poetry is not installed. Install it now using pipx?",default:true}]);if(!n)throw new g$1;let a=await tt(e,o);e.start("Installing Poetry with pipx");try{await K(a,["install","poetry"]);}catch(s){let d=s,c=String(d?.stderr||d?.shortMessage||d?.message||"");if(/already\s+installed|already\s+seems\s+to\s+be\s+installed|exists/i.test(c))try{await K(a,["upgrade","poetry"]);}catch{}else throw new k("Install Poetry with pipx",s instanceof Error?s:new Error(c))}e.succeed("Poetry installed"),N();try{await execa("poetry",["--version"]);}catch(s){let d=s,c=String(d?.stderr||d?.shortMessage||d?.message||"Poetry not found on PATH");throw new k("Verify Poetry after pipx install",new Error(`${c}
44
44
 
45
45
  Poetry may be installed but not on PATH yet. Try reopening your terminal or run: pipx ensurepath`))}}function Wt(e){let o=e==="poetry";return `#!/usr/bin/env sh
46
46
  set -eu
@@ -111,10 +111,10 @@ echo RapidKit launcher could not find a local Python CLI. 1>&2
111
111
  echo Tip: run .venv\\Scripts\\rapidkit.exe --help 1>&2
112
112
  echo Tip: for npm-owned workspace commands, run npx --yes --package rapidkit rapidkit %* from a shell where npm is on PATH. 1>&2
113
113
  exit /b 1
114
- `}async function Rt(e,o){await P.outputFile(g.join(e,"rapidkit"),Wt(o),{encoding:"utf-8",mode:493}),await P.outputFile(g.join(e,"rapidkit.cmd"),Ht(o),"utf-8");}async function pe(e,o){let{skipGit:n=false,testMode:a=false,demoMode:l=false,dryRun:d=false,yes:c=false,userConfig:p={},installMethod:u,profile:h,parentDirectory:m}=o,r=e||"rapidkit",i$1=m?g.resolve(m,r):g.resolve(process.cwd(),r);if(await P.pathExists(i$1))throw new i(r);if(d){let w=h||(c?"minimal":void 0),R=u||p.defaultInstallMethod||"poetry",b=p.pythonVersion||"3.10";await zt(i$1,r,l,p,w,R,b);return}if(l){await Ut(i$1,r,n);return}let f=new Set(["python-only","polyglot","enterprise"]),y=h||"";if(!c&&!h){let{selectedProfile:w}=await Y.prompt([{type:"rawlist",name:"selectedProfile",message:"Select workspace profile:",choices:[{name:"minimal \u2014 Foundation files only (fastest bootstrap, mixed projects)",value:"minimal"},{name:"java-only \u2014 Java runtime (Spring Boot services)",value:"java-only"},{name:"python-only \u2014 Python + Poetry (FastAPI, Django, ML pipelines)",value:"python-only"},{name:"node-only \u2014 Node.js runtime (NestJS, Express, Next.js)",value:"node-only"},{name:"go-only \u2014 Go runtime (Fiber, Gin, gRPC, microservices)",value:"go-only"},{name:"dotnet-only \u2014 .NET runtime (ASP.NET Core services)",value:"dotnet-only"},{name:"polyglot \u2014 Python + Node.js + Go + Java + .NET multi-runtime workspace",value:"polyglot"},{name:"enterprise \u2014 Polyglot + governance + Sigstore verification",value:"enterprise"}],default:1}]);y=w;}else y||(y="minimal");let E=!c&&f.has(y),D=typeof p.pythonVersion=="string"&&p.pythonVersion.trim().length>0?p.pythonVersion.trim():void 0,C=u||p.defaultInstallMethod||"poetry",O=E?await Lt():{poetry:true,pipx:true},q=E?await Ft(D):{choices:xt.map(w=>({name:w,value:w})),defaultValue:T},$t=Vt(C,O),At=[{name:O.poetry?"\u{1F3AF} Poetry (Recommended - includes virtual env + dependency mgmt)":"\u{1F3AF} Poetry (Recommended) \u2014 not detected (we can install it)",value:"poetry"},{name:"\u{1F4E6} pip with venv (Standard, zero extra tools)",value:"venv"},{name:O.pipx?"\u{1F527} pipx (Global isolated - RapidKit CLI only, no local venv)":"\u{1F527} pipx (Global isolated) \u2014 not detected (we can install it)",value:"pipx"}],x=E?await Y.prompt([{type:"rawlist",name:"pythonVersion",message:"Select Python version for RapidKit:",choices:q.choices,default:q.defaultValue},{type:"rawlist",name:"installMethod",message:"How would you like to manage the workspace environment?",choices:At,default:$t}]):await(async()=>{let w=u||p.defaultInstallMethod||await(async()=>{try{return await execa("poetry",["--version"],{timeout:3e3}),"poetry"}catch{return a$1.warn("Poetry not found \u2014 auto-selecting venv. Pass --install-method poetry to override."),"venv"}})();return {pythonVersion:p.pythonVersion||"3.10",installMethod:w}})();E&&(console.log(t.gray(`
115
- \u{1F4CC} Configuration notes:`)),x.pythonVersion==="3.10"?console.log(t.gray(" \u2022 Python 3.10: Latest stable with widespread compatibility")):x.pythonVersion==="3.11"?console.log(t.gray(" \u2022 Python 3.11: Newer, faster (3.10-3.11: ~10% speed improvement)")):x.pythonVersion==="3.12"&&console.log(t.gray(" \u2022 Python 3.12: Cutting edge, excellent for performance")),x.installMethod==="poetry"?console.log(t.gray(" \u2022 Poetry: Dependency management + virtual env (recommended for teams)")):x.installMethod==="venv"?console.log(t.gray(" \u2022 venv: Standard library approach, lightweight, zero dependencies")):console.log(t.gray(" \u2022 pipx: Global isolated, RapidKit CLI only, no local venv")),console.log(""));let et=bt;if(et.has(y)){let w=F("Creating workspace").start();try{await P.ensureDir(i$1),w.succeed("Directory created"),await H(i$1,r,"venv",void 0),await z(i$1,r,"venv",void 0,y),await L(i$1),await U(i$1,r);let R={"go-only":"Go-only","java-only":"Java-only","dotnet-only":".NET-only","node-only":"Node.js-only",minimal:"Minimal"};if(await P.outputFile(g.join(i$1,"README.md"),`# ${r}
114
+ `}async function It(e,o){await b.outputFile(g.join(e,"rapidkit"),Wt(o),{encoding:"utf-8",mode:493}),await b.outputFile(g.join(e,"rapidkit.cmd"),Ht(o),"utf-8");}async function pe(e,o){let{skipGit:n=false,testMode:a=false,demoMode:s=false,dryRun:d=false,yes:c=false,userConfig:p={},installMethod:u,profile:h,parentDirectory:m}=o,r=e||"rapidkit",i$1=m?g.resolve(m,r):g.resolve(process.cwd(),r);if(await b.pathExists(i$1))throw new i(r);if(d){let w=h||(c?"minimal":void 0),I=u||p.defaultInstallMethod||"poetry",v=p.pythonVersion||"3.10";await zt(i$1,r,s,p,w,I,v);return}if(s){await Ut(i$1,r,n);return}let f=new Set(["python-only","polyglot","enterprise"]),y=h||"";if(!c&&!h){let{selectedProfile:w}=await q.prompt([{type:"rawlist",name:"selectedProfile",message:"Select workspace profile:",choices:[{name:"minimal \u2014 Foundation files only (fastest bootstrap, mixed projects)",value:"minimal"},{name:"java-only \u2014 Java runtime (Spring Boot services)",value:"java-only"},{name:"python-only \u2014 Python + Poetry (FastAPI, Django, ML pipelines)",value:"python-only"},{name:"node-only \u2014 Node.js runtime (NestJS, Express, Next.js)",value:"node-only"},{name:"go-only \u2014 Go runtime (Fiber, Gin, gRPC, microservices)",value:"go-only"},{name:"dotnet-only \u2014 .NET runtime (ASP.NET Core services)",value:"dotnet-only"},{name:"polyglot \u2014 Python + Node.js + Go + Java + .NET multi-runtime workspace",value:"polyglot"},{name:"enterprise \u2014 Polyglot + governance + Sigstore verification",value:"enterprise"}],default:1}]);y=w;}else y||(y="minimal");let E=!c&&f.has(y),D=typeof p.pythonVersion=="string"&&p.pythonVersion.trim().length>0?p.pythonVersion.trim():void 0,C=u||p.defaultInstallMethod||"poetry",O=E?await Lt():{poetry:true,pipx:true},Y=E?await Ft(D):{choices:xt.map(w=>({name:w,value:w})),defaultValue:T},$t=Vt(C,O),At=[{name:O.poetry?"\u{1F3AF} Poetry (Recommended - includes virtual env + dependency mgmt)":"\u{1F3AF} Poetry (Recommended) \u2014 not detected (we can install it)",value:"poetry"},{name:"\u{1F4E6} pip with venv (Standard, zero extra tools)",value:"venv"},{name:O.pipx?"\u{1F527} pipx (Global isolated - RapidKit CLI only, no local venv)":"\u{1F527} pipx (Global isolated) \u2014 not detected (we can install it)",value:"pipx"}],x=E?await q.prompt([{type:"rawlist",name:"pythonVersion",message:"Select Python version for RapidKit:",choices:Y.choices,default:Y.defaultValue},{type:"rawlist",name:"installMethod",message:"How would you like to manage the workspace environment?",choices:At,default:$t}]):await(async()=>{let w=u||p.defaultInstallMethod||await(async()=>{try{return await execa("poetry",["--version"],{timeout:3e3}),"poetry"}catch{return a$1.warn("Poetry not found \u2014 auto-selecting venv. Pass --install-method poetry to override."),"venv"}})();return {pythonVersion:p.pythonVersion||"3.10",installMethod:w}})();E&&(console.log(t.gray(`
115
+ \u{1F4CC} Configuration notes:`)),x.pythonVersion==="3.10"?console.log(t.gray(" \u2022 Python 3.10: Latest stable with widespread compatibility")):x.pythonVersion==="3.11"?console.log(t.gray(" \u2022 Python 3.11: Newer, faster (3.10-3.11: ~10% speed improvement)")):x.pythonVersion==="3.12"&&console.log(t.gray(" \u2022 Python 3.12: Cutting edge, excellent for performance")),x.installMethod==="poetry"?console.log(t.gray(" \u2022 Poetry: Dependency management + virtual env (recommended for teams)")):x.installMethod==="venv"?console.log(t.gray(" \u2022 venv: Standard library approach, lightweight, zero dependencies")):console.log(t.gray(" \u2022 pipx: Global isolated, RapidKit CLI only, no local venv")),console.log(""));let et=bt;if(et.has(y)){let w=F("Creating workspace").start();try{await b.ensureDir(i$1),w.succeed("Directory created"),await H(i$1,r,"venv",void 0),await z(i$1,r,"venv",void 0,y),await L(i$1),await U(i$1,r);let I={"go-only":"Go-only","java-only":"Java-only","dotnet-only":".NET-only","node-only":"Node.js-only",minimal:"Minimal"};if(await b.outputFile(g.join(i$1,"README.md"),`# ${r}
116
116
 
117
- RapidKit **${R[y]}** workspace.
117
+ RapidKit **${I[y]}** workspace.
118
118
 
119
119
  ## Quick start
120
120
 
@@ -139,23 +139,23 @@ npx rapidkit dev
139
139
  cd <project-name>
140
140
  npx rapidkit init
141
141
  npx rapidkit dev
142
- `)+"```\n","utf-8"),!n){w.start("Initializing git repository");try{await execa("git",["init"],{cwd:i$1}),await execa("git",["add","."],{cwd:i$1}),await execa("git",["commit","-m","Initial commit: RapidKit workspace"],{cwd:i$1}),w.succeed("Git repository initialized");}catch{w.warn("Could not initialize git repository");}}try{let{registerWorkspace:b}=await import('./workspace-ZXWYIZOR.js');await b(i$1,r);}catch{}if(console.log(t.green(`
142
+ `)+"```\n","utf-8"),!n){w.start("Initializing git repository");try{await execa("git",["init"],{cwd:i$1}),await execa("git",["add","."],{cwd:i$1}),await execa("git",["commit","-m","Initial commit: RapidKit workspace"],{cwd:i$1}),w.succeed("Git repository initialized");}catch{w.warn("Could not initialize git repository");}}try{let{registerWorkspace:v}=await import('./workspace-ZDL5IQU4.js');await v(i$1,r);}catch{}if(console.log(t.green(`
143
143
  \u2728 Workspace created!
144
144
  `)),console.log(t.cyan("\u{1F4C2} Location:"),t.white(i$1)),console.log(t.cyan(`
145
145
  \u{1F680} Get started:
146
146
  `)),console.log(t.white(` cd ${r}`)),y==="go-only"){console.log(t.white(" npx rapidkit create project gofiber.standard my-api")),console.log(t.white(" cd my-api")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
147
- `)),console.log(t.gray("\u{1F4A1} No Python required \u2014 Go kits run entirely through the npm package."));try{let{stdout:b}=await execa("go",["version"],{timeout:3e3}),v=b.match(/go version go(\d+\.\d+(?:\.\d+)?)/),S=v?v[1]:"unknown";console.log(t.gray(`\u{1F439} Go ${S} detected \u2014 ready for gofiber.standard / gogin.standard projects`));}catch{console.log(t.yellow(`
147
+ `)),console.log(t.gray("\u{1F4A1} No Python required \u2014 Go kits run entirely through the npm package."));try{let{stdout:v}=await execa("go",["version"],{timeout:3e3}),k=v.match(/go version go(\d+\.\d+(?:\.\d+)?)/),S=k?k[1]:"unknown";console.log(t.gray(`\u{1F439} Go ${S} detected \u2014 ready for gofiber.standard / gogin.standard projects`));}catch{console.log(t.yellow(`
148
148
  \u26A0\uFE0F Go is not installed \u2014 install it from https://go.dev/dl/`));}}else if(y==="java-only")console.log(t.white(" npx rapidkit create project springboot.standard my-service")),console.log(t.white(" cd my-service")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
149
149
  `)),console.log(t.gray("\u{1F4A1} No Python required \u2014 Spring Boot kit runs through the npm package with Java tooling."));else if(y==="dotnet-only"){console.log(t.white(" npx rapidkit create project dotnet.webapi.clean my-api")),console.log(t.white(" cd my-api")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
150
- `)),console.log(t.gray("\u{1F4A1} No Python required \u2014 ASP.NET Core kit runs through the npm package with .NET tooling."));try{let{stdout:b}=await execa("dotnet",["--version"],{timeout:3e3});console.log(t.gray(`\u2699\uFE0F .NET SDK ${b.trim()} detected \u2014 ready for ASP.NET Core projects`));}catch{console.log(t.yellow(`
150
+ `)),console.log(t.gray("\u{1F4A1} No Python required \u2014 ASP.NET Core kit runs through the npm package with .NET tooling."));try{let{stdout:v}=await execa("dotnet",["--version"],{timeout:3e3});console.log(t.gray(`\u2699\uFE0F .NET SDK ${v.trim()} detected \u2014 ready for ASP.NET Core projects`));}catch{console.log(t.yellow(`
151
151
  \u26A0\uFE0F .NET SDK is not installed \u2014 install it from https://dotnet.microsoft.com/download`));}}else y==="node-only"?(console.log(t.white(" npx rapidkit create project nestjs.standard my-app")),console.log(t.white(" cd my-app")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
152
152
  `)),console.log(t.gray("\u{1F4A1} Python engine will be installed automatically on first `create project nestjs.standard`."))):(console.log(t.white(" npx rapidkit create project")),console.log(t.white(" cd <project-name>")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
153
153
  `)),console.log(t.gray("\u{1F4A1} Bootstrap a specific runtime: rapidkit bootstrap --profile java-only|python-only|node-only|go-only|dotnet-only|polyglot|enterprise")));console.log(t.cyan(`
154
- \u{1F4DA} More info:`)),console.log(t.gray(" \u2022 Change profile anytime: rapidkit bootstrap --profile <profile>")),console.log(t.gray(" \u2022 View config: cat "+r+"/.rapidkit-workspace")),console.log(t.gray(" \u2022 Check health: rapidkit doctor")),console.log("");}catch(R){throw w.fail("Failed to create workspace"),console.error(t.red(`
155
- \u274C Error:`),R),R}return}{let w=A(),R=false;try{await execa(w,["--version"],{timeout:5e3}),R=true;}catch{try{await execa("python",["--version"],{timeout:5e3}),R=true;}catch{R=false;}}if(!R){let b=y,v=Kt(y);if(E&&!c){console.log(t.yellow(`
154
+ \u{1F4DA} More info:`)),console.log(t.gray(" \u2022 Change profile anytime: rapidkit bootstrap --profile <profile>")),console.log(t.gray(" \u2022 View config: cat "+r+"/.rapidkit-workspace")),console.log(t.gray(" \u2022 Check health: rapidkit doctor")),console.log("");}catch(I){throw w.fail("Failed to create workspace"),console.error(t.red(`
155
+ \u274C Error:`),I),I}return}{let w=A(),I=false;try{await execa(w,["--version"],{timeout:5e3}),I=true;}catch{try{await execa("python",["--version"],{timeout:5e3}),I=true;}catch{I=false;}}if(!I){let v=y,k=Kt(y);if(E&&!c){console.log(t.yellow(`
156
156
  \u26A0\uFE0F Python 3.10+ is not detected on this system.
157
157
  `)),console.log(t.cyan(`You have 3 options:
158
- `));let{pythonAction:$}=await Y.prompt([{type:"rawlist",name:"pythonAction",message:"What would you like to do?",choices:[{name:"\u{1F4E5} Install Python now (I'll show you the command for your OS)",value:"install"},{name:`\u{1F504} Switch to "${v}" profile (no Python required)`,value:"fallback"},{name:"\u274C Cancel and install Python manually",value:"cancel"}]}]);if($==="cancel"&&(console.log(t.cyan(`
158
+ `));let{pythonAction:$}=await q.prompt([{type:"rawlist",name:"pythonAction",message:"What would you like to do?",choices:[{name:"\u{1F4E5} Install Python now (I'll show you the command for your OS)",value:"install"},{name:`\u{1F504} Switch to "${k}" profile (no Python required)`,value:"fallback"},{name:"\u274C Cancel and install Python manually",value:"cancel"}]}]);if($==="cancel"&&(console.log(t.cyan(`
159
159
  \u{1F4A1} How to install Python:
160
160
  `)),console.log(t.white(" Ubuntu / Debian: sudo apt install python3.10")),console.log(t.white(" macOS (Homebrew): brew install python@3.10")),console.log(t.white(` Windows: https://python.org/downloads
161
161
  `)),console.log(t.gray(` After installing Python, run: npx rapidkit ${r}
@@ -167,27 +167,27 @@ npx rapidkit dev
167
167
  `)),console.log(t.white(` Run the installer and check "Add Python to PATH"
168
168
  `))),console.log(t.gray(` After installing, run: npx rapidkit ${r}
169
169
  `)),process.exit(0);}if($==="fallback"&&(console.log(t.green(`
170
- \u2705 Switching to "${v}" profile (no Python required).
171
- `)),y=v,et.has(v))){let _=F("Creating workspace").start();try{await P.ensureDir(i$1),_.succeed("Directory created"),await H(i$1,r,"venv",void 0),await z(i$1,r,"venv",void 0,v),await L(i$1),await U(i$1,r);let B={"go-only":"Go-only","java-only":"Java-only","dotnet-only":".NET-only","node-only":"Node.js-only",minimal:"Minimal"};if(await P.outputFile(g.join(i$1,"README.md"),`# ${r}
170
+ \u2705 Switching to "${k}" profile (no Python required).
171
+ `)),y=k,et.has(k))){let _=F("Creating workspace").start();try{await b.ensureDir(i$1),_.succeed("Directory created"),await H(i$1,r,"venv",void 0),await z(i$1,r,"venv",void 0,k,{profileRequested:v,bootstrapNote:"python-free-fallback"}),await L(i$1),await U(i$1,r);let B={"go-only":"Go-only","java-only":"Java-only","dotnet-only":".NET-only","node-only":"Node.js-only",minimal:"Minimal"};if(await b.outputFile(g.join(i$1,"README.md"),`# ${r}
172
172
 
173
- RapidKit **${B[v]}** workspace (switched from ${b} due to missing Python).
173
+ RapidKit **${B[k]}** workspace (switched from ${v} due to missing Python).
174
174
 
175
175
  ## Quick start
176
176
 
177
177
  \`\`\`bash
178
- `+(v==="go-only"?`npx rapidkit create project gofiber.standard my-api
178
+ `+(k==="go-only"?`npx rapidkit create project gofiber.standard my-api
179
179
  cd my-api
180
180
  npx rapidkit init
181
181
  npx rapidkit dev
182
- `:v==="java-only"?`npx rapidkit create project springboot.standard my-service
182
+ `:k==="java-only"?`npx rapidkit create project springboot.standard my-service
183
183
  cd my-service
184
184
  npx rapidkit init
185
185
  npx rapidkit dev
186
- `:v==="dotnet-only"?`npx rapidkit create project dotnet.webapi.clean my-api
186
+ `:k==="dotnet-only"?`npx rapidkit create project dotnet.webapi.clean my-api
187
187
  cd my-api
188
188
  npx rapidkit init
189
189
  npx rapidkit dev
190
- `:v==="node-only"?`npx rapidkit create project nestjs.standard my-app
190
+ `:k==="node-only"?`npx rapidkit create project nestjs.standard my-app
191
191
  cd my-app
192
192
  npx rapidkit init
193
193
  npx rapidkit dev
@@ -195,37 +195,37 @@ npx rapidkit dev
195
195
  cd <project-name>
196
196
  npx rapidkit init
197
197
  npx rapidkit dev
198
- `)+"```\n","utf-8"),!n){_.start("Initializing git repository");try{await execa("git",["init"],{cwd:i$1}),await execa("git",["add","."],{cwd:i$1}),await execa("git",["commit","-m",`Initial commit: RapidKit workspace (${v} profile)`],{cwd:i$1}),_.succeed("Git repository initialized");}catch{_.warn("Could not initialize git repository");}}try{let{registerWorkspace:St}=await import('./workspace-ZXWYIZOR.js');await St(i$1,r);}catch{}console.log(t.green(`
198
+ `)+"```\n","utf-8"),!n){_.start("Initializing git repository");try{await execa("git",["init"],{cwd:i$1}),await execa("git",["add","."],{cwd:i$1}),await execa("git",["commit","-m",`Initial commit: RapidKit workspace (${k} profile)`],{cwd:i$1}),_.succeed("Git repository initialized");}catch{_.warn("Could not initialize git repository");}}try{let{registerWorkspace:St}=await import('./workspace-ZDL5IQU4.js');await St(i$1,r);}catch{}console.log(t.green(`
199
199
  \u2728 Workspace created with fallback profile!
200
200
  `)),console.log(t.cyan("\u{1F4C2} Location:"),t.white(i$1)),console.log(t.cyan(`
201
201
  \u{1F680} Get started:
202
202
  `)),console.log(t.white(` cd ${r}`)),console.log(t.white(" npx rapidkit create project")),console.log(t.white(" cd <project-name>")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
203
203
  `)),console.log(t.cyan(`\u{1F4A1} To use Python later:
204
- `)),console.log(t.gray(" 1. Install Python 3.10+")),console.log(t.gray(` 2. Run: rapidkit bootstrap --profile ${b}
204
+ `)),console.log(t.gray(" 1. Install Python 3.10+")),console.log(t.gray(` 2. Run: rapidkit bootstrap --profile ${v}
205
205
  `)),console.log("");return}catch(B){throw _.fail("Failed to create workspace"),console.error(t.red(`
206
206
  \u274C Error:`),B),B}}}else if(console.log(t.yellow(`
207
- \u26A0\uFE0F Python not detected. Auto-switching to "${v}" profile (no Python required).
208
- `)),y=v,et.has(v)){let $=F("Creating workspace").start();try{if(await P.ensureDir(i$1),$.succeed("Directory created"),await H(i$1,r,"venv",void 0),await z(i$1,r,"venv",void 0,v),await L(i$1),await U(i$1,r),!n){$.start("Initializing git repository");try{await execa("git",["init"],{cwd:i$1}),await execa("git",["add","."],{cwd:i$1}),await execa("git",["commit","-m",`Initial commit: RapidKit workspace (${v})`],{cwd:i$1}),$.succeed("Git repository initialized");}catch{$.warn("Could not initialize git repository");}}try{let{registerWorkspace:_}=await import('./workspace-ZXWYIZOR.js');await _(i$1,r);}catch{}console.log(t.green(`
207
+ \u26A0\uFE0F Python not detected. Auto-switching to "${k}" profile (no Python required).
208
+ `)),y=k,et.has(k)){let $=F("Creating workspace").start();try{if(await b.ensureDir(i$1),$.succeed("Directory created"),await H(i$1,r,"venv",void 0),await z(i$1,r,"venv",void 0,k,{profileRequested:v,bootstrapNote:"python-free-fallback"}),await L(i$1),await U(i$1,r),!n){$.start("Initializing git repository");try{await execa("git",["init"],{cwd:i$1}),await execa("git",["add","."],{cwd:i$1}),await execa("git",["commit","-m",`Initial commit: RapidKit workspace (${k})`],{cwd:i$1}),$.succeed("Git repository initialized");}catch{$.warn("Could not initialize git repository");}}try{let{registerWorkspace:_}=await import('./workspace-ZDL5IQU4.js');await _(i$1,r);}catch{}console.log(t.green(`
209
209
  \u2728 Workspace created (auto-fallback profile)!
210
- `)),console.log(t.cyan("\u{1F4C2} Location:"),t.white(i$1)),console.log(t.cyan("\u{1F4E6} Profile:"),t.yellow(v)),console.log(t.cyan("\u{1F4A1} Reason:"),t.gray(`Python not detected; switched from ${b}`)),console.log(t.cyan(`
210
+ `)),console.log(t.cyan("\u{1F4C2} Location:"),t.white(i$1)),console.log(t.cyan("\u{1F4E6} Profile:"),t.yellow(k)),console.log(t.cyan("\u{1F4A1} Reason:"),t.gray(`Python not detected; switched from ${v}`)),console.log(t.cyan(`
211
211
  \u{1F680} Get started:
212
212
  `)),console.log(t.white(` cd ${r}`)),console.log(t.white(" npx rapidkit create project")),console.log(t.white(" cd <project-name>")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
213
213
  `)),console.log(t.cyan(`\u{1F4A1} Add Python later:
214
- `)),console.log(t.gray(" 1. Install Python 3.10+")),console.log(t.gray(` 2. Run: cd ${r} && rapidkit bootstrap --profile ${b}
214
+ `)),console.log(t.gray(" 1. Install Python 3.10+")),console.log(t.gray(` 2. Run: cd ${r} && rapidkit bootstrap --profile ${v}
215
215
  `)),console.log("");return}catch(_){throw $.fail("Failed to create workspace"),console.error(t.red(`
216
- \u274C Error:`),_),_}}}}a$1.step(1,3,"Setting up RapidKit environment");let I=F("Creating directory").start();try{await P.ensureDir(i$1),I.succeed("Directory created"),I.start("Detecting Python version");let w=null,R=await _t(x.pythonVersion);if(R)w=await gt(R),w?(a$1.info(` Detected Python ${w}`),I.succeed(`Python ${w} detected`)):I.warn("Could not detect exact Python version");else {let b=A();w=await gt(b),w?I.succeed(`Python ${w} detected`):I.warn("Could not detect Python version, proceeding with defaults");}if(x.installMethod==="poetry"&&!await It()&&(I.warn("Poetry not found \u2014 auto-fallback to pip + venv"),x.installMethod="venv"),await H(i$1,r,x.installMethod,w||void 0),w&&await Nt(i$1,w),await z(i$1,r,x.installMethod,w||x.pythonVersion,y||h),await L(i$1),await U(i$1,r),x.installMethod==="poetry")try{await Et(i$1,x.pythonVersion,I,a,p,c);}catch(b){let v=b?.details||b?.message||String(b);if(v.includes("pyenv")||v.includes("exit status 127")||v.includes("returned non-zero exit status 127")){I.warn("Poetry encountered Python discovery issues, trying venv method"),a$1.debug(`Poetry error (attempting venv fallback): ${v}`);try{await ct(i$1,x.pythonVersion,I,a,p),x.installMethod="venv";}catch($){throw $}}else throw b}else x.installMethod==="venv"?await ct(i$1,x.pythonVersion,I,a,p):await jt(i$1,I,a,p,c);if(await Rt(i$1,x.installMethod),await Ct(i$1,x.installMethod),I.succeed("RapidKit environment ready!"),!o.skipGit){I.start("Initializing git repository");try{await execa("git",["init"],{cwd:i$1}),await execa("git",["add","."],{cwd:i$1}),await execa("git",["commit","-m","Initial commit: RapidKit environment"],{cwd:i$1}),I.succeed("Git repository initialized");}catch{I.warn("Could not initialize git repository");}}try{let{registerWorkspace:b}=await import('./workspace-ZXWYIZOR.js');await b(i$1,r);}catch{console.warn(t.gray("Note: Could not register workspace in shared registry"));}if(console.log(t.green(`
216
+ \u274C Error:`),_),_}}}}a$1.step(1,3,"Setting up RapidKit environment");let R=F("Creating directory").start();try{await b.ensureDir(i$1),R.succeed("Directory created"),R.start("Detecting Python version");let w=null,I=await _t(x.pythonVersion);if(I)w=await gt(I),w?(a$1.info(` Detected Python ${w}`),R.succeed(`Python ${w} detected`)):R.warn("Could not detect exact Python version");else {let v=A();w=await gt(v),w?R.succeed(`Python ${w} detected`):R.warn("Could not detect Python version, proceeding with defaults");}if(x.installMethod==="poetry"&&!await Rt()&&(R.warn("Poetry not found \u2014 auto-fallback to pip + venv"),x.installMethod="venv"),await H(i$1,r,x.installMethod,w||void 0),w&&await Nt(i$1,w),await z(i$1,r,x.installMethod,w||x.pythonVersion,y||h),await L(i$1),await U(i$1,r),x.installMethod==="poetry")try{await Et(i$1,x.pythonVersion,R,a,p,c);}catch(v){let k=v?.details||v?.message||String(v);if(k.includes("pyenv")||k.includes("exit status 127")||k.includes("returned non-zero exit status 127")){R.warn("Poetry encountered Python discovery issues, trying venv method"),a$1.debug(`Poetry error (attempting venv fallback): ${k}`);try{await ct(i$1,x.pythonVersion,R,a,p),x.installMethod="venv";}catch($){throw $}}else throw v}else x.installMethod==="venv"?await ct(i$1,x.pythonVersion,R,a,p):await jt(i$1,R,a,p,c);if(await It(i$1,x.installMethod),await Ct(i$1,x.installMethod),R.succeed("RapidKit environment ready!"),!o.skipGit){R.start("Initializing git repository");try{await execa("git",["init"],{cwd:i$1}),await execa("git",["add","."],{cwd:i$1}),await execa("git",["commit","-m","Initial commit: RapidKit environment"],{cwd:i$1}),R.succeed("Git repository initialized");}catch{R.warn("Could not initialize git repository");}}try{let{registerWorkspace:v}=await import('./workspace-ZDL5IQU4.js');await v(i$1,r);}catch{console.warn(t.gray("Note: Could not register workspace in shared registry"));}if(console.log(t.green(`
217
217
  \u2728 RapidKit environment created successfully!
218
218
  `)),console.log(t.cyan("\u{1F4C2} Location:"),t.white(i$1)),console.log(t.cyan("\u2699\uFE0F Configuration:")),console.log(t.gray(` \u2022 Profile: ${y}`)),console.log(t.gray(` \u2022 Python: ${x.pythonVersion}`)),console.log(t.gray(` \u2022 Install method: ${x.installMethod}`)),console.log(t.cyan(`
219
219
  \u{1F680} Get started:
220
- `)),console.log(t.white(` cd ${r}`)),x.installMethod==="poetry"){let b="source $(poetry env info --path)/bin/activate";try{N();let{stdout:v}=await execa("poetry",["--version"]),S=v.match(/Poetry.*?(\d+)\.(\d+)/);S&&(parseInt(S[1])>=2?b="source $(poetry env info --path)/bin/activate":b="poetry shell");}catch{}console.log(t.white(` ${b} # Or: poetry run rapidkit`)),console.log(t.white(" rapidkit create # Interactive mode")),console.log(t.white(" cd <project-name>")),console.log(t.white(" rapidkit init")),console.log(t.white(" rapidkit dev")),console.log(t.gray(`
220
+ `)),console.log(t.white(` cd ${r}`)),x.installMethod==="poetry"){let v="source $(poetry env info --path)/bin/activate";try{N();let{stdout:k}=await execa("poetry",["--version"]),S=k.match(/Poetry.*?(\d+)\.(\d+)/);S&&(parseInt(S[1])>=2?v="source $(poetry env info --path)/bin/activate":v="poetry shell");}catch{}console.log(t.white(` ${v} # Or: poetry run rapidkit`)),console.log(t.white(" rapidkit create # Interactive mode")),console.log(t.white(" cd <project-name>")),console.log(t.white(" rapidkit init")),console.log(t.white(" rapidkit dev")),console.log(t.gray(`
221
221
  \u{1F4E6} Why Poetry? Includes dependency management + virtual environment`));}else x.installMethod==="venv"?(console.log(t.white(" source .venv/bin/activate # On Windows: .venv\\Scripts\\activate")),console.log(t.white(" rapidkit create # Interactive mode")),console.log(t.white(" cd <project-name>")),console.log(t.white(" rapidkit init")),console.log(t.white(" rapidkit dev")),console.log(t.gray(`
222
222
  \u{1F4E6} Why venv? Standard, zero extra tools, lightweight`))):(console.log(t.white(" rapidkit create # Interactive mode")),console.log(t.white(" cd <project-name>")),console.log(t.white(" rapidkit init")),console.log(t.white(" rapidkit dev")),console.log(t.gray(`
223
223
  \u{1F4E6} Why pipx? Global isolated install, no local venv`)));console.log(t.cyan(`
224
224
  \u{1F4DA} Next steps:`)),console.log(t.gray(" 1. Check README.md for workspace details")),console.log(t.gray(" 2. Create your first project: rapidkit create project")),console.log(t.gray(" 3. See all runtimes: rapidkit list # Shows: fastapi, nestjs, springboot, gofiber, gogin, dotnet")),console.log(t.cyan(`
225
225
  \u{1F4A1} Profile management:`)),console.log(t.gray(" \u2022 Add Python? \u2192 rapidkit bootstrap --profile python-only|polyglot")),console.log(t.gray(" \u2022 Add Node.js? \u2192 rapidkit bootstrap --profile node-only|polyglot")),console.log(t.gray(" \u2022 Add Go? \u2192 rapidkit bootstrap --profile go-only|polyglot")),console.log(t.gray(" \u2022 Add .NET? \u2192 rapidkit bootstrap --profile dotnet-only|polyglot")),console.log(t.gray(" \u2022 Full setup? \u2192 rapidkit bootstrap --profile enterprise")),console.log(t.cyan(`
226
226
  \u{1F4D6} Common commands:`)),console.log(t.white(" rapidkit create - Create a new project (interactive)")),console.log(t.white(" rapidkit list - List available kits")),console.log(t.white(" rapidkit modules - List available modules")),console.log(t.white(" rapidkit doctor - Check workspace health")),console.log(t.white(` rapidkit bootstrap --help - Advanced workspace configuration
227
- `));try{let{stdout:b}=await execa("go",["version"],{timeout:3e3}),v=b.match(/go version go(\d+\.\d+(?:\.\d+)?)/),S=v?v[1]:"unknown";console.log(t.gray(`\u{1F439} Go ${S} detected \u2014 ready for gofiber.standard projects`));}catch{console.log(t.yellow("\u26A0\uFE0F Go not installed \u2014 needed for gofiber.standard/gogin.standard projects")),console.log(t.gray(" Install: https://go.dev/dl/"));}console.log("");}catch(w){I.fail("Failed to create RapidKit environment"),console.error(t.red(`
228
- \u274C Error:`),w);try{await P.remove(i$1);}catch{}throw w}}async function _t(e$1){let o=[];if(!a$2())try{let{stdout:d}=await execa("pyenv",["which","python"]),c=d.trim();c&&o.push(c);}catch{}let n=Number(e$1.split(".")[1]),a=e(n,10).map(d=>d.command).filter(Boolean);o.push(`python${e$1}`,...a,...d$1());let l=[...new Set(o)];for(let d of l)try{let c=d==="py"?["-3","--version"]:["--version"],p=d==="py"?["-3","-c","import sys; sys.exit(0)"]:["-c","import sys; sys.exit(0)"],{stdout:u}=await execa(d,c,{timeout:2e3}),h=u.match(/Python (\d+\.\d+)/)?.[1];if(h&&V(h,e$1))return await execa(d,p,{timeout:2e3}),d}catch{continue}return null}async function Et(e,o,n,a,l$1,d=false){await Gt(n,d),n.start("Finding Python interpreter");let c=await _t(o);c?(a$1.debug(`Found working Python: ${c}`),n.succeed("Python found")):n.warn("Could not verify Python path, proceeding with default"),n.start("Initializing Poetry project");let p=g.join(e,"pyproject.toml"),h=(await P.pathExists(p)?await promises.readFile(p,"utf-8"):"").includes("rapidkit-core");if(h)n.succeed("Poetry project initialized");else {await execa("poetry",["init","--no-interaction","--python",`^${o}`],{cwd:e}),n.succeed("Poetry project initialized");let f=await promises.readFile(p,"utf-8");f.includes("[tool.poetry]")?f=f.replace("[tool.poetry]",`[tool.poetry]
227
+ `));try{let{stdout:v}=await execa("go",["version"],{timeout:3e3}),k=v.match(/go version go(\d+\.\d+(?:\.\d+)?)/),S=k?k[1]:"unknown";console.log(t.gray(`\u{1F439} Go ${S} detected \u2014 ready for gofiber.standard projects`));}catch{console.log(t.yellow("\u26A0\uFE0F Go not installed \u2014 needed for gofiber.standard/gogin.standard projects")),console.log(t.gray(" Install: https://go.dev/dl/"));}console.log("");}catch(w){R.fail("Failed to create RapidKit environment"),console.error(t.red(`
228
+ \u274C Error:`),w);try{await b.remove(i$1);}catch{}throw w}}async function _t(e$1){let o=[];if(!a$2())try{let{stdout:d}=await execa("pyenv",["which","python"]),c=d.trim();c&&o.push(c);}catch{}let n=Number(e$1.split(".")[1]),a=e(n,10).map(d=>d.command).filter(Boolean);o.push(`python${e$1}`,...a,...d$1());let s=[...new Set(o)];for(let d of s)try{let c=d==="py"?["-3","--version"]:["--version"],p=d==="py"?["-3","-c","import sys; sys.exit(0)"]:["-c","import sys; sys.exit(0)"],{stdout:u}=await execa(d,c,{timeout:2e3}),h=u.match(/Python (\d+\.\d+)/)?.[1];if(h&&V(h,e$1))return await execa(d,p,{timeout:2e3}),d}catch{continue}return null}async function Et(e,o,n,a,s,d=false){await Gt(n,d),n.start("Finding Python interpreter");let c=await _t(o);c?(a$1.debug(`Found working Python: ${c}`),n.succeed("Python found")):n.warn("Could not verify Python path, proceeding with default"),n.start("Initializing Poetry project");let p=g.join(e,"pyproject.toml"),h=(await b.pathExists(p)?await promises.readFile(p,"utf-8"):"").includes("rapidkit-core");if(h)n.succeed("Poetry project initialized");else {await execa("poetry",["init","--no-interaction","--python",`^${o}`],{cwd:e}),n.succeed("Poetry project initialized");let f=await promises.readFile(p,"utf-8");f.includes("[tool.poetry]")?f=f.replace("[tool.poetry]",`[tool.poetry]
229
229
  package-mode = false`):f.includes("[project]")&&(f.includes("[build-system]")?f=f.replace("[build-system]",`
230
230
  [tool.poetry]
231
231
  package-mode = false
@@ -234,33 +234,33 @@ package-mode = false
234
234
 
235
235
  [tool.poetry]
236
236
  package-mode = false
237
- `),await promises.writeFile(p,f,"utf-8");}n.start("Configuring Poetry");try{await execa("poetry",["config","virtualenvs.in-project","true","--local"],{cwd:e}),n.succeed("Poetry configured");}catch{n.warn("Could not configure Poetry virtualenvs.in-project");}n.start("Creating virtualenv");let m=c||A(),r=f(g.join(e,".venv"));try{await execa(m,["-m","venv",".venv"],{cwd:e,timeout:6e4}),n.succeed("Virtualenv created");}catch(i){a$1.debug(`python -m venv failed: ${i}`),n.warn("Could not pre-create virtualenv, Poetry will try"),r=c||A();}try{await execa("poetry",["env","use",r||A()],{cwd:e}),a$1.debug(`Poetry env set to: ${r}`);}catch(i){a$1.debug(`Could not set Poetry env: ${i}`);}if(n.start("Installing RapidKit"),h&&!a){let i=d$2(l$1||{}),f=i?await P.pathExists(i):false,y=f&&i?i:"rapidkit-core";i&&!f&&a$1.warn(`RAPIDKIT_DEV_PATH is set but path does not exist: ${i}. Falling back to PyPI.`),n.text=f?"Installing RapidKit from local path":"Installing RapidKit from PyPI";let E=false,D=null;for(let C=1;C<=3;C++)try{await execa(r,["-m","pip","install",y,"--quiet"],{cwd:e,timeout:18e4}),E=true;break}catch(O){D=O,a$1.debug(`pip install rapidkit-core attempt ${C} failed: ${O}`),C<3&&(n.text=`Retrying installation (attempt ${C+1}/3)`,await new Promise(q=>setTimeout(q,2e3)));}if(!E){let C=D?.stderr||D?.message||"Unknown error";throw a$1.debug(`All pip install attempts failed. Last error: ${C}`),C.includes("Could not find")||C.includes("No matching distribution")?new l:new k("Install rapidkit-core with pip",new Error(`Failed to install rapidkit-core after 3 attempts.
237
+ `),await promises.writeFile(p,f,"utf-8");}n.start("Configuring Poetry");try{await execa("poetry",["config","virtualenvs.in-project","true","--local"],{cwd:e}),n.succeed("Poetry configured");}catch{n.warn("Could not configure Poetry virtualenvs.in-project");}n.start("Creating virtualenv");let m=c||A(),r=f(g.join(e,".venv"));try{await execa(m,["-m","venv",".venv"],{cwd:e,timeout:6e4}),n.succeed("Virtualenv created");}catch(i){a$1.debug(`python -m venv failed: ${i}`),n.warn("Could not pre-create virtualenv, Poetry will try"),r=c||A();}try{await execa("poetry",["env","use",r||A()],{cwd:e}),a$1.debug(`Poetry env set to: ${r}`);}catch(i){a$1.debug(`Could not set Poetry env: ${i}`);}if(n.start("Installing RapidKit"),h&&!a){let i=d$2(s||{}),f=i?await b.pathExists(i):false,y=f&&i?i:"rapidkit-core";i&&!f&&a$1.warn(`RAPIDKIT_DEV_PATH is set but path does not exist: ${i}. Falling back to PyPI.`),n.text=f?"Installing RapidKit from local path":"Installing RapidKit from PyPI";let E=false,D=null;for(let C=1;C<=3;C++)try{await execa(r,["-m","pip","install",y,"--quiet"],{cwd:e,timeout:18e4}),E=true;break}catch(O){D=O,a$1.debug(`pip install rapidkit-core attempt ${C} failed: ${O}`),C<3&&(n.text=`Retrying installation (attempt ${C+1}/3)`,await new Promise(Y=>setTimeout(Y,2e3)));}if(!E){let C=D?.stderr||D?.message||"Unknown error";throw a$1.debug(`All pip install attempts failed. Last error: ${C}`),C.includes("Could not find")||C.includes("No matching distribution")?new l:new k("Install rapidkit-core with pip",new Error(`Failed to install rapidkit-core after 3 attempts.
238
238
  Error: ${C}
239
239
 
240
240
  Possible solutions:
241
241
  1. Check your internet connection
242
242
  2. Try installing manually: cd ${g.basename(e)} && poetry add rapidkit-core
243
- 3. Use venv method instead: npx rapidkit ${g.basename(e)} --install-method=venv`))}}else {n.text="Syncing Poetry environment";try{await execa("poetry",["install","--no-root"],{cwd:e,timeout:12e4}),n.succeed("Poetry environment synced");}catch(i){a$1.debug(`poetry install --no-root failed: ${i}`),n.warn("Could not sync Poetry environment, proceeding with add command");}if(n.start("Installing RapidKit"),a){let i=d$2(l$1||{});if(!i)throw new k("Test mode installation",new Error("No local RapidKit path configured. Set RAPIDKIT_DEV_PATH environment variable."));a$1.debug(`Installing from local path: ${i}`),n.text="Installing RapidKit from local path (test mode)",await execa("poetry",["add",i],{cwd:e});}else {n.text="Installing RapidKit from PyPI";let i=false,f=null;for(let y=1;y<=3;y++)try{await execa("poetry",["add","rapidkit-core"],{cwd:e,timeout:6e4*y}),i=true;break}catch(E){f=E,a$1.debug(`Poetry add attempt ${y} failed: ${E}`),y<3&&(n.text=`Retrying installation (attempt ${y+1}/3)`,await new Promise(D=>setTimeout(D,2e3)));}if(!i){let y=f?.stderr||f?.message||"Unknown error";throw a$1.debug(`All Poetry install attempts failed. Last error: ${y}`),y.includes("Could not find")||y.includes("No matching distribution")?new l:new k("Install rapidkit-core with Poetry",new Error(`Failed to install rapidkit-core after 3 attempts.
243
+ 3. Use venv method instead: npx rapidkit ${g.basename(e)} --install-method=venv`))}}else {n.text="Syncing Poetry environment";try{await execa("poetry",["install","--no-root"],{cwd:e,timeout:12e4}),n.succeed("Poetry environment synced");}catch(i){a$1.debug(`poetry install --no-root failed: ${i}`),n.warn("Could not sync Poetry environment, proceeding with add command");}if(n.start("Installing RapidKit"),a){let i=d$2(s||{});if(!i)throw new k("Test mode installation",new Error("No local RapidKit path configured. Set RAPIDKIT_DEV_PATH environment variable."));a$1.debug(`Installing from local path: ${i}`),n.text="Installing RapidKit from local path (test mode)",await execa("poetry",["add",i],{cwd:e});}else {n.text="Installing RapidKit from PyPI";let i=false,f=null;for(let y=1;y<=3;y++)try{await execa("poetry",["add","rapidkit-core"],{cwd:e,timeout:6e4*y}),i=true;break}catch(E){f=E,a$1.debug(`Poetry add attempt ${y} failed: ${E}`),y<3&&(n.text=`Retrying installation (attempt ${y+1}/3)`,await new Promise(D=>setTimeout(D,2e3)));}if(!i){let y=f?.stderr||f?.message||"Unknown error";throw a$1.debug(`All Poetry install attempts failed. Last error: ${y}`),y.includes("Could not find")||y.includes("No matching distribution")?new l:new k("Install rapidkit-core with Poetry",new Error(`Failed to install rapidkit-core after 3 attempts.
244
244
  Error: ${y}
245
245
 
246
246
  Possible solutions:
247
247
  1. Check your internet connection
248
248
  2. Try installing manually: cd ${g.basename(e)} && poetry add rapidkit-core
249
- 3. Use venv method instead: npx rapidkit ${g.basename(e)} --install-method=venv`))}}}n.succeed("RapidKit installed in project virtualenv");try{let{checkRapidkitCoreAvailable:i}=await import('./pythonRapidkitExec-MNWRC4F2.js');if(!await i()&&!a){n.start("Checking optional global pipx installation");let y=await tt(n,true);try{n.start("Installing RapidKit globally with pipx for CLI access"),await K(y,["install","rapidkit-core"]),n.succeed("RapidKit installed globally");}catch(E){n.warn("Could not install globally (non-fatal, project virtualenv has RapidKit)"),a$1.debug(`pipx install failed: ${E}`);}}}catch(i){n.succeed("Skipped optional global pipx installation"),a$1.debug(`Global install check skipped: ${i}`);}}async function ct(e,o,n,a,l$1,d=false){n.start(`Checking Python ${o}`);let c=A();try{let{stdout:u}=await execa(c,["--version"]),h=u.match(/Python (\d+\.\d+)/)?.[1];if(h&&!V(h,o))throw new f$1(o,h);n.succeed(`Python ${h} found`);}catch(u){throw u instanceof f$1?u:new f$1(o)}n.start("Creating virtual environment");try{await execa(c,["-m","venv",".venv"],{cwd:e}),n.succeed("Virtual environment created");}catch(u){if(n.fail("Failed to create virtual environment"),(m=>typeof m=="object"&&m!==null&&"stdout"in m&&typeof m.stdout=="string")(u)&&u.stdout.includes("ensurepip is not")){let m=u.stdout.match(/apt install (python[\d.]+-venv)/),r=m?m[1]:"python3-venv";throw new k("Python venv module not available",new Error(`Virtual environment creation failed.
249
+ 3. Use venv method instead: npx rapidkit ${g.basename(e)} --install-method=venv`))}}}n.succeed("RapidKit installed in project virtualenv");try{let{checkRapidkitCoreAvailable:i}=await import('./pythonRapidkitExec-MNWRC4F2.js');if(!await i()&&!a){n.start("Checking optional global pipx installation");let y=await tt(n,true);try{n.start("Installing RapidKit globally with pipx for CLI access"),await K(y,["install","rapidkit-core"]),n.succeed("RapidKit installed globally");}catch(E){n.warn("Could not install globally (non-fatal, project virtualenv has RapidKit)"),a$1.debug(`pipx install failed: ${E}`);}}}catch(i){n.succeed("Skipped optional global pipx installation"),a$1.debug(`Global install check skipped: ${i}`);}}async function ct(e,o,n,a,s,d=false){n.start(`Checking Python ${o}`);let c=A();try{let{stdout:u}=await execa(c,["--version"]),h=u.match(/Python (\d+\.\d+)/)?.[1];if(h&&!V(h,o))throw new f$1(o,h);n.succeed(`Python ${h} found`);}catch(u){throw u instanceof f$1?u:new f$1(o)}n.start("Creating virtual environment");try{await execa(c,["-m","venv",".venv"],{cwd:e}),n.succeed("Virtual environment created");}catch(u){if(n.fail("Failed to create virtual environment"),(m=>typeof m=="object"&&m!==null&&"stdout"in m&&typeof m.stdout=="string")(u)&&u.stdout.includes("ensurepip is not")){let m=u.stdout.match(/apt install (python[\d.]+-venv)/),r=m?m[1]:"python3-venv";throw new k("Python venv module not available",new Error(`Virtual environment creation failed.
250
250
 
251
251
  On Debian/Ubuntu systems, install the venv package:
252
252
  sudo apt install ${r}
253
253
 
254
254
  Or use Poetry instead (recommended):
255
- npx rapidkit ${g.basename(e)} --yes`))}throw new k("Virtual environment creation",u instanceof Error?u:new Error(String(u)))}n.start("Installing RapidKit");let p=f(g.join(e,".venv"));if(await execa(p,["-m","pip","install","--upgrade","pip"],{cwd:e}),a){let u=d$2(l$1||{});if(!u)throw new k("Test mode installation",new Error("No local RapidKit path configured. Set RAPIDKIT_DEV_PATH environment variable."));a$1.debug(`Installing from local path: ${u}`),n.text="Installing RapidKit from local path (test mode)",await execa(p,["-m","pip","install","-e",u],{cwd:e});}else {n.text="Installing RapidKit from PyPI";let u=false,h=null;for(let m=1;m<=3;m++)try{await execa(p,["-m","pip","install","rapidkit-core"],{cwd:e,timeout:6e4*m}),u=true;break}catch(r){h=r,a$1.debug(`pip install attempt ${m} failed: ${r}`),m<3&&(n.text=`Retrying installation (attempt ${m+1}/3)`,await new Promise(i=>setTimeout(i,2e3)));}if(!u){let m=h?.stderr||h?.message||"Unknown error";throw a$1.debug(`All pip install attempts failed. Last error: ${m}`),m.includes("Could not find")||m.includes("No matching distribution")?new l:new k("Install rapidkit-core with pip",new Error(`Failed to install rapidkit-core after 3 attempts.
255
+ npx rapidkit ${g.basename(e)} --yes`))}throw new k("Virtual environment creation",u instanceof Error?u:new Error(String(u)))}n.start("Installing RapidKit");let p=f(g.join(e,".venv"));if(await execa(p,["-m","pip","install","--upgrade","pip"],{cwd:e}),a){let u=d$2(s||{});if(!u)throw new k("Test mode installation",new Error("No local RapidKit path configured. Set RAPIDKIT_DEV_PATH environment variable."));a$1.debug(`Installing from local path: ${u}`),n.text="Installing RapidKit from local path (test mode)",await execa(p,["-m","pip","install","-e",u],{cwd:e});}else {n.text="Installing RapidKit from PyPI";let u=false,h=null;for(let m=1;m<=3;m++)try{await execa(p,["-m","pip","install","rapidkit-core"],{cwd:e,timeout:6e4*m}),u=true;break}catch(r){h=r,a$1.debug(`pip install attempt ${m} failed: ${r}`),m<3&&(n.text=`Retrying installation (attempt ${m+1}/3)`,await new Promise(i=>setTimeout(i,2e3)));}if(!u){let m=h?.stderr||h?.message||"Unknown error";throw a$1.debug(`All pip install attempts failed. Last error: ${m}`),m.includes("Could not find")||m.includes("No matching distribution")?new l:new k("Install rapidkit-core with pip",new Error(`Failed to install rapidkit-core after 3 attempts.
256
256
  Error: ${m}
257
257
 
258
258
  Possible solutions:
259
259
  1. Check your internet connection
260
260
  2. Try installing manually: cd ${g.basename(e)} && ${f(".venv")} -m pip install rapidkit-core
261
- 3. Use Poetry instead: npx rapidkit ${g.basename(e)} --install-method=poetry`))}}n.succeed("RapidKit installed in project virtualenv");try{let{checkRapidkitCoreAvailable:u}=await import('./pythonRapidkitExec-MNWRC4F2.js');if(!await u()&&!a){n.start("Checking optional global pipx installation");let m=await tt(n,true);try{n.start("Installing RapidKit globally with pipx for CLI access"),await K(m,["install","rapidkit-core"]),n.succeed("RapidKit installed globally");}catch(r){n.warn("Could not install globally (non-fatal, project virtualenv has RapidKit)"),a$1.debug(`pipx install failed: ${r}`);}}}catch(u){n.succeed("Skipped optional global pipx installation"),a$1.debug(`Global install check skipped: ${u}`);}}async function jt(e,o,n,a,l$1=false){if(!n)try{let{checkRapidkitCoreVersionCompatible:c}=await import('./pythonRapidkitExec-MNWRC4F2.js'),p=await c();if(p.isCompatible){o.succeed(`RapidKit ${p.installedVersion??""} already compatible globally; skipping pipx installation`),await P.outputFile(g.join(e,".rapidkit-global"),`RapidKit already available globally (version ${p.installedVersion??"unknown"}) and satisfies expected constraint ${p.expectedConstraint??"n/a"}; workspace will reuse the existing installation
262
- `,"utf-8");return}p.reason==="constraint-missing"?o.warn('Version-aware global reuse skipped: no explicit rapidkit-core version constraint found. Set RAPIDKIT_CORE_PYTHON_PACKAGE (example: RAPIDKIT_CORE_PYTHON_PACKAGE="rapidkit-core>=0.4.0,<0.9.0") to enable version-aware reuse. Proceeding with pipx install/upgrade.'):p.reason==="constraint-unsupported"&&o.warn('Version-aware global reuse skipped: RAPIDKIT_CORE_PYTHON_PACKAGE uses an unsupported spec (path/url/git). Use a version range instead (example: RAPIDKIT_CORE_PYTHON_PACKAGE="rapidkit-core==0.4.0" or "rapidkit-core>=0.4.0,<0.9.0"). Proceeding with pipx install/upgrade.'),a$1.debug(`Global RapidKit install is not reusable via version-aware policy (reason=${p.reason}, installed=${p.installedVersion??"unknown"}, expected=${p.expectedConstraint??"none"}). Proceeding with pipx install/upgrade.`);}catch(c){a$1.debug(`Global RapidKit version-aware check failed before pipx install: ${c}`);}let d=await tt(o,l$1);if(o.start("Installing RapidKit globally with pipx"),n){let c=d$2(a||{});if(!c)throw new k("Test mode installation",new Error("No local RapidKit path configured. Set RAPIDKIT_DEV_PATH environment variable."));a$1.debug(`Installing from local path: ${c}`),o.text="Installing RapidKit from local path (test mode)",await K(d,["install","-e",c]);}else {o.text="Installing RapidKit from PyPI";try{await K(d,["install","rapidkit-core"]);}catch(c){try{o.text="RapidKit already installed globally, upgrading to match expected version",await K(d,["upgrade","rapidkit-core"]);}catch(p){throw a$1.debug(`pipx install/upgrade failed: install=${c}, upgrade=${p}`),new l}}}o.succeed("RapidKit installed globally"),await P.outputFile(g.join(e,".rapidkit-global"),`RapidKit installed globally with pipx
263
- `,"utf-8");}async function ue(e,o){let{skipGit:n=false,testMode:a=false,userConfig:l={},yes:d=false,installMethod:c,pythonVersion:p="3.10"}=o||{},u=c||l.defaultInstallMethod||await(async()=>{try{return await execa("poetry",["--version"],{timeout:3e3}),"poetry"}catch{return a$1.warn("Poetry not found \u2014 auto-selecting venv. Pass --install-method poetry to override."),"venv"}})(),h=u==="poetry"&&!await It()?"venv":u;await H(e,g.basename(e),h),await L(e),await z(e,g.basename(e),h,p,o?.profile);let m=F("Registering workspace").start();try{h==="poetry"?(await U(e,g.basename(e)),await Et(e,p,m,a,l,d)):h==="venv"?await ct(e,p,m,a,l):await jt(e,m,a,l,d),await Rt(e,h),await Ct(e,h),m.succeed("Workspace registered");try{let{registerWorkspace:r}=await import('./workspace-ZXWYIZOR.js');await r(e,g.basename(e));}catch{}if(!n){m.start("Initializing git repository");try{await execa("git",["init"],{cwd:e}),await execa("git",["add","."],{cwd:e}),await execa("git",["commit","-m","Initial commit: RapidKit workspace"],{cwd:e}),m.succeed("Git repository initialized");}catch{m.warn("Could not initialize git repository");}}}catch(r){throw m.fail("Failed to register workspace"),r}}async function Ct(e,o){let n=o==="poetry"?`source $(poetry env info --path)/bin/activate
261
+ 3. Use Poetry instead: npx rapidkit ${g.basename(e)} --install-method=poetry`))}}n.succeed("RapidKit installed in project virtualenv");try{let{checkRapidkitCoreAvailable:u}=await import('./pythonRapidkitExec-MNWRC4F2.js');if(!await u()&&!a){n.start("Checking optional global pipx installation");let m=await tt(n,true);try{n.start("Installing RapidKit globally with pipx for CLI access"),await K(m,["install","rapidkit-core"]),n.succeed("RapidKit installed globally");}catch(r){n.warn("Could not install globally (non-fatal, project virtualenv has RapidKit)"),a$1.debug(`pipx install failed: ${r}`);}}}catch(u){n.succeed("Skipped optional global pipx installation"),a$1.debug(`Global install check skipped: ${u}`);}}async function jt(e,o,n,a,s=false){if(!n)try{let{checkRapidkitCoreVersionCompatible:c}=await import('./pythonRapidkitExec-MNWRC4F2.js'),p=await c();if(p.isCompatible){o.succeed(`RapidKit ${p.installedVersion??""} already compatible globally; skipping pipx installation`),await b.outputFile(g.join(e,".rapidkit-global"),`RapidKit already available globally (version ${p.installedVersion??"unknown"}) and satisfies expected constraint ${p.expectedConstraint??"n/a"}; workspace will reuse the existing installation
262
+ `,"utf-8");return}p.reason==="constraint-missing"?o.warn('Version-aware global reuse skipped: no explicit rapidkit-core version constraint found. Set RAPIDKIT_CORE_PYTHON_PACKAGE (example: RAPIDKIT_CORE_PYTHON_PACKAGE="rapidkit-core>=0.4.0,<0.9.0") to enable version-aware reuse. Proceeding with pipx install/upgrade.'):p.reason==="constraint-unsupported"&&o.warn('Version-aware global reuse skipped: RAPIDKIT_CORE_PYTHON_PACKAGE uses an unsupported spec (path/url/git). Use a version range instead (example: RAPIDKIT_CORE_PYTHON_PACKAGE="rapidkit-core==0.4.0" or "rapidkit-core>=0.4.0,<0.9.0"). Proceeding with pipx install/upgrade.'),a$1.debug(`Global RapidKit install is not reusable via version-aware policy (reason=${p.reason}, installed=${p.installedVersion??"unknown"}, expected=${p.expectedConstraint??"none"}). Proceeding with pipx install/upgrade.`);}catch(c){a$1.debug(`Global RapidKit version-aware check failed before pipx install: ${c}`);}let d=await tt(o,s);if(o.start("Installing RapidKit globally with pipx"),n){let c=d$2(a||{});if(!c)throw new k("Test mode installation",new Error("No local RapidKit path configured. Set RAPIDKIT_DEV_PATH environment variable."));a$1.debug(`Installing from local path: ${c}`),o.text="Installing RapidKit from local path (test mode)",await K(d,["install","-e",c]);}else {o.text="Installing RapidKit from PyPI";try{await K(d,["install","rapidkit-core"]);}catch(c){try{o.text="RapidKit already installed globally, upgrading to match expected version",await K(d,["upgrade","rapidkit-core"]);}catch(p){throw a$1.debug(`pipx install/upgrade failed: install=${c}, upgrade=${p}`),new l}}}o.succeed("RapidKit installed globally"),await b.outputFile(g.join(e,".rapidkit-global"),`RapidKit installed globally with pipx
263
+ `,"utf-8");}async function ue(e,o){let{skipGit:n=false,testMode:a=false,userConfig:s={},yes:d=false,installMethod:c,pythonVersion:p="3.10"}=o||{},u=c||s.defaultInstallMethod||await(async()=>{try{return await execa("poetry",["--version"],{timeout:3e3}),"poetry"}catch{return a$1.warn("Poetry not found \u2014 auto-selecting venv. Pass --install-method poetry to override."),"venv"}})(),h=u==="poetry"&&!await Rt()?"venv":u;await H(e,g.basename(e),h),await L(e),await z(e,g.basename(e),h,p,o?.profile);let m=F("Registering workspace").start();try{h==="poetry"?(await U(e,g.basename(e)),await Et(e,p,m,a,s,d)):h==="venv"?await ct(e,p,m,a,s):await jt(e,m,a,s,d),await It(e,h),await Ct(e,h),m.succeed("Workspace registered");try{let{registerWorkspace:r}=await import('./workspace-ZDL5IQU4.js');await r(e,g.basename(e));}catch{}if(!n){m.start("Initializing git repository");try{await execa("git",["init"],{cwd:e}),await execa("git",["add","."],{cwd:e}),await execa("git",["commit","-m","Initial commit: RapidKit workspace"],{cwd:e}),m.succeed("Git repository initialized");}catch{m.warn("Could not initialize git repository");}}}catch(r){throw m.fail("Failed to register workspace"),r}}async function Ct(e,o){let n=o==="poetry"?`source $(poetry env info --path)/bin/activate
264
264
  # Or simply use: poetry run rapidkit <command>`:o==="venv"?"source .venv/bin/activate # On Windows: .venv\\Scripts\\activate":"N/A (globally installed)",a=o==="poetry"?`# No activation needed (recommended):
265
265
  ./rapidkit --help
266
266
  # or:
@@ -269,7 +269,7 @@ poetry run rapidkit --help`:o==="venv"?`# No activation needed (recommended):
269
269
  # or direct:
270
270
  ./.venv/bin/rapidkit --help`:`# Optional: use the local launcher
271
271
  ./rapidkit --help
272
- # (pipx installs may require Poetry/venv to be present in this folder)`,l=a$2()?"python --version (or: py -3 --version)":"python3 --version (or: python --version)",d=`# RapidKit Workspace
272
+ # (pipx installs may require Poetry/venv to be present in this folder)`,s=a$2()?"python --version (or: py -3 --version)":"python3 --version (or: python --version)",d=`# RapidKit Workspace
273
273
 
274
274
  This directory contains a RapidKit development environment.
275
275
 
@@ -367,11 +367,11 @@ README.md # This file
367
367
 
368
368
  If you encounter issues:
369
369
 
370
- 1. Ensure Python 3.10+ is installed: \`${l}\`
370
+ 1. Ensure Python 3.10+ is installed: \`${s}\`
371
371
  2. Check RapidKit installation: \`rapidkit --version\`
372
372
  3. Run diagnostics: \`rapidkit doctor\`
373
373
  4. Visit RapidKit documentation or GitHub issues
374
- `;await promises.writeFile(g.join(e,"README.md"),d,"utf-8");}async function Ut(e,o,n){let a=F("Creating demo workspace").start();try{await P.ensureDir(e),a.succeed("Directory created"),a.start("Setting up demo kit generator");let l=JSON.stringify({name:`${o}-workspace`,version:"1.0.0",private:true,description:"RapidKit demo workspace",scripts:{generate:"node generate-demo.js"}},null,2);await promises.writeFile(g.join(e,"package.json"),l,"utf-8"),await promises.writeFile(g.join(e,"generate-demo.js"),`#!/usr/bin/env node
374
+ `;await promises.writeFile(g.join(e,"README.md"),d,"utf-8");}async function Ut(e,o,n){let a=F("Creating demo workspace").start();try{await b.ensureDir(e),a.succeed("Directory created"),a.start("Setting up demo kit generator");let s=JSON.stringify({name:`${o}-workspace`,version:"1.0.0",private:true,description:"RapidKit demo workspace",scripts:{generate:"node generate-demo.js"}},null,2);await promises.writeFile(g.join(e,"package.json"),s,"utf-8"),await promises.writeFile(g.join(e,"generate-demo.js"),`#!/usr/bin/env node
375
375
  /**
376
376
  * Demo Kit Generator - Create FastAPI demo projects
377
377
  *
@@ -854,7 +854,7 @@ ${o}/
854
854
  ---
855
855
 
856
856
  **Generated with RapidKit** | [GitHub](https://github.com/rapidkitlabs/rapidkit-npm)
857
- `;if(await promises.writeFile(g.join(e,"README.md"),c,"utf-8"),a.succeed("Demo workspace setup complete"),!n){a.start("Initializing git repository");try{await execa("git",["init"],{cwd:e}),await P.outputFile(g.join(e,".gitignore"),`# Dependencies
857
+ `;if(await promises.writeFile(g.join(e,"README.md"),c,"utf-8"),a.succeed("Demo workspace setup complete"),!n){a.start("Initializing git repository");try{await execa("git",["init"],{cwd:e}),await b.outputFile(g.join(e,".gitignore"),`# Dependencies
858
858
  node_modules/
859
859
 
860
860
  # Generated projects
@@ -870,14 +870,14 @@ __pycache__/
870
870
  `,"utf-8"),await execa("git",["add","."],{cwd:e}),await execa("git",["commit","-m","Initial commit: Demo workspace"],{cwd:e}),a.succeed("Git repository initialized");}catch{a.warn("Could not initialize git repository");}}console.log(t.green(`
871
871
  \u2728 Demo workspace created successfully!
872
872
  `)),console.log(t.cyan("\u{1F4C2} Location:"),t.white(e)),console.log(t.cyan(`\u{1F680} Get started:
873
- `)),console.log(t.white(` cd ${o}`)),console.log(t.white(" node generate-demo.js my-api")),console.log(t.white(" cd my-api")),console.log(t.white(" rapidkit init")),console.log(t.white(" rapidkit dev")),console.log(),console.log(t.yellow("\u{1F4A1} Note:"),"This is a demo workspace. For full RapidKit features:"),console.log(t.cyan(" pipx install rapidkit")),console.log();}catch(l){throw a.fail("Failed to create demo workspace"),l}}async function zt(e,o,n,a,l,d,c){if(console.log(t.cyan(`
873
+ `)),console.log(t.white(` cd ${o}`)),console.log(t.white(" node generate-demo.js my-api")),console.log(t.white(" cd my-api")),console.log(t.white(" rapidkit init")),console.log(t.white(" rapidkit dev")),console.log(),console.log(t.yellow("\u{1F4A1} Note:"),"This is a demo workspace. For full RapidKit features:"),console.log(t.cyan(" pipx install rapidkit")),console.log();}catch(s){throw a.fail("Failed to create demo workspace"),s}}async function zt(e,o,n,a,s,d,c){if(console.log(t.cyan(`
874
874
  \u{1F50D} Dry-run mode - what would be created:
875
875
  `)),console.log(t.white("\u{1F4C2} Workspace path:"),e),console.log(t.white("\u{1F4DB} Name:"),t.cyan(o)),n)console.log(t.white("\u{1F4E6} Type:"),"Demo environment"),console.log(t.white(`
876
876
  \u{1F4DD} Files to create:`)),console.log(t.gray(" - package.json")),console.log(t.gray(" - generate-demo.js (project generator)")),console.log(t.gray(" - README.md")),console.log(t.gray(" - .gitignore")),console.log(t.white(`
877
- \u{1F3AF} Capabilities:`)),console.log(t.gray(" - Generate FastAPI/NestJS demo projects")),console.log(t.gray(" - No Python RapidKit installation required")),console.log(t.gray(" - Bundled templates"));else {let p=l||"minimal",u=d,h=c,r=new Set(["python-only","polyglot","enterprise"]).has(p);console.log(t.white("\u{1F4E6} Profile:"),t.cyan(p)),console.log(t.white("\u{1F4DD} Configuration:")),r?(console.log(t.gray(` - Python version: ${h}`)),console.log(t.gray(` - Install method: ${u}`)),console.log(t.gray(` - Git init: ${a.skipGit?"No":"Yes"}`))):(console.log(t.gray(" - Python-free profile (no Python needed)")),console.log(t.gray(` - Git init: ${a.skipGit?"No":"Yes"}`))),console.log(t.white(`
877
+ \u{1F3AF} Capabilities:`)),console.log(t.gray(" - Generate FastAPI/NestJS demo projects")),console.log(t.gray(" - No Python RapidKit installation required")),console.log(t.gray(" - Bundled templates"));else {let p=s||"minimal",u=d,h=c,r=new Set(["python-only","polyglot","enterprise"]).has(p);console.log(t.white("\u{1F4E6} Profile:"),t.cyan(p)),console.log(t.white("\u{1F4DD} Configuration:")),r?(console.log(t.gray(` - Python version: ${h}`)),console.log(t.gray(` - Install method: ${u}`)),console.log(t.gray(` - Git init: ${a.skipGit?"No":"Yes"}`))):(console.log(t.gray(" - Python-free profile (no Python needed)")),console.log(t.gray(` - Git init: ${a.skipGit?"No":"Yes"}`))),console.log(t.white(`
878
878
  \u{1F4CB} Files to create:`)),console.log(t.gray(" - .rapidkit-workspace (workspace marker)")),console.log(t.gray(" - .rapidkit/ (workspace config directory)")),console.log(t.gray(" - README.md")),console.log(t.gray(" - .gitignore")),r&&console.log(t.gray(` - ${u==="poetry"?"pyproject.toml + poetry.lock":".venv/ (virtual environment)"}`)),console.log(t.white(`
879
879
  \u2699\uFE0F Environment setup:`)),r&&console.log(u==="poetry"?t.gray(" - Poetry virtual environment created (recommended, includes dependency management)"):u==="venv"?t.gray(" - Python venv created in .venv/ (standard, zero extra tools)"):t.gray(" - Global pipx install (isolated, not local to workspace)")),console.log(t.white(`
880
880
  \u{1F680} Next steps:`)),console.log(t.gray(" 1. cd "+o)),console.log(t.gray(" 2. npx rapidkit create project")),console.log(t.gray(" 3. npx rapidkit init")),console.log(t.gray(" 4. npx rapidkit dev")),console.log(t.white(`
881
881
  \u{1F4A1} Learn more:`)),console.log(t.gray(" \u2022 Change profile later: rapidkit bootstrap --profile <profile>")),console.log(t.gray(" \u2022 Profile options: minimal|java-only|python-only|node-only|go-only|dotnet-only|polyglot|enterprise")),console.log(t.gray(" \u2022 Help: npx rapidkit --help"));}console.log(t.white(`
882
882
  \u2728 To proceed: remove --dry-run flag
883
- `));}export{de as a,bt as b,Kt as c,Rt as d,pe as e,ue as f};
883
+ `));}export{ht as a,de as b,bt as c,Kt as d,It as e,pe as f,ue as g};