apps 0.0.1-beta.0
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 +191 -0
- package/check-publish.mjs +10 -0
- package/framework-reference.json +1 -0
- package/js/chunk-22WRQZT7.js +389 -0
- package/js/chunk-2OTCEKL2.js +29480 -0
- package/js/chunk-36DNRFZQ.js +34 -0
- package/js/chunk-3ANFZFCV.js +1799 -0
- package/js/chunk-7JXHF5IF.js +138 -0
- package/js/chunk-BCSNKUAC.js +0 -0
- package/js/chunk-BKVL7XAJ.js +47 -0
- package/js/chunk-BPEFS4YF.js +1323 -0
- package/js/chunk-C24KEZXR.js +59 -0
- package/js/chunk-D6BKYP2L.js +877 -0
- package/js/chunk-EP6AEUZO.js +19 -0
- package/js/chunk-HP7E42X6.js +1719 -0
- package/js/chunk-KWTCHVLT.js +284 -0
- package/js/chunk-LOKGDT6B.js +28 -0
- package/js/chunk-MLKGABMK.js +9 -0
- package/js/chunk-OWD2YICM.js +2486 -0
- package/js/chunk-Q2FD5IBM.js +899 -0
- package/js/chunk-R6JMJSVT.js +590 -0
- package/js/chunk-SBKHUC5L.js +56 -0
- package/js/chunk-VFUZI3NY.js +75 -0
- package/js/chunk-W7Q5EOTS.js +4375 -0
- package/js/chunk-WIDTG42X.js +171 -0
- package/js/chunk-X3YBZCJW.js +246 -0
- package/js/chunk-YDR4CPJA.js +2357 -0
- package/js/client.js +1023 -0
- package/js/contracts.js +163 -0
- package/js/effect.js +44 -0
- package/js/graphql.js +392 -0
- package/js/host.js +193 -0
- package/js/index.js +284 -0
- package/js/mcp/effect.js +23 -0
- package/js/mcp/stdio.js +123 -0
- package/js/mcp.js +37 -0
- package/js/openapi.js +246 -0
- package/js/operations/approval.js +9 -0
- package/js/react.js +37 -0
- package/js/storage/facet.js +546 -0
- package/js/ui/auth/contracts.js +19 -0
- package/js/ui/auth.js +28 -0
- package/js/ui/contracts.js +24 -0
- package/js/ui/serving.js +286 -0
- package/package.json +116 -0
- package/runtime.json +1 -0
- package/types/app-data/src/contracts/database.d.ts +193 -0
- package/types/app-data/src/implementation/cursor.d.ts +10 -0
- package/types/app-data/src/implementation/index-key.d.ts +7 -0
- package/types/app-data/src/implementation/promise.d.ts +68 -0
- package/types/app-data/src/implementation/range.d.ts +8 -0
- package/types/app-data/src/implementation/schema.d.ts +33 -0
- package/types/app-data/src/implementation/sqlite.d.ts +11 -0
- package/types/app-data/src/index.d.ts +4 -0
- package/types/apps/src/approval.d.ts +10 -0
- package/types/apps/src/client.d.ts +5 -0
- package/types/apps/src/contracts/app.d.ts +58 -0
- package/types/apps/src/contracts/approval.d.ts +14 -0
- package/types/apps/src/contracts/context.d.ts +25 -0
- package/types/apps/src/contracts/elicitation.d.ts +86 -0
- package/types/apps/src/contracts/graphql.d.ts +102 -0
- package/types/apps/src/contracts/host.d.ts +568 -0
- package/types/apps/src/contracts/http.d.ts +20 -0
- package/types/apps/src/contracts/live.d.ts +26 -0
- package/types/apps/src/contracts/mcp.d.ts +93 -0
- package/types/apps/src/contracts/openapi.d.ts +105 -0
- package/types/apps/src/contracts/operations.d.ts +30 -0
- package/types/apps/src/contracts/optimistic.d.ts +22 -0
- package/types/apps/src/contracts/provider.d.ts +96 -0
- package/types/apps/src/contracts/schedules.d.ts +51 -0
- package/types/apps/src/contracts/schema.d.ts +20 -0
- package/types/apps/src/contracts/storage.d.ts +68 -0
- package/types/apps/src/contracts/tools.d.ts +11 -0
- package/types/apps/src/contracts/ui-auth.d.ts +28 -0
- package/types/apps/src/contracts/ui.d.ts +90 -0
- package/types/apps/src/contracts/webhook-protocol.d.ts +102 -0
- package/types/apps/src/contracts/webhooks.d.ts +53 -0
- package/types/apps/src/contracts/workflows.d.ts +277 -0
- package/types/apps/src/effect.d.ts +10 -0
- package/types/apps/src/facet.d.ts +5 -0
- package/types/apps/src/graphql.d.ts +10 -0
- package/types/apps/src/host.d.ts +16 -0
- package/types/apps/src/implementation/account-operations.d.ts +32 -0
- package/types/apps/src/implementation/app.d.ts +40 -0
- package/types/apps/src/implementation/authoring.d.ts +12 -0
- package/types/apps/src/implementation/elicitation.d.ts +103 -0
- package/types/apps/src/implementation/graphql.d.ts +5 -0
- package/types/apps/src/implementation/host.d.ts +3 -0
- package/types/apps/src/implementation/http.d.ts +5 -0
- package/types/apps/src/implementation/live.d.ts +18 -0
- package/types/apps/src/implementation/mcp-call.d.ts +19 -0
- package/types/apps/src/implementation/mcp-client.d.ts +50 -0
- package/types/apps/src/implementation/mcp-stdio.d.ts +4 -0
- package/types/apps/src/implementation/mcp-tools.d.ts +6 -0
- package/types/apps/src/implementation/mcp.d.ts +4 -0
- package/types/apps/src/implementation/openapi-request.d.ts +11 -0
- package/types/apps/src/implementation/openapi.d.ts +5 -0
- package/types/apps/src/implementation/operations.d.ts +65 -0
- package/types/apps/src/implementation/optimistic.d.ts +30 -0
- package/types/apps/src/implementation/protocol-operations.d.ts +24 -0
- package/types/apps/src/implementation/provider.d.ts +16 -0
- package/types/apps/src/implementation/query-commit.d.ts +10 -0
- package/types/apps/src/implementation/schedules.d.ts +16 -0
- package/types/apps/src/implementation/schema.d.ts +93 -0
- package/types/apps/src/implementation/storage.d.ts +13 -0
- package/types/apps/src/implementation/ui-auth.d.ts +13 -0
- package/types/apps/src/implementation/ui-client.d.ts +16 -0
- package/types/apps/src/implementation/ui-errors.d.ts +2 -0
- package/types/apps/src/implementation/ui-serving.d.ts +16 -0
- package/types/apps/src/implementation/ui-watch.d.ts +2 -0
- package/types/apps/src/implementation/webhooks.d.ts +29 -0
- package/types/apps/src/implementation/workflow-context.d.ts +8 -0
- package/types/apps/src/implementation/workflow-rpc.d.ts +5 -0
- package/types/apps/src/implementation/workflows.d.ts +27 -0
- package/types/apps/src/index.d.ts +58 -0
- package/types/apps/src/mcp-stdio.d.ts +8 -0
- package/types/apps/src/mcp.d.ts +10 -0
- package/types/apps/src/openapi.d.ts +10 -0
- package/types/apps/src/react.d.ts +7 -0
- package/types/apps/src/ui-auth.d.ts +3 -0
- package/types/apps/src/ui-serving.d.ts +3 -0
- package/types/telemetry/src/browser-operations.d.ts +16 -0
- package/types/telemetry/src/browser-performance.d.ts +11 -0
- package/types/telemetry/src/browser-request-timing.d.ts +2 -0
- package/types/telemetry/src/browser.d.ts +27 -0
- package/types/telemetry/src/config.d.ts +83 -0
- package/types/telemetry/src/context.d.ts +14 -0
- package/types/telemetry/src/index.d.ts +9 -0
- package/types/telemetry/src/layer.d.ts +7 -0
- package/types/telemetry/src/measurements.d.ts +8 -0
- package/types/telemetry/src/pending-span.d.ts +7 -0
- package/types/telemetry/src/relay.d.ts +28 -0
- package/types/telemetry/src/span-attributes.d.ts +29 -0
- package/types/telemetry/src/trace-context.d.ts +20 -0
- package/types/telemetry/src/transport.d.ts +6 -0
|
@@ -0,0 +1,568 @@
|
|
|
1
|
+
import { WorkflowFailure, type WorkflowExecution, type WorkflowReplay, type WorkflowHostControls } from "./workflows.js";
|
|
2
|
+
export * from "./workflows.js";
|
|
3
|
+
/** Portable framework dispatch contracts. Requests never carry account bindings. */
|
|
4
|
+
import { Context, Schema, type Effect, type Redacted } from "effect";
|
|
5
|
+
import type { AppStorage } from "./storage.js";
|
|
6
|
+
import type { InvocationTelemetry } from "../../../telemetry/src/index.js";
|
|
7
|
+
export { AppStorageError, AppStorageUnavailable, StorageName, type AppStorage } from "./storage.js";
|
|
8
|
+
import { ElicitationFailed, type ElicitationHandler } from "./elicitation.js";
|
|
9
|
+
export { ElicitationLimits, defaultElicitationLimits, FormElicitation, ElicitationResponse, ElicitationReply, ElicitationFailed, type ElicitationHandler, ApprovalElicitation, ApprovalResponse, approvalElicitation, } from "./elicitation.js";
|
|
10
|
+
export { McpClientLimits, defaultMcpClientLimits } from "./mcp.js";
|
|
11
|
+
export * from "./webhook-protocol.js";
|
|
12
|
+
export { AccountId, HttpUrl } from "./schema.js";
|
|
13
|
+
export { OAuthClientAuth, OAuthSecretClientAuth } from "./provider.js";
|
|
14
|
+
/** Serializable auth methods shared with SDK hosts; protocol configuration has one schema. */
|
|
15
|
+
export declare const DeclaredAuthMethod: Schema.Union<readonly [Schema.Struct<{
|
|
16
|
+
readonly type: Schema.Literal<"secrets">;
|
|
17
|
+
readonly label: Schema.String;
|
|
18
|
+
readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
19
|
+
}>, Schema.Struct<{
|
|
20
|
+
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
21
|
+
readonly discover: Schema.String;
|
|
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
|
+
}>>]>>;
|
|
341
|
+
/** Raw host inputs; the host boundary parses and redacts these immediately. */
|
|
342
|
+
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
|
+
/** Trusted invocation context, supplied separately from the Request. */
|
|
352
|
+
export interface HostContext {
|
|
353
|
+
/** Private delivery capability. It is never accepted in public request JSON or stored in a build. */
|
|
354
|
+
readonly workflowControls?: WorkflowHostControls;
|
|
355
|
+
readonly workflow?: WorkflowExecution;
|
|
356
|
+
readonly replay?: WorkflowReplay;
|
|
357
|
+
readonly elicitation?: ElicitationHandler;
|
|
358
|
+
/** Trusted in-process tracing capability; never decoded from a public request. */
|
|
359
|
+
readonly telemetry?: InvocationTelemetry;
|
|
360
|
+
readonly approval?: TrustedToolApproval;
|
|
361
|
+
readonly storage?: AppStorage;
|
|
362
|
+
readonly accounts: Redacted.Redacted<ResolvedAccounts>;
|
|
363
|
+
}
|
|
364
|
+
/** Serializable live tool metadata; executable callbacks never cross this boundary. */
|
|
365
|
+
export declare const HostedTool: Schema.Struct<{
|
|
366
|
+
readonly schedules: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
367
|
+
readonly name: Schema.NonEmptyString;
|
|
368
|
+
readonly timing: Schema.Union<readonly [Schema.Struct<{
|
|
369
|
+
readonly kind: Schema.Literal<"interval">;
|
|
370
|
+
readonly milliseconds: Schema.Int;
|
|
371
|
+
}>, Schema.Struct<{
|
|
372
|
+
readonly kind: Schema.Literal<"cron">;
|
|
373
|
+
readonly calendar: Schema.Struct<{
|
|
374
|
+
readonly expression: Schema.NonEmptyString;
|
|
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 {
|
|
536
|
+
}
|
|
537
|
+
/** Declaration reads do not bind accounts or evaluate the app factory. */
|
|
538
|
+
export declare const HostRequirementsError: Schema.Union<readonly [typeof HostRequestInvalid, typeof HostDeclarationInvalid]>;
|
|
539
|
+
/** 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]>;
|
|
541
|
+
/** 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]>;
|
|
543
|
+
/** 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;
|
|
549
|
+
/** Invocation-owned outcome sink. Framework adapters report semantic failures
|
|
550
|
+
* independently of successful JSON transport; customer output is never inspected. */
|
|
551
|
+
export declare const ToolResultObservation: Context.Reference<{
|
|
552
|
+
readonly failed: () => void;
|
|
553
|
+
}>;
|
|
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
|
+
/** Native handler; context comes from host authority, never from request content. */
|
|
566
|
+
export type AppHandler = (request: Request, context: HostContext) => Effect.Effect<Response>;
|
|
567
|
+
export { OperationToolPrefixes, type AppOperation, type OperationContext } from "./operations.js";
|
|
568
|
+
export * from "./schedules.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Native HTTP decoding contract. The public boundary adapts fetch Responses. */
|
|
2
|
+
import { type Effect, Schema } from "effect";
|
|
3
|
+
/** The response capability needed by the decoder, already adapted into Effect. */
|
|
4
|
+
export interface JsonResponse {
|
|
5
|
+
readonly status: number;
|
|
6
|
+
readonly json: () => Effect.Effect<unknown, ResponseDecodeError>;
|
|
7
|
+
}
|
|
8
|
+
declare const ResponseStatusError_base: Schema.Class<ResponseStatusError, Schema.TaggedStruct<"ResponseStatusError", {
|
|
9
|
+
readonly status: Schema.Number;
|
|
10
|
+
}>, import("effect/Cause").YieldableError>;
|
|
11
|
+
/** A non-2xx response. Carries the status only, never the body. */
|
|
12
|
+
export declare class ResponseStatusError extends ResponseStatusError_base {
|
|
13
|
+
get message(): string;
|
|
14
|
+
}
|
|
15
|
+
declare const ResponseDecodeError_base: Schema.Class<ResponseDecodeError, Schema.TaggedStruct<"ResponseDecodeError", {}>, import("effect/Cause").YieldableError>;
|
|
16
|
+
/** Invalid JSON or a schema mismatch. Never includes the response body. */
|
|
17
|
+
export declare class ResponseDecodeError extends ResponseDecodeError_base {
|
|
18
|
+
get message(): string;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** Browser subscription contracts contain no executable server declarations. */
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import type { JsonValue } from "./schema.js";
|
|
4
|
+
/** Serializable named reference; the phantom field is never populated at runtime. */
|
|
5
|
+
export interface OperationReference<Input, Output, Kind extends "query" | "mutation"> {
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly kind: Kind;
|
|
8
|
+
readonly _types?: {
|
|
9
|
+
readonly input: Input;
|
|
10
|
+
readonly output: Output;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
/** Host-bound subscription request. Authentication and configured app identity belong to the host. */
|
|
14
|
+
export interface QueryDescriptor {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly input: JsonValue;
|
|
17
|
+
}
|
|
18
|
+
/** Host transport must close its subscription when async iteration ends. Results are parsed by the client. */
|
|
19
|
+
export interface QueryTransport {
|
|
20
|
+
readonly subscribe: (descriptor: QueryDescriptor) => Promise<AsyncIterable<unknown>>;
|
|
21
|
+
}
|
|
22
|
+
declare const AppQueryFailed_base: Schema.Class<AppQueryFailed, Schema.TaggedStruct<"AppQueryFailed", {}>, import("effect/Cause").YieldableError>;
|
|
23
|
+
/** Safe client failure; arbitrary transport errors and response data are never exposed. */
|
|
24
|
+
export declare class AppQueryFailed extends AppQueryFailed_base {
|
|
25
|
+
}
|
|
26
|
+
export {};
|