midnight-mcp 0.1.41 → 0.2.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.
Files changed (103) hide show
  1. package/README.md +32 -1
  2. package/dist/bin.d.ts +1 -0
  3. package/dist/bin.js +60 -0
  4. package/dist/chunk-HOWO4K5A.js +2197 -0
  5. package/dist/chunk-S7G4OHA4.js +8306 -0
  6. package/dist/db-YDGUWI5K.js +7 -0
  7. package/dist/index.d.ts +205 -3
  8. package/dist/index.js +28 -16
  9. package/package.json +16 -6
  10. package/dist/config/compact-version.d.ts +0 -183
  11. package/dist/config/compact-version.js +0 -423
  12. package/dist/db/index.d.ts +0 -3
  13. package/dist/db/index.js +0 -2
  14. package/dist/db/vectorStore.d.ts +0 -69
  15. package/dist/db/vectorStore.js +0 -196
  16. package/dist/pipeline/embeddings.d.ts +0 -25
  17. package/dist/pipeline/embeddings.js +0 -103
  18. package/dist/pipeline/github.d.ts +0 -84
  19. package/dist/pipeline/github.js +0 -399
  20. package/dist/pipeline/index.d.ts +0 -11
  21. package/dist/pipeline/index.js +0 -6
  22. package/dist/pipeline/indexer.d.ts +0 -41
  23. package/dist/pipeline/indexer.js +0 -254
  24. package/dist/pipeline/parser.d.ts +0 -46
  25. package/dist/pipeline/parser.js +0 -436
  26. package/dist/pipeline/releases.d.ts +0 -112
  27. package/dist/pipeline/releases.js +0 -298
  28. package/dist/pipeline/repository.d.ts +0 -372
  29. package/dist/pipeline/repository.js +0 -520
  30. package/dist/prompts/index.d.ts +0 -3
  31. package/dist/prompts/index.js +0 -2
  32. package/dist/prompts/templates.d.ts +0 -26
  33. package/dist/prompts/templates.js +0 -443
  34. package/dist/resources/code.d.ts +0 -15
  35. package/dist/resources/code.js +0 -122
  36. package/dist/resources/content/code-content.d.ts +0 -6
  37. package/dist/resources/content/code-content.js +0 -802
  38. package/dist/resources/content/docs-content.d.ts +0 -14
  39. package/dist/resources/content/docs-content.js +0 -1202
  40. package/dist/resources/content/index.d.ts +0 -6
  41. package/dist/resources/content/index.js +0 -6
  42. package/dist/resources/docs.d.ts +0 -15
  43. package/dist/resources/docs.js +0 -98
  44. package/dist/resources/index.d.ts +0 -6
  45. package/dist/resources/index.js +0 -13
  46. package/dist/resources/schemas.d.ts +0 -16
  47. package/dist/resources/schemas.js +0 -407
  48. package/dist/scripts/index-repos.d.ts +0 -12
  49. package/dist/scripts/index-repos.js +0 -53
  50. package/dist/server.d.ts +0 -43
  51. package/dist/server.js +0 -696
  52. package/dist/services/index.d.ts +0 -6
  53. package/dist/services/index.js +0 -6
  54. package/dist/services/sampling.d.ts +0 -62
  55. package/dist/services/sampling.js +0 -277
  56. package/dist/tools/analyze.d.ts +0 -106
  57. package/dist/tools/analyze.js +0 -431
  58. package/dist/tools/generation.d.ts +0 -9
  59. package/dist/tools/generation.js +0 -285
  60. package/dist/tools/health.d.ts +0 -120
  61. package/dist/tools/health.js +0 -365
  62. package/dist/tools/index.d.ts +0 -14
  63. package/dist/tools/index.js +0 -22
  64. package/dist/tools/meta.d.ts +0 -61
  65. package/dist/tools/meta.js +0 -282
  66. package/dist/tools/repository/constants.d.ts +0 -19
  67. package/dist/tools/repository/constants.js +0 -324
  68. package/dist/tools/repository/handlers.d.ts +0 -373
  69. package/dist/tools/repository/handlers.js +0 -724
  70. package/dist/tools/repository/index.d.ts +0 -9
  71. package/dist/tools/repository/index.js +0 -13
  72. package/dist/tools/repository/schemas.d.ts +0 -153
  73. package/dist/tools/repository/schemas.js +0 -106
  74. package/dist/tools/repository/tools.d.ts +0 -7
  75. package/dist/tools/repository/tools.js +0 -484
  76. package/dist/tools/repository/validation.d.ts +0 -106
  77. package/dist/tools/repository/validation.js +0 -820
  78. package/dist/tools/repository.d.ts +0 -6
  79. package/dist/tools/repository.js +0 -7
  80. package/dist/tools/search.d.ts +0 -76
  81. package/dist/tools/search.js +0 -423
  82. package/dist/types/index.d.ts +0 -2
  83. package/dist/types/index.js +0 -2
  84. package/dist/types/mcp.d.ts +0 -187
  85. package/dist/types/mcp.js +0 -6
  86. package/dist/utils/cache.d.ts +0 -77
  87. package/dist/utils/cache.js +0 -172
  88. package/dist/utils/config.d.ts +0 -70
  89. package/dist/utils/config.js +0 -294
  90. package/dist/utils/errors.d.ts +0 -111
  91. package/dist/utils/errors.js +0 -165
  92. package/dist/utils/health.d.ts +0 -29
  93. package/dist/utils/health.js +0 -132
  94. package/dist/utils/hosted-api.d.ts +0 -67
  95. package/dist/utils/hosted-api.js +0 -119
  96. package/dist/utils/index.d.ts +0 -16
  97. package/dist/utils/index.js +0 -15
  98. package/dist/utils/logger.d.ts +0 -48
  99. package/dist/utils/logger.js +0 -124
  100. package/dist/utils/rate-limit.d.ts +0 -61
  101. package/dist/utils/rate-limit.js +0 -148
  102. package/dist/utils/validation.d.ts +0 -52
  103. package/dist/utils/validation.js +0 -255
@@ -1,9 +0,0 @@
1
- /**
2
- * Repository module exports
3
- * Barrel file for repository-related tools
4
- */
5
- export { GetFileInputSchema, ListExamplesInputSchema, GetLatestUpdatesInputSchema, GetVersionInfoInputSchema, CheckBreakingChangesInputSchema, GetMigrationGuideInputSchema, GetFileAtVersionInputSchema, CompareSyntaxInputSchema, GetLatestSyntaxInputSchema, ExtractContractStructureInputSchema, type GetFileInput, type ListExamplesInput, type GetLatestUpdatesInput, type GetVersionInfoInput, type CheckBreakingChangesInput, type GetMigrationGuideInput, type GetFileAtVersionInput, type CompareSyntaxInput, type GetLatestSyntaxInput, type ExtractContractStructureInput, } from "./schemas.js";
6
- export { REPO_ALIASES, EXAMPLES, type ExampleDefinition } from "./constants.js";
7
- export { resolveRepo, getFile, listExamples, getLatestUpdates, getVersionInfo, checkBreakingChanges, getMigrationGuide, getFileAtVersion, compareSyntax, getLatestSyntax, extractContractStructure, } from "./handlers.js";
8
- export { repositoryTools } from "./tools.js";
9
- //# sourceMappingURL=index.d.ts.map
@@ -1,13 +0,0 @@
1
- /**
2
- * Repository module exports
3
- * Barrel file for repository-related tools
4
- */
5
- // Schemas and types
6
- export { GetFileInputSchema, ListExamplesInputSchema, GetLatestUpdatesInputSchema, GetVersionInfoInputSchema, CheckBreakingChangesInputSchema, GetMigrationGuideInputSchema, GetFileAtVersionInputSchema, CompareSyntaxInputSchema, GetLatestSyntaxInputSchema, ExtractContractStructureInputSchema, } from "./schemas.js";
7
- // Constants
8
- export { REPO_ALIASES, EXAMPLES } from "./constants.js";
9
- // Handlers
10
- export { resolveRepo, getFile, listExamples, getLatestUpdates, getVersionInfo, checkBreakingChanges, getMigrationGuide, getFileAtVersion, compareSyntax, getLatestSyntax, extractContractStructure, } from "./handlers.js";
11
- // Tools
12
- export { repositoryTools } from "./tools.js";
13
- //# sourceMappingURL=index.js.map
@@ -1,153 +0,0 @@
1
- /**
2
- * Repository tool input schemas
3
- * Zod schemas for validating tool inputs
4
- */
5
- import { z } from "zod";
6
- export declare const GetFileInputSchema: z.ZodObject<{
7
- repo: z.ZodString;
8
- path: z.ZodString;
9
- ref: z.ZodOptional<z.ZodString>;
10
- }, "strip", z.ZodTypeAny, {
11
- path: string;
12
- repo: string;
13
- ref?: string | undefined;
14
- }, {
15
- path: string;
16
- repo: string;
17
- ref?: string | undefined;
18
- }>;
19
- export declare const ListExamplesInputSchema: z.ZodObject<{
20
- category: z.ZodDefault<z.ZodOptional<z.ZodEnum<["counter", "bboard", "token", "voting", "all"]>>>;
21
- }, "strip", z.ZodTypeAny, {
22
- category: "all" | "counter" | "bboard" | "token" | "voting";
23
- }, {
24
- category?: "all" | "counter" | "bboard" | "token" | "voting" | undefined;
25
- }>;
26
- export declare const GetLatestUpdatesInputSchema: z.ZodObject<{
27
- since: z.ZodOptional<z.ZodString>;
28
- repos: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
29
- }, "strip", z.ZodTypeAny, {
30
- repos?: string[] | undefined;
31
- since?: string | undefined;
32
- }, {
33
- repos?: string[] | undefined;
34
- since?: string | undefined;
35
- }>;
36
- export declare const GetVersionInfoInputSchema: z.ZodObject<{
37
- repo: z.ZodString;
38
- }, "strip", z.ZodTypeAny, {
39
- repo: string;
40
- }, {
41
- repo: string;
42
- }>;
43
- export declare const CheckBreakingChangesInputSchema: z.ZodObject<{
44
- repo: z.ZodString;
45
- currentVersion: z.ZodString;
46
- }, "strip", z.ZodTypeAny, {
47
- repo: string;
48
- currentVersion: string;
49
- }, {
50
- repo: string;
51
- currentVersion: string;
52
- }>;
53
- export declare const GetMigrationGuideInputSchema: z.ZodObject<{
54
- repo: z.ZodString;
55
- fromVersion: z.ZodString;
56
- toVersion: z.ZodOptional<z.ZodString>;
57
- }, "strip", z.ZodTypeAny, {
58
- repo: string;
59
- fromVersion: string;
60
- toVersion?: string | undefined;
61
- }, {
62
- repo: string;
63
- fromVersion: string;
64
- toVersion?: string | undefined;
65
- }>;
66
- export declare const GetFileAtVersionInputSchema: z.ZodObject<{
67
- repo: z.ZodString;
68
- path: z.ZodString;
69
- version: z.ZodString;
70
- }, "strip", z.ZodTypeAny, {
71
- path: string;
72
- repo: string;
73
- version: string;
74
- }, {
75
- path: string;
76
- repo: string;
77
- version: string;
78
- }>;
79
- export declare const CompareSyntaxInputSchema: z.ZodObject<{
80
- repo: z.ZodString;
81
- path: z.ZodString;
82
- oldVersion: z.ZodString;
83
- newVersion: z.ZodOptional<z.ZodString>;
84
- }, "strip", z.ZodTypeAny, {
85
- path: string;
86
- repo: string;
87
- oldVersion: string;
88
- newVersion?: string | undefined;
89
- }, {
90
- path: string;
91
- repo: string;
92
- oldVersion: string;
93
- newVersion?: string | undefined;
94
- }>;
95
- export declare const GetLatestSyntaxInputSchema: z.ZodObject<{
96
- repo: z.ZodDefault<z.ZodString>;
97
- }, "strip", z.ZodTypeAny, {
98
- repo: string;
99
- }, {
100
- repo?: string | undefined;
101
- }>;
102
- export declare const UpgradeCheckInputSchema: z.ZodObject<{
103
- repo: z.ZodDefault<z.ZodString>;
104
- currentVersion: z.ZodString;
105
- }, "strip", z.ZodTypeAny, {
106
- repo: string;
107
- currentVersion: string;
108
- }, {
109
- currentVersion: string;
110
- repo?: string | undefined;
111
- }>;
112
- export declare const FullRepoContextInputSchema: z.ZodObject<{
113
- repo: z.ZodString;
114
- includeExamples: z.ZodDefault<z.ZodBoolean>;
115
- includeSyntax: z.ZodDefault<z.ZodBoolean>;
116
- }, "strip", z.ZodTypeAny, {
117
- repo: string;
118
- includeExamples: boolean;
119
- includeSyntax: boolean;
120
- }, {
121
- repo: string;
122
- includeExamples?: boolean | undefined;
123
- includeSyntax?: boolean | undefined;
124
- }>;
125
- export declare const ExtractContractStructureInputSchema: z.ZodEffects<z.ZodObject<{
126
- code: z.ZodOptional<z.ZodString>;
127
- filePath: z.ZodOptional<z.ZodString>;
128
- }, "strip", z.ZodTypeAny, {
129
- code?: string | undefined;
130
- filePath?: string | undefined;
131
- }, {
132
- code?: string | undefined;
133
- filePath?: string | undefined;
134
- }>, {
135
- code?: string | undefined;
136
- filePath?: string | undefined;
137
- }, {
138
- code?: string | undefined;
139
- filePath?: string | undefined;
140
- }>;
141
- export type GetFileInput = z.infer<typeof GetFileInputSchema>;
142
- export type ListExamplesInput = z.infer<typeof ListExamplesInputSchema>;
143
- export type GetLatestUpdatesInput = z.infer<typeof GetLatestUpdatesInputSchema>;
144
- export type GetVersionInfoInput = z.infer<typeof GetVersionInfoInputSchema>;
145
- export type CheckBreakingChangesInput = z.infer<typeof CheckBreakingChangesInputSchema>;
146
- export type GetMigrationGuideInput = z.infer<typeof GetMigrationGuideInputSchema>;
147
- export type GetFileAtVersionInput = z.infer<typeof GetFileAtVersionInputSchema>;
148
- export type CompareSyntaxInput = z.infer<typeof CompareSyntaxInputSchema>;
149
- export type GetLatestSyntaxInput = z.infer<typeof GetLatestSyntaxInputSchema>;
150
- export type UpgradeCheckInput = z.infer<typeof UpgradeCheckInputSchema>;
151
- export type FullRepoContextInput = z.infer<typeof FullRepoContextInputSchema>;
152
- export type ExtractContractStructureInput = z.infer<typeof ExtractContractStructureInputSchema>;
153
- //# sourceMappingURL=schemas.d.ts.map
@@ -1,106 +0,0 @@
1
- /**
2
- * Repository tool input schemas
3
- * Zod schemas for validating tool inputs
4
- */
5
- import { z } from "zod";
6
- // Schema definitions
7
- export const GetFileInputSchema = z.object({
8
- repo: z
9
- .string()
10
- .describe("Repository name (e.g., 'compact', 'midnight-js', 'example-counter')"),
11
- path: z.string().describe("File path within repository"),
12
- ref: z
13
- .string()
14
- .optional()
15
- .describe("Branch, tag, or commit SHA (default: main)"),
16
- });
17
- export const ListExamplesInputSchema = z.object({
18
- category: z
19
- .enum(["counter", "bboard", "token", "voting", "all"])
20
- .optional()
21
- .default("all")
22
- .describe("Filter by example type"),
23
- });
24
- export const GetLatestUpdatesInputSchema = z.object({
25
- since: z
26
- .string()
27
- .optional()
28
- .describe("ISO date to fetch updates from (default: last 7 days)"),
29
- repos: z
30
- .array(z.string())
31
- .optional()
32
- .describe("Specific repos to check (default: all configured repos)"),
33
- });
34
- export const GetVersionInfoInputSchema = z.object({
35
- repo: z.string().describe("Repository name (e.g., 'compact', 'midnight-js')"),
36
- });
37
- export const CheckBreakingChangesInputSchema = z.object({
38
- repo: z.string().describe("Repository name (e.g., 'compact', 'midnight-js')"),
39
- currentVersion: z
40
- .string()
41
- .describe("Version you're currently using (e.g., 'v1.0.0', '0.5.2')"),
42
- });
43
- export const GetMigrationGuideInputSchema = z.object({
44
- repo: z.string().describe("Repository name (e.g., 'compact', 'midnight-js')"),
45
- fromVersion: z.string().describe("Version you're migrating from"),
46
- toVersion: z
47
- .string()
48
- .optional()
49
- .describe("Target version (default: latest stable)"),
50
- });
51
- export const GetFileAtVersionInputSchema = z.object({
52
- repo: z.string().describe("Repository name (e.g., 'compact', 'midnight-js')"),
53
- path: z.string().describe("File path within repository"),
54
- version: z
55
- .string()
56
- .describe("Version tag (e.g., 'v1.0.0') or branch (e.g., 'main')"),
57
- });
58
- export const CompareSyntaxInputSchema = z.object({
59
- repo: z.string().describe("Repository name (e.g., 'compact')"),
60
- path: z.string().describe("File path to compare"),
61
- oldVersion: z.string().describe("Old version tag (e.g., 'v0.9.0')"),
62
- newVersion: z
63
- .string()
64
- .optional()
65
- .describe("New version tag (default: latest)"),
66
- });
67
- export const GetLatestSyntaxInputSchema = z.object({
68
- repo: z
69
- .string()
70
- .default("compact")
71
- .describe("Repository name (default: 'compact')"),
72
- });
73
- // Compound tool schemas - reduce multiple API calls to one
74
- export const UpgradeCheckInputSchema = z.object({
75
- repo: z
76
- .string()
77
- .default("compact")
78
- .describe("Repository name (default: 'compact')"),
79
- currentVersion: z
80
- .string()
81
- .describe("Your current version (e.g., 'v0.14.0', '0.13.5')"),
82
- });
83
- export const FullRepoContextInputSchema = z.object({
84
- repo: z.string().describe("Repository name (e.g., 'compact', 'midnight-js')"),
85
- includeExamples: z
86
- .boolean()
87
- .default(true)
88
- .describe("Include example code snippets"),
89
- includeSyntax: z.boolean().default(true).describe("Include syntax reference"),
90
- });
91
- export const ExtractContractStructureInputSchema = z
92
- .object({
93
- code: z
94
- .string()
95
- .optional()
96
- .describe("The Compact contract source code to analyze (provide this OR filePath)"),
97
- filePath: z
98
- .string()
99
- .optional()
100
- .describe("Path to a .compact file to analyze (alternative to providing code directly)"),
101
- })
102
- .refine((data) => (data.code !== undefined && data.code.trim() !== "") ||
103
- data.filePath !== undefined, {
104
- message: "Either 'code' or 'filePath' must be provided",
105
- });
106
- //# sourceMappingURL=schemas.js.map
@@ -1,7 +0,0 @@
1
- /**
2
- * Repository tool definitions
3
- * MCP tool registration for repository-related operations
4
- */
5
- import type { ExtendedToolDefinition } from "../../types/index.js";
6
- export declare const repositoryTools: ExtendedToolDefinition[];
7
- //# sourceMappingURL=tools.d.ts.map