paqad-ai 0.2.1 → 0.2.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/cli/index.js +40 -19
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +40 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -4014,7 +4014,6 @@ async function readIgnoreRules(projectRoot, config) {
|
|
|
4014
4014
|
continue;
|
|
4015
4015
|
}
|
|
4016
4016
|
if (line.startsWith("!")) {
|
|
4017
|
-
console.warn(`Ignoring negation rule "${line}" in ${sourceName}`);
|
|
4018
4017
|
continue;
|
|
4019
4018
|
}
|
|
4020
4019
|
rules.push(
|
|
@@ -4313,7 +4312,11 @@ var init_file_filter = __esm({
|
|
|
4313
4312
|
adapterFileExclusionSet;
|
|
4314
4313
|
diagnosticsSnapshot;
|
|
4315
4314
|
_layer3RulesCache = null;
|
|
4316
|
-
async discoverFiles() {
|
|
4315
|
+
async discoverFiles(onProgress) {
|
|
4316
|
+
onProgress?.({
|
|
4317
|
+
phase: "build",
|
|
4318
|
+
message: "Discovering repository files for RAG eligibility"
|
|
4319
|
+
});
|
|
4317
4320
|
const discovered = await fg("**/*", {
|
|
4318
4321
|
cwd: this.options.projectRoot,
|
|
4319
4322
|
absolute: true,
|
|
@@ -4332,19 +4335,43 @@ var init_file_filter = __esm({
|
|
|
4332
4335
|
excluded_layer4: 0,
|
|
4333
4336
|
passed: 0
|
|
4334
4337
|
};
|
|
4335
|
-
|
|
4338
|
+
onProgress?.({
|
|
4339
|
+
phase: "build",
|
|
4340
|
+
message: `Filtering ${sorted.length} discovered files with RAG rules`,
|
|
4341
|
+
loaded: 0,
|
|
4342
|
+
total: sorted.length,
|
|
4343
|
+
percent: 0
|
|
4344
|
+
});
|
|
4345
|
+
const progressInterval = Math.max(Math.min(Math.floor(sorted.length / 20), 2500), 500);
|
|
4346
|
+
for (const [index, absolutePath] of sorted.entries()) {
|
|
4336
4347
|
const probe = await this.evaluateFile(absolutePath, layer3IgnoreRules);
|
|
4337
4348
|
if (probe.excluded) {
|
|
4338
4349
|
if (probe.layer === 1) stats.excluded_layer1 += 1;
|
|
4339
4350
|
if (probe.layer === 2) stats.excluded_layer2 += 1;
|
|
4340
4351
|
if (probe.layer === 3) stats.excluded_layer3 += 1;
|
|
4341
4352
|
if (probe.layer === 4) stats.excluded_layer4 += 1;
|
|
4342
|
-
|
|
4353
|
+
} else {
|
|
4354
|
+
stats.passed += 1;
|
|
4355
|
+
files.push(absolutePath);
|
|
4356
|
+
}
|
|
4357
|
+
const processed = index + 1;
|
|
4358
|
+
if (processed % progressInterval === 0 || processed === sorted.length) {
|
|
4359
|
+
onProgress?.({
|
|
4360
|
+
phase: "build",
|
|
4361
|
+
message: `Filtered ${processed}/${sorted.length} files; ${stats.passed} remain eligible`,
|
|
4362
|
+
loaded: processed,
|
|
4363
|
+
total: sorted.length,
|
|
4364
|
+
percent: Math.round(processed / sorted.length * 100)
|
|
4365
|
+
});
|
|
4343
4366
|
}
|
|
4344
|
-
stats.passed += 1;
|
|
4345
|
-
files.push(absolutePath);
|
|
4346
4367
|
}
|
|
4347
|
-
|
|
4368
|
+
onProgress?.({
|
|
4369
|
+
phase: "build",
|
|
4370
|
+
message: `RAG file filtering kept ${stats.passed} eligible files`,
|
|
4371
|
+
loaded: sorted.length,
|
|
4372
|
+
total: sorted.length,
|
|
4373
|
+
percent: 100
|
|
4374
|
+
});
|
|
4348
4375
|
return files;
|
|
4349
4376
|
}
|
|
4350
4377
|
filterDiagnostics() {
|
|
@@ -4627,7 +4654,7 @@ var init_service = __esm({
|
|
|
4627
4654
|
provider: provider.name,
|
|
4628
4655
|
model: provider.model
|
|
4629
4656
|
});
|
|
4630
|
-
const sourceFiles = await this.discoverSourceFiles();
|
|
4657
|
+
const sourceFiles = await this.discoverSourceFiles(options?.onProgress);
|
|
4631
4658
|
options?.onProgress?.({
|
|
4632
4659
|
phase: "build",
|
|
4633
4660
|
message: `Chunking ${sourceFiles.length} source files`,
|
|
@@ -4912,7 +4939,7 @@ var init_service = __esm({
|
|
|
4912
4939
|
}
|
|
4913
4940
|
return results;
|
|
4914
4941
|
}
|
|
4915
|
-
async discoverSourceFiles() {
|
|
4942
|
+
async discoverSourceFiles(onProgress) {
|
|
4916
4943
|
const profile = readProjectProfile(this.projectRoot);
|
|
4917
4944
|
const frameworks = profile?.stack_profile?.frameworks ?? [];
|
|
4918
4945
|
const packs = getPacksForFrameworks(frameworks, this.projectRoot);
|
|
@@ -4922,7 +4949,7 @@ var init_service = __esm({
|
|
|
4922
4949
|
packs,
|
|
4923
4950
|
intelligence
|
|
4924
4951
|
});
|
|
4925
|
-
return filter.discoverFiles();
|
|
4952
|
+
return filter.discoverFiles(onProgress);
|
|
4926
4953
|
}
|
|
4927
4954
|
async validateResumeState() {
|
|
4928
4955
|
if (this.resumeValidationPromise) {
|
|
@@ -11485,8 +11512,8 @@ function detectStep(update) {
|
|
|
11485
11512
|
if (update.phase === "download" || update.phase === "load") {
|
|
11486
11513
|
return { id: "prepare", number: 1, title: "Preparing embedding runtime" };
|
|
11487
11514
|
}
|
|
11488
|
-
if (message.includes("chunking") || message.includes("chunked")) {
|
|
11489
|
-
return { id: "scan", number: 2, title: "
|
|
11515
|
+
if (message.includes("discovering repository files") || message.includes("filtering ") || message.includes("filtered ") || message.includes("eligib") || message.includes("chunking") || message.includes("chunked")) {
|
|
11516
|
+
return { id: "scan", number: 2, title: "Discovering, filtering, and chunking the codebase" };
|
|
11490
11517
|
}
|
|
11491
11518
|
if (message.includes("embedded")) {
|
|
11492
11519
|
return { id: "embed", number: 3, title: "Generating embeddings and vector data" };
|
|
@@ -11762,12 +11789,6 @@ var OnboardingOrchestrator = class {
|
|
|
11762
11789
|
projectRoot: options.projectRoot
|
|
11763
11790
|
})
|
|
11764
11791
|
);
|
|
11765
|
-
if (adapter.capabilities.skills) {
|
|
11766
|
-
generatedFiles.push(...await adapter.generateSkills(resolved.skills));
|
|
11767
|
-
}
|
|
11768
|
-
if (adapter.capabilities.agents) {
|
|
11769
|
-
generatedFiles.push(...await adapter.generateAgents(resolved.agents));
|
|
11770
|
-
}
|
|
11771
11792
|
if (adapter.capabilities.hooks) {
|
|
11772
11793
|
generatedFiles.push(...await adapter.installHooks(resolved.hooks));
|
|
11773
11794
|
}
|
|
@@ -15424,7 +15445,7 @@ init_esm_shims();
|
|
|
15424
15445
|
init_esm_shims();
|
|
15425
15446
|
|
|
15426
15447
|
// src/index.ts
|
|
15427
|
-
var VERSION = "0.2.
|
|
15448
|
+
var VERSION = "0.2.2";
|
|
15428
15449
|
|
|
15429
15450
|
// src/cli/commands/capabilities.ts
|
|
15430
15451
|
init_esm_shims();
|