@hanzlaa/rcode 3.4.11 → 3.4.12

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/README.md CHANGED
@@ -100,6 +100,11 @@ Restart Claude Code (or your IDE), type `/`, and every `rihal-*` command appears
100
100
 
101
101
  Update anytime with `npx @hanzlaa/rcode update` (or `/rihal-update` inside a Claude session).
102
102
 
103
+ > **Want `rcode` on your PATH?** `npx @hanzlaa/rcode install` sets up the project files but doesn't put `rcode` in your shell. For the `rcode` CLI command (e.g. `rcode version`, `rcode update`), install globally once:
104
+ > ```bash
105
+ > npm install -g @hanzlaa/rcode
106
+ > ```
107
+
103
108
  ### Then begin the rihla
104
109
 
105
110
  ```
package/cli/install.js CHANGED
@@ -1972,6 +1972,10 @@ async function install(opts) {
1972
1972
  console.log(dim(' npx @hanzlaa/rcode@latest install # pull the latest rcode + brain'));
1973
1973
  console.log(dim(` /rihal-update v${version} # pin rcode to a specific version`));
1974
1974
  console.log('');
1975
+ console.log(dim(' Want the rcode CLI on your PATH? (optional — needed for rcode version / rcode update):'));
1976
+ console.log(dim(' npm install -g @hanzlaa/rcode # installs rcode, rihal, rihal-code commands'));
1977
+ console.log(dim(' rcode version # verify'));
1978
+ console.log('');
1975
1979
  console.log(dim(' Customize without losing changes on update:'));
1976
1980
  console.log(dim(' Create <name>.local.md siblings (e.g. .claude/agents/rihal-waleed.local.md)'));
1977
1981
  console.log(dim(' *.local.md files are NEVER touched by install / --force-overwrite / uninstall.'));
package/dist/rcode.js CHANGED
@@ -16462,6 +16462,10 @@ ${BLOCK}`);
16462
16462
  console.log(dim(" npx @hanzlaa/rcode@latest install # pull the latest rcode + brain"));
16463
16463
  console.log(dim(` /rihal-update v${version} # pin rcode to a specific version`));
16464
16464
  console.log("");
16465
+ console.log(dim(" Want the rcode CLI on your PATH? (optional \u2014 needed for rcode version / rcode update):"));
16466
+ console.log(dim(" npm install -g @hanzlaa/rcode # installs rcode, rihal, rihal-code commands"));
16467
+ console.log(dim(" rcode version # verify"));
16468
+ console.log("");
16465
16469
  console.log(dim(" Customize without losing changes on update:"));
16466
16470
  console.log(dim(" Create <name>.local.md siblings (e.g. .claude/agents/rihal-waleed.local.md)"));
16467
16471
  console.log(dim(" *.local.md files are NEVER touched by install / --force-overwrite / uninstall."));
@@ -16909,7 +16913,7 @@ var require_fsutil = __commonJS({
16909
16913
  );
16910
16914
  let fd;
16911
16915
  try {
16912
- fd = fs2.openSync(tmpPath, "w", mode ?? 420);
16916
+ fd = fs2.openSync(tmpPath, "wx", mode ?? 420);
16913
16917
  fs2.writeSync(fd, content, 0, encoding);
16914
16918
  fs2.fsyncSync(fd);
16915
16919
  fs2.closeSync(fd);
@@ -17923,7 +17927,11 @@ var require_digest = __commonJS({
17923
17927
  var fs2 = require("fs");
17924
17928
  var path2 = require("path");
17925
17929
  function normalize(name) {
17926
- return name.replace(/^rihal-/, "");
17930
+ const stripped = name.replace(/^rihal-/, "");
17931
+ if (stripped.includes("..") || stripped.includes("/") || stripped.includes("\\")) {
17932
+ throw new Error(`Invalid agent name: '${name}'`);
17933
+ }
17934
+ return stripped;
17927
17935
  }
17928
17936
  function listAvailable(digestDir, agentsDir) {
17929
17937
  const digestNames = fs2.existsSync(digestDir) ? fs2.readdirSync(digestDir).filter((f) => f.endsWith(".md") && f !== "README.md").map((f) => f.replace(".md", "")) : [];
@@ -19285,6 +19293,10 @@ var require_show_model = __commonJS({
19285
19293
  var require_github = __commonJS({
19286
19294
  "cli/lib/github.cjs"(exports2, module2) {
19287
19295
  var { execSync, spawnSync } = require("child_process");
19296
+ function sanitizeGhOutput(text) {
19297
+ if (!text) return "";
19298
+ return text.replace(/\b(ghp_|ghs_|github_pat_)[A-Za-z0-9_]{10,}\b/g, "[REDACTED]").slice(0, 2e3);
19299
+ }
19288
19300
  function runGh(args, { input = null, allowFailure = false } = {}) {
19289
19301
  const result = spawnSync("gh", args, {
19290
19302
  encoding: "utf8",
@@ -19292,10 +19304,9 @@ var require_github = __commonJS({
19292
19304
  stdio: input ? ["pipe", "pipe", "pipe"] : ["ignore", "pipe", "pipe"]
19293
19305
  });
19294
19306
  if (result.status !== 0 && !allowFailure) {
19295
- throw new Error(
19296
- `gh ${args.join(" ")} failed:
19297
- ${result.stderr || result.stdout || "(no output)"}`
19298
- );
19307
+ const detail = sanitizeGhOutput(result.stderr || result.stdout || "(no output)");
19308
+ throw new Error(`gh ${args.join(" ")} failed:
19309
+ ${detail}`);
19299
19310
  }
19300
19311
  return {
19301
19312
  status: result.status,
@@ -20408,7 +20419,7 @@ Usage:
20408
20419
 
20409
20420
  \u{1F4E6} PROJECT
20410
20421
  install Install Rihal Code into the current project
20411
- (sets up .rihal/, .claude/skills/, .claude/commands/rihal/,
20422
+ (sets up .rihal/, .claude/skills/, .claude/commands/,
20412
20423
  .cursor/rules/, .windsurf/rules/, .antigravity/agents/, AGENTS.md)
20413
20424
  init Alias for install
20414
20425
  update Refresh skill files (backs up .rihal/ state first)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzlaa/rcode",
3
- "version": "3.4.11",
3
+ "version": "3.4.12",
4
4
  "description": "rcode — the memory bank for AI-driven SaaS teams. Persistent project context, distinctive engineering personas, and phase-based workflows. Built by Rihal. Works in Claude Code, Cursor, Gemini, VS Code, and Antigravity.",
5
5
  "main": "cli/index.js",
6
6
  "bin": {