@kywi-software/mcp 0.6.4 → 0.6.5
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/AGENT-PATTERNS.md
CHANGED
|
@@ -308,8 +308,12 @@ Full recipe, worked example and hazards: the **`kywi-custom-modules` skill**.
|
|
|
308
308
|
**Design the props for the owner, not for yourself.** The props panel gives the
|
|
309
309
|
owner real controls for `text`/`textarea`/`richText` (text inputs),
|
|
310
310
|
`image`/`file` (media picker), `boolean` (checkbox) and `number`/`date`/`color`
|
|
311
|
-
(native inputs); `select
|
|
312
|
-
|
|
311
|
+
(native inputs); `select` and `multiSelect` render a real dropdown or checkbox
|
|
312
|
+
group when the prop declares `options` — `{ value, label }` pairs, or bare
|
|
313
|
+
strings where the string serves as both — so declare options for every closed
|
|
314
|
+
choice instead of trusting the owner to type the right value. `slug` and
|
|
315
|
+
`relationship` have no options field and are still plain text inputs; that's
|
|
316
|
+
the one place to name the allowed values in the label. A `json` prop is a
|
|
313
317
|
raw JSON textarea — developer territory. A "three stats" module with `stats: {
|
|
314
318
|
type: 'json' }` has taken the copy away from the owner; the same module with
|
|
315
319
|
`stat1Value` / `stat1Label` … as `text` props hasn't.
|
package/dist/module-types.d.ts
CHANGED
|
@@ -14,6 +14,15 @@ export interface ModuleTypeProp {
|
|
|
14
14
|
type: string;
|
|
15
15
|
label: string;
|
|
16
16
|
default?: unknown;
|
|
17
|
+
/**
|
|
18
|
+
* The values a `select` / `multiSelect` prop accepts, always normalized to
|
|
19
|
+
* `{ value, label }`. Present only when the module declares them; absent means
|
|
20
|
+
* the prop is free-form.
|
|
21
|
+
*/
|
|
22
|
+
options?: Array<{
|
|
23
|
+
value: string;
|
|
24
|
+
label: string;
|
|
25
|
+
}>;
|
|
17
26
|
}
|
|
18
27
|
export interface ModuleTypeSummary {
|
|
19
28
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-types.d.ts","sourceRoot":"","sources":["../src/module-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAIxE;;;;;;;;;;GAUG;AAIH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"module-types.d.ts","sourceRoot":"","sources":["../src/module-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAIxE;;;;;;;;;;GAUG;AAIH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAClD;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;CACtC;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,iBAAiB,EAAE,CAAA;CAC7B;AAkBD,sDAAsD;AACtD,wBAAgB,uBAAuB,IAAI,iBAAiB,EAAE,CAE7D;AAED,qFAAqF;AACrF,wBAAgB,yBAAyB,IAAI,kBAAkB,EAAE,CAQhE;AAWD,wBAAgB,qBAAqB,IAAI;IACvC,OAAO,EAAE,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAC1C,CAIA;AAQD,8DAA8D;AAC9D,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAM/D"}
|
package/dist/module-types.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { BUILT_IN_MODULES } from '@kywi-software/core';
|
|
1
|
+
import { BUILT_IN_MODULES, normalizeModulePropOptions } from '@kywi-software/core';
|
|
2
2
|
import { textResult } from './shared.js';
|
|
3
3
|
// ─── Pure builders (testable, always derived from BUILT_IN_MODULES) ──────────
|
|
4
4
|
function summarizeModule(mod) {
|
|
5
5
|
const props = {};
|
|
6
6
|
for (const [propName, def] of Object.entries(mod.props ?? {})) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const options = normalizeModulePropOptions(def.options);
|
|
8
|
+
props[propName] = {
|
|
9
|
+
type: def.type,
|
|
10
|
+
label: def.label,
|
|
11
|
+
...(def.defaultValue !== undefined ? { default: def.defaultValue } : {}),
|
|
12
|
+
...(options.length > 0 ? { options } : {}),
|
|
13
|
+
};
|
|
11
14
|
}
|
|
12
15
|
return { name: mod.name, label: mod.label, category: mod.category ?? 'Other', props };
|
|
13
16
|
}
|
package/dist/module-types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-types.js","sourceRoot":"","sources":["../src/module-types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"module-types.js","sourceRoot":"","sources":["../src/module-types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAA;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAwCxC,gFAAgF;AAEhF,SAAS,eAAe,CAAC,GAAsC;IAC7D,MAAM,KAAK,GAAmC,EAAE,CAAA;IAChD,KAAK,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,G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AAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,CAAA;AAC3F,CAAC;AAED,MAAM,QAAQ,GACZ,oFAAoF;IACpF,oFAAoF;IACpF,iFAAiF;IACjF,mFAAmF;IACnF,0EAA0E,CAAA;AAE5E,+EAA+E;AAE/E,MAAM,UAAU,qBAAqB;IAGnC,MAAM,UAAU,GAAG,yBAAyB,EAAE,CAAA;IAC9C,MAAM,WAAW,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;IACxE,OAAO,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,CAAA;AACpE,CAAC;AAED,MAAM,WAAW,GACf,oFAAoF;IACpF,sFAAsF;IACtF,wFAAwF;IACxF,oEAAoE,CAAA;AAEtE,8DAA8D;AAC9D,MAAM,UAAU,uBAAuB,CAAC,MAAiB;IACvD,MAAM,CAAC,YAAY,CACjB,mBAAmB,EACnB,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,EAAE,EAC7C,KAAK,IAAI,EAAE,CAAC,qBAAqB,EAAE,CACpC,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kywi-software/mcp",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"description": "Model Context Protocol servers for Kywi CMS — a site server (content/nav/media over the REST API) and a developer server (kywi.config.ts scaffolding and mutation).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
49
49
|
"zod": "^3.25.0",
|
|
50
|
-
"@kywi-software/core": "0.6.
|
|
51
|
-
"@kywi-software/sdk": "0.6.
|
|
50
|
+
"@kywi-software/core": "0.6.5",
|
|
51
|
+
"@kywi-software/sdk": "0.6.5"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/node": "^20.0.0",
|