@pymodel/niblet-contract 0.1.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.
@@ -0,0 +1,162 @@
1
+ import { z } from 'zod';
2
+ export declare const NIBLET_SKILL_VERSION: "0.3.1";
3
+ export declare const PlatformSchema: z.ZodEnum<{
4
+ ios: "ios";
5
+ web: "web";
6
+ }>;
7
+ export declare const MaterialKindSchema: z.ZodEnum<{
8
+ font: "font";
9
+ icon: "icon";
10
+ animated_icon: "animated_icon";
11
+ pack: "pack";
12
+ }>;
13
+ export declare const ClientSkillVersionSchema: z.ZodString;
14
+ export declare const QuerySchema: z.ZodString;
15
+ export declare const ScreenIdSchema: z.ZodString;
16
+ export declare const DESIGN_REFERENCE_SECTIONS: readonly ["overview", "colors", "typography", "components", "provenance"];
17
+ export declare const DesignReferenceSectionSchema: z.ZodEnum<{
18
+ overview: "overview";
19
+ colors: "colors";
20
+ typography: "typography";
21
+ components: "components";
22
+ provenance: "provenance";
23
+ }>;
24
+ export type DesignReferenceSection = z.infer<typeof DesignReferenceSectionSchema>;
25
+ export declare const DesignReferenceSectionsSchema: z.ZodArray<z.ZodEnum<{
26
+ overview: "overview";
27
+ colors: "colors";
28
+ typography: "typography";
29
+ components: "components";
30
+ provenance: "provenance";
31
+ }>>;
32
+ export declare const FindUiReferencesInputSchema: z.ZodObject<{
33
+ query: z.ZodString;
34
+ platform: z.ZodOptional<z.ZodEnum<{
35
+ ios: "ios";
36
+ web: "web";
37
+ }>>;
38
+ limit: z.ZodDefault<z.ZodNumber>;
39
+ selectedIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
40
+ clientSkillVersion: z.ZodDefault<z.ZodString>;
41
+ }, z.core.$strict>;
42
+ export type FindUiReferencesInput = z.infer<typeof FindUiReferencesInputSchema>;
43
+ export declare const FindUiMaterialsInputSchema: z.ZodObject<{
44
+ query: z.ZodString;
45
+ kind: z.ZodEnum<{
46
+ font: "font";
47
+ icon: "icon";
48
+ animated_icon: "animated_icon";
49
+ pack: "pack";
50
+ }>;
51
+ platform: z.ZodOptional<z.ZodEnum<{
52
+ ios: "ios";
53
+ web: "web";
54
+ }>>;
55
+ limit: z.ZodDefault<z.ZodNumber>;
56
+ selectedId: z.ZodOptional<z.ZodString>;
57
+ userConfirmed: z.ZodOptional<z.ZodLiteral<true>>;
58
+ clientSkillVersion: z.ZodDefault<z.ZodString>;
59
+ }, z.core.$strict>;
60
+ export type FindUiMaterialsInput = z.infer<typeof FindUiMaterialsInputSchema>;
61
+ export declare const GetDesignReferenceInputSchema: z.ZodObject<{
62
+ screenId: z.ZodOptional<z.ZodString>;
63
+ packSlug: z.ZodOptional<z.ZodString>;
64
+ sections: z.ZodOptional<z.ZodArray<z.ZodEnum<{
65
+ overview: "overview";
66
+ colors: "colors";
67
+ typography: "typography";
68
+ components: "components";
69
+ provenance: "provenance";
70
+ }>>>;
71
+ clientSkillVersion: z.ZodDefault<z.ZodString>;
72
+ }, z.core.$strict>;
73
+ export type GetDesignReferenceInput = z.infer<typeof GetDesignReferenceInputSchema>;
74
+ export declare const CatalogueReferenceSchema: z.ZodObject<{
75
+ id: z.ZodString;
76
+ app: z.ZodString;
77
+ platform: z.ZodEnum<{
78
+ ios: "ios";
79
+ web: "web";
80
+ }>;
81
+ screenType: z.ZodNullable<z.ZodString>;
82
+ summary: z.ZodNullable<z.ZodString>;
83
+ width: z.ZodNullable<z.ZodNumber>;
84
+ height: z.ZodNullable<z.ZodNumber>;
85
+ thumbUrl: z.ZodString;
86
+ inspectUrl: z.ZodString;
87
+ }, z.core.$strict>;
88
+ export type CatalogueReference = z.infer<typeof CatalogueReferenceSchema>;
89
+ export declare const CatalogueMaterialSchema: z.ZodObject<{
90
+ name: z.ZodString;
91
+ license: z.ZodString;
92
+ description: z.ZodString;
93
+ url: z.ZodString;
94
+ }, z.core.$strict>;
95
+ export type CatalogueMaterial = z.infer<typeof CatalogueMaterialSchema>;
96
+ export declare const FindUiReferencesOutputSchema: z.ZodObject<{
97
+ references: z.ZodArray<z.ZodObject<{
98
+ id: z.ZodString;
99
+ app: z.ZodString;
100
+ platform: z.ZodEnum<{
101
+ ios: "ios";
102
+ web: "web";
103
+ }>;
104
+ screenType: z.ZodNullable<z.ZodString>;
105
+ summary: z.ZodNullable<z.ZodString>;
106
+ width: z.ZodNullable<z.ZodNumber>;
107
+ height: z.ZodNullable<z.ZodNumber>;
108
+ thumbUrl: z.ZodString;
109
+ inspectUrl: z.ZodString;
110
+ }, z.core.$strict>>;
111
+ selected: z.ZodBoolean;
112
+ }, z.core.$strict>;
113
+ export type FindUiReferencesOutput = z.infer<typeof FindUiReferencesOutputSchema>;
114
+ export declare const FindUiMaterialsOutputSchema: z.ZodObject<{
115
+ materials: z.ZodArray<z.ZodObject<{
116
+ name: z.ZodString;
117
+ license: z.ZodString;
118
+ description: z.ZodString;
119
+ url: z.ZodString;
120
+ }, z.core.$strict>>;
121
+ kind: z.ZodEnum<{
122
+ font: "font";
123
+ icon: "icon";
124
+ animated_icon: "animated_icon";
125
+ pack: "pack";
126
+ }>;
127
+ }, z.core.$strict>;
128
+ export type FindUiMaterialsOutput = z.infer<typeof FindUiMaterialsOutputSchema>;
129
+ export declare const DesignReferenceSchema: z.ZodObject<{
130
+ slug: z.ZodString;
131
+ name: z.ZodNullable<z.ZodString>;
132
+ theme: z.ZodNullable<z.ZodString>;
133
+ markdown: z.ZodString;
134
+ sections: z.ZodArray<z.ZodEnum<{
135
+ overview: "overview";
136
+ colors: "colors";
137
+ typography: "typography";
138
+ components: "components";
139
+ provenance: "provenance";
140
+ }>>;
141
+ }, z.core.$strict>;
142
+ export type DesignReference = z.infer<typeof DesignReferenceSchema>;
143
+ export declare const GetDesignReferenceOutputSchema: z.ZodObject<{
144
+ reference: z.ZodNullable<z.ZodObject<{
145
+ slug: z.ZodString;
146
+ name: z.ZodNullable<z.ZodString>;
147
+ theme: z.ZodNullable<z.ZodString>;
148
+ markdown: z.ZodString;
149
+ sections: z.ZodArray<z.ZodEnum<{
150
+ overview: "overview";
151
+ colors: "colors";
152
+ typography: "typography";
153
+ components: "components";
154
+ provenance: "provenance";
155
+ }>>;
156
+ }, z.core.$strict>>;
157
+ }, z.core.$strict>;
158
+ export type GetDesignReferenceOutput = z.infer<typeof GetDesignReferenceOutputSchema>;
159
+ export declare function selectDesignReferenceSections(markdown: string, requested?: readonly DesignReferenceSection[]): {
160
+ markdown: string;
161
+ sections: DesignReferenceSection[];
162
+ };
package/dist/index.js ADDED
@@ -0,0 +1,140 @@
1
+ import { z } from 'zod';
2
+ export const NIBLET_SKILL_VERSION = '0.3.1';
3
+ const wellFormed = (value) => {
4
+ for (let index = 0; index < value.length; index++) {
5
+ const code = value.charCodeAt(index);
6
+ if (code >= 0xD800 && code <= 0xDBFF) {
7
+ if (++index >= value.length)
8
+ return false;
9
+ const next = value.charCodeAt(index);
10
+ if (next < 0xDC00 || next > 0xDFFF)
11
+ return false;
12
+ }
13
+ else if (code >= 0xDC00 && code <= 0xDFFF) {
14
+ return false;
15
+ }
16
+ }
17
+ return true;
18
+ };
19
+ export const PlatformSchema = z.enum(['ios', 'web']);
20
+ export const MaterialKindSchema = z.enum(['font', 'icon', 'animated_icon', 'pack']);
21
+ export const ClientSkillVersionSchema = z.string().min(1).max(64);
22
+ export const QuerySchema = z.string().min(1).max(240).refine(wellFormed, 'Use well-formed text.');
23
+ export const ScreenIdSchema = z.string().min(1).max(160)
24
+ .regex(/^[^/\\%]+$/, 'Use an identifier, not a path or encoded URL.')
25
+ .refine((value) => {
26
+ for (let index = 0; index < value.length; index++) {
27
+ const code = value.charCodeAt(index);
28
+ if (code <= 0x1F || code === 0x7F)
29
+ return false;
30
+ }
31
+ return true;
32
+ }, 'Control characters are not allowed.')
33
+ .refine((value) => value !== '.' && value !== '..' && wellFormed(value), 'Use a well-formed, non-dot identifier.');
34
+ export const DESIGN_REFERENCE_SECTIONS = ['overview', 'colors', 'typography', 'components', 'provenance'];
35
+ export const DesignReferenceSectionSchema = z.enum(DESIGN_REFERENCE_SECTIONS);
36
+ export const DesignReferenceSectionsSchema = z.array(DesignReferenceSectionSchema)
37
+ .min(1)
38
+ .max(DESIGN_REFERENCE_SECTIONS.length)
39
+ .refine((sections) => new Set(sections).size === sections.length, 'List each section once.');
40
+ const ResultLimitSchema = z.number().int().min(1).max(3).default(2);
41
+ export const FindUiReferencesInputSchema = z.object({
42
+ query: QuerySchema.describe('The concrete UI question to investigate.'),
43
+ platform: PlatformSchema.optional(),
44
+ limit: ResultLimitSchema,
45
+ selectedIds: z.array(ScreenIdSchema).min(1).max(3).optional()
46
+ .describe('Screen IDs from a previous search, for inspection-quality retrieval.'),
47
+ clientSkillVersion: ClientSkillVersionSchema.default(NIBLET_SKILL_VERSION),
48
+ }).strict();
49
+ export const FindUiMaterialsInputSchema = z.object({
50
+ query: QuerySchema.describe('The intended visual role or material to find.'),
51
+ kind: MaterialKindSchema,
52
+ platform: PlatformSchema.optional(),
53
+ limit: ResultLimitSchema,
54
+ selectedId: z.string().min(1).max(160).optional(),
55
+ userConfirmed: z.literal(true).optional(),
56
+ clientSkillVersion: ClientSkillVersionSchema.default(NIBLET_SKILL_VERSION),
57
+ }).strict();
58
+ export const GetDesignReferenceInputSchema = z.object({
59
+ screenId: ScreenIdSchema.optional().describe('A screen ID from find_ui_references.'),
60
+ packSlug: z.string().min(1).max(160).optional().describe('A design pack slug, when the pack is already known.'),
61
+ sections: DesignReferenceSectionsSchema.optional().describe('Style-reference sections to return. Omit for the complete reference.'),
62
+ clientSkillVersion: ClientSkillVersionSchema.default(NIBLET_SKILL_VERSION),
63
+ }).strict().refine((value) => value.screenId !== undefined || value.packSlug !== undefined, 'Pass screenId or packSlug.');
64
+ export const CatalogueReferenceSchema = z.object({
65
+ id: z.string().min(1).max(160),
66
+ app: z.string().min(1).max(200),
67
+ platform: PlatformSchema,
68
+ screenType: z.string().max(200).nullable(),
69
+ summary: z.string().max(1_000).nullable(),
70
+ width: z.number().finite().nullable(),
71
+ height: z.number().finite().nullable(),
72
+ thumbUrl: z.string().min(1).max(2_000),
73
+ inspectUrl: z.string().min(1).max(2_000),
74
+ }).strict();
75
+ export const CatalogueMaterialSchema = z.object({
76
+ name: z.string().min(1).max(200),
77
+ license: z.string().min(1).max(200),
78
+ description: z.string().max(1_000),
79
+ url: z.string().min(1).max(2_000),
80
+ }).strict();
81
+ export const FindUiReferencesOutputSchema = z.object({
82
+ references: z.array(CatalogueReferenceSchema).max(3),
83
+ selected: z.boolean(),
84
+ }).strict();
85
+ export const FindUiMaterialsOutputSchema = z.object({
86
+ materials: z.array(CatalogueMaterialSchema).max(3),
87
+ kind: MaterialKindSchema,
88
+ }).strict();
89
+ export const DesignReferenceSchema = z.object({
90
+ slug: z.string().max(160),
91
+ name: z.string().max(200).nullable(),
92
+ theme: z.string().max(200).nullable(),
93
+ markdown: z.string().min(1).max(40_000),
94
+ sections: z.array(DesignReferenceSectionSchema),
95
+ }).strict();
96
+ export const GetDesignReferenceOutputSchema = z.object({
97
+ reference: DesignReferenceSchema.nullable(),
98
+ }).strict();
99
+ const HEADING_SECTIONS = {
100
+ '## Tokens — Colors': 'colors',
101
+ '## Tokens — Typography': 'typography',
102
+ '## Components': 'components',
103
+ '## Provenance': 'provenance',
104
+ };
105
+ export function selectDesignReferenceSections(markdown, requested) {
106
+ const normalized = markdown.endsWith('\n') ? markdown : `${markdown}\n`;
107
+ const lines = normalized.trimEnd().split(/\r?\n/);
108
+ const firstSection = lines.findIndex((line) => line.startsWith('## '));
109
+ const introEnd = firstSection === -1 ? lines.length : firstSection;
110
+ const intro = lines.slice(0, introEnd);
111
+ const blocks = [];
112
+ for (let start = firstSection; start !== -1 && start < lines.length;) {
113
+ let end = start + 1;
114
+ while (end < lines.length && !lines[end].startsWith('## '))
115
+ end++;
116
+ const section = HEADING_SECTIONS[lines[start]];
117
+ if (section)
118
+ blocks.push({ section, lines: lines.slice(start, end) });
119
+ start = end;
120
+ }
121
+ const available = ['overview', ...blocks.map(({ section }) => section)];
122
+ if (!requested)
123
+ return { markdown: normalized, sections: available };
124
+ const wanted = new Set(requested);
125
+ const output = wanted.has('overview') ? [...intro] : [lines[0] ?? '# Style Reference', ''];
126
+ const included = wanted.has('overview') ? ['overview'] : [];
127
+ for (const block of blocks) {
128
+ if (!wanted.has(block.section))
129
+ continue;
130
+ if (output.length && output.at(-1) !== '')
131
+ output.push('');
132
+ output.push(...block.lines);
133
+ included.push(block.section);
134
+ }
135
+ return {
136
+ markdown: `${output.join('\n').replace(/\n{3,}/g, '\n\n').trimEnd()}\n`,
137
+ sections: included,
138
+ };
139
+ }
140
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAgB,CAAC;AAErD,MAAM,UAAU,GAAG,CAAC,KAAa,EAAW,EAAE;IAC5C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;QAClD,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACrC,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,EAAE,CAAC;YACrC,IAAI,EAAE,KAAK,IAAI,KAAK,CAAC,MAAM;gBAAE,OAAO,KAAK,CAAC;YAC1C,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YACrC,IAAI,IAAI,GAAG,MAAM,IAAI,IAAI,GAAG,MAAM;gBAAE,OAAO,KAAK,CAAC;QACnD,CAAC;aAAM,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,EAAE,CAAC;YAC5C,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAE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CAAC,SAAS;QAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAErE,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;IAClC,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,mBAAmB,EAAE,EAAE,CAAC,CAAC;IAC3F,MAAM,QAAQ,GAA6B,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACtF,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC;YAAE,SAAS;QACzC,IAAI,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE;YAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC3D,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QAC5B,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,OAAO,EAAE,IAAI;QACvE,QAAQ,EAAE,QAAQ;KACnB,CAAC;AACJ,CAAC"}
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@pymodel/niblet-contract",
3
+ "version": "0.1.0",
4
+ "description": "Shared MCP catalogue contracts for Niblet hosted and stdio adapters",
5
+ "type": "module",
6
+ "license": "Apache-2.0",
7
+ "sideEffects": false,
8
+ "engines": {
9
+ "node": ">=24.15.0"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "default": "./dist/index.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "scripts": {
24
+ "build": "tsc -p tsconfig.json",
25
+ "typecheck": "tsc -p tsconfig.json --noEmit",
26
+ "lint": "eslint src test",
27
+ "test": "vitest run",
28
+ "prepublishOnly": "pnpm lint && pnpm typecheck && pnpm test && pnpm build"
29
+ },
30
+ "dependencies": {
31
+ "zod": "^4.1.0"
32
+ },
33
+ "devDependencies": {
34
+ "@types/node": "^24.0.0",
35
+ "eslint": "^9.30.0",
36
+ "typescript": "^5.9.0",
37
+ "vitest": "^3.2.0"
38
+ }
39
+ }