@mcp-index/sdk 0.18.1 → 0.19.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/CHANGELOG.md +20 -1
- package/README.md +178 -0
- package/dist/src/ai.d.ts +96 -0
- package/dist/src/ai.d.ts.map +1 -0
- package/dist/src/ai.js +151 -0
- package/dist/src/ai.js.map +1 -0
- package/dist/src/gate.d.ts +7 -0
- package/dist/src/gate.d.ts.map +1 -1
- package/dist/src/gate.js +36 -2
- package/dist/src/gate.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/lock/check.d.ts +143 -0
- package/dist/src/lock/check.d.ts.map +1 -0
- package/dist/src/lock/check.js +274 -0
- package/dist/src/lock/check.js.map +1 -0
- package/dist/src/lock/digest.d.ts +48 -0
- package/dist/src/lock/digest.d.ts.map +1 -0
- package/dist/src/lock/digest.js +234 -0
- package/dist/src/lock/digest.js.map +1 -0
- package/dist/src/lock/events.d.ts +82 -0
- package/dist/src/lock/events.d.ts.map +1 -0
- package/dist/src/lock/events.js +80 -0
- package/dist/src/lock/events.js.map +1 -0
- package/dist/src/lock/index.d.ts +20 -0
- package/dist/src/lock/index.d.ts.map +1 -0
- package/dist/src/lock/index.js +14 -0
- package/dist/src/lock/index.js.map +1 -0
- package/dist/src/lock/lock.d.ts +195 -0
- package/dist/src/lock/lock.d.ts.map +1 -0
- package/dist/src/lock/lock.js +1075 -0
- package/dist/src/lock/lock.js.map +1 -0
- package/dist/src/lock/pg.d.ts +150 -0
- package/dist/src/lock/pg.d.ts.map +1 -0
- package/dist/src/lock/pg.js +539 -0
- package/dist/src/lock/pg.js.map +1 -0
- package/dist/src/lock/rawList.d.ts +127 -0
- package/dist/src/lock/rawList.d.ts.map +1 -0
- package/dist/src/lock/rawList.js +561 -0
- package/dist/src/lock/rawList.js.map +1 -0
- package/dist/src/lock/signing.d.ts +35 -0
- package/dist/src/lock/signing.d.ts.map +1 -0
- package/dist/src/lock/signing.js +85 -0
- package/dist/src/lock/signing.js.map +1 -0
- package/dist/src/lock/store.d.ts +149 -0
- package/dist/src/lock/store.d.ts.map +1 -0
- package/dist/src/lock/store.js +459 -0
- package/dist/src/lock/store.js.map +1 -0
- package/dist/src/schemaDiff.d.ts +21 -2
- package/dist/src/schemaDiff.d.ts.map +1 -1
- package/dist/src/schemaDiff.js +79 -1
- package/dist/src/schemaDiff.js.map +1 -1
- package/package.json +31 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/lock/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG/E,eAAO,MAAM,YAAY,0BAA0B,CAAC;AAEpD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,SAAS;IACjB,QAAQ,CAAC,MAAM,EAAE,OAAO,YAAY,CAAC;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;CAC9B;AAED,MAAM,WAAW,YAAa,SAAQ,SAAS;IAC7C,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,eAAe,GAAG,IAAI,CAA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
+
* one the caller constructs with a path.
|
|
5
|
+
*
|
|
6
|
+
* Events carry tool names, digests and reason codes. They never carry call
|
|
7
|
+
* arguments, call results, descriptions, instructions text or credentials:
|
|
8
|
+
* builders take only those fields, so there is no object to leak from.
|
|
9
|
+
*/
|
|
10
|
+
import { appendFileSync } from "node:fs";
|
|
11
|
+
import { randomUUID } from "node:crypto";
|
|
12
|
+
import { identityH16, slug } from "./lock.js";
|
|
13
|
+
import { nowRfc3339 } from "./store.js";
|
|
14
|
+
export const EVENT_SCHEMA = "mcpindex.lock.event/1";
|
|
15
|
+
function base(ctx) {
|
|
16
|
+
return {
|
|
17
|
+
schema: EVENT_SCHEMA,
|
|
18
|
+
id: (ctx.newId ?? randomUUID)(),
|
|
19
|
+
time: nowRfc3339((ctx.now ?? (() => new Date()))()),
|
|
20
|
+
host: ctx.host,
|
|
21
|
+
server: { h16: identityH16(ctx.identity), slug: slug(ctx.identity) },
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export function listingEvent(ctx, decision, snapshotId) {
|
|
25
|
+
// As in the Python host: every served entry that is not shown counts as
|
|
26
|
+
// withheld, entries without a string name included.
|
|
27
|
+
const withheld = decision.served - decision.shown.length;
|
|
28
|
+
return {
|
|
29
|
+
...base(ctx),
|
|
30
|
+
type: "listing",
|
|
31
|
+
posture: decision.posture,
|
|
32
|
+
lockError: decision.lockError,
|
|
33
|
+
counts: { served: decision.served, shown: decision.shown.length, withheld, removed: decision.removed.length },
|
|
34
|
+
tools: decision.tools.map((t) => ({
|
|
35
|
+
name: t.name,
|
|
36
|
+
served: t.served,
|
|
37
|
+
approved: t.approved,
|
|
38
|
+
decision: t.decision,
|
|
39
|
+
reason: t.reason,
|
|
40
|
+
meta: t.meta,
|
|
41
|
+
})),
|
|
42
|
+
removed: [...decision.removed],
|
|
43
|
+
// Under a whole-lock failure the instructions are withheld with everything
|
|
44
|
+
// else and the event carries no instructions code, as in the Python host.
|
|
45
|
+
instructions: decision.lockError !== null ? null : decision.instructions,
|
|
46
|
+
snapshotId,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export function refusalEvent(ctx, tool, reason) {
|
|
50
|
+
return { ...base(ctx), type: "refusal", tool, reason };
|
|
51
|
+
}
|
|
52
|
+
export function approvalEvent(ctx, approval) {
|
|
53
|
+
return {
|
|
54
|
+
...base(ctx),
|
|
55
|
+
type: "approval",
|
|
56
|
+
tool: approval.tool,
|
|
57
|
+
digest: approval.digest,
|
|
58
|
+
via: approval.via,
|
|
59
|
+
subject: approval.subject,
|
|
60
|
+
ref: approval.ref ?? null,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/** Call the sink and swallow its errors: an event failure never changes a decision. */
|
|
64
|
+
export function emit(sink, event) {
|
|
65
|
+
if (sink === undefined)
|
|
66
|
+
return;
|
|
67
|
+
try {
|
|
68
|
+
sink(event);
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
// sink errors are the sink's problem
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/** Append one JSON line per event to `path`. Only used when a caller builds it. */
|
|
75
|
+
export function jsonlFileSink(path) {
|
|
76
|
+
return (event) => {
|
|
77
|
+
appendFileSync(path, JSON.stringify(event) + "\n", { encoding: "utf8", mode: 0o600 });
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/lock/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAG9C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,CAAC,MAAM,YAAY,GAAG,uBAAuB,CAAC;AA2DpD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,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACxF,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@mcp-index/sdk/lock`: lock mode (mcp.lock draft 1). Opt-in; nothing here
|
|
3
|
+
* runs unless a host constructs it. The root `@mcp-index/sdk` import does not
|
|
4
|
+
* load this module. The Postgres store is a separate subpath,
|
|
5
|
+
* `@mcp-index/sdk/lock/pg`.
|
|
6
|
+
*/
|
|
7
|
+
export { CanonicalizationError, DIGEST_PREFIX, NUMBER_LIMIT, canonicalBody, canonicalize, hasLoneSurrogate, instructionsDigest, metaDigest, toolDigest, toolSetDigest, } from "./digest.js";
|
|
8
|
+
export { ALIASES, FrozenMap, LOCK_VERSION, LockError, MANIFEST, POSTURES, REGISTRIES, SEQUENCE_MAX, SIGNATURE, commandIdentity, findDuplicateKey, findNonIntegerNumber, formatAliases, formatLockFile, formatManifest, formatShard, identityH16, identityKey, loadLock, normalizeUrl, packageIdentity, parseShard, remoteIdentity, resolveAlias, secretArgProblem, shardFilename, slug, strictJson, validateIdentity, } from "./lock.js";
|
|
9
|
+
export type { Approval, Attributes, CommandIdentity, Identity, LoadedLock, Lock, LockErrorReason, ManifestVerifier, PackageIdentity, Posture, ReaderConfig, RemoteIdentity, Shard, SignerIdentity, ToolEntry, Via, } from "./lock.js";
|
|
10
|
+
export { CallGate, DEFAULT_MAX_STALENESS_MS, LOCK_REFUSAL_CODE, LOCK_REFUSAL_MESSAGE, LockRefusal, checkCall, checkInstructions, checkListing, isPosture, refusalError, } from "./check.js";
|
|
11
|
+
export type { CallGateOptions, CallReason, Decision, Listing, MetaReason, RefusalError, ToolOutcome, ToolReason } from "./check.js";
|
|
12
|
+
export { FileLockStore, HostConfigError, fileSequenceStore, hostPathProblem, nowRfc3339, prepareTool, repositoryRoot } from "./store.js";
|
|
13
|
+
export type { ApproveInstructionsRequest, ApproveRequest, ApproveToolRequest, FileLockStoreOptions, LockSnapshot, LockStore, RevokeRequest, SequenceStore, } from "./store.js";
|
|
14
|
+
export { EVENT_SCHEMA, approvalEvent, jsonlFileSink, listingEvent, refusalEvent } from "./events.js";
|
|
15
|
+
export type { ApprovalEvent, EventContext, ListingEvent, LockEvent, LockEventSink, RefusalEvent } from "./events.js";
|
|
16
|
+
export { HANDSHAKE_METHODS, LockedTransport, MAX_LIST_PAGES, MAX_LIST_TOOLS, MAX_OUTSTANDING, REQUEST_TTL_MS, lockClient } from "./rawList.js";
|
|
17
|
+
export type { ConnectableClient, LockOptions } from "./rawList.js";
|
|
18
|
+
export { anchoredPattern, sigstoreVerifier } from "./signing.js";
|
|
19
|
+
export type { SigstoreVerifierOptions } from "./signing.js";
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lock/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,OAAO,EACP,SAAS,EACT,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,cAAc,EACd,WAAW,EACX,WAAW,EACX,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,UAAU,EACV,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,IAAI,EACJ,UAAU,EACV,gBAAgB,GACjB,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,QAAQ,EACR,UAAU,EACV,eAAe,EACf,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,eAAe,EACf,gBAA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mcp-index/sdk/lock`: lock mode (mcp.lock draft 1). Opt-in; nothing here
|
|
3
|
+
* runs unless a host constructs it. The root `@mcp-index/sdk` import does not
|
|
4
|
+
* load this module. The Postgres store is a separate subpath,
|
|
5
|
+
* `@mcp-index/sdk/lock/pg`.
|
|
6
|
+
*/
|
|
7
|
+
export { CanonicalizationError, DIGEST_PREFIX, NUMBER_LIMIT, canonicalBody, canonicalize, hasLoneSurrogate, instructionsDigest, metaDigest, toolDigest, toolSetDigest, } from "./digest.js";
|
|
8
|
+
export { ALIASES, FrozenMap, LOCK_VERSION, LockError, MANIFEST, POSTURES, REGISTRIES, SEQUENCE_MAX, SIGNATURE, commandIdentity, findDuplicateKey, findNonIntegerNumber, formatAliases, formatLockFile, formatManifest, formatShard, identityH16, identityKey, loadLock, normalizeUrl, packageIdentity, parseShard, remoteIdentity, resolveAlias, secretArgProblem, shardFilename, slug, strictJson, validateIdentity, } from "./lock.js";
|
|
9
|
+
export { CallGate, DEFAULT_MAX_STALENESS_MS, LOCK_REFUSAL_CODE, LOCK_REFUSAL_MESSAGE, LockRefusal, checkCall, checkInstructions, checkListing, isPosture, refusalError, } from "./check.js";
|
|
10
|
+
export { FileLockStore, HostConfigError, fileSequenceStore, hostPathProblem, nowRfc3339, prepareTool, repositoryRoot } from "./store.js";
|
|
11
|
+
export { EVENT_SCHEMA, approvalEvent, jsonlFileSink, listingEvent, refusalEvent } from "./events.js";
|
|
12
|
+
export { HANDSHAKE_METHODS, LockedTransport, MAX_LIST_PAGES, MAX_LIST_TOOLS, MAX_OUTSTANDING, REQUEST_TTL_MS, lockClient } from "./rawList.js";
|
|
13
|
+
export { anchoredPattern, sigstoreVerifier } from "./signing.js";
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lock/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,OAAO,EACP,SAAS,EACT,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,cAAc,EACd,WAAW,EACX,WAAW,EACX,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,UAAU,EACV,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,IAAI,EACJ,UAAU,EACV,gBAAgB,GACjB,MAAM,WAAW,CAAC;AAmBnB,OAAO,EACL,QAAQ,EACR,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,YAAY,GACb,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAWzI,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAErG,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/I,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lock format draft 1 (spec/mcp-lock-draft-1.md in mcp-tool-pinning): server
|
|
3
|
+
* identity, the strict reader for `.mcp/lock` and `.mcp/contracts`, and a
|
|
4
|
+
* writer whose bytes match the Python generator (json.dumps indent=2 with
|
|
5
|
+
* ensure_ascii, trailing newline).
|
|
6
|
+
*
|
|
7
|
+
* The reader mirrors mcp_tool_pinning.lockref check for check and in the same
|
|
8
|
+
* order, so a lock with one fault gives the same reason code in both. Every
|
|
9
|
+
* file is read once; the manifest, signature and parse all use those bytes.
|
|
10
|
+
*/
|
|
11
|
+
export declare const LOCK_VERSION = "1-draft";
|
|
12
|
+
export declare const POSTURES: readonly ["monitor", "guard", "strict"];
|
|
13
|
+
export type Posture = (typeof POSTURES)[number];
|
|
14
|
+
export declare const REGISTRIES: readonly ["npm", "pypi", "oci"];
|
|
15
|
+
export type Registry = (typeof REGISTRIES)[number];
|
|
16
|
+
export declare const MANIFEST = "MANIFEST.json";
|
|
17
|
+
export declare const SIGNATURE = "MANIFEST.json.sigstore";
|
|
18
|
+
export declare const ALIASES = "aliases.json";
|
|
19
|
+
export declare const SLUG_MAX = 48;
|
|
20
|
+
/** Largest manifest sequence; every reader parses it exactly. */
|
|
21
|
+
export declare const SEQUENCE_MAX: number;
|
|
22
|
+
export declare const SHARD_NAME: RegExp;
|
|
23
|
+
export declare const CONTRACT_NAME: RegExp;
|
|
24
|
+
export declare const DIGEST_FORM: RegExp;
|
|
25
|
+
export declare const VIA: readonly ["pr", "runtime", "api", "migrated"];
|
|
26
|
+
export type Via = (typeof VIA)[number];
|
|
27
|
+
/** Whole-lock reason codes, plus `lock-stale` for a snapshot past its age limit. */
|
|
28
|
+
export type LockErrorReason = "lock-unreadable" | "lock-unsupported" | "lock-signature-invalid" | "contract-mismatch" | "lock-stale";
|
|
29
|
+
export declare class LockError extends Error {
|
|
30
|
+
readonly reason: LockErrorReason;
|
|
31
|
+
readonly detail: string;
|
|
32
|
+
constructor(reason: LockErrorReason, detail: string);
|
|
33
|
+
}
|
|
34
|
+
/** Read-only Map view. Snapshots hand these out so a holder cannot edit them. */
|
|
35
|
+
export declare class FrozenMap<K, V> implements ReadonlyMap<K, V> {
|
|
36
|
+
#private;
|
|
37
|
+
constructor(entries: Iterable<readonly [K, V]>);
|
|
38
|
+
get size(): number;
|
|
39
|
+
get(key: K): V | undefined;
|
|
40
|
+
has(key: K): boolean;
|
|
41
|
+
forEach(fn: (value: V, key: K, map: ReadonlyMap<K, V>) => void): void;
|
|
42
|
+
entries(): MapIterator<[K, V]>;
|
|
43
|
+
keys(): MapIterator<K>;
|
|
44
|
+
values(): MapIterator<V>;
|
|
45
|
+
[Symbol.iterator](): MapIterator<[K, V]>;
|
|
46
|
+
}
|
|
47
|
+
export type RemoteIdentity = {
|
|
48
|
+
readonly kind: "remote";
|
|
49
|
+
readonly url: string;
|
|
50
|
+
};
|
|
51
|
+
export type PackageIdentity = {
|
|
52
|
+
readonly kind: "stdio";
|
|
53
|
+
readonly package: string;
|
|
54
|
+
};
|
|
55
|
+
export type CommandIdentity = {
|
|
56
|
+
readonly kind: "stdio";
|
|
57
|
+
readonly command: string;
|
|
58
|
+
readonly args: readonly string[];
|
|
59
|
+
};
|
|
60
|
+
export type Identity = RemoteIdentity | PackageIdentity | CommandIdentity;
|
|
61
|
+
/** Section 3.1. Throws Error on a URL that cannot be an identity. */
|
|
62
|
+
export declare function normalizeUrl(url: string): string;
|
|
63
|
+
export declare function remoteIdentity(url: string): RemoteIdentity;
|
|
64
|
+
export declare function packageIdentity(registry: string, name: string): PackageIdentity;
|
|
65
|
+
/**
|
|
66
|
+
* Section 3.2 command form: the basename of the command and every argument
|
|
67
|
+
* verbatim. Throws for a command that is not a basename once its path is
|
|
68
|
+
* removed, and for secret-looking arguments (section 3.2.1), which an identity
|
|
69
|
+
* can neither keep nor strip. The message names the rule, never the value.
|
|
70
|
+
*/
|
|
71
|
+
export declare function commandIdentity(command: string, args?: readonly string[]): CommandIdentity;
|
|
72
|
+
/** null if no argument is secret-looking under section 3.2.1, else what was found. */
|
|
73
|
+
export declare function secretArgProblem(args: readonly string[]): string | null;
|
|
74
|
+
/** Validate a parsed identity object. Returns a fresh frozen copy or throws LockError. */
|
|
75
|
+
export declare function validateIdentity(value: unknown): Identity;
|
|
76
|
+
/** RFC 8785 text of the identity (section 3.3). Compare identities by this string. */
|
|
77
|
+
export declare function identityKey(identity: Identity): string;
|
|
78
|
+
export declare function identityH16(identity: Identity): string;
|
|
79
|
+
export declare function slug(identity: Identity): string;
|
|
80
|
+
export declare function shardFilename(identity: Identity): string;
|
|
81
|
+
/**
|
|
82
|
+
* Find a member name repeated within one object. JSON.parse keeps the last
|
|
83
|
+
* value silently, so this scans the text, which JSON.parse has already
|
|
84
|
+
* accepted, and compares decoded names (so "a" and "a" collide).
|
|
85
|
+
*/
|
|
86
|
+
/**
|
|
87
|
+
* Section 4.3: every number in a lock file is an integer token. JSON.parse
|
|
88
|
+
* turns 1.0 and 1e0 into 1, so the raw text is checked. Returns the first
|
|
89
|
+
* offending token, or null. Outside strings, a number is the only token that
|
|
90
|
+
* starts with `-` or a digit.
|
|
91
|
+
*/
|
|
92
|
+
export declare function findNonIntegerNumber(text: string): string | null;
|
|
93
|
+
export declare function findDuplicateKey(text: string): string | null;
|
|
94
|
+
/**
|
|
95
|
+
* Parse lock file bytes: UTF-8 (a BOM is kept and so rejected), JSON, no repeated
|
|
96
|
+
* member names, integer number tokens only. JSON.parse has no NaN or Infinity,
|
|
97
|
+
* so that rule needs no code.
|
|
98
|
+
*/
|
|
99
|
+
export declare function strictJson(data: Uint8Array, what: string): unknown;
|
|
100
|
+
export interface Approval {
|
|
101
|
+
readonly subject: string;
|
|
102
|
+
readonly at: string;
|
|
103
|
+
readonly via: Via;
|
|
104
|
+
readonly ref?: string;
|
|
105
|
+
}
|
|
106
|
+
export interface ToolEntry {
|
|
107
|
+
readonly digest: string;
|
|
108
|
+
readonly contract: string;
|
|
109
|
+
/** Digest of the top-level `_meta` approved with the tool, when it had one. */
|
|
110
|
+
readonly metaDigest?: string;
|
|
111
|
+
readonly approval: Approval;
|
|
112
|
+
}
|
|
113
|
+
export interface Attributes {
|
|
114
|
+
readonly version?: string;
|
|
115
|
+
readonly audience?: string;
|
|
116
|
+
readonly command?: string;
|
|
117
|
+
readonly args?: readonly string[];
|
|
118
|
+
readonly env?: readonly string[];
|
|
119
|
+
}
|
|
120
|
+
export interface Shard {
|
|
121
|
+
readonly identity: Identity;
|
|
122
|
+
readonly attributes: Attributes | null;
|
|
123
|
+
/** Instructions digest, or null when the shard has none. */
|
|
124
|
+
readonly instructions: string | null;
|
|
125
|
+
/** Tool name to entry, in file order. */
|
|
126
|
+
readonly tools: ReadonlyMap<string, ToolEntry>;
|
|
127
|
+
}
|
|
128
|
+
export interface Lock {
|
|
129
|
+
/** Identity key to shard. */
|
|
130
|
+
readonly shards: ReadonlyMap<string, Shard>;
|
|
131
|
+
readonly aliases: ReadonlyMap<string, Identity>;
|
|
132
|
+
/** Manifest sequence, or null without a manifest. */
|
|
133
|
+
readonly sequence: number | null;
|
|
134
|
+
}
|
|
135
|
+
export interface SignerIdentity {
|
|
136
|
+
/** Certificate issuer, compared exactly. */
|
|
137
|
+
readonly issuer: string;
|
|
138
|
+
/** Certificate subject alternative name, compared exactly. */
|
|
139
|
+
readonly san: string;
|
|
140
|
+
}
|
|
141
|
+
/** Verifies a Sigstore bundle over the exact manifest bytes. Any throw counts as false. */
|
|
142
|
+
export interface ManifestVerifier {
|
|
143
|
+
verify(manifest: Uint8Array, bundle: Uint8Array, signer: SignerIdentity): Promise<boolean>;
|
|
144
|
+
}
|
|
145
|
+
/** Host configuration. Never read from the lock repository or the environment. */
|
|
146
|
+
export interface ReaderConfig {
|
|
147
|
+
readonly requireManifest?: boolean;
|
|
148
|
+
readonly signer?: SignerIdentity | null;
|
|
149
|
+
/**
|
|
150
|
+
* Section 8.2: true when the host keeps a sequence store. Required with a
|
|
151
|
+
* signer; `lastSequence` is the floor read from it (null when it holds none).
|
|
152
|
+
*/
|
|
153
|
+
readonly sequenceStore?: boolean;
|
|
154
|
+
readonly lastSequence?: number | null;
|
|
155
|
+
readonly verifier?: ManifestVerifier | null;
|
|
156
|
+
}
|
|
157
|
+
/** Every file in `.mcp/lock`, read once. Names are checked as raw bytes for ASCII. */
|
|
158
|
+
export declare function readLockDir(lockDir: string): Map<string, Buffer>;
|
|
159
|
+
/** Section 6 binding: contract filename, presence, and sha256 of the bytes. */
|
|
160
|
+
export type ContractReader = (filename: string) => Buffer | null;
|
|
161
|
+
/** Parse and check one shard (section 5). `filename` must already match SHARD_NAME. */
|
|
162
|
+
export declare function parseShard(filename: string, raw: Uint8Array, readContract: ContractReader): Shard;
|
|
163
|
+
export interface LoadedLock {
|
|
164
|
+
readonly lock: Lock;
|
|
165
|
+
/** sha256 over the sorted (name, sha256) list of every file in `.mcp/lock`. */
|
|
166
|
+
readonly snapshotId: string;
|
|
167
|
+
}
|
|
168
|
+
/** Hash of the lock directory contents; contracts are bound through the shards. */
|
|
169
|
+
export declare function lockFilesId(files: ReadonlyMap<string, Uint8Array>): string;
|
|
170
|
+
/** Read and verify the whole lock under `root`. Any failure throws LockError. */
|
|
171
|
+
export declare function loadLock(root: string, config?: ReaderConfig): Promise<LoadedLock>;
|
|
172
|
+
/**
|
|
173
|
+
* Synchronous read for writers holding the file lock. Refuses a config with a
|
|
174
|
+
* signer, since signature checks are asynchronous; a writer does not need them.
|
|
175
|
+
*/
|
|
176
|
+
export declare function loadLockSync(root: string, config?: ReaderConfig): LoadedLock;
|
|
177
|
+
/** The identity an alias names, if the lock maps it. */
|
|
178
|
+
export declare function resolveAlias(lock: Lock, alias: string): Identity | null;
|
|
179
|
+
/** An ordered JSON object for the writer: entries are written in this order. */
|
|
180
|
+
export type Ordered = {
|
|
181
|
+
readonly entries: ReadonlyArray<readonly [string, WriterValue]>;
|
|
182
|
+
};
|
|
183
|
+
export type WriterValue = null | boolean | number | string | readonly WriterValue[] | Ordered;
|
|
184
|
+
/** Bytes for a lock file: json.dumps(doc, indent=2) + "\n". */
|
|
185
|
+
export declare function formatLockFile(doc: WriterValue): Buffer;
|
|
186
|
+
/**
|
|
187
|
+
* Shard bytes. Member order is lockVersion, identity, attributes, instructions,
|
|
188
|
+
* tools; tools keep the order of `shard.tools` (a writer appends a newly approved
|
|
189
|
+
* name at the end), which is the order the Python generator writes.
|
|
190
|
+
*/
|
|
191
|
+
export declare function formatShard(shard: Shard): Buffer;
|
|
192
|
+
export declare function formatAliases(aliases: ReadonlyMap<string, Identity>): Buffer;
|
|
193
|
+
/** Manifest bytes over `files` (name to bytes), names sorted. */
|
|
194
|
+
export declare function formatManifest(sequence: number, files: ReadonlyMap<string, Uint8Array>): Buffer;
|
|
195
|
+
//# sourceMappingURL=lock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../../src/lock/lock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,eAAO,MAAM,YAAY,YAAY,CAAC;AACtC,eAAO,MAAM,QAAQ,yCAA0C,CAAC;AAChE,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;AAChD,eAAO,MAAM,UAAU,iCAAkC,CAAC;AAC1D,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD,eAAO,MAAM,QAAQ,kBAAkB,CAAC;AACxC,eAAO,MAAM,SAAS,2BAA2B,CAAC;AAClD,eAAO,MAAM,OAAO,iBAAiB,CAAC;AACtC,eAAO,MAAM,QAAQ,KAAK,CAAC;AAC3B,iEAAiE;AACjE,eAAO,MAAM,YAAY,QAA0B,CAAC;AAEpD,eAAO,MAAM,UAAU,QAAuD,CAAC;AAC/E,eAAO,MAAM,aAAa,QAAkC,CAAC;AAC7D,eAAO,MAAM,WAAW,QAA4B,CAAC;AAYrD,eAAO,MAAM,GAAG,+CAAgD,CAAC;AACjE,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvC,oFAAoF;AACpF,MAAM,MAAM,eAAe,G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