@chatpanel/gateway 0.99.0 → 0.103.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/native/darwin-arm64/chatpanel-apple-model +0 -0
- package/package.json +3 -3
- package/src/agent.js +1 -3
- package/src/budget.js +1 -1
- package/src/capability-adapters.js +1 -1
- package/src/capability-embedded.js +1 -1
- package/src/capability-endpoints.js +1 -1
- package/src/capability-providers.js +1 -3
- package/src/capability-proxy.js +1 -1
- package/src/capability-tools.js +1 -3
- package/src/cloudevents.js +1 -4
- package/src/config.js +1 -1
- package/src/coreml-stt-engine.js +3 -0
- package/src/cross-encoder.js +1 -1
- package/src/diarize-engine.js +1 -1
- package/src/embedded-models.js +1 -1
- package/src/embedder.js +1 -0
- package/src/engine-pacer.js +1 -1
- package/src/engine.js +1 -1
- package/src/event-stats.js +1 -1
- package/src/event-sync.js +1 -1
- package/src/event.js +1 -1
- package/src/extract/handler.js +1 -1
- package/src/extract-capability.js +1 -5
- package/src/extraction.js +1 -4
- package/src/gate.js +1 -1
- package/src/inference-lane.js +1 -0
- package/src/job.js +1 -5
- package/src/kb-store.js +4 -0
- package/src/kb.js +2 -0
- package/src/knowledge.js +1 -3
- package/src/mcp.js +23 -20
- package/src/memory.js +1 -2
- package/src/model-ledger.js +1 -1
- package/src/ner-engine.js +1 -1
- package/src/observability.js +1 -1
- package/src/openai.js +2 -2
- package/src/order.js +1 -1
- package/src/project.js +1 -1
- package/src/providers.js +1 -1
- package/src/read-document.js +1 -10
- package/src/recruit.js +1 -4
- package/src/ref.js +1 -1
- package/src/rrf.js +1 -1
- package/src/scorecard.js +1 -1
- package/src/search-api.js +1 -1
- package/src/search-outcome.js +1 -1
- package/src/search-searxng.js +1 -1
- package/src/segment-engine.js +1 -0
- package/src/serp-anchors.js +1 -1
- package/src/server.js +32 -32
- package/src/site-policy.js +1 -1
- package/src/structured.js +1 -4
- package/src/stt-engine.js +1 -1
- package/src/stt-models.js +1 -1
- package/src/subject-kinds.js +1 -1
- package/src/subject-name.js +1 -1
- package/src/team-board.js +1 -6
- package/src/team-record.js +1 -1
- package/src/team.js +1 -1
- package/src/version.js +1 -1
- package/src/web-search-tool.js +1 -19
- package/src/web-search.js +1 -1
package/src/search-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export*from"@chatpanel/events/search-api.js";
|
package/src/search-outcome.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export*from"@chatpanel/events/search-outcome.js";
|
package/src/search-searxng.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export*from"@chatpanel/events/search-searxng.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{existsSync as $,readdirSync as D}from"node:fs";import{join as S}from"node:path";import{ensureLib as T,modelRoot as P,withModelSource as R}from"./ner-engine.js";import{runtimeDtype as x}from"./model-runtime.js";import{makeWarmTimer as M}from"./warm-timer.js";const A="onnx-community/pyannote-segmentation-3.0",N=6,O=16e3;let r="off",g=A,u=null,d=null,a=null,m=null,s=null,o=null,_=0,p=0,w=null;function B(){return g}function U(){return r}function h(){return r==="ready"&&!!u&&!!d}function W(){return s}function X(){return{configured:r!=="off",ok:h(),state:r,model:g,loaded:!!u,error:a,warmMs:o?.warmMs??null}}function y(){return _>0||p>0||r==="loading"||r==="downloading"}function H(){p++,o?.disarm()}function J(){p=Math.max(0,p-1),p===0&&_===0&&h()&&o?.arm()}async function b({log:e=()=>{}}={}){if(y())return!1;o?.disarm();const n=u;if(u=null,d=null,w=null,m=null,s=null,a=null,r="off",n){try{await n.dispose?.()}catch{}e("[segment] idle — model unloaded (reloads on the next diarizing session)")}return!0}function v(e=g,n=x()){const l=S(P(),...e.split("/"),"onnx");if(!$(l))return!1;const t=n==="fp32"?"":n==="q8"?"_quantized":`_${n}`;try{return D(l).some(f=>f===`model${t}.onnx`)}catch{return!1}}async function z({log:e=()=>{},allowDownload:n=!0}={}){let l;try{l=await T()}catch(i){return r="error",a=i.message,e(`[segment] engine unavailable (${i.message})`),!1}if(!l.AutoModelForAudioFrameClassification)return r="error",a="this transformers.js has no audio frame classification",e(`[segment] ${a}`),!1;const t=g,f=v(t);if(!f&&!n)return r="error",a="model not on disk and downloads disabled",!1;r=f?"loading":"downloading",f||(s={model:t,file:null,pct:0},e(`[segment] downloading ${t} (one-time)…`));try{const i=c=>{if(!c)return;const L=typeof c.progress=="number"?Math.round(c.progress):s?.pct??0;(c.status==="progress"||c.status==="download"||c.status==="initiate")&&(s={model:t,file:c.file||s?.file||null,pct:L})},{processor:k,model:E}=await R({host:f?null:"https://huggingface.co/",allowRemote:!f},async()=>({processor:await l.AutoProcessor.from_pretrained(t,{progress_callback:i}),model:await l.AutoModelForAudioFrameClassification.from_pretrained(t,{dtype:x(),progress_callback:i})}));return d=k,u=E,r="ready",a=null,s=null,e(`[segment] ready — ${t} @ ${x()} (speaker turns inside a segment)`),!0}catch(i){return a=i.message,s=null,r="error",e(`[segment] load failed (${i.message}) — one speaker per segment, as before`),!1}}function F(e){return e.then(n=>(n&&!y()&&o?.arm(),n))}function K(e={}){if(m&&r!=="error")return m;r="loading";const n=typeof e.onLog=="function"?e.onLog:()=>{};return o=M({warmMs:e.warmMs,busy:y,log:n,unload:()=>b({log:n})}),m=F(z({log:n,allowDownload:e.allowDownload!==!1})),m}async function Q(e){if(!h()||!(e instanceof Float32Array)||e.length<O/2)return null;_++;try{if(w)return await w(e);const n=await d(e),{logits:l}=await u(n),t=d.post_process_speaker_diarization(l,e.length);return Array.isArray(t?.[0])?t[0]:null}catch{return null}finally{_--,y()||o?.arm()}}function V(){o?.disarm(),o=null,p=0,_=0,r="off",g=A,u=null,d=null,a=null,m=null,s=null}function Y(e,{warmMs:n=null}={}){w=e||null,u=e?{dispose:async()=>{}}:null,d=e?{}:null,r=e?"ready":"off",n!==null&&(o=M({warmMs:n,busy:y,unload:()=>b()}),e&&o.arm())}export{A as DEFAULT_SEGMENT_MODEL,O as SAMPLE_RATE,N as SEGMENT_MODEL_APPROX_MB,V as _reset,Y as _setForTest,B as activeModel,X as health,K as init,h as isReady,v as modelOnDisk,W as progress,J as release,H as retain,Q as spans,U as state,b as unload};
|
package/src/serp-anchors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export*from"@chatpanel/events/serp-anchors.js";
|