@canonmsg/claude-code-plugin 0.14.16 → 0.14.17

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.
@@ -6,7 +6,7 @@ export type McpParseResult<T> = {
6
6
  ok: false;
7
7
  error: string;
8
8
  };
9
- type ContentType = 'text' | 'image' | 'audio' | 'file';
9
+ type ContentType = 'text' | 'image' | 'audio' | 'video' | 'file';
10
10
  export interface ReplyArgs {
11
11
  conversationId: string;
12
12
  text: string;
@@ -18,6 +18,7 @@ export interface SendMessageArgs {
18
18
  contentType: ContentType;
19
19
  imageUrl?: string;
20
20
  audioUrl?: string;
21
+ videoUrl?: string;
21
22
  fileUrl?: string;
22
23
  mediaPath?: string;
23
24
  fileName?: string;
package/dist/mcp-args.js CHANGED
@@ -31,7 +31,7 @@ function optionalNumber(record, key) {
31
31
  function parseContentType(value) {
32
32
  if (value == null)
33
33
  return { ok: true, value: 'text' };
34
- if (value === 'text' || value === 'image' || value === 'audio' || value === 'file') {
34
+ if (value === 'text' || value === 'image' || value === 'audio' || value === 'video' || value === 'file') {
35
35
  return { ok: true, value };
36
36
  }
37
37
  return { ok: false, error: 'Invalid content_type' };
@@ -64,6 +64,7 @@ export function parseSendMessageArgs(value) {
64
64
  return contentType;
65
65
  const imageUrl = optionalString(value, 'image_url', 4096);
66
66
  const audioUrl = optionalString(value, 'audio_url', 4096);
67
+ const videoUrl = optionalString(value, 'video_url', 4096);
67
68
  const fileUrl = optionalString(value, 'file_url', 4096);
68
69
  const mediaPath = optionalString(value, 'media_path', 4096);
69
70
  const fileName = optionalString(value, 'file_name', 512);
@@ -77,6 +78,7 @@ export function parseSendMessageArgs(value) {
77
78
  contentType: contentType.value,
78
79
  ...(imageUrl ? { imageUrl } : {}),
79
80
  ...(audioUrl ? { audioUrl } : {}),
81
+ ...(videoUrl ? { videoUrl } : {}),
80
82
  ...(fileUrl ? { fileUrl } : {}),
81
83
  ...(mediaPath ? { mediaPath } : {}),
82
84
  ...(fileName ? { fileName } : {}),
package/dist/server.js CHANGED
@@ -84,7 +84,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
84
84
  },
85
85
  {
86
86
  name: 'send_message',
87
- description: 'Send a message to a Canon conversation (supports text, images, audio, files)',
87
+ description: 'Send a message to a Canon conversation (supports text, images, audio, video, files)',
88
88
  inputSchema: {
89
89
  type: 'object',
90
90
  properties: {
@@ -98,7 +98,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
98
98
  },
99
99
  content_type: {
100
100
  type: 'string',
101
- enum: ['text', 'image', 'audio', 'file'],
101
+ enum: ['text', 'image', 'audio', 'video', 'file'],
102
102
  description: 'Content type (default: text)',
103
103
  },
104
104
  image_url: {
@@ -109,13 +109,17 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
109
109
  type: 'string',
110
110
  description: 'Audio URL (when content_type is audio)',
111
111
  },
112
+ video_url: {
113
+ type: 'string',
114
+ description: 'Video URL (when content_type is video)',
115
+ },
112
116
  file_url: {
113
117
  type: 'string',
114
118
  description: 'File URL (when content_type is file)',
115
119
  },
116
120
  media_path: {
117
121
  type: 'string',
118
- description: 'Local image/audio/file path to upload and send',
122
+ description: 'Local image/audio/video/file path to upload and send',
119
123
  },
120
124
  file_name: {
121
125
  type: 'string',
@@ -244,7 +248,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
244
248
  const parsed = parseSendMessageArgs(args);
245
249
  if (!parsed.ok)
246
250
  return toolArgumentError(parsed.error);
247
- const { conversationId, text, contentType, imageUrl, audioUrl, fileUrl, mediaPath, fileName, mimeType, durationMs, } = parsed.value;
251
+ const { conversationId, text, contentType, imageUrl, audioUrl, videoUrl, fileUrl, mediaPath, fileName, mimeType, durationMs, } = parsed.value;
248
252
  const opts = {};
249
253
  const metadata = TURN_COMPLETE_METADATA;
250
254
  if (mediaPath) {
@@ -276,6 +280,15 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
276
280
  ...(mimeType ? { mimeType } : {}),
277
281
  }];
278
282
  }
283
+ else if (contentType === 'video' && videoUrl) {
284
+ opts.contentType = 'video';
285
+ opts.attachments = [{
286
+ kind: 'video',
287
+ url: videoUrl,
288
+ ...(mimeType ? { mimeType } : {}),
289
+ ...(durationMs != null ? { durationMs } : {}),
290
+ }];
291
+ }
279
292
  else if (contentType === 'file' || fileUrl) {
280
293
  opts.contentType = 'file';
281
294
  if (fileUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonmsg/claude-code-plugin",
3
- "version": "0.14.16",
3
+ "version": "0.14.17",
4
4
  "description": "Canon channel plugin for Claude Code — messaging where AI agents are first-class citizens",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -31,8 +31,8 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@anthropic-ai/claude-agent-sdk": "^0.2.141",
34
- "@canonmsg/agent-sdk": "^2.1.1",
35
- "@canonmsg/core": "^1.3.0",
34
+ "@canonmsg/agent-sdk": "^2.3.0",
35
+ "@canonmsg/core": "^1.6.0",
36
36
  "@modelcontextprotocol/sdk": "^1.29.0"
37
37
  },
38
38
  "engines": {