apps 0.0.1-beta.24 → 0.0.1-beta.26
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-IJX4CYZO.js → chunk-2TP7C25K.js} +3 -3
- package/js/{chunk-KUMBKVJD.js → chunk-3YN4UDPB.js} +2 -2
- package/js/{chunk-B3T7CZOH.js → chunk-4CMJD7AB.js} +29 -7
- package/js/{chunk-M3B3DE4K.js → chunk-AAAMPT6F.js} +2 -2
- package/js/{chunk-3HH4OZR3.js → chunk-BTRBOOTD.js} +23 -25
- package/js/chunk-DAIW2WM3.js +118 -0
- package/js/{chunk-CDL5PM2Q.js → chunk-DM5U7G7V.js} +124 -124
- package/js/{chunk-ODEIDRGW.js → chunk-DUEZ2XCO.js} +3 -3
- package/js/{chunk-WFEUCUFF.js → chunk-EXDR4HVM.js} +184 -30
- package/js/{chunk-N7YDVXYJ.js → chunk-GH6PY5BQ.js} +1 -1
- package/js/{chunk-K2QATKIF.js → chunk-HIYRKEWP.js} +77 -22
- package/js/{chunk-PZB6T6KU.js → chunk-HQKIPKM5.js} +1 -1
- package/js/{chunk-66JAEDTE.js → chunk-IE6W5RNN.js} +2 -2
- package/js/{chunk-27F7W2LG.js → chunk-KKGRSXUK.js} +1 -1
- package/js/{chunk-57RKNWL2.js → chunk-KNJAOYV4.js} +2 -2
- package/js/{chunk-ZQINWV4W.js → chunk-LPN4ONWW.js} +2 -2
- package/js/{chunk-A5BSZKFF.js → chunk-NXO2GN2T.js} +8 -8
- package/js/{chunk-UK573G7W.js → chunk-OBXHLFGQ.js} +1 -1
- package/js/{chunk-JWNSH5CA.js → chunk-OI7OI2U3.js} +2 -2
- package/js/{chunk-IPI4MFSN.js → chunk-PC5RHPUP.js} +2 -2
- package/js/{chunk-VFZKSM3T.js → chunk-SUY33XAY.js} +1 -1
- package/js/{chunk-R3EV5FTO.js → chunk-T7WRQJUF.js} +55 -3
- package/js/{chunk-JU7VHODU.js → chunk-TACLXEAE.js} +1 -1
- package/js/{chunk-2KZ7GG43.js → chunk-VGEPL4BV.js} +146 -53
- package/js/{chunk-S47NFEWF.js → chunk-WPKXOTKM.js} +3 -3
- package/js/{chunk-PJJ24GU7.js → chunk-XBG3M64K.js} +1 -1
- package/js/{chunk-AK54RD3A.js → chunk-XIRAIB3P.js} +4 -4
- package/js/{chunk-NKLWZJLE.js → chunk-ZVMZWXVF.js} +2 -2
- package/js/client.js +10 -10
- package/js/contracts.js +36 -14
- package/js/effect.js +19 -19
- package/js/graphql.js +21 -21
- package/js/host.js +19 -19
- package/js/index.js +12 -12
- package/js/mcp/effect.js +21 -21
- package/js/mcp/stdio.js +30 -25
- package/js/mcp.js +23 -23
- package/js/openapi.js +595 -200
- package/js/react.js +3 -3
- package/js/skills/effect.js +3 -3
- package/js/skills.js +11 -11
- package/js/storage/facet.js +4 -4
- package/js/ui/auth/contracts.js +2 -2
- package/js/ui/auth.js +5 -5
- package/js/ui/contracts.js +4 -4
- package/js/ui/serving.js +8 -8
- package/package.json +1 -1
- package/runtime.json +1 -1
- package/types/apps/src/contracts/api-response-error.d.ts +4 -0
- package/types/apps/src/contracts/failure.d.ts +30 -1
- package/types/apps/src/contracts/host.d.ts +5 -4
- package/types/apps/src/contracts/mcp.d.ts +8 -1
- package/types/apps/src/contracts/openapi-compile.d.ts +31 -3
- package/types/apps/src/contracts/openapi.d.ts +16 -6
- package/types/apps/src/contracts/protocol-version.d.ts +2 -2
- package/types/apps/src/contracts/protocols/1.d.ts +16 -2
- package/types/apps/src/contracts/protocols/2.d.ts +1 -1
- package/types/apps/src/contracts/protocols/3.d.ts +1 -3
- package/types/apps/src/contracts/protocols/4.d.ts +1 -2
- package/types/apps/src/contracts/protocols/5.d.ts +3 -3
- package/types/apps/src/contracts/protocols/6.d.ts +3 -3
- package/types/apps/src/contracts/protocols/7.d.ts +3 -3
- package/types/apps/src/contracts/protocols/8.d.ts +1119 -0
- package/types/apps/src/contracts/provider-error.d.ts +9 -0
- package/types/apps/src/implementation/failure-detail.d.ts +22 -3
- package/types/apps/src/implementation/mcp-client.d.ts +6 -0
- package/types/apps/src/implementation/openapi-compile.d.ts +12 -2
- package/types/apps/src/implementation/openapi-document.d.ts +20 -6
- package/types/apps/src/implementation/openapi-names.d.ts +9 -4
- package/types/apps/src/implementation/openapi-source.d.ts +6 -0
- package/types/apps/src/implementation/provider-error.d.ts +28 -1
- package/types/apps/src/implementation/router-catalog.d.ts +2 -3
- package/types/apps/src/implementation/upstream-error.d.ts +7 -0
- package/types/telemetry/src/config.d.ts +2 -2
- package/js/chunk-MKWZPDR6.js +0 -63
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
+
/** Longest agent guidance an API error's recovery carries. */
|
|
3
|
+
export declare const maxApiErrorInstructionsLength = 4096;
|
|
2
4
|
/** Bounded recovery a declared API error published for its caller: a short next step and agent guidance. */
|
|
3
5
|
export declare const ApiErrorRecovery: Schema.Struct<{
|
|
4
6
|
readonly action: Schema.NonEmptyString;
|
|
@@ -6,6 +8,8 @@ export declare const ApiErrorRecovery: Schema.Struct<{
|
|
|
6
8
|
}>;
|
|
7
9
|
/** Recovery copied from an error response body; extra keys are dropped on decode. */
|
|
8
10
|
export type ApiErrorRecovery = typeof ApiErrorRecovery.Type;
|
|
11
|
+
/** Longest message an API error response carries. */
|
|
12
|
+
export declare const maxApiErrorMessageLength = 4096;
|
|
9
13
|
/** Bounded public fields from a response matching its declared API error schema. */
|
|
10
14
|
export declare const ApiErrorResponse: Schema.Struct<{
|
|
11
15
|
readonly code: Schema.NonEmptyString;
|
|
@@ -9,10 +9,24 @@ export declare const maxFailureMessageLength = 2048;
|
|
|
9
9
|
export declare const FailureSource: Schema.Literals<readonly ["app", "storage", "service"]>;
|
|
10
10
|
/** The thrown error's name, such as `TypeError`, or the host error's tag. */
|
|
11
11
|
export declare const FailureName: Schema.String;
|
|
12
|
-
/** A stable host failure code, such as an app data reason
|
|
12
|
+
/** A stable host failure code, such as an app data reason, or the thrown error's own `code`. */
|
|
13
13
|
export declare const FailureCode: Schema.String;
|
|
14
14
|
/** Bounded, with the invocation's account secrets replaced. */
|
|
15
15
|
export declare const FailureMessage: Schema.String;
|
|
16
|
+
/** Most fields of one thrown error carried across the runtime boundary. */
|
|
17
|
+
export declare const maxFailureFields = 8;
|
|
18
|
+
/** Longest text field value carried across the runtime boundary. */
|
|
19
|
+
export declare const maxFailureFieldLength = 256;
|
|
20
|
+
/** A field name as the error's code spells it, such as `reason` or `pointer`. */
|
|
21
|
+
export declare const FailureFieldName: Schema.String;
|
|
22
|
+
/** Bounded text with account secrets replaced, a finite number, or a boolean. */
|
|
23
|
+
export declare const FailureFieldValue: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean]>;
|
|
24
|
+
/**
|
|
25
|
+
* The thrown error's own scalar fields beside its name, code and message, such as the `reason`
|
|
26
|
+
* and `pointer` a spec compiler sets. Nested values, stacks and causes are never carried.
|
|
27
|
+
*/
|
|
28
|
+
export declare const FailureFields: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean]>>;
|
|
29
|
+
export type FailureFields = typeof FailureFields.Type;
|
|
16
30
|
/**
|
|
17
31
|
* The error an app's own code raised, or the specific host failure it hit. Stacks and cause
|
|
18
32
|
* values stay private. Builds from before these fields existed send none.
|
|
@@ -22,4 +36,19 @@ export declare const FailureDetail: {
|
|
|
22
36
|
errorName: Schema.optionalKey<Schema.String>;
|
|
23
37
|
code: Schema.optionalKey<Schema.String>;
|
|
24
38
|
message: Schema.optionalKey<Schema.String>;
|
|
39
|
+
fields: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean]>>>;
|
|
25
40
|
};
|
|
41
|
+
/** Longest error message a service stated, as carried across the runtime boundary. */
|
|
42
|
+
export declare const maxUpstreamMessageLength = 1024;
|
|
43
|
+
/**
|
|
44
|
+
* The error a service stated in its own response: a JSON-RPC error's code and message, or an
|
|
45
|
+
* OAuth Bearer error code and description. Bounded, with the invocation's account secrets replaced.
|
|
46
|
+
*/
|
|
47
|
+
export declare const UpstreamError: Schema.Struct<{
|
|
48
|
+
readonly code: Schema.Union<readonly [Schema.Int, Schema.String]>;
|
|
49
|
+
readonly message: Schema.optionalKey<Schema.String>;
|
|
50
|
+
}>;
|
|
51
|
+
export type UpstreamError = typeof UpstreamError.Type;
|
|
52
|
+
/** Where a service failed: setting up a session, listing tools, or running one. */
|
|
53
|
+
export declare const FailurePhase: Schema.Literals<readonly ["connect", "discover", "call"]>;
|
|
54
|
+
export type FailurePhase = typeof FailurePhase.Type;
|
|
@@ -3,7 +3,7 @@ import { SkillLoadFailed, type SkillFile } from "./skills.js";
|
|
|
3
3
|
import { ProviderError } from "./provider-error.js";
|
|
4
4
|
import { McpError } from "./mcp.js";
|
|
5
5
|
import { OpenapiResponseError } from "./api-response-error.js";
|
|
6
|
-
export { ApiErrorResponse, OpenapiResponseError } from "./api-response-error.js";
|
|
6
|
+
export { ApiErrorResponse, maxApiErrorInstructionsLength, maxApiErrorMessageLength, OpenapiResponseError, } from "./api-response-error.js";
|
|
7
7
|
export { ProviderError } from "./provider-error.js";
|
|
8
8
|
export { McpError } from "./mcp.js";
|
|
9
9
|
import { WorkflowFailure, type WorkflowExecution, type WorkflowReplay, type WorkflowHostControls } from "./workflows.js";
|
|
@@ -34,10 +34,11 @@ export { protocol4 } from "./protocols/4.js";
|
|
|
34
34
|
export { protocol5 } from "./protocols/5.js";
|
|
35
35
|
export { protocol6 } from "./protocols/6.js";
|
|
36
36
|
export { protocol7, AccountCheckCommand, CredentialHost } from "./protocols/7.js";
|
|
37
|
+
export { protocol8 } from "./protocols/8.js";
|
|
37
38
|
export { AccountCheckResult, AccountInfo } from "./provider.js";
|
|
38
|
-
import { HostAccountsInvalid, HostDeclarationInvalid, HostEvaluationFailed, HostInputInvalid, HostKindMismatch, HostOperationFailed, HostOperationNotFound, HostOutputInvalid, HostRequestInvalid, HostToolApprovalRequired, HostToolBlocked, HostToolNotFound, HostToolPolicyFailed, SkillSources, type InvocationDeadline, ResolvedAccounts, type SkillCatalogResponse, type TrustedToolApproval } from "./protocols/
|
|
39
|
-
export { DeclaredRequirements, HostRequest } from "./protocols/
|
|
40
|
-
export { DeclaredAuthMethod, DeclaredProvider, ResolvedAccount, ResolvedAccounts, TrustedToolApproval, InvocationDeadline, HostedTool, HostedToolSummary, HostRouterError, HostedRouter, HostedCatalog, HostedCatalogSummary, SkillSources, SkillCatalogResponse, HostRequestInvalid, HostAccountsInvalid, HostDeclarationInvalid, HostEvaluationFailed, HostOperationNotFound, HostOperationFailed, HostToolNotFound, HostKindMismatch, InputProblem, maxInputProblems, HostInputInvalid, HostToolBlocked, HostToolApprovalRequired, HostToolPolicyFailed, HostOutputInvalid, HostError, HostResponse, HostInvocation, } from "./protocols/
|
|
39
|
+
import { HostAccountsInvalid, HostDeclarationInvalid, HostEvaluationFailed, HostInputInvalid, HostKindMismatch, HostOperationFailed, HostOperationNotFound, HostOutputInvalid, HostRequestInvalid, HostToolApprovalRequired, HostToolBlocked, HostToolNotFound, HostToolPolicyFailed, SkillSources, type InvocationDeadline, ResolvedAccounts, type SkillCatalogResponse, type TrustedToolApproval } from "./protocols/8.js";
|
|
40
|
+
export { DeclaredRequirements, HostRequest } from "./protocols/8.js";
|
|
41
|
+
export { DeclaredAuthMethod, DeclaredProvider, ResolvedAccount, ResolvedAccounts, TrustedToolApproval, InvocationDeadline, HostedTool, HostedToolSummary, HostRouterError, HostedRouter, HostedCatalog, HostedCatalogSummary, SkillSources, SkillCatalogResponse, HostRequestInvalid, HostAccountsInvalid, HostDeclarationInvalid, HostEvaluationFailed, HostOperationNotFound, HostOperationFailed, HostToolNotFound, HostKindMismatch, InputProblem, maxInputProblems, HostInputInvalid, HostToolBlocked, HostToolApprovalRequired, HostToolPolicyFailed, HostOutputInvalid, HostError, HostResponse, HostInvocation, } from "./protocols/8.js";
|
|
41
42
|
/** Raw host inputs; the host boundary parses and redacts these immediately. */
|
|
42
43
|
export type ResolvedAccountsInput = typeof ResolvedAccounts.Encoded;
|
|
43
44
|
/** Trusted invocation context, supplied separately from the Request. */
|
|
@@ -107,8 +107,15 @@ declare const McpError_base: Schema.Class<McpError, Schema.TaggedStruct<"McpErro
|
|
|
107
107
|
readonly phase: Schema.Literals<readonly ["connect", "discover", "call", "schema", "transport"]>;
|
|
108
108
|
readonly reason: Schema.Literals<readonly ["request", "unauthorized", "invalid_response", "timeout", "invalid_input"]>;
|
|
109
109
|
readonly status: Schema.optional<Schema.Number>;
|
|
110
|
+
readonly upstream: Schema.optional<Schema.Struct<{
|
|
111
|
+
readonly code: Schema.Union<readonly [Schema.Int, Schema.String]>;
|
|
112
|
+
readonly message: Schema.optionalKey<Schema.String>;
|
|
113
|
+
}>>;
|
|
110
114
|
}>, import("effect/Cause").YieldableError>;
|
|
111
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* Safe protocol/transport failure; no raw upstream payloads or credentials. `upstream` is the
|
|
117
|
+
* JSON-RPC error the server answered with, bounded and with account secrets replaced.
|
|
118
|
+
*/
|
|
112
119
|
export declare class McpError extends McpError_base {
|
|
113
120
|
}
|
|
114
121
|
/** Public process configuration. Credentials arrive through the selected account. */
|
|
@@ -1,11 +1,39 @@
|
|
|
1
1
|
/** Shared OpenAPI compilation diagnostics. */
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
export declare const OpenapiCompileErrorCode: Schema.Literals<readonly ["server_protocol", "server_url", "external_reference", "circular_reference", "schema_keyword", "schema_reference", "missing_component", "openapi_version", "auth_helper", "auth_missing", "operation_path", "duplicate_operation", "server_missing", "multiple_hosts", "parameter_encoding", "parameter_style", "request_body", "combined_oauth", "auth_method", "input_schema", "no_operations", "no_supported_operations", "invalid_document", "source_generation", "authoring_reference"]>;
|
|
3
|
+
export declare const OpenapiCompileErrorCode: Schema.Literals<readonly ["server_protocol", "server_url", "external_reference", "circular_reference", "schema_keyword", "schema_reference", "missing_component", "openapi_version", "auth_helper", "auth_missing", "operation_path", "operation_method", "duplicate_operation", "server_missing", "multiple_hosts", "parameter_encoding", "parameter_style", "request_body", "combined_oauth", "auth_method", "event_stream", "input_schema", "no_operations", "no_supported_operations", "invalid_document", "source_generation", "authoring_reference"]>;
|
|
4
|
+
/** A declared operation the importer left out, and why. */
|
|
5
|
+
export declare const OpenapiSkippedOperation: Schema.Struct<{
|
|
6
|
+
/** The tool name the operation would have; reading that tool reports why it is missing. */
|
|
7
|
+
readonly name: Schema.String;
|
|
8
|
+
/** The HTTP method, such as `GET`. */
|
|
9
|
+
readonly method: Schema.String;
|
|
10
|
+
/** The path as the definition declares it. */
|
|
11
|
+
readonly path: Schema.String;
|
|
12
|
+
readonly code: Schema.Literals<readonly ["server_protocol", "server_url", "external_reference", "circular_reference", "schema_keyword", "schema_reference", "missing_component", "openapi_version", "auth_helper", "auth_missing", "operation_path", "operation_method", "duplicate_operation", "server_missing", "multiple_hosts", "parameter_encoding", "parameter_style", "request_body", "combined_oauth", "auth_method", "event_stream", "input_schema", "no_operations", "no_supported_operations", "invalid_document", "source_generation", "authoring_reference"]>;
|
|
13
|
+
readonly reason: Schema.String;
|
|
14
|
+
}>;
|
|
15
|
+
export type OpenapiSkippedOperation = typeof OpenapiSkippedOperation.Type;
|
|
4
16
|
declare const OpenapiCompileError_base: Schema.Class<OpenapiCompileError, Schema.TaggedStruct<"OpenapiCompileError", {
|
|
5
|
-
readonly code: Schema.Literals<readonly ["server_protocol", "server_url", "external_reference", "circular_reference", "schema_keyword", "schema_reference", "missing_component", "openapi_version", "auth_helper", "auth_missing", "operation_path", "duplicate_operation", "server_missing", "multiple_hosts", "parameter_encoding", "parameter_style", "request_body", "combined_oauth", "auth_method", "input_schema", "no_operations", "no_supported_operations", "invalid_document", "source_generation", "authoring_reference"]>;
|
|
17
|
+
readonly code: Schema.Literals<readonly ["server_protocol", "server_url", "external_reference", "circular_reference", "schema_keyword", "schema_reference", "missing_component", "openapi_version", "auth_helper", "auth_missing", "operation_path", "operation_method", "duplicate_operation", "server_missing", "multiple_hosts", "parameter_encoding", "parameter_style", "request_body", "combined_oauth", "auth_method", "event_stream", "input_schema", "no_operations", "no_supported_operations", "invalid_document", "source_generation", "authoring_reference"]>;
|
|
6
18
|
readonly reason: Schema.String;
|
|
19
|
+
readonly skipped: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
20
|
+
/** The tool name the operation would have; reading that tool reports why it is missing. */
|
|
21
|
+
readonly name: Schema.String;
|
|
22
|
+
/** The HTTP method, such as `GET`. */
|
|
23
|
+
readonly method: Schema.String;
|
|
24
|
+
/** The path as the definition declares it. */
|
|
25
|
+
readonly path: Schema.String;
|
|
26
|
+
readonly code: Schema.Literals<readonly ["server_protocol", "server_url", "external_reference", "circular_reference", "schema_keyword", "schema_reference", "missing_component", "openapi_version", "auth_helper", "auth_missing", "operation_path", "operation_method", "duplicate_operation", "server_missing", "multiple_hosts", "parameter_encoding", "parameter_style", "request_body", "combined_oauth", "auth_method", "event_stream", "input_schema", "no_operations", "no_supported_operations", "invalid_document", "source_generation", "authoring_reference"]>;
|
|
27
|
+
readonly reason: Schema.String;
|
|
28
|
+
}>>>;
|
|
29
|
+
readonly origins: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
7
30
|
}>, import("effect/Cause").YieldableError>;
|
|
8
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* A safe generation failure. `reason` explains the cause; `skipped` lists the declared operations
|
|
33
|
+
* it left out and why, and `origins` the origins operations resolve to when none of them matches
|
|
34
|
+
* the allowed origin. Reading one left-out tool fails with this error for that operation alone.
|
|
35
|
+
*/
|
|
9
36
|
export declare class OpenapiCompileError extends OpenapiCompileError_base {
|
|
37
|
+
get message(): string;
|
|
10
38
|
}
|
|
11
39
|
export {};
|
|
@@ -20,7 +20,8 @@ export type OpenapiErrorResponse = typeof OpenapiErrorResponse.Type;
|
|
|
20
20
|
/** Resolved OpenAPI parameter shared by import validation and request construction. */
|
|
21
21
|
export declare const OpenapiParameter: Schema.Struct<{
|
|
22
22
|
readonly name: Schema.String;
|
|
23
|
-
|
|
23
|
+
/** OpenAPI 3.2's `querystring` is the whole query string, serialized from one `content` value. */
|
|
24
|
+
readonly in: Schema.Literals<readonly ["path", "query", "querystring", "header", "cookie"]>;
|
|
24
25
|
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
25
26
|
readonly schema: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
26
27
|
readonly style: Schema.optionalKey<Schema.String>;
|
|
@@ -45,7 +46,7 @@ export declare const OpenapiOperation: Schema.Struct<{
|
|
|
45
46
|
/** The document's operationId, when it declares one. `kinds` overrides are keyed by it. */
|
|
46
47
|
readonly operationId: Schema.optionalKey<Schema.String>;
|
|
47
48
|
readonly description: Schema.String;
|
|
48
|
-
readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>;
|
|
49
|
+
readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS", "QUERY"]>;
|
|
49
50
|
readonly path: Schema.String;
|
|
50
51
|
readonly baseUrl: Schema.String;
|
|
51
52
|
readonly openapi: Schema.String;
|
|
@@ -54,7 +55,8 @@ export declare const OpenapiOperation: Schema.Struct<{
|
|
|
54
55
|
readonly request: Schema.Struct<{
|
|
55
56
|
readonly parameters: Schema.$Array<Schema.Struct<{
|
|
56
57
|
readonly name: Schema.String;
|
|
57
|
-
|
|
58
|
+
/** OpenAPI 3.2's `querystring` is the whole query string, serialized from one `content` value. */
|
|
59
|
+
readonly in: Schema.Literals<readonly ["path", "query", "querystring", "header", "cookie"]>;
|
|
58
60
|
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
59
61
|
readonly schema: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
60
62
|
readonly style: Schema.optionalKey<Schema.String>;
|
|
@@ -92,6 +94,8 @@ export declare const OpenapiOperation: Schema.Struct<{
|
|
|
92
94
|
}>>>;
|
|
93
95
|
}>;
|
|
94
96
|
export type OpenapiOperation = typeof OpenapiOperation.Type;
|
|
97
|
+
/** Safe methods, whose operations are queries unless `kinds` says otherwise. QUERY is OpenAPI 3.2's. */
|
|
98
|
+
export declare const isOpenapiReadMethod: (method: OpenapiOperation["method"]) => method is "GET" | "HEAD" | "OPTIONS" | "QUERY";
|
|
95
99
|
/** Map a selected account field to one Swagger credential value. */
|
|
96
100
|
export declare const CredentialBinding: Schema.Struct<{
|
|
97
101
|
readonly scheme: Schema.String;
|
|
@@ -125,7 +129,7 @@ export declare const OpenapiToolsOptions: Schema.Struct<{
|
|
|
125
129
|
/** The document's operationId, when it declares one. `kinds` overrides are keyed by it. */
|
|
126
130
|
readonly operationId: Schema.optionalKey<Schema.String>;
|
|
127
131
|
readonly description: Schema.String;
|
|
128
|
-
readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>;
|
|
132
|
+
readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS", "QUERY"]>;
|
|
129
133
|
readonly path: Schema.String;
|
|
130
134
|
readonly baseUrl: Schema.String;
|
|
131
135
|
readonly openapi: Schema.String;
|
|
@@ -134,7 +138,8 @@ export declare const OpenapiToolsOptions: Schema.Struct<{
|
|
|
134
138
|
readonly request: Schema.Struct<{
|
|
135
139
|
readonly parameters: Schema.$Array<Schema.Struct<{
|
|
136
140
|
readonly name: Schema.String;
|
|
137
|
-
|
|
141
|
+
/** OpenAPI 3.2's `querystring` is the whole query string, serialized from one `content` value. */
|
|
142
|
+
readonly in: Schema.Literals<readonly ["path", "query", "querystring", "header", "cookie"]>;
|
|
138
143
|
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
139
144
|
readonly schema: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
140
145
|
readonly style: Schema.optionalKey<Schema.String>;
|
|
@@ -223,7 +228,12 @@ export declare const defaultOpenapiResponseLimits: {
|
|
|
223
228
|
readonly maxBodyBytes: 16777216;
|
|
224
229
|
readonly readTimeoutMs: 30000;
|
|
225
230
|
};
|
|
226
|
-
/**
|
|
231
|
+
/**
|
|
232
|
+
* A sequence of JSON values, one per line or record: NDJSON, JSON Lines and `json-seq`, whose
|
|
233
|
+
* items OpenAPI 3.2 describes with `itemSchema`. The body is not one JSON value.
|
|
234
|
+
*/
|
|
235
|
+
export declare const isOpenapiJsonSequence: (type: string) => boolean;
|
|
236
|
+
/** Media returned as text rather than a base64 file. JSON sequences remain unparsed text. */
|
|
227
237
|
export declare const isOpenapiTextMedia: (type: string) => boolean;
|
|
228
238
|
/** A form field that carries raw file bytes: OpenAPI 3.1 `contentMediaType` without an
|
|
229
239
|
* encoding, or the `format: binary` string that 3.1 documents still commonly use. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The host protocol this framework speaks. It is written into `runtime.json` and every host
|
|
3
|
-
* snapshot. Released protocols are frozen: see `protocols/
|
|
3
|
+
* snapshot. Released protocols are frozen: see `protocols/8.ts` and notes/apps-publishing.md.
|
|
4
4
|
* This file has no imports so the package build script can read it directly.
|
|
5
5
|
*/
|
|
6
|
-
export declare const frameworkProtocol =
|
|
6
|
+
export declare const frameworkProtocol = 8;
|
|
@@ -12,9 +12,23 @@
|
|
|
12
12
|
import { Schema } from "effect";
|
|
13
13
|
import { OpenapiResponseError } from "../api-response-error.js";
|
|
14
14
|
import { ElicitationFailed } from "../elicitation.js";
|
|
15
|
-
import { McpError } from "../mcp.js";
|
|
16
|
-
import { ProviderError } from "../provider-error.js";
|
|
17
15
|
import { SkillLoadFailed } from "../skills.js";
|
|
16
|
+
declare const ProviderError_base: Schema.Class<ProviderError, Schema.TaggedStruct<"ProviderError", {
|
|
17
|
+
readonly reason: Schema.Literals<readonly ["unauthorized", "forbidden", "rate_limited", "unavailable", "rejected"]>;
|
|
18
|
+
readonly status: Schema.optional<Schema.Int>;
|
|
19
|
+
readonly accountId: Schema.optional<Schema.brand<Schema.String, "acc">>;
|
|
20
|
+
}>, import("effect/Cause").YieldableError>;
|
|
21
|
+
/** Protocol 1's provider failure, as released: a reason, an HTTP status and the account used. */
|
|
22
|
+
export declare class ProviderError extends ProviderError_base {
|
|
23
|
+
}
|
|
24
|
+
declare const McpError_base: Schema.Class<McpError, Schema.TaggedStruct<"McpError", {
|
|
25
|
+
readonly phase: Schema.Literals<readonly ["connect", "discover", "call", "schema", "transport"]>;
|
|
26
|
+
readonly reason: Schema.Literals<readonly ["request", "unauthorized", "invalid_response", "timeout", "invalid_input"]>;
|
|
27
|
+
readonly status: Schema.optional<Schema.Number>;
|
|
28
|
+
}>, import("effect/Cause").YieldableError>;
|
|
29
|
+
/** Protocol 1's MCP failure, as released: a phase, a reason and an HTTP status. */
|
|
30
|
+
export declare class McpError extends McpError_base {
|
|
31
|
+
}
|
|
18
32
|
declare const WorkflowFailure_base: Schema.Class<WorkflowFailure, Schema.TaggedStruct<"WorkflowFailure", {
|
|
19
33
|
readonly reason: Schema.Literals<readonly ["unavailable", "not_found", "input", "output", "operation", "approval", "credentials", "terminated", "execution", "conflict", "engine"]>;
|
|
20
34
|
readonly retryable: Schema.Boolean;
|
|
@@ -425,7 +425,7 @@ export declare const protocol2: {
|
|
|
425
425
|
readonly toolError: Schema.optionalKey<Schema.Literal<true>>;
|
|
426
426
|
}>, Schema.Struct<{
|
|
427
427
|
readonly ok: Schema.Literal<false>;
|
|
428
|
-
readonly error: Schema.Union<readonly [typeof import("../api-response-error.js").OpenapiResponseError, typeof import("
|
|
428
|
+
readonly error: Schema.Union<readonly [typeof import("../api-response-error.js").OpenapiResponseError, typeof import("./1.js").ProviderError, typeof import("./1.js").McpError, typeof import("../skills.js").SkillLoadFailed, typeof import("./1.js").WorkflowFailure, typeof import("./1.js").HostRequestInvalid, typeof import("./1.js").HostAccountsInvalid, typeof import("./1.js").HostDeclarationInvalid, typeof import("./1.js").HostEvaluationFailed, typeof import("./1.js").HostOperationNotFound, typeof import("./1.js").HostOperationFailed, typeof import("./1.js").HostToolNotFound, typeof import("./1.js").HostInputInvalid, typeof import("./1.js").HostOutputInvalid, typeof import("./1.js").HostToolBlocked, typeof import("./1.js").HostToolApprovalRequired, typeof import("./1.js").HostToolPolicyFailed, typeof import("../elicitation.js").ElicitationFailed]>;
|
|
429
429
|
}>]>;
|
|
430
430
|
readonly requirements: Schema.Struct<{
|
|
431
431
|
readonly capabilities: Schema.optionalKey<Schema.Struct<{
|
|
@@ -12,11 +12,9 @@ import { Schema } from "effect";
|
|
|
12
12
|
import { DatabaseFieldReserved, DatabaseLimitExceeded } from "../../../../app-data/src/contracts/database.js";
|
|
13
13
|
import { OpenapiResponseError } from "../api-response-error.js";
|
|
14
14
|
import { ElicitationFailed } from "../elicitation.js";
|
|
15
|
-
import { McpError } from "../mcp.js";
|
|
16
|
-
import { ProviderError } from "../provider-error.js";
|
|
17
15
|
import { SkillLoadFailed } from "../skills.js";
|
|
18
16
|
import { WorkflowFailure } from "../workflows.js";
|
|
19
|
-
import { HostAccountsInvalid, HostInputInvalid, HostOperationNotFound, HostOutputInvalid, HostRequestInvalid, HostToolApprovalRequired, HostToolBlocked, HostToolNotFound, HostToolPolicyFailed } from "./1.js";
|
|
17
|
+
import { HostAccountsInvalid, HostInputInvalid, HostOperationNotFound, HostOutputInvalid, HostRequestInvalid, HostToolApprovalRequired, HostToolBlocked, HostToolNotFound, HostToolPolicyFailed, McpError, ProviderError } from "./1.js";
|
|
20
18
|
export { DeclaredAuthMethod, DeclaredProvider, DeclaredRequirements, ResolvedAccount, ResolvedAccounts, TrustedToolApproval, InvocationDeadline, HostedTool, HostedToolSummary, HostRequest, HostRequestInvalid, HostAccountsInvalid, HostOperationNotFound, HostToolNotFound, InputProblem, maxInputProblems, HostInputInvalid, HostToolBlocked, HostToolApprovalRequired, HostToolPolicyFailed, HostOutputInvalid, HostInvocation, } from "./1.js";
|
|
21
19
|
export { SkillSources, SkillCatalogResponse } from "./2.js";
|
|
22
20
|
declare const HostDeclarationInvalid_base: Schema.Class<HostDeclarationInvalid, Schema.TaggedStruct<"HostDeclarationInvalid", {
|
|
@@ -8,10 +8,9 @@
|
|
|
8
8
|
* `protocol4` with `packages/apps/protocols/4.json`. See notes/apps-publishing.md.
|
|
9
9
|
*/
|
|
10
10
|
import { Schema } from "effect";
|
|
11
|
-
import { McpError } from "../mcp.js";
|
|
12
|
-
import { ProviderError } from "../provider-error.js";
|
|
13
11
|
import { SkillLoadFailed } from "../skills.js";
|
|
14
12
|
import { HostDeclarationInvalid, HostEvaluationFailed } from "./3.js";
|
|
13
|
+
import { McpError, ProviderError } from "./1.js";
|
|
15
14
|
export { DeclaredAuthMethod, DeclaredProvider, DeclaredRequirements, ResolvedAccount, ResolvedAccounts, TrustedToolApproval, InvocationDeadline, SkillSources, SkillCatalogResponse, HostRequestInvalid, HostAccountsInvalid, HostDeclarationInvalid, HostEvaluationFailed, HostOperationNotFound, HostOperationFailed, HostToolNotFound, InputProblem, maxInputProblems, HostInputInvalid, HostToolBlocked, HostToolApprovalRequired, HostToolPolicyFailed, HostOutputInvalid, } from "./3.js";
|
|
16
15
|
/**
|
|
17
16
|
* Serializable live tool metadata; executable callbacks never cross this boundary. `name` is the
|
|
@@ -918,7 +918,7 @@ export declare const protocol5: {
|
|
|
918
918
|
readonly toolError: Schema.optionalKey<Schema.Literal<true>>;
|
|
919
919
|
}>, Schema.Struct<{
|
|
920
920
|
readonly ok: Schema.Literal<false>;
|
|
921
|
-
readonly error: Schema.Union<readonly [typeof import("../api-response-error.js").OpenapiResponseError, typeof import("
|
|
921
|
+
readonly error: Schema.Union<readonly [typeof import("../api-response-error.js").OpenapiResponseError, typeof import("./1.js").ProviderError, typeof import("./1.js").McpError, typeof import("../skills.js").SkillLoadFailed, typeof import("../workflows.js").WorkflowFailure, typeof import("./1.js").HostRequestInvalid, typeof import("./1.js").HostAccountsInvalid, typeof import("./3.js").HostDeclarationInvalid, typeof import("./3.js").HostEvaluationFailed, typeof import("./1.js").HostOperationNotFound, typeof import("./3.js").HostOperationFailed, typeof import("../../../../app-data/src/index.js").DatabaseLimitExceeded, typeof import("../../../../app-data/src/index.js").DatabaseFieldReserved, typeof import("./1.js").HostToolNotFound, typeof import("./1.js").HostInputInvalid, typeof import("./1.js").HostOutputInvalid, typeof import("./1.js").HostToolBlocked, typeof import("./1.js").HostToolApprovalRequired, typeof import("./1.js").HostToolPolicyFailed, typeof import("../elicitation.js").ElicitationFailed, typeof import("./4.js").HostKindMismatch]>;
|
|
922
922
|
}>]>;
|
|
923
923
|
readonly catalog: Schema.Struct<{
|
|
924
924
|
readonly tools: Schema.$Array<Schema.Struct<{
|
|
@@ -965,7 +965,7 @@ export declare const protocol5: {
|
|
|
965
965
|
}>>>;
|
|
966
966
|
readonly tags: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
|
|
967
967
|
readonly skill: Schema.optionalKey<Schema.NonEmptyString>;
|
|
968
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof import("
|
|
968
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof import("./1.js").ProviderError, typeof import("./1.js").McpError, typeof import("../skills.js").SkillLoadFailed, typeof import("./3.js").HostDeclarationInvalid, typeof import("./3.js").HostEvaluationFailed]>>;
|
|
969
969
|
}>>;
|
|
970
970
|
}>;
|
|
971
971
|
readonly catalogSummary: Schema.Struct<{
|
|
@@ -1010,7 +1010,7 @@ export declare const protocol5: {
|
|
|
1010
1010
|
}>>>;
|
|
1011
1011
|
readonly tags: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
|
|
1012
1012
|
readonly skill: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1013
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof import("
|
|
1013
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof import("./1.js").ProviderError, typeof import("./1.js").McpError, typeof import("../skills.js").SkillLoadFailed, typeof import("./3.js").HostDeclarationInvalid, typeof import("./3.js").HostEvaluationFailed]>>;
|
|
1014
1014
|
}>>;
|
|
1015
1015
|
}>;
|
|
1016
1016
|
readonly skills: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -1364,7 +1364,7 @@ export declare const protocol6: {
|
|
|
1364
1364
|
readonly toolError: Schema.optionalKey<Schema.Literal<true>>;
|
|
1365
1365
|
}>, Schema.Struct<{
|
|
1366
1366
|
readonly ok: Schema.Literal<false>;
|
|
1367
|
-
readonly error: Schema.Union<readonly [typeof import("../api-response-error.js").OpenapiResponseError, typeof import("
|
|
1367
|
+
readonly error: Schema.Union<readonly [typeof import("../api-response-error.js").OpenapiResponseError, typeof import("./1.js").ProviderError, typeof import("./1.js").McpError, typeof import("../skills.js").SkillLoadFailed, typeof import("../workflows.js").WorkflowFailure, typeof import("./1.js").HostRequestInvalid, typeof import("./1.js").HostAccountsInvalid, typeof import("./3.js").HostDeclarationInvalid, typeof import("./3.js").HostEvaluationFailed, typeof import("./1.js").HostOperationNotFound, typeof import("./3.js").HostOperationFailed, typeof import("../../../../app-data/src/index.js").DatabaseLimitExceeded, typeof import("../../../../app-data/src/index.js").DatabaseFieldReserved, typeof import("./1.js").HostToolNotFound, typeof import("./1.js").HostInputInvalid, typeof import("./1.js").HostOutputInvalid, typeof import("./1.js").HostToolBlocked, typeof import("./1.js").HostToolApprovalRequired, typeof import("./1.js").HostToolPolicyFailed, typeof import("../elicitation.js").ElicitationFailed, typeof import("./4.js").HostKindMismatch]>;
|
|
1368
1368
|
}>]>;
|
|
1369
1369
|
readonly catalog: Schema.Struct<{
|
|
1370
1370
|
readonly tools: Schema.$Array<Schema.Struct<{
|
|
@@ -1411,7 +1411,7 @@ export declare const protocol6: {
|
|
|
1411
1411
|
}>>>;
|
|
1412
1412
|
readonly tags: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
|
|
1413
1413
|
readonly skill: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1414
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof import("
|
|
1414
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof import("./1.js").ProviderError, typeof import("./1.js").McpError, typeof import("../skills.js").SkillLoadFailed, typeof import("./3.js").HostDeclarationInvalid, typeof import("./3.js").HostEvaluationFailed]>>;
|
|
1415
1415
|
}>>;
|
|
1416
1416
|
}>;
|
|
1417
1417
|
readonly catalogSummary: Schema.Struct<{
|
|
@@ -1456,7 +1456,7 @@ export declare const protocol6: {
|
|
|
1456
1456
|
}>>>;
|
|
1457
1457
|
readonly tags: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
|
|
1458
1458
|
readonly skill: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1459
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof import("
|
|
1459
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof import("./1.js").ProviderError, typeof import("./1.js").McpError, typeof import("../skills.js").SkillLoadFailed, typeof import("./3.js").HostDeclarationInvalid, typeof import("./3.js").HostEvaluationFailed]>>;
|
|
1460
1460
|
}>>;
|
|
1461
1461
|
}>;
|
|
1462
1462
|
readonly skills: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -1528,7 +1528,7 @@ export declare const protocol7: {
|
|
|
1528
1528
|
readonly toolError: Schema.optionalKey<Schema.Literal<true>>;
|
|
1529
1529
|
}>, Schema.Struct<{
|
|
1530
1530
|
readonly ok: Schema.Literal<false>;
|
|
1531
|
-
readonly error: Schema.Union<readonly [typeof import("../api-response-error.js").OpenapiResponseError, typeof import("
|
|
1531
|
+
readonly error: Schema.Union<readonly [typeof import("../api-response-error.js").OpenapiResponseError, typeof import("./1.js").ProviderError, typeof import("./1.js").McpError, typeof import("../skills.js").SkillLoadFailed, typeof import("../workflows.js").WorkflowFailure, typeof import("./1.js").HostRequestInvalid, typeof import("./1.js").HostAccountsInvalid, typeof import("./3.js").HostDeclarationInvalid, typeof import("./3.js").HostEvaluationFailed, typeof import("./1.js").HostOperationNotFound, typeof import("./3.js").HostOperationFailed, typeof import("../../../../app-data/src/index.js").DatabaseLimitExceeded, typeof import("../../../../app-data/src/index.js").DatabaseFieldReserved, typeof import("./1.js").HostToolNotFound, typeof import("./1.js").HostInputInvalid, typeof import("./1.js").HostOutputInvalid, typeof import("./1.js").HostToolBlocked, typeof import("./1.js").HostToolApprovalRequired, typeof import("./1.js").HostToolPolicyFailed, typeof import("../elicitation.js").ElicitationFailed, typeof import("./4.js").HostKindMismatch]>;
|
|
1532
1532
|
}>]>;
|
|
1533
1533
|
readonly catalog: Schema.Struct<{
|
|
1534
1534
|
readonly tools: Schema.$Array<Schema.Struct<{
|
|
@@ -1575,7 +1575,7 @@ export declare const protocol7: {
|
|
|
1575
1575
|
}>>>;
|
|
1576
1576
|
readonly tags: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
|
|
1577
1577
|
readonly skill: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1578
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof import("
|
|
1578
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof import("./1.js").ProviderError, typeof import("./1.js").McpError, typeof import("../skills.js").SkillLoadFailed, typeof import("./3.js").HostDeclarationInvalid, typeof import("./3.js").HostEvaluationFailed]>>;
|
|
1579
1579
|
}>>;
|
|
1580
1580
|
}>;
|
|
1581
1581
|
readonly catalogSummary: Schema.Struct<{
|
|
@@ -1620,7 +1620,7 @@ export declare const protocol7: {
|
|
|
1620
1620
|
}>>>;
|
|
1621
1621
|
readonly tags: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
|
|
1622
1622
|
readonly skill: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1623
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof import("
|
|
1623
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof import("./1.js").ProviderError, typeof import("./1.js").McpError, typeof import("../skills.js").SkillLoadFailed, typeof import("./3.js").HostDeclarationInvalid, typeof import("./3.js").HostEvaluationFailed]>>;
|
|
1624
1624
|
}>>;
|
|
1625
1625
|
}>;
|
|
1626
1626
|
readonly skills: Schema.Union<readonly [Schema.Struct<{
|