@autodevjapan/godd-mcp-alpha 3.6.0 → 3.8.0

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.
@@ -143,6 +143,21 @@ const { module } = await runtime.compile({
143
143
  });
144
144
  ```
145
145
 
146
+ `spawnCompileCacheEvaluator` accepts only a `godd-native` binary whose bytes match
147
+ the committed package manifest. It materializes the verified bytes, probes that
148
+ copy with `handshake show --json` (5000 ms timeout, 65536-byte stdout limit,
149
+ empty stderr, and no `GODD_*` probe environment variables). During the committed
150
+ `advisory` migration stage, an H1–H11 rejection writes its safe receipt to the
151
+ parent stderr and starts the same L3-verified package binary. The later
152
+ `required` stage will block that launch after the 4-target and override/source
153
+ checkout checks are complete. This subpath does not accept unverified overrides;
154
+ the package-local binary must pass L3 integrity verification. The NDJSON
155
+ stdin/stdout pipes remain attached, the child window is hidden on Windows, and
156
+ the verified temporary copy is cleaned when the child closes or fails. Integrity
157
+ failures throw `CompileCacheRuntimeError` with code `NATIVE_INTEGRITY_REJECTED`;
158
+ required-stage handshake failures use `NATIVE_HANDSHAKE_REJECTED` and expose the
159
+ stable handshake reason in `handshakeReasonCode`.
160
+
146
161
  - **The compiler stays yours.** `compile` is injected. The runtime never starts
147
162
  a Next.js runtime or an MDX compiler, and the compiled module is opaque to it.
148
163
  - **One timer owner.** `startReconcileTimer()` throws if called twice on the
@@ -1,8 +1,8 @@
1
1
  {
2
- "schemaVersion": 2,
3
- "releaseTag": "godd-native-v0.2.56",
4
- "expectedVersion": "godd-native 0.2.56",
5
- "sourceCommit": "dab9ff17cdb73f262c29e972c378fc73aebc1d5c",
2
+ "schemaVersion": 3,
3
+ "releaseTag": "godd-native-v0.2.59",
4
+ "expectedVersion": "godd-native 0.2.59",
5
+ "sourceCommit": "43c093416bd9830d683750c6ce05b016813435e3",
6
6
  "capabilities": [
7
7
  "autonomy",
8
8
  "cobol-evidence",
@@ -16,30 +16,83 @@
16
16
  "plan-audit",
17
17
  "research"
18
18
  ],
19
- "baselineBytes": 45499484,
19
+ "handshakeProtocol": {
20
+ "supportedProtocolMajors": [
21
+ 1
22
+ ],
23
+ "minimumProtocolMinorByMajor": {
24
+ "1": 1
25
+ }
26
+ },
27
+ "capabilityCatalogDigest": "7fd64d8c567f76c32bb18711a8a0aa616df842da10d0e5ca4685a878fd68fb3d",
28
+ "routedCommands": [
29
+ "autonomy",
30
+ "codec-capability",
31
+ "compile-cache",
32
+ "content-generation",
33
+ "dataset-coverage",
34
+ "evidence-cobol",
35
+ "gateway-operations",
36
+ "godd-a-dir",
37
+ "learn-skill",
38
+ "managed-gitignore",
39
+ "operate",
40
+ "peer-summary",
41
+ "plan-audit",
42
+ "realtime-admission",
43
+ "realtime-admission-dev",
44
+ "research",
45
+ "shard-partition",
46
+ "test-evidence"
47
+ ],
48
+ "routedCommandEntryDigests": {
49
+ "autonomy": "9968e855a0dfbb8c861b41a9ef77c07b6bef6021e2b519098882a66c533df17f",
50
+ "codec-capability": "c42a0a334e7744fd47c040c2e5c09dff624eee02fbea1cd01a721f35b57520bd",
51
+ "compile-cache": "cd4949c86b20fa19a8ca83646424e2f2ab15a2b652c343c8b443b697c6fdc539",
52
+ "content-generation": "e4c5e1731fa9f3439e62a19a1d4c9cb21efdc28162731e51116a194cf6bf4b4f",
53
+ "dataset-coverage": "31be076baa2b47e7851adbd42d0885d3a6f902b56133ea3384991772df66a88b",
54
+ "evidence-cobol": "086ee7120c4db890b9e2de627fc00b2c843939b07e014553f2549ad219203f8b",
55
+ "gateway-operations": "97218eff67bfb58c600ee4988b3e1dcf7071fe15f0a9acdcf94fdb885e1d1a2f",
56
+ "godd-a-dir": "7810bf4642150849d45f6031cb4bfe7e8834c4000356d77e3f7d2f0e8f9dd1aa",
57
+ "learn-skill": "e8cb2f1bf1fe59cfa4ed2cee070ff753c8f2595e91f9eadf2f43d64812793f43",
58
+ "managed-gitignore": "487b7167c4f4d7691b105e550c1e06c71113a434258c4f8525b90a86f75db73e",
59
+ "operate": "2f619fe4b46c760b966bc1890f0380b048958fc70d27c79e3df38df79405170a",
60
+ "peer-summary": "b0f612e5b5c5f90c9a97486a5bdac22999dd21a609ccbf2e5431351a52c2d3c3",
61
+ "plan-audit": "9bc81d0ac70c62917cbd0d8c6b9723428c4a170e8fb48165e1fa64ced768a28c",
62
+ "realtime-admission": "200468566f677d5b82d1ef2d9ce76855bba5a40998a512a1539bb9dcadcd81c8",
63
+ "realtime-admission-dev": "cab9e64721cb7f9442797744a193a12d2aa3a5d4a71234f60173b291c19ed0a6",
64
+ "research": "a2b9cc8a7cf3499891f4d7fa4f4b603df2d28baf77a02397bd718224e7cfefad",
65
+ "shard-partition": "0f90efb80a81187e9031a3cf7779c238959ac706bf7742affe6e4a562da5d645",
66
+ "test-evidence": "12814a80813f56bf013729b8f01e520e94adbfc6561c607acfa952a9a56bf764"
67
+ },
68
+ "baselineBytes": 45518964,
20
69
  "maximumAssetBytes": 50000000,
21
70
  "maximumTarballBytes": 25000000,
22
71
  "maximumUnpackedBytes": 55000000,
23
72
  "targets": {
24
73
  "darwin-arm64": {
25
74
  "artifact": "godd-native-aarch64-apple-darwin",
26
- "bytes": 9692320,
27
- "sha256": "b4722e50c11704a9cc54d837f174f488e1fa263a30c292497020e7aed0170b31"
75
+ "targetTriple": "aarch64-apple-darwin",
76
+ "bytes": 9692336,
77
+ "sha256": "edc8b4ddf2413cd781e46a6f28351f86846a0d70c54be7c5878369b6daa289a9"
28
78
  },
29
79
  "darwin-x64": {
30
80
  "artifact": "godd-native-x86_64-apple-darwin",
31
- "bytes": 10748296,
32
- "sha256": "a18a26afe4d4467d71b76736ee786d1634b979977c057ed9448a7bab8c97969c"
81
+ "targetTriple": "x86_64-apple-darwin",
82
+ "bytes": 10752400,
83
+ "sha256": "4554c598d0502a6c59123d67a684e935b6c28b97975cb9d6cccc617e52e05f4f"
33
84
  },
34
85
  "linux-x64": {
35
86
  "artifact": "godd-native-x86_64-unknown-linux-musl",
36
- "bytes": 11810608,
37
- "sha256": "41f76b3c7b87b29dd212f7786090fb4ce212b1b1f005bc0edc85474466717679"
87
+ "targetTriple": "x86_64-unknown-linux-musl",
88
+ "bytes": 11814704,
89
+ "sha256": "20047d950aa4c37a4b1a2b90435f98f86d66819ed0245977cbdab92c69f760fa"
38
90
  },
39
91
  "win32-x64": {
40
92
  "artifact": "godd-native-x86_64-pc-windows-msvc.exe",
41
- "bytes": 13248000,
42
- "sha256": "4a2deceaa61b02072c595885bdb21ce7163690581436fd104e69ddf1adf3d316"
93
+ "targetTriple": "x86_64-pc-windows-msvc",
94
+ "bytes": 13259264,
95
+ "sha256": "a9f4de4e9277a0d9a6de6da6354dbfebf33e55236a36dd346fb0f528b1ac1573"
43
96
  }
44
97
  }
45
98
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autodevjapan/godd-mcp-alpha",
3
- "version": "3.6.0",
3
+ "version": "3.8.0",
4
4
  "type": "module",
5
5
  "description": "Governed AI development workflows that turn natural-language intent into specifications, tested code, reviews, documentation, and shippable pull requests.",
6
6
  "license": "UNLICENSED",
@@ -73,8 +73,8 @@
73
73
  "godd"
74
74
  ],
75
75
  "scripts": {
76
- "build": "pnpm generate:native-catalog && node esbuild.config.js && tsc --ignoreConfig src/audio-length-adapter-contract.ts src/media-interval-adapter-contract.ts src/compile-cache-adapter-contract.ts src/compile-cache-runtime.ts --declaration --emitDeclarationOnly --declarationMap false --outDir dist --module ES2022 --target ES2022 --moduleResolution bundler --resolveJsonModule --types node --skipLibCheck",
77
- "build:release": "pnpm generate:native-catalog && GODD_BUILD_MODE=release node esbuild.config.js && tsc --ignoreConfig src/audio-length-adapter-contract.ts src/media-interval-adapter-contract.ts src/compile-cache-adapter-contract.ts src/compile-cache-runtime.ts --declaration --emitDeclarationOnly --declarationMap false --outDir dist --module ES2022 --target ES2022 --moduleResolution bundler --resolveJsonModule --types node --skipLibCheck",
76
+ "build": "pnpm generate:native-catalog && node esbuild.config.js && tsc --ignoreConfig src/audio-length-adapter-contract.ts src/media-interval-adapter-contract.ts src/compile-cache-adapter-contract.ts src/compile-cache-runtime.ts --declaration --emitDeclarationOnly --declarationMap false --rootDir src --outDir dist --module ES2022 --target ES2022 --moduleResolution bundler --resolveJsonModule --types node --skipLibCheck",
77
+ "build:release": "pnpm generate:native-catalog && GODD_BUILD_MODE=release node esbuild.config.js && tsc --ignoreConfig src/audio-length-adapter-contract.ts src/media-interval-adapter-contract.ts src/compile-cache-adapter-contract.ts src/compile-cache-runtime.ts --declaration --emitDeclarationOnly --declarationMap false --rootDir src --outDir dist --module ES2022 --target ES2022 --moduleResolution bundler --resolveJsonModule --types node --skipLibCheck",
78
78
  "generate:native-catalog": "tsx scripts/generate-native-catalog.ts",
79
79
  "anchor:keyring": "tsx scripts/registry-anchor-keyring.ts",
80
80
  "catalog:generate": "tsx scripts/generate-command-catalog.ts",
@@ -93,7 +93,7 @@
93
93
  "quality-gate:execution-mode-parity-docker": "docker buildx build --load --no-cache-filter gate --file docker/execution-mode-parity.Dockerfile --tag godd-execution-parity-gate:local .."
94
94
  },
95
95
  "dependencies": {
96
- "@modelcontextprotocol/sdk": "1.30.1",
96
+ "@modelcontextprotocol/sdk": "1.31.0",
97
97
  "koffi": "3.3.2",
98
98
  "yaml": "^2.9.1",
99
99
  "zod": "4.6.5"
@@ -6,26 +6,37 @@ import { fileURLToPath } from "node:url";
6
6
  const packageRoot = join(dirname(fileURLToPath(import.meta.url)), "..");
7
7
  const MANIFEST_KEYS = [
8
8
  "baselineBytes",
9
+ "capabilityCatalogDigest",
9
10
  "capabilities",
10
11
  "expectedVersion",
12
+ "handshakeProtocol",
11
13
  "maximumAssetBytes",
12
14
  "maximumTarballBytes",
13
15
  "maximumUnpackedBytes",
14
16
  "releaseTag",
17
+ "routedCommandEntryDigests",
18
+ "routedCommands",
15
19
  "schemaVersion",
16
20
  "sourceCommit",
17
21
  "targets",
18
22
  ];
19
- const TARGET_KEYS = ["artifact", "bytes", "sha256"];
23
+ const TARGET_KEYS = ["artifact", "bytes", "sha256", "targetTriple"];
20
24
  const EXPECTED_TARGET_ARTIFACTS = Object.freeze({
21
25
  "darwin-arm64": "godd-native-aarch64-apple-darwin",
22
26
  "darwin-x64": "godd-native-x86_64-apple-darwin",
23
27
  "linux-x64": "godd-native-x86_64-unknown-linux-musl",
24
28
  "win32-x64": "godd-native-x86_64-pc-windows-msvc.exe",
25
29
  });
30
+ const EXPECTED_TARGET_TRIPLES = Object.freeze({
31
+ "darwin-arm64": "aarch64-apple-darwin",
32
+ "darwin-x64": "x86_64-apple-darwin",
33
+ "linux-x64": "x86_64-unknown-linux-musl",
34
+ "win32-x64": "x86_64-pc-windows-msvc",
35
+ });
26
36
  const SHA256_PATTERN = /^[0-9a-f]{64}$/;
27
37
  const COMMIT_PATTERN = /^[0-9a-f]{40}$/;
28
38
  const CAPABILITY_PATTERN = /^[a-z][a-z0-9-]{0,63}$/;
39
+ const ROUTED_COMMAND_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
29
40
  const RELEASE_TAG_PATTERN = /^godd-native-v(\d+\.\d+\.\d+)$/;
30
41
  const SIDECAR_BYTES = 65;
31
42
  const HARD_MAX_UNPACKED_BYTES = 64_000_000;
@@ -53,8 +64,8 @@ function requirePositiveInteger(value, label) {
53
64
 
54
65
  export function validateNativeManifest(value) {
55
66
  requireExactKeys(value, MANIFEST_KEYS, "Native manifest");
56
- if (value.schemaVersion !== 2) {
57
- throw new Error("Native manifest schemaVersion must be 2");
67
+ if (value.schemaVersion !== 3) {
68
+ throw new Error("Native manifest schemaVersion must be 3");
58
69
  }
59
70
  const tagMatch =
60
71
  typeof value.releaseTag === "string"
@@ -83,6 +94,55 @@ export function validateNativeManifest(value) {
83
94
  ) {
84
95
  throw new Error("Native manifest capabilities are invalid");
85
96
  }
97
+ if (!isRecord(value.handshakeProtocol)) {
98
+ throw new Error("Native manifest handshakeProtocol is invalid");
99
+ }
100
+ requireExactKeys(
101
+ value.handshakeProtocol,
102
+ ["minimumProtocolMinorByMajor", "supportedProtocolMajors"],
103
+ "Native manifest handshakeProtocol",
104
+ );
105
+ const supportedProtocolMajors = value.handshakeProtocol.supportedProtocolMajors;
106
+ const minimumProtocolMinorByMajor = value.handshakeProtocol.minimumProtocolMinorByMajor;
107
+ if (
108
+ !Array.isArray(supportedProtocolMajors) ||
109
+ supportedProtocolMajors.length === 0 ||
110
+ !supportedProtocolMajors.every((major) => Number.isSafeInteger(major) && major > 0 && major <= 0xffff) ||
111
+ new Set(supportedProtocolMajors).size !== supportedProtocolMajors.length ||
112
+ JSON.stringify(supportedProtocolMajors) !==
113
+ JSON.stringify([...supportedProtocolMajors].sort((left, right) => left - right)) ||
114
+ !isRecord(minimumProtocolMinorByMajor)
115
+ ) {
116
+ throw new Error("Native manifest handshakeProtocol values are invalid");
117
+ }
118
+ const expectedMajorKeys = supportedProtocolMajors.map(String).sort();
119
+ if (JSON.stringify(Object.keys(minimumProtocolMinorByMajor).sort()) !== JSON.stringify(expectedMajorKeys)) {
120
+ throw new Error("Native manifest handshakeProtocol major map is invalid");
121
+ }
122
+ for (const major of supportedProtocolMajors) {
123
+ const minimumMinor = minimumProtocolMinorByMajor[String(major)];
124
+ if (!Number.isSafeInteger(minimumMinor) || minimumMinor < 0 || minimumMinor > 0xffff) {
125
+ throw new Error(`Native manifest minimum protocol minor is invalid for major ${major}`);
126
+ }
127
+ }
128
+ if (typeof value.capabilityCatalogDigest !== "string" || !SHA256_PATTERN.test(value.capabilityCatalogDigest)) {
129
+ throw new Error("Native manifest capabilityCatalogDigest is invalid");
130
+ }
131
+ if (
132
+ !Array.isArray(value.routedCommands) ||
133
+ value.routedCommands.length === 0 ||
134
+ !value.routedCommands.every((command) => typeof command === "string" && ROUTED_COMMAND_PATTERN.test(command)) ||
135
+ new Set(value.routedCommands).size !== value.routedCommands.length ||
136
+ JSON.stringify(value.routedCommands) !== JSON.stringify([...value.routedCommands].sort())
137
+ ) {
138
+ throw new Error("Native manifest routedCommands are invalid");
139
+ }
140
+ requireExactKeys(value.routedCommandEntryDigests, value.routedCommands, "Native manifest route entry digests");
141
+ for (const command of value.routedCommands) {
142
+ if (typeof value.routedCommandEntryDigests[command] !== "string" || !SHA256_PATTERN.test(value.routedCommandEntryDigests[command])) {
143
+ throw new Error(`Native manifest route entry digest is invalid for ${command}`);
144
+ }
145
+ }
86
146
  requirePositiveInteger(value.baselineBytes, "baselineBytes");
87
147
  requirePositiveInteger(value.maximumAssetBytes, "maximumAssetBytes");
88
148
  requirePositiveInteger(value.maximumTarballBytes, "maximumTarballBytes");
@@ -108,6 +168,9 @@ export function validateNativeManifest(value) {
108
168
  if (entry.artifact !== expectedArtifact) {
109
169
  throw new Error(`Native manifest artifact mismatch for ${target}`);
110
170
  }
171
+ if (entry.targetTriple !== EXPECTED_TARGET_TRIPLES[target]) {
172
+ throw new Error(`Native manifest target triple mismatch for ${target}`);
173
+ }
111
174
  if (artifacts.has(entry.artifact)) {
112
175
  throw new Error(`Native manifest artifact is duplicated: ${entry.artifact}`);
113
176
  }
@@ -173,12 +236,12 @@ export const EXPECTED_NATIVE_ASSET_FILES = Object.freeze(
173
236
  // 気づけない)。到達前に検知するため、警告用の閾値と ratchet 上限を定義する。
174
237
  export const NATIVE_ASSET_HEADROOM_WARNING_BYTES = 2_000_000;
175
238
 
176
- // `godd-native-v0.2.56` の exact baseline を、意味のある追加増加を止める
239
+ // `godd-native-v0.2.59` の exact baseline を、意味のある追加増加を止める
177
240
  // non-cumulative ratchet として固定する。absolute ceiling は別途50MBで維持する。
178
- // 4 binary の receipt 合計45,499,224 bytesに、4つの65-byte `.sha256` sidecarを加える。
179
- // release run 36821298261 のreceipt・API size/digest・sidecar実物を照合した。
180
- // sourceはdab9ff17cdb73f262c29e972c378fc73aebc1d5c。50MBまでの残余は4,500,516 bytes。
181
- export const NATIVE_ASSET_BASELINE_CEILING_BYTES = 45_499_484;
241
+ // 4 binary の receipt 合計45,518,704 bytesに、4つの65-byte `.sha256` sidecarを加える。
242
+ // release run 36973505369 のsealed receipt・公開API size/digest・全asset実物を照合した。
243
+ // sourceは43c093416bd9830d683750c6ce05b016813435e3。50MBまでの残余は4,481,036 bytes。
244
+ export const NATIVE_ASSET_BASELINE_CEILING_BYTES = 45_518_964;
182
245
 
183
246
  /**
184
247
  * 現在の昇格済みreleaseを上限とし、1 byteでも追加増加すれば拒否するratchet。