@every-app/sdk 0.3.0-rc.10 → 0.3.0-rc.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.
Files changed (89) hide show
  1. package/README.md +62 -64
  2. package/dist/cloudflare/catalogSettings.generated.d.ts +7 -4
  3. package/dist/cloudflare/catalogSettings.generated.d.ts.map +1 -1
  4. package/dist/cloudflare/catalogSettings.generated.js +7 -6
  5. package/dist/cloudflare/index.d.ts +1 -1
  6. package/dist/cloudflare/index.d.ts.map +1 -1
  7. package/dist/cloudflare/worker.d.ts +35 -1
  8. package/dist/cloudflare/worker.d.ts.map +1 -1
  9. package/dist/cloudflare/worker.js +31 -4
  10. package/dist/index.d.ts +1 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/internal/aiDefault.d.ts +4 -3
  13. package/dist/internal/aiDefault.d.ts.map +1 -1
  14. package/dist/internal/aiDefault.js +6 -5
  15. package/dist/internal/aiProviders.d.ts.map +1 -1
  16. package/dist/internal/aiProviders.js +2 -2
  17. package/dist/internal/capabilities.d.ts +97 -481
  18. package/dist/internal/capabilities.d.ts.map +1 -1
  19. package/dist/internal/capabilities.js +47 -548
  20. package/dist/internal/catalog/index.d.ts +35 -0
  21. package/dist/internal/catalog/index.d.ts.map +1 -1
  22. package/dist/internal/catalog/infra.d.ts +35 -0
  23. package/dist/internal/catalog/infra.d.ts.map +1 -1
  24. package/dist/internal/catalog/infra.js +65 -0
  25. package/dist/internal/events.d.ts +52 -1
  26. package/dist/internal/events.d.ts.map +1 -1
  27. package/dist/internal/events.js +65 -3
  28. package/dist/internal/oauthBuiltIns.d.ts +101 -0
  29. package/dist/internal/oauthBuiltIns.d.ts.map +1 -0
  30. package/dist/internal/oauthBuiltIns.js +122 -0
  31. package/dist/internal/oauthClient.d.ts +7 -47
  32. package/dist/internal/oauthClient.d.ts.map +1 -1
  33. package/dist/internal/oauthClient.js +1 -115
  34. package/dist/internal/oauthPresets.d.ts +14 -15
  35. package/dist/internal/oauthPresets.d.ts.map +1 -1
  36. package/dist/internal/oauthPresets.js +42 -853
  37. package/dist/internal/oauthScopes.d.ts +43 -155
  38. package/dist/internal/oauthScopes.d.ts.map +1 -1
  39. package/dist/internal/oauthScopes.js +82 -475
  40. package/dist/internal/oauthSpec.d.ts +72 -71
  41. package/dist/internal/oauthSpec.d.ts.map +1 -1
  42. package/dist/internal/oauthSpec.js +178 -447
  43. package/dist/internal/protocol.d.ts +42 -13
  44. package/dist/internal/protocol.d.ts.map +1 -1
  45. package/dist/internal/protocol.js +45 -7
  46. package/dist/internal/providerRegistry.d.ts +1 -61
  47. package/dist/internal/providerRegistry.d.ts.map +1 -1
  48. package/dist/internal/providerRegistry.js +8 -115
  49. package/dist/internal/providerSpec.d.ts.map +1 -1
  50. package/dist/internal/providerSpec.js +14 -36
  51. package/dist/internal/remoteMcp.d.ts.map +1 -1
  52. package/dist/internal/remoteMcp.js +1 -5
  53. package/dist/internal/tools.d.ts +5 -4
  54. package/dist/internal/tools.d.ts.map +1 -1
  55. package/dist/internal/tools.js +4 -3
  56. package/dist/manifest.d.ts +34 -5
  57. package/dist/manifest.d.ts.map +1 -1
  58. package/dist/manifest.js +1 -1
  59. package/dist/server/attribution.d.ts +9 -0
  60. package/dist/server/attribution.d.ts.map +1 -1
  61. package/dist/server/attribution.js +7 -1
  62. package/dist/server/connectUrl.d.ts +4 -9
  63. package/dist/server/connectUrl.d.ts.map +1 -1
  64. package/dist/server/connectUrl.js +17 -14
  65. package/dist/server/eventsEndpoint.d.ts +48 -0
  66. package/dist/server/eventsEndpoint.d.ts.map +1 -0
  67. package/dist/server/eventsEndpoint.js +145 -0
  68. package/dist/server/everyApp.d.ts +15 -6
  69. package/dist/server/everyApp.d.ts.map +1 -1
  70. package/dist/server/everyApp.js +12 -3
  71. package/dist/server/index.d.ts +4 -3
  72. package/dist/server/index.d.ts.map +1 -1
  73. package/dist/server/index.js +2 -2
  74. package/dist/server/integrationFetch.d.ts +59 -71
  75. package/dist/server/integrationFetch.d.ts.map +1 -1
  76. package/dist/server/integrationFetch.js +117 -392
  77. package/dist/server/tools.d.ts +7 -2
  78. package/dist/server/tools.d.ts.map +1 -1
  79. package/dist/server/tools.js +2 -1
  80. package/dist/server/toolsEndpoint.d.ts +3 -1
  81. package/dist/server/toolsEndpoint.d.ts.map +1 -1
  82. package/dist/server/toolsEndpoint.js +9 -3
  83. package/dist/server/webhooks.d.ts +56 -0
  84. package/dist/server/webhooks.d.ts.map +1 -0
  85. package/dist/server/webhooks.js +205 -0
  86. package/package.json +1 -1
  87. package/dist/server/authorizeUrl.d.ts +0 -43
  88. package/dist/server/authorizeUrl.d.ts.map +0 -1
  89. package/dist/server/authorizeUrl.js +0 -106
@@ -1206,6 +1206,41 @@ export declare const CATALOG_ENTRIES: {
1206
1206
  };
1207
1207
  readonly tags: readonly ["weather", "forecast"];
1208
1208
  };
1209
+ readonly daytona: {
1210
+ readonly mode: "api_key";
1211
+ readonly label: "Daytona";
1212
+ readonly description: "Sandboxes for running code: create, start, stop, archive and delete sandboxes, and manage their snapshots and volumes.";
1213
+ readonly auth: {
1214
+ readonly kind: "bearer";
1215
+ readonly secret: "DAYTONA_API_KEY";
1216
+ };
1217
+ readonly docs: "https://www.daytona.io/docs/en/api-keys/";
1218
+ readonly api: "https://www.daytona.io/docs/en/tools/api/";
1219
+ readonly hosts: readonly ["app.daytona.io"];
1220
+ readonly data: "account";
1221
+ readonly access: readonly ["read", "write"];
1222
+ readonly readMethods: readonly ["GET", "HEAD"];
1223
+ readonly writeMethods: readonly ["POST", "PUT", "PATCH", "DELETE"];
1224
+ readonly accountWidePaths: readonly [readonly ["organizations"], readonly ["organization"], readonly ["billing"], readonly ["api-keys"], readonly ["users"], readonly ["audit"], readonly ["webhooks"], readonly ["secret"], readonly ["docker-registry"], readonly ["object-storage"], readonly ["regions"], readonly ["runners"], readonly ["for-runner"], readonly ["jobs"], readonly ["warm-pools"], readonly ["preview"], readonly ["ssh-access", "validate"]];
1225
+ readonly hint: "An API key from the Daytona dashboard's Keys page, with only the permissions the apps need; the Gateway sends it as a bearer token to app.daytona.io. Any key of an organization reaches every running sandbox in it, so give the Gateway a Daytona organization of its own.";
1226
+ readonly secrets: readonly [{
1227
+ readonly name: "DAYTONA_API_KEY";
1228
+ readonly hint: "An API key from the Daytona dashboard's Keys page: write:sandboxes and delete:sandboxes (and the snapshot or volume ones) only if an app needs them, and never manage:api_keys, manage:secrets, manage:billing or the region and runner permissions.";
1229
+ }];
1230
+ readonly smoke: {
1231
+ readonly method: "GET";
1232
+ readonly path: "/api/sandbox";
1233
+ readonly expect: readonly [200];
1234
+ readonly free: true;
1235
+ readonly note: "Lists the organization's sandboxes; any key may read them.";
1236
+ };
1237
+ readonly example: "start a sandbox from my snapshot and stop it when the run is done";
1238
+ readonly verified: {
1239
+ readonly on: "2026-11-01";
1240
+ readonly how: "docs";
1241
+ };
1242
+ readonly tags: readonly ["sandbox", "compute", "hosting"];
1243
+ };
1209
1244
  readonly postmark: {
1210
1245
  readonly mode: "api_key";
1211
1246
  readonly label: "Postmark";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internal/catalog/index.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMlB,CAAC"}
@@ -419,5 +419,40 @@ export declare const INFRA: {
419
419
  };
420
420
  readonly tags: readonly ["weather", "forecast"];
421
421
  };
422
+ readonly daytona: {
423
+ readonly mode: "api_key";
424
+ readonly label: "Daytona";
425
+ readonly description: "Sandboxes for running code: create, start, stop, archive and delete sandboxes, and manage their snapshots and volumes.";
426
+ readonly auth: {
427
+ readonly kind: "bearer";
428
+ readonly secret: "DAYTONA_API_KEY";
429
+ };
430
+ readonly docs: "https://www.daytona.io/docs/en/api-keys/";
431
+ readonly api: "https://www.daytona.io/docs/en/tools/api/";
432
+ readonly hosts: readonly ["app.daytona.io"];
433
+ readonly data: "account";
434
+ readonly access: readonly ["read", "write"];
435
+ readonly readMethods: readonly ["GET", "HEAD"];
436
+ readonly writeMethods: readonly ["POST", "PUT", "PATCH", "DELETE"];
437
+ readonly accountWidePaths: readonly [readonly ["organizations"], readonly ["organization"], readonly ["billing"], readonly ["api-keys"], readonly ["users"], readonly ["audit"], readonly ["webhooks"], readonly ["secret"], readonly ["docker-registry"], readonly ["object-storage"], readonly ["regions"], readonly ["runners"], readonly ["for-runner"], readonly ["jobs"], readonly ["warm-pools"], readonly ["preview"], readonly ["ssh-access", "validate"]];
438
+ readonly hint: "An API key from the Daytona dashboard's Keys page, with only the permissions the apps need; the Gateway sends it as a bearer token to app.daytona.io. Any key of an organization reaches every running sandbox in it, so give the Gateway a Daytona organization of its own.";
439
+ readonly secrets: readonly [{
440
+ readonly name: "DAYTONA_API_KEY";
441
+ readonly hint: "An API key from the Daytona dashboard's Keys page: write:sandboxes and delete:sandboxes (and the snapshot or volume ones) only if an app needs them, and never manage:api_keys, manage:secrets, manage:billing or the region and runner permissions.";
442
+ }];
443
+ readonly smoke: {
444
+ readonly method: "GET";
445
+ readonly path: "/api/sandbox";
446
+ readonly expect: readonly [200];
447
+ readonly free: true;
448
+ readonly note: "Lists the organization's sandboxes; any key may read them.";
449
+ };
450
+ readonly example: "start a sandbox from my snapshot and stop it when the run is done";
451
+ readonly verified: {
452
+ readonly on: "2026-11-01";
453
+ readonly how: "docs";
454
+ };
455
+ readonly tags: readonly ["sandbox", "compute", "hosting"];
456
+ };
422
457
  };
423
458
  //# sourceMappingURL=infra.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"infra.d.ts","sourceRoot":"","sources":["../../../src/internal/catalog/infra.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyiBmC,CAAC"}
1
+ {"version":3,"file":"infra.d.ts","sourceRoot":"","sources":["../../../src/internal/catalog/infra.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4mBmC,CAAC"}
@@ -540,4 +540,69 @@ export const INFRA = {
540
540
  },
541
541
  tags: ["weather", "forecast"],
542
542
  },
543
+ // Added 2026-11-01 from Daytona's OpenAPI spec (daytona.io/docs/openapi.json)
544
+ // and its API-key docs, for Birds' sandboxes (docs/design/
545
+ // 2026-11-birds-forcing-function.md, section 1.12). The control plane only:
546
+ // preview URLs (<port>-<id>.proxy.daytona.works, per-sandbox tokens) and
547
+ // the toolbox stay outside the proxy.
548
+ daytona: {
549
+ mode: "api_key",
550
+ label: "Daytona",
551
+ description: "Sandboxes for running code: create, start, stop, archive and delete sandboxes, and manage their snapshots and volumes.",
552
+ auth: { kind: "bearer", secret: "DAYTONA_API_KEY" },
553
+ docs: "https://www.daytona.io/docs/en/api-keys/",
554
+ api: "https://www.daytona.io/docs/en/tools/api/",
555
+ hosts: ["app.daytona.io"],
556
+ data: "account",
557
+ access: ["read", "write"],
558
+ readMethods: ["GET", "HEAD"],
559
+ writeMethods: ["POST", "PUT", "PATCH", "DELETE"],
560
+ // One key is the whole Daytona organization's. Refused: the
561
+ // organization itself (members, roles, invitations, SSO, usage and
562
+ // spend, its settings), billing, API keys, the signed-in user, the audit
563
+ // log, webhooks (which would send every sandbox event to a URL of the
564
+ // app's choosing), and what hands out the organization's credentials or
565
+ // runs its infrastructure: the organization's secrets, registry and
566
+ // object-storage push access, regions (which regenerate proxy and SSH
567
+ // keys), runners, jobs, warm pools, and the preview proxy's own checks.
568
+ accountWidePaths: [
569
+ ["organizations"],
570
+ ["organization"],
571
+ ["billing"],
572
+ ["api-keys"],
573
+ ["users"],
574
+ ["audit"],
575
+ ["webhooks"],
576
+ ["secret"],
577
+ ["docker-registry"],
578
+ ["object-storage"],
579
+ ["regions"],
580
+ ["runners"],
581
+ ["for-runner"],
582
+ ["jobs"],
583
+ ["warm-pools"],
584
+ ["preview"],
585
+ ["ssh-access", "validate"],
586
+ ],
587
+ hint: "An API key from the Daytona dashboard's Keys page, with only the permissions the apps need; the Gateway sends it as a bearer token to app.daytona.io. Any key of an organization reaches every running sandbox in it, so give the Gateway a Daytona organization of its own.",
588
+ secrets: [
589
+ {
590
+ name: "DAYTONA_API_KEY",
591
+ hint: "An API key from the Daytona dashboard's Keys page: write:sandboxes and delete:sandboxes (and the snapshot or volume ones) only if an app needs them, and never manage:api_keys, manage:secrets, manage:billing or the region and runner permissions.",
592
+ },
593
+ ],
594
+ smoke: {
595
+ method: "GET",
596
+ path: "/api/sandbox",
597
+ expect: [200],
598
+ free: true,
599
+ note: "Lists the organization's sandboxes; any key may read them.",
600
+ },
601
+ example: "start a sandbox from my snapshot and stop it when the run is done",
602
+ verified: {
603
+ on: "2026-11-01",
604
+ how: "docs",
605
+ },
606
+ tags: ["sandbox", "compute", "hosting"],
607
+ },
543
608
  };
@@ -114,11 +114,62 @@ export declare const EVENT_PRIVATE_NAME_SUFFIXES: readonly string[];
114
114
  */
115
115
  export declare function isPrivateEventTargetName(host: string): boolean;
116
116
  /** The sinks a subscription delivers to. */
117
- export declare const EVENT_SINKS: readonly ["webhook", "email"];
117
+ export declare const EVENT_SINKS: readonly ["webhook", "email", "app"];
118
118
  export type EventSink = (typeof EVENT_SINKS)[number];
119
119
  /** Whom the email sink mails: the organization's owners, or owners and admins. */
120
120
  export declare const EVENT_EMAIL_RECIPIENTS: readonly ["owners", "admins"];
121
121
  export type EventEmailRecipients = (typeof EVENT_EMAIL_RECIPIENTS)[number];
122
+ /**
123
+ * The `app` sink (docs/design/2026-11-birds-decisions/app-event-sink.md):
124
+ * an app declares `events: { subscribe, why }` in its manifest, the deploy
125
+ * makes the subscription for the app's own organization, and the Gateway
126
+ * delivers over the app's service binding to {@link APP_EVENTS_PATH} with a
127
+ * system token of purpose `events.deliver`.
128
+ *
129
+ * Which events may reach an app is an **allowlist** of families, not a
130
+ * deny-list: a family added to the catalogue later reaches no app until it
131
+ * is added here on purpose. `token.*`, `subscription.*`, `provider.*`,
132
+ * `signin_provider.*`, `cap.*`, `ai.*`, `access.*` and `organization.*` are
133
+ * not on it, and `member.password_reset` is left out of `member.*`.
134
+ */
135
+ export declare const APP_EVENTS_PATH = "/__everyapp/events";
136
+ export declare const APP_SINK_EVENT_FAMILIES: readonly EventGroup[];
137
+ /** Types of an allowed family that still never reach an app. */
138
+ export declare const APP_SINK_EXCLUDED_TYPES: readonly string[];
139
+ /** The most patterns one app's `events.subscribe` may list. */
140
+ export declare const APP_SINK_PATTERNS_MAX = 25;
141
+ /**
142
+ * Whether an event of this type may be delivered to an app at all: its
143
+ * family is on the allowlist and the type isn't excluded. Checked when the
144
+ * bus queues a delivery and again before each attempt, whatever the
145
+ * subscription's stored patterns say.
146
+ */
147
+ export declare function appSinkTypeAllowed(type: string): boolean;
148
+ /**
149
+ * What is wrong with a pattern an app's manifest subscribes to, or null: a
150
+ * well-formed pattern ({@link eventPatternProblem}) inside an allowed
151
+ * family. `*` and any pattern outside the families are refused at deploy.
152
+ */
153
+ export declare function appSinkPatternProblem(pattern: string): string | null;
154
+ /**
155
+ * What the Gateway POSTs to {@link APP_EVENTS_PATH}: the same envelope a
156
+ * webhook receives.
157
+ */
158
+ export interface AppEventEnvelope {
159
+ id: string;
160
+ type: string;
161
+ version: number;
162
+ summary: string;
163
+ time: string;
164
+ gateway: string;
165
+ organization: {
166
+ id: string;
167
+ slug: string;
168
+ name: string;
169
+ };
170
+ actor: unknown;
171
+ data: Record<string, unknown>;
172
+ }
122
173
  /**
123
174
  * A subscription pattern: `*` (everything but ping), an exact type, or a
124
175
  * prefix with `.*` (`member.*`, `app.*`, `app.crm.*`). `app.*` matches the
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/internal/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,UAAU,GAClB,QAAQ,GACR,cAAc,GACd,KAAK,GACL,KAAK,GACL,OAAO,GACP,MAAM,GACN,YAAY,GACZ,OAAO,GACP,QAAQ,GACR,iBAAiB,GACjB,SAAS,GACT,UAAU,GACV,cAAc,GACd,IAAI,GACJ,MAAM,CAAC;AAEX,MAAM,WAAW,aAAa;IAC5B,wCAAwC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,iFAAiF;IACjF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,0EAA0E;IAC1E,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC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E,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,MAAM,CAER;AAED,kEAAkE;AAClE,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,IAAI,CAY5C"}
@@ -52,7 +52,7 @@ export const EVENT_TYPES = [
52
52
  entry("tool", "tool.error", "An AI client's tool call failed"),
53
53
  entry("connection", "connection.created", "An AI app was connected"),
54
54
  entry("connection", "connection.revoked", "An AI app connection was revoked"),
55
- entry("connection", "connection.used", "Linked dev used the Gateway's services (first call of the day)"),
55
+ entry("connection", "connection.used", "Linked dev used the Gateway's services, or an app used a member's OAuth connection (first call of the day)"),
56
56
  entry("token", "token.created", "A personal access token was created"),
57
57
  entry("token", "token.revoked", "A personal access token was revoked"),
58
58
  entry("access", "access.changed", "Cloudflare Access was turned on or off"),
@@ -67,7 +67,7 @@ export const EVENT_TYPES = [
67
67
  entry("provider", "provider.added", "A provider was registered"),
68
68
  entry("provider", "provider.removed", "A provider was removed"),
69
69
  entry("provider", "provider.updated", "A provider's spec or OAuth client was replaced"),
70
- entry("provider", "provider.connected", "Someone connected an account at an OAuth provider"),
70
+ entry("provider", "provider.connected", "Someone connected an account at an OAuth provider in an app"),
71
71
  entry("provider", "provider.disconnected", "An OAuth provider account was disconnected"),
72
72
  entry("provider", "provider.connection_expired", "An OAuth provider refused to refresh a connection; it needs reconnecting"),
73
73
  entry("subscription", "subscription.created", "An event subscription was added"),
@@ -203,9 +203,71 @@ export function isPrivateEventTargetName(host) {
203
203
  return EVENT_PRIVATE_NAME_SUFFIXES.some((suffix) => host === suffix || host.endsWith(`.${suffix}`));
204
204
  }
205
205
  /** The sinks a subscription delivers to. */
206
- export const EVENT_SINKS = ["webhook", "email"];
206
+ export const EVENT_SINKS = ["webhook", "email", "app"];
207
207
  /** Whom the email sink mails: the organization's owners, or owners and admins. */
208
208
  export const EVENT_EMAIL_RECIPIENTS = ["owners", "admins"];
209
+ /**
210
+ * The `app` sink (docs/design/2026-11-birds-decisions/app-event-sink.md):
211
+ * an app declares `events: { subscribe, why }` in its manifest, the deploy
212
+ * makes the subscription for the app's own organization, and the Gateway
213
+ * delivers over the app's service binding to {@link APP_EVENTS_PATH} with a
214
+ * system token of purpose `events.deliver`.
215
+ *
216
+ * Which events may reach an app is an **allowlist** of families, not a
217
+ * deny-list: a family added to the catalogue later reaches no app until it
218
+ * is added here on purpose. `token.*`, `subscription.*`, `provider.*`,
219
+ * `signin_provider.*`, `cap.*`, `ai.*`, `access.*` and `organization.*` are
220
+ * not on it, and `member.password_reset` is left out of `member.*`.
221
+ */
222
+ export const APP_EVENTS_PATH = "/__everyapp/events";
223
+ export const APP_SINK_EVENT_FAMILIES = [
224
+ "member",
225
+ "group",
226
+ "app",
227
+ "mcp_app",
228
+ "connection",
229
+ "tool",
230
+ ];
231
+ /** Types of an allowed family that still never reach an app. */
232
+ export const APP_SINK_EXCLUDED_TYPES = [
233
+ "member.password_reset",
234
+ ];
235
+ /** The most patterns one app's `events.subscribe` may list. */
236
+ export const APP_SINK_PATTERNS_MAX = 25;
237
+ /** The family a type or pattern belongs to: its first segment. */
238
+ function familyOf(typeOrPattern) {
239
+ const dot = typeOrPattern.indexOf(".");
240
+ return dot === -1 ? typeOrPattern : typeOrPattern.slice(0, dot);
241
+ }
242
+ /**
243
+ * Whether an event of this type may be delivered to an app at all: its
244
+ * family is on the allowlist and the type isn't excluded. Checked when the
245
+ * bus queues a delivery and again before each attempt, whatever the
246
+ * subscription's stored patterns say.
247
+ */
248
+ export function appSinkTypeAllowed(type) {
249
+ if (APP_SINK_EXCLUDED_TYPES.includes(type))
250
+ return false;
251
+ return APP_SINK_EVENT_FAMILIES.includes(familyOf(type));
252
+ }
253
+ /**
254
+ * What is wrong with a pattern an app's manifest subscribes to, or null: a
255
+ * well-formed pattern ({@link eventPatternProblem}) inside an allowed
256
+ * family. `*` and any pattern outside the families are refused at deploy.
257
+ */
258
+ export function appSinkPatternProblem(pattern) {
259
+ const problem = eventPatternProblem(pattern);
260
+ if (problem)
261
+ return problem;
262
+ if (APP_SINK_EXCLUDED_TYPES.includes(pattern)) {
263
+ return `"${pattern}" never reaches an app`;
264
+ }
265
+ if (pattern === "*" ||
266
+ !APP_SINK_EVENT_FAMILIES.includes(familyOf(pattern))) {
267
+ return `"${pattern}" can't reach an app: an app subscribes to ${APP_SINK_EVENT_FAMILIES.map((family) => `${family}.*`).join(", ")} (member.password_reset excepted)`;
268
+ }
269
+ return null;
270
+ }
209
271
  /**
210
272
  * A subscription pattern: `*` (everything but ping), an exact type, or a
211
273
  * prefix with `.*` (`member.*`, `app.*`, `app.crm.*`). `app.*` matches the
@@ -0,0 +1,101 @@
1
+ /**
2
+ * The OAuth providers every Gateway has built in, as `oauth2-user` specs:
3
+ * the same JSON shape as the presets (./oauthPresets.ts) and a registered
4
+ * row (`everyapp provider add`). What differs between Google, Microsoft
5
+ * and Slack is here as data: the endpoints, the API hosts, how scopes are
6
+ * separated and prefixed, the extra authorize parameters, how the account
7
+ * is named, and the scopes a token may carry beyond what the app asked.
8
+ * No code anywhere reads a provider id to decide anything.
9
+ *
10
+ * Pure data with no imports, so the catalog (./capabilities.ts) can build
11
+ * its entries from it without an import cycle. Each spec parses with
12
+ * `parseProviderSpec` and round-trips through `oauthSpecOf`
13
+ * (oauthBuiltIns.test.ts).
14
+ */
15
+ export declare const BUILT_IN_OAUTH_SPECS: {
16
+ readonly "google-workspace": {
17
+ readonly id: "google-workspace";
18
+ readonly name: "Google";
19
+ readonly description: "Gmail, Calendar, Drive, Search Console, Analytics and the other Google APIs, as the person who connects.";
20
+ readonly docs: "https://console.cloud.google.com/apis/credentials";
21
+ readonly api: "https://developers.google.com/identity/protocols/oauth2/scopes";
22
+ readonly hosts: readonly ["gmail.googleapis.com", "www.googleapis.com", "searchconsole.googleapis.com", "analyticsdata.googleapis.com", "analyticsadmin.googleapis.com", "openidconnect.googleapis.com"];
23
+ readonly auth: {
24
+ readonly kind: "oauth2-user";
25
+ readonly authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth";
26
+ readonly tokenUrl: "https://oauth2.googleapis.com/token";
27
+ readonly clientId: "GOOGLE_WORKSPACE_CLIENT_ID";
28
+ readonly clientSecret: "GOOGLE_WORKSPACE_CLIENT_SECRET";
29
+ readonly inject: "form";
30
+ readonly pkce: true;
31
+ readonly scopeSeparator: "space";
32
+ readonly scopePrefix: "https://www.googleapis.com/auth/";
33
+ readonly authorizeParams: {
34
+ readonly access_type: "offline";
35
+ readonly prompt: "consent";
36
+ };
37
+ readonly identity: {
38
+ readonly url: "https://openidconnect.googleapis.com/v1/userinfo";
39
+ readonly label: "email";
40
+ readonly id: "sub";
41
+ readonly scopes: readonly ["openid", "email"];
42
+ };
43
+ readonly tolerated: readonly ["profile", "https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.profile"];
44
+ };
45
+ readonly hint: "A Web application OAuth client in Google Cloud, with the Gateway's callback as its redirect URI and the scopes your apps list on its consent screen.";
46
+ };
47
+ readonly "microsoft-365": {
48
+ readonly id: "microsoft-365";
49
+ readonly name: "Microsoft 365";
50
+ readonly description: "Outlook mail and calendar, OneDrive and the rest of Microsoft Graph, as the person who connects.";
51
+ readonly docs: "https://entra.microsoft.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade";
52
+ readonly api: "https://learn.microsoft.com/graph/permissions-reference";
53
+ readonly hosts: readonly ["graph.microsoft.com"];
54
+ readonly auth: {
55
+ readonly kind: "oauth2-user";
56
+ readonly authorizeUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize";
57
+ readonly tokenUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/token";
58
+ readonly clientId: "MICROSOFT_365_CLIENT_ID";
59
+ readonly clientSecret: "MICROSOFT_365_CLIENT_SECRET";
60
+ readonly inject: "form";
61
+ readonly pkce: true;
62
+ readonly scopeSeparator: "space";
63
+ readonly scopePrefix: "https://graph.microsoft.com/";
64
+ readonly identity: {
65
+ readonly url: "https://graph.microsoft.com/v1.0/me";
66
+ readonly label: "userPrincipalName";
67
+ readonly id: "id";
68
+ readonly scopes: readonly ["User.Read", "offline_access"];
69
+ };
70
+ readonly tolerated: readonly ["openid", "profile", "email"];
71
+ };
72
+ readonly hint: "An app registration in Entra for accounts in any organization and personal accounts, with the Gateway's callback as a Web redirect URI. If two apps share this client with different scopes, Microsoft may hand back both apps' scopes and the Gateway refuses the token: give each app its own client.";
73
+ };
74
+ readonly slack: {
75
+ readonly id: "slack";
76
+ readonly name: "Slack";
77
+ readonly description: "Channels, members and messages, as the Slack app.";
78
+ readonly docs: "https://api.slack.com/apps";
79
+ readonly api: "https://api.slack.com/scopes";
80
+ readonly hosts: readonly ["slack.com"];
81
+ readonly auth: {
82
+ readonly kind: "oauth2-user";
83
+ readonly authorizeUrl: "https://slack.com/oauth/v2/authorize";
84
+ readonly tokenUrl: "https://slack.com/api/oauth.v2.access";
85
+ readonly revokeUrl: "https://slack.com/api/auth.revoke";
86
+ readonly clientId: "SLACK_CLIENT_ID";
87
+ readonly clientSecret: "SLACK_CLIENT_SECRET";
88
+ readonly inject: "form";
89
+ readonly pkce: false;
90
+ readonly scopeSeparator: "comma";
91
+ readonly identity: {
92
+ readonly url: "https://slack.com/api/auth.test";
93
+ readonly label: "team";
94
+ readonly id: "team_id";
95
+ };
96
+ };
97
+ readonly hint: "A Slack app with the Gateway's callback as its redirect URL and the bot scopes your apps list.";
98
+ };
99
+ };
100
+ export type BuiltInOAuthId = keyof typeof BUILT_IN_OAUTH_SPECS;
101
+ //# sourceMappingURL=oauthBuiltIns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauthBuiltIns.d.ts","sourceRoot":"","sources":["../../src/internal/oauthBuiltIns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8GvB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,oBAAoB,CAAC"}
@@ -0,0 +1,122 @@
1
+ /**
2
+ * The OAuth providers every Gateway has built in, as `oauth2-user` specs:
3
+ * the same JSON shape as the presets (./oauthPresets.ts) and a registered
4
+ * row (`everyapp provider add`). What differs between Google, Microsoft
5
+ * and Slack is here as data: the endpoints, the API hosts, how scopes are
6
+ * separated and prefixed, the extra authorize parameters, how the account
7
+ * is named, and the scopes a token may carry beyond what the app asked.
8
+ * No code anywhere reads a provider id to decide anything.
9
+ *
10
+ * Pure data with no imports, so the catalog (./capabilities.ts) can build
11
+ * its entries from it without an import cycle. Each spec parses with
12
+ * `parseProviderSpec` and round-trips through `oauthSpecOf`
13
+ * (oauthBuiltIns.test.ts).
14
+ */
15
+ export const BUILT_IN_OAUTH_SPECS = {
16
+ // One Google Cloud project's OAuth client: Gmail, Calendar, Search
17
+ // Console, Analytics and any other Google API an app names a scope for.
18
+ "google-workspace": {
19
+ id: "google-workspace",
20
+ name: "Google",
21
+ description: "Gmail, Calendar, Drive, Search Console, Analytics and the other Google APIs, as the person who connects.",
22
+ docs: "https://console.cloud.google.com/apis/credentials",
23
+ api: "https://developers.google.com/identity/protocols/oauth2/scopes",
24
+ hosts: [
25
+ "gmail.googleapis.com",
26
+ "www.googleapis.com",
27
+ "searchconsole.googleapis.com",
28
+ "analyticsdata.googleapis.com",
29
+ "analyticsadmin.googleapis.com",
30
+ "openidconnect.googleapis.com",
31
+ ],
32
+ auth: {
33
+ kind: "oauth2-user",
34
+ authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth",
35
+ tokenUrl: "https://oauth2.googleapis.com/token",
36
+ clientId: "GOOGLE_WORKSPACE_CLIENT_ID",
37
+ clientSecret: "GOOGLE_WORKSPACE_CLIENT_SECRET",
38
+ inject: "form",
39
+ pkce: true,
40
+ scopeSeparator: "space",
41
+ // An app writes `gmail.modify`; the authorize URL carries the full
42
+ // `https://www.googleapis.com/auth/gmail.modify`.
43
+ scopePrefix: "https://www.googleapis.com/auth/",
44
+ // A refresh token needs `access_type=offline`; `prompt=consent`
45
+ // makes Google issue one on every connect.
46
+ authorizeParams: { access_type: "offline", prompt: "consent" },
47
+ identity: {
48
+ url: "https://openidconnect.googleapis.com/v1/userinfo",
49
+ label: "email",
50
+ id: "sub",
51
+ scopes: ["openid", "email"],
52
+ },
53
+ // Google answers `email` and `profile` as the userinfo URLs, and may
54
+ // add `profile` beside `openid`.
55
+ tolerated: [
56
+ "profile",
57
+ "https://www.googleapis.com/auth/userinfo.email",
58
+ "https://www.googleapis.com/auth/userinfo.profile",
59
+ ],
60
+ },
61
+ hint: "A Web application OAuth client in Google Cloud, with the Gateway's callback as its redirect URI and the scopes your apps list on its consent screen.",
62
+ },
63
+ // The multi-tenant Entra endpoints: register the client for accounts in
64
+ // any organization and personal accounts.
65
+ "microsoft-365": {
66
+ id: "microsoft-365",
67
+ name: "Microsoft 365",
68
+ description: "Outlook mail and calendar, OneDrive and the rest of Microsoft Graph, as the person who connects.",
69
+ docs: "https://entra.microsoft.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade",
70
+ api: "https://learn.microsoft.com/graph/permissions-reference",
71
+ hosts: ["graph.microsoft.com"],
72
+ auth: {
73
+ kind: "oauth2-user",
74
+ authorizeUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
75
+ tokenUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/token",
76
+ clientId: "MICROSOFT_365_CLIENT_ID",
77
+ clientSecret: "MICROSOFT_365_CLIENT_SECRET",
78
+ inject: "form",
79
+ pkce: true,
80
+ scopeSeparator: "space",
81
+ // An app writes `Mail.Read`; Graph's scopes are fully qualified on
82
+ // the wire and may come back either way.
83
+ scopePrefix: "https://graph.microsoft.com/",
84
+ identity: {
85
+ url: "https://graph.microsoft.com/v1.0/me",
86
+ label: "userPrincipalName",
87
+ id: "id",
88
+ // `offline_access` is what makes Entra issue a refresh token.
89
+ scopes: ["User.Read", "offline_access"],
90
+ },
91
+ tolerated: ["openid", "profile", "email"],
92
+ },
93
+ hint: "An app registration in Entra for accounts in any organization and personal accounts, with the Gateway's callback as a Web redirect URI. If two apps share this client with different scopes, Microsoft may hand back both apps' scopes and the Gateway refuses the token: give each app its own client.",
94
+ },
95
+ // A Slack app's bot token: the top-level token of `oauth.v2.access`.
96
+ slack: {
97
+ id: "slack",
98
+ name: "Slack",
99
+ description: "Channels, members and messages, as the Slack app.",
100
+ docs: "https://api.slack.com/apps",
101
+ api: "https://api.slack.com/scopes",
102
+ hosts: ["slack.com"],
103
+ auth: {
104
+ kind: "oauth2-user",
105
+ authorizeUrl: "https://slack.com/oauth/v2/authorize",
106
+ tokenUrl: "https://slack.com/api/oauth.v2.access",
107
+ revokeUrl: "https://slack.com/api/auth.revoke",
108
+ clientId: "SLACK_CLIENT_ID",
109
+ clientSecret: "SLACK_CLIENT_SECRET",
110
+ inject: "form",
111
+ // Slack refuses `code_challenge`.
112
+ pkce: false,
113
+ scopeSeparator: "comma",
114
+ identity: {
115
+ url: "https://slack.com/api/auth.test",
116
+ label: "team",
117
+ id: "team_id",
118
+ },
119
+ },
120
+ hint: "A Slack app with the Gateway's callback as its redirect URL and the bot scopes your apps list.",
121
+ },
122
+ };