@rolino/mcp 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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @rolino/mcp
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5267911: Add LinkedIn member publishing as a gated provider across public contracts, SDK, CLI, and MCP workflows.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [5267911]
12
+ - @rolino/contracts@0.3.0
13
+ - @rolino/sdk@0.3.0
14
+ - @rolino/local-auth@0.3.0
15
+
16
+ ## 0.2.0
17
+
18
+ ### Minor Changes
19
+
20
+ - 7d34580: Add account-specific TikTok delivery options, explicit settings review, safe partial draft updates, provider-keyed post settings, and streamed media uploads with server-verified metadata.
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [7d34580]
25
+ - @rolino/contracts@0.2.0
26
+ - @rolino/sdk@0.2.0
27
+ - @rolino/local-auth@0.2.0
28
+
3
29
  ## 0.1.0
4
30
 
5
31
  ### Minor Changes
package/README.md CHANGED
@@ -4,9 +4,9 @@ Rolino's Model Context Protocol adapter. The first supported transport is local
4
4
  stdio and it calls the same public API used by the CLI. Remote Streamable HTTP
5
5
  remains gated by the OAuth interoperability decision in ADR 0003.
6
6
 
7
- ## Installation
8
-
9
- Local MCP remains a separate, explicit
7
+ ## Installation
8
+
9
+ Local MCP remains a separate, explicit
10
10
  installation so CLI-only users do not receive MCP runtime dependencies:
11
11
 
12
12
  ```bash
@@ -23,9 +23,9 @@ Initial tools:
23
23
  - `whoami`
24
24
  - `list_projects`
25
25
  - `get_project`
26
- - `create_project`
27
- - `list_media_assets`
28
- - `upload_media_asset`
26
+ - `create_project`
27
+ - `list_media_assets`
28
+ - `upload_media_asset`
29
29
  - `list_posts`
30
30
  - `get_post`
31
31
  - `create_draft_post`
@@ -36,30 +36,45 @@ Initial tools:
36
36
  - `preview_post_publish`
37
37
  - `execute_post_publish`
38
38
  - `list_integration_health`
39
+ - `refresh_delivery_options`
39
40
  - `list_calendar_events`
40
41
 
41
- The media tools discover reusable project assets and upload one explicitly
42
- approved local JPEG, PNG, WebP, MP4, or MOV file directly to configured
43
- storage. Uploading never creates, schedules, or publishes a post; the returned
44
- asset ID is passed into a later draft operation.
45
-
46
- The tool set includes discovery and inspection tools that are read-only.
42
+ The media tools discover reusable project assets and stream one explicitly
43
+ approved local JPEG, PNG, WebP, MP4, or MOV file directly to configured
44
+ storage. Rolino derives dimensions and video duration from the stored object.
45
+ Uploading never creates, schedules, or publishes a post; the returned
46
+ asset ID is passed into a later draft operation.
47
+
48
+ The tool set includes discovery and inspection tools that are read-only.
47
49
  `create_project` is an additive, closed-world mutation that requires
48
50
  `projects:write` and a caller-supplied idempotency key. It atomically saves the
49
51
  project and its paired brand without starting research, connecting accounts,
50
- scheduling posts, or publishing. The two draft tools can create or replace
51
- draft content but cannot schedule or publish it. Both require caller-supplied
52
+ scheduling posts, or publishing. The two draft tools can create or selectively
53
+ update draft content but cannot schedule or publish it. Omitted update fields
54
+ preserve current media, destinations, captions, and provider settings. Both require caller-supplied
52
55
  idempotency keys, and updates also require the version returned by `get_post`
53
56
  so stale writes fail safely. Every tool returns output-schema-validated
54
57
  `structuredContent` plus a JSON text fallback.
55
- YouTube drafts require exactly one stored video, explicit title/category/
56
- visibility/audience/declaration settings, and optional tags. The YOUTUBE caption
57
- override becomes the video description, with the shared caption as fallback.
58
- Unaudited Google API projects may be restricted to Private uploads; the tools
59
- do not infer audit approval from server configuration.
60
- Bluesky drafts can be text-only or contain up to four stored JPEG, PNG, or WebP
61
- images. The BLUESKY caption override accepts up to 300 graphemes, with the
62
- shared caption as fallback.
58
+ YouTube drafts require exactly one stored video, explicit title/category/
59
+ visibility/audience/declaration settings, and optional tags. The YOUTUBE caption
60
+ override becomes the video description, with the shared caption as fallback.
61
+ Unaudited Google API projects may be restricted to Private uploads; the tools
62
+ do not infer audit approval from server configuration.
63
+ Bluesky drafts can be text-only or contain up to four stored JPEG, PNG, or WebP
64
+ images. The BLUESKY caption override accepts up to 300 graphemes, with the
65
+ shared caption as fallback.
66
+ Before preparing TikTok settings, call `refresh_delivery_options`. It contacts
67
+ TikTok and returns secret-safe account choices: allowed delivery modes, exact
68
+ visibility values, interaction availability, and maximum video duration.
69
+ Direct drafts must make every declaration explicit and mark the choices
70
+ reviewed only after inspecting this result. That review is distinct from MCP
71
+ mutation consent. Changing TikTok content clears the prior review, and Rolino
72
+ never silently turns off a requested interaction.
73
+ For LinkedIn, `refresh_delivery_options` returns the connected member plus the
74
+ strict text/single-image/multi-image and JPEG/PNG limits. LinkedIn drafts can be
75
+ text-only or contain up to ten stored images, with an optional 3,000-character
76
+ LINKEDIN caption override. The connected member is always the author; Company
77
+ Page publishing is outside this contract.
63
78
  Integration health is cached and secret-safe, post
64
79
  readiness reuses Rolino's publishing checks, and calendar reads use bounded
65
80
  date windows with cursor pagination. After `rolino auth login`, configure `ROLINO_URL` and
@@ -93,17 +108,18 @@ rules block blind retries after ambiguous external results. YouTube remains
93
108
  `PREPARING` until upload and processing are provider-confirmed, and its exact
94
109
  configured visibility is reconciled before publication is reported.
95
110
 
96
- MCP tools cannot enable YouTube or Bluesky or bypass the deployment's
97
- Google/YouTube approval boundary. Self-hosted operators should complete the
98
- [YouTube operations guide](https://github.com/deifos/rolino/blob/main/docs/integrations/youtube.md)
99
- and
100
- [Bluesky operations guide](https://github.com/deifos/rolino/blob/main/docs/integrations/bluesky.md)
101
- before live testing.
111
+ MCP tools cannot enable YouTube, Bluesky, or LinkedIn or bypass a deployment's
112
+ provider approval boundary. Self-hosted operators should complete the
113
+ [YouTube operations guide](https://github.com/deifos/rolino/blob/main/docs/integrations/youtube.md)
114
+ and
115
+ [Bluesky operations guide](https://github.com/deifos/rolino/blob/main/docs/integrations/bluesky.md), and
116
+ [LinkedIn operations guide](https://github.com/deifos/rolino/blob/main/docs/integrations/linkedin.md)
117
+ before live testing.
102
118
 
103
119
  ## Support, security, and license
104
120
 
105
- Stable releases are published only after the maintainer approves the release
106
- gate. Report bugs through the
121
+ Stable releases are published only after the maintainer approves the release
122
+ gate. Report bugs through the
107
123
  [Rolino issue tracker](https://github.com/deifos/rolino/issues) and security
108
124
  issues through the repository's
109
125
  [security policy](https://github.com/deifos/rolino/security/policy).
package/dist/bin.cjs CHANGED
@@ -42,6 +42,7 @@ function resolveMcpConfiguration(env = process.env) {
42
42
  // src/index.ts
43
43
  var import_mcp = require("@modelcontextprotocol/sdk/server/mcp.js");
44
44
  var import_stdio = require("@modelcontextprotocol/sdk/server/stdio.js");
45
+ var import_node_fs = require("fs");
45
46
  var import_promises = require("fs/promises");
46
47
  var import_node_path = require("path");
47
48
  var import_contracts = require("@rolino/contracts");
@@ -51,7 +52,7 @@ var z = __toESM(require("zod/v4"), 1);
51
52
  // package.json
52
53
  var package_default = {
53
54
  name: "@rolino/mcp",
54
- version: "0.1.0",
55
+ version: "0.3.0",
55
56
  description: "Model Context Protocol server for Rolino",
56
57
  type: "module",
57
58
  license: "MIT",
@@ -110,9 +111,9 @@ var package_default = {
110
111
  dependencies: {
111
112
  "@hono/node-server": "2.0.12",
112
113
  "@modelcontextprotocol/sdk": "^1.30.0",
113
- "@rolino/contracts": "0.1.0",
114
- "@rolino/local-auth": "0.1.0",
115
- "@rolino/sdk": "0.1.0",
114
+ "@rolino/contracts": "0.3.0",
115
+ "@rolino/local-auth": "0.3.0",
116
+ "@rolino/sdk": "0.3.0",
116
117
  zod: "^4.4.3"
117
118
  },
118
119
  devDependencies: {
@@ -124,6 +125,42 @@ var package_default = {
124
125
  };
125
126
 
126
127
  // src/index.ts
128
+ var ProviderDeliveryOptionsToolSchema = z.object({
129
+ provider: import_contracts.ProviderDeliveryOptionsProviderSchema,
130
+ account: z.object({
131
+ username: z.string().nullable().optional(),
132
+ displayName: z.string().nullable(),
133
+ avatarUrl: z.string().url().nullable()
134
+ }).strict(),
135
+ health: z.object({
136
+ status: z.enum(["pass", "blocking", "unknown"]),
137
+ code: z.string().min(1),
138
+ message: z.string().min(1)
139
+ }).strict(),
140
+ checkedAt: z.string().datetime(),
141
+ allowedPostModes: z.array(z.enum(["DIRECT_POST", "MEDIA_UPLOAD"])).optional(),
142
+ visibilityOptions: z.array(z.string()).optional(),
143
+ interactions: z.object({
144
+ comment: z.object({ available: z.boolean() }).strict(),
145
+ duet: z.object({ available: z.boolean() }).strict(),
146
+ stitch: z.object({ available: z.boolean() }).strict()
147
+ }).strict().optional(),
148
+ maxVideoDurationMs: z.number().int().positive().nullable().optional(),
149
+ supportedPostTypes: z.array(z.enum(["TEXT", "SINGLE_IMAGE", "MULTI_IMAGE"])).optional(),
150
+ image: z.object({
151
+ maxItems: z.number().int().positive(),
152
+ mimeTypes: z.array(z.enum(["image/jpeg", "image/png"])),
153
+ maxPixelsExclusive: z.number().int().positive(),
154
+ maxBytes: z.number().int().positive()
155
+ }).strict().optional()
156
+ }).strict().superRefine((value, context) => {
157
+ if (!import_contracts.ProviderDeliveryOptionsSchema.safeParse(value).success) {
158
+ context.addIssue({
159
+ code: "custom",
160
+ message: "Provider delivery options do not match the canonical provider contract."
161
+ });
162
+ }
163
+ });
127
164
  var ROLINO_MCP_VERSION = package_default.version;
128
165
  var mcpDraftInputShape = {
129
166
  ...import_contracts.DraftPostInputSchema.shape,
@@ -132,12 +169,27 @@ var mcpDraftInputShape = {
132
169
  "Existing project media asset IDs. YouTube requires exactly one stored video; Bluesky accepts up to four stored JPEG, PNG, or WebP images."
133
170
  ),
134
171
  captionOverrides: import_contracts.DraftPostInputSchema.shape.captionOverrides.describe(
135
- "Optional destination text. YOUTUBE is the video description and BLUESKY is limited to 300 graphemes; when omitted, Rolino uses the shared caption."
172
+ "Optional destination text. YOUTUBE is the video description, BLUESKY is limited to 300 graphemes, and LINKEDIN is limited to 3,000 characters; when omitted, Rolino uses the shared caption."
173
+ ),
174
+ tiktokSettings: import_contracts.DraftPostInputSchema.shape.tiktokSettings.describe(
175
+ "TikTok delivery choices. First call refresh_delivery_options, then supply an explicit mode. Direct publishing requires an exact returned visibility plus yes/no choices for comments, duet, stitch, commercial content, own-brand promotion, third-party promotion, and AI-generated content. Set reviewed only after reviewing the account-specific options; this is distinct from draft mutation consent."
136
176
  ),
137
177
  youtubeSettings: import_contracts.DraftPostInputSchema.shape.youtubeSettings.describe(
138
178
  "Required with YOUTUBE: explicit title, numeric categoryId, privacyStatus, madeForKids declaration, synthetic-media disclosure, subscriber-notification choice, and tags. Unaudited Google API projects may be restricted to Private uploads."
139
179
  )
140
180
  };
181
+ var mcpDraftUpdateInputShape = {
182
+ ...import_contracts.DraftPostUpdateInputSchema.shape,
183
+ mediaAssetIds: import_contracts.DraftPostUpdateInputSchema.shape.mediaAssetIds.describe(
184
+ "Replacement ordered media asset IDs. Omit to preserve current media; pass an empty array to remove all media."
185
+ ),
186
+ platforms: import_contracts.DraftPostUpdateInputSchema.shape.platforms.describe(
187
+ "Replacement destinations. Omit to preserve current destinations; pass an empty array to remove them."
188
+ ),
189
+ tiktokSettings: import_contracts.DraftPostUpdateInputSchema.shape.tiktokSettings.describe(
190
+ "Replacement TikTok delivery choices. Omit to preserve current settings. Set reviewed only after reviewing fresh account-specific delivery options."
191
+ )
192
+ };
141
193
  var mcpScheduleExecuteOutputSchema = z.object({
142
194
  status: z.union([import_contracts.PostSchema.shape.status, z.literal("PENDING")]),
143
195
  id: import_contracts.PostSchema.shape.id.optional(),
@@ -205,6 +257,12 @@ var uploadMediaAnnotations = {
205
257
  idempotentHint: false,
206
258
  openWorldHint: true
207
259
  };
260
+ var deliveryOptionsAnnotations = {
261
+ readOnlyHint: false,
262
+ destructiveHint: false,
263
+ idempotentHint: true,
264
+ openWorldHint: true
265
+ };
208
266
  var ProjectCreateToolInputSchema = import_contracts.ProjectCreateInputSchema.safeExtend({
209
267
  idempotencyKey: z.string().min(1).max(200).describe("Stable caller-generated retry key for this exact creation.")
210
268
  });
@@ -350,8 +408,8 @@ function createRolinoMcpServer(options = {}) {
350
408
  const contentTypes = { ".jpg": "image/jpeg", ".jpeg": "image/jpeg", ".png": "image/png", ".webp": "image/webp", ".mp4": "video/mp4", ".mov": "video/quicktime" };
351
409
  const contentType = contentTypes[(0, import_node_path.extname)(absolutePath).toLowerCase()];
352
410
  if (!contentType) throw new TypeError("Use a JPEG, PNG, WebP, MP4, or MOV file.");
353
- const bytes = await (0, import_promises.readFile)(absolutePath);
354
- return jsonResult(await api.media.upload(projectId, { fileName: (0, import_node_path.basename)(absolutePath), contentType, fileSize: details.size, body: new Blob([bytes], { type: contentType }) }));
411
+ const body = await (0, import_node_fs.openAsBlob)(absolutePath, { type: contentType });
412
+ return jsonResult(await api.media.upload(projectId, { fileName: (0, import_node_path.basename)(absolutePath), contentType, fileSize: details.size, body }));
355
413
  } catch (error) {
356
414
  return errorResult(error);
357
415
  }
@@ -404,7 +462,7 @@ function createRolinoMcpServer(options = {}) {
404
462
  });
405
463
  server.registerTool("create_draft_post", {
406
464
  title: "Create Rolino draft post",
407
- description: "Create a draft in one exact project. This changes Rolino data but never schedules or publishes. A YouTube draft requires exactly one stored video plus explicit title, category, visibility, audience, disclosure, notification, and tag settings; its description uses the YOUTUBE caption override or shared caption. Unaudited Google API projects may be limited to Private uploads. Supply a stable idempotency key so retrying the same input cannot create a duplicate.",
465
+ description: "Create a draft in one exact project. This changes Rolino data but never schedules or publishes. Before a TikTok draft, refresh account-specific delivery options and mark the exact choices reviewed separately from mutation consent. A YouTube draft requires exactly one stored video plus explicit title, category, visibility, audience, disclosure, notification, and tag settings; its description uses the YOUTUBE caption override or shared caption. Unaudited Google API projects may be limited to Private uploads. Supply a stable idempotency key so retrying the same input cannot create a duplicate.",
408
466
  inputSchema: {
409
467
  projectId: z.string().min(1).describe("Exact Rolino project ID."),
410
468
  idempotencyKey: z.string().min(1).max(200).describe("Stable caller-generated retry key for this exact creation."),
@@ -424,13 +482,13 @@ function createRolinoMcpServer(options = {}) {
424
482
  });
425
483
  server.registerTool("update_draft_post", {
426
484
  title: "Update Rolino draft post",
427
- description: "Replace a draft's caption, destinations, media, and provider settings without scheduling or publishing it. YouTube still requires exactly one stored video and every explicit metadata declaration; its description uses the YOUTUBE caption override or shared caption. Read the post first and pass its current version; stale versions fail instead of overwriting another change. A stable idempotency key makes exact retries safe.",
485
+ description: "Update only the supplied draft fields without scheduling or publishing it; omitted caption, destinations, media, and provider settings are preserved. Read the post first and pass its current version; stale versions fail instead of overwriting another change. Editing TikTok content clears its prior review unless replacement settings are explicitly reviewed again. A stable idempotency key makes exact retries safe.",
428
486
  inputSchema: {
429
487
  projectId: z.string().min(1).describe("Exact Rolino project ID."),
430
488
  postId: z.string().min(1).describe("Exact Rolino draft post ID."),
431
489
  expectedVersion: z.number().int().positive().describe("Current version returned by get_post."),
432
490
  idempotencyKey: z.string().min(1).max(200).describe("Stable caller-generated retry key for this exact update."),
433
- ...mcpDraftInputShape
491
+ ...mcpDraftUpdateInputShape
434
492
  },
435
493
  outputSchema: import_contracts.PostSchema,
436
494
  annotations: updateDraftAnnotations
@@ -442,7 +500,7 @@ function createRolinoMcpServer(options = {}) {
442
500
  ...input
443
501
  }) => {
444
502
  try {
445
- const draft = import_contracts.DraftPostInputSchema.parse(input);
503
+ const draft = import_contracts.DraftPostUpdateInputSchema.parse(input);
446
504
  return jsonResult(await api.posts.update(projectId, postId, draft, {
447
505
  expectedVersion,
448
506
  idempotencyKey
@@ -592,6 +650,25 @@ function createRolinoMcpServer(options = {}) {
592
650
  return errorResult(error);
593
651
  }
594
652
  });
653
+ server.registerTool("refresh_delivery_options", {
654
+ title: "Refresh provider delivery options",
655
+ description: "Contact one connected publishing provider and return secret-safe, account-specific choices needed to prepare a compliant draft. TikTok returns account-specific video choices; LinkedIn returns its verified member and image policy. This refreshes cached provider health but never creates, schedules, or publishes a post.",
656
+ inputSchema: {
657
+ projectId: z.string().min(1).describe("Exact Rolino project ID."),
658
+ provider: import_contracts.ProviderDeliveryOptionsProviderSchema.describe("Provider whose delivery choices should be refreshed.")
659
+ },
660
+ outputSchema: ProviderDeliveryOptionsToolSchema,
661
+ annotations: deliveryOptionsAnnotations
662
+ }, async ({ projectId, provider }) => {
663
+ try {
664
+ if (!api.integrations.deliveryOptions) {
665
+ throw new TypeError("This Rolino client does not support provider delivery options.");
666
+ }
667
+ return jsonResult(await api.integrations.deliveryOptions(projectId, provider));
668
+ } catch (error) {
669
+ return errorResult(error);
670
+ }
671
+ });
595
672
  server.registerTool("list_calendar_events", {
596
673
  title: "List Rolino calendar events",
597
674
  description: "List scheduled posts and their enabled destinations in one exact project, including YouTube posts whose private early preparation has started. By default the bounded window spans 30 days in the past through 90 days ahead; provide both from and to for another range and paginate with nextCursor.",
package/dist/bin.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/configuration.ts","../src/index.ts","../package.json","../src/bin.ts"],"sourcesContent":["import { resolveCredential } from \"@rolino/local-auth\";\r\nimport { normalizeRolinoBaseUrl, parseRolinoTimeout } from \"@rolino/sdk\";\r\n\r\nexport type RolinoMcpEnvironment = Record<string, string | undefined>;\r\n\r\nexport function resolveMcpConfiguration(\r\n env: RolinoMcpEnvironment = process.env,\r\n) {\r\n const baseUrl = normalizeRolinoBaseUrl(\r\n env.ROLINO_URL ?? \"https://getrolino.com\",\r\n );\r\n const credential = resolveCredential(baseUrl, env);\r\n\r\n return {\r\n baseUrl,\r\n token: credential.token ?? undefined,\r\n timeoutMs: env.ROLINO_TIMEOUT\r\n ? parseRolinoTimeout(env.ROLINO_TIMEOUT)\r\n : undefined,\r\n credentialSource: credential.source,\r\n };\r\n}\r\n","import { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\r\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport { readFile, stat } from \"node:fs/promises\";\nimport { basename, extname, resolve } from \"node:path\";\nimport {\r\n ActorSchema,\r\n CalendarListDataSchema,\r\n DraftPostInputSchema,\r\n IntegrationHealthListDataSchema,\n MediaAssetListDataSchema,\n MediaAssetSchema,\n PostListDataSchema,\r\n PostPublishInputSchema,\r\n PostPublishPreviewSchema,\r\n PostReadinessSchema,\r\n PostScheduleInputSchema,\r\n PostSchedulePendingSchema,\r\n PostSchedulePreviewSchema,\r\n PostSchema,\r\n ProjectCreateInputSchema,\r\n ProjectListDataSchema,\r\n ProjectSchema,\r\n type Actor,\r\n type CalendarListData,\r\n type DraftPostInput,\r\n type IntegrationHealthListData,\n type MediaAsset,\n type MediaAssetListData,\n type Post,\r\n type PostListData,\r\n type PostPublishExecuteInput,\r\n type PostPublishInput,\r\n type PostPublishPreview,\r\n type PostReadiness,\r\n type PostScheduleExecuteInput,\r\n type PostScheduleExecuteResult,\r\n type PostScheduleInput,\r\n type PostSchedulePreview,\r\n type PostStatus,\r\n type Project,\r\n type ProjectCreateInput,\r\n type ProjectListData,\r\n} from \"@rolino/contracts\";\r\nimport {\r\n RolinoApiError,\r\n RolinoClient,\r\n RolinoNetworkError,\r\n} from \"@rolino/sdk\";\r\nimport * as z from \"zod/v4\";\r\nimport packageManifest from \"../package.json\" with { type: \"json\" };\r\n\r\nexport {\r\n resolveMcpConfiguration,\r\n type RolinoMcpEnvironment,\r\n} from \"./configuration.js\";\r\n\r\nexport const ROLINO_MCP_VERSION = packageManifest.version;\r\n\r\nconst mcpDraftInputShape = {\r\n ...DraftPostInputSchema.shape,\r\n platforms: DraftPostInputSchema.shape.platforms,\r\n mediaAssetIds: DraftPostInputSchema.shape.mediaAssetIds.describe(\n \"Existing project media asset IDs. YouTube requires exactly one stored video; Bluesky accepts up to four stored JPEG, PNG, or WebP images.\",\n ),\n captionOverrides: DraftPostInputSchema.shape.captionOverrides.describe(\r\n \"Optional destination text. YOUTUBE is the video description and BLUESKY is limited to 300 graphemes; when omitted, Rolino uses the shared caption.\",\n ),\r\n youtubeSettings: DraftPostInputSchema.shape.youtubeSettings.describe(\r\n \"Required with YOUTUBE: explicit title, numeric categoryId, privacyStatus, madeForKids declaration, synthetic-media disclosure, subscriber-notification choice, and tags. Unaudited Google API projects may be restricted to Private uploads.\",\r\n ),\r\n};\r\n\r\nconst mcpScheduleExecuteOutputSchema = z.object({\r\n status: z.union([PostSchema.shape.status, z.literal(\"PENDING\")]),\r\n id: PostSchema.shape.id.optional(),\r\n postId: PostSchedulePendingSchema.shape.postId.optional(),\r\n provider: PostSchedulePendingSchema.shape.provider.optional(),\r\n mutationId: PostSchedulePendingSchema.shape.mutationId.optional(),\r\n operation: PostSchedulePendingSchema.shape.operation.optional(),\r\n message: PostSchedulePendingSchema.shape.message.optional(),\r\n}).passthrough();\r\n\r\nexport type RolinoMcpApi = {\r\n whoami(): Promise<Actor>;\r\n projects: {\r\n create(\r\n input: ProjectCreateInput,\r\n request: { idempotencyKey: string },\r\n ): Promise<Project>;\r\n list(options?: { limit?: number; cursor?: string }): Promise<ProjectListData>;\r\n get(projectId: string): Promise<Project>;\r\n };\r\n posts: {\n create(\r\n projectId: string,\r\n input: DraftPostInput,\r\n request: { idempotencyKey: string },\r\n ): Promise<Post>;\r\n update(\r\n projectId: string,\r\n postId: string,\r\n input: DraftPostInput,\r\n request: { idempotencyKey: string; expectedVersion: number },\r\n ): Promise<Post>;\r\n list(\r\n projectId: string,\r\n options?: { limit?: number; cursor?: string; status?: PostStatus },\r\n ): Promise<PostListData>;\r\n get(projectId: string, postId: string): Promise<Post>;\r\n readiness(projectId: string, postId: string): Promise<PostReadiness>;\r\n previewSchedule(\r\n projectId: string,\r\n postId: string,\r\n input: PostScheduleInput,\r\n request: { expectedVersion: number },\r\n ): Promise<PostSchedulePreview>;\r\n executeSchedule(\r\n projectId: string,\r\n postId: string,\r\n input: PostScheduleExecuteInput,\r\n request: { idempotencyKey: string; expectedVersion: number },\r\n ): Promise<PostScheduleExecuteResult>;\r\n previewPublish(\r\n projectId: string,\r\n postId: string,\r\n input: PostPublishInput,\r\n request: { expectedVersion: number },\r\n ): Promise<PostPublishPreview>;\r\n executePublish(\r\n projectId: string,\r\n postId: string,\r\n input: PostPublishExecuteInput,\r\n request: { idempotencyKey: string; expectedVersion: number },\r\n ): Promise<Post>;\r\n };\n media?: {\n list(projectId: string, options?: { limit?: number; cursor?: string; type?: \"IMAGE\" | \"VIDEO\"; query?: string }): Promise<MediaAssetListData>;\n upload(projectId: string, input: { fileName: string; contentType: string; fileSize: number; body: Blob }): Promise<MediaAsset>;\n };\n integrations: {\r\n health(projectId: string): Promise<IntegrationHealthListData>;\r\n };\r\n calendar: {\r\n list(\r\n projectId: string,\r\n options?: {\r\n limit?: number;\r\n cursor?: string;\r\n from?: string;\r\n to?: string;\r\n },\r\n ): Promise<CalendarListData>;\r\n };\r\n};\r\n\r\nexport type RolinoMcpServerOptions = {\r\n client?: RolinoMcpApi;\r\n baseUrl?: string;\r\n token?: string;\r\n timeoutMs?: number;\r\n fetch?: typeof globalThis.fetch;\r\n};\r\n\r\nfunction jsonResult(structuredContent: Record<string, unknown>) {\r\n return {\r\n content: [{ type: \"text\" as const, text: JSON.stringify(structuredContent) }],\r\n structuredContent,\r\n };\r\n}\r\n\r\nfunction errorResult(error: unknown) {\r\n let body: Record<string, unknown>;\r\n if (error instanceof RolinoApiError) {\r\n body = {\r\n error: {\r\n code: error.code,\r\n message: error.message,\r\n ...(error.requestId ? { requestId: error.requestId } : {}),\r\n ...(error.retryAfterSeconds === null\r\n ? {}\r\n : { retryAfterSeconds: error.retryAfterSeconds }),\r\n },\r\n };\r\n } else if (error instanceof RolinoNetworkError) {\n body = { error: { code: error.kind, message: error.message } };\n } else if (error instanceof TypeError) {\n body = { error: { code: \"VALIDATION_ERROR\", message: error.message } };\n } else {\r\n body = {\r\n error: {\r\n code: \"INTERNAL_ERROR\",\r\n message: \"Rolino could not complete the tool call.\",\r\n },\r\n };\r\n }\r\n\r\n return {\r\n content: [{ type: \"text\" as const, text: JSON.stringify(body) }],\r\n isError: true,\r\n };\r\n}\r\n\r\nconst readOnlyAnnotations = {\r\n readOnlyHint: true,\r\n destructiveHint: false,\r\n idempotentHint: true,\r\n openWorldHint: false,\r\n} as const;\r\n\r\nconst createDraftAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: false,\r\n idempotentHint: true,\r\n openWorldHint: false,\r\n} as const;\r\n\r\nconst createProjectAnnotations = {\n readOnlyHint: false,\r\n destructiveHint: false,\r\n idempotentHint: true,\r\n openWorldHint: false,\r\n} as const;\n\nconst uploadMediaAnnotations = {\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\r\nconst ProjectCreateToolInputSchema = ProjectCreateInputSchema.safeExtend({\r\n idempotencyKey: z.string().min(1).max(200)\r\n .describe(\"Stable caller-generated retry key for this exact creation.\"),\r\n});\r\n\r\nconst updateDraftAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: true,\r\n idempotentHint: true,\r\n openWorldHint: false,\r\n} as const;\r\n\r\nconst schedulePreviewAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: false,\r\n idempotentHint: false,\r\n openWorldHint: true,\r\n} as const;\r\n\r\nconst scheduleExecuteAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: true,\r\n idempotentHint: true,\r\n openWorldHint: true,\r\n} as const;\r\n\r\nconst publishPreviewAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: false,\r\n idempotentHint: false,\r\n openWorldHint: true,\r\n} as const;\r\n\r\nconst publishExecuteAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: true,\r\n idempotentHint: true,\r\n openWorldHint: true,\r\n} as const;\r\n\r\nfunction defaultClient(options: RolinoMcpServerOptions): RolinoMcpApi {\r\n return new RolinoClient({\r\n baseUrl: options.baseUrl ?? \"https://getrolino.com\",\r\n token: options.token,\r\n timeoutMs: options.timeoutMs,\r\n fetch: options.fetch,\r\n });\r\n}\r\n\r\nexport function createRolinoMcpServer(options: RolinoMcpServerOptions = {}) {\r\n const api = options.client ?? defaultClient(options);\r\n const server = new McpServer({\r\n name: \"rolino\",\r\n version: ROLINO_MCP_VERSION,\r\n description: \"Read Rolino workspace and publishing state, prepare drafts, and schedule posts through an exact server-confirmed two-step workflow.\",\r\n });\r\n\r\n server.registerTool(\"whoami\", {\r\n title: \"Show Rolino identity\",\r\n description:\r\n \"Use this before project tools to identify the authenticated Rolino user, organization, and granted capabilities. This tool never changes Rolino data.\",\r\n inputSchema: {},\r\n outputSchema: ActorSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async () => {\r\n try {\r\n return jsonResult(await api.whoami());\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"list_projects\", {\r\n title: \"List Rolino projects\",\r\n description:\r\n \"List projects visible to the authenticated Rolino organization. Use the returned IDs with get_project; paginate with nextCursor when present. This tool never changes Rolino data.\",\r\n inputSchema: {\r\n limit: z.number().int().min(1).max(100).default(50)\r\n .describe(\"Maximum number of projects to return, from 1 to 100.\"),\r\n cursor: z.string().min(1).optional()\r\n .describe(\"Project cursor returned by a previous list_projects call.\"),\r\n },\r\n outputSchema: ProjectListDataSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ limit, cursor }) => {\r\n try {\r\n return jsonResult(await api.projects.list({ limit, cursor }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"get_project\", {\r\n title: \"Get a Rolino project\",\r\n description:\r\n \"Get one Rolino project by its exact ID after discovering it with list_projects. This tool never changes Rolino data.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n },\r\n outputSchema: ProjectSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId }) => {\r\n try {\r\n return jsonResult(await api.projects.get(projectId));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"create_project\", {\n title: \"Create a Rolino project\",\r\n description:\r\n \"Create and save one paired Rolino project and brand. This requires projects:write and changes Rolino data, but it does not research a website, connect providers, schedule, or publish. Supply a stable idempotency key so retrying the same input cannot create a duplicate; returned website URLs are normalized and may differ from the submitted string.\",\r\n inputSchema: ProjectCreateToolInputSchema,\r\n outputSchema: ProjectSchema,\r\n annotations: createProjectAnnotations,\r\n }, async ({ idempotencyKey, ...input }) => {\r\n try {\r\n return jsonResult(await api.projects.create(input, {\r\n idempotencyKey,\r\n }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\n\n server.registerTool(\"list_media_assets\", {\n title: \"List Rolino media assets\",\n description: \"List reusable images and videos in one exact project. Use this before uploading to avoid duplicates and pass returned asset IDs when creating or updating drafts. This tool never changes Rolino data.\",\n inputSchema: {\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\n limit: z.number().int().min(1).max(100).default(50),\n cursor: z.string().min(1).optional(),\n type: z.enum([\"IMAGE\", \"VIDEO\"]).optional(),\n query: z.string().trim().min(1).max(100).optional(),\n },\n outputSchema: MediaAssetListDataSchema,\n annotations: readOnlyAnnotations,\n }, async ({ projectId, limit, cursor, type, query }) => {\n try {\n if (!api.media) throw new TypeError(\"This Rolino client does not support media operations.\");\n return jsonResult(await api.media.list(projectId, { limit, cursor, type, query }));\n } catch (error) {\n return errorResult(error);\n }\n });\n\n server.registerTool(\"upload_media_asset\", {\n title: \"Upload local media to Rolino\",\n description: \"Upload one explicitly approved local JPEG, PNG, WebP, MP4, or MOV file into an exact project's reusable media library. Read only the exact path supplied for this workflow. This changes Rolino data but never creates, schedules, or publishes a post. Return the asset ID for a later draft operation.\",\n inputSchema: {\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\n filePath: z.string().min(1).describe(\"Exact local path of the user-approved media file.\"),\n },\n outputSchema: MediaAssetSchema,\n annotations: uploadMediaAnnotations,\n }, async ({ projectId, filePath }) => {\n try {\n if (!api.media) throw new TypeError(\"This Rolino client does not support media operations.\");\n const absolutePath = resolve(filePath);\n const details = await stat(absolutePath).catch(() => null);\n if (!details?.isFile()) throw new TypeError(\"The media path must point to a readable file.\");\n const contentTypes: Record<string, string> = { \".jpg\": \"image/jpeg\", \".jpeg\": \"image/jpeg\", \".png\": \"image/png\", \".webp\": \"image/webp\", \".mp4\": \"video/mp4\", \".mov\": \"video/quicktime\" };\n const contentType = contentTypes[extname(absolutePath).toLowerCase()];\n if (!contentType) throw new TypeError(\"Use a JPEG, PNG, WebP, MP4, or MOV file.\");\n const bytes = await readFile(absolutePath);\n return jsonResult(await api.media.upload(projectId, { fileName: basename(absolutePath), contentType, fileSize: details.size, body: new Blob([bytes], { type: contentType }) }));\n } catch (error) {\n return errorResult(error);\n }\n });\n\n server.registerTool(\"list_posts\", {\n title: \"List Rolino posts\",\r\n description:\r\n \"List posts in an exact Rolino project. Discover project IDs with list_projects, filter by status when useful, and paginate with nextCursor. This tool never changes Rolino data.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n limit: z.number().int().min(1).max(100).default(50)\r\n .describe(\"Maximum number of posts to return, from 1 to 100.\"),\r\n cursor: z.string().min(1).optional()\r\n .describe(\"Post cursor returned by a previous list_posts call.\"),\r\n status: z.enum([\r\n \"DRAFT\",\r\n \"SCHEDULED\",\r\n \"ACTION_REQUIRED\",\r\n \"PUBLISHING\",\r\n \"PUBLISHED\",\r\n \"PARTIALLY_PUBLISHED\",\r\n \"FAILED\",\r\n ]).optional().describe(\"Optional exact post status filter.\"),\r\n },\r\n outputSchema: PostListDataSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId, limit, cursor, status }) => {\r\n try {\r\n return jsonResult(await api.posts.list(projectId, {\r\n limit,\r\n cursor,\r\n status,\r\n }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"get_post\", {\r\n title: \"Get a Rolino post\",\r\n description:\r\n \"Get one Rolino post, including its ordered media and publication-destination status, by exact project and post IDs. This tool never changes Rolino data.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino post ID.\"),\r\n },\r\n outputSchema: PostSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId, postId }) => {\r\n try {\r\n return jsonResult(await api.posts.get(projectId, postId));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"create_draft_post\", {\r\n title: \"Create Rolino draft post\",\r\n description:\r\n \"Create a draft in one exact project. This changes Rolino data but never schedules or publishes. A YouTube draft requires exactly one stored video plus explicit title, category, visibility, audience, disclosure, notification, and tag settings; its description uses the YOUTUBE caption override or shared caption. Unaudited Google API projects may be limited to Private uploads. Supply a stable idempotency key so retrying the same input cannot create a duplicate.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n idempotencyKey: z.string().min(1).max(200)\r\n .describe(\"Stable caller-generated retry key for this exact creation.\"),\r\n ...mcpDraftInputShape,\r\n },\r\n outputSchema: PostSchema,\r\n annotations: createDraftAnnotations,\r\n }, async ({ projectId, idempotencyKey, ...input }) => {\r\n try {\r\n const draft = DraftPostInputSchema.parse(input);\r\n return jsonResult(await api.posts.create(projectId, draft, {\r\n idempotencyKey,\r\n }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"update_draft_post\", {\r\n title: \"Update Rolino draft post\",\r\n description:\r\n \"Replace a draft's caption, destinations, media, and provider settings without scheduling or publishing it. YouTube still requires exactly one stored video and every explicit metadata declaration; its description uses the YOUTUBE caption override or shared caption. Read the post first and pass its current version; stale versions fail instead of overwriting another change. A stable idempotency key makes exact retries safe.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino draft post ID.\"),\r\n expectedVersion: z.number().int().positive()\r\n .describe(\"Current version returned by get_post.\"),\r\n idempotencyKey: z.string().min(1).max(200)\r\n .describe(\"Stable caller-generated retry key for this exact update.\"),\r\n ...mcpDraftInputShape,\r\n },\r\n outputSchema: PostSchema,\r\n annotations: updateDraftAnnotations,\r\n }, async ({\r\n projectId,\r\n postId,\r\n expectedVersion,\r\n idempotencyKey,\r\n ...input\r\n }) => {\r\n try {\r\n const draft = DraftPostInputSchema.parse(input);\r\n return jsonResult(await api.posts.update(projectId, postId, draft, {\r\n expectedVersion,\r\n idempotencyKey,\r\n }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"get_post_readiness\", {\r\n title: \"Get Rolino post readiness\",\r\n description:\r\n \"Evaluate one saved post against its destinations, media, captions, settings, permissions, token timing, and cached provider health. YouTube checks cover one stored video, explicit metadata and declarations, description limits, Private-only audit restrictions, and queue-aware lead time. This is a read-only evaluation and does not refresh providers or publish content.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino post ID.\"),\r\n },\r\n outputSchema: PostReadinessSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId, postId }) => {\r\n try {\r\n return jsonResult(await api.posts.readiness(projectId, postId));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"preview_post_schedule\", {\r\n title: \"Preview a Rolino post schedule\",\r\n description:\r\n \"Validate one exact future schedule against the current post version and live provider health. A YouTube schedule must target Public and its preview explains that confirmed execution starts a private upload immediately for early processing. This contacts configured providers and creates a five-minute, single-use confirmation, but does not schedule or publish the post. Inspect the complete result before calling execute_post_schedule with identical values.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino post ID.\"),\r\n expectedVersion: z.number().int().positive()\r\n .describe(\"Current version returned by get_post.\"),\r\n ...PostScheduleInputSchema.shape,\r\n },\r\n outputSchema: PostSchedulePreviewSchema,\r\n annotations: schedulePreviewAnnotations,\r\n }, async ({ projectId, postId, expectedVersion, ...input }) => {\r\n try {\r\n return jsonResult(await api.posts.previewSchedule(\r\n projectId,\r\n postId,\r\n input,\r\n { expectedVersion },\r\n ));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"execute_post_schedule\", {\r\n title: \"Execute a confirmed Rolino post schedule\",\r\n description:\r\n \"Schedule a post only after preview_post_schedule. Pass the unchanged time, timezone, post version, and returned one-time confirmation token. For YouTube, confirmed execution begins or resumes the private upload immediately and may return PENDING until a remote schedule change is confirmed; it never means the video already published. Rolino rechecks readiness and provider health, rejects stale or mismatched confirmation, and uses the stable idempotency key for safe retries. Scheduling causes future external publishing and is consequential.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino post ID.\"),\r\n expectedVersion: z.number().int().positive()\r\n .describe(\"Same post version used by preview_post_schedule.\"),\r\n idempotencyKey: z.string().min(1).max(200)\r\n .describe(\"Stable caller-generated retry key for this exact execution.\"),\r\n confirmationToken: z.string().min(1).max(200)\r\n .describe(\"Single-use token returned by preview_post_schedule.\"),\r\n ...PostScheduleInputSchema.shape,\r\n },\r\n outputSchema: mcpScheduleExecuteOutputSchema,\r\n annotations: scheduleExecuteAnnotations,\r\n }, async ({\r\n projectId,\r\n postId,\r\n expectedVersion,\r\n idempotencyKey,\r\n confirmationToken,\r\n ...input\r\n }) => {\r\n try {\r\n return jsonResult(await api.posts.executeSchedule(\r\n projectId,\r\n postId,\r\n { ...input, confirmationToken },\r\n { expectedVersion, idempotencyKey },\r\n ));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"preview_post_publish\", {\r\n title: \"Preview immediate Rolino post publishing\",\r\n description:\r\n \"Validate exact destinations against the current post version, safe retry state, readiness, and live provider health. YouTube readiness requires one stored video and explicit metadata; the configured visibility is exact, while unaudited Google API projects may be restricted to Private. This contacts configured providers and creates a five-minute, single-use confirmation, but does not publish. Inspect the complete result before calling execute_post_publish with identical destinations.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino post ID.\"),\r\n expectedVersion: z.number().int().positive()\r\n .describe(\"Current version returned by get_post.\"),\r\n destinations: PostPublishInputSchema.shape.destinations\r\n .describe(\"Exact Instagram, TikTok, YouTube, and/or Bluesky destinations to publish now.\"),\n },\r\n outputSchema: PostPublishPreviewSchema,\r\n annotations: publishPreviewAnnotations,\r\n }, async ({ projectId, postId, expectedVersion, destinations }) => {\r\n try {\r\n return jsonResult(await api.posts.previewPublish(\r\n projectId,\r\n postId,\r\n { destinations },\r\n { expectedVersion },\r\n ));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"execute_post_publish\", {\r\n title: \"Execute confirmed immediate Rolino post publishing\",\r\n description:\r\n \"Begin external publishing only after preview_post_publish. Pass the unchanged destinations, post version, and returned one-time confirmation token. YouTube execution starts a resumable upload and remains PREPARING until provider-confirmed upload and processing complete; no queued or local state is reported as published. Rolino rechecks readiness and safe retry state, durably queues the exact destinations, rejects ambiguous prior outcomes, and uses the stable idempotency key to prevent duplicate execution. This is immediately consequential.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino post ID.\"),\r\n expectedVersion: z.number().int().positive()\r\n .describe(\"Same post version used by preview_post_publish.\"),\r\n idempotencyKey: z.string().min(1).max(200)\r\n .describe(\"Stable caller-generated retry key for this exact execution.\"),\r\n confirmationToken: z.string().min(1).max(200)\r\n .describe(\"Single-use token returned by preview_post_publish.\"),\r\n destinations: PostPublishInputSchema.shape.destinations\r\n .describe(\"Exact unchanged destinations returned by preview_post_publish.\"),\r\n },\r\n outputSchema: PostSchema,\r\n annotations: publishExecuteAnnotations,\r\n }, async ({\r\n projectId,\r\n postId,\r\n expectedVersion,\r\n idempotencyKey,\r\n confirmationToken,\r\n destinations,\r\n }) => {\r\n try {\r\n return jsonResult(await api.posts.executePublish(\r\n projectId,\r\n postId,\r\n { destinations, confirmationToken },\r\n { expectedVersion, idempotencyKey },\r\n ));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"list_integration_health\", {\r\n title: \"List Rolino publishing integration health\",\r\n description:\r\n \"List secret-safe cached health for every enabled publishing connection (Instagram, TikTok, YouTube, or Bluesky) in one exact project. This tool does not contact external providers or reveal social credentials.\",\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n },\r\n outputSchema: IntegrationHealthListDataSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId }) => {\r\n try {\r\n return jsonResult(await api.integrations.health(projectId));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"list_calendar_events\", {\r\n title: \"List Rolino calendar events\",\r\n description:\r\n \"List scheduled posts and their enabled destinations in one exact project, including YouTube posts whose private early preparation has started. By default the bounded window spans 30 days in the past through 90 days ahead; provide both from and to for another range and paginate with nextCursor.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n limit: z.number().int().min(1).max(100).default(50)\r\n .describe(\"Maximum number of calendar events to return, from 1 to 100.\"),\r\n cursor: z.string().min(1).optional()\r\n .describe(\"Opaque cursor returned by a previous list_calendar_events call.\"),\r\n from: z.iso.datetime().optional()\r\n .describe(\"Inclusive ISO-8601 window start; provide together with to.\"),\r\n to: z.iso.datetime().optional()\r\n .describe(\"Exclusive ISO-8601 window end; provide together with from.\"),\r\n },\r\n outputSchema: CalendarListDataSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId, limit, cursor, from, to }) => {\r\n try {\r\n return jsonResult(await api.calendar.list(projectId, {\r\n limit,\r\n cursor,\r\n from,\r\n to,\r\n }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n return server;\r\n}\r\n\r\nexport async function startStdioServer(options: RolinoMcpServerOptions = {}) {\r\n const server = createRolinoMcpServer(options);\r\n const transport = new StdioServerTransport();\r\n await server.connect(transport);\r\n return server;\r\n}\r\n","{\n \"name\": \"@rolino/mcp\",\n \"version\": \"0.1.0\",\n \"description\": \"Model Context Protocol server for Rolino\",\n \"type\": \"module\",\n \"license\": \"MIT\",\n \"keywords\": [\n \"rolino\",\n \"mcp\",\n \"model-context-protocol\",\n \"social-media\",\n \"ai-agent\"\n ],\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/deifos/rolino.git\",\n \"directory\": \"packages/mcp\"\n },\n \"homepage\": \"https://github.com/deifos/rolino/tree/main/packages/mcp#readme\",\n \"bugs\": {\n \"url\": \"https://github.com/deifos/rolino/issues\"\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"bin\": {\n \"rolino-mcp\": \"./dist/bin.js\"\n },\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/index.d.ts\",\n \"default\": \"./dist/index.js\"\n },\n \"require\": {\n \"types\": \"./dist/index.d.cts\",\n \"default\": \"./dist/index.cjs\"\n }\n }\n },\n \"files\": [\n \"dist/**/*.js\",\n \"dist/**/*.cjs\",\n \"dist/**/*.map\",\n \"dist/**/*.d.ts\",\n \"dist/**/*.d.cts\",\n \"README.md\",\n \"CHANGELOG.md\",\n \"LICENSE\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"scripts\": {\n \"build\": \"tsup src/index.ts src/bin.ts --format esm,cjs --dts --sourcemap --clean\",\n \"typecheck\": \"tsc --noEmit\",\n \"dev\": \"tsx src/bin.ts\"\n },\n \"dependencies\": {\n \"@hono/node-server\": \"2.0.12\",\n \"@modelcontextprotocol/sdk\": \"^1.30.0\",\n \"@rolino/contracts\": \"0.1.0\",\n \"@rolino/local-auth\": \"0.1.0\",\n \"@rolino/sdk\": \"0.1.0\",\n \"zod\": \"^4.4.3\"\n },\n \"devDependencies\": {\n \"tsx\": \"^4.21.0\"\n },\n \"engines\": {\n \"node\": \">=20.19.0\"\n }\n}\n","#!/usr/bin/env node\r\n\r\nimport { resolveMcpConfiguration } from \"./configuration.js\";\r\nimport { startStdioServer } from \"./index.js\";\r\n\r\nasync function main() {\r\n const configuration = resolveMcpConfiguration(process.env);\r\n\r\n await startStdioServer({\r\n baseUrl: configuration.baseUrl,\r\n token: configuration.token,\r\n timeoutMs: configuration.timeoutMs,\r\n });\r\n}\r\n\r\nvoid main().catch(() => {\r\n // stdout is reserved exclusively for MCP JSON-RPC messages.\r\n process.stderr.write(\r\n \"Rolino MCP could not start. Check ROLINO_URL, ROLINO_TIMEOUT, and configuration.\\n\",\r\n );\r\n process.exitCode = 1;\r\n});\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBAAkC;AAClC,iBAA2D;AAIpD,SAAS,wBACd,MAA4B,QAAQ,KACpC;AACA,QAAM,cAAU;AAAA,IACd,IAAI,cAAc;AAAA,EACpB;AACA,QAAM,iBAAa,qCAAkB,SAAS,GAAG;AAEjD,SAAO;AAAA,IACL;AAAA,IACA,OAAO,WAAW,SAAS;AAAA,IAC3B,WAAW,IAAI,qBACX,+BAAmB,IAAI,cAAc,IACrC;AAAA,IACJ,kBAAkB,WAAW;AAAA,EAC/B;AACF;;;ACrBA,iBAA0B;AAC1B,mBAAqC;AACrC,sBAA+B;AAC/B,uBAA2C;AAC3C,uBAsCO;AACP,IAAAA,cAIO;AACP,QAAmB;;;AChDnB;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,IACP,WAAa;AAAA,EACf;AAAA,EACA,UAAY;AAAA,EACZ,MAAQ;AAAA,IACN,KAAO;AAAA,EACT;AAAA,EACA,M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A0B;AAAA,MAChE,OAAS,SAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,EAAE,QAAQ,EAAE,EAC/C,SAAS,6DAA6D;AAAA,MACzE,QAAU,SAAO,EAAE,IAAI,CAAC,EAAE,SAAS,EAChC,SAAS,iEAAiE;AAAA,MAC7E,MAAQ,MAAI,SAAS,EAAE,SAAS,EAC7B,SAAS,4DAA4D;AAAA,MACxE,IAAM,MAAI,SAAS,EAAE,SAAS,EAC3B,SAAS,4DAA4D;AAAA,IAC1E;AAAA,IACA,cAAc;AAAA,IACd,aAAa;AAAA,EACf,GAAG,OAAO,EAAE,WAAW,OAAO,QAAQ,MAAM,GAAG,MAAM;AACnD,QAAI;AACF,aAAO,WAAW,MAAM,IAAI,SAAS,KAAK,WAAW;AAAA,QACnD;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,CAAC;AAAA,IACJ,SAAS,OAAO;AACd,aAAO,YAAY,KAAK;AAAA,IAC1B;AAAA,EACF,CAAC;AAED,SAAO;AACT;AAEA,eAAsB,iBAAiB,UAAkC,CAAC,GAAG;AAC3E,QAAM,SAAS,sBAAsB,OAAO;AAC5C,QAAM,YAAY,IAAI,kCAAqB;AAC3C,QAAM,OAAO,QAAQ,SAAS;AAC9B,SAAO;AACT;;;AElsBA,eAAe,OAAO;AACpB,QAAM,gBAAgB,wBAAwB,QAAQ,GAAG;AAEzD,QAAM,iBAAiB;AAAA,IACrB,SAAS,cAAc;AAAA,IACvB,OAAO,cAAc;AAAA,IACrB,WAAW,cAAc;AAAA,EAC3B,CAAC;AACH;AAEA,KAAK,KAAK,EAAE,MAAM,MAAM;AAEtB,UAAQ,OAAO;AAAA,IACb;AAAA,EACF;AACA,UAAQ,WAAW;AACrB,CAAC;","names":["import_sdk"]}
1
+ {"version":3,"sources":["../src/configuration.ts","../src/index.ts","../package.json","../src/bin.ts"],"sourcesContent":["import { resolveCredential } from \"@rolino/local-auth\";\r\nimport { normalizeRolinoBaseUrl, parseRolinoTimeout } from \"@rolino/sdk\";\r\n\r\nexport type RolinoMcpEnvironment = Record<string, string | undefined>;\r\n\r\nexport function resolveMcpConfiguration(\r\n env: RolinoMcpEnvironment = process.env,\r\n) {\r\n const baseUrl = normalizeRolinoBaseUrl(\r\n env.ROLINO_URL ?? \"https://getrolino.com\",\r\n );\r\n const credential = resolveCredential(baseUrl, env);\r\n\r\n return {\r\n baseUrl,\r\n token: credential.token ?? undefined,\r\n timeoutMs: env.ROLINO_TIMEOUT\r\n ? parseRolinoTimeout(env.ROLINO_TIMEOUT)\r\n : undefined,\r\n credentialSource: credential.source,\r\n };\r\n}\r\n","import { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\r\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\r\nimport { openAsBlob } from \"node:fs\";\r\nimport { stat } from \"node:fs/promises\";\r\nimport { basename, extname, resolve } from \"node:path\";\r\nimport {\r\n ActorSchema,\r\n CalendarListDataSchema,\r\n DraftPostInputSchema,\r\n DraftPostUpdateInputSchema,\r\n IntegrationHealthListDataSchema,\r\n MediaAssetListDataSchema,\r\n MediaAssetSchema,\r\n PostListDataSchema,\r\n PostPublishInputSchema,\r\n PostPublishPreviewSchema,\r\n PostReadinessSchema,\r\n PostScheduleInputSchema,\r\n PostSchedulePendingSchema,\r\n PostSchedulePreviewSchema,\r\n PostSchema,\r\n ProjectCreateInputSchema,\r\n ProjectListDataSchema,\r\n ProjectSchema,\r\n ProviderDeliveryOptionsProviderSchema,\r\n ProviderDeliveryOptionsSchema,\r\n type Actor,\r\n type CalendarListData,\r\n type DraftPostInput,\r\n type DraftPostUpdateInput,\r\n type IntegrationHealthListData,\r\n type MediaAsset,\r\n type MediaAssetListData,\r\n type Post,\r\n type PostListData,\r\n type PostPublishExecuteInput,\r\n type PostPublishInput,\r\n type PostPublishPreview,\r\n type PostReadiness,\r\n type PostScheduleExecuteInput,\r\n type PostScheduleExecuteResult,\r\n type PostScheduleInput,\r\n type PostSchedulePreview,\r\n type PostStatus,\r\n type Project,\r\n type ProjectCreateInput,\r\n type ProjectListData,\r\n type ProviderDeliveryOptions,\r\n type ProviderDeliveryOptionsProvider,\r\n} from \"@rolino/contracts\";\r\nimport {\r\n RolinoApiError,\r\n RolinoClient,\r\n RolinoNetworkError,\r\n} from \"@rolino/sdk\";\r\nimport * as z from \"zod/v4\";\r\nimport packageManifest from \"../package.json\" with { type: \"json\" };\r\n\r\n// MCP's tool registration requires an object-shaped output schema. Keep the\r\n// transport shape flat, then enforce the canonical discriminated contract so\r\n// provider-specific required and forbidden fields remain strict at runtime.\r\nconst ProviderDeliveryOptionsToolSchema = z.object({\r\n provider: ProviderDeliveryOptionsProviderSchema,\r\n account: z.object({\r\n username: z.string().nullable().optional(),\r\n displayName: z.string().nullable(),\r\n avatarUrl: z.string().url().nullable(),\r\n }).strict(),\r\n health: z.object({\r\n status: z.enum([\"pass\", \"blocking\", \"unknown\"]),\r\n code: z.string().min(1),\r\n message: z.string().min(1),\r\n }).strict(),\r\n checkedAt: z.string().datetime(),\r\n allowedPostModes: z.array(z.enum([\"DIRECT_POST\", \"MEDIA_UPLOAD\"])).optional(),\r\n visibilityOptions: z.array(z.string()).optional(),\r\n interactions: z.object({\r\n comment: z.object({ available: z.boolean() }).strict(),\r\n duet: z.object({ available: z.boolean() }).strict(),\r\n stitch: z.object({ available: z.boolean() }).strict(),\r\n }).strict().optional(),\r\n maxVideoDurationMs: z.number().int().positive().nullable().optional(),\r\n supportedPostTypes: z.array(z.enum([\"TEXT\", \"SINGLE_IMAGE\", \"MULTI_IMAGE\"])).optional(),\r\n image: z.object({\r\n maxItems: z.number().int().positive(),\r\n mimeTypes: z.array(z.enum([\"image/jpeg\", \"image/png\"])),\r\n maxPixelsExclusive: z.number().int().positive(),\r\n maxBytes: z.number().int().positive(),\r\n }).strict().optional(),\r\n}).strict().superRefine((value, context) => {\r\n if (!ProviderDeliveryOptionsSchema.safeParse(value).success) {\r\n context.addIssue({\r\n code: \"custom\",\r\n message: \"Provider delivery options do not match the canonical provider contract.\",\r\n });\r\n }\r\n});\r\n\r\nexport {\r\n resolveMcpConfiguration,\r\n type RolinoMcpEnvironment,\r\n} from \"./configuration.js\";\r\n\r\nexport const ROLINO_MCP_VERSION = packageManifest.version;\r\n\r\nconst mcpDraftInputShape = {\r\n ...DraftPostInputSchema.shape,\r\n platforms: DraftPostInputSchema.shape.platforms,\r\n mediaAssetIds: DraftPostInputSchema.shape.mediaAssetIds.describe(\r\n \"Existing project media asset IDs. YouTube requires exactly one stored video; Bluesky accepts up to four stored JPEG, PNG, or WebP images.\",\r\n ),\r\n captionOverrides: DraftPostInputSchema.shape.captionOverrides.describe(\r\n \"Optional destination text. YOUTUBE is the video description, BLUESKY is limited to 300 graphemes, and LINKEDIN is limited to 3,000 characters; when omitted, Rolino uses the shared caption.\",\r\n ),\r\n tiktokSettings: DraftPostInputSchema.shape.tiktokSettings.describe(\r\n \"TikTok delivery choices. First call refresh_delivery_options, then supply an explicit mode. Direct publishing requires an exact returned visibility plus yes/no choices for comments, duet, stitch, commercial content, own-brand promotion, third-party promotion, and AI-generated content. Set reviewed only after reviewing the account-specific options; this is distinct from draft mutation consent.\",\r\n ),\r\n youtubeSettings: DraftPostInputSchema.shape.youtubeSettings.describe(\r\n \"Required with YOUTUBE: explicit title, numeric categoryId, privacyStatus, madeForKids declaration, synthetic-media disclosure, subscriber-notification choice, and tags. Unaudited Google API projects may be restricted to Private uploads.\",\r\n ),\r\n};\r\n\r\nconst mcpDraftUpdateInputShape = {\r\n ...DraftPostUpdateInputSchema.shape,\r\n mediaAssetIds: DraftPostUpdateInputSchema.shape.mediaAssetIds.describe(\r\n \"Replacement ordered media asset IDs. Omit to preserve current media; pass an empty array to remove all media.\",\r\n ),\r\n platforms: DraftPostUpdateInputSchema.shape.platforms.describe(\r\n \"Replacement destinations. Omit to preserve current destinations; pass an empty array to remove them.\",\r\n ),\r\n tiktokSettings: DraftPostUpdateInputSchema.shape.tiktokSettings.describe(\r\n \"Replacement TikTok delivery choices. Omit to preserve current settings. Set reviewed only after reviewing fresh account-specific delivery options.\",\r\n ),\r\n};\r\n\r\nconst mcpScheduleExecuteOutputSchema = z.object({\r\n status: z.union([PostSchema.shape.status, z.literal(\"PENDING\")]),\r\n id: PostSchema.shape.id.optional(),\r\n postId: PostSchedulePendingSchema.shape.postId.optional(),\r\n provider: PostSchedulePendingSchema.shape.provider.optional(),\r\n mutationId: PostSchedulePendingSchema.shape.mutationId.optional(),\r\n operation: PostSchedulePendingSchema.shape.operation.optional(),\r\n message: PostSchedulePendingSchema.shape.message.optional(),\r\n}).passthrough();\r\n\r\nexport type RolinoMcpApi = {\r\n whoami(): Promise<Actor>;\r\n projects: {\r\n create(\r\n input: ProjectCreateInput,\r\n request: { idempotencyKey: string },\r\n ): Promise<Project>;\r\n list(options?: { limit?: number; cursor?: string }): Promise<ProjectListData>;\r\n get(projectId: string): Promise<Project>;\r\n };\r\n posts: {\r\n create(\r\n projectId: string,\r\n input: DraftPostInput,\r\n request: { idempotencyKey: string },\r\n ): Promise<Post>;\r\n update(\r\n projectId: string,\r\n postId: string,\r\n input: DraftPostUpdateInput,\r\n request: { idempotencyKey: string; expectedVersion: number },\r\n ): Promise<Post>;\r\n list(\r\n projectId: string,\r\n options?: { limit?: number; cursor?: string; status?: PostStatus },\r\n ): Promise<PostListData>;\r\n get(projectId: string, postId: string): Promise<Post>;\r\n readiness(projectId: string, postId: string): Promise<PostReadiness>;\r\n previewSchedule(\r\n projectId: string,\r\n postId: string,\r\n input: PostScheduleInput,\r\n request: { expectedVersion: number },\r\n ): Promise<PostSchedulePreview>;\r\n executeSchedule(\r\n projectId: string,\r\n postId: string,\r\n input: PostScheduleExecuteInput,\r\n request: { idempotencyKey: string; expectedVersion: number },\r\n ): Promise<PostScheduleExecuteResult>;\r\n previewPublish(\r\n projectId: string,\r\n postId: string,\r\n input: PostPublishInput,\r\n request: { expectedVersion: number },\r\n ): Promise<PostPublishPreview>;\r\n executePublish(\r\n projectId: string,\r\n postId: string,\r\n input: PostPublishExecuteInput,\r\n request: { idempotencyKey: string; expectedVersion: number },\r\n ): Promise<Post>;\r\n };\r\n media?: {\r\n list(projectId: string, options?: { limit?: number; cursor?: string; type?: \"IMAGE\" | \"VIDEO\"; query?: string }): Promise<MediaAssetListData>;\r\n upload(projectId: string, input: { fileName: string; contentType: string; fileSize: number; body: Blob }): Promise<MediaAsset>;\r\n };\r\n integrations: {\r\n health(projectId: string): Promise<IntegrationHealthListData>;\r\n deliveryOptions?(projectId: string, provider: ProviderDeliveryOptionsProvider): Promise<ProviderDeliveryOptions>;\r\n };\r\n calendar: {\r\n list(\r\n projectId: string,\r\n options?: {\r\n limit?: number;\r\n cursor?: string;\r\n from?: string;\r\n to?: string;\r\n },\r\n ): Promise<CalendarListData>;\r\n };\r\n};\r\n\r\nexport type RolinoMcpServerOptions = {\r\n client?: RolinoMcpApi;\r\n baseUrl?: string;\r\n token?: string;\r\n timeoutMs?: number;\r\n fetch?: typeof globalThis.fetch;\r\n};\r\n\r\nfunction jsonResult(structuredContent: Record<string, unknown>) {\r\n return {\r\n content: [{ type: \"text\" as const, text: JSON.stringify(structuredContent) }],\r\n structuredContent,\r\n };\r\n}\r\n\r\nfunction errorResult(error: unknown) {\r\n let body: Record<string, unknown>;\r\n if (error instanceof RolinoApiError) {\r\n body = {\r\n error: {\r\n code: error.code,\r\n message: error.message,\r\n ...(error.requestId ? { requestId: error.requestId } : {}),\r\n ...(error.retryAfterSeconds === null\r\n ? {}\r\n : { retryAfterSeconds: error.retryAfterSeconds }),\r\n },\r\n };\r\n } else if (error instanceof RolinoNetworkError) {\r\n body = { error: { code: error.kind, message: error.message } };\r\n } else if (error instanceof TypeError) {\r\n body = { error: { code: \"VALIDATION_ERROR\", message: error.message } };\r\n } else {\r\n body = {\r\n error: {\r\n code: \"INTERNAL_ERROR\",\r\n message: \"Rolino could not complete the tool call.\",\r\n },\r\n };\r\n }\r\n\r\n return {\r\n content: [{ type: \"text\" as const, text: JSON.stringify(body) }],\r\n isError: true,\r\n };\r\n}\r\n\r\nconst readOnlyAnnotations = {\r\n readOnlyHint: true,\r\n destructiveHint: false,\r\n idempotentHint: true,\r\n openWorldHint: false,\r\n} as const;\r\n\r\nconst createDraftAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: false,\r\n idempotentHint: true,\r\n openWorldHint: false,\r\n} as const;\r\n\r\nconst createProjectAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: false,\r\n idempotentHint: true,\r\n openWorldHint: false,\r\n} as const;\r\n\r\nconst uploadMediaAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: false,\r\n idempotentHint: false,\r\n openWorldHint: true,\r\n} as const;\r\n\r\nconst deliveryOptionsAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: false,\r\n idempotentHint: true,\r\n openWorldHint: true,\r\n} as const;\r\n\r\nconst ProjectCreateToolInputSchema = ProjectCreateInputSchema.safeExtend({\r\n idempotencyKey: z.string().min(1).max(200)\r\n .describe(\"Stable caller-generated retry key for this exact creation.\"),\r\n});\r\n\r\nconst updateDraftAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: true,\r\n idempotentHint: true,\r\n openWorldHint: false,\r\n} as const;\r\n\r\nconst schedulePreviewAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: false,\r\n idempotentHint: false,\r\n openWorldHint: true,\r\n} as const;\r\n\r\nconst scheduleExecuteAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: true,\r\n idempotentHint: true,\r\n openWorldHint: true,\r\n} as const;\r\n\r\nconst publishPreviewAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: false,\r\n idempotentHint: false,\r\n openWorldHint: true,\r\n} as const;\r\n\r\nconst publishExecuteAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: true,\r\n idempotentHint: true,\r\n openWorldHint: true,\r\n} as const;\r\n\r\nfunction defaultClient(options: RolinoMcpServerOptions): RolinoMcpApi {\r\n return new RolinoClient({\r\n baseUrl: options.baseUrl ?? \"https://getrolino.com\",\r\n token: options.token,\r\n timeoutMs: options.timeoutMs,\r\n fetch: options.fetch,\r\n });\r\n}\r\n\r\nexport function createRolinoMcpServer(options: RolinoMcpServerOptions = {}) {\r\n const api = options.client ?? defaultClient(options);\r\n const server = new McpServer({\r\n name: \"rolino\",\r\n version: ROLINO_MCP_VERSION,\r\n description: \"Read Rolino workspace and publishing state, prepare drafts, and schedule posts through an exact server-confirmed two-step workflow.\",\r\n });\r\n\r\n server.registerTool(\"whoami\", {\r\n title: \"Show Rolino identity\",\r\n description:\r\n \"Use this before project tools to identify the authenticated Rolino user, organization, and granted capabilities. This tool never changes Rolino data.\",\r\n inputSchema: {},\r\n outputSchema: ActorSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async () => {\r\n try {\r\n return jsonResult(await api.whoami());\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"list_projects\", {\r\n title: \"List Rolino projects\",\r\n description:\r\n \"List projects visible to the authenticated Rolino organization. Use the returned IDs with get_project; paginate with nextCursor when present. This tool never changes Rolino data.\",\r\n inputSchema: {\r\n limit: z.number().int().min(1).max(100).default(50)\r\n .describe(\"Maximum number of projects to return, from 1 to 100.\"),\r\n cursor: z.string().min(1).optional()\r\n .describe(\"Project cursor returned by a previous list_projects call.\"),\r\n },\r\n outputSchema: ProjectListDataSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ limit, cursor }) => {\r\n try {\r\n return jsonResult(await api.projects.list({ limit, cursor }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"get_project\", {\r\n title: \"Get a Rolino project\",\r\n description:\r\n \"Get one Rolino project by its exact ID after discovering it with list_projects. This tool never changes Rolino data.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n },\r\n outputSchema: ProjectSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId }) => {\r\n try {\r\n return jsonResult(await api.projects.get(projectId));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"create_project\", {\r\n title: \"Create a Rolino project\",\r\n description:\r\n \"Create and save one paired Rolino project and brand. This requires projects:write and changes Rolino data, but it does not research a website, connect providers, schedule, or publish. Supply a stable idempotency key so retrying the same input cannot create a duplicate; returned website URLs are normalized and may differ from the submitted string.\",\r\n inputSchema: ProjectCreateToolInputSchema,\r\n outputSchema: ProjectSchema,\r\n annotations: createProjectAnnotations,\r\n }, async ({ idempotencyKey, ...input }) => {\r\n try {\r\n return jsonResult(await api.projects.create(input, {\r\n idempotencyKey,\r\n }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"list_media_assets\", {\r\n title: \"List Rolino media assets\",\r\n description: \"List reusable images and videos in one exact project. Use this before uploading to avoid duplicates and pass returned asset IDs when creating or updating drafts. This tool never changes Rolino data.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n limit: z.number().int().min(1).max(100).default(50),\r\n cursor: z.string().min(1).optional(),\r\n type: z.enum([\"IMAGE\", \"VIDEO\"]).optional(),\r\n query: z.string().trim().min(1).max(100).optional(),\r\n },\r\n outputSchema: MediaAssetListDataSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId, limit, cursor, type, query }) => {\r\n try {\r\n if (!api.media) throw new TypeError(\"This Rolino client does not support media operations.\");\r\n return jsonResult(await api.media.list(projectId, { limit, cursor, type, query }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"upload_media_asset\", {\r\n title: \"Upload local media to Rolino\",\r\n description: \"Upload one explicitly approved local JPEG, PNG, WebP, MP4, or MOV file into an exact project's reusable media library. Read only the exact path supplied for this workflow. This changes Rolino data but never creates, schedules, or publishes a post. Return the asset ID for a later draft operation.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n filePath: z.string().min(1).describe(\"Exact local path of the user-approved media file.\"),\r\n },\r\n outputSchema: MediaAssetSchema,\r\n annotations: uploadMediaAnnotations,\r\n }, async ({ projectId, filePath }) => {\r\n try {\r\n if (!api.media) throw new TypeError(\"This Rolino client does not support media operations.\");\r\n const absolutePath = resolve(filePath);\r\n const details = await stat(absolutePath).catch(() => null);\r\n if (!details?.isFile()) throw new TypeError(\"The media path must point to a readable file.\");\r\n const contentTypes: Record<string, string> = { \".jpg\": \"image/jpeg\", \".jpeg\": \"image/jpeg\", \".png\": \"image/png\", \".webp\": \"image/webp\", \".mp4\": \"video/mp4\", \".mov\": \"video/quicktime\" };\r\n const contentType = contentTypes[extname(absolutePath).toLowerCase()];\r\n if (!contentType) throw new TypeError(\"Use a JPEG, PNG, WebP, MP4, or MOV file.\");\r\n const body = await openAsBlob(absolutePath, { type: contentType });\r\n return jsonResult(await api.media.upload(projectId, { fileName: basename(absolutePath), contentType, fileSize: details.size, body }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"list_posts\", {\r\n title: \"List Rolino posts\",\r\n description:\r\n \"List posts in an exact Rolino project. Discover project IDs with list_projects, filter by status when useful, and paginate with nextCursor. This tool never changes Rolino data.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n limit: z.number().int().min(1).max(100).default(50)\r\n .describe(\"Maximum number of posts to return, from 1 to 100.\"),\r\n cursor: z.string().min(1).optional()\r\n .describe(\"Post cursor returned by a previous list_posts call.\"),\r\n status: z.enum([\r\n \"DRAFT\",\r\n \"SCHEDULED\",\r\n \"ACTION_REQUIRED\",\r\n \"PUBLISHING\",\r\n \"PUBLISHED\",\r\n \"PARTIALLY_PUBLISHED\",\r\n \"FAILED\",\r\n ]).optional().describe(\"Optional exact post status filter.\"),\r\n },\r\n outputSchema: PostListDataSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId, limit, cursor, status }) => {\r\n try {\r\n return jsonResult(await api.posts.list(projectId, {\r\n limit,\r\n cursor,\r\n status,\r\n }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"get_post\", {\r\n title: \"Get a Rolino post\",\r\n description:\r\n \"Get one Rolino post, including its ordered media and publication-destination status, by exact project and post IDs. This tool never changes Rolino data.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino post ID.\"),\r\n },\r\n outputSchema: PostSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId, postId }) => {\r\n try {\r\n return jsonResult(await api.posts.get(projectId, postId));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"create_draft_post\", {\r\n title: \"Create Rolino draft post\",\r\n description:\r\n \"Create a draft in one exact project. This changes Rolino data but never schedules or publishes. Before a TikTok draft, refresh account-specific delivery options and mark the exact choices reviewed separately from mutation consent. A YouTube draft requires exactly one stored video plus explicit title, category, visibility, audience, disclosure, notification, and tag settings; its description uses the YOUTUBE caption override or shared caption. Unaudited Google API projects may be limited to Private uploads. Supply a stable idempotency key so retrying the same input cannot create a duplicate.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n idempotencyKey: z.string().min(1).max(200)\r\n .describe(\"Stable caller-generated retry key for this exact creation.\"),\r\n ...mcpDraftInputShape,\r\n },\r\n outputSchema: PostSchema,\r\n annotations: createDraftAnnotations,\r\n }, async ({ projectId, idempotencyKey, ...input }) => {\r\n try {\r\n const draft = DraftPostInputSchema.parse(input);\r\n return jsonResult(await api.posts.create(projectId, draft, {\r\n idempotencyKey,\r\n }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"update_draft_post\", {\r\n title: \"Update Rolino draft post\",\r\n description:\r\n \"Update only the supplied draft fields without scheduling or publishing it; omitted caption, destinations, media, and provider settings are preserved. Read the post first and pass its current version; stale versions fail instead of overwriting another change. Editing TikTok content clears its prior review unless replacement settings are explicitly reviewed again. A stable idempotency key makes exact retries safe.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino draft post ID.\"),\r\n expectedVersion: z.number().int().positive()\r\n .describe(\"Current version returned by get_post.\"),\r\n idempotencyKey: z.string().min(1).max(200)\r\n .describe(\"Stable caller-generated retry key for this exact update.\"),\r\n ...mcpDraftUpdateInputShape,\r\n },\r\n outputSchema: PostSchema,\r\n annotations: updateDraftAnnotations,\r\n }, async ({\r\n projectId,\r\n postId,\r\n expectedVersion,\r\n idempotencyKey,\r\n ...input\r\n }) => {\r\n try {\r\n const draft = DraftPostUpdateInputSchema.parse(input);\r\n return jsonResult(await api.posts.update(projectId, postId, draft, {\r\n expectedVersion,\r\n idempotencyKey,\r\n }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"get_post_readiness\", {\r\n title: \"Get Rolino post readiness\",\r\n description:\r\n \"Evaluate one saved post against its destinations, media, captions, settings, permissions, token timing, and cached provider health. YouTube checks cover one stored video, explicit metadata and declarations, description limits, Private-only audit restrictions, and queue-aware lead time. This is a read-only evaluation and does not refresh providers or publish content.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino post ID.\"),\r\n },\r\n outputSchema: PostReadinessSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId, postId }) => {\r\n try {\r\n return jsonResult(await api.posts.readiness(projectId, postId));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"preview_post_schedule\", {\r\n title: \"Preview a Rolino post schedule\",\r\n description:\r\n \"Validate one exact future schedule against the current post version and live provider health. A YouTube schedule must target Public and its preview explains that confirmed execution starts a private upload immediately for early processing. This contacts configured providers and creates a five-minute, single-use confirmation, but does not schedule or publish the post. Inspect the complete result before calling execute_post_schedule with identical values.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino post ID.\"),\r\n expectedVersion: z.number().int().positive()\r\n .describe(\"Current version returned by get_post.\"),\r\n ...PostScheduleInputSchema.shape,\r\n },\r\n outputSchema: PostSchedulePreviewSchema,\r\n annotations: schedulePreviewAnnotations,\r\n }, async ({ projectId, postId, expectedVersion, ...input }) => {\r\n try {\r\n return jsonResult(await api.posts.previewSchedule(\r\n projectId,\r\n postId,\r\n input,\r\n { expectedVersion },\r\n ));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"execute_post_schedule\", {\r\n title: \"Execute a confirmed Rolino post schedule\",\r\n description:\r\n \"Schedule a post only after preview_post_schedule. Pass the unchanged time, timezone, post version, and returned one-time confirmation token. For YouTube, confirmed execution begins or resumes the private upload immediately and may return PENDING until a remote schedule change is confirmed; it never means the video already published. Rolino rechecks readiness and provider health, rejects stale or mismatched confirmation, and uses the stable idempotency key for safe retries. Scheduling causes future external publishing and is consequential.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino post ID.\"),\r\n expectedVersion: z.number().int().positive()\r\n .describe(\"Same post version used by preview_post_schedule.\"),\r\n idempotencyKey: z.string().min(1).max(200)\r\n .describe(\"Stable caller-generated retry key for this exact execution.\"),\r\n confirmationToken: z.string().min(1).max(200)\r\n .describe(\"Single-use token returned by preview_post_schedule.\"),\r\n ...PostScheduleInputSchema.shape,\r\n },\r\n outputSchema: mcpScheduleExecuteOutputSchema,\r\n annotations: scheduleExecuteAnnotations,\r\n }, async ({\r\n projectId,\r\n postId,\r\n expectedVersion,\r\n idempotencyKey,\r\n confirmationToken,\r\n ...input\r\n }) => {\r\n try {\r\n return jsonResult(await api.posts.executeSchedule(\r\n projectId,\r\n postId,\r\n { ...input, confirmationToken },\r\n { expectedVersion, idempotencyKey },\r\n ));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"preview_post_publish\", {\r\n title: \"Preview immediate Rolino post publishing\",\r\n description:\r\n \"Validate exact destinations against the current post version, safe retry state, readiness, and live provider health. YouTube readiness requires one stored video and explicit metadata; the configured visibility is exact, while unaudited Google API projects may be restricted to Private. This contacts configured providers and creates a five-minute, single-use confirmation, but does not publish. Inspect the complete result before calling execute_post_publish with identical destinations.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino post ID.\"),\r\n expectedVersion: z.number().int().positive()\r\n .describe(\"Current version returned by get_post.\"),\r\n destinations: PostPublishInputSchema.shape.destinations\r\n .describe(\"Exact Instagram, TikTok, YouTube, and/or Bluesky destinations to publish now.\"),\r\n },\r\n outputSchema: PostPublishPreviewSchema,\r\n annotations: publishPreviewAnnotations,\r\n }, async ({ projectId, postId, expectedVersion, destinations }) => {\r\n try {\r\n return jsonResult(await api.posts.previewPublish(\r\n projectId,\r\n postId,\r\n { destinations },\r\n { expectedVersion },\r\n ));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"execute_post_publish\", {\r\n title: \"Execute confirmed immediate Rolino post publishing\",\r\n description:\r\n \"Begin external publishing only after preview_post_publish. Pass the unchanged destinations, post version, and returned one-time confirmation token. YouTube execution starts a resumable upload and remains PREPARING until provider-confirmed upload and processing complete; no queued or local state is reported as published. Rolino rechecks readiness and safe retry state, durably queues the exact destinations, rejects ambiguous prior outcomes, and uses the stable idempotency key to prevent duplicate execution. This is immediately consequential.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino post ID.\"),\r\n expectedVersion: z.number().int().positive()\r\n .describe(\"Same post version used by preview_post_publish.\"),\r\n idempotencyKey: z.string().min(1).max(200)\r\n .describe(\"Stable caller-generated retry key for this exact execution.\"),\r\n confirmationToken: z.string().min(1).max(200)\r\n .describe(\"Single-use token returned by preview_post_publish.\"),\r\n destinations: PostPublishInputSchema.shape.destinations\r\n .describe(\"Exact unchanged destinations returned by preview_post_publish.\"),\r\n },\r\n outputSchema: PostSchema,\r\n annotations: publishExecuteAnnotations,\r\n }, async ({\r\n projectId,\r\n postId,\r\n expectedVersion,\r\n idempotencyKey,\r\n confirmationToken,\r\n destinations,\r\n }) => {\r\n try {\r\n return jsonResult(await api.posts.executePublish(\r\n projectId,\r\n postId,\r\n { destinations, confirmationToken },\r\n { expectedVersion, idempotencyKey },\r\n ));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"list_integration_health\", {\r\n title: \"List Rolino publishing integration health\",\r\n description:\r\n \"List secret-safe cached health for every enabled publishing connection (Instagram, TikTok, YouTube, or Bluesky) in one exact project. This tool does not contact external providers or reveal social credentials.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n },\r\n outputSchema: IntegrationHealthListDataSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId }) => {\r\n try {\r\n return jsonResult(await api.integrations.health(projectId));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"refresh_delivery_options\", {\r\n title: \"Refresh provider delivery options\",\r\n description:\r\n \"Contact one connected publishing provider and return secret-safe, account-specific choices needed to prepare a compliant draft. TikTok returns account-specific video choices; LinkedIn returns its verified member and image policy. This refreshes cached provider health but never creates, schedules, or publishes a post.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n provider: ProviderDeliveryOptionsProviderSchema.describe(\"Provider whose delivery choices should be refreshed.\"),\r\n },\r\n outputSchema: ProviderDeliveryOptionsToolSchema,\r\n annotations: deliveryOptionsAnnotations,\r\n }, async ({ projectId, provider }) => {\r\n try {\r\n if (!api.integrations.deliveryOptions) {\r\n throw new TypeError(\"This Rolino client does not support provider delivery options.\");\r\n }\r\n return jsonResult(await api.integrations.deliveryOptions(projectId, provider));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"list_calendar_events\", {\r\n title: \"List Rolino calendar events\",\r\n description:\r\n \"List scheduled posts and their enabled destinations in one exact project, including YouTube posts whose private early preparation has started. By default the bounded window spans 30 days in the past through 90 days ahead; provide both from and to for another range and paginate with nextCursor.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n limit: z.number().int().min(1).max(100).default(50)\r\n .describe(\"Maximum number of calendar events to return, from 1 to 100.\"),\r\n cursor: z.string().min(1).optional()\r\n .describe(\"Opaque cursor returned by a previous list_calendar_events call.\"),\r\n from: z.iso.datetime().optional()\r\n .describe(\"Inclusive ISO-8601 window start; provide together with to.\"),\r\n to: z.iso.datetime().optional()\r\n .describe(\"Exclusive ISO-8601 window end; provide together with from.\"),\r\n },\r\n outputSchema: CalendarListDataSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId, limit, cursor, from, to }) => {\r\n try {\r\n return jsonResult(await api.calendar.list(projectId, {\r\n limit,\r\n cursor,\r\n from,\r\n to,\r\n }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n return server;\r\n}\r\n\r\nexport async function startStdioServer(options: RolinoMcpServerOptions = {}) {\r\n const server = createRolinoMcpServer(options);\r\n const transport = new StdioServerTransport();\r\n await server.connect(transport);\r\n return server;\r\n}\r\n","{\n \"name\": \"@rolino/mcp\",\n \"version\": \"0.3.0\",\n \"description\": \"Model Context Protocol server for Rolino\",\n \"type\": \"module\",\n \"license\": \"MIT\",\n \"keywords\": [\n \"rolino\",\n \"mcp\",\n \"model-context-protocol\",\n \"social-media\",\n \"ai-agent\"\n ],\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/deifos/rolino.git\",\n \"directory\": \"packages/mcp\"\n },\n \"homepage\": \"https://github.com/deifos/rolino/tree/main/packages/mcp#readme\",\n \"bugs\": {\n \"url\": \"https://github.com/deifos/rolino/issues\"\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"bin\": {\n \"rolino-mcp\": \"./dist/bin.js\"\n },\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/index.d.ts\",\n \"default\": \"./dist/index.js\"\n },\n \"require\": {\n \"types\": \"./dist/index.d.cts\",\n \"default\": \"./dist/index.cjs\"\n }\n }\n },\n \"files\": [\n \"dist/**/*.js\",\n \"dist/**/*.cjs\",\n \"dist/**/*.map\",\n \"dist/**/*.d.ts\",\n \"dist/**/*.d.cts\",\n \"README.md\",\n \"CHANGELOG.md\",\n \"LICENSE\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"scripts\": {\n \"build\": \"tsup src/index.ts src/bin.ts --format esm,cjs --dts --sourcemap --clean\",\n \"typecheck\": \"tsc --noEmit\",\n \"dev\": \"tsx src/bin.ts\"\n },\n \"dependencies\": {\n \"@hono/node-server\": \"2.0.12\",\n \"@modelcontextprotocol/sdk\": \"^1.30.0\",\n \"@rolino/contracts\": \"0.3.0\",\n \"@rolino/local-auth\": \"0.3.0\",\n \"@rolino/sdk\": \"0.3.0\",\n \"zod\": \"^4.4.3\"\n },\n \"devDependencies\": {\n \"tsx\": \"^4.21.0\"\n },\n \"engines\": {\n \"node\": \">=20.19.0\"\n }\n}\n","#!/usr/bin/env node\r\n\r\nimport { resolveMcpConfiguration } from \"./configuration.js\";\r\nimport { startStdioServer } from \"./index.js\";\r\n\r\nasync function main() {\r\n const configuration = resolveMcpConfiguration(process.env);\r\n\r\n await startStdioServer({\r\n baseUrl: configuration.baseUrl,\r\n token: configuration.token,\r\n timeoutMs: configuration.timeoutMs,\r\n });\r\n}\r\n\r\nvoid main().catch(() => {\r\n // stdout is reserved exclusively for MCP JSON-RPC messages.\r\n process.stderr.write(\r\n \"Rolino MCP could not start. Check ROLINO_URL, ROLINO_TIMEOUT, and configuration.\\n\",\r\n );\r\n process.exitCode = 1;\r\n});\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBAAkC;AAClC,iBAA2D;AAIpD,SAAS,wBACd,MAA4B,QAAQ,KACpC;AACA,QAAM,cAAU;AAAA,IACd,IAAI,cAAc;AAAA,EACpB;AACA,QAAM,iBAAa,qCAAkB,SAAS,GAAG;AAEjD,SAAO;AAAA,IACL;AAAA,IACA,OAAO,WAAW,SAAS;AAAA,IAC3B,WAAW,IAAI,qBACX,+BAAmB,IAAI,cAAc,IACrC;AAAA,IACJ,kBAAkB,WAAW;AAAA,EAC/B;AACF;;;ACrBA,iBAA0B;AAC1B,mBAAqC;AACrC,qBAA2B;AAC3B,sBAAqB;AACrB,uBAA2C;AAC3C,uBA4CO;AACP,IAAAA,cAIO;AACP,QAAmB;;;ACvDnB;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,IACP,WAAa;AAAA,EACf;AAAA,EACA,UAAY;AAAA,EACZ,MAAQ;AAAA,IACN,KAAO;AAAA,EACT;AAAA,EACA,MAAQ;AAAA,EACR,QAAU;AAAA,EACV,OAAS;AAAA,EACT,KAAO;AAAA,IACL,cAAc;AAAA,EAChB;AAAA,EACA,SAAW;AAAA,IACT,KAAK;AAAA,MACH,QAAU;AAAA,QACR,OAAS;AAAA,QACT,SAAW;AAAA,MACb;AAAA,MACA,SAAW;AAAA,QACT,OAA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AS,4DAA4D;AAAA,IAC1E;AAAA,IACA,cAAc;AAAA,IACd,aAAa;AAAA,EACf,GAAG,OAAO,EAAE,WAAW,OAAO,QAAQ,MAAM,GAAG,MAAM;AACnD,QAAI;AACF,aAAO,WAAW,MAAM,IAAI,SAAS,KAAK,WAAW;AAAA,QACnD;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,CAAC;AAAA,IACJ,SAAS,OAAO;AACd,aAAO,YAAY,KAAK;AAAA,IAC1B;AAAA,EACF,CAAC;AAED,SAAO;AACT;AAEA,eAAsB,iBAAiB,UAAkC,CAAC,GAAG;AAC3E,QAAM,SAAS,sBAAsB,OAAO;AAC5C,QAAM,YAAY,IAAI,kCAAqB;AAC3C,QAAM,OAAO,QAAQ,SAAS;AAC9B,SAAO;AACT;;;AE9xBA,eAAe,OAAO;AACpB,QAAM,gBAAgB,wBAAwB,QAAQ,GAAG;AAEzD,QAAM,iBAAiB;AAAA,IACrB,SAAS,cAAc;AAAA,IACvB,OAAO,cAAc;AAAA,IACrB,WAAW,cAAc;AAAA,EAC3B,CAAC;AACH;AAEA,KAAK,KAAK,EAAE,MAAM,MAAM;AAEtB,UAAQ,OAAO;AAAA,IACb;AAAA,EACF;AACA,UAAQ,WAAW;AACrB,CAAC;","names":["import_sdk"]}
package/dist/bin.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  resolveMcpConfiguration,
4
4
  startStdioServer
5
- } from "./chunk-RSNR7K6Z.js";
5
+ } from "./chunk-L6II7ZEX.js";
6
6
 
7
7
  // src/bin.ts
8
8
  async function main() {