agent-cms 0.1.0 → 0.3.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.
@@ -1,4 +1,4 @@
1
- import { B as encodeJson, C as findUniqueConstraintViolations, D as getLinksTargets, E as getLinkTargets, F as parseMediaGalleryReferences, I as decodeJsonIfString, N as mergeAssetWithMediaReference, P as parseMediaFieldReference, S as computeIsValid, V as FIELD_TYPE_REGISTRY, _ as extractLinkIds, a as materializeStructuredTextValue, d as getSqlMetrics, f as recordSqlMetrics, g as extractInlineBlockIds, h as extractBlockIds, l as isFieldType, o as materializeStructuredTextValues, p as withSqlMetrics, u as runBatchedQueries, w as getBlockWhitelist, x as parseFieldValidators, z as decodeJsonStringOr } from "./structured-text-service-B4xSlUg_.mjs";
1
+ import { B as encodeJson, C as findUniqueConstraintViolations, D as getLinksTargets, E as getLinkTargets, F as parseMediaGalleryReferences, I as decodeJsonIfString, N as mergeAssetWithMediaReference, P as parseMediaFieldReference, S as computeIsValid, V as FIELD_TYPE_REGISTRY, _ as extractLinkIds, a as materializeStructuredTextValue, d as getSqlMetrics, f as recordSqlMetrics, g as extractInlineBlockIds, h as extractBlockIds, l as isFieldType, o as materializeStructuredTextValues, p as withSqlMetrics, u as runBatchedQueries, w as getBlockWhitelist, x as parseFieldValidators, z as decodeJsonStringOr } from "./structured-text-service-BJkqWRkq.mjs";
2
2
  import { Effect, Layer, Logger } from "effect";
3
3
  import { SqlClient } from "@effect/sql";
4
4
  import { createSchema, createYoga } from "graphql-yoga";
@@ -5700,4 +5700,4 @@ function createGraphQLHandler(sqlLayer, options) {
5700
5700
  //#endregion
5701
5701
  export { createGraphQLHandler };
5702
5702
 
5703
- //# sourceMappingURL=handler-ClOW1ldA.mjs.map
5703
+ //# sourceMappingURL=handler-B5jgfPOY.mjs.map
@@ -0,0 +1,17 @@
1
+ import "./preview-service-C9Tmhdye.mjs";
2
+ import "./structured-text-service-BJkqWRkq.mjs";
3
+ import { t as createMcpLayer } from "./server-D0XqvDjU.mjs";
4
+ import * as HttpLayerRouter from "@effect/platform/HttpLayerRouter";
5
+ //#region src/mcp/http-transport.ts
6
+ /**
7
+ * Create a cached Web Standard handler for the Effect-native MCP server.
8
+ */
9
+ function createMcpHttpHandler(sqlLayer, options) {
10
+ const mcpLayer = createMcpLayer(sqlLayer, options);
11
+ const { handler } = HttpLayerRouter.toWebHandler(mcpLayer, { disableLogger: true });
12
+ return handler;
13
+ }
14
+ //#endregion
15
+ export { createMcpHttpHandler };
16
+
17
+ //# sourceMappingURL=http-transport-DVKhbbe1.mjs.map
package/dist/index.d.mts CHANGED
@@ -142,6 +142,10 @@ interface CmsBindings {
142
142
  r2BucketName?: string;
143
143
  /** Cloudflare account ID — needed for the R2 S3-compatible endpoint */
144
144
  cfAccountId?: string;
145
+ /** Public URL of the frontend site — used for assembling preview URLs */
146
+ siteUrl?: string;
147
+ /** Worker Loader binding for Code Mode MCP (optional — enables /mcp/codemode) */
148
+ loader?: unknown;
145
149
  }
146
150
  interface CmsHandlerConfig {
147
151
  bindings: CmsBindings;
@@ -207,6 +211,17 @@ declare function createCMSHandler(config: CmsHandlerConfig): {
207
211
  recordId: string;
208
212
  }[];
209
213
  }>;
214
+ /**
215
+ * Resolve canonical paths for all published records of a model.
216
+ * Uses the model's canonicalPathTemplate with dot-notation traversal
217
+ * for nested link fields (e.g., "/blog/{category.slug}/{slug}").
218
+ * For in-process sitemap generation when CMS and site share a Worker.
219
+ */
220
+ resolveCanonicalPaths: (modelApiKey: string) => Promise<{
221
+ id: string;
222
+ path: string;
223
+ lastmod: string;
224
+ }[]>;
210
225
  };
211
226
  //#endregion
212
227
  export { type CmsAdminClientConfig, CmsBindings, CmsHandlerConfig, type CmsHooks, type CreateEditorTokenRequest, type CreateEditorTokenResponse, type EditorMcpPrincipal, type EditorMcpProxy, type EditorMcpProxyConfig, type EditorMcpProxyPaths, type EditorTokenListItem, createCMSHandler, createCmsAdminClient, createEditorMcpProxy };