@halcyonlabs/app 0.47.0-halcyon.583 → 0.47.0-halcyon.584
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/index.d.ts +4 -4
- package/package.json +2 -2
- package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/fixed-runner/linux-x64/manifest.json +4 -4
- package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/revision +1 -1
- package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/source.json +1 -1
- package/server/dist/builtin-plugins/orbit/dist/server.js +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -84,8 +84,8 @@ declare const appSettingsSchema: z$1.ZodObject<{
|
|
|
84
84
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
85
85
|
defaultProviderId: z$1.ZodNullable<z$1.ZodString>;
|
|
86
86
|
providerCompletedTurnDisplay: z$1.ZodRecord<z$1.ZodString, z$1.ZodEnum<{
|
|
87
|
-
flat: "flat";
|
|
88
87
|
collapse: "collapse";
|
|
88
|
+
flat: "flat";
|
|
89
89
|
}>>;
|
|
90
90
|
streamerMode: z$1.ZodBoolean;
|
|
91
91
|
allowFastServiceTier: z$1.ZodBoolean;
|
|
@@ -106,8 +106,8 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
|
|
|
106
106
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
107
107
|
defaultProviderId: z$1.ZodNullable<z$1.ZodString>;
|
|
108
108
|
providerCompletedTurnDisplay: z$1.ZodRecord<z$1.ZodString, z$1.ZodEnum<{
|
|
109
|
-
flat: "flat";
|
|
110
109
|
collapse: "collapse";
|
|
110
|
+
flat: "flat";
|
|
111
111
|
}>>;
|
|
112
112
|
streamerMode: z$1.ZodBoolean;
|
|
113
113
|
managedBranchPrefix: z$1.ZodString;
|
|
@@ -145,8 +145,8 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
|
|
|
145
145
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
146
146
|
defaultProviderId: z$1.ZodNullable<z$1.ZodString>;
|
|
147
147
|
providerCompletedTurnDisplay: z$1.ZodRecord<z$1.ZodString, z$1.ZodEnum<{
|
|
148
|
-
flat: "flat";
|
|
149
148
|
collapse: "collapse";
|
|
149
|
+
flat: "flat";
|
|
150
150
|
}>>;
|
|
151
151
|
streamerMode: z$1.ZodBoolean;
|
|
152
152
|
machineServerUrl: z$1.ZodNullable<z$1.ZodString>;
|
|
@@ -4243,8 +4243,8 @@ declare const providerInfoSchema: z$1.ZodObject<{
|
|
|
4243
4243
|
}, z$1.core.$strip>;
|
|
4244
4244
|
}, z$1.core.$strip>], "kind">>;
|
|
4245
4245
|
completedTurnDisplay: z$1.ZodEnum<{
|
|
4246
|
-
flat: "flat";
|
|
4247
4246
|
collapse: "collapse";
|
|
4247
|
+
flat: "flat";
|
|
4248
4248
|
}>;
|
|
4249
4249
|
available: z$1.ZodBoolean;
|
|
4250
4250
|
strings: z$1.ZodOptional<z$1.ZodObject<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@halcyonlabs/app",
|
|
3
|
-
"version": "0.47.0-halcyon.
|
|
3
|
+
"version": "0.47.0-halcyon.584",
|
|
4
4
|
"description": "bb app launcher for npx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bb",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"node": "^22.19.0 || ^24.0.0 || ^26.0.0"
|
|
109
109
|
},
|
|
110
110
|
"moonletRelease": {
|
|
111
|
-
"summary": "
|
|
111
|
+
"summary": "Use Moonlet in the job-start failure message (#637)"
|
|
112
112
|
},
|
|
113
113
|
"license": "SEE LICENSE IN LICENSE"
|
|
114
114
|
}
|
package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/fixed-runner/linux-x64/manifest.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"commit": "
|
|
2
|
+
"commit": "a138158a1d47a15e6a68b789a26607e98254bda3",
|
|
3
3
|
"file": "orbit-deploy",
|
|
4
4
|
"platform": "linux-x64",
|
|
5
5
|
"provenance": {
|
|
6
|
-
"artifactId":
|
|
7
|
-
"artifactName": "linux-bundle-
|
|
6
|
+
"artifactId": 15323631490,
|
|
7
|
+
"artifactName": "linux-bundle-a138158a1d47a15e6a68b789a26607e98254bda3",
|
|
8
8
|
"repository": "matt0x6F/personalassistant",
|
|
9
|
-
"runId":
|
|
9
|
+
"runId": 46292600685,
|
|
10
10
|
"workflow": ".github/workflows/moonlet-linux-bundle.yml"
|
|
11
11
|
},
|
|
12
12
|
"schema": 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
a138158a1d47a15e6a68b789a26607e98254bda3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"repository":"matt0x6F/personalassistant","revision":"
|
|
1
|
+
{"repository":"matt0x6F/personalassistant","revision":"a138158a1d47a15e6a68b789a26607e98254bda3"}
|
|
@@ -1796,7 +1796,7 @@ ${Jy(c)}`}}),"run")}),"messages mark-read":Yg({summary:"Mark a message read (or
|
|
|
1796
1796
|
`)}}}),"work show":gl({summary:"One station work item and its history",positionals:[{name:"key",description:"The work key",required:!0}],async run({positionals:u},f){let h=await d(f.threadId,Sf(u.key));if(!await a(f.threadId,h))throw new ga(`No accessible work item ${h.key}.`);let p=e.items.history(h.key).map(m=>` ${new Date(m.at).toISOString()} #${m.attempt} ${m.state.replaceAll("_"," ")}${m.detail?`: ${m.detail}`:""}`);return{exitCode:0,stdout:[E_(h),...p].join(`
|
|
1797
1797
|
`)}}}),"work retry":gl({summary:"Start an item that needs a person again, as a new attempt",positionals:[{name:"key",description:"The work key",required:!0}],async run({positionals:u},f){let h=await d(f.threadId,Sf(u.key));if(!await a(f.threadId,h))throw new ga(`No accessible work item ${h.key}.`);try{let p=await e.answer(Sf(u.key),"retry");return{exitCode:0,stdout:E_(p)}}catch(p){throw new ga(p.message)}}}),"work first":gl({summary:"Put a queued start or waiting follow-up first in its station line",positionals:[{name:"key",description:"The work key",required:!0}],async run({positionals:u},f){await d(f.threadId,Sf(u.key));try{return{exitCode:0,stdout:E_(e.first(Sf(u.key)))}}catch(h){throw new ga(h.message)}}}),"work drop":gl({summary:"Cancel a queued start, or drop an item that needs a person",positionals:[{name:"key",description:"The work key",required:!0}],async run({positionals:u},f){let h=await d(f.threadId,Sf(u.key));if(!await a(f.threadId,h))throw new ga(`No accessible work item ${h.key}.`);try{let p=await e.answer(Sf(u.key),"drop");return{exitCode:0,stdout:E_(p)}}catch(p){throw new ga(p.message)}}})}}o(yte,"workCommands");import{cliCommand as JSe,PluginCliError as Af}from"@get-bb/plugin-sdk";var ZSe=500,QSe=new Set([yi,xt]);function eAe(e){return new Set(e.filter(t=>t.machineProviderId!==null&&QSe.has(t.machineProviderId)).map(t=>t.id))}o(eAe,"stationMachineIds");function tAe(e,t){if(e.exitCode!==0||typeof e.stdout!="string")throw new Af(`Memory ${t} failed: ${(e.stderr??e.stdout??"").trim()||`exit ${e.exitCode}`}`);let r=JSON.parse(e.stdout);if(r===null||typeof r!="object"||r.ok!==!0)throw new Af(`Memory ${t} answered in an unknown shape`);return r}o(tAe,"printed");function rAe(e){let t=e;if(t===null||typeof t!="object")throw new Af("Memory listed a record in an unknown shape");if(t.scope!=="global")return null;if(typeof t.id!="string"||typeof t.version!="number"||typeof t.name!="string"||typeof t.summary!="string"||typeof t.details!="string"||typeof t.kind!="string"||!Array.isArray(t.tags)||typeof t.importance!="number"||typeof t.pinned!="boolean"||typeof t.writeReason!="string"||t.sourceThreadId!==null&&typeof t.sourceThreadId!="string")throw new Af("Memory listed a global record in an unknown shape");return t}o(rAe,"globalMemory");async function nAe(e){let t=await e.allMemories(),r=eAe(await e.hosts()),n={checked:0,station:[],unknownThreads:[]};for(let s of t){let i=rAe(s);if(i===null)continue;n.checked+=1;let a=i.sourceThreadId;if(a===null)continue;let c=await e.threadPlace(a);if(c===null){n.unknownThreads.push({id:i.id,thread:a});continue}if(c.hostId===null||!r.has(c.hostId))continue;let l=c.projectId!==null&&await e.whollyOn(c.projectId,c.hostId)?c.projectId:null;n.station.push({memory:i,thread:a,hostId:c.hostId,target:l})}return n}o(nAe,"stationGlobals");function oAe(e){let t=`Moved from global memory by the owner. ${e.writeReason}`.slice(0,ZSe);return["add","--scope=project",`--name=${e.name}`,`--summary=${e.summary}`,`--details=${e.details}`,`--kind=${e.kind}`,...e.tags.map(r=>`--tag=${r}`),`--importance=${e.importance}`,...e.pinned?["--pinned"]:[],`--reason=${t}`,"--json"]}o(oAe,"moveArgv");async function sAe(e,t){if(t.target===null)throw new Af(`${t.memory.id}: its conversation's project isn't wholly on the station, so there's no station project to move it to`);let n=tAe(await e.memory(oAe(t.memory),t.target),"add").memory?.id;if(typeof n!="string")throw new Af(`${t.memory.id}: memory add answered without the new memory's id`);let s=await e.memory(["forget",t.memory.id,`--expected-version=${t.memory.version}`,"--reason=Moved into the station's own project by the owner","--json"]);return s.exitCode!==0?`${t.memory.id} \u2192 ${n} in ${t.target}, but the global copy is still there: ${(s.stderr??"").trim()||"forgetting it failed"}. Forget it in Memory settings.`:`${t.memory.id} \u2192 ${n} in ${t.target}`}o(sAe,"moveStationGlobal");function iAe(e){let t=e.target===null?"can't be moved: its conversation's project isn't wholly on the station":`moves to ${e.target}`;return`${e.memory.id} ${e.memory.name} (saved by ${e.thread}): ${t}`}o(iAe,"describe");function wte(e){return{"station memory":JSe({summary:"List global memories a station's conversations saved, and move them into that station's own project (owner only)",aliases:["memory station-globals"],options:{move:{type:"string",repeatable:!0,split:",",placeholder:"ID",description:"Move this memory into its station project, then forget the global copy; repeat or comma-separate"},json:{type:"boolean",description:"As JSON"}},async run({options:t},r){await e.requireUser(r.threadId);let n=await nAe(e),s=t.move??[];if(s.length===0){if(t.json)return{exitCode:0,stdout:JSON.stringify(n)};let l=[n.station.length===0?"No global memory was saved by a station's conversation.":`Saved by a station's conversation (${n.station.length}):`,...n.station.map(d=>`- ${iAe(d)}`),...n.unknownThreads.length?[`Saved by conversations that no longer exist (${n.unknownThreads.length}), so their machine is unknown:`,...n.unknownThreads.map(d=>`- ${d.id} (${d.thread})`)]:[],`Checked ${n.checked} global memories.`];return n.station.some(d=>d.target!==null)&&l.push("Move one with: moonlet station memory --move <id>"),{exitCode:0,stdout:l.join(`
|
|
1798
1798
|
`)}}let i=new Map(n.station.map(l=>[l.memory.id,l])),a=s.filter(l=>!i.has(l));if(a.length)throw new Af(`Not a global memory saved by a station's conversation: ${a.join(", ")}`);let c=[];for(let l of s)c.push(await sAe(e,i.get(l)));return{exitCode:0,stdout:t.json?JSON.stringify({moved:c}):c.join(`
|
|
1799
|
-
`)}}})}}o(wte,"memoryCommands");var Jg=4e3;function kte(e){let t=o(M=>e.projects.resolve(M).catch(z=>{throw new je(z.message)}),"resolveProject"),{bb:r,wakeCounts:n,work:s,drains:i,settings:a,stations:c,scheduler:l,upkeep:d,notices:u,orbitConfig:f,ownerChanges:h,gate:p,relay:m,messages:g,threads:y,stationHosts:w,clock:k,zone:E,backThread:v,readAvatar:x,requireUser:A,requireUserOrOrbit:$,requireOrbitThread:_,requireOrbitConversation:T,orbitStationName:b,orbitSection:S,orbitThread:O,routeTargets:C,ensureProjectAt:I,syncStations:P}=e;async function N(M){if(M&&await _(M).catch(()=>null))return{kind:"orbit"};try{await A(M)}catch{throw new je("Only the Moonlet conversation, or the owner on their own machine, follows change requests.")}return{kind:"owner"}}o(N,"changesCaller");let D=o(()=>E().catch(()=>null),"settingsZone"),B=o((M,z,G)=>u.notify([{type:M,text:z}],void 0,G),"notify"),Y=o((M,z)=>z===M?void 0:z,"askedFrom"),ee=pO(r),H=o(async M=>{let z=await xg(r,a);if(!z||M!==z)throw new je("Only the current background conversation starts background work.");return z},"requireBackground"),F=o(async M=>{M&&M===await xg(r,a)||await $(M)},"requireUpkeep");function ie(M,z,G){return{origin:"plugin",originPluginId:r.pluginId,projectId:z,environment:{type:"host",hostId:M.id,workspace:{type:"unmanaged",path:M.folder}},startedOnBehalfOf:null,originKind:null,...G}}o(ie,"stationRequest");let ve=o(M=>[{type:"text",text:M,mentions:[]}],"text"),ye=180*6e4,ke=o(()=>{let{identity:M}=f.prefs();return{owner:nr(M,"the owner"),nickname:Qr(M)}},"chatNames");async function V(M){let[z,G]=await Promise.all([r.sdk.threads.get({threadId:M}).catch(()=>null),r.sdk.threads.defaultExecutionOptions({threadId:M}).catch(()=>null)]);return z&&z.archivedAt===null&&z.deletedAt===null?{thread:z,execution:G}:null}o(V,"threadFacts");async function Q(M){let z=Date.now(),G=(await Promise.all(y.notDone(M).map(async me=>{let Ae=await V(me.thread_id);return Ae?{id:me.thread_id,title:Ae.thread.title??IR(me.root_text),model:Ae.execution?.model??null,effort:Ae.execution?.reasoningLevel??null,openedAt:me.created_at,lastAt:me.last_activity_at}:null}))).filter(me=>me!==null),te=new Set(G.map(me=>me.id)),we=new Set([M]),L=await v();L&&we.add(L);let J=new Set((await C()).filter(me=>!me.own).map(me=>me.id)),W=o(async me=>(await r.sdk.threads.get({threadId:me}).catch(()=>null))?.parentThreadId??null,"parentOf"),Z=o(async me=>{let Ae=s.items.list(me).filter(re=>re.thread!==null&&!te.has(re.thread)),Be=await Promise.all(Ae.map(re=>GB(re,we,J,W)));return Ae.filter((re,fe)=>Be[fe])},"others"),ue=(await Promise.all((await Z(["queued","admitted","running","sharing","waiting","cut_off"])).map(async me=>{let Ae=await V(me.thread);return Ae?{id:me.thread,title:Ae.thread.title??me.key,model:Ae.execution?.model??null,since:me.queuedAt}:null}))).filter(me=>me!==null),he=(await Promise.all((await Z(["parked","disposed"])).filter(me=>z-me.updatedAt<=ye).sort((me,Ae)=>Ae.updatedAt-me.updatedAt).slice(0,5).map(async me=>{let Ae=await r.sdk.threads.get({threadId:me.thread}).catch(()=>null);return{id:me.thread,title:Ae?.title??me.key,endedAt:me.updatedAt}}))).filter(me=>me!==null);return{mine:G,background:ue,finished:he}}o(Q,"chatLedger");async function se(M){if(y.taken(M.moonlet,M.seq))throw new Error(`message ${M.seq} already has a thread`);let z=await ei(r),G=(await C()).find(ue=>ue.id===z?.hostId&&!ue.own);if(!G)throw new Error("the conversation's station isn't listed");let te=await e.modelPicks.forTarget(G),we=Tu(te.provider,!1,G.codex);if(we)throw new Error(we);let L=C2({words:M.words,recent:M.recent,names:ke()}),J=await p.approveRoute({thread:M.moonlet,station:G.name,from:G.name,what:"spawn",title:M.title,brief:L,provider:te.provider,...te.model?{model:te.model}:{},wait:!1});if(J.decision!=="allow")throw new Error(J.reason??"not allowed");let W=await I(G.id,G.folder,FO(G),!0);e.modelPicks.started(G,te.provider);let Z=await s.start({key:BN(),class:"asked",station:{hostId:G.id,projectIds:new Set([W])},body:ie(G,W,{title:J.title,input:ve(J.brief),...so(te.provider,!0,"work"),...te.model?{model:te.model}:{},reasoningLevel:te.effort,parentThreadId:M.moonlet,parentNotifications:"off",visibility:"visible"})});if(!Z.thread)throw new Error("bb didn't start it");return await y.adopt(M.moonlet,M.seq,M.words,Z.thread),{id:Z.thread,lead:`${te.model??te.provider} at ${te.effort} effort`}}o(se,"startChatWork");let ne=null,j=o(()=>ne??=D2(De(r),{names:ke,zone:o(async()=>await D()??Sn,"zone"),model:o(()=>MT(f.prefs().models),"model"),recent:o(M=>b2(r,M),"recent"),ledger:Q,startWork:se,async pass(M,z){await r.sdk.threads.send({threadId:M,input:[{type:"text",text:z,mentions:[]}],mode:"steer-if-active"}),await y.replied(M).catch(G=>r.log.warn(`counting the owner's words passed on: ${G.message}`))},async stop(M,z){s.items.byThread(M).some(G=>G.state==="cut_off")?await r.sdk.threads.archive({threadId:M}):await r.sdk.threads.stop({threadId:M}),y.notDone(z).some(G=>G.thread_id===M)&&await y.done(M,z)},now:o(()=>Date.now(),"now"),warn:o(M=>r.log.warn(M),"warn")}),"router"),R=o(M=>gte(s.items,{environments:o((z,G,te)=>r.sdk.environments.list({environmentProviderId:wn,status:G,limit:100,offset:te,...z?{hostId:z}:{}}),"environments"),threads:o((z,G)=>r.sdk.threads.list({environmentId:z,archived:!1,includeHidden:!0,limit:100,offset:G}),"threads")},M),"untracked");async function U(M){let z=await e.delivery.read(M.name),G=z?.stage==="installer"&&z.endedAt===null?await i.holding(M.id).catch(()=>null):null,te=G?await T_(s,G,Date.now(),R).catch(()=>null):null,we=G&&te?{lease:G.id,startedAt:G.startedAt,proceed:te.proceed,running:te.running,threads:[...s.items.list(["admitted","running"]).filter(L=>G.host===null||L.host===G.host).flatMap(L=>L.thread?[L.thread]:[]),...te.untracked.map(L=>L.slice(7))]}:null;return{record:z,line:z7(M.name,z,we)}}o(U,"deliveryStatus");async function q(M,z,G,te,we){if(te&&we)throw new je("Name a task or a system work record, not both");!te&&!we&&/^(review|merge-reviewed):/.test(M)&&(we=(await da(r).change({action:"create",key:M,kind:"work",title:z,description:G,labels:["event-service"],parent:null},"system:review-start")).id);let L=await v();if(!L)throw new je("The background work station is unavailable.");let J=await fetch(`${r.server.loopbackBaseUrl}/api/v1/threads/${L}?include=environment`);if(!J.ok)throw new je("The background work station is unavailable.");let W=await J.json(),Z=(await C()).find(Ae=>Ae.id===W.environment?.hostId&&!Ae.own);if(!Z)throw new je("The background work station is unavailable.");let ue=await e.modelPicks.forTarget(Z),he=Tu(ue.provider,!1,Z.codex);if(he)throw new je(he);let me=await I(Z.id,Z.folder,FO(Z),!Z.own);return e.modelPicks.started(Z,ue.provider),s.start({key:M,class:"background",loop:te,record:we,station:{hostId:Z.id,projectIds:new Set([me])},body:ie(Z,me,{title:z,input:ve(G),...so(ue.provider,!0,"work"),model:ue.model,reasoningLevel:ue.effort,parentThreadId:L,visibility:"hidden"})})}o(q,"spawnBackground");let X=YJ(r,{start:q}),oe=Nee({requireUser:A,backThread:v,orbitConversationOf:e.orbitConversationOf,parentOf:o(async M=>(await r.sdk.threads.get({threadId:M}).catch(()=>null))?.parentThreadId??null,"parentOf"),onStation:o(async M=>{let z=await r.sdk.threads.get({threadId:M}).catch(()=>null),G=z?.environmentId?await r.sdk.environments.get({environmentId:z.environmentId}).catch(()=>null):null;return!!G&&(await w()).some(te=>te.id===G.hostId)},"onStation"),onListedMachine:o(async M=>{let z=await r.sdk.threads.get({threadId:M}).catch(()=>null),G=z?.environmentId?await r.sdk.environments.get({environmentId:z.environmentId}).catch(()=>null):null;return!!G&&(await C()).some(te=>te.own&&te.id===G.hostId)},"onListedMachine")});return r.cli.register(aAe({name:"orbit",summary:"Moonlet: station's credentials and status",internal_DO_NOT_USE_topLevel:MO,internal_DO_NOT_USE_pluginOnly:BO,commands:{...Iee(r),...Cee(r,oe),...qee(r,oe),...xee(r,$),...yte(s,async M=>{if(!M)return await A(M),null;if(M===await O()||M===await v())return null;let z=await r.sdk.threads.get({threadId:M}),G=z.environmentId?await r.sdk.environments.get({environmentId:z.environmentId}):null;if(G&&(await w()).some(te=>te.id===G.hostId))return G.hostId;throw new je("Work commands are called by the owner or an assistant on its own station.")},i,A,async M=>(await w()).find(z=>z.name===M)?.id??null,R,async(M,z)=>{let G=await e.orbitConversationOf(M);if(!G)return!0;if(M!==G.orbit)return!1;let te=new Set([G.orbit]),we=await v();we&&te.add(we);let L=new Set((await C()).filter(J=>!J.own).map(J=>J.id));return GB(z,te,L,async J=>(await r.sdk.threads.get({threadId:J}).catch(()=>null))?.parentThreadId??null)}),...tte(g),...ite(e),...Yee({...e.artifacts}),...wte({requireUser:A,async allMemories(){let M=await fetch(`${r.server.loopbackBaseUrl}/api/v1/plugins/memory/rpc/listMemories`,{method:"POST",headers:{"content-type":"application/json"},body:"null"});if(!M.ok)throw new je(`Moonlet memory isn't answering (HTTP ${M.status}); is the Memory plugin installed and running?`);let z=await M.json();if(z.ok!==!0||!Array.isArray(z.result?.memories))throw new je("moonlet memory listed its memories in an unknown shape");return z.result.memories},async memory(M,z){let G=await fetch(`${r.server.loopbackBaseUrl}/api/v1/plugins/memory/cli`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(z===void 0?{argv:M}:{argv:M,projectId:z})});if(!G.ok)throw new je(`Moonlet memory isn't answering (HTTP ${G.status}); is the Memory plugin installed and running?`);return await G.json()},async threadPlace(M){let z=await fetch(`${r.server.loopbackBaseUrl}/api/v1/threads/${M}?include=environment`);if(z.status===404)return null;if(!z.ok)throw new je(`Moonlet couldn't say where ${M} ran (HTTP ${z.status})`);let G=await z.json(),te=(G.thread??G).projectId,we=G.environment?.hostId;return{hostId:typeof we=="string"?we:null,projectId:typeof te=="string"?te:null}},hosts:o(async()=>(await r.sdk.hosts.list()).map(M=>({id:M.id,machineProviderId:M.machineProviderId??null})),"hosts"),async whollyOn(M,z){let G=(await r.sdk.projects.list()).find(te=>te.id===M);return!!G&&G.sources.length>0&&G.sources.every(te=>te.hostId===z)}}),...Qee({welcome:e.welcome,requireUser:A,changed:o(()=>r.realtime.publish("config",{changed:!0}),"changed")}),...v7({store:e.userland,scripts:{run:o(M=>e.scheduler.runScript(M),"run"),data:o((M,z)=>e.scheduler.readScriptData(M,z),"data"),history:o(M=>e.scheduler.scripts.history(M),"history"),digest:o(M=>e.scheduler.scripts.digestPending(M),"digest")},orbitConversationOf:e.orbitConversationOf,requireUser:A,stationThread:o(async M=>{let z=await fetch(`${r.server.loopbackBaseUrl}/api/v1/threads/${M}?include=environment`),G=z.ok?(await z.json()).environment?.hostId:void 0;return!!G&&(await w()).some(te=>te.id===G)},"stationThread")}),"station secret set":ft({summary:"Store station's credentials (values are read from stdin, never arguments)",aliases:["secret set"],options:{tailscale:{type:"string",stdin:!0,description:"Tailscale OAuth client secret (--tailscale-stdin)"},claude:{type:"string",stdin:!0,description:"Claude Code token from `claude setup-token` (--claude-stdin)"},onepassword:{type:"string",stdin:!0,description:"1Password service account token (--onepassword-stdin)"},calendar:{type:"string",stdin:!0,description:"The calendar's private https:// .ics link (--calendar-stdin); it stays on the server and every station gets only what's on the calendar"}},async run({options:M},z){await A(z.threadId);let G={};if(M.tailscale!==void 0){let J=M.tailscale.trim();if(!oz(J))throw new je("That isn't a Tailscale credential (tskey-\u2026).");G.tailscaleSecret=J}if(M.claude!==void 0){let J=M.claude.trim();if(!/^sk-ant-[A-Za-z0-9_-]+$/.test(J))throw new je("That isn't a Claude Code token (sk-ant-\u2026).");G.claudeToken=J}if(M.onepassword!==void 0){let J=M.onepassword.trim();if(!/^ops_[A-Za-z0-9_-]+$/.test(J))throw new je("That isn't a 1Password service account token (ops_\u2026).");G.onePasswordToken=J}if(M.calendar!==void 0)try{G.calendarLink=nO("calendar",M.calendar)}catch(J){throw new je(zB(J)??String(J))}let te=Object.keys(G);if(te.length===0)throw new je("Pass --tailscale-stdin, --claude-stdin, --onepassword-stdin or --calendar-stdin.");await a.experimental_set(G);let we=`Stored ${te.join(" and ")}.${G.onePasswordToken?" Stations fetch the new 1Password token on their next use of it.":""}`;if(G.calendarLink===void 0)return{exitCode:0,stdout:we};let L=await HB(e.welcome);return{exitCode:L.exitCode,stdout:`${we}
|
|
1799
|
+
`)}}})}}o(wte,"memoryCommands");var Jg=4e3;function kte(e){let t=o(M=>e.projects.resolve(M).catch(z=>{throw new je(z.message)}),"resolveProject"),{bb:r,wakeCounts:n,work:s,drains:i,settings:a,stations:c,scheduler:l,upkeep:d,notices:u,orbitConfig:f,ownerChanges:h,gate:p,relay:m,messages:g,threads:y,stationHosts:w,clock:k,zone:E,backThread:v,readAvatar:x,requireUser:A,requireUserOrOrbit:$,requireOrbitThread:_,requireOrbitConversation:T,orbitStationName:b,orbitSection:S,orbitThread:O,routeTargets:C,ensureProjectAt:I,syncStations:P}=e;async function N(M){if(M&&await _(M).catch(()=>null))return{kind:"orbit"};try{await A(M)}catch{throw new je("Only the Moonlet conversation, or the owner on their own machine, follows change requests.")}return{kind:"owner"}}o(N,"changesCaller");let D=o(()=>E().catch(()=>null),"settingsZone"),B=o((M,z,G)=>u.notify([{type:M,text:z}],void 0,G),"notify"),Y=o((M,z)=>z===M?void 0:z,"askedFrom"),ee=pO(r),H=o(async M=>{let z=await xg(r,a);if(!z||M!==z)throw new je("Only the current background conversation starts background work.");return z},"requireBackground"),F=o(async M=>{M&&M===await xg(r,a)||await $(M)},"requireUpkeep");function ie(M,z,G){return{origin:"plugin",originPluginId:r.pluginId,projectId:z,environment:{type:"host",hostId:M.id,workspace:{type:"unmanaged",path:M.folder}},startedOnBehalfOf:null,originKind:null,...G}}o(ie,"stationRequest");let ve=o(M=>[{type:"text",text:M,mentions:[]}],"text"),ye=180*6e4,ke=o(()=>{let{identity:M}=f.prefs();return{owner:nr(M,"the owner"),nickname:Qr(M)}},"chatNames");async function V(M){let[z,G]=await Promise.all([r.sdk.threads.get({threadId:M}).catch(()=>null),r.sdk.threads.defaultExecutionOptions({threadId:M}).catch(()=>null)]);return z&&z.archivedAt===null&&z.deletedAt===null?{thread:z,execution:G}:null}o(V,"threadFacts");async function Q(M){let z=Date.now(),G=(await Promise.all(y.notDone(M).map(async me=>{let Ae=await V(me.thread_id);return Ae?{id:me.thread_id,title:Ae.thread.title??IR(me.root_text),model:Ae.execution?.model??null,effort:Ae.execution?.reasoningLevel??null,openedAt:me.created_at,lastAt:me.last_activity_at}:null}))).filter(me=>me!==null),te=new Set(G.map(me=>me.id)),we=new Set([M]),L=await v();L&&we.add(L);let J=new Set((await C()).filter(me=>!me.own).map(me=>me.id)),W=o(async me=>(await r.sdk.threads.get({threadId:me}).catch(()=>null))?.parentThreadId??null,"parentOf"),Z=o(async me=>{let Ae=s.items.list(me).filter(re=>re.thread!==null&&!te.has(re.thread)),Be=await Promise.all(Ae.map(re=>GB(re,we,J,W)));return Ae.filter((re,fe)=>Be[fe])},"others"),ue=(await Promise.all((await Z(["queued","admitted","running","sharing","waiting","cut_off"])).map(async me=>{let Ae=await V(me.thread);return Ae?{id:me.thread,title:Ae.thread.title??me.key,model:Ae.execution?.model??null,since:me.queuedAt}:null}))).filter(me=>me!==null),he=(await Promise.all((await Z(["parked","disposed"])).filter(me=>z-me.updatedAt<=ye).sort((me,Ae)=>Ae.updatedAt-me.updatedAt).slice(0,5).map(async me=>{let Ae=await r.sdk.threads.get({threadId:me.thread}).catch(()=>null);return{id:me.thread,title:Ae?.title??me.key,endedAt:me.updatedAt}}))).filter(me=>me!==null);return{mine:G,background:ue,finished:he}}o(Q,"chatLedger");async function se(M){if(y.taken(M.moonlet,M.seq))throw new Error(`message ${M.seq} already has a thread`);let z=await ei(r),G=(await C()).find(ue=>ue.id===z?.hostId&&!ue.own);if(!G)throw new Error("the conversation's station isn't listed");let te=await e.modelPicks.forTarget(G),we=Tu(te.provider,!1,G.codex);if(we)throw new Error(we);let L=C2({words:M.words,recent:M.recent,names:ke()}),J=await p.approveRoute({thread:M.moonlet,station:G.name,from:G.name,what:"spawn",title:M.title,brief:L,provider:te.provider,...te.model?{model:te.model}:{},wait:!1});if(J.decision!=="allow")throw new Error(J.reason??"not allowed");let W=await I(G.id,G.folder,FO(G),!0);e.modelPicks.started(G,te.provider);let Z=await s.start({key:BN(),class:"asked",station:{hostId:G.id,projectIds:new Set([W])},body:ie(G,W,{title:J.title,input:ve(J.brief),...so(te.provider,!0,"work"),...te.model?{model:te.model}:{},reasoningLevel:te.effort,parentThreadId:M.moonlet,parentNotifications:"off",visibility:"visible"})});if(!Z.thread)throw new Error("Moonlet didn't start it");return await y.adopt(M.moonlet,M.seq,M.words,Z.thread),{id:Z.thread,lead:`${te.model??te.provider} at ${te.effort} effort`}}o(se,"startChatWork");let ne=null,j=o(()=>ne??=D2(De(r),{names:ke,zone:o(async()=>await D()??Sn,"zone"),model:o(()=>MT(f.prefs().models),"model"),recent:o(M=>b2(r,M),"recent"),ledger:Q,startWork:se,async pass(M,z){await r.sdk.threads.send({threadId:M,input:[{type:"text",text:z,mentions:[]}],mode:"steer-if-active"}),await y.replied(M).catch(G=>r.log.warn(`counting the owner's words passed on: ${G.message}`))},async stop(M,z){s.items.byThread(M).some(G=>G.state==="cut_off")?await r.sdk.threads.archive({threadId:M}):await r.sdk.threads.stop({threadId:M}),y.notDone(z).some(G=>G.thread_id===M)&&await y.done(M,z)},now:o(()=>Date.now(),"now"),warn:o(M=>r.log.warn(M),"warn")}),"router"),R=o(M=>gte(s.items,{environments:o((z,G,te)=>r.sdk.environments.list({environmentProviderId:wn,status:G,limit:100,offset:te,...z?{hostId:z}:{}}),"environments"),threads:o((z,G)=>r.sdk.threads.list({environmentId:z,archived:!1,includeHidden:!0,limit:100,offset:G}),"threads")},M),"untracked");async function U(M){let z=await e.delivery.read(M.name),G=z?.stage==="installer"&&z.endedAt===null?await i.holding(M.id).catch(()=>null):null,te=G?await T_(s,G,Date.now(),R).catch(()=>null):null,we=G&&te?{lease:G.id,startedAt:G.startedAt,proceed:te.proceed,running:te.running,threads:[...s.items.list(["admitted","running"]).filter(L=>G.host===null||L.host===G.host).flatMap(L=>L.thread?[L.thread]:[]),...te.untracked.map(L=>L.slice(7))]}:null;return{record:z,line:z7(M.name,z,we)}}o(U,"deliveryStatus");async function q(M,z,G,te,we){if(te&&we)throw new je("Name a task or a system work record, not both");!te&&!we&&/^(review|merge-reviewed):/.test(M)&&(we=(await da(r).change({action:"create",key:M,kind:"work",title:z,description:G,labels:["event-service"],parent:null},"system:review-start")).id);let L=await v();if(!L)throw new je("The background work station is unavailable.");let J=await fetch(`${r.server.loopbackBaseUrl}/api/v1/threads/${L}?include=environment`);if(!J.ok)throw new je("The background work station is unavailable.");let W=await J.json(),Z=(await C()).find(Ae=>Ae.id===W.environment?.hostId&&!Ae.own);if(!Z)throw new je("The background work station is unavailable.");let ue=await e.modelPicks.forTarget(Z),he=Tu(ue.provider,!1,Z.codex);if(he)throw new je(he);let me=await I(Z.id,Z.folder,FO(Z),!Z.own);return e.modelPicks.started(Z,ue.provider),s.start({key:M,class:"background",loop:te,record:we,station:{hostId:Z.id,projectIds:new Set([me])},body:ie(Z,me,{title:z,input:ve(G),...so(ue.provider,!0,"work"),model:ue.model,reasoningLevel:ue.effort,parentThreadId:L,visibility:"hidden"})})}o(q,"spawnBackground");let X=YJ(r,{start:q}),oe=Nee({requireUser:A,backThread:v,orbitConversationOf:e.orbitConversationOf,parentOf:o(async M=>(await r.sdk.threads.get({threadId:M}).catch(()=>null))?.parentThreadId??null,"parentOf"),onStation:o(async M=>{let z=await r.sdk.threads.get({threadId:M}).catch(()=>null),G=z?.environmentId?await r.sdk.environments.get({environmentId:z.environmentId}).catch(()=>null):null;return!!G&&(await w()).some(te=>te.id===G.hostId)},"onStation"),onListedMachine:o(async M=>{let z=await r.sdk.threads.get({threadId:M}).catch(()=>null),G=z?.environmentId?await r.sdk.environments.get({environmentId:z.environmentId}).catch(()=>null):null;return!!G&&(await C()).some(te=>te.own&&te.id===G.hostId)},"onListedMachine")});return r.cli.register(aAe({name:"orbit",summary:"Moonlet: station's credentials and status",internal_DO_NOT_USE_topLevel:MO,internal_DO_NOT_USE_pluginOnly:BO,commands:{...Iee(r),...Cee(r,oe),...qee(r,oe),...xee(r,$),...yte(s,async M=>{if(!M)return await A(M),null;if(M===await O()||M===await v())return null;let z=await r.sdk.threads.get({threadId:M}),G=z.environmentId?await r.sdk.environments.get({environmentId:z.environmentId}):null;if(G&&(await w()).some(te=>te.id===G.hostId))return G.hostId;throw new je("Work commands are called by the owner or an assistant on its own station.")},i,A,async M=>(await w()).find(z=>z.name===M)?.id??null,R,async(M,z)=>{let G=await e.orbitConversationOf(M);if(!G)return!0;if(M!==G.orbit)return!1;let te=new Set([G.orbit]),we=await v();we&&te.add(we);let L=new Set((await C()).filter(J=>!J.own).map(J=>J.id));return GB(z,te,L,async J=>(await r.sdk.threads.get({threadId:J}).catch(()=>null))?.parentThreadId??null)}),...tte(g),...ite(e),...Yee({...e.artifacts}),...wte({requireUser:A,async allMemories(){let M=await fetch(`${r.server.loopbackBaseUrl}/api/v1/plugins/memory/rpc/listMemories`,{method:"POST",headers:{"content-type":"application/json"},body:"null"});if(!M.ok)throw new je(`Moonlet memory isn't answering (HTTP ${M.status}); is the Memory plugin installed and running?`);let z=await M.json();if(z.ok!==!0||!Array.isArray(z.result?.memories))throw new je("moonlet memory listed its memories in an unknown shape");return z.result.memories},async memory(M,z){let G=await fetch(`${r.server.loopbackBaseUrl}/api/v1/plugins/memory/cli`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(z===void 0?{argv:M}:{argv:M,projectId:z})});if(!G.ok)throw new je(`Moonlet memory isn't answering (HTTP ${G.status}); is the Memory plugin installed and running?`);return await G.json()},async threadPlace(M){let z=await fetch(`${r.server.loopbackBaseUrl}/api/v1/threads/${M}?include=environment`);if(z.status===404)return null;if(!z.ok)throw new je(`Moonlet couldn't say where ${M} ran (HTTP ${z.status})`);let G=await z.json(),te=(G.thread??G).projectId,we=G.environment?.hostId;return{hostId:typeof we=="string"?we:null,projectId:typeof te=="string"?te:null}},hosts:o(async()=>(await r.sdk.hosts.list()).map(M=>({id:M.id,machineProviderId:M.machineProviderId??null})),"hosts"),async whollyOn(M,z){let G=(await r.sdk.projects.list()).find(te=>te.id===M);return!!G&&G.sources.length>0&&G.sources.every(te=>te.hostId===z)}}),...Qee({welcome:e.welcome,requireUser:A,changed:o(()=>r.realtime.publish("config",{changed:!0}),"changed")}),...v7({store:e.userland,scripts:{run:o(M=>e.scheduler.runScript(M),"run"),data:o((M,z)=>e.scheduler.readScriptData(M,z),"data"),history:o(M=>e.scheduler.scripts.history(M),"history"),digest:o(M=>e.scheduler.scripts.digestPending(M),"digest")},orbitConversationOf:e.orbitConversationOf,requireUser:A,stationThread:o(async M=>{let z=await fetch(`${r.server.loopbackBaseUrl}/api/v1/threads/${M}?include=environment`),G=z.ok?(await z.json()).environment?.hostId:void 0;return!!G&&(await w()).some(te=>te.id===G)},"stationThread")}),"station secret set":ft({summary:"Store station's credentials (values are read from stdin, never arguments)",aliases:["secret set"],options:{tailscale:{type:"string",stdin:!0,description:"Tailscale OAuth client secret (--tailscale-stdin)"},claude:{type:"string",stdin:!0,description:"Claude Code token from `claude setup-token` (--claude-stdin)"},onepassword:{type:"string",stdin:!0,description:"1Password service account token (--onepassword-stdin)"},calendar:{type:"string",stdin:!0,description:"The calendar's private https:// .ics link (--calendar-stdin); it stays on the server and every station gets only what's on the calendar"}},async run({options:M},z){await A(z.threadId);let G={};if(M.tailscale!==void 0){let J=M.tailscale.trim();if(!oz(J))throw new je("That isn't a Tailscale credential (tskey-\u2026).");G.tailscaleSecret=J}if(M.claude!==void 0){let J=M.claude.trim();if(!/^sk-ant-[A-Za-z0-9_-]+$/.test(J))throw new je("That isn't a Claude Code token (sk-ant-\u2026).");G.claudeToken=J}if(M.onepassword!==void 0){let J=M.onepassword.trim();if(!/^ops_[A-Za-z0-9_-]+$/.test(J))throw new je("That isn't a 1Password service account token (ops_\u2026).");G.onePasswordToken=J}if(M.calendar!==void 0)try{G.calendarLink=nO("calendar",M.calendar)}catch(J){throw new je(zB(J)??String(J))}let te=Object.keys(G);if(te.length===0)throw new je("Pass --tailscale-stdin, --claude-stdin, --onepassword-stdin or --calendar-stdin.");await a.experimental_set(G);let we=`Stored ${te.join(" and ")}.${G.onePasswordToken?" Stations fetch the new 1Password token on their next use of it.":""}`;if(G.calendarLink===void 0)return{exitCode:0,stdout:we};let L=await HB(e.welcome);return{exitCode:L.exitCode,stdout:`${we}
|
|
1800
1800
|
${L.stdout}`}}}),"welcome show":ft({summary:"Show first run's saved answers: which steps are saved, and whether it's finished (--json: the saved answers)",options:{json:{type:"boolean",description:"Print the saved answers as JSON"}},async run({options:M},z){return await A(z.threadId),dte(e.welcome,M.json===!0)}}),"welcome save":ft({summary:`Save one step's answers, as first run and Settings do (steps: ${xs.join(", ")})`,description:["The JSON names the step's part:",' you: {"you":{"name":"Sam","email":"sam@example.com","place":{\u2026}}}, where place is one of `moonlet welcome places <city>`\'s answers (it sets the time zone)',' reach: {"reach":{"inbox":true,"mail":false,"other":["Signal"]}}, optionally with quiet_from and quiet_to ("22:00")',' touchpoints: {"touchpoints":{"morning":{"on":true,"at":"07:00",\u2026},"evening":{\u2026},"weekly":{\u2026}}}',` connections: {"contacts":[{"name":"Amy","email":"amy@example.com","relation":"friend"}]}; saving it hands the contacts to every station and fails if any didn't get them`," library: no answers; documents go in with the file commands, as on the Library page","A wrong step or answer is refused with what's wrong. Only the owner's own machine runs these; a station is refused."].join(`
|
|
1801
1801
|
`),positionals:[{name:"step",description:"The step",required:!0}],options:{values:{type:"string",stdin:!0,description:`The step's answers as one line of JSON, e.g. {"you":{"name":"Sam"}} (or --values-stdin)`}},async run({positionals:M,options:z},G){return await A(G.threadId),VB(()=>ute(e.welcome,String(M.step),z.values))}}),"welcome places":ft({summary:"The places a city's name could mean, best first, as JSON (for the you step's place)",positionals:[{name:"query",description:"The city",required:!0}],async run({positionals:M},z){return await A(z.threadId),VB(()=>pte(e.welcome,String(M.query)))}}),"welcome handover":ft({summary:"Hand the contacts and the calendar to every station again, and say how each went",async run(M,z){return await A(z.threadId),HB(e.welcome)}}),"welcome finish":ft({summary:"Finish first run: tell your moonlet's conversation what was saved, once (now, or when its conversation starts)",description:"It says what was saved and what was skipped, once, and only then marks first run finished. With no conversation yet it says so and leaves it open; finishing again sends nothing. `moonlet status` ends with a Welcome: line saying where it stands.",async run(M,z){await A(z.threadId);let G=await VB(()=>fte(e.welcome));return r.realtime.publish("config",{changed:!0}),G}}),"welcome reopen":ft({summary:"Set up again: open first run in Moonlet again, keeping its answers",async run(M,z){await A(z.threadId);let G=await hte(e.welcome);return r.realtime.publish("config",{changed:!0}),G}}),"station sync":ft({summary:"Give every connected station its project and its broker's credentials",async run(){let M=await P();return{exitCode:M.some(z=>z.includes("failed"))?1:0,stdout:M.join(`
|
|
1802
1802
|
`)||"No connected stations."}}}),"route prepare":ft({summary:"From the Moonlet conversation's turn hook: whether the text it got is the owner's new message, and if so what to read to decide where it goes",options:{prompt:{type:"string",stdin:!0,description:"The text the hook got, on one line (\\n for a line break; or --prompt-stdin)"}},async run({options:M},z){let{orbit:G,thread:te}=await T(z.threadId);return te!==G?{exitCode:0,stdout:JSON.stringify({route:!1})}:{exitCode:0,stdout:JSON.stringify(await j().prepare(G,yn(M.prompt??"")))}}}),"route apply":ft({summary:"From the Moonlet conversation's turn hook: carry out where the owner's message <seq> goes, and say what to tell them",options:{seq:{type:"string",description:"The owner's message number, from the first step"},decision:{type:"string",stdin:!0,description:"Where it goes, as one line of JSON (or --decision-stdin)"}},async run({options:M},z){let{orbit:G,thread:te}=await T(z.threadId);if(te!==G)throw new je("Only the Moonlet conversation decides where the owner's messages go.");let we=Number(M.seq);if(!M.seq||!/^(0|[1-9][0-9]*)$/.test(M.seq)||!Number.isSafeInteger(we))throw new je("Pass the message: --seq <n>.");let L;try{L=JSON.parse(M.decision??"")}catch{L={unread:"it wasn't JSON"}}return{exitCode:0,stdout:await j().apply(G,we,L)}}}),"thread close":ft({summary:"From a work thread on the home conversation: close it with one line on how it ended, shown under its message in the main conversation",options:{outcome:{type:"string",stdin:!0,description:"How it ended, on one line ('\u2026'; or --outcome-stdin)"}},async run({options:M},z){if(!y.workThread(z.threadId))throw new je("Only a work thread on the home conversation closes itself; a thread of the Moonlet conversation says its outcome with `moonlet thread outcome`.");return{exitCode:0,stdout:`Closed. Its outcome shows under message ${(await y.close(z.threadId,M.outcome??"").catch(te=>{throw new je(te.message)})).rootSeq} in the main conversation, and ${ke().nickname} hears it.`}}}),"route spawn":ft({summary:"Start an assistant (or, with --chat, a chat) on a station, or on one of the owner's own machines they've listed: the Moonlet conversation's routing",options:{station:{type:"string",description:"The station (or listed machine of the owner's) to run on"},task:{type:"string",description:"Task key, like MOON-12; omitted for a new ask to create its task"},chat:{type:"boolean",description:"A visible chat in the Orbit section, not a hidden assistant"},title:{type:"string",description:"A short title"},model:{type:"string",description:"The model (default: the one Settings \u2192 Models has for this work); its effort comes from there too"},provider:{type:"string",description:"The provider: claude-code, or codex on a station that has it or a machine of the owner's (default: Settings \u2192 Models)"},brief:{type:"string",stdin:!0,description:"The instructions, on one line, as an argument ('\u2026'; or --brief-stdin)"}},async run({options:M},z){let{orbit:G,thread:te}=await T(z.threadId),we=await C(),L=we.find(ge=>ge.name===M.station);if(!L)throw new je(`No station or listed machine ${M.station??"(--station)"}. Targets: ${we.map(ge=>ge.name).join(", ")}`);let J=yn(M.brief??"").trim();if(!J)throw new je("Pass the instructions: --brief '<one line>' (or --brief-stdin).");let W=M.title??J.split(`
|