@penpair/core 0.2.0 → 0.3.1
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/adapters.js +58 -11
- package/dist/approvals.js +143 -29
- package/dist/atomic-output.js +9 -4
- package/dist/audit-rules.js +345 -79
- package/dist/backup-note.js +29 -8
- package/dist/baseline-coverage.js +169 -35
- package/dist/baselines-config.js +119 -29
- package/dist/baselines.js +280 -57
- package/dist/cli-arguments.js +18 -6
- package/dist/cli-main.js +1645 -392
- package/dist/client.d.ts +5 -2
- package/dist/client.js +127 -28
- package/dist/command-result.js +341 -52
- package/dist/coordination.js +91 -29
- package/dist/credentials.js +57 -13
- package/dist/deep-check.js +56 -12
- package/dist/design-spec.js +189 -49
- package/dist/endpoint.js +102 -34
- package/dist/export.js +86 -18
- package/dist/file-archive.js +33 -7
- package/dist/file-guard.js +29 -11
- package/dist/formats.js +215 -14
- package/dist/index.d.ts +8 -7
- package/dist/index.js +8 -7
- package/dist/inspection.d.ts +1 -1
- package/dist/inspection.js +378 -65
- package/dist/instance/config-schema.js +400 -41
- package/dist/instance/config.js +101 -30
- package/dist/instance/connect.js +151 -44
- package/dist/instance/connection.d.ts +26 -5
- package/dist/instance/connection.js +194 -21
- package/dist/instance/gitignore.js +5 -2
- package/dist/instance/init.js +32 -7
- package/dist/instance/runner.js +32 -10
- package/dist/instance/setup.js +46 -13
- package/dist/instance/tty.js +26 -8
- package/dist/journal.d.ts +10 -0
- package/dist/journal.js +212 -49
- package/dist/kit-smoke.js +82 -20
- package/dist/kit-source.js +10 -40
- package/dist/kit.js +102 -34
- package/dist/layout-policy.d.ts +2 -0
- package/dist/layout-policy.js +86 -0
- package/dist/layout.d.ts +7 -1
- package/dist/layout.js +27 -70
- package/dist/live-smoke.js +13 -4
- package/dist/local-profile.js +2 -1
- package/dist/mcp-server.js +360 -47
- package/dist/native-api.js +47 -11
- package/dist/onboard.js +33 -7
- package/dist/operation.d.ts +2 -2
- package/dist/operation.js +279 -69
- package/dist/page-session.d.ts +23 -0
- package/dist/page-session.js +142 -0
- package/dist/png.js +18 -3
- package/dist/portable-tokens.js +254 -57
- package/dist/probe.d.ts +1 -1
- package/dist/probe.js +48 -11
- package/dist/project-input.js +24 -10
- package/dist/project-snippets.js +18 -6
- package/dist/project-status.js +133 -24
- package/dist/registry.js +217 -60
- package/dist/run-file.js +129 -30
- package/dist/shots.js +108 -26
- package/dist/skill-check-entry.d.ts +17 -0
- package/dist/skill-check-entry.js +89 -0
- package/dist/skill-check-instructions.d.ts +7 -0
- package/dist/skill-check-instructions.js +39 -0
- package/dist/skill-check.d.ts +15 -0
- package/dist/skill-check.js +36 -0
- package/dist/skill-file.d.ts +2 -0
- package/dist/skill-file.js +31 -0
- package/dist/skill-instructions.d.ts +4 -0
- package/dist/skill-instructions.js +97 -22
- package/dist/skill-metadata.d.ts +8 -0
- package/dist/skill-metadata.js +52 -0
- package/dist/skill-routing.d.ts +2 -0
- package/dist/skill-routing.js +36 -0
- package/dist/skills.js +131 -41
- package/dist/snippet.js +27 -7
- package/dist/snippets/read.js +8 -2
- package/dist/structure-snapshot.d.ts +12 -0
- package/dist/structure-snapshot.js +439 -85
- package/dist/token-edit.js +219 -64
- package/dist/token-projection.d.ts +56 -0
- package/dist/token-projection.js +286 -0
- package/dist/tokens-diff.js +125 -32
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -2
- package/skills/design-judgment/SKILL.md +1 -1
- package/skills/design-judgment/agents/openai.yaml +6 -0
- package/skills/penpair-design/SKILL.md +14 -1
- package/skills/penpair-design/agents/openai.yaml +6 -0
- package/skills/penpair-design/references/penpot-plugin-gotchas.md +2 -2
- package/skills/penpair-design/references/project-facts.md +2 -0
- package/skills/penpair-handoff/SKILL.md +14 -1
- package/skills/penpair-handoff/agents/openai.yaml +6 -0
- package/skills/penpair-handoff/references/comparison-companion.md +16 -0
- package/skills/penpair-handoff/references/handoff-flow.md +2 -0
- package/skills/penpair-recipes/SKILL.md +13 -1
- package/skills/penpair-recipes/agents/openai.yaml +6 -0
- package/skills/penpair-recipes/assets/visual-checkpoint.md +48 -0
- package/skills/penpair-recipes/references/visual-checkpoint.md +37 -0
- package/skills/penpair-setup/SKILL.md +9 -3
- package/skills/penpair-setup/agents/openai.yaml +6 -0
- package/skills/penpair-verify/SKILL.md +49 -0
- package/skills/penpair-verify/agents/openai.yaml +6 -0
- package/skills/penpair-verify/references/browser-evidence.md +33 -0
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -3
- package/dist/docker/lifecycle.d.ts +0 -96
- package/dist/docker/lifecycle.js +0 -273
- package/dist/docker/secrets.d.ts +0 -11
- package/dist/docker/secrets.js +0 -38
- package/dist/docker/template.d.ts +0 -8
- package/dist/docker/template.js +0 -158
- package/dist/docker-profile.d.ts +0 -114
- package/dist/docker-profile.js +0 -18
- package/dist/instance/lifecycle.d.ts +0 -129
- package/dist/instance/lifecycle.js +0 -336
- package/dist/instance/secrets.d.ts +0 -11
- package/dist/instance/secrets.js +0 -38
- package/dist/instance/template.d.ts +0 -8
- package/dist/instance/template.js +0 -158
|
@@ -1,44 +1,359 @@
|
|
|
1
|
-
const viewportSchema = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
const viewportSchema = {
|
|
2
|
+
type: "object",
|
|
3
|
+
required: [
|
|
4
|
+
"width",
|
|
5
|
+
"height",
|
|
6
|
+
],
|
|
7
|
+
additionalProperties: false,
|
|
8
|
+
properties: {
|
|
9
|
+
width: {
|
|
10
|
+
type: "integer",
|
|
11
|
+
minimum: 1,
|
|
12
|
+
maximum: 16384,
|
|
13
|
+
},
|
|
14
|
+
height: {
|
|
15
|
+
type: "integer",
|
|
16
|
+
minimum: 1,
|
|
17
|
+
maximum: 16384,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
const caseFields = {
|
|
22
|
+
viewport: viewportSchema,
|
|
23
|
+
theme: {
|
|
24
|
+
type: "string",
|
|
25
|
+
minLength: 1,
|
|
26
|
+
maxLength: 200,
|
|
27
|
+
},
|
|
28
|
+
state: {
|
|
29
|
+
type: "string",
|
|
30
|
+
minLength: 1,
|
|
31
|
+
maxLength: 200,
|
|
32
|
+
},
|
|
33
|
+
fixture: {
|
|
34
|
+
type: "string",
|
|
35
|
+
minLength: 1,
|
|
36
|
+
maxLength: 200,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
const baselineCaseSchema = {
|
|
40
|
+
type: "object",
|
|
41
|
+
required: [
|
|
42
|
+
"viewport",
|
|
43
|
+
"theme",
|
|
44
|
+
"state",
|
|
45
|
+
"fixture",
|
|
46
|
+
],
|
|
47
|
+
additionalProperties: false,
|
|
48
|
+
properties: {
|
|
49
|
+
...caseFields,
|
|
50
|
+
fonts: {
|
|
51
|
+
type: "array",
|
|
52
|
+
maxItems: 100,
|
|
53
|
+
uniqueItems: true,
|
|
54
|
+
items: {
|
|
55
|
+
type: "string",
|
|
56
|
+
minLength: 1,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
activeThemeIds: {
|
|
60
|
+
type: "array",
|
|
61
|
+
maxItems: 100,
|
|
62
|
+
uniqueItems: true,
|
|
63
|
+
items: {
|
|
64
|
+
type: "string",
|
|
65
|
+
minLength: 1,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
const requiredCaseSchema = {
|
|
71
|
+
type: "object",
|
|
72
|
+
required: [
|
|
73
|
+
"route",
|
|
74
|
+
"viewport",
|
|
75
|
+
"theme",
|
|
76
|
+
"state",
|
|
77
|
+
"fixture",
|
|
78
|
+
],
|
|
79
|
+
additionalProperties: false,
|
|
80
|
+
properties: {
|
|
81
|
+
route: {
|
|
82
|
+
type: "string",
|
|
83
|
+
minLength: 1,
|
|
84
|
+
},
|
|
85
|
+
...caseFields,
|
|
86
|
+
},
|
|
87
|
+
};
|
|
5
88
|
/** Editor hints for the core settings. Adapter-owned properties remain open; `config check` also checks semantic constraints. */
|
|
6
89
|
export const projectConfigSchema = {
|
|
7
90
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
8
91
|
title: "penpair project configuration",
|
|
9
92
|
type: "object",
|
|
10
|
-
required: [
|
|
93
|
+
required: [
|
|
94
|
+
"instance",
|
|
95
|
+
],
|
|
11
96
|
properties: {
|
|
12
|
-
schemaVersion: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
97
|
+
schemaVersion: {
|
|
98
|
+
const: 1,
|
|
99
|
+
},
|
|
100
|
+
connection: {
|
|
101
|
+
type: "object",
|
|
102
|
+
additionalProperties: false,
|
|
103
|
+
required: [
|
|
104
|
+
"credential",
|
|
105
|
+
],
|
|
106
|
+
properties: {
|
|
107
|
+
credential: {
|
|
108
|
+
oneOf: [
|
|
109
|
+
{
|
|
110
|
+
type: "object",
|
|
111
|
+
additionalProperties: false,
|
|
112
|
+
required: [
|
|
113
|
+
"type",
|
|
114
|
+
"path",
|
|
115
|
+
],
|
|
116
|
+
properties: {
|
|
117
|
+
type: {
|
|
118
|
+
const: "file",
|
|
119
|
+
},
|
|
120
|
+
path: {
|
|
121
|
+
type: "string",
|
|
122
|
+
minLength: 1,
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
type: "object",
|
|
128
|
+
additionalProperties: false,
|
|
129
|
+
required: [
|
|
130
|
+
"type",
|
|
131
|
+
"service",
|
|
132
|
+
"account",
|
|
133
|
+
],
|
|
134
|
+
properties: {
|
|
135
|
+
type: {
|
|
136
|
+
const: "keychain",
|
|
137
|
+
},
|
|
138
|
+
service: {
|
|
139
|
+
type: "string",
|
|
140
|
+
minLength: 1,
|
|
141
|
+
},
|
|
142
|
+
account: {
|
|
143
|
+
type: "string",
|
|
144
|
+
minLength: 1,
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
audit: {
|
|
153
|
+
type: "object",
|
|
154
|
+
additionalProperties: false,
|
|
155
|
+
properties: {
|
|
156
|
+
contrast: {
|
|
157
|
+
type: "boolean",
|
|
158
|
+
},
|
|
159
|
+
library: {
|
|
160
|
+
type: "boolean",
|
|
161
|
+
},
|
|
162
|
+
touchTargets: {
|
|
163
|
+
type: "boolean",
|
|
164
|
+
},
|
|
165
|
+
names: {
|
|
166
|
+
type: "boolean",
|
|
167
|
+
},
|
|
168
|
+
blankText: {
|
|
169
|
+
type: "boolean",
|
|
170
|
+
},
|
|
171
|
+
interactiveIds: {
|
|
172
|
+
type: "array",
|
|
173
|
+
maxItems: 1000,
|
|
174
|
+
items: {
|
|
175
|
+
type: "string",
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
allowBlank: {
|
|
179
|
+
type: "array",
|
|
180
|
+
maxItems: 1000,
|
|
181
|
+
items: {
|
|
182
|
+
type: "string",
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
nameSegments: {
|
|
186
|
+
type: "integer",
|
|
187
|
+
minimum: 1,
|
|
188
|
+
maximum: 10,
|
|
189
|
+
},
|
|
190
|
+
suppressions: {
|
|
191
|
+
type: "array",
|
|
192
|
+
maxItems: 1000,
|
|
193
|
+
items: {
|
|
194
|
+
type: "object",
|
|
195
|
+
required: [
|
|
196
|
+
"rule",
|
|
197
|
+
"nodeId",
|
|
198
|
+
"reason",
|
|
199
|
+
],
|
|
200
|
+
properties: {
|
|
201
|
+
rule: {
|
|
202
|
+
enum: [
|
|
203
|
+
"contrast",
|
|
204
|
+
"library",
|
|
205
|
+
"touch-target",
|
|
206
|
+
"names",
|
|
207
|
+
"blank-text",
|
|
208
|
+
],
|
|
209
|
+
},
|
|
210
|
+
nodeId: {
|
|
211
|
+
type: "string",
|
|
212
|
+
},
|
|
213
|
+
reason: {
|
|
214
|
+
type: "string",
|
|
215
|
+
minLength: 1,
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
backup: {
|
|
223
|
+
type: "object",
|
|
224
|
+
required: [
|
|
225
|
+
"noteFile",
|
|
226
|
+
"remindAfterDays",
|
|
227
|
+
],
|
|
228
|
+
properties: {
|
|
229
|
+
noteFile: {
|
|
230
|
+
type: "string",
|
|
231
|
+
minLength: 1,
|
|
232
|
+
pattern: "^(?![/\\\\])(?!.*(?:^|[/\\\\])\\.\\.(?:[/\\\\]|$)).+$",
|
|
233
|
+
},
|
|
234
|
+
remindAfterDays: {
|
|
235
|
+
type: "integer",
|
|
236
|
+
minimum: 1,
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
file: {
|
|
241
|
+
type: "object",
|
|
242
|
+
required: [
|
|
243
|
+
"id",
|
|
244
|
+
],
|
|
245
|
+
properties: {
|
|
246
|
+
id: {
|
|
247
|
+
type: "string",
|
|
248
|
+
minLength: 1,
|
|
249
|
+
pattern: "\\S",
|
|
250
|
+
},
|
|
251
|
+
name: {
|
|
252
|
+
type: "string",
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
instance: {
|
|
257
|
+
type: "string",
|
|
258
|
+
pattern: "^[a-z][a-z0-9-]{0,30}$",
|
|
259
|
+
},
|
|
260
|
+
snippets: {
|
|
261
|
+
type: "array",
|
|
262
|
+
items: {
|
|
263
|
+
type: "string",
|
|
264
|
+
minLength: 1,
|
|
265
|
+
pattern: "^(?![/\\\\])(?![A-Za-z]:[/\\\\])(?!.*(?:^|[/\\\\])\\.\\.(?:[/\\\\]|$)).+$",
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
adapters: {
|
|
269
|
+
type: "array",
|
|
270
|
+
items: {
|
|
271
|
+
type: "string",
|
|
272
|
+
minLength: 1,
|
|
273
|
+
},
|
|
274
|
+
},
|
|
27
275
|
baselines: {
|
|
28
|
-
type: "object",
|
|
276
|
+
type: "object",
|
|
277
|
+
required: [
|
|
278
|
+
"page",
|
|
279
|
+
"root",
|
|
280
|
+
"frames",
|
|
281
|
+
],
|
|
29
282
|
properties: {
|
|
30
|
-
page: {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
283
|
+
page: {
|
|
284
|
+
type: "string",
|
|
285
|
+
minLength: 1,
|
|
286
|
+
},
|
|
287
|
+
root: {
|
|
288
|
+
type: "string",
|
|
289
|
+
minLength: 1,
|
|
290
|
+
pattern: "^(?![/\\\\])(?![A-Za-z]:[/\\\\])(?!.*(?:^|[/\\\\])\\.\\.(?:[/\\\\]|$)).+$",
|
|
291
|
+
},
|
|
292
|
+
coverage: {
|
|
293
|
+
type: "object",
|
|
294
|
+
required: [
|
|
295
|
+
"required",
|
|
296
|
+
],
|
|
297
|
+
properties: {
|
|
298
|
+
required: {
|
|
299
|
+
type: "array",
|
|
300
|
+
minItems: 1,
|
|
301
|
+
maxItems: 1000,
|
|
302
|
+
items: requiredCaseSchema,
|
|
303
|
+
},
|
|
304
|
+
unsupported: {
|
|
305
|
+
type: "array",
|
|
306
|
+
maxItems: 1000,
|
|
307
|
+
items: {
|
|
308
|
+
...requiredCaseSchema,
|
|
309
|
+
required: [
|
|
310
|
+
...requiredCaseSchema.required,
|
|
311
|
+
"reason",
|
|
312
|
+
],
|
|
313
|
+
properties: {
|
|
314
|
+
...requiredCaseSchema.properties,
|
|
315
|
+
reason: {
|
|
316
|
+
type: "string",
|
|
317
|
+
minLength: 1,
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
threshold: {
|
|
325
|
+
type: "number",
|
|
326
|
+
minimum: 0,
|
|
327
|
+
maximum: 1,
|
|
328
|
+
},
|
|
34
329
|
frames: {
|
|
35
|
-
type: "array",
|
|
330
|
+
type: "array",
|
|
331
|
+
minItems: 1,
|
|
332
|
+
maxItems: 1000,
|
|
36
333
|
items: {
|
|
37
|
-
type: "object",
|
|
334
|
+
type: "object",
|
|
335
|
+
required: [
|
|
336
|
+
"frame",
|
|
337
|
+
"id",
|
|
338
|
+
],
|
|
339
|
+
dependentRequired: {
|
|
340
|
+
case: [
|
|
341
|
+
"route",
|
|
342
|
+
],
|
|
343
|
+
},
|
|
38
344
|
properties: {
|
|
39
|
-
frame: {
|
|
40
|
-
|
|
41
|
-
|
|
345
|
+
frame: {
|
|
346
|
+
type: "string",
|
|
347
|
+
minLength: 1,
|
|
348
|
+
},
|
|
349
|
+
id: {
|
|
350
|
+
type: "string",
|
|
351
|
+
pattern: "^[a-z0-9][a-z0-9_-]{0,63}$",
|
|
352
|
+
},
|
|
353
|
+
route: {
|
|
354
|
+
type: "string",
|
|
355
|
+
minLength: 1,
|
|
356
|
+
},
|
|
42
357
|
case: baselineCaseSchema,
|
|
43
358
|
},
|
|
44
359
|
},
|
|
@@ -48,28 +363,72 @@ export const projectConfigSchema = {
|
|
|
48
363
|
},
|
|
49
364
|
oneOf: [
|
|
50
365
|
{
|
|
51
|
-
required: [
|
|
366
|
+
required: [
|
|
367
|
+
"profile",
|
|
368
|
+
],
|
|
52
369
|
properties: {
|
|
53
370
|
profile: {
|
|
54
|
-
type: "object",
|
|
55
|
-
|
|
371
|
+
type: "object",
|
|
372
|
+
required: [
|
|
373
|
+
"type",
|
|
374
|
+
"origin",
|
|
375
|
+
],
|
|
376
|
+
properties: {
|
|
377
|
+
type: {
|
|
378
|
+
const: "external",
|
|
379
|
+
},
|
|
380
|
+
origin: {
|
|
381
|
+
type: "string",
|
|
382
|
+
pattern: "^https?://[^/?#]+$",
|
|
383
|
+
},
|
|
384
|
+
},
|
|
56
385
|
},
|
|
57
386
|
},
|
|
58
387
|
},
|
|
59
388
|
{
|
|
60
|
-
required: [
|
|
61
|
-
|
|
389
|
+
required: [
|
|
390
|
+
"penpotVersion",
|
|
391
|
+
"ports",
|
|
392
|
+
"directory",
|
|
393
|
+
],
|
|
394
|
+
not: {
|
|
395
|
+
required: [
|
|
396
|
+
"profile",
|
|
397
|
+
],
|
|
398
|
+
},
|
|
62
399
|
properties: {
|
|
63
|
-
penpotVersion: {
|
|
400
|
+
penpotVersion: {
|
|
401
|
+
type: "string",
|
|
402
|
+
pattern: "^\\d+\\.\\d+(\\.\\d+)?$",
|
|
403
|
+
},
|
|
64
404
|
ports: {
|
|
65
|
-
type: "object",
|
|
405
|
+
type: "object",
|
|
406
|
+
required: [
|
|
407
|
+
"frontend",
|
|
408
|
+
"mail",
|
|
409
|
+
],
|
|
66
410
|
properties: {
|
|
67
|
-
frontend: {
|
|
68
|
-
|
|
411
|
+
frontend: {
|
|
412
|
+
type: "integer",
|
|
413
|
+
minimum: 1024,
|
|
414
|
+
maximum: 65535,
|
|
415
|
+
},
|
|
416
|
+
mail: {
|
|
417
|
+
type: "integer",
|
|
418
|
+
minimum: 1024,
|
|
419
|
+
maximum: 65535,
|
|
420
|
+
},
|
|
69
421
|
},
|
|
70
422
|
},
|
|
71
|
-
directory: {
|
|
72
|
-
|
|
423
|
+
directory: {
|
|
424
|
+
type: "string",
|
|
425
|
+
minLength: 1,
|
|
426
|
+
pattern: "^(?!/).+$",
|
|
427
|
+
},
|
|
428
|
+
composeProject: {
|
|
429
|
+
type: "string",
|
|
430
|
+
pattern: "^[a-z0-9][a-z0-9_-]*$",
|
|
431
|
+
},
|
|
73
432
|
},
|
|
74
433
|
},
|
|
75
434
|
],
|