@lmctl-ai/lmctl 0.2.315 → 0.2.317
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/build-info.json +1 -1
- package/dist/lmbee.js +489 -489
- package/dist/on-demand-worker.cjs +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var{readFileSync:S,writeFileSync:N,renameSync:x,rmSync:I}=require("node:fs"),{execve:h}=process,{DatabaseSync:_}=require("node:sqlite");function g(e){try{let t=S("/proc/".concat(e,"/stat"),"utf8");return t.slice(t.lastIndexOf(")")+2).trim().split(/\s+/)[19]||null}catch{return null}}function w(e,t,r,n,i){let o=g(process.pid);if(o===null)return!1;let d=e.prepare("UPDATE on_demand_launches\n SET phase = 'worker_adopted', state = 'adopted', worker_pid = ?, worker_start = ?, updated_at = ?\n WHERE conversation_id = ? AND generation = ? AND job_id = ? AND run_id = ? AND phase = 'dispatching'").run(process.pid,o,new Date().toISOString(),t,r,n,i);return Number(d.changes)===1}function f(e,t){let r="".concat(e,".tmp-").concat(process.pid);try{N(r,JSON.stringify(t),{mode:384,flag:"wx"}),x(r,e)}catch(n){try{I(r,{force:!0})}catch{}throw n}}function m(e,t,r,n,i,o){return{adopted:e,conversationId:t,generation:r,jobId:n,runId:i,...o===void 0?{}:{error:o}}}function b(e){let[t,r,n,i,o,d,p]=e,s=Number(n),c=Number(i),a=Number(o);if(!t||!r||!Number.isSafeInteger(s)||s<1||!Number.isSafeInteger(c)||c<1||!Number.isSafeInteger(a)||a<1||typeof d!="string"||!p)throw new Error("invalid on-demand worker arguments");let u=new _(t,{timeout:
|
|
1
|
+
"use strict";var{readFileSync:S,writeFileSync:N,renameSync:x,rmSync:I}=require("node:fs"),{execve:h}=process,{DatabaseSync:_}=require("node:sqlite");function g(e){try{let t=S("/proc/".concat(e,"/stat"),"utf8");return t.slice(t.lastIndexOf(")")+2).trim().split(/\s+/)[19]||null}catch{return null}}function w(e,t,r,n,i){let o=g(process.pid);if(o===null)return!1;let d=e.prepare("UPDATE on_demand_launches\n SET phase = 'worker_adopted', state = 'adopted', worker_pid = ?, worker_start = ?, updated_at = ?\n WHERE conversation_id = ? AND generation = ? AND job_id = ? AND run_id = ? AND phase = 'dispatching'").run(process.pid,o,new Date().toISOString(),t,r,n,i);return Number(d.changes)===1}function f(e,t){let r="".concat(e,".tmp-").concat(process.pid);try{N(r,JSON.stringify(t),{mode:384,flag:"wx"}),x(r,e)}catch(n){try{I(r,{force:!0})}catch{}throw n}}function m(e,t,r,n,i,o){return{adopted:e,conversationId:t,generation:r,jobId:n,runId:i,...o===void 0?{}:{error:o}}}function b(e){let[t,r,n,i,o,d,p]=e,s=Number(n),c=Number(i),a=Number(o);if(!t||!r||!Number.isSafeInteger(s)||s<1||!Number.isSafeInteger(c)||c<1||!Number.isSafeInteger(a)||a<1||typeof d!="string"||!p)throw new Error("invalid on-demand worker arguments");let u=new _(t,{timeout:500});u.exec("PRAGMA busy_timeout = 500");let y=!1;try{y=w(u,r,s,c,a)}catch(l){try{f(p,m(!1,r,s,c,a,String(l&&l.message||l)))}catch{}return u.close(),!1}if(!y){try{f(p,m(!1,r,s,c,a))}catch{}return u.close(),!1}try{f(p,m(!0,r,s,c,a))}catch{}if(u.close(),typeof h!="function")throw new Error("process.execve is unavailable");return h("/bin/sh",["sh","-c",d],process.env),!0}module.exports={adoptOnDemandWorker:w,ownerStartIdentity:g,writeReceipt:f,main:b};if(require.main===module)try{let e=b(process.argv.slice(2));process.exitCode=e?0:1}catch(e){process.stderr.write("on-demand worker: ".concat(e instanceof Error?e.message:String(e),"\n")),process.exitCode=1}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmctl-ai/lmctl",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.317",
|
|
4
4
|
"description": "A provider-agnostic control plane for teams of AI coding agents — across providers, with independent review and durable memory.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://lmctl.com",
|