@north-light/crouter 0.3.323 → 0.3.324

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.
@@ -1 +1,5 @@
1
- var l=Object.defineProperty;var c=(e,o)=>l(e,"name",{value:o,configurable:!0});import{spawn as u}from"node:child_process";import{inTmux as _,currentTmux as p,viewerSplitEnv as T}from"./placement-tmux.js";import{selectProfileForCwd as h}from"../profiles/select.js";import{cliClient as s}from"../../commands/api-client.js";import{mark as t}from"../timing.js";async function P(e){if(!_())throw new Error("crtr must be started from inside a tmux session \u2014 start tmux first (e.g. `tmux new -s work`), then run `crtr` there.");const o=e.kind;t("boot_root.start");const m=e.selectedProfileId??await h(e.cwd,e.profile,e.pickProfile??!1);t("boot_root.profile_resolved");const n=(await s().createNode({...o!==void 0?{kind:o}:{},mode:"base",prompt:e.prompt,profile:m,cwd:e.cwd,...e.name!==void 0?{name:e.name}:o!==void 0?{name:o}:{},root:!0,prefer_warm:!0})).node_id;t("boot_root.node_created",{node:n});const r=p();if(r!==null)try{await s().registerFocus({node_id:n,pane:r.pane,session:r.session,window:r.window})}catch{}const i={...process.env,...T(),CRTR_ATTACH_WAIT_MS:"30000",...e.prompt!==void 0&&e.prompt!==""?{CRTR_ATTACH_INITIAL_WHIP:"1"}:{}};r!==null&&(i.CRTR_ATTACH_BORROWED_PANE=r.pane),t("boot_root.viewer_spawn");const a=u("crtr",["surface","attach","to",n],{stdio:"inherit",env:i}),f=await new Promise(d=>{a.once("exit",w=>d(w??0)),a.once("error",()=>d(1))});process.exit(f)}c(P,"bootRoot");export{P as bootRoot};
1
+ var l=Object.defineProperty;var s=(e,r)=>l(e,"name",{value:r,configurable:!0});import{spawn as p}from"node:child_process";import{inTmux as u,currentTmux as _,viewerSplitEnv as T}from"./placement-tmux.js";import{selectProfileForCwd as x}from"../profiles/select.js";import{cliClient as m}from"../../commands/api-client.js";import{mark as i}from"../timing.js";async function P(e){if(!u()){const t=process.stderr.isTTY?n=>`\x1B[1;33m${n}\x1B[0m`:n=>n;process.stderr.write(`
2
+ ${t("crtr must be started from inside a tmux session.")}
3
+ ${t("Start tmux first, e.g. tmux new -s work \u2014 then run crtr there.")}
4
+
5
+ `),process.exit(1)}const r=e.kind;i("boot_root.start");const f=e.selectedProfileId??await x(e.cwd,e.profile,e.pickProfile??!1);i("boot_root.profile_resolved");const d=(await m().createNode({...r!==void 0?{kind:r}:{},mode:"base",prompt:e.prompt,profile:f,cwd:e.cwd,...e.name!==void 0?{name:e.name}:r!==void 0?{name:r}:{},root:!0,prefer_warm:!0})).node_id;i("boot_root.node_created",{node:d});const o=_();if(o!==null)try{await m().registerFocus({node_id:d,pane:o.pane,session:o.session,window:o.window})}catch{}const a={...process.env,...T(),CRTR_ATTACH_WAIT_MS:"30000",...e.prompt!==void 0&&e.prompt!==""?{CRTR_ATTACH_INITIAL_WHIP:"1"}:{}};o!==null&&(a.CRTR_ATTACH_BORROWED_PANE=o.pane),i("boot_root.viewer_spawn");const c=p("crtr",["surface","attach","to",d],{stdio:"inherit",env:a}),w=await new Promise(t=>{c.once("exit",n=>t(n??0)),c.once("error",()=>t(1))});process.exit(w)}s(P,"bootRoot");export{P as bootRoot};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/crouter",
3
- "version": "0.3.323",
3
+ "version": "0.3.324",
4
4
  "description": "crtr — agent runtime with memory, plugins, and marketplaces",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/runtime.lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@north-light/crouter",
3
- "version": "0.3.323",
3
+ "version": "0.3.324",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@north-light/crouter",
9
- "version": "0.3.323",
9
+ "version": "0.3.324",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "workspaces": [
@@ -5206,17 +5206,17 @@
5206
5206
  },
5207
5207
  "packages/crouter-api": {
5208
5208
  "name": "@north-light/crouter-api",
5209
- "version": "0.3.323",
5209
+ "version": "0.3.324",
5210
5210
  "license": "UNLICENSED"
5211
5211
  },
5212
5212
  "packages/crouter-env-docker": {
5213
5213
  "name": "@north-light/crouter-env-docker",
5214
- "version": "0.3.323",
5214
+ "version": "0.3.324",
5215
5215
  "license": "UNLICENSED"
5216
5216
  },
5217
5217
  "packages/crouter-sdk": {
5218
5218
  "name": "@north-light/crouter-sdk",
5219
- "version": "0.3.323",
5219
+ "version": "0.3.324",
5220
5220
  "license": "UNLICENSED",
5221
5221
  "dependencies": {
5222
5222
  "@north-light/crouter-api": "^0.3.321"