@frontmcp/plugin-skilled-openapi 0.0.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/LICENSE +201 -0
- package/README.md +40 -0
- package/esm/index.mjs +1536 -0
- package/esm/package.json +60 -0
- package/executor/credential-resolver.d.ts +49 -0
- package/executor/credential-resolver.d.ts.map +1 -0
- package/executor/openapi-runtime.d.ts +33 -0
- package/executor/openapi-runtime.d.ts.map +1 -0
- package/executor/schema-cache.d.ts +30 -0
- package/executor/schema-cache.d.ts.map +1 -0
- package/executor/ssrf-guard.d.ts +16 -0
- package/executor/ssrf-guard.d.ts.map +1 -0
- package/index.d.ts +7 -0
- package/index.d.ts.map +1 -0
- package/index.js +1524 -0
- package/package.json +60 -0
- package/registry/hidden-op.registry.d.ts +52 -0
- package/registry/hidden-op.registry.d.ts.map +1 -0
- package/security/authority-guard.d.ts +34 -0
- package/security/authority-guard.d.ts.map +1 -0
- package/skilled-openapi.plugin.d.ts +24 -0
- package/skilled-openapi.plugin.d.ts.map +1 -0
- package/skilled-openapi.symbols.d.ts +25 -0
- package/skilled-openapi.symbols.d.ts.map +1 -0
- package/skilled-openapi.types.d.ts +189 -0
- package/skilled-openapi.types.d.ts.map +1 -0
- package/sync/bundle-sync.service.d.ts +87 -0
- package/sync/bundle-sync.service.d.ts.map +1 -0
- package/tools/execute-action.schema.d.ts +26 -0
- package/tools/execute-action.schema.d.ts.map +1 -0
- package/tools/execute-action.tool.d.ts +6 -0
- package/tools/execute-action.tool.d.ts.map +1 -0
- package/tools/load-skill.schema.d.ts +46 -0
- package/tools/load-skill.schema.d.ts.map +1 -0
- package/tools/load-skill.tool.d.ts +6 -0
- package/tools/load-skill.tool.d.ts.map +1 -0
- package/tools/operation-tool.factory.d.ts +60 -0
- package/tools/operation-tool.factory.d.ts.map +1 -0
- package/tools/search-skill.schema.d.ts +30 -0
- package/tools/search-skill.schema.d.ts.map +1 -0
- package/tools/search-skill.tool.d.ts +6 -0
- package/tools/search-skill.tool.d.ts.map +1 -0
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@frontmcp/plugin-skilled-openapi",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "FrontMCP plugin: serve a customer's OpenAPI spec as skill bundles (signed, OpenAPI-Overlay-based) with hidden per-operation tools mediated by three meta-tools (search_skill / load_skill / execute_action).",
|
|
5
|
+
"author": "AgentFront <info@agentfront.dev>",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"mcp",
|
|
9
|
+
"frontmcp",
|
|
10
|
+
"openapi",
|
|
11
|
+
"skills",
|
|
12
|
+
"agent-skills",
|
|
13
|
+
"plugin",
|
|
14
|
+
"agentfront"
|
|
15
|
+
],
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/agentfront/frontmcp.git",
|
|
19
|
+
"directory": "plugins/plugin-skilled-openapi"
|
|
20
|
+
},
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/agentfront/frontmcp/issues"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://github.com/agentfront/frontmcp/blob/main/plugins/plugin-skilled-openapi/README.md",
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public",
|
|
27
|
+
"registry": "https://registry.npmjs.org/"
|
|
28
|
+
},
|
|
29
|
+
"type": "commonjs",
|
|
30
|
+
"main": "./index.js",
|
|
31
|
+
"module": "./esm/index.mjs",
|
|
32
|
+
"types": "./index.d.ts",
|
|
33
|
+
"sideEffects": false,
|
|
34
|
+
"exports": {
|
|
35
|
+
"./package.json": "./package.json",
|
|
36
|
+
".": {
|
|
37
|
+
"require": {
|
|
38
|
+
"types": "./index.d.ts",
|
|
39
|
+
"default": "./index.js"
|
|
40
|
+
},
|
|
41
|
+
"import": {
|
|
42
|
+
"types": "./index.d.ts",
|
|
43
|
+
"default": "./esm/index.mjs"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@frontmcp/adapters": "1.0.4",
|
|
49
|
+
"@frontmcp/auth": "1.0.4",
|
|
50
|
+
"@frontmcp/protocol": "1.0.4",
|
|
51
|
+
"@frontmcp/sdk": "1.0.4",
|
|
52
|
+
"@frontmcp/utils": "1.0.4"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"@frontmcp/lazy-zod": "1.0.4"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"reflect-metadata": "^0.2.2"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { AuthBinding, OperationDescriptor, ServiceDescriptor } from '@frontmcp/adapters/skills';
|
|
2
|
+
/**
|
|
3
|
+
* Plugin-private map of `(skillId, actionId) -> OperationDescriptor`.
|
|
4
|
+
*
|
|
5
|
+
* This is the SOLE resolution path for hidden operations. The registry is NOT
|
|
6
|
+
* exported from the plugin's public surface and is NOT a DI provider that
|
|
7
|
+
* other code paths can inject — it's reachable ONLY through the plugin's three
|
|
8
|
+
* meta-tools, which act as the authorization checkpoint.
|
|
9
|
+
*
|
|
10
|
+
* The registry also holds the bundle's services map and auth bindings so the
|
|
11
|
+
* executor can resolve outbound URLs and credentials from the same source of
|
|
12
|
+
* truth that gates discovery.
|
|
13
|
+
*/
|
|
14
|
+
export interface HiddenOpEntry {
|
|
15
|
+
/** Skill that owns this operation (used for ABAC namespacing). */
|
|
16
|
+
skillId: string;
|
|
17
|
+
/** Operation descriptor (immutable for the lifetime of this entry). */
|
|
18
|
+
op: OperationDescriptor;
|
|
19
|
+
/** Resolved service this op lives in. */
|
|
20
|
+
service: ServiceDescriptor;
|
|
21
|
+
/** Resolved auth binding for outbound credential injection. */
|
|
22
|
+
authBinding: AuthBinding;
|
|
23
|
+
/** Bundle id this entry came from. Pinned with the entry so a hot bundle-swap mid-call cannot route the op through a different bundle's credential scope. */
|
|
24
|
+
bundleId: string;
|
|
25
|
+
/** The bundle version this entry came from. Pinned at call entry to survive bundle hot-swap mid-call. */
|
|
26
|
+
bundleVersion: string;
|
|
27
|
+
}
|
|
28
|
+
export declare class HiddenOpRegistry {
|
|
29
|
+
private entries;
|
|
30
|
+
/** Number of entries currently registered. Used for `/healthz`. */
|
|
31
|
+
get size(): number;
|
|
32
|
+
/**
|
|
33
|
+
* Look up the operation registered for `(skillId, actionId)`. Returns
|
|
34
|
+
* undefined if the skill or action is unknown — the meta-tool surfaces this
|
|
35
|
+
* as a structured error to the caller.
|
|
36
|
+
*/
|
|
37
|
+
get(skillId: string, actionId: string): HiddenOpEntry | undefined;
|
|
38
|
+
/** Set or replace the entry for `(skillId, actionId)`. */
|
|
39
|
+
set(entry: HiddenOpEntry): void;
|
|
40
|
+
/** Remove the entry for `(skillId, actionId)`. Returns true if anything was removed. */
|
|
41
|
+
delete(skillId: string, actionId: string): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Remove every entry belonging to `skillId`. Used when a skill is removed
|
|
44
|
+
* by a bundle swap. Returns the number of entries removed.
|
|
45
|
+
*/
|
|
46
|
+
deleteSkill(skillId: string): number;
|
|
47
|
+
/** Iterate all entries. Used by `/healthz` and audit log. */
|
|
48
|
+
values(): IterableIterator<HiddenOpEntry>;
|
|
49
|
+
/** Reset to empty state (used by tests and panic-button). */
|
|
50
|
+
clear(): void;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=hidden-op.registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hidden-op.registry.d.ts","sourceRoot":"","sources":["../../src/registry/hidden-op.registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAErG;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,aAAa;IAC5B,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,uEAAuE;IACvE,EAAE,EAAE,mBAAmB,CAAC;IACxB,yCAAyC;IACzC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,+DAA+D;IAC/D,WAAW,EAAE,WAAW,CAAC;IACzB,6JAA6J;IAC7J,QAAQ,EAAE,MAAM,CAAC;IACjB,yGAAyG;IACzG,aAAa,EAAE,MAAM,CAAC;CACvB;AAID,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,OAAO,CAAoC;IAEnD,mEAAmE;IACnE,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;;OAIG;IACH,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAIjE,0DAA0D;IAC1D,GAAG,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAI/B,wFAAwF;IACxF,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIlD;;;OAGG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAYpC,6DAA6D;IAC7D,MAAM,IAAI,gBAAgB,CAAC,aAAa,CAAC;IAIzC,6DAA6D;IAC7D,KAAK,IAAI,IAAI;CAGd"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { AuthoritiesPolicy } from '@frontmcp/adapters/skills';
|
|
2
|
+
import { AuthoritiesEvaluatorRegistry, AuthoritiesProfileRegistry, type AuthoritiesResult } from '@frontmcp/auth';
|
|
3
|
+
import type { FrontMcpLogger } from '@frontmcp/sdk';
|
|
4
|
+
export interface AuthorityCheckArgs {
|
|
5
|
+
/** Required-authorities policy from the bundle (skill-level + op-level merged). */
|
|
6
|
+
policy: AuthoritiesPolicy | undefined;
|
|
7
|
+
/** Caller authInfo (from MCP request); shape matches libs/auth's AuthInfoLike. */
|
|
8
|
+
authInfo: Partial<{
|
|
9
|
+
user?: Record<string, unknown>;
|
|
10
|
+
extra?: Record<string, unknown>;
|
|
11
|
+
}>;
|
|
12
|
+
/** Tool/action input that ABAC predicates may reference. */
|
|
13
|
+
input: Record<string, unknown>;
|
|
14
|
+
/** Optional environment vars that ABAC predicates may reference. */
|
|
15
|
+
env?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Default permissive guard when no policy is attached. v1.2 ships fail-closed
|
|
19
|
+
* for hidden ops: skill-level policy missing AND op-level policy missing means
|
|
20
|
+
* grant — but the meta-tool layer always requires successful skill resolution
|
|
21
|
+
* and the bundle signature verifies origin trust.
|
|
22
|
+
*/
|
|
23
|
+
export declare class AuthorityGuard {
|
|
24
|
+
private readonly engine;
|
|
25
|
+
private readonly contextBuilder;
|
|
26
|
+
private readonly logger;
|
|
27
|
+
constructor(opts?: {
|
|
28
|
+
profiles?: AuthoritiesProfileRegistry;
|
|
29
|
+
evaluators?: AuthoritiesEvaluatorRegistry;
|
|
30
|
+
logger?: FrontMcpLogger;
|
|
31
|
+
});
|
|
32
|
+
check(args: AuthorityCheckArgs): Promise<AuthoritiesResult>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=authority-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authority-guard.d.ts","sourceRoot":"","sources":["../../src/security/authority-guard.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAGL,4BAA4B,EAC5B,0BAA0B,EAG1B,KAAK,iBAAiB,EACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IACjC,mFAAmF;IACnF,MAAM,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACtC,kFAAkF;IAClF,QAAQ,EAAE,OAAO,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;IACvF,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,oEAAoE;IACpE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAED;;;;;GAKG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;IAC3C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA4B;IAC3D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6B;gBAGlD,IAAI,GAAE;QACJ,QAAQ,CAAC,EAAE,0BAA0B,CAAC;QACtC,UAAU,CAAC,EAAE,4BAA4B,CAAC;QAC1C,MAAM,CAAC,EAAE,cAAc,CAAC;KACpB;IASF,KAAK,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAyBlE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DynamicPlugin, type ProviderType } from '@frontmcp/sdk';
|
|
2
|
+
import { type SkilledOpenApiPluginOptions, type SkilledOpenApiPluginOptionsInput } from './skilled-openapi.types';
|
|
3
|
+
/**
|
|
4
|
+
* `@frontmcp/plugin-skilled-openapi`
|
|
5
|
+
*
|
|
6
|
+
* Consumes signed skill bundles (OpenAPI spec + Overlay) from a configured
|
|
7
|
+
* source (static, npm, or SaaS-pull) and serves them as FrontMCP skills with
|
|
8
|
+
* three meta-tools (`search_skill`, `load_skill`, `execute_action`). Per-op
|
|
9
|
+
* REST tools stay hidden from `tools/list`.
|
|
10
|
+
*
|
|
11
|
+
* Lifecycle: `BundleSyncService` is a useFactory provider that starts the
|
|
12
|
+
* configured bundle source on first injection (lazy-boot). The meta-tools
|
|
13
|
+
* inject it implicitly via `BundleStore` / `HiddenOpRegistry`, so the first
|
|
14
|
+
* call to any meta-tool kicks off ingestion.
|
|
15
|
+
*/
|
|
16
|
+
export default class SkilledOpenApiPlugin extends DynamicPlugin<SkilledOpenApiPluginOptions, SkilledOpenApiPluginOptionsInput> {
|
|
17
|
+
options: SkilledOpenApiPluginOptions;
|
|
18
|
+
private cachedLogger?;
|
|
19
|
+
constructor(options: SkilledOpenApiPluginOptionsInput);
|
|
20
|
+
private getLogger;
|
|
21
|
+
private warnIfInsecureConfig;
|
|
22
|
+
static dynamicProviders(options: SkilledOpenApiPluginOptionsInput): ProviderType[];
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=skilled-openapi.plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skilled-openapi.plugin.d.ts","sourceRoot":"","sources":["../src/skilled-openapi.plugin.ts"],"names":[],"mappings":"AASA,OAAO,EACL,aAAa,EAKb,KAAK,YAAY,EAClB,MAAM,eAAe,CAAC;AAMvB,OAAO,EAEL,KAAK,2BAA2B,EAChC,KAAK,gCAAgC,EACtC,MAAM,yBAAyB,CAAC;AAmDjC;;;;;;;;;;;;GAYG;AAQH,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,aAAa,CAC7D,2BAA2B,EAC3B,gCAAgC,CACjC;IACC,OAAO,EAAE,2BAA2B,CAAC;IACrC,OAAO,CAAC,YAAY,CAAC,CAAiB;gBAE1B,OAAO,EAAE,gCAAgC;IAMrD,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,oBAAoB;WAaZ,gBAAgB,CAAC,OAAO,EAAE,gCAAgC,GAAG,YAAY,EAAE;CAsI5F"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type CredentialResolver } from './executor/credential-resolver';
|
|
2
|
+
import { type OutboundOptions, type SkilledOpenApiPluginOptions } from './skilled-openapi.types';
|
|
3
|
+
/**
|
|
4
|
+
* Resolved-at-construction config for the plugin. Mirrors plugin options after
|
|
5
|
+
* Zod parsing so downstream services don't re-parse.
|
|
6
|
+
*/
|
|
7
|
+
export declare class SkilledOpenApiConfig {
|
|
8
|
+
readonly options: SkilledOpenApiPluginOptions;
|
|
9
|
+
constructor(options: SkilledOpenApiPluginOptions);
|
|
10
|
+
get outbound(): OutboundOptions;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Token for the plugin-private credential resolver. Production wiring backs
|
|
14
|
+
* it with `libs/auth`'s vault; v1.2.0 OSS demos use the in-memory resolver.
|
|
15
|
+
*/
|
|
16
|
+
export declare abstract class SkilledOpenApiCredentialResolver {
|
|
17
|
+
abstract resolve(ref: string, opts: {
|
|
18
|
+
bundleId: string;
|
|
19
|
+
}): Promise<string | undefined>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Convenience: cast a CredentialResolver instance to the abstract token.
|
|
23
|
+
*/
|
|
24
|
+
export declare function asCredentialResolverToken(resolver: CredentialResolver): SkilledOpenApiCredentialResolver;
|
|
25
|
+
//# sourceMappingURL=skilled-openapi.symbols.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skilled-openapi.symbols.d.ts","sourceRoot":"","sources":["../src/skilled-openapi.symbols.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAEjG;;;GAGG;AACH,qBAAa,oBAAoB;aACH,OAAO,EAAE,2BAA2B;gBAApC,OAAO,EAAE,2BAA2B;IAChE,IAAI,QAAQ,IAAI,eAAe,CAE9B;CACF;AAED;;;GAGG;AACH,8BAAsB,gCAAgC;IACpD,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CACvF;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,gCAAgC,CAExG"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { z } from '@frontmcp/lazy-zod';
|
|
2
|
+
export { bundleSourceSchema, npmSourceSchema, saasSourceSchema, signatureKeySchema, staticSourceSchema, } from '@frontmcp/adapters/skills';
|
|
3
|
+
export type { BundleSourceOptions, NpmSourceOptions, SaasSourceOptions, SignatureKey, StaticSourceOptions, } from '@frontmcp/adapters/skills';
|
|
4
|
+
export declare const outboundOptionsSchema: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodObject<{
|
|
5
|
+
allowPrivateNetworks: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
6
|
+
egressProxy: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
7
|
+
maxConcurrencyPerHost: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodNumber>;
|
|
8
|
+
defaultTimeoutMs: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodNumber>;
|
|
9
|
+
defaultMaxResponseBytes: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodNumber>;
|
|
10
|
+
allowHttp: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
11
|
+
}, import("zod/v4/core").$strip>>;
|
|
12
|
+
export type OutboundOptions = z.infer<typeof outboundOptionsSchema>;
|
|
13
|
+
declare const skilledOpenApiPluginOptionsObjectSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
14
|
+
source: import("@frontmcp/lazy-zod").ZodDiscriminatedUnion<[import("@frontmcp/lazy-zod").ZodObject<{
|
|
15
|
+
type: import("@frontmcp/lazy-zod").ZodLiteral<"static">;
|
|
16
|
+
path: import("@frontmcp/lazy-zod").ZodString;
|
|
17
|
+
watch: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
18
|
+
}, import("zod/v4/core").$strip>, import("@frontmcp/lazy-zod").ZodObject<{
|
|
19
|
+
type: import("@frontmcp/lazy-zod").ZodLiteral<"npm">;
|
|
20
|
+
packageName: import("@frontmcp/lazy-zod").ZodString;
|
|
21
|
+
exportName: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
22
|
+
verifyProvenance: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
23
|
+
}, import("zod/v4/core").$strip>, import("@frontmcp/lazy-zod").ZodObject<{
|
|
24
|
+
type: import("@frontmcp/lazy-zod").ZodLiteral<"saas">;
|
|
25
|
+
endpoint: import("@frontmcp/lazy-zod").ZodString;
|
|
26
|
+
authToken: import("@frontmcp/lazy-zod").ZodString;
|
|
27
|
+
expectedAudience: import("@frontmcp/lazy-zod").ZodString;
|
|
28
|
+
pollIntervalMs: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodNumber>;
|
|
29
|
+
enableWebhook: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
30
|
+
jwksUrl: import("@frontmcp/lazy-zod").ZodString;
|
|
31
|
+
expectedIssuer: import("@frontmcp/lazy-zod").ZodString;
|
|
32
|
+
}, import("zod/v4/core").$strip>], "type">;
|
|
33
|
+
requireSignature: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
34
|
+
trustedKeys: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodObject<{
|
|
35
|
+
keyId: import("@frontmcp/lazy-zod").ZodString;
|
|
36
|
+
alg: import("@frontmcp/lazy-zod").ZodEnum<{
|
|
37
|
+
RS256: "RS256";
|
|
38
|
+
EdDSA: "EdDSA";
|
|
39
|
+
}>;
|
|
40
|
+
publicKeyPem: import("@frontmcp/lazy-zod").ZodString;
|
|
41
|
+
}, import("zod/v4/core").$strip>>>;
|
|
42
|
+
dev: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
43
|
+
outbound: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodObject<{
|
|
44
|
+
allowPrivateNetworks: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
45
|
+
egressProxy: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
46
|
+
maxConcurrencyPerHost: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodNumber>;
|
|
47
|
+
defaultTimeoutMs: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodNumber>;
|
|
48
|
+
defaultMaxResponseBytes: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodNumber>;
|
|
49
|
+
allowHttp: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
50
|
+
}, import("zod/v4/core").$strip>>;
|
|
51
|
+
sourceConflictPolicy: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodEnum<{
|
|
52
|
+
"static-wins": "static-wins";
|
|
53
|
+
"last-wins": "last-wins";
|
|
54
|
+
reject: "reject";
|
|
55
|
+
}>>;
|
|
56
|
+
bundleCacheDir: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
57
|
+
credentials: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodRecord<import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodString>>;
|
|
58
|
+
exposeOperationsAsInternalTools: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
59
|
+
}, import("zod/v4/core").$strip>;
|
|
60
|
+
export declare const skilledOpenApiPluginOptionsSchema: import("zod").ZodPipe<import("@frontmcp/lazy-zod").ZodObject<{
|
|
61
|
+
source: import("@frontmcp/lazy-zod").ZodDiscriminatedUnion<[import("@frontmcp/lazy-zod").ZodObject<{
|
|
62
|
+
type: import("@frontmcp/lazy-zod").ZodLiteral<"static">;
|
|
63
|
+
path: import("@frontmcp/lazy-zod").ZodString;
|
|
64
|
+
watch: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
65
|
+
}, import("zod/v4/core").$strip>, import("@frontmcp/lazy-zod").ZodObject<{
|
|
66
|
+
type: import("@frontmcp/lazy-zod").ZodLiteral<"npm">;
|
|
67
|
+
packageName: import("@frontmcp/lazy-zod").ZodString;
|
|
68
|
+
exportName: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
69
|
+
verifyProvenance: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
70
|
+
}, import("zod/v4/core").$strip>, import("@frontmcp/lazy-zod").ZodObject<{
|
|
71
|
+
type: import("@frontmcp/lazy-zod").ZodLiteral<"saas">;
|
|
72
|
+
endpoint: import("@frontmcp/lazy-zod").ZodString;
|
|
73
|
+
authToken: import("@frontmcp/lazy-zod").ZodString;
|
|
74
|
+
expectedAudience: import("@frontmcp/lazy-zod").ZodString;
|
|
75
|
+
pollIntervalMs: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodNumber>;
|
|
76
|
+
enableWebhook: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
77
|
+
jwksUrl: import("@frontmcp/lazy-zod").ZodString;
|
|
78
|
+
expectedIssuer: import("@frontmcp/lazy-zod").ZodString;
|
|
79
|
+
}, import("zod/v4/core").$strip>], "type">;
|
|
80
|
+
requireSignature: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
81
|
+
trustedKeys: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodObject<{
|
|
82
|
+
keyId: import("@frontmcp/lazy-zod").ZodString;
|
|
83
|
+
alg: import("@frontmcp/lazy-zod").ZodEnum<{
|
|
84
|
+
RS256: "RS256";
|
|
85
|
+
EdDSA: "EdDSA";
|
|
86
|
+
}>;
|
|
87
|
+
publicKeyPem: import("@frontmcp/lazy-zod").ZodString;
|
|
88
|
+
}, import("zod/v4/core").$strip>>>;
|
|
89
|
+
dev: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
90
|
+
outbound: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodObject<{
|
|
91
|
+
allowPrivateNetworks: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
92
|
+
egressProxy: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
93
|
+
maxConcurrencyPerHost: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodNumber>;
|
|
94
|
+
defaultTimeoutMs: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodNumber>;
|
|
95
|
+
defaultMaxResponseBytes: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodNumber>;
|
|
96
|
+
allowHttp: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
97
|
+
}, import("zod/v4/core").$strip>>;
|
|
98
|
+
sourceConflictPolicy: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodEnum<{
|
|
99
|
+
"static-wins": "static-wins";
|
|
100
|
+
"last-wins": "last-wins";
|
|
101
|
+
reject: "reject";
|
|
102
|
+
}>>;
|
|
103
|
+
bundleCacheDir: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
104
|
+
credentials: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodRecord<import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodString>>;
|
|
105
|
+
exposeOperationsAsInternalTools: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
106
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodTransform<{
|
|
107
|
+
outbound: {
|
|
108
|
+
allowPrivateNetworks: boolean;
|
|
109
|
+
maxConcurrencyPerHost: number;
|
|
110
|
+
defaultTimeoutMs: number;
|
|
111
|
+
defaultMaxResponseBytes: number;
|
|
112
|
+
allowHttp: boolean;
|
|
113
|
+
egressProxy?: string | undefined;
|
|
114
|
+
};
|
|
115
|
+
bundleCacheDir: string;
|
|
116
|
+
source: {
|
|
117
|
+
type: "static";
|
|
118
|
+
path: string;
|
|
119
|
+
watch: boolean;
|
|
120
|
+
} | {
|
|
121
|
+
type: "npm";
|
|
122
|
+
packageName: string;
|
|
123
|
+
verifyProvenance: boolean;
|
|
124
|
+
exportName?: string | undefined;
|
|
125
|
+
} | {
|
|
126
|
+
type: "saas";
|
|
127
|
+
endpoint: string;
|
|
128
|
+
authToken: string;
|
|
129
|
+
expectedAudience: string;
|
|
130
|
+
pollIntervalMs: number;
|
|
131
|
+
enableWebhook: boolean;
|
|
132
|
+
jwksUrl: string;
|
|
133
|
+
expectedIssuer: string;
|
|
134
|
+
};
|
|
135
|
+
requireSignature: boolean;
|
|
136
|
+
trustedKeys: {
|
|
137
|
+
keyId: string;
|
|
138
|
+
alg: "RS256" | "EdDSA";
|
|
139
|
+
publicKeyPem: string;
|
|
140
|
+
}[];
|
|
141
|
+
dev: boolean;
|
|
142
|
+
sourceConflictPolicy: "static-wins" | "last-wins" | "reject";
|
|
143
|
+
exposeOperationsAsInternalTools: boolean;
|
|
144
|
+
credentials?: Record<string, string> | undefined;
|
|
145
|
+
}, {
|
|
146
|
+
source: {
|
|
147
|
+
type: "static";
|
|
148
|
+
path: string;
|
|
149
|
+
watch: boolean;
|
|
150
|
+
} | {
|
|
151
|
+
type: "npm";
|
|
152
|
+
packageName: string;
|
|
153
|
+
verifyProvenance: boolean;
|
|
154
|
+
exportName?: string | undefined;
|
|
155
|
+
} | {
|
|
156
|
+
type: "saas";
|
|
157
|
+
endpoint: string;
|
|
158
|
+
authToken: string;
|
|
159
|
+
expectedAudience: string;
|
|
160
|
+
pollIntervalMs: number;
|
|
161
|
+
enableWebhook: boolean;
|
|
162
|
+
jwksUrl: string;
|
|
163
|
+
expectedIssuer: string;
|
|
164
|
+
};
|
|
165
|
+
requireSignature: boolean;
|
|
166
|
+
trustedKeys: {
|
|
167
|
+
keyId: string;
|
|
168
|
+
alg: "RS256" | "EdDSA";
|
|
169
|
+
publicKeyPem: string;
|
|
170
|
+
}[];
|
|
171
|
+
dev: boolean;
|
|
172
|
+
outbound: {
|
|
173
|
+
allowPrivateNetworks: boolean;
|
|
174
|
+
maxConcurrencyPerHost: number;
|
|
175
|
+
defaultTimeoutMs: number;
|
|
176
|
+
defaultMaxResponseBytes: number;
|
|
177
|
+
allowHttp: boolean;
|
|
178
|
+
egressProxy?: string | undefined;
|
|
179
|
+
};
|
|
180
|
+
sourceConflictPolicy: "static-wins" | "last-wins" | "reject";
|
|
181
|
+
exposeOperationsAsInternalTools: boolean;
|
|
182
|
+
bundleCacheDir?: string | undefined;
|
|
183
|
+
credentials?: Record<string, string> | undefined;
|
|
184
|
+
}>>;
|
|
185
|
+
/** Parsed options with defaults applied — internal plugin use. */
|
|
186
|
+
export type SkilledOpenApiPluginOptions = z.infer<typeof skilledOpenApiPluginOptionsSchema>;
|
|
187
|
+
/** User-facing input shape — defaults are optional. */
|
|
188
|
+
export type SkilledOpenApiPluginOptionsInput = z.input<typeof skilledOpenApiPluginOptionsObjectSchema>;
|
|
189
|
+
//# sourceMappingURL=skilled-openapi.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skilled-openapi.types.d.ts","sourceRoot":"","sources":["../src/skilled-openapi.types.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAKvC,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAInC,eAAO,MAAM,qBAAqB;;;;;;;iCAgC9B,CAAC;AAEL,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAIpE,QAAA,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA6D3C,CAAC;AAUH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiB5C,CAAC;AAEH,kEAAkE;AAClE,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,uDAAuD;AACvD,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type BundleDiff, type BundleStore, type ResolvedBundle, type SignatureVerifyTelemetry } from '@frontmcp/adapters/skills';
|
|
2
|
+
import { type FrontMcpLogger, type SkillRegistryInterface } from '@frontmcp/sdk';
|
|
3
|
+
import { type HiddenOpRegistry } from '../registry/hidden-op.registry';
|
|
4
|
+
import { type SignatureKey } from '../skilled-openapi.types';
|
|
5
|
+
import { type OperationToolFactory } from '../tools/operation-tool.factory';
|
|
6
|
+
export interface BundleSyncOptions {
|
|
7
|
+
requireSignature: boolean;
|
|
8
|
+
trustedKeys: SignatureKey[];
|
|
9
|
+
/**
|
|
10
|
+
* Optional telemetry hook for the signature verification path. When
|
|
11
|
+
* provided, every signature check increments
|
|
12
|
+
* `frontmcp_skills_signature_verifications_total{status}` and failures
|
|
13
|
+
* additionally increment `frontmcp_skills_signature_failures_total{reason}`.
|
|
14
|
+
* Wired by the plugin's DI factory when ObservabilityPlugin is installed;
|
|
15
|
+
* `undefined` in tests / hosts without observability.
|
|
16
|
+
*/
|
|
17
|
+
telemetry?: SignatureVerifyTelemetry;
|
|
18
|
+
/**
|
|
19
|
+
* When true (default), each operation in the bundle is also registered as
|
|
20
|
+
* an internal tool (visibility: 'internal') in the SDK's tool registry so
|
|
21
|
+
* other tools / agents / CodeCall scripts / jobs can compose with it via
|
|
22
|
+
* `this.callTool(name, args)` from `ExecutionContextBase`. Internal tools
|
|
23
|
+
* are excluded from `tools/list` and rejected for external `tools/call`.
|
|
24
|
+
* The existing meta-tools (`search_skill` / `load_skill` / `execute_action`)
|
|
25
|
+
* are unaffected.
|
|
26
|
+
*/
|
|
27
|
+
exposeOperationsAsInternalTools: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface BundleApplyResult {
|
|
30
|
+
applied: boolean;
|
|
31
|
+
reason?: string;
|
|
32
|
+
bundleId: string;
|
|
33
|
+
bundleVersion: string;
|
|
34
|
+
diff?: BundleDiff;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Glue between a `BundleSource` (or any caller producing a `ResolvedBundle`)
|
|
38
|
+
* and the SkillRegistry / HiddenOpRegistry. Enforces the v1.2 security gates
|
|
39
|
+
* (signature) and applies the diff atomically.
|
|
40
|
+
*
|
|
41
|
+
* Atomicity contract: a bundle either fully applies (every added/changed
|
|
42
|
+
* skill registered, every removed skill unregistered, hidden-op registry
|
|
43
|
+
* fully synced) OR the active bundle stays unchanged. Failures emit a
|
|
44
|
+
* structured `BundleApplyResult` with `applied: false` and a `reason`.
|
|
45
|
+
*
|
|
46
|
+
* Listeners can subscribe via the underlying BundleStore for downstream
|
|
47
|
+
* effects (audit log, OTel attributes, /healthz updates).
|
|
48
|
+
*/
|
|
49
|
+
export declare class BundleSyncService {
|
|
50
|
+
private readonly skillRegistry;
|
|
51
|
+
private readonly hiddenOps;
|
|
52
|
+
private readonly bundleStore;
|
|
53
|
+
private readonly options;
|
|
54
|
+
private readonly logger;
|
|
55
|
+
/**
|
|
56
|
+
* Optional factory that registers each operation as an internal SDK tool.
|
|
57
|
+
* Wired by the plugin's DI factory when `exposeOperationsAsInternalTools`
|
|
58
|
+
* is true and the SDK ToolRegistry is reachable from scope. Absent when
|
|
59
|
+
* the host opted out OR when the plugin runs in a context without a
|
|
60
|
+
* tool registry (e.g. unit tests for the sync service in isolation).
|
|
61
|
+
*/
|
|
62
|
+
private readonly operationToolFactory?;
|
|
63
|
+
private skillUnregisterByBundleId;
|
|
64
|
+
constructor(skillRegistry: SkillRegistryInterface, hiddenOps: HiddenOpRegistry, bundleStore: BundleStore, options: BundleSyncOptions, logger: FrontMcpLogger,
|
|
65
|
+
/**
|
|
66
|
+
* Optional factory that registers each operation as an internal SDK tool.
|
|
67
|
+
* Wired by the plugin's DI factory when `exposeOperationsAsInternalTools`
|
|
68
|
+
* is true and the SDK ToolRegistry is reachable from scope. Absent when
|
|
69
|
+
* the host opted out OR when the plugin runs in a context without a
|
|
70
|
+
* tool registry (e.g. unit tests for the sync service in isolation).
|
|
71
|
+
*/
|
|
72
|
+
operationToolFactory?: OperationToolFactory | undefined);
|
|
73
|
+
/**
|
|
74
|
+
* Validate signature and apply the bundle. Returns a structured result;
|
|
75
|
+
* never throws on validation/registration failure (caller logs + ignores).
|
|
76
|
+
* Throws ONLY on programmer error (e.g. invalid argument).
|
|
77
|
+
*/
|
|
78
|
+
apply(bundle: ResolvedBundle): Promise<BundleApplyResult>;
|
|
79
|
+
/**
|
|
80
|
+
* Project a single BundledSkill into a SkillContent the SDK SkillRegistry
|
|
81
|
+
* understands. The `actions[]` extension carries the per-op schemas the LLM
|
|
82
|
+
* needs to know about; `bundleVersion` lets polling clients detect changes.
|
|
83
|
+
*/
|
|
84
|
+
private toSkillContent;
|
|
85
|
+
private rebuildHiddenOps;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=bundle-sync.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-sync.service.d.ts","sourceRoot":"","sources":["../../src/sync/bundle-sync.service.ts"],"names":[],"mappings":"AAEA,OAAO,EASL,KAAK,UAAU,EACf,KAAK,WAAW,EAEhB,KAAK,cAAc,EAEnB,KAAK,wBAAwB,EAC9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,KAAK,cAAc,EAAqB,KAAK,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEpG,OAAO,EAAsB,KAAK,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAC3F,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAE5E,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,YAAY,EAAE,CAAC;IAC5B;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,wBAAwB,CAAC;IACrC;;;;;;;;OAQG;IACH,+BAA+B,EAAE,OAAO,CAAC;CAC1C;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,iBAAiB;IAI1B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC;IAfxC,OAAO,CAAC,yBAAyB,CAA0C;gBAGxD,aAAa,EAAE,sBAAsB,EACrC,SAAS,EAAE,gBAAgB,EAC3B,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,cAAc;IACvC;;;;;;OAMG;IACc,oBAAoB,CAAC,EAAE,oBAAoB,YAAA;IAG9D;;;;OAIG;IACG,KAAK,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAoO/D;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,gBAAgB;CAmCzB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const executeActionDescription = "Execute one action of a previously loaded skill.\n\nPipeline:\n 1. Resolve (skillId, actionId) \u2192 bundled OpenAPI operation\n 2. Authorize: caller's authInfo is checked against the action's required authorities (if any)\n 3. Validate: the input is validated against the action's inputJsonSchema by the underlying executor\n 4. Outbound: an HTTPS request is built and sent to the service the action belongs to,\n with credentials injected from the configured vault (never echoed back to you)\n 5. Response: the response body is validated against outputJsonSchema and returned in\n a structured envelope. Failures (auth, schema, network) are returned as ok:false\n with a structured error string \u2014 they DO NOT throw.\n\nINPUT: { skillId, actionId, input }\nOUTPUT: { ok, status, data?, contentType?, error? }";
|
|
2
|
+
export declare const executeActionInputSchema: {
|
|
3
|
+
skillId: import("@frontmcp/lazy-zod").ZodString;
|
|
4
|
+
actionId: import("@frontmcp/lazy-zod").ZodString;
|
|
5
|
+
input: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodRecord<import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodUnknown>>;
|
|
6
|
+
};
|
|
7
|
+
export declare const executeActionOutputSchema: {
|
|
8
|
+
ok: import("@frontmcp/lazy-zod").ZodBoolean;
|
|
9
|
+
status: import("@frontmcp/lazy-zod").ZodNumber;
|
|
10
|
+
data: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodUnknown>;
|
|
11
|
+
contentType: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
12
|
+
error: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
13
|
+
};
|
|
14
|
+
export type ExecuteActionInput = {
|
|
15
|
+
skillId: string;
|
|
16
|
+
actionId: string;
|
|
17
|
+
input?: Record<string, unknown>;
|
|
18
|
+
};
|
|
19
|
+
export type ExecuteActionOutput = {
|
|
20
|
+
ok: boolean;
|
|
21
|
+
status: number;
|
|
22
|
+
data?: unknown;
|
|
23
|
+
contentType?: string;
|
|
24
|
+
error?: string;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=execute-action.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-action.schema.d.ts","sourceRoot":"","sources":["../../src/tools/execute-action.schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,q0BAae,CAAC;AAErD,eAAO,MAAM,wBAAwB;;;;CAOpC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;;CAMrC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ToolContext } from '@frontmcp/sdk';
|
|
2
|
+
import { type ExecuteActionInput, type ExecuteActionOutput } from './execute-action.schema';
|
|
3
|
+
export default class ExecuteActionTool extends ToolContext {
|
|
4
|
+
execute(input: ExecuteActionInput): Promise<ExecuteActionOutput>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=execute-action.tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-action.tool.d.ts","sourceRoot":"","sources":["../../src/tools/execute-action.tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAQ,WAAW,EAAE,MAAM,eAAe,CAAC;AAQlD,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AAajC,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IAClD,OAAO,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CA4RvE"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare const loadSkillDescription = "Load the full instructions and executable actions for a specific skill.\n\nUse this AFTER `search_skill` once you've identified the right skill for the\nuser's task. The returned object contains:\n - `instructions`: markdown the LLM should read carefully before invoking\n - `actions`: each action's input/output JSON Schema and required authorities\n - `bundleVersion`: changes when the bundle is hot-swapped (use it to detect drift)\n\nINPUT: { skillId }\nOUTPUT: { skill: { id, name, description, instructions, actions[] }, isComplete }";
|
|
2
|
+
export declare const loadSkillInputSchema: {
|
|
3
|
+
skillId: import("@frontmcp/lazy-zod").ZodString;
|
|
4
|
+
};
|
|
5
|
+
export declare const loadSkillOutputSchema: {
|
|
6
|
+
skill: import("@frontmcp/lazy-zod").ZodObject<{
|
|
7
|
+
id: import("@frontmcp/lazy-zod").ZodString;
|
|
8
|
+
name: import("@frontmcp/lazy-zod").ZodString;
|
|
9
|
+
description: import("@frontmcp/lazy-zod").ZodString;
|
|
10
|
+
instructions: import("@frontmcp/lazy-zod").ZodString;
|
|
11
|
+
bundleVersion: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
12
|
+
actions: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodObject<{
|
|
13
|
+
actionId: import("@frontmcp/lazy-zod").ZodString;
|
|
14
|
+
summary: import("@frontmcp/lazy-zod").ZodString;
|
|
15
|
+
description: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
16
|
+
inputJsonSchema: import("@frontmcp/lazy-zod").ZodRecord<import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodUnknown>;
|
|
17
|
+
outputJsonSchema: import("@frontmcp/lazy-zod").ZodRecord<import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodUnknown>;
|
|
18
|
+
requiredAuthorities: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodRecord<import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodUnknown>>;
|
|
19
|
+
}, import("zod/v4/core").$strip>>>;
|
|
20
|
+
}, import("zod/v4/core").$strip>;
|
|
21
|
+
isComplete: import("@frontmcp/lazy-zod").ZodBoolean;
|
|
22
|
+
warning: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
23
|
+
};
|
|
24
|
+
export type LoadSkillInput = {
|
|
25
|
+
skillId: string;
|
|
26
|
+
};
|
|
27
|
+
export type LoadSkillOutput = {
|
|
28
|
+
skill: {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
description: string;
|
|
32
|
+
instructions: string;
|
|
33
|
+
bundleVersion?: string;
|
|
34
|
+
actions?: Array<{
|
|
35
|
+
actionId: string;
|
|
36
|
+
summary: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
inputJsonSchema: Record<string, unknown>;
|
|
39
|
+
outputJsonSchema: Record<string, unknown>;
|
|
40
|
+
requiredAuthorities?: Record<string, unknown>;
|
|
41
|
+
}>;
|
|
42
|
+
};
|
|
43
|
+
isComplete: boolean;
|
|
44
|
+
warning?: string;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=load-skill.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-skill.schema.d.ts","sourceRoot":"","sources":["../../src/tools/load-skill.schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,miBASiD,CAAC;AAEnF,eAAO,MAAM,oBAAoB;;CAEhC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;CAsBjC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AACjD,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE;QACL,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;QACrB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,OAAO,CAAC,EAAE,KAAK,CAAC;YACd,QAAQ,EAAE,MAAM,CAAC;YACjB,OAAO,EAAE,MAAM,CAAC;YAChB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YACzC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAC1C,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;SAC/C,CAAC,CAAC;KACJ,CAAC;IACF,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ToolContext } from '@frontmcp/sdk';
|
|
2
|
+
import { type LoadSkillInput, type LoadSkillOutput } from './load-skill.schema';
|
|
3
|
+
export default class LoadSkillTool extends ToolContext {
|
|
4
|
+
execute(input: LoadSkillInput): Promise<LoadSkillOutput>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=load-skill.tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-skill.tool.d.ts","sourceRoot":"","sources":["../../src/tools/load-skill.tool.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsD,WAAW,EAAE,MAAM,eAAe,CAAC;AAGhG,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,qBAAqB,CAAC;AAY7B,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,WAAW;IAC9C,OAAO,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;CA8B/D"}
|