@happyvertical/smrt-dev-mcp 0.45.0 → 0.45.2

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
@@ -55,7 +55,8 @@ An app that installs the published packages authors none of them, so workspace
55
55
  discovery alone sees nothing. Every installed `@happyvertical/smrt-*` package,
56
56
  plus the known SDK packages, is resolved from the project's and each workspace
57
57
  package's `node_modules/@happyvertical` scope directory and marked
58
- `isInstalledDependency`. This is an enumeration, not a walk: pnpm materializes
58
+ `isInstalledDependency`. The filesystem enumeration and canonical doc reader are shared with CLI snapshots
59
+ through `smrt-core/knowledge`; enrichment stays here. This is an enumeration, not a walk: pnpm materializes
59
60
  a store whose entries link back out to their siblings, so a descent reads the
60
61
  same package once per path that reaches it. Real paths deduplicate the result;
61
62
  each package is still read through its `node_modules` path, because a realpath
@@ -195,9 +196,13 @@ launcher or a small wrapper script with an absolute Node path.
195
196
  the canonical `smrt-projects` model and changed the facts.
196
197
  - **Budgets are enforced at the transport boundary**: `KnowledgePackage` carries
197
198
  the full `agentDoc` and domain manifest, so the MCP handlers project a compact
198
- package record unless `detail: 'full'`. Library callers (the CLI) still receive
199
- the full objects. Structural object facts render into prompt Markdown only in
200
- full detail; summary mode remains names/counts/paths.
199
+ package record for `summary` (default) and `full`. `full` embeds package docs,
200
+ structural facts, and modules selected by changed paths, focus, or Modules-table
201
+ source mappings (including globs); other module paths remain discoverable.
202
+ `complete` preserves full package records and embeds every module. CLI context
203
+ JSON uses the same projection; `--complete` opts into full export. Library
204
+ builders retain full objects. Snapshot commands list module paths by default
205
+ and accept `--complete` to embed bodies.
201
206
  - **Private packages skip packaging checks**: the `files` allowlist governs npm
202
207
  publication, so `private: true` packages are exempt; authored docs are still
203
208
  required. A workspace root is exempt from both — but **only when member
package/README.md CHANGED
@@ -144,7 +144,7 @@ drift. Reach it with `--scope installed`.
144
144
  ## Response Budgets
145
145
 
146
146
  Knowledge and introspection tools return a **summary** by default and accept
147
- `detail: "full"` for the complete payload.
147
+ `detail: "complete"` for complete knowledge context payloads (`introspect-project` uses `full`).
148
148
 
149
149
  - `introspect-project` summary returns one compact record per object
150
150
  (`className`, `qualifiedName`, `extends`, `tableName`, `tenantScope`,
@@ -154,13 +154,18 @@ Knowledge and introspection tools return a **summary** by default and accept
154
154
  budget.
155
155
  - `smrt-architecture`, `smrt-review`, and the `build-*-context` tools list
156
156
  authored `AGENTS.md` and module docs **by path** rather than embedding them,
157
- and return compact package records. With `detail: "full"`, their prompt
157
+ and return compact package records. With `detail: "full"`, they embed the package
158
+ AGENTS doc plus module docs matching changed files or request text. Source paths and globs
159
+ in the same Modules-table row as a doc link also select that module. Missing or
160
+ unmatched hints leave all module docs listed by path for on-demand reading.
161
+ `detail: "complete"` embeds every module and returns complete package records.
162
+ With `detail: "full"` or `"complete"`, prompt
158
163
  bundles also render high-signal object facts: tenant mode/field, `cti`/`sti`
159
164
  strategy, conflict columns, method signatures, and field
160
165
  defaults/constraints/readonly/transient flags.
161
166
 
162
167
  The `smrt dev:knowledge-*` CLI commands request `detail: "full"`, so they remain
163
- full-detail and unbudgeted.
168
+ structurally detailed and unbudgeted. Add `--complete` to embed every module.
164
169
 
165
170
  ## Knowledge Boundary
166
171
 
@@ -356,7 +361,7 @@ then return a model-ready prompt bundle.
356
361
  | `changedFiles` | `string[]` | No | Files to route to package experts |
357
362
  | `focus` | `string` | No | Review focus or concern |
358
363
  | `documentation` | `string` | No | Additional docs or notes to include |
359
- | `detail` | `'summary' \| 'full'` | No | Default `summary`; `full` embeds authored docs and full package records |
364
+ | `detail` | `'summary' \| 'full' \| 'complete'` | No | Default `summary`; `full` embeds package docs and matching modules; `complete` embeds all modules and full package records |
360
365
 
361
366
  ### `build-domain-review-context`
362
367
 
@@ -370,7 +375,7 @@ Domain-scoped alias for `build-review-context`.
370
375
  | `documentation` | `string` | No | Additional docs or notes to include |
371
376
  | `scope` | `'project' \| 'local' \| 'package' \| 'sdk' \| 'installed'` | No | Knowledge source scope (default: `project`) |
372
377
  | `package` | `string` | No | Package name or short name to focus |
373
- | `detail` | `'summary' \| 'full'` | No | Default `summary`; `full` embeds authored docs and full package records |
378
+ | `detail` | `'summary' \| 'full' \| 'complete'` | No | Default `summary`; `full` embeds package docs and matching modules; `complete` embeds all modules and full package records |
374
379
 
375
380
  ### `smrt-review`
376
381
 
@@ -383,7 +388,7 @@ Return deterministic review findings, a prompt bundle, or both.
383
388
  | `focus` | `string` | No | Review focus or concern |
384
389
  | `documentation` | `string` | No | Additional docs or notes to include |
385
390
  | `mode` | `'findings' \| 'prompt-bundle' \| 'both'` | No | Response mode (default: `both`) |
386
- | `detail` | `'summary' \| 'full'` | No | Default `summary`; `full` embeds authored docs and full package records |
391
+ | `detail` | `'summary' \| 'full' \| 'complete'` | No | Default `summary`; `full` embeds package docs and matching modules; `complete` embeds all modules and full package records |
387
392
 
388
393
  ### `build-architecture-context`
389
394
 
@@ -396,7 +401,7 @@ then return a model-ready architecture prompt bundle.
396
401
  | `idea` | `string` | No | Product or implementation idea |
397
402
  | `documentation` | `string` | No | Existing docs or requirements |
398
403
  | `focus` | `string` | No | Architecture concern to prioritize |
399
- | `detail` | `'summary' \| 'full'` | No | Default `summary`; `full` embeds authored docs and full package records |
404
+ | `detail` | `'summary' \| 'full' \| 'complete'` | No | Default `summary`; `full` embeds package docs and matching modules; `complete` embeds all modules and full package records |
400
405
 
401
406
  ### `build-package-specialist-context`
402
407
 
@@ -422,7 +427,7 @@ Domain-scoped alias for `build-architecture-context`.
422
427
  | `focus` | `string` | No | Architecture concern to prioritize |
423
428
  | `scope` | `'project' \| 'local' \| 'package' \| 'sdk' \| 'installed'` | No | Knowledge source scope (default: `project`) |
424
429
  | `package` | `string` | No | Package name or short name to focus |
425
- | `detail` | `'summary' \| 'full'` | No | Default `summary`; `full` embeds authored docs and full package records |
430
+ | `detail` | `'summary' \| 'full' \| 'complete'` | No | Default `summary`; `full` embeds package docs and matching modules; `complete` embeds all modules and full package records |
426
431
 
427
432
  ### `smrt-architecture`
428
433
 
@@ -435,7 +440,7 @@ risks, questions, and the reusable architecture prompt bundle.
435
440
  | `idea` | `string` | No | Product or implementation idea |
436
441
  | `documentation` | `string` | No | Existing docs or requirements |
437
442
  | `focus` | `string` | No | Architecture concern to prioritize |
438
- | `detail` | `'summary' \| 'full'` | No | Default `summary`; `full` embeds authored docs and full package records |
443
+ | `detail` | `'summary' \| 'full' \| 'complete'` | No | Default `summary`; `full` embeds package docs and matching modules; `complete` embeds all modules and full package records |
439
444
 
440
445
  ### `list-agent-skills`
441
446
 
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as checkKnowledgeFreshness, c as packageDocPaths, d as smrtArchitecture, f as smrtReview, i as buildReviewContext, m as TOOLS, n as buildKnowledgeIndex, o as checkKnowledgeFreshnessFromIndex, p as REVIEW_SKILL_NAME, r as buildPackageSpecialistContext, t as buildArchitectureContext } from "./knowledge-D2k9xM3M.js";
2
+ import { a as checkKnowledgeFreshness, f as smrtArchitecture, h as TOOLS, i as buildReviewContext, m as REVIEW_SKILL_NAME, n as buildKnowledgeIndex, o as checkKnowledgeFreshnessFromIndex, p as smrtReview, r as buildPackageSpecialistContext, s as compactContextResult, t as buildArchitectureContext } from "./knowledge-SqpqYA67.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";
@@ -1518,47 +1518,6 @@ function sanitizeKnowledgeIndex(index) {
1518
1518
  installedPackages: packages.filter((pkg) => pkg.isInstalledDependency)
1519
1519
  };
1520
1520
  }
1521
- /**
1522
- * Compact projection of a context result for MCP callers (#2143).
1523
- *
1524
- * `selectedPackages` carries each package's whole authored `agentDoc`, its
1525
- * module-doc contents, and its full domain manifest. A three-package downstream
1526
- * product serialized to 329,003 characters that way, which is what made these
1527
- * tools unusable as planning aids. `detail: "full"` returns the whole shape.
1528
- */
1529
- function compactContextResult(result, detail) {
1530
- const source = result;
1531
- if (detail === "full") return source;
1532
- const compact = {
1533
- ...source,
1534
- detail: "summary"
1535
- };
1536
- for (const key of ["selectedPackages", "selectedSdkPackages"]) {
1537
- const packages = source[key];
1538
- if (!Array.isArray(packages)) continue;
1539
- compact[key] = packages.map(compactKnowledgePackage);
1540
- }
1541
- return compact;
1542
- }
1543
- function compactKnowledgePackage(pkg) {
1544
- return {
1545
- name: pkg.name,
1546
- version: pkg.version,
1547
- kind: pkg.kind,
1548
- directory: pkg.relativeDirectory,
1549
- objectSource: pkg.objectSource,
1550
- ...pkg.objectSourceReason ? { objectSourceReason: pkg.objectSourceReason } : {},
1551
- docs: packageDocPaths(pkg),
1552
- domainKnowledgePath: pkg.domainKnowledgePath,
1553
- relationshipFeatures: pkg.relationshipFeatures,
1554
- smrtDependencies: pkg.smrtDependencies,
1555
- sdkDependencies: pkg.sdkDependencies,
1556
- exportKeys: pkg.exportKeys,
1557
- objectCount: pkg.objects.length,
1558
- objects: pkg.objects.map((object) => object.tableName ? `${object.qualifiedName ?? object.className} (${object.tableName})` : object.qualifiedName ?? object.className),
1559
- mcpToolCount: pkg.mcpTools.length
1560
- };
1561
- }
1562
1521
  function detailArg(args) {
1563
1522
  const detail = args?.detail;
1564
1523
  return typeof detail === "string" ? detail : void 0;