@caplets/core 0.13.1 → 0.15.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.
- package/dist/auth/store.d.ts +22 -0
- package/dist/auth.d.ts +77 -0
- package/dist/capability-description.d.ts +2 -0
- package/dist/caplet-files.d.ts +266 -0
- package/dist/caplet-sets.d.ts +33 -0
- package/dist/cli/add.d.ts +62 -0
- package/dist/cli/auth.d.ts +20 -0
- package/dist/cli/author.d.ts +11 -0
- package/dist/cli/init.d.ts +5 -0
- package/dist/cli/inspection.d.ts +30 -0
- package/dist/cli/install.d.ts +15 -0
- package/dist/cli-tools.d.ts +23 -0
- package/dist/cli.d.ts +13 -0
- package/dist/config/paths.d.ts +14 -0
- package/dist/config/validation.d.ts +16 -0
- package/dist/config.d.ts +227 -0
- package/dist/downstream.d.ts +41 -0
- package/dist/engine-Bh55p8Lm.js +58157 -0
- package/dist/engine.d.ts +52 -0
- package/dist/errors.d.ts +24 -0
- package/dist/field-selection.d.ts +4 -0
- package/dist/generated-tool-input-schema.d.ts +47 -0
- package/dist/generated-tool-input-schema.js +59 -0
- package/dist/graphql.d.ts +30 -0
- package/dist/http/utils.d.ts +7 -0
- package/dist/http-actions.d.ts +26 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1623 -59267
- package/dist/native/process-cleanup.d.ts +2 -0
- package/dist/native/service.d.ts +24 -0
- package/dist/native/tools.d.ts +5 -0
- package/dist/native.d.ts +5 -0
- package/dist/native.js +93 -0
- package/dist/openapi.d.ts +29 -0
- package/dist/registry.d.ts +68 -0
- package/dist/result-content.d.ts +14 -0
- package/dist/runtime.d.ts +30 -0
- package/dist/schema-hash.d.ts +1 -0
- package/dist/schema-utils.d.ts +2 -0
- package/dist/tool-search.d.ts +2 -0
- package/dist/tools.d.ts +67 -0
- package/package.json +20 -9
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type NativeCapletsServiceOptions = {
|
|
2
|
+
configPath?: string;
|
|
3
|
+
projectConfigPath?: string;
|
|
4
|
+
authDir?: string;
|
|
5
|
+
watchDebounceMs?: number;
|
|
6
|
+
watch?: boolean;
|
|
7
|
+
writeErr?: (value: string) => void;
|
|
8
|
+
};
|
|
9
|
+
export type NativeCapletTool = {
|
|
10
|
+
caplet: string;
|
|
11
|
+
toolName: string;
|
|
12
|
+
title: string;
|
|
13
|
+
description: string;
|
|
14
|
+
promptGuidance: string[];
|
|
15
|
+
};
|
|
16
|
+
export type NativeCapletsToolsChangedListener = (tools: NativeCapletTool[]) => void;
|
|
17
|
+
export type NativeCapletsService = {
|
|
18
|
+
listTools(): NativeCapletTool[];
|
|
19
|
+
execute(capletId: string, request: unknown): Promise<unknown>;
|
|
20
|
+
reload(): Promise<boolean>;
|
|
21
|
+
onToolsChanged(listener: NativeCapletsToolsChangedListener): () => void;
|
|
22
|
+
close(): Promise<void>;
|
|
23
|
+
};
|
|
24
|
+
export declare function createNativeCapletsService(options?: NativeCapletsServiceOptions): NativeCapletsService;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CapletConfig } from "../config";
|
|
2
|
+
export declare function nativeCapletToolName(capletId: string): string;
|
|
3
|
+
export declare function nativeCapletsSystemGuidance(toolNames: string[]): string;
|
|
4
|
+
export declare function nativeCapletPromptGuidance(toolName: string, caplet: CapletConfig): string[];
|
|
5
|
+
export declare function nativeCapletToolDescription(toolName: string, caplet: CapletConfig): string;
|
package/dist/native.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { createNativeCapletsService, type NativeCapletTool, type NativeCapletsService, type NativeCapletsServiceOptions, type NativeCapletsToolsChangedListener, } from "./native/service";
|
|
2
|
+
export { registerNativeCapletsProcessCleanup } from "./native/process-cleanup";
|
|
3
|
+
export { nativeCapletPromptGuidance, nativeCapletToolDescription, nativeCapletToolName, nativeCapletsSystemGuidance, } from "./native/tools";
|
|
4
|
+
export { generatedToolInputSchema } from "./tools";
|
|
5
|
+
export { generatedToolInputJsonSchema } from "./generated-tool-input-schema";
|
package/dist/native.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { a as capabilityDescription, n as generatedToolInputSchema, t as CapletsEngine } from "./engine-Bh55p8Lm.js";
|
|
2
|
+
import { generatedToolInputJsonSchema } from "./generated-tool-input-schema.js";
|
|
3
|
+
//#region src/native/tools.ts
|
|
4
|
+
function nativeCapletToolName(capletId) {
|
|
5
|
+
return `caplets_${capletId.replace(/_/g, "__").replace(/-/g, "_")}`;
|
|
6
|
+
}
|
|
7
|
+
function nativeCapletsSystemGuidance(toolNames) {
|
|
8
|
+
return [
|
|
9
|
+
"## Caplets Native Tools",
|
|
10
|
+
"",
|
|
11
|
+
"Caplets tools expose configured capability domains through progressive discovery.",
|
|
12
|
+
"",
|
|
13
|
+
"Available Caplets native tools:",
|
|
14
|
+
toolNames.length > 0 ? toolNames.map((tool) => `- ${tool}`).join("\n") : "- none",
|
|
15
|
+
"",
|
|
16
|
+
"Flow: get_caplet when the domain is unfamiliar; search_tools or list_tools to find exact downstream names; get_tool only when schemas are unclear; call_tool with downstream inputs inside arguments.",
|
|
17
|
+
"Use fields on call_tool when a non-GraphQL downstream outputSchema allows selecting only needed structured paths."
|
|
18
|
+
].join("\n");
|
|
19
|
+
}
|
|
20
|
+
function nativeCapletPromptGuidance(toolName, caplet) {
|
|
21
|
+
return [`Use ${toolName} for the ${caplet.name} Caplet capability domain.`];
|
|
22
|
+
}
|
|
23
|
+
function nativeCapletToolDescription(toolName, caplet) {
|
|
24
|
+
return [
|
|
25
|
+
capabilityDescription(caplet),
|
|
26
|
+
"",
|
|
27
|
+
`Native tool name: ${toolName}`,
|
|
28
|
+
`Original Caplet ID: ${caplet.server}`
|
|
29
|
+
].join("\n");
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/native/service.ts
|
|
33
|
+
function createNativeCapletsService(options = {}) {
|
|
34
|
+
return new DefaultNativeCapletsService(options);
|
|
35
|
+
}
|
|
36
|
+
var DefaultNativeCapletsService = class {
|
|
37
|
+
engine;
|
|
38
|
+
constructor(options) {
|
|
39
|
+
this.engine = new CapletsEngine(options);
|
|
40
|
+
}
|
|
41
|
+
listTools() {
|
|
42
|
+
return this.engine.enabledServers().map((caplet) => {
|
|
43
|
+
const toolName = nativeCapletToolName(caplet.server);
|
|
44
|
+
return {
|
|
45
|
+
caplet: caplet.server,
|
|
46
|
+
toolName,
|
|
47
|
+
title: caplet.name,
|
|
48
|
+
description: nativeCapletToolDescription(toolName, caplet),
|
|
49
|
+
promptGuidance: nativeCapletPromptGuidance(toolName, caplet)
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
async execute(capletId, request) {
|
|
54
|
+
return await this.engine.execute(capletId, request);
|
|
55
|
+
}
|
|
56
|
+
async reload() {
|
|
57
|
+
return await this.engine.reload();
|
|
58
|
+
}
|
|
59
|
+
onToolsChanged(listener) {
|
|
60
|
+
return this.engine.onReload(() => listener(this.listTools()));
|
|
61
|
+
}
|
|
62
|
+
async close() {
|
|
63
|
+
await this.engine.close();
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/native/process-cleanup.ts
|
|
68
|
+
function registerNativeCapletsProcessCleanup(service) {
|
|
69
|
+
let closed = false;
|
|
70
|
+
const close = async () => {
|
|
71
|
+
if (closed) return;
|
|
72
|
+
closed = true;
|
|
73
|
+
try {
|
|
74
|
+
await service.close();
|
|
75
|
+
} catch (error) {
|
|
76
|
+
console.error("Failed to close Caplets service:", error);
|
|
77
|
+
process.exitCode = 1;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const closeBeforeExit = () => {
|
|
81
|
+
close();
|
|
82
|
+
};
|
|
83
|
+
const closeAndExit = () => {
|
|
84
|
+
close().finally(() => {
|
|
85
|
+
process.exit(process.exitCode ?? 0);
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
process.once("beforeExit", closeBeforeExit);
|
|
89
|
+
process.once("SIGINT", closeAndExit);
|
|
90
|
+
process.once("SIGTERM", closeAndExit);
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
export { createNativeCapletsService, generatedToolInputJsonSchema, generatedToolInputSchema, nativeCapletPromptGuidance, nativeCapletToolDescription, nativeCapletToolName, nativeCapletsSystemGuidance, registerNativeCapletsProcessCleanup };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { CompatibilityCallToolResult, Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OpenApiEndpointConfig } from "./config";
|
|
3
|
+
import type { CompactTool } from "./downstream";
|
|
4
|
+
import type { ServerRegistry } from "./registry";
|
|
5
|
+
export declare class OpenApiManager {
|
|
6
|
+
private registry;
|
|
7
|
+
private readonly options;
|
|
8
|
+
private readonly cache;
|
|
9
|
+
constructor(registry: ServerRegistry, options?: {
|
|
10
|
+
authDir?: string;
|
|
11
|
+
});
|
|
12
|
+
updateRegistry(registry: ServerRegistry): void;
|
|
13
|
+
invalidate(serverId: string): void;
|
|
14
|
+
checkEndpoint(endpoint: OpenApiEndpointConfig): Promise<{
|
|
15
|
+
id: string;
|
|
16
|
+
status: string;
|
|
17
|
+
toolCount?: number;
|
|
18
|
+
elapsedMs: number;
|
|
19
|
+
error?: unknown;
|
|
20
|
+
}>;
|
|
21
|
+
listTools(endpoint: OpenApiEndpointConfig): Promise<Tool[]>;
|
|
22
|
+
getTool(endpoint: OpenApiEndpointConfig, toolName: string): Promise<Tool>;
|
|
23
|
+
callTool(endpoint: OpenApiEndpointConfig, toolName: string, args: Record<string, unknown>): Promise<CompatibilityCallToolResult>;
|
|
24
|
+
compact(endpoint: OpenApiEndpointConfig, tool: Tool): CompactTool;
|
|
25
|
+
search(endpoint: OpenApiEndpointConfig, tools: Tool[], query: string, limit: number): CompactTool[];
|
|
26
|
+
private getOperation;
|
|
27
|
+
private refreshOperations;
|
|
28
|
+
private toTool;
|
|
29
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { CapletConfig, CapletsConfig, CapletServerConfig } from "./config";
|
|
2
|
+
import type { SafeErrorSummary } from "./errors";
|
|
3
|
+
export { capabilityDescription } from "./capability-description";
|
|
4
|
+
export type ServerStatus = "disabled" | "not_started" | "starting" | "available" | "unavailable";
|
|
5
|
+
export type CapletServerSummary = {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
status: ServerStatus;
|
|
11
|
+
lastError?: SafeErrorSummary;
|
|
12
|
+
};
|
|
13
|
+
export type CapletServerDetail = {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
tags?: string[];
|
|
18
|
+
backend: {
|
|
19
|
+
type: "mcp";
|
|
20
|
+
transport: CapletServerConfig["transport"];
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
startupTimeoutMs: number;
|
|
23
|
+
callTimeoutMs: number;
|
|
24
|
+
toolCacheTtlMs: number;
|
|
25
|
+
} | {
|
|
26
|
+
type: "openapi";
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
requestTimeoutMs: number;
|
|
29
|
+
operationCacheTtlMs: number;
|
|
30
|
+
source: "specPath" | "specUrl";
|
|
31
|
+
} | {
|
|
32
|
+
type: "graphql";
|
|
33
|
+
disabled: boolean;
|
|
34
|
+
requestTimeoutMs: number;
|
|
35
|
+
operationCacheTtlMs: number;
|
|
36
|
+
source: "schemaPath" | "schemaUrl" | "introspection";
|
|
37
|
+
configuredOperations: boolean;
|
|
38
|
+
} | {
|
|
39
|
+
type: "http";
|
|
40
|
+
disabled: boolean;
|
|
41
|
+
requestTimeoutMs: number;
|
|
42
|
+
configuredActions: number;
|
|
43
|
+
} | {
|
|
44
|
+
type: "cli";
|
|
45
|
+
disabled: boolean;
|
|
46
|
+
timeoutMs: number;
|
|
47
|
+
maxOutputBytes: number;
|
|
48
|
+
configuredActions: number;
|
|
49
|
+
} | {
|
|
50
|
+
type: "caplets";
|
|
51
|
+
disabled: boolean;
|
|
52
|
+
source: "configPath" | "capletsRoot" | "both";
|
|
53
|
+
toolCacheTtlMs: number;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
export declare class ServerRegistry {
|
|
57
|
+
readonly config: CapletsConfig;
|
|
58
|
+
private readonly statuses;
|
|
59
|
+
constructor(config: CapletsConfig);
|
|
60
|
+
enabledServers(): CapletConfig[];
|
|
61
|
+
get(serverId: string): CapletConfig | undefined;
|
|
62
|
+
require(serverId: string): CapletConfig;
|
|
63
|
+
setStatus(serverId: string, status: ServerStatus, lastError?: SafeErrorSummary): void;
|
|
64
|
+
getStatus(serverId: string): ServerStatus;
|
|
65
|
+
summary(server: CapletConfig): CapletServerSummary;
|
|
66
|
+
detail(server: CapletConfig): CapletServerDetail;
|
|
67
|
+
private allCaplets;
|
|
68
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
export type TextContentBlock = {
|
|
3
|
+
type: "text";
|
|
4
|
+
text: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function structuredOnlyContent(): [];
|
|
7
|
+
export declare function textContent(text: string): TextContentBlock[];
|
|
8
|
+
export declare function compactJsonText(value: unknown, maxLength?: number): string;
|
|
9
|
+
export declare function compactText(value: string, maxLength?: number): string;
|
|
10
|
+
export declare function resultKeys(value: unknown): string;
|
|
11
|
+
export declare function statusSummary(value: unknown): string;
|
|
12
|
+
export declare function compactStructuredContent(value: unknown): TextContentBlock[];
|
|
13
|
+
export declare function compactCallToolResultContent(result: CallToolResult): TextContentBlock[];
|
|
14
|
+
export declare function byteLimitHint(maxBytes: number): string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import type { Transport } from "@modelcontextprotocol/sdk/shared/transport.js";
|
|
3
|
+
import { type CapletsConfig } from "./config";
|
|
4
|
+
type ToolServer = Pick<McpServer, "registerTool" | "connect" | "close">;
|
|
5
|
+
type CapletsRuntimeOptions = {
|
|
6
|
+
configPath?: string;
|
|
7
|
+
projectConfigPath?: string;
|
|
8
|
+
authDir?: string;
|
|
9
|
+
watchDebounceMs?: number;
|
|
10
|
+
server?: ToolServer;
|
|
11
|
+
writeErr?: (value: string) => void;
|
|
12
|
+
};
|
|
13
|
+
export declare class CapletsRuntime {
|
|
14
|
+
readonly server: ToolServer;
|
|
15
|
+
private readonly engine;
|
|
16
|
+
private readonly tools;
|
|
17
|
+
private readonly unsubscribeReload;
|
|
18
|
+
constructor(options?: CapletsRuntimeOptions);
|
|
19
|
+
connect(transport: Transport): Promise<void>;
|
|
20
|
+
scheduleReload(): void;
|
|
21
|
+
reload(): Promise<boolean>;
|
|
22
|
+
close(): Promise<void>;
|
|
23
|
+
currentConfig(): CapletsConfig;
|
|
24
|
+
registeredToolIds(): string[];
|
|
25
|
+
watchedPaths(): string[];
|
|
26
|
+
private reconcileTools;
|
|
27
|
+
private registerCapletTool;
|
|
28
|
+
private handleTool;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function schemaHash(schema: unknown | undefined): string | null;
|
package/dist/tools.d.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
3
|
+
import type { CapletSetManager } from "./caplet-sets";
|
|
4
|
+
import type { CapletConfig } from "./config";
|
|
5
|
+
import type { CliToolsManager } from "./cli-tools";
|
|
6
|
+
import type { DownstreamManager } from "./downstream";
|
|
7
|
+
import type { GraphQLManager } from "./graphql";
|
|
8
|
+
import type { HttpActionManager } from "./http-actions";
|
|
9
|
+
import type { OpenApiManager } from "./openapi";
|
|
10
|
+
import type { ServerRegistry } from "./registry";
|
|
11
|
+
export declare const generatedToolInputSchema: z.ZodObject<{
|
|
12
|
+
operation: z.ZodEnum<{
|
|
13
|
+
get_caplet: "get_caplet";
|
|
14
|
+
check_backend: "check_backend";
|
|
15
|
+
list_tools: "list_tools";
|
|
16
|
+
search_tools: "search_tools";
|
|
17
|
+
get_tool: "get_tool";
|
|
18
|
+
call_tool: "call_tool";
|
|
19
|
+
}>;
|
|
20
|
+
query: z.ZodOptional<z.ZodString>;
|
|
21
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
tool: z.ZodOptional<z.ZodString>;
|
|
23
|
+
arguments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
24
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
export type GeneratedServerToolRequest = z.infer<typeof generatedToolInputSchema>;
|
|
27
|
+
export declare function handleServerTool(server: CapletConfig, request: unknown, registry: ServerRegistry, downstream: DownstreamManager, openapi?: OpenApiManager, graphql?: GraphQLManager, http?: HttpActionManager, cli?: CliToolsManager, caplets?: CapletSetManager): Promise<any>;
|
|
28
|
+
export declare function validateOperationRequest(request: unknown, maxSearchLimit: number): RequiredOperationRequest;
|
|
29
|
+
type RequiredOperationRequest = {
|
|
30
|
+
operation: "get_caplet" | "check_backend";
|
|
31
|
+
} | {
|
|
32
|
+
operation: "list_tools";
|
|
33
|
+
limit?: number;
|
|
34
|
+
} | {
|
|
35
|
+
operation: "search_tools";
|
|
36
|
+
query: string;
|
|
37
|
+
limit?: number;
|
|
38
|
+
} | {
|
|
39
|
+
operation: "get_tool";
|
|
40
|
+
tool: string;
|
|
41
|
+
} | {
|
|
42
|
+
operation: "call_tool";
|
|
43
|
+
tool: string;
|
|
44
|
+
arguments: Record<string, unknown>;
|
|
45
|
+
fields?: string[];
|
|
46
|
+
};
|
|
47
|
+
export type CapletArtifact = {
|
|
48
|
+
kind: "screenshot" | "snapshot" | "console-log" | "network-log" | "file";
|
|
49
|
+
displayPath: string;
|
|
50
|
+
pathResolution: "absolute" | "relative-to-mcp-server";
|
|
51
|
+
};
|
|
52
|
+
export type CapletResultMetadata = {
|
|
53
|
+
id: string;
|
|
54
|
+
name: string;
|
|
55
|
+
backend: string;
|
|
56
|
+
operation: RequiredOperationRequest["operation"];
|
|
57
|
+
tool?: string;
|
|
58
|
+
status: "ok" | "error";
|
|
59
|
+
elapsedMs?: number;
|
|
60
|
+
artifacts?: CapletArtifact[];
|
|
61
|
+
};
|
|
62
|
+
export declare function metadataFor(server: CapletConfig, operation: RequiredOperationRequest["operation"], tool?: string, startedAt?: number): CapletResultMetadata;
|
|
63
|
+
export declare function jsonResult(value: unknown, metadata?: CapletResultMetadata): CallToolResult;
|
|
64
|
+
export declare function annotateCallToolResult<T extends object>(result: T, metadata: CapletResultMetadata): T & CallToolResult;
|
|
65
|
+
export declare function projectCallToolResult<T extends object>(result: T, outputSchema: unknown, fields: string[]): T & CallToolResult;
|
|
66
|
+
export declare function extractArtifacts(result: unknown): CapletArtifact[];
|
|
67
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caplets/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Core runtime library for Caplets progressive disclosure gateways.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"caplets",
|
|
@@ -21,14 +21,24 @@
|
|
|
21
21
|
"directory": "packages/core"
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
|
-
"dist"
|
|
24
|
+
"dist",
|
|
25
|
+
"README.md"
|
|
25
26
|
],
|
|
26
27
|
"type": "module",
|
|
27
28
|
"main": "dist/index.js",
|
|
28
29
|
"exports": {
|
|
29
|
-
".":
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"default": "./dist/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./generated-tool-input-schema": {
|
|
35
|
+
"types": "./dist/generated-tool-input-schema.d.ts",
|
|
36
|
+
"default": "./dist/generated-tool-input-schema.js"
|
|
37
|
+
},
|
|
38
|
+
"./native": {
|
|
39
|
+
"types": "./dist/native.d.ts",
|
|
40
|
+
"default": "./dist/native.js"
|
|
41
|
+
}
|
|
32
42
|
},
|
|
33
43
|
"publishConfig": {
|
|
34
44
|
"access": "public"
|
|
@@ -43,8 +53,9 @@
|
|
|
43
53
|
"zod": "^4.4.3"
|
|
44
54
|
},
|
|
45
55
|
"devDependencies": {
|
|
46
|
-
"@types/node": "^25.
|
|
47
|
-
"
|
|
56
|
+
"@types/node": "^25.9.0",
|
|
57
|
+
"@typescript/native-preview": "7.0.0-dev.20260518.1",
|
|
58
|
+
"rolldown": "^1.0.1",
|
|
48
59
|
"typescript": "^6.0.3",
|
|
49
60
|
"vitest": "^4.1.6"
|
|
50
61
|
},
|
|
@@ -52,9 +63,9 @@
|
|
|
52
63
|
"node": ">=22"
|
|
53
64
|
},
|
|
54
65
|
"scripts": {
|
|
55
|
-
"build": "rm -rf dist && rolldown -c",
|
|
66
|
+
"build": "rm -rf dist && rolldown -c && tsc -p tsconfig.build.json",
|
|
56
67
|
"build:watch": "rolldown -c --watch",
|
|
57
|
-
"typecheck": "
|
|
68
|
+
"typecheck": "tsgo --noEmit",
|
|
58
69
|
"test": "vitest run"
|
|
59
70
|
}
|
|
60
71
|
}
|