@staff0rd/assist 0.130.0 → 0.131.0

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.
Files changed (2) hide show
  1. package/dist/index.js +29 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.130.0",
9
+ version: "0.131.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -8712,10 +8712,35 @@ async function auth() {
8712
8712
  );
8713
8713
  }
8714
8714
 
8715
+ // src/commands/roam/showClaudeCodeIcon.ts
8716
+ import { readFileSync as readFileSync29 } from "fs";
8717
+ import { join as join35 } from "path";
8718
+ async function showClaudeCodeIcon() {
8719
+ const appData = process.env.APPDATA;
8720
+ if (!appData) return;
8721
+ const portFile = join35(appData, "Roam", "roam-local-api.port");
8722
+ let port;
8723
+ try {
8724
+ port = readFileSync29(portFile, "utf-8").trim();
8725
+ } catch {
8726
+ return;
8727
+ }
8728
+ const body = process.stdin.isTTY ? "{}" : await readStdin();
8729
+ try {
8730
+ await fetch(`http://localhost:${port}/api/v1/activity`, {
8731
+ method: "POST",
8732
+ headers: { "Content-Type": "application/json" },
8733
+ body
8734
+ });
8735
+ } catch {
8736
+ }
8737
+ }
8738
+
8715
8739
  // src/commands/roam/registerRoam.ts
8716
8740
  function registerRoam(program2) {
8717
8741
  const roamCommand = program2.command("roam").description("Roam Research utilities");
8718
8742
  roamCommand.command("auth").description("Configure Roam API credentials").action(auth);
8743
+ roamCommand.command("show-claude-code-icon").description("Forward Claude Code hook activity to Roam local API").action(showClaudeCodeIcon);
8719
8744
  }
8720
8745
 
8721
8746
  // src/commands/run/index.ts
@@ -8768,7 +8793,7 @@ Done in ${elapsed}`);
8768
8793
 
8769
8794
  // src/commands/run/add.ts
8770
8795
  import { mkdirSync as mkdirSync12, writeFileSync as writeFileSync25 } from "fs";
8771
- import { join as join35 } from "path";
8796
+ import { join as join36 } from "path";
8772
8797
  function findAddIndex() {
8773
8798
  const addIndex = process.argv.indexOf("add");
8774
8799
  if (addIndex === -1 || addIndex + 2 >= process.argv.length) return -1;
@@ -8822,7 +8847,7 @@ function saveNewRunConfig(name, command, args) {
8822
8847
  saveConfig(config);
8823
8848
  }
8824
8849
  function createCommandFile(name) {
8825
- const dir = join35(".claude", "commands");
8850
+ const dir = join36(".claude", "commands");
8826
8851
  mkdirSync12(dir, { recursive: true });
8827
8852
  const content = `---
8828
8853
  description: Run ${name}
@@ -8830,7 +8855,7 @@ description: Run ${name}
8830
8855
 
8831
8856
  Run \`assist run ${name} $ARGUMENTS 2>&1\`.
8832
8857
  `;
8833
- const filePath = join35(dir, `${name}.md`);
8858
+ const filePath = join36(dir, `${name}.md`);
8834
8859
  writeFileSync25(filePath, content);
8835
8860
  console.log(`Created command file: ${filePath}`);
8836
8861
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.130.0",
3
+ "version": "0.131.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {