apps 0.0.1-beta.1 → 0.0.1-beta.11
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 +65 -43
- package/framework-reference.json +1 -1
- package/js/browser-XIPJGLH2.js +65 -0
- package/js/{chunk-SATWJKN6.js → chunk-27F7W2LG.js} +1 -1
- package/js/{chunk-HDJH3RPR.js → chunk-57RKNWL2.js} +2 -2
- package/js/{chunk-2HHMABB6.js → chunk-5T57N25Q.js} +61 -13
- package/js/{chunk-FW5HBOIK.js → chunk-CDL5PM2Q.js} +307 -169
- package/js/{chunk-X7SFGU4Q.js → chunk-EFAPIRVB.js} +28 -9
- package/js/chunk-GPFVWWDZ.js +209 -0
- package/js/{chunk-OHRT55C4.js → chunk-IJX4CYZO.js} +3 -6
- package/js/{chunk-ZTFQHGEB.js → chunk-IPI4MFSN.js} +3 -5
- package/js/{chunk-YEJOQEII.js → chunk-JU7VHODU.js} +1 -1
- package/js/{chunk-IHQ4ML7K.js → chunk-KRSCJDTW.js} +586 -111
- package/js/chunk-KUMBKVJD.js +39 -0
- package/js/{chunk-EVJUVWN2.js → chunk-M3B3DE4K.js} +2 -2
- package/js/{chunk-ZJWDMTE3.js → chunk-MKWZPDR6.js} +3 -3
- package/js/{chunk-BMOIAIVR.js → chunk-N7YDVXYJ.js} +49 -1
- package/js/chunk-NKLWZJLE.js +172 -0
- package/js/{chunk-ZCAMUXSG.js → chunk-ODEIDRGW.js} +3 -4
- package/js/{chunk-M6ZRRIBI.js → chunk-PJJ24GU7.js} +1 -1
- package/js/{chunk-FZJOYIZO.js → chunk-PZB6T6KU.js} +1 -1
- package/js/chunk-R3EV5FTO.js +97 -0
- package/js/{chunk-KOXMLKTM.js → chunk-RELFXUOO.js} +308 -316
- package/js/{chunk-6YBRWRK3.js → chunk-RFVIONFX.js} +43 -14
- package/js/{chunk-RBAC33PQ.js → chunk-TYVDBQSI.js} +58 -83
- package/js/{chunk-QKHR7BMF.js → chunk-UK573G7W.js} +1 -1
- package/js/{chunk-NCYXZN2G.js → chunk-UVL56Z6E.js} +390 -23
- package/js/{chunk-4LPG6RCH.js → chunk-VFZKSM3T.js} +5 -25
- package/js/{chunk-6IIO4NPI.js → chunk-WVVV4TX2.js} +21 -9
- package/js/{chunk-G7IE6BKC.js → chunk-YBRC463S.js} +8 -8
- package/js/chunk-Z2QY3YTF.js +507 -0
- package/js/{chunk-PLCMJREA.js → chunk-ZQINWV4W.js} +60 -20
- package/js/client.js +10 -26
- package/js/contracts.js +70 -15
- package/js/effect.js +19 -19
- package/js/es-APDZKREY.js +40968 -0
- package/js/graphql.js +34 -39
- package/js/host.js +23 -23
- package/js/index.js +199 -195
- package/js/mcp/effect.js +21 -21
- package/js/mcp/stdio.js +25 -25
- package/js/mcp.js +60 -44
- package/js/openapi.js +826 -41682
- package/js/react.js +3 -3
- package/js/skills/effect.js +3 -4
- package/js/skills.js +53 -17
- package/js/storage/facet.js +4 -4
- package/js/ui/auth/contracts.js +8 -9
- package/js/ui/auth.js +16 -14
- package/js/ui/contracts.js +4 -4
- package/js/ui/serving.js +9 -8
- package/package.json +1 -1
- package/runtime.json +1 -1
- package/types/app-cache/src/contracts/cache.d.ts +42 -2
- package/types/app-cache/src/index.d.ts +59 -1
- package/types/app-data/src/contracts/database.d.ts +33 -6
- package/types/app-data/src/implementation/schema.d.ts +2 -17
- package/types/apps/src/contracts/app.d.ts +7 -6
- package/types/apps/src/contracts/cache.d.ts +4 -1
- package/types/apps/src/contracts/failure.d.ts +25 -0
- package/types/apps/src/contracts/host.d.ts +34 -679
- package/types/apps/src/contracts/mcp.d.ts +16 -0
- package/types/apps/src/contracts/openapi.d.ts +11 -1
- package/types/apps/src/contracts/operations.d.ts +0 -5
- package/types/apps/src/contracts/protocol-version.d.ts +6 -0
- package/types/apps/src/contracts/protocols/1.d.ts +1589 -0
- package/types/apps/src/contracts/protocols/2.d.ts +668 -0
- package/types/apps/src/contracts/protocols/3.d.ts +676 -0
- package/types/apps/src/contracts/protocols/4.d.ts +1229 -0
- package/types/apps/src/contracts/protocols/5.d.ts +1090 -0
- package/types/apps/src/contracts/provider.d.ts +56 -5
- package/types/apps/src/contracts/router.d.ts +59 -0
- package/types/apps/src/contracts/skills.d.ts +17 -8
- package/types/apps/src/contracts/storage.d.ts +3 -3
- package/types/apps/src/contracts/ui-auth.d.ts +6 -14
- package/types/apps/src/contracts/workflows.d.ts +34 -3
- package/types/apps/src/graphql.d.ts +1 -3
- package/types/apps/src/implementation/account-router.d.ts +12 -0
- package/types/apps/src/implementation/app.d.ts +5 -4
- package/types/apps/src/implementation/cache.d.ts +3 -1
- package/types/apps/src/implementation/catalog-cache.d.ts +9 -2
- package/types/apps/src/implementation/elicitation.d.ts +1 -1
- package/types/apps/src/implementation/failure-detail.d.ts +25 -0
- package/types/apps/src/implementation/graphql-catalog.d.ts +1 -4
- package/types/apps/src/implementation/mcp-catalog.d.ts +1 -4
- package/types/apps/src/implementation/mcp-client.d.ts +35 -19
- package/types/apps/src/implementation/mcp.d.ts +35 -19
- package/types/apps/src/implementation/openapi-compile.d.ts +3 -2
- package/types/apps/src/implementation/openapi-document.d.ts +0 -2
- package/types/apps/src/implementation/openapi-names.d.ts +18 -0
- package/types/apps/src/implementation/openapi-request.d.ts +0 -1
- package/types/apps/src/implementation/openapi-source.d.ts +7 -7
- package/types/apps/src/implementation/operations.d.ts +26 -3
- package/types/apps/src/implementation/protocol-operations.d.ts +3 -4
- package/types/apps/src/implementation/provider.d.ts +9 -4
- package/types/apps/src/implementation/router-catalog.d.ts +225 -0
- package/types/apps/src/implementation/router.d.ts +59 -0
- package/types/apps/src/implementation/schema.d.ts +5 -6
- package/types/apps/src/implementation/storage.d.ts +5 -3
- package/types/apps/src/implementation/swagger-client.d.ts +28 -0
- package/types/apps/src/implementation/ui-auth.d.ts +11 -5
- package/types/apps/src/implementation/ui-serving.d.ts +4 -2
- package/types/apps/src/implementation/webhooks.d.ts +1 -1
- package/types/apps/src/implementation/workflow-context.d.ts +11 -3
- package/types/apps/src/index.d.ts +21 -6
- package/types/apps/src/mcp-stdio.d.ts +2 -5
- package/types/apps/src/mcp.d.ts +5 -4
- package/types/apps/src/openapi.d.ts +6 -6
- package/types/apps/src/skills.d.ts +6 -3
- package/types/apps/src/ui-auth.d.ts +2 -2
- package/types/telemetry/src/browser-operations.d.ts +5 -2
- package/js/chunk-PZ36XMXW.js +0 -93
- package/js/chunk-SWPD52J7.js +0 -35
- package/js/chunk-TE4KO4HI.js +0 -47
- package/js/chunk-W7D7WVSY.js +0 -18
- package/types/apps/src/contracts/dynamic-tools.d.ts +0 -13
- package/types/apps/src/implementation/account-operations.d.ts +0 -151
- package/types/apps/src/implementation/dynamic-tools.d.ts +0 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Provider declarations use native Effect schemas. The trusted host interprets them. */
|
|
2
|
-
import { Data, Schema } from "effect";
|
|
2
|
+
import { Data, type Effect, Schema } from "effect";
|
|
3
3
|
import { type AccountId } from "./schema.js";
|
|
4
4
|
declare const SecretsMethod_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Readonly<A> & {
|
|
5
5
|
readonly _tag: "secrets";
|
|
@@ -15,6 +15,10 @@ export declare const OAuthClientAuth: Schema.Literals<readonly ["none", "client_
|
|
|
15
15
|
export type OAuthClientAuth = typeof OAuthClientAuth.Type;
|
|
16
16
|
/** Machine clients always authenticate; public clients cannot use the client-credentials grant. */
|
|
17
17
|
export declare const OAuthSecretClientAuth: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
|
|
18
|
+
/** Parameters the host sets on every authorization request; a declaration cannot replace them. */
|
|
19
|
+
export declare const reservedAuthorizationParams: readonly ["response_type", "client_id", "redirect_uri", "state", "scope", "code_challenge", "code_challenge_method", "nonce", "resource", "request", "request_uri"];
|
|
20
|
+
/** A protocol parameter only the host sets on the authorization request. */
|
|
21
|
+
export type ReservedAuthorizationParam = (typeof reservedAuthorizationParams)[number];
|
|
18
22
|
/**
|
|
19
23
|
* Extra authorization request parameters, such as `access_type: "offline"`. RFC 6749 §3.1
|
|
20
24
|
* lets services define their own; the protocol and security parameters stay host-owned.
|
|
@@ -36,6 +40,7 @@ export declare const OAuth2Config: Schema.Union<readonly [Schema.Struct<{
|
|
|
36
40
|
readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
|
|
37
41
|
readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
38
42
|
}>, Schema.Struct<{
|
|
43
|
+
/** Its query is kept; it cannot set protocol parameters or repeat `authorizationParams`. */
|
|
39
44
|
readonly authorizationUrl: Schema.String;
|
|
40
45
|
readonly tokenUrl: Schema.String;
|
|
41
46
|
readonly revocationUrl: Schema.optionalKey<Schema.String>;
|
|
@@ -84,10 +89,54 @@ export declare class OAuth2Method<Response extends Schema.Decoder<unknown>> exte
|
|
|
84
89
|
export type AuthMethod = SecretsMethod<Schema.Decoder<unknown>> | OAuth2Method<Schema.Decoder<unknown>>;
|
|
85
90
|
/** Auth method names are chosen by the provider author. */
|
|
86
91
|
export type AuthMethods = Readonly<Record<string, AuthMethod>>;
|
|
87
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* Upstream identity that a passing account check may report for display. Only these fields are
|
|
94
|
+
* retained; the host never stores raw provider responses.
|
|
95
|
+
*/
|
|
96
|
+
export declare const AccountInfo: Schema.Struct<{
|
|
97
|
+
readonly externalId: Schema.optionalKey<Schema.String>;
|
|
98
|
+
readonly displayName: Schema.optionalKey<Schema.String>;
|
|
99
|
+
readonly username: Schema.optionalKey<Schema.String>;
|
|
100
|
+
readonly email: Schema.optionalKey<Schema.String>;
|
|
101
|
+
readonly avatarUrl: Schema.optionalKey<Schema.String>;
|
|
102
|
+
readonly profileUrl: Schema.optionalKey<Schema.String>;
|
|
103
|
+
}>;
|
|
104
|
+
export type AccountInfo = typeof AccountInfo.Type;
|
|
105
|
+
/** A passing account check. Failures are thrown, so there is no failing variant. */
|
|
106
|
+
export declare const AccountCheckResult: Schema.Struct<{
|
|
107
|
+
readonly accountInfo: Schema.optionalKey<Schema.Struct<{
|
|
108
|
+
readonly externalId: Schema.optionalKey<Schema.String>;
|
|
109
|
+
readonly displayName: Schema.optionalKey<Schema.String>;
|
|
110
|
+
readonly username: Schema.optionalKey<Schema.String>;
|
|
111
|
+
readonly email: Schema.optionalKey<Schema.String>;
|
|
112
|
+
readonly avatarUrl: Schema.optionalKey<Schema.String>;
|
|
113
|
+
readonly profileUrl: Schema.optionalKey<Schema.String>;
|
|
114
|
+
}>>;
|
|
115
|
+
}>;
|
|
116
|
+
export type AccountCheckResult = typeof AccountCheckResult.Type;
|
|
117
|
+
/** The account a provider's check verifies, with invocation-owned HTTP and cancellation. */
|
|
118
|
+
export interface AccountCheckContext<Auth extends AuthMethods> {
|
|
119
|
+
readonly account: AccountOfMethods<Auth>;
|
|
120
|
+
readonly fetch: (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
121
|
+
readonly signal: AbortSignal;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* A safe authenticated read proving the account works for this app. Returning passes; a thrown
|
|
125
|
+
* `ProviderError` or HTTP status failure classifies the problem. Any other failure, including a
|
|
126
|
+
* timeout, means the check could not verify the account, not that its credentials are bad.
|
|
127
|
+
*/
|
|
128
|
+
export interface AccountCheck<Auth extends AuthMethods> {
|
|
129
|
+
run(context: AccountCheckContext<Auth>): Effect.Effect<AccountCheckResult | void, unknown>;
|
|
130
|
+
}
|
|
131
|
+
/** A provider declaration. The host derives its identity from the declaration, never its check. */
|
|
88
132
|
export declare class Provider<Auth extends AuthMethods> extends Data.Class<{
|
|
89
133
|
readonly name: string;
|
|
90
134
|
readonly auth: Auth;
|
|
135
|
+
/**
|
|
136
|
+
* Stored without its method types so a specific provider still fills a general slot. The host
|
|
137
|
+
* binds the account against this provider's methods before running it.
|
|
138
|
+
*/
|
|
139
|
+
readonly health?: AccountCheck<AuthMethods>;
|
|
91
140
|
}> {
|
|
92
141
|
/** Declare zero or more accounts from this provider without performing I/O. */
|
|
93
142
|
many(): ManyAccounts<Auth>;
|
|
@@ -102,12 +151,14 @@ export declare class ManyAccounts<Auth extends AuthMethods> extends ManyAccounts
|
|
|
102
151
|
}
|
|
103
152
|
/** Infer the data for one method from its native Effect decoder. */
|
|
104
153
|
export type AuthMethodData<Method> = Method extends SecretsMethod<infer Fields> ? Fields["Type"] : Method extends OAuth2Method<infer Response> ? Response["Type"] : never;
|
|
105
|
-
/** One
|
|
106
|
-
export type
|
|
154
|
+
/** One account for these methods, discriminated by its author-chosen method name. */
|
|
155
|
+
export type AccountOfMethods<Auth extends AuthMethods> = {
|
|
107
156
|
readonly [Method in keyof Auth & string]: {
|
|
108
157
|
readonly id: AccountId;
|
|
109
158
|
readonly method: Method;
|
|
110
159
|
readonly fields: AuthMethodData<Auth[Method]>;
|
|
111
160
|
};
|
|
112
|
-
}[keyof Auth & string]
|
|
161
|
+
}[keyof Auth & string];
|
|
162
|
+
/** One selected account, discriminated by its author-chosen method name. */
|
|
163
|
+
export type AccountOf<P> = P extends Provider<infer Auth> ? AccountOfMethods<Auth> : never;
|
|
113
164
|
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/** Routers group operations. Keys form tool paths; each operation keeps its own kind. */
|
|
2
|
+
import { Schema, type Effect } from "effect";
|
|
3
|
+
import type { HostedTool, HostedToolSummary } from "./host.js";
|
|
4
|
+
import type { AppOperation } from "./operations.js";
|
|
5
|
+
/** Object keys that JavaScript gives special meaning, so no router may use them. */
|
|
6
|
+
export declare const reservedRouterKeys: ReadonlySet<string>;
|
|
7
|
+
/** One static path segment. Dots separate segments, so a key never contains one. */
|
|
8
|
+
export declare const RouterKey: Schema.String;
|
|
9
|
+
/** An image a client may show beside a router, such as an MCP server's own icon. Models never read it. */
|
|
10
|
+
export declare const RouterIcon: Schema.Struct<{
|
|
11
|
+
readonly src: Schema.NonEmptyString;
|
|
12
|
+
readonly mimeType: Schema.optionalKey<Schema.String>;
|
|
13
|
+
readonly sizes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
14
|
+
readonly theme: Schema.optionalKey<Schema.Literals<readonly ["light", "dark"]>>;
|
|
15
|
+
}>;
|
|
16
|
+
export type RouterIcon = typeof RouterIcon.Type;
|
|
17
|
+
/**
|
|
18
|
+
* What an agent should know about a group of tools. `instructions` is published as a skill;
|
|
19
|
+
* `tags` describes labels that tools in this router carry, such as OpenAPI tags.
|
|
20
|
+
*/
|
|
21
|
+
export declare const RouterMeta: Schema.Struct<{
|
|
22
|
+
readonly title: Schema.optionalKey<Schema.String>;
|
|
23
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
24
|
+
readonly instructions: Schema.optionalKey<Schema.String>;
|
|
25
|
+
readonly icons: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
26
|
+
readonly src: Schema.NonEmptyString;
|
|
27
|
+
readonly mimeType: Schema.optionalKey<Schema.String>;
|
|
28
|
+
readonly sizes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
29
|
+
readonly theme: Schema.optionalKey<Schema.Literals<readonly ["light", "dark"]>>;
|
|
30
|
+
}>>>;
|
|
31
|
+
readonly tags: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
|
|
32
|
+
}>;
|
|
33
|
+
export type RouterMeta = typeof RouterMeta.Type;
|
|
34
|
+
/** A statically declared router. Children are operations or further routers. */
|
|
35
|
+
export interface AppRouter {
|
|
36
|
+
readonly kind: "router";
|
|
37
|
+
readonly meta?: RouterMeta;
|
|
38
|
+
readonly children: Readonly<Record<string, AppNode>>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A router whose tools are discovered when read, such as an MCP server or OpenAPI document.
|
|
42
|
+
* Names are relative to the router and may contain dots. `readOnly: true` marks a query;
|
|
43
|
+
* anything else is a mutation. Resolution never requires listing.
|
|
44
|
+
*/
|
|
45
|
+
export interface DynamicRouter {
|
|
46
|
+
readonly kind: "dynamic";
|
|
47
|
+
/** Metadata supplied by the source. Author metadata on the router takes precedence. */
|
|
48
|
+
readonly meta?: () => Effect.Effect<RouterMeta, unknown>;
|
|
49
|
+
readonly list: () => Effect.Effect<readonly HostedTool[], unknown>;
|
|
50
|
+
readonly resolve: (name: string) => Effect.Effect<AppOperation | undefined, unknown>;
|
|
51
|
+
/** Names and descriptions without schemas. Omitted sources reduce list(). */
|
|
52
|
+
readonly summaries?: () => Effect.Effect<readonly HostedToolSummary[], unknown>;
|
|
53
|
+
/** One tool's full metadata without listing. Omitted sources search list(). */
|
|
54
|
+
readonly describe?: (name: string) => Effect.Effect<HostedTool | undefined, unknown>;
|
|
55
|
+
/** Static author metadata, merged over the source's metadata. */
|
|
56
|
+
readonly overrides?: RouterMeta;
|
|
57
|
+
}
|
|
58
|
+
/** Anything a router can contain. */
|
|
59
|
+
export type AppNode = AppOperation | AppRouter | DynamicRouter;
|
|
@@ -90,19 +90,28 @@ export interface SkillTransport {
|
|
|
90
90
|
export interface SkillReaderOptions extends SkillTransport {
|
|
91
91
|
readonly service: string;
|
|
92
92
|
}
|
|
93
|
-
/**
|
|
94
|
-
|
|
93
|
+
/**
|
|
94
|
+
* Catalog reuse shared by remote skill loaders, with the same policy as MCP tool catalogs. Pass
|
|
95
|
+
* `ctx.cache` to keep the loaded catalog; without it every read fetches the source again.
|
|
96
|
+
*/
|
|
97
|
+
export interface SkillCacheOptions {
|
|
98
|
+
readonly cache?: import("./cache.js").AppCache;
|
|
99
|
+
/** Reuse the catalog for this duration. Defaults to five minutes. */
|
|
100
|
+
readonly freshFor?: import("effect").Duration.Input;
|
|
101
|
+
/** Serve the retained catalog while refreshing. Defaults to one day. */
|
|
102
|
+
readonly staleFor?: import("effect").Duration.Input;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* A public GitHub repository and an optional immutable commit, tag or branch. With a cache, a
|
|
106
|
+
* branch or tag is resolved again when the catalog refreshes, and each commit's file list is kept.
|
|
107
|
+
*/
|
|
108
|
+
export interface GitHubSkillsOptions extends SkillTransport, SkillCacheOptions {
|
|
95
109
|
readonly repo: string;
|
|
96
110
|
readonly path?: string;
|
|
97
111
|
readonly ref?: string;
|
|
98
|
-
/**
|
|
99
|
-
* Pass `ctx.cache` to keep each commit's skill file list. Content at a commit never changes,
|
|
100
|
-
* so later reads of the same commit skip the tree fetch. The ref is still resolved each read.
|
|
101
|
-
*/
|
|
102
|
-
readonly cache?: import("./cache.js").AppCache;
|
|
103
112
|
}
|
|
104
113
|
/** A published directory index, including its listed skill documents and text references. */
|
|
105
|
-
export interface WellKnownSkillsOptions extends SkillTransport {
|
|
114
|
+
export interface WellKnownSkillsOptions extends SkillTransport, SkillCacheOptions {
|
|
106
115
|
readonly url: string;
|
|
107
116
|
}
|
|
108
117
|
/** A folder in the deployed package; omitted path selects skills/. No host filesystem access. */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Schema, type Effect } from "effect";
|
|
3
3
|
import type { RowMetadata, ReadTable, WriteTable } from "../../../app-data/src/index.js";
|
|
4
4
|
import type { Fields, ObjectValue } from "../implementation/schema.js";
|
|
5
|
-
import type { DatabaseSchema, DatabaseSession,
|
|
5
|
+
import type { DatabaseSchema, DatabaseSession, DatabaseError } from "../../../app-data/src/contracts/database.js";
|
|
6
6
|
/** Names for authored operations and tables. */
|
|
7
7
|
export declare const StorageName: Schema.NonEmptyString;
|
|
8
8
|
declare const AppStorageUnavailable_base: Schema.Class<AppStorageUnavailable, Schema.TaggedStruct<"AppStorageUnavailable", {}>, import("effect/Cause").YieldableError>;
|
|
@@ -15,8 +15,8 @@ export declare class AppStorageError extends AppStorageError_base {
|
|
|
15
15
|
}
|
|
16
16
|
/** The adapter owns the database connection and transaction for the whole authored invocation. */
|
|
17
17
|
export interface AppStorage {
|
|
18
|
-
readonly read: <A, E>(schema: DatabaseSchema, work: (session: DatabaseSession) => Effect.Effect<A, E>) => Effect.Effect<A, E |
|
|
19
|
-
readonly mutate: <A, E>(schema: DatabaseSchema, work: (session: DatabaseSession) => Effect.Effect<A, E>) => Effect.Effect<A, E |
|
|
18
|
+
readonly read: <A, E>(schema: DatabaseSchema, work: (session: DatabaseSession) => Effect.Effect<A, E>) => Effect.Effect<A, E | DatabaseError | AppStorageUnavailable | AppStorageError>;
|
|
19
|
+
readonly mutate: <A, E>(schema: DatabaseSchema, work: (session: DatabaseSession) => Effect.Effect<A, E>) => Effect.Effect<A, E | DatabaseError | AppStorageUnavailable | AppStorageError>;
|
|
20
20
|
}
|
|
21
21
|
type InputValue<F extends Fields> = {
|
|
22
22
|
readonly [K in keyof F as F[K]["optionalValue"] extends true ? never : F[K] extends {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/** Browser authentication protocol. Identity and session storage belong to the host. */
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
import { HttpApi, HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
4
|
-
import { UiFailed, UiForbidden, UiUnauthorized } from "./ui.js";
|
|
5
3
|
/** Opaque correlation ID; possession alone does not authorize an app session. */
|
|
6
4
|
export declare const AppSignInId: Schema.brand<Schema.String, "AppSignInId">;
|
|
7
5
|
export type AppSignInId = typeof AppSignInId.Type;
|
|
@@ -10,19 +8,13 @@ export declare const AppSignInCode: Schema.RedactedFromValue<Schema.String>;
|
|
|
10
8
|
/** A path on the current app origin, including its query and fragment; never a redirect to another host or host-owned route. */
|
|
11
9
|
export declare const AppReturnPath: Schema.brand<Schema.String, "AppReturnPath">;
|
|
12
10
|
export type AppReturnPath = typeof AppReturnPath.Type;
|
|
13
|
-
/**
|
|
11
|
+
/** Callback query on the app origin. The code is single-use and works only with its attempt's cookie. */
|
|
14
12
|
export declare const AppSignInCallback: Schema.Struct<{
|
|
15
13
|
readonly request: Schema.brand<Schema.String, "AppSignInId">;
|
|
16
14
|
readonly code: Schema.RedactedFromValue<Schema.String>;
|
|
17
15
|
}>;
|
|
18
|
-
/** Host-owned
|
|
19
|
-
export declare const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}>>, Schema.toCodecJson<typeof UiForbidden | typeof UiFailed>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"complete", "POST", "/_executor/auth/complete", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
24
|
-
readonly request: Schema.brand<Schema.String, "AppSignInId">;
|
|
25
|
-
readonly code: Schema.RedactedFromValue<Schema.String>;
|
|
26
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
27
|
-
readonly returnTo: Schema.brand<Schema.String, "AppReturnPath">;
|
|
28
|
-
}>>, Schema.toCodecJson<typeof UiUnauthorized | typeof UiForbidden | typeof UiFailed>, never, never>, false>>;
|
|
16
|
+
/** Host-owned callback path on every app origin. */
|
|
17
|
+
export declare const appSignInCallbackPath = "/_executor/auth/callback";
|
|
18
|
+
/** Why the product could not authorize an attempt; the dashboard explains it without retrying. */
|
|
19
|
+
export declare const AppSignInFailure: Schema.Literals<readonly ["ended", "forbidden", "unavailable"]>;
|
|
20
|
+
export type AppSignInFailure = typeof AppSignInFailure.Type;
|
|
@@ -24,14 +24,33 @@ export declare const WorkflowStepOptions: Schema.Struct<{
|
|
|
24
24
|
readonly timeout: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.NonEmptyString]>>;
|
|
25
25
|
}>;
|
|
26
26
|
export type WorkflowStepOptions = typeof WorkflowStepOptions.Type;
|
|
27
|
+
/**
|
|
28
|
+
* Where and why a run failed: the failing step and the error the app's own code raised, its
|
|
29
|
+
* message bounded and with account secrets replaced. Runs from before these fields existed have none.
|
|
30
|
+
*/
|
|
31
|
+
export declare const WorkflowFailureDetail: {
|
|
32
|
+
step: Schema.optionalKey<Schema.String>;
|
|
33
|
+
errorName: Schema.optionalKey<Schema.String>;
|
|
34
|
+
message: Schema.optionalKey<Schema.String>;
|
|
35
|
+
};
|
|
36
|
+
/** A failed run's recorded step and app error. */
|
|
37
|
+
export declare const WorkflowRunFailure: Schema.Struct<{
|
|
38
|
+
step: Schema.optionalKey<Schema.String>;
|
|
39
|
+
errorName: Schema.optionalKey<Schema.String>;
|
|
40
|
+
message: Schema.optionalKey<Schema.String>;
|
|
41
|
+
}>;
|
|
42
|
+
export type WorkflowRunFailure = typeof WorkflowRunFailure.Type;
|
|
27
43
|
declare const WorkflowFailure_base: Schema.Class<WorkflowFailure, Schema.TaggedStruct<"WorkflowFailure", {
|
|
28
44
|
readonly reason: Schema.Literals<readonly ["unavailable", "not_found", "input", "output", "operation", "approval", "credentials", "terminated", "execution", "conflict", "engine"]>;
|
|
29
45
|
readonly retryable: Schema.Boolean;
|
|
46
|
+
readonly step: Schema.optionalKey<Schema.String>;
|
|
47
|
+
readonly errorName: Schema.optionalKey<Schema.String>;
|
|
48
|
+
readonly message: Schema.optionalKey<Schema.String>;
|
|
30
49
|
}>, import("effect/Cause").YieldableError>;
|
|
31
|
-
/**
|
|
50
|
+
/** Failures cross host boundaries as reason codes plus the app's own bounded error detail. */
|
|
32
51
|
export declare class WorkflowFailure extends WorkflowFailure_base {
|
|
33
52
|
}
|
|
34
|
-
/** Explicitly stop retrying an authored step. Its message
|
|
53
|
+
/** Explicitly stop retrying an authored step. Its message is reported like any step error. */
|
|
35
54
|
export declare class NonRetryableError extends Error {
|
|
36
55
|
readonly name = "NonRetryableError";
|
|
37
56
|
}
|
|
@@ -45,7 +64,7 @@ export declare const HostedWorkflow: Schema.Struct<{
|
|
|
45
64
|
readonly outputSchema: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
46
65
|
}>;
|
|
47
66
|
export type HostedWorkflow = typeof HostedWorkflow.Type;
|
|
48
|
-
/** Results are available only on completed runs;
|
|
67
|
+
/** Results are available only on completed runs; failures carry a reason code and app error detail. */
|
|
49
68
|
export declare const WorkflowRun: Schema.Union<readonly [Schema.Struct<{
|
|
50
69
|
readonly status: Schema.Literals<readonly ["queued", "running", "waiting", "paused", "waitingForPause"]>;
|
|
51
70
|
readonly profile: Schema.optionalKey<Schema.NonEmptyString>;
|
|
@@ -66,6 +85,12 @@ export declare const WorkflowRun: Schema.Union<readonly [Schema.Struct<{
|
|
|
66
85
|
}>, Schema.Struct<{
|
|
67
86
|
readonly status: Schema.Literal<"errored">;
|
|
68
87
|
readonly error: Schema.Literals<readonly ["unavailable", "not_found", "input", "output", "operation", "approval", "credentials", "terminated", "execution", "conflict", "engine"]>;
|
|
88
|
+
/** The failing step and the app's own error, when the run recorded them. */
|
|
89
|
+
readonly failure: Schema.optionalKey<Schema.Struct<{
|
|
90
|
+
step: Schema.optionalKey<Schema.String>;
|
|
91
|
+
errorName: Schema.optionalKey<Schema.String>;
|
|
92
|
+
message: Schema.optionalKey<Schema.String>;
|
|
93
|
+
}>>;
|
|
69
94
|
readonly profile: Schema.optionalKey<Schema.NonEmptyString>;
|
|
70
95
|
readonly id: Schema.brand<Schema.NonEmptyString, "wfr">;
|
|
71
96
|
readonly app: Schema.NonEmptyString;
|
|
@@ -104,6 +129,12 @@ export declare const WorkflowRunPage: Schema.Struct<{
|
|
|
104
129
|
}>, Schema.Struct<{
|
|
105
130
|
readonly status: Schema.Literal<"errored">;
|
|
106
131
|
readonly error: Schema.Literals<readonly ["unavailable", "not_found", "input", "output", "operation", "approval", "credentials", "terminated", "execution", "conflict", "engine"]>;
|
|
132
|
+
/** The failing step and the app's own error, when the run recorded them. */
|
|
133
|
+
readonly failure: Schema.optionalKey<Schema.Struct<{
|
|
134
|
+
step: Schema.optionalKey<Schema.String>;
|
|
135
|
+
errorName: Schema.optionalKey<Schema.String>;
|
|
136
|
+
message: Schema.optionalKey<Schema.String>;
|
|
137
|
+
}>>;
|
|
107
138
|
readonly profile: Schema.optionalKey<Schema.NonEmptyString>;
|
|
108
139
|
readonly id: Schema.brand<Schema.NonEmptyString, "wfr">;
|
|
109
140
|
readonly app: Schema.NonEmptyString;
|
|
@@ -4,7 +4,5 @@ import { type GraphqlCatalogOptions } from "./implementation/graphql-catalog.js"
|
|
|
4
4
|
export { GraphqlError, type GraphqlToolsOptions } from "./contracts/graphql.js";
|
|
5
5
|
export type { GraphqlCatalogOptions } from "./implementation/graphql-catalog.js";
|
|
6
6
|
/** Lazy tools with optional persistent metadata caching for the selected account. */
|
|
7
|
-
export declare const
|
|
8
|
-
dynamicTools: import("./contracts/dynamic-tools.js").DynamicTools;
|
|
9
|
-
}>;
|
|
7
|
+
export declare const graphqlRouter: (options: GraphqlCatalogOptions, kinds?: OperationKinds) => Promise<import("./index.js").RouterDeclaration<unknown, unknown>>;
|
|
10
8
|
export type { OperationKinds } from "./implementation/protocol-operations.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type RouterDeclaration } from "./router.js";
|
|
2
|
+
/**
|
|
3
|
+
* Discover each selected account's router and combine matching names.
|
|
4
|
+
* Calls take { accountId, input }; each branch retains its account's input schema,
|
|
5
|
+
* credentials, approval and output validation. Empty selections expose no operations.
|
|
6
|
+
* Discovery is sequential and cancellation follows the caller's signal.
|
|
7
|
+
*/
|
|
8
|
+
export declare const accountRouter: <Account extends {
|
|
9
|
+
readonly id: string;
|
|
10
|
+
}>(accounts: readonly Account[], discover: (account: Account) => Promise<RouterDeclaration>, options: {
|
|
11
|
+
readonly signal: AbortSignal;
|
|
12
|
+
}) => Promise<RouterDeclaration>;
|
|
@@ -4,7 +4,7 @@ import type { AppRequirements, AppContext, QueryContext, MutationContext, Webhoo
|
|
|
4
4
|
import { type PromiseMethods } from "./authoring.js";
|
|
5
5
|
import { type WorkflowDeclaration } from "./workflows.js";
|
|
6
6
|
import type { WorkflowContext } from "../contracts/workflows.js";
|
|
7
|
-
import { type
|
|
7
|
+
import { type RouterDeclaration } from "./router.js";
|
|
8
8
|
import { type Schema } from "./schema.js";
|
|
9
9
|
type PromiseCatalog<Catalog> = Catalog extends Readonly<Record<string, object>> ? {
|
|
10
10
|
readonly [Name in keyof Catalog]: {
|
|
@@ -14,15 +14,16 @@ type PromiseCatalog<Catalog> = Catalog extends Readonly<Record<string, object>>
|
|
|
14
14
|
/** Author definition projected from native capabilities. Excluding callable objects keeps
|
|
15
15
|
* factories from being inferred as definitions and preserves contextual handler inference. */
|
|
16
16
|
export type AppDefinition<Requirements extends AppRequirements> = {
|
|
17
|
-
readonly [Key in keyof NativeDefinition<WebhookContext<Requirements>>]: Key extends "workflows" ? Readonly<Record<string, WorkflowDeclaration<WorkflowContext<Requirements>>>> : Key extends "schedules" ? Readonly<Record<string, ScheduleDeclaration<MutationContext<Requirements>>>> : Key extends "
|
|
17
|
+
readonly [Key in keyof NativeDefinition<WebhookContext<Requirements>>]: Key extends "workflows" ? Readonly<Record<string, WorkflowDeclaration<WorkflowContext<Requirements>>>> : Key extends "schedules" ? Readonly<Record<string, ScheduleDeclaration<MutationContext<Requirements>>>> : Key extends "tools" ? RouterDeclaration<QueryContext<Requirements>, MutationContext<Requirements>> : Key extends "webhooks" ? PromiseCatalog<NonNullable<NativeDefinition<WebhookContext<Requirements>>[Key]>> : NativeDefinition<WebhookContext<Requirements>>[Key];
|
|
18
18
|
} & {
|
|
19
19
|
readonly name?: never;
|
|
20
|
-
readonly
|
|
20
|
+
readonly queries?: never;
|
|
21
|
+
readonly mutations?: never;
|
|
21
22
|
readonly call?: never;
|
|
22
23
|
};
|
|
23
24
|
/** Adapt operation and webhook catalogs without evaluating their handlers. */
|
|
24
25
|
export type EffectDefinition<Def> = {
|
|
25
|
-
readonly [Key in keyof Def]: Key extends "
|
|
26
|
+
readonly [Key in keyof Def]: Key extends "tools" ? NonNullable<NativeDefinition<unknown>["tools"]> : Key extends "workflows" ? Readonly<Record<string, import("../contracts/workflows.js").AppWorkflow>> : Key extends "schedules" ? NonNullable<NativeDefinition<unknown>["schedules"]> : Key extends "webhooks" ? NonNullable<NativeDefinition<WebhookContext>["webhooks"]> : Key extends "skills" ? NonNullable<NativeDefinition<unknown>["skills"]> : Key extends "dynamicSkills" ? NonNullable<NativeDefinition<unknown>["dynamicSkills"]> : Def[Key];
|
|
26
27
|
};
|
|
27
28
|
declare const InternalApp: unique symbol;
|
|
28
29
|
/** Recognize a declaration from this framework instance before host adaptation. */
|
|
@@ -3,4 +3,6 @@ import type { ResolvedAccounts } from "../contracts/host.js";
|
|
|
3
3
|
/** Missing host support is explicit on use; ordinary apps do not need cache support. */
|
|
4
4
|
export declare const unavailableCache: HostCache;
|
|
5
5
|
/** Account scopes are derived from trusted current bindings. Loaders get a fresh owned HTTP signal. */
|
|
6
|
-
export declare const authorCache: (host: HostCache, accounts: ResolvedAccounts, signal: AbortSignal
|
|
6
|
+
export declare const authorCache: (host: HostCache, accounts: ResolvedAccounts, signal: AbortSignal,
|
|
7
|
+
/** The invocation's trusted deadline. Waiting on another caller's load never runs past it. */
|
|
8
|
+
deadline?: number) => AppCache;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Duration, Effect, Schema } from "effect";
|
|
2
2
|
import type { AppCache, CacheLoadContext } from "../contracts/cache.js";
|
|
3
|
-
import { type JsonValue } from "../contracts/schema.js";
|
|
3
|
+
import { JsonObject, type JsonValue } from "../contracts/schema.js";
|
|
4
4
|
export interface CatalogCacheOptions {
|
|
5
5
|
/** App/build scope, optionally narrowed to the current account. */
|
|
6
6
|
readonly cache?: AppCache;
|
|
@@ -11,6 +11,11 @@ export interface CatalogCacheOptions {
|
|
|
11
11
|
/** Await a fresh revision at an explicit logical connection or refresh boundary. */
|
|
12
12
|
readonly revalidate?: boolean;
|
|
13
13
|
}
|
|
14
|
+
/** One load: the tools, and optionally a record describing the whole catalog. */
|
|
15
|
+
export interface CatalogLoad<A> {
|
|
16
|
+
readonly tools: readonly A[];
|
|
17
|
+
readonly header?: JsonObject;
|
|
18
|
+
}
|
|
14
19
|
export declare const catalogCache: <A extends {
|
|
15
20
|
readonly name: string;
|
|
16
21
|
}, S>(options: CatalogCacheOptions & {
|
|
@@ -21,9 +26,11 @@ export declare const catalogCache: <A extends {
|
|
|
21
26
|
readonly schema: Schema.Decoder<S>;
|
|
22
27
|
readonly of: (tool: A) => S;
|
|
23
28
|
};
|
|
24
|
-
readonly load: (context?: CacheLoadContext) => Effect.Effect<
|
|
29
|
+
readonly load: (context?: CacheLoadContext) => Effect.Effect<CatalogLoad<A>, unknown>;
|
|
25
30
|
}) => Effect.Effect<{
|
|
26
31
|
list: () => Effect.Effect<readonly A[], unknown, never>;
|
|
32
|
+
/** The record stored with the current revision, if the source supplied one. */
|
|
33
|
+
header: () => Effect.Effect<JsonObject | undefined, unknown>;
|
|
27
34
|
summaries: () => Effect.Effect<S[], unknown, never>;
|
|
28
35
|
resolve: (name: string) => Effect.Effect<A | undefined, unknown, never>;
|
|
29
36
|
}, unknown, never>;
|
|
@@ -66,10 +66,10 @@ export declare const prepareElicitation: (input: unknown) => Effect.Effect<{
|
|
|
66
66
|
} | {
|
|
67
67
|
readonly type: "number" | "integer";
|
|
68
68
|
readonly default?: number;
|
|
69
|
+
readonly maximum?: number;
|
|
69
70
|
readonly description?: string;
|
|
70
71
|
readonly title?: string;
|
|
71
72
|
readonly minimum?: number;
|
|
72
|
-
readonly maximum?: number;
|
|
73
73
|
} | {
|
|
74
74
|
readonly type: "boolean";
|
|
75
75
|
readonly default?: boolean;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Redacted } from "effect";
|
|
2
|
+
import type { ResolvedAccounts } from "../contracts/host.js";
|
|
3
|
+
/** Fields of `FailureDetail` as constructor input. */
|
|
4
|
+
export interface FailureDetail {
|
|
5
|
+
readonly source?: "app" | "storage" | "service";
|
|
6
|
+
readonly errorName?: string;
|
|
7
|
+
readonly code?: string;
|
|
8
|
+
readonly message?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Every credential field value of a slot-to-account record, longest first. Accepts both resolved
|
|
12
|
+
* host accounts and bound author accounts; each account keeps its credential values in `fields`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const accountFieldSecrets: (accounts: unknown) => string[];
|
|
15
|
+
/** Every credential field value of an invocation's selected accounts. */
|
|
16
|
+
export declare const accountSecrets: (accounts: Redacted.Redacted<ResolvedAccounts>) => string[];
|
|
17
|
+
/** Replace account secrets and bound the message for the runtime boundary. */
|
|
18
|
+
export declare const boundFailureMessage: (message: string, secrets: readonly string[]) => string;
|
|
19
|
+
/** `Name: message` for any thrown value, before redaction. */
|
|
20
|
+
export declare const describeFailure: (error: unknown) => string;
|
|
21
|
+
/**
|
|
22
|
+
* Describe what an operation raised for the app's own caller. App data failures keep their
|
|
23
|
+
* reason as a code; any other thrown value is the app's own error. Account secrets are replaced.
|
|
24
|
+
*/
|
|
25
|
+
export declare const failureDetail: (error: unknown, secrets: readonly string[]) => FailureDetail;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
2
|
import { GraphqlToolsOptions } from "../contracts/graphql.js";
|
|
3
|
-
import type { DynamicTools } from "../contracts/dynamic-tools.js";
|
|
4
3
|
import { type CatalogCacheOptions } from "./catalog-cache.js";
|
|
5
4
|
import { type OperationKinds } from "./protocol-operations.js";
|
|
6
5
|
export interface GraphqlCatalogOptions extends GraphqlToolsOptions, CatalogCacheOptions {
|
|
7
6
|
}
|
|
8
|
-
export declare const graphqlCatalog: (options: GraphqlCatalogOptions, kinds: OperationKinds) => Effect.Effect<
|
|
9
|
-
dynamicTools: DynamicTools;
|
|
10
|
-
}, unknown, never>;
|
|
7
|
+
export declare const graphqlCatalog: (options: GraphqlCatalogOptions, kinds: OperationKinds) => Effect.Effect<import("./operations.js").RouterDeclaration<unknown, unknown>, unknown, never>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
|
-
import type { DynamicTools } from "../contracts/dynamic-tools.js";
|
|
3
2
|
import { McpToolsOptions } from "../contracts/mcp.js";
|
|
4
3
|
import { type CatalogCacheOptions } from "./catalog-cache.js";
|
|
5
4
|
import { type OperationKinds } from "./protocol-operations.js";
|
|
@@ -7,6 +6,4 @@ import { type OperationKinds } from "./protocol-operations.js";
|
|
|
7
6
|
export interface McpCatalogOptions extends McpToolsOptions, CatalogCacheOptions {
|
|
8
7
|
}
|
|
9
8
|
/** Construction opens no transport unless explicit revalidation is requested. */
|
|
10
|
-
export declare const mcpCatalog: (options: McpCatalogOptions, kinds: OperationKinds) => Effect.Effect<
|
|
11
|
-
dynamicTools: DynamicTools;
|
|
12
|
-
}, unknown, never>;
|
|
9
|
+
export declare const mcpCatalog: (options: McpCatalogOptions, kinds: OperationKinds) => Effect.Effect<import("./operations.js").RouterDeclaration<unknown, unknown>, unknown, never>;
|
|
@@ -14,26 +14,42 @@ export interface WithMcpClient {
|
|
|
14
14
|
/** Shared client operations never cache catalogs or account credentials. */
|
|
15
15
|
export declare function mcpClient(withClient: WithMcpClient, timeoutMs: number, failure: (phase: McpError["phase"], error: unknown) => McpError | ProviderError): {
|
|
16
16
|
list: Effect.Effect<{
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
readonly
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
readonly
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
readonly
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
tools: {
|
|
18
|
+
readonly name: string;
|
|
19
|
+
readonly inputSchema: {
|
|
20
|
+
readonly [x: string]: Schema.Json;
|
|
21
|
+
};
|
|
22
|
+
readonly description?: string | undefined;
|
|
23
|
+
readonly _meta?: {
|
|
24
|
+
readonly [x: string]: Schema.Json;
|
|
25
|
+
} | undefined;
|
|
26
|
+
readonly title?: string | undefined;
|
|
27
|
+
readonly annotations?: {
|
|
28
|
+
readonly title?: string;
|
|
29
|
+
readonly readOnlyHint?: boolean;
|
|
30
|
+
readonly destructiveHint?: boolean;
|
|
31
|
+
readonly idempotentHint?: boolean;
|
|
32
|
+
readonly openWorldHint?: boolean;
|
|
33
|
+
} | undefined;
|
|
34
|
+
readonly outputSchema?: {
|
|
35
|
+
readonly [x: string]: Schema.Json;
|
|
36
|
+
} | undefined;
|
|
37
|
+
}[];
|
|
38
|
+
server: {
|
|
39
|
+
readonly version?: string;
|
|
40
|
+
readonly name?: string;
|
|
41
|
+
readonly description?: string;
|
|
30
42
|
readonly title?: string;
|
|
31
|
-
readonly
|
|
32
|
-
readonly
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
43
|
+
readonly instructions?: string;
|
|
44
|
+
readonly icons?: readonly {
|
|
45
|
+
readonly src: string;
|
|
46
|
+
readonly mimeType?: string;
|
|
47
|
+
readonly sizes?: readonly string[];
|
|
48
|
+
readonly theme?: "light" | "dark";
|
|
49
|
+
}[];
|
|
50
|
+
readonly websiteUrl?: string;
|
|
51
|
+
} | {};
|
|
52
|
+
}, ProviderError | McpError, never>;
|
|
37
53
|
call: (name: string, input: JsonObject, context: McpToolContext) => Effect.Effect<{
|
|
38
54
|
readonly content: readonly {
|
|
39
55
|
readonly [x: string]: Schema.Json;
|
|
@@ -4,26 +4,42 @@ import { McpError, McpToolsOptions } from "../contracts/mcp.js";
|
|
|
4
4
|
/** Discover and call with a fresh selected-account transport for each operation. */
|
|
5
5
|
export declare const mcpClientEffect: (input: McpToolsOptions, changed?: Effect.Effect<void, unknown>) => Effect.Effect<{
|
|
6
6
|
list: Effect.Effect<{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
readonly
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
readonly
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
readonly
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
tools: {
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly inputSchema: {
|
|
10
|
+
readonly [x: string]: Schema.Json;
|
|
11
|
+
};
|
|
12
|
+
readonly description?: string | undefined;
|
|
13
|
+
readonly _meta?: {
|
|
14
|
+
readonly [x: string]: Schema.Json;
|
|
15
|
+
} | undefined;
|
|
16
|
+
readonly title?: string | undefined;
|
|
17
|
+
readonly annotations?: {
|
|
18
|
+
readonly title?: string;
|
|
19
|
+
readonly readOnlyHint?: boolean;
|
|
20
|
+
readonly destructiveHint?: boolean;
|
|
21
|
+
readonly idempotentHint?: boolean;
|
|
22
|
+
readonly openWorldHint?: boolean;
|
|
23
|
+
} | undefined;
|
|
24
|
+
readonly outputSchema?: {
|
|
25
|
+
readonly [x: string]: Schema.Json;
|
|
26
|
+
} | undefined;
|
|
27
|
+
}[];
|
|
28
|
+
server: {
|
|
29
|
+
readonly version?: string;
|
|
30
|
+
readonly name?: string;
|
|
31
|
+
readonly description?: string;
|
|
20
32
|
readonly title?: string;
|
|
21
|
-
readonly
|
|
22
|
-
readonly
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
33
|
+
readonly instructions?: string;
|
|
34
|
+
readonly icons?: readonly {
|
|
35
|
+
readonly src: string;
|
|
36
|
+
readonly mimeType?: string;
|
|
37
|
+
readonly sizes?: readonly string[];
|
|
38
|
+
readonly theme?: "light" | "dark";
|
|
39
|
+
}[];
|
|
40
|
+
readonly websiteUrl?: string;
|
|
41
|
+
} | {};
|
|
42
|
+
}, ProviderError | McpError, never>;
|
|
27
43
|
call: (name: string, input: import("../index.js").JsonObject, context: import("../mcp.js").McpToolContext) => Effect.Effect<{
|
|
28
44
|
readonly content: readonly {
|
|
29
45
|
readonly [x: string]: Schema.Json;
|