@north-light/cli 0.3.783 → 0.3.784
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/builtin-pi-packages/pi-crtr-extensions/README.md +3 -3
- package/dist/clients/attach/viewer.js +526 -526
- package/dist/commands/pkg/account-installs.d.ts +1 -0
- package/dist/commands/pkg/account-installs.js +1 -1
- package/dist/commands/pkg/plugin-manage.d.ts +4 -0
- package/dist/commands/pkg/plugin-manage.js +1 -1
- package/dist/commands/sys/doctor.js +1 -1
- package/dist/commands/sys/provider-login.js +5 -5
- package/dist/commands/sys/setup-core.js +6 -6
- package/dist/commands/sys/setup-wizard.js +3 -2
- package/dist/commands/sys/signin.js +5 -4
- package/dist/core/grants/shadow.js +1 -1
- package/dist/core/runtime/package-health.d.ts +1 -1
- package/dist/core/runtime/package-health.js +5 -4
- package/dist/core/runtime/provider-credential-gate.d.ts +1 -1
- package/dist/core/runtime/provider-credential-gate.js +1 -1
- package/dist/core/runtime/runner/machine/executor.d.ts +3 -0
- package/dist/core/runtime/runner/machine/executor.js +2 -1
- package/dist/core/scoped-state/seed-terminal-defaults.js +1 -1
- package/dist/daemon/machine-daemon.js +1 -1
- package/docs/cli/first-session.md +2 -2
- package/docs/cli/official-marketplace.md +1 -1
- package/package.json +3 -3
- package/packages/crouter-api/package.json +1 -1
- package/packages/crouter-identity/package.json +1 -1
- package/packages/crouter-plugin/package.json +3 -3
- package/runtime.lock.json +14 -14
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CredentialStore } from '@earendil-works/pi-ai';
|
|
2
2
|
/** The daemon, which owns the rows, registers a builder of its row-backed read-only view (one read per table); every other process asks the daemon over /v1/model-auth. */
|
|
3
3
|
export declare function registerGateCredentialStore(snapshot: () => Promise<CredentialStore>): void;
|
|
4
|
-
export declare const NO_PROVIDER_CREDENTIAL_MESSAGE = "crtr: no provider credential;
|
|
4
|
+
export declare const NO_PROVIDER_CREDENTIAL_MESSAGE = "crtr: no provider credential; log in under Providers in `crtr sys settings`.";
|
|
5
5
|
/** Check the setup catalog before a path creates a broker-backed node. `profileEnvNames` are the names stored on the
|
|
6
6
|
* launching profile (values are never needed: a stored value is never empty). */
|
|
7
7
|
export declare function hasConfiguredProviderCredential(profileEnvNames: readonly string[]): Promise<boolean>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a=Object.defineProperty;var t=(e,i)=>a(e,"name",{value:i,configurable:!0});import{ModelRegistry as c,ModelRuntime as l}from"@earendil-works/pi-coding-agent";import{join as m}from"node:path";import{ApiCredentialStore as f}from"../model-auth/api-credential-store.js";import{cliClient as p}from"../../commands/api-client.js";import{hasProviderCredential as u}from"../provider-credential.js";import{piAgentDir as E}from"./package-health.js";import{PROVIDER_ENV_KEYS as g}from"./spawn-env.js";let d;function D(e){d=e}t(D,"registerGateCredentialStore");function w(e){const i=new Map;let n;const o=t(()=>{throw new Error("the provider credential check is read-only")},"refuse");return{read:t(r=>{let s=i.get(r);return s===void 0&&i.set(r,s=e.read(r)),s},"read"),list:t(()=>n??=e.list(),"list"),modify:o,delete:o}}t(w,"readOnceStore");const h="crtr: no provider credential; log in under Providers in `crtr sys settings`.";async function M(e){const i=Object.fromEntries(e.map(r=>[r,"stored"]));if(Object.values(g).some(r=>(i[r]??process.env[r])?.trim()))return!0;const n=E(),o=await l.create({credentials:d===void 0?w(new f(()=>p(),!0)):await d(),modelsPath:m(n,"models.json")});return await u(o,new c(o))}t(M,"hasConfiguredProviderCredential");function _(){process.stderr.write(`${h}
|
|
2
2
|
`),process.exit(1)}t(_,"exitForMissingProviderCredential");export{h as NO_PROVIDER_CREDENTIAL_MESSAGE,_ as exitForMissingProviderCredential,M as hasConfiguredProviderCredential,D as registerGateCredentialStore};
|
|
@@ -15,6 +15,9 @@ export interface MachineExecutorDeps {
|
|
|
15
15
|
signal: string | null;
|
|
16
16
|
}) => void;
|
|
17
17
|
}
|
|
18
|
+
/** The app's pi settings with this install's bundled `pi-crtr-extensions` as the only crtr package entry: the same absolute path a sandbox broker gets (host.ts),
|
|
19
|
+
* so the broker loads the package of the generation that launches it. Other settings and packages the person set are kept. */
|
|
20
|
+
export declare function withBundledExtensions(settingsJson: string | undefined): string;
|
|
18
21
|
/** Broker processes: `{pid, execution, node}` for each `broker-cli.js ... --epoch <execution> <node>` command line. Throws when the process table cannot
|
|
19
22
|
* be read: an unreadable table is not an empty one, and a caller that read it as "no brokers" would start a second broker or report a stop that did not happen. */
|
|
20
23
|
export declare function findBrokers(): Promise<Array<{
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var g=Object.defineProperty;var c=(n,r)=>g(n,"name",{value:r,configurable:!0});import{spawn as j}from"node:child_process";import{closeSync as J,existsSync as m,mkdirSync as v,openSync as K,readFileSync as V,statSync as X}from"node:fs";import{rm as W}from"node:fs/promises";import{basename as D,dirname as y,join as h}from"node:path";import{fileURLToPath as Y}from"node:url";import{emitEvent as q}from"../../../events/emit.js";import{contextDir as z,jobDir as Q,nodeRunDir as M,crtrHome as L,viewSocketPath as Z}from"../../../canvas/paths.js";import{captureTeardownSnapshot as ee,isAnyPidAlive as ne,killProcessTreePids as A,listProcessTableAsync as oe}from"../../../canvas/pid.js";import{scopesFilePath as G}from"../../../canvas/paths.js";import{writeFileBeneath as b}from"../../../spaces/open-beneath.js";import{FRONT_DOOR_ENV as te}from"../../front-door-env.js";import{brokerCommandDeclaresCanvasHome as re}from"../../broker-ownership.js";import{isShippedCanvasExtension as ie}from"../../../canvas/extensions.js";import{CANVAS_EXTENSIONS as ce,mergeCanvasExtensions as se}from"../../canvas-extensions.js";import{layoutRoot as ae,runtimeRoot as de}from"../../../layout.js";import{composeAppProcessEnv as ue,overlayBrokerEnv as fe}from"../../spawn-env.js";const R=c(()=>h(y(Y(import.meta.url)),"..","..","broker-cli.js"),"brokerEntry");function le(n){const r=n===void 0?{}:JSON.parse(n),t=h(y(R()),"..","..","builtin-pi-packages","pi-crtr-extensions"),e=(r.packages??[]).filter(o=>!/pi-crtr-extensions/.test(typeof o=="string"?o:String(o.source)));return`${JSON.stringify({...r,packages:[t,...e]},null,2)}
|
|
2
|
+
`}c(le,"withBundledExtensions");const H=c(n=>{if(n!==void 0)try{process.kill(-n,"SIGKILL")}catch{}},"killGroup"),pe=c(n=>new Promise(r=>setTimeout(r,n)),"sleep");async function U(){const n=[],r=await oe();if(r===null)throw new Error("the process table could not be read, so which brokers are running is unknown");for(const{pid:t,command:e}of r){const o=/broker-cli\.js .*--epoch (\S+) (\S+)\s*$/.exec(e);o!==null&&n.push({pid:t,execution:o[1],node:o[2],command:e})}return n}c(U,"findBrokers");const me=["CRTR_HOME","CRTR_RUNTIME_HOME"];function F(n,r){const t={...n};for(const e of me)delete t[e];return t.CRTR_CONTEXT_DIR!==void 0&&(t.CRTR_CONTEXT_DIR=z(r.id,t.CRTR_GRANTEE??r.app)),t.CRTR_SCOPES_FILE!==void 0&&(t.CRTR_SCOPES_FILE=G(r.id)),t}c(F,"localLaunchEnv");function he(n){const r=c(i=>D(i).replace(/\.[jt]s$/,""),"stem"),t=new Set(ce.map(r)),e=c(i=>ie(i)||D(y(i))==="pi-extensions"&&(t.has(r(i))||r(i).startsWith("canvas-")&&!m(i)),"shipped"),o=[],s=[];for(let i=0;i<n.length;i++)if(n[i]==="-e"&&n[i+1]!==void 0){const d=n[++i];if(e(d))continue;if(!m(d))throw new Error(`extension ${d} does not exist on this machine`);s.push(d)}else o.push(n[i]);return[...se(s).flatMap(i=>["-e",i]),...o]}c(he,"localExtensionArgv");function we(n,r,t){const e=JSON.parse(n);return JSON.stringify({...e,argv:he(e.argv),env:F(e.env??{},r),...t===void 0?{}:{start:t}})}c(we,"machineLaunchRecipe");function Ee(n,r,t){const e=n.launch,o=fe({argv:[],env:F(e.env??{},n.node)},ue(n.node.cwd,null,n.node.app,n.machine_env??{},{}));return Object.assign(o,{CRTR_HOME:ae(),CRTR_RUNTIME_HOME:process.env.CRTR_RUNTIME_HOME??de(),CRTR_API_URL:r.apiUrl,CRTR_EXECUTION_ID:t,CRTR_ENVIRONMENT_ID:r.environmentId,CRTR_VIEW_WSS:"0",[te]:"1"})}c(Ee,"machineBrokerEnv");async function $(n,r,t){const{tree:e,identities:o}=ee(n,null,t);if(o===null)return{confirmed:!1,error:`the process tree of broker ${n} could not be read, so shutdown cannot be confirmed`};const s=c(async(i,d)=>{for(let l=0;ne(i);l+=100){if(l>=d)return!1;await pe(100)}return!0},"waitUntilDead");try{process.kill(n,"SIGTERM")}catch{}return await s([n],r),A(e,"SIGTERM",o),await s(e,2e3)?{confirmed:!0}:(A(e,"SIGKILL",o),await s(e,5e3)?{confirmed:!0}:{confirmed:!1,error:`broker process tree of ${n} survived SIGKILL`})}c($,"stopBroker");async function Ae(n=1e4){const t=(await Promise.all((await U()).filter(e=>re(e.command,L())).map(e=>$(e.pid,n)))).filter(e=>!e.confirmed);if(t.length>0)throw new Error(t.map(e=>e.error??"a broker did not stop").join("; "))}c(Ae,"stopAllBrokers");function Ge(n){const r=(n.stopGraceS??10)*1e3,t=c(async e=>(await U()).find(o=>o.execution===e),"brokerOf");return{async start(e,o){const s={};let i=performance.now();const d=c(a=>{const u=performance.now();s[a]=Math.round((u-i)*10)/10,i=u},"stepDone"),l=await t(e.executionId);if(d("process_lookup"),l!==void 0)return{pid:l.pid,timings:s};if(o?.throwIfAborted(),!m(e.cwd)||!X(e.cwd).isDirectory())throw new Error(`the node's cwd ${e.cwd} is not a directory on this machine`);if(!m(R()))throw new Error(`the broker entry ${R()} does not exist`);if(e.bundle===void 0)throw new Error("the control plane carried no start bundle: it runs an older release than this Mac");const{bundle:_}=e,C=_.launch,w=M(e.nodeId);v(w,{recursive:!0}),b(w,h(w,"broker-launch.json"),we(e.launchJson,_.node,e.start),{atomic:!0,mode:384}),C.env?.CRTR_SCOPES_FILE!==void 0&&b(w,G(e.nodeId),JSON.stringify(C.scopes??[]),{atomic:!0});const O=Q(e.nodeId);v(O,{recursive:!0});const I=K(h(O,"broker.log"),"a"),k=Ee(_,n,e.executionId),S=k.PI_CODING_AGENT_DIR,x=h(S,"settings.json");v(S,{recursive:!0}),b(S,x,le(m(x)?V(x,"utf8"):void 0),{atomic:!0}),delete k.CRTR_NODE_TOKEN,d("file_writes");try{o?.throwIfAborted();const a=j(process.execPath,[R(),"--canvas-home",L(),"--epoch",e.executionId,e.nodeId],{cwd:e.cwd,detached:!0,stdio:["ignore",I,I,"pipe"],env:k});let u,N=!1;const P=c(()=>{u!==void 0&&n.onExit?.({execution:e.executionId,node:e.nodeId,...u})},"report");a.once("exit",(T,f)=>{u={code:T,signal:f},N&&P()});const p=a.stdio[3];if(p==null||!("end"in p))throw H(a.pid),new Error("broker token pipe did not open");const B=await new Promise((T,f)=>{a.once("error",f),a.once("spawn",()=>{a.off("error",f),p.once("error",E=>{H(a.pid),f(E)}),p.end(e.nodeToken,E=>{E?f(E):T(a.pid)})})});return N=!0,P(),a.unref(),d("spawn_and_token_pipe"),q({level:"info",event:"machine.start.timing",node_id:e.nodeId,fields:{execution:e.executionId,...s}}),{pid:B,timings:s}}finally{J(I)}},async wake({execution:e}){const o=await t(e.executionId);if(o===void 0)return"no_broker";try{return process.kill(o.pid,"SIGUSR1"),"signalled"}catch(s){if(s.code==="ESRCH")return"no_broker";throw s}},async stop({execution:e,options:o}){const s=await t(e.executionId);return s===void 0?{confirmed:!0}:await $(s.pid,r,o.excludePid)},async status({execution:e}){const o=await t(e.executionId);return o===void 0?{state:"gone"}:{state:"running",pid:o.pid}},async delete({nodeId:e}){return await W(M(e),{recursive:!0,force:!0}),null},async viewer({execution:e}){return{kind:"unix",path:Z(e.nodeId)}}}}c(Ge,"createMachineExecutor");export{Ge as createMachineExecutor,U as findBrokers,he as localExtensionArgv,Ee as machineBrokerEnv,we as machineLaunchRecipe,Ae as stopAllBrokers,le as withBundledExtensions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var d=Object.defineProperty;var s=(a,t)=>d(a,"name",{value:t,configurable:!0});import{withCanvasWrite as l}from"../canvas/db.js";import{applyOpsToRows as w,readSnapshotFromRows as O}from"./person-rows.js";import{emitEvent as E}from"../events/emit.js";import{appRevisionOf as g}from"./person-store.js";import{TERMINAL_APP as c}from"./imported-mac-installs.js";const o={name:"crouter-official-marketplace",url:"https://github.com/crouton-labs/crouter-official-marketplace.git"},S=["capture"],m=s(a=>`terminal_defaults_seeded:${a}`,"seededKey");async function R(){const a=(await l(async e=>await e.prepare("SELECT DISTINCT sub FROM grants WHERE grantee = 'app:terminal' AND status = 'active'").all())).map(e=>e.sub),t=[];for(const e of a)try{await l(async r=>{if(await r.prepare("SELECT 1 FROM canvas_meta WHERE key = ?").get(m(e))!==void 0)return!1;const n=(await O(r,e)).apps[c],p=n===void 0||Object.keys(n.plugins).length===0&&Object.keys(n.marketplaces).length===0;if(p){const u=Object.fromEntries(S.map(f=>[f,{enabled:!0,source_marketplace:o.name}]));await w(r,e,[{op:"app-plugins.replace",app:c,plugins:u,marketplaces:{[o.name]:{url:o.url,ref:"main",installed_at:new Date().toISOString()}},ifRevision:g(n)}])}return await r.prepare("INSERT INTO canvas_meta (key, value) VALUES (?, ?) ON CONFLICT (key) DO NOTHING").run(m(e),new Date().toISOString()),p})&&t.push(e)}catch(i){E({level:"warn",event:"daemon.settings.terminal_defaults_failed",fields:{person:e},error:i})}return t}s(R,"seedTerminalDefaults");export{R as seedTerminalDefaults,m as seededKey};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var H=Object.defineProperty;var o=(t,r)=>H(t,"name",{value:r,configurable:!0});import{chmodSync as U,closeSync as G,existsSync as L,mkdirSync as b,openSync as N,unlinkSync as J,writeFileSync as Y,rmSync as M}from"node:fs";import{createServer as K}from"node:http";import{dirname as X,join as z}from"node:path";import{spawn as F}from"node:child_process";import{SELF_UPDATE_SCRIPT as V}from"../core/self-update.js";import{apiSocketPath as W,crtrHome as P}from"../core/canvas/paths.js";import{bindDaemonEventSource as $}from"../core/events/source.js";import{emitEvent as a}from"../core/events/emit.js";import{brokerCommandDeclaresCanvasHome as Q}from"../core/runtime/broker-ownership.js";import{createMachineExecutor as Z,findBrokers as q,stopAllBrokers as ee}from"../core/runtime/runner/machine/executor.js";import{machineCheckoutHandlers as ne}from"../core/checkout-identities.js";import{machineWorktreeHandlers as te}from"../core/worktree-machine.js";import{readPersonCredential as oe}from"../core/directory/person-credential.js";import{socketDir as re}from"../core/layout.js";import{isDaemonRunning as ie,pidfilePath as y,readPidfile as ae}from"./pidfile.js";import{spawnDaemon as se}from"./manage.js";import{processGeneration as ce}from"../commands/sys/shared.js";import{cancelMachineCron as de,runMachineCron as le,stopOrphanedMachineCrons as me}from"./cron/machine-exec.js";import{startMachineLink as fe}from"./machine-link/client.js";import{readMachineConfig as pe,readMachineCredential as C}from"./machine-link/config.js";import{jobExitReporting as ue,stopMachineJob as he}from"./machine-link/job-sweep.js";import{machineSupervision as ve,SUPERVISION_TICK_MS as we}from"./machine-supervision.js";import{startBrokerMemoryCap as _e}from"./broker-memory-cap.js";const D=10*6e4,Se=3e4,ye=75;let g=0;function ge(t,r){if(Date.now()-g<D||!/^\d+\.\d+\.\d+$/.test(t))return;g=Date.now(),a({level:"warn",event:"daemon.machine.updating",fields:{release:t}});const s=N(z(P(),"crtrd.err"),"a"),i=F(process.execPath,[V,"--version",t],{stdio:["ignore",s,s]});G(s),i.on("error",c=>a({level:"error",event:"daemon.machine.update_failed",fields:{release:t},error:c})),i.on("exit",c=>{if(c===ye){g=Date.now()-D+Se;return}if(c!==0){a({level:"error",event:"daemon.machine.update_failed",fields:{release:t,exit_code:c}});return}r()})}o(ge,"updateToRelease");const R=1024;function Ie(t,r){return{ok:!0,daemon_up:!0,store_accessible:!1,brokers_reconciled:!1,link_connected:t,signed_in:r,generation_id:ce()?.id??null,startup_phase:t?"ready":"recovering"}}o(Ie,"machineHealth");async function Ve(){const t=pe();if(t===void 0)throw new Error("crtrd --role machine needs runtime/machine.json: this install has not been imported as a machine");const r=oe()!==void 0;if(r&&C(),ie())throw new Error("a crtrd is already running for this home");$(),r||(await ee(),await me(),a({level:"info",event:"daemon.machine.signed_out",fields:{environment:t.environmentId}})),b(re(),{recursive:!0,mode:493});const s=W();L(s)&&J(s);let i;const c=ue(()=>i),f=K((e,n)=>{const d=(e.url??"").split("?")[0];if(e.method==="POST"&&(d==="/job-exit"||d==="/job-activity")){const k=[];let S=0;e.on("data",l=>{S+=l.length,S<=R&&k.push(l)}),e.on("end",()=>{if(S>R){n.writeHead(413),n.end();return}let l={};try{l=JSON.parse(Buffer.concat(k).toString("utf8"))}catch{}const T=typeof l.node=="string"&&typeof l.job=="string";n.writeHead(T?202:400,{"content-type":"application/json; charset=utf-8"}),n.end("{}"),T&&(d==="/job-exit"?c.notice:c.activity)(l.node,l.job)});return}const x=(e.method??"GET")==="GET"&&(e.url??"/").split("?")[0]==="/healthz";n.writeHead(x?200:404,{"content-type":"application/json; charset=utf-8"}),n.end(JSON.stringify(x?Ie(i?.connected()===!0,r):{error:{code:"not_found",message:"a machine-role crtrd serves only /healthz",origin:"runtime"}}))});await new Promise((e,n)=>{f.once("error",n),f.listen(s,()=>{f.off("error",n),U(s,384),e()})}),b(X(y()),{recursive:!0}),Y(y(),String(process.pid),"utf8");let I;const u=new Set,h=new Set;let v=!1;const m=Z({apiUrl:t.apiUrl,environmentId:t.environmentId,onExit:o(e=>i?.reportExit(e),"onExit")}),O=o(async(e,n)=>{u.add(e.executionId);for(const d of h)d.add(e.executionId);try{return await m.start(e,n)}finally{u.delete(e.executionId)}},"start");i=r?fe({apiUrl:t.apiUrl,environmentId:t.environmentId,credential:C,onOpen:o(()=>{c.onOpen(),v=!0},"onOpen"),onBehind:o(e=>ge(e,B),"onBehind"),handlers:{start:O,wake:m.wake,stop:m.stop,status:m.status,delete:m.delete,viewer:m.viewer,"cron.run":le,"cron.cancel":de,"job.stop":o(e=>he(e),"job.stop"),...te,...ne}}):void 0;const E=i===void 0?void 0:ve({link:i,brokers:o(async()=>{const e=new Set(u);h.add(e);const n=await q().finally(()=>h.delete(e));return v&&(v=!1,i?.reportRunning([...new Set([...e,...n.filter(d=>Q(d.command,P())).map(d=>d.execution)])])),n},"brokers"),stop:o((e,n)=>m.stop({execution:{executionId:e,nodeId:n,attempt:0},options:{reason:"yield_stall"}}),"stop")});let w=!1;const j=E===void 0?void 0:setInterval(()=>{w||(w=!0,E(Date.now()).catch(e=>a({level:"error",event:"daemon.machine.supervision_failed",error:e})).finally(()=>{w=!1}))},we),A=_e();a({level:"info",event:"daemon.machine.started",fields:{environment:t.environmentId}}),r&&(async()=>{await(await import("../commands/person-settings.js")).loadPersonSettingsViaApi();const{installed:e,failed:n}=await(await import("../commands/pkg/account-installs.js")).installAccountPlugins();a({level:n.length>0?"warn":"info",event:"daemon.machine.account_plugins",fields:{installed:e,failed:n}})})().catch(e=>a({level:"warn",event:"daemon.machine.account_plugins_failed",error:e}));const _=o(()=>I??=(async()=>{i?.stop(),clearInterval(j),A(),await new Promise(e=>{f.close(()=>e()),f.closeAllConnections()}),ae()===process.pid&&(M(s,{force:!0}),M(y(),{force:!0})),process.off("SIGINT",p),process.off("SIGTERM",p)})(),"teardown"),B=o(async()=>{if(I===void 0){await _();try{const e=await se();a({level:"info",event:"daemon.machine.replaced",fields:{successor_pid:e.pid??e.existing_pid??null}}),process.exit(0)}catch(e){a({level:"error",event:"daemon.machine.successor_failed",error:e}),process.exit(1)}}},"replaceSelf"),p=o(()=>{_().then(()=>process.exit(0),()=>process.exit(1))},"onSignal");return process.on("SIGINT",p),process.on("SIGTERM",p),_}o(Ve,"runMachineDaemon");export{Ie as machineHealth,Ve as runMachineDaemon};
|
|
@@ -16,11 +16,11 @@ npm install -g @north-light/cli
|
|
|
16
16
|
crtr
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
The first time you run `crtr` on a machine, it opens the setup installer. Sign in to your Northlight account first (`crtr sys signin`, see [Sign in a machine to your Northlight account](/docs/cli/join-northlight)).
|
|
19
|
+
The first time you run `crtr` on a machine, it opens the setup installer. Sign in to your Northlight account first (`crtr sys signin`, see [Sign in a machine to your Northlight account](/docs/cli/join-northlight)). Signing in installs the plugins your account lists (a new account lists the official plugin marketplace and `capture`). The installer then offers system dependencies such as tmux. On a Mac, a last step explains how to make Option act as Alt in your terminal (crouter's menu is Alt+C), and can write the setting for you in Ghostty or VS Code after you confirm; until it is set, `/menu` opens the same menu. Next it asks which profile this directory belongs to, then opens a conversation with an agent in the same terminal. That first agent offers a short tour; say yes to learn the viewer, the inbox and document review, or just tell it what you're working on.
|
|
20
20
|
|
|
21
21
|
The conversation viewer is a tmux pane. If you ran `crtr` outside tmux, it starts tmux for you: after setup, the profile choice and sign-in, it opens a tmux session named `crouter` (or adds a window to it, if it already exists) and runs your same command there. Your other tmux sessions are left alone. If tmux is not installed, `crtr` tells you how to install it. The first conversation in a session that `crtr` started shows how to leave and come back: `Ctrl+B d` leaves tmux while the agent keeps running, and `Ctrl+B n` / `Ctrl+B p` switch windows. Run without a terminal (piped or in a script), `crtr` never starts tmux.
|
|
22
22
|
|
|
23
|
-
To reopen the installer later, for example to
|
|
23
|
+
To reopen the installer later, for example to install a missing dependency, run `crtr sys setup`. To add a plugin, run `crtr pkg plugin install <marketplace>/<plugin>`.
|
|
24
24
|
|
|
25
25
|
## Start a conversation
|
|
26
26
|
|
|
@@ -9,7 +9,7 @@ The official marketplace is a git repository, [`crouton-labs/crouter-official-ma
|
|
|
9
9
|
|
|
10
10
|
## Add the marketplace
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
A new Northlight account lists the official marketplace and the `capture` plugin, and a signed-in Mac installs whatever its account lists (after `crtr sys signin`, and when its daemon starts). To add the marketplace by hand:
|
|
13
13
|
|
|
14
14
|
```sh
|
|
15
15
|
crtr pkg market add https://github.com/crouton-labs/crouter-official-marketplace.git
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.784",
|
|
4
4
|
"description": "crtr — agent runtime with memory, plugins, and marketplaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -157,8 +157,8 @@
|
|
|
157
157
|
},
|
|
158
158
|
"license": "UNLICENSED",
|
|
159
159
|
"dependencies": {
|
|
160
|
-
"@north-light/identity": "0.3.
|
|
161
|
-
"@north-light/plugin": "0.3.
|
|
160
|
+
"@north-light/identity": "0.3.784",
|
|
161
|
+
"@north-light/plugin": "0.3.784",
|
|
162
162
|
"@earendil-works/chord": "1.5.2",
|
|
163
163
|
"@earendil-works/pi-agent-core": "1.5.2",
|
|
164
164
|
"@earendil-works/pi-ai": "1.5.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/api",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.784",
|
|
4
4
|
"description": "Typed crtrd /v1 API contract — DTOs, route builders, the error contract, the CrtrClient, and the command-plugin manifest format. Zero runtime dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/api/index.js",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/plugin",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.784",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"postpack": "node ../../scripts/pack-minify.mjs postpack packages/crouter-plugin"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@north-light/api": "0.3.
|
|
31
|
-
"@north-light/identity": "0.3.
|
|
30
|
+
"@north-light/api": "0.3.784",
|
|
31
|
+
"@north-light/identity": "0.3.784"
|
|
32
32
|
},
|
|
33
33
|
"license": "UNLICENSED",
|
|
34
34
|
"publishConfig": {
|
package/runtime.lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.784",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@north-light/cli",
|
|
9
|
-
"version": "0.3.
|
|
9
|
+
"version": "0.3.784",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "UNLICENSED",
|
|
12
12
|
"workspaces": [
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"@milkdown/preset-gfm": "^7.22.3",
|
|
29
29
|
"@milkdown/prose": "^7.22.3",
|
|
30
30
|
"@milkdown/utils": "^7.22.3",
|
|
31
|
-
"@north-light/identity": "0.3.
|
|
32
|
-
"@north-light/plugin": "0.3.
|
|
31
|
+
"@north-light/identity": "0.3.784",
|
|
32
|
+
"@north-light/plugin": "0.3.784",
|
|
33
33
|
"cron-parser": "^5.6.0",
|
|
34
34
|
"esbuild": "0.28.2",
|
|
35
35
|
"jose": "^6.2.12",
|
|
@@ -11902,17 +11902,17 @@
|
|
|
11902
11902
|
},
|
|
11903
11903
|
"packages/crouter-api": {
|
|
11904
11904
|
"name": "@north-light/api",
|
|
11905
|
-
"version": "0.3.
|
|
11905
|
+
"version": "0.3.784",
|
|
11906
11906
|
"license": "UNLICENSED"
|
|
11907
11907
|
},
|
|
11908
11908
|
"packages/crouter-env-docker": {
|
|
11909
11909
|
"name": "@north-light/env-docker",
|
|
11910
|
-
"version": "0.3.
|
|
11910
|
+
"version": "0.3.784",
|
|
11911
11911
|
"license": "UNLICENSED"
|
|
11912
11912
|
},
|
|
11913
11913
|
"packages/crouter-identity": {
|
|
11914
11914
|
"name": "@north-light/identity",
|
|
11915
|
-
"version": "0.3.
|
|
11915
|
+
"version": "0.3.784",
|
|
11916
11916
|
"license": "UNLICENSED",
|
|
11917
11917
|
"dependencies": {
|
|
11918
11918
|
"jose": "^6.2.1"
|
|
@@ -11920,21 +11920,21 @@
|
|
|
11920
11920
|
},
|
|
11921
11921
|
"packages/crouter-plugin": {
|
|
11922
11922
|
"name": "@north-light/plugin",
|
|
11923
|
-
"version": "0.3.
|
|
11923
|
+
"version": "0.3.784",
|
|
11924
11924
|
"license": "UNLICENSED",
|
|
11925
11925
|
"dependencies": {
|
|
11926
|
-
"@north-light/api": "0.3.
|
|
11927
|
-
"@north-light/identity": "0.3.
|
|
11926
|
+
"@north-light/api": "0.3.784",
|
|
11927
|
+
"@north-light/identity": "0.3.784"
|
|
11928
11928
|
}
|
|
11929
11929
|
},
|
|
11930
11930
|
"packages/crouter-sdk": {
|
|
11931
11931
|
"name": "@north-light/sdk",
|
|
11932
|
-
"version": "0.3.
|
|
11932
|
+
"version": "0.3.784",
|
|
11933
11933
|
"license": "UNLICENSED",
|
|
11934
11934
|
"dependencies": {
|
|
11935
|
-
"@north-light/api": "0.3.
|
|
11936
|
-
"@north-light/identity": "0.3.
|
|
11937
|
-
"@north-light/plugin": "0.3.
|
|
11935
|
+
"@north-light/api": "0.3.784",
|
|
11936
|
+
"@north-light/identity": "0.3.784",
|
|
11937
|
+
"@north-light/plugin": "0.3.784",
|
|
11938
11938
|
"jose": "^6.2.1"
|
|
11939
11939
|
},
|
|
11940
11940
|
"bin": {
|