@autodevjapan/godd-mcp-alpha 2.14.1 → 2.15.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/README.md +58 -552
- 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-adapter-contract.cjs +1 -0
- package/dist/compile-cache-adapter-contract.d.ts +83 -0
- package/dist/godd.cjs +210 -206
- package/native-assets.json +11 -11
- package/package.json +14 -6
- package/scripts/native-assets.js +5 -2
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
7c97420f6e5ee825113ac4113c49fcd43bcdc7e326e3593b880beea78174e9dc
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
f52dd4b06dc22b4f6105e2c30646b23b12e1ee3bd79c4b637b439f844e738f98
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3eb42d792469a763d9da7fa379f32e17bb691b651c0fcec6a14b36a2c80d3dfa
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ea723cdaeb305092efb3712f61cfa4f784da5b418d53a1fb478b5f72d45ff1a5
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var l=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var L=(o,e)=>{for(var r in e)l(o,r,{get:e[r],enumerable:!0})},A=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of T(e))!N.call(o,i)&&i!==r&&l(o,i,{get:()=>e[i],enumerable:!(t=D(e,i))||t.enumerable});return o};var h=o=>A(l({},"__esModule",{value:!0}),o);var w={};L(w,{COMPILE_CACHE_OUTCOME_POLICY:()=>c,COMPILE_CACHE_RECONCILE_OWNER:()=>p,deriveCompileCacheReconcilePolicy:()=>S,policyForCompileCacheReceipt:()=>M,projectCompileCacheRegisterRequest:()=>b,validateCompileCacheReceipt:()=>I,validateCompileCacheRegisterRequest:()=>R});module.exports=h(w);var d=require("node:crypto"),g=/^sha256:[0-9a-f]{64}$/u,f=1024,p=Object.freeze({owner:"nextjs-server",clock:"monotonic-milliseconds",trigger:"timer-and-after-lifecycle-event"});function n(o,e,r,t=0){return Object.freeze({action:o,disposition:e,max_retries:t,on_retry_exhausted:t===1?"REJECT":null,reason:r})}var c=Object.freeze({CACHE_HIT:n("USE_CACHED_MODULE","CONTINUE",null),CACHE_MISS_COMPILED:n("PUBLISH_COMPILED_MODULE","CONTINUE",null),SINGLE_FLIGHT_JOINED:n("WAIT_FOR_SINGLE_FLIGHT","CONTINUE",null),TOO_LARGE_FOR_CACHE:n("COMPILE_WITHOUT_CACHE","CONTINUE","ENTRY_LIMIT_EXCEEDED"),BUDGET_OVERFLOW:n("REJECT_CACHE_OPERATION","REJECT","ARITHMETIC_OVERFLOW"),BUDGET_UNRECLAIMABLE:n("RETRY_AFTER_RECONCILE","RETRY","RECLAIMABLE_ENTRIES_INSUFFICIENT",1),BUDGET_EVICTED_LRU:n("DROP_OPAQUE_HANDLE","CONTINUE","LRU_PRESSURE_EVICTION"),SUPERSEDED_BY_NEW_SOURCE:n("DROP_OPAQUE_HANDLE","CONTINUE","SOURCE_GENERATION_SUPERSEDED"),DECK_TOMBSTONED:n("DROP_OPAQUE_HANDLE","CONTINUE","DECK_LIFECYCLE_ENDED"),STALE_GENERATION_REJECTED:n("DISCARD_COMPILED_MODULE","CONTINUE","GENERATION_FENCE_CHANGED"),PREVIEW_LEASE_EXPIRED:n("DROP_OPAQUE_HANDLE","CONTINUE","PREVIEW_LEASE_ENDED"),AGE_EXPIRED:n("DROP_OPAQUE_HANDLE","CONTINUE","MAXIMUM_AGE_EXCEEDED"),IDLE_EXPIRED:n("DROP_OPAQUE_HANDLE","CONTINUE","MAXIMUM_IDLE_EXCEEDED"),RESERVATION_EXPIRED:n("DISCARD_COMPILED_MODULE","CONTINUE","RESERVATION_DEADLINE_EXCEEDED"),COMPILE_FAILED_ROLLED_BACK:n("RELEASE_FAILED_COMPILE","CONTINUE","COMPILE_DID_NOT_COMPLETE"),RECONCILE_CLOCK_REGRESSION:n("REJECT_CACHE_OPERATION","REJECT","RECONCILE_CLOCK_REGRESSED")});function _(o,e){if(o===null||typeof o!="object"||Array.isArray(o))throw new TypeError(`${e} must be an object`);return o}function a(o,e,r){let t=Object.keys(o).sort(),i=[...e].sort();if(t.length!==i.length||t.some((O,y)=>O!==i[y]))throw new TypeError(`${r} has an invalid field set`)}function E(o){return typeof o=="number"&&Number.isSafeInteger(o)&&o>=0}function s(o){return E(o)&&o>0}function C(o){return typeof o=="string"&&g.test(o)}function u(o){return o==="unversioned"||C(o)}function m(o){return typeof o=="string"&&o.length>0&&Buffer.byteLength(o,"utf8")<=f&&!new RegExp("\\p{Cc}","u").test(o)}function P(o){let e=_(o,"compile cache manifest");if(a(e,["workspace_id","deck_id","deck_generation","slide_filename","canonical_source_digest","mdx_policy_generation","compiler_generation","runtime_abi"],"compile cache manifest"),!m(e.workspace_id)||!m(e.deck_id)||!m(e.slide_filename)||!s(e.deck_generation)||!C(e.canonical_source_digest)||!u(e.mdx_policy_generation)||!C(e.compiler_generation)||e.runtime_abi!=="amaroad")throw new TypeError("compile cache manifest is invalid");return e}function R(o){let e=_(o,"compile cache register request");if(a(e,["schema_version","operation","manifest","source_bytes","declared_max_compiled_bytes","now_ms"],"compile cache register request"),P(e.manifest),e.schema_version!==1||e.operation!=="register"||!E(e.source_bytes)||!s(e.declared_max_compiled_bytes)||!E(e.now_ms))throw new TypeError("compile cache register request is invalid");return e}function b(o){let e=_(o,"compile cache project input");a(e,["schema_version","manifest","canonical_source","declared_max_compiled_bytes","now_ms"],"compile cache project input");let r=_(e.manifest,"compile cache project manifest");if(a(r,["workspace_id","deck_id","deck_generation","slide_filename","mdx_policy_generation","compiler_generation","runtime_abi"],"compile cache project manifest"),typeof e.canonical_source!="string")throw new TypeError("compile cache canonical source is invalid");let t=Buffer.byteLength(e.canonical_source,"utf8"),i={schema_version:1,operation:"register",manifest:{...r,canonical_source_digest:`sha256:${(0,d.createHash)("sha256").update(e.canonical_source,"utf8").digest("hex")}`},source_bytes:t,declared_max_compiled_bytes:e.declared_max_compiled_bytes,now_ms:e.now_ms};return R(i)}function S(o){let e=_(o,"compile cache time budget");if(a(e,["age_ms","idle_ms","reservation_ttl_ms"],"compile cache time budget"),!s(e.age_ms)||!s(e.idle_ms)||!s(e.reservation_ttl_ms))throw new TypeError("compile cache time budget is invalid");return Object.freeze({...p,interval_ms:Math.min(e.age_ms,e.idle_ms,e.reservation_ttl_ms)})}function U(o){if(typeof o!="string"||!Object.hasOwn(c,o))throw new TypeError("compile cache receipt outcome is unsupported");let e=o;return[e,c[e]]}function I(o){let e=_(o,"compile cache receipt");a(e,["schema_version","canonical_source_digest","deck_generation","mdx_policy_generation","compiler_generation","key_bytes","source_bytes","compiled_bytes","compiled_bytes_measured","outcome","reason"],"compile cache receipt");let[,r]=U(e.outcome);if(e.schema_version!==1||!C(e.canonical_source_digest)||!E(e.deck_generation)||!u(e.mdx_policy_generation)||!C(e.compiler_generation)||!E(e.key_bytes)||!E(e.source_bytes)||!E(e.compiled_bytes)||typeof e.compiled_bytes_measured!="boolean")throw new TypeError("compile cache receipt is invalid");if(e.reason!==r.reason)throw new TypeError("compile cache receipt reason does not match outcome");return e}function M(o){let e=I(o);return Object.freeze({action:c[e.outcome].action,disposition:c[e.outcome].disposition,max_retries:c[e.outcome].max_retries,on_retry_exhausted:c[e.outcome].on_retry_exhausted,outcome:e.outcome})}0&&(module.exports={COMPILE_CACHE_OUTCOME_POLICY,COMPILE_CACHE_RECONCILE_OWNER,deriveCompileCacheReconcilePolicy,policyForCompileCacheReceipt,projectCompileCacheRegisterRequest,validateCompileCacheReceipt,validateCompileCacheRegisterRequest});
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export declare const COMPILE_CACHE_RECONCILE_OWNER: Readonly<{
|
|
2
|
+
owner: "nextjs-server";
|
|
3
|
+
clock: "monotonic-milliseconds";
|
|
4
|
+
trigger: "timer-and-after-lifecycle-event";
|
|
5
|
+
}>;
|
|
6
|
+
export type CompileCacheDisposition = "CONTINUE" | "RETRY" | "REJECT";
|
|
7
|
+
export type CompileCacheCallerAction = "USE_CACHED_MODULE" | "PUBLISH_COMPILED_MODULE" | "WAIT_FOR_SINGLE_FLIGHT" | "COMPILE_WITHOUT_CACHE" | "RETRY_AFTER_RECONCILE" | "DROP_OPAQUE_HANDLE" | "DISCARD_COMPILED_MODULE" | "RELEASE_FAILED_COMPILE" | "REJECT_CACHE_OPERATION";
|
|
8
|
+
export type CompileCacheReason = "ENTRY_LIMIT_EXCEEDED" | "ARITHMETIC_OVERFLOW" | "RECLAIMABLE_ENTRIES_INSUFFICIENT" | "LRU_PRESSURE_EVICTION" | "SOURCE_GENERATION_SUPERSEDED" | "DECK_LIFECYCLE_ENDED" | "GENERATION_FENCE_CHANGED" | "PREVIEW_LEASE_ENDED" | "MAXIMUM_AGE_EXCEEDED" | "MAXIMUM_IDLE_EXCEEDED" | "RESERVATION_DEADLINE_EXCEEDED" | "COMPILE_DID_NOT_COMPLETE" | "RECONCILE_CLOCK_REGRESSED";
|
|
9
|
+
export type CompileCacheOutcome = "CACHE_HIT" | "CACHE_MISS_COMPILED" | "SINGLE_FLIGHT_JOINED" | "TOO_LARGE_FOR_CACHE" | "BUDGET_OVERFLOW" | "BUDGET_UNRECLAIMABLE" | "BUDGET_EVICTED_LRU" | "SUPERSEDED_BY_NEW_SOURCE" | "DECK_TOMBSTONED" | "STALE_GENERATION_REJECTED" | "PREVIEW_LEASE_EXPIRED" | "AGE_EXPIRED" | "IDLE_EXPIRED" | "RESERVATION_EXPIRED" | "COMPILE_FAILED_ROLLED_BACK" | "RECONCILE_CLOCK_REGRESSION";
|
|
10
|
+
type OutcomePolicy = Readonly<{
|
|
11
|
+
action: CompileCacheCallerAction;
|
|
12
|
+
disposition: CompileCacheDisposition;
|
|
13
|
+
max_retries: 0 | 1;
|
|
14
|
+
on_retry_exhausted: "REJECT" | null;
|
|
15
|
+
reason: CompileCacheReason | null;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const COMPILE_CACHE_OUTCOME_POLICY: Readonly<Record<CompileCacheOutcome, OutcomePolicy>>;
|
|
18
|
+
export interface CompileCacheKeyManifest {
|
|
19
|
+
readonly workspace_id: string;
|
|
20
|
+
readonly deck_id: string;
|
|
21
|
+
readonly deck_generation: number;
|
|
22
|
+
readonly slide_filename: string;
|
|
23
|
+
readonly canonical_source_digest: string;
|
|
24
|
+
readonly mdx_policy_generation: string;
|
|
25
|
+
readonly compiler_generation: string;
|
|
26
|
+
readonly runtime_abi: "amaroad";
|
|
27
|
+
}
|
|
28
|
+
export interface CompileCacheRegisterRequest {
|
|
29
|
+
readonly schema_version: 1;
|
|
30
|
+
readonly operation: "register";
|
|
31
|
+
readonly manifest: CompileCacheKeyManifest;
|
|
32
|
+
readonly source_bytes: number;
|
|
33
|
+
readonly declared_max_compiled_bytes: number;
|
|
34
|
+
readonly now_ms: number;
|
|
35
|
+
}
|
|
36
|
+
export interface CompileCacheProjectInput {
|
|
37
|
+
readonly schema_version: 1;
|
|
38
|
+
readonly manifest: Omit<CompileCacheKeyManifest, "canonical_source_digest">;
|
|
39
|
+
readonly canonical_source: string;
|
|
40
|
+
readonly declared_max_compiled_bytes: number;
|
|
41
|
+
readonly now_ms: number;
|
|
42
|
+
}
|
|
43
|
+
export interface CompileCacheReceipt {
|
|
44
|
+
readonly schema_version: 1;
|
|
45
|
+
readonly canonical_source_digest: string;
|
|
46
|
+
readonly deck_generation: number;
|
|
47
|
+
readonly mdx_policy_generation: string;
|
|
48
|
+
readonly compiler_generation: string;
|
|
49
|
+
readonly key_bytes: number;
|
|
50
|
+
readonly source_bytes: number;
|
|
51
|
+
readonly compiled_bytes: number;
|
|
52
|
+
readonly compiled_bytes_measured: boolean;
|
|
53
|
+
readonly outcome: CompileCacheOutcome;
|
|
54
|
+
readonly reason: CompileCacheReason | null;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Rust 境界を越えてはならない payload 名。runtime validator(未知 field 拒否)と対になる
|
|
58
|
+
* 静的保証であり、違反すると `pnpm typecheck` が失敗する。
|
|
59
|
+
*/
|
|
60
|
+
type ForbiddenBoundaryKey = "canonical_source" | "source" | "source_body" | "source_text" | "compiled_javascript" | "compiled_module" | "host_path" | "deck_title";
|
|
61
|
+
/** `[X] extends [never]` で distributive conditional を無効化し、never の取りこぼしを防ぐ。 */
|
|
62
|
+
type CarriesNoForbiddenPayload<T> = [Extract<keyof T, ForbiddenBoundaryKey>] extends [never] ? true : false;
|
|
63
|
+
type AssertTrue<T extends true> = T;
|
|
64
|
+
export type BoundaryCarriesNoSourceBody = AssertTrue<CarriesNoForbiddenPayload<CompileCacheKeyManifest>>;
|
|
65
|
+
export type RegisterRequestCarriesNoSourceBody = AssertTrue<CarriesNoForbiddenPayload<CompileCacheRegisterRequest>>;
|
|
66
|
+
export type ReceiptCarriesNoSourceBody = AssertTrue<CarriesNoForbiddenPayload<CompileCacheReceipt>>;
|
|
67
|
+
export declare function validateCompileCacheRegisterRequest(value: unknown): CompileCacheRegisterRequest;
|
|
68
|
+
export declare function projectCompileCacheRegisterRequest(value: unknown): CompileCacheRegisterRequest;
|
|
69
|
+
export declare function deriveCompileCacheReconcilePolicy(value: unknown): Readonly<{
|
|
70
|
+
owner: "nextjs-server";
|
|
71
|
+
clock: "monotonic-milliseconds";
|
|
72
|
+
trigger: "timer-and-after-lifecycle-event";
|
|
73
|
+
interval_ms: number;
|
|
74
|
+
}>;
|
|
75
|
+
export declare function validateCompileCacheReceipt(value: unknown): CompileCacheReceipt;
|
|
76
|
+
export declare function policyForCompileCacheReceipt(value: unknown): Readonly<{
|
|
77
|
+
action: CompileCacheCallerAction;
|
|
78
|
+
disposition: CompileCacheDisposition;
|
|
79
|
+
max_retries: 0 | 1;
|
|
80
|
+
on_retry_exhausted: "REJECT" | null;
|
|
81
|
+
outcome: CompileCacheOutcome;
|
|
82
|
+
}>;
|
|
83
|
+
export {};
|