@caplets/core 0.21.1 → 0.23.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.
Files changed (44) hide show
  1. package/dist/auth.d.ts +2 -1
  2. package/dist/caplet-files-bundle.d.ts +66 -0
  3. package/dist/caplet-sets.d.ts +2 -0
  4. package/dist/caplet-source.js +101 -4
  5. package/dist/cli/add.d.ts +10 -0
  6. package/dist/cli/auth.d.ts +24 -0
  7. package/dist/cli/commands.d.ts +1 -1
  8. package/dist/cli.d.ts +1 -1
  9. package/dist/code-mode/diagnostics-builtins.generated.d.ts +1 -0
  10. package/dist/code-mode/platform-entry.d.ts +1 -0
  11. package/dist/code-mode/platform-host.d.ts +6 -0
  12. package/dist/code-mode/platform-runtime.generated.d.ts +1 -0
  13. package/dist/code-mode/types.d.ts +1 -0
  14. package/dist/code-mode.js +18 -13
  15. package/dist/{completion-Cb-pshjL.js → completion-BC4BNWo0.js} +14 -2
  16. package/dist/config/paths.d.ts +2 -0
  17. package/dist/config-runtime.d.ts +15 -1
  18. package/dist/config-runtime.js +46 -0
  19. package/dist/config.d.ts +32 -1
  20. package/dist/engine.d.ts +3 -0
  21. package/dist/google-discovery/index.d.ts +5 -0
  22. package/dist/google-discovery/manager.d.ts +37 -0
  23. package/dist/google-discovery/operations.d.ts +32 -0
  24. package/dist/google-discovery/request.d.ts +5 -0
  25. package/dist/google-discovery/schema.d.ts +2 -0
  26. package/dist/google-discovery/types.d.ts +70 -0
  27. package/dist/http/response.d.ts +14 -0
  28. package/dist/http-actions.d.ts +3 -0
  29. package/dist/index.js +111 -26
  30. package/dist/media/artifacts.d.ts +24 -0
  31. package/dist/media/index.d.ts +2 -0
  32. package/dist/media/input.d.ts +29 -0
  33. package/dist/native/remote.d.ts +1 -0
  34. package/dist/native/service.d.ts +2 -0
  35. package/dist/native.js +1 -1
  36. package/dist/{observed-output-shapes-CL5MFXwM.js → observed-output-shapes-D2k2-q8K.js} +9 -0
  37. package/dist/observed-output-shapes.js +1 -1
  38. package/dist/openapi.d.ts +2 -0
  39. package/dist/registry.d.ts +6 -0
  40. package/dist/runtime-plan.js +1 -1
  41. package/dist/runtime.d.ts +2 -0
  42. package/dist/{service-lkrQheFA.js → service-CSRCJfpA.js} +1776 -215
  43. package/dist/tools.d.ts +2 -1
  44. package/package.json +9 -2
@@ -0,0 +1,32 @@
1
+ type GoogleDiscoveryHttpMethod = "get" | "put" | "post" | "delete" | "patch" | "head";
2
+ export type GoogleDiscoveryOperation = {
3
+ name: string;
4
+ method: GoogleDiscoveryHttpMethod;
5
+ path: string;
6
+ description?: string;
7
+ inputSchema: Record<string, unknown>;
8
+ outputSchema?: Record<string, unknown>;
9
+ readOnlyHint: boolean;
10
+ destructiveHint: boolean;
11
+ scopes: string[];
12
+ supportsMediaUpload: boolean;
13
+ supportsMediaDownload: boolean;
14
+ mediaUpload?: {
15
+ accept?: string[];
16
+ maxSize?: string;
17
+ };
18
+ mediaUploadProtocols: Record<string, {
19
+ path?: string;
20
+ multipart?: boolean;
21
+ }>;
22
+ parameterOrder: string[];
23
+ };
24
+ export type DiscoveryOperationsOptions = {
25
+ server: string;
26
+ document: unknown;
27
+ includeOperations?: string[];
28
+ excludeOperations?: string[];
29
+ };
30
+ export declare function discoveryOperations(options: DiscoveryOperationsOptions): GoogleDiscoveryOperation[];
31
+ export declare function googleDiscoveryScopesForOperations(operations: GoogleDiscoveryOperation[]): string[];
32
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { GoogleDiscoveryApiConfig } from "../config";
2
+ import type { GoogleDiscoveryOperation } from "./operations";
3
+ export declare function buildGoogleDiscoveryUrl(api: GoogleDiscoveryApiConfig, operation: GoogleDiscoveryOperation, args: Record<string, unknown>): URL;
4
+ export declare function buildGoogleDiscoveryUploadUrl(api: GoogleDiscoveryApiConfig, operation: GoogleDiscoveryOperation, uploadPath: string, uploadType: "media" | "multipart" | "resumable", args: Record<string, unknown>): URL;
5
+ export declare function buildJsonRequestInit(operation: GoogleDiscoveryOperation, args: Record<string, unknown>, headers: Headers): RequestInit;
@@ -0,0 +1,2 @@
1
+ import type { GoogleDiscoverySchema } from "./types";
2
+ export declare function googleDiscoverySchemaToJsonSchema(value: GoogleDiscoverySchema | undefined, schemas?: Record<string, GoogleDiscoverySchema>, seen?: Set<string>): Record<string, unknown>;
@@ -0,0 +1,70 @@
1
+ export type GoogleDiscoveryDocument = {
2
+ kind?: string;
3
+ id?: string;
4
+ name?: string;
5
+ version?: string;
6
+ title?: string;
7
+ rootUrl?: string;
8
+ servicePath?: string;
9
+ baseUrl?: string;
10
+ auth?: {
11
+ oauth2?: {
12
+ scopes?: Record<string, {
13
+ description?: string;
14
+ }>;
15
+ };
16
+ };
17
+ parameters?: Record<string, GoogleDiscoveryParameter>;
18
+ schemas?: Record<string, GoogleDiscoverySchema>;
19
+ methods?: Record<string, GoogleDiscoveryMethod>;
20
+ resources?: Record<string, GoogleDiscoveryResource>;
21
+ };
22
+ export type GoogleDiscoveryResource = {
23
+ methods?: Record<string, GoogleDiscoveryMethod>;
24
+ resources?: Record<string, GoogleDiscoveryResource>;
25
+ };
26
+ export type GoogleDiscoveryMethod = {
27
+ id?: string;
28
+ path?: string;
29
+ flatPath?: string;
30
+ httpMethod?: string;
31
+ description?: string;
32
+ parameters?: Record<string, GoogleDiscoveryParameter>;
33
+ parameterOrder?: string[];
34
+ request?: {
35
+ $ref?: string;
36
+ };
37
+ response?: {
38
+ $ref?: string;
39
+ };
40
+ scopes?: string[];
41
+ supportsMediaUpload?: boolean;
42
+ supportsMediaDownload?: boolean;
43
+ mediaUpload?: {
44
+ accept?: string[];
45
+ maxSize?: string;
46
+ protocols?: Record<string, {
47
+ path?: string;
48
+ multipart?: boolean;
49
+ }>;
50
+ };
51
+ };
52
+ export type GoogleDiscoveryParameter = GoogleDiscoverySchema & {
53
+ location?: "path" | "query" | "header" | "body" | "media";
54
+ required?: boolean;
55
+ repeated?: boolean;
56
+ deprecated?: boolean;
57
+ };
58
+ export type GoogleDiscoverySchema = {
59
+ id?: string;
60
+ $ref?: string;
61
+ type?: string;
62
+ format?: string;
63
+ description?: string;
64
+ default?: unknown;
65
+ enum?: string[];
66
+ repeated?: boolean;
67
+ properties?: Record<string, GoogleDiscoverySchema>;
68
+ items?: GoogleDiscoverySchema;
69
+ additionalProperties?: GoogleDiscoverySchema | boolean;
70
+ };
@@ -0,0 +1,14 @@
1
+ import type { MediaArtifact } from "../media";
2
+ export type ReadHttpLikeResponseOptions = {
3
+ capletId: string;
4
+ method?: string;
5
+ artifactDir?: string;
6
+ outputPath?: string;
7
+ filename?: string;
8
+ maxInlineBytes?: number;
9
+ maxBytes?: number;
10
+ forceArtifact?: boolean;
11
+ exposeLocalPath?: boolean;
12
+ };
13
+ export declare function readHttpLikeResponse(response: Response, options: ReadHttpLikeResponseOptions): Promise<Record<string, unknown>>;
14
+ export type { MediaArtifact };
@@ -7,6 +7,9 @@ export declare class HttpActionManager {
7
7
  private readonly options;
8
8
  constructor(registry: ServerRegistry, options?: {
9
9
  authDir?: string;
10
+ artifactDir?: string;
11
+ exposeLocalArtifactPaths?: boolean;
12
+ maxInlineBytes?: number;
10
13
  });
11
14
  updateRegistry(registry: ServerRegistry): void;
12
15
  invalidate(_serverId: string): void;
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { $ as loadGlobalConfig, $t as ListRootsResultSchema, A as codeModeRunParamsSchema, At as assertToolsCallTaskCapability, B as generateCodeModeRunToolDescription, Bt as CreateTaskResultSchema, C as nativeCapletPromptGuidance, Ct as resolveCapletsRoot, D as nativeCodeModeToolId, Dt as ReadBuffer, Et as resolveProjectConfigPath, F as listCodeModeCallableCaplets, Ft as CallToolRequestSchema, G as directResourceUriMatchesTemplate, Gt as GetPromptRequestSchema, H as CapletsEngine, Ht as ElicitResultSchema, I as CodeModeLogStore, It as CallToolResultSchema, J as handleServerTool, Jt as JSONRPCMessageSchema, K as findProjectRoot, Kt as InitializeRequestSchema, L as redactCodeModeLogText, Lt as CompleteRequestSchema, M as QuickJsCodeModeSandbox, Mt as Protocol, N as diagnoseCodeModeTypeScript, Nt as mergeCapabilities, Ot as serializeMessage, P as createCodeModeCapletsApi, Pt as toJsonSchemaCompat, Q as loadConfigWithSources, Qt as ListResourcesRequestSchema, R as codeModeDeclarationHash, Rt as CreateMessageResultSchema, S as resolveCapletsServer, St as defaultStateBaseDir, T as nativeCapletToolName, Tt as resolveProjectCapletsRoot, U as resolveExposure, Ut as EmptyResultSchema, V as minifyCodeModeDeclarationText, W as decodeDirectResourceUri, Wt as ErrorCode, X as capabilityDescription, Xt as ListPromptsRequestSchema, Y as ServerRegistry, Yt as LATEST_PROTOCOL_VERSION, Z as loadConfig, Zt as ListResourceTemplatesRequestSchema, _ as resolveHostedCloudRemote, _n as isZ4Schema, a as projectBindingError, an as SetLevelRequestSchema, at as loadCapletFilesFromMap, b as parseServerBaseUrl, bn as safeParse, bt as defaultCacheBaseDir, c as cloudAuthPath, cn as isInitializeRequest, ct as markdownStructuredContent, d as CloudAuthClient, dn as isJSONRPCResultResponse, dt as runOAuthFlow, en as ListToolsRequestSchema, et as loadLocalOverlayConfigWithSources, fn as getLiteralValue, ft as startGenericOAuthFlow, g as resolveCapletsRemote, gn as isSchemaOptional, gt as readTokenBundle, hn as getSchemaDescription, ht as isTokenBundleExpired, i as ProjectBindingError, in as SUPPORTED_PROTOCOL_VERSIONS, it as validateCapletFile, j as runCodeMode, jt as AjvJsonSchemaValidator, k as codeModeRunInputSchema, kt as assertClientRequestTaskCapability, l as migrateCredentials, ln as isJSONRPCErrorResponse, lt as refreshOAuthTokenBundle, m as buildProjectSyncManifest, mn as getParseErrorMessage, mt as deleteTokenBundle, n as resolveRemoteSelection, nn as McpError, nt as parseConfig, o as projectBindingRecovery, on as assertCompleteRequestPrompt, ot as hasRenderableStructuredContent, p as createSdkRemoteCapletsClient, pn as getObjectShape, pt as startOAuthFlow, q as fingerprintProjectRoot, qt as InitializedNotificationSchema, r as PROJECT_BINDING_ERROR_CODES, rn as ReadResourceRequestSchema, rt as discoverCapletFiles, s as CloudAuthStore, sn as assertCompleteRequestResourceTemplate, st as markdownCallToolResultContent, t as createNativeCapletsService, tn as LoggingLevelSchema, tt as loadProjectConfig, u as redactedCloudAuthStatus, un as isJSONRPCRequest, ut as runGenericOAuthFlow, v as resolveRemoteMode, vn as normalizeObjectSchema, w as nativeCapletToolDescription, wt as resolveConfigPath, x as resolveCapletsMode, xn as safeParseAsync, xt as defaultConfigBaseDir, y as controlUrlForBase, yn as objectFromShape, yt as DEFAULT_OBSERVED_OUTPUT_SHAPE_CACHE_DIR, z as generateCodeModeDeclarations, zt as CreateMessageResultWithToolsSchema } from "./service-lkrQheFA.js";
1
+ import { $ as loadConfigWithSources, $t as ListResourcesRequestSchema, A as codeModeRunParamsSchema, At as assertClientRequestTaskCapability, B as generateCodeModeRunToolDescription, Bt as CreateMessageResultWithToolsSchema, C as nativeCapletPromptGuidance, Ct as defaultStateBaseDir, D as nativeCodeModeToolId, Dt as resolveProjectConfigPath, Et as resolveProjectCapletsRoot, F as listCodeModeCallableCaplets, Ft as toJsonSchemaCompat, G as directResourceUriMatchesTemplate, Gt as ErrorCode, H as CapletsEngine, I as CodeModeLogStore, It as CallToolRequestSchema, J as handleServerTool, Jt as InitializedNotificationSchema, K as findProjectRoot, Kt as GetPromptRequestSchema, L as redactCodeModeLogText, Lt as CallToolResultSchema, M as QuickJsCodeModeSandbox, Mt as AjvJsonSchemaValidator, N as diagnoseCodeModeTypeScript, Nt as Protocol, Ot as ReadBuffer, P as createCodeModeCapletsApi, Pt as mergeCapabilities, Q as loadConfig, Qt as ListResourceTemplatesRequestSchema, R as codeModeDeclarationHash, Rt as CompleteRequestSchema, S as resolveCapletsServer, Sn as safeParseAsync, St as defaultConfigBaseDir, T as nativeCapletToolName, Tt as resolveConfigPath, U as resolveExposure, Ut as ElicitResultSchema, V as minifyCodeModeDeclarationText, Vt as CreateTaskResultSchema, W as decodeDirectResourceUri, Wt as EmptyResultSchema, X as capabilityDescription, Xt as LATEST_PROTOCOL_VERSION, Y as ServerRegistry, Yt as JSONRPCMessageSchema, Z as GoogleDiscoveryManager, Zt as ListPromptsRequestSchema, _ as resolveHostedCloudRemote, _n as isSchemaOptional, _t as readTokenBundle, a as projectBindingError, an as SUPPORTED_PROTOCOL_VERSIONS, at as validateCapletFile, b as parseServerBaseUrl, bn as objectFromShape, bt as DEFAULT_OBSERVED_OUTPUT_SHAPE_CACHE_DIR, c as cloudAuthPath, cn as assertCompleteRequestResourceTemplate, ct as markdownCallToolResultContent, d as CloudAuthClient, dn as isJSONRPCRequest, dt as runGenericOAuthFlow, en as ListRootsResultSchema, et as loadGlobalConfig, fn as isJSONRPCResultResponse, ft as runOAuthFlow, g as resolveCapletsRemote, gn as getSchemaDescription, gt as isTokenBundleExpired, hn as getParseErrorMessage, ht as deleteTokenBundle, i as ProjectBindingError, in as ReadResourceRequestSchema, it as discoverCapletFiles, j as runCodeMode, jt as assertToolsCallTaskCapability, k as codeModeRunInputSchema, kt as serializeMessage, l as migrateCredentials, ln as isInitializeRequest, lt as markdownStructuredContent, m as buildProjectSyncManifest, mn as getObjectShape, mt as startOAuthFlow, n as resolveRemoteSelection, nn as LoggingLevelSchema, nt as loadProjectConfig, o as projectBindingRecovery, on as SetLevelRequestSchema, ot as loadCapletFilesFromMap, p as createSdkRemoteCapletsClient, pn as getLiteralValue, pt as startGenericOAuthFlow, q as fingerprintProjectRoot, qt as InitializeRequestSchema, r as PROJECT_BINDING_ERROR_CODES, rn as McpError, rt as parseConfig, s as CloudAuthStore, sn as assertCompleteRequestPrompt, st as hasRenderableStructuredContent, t as createNativeCapletsService, tn as ListToolsRequestSchema, tt as loadLocalOverlayConfigWithSources, u as redactedCloudAuthStatus, un as isJSONRPCErrorResponse, ut as refreshOAuthTokenBundle, v as resolveRemoteMode, vn as isZ4Schema, w as nativeCapletToolDescription, wt as resolveCapletsRoot, x as resolveCapletsMode, xn as safeParse, xt as defaultCacheBaseDir, y as controlUrlForBase, yn as normalizeObjectSchema, z as generateCodeModeDeclarations, zt as CreateMessageResultSchema } from "./service-CSRCJfpA.js";
2
2
  import { _ as record, b as unknown, d as literal, m as object, n as ZodOptional, o as array, p as number, r as _enum, s as boolean, v as string, x as url } from "./schemas-C0PNPwjS.js";
3
3
  import { f as redactSecrets, i as SERVER_ID_PATTERN, l as CAPLETS_ERROR_CODES, p as toSafeError, u as CapletsError } from "./validation-DgxCzt-A.js";
4
4
  import { generatedToolInputJsonSchemaForCaplet, generatedToolInputSchema, generatedToolInputSchemaForCaplet } from "./generated-tool-input-schema.js";
5
- import { f as observedOutputShapeKey, g as stableJsonStringify, h as schemaHash, i as observeOutputShape, u as FileObservedOutputShapeStore } from "./observed-output-shapes-CL5MFXwM.js";
6
- import { a as formatCapletList, c as resolveCliConfigPaths, l as cliCommands$1, n as completionScript, o as formatConfigPaths, s as listCaplets, t as completeCliWords, u as completionShells } from "./completion-Cb-pshjL.js";
5
+ import { f as observedOutputShapeKey, g as stableJsonStringify, h as schemaHash, i as observeOutputShape, u as FileObservedOutputShapeStore } from "./observed-output-shapes-D2k2-q8K.js";
6
+ import { a as formatCapletList, c as resolveCliConfigPaths, l as cliCommands$1, n as completionScript, o as formatConfigPaths, s as listCaplets, t as completeCliWords, u as completionShells } from "./completion-BC4BNWo0.js";
7
7
  import { n as normalizeCapletSourcePath, t as FilesystemCapletSource } from "./filesystem-Kkg32TOJ.js";
8
8
  import { parseConfig as parseConfig$1 } from "./config-runtime.js";
9
9
  import fs, { accessSync, chmodSync, closeSync, constants, copyFileSync, cpSync, existsSync, lstatSync, mkdirSync, mkdtempSync, openSync, readFileSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, writeFileSync, writeSync } from "node:fs";
@@ -1553,7 +1553,7 @@ const EMPTY_COMPLETION_RESULT = { completion: {
1553
1553
  } };
1554
1554
  //#endregion
1555
1555
  //#region package.json
1556
- var version = "0.21.1";
1556
+ var version = "0.23.0";
1557
1557
  //#endregion
1558
1558
  //#region src/serve/session.ts
1559
1559
  var CapletsMcpSession = class {
@@ -1895,6 +1895,8 @@ function engineOptions(options) {
1895
1895
  if (options.configPath !== void 0) engineOptions.configPath = options.configPath;
1896
1896
  if (options.projectConfigPath !== void 0) engineOptions.projectConfigPath = options.projectConfigPath;
1897
1897
  if (options.authDir !== void 0) engineOptions.authDir = options.authDir;
1898
+ if (options.artifactDir !== void 0) engineOptions.artifactDir = options.artifactDir;
1899
+ if (options.exposeLocalArtifactPaths !== void 0) engineOptions.exposeLocalArtifactPaths = options.exposeLocalArtifactPaths;
1898
1900
  if (options.watchDebounceMs !== void 0) engineOptions.watchDebounceMs = options.watchDebounceMs;
1899
1901
  if (options.writeErr !== void 0) engineOptions.writeErr = options.writeErr;
1900
1902
  return engineOptions;
@@ -4994,7 +4996,7 @@ function isPackageCommand(command) {
4994
4996
  function renderCaplet(input) {
4995
4997
  const lines = [
4996
4998
  "---",
4997
- "$schema: https://caplets.dev/caplet-frontmatter.schema.json",
4999
+ "# yaml-language-server: $schema=https://caplets.dev/caplet.schema.json",
4998
5000
  `name: ${yamlString$1(input.name)}`,
4999
5001
  `description: ${yamlString$1(input.description)}`,
5000
5002
  "tags:",
@@ -5081,6 +5083,15 @@ function addOpenApiCaplet(id, options) {
5081
5083
  ["auth", authFromTokenEnv(options.tokenEnv) ?? { type: "none" }]
5082
5084
  ], options);
5083
5085
  }
5086
+ function addGoogleDiscoveryCaplet(id, options) {
5087
+ const discovery = options.discovery ?? options.discoveryUrl;
5088
+ if (!discovery) throw new CapletsError("REQUEST_INVALID", "Google Discovery Caplet requires --discovery or --discovery-url");
5089
+ return writeGeneratedCaplet(id, "Google Discovery", "googleDiscoveryApi", [
5090
+ [options.discoveryUrl ? "discoveryUrl" : isUrlLike(discovery) ? "discoveryUrl" : "discoveryPath", discovery],
5091
+ ["baseUrl", options.baseUrl],
5092
+ ["auth", authFromTokenEnv(options.tokenEnv) ?? { type: "none" }]
5093
+ ], options);
5094
+ }
5084
5095
  function addGraphqlCaplet(id, options) {
5085
5096
  if (!options.endpointUrl) throw new CapletsError("REQUEST_INVALID", "GraphQL Caplet requires --endpoint-url");
5086
5097
  if (Boolean(options.schema) === Boolean(options.introspection)) throw new CapletsError("REQUEST_INVALID", "GraphQL Caplet requires exactly one of --schema or --introspection");
@@ -5183,7 +5194,7 @@ function resolvePrintOutputPath(id, options) {
5183
5194
  }
5184
5195
  function renderLocalPaths(fields, outputDir) {
5185
5196
  return fields.map(([key, value]) => {
5186
- if (key !== "specPath" && key !== "schemaPath" || typeof value !== "string") return [key, value];
5197
+ if (key !== "specPath" && key !== "schemaPath" && key !== "discoveryPath" || typeof value !== "string") return [key, value];
5187
5198
  return [key, localPathRelativeToOutput(value, outputDir)];
5188
5199
  });
5189
5200
  }
@@ -5234,7 +5245,7 @@ function renderBackendCaplet(id, label, backend, fields) {
5234
5245
  const description = `${label} backend Caplet generated by caplets add.`;
5235
5246
  const lines = [
5236
5247
  "---",
5237
- "$schema: https://caplets.dev/caplet-frontmatter.schema.json",
5248
+ "$schema: https://caplets.dev/caplet.schema.json",
5238
5249
  `name: ${yamlString(name)}`,
5239
5250
  `description: ${yamlString(description)}`,
5240
5251
  "tags:",
@@ -5343,7 +5354,7 @@ function collectFiles(root) {
5343
5354
  //#endregion
5344
5355
  //#region src/cli/auth.ts
5345
5356
  async function loginAuth(serverId, options) {
5346
- const server = findAuthTarget(serverId, options.config ?? loadConfig(options.configPath));
5357
+ const server = await resolveAuthTarget$1(serverId, options.config ?? loadConfig(options.configPath), options.authDir);
5347
5358
  assertLoginTarget(server, serverId);
5348
5359
  try {
5349
5360
  const flowOptions = {
@@ -5376,7 +5387,7 @@ async function refreshAuth(serverId, options) {
5376
5387
  options.writeOut(`Refreshed OAuth credentials for \`${serverId}\`.\n`);
5377
5388
  }
5378
5389
  async function refreshAuthResult(serverId, options) {
5379
- const target = findAuthTarget(serverId, options.config ?? loadConfig(options.configPath));
5390
+ const target = await resolveAuthTarget$1(serverId, options.config ?? loadConfig(options.configPath), options.authDir);
5380
5391
  assertLoginTarget(target, serverId);
5381
5392
  await refreshOAuthTokenBundle(target, options.authDir);
5382
5393
  return { server: serverId };
@@ -5450,14 +5461,35 @@ function formatAuthRows(rows, format) {
5450
5461
  function findAuthTarget(serverId, config = loadConfig()) {
5451
5462
  return authTargets(config).find((server) => server.server === serverId);
5452
5463
  }
5464
+ async function resolveAuthTarget$1(serverId, config, authDir) {
5465
+ const target = findAuthTarget(serverId, config);
5466
+ if (target?.backend !== "googleDiscovery") return target;
5467
+ const api = config.googleDiscoveryApis[serverId];
5468
+ if (!api || api.auth.type !== "oauth2" && api.auth.type !== "oidc") return target;
5469
+ const manager = new GoogleDiscoveryManager(new ServerRegistry(config), authDir ? { authDir } : {});
5470
+ const baseUrl = api.baseUrl ?? await manager.resolveBaseUrl(api).catch(() => void 0) ?? api.discoveryUrl;
5471
+ return {
5472
+ ...target,
5473
+ ...baseUrl ? { baseUrl } : {},
5474
+ ...api.auth.scopes?.length ? {} : { resolvedScopes: await manager.resolveAuthScopes(api) }
5475
+ };
5476
+ }
5453
5477
  function authTargets(config) {
5454
5478
  return [
5455
5479
  ...Object.values(config.mcpServers).filter((server) => server.transport !== "stdio" && (server.auth?.type === "oauth2" || server.auth?.type === "oidc")),
5456
5480
  ...Object.values(config.openapiEndpoints).filter((endpoint) => endpoint.auth?.type === "oauth2" || endpoint.auth?.type === "oidc"),
5481
+ ...Object.values(config.googleDiscoveryApis).filter((api) => api.auth?.type === "oauth2" || api.auth?.type === "oidc").map(googleDiscoveryAuthTarget),
5457
5482
  ...Object.values(config.graphqlEndpoints).filter((endpoint) => endpoint.auth?.type === "oauth2" || endpoint.auth?.type === "oidc").map(graphQlAuthTarget),
5458
5483
  ...Object.values(config.httpApis).filter((api) => api.auth?.type === "oauth2" || api.auth?.type === "oidc").map(httpAuthTarget)
5459
5484
  ];
5460
5485
  }
5486
+ function googleDiscoveryAuthTarget(api) {
5487
+ const baseUrl = api.baseUrl ?? api.discoveryUrl;
5488
+ return {
5489
+ ...api,
5490
+ ...baseUrl ? { baseUrl } : {}
5491
+ };
5492
+ }
5461
5493
  function graphQlAuthTarget(endpoint) {
5462
5494
  return {
5463
5495
  ...endpoint,
@@ -6090,6 +6122,7 @@ function allCaplets(config) {
6090
6122
  return [
6091
6123
  ...Object.values(typed.mcpServers ?? {}),
6092
6124
  ...Object.values(typed.openapiEndpoints ?? {}),
6125
+ ...Object.values(typed.googleDiscoveryApis ?? {}),
6093
6126
  ...Object.values(typed.graphqlEndpoints ?? {}),
6094
6127
  ...Object.values(typed.httpApis ?? {}),
6095
6128
  ...Object.values(typed.cliTools ?? {}),
@@ -6690,6 +6723,7 @@ async function runCapletSetupCli(capletId, options = {}) {
6690
6723
  const caplet = Object.values({
6691
6724
  ...config.mcpServers,
6692
6725
  ...config.openapiEndpoints,
6726
+ ...config.googleDiscoveryApis,
6693
6727
  ...config.graphqlEndpoints,
6694
6728
  ...config.httpApis,
6695
6729
  ...config.cliTools,
@@ -6815,6 +6849,8 @@ async function runSetup(integration, options = {}) {
6815
6849
  if (!setupIntegrationIds.includes(integration)) return await runCapletSetupCli(integration, {
6816
6850
  ...options.yes === void 0 ? {} : { yes: options.yes },
6817
6851
  target: resolveSetupTargetKind(options),
6852
+ ...options.env?.CAPLETS_CONFIG ? { configPath: options.env.CAPLETS_CONFIG } : {},
6853
+ ...options.env?.CAPLETS_PROJECT_CONFIG ? { projectConfigPath: options.env.CAPLETS_PROJECT_CONFIG } : {},
6818
6854
  ...options.remote === void 0 && !isRemoteSetup(options) ? {} : { remote: isRemoteSetup(options) }
6819
6855
  });
6820
6856
  const result = await executeSetup(integration, options);
@@ -10666,7 +10702,7 @@ function progressiveCapletExport(entry) {
10666
10702
  inputSchema,
10667
10703
  schemaHash: schemaHash(inputSchema),
10668
10704
  capletId: entry.caplet.server,
10669
- shadowing: "forbid"
10705
+ shadowing: shadowingPolicy(entry.caplet)
10670
10706
  };
10671
10707
  }
10672
10708
  function codeModeCapletExport(entry) {
@@ -10678,7 +10714,7 @@ function codeModeCapletExport(entry) {
10678
10714
  description: entry.caplet.description,
10679
10715
  schemaHash: null,
10680
10716
  capletId: entry.caplet.server,
10681
- shadowing: "forbid"
10717
+ shadowing: shadowingPolicy(entry.caplet)
10682
10718
  };
10683
10719
  }
10684
10720
  function toolExport(entry) {
@@ -10697,7 +10733,7 @@ function toolExport(entry) {
10697
10733
  output: entry.tool.outputSchema
10698
10734
  }),
10699
10735
  capletId: entry.caplet.server,
10700
- shadowing: "forbid"
10736
+ shadowing: shadowingPolicy(entry.caplet)
10701
10737
  };
10702
10738
  }
10703
10739
  function resourceExport(entry) {
@@ -10712,7 +10748,7 @@ function resourceExport(entry) {
10712
10748
  ...typeof entry.resource.size === "number" ? { size: entry.resource.size } : {},
10713
10749
  schemaHash: null,
10714
10750
  capletId: entry.caplet.server,
10715
- shadowing: "forbid"
10751
+ shadowing: shadowingPolicy(entry.caplet)
10716
10752
  };
10717
10753
  }
10718
10754
  function resourceTemplateExport(entry) {
@@ -10726,7 +10762,7 @@ function resourceTemplateExport(entry) {
10726
10762
  ...entry.resourceTemplate.mimeType ? { mimeType: entry.resourceTemplate.mimeType } : {},
10727
10763
  schemaHash: null,
10728
10764
  capletId: entry.caplet.server,
10729
- shadowing: "forbid"
10765
+ shadowing: shadowingPolicy(entry.caplet)
10730
10766
  };
10731
10767
  }
10732
10768
  function promptExport(entry) {
@@ -10741,11 +10777,11 @@ function promptExport(entry) {
10741
10777
  inputSchema,
10742
10778
  schemaHash: schemaHash(inputSchema),
10743
10779
  capletId: entry.caplet.server,
10744
- shadowing: "forbid"
10780
+ shadowing: shadowingPolicy(entry.caplet)
10745
10781
  };
10746
10782
  }
10747
10783
  function completionExports(snapshot) {
10748
- return [...new Set([...snapshot.directPrompts.map((entry) => entry.caplet.server), ...snapshot.directResourceTemplates.map((entry) => entry.caplet.server)])].sort().map((capletId) => ({
10784
+ return [...new Map([...snapshot.directPrompts, ...snapshot.directResourceTemplates].map((entry) => [entry.caplet.server, entry.caplet])).entries()].sort(([left], [right]) => left.localeCompare(right)).map(([capletId, caplet]) => ({
10749
10785
  stableId: `completion:${capletId}`,
10750
10786
  kind: "completion",
10751
10787
  name: `${capletId}:complete`,
@@ -10753,9 +10789,12 @@ function completionExports(snapshot) {
10753
10789
  description: `MCP completion for ${capletId}.`,
10754
10790
  schemaHash: null,
10755
10791
  capletId,
10756
- shadowing: "forbid"
10792
+ shadowing: shadowingPolicy(caplet)
10757
10793
  }));
10758
10794
  }
10795
+ function shadowingPolicy(caplet) {
10796
+ return caplet.shadowing ?? "forbid";
10797
+ }
10759
10798
  function sortAttachProjectionInput(partial) {
10760
10799
  return {
10761
10800
  caplets: sortByStableId(partial.caplets),
@@ -10971,7 +11010,7 @@ async function dispatch(request, context) {
10971
11010
  async function startRemoteAuthLogin(serverId, context) {
10972
11011
  if (!context.authFlowStore || !context.controlCallbackBaseUrl) throw new CapletsError("REQUEST_INVALID", "Remote auth login is not available on this server");
10973
11012
  const config = loadConfigWithSources(context.configPath, context.projectConfigPath).config;
10974
- const target = findAuthTarget(serverId, config);
11013
+ const target = await resolveAuthTarget$1(serverId, config, context.authDir);
10975
11014
  assertLoginTarget(target, serverId);
10976
11015
  const flowId = randomUUID();
10977
11016
  const baseUrl = context.controlCallbackBaseUrl.endsWith("/") ? context.controlCallbackBaseUrl : `${context.controlCallbackBaseUrl}/`;
@@ -11040,6 +11079,16 @@ function dispatchAdd(args, context) {
11040
11079
  print: false
11041
11080
  })
11042
11081
  };
11082
+ case "google-discovery":
11083
+ case "googleDiscovery": return {
11084
+ remote: true,
11085
+ label: "Google Discovery",
11086
+ ...addGoogleDiscoveryCaplet(id, {
11087
+ ...options,
11088
+ destinationRoot: context.projectCapletsRoot,
11089
+ print: false
11090
+ })
11091
+ };
11043
11092
  case "graphql": return {
11044
11093
  remote: true,
11045
11094
  label: "GraphQL",
@@ -11058,7 +11107,7 @@ function dispatchAdd(args, context) {
11058
11107
  print: false
11059
11108
  })
11060
11109
  };
11061
- default: throw new CapletsError("REQUEST_INVALID", "add.kind must be cli, mcp, openapi, graphql, or http");
11110
+ default: throw new CapletsError("REQUEST_INVALID", "add.kind must be cli, mcp, openapi, google-discovery, googleDiscovery, graphql, or http");
11062
11111
  }
11063
11112
  }
11064
11113
  function optionalProp(key, value) {
@@ -11115,6 +11164,14 @@ function remoteAddOptions$1(kind, options) {
11115
11164
  tokenEnv: "string",
11116
11165
  force: "boolean"
11117
11166
  });
11167
+ case "google-discovery":
11168
+ case "googleDiscovery": return pickOptions(options, {
11169
+ discovery: "string",
11170
+ discoveryUrl: "string",
11171
+ baseUrl: "string",
11172
+ tokenEnv: "string",
11173
+ force: "boolean"
11174
+ });
11118
11175
  case "graphql": return pickOptions(options, {
11119
11176
  endpointUrl: "string",
11120
11177
  schema: "string",
@@ -11455,12 +11512,16 @@ function attachEventsResponse(engine, activeStreams) {
11455
11512
  } });
11456
11513
  }
11457
11514
  async function serveHttp(options, engineOptions = {}, writeErr = (value) => process.stderr.write(value)) {
11458
- const engine = new CapletsEngine(engineOptions);
11515
+ const resolvedEngineOptions = {
11516
+ exposeLocalArtifactPaths: false,
11517
+ ...engineOptions
11518
+ };
11519
+ const engine = new CapletsEngine(resolvedEngineOptions);
11459
11520
  const app = createHttpServeApp(options, engine, {
11460
11521
  writeErr,
11461
11522
  control: {
11462
- ...engineOptions,
11463
- projectCapletsRoot: projectCapletsRootForEngineOptions(engineOptions)
11523
+ ...resolvedEngineOptions,
11524
+ projectCapletsRoot: projectCapletsRootForEngineOptions(resolvedEngineOptions)
11464
11525
  }
11465
11526
  });
11466
11527
  const paths = servicePaths(options.path);
@@ -11480,12 +11541,16 @@ async function serveHttp(options, engineOptions = {}, writeErr = (value) => proc
11480
11541
  }), app, engine, writeErr);
11481
11542
  }
11482
11543
  async function serveHttpWithSessionFactory(options, createSession, writeErr = (value) => process.stderr.write(value)) {
11483
- const engine = new CapletsEngine({});
11544
+ const resolvedEngineOptions = { exposeLocalArtifactPaths: false };
11545
+ const engine = new CapletsEngine(resolvedEngineOptions);
11484
11546
  const app = createHttpServeApp(options, engine, {
11485
11547
  writeErr,
11486
11548
  exposeAttach: false,
11487
11549
  sessionFactory: createSession,
11488
- control: { projectCapletsRoot: resolveProjectCapletsRoot() }
11550
+ control: {
11551
+ ...resolvedEngineOptions,
11552
+ projectCapletsRoot: resolveProjectCapletsRoot()
11553
+ }
11489
11554
  });
11490
11555
  const paths = servicePaths(options.path);
11491
11556
  const origin = `http://${formatHost(options.host)}:${options.port}`;
@@ -11746,6 +11811,7 @@ function createAttachNativeService(options, io) {
11746
11811
  url: options.selection.remote.attachUrl,
11747
11812
  ...options.selection.remote.fetch ? { fetch: options.selection.remote.fetch } : {}
11748
11813
  }),
11814
+ exposeLocalArtifactPaths: false,
11749
11815
  ...io.writeErr ? { writeErr: io.writeErr } : {}
11750
11816
  });
11751
11817
  }
@@ -13311,6 +13377,22 @@ function createProgram(io = {}) {
13311
13377
  });
13312
13378
  writeAddResult(writeOut, `${localMutationTargetLabel(target, io)}OpenAPI`, result);
13313
13379
  });
13380
+ add.command("google-discovery").description("Add a Google Discovery API backend Caplet.").argument("<id>", "Caplet ID/display seed").option("--discovery <path-or-url>", "Google Discovery document path or URL").option("--discovery-url <url>", "remote Google Discovery document URL").option("--base-url <url>", "request base URL override").option("--token-env <ENV>", "bearer token environment variable reference").option("--project", "write to the project Caplets root").option("-g, --global", "write to the user Caplets root").option("--remote", "add through remote control").option("--print", "print generated Caplet text without writing a file").option("--output <path>", "output path").option("--force", "overwrite an existing destination file").action(async (id, options) => {
13381
+ const target = parseMutationTarget(options);
13382
+ if (target === "remote") {
13383
+ writeAddResult(writeOut, "Google Discovery", await requireRemoteClientForTarget(io).request("add", {
13384
+ kind: "googleDiscovery",
13385
+ id,
13386
+ options: remoteAddOptions(options)
13387
+ }));
13388
+ return;
13389
+ }
13390
+ const result = addGoogleDiscoveryCaplet(id, {
13391
+ ...options,
13392
+ destinationRoot: addDestinationRoot(target, currentConfigPath(), env)
13393
+ });
13394
+ writeAddResult(writeOut, `${localMutationTargetLabel(target, io)}Google Discovery`, result);
13395
+ });
13314
13396
  add.command("graphql").description("Add a GraphQL backend Caplet.").argument("<id>", "Caplet ID/display seed").option("--endpoint-url <url>", "GraphQL endpoint URL").option("--schema <path-or-url>", "GraphQL schema path or URL").option("--introspection", "load schema through endpoint introspection").option("--token-env <ENV>", "bearer token environment variable reference").option("--project", "write to the project Caplets root").option("-g, --global", "write to the user Caplets root").option("--remote", "add through remote control").option("--print", "print generated Caplet text without writing a file").option("--output <path>", "output path").option("--force", "overwrite an existing destination file").action(async (id, options) => {
13315
13397
  const target = parseMutationTarget(options);
13316
13398
  if (target === "remote") {
@@ -13951,6 +14033,7 @@ function mergePartialLocalOverlays(globalOverlay, projectOverlay) {
13951
14033
  const capletConfigKinds = [
13952
14034
  "mcpServers",
13953
14035
  "openapiEndpoints",
14036
+ "googleDiscoveryApis",
13954
14037
  "graphqlEndpoints",
13955
14038
  "httpApis",
13956
14039
  "cliTools",
@@ -13993,7 +14076,7 @@ function formatOverlaySource(kind) {
13993
14076
  return kind;
13994
14077
  }
13995
14078
  function hasEnabledCaplet(config, id) {
13996
- const caplet = config.mcpServers[id] ?? config.openapiEndpoints[id] ?? config.graphqlEndpoints[id] ?? config.httpApis[id] ?? config.cliTools[id] ?? config.capletSets[id];
14079
+ const caplet = config.mcpServers[id] ?? config.openapiEndpoints[id] ?? config.googleDiscoveryApis[id] ?? config.graphqlEndpoints[id] ?? config.httpApis[id] ?? config.cliTools[id] ?? config.capletSets[id];
13997
14080
  return Boolean(caplet && !caplet.disabled);
13998
14081
  }
13999
14082
  async function executeLocalOperation(caplet, request, io, config) {
@@ -14628,7 +14711,7 @@ function classifyCapletRuntimeRoute(caplet) {
14628
14711
  if (caplet.setup) return "process";
14629
14712
  if (caplet.backend === "cli") return "process";
14630
14713
  if (caplet.backend === "mcp") return caplet.transport === "stdio" || Boolean(caplet.command) ? "process" : "worker_safe";
14631
- if (caplet.backend === "openapi" || caplet.backend === "graphql" || caplet.backend === "http") return "worker_safe";
14714
+ if (caplet.backend === "openapi" || caplet.backend === "googleDiscovery" || caplet.backend === "graphql" || caplet.backend === "http") return "worker_safe";
14632
14715
  if (caplet.backend === "caplets") return "worker_safe";
14633
14716
  return "local_only";
14634
14717
  }
@@ -14737,6 +14820,7 @@ function capletsFromConfig(config) {
14737
14820
  return [
14738
14821
  ...Object.values(config.mcpServers),
14739
14822
  ...Object.values(config.openapiEndpoints),
14823
+ ...Object.values(config.googleDiscoveryApis ?? {}),
14740
14824
  ...Object.values(config.graphqlEndpoints),
14741
14825
  ...Object.values(config.httpApis),
14742
14826
  ...Object.values(config.cliTools),
@@ -14745,6 +14829,7 @@ function capletsFromConfig(config) {
14745
14829
  }
14746
14830
  function localReferencePaths(caplet) {
14747
14831
  if (caplet.backend === "openapi") return filterLocalReferences([caplet.specPath]);
14832
+ if (caplet.backend === "googleDiscovery") return filterLocalReferences([caplet.discoveryPath]);
14748
14833
  if (caplet.backend === "graphql") return filterLocalReferences([caplet.schemaPath, ...Object.values(caplet.operations ?? {}).map((operation) => operation.documentPath)]);
14749
14834
  if (caplet.backend === "caplets") return filterLocalReferences([caplet.configPath]);
14750
14835
  return [];
@@ -0,0 +1,24 @@
1
+ export type MediaArtifact = {
2
+ uri: string;
3
+ path?: string;
4
+ filename: string;
5
+ mimeType?: string;
6
+ byteLength: number;
7
+ sha256: string;
8
+ };
9
+ export type WriteMediaArtifactInput = {
10
+ rootDir?: string;
11
+ capletId: string;
12
+ callId?: string;
13
+ suggestedFilename?: string;
14
+ outputPath?: string;
15
+ mimeType?: string;
16
+ bytes: Uint8Array | Buffer;
17
+ exposeLocalPath?: boolean;
18
+ };
19
+ export declare function artifactUri(capletId: string, callId: string, filename: string): string;
20
+ export declare function writeMediaArtifact(input: WriteMediaArtifactInput): Promise<MediaArtifact>;
21
+ export declare function resolveMediaArtifact(uri: string, options?: {
22
+ artifactRoot?: string;
23
+ maxBytes?: number;
24
+ }): MediaArtifact;
@@ -0,0 +1,2 @@
1
+ export * from "./artifacts";
2
+ export * from "./input";
@@ -0,0 +1,29 @@
1
+ export type MediaInput = {
2
+ path: string;
3
+ artifact?: never;
4
+ dataUrl?: never;
5
+ filename?: string;
6
+ mimeType?: string;
7
+ } | {
8
+ artifact: string;
9
+ path?: never;
10
+ dataUrl?: never;
11
+ filename?: string;
12
+ mimeType?: string;
13
+ } | {
14
+ dataUrl: string;
15
+ path?: never;
16
+ artifact?: never;
17
+ filename?: string;
18
+ mimeType?: string;
19
+ };
20
+ export type ResolvedMediaInput = {
21
+ bytes: Buffer;
22
+ filename: string;
23
+ mimeType?: string;
24
+ };
25
+ export declare function readMediaInput(input: unknown, options?: {
26
+ artifactRoot?: string;
27
+ maxBytes?: number;
28
+ allowLocalPaths?: boolean;
29
+ }): Promise<ResolvedMediaInput>;
@@ -5,6 +5,7 @@ export type RemoteCapletsTool = {
5
5
  name: string;
6
6
  capletId?: string | undefined;
7
7
  sourceCapletId?: string | undefined;
8
+ shadowing?: "forbid" | "allow" | undefined;
8
9
  title?: string | undefined;
9
10
  description?: string | undefined;
10
11
  inputSchema?: unknown;
@@ -8,6 +8,7 @@ export type NativeCapletsServiceOptions = NativeCapletsServiceResolutionInput &
8
8
  configPath?: string;
9
9
  projectConfigPath?: string;
10
10
  authDir?: string;
11
+ exposeLocalArtifactPaths?: boolean;
11
12
  watchDebounceMs?: number;
12
13
  watch?: boolean;
13
14
  writeErr?: (value: string) => void;
@@ -17,6 +18,7 @@ export type NativeCapletsServiceOptions = NativeCapletsServiceResolutionInput &
17
18
  export type NativeCapletTool = {
18
19
  caplet: string;
19
20
  sourceCaplet?: string;
21
+ shadowing?: "forbid" | "allow";
20
22
  toolName: string;
21
23
  title: string;
22
24
  description: string;
package/dist/native.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as nativeCapletPromptGuidance, D as nativeCodeModeToolId, E as nativeCapletsSystemGuidance, O as nativeCodeModeToolName, T as nativeCapletToolName, f as RemoteNativeCapletsService, h as resolveNativeCapletsServiceOptions, p as createSdkRemoteCapletsClient, t as createNativeCapletsService, w as nativeCapletToolDescription } from "./service-lkrQheFA.js";
1
+ import { C as nativeCapletPromptGuidance, D as nativeCodeModeToolId, E as nativeCapletsSystemGuidance, O as nativeCodeModeToolName, T as nativeCapletToolName, f as RemoteNativeCapletsService, h as resolveNativeCapletsServiceOptions, p as createSdkRemoteCapletsClient, t as createNativeCapletsService, w as nativeCapletToolDescription } from "./service-CSRCJfpA.js";
2
2
  import { generatedToolInputJsonSchema, generatedToolInputSchema } from "./generated-tool-input-schema.js";
3
3
  //#region src/native/process-cleanup.ts
4
4
  function registerNativeCapletsProcessCleanup(service, options = {}) {
@@ -89,6 +89,15 @@ function nonSecretBackendIdentity(caplet) {
89
89
  specUrl: caplet.specUrl,
90
90
  baseUrl: caplet.baseUrl
91
91
  };
92
+ case "googleDiscovery": return {
93
+ backend: caplet.backend,
94
+ server: caplet.server,
95
+ discoveryPath: caplet.discoveryPath,
96
+ discoveryUrl: caplet.discoveryUrl,
97
+ baseUrl: caplet.baseUrl,
98
+ includeOperations: caplet.includeOperations,
99
+ excludeOperations: caplet.excludeOperations
100
+ };
92
101
  case "graphql": return {
93
102
  backend: caplet.backend,
94
103
  server: caplet.server,
@@ -1,2 +1,2 @@
1
- import { _ as OBSERVED_OUTPUT_SHAPE_LIMITS, a as parseShapeableJsonText, c as shapeType, d as backendFingerprint, f as observedOutputShapeKey, i as observeOutputShape, l as mergeJsonShapes, m as stableHash, n as extractJsonShape, o as hasTruncatedShape, p as observedOutputShapeStorageKey, r as normalizedObservableValue, s as shapeToTypeScript, t as usefulOutputSchema, u as FileObservedOutputShapeStore, v as OBSERVED_OUTPUT_SHAPE_VERSION } from "./observed-output-shapes-CL5MFXwM.js";
1
+ import { _ as OBSERVED_OUTPUT_SHAPE_LIMITS, a as parseShapeableJsonText, c as shapeType, d as backendFingerprint, f as observedOutputShapeKey, i as observeOutputShape, l as mergeJsonShapes, m as stableHash, n as extractJsonShape, o as hasTruncatedShape, p as observedOutputShapeStorageKey, r as normalizedObservableValue, s as shapeToTypeScript, t as usefulOutputSchema, u as FileObservedOutputShapeStore, v as OBSERVED_OUTPUT_SHAPE_VERSION } from "./observed-output-shapes-D2k2-q8K.js";
2
2
  export { FileObservedOutputShapeStore, OBSERVED_OUTPUT_SHAPE_LIMITS, OBSERVED_OUTPUT_SHAPE_VERSION, backendFingerprint, extractJsonShape, hasTruncatedShape, mergeJsonShapes, normalizedObservableValue, observeOutputShape, observedOutputShapeKey, observedOutputShapeStorageKey, parseShapeableJsonText, shapeToTypeScript, shapeType, stableHash, usefulOutputSchema };