@adhisang/minecraft-modding-mcp 3.0.0 → 3.1.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.
@@ -285,10 +285,11 @@ export declare const inspectMinecraftShape: {
285
285
  symbolKind: z.ZodOptional<z.ZodEnum<["class", "interface", "enum", "record", "method", "field"]>>;
286
286
  packagePrefix: z.ZodOptional<z.ZodString>;
287
287
  fileGlob: z.ZodOptional<z.ZodString>;
288
- queryMode: z.ZodOptional<z.ZodEnum<["auto", "token", "literal"]>>;
288
+ queryMode: z.ZodDefault<z.ZodEnum<["auto", "token", "literal"]>>;
289
289
  }, "strip", z.ZodTypeAny, {
290
290
  kind: "search";
291
291
  query: string;
292
+ queryMode: "auto" | "token" | "literal";
292
293
  match?: "exact" | "prefix" | "contains" | "regex" | undefined;
293
294
  symbolKind?: "class" | "method" | "field" | "record" | "interface" | "enum" | undefined;
294
295
  intent?: "symbol" | "path" | "text" | undefined;
@@ -304,7 +305,6 @@ export declare const inspectMinecraftShape: {
304
305
  };
305
306
  } | undefined;
306
307
  packagePrefix?: string | undefined;
307
- queryMode?: "auto" | "token" | "literal" | undefined;
308
308
  }, {
309
309
  kind: "search";
310
310
  query: string;
@@ -499,10 +499,11 @@ export declare const inspectMinecraftShape: {
499
499
  symbolKind: z.ZodOptional<z.ZodEnum<["class", "interface", "enum", "record", "method", "field"]>>;
500
500
  packagePrefix: z.ZodOptional<z.ZodString>;
501
501
  fileGlob: z.ZodOptional<z.ZodString>;
502
- queryMode: z.ZodOptional<z.ZodEnum<["auto", "token", "literal"]>>;
502
+ queryMode: z.ZodDefault<z.ZodEnum<["auto", "token", "literal"]>>;
503
503
  }, "strip", z.ZodTypeAny, {
504
504
  kind: "search";
505
505
  query: string;
506
+ queryMode: "auto" | "token" | "literal";
506
507
  match?: "exact" | "prefix" | "contains" | "regex" | undefined;
507
508
  symbolKind?: "class" | "method" | "field" | "record" | "interface" | "enum" | undefined;
508
509
  intent?: "symbol" | "path" | "text" | undefined;
@@ -518,7 +519,6 @@ export declare const inspectMinecraftShape: {
518
519
  };
519
520
  } | undefined;
520
521
  packagePrefix?: string | undefined;
521
- queryMode?: "auto" | "token" | "literal" | undefined;
522
522
  }, {
523
523
  kind: "search";
524
524
  query: string;
@@ -575,6 +575,7 @@ export declare const inspectMinecraftShape: {
575
575
  } | {
576
576
  kind: "search";
577
577
  query: string;
578
+ queryMode: "auto" | "token" | "literal";
578
579
  match?: "exact" | "prefix" | "contains" | "regex" | undefined;
579
580
  symbolKind?: "class" | "method" | "field" | "record" | "interface" | "enum" | undefined;
580
581
  intent?: "symbol" | "path" | "text" | undefined;
@@ -590,7 +591,6 @@ export declare const inspectMinecraftShape: {
590
591
  };
591
592
  } | undefined;
592
593
  packagePrefix?: string | undefined;
593
- queryMode?: "auto" | "token" | "literal" | undefined;
594
594
  } | undefined;
595
595
  }, {
596
596
  kind: "workspace";
@@ -646,7 +646,7 @@ export declare const inspectMinecraftShape: {
646
646
  queryMode?: "auto" | "token" | "literal" | undefined;
647
647
  } | undefined;
648
648
  }>]>>;
649
- includeSnapshots: z.ZodOptional<z.ZodBoolean>;
649
+ includeSnapshots: z.ZodDefault<z.ZodBoolean>;
650
650
  detail: z.ZodOptional<z.ZodEnum<["summary", "standard", "full"]>>;
651
651
  include: z.ZodOptional<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">>;
652
652
  limit: z.ZodOptional<z.ZodNumber>;
@@ -936,10 +936,11 @@ export declare const inspectMinecraftSchema: z.ZodEffects<z.ZodObject<{
936
936
  symbolKind: z.ZodOptional<z.ZodEnum<["class", "interface", "enum", "record", "method", "field"]>>;
937
937
  packagePrefix: z.ZodOptional<z.ZodString>;
938
938
  fileGlob: z.ZodOptional<z.ZodString>;
939
- queryMode: z.ZodOptional<z.ZodEnum<["auto", "token", "literal"]>>;
939
+ queryMode: z.ZodDefault<z.ZodEnum<["auto", "token", "literal"]>>;
940
940
  }, "strip", z.ZodTypeAny, {
941
941
  kind: "search";
942
942
  query: string;
943
+ queryMode: "auto" | "token" | "literal";
943
944
  match?: "exact" | "prefix" | "contains" | "regex" | undefined;
944
945
  symbolKind?: "class" | "method" | "field" | "record" | "interface" | "enum" | undefined;
945
946
  intent?: "symbol" | "path" | "text" | undefined;
@@ -955,7 +956,6 @@ export declare const inspectMinecraftSchema: z.ZodEffects<z.ZodObject<{
955
956
  };
956
957
  } | undefined;
957
958
  packagePrefix?: string | undefined;
958
- queryMode?: "auto" | "token" | "literal" | undefined;
959
959
  }, {
960
960
  kind: "search";
961
961
  query: string;
@@ -1150,10 +1150,11 @@ export declare const inspectMinecraftSchema: z.ZodEffects<z.ZodObject<{
1150
1150
  symbolKind: z.ZodOptional<z.ZodEnum<["class", "interface", "enum", "record", "method", "field"]>>;
1151
1151
  packagePrefix: z.ZodOptional<z.ZodString>;
1152
1152
  fileGlob: z.ZodOptional<z.ZodString>;
1153
- queryMode: z.ZodOptional<z.ZodEnum<["auto", "token", "literal"]>>;
1153
+ queryMode: z.ZodDefault<z.ZodEnum<["auto", "token", "literal"]>>;
1154
1154
  }, "strip", z.ZodTypeAny, {
1155
1155
  kind: "search";
1156
1156
  query: string;
1157
+ queryMode: "auto" | "token" | "literal";
1157
1158
  match?: "exact" | "prefix" | "contains" | "regex" | undefined;
1158
1159
  symbolKind?: "class" | "method" | "field" | "record" | "interface" | "enum" | undefined;
1159
1160
  intent?: "symbol" | "path" | "text" | undefined;
@@ -1169,7 +1170,6 @@ export declare const inspectMinecraftSchema: z.ZodEffects<z.ZodObject<{
1169
1170
  };
1170
1171
  } | undefined;
1171
1172
  packagePrefix?: string | undefined;
1172
- queryMode?: "auto" | "token" | "literal" | undefined;
1173
1173
  }, {
1174
1174
  kind: "search";
1175
1175
  query: string;
@@ -1226,6 +1226,7 @@ export declare const inspectMinecraftSchema: z.ZodEffects<z.ZodObject<{
1226
1226
  } | {
1227
1227
  kind: "search";
1228
1228
  query: string;
1229
+ queryMode: "auto" | "token" | "literal";
1229
1230
  match?: "exact" | "prefix" | "contains" | "regex" | undefined;
1230
1231
  symbolKind?: "class" | "method" | "field" | "record" | "interface" | "enum" | undefined;
1231
1232
  intent?: "symbol" | "path" | "text" | undefined;
@@ -1241,7 +1242,6 @@ export declare const inspectMinecraftSchema: z.ZodEffects<z.ZodObject<{
1241
1242
  };
1242
1243
  } | undefined;
1243
1244
  packagePrefix?: string | undefined;
1244
- queryMode?: "auto" | "token" | "literal" | undefined;
1245
1245
  } | undefined;
1246
1246
  }, {
1247
1247
  kind: "workspace";
@@ -1297,15 +1297,15 @@ export declare const inspectMinecraftSchema: z.ZodEffects<z.ZodObject<{
1297
1297
  queryMode?: "auto" | "token" | "literal" | undefined;
1298
1298
  } | undefined;
1299
1299
  }>]>>;
1300
- includeSnapshots: z.ZodOptional<z.ZodBoolean>;
1300
+ includeSnapshots: z.ZodDefault<z.ZodBoolean>;
1301
1301
  detail: z.ZodOptional<z.ZodEnum<["summary", "standard", "full"]>>;
1302
1302
  include: z.ZodOptional<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">>;
1303
1303
  limit: z.ZodOptional<z.ZodNumber>;
1304
1304
  cursor: z.ZodOptional<z.ZodString>;
1305
1305
  }, "strip", z.ZodTypeAny, {
1306
+ includeSnapshots: boolean;
1306
1307
  limit?: number | undefined;
1307
1308
  cursor?: string | undefined;
1308
- includeSnapshots?: boolean | undefined;
1309
1309
  task?: "search" | "auto" | "versions" | "class-source" | "class-members" | "artifact" | "class-overview" | "file" | "list-files" | undefined;
1310
1310
  subject?: {
1311
1311
  kind: "version";
@@ -1366,6 +1366,7 @@ export declare const inspectMinecraftSchema: z.ZodEffects<z.ZodObject<{
1366
1366
  } | {
1367
1367
  kind: "search";
1368
1368
  query: string;
1369
+ queryMode: "auto" | "token" | "literal";
1369
1370
  match?: "exact" | "prefix" | "contains" | "regex" | undefined;
1370
1371
  symbolKind?: "class" | "method" | "field" | "record" | "interface" | "enum" | undefined;
1371
1372
  intent?: "symbol" | "path" | "text" | undefined;
@@ -1381,7 +1382,6 @@ export declare const inspectMinecraftSchema: z.ZodEffects<z.ZodObject<{
1381
1382
  };
1382
1383
  } | undefined;
1383
1384
  packagePrefix?: string | undefined;
1384
- queryMode?: "auto" | "token" | "literal" | undefined;
1385
1385
  } | {
1386
1386
  kind: "workspace";
1387
1387
  projectPath: string;
@@ -1418,6 +1418,7 @@ export declare const inspectMinecraftSchema: z.ZodEffects<z.ZodObject<{
1418
1418
  } | {
1419
1419
  kind: "search";
1420
1420
  query: string;
1421
+ queryMode: "auto" | "token" | "literal";
1421
1422
  match?: "exact" | "prefix" | "contains" | "regex" | undefined;
1422
1423
  symbolKind?: "class" | "method" | "field" | "record" | "interface" | "enum" | undefined;
1423
1424
  intent?: "symbol" | "path" | "text" | undefined;
@@ -1433,7 +1434,6 @@ export declare const inspectMinecraftSchema: z.ZodEffects<z.ZodObject<{
1433
1434
  };
1434
1435
  } | undefined;
1435
1436
  packagePrefix?: string | undefined;
1436
- queryMode?: "auto" | "token" | "literal" | undefined;
1437
1437
  } | undefined;
1438
1438
  } | undefined;
1439
1439
  detail?: "full" | "summary" | "standard" | undefined;
@@ -1575,9 +1575,9 @@ export declare const inspectMinecraftSchema: z.ZodEffects<z.ZodObject<{
1575
1575
  detail?: "full" | "summary" | "standard" | undefined;
1576
1576
  include?: string[] | undefined;
1577
1577
  }>, {
1578
+ includeSnapshots: boolean;
1578
1579
  limit?: number | undefined;
1579
1580
  cursor?: string | undefined;
1580
- includeSnapshots?: boolean | undefined;
1581
1581
  task?: "search" | "auto" | "versions" | "class-source" | "class-members" | "artifact" | "class-overview" | "file" | "list-files" | undefined;
1582
1582
  subject?: {
1583
1583
  kind: "version";
@@ -1638,6 +1638,7 @@ export declare const inspectMinecraftSchema: z.ZodEffects<z.ZodObject<{
1638
1638
  } | {
1639
1639
  kind: "search";
1640
1640
  query: string;
1641
+ queryMode: "auto" | "token" | "literal";
1641
1642
  match?: "exact" | "prefix" | "contains" | "regex" | undefined;
1642
1643
  symbolKind?: "class" | "method" | "field" | "record" | "interface" | "enum" | undefined;
1643
1644
  intent?: "symbol" | "path" | "text" | undefined;
@@ -1653,7 +1654,6 @@ export declare const inspectMinecraftSchema: z.ZodEffects<z.ZodObject<{
1653
1654
  };
1654
1655
  } | undefined;
1655
1656
  packagePrefix?: string | undefined;
1656
- queryMode?: "auto" | "token" | "literal" | undefined;
1657
1657
  } | {
1658
1658
  kind: "workspace";
1659
1659
  projectPath: string;
@@ -1690,6 +1690,7 @@ export declare const inspectMinecraftSchema: z.ZodEffects<z.ZodObject<{
1690
1690
  } | {
1691
1691
  kind: "search";
1692
1692
  query: string;
1693
+ queryMode: "auto" | "token" | "literal";
1693
1694
  match?: "exact" | "prefix" | "contains" | "regex" | undefined;
1694
1695
  symbolKind?: "class" | "method" | "field" | "record" | "interface" | "enum" | undefined;
1695
1696
  intent?: "symbol" | "path" | "text" | undefined;
@@ -1705,7 +1706,6 @@ export declare const inspectMinecraftSchema: z.ZodEffects<z.ZodObject<{
1705
1706
  };
1706
1707
  } | undefined;
1707
1708
  packagePrefix?: string | undefined;
1708
- queryMode?: "auto" | "token" | "literal" | undefined;
1709
1709
  } | undefined;
1710
1710
  } | undefined;
1711
1711
  detail?: "full" | "summary" | "standard" | undefined;
@@ -1939,6 +1939,7 @@ export declare class InspectMinecraftService {
1939
1939
  private resolveClassArtifactReference;
1940
1940
  private resolveWorkspaceArtifactReference;
1941
1941
  private resolveTask;
1942
+ private summarizeRequestedSubject;
1942
1943
  private resolveArtifactReference;
1943
1944
  private resolveArtifactRef;
1944
1945
  private handleVersions;
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { createError, ERROR_CODES } from "../errors.js";
3
3
  import { buildIncludeSchema, detailSchema, positiveIntSchema } from "./entry-tool-schema.js";
4
- import { buildEntryToolResult, buildEntryToolMeta, createNextAction, createTruncationMeta } from "./response-contract.js";
4
+ import { buildEntryToolResult, buildEntryToolMeta, createNextAction, createSummarySubject, createTruncationMeta } from "./response-contract.js";
5
5
  import { capArray, nextActionsOrUndefined, resolveDetail, resolveInclude } from "./request-normalizers.js";
6
6
  const INCLUDE_GROUPS = ["warnings", "provenance", "candidates", "members", "source", "files", "samples", "artifact", "timings"];
7
7
  const TASKS = ["auto", "versions", "artifact", "class-overview", "class-source", "class-members", "search", "file", "list-files"];
@@ -41,7 +41,7 @@ const workspaceFocusSchema = z.discriminatedUnion("kind", [
41
41
  symbolKind: z.enum(["class", "interface", "enum", "record", "method", "field"]).optional(),
42
42
  packagePrefix: nonEmptyString.optional(),
43
43
  fileGlob: nonEmptyString.optional(),
44
- queryMode: z.enum(["auto", "token", "literal"]).optional()
44
+ queryMode: z.enum(["auto", "token", "literal"]).default("auto")
45
45
  })
46
46
  ]);
47
47
  const subjectSchema = z.discriminatedUnion("kind", [
@@ -87,7 +87,7 @@ const subjectSchema = z.discriminatedUnion("kind", [
87
87
  symbolKind: z.enum(["class", "interface", "enum", "record", "method", "field"]).optional(),
88
88
  packagePrefix: nonEmptyString.optional(),
89
89
  fileGlob: nonEmptyString.optional(),
90
- queryMode: z.enum(["auto", "token", "literal"]).optional()
90
+ queryMode: z.enum(["auto", "token", "literal"]).default("auto")
91
91
  }),
92
92
  z.object({
93
93
  kind: z.literal("workspace"),
@@ -102,7 +102,7 @@ const subjectSchema = z.discriminatedUnion("kind", [
102
102
  export const inspectMinecraftShape = {
103
103
  task: z.enum(TASKS).optional(),
104
104
  subject: subjectSchema.optional(),
105
- includeSnapshots: z.boolean().optional(),
105
+ includeSnapshots: z.boolean().default(false),
106
106
  detail: detailSchema.optional(),
107
107
  include: buildIncludeSchema(INCLUDE_GROUPS),
108
108
  limit: positiveIntSchema.optional(),
@@ -116,7 +116,7 @@ export const inspectMinecraftSchema = z.object(inspectMinecraftShape).superRefin
116
116
  message: "subject is required unless task=versions."
117
117
  });
118
118
  }
119
- if (value.includeSnapshots !== undefined && value.task && value.task !== "versions") {
119
+ if (value.includeSnapshots && value.task && value.task !== "versions") {
120
120
  ctx.addIssue({
121
121
  code: z.ZodIssueCode.custom,
122
122
  path: ["includeSnapshots"],
@@ -260,6 +260,26 @@ export class InspectMinecraftService {
260
260
  return "search";
261
261
  }
262
262
  }
263
+ summarizeRequestedSubject(subject) {
264
+ if (subject.kind === "search") {
265
+ if (subject.queryMode !== "auto") {
266
+ return subject;
267
+ }
268
+ const { queryMode: _queryMode, ...requestedSubject } = subject;
269
+ return requestedSubject;
270
+ }
271
+ if (subject.kind === "workspace" && subject.focus?.kind === "search") {
272
+ if (subject.focus.queryMode !== "auto") {
273
+ return subject;
274
+ }
275
+ const { queryMode: _queryMode, ...requestedFocus } = subject.focus;
276
+ return {
277
+ ...subject,
278
+ focus: requestedFocus
279
+ };
280
+ }
281
+ return subject;
282
+ }
263
283
  async resolveArtifactReference(subject) {
264
284
  if (subject.kind === "artifact") {
265
285
  return this.resolveArtifactRef(subject.artifact, subject);
@@ -341,6 +361,12 @@ export class InspectMinecraftService {
341
361
  const summary = {
342
362
  status: "ok",
343
363
  headline: `Found ${versions.totalAvailable} Minecraft versions.`,
364
+ subject: createSummarySubject({
365
+ task: "versions",
366
+ kind: "versions",
367
+ includeSnapshots: input.includeSnapshots === false ? undefined : input.includeSnapshots,
368
+ limit: input.limit
369
+ }),
344
370
  counts: {
345
371
  releases: versions.releases.length,
346
372
  snapshots: versions.snapshots?.length ?? 0
@@ -379,6 +405,10 @@ export class InspectMinecraftService {
379
405
  const summary = {
380
406
  status: "blocked",
381
407
  headline: "Could not resolve an artifact without a Minecraft version.",
408
+ subject: createSummarySubject({
409
+ task: "artifact",
410
+ requested: subject
411
+ }),
382
412
  nextActions: nextActionsOrUndefined([
383
413
  createNextAction("inspect-minecraft", {
384
414
  task: "artifact",
@@ -408,6 +438,12 @@ export class InspectMinecraftService {
408
438
  const summary = {
409
439
  status: "ok",
410
440
  headline: `Resolved artifact ${resolved.artifactId}.`,
441
+ subject: createSummarySubject({
442
+ task: "artifact",
443
+ requested: subject,
444
+ artifactId: resolved.artifactId,
445
+ version: resolved.version
446
+ }),
411
447
  counts: {
412
448
  warnings: resolved.warnings.length
413
449
  }
@@ -454,7 +490,12 @@ export class InspectMinecraftService {
454
490
  if (!artifact.artifactId) {
455
491
  const summary = {
456
492
  status: "blocked",
457
- headline: `Could not resolve artifact context for ${className}.`
493
+ headline: `Could not resolve artifact context for ${className}.`,
494
+ subject: createSummarySubject({
495
+ task: "class-overview",
496
+ requested: subject,
497
+ className
498
+ })
458
499
  };
459
500
  return {
460
501
  ...buildEntryToolResult({
@@ -480,7 +521,13 @@ export class InspectMinecraftService {
480
521
  if (matches.total === 0) {
481
522
  const summary = {
482
523
  status: "not_found",
483
- headline: `No class match was found for ${className}.`
524
+ headline: `No class match was found for ${className}.`,
525
+ subject: createSummarySubject({
526
+ task: "class-overview",
527
+ requested: subject,
528
+ className,
529
+ artifactId: artifact.artifactId
530
+ })
484
531
  };
485
532
  return {
486
533
  ...buildEntryToolResult({
@@ -517,6 +564,12 @@ export class InspectMinecraftService {
517
564
  const summary = {
518
565
  status: "ambiguous",
519
566
  headline: `Found ${matches.total} class matches for ${className}.`,
567
+ subject: createSummarySubject({
568
+ task: "class-overview",
569
+ requested: subject,
570
+ className,
571
+ artifactId: artifact.artifactId
572
+ }),
520
573
  counts: {
521
574
  matches: matches.total
522
575
  },
@@ -551,6 +604,12 @@ export class InspectMinecraftService {
551
604
  const summary = {
552
605
  status: "ok",
553
606
  headline: `Resolved class overview for ${match.qualifiedName}.`,
607
+ subject: createSummarySubject({
608
+ task: "class-overview",
609
+ requested: subject,
610
+ className: match.qualifiedName,
611
+ artifactId: artifact.artifactId
612
+ }),
554
613
  counts: {
555
614
  totalLines: metadata.totalLines
556
615
  },
@@ -625,6 +684,12 @@ export class InspectMinecraftService {
625
684
  const summary = {
626
685
  status: "ok",
627
686
  headline: `Resolved source for ${source.className}.`,
687
+ subject: createSummarySubject({
688
+ task: "class-source",
689
+ requested: subject,
690
+ className: source.className,
691
+ artifactId: source.artifactId
692
+ }),
628
693
  counts: {
629
694
  totalLines: source.totalLines
630
695
  }
@@ -678,6 +743,12 @@ export class InspectMinecraftService {
678
743
  const summary = {
679
744
  status: members.truncated ? "partial" : "ok",
680
745
  headline: `Collected ${members.counts.total} members for ${members.className}.`,
746
+ subject: createSummarySubject({
747
+ task: "class-members",
748
+ requested: subject,
749
+ className: members.className,
750
+ artifactId: members.artifactId
751
+ }),
681
752
  counts: members.counts
682
753
  };
683
754
  return {
@@ -733,6 +804,8 @@ export class InspectMinecraftService {
733
804
  });
734
805
  }
735
806
  const searchSubject = subject.kind === "search" ? subject : this.requireWorkspaceSearchFocus(subject);
807
+ const requestedSubject = this.summarizeRequestedSubject(subject);
808
+ const queryMode = searchSubject.queryMode ?? "auto";
736
809
  const artifact = subject.kind === "search"
737
810
  ? await this.resolveArtifactReference(subject)
738
811
  : await this.resolveWorkspaceArtifactReference(subject, searchSubject.artifact);
@@ -741,7 +814,7 @@ export class InspectMinecraftService {
741
814
  query: searchSubject.query,
742
815
  intent: searchSubject.intent,
743
816
  match: searchSubject.match,
744
- queryMode: searchSubject.queryMode,
817
+ queryMode,
745
818
  limit,
746
819
  cursor,
747
820
  scope: searchSubject.packagePrefix || searchSubject.fileGlob || searchSubject.symbolKind
@@ -753,14 +826,69 @@ export class InspectMinecraftService {
753
826
  : undefined
754
827
  });
755
828
  const sampledHits = capArray(search.hits, 5);
829
+ const isAutoSeparatorMiss = search.hits.length === 0 &&
830
+ queryMode === "auto" &&
831
+ /[._$]/.test(searchSubject.query);
832
+ const literalRetrySubject = subject.kind === "search"
833
+ ? {
834
+ ...subject,
835
+ queryMode: "literal"
836
+ }
837
+ : {
838
+ ...subject,
839
+ focus: {
840
+ ...searchSubject,
841
+ kind: "search",
842
+ queryMode: "literal"
843
+ }
844
+ };
756
845
  const summary = {
757
846
  status: search.hits.length > 0 ? "ok" : "not_found",
758
847
  headline: search.hits.length > 0
759
848
  ? `Found ${search.hits.length} source hits for ${searchSubject.query}.`
760
849
  : `No source hits were found for ${searchSubject.query}.`,
850
+ subject: createSummarySubject({
851
+ task: "search",
852
+ requested: requestedSubject,
853
+ query: searchSubject.query,
854
+ artifactId: artifact.artifactId
855
+ }),
761
856
  counts: {
762
857
  hits: search.hits.length
763
- }
858
+ },
859
+ nextActions: nextActionsOrUndefined([
860
+ ...(search.hits.length > 0
861
+ ? [
862
+ createNextAction("inspect-minecraft", {
863
+ task: "file",
864
+ subject: {
865
+ kind: "file",
866
+ filePath: search.hits[0].filePath,
867
+ artifact: {
868
+ type: "resolved-id",
869
+ artifactId: artifact.artifactId
870
+ }
871
+ },
872
+ include: ["source"]
873
+ })
874
+ ]
875
+ : []),
876
+ ...(isAutoSeparatorMiss
877
+ ? [
878
+ createNextAction("inspect-minecraft", {
879
+ task: "search",
880
+ subject: literalRetrySubject
881
+ })
882
+ ]
883
+ : [])
884
+ ]),
885
+ ...(isAutoSeparatorMiss
886
+ ? {
887
+ notes: [
888
+ "Separator query returned no indexed hits. Retry with queryMode=\"literal\" for an explicit full substring scan."
889
+ ]
890
+ }
891
+ : {})
764
892
  };
765
893
  return {
766
894
  ...buildEntryToolResult({
@@ -770,7 +898,7 @@ export class InspectMinecraftService {
770
898
  include,
771
899
  blocks: {
772
900
  subject: {
773
- requested: subject,
901
+ requested: requestedSubject,
774
902
  resolved: {
775
903
  artifactId: artifact.artifactId
776
904
  }
@@ -804,6 +932,12 @@ export class InspectMinecraftService {
804
932
  const summary = {
805
933
  status: "ok",
806
934
  headline: `Read ${file.filePath}.`,
935
+ subject: createSummarySubject({
936
+ task: "file",
937
+ requested: subject,
938
+ filePath: file.filePath,
939
+ artifactId: artifact.artifactId
940
+ }),
807
941
  counts: {
808
942
  bytes: file.contentBytes
809
943
  }
@@ -845,9 +979,29 @@ export class InspectMinecraftService {
845
979
  const summary = {
846
980
  status: "ok",
847
981
  headline: `Listed ${files.items.length} files for ${artifact.artifactId}.`,
982
+ subject: createSummarySubject({
983
+ task: "list-files",
984
+ requested: subject,
985
+ artifactId: artifact.artifactId
986
+ }),
848
987
  counts: {
849
988
  files: files.items.length
850
- }
989
+ },
990
+ nextActions: nextActionsOrUndefined(files.items.length > 0
991
+ ? [
992
+ createNextAction("inspect-minecraft", {
993
+ task: "file",
994
+ subject: {
995
+ kind: "file",
996
+ filePath: files.items[0],
997
+ artifact: {
998
+ type: "resolved-id",
999
+ artifactId: artifact.artifactId
1000
+ }
1001
+ }
1002
+ })
1003
+ ]
1004
+ : [])
851
1005
  };
852
1006
  return {
853
1007
  ...buildEntryToolResult({
@@ -36,9 +36,9 @@ export declare const manageCacheShape: {
36
36
  }>>;
37
37
  detail: z.ZodOptional<z.ZodEnum<["summary", "standard", "full"]>>;
38
38
  include: z.ZodOptional<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">>;
39
- limit: z.ZodOptional<z.ZodNumber>;
39
+ limit: z.ZodDefault<z.ZodNumber>;
40
40
  cursor: z.ZodOptional<z.ZodString>;
41
- executionMode: z.ZodOptional<z.ZodEnum<["preview", "apply"]>>;
41
+ executionMode: z.ZodDefault<z.ZodEnum<["preview", "apply"]>>;
42
42
  };
43
43
  export declare const manageCacheSchema: z.ZodObject<{
44
44
  action: z.ZodEnum<["summary", "list", "inspect", "delete", "prune", "rebuild", "verify"]>;
@@ -76,16 +76,16 @@ export declare const manageCacheSchema: z.ZodObject<{
76
76
  }>>;
77
77
  detail: z.ZodOptional<z.ZodEnum<["summary", "standard", "full"]>>;
78
78
  include: z.ZodOptional<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">>;
79
- limit: z.ZodOptional<z.ZodNumber>;
79
+ limit: z.ZodDefault<z.ZodNumber>;
80
80
  cursor: z.ZodOptional<z.ZodString>;
81
- executionMode: z.ZodOptional<z.ZodEnum<["preview", "apply"]>>;
81
+ executionMode: z.ZodDefault<z.ZodEnum<["preview", "apply"]>>;
82
82
  }, "strip", z.ZodTypeAny, {
83
+ limit: number;
84
+ executionMode: "preview" | "apply";
83
85
  action: "list" | "summary" | "inspect" | "verify" | "delete" | "prune" | "rebuild";
84
- limit?: number | undefined;
85
86
  cursor?: string | undefined;
86
87
  detail?: "full" | "summary" | "standard" | undefined;
87
88
  include?: string[] | undefined;
88
- executionMode?: "preview" | "apply" | undefined;
89
89
  cacheKinds?: ("artifact-index" | "downloads" | "mapping" | "registry" | "decompiled-source" | "mod-remap")[] | undefined;
90
90
  selector?: {
91
91
  mapping?: string | undefined;