@kianwoon/modelweaver 0.3.16 → 0.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-SCUI4R77.js → chunk-BXLSPBXT.js} +2 -2
- package/dist/{chunk-ZF23JS2D.js → chunk-F72SPY6C.js} +2 -2
- package/dist/{chunk-ZF23JS2D.js.map → chunk-F72SPY6C.js.map} +1 -1
- package/dist/config-CE7DQIUM.js +3 -0
- package/dist/{daemon-27GXX25D.js → daemon-WP5LZ7DG.js} +2 -2
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/{init-2GWQ546N.js → init-V5J734NZ.js} +3 -3
- package/package.json +1 -1
- package/dist/config-P34YQCFG.js +0 -3
- /package/dist/{chunk-SCUI4R77.js.map → chunk-BXLSPBXT.js.map} +0 -0
- /package/dist/{config-P34YQCFG.js.map → config-CE7DQIUM.js.map} +0 -0
- /package/dist/{daemon-27GXX25D.js.map → daemon-WP5LZ7DG.js.map} +0 -0
- /package/dist/{init-2GWQ546N.js.map → init-V5J734NZ.js.map} +0 -0
|
@@ -9,7 +9,7 @@ ${"\u2500".repeat(56)}
|
|
|
9
9
|
`)&&(e+=`
|
|
10
10
|
`);let i=[];for(let s of o){let r=s.envKey.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(`^${r}=.*$`,"m"),u=s.apiKey.includes('"')?s.apiKey.includes("'")?`'${s.apiKey.replace(/'/g,"'\\''")}'`:`'${s.apiKey}'`:`"${s.apiKey}"`;a.test(e)?e=e.replace(a,`${s.envKey}=${u}`):i.push(`${s.envKey}=${u}`)}oe(n,e+i.join(`
|
|
11
11
|
`)+(i.length>0?`
|
|
12
|
-
`:""),{mode:384})}async function Ie(){process.stdin.isTTY||(console.error("Error: modelweaver init --quick requires an interactive terminal."),process.exit(1));let{peekConfig:o}=await import("./config-
|
|
12
|
+
`:""),{mode:384})}async function Ie(){process.stdin.isTTY||(console.error("Error: modelweaver init --quick requires an interactive terminal."),process.exit(1));let{peekConfig:o}=await import("./config-CE7DQIUM.js"),t=o(),n=t?.providers??new Map,e=t?.modelRouting??new Map,i=[],s=[],r,a,u=E(1,!0),l=!1;for(;;)try{j(),console.log(`
|
|
13
13
|
${x}${m}\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\u2500
|
|
14
14
|
\u2502 Welcome to ModelWeaver! \u2501 Quick Setup \u2502
|
|
15
15
|
\u2502 \u2502
|
|
@@ -24,7 +24,7 @@ ${x} Generated configuration:${d}
|
|
|
24
24
|
`));let{confirm:b}=await p({type:"confirm",name:"confirm",message:`[Step 2 of ${u}] Write this configuration?`,initial:!0},g);if(b)break;console.log(`
|
|
25
25
|
Restarting quick setup...
|
|
26
26
|
`)}catch(c){if(c instanceof I){l||(console.log(`
|
|
27
|
-
Setup cancelled. No files were changed.`),process.exit(0));continue}throw c}await ue(i,s,r,a,u,!0,!!t)}async function ue(o,t,n,e,i,s,r){let a=O(process.env.HOME||process.env.USERPROFILE||"",".modelweaver");ie(a,{recursive:!0});let u=O(a,"config.yaml");ne(u)&&r?M(`Updating existing config at ${u}`):M(`Writing new config to ${u}`),oe(u,e),Ae(o);try{let{readPidFile:c,isProcessAlive:f}=await import("./daemon-
|
|
27
|
+
Setup cancelled. No files were changed.`),process.exit(0));continue}throw c}await ue(i,s,r,a,u,!0,!!t)}async function ue(o,t,n,e,i,s,r){let a=O(process.env.HOME||process.env.USERPROFILE||"",".modelweaver");ie(a,{recursive:!0});let u=O(a,"config.yaml");ne(u)&&r?M(`Updating existing config at ${u}`):M(`Writing new config to ${u}`),oe(u,e),Ae(o);try{let{readPidFile:c,isProcessAlive:f}=await import("./daemon-WP5LZ7DG.js"),b=await c();if(b&&f(b)){if(process.platform!=="win32")try{process.kill(b,"SIGUSR1")}catch{}else console.log(" Windows does not support SIGUSR1 \u2014 run 'modelweaver reload' to pick up new config.");M("ModelWeaver daemon reloaded with new config")}}catch{}let l=await Ee(t);if(l){let c=n.host==="localhost"?`http://localhost:${n.port}`:`http://${n.host}:${n.port}`;J()&&console.log(" Backed up existing settings to settings.json.bak");let b=V(),v=Q(b,{baseUrl:c,defaultModel:l.defaultModel,availableModels:l.availableModels});X(v),M(`Claude Code settings updated at ${z()}`),console.log(` Proxy endpoint: ${c}`),console.log(` Default model: ${l.defaultModel}`),console.log(` Available models: ${l.availableModels.join(", ")}`),console.log(),console.log(` ${re}Restart Claude Code to apply changes.${d}`)}return l}var N=0,F=1,D=2,te=3;async function He(o){if(o?.quick)return Ie();process.stdin.isTTY||(console.error("Error: modelweaver init requires an interactive terminal."),process.exit(1));let{peekConfig:t}=await import("./config-CE7DQIUM.js"),n=t(),e=n?.providers??new Map,i=n?.modelRouting??new Map,s=e.size>0,r=[],a=[],u=[],l={port:3456,host:"localhost"},c,f=null,b=s,v=N;for(;;)try{if(v<=N){if(j(),console.log(`
|
|
28
28
|
${x}${m}\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557\u2500
|
|
29
29
|
\u2551 Welcome to ModelWeaver! \u2551
|
|
30
30
|
\u2551 \u2551
|
|
@@ -61,4 +61,4 @@ ${f?`\u2551 Claude Code settings have been updated. \u2551
|
|
|
61
61
|
\u2551 claude \u2551`}
|
|
62
62
|
\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D${d}
|
|
63
63
|
`)}export{He as runInit,Z as testApiKey};
|
|
64
|
-
//# sourceMappingURL=init-
|
|
64
|
+
//# sourceMappingURL=init-V5J734NZ.js.map
|
package/package.json
CHANGED
package/dist/config-P34YQCFG.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|