@happyvertical/smrt-dev-mcp 0.40.61 → 0.40.63

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/AGENTS.md CHANGED
@@ -44,6 +44,36 @@ amplify into unbounded filesystem work. Discovery also stops before package
44
44
  reads when more than 512 packages match, revalidates confinement immediately
45
45
  before reading each package, and runs at most eight scanner fallbacks at once.
46
46
 
47
+ ### Consumer apps (#2275)
48
+
49
+ An app that installs the published packages authors none of them, so workspace
50
+ discovery alone sees nothing. Every installed `@happyvertical/smrt-*` package,
51
+ plus the known SDK packages, is resolved from the project's and each workspace
52
+ package's `node_modules/@happyvertical` scope directory and marked
53
+ `isInstalledDependency`. This is an enumeration, not a walk: pnpm materializes
54
+ a store whose entries link back out to their siblings, so a descent reads the
55
+ same package once per path that reaches it. Real paths deduplicate the result;
56
+ each package is still read through its `node_modules` path, because a realpath
57
+ escapes the root wherever an ancestor is a symlink. A workspace package linked
58
+ into a sibling's `node_modules` is authored source and is never marked
59
+ installed.
60
+
61
+ - `--scope installed` reports exactly those packages. `local` and `package`
62
+ exclude them; `project` includes them; the index also lists them separately
63
+ as `installedPackages` (`schemaVersion: 3`). It is a reporting scope:
64
+ `dev:knowledge-check` has no authored packages to gate under it.
65
+ - Each package carries `agentDocSha256`, the hash of its shipped `AGENTS.md`.
66
+ That is the drift signal a consumer diffs against a recorded baseline — a
67
+ version bump is not, because most releases do not touch a documented surface.
68
+ - The freshness gate skips installed packages entirely: indexed, never checked.
69
+ A consumer cannot add an `AGENTS.md` to a dependency, and a published
70
+ package's artifact hashes cannot match its republished sources.
71
+ - Coverage and the `no-smrt-objects-discovered` guard count authored packages
72
+ only. Dependencies ship their own objects, so counting them would make that
73
+ guard unreachable in exactly the projects most likely to have broken
74
+ discovery. A project whose own packages contribute nothing while its
75
+ dependencies do gets the `no-authored-smrt-objects` warning instead.
76
+
47
77
  Per package, objects resolve in this order, and the winner is recorded in
48
78
  `objectSource` with a reason:
49
79
 
@@ -52,7 +82,7 @@ Per package, objects resolve in this order, and the winner is recorded in
52
82
  3. `scanner` — `OxcScanner` + `ManifestAdapter` over the package's sources
53
83
  4. `none` — with a machine-readable reason
54
84
 
55
- The index exposes `coverage` and `diagnostics` (`schemaVersion: 2`). Zero
85
+ The index exposes `coverage` and `diagnostics` (added in `schemaVersion: 2`). Zero
56
86
  discovered objects is an **error-grade** diagnostic that names the roots and
57
87
  artifact paths checked plus the fix, and it propagates into
58
88
  `smrt-architecture`/`smrt-review`/`reflect-*` results and prompt bundles.
package/README.md CHANGED
@@ -124,7 +124,7 @@ dependency edge — by connected component, keeping the copy the others depend o
124
124
  and reports `duplicate-object-identity`. Unrelated packages that share a class
125
125
  name stay distinct.
126
126
 
127
- The index therefore carries two extra blocks (`schemaVersion: 2`):
127
+ The index therefore carries two extra blocks (added in `schemaVersion: 2`):
128
128
 
129
129
  - `coverage` — `workspaceGlobs`, `workspaceGlobSource`, `packageDirs`,
130
130
  `packagesWithObjects`, and `packagesWithoutObjects` with a reason, the artifact
@@ -134,6 +134,13 @@ The index therefore carries two extra blocks (`schemaVersion: 2`):
134
134
  commands to fix it, so an unseen project is never reported as a project with no
135
135
  model. `smrt-architecture`, `smrt-review`, and the `reflect-*` tools surface it.
136
136
 
137
+ `schemaVersion: 3` adds the consumer-app view: `installedPackages` lists every
138
+ installed `@happyvertical/smrt-*` package plus the known SDK packages — the ones
139
+ the project installs rather than authors — each with `isInstalledDependency`, its
140
+ version, and `agentDocSha256`, the hash of its shipped `AGENTS.md`. That hash is
141
+ what a downstream project diffs against a recorded baseline to find documentation
142
+ drift. Reach it with `--scope installed`.
143
+
137
144
  ## Response Budgets
138
145
 
139
146
  Knowledge and introspection tools return a **summary** by default and accept
@@ -300,7 +307,7 @@ coverage, relationship-v2 counts, and freshness status.
300
307
  | Parameter | Type | Required | Description |
301
308
  |-----------|------|----------|-------------|
302
309
  | `rootDir` | `string` | No | Project root directory (default: cwd) |
303
- | `scope` | `string` | No | `project`, `local`, `package`, or `sdk` |
310
+ | `scope` | `string` | No | `project`, `local`, `package`, `sdk`, or `installed` |
304
311
  | `package` | `string` | No | Package name or short name to focus |
305
312
 
306
313
  ### `check-knowledge-freshness`
@@ -323,7 +330,7 @@ Alias over the deterministic checker that emphasizes downstream
323
330
  | `rootDir` | `string` | No | Project root directory (default: cwd) |
324
331
  | `changed` | `boolean` | No | Limit stale-pattern checks to changed files |
325
332
  | `strict` | `boolean` | No | Treat stale-pattern findings as errors |
326
- | `scope` | `string` | No | `project`, `local`, `package`, or `sdk` |
333
+ | `scope` | `string` | No | `project`, `local`, `package`, `sdk`, or `installed` |
327
334
  | `package` | `string` | No | Package name or short name to focus |
328
335
 
329
336
  ### `build-review-context`
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAGL,MAAM,EACN,KAAK,IAAI,EACV,MAAM,8BAA8B,CAAC;AAqBtC,eAAO,MAAM,cAAc,QAAuB,CAAC;AAwenD,eAAO,MAAM,KAAK,EAAE,IAAI,EAO0C,CAAC;AAEnE,wBAAgB,YAAY,IAAI,MAAM,CAgfrC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAGL,MAAM,EACN,KAAK,IAAI,EACV,MAAM,8BAA8B,CAAC;AAqBtC,eAAO,MAAM,cAAc,QAAuB,CAAC;AAwenD,eAAO,MAAM,KAAK,EAAE,IAAI,EAO0C,CAAC;AAEnE,wBAAgB,YAAY,IAAI,MAAM,CAkfrC"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as checkKnowledgeFreshnessFromIndex, d as smrtReview, i as checkKnowledgeFreshness, n as buildKnowledgeIndex, r as buildReviewContext, s as packageDocPaths, t as buildArchitectureContext, u as smrtArchitecture } from "./knowledge-DUUhTM5u.js";
2
+ import { a as checkKnowledgeFreshnessFromIndex, d as smrtReview, i as checkKnowledgeFreshness, n as buildKnowledgeIndex, r as buildReviewContext, s as packageDocPaths, t as buildArchitectureContext, u as smrtArchitecture } from "./knowledge-CCX7oQzQ.js";
3
3
  import { existsSync, readFileSync, realpathSync } from "node:fs";
4
4
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
5
5
  import { fileURLToPath, pathToFileURL } from "node:url";
@@ -1330,7 +1330,8 @@ var TOOLS = [
1330
1330
  "project",
1331
1331
  "local",
1332
1332
  "package",
1333
- "sdk"
1333
+ "sdk",
1334
+ "installed"
1334
1335
  ],
1335
1336
  default: "project"
1336
1337
  },
@@ -1371,7 +1372,8 @@ var TOOLS = [
1371
1372
  "project",
1372
1373
  "local",
1373
1374
  "package",
1374
- "sdk"
1375
+ "sdk",
1376
+ "installed"
1375
1377
  ],
1376
1378
  default: "project"
1377
1379
  },
@@ -1420,7 +1422,8 @@ var TOOLS = [
1420
1422
  "project",
1421
1423
  "local",
1422
1424
  "package",
1423
- "sdk"
1425
+ "sdk",
1426
+ "installed"
1424
1427
  ],
1425
1428
  default: "project"
1426
1429
  },
@@ -1500,7 +1503,8 @@ var TOOLS = [
1500
1503
  "project",
1501
1504
  "local",
1502
1505
  "package",
1503
- "sdk"
1506
+ "sdk",
1507
+ "installed"
1504
1508
  ],
1505
1509
  default: "project"
1506
1510
  },
@@ -1625,7 +1629,7 @@ function createServer() {
1625
1629
  },
1626
1630
  {
1627
1631
  name: "scope",
1628
- description: "Knowledge scope: project, local, package, or sdk.",
1632
+ description: "Knowledge scope: project, local, package, sdk, or installed.",
1629
1633
  required: false
1630
1634
  },
1631
1635
  {
@@ -1662,7 +1666,7 @@ function createServer() {
1662
1666
  },
1663
1667
  {
1664
1668
  name: "scope",
1665
- description: "Knowledge scope: project, local, package, or sdk.",
1669
+ description: "Knowledge scope: project, local, package, sdk, or installed.",
1666
1670
  required: false
1667
1671
  },
1668
1672
  {
@@ -1947,7 +1951,8 @@ function sanitizeKnowledgeIndex(index) {
1947
1951
  rootDir: ".",
1948
1952
  packages,
1949
1953
  smrtPackages: packages.filter((pkg) => pkg.kind === "smrt"),
1950
- sdkPackages: packages.filter((pkg) => pkg.kind === "sdk")
1954
+ sdkPackages: packages.filter((pkg) => pkg.kind === "sdk"),
1955
+ installedPackages: packages.filter((pkg) => pkg.isInstalledDependency)
1951
1956
  };
1952
1957
  }
1953
1958
  /**