agdex 0.8.1 → 0.9.0
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 +36 -8
- package/dist/cli/index.js +75 -84
- package/dist/{url-scraper-axfs3dz7.js → index-az2g46dy.js} +6 -9
- package/dist/{index-9k6cxm1y.js → index-xbmyce2p.js} +249 -24
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -4
- package/dist/lib/agents-md.d.ts +77 -2
- package/dist/lib/agents-md.d.ts.map +1 -1
- package/dist/lib/index-maintenance.d.ts +6 -0
- package/dist/lib/index-maintenance.d.ts.map +1 -1
- package/dist/lib/lockfile.d.ts +9 -0
- package/dist/lib/lockfile.d.ts.map +1 -1
- package/dist/lib/types.d.ts +18 -0
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/url-scraper-9bqyj00r.js +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,10 +11,30 @@ AI coding agents rely on training data that becomes outdated. When agents don't
|
|
|
11
11
|
1. Downloads version-matched documentation from GitHub
|
|
12
12
|
2. Creates a compressed index (~8KB for Next.js)
|
|
13
13
|
3. Stores the docs in local `.agdex/` cache
|
|
14
|
-
4.
|
|
15
|
-
5.
|
|
14
|
+
4. Writes the full index to a dedicated `DOCINDEX.md` file
|
|
15
|
+
5. Adds a small **Document Indices** pointer section to your local agent instruction file (`AGENTS.md` / `CLAUDE.md`)
|
|
16
|
+
6. Agents can then retrieve specific docs on demand
|
|
16
17
|
|
|
17
|
-
The key instruction
|
|
18
|
+
The key instruction tells agents to **prefer retrieval-led reasoning over pre-training-led reasoning**.
|
|
19
|
+
|
|
20
|
+
### Progressive disclosure
|
|
21
|
+
|
|
22
|
+
To keep your `AGENTS.md` / `CLAUDE.md` lean, agdex uses a progressive disclosure
|
|
23
|
+
strategy. The full (potentially large) per-provider indexes live in `DOCINDEX.md`,
|
|
24
|
+
while your agent file only gets a compact pointer section that is regenerated
|
|
25
|
+
every time an index is added or removed:
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
## Document Indices
|
|
29
|
+
|
|
30
|
+
IMPORTANT: Prefer retrieval-led reasoning over pre-training-led reasoning for any of the docs found in DOCINDEX.md .
|
|
31
|
+
|
|
32
|
+
- NVIDIA TensorRT (`tensorrt`)
|
|
33
|
+
- Bun (`bun`)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Agents read this list, then open `DOCINDEX.md` only when they need the detailed
|
|
37
|
+
file index for a specific library.
|
|
18
38
|
|
|
19
39
|
## Installation
|
|
20
40
|
|
|
@@ -281,7 +301,7 @@ import {
|
|
|
281
301
|
collectDocFiles,
|
|
282
302
|
buildDocTree,
|
|
283
303
|
generateIndex,
|
|
284
|
-
|
|
304
|
+
applyDocIndex
|
|
285
305
|
} from 'agdex'
|
|
286
306
|
|
|
287
307
|
// Collect doc files
|
|
@@ -300,8 +320,15 @@ const index = generateIndex({
|
|
|
300
320
|
instruction: 'Use retrieval-led reasoning.'
|
|
301
321
|
})
|
|
302
322
|
|
|
303
|
-
//
|
|
304
|
-
|
|
323
|
+
// Progressive disclosure: write the full index to DOCINDEX.md and refresh
|
|
324
|
+
// the "## Document Indices" summary section in the agent file.
|
|
325
|
+
applyDocIndex({
|
|
326
|
+
cwd: process.cwd(),
|
|
327
|
+
agentFile: 'CLAUDE.md',
|
|
328
|
+
providerName: 'my-docs',
|
|
329
|
+
indexContent: index,
|
|
330
|
+
// docIndexFile defaults to DOCINDEX.md
|
|
331
|
+
})
|
|
305
332
|
```
|
|
306
333
|
|
|
307
334
|
## Output Format
|
|
@@ -351,8 +378,9 @@ This format:
|
|
|
351
378
|
2. **Download**: Uses git sparse-checkout to fetch only docs folder
|
|
352
379
|
3. **Index**: Builds a tree of all doc files
|
|
353
380
|
4. **Compress**: Generates pipe-delimited format
|
|
354
|
-
5. **
|
|
355
|
-
6. **
|
|
381
|
+
5. **Write index**: Writes/updates the full index in `DOCINDEX.md` (one marked block per provider)
|
|
382
|
+
6. **Summarize**: Refreshes the `## Document Indices` pointer section in `AGENTS.md` / `CLAUDE.md` with the current list of indices
|
|
383
|
+
7. **Gitignore**: Adds docs directory to .gitignore
|
|
356
384
|
|
|
357
385
|
## Contributing
|
|
358
386
|
|
package/dist/cli/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
DEFAULT_DOC_INDEX_FILE,
|
|
4
|
+
applyDocIndex,
|
|
3
5
|
basedpyrightProvider,
|
|
4
6
|
buildDocTree,
|
|
5
7
|
bunProvider,
|
|
@@ -20,11 +22,9 @@ import {
|
|
|
20
22
|
generateSkillsIndex,
|
|
21
23
|
getDefaultOutput,
|
|
22
24
|
getDefaultSkillSources,
|
|
23
|
-
|
|
25
|
+
getDocIndexEntries,
|
|
24
26
|
getProvider,
|
|
25
|
-
hasExistingIndex,
|
|
26
27
|
hasExistingSkillsIndex,
|
|
27
|
-
injectIndex,
|
|
28
28
|
injectSkillsIndex,
|
|
29
29
|
isProviderAvailable,
|
|
30
30
|
listProviders,
|
|
@@ -36,7 +36,8 @@ import {
|
|
|
36
36
|
polarsProvider,
|
|
37
37
|
rattlerBuildProvider,
|
|
38
38
|
readIndexLockfile,
|
|
39
|
-
|
|
39
|
+
removeDocIndexEntry,
|
|
40
|
+
removeIndexLockEntries,
|
|
40
41
|
removeSkillsIndex,
|
|
41
42
|
ruffProvider,
|
|
42
43
|
svelteProvider,
|
|
@@ -44,7 +45,7 @@ import {
|
|
|
44
45
|
tauriProvider,
|
|
45
46
|
tyProvider,
|
|
46
47
|
upsertIndexLockEntry
|
|
47
|
-
} from "../index-
|
|
48
|
+
} from "../index-xbmyce2p.js";
|
|
48
49
|
import {
|
|
49
50
|
__commonJS,
|
|
50
51
|
__require,
|
|
@@ -2114,7 +2115,7 @@ var require_clear = __commonJS((exports, module) => {
|
|
|
2114
2115
|
if (it)
|
|
2115
2116
|
o = it;
|
|
2116
2117
|
var i = 0;
|
|
2117
|
-
var F = function
|
|
2118
|
+
var F = function F2() {};
|
|
2118
2119
|
return { s: F, n: function n() {
|
|
2119
2120
|
if (i >= o.length)
|
|
2120
2121
|
return { done: true };
|
|
@@ -4446,7 +4447,7 @@ var require_dist = __commonJS((exports, module) => {
|
|
|
4446
4447
|
if (it)
|
|
4447
4448
|
o = it;
|
|
4448
4449
|
var i = 0;
|
|
4449
|
-
var F = function
|
|
4450
|
+
var F = function F2() {};
|
|
4450
4451
|
return { s: F, n: function n() {
|
|
4451
4452
|
if (i >= o.length)
|
|
4452
4453
|
return { done: true };
|
|
@@ -4549,7 +4550,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4549
4550
|
}
|
|
4550
4551
|
return question2.format ? yield question2.format(answer2, answers) : answer2;
|
|
4551
4552
|
});
|
|
4552
|
-
return function
|
|
4553
|
+
return function getFormattedAnswer2(_x, _x2) {
|
|
4553
4554
|
return _ref.apply(this, arguments);
|
|
4554
4555
|
};
|
|
4555
4556
|
}();
|
|
@@ -7160,9 +7161,13 @@ Embedding ${import_picocolors2.default.cyan(provider.displayName)} ${import_pico
|
|
|
7160
7161
|
} else {
|
|
7161
7162
|
console.log(`${import_picocolors2.default.green("✓")} Downloaded docs to ${import_picocolors2.default.bold(result.docsPath)}`);
|
|
7162
7163
|
}
|
|
7164
|
+
if (result.docIndexFile) {
|
|
7165
|
+
const docSizeInfo = result.docIndexSizeBefore === 0 ? formatSize(result.docIndexSizeAfter) : `${formatSize(result.docIndexSizeBefore)} → ${formatSize(result.docIndexSizeAfter)}`;
|
|
7166
|
+
console.log(`${import_picocolors2.default.green("✓")} Wrote index to ${import_picocolors2.default.bold(result.docIndexFile)} (${docSizeInfo})`);
|
|
7167
|
+
}
|
|
7163
7168
|
const action = result.isNewFile ? "Created" : "Updated";
|
|
7164
7169
|
const sizeInfo = result.isNewFile ? formatSize(result.sizeAfter) : `${formatSize(result.sizeBefore)} → ${formatSize(result.sizeAfter)}`;
|
|
7165
|
-
console.log(`${import_picocolors2.default.green("✓")} ${action} ${import_picocolors2.default.bold(result.targetFile)} (${sizeInfo})`);
|
|
7170
|
+
console.log(`${import_picocolors2.default.green("✓")} ${action} ${import_picocolors2.default.bold(result.targetFile)} summary (${sizeInfo})`);
|
|
7166
7171
|
if (result.gitignoreUpdated) {
|
|
7167
7172
|
console.log(`${import_picocolors2.default.green("✓")} Added ${import_picocolors2.default.bold(".agdex")} to .gitignore`);
|
|
7168
7173
|
}
|
|
@@ -7555,15 +7560,6 @@ async function runLocal(docsPath, options) {
|
|
|
7555
7560
|
const extensions = options.extensions?.split(",") || [".md", ".mdx"];
|
|
7556
7561
|
console.log(`
|
|
7557
7562
|
Building index from ${import_picocolors2.default.cyan(docsPath)}...`);
|
|
7558
|
-
const targetPath = path.join(cwd, output);
|
|
7559
|
-
let existingContent = "";
|
|
7560
|
-
let sizeBefore = 0;
|
|
7561
|
-
let isNewFile = true;
|
|
7562
|
-
if (fs.existsSync(targetPath)) {
|
|
7563
|
-
existingContent = fs.readFileSync(targetPath, "utf-8");
|
|
7564
|
-
sizeBefore = Buffer.byteLength(existingContent, "utf-8");
|
|
7565
|
-
isNewFile = false;
|
|
7566
|
-
}
|
|
7567
7563
|
const docFiles = collectDocFiles(absoluteDocsPath, { extensions });
|
|
7568
7564
|
const sections = buildDocTree(docFiles);
|
|
7569
7565
|
const indexContent = generateIndex({
|
|
@@ -7575,9 +7571,7 @@ Building index from ${import_picocolors2.default.cyan(docsPath)}...`);
|
|
|
7575
7571
|
regenerateCommand: `npx agdex local ${docsPath} --name "${name}" --output ${output}`
|
|
7576
7572
|
});
|
|
7577
7573
|
const providerName = name.toLowerCase().replace(/\s+/g, "-");
|
|
7578
|
-
const
|
|
7579
|
-
fs.writeFileSync(targetPath, newContent, "utf-8");
|
|
7580
|
-
const sizeAfter = Buffer.byteLength(newContent, "utf-8");
|
|
7574
|
+
const applied = applyDocIndex({ cwd, agentFile: output, providerName, indexContent });
|
|
7581
7575
|
upsertIndexLockEntry(cwd, {
|
|
7582
7576
|
id: createIndexId("docs", providerName, output),
|
|
7583
7577
|
kind: "docs",
|
|
@@ -7593,14 +7587,19 @@ Building index from ${import_picocolors2.default.cyan(docsPath)}...`);
|
|
|
7593
7587
|
cachePath: absoluteDocsPath,
|
|
7594
7588
|
command: `npx agdex local ${docsPath} --name "${name}" --output ${output}`
|
|
7595
7589
|
});
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
7590
|
+
printApplyResult(applied);
|
|
7591
|
+
}
|
|
7592
|
+
function printApplyResult(applied) {
|
|
7593
|
+
const docSizeInfo = applied.docIndexSizeBefore === 0 ? formatSize(applied.docIndexSizeAfter) : `${formatSize(applied.docIndexSizeBefore)} → ${formatSize(applied.docIndexSizeAfter)}`;
|
|
7594
|
+
console.log(`${import_picocolors2.default.green("✓")} Wrote index to ${import_picocolors2.default.bold(applied.docIndexFile)} (${docSizeInfo})`);
|
|
7595
|
+
const action = applied.isNewAgentFile ? "Created" : "Updated";
|
|
7596
|
+
const sizeInfo = applied.isNewAgentFile ? formatSize(applied.agentSizeAfter) : `${formatSize(applied.agentSizeBefore)} → ${formatSize(applied.agentSizeAfter)}`;
|
|
7597
|
+
console.log(`${import_picocolors2.default.green("✓")} ${action} ${import_picocolors2.default.bold(applied.agentFile)} summary (${sizeInfo})`);
|
|
7599
7598
|
console.log("");
|
|
7600
7599
|
}
|
|
7601
7600
|
async function runUrl(url, options) {
|
|
7602
7601
|
const cwd = process.cwd();
|
|
7603
|
-
const { pullDocsFromUrl } = await import("../url-scraper-
|
|
7602
|
+
const { pullDocsFromUrl } = await import("../url-scraper-9bqyj00r.js");
|
|
7604
7603
|
const name = options.name || new URL(url).hostname.replace(/^docs\./, "").replace(/\.\w+$/, "");
|
|
7605
7604
|
const providerName = name.toLowerCase().replace(/\s+/g, "-");
|
|
7606
7605
|
const output = options.output || getDefaultOutput();
|
|
@@ -7634,15 +7633,6 @@ Failed: ${pullResult.error}`));
|
|
|
7634
7633
|
console.log(`
|
|
7635
7634
|
${import_picocolors2.default.green("✓")} Downloaded docs to ${import_picocolors2.default.bold(docsPath)}`);
|
|
7636
7635
|
}
|
|
7637
|
-
const targetPath = path.join(cwd, output);
|
|
7638
|
-
let existingContent = "";
|
|
7639
|
-
let sizeBefore = 0;
|
|
7640
|
-
let isNewFile = true;
|
|
7641
|
-
if (fs.existsSync(targetPath)) {
|
|
7642
|
-
existingContent = fs.readFileSync(targetPath, "utf-8");
|
|
7643
|
-
sizeBefore = Buffer.byteLength(existingContent, "utf-8");
|
|
7644
|
-
isNewFile = false;
|
|
7645
|
-
}
|
|
7646
7636
|
const docFiles = collectDocFiles(docsPath, { extensions: [".md"] });
|
|
7647
7637
|
const sections = buildDocTree(docFiles);
|
|
7648
7638
|
const indexContent = generateIndex({
|
|
@@ -7653,9 +7643,7 @@ ${import_picocolors2.default.green("✓")} Downloaded docs to ${import_picocolor
|
|
|
7653
7643
|
instruction: `IMPORTANT: Prefer retrieval-led reasoning over pre-training-led reasoning for any ${name} tasks.`,
|
|
7654
7644
|
regenerateCommand: `npx agdex url "${url}" --name "${name}" --output ${output}${globalCache ? " --global" : ""}`
|
|
7655
7645
|
});
|
|
7656
|
-
const
|
|
7657
|
-
fs.writeFileSync(targetPath, newContent, "utf-8");
|
|
7658
|
-
const sizeAfter = Buffer.byteLength(newContent, "utf-8");
|
|
7646
|
+
const applied = applyDocIndex({ cwd, agentFile: output, providerName, indexContent });
|
|
7659
7647
|
upsertIndexLockEntry(cwd, {
|
|
7660
7648
|
id: createIndexId("docs", providerName, output),
|
|
7661
7649
|
kind: "docs",
|
|
@@ -7672,16 +7660,13 @@ ${import_picocolors2.default.green("✓")} Downloaded docs to ${import_picocolor
|
|
|
7672
7660
|
cachePath: docsPath,
|
|
7673
7661
|
command: `npx agdex url "${url}" --name "${name}" --output ${output}${globalCache ? " --global" : ""}`
|
|
7674
7662
|
});
|
|
7675
|
-
const action = isNewFile ? "Created" : "Updated";
|
|
7676
|
-
const sizeInfo = isNewFile ? formatSize(sizeAfter) : `${formatSize(sizeBefore)} → ${formatSize(sizeAfter)}`;
|
|
7677
|
-
console.log(`${import_picocolors2.default.green("✓")} ${action} ${import_picocolors2.default.bold(output)} (${sizeInfo})`);
|
|
7678
7663
|
if (!globalCache) {
|
|
7679
7664
|
const gitignoreResult = ensureGitignoreEntry(cwd, ".agdex");
|
|
7680
7665
|
if (gitignoreResult.updated) {
|
|
7681
7666
|
console.log(`${import_picocolors2.default.green("✓")} Added ${import_picocolors2.default.bold(".agdex")} to .gitignore`);
|
|
7682
7667
|
}
|
|
7683
7668
|
}
|
|
7684
|
-
|
|
7669
|
+
printApplyResult(applied);
|
|
7685
7670
|
}
|
|
7686
7671
|
function runList() {
|
|
7687
7672
|
console.log(import_picocolors2.default.cyan(`
|
|
@@ -7914,29 +7899,33 @@ agdex migrate
|
|
|
7914
7899
|
console.log("");
|
|
7915
7900
|
}
|
|
7916
7901
|
program2.command("migrate").description("Create lockfile entries from existing embedded markers when safe").option("-o, --output <file>", "Migrate one agent instruction file").option("--json", "Print machine-readable JSON").action(runMigrate);
|
|
7902
|
+
function removeSkillsFromAgentFile(targetPath) {
|
|
7903
|
+
const content = fs.existsSync(targetPath) ? fs.readFileSync(targetPath, "utf-8") : "";
|
|
7904
|
+
if (!hasExistingSkillsIndex(content))
|
|
7905
|
+
return false;
|
|
7906
|
+
fs.writeFileSync(targetPath, removeSkillsIndex(content), "utf-8");
|
|
7907
|
+
return true;
|
|
7908
|
+
}
|
|
7917
7909
|
async function runRemove(options) {
|
|
7918
7910
|
const cwd = process.cwd();
|
|
7919
7911
|
const output = options.output || getDefaultOutput();
|
|
7920
7912
|
const targetPath = path.join(cwd, output);
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
}
|
|
7925
|
-
let content = fs.readFileSync(targetPath, "utf-8");
|
|
7926
|
-
const sizeBefore = Buffer.byteLength(content, "utf-8");
|
|
7913
|
+
const docIndexPath = path.join(cwd, DEFAULT_DOC_INDEX_FILE);
|
|
7914
|
+
const agentContent = fs.existsSync(targetPath) ? fs.readFileSync(targetPath, "utf-8") : "";
|
|
7915
|
+
const docIndexContent = fs.existsSync(docIndexPath) ? fs.readFileSync(docIndexPath, "utf-8") : "";
|
|
7927
7916
|
const hasExplicitFlags = options.docs || options.skills || options.provider;
|
|
7928
7917
|
if (!hasExplicitFlags) {
|
|
7929
|
-
const
|
|
7930
|
-
const hasSkills = hasExistingSkillsIndex(
|
|
7931
|
-
if (
|
|
7918
|
+
const docEntries = getDocIndexEntries(docIndexContent);
|
|
7919
|
+
const hasSkills = hasExistingSkillsIndex(agentContent);
|
|
7920
|
+
if (docEntries.length === 0 && !hasSkills) {
|
|
7932
7921
|
console.log(import_picocolors2.default.yellow(`
|
|
7933
7922
|
No indices found to remove.
|
|
7934
7923
|
`));
|
|
7935
7924
|
return;
|
|
7936
7925
|
}
|
|
7937
7926
|
const choices = [];
|
|
7938
|
-
for (const
|
|
7939
|
-
choices.push({ title: `docs: ${
|
|
7927
|
+
for (const entry of docEntries) {
|
|
7928
|
+
choices.push({ title: `docs: ${entry.displayName} (${entry.name})`, value: `docs:${entry.name}` });
|
|
7940
7929
|
}
|
|
7941
7930
|
if (hasSkills) {
|
|
7942
7931
|
choices.push({ title: "skills", value: "skills" });
|
|
@@ -7956,64 +7945,66 @@ No indices selected.
|
|
|
7956
7945
|
return;
|
|
7957
7946
|
}
|
|
7958
7947
|
const selected = response.indices;
|
|
7959
|
-
|
|
7948
|
+
const docsRemoved2 = [];
|
|
7960
7949
|
let skillsRemoved2 = false;
|
|
7961
7950
|
for (const item of selected) {
|
|
7962
|
-
if (item
|
|
7963
|
-
content = removeSkillsIndex(content);
|
|
7964
|
-
skillsRemoved2 = true;
|
|
7965
|
-
} else if (item.startsWith("docs:")) {
|
|
7951
|
+
if (item.startsWith("docs:")) {
|
|
7966
7952
|
const provider = item.slice(5);
|
|
7967
|
-
|
|
7968
|
-
|
|
7953
|
+
const res = removeDocIndexEntry({ cwd, agentFile: output, providerName: provider });
|
|
7954
|
+
if (res.removed) {
|
|
7955
|
+
docsRemoved2.push(...res.removedProviders);
|
|
7956
|
+
for (const removedProvider of res.removedProviders) {
|
|
7957
|
+
removeIndexLockEntries(cwd, { kind: "docs", marker: removedProvider });
|
|
7958
|
+
}
|
|
7959
|
+
}
|
|
7969
7960
|
}
|
|
7970
7961
|
}
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
console.log(`${import_picocolors2.default.green("✓")} Removed docs index (${provider}) from ${import_picocolors2.default.bold(output)}`);
|
|
7976
|
-
}
|
|
7977
|
-
if (skillsRemoved2) {
|
|
7978
|
-
console.log(`${import_picocolors2.default.green("✓")} Removed skills index from ${import_picocolors2.default.bold(output)}`);
|
|
7962
|
+
if (selected.includes("skills")) {
|
|
7963
|
+
skillsRemoved2 = removeSkillsFromAgentFile(targetPath);
|
|
7964
|
+
if (skillsRemoved2)
|
|
7965
|
+
removeIndexLockEntries(cwd, { kind: "skills", targetFile: output });
|
|
7979
7966
|
}
|
|
7980
|
-
|
|
7981
|
-
console.log("");
|
|
7967
|
+
printRemoveResult(docsRemoved2, skillsRemoved2, output);
|
|
7982
7968
|
return;
|
|
7983
7969
|
}
|
|
7984
7970
|
const removeAll = !options.docs && !options.skills;
|
|
7985
7971
|
const removeDocs = removeAll || options.docs;
|
|
7986
7972
|
const removeSkillsIdx = removeAll || options.skills;
|
|
7987
|
-
|
|
7973
|
+
const docsRemoved = [];
|
|
7988
7974
|
let skillsRemoved = false;
|
|
7989
|
-
if (removeDocs
|
|
7990
|
-
|
|
7991
|
-
|
|
7975
|
+
if (removeDocs) {
|
|
7976
|
+
const res = removeDocIndexEntry({ cwd, agentFile: output, providerName: options.provider });
|
|
7977
|
+
if (res.removed) {
|
|
7978
|
+
docsRemoved.push(...res.removedProviders);
|
|
7979
|
+
for (const removedProvider of res.removedProviders) {
|
|
7980
|
+
removeIndexLockEntries(cwd, { kind: "docs", marker: removedProvider });
|
|
7981
|
+
}
|
|
7982
|
+
}
|
|
7992
7983
|
}
|
|
7993
|
-
if (removeSkillsIdx
|
|
7994
|
-
|
|
7995
|
-
skillsRemoved
|
|
7984
|
+
if (removeSkillsIdx) {
|
|
7985
|
+
skillsRemoved = removeSkillsFromAgentFile(targetPath);
|
|
7986
|
+
if (skillsRemoved)
|
|
7987
|
+
removeIndexLockEntries(cwd, { kind: "skills", targetFile: output });
|
|
7996
7988
|
}
|
|
7997
|
-
if (
|
|
7989
|
+
if (docsRemoved.length === 0 && !skillsRemoved) {
|
|
7998
7990
|
console.log(import_picocolors2.default.yellow(`
|
|
7999
7991
|
No indices found to remove.
|
|
8000
7992
|
`));
|
|
8001
7993
|
return;
|
|
8002
7994
|
}
|
|
8003
|
-
|
|
8004
|
-
|
|
7995
|
+
printRemoveResult(docsRemoved, skillsRemoved, output);
|
|
7996
|
+
}
|
|
7997
|
+
function printRemoveResult(docsRemoved, skillsRemoved, output) {
|
|
8005
7998
|
console.log("");
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
console.log(`${import_picocolors2.default.green("✓")} Removed docs index${providerInfo} from ${import_picocolors2.default.bold(output)}`);
|
|
7999
|
+
for (const provider of docsRemoved) {
|
|
8000
|
+
console.log(`${import_picocolors2.default.green("✓")} Removed docs index (${provider}) from ${import_picocolors2.default.bold(DEFAULT_DOC_INDEX_FILE)}`);
|
|
8009
8001
|
}
|
|
8010
8002
|
if (skillsRemoved) {
|
|
8011
8003
|
console.log(`${import_picocolors2.default.green("✓")} Removed skills index from ${import_picocolors2.default.bold(output)}`);
|
|
8012
8004
|
}
|
|
8013
|
-
console.log(import_picocolors2.default.gray(` (${formatSize(sizeBefore)} → ${formatSize(sizeAfter)})`));
|
|
8014
8005
|
console.log("");
|
|
8015
8006
|
}
|
|
8016
|
-
program2.command("remove").description("Remove
|
|
8007
|
+
program2.command("remove").description("Remove docs indices from DOCINDEX.md (and skills indices from AGENTS.md/CLAUDE.md)").option("-o, --output <file>", "Target file (default: from config or CLAUDE.local.md)").option("--docs", "Remove only docs indices (from DOCINDEX.md)").option("--skills", "Remove only skills index").option("-p, --provider <name>", "Remove only a specific provider's docs index").action(runRemove);
|
|
8017
8008
|
var skillsCommand = program2.command("skills").description("Manage Claude Code skills indexing");
|
|
8018
8009
|
async function runSkillsEmbed(options) {
|
|
8019
8010
|
const cwd = process.cwd();
|
|
@@ -10817,7 +10817,7 @@ var require_htmlelts = __commonJS((exports) => {
|
|
|
10817
10817
|
var HTMLElement = exports.HTMLElement = define2({
|
|
10818
10818
|
superclass: Element,
|
|
10819
10819
|
name: "HTMLElement",
|
|
10820
|
-
ctor: function
|
|
10820
|
+
ctor: function HTMLElement2(doc, localName, prefix) {
|
|
10821
10821
|
Element.call(this, doc, localName, utils.NAMESPACE.HTML, prefix);
|
|
10822
10822
|
},
|
|
10823
10823
|
props: {
|
|
@@ -10954,7 +10954,7 @@ var require_htmlelts = __commonJS((exports) => {
|
|
|
10954
10954
|
});
|
|
10955
10955
|
var HTMLUnknownElement = define2({
|
|
10956
10956
|
name: "HTMLUnknownElement",
|
|
10957
|
-
ctor: function
|
|
10957
|
+
ctor: function HTMLUnknownElement2(doc, localName, prefix) {
|
|
10958
10958
|
HTMLElement.call(this, doc, localName, prefix);
|
|
10959
10959
|
}
|
|
10960
10960
|
});
|
|
@@ -11169,7 +11169,7 @@ var require_htmlelts = __commonJS((exports) => {
|
|
|
11169
11169
|
define2({
|
|
11170
11170
|
tag: "form",
|
|
11171
11171
|
name: "HTMLFormElement",
|
|
11172
|
-
ctor: function
|
|
11172
|
+
ctor: function HTMLFormElement2(doc, localName, prefix) {
|
|
11173
11173
|
HTMLElement.call(this, doc, localName, prefix);
|
|
11174
11174
|
},
|
|
11175
11175
|
attributes: {
|
|
@@ -12226,7 +12226,7 @@ var require_svg = __commonJS((exports) => {
|
|
|
12226
12226
|
var SVGElement = define2({
|
|
12227
12227
|
superclass: Element,
|
|
12228
12228
|
name: "SVGElement",
|
|
12229
|
-
ctor: function
|
|
12229
|
+
ctor: function SVGElement2(doc, localName, prefix) {
|
|
12230
12230
|
Element.call(this, doc, localName, utils.NAMESPACE.SVG, prefix);
|
|
12231
12231
|
},
|
|
12232
12232
|
props: {
|
|
@@ -12645,7 +12645,7 @@ var require_Document = __commonJS((exports, module) => {
|
|
|
12645
12645
|
contentType: { get: function contentType() {
|
|
12646
12646
|
return this._contentType;
|
|
12647
12647
|
} },
|
|
12648
|
-
URL: { get: function
|
|
12648
|
+
URL: { get: function URL3() {
|
|
12649
12649
|
return this._address;
|
|
12650
12650
|
} },
|
|
12651
12651
|
domain: { get: utils.nyi, set: utils.nyi },
|
|
@@ -16483,7 +16483,7 @@ var require_HTMLParser = __commonJS((exports, module) => {
|
|
|
16483
16483
|
parser(EOF);
|
|
16484
16484
|
doc.modclock = 1;
|
|
16485
16485
|
}
|
|
16486
|
-
var insertToken = htmlparser.insertToken = function
|
|
16486
|
+
var insertToken = htmlparser.insertToken = function insertToken2(t, value, arg3, arg4) {
|
|
16487
16487
|
flushText();
|
|
16488
16488
|
var current = stack.top;
|
|
16489
16489
|
if (!current || current.namespaceURI === NAMESPACE.HTML) {
|
|
@@ -22400,8 +22400,5 @@ async function pullDocsFromUrl(config, destDir, options) {
|
|
|
22400
22400
|
};
|
|
22401
22401
|
}
|
|
22402
22402
|
}
|
|
22403
|
-
export {
|
|
22404
|
-
pullDocsFromUrl
|
|
22405
|
-
};
|
|
22406
22403
|
|
|
22407
22404
|
export { pullDocsFromUrl };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
__require
|
|
3
|
-
__toESM
|
|
2
|
+
__require
|
|
4
3
|
} from "./index-pyanjjwn.js";
|
|
5
4
|
|
|
6
5
|
// src/lib/lockfile.ts
|
|
@@ -68,6 +67,23 @@ function upsertIndexLockEntry(cwd, entry) {
|
|
|
68
67
|
writeIndexLockfile(cwd, lockfile);
|
|
69
68
|
return nextEntry;
|
|
70
69
|
}
|
|
70
|
+
function removeIndexLockEntries(cwd, criteria) {
|
|
71
|
+
const lockfile = readIndexLockfile(cwd);
|
|
72
|
+
const normalizedTarget = criteria.targetFile ? normalizeRelativePath(criteria.targetFile) : undefined;
|
|
73
|
+
const removed = [];
|
|
74
|
+
const kept = lockfile.indexes.filter((entry) => {
|
|
75
|
+
const matches = (criteria.kind === undefined || entry.kind === criteria.kind) && (criteria.marker === undefined || entry.marker === criteria.marker) && (normalizedTarget === undefined || entry.targetFile === normalizedTarget);
|
|
76
|
+
if (matches) {
|
|
77
|
+
removed.push(entry.id);
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
return true;
|
|
81
|
+
});
|
|
82
|
+
if (removed.length > 0) {
|
|
83
|
+
writeIndexLockfile(cwd, { schemaVersion: LOCKFILE_SCHEMA_VERSION, indexes: kept });
|
|
84
|
+
}
|
|
85
|
+
return removed;
|
|
86
|
+
}
|
|
71
87
|
|
|
72
88
|
// src/lib/agents-md.ts
|
|
73
89
|
import { execSync } from "child_process";
|
|
@@ -77,6 +93,9 @@ import os from "os";
|
|
|
77
93
|
var START_MARKER_PREFIX = "<!-- AGENTS-MD-EMBED-START";
|
|
78
94
|
var END_MARKER_PREFIX = "<!-- AGENTS-MD-EMBED-END";
|
|
79
95
|
var MARKER_SUFFIX = " -->";
|
|
96
|
+
var DEFAULT_DOC_INDEX_FILE = "DOCINDEX.md";
|
|
97
|
+
var DOC_SUMMARY_START_MARKER = "<!-- AGENTS-MD-DOCINDEX-SUMMARY-START -->";
|
|
98
|
+
var DOC_SUMMARY_END_MARKER = "<!-- AGENTS-MD-DOCINDEX-SUMMARY-END -->";
|
|
80
99
|
function getStartMarker(providerName) {
|
|
81
100
|
return providerName ? `${START_MARKER_PREFIX}:${providerName}${MARKER_SUFFIX}` : `${START_MARKER_PREFIX}${MARKER_SUFFIX}`;
|
|
82
101
|
}
|
|
@@ -85,7 +104,7 @@ function getEndMarker(providerName) {
|
|
|
85
104
|
}
|
|
86
105
|
async function pullDocs(provider, options) {
|
|
87
106
|
if (provider.urlConfig) {
|
|
88
|
-
const { pullDocsFromUrl } = await import("./url-scraper-
|
|
107
|
+
const { pullDocsFromUrl } = await import("./url-scraper-9bqyj00r.js");
|
|
89
108
|
const docsPath2 = options.docsDir ?? fs2.mkdtempSync(path2.join(os.tmpdir(), "agdex-"));
|
|
90
109
|
return pullDocsFromUrl(provider.urlConfig, docsPath2, { onProgress: options.onProgress });
|
|
91
110
|
}
|
|
@@ -368,6 +387,68 @@ function injectIndex(existingContent, indexContent, providerName) {
|
|
|
368
387
|
const endIdx = existingContent.indexOf(endMarker) + endMarker.length;
|
|
369
388
|
return existingContent.slice(0, startIdx) + wrappedContent + existingContent.slice(endIdx);
|
|
370
389
|
}
|
|
390
|
+
if (existingContent.length === 0) {
|
|
391
|
+
return wrappedContent + `
|
|
392
|
+
`;
|
|
393
|
+
}
|
|
394
|
+
const separator = existingContent.endsWith(`
|
|
395
|
+
`) ? `
|
|
396
|
+
` : `
|
|
397
|
+
|
|
398
|
+
`;
|
|
399
|
+
return existingContent + separator + wrappedContent + `
|
|
400
|
+
`;
|
|
401
|
+
}
|
|
402
|
+
function getDocIndexEntries(content) {
|
|
403
|
+
const entries = [];
|
|
404
|
+
const regex = /<!-- AGENTS-MD-EMBED-START:(\S+?) -->\r?\n([\s\S]*?)<!-- AGENTS-MD-EMBED-END:\1 -->/g;
|
|
405
|
+
let match;
|
|
406
|
+
while ((match = regex.exec(content)) !== null) {
|
|
407
|
+
const name = match[1];
|
|
408
|
+
const block = match[2];
|
|
409
|
+
const headerMatch = block.match(/\[(.+?)\]/);
|
|
410
|
+
let displayName = name;
|
|
411
|
+
if (headerMatch) {
|
|
412
|
+
const parsed = headerMatch[1].replace(/\s*Docs Index$/, "").trim();
|
|
413
|
+
displayName = parsed || name;
|
|
414
|
+
}
|
|
415
|
+
entries.push({ name, displayName });
|
|
416
|
+
}
|
|
417
|
+
return entries;
|
|
418
|
+
}
|
|
419
|
+
function generateDocIndexSummary(entries, docIndexFile = DEFAULT_DOC_INDEX_FILE) {
|
|
420
|
+
const lines = [
|
|
421
|
+
"## Document Indices",
|
|
422
|
+
"",
|
|
423
|
+
`IMPORTANT: Prefer retrieval-led reasoning over pre-training-led reasoning for any of the docs found in ${docIndexFile} .`,
|
|
424
|
+
""
|
|
425
|
+
];
|
|
426
|
+
if (entries.length === 0) {
|
|
427
|
+
lines.push("_No documentation indices available yet._");
|
|
428
|
+
} else {
|
|
429
|
+
for (const entry of entries) {
|
|
430
|
+
lines.push(`- ${entry.displayName} (\`${entry.name}\`)`);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
return lines.join(`
|
|
434
|
+
`);
|
|
435
|
+
}
|
|
436
|
+
function hasDocIndexSummary(content) {
|
|
437
|
+
return content.includes(DOC_SUMMARY_START_MARKER);
|
|
438
|
+
}
|
|
439
|
+
function injectDocIndexSummary(existingContent, summaryContent) {
|
|
440
|
+
const wrappedContent = `${DOC_SUMMARY_START_MARKER}
|
|
441
|
+
${summaryContent}
|
|
442
|
+
${DOC_SUMMARY_END_MARKER}`;
|
|
443
|
+
if (hasDocIndexSummary(existingContent)) {
|
|
444
|
+
const startIdx = existingContent.indexOf(DOC_SUMMARY_START_MARKER);
|
|
445
|
+
const endIdx = existingContent.indexOf(DOC_SUMMARY_END_MARKER) + DOC_SUMMARY_END_MARKER.length;
|
|
446
|
+
return existingContent.slice(0, startIdx) + wrappedContent + existingContent.slice(endIdx);
|
|
447
|
+
}
|
|
448
|
+
if (existingContent.length === 0) {
|
|
449
|
+
return wrappedContent + `
|
|
450
|
+
`;
|
|
451
|
+
}
|
|
371
452
|
const separator = existingContent.endsWith(`
|
|
372
453
|
`) ? `
|
|
373
454
|
` : `
|
|
@@ -376,6 +457,120 @@ function injectIndex(existingContent, indexContent, providerName) {
|
|
|
376
457
|
return existingContent + separator + wrappedContent + `
|
|
377
458
|
`;
|
|
378
459
|
}
|
|
460
|
+
function removeDocIndexSummary(content) {
|
|
461
|
+
if (!hasDocIndexSummary(content)) {
|
|
462
|
+
return content;
|
|
463
|
+
}
|
|
464
|
+
const startIdx = content.indexOf(DOC_SUMMARY_START_MARKER);
|
|
465
|
+
const endIdx = content.indexOf(DOC_SUMMARY_END_MARKER) + DOC_SUMMARY_END_MARKER.length;
|
|
466
|
+
let result = content.slice(0, startIdx) + content.slice(endIdx);
|
|
467
|
+
result = result.replace(/\n{3,}/g, `
|
|
468
|
+
|
|
469
|
+
`);
|
|
470
|
+
result = result.trimEnd();
|
|
471
|
+
if (result.length > 0) {
|
|
472
|
+
result += `
|
|
473
|
+
`;
|
|
474
|
+
}
|
|
475
|
+
return result;
|
|
476
|
+
}
|
|
477
|
+
function applyDocIndex(options) {
|
|
478
|
+
const { cwd, agentFile, providerName, indexContent } = options;
|
|
479
|
+
const docIndexFile = options.docIndexFile || DEFAULT_DOC_INDEX_FILE;
|
|
480
|
+
const docIndexPath = path2.join(cwd, docIndexFile);
|
|
481
|
+
const agentPath = path2.join(cwd, agentFile);
|
|
482
|
+
let docIndexContent = "";
|
|
483
|
+
let docIndexSizeBefore = 0;
|
|
484
|
+
if (fs2.existsSync(docIndexPath)) {
|
|
485
|
+
docIndexContent = fs2.readFileSync(docIndexPath, "utf-8");
|
|
486
|
+
docIndexSizeBefore = Buffer.byteLength(docIndexContent, "utf-8");
|
|
487
|
+
}
|
|
488
|
+
const newDocIndexContent = injectIndex(docIndexContent, indexContent, providerName);
|
|
489
|
+
fs2.writeFileSync(docIndexPath, newDocIndexContent, "utf-8");
|
|
490
|
+
const docIndexSizeAfter = Buffer.byteLength(newDocIndexContent, "utf-8");
|
|
491
|
+
let agentContent = "";
|
|
492
|
+
let agentSizeBefore = 0;
|
|
493
|
+
let isNewAgentFile = true;
|
|
494
|
+
if (fs2.existsSync(agentPath)) {
|
|
495
|
+
agentContent = fs2.readFileSync(agentPath, "utf-8");
|
|
496
|
+
agentSizeBefore = Buffer.byteLength(agentContent, "utf-8");
|
|
497
|
+
isNewAgentFile = false;
|
|
498
|
+
}
|
|
499
|
+
const entries = getDocIndexEntries(newDocIndexContent);
|
|
500
|
+
const summary = generateDocIndexSummary(entries, docIndexFile);
|
|
501
|
+
const newAgentContent = injectDocIndexSummary(agentContent, summary);
|
|
502
|
+
fs2.writeFileSync(agentPath, newAgentContent, "utf-8");
|
|
503
|
+
const agentSizeAfter = Buffer.byteLength(newAgentContent, "utf-8");
|
|
504
|
+
return {
|
|
505
|
+
docIndexFile,
|
|
506
|
+
docIndexPath,
|
|
507
|
+
agentFile,
|
|
508
|
+
agentPath,
|
|
509
|
+
isNewAgentFile,
|
|
510
|
+
agentSizeBefore,
|
|
511
|
+
agentSizeAfter,
|
|
512
|
+
docIndexSizeBefore,
|
|
513
|
+
docIndexSizeAfter,
|
|
514
|
+
entries
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
function removeDocIndexEntry(options) {
|
|
518
|
+
const { cwd, agentFile, providerName } = options;
|
|
519
|
+
const docIndexFile = options.docIndexFile || DEFAULT_DOC_INDEX_FILE;
|
|
520
|
+
const docIndexPath = path2.join(cwd, docIndexFile);
|
|
521
|
+
const agentPath = path2.join(cwd, agentFile);
|
|
522
|
+
const base = {
|
|
523
|
+
removed: false,
|
|
524
|
+
removedProviders: [],
|
|
525
|
+
docIndexFile,
|
|
526
|
+
docIndexDeleted: false,
|
|
527
|
+
agentFile,
|
|
528
|
+
agentSizeBefore: 0,
|
|
529
|
+
agentSizeAfter: 0,
|
|
530
|
+
docIndexSizeBefore: 0,
|
|
531
|
+
docIndexSizeAfter: 0
|
|
532
|
+
};
|
|
533
|
+
if (!fs2.existsSync(docIndexPath)) {
|
|
534
|
+
return base;
|
|
535
|
+
}
|
|
536
|
+
const docIndexContent = fs2.readFileSync(docIndexPath, "utf-8");
|
|
537
|
+
base.docIndexSizeBefore = Buffer.byteLength(docIndexContent, "utf-8");
|
|
538
|
+
if (!hasExistingIndex(docIndexContent, providerName)) {
|
|
539
|
+
base.docIndexSizeAfter = base.docIndexSizeBefore;
|
|
540
|
+
return base;
|
|
541
|
+
}
|
|
542
|
+
const before = getEmbeddedProviders(docIndexContent);
|
|
543
|
+
const newDocIndexContent = removeDocsIndex(docIndexContent, providerName);
|
|
544
|
+
const after = getEmbeddedProviders(newDocIndexContent);
|
|
545
|
+
base.removedProviders = before.filter((p) => !after.includes(p));
|
|
546
|
+
base.removed = true;
|
|
547
|
+
const remainingEntries = getDocIndexEntries(newDocIndexContent);
|
|
548
|
+
let agentContent = "";
|
|
549
|
+
if (fs2.existsSync(agentPath)) {
|
|
550
|
+
agentContent = fs2.readFileSync(agentPath, "utf-8");
|
|
551
|
+
base.agentSizeBefore = Buffer.byteLength(agentContent, "utf-8");
|
|
552
|
+
}
|
|
553
|
+
if (remainingEntries.length === 0) {
|
|
554
|
+
fs2.rmSync(docIndexPath);
|
|
555
|
+
base.docIndexDeleted = true;
|
|
556
|
+
base.docIndexSizeAfter = 0;
|
|
557
|
+
const newAgentContent = removeDocIndexSummary(agentContent);
|
|
558
|
+
if (fs2.existsSync(agentPath)) {
|
|
559
|
+
fs2.writeFileSync(agentPath, newAgentContent, "utf-8");
|
|
560
|
+
}
|
|
561
|
+
base.agentSizeAfter = Buffer.byteLength(newAgentContent, "utf-8");
|
|
562
|
+
} else {
|
|
563
|
+
fs2.writeFileSync(docIndexPath, newDocIndexContent, "utf-8");
|
|
564
|
+
base.docIndexSizeAfter = Buffer.byteLength(newDocIndexContent, "utf-8");
|
|
565
|
+
const summary = generateDocIndexSummary(remainingEntries, docIndexFile);
|
|
566
|
+
const newAgentContent = injectDocIndexSummary(agentContent, summary);
|
|
567
|
+
if (fs2.existsSync(agentPath) || newAgentContent.length > 0) {
|
|
568
|
+
fs2.writeFileSync(agentPath, newAgentContent, "utf-8");
|
|
569
|
+
}
|
|
570
|
+
base.agentSizeAfter = Buffer.byteLength(newAgentContent, "utf-8");
|
|
571
|
+
}
|
|
572
|
+
return base;
|
|
573
|
+
}
|
|
379
574
|
function ensureGitignoreEntry(cwd, docsDir) {
|
|
380
575
|
const gitignorePath = path2.join(cwd, ".gitignore");
|
|
381
576
|
const entry = docsDir.endsWith("/") ? docsDir : `${docsDir}/`;
|
|
@@ -413,7 +608,8 @@ async function embed(options) {
|
|
|
413
608
|
output = "CLAUDE.local.md",
|
|
414
609
|
docsDir: customDocsDir,
|
|
415
610
|
globalCache = false,
|
|
416
|
-
description
|
|
611
|
+
description,
|
|
612
|
+
docIndexFile = DEFAULT_DOC_INDEX_FILE
|
|
417
613
|
} = options;
|
|
418
614
|
let docsPath;
|
|
419
615
|
let docsLinkPath;
|
|
@@ -432,15 +628,6 @@ async function embed(options) {
|
|
|
432
628
|
docsPath = path2.join(cwd, docsDir);
|
|
433
629
|
docsLinkPath = `./${docsDir}`;
|
|
434
630
|
}
|
|
435
|
-
const targetPath = path2.join(cwd, output);
|
|
436
|
-
let sizeBefore = 0;
|
|
437
|
-
let isNewFile = true;
|
|
438
|
-
let existingContent = "";
|
|
439
|
-
if (fs2.existsSync(targetPath)) {
|
|
440
|
-
existingContent = fs2.readFileSync(targetPath, "utf-8");
|
|
441
|
-
sizeBefore = Buffer.byteLength(existingContent, "utf-8");
|
|
442
|
-
isNewFile = false;
|
|
443
|
-
}
|
|
444
631
|
const cacheHit = fs2.existsSync(docsPath) && fs2.readdirSync(docsPath).length > 0;
|
|
445
632
|
let pullResult;
|
|
446
633
|
if (cacheHit) {
|
|
@@ -483,9 +670,13 @@ async function embed(options) {
|
|
|
483
670
|
description,
|
|
484
671
|
regenerateCommand
|
|
485
672
|
});
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
|
|
673
|
+
const applied = applyDocIndex({
|
|
674
|
+
cwd,
|
|
675
|
+
agentFile: output,
|
|
676
|
+
providerName: provider.name,
|
|
677
|
+
indexContent,
|
|
678
|
+
docIndexFile
|
|
679
|
+
});
|
|
489
680
|
let gitignoreUpdated = false;
|
|
490
681
|
if (!globalCache && !customDocsDir) {
|
|
491
682
|
const gitignoreResult = ensureGitignoreEntry(cwd, ".agdex");
|
|
@@ -517,11 +708,14 @@ async function embed(options) {
|
|
|
517
708
|
targetFile: output,
|
|
518
709
|
docsPath: globalCache ? docsPath : docsDir,
|
|
519
710
|
version: pullResult.version,
|
|
520
|
-
sizeBefore,
|
|
521
|
-
sizeAfter,
|
|
522
|
-
isNewFile,
|
|
711
|
+
sizeBefore: applied.agentSizeBefore,
|
|
712
|
+
sizeAfter: applied.agentSizeAfter,
|
|
713
|
+
isNewFile: applied.isNewAgentFile,
|
|
523
714
|
gitignoreUpdated,
|
|
524
|
-
cacheHit
|
|
715
|
+
cacheHit,
|
|
716
|
+
docIndexFile: applied.docIndexFile,
|
|
717
|
+
docIndexSizeBefore: applied.docIndexSizeBefore,
|
|
718
|
+
docIndexSizeAfter: applied.docIndexSizeAfter
|
|
525
719
|
};
|
|
526
720
|
}
|
|
527
721
|
|
|
@@ -2456,6 +2650,20 @@ import fs25 from "fs";
|
|
|
2456
2650
|
import path25 from "path";
|
|
2457
2651
|
var DOCS_MARKER_REGEX = /<!-- AGENTS-MD-EMBED-START:(\S+?) -->/g;
|
|
2458
2652
|
var SKILLS_START_MARKER2 = "<!-- AGENTS-MD-SKILLS-START -->";
|
|
2653
|
+
var DOC_INDEX_FILE = "DOCINDEX.md";
|
|
2654
|
+
function readDocIndexMarkers(cwd) {
|
|
2655
|
+
const docIndexPath = path25.join(cwd, DOC_INDEX_FILE);
|
|
2656
|
+
const names = new Set;
|
|
2657
|
+
if (!fs25.existsSync(docIndexPath))
|
|
2658
|
+
return names;
|
|
2659
|
+
const content = fs25.readFileSync(docIndexPath, "utf-8");
|
|
2660
|
+
const regex = new RegExp(DOCS_MARKER_REGEX.source, "g");
|
|
2661
|
+
let match;
|
|
2662
|
+
while ((match = regex.exec(content)) !== null) {
|
|
2663
|
+
names.add(match[1]);
|
|
2664
|
+
}
|
|
2665
|
+
return names;
|
|
2666
|
+
}
|
|
2459
2667
|
function getDefaultStatusTargets(cwd) {
|
|
2460
2668
|
const targets = [
|
|
2461
2669
|
getDefaultOutput(cwd),
|
|
@@ -2486,16 +2694,21 @@ function createStatusReport(options) {
|
|
|
2486
2694
|
const lockfile = readIndexLockfile(cwd);
|
|
2487
2695
|
const scannedFiles = options.targetFile ? [options.targetFile] : getScannedFiles(cwd, lockfile);
|
|
2488
2696
|
const markers = scannedFiles.flatMap((targetFile) => readEmbeddedMarkers(cwd, targetFile));
|
|
2697
|
+
const docIndexMarkers = readDocIndexMarkers(cwd);
|
|
2489
2698
|
const indexes = [];
|
|
2490
2699
|
const seenMarkers = new Set;
|
|
2700
|
+
const trackedDocsMarkers = new Set;
|
|
2491
2701
|
for (const entry of lockfile.indexes) {
|
|
2492
2702
|
if (options.targetFile && entry.targetFile !== options.targetFile)
|
|
2493
2703
|
continue;
|
|
2494
2704
|
const markerKey = getMarkerKey(entry.kind, entry.marker, entry.targetFile);
|
|
2495
|
-
const
|
|
2496
|
-
|
|
2705
|
+
const markerInFile = markers.find((candidate) => candidate.kind === entry.kind && candidate.marker === entry.marker && candidate.targetFile === entry.targetFile);
|
|
2706
|
+
const hasMarker = entry.kind === "docs" ? Boolean(markerInFile) || docIndexMarkers.has(entry.marker) : Boolean(markerInFile);
|
|
2707
|
+
if (markerInFile)
|
|
2497
2708
|
seenMarkers.add(markerKey);
|
|
2498
|
-
|
|
2709
|
+
if (entry.kind === "docs")
|
|
2710
|
+
trackedDocsMarkers.add(entry.marker);
|
|
2711
|
+
indexes.push(analyzeLockfileEntry(cwd, entry, hasMarker));
|
|
2499
2712
|
}
|
|
2500
2713
|
for (const marker of markers) {
|
|
2501
2714
|
const markerKey = getMarkerKey(marker.kind, marker.marker, marker.targetFile);
|
|
@@ -2510,6 +2723,18 @@ function createStatusReport(options) {
|
|
|
2510
2723
|
suggestedAction: "Run `agdex migrate` or rerun the embed command to create a lockfile entry."
|
|
2511
2724
|
});
|
|
2512
2725
|
}
|
|
2726
|
+
for (const name of docIndexMarkers) {
|
|
2727
|
+
if (trackedDocsMarkers.has(name))
|
|
2728
|
+
continue;
|
|
2729
|
+
indexes.push({
|
|
2730
|
+
id: `untracked:docs:${name}:${DOC_INDEX_FILE}`,
|
|
2731
|
+
kind: "docs",
|
|
2732
|
+
health: "untracked-marker",
|
|
2733
|
+
targetFile: DOC_INDEX_FILE,
|
|
2734
|
+
marker: name,
|
|
2735
|
+
suggestedAction: "Run `agdex migrate` or rerun the embed command to create a lockfile entry."
|
|
2736
|
+
});
|
|
2737
|
+
}
|
|
2513
2738
|
return {
|
|
2514
2739
|
cwd,
|
|
2515
2740
|
lockfilePath: path25.join(cwd, ".agdex", "agdex.lock"),
|
|
@@ -2567,4 +2792,4 @@ function getMarkerKey(kind, marker, targetFile) {
|
|
|
2567
2792
|
return `${kind}:${marker}:${targetFile}`;
|
|
2568
2793
|
}
|
|
2569
2794
|
|
|
2570
|
-
export { getLockfilePath, createIndexId, readIndexLockfile, writeIndexLockfile, upsertIndexLockEntry, pullDocs, collectDocFiles, buildDocTree, generateIndex, hasExistingIndex, getEmbeddedProviders, removeDocsIndex, injectIndex, ensureGitignoreEntry, getGlobalCacheDir, getLocalCacheDir, embed, nextjsProvider, reactProvider, pixiProvider, rattlerBuildProvider, tauriProvider, condaForgeProvider, bunProvider, svelteProvider, tailwindProvider, ruffProvider, tyProvider, basedpyrightProvider, convexProvider, polarsProvider, deltaRsProvider, obsidianProvider, obsidianExcalidrawProvider, ffmpegProvider, manimProvider, tensorrtProvider, createProvider, createLocalProvider, createUrlProvider, getProvider, listProviders, isProviderAvailable, fetchSkillsShSearch, getEnabledPluginSources, parseSkillFrontmatter, discoverPluginSkills, discoverFlatSkills, discoverSkillsShRepo, collectAllSkills, generateSkillsIndex, hasExistingSkillsIndex, removeSkillsIndex, injectSkillsIndex, getDefaultSkillSources, embedSkills, loadConfig, getDefaultOutput, getDefaultStatusTargets, readEmbeddedMarkers, createStatusReport };
|
|
2795
|
+
export { getLockfilePath, createIndexId, readIndexLockfile, writeIndexLockfile, upsertIndexLockEntry, removeIndexLockEntries, DEFAULT_DOC_INDEX_FILE, pullDocs, collectDocFiles, buildDocTree, generateIndex, hasExistingIndex, getEmbeddedProviders, removeDocsIndex, injectIndex, getDocIndexEntries, generateDocIndexSummary, hasDocIndexSummary, injectDocIndexSummary, removeDocIndexSummary, applyDocIndex, removeDocIndexEntry, ensureGitignoreEntry, getGlobalCacheDir, getLocalCacheDir, embed, nextjsProvider, reactProvider, pixiProvider, rattlerBuildProvider, tauriProvider, condaForgeProvider, bunProvider, svelteProvider, tailwindProvider, ruffProvider, tyProvider, basedpyrightProvider, convexProvider, polarsProvider, deltaRsProvider, obsidianProvider, obsidianExcalidrawProvider, ffmpegProvider, manimProvider, tensorrtProvider, createProvider, createLocalProvider, createUrlProvider, getProvider, listProviders, isProviderAvailable, fetchSkillsShSearch, getEnabledPluginSources, parseSkillFrontmatter, discoverPluginSkills, discoverFlatSkills, discoverSkillsShRepo, collectAllSkills, generateSkillsIndex, hasExistingSkillsIndex, removeSkillsIndex, injectSkillsIndex, getDefaultSkillSources, embedSkills, loadConfig, getDefaultOutput, readDocIndexMarkers, getDefaultStatusTargets, readEmbeddedMarkers, createStatusReport };
|
package/dist/index.d.ts
CHANGED
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
* })
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
export { embed, pullDocs, collectDocFiles, buildDocTree, generateIndex, injectIndex, hasExistingIndex, removeDocsIndex, getEmbeddedProviders, ensureGitignoreEntry, getGlobalCacheDir, getLocalCacheDir, } from './lib/agents-md';
|
|
38
|
+
export { embed, pullDocs, collectDocFiles, buildDocTree, generateIndex, injectIndex, hasExistingIndex, removeDocsIndex, getEmbeddedProviders, ensureGitignoreEntry, getGlobalCacheDir, getLocalCacheDir, DEFAULT_DOC_INDEX_FILE, getDocIndexEntries, generateDocIndexSummary, hasDocIndexSummary, injectDocIndexSummary, removeDocIndexSummary, applyDocIndex, removeDocIndexEntry, } from './lib/agents-md';
|
|
39
39
|
export { nextjsProvider, reactProvider, pixiProvider, rattlerBuildProvider, tauriProvider, condaForgeProvider, bunProvider, tensorrtProvider, createProvider, createLocalProvider, createUrlProvider, getProvider, listProviders, isProviderAvailable, } from './lib/providers';
|
|
40
40
|
export { pullDocsFromUrl } from './lib/url-scraper';
|
|
41
41
|
export { embedSkills, collectAllSkills, parseSkillFrontmatter, discoverPluginSkills, discoverFlatSkills, generateSkillsIndex, injectSkillsIndex, hasExistingSkillsIndex, removeSkillsIndex, getDefaultSkillSources, getEnabledPluginSources, } from './lib/skills';
|
|
42
42
|
export { loadConfig, getDefaultOutput } from './lib/config';
|
|
43
43
|
export type { AgdexConfig } from './lib/config';
|
|
44
|
-
export { createIndexId, getLockfilePath, readIndexLockfile, writeIndexLockfile, upsertIndexLockEntry, } from './lib/lockfile';
|
|
45
|
-
export { createStatusReport, getDefaultStatusTargets, readEmbeddedMarkers, } from './lib/index-maintenance';
|
|
44
|
+
export { createIndexId, getLockfilePath, readIndexLockfile, writeIndexLockfile, upsertIndexLockEntry, removeIndexLockEntries, } from './lib/lockfile';
|
|
45
|
+
export { createStatusReport, getDefaultStatusTargets, readEmbeddedMarkers, readDocIndexMarkers, } from './lib/index-maintenance';
|
|
46
46
|
export type { IndexLockEntry, IndexLockSource, IndexLockfile, IndexSourceType, } from './lib/lockfile';
|
|
47
47
|
export type { EmbeddedMarker, IndexHealth, IndexStatus, StatusOptions, StatusReport, } from './lib/index-maintenance';
|
|
48
|
-
export type { DocProvider, DocFile, DocSection, VersionResult, PullResult, GitignoreStatus, IndexOptions, EmbedOptions, EmbedResult, ProviderPreset, UrlDocConfig, SkillFrontmatter, SkillEntry, SkillSource, SkillSourceConfig, SkillsEmbedOptions, SkillsEmbedResult, } from './lib/types';
|
|
48
|
+
export type { DocProvider, DocFile, DocSection, DocIndexEntry, VersionResult, PullResult, GitignoreStatus, IndexOptions, EmbedOptions, EmbedResult, ProviderPreset, UrlDocConfig, SkillFrontmatter, SkillEntry, SkillSource, SkillSourceConfig, SkillsEmbedOptions, SkillsEmbedResult, } from './lib/types';
|
|
49
49
|
export type { GenericProviderOptions } from './lib/providers/generic';
|
|
50
50
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAGH,OAAO,EACL,KAAK,EACL,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAGH,OAAO,EACL,KAAK,EACL,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAEhB,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,aAAa,EACb,mBAAmB,GACpB,MAAM,iBAAiB,CAAA;AAGxB,OAAO,EACL,cAAc,EACd,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,mBAAmB,GACpB,MAAM,iBAAiB,CAAA;AAGxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAGnD,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,cAAc,CAAA;AAGrB,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC3D,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAG/C,OAAO,EACL,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,yBAAyB,CAAA;AAChC,YAAY,EACV,cAAc,EACd,eAAe,EACf,aAAa,EACb,eAAe,GAChB,MAAM,gBAAgB,CAAA;AACvB,YAAY,EACV,cAAc,EACd,WAAW,EACX,WAAW,EACX,aAAa,EACb,YAAY,GACb,MAAM,yBAAyB,CAAA;AAGhC,YAAY,EACV,WAAW,EACX,OAAO,EACP,UAAU,EACV,aAAa,EACb,aAAa,EACb,UAAU,EACV,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,aAAa,CAAA;AAEpB,YAAY,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
+
DEFAULT_DOC_INDEX_FILE,
|
|
3
|
+
applyDocIndex,
|
|
2
4
|
buildDocTree,
|
|
3
5
|
bunProvider,
|
|
4
6
|
collectAllSkills,
|
|
@@ -14,19 +16,23 @@ import {
|
|
|
14
16
|
embed,
|
|
15
17
|
embedSkills,
|
|
16
18
|
ensureGitignoreEntry,
|
|
19
|
+
generateDocIndexSummary,
|
|
17
20
|
generateIndex,
|
|
18
21
|
generateSkillsIndex,
|
|
19
22
|
getDefaultOutput,
|
|
20
23
|
getDefaultSkillSources,
|
|
21
24
|
getDefaultStatusTargets,
|
|
25
|
+
getDocIndexEntries,
|
|
22
26
|
getEmbeddedProviders,
|
|
23
27
|
getEnabledPluginSources,
|
|
24
28
|
getGlobalCacheDir,
|
|
25
29
|
getLocalCacheDir,
|
|
26
30
|
getLockfilePath,
|
|
27
31
|
getProvider,
|
|
32
|
+
hasDocIndexSummary,
|
|
28
33
|
hasExistingIndex,
|
|
29
34
|
hasExistingSkillsIndex,
|
|
35
|
+
injectDocIndexSummary,
|
|
30
36
|
injectIndex,
|
|
31
37
|
injectSkillsIndex,
|
|
32
38
|
isProviderAvailable,
|
|
@@ -38,28 +44,36 @@ import {
|
|
|
38
44
|
pullDocs,
|
|
39
45
|
rattlerBuildProvider,
|
|
40
46
|
reactProvider,
|
|
47
|
+
readDocIndexMarkers,
|
|
41
48
|
readEmbeddedMarkers,
|
|
42
49
|
readIndexLockfile,
|
|
50
|
+
removeDocIndexEntry,
|
|
51
|
+
removeDocIndexSummary,
|
|
43
52
|
removeDocsIndex,
|
|
53
|
+
removeIndexLockEntries,
|
|
44
54
|
removeSkillsIndex,
|
|
45
55
|
tauriProvider,
|
|
46
56
|
tensorrtProvider,
|
|
47
57
|
upsertIndexLockEntry,
|
|
48
58
|
writeIndexLockfile
|
|
49
|
-
} from "./index-
|
|
50
|
-
import"./index-pyanjjwn.js";
|
|
59
|
+
} from "./index-xbmyce2p.js";
|
|
51
60
|
import {
|
|
52
61
|
pullDocsFromUrl
|
|
53
|
-
} from "./
|
|
62
|
+
} from "./index-az2g46dy.js";
|
|
63
|
+
import"./index-pyanjjwn.js";
|
|
54
64
|
export {
|
|
55
65
|
writeIndexLockfile,
|
|
56
66
|
upsertIndexLockEntry,
|
|
57
67
|
tensorrtProvider,
|
|
58
68
|
tauriProvider,
|
|
59
69
|
removeSkillsIndex,
|
|
70
|
+
removeIndexLockEntries,
|
|
60
71
|
removeDocsIndex,
|
|
72
|
+
removeDocIndexSummary,
|
|
73
|
+
removeDocIndexEntry,
|
|
61
74
|
readIndexLockfile,
|
|
62
75
|
readEmbeddedMarkers,
|
|
76
|
+
readDocIndexMarkers,
|
|
63
77
|
reactProvider,
|
|
64
78
|
rattlerBuildProvider,
|
|
65
79
|
pullDocsFromUrl,
|
|
@@ -72,19 +86,23 @@ export {
|
|
|
72
86
|
isProviderAvailable,
|
|
73
87
|
injectSkillsIndex,
|
|
74
88
|
injectIndex,
|
|
89
|
+
injectDocIndexSummary,
|
|
75
90
|
hasExistingSkillsIndex,
|
|
76
91
|
hasExistingIndex,
|
|
92
|
+
hasDocIndexSummary,
|
|
77
93
|
getProvider,
|
|
78
94
|
getLockfilePath,
|
|
79
95
|
getLocalCacheDir,
|
|
80
96
|
getGlobalCacheDir,
|
|
81
97
|
getEnabledPluginSources,
|
|
82
98
|
getEmbeddedProviders,
|
|
99
|
+
getDocIndexEntries,
|
|
83
100
|
getDefaultStatusTargets,
|
|
84
101
|
getDefaultSkillSources,
|
|
85
102
|
getDefaultOutput,
|
|
86
103
|
generateSkillsIndex,
|
|
87
104
|
generateIndex,
|
|
105
|
+
generateDocIndexSummary,
|
|
88
106
|
ensureGitignoreEntry,
|
|
89
107
|
embedSkills,
|
|
90
108
|
embed,
|
|
@@ -99,5 +117,7 @@ export {
|
|
|
99
117
|
collectDocFiles,
|
|
100
118
|
collectAllSkills,
|
|
101
119
|
bunProvider,
|
|
102
|
-
buildDocTree
|
|
120
|
+
buildDocTree,
|
|
121
|
+
applyDocIndex,
|
|
122
|
+
DEFAULT_DOC_INDEX_FILE
|
|
103
123
|
};
|
package/dist/lib/agents-md.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type { DocProvider, DocFile, DocSection, PullResult, GitignoreStatus, IndexOptions, EmbedOptions, EmbedResult } from './types';
|
|
1
|
+
import type { DocProvider, DocFile, DocSection, DocIndexEntry, PullResult, GitignoreStatus, IndexOptions, EmbedOptions, EmbedResult } from './types';
|
|
2
|
+
/** Default file the full docs index is written to (progressive disclosure). */
|
|
3
|
+
export declare const DEFAULT_DOC_INDEX_FILE = "DOCINDEX.md";
|
|
2
4
|
/**
|
|
3
5
|
* Pull documentation from a GitHub repository or URL
|
|
4
6
|
*/
|
|
@@ -45,6 +47,79 @@ export declare function removeDocsIndex(content: string, providerName?: string):
|
|
|
45
47
|
* If providerName specified, only replaces that provider's index (or appends if not present)
|
|
46
48
|
*/
|
|
47
49
|
export declare function injectIndex(existingContent: string, indexContent: string, providerName?: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* Parse the documentation indices present in a DOCINDEX.md file.
|
|
52
|
+
*
|
|
53
|
+
* Each index is wrapped in AGENTS-MD-EMBED-START/END markers and begins with a
|
|
54
|
+
* `[<displayName> Docs Index]` header. Returns the marker name plus a readable
|
|
55
|
+
* display name for each index, in document order.
|
|
56
|
+
*/
|
|
57
|
+
export declare function getDocIndexEntries(content: string): DocIndexEntry[];
|
|
58
|
+
/**
|
|
59
|
+
* Generate the progressive-disclosure summary section that lives in
|
|
60
|
+
* AGENTS.md/CLAUDE.md. It points agents at the full index file and lists the
|
|
61
|
+
* documentation indices currently available there.
|
|
62
|
+
*/
|
|
63
|
+
export declare function generateDocIndexSummary(entries: DocIndexEntry[], docIndexFile?: string): string;
|
|
64
|
+
/**
|
|
65
|
+
* Check whether content already contains the Document Indices summary section
|
|
66
|
+
*/
|
|
67
|
+
export declare function hasDocIndexSummary(content: string): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Inject (or replace) the Document Indices summary section in AGENTS.md/CLAUDE.md
|
|
70
|
+
*/
|
|
71
|
+
export declare function injectDocIndexSummary(existingContent: string, summaryContent: string): string;
|
|
72
|
+
/**
|
|
73
|
+
* Remove the Document Indices summary section from content
|
|
74
|
+
*/
|
|
75
|
+
export declare function removeDocIndexSummary(content: string): string;
|
|
76
|
+
export interface ApplyDocIndexResult {
|
|
77
|
+
docIndexFile: string;
|
|
78
|
+
docIndexPath: string;
|
|
79
|
+
agentFile: string;
|
|
80
|
+
agentPath: string;
|
|
81
|
+
isNewAgentFile: boolean;
|
|
82
|
+
agentSizeBefore: number;
|
|
83
|
+
agentSizeAfter: number;
|
|
84
|
+
docIndexSizeBefore: number;
|
|
85
|
+
docIndexSizeAfter: number;
|
|
86
|
+
entries: DocIndexEntry[];
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Apply a generated index using the progressive-disclosure strategy:
|
|
90
|
+
* 1. Write/replace the full index block in DOCINDEX.md (keyed by providerName)
|
|
91
|
+
* 2. Refresh the "## Document Indices" summary section in the agent file
|
|
92
|
+
* (AGENTS.md/CLAUDE.md) so it lists every index currently in DOCINDEX.md.
|
|
93
|
+
*/
|
|
94
|
+
export declare function applyDocIndex(options: {
|
|
95
|
+
cwd: string;
|
|
96
|
+
agentFile: string;
|
|
97
|
+
providerName: string;
|
|
98
|
+
indexContent: string;
|
|
99
|
+
docIndexFile?: string;
|
|
100
|
+
}): ApplyDocIndexResult;
|
|
101
|
+
export interface RemoveDocIndexResult {
|
|
102
|
+
removed: boolean;
|
|
103
|
+
removedProviders: string[];
|
|
104
|
+
docIndexFile: string;
|
|
105
|
+
docIndexDeleted: boolean;
|
|
106
|
+
agentFile: string;
|
|
107
|
+
agentSizeBefore: number;
|
|
108
|
+
agentSizeAfter: number;
|
|
109
|
+
docIndexSizeBefore: number;
|
|
110
|
+
docIndexSizeAfter: number;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Remove one (or all) documentation indices from DOCINDEX.md and refresh the
|
|
114
|
+
* summary section in the agent file. If no indices remain, DOCINDEX.md is
|
|
115
|
+
* deleted and the summary section is removed from the agent file.
|
|
116
|
+
*/
|
|
117
|
+
export declare function removeDocIndexEntry(options: {
|
|
118
|
+
cwd: string;
|
|
119
|
+
agentFile: string;
|
|
120
|
+
providerName?: string;
|
|
121
|
+
docIndexFile?: string;
|
|
122
|
+
}): RemoveDocIndexResult;
|
|
48
123
|
/**
|
|
49
124
|
* Ensure .gitignore has entry for docs directory
|
|
50
125
|
*/
|
|
@@ -61,5 +136,5 @@ export declare function getLocalCacheDir(cwd: string): string;
|
|
|
61
136
|
* High-level function to embed documentation into an agent instruction file.
|
|
62
137
|
*/
|
|
63
138
|
export declare function embed(options: EmbedOptions): Promise<EmbedResult>;
|
|
64
|
-
export type { DocProvider, DocFile, DocSection, PullResult, GitignoreStatus, IndexOptions, EmbedOptions, EmbedResult, } from './types';
|
|
139
|
+
export type { DocProvider, DocFile, DocSection, DocIndexEntry, PullResult, GitignoreStatus, IndexOptions, EmbedOptions, EmbedResult, } from './types';
|
|
65
140
|
//# sourceMappingURL=agents-md.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents-md.d.ts","sourceRoot":"","sources":["../../src/lib/agents-md.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,WAAW,EACX,OAAO,EACP,UAAU,EACV,UAAU,EACV,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,WAAW,EACZ,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"agents-md.d.ts","sourceRoot":"","sources":["../../src/lib/agents-md.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,WAAW,EACX,OAAO,EACP,UAAU,EACV,aAAa,EACb,UAAU,EACV,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,WAAW,EACZ,MAAM,SAAS,CAAA;AAOhB,+EAA+E;AAC/E,eAAO,MAAM,sBAAsB,gBAAgB,CAAA;AAkBnD;;GAEG;AACH,wBAAsB,QAAQ,CAC5B,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE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EG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,eAAe,CAuBlF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;GAEG;AACH,wBAAsB,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CAoJvE;AAGD,YAAY,EACV,WAAW,EACX,OAAO,EACP,UAAU,EACV,aAAa,EACb,UAAU,EACV,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,WAAW,GACZ,MAAM,SAAS,CAAA"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { type IndexLockEntry } from './lockfile';
|
|
2
|
+
/**
|
|
3
|
+
* Read the docs marker names present in DOCINDEX.md. Under progressive
|
|
4
|
+
* disclosure the full per-provider index blocks live here rather than inline
|
|
5
|
+
* in the agent instruction file.
|
|
6
|
+
*/
|
|
7
|
+
export declare function readDocIndexMarkers(cwd: string): Set<string>;
|
|
2
8
|
export type IndexHealth = 'ok' | 'missing-target' | 'missing-marker' | 'missing-cache' | 'stale-lockfile-entry' | 'untracked-marker' | 'needs-migration';
|
|
3
9
|
export interface EmbeddedMarker {
|
|
4
10
|
kind: 'docs' | 'skills';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-maintenance.d.ts","sourceRoot":"","sources":["../../src/lib/index-maintenance.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,cAAc,EAIpB,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index-maintenance.d.ts","sourceRoot":"","sources":["../../src/lib/index-maintenance.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,cAAc,EAIpB,MAAM,YAAY,CAAA;AAWnB;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,M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declare function resolveStoredPath(cwd: string, storedPath: string): stri
|
|
|
33
33
|
export declare function readIndexLockfile(cwd: string): IndexLockfile;
|
|
34
34
|
export declare function writeIndexLockfile(cwd: string, lockfile: IndexLockfile): void;
|
|
35
35
|
export declare function upsertIndexLockEntry(cwd: string, entry: Omit<IndexLockEntry, 'updatedAt'>): IndexLockEntry;
|
|
36
|
+
/**
|
|
37
|
+
* Remove lockfile entries matching the given criteria. Returns the ids removed.
|
|
38
|
+
* Omitting a field treats it as a wildcard for that field.
|
|
39
|
+
*/
|
|
40
|
+
export declare function removeIndexLockEntries(cwd: string, criteria: {
|
|
41
|
+
kind?: 'docs' | 'skills';
|
|
42
|
+
marker?: string;
|
|
43
|
+
targetFile?: string;
|
|
44
|
+
}): string[];
|
|
36
45
|
//# sourceMappingURL=lockfile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lockfile.d.ts","sourceRoot":"","sources":["../../src/lib/lockfile.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB,IAAI,CAAA;AACxC,eAAO,MAAM,sBAAsB,QAAoC,CAAA;AAEvE,MAAM,MAAM,eAAe,GACvB,kBAAkB,GAClB,aAAa,GACb,YAAY,GACZ,UAAU,GACV,cAAc,GACd,WAAW,CAAA;AAEf,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,eAAe,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,gBAAgB,GAAG,SAAS,CAAA;CAC/D;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,GAAG,QA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AG,EAAE,MAAM,GAAG,aAAa,CAW5D;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,GAAG,IAAI,CAQ7E;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,WAAW,CAAC,GAAG,cAAc,CAkB1G;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3E,MAAM,EAAE,CAsBV"}
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -9,6 +9,16 @@ export interface DocSection {
|
|
|
9
9
|
files: DocFile[];
|
|
10
10
|
subsections: DocSection[];
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* A single documentation index present in DOCINDEX.md.
|
|
14
|
+
* Used to build the progressive-disclosure summary list in AGENTS.md/CLAUDE.md.
|
|
15
|
+
*/
|
|
16
|
+
export interface DocIndexEntry {
|
|
17
|
+
/** Marker/provider name (used by --provider and the embed markers) */
|
|
18
|
+
name: string;
|
|
19
|
+
/** Human-readable display name parsed from the index header */
|
|
20
|
+
displayName: string;
|
|
21
|
+
}
|
|
12
22
|
export interface VersionResult {
|
|
13
23
|
version: string | null;
|
|
14
24
|
error?: string;
|
|
@@ -107,6 +117,8 @@ export interface EmbedOptions {
|
|
|
107
117
|
globalCache?: boolean;
|
|
108
118
|
/** Additional user-provided description to include in the index */
|
|
109
119
|
description?: string;
|
|
120
|
+
/** File the full docs index is written to (default: DOCINDEX.md) */
|
|
121
|
+
docIndexFile?: string;
|
|
110
122
|
}
|
|
111
123
|
export interface EmbedResult {
|
|
112
124
|
success: boolean;
|
|
@@ -119,6 +131,12 @@ export interface EmbedResult {
|
|
|
119
131
|
gitignoreUpdated?: boolean;
|
|
120
132
|
cacheHit?: boolean;
|
|
121
133
|
error?: string;
|
|
134
|
+
/** File the full docs index was written to (e.g. DOCINDEX.md) */
|
|
135
|
+
docIndexFile?: string;
|
|
136
|
+
/** Size of the doc index file before this embed */
|
|
137
|
+
docIndexSizeBefore?: number;
|
|
138
|
+
/** Size of the doc index file after this embed */
|
|
139
|
+
docIndexSizeAfter?: number;
|
|
122
140
|
}
|
|
123
141
|
export interface SkillFrontmatter {
|
|
124
142
|
name: string;
|
package/dist/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,OAAO;IACtB,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,OAAO,EAAE,CAAA;IAChB,WAAW,EAAE,UAAU,EAAE,CAAA;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAA;IAChB,cAAc,EAAE,OAAO,CAAA;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAA;IAEf,oEAAoE;IACpE,eAAe,CAAC,EAAE,MAAM,CAAA;IAExB,6DAA6D;IAC7D,eAAe,CAAC,EAAE,M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