@lesliechan721/aw-plugin-core 0.1.0-beta.7 → 0.1.0-beta.9

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.
Files changed (37) hide show
  1. package/dist/aw-capabilities.d.ts +27 -0
  2. package/dist/aw-capabilities.js +106 -0
  3. package/dist/aw-capabilities.js.map +1 -0
  4. package/dist/catalog-workspace-resolution.d.ts +3 -0
  5. package/dist/catalog-workspace-resolution.js +34 -0
  6. package/dist/catalog-workspace-resolution.js.map +1 -0
  7. package/dist/generated/{plugin-manifest-v1.d.ts → plugin-manifest-v2.d.ts} +44 -31
  8. package/dist/generated/{plugin-manifest-v1.js → plugin-manifest-v2.js} +1 -1
  9. package/dist/generated/plugin-manifest-v2.js.map +1 -0
  10. package/dist/index.d.ts +2 -2
  11. package/dist/index.js +1 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/manifest-contract.d.ts +3 -6
  14. package/dist/manifest-contract.js +54 -63
  15. package/dist/manifest-contract.js.map +1 -1
  16. package/dist/manifest-type-contract.d.ts +2 -2
  17. package/dist/manifest.d.ts +8 -8
  18. package/dist/manifest.js +9 -7
  19. package/dist/manifest.js.map +1 -1
  20. package/dist/plugin-authoring-capabilities.js +4 -3
  21. package/dist/plugin-authoring-capabilities.js.map +1 -1
  22. package/dist/plugin-requirements.d.ts +34 -0
  23. package/dist/plugin-requirements.js +248 -0
  24. package/dist/plugin-requirements.js.map +1 -0
  25. package/dist/plugin-script-contract.d.ts +8 -0
  26. package/dist/plugin-script-contract.js +38 -1
  27. package/dist/plugin-script-contract.js.map +1 -1
  28. package/dist/types.d.ts +25 -22
  29. package/dist/workspace.d.ts +17 -9
  30. package/dist/workspace.js +299 -138
  31. package/dist/workspace.js.map +1 -1
  32. package/package.json +2 -2
  33. package/schemas/{plugin-manifest-v1.json → plugin-manifest-v2.json} +41 -11
  34. package/dist/generated/plugin-manifest-v1.js.map +0 -1
  35. package/dist/plugin-release.d.ts +0 -30
  36. package/dist/plugin-release.js +0 -187
  37. package/dist/plugin-release.js.map +0 -1
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { PluginManifestSourceV1 } from './generated/plugin-manifest-v1.js';
1
+ import type { PluginManifestSourceV2 } from './generated/plugin-manifest-v2.js';
2
2
  export type PlatformName = 'codex' | 'claude';
3
3
  export type DistributionName = 'agent-skills';
4
4
  export type Scope = 'project' | 'user';
@@ -10,7 +10,7 @@ export type CatalogSourceId = string;
10
10
  export type SourceIdentity = string;
11
11
  export type SupportedPlatformSet = ReadonlySet<PlatformName>;
12
12
  export type CodexProjectManagedKind = 'skill' | 'mcpServer' | 'instruction' | 'permission' | 'hook' | 'agent';
13
- export type PluginInterfaceMeta = NonNullable<PluginManifestSourceV1['interface']>;
13
+ export type PluginInterfaceMeta = NonNullable<PluginManifestSourceV2['interface']>;
14
14
  export interface MarketplaceOwner {
15
15
  name: string;
16
16
  url: string;
@@ -25,9 +25,9 @@ export interface MarketplaceSourceMeta {
25
25
  version: string;
26
26
  };
27
27
  }
28
- export type MarketplacePolicy = PluginManifestSourceV1['marketplace']['policy'];
28
+ export type MarketplacePolicy = PluginManifestSourceV2['marketplace']['policy'];
29
29
  export type MarketplaceAuthenticationPolicy = MarketplacePolicy['authentication'];
30
- export type PluginMarketplaceMeta = PluginManifestSourceV1['marketplace'];
30
+ export type PluginMarketplaceMeta = PluginManifestSourceV2['marketplace'];
31
31
  export type TemplateValue = string | boolean;
32
32
  export interface TemplateVarByPlatform {
33
33
  claude: TemplateValue;
@@ -55,6 +55,11 @@ export interface BuildConfigManifestOverrides {
55
55
  export interface BuildConfigRuntimeExport {
56
56
  name: string;
57
57
  source: string;
58
+ requires: {
59
+ aw: {
60
+ capabilities: string[];
61
+ };
62
+ };
58
63
  }
59
64
  export interface BuildConfigImportReference {
60
65
  plugin: string;
@@ -250,6 +255,8 @@ export interface ArtifactRuntimeImportDefinition extends BuildConfigImportRefere
250
255
  providerPluginId: PluginId;
251
256
  providerVersion: PluginVersion;
252
257
  source: string;
258
+ requiredCapabilities: string[];
259
+ capabilitySetDigest: string;
253
260
  };
254
261
  }
255
262
  export interface PluginArtifactTargetDefinition {
@@ -277,15 +284,14 @@ export interface PluginAgentSkillsDistribution {
277
284
  export interface PluginDistributionsConfig {
278
285
  agentSkills?: PluginAgentSkillsDistribution;
279
286
  }
280
- export interface PluginCompatibility {
287
+ export interface PluginRequirements {
281
288
  aw: {
282
- minVersion: CliVersion;
289
+ capabilities?: string[];
283
290
  };
284
291
  }
285
- export type PluginManifestSource = PluginManifestSourceV1;
286
- export type NormalizedPluginManifest = Omit<PluginManifestSourceV1, 'schemaVersion' | 'compatibility' | 'extensions' | 'artifacts' | 'buildConfig' | 'scripts' | 'config'> & {
287
- schemaVersion: 1;
288
- compatibility: PluginCompatibility;
292
+ export type PluginManifestSource = PluginManifestSourceV2;
293
+ export type NormalizedPluginManifest = Omit<PluginManifestSourceV2, 'requires' | 'extensions' | 'artifacts' | 'buildConfig' | 'scripts' | 'config'> & {
294
+ requires?: PluginRequirements;
289
295
  extensions?: PluginExtensions;
290
296
  artifacts?: PluginArtifactsConfig;
291
297
  buildConfig?: BuildConfig;
@@ -326,12 +332,13 @@ export interface CatalogManifestEntry {
326
332
  tags?: string[];
327
333
  strict: boolean;
328
334
  policy: MarketplacePolicy;
329
- compatibility: PluginCompatibility;
335
+ dependencies: PluginId[];
336
+ requires: PluginRequirements;
330
337
  source: string;
331
338
  artifactDigest: string;
332
339
  manifestDigest: string;
333
340
  }
334
- export interface CatalogManifestV4Entry extends CatalogManifestEntry {
341
+ export interface CatalogManifestV6Entry extends CatalogManifestEntry {
335
342
  name: PluginId;
336
343
  contentDigest: string;
337
344
  }
@@ -339,29 +346,25 @@ export interface CatalogMarketplaceIdentity {
339
346
  owner: MarketplaceOwner;
340
347
  interface: MarketplaceInterfaceMeta;
341
348
  }
342
- export type CatalogManifestV4Release = {
349
+ export type CatalogManifestV6Release = {
343
350
  state: 'development';
344
351
  } | {
345
352
  state: 'published';
346
- targetVersion: string;
347
- planId: string;
348
353
  sourceHead: string;
349
- contentDigest: string;
350
354
  };
351
- export interface CatalogManifestV4 {
352
- schemaVersion: 4;
355
+ export interface CatalogManifestV6 {
356
+ schemaVersion: 6;
353
357
  catalogVersion: string;
354
358
  channel: CatalogChannel;
355
- compatibility: PluginCompatibility;
359
+ requires: PluginRequirements;
356
360
  marketplace: CatalogMarketplaceIdentity;
357
- release: CatalogManifestV4Release;
358
- entries: CatalogManifestV4Entry[];
361
+ release: CatalogManifestV6Release;
362
+ entries: CatalogManifestV6Entry[];
359
363
  }
360
364
  export interface PlatformPluginManifest {
361
365
  name: string;
362
366
  version: PluginVersion;
363
367
  description: string;
364
- compatibility: PluginCompatibility;
365
368
  skills?: string;
366
369
  mcpServers?: string;
367
370
  apps?: string;
@@ -1,6 +1,5 @@
1
- import { type PluginReleaseLedger } from './plugin-release.js';
2
1
  import type { ReservedImportRegistry } from './manifest-contract.js';
3
- import type { CatalogChannel, CatalogManifestV4, MarketplaceSourceMeta, PluginMeta } from './types.js';
2
+ import type { CatalogChannel, CatalogManifestV6, MarketplaceSourceMeta, PluginMeta } from './types.js';
4
3
  export declare const DEFAULT_CATALOG_WORKSPACE_VERSION = "0.1.0";
5
4
  export declare const DEFAULT_CATALOG_OUTPUT_PATH: string;
6
5
  export declare const DEFAULT_PUBLISHED_CATALOG_OUTPUT_PATH: string;
@@ -50,6 +49,10 @@ export declare function resolveCatalogWorkspaceOutputPath(options: {
50
49
  workspaceRoot: string;
51
50
  outputRoot: string;
52
51
  }>;
52
+ export declare function readCatalogWorkspaceMarker(workspaceRoot: string): Promise<{
53
+ markerPath: string;
54
+ workspaceIdentity: string;
55
+ }>;
53
56
  export declare function initializeCatalogWorkspace(options: CatalogWorkspaceInitOptions): Promise<{
54
57
  workspaceRoot: string;
55
58
  markerPath: string;
@@ -61,6 +64,7 @@ export declare function readCatalogWorkspace(workspaceRoot: string, options?: Ca
61
64
  export declare function resolveCatalogVersionMutation(currentVersion: string, mutation: CatalogVersionMutation): string;
62
65
  export declare function mutateCatalogWorkspaceVersion(workspaceRoot: string, mutation: CatalogVersionMutation, options?: CatalogWorkspaceSourceOptions): Promise<MarketplaceSourceMeta>;
63
66
  export declare function deriveCatalogChannel(version: string): CatalogChannel;
67
+ export declare function calculateCatalogWorkspaceSourceIdentity(workspace: Pick<CatalogWorkspace, 'workspaceRoot' | 'metadataPath' | 'plugins'>): Promise<string>;
64
68
  export declare function buildCatalogWorkspace(options: {
65
69
  workspaceRoot: string;
66
70
  outputPath?: string;
@@ -75,8 +79,7 @@ export declare function buildCatalogWorkspace(options: {
75
79
  }>;
76
80
  export declare function validatePublishedCatalogSnapshot(snapshotDirectory: string): Promise<{
77
81
  rootDir: string;
78
- manifest: CatalogManifestV4;
79
- ledger: PluginReleaseLedger;
82
+ manifest: CatalogManifestV6;
80
83
  snapshotDigest: string;
81
84
  }>;
82
85
  export declare function preparePublishedCatalogWorkspace(options: {
@@ -92,8 +95,6 @@ export declare function preparePublishedCatalogWorkspace(options: {
92
95
  channel: CatalogChannel;
93
96
  pluginNames: string[];
94
97
  snapshotDigest: string;
95
- contentDigest: string;
96
- planId: string;
97
98
  }>;
98
99
  export declare function buildCatalogWorkspacePlugin(options: {
99
100
  workspaceRoot: string;
@@ -108,9 +109,16 @@ export declare function buildCatalogWorkspacePlugin(options: {
108
109
  dependencies: string[];
109
110
  digest: string;
110
111
  }>;
111
- export declare function validateCatalogSnapshot(snapshotDirectory: string): Promise<{
112
+ export declare function validateCatalogSnapshotTransport(snapshotDirectory: string): Promise<{
112
113
  rootDir: string;
113
- manifest: CatalogManifestV4;
114
- ledger?: PluginReleaseLedger;
114
+ manifest: CatalogManifestV6;
115
115
  snapshotDigest: string;
116
116
  }>;
117
+ type CatalogSnapshotValidationResult = {
118
+ rootDir: string;
119
+ manifest: CatalogManifestV6;
120
+ snapshotDigest: string;
121
+ };
122
+ export declare function validateCatalogSnapshotPluginEntriesComplete(snapshotDirectory: string, pluginNames: readonly string[]): Promise<CatalogSnapshotValidationResult>;
123
+ export declare function validateCatalogSnapshotComplete(snapshotDirectory: string): Promise<CatalogSnapshotValidationResult>;
124
+ export {};