@sidecar-ai/compiler 0.1.0-alpha.10 → 0.1.0-alpha.4
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/index.d.ts +5 -15
- package/dist/index.js +299 -678
- package/dist/index.js.map +1 -1
- package/package.json +3 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BuildHost, BuildTarget, WidgetBuildConfig, JsonSchema, ToolAnnotations, ToolVisibility, ToolWidgetOptions, McpToolDescriptor, ResourceAnnotations, McpResourceDescriptor, McpResourceTemplateDescriptor, PromptArgsDefinition, McpPromptDescriptor } from '@sidecar-ai/core';
|
|
2
1
|
import { SourceFile } from 'ts-morph';
|
|
2
|
+
import { JsonSchema, ToolAnnotations, ToolVisibility, ToolWidgetOptions, McpToolDescriptor, ResourceAnnotations, McpResourceDescriptor, McpResourceTemplateDescriptor, PromptArgsDefinition, McpPromptDescriptor } from '@sidecar-ai/core';
|
|
3
3
|
|
|
4
4
|
/** Diagnostic severity surfaced by the CLI and future editor integrations. */
|
|
5
5
|
type DiagnosticSeverity = "warning" | "error";
|
|
@@ -26,9 +26,9 @@ declare function formatDiagnostic(diagnostic: SidecarDiagnostic): string;
|
|
|
26
26
|
/** Manifest and option types shared across the Sidecar compiler modules. */
|
|
27
27
|
|
|
28
28
|
/** Build target profile selected by reserved platform file suffixes. */
|
|
29
|
-
type SidecarTarget =
|
|
29
|
+
type SidecarTarget = "mcp" | "chatgpt" | "claude";
|
|
30
30
|
/** Host runtime artifact emitted for a build output. */
|
|
31
|
-
type SidecarHost =
|
|
31
|
+
type SidecarHost = "node" | "vercel";
|
|
32
32
|
/** Platform suffix chosen for a reserved tool or widget file. */
|
|
33
33
|
type SidecarSourceVariant = "shared" | "openai" | "anthropic";
|
|
34
34
|
/** Tool entry emitted into `manifest.sidecar.json`. */
|
|
@@ -92,13 +92,6 @@ type SidecarPromptManifestEntry = {
|
|
|
92
92
|
};
|
|
93
93
|
/** Serializable project config subset recorded in build manifests. */
|
|
94
94
|
type SidecarCompilerConfig = {
|
|
95
|
-
build: {
|
|
96
|
-
target?: SidecarTarget;
|
|
97
|
-
host?: SidecarHost;
|
|
98
|
-
outDir?: string;
|
|
99
|
-
plugins?: boolean;
|
|
100
|
-
widgets?: WidgetBuildConfig;
|
|
101
|
-
};
|
|
102
95
|
resources: {
|
|
103
96
|
subscribe: boolean;
|
|
104
97
|
listChanged: boolean;
|
|
@@ -145,8 +138,6 @@ type ProjectIdentity = {
|
|
|
145
138
|
description: string;
|
|
146
139
|
};
|
|
147
140
|
|
|
148
|
-
/** Static analysis for reserved server tool files. */
|
|
149
|
-
|
|
150
141
|
type AuthScopeCatalog = Record<string, {
|
|
151
142
|
id: string;
|
|
152
143
|
description: string;
|
|
@@ -160,7 +151,6 @@ declare function analyzeToolFile(sourceFile: SourceFile, rootDir: string, option
|
|
|
160
151
|
target?: SidecarTarget;
|
|
161
152
|
variant?: SidecarSourceVariant;
|
|
162
153
|
authScopes?: AuthScopeCatalog;
|
|
163
|
-
inputSchema?: JsonSchema;
|
|
164
154
|
}): SidecarToolManifestEntry;
|
|
165
155
|
|
|
166
156
|
/** Builds the MCP output, generated types, and optional plugin packages. */
|
|
@@ -188,7 +178,7 @@ declare function analyzeResourceFile(sourceFile: SourceFile, rootDir: string): S
|
|
|
188
178
|
|
|
189
179
|
/** Relative location of the generated server entrypoint inside a build output. */
|
|
190
180
|
declare const SERVER_ENTRYPOINT = "server/index.js";
|
|
191
|
-
/** Relative location of the Vercel
|
|
192
|
-
declare const VERCEL_ENTRYPOINT = "
|
|
181
|
+
/** Relative location of the optional Vercel request-handler shim. */
|
|
182
|
+
declare const VERCEL_ENTRYPOINT = "api/sidecar.js";
|
|
193
183
|
|
|
194
184
|
export { type BuildProjectOptions, CompilerError, type ProjectIdentity, SERVER_ENTRYPOINT, type SidecarCompilerConfig, type SidecarDiagnostic, type SidecarHost, type SidecarManifest, type SidecarPromptManifestEntry, type SidecarResourceManifestEntry, type SidecarResourceTemplateManifestEntry, type SidecarSourceVariant, type SidecarTarget, type SidecarToolManifestEntry, type SidecarWidgetManifestEntry, VERCEL_ENTRYPOINT, analyzeProjectConfig, analyzeProjectPrompts, analyzeProjectResources, analyzeProjectTools, analyzePromptFile, analyzeResourceFile, analyzeToolFile, buildProject, collectProjectDiagnostics, formatDiagnostic };
|