borgmcp 1.1.3 → 1.1.4

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.
@@ -10,11 +10,10 @@ interface ConnectDeps {
10
10
  */
11
11
  export declare function connectOpenCodeDrone(deps: ConnectDeps): Promise<void>;
12
12
  /**
13
- * Inject the initial kickoff prompt into the TUI's session. This is the
14
- * equivalent of passing the kickoff as a CLI arg (which opencode doesn't
15
- * support). Polls until the TUI server and a session are available, then
16
- * sends the prompt WITHOUT noReply so the agent processes it as its first
17
- * task. Best-effort — never throws.
13
+ * Inject the initial kickoff prompt into the TUI's session. Fills the
14
+ * TUI input with the kickoff text and submits it, triggering the agent
15
+ * to process it as its first task. Polls until the TUI server and a
16
+ * session are available. Best-effort never throws.
18
17
  */
19
18
  export declare function injectInitialKickoff(text: string): Promise<boolean>;
20
19
  /**
@@ -1 +1 @@
1
- import{createOpencodeClient as f}from"@opencode-ai/sdk";let e=null;async function y(t){try{e={client:f({baseUrl:t.serverUrl}),serverUrl:t.serverUrl,sessionId:null,directory:t.directory,connected:!0,totalEntriesInjected:0}}catch{e=null}}async function c(t=15,n=1e3){if(!e?.connected)return null;for(let r=0;r<t;r++){try{const o=(await e.client.session.list()).data??[];if(o.length===0)continue;const a=e.directory,l=a?o.filter(i=>i.directory===a):o;if(l.length===0)continue;const u=l.reduce((i,d)=>i.time.created>d.time.created?i:d);return e.sessionId=u.id,u.id}catch{}await new Promise(s=>setTimeout(s,n))}return null}async function h(t){if(!e?.connected)return!1;try{const n=await c();return n?(await e.client.session.prompt({path:{id:n},body:{parts:[{type:"text",text:t}]}}),e.totalEntriesInjected++,!0):!1}catch{return!1}}async function I(t){if(!e?.connected)return!1;try{const n=e.sessionId??await c(5,500);return n?(await e.client.session.prompt({path:{id:n},body:{noReply:!0,parts:[{type:"text",text:t}]}}),e.totalEntriesInjected++,!0):!1}catch{return e.sessionId=null,!1}}async function m(){if(!e?.connected)return null;try{const t=e.sessionId??await c(3,500);return t?(await e.client.session.get({path:{id:t}})).response.status===200:!1}catch{return!1}}function w(){e=null}function x(){return{connected:e?.connected??!1,sessionId:e?.sessionId??null,totalEntriesInjected:e?.totalEntriesInjected??0}}function C(t,n=14096){let r=0;for(let s=0;s<t.length;s++){const o=t.charCodeAt(s);r=(r<<5)-r+o,r|=0}return n+Math.abs(r)%1024}export{C as computeOpenCodePort,y as connectOpenCodeDrone,w as disconnectOpenCodeDrone,x as getOpenCodeConnectionState,h as injectInitialKickoff,I as injectOpenCodeEntry,m as probeOpenCodeDroneArmed};
1
+ import{createOpencodeClient as f}from"@opencode-ai/sdk";let e=null;async function y(t){try{e={client:f({baseUrl:t.serverUrl}),serverUrl:t.serverUrl,sessionId:null,directory:t.directory,connected:!0,totalEntriesInjected:0}}catch{e=null}}async function c(t=15,n=1e3){if(!e?.connected)return null;for(let r=0;r<t;r++){try{const o=(await e.client.session.list()).data??[];if(o.length===0)continue;const a=e.directory,l=a?o.filter(i=>i.directory===a):o;if(l.length===0)continue;const u=l.reduce((i,d)=>i.time.created>d.time.created?i:d);return e.sessionId=u.id,u.id}catch{}await new Promise(s=>setTimeout(s,n))}return null}async function h(t){if(!e?.connected)return!1;try{return await c()?(await e.client.tui.appendPrompt({body:{text:t}}),await e.client.tui.submitPrompt({}),e.totalEntriesInjected++,!0):!1}catch{return!1}}async function I(t){if(!e?.connected)return!1;try{const n=e.sessionId??await c(5,500);return n?(await e.client.session.prompt({path:{id:n},body:{noReply:!0,parts:[{type:"text",text:t}]}}),e.totalEntriesInjected++,!0):!1}catch{return e.sessionId=null,!1}}async function m(){if(!e?.connected)return null;try{const t=e.sessionId??await c(3,500);return t?(await e.client.session.get({path:{id:t}})).response.status===200:!1}catch{return!1}}function w(){e=null}function C(){return{connected:e?.connected??!1,sessionId:e?.sessionId??null,totalEntriesInjected:e?.totalEntriesInjected??0}}function x(t,n=14096){let r=0;for(let s=0;s<t.length;s++){const o=t.charCodeAt(s);r=(r<<5)-r+o,r|=0}return n+Math.abs(r)%1024}export{x as computeOpenCodePort,y as connectOpenCodeDrone,w as disconnectOpenCodeDrone,C as getOpenCodeConnectionState,h as injectInitialKickoff,I as injectOpenCodeEntry,m as probeOpenCodeDroneArmed};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "borgmcp",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Coordinate AI coding agents in shared cubes. Works with Claude Code and Codex. Create projects, assign roles, and share a live activity log.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",