@sidecar-ai/compiler 0.1.0-alpha.0 → 0.1.0-alpha.10

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 CHANGED
@@ -1,5 +1,5 @@
1
+ import { BuildHost, BuildTarget, WidgetBuildConfig, JsonSchema, ToolAnnotations, ToolVisibility, ToolWidgetOptions, McpToolDescriptor, ResourceAnnotations, McpResourceDescriptor, McpResourceTemplateDescriptor, PromptArgsDefinition, McpPromptDescriptor } from '@sidecar-ai/core';
1
2
  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,7 +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 = "mcp" | "chatgpt" | "claude";
29
+ type SidecarTarget = BuildTarget;
30
+ /** Host runtime artifact emitted for a build output. */
31
+ type SidecarHost = BuildHost;
30
32
  /** Platform suffix chosen for a reserved tool or widget file. */
31
33
  type SidecarSourceVariant = "shared" | "openai" | "anthropic";
32
34
  /** Tool entry emitted into `manifest.sidecar.json`. */
@@ -90,6 +92,13 @@ type SidecarPromptManifestEntry = {
90
92
  };
91
93
  /** Serializable project config subset recorded in build manifests. */
92
94
  type SidecarCompilerConfig = {
95
+ build: {
96
+ target?: SidecarTarget;
97
+ host?: SidecarHost;
98
+ outDir?: string;
99
+ plugins?: boolean;
100
+ widgets?: WidgetBuildConfig;
101
+ };
93
102
  resources: {
94
103
  subscribe: boolean;
95
104
  listChanged: boolean;
@@ -109,6 +118,7 @@ type SidecarCompilerConfig = {
109
118
  type SidecarManifest = {
110
119
  version: 1;
111
120
  target: SidecarTarget;
121
+ host: SidecarHost;
112
122
  rootDir: string;
113
123
  generatedAt: string;
114
124
  config: SidecarCompilerConfig;
@@ -121,6 +131,7 @@ type SidecarManifest = {
121
131
  /** Options accepted by `buildProject()`. */
122
132
  type BuildProjectOptions = {
123
133
  rootDir: string;
134
+ host?: SidecarHost;
124
135
  outDir?: string;
125
136
  plugins?: boolean;
126
137
  strict?: boolean;
@@ -134,6 +145,8 @@ type ProjectIdentity = {
134
145
  description: string;
135
146
  };
136
147
 
148
+ /** Static analysis for reserved server tool files. */
149
+
137
150
  type AuthScopeCatalog = Record<string, {
138
151
  id: string;
139
152
  description: string;
@@ -147,6 +160,7 @@ declare function analyzeToolFile(sourceFile: SourceFile, rootDir: string, option
147
160
  target?: SidecarTarget;
148
161
  variant?: SidecarSourceVariant;
149
162
  authScopes?: AuthScopeCatalog;
163
+ inputSchema?: JsonSchema;
150
164
  }): SidecarToolManifestEntry;
151
165
 
152
166
  /** Builds the MCP output, generated types, and optional plugin packages. */
@@ -172,4 +186,9 @@ declare function analyzeProjectResources(rootDir: string): Promise<SidecarResour
172
186
  /** Analyzes one `resource.ts` source file into a compiler manifest entry. */
173
187
  declare function analyzeResourceFile(sourceFile: SourceFile, rootDir: string): SidecarResourceManifestEntry;
174
188
 
175
- export { type BuildProjectOptions, CompilerError, type ProjectIdentity, type SidecarCompilerConfig, type SidecarDiagnostic, type SidecarManifest, type SidecarPromptManifestEntry, type SidecarResourceManifestEntry, type SidecarResourceTemplateManifestEntry, type SidecarSourceVariant, type SidecarTarget, type SidecarToolManifestEntry, type SidecarWidgetManifestEntry, analyzeProjectConfig, analyzeProjectPrompts, analyzeProjectResources, analyzeProjectTools, analyzePromptFile, analyzeResourceFile, analyzeToolFile, buildProject, collectProjectDiagnostics, formatDiagnostic };
189
+ /** Relative location of the generated server entrypoint inside a build output. */
190
+ declare const SERVER_ENTRYPOINT = "server/index.js";
191
+ /** Relative location of the Vercel Build Output API function entrypoint. */
192
+ declare const VERCEL_ENTRYPOINT = "functions/api/sidecar.func/index.js";
193
+
194
+ 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 };