@shiftleftpt/sbd-toe-mcp 0.10.0 → 0.10.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/README.md CHANGED
@@ -180,7 +180,7 @@ npx -y @shiftleftpt/sbd-toe-mcp
180
180
 
181
181
  For environments without npm/npx:
182
182
 
183
- 1. Download `sbd-toe-mcp-vX.Y.Z-bundle.zip` from [GitHub Releases](https://github.com/Shiftleftpt/sbd-toe-mcp-poc/releases).
183
+ 1. Download `sbd-toe-mcp-vX.Y.Z-bundle.zip` from [GitHub Releases](https://github.com/SbD-ToE/sbd-toe-mcp/releases).
184
184
  2. Extract the archive.
185
185
  3. Point your MCP client to the extracted `dist/index.js`:
186
186
  ```json
@@ -0,0 +1,31 @@
1
+ /**
2
+ * version-info — provenance of the served knowledge for the sbd://toe/version
3
+ * resource. Reads the consumed-bundle.json pin (the declaration of which Codex KG
4
+ * build artefact this MCP serves) and exposes the Manual + KG + ontology versions.
5
+ *
6
+ * Best-effort: returns undefined if the pin is absent or malformed so the version
7
+ * resource degrades to package metadata only. Never invents versions/tags — only
8
+ * echoes the verified pin.
9
+ */
10
+ export interface BundleProvenance {
11
+ manual: {
12
+ tag?: string | undefined;
13
+ version?: string | undefined;
14
+ commit?: string | undefined;
15
+ generated_at?: string | undefined;
16
+ };
17
+ kg: {
18
+ release_tag?: string | undefined;
19
+ sha256?: string | undefined;
20
+ source?: string | undefined;
21
+ substrate_version?: string | undefined;
22
+ consumer_contract_version?: string | undefined;
23
+ };
24
+ ontology: {
25
+ tag?: string | undefined;
26
+ commit?: string | undefined;
27
+ };
28
+ }
29
+ export declare function loadBundleProvenance(): BundleProvenance | undefined;
30
+ /** Test-only: clears the module cache so a test can re-exercise the loader. */
31
+ export declare function _resetBundleProvenanceCache(): void;
@@ -0,0 +1,51 @@
1
+ /**
2
+ * version-info — provenance of the served knowledge for the sbd://toe/version
3
+ * resource. Reads the consumed-bundle.json pin (the declaration of which Codex KG
4
+ * build artefact this MCP serves) and exposes the Manual + KG + ontology versions.
5
+ *
6
+ * Best-effort: returns undefined if the pin is absent or malformed so the version
7
+ * resource degrades to package metadata only. Never invents versions/tags — only
8
+ * echoes the verified pin.
9
+ */
10
+ import { readFileSync } from "node:fs";
11
+ import { resolveAppPath } from "./config.js";
12
+ let cached;
13
+ export function loadBundleProvenance() {
14
+ if (cached !== undefined) {
15
+ return cached.value;
16
+ }
17
+ let pin;
18
+ try {
19
+ pin = JSON.parse(readFileSync(resolveAppPath("consumed-bundle.json"), "utf-8"));
20
+ }
21
+ catch {
22
+ cached = { value: undefined };
23
+ return undefined;
24
+ }
25
+ const value = {
26
+ manual: {
27
+ tag: pin.inputs?.manual?.tag,
28
+ version: pin.inputs?.manual?.version,
29
+ commit: pin.inputs?.manual?.commit,
30
+ generated_at: pin.inputs?.manual?.generated_at
31
+ },
32
+ kg: {
33
+ release_tag: pin.kg_bundle?.release_tag,
34
+ sha256: pin.kg_bundle?.release_sha256,
35
+ source: pin.kg_bundle?.source,
36
+ substrate_version: pin.substrate_version,
37
+ consumer_contract_version: pin.consumer_contract_version
38
+ },
39
+ ontology: {
40
+ tag: pin.inputs?.ontology?.tag,
41
+ commit: pin.inputs?.ontology?.commit
42
+ }
43
+ };
44
+ cached = { value };
45
+ return value;
46
+ }
47
+ /** Test-only: clears the module cache so a test can re-exercise the loader. */
48
+ export function _resetBundleProvenanceCache() {
49
+ cached = undefined;
50
+ }
51
+ //# sourceMappingURL=version-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version-info.js","sourceRoot":"","sources":["../src/version-info.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAwB7C,IAAI,MAA2D,CAAC;AAEhE,MAAM,UAAU,oBAAoB;IAClC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,O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
+ #
3
+ # The Claude plugin format (.claude-plugin/, /plugin install) is Claude-only.
4
+ # The MCP server itself is standard and works with any MCP client, including
5
+ # Codex. Codex uses TOML config, not .mcp.json.
6
+ #
7
+ # Option A — CLI (interactive, first-time setup):
8
+ # codex mcp add sbd-toe -- npx -y @shiftleftpt/sbd-toe-mcp@0.10.1
9
+ #
10
+ # Option B — edit config directly (scriptable / reproducible):
11
+ # append the block below to ~/.codex/config.toml
12
+ # (or a project-scoped .codex/config.toml in a trusted project)
13
+
14
+ [mcp_servers.sbd-toe]
15
+ command = "npx"
16
+ args = ["-y", "@shiftleftpt/sbd-toe-mcp@0.10.1"]
17
+
18
+ # Until 0.10.1 is published to npm, use the last known-good version 0.7.7:
19
+ # args = ["-y", "@shiftleftpt/sbd-toe-mcp@0.7.7"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shiftleftpt/sbd-toe-mcp",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "license": "Apache-2.0",
5
5
  "description": "MCP server for the SbD-ToE (Security by Design — Theory of Everything) security manual — structured tools for Claude, GitHub Copilot and other MCP clients",
6
6
  "keywords": [
@@ -13,13 +13,13 @@
13
13
  "copilot",
14
14
  "llm"
15
15
  ],
16
- "homepage": "https://github.com/Shiftleftpt/sbd-toe-mcp-poc#readme",
16
+ "homepage": "https://github.com/SbD-ToE/sbd-toe-mcp#readme",
17
17
  "bugs": {
18
- "url": "https://github.com/Shiftleftpt/sbd-toe-mcp-poc/issues"
18
+ "url": "https://github.com/SbD-ToE/sbd-toe-mcp/issues"
19
19
  },
20
20
  "repository": {
21
21
  "type": "git",
22
- "url": "git+https://github.com/Shiftleftpt/sbd-toe-mcp-poc.git"
22
+ "url": "git+https://github.com/SbD-ToE/sbd-toe-mcp.git"
23
23
  },
24
24
  "publishConfig": {
25
25
  "access": "public"
@@ -44,6 +44,9 @@
44
44
  "dist/types.js",
45
45
  "dist/types.d.ts",
46
46
  "dist/types.js.map",
47
+ "dist/version-info.js",
48
+ "dist/version-info.d.ts",
49
+ "dist/version-info.js.map",
47
50
  "dist/upstream/",
48
51
  "dist/validators/",
49
52
  "data/publish/indexes/publication_manifest.json",