@every-app/sdk 0.3.0-rc.1 → 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.
- package/LICENSE +21 -0
- package/README.md +62 -64
- package/dist/cloudflare/catalogSettings.generated.d.ts +84 -0
- package/dist/cloudflare/catalogSettings.generated.d.ts.map +1 -0
- package/dist/cloudflare/catalogSettings.generated.js +175 -0
- package/dist/cloudflare/index.d.ts +3 -2
- package/dist/cloudflare/index.d.ts.map +1 -1
- package/dist/cloudflare/index.js +4 -1
- package/dist/cloudflare/sentinel.d.ts +60 -2
- package/dist/cloudflare/sentinel.d.ts.map +1 -1
- package/dist/cloudflare/sentinel.js +37 -2
- package/dist/cloudflare/worker.d.ts +391 -63
- package/dist/cloudflare/worker.d.ts.map +1 -1
- package/dist/cloudflare/worker.js +394 -108
- package/dist/dev/index.d.ts +1 -1
- package/dist/dev/index.d.ts.map +1 -1
- package/dist/dev/index.js +1 -1
- package/dist/dev/keypair.d.ts +2 -0
- package/dist/dev/keypair.d.ts.map +1 -1
- package/dist/dev/keypair.js +2 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/internal/aiDefault.d.ts +205 -0
- package/dist/internal/aiDefault.d.ts.map +1 -0
- package/dist/internal/aiDefault.js +335 -0
- package/dist/internal/aiProviders.d.ts +7 -2
- package/dist/internal/aiProviders.d.ts.map +1 -1
- package/dist/internal/aiProviders.js +19 -6
- package/dist/internal/appSettings.d.ts +82 -4
- package/dist/internal/appSettings.d.ts.map +1 -1
- package/dist/internal/appSettings.js +204 -29
- package/dist/internal/audit.d.ts +108 -0
- package/dist/internal/audit.d.ts.map +1 -0
- package/dist/internal/audit.js +235 -0
- package/dist/internal/capabilities.d.ts +2261 -815
- package/dist/internal/capabilities.d.ts.map +1 -1
- package/dist/internal/capabilities.js +122 -1034
- package/dist/internal/catalog/commerce.d.ts +394 -0
- package/dist/internal/catalog/commerce.d.ts.map +1 -0
- package/dist/internal/catalog/commerce.js +477 -0
- package/dist/internal/catalog/comms.d.ts +375 -0
- package/dist/internal/catalog/comms.d.ts.map +1 -0
- package/dist/internal/catalog/comms.js +520 -0
- package/dist/internal/catalog/index.d.ts +2008 -0
- package/dist/internal/catalog/index.d.ts.map +1 -0
- package/dist/internal/catalog/index.js +19 -0
- package/dist/internal/catalog/inference.d.ts +393 -0
- package/dist/internal/catalog/inference.d.ts.map +1 -0
- package/dist/internal/catalog/inference.js +460 -0
- package/dist/internal/catalog/infra.d.ts +458 -0
- package/dist/internal/catalog/infra.d.ts.map +1 -0
- package/dist/internal/catalog/infra.js +608 -0
- package/dist/internal/catalog/search.d.ts +400 -0
- package/dist/internal/catalog/search.d.ts.map +1 -0
- package/dist/internal/catalog/search.js +463 -0
- package/dist/internal/devProviders.d.ts +2 -2
- package/dist/internal/devProviders.d.ts.map +1 -1
- package/dist/internal/devProviders.js +19 -1
- package/dist/internal/events.d.ts +65 -3
- package/dist/internal/events.d.ts.map +1 -1
- package/dist/internal/events.js +110 -5
- package/dist/internal/gatewaySettings.d.ts +3 -2
- package/dist/internal/gatewaySettings.d.ts.map +1 -1
- package/dist/internal/gatewaySettings.js +12 -6
- package/dist/internal/identity.d.ts +41 -4
- package/dist/internal/identity.d.ts.map +1 -1
- package/dist/internal/identity.js +48 -10
- package/dist/internal/index.d.ts +6 -1
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +6 -1
- package/dist/internal/members.d.ts +3 -2
- package/dist/internal/members.d.ts.map +1 -1
- package/dist/internal/oauthBuiltIns.d.ts +101 -0
- package/dist/internal/oauthBuiltIns.d.ts.map +1 -0
- package/dist/internal/oauthBuiltIns.js +122 -0
- package/dist/internal/oauthClient.d.ts +8 -50
- package/dist/internal/oauthClient.d.ts.map +1 -1
- package/dist/internal/oauthClient.js +2 -177
- package/dist/internal/oauthPresets.d.ts +32 -0
- package/dist/internal/oauthPresets.d.ts.map +1 -0
- package/dist/internal/oauthPresets.js +253 -0
- package/dist/internal/oauthScopes.d.ts +43 -100
- package/dist/internal/oauthScopes.d.ts.map +1 -1
- package/dist/internal/oauthScopes.js +83 -382
- package/dist/internal/oauthSpec.d.ts +103 -0
- package/dist/internal/oauthSpec.d.ts.map +1 -0
- package/dist/internal/oauthSpec.js +520 -0
- package/dist/internal/protocol.d.ts +97 -5
- package/dist/internal/protocol.d.ts.map +1 -1
- package/dist/internal/protocol.js +89 -1
- package/dist/internal/providerRegistry.d.ts +17 -6
- package/dist/internal/providerRegistry.d.ts.map +1 -1
- package/dist/internal/providerRegistry.js +71 -8
- package/dist/internal/providerSpec.d.ts +18 -7
- package/dist/internal/providerSpec.d.ts.map +1 -1
- package/dist/internal/providerSpec.js +420 -34
- package/dist/internal/remoteMcp.d.ts.map +1 -1
- package/dist/internal/remoteMcp.js +1 -5
- package/dist/internal/signInProviders.d.ts +104 -0
- package/dist/internal/signInProviders.d.ts.map +1 -0
- package/dist/internal/signInProviders.js +245 -0
- package/dist/internal/tools.d.ts +5 -4
- package/dist/internal/tools.d.ts.map +1 -1
- package/dist/internal/tools.js +4 -3
- package/dist/manifest.d.ts +267 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +30 -0
- package/dist/server/ai.d.ts +111 -0
- package/dist/server/ai.d.ts.map +1 -0
- package/dist/server/ai.js +145 -0
- package/dist/server/aiBinding.d.ts +68 -0
- package/dist/server/aiBinding.d.ts.map +1 -0
- package/dist/server/aiBinding.js +294 -0
- package/dist/server/attribution.d.ts +18 -5
- package/dist/server/attribution.d.ts.map +1 -1
- package/dist/server/attribution.js +19 -5
- package/dist/server/connectUrl.d.ts +16 -0
- package/dist/server/connectUrl.d.ts.map +1 -0
- package/dist/server/connectUrl.js +40 -0
- package/dist/server/context.d.ts +68 -0
- package/dist/server/context.d.ts.map +1 -0
- package/dist/server/context.js +117 -0
- package/dist/server/emailBinding.d.ts +72 -0
- package/dist/server/emailBinding.d.ts.map +1 -0
- package/dist/server/emailBinding.js +124 -0
- package/dist/server/emit.d.ts +1 -1
- package/dist/server/emit.d.ts.map +1 -1
- package/dist/server/emit.js +7 -7
- package/dist/server/env.d.ts +44 -0
- package/dist/server/env.d.ts.map +1 -0
- package/dist/server/env.js +1 -0
- package/dist/server/eventsEndpoint.d.ts +48 -0
- package/dist/server/eventsEndpoint.d.ts.map +1 -0
- package/dist/server/eventsEndpoint.js +145 -0
- package/dist/server/everyApp.d.ts +40 -11
- package/dist/server/everyApp.d.ts.map +1 -1
- package/dist/server/everyApp.js +116 -6
- package/dist/server/fromMcpTools.d.ts +89 -0
- package/dist/server/fromMcpTools.d.ts.map +1 -0
- package/dist/server/fromMcpTools.js +192 -0
- package/dist/server/gatewayFetch.d.ts +42 -18
- package/dist/server/gatewayFetch.d.ts.map +1 -1
- package/dist/server/gatewayFetch.js +138 -19
- package/dist/server/gatewayUrl.d.ts +13 -0
- package/dist/server/gatewayUrl.d.ts.map +1 -0
- package/dist/server/gatewayUrl.js +34 -0
- package/dist/server/index.d.ts +16 -4
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +13 -3
- package/dist/server/integrationFetch.d.ts +92 -73
- package/dist/server/integrationFetch.d.ts.map +1 -1
- package/dist/server/integrationFetch.js +206 -319
- package/dist/server/listMembers.d.ts +1 -1
- package/dist/server/listMembers.d.ts.map +1 -1
- package/dist/server/listMembers.js +8 -11
- package/dist/server/refusal.d.ts +55 -0
- package/dist/server/refusal.d.ts.map +1 -0
- package/dist/server/refusal.js +193 -0
- package/dist/server/sendEmail.d.ts +1 -1
- package/dist/server/sendEmail.d.ts.map +1 -1
- package/dist/server/sendEmail.js +7 -7
- package/dist/server/tools.d.ts +7 -2
- package/dist/server/tools.d.ts.map +1 -1
- package/dist/server/tools.js +2 -1
- package/dist/server/toolsEndpoint.d.ts +3 -1
- package/dist/server/toolsEndpoint.d.ts.map +1 -1
- package/dist/server/toolsEndpoint.js +19 -7
- package/dist/server/webhooks.d.ts +56 -0
- package/dist/server/webhooks.d.ts.map +1 -0
- package/dist/server/webhooks.js +205 -0
- package/dist/tanstack-start/index.d.ts +9 -0
- package/dist/tanstack-start/index.d.ts.map +1 -0
- package/dist/tanstack-start/index.js +29 -0
- package/dist/testing/index.d.ts +93 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +156 -0
- package/package.json +35 -14
- package/dist/server/authorizeUrl.d.ts +0 -43
- package/dist/server/authorizeUrl.d.ts.map +0 -1
- package/dist/server/authorizeUrl.js +0 -110
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Every App, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @every-app/sdk
|
|
2
2
|
|
|
3
|
-
The embedded SDK for building apps on the
|
|
3
|
+
The embedded SDK for building apps on the EveryApp platform.
|
|
4
4
|
|
|
5
5
|
It verifies the identity the Gateway injects, defines the app's Worker and its agent tools, and reaches the Gateway's AI, email and integrations. There is no client-side export.
|
|
6
6
|
|
|
@@ -517,88 +517,83 @@ binding, the event is checked as the gateway would, printed as
|
|
|
517
517
|
`[everyapp dev] event app.<id>.<event>` (never its data) and answered
|
|
518
518
|
`{ id: "dev-<uuid>", type }`.
|
|
519
519
|
|
|
520
|
-
###
|
|
520
|
+
### OAuth providers
|
|
521
521
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
`
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
`microsoft-365`). List one for writing, send people to the provider's
|
|
528
|
-
authorize URL (for a client with scope sets, the one `authorizeUrl()`
|
|
529
|
-
builds from its status; for the others, one you build from the status's
|
|
530
|
-
`clientId` and the network's documented scopes), and exchange or refresh
|
|
531
|
-
tokens through the gateway without any client:
|
|
522
|
+
For a person's own account at a provider (Google, Microsoft 365, Slack built
|
|
523
|
+
in; GitHub, Notion and others added from a preset with `everyapp provider
|
|
524
|
+
add`), the gateway holds the client, runs the flow and keeps the tokens. The
|
|
525
|
+
app lists the provider's own scopes, sends people to connect inside the app,
|
|
526
|
+
and calls the provider's API; it never sees a token.
|
|
532
527
|
|
|
533
528
|
```ts
|
|
534
529
|
// everyapp.config.ts
|
|
535
530
|
capabilities: {
|
|
536
|
-
linkedin: { access: "write" },
|
|
537
|
-
// A client several apps share lists the scope sets it uses.
|
|
538
531
|
"google-workspace": {
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
why: "Reads Search Console for the sites you connect",
|
|
532
|
+
scopes: ["webmasters.readonly", "analytics.readonly"],
|
|
533
|
+
why: "Reads Search Console and Analytics for the sites you connect.",
|
|
542
534
|
},
|
|
543
535
|
}
|
|
544
536
|
```
|
|
545
537
|
|
|
538
|
+
A short scope (`gmail.modify`) is joined onto the provider's prefix
|
|
539
|
+
(`https://www.googleapis.com/auth/`); a full one is used as written; `[]`
|
|
540
|
+
for a provider with no scopes (Notion). The gateway adds the scopes that
|
|
541
|
+
name the account (Google's `openid email`), so don't list them. An OAuth
|
|
542
|
+
entry takes no `access`.
|
|
543
|
+
|
|
546
544
|
```ts
|
|
547
545
|
import {
|
|
548
|
-
|
|
546
|
+
connectUrl,
|
|
547
|
+
gatewayRefusal,
|
|
549
548
|
integrationFetch,
|
|
550
549
|
integrationStatus,
|
|
551
550
|
} from "@every-app/sdk/server";
|
|
552
551
|
|
|
553
552
|
const status = await integrationStatus({ env, provider: "google-workspace" });
|
|
554
|
-
if (!status.ready)
|
|
555
|
-
//
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
env,
|
|
566
|
-
provider: "google-workspace",
|
|
567
|
-
for: request,
|
|
568
|
-
})("https://oauth2.googleapis.com/token", {
|
|
569
|
-
method: "POST",
|
|
570
|
-
headers: { "content-type": "application/x-www-form-urlencoded" },
|
|
571
|
-
body: new URLSearchParams({
|
|
572
|
-
grant_type: "authorization_code",
|
|
573
|
-
code,
|
|
574
|
-
redirect_uri,
|
|
575
|
-
code_verifier,
|
|
576
|
-
}),
|
|
577
|
-
});
|
|
553
|
+
if (!status.connection?.ready) {
|
|
554
|
+
// A "Connect Google" button: the gateway asks Google for exactly this
|
|
555
|
+
// app's scopes and sends the person back.
|
|
556
|
+
return redirect(
|
|
557
|
+
connectUrl({ env, provider: "google-workspace", returnTo: request.url }),
|
|
558
|
+
);
|
|
559
|
+
}
|
|
560
|
+
const google = integrationFetch({ env, provider: "google-workspace" });
|
|
561
|
+
const sites = await google(
|
|
562
|
+
"https://searchconsole.googleapis.com/webmasters/v3/sites",
|
|
563
|
+
);
|
|
578
564
|
```
|
|
579
565
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
`
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
`
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
566
|
+
`connectUrl({ env, provider, returnTo })` is
|
|
567
|
+
`<gateway>/connect/<id>?app=<this app>&return=<returnTo>`. The connection
|
|
568
|
+
belongs to that person and this app: another app that needs the same
|
|
569
|
+
provider connects for its own scopes. The gateway refuses a token that
|
|
570
|
+
carries more scopes than the app lists.
|
|
571
|
+
|
|
572
|
+
`integrationFetch` reaches the provider's API hosts only (a token endpoint or
|
|
573
|
+
any other host throws a `TypeError` before anything is sent); the gateway
|
|
574
|
+
puts the person's token on the call. Without a connection, or when the
|
|
575
|
+
connection lacks a scope the app now lists, the gateway answers 409
|
|
576
|
+
`integration_not_connected` with `connectPath` (and `missingScopes`): send
|
|
577
|
+
the person to `connectUrl()`.
|
|
578
|
+
|
|
579
|
+
`integrationStatus` for an OAuth provider adds `scopes` (as the manifest
|
|
580
|
+
lists them), `connectPath` (`/connect/<id>?app=<app>`, or null) and
|
|
581
|
+
`connection` (`{ label, scopes, ready, missingScopes?, reconnect? }`, or
|
|
582
|
+
null) for the person.
|
|
583
|
+
|
|
584
|
+
An app may use a connection made in it at any time, including from a cron
|
|
585
|
+
or a Durable Object alarm. `for: { background: true, userId }` names any
|
|
586
|
+
member's connection to this app, even while serving another member's
|
|
587
|
+
request: OpenSEO reads a project's Search Console with the connection of the
|
|
588
|
+
member who picked the property, whoever is viewing. The call carries that
|
|
589
|
+
member (`x-everyapp-user`), not the person being served. Only an
|
|
590
|
+
organization's own app may, and only for a member who may still open the
|
|
591
|
+
app.
|
|
592
|
+
|
|
593
|
+
In local dev, with no binding, put a token you obtained yourself in
|
|
594
|
+
`.dev.vars` as `<PREFIX>_ACCESS_TOKEN` (`GOOGLE_WORKSPACE_ACCESS_TOKEN`,
|
|
595
|
+
`GITHUB_OAUTH_ACCESS_TOKEN`; `devAccessTokenName(id)` names it). It goes on
|
|
596
|
+
calls to the provider's hosts as the bearer; without it calls answer the same 409.
|
|
602
597
|
|
|
603
598
|
### Whom a call is for
|
|
604
599
|
|
|
@@ -610,6 +605,9 @@ passes the Worker.
|
|
|
610
605
|
- `for: { background: true, organizationId }`, for work no request started
|
|
611
606
|
(a cron, a Workflow step, a queue): sent as `x-everyapp-org` with no
|
|
612
607
|
identity.
|
|
608
|
+
- `for: { background: true, userId }`, for a call to an OAuth provider on a
|
|
609
|
+
member's connection to this app: sent as `x-everyapp-user`, with no
|
|
610
|
+
identity, even while a request is being served.
|
|
613
611
|
- Omitted: allowed only in an organization's own app, whose background
|
|
614
612
|
calls are the app's, in its own organization (the same as
|
|
615
613
|
`{ background: true }`). Naming another organization is refused.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Gateway settings holding the keys of the AI providers and
|
|
3
|
+
* capabilities an app may ask for, with the settings a provider needs
|
|
4
|
+
* besides its key (Workers AI's account, a Basic username held as a
|
|
5
|
+
* setting, a host setting), by manifest id. With no Gateway in
|
|
6
|
+
* development, the SDK reaches them with the developer's own values under
|
|
7
|
+
* the same names, and `everyAppWorker()` declares the ones set locally.
|
|
8
|
+
* An OAuth provider's is the token that stands in for a connection in dev
|
|
9
|
+
* (`<PREFIX>_ACCESS_TOKEN`), never its client.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DEV_GATEWAY_KEYS: {
|
|
12
|
+
readonly providers: {
|
|
13
|
+
readonly openai: readonly ["OPENAI_API_KEY"];
|
|
14
|
+
readonly openrouter: readonly ["OPENROUTER_API_KEY"];
|
|
15
|
+
readonly "workers-ai": readonly ["WORKERS_AI_API_TOKEN", "CLOUDFLARE_ACCOUNT_ID"];
|
|
16
|
+
readonly anthropic: readonly ["ANTHROPIC_API_KEY"];
|
|
17
|
+
readonly gemini: readonly ["GEMINI_API_KEY"];
|
|
18
|
+
readonly mistral: readonly ["MISTRAL_API_KEY"];
|
|
19
|
+
readonly groq: readonly ["GROQ_API_KEY"];
|
|
20
|
+
readonly cohere: readonly ["COHERE_API_KEY"];
|
|
21
|
+
};
|
|
22
|
+
readonly capabilities: {
|
|
23
|
+
readonly dataforseo: readonly ["DATAFORSEO_API_KEY"];
|
|
24
|
+
readonly context: readonly ["CONTEXT_API_KEY"];
|
|
25
|
+
readonly email: readonly ["EMAIL_FROM", "EMAIL_FROM_NAME", "EMAIL_REST_API_TOKEN", "CLOUDFLARE_ACCOUNT_ID", "RESEND_API_KEY", "EMAIL_PROVIDER"];
|
|
26
|
+
readonly members: readonly [];
|
|
27
|
+
readonly slack: readonly ["SLACK_ACCESS_TOKEN"];
|
|
28
|
+
readonly "google-workspace": readonly ["GOOGLE_WORKSPACE_ACCESS_TOKEN"];
|
|
29
|
+
readonly "microsoft-365": readonly ["MICROSOFT_365_ACCESS_TOKEN"];
|
|
30
|
+
readonly stripe: readonly ["STRIPE_API_KEY"];
|
|
31
|
+
readonly lemonsqueezy: readonly ["LEMONSQUEEZY_API_KEY"];
|
|
32
|
+
readonly paddle: readonly ["PADDLE_API_KEY"];
|
|
33
|
+
readonly shopify: readonly ["SHOPIFY_API_TOKEN", "SHOPIFY_HOST"];
|
|
34
|
+
readonly plaid: readonly ["PLAID_SECRET"];
|
|
35
|
+
readonly attio: readonly ["ATTIO_API_KEY"];
|
|
36
|
+
readonly hubspot: readonly ["HUBSPOT_API_TOKEN"];
|
|
37
|
+
readonly pipedrive: readonly ["PIPEDRIVE_API_TOKEN"];
|
|
38
|
+
readonly airtable: readonly ["AIRTABLE_API_TOKEN"];
|
|
39
|
+
readonly notion: readonly ["NOTION_API_TOKEN"];
|
|
40
|
+
readonly postmark: readonly ["POSTMARK_API_TOKEN"];
|
|
41
|
+
readonly sendgrid: readonly ["SENDGRID_API_KEY"];
|
|
42
|
+
readonly twilio: readonly ["TWILIO_API_SECRET", "TWILIO_API_KEY"];
|
|
43
|
+
readonly intercom: readonly ["INTERCOM_API_TOKEN"];
|
|
44
|
+
readonly crisp: readonly ["CRISP_API_KEY", "CRISP_API_IDENTIFIER"];
|
|
45
|
+
readonly granola: readonly ["GRANOLA_API_KEY"];
|
|
46
|
+
readonly linear: readonly ["LINEAR_API_KEY"];
|
|
47
|
+
readonly github: readonly ["GITHUB_API_TOKEN"];
|
|
48
|
+
readonly gitlab: readonly ["GITLAB_API_TOKEN"];
|
|
49
|
+
readonly vercel: readonly ["VERCEL_API_TOKEN"];
|
|
50
|
+
readonly cloudflare: readonly ["CLOUDFLARE_PROVIDER_API_TOKEN"];
|
|
51
|
+
readonly posthog: readonly ["POSTHOG_PERSONAL_API_KEY"];
|
|
52
|
+
readonly mixpanel: readonly ["MIXPANEL_SERVICE_ACCOUNT_SECRET", "MIXPANEL_SERVICE_ACCOUNT_USERNAME"];
|
|
53
|
+
readonly segment: readonly ["SEGMENT_WRITE_KEY"];
|
|
54
|
+
readonly supabase: readonly ["SUPABASE_SECRET_KEY", "SUPABASE_HOST"];
|
|
55
|
+
readonly turso: readonly ["TURSO_API_TOKEN"];
|
|
56
|
+
readonly "turso-db": readonly ["TURSO_DB_AUTH_TOKEN", "TURSO_DB_HOST"];
|
|
57
|
+
readonly neon: readonly ["NEON_API_KEY"];
|
|
58
|
+
readonly pinecone: readonly ["PINECONE_API_KEY", "PINECONE_HOST"];
|
|
59
|
+
readonly mapbox: readonly ["MAPBOX_ACCESS_TOKEN"];
|
|
60
|
+
readonly openweather: readonly ["OPENWEATHER_API_KEY"];
|
|
61
|
+
readonly daytona: readonly ["DAYTONA_API_KEY"];
|
|
62
|
+
readonly voyage: readonly ["VOYAGE_API_KEY"];
|
|
63
|
+
readonly perplexity: readonly ["PERPLEXITY_API_KEY"];
|
|
64
|
+
readonly jina: readonly ["JINA_API_KEY"];
|
|
65
|
+
readonly replicate: readonly ["REPLICATE_API_TOKEN"];
|
|
66
|
+
readonly huggingface: readonly ["HUGGINGFACE_API_TOKEN"];
|
|
67
|
+
readonly firecrawl: readonly ["FIRECRAWL_API_KEY"];
|
|
68
|
+
readonly exa: readonly ["EXA_API_KEY"];
|
|
69
|
+
readonly tavily: readonly ["TAVILY_API_KEY"];
|
|
70
|
+
readonly serper: readonly ["SERPER_API_KEY"];
|
|
71
|
+
readonly "brave-search": readonly ["BRAVE_SEARCH_API_KEY"];
|
|
72
|
+
readonly apify: readonly ["APIFY_API_TOKEN"];
|
|
73
|
+
readonly deepgram: readonly ["DEEPGRAM_API_KEY"];
|
|
74
|
+
readonly elevenlabs: readonly ["ELEVENLABS_API_KEY"];
|
|
75
|
+
readonly assemblyai: readonly ["ASSEMBLYAI_API_KEY"];
|
|
76
|
+
readonly newsapi: readonly ["NEWSAPI_API_KEY"];
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Every setting a catalog entry reads, in catalog order, each once: what
|
|
81
|
+
* the Gateway's cloudflare.config.ts declares for local dev.
|
|
82
|
+
*/
|
|
83
|
+
export declare const CATALOG_GATEWAY_SETTINGS: readonly ["OPENAI_API_KEY", "OPENROUTER_API_KEY", "WORKERS_AI_API_TOKEN", "CLOUDFLARE_ACCOUNT_ID", "AI_GATEWAY_API_KEY", "AI_GATEWAY_ID", "DATAFORSEO_API_KEY", "CONTEXT_API_KEY", "EMAIL_FROM", "EMAIL_FROM_NAME", "EMAIL_REST_API_TOKEN", "RESEND_API_KEY", "EMAIL_PROVIDER", "SLACK_CLIENT_ID", "SLACK_CLIENT_SECRET", "GOOGLE_WORKSPACE_CLIENT_ID", "GOOGLE_WORKSPACE_CLIENT_SECRET", "MICROSOFT_365_CLIENT_ID", "MICROSOFT_365_CLIENT_SECRET", "STRIPE_API_KEY", "LEMONSQUEEZY_API_KEY", "PADDLE_API_KEY", "SHOPIFY_API_TOKEN", "SHOPIFY_HOST", "PLAID_SECRET", "ATTIO_API_KEY", "HUBSPOT_API_TOKEN", "PIPEDRIVE_API_TOKEN", "AIRTABLE_API_TOKEN", "NOTION_API_TOKEN", "POSTMARK_API_TOKEN", "SENDGRID_API_KEY", "TWILIO_API_SECRET", "TWILIO_API_KEY", "INTERCOM_API_TOKEN", "CRISP_API_KEY", "CRISP_API_IDENTIFIER", "GRANOLA_API_KEY", "LINEAR_API_KEY", "GITHUB_API_TOKEN", "GITLAB_API_TOKEN", "VERCEL_API_TOKEN", "CLOUDFLARE_PROVIDER_API_TOKEN", "POSTHOG_PERSONAL_API_KEY", "MIXPANEL_SERVICE_ACCOUNT_SECRET", "MIXPANEL_SERVICE_ACCOUNT_USERNAME", "SEGMENT_WRITE_KEY", "SUPABASE_SECRET_KEY", "SUPABASE_HOST", "TURSO_API_TOKEN", "TURSO_DB_AUTH_TOKEN", "TURSO_DB_HOST", "NEON_API_KEY", "PINECONE_API_KEY", "PINECONE_HOST", "MAPBOX_ACCESS_TOKEN", "OPENWEATHER_API_KEY", "DAYTONA_API_KEY", "ANTHROPIC_API_KEY", "GEMINI_API_KEY", "MISTRAL_API_KEY", "GROQ_API_KEY", "COHERE_API_KEY", "VOYAGE_API_KEY", "PERPLEXITY_API_KEY", "JINA_API_KEY", "REPLICATE_API_TOKEN", "HUGGINGFACE_API_TOKEN", "FIRECRAWL_API_KEY", "EXA_API_KEY", "TAVILY_API_KEY", "SERPER_API_KEY", "BRAVE_SEARCH_API_KEY", "APIFY_API_TOKEN", "DEEPGRAM_API_KEY", "ELEVENLABS_API_KEY", "ASSEMBLYAI_API_KEY", "NEWSAPI_API_KEY"];
|
|
84
|
+
//# sourceMappingURL=catalogSettings.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalogSettings.generated.d.ts","sourceRoot":"","sources":["../../src/cloudflare/catalogSettings.generated.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EnB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,wBAAwB,2nDA+E3B,CAAC"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
// Generated from packages/sdk/src/internal/capabilities.ts by
|
|
2
|
+
// src/cloudflare/catalogSettings.test.ts. Do not edit: change the catalog
|
|
3
|
+
// and run `pnpm -C packages/sdk catalog:update`.
|
|
4
|
+
/**
|
|
5
|
+
* The Gateway settings holding the keys of the AI providers and
|
|
6
|
+
* capabilities an app may ask for, with the settings a provider needs
|
|
7
|
+
* besides its key (Workers AI's account, a Basic username held as a
|
|
8
|
+
* setting, a host setting), by manifest id. With no Gateway in
|
|
9
|
+
* development, the SDK reaches them with the developer's own values under
|
|
10
|
+
* the same names, and `everyAppWorker()` declares the ones set locally.
|
|
11
|
+
* An OAuth provider's is the token that stands in for a connection in dev
|
|
12
|
+
* (`<PREFIX>_ACCESS_TOKEN`), never its client.
|
|
13
|
+
*/
|
|
14
|
+
export const DEV_GATEWAY_KEYS = {
|
|
15
|
+
providers: {
|
|
16
|
+
openai: ["OPENAI_API_KEY"],
|
|
17
|
+
openrouter: ["OPENROUTER_API_KEY"],
|
|
18
|
+
"workers-ai": ["WORKERS_AI_API_TOKEN", "CLOUDFLARE_ACCOUNT_ID"],
|
|
19
|
+
anthropic: ["ANTHROPIC_API_KEY"],
|
|
20
|
+
gemini: ["GEMINI_API_KEY"],
|
|
21
|
+
mistral: ["MISTRAL_API_KEY"],
|
|
22
|
+
groq: ["GROQ_API_KEY"],
|
|
23
|
+
cohere: ["COHERE_API_KEY"],
|
|
24
|
+
},
|
|
25
|
+
capabilities: {
|
|
26
|
+
dataforseo: ["DATAFORSEO_API_KEY"],
|
|
27
|
+
context: ["CONTEXT_API_KEY"],
|
|
28
|
+
email: [
|
|
29
|
+
"EMAIL_FROM",
|
|
30
|
+
"EMAIL_FROM_NAME",
|
|
31
|
+
"EMAIL_REST_API_TOKEN",
|
|
32
|
+
"CLOUDFLARE_ACCOUNT_ID",
|
|
33
|
+
"RESEND_API_KEY",
|
|
34
|
+
"EMAIL_PROVIDER",
|
|
35
|
+
],
|
|
36
|
+
members: [],
|
|
37
|
+
slack: ["SLACK_ACCESS_TOKEN"],
|
|
38
|
+
"google-workspace": ["GOOGLE_WORKSPACE_ACCESS_TOKEN"],
|
|
39
|
+
"microsoft-365": ["MICROSOFT_365_ACCESS_TOKEN"],
|
|
40
|
+
stripe: ["STRIPE_API_KEY"],
|
|
41
|
+
lemonsqueezy: ["LEMONSQUEEZY_API_KEY"],
|
|
42
|
+
paddle: ["PADDLE_API_KEY"],
|
|
43
|
+
shopify: ["SHOPIFY_API_TOKEN", "SHOPIFY_HOST"],
|
|
44
|
+
plaid: ["PLAID_SECRET"],
|
|
45
|
+
attio: ["ATTIO_API_KEY"],
|
|
46
|
+
hubspot: ["HUBSPOT_API_TOKEN"],
|
|
47
|
+
pipedrive: ["PIPEDRIVE_API_TOKEN"],
|
|
48
|
+
airtable: ["AIRTABLE_API_TOKEN"],
|
|
49
|
+
notion: ["NOTION_API_TOKEN"],
|
|
50
|
+
postmark: ["POSTMARK_API_TOKEN"],
|
|
51
|
+
sendgrid: ["SENDGRID_API_KEY"],
|
|
52
|
+
twilio: ["TWILIO_API_SECRET", "TWILIO_API_KEY"],
|
|
53
|
+
intercom: ["INTERCOM_API_TOKEN"],
|
|
54
|
+
crisp: ["CRISP_API_KEY", "CRISP_API_IDENTIFIER"],
|
|
55
|
+
granola: ["GRANOLA_API_KEY"],
|
|
56
|
+
linear: ["LINEAR_API_KEY"],
|
|
57
|
+
github: ["GITHUB_API_TOKEN"],
|
|
58
|
+
gitlab: ["GITLAB_API_TOKEN"],
|
|
59
|
+
vercel: ["VERCEL_API_TOKEN"],
|
|
60
|
+
cloudflare: ["CLOUDFLARE_PROVIDER_API_TOKEN"],
|
|
61
|
+
posthog: ["POSTHOG_PERSONAL_API_KEY"],
|
|
62
|
+
mixpanel: [
|
|
63
|
+
"MIXPANEL_SERVICE_ACCOUNT_SECRET",
|
|
64
|
+
"MIXPANEL_SERVICE_ACCOUNT_USERNAME",
|
|
65
|
+
],
|
|
66
|
+
segment: ["SEGMENT_WRITE_KEY"],
|
|
67
|
+
supabase: ["SUPABASE_SECRET_KEY", "SUPABASE_HOST"],
|
|
68
|
+
turso: ["TURSO_API_TOKEN"],
|
|
69
|
+
"turso-db": ["TURSO_DB_AUTH_TOKEN", "TURSO_DB_HOST"],
|
|
70
|
+
neon: ["NEON_API_KEY"],
|
|
71
|
+
pinecone: ["PINECONE_API_KEY", "PINECONE_HOST"],
|
|
72
|
+
mapbox: ["MAPBOX_ACCESS_TOKEN"],
|
|
73
|
+
openweather: ["OPENWEATHER_API_KEY"],
|
|
74
|
+
daytona: ["DAYTONA_API_KEY"],
|
|
75
|
+
voyage: ["VOYAGE_API_KEY"],
|
|
76
|
+
perplexity: ["PERPLEXITY_API_KEY"],
|
|
77
|
+
jina: ["JINA_API_KEY"],
|
|
78
|
+
replicate: ["REPLICATE_API_TOKEN"],
|
|
79
|
+
huggingface: ["HUGGINGFACE_API_TOKEN"],
|
|
80
|
+
firecrawl: ["FIRECRAWL_API_KEY"],
|
|
81
|
+
exa: ["EXA_API_KEY"],
|
|
82
|
+
tavily: ["TAVILY_API_KEY"],
|
|
83
|
+
serper: ["SERPER_API_KEY"],
|
|
84
|
+
"brave-search": ["BRAVE_SEARCH_API_KEY"],
|
|
85
|
+
apify: ["APIFY_API_TOKEN"],
|
|
86
|
+
deepgram: ["DEEPGRAM_API_KEY"],
|
|
87
|
+
elevenlabs: ["ELEVENLABS_API_KEY"],
|
|
88
|
+
assemblyai: ["ASSEMBLYAI_API_KEY"],
|
|
89
|
+
newsapi: ["NEWSAPI_API_KEY"],
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Every setting a catalog entry reads, in catalog order, each once: what
|
|
94
|
+
* the Gateway's cloudflare.config.ts declares for local dev.
|
|
95
|
+
*/
|
|
96
|
+
export const CATALOG_GATEWAY_SETTINGS = [
|
|
97
|
+
"OPENAI_API_KEY",
|
|
98
|
+
"OPENROUTER_API_KEY",
|
|
99
|
+
"WORKERS_AI_API_TOKEN",
|
|
100
|
+
"CLOUDFLARE_ACCOUNT_ID",
|
|
101
|
+
"AI_GATEWAY_API_KEY",
|
|
102
|
+
"AI_GATEWAY_ID",
|
|
103
|
+
"DATAFORSEO_API_KEY",
|
|
104
|
+
"CONTEXT_API_KEY",
|
|
105
|
+
"EMAIL_FROM",
|
|
106
|
+
"EMAIL_FROM_NAME",
|
|
107
|
+
"EMAIL_REST_API_TOKEN",
|
|
108
|
+
"RESEND_API_KEY",
|
|
109
|
+
"EMAIL_PROVIDER",
|
|
110
|
+
"SLACK_CLIENT_ID",
|
|
111
|
+
"SLACK_CLIENT_SECRET",
|
|
112
|
+
"GOOGLE_WORKSPACE_CLIENT_ID",
|
|
113
|
+
"GOOGLE_WORKSPACE_CLIENT_SECRET",
|
|
114
|
+
"MICROSOFT_365_CLIENT_ID",
|
|
115
|
+
"MICROSOFT_365_CLIENT_SECRET",
|
|
116
|
+
"STRIPE_API_KEY",
|
|
117
|
+
"LEMONSQUEEZY_API_KEY",
|
|
118
|
+
"PADDLE_API_KEY",
|
|
119
|
+
"SHOPIFY_API_TOKEN",
|
|
120
|
+
"SHOPIFY_HOST",
|
|
121
|
+
"PLAID_SECRET",
|
|
122
|
+
"ATTIO_API_KEY",
|
|
123
|
+
"HUBSPOT_API_TOKEN",
|
|
124
|
+
"PIPEDRIVE_API_TOKEN",
|
|
125
|
+
"AIRTABLE_API_TOKEN",
|
|
126
|
+
"NOTION_API_TOKEN",
|
|
127
|
+
"POSTMARK_API_TOKEN",
|
|
128
|
+
"SENDGRID_API_KEY",
|
|
129
|
+
"TWILIO_API_SECRET",
|
|
130
|
+
"TWILIO_API_KEY",
|
|
131
|
+
"INTERCOM_API_TOKEN",
|
|
132
|
+
"CRISP_API_KEY",
|
|
133
|
+
"CRISP_API_IDENTIFIER",
|
|
134
|
+
"GRANOLA_API_KEY",
|
|
135
|
+
"LINEAR_API_KEY",
|
|
136
|
+
"GITHUB_API_TOKEN",
|
|
137
|
+
"GITLAB_API_TOKEN",
|
|
138
|
+
"VERCEL_API_TOKEN",
|
|
139
|
+
"CLOUDFLARE_PROVIDER_API_TOKEN",
|
|
140
|
+
"POSTHOG_PERSONAL_API_KEY",
|
|
141
|
+
"MIXPANEL_SERVICE_ACCOUNT_SECRET",
|
|
142
|
+
"MIXPANEL_SERVICE_ACCOUNT_USERNAME",
|
|
143
|
+
"SEGMENT_WRITE_KEY",
|
|
144
|
+
"SUPABASE_SECRET_KEY",
|
|
145
|
+
"SUPABASE_HOST",
|
|
146
|
+
"TURSO_API_TOKEN",
|
|
147
|
+
"TURSO_DB_AUTH_TOKEN",
|
|
148
|
+
"TURSO_DB_HOST",
|
|
149
|
+
"NEON_API_KEY",
|
|
150
|
+
"PINECONE_API_KEY",
|
|
151
|
+
"PINECONE_HOST",
|
|
152
|
+
"MAPBOX_ACCESS_TOKEN",
|
|
153
|
+
"OPENWEATHER_API_KEY",
|
|
154
|
+
"DAYTONA_API_KEY",
|
|
155
|
+
"ANTHROPIC_API_KEY",
|
|
156
|
+
"GEMINI_API_KEY",
|
|
157
|
+
"MISTRAL_API_KEY",
|
|
158
|
+
"GROQ_API_KEY",
|
|
159
|
+
"COHERE_API_KEY",
|
|
160
|
+
"VOYAGE_API_KEY",
|
|
161
|
+
"PERPLEXITY_API_KEY",
|
|
162
|
+
"JINA_API_KEY",
|
|
163
|
+
"REPLICATE_API_TOKEN",
|
|
164
|
+
"HUGGINGFACE_API_TOKEN",
|
|
165
|
+
"FIRECRAWL_API_KEY",
|
|
166
|
+
"EXA_API_KEY",
|
|
167
|
+
"TAVILY_API_KEY",
|
|
168
|
+
"SERPER_API_KEY",
|
|
169
|
+
"BRAVE_SEARCH_API_KEY",
|
|
170
|
+
"APIFY_API_TOKEN",
|
|
171
|
+
"DEEPGRAM_API_KEY",
|
|
172
|
+
"ELEVENLABS_API_KEY",
|
|
173
|
+
"ASSEMBLYAI_API_KEY",
|
|
174
|
+
"NEWSAPI_API_KEY",
|
|
175
|
+
];
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* `/internal` would break `cf dev` wherever the SDK is linked from source.
|
|
18
18
|
* (The dev keypair it hands the dev Worker is a leaf the Worker never loads.)
|
|
19
19
|
*/
|
|
20
|
-
export { EVERYAPP_OBSERVABILITY, everyAppAuxiliaryWorker, everyAppWorker, helperWorkerName, localD1Id, localD1Path, workflowNameFor, type D1Binding, type DurableObjectBinding, type DurableObjectExport, type EveryAppAuxiliaryWorkerConfig, type EveryAppAuxiliaryWorkerOptions, type EveryAppBinding, type EveryAppConfigContext, type EveryAppDeployEnv, type EveryAppDevEnv, type EveryAppExports, type EveryAppObservability, type EveryAppPlacement, type EveryAppWorkerConfig, type EveryAppWorkerManifest, type EveryAppWorkerOptions, type EveryAppWorkerReference, type GatewayBinding, type HyperdriveBinding, type KvBinding, type SecretBinding, type ServiceBinding, type TextBinding, type VersionMetadataBinding, type WorkflowBinding, type WorkflowExport, } from "./worker.js";
|
|
21
|
-
export { BUILD_SENTINEL, resourceSentinel, sentinelDeployTarget, type EveryAppDeployTarget, } from "./sentinel.js";
|
|
20
|
+
export { EVERYAPP_OBSERVABILITY, everyAppAuxiliaryWorker, everyAppWorker, helperWorkerName, localD1Id, localD1Path, workflowNameFor, type AiBinding, type AnalyticsEngineDatasetBinding, type ArtifactsBinding, type BrowserBinding, type AiGatewayBinding, type D1Binding, type DurableObjectBinding, type DurableObjectExport, type EveryAppAuxiliaryWorkerConfig, type EveryAppAuxiliaryWorkerOptions, type EveryAppBinding, type EveryAppConfigContext, type EveryAppDeployEnv, type EveryAppDevEnv, type EveryAppExports, type EveryAppObservability, type EveryAppPlacement, type EveryAppTrigger, type EveryAppWorkerConfig, type EveryAppWorkerManifest, type EveryAppWorkerOptions, type EveryAppWorkerReference, type GatewayBinding, type HyperdriveBinding, type ImagesBinding, type JsonBinding, type KvBinding, type QueueBinding, type QueueConsumerTrigger, type SecretBinding, type SecretsStoreSecretBinding, type SendEmailBinding, type ServiceBinding, type TextBinding, type VectorizeBinding, type VersionMetadataBinding, type WorkflowBinding, type WorkflowExport, } from "./worker.js";
|
|
21
|
+
export { aiGatewayUrl, BUILD_SENTINEL, resourceSentinel, sentinelDeployTarget, type AiGatewayValue, type EveryAppDeployTarget, } from "./sentinel.js";
|
|
22
|
+
export { CATALOG_GATEWAY_SETTINGS } from "./catalogSettings.generated.js";
|
|
22
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cloudflare/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,eAAe,EACf,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACnC,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,KAAK,oBAAoB,GAC1B,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cloudflare/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,eAAe,EACf,KAAK,SAAS,EACd,KAAK,6BAA6B,EAClC,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACnC,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,KAAK,cAAc,EACnB,KAAK,oBAAoB,GAC1B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC"}
|
package/dist/cloudflare/index.js
CHANGED
|
@@ -18,4 +18,7 @@
|
|
|
18
18
|
* (The dev keypair it hands the dev Worker is a leaf the Worker never loads.)
|
|
19
19
|
*/
|
|
20
20
|
export { EVERYAPP_OBSERVABILITY, everyAppAuxiliaryWorker, everyAppWorker, helperWorkerName, localD1Id, localD1Path, workflowNameFor, } from "./worker.js";
|
|
21
|
-
export { BUILD_SENTINEL, resourceSentinel, sentinelDeployTarget, } from "./sentinel.js";
|
|
21
|
+
export { aiGatewayUrl, BUILD_SENTINEL, resourceSentinel, sentinelDeployTarget, } from "./sentinel.js";
|
|
22
|
+
// Every setting a provider of the built-in catalog reads, generated from
|
|
23
|
+
// it: the Gateway's cloudflare.config.ts declares them for local dev.
|
|
24
|
+
export { CATALOG_GATEWAY_SETTINGS } from "./catalogSettings.generated.js";
|
|
@@ -14,14 +14,25 @@
|
|
|
14
14
|
export declare const BUILD_SENTINEL: Readonly<{
|
|
15
15
|
workerName: "every-hosted--sentinel";
|
|
16
16
|
organizationId: "everyapp-hosted-deploy-sentinel";
|
|
17
|
+
/**
|
|
18
|
+
* The Cloudflare account the app is installed in (an AI Gateway's URL
|
|
19
|
+
* holds it). Starts with the Worker name's placeholder, so an install
|
|
20
|
+
* rewrites it before that one.
|
|
21
|
+
*/
|
|
22
|
+
accountId: "every-hosted--sentinel-account";
|
|
17
23
|
/** The gateway's URL, and so the identity issuer. */
|
|
18
24
|
gatewayUrl: "https://every-hosted--sentinel.invalid";
|
|
19
25
|
publicKey: "-----BEGIN PUBLIC KEY-----\nEVERYAPPHOSTEDDEPLOYSENTINEL\n-----END PUBLIC KEY-----\n";
|
|
20
26
|
}>;
|
|
27
|
+
/** Runtime-independent resource names used by both release installers. */
|
|
28
|
+
export declare function helperWorkerName(appWorker: string, helper: string): string;
|
|
29
|
+
export declare function workflowNameFor(workerName: string, binding: string): string;
|
|
21
30
|
/**
|
|
22
31
|
* A manifest binding's placeholder: a D1 database's name and id, an R2
|
|
23
|
-
* bucket's name, a KV namespace's
|
|
24
|
-
*
|
|
32
|
+
* bucket's, queue's or Vectorize index's name, a KV namespace's, Hyperdrive
|
|
33
|
+
* config's or AI Gateway's id, a Secrets Store secret's store id and name.
|
|
34
|
+
* The installer rewrites each by its binding name; the value only has to
|
|
35
|
+
* be recognizable.
|
|
25
36
|
*/
|
|
26
37
|
export declare function resourceSentinel(binding: string): string;
|
|
27
38
|
/** The fields of the manifest a build's placeholders are made for. */
|
|
@@ -33,14 +44,42 @@ interface SentinelManifest {
|
|
|
33
44
|
hyperdrive?: readonly {
|
|
34
45
|
readonly name: string;
|
|
35
46
|
}[];
|
|
47
|
+
queues?: readonly {
|
|
48
|
+
readonly name: string;
|
|
49
|
+
}[];
|
|
50
|
+
vectorize?: readonly {
|
|
51
|
+
readonly name: string;
|
|
52
|
+
}[];
|
|
53
|
+
aiGateway?: readonly {
|
|
54
|
+
readonly name: string;
|
|
55
|
+
}[];
|
|
56
|
+
secretsStore?: readonly {
|
|
57
|
+
readonly name: string;
|
|
58
|
+
}[];
|
|
36
59
|
};
|
|
37
60
|
}
|
|
61
|
+
/** Where an AI Gateway takes requests: `https://gateway.ai.cloudflare.com/v1/<account>/<id>`. */
|
|
62
|
+
export declare function aiGatewayUrl(accountId: string, id: string): string;
|
|
63
|
+
/**
|
|
64
|
+
* What an AI Gateway binding holds (a `json` binding): the gateway's id,
|
|
65
|
+
* its account, and its URL, under which each provider has a path
|
|
66
|
+
* (`<url>/openai`, `<url>/anthropic`, `<url>/workers-ai`, `<url>/compat`).
|
|
67
|
+
* In development `accountId` and `url` are empty: there is no gateway, so
|
|
68
|
+
* an app calls the provider directly.
|
|
69
|
+
*/
|
|
70
|
+
export type AiGatewayValue = {
|
|
71
|
+
id: string;
|
|
72
|
+
accountId: string;
|
|
73
|
+
url: string;
|
|
74
|
+
};
|
|
38
75
|
/** Everything install-specific a Worker is built from, by binding. */
|
|
39
76
|
export interface EveryAppDeployTarget {
|
|
40
77
|
/** The Worker name the gateway registry assigned to this app. */
|
|
41
78
|
workerName: string;
|
|
42
79
|
/** The organization that owns the app; scopes the AppGateway binding. */
|
|
43
80
|
organizationId: string;
|
|
81
|
+
/** The Cloudflare account the app is installed in. */
|
|
82
|
+
accountId: string;
|
|
44
83
|
/** The gateway's URL, which is also the identity tokens' issuer. */
|
|
45
84
|
gatewayUrl: string;
|
|
46
85
|
/** SPKI PEM public keys (current + next) that verify identity tokens. */
|
|
@@ -61,6 +100,25 @@ export interface EveryAppDeployTarget {
|
|
|
61
100
|
r2?: Record<string, {
|
|
62
101
|
name: string;
|
|
63
102
|
}>;
|
|
103
|
+
/** Queues by binding: each one's name (which its bindings and triggers use) and id. */
|
|
104
|
+
queues?: Record<string, {
|
|
105
|
+
name: string;
|
|
106
|
+
id: string;
|
|
107
|
+
}>;
|
|
108
|
+
/** Vectorize indexes by binding, under the names the deploy provisioned. */
|
|
109
|
+
vectorize?: Record<string, {
|
|
110
|
+
name: string;
|
|
111
|
+
}>;
|
|
112
|
+
/** AI Gateways by binding: each binding's whole value. */
|
|
113
|
+
aiGateway?: Record<string, AiGatewayValue>;
|
|
114
|
+
/**
|
|
115
|
+
* Secrets Store secrets by binding: the account's store and the
|
|
116
|
+
* secret the deploy made in it.
|
|
117
|
+
*/
|
|
118
|
+
secretsStore?: Record<string, {
|
|
119
|
+
storeId: string;
|
|
120
|
+
secretName: string;
|
|
121
|
+
}>;
|
|
64
122
|
};
|
|
65
123
|
}
|
|
66
124
|
/** The target every production build is made for: placeholders throughout. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentinel.d.ts","sourceRoot":"","sources":["../../src/cloudflare/sentinel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,cAAc;;;IAKzB,qDAAqD;;;EAIrD,CAAC;AAEH
|
|
1
|
+
{"version":3,"file":"sentinel.d.ts","sourceRoot":"","sources":["../../src/cloudflare/sentinel.ts"],"names":[],"mappings":"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"}
|