@staff0rd/assist 0.403.0 → 0.404.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/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.403.0",
9
+ version: "0.404.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -242,7 +242,7 @@ var assistConfigSchema = z2.strictObject({
242
242
  hardcodedColors: z2.strictObject({
243
243
  ignore: z2.array(z2.string()).default([])
244
244
  }).optional(),
245
- blockComments: z2.strictObject({
245
+ blockCodeComments: z2.strictObject({
246
246
  ignore: z2.array(z2.string()).default([])
247
247
  }).optional(),
248
248
  restructure: z2.strictObject({
@@ -2990,7 +2990,7 @@ function lint(options2 = {}) {
2990
2990
  import { execSync as execSync18 } from "child_process";
2991
2991
  import { basename as basename2, resolve as resolve5 } from "path";
2992
2992
 
2993
- // src/commands/verify/blockComments/findComments.ts
2993
+ // src/commands/verify/blockCodeComments/findComments.ts
2994
2994
  import { execSync as execSync10 } from "child_process";
2995
2995
  import fs15 from "fs";
2996
2996
  import { minimatch } from "minimatch";
@@ -3025,7 +3025,7 @@ function isHashCommentFile(filePath) {
3025
3025
  return isYamlFile(filePath) || isDockerfile(filePath) || isEnvFile(filePath) || isShellFile(filePath);
3026
3026
  }
3027
3027
 
3028
- // src/commands/verify/blockComments/collectFileComments.ts
3028
+ // src/commands/verify/blockCodeComments/collectFileComments.ts
3029
3029
  import fs14 from "fs";
3030
3030
 
3031
3031
  // src/shared/isBicepFile.ts
@@ -3035,7 +3035,7 @@ function isBicepFile(filePath) {
3035
3035
  return BICEP_EXTENSIONS.some((ext) => filePath.endsWith(ext));
3036
3036
  }
3037
3037
 
3038
- // src/commands/verify/blockComments/collectBicepComments.ts
3038
+ // src/commands/verify/blockCodeComments/collectBicepComments.ts
3039
3039
  function blankNonNewline(text17) {
3040
3040
  return text17.replace(/[^\n]/g, " ");
3041
3041
  }
@@ -3058,7 +3058,7 @@ function collectBicepComments(content) {
3058
3058
  return comments3;
3059
3059
  }
3060
3060
 
3061
- // src/commands/verify/blockComments/collectHashComments.ts
3061
+ // src/commands/verify/blockCodeComments/collectHashComments.ts
3062
3062
  function blankNonNewline2(text17) {
3063
3063
  return text17.replace(/[^\n]/g, " ");
3064
3064
  }
@@ -3084,7 +3084,7 @@ function collectHashComments(content, options2) {
3084
3084
  return comments3;
3085
3085
  }
3086
3086
 
3087
- // src/commands/verify/blockComments/collectComments.ts
3087
+ // src/commands/verify/blockCodeComments/collectComments.ts
3088
3088
  function collectComments(sourceFile) {
3089
3089
  const seen = /* @__PURE__ */ new Set();
3090
3090
  const comments3 = [];
@@ -3121,7 +3121,7 @@ function parseMaintainabilityOverride(content) {
3121
3121
  return void 0;
3122
3122
  }
3123
3123
 
3124
- // src/commands/verify/blockComments/isCommentExempt.ts
3124
+ // src/commands/verify/blockCodeComments/isCommentExempt.ts
3125
3125
  var MACHINE_DIRECTIVES = [
3126
3126
  "oxlint-disable",
3127
3127
  "oxlint-enable",
@@ -3142,7 +3142,7 @@ function isCommentExempt(text17) {
3142
3142
  return MACHINE_DIRECTIVES.some((d) => lower.includes(d));
3143
3143
  }
3144
3144
 
3145
- // src/commands/verify/blockComments/collectSourceFindings.ts
3145
+ // src/commands/verify/blockCodeComments/collectSourceFindings.ts
3146
3146
  function toSingleLine(text17) {
3147
3147
  return text17.replace(/\s+/g, " ").trim();
3148
3148
  }
@@ -3158,7 +3158,7 @@ function collectSourceFindings(file, lines, project) {
3158
3158
  return findings;
3159
3159
  }
3160
3160
 
3161
- // src/commands/verify/blockComments/collectYamlComments.ts
3161
+ // src/commands/verify/blockCodeComments/collectYamlComments.ts
3162
3162
  import { Lexer } from "yaml";
3163
3163
  function collectYamlComments(content) {
3164
3164
  const comments3 = [];
@@ -3170,7 +3170,7 @@ function collectYamlComments(content) {
3170
3170
  return comments3;
3171
3171
  }
3172
3172
 
3173
- // src/commands/verify/blockComments/collectFileComments.ts
3173
+ // src/commands/verify/blockCodeComments/collectFileComments.ts
3174
3174
  function toFindings(file, lines, raw, exempt) {
3175
3175
  const findings = [];
3176
3176
  for (const { line, text: text17 } of raw) {
@@ -3196,7 +3196,7 @@ function collectFileComments(file, lines, project) {
3196
3196
  return collectSourceFindings(file, lines, project);
3197
3197
  }
3198
3198
 
3199
- // src/commands/verify/blockComments/parseDiffAddedLines.ts
3199
+ // src/commands/verify/blockCodeComments/parseDiffAddedLines.ts
3200
3200
  var FILE_HEADER = /^\+\+\+ (?:b\/)?(.+)$/;
3201
3201
  var HUNK_HEADER = /^@@ -\d+(?:,\d+)? \+(\d+)(?:,\d+)? @@/;
3202
3202
  function parseDiffAddedLines(diff2) {
@@ -3231,7 +3231,7 @@ function parseDiffAddedLines(diff2) {
3231
3231
  return added;
3232
3232
  }
3233
3233
 
3234
- // src/commands/verify/blockComments/findComments.ts
3234
+ // src/commands/verify/blockCodeComments/findComments.ts
3235
3235
  var SCANNED_EXTENSIONS = [
3236
3236
  ".ts",
3237
3237
  ".tsx",
@@ -3269,9 +3269,9 @@ function findComments(options2) {
3269
3269
  return findings;
3270
3270
  }
3271
3271
 
3272
- // src/commands/verify/blockComments/index.ts
3273
- function blockComments() {
3274
- const ignoreGlobs = loadConfig().blockComments?.ignore ?? [];
3272
+ // src/commands/verify/blockCodeComments/index.ts
3273
+ function blockCodeComments() {
3274
+ const ignoreGlobs = loadConfig().blockCodeComments?.ignore ?? [];
3275
3275
  const findings = findComments({ ignoreGlobs });
3276
3276
  if (findings.length === 0) {
3277
3277
  console.log("No comments on changed lines.");
@@ -6808,7 +6808,7 @@ function deriveHistoryFields(commandName, commandArgs, name) {
6808
6808
  return fields;
6809
6809
  }
6810
6810
  function deriveSessionType(commandName, name) {
6811
- if (commandName === "review-comments") return "review";
6811
+ if (commandName === "review-pr-comments") return "review";
6812
6812
  if (KNOWN.includes(commandName))
6813
6813
  return commandName;
6814
6814
  if (commandName || name) return "prompt";
@@ -15733,11 +15733,11 @@ function registerRefineLaunch(program2, resumeFlag) {
15733
15733
  configHelp(command, HARNESS_CONFIG_HELP);
15734
15734
  }
15735
15735
 
15736
- // src/commands/reviewComments.ts
15736
+ // src/commands/reviewPrComments.ts
15737
15737
  import { execFileSync as execFileSync5 } from "child_process";
15738
15738
  import { randomUUID as randomUUID3 } from "crypto";
15739
15739
  import chalk145 from "chalk";
15740
- async function reviewComments(number) {
15740
+ async function reviewPrComments(number) {
15741
15741
  if (number) {
15742
15742
  try {
15743
15743
  execFileSync5("gh", ["pr", "checkout", number], { stdio: "inherit" });
@@ -15747,8 +15747,12 @@ async function reviewComments(number) {
15747
15747
  }
15748
15748
  }
15749
15749
  const claudeSessionId = randomUUID3();
15750
- emitActivity({ kind: "command", name: "review-comments", claudeSessionId });
15751
- const { done: done2 } = spawnClaude("/review-comments", {
15750
+ emitActivity({
15751
+ kind: "command",
15752
+ name: "review-pr-comments",
15753
+ claudeSessionId
15754
+ });
15755
+ const { done: done2 } = spawnClaude("/review-pr-comments", {
15752
15756
  permissionMode: "acceptEdits",
15753
15757
  sessionId: claudeSessionId
15754
15758
  });
@@ -15775,8 +15779,8 @@ function registerDescriptionLaunch(program2, name, slashCommand, description, al
15775
15779
  );
15776
15780
  if (alias) command.alias(alias);
15777
15781
  }
15778
- function registerReviewComments(program2) {
15779
- program2.command("review-comments").argument("[number]", "PR number to check out first").description("Launch Claude in /review-comments mode (single session)").action((number) => reviewComments(number));
15782
+ function registerReviewPrComments(program2) {
15783
+ program2.command("review-pr-comments").argument("[number]", "PR number to check out first").description("Launch Claude in /review-pr-comments mode (single session)").action((number) => reviewPrComments(number));
15780
15784
  }
15781
15785
  function registerLaunch(program2) {
15782
15786
  registerNext(program2);
@@ -15793,7 +15797,7 @@ function registerLaunch(program2) {
15793
15797
  "bug",
15794
15798
  "Launch Claude in /bug mode, chain into next on /next signal"
15795
15799
  );
15796
- registerReviewComments(program2);
15800
+ registerReviewPrComments(program2);
15797
15801
  registerRefineLaunch(program2, RESUME_SESSION_FLAG);
15798
15802
  }
15799
15803
 
@@ -22585,9 +22589,9 @@ var checks = [
22585
22589
  action: hardcodedColors
22586
22590
  },
22587
22591
  {
22588
- name: "block-comments",
22592
+ name: "block-code-comments",
22589
22593
  description: "Fail on any comment on a changed line, whether added or edited",
22590
- action: blockComments
22594
+ action: blockCodeComments
22591
22595
  },
22592
22596
  {
22593
22597
  name: "no-venv",
@@ -22619,9 +22623,9 @@ function registerVerifyChecks(verifyCommand) {
22619
22623
  // src/commands/verify/verifyConfigHelp.ts
22620
22624
  var verifyConfigHelp = [
22621
22625
  {
22622
- key: "blockComments.ignore",
22623
- setter: 'assist config set blockComments.ignore "**/*.test.ts"',
22624
- note: "globs exempt from the block-comments check"
22626
+ key: "blockCodeComments.ignore",
22627
+ setter: 'assist config set blockCodeComments.ignore "**/*.test.ts"',
22628
+ note: "globs exempt from the block-code-comments check"
22625
22629
  },
22626
22630
  {
22627
22631
  key: "hardcodedColors.ignore",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.403.0",
3
+ "version": "0.404.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {