@frontera-sdk/functions 1.52.48 → 1.53.1

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/types.ts +15 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontera-sdk/functions",
3
- "version": "1.52.48",
3
+ "version": "1.53.1",
4
4
  "description": "Author Frontera functions: manifest, triggers and the typed handler contract.",
5
5
  "keywords": [
6
6
  "frontera",
@@ -42,7 +42,7 @@
42
42
  "typescript": "^5.9.3"
43
43
  },
44
44
  "dependencies": {
45
- "@frontera-sdk/blueprint": "1.52.48",
45
+ "@frontera-sdk/blueprint": "1.53.1",
46
46
  "cron-parser": "^5.0.6"
47
47
  }
48
48
  }
package/src/types.ts CHANGED
@@ -712,8 +712,19 @@ export interface HttpRequest {
712
712
  headers?: Record<string, string>
713
713
  /** String only — no streaming, no binary. */
714
714
  body?: string
715
- /** Inject a workspace secret into one header. Needs a `secret:<name>` grant. */
716
- auth?: { header: string; secret: string; prefix?: string }
715
+ /**
716
+ * A credential the platform adds, which this process never sees. Needs a
717
+ * `secret:<name>` grant either way.
718
+ *
719
+ * - `{ header, secret, prefix? }` puts the secret's value in one header.
720
+ * - `{ githubApp: { secret, installationId } }` calls GitHub as a GitHub App
721
+ * installation: the platform signs a JWT with the App's private key from
722
+ * the secret (JSON `{ "appId": 123, "privateKey": "-----BEGIN …" }`), trades
723
+ * it for the installation's one-hour token, reuses that until five minutes
724
+ * before it expires, and sends `Authorization: Bearer <token>`. An event
725
+ * GitHub sends to the App carries the id as `payload.installation.id`.
726
+ */
727
+ auth?: { header: string; secret: string; prefix?: string } | { githubApp: { secret: string; installationId: number | string } }
717
728
  }
718
729
 
719
730
  export interface HttpResponse {
@@ -811,7 +822,7 @@ export interface AutomationDescriptor {
811
822
  * `cron` is deliberately absent: it is what the runner INFERS when the event
812
823
  * names no source at all, so it is never carried on an event.
813
824
  */
814
- export const EVENT_TRIGGER_SOURCES = ['manual', 'rehearsal', 'agent', 'app', 'workflow', 'channel'] as const
825
+ export const EVENT_TRIGGER_SOURCES = ['manual', 'rehearsal', 'agent', 'app', 'mcp', 'workflow', 'channel'] as const
815
826
  export type EventTriggerSource = (typeof EVENT_TRIGGER_SOURCES)[number]
816
827
 
817
828
  /**
@@ -822,7 +833,7 @@ export type EventTriggerSource = (typeof EVENT_TRIGGER_SOURCES)[number]
822
833
  * under any other source is refused too — it means the event was tampered with
823
834
  * or two payloads got mixed.
824
835
  */
825
- export const TICKETED_TRIGGER_SOURCES = ['agent', 'app'] as const
836
+ export const TICKETED_TRIGGER_SOURCES = ['agent', 'app', 'mcp'] as const
826
837
  export type TicketedTriggerSource = (typeof TICKETED_TRIGGER_SOURCES)[number]
827
838
 
828
839
  export function isEventTriggerSource(value: unknown): value is EventTriggerSource {