@frontmcp/plugin-skilled-openapi 1.4.1 → 1.5.0-rc.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.
Files changed (39) hide show
  1. package/README.md +123 -17
  2. package/esm/index.mjs +640 -433
  3. package/esm/package.json +16 -8
  4. package/executor/execute-skill-action.d.ts +44 -0
  5. package/executor/execute-skill-action.d.ts.map +1 -0
  6. package/executor/host-concurrency.d.ts +9 -0
  7. package/executor/host-concurrency.d.ts.map +1 -0
  8. package/executor/openapi-runtime.d.ts.map +1 -1
  9. package/executor/ssrf-guard.d.ts +4 -0
  10. package/executor/ssrf-guard.d.ts.map +1 -1
  11. package/index.d.ts +1 -0
  12. package/index.d.ts.map +1 -1
  13. package/index.js +643 -421
  14. package/package.json +16 -8
  15. package/registry/hidden-op.registry.d.ts +15 -1
  16. package/registry/hidden-op.registry.d.ts.map +1 -1
  17. package/security/authority-guard.d.ts +35 -5
  18. package/security/authority-guard.d.ts.map +1 -1
  19. package/skilled-openapi.plugin.d.ts +41 -2
  20. package/skilled-openapi.plugin.d.ts.map +1 -1
  21. package/skilled-openapi.symbols.d.ts +3 -0
  22. package/skilled-openapi.symbols.d.ts.map +1 -1
  23. package/skilled-openapi.types.d.ts +22 -0
  24. package/skilled-openapi.types.d.ts.map +1 -1
  25. package/sync/bundle-sync.service.d.ts +1 -1
  26. package/sync/bundle-sync.service.d.ts.map +1 -1
  27. package/tools/operation-tool.factory.d.ts +5 -4
  28. package/tools/operation-tool.factory.d.ts.map +1 -1
  29. package/tools/run-workflow.schema.d.ts +28 -0
  30. package/tools/run-workflow.schema.d.ts.map +1 -0
  31. package/tools/run-workflow.tool.d.ts +6 -0
  32. package/tools/run-workflow.tool.d.ts.map +1 -0
  33. package/tools/search-skill.schema.d.ts +5 -1
  34. package/tools/search-skill.schema.d.ts.map +1 -1
  35. package/tools/search-skill.tool.d.ts.map +1 -1
  36. package/tools/execute-action.schema.d.ts +0 -26
  37. package/tools/execute-action.schema.d.ts.map +0 -1
  38. package/tools/execute-action.tool.d.ts +0 -6
  39. package/tools/execute-action.tool.d.ts.map +0 -1
package/esm/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@frontmcp/plugin-skilled-openapi",
3
- "version": "1.4.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).",
3
+ "version": "1.5.0-rc.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 / run_workflow — the last runs an enclave-sandboxed AgentScript that orchestrates the loaded skills' operations).",
5
5
  "author": "AgentFront <info@agentfront.dev>",
6
6
  "license": "Apache-2.0",
7
7
  "engines": {
@@ -48,14 +48,22 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
- "@frontmcp/adapters": "1.4.1",
52
- "@frontmcp/auth": "1.4.1",
53
- "@frontmcp/protocol": "1.4.1",
54
- "@frontmcp/sdk": "1.4.1",
55
- "@frontmcp/utils": "1.4.1"
51
+ "@frontmcp/adapters": "1.5.0-rc.1",
52
+ "@frontmcp/auth": "1.5.0-rc.1",
53
+ "@frontmcp/sdk": "1.5.0-rc.1"
56
54
  },
57
55
  "peerDependencies": {
58
- "@frontmcp/lazy-zod": "1.4.1"
56
+ "@enclave-vm/ast": "*",
57
+ "@enclave-vm/core": "*",
58
+ "@frontmcp/lazy-zod": "1.5.0-rc.1"
59
+ },
60
+ "peerDependenciesMeta": {
61
+ "@enclave-vm/ast": {
62
+ "optional": true
63
+ },
64
+ "@enclave-vm/core": {
65
+ "optional": true
66
+ }
59
67
  },
60
68
  "devDependencies": {
61
69
  "reflect-metadata": "^0.2.2"
@@ -0,0 +1,44 @@
1
+ import { type SkillAuditWriter } from '@frontmcp/adapters/skills';
2
+ import type { FrontMcpLogger } from '@frontmcp/sdk';
3
+ import { type HiddenOpEntry } from '../registry/hidden-op.registry';
4
+ import { type AuthorityGuard, type UnprotectedOpsPolicy } from '../security/authority-guard';
5
+ import { type OpenApiRuntimeDeps } from './openapi-runtime';
6
+ /** Structured result envelope (the structured envelope the skill-action executor returns). */
7
+ export interface SkillActionResult {
8
+ ok: boolean;
9
+ status: number;
10
+ data?: unknown;
11
+ contentType?: string;
12
+ error?: string;
13
+ }
14
+ /** Dependencies the shared executor needs — all resolved from DI by the caller. */
15
+ export interface SkillActionDeps {
16
+ config: {
17
+ outbound: OpenApiRuntimeDeps['outbound'];
18
+ /** Default-deny policy for ops with no required-authorities (C1/C3). */
19
+ unprotectedOps: UnprotectedOpsPolicy;
20
+ };
21
+ resolver: {
22
+ resolve: OpenApiRuntimeDeps['resolver']['resolve'];
23
+ };
24
+ guard: AuthorityGuard;
25
+ logger: FrontMcpLogger;
26
+ /** Opt-in tamper-evident audit (when `skillsConfig.audit.enabled`). */
27
+ audit?: {
28
+ writer: SkillAuditWriter;
29
+ subject: string;
30
+ };
31
+ }
32
+ /**
33
+ * Execute a single resolved skill action. `entry` is the pinned operation
34
+ * descriptor (resolved via `HiddenOpRegistry.get`/`getByActionId`); `authInfo`
35
+ * is the caller's verified auth context (checked against the op's required
36
+ * authorities).
37
+ */
38
+ export declare function executeSkillAction(args: {
39
+ entry: HiddenOpEntry;
40
+ input: Record<string, unknown>;
41
+ authInfo: unknown;
42
+ deps: SkillActionDeps;
43
+ }): Promise<SkillActionResult>;
44
+ //# sourceMappingURL=execute-skill-action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute-skill-action.d.ts","sourceRoot":"","sources":["../../src/executor/execute-skill-action.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAoB,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAG9E,8FAA8F;AAC9F,MAAM,WAAW,iBAAiB;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;AAED,mFAAmF;AACnF,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE;QACN,QAAQ,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;QACzC,wEAAwE;QACxE,cAAc,EAAE,oBAAoB,CAAC;KACtC,CAAC;IACF,QAAQ,EAAE;QAAE,OAAO,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,CAAA;KAAE,CAAC;IACjE,KAAK,EAAE,cAAc,CAAC;IACtB,MAAM,EAAE,cAAc,CAAC;IACvB,uEAAuE;IACvE,KAAK,CAAC,EAAE;QAAE,MAAM,EAAE,gBAAgB,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CACvD;AAWD;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE;IAC7C,KAAK,EAAE,aAAa,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,eAAe,CAAC;CACvB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAsH7B"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Run `fn` while holding one of at most `limit` concurrent slots for `host`.
3
+ * A non-positive / non-finite `limit` disables the gate (runs immediately).
4
+ * The slot is always released in `finally`, including when `fn` throws.
5
+ */
6
+ export declare function withHostConcurrency<T>(host: string, limit: number, fn: () => Promise<T>): Promise<T>;
7
+ /** Test-only: reset all gates. */
8
+ export declare function __resetHostConcurrencyForTests(): void;
9
+ //# sourceMappingURL=host-concurrency.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host-concurrency.d.ts","sourceRoot":"","sources":["../../src/executor/host-concurrency.ts"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAkC1G;AAED,kCAAkC;AAClC,wBAAgB,8BAA8B,IAAI,IAAI,CAErD"}
@@ -1 +1 @@
1
- {"version":3,"file":"openapi-runtime.d.ts","sourceRoot":"","sources":["../../src/executor/openapi-runtime.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAGhE,kEAAkE;AAClE,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAErD,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;CACvB;AA0HD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,YAAY,EAAE,WAAW,CAAC,M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AgB,CAAC,IAAI,EAAE;IAC3C,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,cAAc,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,kBAAkB,CAAC;CAC1B,GAAG,OAAO,CAAC,eAAe,CAAC,CA8H3B"}
@@ -4,7 +4,11 @@ export interface SsrfCheckResult {
4
4
  reason?: string;
5
5
  }
6
6
  export declare function isPrivateIPv4(ip: string): boolean;
7
+ /** Metadata / link-local IPv4 — blocked even when `allowPrivateNetworks` is on. */
8
+ export declare function isAlwaysForbiddenIPv4(ip: string): boolean;
7
9
  export declare function isPrivateIPv6(ip: string): boolean;
10
+ /** Metadata / link-local IPv6 — blocked even when `allowPrivateNetworks` is on. */
11
+ export declare function isAlwaysForbiddenIPv6(ip: string): boolean;
8
12
  /**
9
13
  * Validate an outbound URL against the allowlist + scheme rules + IP blocklist.
10
14
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ssrf-guard.d.ts","sourceRoot":"","sources":["../../src/executor/ssrf-guard.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAyBD,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAQjD;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAWjD;AAID;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,EACjC,QAAQ,EAAE,eAAe,GACxB,OAAO,CAAC,eAAe,CAAC,CA2C1B"}
1
+ {"version":3,"file":"ssrf-guard.d.ts","sourceRoot":"","sources":["../../src/executor/ssrf-guard.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAkDD,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAOjD;AAED,mFAAmF;AACnF,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAGzD;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAWjD;AAED,mFAAmF;AACnF,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAazD;AAyBD;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,EACjC,QAAQ,EAAE,eAAe,GACxB,OAAO,CAAC,eAAe,CAAC,CAkF1B"}
package/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import SkilledOpenApiPlugin from './skilled-openapi.plugin';
2
2
  export { SkilledOpenApiPlugin };
3
3
  export default SkilledOpenApiPlugin;
4
+ export { SKILLED_OPENAPI_RUNTIME_DEPS_TOKEN, type SkilledOpenApiRuntimeDeps, } from './skilled-openapi.plugin';
4
5
  export { skilledOpenApiPluginOptionsSchema } from './skilled-openapi.types';
5
6
  export type { SkilledOpenApiPluginOptions, SkilledOpenApiPluginOptionsInput, BundleSourceOptions, StaticSourceOptions, NpmSourceOptions, SaasSourceOptions, SignatureKey, OutboundOptions, } from './skilled-openapi.types';
6
7
  export { SkilledOpenApiConfig, SkilledOpenApiCredentialResolver } from './skilled-openapi.symbols';
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAChC,eAAe,oBAAoB,CAAC;AAEpC,OAAO,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AAC5E,YAAY,EACV,2BAA2B,EAC3B,gCAAgC,EAChC,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,eAAe,GAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAChC,eAAe,oBAAoB,CAAC;AAMpC,OAAO,EACL,kCAAkC,EAClC,KAAK,yBAAyB,GAC/B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AAC5E,YAAY,EACV,2BAA2B,EAC3B,gCAAgC,EAChC,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,eAAe,GAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC"}