repowisestage 0.0.61 → 0.0.62
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/bin/repowise.js +14 -11
- package/package.json +1 -1
package/dist/bin/repowise.js
CHANGED
|
@@ -1481,7 +1481,7 @@ import { promises as fs } from "fs";
|
|
|
1481
1481
|
import { createGunzip } from "zlib";
|
|
1482
1482
|
import { spawn as spawn4 } from "child_process";
|
|
1483
1483
|
import { pipeline } from "stream/promises";
|
|
1484
|
-
import { createHash as
|
|
1484
|
+
import { createHash as createHash3 } from "crypto";
|
|
1485
1485
|
import { join as join15, dirname as dirname5 } from "path";
|
|
1486
1486
|
function getNativeLspDir() {
|
|
1487
1487
|
return join15(getLspInstallDir(), "native");
|
|
@@ -1721,7 +1721,7 @@ async function downloadFile(url, dest) {
|
|
|
1721
1721
|
await pipeline(res.body, sink);
|
|
1722
1722
|
}
|
|
1723
1723
|
async function sha256File(path) {
|
|
1724
|
-
const hash =
|
|
1724
|
+
const hash = createHash3("sha256");
|
|
1725
1725
|
const data = await fs.readFile(path);
|
|
1726
1726
|
hash.update(data);
|
|
1727
1727
|
return hash.digest("hex");
|
|
@@ -3028,6 +3028,7 @@ import lockfile4 from "proper-lockfile";
|
|
|
3028
3028
|
// ../../packages/shared/dist/lib/ai-tools.js
|
|
3029
3029
|
import { readFile as readFile2, writeFile as writeFile2, mkdir as mkdir2, readdir, stat, unlink as unlink2 } from "fs/promises";
|
|
3030
3030
|
import { join as join3, dirname } from "path";
|
|
3031
|
+
import { createHash } from "crypto";
|
|
3031
3032
|
|
|
3032
3033
|
// ../../packages/shared/dist/lib/project-overview-injection.js
|
|
3033
3034
|
var START_MARKER = "<!-- repowise:agent-instructions:start -->";
|
|
@@ -3520,7 +3521,8 @@ async function removeClaudeHooksFromRepo(repoRoot) {
|
|
|
3520
3521
|
}
|
|
3521
3522
|
|
|
3522
3523
|
// ../../packages/shared/dist/lib/ai-tools.js
|
|
3523
|
-
var AI_TOOLS_REFERENCE_REV =
|
|
3524
|
+
var AI_TOOLS_REFERENCE_REV = 3;
|
|
3525
|
+
var AGENT_INSTRUCTIONS_HASH = createHash("sha256").update(AI_AGENT_USAGE_INSTRUCTIONS).digest("hex").slice(0, 12);
|
|
3524
3526
|
var AI_TOOL_CONFIG = {
|
|
3525
3527
|
cursor: {
|
|
3526
3528
|
label: "Cursor",
|
|
@@ -4683,13 +4685,13 @@ function comparePrerelease(a, b) {
|
|
|
4683
4685
|
}
|
|
4684
4686
|
|
|
4685
4687
|
// ../listener/dist/lib/binary-integrity.js
|
|
4686
|
-
import { createHash } from "crypto";
|
|
4688
|
+
import { createHash as createHash2 } from "crypto";
|
|
4687
4689
|
import { lstat, open as open3, readdir as readdir2 } from "fs/promises";
|
|
4688
4690
|
import { constants as fsConstants } from "fs";
|
|
4689
4691
|
import { join as join12, resolve as pathResolve } from "path";
|
|
4690
4692
|
async function verifyBinary(check) {
|
|
4691
4693
|
const fh = await open3(check.path, fsConstants.O_RDONLY | fsConstants.O_NOFOLLOW);
|
|
4692
|
-
const hash =
|
|
4694
|
+
const hash = createHash2("sha256");
|
|
4693
4695
|
try {
|
|
4694
4696
|
const stream = fh.createReadStream();
|
|
4695
4697
|
for await (const chunk of stream) {
|
|
@@ -6078,7 +6080,7 @@ init_config_dir();
|
|
|
6078
6080
|
import { createServer } from "http";
|
|
6079
6081
|
import { mkdir as mkdir14, writeFile as writeFile14 } from "fs/promises";
|
|
6080
6082
|
import { dirname as dirname13, join as join21 } from "path";
|
|
6081
|
-
import { createHash as
|
|
6083
|
+
import { createHash as createHash4, randomUUID as randomUUID2 } from "crypto";
|
|
6082
6084
|
|
|
6083
6085
|
// ../listener/dist/mcp/sanitize.js
|
|
6084
6086
|
var MCP_RESPONSE_BYTE_CAP = 200 * 1024;
|
|
@@ -7547,7 +7549,7 @@ function redactArgs(body) {
|
|
|
7547
7549
|
return out;
|
|
7548
7550
|
}
|
|
7549
7551
|
function redactString(s) {
|
|
7550
|
-
const hash =
|
|
7552
|
+
const hash = createHash4("sha256").update(s).digest("hex").slice(0, 16);
|
|
7551
7553
|
return `<redacted:${s.length.toString()}:${hash}>`;
|
|
7552
7554
|
}
|
|
7553
7555
|
var TOOL_TIMEOUT_MS_LSP = 3e4;
|
|
@@ -9799,7 +9801,7 @@ async function runDownloaderCycle(input, fetchImpl = fetch) {
|
|
|
9799
9801
|
// ../listener/dist/typed-resolution/committed-checkout.js
|
|
9800
9802
|
init_config_dir();
|
|
9801
9803
|
import { execFile as execFileCb3 } from "child_process";
|
|
9802
|
-
import { createHash as
|
|
9804
|
+
import { createHash as createHash5 } from "crypto";
|
|
9803
9805
|
import { mkdir as mkdir15, readdir as readdir5, rm, stat as stat6 } from "fs/promises";
|
|
9804
9806
|
import { join as join39 } from "path";
|
|
9805
9807
|
import { promisify as promisify6 } from "util";
|
|
@@ -9851,7 +9853,7 @@ async function prepareCommittedTree(repoRoot, commitSha, options = {}) {
|
|
|
9851
9853
|
return null;
|
|
9852
9854
|
}
|
|
9853
9855
|
const base = options.worktreeBase ?? worktreeBaseDir();
|
|
9854
|
-
const dirName =
|
|
9856
|
+
const dirName = createHash5("sha256").update(`${repoRoot}\0${commitSha}`).digest("hex").slice(0, 16) + "-" + commitSha.slice(0, 12);
|
|
9855
9857
|
const worktreePath = join39(base, dirName);
|
|
9856
9858
|
try {
|
|
9857
9859
|
await mkdir15(base, { recursive: true });
|
|
@@ -10219,6 +10221,7 @@ async function updateToolConfigsForRepo(localPath, config2, state, repoId) {
|
|
|
10219
10221
|
return;
|
|
10220
10222
|
const hash = JSON.stringify({
|
|
10221
10223
|
rev: AI_TOOLS_REFERENCE_REV,
|
|
10224
|
+
block: AGENT_INSTRUCTIONS_HASH,
|
|
10222
10225
|
tools,
|
|
10223
10226
|
files: contextFiles.map((f) => f.fileName)
|
|
10224
10227
|
});
|
|
@@ -11371,7 +11374,7 @@ import chalk8 from "chalk";
|
|
|
11371
11374
|
import ora from "ora";
|
|
11372
11375
|
|
|
11373
11376
|
// src/lib/auth.ts
|
|
11374
|
-
import { createHash as
|
|
11377
|
+
import { createHash as createHash6, randomBytes as randomBytes3 } from "crypto";
|
|
11375
11378
|
import { readFile as readFile15, writeFile as writeFile17, mkdir as mkdir18, chmod as chmod4, unlink as unlink11 } from "fs/promises";
|
|
11376
11379
|
import http from "http";
|
|
11377
11380
|
import { join as join43 } from "path";
|
|
@@ -11398,7 +11401,7 @@ function generateCodeVerifier() {
|
|
|
11398
11401
|
return randomBytes3(32).toString("base64url");
|
|
11399
11402
|
}
|
|
11400
11403
|
function generateCodeChallenge(verifier) {
|
|
11401
|
-
return
|
|
11404
|
+
return createHash6("sha256").update(verifier).digest("base64url");
|
|
11402
11405
|
}
|
|
11403
11406
|
function generateState() {
|
|
11404
11407
|
return randomBytes3(32).toString("hex");
|