agdex 0.6.1 → 0.8.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.
@@ -1,6 +1,7 @@
1
1
  import {
2
- __require
3
- } from "./index-dtcewfnz.js";
2
+ __require,
3
+ __toESM
4
+ } from "./url-scraper-fme0jdje.js";
4
5
 
5
6
  // src/lib/agents-md.ts
6
7
  import { execSync } from "child_process";
@@ -18,7 +19,7 @@ function getEndMarker(providerName) {
18
19
  }
19
20
  async function pullDocs(provider, options) {
20
21
  if (provider.urlConfig) {
21
- const { pullDocsFromUrl } = await import("./url-scraper-5sj8c56t.js");
22
+ const { pullDocsFromUrl } = await import("./url-scraper-fme0jdje.js");
22
23
  const docsPath2 = options.docsDir ?? fs.mkdtempSync(path.join(os.tmpdir(), "agdex-"));
23
24
  return pullDocsFromUrl(provider.urlConfig, docsPath2, { onProgress: options.onProgress });
24
25
  }
@@ -342,9 +343,9 @@ async function embed(options) {
342
343
  cwd,
343
344
  provider,
344
345
  version,
345
- output = "AGENTS.md",
346
+ output = "CLAUDE.local.md",
346
347
  docsDir: customDocsDir,
347
- globalCache = true,
348
+ globalCache = false,
348
349
  description
349
350
  } = options;
350
351
  let docsPath;
@@ -404,8 +405,8 @@ async function embed(options) {
404
405
  excludePatterns: provider.excludePatterns
405
406
  });
406
407
  const sections = buildDocTree(docFiles);
407
- const localFlag = !globalCache ? " --local" : "";
408
- const regenerateCommand = `npx agdex --provider ${provider.name} --output ${output}${localFlag}`;
408
+ const cacheFlag = globalCache ? " --global" : "";
409
+ const regenerateCommand = `npx agdex --provider ${provider.name} --output ${output}${cacheFlag}`;
409
410
  const indexContent = generateIndex({
410
411
  docsPath: docsLinkPath,
411
412
  sections,
@@ -2325,7 +2326,7 @@ async function embedSkills(options) {
2325
2326
  import fs23 from "fs";
2326
2327
  import path23 from "path";
2327
2328
  var DEFAULT_CONFIG = {
2328
- output: "CLAUDE.md"
2329
+ output: "CLAUDE.local.md"
2329
2330
  };
2330
2331
  function loadConfig(cwd = process.cwd()) {
2331
2332
  const rcPath = path23.join(cwd, ".agdexrc.json");
@@ -2350,7 +2351,7 @@ function loadConfig(cwd = process.cwd()) {
2350
2351
  }
2351
2352
  function getDefaultOutput(cwd = process.cwd()) {
2352
2353
  const config = loadConfig(cwd);
2353
- return config.output || "AGENTS.md";
2354
+ return config.output || "CLAUDE.local.md";
2354
2355
  }
2355
2356
 
2356
2357
  export { 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, getProvider, listProviders, isProviderAvailable, fetchSkillsShSearch, getEnabledPluginSources, parseSkillFrontmatter, discoverPluginSkills, discoverFlatSkills, discoverSkillsShRepo, collectAllSkills, generateSkillsIndex, hasExistingSkillsIndex, removeSkillsIndex, injectSkillsIndex, getDefaultSkillSources, embedSkills, loadConfig, getDefaultOutput };
@@ -1,6 +1,7 @@
1
1
  import {
2
- __require
3
- } from "./index-sh9kr6eq.js";
2
+ __require,
3
+ __toESM
4
+ } from "./url-scraper-fme0jdje.js";
4
5
 
5
6
  // src/lib/agents-md.ts
6
7
  import { execSync } from "child_process";
@@ -18,7 +19,7 @@ function getEndMarker(providerName) {
18
19
  }
19
20
  async function pullDocs(provider, options) {
20
21
  if (provider.urlConfig) {
21
- const { pullDocsFromUrl } = await import("./url-scraper-9xq4d56t.js");
22
+ const { pullDocsFromUrl } = await import("./url-scraper-fme0jdje.js");
22
23
  const docsPath2 = options.docsDir ?? fs.mkdtempSync(path.join(os.tmpdir(), "agdex-"));
23
24
  return pullDocsFromUrl(provider.urlConfig, docsPath2, { onProgress: options.onProgress });
24
25
  }
@@ -344,7 +345,7 @@ async function embed(options) {
344
345
  version,
345
346
  output = "AGENTS.md",
346
347
  docsDir: customDocsDir,
347
- globalCache = true,
348
+ globalCache = false,
348
349
  description
349
350
  } = options;
350
351
  let docsPath;
@@ -404,8 +405,8 @@ async function embed(options) {
404
405
  excludePatterns: provider.excludePatterns
405
406
  });
406
407
  const sections = buildDocTree(docFiles);
407
- const localFlag = !globalCache ? " --local" : "";
408
- const regenerateCommand = `npx agdex --provider ${provider.name} --output ${output}${localFlag}`;
408
+ const cacheFlag = globalCache ? " --global" : "";
409
+ const regenerateCommand = `npx agdex --provider ${provider.name} --output ${output}${cacheFlag}`;
409
410
  const indexContent = generateIndex({
410
411
  docsPath: docsLinkPath,
411
412
  sections,
@@ -2325,7 +2326,7 @@ async function embedSkills(options) {
2325
2326
  import fs23 from "fs";
2326
2327
  import path23 from "path";
2327
2328
  var DEFAULT_CONFIG = {
2328
- output: "CLAUDE.md"
2329
+ output: "CLAUDE.local.md"
2329
2330
  };
2330
2331
  function loadConfig(cwd = process.cwd()) {
2331
2332
  const rcPath = path23.join(cwd, ".agdexrc.json");
@@ -2350,7 +2351,7 @@ function loadConfig(cwd = process.cwd()) {
2350
2351
  }
2351
2352
  function getDefaultOutput(cwd = process.cwd()) {
2352
2353
  const config = loadConfig(cwd);
2353
- return config.output || "AGENTS.md";
2354
+ return config.output || "CLAUDE.local.md";
2354
2355
  }
2355
2356
 
2356
2357
  export { 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, getProvider, listProviders, isProviderAvailable, fetchSkillsShSearch, getEnabledPluginSources, parseSkillFrontmatter, discoverPluginSkills, discoverFlatSkills, discoverSkillsShRepo, collectAllSkills, generateSkillsIndex, hasExistingSkillsIndex, removeSkillsIndex, injectSkillsIndex, getDefaultSkillSources, embedSkills, loadConfig, getDefaultOutput };