@lmctl-ai/lmctl 0.1.47 → 0.1.49
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 +4 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -1981,7 +1981,7 @@ List native provider sessions in scope, or list recent managed runs with --runs.
|
|
|
1981
1981
|
`),0}async function nU(t,e={stdout:process.stdout,stderr:process.stderr}){if(t[0]==="--help"||t[0]==="-h"||t[0]==="help")return e.stdout.write(Gd),0;let r,n;if(t.length===1){let d=js(t[0]);if(d===null)return e.stderr.write(Gd),2;r=d.teamfile,n=d.alias}else if(t.length===2)[r,n]=t;else return e.stderr.write(Gd),2;let s=dr(r),o;try{o=Ma(s,"utf8")}catch(d){return Be(e,`${r}: ${d instanceof Error?d.message:String(d)}`)}let i=o.split(`
|
|
1982
1982
|
`),a=iU(i,n);if(a===void 0)return Be(e,`${n}: no active _MEMBER_ entry found`);let l=i[a];if(Fs(l,"teamfile")!==void 0)return Be(e,`${n}: refresh only applies to provider-backed members, not teamfile= members`);let c=(e.env??process.env)[_l],u=Fs(l,"sessionid");return c!==void 0&&c.length>0&&u===c?Be(e,`${n}: cannot refresh its own running session \u2014 a meta-Lead or the operator must run this refresh.`):(i[a]=cU(l,"sessionid"),a>0&&/^\s*#CreationTime:/u.test(i[a-1])&&i.splice(a-1,1),Ps(s,i.join(`
|
|
1983
1983
|
`),"utf8"),pS([s],e))}function hS(t){return MF("sha256").update(t).digest("hex")}function _S(t,e){return{teamfile_path:e.teamfilePath,name:e.name,raw_text:e.rawText,raw_sha256:hS(e.rawText),registered_at:t?.registered_at??e.now,last_seeded_at:e.now}}function gS(t,e){let r=_S(t.getRootTeam(e.teamfilePath),e);return t.upsertRootTeam(r),r}function sU(t,e,r){let n=r.filter(o=>o.alias.toLowerCase()!=="lead").map(o=>{let i=o.teamfile!==void 0?`teamfile=${o.teamfile}`:`provider=${o.provider}`;return`- ${o.alias}: ${i}`}),s=n.length>0?n.join(`
|
|
1984
|
-
`):"- (no non-Lead members)";return["lmctl seed initial connection only. Create or pin this provider session, then stop.","Do not inspect files, run commands, infer a task, delegate, edit, or begin work.","",`Teamfile path: ${t}`,"You are alias Lead for this AI-managed .lmctl team.","","Use only the lmctl_chat MCP tool for member pings and delegation.","","Team members:",s,"","Example MCP calls:",...r.filter(o=>o.alias.toLowerCase()!=="lead").map(o=>`lmctl_chat(team="${t}", alias="${o.alias}", prompt="your task here")`),"","If a member feels sluggish or starts drifting (degraded or off-track output):",` 1. Check ONE member's session health: lmctl health "${t}" <alias> (size/state \u2014 informational).`," 2. Make sure important state is captured in durable-memory/ \u2014 update it if not.",` 3. Replace its session: lmctl refresh "${t}" <alias> (re-seeds the member: drops chat history, re-reads durable-memory/). You cannot refresh your own Lead session \u2014 a meta-Lead or the operator does that.`,` Optional: lmctl tail "${t}" <alias> to inspect its recent messages while troubleshooting.`,"(These are shell commands. Delegation still uses the lmctl_chat MCP tool.)","","Full teamfile document at seed time:","```lmctl",e.trimEnd(),"```","","Remember this teamfile path. Do not ask the operator for it when asked to ping or delegate to members.","Reply exactly: ACK: teamfile context recorded."].join(`
|
|
1984
|
+
`):"- (no non-Lead members)";return["lmctl seed initial connection only. Create or pin this provider session, then stop.","Do not inspect files, run commands, infer a task, delegate, edit, or begin work.","",`Teamfile path: ${t}`,"You are alias Lead for this AI-managed .lmctl team.","","Use only the lmctl_chat MCP tool for member pings and delegation.","Delegation is an ACTION, not a plan: to hand a member a task, actually call lmctl_chat.","On some providers the tool appears only after tool search; if so, call it in the SAME turn and do not stop after discovering it or say you're about to call it.","","Team members:",s,"","Example MCP calls:",...r.filter(o=>o.alias.toLowerCase()!=="lead").map(o=>`lmctl_chat(team="${t}", alias="${o.alias}", prompt="your task here")`),"","If a member feels sluggish or starts drifting (degraded or off-track output):",` 1. Check ONE member's session health: lmctl health "${t}" <alias> (size/state \u2014 informational).`," 2. Make sure important state is captured in durable-memory/ \u2014 update it if not.",` 3. Replace its session: lmctl refresh "${t}" <alias> (re-seeds the member: drops chat history, re-reads durable-memory/). You cannot refresh your own Lead session \u2014 a meta-Lead or the operator does that.`,` Optional: lmctl tail "${t}" <alias> to inspect its recent messages while troubleshooting.`,"(These are shell commands. Delegation still uses the lmctl_chat MCP tool.)","","Full teamfile document at seed time:","```lmctl",e.trimEnd(),"```","","Remember this teamfile path. Do not ask the operator for it when asked to ping or delegate to members.","Reply exactly: ACK: teamfile context recorded."].join(`
|
|
1985
1985
|
`)}function oU(t){let e=new Map;for(let r=0;r<t.length;r+=1){let n=t[r];if(!/^\s*_MEMBER_\s+\S/.test(n))continue;let s=Fs(n,"alias");s!==void 0&&e.set(s.toLowerCase(),r)}return e}function iU(t,e){let r=e.toLowerCase();for(let n=0;n<t.length;n+=1){let s=t[n];if(/^\s*_MEMBER_\s+\S/u.test(s)&&Fs(s,"alias")?.toLowerCase()===r)return n}}function aU(t,e){for(let r of t.split(`
|
|
1986
1986
|
`))if(/^\s*#?\s*_MEMBER_\s+\S/u.test(r)&&Fs(r,"alias")===e)return!0;return!1}function lU(t){return/^[A-Za-z][A-Za-z0-9_-]*$/u.test(t)}function Fs(t,e){let n=new RegExp(`(?:^|\\s)${e}=(?:"([^"]*)"|(\\S*))`).exec(t);return n===null?void 0:n[1]??n[2]??""}function cS(t,e,r){let n=`${e}=${Qd(r)}`,s=new RegExp(`(^|\\s)${e}=(?:"[^"]*"|\\S*)`);return s.test(t)?t.replace(s,(o,i)=>`${i}${n}`):`${t.trimEnd()} ${n}`}function cU(t,e){let r=new RegExp(`(^|\\s)${e}=(?:"[^"]*"|\\S*)`);return t.replace(r,"").replace(/\s+/gu," ").trimEnd()}function Qd(t){return/[\s"]/u.test(t)?`"${t.replace(/"/g,'\\"')}"`:t}function uU(t,e){let r=t.split(`
|
|
1987
1987
|
`),n=-1;for(let a=r.length-1;a>=0;a-=1)if(/^\s*(?:_MEMBER_|_CONNECT_|_SKILL_)(?:\s|$)/u.test(r[a])){n=a;break}if(n>=0)return r.splice(n+1,0,e),r.join(`
|
|
@@ -2053,6 +2053,9 @@ Examples:
|
|
|
2053
2053
|
`),0)}function MU(t){return NS(t)?t:`${t}.lmctl`}function DU(t){let e=NS(t);return e?IS(t,e):t}function PU(t){let{teamName:e,leadProvider:r}=t;return`# ${e}
|
|
2054
2054
|
|
|
2055
2055
|
# Lead, you take tasks from the operator. Clarify only when needed,
|
|
2056
|
+
# then first use lmctl_chat to ping each of your members with a one-line
|
|
2057
|
+
# "reply OK" to confirm the delegation channel works; then proceed with
|
|
2058
|
+
# the task.
|
|
2056
2059
|
# delegate implementation to Coder, and send completed work to
|
|
2057
2060
|
# Reviewer1 for review.
|
|
2058
2061
|
# If Reviewer1 finds issues, send the work back to Coder for repair
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmctl-ai/lmctl",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.49",
|
|
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",
|