caveat-cli 0.1.0 → 0.2.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/dist/index.js CHANGED
@@ -15678,7 +15678,6 @@ function extractSections(body) {
15678
15678
 
15679
15679
  // ../../packages/core/dist/env.js
15680
15680
  var import_semver = __toESM(require_semver2(), 1);
15681
- var DEFAULT_PROJECT_ROOTS = [];
15682
15681
  function fingerprint() {
15683
15682
  return {
15684
15683
  os: process.platform,
@@ -15686,21 +15685,6 @@ function fingerprint() {
15686
15685
  node: process.versions.node ?? ""
15687
15686
  };
15688
15687
  }
15689
- function normalizePath(p2) {
15690
- return p2.replace(/\\/g, "/").toLowerCase();
15691
- }
15692
- function inferSourceProject(cwd, projectRoots = DEFAULT_PROJECT_ROOTS) {
15693
- const normalized = normalizePath(cwd);
15694
- for (const root of projectRoots) {
15695
- const normalizedRoot = normalizePath(root);
15696
- if (normalized.startsWith(normalizedRoot)) {
15697
- const rest = normalized.slice(normalizedRoot.length);
15698
- const first2 = rest.split("/")[0];
15699
- if (first2) return first2;
15700
- }
15701
- }
15702
- return null;
15703
- }
15704
15688
 
15705
15689
  // ../../packages/core/dist/indexer.js
15706
15690
  import { readFileSync as readFileSync2, readdirSync as readdirSync2, statSync, existsSync as existsSync2 } from "node:fs";
@@ -15952,7 +15936,6 @@ function recordEntry(input, opts) {
15952
15936
  ...fingerprint(),
15953
15937
  ...input.environment ?? {}
15954
15938
  };
15955
- const sourceProject = input.cwd ? inferSourceProject(input.cwd, opts.projectRoots) : null;
15956
15939
  const frontmatter = {
15957
15940
  id,
15958
15941
  title: input.title,
@@ -15961,7 +15944,7 @@ function recordEntry(input, opts) {
15961
15944
  outcome: input.outcome ?? "resolved",
15962
15945
  tags: input.tags ?? [],
15963
15946
  environment: mergedEnv,
15964
- source_project: sourceProject,
15947
+ source_project: null,
15965
15948
  source_session: generateSourceSession(now),
15966
15949
  created_at: ymd,
15967
15950
  updated_at: ymd,
@@ -16159,7 +16142,6 @@ import { existsSync as existsSync5, readFileSync as readFileSync4, writeFileSync
16159
16142
  var DEFAULT_CONFIG = {
16160
16143
  knowledgeRepo: "own",
16161
16144
  semverKeys: ["driver", "cuda", "node"],
16162
- projectRoots: [],
16163
16145
  communitySources: []
16164
16146
  };
16165
16147
  function loadConfig(userConfigPath) {
@@ -44336,9 +44318,8 @@ function buildMcpContext(overrides = {}) {
44336
44318
  const logger = overrides.logger ?? stderrLogger;
44337
44319
  const config3 = loadConfig(userConfigPath);
44338
44320
  const paths = resolvePaths(caveatHome, config3.knowledgeRepo, userHome);
44339
- const cwd = overrides.cwd ?? process.cwd();
44340
44321
  const db = openDb({ path: paths.dbPath, logger });
44341
- return { caveatHome, userHome, userConfigPath, config: config3, paths, logger, db, cwd };
44322
+ return { caveatHome, userHome, userConfigPath, config: config3, paths, logger, db };
44342
44323
  }
44343
44324
 
44344
44325
  // ../mcp/dist/tools/search.js
@@ -44396,14 +44377,10 @@ var recordInputShape = {
44396
44377
  brief_id: external_exports.string().optional()
44397
44378
  };
44398
44379
  function handleRecord(ctx, args) {
44399
- return recordEntry(
44400
- { ...args, cwd: ctx.cwd },
44401
- {
44402
- db: ctx.db,
44403
- entriesRoot: ctx.paths.entriesDir,
44404
- projectRoots: ctx.config.projectRoots
44405
- }
44406
- );
44380
+ return recordEntry(args, {
44381
+ db: ctx.db,
44382
+ entriesRoot: ctx.paths.entriesDir
44383
+ });
44407
44384
  }
44408
44385
 
44409
44386
  // ../mcp/dist/tools/update.js
@@ -44477,13 +44454,11 @@ function handleIngestResearch(ctx, args) {
44477
44454
  outcome: "resolved",
44478
44455
  tags: args.tags,
44479
44456
  category: args.category,
44480
- brief_id: args.brief_id,
44481
- cwd: ctx.cwd
44457
+ brief_id: args.brief_id
44482
44458
  },
44483
44459
  {
44484
44460
  db: ctx.db,
44485
- entriesRoot: ctx.paths.entriesDir,
44486
- projectRoots: ctx.config.projectRoots
44461
+ entriesRoot: ctx.paths.entriesDir
44487
44462
  }
44488
44463
  );
44489
44464
  }
@@ -44522,7 +44497,7 @@ function registerAllTools(server, ctx) {
44522
44497
  "caveat_record",
44523
44498
  {
44524
44499
  title: "caveat_record",
44525
- description: "Create a new caveat markdown file. Auto-fills source_session, source_project (from cwd), and environment fingerprint for unspecified keys.",
44500
+ description: "Create a new caveat markdown file. Auto-fills source_session and environment fingerprint for unspecified keys. source_project is left null by design (publicly-shared knowledge should not leak per-user project names).",
44526
44501
  inputSchema: recordInputShape
44527
44502
  },
44528
44503
  async (args) => jsonResult(handleRecord(ctx, args))
@@ -44706,7 +44681,7 @@ function runCommunityList(ctx) {
44706
44681
 
44707
44682
  // src/index.ts
44708
44683
  var program = new Command();
44709
- program.name("caveat").description("External spec gotcha knowledge base CLI").version("0.0.0");
44684
+ program.name("caveat").description("External spec gotcha knowledge base CLI").version("0.2.0");
44710
44685
  program.command("init").description(
44711
44686
  "Initialize ~/.caveatrc.json, ~/.caveat/, and register Claude Code integration"
44712
44687
  ).option("--skip-claude", "skip Claude Code MCP + hook registration", false).option("--dry-run", "show planned changes without writing", false).action((opts) => {