UNPKG

grix-connector

Version:

Connect local AI coding agents (Claude, Codex, Gemini, Qwen, DeepSeek, Cursor, OpenCode, Pi, OpenHuman, Reasonix) to the Grix scheduling platform. Also serves as an OpenClaw plugin for Grix channel transport.

2 lines (1 loc) 897 B
function l(t,e){return`${t}#shared:${e}`}function o(t,e){if(!t)return t;const i=t.lastIndexOf("."),r=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return i>r?`${t.slice(0,i)}.shared.${e}${t.slice(i)}`:`${t}.shared.${e}`}function h(t,e){return{...t,name:l(t.name,e),aibot:{...t.aibot,sharedOwnerId:e},eventResultsPath:o(t.eventResultsPath,e),bindingsPath:o(t.bindingsPath,e),activeEventStorePath:o(t.activeEventStorePath,e),logDir:t.logDir?`${t.logDir}/shared-${e}`:void 0,allowlistPath:void 0}}function d(t,e,i){const r=new Set(i.map(n=>String(n).trim()).filter(n=>n.length>0)),s=[...e],a=`${t}#shared:`,f=[...r].filter(n=>!s.includes(l(t,n))),c=s.filter(n=>n.startsWith(a)).map(n=>({key:n,sharedOwnerId:n.slice(a.length)})).filter(n=>!r.has(n.sharedOwnerId));return{toAdd:f,toRemove:c}}export{h as buildSharedInstanceConfig,d as diffSharedOwners,l as sharedInstanceKey,o as suffixSharedPath};