apps 0.0.1-beta.105 → 0.0.1-beta.108
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-R3O32PQV.js → chunk-AVDSIC3N.js} +5 -3
- package/js/{chunk-QN5BMAG7.js → chunk-CWYIEXX2.js} +2 -2
- package/js/{chunk-OTDKCYMH.js → chunk-GD2QMZMA.js} +211 -5
- package/js/{chunk-EDXNAZLI.js → chunk-I32KG7II.js} +2 -2
- package/js/{chunk-X45GWW4A.js → chunk-KQQQBJ3F.js} +2 -2
- package/js/{chunk-PILIRGJA.js → chunk-QXJPA2YB.js} +1 -1
- package/js/{chunk-2B7FHH7S.js → chunk-SEJBC5UM.js} +1 -1
- package/js/{chunk-KY7C6BWO.js → chunk-UZQ4K5BH.js} +2 -2
- package/js/{chunk-3UWLQMMK.js → chunk-XYMLJ42M.js} +5 -5
- package/js/effect.js +6 -6
- package/js/graphql.js +192 -160
- package/js/host.js +6 -6
- package/js/index.js +3 -3
- package/js/mcp/effect.js +7 -7
- package/js/mcp.js +9 -9
- package/js/openapi.js +4 -4
- package/js/skills.js +3 -3
- package/js/ui/serving.js +1 -1
- package/package.json +1 -1
- package/runtime.json +1 -1
- package/types/apps/src/contracts/graphql.d.ts +38 -1
- package/types/apps/src/implementation/failure-detail.d.ts +1 -1
- package/types/apps/src/implementation/upstream-error.d.ts +9 -1
|
@@ -23,12 +23,49 @@ export declare const GraphqlToolsOptions: Schema.Struct<{
|
|
|
23
23
|
readonly timeoutMs: Schema.optional<Schema.Int>;
|
|
24
24
|
}>;
|
|
25
25
|
export type GraphqlToolsOptions = typeof GraphqlToolsOptions.Type;
|
|
26
|
+
/** Most errors of one GraphQL response that a failure carries. */
|
|
27
|
+
export declare const maxGraphqlStatedErrors = 5;
|
|
28
|
+
/** Most `extensions` entries carried for one stated error. */
|
|
29
|
+
export declare const maxGraphqlStatedExtensions = 4;
|
|
30
|
+
/** Longest path, path segment or `extensions` value carried for one stated error. */
|
|
31
|
+
export declare const maxGraphqlStatedFieldLength = 256;
|
|
32
|
+
/**
|
|
33
|
+
* One error a GraphQL server stated in its response's `errors` list, in the format the GraphQL
|
|
34
|
+
* specification documents: its message, the response path it names, and the scalar entries of its
|
|
35
|
+
* `extensions`, such as `code`. Text is bounded where it is read. The path keeps the server's
|
|
36
|
+
* segments, so account secrets are replaced in them before they are written as a path when the
|
|
37
|
+
* failure leaves the app.
|
|
38
|
+
*/
|
|
39
|
+
export declare const GraphqlStatedError: Schema.Struct<{
|
|
40
|
+
readonly message: Schema.String;
|
|
41
|
+
/** The first segments of the path, as many as a path of the longest carried length shows. */
|
|
42
|
+
readonly path: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Int]>>>;
|
|
43
|
+
readonly extensions: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean]>>>;
|
|
44
|
+
}>;
|
|
45
|
+
export type GraphqlStatedError = typeof GraphqlStatedError.Type;
|
|
26
46
|
declare const GraphqlError_base: Schema.Class<GraphqlError, Schema.TaggedStruct<"GraphqlError", {
|
|
27
47
|
readonly phase: Schema.Literals<readonly ["discover", "call"]>;
|
|
28
48
|
readonly reason: Schema.Literals<readonly ["request", "unauthorized", "invalid_response", "invalid_input", "timeout", "execution"]>;
|
|
29
49
|
readonly status: Schema.optional<Schema.Number>;
|
|
50
|
+
/** The first errors the server stated, in its order. */
|
|
51
|
+
readonly errors: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
52
|
+
readonly message: Schema.String;
|
|
53
|
+
/** The first segments of the path, as many as a path of the longest carried length shows. */
|
|
54
|
+
readonly path: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Int]>>>;
|
|
55
|
+
readonly extensions: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean]>>>;
|
|
56
|
+
}>>>;
|
|
57
|
+
/** How many errors the server stated in all, when it stated more than `errors` carries. */
|
|
58
|
+
readonly stated: Schema.optional<Schema.Int>;
|
|
59
|
+
/**
|
|
60
|
+
* Why Executor did not read the JSON body of a refused request: it was larger than error bodies
|
|
61
|
+
* may be, or it did not arrive in time. The status is still the server's answer.
|
|
62
|
+
*/
|
|
63
|
+
readonly unreadBody: Schema.optional<Schema.Literals<readonly ["too_large", "incomplete"]>>;
|
|
30
64
|
}>, import("effect/Cause").YieldableError>;
|
|
31
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* Safe failures omit upstream bodies other than the errors a GraphQL server stated in its
|
|
67
|
+
* documented `errors` list. Execution means a valid GraphQL error response, not malformed data.
|
|
68
|
+
*/
|
|
32
69
|
export declare class GraphqlError extends GraphqlError_base {
|
|
33
70
|
}
|
|
34
71
|
/** The introspection subset used by tools; unknown upstream fields are omitted. */
|
|
@@ -41,7 +41,7 @@ export declare const parseSkillLoadFailed: (error: unknown) => Option.Option<Hos
|
|
|
41
41
|
export declare const describeFailure: (error: unknown) => string;
|
|
42
42
|
/**
|
|
43
43
|
* Describe what an operation raised for the app's own caller. App data failures keep their
|
|
44
|
-
* reason as a code, as do app cache failures and OpenAPI and MCP service failures, such as an
|
|
44
|
+
* reason as a code, as do app cache failures and OpenAPI, GraphQL and MCP service failures, such as an
|
|
45
45
|
* `mcpHealth` check that cannot reach its server or cannot verify the credentials; any other thrown
|
|
46
46
|
* value is the app's own error, with its own code and scalar fields. Account secrets are replaced.
|
|
47
47
|
*/
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { UpstreamError } from "../contracts/failure.js";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* A stated message is bounded where it is read, before the invocation's account secrets are known,
|
|
4
|
+
* so a cut can split a secret. Leaving the bundle replaces the part of one a shortened message
|
|
5
|
+
* ends with; see `isShortenedStated`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const boundStated: (text: string, maximum: number) => string;
|
|
8
|
+
/** Whether `boundStated` shortened this text, so it may end partway through a secret. */
|
|
9
|
+
export declare const isShortenedStated: (text: string, maximum: number) => boolean;
|
|
10
|
+
/** Whether a stated message was shortened where it was read. */
|
|
3
11
|
export declare const isShortenedUpstream: (message: string) => boolean;
|
|
4
12
|
/** The error a JSON error body states, if it uses a nested error object or OAuth's format. */
|
|
5
13
|
export declare const bodyUpstreamError: (json: unknown) => UpstreamError | undefined;
|