@lmctl-ai/lmctl 0.1.65 → 0.1.66

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/cli/index.js CHANGED
@@ -1901,7 +1901,7 @@ ${i.map(a=>` ${a}`).join(`
1901
1901
  Print or watch provider session messages, or follow a managed run timeline.
1902
1902
  --lines and --max-bytes are mutually exclusive. Default: --max-bytes 4096.`;Jb=`\u2026 [truncated older output \u2014 raise with --max-bytes]
1903
1903
  `});var rT={};le(rT,{runJobs:()=>oF});import{readdirSync as Z1}from"node:fs";import{join as Q1}from"node:path";async function oF(t,e={stdout:process.stdout,stderr:process.stderr}){let[r,...n]=t;return r==="--help"||r==="-h"||r==="help"?(e.stdout.write(zb),0):r===void 0?Hd([],e):r.startsWith("--")?Hd(t,e):r==="list"?Hd(n,e):r==="watch"?cF(n,e):r==="show"?aF(n,e):r==="cancel"?lF(n,e):r==="run"?wF(n,e):(e.stderr.write(`error: unknown jobs subcommand: ${r}
1904
- ${zb}`),2)}async function Hd(t,e){let r=D(t,["--team","--from","--status","--limit"],["--json"]);if(r.error!==void 0)return w(e,r.error);if(r.positionals.length>0)return w(e,`unexpected positional: ${r.positionals[0]}`);let n=x(r,"--status");if(n!==void 0&&!sF.has(n))return w(e,`invalid --status "${n}" (expected pending|running|done|error|busy|cancelled)`);let s=n,o=x(r,"--limit"),i=o===void 0?void 0:uF(o,"--limit");return typeof i=="string"?w(e,i):await L(e,async a=>{let l,c=x(r,"--team");if(c!==void 0)try{l=await Ne(c,a)}catch(d){return w(e,`jobs list: ${d instanceof Error?d.message:String(d)}`)}else l=iF(a,e.cwd??process.cwd());let u=a.listDelegationJobs({...l!==void 0?{teamfile:l}:{},...x(r,"--from")!==void 0?{from:x(r,"--from")}:{},...s!==void 0?{status:s}:{},...typeof i=="number"?{limit:i}:{}});return M(r,"--json")?B(e,u):e.stdout.write(fF(u)),0})}function iF(t,e){let r;try{r=Z1(e,{withFileTypes:!0}).filter(n=>(n.isFile()||n.isSymbolicLink())&&n.name.endsWith(".lmctl")).map(n=>n.name)}catch{return}if(r.length===1)return Ne(Q1(e,r[0]),t)}async function aF(t,e){let r=D(t,[],["--json"]);if(r.error!==void 0)return w(e,r.error);if(r.positionals.length!==1)return w(e,"usage: lmctl jobs show <id> [--json]");let n=Jd(r.positionals[0]);return typeof n=="string"?w(e,n):await L(e,s=>{let o=s.getDelegationJob(n);if(o===null)return w(e,`job ${n}: not found`);let i=s.listDelegationEvents(n);return M(r,"--json")?B(e,{...o,event_count:i.length}):e.stdout.write(mF(o,i.length)),0})}async function lF(t,e){let r=D(t,[],[]);if(r.error!==void 0)return w(e,r.error);if(r.positionals.length!==1)return w(e,"usage: lmctl jobs cancel <id>");let n=Jd(r.positionals[0]);return typeof n=="string"?w(e,n):await L(e,s=>{let o=s.getDelegationJob(n);if(o===null)return w(e,`job ${n}: not found`);let i=s.cancelDelegationJob(n);return o.status==="pending"&&i.status==="cancelled"?e.stdout.write(`job ${n} cancelled before it ran
1904
+ ${zb}`),2)}async function Hd(t,e){let r=D(t,["--team","--from","--status","--limit"],["--json"]);if(r.error!==void 0)return w(e,r.error);if(r.positionals.length>0)return w(e,`unexpected positional: ${r.positionals[0]}`);let n=x(r,"--status");if(n!==void 0&&!sF.has(n))return w(e,`invalid --status "${n}" (expected pending|running|done|error|busy|cancelled)`);let s=n,o=x(r,"--limit"),i=o===void 0?void 0:uF(o,"--limit");return typeof i=="string"?w(e,i):await L(e,async a=>{let l,c=x(r,"--from"),u=x(r,"--team");if(u!==void 0)try{l=await Ne(u,a)}catch(f){return w(e,`jobs list: ${f instanceof Error?f.message:String(f)}`)}else c===void 0&&(c=iF(a,e.cwd??process.cwd()));let d=a.listDelegationJobs({...l!==void 0?{teamfile:l}:{},...c!==void 0?{from:c}:{},...s!==void 0?{status:s}:{},...typeof i=="number"?{limit:i}:{}});return M(r,"--json")?B(e,d):e.stdout.write(fF(d)),0})}function iF(t,e){let r;try{r=Z1(e,{withFileTypes:!0}).filter(n=>(n.isFile()||n.isSymbolicLink())&&n.name.endsWith(".lmctl")).map(n=>n.name)}catch{return}if(r.length===1)return`${Ne(Q1(e,r[0]),t)}:Lead`}async function aF(t,e){let r=D(t,[],["--json"]);if(r.error!==void 0)return w(e,r.error);if(r.positionals.length!==1)return w(e,"usage: lmctl jobs show <id> [--json]");let n=Jd(r.positionals[0]);return typeof n=="string"?w(e,n):await L(e,s=>{let o=s.getDelegationJob(n);if(o===null)return w(e,`job ${n}: not found`);let i=s.listDelegationEvents(n);return M(r,"--json")?B(e,{...o,event_count:i.length}):e.stdout.write(mF(o,i.length)),0})}async function lF(t,e){let r=D(t,[],[]);if(r.error!==void 0)return w(e,r.error);if(r.positionals.length!==1)return w(e,"usage: lmctl jobs cancel <id>");let n=Jd(r.positionals[0]);return typeof n=="string"?w(e,n):await L(e,s=>{let o=s.getDelegationJob(n);if(o===null)return w(e,`job ${n}: not found`);let i=s.cancelDelegationJob(n);return o.status==="pending"&&i.status==="cancelled"?e.stdout.write(`job ${n} cancelled before it ran
1905
1905
  `):o.status==="running"&&i.status==="cancelled"?e.stdout.write(`job ${n} marked cancelled; running provider turn cannot be aborted and its result will be discarded
1906
1906
  `):e.stdout.write(`job ${n} already ${o.status}; not cancelled
1907
1907
  `),0})}async function cF(t,e){let r=D(t,["--max-bytes"],["--once"]);if(r.error!==void 0)return w(e,r.error);if(r.positionals.length!==1)return w(e,"usage: lmctl jobs watch <id> [--once] [--max-bytes N]");let n=Jd(r.positionals[0]);if(typeof n=="string")return w(e,n);let s=x(r,"--max-bytes"),o=s===void 0?rF:dF(s,"--max-bytes");return typeof o=="string"?w(e,o):await L(e,async i=>{if(i.getDelegationJob(n)===null)return w(e,`job ${n}: not found`);let l=Zb(e,i.listDelegationEvents(n),0,o),c=i.getDelegationJob(n);return eT(c.status)?(Qb(e,c,o),0):M(r,"--once")?0:await new Promise(u=>{let f=setInterval(()=>{try{let p=i.listDelegationEvents(n,l);l=Zb(e,p,l,o);let h=i.getDelegationJob(n);if(h===null){e.stderr.write(`error: job ${n}: not found
@@ -1925,8 +1925,9 @@ ${n}${n.endsWith(`
1925
1925
  lmctl jobs cancel <id>
1926
1926
 
1927
1927
  List, inspect, watch, or cancel tracked background delegations.
1928
- When --team is omitted, list uses the current directory's only .lmctl file
1929
- as the team filter when exactly one exists; otherwise it lists all jobs.
1928
+ When --team and --from are omitted, list uses the current directory's only
1929
+ .lmctl file as the Lead sender filter when exactly one exists; otherwise it
1930
+ lists all jobs.
1930
1931
  Statuses: pending, running, done, error, busy, cancelled.
1931
1932
  Cancelling a pending job prevents it from running. Cancelling a running job
1932
1933
  marks it cancelled; the provider turn cannot be aborted and its result is discarded.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lmctl-ai/lmctl",
3
- "version": "0.1.65",
3
+ "version": "0.1.66",
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",