@autodevjapan/godd-mcp-alpha 2.13.0 → 2.14.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 +248 -1
- 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/godd.cjs +244 -260
- package/dist/media-interval-adapter-contract.cjs +1 -0
- package/dist/media-interval-adapter-contract.d.ts +52 -0
- package/native-assets.json +12 -12
- package/package.json +11 -4
- package/scripts/native-assets.js +5 -36
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var p=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var T=Object.prototype.hasOwnProperty;var N=(n,r)=>{for(var e in r)p(n,e,{get:r[e],enumerable:!0})},x=(n,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of A(r))!T.call(n,a)&&a!==e&&p(n,a,{get:()=>r[a],enumerable:!(t=C(r,a))||t.enumerable});return n};var M=n=>x(p({},"__esModule",{value:!0}),n);var O={};N(O,{canonicalizeMediaIntervalCalibrationPayload:()=>c,computeMediaIntervalCalibrationSnapshotId:()=>v,forwardMediaIntervalTransformation:()=>R,loadMediaIntervalCalibrationSnapshot:()=>L,validateMediaIntervalAdapterContract:()=>g,verifyMediaIntervalCalibrationSnapshot:()=>h});module.exports=M(O);var y=require("node:crypto");var f={snapshot_id:"sha256:ffb6d9755e42c31e980e99c503920cffd98efa20f381b384aec7099a3d5fd905",payload:{default_coverage_tolerance_ppm:3e4,length_max_exclusive:4410,length_min_inclusive:441,measured_on:"2026-08-01",method:"clean_room_upstream_half_open_v1",method_reference:"https://docs.pytorch.org/docs/stable/generated/torch.randint.html",minimum_sample_size:12e3,observed_max_seed_mean_spread_ppm:1270,observed_p95_error_ppm:27812,percentile_basis_points:9500,ppm_rounding_mode:"half_away_from_zero",rounding_tie_denominator:2,rounding_tie_expected:1,rounding_tie_numerator:1,sample_size:12288,sample_unit:"deterministic_seeded_trial",schema_version:1,seed_bases:[5192,4387,2166,24301],start_upper_bound:"total_minus_length_exclusive",tolerance_rounding_step_ppm:5e3,totals_samples:[88200,441e3,1323e3],trials_per_stratum:1024}};var I=["apply_probability_ppm","channels","coverage_tolerance_ppm","max_attempts","max_entropy_retries_per_draw","max_interval_samples","max_intervals","min_interval_samples","operator","request_digest","rng_stream_fingerprint","sample_rate","schema_version","target_coverage_ppm","total_samples"],m=["default_coverage_tolerance_ppm","length_max_exclusive","length_min_inclusive","measured_on","method","method_reference","minimum_sample_size","observed_max_seed_mean_spread_ppm","observed_p95_error_ppm","percentile_basis_points","ppm_rounding_mode","rounding_tie_denominator","rounding_tie_expected","rounding_tie_numerator","sample_size","sample_unit","schema_version","seed_bases","start_upper_bound","tolerance_rounding_step_ppm","totals_samples","trials_per_stratum"];function l(n,r){if(n===null||typeof n!="object"||Array.isArray(n))throw new TypeError(`${r} must be an object`);return n}function i(n,r){let e=Object.keys(n).sort(),t=[...r].sort();return e.length===t.length&&e.every((a,o)=>a===t[o])}function _(n){return typeof n=="number"&&Number.isSafeInteger(n)&&n>=0}function E(n){if(typeof n!="string")return!1;let r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(r===null)return!1;let e=Number(r[1]),t=Number(r[2]),a=Number(r[3]);if(e===0||t<1||t>12)return!1;let u=[31,e%4===0&&(e%100!==0||e%400===0)?29:28,31,30,31,30,31,31,30,31,30,31];return a>=1&&a<=u[t-1]}function S(n){let r=l(n,"transformation_spec");if(!i(r,I))throw new TypeError("transformation_spec has an invalid field set");let e=l(r.operator,"transformation_spec.operator"),t=e.kind==="Mute"&&i(e,["kind"])||e.kind==="EdgeFade"&&i(e,["kind","fade_samples"])&&_(e.fade_samples),a=I.filter(o=>!["operator","request_digest","rng_stream_fingerprint"].includes(o));if(!t||a.some(o=>!_(r[o]))||typeof r.request_digest!="string"||typeof r.rng_stream_fingerprint!="string")throw new TypeError("transformation_spec is invalid");return r}function g(n){let r=l(n,"media interval adapter contract");if(!i(r,["schema_version","interval_arithmetic_owner","buffer_application_owner","transformation_spec"]))throw new TypeError("media interval adapter contract has an invalid field set");if(r.schema_version!==1||r.interval_arithmetic_owner!=="rust"||r.buffer_application_owner!=="rust")throw new TypeError("media interval adapter ownership is invalid");return S(r.transformation_spec),r}function R(n){return g(n).transformation_spec}function c(n){return JSON.stringify(Object.fromEntries(m.map(r=>[r,n[r]])))}function v(n){return`sha256:${(0,y.createHash)("sha256").update(c(n),"utf8").digest("hex")}`}function s(n){return{status:"INCONCLUSIVE",defaultCoverageTolerancePpm:null,snapshotId:null,canonicalPayload:null,reasonCodes:[n]}}function h(n){let r,e;try{r=l(n,"calibration snapshot"),e=l(r.payload,"calibration snapshot payload")}catch{return s("CALIBRATION_FIELD_INVALID")}if(!i(r,["snapshot_id","payload"])||!i(e,m))return s("CALIBRATION_UNKNOWN_FIELD");if(e.schema_version!==1)return s("CALIBRATION_UNSUPPORTED_SCHEMA");let t=m.filter(d=>!["measured_on","method","method_reference","ppm_rounding_mode","sample_unit","seed_bases","start_upper_bound","totals_samples"].includes(d)),a=e.seed_bases,o=e.totals_samples;if(!(typeof r.snapshot_id=="string"&&/^sha256:[0-9a-f]{64}$/.test(r.snapshot_id)&&t.every(d=>_(e[d]))&&Array.isArray(a)&&a.length>0&&a.every(_)&&Array.isArray(o)&&o.length>0&&o.every(_)&&E(e.measured_on)&&e.method==="clean_room_upstream_half_open_v1"&&typeof e.method_reference=="string"&&e.method_reference.startsWith("https://docs.pytorch.org/")&&e.ppm_rounding_mode==="half_away_from_zero"&&e.rounding_tie_numerator===1&&e.rounding_tie_denominator===2&&e.rounding_tie_expected===1&&e.sample_unit==="deterministic_seeded_trial"&&e.start_upper_bound==="total_minus_length_exclusive"&&e.percentile_basis_points===9500&&e.length_min_inclusive<e.length_max_exclusive&&e.tolerance_rounding_step_ppm>0&&e.observed_p95_error_ppm<=1e6&&e.default_coverage_tolerance_ppm<=1e6&&e.sample_size===a.length*o.length*e.trials_per_stratum&&e.default_coverage_tolerance_ppm===Math.ceil(e.observed_p95_error_ppm/e.tolerance_rounding_step_ppm)*e.tolerance_rounding_step_ppm))return s("CALIBRATION_FIELD_INVALID");if(e.sample_size<e.minimum_sample_size)return s("CALIBRATION_SAMPLE_INSUFFICIENT");let b=c(e);return v(e)!==r.snapshot_id?s("CALIBRATION_DIGEST_MISMATCH"):{status:"VERIFIED",defaultCoverageTolerancePpm:e.default_coverage_tolerance_ppm,snapshotId:r.snapshot_id,canonicalPayload:b,reasonCodes:[]}}function L(){return h(f)}0&&(module.exports={canonicalizeMediaIntervalCalibrationPayload,computeMediaIntervalCalibrationSnapshotId,forwardMediaIntervalTransformation,loadMediaIntervalCalibrationSnapshot,validateMediaIntervalAdapterContract,verifyMediaIntervalCalibrationSnapshot});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
type JsonRecord = Record<string, unknown>;
|
|
2
|
+
export interface MediaIntervalTransformationSpec {
|
|
3
|
+
readonly sample_rate: number;
|
|
4
|
+
readonly channels: number;
|
|
5
|
+
readonly total_samples: number;
|
|
6
|
+
readonly min_interval_samples: number;
|
|
7
|
+
readonly max_interval_samples: number;
|
|
8
|
+
readonly target_coverage_ppm: number;
|
|
9
|
+
readonly coverage_tolerance_ppm: number;
|
|
10
|
+
readonly max_intervals: number;
|
|
11
|
+
readonly max_attempts: number;
|
|
12
|
+
readonly max_entropy_retries_per_draw: number;
|
|
13
|
+
readonly apply_probability_ppm: number;
|
|
14
|
+
readonly operator: {
|
|
15
|
+
readonly kind: "Mute";
|
|
16
|
+
} | {
|
|
17
|
+
readonly kind: "EdgeFade";
|
|
18
|
+
readonly fade_samples: number;
|
|
19
|
+
};
|
|
20
|
+
readonly rng_stream_fingerprint: string;
|
|
21
|
+
readonly request_digest: string;
|
|
22
|
+
readonly schema_version: number;
|
|
23
|
+
}
|
|
24
|
+
export interface MediaIntervalAdapterContract<TTransformationSpec extends MediaIntervalTransformationSpec = MediaIntervalTransformationSpec> {
|
|
25
|
+
readonly schema_version: 1;
|
|
26
|
+
readonly interval_arithmetic_owner: "rust";
|
|
27
|
+
readonly buffer_application_owner: "rust";
|
|
28
|
+
readonly transformation_spec: TTransformationSpec;
|
|
29
|
+
}
|
|
30
|
+
export type MediaIntervalCalibrationReasonCode = "CALIBRATION_FIELD_INVALID" | "CALIBRATION_UNKNOWN_FIELD" | "CALIBRATION_UNSUPPORTED_SCHEMA" | "CALIBRATION_SAMPLE_INSUFFICIENT" | "CALIBRATION_DIGEST_MISMATCH";
|
|
31
|
+
export type MediaIntervalCalibrationVerdict = {
|
|
32
|
+
readonly status: "VERIFIED";
|
|
33
|
+
readonly defaultCoverageTolerancePpm: number;
|
|
34
|
+
readonly snapshotId: string;
|
|
35
|
+
readonly canonicalPayload: string;
|
|
36
|
+
readonly reasonCodes: readonly [];
|
|
37
|
+
} | {
|
|
38
|
+
readonly status: "INCONCLUSIVE";
|
|
39
|
+
readonly defaultCoverageTolerancePpm: null;
|
|
40
|
+
readonly snapshotId: null;
|
|
41
|
+
readonly canonicalPayload: null;
|
|
42
|
+
readonly reasonCodes: readonly MediaIntervalCalibrationReasonCode[];
|
|
43
|
+
};
|
|
44
|
+
export declare function validateMediaIntervalAdapterContract(value: unknown): MediaIntervalAdapterContract;
|
|
45
|
+
export declare function forwardMediaIntervalTransformation(contract: MediaIntervalAdapterContract): MediaIntervalTransformationSpec;
|
|
46
|
+
export declare function canonicalizeMediaIntervalCalibrationPayload(payload: JsonRecord): string;
|
|
47
|
+
export declare function computeMediaIntervalCalibrationSnapshotId(payload: JsonRecord): string;
|
|
48
|
+
/** Fail-closed verifier: an untrusted or stale artifact never yields a numeric fallback. */
|
|
49
|
+
export declare function verifyMediaIntervalCalibrationSnapshot(value: unknown): MediaIntervalCalibrationVerdict;
|
|
50
|
+
/** Verify and return the official snapshot embedded in this npm subpath. */
|
|
51
|
+
export declare function loadMediaIntervalCalibrationSnapshot(): MediaIntervalCalibrationVerdict;
|
|
52
|
+
export {};
|
package/native-assets.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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.25",
|
|
4
|
+
"expectedVersion": "godd-native 0.2.25",
|
|
5
|
+
"sourceCommit": "0e3d92fadc039b73404ee62d1e151699d95a6273",
|
|
6
6
|
"capabilities": [
|
|
7
7
|
"cobol-evidence",
|
|
8
8
|
"codec-capability",
|
|
@@ -13,30 +13,30 @@
|
|
|
13
13
|
"plan-audit",
|
|
14
14
|
"research"
|
|
15
15
|
],
|
|
16
|
-
"baselineBytes":
|
|
16
|
+
"baselineBytes": 36857772,
|
|
17
17
|
"maximumAssetBytes": 50000000,
|
|
18
18
|
"maximumTarballBytes": 25000000,
|
|
19
19
|
"maximumUnpackedBytes": 55000000,
|
|
20
20
|
"targets": {
|
|
21
21
|
"darwin-x64": {
|
|
22
22
|
"artifact": "godd-native-x86_64-apple-darwin",
|
|
23
|
-
"bytes":
|
|
24
|
-
"sha256": "
|
|
23
|
+
"bytes": 8704856,
|
|
24
|
+
"sha256": "387b1eeceff77b77712db3528ba451aee1db1145f6ad7d41c636bec14585c2b3"
|
|
25
25
|
},
|
|
26
26
|
"darwin-arm64": {
|
|
27
27
|
"artifact": "godd-native-aarch64-apple-darwin",
|
|
28
|
-
"bytes":
|
|
29
|
-
"sha256": "
|
|
28
|
+
"bytes": 7905536,
|
|
29
|
+
"sha256": "b38d1c6037ca5ae209c6532b8f7c489d5bd51987c0935ac0fd0e1d2feec71d20"
|
|
30
30
|
},
|
|
31
31
|
"linux-x64": {
|
|
32
32
|
"artifact": "godd-native-x86_64-unknown-linux-musl",
|
|
33
|
-
"bytes":
|
|
34
|
-
"sha256": "
|
|
33
|
+
"bytes": 9651280,
|
|
34
|
+
"sha256": "2e215e4bd78d0cf5d54fb235f59711467b3896acfde776277ab23cda41e4523c"
|
|
35
35
|
},
|
|
36
36
|
"win32-x64": {
|
|
37
37
|
"artifact": "godd-native-x86_64-pc-windows-msvc.exe",
|
|
38
|
-
"bytes":
|
|
39
|
-
"sha256": "
|
|
38
|
+
"bytes": 10595840,
|
|
39
|
+
"sha256": "d265c18a2c627bdf88bed1480c070ffb4c286030e979a82c5884cc76b6d32a91"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autodevjapan/godd-mcp-alpha",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.1",
|
|
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",
|
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
"require": "./dist/audio-length-adapter-contract.cjs",
|
|
14
14
|
"default": "./dist/audio-length-adapter-contract.cjs"
|
|
15
15
|
},
|
|
16
|
+
"./media-interval-adapter-contract": {
|
|
17
|
+
"types": "./dist/media-interval-adapter-contract.d.ts",
|
|
18
|
+
"require": "./dist/media-interval-adapter-contract.cjs",
|
|
19
|
+
"default": "./dist/media-interval-adapter-contract.cjs"
|
|
20
|
+
},
|
|
16
21
|
"./*": "./*"
|
|
17
22
|
},
|
|
18
23
|
"bin": {
|
|
@@ -27,6 +32,8 @@
|
|
|
27
32
|
"dist/godd.cjs",
|
|
28
33
|
"dist/audio-length-adapter-contract.cjs",
|
|
29
34
|
"dist/audio-length-adapter-contract.d.ts",
|
|
35
|
+
"dist/media-interval-adapter-contract.cjs",
|
|
36
|
+
"dist/media-interval-adapter-contract.d.ts",
|
|
30
37
|
"scripts/postinstall.js",
|
|
31
38
|
"scripts/atomic-binary-install.js",
|
|
32
39
|
"scripts/postinstall-godd-native.js",
|
|
@@ -51,8 +58,8 @@
|
|
|
51
58
|
"godd"
|
|
52
59
|
],
|
|
53
60
|
"scripts": {
|
|
54
|
-
"build": "pnpm generate:native-catalog && node esbuild.config.js && tsc --ignoreConfig src/audio-length-adapter-contract.ts --declaration --emitDeclarationOnly --declarationMap false --outDir dist --module ES2022 --target ES2022 --moduleResolution bundler --skipLibCheck",
|
|
55
|
-
"build:release": "pnpm generate:native-catalog && GODD_BUILD_MODE=release node esbuild.config.js && tsc --ignoreConfig src/audio-length-adapter-contract.ts --declaration --emitDeclarationOnly --declarationMap false --outDir dist --module ES2022 --target ES2022 --moduleResolution bundler --skipLibCheck",
|
|
61
|
+
"build": "pnpm generate:native-catalog && node esbuild.config.js && tsc --ignoreConfig src/audio-length-adapter-contract.ts src/media-interval-adapter-contract.ts --declaration --emitDeclarationOnly --declarationMap false --outDir dist --module ES2022 --target ES2022 --moduleResolution bundler --resolveJsonModule --types node --skipLibCheck",
|
|
62
|
+
"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 --declaration --emitDeclarationOnly --declarationMap false --outDir dist --module ES2022 --target ES2022 --moduleResolution bundler --resolveJsonModule --types node --skipLibCheck",
|
|
56
63
|
"generate:native-catalog": "tsx scripts/generate-native-catalog.ts",
|
|
57
64
|
"catalog:generate": "tsx scripts/generate-command-catalog.ts",
|
|
58
65
|
"catalog:check": "tsx scripts/generate-command-catalog.ts --check",
|
|
@@ -60,7 +67,7 @@
|
|
|
60
67
|
"typecheck": "tsc --noEmit",
|
|
61
68
|
"test": "vitest run",
|
|
62
69
|
"test:realtime-parity": "node scripts/realtime-admission-parity.mjs",
|
|
63
|
-
"quality-gate:realtime-docker": "docker build --file docker/realtime-admission-parity.Dockerfile --tag godd-realtime-admission-gate:local ..",
|
|
70
|
+
"quality-gate:realtime-docker": "docker buildx build --load --no-cache-filter gate --file docker/realtime-admission-parity.Dockerfile --tag godd-realtime-admission-gate:local ..",
|
|
64
71
|
"test:watch": "vitest",
|
|
65
72
|
"gate:v2": "node scripts/dispatch-npm-v2-gate.js",
|
|
66
73
|
"dev": "tsx src/index.ts serve",
|
package/scripts/native-assets.js
CHANGED
|
@@ -173,29 +173,12 @@ 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.
|
|
177
|
-
//
|
|
178
|
-
|
|
179
|
-
// ceiling 自体は動かさず、allowance も release ごとに累積させない。
|
|
180
|
-
export const NATIVE_ASSET_BASELINE_CEILING_BYTES = 33_677_828;
|
|
181
|
-
export const NATIVE_ASSET_MACHO_REBASE_ALLOWANCE_BYTES = 8;
|
|
182
|
-
const MACHO_REBASE_ALLOWANCE_IDENTITY = Object.freeze({
|
|
183
|
-
releaseTag: "godd-native-v0.2.22",
|
|
184
|
-
expectedVersion: "godd-native 0.2.22",
|
|
185
|
-
sourceCommit: "bbe5ea5fe84261c747b471eedc730573db1bba11",
|
|
186
|
-
target: "darwin-x64",
|
|
187
|
-
previousBytes: 7_945_824,
|
|
188
|
-
observedTargetBytes: Object.freeze({
|
|
189
|
-
"darwin-arm64": 7_260_272,
|
|
190
|
-
"darwin-x64": 7_945_832,
|
|
191
|
-
"linux-x64": 8_860_720,
|
|
192
|
-
"win32-x64": 9_610_752,
|
|
193
|
-
}),
|
|
194
|
-
});
|
|
176
|
+
// `godd-native-v0.2.25` の exact baseline を、意味のある追加増加を止める
|
|
177
|
+
// non-cumulative ratchet として固定する。absolute ceiling は別途50MBで維持する。
|
|
178
|
+
export const NATIVE_ASSET_BASELINE_CEILING_BYTES = 36_857_772;
|
|
195
179
|
|
|
196
180
|
/**
|
|
197
|
-
*
|
|
198
|
-
* identity・target・差分が1つでも変わればallowanceは0へ戻る。
|
|
181
|
+
* 現在の昇格済みreleaseを上限とし、1 byteでも追加増加すれば拒否するratchet。
|
|
199
182
|
*/
|
|
200
183
|
export function isNativeAssetBaselineWithinRatchet(
|
|
201
184
|
manifest = NATIVE_MANIFEST,
|
|
@@ -205,21 +188,7 @@ export function isNativeAssetBaselineWithinRatchet(
|
|
|
205
188
|
} catch {
|
|
206
189
|
return false;
|
|
207
190
|
}
|
|
208
|
-
|
|
209
|
-
const exactTargetBytes = Object.entries(exception.observedTargetBytes)
|
|
210
|
-
.every(([target, bytes]) => manifest.targets?.[target]?.bytes === bytes);
|
|
211
|
-
const observedBytes = exception.observedTargetBytes[exception.target];
|
|
212
|
-
const allowance =
|
|
213
|
-
manifest.releaseTag === exception.releaseTag
|
|
214
|
-
&& manifest.expectedVersion === exception.expectedVersion
|
|
215
|
-
&& manifest.sourceCommit === exception.sourceCommit
|
|
216
|
-
&& exactTargetBytes
|
|
217
|
-
&& observedBytes - exception.previousBytes
|
|
218
|
-
=== NATIVE_ASSET_MACHO_REBASE_ALLOWANCE_BYTES
|
|
219
|
-
? NATIVE_ASSET_MACHO_REBASE_ALLOWANCE_BYTES
|
|
220
|
-
: 0;
|
|
221
|
-
return manifest.baselineBytes
|
|
222
|
-
<= NATIVE_ASSET_BASELINE_CEILING_BYTES + allowance;
|
|
191
|
+
return manifest.baselineBytes <= NATIVE_ASSET_BASELINE_CEILING_BYTES;
|
|
223
192
|
}
|
|
224
193
|
|
|
225
194
|
/**
|