@alfe.ai/integration-manifest 0.0.3 → 0.0.5

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
@@ -62,6 +62,7 @@ interface InstallTargets {
62
62
  interface IntegrationHooks {
63
63
  pre_install?: string;
64
64
  post_install?: string;
65
+ post_activate?: string;
65
66
  pre_uninstall?: string;
66
67
  post_uninstall?: string;
67
68
  health_check?: string;
@@ -99,8 +100,8 @@ interface IntegrationManifest {
99
100
  config_schema: ConfigSchemaField[];
100
101
  capabilities: string[];
101
102
  hooks: IntegrationHooks;
102
- /** Git repository URL (HTTPS, with .git suffix) used by installer to clone */
103
- repository: string;
103
+ /** Git repository URL (HTTPS) not present in YAML, injected by the publish API */
104
+ repository?: string;
104
105
  /**
105
106
  * Agent runtimes this integration supports.
106
107
  * If omitted or empty, the integration is considered universal (all runtimes).
@@ -244,6 +245,7 @@ declare const InstallTargetsSchema: z.ZodObject<{
244
245
  declare const IntegrationHooksSchema: z.ZodObject<{
245
246
  pre_install: z.ZodOptional<z.ZodString>;
246
247
  post_install: z.ZodOptional<z.ZodString>;
248
+ post_activate: z.ZodOptional<z.ZodString>;
247
249
  pre_uninstall: z.ZodOptional<z.ZodString>;
248
250
  post_uninstall: z.ZodOptional<z.ZodString>;
249
251
  health_check: z.ZodOptional<z.ZodString>;
@@ -314,11 +316,12 @@ declare const IntegrationManifestSchema: z.ZodObject<{
314
316
  hooks: z.ZodDefault<z.ZodOptional<z.ZodObject<{
315
317
  pre_install: z.ZodOptional<z.ZodString>;
316
318
  post_install: z.ZodOptional<z.ZodString>;
319
+ post_activate: z.ZodOptional<z.ZodString>;
317
320
  pre_uninstall: z.ZodOptional<z.ZodString>;
318
321
  post_uninstall: z.ZodOptional<z.ZodString>;
319
322
  health_check: z.ZodOptional<z.ZodString>;
320
323
  }, z.core.$strip>>>;
321
- repository: z.ZodURL;
324
+ repository: z.ZodOptional<z.ZodURL>;
322
325
  supported_agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
323
326
  publisherId: z.ZodOptional<z.ZodString>;
324
327
  icon: z.ZodOptional<z.ZodString>;
@@ -366,8 +369,9 @@ declare class ManifestParseError extends Error {
366
369
  }
367
370
  /**
368
371
  * Parse a raw YAML string into a validated IntegrationManifest.
372
+ * Optional overrides are merged into the parsed YAML before validation.
369
373
  */
370
- declare function parseManifestString(yaml: string): IntegrationManifest;
374
+ declare function parseManifestString(yaml: string, overrides?: Record<string, unknown>): IntegrationManifest;
371
375
  /**
372
376
  * Read and parse an alfe-integration.yaml file from disk.
373
377
  */
package/dist/index.js CHANGED
@@ -77,6 +77,7 @@ const InstallTargetsSchema = z.object({
77
77
  const IntegrationHooksSchema = z.object({
78
78
  pre_install: z.string().optional(),
79
79
  post_install: z.string().optional(),
80
+ post_activate: z.string().optional(),
80
81
  pre_uninstall: z.string().optional(),
81
82
  post_uninstall: z.string().optional(),
82
83
  health_check: z.string().optional()
@@ -122,7 +123,7 @@ const IntegrationManifestSchema = z.object({
122
123
  config_schema: z.array(ConfigSchemaFieldSchema).optional().default([]),
123
124
  capabilities: z.array(z.string()).optional().default([]),
124
125
  hooks: IntegrationHooksSchema.optional().default({}),
125
- repository: z.url(),
126
+ repository: z.url().optional(),
126
127
  supported_agents: z.array(RuntimeKeySchema).optional(),
127
128
  publisherId: z.string().optional(),
128
129
  icon: z.string().optional(),
@@ -197,8 +198,9 @@ var ManifestParseError = class extends Error {
197
198
  };
198
199
  /**
199
200
  * Parse a raw YAML string into a validated IntegrationManifest.
201
+ * Optional overrides are merged into the parsed YAML before validation.
200
202
  */
201
- function parseManifestString(yaml) {
203
+ function parseManifestString(yaml, overrides) {
202
204
  let raw;
203
205
  try {
204
206
  raw = parse(yaml);
@@ -206,7 +208,11 @@ function parseManifestString(yaml) {
206
208
  throw new ManifestParseError(`Invalid YAML: ${err instanceof Error ? err.message : String(err)}`);
207
209
  }
208
210
  if (typeof raw !== "object" || raw === null) throw new ManifestParseError("Manifest must be a YAML object");
209
- const result = IntegrationManifestSchema.safeParse(raw);
211
+ const merged = overrides ? {
212
+ ...raw,
213
+ ...overrides
214
+ } : raw;
215
+ const result = IntegrationManifestSchema.safeParse(merged);
210
216
  if (!result.success) {
211
217
  const issues = result.error.issues.map((i) => ({
212
218
  path: i.path.join("."),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfe.ai/integration-manifest",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "Integration manifest schema, types, and parser for Alfe integration platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",