@rolino/mcp 0.5.0-beta.0 → 0.5.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/index.cjs CHANGED
@@ -48,7 +48,7 @@ var z = __toESM(require("zod/v4"), 1);
48
48
  // package.json
49
49
  var package_default = {
50
50
  name: "@rolino/mcp",
51
- version: "0.5.0-beta.0",
51
+ version: "0.5.0",
52
52
  description: "Model Context Protocol server for Rolino",
53
53
  type: "module",
54
54
  license: "MIT",
@@ -107,9 +107,9 @@ var package_default = {
107
107
  dependencies: {
108
108
  "@hono/node-server": "2.0.12",
109
109
  "@modelcontextprotocol/sdk": "^1.30.0",
110
- "@rolino/contracts": "0.5.0-beta.0",
111
- "@rolino/local-auth": "0.5.0-beta.0",
112
- "@rolino/sdk": "0.5.0-beta.0",
110
+ "@rolino/contracts": "0.5.0",
111
+ "@rolino/local-auth": "0.5.0",
112
+ "@rolino/sdk": "0.5.0",
113
113
  zod: "^4.4.3"
114
114
  },
115
115
  devDependencies: {
@@ -330,6 +330,30 @@ var revalidationTestAnnotations = {
330
330
  idempotentHint: true,
331
331
  openWorldHint: true
332
332
  };
333
+ var blogImageWriteAnnotations = {
334
+ readOnlyHint: false,
335
+ destructiveHint: false,
336
+ idempotentHint: true,
337
+ openWorldHint: false
338
+ };
339
+ var blogConfirmationPreviewAnnotations = {
340
+ readOnlyHint: false,
341
+ destructiveHint: false,
342
+ idempotentHint: false,
343
+ openWorldHint: false
344
+ };
345
+ var blogConfirmedWriteAnnotations = {
346
+ readOnlyHint: false,
347
+ destructiveHint: false,
348
+ idempotentHint: true,
349
+ openWorldHint: false
350
+ };
351
+ var blogScheduleExecuteAnnotations = {
352
+ readOnlyHint: false,
353
+ destructiveHint: false,
354
+ idempotentHint: true,
355
+ openWorldHint: true
356
+ };
333
357
  function defaultClient(options) {
334
358
  return new import_sdk2.RolinoClient({
335
359
  baseUrl: options.baseUrl ?? "https://getrolino.com",
@@ -1041,6 +1065,169 @@ function createRolinoMcpServer(options = {}) {
1041
1065
  return errorResult(error);
1042
1066
  }
1043
1067
  });
1068
+ server.registerTool("generate_blog_image", {
1069
+ title: "Generate a Blog image candidate",
1070
+ description: "Requires blog:write. Queue a bounded featured-image candidate for one exact article revision. This cannot approve an image or article and cannot publish.",
1071
+ inputSchema: {
1072
+ projectId: import_contracts.SeoEntityIdSchema.describe("Exact Rolino project ID."),
1073
+ articleId: import_contracts.SeoEntityIdSchema.describe("Exact Blog article ID."),
1074
+ ...import_contracts.AgentBlogImageGenerateRequestSchema.shape
1075
+ },
1076
+ outputSchema: import_contracts.AgentBlogImageGenerationResponseSchema.shape.data,
1077
+ annotations: blogImageWriteAnnotations
1078
+ }, async ({ projectId, articleId, ...input }) => {
1079
+ try {
1080
+ return jsonResult(await blogApi().articles.generateImage(projectId, articleId, input));
1081
+ } catch (error) {
1082
+ return errorResult(error);
1083
+ }
1084
+ });
1085
+ server.registerTool("upload_blog_image", {
1086
+ title: "Upload a local Blog image candidate",
1087
+ description: "Requires blog:write. Read only one exact caller-supplied local JPEG, PNG, or WebP path and upload it for one exact article revision. This cannot approve an image or article and cannot publish.",
1088
+ inputSchema: {
1089
+ projectId: import_contracts.SeoEntityIdSchema.describe("Exact Rolino project ID."),
1090
+ articleId: import_contracts.SeoEntityIdSchema.describe("Exact Blog article ID."),
1091
+ revisionId: import_contracts.AgentBlogImageUploadPrepareRequestSchema.shape.revisionId,
1092
+ filePath: z.string().min(1).describe("Exact local path of the user-approved Blog image."),
1093
+ altText: import_contracts.AgentBlogImageUploadCompleteRequestSchema.shape.altText
1094
+ },
1095
+ outputSchema: import_contracts.AgentBlogImageSchema,
1096
+ annotations: blogImageWriteAnnotations
1097
+ }, async ({ projectId, articleId, revisionId, filePath, altText }) => {
1098
+ try {
1099
+ const absolutePath = (0, import_node_path.resolve)(filePath);
1100
+ const details = await (0, import_promises.stat)(absolutePath).catch(() => null);
1101
+ if (!details?.isFile()) throw new TypeError("The Blog image path must point to a readable file.");
1102
+ const contentTypes = { ".jpg": "image/jpeg", ".jpeg": "image/jpeg", ".png": "image/png", ".webp": "image/webp" };
1103
+ const extension = (0, import_node_path.extname)(absolutePath).toLowerCase();
1104
+ const contentType = contentTypes[extension];
1105
+ if (!contentType) throw new TypeError("Use a JPEG, PNG, or WebP Blog image.");
1106
+ const body = await (0, import_node_fs.openAsBlob)(absolutePath, { type: contentType });
1107
+ return jsonResult(await blogApi().articles.uploadImage(projectId, articleId, { revisionId, fileName: (0, import_node_path.basename)(absolutePath), contentType, fileSize: details.size, altText, body }));
1108
+ } catch (error) {
1109
+ return errorResult(error);
1110
+ }
1111
+ });
1112
+ server.registerTool("review_blog_image", {
1113
+ title: "Review a Blog image candidate",
1114
+ description: "Requires blog:write. Approve or reject one exact image version with reviewable alt text and idempotency. This does not approve the article and cannot publish.",
1115
+ inputSchema: {
1116
+ projectId: import_contracts.SeoEntityIdSchema.describe("Exact Rolino project ID."),
1117
+ articleId: import_contracts.SeoEntityIdSchema.describe("Exact Blog article ID."),
1118
+ imageId: import_contracts.SeoEntityIdSchema.describe("Exact Blog image ID."),
1119
+ ...import_contracts.AgentBlogImageReviewRequestSchema.shape
1120
+ },
1121
+ outputSchema: import_contracts.AgentBlogImageSchema,
1122
+ annotations: blogImageWriteAnnotations
1123
+ }, async ({ projectId, articleId, imageId, ...input }) => {
1124
+ try {
1125
+ return jsonResult(await blogApi().articles.reviewImage(projectId, articleId, imageId, input));
1126
+ } catch (error) {
1127
+ return errorResult(error);
1128
+ }
1129
+ });
1130
+ server.registerTool("preview_blog_revision_approval", {
1131
+ title: "Preview exact Blog revision approval",
1132
+ description: "Requires blog:approve. Validate one exact revision, its approved image bundle, live links, warnings, and bundle hash, then create a short-lived confirmation. This cannot publish.",
1133
+ inputSchema: {
1134
+ projectId: import_contracts.SeoEntityIdSchema.describe("Exact Rolino project ID."),
1135
+ articleId: import_contracts.SeoEntityIdSchema.describe("Exact Blog article ID."),
1136
+ ...import_contracts.AgentBlogApprovalPreviewRequestSchema.shape
1137
+ },
1138
+ outputSchema: import_contracts.AgentBlogApprovalPreviewSchema,
1139
+ annotations: blogConfirmationPreviewAnnotations
1140
+ }, async ({ projectId, articleId, ...input }) => {
1141
+ try {
1142
+ return jsonResult(await blogApi().articles.previewApproval(projectId, articleId, input));
1143
+ } catch (error) {
1144
+ return errorResult(error);
1145
+ }
1146
+ });
1147
+ server.registerTool("execute_blog_revision_approval", {
1148
+ title: "Approve an exact Blog revision bundle",
1149
+ description: "Requires blog:approve. Consume the matching confirmation and idempotently approve the exact revision and image bundle, which makes that bundle eligible for a separate publication operation. This cannot publish.",
1150
+ inputSchema: {
1151
+ projectId: import_contracts.SeoEntityIdSchema.describe("Exact Rolino project ID."),
1152
+ articleId: import_contracts.SeoEntityIdSchema.describe("Exact Blog article ID."),
1153
+ ...import_contracts.AgentBlogApprovalExecuteRequestSchema.shape
1154
+ },
1155
+ outputSchema: import_contracts.AgentBlogApprovalExecuteSchema,
1156
+ annotations: blogConfirmedWriteAnnotations
1157
+ }, async ({ projectId, articleId, ...input }) => {
1158
+ try {
1159
+ return jsonResult(await blogApi().articles.executeApproval(projectId, articleId, input));
1160
+ } catch (error) {
1161
+ return errorResult(error);
1162
+ }
1163
+ });
1164
+ server.registerTool("preview_blog_schedule", {
1165
+ title: "Preview an exact Blog schedule",
1166
+ description: "Requires blog:publish. Bind one already-approved exact bundle, future instant, IANA timezone, and destination set to a short-lived confirmation. This does not grant approval or publish now.",
1167
+ inputSchema: {
1168
+ projectId: import_contracts.SeoEntityIdSchema.describe("Exact Rolino project ID."),
1169
+ articleId: import_contracts.SeoEntityIdSchema.describe("Exact Blog article ID."),
1170
+ ...import_contracts.AgentBlogSchedulePreviewRequestSchema.shape
1171
+ },
1172
+ outputSchema: import_contracts.AgentBlogSchedulePreviewSchema,
1173
+ annotations: blogConfirmationPreviewAnnotations
1174
+ }, async ({ projectId, articleId, ...input }) => {
1175
+ try {
1176
+ return jsonResult(await blogApi().articles.previewSchedule(projectId, articleId, input));
1177
+ } catch (error) {
1178
+ return errorResult(error);
1179
+ }
1180
+ });
1181
+ server.registerTool("execute_blog_schedule", {
1182
+ title: "Schedule an exact approved Blog bundle",
1183
+ description: "Requires blog:publish. Consume the matching confirmation and idempotently schedule or reschedule one already-approved exact bundle for future external publication. This does not grant approval.",
1184
+ inputSchema: {
1185
+ projectId: import_contracts.SeoEntityIdSchema.describe("Exact Rolino project ID."),
1186
+ articleId: import_contracts.SeoEntityIdSchema.describe("Exact Blog article ID."),
1187
+ ...import_contracts.AgentBlogScheduleExecuteRequestSchema.shape
1188
+ },
1189
+ outputSchema: import_contracts.AgentBlogScheduleExecuteSchema,
1190
+ annotations: blogScheduleExecuteAnnotations
1191
+ }, async ({ projectId, articleId, ...input }) => {
1192
+ try {
1193
+ return jsonResult(await blogApi().articles.executeSchedule(projectId, articleId, input));
1194
+ } catch (error) {
1195
+ return errorResult(error);
1196
+ }
1197
+ });
1198
+ server.registerTool("preview_blog_schedule_cancellation", {
1199
+ title: "Preview Blog schedule cancellation",
1200
+ description: "Requires blog:publish. Bind the exact current future schedule to a short-lived cancellation confirmation. This does not unpublish a live article and does not grant approval.",
1201
+ inputSchema: {
1202
+ projectId: import_contracts.SeoEntityIdSchema.describe("Exact Rolino project ID."),
1203
+ articleId: import_contracts.SeoEntityIdSchema.describe("Exact Blog article ID.")
1204
+ },
1205
+ outputSchema: import_contracts.AgentBlogScheduleCancelPreviewSchema,
1206
+ annotations: blogConfirmationPreviewAnnotations
1207
+ }, async ({ projectId, articleId }) => {
1208
+ try {
1209
+ return jsonResult(await blogApi().articles.previewScheduleCancellation(projectId, articleId));
1210
+ } catch (error) {
1211
+ return errorResult(error);
1212
+ }
1213
+ });
1214
+ server.registerTool("execute_blog_schedule_cancellation", {
1215
+ title: "Cancel an exact future Blog schedule",
1216
+ description: "Requires blog:publish. Consume the matching confirmation and idempotently cancel the exact future schedule. This is destructive, but it never unpublishes a live article and does not grant approval.",
1217
+ inputSchema: {
1218
+ projectId: import_contracts.SeoEntityIdSchema.describe("Exact Rolino project ID."),
1219
+ articleId: import_contracts.SeoEntityIdSchema.describe("Exact Blog article ID."),
1220
+ ...import_contracts.AgentBlogScheduleCancelExecuteRequestSchema.shape
1221
+ },
1222
+ outputSchema: import_contracts.AgentBlogScheduleCancelExecuteSchema,
1223
+ annotations: destructiveIdempotentAnnotations
1224
+ }, async ({ projectId, articleId, ...input }) => {
1225
+ try {
1226
+ return jsonResult(await blogApi().articles.executeScheduleCancellation(projectId, articleId, input));
1227
+ } catch (error) {
1228
+ return errorResult(error);
1229
+ }
1230
+ });
1044
1231
  server.registerTool("get_blog_job", {
1045
1232
  title: "Read one Blog job",
1046
1233
  description: "Read truthful durable job state without exposing prompts, provider details, or secrets.",