@camstack/addon-cloudflare 1.1.13 → 1.1.14

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.
@@ -4627,7 +4627,7 @@ function _instanceof(cls, params = {}) {
4627
4627
  return inst;
4628
4628
  }
4629
4629
  //#endregion
4630
- //#region ../types/dist/sleep-C2M2zF7x.mjs
4630
+ //#region ../types/dist/sleep-MHm--th-.mjs
4631
4631
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4632
4632
  EventCategory["SystemBoot"] = "system.boot";
4633
4633
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5889,6 +5889,7 @@ var CamStreamKindSchema = _enum([
5889
5889
  "pull-rtsp",
5890
5890
  "pull-rtmp",
5891
5891
  "pull-http",
5892
+ "pull-flv",
5892
5893
  "pull-rfc4571",
5893
5894
  "push-annexb",
5894
5895
  "derived"
@@ -13207,7 +13208,7 @@ var AddBrokerInputSchema = object({
13207
13208
  });
13208
13209
  var AddBrokerResultSchema = object({ id: string() });
13209
13210
  var IdInputSchema = object({ id: string() });
13210
- var TestResultSchema = discriminatedUnion("ok", [object({
13211
+ var TestResultSchema$1 = discriminatedUnion("ok", [object({
13211
13212
  ok: literal(true),
13212
13213
  latencyMs: number()
13213
13214
  }), object({
@@ -13230,7 +13231,7 @@ var StatusSchema = object({
13230
13231
  brokerCount: number(),
13231
13232
  embeddedRunning: boolean()
13232
13233
  });
13233
- method(_void(), array(BrokerInfoSchema)), method(IdInputSchema, BrokerConnectionDetailsSchema), method(AddBrokerInputSchema, AddBrokerResultSchema, { kind: "mutation" }), method(IdInputSchema, _void(), { kind: "mutation" }), method(IdInputSchema, TestResultSchema, { kind: "mutation" }), method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, { kind: "mutation" }), method(IdInputSchema, _void(), { kind: "mutation" }), method(_void(), StatusSchema);
13234
+ method(_void(), array(BrokerInfoSchema)), method(IdInputSchema, BrokerConnectionDetailsSchema), method(AddBrokerInputSchema, AddBrokerResultSchema, { kind: "mutation" }), method(IdInputSchema, _void(), { kind: "mutation" }), method(IdInputSchema, TestResultSchema$1, { kind: "mutation" }), method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, { kind: "mutation" }), method(IdInputSchema, _void(), { kind: "mutation" }), method(_void(), StatusSchema);
13234
13235
  var NetworkEndpointSchema = object({
13235
13236
  url: string(),
13236
13237
  hostname: string(),
@@ -13281,23 +13282,198 @@ var networkAccessCapability = {
13281
13282
  listEndpoints: method(_void(), array(NetworkEndpointEntrySchema).readonly())
13282
13283
  }
13283
13284
  };
13284
- method(object({
13285
- title: string(),
13285
+ /**
13286
+ * notification-output — canonical, capability-gated notification delivery.
13287
+ *
13288
+ * Apprise-derived model (see
13289
+ * `docs/superpowers/specs/2026-07-03-notification-output-notifier-matrix.md`):
13290
+ * callers emit ONE canonical `Notification`; each provider declares a
13291
+ * per-kind capability descriptor (`TargetKind`), and the pure degrade
13292
+ * engine (`@camstack/types` `prepareNotification`) transcodes / degrades the
13293
+ * message to what the kind supports — callers never special-case a service.
13294
+ *
13295
+ * DESIGN DECISIONS (locked):
13296
+ * - Target CRUD lives on THIS cap (`upsertTarget` / `deleteTarget` /
13297
+ * `setTargetEnabled`), each provider persisting via the `settings-store`
13298
+ * cap. Rationale: the admin UI needs one uniform surface across the
13299
+ * notifiers addon AND the HA addon; the addon-`globalSettingsSchema`-array
13300
+ * alternative would fork the UI per addon and cannot host the
13301
+ * discovery→adopt flow.
13302
+ * - `listTargetKinds` / `listTargets` / `discoverTargets` return arrays →
13303
+ * the generated cap-mount auto-`concatCollection`-fans them across every
13304
+ * registered provider (notifiers addon + HA addon) so one catalog is
13305
+ * routable. `send` / `testTarget` / CRUD route to ONE provider by the
13306
+ * `addonId` the generated collection router extracts from the call input.
13307
+ * - `Attachment.bytes` is `Uint8Array`. Transport-safe: superjson (the tRPC
13308
+ * transformer) + UDS MsgPack both round-trip typed arrays — already used by
13309
+ * `storage` / `storage-provider` / `recording` caps over the same path. No
13310
+ * base64 fallback needed.
13311
+ *
13312
+ * TODO (deferred, closed-set change — separate decision): add
13313
+ * `providerKind: 'notify'` so notification providers surface on the unified
13314
+ * admin "Integrations" page.
13315
+ */
13316
+ /**
13317
+ * Zentik-derived typed-media enum — the superset across every kind. Each
13318
+ * adapter picks what it supports and the degrade engine filters the rest.
13319
+ */
13320
+ var AttachmentMediaTypeSchema = _enum([
13321
+ "image",
13322
+ "video",
13323
+ "gif",
13324
+ "audio",
13325
+ "icon"
13326
+ ]);
13327
+ /**
13328
+ * A single attachment. Exactly one of `url` (remote source, most adapters
13329
+ * prefer this) or `bytes` (inline source; required for Pushover-style
13330
+ * bytes-only kinds) MUST be present — the degrade engine expresses a
13331
+ * url→bytes fetch as a `needsFetch` directive the adapter executes.
13332
+ */
13333
+ var AttachmentSchema = object({
13334
+ mediaType: AttachmentMediaTypeSchema,
13335
+ url: string().optional(),
13336
+ bytes: _instanceof(Uint8Array).optional(),
13337
+ mime: string().optional(),
13338
+ name: string().optional()
13339
+ }).refine((a) => a.url !== void 0 || a.bytes !== void 0, { message: "Attachment requires either `url` or `bytes`" });
13340
+ var NotificationFormatSchema = _enum([
13341
+ "text",
13342
+ "markdown",
13343
+ "html"
13344
+ ]);
13345
+ /** A single tap-through action button. */
13346
+ var NotificationActionSchema = object({
13347
+ id: string(),
13348
+ label: string(),
13349
+ url: string().optional()
13350
+ });
13351
+ /**
13352
+ * The canonical notification. `body` is the only hard field (Apprise model).
13353
+ * `priority` is a 5-level ORDINAL (1=lowest … 3=normal(default) … 5=urgent),
13354
+ * NOT a fixed severity enum — each kind declares its own `caps.levels` and
13355
+ * the adapter maps this ordinal onto its native level. `level?` is an
13356
+ * optional kind-native level id (`emergency`, `silent`, …) that overrides
13357
+ * `priority` for that one target.
13358
+ */
13359
+ var NotificationSchema = object({
13286
13360
  body: string(),
13287
- imageUrl: string().optional(),
13361
+ title: string().optional(),
13362
+ format: NotificationFormatSchema.default("text"),
13363
+ priority: number().int().min(1).max(5).default(3),
13364
+ level: string().optional(),
13365
+ attachments: array(AttachmentSchema).optional(),
13366
+ clickUrl: string().optional(),
13367
+ actions: array(NotificationActionSchema).optional(),
13368
+ sound: string().optional(),
13369
+ ttl: number().optional(),
13370
+ tag: string().optional(),
13288
13371
  deviceId: number().optional(),
13289
13372
  eventId: string().optional(),
13290
- priority: _enum([
13291
- "low",
13292
- "normal",
13293
- "high",
13294
- "critical"
13295
- ]).default("normal"),
13296
13373
  metadata: record(string(), unknown()).optional()
13297
- }), _void(), { kind: "mutation" }), method(_void(), object({
13374
+ });
13375
+ /** One declared native severity/priority level for a kind. */
13376
+ var TargetKindLevelSchema = object({
13377
+ id: string(),
13378
+ label: string(),
13379
+ /** Which canonical priority (1..5) this level maps to. `null` = qualitative-only. */
13380
+ ordinal: number().int().min(1).max(5).nullable(),
13381
+ flags: object({
13382
+ critical: boolean().optional(),
13383
+ silent: boolean().optional(),
13384
+ noPush: boolean().optional()
13385
+ }).optional(),
13386
+ /** e.g. Pushover `emergency` requires `retry` / `expire`. */
13387
+ requires: array(string()).optional(),
13388
+ description: string().optional()
13389
+ });
13390
+ /** The full capability block consulted before dispatch. */
13391
+ var TargetKindCapsSchema = object({
13392
+ attachments: object({
13393
+ mediaTypes: array(AttachmentMediaTypeSchema),
13394
+ mode: _enum([
13395
+ "url",
13396
+ "bytes",
13397
+ "both"
13398
+ ]),
13399
+ max: number().int().nonnegative(),
13400
+ maxBytes: number().int().positive().optional()
13401
+ }),
13402
+ /** Max action buttons (0 = none). */
13403
+ actions: number().int().nonnegative(),
13404
+ levels: array(TargetKindLevelSchema),
13405
+ format: array(NotificationFormatSchema),
13406
+ clickUrl: boolean(),
13407
+ sound: boolean(),
13408
+ ttl: boolean(),
13409
+ bodyMaxLen: number().int().positive()
13410
+ });
13411
+ /**
13412
+ * `configSchema` is a `ConfigUISchema` tree passed through to the admin
13413
+ * FormBuilder. Stored as `z.unknown()` at the cap seam (mirrors
13414
+ * `device-provider.getChildCreationSchema` `CreationSchemaOutputSchema`) —
13415
+ * the union is large and not meant for runtime validation here; the exported
13416
+ * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
13417
+ */
13418
+ var ConfigSchemaPassthrough = unknown();
13419
+ var TargetKindSchema = object({
13420
+ kind: string(),
13421
+ label: string(),
13422
+ icon: string(),
13423
+ /** Stamped by each provider so the concat-fanned catalog stays routable. */
13424
+ addonId: string(),
13425
+ configSchema: ConfigSchemaPassthrough,
13426
+ supportsDiscovery: boolean(),
13427
+ caps: TargetKindCapsSchema
13428
+ });
13429
+ /**
13430
+ * A persisted target. `config` holds secrets; providers REDACT secret fields
13431
+ * (return a presence marker only) when serving `listTargets` — never
13432
+ * round-trip a stored secret to the UI.
13433
+ */
13434
+ var TargetSchema = object({
13435
+ id: string(),
13436
+ name: string(),
13437
+ kind: string(),
13438
+ addonId: string(),
13439
+ enabled: boolean(),
13440
+ config: record(string(), unknown())
13441
+ });
13442
+ /** A discovery-surfaced candidate (config is partial + non-secret). */
13443
+ var DiscoveredTargetSchema = object({
13444
+ kind: string(),
13445
+ suggestedName: string(),
13446
+ config: record(string(), unknown())
13447
+ });
13448
+ /** The degrade engine's report — what was resolved / dropped / degraded. */
13449
+ var RenderedAsSchema = object({
13450
+ level: string(),
13451
+ format: NotificationFormatSchema,
13452
+ attachmentsSent: number().int().nonnegative(),
13453
+ actionsSent: number().int().nonnegative(),
13454
+ truncated: boolean(),
13455
+ dropped: array(string())
13456
+ });
13457
+ var SendResultSchema = object({
13298
13458
  success: boolean(),
13299
- error: string().optional()
13300
- }), { kind: "mutation" });
13459
+ error: string().optional(),
13460
+ renderedAs: RenderedAsSchema.optional()
13461
+ });
13462
+ /** Same shape as SendResult — kept as a distinct name for the test panel. */
13463
+ var TestResultSchema = SendResultSchema;
13464
+ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSchema)), method(object({
13465
+ kind: string(),
13466
+ config: record(string(), unknown()).optional()
13467
+ }), array(DiscoveredTargetSchema)), method(object({
13468
+ targetId: string(),
13469
+ notification: NotificationSchema
13470
+ }), SendResultSchema, { kind: "mutation" }), method(object({
13471
+ targetId: string(),
13472
+ sample: NotificationSchema.optional()
13473
+ }), TestResultSchema, { kind: "mutation" }), method(object({ target: TargetSchema }), TargetSchema, { kind: "mutation" }), method(object({ targetId: string() }), _void(), { kind: "mutation" }), method(object({
13474
+ targetId: string(),
13475
+ enabled: boolean()
13476
+ }), _void(), { kind: "mutation" });
13301
13477
  /**
13302
13478
  * Zod schemas for persisted record types.
13303
13479
  *
@@ -19315,13 +19491,49 @@ Object.freeze({
19315
19491
  addonId: null,
19316
19492
  access: "create"
19317
19493
  },
19494
+ "notificationOutput.deleteTarget": {
19495
+ capName: "notification-output",
19496
+ capScope: "system",
19497
+ addonId: null,
19498
+ access: "delete"
19499
+ },
19500
+ "notificationOutput.discoverTargets": {
19501
+ capName: "notification-output",
19502
+ capScope: "system",
19503
+ addonId: null,
19504
+ access: "view"
19505
+ },
19506
+ "notificationOutput.listTargetKinds": {
19507
+ capName: "notification-output",
19508
+ capScope: "system",
19509
+ addonId: null,
19510
+ access: "view"
19511
+ },
19512
+ "notificationOutput.listTargets": {
19513
+ capName: "notification-output",
19514
+ capScope: "system",
19515
+ addonId: null,
19516
+ access: "view"
19517
+ },
19318
19518
  "notificationOutput.send": {
19319
19519
  capName: "notification-output",
19320
19520
  capScope: "system",
19321
19521
  addonId: null,
19322
19522
  access: "create"
19323
19523
  },
19324
- "notificationOutput.sendTest": {
19524
+ "notificationOutput.setTargetEnabled": {
19525
+ capName: "notification-output",
19526
+ capScope: "system",
19527
+ addonId: null,
19528
+ access: "create"
19529
+ },
19530
+ "notificationOutput.testTarget": {
19531
+ capName: "notification-output",
19532
+ capScope: "system",
19533
+ addonId: null,
19534
+ access: "create"
19535
+ },
19536
+ "notificationOutput.upsertTarget": {
19325
19537
  capName: "notification-output",
19326
19538
  capScope: "system",
19327
19539
  addonId: null,
@@ -4627,7 +4627,7 @@ function _instanceof(cls, params = {}) {
4627
4627
  return inst;
4628
4628
  }
4629
4629
  //#endregion
4630
- //#region ../types/dist/sleep-C2M2zF7x.mjs
4630
+ //#region ../types/dist/sleep-MHm--th-.mjs
4631
4631
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4632
4632
  EventCategory["SystemBoot"] = "system.boot";
4633
4633
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5889,6 +5889,7 @@ var CamStreamKindSchema = _enum([
5889
5889
  "pull-rtsp",
5890
5890
  "pull-rtmp",
5891
5891
  "pull-http",
5892
+ "pull-flv",
5892
5893
  "pull-rfc4571",
5893
5894
  "push-annexb",
5894
5895
  "derived"
@@ -13207,7 +13208,7 @@ var AddBrokerInputSchema = object({
13207
13208
  });
13208
13209
  var AddBrokerResultSchema = object({ id: string() });
13209
13210
  var IdInputSchema = object({ id: string() });
13210
- var TestResultSchema = discriminatedUnion("ok", [object({
13211
+ var TestResultSchema$1 = discriminatedUnion("ok", [object({
13211
13212
  ok: literal(true),
13212
13213
  latencyMs: number()
13213
13214
  }), object({
@@ -13230,7 +13231,7 @@ var StatusSchema = object({
13230
13231
  brokerCount: number(),
13231
13232
  embeddedRunning: boolean()
13232
13233
  });
13233
- method(_void(), array(BrokerInfoSchema)), method(IdInputSchema, BrokerConnectionDetailsSchema), method(AddBrokerInputSchema, AddBrokerResultSchema, { kind: "mutation" }), method(IdInputSchema, _void(), { kind: "mutation" }), method(IdInputSchema, TestResultSchema, { kind: "mutation" }), method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, { kind: "mutation" }), method(IdInputSchema, _void(), { kind: "mutation" }), method(_void(), StatusSchema);
13234
+ method(_void(), array(BrokerInfoSchema)), method(IdInputSchema, BrokerConnectionDetailsSchema), method(AddBrokerInputSchema, AddBrokerResultSchema, { kind: "mutation" }), method(IdInputSchema, _void(), { kind: "mutation" }), method(IdInputSchema, TestResultSchema$1, { kind: "mutation" }), method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, { kind: "mutation" }), method(IdInputSchema, _void(), { kind: "mutation" }), method(_void(), StatusSchema);
13234
13235
  var NetworkEndpointSchema = object({
13235
13236
  url: string(),
13236
13237
  hostname: string(),
@@ -13281,23 +13282,198 @@ var networkAccessCapability = {
13281
13282
  listEndpoints: method(_void(), array(NetworkEndpointEntrySchema).readonly())
13282
13283
  }
13283
13284
  };
13284
- method(object({
13285
- title: string(),
13285
+ /**
13286
+ * notification-output — canonical, capability-gated notification delivery.
13287
+ *
13288
+ * Apprise-derived model (see
13289
+ * `docs/superpowers/specs/2026-07-03-notification-output-notifier-matrix.md`):
13290
+ * callers emit ONE canonical `Notification`; each provider declares a
13291
+ * per-kind capability descriptor (`TargetKind`), and the pure degrade
13292
+ * engine (`@camstack/types` `prepareNotification`) transcodes / degrades the
13293
+ * message to what the kind supports — callers never special-case a service.
13294
+ *
13295
+ * DESIGN DECISIONS (locked):
13296
+ * - Target CRUD lives on THIS cap (`upsertTarget` / `deleteTarget` /
13297
+ * `setTargetEnabled`), each provider persisting via the `settings-store`
13298
+ * cap. Rationale: the admin UI needs one uniform surface across the
13299
+ * notifiers addon AND the HA addon; the addon-`globalSettingsSchema`-array
13300
+ * alternative would fork the UI per addon and cannot host the
13301
+ * discovery→adopt flow.
13302
+ * - `listTargetKinds` / `listTargets` / `discoverTargets` return arrays →
13303
+ * the generated cap-mount auto-`concatCollection`-fans them across every
13304
+ * registered provider (notifiers addon + HA addon) so one catalog is
13305
+ * routable. `send` / `testTarget` / CRUD route to ONE provider by the
13306
+ * `addonId` the generated collection router extracts from the call input.
13307
+ * - `Attachment.bytes` is `Uint8Array`. Transport-safe: superjson (the tRPC
13308
+ * transformer) + UDS MsgPack both round-trip typed arrays — already used by
13309
+ * `storage` / `storage-provider` / `recording` caps over the same path. No
13310
+ * base64 fallback needed.
13311
+ *
13312
+ * TODO (deferred, closed-set change — separate decision): add
13313
+ * `providerKind: 'notify'` so notification providers surface on the unified
13314
+ * admin "Integrations" page.
13315
+ */
13316
+ /**
13317
+ * Zentik-derived typed-media enum — the superset across every kind. Each
13318
+ * adapter picks what it supports and the degrade engine filters the rest.
13319
+ */
13320
+ var AttachmentMediaTypeSchema = _enum([
13321
+ "image",
13322
+ "video",
13323
+ "gif",
13324
+ "audio",
13325
+ "icon"
13326
+ ]);
13327
+ /**
13328
+ * A single attachment. Exactly one of `url` (remote source, most adapters
13329
+ * prefer this) or `bytes` (inline source; required for Pushover-style
13330
+ * bytes-only kinds) MUST be present — the degrade engine expresses a
13331
+ * url→bytes fetch as a `needsFetch` directive the adapter executes.
13332
+ */
13333
+ var AttachmentSchema = object({
13334
+ mediaType: AttachmentMediaTypeSchema,
13335
+ url: string().optional(),
13336
+ bytes: _instanceof(Uint8Array).optional(),
13337
+ mime: string().optional(),
13338
+ name: string().optional()
13339
+ }).refine((a) => a.url !== void 0 || a.bytes !== void 0, { message: "Attachment requires either `url` or `bytes`" });
13340
+ var NotificationFormatSchema = _enum([
13341
+ "text",
13342
+ "markdown",
13343
+ "html"
13344
+ ]);
13345
+ /** A single tap-through action button. */
13346
+ var NotificationActionSchema = object({
13347
+ id: string(),
13348
+ label: string(),
13349
+ url: string().optional()
13350
+ });
13351
+ /**
13352
+ * The canonical notification. `body` is the only hard field (Apprise model).
13353
+ * `priority` is a 5-level ORDINAL (1=lowest … 3=normal(default) … 5=urgent),
13354
+ * NOT a fixed severity enum — each kind declares its own `caps.levels` and
13355
+ * the adapter maps this ordinal onto its native level. `level?` is an
13356
+ * optional kind-native level id (`emergency`, `silent`, …) that overrides
13357
+ * `priority` for that one target.
13358
+ */
13359
+ var NotificationSchema = object({
13286
13360
  body: string(),
13287
- imageUrl: string().optional(),
13361
+ title: string().optional(),
13362
+ format: NotificationFormatSchema.default("text"),
13363
+ priority: number().int().min(1).max(5).default(3),
13364
+ level: string().optional(),
13365
+ attachments: array(AttachmentSchema).optional(),
13366
+ clickUrl: string().optional(),
13367
+ actions: array(NotificationActionSchema).optional(),
13368
+ sound: string().optional(),
13369
+ ttl: number().optional(),
13370
+ tag: string().optional(),
13288
13371
  deviceId: number().optional(),
13289
13372
  eventId: string().optional(),
13290
- priority: _enum([
13291
- "low",
13292
- "normal",
13293
- "high",
13294
- "critical"
13295
- ]).default("normal"),
13296
13373
  metadata: record(string(), unknown()).optional()
13297
- }), _void(), { kind: "mutation" }), method(_void(), object({
13374
+ });
13375
+ /** One declared native severity/priority level for a kind. */
13376
+ var TargetKindLevelSchema = object({
13377
+ id: string(),
13378
+ label: string(),
13379
+ /** Which canonical priority (1..5) this level maps to. `null` = qualitative-only. */
13380
+ ordinal: number().int().min(1).max(5).nullable(),
13381
+ flags: object({
13382
+ critical: boolean().optional(),
13383
+ silent: boolean().optional(),
13384
+ noPush: boolean().optional()
13385
+ }).optional(),
13386
+ /** e.g. Pushover `emergency` requires `retry` / `expire`. */
13387
+ requires: array(string()).optional(),
13388
+ description: string().optional()
13389
+ });
13390
+ /** The full capability block consulted before dispatch. */
13391
+ var TargetKindCapsSchema = object({
13392
+ attachments: object({
13393
+ mediaTypes: array(AttachmentMediaTypeSchema),
13394
+ mode: _enum([
13395
+ "url",
13396
+ "bytes",
13397
+ "both"
13398
+ ]),
13399
+ max: number().int().nonnegative(),
13400
+ maxBytes: number().int().positive().optional()
13401
+ }),
13402
+ /** Max action buttons (0 = none). */
13403
+ actions: number().int().nonnegative(),
13404
+ levels: array(TargetKindLevelSchema),
13405
+ format: array(NotificationFormatSchema),
13406
+ clickUrl: boolean(),
13407
+ sound: boolean(),
13408
+ ttl: boolean(),
13409
+ bodyMaxLen: number().int().positive()
13410
+ });
13411
+ /**
13412
+ * `configSchema` is a `ConfigUISchema` tree passed through to the admin
13413
+ * FormBuilder. Stored as `z.unknown()` at the cap seam (mirrors
13414
+ * `device-provider.getChildCreationSchema` `CreationSchemaOutputSchema`) —
13415
+ * the union is large and not meant for runtime validation here; the exported
13416
+ * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
13417
+ */
13418
+ var ConfigSchemaPassthrough = unknown();
13419
+ var TargetKindSchema = object({
13420
+ kind: string(),
13421
+ label: string(),
13422
+ icon: string(),
13423
+ /** Stamped by each provider so the concat-fanned catalog stays routable. */
13424
+ addonId: string(),
13425
+ configSchema: ConfigSchemaPassthrough,
13426
+ supportsDiscovery: boolean(),
13427
+ caps: TargetKindCapsSchema
13428
+ });
13429
+ /**
13430
+ * A persisted target. `config` holds secrets; providers REDACT secret fields
13431
+ * (return a presence marker only) when serving `listTargets` — never
13432
+ * round-trip a stored secret to the UI.
13433
+ */
13434
+ var TargetSchema = object({
13435
+ id: string(),
13436
+ name: string(),
13437
+ kind: string(),
13438
+ addonId: string(),
13439
+ enabled: boolean(),
13440
+ config: record(string(), unknown())
13441
+ });
13442
+ /** A discovery-surfaced candidate (config is partial + non-secret). */
13443
+ var DiscoveredTargetSchema = object({
13444
+ kind: string(),
13445
+ suggestedName: string(),
13446
+ config: record(string(), unknown())
13447
+ });
13448
+ /** The degrade engine's report — what was resolved / dropped / degraded. */
13449
+ var RenderedAsSchema = object({
13450
+ level: string(),
13451
+ format: NotificationFormatSchema,
13452
+ attachmentsSent: number().int().nonnegative(),
13453
+ actionsSent: number().int().nonnegative(),
13454
+ truncated: boolean(),
13455
+ dropped: array(string())
13456
+ });
13457
+ var SendResultSchema = object({
13298
13458
  success: boolean(),
13299
- error: string().optional()
13300
- }), { kind: "mutation" });
13459
+ error: string().optional(),
13460
+ renderedAs: RenderedAsSchema.optional()
13461
+ });
13462
+ /** Same shape as SendResult — kept as a distinct name for the test panel. */
13463
+ var TestResultSchema = SendResultSchema;
13464
+ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSchema)), method(object({
13465
+ kind: string(),
13466
+ config: record(string(), unknown()).optional()
13467
+ }), array(DiscoveredTargetSchema)), method(object({
13468
+ targetId: string(),
13469
+ notification: NotificationSchema
13470
+ }), SendResultSchema, { kind: "mutation" }), method(object({
13471
+ targetId: string(),
13472
+ sample: NotificationSchema.optional()
13473
+ }), TestResultSchema, { kind: "mutation" }), method(object({ target: TargetSchema }), TargetSchema, { kind: "mutation" }), method(object({ targetId: string() }), _void(), { kind: "mutation" }), method(object({
13474
+ targetId: string(),
13475
+ enabled: boolean()
13476
+ }), _void(), { kind: "mutation" });
13301
13477
  /**
13302
13478
  * Zod schemas for persisted record types.
13303
13479
  *
@@ -19315,13 +19491,49 @@ Object.freeze({
19315
19491
  addonId: null,
19316
19492
  access: "create"
19317
19493
  },
19494
+ "notificationOutput.deleteTarget": {
19495
+ capName: "notification-output",
19496
+ capScope: "system",
19497
+ addonId: null,
19498
+ access: "delete"
19499
+ },
19500
+ "notificationOutput.discoverTargets": {
19501
+ capName: "notification-output",
19502
+ capScope: "system",
19503
+ addonId: null,
19504
+ access: "view"
19505
+ },
19506
+ "notificationOutput.listTargetKinds": {
19507
+ capName: "notification-output",
19508
+ capScope: "system",
19509
+ addonId: null,
19510
+ access: "view"
19511
+ },
19512
+ "notificationOutput.listTargets": {
19513
+ capName: "notification-output",
19514
+ capScope: "system",
19515
+ addonId: null,
19516
+ access: "view"
19517
+ },
19318
19518
  "notificationOutput.send": {
19319
19519
  capName: "notification-output",
19320
19520
  capScope: "system",
19321
19521
  addonId: null,
19322
19522
  access: "create"
19323
19523
  },
19324
- "notificationOutput.sendTest": {
19524
+ "notificationOutput.setTargetEnabled": {
19525
+ capName: "notification-output",
19526
+ capScope: "system",
19527
+ addonId: null,
19528
+ access: "create"
19529
+ },
19530
+ "notificationOutput.testTarget": {
19531
+ capName: "notification-output",
19532
+ capScope: "system",
19533
+ addonId: null,
19534
+ access: "create"
19535
+ },
19536
+ "notificationOutput.upsertTarget": {
19325
19537
  capName: "notification-output",
19326
19538
  capScope: "system",
19327
19539
  addonId: null,
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  enumerable: true
22
22
  }) : target, mod));
23
23
  //#endregion
24
- const require_dist = require("../dist-Bqz1mcNR.js");
24
+ const require_dist = require("../dist-DoylrRoz.js");
25
25
  let node_path = require("node:path");
26
26
  node_path = __toESM(node_path);
27
27
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { a as BaseAddon, c as array, d as literal, f as number, l as boolean, m as string, n as defineCustomActions, o as EventCategory, p as object, r as networkAccessCapability, s as _enum, t as customAction } from "../dist-DSufp04e.mjs";
1
+ import { a as BaseAddon, c as array, d as literal, f as number, l as boolean, m as string, n as defineCustomActions, o as EventCategory, p as object, r as networkAccessCapability, s as _enum, t as customAction } from "../dist-Cg8ThXui.mjs";
2
2
  import * as path from "node:path";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { spawn } from "node:child_process";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_dist = require("../dist-Bqz1mcNR.js");
2
+ const require_dist = require("../dist-DoylrRoz.js");
3
3
  //#region src/turn/cloudflare-turn.ts
4
4
  /**
5
5
  * Cloudflare returns ICE servers in several flavours depending on which
@@ -1,4 +1,4 @@
1
- import { a as BaseAddon, d as literal, f as number, i as turnProviderCapability, l as boolean, m as string, n as defineCustomActions, p as object, t as customAction, u as discriminatedUnion } from "../dist-DSufp04e.mjs";
1
+ import { a as BaseAddon, d as literal, f as number, i as turnProviderCapability, l as boolean, m as string, n as defineCustomActions, p as object, t as customAction, u as discriminatedUnion } from "../dist-Cg8ThXui.mjs";
2
2
  //#region src/turn/cloudflare-turn.ts
3
3
  /**
4
4
  * Cloudflare returns ICE servers in several flavours depending on which
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-cloudflare",
3
- "version": "1.1.13",
3
+ "version": "1.1.14",
4
4
  "description": "Cloudflare bundle — Tunnel (network-access) + TURN relay (turn-provider). Multi-entry npm package shipping 2 addons under a single bundle.",
5
5
  "keywords": [
6
6
  "camstack",
@@ -45,7 +45,8 @@
45
45
  "version": "1.0.0",
46
46
  "entry": "./dist/tunnel/cloudflare-tunnel.addon.js",
47
47
  "execution": {
48
- "placement": "hub-only"
48
+ "placement": "hub-only",
49
+ "group": "net-access"
49
50
  },
50
51
  "capabilities": [
51
52
  {
@@ -62,7 +63,8 @@
62
63
  "version": "1.0.0",
63
64
  "entry": "./dist/turn/cloudflare-turn.addon.js",
64
65
  "execution": {
65
- "placement": "hub-only"
66
+ "placement": "hub-only",
67
+ "group": "net-access"
66
68
  },
67
69
  "capabilities": [
68
70
  {