clawrp 0.3.2 → 0.3.3

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.js CHANGED
@@ -4102,24 +4102,39 @@ import pc2 from "picocolors";
4102
4102
  function printClawrpCliBanner() {
4103
4103
  const lines = [
4104
4104
  "",
4105
- ...CLAWRP_ART.map((line) => pc2.cyan(line)),
4106
- pc2.blue(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),
4105
+ ...LOBSTER.map((line) => pc2.red(line)),
4106
+ "",
4107
+ pc2.redBright(pc2.bold(" clawrp")) + pc2.white(" corp"),
4108
+ pc2.red(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),
4107
4109
  pc2.bold(pc2.white(` ${TAGLINE}`)),
4108
4110
  ""
4109
4111
  ];
4110
4112
  console.log(lines.join("\n"));
4111
4113
  }
4112
- var CLAWRP_ART, TAGLINE;
4114
+ var LOBSTER, TAGLINE;
4113
4115
  var init_banner = __esm({
4114
4116
  "src/utils/banner.ts"() {
4115
4117
  "use strict";
4116
- CLAWRP_ART = [
4117
- " \u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 ",
4118
- "\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557",
4119
- "\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D",
4120
- "\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u255D ",
4121
- "\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2554\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 ",
4122
- " \u255A\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u255D\u255A\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D "
4118
+ LOBSTER = [
4119
+ " ____ ",
4120
+ " / __\\ ",
4121
+ " |: /---) \\ / ___ ",
4122
+ " \\:( _/ \\ / /_ \\ ",
4123
+ " \\ \\ \\/ \\_\\::) ",
4124
+ ' \\_ \\ _0""0_ / _/ ',
4125
+ " \\ \\/= \\/ =\\/ / ",
4126
+ " \\ | (||) | / ",
4127
+ " \\_\\______/_/ ",
4128
+ " __// \\\\__ ",
4129
+ " /__//====\\\\__\\ ",
4130
+ " _ //__//====\\\\__\\\\ _ ",
4131
+ " _ //__//====\\\\__\\\\ _ ",
4132
+ " _ // /( )\\ \\\\ _ ",
4133
+ " _ / /( )\\ \\ _ ",
4134
+ " |( )| ",
4135
+ " / \\ ",
4136
+ " / /||\\ \\ ",
4137
+ " \\:_/\\_:/ "
4123
4138
  ];
4124
4139
  TAGLINE = "The AI Corp \u2014 self-hosted autonomous agent platform";
4125
4140
  }
@@ -4715,7 +4730,7 @@ import * as p8 from "@clack/prompts";
4715
4730
  import pc3 from "picocolors";
4716
4731
  async function doctor(opts) {
4717
4732
  printClawrpCliBanner();
4718
- p8.intro(pc3.bgCyan(pc3.black(" clawrp doctor ")));
4733
+ p8.intro(pc3.bgRed(pc3.white(" clawrp doctor ")));
4719
4734
  const configPath = resolveConfigPath(opts.config);
4720
4735
  const results = [];
4721
4736
  const cfgResult = configCheck(opts.config);
@@ -19702,7 +19717,7 @@ async function runCommand(opts) {
19702
19717
  fs21.mkdirSync(paths.instanceRoot, { recursive: true });
19703
19718
  const configPath = resolveConfigPath(opts.config);
19704
19719
  process.env.CLAWRP_CONFIG = configPath;
19705
- p9.intro(pc4.bgCyan(pc4.black(" clawrp run ")));
19720
+ p9.intro(pc4.bgRed(pc4.white(" clawrp run ")));
19706
19721
  p9.log.message(pc4.dim(`Home: ${paths.homeDir}`));
19707
19722
  p9.log.message(pc4.dim(`Instance: ${paths.instanceId}`));
19708
19723
  p9.log.message(pc4.dim(`Config: ${configPath}`));
@@ -19916,7 +19931,7 @@ function quickstartDefaultsFromEnv() {
19916
19931
  }
19917
19932
  async function onboard(opts) {
19918
19933
  printClawrpCliBanner();
19919
- p10.intro(pc5.bgCyan(pc5.black(" clawrp onboard ")));
19934
+ p10.intro(pc5.bgRed(pc5.white(" clawrp onboard ")));
19920
19935
  const configPath = resolveConfigPath(opts.config);
19921
19936
  const instance = describeLocalInstancePaths(resolveClawrpInstanceId());
19922
19937
  p10.log.message(
@@ -20065,14 +20080,37 @@ ${err instanceof Error ? err.message : String(err)}`
20065
20080
  p10.log.message(pc5.dim(`Ignored ${ignored.key}: ${ignored.reason}`));
20066
20081
  }
20067
20082
  }
20083
+ {
20084
+ const s = p10.spinner();
20085
+ s.start("Checking Claude Code CLI...");
20086
+ try {
20087
+ const { execSync: execSync2 } = await import("node:child_process");
20088
+ const version = execSync2("claude --version", { encoding: "utf8", timeout: 5e3 }).trim();
20089
+ s.stop(`Claude Code CLI detected: ${pc5.green(version)}`);
20090
+ const authSpinner = p10.spinner();
20091
+ authSpinner.start("Verifying Claude Code authentication...");
20092
+ try {
20093
+ execSync2('claude -p "respond with OK" --max-turns 1', {
20094
+ encoding: "utf8",
20095
+ timeout: 3e4,
20096
+ stdio: ["pipe", "pipe", "pipe"]
20097
+ });
20098
+ authSpinner.stop(pc5.green("Claude Code is authenticated and ready"));
20099
+ } catch {
20100
+ authSpinner.stop(pc5.yellow("Claude Code is installed but not authenticated \u2014 run: claude login"));
20101
+ }
20102
+ } catch {
20103
+ s.stop(pc5.yellow("Claude Code CLI not found \u2014 install it: npm install -g @anthropic-ai/claude-code"));
20104
+ }
20105
+ }
20068
20106
  const jwtSecret = ensureAgentJwtSecret(configPath);
20069
20107
  const envFilePath = resolveAgentJwtEnvFile(configPath);
20070
20108
  if (jwtSecret.created) {
20071
- p10.log.success(`Created ${pc5.cyan("CLAWRP_AGENT_JWT_SECRET")} in ${pc5.dim(envFilePath)}`);
20109
+ p10.log.success(`Created ${pc5.red("CLAWRP_AGENT_JWT_SECRET")} in ${pc5.dim(envFilePath)}`);
20072
20110
  } else if (process.env.CLAWRP_AGENT_JWT_SECRET?.trim()) {
20073
- p10.log.info(`Using existing ${pc5.cyan("CLAWRP_AGENT_JWT_SECRET")} from environment`);
20111
+ p10.log.info(`Using existing ${pc5.red("CLAWRP_AGENT_JWT_SECRET")} from environment`);
20074
20112
  } else {
20075
- p10.log.info(`Using existing ${pc5.cyan("CLAWRP_AGENT_JWT_SECRET")} in ${pc5.dim(envFilePath)}`);
20113
+ p10.log.info(`Using existing ${pc5.red("CLAWRP_AGENT_JWT_SECRET")} in ${pc5.dim(envFilePath)}`);
20076
20114
  }
20077
20115
  const config2 = {
20078
20116
  $meta: {
@@ -20111,9 +20149,9 @@ ${err instanceof Error ? err.message : String(err)}`
20111
20149
  );
20112
20150
  p10.note(
20113
20151
  [
20114
- `Run: ${pc5.cyan("clawrp run")}`,
20115
- `Reconfigure later: ${pc5.cyan("clawrp configure")}`,
20116
- `Diagnose setup: ${pc5.cyan("clawrp doctor")}`
20152
+ `Run: ${pc5.red("clawrp run")}`,
20153
+ `Reconfigure later: ${pc5.red("clawrp configure")}`,
20154
+ `Diagnose setup: ${pc5.red("clawrp doctor")}`
20117
20155
  ].join("\n"),
20118
20156
  "Next commands"
20119
20157
  );
@@ -20209,7 +20247,7 @@ function defaultStorageBaseDir2() {
20209
20247
  return resolveDefaultStorageDir(resolveClawrpInstanceId());
20210
20248
  }
20211
20249
  async function envCommand(opts) {
20212
- p11.intro(pc6.bgCyan(pc6.black(" clawrp env ")));
20250
+ p11.intro(pc6.bgRed(pc6.white(" clawrp env ")));
20213
20251
  const configPath = resolveConfigPath(opts.config);
20214
20252
  let config2 = null;
20215
20253
  let configReadError = null;
@@ -20505,7 +20543,7 @@ function defaultConfig() {
20505
20543
  }
20506
20544
  async function configure(opts) {
20507
20545
  printClawrpCliBanner();
20508
- p12.intro(pc7.bgCyan(pc7.black(" clawrp configure ")));
20546
+ p12.intro(pc7.bgRed(pc7.white(" clawrp configure ")));
20509
20547
  const configPath = resolveConfigPath(opts.config);
20510
20548
  if (!configExists(opts.config)) {
20511
20549
  p12.log.error("No config file found. Run `clawrp onboard` first.");
@@ -21402,7 +21440,7 @@ function resolveBackupDir(raw) {
21402
21440
  }
21403
21441
  async function dbBackupCommand(opts) {
21404
21442
  printClawrpCliBanner();
21405
- p14.intro(pc12.bgCyan(pc12.black(" clawrp db:backup ")));
21443
+ p14.intro(pc12.bgRed(pc12.white(" clawrp db:backup ")));
21406
21444
  const configPath = resolveConfigPath(opts.config);
21407
21445
  const config2 = readConfig(opts.config);
21408
21446
  const connection = resolveConnectionString(opts.config);