@pulsemcp/air-core 0.0.2 → 0.0.4

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/config.d.ts CHANGED
@@ -17,11 +17,36 @@ export interface ResolveOptions {
17
17
  * Resolve all artifacts from an air.json file.
18
18
  * Each artifact property is an array of paths; files merge in order.
19
19
  * Remote URIs are delegated to the matching CatalogProvider.
20
+ *
21
+ * All `path` and `file` fields in resolved entries are absolute paths,
22
+ * making artifacts self-contained regardless of source location.
20
23
  */
21
24
  export declare function resolveArtifacts(airJsonPath: string, options?: ResolveOptions): Promise<ResolvedArtifacts>;
22
25
  /**
23
26
  * Merge two resolved artifact sets. Override wins for matching IDs.
27
+ * Composite plugins are re-expanded after merging so that newly
28
+ * added plugins that reference existing ones are fully resolved.
24
29
  */
25
30
  export declare function mergeArtifacts(base: ResolvedArtifacts, override: ResolvedArtifacts): ResolvedArtifacts;
31
+ /**
32
+ * Recursively expand plugin references.
33
+ *
34
+ * Each plugin may declare a `plugins` array referencing other plugins by ID.
35
+ * This function resolves those references recursively, merging child plugins'
36
+ * primitives (skills, mcp_servers, hooks) into the parent. The result is a
37
+ * flat set of primitive IDs on each plugin — nesting is author convenience,
38
+ * not a runtime concept.
39
+ *
40
+ * Semantics:
41
+ * - Child plugins are expanded depth-first in declaration order
42
+ * - Parent's direct declarations override children (later wins via dedup)
43
+ * - Circular references are rejected with a clear error message
44
+ * - Plugins without a `plugins` field are returned unchanged
45
+ * - The `plugins` array on each entry is preserved as metadata (e.g., for
46
+ * UI display of the dependency graph) even though primitives are inlined
47
+ *
48
+ * Returns a new ResolvedArtifacts object; the input is not mutated.
49
+ */
50
+ export declare function expandPlugins(artifacts: ResolvedArtifacts): ResolvedArtifacts;
26
51
  export declare function emptyArtifacts(): ResolvedArtifacts;
27
52
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names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5B,IAAI,EAAE,iBAAiB,EACvB,QAAQ,EAAE,iBAAiB,GAC1B,iBAAiB,CASnB;AAmBD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,iBAAiB,GAAG,iBAAiB,CAiF7E;AAED,wBAAgB,cAAc,IAAI,iBAAiB,CASlD"}
package/dist/config.js CHANGED
@@ -24,16 +24,39 @@ function getScheme(path) {
24
24
  return null;
25
25
  return scheme;
26
26
  }
27
+ /**
28
+ * Resolve relative `path` and `file` fields in artifact entries to absolute paths.
29
+ * sourceDir is the directory containing the index file (local or remote clone).
30
+ */
31
+ function resolveEntryPaths(entries, sourceDir) {
32
+ const resolved = {};
33
+ for (const [key, entry] of Object.entries(entries)) {
34
+ const e = entry;
35
+ const updated = { ...e };
36
+ if (typeof e.path === "string" && !e.path.startsWith("/")) {
37
+ updated.path = resolve(sourceDir, e.path);
38
+ }
39
+ if (typeof e.file === "string" && !e.file.startsWith("/")) {
40
+ updated.file = resolve(sourceDir, e.file);
41
+ }
42
+ resolved[key] = updated;
43
+ }
44
+ return resolved;
45
+ }
27
46
  /**
28
47
  * Load and merge entries from an array of index file paths.
29
48
  * Local paths are resolved relative to baseDir.
30
49
  * URI paths (with schemes) are delegated to the matching CatalogProvider.
50
+ *
51
+ * After loading, relative `path` and `file` fields in entries are resolved
52
+ * to absolute paths, so downstream consumers don't need source directory context.
31
53
  */
32
54
  async function loadAndMerge(paths, baseDir, providers) {
33
55
  let merged = {};
34
56
  for (const p of paths) {
35
57
  const scheme = getScheme(p);
36
58
  let data;
59
+ let sourceDir;
37
60
  if (scheme) {
38
61
  const provider = providers.find((prov) => prov.scheme === scheme);
39
62
  if (!provider) {
@@ -41,12 +64,17 @@ async function loadAndMerge(paths, baseDir, providers) {
41
64
  `Install an extension that handles this scheme.`);
42
65
  }
43
66
  data = await provider.resolve(p, baseDir);
67
+ // Use provider's resolveSourceDir if available, otherwise fall back to baseDir
68
+ sourceDir = provider.resolveSourceDir?.(p) ?? baseDir;
44
69
  }
45
70
  else {
46
- data = loadJsonFile(resolve(baseDir, p));
71
+ const resolvedPath = resolve(baseDir, p);
72
+ data = loadJsonFile(resolvedPath);
73
+ sourceDir = dirname(resolvedPath);
47
74
  }
48
75
  const entries = stripSchema(data);
49
- merged = { ...merged, ...entries };
76
+ const resolved = resolveEntryPaths(entries, sourceDir);
77
+ merged = { ...merged, ...resolved };
50
78
  }
51
79
  return merged;
52
80
  }
@@ -72,12 +100,15 @@ export function getAirJsonPath() {
72
100
  * Resolve all artifacts from an air.json file.
73
101
  * Each artifact property is an array of paths; files merge in order.
74
102
  * Remote URIs are delegated to the matching CatalogProvider.
103
+ *
104
+ * All `path` and `file` fields in resolved entries are absolute paths,
105
+ * making artifacts self-contained regardless of source location.
75
106
  */
76
107
  export async function resolveArtifacts(airJsonPath, options) {
77
108
  const airConfig = loadAirConfig(airJsonPath);
78
109
  const baseDir = dirname(resolve(airJsonPath));
79
110
  const providers = options?.providers || [];
80
- return {
111
+ const resolved = {
81
112
  skills: await loadAndMerge(airConfig.skills || [], baseDir, providers),
82
113
  references: await loadAndMerge(airConfig.references || [], baseDir, providers),
83
114
  mcp: await loadAndMerge(airConfig.mcp || [], baseDir, providers),
@@ -85,18 +116,127 @@ export async function resolveArtifacts(airJsonPath, options) {
85
116
  roots: await loadAndMerge(airConfig.roots || [], baseDir, providers),
86
117
  hooks: await loadAndMerge(airConfig.hooks || [], baseDir, providers),
87
118
  };
119
+ return expandPlugins(resolved);
88
120
  }
89
121
  /**
90
122
  * Merge two resolved artifact sets. Override wins for matching IDs.
123
+ * Composite plugins are re-expanded after merging so that newly
124
+ * added plugins that reference existing ones are fully resolved.
91
125
  */
92
126
  export function mergeArtifacts(base, override) {
93
- return {
127
+ return expandPlugins({
94
128
  skills: { ...base.skills, ...override.skills },
95
129
  references: { ...base.references, ...override.references },
96
130
  mcp: { ...base.mcp, ...override.mcp },
97
131
  plugins: { ...base.plugins, ...override.plugins },
98
132
  roots: { ...base.roots, ...override.roots },
99
133
  hooks: { ...base.hooks, ...override.hooks },
134
+ });
135
+ }
136
+ /**
137
+ * Deduplicate an array of strings, keeping the last occurrence of each value.
138
+ * This ensures parent declarations take precedence over child plugin declarations
139
+ * when arrays are concatenated as [...childIds, ...parentIds].
140
+ */
141
+ function deduplicateIds(arr) {
142
+ const seen = new Set();
143
+ const result = [];
144
+ for (let i = arr.length - 1; i >= 0; i--) {
145
+ if (!seen.has(arr[i])) {
146
+ seen.add(arr[i]);
147
+ result.unshift(arr[i]);
148
+ }
149
+ }
150
+ return result;
151
+ }
152
+ /**
153
+ * Recursively expand plugin references.
154
+ *
155
+ * Each plugin may declare a `plugins` array referencing other plugins by ID.
156
+ * This function resolves those references recursively, merging child plugins'
157
+ * primitives (skills, mcp_servers, hooks) into the parent. The result is a
158
+ * flat set of primitive IDs on each plugin — nesting is author convenience,
159
+ * not a runtime concept.
160
+ *
161
+ * Semantics:
162
+ * - Child plugins are expanded depth-first in declaration order
163
+ * - Parent's direct declarations override children (later wins via dedup)
164
+ * - Circular references are rejected with a clear error message
165
+ * - Plugins without a `plugins` field are returned unchanged
166
+ * - The `plugins` array on each entry is preserved as metadata (e.g., for
167
+ * UI display of the dependency graph) even though primitives are inlined
168
+ *
169
+ * Returns a new ResolvedArtifacts object; the input is not mutated.
170
+ */
171
+ export function expandPlugins(artifacts) {
172
+ const plugins = artifacts.plugins;
173
+ const expanded = new Map();
174
+ function expand(pluginId, ancestors) {
175
+ if (expanded.has(pluginId)) {
176
+ return expanded.get(pluginId);
177
+ }
178
+ const plugin = plugins[pluginId];
179
+ if (!plugin) {
180
+ throw new Error(`Plugin "${pluginId}" referenced by "${ancestors[ancestors.length - 1]}" not found in resolved artifacts`);
181
+ }
182
+ // Cycle detection
183
+ const cycleIndex = ancestors.indexOf(pluginId);
184
+ if (cycleIndex !== -1) {
185
+ const cycle = [...ancestors.slice(cycleIndex), pluginId].join(" → ");
186
+ throw new Error(`Circular plugin dependency detected: ${cycle}`);
187
+ }
188
+ // No child plugins — return as-is
189
+ if (!plugin.plugins || plugin.plugins.length === 0) {
190
+ expanded.set(pluginId, plugin);
191
+ return plugin;
192
+ }
193
+ // Recursively expand child plugins and collect their primitives
194
+ const childSkills = [];
195
+ const childMcpServers = [];
196
+ const childHooks = [];
197
+ for (const childId of plugin.plugins) {
198
+ const child = expand(childId, [...ancestors, pluginId]);
199
+ if (child.skills)
200
+ childSkills.push(...child.skills);
201
+ if (child.mcp_servers)
202
+ childMcpServers.push(...child.mcp_servers);
203
+ if (child.hooks)
204
+ childHooks.push(...child.hooks);
205
+ }
206
+ // Merge: children first, then parent's direct declarations (parent wins via dedup)
207
+ const mergedSkills = deduplicateIds([
208
+ ...childSkills,
209
+ ...(plugin.skills || []),
210
+ ]);
211
+ const mergedMcpServers = deduplicateIds([
212
+ ...childMcpServers,
213
+ ...(plugin.mcp_servers || []),
214
+ ]);
215
+ const mergedHooks = deduplicateIds([
216
+ ...childHooks,
217
+ ...(plugin.hooks || []),
218
+ ]);
219
+ const expandedPlugin = {
220
+ ...plugin,
221
+ skills: mergedSkills.length > 0 ? mergedSkills : undefined,
222
+ mcp_servers: mergedMcpServers.length > 0 ? mergedMcpServers : undefined,
223
+ hooks: mergedHooks.length > 0 ? mergedHooks : undefined,
224
+ };
225
+ expanded.set(pluginId, expandedPlugin);
226
+ return expandedPlugin;
227
+ }
228
+ // Expand all plugins
229
+ for (const pluginId of Object.keys(plugins)) {
230
+ expand(pluginId, []);
231
+ }
232
+ // Build the new plugins record preserving insertion order
233
+ const expandedPlugins = {};
234
+ for (const pluginId of Object.keys(plugins)) {
235
+ expandedPlugins[pluginId] = expanded.get(pluginId);
236
+ }
237
+ return {
238
+ ...artifacts,
239
+ plugins: expandedPlugins,
100
240
  };
101
241
  }
102
242
  export function emptyArtifacts() {
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,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CAAC,OAAO,CAAC,EAAE,CAAC;QAC5C,eAAe,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAE,CAAC;IACtD,CAAC;IAED,OAAO;QACL,GAAG,SAAS;QACZ,OAAO,EAAE,eAAe;KACzB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,OAAO;QACL,MAAM,EAAE,EAAE;QACV,UAAU,EAAE,EAAE;QACd,GAAG,EAAE,EAAE;QACP,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,EAAE;KACV,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export type { AirConfig, ResolvedArtifacts, SkillEntry, ReferenceEntry, McpOAuthConfig, McpServerEntry, PluginEntry, RootEntry, HookEntry, } from "./types.js";
1
+ export type { AirConfig, ResolvedArtifacts, SkillEntry, ReferenceEntry, McpOAuthConfig, McpServerEntry, PluginAuthor, PluginEntry, RootEntry, HookEntry, } from "./types.js";
2
2
  export type { AgentAdapter, CatalogProvider, SecretResolver, AirExtension, AgentSessionConfig, StartCommand, PrepareSessionOptions, PreparedSession, } from "./types.js";
3
- export { loadAirConfig, getDefaultAirJsonPath, getAirJsonPath, resolveArtifacts, mergeArtifacts, emptyArtifacts, } from "./config.js";
3
+ export { loadAirConfig, getDefaultAirJsonPath, getAirJsonPath, resolveArtifacts, mergeArtifacts, expandPlugins, emptyArtifacts, } from "./config.js";
4
4
  export type { ResolveOptions } from "./config.js";
5
5
  export { validateJson } from "./validator.js";
6
6
  export type { ValidationResult, ValidationError } from "./validator.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACd,WAAW,EACX,SAAS,EACT,SAAS,GACV,MAAM,YAAY,CAA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,EACL,aAAa,EACb,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // Config resolution
2
- export { loadAirConfig, getDefaultAirJsonPath, getAirJsonPath, resolveArtifacts, mergeArtifacts, emptyArtifacts, } from "./config.js";
2
+ export { loadAirConfig, getDefaultAirJsonPath, getAirJsonPath, resolveArtifacts, mergeArtifacts, expandPlugins, emptyArtifacts, } from "./config.js";
3
3
  // Validation
4
4
  export { validateJson } from "./validator.js";
5
5
  // Schemas
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAyBA,oBAAoB;AACpB,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,cAAc,GACf,MAAM,aAAa,CAAC;AAGrB,aAAa;AACb,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,UAAU;AACV,OAAO,EACL,aAAa,EACb,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA0BA,oBAAoB;AACpB,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,cAAc,GACf,MAAM,aAAa,CAAC;AAGrB,aAAa;AACb,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,UAAU;AACV,OAAO,EACL,aAAa,EACb,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,cAAc,CAAC"}
package/dist/types.d.ts CHANGED
@@ -45,15 +45,26 @@ export interface McpServerEntry {
45
45
  headers?: Record<string, string>;
46
46
  oauth?: McpOAuthConfig;
47
47
  }
48
+ export interface PluginAuthor {
49
+ name?: string;
50
+ email?: string;
51
+ url?: string;
52
+ }
48
53
  export interface PluginEntry {
49
54
  id: string;
50
55
  title?: string;
51
56
  description: string;
52
- type: "command";
53
- command: string;
54
- args?: string[];
55
- env?: Record<string, string>;
56
- timeout_seconds?: number;
57
+ version?: string;
58
+ skills?: string[];
59
+ mcp_servers?: string[];
60
+ hooks?: string[];
61
+ plugins?: string[];
62
+ author?: PluginAuthor;
63
+ homepage?: string;
64
+ repository?: string;
65
+ license?: string;
66
+ logo?: string;
67
+ keywords?: string[];
57
68
  }
58
69
  export interface RootEntry {
59
70
  name: string;
@@ -110,12 +121,6 @@ export interface PrepareSessionOptions {
110
121
  root?: RootEntry;
111
122
  /** Secret resolvers for ${VAR} interpolation in MCP configs */
112
123
  secretResolvers?: SecretResolver[];
113
- /**
114
- * Base directory for resolving artifact source paths (skill.path, reference.file).
115
- * Defaults to the parent of targetDir. Set this to the directory containing air.json
116
- * when air.json lives separately from the target directory (e.g., orchestrator use case).
117
- */
118
- baseDir?: string;
119
124
  /**
120
125
  * Override the root's default_skills — only activate these specific skills.
121
126
  * When set, this replaces root.default_skills entirely.
@@ -148,6 +153,13 @@ export interface CatalogProvider {
148
153
  scheme: string;
149
154
  /** Resolve a URI to parsed JSON content */
150
155
  resolve(uri: string, baseDir: string): Promise<Record<string, unknown>>;
156
+ /**
157
+ * Return the local directory where files from this URI's source can be found.
158
+ * For git-based providers, this is the clone directory.
159
+ * Used by loadAndMerge to resolve relative path/file fields in artifact entries
160
+ * to absolute paths. Returns undefined if the source isn't locally available.
161
+ */
162
+ resolveSourceDir?(uri: string): string | undefined;
151
163
  }
152
164
  /**
153
165
  * Secret Resolver — resolves ${VAR} interpolation in config values.
@@ -1 +1 @@
1
-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AC7B,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACnD;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,iBAAiB,CAAC;IACjD,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAMD,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACxC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;CACd"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulsemcp/air-core",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://raw.githubusercontent.com/pulsemcp/air/main/schemas/plugins.schema.json",
4
4
  "title": "AIR Plugins Index",
5
- "description": "Index of agent plugins available in this AIR configuration. Plugins extend agent capabilities beyond what MCP servers and skills provide. AIR plugins are agent-agnostic and translated to agent-specific formats at session start time.",
5
+ "description": "Index of agent plugins available in this AIR configuration. A plugin is a named grouping of AIR primitives (skills, MCP servers, hooks) — a compositional unit for bundling and distributing related capabilities. Plugins do not define new artifacts inline; they reference existing artifacts by ID from the corresponding index files.",
6
6
  "type": "object",
7
7
  "properties": {
8
8
  "$schema": {
@@ -20,7 +20,7 @@
20
20
  "$defs": {
21
21
  "Plugin": {
22
22
  "type": "object",
23
- "description": "An agent plugin that extends capabilities via external commands.",
23
+ "description": "A plugin a named grouping of AIR primitives (skills, MCP servers, hooks) for bundling and distribution. All referenced artifacts must be defined in their respective index files.",
24
24
  "properties": {
25
25
  "id": {
26
26
  "type": "string",
@@ -38,38 +38,88 @@
38
38
  "type": "string",
39
39
  "minLength": 1,
40
40
  "maxLength": 500,
41
- "description": "Concise description of what this plugin does."
41
+ "description": "Concise description of what this plugin provides."
42
42
  },
43
- "type": {
43
+ "version": {
44
44
  "type": "string",
45
- "enum": ["command"],
46
- "description": "Plugin type. Currently only 'command' is supported."
45
+ "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+([-+][a-zA-Z0-9._-]+)?$",
46
+ "description": "Semantic version of the plugin (e.g., '1.0.0')."
47
47
  },
48
- "command": {
49
- "type": "string",
50
- "description": "Executable command to run for this plugin."
48
+ "skills": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "string"
52
+ },
53
+ "description": "IDs of skills bundled by this plugin. Must reference skill IDs defined in skills.json indexes."
51
54
  },
52
- "args": {
55
+ "mcp_servers": {
53
56
  "type": "array",
54
57
  "items": {
55
58
  "type": "string"
56
59
  },
57
- "description": "Command-line arguments for the plugin command."
60
+ "description": "IDs of MCP servers bundled by this plugin. Must reference server IDs defined in mcp.json indexes."
58
61
  },
59
- "env": {
60
- "type": "object",
61
- "additionalProperties": {
62
+ "hooks": {
63
+ "type": "array",
64
+ "items": {
62
65
  "type": "string"
63
66
  },
64
- "description": "Environment variables for the plugin process. Values support ${ENV_VAR} interpolation."
67
+ "description": "IDs of hooks bundled by this plugin. Must reference hook IDs defined in hooks.json indexes."
68
+ },
69
+ "plugins": {
70
+ "type": "array",
71
+ "items": {
72
+ "type": "string"
73
+ },
74
+ "description": "IDs of other plugins to compose into this plugin. Referenced plugins' primitives (skills, mcp_servers, hooks) are recursively expanded and merged with this plugin's direct declarations. Circular references are rejected at resolution time."
75
+ },
76
+ "author": {
77
+ "type": "object",
78
+ "description": "Plugin author information.",
79
+ "properties": {
80
+ "name": {
81
+ "type": "string",
82
+ "description": "Author's name."
83
+ },
84
+ "email": {
85
+ "type": "string",
86
+ "format": "email",
87
+ "description": "Author's email address."
88
+ },
89
+ "url": {
90
+ "type": "string",
91
+ "format": "uri",
92
+ "description": "Author's website or profile URL."
93
+ }
94
+ },
95
+ "additionalProperties": false
96
+ },
97
+ "homepage": {
98
+ "type": "string",
99
+ "format": "uri",
100
+ "description": "URL to the plugin's homepage or documentation."
101
+ },
102
+ "repository": {
103
+ "type": "string",
104
+ "description": "URL or identifier for the plugin's source repository."
105
+ },
106
+ "license": {
107
+ "type": "string",
108
+ "description": "SPDX license identifier (e.g., 'MIT', 'Apache-2.0')."
109
+ },
110
+ "logo": {
111
+ "type": "string",
112
+ "description": "Path or URL to the plugin's logo image."
65
113
  },
66
- "timeout_seconds": {
67
- "type": "number",
68
- "minimum": 1,
69
- "description": "Maximum execution time in seconds before the plugin is killed."
114
+ "keywords": {
115
+ "type": "array",
116
+ "items": {
117
+ "type": "string"
118
+ },
119
+ "description": "Keywords for discovery and categorization."
70
120
  }
71
121
  },
72
- "required": ["id", "description", "type", "command"],
122
+ "required": ["id", "description"],
73
123
  "additionalProperties": false
74
124
  }
75
125
  }
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://raw.githubusercontent.com/pulsemcp/air/main/schemas/plugins.schema.json",
4
4
  "title": "AIR Plugins Index",
5
- "description": "Index of agent plugins available in this AIR configuration. Plugins extend agent capabilities beyond what MCP servers and skills provide. AIR plugins are agent-agnostic and translated to agent-specific formats at session start time.",
5
+ "description": "Index of agent plugins available in this AIR configuration. A plugin is a named grouping of AIR primitives (skills, MCP servers, hooks) — a compositional unit for bundling and distributing related capabilities. Plugins do not define new artifacts inline; they reference existing artifacts by ID from the corresponding index files.",
6
6
  "type": "object",
7
7
  "properties": {
8
8
  "$schema": {
@@ -20,7 +20,7 @@
20
20
  "$defs": {
21
21
  "Plugin": {
22
22
  "type": "object",
23
- "description": "An agent plugin that extends capabilities via external commands.",
23
+ "description": "A plugin a named grouping of AIR primitives (skills, MCP servers, hooks) for bundling and distribution. All referenced artifacts must be defined in their respective index files.",
24
24
  "properties": {
25
25
  "id": {
26
26
  "type": "string",
@@ -38,38 +38,88 @@
38
38
  "type": "string",
39
39
  "minLength": 1,
40
40
  "maxLength": 500,
41
- "description": "Concise description of what this plugin does."
41
+ "description": "Concise description of what this plugin provides."
42
42
  },
43
- "type": {
43
+ "version": {
44
44
  "type": "string",
45
- "enum": ["command"],
46
- "description": "Plugin type. Currently only 'command' is supported."
45
+ "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+([-+][a-zA-Z0-9._-]+)?$",
46
+ "description": "Semantic version of the plugin (e.g., '1.0.0')."
47
47
  },
48
- "command": {
49
- "type": "string",
50
- "description": "Executable command to run for this plugin."
48
+ "skills": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "string"
52
+ },
53
+ "description": "IDs of skills bundled by this plugin. Must reference skill IDs defined in skills.json indexes."
51
54
  },
52
- "args": {
55
+ "mcp_servers": {
53
56
  "type": "array",
54
57
  "items": {
55
58
  "type": "string"
56
59
  },
57
- "description": "Command-line arguments for the plugin command."
60
+ "description": "IDs of MCP servers bundled by this plugin. Must reference server IDs defined in mcp.json indexes."
58
61
  },
59
- "env": {
60
- "type": "object",
61
- "additionalProperties": {
62
+ "hooks": {
63
+ "type": "array",
64
+ "items": {
62
65
  "type": "string"
63
66
  },
64
- "description": "Environment variables for the plugin process. Values support ${ENV_VAR} interpolation."
67
+ "description": "IDs of hooks bundled by this plugin. Must reference hook IDs defined in hooks.json indexes."
68
+ },
69
+ "plugins": {
70
+ "type": "array",
71
+ "items": {
72
+ "type": "string"
73
+ },
74
+ "description": "IDs of other plugins to compose into this plugin. Referenced plugins' primitives (skills, mcp_servers, hooks) are recursively expanded and merged with this plugin's direct declarations. Circular references are rejected at resolution time."
75
+ },
76
+ "author": {
77
+ "type": "object",
78
+ "description": "Plugin author information.",
79
+ "properties": {
80
+ "name": {
81
+ "type": "string",
82
+ "description": "Author's name."
83
+ },
84
+ "email": {
85
+ "type": "string",
86
+ "format": "email",
87
+ "description": "Author's email address."
88
+ },
89
+ "url": {
90
+ "type": "string",
91
+ "format": "uri",
92
+ "description": "Author's website or profile URL."
93
+ }
94
+ },
95
+ "additionalProperties": false
96
+ },
97
+ "homepage": {
98
+ "type": "string",
99
+ "format": "uri",
100
+ "description": "URL to the plugin's homepage or documentation."
101
+ },
102
+ "repository": {
103
+ "type": "string",
104
+ "description": "URL or identifier for the plugin's source repository."
105
+ },
106
+ "license": {
107
+ "type": "string",
108
+ "description": "SPDX license identifier (e.g., 'MIT', 'Apache-2.0')."
109
+ },
110
+ "logo": {
111
+ "type": "string",
112
+ "description": "Path or URL to the plugin's logo image."
65
113
  },
66
- "timeout_seconds": {
67
- "type": "number",
68
- "minimum": 1,
69
- "description": "Maximum execution time in seconds before the plugin is killed."
114
+ "keywords": {
115
+ "type": "array",
116
+ "items": {
117
+ "type": "string"
118
+ },
119
+ "description": "Keywords for discovery and categorization."
70
120
  }
71
121
  },
72
- "required": ["id", "description", "type", "command"],
122
+ "required": ["id", "description"],
73
123
  "additionalProperties": false
74
124
  }
75
125
  }