apps 0.0.1-beta.0 → 0.0.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -4
- package/framework-reference.json +1 -1
- package/js/{chunk-BPEFS4YF.js → chunk-2HHMABB6.js} +70 -14
- package/js/{chunk-SBKHUC5L.js → chunk-4LPG6RCH.js} +2 -2
- package/js/{chunk-LOKGDT6B.js → chunk-6IIO4NPI.js} +5 -4
- package/js/chunk-6YBRWRK3.js +160 -0
- package/js/{chunk-7JXHF5IF.js → chunk-BMOIAIVR.js} +1 -1
- package/js/chunk-CZ7CSFO4.js +39 -0
- package/js/{chunk-YDR4CPJA.js → chunk-EVJUVWN2.js} +8 -8
- package/js/{chunk-2OTCEKL2.js → chunk-FW5HBOIK.js} +2352 -1493
- package/js/{chunk-EP6AEUZO.js → chunk-FZJOYIZO.js} +1 -1
- package/js/{chunk-WIDTG42X.js → chunk-G7IE6BKC.js} +79 -26
- package/js/{chunk-VFUZI3NY.js → chunk-HDJH3RPR.js} +4 -4
- package/js/{chunk-HP7E42X6.js → chunk-IHQ4ML7K.js} +693 -219
- package/js/{chunk-Q2FD5IBM.js → chunk-KOXMLKTM.js} +430 -41
- package/js/{chunk-D6BKYP2L.js → chunk-M6ZRRIBI.js} +4 -4
- package/js/chunk-NCYXZN2G.js +6274 -0
- package/js/{chunk-3ANFZFCV.js → chunk-OHRT55C4.js} +15 -15
- package/js/{chunk-R6JMJSVT.js → chunk-PLCMJREA.js} +2 -2
- package/js/{chunk-C24KEZXR.js → chunk-PZ36XMXW.js} +36 -2
- package/js/{chunk-W7Q5EOTS.js → chunk-QKHR7BMF.js} +32 -32
- package/js/{chunk-X3YBZCJW.js → chunk-RBAC33PQ.js} +59 -38
- package/js/{chunk-36DNRFZQ.js → chunk-SATWJKN6.js} +1 -1
- package/js/chunk-SWPD52J7.js +35 -0
- package/js/{chunk-BKVL7XAJ.js → chunk-TE4KO4HI.js} +1 -1
- package/js/chunk-W7D7WVSY.js +18 -0
- package/js/{chunk-KWTCHVLT.js → chunk-X7SFGU4Q.js} +47 -51
- package/js/chunk-YEJOQEII.js +104 -0
- package/js/{chunk-OWD2YICM.js → chunk-ZCAMUXSG.js} +116 -87
- package/js/chunk-ZJWDMTE3.js +63 -0
- package/js/chunk-ZTFQHGEB.js +80 -0
- package/js/client.js +11 -11
- package/js/contracts.js +81 -25
- package/js/effect.js +20 -15
- package/js/graphql.js +223 -121
- package/js/host.js +75 -19
- package/js/index.js +191 -51
- package/js/mcp/effect.js +24 -17
- package/js/mcp/stdio.js +22 -17
- package/js/mcp.js +109 -24
- package/js/openapi.js +43897 -143
- package/js/operations/approval.js +1 -1
- package/js/react.js +4 -4
- package/js/skills/effect.js +12 -0
- package/js/skills.js +857 -0
- package/js/storage/facet.js +7 -7
- package/js/ui/auth/contracts.js +6 -6
- package/js/ui/auth.js +8 -8
- package/js/ui/contracts.js +5 -5
- package/js/ui/serving.js +12 -12
- package/package.json +9 -1
- package/runtime.json +1 -1
- package/types/app-cache/src/contracts/cache.d.ts +79 -0
- package/types/app-cache/src/index.d.ts +35 -0
- package/types/apps/src/contracts/api-response-error.d.ts +43 -0
- package/types/apps/src/contracts/app.d.ts +11 -0
- package/types/apps/src/contracts/cache.d.ts +41 -0
- package/types/apps/src/contracts/dynamic-skills.d.ts +10 -0
- package/types/apps/src/contracts/dynamic-tools.d.ts +13 -0
- package/types/apps/src/contracts/graphql.d.ts +18 -1
- package/types/apps/src/contracts/host.d.ts +200 -7
- package/types/apps/src/contracts/mcp.d.ts +3 -1
- package/types/apps/src/contracts/openapi-compile.d.ts +11 -0
- package/types/apps/src/contracts/openapi-document.d.ts +53 -0
- package/types/apps/src/contracts/openapi.d.ts +150 -30
- package/types/apps/src/contracts/provider-error.d.ts +15 -0
- package/types/apps/src/contracts/provider.d.ts +18 -1
- package/types/apps/src/contracts/skills.d.ts +113 -0
- package/types/apps/src/contracts/swagger-client.d.ts +29 -0
- package/types/apps/src/graphql.d.ts +6 -6
- package/types/apps/src/host.d.ts +1 -0
- package/types/apps/src/implementation/account-operations.d.ts +122 -3
- package/types/apps/src/implementation/app.d.ts +1 -1
- package/types/apps/src/implementation/cache-session.d.ts +7 -0
- package/types/apps/src/implementation/cache.d.ts +6 -0
- package/types/apps/src/implementation/catalog-cache.d.ts +29 -0
- package/types/apps/src/implementation/dynamic-skills.d.ts +7 -0
- package/types/apps/src/implementation/dynamic-tools.d.ts +8 -0
- package/types/apps/src/implementation/elicitation.d.ts +12 -12
- package/types/apps/src/implementation/git.d.ts +25 -0
- package/types/apps/src/implementation/graphql-catalog.d.ts +10 -0
- package/types/apps/src/implementation/graphql.d.ts +81 -3
- package/types/apps/src/implementation/inflate.d.ts +16 -0
- package/types/apps/src/implementation/input-problems.d.ts +3 -0
- package/types/apps/src/implementation/mcp-call.d.ts +3 -2
- package/types/apps/src/implementation/mcp-catalog.d.ts +12 -0
- package/types/apps/src/implementation/mcp-client.d.ts +9 -8
- package/types/apps/src/implementation/mcp-stdio.d.ts +1 -1
- package/types/apps/src/implementation/mcp-tools.d.ts +6 -3
- package/types/apps/src/implementation/mcp.d.ts +39 -2
- package/types/apps/src/implementation/openapi-compile.d.ts +119 -0
- package/types/apps/src/implementation/openapi-document.d.ts +53 -0
- package/types/apps/src/implementation/openapi-request.d.ts +11 -4
- package/types/apps/src/implementation/openapi-source.d.ts +36 -0
- package/types/apps/src/implementation/openapi.d.ts +39 -3
- package/types/apps/src/implementation/provider-error.d.ts +10 -0
- package/types/apps/src/implementation/schema.d.ts +11 -5
- package/types/apps/src/implementation/skill-files.d.ts +10 -0
- package/types/apps/src/implementation/skills.d.ts +43 -0
- package/types/apps/src/index.d.ts +7 -0
- package/types/apps/src/mcp.d.ts +5 -5
- package/types/apps/src/openapi.d.ts +3 -1
- package/types/apps/src/skills.d.ts +72 -0
- package/types/telemetry/src/config.d.ts +2 -0
- package/js/chunk-22WRQZT7.js +0 -389
- package/js/chunk-MLKGABMK.js +0 -9
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import "../contracts/swagger-client.ts";
|
|
2
|
+
import { ProviderError } from "../contracts/provider-error.js";
|
|
3
|
+
/** Swagger constructs requests; Effect owns HTTP policy and bounded results. */
|
|
2
4
|
import { Effect, Schema } from "effect";
|
|
3
|
-
import {
|
|
5
|
+
import { OpenapiResponseError } from "../contracts/api-response-error.js";
|
|
6
|
+
import { OpenapiError, type CredentialBinding, type OpenapiOperation, type OpenapiAccount, type OpenapiErrorResponse } from "../contracts/openapi.js";
|
|
7
|
+
type DeclaredError = OpenapiErrorResponse & {
|
|
8
|
+
readonly decoder: Schema.Decoder<Schema.Json>;
|
|
9
|
+
};
|
|
4
10
|
/** Create request helpers from credential-free generated authentication metadata. */
|
|
5
11
|
export declare function createRequest(config: {
|
|
6
12
|
readonly methods: Readonly<Record<string, readonly CredentialBinding[]>>;
|
|
7
13
|
readonly oauth: readonly string[];
|
|
8
14
|
}): {
|
|
9
|
-
available: (op: OpenapiOperation,
|
|
10
|
-
call: (op: OpenapiOperation, input: unknown, account: OpenapiAccount | undefined) => Effect.Effect<Schema.Json, OpenapiError, never>;
|
|
15
|
+
available: (op: OpenapiOperation, account: OpenapiAccount | undefined) => boolean;
|
|
16
|
+
call: (op: OpenapiOperation, input: unknown, account: OpenapiAccount | undefined, errors: readonly DeclaredError[]) => Effect.Effect<Schema.Json, ProviderError | OpenapiResponseError | OpenapiError, never>;
|
|
11
17
|
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** Revisioned OpenAPI sources. Calls read a manifest, one operation and only its schema dependencies. */
|
|
2
|
+
import { Duration } from "effect";
|
|
3
|
+
import type { AppCache } from "../contracts/cache.js";
|
|
4
|
+
import { OpenapiOperation, type OpenapiToolsOptions } from "../contracts/openapi.js";
|
|
5
|
+
import { JsonObject, type JsonValue } from "../contracts/schema.js";
|
|
6
|
+
import type { DynamicTools } from "../contracts/dynamic-tools.js";
|
|
7
|
+
import { type OperationKinds } from "./protocol-operations.js";
|
|
8
|
+
/** Static credential placement and destination are reviewed when the app is authored/imported. */
|
|
9
|
+
export interface OpenapiSourceOptions extends Omit<OpenapiToolsOptions, "operations" | "definitions"> {
|
|
10
|
+
readonly cache: AppCache;
|
|
11
|
+
readonly source: {
|
|
12
|
+
readonly url: string;
|
|
13
|
+
} | {
|
|
14
|
+
readonly document: JsonObject;
|
|
15
|
+
};
|
|
16
|
+
readonly allowedOrigin: string;
|
|
17
|
+
readonly securitySchemes: Readonly<Record<string, JsonObject>>;
|
|
18
|
+
readonly baseUrl?: string;
|
|
19
|
+
readonly freshFor?: Duration.Input;
|
|
20
|
+
readonly staleFor?: Duration.Input;
|
|
21
|
+
readonly kinds?: OperationKinds;
|
|
22
|
+
readonly fallbackSecurity?: OpenapiOperation["request"]["security"];
|
|
23
|
+
readonly patches?: readonly {
|
|
24
|
+
readonly op: "add" | "remove" | "replace";
|
|
25
|
+
readonly path: string;
|
|
26
|
+
readonly value?: JsonValue;
|
|
27
|
+
}[];
|
|
28
|
+
}
|
|
29
|
+
/** JSON-object patches are static app configuration and are reapplied to every revision. */
|
|
30
|
+
export declare function patchOpenapi(root: JsonObject, patches: OpenapiSourceOptions["patches"]): JsonObject;
|
|
31
|
+
/** No I/O during app construction. All accounts share credential-free compilation. */
|
|
32
|
+
export declare const liveOpenapiOperations: (options: OpenapiSourceOptions) => {
|
|
33
|
+
readonly queries: {};
|
|
34
|
+
readonly mutations: {};
|
|
35
|
+
readonly dynamicTools: DynamicTools;
|
|
36
|
+
};
|
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
/** Evaluate normalized metadata into ordinary tools, with account-specific security filtering. */
|
|
2
|
-
import { Effect } from "effect";
|
|
3
|
-
import { OpenapiError, OpenapiToolsOptions, type OpenapiTools } from "../contracts/openapi.js";
|
|
2
|
+
import { Effect, Schema } from "effect";
|
|
3
|
+
import { OpenapiError, OpenapiToolsOptions, type OpenapiTools, type OpenapiOperation, type OpenapiParameterDefaults } from "../contracts/openapi.js";
|
|
4
|
+
import type { JsonObject, JsonValue } from "../contracts/schema.js";
|
|
5
|
+
/** Names of shared definitions a JSON value references directly as `#/$defs/<name>`. */
|
|
6
|
+
export declare function references(value: JsonValue, found?: Set<string>): Set<string>;
|
|
7
|
+
/**
|
|
8
|
+
* Make a schema self-contained with only the shared definitions it reaches. Cycles stay
|
|
9
|
+
* references to the same definition. A missing definition stays unresolved and fails when
|
|
10
|
+
* the schema compiles. The schema's own `$defs` keep precedence.
|
|
11
|
+
*/
|
|
12
|
+
export declare const bundler: (definitions: Readonly<Record<string, JsonObject>>) => (schema: JsonObject) => JsonObject;
|
|
13
|
+
/**
|
|
14
|
+
* Make account-bound parameters optional. Validators omit the values so they stay account-free;
|
|
15
|
+
* the published schema includes them as `default` so callers can see what an omission sends.
|
|
16
|
+
*/
|
|
17
|
+
export declare const parameterDefaultsInput: (op: OpenapiOperation, defaults: OpenapiParameterDefaults | undefined, publish: boolean) => JsonObject;
|
|
18
|
+
/** Account-free validators can be reused inside a Worker for one immutable revision. */
|
|
19
|
+
export declare const prepareOpenapiOperation: (op: OpenapiOperation, definitions: Readonly<Record<string, JsonObject>>, defaults?: OpenapiParameterDefaults) => Effect.Effect<{
|
|
20
|
+
input: Schema.declareConstructor<Schema.Json, Schema.Json, readonly [], Schema.Json>;
|
|
21
|
+
errors: {
|
|
22
|
+
decoder: Schema.declareConstructor<Schema.Json, Schema.Json, readonly [], Schema.Json>;
|
|
23
|
+
code: string;
|
|
24
|
+
status: number;
|
|
25
|
+
message: {
|
|
26
|
+
readonly source: "body";
|
|
27
|
+
} | {
|
|
28
|
+
readonly source: "schema";
|
|
29
|
+
readonly value: string;
|
|
30
|
+
};
|
|
31
|
+
schema: {
|
|
32
|
+
readonly [x: string]: Schema.Json;
|
|
33
|
+
};
|
|
34
|
+
}[];
|
|
35
|
+
output: () => {
|
|
36
|
+
readonly [x: string]: Schema.Json;
|
|
37
|
+
} | undefined;
|
|
38
|
+
}, never, never>;
|
|
39
|
+
export type PreparedOpenapiOperation = Effect.Success<ReturnType<typeof prepareOpenapiOperation>>;
|
|
4
40
|
/** Decode retained metadata and expose only operations supported by the selected account. */
|
|
5
|
-
export declare const openapiToolsEffect: (options: OpenapiToolsOptions) => Effect.Effect<OpenapiTools, OpenapiError>;
|
|
41
|
+
export declare const openapiToolsEffect: (options: OpenapiToolsOptions, prepared?: ReadonlyMap<string, PreparedOpenapiOperation>) => Effect.Effect<OpenapiTools, OpenapiError>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Option } from "effect";
|
|
2
|
+
import { ProviderError } from "../contracts/provider-error.js";
|
|
3
|
+
/** Parse and rebuild the allowlisted fields, including when the input is already an Error instance. */
|
|
4
|
+
export declare function parseProviderError(error: unknown): Option.Option<ProviderError>;
|
|
5
|
+
/** Classify only explicit HTTP evidence. Raw provider content never enters the error. */
|
|
6
|
+
export declare function httpProviderError(status: number, headers?: Readonly<Record<string, string>>): ProviderError | undefined;
|
|
7
|
+
/** Attach the account used by the enclosing operation, without preserving arbitrary thrown fields. */
|
|
8
|
+
export declare function accountProviderError<E>(error: E, accountId: string): E | ProviderError;
|
|
9
|
+
/** GraphQL has no standard auth code; recognize these documented codes without guessing from prose. */
|
|
10
|
+
export declare function graphqlProviderError(errors: readonly unknown[], status: number): ProviderError | undefined;
|
|
@@ -64,6 +64,10 @@ declare const ImportedJsonSchema: unique symbol;
|
|
|
64
64
|
export declare const importedJsonSchema: (decoder: EffectSchema.Decoder<unknown>) => unknown | undefined;
|
|
65
65
|
/** Attach a composed discovery document without replacing its authoritative native decoder. */
|
|
66
66
|
export declare const withJsonSchemaDocument: <S extends EffectSchema.Decoder<unknown>>(decoder: S, document: JsonObject) => S;
|
|
67
|
+
/** Compute a value on first use and reuse it. */
|
|
68
|
+
export declare const once: <A>(compute: () => A) => (() => A);
|
|
69
|
+
/** Attach a discovery document that is built only when it is first read. */
|
|
70
|
+
export declare const withLazyJsonSchemaDocument: <S extends EffectSchema.Decoder<unknown>>(decoder: S, document: () => JsonObject) => S;
|
|
67
71
|
/**
|
|
68
72
|
* Relocate a self-contained JSON Schema under a document pointer. Resolve references
|
|
69
73
|
* before nesting so account schemas can reuse definition names, IDs and anchors.
|
|
@@ -76,12 +80,14 @@ export declare const compileJsonSchemaDecoder: (document: JsonObject) => Effect.
|
|
|
76
80
|
readonly [x: string]: EffectSchema.Json;
|
|
77
81
|
};
|
|
78
82
|
}, ValidationError, never>;
|
|
83
|
+
/**
|
|
84
|
+
* Build the document only when a value is first decoded or the schema is described, then
|
|
85
|
+
* compile its validator once. Imported apps can share definitions between many schemas
|
|
86
|
+
* without making each one self-contained up front.
|
|
87
|
+
*/
|
|
88
|
+
export declare const lazyJsonSchemaDecoder: (document: () => JsonObject) => Effect.Effect<EffectSchema.declareConstructor<EffectSchema.Json, EffectSchema.Json, readonly [], EffectSchema.Json>, never, never>;
|
|
79
89
|
/** Preserve the JSON document; compile its validator only when a value is first decoded. */
|
|
80
|
-
export declare const jsonSchemaDecoder: (input: unknown) => Effect.Effect<EffectSchema.declareConstructor<EffectSchema.Json, EffectSchema.Json, readonly [], EffectSchema.Json
|
|
81
|
-
[ImportedJsonSchema]: {
|
|
82
|
-
readonly [x: string]: EffectSchema.Json;
|
|
83
|
-
};
|
|
84
|
-
}, ValidationError, never>;
|
|
90
|
+
export declare const jsonSchemaDecoder: (input: unknown) => Effect.Effect<EffectSchema.declareConstructor<EffectSchema.Json, EffectSchema.Json, readonly [], EffectSchema.Json>, ValidationError, never>;
|
|
85
91
|
/** Import JSON metadata now; unsupported schemas and invalid values fail when parsed. */
|
|
86
92
|
export declare const jsonSchema: (input: unknown) => Schema<EffectSchema.Json>;
|
|
87
93
|
/** Database declaration retained by primitive constructors; nested payload schemas are not database fields. */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** One parser for packaged, GitHub and well-known skill files. */
|
|
2
|
+
import { Effect } from "effect";
|
|
3
|
+
import { AppSkillSource, SkillDefinitionInvalid, SkillFile, type FolderSkillsOptions } from "../contracts/skills.js";
|
|
4
|
+
/** Parse one skill directory, retaining its full document and validating an optional source name. */
|
|
5
|
+
export declare const skillFromFiles: (input: readonly SkillFile[], source?: {
|
|
6
|
+
readonly directory?: string;
|
|
7
|
+
readonly name?: string;
|
|
8
|
+
}) => Effect.Effect<AppSkillSource, SkillDefinitionInvalid>;
|
|
9
|
+
/** Select immediate skill directories from packaged text files. Never accesses the host filesystem. */
|
|
10
|
+
export declare const folderSkillsEffect: (options: FolderSkillsOptions) => Effect.Effect<readonly AppSkillSource[], SkillDefinitionInvalid>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Remote skill readers return complete portable bundles, never installed host files. */
|
|
2
|
+
import { Effect } from "effect";
|
|
3
|
+
import { SkillLoadFailed, type GitHubSkillsOptions, type WellKnownSkillsOptions, type SkillTransport } from "../contracts/skills.js";
|
|
4
|
+
/** Give every failure without a message one that names the service. */
|
|
5
|
+
export declare const withService: (service: string | undefined) => <A, R>(effect: Effect.Effect<A, SkillLoadFailed, R>) => Effect.Effect<A, SkillLoadFailed, R>;
|
|
6
|
+
/** One loader invocation owns its byte budget and all of its network requests. */
|
|
7
|
+
export declare const reader: (transport: SkillTransport) => Effect.Effect<{
|
|
8
|
+
fetchBytes: (url: string, post?: {
|
|
9
|
+
readonly body: Uint8Array;
|
|
10
|
+
readonly headers: Record<string, string>;
|
|
11
|
+
}) => Effect.Effect<Uint8Array<ArrayBuffer>, SkillLoadFailed, never>;
|
|
12
|
+
read: (url: string) => Effect.Effect<string, SkillLoadFailed, never>;
|
|
13
|
+
json: (url: string) => Effect.Effect<unknown, SkillLoadFailed, never>;
|
|
14
|
+
}, never, never>;
|
|
15
|
+
export declare const githubSkillsEffect: (options: GitHubSkillsOptions) => Effect.Effect<readonly {
|
|
16
|
+
readonly name: string;
|
|
17
|
+
readonly description: string;
|
|
18
|
+
readonly files: readonly {
|
|
19
|
+
readonly path: string;
|
|
20
|
+
readonly content: string;
|
|
21
|
+
}[];
|
|
22
|
+
readonly license?: string;
|
|
23
|
+
readonly compatibility?: string;
|
|
24
|
+
readonly metadata?: {
|
|
25
|
+
readonly [x: string]: string;
|
|
26
|
+
};
|
|
27
|
+
readonly "allowed-tools"?: string;
|
|
28
|
+
}[], SkillLoadFailed, never>;
|
|
29
|
+
/** Fetch all indexed files and reject a publication whose index changes during the read. */
|
|
30
|
+
export declare const wellKnownSkillsEffect: (options: WellKnownSkillsOptions) => Effect.Effect<readonly {
|
|
31
|
+
readonly name: string;
|
|
32
|
+
readonly description: string;
|
|
33
|
+
readonly files: readonly {
|
|
34
|
+
readonly path: string;
|
|
35
|
+
readonly content: string;
|
|
36
|
+
}[];
|
|
37
|
+
readonly license?: string;
|
|
38
|
+
readonly compatibility?: string;
|
|
39
|
+
readonly metadata?: {
|
|
40
|
+
readonly [x: string]: string;
|
|
41
|
+
};
|
|
42
|
+
readonly "allowed-tools"?: string;
|
|
43
|
+
}[], SkillLoadFailed, never>;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export { ProviderError } from "./contracts/provider-error.js";
|
|
2
|
+
export type { AppCache, CacheLoadContext, CacheGetOptions } from "./contracts/cache.js";
|
|
3
|
+
export { CacheError } from "../../app-cache/src/contracts/cache.js";
|
|
1
4
|
/**
|
|
2
5
|
* Public author API. Native contracts live in contracts/; this boundary
|
|
3
6
|
* exposes ordinary declarations, schema helpers and Promise operations.
|
|
@@ -14,6 +17,9 @@ export { type Fields, type Infer, type ObjectSchema, type ObjectValue, type Sche
|
|
|
14
17
|
export { type AccountOf, type AuthMethod, type AuthMethodData, type AuthMethods, type ManyAccounts, type OAuth2Config, type Provider, } from "./contracts/provider.js";
|
|
15
18
|
export { defineProvider } from "./implementation/provider.js";
|
|
16
19
|
export { accountOperations } from "./implementation/account-operations.js";
|
|
20
|
+
export { dynamicTools } from "./implementation/dynamic-tools.js";
|
|
21
|
+
export { dynamicSkills } from "./implementation/dynamic-skills.js";
|
|
22
|
+
export type { HostedTool as OperationDescription } from "./contracts/host.js";
|
|
17
23
|
/** A secrets declaration inferred from an author schema. */
|
|
18
24
|
export type SecretsMethod<Shape extends ObjectSchema<Fields>> = NativeSecretsMethod<EffectSchema.Decoder<Infer<Shape>>>;
|
|
19
25
|
/** An OAuth declaration inferred from its author-facing response schema. */
|
|
@@ -56,3 +62,4 @@ export type { OperationContext } from "./contracts/operations.js";
|
|
|
56
62
|
export { workflow, type Workflow, type WorkflowDeclaration } from "./implementation/workflows.js";
|
|
57
63
|
export { NonRetryableError, WorkflowFailure, type WorkflowContext, type WorkflowStepContext, type WorkflowStep, type WorkflowStepOptions, type WorkflowDuration, type WorkflowReads, type WorkflowControls, } from "./contracts/workflows.js";
|
|
58
64
|
export { interval, cron, type ScheduleDeclaration } from "./implementation/schedules.js";
|
|
65
|
+
export type { AppSkillSource as Skill, SkillFile } from "./contracts/skills.js";
|
package/types/apps/src/mcp.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** HTTP MCP helpers. Requires the optional @modelcontextprotocol/sdk peer. */
|
|
2
|
-
import {
|
|
3
|
-
import type
|
|
2
|
+
import type { OperationKinds } from "./implementation/protocol-operations.js";
|
|
3
|
+
import { type McpCatalogOptions } from "./implementation/mcp-catalog.js";
|
|
4
|
+
export type { McpCatalogOptions } from "./implementation/mcp-catalog.js";
|
|
4
5
|
export { McpError, type McpToolContext, type McpToolsOptions, type McpToolResult, } from "./contracts/mcp.js";
|
|
5
6
|
/** Discover operations for the selected account. Kinds override uncertain upstream read-only hints. */
|
|
6
|
-
export declare const mcpOperations: (options:
|
|
7
|
-
|
|
8
|
-
mutations: Record<string, import("./index.js").Operation<import("effect/Schema").Json, unknown, "mutation", import("./index.js").OperationContext>>;
|
|
7
|
+
export declare const mcpOperations: (options: McpCatalogOptions, kinds?: OperationKinds) => Promise<{
|
|
8
|
+
dynamicTools: import("./contracts/dynamic-tools.js").DynamicTools;
|
|
9
9
|
}>;
|
|
10
10
|
export type { OperationKinds } from "./implementation/protocol-operations.js";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/** OpenAPI helpers over normalized operation metadata; no optional dependency is needed. */
|
|
2
2
|
import { type OperationKinds } from "./implementation/protocol-operations.js";
|
|
3
3
|
import type { OpenapiToolsOptions } from "./contracts/openapi.js";
|
|
4
|
-
export { OpenapiError, type OpenapiToolsOptions, type OpenapiOperation, type CredentialBinding,
|
|
4
|
+
export { OpenapiError, isOpenapiTextMedia, openapiBinaryResultSchema, OpenapiErrorResponse, type OpenapiToolsOptions, type OpenapiOperation, type CredentialBinding, OpenapiParameter, OpenapiRequestBody, openapiMediaKind, } from "./contracts/openapi.js";
|
|
5
5
|
/** Discover operations for the selected account. Kinds override uncertain upstream read-only hints. */
|
|
6
6
|
export declare const openapiOperations: (options: OpenapiToolsOptions, kinds?: OperationKinds) => Promise<{
|
|
7
7
|
queries: Record<string, import("./index.js").Operation<import("effect/Schema").Json, unknown, "query", import("./index.js").OperationContext>>;
|
|
8
8
|
mutations: Record<string, import("./index.js").Operation<import("effect/Schema").Json, unknown, "mutation", import("./index.js").OperationContext>>;
|
|
9
9
|
}>;
|
|
10
10
|
export type { OperationKinds } from "./implementation/protocol-operations.js";
|
|
11
|
+
export * from "./contracts/openapi-compile.js";
|
|
12
|
+
export { liveOpenapiOperations, type OpenapiSourceOptions, } from "./implementation/openapi-source.js";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type FolderSkillsOptions, type GitHubSkillsOptions, type SkillReaderOptions, type WellKnownSkillsOptions, type SkillFile } from "./contracts/skills.js";
|
|
2
|
+
export { SkillLoadFailed, SkillDefinitionInvalid, SkillServiceName, type SkillReaderOptions, type FolderSkillsOptions, type AppSkillSource as Skill, type SkillFile, type GitHubSkillsOptions, type WellKnownSkillsOptions, } from "./contracts/skills.js";
|
|
3
|
+
/** Fetch a public GitHub skill collection from one resolved commit. Mutable refs refresh on each call. */
|
|
4
|
+
export declare const githubSkills: (options: GitHubSkillsOptions) => Promise<readonly {
|
|
5
|
+
readonly name: string;
|
|
6
|
+
readonly description: string;
|
|
7
|
+
readonly files: readonly {
|
|
8
|
+
readonly path: string;
|
|
9
|
+
readonly content: string;
|
|
10
|
+
}[];
|
|
11
|
+
readonly license?: string;
|
|
12
|
+
readonly compatibility?: string;
|
|
13
|
+
readonly metadata?: {
|
|
14
|
+
readonly [x: string]: string;
|
|
15
|
+
};
|
|
16
|
+
readonly "allowed-tools"?: string;
|
|
17
|
+
}[]>;
|
|
18
|
+
/** Fetch a published skill index and its text files, with no persistent cache. */
|
|
19
|
+
export declare const wellKnownSkills: (options: WellKnownSkillsOptions) => Promise<readonly {
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly description: string;
|
|
22
|
+
readonly files: readonly {
|
|
23
|
+
readonly path: string;
|
|
24
|
+
readonly content: string;
|
|
25
|
+
}[];
|
|
26
|
+
readonly license?: string;
|
|
27
|
+
readonly compatibility?: string;
|
|
28
|
+
readonly metadata?: {
|
|
29
|
+
readonly [x: string]: string;
|
|
30
|
+
};
|
|
31
|
+
readonly "allowed-tools"?: string;
|
|
32
|
+
}[]>;
|
|
33
|
+
/** Parse a bundled standard skill directory into an app capability. */
|
|
34
|
+
export declare const fileSkill: (files: readonly SkillFile[]) => Promise<{
|
|
35
|
+
readonly name: string;
|
|
36
|
+
readonly description: string;
|
|
37
|
+
readonly files: readonly {
|
|
38
|
+
readonly path: string;
|
|
39
|
+
readonly content: string;
|
|
40
|
+
}[];
|
|
41
|
+
readonly license?: string;
|
|
42
|
+
readonly compatibility?: string;
|
|
43
|
+
readonly metadata?: {
|
|
44
|
+
readonly [x: string]: string;
|
|
45
|
+
};
|
|
46
|
+
readonly "allowed-tools"?: string;
|
|
47
|
+
}>;
|
|
48
|
+
/** Read skill directories from ctx.files. Omitted path selects skills/; missing folders return []. */
|
|
49
|
+
export declare const folderSkills: (options: FolderSkillsOptions) => Promise<readonly {
|
|
50
|
+
readonly name: string;
|
|
51
|
+
readonly description: string;
|
|
52
|
+
readonly files: readonly {
|
|
53
|
+
readonly path: string;
|
|
54
|
+
readonly content: string;
|
|
55
|
+
}[];
|
|
56
|
+
readonly license?: string;
|
|
57
|
+
readonly compatibility?: string;
|
|
58
|
+
readonly metadata?: {
|
|
59
|
+
readonly [x: string]: string;
|
|
60
|
+
};
|
|
61
|
+
readonly "allowed-tools"?: string;
|
|
62
|
+
}[]>;
|
|
63
|
+
/**
|
|
64
|
+
* Read files for a custom remote skill loader, such as one for GitLab. Reads share one byte
|
|
65
|
+
* budget and reject with the same safe SkillLoadFailed errors as githubSkills, naming `service`.
|
|
66
|
+
*/
|
|
67
|
+
export declare const skillReader: (options: SkillReaderOptions) => {
|
|
68
|
+
/** Fetch one UTF-8 text file. */
|
|
69
|
+
text: (url: string) => Promise<string>;
|
|
70
|
+
/** Fetch and parse one JSON document. */
|
|
71
|
+
json: (url: string) => Promise<unknown>;
|
|
72
|
+
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** Telemetry configuration is parsed at composition roots; headers remain redacted. */
|
|
2
2
|
import { Config, Context, Effect, Schema } from "effect";
|
|
3
|
+
/** Bound each collector request, including its acknowledgement; exporter retries retain the batch. */
|
|
4
|
+
export declare const telemetryRequestTimeout: "5 seconds";
|
|
3
5
|
/** One private exporter target. Endpoints are complete signal URLs. */
|
|
4
6
|
export declare const TelemetryTarget: Schema.Struct<{
|
|
5
7
|
readonly url: Schema.String;
|