@lifeaitools/clauth 1.5.78 → 1.5.81

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/cli/index.js CHANGED
@@ -57,6 +57,7 @@ import { runInstall } from './commands/install.js';
57
57
  import { runUninstall } from './commands/uninstall.js';
58
58
  import { runScrub } from './commands/scrub.js';
59
59
  import { runServe } from './commands/serve.js';
60
+ import { runCodevelop } from './commands/codevelop.js';
60
61
 
61
62
  program
62
63
  .command('install')
@@ -89,6 +90,42 @@ program
89
90
  await runUninstall(opts);
90
91
  });
91
92
 
93
+ program
94
+ .command("codevelop")
95
+ .description("Install and launch Claude/Codex co-development terminal sessions")
96
+ .argument("[action]", "install-terminal | start | ask | reply | inbox | listen | request-partner | launch-peer | check-partner | sync | help", "help")
97
+ .option("--repo <path>", "Repo root", "C:\\Dev\\regen-root")
98
+ .option("--port <port>", "Isolated clauth port", "53137")
99
+ .option("--base-url <url>", "Override clauth base URL")
100
+ .option("--name <name>", "Session name")
101
+ .option("--session <idOrManifestPath>", "Co-develop session id or manifest path")
102
+ .option("--task <task>", "Initial partner request task")
103
+ .option("--context <path>", "Context, plan, or architecture file the partner should read first")
104
+ .option("--to <peer>", "Target peer for ask/reply: claude or codex")
105
+ .option("--from <peer>", "Sender peer for ask/reply: claude or codex")
106
+ .option("--turn <turn_id>", "Turn ID for reply")
107
+ .option("--role <role>", "Turn role, e.g. reviewer or builder")
108
+ .option("--skill <skill>", "Requested skill name, e.g. rdc:review")
109
+ .option("--verdict <verdict>", "Reply verdict: pass, fail, or blocked")
110
+ .option("--summary <summary>", "Reply summary")
111
+ .option("--evidence <items>", "Reply evidence; separate multiple items with semicolons")
112
+ .option("--files-changed <items>", "Reply changed files; separate multiple items with semicolons")
113
+ .option("--commits <items>", "Reply commits; separate multiple items with semicolons")
114
+ .option("--blockers <items>", "Reply blockers; separate multiple items with semicolons")
115
+ .option("--next <items>", "Reply next actions; separate multiple items with semicolons")
116
+ .option("--wait", "For ask: wait for a matching reply")
117
+ .option("--once", "For listen: exit after the first message event")
118
+ .option("--timeout-ms <ms>", "Wait timeout in milliseconds", "300000")
119
+ .option("--interval-ms <ms>", "Wait polling interval in milliseconds", "2000")
120
+ .option("--start-isolated-clauth", "Start isolated clauth if the selected port is not running")
121
+ .option("--peer <peer>", "Peer for launch-peer: claude or codex")
122
+ .option("--dry-run", "Print and write session manifest without opening Windows Terminal")
123
+ .option("--no-open", "Create session/config but do not open Windows Terminal")
124
+ .option("--print-only", "For launch-peer: resolve command without starting the CLI")
125
+ .action(async (action, opts) => {
126
+ await runCodevelop({ ...opts, action });
127
+ });
128
+
92
129
  // ──────────────────────────────────────────────
93
130
  // clauth setup
94
131
  // ──────────────────────────────────────────────
@@ -707,6 +744,7 @@ program
707
744
  .option("--services <list>", "Comma-separated service whitelist (default: all)")
708
745
  .option("--tunnel <hostname>", "Fixed tunnel hostname (e.g. clauth.prtrust.fund) — uses named Cloudflare Tunnel instead of random URL")
709
746
  .option("--staged", "Start on staging port (52438) for blue-green verification before make-live")
747
+ .option("--isolated", "Run on a non-live port without touching live PID files, browser, or boot-key credentials")
710
748
  .option("--action <action>", "Internal: action override for daemon child")
711
749
  .addHelpText("after", `
712
750
  Actions:
@@ -734,6 +772,8 @@ Examples:
734
772
  clauth serve start --services github,vercel
735
773
  clauth serve mcp Start MCP server for Claude Code
736
774
  clauth serve mcp -p mypass Start MCP server pre-unlocked
775
+ clauth serve foreground --port 53137 --isolated
776
+ Start isolated passwordless server for route tests
737
777
  clauth serve install Set up auto-start on login (DPAPI/Keychain/libsecret)
738
778
  clauth serve install --tunnel host Auto-start with Cloudflare Tunnel
739
779
  clauth serve uninstall Remove auto-start
@@ -16,7 +16,6 @@ const APP_TARGETS = {
16
16
  packageName: "@regen/studio",
17
17
  command: "pnpm --filter @regen/studio dev",
18
18
  url: "http://localhost:3011/editor/local-test-target",
19
- hmrUrl: "http://localhost:3011/_next/webpack-hmr",
20
19
  },
21
20
  "studio-test": {
22
21
  appSlug: "studio_test",
@@ -24,7 +23,6 @@ const APP_TARGETS = {
24
23
  packageName: "@regen/studio",
25
24
  command: "pnpm --filter @regen/studio dev",
26
25
  url: "http://localhost:3011/editor/local-test-target",
27
- hmrUrl: "http://localhost:3011/_next/webpack-hmr",
28
26
  },
29
27
  prt: {
30
28
  appSlug: "prt",
@@ -32,7 +30,6 @@ const APP_TARGETS = {
32
30
  packageName: "@regen/prt-portal",
33
31
  command: "pnpm --filter @regen/prt-portal dev",
34
32
  url: "http://localhost:3006",
35
- hmrUrl: "http://localhost:3006/_next/webpack-hmr",
36
33
  },
37
34
  "prt-portal": {
38
35
  appSlug: "prt",
@@ -40,7 +37,6 @@ const APP_TARGETS = {
40
37
  packageName: "@regen/prt-portal",
41
38
  command: "pnpm --filter @regen/prt-portal dev",
42
39
  url: "http://localhost:3006",
43
- hmrUrl: "http://localhost:3006/_next/webpack-hmr",
44
40
  },
45
41
  };
46
42
 
@@ -114,21 +110,6 @@ async function isUrlReachable(url) {
114
110
  }
115
111
  }
116
112
 
117
- async function isNextDevServer(target) {
118
- if (!target.hmrUrl) return true;
119
- try {
120
- const response = await fetch(target.hmrUrl, {
121
- method: "GET",
122
- redirect: "manual",
123
- signal: AbortSignal.timeout(1_500),
124
- });
125
- const contentType = response.headers.get("content-type") || "";
126
- return response.status === 200 && contentType.includes("text/event-stream");
127
- } catch {
128
- return false;
129
- }
130
- }
131
-
132
113
  function resolveTarget(input = {}) {
133
114
  const slug = String(input.appSlug || input.brandSlug || "prt").toLowerCase();
134
115
  const configured = APP_TARGETS[slug];
@@ -152,7 +133,6 @@ function resolveTarget(input = {}) {
152
133
  brandSlug: input.brandSlug || base.brandSlug || input.appSlug || base.appSlug,
153
134
  command: input.devCommand || base.command,
154
135
  url: input.devUrl || base.url,
155
- hmrUrl: input.hmrUrl || base.hmrUrl,
156
136
  cwd: input.cwd || input.repoRoot || process.cwd(),
157
137
  };
158
138
  }
@@ -216,23 +196,6 @@ export class StudioDebugSessionStore {
216
196
 
217
197
  const shouldLaunch = input.launchDevServer !== false;
218
198
  const reachable = await isUrlReachable(target.url);
219
- const devReady = reachable ? await isNextDevServer(target) : false;
220
- if (reachable && shouldLaunch && !devReady && target.hmrUrl) {
221
- return {
222
- ok: false,
223
- error: "non_dev_server",
224
- message: `${target.url} is reachable, but ${target.hmrUrl} is not a Next dev HMR stream. Stop the process on that port and start ${target.command}.`,
225
- status: "error",
226
- launch: {
227
- started: false,
228
- alreadyRunning: true,
229
- command: target.command,
230
- url: target.url,
231
- pid: null,
232
- },
233
- };
234
- }
235
-
236
199
  const launch = reachable
237
200
  ? { started: false, command: target.command, url: target.url, alreadyRunning: true }
238
201
  : shouldLaunch
package/install.ps1 CHANGED
@@ -100,10 +100,24 @@ if (Test-Path $autostartScript) {
100
100
  $lnk.Save()
101
101
  Write-Host " + Autostart registered via Startup folder (15s delay, crash-recovery loop active)." -ForegroundColor Green
102
102
  }
103
- } else {
104
- Write-Host ""
105
- Write-Host " ! autostart.ps1 not found - skipping autostart registration." -ForegroundColor Yellow
106
- Write-Host " Run: clauth autostart install" -ForegroundColor Gray
107
- }
108
-
109
- exit $LASTEXITCODE
103
+ } else {
104
+ Write-Host ""
105
+ Write-Host " ! autostart.ps1 not found - skipping autostart registration." -ForegroundColor Yellow
106
+ Write-Host " Run: clauth autostart install" -ForegroundColor Gray
107
+ }
108
+
109
+ Write-Host ""
110
+ Write-Host " Installing co-development Windows Terminal profiles..." -ForegroundColor Cyan
111
+ try {
112
+ & clauth codevelop install-terminal --repo "C:\Dev\regen-root"
113
+ if ($LASTEXITCODE -eq 0) {
114
+ Write-Host " + Co-development terminal profiles installed." -ForegroundColor Green
115
+ } else {
116
+ Write-Host " ! Co-development terminal profile install returned exit code $LASTEXITCODE." -ForegroundColor Yellow
117
+ }
118
+ } catch {
119
+ Write-Host " ! Co-development terminal profile install skipped: $($_.Exception.Message)" -ForegroundColor Yellow
120
+ Write-Host " Run later: clauth codevelop install-terminal --repo C:\Dev\regen-root" -ForegroundColor Gray
121
+ }
122
+
123
+ exit $LASTEXITCODE
package/package.json CHANGED
@@ -1,61 +1,61 @@
1
- {
2
- "name": "@lifeaitools/clauth",
3
- "version": "1.5.78",
4
- "description": "Hardware-bound credential vault for the LIFEAI infrastructure stack",
5
- "type": "module",
6
- "bin": {
7
- "clauth": "./cli/index.js"
8
- },
9
- "scripts": {
10
- "build": "bash scripts/build.sh",
11
- "postinstall": "node scripts/postinstall.js",
12
- "worker:start": "node cli/index.js serve",
13
- "worker:stop": "curl -s http://127.0.0.1:52437/shutdown 2>nul || taskkill /F /IM cloudflared.exe 2>nul & exit 0",
14
- "worker:restart": "npm run worker:stop && timeout /t 3 /nobreak >nul && npm run worker:start"
15
- },
16
- "dependencies": {
17
- "chalk": "^5.3.0",
18
- "commander": "^12.1.0",
19
- "conf": "^13.0.0",
20
- "inquirer": "^10.1.0",
21
- "node-fetch": "^3.3.2",
22
- "ora": "^8.1.0",
23
- "@vscode/ripgrep": "^1.15.9",
24
- "fast-glob": "^3.3.2"
25
- },
26
- "engines": {
27
- "node": ">=18.0.0"
28
- },
29
- "keywords": [
30
- "lifeai",
31
- "credentials",
32
- "vault",
33
- "cli",
34
- "prt"
35
- ],
36
- "author": "Dave Ladouceur <dave@life.ai>",
37
- "license": "MIT",
38
- "repository": {
39
- "type": "git",
40
- "url": "https://github.com/LIFEAI/clauth.git"
41
- },
42
- "devDependencies": {
43
- "javascript-obfuscator": "^5.3.0"
44
- },
45
- "files": [
46
- "cli/",
47
- "scripts/bin/",
48
- "scripts/bootstrap.cjs",
49
- "scripts/build.sh",
50
- "scripts/postinstall.js",
51
- "supabase/",
52
- ".clauth-skill/",
53
- "install.sh",
54
- "install.ps1",
55
- "README.md"
56
- ],
57
- "publishConfig": {
58
- "access": "public"
59
- },
60
- "homepage": "https://github.com/LIFEAI/clauth"
61
- }
1
+ {
2
+ "name": "@lifeaitools/clauth",
3
+ "version": "1.5.81",
4
+ "description": "Hardware-bound credential vault for the LIFEAI infrastructure stack",
5
+ "type": "module",
6
+ "bin": {
7
+ "clauth": "./cli/index.js"
8
+ },
9
+ "scripts": {
10
+ "build": "bash scripts/build.sh",
11
+ "postinstall": "node scripts/postinstall.js",
12
+ "worker:start": "node cli/index.js serve",
13
+ "worker:stop": "curl -s http://127.0.0.1:52437/shutdown 2>nul || taskkill /F /IM cloudflared.exe 2>nul & exit 0",
14
+ "worker:restart": "npm run worker:stop && timeout /t 3 /nobreak >nul && npm run worker:start"
15
+ },
16
+ "dependencies": {
17
+ "chalk": "^5.3.0",
18
+ "commander": "^12.1.0",
19
+ "conf": "^13.0.0",
20
+ "inquirer": "^10.1.0",
21
+ "node-fetch": "^3.3.2",
22
+ "ora": "^8.1.0",
23
+ "@vscode/ripgrep": "^1.15.9",
24
+ "fast-glob": "^3.3.2"
25
+ },
26
+ "engines": {
27
+ "node": ">=18.0.0"
28
+ },
29
+ "keywords": [
30
+ "lifeai",
31
+ "credentials",
32
+ "vault",
33
+ "cli",
34
+ "prt"
35
+ ],
36
+ "author": "Dave Ladouceur <dave@life.ai>",
37
+ "license": "MIT",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "https://github.com/LIFEAI/clauth.git"
41
+ },
42
+ "devDependencies": {
43
+ "javascript-obfuscator": "^5.3.0"
44
+ },
45
+ "files": [
46
+ "cli/",
47
+ "scripts/bin/",
48
+ "scripts/bootstrap.cjs",
49
+ "scripts/build.sh",
50
+ "scripts/postinstall.js",
51
+ "supabase/",
52
+ ".clauth-skill/",
53
+ "install.sh",
54
+ "install.ps1",
55
+ "README.md"
56
+ ],
57
+ "publishConfig": {
58
+ "access": "public"
59
+ },
60
+ "homepage": "https://github.com/LIFEAI/clauth"
61
+ }
@@ -90,6 +90,25 @@ function startWatchdog() {
90
90
  ], { stdio: "pipe", timeout: 5000 });
91
91
  }
92
92
 
93
+ function installCodevelopTerminalProfiles() {
94
+ const cli = path.join(__dirname, "..", "cli", "index.js");
95
+ const result = spawnSync(process.execPath, [
96
+ cli,
97
+ "codevelop",
98
+ "install-terminal",
99
+ "--repo",
100
+ "C:\\Dev\\regen-root",
101
+ ], { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"], timeout: 10000 });
102
+
103
+ if (result.status === 0) {
104
+ console.log(" ✓ Co-development Windows Terminal profiles installed");
105
+ } else {
106
+ const msg = (result.stderr || result.stdout || "").trim();
107
+ console.log(` ! Co-development terminal profile install skipped${msg ? `: ${msg}` : ""}`);
108
+ console.log(" Install later with: clauth codevelop install-terminal --repo C:\\Dev\\regen-root");
109
+ }
110
+ }
111
+
93
112
  // ----------------------------------------------------------------
94
113
  // Main
95
114
  // ----------------------------------------------------------------
@@ -136,6 +155,7 @@ async function main() {
136
155
  writeWatchdogScript(); // refresh script on upgrade
137
156
  console.log(" \u2713 Watchdog script updated");
138
157
  }
158
+ installCodevelopTerminalProfiles();
139
159
  }
140
160
 
141
161
  console.log(" Run 'clauth doctor' to verify installation\n");