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.
@@ -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
- /** Safe failures omit upstream bodies. Execution means a valid GraphQL error response, not malformed data. */
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
- /** Whether `bounded` shortened this message, so it may end partway through a secret. */
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;