@alfe.ai/integration-manifest 0.0.8 → 0.0.10

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
@@ -8,7 +8,7 @@ import { z } from "zod";
8
8
  * These are the canonical types used by all packages that interact with
9
9
  * integration manifests -- registry, lifecycle manager, CLI, etc.
10
10
  */
11
- type ConfigFieldType = 'secret' | 'string' | 'number' | 'boolean' | 'enum' | 'select' | 'multi_select' | 'oauth_connect' | 'phone_number_picker';
11
+ type ConfigFieldType = 'secret' | 'string' | 'number' | 'boolean' | 'enum' | 'select' | 'multi_select' | 'oauth_connect';
12
12
  interface SelectOption {
13
13
  value: string;
14
14
  label: string;
@@ -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;
@@ -192,7 +212,6 @@ declare const ConfigFieldTypeSchema: z.ZodEnum<{
192
212
  select: "select";
193
213
  multi_select: "multi_select";
194
214
  oauth_connect: "oauth_connect";
195
- phone_number_picker: "phone_number_picker";
196
215
  }>;
197
216
  /** Structured option for select/multi_select fields */
198
217
  declare const SelectOptionSchema: z.ZodObject<{
@@ -210,7 +229,6 @@ declare const ConfigSchemaFieldSchema: z.ZodObject<{
210
229
  select: "select";
211
230
  multi_select: "multi_select";
212
231
  oauth_connect: "oauth_connect";
213
- phone_number_picker: "phone_number_picker";
214
232
  }>;
215
233
  label: z.ZodString;
216
234
  description: z.ZodOptional<z.ZodString>;
@@ -220,6 +238,7 @@ declare const ConfigSchemaFieldSchema: z.ZodObject<{
220
238
  admin: "admin";
221
239
  agent: "agent";
222
240
  }>>>;
241
+ hidden: z.ZodOptional<z.ZodBoolean>;
223
242
  options: z.ZodOptional<z.ZodArray<z.ZodString>>;
224
243
  select_options: z.ZodOptional<z.ZodArray<z.ZodObject<{
225
244
  value: z.ZodString;
@@ -232,6 +251,14 @@ declare const ConfigSchemaFieldSchema: z.ZodObject<{
232
251
  }, z.core.$strip>]>>;
233
252
  depends_on_integration: z.ZodOptional<z.ZodString>;
234
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>;
235
262
  declare const CommandDeclarationSchema: z.ZodObject<{
236
263
  name: z.ZodString;
237
264
  handler: z.ZodString;
@@ -326,7 +353,6 @@ declare const IntegrationManifestSchema: z.ZodObject<{
326
353
  select: "select";
327
354
  multi_select: "multi_select";
328
355
  oauth_connect: "oauth_connect";
329
- phone_number_picker: "phone_number_picker";
330
356
  }>;
331
357
  label: z.ZodString;
332
358
  description: z.ZodOptional<z.ZodString>;
@@ -336,6 +362,7 @@ declare const IntegrationManifestSchema: z.ZodObject<{
336
362
  admin: "admin";
337
363
  agent: "agent";
338
364
  }>>>;
365
+ hidden: z.ZodOptional<z.ZodBoolean>;
339
366
  options: z.ZodOptional<z.ZodArray<z.ZodString>>;
340
367
  select_options: z.ZodOptional<z.ZodArray<z.ZodObject<{
341
368
  value: z.ZodString;
@@ -364,6 +391,14 @@ declare const IntegrationManifestSchema: z.ZodObject<{
364
391
  timeout_ms: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
365
392
  description: z.ZodOptional<z.ZodString>;
366
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>>>>;
367
402
  repository: z.ZodOptional<z.ZodURL>;
368
403
  supported_agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
369
404
  supported_scopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
@@ -532,4 +567,4 @@ declare function migrateConfig(currentConfig: Record<string, unknown>, diff: Con
532
567
  warnings: string[];
533
568
  };
534
569
  //#endregion
535
- 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 };
570
+ 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
@@ -17,8 +17,7 @@ const ConfigFieldTypeSchema = z.enum([
17
17
  "enum",
18
18
  "select",
19
19
  "multi_select",
20
- "oauth_connect",
21
- "phone_number_picker"
20
+ "oauth_connect"
22
21
  ]);
23
22
  /** Structured option for select/multi_select fields */
24
23
  const SelectOptionSchema = z.object({
@@ -37,6 +36,7 @@ const ConfigSchemaFieldSchema = z.object({
37
36
  z.boolean()
38
37
  ]).optional(),
39
38
  editable: z.enum(["admin", "agent"]).optional().default("admin"),
39
+ hidden: z.boolean().optional(),
40
40
  options: z.array(z.string()).optional(),
41
41
  select_options: z.array(SelectOptionSchema).optional(),
42
42
  oauth_provider: z.string().optional(),
@@ -59,6 +59,14 @@ const ConfigSchemaFieldSchema = z.object({
59
59
  if (field.type === "oauth_connect") return field.oauth_provider !== void 0 && field.oauth_provider.length > 0;
60
60
  return true;
61
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
+ });
62
70
  const CommandDeclarationSchema = z.object({
63
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\")"),
64
72
  handler: z.string().min(1, "Handler path must not be empty"),
@@ -139,6 +147,7 @@ const IntegrationManifestSchema = z.object({
139
147
  capabilities: z.array(z.string()).optional().default([]),
140
148
  hooks: IntegrationHooksSchema.optional().default({}),
141
149
  commands: z.array(CommandDeclarationSchema).optional().default([]),
150
+ mcp_servers: z.array(McpServerDeclarationSchema).optional().default([]),
142
151
  repository: z.url().optional(),
143
152
  supported_agents: z.array(RuntimeKeySchema).optional(),
144
153
  supported_scopes: z.array(z.enum(["agent", "org"])).optional().default(["agent"]),
@@ -181,9 +190,6 @@ function buildConfigValidationSchema(configSchema) {
181
190
  case "oauth_connect":
182
191
  fieldSchema = z.string();
183
192
  break;
184
- case "phone_number_picker":
185
- fieldSchema = z.string();
186
- break;
187
193
  case "number":
188
194
  fieldSchema = z.number();
189
195
  break;
@@ -387,4 +393,4 @@ function migrateConfig(currentConfig, diff) {
387
393
  };
388
394
  }
389
395
  //#endregion
390
- export { CommandDeclarationSchema, ConfigFieldTypeSchema, ConfigSchemaFieldSchema, InstallTargetsSchema, IntegrationHooksSchema, IntegrationManifestSchema, ManifestParseError, PluginInstallSchema, RuntimeInstallSchema, SelectOptionSchema, SkillInstallSchema, buildConfigValidationSchema, diffConfigSchemas, extractTemplateReferences, interpolateConfig, isRelativePath, migrateConfig, parseManifestFile, parseManifestString, resolveAssetUrl };
396
+ 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.8",
3
+ "version": "0.0.10",
4
4
  "description": "Integration manifest schema, types, and parser for Alfe integration platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",