@frontmcp/adapters 1.9.4 → 1.9.6
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 +3 -3
- package/esm/index.mjs +27 -2
- package/esm/openapi/index.mjs +27 -2
- package/esm/package.json +7 -7
- package/esm/skills/index.mjs +48 -44
- package/index.js +27 -2
- package/openapi/index.js +27 -2
- package/openapi/openapi.utils.d.ts.map +1 -1
- package/package.json +7 -7
- package/skills/audit/audit-chain.d.ts +6 -1
- package/skills/audit/audit-chain.d.ts.map +1 -1
- package/skills/audit/audit-config.d.ts +2 -0
- package/skills/audit/audit-config.d.ts.map +1 -1
- package/skills/audit/audit-signer.d.ts +6 -0
- package/skills/audit/audit-signer.d.ts.map +1 -1
- package/skills/audit/audit-store.d.ts +5 -0
- package/skills/audit/audit-store.d.ts.map +1 -1
- package/skills/audit/audit-writer.d.ts +4 -32
- package/skills/audit/audit-writer.d.ts.map +1 -1
- package/skills/audit/index.d.ts +1 -1
- package/skills/audit/index.d.ts.map +1 -1
- package/skills/bundle/bundle.schema.d.ts.map +1 -1
- package/skills/index.d.ts +1 -1
- package/skills/index.d.ts.map +1 -1
- package/skills/index.js +47 -44
- package/skills/security/jwt-verifier.d.ts +1 -0
- package/skills/security/jwt-verifier.d.ts.map +1 -1
- package/skills/security/webhook-replay-guard.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -58,6 +58,6 @@ Apache-2.0 — see [LICENSE](../../LICENSE).
|
|
|
58
58
|
|
|
59
59
|
<!-- links -->
|
|
60
60
|
|
|
61
|
-
[docs-overview]: https://
|
|
62
|
-
[docs-openapi]: https://
|
|
63
|
-
[docs-guide]: https://
|
|
61
|
+
[docs-overview]: https://frontmcp.dev/reference/sdk/adapter
|
|
62
|
+
[docs-openapi]: https://frontmcp.dev/reference/adapters/openapi
|
|
63
|
+
[docs-guide]: https://frontmcp.dev/learn/wrapping-an-openapi-service
|
package/esm/index.mjs
CHANGED
|
@@ -880,6 +880,21 @@ function appendCookie(headers, name, value) {
|
|
|
880
880
|
const combined = existing ? `${existing}; ${cookiePair}` : cookiePair;
|
|
881
881
|
headers.set("Cookie", combined);
|
|
882
882
|
}
|
|
883
|
+
var DOT_SEGMENTS = /* @__PURE__ */ new Set([".", ".."]);
|
|
884
|
+
function assertPathStaysOnOperation(tool2, apiBaseUrl, resolvedPath, url) {
|
|
885
|
+
const templatePath = tool2.metadata.path;
|
|
886
|
+
const templateSegments = templatePath.split("/");
|
|
887
|
+
const addsDotSegment = resolvedPath.split("/").some((segment, index) => DOT_SEGMENTS.has(segment) && segment !== templateSegments[index]);
|
|
888
|
+
const literalPrefix = templatePath.split("{")[0] ?? "";
|
|
889
|
+
const expectedPathPrefix = new URL(`${apiBaseUrl}${literalPrefix}`).pathname;
|
|
890
|
+
if (addsDotSegment || !new URL(url).pathname.startsWith(expectedPathPrefix)) {
|
|
891
|
+
throw new PublicMcpError2(
|
|
892
|
+
`The path parameters of operation '${tool2.name}' do not resolve to its path`,
|
|
893
|
+
"INVALID_PATH_PARAMETER",
|
|
894
|
+
400
|
|
895
|
+
);
|
|
896
|
+
}
|
|
897
|
+
}
|
|
883
898
|
function specDefault(tool2, inputKey) {
|
|
884
899
|
const property = tool2.inputSchema.properties?.[inputKey];
|
|
885
900
|
return typeof property === "object" ? property.default : void 0;
|
|
@@ -907,9 +922,18 @@ function buildRequest(tool2, input, security, baseUrl) {
|
|
|
907
922
|
continue;
|
|
908
923
|
}
|
|
909
924
|
switch (mapper.type) {
|
|
910
|
-
case "path":
|
|
911
|
-
|
|
925
|
+
case "path": {
|
|
926
|
+
const pathValue = coerceToString(value, mapper.key, "path");
|
|
927
|
+
if (DOT_SEGMENTS.has(pathValue)) {
|
|
928
|
+
throw new PublicMcpError2(
|
|
929
|
+
`Path parameter '${mapper.key}' of operation '${tool2.name}' cannot be '.' or '..'`,
|
|
930
|
+
"INVALID_PATH_PARAMETER",
|
|
931
|
+
400
|
|
932
|
+
);
|
|
933
|
+
}
|
|
934
|
+
path = path.replaceAll(`{${mapper.key}}`, encodeURIComponent(pathValue));
|
|
912
935
|
break;
|
|
936
|
+
}
|
|
913
937
|
case "query":
|
|
914
938
|
queryParams.set(mapper.key, coerceToString(value, mapper.key, "query"));
|
|
915
939
|
break;
|
|
@@ -956,6 +980,7 @@ function buildRequest(tool2, input, security, baseUrl) {
|
|
|
956
980
|
}
|
|
957
981
|
const queryString = queryParams.toString();
|
|
958
982
|
const url = `${apiBaseUrl}${path}${queryString ? `?${queryString}` : ""}`;
|
|
983
|
+
assertPathStaysOnOperation(tool2, apiBaseUrl, path, url);
|
|
959
984
|
return { url, headers, body };
|
|
960
985
|
}
|
|
961
986
|
function applyAdditionalHeaders(headers, additionalHeaders) {
|
package/esm/openapi/index.mjs
CHANGED
|
@@ -880,6 +880,21 @@ function appendCookie(headers, name, value) {
|
|
|
880
880
|
const combined = existing ? `${existing}; ${cookiePair}` : cookiePair;
|
|
881
881
|
headers.set("Cookie", combined);
|
|
882
882
|
}
|
|
883
|
+
var DOT_SEGMENTS = /* @__PURE__ */ new Set([".", ".."]);
|
|
884
|
+
function assertPathStaysOnOperation(tool2, apiBaseUrl, resolvedPath, url) {
|
|
885
|
+
const templatePath = tool2.metadata.path;
|
|
886
|
+
const templateSegments = templatePath.split("/");
|
|
887
|
+
const addsDotSegment = resolvedPath.split("/").some((segment, index) => DOT_SEGMENTS.has(segment) && segment !== templateSegments[index]);
|
|
888
|
+
const literalPrefix = templatePath.split("{")[0] ?? "";
|
|
889
|
+
const expectedPathPrefix = new URL(`${apiBaseUrl}${literalPrefix}`).pathname;
|
|
890
|
+
if (addsDotSegment || !new URL(url).pathname.startsWith(expectedPathPrefix)) {
|
|
891
|
+
throw new PublicMcpError2(
|
|
892
|
+
`The path parameters of operation '${tool2.name}' do not resolve to its path`,
|
|
893
|
+
"INVALID_PATH_PARAMETER",
|
|
894
|
+
400
|
|
895
|
+
);
|
|
896
|
+
}
|
|
897
|
+
}
|
|
883
898
|
function specDefault(tool2, inputKey) {
|
|
884
899
|
const property = tool2.inputSchema.properties?.[inputKey];
|
|
885
900
|
return typeof property === "object" ? property.default : void 0;
|
|
@@ -907,9 +922,18 @@ function buildRequest(tool2, input, security, baseUrl) {
|
|
|
907
922
|
continue;
|
|
908
923
|
}
|
|
909
924
|
switch (mapper.type) {
|
|
910
|
-
case "path":
|
|
911
|
-
|
|
925
|
+
case "path": {
|
|
926
|
+
const pathValue = coerceToString(value, mapper.key, "path");
|
|
927
|
+
if (DOT_SEGMENTS.has(pathValue)) {
|
|
928
|
+
throw new PublicMcpError2(
|
|
929
|
+
`Path parameter '${mapper.key}' of operation '${tool2.name}' cannot be '.' or '..'`,
|
|
930
|
+
"INVALID_PATH_PARAMETER",
|
|
931
|
+
400
|
|
932
|
+
);
|
|
933
|
+
}
|
|
934
|
+
path = path.replaceAll(`{${mapper.key}}`, encodeURIComponent(pathValue));
|
|
912
935
|
break;
|
|
936
|
+
}
|
|
913
937
|
case "query":
|
|
914
938
|
queryParams.set(mapper.key, coerceToString(value, mapper.key, "query"));
|
|
915
939
|
break;
|
|
@@ -956,6 +980,7 @@ function buildRequest(tool2, input, security, baseUrl) {
|
|
|
956
980
|
}
|
|
957
981
|
const queryString = queryParams.toString();
|
|
958
982
|
const url = `${apiBaseUrl}${path}${queryString ? `?${queryString}` : ""}`;
|
|
983
|
+
assertPathStaysOnOperation(tool2, apiBaseUrl, path, url);
|
|
959
984
|
return { url, headers, body };
|
|
960
985
|
}
|
|
961
986
|
function applyAdditionalHeaders(headers, additionalHeaders) {
|
package/esm/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/adapters",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.6",
|
|
4
4
|
"description": "Adapters for the FrontMCP framework",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
|
-
"homepage": "https://
|
|
6
|
+
"homepage": "https://frontmcp.dev/reference/adapters/openapi",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"mcp",
|
|
@@ -64,15 +64,15 @@
|
|
|
64
64
|
"node": ">=24.0.0"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@frontmcp/auth": "1.9.
|
|
68
|
-
"@frontmcp/di": "1.9.
|
|
69
|
-
"@frontmcp/sdk": "1.9.
|
|
70
|
-
"@frontmcp/utils": "1.9.
|
|
67
|
+
"@frontmcp/auth": "1.9.6",
|
|
68
|
+
"@frontmcp/di": "1.9.6",
|
|
69
|
+
"@frontmcp/sdk": "1.9.6",
|
|
70
|
+
"@frontmcp/utils": "1.9.6",
|
|
71
71
|
"js-yaml": "^4.1.0",
|
|
72
72
|
"mcp-from-openapi": "2.8.0",
|
|
73
73
|
"openapi-types": "^12.1.3"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@frontmcp/lazy-zod": "1.9.
|
|
76
|
+
"@frontmcp/lazy-zod": "1.9.6"
|
|
77
77
|
}
|
|
78
78
|
}
|
package/esm/skills/index.mjs
CHANGED
|
@@ -20,6 +20,7 @@ function bundleSkillToActions(skill, ops) {
|
|
|
20
20
|
// libs/adapters/src/skills/bundle/bundle.schema.ts
|
|
21
21
|
import { z } from "@frontmcp/lazy-zod";
|
|
22
22
|
var httpMethodSchema = z.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD"]);
|
|
23
|
+
var RFC7230_TOKEN = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
23
24
|
var pathTemplateRegex = /^\/[^\s?#]*$/;
|
|
24
25
|
var FORBIDDEN_PATH_FRAGMENTS = ["..", "\\", "`", "$(", "${"];
|
|
25
26
|
var pathTemplateSchema = z.string().min(1).max(2048).refine((v) => pathTemplateRegex.test(v), {
|
|
@@ -39,7 +40,7 @@ var authBindingSchema = z.discriminatedUnion("kind", [
|
|
|
39
40
|
z.object({
|
|
40
41
|
kind: z.literal("apiKey"),
|
|
41
42
|
in: z.enum(["header", "query"]),
|
|
42
|
-
name: z.string().min(1).max(128).regex(
|
|
43
|
+
name: z.string().min(1).max(128).regex(RFC7230_TOKEN, "apiKey name must match RFC 7230 token grammar"),
|
|
43
44
|
vaultRef: z.string().min(1).max(256)
|
|
44
45
|
}).strict(),
|
|
45
46
|
z.object({
|
|
@@ -62,7 +63,10 @@ var parameterMapperSchema = z.object({
|
|
|
62
63
|
explode: z.boolean().optional(),
|
|
63
64
|
serialization: z.record(z.string(), z.unknown()).optional(),
|
|
64
65
|
security: z.record(z.string(), z.unknown()).optional()
|
|
65
|
-
}).passthrough()
|
|
66
|
+
}).passthrough().refine((mapper) => mapper.type !== "header" && mapper.type !== "cookie" || RFC7230_TOKEN.test(mapper.key), {
|
|
67
|
+
message: "a header or cookie mapper key must match RFC 7230 token grammar",
|
|
68
|
+
path: ["key"]
|
|
69
|
+
});
|
|
66
70
|
var operationDescriptorSchema = z.object({
|
|
67
71
|
operationId: z.string().min(1).max(256).regex(/^[a-zA-Z0-9_.\-:]+$/, "operationId must be alphanumeric / `-` / `_` / `.` / `:`"),
|
|
68
72
|
serviceId: z.string().min(1).max(128),
|
|
@@ -1807,11 +1811,11 @@ function linkRecord(prev, partial) {
|
|
|
1807
1811
|
prevHash: nextPrevHash(prev)
|
|
1808
1812
|
};
|
|
1809
1813
|
}
|
|
1810
|
-
function verifyChain(records, trustedKeys, verifier) {
|
|
1814
|
+
function verifyChain(records, trustedKeys, verifier, options = {}) {
|
|
1811
1815
|
if (records.length === 0) {
|
|
1812
1816
|
return { ok: true, verified: 0 };
|
|
1813
1817
|
}
|
|
1814
|
-
let prev;
|
|
1818
|
+
let prev = options.previous;
|
|
1815
1819
|
for (let i = 0; i < records.length; i++) {
|
|
1816
1820
|
const rec = records[i];
|
|
1817
1821
|
if (!rec) {
|
|
@@ -1856,12 +1860,16 @@ function verifyChain(records, trustedKeys, verifier) {
|
|
|
1856
1860
|
import {
|
|
1857
1861
|
base64urlDecode as base64urlDecode2,
|
|
1858
1862
|
base64urlEncode,
|
|
1863
|
+
hkdfSha256,
|
|
1859
1864
|
hmacSha256,
|
|
1860
1865
|
pemToPublicJwk as pemToPublicJwk2,
|
|
1861
1866
|
rsaSignBase64Url,
|
|
1862
1867
|
rsaVerifySync as rsaVerifySync2,
|
|
1863
1868
|
timingSafeEqual
|
|
1864
1869
|
} from "@frontmcp/utils";
|
|
1870
|
+
function deriveFromKeyMaterial(ikm, info, length) {
|
|
1871
|
+
return hkdfSha256(ikm, new Uint8Array(0), new TextEncoder().encode(info), length);
|
|
1872
|
+
}
|
|
1865
1873
|
var Hs256AuditSigner = class {
|
|
1866
1874
|
key;
|
|
1867
1875
|
keyId;
|
|
@@ -1909,9 +1917,13 @@ var Hs256AuditSigner = class {
|
|
|
1909
1917
|
getAlg() {
|
|
1910
1918
|
return "HS256";
|
|
1911
1919
|
}
|
|
1920
|
+
deriveKey(info, length) {
|
|
1921
|
+
return deriveFromKeyMaterial(this.key, info, length);
|
|
1922
|
+
}
|
|
1912
1923
|
};
|
|
1913
1924
|
var Rs256AuditSigner = class {
|
|
1914
1925
|
privateJwk;
|
|
1926
|
+
privateExponent;
|
|
1915
1927
|
keyId;
|
|
1916
1928
|
constructor(privateJwk, keyId) {
|
|
1917
1929
|
if (!keyId) {
|
|
@@ -1927,6 +1939,7 @@ var Rs256AuditSigner = class {
|
|
|
1927
1939
|
throw new Error("Rs256AuditSigner: privateJwk must include `n`, `e`, and `d` (RSA private key)");
|
|
1928
1940
|
}
|
|
1929
1941
|
this.privateJwk = { ...privateJwk };
|
|
1942
|
+
this.privateExponent = privateJwk.d;
|
|
1930
1943
|
this.keyId = keyId;
|
|
1931
1944
|
}
|
|
1932
1945
|
sign(record) {
|
|
@@ -1951,6 +1964,10 @@ var Rs256AuditSigner = class {
|
|
|
1951
1964
|
getAlg() {
|
|
1952
1965
|
return "RS256";
|
|
1953
1966
|
}
|
|
1967
|
+
/** Derived from the private exponent `d`, which only the holder of the private key has. */
|
|
1968
|
+
deriveKey(info, length) {
|
|
1969
|
+
return deriveFromKeyMaterial(base64urlDecode2(this.privateExponent), info, length);
|
|
1970
|
+
}
|
|
1954
1971
|
};
|
|
1955
1972
|
var defaultAuditSignatureVerifier = ({
|
|
1956
1973
|
alg,
|
|
@@ -2012,6 +2029,9 @@ var MemoryAuditStore = class {
|
|
|
2012
2029
|
if (this.records.length === 0) return void 0;
|
|
2013
2030
|
return this.records[this.records.length - 1];
|
|
2014
2031
|
}
|
|
2032
|
+
async releaseSequence(sequence) {
|
|
2033
|
+
if (sequence === this.seq && !this.records.some((record) => record.sequence === sequence)) this.seq -= 1;
|
|
2034
|
+
}
|
|
2015
2035
|
async read(opts) {
|
|
2016
2036
|
const from = opts?.from ?? 1;
|
|
2017
2037
|
const limit = opts?.limit;
|
|
@@ -2036,6 +2056,11 @@ var StorageAdapterAuditStore = class {
|
|
|
2036
2056
|
async nextSequence() {
|
|
2037
2057
|
return this.adapter.incr(this.sequenceKey);
|
|
2038
2058
|
}
|
|
2059
|
+
/** DECR's result tells atomically whether the counter was still `sequence`; when it was not, INCR restores it. */
|
|
2060
|
+
async releaseSequence(sequence) {
|
|
2061
|
+
if (await this.adapter.get(this.recordKey(sequence)) !== null) return;
|
|
2062
|
+
if (await this.adapter.decr(this.sequenceKey) !== sequence - 1) await this.adapter.incr(this.sequenceKey);
|
|
2063
|
+
}
|
|
2039
2064
|
async appendAtSequence(record) {
|
|
2040
2065
|
const key = this.recordKey(record.sequence);
|
|
2041
2066
|
const existing = await this.adapter.get(key);
|
|
@@ -2106,6 +2131,8 @@ function createSkillAuditMetrics(telemetry) {
|
|
|
2106
2131
|
}
|
|
2107
2132
|
var SKILL_AUDIT_ERROR_MESSAGE_MAX = 500;
|
|
2108
2133
|
var SKILL_AUDIT_QUEUE_MAX = 1e3;
|
|
2134
|
+
var SUBJECT_HASH_KEY_INFO = "frontmcp:audit:subject";
|
|
2135
|
+
var SUBJECT_HASH_KEY_LENGTH = 32;
|
|
2109
2136
|
var SkillAuditWriter = class {
|
|
2110
2137
|
constructor(store, signer, logger, metrics, options = {}) {
|
|
2111
2138
|
this.store = store;
|
|
@@ -2113,7 +2140,14 @@ var SkillAuditWriter = class {
|
|
|
2113
2140
|
this.logger = logger;
|
|
2114
2141
|
this.metrics = metrics;
|
|
2115
2142
|
this.subjectMode = options.subjectMode ?? "hash";
|
|
2116
|
-
this.
|
|
2143
|
+
if (this.subjectMode === "hash") {
|
|
2144
|
+
this.subjectHashKey = options.subjectHashSecret ?? signer.deriveKey?.(SUBJECT_HASH_KEY_INFO, SUBJECT_HASH_KEY_LENGTH);
|
|
2145
|
+
if (!this.subjectHashKey) {
|
|
2146
|
+
logger.warn(
|
|
2147
|
+
`[skill-audit] subjectMode 'hash' needs a key, and the signer (keyId "${signer.getKeyId()}") has no key material to derive one from, so subjects are recorded as 'redacted'. Set skillsConfig.audit.subjectHashSecret to record subject hashes.`
|
|
2148
|
+
);
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2117
2151
|
this.maxQueueDepth = options.maxQueueDepth ?? SKILL_AUDIT_QUEUE_MAX;
|
|
2118
2152
|
}
|
|
2119
2153
|
store;
|
|
@@ -2129,7 +2163,7 @@ var SkillAuditWriter = class {
|
|
|
2129
2163
|
/** Current in-flight queue depth (records awaiting the chain head lock). */
|
|
2130
2164
|
queueDepth = 0;
|
|
2131
2165
|
subjectMode;
|
|
2132
|
-
|
|
2166
|
+
subjectHashKey;
|
|
2133
2167
|
maxQueueDepth;
|
|
2134
2168
|
/**
|
|
2135
2169
|
* Phase 2 in the tool: authority check just passed. We log the inputHash
|
|
@@ -2256,7 +2290,7 @@ var SkillAuditWriter = class {
|
|
|
2256
2290
|
} catch (e) {
|
|
2257
2291
|
this.logger.warn(`[skill-audit] failed to sign record at seq=${sequence}: ${e.message}`);
|
|
2258
2292
|
this.metrics?.incrementWriteFailure("sign");
|
|
2259
|
-
await this.
|
|
2293
|
+
await this.releaseUnusedSequence(sequence);
|
|
2260
2294
|
return;
|
|
2261
2295
|
}
|
|
2262
2296
|
try {
|
|
@@ -2265,27 +2299,14 @@ var SkillAuditWriter = class {
|
|
|
2265
2299
|
} catch (e) {
|
|
2266
2300
|
this.logger.warn(`[skill-audit] failed to append record at seq=${sequence}: ${e.message}`);
|
|
2267
2301
|
this.metrics?.incrementWriteFailure("append");
|
|
2268
|
-
await this.
|
|
2302
|
+
await this.releaseUnusedSequence(sequence);
|
|
2269
2303
|
}
|
|
2270
2304
|
}
|
|
2271
|
-
/**
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
* helper — a failed rollback is strictly worse than a permanent gap.
|
|
2275
|
-
*
|
|
2276
|
-
* Detection is duck-typed (we look at `.adapter.decr` and `.options.sequenceKey`)
|
|
2277
|
-
* because the SkillAuditStore interface intentionally doesn't expose
|
|
2278
|
-
* sequence-mutation methods — those are storage-specific implementation
|
|
2279
|
-
* detail, and forcing every implementation to expose them would push the
|
|
2280
|
-
* complexity onto every adapter even when the underlying store can't
|
|
2281
|
-
* support transactional rollback.
|
|
2282
|
-
*/
|
|
2283
|
-
async tryDecrementSequence(allocated) {
|
|
2284
|
-
const storeAny = this.store;
|
|
2285
|
-
if (!storeAny.adapter || typeof storeAny.adapter.decr !== "function") return;
|
|
2286
|
-
const sequenceKey = storeAny.options?.sequenceKey ?? "audit:skills:sequence";
|
|
2305
|
+
/** Best-effort {@link SkillAuditStore.releaseSequence}; never throws, so a failed rollback leaves the gap. */
|
|
2306
|
+
async releaseUnusedSequence(allocated) {
|
|
2307
|
+
if (!this.store.releaseSequence) return;
|
|
2287
2308
|
try {
|
|
2288
|
-
await
|
|
2309
|
+
await this.store.releaseSequence(allocated);
|
|
2289
2310
|
this.logger.debug?.(`[skill-audit] rolled back unused sequence ${allocated}`);
|
|
2290
2311
|
} catch {
|
|
2291
2312
|
}
|
|
@@ -2293,28 +2314,11 @@ var SkillAuditWriter = class {
|
|
|
2293
2314
|
/** Apply the configured subject-mode redaction. */
|
|
2294
2315
|
applySubjectMode(subject) {
|
|
2295
2316
|
if (this.subjectMode === "plain") return subject;
|
|
2296
|
-
if (this.subjectMode === "omit") return "redacted";
|
|
2297
|
-
const mac = hmacSha2562(this.
|
|
2317
|
+
if (this.subjectMode === "omit" || !this.subjectHashKey) return "redacted";
|
|
2318
|
+
const mac = hmacSha2562(this.subjectHashKey, new TextEncoder().encode(subject));
|
|
2298
2319
|
const hex = bytesToHex(mac);
|
|
2299
2320
|
return `hashed:${hex.slice(0, 32)}`;
|
|
2300
2321
|
}
|
|
2301
|
-
/**
|
|
2302
|
-
* Default subject-hash secret derivation when the host doesn't supply one.
|
|
2303
|
-
* Returns a deterministic 32-byte key seeded from the signer's keyId so
|
|
2304
|
-
* two SkillAuditWriter instances configured against the same signer
|
|
2305
|
-
* produce stable subject hashes — useful for joining records across
|
|
2306
|
-
* writer reconfigurations within the same logical deployment. NOT a
|
|
2307
|
-
* cryptographic key in its own right — the host SHOULD override via
|
|
2308
|
-
* constructor options for production deployments.
|
|
2309
|
-
*/
|
|
2310
|
-
deriveDefaultSubjectSecret() {
|
|
2311
|
-
const key = new Uint8Array(32);
|
|
2312
|
-
const seed = new TextEncoder().encode(`frontmcp:audit:subject:${this.signer.getKeyId()}`);
|
|
2313
|
-
for (let i = 0; i < key.length; i++) {
|
|
2314
|
-
key[i] = seed[i % seed.length] ?? 0;
|
|
2315
|
-
}
|
|
2316
|
-
return key;
|
|
2317
|
-
}
|
|
2318
2322
|
/**
|
|
2319
2323
|
* Hash arbitrary output. Falls back to a sentinel if canonicalization
|
|
2320
2324
|
* fails (circular references, non-serializable values) — the verifier
|
package/index.js
CHANGED
|
@@ -909,6 +909,21 @@ function appendCookie(headers, name, value) {
|
|
|
909
909
|
const combined = existing ? `${existing}; ${cookiePair}` : cookiePair;
|
|
910
910
|
headers.set("Cookie", combined);
|
|
911
911
|
}
|
|
912
|
+
var DOT_SEGMENTS = /* @__PURE__ */ new Set([".", ".."]);
|
|
913
|
+
function assertPathStaysOnOperation(tool2, apiBaseUrl, resolvedPath, url) {
|
|
914
|
+
const templatePath = tool2.metadata.path;
|
|
915
|
+
const templateSegments = templatePath.split("/");
|
|
916
|
+
const addsDotSegment = resolvedPath.split("/").some((segment, index) => DOT_SEGMENTS.has(segment) && segment !== templateSegments[index]);
|
|
917
|
+
const literalPrefix = templatePath.split("{")[0] ?? "";
|
|
918
|
+
const expectedPathPrefix = new URL(`${apiBaseUrl}${literalPrefix}`).pathname;
|
|
919
|
+
if (addsDotSegment || !new URL(url).pathname.startsWith(expectedPathPrefix)) {
|
|
920
|
+
throw new import_sdk3.PublicMcpError(
|
|
921
|
+
`The path parameters of operation '${tool2.name}' do not resolve to its path`,
|
|
922
|
+
"INVALID_PATH_PARAMETER",
|
|
923
|
+
400
|
|
924
|
+
);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
912
927
|
function specDefault(tool2, inputKey) {
|
|
913
928
|
const property = tool2.inputSchema.properties?.[inputKey];
|
|
914
929
|
return typeof property === "object" ? property.default : void 0;
|
|
@@ -936,9 +951,18 @@ function buildRequest(tool2, input, security, baseUrl) {
|
|
|
936
951
|
continue;
|
|
937
952
|
}
|
|
938
953
|
switch (mapper.type) {
|
|
939
|
-
case "path":
|
|
940
|
-
|
|
954
|
+
case "path": {
|
|
955
|
+
const pathValue = coerceToString(value, mapper.key, "path");
|
|
956
|
+
if (DOT_SEGMENTS.has(pathValue)) {
|
|
957
|
+
throw new import_sdk3.PublicMcpError(
|
|
958
|
+
`Path parameter '${mapper.key}' of operation '${tool2.name}' cannot be '.' or '..'`,
|
|
959
|
+
"INVALID_PATH_PARAMETER",
|
|
960
|
+
400
|
|
961
|
+
);
|
|
962
|
+
}
|
|
963
|
+
path = path.replaceAll(`{${mapper.key}}`, encodeURIComponent(pathValue));
|
|
941
964
|
break;
|
|
965
|
+
}
|
|
942
966
|
case "query":
|
|
943
967
|
queryParams.set(mapper.key, coerceToString(value, mapper.key, "query"));
|
|
944
968
|
break;
|
|
@@ -985,6 +1009,7 @@ function buildRequest(tool2, input, security, baseUrl) {
|
|
|
985
1009
|
}
|
|
986
1010
|
const queryString = queryParams.toString();
|
|
987
1011
|
const url = `${apiBaseUrl}${path}${queryString ? `?${queryString}` : ""}`;
|
|
1012
|
+
assertPathStaysOnOperation(tool2, apiBaseUrl, path, url);
|
|
988
1013
|
return { url, headers, body };
|
|
989
1014
|
}
|
|
990
1015
|
function applyAdditionalHeaders(headers, additionalHeaders) {
|
package/openapi/index.js
CHANGED
|
@@ -909,6 +909,21 @@ function appendCookie(headers, name, value) {
|
|
|
909
909
|
const combined = existing ? `${existing}; ${cookiePair}` : cookiePair;
|
|
910
910
|
headers.set("Cookie", combined);
|
|
911
911
|
}
|
|
912
|
+
var DOT_SEGMENTS = /* @__PURE__ */ new Set([".", ".."]);
|
|
913
|
+
function assertPathStaysOnOperation(tool2, apiBaseUrl, resolvedPath, url) {
|
|
914
|
+
const templatePath = tool2.metadata.path;
|
|
915
|
+
const templateSegments = templatePath.split("/");
|
|
916
|
+
const addsDotSegment = resolvedPath.split("/").some((segment, index) => DOT_SEGMENTS.has(segment) && segment !== templateSegments[index]);
|
|
917
|
+
const literalPrefix = templatePath.split("{")[0] ?? "";
|
|
918
|
+
const expectedPathPrefix = new URL(`${apiBaseUrl}${literalPrefix}`).pathname;
|
|
919
|
+
if (addsDotSegment || !new URL(url).pathname.startsWith(expectedPathPrefix)) {
|
|
920
|
+
throw new import_sdk3.PublicMcpError(
|
|
921
|
+
`The path parameters of operation '${tool2.name}' do not resolve to its path`,
|
|
922
|
+
"INVALID_PATH_PARAMETER",
|
|
923
|
+
400
|
|
924
|
+
);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
912
927
|
function specDefault(tool2, inputKey) {
|
|
913
928
|
const property = tool2.inputSchema.properties?.[inputKey];
|
|
914
929
|
return typeof property === "object" ? property.default : void 0;
|
|
@@ -936,9 +951,18 @@ function buildRequest(tool2, input, security, baseUrl) {
|
|
|
936
951
|
continue;
|
|
937
952
|
}
|
|
938
953
|
switch (mapper.type) {
|
|
939
|
-
case "path":
|
|
940
|
-
|
|
954
|
+
case "path": {
|
|
955
|
+
const pathValue = coerceToString(value, mapper.key, "path");
|
|
956
|
+
if (DOT_SEGMENTS.has(pathValue)) {
|
|
957
|
+
throw new import_sdk3.PublicMcpError(
|
|
958
|
+
`Path parameter '${mapper.key}' of operation '${tool2.name}' cannot be '.' or '..'`,
|
|
959
|
+
"INVALID_PATH_PARAMETER",
|
|
960
|
+
400
|
|
961
|
+
);
|
|
962
|
+
}
|
|
963
|
+
path = path.replaceAll(`{${mapper.key}}`, encodeURIComponent(pathValue));
|
|
941
964
|
break;
|
|
965
|
+
}
|
|
942
966
|
case "query":
|
|
943
967
|
queryParams.set(mapper.key, coerceToString(value, mapper.key, "query"));
|
|
944
968
|
break;
|
|
@@ -985,6 +1009,7 @@ function buildRequest(tool2, input, security, baseUrl) {
|
|
|
985
1009
|
}
|
|
986
1010
|
const queryString = queryParams.toString();
|
|
987
1011
|
const url = `${apiBaseUrl}${path}${queryString ? `?${queryString}` : ""}`;
|
|
1012
|
+
assertPathStaysOnOperation(tool2, apiBaseUrl, path, url);
|
|
988
1013
|
return { url, headers, body };
|
|
989
1014
|
}
|
|
990
1015
|
function applyAdditionalHeaders(headers, additionalHeaders) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openapi.utils.d.ts","sourceRoot":"","sources":["../../src/openapi/openapi.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAKzE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;
|
|
1
|
+
{"version":3,"file":"openapi.utils.d.ts","sourceRoot":"","sources":["../../src/openapi/openapi.utils.ts"],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"version": "1.9.6",
|
|
4
4
|
"description": "Adapters for the FrontMCP framework",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
|
-
"homepage": "https://
|
|
6
|
+
"homepage": "https://frontmcp.dev/reference/adapters/openapi",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"mcp",
|
|
@@ -64,15 +64,15 @@
|
|
|
64
64
|
"node": ">=24.0.0"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@frontmcp/auth": "1.9.
|
|
68
|
-
"@frontmcp/di": "1.9.
|
|
69
|
-
"@frontmcp/sdk": "1.9.
|
|
70
|
-
"@frontmcp/utils": "1.9.
|
|
67
|
+
"@frontmcp/auth": "1.9.6",
|
|
68
|
+
"@frontmcp/di": "1.9.6",
|
|
69
|
+
"@frontmcp/sdk": "1.9.6",
|
|
70
|
+
"@frontmcp/utils": "1.9.6",
|
|
71
71
|
"js-yaml": "^4.1.0",
|
|
72
72
|
"mcp-from-openapi": "2.8.0",
|
|
73
73
|
"openapi-types": "^12.1.3"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@frontmcp/lazy-zod": "1.9.
|
|
76
|
+
"@frontmcp/lazy-zod": "1.9.6"
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -67,6 +67,11 @@ export type SkillAuditPartialRecord = Omit<SkillAuditRecord, 'prevHash' | 'signa
|
|
|
67
67
|
* a runtime configuration error rather than a silently-unsigned record.
|
|
68
68
|
*/
|
|
69
69
|
export declare function linkRecord(prev: SkillAuditRecord | undefined, partial: SkillAuditPartialRecord): Omit<SkillAuditRecord, 'signature' | 'signatureKeyId' | 'signatureAlg'>;
|
|
70
|
+
/** Options for {@link verifyChain}. */
|
|
71
|
+
export interface AuditChainVerifyOptions {
|
|
72
|
+
/** The already-verified record just before a window read with `read({ from })`; without it the first record must be the genesis. */
|
|
73
|
+
previous?: SkillAuditRecord;
|
|
74
|
+
}
|
|
70
75
|
/**
|
|
71
76
|
* Walk the chain in order, recomputing each prevHash and verifying each
|
|
72
77
|
* signature. Returns the first break or `{ ok: true }` on a clean run.
|
|
@@ -75,7 +80,7 @@ export declare function linkRecord(prev: SkillAuditRecord | undefined, partial:
|
|
|
75
80
|
* about ordering — records must already be sorted by `sequence` ascending.
|
|
76
81
|
* Production stores sort on read; tests should pass already-sorted arrays.
|
|
77
82
|
*/
|
|
78
|
-
export declare function verifyChain(records: ReadonlyArray<SkillAuditRecord>, trustedKeys: ReadonlyArray<AuditTrustedKey>, verifier: AuditSignatureVerifier): AuditChainVerifyResult;
|
|
83
|
+
export declare function verifyChain(records: ReadonlyArray<SkillAuditRecord>, trustedKeys: ReadonlyArray<AuditTrustedKey>, verifier: AuditSignatureVerifier, options?: AuditChainVerifyOptions): AuditChainVerifyResult;
|
|
79
84
|
/** Re-exports for ergonomic external import. */
|
|
80
85
|
export type { SkillAuditPhase, SkillAuditRecord };
|
|
81
86
|
//# sourceMappingURL=audit-chain.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-chain.d.ts","sourceRoot":"","sources":["../../../src/skills/audit/audit-chain.ts"],"names":[],"mappings":"AAcA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC5B,MAAM,sBAAsB,CAAC;AAE9B;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,sBAAsB,CAAC;IAC5B,8DAA8D;IAC9D,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,wEAAwE;IACxE,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,qFAAqF;IACrF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE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AAoI;IACpI,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC7B;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,aAAa,CAAC,gBAAgB,CAAC,EACxC,WAAW,EAAE,aAAa,CAAC,eAAe,CAAC,EAC3C,QAAQ,EAAE,sBAAsB,EAChC,OAAO,GAAE,uBAA4B,GACpC,sBAAsB,CAoDxB;AAED,gDAAgD;AAChD,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -67,6 +67,8 @@ export interface SkillAuditConfig {
|
|
|
67
67
|
* without surfacing PII in the persisted log. See {@link SkillAuditSubjectMode}.
|
|
68
68
|
*/
|
|
69
69
|
subjectMode?: SkillAuditSubjectMode;
|
|
70
|
+
/** HMAC key for `subjectMode: 'hash'` (at least 32 bytes); unset, it is derived from the signer's key material. */
|
|
71
|
+
subjectHashSecret?: string | Uint8Array;
|
|
70
72
|
/**
|
|
71
73
|
* Optional periodic head-anchor interval (milliseconds). When set, the
|
|
72
74
|
* writer occasionally writes `{ tail: { sequence, hash, timestamp } }` to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-config.d.ts","sourceRoot":"","sources":["../../../src/skills/audit/audit-config.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CA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@ export interface SkillAuditSigner {
|
|
|
21
21
|
getKeyId(): string;
|
|
22
22
|
/** Algorithm this signer uses. */
|
|
23
23
|
getAlg(): SkillAuditSignatureAlg;
|
|
24
|
+
/** HKDF-SHA256 key derived from the signer's key material, never the material itself; keyless (HSM/KMS) signers leave it out. */
|
|
25
|
+
deriveKey?(info: string, length: number): Uint8Array;
|
|
24
26
|
}
|
|
25
27
|
/**
|
|
26
28
|
* HMAC-SHA256 signer for dev / single-pod stacks. Uses a shared secret;
|
|
@@ -41,6 +43,7 @@ export declare class Hs256AuditSigner implements SkillAuditSigner {
|
|
|
41
43
|
sign(record: Omit<SkillAuditRecord, 'signature' | 'signatureKeyId' | 'signatureAlg'>): SkillAuditSignResult;
|
|
42
44
|
getKeyId(): string;
|
|
43
45
|
getAlg(): SkillAuditSignatureAlg;
|
|
46
|
+
deriveKey(info: string, length: number): Uint8Array;
|
|
44
47
|
}
|
|
45
48
|
/**
|
|
46
49
|
* RS256 signer that pairs with the bundle-signing key registry.
|
|
@@ -56,11 +59,14 @@ export declare class Hs256AuditSigner implements SkillAuditSigner {
|
|
|
56
59
|
*/
|
|
57
60
|
export declare class Rs256AuditSigner implements SkillAuditSigner {
|
|
58
61
|
private readonly privateJwk;
|
|
62
|
+
private readonly privateExponent;
|
|
59
63
|
private readonly keyId;
|
|
60
64
|
constructor(privateJwk: JsonWebKey, keyId: string);
|
|
61
65
|
sign(record: Omit<SkillAuditRecord, 'signature' | 'signatureKeyId' | 'signatureAlg'>): SkillAuditSignResult;
|
|
62
66
|
getKeyId(): string;
|
|
63
67
|
getAlg(): SkillAuditSignatureAlg;
|
|
68
|
+
/** Derived from the private exponent `d`, which only the holder of the private key has. */
|
|
69
|
+
deriveKey(info: string, length: number): Uint8Array;
|
|
64
70
|
}
|
|
65
71
|
/**
|
|
66
72
|
* Default verifier used by tests and stand-alone forensic tools. Production
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-signer.d.ts","sourceRoot":"","sources":["../../../src/skills/audit/audit-signer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"audit-signer.d.ts","sourceRoot":"","sources":["../../../src/skills/audit/audit-signer.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAgC,KAAK,sBAAsB,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAChH,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE1F;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,sBAAsB,CAAC;CAC7B;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6EAA6E;IAC7E,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,WAAW,GAAG,gBAAgB,GAAG,cAAc,CAAC,GAAG,oBAAoB,CAAC;IAC5G,kEAAkE;IAClE,QAAQ,IAAI,MAAM,CAAC;IACnB,kCAAkC;IAClC,MAAM,IAAI,sBAAsB,CAAC;IACjC,iIAAiI;IACjI,SAAS,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC;CACtD;AAOD;;;;GAIG;AACH,qBAAa,gBAAiB,YAAW,gBAAgB;IACvD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAa;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAE/B;;;;;;OAMG;gBACS,MAAM,EAAE,MAAM,GAAG,UAAU,EAAE,KAAK,EAAE,MAAM;IAkBtD,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,WAAW,GAAG,gBAAgB,GAAG,cAAc,CAAC,GAAG,oBAAoB;IAmB3G,QAAQ,IAAI,MAAM;IAIlB,MAAM,IAAI,sBAAsB;IAIhC,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU;CAGpD;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,gBAAiB,YAAW,gBAAgB;IACvD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAS;IACzC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;gBAEnB,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM;IA0BjD,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,WAAW,GAAG,gBAAgB,GAAG,cAAc,CAAC,GAAG,oBAAoB;IAiB3G,QAAQ,IAAI,MAAM;IAIlB,MAAM,IAAI,sBAAsB;IAIhC,2FAA2F;IAC3F,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU;CAGpD;AAID;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,EAAE,sBAmD3C,CAAC;AAEF,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -39,6 +39,8 @@ export interface SkillAuditStore {
|
|
|
39
39
|
tail(): Promise<SkillAuditRecord | undefined>;
|
|
40
40
|
/** Read records in sequence order. Used by the verifier and by HTTP viewers. */
|
|
41
41
|
read(opts?: SkillAuditReadOptions): Promise<SkillAuditRecord[]>;
|
|
42
|
+
/** Give back `sequence` only while it is the latest allocation and its record was never stored; otherwise change nothing. */
|
|
43
|
+
releaseSequence?(sequence: number): Promise<void>;
|
|
42
44
|
}
|
|
43
45
|
/**
|
|
44
46
|
* Process-local append-only audit log. Suitable for tests, dev environments,
|
|
@@ -51,6 +53,7 @@ export declare class MemoryAuditStore implements SkillAuditStore {
|
|
|
51
53
|
nextSequence(): Promise<number>;
|
|
52
54
|
appendAtSequence(record: SkillAuditRecord): Promise<void>;
|
|
53
55
|
tail(): Promise<SkillAuditRecord | undefined>;
|
|
56
|
+
releaseSequence(sequence: number): Promise<void>;
|
|
54
57
|
read(opts?: SkillAuditReadOptions): Promise<SkillAuditRecord[]>;
|
|
55
58
|
}
|
|
56
59
|
/**
|
|
@@ -77,6 +80,8 @@ export declare class StorageAdapterAuditStore implements SkillAuditStore {
|
|
|
77
80
|
private get sequenceKey();
|
|
78
81
|
private recordKey;
|
|
79
82
|
nextSequence(): Promise<number>;
|
|
83
|
+
/** DECR's result tells atomically whether the counter was still `sequence`; when it was not, INCR restores it. */
|
|
84
|
+
releaseSequence(sequence: number): Promise<void>;
|
|
80
85
|
appendAtSequence(record: SkillAuditRecord): Promise<void>;
|
|
81
86
|
tail(): Promise<SkillAuditRecord | undefined>;
|
|
82
87
|
read(opts?: SkillAuditReadOptions): Promise<SkillAuditRecord[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-store.d.ts","sourceRoot":"","sources":["../../../src/skills/audit/audit-store.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE/E;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAEhC;;;;OAIG;IACH,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1D;;;;OAIG;IACH,IAAI,IAAI,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAAC;IAE9C,gFAAgF;IAChF,IAAI,CAAC,IAAI,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"audit-store.d.ts","sourceRoot":"","sources":["../../../src/skills/audit/audit-store.ts"],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Ae;IAE5D,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADP,OAAO,EAAE,cAAc,EACvB,OAAO,GAAE;QACxB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB;;;;;;WAMG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;KAClB;IAGR,OAAO,KAAK,WAAW,GAEtB;IAED,OAAO,CAAC,SAAS;IAKX,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC;IAIrC,kHAAkH;IAC5G,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKhD,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBzD,IAAI,IAAI,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC;IA8B7C,IAAI,CAAC,IAAI,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;CAwBtE"}
|
|
@@ -83,14 +83,7 @@ export declare const SKILL_AUDIT_QUEUE_MAX = 1000;
|
|
|
83
83
|
export interface SkillAuditWriterOptions {
|
|
84
84
|
/** See {@link SkillAuditSubjectMode}. Default: `'hash'`. */
|
|
85
85
|
subjectMode?: SkillAuditSubjectMode;
|
|
86
|
-
/**
|
|
87
|
-
* Secret used for the subject HMAC when `subjectMode: 'hash'`. Hosts
|
|
88
|
-
* SHOULD pass a stable, host-managed key (typically the same audit
|
|
89
|
-
* secret you use for HS256 signing). When omitted, a deterministic key
|
|
90
|
-
* is derived from the signer's keyId so subject hashes are stable
|
|
91
|
-
* within the process — but NOT across restarts unless the signer keyId
|
|
92
|
-
* is also stable.
|
|
93
|
-
*/
|
|
86
|
+
/** HMAC key for `subjectMode: 'hash'`; unset, it is {@link SkillAuditSigner.deriveKey}'s, or subjects are `'redacted'`. */
|
|
94
87
|
subjectHashSecret?: Uint8Array;
|
|
95
88
|
/** See {@link SKILL_AUDIT_QUEUE_MAX}. Default: 1000. */
|
|
96
89
|
maxQueueDepth?: number;
|
|
@@ -116,7 +109,7 @@ export declare class SkillAuditWriter {
|
|
|
116
109
|
/** Current in-flight queue depth (records awaiting the chain head lock). */
|
|
117
110
|
private queueDepth;
|
|
118
111
|
private readonly subjectMode;
|
|
119
|
-
private readonly
|
|
112
|
+
private readonly subjectHashKey?;
|
|
120
113
|
private readonly maxQueueDepth;
|
|
121
114
|
constructor(store: SkillAuditStore, signer: SkillAuditSigner, logger: SkillAuditLogger, metrics?: SkillAuditMetrics | undefined, options?: SkillAuditWriterOptions);
|
|
122
115
|
/**
|
|
@@ -145,31 +138,10 @@ export declare class SkillAuditWriter {
|
|
|
145
138
|
flush(): Promise<void>;
|
|
146
139
|
private write;
|
|
147
140
|
private doWrite;
|
|
148
|
-
/**
|
|
149
|
-
|
|
150
|
-
* close the gap; ones that don't are no-ops. We never throw out of this
|
|
151
|
-
* helper — a failed rollback is strictly worse than a permanent gap.
|
|
152
|
-
*
|
|
153
|
-
* Detection is duck-typed (we look at `.adapter.decr` and `.options.sequenceKey`)
|
|
154
|
-
* because the SkillAuditStore interface intentionally doesn't expose
|
|
155
|
-
* sequence-mutation methods — those are storage-specific implementation
|
|
156
|
-
* detail, and forcing every implementation to expose them would push the
|
|
157
|
-
* complexity onto every adapter even when the underlying store can't
|
|
158
|
-
* support transactional rollback.
|
|
159
|
-
*/
|
|
160
|
-
private tryDecrementSequence;
|
|
141
|
+
/** Best-effort {@link SkillAuditStore.releaseSequence}; never throws, so a failed rollback leaves the gap. */
|
|
142
|
+
private releaseUnusedSequence;
|
|
161
143
|
/** Apply the configured subject-mode redaction. */
|
|
162
144
|
private applySubjectMode;
|
|
163
|
-
/**
|
|
164
|
-
* Default subject-hash secret derivation when the host doesn't supply one.
|
|
165
|
-
* Returns a deterministic 32-byte key seeded from the signer's keyId so
|
|
166
|
-
* two SkillAuditWriter instances configured against the same signer
|
|
167
|
-
* produce stable subject hashes — useful for joining records across
|
|
168
|
-
* writer reconfigurations within the same logical deployment. NOT a
|
|
169
|
-
* cryptographic key in its own right — the host SHOULD override via
|
|
170
|
-
* constructor options for production deployments.
|
|
171
|
-
*/
|
|
172
|
-
private deriveDefaultSubjectSecret;
|
|
173
145
|
/**
|
|
174
146
|
* Hash arbitrary output. Falls back to a sentinel if canonicalization
|
|
175
147
|
* fails (circular references, non-serializable values) — the verifier
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-writer.d.ts","sourceRoot":"","sources":["../../../src/skills/audit/audit-writer.ts"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAA+C,MAAM,sBAAsB,CAAC;AAClH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAC/B,KAAK,CAAC,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;CAClC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,YAAY,GAAG,IAAI,CAAC;IACtE,gBAAgB,CAAC,CAAC,MAAM,EAAE,gBAAgB,GAAG,oBAAoB,GAAG,IAAI,CAAC;CAC1E;AAED,+EAA+E;AAC/E,MAAM,WAAW,mBAAmB;IAClC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG;QAAE,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,G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EAAE,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IASjG;;;;OAIG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAW5B,OAAO,CAAC,KAAK;YAqCC,OAAO;IAsGrB,8GAA8G;YAChG,qBAAqB;IAUnC,mDAAmD;IACnD,OAAO,CAAC,gBAAgB;IAWxB;;;;OAIG;IACH,OAAO,CAAC,QAAQ;IAQhB,yDAAyD;IACzD,OAAO,CAAC,WAAW;CAoBpB;AAED,iFAAiF;AACjF,OAAO,EAAE,6BAA6B,EAAE,CAAC"}
|
package/skills/audit/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { SKILL_AUDIT_GENESIS_PREV_HASH, SKILL_AUDIT_KEYS, type SkillAuditPhase, type SkillAuditRecord, type SkillAuditSignatureAlg, } from './audit-record.types';
|
|
2
|
-
export { canonicalizeRecordForSigning, linkRecord, nextPrevHash, verifyChain, type AuditChainVerifyResult, type AuditSignatureVerifier, type AuditTrustedKey, type SkillAuditPartialRecord, } from './audit-chain';
|
|
2
|
+
export { canonicalizeRecordForSigning, linkRecord, nextPrevHash, verifyChain, type AuditChainVerifyOptions, type AuditChainVerifyResult, type AuditSignatureVerifier, type AuditTrustedKey, type SkillAuditPartialRecord, } from './audit-chain';
|
|
3
3
|
export { defaultAuditSignatureVerifier, Hs256AuditSigner, Rs256AuditSigner, type SkillAuditSignResult, type SkillAuditSigner, } from './audit-signer';
|
|
4
4
|
export { MemoryAuditStore, StorageAdapterAuditStore, type SkillAuditReadOptions, type SkillAuditStore, } from './audit-store';
|
|
5
5
|
export { createSkillAuditMetrics, SkillAuditWriter, SKILL_AUDIT_ERROR_MESSAGE_MAX, SKILL_AUDIT_QUEUE_MAX, type SkillAuditAuthorityFailExtras, type SkillAuditFailureExtras, type SkillAuditLogger, type SkillAuditMetrics, type SkillAuditSuccessExtras, type SkillAuditTelemetry, type SkillAuditWriteContext, type SkillAuditWriterOptions, } from './audit-writer';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/skills/audit/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,6BAA6B,EAC7B,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,GAC5B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,4BAA4B,EAC5B,UAAU,EACV,YAAY,EACZ,WAAW,EACX,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,uBAAuB,GAC7B,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,6BAA6B,EAC7B,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,GACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,6BAA6B,EAC7B,qBAAqB,EACrB,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,GAC7B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,qBAAqB,EAAE,KAAK,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/skills/audit/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,6BAA6B,EAC7B,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,GAC5B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,4BAA4B,EAC5B,UAAU,EACV,YAAY,EACZ,WAAW,EACX,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,uBAAuB,GAC7B,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,6BAA6B,EAC7B,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,GACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,6BAA6B,EAC7B,qBAAqB,EACrB,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,GAC7B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,qBAAqB,EAAE,KAAK,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.schema.d.ts","sourceRoot":"","sources":["../../../src/skills/bundle/bundle.schema.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"bundle.schema.d.ts","sourceRoot":"","sources":["../../../src/skills/bundle/bundle.schema.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAoJvC,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAwBtB,CAAC;AAEZ,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEhE;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAgClG"}
|
package/skills/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export { FilesystemSkillsSource, loadFilesystemSkill, parseSkillFrontmatter, typ
|
|
|
13
13
|
export { bundleDigest, canonicalize, verifyBundleSignature, type SignatureVerifyCounter, type SignatureVerifyResult, type SignatureVerifyTelemetry, } from './security/bundle-signature';
|
|
14
14
|
export { BundlePushJwtVerifier, type BundlePushJwtVerifierOptions } from './security/jwt-verifier';
|
|
15
15
|
export { WebhookReplayGuard, type ReplayCheckResult, type ReplayGuardCounter, type ReplayGuardTelemetry, type WebhookReplayGuardOptions, } from './security/webhook-replay-guard';
|
|
16
|
-
export { canonicalizeRecordForSigning, createSkillAuditMetrics, defaultAuditSignatureVerifier, Hs256AuditSigner, linkRecord, MemoryAuditStore, nextPrevHash, Rs256AuditSigner, SKILL_AUDIT_ERROR_MESSAGE_MAX, SKILL_AUDIT_GENESIS_PREV_HASH, SKILL_AUDIT_KEYS, SKILL_AUDIT_QUEUE_MAX, SkillAuditWriter, SkillAuditWriterToken, StorageAdapterAuditStore, verifyChain, type AuditChainVerifyResult, type AuditSignatureVerifier, type AuditTrustedKey, type SkillAuditAuthorityFailExtras, type SkillAuditConfig, type SkillAuditFailureExtras, type SkillAuditLogger, type SkillAuditMetrics, type SkillAuditPartialRecord, type SkillAuditPhase, type SkillAuditReadOptions, type SkillAuditRecord, type SkillAuditSignatureAlg, type SkillAuditSigner, type SkillAuditSignResult, type SkillAuditSubjectMode, type SkillAuditWriterOptions, type SkillAuditStore, type SkillAuditSuccessExtras, type SkillAuditTelemetry, type SkillAuditWriteContext, } from './audit';
|
|
16
|
+
export { canonicalizeRecordForSigning, createSkillAuditMetrics, defaultAuditSignatureVerifier, Hs256AuditSigner, linkRecord, MemoryAuditStore, nextPrevHash, Rs256AuditSigner, SKILL_AUDIT_ERROR_MESSAGE_MAX, SKILL_AUDIT_GENESIS_PREV_HASH, SKILL_AUDIT_KEYS, SKILL_AUDIT_QUEUE_MAX, SkillAuditWriter, SkillAuditWriterToken, StorageAdapterAuditStore, verifyChain, type AuditChainVerifyOptions, type AuditChainVerifyResult, type AuditSignatureVerifier, type AuditTrustedKey, type SkillAuditAuthorityFailExtras, type SkillAuditConfig, type SkillAuditFailureExtras, type SkillAuditLogger, type SkillAuditMetrics, type SkillAuditPartialRecord, type SkillAuditPhase, type SkillAuditReadOptions, type SkillAuditRecord, type SkillAuditSignatureAlg, type SkillAuditSigner, type SkillAuditSignResult, type SkillAuditSubjectMode, type SkillAuditWriterOptions, type SkillAuditStore, type SkillAuditSuccessExtras, type SkillAuditTelemetry, type SkillAuditWriteContext, } from './audit';
|
|
17
17
|
export { hasSkillAuditFactory, setSkillAuditFactory } from '@frontmcp/sdk';
|
|
18
18
|
export { buildKnownOps, dedupeOpReferences, extractOpReferences, validateOpReferences, type KnownOps, type OpReference, type OpReferenceDiagnostic, type OpReferenceSyntax, type SourceLocation, } from './harvester/op-reference';
|
|
19
19
|
export { applyEnvironmentOverlay, crossValidateManifest, deployManifestSchema, type DeployManifest, type DeployManifestAuth, type DeployManifestBindings, type DeployManifestClassificationRule, type DeployManifestEnvironmentOverlay, type DeployManifestRuntime, type DeployManifestSecret, type DeployManifestServer, type DeployManifestSigning, type DeployManifestSkills, } from './deploy/deploy-manifest.schema';
|
package/skills/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":"AAQA,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,UAAU,EACV,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AC;AAK3E,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,cAAc,GACpB,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,gCAAgC,EACrC,KAAK,gCAAgC,EACrC,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,GAC1B,MAAM,iCAAiC,CAAC;AAKzC,OAAO,EACL,+BAA+B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,GAC1B,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EACL,4BAA4B,EAC5B,WAAW,EACX,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,YAAY,GAClB,MAAM,+BAA+B,CAAC;AAKvC,OAAO,EAAE,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACxF,OAAO,EACL,+BAA+B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,gCAAgC,EACrC,KAAK,gBAAgB,GACtB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,KAAK,8BAA8B,EAAE,MAAM,sCAAsC,CAAC"}
|
package/skills/index.js
CHANGED
|
@@ -119,6 +119,7 @@ function bundleSkillToActions(skill, ops) {
|
|
|
119
119
|
// libs/adapters/src/skills/bundle/bundle.schema.ts
|
|
120
120
|
var import_lazy_zod = require("@frontmcp/lazy-zod");
|
|
121
121
|
var httpMethodSchema = import_lazy_zod.z.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD"]);
|
|
122
|
+
var RFC7230_TOKEN = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
122
123
|
var pathTemplateRegex = /^\/[^\s?#]*$/;
|
|
123
124
|
var FORBIDDEN_PATH_FRAGMENTS = ["..", "\\", "`", "$(", "${"];
|
|
124
125
|
var pathTemplateSchema = import_lazy_zod.z.string().min(1).max(2048).refine((v) => pathTemplateRegex.test(v), {
|
|
@@ -138,7 +139,7 @@ var authBindingSchema = import_lazy_zod.z.discriminatedUnion("kind", [
|
|
|
138
139
|
import_lazy_zod.z.object({
|
|
139
140
|
kind: import_lazy_zod.z.literal("apiKey"),
|
|
140
141
|
in: import_lazy_zod.z.enum(["header", "query"]),
|
|
141
|
-
name: import_lazy_zod.z.string().min(1).max(128).regex(
|
|
142
|
+
name: import_lazy_zod.z.string().min(1).max(128).regex(RFC7230_TOKEN, "apiKey name must match RFC 7230 token grammar"),
|
|
142
143
|
vaultRef: import_lazy_zod.z.string().min(1).max(256)
|
|
143
144
|
}).strict(),
|
|
144
145
|
import_lazy_zod.z.object({
|
|
@@ -161,7 +162,10 @@ var parameterMapperSchema = import_lazy_zod.z.object({
|
|
|
161
162
|
explode: import_lazy_zod.z.boolean().optional(),
|
|
162
163
|
serialization: import_lazy_zod.z.record(import_lazy_zod.z.string(), import_lazy_zod.z.unknown()).optional(),
|
|
163
164
|
security: import_lazy_zod.z.record(import_lazy_zod.z.string(), import_lazy_zod.z.unknown()).optional()
|
|
164
|
-
}).passthrough()
|
|
165
|
+
}).passthrough().refine((mapper) => mapper.type !== "header" && mapper.type !== "cookie" || RFC7230_TOKEN.test(mapper.key), {
|
|
166
|
+
message: "a header or cookie mapper key must match RFC 7230 token grammar",
|
|
167
|
+
path: ["key"]
|
|
168
|
+
});
|
|
165
169
|
var operationDescriptorSchema = import_lazy_zod.z.object({
|
|
166
170
|
operationId: import_lazy_zod.z.string().min(1).max(256).regex(/^[a-zA-Z0-9_.\-:]+$/, "operationId must be alphanumeric / `-` / `_` / `.` / `:`"),
|
|
167
171
|
serviceId: import_lazy_zod.z.string().min(1).max(128),
|
|
@@ -1896,11 +1900,11 @@ function linkRecord(prev, partial) {
|
|
|
1896
1900
|
prevHash: nextPrevHash(prev)
|
|
1897
1901
|
};
|
|
1898
1902
|
}
|
|
1899
|
-
function verifyChain(records, trustedKeys, verifier) {
|
|
1903
|
+
function verifyChain(records, trustedKeys, verifier, options = {}) {
|
|
1900
1904
|
if (records.length === 0) {
|
|
1901
1905
|
return { ok: true, verified: 0 };
|
|
1902
1906
|
}
|
|
1903
|
-
let prev;
|
|
1907
|
+
let prev = options.previous;
|
|
1904
1908
|
for (let i = 0; i < records.length; i++) {
|
|
1905
1909
|
const rec = records[i];
|
|
1906
1910
|
if (!rec) {
|
|
@@ -1943,6 +1947,9 @@ function verifyChain(records, trustedKeys, verifier) {
|
|
|
1943
1947
|
|
|
1944
1948
|
// libs/adapters/src/skills/audit/audit-signer.ts
|
|
1945
1949
|
var import_utils7 = require("@frontmcp/utils");
|
|
1950
|
+
function deriveFromKeyMaterial(ikm, info, length) {
|
|
1951
|
+
return (0, import_utils7.hkdfSha256)(ikm, new Uint8Array(0), new TextEncoder().encode(info), length);
|
|
1952
|
+
}
|
|
1946
1953
|
var Hs256AuditSigner = class {
|
|
1947
1954
|
key;
|
|
1948
1955
|
keyId;
|
|
@@ -1990,9 +1997,13 @@ var Hs256AuditSigner = class {
|
|
|
1990
1997
|
getAlg() {
|
|
1991
1998
|
return "HS256";
|
|
1992
1999
|
}
|
|
2000
|
+
deriveKey(info, length) {
|
|
2001
|
+
return deriveFromKeyMaterial(this.key, info, length);
|
|
2002
|
+
}
|
|
1993
2003
|
};
|
|
1994
2004
|
var Rs256AuditSigner = class {
|
|
1995
2005
|
privateJwk;
|
|
2006
|
+
privateExponent;
|
|
1996
2007
|
keyId;
|
|
1997
2008
|
constructor(privateJwk, keyId) {
|
|
1998
2009
|
if (!keyId) {
|
|
@@ -2008,6 +2019,7 @@ var Rs256AuditSigner = class {
|
|
|
2008
2019
|
throw new Error("Rs256AuditSigner: privateJwk must include `n`, `e`, and `d` (RSA private key)");
|
|
2009
2020
|
}
|
|
2010
2021
|
this.privateJwk = { ...privateJwk };
|
|
2022
|
+
this.privateExponent = privateJwk.d;
|
|
2011
2023
|
this.keyId = keyId;
|
|
2012
2024
|
}
|
|
2013
2025
|
sign(record) {
|
|
@@ -2032,6 +2044,10 @@ var Rs256AuditSigner = class {
|
|
|
2032
2044
|
getAlg() {
|
|
2033
2045
|
return "RS256";
|
|
2034
2046
|
}
|
|
2047
|
+
/** Derived from the private exponent `d`, which only the holder of the private key has. */
|
|
2048
|
+
deriveKey(info, length) {
|
|
2049
|
+
return deriveFromKeyMaterial((0, import_utils7.base64urlDecode)(this.privateExponent), info, length);
|
|
2050
|
+
}
|
|
2035
2051
|
};
|
|
2036
2052
|
var defaultAuditSignatureVerifier = ({
|
|
2037
2053
|
alg,
|
|
@@ -2093,6 +2109,9 @@ var MemoryAuditStore = class {
|
|
|
2093
2109
|
if (this.records.length === 0) return void 0;
|
|
2094
2110
|
return this.records[this.records.length - 1];
|
|
2095
2111
|
}
|
|
2112
|
+
async releaseSequence(sequence) {
|
|
2113
|
+
if (sequence === this.seq && !this.records.some((record) => record.sequence === sequence)) this.seq -= 1;
|
|
2114
|
+
}
|
|
2096
2115
|
async read(opts) {
|
|
2097
2116
|
const from = opts?.from ?? 1;
|
|
2098
2117
|
const limit = opts?.limit;
|
|
@@ -2117,6 +2136,11 @@ var StorageAdapterAuditStore = class {
|
|
|
2117
2136
|
async nextSequence() {
|
|
2118
2137
|
return this.adapter.incr(this.sequenceKey);
|
|
2119
2138
|
}
|
|
2139
|
+
/** DECR's result tells atomically whether the counter was still `sequence`; when it was not, INCR restores it. */
|
|
2140
|
+
async releaseSequence(sequence) {
|
|
2141
|
+
if (await this.adapter.get(this.recordKey(sequence)) !== null) return;
|
|
2142
|
+
if (await this.adapter.decr(this.sequenceKey) !== sequence - 1) await this.adapter.incr(this.sequenceKey);
|
|
2143
|
+
}
|
|
2120
2144
|
async appendAtSequence(record) {
|
|
2121
2145
|
const key = this.recordKey(record.sequence);
|
|
2122
2146
|
const existing = await this.adapter.get(key);
|
|
@@ -2187,6 +2211,8 @@ function createSkillAuditMetrics(telemetry) {
|
|
|
2187
2211
|
}
|
|
2188
2212
|
var SKILL_AUDIT_ERROR_MESSAGE_MAX = 500;
|
|
2189
2213
|
var SKILL_AUDIT_QUEUE_MAX = 1e3;
|
|
2214
|
+
var SUBJECT_HASH_KEY_INFO = "frontmcp:audit:subject";
|
|
2215
|
+
var SUBJECT_HASH_KEY_LENGTH = 32;
|
|
2190
2216
|
var SkillAuditWriter = class {
|
|
2191
2217
|
constructor(store, signer, logger, metrics, options = {}) {
|
|
2192
2218
|
this.store = store;
|
|
@@ -2194,7 +2220,14 @@ var SkillAuditWriter = class {
|
|
|
2194
2220
|
this.logger = logger;
|
|
2195
2221
|
this.metrics = metrics;
|
|
2196
2222
|
this.subjectMode = options.subjectMode ?? "hash";
|
|
2197
|
-
this.
|
|
2223
|
+
if (this.subjectMode === "hash") {
|
|
2224
|
+
this.subjectHashKey = options.subjectHashSecret ?? signer.deriveKey?.(SUBJECT_HASH_KEY_INFO, SUBJECT_HASH_KEY_LENGTH);
|
|
2225
|
+
if (!this.subjectHashKey) {
|
|
2226
|
+
logger.warn(
|
|
2227
|
+
`[skill-audit] subjectMode 'hash' needs a key, and the signer (keyId "${signer.getKeyId()}") has no key material to derive one from, so subjects are recorded as 'redacted'. Set skillsConfig.audit.subjectHashSecret to record subject hashes.`
|
|
2228
|
+
);
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2198
2231
|
this.maxQueueDepth = options.maxQueueDepth ?? SKILL_AUDIT_QUEUE_MAX;
|
|
2199
2232
|
}
|
|
2200
2233
|
store;
|
|
@@ -2210,7 +2243,7 @@ var SkillAuditWriter = class {
|
|
|
2210
2243
|
/** Current in-flight queue depth (records awaiting the chain head lock). */
|
|
2211
2244
|
queueDepth = 0;
|
|
2212
2245
|
subjectMode;
|
|
2213
|
-
|
|
2246
|
+
subjectHashKey;
|
|
2214
2247
|
maxQueueDepth;
|
|
2215
2248
|
/**
|
|
2216
2249
|
* Phase 2 in the tool: authority check just passed. We log the inputHash
|
|
@@ -2337,7 +2370,7 @@ var SkillAuditWriter = class {
|
|
|
2337
2370
|
} catch (e) {
|
|
2338
2371
|
this.logger.warn(`[skill-audit] failed to sign record at seq=${sequence}: ${e.message}`);
|
|
2339
2372
|
this.metrics?.incrementWriteFailure("sign");
|
|
2340
|
-
await this.
|
|
2373
|
+
await this.releaseUnusedSequence(sequence);
|
|
2341
2374
|
return;
|
|
2342
2375
|
}
|
|
2343
2376
|
try {
|
|
@@ -2346,27 +2379,14 @@ var SkillAuditWriter = class {
|
|
|
2346
2379
|
} catch (e) {
|
|
2347
2380
|
this.logger.warn(`[skill-audit] failed to append record at seq=${sequence}: ${e.message}`);
|
|
2348
2381
|
this.metrics?.incrementWriteFailure("append");
|
|
2349
|
-
await this.
|
|
2382
|
+
await this.releaseUnusedSequence(sequence);
|
|
2350
2383
|
}
|
|
2351
2384
|
}
|
|
2352
|
-
/**
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
* helper — a failed rollback is strictly worse than a permanent gap.
|
|
2356
|
-
*
|
|
2357
|
-
* Detection is duck-typed (we look at `.adapter.decr` and `.options.sequenceKey`)
|
|
2358
|
-
* because the SkillAuditStore interface intentionally doesn't expose
|
|
2359
|
-
* sequence-mutation methods — those are storage-specific implementation
|
|
2360
|
-
* detail, and forcing every implementation to expose them would push the
|
|
2361
|
-
* complexity onto every adapter even when the underlying store can't
|
|
2362
|
-
* support transactional rollback.
|
|
2363
|
-
*/
|
|
2364
|
-
async tryDecrementSequence(allocated) {
|
|
2365
|
-
const storeAny = this.store;
|
|
2366
|
-
if (!storeAny.adapter || typeof storeAny.adapter.decr !== "function") return;
|
|
2367
|
-
const sequenceKey = storeAny.options?.sequenceKey ?? "audit:skills:sequence";
|
|
2385
|
+
/** Best-effort {@link SkillAuditStore.releaseSequence}; never throws, so a failed rollback leaves the gap. */
|
|
2386
|
+
async releaseUnusedSequence(allocated) {
|
|
2387
|
+
if (!this.store.releaseSequence) return;
|
|
2368
2388
|
try {
|
|
2369
|
-
await
|
|
2389
|
+
await this.store.releaseSequence(allocated);
|
|
2370
2390
|
this.logger.debug?.(`[skill-audit] rolled back unused sequence ${allocated}`);
|
|
2371
2391
|
} catch {
|
|
2372
2392
|
}
|
|
@@ -2374,28 +2394,11 @@ var SkillAuditWriter = class {
|
|
|
2374
2394
|
/** Apply the configured subject-mode redaction. */
|
|
2375
2395
|
applySubjectMode(subject) {
|
|
2376
2396
|
if (this.subjectMode === "plain") return subject;
|
|
2377
|
-
if (this.subjectMode === "omit") return "redacted";
|
|
2378
|
-
const mac = (0, import_utils8.hmacSha256)(this.
|
|
2397
|
+
if (this.subjectMode === "omit" || !this.subjectHashKey) return "redacted";
|
|
2398
|
+
const mac = (0, import_utils8.hmacSha256)(this.subjectHashKey, new TextEncoder().encode(subject));
|
|
2379
2399
|
const hex = (0, import_utils8.bytesToHex)(mac);
|
|
2380
2400
|
return `hashed:${hex.slice(0, 32)}`;
|
|
2381
2401
|
}
|
|
2382
|
-
/**
|
|
2383
|
-
* Default subject-hash secret derivation when the host doesn't supply one.
|
|
2384
|
-
* Returns a deterministic 32-byte key seeded from the signer's keyId so
|
|
2385
|
-
* two SkillAuditWriter instances configured against the same signer
|
|
2386
|
-
* produce stable subject hashes — useful for joining records across
|
|
2387
|
-
* writer reconfigurations within the same logical deployment. NOT a
|
|
2388
|
-
* cryptographic key in its own right — the host SHOULD override via
|
|
2389
|
-
* constructor options for production deployments.
|
|
2390
|
-
*/
|
|
2391
|
-
deriveDefaultSubjectSecret() {
|
|
2392
|
-
const key = new Uint8Array(32);
|
|
2393
|
-
const seed = new TextEncoder().encode(`frontmcp:audit:subject:${this.signer.getKeyId()}`);
|
|
2394
|
-
for (let i = 0; i < key.length; i++) {
|
|
2395
|
-
key[i] = seed[i % seed.length] ?? 0;
|
|
2396
|
-
}
|
|
2397
|
-
return key;
|
|
2398
|
-
}
|
|
2399
2402
|
/**
|
|
2400
2403
|
* Hash arbitrary output. Falls back to a sentinel if canonicalization
|
|
2401
2404
|
* fails (circular references, non-serializable values) — the verifier
|
|
@@ -22,6 +22,7 @@ export interface PushJwtVerifyResult {
|
|
|
22
22
|
reason?: string;
|
|
23
23
|
payload?: Record<string, unknown>;
|
|
24
24
|
}
|
|
25
|
+
/** Not wired to any route: a host serving its own push endpoint calls `verify` and refuses on `ok: false`. */
|
|
25
26
|
export declare class BundlePushJwtVerifier {
|
|
26
27
|
private readonly options;
|
|
27
28
|
private readonly logger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwt-verifier.d.ts","sourceRoot":"","sources":["../../../src/skills/security/jwt-verifier.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jwt-verifier.d.ts","sourceRoot":"","sources":["../../../src/skills/security/jwt-verifier.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAA6C,MAAM,gBAAgB,CAAC;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM,WAAW,4BAA4B;IAC3C,+CAA+C;IAC/C,cAAc,EAAE,MAAM,CAAC;IACvB,6DAA6D;IAC7D,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,uEAAuE;IACvE,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,wEAAwE;IACxE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAID,8GAA8G;AAC9G,qBAAa,qBAAqB;IAK9B,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IALzB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAoB;IAChD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAc;gBAGhB,OAAO,EAAE,4BAA4B,EACrC,MAAM,EAAE,cAAc,EACvC,IAAI,CAAC,EAAE,WAAW;IAUpB;;;OAGG;IACG,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAsDzD,OAAO,CAAC,UAAU;CAQnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-replay-guard.d.ts","sourceRoot":"","sources":["../../../src/skills/security/webhook-replay-guard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webhook-replay-guard.d.ts","sourceRoot":"","sources":["../../../src/skills/security/webhook-replay-guard.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CAC7D;AACD,MAAM,WAAW,oBAAoB;IACnC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAAC;CACvE;AAED,MAAM,WAAW,yBAAyB;IACxC,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,QAAQ,C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