@staff0rd/assist 0.281.2 → 0.281.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/README.md +3 -2
- package/claude/commands/jira.md +1 -1
- package/dist/index.js +143 -138
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -140,7 +140,7 @@ The first backlog command in a repository that still has a local `.assist/backlo
|
|
|
140
140
|
- `assist backlog export [file]` - Export the entire backlog database (all tables, all repos) to a file, or stdout if omitted
|
|
141
141
|
- `assist backlog import [file]` - Restore the entire backlog database from a dump (file or stdin), faithfully replacing all data; prompts for confirmation (use `-y, --yes` to skip; required when reading from stdin)
|
|
142
142
|
- `assist backlog move-repo <old-origin> [new-origin]` - Retag all items from one origin to another after a repo rename; the new origin defaults to the current repo's remote, both accept URL or `git@` forms, and a bare repo name works for the old origin when unambiguous. Prompts for confirmation (use `-y, --yes` to skip)
|
|
143
|
-
- `assist backlog web [-p, --port <number>]` - Open the backlog tab in the web dashboard (default port 3100)
|
|
143
|
+
- `assist backlog web [-p, --port <number>] [--no-open]` - Open the backlog tab in the web dashboard (default port 3100); `--no-open` skips opening a browser on startup
|
|
144
144
|
- `assist roam auth` - Authenticate with Roam via OAuth (opens browser, saves tokens to ~/.assist.yml)
|
|
145
145
|
- `assist roam show-claude-code-icon` - Forward Claude Code hook activity to Roam local API
|
|
146
146
|
- `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). If `<name>` is purely numeric and matches no configured command, it is treated as an alias for `assist backlog run <name>` and forwards `--write`/`--no-write`/`-w`.
|
|
@@ -194,6 +194,7 @@ The first backlog command in a repository that still has a local `.assist/backlo
|
|
|
194
194
|
- `assist jira auth` - Authenticate with Jira via API token (saves site/email to ~/.assist/jira.json)
|
|
195
195
|
- `assist jira ac <issue-key>` - Print acceptance criteria for a Jira issue
|
|
196
196
|
- `assist jira view <issue-key>` - Print the title and description of a Jira issue
|
|
197
|
+
- Note: Claude is wired to the MCP Atlassian server (`mcp__claude_ai_Atlassian__getJiraIssue`) for fetching Jira context, so the `/jira` slash command and Jira-key mentions go through MCP. These `assist jira` CLI commands remain for direct human use.
|
|
197
198
|
- `assist ravendb auth add` - Add a new RavenDB connection (prompts for name, URL, database, op:// secret reference)
|
|
198
199
|
- `assist ravendb auth list` - List configured RavenDB connections
|
|
199
200
|
- `assist ravendb auth remove <name>` - Remove a configured connection
|
|
@@ -242,7 +243,7 @@ The first backlog command in a repository that still has a local `.assist/backlo
|
|
|
242
243
|
- `assist voice devices` - List available audio input devices
|
|
243
244
|
- `assist voice logs [-n <count>]` - Show recent voice daemon log entries
|
|
244
245
|
- `assist sessions` - Start the web dashboard (same as `sessions web`)
|
|
245
|
-
- `assist sessions web [-p, --port <number>]` - Start the web dashboard with Sessions and Backlog tabs, xterm.js terminals with clickable http(s) links (default port 3100); press Ctrl+R in the foreground terminal for an in-terminal restart menu (Restart daemon, Restart webserver, Restart both); Restart webserver re-execs the foreground process so the connected browser auto-reconnects
|
|
246
|
+
- `assist sessions web [-p, --port <number>] [--no-open]` - Start the web dashboard with Sessions and Backlog tabs, xterm.js terminals with clickable http(s) links (default port 3100); `--no-open` skips opening a browser on startup; press Ctrl+R in the foreground terminal for an in-terminal restart menu (Restart daemon, Restart webserver, Restart both); Restart webserver re-execs the foreground process (passing `--no-open` so no browser pops on restart) so the connected browser auto-reconnects
|
|
246
247
|
- `assist sessions summarise [-f, --force] [-n, --limit <count>]` - Generate one-line summaries for unsummarised Claude sessions (force re-generates all; limit caps how many to process)
|
|
247
248
|
- `assist daemon run` - Run the sessions daemon in the foreground (normally auto-spawned detached by `assist sessions`)
|
|
248
249
|
- `assist daemon status` - Show sessions daemon status, live sessions, and any stray daemon processes or stolen socket
|
package/claude/commands/jira.md
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
description: View a Jira work item
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Fetch the Jira work item `$ARGUMENTS` using the `mcp__claude_ai_Atlassian__getJiraIssue` tool from the MCP Atlassian server, then display the result to the user.
|
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.281.
|
|
9
|
+
version: "0.281.3",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -513,8 +513,8 @@ var SCHEMA = `
|
|
|
513
513
|
value TEXT NOT NULL
|
|
514
514
|
);
|
|
515
515
|
`;
|
|
516
|
-
async function ensureSchema(
|
|
517
|
-
await
|
|
516
|
+
async function ensureSchema(exec3) {
|
|
517
|
+
await exec3(SCHEMA);
|
|
518
518
|
}
|
|
519
519
|
|
|
520
520
|
// src/commands/backlog/getBacklogOrm.ts
|
|
@@ -4346,11 +4346,48 @@ import {
|
|
|
4346
4346
|
} from "http";
|
|
4347
4347
|
import chalk43 from "chalk";
|
|
4348
4348
|
|
|
4349
|
-
// src/
|
|
4350
|
-
import {
|
|
4349
|
+
// src/lib/openBrowser.ts
|
|
4350
|
+
import { execSync as execSync20 } from "child_process";
|
|
4351
|
+
function tryExec(commands) {
|
|
4352
|
+
for (const cmd of commands) {
|
|
4353
|
+
try {
|
|
4354
|
+
execSync20(cmd, { stdio: "ignore" });
|
|
4355
|
+
return true;
|
|
4356
|
+
} catch {
|
|
4357
|
+
}
|
|
4358
|
+
}
|
|
4359
|
+
return false;
|
|
4360
|
+
}
|
|
4351
4361
|
function openBrowser(url) {
|
|
4352
|
-
const
|
|
4353
|
-
|
|
4362
|
+
const platform = detectPlatform();
|
|
4363
|
+
const quoted = JSON.stringify(url);
|
|
4364
|
+
const commands = [];
|
|
4365
|
+
switch (platform) {
|
|
4366
|
+
case "macos":
|
|
4367
|
+
commands.push(
|
|
4368
|
+
`open -a "Google Chrome" ${quoted}`,
|
|
4369
|
+
`open -a "Microsoft Edge" ${quoted}`,
|
|
4370
|
+
`open -a "Safari" ${quoted}`
|
|
4371
|
+
);
|
|
4372
|
+
break;
|
|
4373
|
+
case "linux":
|
|
4374
|
+
commands.push(
|
|
4375
|
+
`google-chrome ${quoted}`,
|
|
4376
|
+
`chromium-browser ${quoted}`,
|
|
4377
|
+
`microsoft-edge ${quoted}`
|
|
4378
|
+
);
|
|
4379
|
+
break;
|
|
4380
|
+
case "windows":
|
|
4381
|
+
commands.push(`start chrome ${quoted}`, `start msedge ${quoted}`);
|
|
4382
|
+
break;
|
|
4383
|
+
case "wsl":
|
|
4384
|
+
commands.push(`xdg-open ${quoted}`);
|
|
4385
|
+
break;
|
|
4386
|
+
}
|
|
4387
|
+
if (!tryExec(commands)) {
|
|
4388
|
+
console.log(`Open this URL in Chrome, Edge, or Safari:
|
|
4389
|
+
${url}`);
|
|
4390
|
+
}
|
|
4354
4391
|
}
|
|
4355
4392
|
|
|
4356
4393
|
// src/shared/web.ts
|
|
@@ -4384,7 +4421,7 @@ function buildUrl(port, initialPath) {
|
|
|
4384
4421
|
const base = `http://localhost:${port}`;
|
|
4385
4422
|
return initialPath ? `${base}${initialPath}` : base;
|
|
4386
4423
|
}
|
|
4387
|
-
function startWebServer(label2, port, handler, initialPath) {
|
|
4424
|
+
function startWebServer(label2, port, handler, initialPath, open = true) {
|
|
4388
4425
|
const url = buildUrl(port, initialPath);
|
|
4389
4426
|
const server = createServer((req, res) => {
|
|
4390
4427
|
handler(req, res, port);
|
|
@@ -4392,7 +4429,9 @@ function startWebServer(label2, port, handler, initialPath) {
|
|
|
4392
4429
|
server.listen(port, () => {
|
|
4393
4430
|
console.log(chalk43.green(`${label2}: ${url}`));
|
|
4394
4431
|
console.log(chalk43.dim("Press Ctrl+C to stop"));
|
|
4395
|
-
|
|
4432
|
+
if (open) {
|
|
4433
|
+
openBrowser(url);
|
|
4434
|
+
}
|
|
4396
4435
|
});
|
|
4397
4436
|
return server;
|
|
4398
4437
|
}
|
|
@@ -4844,7 +4883,7 @@ function getHtml() {
|
|
|
4844
4883
|
}
|
|
4845
4884
|
|
|
4846
4885
|
// src/commands/prs/getPreferredRemoteRepo.ts
|
|
4847
|
-
import { execSync as
|
|
4886
|
+
import { execSync as execSync21 } from "child_process";
|
|
4848
4887
|
var GITHUB_URL_PATTERN = /(?:git@github\.com:|https:\/\/github\.com\/)([^/]+)\/([^/]+?)(?:\.git)?\/?$/;
|
|
4849
4888
|
function parseGitHubUrl(url) {
|
|
4850
4889
|
const match = url.match(GITHUB_URL_PATTERN);
|
|
@@ -4853,7 +4892,7 @@ function parseGitHubUrl(url) {
|
|
|
4853
4892
|
}
|
|
4854
4893
|
function tryGetRemoteUrl(remote, cwd) {
|
|
4855
4894
|
try {
|
|
4856
|
-
return
|
|
4895
|
+
return execSync21(`git remote get-url ${remote}`, {
|
|
4857
4896
|
encoding: "utf-8",
|
|
4858
4897
|
stdio: ["pipe", "pipe", "pipe"],
|
|
4859
4898
|
cwd
|
|
@@ -4864,7 +4903,7 @@ function tryGetRemoteUrl(remote, cwd) {
|
|
|
4864
4903
|
}
|
|
4865
4904
|
function getCurrentBranchRemote(cwd) {
|
|
4866
4905
|
try {
|
|
4867
|
-
const ref =
|
|
4906
|
+
const ref = execSync21(
|
|
4868
4907
|
"git rev-parse --abbrev-ref --symbolic-full-name @{u}",
|
|
4869
4908
|
{ encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"], cwd }
|
|
4870
4909
|
).trim();
|
|
@@ -4876,7 +4915,7 @@ function getCurrentBranchRemote(cwd) {
|
|
|
4876
4915
|
}
|
|
4877
4916
|
function listRemotes(cwd) {
|
|
4878
4917
|
try {
|
|
4879
|
-
return
|
|
4918
|
+
return execSync21("git remote", {
|
|
4880
4919
|
encoding: "utf-8",
|
|
4881
4920
|
stdio: ["pipe", "pipe", "pipe"],
|
|
4882
4921
|
cwd
|
|
@@ -4926,7 +4965,7 @@ function githubUrl(req, res) {
|
|
|
4926
4965
|
}
|
|
4927
4966
|
|
|
4928
4967
|
// src/commands/sessions/web/gitStatus.ts
|
|
4929
|
-
import { execSync as
|
|
4968
|
+
import { execSync as execSync22 } from "child_process";
|
|
4930
4969
|
|
|
4931
4970
|
// src/commands/sessions/web/parseGitStatus.ts
|
|
4932
4971
|
function extractPath(rest) {
|
|
@@ -4958,7 +4997,7 @@ function gitStatus(req, res) {
|
|
|
4958
4997
|
const cwd = getCwdParam(req, res);
|
|
4959
4998
|
if (!cwd) return;
|
|
4960
4999
|
try {
|
|
4961
|
-
const output =
|
|
5000
|
+
const output = execSync22("git status --porcelain", {
|
|
4962
5001
|
encoding: "utf-8",
|
|
4963
5002
|
stdio: ["pipe", "pipe", "pipe"],
|
|
4964
5003
|
cwd
|
|
@@ -4970,9 +5009,9 @@ function gitStatus(req, res) {
|
|
|
4970
5009
|
}
|
|
4971
5010
|
|
|
4972
5011
|
// src/commands/sessions/web/openInCode.ts
|
|
4973
|
-
import { exec
|
|
5012
|
+
import { exec } from "child_process";
|
|
4974
5013
|
import { promisify } from "util";
|
|
4975
|
-
var execAsync = promisify(
|
|
5014
|
+
var execAsync = promisify(exec);
|
|
4976
5015
|
async function openInCode(req, res) {
|
|
4977
5016
|
const cwd = getCwdParam(req, res);
|
|
4978
5017
|
if (!cwd) return;
|
|
@@ -5313,6 +5352,9 @@ import { spawnSync } from "child_process";
|
|
|
5313
5352
|
function resolveExecve() {
|
|
5314
5353
|
return typeof process.execve === "function" ? process.execve.bind(process) : null;
|
|
5315
5354
|
}
|
|
5355
|
+
function withNoOpen(args) {
|
|
5356
|
+
return args.includes("--no-open") ? args : [...args, "--no-open"];
|
|
5357
|
+
}
|
|
5316
5358
|
function reExecWebServer(deps2 = {}) {
|
|
5317
5359
|
const {
|
|
5318
5360
|
beforeExec,
|
|
@@ -5322,11 +5364,13 @@ function reExecWebServer(deps2 = {}) {
|
|
|
5322
5364
|
} = deps2;
|
|
5323
5365
|
beforeExec?.();
|
|
5324
5366
|
if (execveFn) {
|
|
5325
|
-
execveFn(process.execPath, process.argv, process.env);
|
|
5367
|
+
execveFn(process.execPath, withNoOpen(process.argv), process.env);
|
|
5326
5368
|
return;
|
|
5327
5369
|
}
|
|
5328
5370
|
const [, ...args] = process.argv;
|
|
5329
|
-
const result = spawnSyncFn(process.execPath, args, {
|
|
5371
|
+
const result = spawnSyncFn(process.execPath, withNoOpen(args), {
|
|
5372
|
+
stdio: "inherit"
|
|
5373
|
+
});
|
|
5330
5374
|
exit(result.status ?? 0);
|
|
5331
5375
|
}
|
|
5332
5376
|
|
|
@@ -5388,7 +5432,8 @@ async function web(options2) {
|
|
|
5388
5432
|
"Assist",
|
|
5389
5433
|
port,
|
|
5390
5434
|
handleRequest,
|
|
5391
|
-
options2.initialPath
|
|
5435
|
+
options2.initialPath,
|
|
5436
|
+
options2.open !== false
|
|
5392
5437
|
);
|
|
5393
5438
|
const serverCwd = process.cwd();
|
|
5394
5439
|
const ctx = {
|
|
@@ -5410,7 +5455,11 @@ async function web(options2) {
|
|
|
5410
5455
|
|
|
5411
5456
|
// src/commands/backlog/web/index.ts
|
|
5412
5457
|
async function web2(options2) {
|
|
5413
|
-
await web({
|
|
5458
|
+
await web({
|
|
5459
|
+
port: options2.port,
|
|
5460
|
+
initialPath: "/backlog",
|
|
5461
|
+
open: options2.open
|
|
5462
|
+
});
|
|
5414
5463
|
}
|
|
5415
5464
|
|
|
5416
5465
|
// src/commands/backlog/comment/index.ts
|
|
@@ -6908,7 +6957,7 @@ function registerShowCommands(cmd) {
|
|
|
6908
6957
|
cmd.command("show <id>").alias("view").description("Show full detail for a backlog item").action(show);
|
|
6909
6958
|
}
|
|
6910
6959
|
function registerWebCommand(cmd) {
|
|
6911
|
-
cmd.command("web").description("Open the backlog tab in the web dashboard").option("-p, --port <number>", "Port to listen on", "3100").action(web2);
|
|
6960
|
+
cmd.command("web").description("Open the backlog tab in the web dashboard").option("-p, --port <number>", "Port to listen on", "3100").option("--no-open", "Do not open a browser on startup").action(web2);
|
|
6912
6961
|
}
|
|
6913
6962
|
var registrars = [
|
|
6914
6963
|
registerItemCommands,
|
|
@@ -6929,9 +6978,9 @@ var registrars = [
|
|
|
6929
6978
|
registerMoveRepoCommand
|
|
6930
6979
|
];
|
|
6931
6980
|
function registerBacklog(program2) {
|
|
6932
|
-
const cmd = program2.command("backlog").description("Manage a backlog of work items").option("--dir <path>", "Override directory for backlog file discovery").hook("preAction", (thisCommand) => {
|
|
6981
|
+
const cmd = program2.command("backlog").description("Manage a backlog of work items").option("--dir <path>", "Override directory for backlog file discovery").option("--no-open", "Do not open a browser on startup").hook("preAction", (thisCommand) => {
|
|
6933
6982
|
setBacklogDir(thisCommand.opts().dir);
|
|
6934
|
-
}).action(() => web2({ port: "3100" }));
|
|
6983
|
+
}).action((options2) => web2({ port: "3100", open: options2.open }));
|
|
6935
6984
|
for (const register of registrars) {
|
|
6936
6985
|
register(cmd);
|
|
6937
6986
|
}
|
|
@@ -7553,7 +7602,7 @@ import { homedir as homedir9 } from "os";
|
|
|
7553
7602
|
import { join as join22 } from "path";
|
|
7554
7603
|
|
|
7555
7604
|
// src/shared/checkCliAvailable.ts
|
|
7556
|
-
import { execSync as
|
|
7605
|
+
import { execSync as execSync23 } from "child_process";
|
|
7557
7606
|
function checkCliAvailable(cli) {
|
|
7558
7607
|
const binary = cli.split(/\s+/)[0];
|
|
7559
7608
|
const opts = {
|
|
@@ -7561,11 +7610,11 @@ function checkCliAvailable(cli) {
|
|
|
7561
7610
|
stdio: ["ignore", "pipe", "pipe"]
|
|
7562
7611
|
};
|
|
7563
7612
|
try {
|
|
7564
|
-
|
|
7613
|
+
execSync23(`command -v ${binary}`, opts);
|
|
7565
7614
|
return true;
|
|
7566
7615
|
} catch {
|
|
7567
7616
|
try {
|
|
7568
|
-
|
|
7617
|
+
execSync23(`where ${binary}`, opts);
|
|
7569
7618
|
return true;
|
|
7570
7619
|
} catch {
|
|
7571
7620
|
return false;
|
|
@@ -7665,10 +7714,10 @@ function hasSubcommands(helpText) {
|
|
|
7665
7714
|
}
|
|
7666
7715
|
|
|
7667
7716
|
// src/commands/permitCliReads/runHelp.ts
|
|
7668
|
-
import { exec as
|
|
7717
|
+
import { exec as exec2 } from "child_process";
|
|
7669
7718
|
function runHelp(args) {
|
|
7670
7719
|
return new Promise((resolve16) => {
|
|
7671
|
-
|
|
7720
|
+
exec2(
|
|
7672
7721
|
`${args.join(" ")} --help`,
|
|
7673
7722
|
{ encoding: "utf-8", timeout: 3e4 },
|
|
7674
7723
|
(_err, stdout, stderr) => {
|
|
@@ -8701,7 +8750,7 @@ function loadBlogSkipDays(repoName) {
|
|
|
8701
8750
|
}
|
|
8702
8751
|
|
|
8703
8752
|
// src/commands/devlog/shared.ts
|
|
8704
|
-
import { execSync as
|
|
8753
|
+
import { execSync as execSync24 } from "child_process";
|
|
8705
8754
|
import chalk92 from "chalk";
|
|
8706
8755
|
|
|
8707
8756
|
// src/shared/getRepoName.ts
|
|
@@ -8793,7 +8842,7 @@ function loadAllDevlogLatestDates() {
|
|
|
8793
8842
|
// src/commands/devlog/shared.ts
|
|
8794
8843
|
function getCommitFiles(hash) {
|
|
8795
8844
|
try {
|
|
8796
|
-
const output =
|
|
8845
|
+
const output = execSync24(`git show --name-only --format="" ${hash}`, {
|
|
8797
8846
|
encoding: "utf-8"
|
|
8798
8847
|
});
|
|
8799
8848
|
return output.trim().split("\n").filter(Boolean);
|
|
@@ -8889,11 +8938,11 @@ function list3(options2) {
|
|
|
8889
8938
|
}
|
|
8890
8939
|
|
|
8891
8940
|
// src/commands/devlog/getLastVersionInfo.ts
|
|
8892
|
-
import { execFileSync as execFileSync2, execSync as
|
|
8941
|
+
import { execFileSync as execFileSync2, execSync as execSync25 } from "child_process";
|
|
8893
8942
|
import semver from "semver";
|
|
8894
8943
|
function getVersionAtCommit(hash) {
|
|
8895
8944
|
try {
|
|
8896
|
-
const content =
|
|
8945
|
+
const content = execSync25(`git show ${hash}:package.json`, {
|
|
8897
8946
|
encoding: "utf-8"
|
|
8898
8947
|
});
|
|
8899
8948
|
const pkg = JSON.parse(content);
|
|
@@ -9066,7 +9115,7 @@ function next2(options2) {
|
|
|
9066
9115
|
}
|
|
9067
9116
|
|
|
9068
9117
|
// src/commands/devlog/repos/index.ts
|
|
9069
|
-
import { execSync as
|
|
9118
|
+
import { execSync as execSync26 } from "child_process";
|
|
9070
9119
|
|
|
9071
9120
|
// src/commands/devlog/repos/printReposTable.ts
|
|
9072
9121
|
import chalk96 from "chalk";
|
|
@@ -9101,7 +9150,7 @@ function getStatus(lastPush, lastDevlog) {
|
|
|
9101
9150
|
return lastDevlog < lastPush ? "outdated" : "ok";
|
|
9102
9151
|
}
|
|
9103
9152
|
function fetchRepos(days, all) {
|
|
9104
|
-
const json =
|
|
9153
|
+
const json = execSync26(
|
|
9105
9154
|
"gh repo list staff0rd --json name,pushedAt,isArchived --limit 200",
|
|
9106
9155
|
{ encoding: "utf-8" }
|
|
9107
9156
|
);
|
|
@@ -9461,7 +9510,7 @@ async function deps(csprojPath, options2) {
|
|
|
9461
9510
|
}
|
|
9462
9511
|
|
|
9463
9512
|
// src/commands/dotnet/getChangedCsFiles.ts
|
|
9464
|
-
import { execSync as
|
|
9513
|
+
import { execSync as execSync27 } from "child_process";
|
|
9465
9514
|
var SCOPE_ALL = "all";
|
|
9466
9515
|
var SCOPE_BASE = "base:";
|
|
9467
9516
|
var SCOPE_COMMIT = "commit:";
|
|
@@ -9485,7 +9534,7 @@ function getChangedCsFiles(scope) {
|
|
|
9485
9534
|
} else {
|
|
9486
9535
|
cmd = "git diff --name-only HEAD";
|
|
9487
9536
|
}
|
|
9488
|
-
const output =
|
|
9537
|
+
const output = execSync27(cmd, { encoding: "utf-8" }).trim();
|
|
9489
9538
|
if (output === "") return [];
|
|
9490
9539
|
return output.split("\n").filter((f) => f.toLowerCase().endsWith(".cs"));
|
|
9491
9540
|
}
|
|
@@ -9683,14 +9732,14 @@ function parseInspectReport(json) {
|
|
|
9683
9732
|
}
|
|
9684
9733
|
|
|
9685
9734
|
// src/commands/dotnet/runInspectCode.ts
|
|
9686
|
-
import { execSync as
|
|
9735
|
+
import { execSync as execSync28 } from "child_process";
|
|
9687
9736
|
import { existsSync as existsSync30, readFileSync as readFileSync24, unlinkSync as unlinkSync7 } from "fs";
|
|
9688
9737
|
import { tmpdir as tmpdir3 } from "os";
|
|
9689
9738
|
import path25 from "path";
|
|
9690
9739
|
import chalk106 from "chalk";
|
|
9691
9740
|
function assertJbInstalled() {
|
|
9692
9741
|
try {
|
|
9693
|
-
|
|
9742
|
+
execSync28("jb inspectcode --version", { stdio: "pipe" });
|
|
9694
9743
|
} catch {
|
|
9695
9744
|
console.error(chalk106.red("jb is not installed. Install with:"));
|
|
9696
9745
|
console.error(
|
|
@@ -9704,7 +9753,7 @@ function runInspectCode(slnPath, include, swea) {
|
|
|
9704
9753
|
const includeFlag = include ? ` --include="${include}"` : "";
|
|
9705
9754
|
const sweaFlag = swea ? " --swea" : "";
|
|
9706
9755
|
try {
|
|
9707
|
-
|
|
9756
|
+
execSync28(
|
|
9708
9757
|
`jb inspectcode "${slnPath}" -o="${reportPath}"${includeFlag}${sweaFlag} --verbosity=OFF`,
|
|
9709
9758
|
{ stdio: "pipe" }
|
|
9710
9759
|
);
|
|
@@ -9725,7 +9774,7 @@ function runInspectCode(slnPath, include, swea) {
|
|
|
9725
9774
|
}
|
|
9726
9775
|
|
|
9727
9776
|
// src/commands/dotnet/runRoslynInspect.ts
|
|
9728
|
-
import { execSync as
|
|
9777
|
+
import { execSync as execSync29 } from "child_process";
|
|
9729
9778
|
import chalk107 from "chalk";
|
|
9730
9779
|
function resolveMsbuildPath() {
|
|
9731
9780
|
const { run: run4 } = loadConfig();
|
|
@@ -9736,7 +9785,7 @@ function resolveMsbuildPath() {
|
|
|
9736
9785
|
function assertMsbuildInstalled() {
|
|
9737
9786
|
const msbuild = resolveMsbuildPath();
|
|
9738
9787
|
try {
|
|
9739
|
-
|
|
9788
|
+
execSync29(`"${msbuild}" -version`, { stdio: "pipe" });
|
|
9740
9789
|
} catch {
|
|
9741
9790
|
console.error(chalk107.red(`msbuild not found at: ${msbuild}`));
|
|
9742
9791
|
console.error(
|
|
@@ -9762,7 +9811,7 @@ function runRoslynInspect(slnPath) {
|
|
|
9762
9811
|
const msbuild = resolveMsbuildPath();
|
|
9763
9812
|
let output;
|
|
9764
9813
|
try {
|
|
9765
|
-
output =
|
|
9814
|
+
output = execSync29(
|
|
9766
9815
|
`"${msbuild}" "${slnPath}" -t:Build -v:minimal -maxcpucount -p:EnforceCodeStyleInBuild=true -p:RunAnalyzersDuringBuild=true 2>&1`,
|
|
9767
9816
|
{ encoding: "utf-8", stdio: "pipe", maxBuffer: 50 * 1024 * 1024 }
|
|
9768
9817
|
);
|
|
@@ -10340,12 +10389,12 @@ function adfToText(doc) {
|
|
|
10340
10389
|
}
|
|
10341
10390
|
|
|
10342
10391
|
// src/commands/jira/fetchIssue.ts
|
|
10343
|
-
import { execSync as
|
|
10392
|
+
import { execSync as execSync30 } from "child_process";
|
|
10344
10393
|
import chalk111 from "chalk";
|
|
10345
10394
|
function fetchIssue(issueKey, fields) {
|
|
10346
10395
|
let result;
|
|
10347
10396
|
try {
|
|
10348
|
-
result =
|
|
10397
|
+
result = execSync30(
|
|
10349
10398
|
`acli jira workitem view ${issueKey} -f ${fields} --json`,
|
|
10350
10399
|
{ encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] }
|
|
10351
10400
|
);
|
|
@@ -10391,7 +10440,7 @@ function acceptanceCriteria(issueKey) {
|
|
|
10391
10440
|
}
|
|
10392
10441
|
|
|
10393
10442
|
// src/commands/jira/jiraAuth.ts
|
|
10394
|
-
import { execSync as
|
|
10443
|
+
import { execSync as execSync31 } from "child_process";
|
|
10395
10444
|
|
|
10396
10445
|
// src/shared/loadJson.ts
|
|
10397
10446
|
import { existsSync as existsSync33, mkdirSync as mkdirSync11, readFileSync as readFileSync27, writeFileSync as writeFileSync21 } from "fs";
|
|
@@ -10455,7 +10504,7 @@ async function jiraAuth() {
|
|
|
10455
10504
|
console.error("All fields are required.");
|
|
10456
10505
|
process.exit(1);
|
|
10457
10506
|
}
|
|
10458
|
-
|
|
10507
|
+
execSync31(`acli jira auth login --site ${site} --email "${email}" --token`, {
|
|
10459
10508
|
encoding: "utf-8",
|
|
10460
10509
|
input: token,
|
|
10461
10510
|
stdio: ["pipe", "inherit", "inherit"]
|
|
@@ -10939,7 +10988,7 @@ function registerPrompts(program2) {
|
|
|
10939
10988
|
}
|
|
10940
10989
|
|
|
10941
10990
|
// src/commands/prs/shared.ts
|
|
10942
|
-
import { execSync as
|
|
10991
|
+
import { execSync as execSync32 } from "child_process";
|
|
10943
10992
|
function isGhNotInstalled(error) {
|
|
10944
10993
|
if (error instanceof Error) {
|
|
10945
10994
|
const msg = error.message.toLowerCase();
|
|
@@ -10957,12 +11006,12 @@ function getRepoInfo() {
|
|
|
10957
11006
|
const preferred = getPreferredRemoteRepo();
|
|
10958
11007
|
if (preferred) return preferred;
|
|
10959
11008
|
const repoInfo = JSON.parse(
|
|
10960
|
-
|
|
11009
|
+
execSync32("gh repo view --json owner,name", { encoding: "utf-8" })
|
|
10961
11010
|
);
|
|
10962
11011
|
return { org: repoInfo.owner.login, repo: repoInfo.name };
|
|
10963
11012
|
}
|
|
10964
11013
|
function getCurrentBranch() {
|
|
10965
|
-
return
|
|
11014
|
+
return execSync32("git rev-parse --abbrev-ref HEAD", {
|
|
10966
11015
|
encoding: "utf-8"
|
|
10967
11016
|
}).trim();
|
|
10968
11017
|
}
|
|
@@ -10970,7 +11019,7 @@ function viewCurrentPr(fields) {
|
|
|
10970
11019
|
const { org, repo } = getRepoInfo();
|
|
10971
11020
|
const branch = getCurrentBranch();
|
|
10972
11021
|
return JSON.parse(
|
|
10973
|
-
|
|
11022
|
+
execSync32(`gh pr view ${branch} --json ${fields} -R ${org}/${repo}`, {
|
|
10974
11023
|
encoding: "utf-8"
|
|
10975
11024
|
})
|
|
10976
11025
|
);
|
|
@@ -11063,7 +11112,7 @@ function comment2(path54, line, body, startLine) {
|
|
|
11063
11112
|
}
|
|
11064
11113
|
|
|
11065
11114
|
// src/commands/prs/create.ts
|
|
11066
|
-
import { execSync as
|
|
11115
|
+
import { execSync as execSync33 } from "child_process";
|
|
11067
11116
|
|
|
11068
11117
|
// src/commands/prs/buildCreateArgs.ts
|
|
11069
11118
|
function buildCreateArgs(title, body, options2) {
|
|
@@ -11118,17 +11167,17 @@ function create(options2) {
|
|
|
11118
11167
|
validatePrContent(options2.title, options2.body);
|
|
11119
11168
|
const args = buildCreateArgs(options2.title, options2.body, options2);
|
|
11120
11169
|
try {
|
|
11121
|
-
|
|
11170
|
+
execSync33(args.join(" "), { stdio: "inherit" });
|
|
11122
11171
|
} catch (_error) {
|
|
11123
11172
|
process.exit(1);
|
|
11124
11173
|
}
|
|
11125
11174
|
}
|
|
11126
11175
|
|
|
11127
11176
|
// src/commands/prs/fixed.ts
|
|
11128
|
-
import { execSync as
|
|
11177
|
+
import { execSync as execSync35 } from "child_process";
|
|
11129
11178
|
|
|
11130
11179
|
// src/commands/prs/resolveCommentWithReply.ts
|
|
11131
|
-
import { execSync as
|
|
11180
|
+
import { execSync as execSync34 } from "child_process";
|
|
11132
11181
|
import { unlinkSync as unlinkSync10, writeFileSync as writeFileSync23 } from "fs";
|
|
11133
11182
|
import { tmpdir as tmpdir5 } from "os";
|
|
11134
11183
|
import { join as join34 } from "path";
|
|
@@ -11158,7 +11207,7 @@ function deleteCommentsCache(prNumber) {
|
|
|
11158
11207
|
|
|
11159
11208
|
// src/commands/prs/resolveCommentWithReply.ts
|
|
11160
11209
|
function replyToComment(org, repo, prNumber, commentId, message) {
|
|
11161
|
-
|
|
11210
|
+
execSync34(
|
|
11162
11211
|
`gh api repos/${org}/${repo}/pulls/${prNumber}/comments -f body="${message.replace(/"/g, '\\"')}" -F in_reply_to=${commentId}`,
|
|
11163
11212
|
{ stdio: ["inherit", "pipe", "inherit"] }
|
|
11164
11213
|
);
|
|
@@ -11168,7 +11217,7 @@ function resolveThread(threadId) {
|
|
|
11168
11217
|
const queryFile = join34(tmpdir5(), `gh-mutation-${Date.now()}.graphql`);
|
|
11169
11218
|
writeFileSync23(queryFile, mutation);
|
|
11170
11219
|
try {
|
|
11171
|
-
|
|
11220
|
+
execSync34(
|
|
11172
11221
|
`gh api graphql -F query=@${queryFile} -f threadId="${threadId}"`,
|
|
11173
11222
|
{ stdio: ["inherit", "pipe", "inherit"] }
|
|
11174
11223
|
);
|
|
@@ -11220,7 +11269,7 @@ function resolveCommentWithReply(commentId, message) {
|
|
|
11220
11269
|
// src/commands/prs/fixed.ts
|
|
11221
11270
|
function verifySha(sha) {
|
|
11222
11271
|
try {
|
|
11223
|
-
return
|
|
11272
|
+
return execSync35(`git rev-parse --verify ${sha}`, {
|
|
11224
11273
|
encoding: "utf-8"
|
|
11225
11274
|
}).trim();
|
|
11226
11275
|
} catch {
|
|
@@ -11234,7 +11283,7 @@ function fixed(commentId, sha) {
|
|
|
11234
11283
|
const { org, repo } = getRepoInfo();
|
|
11235
11284
|
const repoUrl = `https://github.com/${org}/${repo}`;
|
|
11236
11285
|
const message = `Fixed in [${fullSha}](${repoUrl}/commit/${fullSha})`;
|
|
11237
|
-
|
|
11286
|
+
execSync35("git push", { stdio: "inherit" });
|
|
11238
11287
|
resolveCommentWithReply(commentId, message);
|
|
11239
11288
|
} catch (error) {
|
|
11240
11289
|
if (isGhNotInstalled(error)) {
|
|
@@ -11252,7 +11301,7 @@ import { join as join36 } from "path";
|
|
|
11252
11301
|
import { stringify } from "yaml";
|
|
11253
11302
|
|
|
11254
11303
|
// src/commands/prs/fetchThreadIds.ts
|
|
11255
|
-
import { execSync as
|
|
11304
|
+
import { execSync as execSync36 } from "child_process";
|
|
11256
11305
|
import { unlinkSync as unlinkSync11, writeFileSync as writeFileSync24 } from "fs";
|
|
11257
11306
|
import { tmpdir as tmpdir6 } from "os";
|
|
11258
11307
|
import { join as join35 } from "path";
|
|
@@ -11261,7 +11310,7 @@ function fetchThreadIds(org, repo, prNumber) {
|
|
|
11261
11310
|
const queryFile = join35(tmpdir6(), `gh-query-${Date.now()}.graphql`);
|
|
11262
11311
|
writeFileSync24(queryFile, THREAD_QUERY);
|
|
11263
11312
|
try {
|
|
11264
|
-
const result =
|
|
11313
|
+
const result = execSync36(
|
|
11265
11314
|
`gh api graphql -F query=@${queryFile} -F owner="${org}" -F repo="${repo}" -F prNumber=${prNumber}`,
|
|
11266
11315
|
{ encoding: "utf-8" }
|
|
11267
11316
|
);
|
|
@@ -11283,9 +11332,9 @@ function fetchThreadIds(org, repo, prNumber) {
|
|
|
11283
11332
|
}
|
|
11284
11333
|
|
|
11285
11334
|
// src/commands/prs/listComments/fetchReviewComments.ts
|
|
11286
|
-
import { execSync as
|
|
11335
|
+
import { execSync as execSync37 } from "child_process";
|
|
11287
11336
|
function fetchJson(endpoint) {
|
|
11288
|
-
const result =
|
|
11337
|
+
const result = execSync37(`gh api --paginate ${endpoint}`, {
|
|
11289
11338
|
encoding: "utf-8"
|
|
11290
11339
|
});
|
|
11291
11340
|
if (!result.trim()) return [];
|
|
@@ -11424,7 +11473,7 @@ async function listComments() {
|
|
|
11424
11473
|
}
|
|
11425
11474
|
|
|
11426
11475
|
// src/commands/prs/prs/index.ts
|
|
11427
|
-
import { execSync as
|
|
11476
|
+
import { execSync as execSync38 } from "child_process";
|
|
11428
11477
|
|
|
11429
11478
|
// src/commands/prs/prs/displayPaginated/index.ts
|
|
11430
11479
|
import enquirer9 from "enquirer";
|
|
@@ -11531,7 +11580,7 @@ async function prs(options2) {
|
|
|
11531
11580
|
const state = options2.open ? "open" : options2.closed ? "closed" : "all";
|
|
11532
11581
|
try {
|
|
11533
11582
|
const { org, repo } = getRepoInfo();
|
|
11534
|
-
const result =
|
|
11583
|
+
const result = execSync38(
|
|
11535
11584
|
`gh pr list --state ${state} --json number,title,url,author,createdAt,mergedAt,closedAt,state,changedFiles --limit 100 -R ${org}/${repo}`,
|
|
11536
11585
|
{ encoding: "utf-8" }
|
|
11537
11586
|
);
|
|
@@ -11554,7 +11603,7 @@ async function prs(options2) {
|
|
|
11554
11603
|
}
|
|
11555
11604
|
|
|
11556
11605
|
// src/commands/prs/wontfix.ts
|
|
11557
|
-
import { execSync as
|
|
11606
|
+
import { execSync as execSync39 } from "child_process";
|
|
11558
11607
|
function validateReason(reason) {
|
|
11559
11608
|
const lowerReason = reason.toLowerCase();
|
|
11560
11609
|
if (lowerReason.includes("claude") || lowerReason.includes("opus")) {
|
|
@@ -11571,7 +11620,7 @@ function validateShaReferences(reason) {
|
|
|
11571
11620
|
const invalidShas = [];
|
|
11572
11621
|
for (const sha of shas) {
|
|
11573
11622
|
try {
|
|
11574
|
-
|
|
11623
|
+
execSync39(`git cat-file -t ${sha}`, { stdio: "pipe" });
|
|
11575
11624
|
} catch {
|
|
11576
11625
|
invalidShas.push(sha);
|
|
11577
11626
|
}
|
|
@@ -11706,10 +11755,10 @@ import chalk125 from "chalk";
|
|
|
11706
11755
|
import Enquirer2 from "enquirer";
|
|
11707
11756
|
|
|
11708
11757
|
// src/commands/ravendb/searchItems.ts
|
|
11709
|
-
import { execSync as
|
|
11758
|
+
import { execSync as execSync40 } from "child_process";
|
|
11710
11759
|
import chalk124 from "chalk";
|
|
11711
11760
|
function opExec(args) {
|
|
11712
|
-
return
|
|
11761
|
+
return execSync40(`op ${args}`, {
|
|
11713
11762
|
encoding: "utf-8",
|
|
11714
11763
|
stdio: ["pipe", "pipe", "pipe"]
|
|
11715
11764
|
}).trim();
|
|
@@ -11861,7 +11910,7 @@ ${errorText}`
|
|
|
11861
11910
|
}
|
|
11862
11911
|
|
|
11863
11912
|
// src/commands/ravendb/resolveOpSecret.ts
|
|
11864
|
-
import { execSync as
|
|
11913
|
+
import { execSync as execSync41 } from "child_process";
|
|
11865
11914
|
import chalk129 from "chalk";
|
|
11866
11915
|
function resolveOpSecret(reference) {
|
|
11867
11916
|
if (!reference.startsWith("op://")) {
|
|
@@ -11869,7 +11918,7 @@ function resolveOpSecret(reference) {
|
|
|
11869
11918
|
process.exit(1);
|
|
11870
11919
|
}
|
|
11871
11920
|
try {
|
|
11872
|
-
return
|
|
11921
|
+
return execSync41(`op read "${reference}"`, {
|
|
11873
11922
|
encoding: "utf-8",
|
|
11874
11923
|
stdio: ["pipe", "pipe", "pipe"]
|
|
11875
11924
|
}).trim();
|
|
@@ -12118,7 +12167,7 @@ Refactor check failed:
|
|
|
12118
12167
|
}
|
|
12119
12168
|
|
|
12120
12169
|
// src/commands/refactor/check/getViolations/index.ts
|
|
12121
|
-
import { execSync as
|
|
12170
|
+
import { execSync as execSync42 } from "child_process";
|
|
12122
12171
|
import fs18 from "fs";
|
|
12123
12172
|
import { minimatch as minimatch5 } from "minimatch";
|
|
12124
12173
|
|
|
@@ -12168,7 +12217,7 @@ function getGitFiles(options2) {
|
|
|
12168
12217
|
}
|
|
12169
12218
|
const files = /* @__PURE__ */ new Set();
|
|
12170
12219
|
if (options2.staged || options2.modified) {
|
|
12171
|
-
const staged =
|
|
12220
|
+
const staged = execSync42("git diff --cached --name-only", {
|
|
12172
12221
|
encoding: "utf-8"
|
|
12173
12222
|
});
|
|
12174
12223
|
for (const file of staged.trim().split("\n").filter(Boolean)) {
|
|
@@ -12176,7 +12225,7 @@ function getGitFiles(options2) {
|
|
|
12176
12225
|
}
|
|
12177
12226
|
}
|
|
12178
12227
|
if (options2.unstaged || options2.modified) {
|
|
12179
|
-
const unstaged =
|
|
12228
|
+
const unstaged = execSync42("git diff --name-only", { encoding: "utf-8" });
|
|
12180
12229
|
for (const file of unstaged.trim().split("\n").filter(Boolean)) {
|
|
12181
12230
|
files.add(file);
|
|
12182
12231
|
}
|
|
@@ -13752,9 +13801,9 @@ function buildReviewPaths(repoRoot, key) {
|
|
|
13752
13801
|
}
|
|
13753
13802
|
|
|
13754
13803
|
// src/commands/review/fetchExistingComments.ts
|
|
13755
|
-
import { execSync as
|
|
13804
|
+
import { execSync as execSync43 } from "child_process";
|
|
13756
13805
|
function fetchRawComments(org, repo, prNumber) {
|
|
13757
|
-
const out =
|
|
13806
|
+
const out = execSync43(
|
|
13758
13807
|
`gh api --paginate repos/${org}/${repo}/pulls/${prNumber}/comments`,
|
|
13759
13808
|
{ encoding: "utf-8", maxBuffer: 64 * 1024 * 1024 }
|
|
13760
13809
|
);
|
|
@@ -13785,14 +13834,14 @@ function fetchExistingComments() {
|
|
|
13785
13834
|
}
|
|
13786
13835
|
|
|
13787
13836
|
// src/commands/review/gatherContext.ts
|
|
13788
|
-
import { execSync as
|
|
13837
|
+
import { execSync as execSync46 } from "child_process";
|
|
13789
13838
|
|
|
13790
13839
|
// src/commands/review/fetchPrDiff.ts
|
|
13791
|
-
import { execSync as
|
|
13840
|
+
import { execSync as execSync44 } from "child_process";
|
|
13792
13841
|
function fetchPrDiff(prNumber, baseSha, headSha) {
|
|
13793
13842
|
const { org, repo } = getRepoInfo();
|
|
13794
13843
|
try {
|
|
13795
|
-
return
|
|
13844
|
+
return execSync44(`gh pr diff ${prNumber} -R ${org}/${repo}`, {
|
|
13796
13845
|
encoding: "utf-8",
|
|
13797
13846
|
maxBuffer: 256 * 1024 * 1024,
|
|
13798
13847
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -13807,19 +13856,19 @@ function isDiffTooLarge(error) {
|
|
|
13807
13856
|
}
|
|
13808
13857
|
function fetchDiffViaGit(baseSha, headSha) {
|
|
13809
13858
|
try {
|
|
13810
|
-
|
|
13859
|
+
execSync44(`git fetch origin ${baseSha} ${headSha}`, { stdio: "ignore" });
|
|
13811
13860
|
} catch {
|
|
13812
13861
|
}
|
|
13813
|
-
return
|
|
13862
|
+
return execSync44(`git diff ${baseSha}...${headSha}`, {
|
|
13814
13863
|
encoding: "utf-8",
|
|
13815
13864
|
maxBuffer: 256 * 1024 * 1024
|
|
13816
13865
|
});
|
|
13817
13866
|
}
|
|
13818
13867
|
|
|
13819
13868
|
// src/commands/review/fetchPrDiffInfo.ts
|
|
13820
|
-
import { execSync as
|
|
13869
|
+
import { execSync as execSync45 } from "child_process";
|
|
13821
13870
|
function getCurrentBranch2() {
|
|
13822
|
-
return
|
|
13871
|
+
return execSync45("git rev-parse --abbrev-ref HEAD", {
|
|
13823
13872
|
encoding: "utf-8"
|
|
13824
13873
|
}).trim();
|
|
13825
13874
|
}
|
|
@@ -13829,7 +13878,7 @@ function fetchPrDiffInfo() {
|
|
|
13829
13878
|
const fields = "number,baseRefName,baseRefOid,headRefName,headRefOid";
|
|
13830
13879
|
let raw;
|
|
13831
13880
|
try {
|
|
13832
|
-
raw =
|
|
13881
|
+
raw = execSync45(`gh pr view ${branch} --json ${fields} -R ${org}/${repo}`, {
|
|
13833
13882
|
encoding: "utf-8",
|
|
13834
13883
|
stdio: ["ignore", "pipe", "pipe"]
|
|
13835
13884
|
});
|
|
@@ -13853,7 +13902,7 @@ function fetchPrDiffInfo() {
|
|
|
13853
13902
|
}
|
|
13854
13903
|
function fetchPrChangedFiles(prNumber) {
|
|
13855
13904
|
const { org, repo } = getRepoInfo();
|
|
13856
|
-
const out =
|
|
13905
|
+
const out = execSync45(
|
|
13857
13906
|
`gh api repos/${org}/${repo}/pulls/${prNumber}/files --paginate --jq ".[].filename"`,
|
|
13858
13907
|
{
|
|
13859
13908
|
encoding: "utf-8",
|
|
@@ -13865,11 +13914,11 @@ function fetchPrChangedFiles(prNumber) {
|
|
|
13865
13914
|
|
|
13866
13915
|
// src/commands/review/gatherContext.ts
|
|
13867
13916
|
function gatherContext() {
|
|
13868
|
-
const branch =
|
|
13917
|
+
const branch = execSync46("git rev-parse --abbrev-ref HEAD", {
|
|
13869
13918
|
encoding: "utf-8"
|
|
13870
13919
|
}).trim();
|
|
13871
|
-
const sha =
|
|
13872
|
-
const shortSha =
|
|
13920
|
+
const sha = execSync46("git rev-parse HEAD", { encoding: "utf-8" }).trim();
|
|
13921
|
+
const shortSha = execSync46("git rev-parse --short=7 HEAD", {
|
|
13873
13922
|
encoding: "utf-8"
|
|
13874
13923
|
}).trim();
|
|
13875
13924
|
const prInfo = fetchPrDiffInfo();
|
|
@@ -16705,7 +16754,7 @@ import { mkdirSync as mkdirSync18 } from "fs";
|
|
|
16705
16754
|
import { join as join47 } from "path";
|
|
16706
16755
|
|
|
16707
16756
|
// src/commands/voice/checkLockFile.ts
|
|
16708
|
-
import { execSync as
|
|
16757
|
+
import { execSync as execSync47 } from "child_process";
|
|
16709
16758
|
import { existsSync as existsSync45, mkdirSync as mkdirSync17, readFileSync as readFileSync35, writeFileSync as writeFileSync29 } from "fs";
|
|
16710
16759
|
import { join as join46 } from "path";
|
|
16711
16760
|
function isProcessAlive2(pid) {
|
|
@@ -16734,7 +16783,7 @@ function bootstrapVenv() {
|
|
|
16734
16783
|
if (existsSync45(getVenvPython())) return;
|
|
16735
16784
|
console.log("Setting up Python environment...");
|
|
16736
16785
|
const pythonDir = getPythonDir();
|
|
16737
|
-
|
|
16786
|
+
execSync47(
|
|
16738
16787
|
`uv sync --project "${pythonDir}" --extra runtime --no-install-project`,
|
|
16739
16788
|
{
|
|
16740
16789
|
stdio: "inherit",
|
|
@@ -16900,50 +16949,6 @@ function registerVoice(program2) {
|
|
|
16900
16949
|
import { randomBytes } from "crypto";
|
|
16901
16950
|
import chalk160 from "chalk";
|
|
16902
16951
|
|
|
16903
|
-
// src/lib/openBrowser.ts
|
|
16904
|
-
import { execSync as execSync47 } from "child_process";
|
|
16905
|
-
function tryExec(commands) {
|
|
16906
|
-
for (const cmd of commands) {
|
|
16907
|
-
try {
|
|
16908
|
-
execSync47(cmd);
|
|
16909
|
-
return true;
|
|
16910
|
-
} catch {
|
|
16911
|
-
}
|
|
16912
|
-
}
|
|
16913
|
-
return false;
|
|
16914
|
-
}
|
|
16915
|
-
function openBrowser2(url) {
|
|
16916
|
-
const platform = detectPlatform();
|
|
16917
|
-
const quoted = JSON.stringify(url);
|
|
16918
|
-
const commands = [];
|
|
16919
|
-
switch (platform) {
|
|
16920
|
-
case "macos":
|
|
16921
|
-
commands.push(
|
|
16922
|
-
`open -a "Google Chrome" ${quoted}`,
|
|
16923
|
-
`open -a "Microsoft Edge" ${quoted}`,
|
|
16924
|
-
`open -a "Safari" ${quoted}`
|
|
16925
|
-
);
|
|
16926
|
-
break;
|
|
16927
|
-
case "linux":
|
|
16928
|
-
commands.push(
|
|
16929
|
-
`google-chrome ${quoted}`,
|
|
16930
|
-
`chromium-browser ${quoted}`,
|
|
16931
|
-
`microsoft-edge ${quoted}`
|
|
16932
|
-
);
|
|
16933
|
-
break;
|
|
16934
|
-
case "windows":
|
|
16935
|
-
commands.push(`start chrome ${quoted}`, `start msedge ${quoted}`);
|
|
16936
|
-
break;
|
|
16937
|
-
case "wsl":
|
|
16938
|
-
commands.push(`wslview ${quoted}`);
|
|
16939
|
-
break;
|
|
16940
|
-
}
|
|
16941
|
-
if (!tryExec(commands)) {
|
|
16942
|
-
console.log(`Open this URL in Chrome, Edge, or Safari:
|
|
16943
|
-
${url}`);
|
|
16944
|
-
}
|
|
16945
|
-
}
|
|
16946
|
-
|
|
16947
16952
|
// src/commands/roam/waitForCallback.ts
|
|
16948
16953
|
import { createServer as createServer2 } from "http";
|
|
16949
16954
|
function respondHtml(res, status2, title) {
|
|
@@ -17006,7 +17011,7 @@ function buildAuthorizeUrl(clientId, state) {
|
|
|
17006
17011
|
return `https://ro.am/oauth/authorize?${params}`;
|
|
17007
17012
|
}
|
|
17008
17013
|
async function authorizeInBrowser(clientId, state) {
|
|
17009
|
-
|
|
17014
|
+
openBrowser(buildAuthorizeUrl(clientId, state));
|
|
17010
17015
|
const code = await waitForCallback(PORT, state);
|
|
17011
17016
|
return { code, redirectUri: REDIRECT_URI };
|
|
17012
17017
|
}
|
|
@@ -19164,8 +19169,8 @@ function processSessions(files) {
|
|
|
19164
19169
|
|
|
19165
19170
|
// src/commands/sessions/registerSessions.ts
|
|
19166
19171
|
function registerSessions(program2) {
|
|
19167
|
-
const cmd = program2.command("sessions").description("Web dashboard for Claude Code sessions").action(() => web({ port: "3100" }));
|
|
19168
|
-
cmd.command("web").description("Start the sessions web dashboard").option("-p, --port <number>", "Port to listen on", "3100").action(web);
|
|
19172
|
+
const cmd = program2.command("sessions").description("Web dashboard for Claude Code sessions").option("--no-open", "Do not open a browser on startup").action((options2) => web({ port: "3100", open: options2.open }));
|
|
19173
|
+
cmd.command("web").description("Start the sessions web dashboard").option("-p, --port <number>", "Port to listen on", "3100").option("--no-open", "Do not open a browser on startup").action(web);
|
|
19169
19174
|
cmd.command("summarise").description("Generate one-line summaries for Claude sessions").option("-f, --force", "Re-generate all summaries, even existing ones").option("-n, --limit <count>", "Maximum number of sessions to summarise").action(summarise4);
|
|
19170
19175
|
}
|
|
19171
19176
|
|
|
@@ -19388,7 +19393,7 @@ async function update2() {
|
|
|
19388
19393
|
|
|
19389
19394
|
// src/index.ts
|
|
19390
19395
|
var program = new Command();
|
|
19391
|
-
program.name("assist").description("CLI application").version(package_default.version).action(() => web({ port: "3100" }));
|
|
19396
|
+
program.name("assist").description("CLI application").version(package_default.version).option("--no-open", "Do not open a browser on startup").action((options2) => web({ port: "3100", open: options2.open }));
|
|
19392
19397
|
program.command("sync").description("Copy command files to ~/.claude/commands").option("-y, --yes", "Overwrite settings.json without prompting").action((options2) => sync(options2));
|
|
19393
19398
|
program.command("init").description("Initialize VS Code and verify configurations").action(init4);
|
|
19394
19399
|
program.command("commit").description("Create a git commit with validation").argument("<args...>", "status | <message> [files...]").action(commit);
|