@contentrain/skills 0.5.3 → 0.6.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/README.md
CHANGED
|
@@ -127,7 +127,7 @@ This reduces always-loaded context from thousands of lines to just the essential
|
|
|
127
127
|
|
|
128
128
|
`@contentrain/skills` is kept in lockstep with the MCP tool registry via cross-package parity tests (`tests/mcp-parity.test.ts`):
|
|
129
129
|
|
|
130
|
-
- `skills/contentrain/references/mcp-tools.md` must have an `### <tool>` heading for every tool in the MCP `TOOL_NAMES` registry (currently
|
|
130
|
+
- `skills/contentrain/references/mcp-tools.md` must have an `### <tool>` heading for every tool in the MCP `TOOL_NAMES` registry (currently 24: 19 core + 5 media).
|
|
131
131
|
- Key skills (normalize, translate) must not reference legacy `contentrain/{operation}/...` branch prefixes — MCP now emits `cr/*`.
|
|
132
132
|
|
|
133
133
|
When MCP's surface changes, these tests fail until the skill docs catch up.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentrain/skills",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "AI agent skills for Contentrain — workflow procedures, framework integration guides",
|
|
6
6
|
"type": "module",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"tsdown": "^0.21.0",
|
|
62
62
|
"typescript": "^5.7.0",
|
|
63
63
|
"vitest": "^3.0.0",
|
|
64
|
-
"@contentrain/mcp": "1.
|
|
64
|
+
"@contentrain/mcp": "1.10.0"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "tsdown src/index.ts --format esm,cjs --dts",
|
|
@@ -357,3 +357,67 @@ Run git-backed batch operations on existing content entries.
|
|
|
357
357
|
- `copy_locale` MUST NOT be used on non-i18n models
|
|
358
358
|
- Bulk operations create branches and commits like other write tools
|
|
359
359
|
- Validate afterward when content shape may have changed
|
|
360
|
+
|
|
361
|
+
## Media Tools
|
|
362
|
+
|
|
363
|
+
Media tools are a deterministic passthrough to the provider's media stack. They are **registered only when the provider exposes one** (e.g. Studio MCP Cloud) — local stdio servers and plain GitHub/GitLab providers never list them. The flow: list assets → pick a `media/...` path → reference it in media/image/file fields via `contentrain_content_save` (paths are normalized to absolute delivery URLs when the provider sets `mediaBaseUrl`).
|
|
364
|
+
|
|
365
|
+
### contentrain_media_list
|
|
366
|
+
|
|
367
|
+
List media assets with optional filtering and cursor pagination. Read-only.
|
|
368
|
+
|
|
369
|
+
| Parameter | Type | Required | Description |
|
|
370
|
+
|-----------|------|----------|-------------|
|
|
371
|
+
| `search` | string | No | Substring match on filename/path/alt |
|
|
372
|
+
| `tag` | string | No | Only assets carrying this tag |
|
|
373
|
+
| `limit` | number | No | Page size (1–100, provider may clamp) |
|
|
374
|
+
| `cursor` | string | No | Opaque cursor from a previous response |
|
|
375
|
+
|
|
376
|
+
Returns `{ assets[], next_cursor?, total? }`. Each asset carries `id`, `path` (`media/...`), optional `url`, `mime`, `size`, `alt`, `tags`, `createdAt`, `meta`.
|
|
377
|
+
|
|
378
|
+
### contentrain_media_get
|
|
379
|
+
|
|
380
|
+
Get a single media asset by id. Read-only.
|
|
381
|
+
|
|
382
|
+
| Parameter | Type | Required | Description |
|
|
383
|
+
|-----------|------|----------|-------------|
|
|
384
|
+
| `id` | string | Yes | Asset id from `contentrain_media_list` |
|
|
385
|
+
|
|
386
|
+
Returns `{ asset }` or an error with a discovery hint for unknown ids.
|
|
387
|
+
|
|
388
|
+
### contentrain_media_ingest
|
|
389
|
+
|
|
390
|
+
Ingest an asset from a source URL. The provider fetches the URL server-side under its own SSRF/MIME/size policy — MCP never fetches it. The only open-world tool (`openWorldHint: true`).
|
|
391
|
+
|
|
392
|
+
| Parameter | Type | Required | Description |
|
|
393
|
+
|-----------|------|----------|-------------|
|
|
394
|
+
| `url` | string | Yes | Source URL to fetch server-side |
|
|
395
|
+
| `filename` | string | No | Target filename override |
|
|
396
|
+
| `alt` | string | No | Alt text |
|
|
397
|
+
| `tags` | string[] | No | Tags to attach (max 20) |
|
|
398
|
+
|
|
399
|
+
Returns `{ status: "ingested", asset }` — use `asset.path` in content fields afterward.
|
|
400
|
+
|
|
401
|
+
### contentrain_media_update
|
|
402
|
+
|
|
403
|
+
Update asset metadata. Never touches the binary.
|
|
404
|
+
|
|
405
|
+
| Parameter | Type | Required | Description |
|
|
406
|
+
|-----------|------|----------|-------------|
|
|
407
|
+
| `id` | string | Yes | Asset id to update |
|
|
408
|
+
| `alt` | string | No | New alt text |
|
|
409
|
+
| `tags` | string[] | No | Replacement tag list (max 20) |
|
|
410
|
+
| `filename` | string | No | New filename |
|
|
411
|
+
|
|
412
|
+
Returns `{ status: "updated", asset }`.
|
|
413
|
+
|
|
414
|
+
### contentrain_media_delete
|
|
415
|
+
|
|
416
|
+
Delete an asset from the media stack. Destructive — content entries referencing its path are NOT rewritten; check references first with `contentrain_content_list`.
|
|
417
|
+
|
|
418
|
+
| Parameter | Type | Required | Description |
|
|
419
|
+
|-----------|------|----------|-------------|
|
|
420
|
+
| `id` | string | Yes | Asset id to delete |
|
|
421
|
+
| `confirm` | boolean | Yes | Must be `true` to confirm |
|
|
422
|
+
|
|
423
|
+
Returns `{ status: "deleted", id }`.
|