manifest 5.33.9 → 5.33.10
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/index.js +7 -6
- package/dist/openclaw.plugin.json +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/* manifest-local — OpenClaw Self-Hosted LLM Router */
|
|
2
|
-
"use strict";var r=require("fs"),
|
|
3
|
-
Error: ${
|
|
4
|
-
This is a packaging error \u2014 please reinstall the manifest plugin.`);return}
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"use strict";var r=require("fs"),l=require("path"),w=require("os"),S=require("crypto");var g=require("fs");function u(n){if(!(0,g.existsSync)(n))return{};try{let s=JSON.parse((0,g.readFileSync)(n,"utf-8"));return s&&typeof s=="object"&&!Array.isArray(s)?s:{}}catch{return{}}}var b="mnfst_",y=(0,l.join)((0,w.homedir)(),".openclaw","manifest"),m=(0,l.join)(y,"config.json"),v=(0,l.join)((0,w.homedir)(),".openclaw"),k=(0,l.join)(v,"openclaw.json"),P=3e3;function j(){(0,r.existsSync)(y)||(0,r.mkdirSync)(y,{recursive:!0,mode:448})}function E(){if(j(),(0,r.existsSync)(m)){let t=u(m);if(t.apiKey&&t.apiKey.startsWith(b))return t.apiKey}let n=`${b}local_${(0,S.randomBytes)(24).toString("hex")}`,s=u(m);return(0,r.writeFileSync)(m,JSON.stringify({...s,apiKey:n},null,2),{mode:384}),n}function h(n,s){let t=(0,l.dirname)(n);(0,r.existsSync)(t)||(0,r.mkdirSync)(t,{recursive:!0,mode:448});let i=`${n}.tmp.${process.pid}`;(0,r.writeFileSync)(i,JSON.stringify(s,null,2),{mode:384}),(0,r.renameSync)(i,n)}function x(n,s,t,i){let f={baseUrl:s,api:"openai-completions",apiKey:t,models:[{id:"auto",name:"auto"}]};try{let e=u(k);e.models||(e.models={}),e.models.providers||(e.models.providers={}),e.models.providers.manifest=f,e.agents||(e.agents={}),e.agents.defaults||(e.agents.defaults={}),e.agents.defaults.models||(e.agents.defaults.models={});let o=e.agents.defaults.models;Array.isArray(o)?o.includes("manifest/auto")||o.push("manifest/auto"):typeof o=="object"&&("manifest/auto"in o||(o["manifest/auto"]={})),h(k,e),i.debug("[manifest] Wrote provider config to openclaw.json")}catch(e){let o=e instanceof Error?e.message:String(e);i.debug(`[manifest] Could not write openclaw.json: ${o}`)}try{let e=(0,l.join)(v,"agents");if((0,r.existsSync)(e)){let o=(0,r.readdirSync)(e,{withFileTypes:!0}).filter(a=>a.isDirectory());for(let a of o){let c=(0,l.join)(e,a.name,"agent","models.json");if(!(0,r.existsSync)(c))continue;let d=u(c);d.providers?.manifest&&(delete d.providers.manifest,h(c,d))}}}catch{}try{if(n.config){n.config.models||(n.config.models={}),n.config.models.providers||(n.config.models.providers={}),n.config.models.providers.manifest=f,n.config.agents||(n.config.agents={}),n.config.agents.defaults||(n.config.agents.defaults={}),n.config.agents.defaults.models||(n.config.agents.defaults.models={});let e=n.config.agents.defaults.models;Array.isArray(e)?e.includes("manifest/auto")||e.push("manifest/auto"):typeof e=="object"&&("manifest/auto"in e||(e["manifest/auto"]={}))}}catch{}}function A(n,s){let t=(0,l.join)(v,"agents");if(!(0,r.existsSync)(t))return;let i={type:"api_key",provider:"manifest",key:n};try{let f=(0,r.readdirSync)(t,{withFileTypes:!0}).filter(e=>e.isDirectory());for(let e of f){let o=(0,l.join)(t,e.name,"agent","auth-profiles.json");if(!(0,r.existsSync)((0,l.dirname)(o)))continue;let a=u(o);a.version||(a.version=1),a.profiles||(a.profiles={});let c=a.profiles["manifest:default"];c&&c.key===n||(a.profiles["manifest:default"]=i,h(o,a))}}catch(f){let e=f instanceof Error?f.message:String(f);s.debug(`[manifest] Auth profile injection error: ${e}`)}}async function p(n,s){try{let t=await fetch(`http://${n}:${s}/api/v1/health`,{signal:AbortSignal.timeout(P)});if(!t.ok)return!1;let i=await t.json();return i!==null&&typeof i=="object"&&"status"in i&&i.status==="healthy"}catch{return!1}}function $(n,s,t,i){let f=E(),e=(0,l.join)(y,"manifest.db");i.debug("[manifest] Starting embedded server..."),x(n,`http://${t}:${s}/v1`,f,i),A(f,i);let o;try{o=require("./server")}catch(a){let c=a instanceof Error?a.message:String(a);i.error(`[manifest] Failed to load embedded server.
|
|
3
|
+
Error: ${c}
|
|
4
|
+
This is a packaging error \u2014 please reinstall the manifest plugin.`);return}n.registerService({id:"manifest",start:async()=>{if(i.debug("[manifest] Service start callback invoked"),await p(t,s)){i.info(`[manifest] Reusing existing server at http://${t}:${s}`);return}try{await o.start({port:s,host:t,dbPath:e,quiet:!0}),await p(t,s)?(i.info(`[manifest] Dashboard -> http://${t}:${s}`),i.info(`[manifest] DB: ${e}`)):(i.warn??i.info)(`[manifest] Server started but health check failed.
|
|
5
|
+
The dashboard may not be accessible at http://${t}:${s}`)}catch(c){let d=c instanceof Error?c.message:String(c);d.includes("EADDRINUSE")||d.includes("address already in use")?await p(t,s)?i.info(`[manifest] Reusing existing server at http://${t}:${s}`):i.error(`[manifest] Port ${s} is already in use by another process.
|
|
6
|
+
Change it with: openclaw config set plugins.entries.manifest.config.port ${s+1}
|
|
7
|
+
Then restart the gateway.`):i.error(`[manifest] Failed to start local server: ${d}
|
|
7
8
|
Try reinstalling: openclaw plugins install manifest
|
|
8
|
-
Then restart: openclaw gateway restart`)}}})}module.exports={id:"manifest",name:"Manifest \u2014 Self-Hosted LLM Router",register(n){let
|
|
9
|
+
Then restart: openclaw gateway restart`)}}})}module.exports={id:"manifest",name:"Manifest \u2014 Self-Hosted LLM Router",register(n){let s=n.logger||{info:(...o)=>console.log(...o),debug:()=>{},error:(...o)=>console.error(...o),warn:(...o)=>console.warn(...o)},t=n.pluginConfig||{},i=t&&typeof t=="object"&&"config"in t&&t.config!=null&&typeof t.config=="object"?t.config:t,f=typeof i.port=="number"&&i.port>0?i.port:2099,e=typeof i.host=="string"&&i.host.length>0?i.host:"127.0.0.1";$(n,f,e,s)}};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "manifest",
|
|
3
3
|
"name": "Manifest — Self-Hosted LLM Router",
|
|
4
|
-
"version": "5.33.
|
|
4
|
+
"version": "5.33.10",
|
|
5
5
|
"description": "Run the Manifest LLM router locally with SQLite. Zero-config dashboard included.",
|
|
6
6
|
"author": "MNFST Inc.",
|
|
7
7
|
"homepage": "https://manifest.build",
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "manifest",
|
|
3
3
|
"name": "Manifest — Self-Hosted LLM Router",
|
|
4
|
-
"version": "5.33.
|
|
4
|
+
"version": "5.33.10",
|
|
5
5
|
"description": "Run the Manifest LLM router locally with SQLite. Zero-config dashboard included.",
|
|
6
6
|
"author": "MNFST Inc.",
|
|
7
7
|
"homepage": "https://manifest.build",
|