@frontmcp/adapters 1.8.2 → 1.8.3
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/esm/index.mjs +65 -26
- package/esm/openapi/index.mjs +65 -26
- package/esm/package.json +6 -6
- package/esm/skills/index.mjs +94 -12
- package/index.js +64 -25
- package/openapi/index.js +64 -25
- package/openapi/openapi.security.d.ts +3 -3
- package/openapi/openapi.security.d.ts.map +1 -1
- package/openapi/openapi.types.d.ts +17 -0
- package/openapi/openapi.types.d.ts.map +1 -1
- package/package.json +6 -6
- package/skills/index.js +94 -12
- package/skills/source-options.d.ts.map +1 -1
- package/skills/sources/npm.source.d.ts +9 -4
- package/skills/sources/npm.source.d.ts.map +1 -1
- package/skills/sources/saas-pull.source.d.ts +25 -2
- package/skills/sources/saas-pull.source.d.ts.map +1 -1
|
@@ -8,10 +8,15 @@ import type { BundleSourceListener, SkillBundleSource } from './skill-bundle-sou
|
|
|
8
8
|
* `package.json` and only updates after a server redeploy. This is the
|
|
9
9
|
* intentional, lower-blast-radius distribution mode.
|
|
10
10
|
*
|
|
11
|
-
* Provenance verification (GitHub artifact attestations / Sigstore) is
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
11
|
+
* Provenance verification (GitHub artifact attestations / Sigstore) is not
|
|
12
|
+
* implemented. `verifyProvenance: true` (the default) therefore refuses the
|
|
13
|
+
* package before it is imported: a setting that promises a supply-chain check
|
|
14
|
+
* must not load code it could not check. Set `verifyProvenance: false` to load
|
|
15
|
+
* the package without one. The package is then imported, and its code runs,
|
|
16
|
+
* before the bundle is parsed, so bundle signing (`requireSignature` +
|
|
17
|
+
* `trustedKeys`) protects the bundle's content but not the import: trust comes
|
|
18
|
+
* from the package itself (an exact pinned version installed from a lockfile
|
|
19
|
+
* with integrity hashes).
|
|
15
20
|
*/
|
|
16
21
|
export declare class NpmSource implements SkillBundleSource {
|
|
17
22
|
private readonly options;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npm.source.d.ts","sourceRoot":"","sources":["../../../src/skills/sources/npm.source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAIpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAO/F
|
|
1
|
+
{"version":3,"file":"npm.source.d.ts","sourceRoot":"","sources":["../../../src/skills/sources/npm.source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAIpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAO/F;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,SAAU,YAAW,iBAAiB;IAO/C,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAPzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,OAAO,CAAC,SAAS,CAAmC;IACpD,OAAO,CAAC,MAAM,CAAC,CAAiB;gBAGb,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,cAAc;IAKnC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAM5B,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,GAAG,MAAM,IAAI;IAe9C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YAIb,qBAAqB;IA6BnC,SAAS,CAAC,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK5D,OAAO,CAAC,MAAM;CASf"}
|
|
@@ -2,6 +2,14 @@ import type { FrontMcpLogger } from '@frontmcp/sdk';
|
|
|
2
2
|
import type { ResolvedBundle } from '../bundle/bundle.types';
|
|
3
3
|
import type { SaasSourceOptions } from '../source-options';
|
|
4
4
|
import type { BundleSourceDeps, BundleSourceListener, SkillBundleSource } from './skill-bundle-source.interface';
|
|
5
|
+
/**
|
|
6
|
+
* The pinned pull token failed verification against `jwksUrl`, `expectedIssuer`
|
|
7
|
+
* or `expectedAudience`. Unlike an outage, this never falls back to a cached
|
|
8
|
+
* bundle: the configured SaaS is not the one the server was set up to trust.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SaasPullTokenRejectedError extends Error {
|
|
11
|
+
constructor(reason: string);
|
|
12
|
+
}
|
|
5
13
|
/**
|
|
6
14
|
* Pulls bundles from a configured SaaS endpoint via authenticated HTTPS.
|
|
7
15
|
*
|
|
@@ -17,8 +25,16 @@ import type { BundleSourceDeps, BundleSourceListener, SkillBundleSource } from '
|
|
|
17
25
|
* `enableWebhook` and deferred to v1.2.x (route mounting requires plugin HTTP
|
|
18
26
|
* infrastructure not yet in scope).
|
|
19
27
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
28
|
+
* Before every pull the pinned `authToken` is verified: it must be a JWT signed
|
|
29
|
+
* by a key in the issuer's JWKS (`jwksUrl`), with `iss` equal to
|
|
30
|
+
* `expectedIssuer` and `aud` including `expectedAudience` (and `resource` too,
|
|
31
|
+
* when the token carries one), and not expired. A rejected token stops the pull
|
|
32
|
+
* and is never answered with the cached bundle ({@link SaasPullTokenRejectedError});
|
|
33
|
+
* an unreachable JWKS, or one with no usable signing key, is treated like any
|
|
34
|
+
* other pull failure (the cache fallback still applies).
|
|
35
|
+
*
|
|
36
|
+
* NOTE: Bundle signature verification is applied by the bundle-sync service
|
|
37
|
+
* before the bundle becomes active.
|
|
22
38
|
*/
|
|
23
39
|
export declare class SaasPullSource implements SkillBundleSource {
|
|
24
40
|
private readonly options;
|
|
@@ -30,6 +46,7 @@ export declare class SaasPullSource implements SkillBundleSource {
|
|
|
30
46
|
private pollHandle;
|
|
31
47
|
private inFlight;
|
|
32
48
|
private stopped;
|
|
49
|
+
private readonly jwksService;
|
|
33
50
|
constructor(options: SaasSourceOptions, cacheDir: string | undefined, logger: FrontMcpLogger, deps?: BundleSourceDeps);
|
|
34
51
|
start(): Promise<void>;
|
|
35
52
|
onChange(listener: BundleSourceListener): () => void;
|
|
@@ -48,6 +65,12 @@ export declare class SaasPullSource implements SkillBundleSource {
|
|
|
48
65
|
status: number;
|
|
49
66
|
body: string;
|
|
50
67
|
}>;
|
|
68
|
+
/**
|
|
69
|
+
* Verify the pinned pull token against the issuer's JWKS, issuer and audience.
|
|
70
|
+
* Throws {@link SaasPullTokenRejectedError} when the token is refused, and a
|
|
71
|
+
* plain Error when the JWKS can't be fetched (an outage).
|
|
72
|
+
*/
|
|
73
|
+
private verifyPullToken;
|
|
51
74
|
private fetchOnce;
|
|
52
75
|
private cachePath;
|
|
53
76
|
private persistCache;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saas-pull.source.d.ts","sourceRoot":"","sources":["../../../src/skills/sources/saas-pull.source.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"saas-pull.source.d.ts","sourceRoot":"","sources":["../../../src/skills/sources/saas-pull.source.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAMjH;;;;GAIG;AACH,qBAAa,0BAA2B,SAAQ,KAAK;gBACvC,MAAM,EAAE,MAAM;CAI3B;AA4BD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,cAAe,YAAW,iBAAiB;IAUpD,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC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