@plusplusoneplusplus/deep-wiki 1.0.0 → 1.0.2
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 +22 -16
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12773,6 +12773,7 @@ async function runSeedsSession(repoPath, options) {
|
|
|
12773
12773
|
}
|
|
12774
12774
|
printInfo(`Building seeds prompt ${gray(`(max topics: ${options.maxTopics})`)}`);
|
|
12775
12775
|
const prompt = buildSeedsPrompt(repoPath, options.maxTopics);
|
|
12776
|
+
const timeoutMs = options.timeout ? options.timeout * 1e3 : DEFAULT_SEEDS_TIMEOUT_MS;
|
|
12776
12777
|
const sendOptions = {
|
|
12777
12778
|
prompt,
|
|
12778
12779
|
workingDirectory: repoPath,
|
|
@@ -12780,7 +12781,7 @@ async function runSeedsSession(repoPath, options) {
|
|
|
12780
12781
|
onPermissionRequest: readOnlyPermissions,
|
|
12781
12782
|
usePool: false,
|
|
12782
12783
|
// Direct session for MCP tool access
|
|
12783
|
-
timeoutMs
|
|
12784
|
+
timeoutMs
|
|
12784
12785
|
};
|
|
12785
12786
|
if (options.model) {
|
|
12786
12787
|
sendOptions.model = options.model;
|
|
@@ -12791,7 +12792,7 @@ async function runSeedsSession(repoPath, options) {
|
|
|
12791
12792
|
const errorMsg = result.error || "Unknown SDK error";
|
|
12792
12793
|
if (errorMsg.toLowerCase().includes("timeout")) {
|
|
12793
12794
|
throw new SeedsError(
|
|
12794
|
-
`Seeds generation timed out after ${
|
|
12795
|
+
`Seeds generation timed out after ${timeoutMs / 1e3}s. Falling back to directory-based heuristic.`,
|
|
12795
12796
|
"timeout"
|
|
12796
12797
|
);
|
|
12797
12798
|
}
|
|
@@ -12834,7 +12835,7 @@ var init_seeds_session = __esm({
|
|
|
12834
12835
|
init_heuristic_fallback();
|
|
12835
12836
|
init_logger();
|
|
12836
12837
|
init_error_utils();
|
|
12837
|
-
DEFAULT_SEEDS_TIMEOUT_MS =
|
|
12838
|
+
DEFAULT_SEEDS_TIMEOUT_MS = 18e5;
|
|
12838
12839
|
SEEDS_TOOLS = ["view", "grep", "glob"];
|
|
12839
12840
|
SeedsError = class extends Error {
|
|
12840
12841
|
constructor(message, code) {
|
|
@@ -13034,6 +13035,9 @@ async function executeSeeds(repoPath, options) {
|
|
|
13034
13035
|
if (options.model) {
|
|
13035
13036
|
printKeyValue("Model", options.model);
|
|
13036
13037
|
}
|
|
13038
|
+
if (options.timeout) {
|
|
13039
|
+
printKeyValue("Timeout", `${options.timeout}s`);
|
|
13040
|
+
}
|
|
13037
13041
|
process.stderr.write("\n");
|
|
13038
13042
|
const spinner = new Spinner();
|
|
13039
13043
|
spinner.start("Generating topic seeds...");
|
|
@@ -13041,6 +13045,7 @@ async function executeSeeds(repoPath, options) {
|
|
|
13041
13045
|
const seeds = await runSeedsSession(absoluteRepoPath, {
|
|
13042
13046
|
maxTopics: options.maxTopics,
|
|
13043
13047
|
model: options.model,
|
|
13048
|
+
timeout: options.timeout,
|
|
13044
13049
|
verbose: options.verbose
|
|
13045
13050
|
});
|
|
13046
13051
|
spinner.succeed("Seeds generation complete");
|
|
@@ -13634,7 +13639,7 @@ var init_discovery_session = __esm({
|
|
|
13634
13639
|
init_response_parser2();
|
|
13635
13640
|
init_logger();
|
|
13636
13641
|
init_error_utils();
|
|
13637
|
-
DEFAULT_DISCOVERY_TIMEOUT_MS =
|
|
13642
|
+
DEFAULT_DISCOVERY_TIMEOUT_MS = 18e5;
|
|
13638
13643
|
DISCOVERY_TOOLS = ["view", "grep", "glob"];
|
|
13639
13644
|
DiscoveryError = class extends Error {
|
|
13640
13645
|
constructor(message, code) {
|
|
@@ -14405,7 +14410,7 @@ async function estimateFileCount(repoPath) {
|
|
|
14405
14410
|
availableTools: ["glob"],
|
|
14406
14411
|
onPermissionRequest: readOnlyPermissions3,
|
|
14407
14412
|
usePool: false,
|
|
14408
|
-
timeoutMs:
|
|
14413
|
+
timeoutMs: 18e5
|
|
14409
14414
|
});
|
|
14410
14415
|
if (!result.success || !result.response) {
|
|
14411
14416
|
printWarning("Could not estimate file count");
|
|
@@ -14605,8 +14610,8 @@ var init_large_repo_handler = __esm({
|
|
|
14605
14610
|
init_logger();
|
|
14606
14611
|
init_cache();
|
|
14607
14612
|
LARGE_REPO_THRESHOLD = 3e3;
|
|
14608
|
-
STRUCTURAL_SCAN_TIMEOUT_MS =
|
|
14609
|
-
PER_AREA_TIMEOUT_MS =
|
|
14613
|
+
STRUCTURAL_SCAN_TIMEOUT_MS = 18e5;
|
|
14614
|
+
PER_AREA_TIMEOUT_MS = 18e5;
|
|
14610
14615
|
DISCOVERY_TOOLS2 = ["view", "grep", "glob"];
|
|
14611
14616
|
}
|
|
14612
14617
|
});
|
|
@@ -14859,7 +14864,7 @@ var init_probe_session = __esm({
|
|
|
14859
14864
|
init_probe_response_parser();
|
|
14860
14865
|
init_logger();
|
|
14861
14866
|
init_error_utils();
|
|
14862
|
-
DEFAULT_PROBE_TIMEOUT_MS =
|
|
14867
|
+
DEFAULT_PROBE_TIMEOUT_MS = 18e5;
|
|
14863
14868
|
PROBE_TOOLS = ["view", "grep", "glob"];
|
|
14864
14869
|
}
|
|
14865
14870
|
});
|
|
@@ -15138,7 +15143,7 @@ var init_merge_session = __esm({
|
|
|
15138
15143
|
init_merge_response_parser();
|
|
15139
15144
|
init_logger();
|
|
15140
15145
|
init_error_utils();
|
|
15141
|
-
DEFAULT_MERGE_TIMEOUT_MS =
|
|
15146
|
+
DEFAULT_MERGE_TIMEOUT_MS = 18e5;
|
|
15142
15147
|
MERGE_TOOLS = ["view", "grep", "glob"];
|
|
15143
15148
|
}
|
|
15144
15149
|
});
|
|
@@ -15674,10 +15679,10 @@ var init_ai_invoker = __esm({
|
|
|
15674
15679
|
"src/ai-invoker.ts"() {
|
|
15675
15680
|
"use strict";
|
|
15676
15681
|
import_pipeline_core9 = __toESM(require_dist());
|
|
15677
|
-
DEFAULT_ANALYSIS_TIMEOUT_MS =
|
|
15678
|
-
DEFAULT_WRITING_TIMEOUT_MS =
|
|
15682
|
+
DEFAULT_ANALYSIS_TIMEOUT_MS = 18e5;
|
|
15683
|
+
DEFAULT_WRITING_TIMEOUT_MS = 18e5;
|
|
15679
15684
|
ANALYSIS_TOOLS = ["view", "grep", "glob"];
|
|
15680
|
-
DEFAULT_CONSOLIDATION_TIMEOUT_MS =
|
|
15685
|
+
DEFAULT_CONSOLIDATION_TIMEOUT_MS = 18e5;
|
|
15681
15686
|
}
|
|
15682
15687
|
});
|
|
15683
15688
|
|
|
@@ -16325,7 +16330,7 @@ var init_ai_consolidator = __esm({
|
|
|
16325
16330
|
init_schemas();
|
|
16326
16331
|
init_constants();
|
|
16327
16332
|
DEFAULT_TARGET_COUNT = 50;
|
|
16328
|
-
DEFAULT_CLUSTERING_TIMEOUT_MS =
|
|
16333
|
+
DEFAULT_CLUSTERING_TIMEOUT_MS = 18e5;
|
|
16329
16334
|
}
|
|
16330
16335
|
});
|
|
16331
16336
|
|
|
@@ -16928,7 +16933,7 @@ async function analyzeModules(options, aiInvoker, onProgress, isCancelled, onIte
|
|
|
16928
16933
|
graph: options.graph,
|
|
16929
16934
|
depth: options.depth || "normal",
|
|
16930
16935
|
concurrency: options.concurrency || 5,
|
|
16931
|
-
timeoutMs: options.timeout ||
|
|
16936
|
+
timeoutMs: options.timeout || 18e5,
|
|
16932
16937
|
model: options.model,
|
|
16933
16938
|
onProgress,
|
|
16934
16939
|
isCancelled,
|
|
@@ -19582,7 +19587,7 @@ async function generateArticles(options, aiInvoker, onProgress, isCancelled, onI
|
|
|
19582
19587
|
analyses: options.analyses,
|
|
19583
19588
|
depth: options.depth || "normal",
|
|
19584
19589
|
concurrency: options.concurrency || 5,
|
|
19585
|
-
timeoutMs: options.timeout ||
|
|
19590
|
+
timeoutMs: options.timeout || 18e5,
|
|
19586
19591
|
model: options.model,
|
|
19587
19592
|
onProgress,
|
|
19588
19593
|
isCancelled,
|
|
@@ -24403,13 +24408,14 @@ var init_serve = __esm({
|
|
|
24403
24408
|
function createProgram() {
|
|
24404
24409
|
const program = new import_commander.Command();
|
|
24405
24410
|
program.name("deep-wiki").description("Auto-generate comprehensive wikis for any codebase").version("1.0.0");
|
|
24406
|
-
program.command("seeds").description("Generate topic seeds for breadth-first discovery").argument("<repo-path>", "Path to the local git repository").option("-o, --output <path>", "Output file path", "seeds.json").option("--max-topics <n>", "Maximum number of topics to generate", (v) => parseInt(v, 10), 50).option("-m, --model <model>", "AI model to use").option("-v, --verbose", "Verbose logging", false).option("--no-color", "Disable colored output").action(async (repoPath, opts) => {
|
|
24411
|
+
program.command("seeds").description("Generate topic seeds for breadth-first discovery").argument("<repo-path>", "Path to the local git repository").option("-o, --output <path>", "Output file path", "seeds.json").option("--max-topics <n>", "Maximum number of topics to generate", (v) => parseInt(v, 10), 50).option("-m, --model <model>", "AI model to use").option("-t, --timeout <seconds>", "Timeout in seconds for seeds session", (v) => parseInt(v, 10)).option("-v, --verbose", "Verbose logging", false).option("--no-color", "Disable colored output").action(async (repoPath, opts) => {
|
|
24407
24412
|
applyGlobalOptions(opts);
|
|
24408
24413
|
const { executeSeeds: executeSeeds2 } = await Promise.resolve().then(() => (init_seeds2(), seeds_exports));
|
|
24409
24414
|
const exitCode = await executeSeeds2(repoPath, {
|
|
24410
24415
|
output: opts.output,
|
|
24411
24416
|
maxTopics: opts.maxTopics || 50,
|
|
24412
24417
|
model: opts.model,
|
|
24418
|
+
timeout: opts.timeout,
|
|
24413
24419
|
verbose: Boolean(opts.verbose)
|
|
24414
24420
|
});
|
|
24415
24421
|
process.exit(exitCode);
|