apps 0.0.1-beta.54 → 0.0.1-beta.55

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 (38) hide show
  1. package/framework-reference.json +1 -1
  2. package/js/{chunk-X5U5KIWQ.js → chunk-47F7VXST.js} +1 -1
  3. package/js/{chunk-PO5NPRFT.js → chunk-BTSIG4NQ.js} +4 -4
  4. package/js/{chunk-D45JTD6N.js → chunk-JK5S2N2S.js} +2 -2
  5. package/js/{chunk-QKHTRD6G.js → chunk-L4K2K22P.js} +2 -2
  6. package/js/{chunk-GDYPM7RS.js → chunk-PXXZ6ABC.js} +2 -2
  7. package/js/{chunk-SVHI6AKV.js → chunk-QEBRH5AP.js} +2 -2
  8. package/js/{chunk-JY56GVSV.js → chunk-TLWLJ7PD.js} +1076 -224
  9. package/js/{chunk-YQD2MLFY.js → chunk-XCSG7FT7.js} +2 -2
  10. package/js/contracts.js +3 -3
  11. package/js/effect.js +5 -5
  12. package/js/graphql.js +6 -6
  13. package/js/host.js +5 -5
  14. package/js/index.js +3 -3
  15. package/js/mcp/effect.js +7 -7
  16. package/js/mcp/stdio.js +7 -7
  17. package/js/mcp.js +8 -8
  18. package/js/openapi.js +4 -4
  19. package/package.json +1 -1
  20. package/runtime.json +1 -1
  21. package/types/apps/src/contracts/host.d.ts +9 -9
  22. package/types/apps/src/contracts/protocol-version.d.ts +1 -1
  23. package/types/apps/src/contracts/protocols/1.d.ts +486 -9
  24. package/types/apps/src/contracts/protocols/10.d.ts +6 -6
  25. package/types/apps/src/contracts/protocols/2.d.ts +5 -4
  26. package/types/apps/src/contracts/protocols/3.d.ts +69 -8
  27. package/types/apps/src/contracts/protocols/4.d.ts +18 -9
  28. package/types/apps/src/contracts/protocols/5.d.ts +31 -5
  29. package/types/apps/src/contracts/protocols/6.d.ts +14 -5
  30. package/types/apps/src/contracts/protocols/7.d.ts +6 -5
  31. package/types/apps/src/contracts/protocols/8.d.ts +61 -9
  32. package/types/apps/src/contracts/protocols/9.d.ts +7 -9
  33. package/types/apps/src/contracts/protocols/current.d.ts +2476 -0
  34. package/types/apps/src/contracts/protocols/oauth-6.d.ts +74 -0
  35. package/types/apps/src/contracts/protocols/oauth.d.ts +46 -1
  36. package/types/apps/src/implementation/router-catalog.d.ts +2 -2
  37. package/types/apps/src/implementation/webhooks.d.ts +1 -1
  38. package/types/apps/src/contracts/protocols/11.d.ts +0 -1098
@@ -0,0 +1,74 @@
1
+ /**
2
+ * OAuth declarations frozen for host protocols 6 onward: `./oauth.ts`'s with an explicit
3
+ * authorization-server metadata URL on discovery. The module imports only `effect` and
4
+ * `./oauth.ts`, so no change elsewhere in the repository can alter it.
5
+ */
6
+ import { Schema } from "effect";
7
+ /**
8
+ * OAuth endpoints and protocol choices. Omitted grant means authorization code; clients remain
9
+ * host-owned. Declared endpoints may name an RFC 7009 `revocationUrl`; discovery reads the
10
+ * server's `revocation_endpoint` metadata instead.
11
+ */
12
+ export declare const OAuth2Config: Schema.Union<readonly [Schema.Struct<{
13
+ readonly discover: Schema.String;
14
+ /** Fetch this exact metadata document and verify its issuer against discovery. */
15
+ readonly authorizationServerMetadataUrl: Schema.optionalKey<Schema.String>;
16
+ readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
17
+ readonly tokenUrl: Schema.optionalKey<Schema.Never>;
18
+ readonly revocationUrl: Schema.optionalKey<Schema.Never>;
19
+ readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
20
+ readonly tokenResponse: Schema.optionalKey<Schema.Struct<{
21
+ readonly path: Schema.String;
22
+ }>>;
23
+ readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
24
+ readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
25
+ readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
26
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
27
+ readonly scopeSeparator: Schema.optionalKey<Schema.String>;
28
+ readonly tokenRequestFormat: Schema.optionalKey<Schema.Literals<readonly ["form", "json"]>>;
29
+ }>, Schema.Struct<{
30
+ /** Its query is kept; it cannot set protocol parameters or repeat `authorizationParams`. */
31
+ readonly authorizationUrl: Schema.String;
32
+ readonly tokenUrl: Schema.String;
33
+ readonly revocationUrl: Schema.optionalKey<Schema.String>;
34
+ readonly scopes: Schema.$Array<Schema.String>;
35
+ /** RFC 8414 issuer identifier. Declared issuers are checked against the callback's `iss`. */
36
+ readonly issuer: Schema.optionalKey<Schema.String>;
37
+ readonly discover: Schema.optionalKey<Schema.Never>;
38
+ readonly authorizationServerMetadataUrl: Schema.optionalKey<Schema.Never>;
39
+ readonly tokenResponse: Schema.optionalKey<Schema.Struct<{
40
+ readonly path: Schema.String;
41
+ }>>;
42
+ readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
43
+ readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
44
+ readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
45
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
46
+ readonly scopeSeparator: Schema.optionalKey<Schema.String>;
47
+ readonly tokenRequestFormat: Schema.optionalKey<Schema.Literals<readonly ["form", "json"]>>;
48
+ }>, Schema.Struct<{
49
+ readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
50
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
51
+ readonly scopeSeparator: Schema.optionalKey<Schema.String>;
52
+ readonly tokenRequestFormat: Schema.optionalKey<Schema.Literals<readonly ["form", "json"]>>;
53
+ readonly grant: Schema.Literal<"client_credentials">;
54
+ readonly discover: Schema.String;
55
+ /** Fetch this exact metadata document and verify its issuer against discovery. */
56
+ readonly authorizationServerMetadataUrl: Schema.optionalKey<Schema.String>;
57
+ readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
58
+ readonly tokenUrl: Schema.optionalKey<Schema.Never>;
59
+ readonly revocationUrl: Schema.optionalKey<Schema.Never>;
60
+ readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
61
+ }>, Schema.Struct<{
62
+ readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
63
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
64
+ readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
65
+ readonly discover: Schema.optionalKey<Schema.Never>;
66
+ readonly authorizationServerMetadataUrl: Schema.optionalKey<Schema.Never>;
67
+ readonly scopeSeparator: Schema.optionalKey<Schema.String>;
68
+ readonly tokenRequestFormat: Schema.optionalKey<Schema.Literals<readonly ["form", "json"]>>;
69
+ readonly grant: Schema.Literal<"client_credentials">;
70
+ readonly tokenUrl: Schema.String;
71
+ readonly revocationUrl: Schema.optionalKey<Schema.String>;
72
+ readonly scopes: Schema.$Array<Schema.String>;
73
+ }>]>;
74
+ export type OAuth2Config = typeof OAuth2Config.Type;
@@ -1,5 +1,11 @@
1
- /** OAuth declarations frozen for host protocols 1 through 5. */
1
+ /**
2
+ * OAuth declarations frozen for host protocols 1 through 5. The module imports only `effect`, so
3
+ * no change elsewhere in the repository can alter it. `./oauth-6.ts` holds the declaration later
4
+ * protocols use.
5
+ */
2
6
  import { Schema } from "effect";
7
+ /** Absolute HTTP(S) URL; local HTTP hosts are supported. */
8
+ export declare const HttpUrl: Schema.String;
3
9
  /** How an OAuth client authenticates at the token endpoint; raw Basic is an explicit provider compatibility option. */
4
10
  export declare const OAuthClientAuth: Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
5
11
  export type OAuthClientAuth = typeof OAuthClientAuth.Type;
@@ -14,6 +20,14 @@ export type ReservedAuthorizationParam = (typeof reservedAuthorizationParams)[nu
14
20
  * lets services define their own; the protocol and security parameters stay host-owned.
15
21
  */
16
22
  export declare const OAuthAuthorizationParams: Schema.$Record<Schema.String, Schema.String>;
23
+ /**
24
+ * A declared `authorizationUrl` may carry its own query (RFC 6749 §3.1 keeps it). Each parameter
25
+ * is declared once, in the URL or in `authorizationParams`, and never names a host-owned one.
26
+ */
27
+ export declare const declaredAuthorizationQuery: import("effect/SchemaAST").Filter<{
28
+ readonly authorizationUrl: string;
29
+ readonly authorizationParams?: Readonly<Record<string, string>>;
30
+ }>;
17
31
  /** How the token endpoint reads requests. RFC 6749 uses a form; some services want JSON. */
18
32
  export declare const OAuthTokenRequestFormat: Schema.Literals<readonly ["form", "json"]>;
19
33
  export type OAuthTokenRequestFormat = typeof OAuthTokenRequestFormat.Type;
@@ -25,6 +39,37 @@ export declare const OAuthTokenResponse: Schema.Struct<{
25
39
  readonly path: Schema.String;
26
40
  }>;
27
41
  export type OAuthTokenResponse = typeof OAuthTokenResponse.Type;
42
+ /** Options for services that differ from RFC 6749 in how they read requests. */
43
+ export declare const tokenRequestOptions: {
44
+ /** Joins requested scopes; Linear wants `","`. Defaults to RFC 6749's space. */
45
+ scopeSeparator: Schema.optionalKey<Schema.String>;
46
+ /** Encoding of token requests. Defaults to `"form"`; Atlassian, ClickUp and Notion need `"json"`. */
47
+ tokenRequestFormat: Schema.optionalKey<Schema.Literals<readonly ["form", "json"]>>;
48
+ };
49
+ export declare const oauthOptions: {
50
+ /**
51
+ * Read the grant from this nested member of the token response when the top-level response has
52
+ * no access token or no scope. Slack's user tokens use `{ path: "authed_user" }`.
53
+ */
54
+ tokenResponse: Schema.optionalKey<Schema.Struct<{
55
+ readonly path: Schema.String;
56
+ }>>;
57
+ grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
58
+ /**
59
+ * Service-defined authorization request parameters, such as Google's
60
+ * `{ access_type: "offline", prompt: "consent" }`. Host-owned protocol parameters
61
+ * (`state`, `scope`, `redirect_uri`, PKCE and the others in `reservedAuthorizationParams`)
62
+ * are rejected. A discovered endpoint's own query parameter of the same name is replaced.
63
+ */
64
+ authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
65
+ tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
66
+ /** Omitted uses discovery; null explicitly suppresses the resource parameter. */
67
+ resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
68
+ /** Joins requested scopes; Linear wants `","`. Defaults to RFC 6749's space. */
69
+ scopeSeparator: Schema.optionalKey<Schema.String>;
70
+ /** Encoding of token requests. Defaults to `"form"`; Atlassian, ClickUp and Notion need `"json"`. */
71
+ tokenRequestFormat: Schema.optionalKey<Schema.Literals<readonly ["form", "json"]>>;
72
+ };
28
73
  /**
29
74
  * OAuth endpoints and protocol choices. Omitted grant means authorization code; clients remain
30
75
  * host-owned. Declared endpoints may name an RFC 7009 `revocationUrl`; discovery reads the
@@ -188,7 +188,7 @@ export declare const readCatalog: (root: AppRouter | DynamicRouter | undefined,
188
188
  routers: {
189
189
  readonly path: string;
190
190
  readonly description?: string;
191
- readonly error?: import("../index.js").ProviderError | HostDeclarationInvalid | HostEvaluationFailed | import("../contracts/host.js").McpError | import("../contracts/host.js").SkillLoadFailed;
191
+ readonly error?: import("../index.js").ProviderError | import("../contracts/host.js").McpError | import("../contracts/host.js").SkillLoadFailed | HostDeclarationInvalid | HostEvaluationFailed;
192
192
  readonly title?: string;
193
193
  readonly tags?: {
194
194
  readonly [x: string]: string;
@@ -201,7 +201,7 @@ export declare const readCatalog: (root: AppRouter | DynamicRouter | undefined,
201
201
  }[];
202
202
  readonly skill?: string;
203
203
  }[];
204
- }, import("../index.js").ProviderError | HostDeclarationInvalid | HostEvaluationFailed | import("../contracts/host.js").McpError | import("../contracts/host.js").SkillLoadFailed, never>;
204
+ }, import("../index.js").ProviderError | import("../contracts/host.js").McpError | import("../contracts/host.js").SkillLoadFailed | HostDeclarationInvalid | HostEvaluationFailed, never>;
205
205
  /**
206
206
  * One skill for each router with instructions. Skills and tools fail independently: a dynamic
207
207
  * router whose metadata cannot be read, including the root, contributes no skill and does not
@@ -26,4 +26,4 @@ export declare const dispatchWebhook: <Context extends {
26
26
  readonly [x: string]: string;
27
27
  };
28
28
  readonly body: string;
29
- }, HostOperationNotFound | HostInputInvalid | HostOutputInvalid | HostDeclarationInvalid | HostOperationFailed, never>;
29
+ }, HostDeclarationInvalid | HostOperationNotFound | HostOperationFailed | HostInputInvalid | HostOutputInvalid, never>;