anyray-connect 0.11.202 → 0.11.203
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/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -316,7 +316,7 @@ Options:
|
|
|
316
316
|
of the table (listing only).
|
|
317
317
|
--help Show this help.
|
|
318
318
|
`,PG=e=>{let t={json:!1,help:!1};for(let n of e)n==="--help"||n==="-h"?t.help=!0:n==="--json"?t.json=!0:n.startsWith("-")?t.error=`unknown option: ${n}`:t.modelId?t.error=`unexpected argument: ${n}`:t.modelId=n;return t},DG=e=>{let t=se.find(n=>n.id===Go);if(!t)throw new Error("copilot-cli adapter missing from REGISTRY");return t.apply(e,{dryRun:!1,explicit:!0})},LG=e=>{let t=r=>r>=1e3?`${Math.round(r/1e3)}k`:String(r);return[...e.maxPromptTokens?[`${t(e.maxPromptTokens)} in`]:[],...e.maxOutputTokens?[`${t(e.maxOutputTokens)} out`]:[]].join(" / ")},NG=(e,t,n)=>`${e.origin.replace(/\/+$/,"")}/v1${Mi(t)}/${fr(n)==="responses"?"responses":"chat/completions"}`,WE=async(e=[],t={})=>{let n=PG(e);if(n.help)return process.stdout.write(FE),0;if(n.error)return D(n.error),process.stdout.write(FE),1;let r=await(t.loadTarget??Xe)();if(!r)return D("Not enrolled \u2014 run `anyray-connect` first."),1;let{target:o}=r,a=await(t.discoverSeatToken??xd)({allowKeychainPrompt:!0});if(!a.token)return D("No Copilot sign-in Connect can read \u2014 run `copilot` once and `/login` (say YES to storing credentials locally), then retry."),1;let s=a.token.token,i=a.capiSegment??"default",c=await(t.fetchCatalog??ja)(s,{},i,{laneOrigin:o.origin.replace(/\/+$/,""),...o.clientKey?{clientKey:o.clientKey}:{}}),l=oh(c);if(l.length===0)return D("Could not fetch your seat's model catalog from GitHub (offline, or the sign-in lost its Copilot seat)."),1;if(!n.modelId){let m=process.env.COPILOT_MODEL?.trim();if(n.json)return process.stdout.write(`${JSON.stringify({origin:o.origin,current:m??null,models:l.map(f=>({id:f.id,wire:fr(f.id),...f.maxPromptTokens?{maxPromptTokens:f.maxPromptTokens}:{},...f.maxOutputTokens?{maxOutputTokens:f.maxOutputTokens}:{}}))})}
|
|
319
|
-
`),0;C(J(`Copilot models your seat serves (via ${o.origin})`));for(let f of l){let h=f.id===m?"*":" ",w=LG(f);C(` ${h} ${f.id.padEnd(24)}${w?v(w):""}`)}return M("Switch the startup model: `anyray-connect models <id>` (per launch: `copilot --model <id>`)."),M("The CLI's own /models cannot list models on a custom provider \u2014 this list is the picker."),0}let d=l.find(m=>m.id===n.modelId);if(!d)return D(`'${n.modelId}' is not in your seat's catalog \u2014 run \`anyray-connect models\` to list it.`),1;let u=await(t.probeChat??Ed)(NG(o,i,d.id),{...rh(),authorization:`Bearer ${s}`,...o.clientKey?{"x-anyray-api-key":o.clientKey}:{}},d.id);if(u==="rejected")return D(`GitHub refuses chat as '${d.id}' for this sign-in (it is in the catalog, but chat entitlement is narrower). Pick another id from \`anyray-connect models\`.`),1;u==="unreachable"?P("Could not verify the model over the lane (offline?) \u2014 applying anyway."):B(`'${d.id}' answers on your lane.`);let p=process.env.ANYRAY_COPILOT_MODEL;process.env.ANYRAY_COPILOT_MODEL=d.id;try{let m=await(t.applyCopilotCli??DG)(o);if(m.status!=="configured"){for(let f of m.messages)C(f);return D("Apply did not complete \u2014 see above."),1}}finally{p===void 0?delete process.env.ANYRAY_COPILOT_MODEL:process.env.ANYRAY_COPILOT_MODEL=p}return B(`Copilot CLI startup model \u2192 ${d.id}`),M("Open a fresh terminal (or re-source your profile), then run `copilot`."),0};import{createReadStream as D1}from"node:fs";import{spawnSync as gx}from"node:child_process";import{createHash as L1}from"node:crypto";import{access as wx,chmod as pg,copyFile as N1,lstat as $1,mkdir as M1,mkdtemp as bx,readFile as zu,rename as B1,rm as fo,stat as F1,writeFile as W1}from"node:fs/promises";import{constants as Cx}from"node:fs";import{platform as As,tmpdir as U1}from"node:os";import{dirname as H1,isAbsolute as G1,join as Zu}from"node:path";import{z as Ve}from"zod";var Le="0.11.
|
|
319
|
+
`),0;C(J(`Copilot models your seat serves (via ${o.origin})`));for(let f of l){let h=f.id===m?"*":" ",w=LG(f);C(` ${h} ${f.id.padEnd(24)}${w?v(w):""}`)}return M("Switch the startup model: `anyray-connect models <id>` (per launch: `copilot --model <id>`)."),M("The CLI's own /models cannot list models on a custom provider \u2014 this list is the picker."),0}let d=l.find(m=>m.id===n.modelId);if(!d)return D(`'${n.modelId}' is not in your seat's catalog \u2014 run \`anyray-connect models\` to list it.`),1;let u=await(t.probeChat??Ed)(NG(o,i,d.id),{...rh(),authorization:`Bearer ${s}`,...o.clientKey?{"x-anyray-api-key":o.clientKey}:{}},d.id);if(u==="rejected")return D(`GitHub refuses chat as '${d.id}' for this sign-in (it is in the catalog, but chat entitlement is narrower). Pick another id from \`anyray-connect models\`.`),1;u==="unreachable"?P("Could not verify the model over the lane (offline?) \u2014 applying anyway."):B(`'${d.id}' answers on your lane.`);let p=process.env.ANYRAY_COPILOT_MODEL;process.env.ANYRAY_COPILOT_MODEL=d.id;try{let m=await(t.applyCopilotCli??DG)(o);if(m.status!=="configured"){for(let f of m.messages)C(f);return D("Apply did not complete \u2014 see above."),1}}finally{p===void 0?delete process.env.ANYRAY_COPILOT_MODEL:process.env.ANYRAY_COPILOT_MODEL=p}return B(`Copilot CLI startup model \u2192 ${d.id}`),M("Open a fresh terminal (or re-source your profile), then run `copilot`."),0};import{createReadStream as D1}from"node:fs";import{spawnSync as gx}from"node:child_process";import{createHash as L1}from"node:crypto";import{access as wx,chmod as pg,copyFile as N1,lstat as $1,mkdir as M1,mkdtemp as bx,readFile as zu,rename as B1,rm as fo,stat as F1,writeFile as W1}from"node:fs/promises";import{constants as Cx}from"node:fs";import{platform as As,tmpdir as U1}from"node:os";import{dirname as H1,isAbsolute as G1,join as Zu}from"node:path";import{z as Ve}from"zod";var Le="0.11.203";import{createWriteStream as r1}from"node:fs";import{spawnSync as ex}from"node:child_process";import{chmod as tx,copyFile as ng,lstat as rg,mkdir as og,readdir as Vu,realpath as Ku,rename as Uu,rm as Nt,stat as nx,symlink as o1,writeFile as a1}from"node:fs/promises";import{createHash as s1}from"node:crypto";import{basename as Hu,dirname as gn,join as ys}from"node:path";import{Readable as i1}from"node:stream";import{pipeline as c1}from"node:stream/promises";var $G=["hook_registration","mcp_registration","hook_binary","beacon_target"],sa=e=>e.status==="configured"||e.status==="queued",ia=async(e,t=se)=>{let n=new Set(e),r=[];for(let o of t)if(n.has(o.id))try{(await o.detect()).installed&&r.push(o)}catch{}return r},hs=async(e,t,n=se)=>{let r=[];for(let o of await ia(e,n))if(o.pointsAt)try{if(o.automaticRepairAllowed&&!await o.automaticRepairAllowed())continue;await o.pointsAt(t)||r.push(o)}catch{}return r},zy=async(e,t=se)=>{let n=[];for(let r of await ia(e,t))if(r.integrationStatus)try{n.push({adapter:r,checks:await r.integrationStatus()})}catch{n.push({adapter:r,checks:Object.fromEntries($G.map(o=>[o,"unreadable"]))})}return n},UE=e=>e.filter(t=>!t.integrationStatus),MG=e=>{let t=e?.code;return t==="EACCES"||t==="EPERM"||t==="EROFS"?"settings_not_writable":"apply_threw"},zt=async(e,t)=>{let n=[];for(let r of e)try{let o=await r.apply(t,{dryRun:!1});n.push({id:r.id,title:r.title,status:o.status,...o.errorClass?{errorClass:o.errorClass}:{}})}catch(o){let a=MG(o);if(r.classifyApplyError)try{a=r.classifyApplyError(o)}catch{}n.push({id:r.id,title:r.title,status:"failed",errorClass:a})}return n};import{constants as HE}from"node:fs";import{access as BG,chmod as FG,lstat as WG,mkdir as UG,open as HG,readFile as GG,realpath as KG,rm as VG,stat as KE,writeFile as jG}from"node:fs/promises";import{randomUUID as YG}from"node:crypto";import{platform as Qy}from"node:os";import{dirname as ZG,join as JG,posix as XG,win32 as VE}from"node:path";var hc="/usr/local/bin/anyray-credential-helper",yc="C:\\Program Files\\Anyray\\anyray-credential-helper.cmd",$u="/usr/local/bin/anyray-bootstrap-headers-helper",Mu="C:\\Program Files\\Anyray\\anyray-bootstrap-headers-helper.cmd",mc="Managed by anyray-connect desktop helper; do not edit.",zG=`anyray-connect desktop helper <--write|--print> --bin <absolute> [options]
|
|
320
320
|
|
|
321
321
|
Create the helpers required by Claude Desktop and Codex fleet artifacts: the
|
|
322
322
|
credential helper (inferenceCredentialHelper, also used by Codex) and the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anyray-connect",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.203",
|
|
4
4
|
"description": "Anyray connect — points local coding tools (Claude Code, Cursor, Windsurf, SDKs) at the Anyray gateway through supported configuration and enrolled personal authentication.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|