@alfe.ai/integration-manifest 0.0.9 → 0.0.11

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/index.d.ts CHANGED
@@ -28,6 +28,8 @@ interface ConfigSchemaField {
28
28
  select_options?: SelectOption[];
29
29
  /** OAuth provider identifier for oauth_connect fields */
30
30
  oauth_provider?: string;
31
+ /** If true, this field is not shown in the dashboard UI (install wizard or configure modal) */
32
+ hidden?: boolean;
31
33
  /** Only show this field if another field has a truthy value (string) or matches a specific value (object) */
32
34
  depends_on_field?: string | {
33
35
  key: string;
@@ -36,6 +38,20 @@ interface ConfigSchemaField {
36
38
  /** Only show this field if a specific integration is installed */
37
39
  depends_on_integration?: string;
38
40
  }
41
+ interface McpServerDeclaration {
42
+ /** Unique identifier within this integration */
43
+ id: string;
44
+ /** Command to spawn (e.g., 'npx', 'node', 'xero-mcp-proxy') */
45
+ command: string;
46
+ /** Arguments for the command */
47
+ args?: string[];
48
+ /** Environment variables — supports {{config.KEY}} interpolation from config + secrets */
49
+ env?: Record<string, string>;
50
+ /** Working directory (optional) */
51
+ cwd?: string;
52
+ /** If true, applier skips auto-application — a lifecycle hook manages this MCP server instead */
53
+ hook_managed?: boolean;
54
+ }
39
55
  interface CommandDeclaration {
40
56
  /** Dot-namespaced command name (e.g. "support.diagnostic") */
41
57
  name: string;
@@ -117,6 +133,8 @@ interface IntegrationManifest {
117
133
  capabilities: string[];
118
134
  hooks: IntegrationHooks;
119
135
  commands: CommandDeclaration[];
136
+ /** MCP servers to configure in the agent runtime */
137
+ mcp_servers: McpServerDeclaration[];
120
138
  /** Git repository URL (HTTPS) — not present in YAML, injected by the publish API */
121
139
  repository?: string;
122
140
  /**
@@ -161,6 +179,8 @@ interface IntegrationStateEntry {
161
179
  installedAt: string;
162
180
  config: Record<string, unknown>;
163
181
  error?: string;
182
+ /** Number of consecutive auto-reinstall attempts. Reset on success or explicit reinstall. */
183
+ reinstallAttempts?: number;
164
184
  }
165
185
  interface IntegrationsStateFile {
166
186
  version: number;
@@ -218,6 +238,7 @@ declare const ConfigSchemaFieldSchema: z.ZodObject<{
218
238
  admin: "admin";
219
239
  agent: "agent";
220
240
  }>>>;
241
+ hidden: z.ZodOptional<z.ZodBoolean>;
221
242
  options: z.ZodOptional<z.ZodArray<z.ZodString>>;
222
243
  select_options: z.ZodOptional<z.ZodArray<z.ZodObject<{
223
244
  value: z.ZodString;
@@ -230,6 +251,14 @@ declare const ConfigSchemaFieldSchema: z.ZodObject<{
230
251
  }, z.core.$strip>]>>;
231
252
  depends_on_integration: z.ZodOptional<z.ZodString>;
232
253
  }, z.core.$strip>;
254
+ declare const McpServerDeclarationSchema: z.ZodObject<{
255
+ id: z.ZodString;
256
+ command: z.ZodString;
257
+ args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
258
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
259
+ cwd: z.ZodOptional<z.ZodString>;
260
+ hook_managed: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
261
+ }, z.core.$strip>;
233
262
  declare const CommandDeclarationSchema: z.ZodObject<{
234
263
  name: z.ZodString;
235
264
  handler: z.ZodString;
@@ -333,6 +362,7 @@ declare const IntegrationManifestSchema: z.ZodObject<{
333
362
  admin: "admin";
334
363
  agent: "agent";
335
364
  }>>>;
365
+ hidden: z.ZodOptional<z.ZodBoolean>;
336
366
  options: z.ZodOptional<z.ZodArray<z.ZodString>>;
337
367
  select_options: z.ZodOptional<z.ZodArray<z.ZodObject<{
338
368
  value: z.ZodString;
@@ -361,11 +391,21 @@ declare const IntegrationManifestSchema: z.ZodObject<{
361
391
  timeout_ms: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
362
392
  description: z.ZodOptional<z.ZodString>;
363
393
  }, z.core.$strip>>>>;
394
+ mcp_servers: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
395
+ id: z.ZodString;
396
+ command: z.ZodString;
397
+ args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
398
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
399
+ cwd: z.ZodOptional<z.ZodString>;
400
+ hook_managed: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
401
+ }, z.core.$strip>>>>;
364
402
  repository: z.ZodOptional<z.ZodURL>;
365
403
  supported_agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
366
404
  supported_scopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
367
405
  agent: "agent";
368
406
  org: "org";
407
+ team: "team";
408
+ project: "project";
369
409
  }>>>>;
370
410
  publisherId: z.ZodOptional<z.ZodString>;
371
411
  icon: z.ZodOptional<z.ZodString>;
@@ -529,4 +569,4 @@ declare function migrateConfig(currentConfig: Record<string, unknown>, diff: Con
529
569
  warnings: string[];
530
570
  };
531
571
  //#endregion
532
- export { type AgentRuntime, type CommandContext, type CommandDeclaration, CommandDeclarationSchema, type CommandHandlerFn, type CommandResult, type ConfigFieldType, ConfigFieldTypeSchema, type ConfigSchemaDiff, type ConfigSchemaField, ConfigSchemaFieldSchema, type HealthCheckResult, type HealthReport, type InstallTargets, InstallTargetsSchema, type IntegrationHooks, IntegrationHooksSchema, type IntegrationManifest, IntegrationManifestSchema, type IntegrationPricing, type IntegrationPricingPlan, type IntegrationStateEntry, type IntegrationStatus, type IntegrationsStateFile, type InterpolationContext, ManifestParseError, type ManifestSchemaType, type PluginInstall, PluginInstallSchema, type PublishedIntegration, type PublishedVersion, type RuntimeInstall, RuntimeInstallSchema, type SelectOption, SelectOptionSchema, type SkillInstall, SkillInstallSchema, buildConfigValidationSchema, diffConfigSchemas, extractTemplateReferences, interpolateConfig, isRelativePath, migrateConfig, parseManifestFile, parseManifestString, resolveAssetUrl };
572
+ export { type AgentRuntime, type CommandContext, type CommandDeclaration, CommandDeclarationSchema, type CommandHandlerFn, type CommandResult, type ConfigFieldType, ConfigFieldTypeSchema, type ConfigSchemaDiff, type ConfigSchemaField, ConfigSchemaFieldSchema, type HealthCheckResult, type HealthReport, type InstallTargets, InstallTargetsSchema, type IntegrationHooks, IntegrationHooksSchema, type IntegrationManifest, IntegrationManifestSchema, type IntegrationPricing, type IntegrationPricingPlan, type IntegrationStateEntry, type IntegrationStatus, type IntegrationsStateFile, type InterpolationContext, ManifestParseError, type ManifestSchemaType, type McpServerDeclaration, McpServerDeclarationSchema, type PluginInstall, PluginInstallSchema, type PublishedIntegration, type PublishedVersion, type RuntimeInstall, RuntimeInstallSchema, type SelectOption, SelectOptionSchema, type SkillInstall, SkillInstallSchema, buildConfigValidationSchema, diffConfigSchemas, extractTemplateReferences, interpolateConfig, isRelativePath, migrateConfig, parseManifestFile, parseManifestString, resolveAssetUrl };
package/dist/index.js CHANGED
@@ -36,6 +36,7 @@ const ConfigSchemaFieldSchema = z.object({
36
36
  z.boolean()
37
37
  ]).optional(),
38
38
  editable: z.enum(["admin", "agent"]).optional().default("admin"),
39
+ hidden: z.boolean().optional(),
39
40
  options: z.array(z.string()).optional(),
40
41
  select_options: z.array(SelectOptionSchema).optional(),
41
42
  oauth_provider: z.string().optional(),
@@ -58,6 +59,14 @@ const ConfigSchemaFieldSchema = z.object({
58
59
  if (field.type === "oauth_connect") return field.oauth_provider !== void 0 && field.oauth_provider.length > 0;
59
60
  return true;
60
61
  }, { message: "oauth_connect fields must specify an oauth_provider" });
62
+ const McpServerDeclarationSchema = z.object({
63
+ id: z.string().min(1, "MCP server id must not be empty").regex(/^[a-z0-9][a-z0-9-]*$/, "MCP server id must be lowercase alphanumeric with hyphens"),
64
+ command: z.string().min(1, "MCP server command must not be empty"),
65
+ args: z.array(z.string()).optional().default([]),
66
+ env: z.record(z.string(), z.string()).optional(),
67
+ cwd: z.string().optional(),
68
+ hook_managed: z.boolean().optional().default(false)
69
+ });
61
70
  const CommandDeclarationSchema = z.object({
62
71
  name: z.string().min(1, "Command name must not be empty").regex(/^[a-z][a-z0-9]*\.[a-z][a-z0-9_]*$/, "Command name must be dot-namespaced (e.g. \"support.diagnostic\")"),
63
72
  handler: z.string().min(1, "Handler path must not be empty"),
@@ -138,9 +147,15 @@ const IntegrationManifestSchema = z.object({
138
147
  capabilities: z.array(z.string()).optional().default([]),
139
148
  hooks: IntegrationHooksSchema.optional().default({}),
140
149
  commands: z.array(CommandDeclarationSchema).optional().default([]),
150
+ mcp_servers: z.array(McpServerDeclarationSchema).optional().default([]),
141
151
  repository: z.url().optional(),
142
152
  supported_agents: z.array(RuntimeKeySchema).optional(),
143
- supported_scopes: z.array(z.enum(["agent", "org"])).optional().default(["agent"]),
153
+ supported_scopes: z.array(z.enum([
154
+ "agent",
155
+ "org",
156
+ "team",
157
+ "project"
158
+ ])).optional().default(["agent"]),
144
159
  publisherId: z.string().optional(),
145
160
  icon: z.string().optional(),
146
161
  pricing: IntegrationPricingSchema.optional(),
@@ -383,4 +398,4 @@ function migrateConfig(currentConfig, diff) {
383
398
  };
384
399
  }
385
400
  //#endregion
386
- export { CommandDeclarationSchema, ConfigFieldTypeSchema, ConfigSchemaFieldSchema, InstallTargetsSchema, IntegrationHooksSchema, IntegrationManifestSchema, ManifestParseError, PluginInstallSchema, RuntimeInstallSchema, SelectOptionSchema, SkillInstallSchema, buildConfigValidationSchema, diffConfigSchemas, extractTemplateReferences, interpolateConfig, isRelativePath, migrateConfig, parseManifestFile, parseManifestString, resolveAssetUrl };
401
+ export { CommandDeclarationSchema, ConfigFieldTypeSchema, ConfigSchemaFieldSchema, InstallTargetsSchema, IntegrationHooksSchema, IntegrationManifestSchema, ManifestParseError, McpServerDeclarationSchema, PluginInstallSchema, RuntimeInstallSchema, SelectOptionSchema, SkillInstallSchema, buildConfigValidationSchema, diffConfigSchemas, extractTemplateReferences, interpolateConfig, isRelativePath, migrateConfig, parseManifestFile, parseManifestString, resolveAssetUrl };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfe.ai/integration-manifest",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "Integration manifest schema, types, and parser for Alfe integration platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",