apps 0.0.1-beta.0 → 0.0.1-beta.2
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/README.md +97 -4
- package/framework-reference.json +1 -1
- package/js/browser-XIPJGLH2.js +65 -0
- package/js/{chunk-SBKHUC5L.js → chunk-4LPG6RCH.js} +2 -2
- package/js/chunk-5MQZEB6Y.js +172 -0
- package/js/{chunk-7JXHF5IF.js → chunk-BMOIAIVR.js} +1 -1
- package/js/chunk-CZ7CSFO4.js +39 -0
- package/js/chunk-D47C7KG5.js +172 -0
- package/js/{chunk-YDR4CPJA.js → chunk-EVJUVWN2.js} +8 -8
- package/js/chunk-FDNTX5QJ.js +78 -0
- package/js/{chunk-2OTCEKL2.js → chunk-FW5HBOIK.js} +2352 -1493
- package/js/{chunk-EP6AEUZO.js → chunk-FZJOYIZO.js} +1 -1
- package/js/{chunk-VFUZI3NY.js → chunk-HDJH3RPR.js} +4 -4
- package/js/{chunk-WIDTG42X.js → chunk-HDTGZWP2.js} +79 -26
- package/js/{chunk-Q2FD5IBM.js → chunk-J7O55ZV7.js} +298 -37
- package/js/{chunk-X3YBZCJW.js → chunk-JN55AYQH.js} +8 -41
- package/js/chunk-LGIYBDWA.js +85 -0
- package/js/{chunk-D6BKYP2L.js → chunk-M6ZRRIBI.js} +4 -4
- package/js/{chunk-HP7E42X6.js → chunk-MYYEW3RA.js} +767 -249
- package/js/{chunk-3ANFZFCV.js → chunk-OHRT55C4.js} +15 -15
- package/js/{chunk-R6JMJSVT.js → chunk-PLCMJREA.js} +2 -2
- package/js/{chunk-C24KEZXR.js → chunk-PYUYJRSK.js} +36 -2
- package/js/{chunk-W7Q5EOTS.js → chunk-QKHR7BMF.js} +32 -32
- package/js/{chunk-KWTCHVLT.js → chunk-RN2MXB4R.js} +47 -51
- package/js/{chunk-36DNRFZQ.js → chunk-SATWJKN6.js} +1 -1
- package/js/chunk-SWPD52J7.js +35 -0
- package/js/{chunk-BKVL7XAJ.js → chunk-TE4KO4HI.js} +1 -1
- package/js/chunk-UVL56Z6E.js +6641 -0
- package/js/chunk-W7D7WVSY.js +18 -0
- package/js/{chunk-BPEFS4YF.js → chunk-WFSQXYUT.js} +109 -17
- package/js/chunk-YEJOQEII.js +104 -0
- package/js/{chunk-LOKGDT6B.js → chunk-Z5NMEGJN.js} +5 -4
- package/js/{chunk-OWD2YICM.js → chunk-ZCAMUXSG.js} +116 -87
- package/js/chunk-ZJWDMTE3.js +63 -0
- package/js/client.js +11 -11
- package/js/contracts.js +88 -25
- package/js/effect.js +21 -15
- package/js/es-APDZKREY.js +40968 -0
- package/js/graphql.js +224 -121
- package/js/host.js +76 -19
- package/js/index.js +193 -51
- package/js/mcp/effect.js +25 -17
- package/js/mcp/stdio.js +23 -17
- package/js/mcp.js +110 -24
- package/js/openapi.js +3045 -105
- package/js/operations/approval.js +1 -1
- package/js/react.js +4 -4
- package/js/skills/effect.js +11 -0
- package/js/skills.js +894 -0
- package/js/storage/facet.js +7 -7
- package/js/ui/auth/contracts.js +6 -6
- package/js/ui/auth.js +8 -8
- package/js/ui/contracts.js +5 -5
- package/js/ui/serving.js +12 -12
- package/package.json +9 -1
- package/runtime.json +1 -1
- package/types/app-cache/src/contracts/cache.d.ts +119 -0
- package/types/app-cache/src/index.d.ts +93 -0
- package/types/apps/src/contracts/api-response-error.d.ts +43 -0
- package/types/apps/src/contracts/app.d.ts +11 -0
- package/types/apps/src/contracts/cache.d.ts +44 -0
- package/types/apps/src/contracts/dynamic-skills.d.ts +10 -0
- package/types/apps/src/contracts/dynamic-tools.d.ts +13 -0
- package/types/apps/src/contracts/graphql.d.ts +18 -1
- package/types/apps/src/contracts/host.d.ts +54 -525
- package/types/apps/src/contracts/mcp.d.ts +3 -1
- package/types/apps/src/contracts/openapi-compile.d.ts +11 -0
- package/types/apps/src/contracts/openapi-document.d.ts +53 -0
- package/types/apps/src/contracts/openapi.d.ts +156 -30
- package/types/apps/src/contracts/protocol-version.d.ts +6 -0
- package/types/apps/src/contracts/protocols/1.d.ts +1575 -0
- package/types/apps/src/contracts/provider-error.d.ts +15 -0
- package/types/apps/src/contracts/provider.d.ts +18 -1
- package/types/apps/src/contracts/skills.d.ts +122 -0
- package/types/apps/src/contracts/swagger-client.d.ts +29 -0
- package/types/apps/src/graphql.d.ts +6 -6
- package/types/apps/src/host.d.ts +1 -0
- package/types/apps/src/implementation/account-operations.d.ts +122 -3
- package/types/apps/src/implementation/app.d.ts +1 -1
- package/types/apps/src/implementation/cache-session.d.ts +7 -0
- package/types/apps/src/implementation/cache.d.ts +8 -0
- package/types/apps/src/implementation/catalog-cache.d.ts +29 -0
- package/types/apps/src/implementation/dynamic-skills.d.ts +7 -0
- package/types/apps/src/implementation/dynamic-tools.d.ts +8 -0
- package/types/apps/src/implementation/elicitation.d.ts +12 -12
- package/types/apps/src/implementation/git.d.ts +25 -0
- package/types/apps/src/implementation/graphql-catalog.d.ts +10 -0
- package/types/apps/src/implementation/graphql.d.ts +81 -3
- package/types/apps/src/implementation/inflate.d.ts +16 -0
- package/types/apps/src/implementation/input-problems.d.ts +3 -0
- package/types/apps/src/implementation/mcp-call.d.ts +3 -2
- package/types/apps/src/implementation/mcp-catalog.d.ts +12 -0
- package/types/apps/src/implementation/mcp-client.d.ts +9 -8
- package/types/apps/src/implementation/mcp-stdio.d.ts +1 -1
- package/types/apps/src/implementation/mcp-tools.d.ts +6 -3
- package/types/apps/src/implementation/mcp.d.ts +39 -2
- package/types/apps/src/implementation/openapi-compile.d.ts +119 -0
- package/types/apps/src/implementation/openapi-document.d.ts +51 -0
- package/types/apps/src/implementation/openapi-names.d.ts +18 -0
- package/types/apps/src/implementation/openapi-request.d.ts +10 -4
- package/types/apps/src/implementation/openapi-source.d.ts +40 -0
- package/types/apps/src/implementation/openapi.d.ts +39 -3
- package/types/apps/src/implementation/provider-error.d.ts +10 -0
- package/types/apps/src/implementation/schema.d.ts +6 -5
- package/types/apps/src/implementation/skill-files.d.ts +10 -0
- package/types/apps/src/implementation/skills.d.ts +43 -0
- package/types/apps/src/implementation/swagger-client.d.ts +28 -0
- package/types/apps/src/index.d.ts +7 -0
- package/types/apps/src/mcp.d.ts +5 -5
- package/types/apps/src/openapi.d.ts +3 -1
- package/types/apps/src/skills.d.ts +75 -0
- package/types/telemetry/src/config.d.ts +2 -0
- package/js/chunk-22WRQZT7.js +0 -389
- package/js/chunk-MLKGABMK.js +0 -9
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
export * from "./skills.js";
|
|
2
|
+
import { SkillLoadFailed, type SkillFile } from "./skills.js";
|
|
3
|
+
import { ProviderError } from "./provider-error.js";
|
|
4
|
+
import { McpError } from "./mcp.js";
|
|
5
|
+
import { OpenapiResponseError } from "./api-response-error.js";
|
|
6
|
+
export { ApiErrorResponse, OpenapiResponseError } from "./api-response-error.js";
|
|
7
|
+
export { ProviderError } from "./provider-error.js";
|
|
8
|
+
export { McpError } from "./mcp.js";
|
|
1
9
|
import { WorkflowFailure, type WorkflowExecution, type WorkflowReplay, type WorkflowHostControls } from "./workflows.js";
|
|
2
10
|
export * from "./workflows.js";
|
|
3
11
|
/** Portable framework dispatch contracts. Requests never carry account bindings. */
|
|
@@ -11,345 +19,24 @@ export { McpClientLimits, defaultMcpClientLimits } from "./mcp.js";
|
|
|
11
19
|
export * from "./webhook-protocol.js";
|
|
12
20
|
export { AccountId, HttpUrl } from "./schema.js";
|
|
13
21
|
export { OAuthClientAuth, OAuthSecretClientAuth } from "./provider.js";
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
|
|
23
|
-
readonly tokenUrl: Schema.optionalKey<Schema.Never>;
|
|
24
|
-
readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
25
|
-
readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
|
|
26
|
-
readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
|
|
27
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
28
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
29
|
-
}>, Schema.Struct<{
|
|
30
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
31
|
-
readonly authorizationUrl: Schema.String;
|
|
32
|
-
readonly tokenUrl: Schema.String;
|
|
33
|
-
readonly scopes: Schema.$Array<Schema.String>;
|
|
34
|
-
readonly discover: Schema.optionalKey<Schema.Never>;
|
|
35
|
-
readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
|
|
36
|
-
readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
|
|
37
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
38
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
39
|
-
}>, Schema.Struct<{
|
|
40
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
41
|
-
readonly grant: Schema.Literal<"client_credentials">;
|
|
42
|
-
readonly discover: Schema.String;
|
|
43
|
-
readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
|
|
44
|
-
readonly tokenUrl: Schema.optionalKey<Schema.Never>;
|
|
45
|
-
readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
46
|
-
readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
|
|
47
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
48
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
49
|
-
}>, Schema.Struct<{
|
|
50
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
51
|
-
readonly grant: Schema.Literal<"client_credentials">;
|
|
52
|
-
readonly tokenUrl: Schema.String;
|
|
53
|
-
readonly scopes: Schema.$Array<Schema.String>;
|
|
54
|
-
readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
|
|
55
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
56
|
-
readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
|
|
57
|
-
readonly discover: Schema.optionalKey<Schema.Never>;
|
|
58
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
59
|
-
}>]>;
|
|
60
|
-
/** Serializable declaration of a provider's named authentication methods. */
|
|
61
|
-
export declare const DeclaredProvider: Schema.Struct<{
|
|
62
|
-
readonly name: Schema.NonEmptyString;
|
|
63
|
-
readonly auth: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
|
|
64
|
-
readonly type: Schema.Literal<"secrets">;
|
|
65
|
-
readonly label: Schema.String;
|
|
66
|
-
readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
67
|
-
}>, Schema.Struct<{
|
|
68
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
69
|
-
readonly discover: Schema.String;
|
|
70
|
-
readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
|
|
71
|
-
readonly tokenUrl: Schema.optionalKey<Schema.Never>;
|
|
72
|
-
readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
73
|
-
readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
|
|
74
|
-
readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
|
|
75
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
76
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
77
|
-
}>, Schema.Struct<{
|
|
78
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
79
|
-
readonly authorizationUrl: Schema.String;
|
|
80
|
-
readonly tokenUrl: Schema.String;
|
|
81
|
-
readonly scopes: Schema.$Array<Schema.String>;
|
|
82
|
-
readonly discover: Schema.optionalKey<Schema.Never>;
|
|
83
|
-
readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
|
|
84
|
-
readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
|
|
85
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
86
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
87
|
-
}>, Schema.Struct<{
|
|
88
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
89
|
-
readonly grant: Schema.Literal<"client_credentials">;
|
|
90
|
-
readonly discover: Schema.String;
|
|
91
|
-
readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
|
|
92
|
-
readonly tokenUrl: Schema.optionalKey<Schema.Never>;
|
|
93
|
-
readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
94
|
-
readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
|
|
95
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
96
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
97
|
-
}>, Schema.Struct<{
|
|
98
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
99
|
-
readonly grant: Schema.Literal<"client_credentials">;
|
|
100
|
-
readonly tokenUrl: Schema.String;
|
|
101
|
-
readonly scopes: Schema.$Array<Schema.String>;
|
|
102
|
-
readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
|
|
103
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
104
|
-
readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
|
|
105
|
-
readonly discover: Schema.optionalKey<Schema.Never>;
|
|
106
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
107
|
-
}>]>>;
|
|
108
|
-
}>;
|
|
109
|
-
/** Credential-free provider declaration; content matching remains host policy. */
|
|
110
|
-
export type DeclaredProvider = typeof DeclaredProvider.Type;
|
|
111
|
-
/** Account slots available without binding accounts or evaluating the app factory. */
|
|
112
|
-
export declare const DeclaredRequirements: Schema.Struct<{
|
|
113
|
-
readonly database: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
|
|
114
|
-
readonly fields: Schema.$Record<Schema.String, Schema.Struct<{
|
|
115
|
-
readonly kind: Schema.Literals<readonly ["string", "number", "boolean", "id", "userId"]>;
|
|
116
|
-
readonly optional: Schema.optional<Schema.Boolean>;
|
|
117
|
-
readonly default: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean]>>;
|
|
118
|
-
readonly references: Schema.optional<Schema.String>;
|
|
119
|
-
}>>;
|
|
120
|
-
readonly indexes: Schema.$Array<Schema.Struct<{
|
|
121
|
-
readonly name: Schema.String;
|
|
122
|
-
readonly fields: Schema.NonEmptyArray<Schema.String>;
|
|
123
|
-
}>>;
|
|
124
|
-
}>>>;
|
|
125
|
-
readonly accounts: Schema.$Record<Schema.NonEmptyString, Schema.Struct<{
|
|
126
|
-
readonly definition: Schema.Struct<{
|
|
127
|
-
readonly name: Schema.NonEmptyString;
|
|
128
|
-
readonly auth: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
|
|
129
|
-
readonly type: Schema.Literal<"secrets">;
|
|
130
|
-
readonly label: Schema.String;
|
|
131
|
-
readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
132
|
-
}>, Schema.Struct<{
|
|
133
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
134
|
-
readonly discover: Schema.String;
|
|
135
|
-
readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
|
|
136
|
-
readonly tokenUrl: Schema.optionalKey<Schema.Never>;
|
|
137
|
-
readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
138
|
-
readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
|
|
139
|
-
readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
|
|
140
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
141
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
142
|
-
}>, Schema.Struct<{
|
|
143
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
144
|
-
readonly authorizationUrl: Schema.String;
|
|
145
|
-
readonly tokenUrl: Schema.String;
|
|
146
|
-
readonly scopes: Schema.$Array<Schema.String>;
|
|
147
|
-
readonly discover: Schema.optionalKey<Schema.Never>;
|
|
148
|
-
readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
|
|
149
|
-
readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
|
|
150
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
151
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
152
|
-
}>, Schema.Struct<{
|
|
153
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
154
|
-
readonly grant: Schema.Literal<"client_credentials">;
|
|
155
|
-
readonly discover: Schema.String;
|
|
156
|
-
readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
|
|
157
|
-
readonly tokenUrl: Schema.optionalKey<Schema.Never>;
|
|
158
|
-
readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
159
|
-
readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
|
|
160
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
161
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
162
|
-
}>, Schema.Struct<{
|
|
163
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
164
|
-
readonly grant: Schema.Literal<"client_credentials">;
|
|
165
|
-
readonly tokenUrl: Schema.String;
|
|
166
|
-
readonly scopes: Schema.$Array<Schema.String>;
|
|
167
|
-
readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
|
|
168
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
169
|
-
readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
|
|
170
|
-
readonly discover: Schema.optionalKey<Schema.Never>;
|
|
171
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
172
|
-
}>]>>;
|
|
173
|
-
}>;
|
|
174
|
-
readonly cardinality: Schema.Literals<readonly ["one", "many"]>;
|
|
175
|
-
}>>;
|
|
176
|
-
}>;
|
|
177
|
-
/** Parsed declared account requirements. */
|
|
178
|
-
export type DeclaredRequirements = typeof DeclaredRequirements.Type;
|
|
179
|
-
/** Host-resolved credentials for one stable saved account. Never a request DTO. */
|
|
180
|
-
export declare const ResolvedAccount: Schema.Struct<{
|
|
181
|
-
readonly id: Schema.brand<Schema.String, "acc">;
|
|
182
|
-
readonly provider: Schema.Struct<{
|
|
183
|
-
readonly name: Schema.NonEmptyString;
|
|
184
|
-
readonly auth: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
|
|
185
|
-
readonly type: Schema.Literal<"secrets">;
|
|
186
|
-
readonly label: Schema.String;
|
|
187
|
-
readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
188
|
-
}>, Schema.Struct<{
|
|
189
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
190
|
-
readonly discover: Schema.String;
|
|
191
|
-
readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
|
|
192
|
-
readonly tokenUrl: Schema.optionalKey<Schema.Never>;
|
|
193
|
-
readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
194
|
-
readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
|
|
195
|
-
readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
|
|
196
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
197
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
198
|
-
}>, Schema.Struct<{
|
|
199
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
200
|
-
readonly authorizationUrl: Schema.String;
|
|
201
|
-
readonly tokenUrl: Schema.String;
|
|
202
|
-
readonly scopes: Schema.$Array<Schema.String>;
|
|
203
|
-
readonly discover: Schema.optionalKey<Schema.Never>;
|
|
204
|
-
readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
|
|
205
|
-
readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
|
|
206
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
207
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
208
|
-
}>, Schema.Struct<{
|
|
209
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
210
|
-
readonly grant: Schema.Literal<"client_credentials">;
|
|
211
|
-
readonly discover: Schema.String;
|
|
212
|
-
readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
|
|
213
|
-
readonly tokenUrl: Schema.optionalKey<Schema.Never>;
|
|
214
|
-
readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
215
|
-
readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
|
|
216
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
217
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
218
|
-
}>, Schema.Struct<{
|
|
219
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
220
|
-
readonly grant: Schema.Literal<"client_credentials">;
|
|
221
|
-
readonly tokenUrl: Schema.String;
|
|
222
|
-
readonly scopes: Schema.$Array<Schema.String>;
|
|
223
|
-
readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
|
|
224
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
225
|
-
readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
|
|
226
|
-
readonly discover: Schema.optionalKey<Schema.Never>;
|
|
227
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
228
|
-
}>]>>;
|
|
229
|
-
}>;
|
|
230
|
-
readonly method: Schema.NonEmptyString;
|
|
231
|
-
readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
232
|
-
}>;
|
|
233
|
-
/** Parsed host account binding. */
|
|
234
|
-
export type ResolvedAccount = typeof ResolvedAccount.Type;
|
|
235
|
-
/** Full saved selection resolved by the trusted caller; [] differs from a missing slot. */
|
|
236
|
-
export declare const ResolvedAccounts: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
|
|
237
|
-
readonly id: Schema.brand<Schema.String, "acc">;
|
|
238
|
-
readonly provider: Schema.Struct<{
|
|
239
|
-
readonly name: Schema.NonEmptyString;
|
|
240
|
-
readonly auth: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
|
|
241
|
-
readonly type: Schema.Literal<"secrets">;
|
|
242
|
-
readonly label: Schema.String;
|
|
243
|
-
readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
244
|
-
}>, Schema.Struct<{
|
|
245
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
246
|
-
readonly discover: Schema.String;
|
|
247
|
-
readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
|
|
248
|
-
readonly tokenUrl: Schema.optionalKey<Schema.Never>;
|
|
249
|
-
readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
250
|
-
readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
|
|
251
|
-
readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
|
|
252
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
253
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
254
|
-
}>, Schema.Struct<{
|
|
255
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
256
|
-
readonly authorizationUrl: Schema.String;
|
|
257
|
-
readonly tokenUrl: Schema.String;
|
|
258
|
-
readonly scopes: Schema.$Array<Schema.String>;
|
|
259
|
-
readonly discover: Schema.optionalKey<Schema.Never>;
|
|
260
|
-
readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
|
|
261
|
-
readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
|
|
262
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
263
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
264
|
-
}>, Schema.Struct<{
|
|
265
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
266
|
-
readonly grant: Schema.Literal<"client_credentials">;
|
|
267
|
-
readonly discover: Schema.String;
|
|
268
|
-
readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
|
|
269
|
-
readonly tokenUrl: Schema.optionalKey<Schema.Never>;
|
|
270
|
-
readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
271
|
-
readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
|
|
272
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
273
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
274
|
-
}>, Schema.Struct<{
|
|
275
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
276
|
-
readonly grant: Schema.Literal<"client_credentials">;
|
|
277
|
-
readonly tokenUrl: Schema.String;
|
|
278
|
-
readonly scopes: Schema.$Array<Schema.String>;
|
|
279
|
-
readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
|
|
280
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
281
|
-
readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
|
|
282
|
-
readonly discover: Schema.optionalKey<Schema.Never>;
|
|
283
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
284
|
-
}>]>>;
|
|
285
|
-
}>;
|
|
286
|
-
readonly method: Schema.NonEmptyString;
|
|
287
|
-
readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
288
|
-
}>, Schema.$Array<Schema.Struct<{
|
|
289
|
-
readonly id: Schema.brand<Schema.String, "acc">;
|
|
290
|
-
readonly provider: Schema.Struct<{
|
|
291
|
-
readonly name: Schema.NonEmptyString;
|
|
292
|
-
readonly auth: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
|
|
293
|
-
readonly type: Schema.Literal<"secrets">;
|
|
294
|
-
readonly label: Schema.String;
|
|
295
|
-
readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
296
|
-
}>, Schema.Struct<{
|
|
297
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
298
|
-
readonly discover: Schema.String;
|
|
299
|
-
readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
|
|
300
|
-
readonly tokenUrl: Schema.optionalKey<Schema.Never>;
|
|
301
|
-
readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
302
|
-
readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
|
|
303
|
-
readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
|
|
304
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
305
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
306
|
-
}>, Schema.Struct<{
|
|
307
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
308
|
-
readonly authorizationUrl: Schema.String;
|
|
309
|
-
readonly tokenUrl: Schema.String;
|
|
310
|
-
readonly scopes: Schema.$Array<Schema.String>;
|
|
311
|
-
readonly discover: Schema.optionalKey<Schema.Never>;
|
|
312
|
-
readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
|
|
313
|
-
readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
|
|
314
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
315
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
316
|
-
}>, Schema.Struct<{
|
|
317
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
318
|
-
readonly grant: Schema.Literal<"client_credentials">;
|
|
319
|
-
readonly discover: Schema.String;
|
|
320
|
-
readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
|
|
321
|
-
readonly tokenUrl: Schema.optionalKey<Schema.Never>;
|
|
322
|
-
readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
323
|
-
readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
|
|
324
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
325
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
326
|
-
}>, Schema.Struct<{
|
|
327
|
-
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
328
|
-
readonly grant: Schema.Literal<"client_credentials">;
|
|
329
|
-
readonly tokenUrl: Schema.String;
|
|
330
|
-
readonly scopes: Schema.$Array<Schema.String>;
|
|
331
|
-
readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
|
|
332
|
-
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
333
|
-
readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
|
|
334
|
-
readonly discover: Schema.optionalKey<Schema.Never>;
|
|
335
|
-
readonly type: Schema.Literal<"oauth2">;
|
|
336
|
-
}>]>>;
|
|
337
|
-
}>;
|
|
338
|
-
readonly method: Schema.NonEmptyString;
|
|
339
|
-
readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
340
|
-
}>>]>>;
|
|
22
|
+
/**
|
|
23
|
+
* The host protocol this framework speaks and its wire schemas. A later protocol replaces this
|
|
24
|
+
* re-export; released protocol modules stay unchanged for host adapters.
|
|
25
|
+
*/
|
|
26
|
+
export { frameworkProtocol } from "./protocol-version.js";
|
|
27
|
+
export { protocol1 } from "./protocols/1.js";
|
|
28
|
+
import { HostAccountsInvalid, HostDeclarationInvalid, HostEvaluationFailed, HostInputInvalid, HostOperationFailed, HostOperationNotFound, HostOutputInvalid, HostRequestInvalid, HostToolApprovalRequired, HostToolBlocked, HostToolNotFound, HostToolPolicyFailed, SkillSources, type InvocationDeadline, ResolvedAccounts, type SkillCatalogResponse, type TrustedToolApproval } from "./protocols/1.js";
|
|
29
|
+
export { DeclaredAuthMethod, DeclaredProvider, DeclaredRequirements, ResolvedAccount, ResolvedAccounts, TrustedToolApproval, InvocationDeadline, HostedTool, HostedToolSummary, SkillSources, SkillCatalogResponse, HostRequest, HostRequestInvalid, HostAccountsInvalid, HostDeclarationInvalid, HostEvaluationFailed, HostOperationNotFound, HostOperationFailed, HostToolNotFound, InputProblem, maxInputProblems, HostInputInvalid, HostToolBlocked, HostToolApprovalRequired, HostToolPolicyFailed, HostOutputInvalid, HostError, HostResponse, HostInvocation, } from "./protocols/1.js";
|
|
341
30
|
/** Raw host inputs; the host boundary parses and redacts these immediately. */
|
|
342
31
|
export type ResolvedAccountsInput = typeof ResolvedAccounts.Encoded;
|
|
343
|
-
/** Parsed host selections, kept redacted until native account binding. */
|
|
344
|
-
export type ResolvedAccounts = typeof ResolvedAccounts.Type;
|
|
345
|
-
/** Trusted approval for one decoded call. Never accepted in public command JSON. */
|
|
346
|
-
export declare const TrustedToolApproval: Schema.Struct<{
|
|
347
|
-
readonly tool: Schema.NonEmptyString;
|
|
348
|
-
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
349
|
-
}>;
|
|
350
|
-
export type TrustedToolApproval = typeof TrustedToolApproval.Type;
|
|
351
32
|
/** Trusted invocation context, supplied separately from the Request. */
|
|
352
33
|
export interface HostContext {
|
|
34
|
+
/** Trusted host deadline; never accepted in public operation JSON. */
|
|
35
|
+
readonly deadline?: typeof InvocationDeadline.Type;
|
|
36
|
+
/** Host-owned cache storage and refresh lifetime, separate from app database transactions. */
|
|
37
|
+
readonly cache?: import("./cache.js").HostCache;
|
|
38
|
+
/** Packaged app text files supplied by the build bridge. Direct hosts may omit them for an empty package. */
|
|
39
|
+
readonly files?: readonly SkillFile[];
|
|
353
40
|
/** Private delivery capability. It is never accepted in public request JSON or stored in a build. */
|
|
354
41
|
readonly workflowControls?: WorkflowHostControls;
|
|
355
42
|
readonly workflow?: WorkflowExecution;
|
|
@@ -361,207 +48,49 @@ export interface HostContext {
|
|
|
361
48
|
readonly storage?: AppStorage;
|
|
362
49
|
readonly accounts: Redacted.Redacted<ResolvedAccounts>;
|
|
363
50
|
}
|
|
364
|
-
/**
|
|
365
|
-
export declare const
|
|
366
|
-
readonly
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
readonly timezone: Schema.NonEmptyString;
|
|
376
|
-
}>;
|
|
377
|
-
}>]>;
|
|
378
|
-
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
379
|
-
}>>>;
|
|
380
|
-
readonly name: Schema.NonEmptyString;
|
|
381
|
-
readonly description: Schema.String;
|
|
382
|
-
readonly inputSchema: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
383
|
-
readonly readOnly: Schema.optionalKey<Schema.Boolean>;
|
|
384
|
-
readonly title: Schema.optionalKey<Schema.String>;
|
|
385
|
-
readonly outputSchema: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
386
|
-
readonly annotations: Schema.optionalKey<Schema.Struct<{
|
|
387
|
-
readonly title: Schema.optionalKey<Schema.String>;
|
|
388
|
-
readonly readOnlyHint: Schema.optionalKey<Schema.Boolean>;
|
|
389
|
-
readonly destructiveHint: Schema.optionalKey<Schema.Boolean>;
|
|
390
|
-
readonly idempotentHint: Schema.optionalKey<Schema.Boolean>;
|
|
391
|
-
readonly openWorldHint: Schema.optionalKey<Schema.Boolean>;
|
|
392
|
-
}>>;
|
|
393
|
-
readonly _meta: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
394
|
-
}>;
|
|
395
|
-
/** Parsed live tool description. */
|
|
396
|
-
export type HostedTool = typeof HostedTool.Type;
|
|
397
|
-
/** Framework-owned dispatch, independent of app-authored HTTP routing. */
|
|
398
|
-
export declare const HostRequest: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
399
|
-
readonly operation: Schema.Literal<"workflows">;
|
|
400
|
-
}>, Schema.Struct<{
|
|
401
|
-
readonly operation: Schema.Literal<"workflow-validate">;
|
|
402
|
-
readonly name: Schema.NonEmptyString;
|
|
403
|
-
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
404
|
-
}>, Schema.Struct<{
|
|
405
|
-
readonly operation: Schema.Literal<"workflow-run">;
|
|
406
|
-
readonly name: Schema.NonEmptyString;
|
|
407
|
-
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
408
|
-
}>]>, Schema.Union<readonly [Schema.Struct<{
|
|
409
|
-
readonly operation: Schema.Literal<"webhooks">;
|
|
410
|
-
}>, Schema.Struct<{
|
|
411
|
-
readonly name: Schema.NonEmptyString;
|
|
412
|
-
readonly subscriptionId: Schema.NonEmptyString;
|
|
413
|
-
readonly sourceAccount: Schema.brand<Schema.String, "acc">;
|
|
414
|
-
readonly callbackUrl: Schema.String;
|
|
415
|
-
readonly secret: Schema.String;
|
|
416
|
-
readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
417
|
-
readonly operation: Schema.Literal<"webhook-validate">;
|
|
418
|
-
}>, Schema.Struct<{
|
|
419
|
-
readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
420
|
-
readonly name: Schema.NonEmptyString;
|
|
421
|
-
readonly subscriptionId: Schema.NonEmptyString;
|
|
422
|
-
readonly sourceAccount: Schema.brand<Schema.String, "acc">;
|
|
423
|
-
readonly callbackUrl: Schema.String;
|
|
424
|
-
readonly secret: Schema.String;
|
|
425
|
-
readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
426
|
-
readonly operation: Schema.Literal<"webhook-complete">;
|
|
427
|
-
}>, Schema.Struct<{
|
|
428
|
-
readonly name: Schema.NonEmptyString;
|
|
429
|
-
readonly subscriptionId: Schema.NonEmptyString;
|
|
430
|
-
readonly sourceAccount: Schema.brand<Schema.String, "acc">;
|
|
431
|
-
readonly callbackUrl: Schema.String;
|
|
432
|
-
readonly secret: Schema.String;
|
|
433
|
-
readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
434
|
-
readonly operation: Schema.Literal<"webhook-register">;
|
|
435
|
-
}>, Schema.Struct<{
|
|
436
|
-
readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
437
|
-
readonly name: Schema.NonEmptyString;
|
|
438
|
-
readonly subscriptionId: Schema.NonEmptyString;
|
|
439
|
-
readonly sourceAccount: Schema.brand<Schema.String, "acc">;
|
|
440
|
-
readonly callbackUrl: Schema.String;
|
|
441
|
-
readonly secret: Schema.String;
|
|
442
|
-
readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
443
|
-
readonly operation: Schema.Literal<"webhook-unregister">;
|
|
444
|
-
}>, Schema.Struct<{
|
|
445
|
-
readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
446
|
-
readonly request: Schema.Struct<{
|
|
447
|
-
readonly url: Schema.String;
|
|
448
|
-
readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>;
|
|
449
|
-
readonly headers: Schema.$Record<Schema.String, Schema.String>;
|
|
450
|
-
readonly body: Schema.String;
|
|
451
|
-
}>;
|
|
452
|
-
readonly name: Schema.NonEmptyString;
|
|
453
|
-
readonly subscriptionId: Schema.NonEmptyString;
|
|
454
|
-
readonly sourceAccount: Schema.brand<Schema.String, "acc">;
|
|
455
|
-
readonly callbackUrl: Schema.String;
|
|
456
|
-
readonly secret: Schema.String;
|
|
457
|
-
readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
458
|
-
readonly operation: Schema.Literal<"webhook-handle">;
|
|
459
|
-
}>]>, Schema.Struct<{
|
|
460
|
-
readonly operation: Schema.Literal<"requirements">;
|
|
461
|
-
}>, Schema.Struct<{
|
|
462
|
-
readonly operation: Schema.Literal<"inspect">;
|
|
463
|
-
}>, Schema.Struct<{
|
|
464
|
-
readonly operation: Schema.Literal<"query">;
|
|
465
|
-
readonly name: Schema.NonEmptyString;
|
|
466
|
-
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
467
|
-
}>, Schema.Struct<{
|
|
468
|
-
readonly operation: Schema.Literal<"mutate">;
|
|
469
|
-
readonly name: Schema.NonEmptyString;
|
|
470
|
-
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
471
|
-
}>, Schema.Struct<{
|
|
472
|
-
readonly operation: Schema.Literal<"call">;
|
|
473
|
-
readonly tool: Schema.NonEmptyString;
|
|
474
|
-
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
475
|
-
}>]>;
|
|
476
|
-
/** Parsed portable dispatch request. */
|
|
477
|
-
export type HostRequest = typeof HostRequest.Type;
|
|
478
|
-
declare const HostRequestInvalid_base: Schema.Class<HostRequestInvalid, Schema.TaggedStruct<"HostRequestInvalid", {}>, import("effect/Cause").YieldableError>;
|
|
479
|
-
/** The dispatch request did not match the protocol. */
|
|
480
|
-
export declare class HostRequestInvalid extends HostRequestInvalid_base {
|
|
481
|
-
}
|
|
482
|
-
declare const HostAccountsInvalid_base: Schema.Class<HostAccountsInvalid, Schema.TaggedStruct<"HostAccountsInvalid", {}>, import("effect/Cause").YieldableError>;
|
|
483
|
-
/** Host-supplied accounts did not satisfy the declared slots or native method schemas. */
|
|
484
|
-
export declare class HostAccountsInvalid extends HostAccountsInvalid_base {
|
|
485
|
-
}
|
|
486
|
-
declare const HostDeclarationInvalid_base: Schema.Class<HostDeclarationInvalid, Schema.TaggedStruct<"HostDeclarationInvalid", {}>, import("effect/Cause").YieldableError>;
|
|
487
|
-
/** The module or declared capability shape could not be hosted. */
|
|
488
|
-
export declare class HostDeclarationInvalid extends HostDeclarationInvalid_base {
|
|
489
|
-
}
|
|
490
|
-
declare const HostEvaluationFailed_base: Schema.Class<HostEvaluationFailed, Schema.TaggedStruct<"HostEvaluationFailed", {}>, import("effect/Cause").YieldableError>;
|
|
491
|
-
/** Fresh app evaluation failed before calling a tool. */
|
|
492
|
-
export declare class HostEvaluationFailed extends HostEvaluationFailed_base {
|
|
493
|
-
}
|
|
494
|
-
declare const HostOperationNotFound_base: Schema.Class<HostOperationNotFound, Schema.TaggedStruct<"HostOperationNotFound", {}>, import("effect/Cause").YieldableError>;
|
|
495
|
-
/** No query or mutation matched the requested name. */
|
|
496
|
-
export declare class HostOperationNotFound extends HostOperationNotFound_base {
|
|
497
|
-
}
|
|
498
|
-
declare const HostOperationFailed_base: Schema.Class<HostOperationFailed, Schema.TaggedStruct<"HostOperationFailed", {}>, import("effect/Cause").YieldableError>;
|
|
499
|
-
/** An app operation failed. Raw author failures remain private. */
|
|
500
|
-
export declare class HostOperationFailed extends HostOperationFailed_base {
|
|
501
|
-
}
|
|
502
|
-
declare const HostToolNotFound_base: Schema.Class<HostToolNotFound, Schema.TaggedStruct<"HostToolNotFound", {}>, import("effect/Cause").YieldableError>;
|
|
503
|
-
/** The freshly evaluated catalog did not contain the requested tool. */
|
|
504
|
-
export declare class HostToolNotFound extends HostToolNotFound_base {
|
|
505
|
-
}
|
|
506
|
-
declare const HostInputInvalid_base: Schema.Class<HostInputInvalid, Schema.TaggedStruct<"HostInputInvalid", {}>, import("effect/Cause").YieldableError>;
|
|
507
|
-
/** Native input decoding failed; supplied values are omitted. */
|
|
508
|
-
export declare class HostInputInvalid extends HostInputInvalid_base {
|
|
509
|
-
}
|
|
510
|
-
declare const HostToolBlocked_base: Schema.Class<HostToolBlocked, Schema.TaggedStruct<"HostToolBlocked", {}>, import("effect/Cause").YieldableError>;
|
|
511
|
-
/** The tool's approval policy blocked this call before its tool body ran. */
|
|
512
|
-
export declare class HostToolBlocked extends HostToolBlocked_base {
|
|
513
|
-
}
|
|
514
|
-
declare const HostToolApprovalRequired_base: Schema.Class<HostToolApprovalRequired, Schema.TaggedStruct<"HostToolApprovalRequired", {
|
|
515
|
-
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
516
|
-
readonly elicitation: Schema.Struct<{
|
|
517
|
-
readonly requestedSchema: Schema.Struct<{
|
|
518
|
-
readonly type: Schema.Literal<"object">;
|
|
519
|
-
readonly properties: Schema.$Record<Schema.String, Schema.Never>;
|
|
520
|
-
}>;
|
|
521
|
-
readonly mode: Schema.Literal<"form">;
|
|
522
|
-
readonly _meta: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
523
|
-
readonly message: Schema.String;
|
|
524
|
-
}>;
|
|
525
|
-
}>, import("effect/Cause").YieldableError>;
|
|
526
|
-
/** Policy elicitation plus decoded input. No tool body ran; the host owns delivery and resumption. */
|
|
527
|
-
export declare class HostToolApprovalRequired extends HostToolApprovalRequired_base {
|
|
528
|
-
}
|
|
529
|
-
declare const HostToolPolicyFailed_base: Schema.Class<HostToolPolicyFailed, Schema.TaggedStruct<"HostToolPolicyFailed", {}>, import("effect/Cause").YieldableError>;
|
|
530
|
-
/** The tool's approval policy failed or returned an invalid decision. Author failures remain private. */
|
|
531
|
-
export declare class HostToolPolicyFailed extends HostToolPolicyFailed_base {
|
|
532
|
-
}
|
|
533
|
-
declare const HostOutputInvalid_base: Schema.Class<HostOutputInvalid, Schema.TaggedStruct<"HostOutputInvalid", {}>, import("effect/Cause").YieldableError>;
|
|
534
|
-
/** A tool result was not JSON; the result is never included in the error. */
|
|
535
|
-
export declare class HostOutputInvalid extends HostOutputInvalid_base {
|
|
51
|
+
/** Skill commands. Send sources only to builds that declare skillSources. */
|
|
52
|
+
export declare const skillsCommand: (sources: boolean) => {
|
|
53
|
+
readonly operation: "skills";
|
|
54
|
+
readonly sources: true;
|
|
55
|
+
} | {
|
|
56
|
+
readonly operation: "skills";
|
|
57
|
+
readonly sources?: never;
|
|
58
|
+
};
|
|
59
|
+
export interface SkillCatalog {
|
|
60
|
+
readonly skills: SkillSources["skills"];
|
|
61
|
+
readonly dynamic?: boolean;
|
|
536
62
|
}
|
|
63
|
+
export declare const skillCatalog: (response: typeof SkillCatalogResponse.Type) => SkillCatalog;
|
|
64
|
+
/**
|
|
65
|
+
* Inspection commands. Send detail or tools only to builds that declare toolIndex,
|
|
66
|
+
* and scheduled only to builds that declare scheduledTools.
|
|
67
|
+
*/
|
|
68
|
+
export declare const inspectCommand: (tools?: readonly string[], scheduled?: true) => {
|
|
69
|
+
scheduled?: true;
|
|
70
|
+
tools?: string[];
|
|
71
|
+
operation: "inspect";
|
|
72
|
+
};
|
|
73
|
+
export declare const indexCommand: {
|
|
74
|
+
readonly operation: "inspect";
|
|
75
|
+
readonly detail: "summary";
|
|
76
|
+
};
|
|
77
|
+
/** Keep only the requested tools from an inspection that may have described every tool. */
|
|
78
|
+
export declare const selectTools: (tools?: readonly string[]) => <A extends {
|
|
79
|
+
readonly name: string;
|
|
80
|
+
}>(all: readonly A[]) => readonly A[];
|
|
537
81
|
/** Declaration reads do not bind accounts or evaluate the app factory. */
|
|
538
82
|
export declare const HostRequirementsError: Schema.Union<readonly [typeof HostRequestInvalid, typeof HostDeclarationInvalid]>;
|
|
539
83
|
/** Inspection can fail while binding accounts or evaluating the live definition. */
|
|
540
|
-
export declare const HostInspectError: Schema.Union<readonly [typeof HostRequestInvalid, typeof HostDeclarationInvalid, typeof HostAccountsInvalid, typeof HostEvaluationFailed]>;
|
|
84
|
+
export declare const HostInspectError: Schema.Union<readonly [typeof ProviderError, typeof McpError, typeof SkillLoadFailed, typeof HostRequestInvalid, typeof HostDeclarationInvalid, typeof HostAccountsInvalid, typeof HostEvaluationFailed]>;
|
|
541
85
|
/** Tool invocation adds lookup, input, execution and output failures to inspection. */
|
|
542
|
-
export declare const HostCallError: Schema.Union<readonly [typeof WorkflowFailure, Schema.Union<readonly [typeof HostRequestInvalid, typeof HostDeclarationInvalid, typeof HostAccountsInvalid, typeof HostEvaluationFailed]>, typeof HostToolNotFound, typeof HostOperationNotFound, typeof HostOperationFailed, typeof HostInputInvalid, typeof HostOutputInvalid, typeof HostToolBlocked, typeof HostToolApprovalRequired, typeof HostToolPolicyFailed, typeof ElicitationFailed]>;
|
|
86
|
+
export declare const HostCallError: Schema.Union<readonly [typeof OpenapiResponseError, typeof WorkflowFailure, Schema.Union<readonly [typeof ProviderError, typeof McpError, typeof SkillLoadFailed, typeof HostRequestInvalid, typeof HostDeclarationInvalid, typeof HostAccountsInvalid, typeof HostEvaluationFailed]>, typeof HostToolNotFound, typeof HostOperationNotFound, typeof HostOperationFailed, typeof HostInputInvalid, typeof HostOutputInvalid, typeof HostToolBlocked, typeof HostToolApprovalRequired, typeof HostToolPolicyFailed, typeof ElicitationFailed]>;
|
|
543
87
|
/** Queries, mutations and agent calls use the same operation failures. */
|
|
544
|
-
export declare const HostDataError: Schema.Union<readonly [typeof WorkflowFailure, Schema.Union<readonly [typeof HostRequestInvalid, typeof HostDeclarationInvalid, typeof HostAccountsInvalid, typeof HostEvaluationFailed]>, typeof HostToolNotFound, typeof HostOperationNotFound, typeof HostOperationFailed, typeof HostInputInvalid, typeof HostOutputInvalid, typeof HostToolBlocked, typeof HostToolApprovalRequired, typeof HostToolPolicyFailed, typeof ElicitationFailed]>;
|
|
545
|
-
/** Safe error envelope; no author exception, source, account fields or stack is serialized. */
|
|
546
|
-
export declare const HostError: Schema.Union<readonly [typeof WorkflowFailure, typeof HostRequestInvalid, typeof HostAccountsInvalid, typeof HostDeclarationInvalid, typeof HostEvaluationFailed, typeof HostOperationNotFound, typeof HostOperationFailed, typeof HostToolNotFound, typeof HostInputInvalid, typeof HostOutputInvalid, typeof HostToolBlocked, typeof HostToolApprovalRequired, typeof HostToolPolicyFailed, typeof ElicitationFailed]>;
|
|
547
|
-
/** Expected host failures. */
|
|
548
|
-
export type HostError = typeof HostError.Type;
|
|
88
|
+
export declare const HostDataError: Schema.Union<readonly [typeof OpenapiResponseError, typeof WorkflowFailure, Schema.Union<readonly [typeof ProviderError, typeof McpError, typeof SkillLoadFailed, typeof HostRequestInvalid, typeof HostDeclarationInvalid, typeof HostAccountsInvalid, typeof HostEvaluationFailed]>, typeof HostToolNotFound, typeof HostOperationNotFound, typeof HostOperationFailed, typeof HostInputInvalid, typeof HostOutputInvalid, typeof HostToolBlocked, typeof HostToolApprovalRequired, typeof HostToolPolicyFailed, typeof ElicitationFailed]>;
|
|
549
89
|
/** Invocation-owned outcome sink. Framework adapters report semantic failures
|
|
550
90
|
* independently of successful JSON transport; customer output is never inspected. */
|
|
551
91
|
export declare const ToolResultObservation: Context.Reference<{
|
|
552
92
|
readonly failed: () => void;
|
|
553
93
|
}>;
|
|
554
|
-
/** Portable response envelope; callers parse the success value for their operation. */
|
|
555
|
-
export declare const HostResponse: Schema.Union<readonly [Schema.Struct<{
|
|
556
|
-
readonly ok: Schema.Literal<true>;
|
|
557
|
-
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
558
|
-
readonly toolError: Schema.optionalKey<Schema.Literal<true>>;
|
|
559
|
-
}>, Schema.Struct<{
|
|
560
|
-
readonly ok: Schema.Literal<false>;
|
|
561
|
-
readonly error: Schema.Union<readonly [typeof WorkflowFailure, typeof HostRequestInvalid, typeof HostAccountsInvalid, typeof HostDeclarationInvalid, typeof HostEvaluationFailed, typeof HostOperationNotFound, typeof HostOperationFailed, typeof HostToolNotFound, typeof HostInputInvalid, typeof HostOutputInvalid, typeof HostToolBlocked, typeof HostToolApprovalRequired, typeof HostToolPolicyFailed, typeof ElicitationFailed]>;
|
|
562
|
-
}>]>;
|
|
563
|
-
/** Parsed response envelope. */
|
|
564
|
-
export type HostResponse = typeof HostResponse.Type;
|
|
565
94
|
/** Native handler; context comes from host authority, never from request content. */
|
|
566
95
|
export type AppHandler = (request: Request, context: HostContext) => Effect.Effect<Response>;
|
|
567
96
|
export { OperationToolPrefixes, type AppOperation, type OperationContext } from "./operations.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ProviderError } from "./provider-error.js";
|
|
1
2
|
/** MCP protocol data uses Effect Schema; executable tool methods use Effect. */
|
|
2
3
|
import { type Effect, type Redacted, Schema } from "effect";
|
|
3
4
|
import type { Elicit, ElicitationFailed } from "./elicitation.js";
|
|
@@ -24,6 +25,7 @@ export declare const mcpSdkTimerCeilingMs = 2147483647;
|
|
|
24
25
|
/** Server and headers for this selected account. Headers are a credential snapshot. */
|
|
25
26
|
export declare const McpToolsOptions: Schema.Struct<{
|
|
26
27
|
readonly url: Schema.String;
|
|
28
|
+
readonly accountId: Schema.optional<Schema.brand<Schema.String, "acc">>;
|
|
27
29
|
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
28
30
|
readonly signal: Schema.optional<Schema.instanceOf<AbortSignal, AbortSignal>>;
|
|
29
31
|
readonly timeoutMs: Schema.optional<Schema.Number>;
|
|
@@ -70,7 +72,7 @@ export interface McpTool extends McpToolMetadata {
|
|
|
70
72
|
readonly description: string;
|
|
71
73
|
readonly input: Schema.Decoder<JsonValue>;
|
|
72
74
|
readonly readOnly?: boolean;
|
|
73
|
-
readonly run: (context: McpToolContext, input: JsonValue) => Effect.Effect<McpToolResult, McpError | ElicitationFailed>;
|
|
75
|
+
readonly run: (context: McpToolContext, input: JsonValue) => Effect.Effect<McpToolResult, McpError | ProviderError | ElicitationFailed>;
|
|
74
76
|
}
|
|
75
77
|
/** The discovered catalog keyed by remote tool name. */
|
|
76
78
|
export type McpTools = Readonly<Record<string, McpTool>>;
|