@massu/core 2.5.1 → 2.5.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.
@@ -1167,6 +1167,13 @@ var init_config = __esm({
1167
1167
  });
1168
1168
  LanguageFrameworkEntrySchema = z2.object({
1169
1169
  framework: z2.string().optional(),
1170
+ // `source_dirs` is emitted by `init` (commands/init.ts:417) and existence-checked
1171
+ // by config validation (init.ts:868-876), but until 2026-08-14 it survived only via
1172
+ // `.passthrough()` — declared in the file, untyped in the schema. `lib/source-layout.ts`
1173
+ // derives the index builders' candidate set from it, so it is typed here rather than
1174
+ // read as an unknown: a consumer that has to shape-check its own SoT is one branch away
1175
+ // from silently contributing `undefined` to a path predicate.
1176
+ source_dirs: z2.array(z2.string()).optional(),
1170
1177
  test_framework: z2.string().optional(),
1171
1178
  test: z2.string().optional(),
1172
1179
  runtime: z2.string().optional(),
@@ -4325,6 +4332,20 @@ function entitledForTeamSharedPromotion(tier) {
4325
4332
  // src/hooks/user-prompt.ts
4326
4333
  init_rule_candidate_store();
4327
4334
  init_hook_failure_signal();
4335
+
4336
+ // src/hooks/lib/is-direct-invocation.ts
4337
+ import { pathToFileURL } from "url";
4338
+ function isDirectInvocation(moduleUrl) {
4339
+ const entry = process.argv[1];
4340
+ if (!entry) return false;
4341
+ try {
4342
+ return moduleUrl === pathToFileURL(entry).href;
4343
+ } catch {
4344
+ return false;
4345
+ }
4346
+ }
4347
+
4348
+ // src/hooks/user-prompt.ts
4328
4349
  async function main() {
4329
4350
  try {
4330
4351
  const input = await readStdin();
@@ -4601,4 +4622,6 @@ function readStdin() {
4601
4622
  setTimeout(() => resolve5(data), 3e3);
4602
4623
  });
4603
4624
  }
4604
- main();
4625
+ if (isDirectInvocation(import.meta.url)) {
4626
+ main();
4627
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massu/core",
3
- "version": "2.5.1",
3
+ "version": "2.5.2",
4
4
  "type": "module",
5
5
  "description": "AI Engineering Governance MCP Server - Session memory, knowledge system, feature registry, code intelligence, rule enforcement, tiered tooling (12 free / 73 total), 56 workflow commands, 11 agents, 20+ patterns",
6
6
  "main": "./dist/cli.js",