@swarmvaultai/cli 0.7.1 → 0.7.21

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.
Files changed (3) hide show
  1. package/README.md +11 -5
  2. package/dist/index.js +22 -14
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -70,7 +70,7 @@ Create a workspace with:
70
70
 
71
71
  The schema file is the vault-specific instruction layer. Edit it to define naming rules, categories, grounding expectations, and exclusions before a serious compile.
72
72
 
73
- `--profile` accepts `default`, `personal-research`, or a comma-separated preset list such as `reader,timeline`. For fully custom vault behavior, edit the `profile` block in `swarmvault.config.json`; that deterministic profile layer works alongside the human-written `swarmvault.schema.md`.
73
+ `--profile` accepts `default`, `personal-research`, or a comma-separated preset list such as `reader,timeline`. For fully custom vault behavior, edit the `profile` block in `swarmvault.config.json`; that deterministic profile layer works alongside the human-written `swarmvault.schema.md`. The `personal-research` starter profile also sets `profile.guidedIngestDefault: true` and `profile.deepLintDefault: true`, so guided ingest/source and lint flows are on by default until you override them with `--no-guide` or `--no-deep`.
74
74
 
75
75
  ### `swarmvault source add|list|reload|review|guide|session|delete`
76
76
 
@@ -79,6 +79,7 @@ Manage recurring source roots through a registry-backed workflow.
79
79
  - `source add <input>` supports local files, local directories, public GitHub repo root URLs such as `https://github.com/karpathy/micrograd`, and docs/wiki/help/reference/tutorial hubs
80
80
  - by default `source add` registers the source, syncs it into the vault, runs one compile, and writes a source brief to `wiki/outputs/source-briefs/<source-id>.md`
81
81
  - add `--guide` when you want a resumable source session, source brief, source review, source guide, and approval-bundled canonical page edits when `profile.guidedSessionMode` is `canonical_review`, with `wiki/insights/` fallback for `insights_only`
82
+ - set `profile.guidedIngestDefault: true` when guided mode should be the default for `source add` and `source reload`, and use `--no-guide` for individual light-path runs
82
83
  - `source list` shows every managed source with its kind, status, and current brief path
83
84
  - `source reload [id]` re-syncs one source, or use `--all` to refresh everything in the registry and compile once
84
85
  - `source review <id>` stages a lighter source-scoped review artifact
@@ -90,6 +91,7 @@ Useful flags:
90
91
 
91
92
  - `--all`
92
93
  - `--guide`
94
+ - `--no-guide`
93
95
  - `--answers-file <path>`
94
96
  - `--no-compile`
95
97
  - `--no-brief`
@@ -107,14 +109,16 @@ Ingest a local file path, directory path, or URL into immutable source storage a
107
109
  - repo-aware directory ingest records `repoRelativePath` and later compile writes `state/code-index.json`
108
110
  - use `source add` instead when the same local directory, public GitHub repo root, or docs hub should stay registered and reloadable
109
111
  - URL ingest still localizes remote image references by default
110
- - local file ingest supports markdown, text, reStructuredText, HTML, PDF, DOCX, images, and code
112
+ - local file and archive ingest supports markdown, text, reStructuredText, HTML, PDF, Word, RTF, OpenDocument, EPUB, CSV/TSV, Excel, PowerPoint, Jupyter notebooks, BibTeX, Org-mode, AsciiDoc, transcripts, Slack exports, email, calendar, structured config/data, developer manifests, images, and code
111
113
  - add `--guide` when you want a resumable source session, source brief, source review, source guide, and approval-bundled canonical page edits when `profile.guidedSessionMode` is `canonical_review`, with `wiki/insights/` fallback for `insights_only`
112
- - code-aware directory ingest currently covers JavaScript, JSX, TypeScript, TSX, Bash/shell scripts, Python, Go, Rust, Java, Kotlin, Scala, Dart, Lua, Zig, C#, C, C++, PHP, Ruby, and PowerShell
114
+ - set `profile.guidedIngestDefault: true` when guided mode should be the default for `ingest`, and use `--no-guide` to force a plain ingest for one run
115
+ - code-aware directory ingest currently covers JavaScript, JSX, TypeScript, TSX, Bash/shell scripts, Python, Go, Rust, Java, Kotlin, Scala, Dart, Lua, Zig, C#, C, C++, PHP, Ruby, PowerShell, Elixir, OCaml, Objective-C, ReScript, Solidity, HTML, CSS, and Vue single-file components
113
116
 
114
117
  Useful flags:
115
118
 
116
119
  - `--repo-root <path>`
117
120
  - `--answers-file <path>`
121
+ - `--no-guide`
118
122
  - `--include <glob...>`
119
123
  - `--exclude <glob...>`
120
124
  - `--max-files <n>`
@@ -221,7 +225,7 @@ Each step:
221
225
 
222
226
  The command also writes a hub page linking the root question, saved step pages, and generated follow-up questions.
223
227
 
224
- ### `swarmvault lint [--deep] [--web] [--conflicts]`
228
+ ### `swarmvault lint [--deep] [--no-deep] [--web] [--conflicts]`
225
229
 
226
230
  Run anti-drift and vault health checks such as stale pages, missing graph artifacts, contradiction findings, and other structural issues.
227
231
 
@@ -234,7 +238,9 @@ Run anti-drift and vault health checks such as stale pages, missing graph artifa
234
238
  - `candidate_page`
235
239
  - `follow_up_question`
236
240
 
237
- `--web` can only be used with `--deep`. It enriches deep-lint findings with external evidence snippets and URLs from a configured web-search provider.
241
+ Set `profile.deepLintDefault: true` when deep lint should be the default for `swarmvault lint`, and use `--no-deep` when one run should stay structural only.
242
+
243
+ `--web` can only be used when deep lint is enabled, either explicitly with `--deep` or through `profile.deepLintDefault`. It enriches deep-lint findings with external evidence snippets and URLs from a configured web-search provider.
238
244
 
239
245
  `--conflicts` filters the results down to contradiction-focused findings so you can audit conflicting claims without the rest of the lint output.
240
246
 
package/dist/index.js CHANGED
@@ -268,9 +268,9 @@ program.name("swarmvault").description("SwarmVault is a local-first knowledge co
268
268
  function readCliVersion() {
269
269
  try {
270
270
  const packageJson = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
271
- return typeof packageJson.version === "string" && packageJson.version.trim() ? packageJson.version : "0.7.1";
271
+ return typeof packageJson.version === "string" && packageJson.version.trim() ? packageJson.version : "0.7.21";
272
272
  } catch {
273
- return "0.7.1";
273
+ return "0.7.21";
274
274
  }
275
275
  }
276
276
  function parsePositiveInt(value, fallback) {
@@ -427,9 +427,11 @@ program.command("init").description("Initialize a SwarmVault workspace in the cu
427
427
  log("Initialized SwarmVault workspace.");
428
428
  }
429
429
  });
430
- program.command("ingest").description("Ingest a local file path, directory path, or URL into the raw SwarmVault workspace.").argument("<input>", "Local file path, directory path, or URL").option("--review", "Stage a source review artifact after ingest and compile", false).option("--guide", "Stage a guided source integration bundle after ingest and compile", false).option("--answers-file <path>", "JSON file with guided-session answers keyed by question id or listed in prompt order").option("--include-assets", "Download remote image assets when ingesting URLs", true).option("--no-include-assets", "Skip downloading remote image assets when ingesting URLs").option("--max-asset-size <bytes>", "Maximum number of bytes to fetch for a single remote image asset").option("--repo-root <path>", "Override the detected repo root when ingesting a directory").option("--include <glob...>", "Only ingest files matching one or more glob patterns").option("--exclude <glob...>", "Skip files matching one or more glob patterns").option("--max-files <n>", "Maximum number of files to ingest from a directory").option("--include-third-party", "Also ingest repo files classified as third-party", false).option("--include-resources", "Also ingest repo files classified as resources", false).option("--include-generated", "Also ingest repo files classified as generated output", false).option("--no-gitignore", "Ignore .gitignore rules when ingesting a directory").action(
430
+ program.command("ingest").description("Ingest a local file path, directory path, or URL into the raw SwarmVault workspace.").argument("<input>", "Local file path, directory path, or URL").option("--review", "Stage a source review artifact after ingest and compile", false).option("--guide", "Stage a guided source integration bundle after ingest and compile (default: from config)").option("--no-guide", "Skip guided mode even if enabled in config").option("--answers-file <path>", "JSON file with guided-session answers keyed by question id or listed in prompt order").option("--include-assets", "Download remote image assets when ingesting URLs", true).option("--no-include-assets", "Skip downloading remote image assets when ingesting URLs").option("--max-asset-size <bytes>", "Maximum number of bytes to fetch for a single remote image asset").option("--repo-root <path>", "Override the detected repo root when ingesting a directory").option("--include <glob...>", "Only ingest files matching one or more glob patterns").option("--exclude <glob...>", "Skip files matching one or more glob patterns").option("--max-files <n>", "Maximum number of files to ingest from a directory").option("--include-third-party", "Also ingest repo files classified as third-party", false).option("--include-resources", "Also ingest repo files classified as resources", false).option("--include-generated", "Also ingest repo files classified as generated output", false).option("--no-gitignore", "Ignore .gitignore rules when ingesting a directory").action(
431
431
  async (input, options) => {
432
432
  const guideAnswers = readGuideAnswersFile(options.answersFile);
433
+ const vaultConfig = await loadVaultConfig(process2.cwd()).catch(() => null);
434
+ const guideEnabled = options.guide ?? vaultConfig?.config.profile.guidedIngestDefault ?? false;
433
435
  const maxAssetSize = typeof options.maxAssetSize === "string" && options.maxAssetSize.trim() ? parsePositiveInt(options.maxAssetSize, 0) || void 0 : void 0;
434
436
  const maxFiles = typeof options.maxFiles === "string" && options.maxFiles.trim() ? parsePositiveInt(options.maxFiles, 0) || void 0 : void 0;
435
437
  const extractClasses = [
@@ -452,7 +454,7 @@ program.command("ingest").description("Ingest a local file path, directory path,
452
454
  (fs) => fs.stat(input).then((stat) => stat.isDirectory() ? ingestDirectory(process2.cwd(), input, commonOptions) : null).catch(() => null)
453
455
  ) : null;
454
456
  if (directoryResult) {
455
- const scope2 = options.review || options.guide ? await (async () => {
457
+ const scope2 = options.review || guideEnabled ? await (async () => {
456
458
  const pathModule = await import("path");
457
459
  const absoluteInput = pathModule.resolve(process2.cwd(), input);
458
460
  const sourceIds = (await listManifests(process2.cwd())).filter((manifest) => {
@@ -470,11 +472,11 @@ program.command("ingest").description("Ingest a local file path, directory path,
470
472
  } : void 0;
471
473
  })() : void 0;
472
474
  const shouldStage = Boolean(scope2 && (directoryResult.imported.length || directoryResult.updated.length));
473
- const review3 = shouldStage && options.review && !options.guide ? await (async () => {
475
+ const review3 = shouldStage && options.review && !guideEnabled ? await (async () => {
474
476
  await compileVault(process2.cwd(), {});
475
477
  return await reviewSourceScope(process2.cwd(), scope2);
476
478
  })() : void 0;
477
- const guide2 = shouldStage && options.guide ? await (async () => {
479
+ const guide2 = shouldStage && guideEnabled ? await (async () => {
478
480
  await compileVault(process2.cwd(), {});
479
481
  return await guideSourceScope(process2.cwd(), scope2, { answers: guideAnswers });
480
482
  })() : void 0;
@@ -502,11 +504,11 @@ program.command("ingest").description("Ingest a local file path, directory path,
502
504
  }
503
505
  const ingest = await ingestInputDetailed(process2.cwd(), input, commonOptions);
504
506
  const scope = sourceScopeFromManifests(input, [...ingest.created, ...ingest.updated, ...ingest.unchanged]);
505
- const review2 = options.review && !options.guide && scope && (ingest.created.length || ingest.updated.length || ingest.unchanged.length) ? await (async () => {
507
+ const review2 = options.review && !guideEnabled && scope && (ingest.created.length || ingest.updated.length || ingest.unchanged.length) ? await (async () => {
506
508
  await compileVault(process2.cwd(), {});
507
509
  return await reviewSourceScope(process2.cwd(), scope);
508
510
  })() : void 0;
509
- const guide = options.guide && scope && (ingest.created.length || ingest.updated.length || ingest.unchanged.length) ? await (async () => {
511
+ const guide = guideEnabled && scope && (ingest.created.length || ingest.updated.length || ingest.unchanged.length) ? await (async () => {
510
512
  await compileVault(process2.cwd(), {});
511
513
  return await guideSourceScope(process2.cwd(), scope, { answers: guideAnswers });
512
514
  })() : void 0;
@@ -547,14 +549,16 @@ program.command("add").description("Capture supported URLs into normalized markd
547
549
  }
548
550
  });
549
551
  var source = program.command("source").description("Manage recurring local files, directories, public repos, and docs sources.");
550
- source.command("add").description("Register and sync a managed source from a local file, directory, public GitHub repo root URL, or docs hub URL.").argument("<input>", "Local file path, directory path, public GitHub repo root URL, or docs hub URL").option("--no-compile", "Register and sync without compiling the vault").option("--no-brief", "Skip source brief generation after sync").option("--review", "Stage a source review artifact after sync and compile", false).option("--guide", "Stage a guided source integration bundle after sync and compile", false).option("--answers-file <path>", "JSON file with guided-session answers keyed by question id or listed in prompt order").option("--max-pages <n>", "Maximum number of pages to crawl for docs sources").option("--max-depth <n>", "Maximum crawl depth for docs sources").action(
552
+ source.command("add").description("Register and sync a managed source from a local file, directory, public GitHub repo root URL, or docs hub URL.").argument("<input>", "Local file path, directory path, public GitHub repo root URL, or docs hub URL").option("--no-compile", "Register and sync without compiling the vault").option("--no-brief", "Skip source brief generation after sync").option("--review", "Stage a source review artifact after sync and compile", false).option("--guide", "Stage a guided source integration bundle after sync and compile (default: from config)").option("--no-guide", "Skip guided mode even if enabled in config").option("--answers-file <path>", "JSON file with guided-session answers keyed by question id or listed in prompt order").option("--max-pages <n>", "Maximum number of pages to crawl for docs sources").option("--max-depth <n>", "Maximum crawl depth for docs sources").action(
551
553
  async (input, options) => {
552
554
  const guideAnswers = readGuideAnswersFile(options.answersFile);
555
+ const addConfig = await loadVaultConfig(process2.cwd()).catch(() => null);
556
+ const guideEnabled = options.guide ?? addConfig?.config.profile.guidedIngestDefault ?? false;
553
557
  const result = await addManagedSource(process2.cwd(), input, {
554
558
  compile: options.compile,
555
559
  brief: options.brief,
556
560
  review: options.review,
557
- guide: options.guide,
561
+ guide: guideEnabled,
558
562
  guideAnswers,
559
563
  maxPages: options.maxPages ? parsePositiveInt(options.maxPages, 0) || void 0 : void 0,
560
564
  maxDepth: options.maxDepth ? parsePositiveInt(options.maxDepth, 0) || void 0 : void 0
@@ -583,16 +587,18 @@ source.command("list").description("List managed sources registered in this vaul
583
587
  }
584
588
  }
585
589
  });
586
- source.command("reload").description("Re-sync one managed source or all managed sources, then optionally compile and refresh briefs.").argument("[id]", "Managed source id").option("--all", "Reload all managed sources", false).option("--no-compile", "Re-sync without compiling the vault").option("--no-brief", "Skip source brief generation after sync").option("--review", "Stage a source review artifact after sync and compile", false).option("--guide", "Stage a guided source integration bundle after sync and compile", false).option("--answers-file <path>", "JSON file with guided-session answers keyed by question id or listed in prompt order").option("--max-pages <n>", "Maximum number of pages to crawl for docs sources").option("--max-depth <n>", "Maximum crawl depth for docs sources").action(
590
+ source.command("reload").description("Re-sync one managed source or all managed sources, then optionally compile and refresh briefs.").argument("[id]", "Managed source id").option("--all", "Reload all managed sources", false).option("--no-compile", "Re-sync without compiling the vault").option("--no-brief", "Skip source brief generation after sync").option("--review", "Stage a source review artifact after sync and compile", false).option("--guide", "Stage a guided source integration bundle after sync and compile (default: from config)").option("--no-guide", "Skip guided mode even if enabled in config").option("--answers-file <path>", "JSON file with guided-session answers keyed by question id or listed in prompt order").option("--max-pages <n>", "Maximum number of pages to crawl for docs sources").option("--max-depth <n>", "Maximum crawl depth for docs sources").action(
587
591
  async (id, options) => {
588
592
  const guideAnswers = readGuideAnswersFile(options.answersFile);
593
+ const reloadConfig = await loadVaultConfig(process2.cwd()).catch(() => null);
594
+ const guideEnabled = options.guide ?? reloadConfig?.config.profile.guidedIngestDefault ?? false;
589
595
  const result = await reloadManagedSources(process2.cwd(), {
590
596
  id,
591
597
  all: options.all ?? false,
592
598
  compile: options.compile,
593
599
  brief: options.brief,
594
600
  review: options.review,
595
- guide: options.guide,
601
+ guide: guideEnabled,
596
602
  guideAnswers,
597
603
  maxPages: options.maxPages ? parsePositiveInt(options.maxPages, 0) || void 0 : void 0,
598
604
  maxDepth: options.maxDepth ? parsePositiveInt(options.maxDepth, 0) || void 0 : void 0
@@ -732,9 +738,11 @@ program.command("benchmark").description("Measure graph-guided context reduction
732
738
  }
733
739
  }
734
740
  });
735
- program.command("lint").description("Run anti-drift and wiki-health checks.").option("--deep", "Run LLM-powered advisory lint", false).option("--web", "Augment deep lint with configured web search", false).option("--conflicts", "Filter to contradiction findings only", false).action(async (options) => {
741
+ program.command("lint").description("Run anti-drift and wiki-health checks.").option("--deep", "Run LLM-powered advisory lint (default: from config)").option("--no-deep", "Skip deep lint even if enabled in config").option("--web", "Augment deep lint with configured web search", false).option("--conflicts", "Filter to contradiction findings only", false).action(async (options) => {
742
+ const lintConfig = await loadVaultConfig(process2.cwd()).catch(() => null);
743
+ const deepEnabled = options.deep ?? lintConfig?.config.profile.deepLintDefault ?? false;
736
744
  const findings = await lintVault(process2.cwd(), {
737
- deep: options.deep ?? false,
745
+ deep: deepEnabled,
738
746
  web: options.web ?? false,
739
747
  conflicts: options.conflicts ?? false
740
748
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swarmvaultai/cli",
3
- "version": "0.7.1",
3
+ "version": "0.7.21",
4
4
  "description": "Global CLI for SwarmVault.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -38,7 +38,7 @@
38
38
  "node": ">=24.0.0"
39
39
  },
40
40
  "dependencies": {
41
- "@swarmvaultai/engine": "0.7.1",
41
+ "@swarmvaultai/engine": "0.7.21",
42
42
  "commander": "^14.0.1"
43
43
  },
44
44
  "devDependencies": {