wyrm-mcp 9.4.0 → 9.4.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readFileSync as
|
|
1
|
+
import{readFileSync as r}from"node:fs";const a=new RegExp("[!-/:-@[-`{-~]|\\p{P}","u"),h=/[\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF\u{20000}-\u{2A6DF}\u{2A700}-\u{2B73F}\u{2B740}-\u{2B81F}\u{2B820}-\u{2CEAF}\u{2F800}-\u{2FA1F}]/u,l=/[\u0000\uFFFD]|(?![\t\n\r])[\p{Cc}\p{Cf}]/u;class c{vocab;lowercase;maxTokens;unk;cls;sep;constructor(o,e){this.vocab=new Map(Object.entries(o)),this.lowercase=e?.lowercase??!0,this.maxTokens=e?.maxTokens??2048,this.unk=this.vocab.get("[UNK]"),this.cls=this.vocab.get("[CLS]"),this.sep=this.vocab.get("[SEP]")}static fromTokenizerJson(o){const e=JSON.parse(r(o,"utf8")),t=e.normalizer;return new c(e.model.vocab,{lowercase:t?.lowercase??!0})}words(o){let e="";for(const n of o)l.test(n)||(e+=/\s/.test(n)?" ":n);this.lowercase&&(e=e.toLowerCase().normalize("NFD").replace(new RegExp("\\p{Mn}","gu"),""));const t=[];let s="";for(const n of e){if(n===" "){s&&(t.push(s),s="");continue}if(h.test(n)||a.test(n)){s&&(t.push(s),s=""),t.push(n);continue}s+=n}return s&&t.push(s),t}wordpiece(o){if(o.length>100)return[this.unk];const e=[];let t=0;for(;t<o.length;){let s=o.length,n;for(;s>t;){const u=(t>0?"##":"")+o.slice(t,s),i=this.vocab.get(u);if(i!==void 0){n=i;break}s--}if(n===void 0)return[this.unk];e.push(n),t=s}return e}encode(o){const e=[];for(const s of this.words(o))e.push(...this.wordpiece(s));const t=[this.cls,...e.slice(0,this.maxTokens-2),this.sep];return{ids:t,attentionMask:t.map(()=>1)}}}export{c as WordPieceTokenizer};
|
package/dist/tool-manifest.json
CHANGED
package/dist/wyrm-manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wyrm-mcp",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.1",
|
|
4
4
|
"mcpName": "lk.ghosts/wyrm",
|
|
5
5
|
"description": "Local-first persistent memory for AI agents over MCP. Ground truths, a failure firewall that blocks repeated mistakes (negative learning), and hybrid recall, stored in SQLite on your machine. No cloud or LLM required. Proprietary license.",
|
|
6
6
|
"type": "module",
|