@chatpanel/events 0.192.0 → 0.193.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/package.json +3 -1
- package/registries.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatpanel/events",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.193.0",
|
|
4
4
|
"description": "The canonical ChatPanel event-log and capability contracts — typed durable facts, clock-free deterministic linearization, schema upcasting, and the invariants the replay harness asserts. Pure, dependency-free ESM shared by the ChatPanel extension, gateway and bridge.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -107,6 +107,7 @@
|
|
|
107
107
|
"./reach.js": "./reach.js",
|
|
108
108
|
"./recipe-tool.js": "./recipe-tool.js",
|
|
109
109
|
"./recipe.js": "./recipe.js",
|
|
110
|
+
"./registries.js": "./registries.js",
|
|
110
111
|
"./response-language.js": "./response-language.js",
|
|
111
112
|
"./recruit.js": "./recruit.js",
|
|
112
113
|
"./record-list.js": "./record-list.js",
|
|
@@ -326,6 +327,7 @@
|
|
|
326
327
|
"queue.js",
|
|
327
328
|
"reach.js",
|
|
328
329
|
"recipe-tool.js",
|
|
330
|
+
"registries.js",
|
|
329
331
|
"recipe.js",
|
|
330
332
|
"response-language.js",
|
|
331
333
|
"recruit.js",
|
package/registries.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const p=Object.freeze({npm:"https://registry.npmjs.org",pypi:"https://pypi.org/simple",models:"https://huggingface.co",github:"https://api.github.com"}),a=Object.freeze(Object.keys(p));function h(r){const t=String(r??"").trim();if(!t)return"";let n;try{n=new URL(t)}catch{throw new Error(`registry: ${JSON.stringify(t)} is not a URL`)}if(n.protocol!=="https:"&&n.protocol!=="http:")throw new Error(`registry: ${n.protocol} is not http(s)`);if(n.username||n.password)throw new Error("registry: put credentials in your package manager's own config, not here");return`${n.origin}${n.pathname.replace(/\/+$/,"")}`}function u(r={}){const t={};for(const n of a){if(!(n in(r||{})))continue;const e=h(r[n]);e&&(t[n]=e)}return t}function f(r,t={}){if(!a.includes(r))throw new Error(`registry: unknown kind ${JSON.stringify(r)}`);return t&&t[r]||p[r]}function m(r={}){return a.some(t=>r?.[t]&&r[t]!==p[t])}function y(r,t,n={}){const e=f(r,n),i=p[r];if(e===i)return String(t);let o;try{o=new URL(String(t))}catch{return String(t)}const s=new URL(i);if(o.origin!==s.origin)return String(t);const c=o.pathname.startsWith(s.pathname)?o.pathname.slice(s.pathname.length):o.pathname;return`${e}${c.startsWith("/")?"":"/"}${c}${o.search}`}function l(r={},t={}){const n={...t},e=(c,g)=>{g&&(n[c]=g)},i=r?.npm,o=r?.pypi,s=r?.models;return e("npm_config_registry",i),e("NPM_CONFIG_REGISTRY",i),e("UV_INDEX_URL",o),e("PIP_INDEX_URL",o),e("HF_ENDPOINT",s),n}export{p as DEFAULT_REGISTRIES,a as REGISTRY_KINDS,m as hasOverrides,y as mirrorUrl,u as normalizeRegistries,l as registryEnv,f as registryFor,h as validRegistry};
|