@staff0rd/assist 0.131.0 → 0.133.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.
package/README.md CHANGED
@@ -82,6 +82,7 @@ After installation, the `assist` command will be available globally. You can als
82
82
  - `assist backlog delete <id>` - Delete a backlog item
83
83
  - `assist backlog web [-p, --port <number>]` - Start a web view of the backlog (default port 3000)
84
84
  - `assist roam auth` - Authenticate with Roam via OAuth (opens browser, saves tokens to ~/.assist.yml)
85
+ - `assist roam show-claude-code-icon` - Forward Claude Code hook activity to Roam local API
85
86
  - `assist run <name> [params...]` - Run a configured command from assist.yml (positional params are matched to `params` config; supports `pre` array of commands to run first)
86
87
  - `assist run add` - Add a new run configuration to assist.yml and create a Claude command file
87
88
  - `assist config set <key> <value>` - Set a config value (e.g. commit.push true)
@@ -113,8 +114,11 @@ After installation, the `assist` command will be available globally. You can als
113
114
  - `assist notify` - Show desktop notification from JSON stdin (supports macOS, Windows, WSL)
114
115
  - `assist status-line` - Format Claude Code status line from JSON stdin
115
116
  - `assist dotnet inspect [sln]` - Run JetBrains inspections on changed .cs files to find dead code
116
- - `assist dotnet inspect [sln] --ref <ref>` - Inspect .cs files changed in a specific commit (default: HEAD)
117
- - `assist dotnet inspect [sln] --base <ref>` - Inspect all .cs files changed since diverging from a base ref (e.g. `--base main` for a full PR)
117
+ - `assist dotnet inspect [sln] --scope all` - Inspect the full solution
118
+ - `assist dotnet inspect [sln] --scope base:<ref>` - Inspect all .cs files changed since diverging from a base ref (e.g. `--scope base:main` for a full PR)
119
+ - `assist dotnet inspect [sln] --scope commit:<ref>` - Inspect .cs files changed in a specific commit
120
+ - `assist dotnet inspect [sln] --only <ids...>` - Show only the specified issue type IDs (e.g. `--only CommentedCode`)
121
+ - `assist dotnet inspect [sln] --suppress <ids...>` - Suppress specific issue type IDs on the command line
118
122
  - `assist dotnet inspect [sln] --roslyn` - Use Roslyn analyzers via msbuild instead of JetBrains
119
123
  - `assist dotnet inspect [sln] --swea` - Enable solution-wide error analysis (slower but more thorough)
120
124
  - `assist dotnet check-locks` - Check if build output files are locked by a debugger
@@ -46,6 +46,7 @@
46
46
  "Bash(assist ravendb auth list:*)",
47
47
  "Bash(assist seq query:*)",
48
48
  "Bash(assist seq auth list:*)",
49
+ "Bash(assist roam show-claude-code-icon:*)",
49
50
  "SlashCommand(/next-backlog-item)",
50
51
  "SlashCommand(/verify)",
51
52
  "SlashCommand(/commit)",
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.131.0",
9
+ version: "0.133.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -4708,6 +4708,36 @@ async function deps(csprojPath, options2) {
4708
4708
  }
4709
4709
  }
4710
4710
 
4711
+ // src/commands/dotnet/getChangedCsFiles.ts
4712
+ import { execSync as execSync20 } from "child_process";
4713
+ var SCOPE_ALL = "all";
4714
+ var SCOPE_BASE = "base:";
4715
+ var SCOPE_COMMIT = "commit:";
4716
+ var scopeHelpText = `${SCOPE_ALL} | ${SCOPE_BASE}<ref> | ${SCOPE_COMMIT}<ref>`;
4717
+ function parseScope(raw) {
4718
+ if (!raw) return { mode: "working-copy" };
4719
+ if (raw === SCOPE_ALL) return { mode: "full" };
4720
+ if (raw.startsWith(SCOPE_BASE))
4721
+ return { mode: "base", ref: raw.slice(SCOPE_BASE.length) };
4722
+ if (raw.startsWith(SCOPE_COMMIT))
4723
+ return { mode: "commit", ref: raw.slice(SCOPE_COMMIT.length) };
4724
+ throw new Error(`Invalid --scope value: ${raw}. Expected ${scopeHelpText}`);
4725
+ }
4726
+ function getChangedCsFiles(scope) {
4727
+ if (scope.mode === "full") return null;
4728
+ let cmd;
4729
+ if (scope.mode === "base") {
4730
+ cmd = `git diff --name-only ${scope.ref}...HEAD`;
4731
+ } else if (scope.mode === "commit") {
4732
+ cmd = `git diff --name-only ${scope.ref}~1 ${scope.ref}`;
4733
+ } else {
4734
+ cmd = "git diff --name-only HEAD";
4735
+ }
4736
+ const output = execSync20(cmd, { encoding: "utf-8" }).trim();
4737
+ if (output === "") return [];
4738
+ return output.split("\n").filter((f) => f.toLowerCase().endsWith(".cs"));
4739
+ }
4740
+
4711
4741
  // src/commands/dotnet/inSln.ts
4712
4742
  import chalk51 from "chalk";
4713
4743
  async function inSln(csprojPath) {
@@ -4809,29 +4839,17 @@ var deadCodeRules = /* @__PURE__ */ new Set([
4809
4839
  ]);
4810
4840
 
4811
4841
  // src/commands/dotnet/filterIssues.ts
4812
- function filterIssues(issues, all) {
4813
- const suppress = new Set(loadConfig().dotnet?.inspect.suppress ?? []);
4842
+ function filterIssues(issues, all, cliOnly, cliSuppress) {
4843
+ const only = cliOnly.length > 0 ? new Set(cliOnly) : null;
4844
+ const suppress = /* @__PURE__ */ new Set([
4845
+ ...loadConfig().dotnet?.inspect.suppress ?? [],
4846
+ ...cliSuppress
4847
+ ]);
4814
4848
  return issues.filter(
4815
- (i) => (all || deadCodeRules.has(i.typeId)) && !suppress.has(i.typeId)
4849
+ (i) => (only ? only.has(i.typeId) : all || deadCodeRules.has(i.typeId)) && !suppress.has(i.typeId)
4816
4850
  );
4817
4851
  }
4818
4852
 
4819
- // src/commands/dotnet/getChangedCsFiles.ts
4820
- import { execSync as execSync20 } from "child_process";
4821
- function getChangedCsFiles(ref, base) {
4822
- let cmd;
4823
- if (base) {
4824
- cmd = `git diff --name-only ${base}...HEAD`;
4825
- } else if (ref) {
4826
- cmd = `git diff --name-only ${ref}~1 ${ref}`;
4827
- } else {
4828
- cmd = "git diff --name-only HEAD";
4829
- }
4830
- const output = execSync20(cmd, { encoding: "utf-8" }).trim();
4831
- if (output === "") return [];
4832
- return output.split("\n").filter((f) => f.toLowerCase().endsWith(".cs"));
4833
- }
4834
-
4835
4853
  // src/commands/dotnet/resolveSolution.ts
4836
4854
  import { existsSync as existsSync22 } from "fs";
4837
4855
  import path25 from "path";
@@ -4931,10 +4949,11 @@ function assertJbInstalled() {
4931
4949
  }
4932
4950
  function runInspectCode(slnPath, include, swea) {
4933
4951
  const reportPath = path26.join(tmpdir2(), `inspect-${Date.now()}.xml`);
4952
+ const includeFlag = include ? ` --include="${include}"` : "";
4934
4953
  const sweaFlag = swea ? " --swea" : "";
4935
4954
  try {
4936
4955
  execSync21(
4937
- `jb inspectcode "${slnPath}" -o="${reportPath}" --include="${include}"${sweaFlag} --verbosity=OFF`,
4956
+ `jb inspectcode "${slnPath}" -o="${reportPath}"${includeFlag}${sweaFlag} --verbosity=OFF`,
4938
4957
  { stdio: "pipe" }
4939
4958
  );
4940
4959
  } catch (err) {
@@ -5004,14 +5023,24 @@ function runRoslynInspect(slnPath) {
5004
5023
  // src/commands/dotnet/runEngine.ts
5005
5024
  function runEngine(resolved, changedFiles, options2) {
5006
5025
  if (options2.roslyn) {
5007
- return filterToChangedFiles(runRoslynInspect(resolved), changedFiles);
5026
+ const issues = runRoslynInspect(resolved);
5027
+ return changedFiles ? filterToChangedFiles(issues, changedFiles) : issues;
5008
5028
  }
5009
5029
  return parseInspectReport(
5010
- runInspectCode(resolved, changedFiles.join(";"), !!options2.swea)
5030
+ runInspectCode(resolved, changedFiles?.join(";") ?? null, !!options2.swea)
5011
5031
  );
5012
5032
  }
5013
5033
 
5014
5034
  // src/commands/dotnet/inspect.ts
5035
+ function logScope(changedFiles) {
5036
+ if (changedFiles === null) {
5037
+ console.log(chalk57.dim("Inspecting full solution..."));
5038
+ } else {
5039
+ console.log(
5040
+ chalk57.dim(`Inspecting ${changedFiles.length} changed file(s)...`)
5041
+ );
5042
+ }
5043
+ }
5015
5044
  function reportResults(issues, elapsed) {
5016
5045
  if (issues.length > 0) displayIssues(issues);
5017
5046
  else console.log(chalk57.green("No issues found"));
@@ -5023,18 +5052,18 @@ async function inspect(sln, options2) {
5023
5052
  checkBuildLocks();
5024
5053
  if (options2.roslyn) assertMsbuildInstalled();
5025
5054
  else assertJbInstalled();
5026
- const changedFiles = getChangedCsFiles(options2.ref, options2.base);
5027
- if (changedFiles.length === 0) {
5055
+ const scope = parseScope(options2.scope);
5056
+ const changedFiles = getChangedCsFiles(scope);
5057
+ if (changedFiles !== null && changedFiles.length === 0) {
5028
5058
  console.log(chalk57.green("No changed .cs files found"));
5029
5059
  return;
5030
5060
  }
5031
- console.log(
5032
- chalk57.dim(`Inspecting ${changedFiles.length} changed file(s)...`)
5033
- );
5061
+ logScope(changedFiles);
5034
5062
  const start3 = Date.now();
5035
5063
  const issues = runEngine(resolved, changedFiles, options2);
5036
5064
  const elapsed = Date.now() - start3;
5037
- reportResults(filterIssues(issues, !!options2.all), elapsed);
5065
+ const { all = false, only = [], suppress = [] } = options2;
5066
+ reportResults(filterIssues(issues, all, only, suppress), elapsed);
5038
5067
  }
5039
5068
 
5040
5069
  // src/commands/registerDotnet.ts
@@ -5042,10 +5071,10 @@ function registerDotnet(program2) {
5042
5071
  const cmd = program2.command("dotnet").description(".NET project utilities");
5043
5072
  cmd.command("inspect").description(
5044
5073
  "Run JetBrains inspections on changed .cs files to find dead code"
5045
- ).argument("[sln]", "Path to a .sln file (auto-detected if omitted)").option("--ref <ref>", "Git commit to inspect (default: working copy)").option(
5046
- "--base <ref>",
5047
- "Compare against a base ref using merge-base (e.g. main); inspects all PR changes"
5048
- ).option("--all", "Show all issues, not just dead code").option("--swea", "Enable solution-wide error analysis").option("--roslyn", "Use Roslyn analyzers via msbuild instead of JetBrains").action(inspect);
5074
+ ).argument("[sln]", "Path to a .sln file (auto-detected if omitted)").option(
5075
+ "--scope <mode>",
5076
+ `File scope: ${scopeHelpText} (default: working copy diff)`
5077
+ ).option("--all", "Show all issues, not just dead code").option("--only <ids...>", "Show only the specified issue type IDs").option("--suppress <ids...>", "Suppress specific issue type IDs").option("--swea", "Enable solution-wide error analysis").option("--roslyn", "Use Roslyn analyzers via msbuild instead of JetBrains").action(inspect);
5049
5078
  cmd.command("check-locks").description("Check if build output files are locked by a debugger").action(checkBuildLocksCommand);
5050
5079
  cmd.command("deps").description("Show .csproj project dependency tree and solution membership").argument("<csproj>", "Path to a .csproj file").option("--json", "Output as JSON").action(deps);
5051
5080
  cmd.command("in-sln").description("Check whether a .csproj is referenced by any .sln file").argument("<csproj>", "Path to a .csproj file").action(inSln);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.131.0",
3
+ "version": "0.133.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {