@autodevjapan/godd-mcp-alpha 2.15.1 → 2.16.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.
- package/assets/native/godd-native-aarch64-apple-darwin +0 -0
- package/assets/native/godd-native-aarch64-apple-darwin.sha256 +1 -1
- package/assets/native/godd-native-x86_64-apple-darwin +0 -0
- package/assets/native/godd-native-x86_64-apple-darwin.sha256 +1 -1
- package/assets/native/godd-native-x86_64-pc-windows-msvc.exe +0 -0
- package/assets/native/godd-native-x86_64-pc-windows-msvc.exe.sha256 +1 -1
- package/assets/native/godd-native-x86_64-unknown-linux-musl +0 -0
- package/assets/native/godd-native-x86_64-unknown-linux-musl.sha256 +1 -1
- package/dist/compile-cache-runtime.cjs +4 -0
- package/dist/compile-cache-runtime.d.ts +154 -0
- package/dist/godd.cjs +272 -239
- package/docs/adapter-contracts.md +70 -0
- package/native-assets.json +14 -12
- package/package.json +20 -10
- package/scripts/native-assets.js +7 -5
|
@@ -110,3 +110,73 @@ Reconciliation ownership is fixed, not negotiated:
|
|
|
110
110
|
`deriveCompileCacheReconcilePolicy({ age_ms, idle_ms, reservation_ttl_ms })`
|
|
111
111
|
returns that owner plus `interval_ms` = the minimum of the three budgets, so the
|
|
112
112
|
sweep can never run less often than the shortest deadline it must enforce.
|
|
113
|
+
|
|
114
|
+
## Compile cache runtime
|
|
115
|
+
|
|
116
|
+
The contract above decides; it does not act. `compile-cache-runtime` is the
|
|
117
|
+
caller that applies it — it drives the compile path, owns the single reconcile
|
|
118
|
+
timer, and holds the compiled modules whose lifetime the receipts govern.
|
|
119
|
+
Without it the declared `age_ms` / `idle_ms` / `reservation_ttl_ms` budgets
|
|
120
|
+
never fire, because nothing calls `reconcile`.
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
import {
|
|
124
|
+
CompileCacheRuntime,
|
|
125
|
+
spawnCompileCacheEvaluator,
|
|
126
|
+
} from "@autodevjapan/godd-mcp-alpha/compile-cache-runtime";
|
|
127
|
+
|
|
128
|
+
const runtime = new CompileCacheRuntime({
|
|
129
|
+
evaluator: spawnCompileCacheEvaluator({ command: goddNativeBinaryPath }),
|
|
130
|
+
budget, // all ten scopes; none may be omitted
|
|
131
|
+
now: () => Number(process.hrtime.bigint() / 1_000_000n),
|
|
132
|
+
compile: async ({ canonical_source, manifest }) => {
|
|
133
|
+
const compiled = await compileMdx(canonical_source, manifest);
|
|
134
|
+
return { module: compiled, compiled_bytes: Buffer.byteLength(compiled.code) };
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
runtime.startReconcileTimer(); // the Next.js server, once, per process
|
|
139
|
+
const { module } = await runtime.compile({
|
|
140
|
+
manifest, // seven fields; the digest is derived for you
|
|
141
|
+
canonical_source,
|
|
142
|
+
declared_max_compiled_bytes,
|
|
143
|
+
});
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
- **The compiler stays yours.** `compile` is injected. The runtime never starts
|
|
147
|
+
a Next.js runtime or an MDX compiler, and the compiled module is opaque to it.
|
|
148
|
+
- **One timer owner.** `startReconcileTimer()` throws if called twice on the
|
|
149
|
+
same runtime, because two sweepers would race each other. The interval comes
|
|
150
|
+
from `deriveCompileCacheReconcilePolicy`, never from a hand-picked number.
|
|
151
|
+
- **Lifecycle events do not wait for the timer.** `onDeckRemoved`,
|
|
152
|
+
`onPreviewLeaseExpired`, and `onGenerationUpdated` mark the affected entries
|
|
153
|
+
and immediately drive a reconcile, because marking alone frees nothing.
|
|
154
|
+
- **`RETRY` is bounded to one attempt.** A `BUDGET_UNRECLAIMABLE` register
|
|
155
|
+
reconciles once and retries once; a second refusal throws
|
|
156
|
+
`CompileCacheRejectedError` with `retriesExhausted: true`.
|
|
157
|
+
- **Clock regressions are not smoothed over.** A `RECONCILE_CLOCK_REGRESSION`
|
|
158
|
+
reaches `onReconcileError` unchanged rather than being retried or ignored.
|
|
159
|
+
- **Modules are held per entry, released per receipt.** A module is stored under
|
|
160
|
+
the full eight-field manifest, because `compile` receives that manifest and
|
|
161
|
+
two decks with identical source can still produce different output. Receipts
|
|
162
|
+
carry no deck identity, so a reclamation names a *set* of entries; the runtime
|
|
163
|
+
releases all of them, and a later `CACHE_HIT` with no retained module
|
|
164
|
+
recompiles. One wasted compile, never a budget that fails to free memory and
|
|
165
|
+
never one deck's module served to another. Release is idempotent, because the
|
|
166
|
+
evaluator re-reports a marked entry on every reconcile until its pins drop.
|
|
167
|
+
- **Every path releases its lease.** A stranded pin makes an entry permanently
|
|
168
|
+
unreclaimable and every later request for it `BUDGET_UNRECLAIMABLE`, so the
|
|
169
|
+
lease is released even when a compile throws, a commit is refused, or the
|
|
170
|
+
response itself is rejected as drifted. A commit the evaluator no longer
|
|
171
|
+
accepts — a reservation swept past `reservation_ttl_ms` mid-compile — rejects
|
|
172
|
+
with `COMMIT_NOT_ACCEPTED` after the lease is returned, and publishes nothing.
|
|
173
|
+
- **The session dying drops the cache.** Nothing can reconcile once the
|
|
174
|
+
evaluator is gone, so an `EVALUATOR_CLOSED` send clears every retained module
|
|
175
|
+
rather than leaving the host holding memory no budget can reach.
|
|
176
|
+
|
|
177
|
+
The evaluator itself runs in the `godd-native` binary as
|
|
178
|
+
`godd-native compile-cache session`: a long-lived NDJSON session over stdio
|
|
179
|
+
holding exactly one cache. Only manifests, byte counts, and monotonic
|
|
180
|
+
timestamps cross that boundary; every command is parsed with
|
|
181
|
+
`deny_unknown_fields`, and any violation ends the session with a bare error
|
|
182
|
+
code rather than echoing the command back.
|
package/native-assets.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
|
-
"releaseTag": "godd-native-v0.2.
|
|
4
|
-
"expectedVersion": "godd-native 0.2.
|
|
5
|
-
"sourceCommit": "
|
|
3
|
+
"releaseTag": "godd-native-v0.2.31",
|
|
4
|
+
"expectedVersion": "godd-native 0.2.31",
|
|
5
|
+
"sourceCommit": "1e7f4ce462dced681f0920e5bb36e080f7195a61",
|
|
6
6
|
"capabilities": [
|
|
7
7
|
"cobol-evidence",
|
|
8
8
|
"codec-capability",
|
|
9
|
+
"compile-cache",
|
|
10
|
+
"content-generation",
|
|
9
11
|
"gateway-operations",
|
|
10
12
|
"mcp-stdio",
|
|
11
13
|
"operate",
|
|
@@ -13,30 +15,30 @@
|
|
|
13
15
|
"plan-audit",
|
|
14
16
|
"research"
|
|
15
17
|
],
|
|
16
|
-
"baselineBytes":
|
|
18
|
+
"baselineBytes": 39439764,
|
|
17
19
|
"maximumAssetBytes": 50000000,
|
|
18
20
|
"maximumTarballBytes": 25000000,
|
|
19
21
|
"maximumUnpackedBytes": 55000000,
|
|
20
22
|
"targets": {
|
|
21
23
|
"darwin-x64": {
|
|
22
24
|
"artifact": "godd-native-x86_64-apple-darwin",
|
|
23
|
-
"bytes":
|
|
24
|
-
"sha256": "
|
|
25
|
+
"bytes": 9316256,
|
|
26
|
+
"sha256": "3546b2504c1f8f7897e1ca0693d2da3ca3cddc97ecfdb47f7964a41d4511e7b0"
|
|
25
27
|
},
|
|
26
28
|
"darwin-arm64": {
|
|
27
29
|
"artifact": "godd-native-aarch64-apple-darwin",
|
|
28
|
-
"bytes":
|
|
29
|
-
"sha256": "
|
|
30
|
+
"bytes": 8418464,
|
|
31
|
+
"sha256": "31e2f38fd12481a373fa29470e12870991f56f0e934bf6e8af897d90fec2e21a"
|
|
30
32
|
},
|
|
31
33
|
"linux-x64": {
|
|
32
34
|
"artifact": "godd-native-x86_64-unknown-linux-musl",
|
|
33
|
-
"bytes":
|
|
34
|
-
"sha256": "
|
|
35
|
+
"bytes": 10298960,
|
|
36
|
+
"sha256": "73a803147de665ca9e89715da1a1491f112f4d6f3fd3f31ce2aca5abad67a40a"
|
|
35
37
|
},
|
|
36
38
|
"win32-x64": {
|
|
37
39
|
"artifact": "godd-native-x86_64-pc-windows-msvc.exe",
|
|
38
|
-
"bytes":
|
|
39
|
-
"sha256": "
|
|
40
|
+
"bytes": 11405824,
|
|
41
|
+
"sha256": "a5aca66a29cda82852d756a46e9707caa449cc9b285c9a974fb800e2c2b31870"
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autodevjapan/godd-mcp-alpha",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.16.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",
|
|
@@ -23,6 +23,11 @@
|
|
|
23
23
|
"require": "./dist/compile-cache-adapter-contract.cjs",
|
|
24
24
|
"default": "./dist/compile-cache-adapter-contract.cjs"
|
|
25
25
|
},
|
|
26
|
+
"./compile-cache-runtime": {
|
|
27
|
+
"types": "./dist/compile-cache-runtime.d.ts",
|
|
28
|
+
"require": "./dist/compile-cache-runtime.cjs",
|
|
29
|
+
"default": "./dist/compile-cache-runtime.cjs"
|
|
30
|
+
},
|
|
26
31
|
"./*": "./*"
|
|
27
32
|
},
|
|
28
33
|
"bin": {
|
|
@@ -41,6 +46,8 @@
|
|
|
41
46
|
"dist/media-interval-adapter-contract.d.ts",
|
|
42
47
|
"dist/compile-cache-adapter-contract.cjs",
|
|
43
48
|
"dist/compile-cache-adapter-contract.d.ts",
|
|
49
|
+
"dist/compile-cache-runtime.cjs",
|
|
50
|
+
"dist/compile-cache-runtime.d.ts",
|
|
44
51
|
"scripts/postinstall.js",
|
|
45
52
|
"scripts/atomic-binary-install.js",
|
|
46
53
|
"scripts/postinstall-godd-native.js",
|
|
@@ -66,9 +73,10 @@
|
|
|
66
73
|
"godd"
|
|
67
74
|
],
|
|
68
75
|
"scripts": {
|
|
69
|
-
"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 --declaration --emitDeclarationOnly --declarationMap false --outDir dist --module ES2022 --target ES2022 --moduleResolution bundler --resolveJsonModule --types node --skipLibCheck",
|
|
70
|
-
"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 --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 --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",
|
|
71
78
|
"generate:native-catalog": "tsx scripts/generate-native-catalog.ts",
|
|
79
|
+
"anchor:keyring": "tsx scripts/registry-anchor-keyring.ts",
|
|
72
80
|
"catalog:generate": "tsx scripts/generate-command-catalog.ts",
|
|
73
81
|
"catalog:check": "tsx scripts/generate-command-catalog.ts --check",
|
|
74
82
|
"catalog:check:full": "tsx scripts/generate-command-catalog.ts --check --require-site",
|
|
@@ -85,23 +93,25 @@
|
|
|
85
93
|
},
|
|
86
94
|
"dependencies": {
|
|
87
95
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
96
|
+
"koffi": "3.1.6",
|
|
88
97
|
"yaml": "^2.9.0",
|
|
89
98
|
"zod": "4.4.3"
|
|
90
99
|
},
|
|
91
100
|
"devDependencies": {
|
|
92
|
-
"@types/node": "26.
|
|
93
|
-
"esbuild": "0.28.
|
|
94
|
-
"tsx": "4.23.
|
|
101
|
+
"@types/node": "26.4.0",
|
|
102
|
+
"esbuild": "0.28.2",
|
|
103
|
+
"tsx": "4.23.12",
|
|
95
104
|
"typescript": "7.0.2",
|
|
96
|
-
"vite": "8.2.
|
|
97
|
-
"vitest": "4.1.
|
|
105
|
+
"vite": "8.2.2",
|
|
106
|
+
"vitest": "4.1.11"
|
|
98
107
|
},
|
|
99
108
|
"pnpm": {
|
|
100
109
|
"onlyBuiltDependencies": [
|
|
101
|
-
"esbuild"
|
|
110
|
+
"esbuild",
|
|
111
|
+
"koffi"
|
|
102
112
|
],
|
|
103
113
|
"overrides": {
|
|
104
|
-
"esbuild": "0.28.
|
|
114
|
+
"esbuild": "0.28.2",
|
|
105
115
|
"rollup": ">=4.59.0",
|
|
106
116
|
"hono": ">=4.12.34",
|
|
107
117
|
"@hono/node-server": ">=2.0.5",
|
package/scripts/native-assets.js
CHANGED
|
@@ -173,12 +173,14 @@ export const EXPECTED_NATIVE_ASSET_FILES = Object.freeze(
|
|
|
173
173
|
// 気づけない)。到達前に検知するため、警告用の閾値と ratchet 上限を定義する。
|
|
174
174
|
export const NATIVE_ASSET_HEADROOM_WARNING_BYTES = 2_000_000;
|
|
175
175
|
|
|
176
|
-
// `godd-native-v0.2.
|
|
176
|
+
// `godd-native-v0.2.31` の exact baseline を、意味のある追加増加を止める
|
|
177
177
|
// non-cumulative ratchet として固定する。absolute ceiling は別途50MBで維持する。
|
|
178
|
-
// v0.2.
|
|
179
|
-
// compile
|
|
180
|
-
//
|
|
181
|
-
|
|
178
|
+
// v0.2.27 (36,863,916) からの +2,575,848 bytes は、v0.2.28〜v0.2.31 昇格に
|
|
179
|
+
// まとめて含まれる content-generation verifier / compile-cache runtime /
|
|
180
|
+
// provider gateway (fail-closed化) / download broker (Stage 1b/1c) /
|
|
181
|
+
// learn skill store 等、複数のnative機能追加分。昇格ごとに実測値へ再固定する
|
|
182
|
+
// ため、小さな増加が誰にも気づかれずに累積することはない。
|
|
183
|
+
export const NATIVE_ASSET_BASELINE_CEILING_BYTES = 39_439_764;
|
|
182
184
|
|
|
183
185
|
/**
|
|
184
186
|
* 現在の昇格済みreleaseを上限とし、1 byteでも追加増加すれば拒否するratchet。
|