apps 0.0.1-beta.88 → 0.0.1-beta.89
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/framework-reference.json +1 -1
- package/js/{chunk-I6Q7ZPKJ.js → chunk-5ZVAYXLT.js} +1 -1
- package/js/{chunk-XBHWCCNB.js → chunk-6FUJH3T4.js} +4 -4
- package/js/{chunk-FIVMUILF.js → chunk-7Z3NUCTP.js} +5 -5
- package/js/{chunk-W6XCQAXP.js → chunk-BZFFXNWA.js} +2 -2
- package/js/{chunk-H2CJWXA3.js → chunk-DDHBUKXX.js} +16 -0
- package/js/{chunk-FVYCYTYL.js → chunk-EKZLPXHK.js} +5 -5
- package/js/{chunk-EVTBFNHI.js → chunk-ELSILABS.js} +9 -9
- package/js/{chunk-Q4IZAUIF.js → chunk-F2G534HD.js} +1 -1
- package/js/{chunk-6YMYQSTQ.js → chunk-GLXEYET6.js} +3 -3
- package/js/{chunk-A3HPRNJC.js → chunk-GQ33QSNB.js} +29 -1
- package/js/{chunk-Q4WQMUEO.js → chunk-H6NFR354.js} +7 -7
- package/js/{chunk-EXARUCNH.js → chunk-I46RIOKQ.js} +6 -6
- package/js/{chunk-CDXQDN7W.js → chunk-JJH3MBAM.js} +1 -1
- package/js/{chunk-S22ADZID.js → chunk-NQW2E44U.js} +3 -2
- package/js/{chunk-3K3VA76C.js → chunk-ZK7JDZJS.js} +2 -2
- package/js/client.js +3 -3
- package/js/contracts.js +5 -3
- package/js/effect.js +11 -11
- package/js/graphql.js +13 -13
- package/js/host.js +11 -11
- package/js/index.js +18 -8
- package/js/mcp/effect.js +12 -12
- package/js/mcp.js +14 -14
- package/js/openapi.js +9 -9
- package/js/skills.js +7 -7
- package/js/ui/contracts.js +2 -2
- package/js/ui/serving.js +2 -2
- package/package.json +1 -1
- package/runtime.json +1 -1
- package/types/apps/src/contracts/host.d.ts +1 -1
- package/types/apps/src/contracts/schema.d.ts +21 -0
- package/types/apps/src/implementation/openapi-compile.d.ts +2 -2
- package/types/apps/src/implementation/provider.d.ts +2 -2
- package/types/apps/src/implementation/schema.d.ts +8 -1
- package/types/apps/src/index.d.ts +1 -1
|
@@ -23,7 +23,7 @@ export * from "./events.js";
|
|
|
23
23
|
export { AppIcon, AppIcons, appIconLimits } from "./icons.js";
|
|
24
24
|
export * from "./placement.js";
|
|
25
25
|
export { AccountId, HttpUrl } from "./schema.js";
|
|
26
|
-
export { OAuthAuthorizationParams, OAuthClientAuth, OAuthSecretClientAuth, OAuthTokenRequestFormat, OAuthTokenResponse, } from "./provider.js";
|
|
26
|
+
export { OAuthAuthorizationParams, OAuthClientAuth, OAuthSecretClientAuth, OAuthTokenRequestFormat, OAuthTokenResponse, reservedAuthorizationParams, type ReservedAuthorizationParam, } from "./provider.js";
|
|
27
27
|
/**
|
|
28
28
|
* The host protocol this framework speaks and its wire schemas, from `protocols/current.ts`. The
|
|
29
29
|
* released protocol modules are frozen records that host adapters read.
|
|
@@ -12,6 +12,27 @@ export declare const AccountId: Schema.brand<Schema.String, "acc">;
|
|
|
12
12
|
export type AccountId = typeof AccountId.Type;
|
|
13
13
|
/** Absolute HTTP(S) URL; local HTTP hosts are supported. */
|
|
14
14
|
export declare const HttpUrl: Schema.String;
|
|
15
|
+
/** One problem with a declaration: where in it, and what is wrong there. */
|
|
16
|
+
export declare const DeclarationIssue: Schema.Struct<{
|
|
17
|
+
readonly path: Schema.$Array<Schema.String>;
|
|
18
|
+
readonly message: Schema.String;
|
|
19
|
+
}>;
|
|
20
|
+
export type DeclarationIssue = typeof DeclarationIssue.Type;
|
|
21
|
+
declare const DeclarationInvalid_base: Schema.Class<DeclarationInvalid, Schema.TaggedStruct<"DeclarationInvalid", {
|
|
22
|
+
readonly declaration: Schema.String;
|
|
23
|
+
readonly issues: Schema.$Array<Schema.Struct<{
|
|
24
|
+
readonly path: Schema.$Array<Schema.String>;
|
|
25
|
+
readonly message: Schema.String;
|
|
26
|
+
}>>;
|
|
27
|
+
}>, import("effect/Cause").YieldableError>;
|
|
28
|
+
/**
|
|
29
|
+
* An author's declaration, such as the options of `oauth2()`, did not match its schema. Unlike
|
|
30
|
+
* {@link ValidationError} it names each failing path and problem, because the value is the
|
|
31
|
+
* author's own source. Messages never include supplied values.
|
|
32
|
+
*/
|
|
33
|
+
export declare class DeclarationInvalid extends DeclarationInvalid_base {
|
|
34
|
+
get message(): string;
|
|
35
|
+
}
|
|
15
36
|
declare const ValidationError_base: Schema.Class<ValidationError, Schema.TaggedStruct<"ValidationError", {}>, import("effect/Cause").YieldableError>;
|
|
16
37
|
/** Invalid input. Never includes supplied values, credentials or response bodies. */
|
|
17
38
|
export declare class ValidationError extends ValidationError_base {
|
|
@@ -25,12 +25,13 @@ export declare const compileOpenApiDocument: (entry: OpenApiImport, inputDocumen
|
|
|
25
25
|
readonly fallbackSecurity?: GeneratedOperation["request"]["security"];
|
|
26
26
|
}) => Effect.Effect<{
|
|
27
27
|
operations: {
|
|
28
|
+
readonly path: string;
|
|
28
29
|
readonly method: "HEAD" | "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "QUERY";
|
|
29
30
|
readonly description: string;
|
|
30
31
|
readonly name: string;
|
|
31
32
|
readonly request: {
|
|
32
33
|
readonly parameters: readonly {
|
|
33
|
-
readonly in: "
|
|
34
|
+
readonly in: "path" | "header" | "query" | "querystring" | "cookie";
|
|
34
35
|
readonly name: string;
|
|
35
36
|
readonly required?: boolean;
|
|
36
37
|
readonly schema?: {
|
|
@@ -66,7 +67,6 @@ export declare const compileOpenApiDocument: (entry: OpenApiImport, inputDocumen
|
|
|
66
67
|
readonly required?: boolean;
|
|
67
68
|
};
|
|
68
69
|
};
|
|
69
|
-
readonly path: string;
|
|
70
70
|
readonly input: {
|
|
71
71
|
readonly [x: string]: Schema.Json;
|
|
72
72
|
};
|
|
@@ -3,7 +3,7 @@ import { Effect, Schema } from "effect";
|
|
|
3
3
|
import { type PromiseMethod } from "./authoring.js";
|
|
4
4
|
import { type AccountCheck, type AuthMethods, type FieldExposure, OAuth2Config, OAuth2Method, Provider, SecretsMethod } from "../contracts/provider.js";
|
|
5
5
|
import type { Placement } from "../contracts/placement.js";
|
|
6
|
-
import type {
|
|
6
|
+
import type { DeclarationInvalid } from "../contracts/schema.js";
|
|
7
7
|
/** Declare a secrets method with an Effect decoder. */
|
|
8
8
|
export declare const secrets: <Fields extends Schema.Decoder<unknown>>(options: {
|
|
9
9
|
readonly label: string;
|
|
@@ -12,7 +12,7 @@ export declare const secrets: <Fields extends Schema.Decoder<unknown>>(options:
|
|
|
12
12
|
readonly request?: readonly Placement[];
|
|
13
13
|
}) => SecretsMethod<Fields>;
|
|
14
14
|
/** Validate OAuth endpoints while declaring their app-visible response projection. */
|
|
15
|
-
export declare const oauth2: <Response extends Schema.Decoder<unknown>>(config: OAuth2Config, response: Response, exposure?: Readonly<Record<string, FieldExposure>>, request?: readonly Placement[]) => Effect.Effect<OAuth2Method<Response>,
|
|
15
|
+
export declare const oauth2: <Response extends Schema.Decoder<unknown>>(config: OAuth2Config, response: Response, exposure?: Readonly<Record<string, FieldExposure>>, request?: readonly Placement[]) => Effect.Effect<OAuth2Method<Response>, DeclarationInvalid>;
|
|
16
16
|
/** Author options: the account check is an ordinary async function. */
|
|
17
17
|
export interface ProviderOptions<Auth extends AuthMethods> {
|
|
18
18
|
readonly name: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Author schema facade. Internals use the native decoder retained by each value. */
|
|
2
2
|
import { Effect, Schema as EffectSchema } from "effect";
|
|
3
|
-
import { JsonObject, ValidationError } from "../contracts/schema.js";
|
|
3
|
+
import { DeclarationInvalid, JsonObject, ValidationError } from "../contracts/schema.js";
|
|
4
4
|
import type { FieldExposure } from "../contracts/provider.js";
|
|
5
5
|
declare const Decoder: unique symbol;
|
|
6
6
|
/** An author-facing value schema. Effect is never required in author code. */
|
|
@@ -42,6 +42,13 @@ export declare const isSchema: (value: unknown) => value is Schema<unknown, bool
|
|
|
42
42
|
export declare const schemaArgument: <S extends Schema<unknown, boolean>>(value: S, role: string) => S;
|
|
43
43
|
/** Decode within an Effect program. Invalid input is omitted from the failure. */
|
|
44
44
|
export declare const parse: <T>(decoder: EffectSchema.Decoder<T>, input: unknown) => Effect.Effect<T, ValidationError>;
|
|
45
|
+
/**
|
|
46
|
+
* Decode an author's declaration, naming every failing path. A declaration with several forms,
|
|
47
|
+
* such as `oauth2()`'s discovered, declared and client credentials endpoints, is explained by the
|
|
48
|
+
* form its author chose (`intended`), so the problems are that form's, including the options it
|
|
49
|
+
* lacks, rather than every other form's objections. Messages never include the supplied values.
|
|
50
|
+
*/
|
|
51
|
+
export declare const parseDeclaration: <T>(decoder: EffectSchema.Decoder<T>, input: unknown, declaration: string, intended?: (input: unknown) => EffectSchema.Decoder<unknown>) => Effect.Effect<T, DeclarationInvalid>;
|
|
45
52
|
/** Present a native decoder through the synchronous author API. */
|
|
46
53
|
export declare function wrap<T, Optional extends boolean>(decoder: EffectSchema.Decoder<T>, optionalValue: Optional): Schema<T, Optional>;
|
|
47
54
|
/** A string, optionally with a minimum length. No coercion. */
|
|
@@ -17,7 +17,7 @@ import type { Placement } from "./contracts/placement.js";
|
|
|
17
17
|
import type { AppContext as NativeAppContext, QueryContext as NativeQueryContext } from "./contracts/context.js";
|
|
18
18
|
import { query as operationQuery, type OperationOptions } from "./implementation/operations.js";
|
|
19
19
|
import { type Fields, type Infer, type ObjectSchema, type Schema, type SecretFields, type SecretObject } from "./implementation/schema.js";
|
|
20
|
-
export { type JsonObject, type JsonValue, ValidationError } from "./contracts/schema.js";
|
|
20
|
+
export { DeclarationInvalid, type DeclarationIssue, type JsonObject, type JsonValue, ValidationError, } from "./contracts/schema.js";
|
|
21
21
|
export { type Fields, type Infer, type ObjectSchema, type ObjectValue, type Schema, array, boolean, json, jsonSchema, literal, number, object, record, string, plain, raw, type SecretString, } from "./implementation/schema.js";
|
|
22
22
|
export { type AccountCheckContext, type AccountCheckResult, type AccountInfo, type AccountOf, type AuthMethod, type AuthMethodData, type AuthMethods, type ManyAccounts, type Provider, type ReservedAuthorizationParam, } from "./contracts/provider.js";
|
|
23
23
|
export { defineProvider, type ProviderOptions } from "./implementation/provider.js";
|