@lesliechan721/aw-plugin-core 0.1.0-beta.54 → 0.1.0-beta.55

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.
@@ -32,11 +32,397 @@
32
32
  "interface": { "$ref": "#/$defs/interface" },
33
33
  "extensions": { "$ref": "#/$defs/extensions" },
34
34
  "artifacts": { "$ref": "#/$defs/artifacts" },
35
+ "managedCommands": { "$ref": "#/$defs/managedCommands" },
35
36
  "buildConfig": { "$ref": "#/$defs/buildConfig" },
36
37
  "scripts": { "$ref": "#/$defs/scripts" },
37
38
  "config": { "$ref": "#/$defs/config" }
38
39
  },
39
40
  "$defs": {
41
+ "commandName": {
42
+ "type": "string",
43
+ "pattern": "^[A-Za-z][A-Za-z0-9_.-]{0,63}$"
44
+ },
45
+ "commandRelativeFile": {
46
+ "type": "string",
47
+ "minLength": 1,
48
+ "pattern": "^(?!/|\\./|[A-Za-z]:)(?!.*(?:\\\\|[\\u0000-\\u001f\\u007f-\\u009f]))(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)(?!.*\\/$).+$"
49
+ },
50
+ "commandEnvironment": {
51
+ "type": "object",
52
+ "propertyNames": {
53
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
54
+ },
55
+ "additionalProperties": {
56
+ "type": "string",
57
+ "maxLength": 4096
58
+ }
59
+ },
60
+ "commandEnvironmentSource": {
61
+ "type": "object",
62
+ "propertyNames": {
63
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
64
+ },
65
+ "additionalProperties": {
66
+ "type": "string",
67
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
68
+ }
69
+ },
70
+ "commandDefinition": {
71
+ "type": "object",
72
+ "additionalProperties": false,
73
+ "required": [
74
+ "key",
75
+ "runner",
76
+ "entry"
77
+ ],
78
+ "properties": {
79
+ "key": {
80
+ "$ref": "#/$defs/commandName"
81
+ },
82
+ "variant": {
83
+ "$ref": "#/$defs/commandName"
84
+ },
85
+ "runner": {
86
+ "enum": [
87
+ "node",
88
+ "executable"
89
+ ]
90
+ },
91
+ "entry": {
92
+ "$ref": "#/$defs/commandRelativeFile"
93
+ },
94
+ "args": {
95
+ "type": "array",
96
+ "items": {
97
+ "type": "string",
98
+ "maxLength": 4096
99
+ },
100
+ "maxItems": 128
101
+ },
102
+ "env": {
103
+ "$ref": "#/$defs/commandEnvironment"
104
+ },
105
+ "envFrom": {
106
+ "$ref": "#/$defs/commandEnvironmentSource"
107
+ },
108
+ "cwd": {
109
+ "enum": [
110
+ "caller",
111
+ "resource"
112
+ ]
113
+ }
114
+ }
115
+ },
116
+ "managedCommandReference": {
117
+ "type": "object",
118
+ "additionalProperties": false,
119
+ "required": [
120
+ "set",
121
+ "key"
122
+ ],
123
+ "properties": {
124
+ "set": {
125
+ "$ref": "#/$defs/commandName"
126
+ },
127
+ "key": {
128
+ "$ref": "#/$defs/commandName"
129
+ },
130
+ "variant": {
131
+ "$ref": "#/$defs/commandName"
132
+ }
133
+ }
134
+ },
135
+ "managedCommandPermission": {
136
+ "type": "object",
137
+ "additionalProperties": false,
138
+ "required": [
139
+ "command"
140
+ ],
141
+ "properties": {
142
+ "command": {
143
+ "$ref": "#/$defs/managedCommandReference"
144
+ },
145
+ "argsPrefix": {
146
+ "type": "array",
147
+ "items": {
148
+ "type": "string",
149
+ "pattern": "^[A-Za-z0-9_./:@%+=,-]+$"
150
+ }
151
+ }
152
+ }
153
+ },
154
+ "permissionCommands": {
155
+ "type": "array",
156
+ "items": {
157
+ "anyOf": [
158
+ {
159
+ "type": "string",
160
+ "minLength": 1
161
+ },
162
+ {
163
+ "$ref": "#/$defs/managedCommandPermission"
164
+ }
165
+ ]
166
+ }
167
+ },
168
+ "managedCommandProducer": {
169
+ "oneOf": [
170
+ {
171
+ "type": "object",
172
+ "additionalProperties": false,
173
+ "required": [
174
+ "kind",
175
+ "artifactId"
176
+ ],
177
+ "properties": {
178
+ "kind": {
179
+ "const": "artifact"
180
+ },
181
+ "artifactId": {
182
+ "type": "string",
183
+ "minLength": 1
184
+ }
185
+ }
186
+ },
187
+ {
188
+ "type": "object",
189
+ "additionalProperties": false,
190
+ "required": [
191
+ "kind",
192
+ "platform",
193
+ "skillKey"
194
+ ],
195
+ "properties": {
196
+ "kind": {
197
+ "const": "static-skill"
198
+ },
199
+ "platform": {
200
+ "enum": [
201
+ "codex",
202
+ "claude"
203
+ ]
204
+ },
205
+ "skillKey": {
206
+ "type": "string",
207
+ "minLength": 1
208
+ }
209
+ }
210
+ },
211
+ {
212
+ "type": "object",
213
+ "additionalProperties": false,
214
+ "required": [
215
+ "kind",
216
+ "packageKey"
217
+ ],
218
+ "properties": {
219
+ "kind": {
220
+ "const": "package"
221
+ },
222
+ "packageKey": {
223
+ "$ref": "#/$defs/commandName"
224
+ }
225
+ }
226
+ }
227
+ ]
228
+ },
229
+ "managedCommandPackage": {
230
+ "type": "object",
231
+ "additionalProperties": false,
232
+ "required": [
233
+ "key",
234
+ "scope",
235
+ "platforms",
236
+ "sourceDir"
237
+ ],
238
+ "properties": {
239
+ "key": {
240
+ "$ref": "#/$defs/commandName"
241
+ },
242
+ "scope": {
243
+ "enum": [
244
+ "user",
245
+ "project"
246
+ ]
247
+ },
248
+ "platforms": {
249
+ "type": "array",
250
+ "items": {
251
+ "enum": [
252
+ "codex",
253
+ "claude"
254
+ ]
255
+ },
256
+ "minItems": 1,
257
+ "uniqueItems": true
258
+ },
259
+ "sourceDir": {
260
+ "$ref": "#/$defs/pluginPath"
261
+ },
262
+ "render": {
263
+ "const": true
264
+ },
265
+ "refreshKeys": {
266
+ "type": "array",
267
+ "items": {
268
+ "type": "string"
269
+ },
270
+ "uniqueItems": true
271
+ }
272
+ }
273
+ },
274
+ "managedCommandSet": {
275
+ "oneOf": [
276
+ {
277
+ "type": "object",
278
+ "additionalProperties": false,
279
+ "required": [
280
+ "set",
281
+ "producer",
282
+ "mode",
283
+ "entries"
284
+ ],
285
+ "properties": {
286
+ "set": {
287
+ "$ref": "#/$defs/commandName"
288
+ },
289
+ "producer": {
290
+ "$ref": "#/$defs/managedCommandProducer"
291
+ },
292
+ "mode": {
293
+ "const": "static"
294
+ },
295
+ "entries": {
296
+ "type": "array",
297
+ "items": {
298
+ "$ref": "#/$defs/commandDefinition"
299
+ }
300
+ }
301
+ }
302
+ },
303
+ {
304
+ "type": "object",
305
+ "additionalProperties": false,
306
+ "required": [
307
+ "set",
308
+ "producer",
309
+ "mode",
310
+ "refreshKeys"
311
+ ],
312
+ "properties": {
313
+ "set": {
314
+ "$ref": "#/$defs/commandName"
315
+ },
316
+ "producer": {
317
+ "$ref": "#/$defs/managedCommandProducer"
318
+ },
319
+ "mode": {
320
+ "const": "dynamic"
321
+ },
322
+ "refreshKeys": {
323
+ "type": "array",
324
+ "items": {
325
+ "type": "string"
326
+ },
327
+ "uniqueItems": true
328
+ }
329
+ }
330
+ }
331
+ ]
332
+ },
333
+ "managedCommands": {
334
+ "type": "object",
335
+ "additionalProperties": false,
336
+ "required": [],
337
+ "properties": {
338
+ "packages": {
339
+ "type": "array",
340
+ "items": {
341
+ "$ref": "#/$defs/managedCommandPackage"
342
+ }
343
+ },
344
+ "sets": {
345
+ "type": "array",
346
+ "items": {
347
+ "$ref": "#/$defs/managedCommandSet"
348
+ }
349
+ }
350
+ }
351
+ },
352
+ "permissionOverrides": {
353
+ "type": "object",
354
+ "additionalProperties": false,
355
+ "required": [],
356
+ "properties": {
357
+ "codex": {
358
+ "anyOf": [
359
+ {
360
+ "type": "null"
361
+ },
362
+ {
363
+ "type": "object",
364
+ "additionalProperties": false,
365
+ "required": [],
366
+ "properties": {
367
+ "name": {
368
+ "type": "string"
369
+ },
370
+ "allow": {
371
+ "$ref": "#/$defs/permissionCommands"
372
+ },
373
+ "ask": {
374
+ "$ref": "#/$defs/permissionCommands"
375
+ },
376
+ "deny": {
377
+ "$ref": "#/$defs/permissionCommands"
378
+ }
379
+ }
380
+ }
381
+ ]
382
+ },
383
+ "claude": {
384
+ "anyOf": [
385
+ {
386
+ "type": "null"
387
+ },
388
+ {
389
+ "type": "object",
390
+ "additionalProperties": false,
391
+ "required": [],
392
+ "properties": {
393
+ "name": {
394
+ "type": "string"
395
+ },
396
+ "allow": {
397
+ "$ref": "#/$defs/permissionCommands"
398
+ },
399
+ "ask": {
400
+ "$ref": "#/$defs/permissionCommands"
401
+ },
402
+ "deny": {
403
+ "$ref": "#/$defs/permissionCommands"
404
+ },
405
+ "sandbox": {
406
+ "type": "object",
407
+ "additionalProperties": false,
408
+ "required": [
409
+ "excludedCommands"
410
+ ],
411
+ "properties": {
412
+ "excludedCommands": {
413
+ "type": "array",
414
+ "items": {
415
+ "$ref": "#/$defs/managedCommandPermission"
416
+ }
417
+ }
418
+ }
419
+ }
420
+ }
421
+ }
422
+ ]
423
+ }
424
+ }
425
+ },
40
426
  "semver": {
41
427
  "type": "string",
42
428
  "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-((?:0|[1-9][0-9]*|(?:[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))(?:\\.(?:0|[1-9][0-9]*|(?:[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)))*))?(?:\\+([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?$"
@@ -149,11 +535,25 @@
149
535
  "permission": {
150
536
  "type": "object",
151
537
  "additionalProperties": false,
152
- "required": ["name"],
538
+ "required": [
539
+ "name"
540
+ ],
153
541
  "properties": {
154
- "name": { "type": "string" }, "allow": { "$ref": "#/$defs/stringArray" },
155
- "ask": { "$ref": "#/$defs/stringArray" }, "deny": { "$ref": "#/$defs/stringArray" },
156
- "agentOverrides": { "$ref": "#/$defs/platformOverrides" }
542
+ "name": {
543
+ "type": "string"
544
+ },
545
+ "allow": {
546
+ "$ref": "#/$defs/permissionCommands"
547
+ },
548
+ "ask": {
549
+ "$ref": "#/$defs/permissionCommands"
550
+ },
551
+ "deny": {
552
+ "$ref": "#/$defs/permissionCommands"
553
+ },
554
+ "agentOverrides": {
555
+ "$ref": "#/$defs/permissionOverrides"
556
+ }
157
557
  }
158
558
  },
159
559
  "hook": {