@urun-sh/openai 0.6.16 → 0.6.18
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/chunk-3U7YQ7LE.js +62 -0
- package/dist/chunk-MLJ66LPI.js +1 -0
- package/dist/chunk-NYSZ3RGB.js +4 -0
- package/dist/chunk-O4TKY7NE.js +7 -0
- package/dist/hosted/bin.cjs +31 -31
- package/dist/hosted/bin.js +1 -1
- package/dist/hosted/index.cjs +31 -31
- package/dist/hosted/index.d.cts +1 -1
- package/dist/hosted/index.d.ts +1 -1
- package/dist/hosted/index.js +1 -1
- package/dist/pi-extension/index.cjs +7 -7
- package/dist/pi-extension/index.js +1 -1
- package/dist/pi-extension/standalone.cjs +46 -46
- package/dist/proxy/cli.cjs +38 -38
- package/dist/proxy/cli.js +1 -1
- package/dist/proxy/index.cjs +25 -25
- package/dist/proxy/index.d.cts +89 -5
- package/dist/proxy/index.d.ts +18 -4
- package/dist/proxy/index.js +1 -1
- package/dist/{responses-turn-vMefRdgJ.d.cts → responses-turn-B91w2YKn.d.cts} +147 -26
- package/dist/{responses-turn-EwxfRJJg.d.ts → responses-turn-FcEDaymF.d.ts} +24 -12
- package/package.json +2 -2
- package/dist/chunk-2PIYH7O7.js +0 -62
- package/dist/chunk-5PZ6OVEK.js +0 -7
- package/dist/chunk-TMQJY56F.js +0 -4
- package/dist/chunk-VRCCLQ5P.js +0 -1
package/dist/proxy/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as q,b as Y}from"../chunk-
|
|
2
|
+
import{a as q,b as Y}from"../chunk-MLJ66LPI.js";import"../chunk-K23AZPI4.js";import{A as M,R as F,T as J,f as h,g as U,h as $,i as C,j as N,k as L,l as I,m as O,n as x,o as G,p as m,r as _,s as P,t as D,u as W,v as A,w as B,x as v,y as K,z as j}from"../chunk-3U7YQ7LE.js";import"../chunk-76BZLCGT.js";import"../chunk-NYSZ3RGB.js";import"../chunk-3JWYIKHM.js";import{g as T}from"../chunk-6M5JK4YC.js";import"../chunk-7V2JKPIG.js";import{c as w}from"../chunk-YSFSRI3D.js";w();import{spawn as X}from"child_process";import{appendFileSync as k,createWriteStream as ue,existsSync as ce,mkdirSync as Z}from"fs";import ee from"path";import t from"process";w();import{ensureNodeWebRTC as se,nodeWebRTCUnavailableReason as ae}from"@urun-sh/core/internal";var le={ensureWebRTC:se,webrtcUnavailableReason:ae,audioBackend:T};async function H(e=le){try{await e.ensureWebRTC()}catch(r){return{ok:!1,reason:`the WebRTC bootstrap threw: ${String(r)}`}}let o=e.webrtcUnavailableReason();if(o)return{ok:!1,reason:`${o} \u2014 this artifact would join every session doc/KV-only and every token stream would error. Either "werift" is missing from the deployment directory (npm lane), or it was marked --external in a single-file build, where nothing can ever resolve it (bunfs: "Cannot find package 'werift' from '/$bunfs/root/\u2026'").`};try{(await e.audioBackend()).createSource()}catch(r){return{ok:!1,reason:`the werift/opus audio backend could not be constructed: ${String(r)}`}}return{ok:!0,reason:null}}function de(e,o){let r=(e.URUN_CATALOG_URL??"").trim(),u=r?_(r,"URUN_CATALOG_URL"):"",i=(e.URUN_CATALOG_ANON_KEY??"").trim();return!u||!i?(o(`urun compat: catalog oracle off (URUN_CATALOG_URL/URUN_CATALOG_ANON_KEY unset) \u2014 an undeployed uRun CATALOG model name falls through to the default app instead of a loud 404; deployed apps still resolve exactly, and /stats.models records every mapping
|
|
3
3
|
`),null):{catalogUrl:u,anonKey:i}}function pe(e){return q({baseUrl:e.baseUrl,orgId:e.orgId,defaultApp:e.appId,fnName:e.fnName,apiUrl:e.apiUrl,auth:e.auth,catalog:de(t.env,o=>t.stderr.write(o)),statelessDirect:te(e)})}function te(e){return e.decisionSecret!==""&&e.auth.lane==="api-key"}function fe(e,o){if(te(e))return t.stderr.write(`urun compat: stateless direct path ENABLED (POST /v1/decision answered by the serving pods)
|
|
4
4
|
`),new F({targetFor:r=>o.targetFor(r),apiUrl:e.apiUrl,fnName:e.fnName,apiKey:e.auth.apiKey,orgId:e.orgId,secret:e.decisionSecret})}async function V(e,o,r){let u=X(e,o,{stdio:"inherit",env:r});return new Promise(i=>{u.once("exit",s=>i(s??1)),u.once("error",s=>{t.stderr.write(`failed to launch ${e}: ${String(s)}
|
|
5
5
|
`),i(127)})})}function z(){return I(t.env,import.meta.url,ce)}function re(e){for(let[o,r]of Object.entries(U(e)))t.stdout.write(`export ${o}=${r}
|