klaudius 0.37.5 → 0.38.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.
- package/README.md +3 -3
- package/dist/WizardApp-VMYMWYKA.js +6 -0
- package/dist/bin.js +1 -167
- package/dist/{chunk-S26ZZBGE.js → chunk-XHMVVMAN.js} +47 -47
- package/dist/main-6O2VUPQT.js +166 -0
- package/package.json +5 -2
- package/dist/WizardApp-VPIFRA7A.js +0 -6
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Klaudius is a complete web-agency pipeline driven by Claude Code or Codex. Give
|
|
|
6
6
|
|
|
7
7
|
You don't need to be able to code to run it. Non-technical operators run Klaudius as a turnkey business; web designers and agencies run it as a production multiplier. It's region-agnostic — point it at any populated country and it works in the local language.
|
|
8
8
|
|
|
9
|
-
> **Note:** this npm package contains only the CLI binary. The actual project source — the agent skills, scripts, site template, and database schema — is delivered to your project directory by the `init` command, after your licence key is validated against [klaudius.dev](https://klaudius.dev). Running `npm pack klaudius` or `npm install klaudius` directly will not give you the project source.
|
|
9
|
+
> **Note:** this npm package contains only the CLI binary. The actual project source — the agent skills, scripts, site template, and database schema — is delivered to your project directory by the `init` command, after your licence key is validated against [klaudius.dev](https://klaudius.dev). Running `npm pack klaudius` or `npm install klaudius` directly will not give you the project source. A licence for the Klaudius app runs in the app, not here: download it at [klaudius.dev/download](https://klaudius.dev/download).
|
|
10
10
|
|
|
11
11
|
## Quick start
|
|
12
12
|
|
|
@@ -51,7 +51,7 @@ npx klaudius doctor # Diagnose a broken install (env, files, deps, cred
|
|
|
51
51
|
|
|
52
52
|
## Updates
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
Updates are included with your licence. Ask your agent to "update Klaudius" and it pulls the latest skills, scripts, and template files, applies everything that's safe to apply, and walks you through anything that needs a decision from you — your own edits are never silently overwritten.
|
|
55
55
|
|
|
56
56
|
## Prerequisites
|
|
57
57
|
|
|
@@ -66,7 +66,7 @@ Full prerequisites and setup notes at [klaudius.dev](https://klaudius.dev).
|
|
|
66
66
|
|
|
67
67
|
## Licence
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
Each licence is granted to a single individual or single entity. You may use Klaudius for your own commercial work, but you may not resell or redistribute the source code. Full terms at [klaudius.dev/terms](https://klaudius.dev/terms).
|
|
70
70
|
|
|
71
71
|
## Support
|
|
72
72
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{A as Z,B as _,C as E,e as d,f as z,g as D,h as j,i as ue}from"./chunk-XHMVVMAN.js";import{useEffect as $e,useMemo as je,useRef as le,useState as C}from"react";import{Box as B,Text as y,useApp as Le,useInput as He}from"ink";import{Box as de,Text as Re}from"ink";import{jsx as me,jsxs as ze}from"react/jsx-runtime";var Ee={pending:"\u25CB",current:"\u25C9",done:"\u2713",skipped:"\xB7"},Ce={pending:void 0,current:"cyan",done:"green",skipped:void 0};function fe({items:e}){return me(de,{flexDirection:"column",width:28,flexShrink:0,children:e.map(r=>{let o=r.status==="skipped"||r.status==="pending";return me(de,{children:ze(Re,{color:Ce[r.status],bold:r.status==="current",dimColor:o&&r.status!=="current",children:[Ee[r.status]," ",r.title]})},r.id)})})}import{useEffect as Ue,useState as ge}from"react";import{Box as ee,Text as L,useInput as Ve}from"ink";import Ne from"ink-text-input";import{jsx as W,jsxs as te}from"react/jsx-runtime";function xe({spec:e,masked:r,onSubmit:o,onBack:t}){let u=typeof e.initialValue=="string"?e.initialValue:"",i=r&&u.length>0,n=r||z(e),[h,x]=ge(i?"":u),[c,I]=ge(null);Ue(()=>(d("TextPromptUI:mount",{masked:r,message:e.message.slice(0,60),initial:D(e.initialValue??null,n)}),()=>{d("TextPromptUI:unmount")}),[r,n,e.message,e.initialValue]),Ve((b,s)=>{d("TextPromptUI:useInput fired",{...j(b,n),ctrl:s.ctrl,escape:s.escape,return:s.return}),s.escape&&t()});let f=b=>{d("TextPromptUI:handleSubmit",{raw:D(b,n)});let s=b.length===0&&i?u:b;if(e.validate){let T=e.validate(s);if(T){d("TextPromptUI:validate failed",{err:ue(T,n)}),I(T);return}}I(null),o(s)};return te(ee,{flexDirection:"column",children:[te(L,{children:[W(L,{color:"cyan",children:"?"})," ",e.message]}),te(ee,{children:[W(L,{color:"green",children:"\u203A "}),W(Ne,{value:h,onChange:x,onSubmit:f,placeholder:i?"type or paste a new value \u2014 or press Enter to keep the current one":e.placeholder,mask:r?"\u2022":void 0})]}),c&&W(ee,{marginTop:0,children:W(L,{color:"red",children:c})})]})}import{useState as De}from"react";import{Box as re,Text as H,useInput as We}from"ink";import{jsx as X,jsxs as oe}from"react/jsx-runtime";function Se({spec:e,onSubmit:r,onBack:o}){let t=e.options??[],u=typeof e.initialValue=="string"?Math.max(0,t.findIndex(h=>h.value===e.initialValue)):0,[i,n]=De(u===-1?0:u);return We((h,x)=>{if(x.escape)o();else if(x.upArrow)n(c=>(c-1+t.length)%t.length);else if(x.downArrow)n(c=>(c+1)%t.length);else if(x.return){let c=t[i];c&&r(c.value)}}),oe(re,{flexDirection:"column",children:[oe(H,{children:[X(H,{color:"cyan",children:"?"})," ",e.message]}),X(re,{flexDirection:"column",marginTop:0,children:t.map((h,x)=>{let c=x===i;return oe(H,{color:c?"cyan":void 0,bold:c,children:[c?"\u25CF ":"\u25CB ",h.label]},h.value)})}),X(re,{marginTop:1,children:X(H,{dimColor:!0,children:"Use the \u2191 \u2193 arrow keys to choose, then press Enter"})})]})}import{useState as Oe}from"react";import{Box as ne,Text as U,useInput as Me}from"ink";import{jsx as G,jsxs as O}from"react/jsx-runtime";function be({spec:e,onSubmit:r,onBack:o}){let[t,u]=Oe(typeof e.initialValue=="boolean"?e.initialValue:!0);return Me((i,n)=>{n.escape?o():n.leftArrow||n.rightArrow?u(h=>!h):i==="y"||i==="Y"?u(!0):i==="n"||i==="N"?u(!1):n.return&&r(t)}),O(ne,{flexDirection:"column",children:[O(U,{children:[G(U,{color:"cyan",children:"?"})," ",e.message]}),O(ne,{marginTop:0,children:[O(U,{color:t?"cyan":void 0,bold:t,children:[t?"\u25CF ":"\u25CB ","Yes"]}),G(U,{children:" "}),O(U,{color:t?void 0:"cyan",bold:!t,children:[t?"\u25CB ":"\u25CF ","No"]})]}),G(ne,{marginTop:1,children:G(U,{dimColor:!0,children:"Use the \u2190 \u2192 arrow keys (or y / n) to choose, then press Enter"})})]})}import{useState as ie}from"react";import{Box as K,Text as M,useInput as Fe}from"ink";import{jsx as F,jsxs as q}from"react/jsx-runtime";function he({spec:e,onSubmit:r,onBack:o}){let t=e.options??[],u=new Set(typeof e.initialValue=="string"?e.initialValue.split(",").map(f=>f.trim()).filter(Boolean):[]),[i,n]=ie(0),[h,x]=ie(u),[c,I]=ie(null);return Fe((f,b)=>{if(b.escape)o();else if(b.upArrow)n(s=>(s-1+t.length)%t.length);else if(b.downArrow)n(s=>(s+1)%t.length);else if(f===" "){let s=t[i];s&&(I(null),x(T=>{let P=new Set(T);return P.has(s.value)?P.delete(s.value):P.add(s.value),P}))}else if(b.return){let s=t.map(P=>P.value).filter(P=>h.has(P)).join(","),T=e.validate?.(s);if(T){I(T);return}r(s)}}),q(K,{flexDirection:"column",children:[q(M,{children:[F(M,{color:"cyan",children:"?"})," ",e.message]}),F(K,{flexDirection:"column",marginTop:0,children:t.map((f,b)=>{let s=b===i,T=h.has(f.value);return q(M,{color:s?"cyan":void 0,bold:s,children:[s?"\u203A ":" ",T?"\u25C9 ":"\u25EF ",f.label]},f.value)})}),c&&F(K,{marginTop:0,children:F(M,{color:"red",children:c})}),F(K,{marginTop:1,children:q(M,{dimColor:!0,children:["\u2191 \u2193 to move, Space to tick/untick, Enter to confirm",e.validate?" (tick at least one)":" (ticking none is fine)"]})})]})}import{Box as Te,Text as Pe}from"ink";import{jsx as se,jsxs as Ye}from"react/jsx-runtime";function ae({title:e,body:r}){let o=r.split(`
|
|
2
|
+
`);return Ye(Te,{flexDirection:"column",borderStyle:"round",borderColor:"gray",paddingX:1,children:[se(Pe,{color:"cyan",bold:!0,children:e}),se(Te,{flexDirection:"column",marginTop:0,children:o.map((t,u)=>se(Pe,{dimColor:!1,children:t.length===0?" ":t},u))})]})}import{jsx as l,jsxs as Y}from"react/jsx-runtime";function Ut({defaults:e,onComplete:r,onlySection:o,banner:t}){let{exit:u}=Le(),i=le({...e}),n=le(new Map),[,h]=C(0),x=()=>h(m=>m+1),[c,I]=C(null),[f,b]=C(null),[s,T]=C([]),[P,ce]=C(null),[pe,ve]=C(!1),[J,Be]=C({current:0,total:0}),V=()=>{let m=n.current;for(let g of E){let k=g.isApplicable(i.current),A=m.get(g.id);k?o&&g.id!==o?A!=="current"&&m.set(g.id,"done"):(A==="skipped"||!A)&&m.set(g.id,"pending"):m.set(g.id,"skipped")}};n.current.size===0&&V();let Q=le(!1);$e(()=>{if(d("WizardApp:useEffect fired",{startedAlready:Q.current}),Q.current){d("WizardApp:useEffect returning early (startedRef true)");return}Q.current=!0,d("WizardApp:orchestrator starting");let m=0,g=0,k=null,A=null,$=0,ye=p=>{let w=++m;return d("orchestrator:promptFn called",{id:w,type:p.type,message:p.message.slice(0,60)}),ce(null),new Promise((v,a)=>{b({id:w,spec:p,resolve:R=>{d("orchestrator:prompt resolved",{id:w,type:p.type,value:D(R,z(p))}),g++,v(R)},reject:R=>{d("orchestrator:prompt rejected",{id:w,reason:R.message}),a(R)}})})},Ie=p=>{T(w=>[...w,p])};return(async()=>{try{let p=o?E.filter(a=>a.id===o):E,w=()=>p.filter(a=>a.isApplicable(i.current)).length,v=0;for(;v<p.length;){let a=p[v];if(!a.isApplicable(i.current)){n.current.set(a.id,"skipped"),v++,V(),x();continue}T(k?[{title:"Something went wrong in this step",body:`${k}
|
|
3
|
+
|
|
4
|
+
Your answers in the earlier steps are kept. Try this step again below.`+($>=2?`
|
|
5
|
+
|
|
6
|
+
If it keeps failing, that's a bug rather than anything you've done \u2014 email hello@klaudius.dev with the message above.`:"")}]:[]),k=null;for(let S of E)S.id===a.id?n.current.set(S.id,"current"):n.current.get(S.id)==="current"&&n.current.set(S.id,"pending");I(a.id);let R=p.slice(0,v+1).filter(S=>S.isApplicable(i.current)).length;Be({current:R,total:w()}),x();let ke=g;try{let S=await a.execute(i.current,{prompt:ye,info:Ie});i.current={...i.current,...S},n.current.set(a.id,"done"),A===a.id&&(A=null,$=0),V(),v++}catch(S){if(S instanceof Z){if(o&&a.clearOnSkip){for(let Ae of a.clearOnSkip)i.current[Ae]=void 0;n.current.set(a.id,"skipped"),V(),v++;continue}if(o)continue;n.current.set(a.id,"pending");let N=v-1;for(;N>=0&&!p[N].isApplicable(i.current);)N--;N<0||(v=N,n.current.set(p[v].id,"pending")),V(),x();continue}if(!(S instanceof _)&&g>ke){d("orchestrator:section failed after input, re-running",{section:a.id,message:S?.message}),$=A===a.id?$+1:1,A=a.id,k=S instanceof Error?S.message:String(S);continue}throw S}}d("orchestrator:all sections done, calling onComplete + exit"),ve(!0),b(null),I(null),x(),await new Promise(a=>setTimeout(a,200)),r(i.current),u()}catch(p){d("orchestrator:caught error",{name:p?.name,message:p?.message}),p instanceof _&&(u(),process.exit(0));let w=p instanceof Error?p.message:String(p);ce(`Setup error: ${w}`),x()}})(),()=>{d("WizardApp:useEffect cleanup ran (component unmounting)")}},[u,r]),He((m,g)=>{let k=f!==null&&z(f.spec);d("WizardApp:useInput fired",{...j(m,k),ctrl:g.ctrl,escape:g.escape,return:g.return}),g.ctrl&&m==="c"&&(d("WizardApp:Ctrl+C \u2192 exiting"),u(),process.exit(0))});let we=je(()=>E.map(m=>({id:m.id,title:m.title,status:n.current.get(m.id)??"pending"})),[c,pe,P]);return Y(B,{flexDirection:"column",paddingY:1,children:[Y(B,{marginBottom:1,children:[l(y,{bold:!0,color:"cyan",children:"Klaudius setup"}),l(y,{dimColor:!0,children:" \xB7 "}),l(y,{dimColor:!0,children:J.total>0?`Step ${J.current} of ${J.total}`:"Loading\u2026"})]}),Y(B,{children:[l(fe,{items:we}),Y(B,{flexDirection:"column",flexGrow:1,marginLeft:2,children:[t&&Y(B,{marginBottom:1,borderStyle:"round",borderColor:"red",paddingX:1,flexDirection:"column",children:[l(y,{color:"red",bold:!0,children:"\u26A0 Heads up"}),l(y,{children:t})]}),!o&&c!==null&&c!=="ai-agent"&&l(B,{marginBottom:1,children:l(y,{color:"green",children:"Nothing here is permanent, you can customize any of this later."})}),s.map((m,g)=>l(B,{marginBottom:1,children:l(ae,{title:m.title,body:m.body})},g)),f?.spec.note&&l(B,{marginBottom:1,children:l(ae,{title:f.spec.note.title,body:f.spec.note.body})}),f&&Ge(f),P&&l(B,{marginTop:1,children:l(y,{color:"red",children:P})}),pe&&l(B,{marginTop:1,children:l(y,{color:"green",bold:!0,children:"\u2713 Setup complete. Continuing\u2026"})})]})]}),l(B,{marginTop:1,children:l(y,{dimColor:!0,children:Xe(o,c)})})]})}function Xe(e,r){if(e){let o=E.find(t=>t.id===r);return o?.clearOnSkip&&o.clearOnSkip.length>0?"\u21B5 confirm esc skip this section ctrl-c cancel":"\u21B5 confirm ctrl-c cancel"}return"\u21B5 confirm esc back to previous section ctrl-c cancel"}function Ge(e){let r=t=>e.resolve(t),o=()=>e.reject(new Z);switch(e.spec.type){case"text":case"password":return l(xe,{spec:e.spec,masked:z(e.spec),onSubmit:r,onBack:o},e.id);case"select":return l(Se,{spec:e.spec,onSubmit:r,onBack:o},e.id);case"multiselect":return l(he,{spec:e.spec,onSubmit:r,onBack:o},e.id);case"confirm":return l(be,{spec:e.spec,onSubmit:r,onBack:o},e.id)}}export{Ut as WizardApp};
|