@kitsra/kavio-mcp 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +22 -2
- package/package.json +9 -6
- package/plugins/kavio-ai/.claude-plugin/plugin.json +19 -0
- package/plugins/kavio-ai/.codex-plugin/plugin.json +40 -0
- package/plugins/kavio-ai/assets/icon.png +0 -0
- package/plugins/kavio-ai/assets/logo.png +0 -0
- package/plugins/kavio-ai/gemini-extension.json +5 -0
- package/plugins/kavio-ai/plugin.json +18 -0
- package/plugins/kavio-ai/skills/kavio-ai/SKILL.md +88 -0
- package/plugins/kavio-ai/skills/kavio-ai/agents/openai.yaml +4 -0
package/dist/bin.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { mkdir, writeFile } from "node:fs/promises";
|
|
3
|
-
import { resolve } from "node:path";
|
|
2
|
+
import { cp, mkdir, writeFile } from "node:fs/promises";
|
|
3
|
+
import { dirname, resolve } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
4
5
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
5
6
|
import { toAnthropicTools } from "./adapters/anthropic.js";
|
|
6
7
|
import { toGeminiTools } from "./adapters/gemini.js";
|
|
7
8
|
import { toOpenAITools } from "./adapters/openai.js";
|
|
8
9
|
import { createCatalog } from "./catalog.js";
|
|
9
10
|
import { createServer } from "./server.js";
|
|
11
|
+
const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
10
12
|
async function emitAdapters(outDir) {
|
|
11
13
|
const tools = createCatalog().tools;
|
|
12
14
|
await mkdir(outDir, { recursive: true });
|
|
@@ -14,6 +16,12 @@ async function emitAdapters(outDir) {
|
|
|
14
16
|
await writeFile(resolve(outDir, "openai.tools.json"), `${JSON.stringify(toOpenAITools(tools), null, 2)}\n`);
|
|
15
17
|
await writeFile(resolve(outDir, "gemini.tools.json"), `${JSON.stringify(toGeminiTools(tools), null, 2)}\n`);
|
|
16
18
|
}
|
|
19
|
+
async function emitSkill(outDir) {
|
|
20
|
+
const source = resolve(packageRoot, "plugins", "kavio-ai", "skills", "kavio-ai");
|
|
21
|
+
const destination = resolve(outDir, "kavio-ai");
|
|
22
|
+
await mkdir(outDir, { recursive: true });
|
|
23
|
+
await cp(source, destination, { recursive: true, force: true });
|
|
24
|
+
}
|
|
17
25
|
async function serve() {
|
|
18
26
|
const server = createServer(createCatalog());
|
|
19
27
|
await server.connect(new StdioServerTransport());
|
|
@@ -31,6 +39,18 @@ async function main(argv) {
|
|
|
31
39
|
process.stdout.write(`Wrote anthropic/openai/gemini tool files to ${outDir}\n`);
|
|
32
40
|
return;
|
|
33
41
|
}
|
|
42
|
+
if (argv[2] === "emit-skill") {
|
|
43
|
+
const flagIndex = argv.indexOf("--out");
|
|
44
|
+
const outDir = flagIndex >= 0 ? argv[flagIndex + 1] : undefined;
|
|
45
|
+
if (outDir === undefined || outDir.length === 0) {
|
|
46
|
+
process.stderr.write("Usage: kavio-mcp emit-skill --out <skills-dir>\n");
|
|
47
|
+
process.exitCode = 1;
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
await emitSkill(outDir);
|
|
51
|
+
process.stdout.write(`Wrote Kavio AI skill to ${resolve(outDir, "kavio-ai")}\n`);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
34
54
|
await serve();
|
|
35
55
|
}
|
|
36
56
|
void main(process.argv).catch((error) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitsra/kavio-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Model Context Protocol server and provider tool adapters for Kavio.",
|
|
5
5
|
"license": "Elastic-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@modelcontextprotocol/sdk": "^1.25.0",
|
|
19
|
-
"@kitsra/kavio-builder": "0.1.
|
|
20
|
-
"@kitsra/kavio-core": "0.1.
|
|
21
|
-
"@kitsra/kavio-render": "0.1.
|
|
22
|
-
"@kitsra/kavio-render-worker": "0.1.
|
|
23
|
-
"@kitsra/kavio-schema": "0.1.
|
|
19
|
+
"@kitsra/kavio-builder": "0.1.3",
|
|
20
|
+
"@kitsra/kavio-core": "0.1.3",
|
|
21
|
+
"@kitsra/kavio-render": "0.1.3",
|
|
22
|
+
"@kitsra/kavio-render-worker": "0.1.3",
|
|
23
|
+
"@kitsra/kavio-schema": "0.1.3"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/node": "^22.0.0"
|
|
@@ -33,8 +33,11 @@
|
|
|
33
33
|
},
|
|
34
34
|
"files": [
|
|
35
35
|
"dist",
|
|
36
|
+
"plugins",
|
|
36
37
|
"!dist/**/*.tsbuildinfo"
|
|
37
38
|
],
|
|
39
|
+
"readme": "# @kitsra/kavio-mcp\n\nModel Context Protocol server and provider tool adapters for Kavio.\n\n## Install\n\n```bash\ncorepack pnpm add @kitsra/kavio-mcp\n```\n\n## Usage\n\nRun the MCP server over stdio:\n\n```bash\nkavio-mcp\n```\n\nExample MCP host configuration:\n\n```json\n{\n \"mcpServers\": {\n \"kavio\": {\n \"command\": \"kavio-mcp\"\n }\n }\n}\n```\n\nThe package exposes tools for composition validation, inspection, migration,\nprop resolution, export preset listing, render planning, and rendering. It also\nships provider adapter schemas for Anthropic, OpenAI, and Gemini.\n\n## Links\n\n- Repository: https://github.com/kitsra/kavio\n- MCP docs: https://github.com/kitsra/kavio/blob/main/docs/mcp.md\n- Package overview: https://github.com/kitsra/kavio/blob/main/docs/packages.md\n- License: Elastic-2.0\n",
|
|
40
|
+
"readmeFilename": "README.md",
|
|
38
41
|
"scripts": {
|
|
39
42
|
"build": "tsc -p tsconfig.json",
|
|
40
43
|
"check": "tsc -p tsconfig.json --noEmit",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "kavio-ai",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Author validated Kavio video templates from natural-language briefs.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Kitsra"
|
|
7
|
+
},
|
|
8
|
+
"homepage": "https://github.com/kitsra/kavio#readme",
|
|
9
|
+
"repository": "https://github.com/kitsra/kavio.git",
|
|
10
|
+
"license": "Elastic-2.0",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"kavio",
|
|
13
|
+
"video",
|
|
14
|
+
"ai",
|
|
15
|
+
"json-schema",
|
|
16
|
+
"automation"
|
|
17
|
+
],
|
|
18
|
+
"skills": "./skills/"
|
|
19
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "kavio-ai",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Author validated Kavio video templates from natural-language briefs.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Kitsra"
|
|
7
|
+
},
|
|
8
|
+
"homepage": "https://github.com/kitsra/kavio#readme",
|
|
9
|
+
"repository": "https://github.com/kitsra/kavio.git",
|
|
10
|
+
"license": "Elastic-2.0",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"kavio",
|
|
13
|
+
"video",
|
|
14
|
+
"ai",
|
|
15
|
+
"json-schema",
|
|
16
|
+
"automation"
|
|
17
|
+
],
|
|
18
|
+
"skills": "./skills/",
|
|
19
|
+
"interface": {
|
|
20
|
+
"displayName": "Kavio",
|
|
21
|
+
"shortDescription": "Author validated video templates",
|
|
22
|
+
"longDescription": "Turn briefs into portable Kavio JSON compositions, then validate, inspect, preview, render, and adapt them for social exports with the local Kavio CLI workflow.",
|
|
23
|
+
"developerName": "Kitsra",
|
|
24
|
+
"category": "Creativity",
|
|
25
|
+
"capabilities": [
|
|
26
|
+
"Read",
|
|
27
|
+
"Write"
|
|
28
|
+
],
|
|
29
|
+
"websiteURL": "https://github.com/kitsra/kavio#readme",
|
|
30
|
+
"defaultPrompt": [
|
|
31
|
+
"Create a Kavio video from my brief.",
|
|
32
|
+
"Repair and validate this Kavio JSON.",
|
|
33
|
+
"Adapt this composition for social exports."
|
|
34
|
+
],
|
|
35
|
+
"brandColor": "#60BFD0",
|
|
36
|
+
"composerIcon": "./assets/icon.png",
|
|
37
|
+
"logo": "./assets/logo.png",
|
|
38
|
+
"screenshots": []
|
|
39
|
+
}
|
|
40
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "kavio-ai",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Author validated Kavio video templates from natural-language briefs.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Kitsra"
|
|
7
|
+
},
|
|
8
|
+
"homepage": "https://github.com/kitsra/kavio#readme",
|
|
9
|
+
"repository": "https://github.com/kitsra/kavio.git",
|
|
10
|
+
"license": "Elastic-2.0",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"kavio",
|
|
13
|
+
"video",
|
|
14
|
+
"ai",
|
|
15
|
+
"json-schema",
|
|
16
|
+
"automation"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kavio-ai
|
|
3
|
+
description: Author, repair, validate, inspect, preview, and render Kavio JSON video compositions without requiring MCP tools. Use when an AI agent is asked to create a Kavio video, fix Kavio composition JSON, adapt a composition for social export presets, use the Kavio CLI instead of an MCP server, or work from a portable vendor-neutral skill workflow.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Kavio AI
|
|
7
|
+
|
|
8
|
+
## Workflow
|
|
9
|
+
|
|
10
|
+
Use this vendor-neutral skill to work with Kavio through the local CLI, schema,
|
|
11
|
+
and examples when an MCP host is unavailable or the user prefers a plain skill.
|
|
12
|
+
|
|
13
|
+
1. Read the relevant local references before inventing document shape:
|
|
14
|
+
- `docs/schema.md` for the composition model.
|
|
15
|
+
- `packages/schema/schema/kavio-0.1.schema.json` for the canonical contract.
|
|
16
|
+
- `examples/basic-json/composition.json` for a compact valid example.
|
|
17
|
+
- `docs/template-authoring.md` for reusable template conventions.
|
|
18
|
+
- `docs/animation.md` when using keyframes, timing, transitions, masks, or effects.
|
|
19
|
+
2. Draft or edit the composition as JSON or through the TypeScript builder.
|
|
20
|
+
3. Validate after every meaningful change:
|
|
21
|
+
```bash
|
|
22
|
+
node packages/cli/dist/index.js --json validate path/to/composition.json
|
|
23
|
+
```
|
|
24
|
+
4. If validation fails, change only the reported paths unless the user asks for
|
|
25
|
+
a broader redesign. Keep the document valid at each repair step.
|
|
26
|
+
5. Inspect valid compositions before previewing or rendering:
|
|
27
|
+
```bash
|
|
28
|
+
node packages/cli/dist/index.js --json inspect path/to/composition.json
|
|
29
|
+
```
|
|
30
|
+
6. Preview locally when layout, timing, or motion needs visual review:
|
|
31
|
+
```bash
|
|
32
|
+
node packages/cli/dist/index.js preview path/to/composition.json
|
|
33
|
+
```
|
|
34
|
+
7. Render only when the user wants files produced and the optional browser and
|
|
35
|
+
FFmpeg binaries are already available, or after the user agrees to install
|
|
36
|
+
them through the repo's reviewed commands.
|
|
37
|
+
|
|
38
|
+
## Build And Tooling
|
|
39
|
+
|
|
40
|
+
- If `packages/cli/dist/index.js` is missing or stale, run:
|
|
41
|
+
```bash
|
|
42
|
+
corepack pnpm run build
|
|
43
|
+
```
|
|
44
|
+
- Respect the repository package-age gate. Do not add dependencies or run
|
|
45
|
+
alternate package managers to make an agent workflow work.
|
|
46
|
+
- Do not run package lifecycle scripts, downloaded binaries, or render-binary
|
|
47
|
+
installers just to inspect a composition. Validation, inspection, presets, and
|
|
48
|
+
most authoring work do not need browser or FFmpeg binaries.
|
|
49
|
+
- Use `corepack pnpm run install:render-binaries` only for an explicit render
|
|
50
|
+
workflow that needs local output files.
|
|
51
|
+
|
|
52
|
+
## Authoring Rules
|
|
53
|
+
|
|
54
|
+
- Start from the required top-level keys: `version`, `composition`, `props`,
|
|
55
|
+
`assets`, `layers`, `audio`, and `exports`.
|
|
56
|
+
- Prefer stable, descriptive ids such as `headline`, `logo`, `background-video`,
|
|
57
|
+
and `cta`. Keep asset ids and layer references in sync.
|
|
58
|
+
- Use props for text, URLs, colors, assets, and other values that should vary
|
|
59
|
+
across rows or users. Add `maxLength` to user-facing text props.
|
|
60
|
+
- Reserve layout zones for logo, headline, media, CTA, and captions so prop
|
|
61
|
+
changes do not create overlaps.
|
|
62
|
+
- Prefer `exports[].layerOverrides` for aspect-ratio-specific layout changes
|
|
63
|
+
instead of duplicating whole compositions.
|
|
64
|
+
- Keep layer timing within `composition.durationFrames`; remember layer timing is
|
|
65
|
+
inclusive at `startFrame` and exclusive at `startFrame + durationFrames`.
|
|
66
|
+
- Use `node packages/cli/dist/index.js presets` to discover standard social
|
|
67
|
+
export presets, or `--json presets <preset-id>` for copyable JSON.
|
|
68
|
+
|
|
69
|
+
## Repair Loop
|
|
70
|
+
|
|
71
|
+
When validation returns errors:
|
|
72
|
+
|
|
73
|
+
1. Read each error's `path`, `message`, `stage`, and `hint`.
|
|
74
|
+
2. Patch only the smallest JSON region that can resolve the error.
|
|
75
|
+
3. Re-run `validate` immediately.
|
|
76
|
+
4. Run `inspect` after validation passes to catch suspicious duration, export,
|
|
77
|
+
asset, layer, mask, or transition counts.
|
|
78
|
+
|
|
79
|
+
Do not guess around the schema. If the desired visual cannot be represented by
|
|
80
|
+
the current schema, explain the limitation and offer the closest valid Kavio
|
|
81
|
+
composition.
|
|
82
|
+
|
|
83
|
+
## MCP Parity
|
|
84
|
+
|
|
85
|
+
When an MCP host is available, `docs/mcp.md` describes the richer MCP path:
|
|
86
|
+
`validate_composition`, `inspect_composition`, `list_export_presets`,
|
|
87
|
+
`plan_render`, and `render`. This skill exists for agents and vendors that can
|
|
88
|
+
load portable skills but do not want to configure MCP.
|