repowisestage 0.0.37 → 0.0.39
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 +64 -30
- package/package.json +1 -1
package/dist/bin/repowise.js
CHANGED
|
@@ -2737,6 +2737,7 @@ async function stopListener() {
|
|
|
2737
2737
|
}
|
|
2738
2738
|
|
|
2739
2739
|
// ../listener/dist/mcp/bootstrap.js
|
|
2740
|
+
init_config_dir();
|
|
2740
2741
|
import { join as join17 } from "path";
|
|
2741
2742
|
|
|
2742
2743
|
// ../listener/dist/lsp/workspace-session.js
|
|
@@ -3355,6 +3356,7 @@ var PathEscapeError = class extends Error {
|
|
|
3355
3356
|
};
|
|
3356
3357
|
|
|
3357
3358
|
// ../listener/dist/mcp/graph-cache.js
|
|
3359
|
+
init_config_dir();
|
|
3358
3360
|
import { readFile as readFile8, stat as stat3 } from "fs/promises";
|
|
3359
3361
|
import { join as join15 } from "path";
|
|
3360
3362
|
var EVICT_DEBOUNCE_MS = 6e4;
|
|
@@ -3460,8 +3462,7 @@ function createGraphCache(options = {}) {
|
|
|
3460
3462
|
};
|
|
3461
3463
|
}
|
|
3462
3464
|
function defaultRepoWiseHome() {
|
|
3463
|
-
|
|
3464
|
-
return join15(home, ".repowise");
|
|
3465
|
+
return getConfigDir();
|
|
3465
3466
|
}
|
|
3466
3467
|
|
|
3467
3468
|
// ../listener/dist/mcp/graph-downloader.js
|
|
@@ -3878,6 +3879,7 @@ async function isLocallyConsented(flagPath2) {
|
|
|
3878
3879
|
}
|
|
3879
3880
|
|
|
3880
3881
|
// ../listener/dist/mcp/mcp-server.js
|
|
3882
|
+
init_config_dir();
|
|
3881
3883
|
import { createServer } from "http";
|
|
3882
3884
|
import { mkdir as mkdir13, writeFile as writeFile13 } from "fs/promises";
|
|
3883
3885
|
import { dirname as dirname10, join as join16 } from "path";
|
|
@@ -5233,8 +5235,7 @@ function extractBearer(header) {
|
|
|
5233
5235
|
return m ? m[1] : null;
|
|
5234
5236
|
}
|
|
5235
5237
|
function defaultEndpointFile() {
|
|
5236
|
-
|
|
5237
|
-
return join16(home, ".repowise", "listener.endpoint");
|
|
5238
|
+
return join16(getConfigDir(), "listener.endpoint");
|
|
5238
5239
|
}
|
|
5239
5240
|
|
|
5240
5241
|
// ../listener/dist/mcp/bootstrap.js
|
|
@@ -5410,12 +5411,10 @@ async function startMcp(options) {
|
|
|
5410
5411
|
};
|
|
5411
5412
|
}
|
|
5412
5413
|
function defaultGraphsDir() {
|
|
5413
|
-
|
|
5414
|
-
return join17(home, ".repowise", "graphs");
|
|
5414
|
+
return join17(getConfigDir(), "graphs");
|
|
5415
5415
|
}
|
|
5416
5416
|
function defaultMcpHome() {
|
|
5417
|
-
|
|
5418
|
-
return join17(home, ".repowise");
|
|
5417
|
+
return getConfigDir();
|
|
5419
5418
|
}
|
|
5420
5419
|
|
|
5421
5420
|
// ../listener/dist/typed-resolution/resolver-loop.js
|
|
@@ -6143,13 +6142,13 @@ async function startListener() {
|
|
|
6143
6142
|
const fresh = await getValidCredentials();
|
|
6144
6143
|
if (!fresh)
|
|
6145
6144
|
throw new Error("no credentials for MCP graph fetch");
|
|
6146
|
-
return fresh.
|
|
6145
|
+
return fresh.accessToken;
|
|
6147
6146
|
},
|
|
6148
6147
|
getAuthTokenForceRefresh: async () => {
|
|
6149
6148
|
const fresh = await getValidCredentials({ forceRefresh: true });
|
|
6150
6149
|
if (!fresh)
|
|
6151
6150
|
throw new Error("no credentials for MCP log upload refresh");
|
|
6152
|
-
return fresh.
|
|
6151
|
+
return fresh.accessToken;
|
|
6153
6152
|
}
|
|
6154
6153
|
});
|
|
6155
6154
|
if (mcpRuntime.server) {
|
|
@@ -6172,13 +6171,13 @@ async function startListener() {
|
|
|
6172
6171
|
const fresh = await getValidCredentials();
|
|
6173
6172
|
if (!fresh)
|
|
6174
6173
|
throw new Error("no credentials for typed-resolution");
|
|
6175
|
-
return fresh.
|
|
6174
|
+
return fresh.accessToken;
|
|
6176
6175
|
},
|
|
6177
6176
|
getAuthTokenForceRefresh: async () => {
|
|
6178
6177
|
const fresh = await getValidCredentials({ forceRefresh: true });
|
|
6179
6178
|
if (!fresh)
|
|
6180
6179
|
throw new Error("no credentials for typed-resolution refresh");
|
|
6181
|
-
return fresh.
|
|
6180
|
+
return fresh.accessToken;
|
|
6182
6181
|
}
|
|
6183
6182
|
}) : null;
|
|
6184
6183
|
const shutdown = async () => {
|
|
@@ -7153,7 +7152,7 @@ async function handleInterview(syncId, questionId, questionText, questionContext
|
|
|
7153
7152
|
console.log(chalk3.dim(` ${questionContext}`));
|
|
7154
7153
|
}
|
|
7155
7154
|
console.log(` ${questionText}`);
|
|
7156
|
-
console.log(chalk3.dim(' (Enter to submit \xB7 Enter to skip \xB7 "done" to finish early)'));
|
|
7155
|
+
console.log(chalk3.dim(' (double Enter to submit \xB7 Enter to skip \xB7 "done" to finish early)'));
|
|
7157
7156
|
let answer;
|
|
7158
7157
|
try {
|
|
7159
7158
|
answer = await Promise.race([
|
|
@@ -7246,8 +7245,11 @@ function computeOverallProgress(syncResult) {
|
|
|
7246
7245
|
var ProgressRenderer = class {
|
|
7247
7246
|
privacyShieldShown = false;
|
|
7248
7247
|
discoveryShown = false;
|
|
7248
|
+
interviewCompleteShown = false;
|
|
7249
7249
|
scanHeaderShown = false;
|
|
7250
7250
|
scanSummaryShown = false;
|
|
7251
|
+
graphSubtitleShown = false;
|
|
7252
|
+
graphSummaryShown = false;
|
|
7251
7253
|
generationHeaderShown = false;
|
|
7252
7254
|
coreSubtitleShown = false;
|
|
7253
7255
|
coreCompleteShown = false;
|
|
@@ -7342,17 +7344,29 @@ var ProgressRenderer = class {
|
|
|
7342
7344
|
printNode(child, "", idx === topLevel.length - 1);
|
|
7343
7345
|
});
|
|
7344
7346
|
}
|
|
7347
|
+
/**
|
|
7348
|
+
* Coffee-and-context message shown once, after the user-driven interview
|
|
7349
|
+
* completes. This is the gate between user input and the long
|
|
7350
|
+
* machine-driven scan/generate/validate phases.
|
|
7351
|
+
*/
|
|
7352
|
+
renderInterviewComplete(spinner) {
|
|
7353
|
+
if (this.interviewCompleteShown) return;
|
|
7354
|
+
this.interviewCompleteShown = true;
|
|
7355
|
+
spinner.stop();
|
|
7356
|
+
console.log("");
|
|
7357
|
+
console.log(
|
|
7358
|
+
chalk4.cyan(" \u2615 Sit back and grab a coffee \u2014 we'll handle the rest from here.")
|
|
7359
|
+
);
|
|
7360
|
+
console.log("");
|
|
7361
|
+
spinner.start();
|
|
7362
|
+
}
|
|
7345
7363
|
renderScanProgress(progress, spinner) {
|
|
7346
7364
|
if (!this.scanHeaderShown) {
|
|
7365
|
+
this.renderInterviewComplete(spinner);
|
|
7347
7366
|
this.scanHeaderShown = true;
|
|
7348
7367
|
spinner.stop();
|
|
7349
7368
|
console.log("");
|
|
7350
7369
|
console.log(chalk4.cyan.bold(" \u2500\u2500 Code Analysis \u2500\u2500"));
|
|
7351
|
-
console.log(
|
|
7352
|
-
chalk4.cyan(
|
|
7353
|
-
" \u2615 This takes a few minutes \u2014 grab a coffee, we'll handle the rest!"
|
|
7354
|
-
)
|
|
7355
|
-
);
|
|
7356
7370
|
console.log(chalk4.dim(" Analyzing your codebase structure, functions, and relationships."));
|
|
7357
7371
|
spinner.start();
|
|
7358
7372
|
}
|
|
@@ -7366,6 +7380,25 @@ var ProgressRenderer = class {
|
|
|
7366
7380
|
console.log("");
|
|
7367
7381
|
spinner.start();
|
|
7368
7382
|
}
|
|
7383
|
+
if (progress.summary && !this.graphSubtitleShown) {
|
|
7384
|
+
this.graphSubtitleShown = true;
|
|
7385
|
+
spinner.stop();
|
|
7386
|
+
console.log(
|
|
7387
|
+
chalk4.dim(" Building knowledge graph \u2014 mapping how your code connects\u2026")
|
|
7388
|
+
);
|
|
7389
|
+
spinner.start();
|
|
7390
|
+
}
|
|
7391
|
+
if (progress.summary && !this.graphSummaryShown && typeof progress.summary.graphNodes === "number" && typeof progress.summary.graphEdges === "number") {
|
|
7392
|
+
this.graphSummaryShown = true;
|
|
7393
|
+
const nodes = progress.summary.graphNodes;
|
|
7394
|
+
const edges = progress.summary.graphEdges;
|
|
7395
|
+
spinner.stop();
|
|
7396
|
+
console.log(
|
|
7397
|
+
` ${chalk4.green("\u2713")} Knowledge graph ready: ${nodes} nodes \xB7 ${edges} edges`
|
|
7398
|
+
);
|
|
7399
|
+
console.log("");
|
|
7400
|
+
spinner.start();
|
|
7401
|
+
}
|
|
7369
7402
|
}
|
|
7370
7403
|
renderFileStatuses(fileStatuses, spinner) {
|
|
7371
7404
|
if (!this.generationHeaderShown) {
|
|
@@ -7931,23 +7964,24 @@ Files are stored on our servers (not in git). Retry when online.`
|
|
|
7931
7964
|
}
|
|
7932
7965
|
const elapsed = formatElapsed(Date.now() - startTime);
|
|
7933
7966
|
console.log("");
|
|
7934
|
-
console.log(chalk5.green.bold(
|
|
7935
|
-
console.log(
|
|
7936
|
-
chalk5.green(
|
|
7937
|
-
` Your AI tools now have access to project context for ${chalk5.bold(repoName)}.`
|
|
7938
|
-
)
|
|
7939
|
-
);
|
|
7967
|
+
console.log(chalk5.green.bold(` \u2728 Setup complete \u2014 ${repoName} is ready.`));
|
|
7940
7968
|
if (listenerRunning) {
|
|
7941
7969
|
console.log("");
|
|
7942
|
-
console.log(chalk5.cyan("
|
|
7943
|
-
console.log(
|
|
7944
|
-
|
|
7970
|
+
console.log(chalk5.cyan(" What\u2019s running now"));
|
|
7971
|
+
console.log(
|
|
7972
|
+
` ${chalk5.green("\u2022")} The RepoWise Listener is Live \u2014 context auto-updates on every push.`
|
|
7973
|
+
);
|
|
7974
|
+
console.log(
|
|
7975
|
+
` ${chalk5.green("\u2022")} The RepoWise MCP is Live \u2014 your AI tools can query the knowledge graph directly.`
|
|
7976
|
+
);
|
|
7945
7977
|
}
|
|
7946
7978
|
console.log("");
|
|
7979
|
+
console.log(chalk5.cyan(" Next steps"));
|
|
7947
7980
|
console.log(
|
|
7948
|
-
chalk5.cyan(
|
|
7949
|
-
|
|
7950
|
-
|
|
7981
|
+
` ${chalk5.cyan("\u2022")} Open Claude Code / Cursor and ask: "What does this repo do?"`
|
|
7982
|
+
);
|
|
7983
|
+
console.log(
|
|
7984
|
+
` ${chalk5.cyan("\u2022")} Head to the dashboard \u2192 "Complete Onboarding" to explore quality scores and gaps.`
|
|
7951
7985
|
);
|
|
7952
7986
|
console.log(chalk5.dim(`
|
|
7953
7987
|
Total time: ${elapsed}`));
|