@lesliechan721/aw-plugin-core 0.1.0-beta.37 → 0.1.0-beta.39
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/aw-capabilities.d.ts +1 -1
- package/dist/aw-capabilities.js +4 -0
- package/dist/aw-capabilities.js.map +1 -1
- package/dist/generated/plugin-manifest-v3.d.ts +458 -5
- package/dist/manifest-contract.js +19 -1
- package/dist/manifest-contract.js.map +1 -1
- package/dist/manifest.d.ts +2 -1
- package/dist/manifest.js +7 -1
- package/dist/manifest.js.map +1 -1
- package/dist/plugin-authoring-capabilities.js +18 -7
- package/dist/plugin-authoring-capabilities.js.map +1 -1
- package/dist/plugin-config.d.ts +15 -1
- package/dist/plugin-config.js +422 -42
- package/dist/plugin-config.js.map +1 -1
- package/dist/plugin-requirements.js +34 -2
- package/dist/plugin-requirements.js.map +1 -1
- package/dist/plugin-script-contract.d.ts +1 -0
- package/dist/plugin-script-contract.js +8 -0
- package/dist/plugin-script-contract.js.map +1 -1
- package/dist/runtime-config.d.ts +38 -0
- package/dist/runtime-config.js +31 -0
- package/dist/runtime-config.js.map +1 -0
- package/dist/types.d.ts +72 -4
- package/package.json +1 -1
- package/schemas/plugin-manifest-v3.json +1261 -4
package/dist/types.d.ts
CHANGED
|
@@ -126,8 +126,10 @@ export interface PluginScriptsConfig {
|
|
|
126
126
|
tests?: PluginScriptTestsConfig;
|
|
127
127
|
}
|
|
128
128
|
export type PluginConfigScalar = string | number | boolean;
|
|
129
|
-
export type
|
|
130
|
-
export type
|
|
129
|
+
export type PluginConfigScalarArray = string[] | number[] | boolean[];
|
|
130
|
+
export type PluginConfigScalarObject = Record<string, PluginConfigScalar>;
|
|
131
|
+
export type PluginConfigObject = Record<string, PluginConfigScalar | PluginConfigScalarArray | PluginConfigScalarObject>;
|
|
132
|
+
export type PluginConfigArray = PluginConfigScalarArray | PluginConfigObject[];
|
|
131
133
|
export type PluginConfigValue = PluginConfigScalar | PluginConfigObject | PluginConfigArray;
|
|
132
134
|
export type PluginConfigFieldType = 'string' | 'number' | 'boolean' | 'object' | 'array';
|
|
133
135
|
export type PluginConfigStringFormat = 'identifier' | 'slug' | 'semver' | 'url' | 'hostname' | 'email';
|
|
@@ -163,6 +165,13 @@ export interface PluginConfigArrayValidation {
|
|
|
163
165
|
minItems?: number;
|
|
164
166
|
maxItems?: number;
|
|
165
167
|
uniqueItems?: boolean;
|
|
168
|
+
uniqueBy?: string;
|
|
169
|
+
}
|
|
170
|
+
export interface PluginConfigValueReference {
|
|
171
|
+
field: string;
|
|
172
|
+
key: string;
|
|
173
|
+
label?: string;
|
|
174
|
+
include?: PluginConfigScalar[];
|
|
166
175
|
}
|
|
167
176
|
export interface PluginConfigFieldBase<Value extends PluginConfigValue> {
|
|
168
177
|
title?: string;
|
|
@@ -173,7 +182,9 @@ export interface PluginConfigFieldBase<Value extends PluginConfigValue> {
|
|
|
173
182
|
}
|
|
174
183
|
interface PluginConfigPlainStringField extends Omit<PluginConfigFieldBase<string>, 'sensitive'> {
|
|
175
184
|
type: 'string';
|
|
185
|
+
const?: string;
|
|
176
186
|
sensitive?: false;
|
|
187
|
+
valueRef?: PluginConfigValueReference;
|
|
177
188
|
choices?: PluginConfigChoices<string>;
|
|
178
189
|
validation?: PluginConfigStringValidation;
|
|
179
190
|
}
|
|
@@ -182,24 +193,43 @@ interface PluginConfigSensitiveStringField extends Omit<PluginConfigFieldBase<st
|
|
|
182
193
|
sensitive: true;
|
|
183
194
|
default?: never;
|
|
184
195
|
choices?: never;
|
|
196
|
+
const?: never;
|
|
185
197
|
validation?: PluginConfigStringValidation;
|
|
186
198
|
}
|
|
187
199
|
export type PluginConfigStringField = PluginConfigPlainStringField | PluginConfigSensitiveStringField;
|
|
188
200
|
export interface PluginConfigNumberField extends PluginConfigFieldBase<number> {
|
|
189
201
|
type: 'number';
|
|
202
|
+
const?: number;
|
|
203
|
+
valueRef?: PluginConfigValueReference;
|
|
190
204
|
choices?: PluginConfigChoices<number>;
|
|
191
205
|
validation?: PluginConfigNumberValidation;
|
|
192
206
|
}
|
|
193
207
|
export interface PluginConfigBooleanField extends PluginConfigFieldBase<boolean> {
|
|
194
208
|
type: 'boolean';
|
|
209
|
+
const?: boolean;
|
|
210
|
+
valueRef?: PluginConfigValueReference;
|
|
195
211
|
choices?: PluginConfigChoices<boolean>;
|
|
196
212
|
}
|
|
197
213
|
export type PluginConfigScalarField = PluginConfigStringField | PluginConfigNumberField | PluginConfigBooleanField;
|
|
198
214
|
type DistributiveOmit<Value, Key extends PropertyKey> = Value extends unknown ? Omit<Value, Key> : never;
|
|
199
215
|
type PluginConfigNonSensitiveScalarField = PluginConfigPlainStringField | PluginConfigNumberField | PluginConfigBooleanField;
|
|
200
|
-
export type
|
|
216
|
+
export type PluginConfigScalarPropertyField = DistributiveOmit<PluginConfigNonSensitiveScalarField, 'default' | 'sensitive'> & {
|
|
201
217
|
sensitive?: never;
|
|
202
218
|
};
|
|
219
|
+
export interface PluginConfigLeafArrayField extends Omit<PluginConfigFieldBase<PluginConfigScalarArray>, 'default'> {
|
|
220
|
+
type: 'array';
|
|
221
|
+
items: PluginConfigAdditionalPropertiesField;
|
|
222
|
+
choices?: PluginConfigChoices<PluginConfigScalarArray>;
|
|
223
|
+
validation?: Omit<PluginConfigArrayValidation, 'uniqueBy'>;
|
|
224
|
+
}
|
|
225
|
+
export interface PluginConfigLeafObjectField extends Omit<PluginConfigFieldBase<PluginConfigScalarObject>, 'default'> {
|
|
226
|
+
type: 'object';
|
|
227
|
+
properties?: never;
|
|
228
|
+
additionalProperties: PluginConfigAdditionalPropertiesField;
|
|
229
|
+
choices?: PluginConfigChoices<PluginConfigScalarObject>;
|
|
230
|
+
validation?: PluginConfigObjectValidation;
|
|
231
|
+
}
|
|
232
|
+
export type PluginConfigObjectPropertyField = PluginConfigScalarPropertyField | PluginConfigLeafArrayField | PluginConfigLeafObjectField;
|
|
203
233
|
export type PluginConfigAdditionalPropertiesField = DistributiveOmit<PluginConfigNonSensitiveScalarField, 'default' | 'required' | 'sensitive'> & {
|
|
204
234
|
sensitive?: never;
|
|
205
235
|
};
|
|
@@ -211,9 +241,22 @@ interface PluginConfigObjectFieldBase extends PluginConfigFieldBase<PluginConfig
|
|
|
211
241
|
export interface PluginConfigFixedObjectField extends PluginConfigObjectFieldBase {
|
|
212
242
|
properties: Record<string, PluginConfigObjectPropertyField>;
|
|
213
243
|
additionalProperties?: false;
|
|
244
|
+
variants?: PluginConfigObjectVariants;
|
|
245
|
+
}
|
|
246
|
+
export interface PluginConfigObjectVariant {
|
|
247
|
+
properties: Record<string, PluginConfigObjectPropertyField>;
|
|
248
|
+
}
|
|
249
|
+
export interface PluginConfigObjectVariants {
|
|
250
|
+
discriminator: string;
|
|
251
|
+
cases: Record<string, PluginConfigObjectVariant>;
|
|
252
|
+
missing?: string;
|
|
253
|
+
otherwise?: PluginConfigObjectVariant;
|
|
214
254
|
}
|
|
215
255
|
export interface PluginConfigKeyValueObjectField extends PluginConfigObjectFieldBase {
|
|
256
|
+
default?: PluginConfigScalarObject;
|
|
257
|
+
choices?: PluginConfigChoices<PluginConfigScalarObject>;
|
|
216
258
|
properties?: never;
|
|
259
|
+
variants?: never;
|
|
217
260
|
additionalProperties: PluginConfigAdditionalPropertiesField;
|
|
218
261
|
}
|
|
219
262
|
export type PluginConfigObjectField = PluginConfigFixedObjectField | PluginConfigKeyValueObjectField;
|
|
@@ -256,12 +299,36 @@ export interface PluginConfigPresentation {
|
|
|
256
299
|
}>;
|
|
257
300
|
groups?: PluginConfigPresentationGroup[];
|
|
258
301
|
}
|
|
302
|
+
type PluginConfigLegacyScalarField = DistributiveOmit<PluginConfigScalarField, 'const'>;
|
|
303
|
+
type PluginConfigLegacyScalarPropertyField = DistributiveOmit<PluginConfigScalarPropertyField, 'const'>;
|
|
304
|
+
type PluginConfigLegacyAdditionalPropertiesField = DistributiveOmit<PluginConfigAdditionalPropertiesField, 'const'>;
|
|
305
|
+
type PluginConfigLegacyObjectField = (Omit<PluginConfigFixedObjectField, 'properties' | 'variants' | 'default' | 'choices'> & {
|
|
306
|
+
properties: Record<string, PluginConfigLegacyScalarPropertyField>;
|
|
307
|
+
default?: PluginConfigScalarObject;
|
|
308
|
+
choices?: PluginConfigChoices<PluginConfigScalarObject>;
|
|
309
|
+
}) | (Omit<PluginConfigKeyValueObjectField, 'additionalProperties'> & {
|
|
310
|
+
additionalProperties: PluginConfigLegacyAdditionalPropertiesField;
|
|
311
|
+
});
|
|
312
|
+
type PluginConfigLegacyArray = PluginConfigScalarArray | PluginConfigScalarObject[];
|
|
313
|
+
type PluginConfigLegacyArrayField = Omit<PluginConfigArrayField, 'default' | 'choices' | 'items'> & {
|
|
314
|
+
default?: PluginConfigLegacyArray;
|
|
315
|
+
choices?: PluginConfigChoices<PluginConfigLegacyArray>;
|
|
316
|
+
items: DistributiveOmit<PluginConfigLegacyScalarField | PluginConfigLegacyObjectField, 'default' | 'required' | 'sensitive'> & {
|
|
317
|
+
default?: never;
|
|
318
|
+
required?: never;
|
|
319
|
+
sensitive?: never;
|
|
320
|
+
};
|
|
321
|
+
};
|
|
259
322
|
export type PluginConfigDefinition = {
|
|
260
323
|
schemaVersion?: never;
|
|
261
|
-
fields: Record<string,
|
|
324
|
+
fields: Record<string, PluginConfigLegacyScalarField | PluginConfigLegacyObjectField>;
|
|
262
325
|
presentation?: Pick<PluginConfigPresentation, 'groups'>;
|
|
263
326
|
} | {
|
|
264
327
|
schemaVersion: 3;
|
|
328
|
+
fields: Record<string, PluginConfigLegacyScalarField | PluginConfigLegacyObjectField | PluginConfigLegacyArrayField>;
|
|
329
|
+
presentation?: PluginConfigPresentation;
|
|
330
|
+
} | {
|
|
331
|
+
schemaVersion: 4;
|
|
265
332
|
fields: Record<string, PluginConfigSchemaField>;
|
|
266
333
|
presentation?: PluginConfigPresentation;
|
|
267
334
|
};
|
|
@@ -382,6 +449,7 @@ interface PluginArtifactTargetDefinitionBase {
|
|
|
382
449
|
skillKey?: string;
|
|
383
450
|
sourceDirs?: string[];
|
|
384
451
|
runtimeImports?: ArtifactRuntimeImportDefinition[];
|
|
452
|
+
runtimeConfig?: import('./runtime-config.js').PluginRuntimeConfigDeclaration;
|
|
385
453
|
}
|
|
386
454
|
export type PluginArtifactTargetDefinition = PluginArtifactTargetDefinitionBase & {
|
|
387
455
|
target: 'codex.skill';
|