@vibgrate/haile 2026.903.4 → 2026.908.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.
- package/README.md +2 -2
- package/dist/engine/haile.wasm +0 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ import { createHaileProvider } from "@vibgrate/haile";
|
|
|
24
24
|
const kernel = createHaileProvider();
|
|
25
25
|
// null when dist/engine/haile.wasm is missing — never a dummy provider.
|
|
26
26
|
kernel?.version();
|
|
27
|
-
// "haile-fast/2026.903.
|
|
27
|
+
// "haile-fast/2026.903.5" (or the version string the wasm exports)
|
|
28
28
|
kernel?.classify({
|
|
29
29
|
name: "CreateUser",
|
|
30
30
|
path: "src/controllers/UsersController.cs",
|
|
@@ -36,7 +36,7 @@ kernel?.classify({
|
|
|
36
36
|
|
|
37
37
|
The host CLI auto-provisions this module (silently, on every run; declinable)
|
|
38
38
|
and loads it through its generic provider seam (default module path or
|
|
39
|
-
`VIBGRATE_HAILE_PATH`), sanitises every result at its own trust boundary, and
|
|
39
|
+
`VIBGRATE_ARCH_PATH`; `VIBGRATE_HAILE_PATH` is still read as an alias), sanitises every result at its own trust boundary, and
|
|
40
40
|
omits architecture lines when the module is absent or `VIBGRATE_NO_KERNEL=1`
|
|
41
41
|
is set. It never falls back to a TypeScript lexicon.
|
|
42
42
|
|
package/dist/engine/haile.wasm
CHANGED
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -102,7 +102,7 @@ interface HaileProvider {
|
|
|
102
102
|
declare const HAILE_MAGIC = "vg.haile.v1";
|
|
103
103
|
declare const HAILE_TAXONOMY = "haile.taxonomy.v1";
|
|
104
104
|
declare const HAILE_IR = "haile.ir.v1";
|
|
105
|
-
declare const HAILE_ENGINE_VERSION = "haile-fast/2026.903.
|
|
105
|
+
declare const HAILE_ENGINE_VERSION = "haile-fast/2026.903.5";
|
|
106
106
|
declare const DEFAULT_PROFILE: HaileProfile;
|
|
107
107
|
declare const DEFAULT_SYMBOL_CAP = 8000;
|
|
108
108
|
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{pathToFileURL as ne}from"node:url";import*as y from"node:fs";import*as v from"node:path";var b=["hexagonal-v1","layered-v1"],H="hexagonal-v1",x="vg.haile.v1",w="haile.taxonomy.v1",A="haile.ir.v1",g="haile-fast/2026.903.
|
|
1
|
+
import{pathToFileURL as ne}from"node:url";import*as y from"node:fs";import*as v from"node:path";var b=["hexagonal-v1","layered-v1"],H="hexagonal-v1",x="vg.haile.v1",w="haile.taxonomy.v1",A="haile.ir.v1",g="haile-fast/2026.903.5",I="balanced",P=8e3,O=new Set(["function","method","route","test","component","job"]);var F=240,W=400,D=16,M=32,U=new Set(["public","private","protected","internal","static","async","override","virtual","abstract","final","def","fn","function","func","sub","pub","export","const","let","var","new","sealed","extern","unsafe","readonly","partial","default","synchronized","native","inline","constexpr","friend","explicit","operator","suspend","open","lateinit","get","set"]);function R(r){return O.has(r)}function K(r){switch(r){case"method":return"method";case"route":return"route";case"test":return"test";case"job":return"job";case"component":return"handler";default:return"function"}}function q(r,t=""){let i=t?r.indexOf(`${t}(`):-1;if(i<0&&(r.startsWith("@")||r.startsWith("[")))return[];let s=i>=0?i+t.length:r.indexOf("("),f=r.lastIndexOf(")");if(s<0||f<=s)return[];let n=r.slice(s+1,f).trim();return!n||n==="void"?[]:n.split(",").map(e=>e.trim()).filter(Boolean).slice(0,16).map(e=>{let o=e.replace(/\b(const|mut|ref|public|private|protected|readonly|final)\b/g,"").trim();if(o.includes(":")){let[l,p]=o.split(":").map(d=>d.trim());return{name:l||"arg",type_name:p||void 0}}let a=o.split(/\s+/);return a.length>=2?{name:a[a.length-1],type_name:a[0]}:{name:o}})}function $(r,t){let i=r.lastIndexOf("->");if(i>=0)return r.slice(i+2).replace(/[{;].*$/,"").trim()||void 0;let s=r.lastIndexOf(":"),f=r.lastIndexOf(")");if(s>f&&f>=0)return r.slice(s+1).replace(/[{;].*$/,"").replace(/\s*=>.*$/,"").trim()||void 0;let n=t?r.indexOf(`${t}(`):-1;if(n>0){let e=r.slice(0,n).trim(),o=0,a=0;for(let p=e.length-1;p>=0;p--){let d=e[p];if(d===">"||d==="]"||d===")")o++;else if(d==="<"||d==="["||d==="(")o--;else if(/\s/.test(d)&&o===0){a=p+1;break}}let l=e.slice(a).trim();if(l&&!l.startsWith("@")&&!l.startsWith("[")&&!U.has(l)&&l!=="void"&&!l.endsWith(")")&&!l.endsWith("]"))return l}}function j(r,t,i,s){let f=[],n=[],e=new Set,o=new Set;for(let a of t){if(a.src!==r||a.kind!=="call"&&a.kind!=="references")continue;let l=i.get(a.dst);if(!l)continue;let p=l.qualifiedName||l.name;if(!(!p||e.has(p))&&(e.add(p),f.push(p),l.file&&l.file!==s&&!o.has(l.file)&&n.length<D&&(o.add(l.file),n.push(l.file)),f.length>=24))break}return{calls:f,calleePaths:n}}function B(r,t,i){let s=new Map;for(let n of r)(n.kind==="file"||n.kind==="module")&&s.set(n.id,n.file);let f=new Map;for(let n of t){if(n.kind!=="import")continue;let e=s.get(n.src);if(!e)continue;let o=i.get(n.dst),a=o?.qualifiedName||o?.name;if(!a)continue;let l=f.get(e);l||(l=[],f.set(e,l)),l.length<M&&!l.includes(a)&&l.push(a)}return f}function L(r){let t=r.nodes??[],i=r.edges??[],s=new Map;for(let e of t)s.set(e.id,e);let f=B(t,i,s),n=[];for(let e of t){if(!R(e.kind))continue;let o=typeof e.decorators=="string"?e.decorators.trim():"",a=`${o?`${o} `:""}${e.signature??""}`.slice(0,W),{calls:l,calleePaths:p}=j(e.id,i,s,e.file),d=typeof e.doc=="string"?e.doc.trim().slice(0,F):"";n.push({node_id:e.id,file_path:e.file,name:e.name,qualified_name:e.qualifiedName||e.name,symbol_kind:K(e.kind),language:e.lang??"",signature:a,calls:l,parameters:q(a,e.name),return_type:$(a,e.name),...d?{doc:d}:{},callee_paths:p,imports:f.get(e.file)??[],...e.effects&&typeof e.effects=="object"?{effects:e.effects}:{},...Array.isArray(e.duties)?{duties:e.duties.slice(0,48)}:{}})}return n.sort((e,o)=>e.node_id<o.node_id?-1:e.node_id>o.node_id?1:0),n}import*as _ from"node:fs";import{fileURLToPath as Y}from"node:url";var m;function J(){return[new URL("./engine/haile.wasm",import.meta.url),new URL("../engine/haile.wasm",import.meta.url),new URL("../crate/target/wasm32-unknown-unknown/release/vibgrate_haile_kernel.wasm",import.meta.url)].map(r=>Y(r))}function V(r){try{let t=new WebAssembly.Module(r),s=new WebAssembly.Instance(t,{}).exports;if(typeof s.vg_alloc!="function"||typeof s.vg_free!="function"||typeof s.vg_version!="function"||typeof s.vg_classify!="function"||!s.memory)return null;let f=e=>{let o=new TextEncoder().encode(e),a=s.vg_alloc(o.length);return new Uint8Array(s.memory.buffer,a,o.length).set(o),{ptr:a,len:o.length}},n=e=>{if(!e)return"";let o=new DataView(s.memory.buffer,e,4).getUint32(0,!0),a=new TextDecoder().decode(new Uint8Array(s.memory.buffer,e+4,o));return s.vg_free(e,4+o),a};return{version:()=>{try{return n(s.vg_version())||g}catch{return g}},classifyJson:e=>{let o=JSON.stringify({name:e.name??"",path:e.path??"",symbolKind:e.symbolKind??"function",fileKind:e.fileKind??"source",calls:e.calls??[],types:e.types??[],idents:e.idents??[],profile:e.profile??"balanced",policy:e.policy??"hexagonal-v1",qualifiedName:e.qualifiedName??"",doc:e.doc??"",signature:e.signature??"",params:e.params??[],returnType:e.returnType??"",calleePaths:e.calleePaths??[],imports:e.imports??[],astRole:e.astRole??"",effects:e.effects??{},duties:e.duties??[]}),{ptr:a,len:l}=f(o);try{return n(s.vg_classify(a,l))}finally{s.vg_free(a,l)}}}}catch{return null}}function E(){if(m!==void 0)return m;m=null;try{let r=J().find(t=>_.existsSync(t));return r&&(m=V(_.readFileSync(r))),m}catch{return m=null,m}}function X(){m=void 0}function T(r){return Array.isArray(r)?r.filter(t=>typeof t=="string"):[]}function z(r){if(!r)return null;try{let t=JSON.parse(r);if(!t||typeof t!="object")return null;let i=t.role&&typeof t.role=="object"?t.role:t,s=typeof i.primary=="string"?i.primary:"";if(!s)return null;let f=t.intent&&typeof t.intent=="object"?t.intent:{};return{primary:s,confidence:typeof i.confidence=="number"?i.confidence:0,band:typeof i.band=="string"?i.band:"abstain",alternatives:Array.isArray(i.alternatives)?i.alternatives.filter(n=>typeof n?.role=="string").map(n=>({role:n.role,confidence:typeof n.confidence=="number"?n.confidence:0})):[],purposes:Array.isArray(t.purposes)?t.purposes.filter(n=>typeof n?.purpose=="string").map(n=>({purpose:n.purpose,confidence:typeof n.confidence=="number"?n.confidence:0})):[],intent:{text:typeof f.text=="string"?f.text:"",verbs:T(f.verbs),objects:T(f.objects)},findings:Array.isArray(t.findings)?t.findings.filter(n=>typeof n?.rule=="string"&&typeof n?.message=="string").map(n=>({rule:n.rule,severity:typeof n.severity=="string"?n.severity:"warn",message:n.message,...typeof n.line=="number"&&Number.isFinite(n.line)&&n.line>0?{line:Math.floor(n.line)}:{}})).slice(0,8):[],evidence:Array.isArray(t.evidence)?t.evidence.filter(n=>typeof n?.kind=="string"&&typeof n?.signal=="string").map(n=>({kind:n.kind,signal:n.signal,weight:typeof n.weight=="number"?n.weight:0})):[]}}catch{return null}}function k(r){let t=r===void 0?E():r;return t?{version:()=>t.version(),classify:i=>{try{return z(t.classifyJson(i))}catch{return null}}}:null}var Q=new Set(["strict","balanced","exploratory"]),Z=new Set(b);function C(r,t){let i=r.indexOf(t);if(!(i<0||i+1>=r.length))return r[i+1]}function ee(){return new Promise((r,t)=>{let i=[];process.stdin.on("data",s=>i.push(Buffer.from(s))),process.stdin.on("end",()=>r(Buffer.concat(i).toString("utf8"))),process.stdin.on("error",t)})}async function S(r=process.argv.slice(2),t={}){if(r[0]!=="sidecar")return process.stderr.write(`usage: node index.js sidecar --stdin --out <file> --profile <strict|balanced|exploratory> [--policy <hexagonal-v1|layered-v1>]
|
|
2
2
|
`),1;if(!r.includes("--stdin"))return process.stderr.write(`sidecar requires --stdin
|
|
3
3
|
`),1;let i=C(r,"--out");if(!i)return process.stderr.write(`sidecar requires --out <file>
|
|
4
4
|
`),1;let s=C(r,"--profile")??I;if(!Q.has(s))return process.stderr.write(`invalid --profile ${s}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibgrate/haile",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.908.1",
|
|
4
4
|
"description": "Vibgrate HAILE architecture kernel: deterministic callable classification (role, purposes, intent, band) over a vg-graph. Proprietary distribution — compiled WASM engine plus a minified loader; the taxonomy is not included.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"test": "vitest run"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@types/node": "^26.
|
|
27
|
-
"esbuild": "^0.
|
|
26
|
+
"@types/node": "^26.4.1",
|
|
27
|
+
"esbuild": "^0.28.2",
|
|
28
28
|
"tsup": "^8.0.0",
|
|
29
29
|
"typescript": "^5.4.0",
|
|
30
|
-
"vitest": "^
|
|
30
|
+
"vitest": "^5.0.0"
|
|
31
31
|
},
|
|
32
32
|
"engines": {
|
|
33
33
|
"node": ">=22.0.0"
|