Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@contractkit/core

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contractkit/core - npm Package Compare versions

Comparing version
0.17.0
to
0.18.0
+7
-7
.turbo/turbo-build$colon$ci.log
> @contractkit/core@0.17.0 build:ci /home/runner/work/ContractKit/ContractKit/packages/contractkit
> @contractkit/core@0.18.0 build:ci /home/runner/work/ContractKit/ContractKit/packages/contractkit
> eslint --max-warnings=0 && pnpm run build
> @contractkit/core@0.17.0 build /home/runner/work/ContractKit/ContractKit/packages/contractkit
> @contractkit/core@0.18.0 build /home/runner/work/ContractKit/ContractKit/packages/contractkit
> tsup src/index.ts --format esm --sourcemap --dts && tsc --emitDeclarationOnly --declaration && cp src/contractkit.ohm dist/

@@ -14,7 +14,7 @@

ESM Build start
ESM dist/index.js 88.81 KB
ESM dist/index.js.map 211.10 KB
ESM ⚡️ Build success in 75ms
ESM dist/index.js 89.09 KB
ESM dist/index.js.map 211.91 KB
ESM ⚡️ Build success in 82ms
DTS Build start
DTS ⚡️ Build success in 1271ms
DTS dist/index.d.ts 32.56 KB
DTS ⚡️ Build success in 1157ms
DTS dist/index.d.ts 32.75 KB
> @contractkit/core@0.17.0 test:ci /home/runner/work/ContractKit/ContractKit/packages/contractkit
> @contractkit/core@0.18.0 test:ci /home/runner/work/ContractKit/ContractKit/packages/contractkit
> vitest run --coverage

@@ -9,14 +9,14 @@

✓ tests/incremental.test.ts (18 tests) 21ms
✓ tests/apply-options-defaults.test.ts (12 tests) 85ms
✓ tests/validate-inheritance.test.ts (16 tests) 61ms
✓ tests/parser-ck.test.ts (170 tests) 523ms
✓ tests/diagnostics.test.ts (10 tests) 15ms
✓ tests/incremental.test.ts (18 tests) 17ms
✓ tests/apply-options-defaults.test.ts (12 tests) 105ms
✓ tests/validate-inheritance.test.ts (16 tests) 66ms
✓ tests/parser-ck.test.ts (170 tests) 565ms
✓ tests/diagnostics.test.ts (10 tests) 11ms
✓ tests/apply-variable-substitution.test.ts (10 tests) 40ms
✓ tests/validate-discriminated.test.ts (5 tests) 24ms
✓ tests/validate-discriminated.test.ts (5 tests) 26ms
 Test Files  7 passed (7)
 Tests  241 passed (241)
 Start at  13:02:49
 Duration  1.92s (transform 450ms, setup 0ms, import 2.55s, tests 769ms, environment 2ms)
 Start at  17:08:42
 Duration  2.03s (transform 502ms, setup 0ms, import 2.65s, tests 830ms, environment 1ms)

@@ -27,3 +27,3 @@  % Coverage report from v8

-------------------|---------|----------|---------|---------|-------------------
All files | 84.71 | 73.3 | 89.34 | 87.13 |
All files | 84.73 | 73.3 | 89.44 | 87.15 |
...ns-defaults.ts | 98 | 95.34 | 100 | 100 | 67,93

@@ -37,6 +37,6 @@ ...ubstitution.ts | 97.56 | 94.87 | 100 | 100 | 26,55

parser.ts | 100 | 66.66 | 100 | 100 | 25-26
semantics.ts | 92.66 | 79.37 | 93.39 | 95.65 | ...1193,1213-1217
semantics.ts | 92.68 | 79.37 | 93.51 | 95.67 | ...1201,1221-1225
type-builders.ts | 87.38 | 68.21 | 100 | 87.91 | ...40,144-147,197
...inheritance.ts | 68.45 | 58.51 | 71.42 | 70.68 | ...,88-90,180-227
...inheritance.ts | 68.45 | 58.51 | 71.42 | 70.68 | ...,88-90,187-234
validate-refs.ts | 40.32 | 37.31 | 50 | 42.59 | ...80,185,199-213
-------------------|---------|----------|---------|---------|-------------------
# @contractkit/core
## 0.18.0
### Minor Changes
- dd8197b: **Breaking:** Replace the `requireMfa: boolean` field in `security: { ... }` blocks with `policy: <ident|none>`, and switch the generated Koa router middleware from `requireSecurity` to ServerKit's new `requirePolicy`.
The `security` declaration on operations, routes, and the file-level `options { security: { ... } }` block no longer accepts a `requireMfa:` line. The new field is `policy:` and takes a bare identifier (the named policy) or the keyword `none` to explicitly bypass policy enforcement. Existing `.ck` files that use `requireMfa:` will fail to parse.
```ck
# Before
security: {
requireMfa: true
}
# After
security: {
policy: paymentsWrite
}
# Explicit bypass
security: {
policy: none
}
```
**`@contractkit/core`** — `SecurityFields` interface drops `requireMfa` / `requireMfaDescription` and adds `policy?: string | false` / `policyDescription?: string`. The grammar's `SecurityRequireMfaLine` is replaced by `SecurityPolicyLine` (`policyKw ":" (noneKw | identifier)`). `security: none` (the route-level public sentinel) is unchanged.
**`@contractkit/plugin-typescript`** — Generated Koa routers now import `requirePolicy` from `@maroonedsoftware/koa` (previously `requireSecurity`) and emit `requirePolicy({ policy: 'name' })`, `requirePolicy({ policy: false })`, or bare `requirePolicy()`. Consumers must upgrade ServerKit alongside.
**`@contractkit/prettier-plugin`** — Formats `policy: <name>` and `policy: none` lines inside security blocks. Files containing `requireMfa:` will no longer round-trip and will surface as parse errors.
**`@contractkit/plugin-markdown`** — The "Security: authenticated" admonition now shows `policy: <name|none>` instead of `requireMfa: <bool>`.
**`@contractkit/openapi-to-ck`** — Non-empty OpenAPI `security` requirements continue to collapse to an empty `security: {}` (authenticated, default policy); the serializer now emits `policy:` lines when the field is set.
**`contractkit-vscode-extension`** — TextMate grammar highlights `policy:` inside the security block; LSP completion offers `policy` instead of `requireMfa`. Re-run `pnpm run vscode:install` to pick up the change.
## 0.17.0

@@ -4,0 +41,0 @@

@@ -358,3 +358,3 @@

<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2026-05-08T13:02:51.644Z
at 2026-05-13T17:08:44.837Z
</div>

@@ -361,0 +361,0 @@ <script src="prettify.js"></script>

@@ -316,3 +316,3 @@

<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2026-05-08T13:02:51.644Z
at 2026-05-13T17:08:44.837Z
</div>

@@ -319,0 +319,0 @@ <script src="prettify.js"></script>

@@ -939,6 +939,6 @@

export interface SecurityFields {
/** Whether this endpoint requires MFA. */
requireMfa?: boolean;
/** Inline comment attached to the `requireMfa:` line. */
requireMfaDescription?: string;
/** Named policy required for this endpoint, or `false` to explicitly bypass policy enforcement. */
policy?: string | false;
/** Inline comment attached to the `policy:` line. */
policyDescription?: string;
loc: SourceLocation;

@@ -1115,3 +1115,3 @@ }

<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2026-05-08T13:02:51.644Z
at 2026-05-13T17:08:44.837Z
</div>

@@ -1118,0 +1118,0 @@ <script src="prettify.js"></script>

<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1778245371659" clover="3.2.0">
<project timestamp="1778245371659" name="All files">
<metrics statements="1057" coveredstatements="921" conditionals="723" coveredconditionals="530" methods="197" coveredmethods="176" elements="1977" coveredelements="1627" complexity="0" loc="1057" ncloc="1057" packages="1" files="12" classes="12"/>
<coverage generated="1778692124856" clover="3.2.0">
<project timestamp="1778692124856" name="All files">
<metrics statements="1059" coveredstatements="923" conditionals="723" coveredconditionals="530" methods="199" coveredmethods="178" elements="1981" coveredelements="1631" complexity="0" loc="1059" ncloc="1059" packages="1" files="12" classes="12"/>
<file name="apply-options-defaults.ts" path="/home/runner/work/ContractKit/ContractKit/packages/contractkit/src/apply-options-defaults.ts">

@@ -100,14 +100,14 @@ <metrics statements="38" coveredstatements="38" conditionals="43" coveredconditionals="41" methods="9" coveredmethods="9"/>

<metrics statements="12" coveredstatements="12" conditionals="6" coveredconditionals="6" methods="8" coveredmethods="8"/>
<line num="9" count="239" type="stmt"/>
<line num="12" count="21" type="stmt"/>
<line num="16" count="15" type="stmt"/>
<line num="20" count="44" type="stmt"/>
<line num="24" count="37" type="stmt"/>
<line num="28" count="2" type="stmt"/>
<line num="29" count="2" type="cond" truecount="2" falsecount="0"/>
<line num="11" count="239" type="stmt"/>
<line num="14" count="21" type="stmt"/>
<line num="18" count="15" type="stmt"/>
<line num="22" count="44" type="stmt"/>
<line num="26" count="37" type="stmt"/>
<line num="30" count="2" type="stmt"/>
<line num="31" count="2" type="cond" truecount="2" falsecount="0"/>
<line num="32" count="2" type="stmt"/>
<line num="33" count="2" type="stmt"/>
<line num="34" count="2" type="cond" truecount="4" falsecount="0"/>
<line num="35" count="1" type="stmt"/>
<line num="34" count="2" type="stmt"/>
<line num="35" count="2" type="stmt"/>
<line num="36" count="2" type="cond" truecount="4" falsecount="0"/>
<line num="37" count="1" type="stmt"/>
</file>

@@ -197,3 +197,3 @@ <file name="grammar.ts" path="/home/runner/work/ContractKit/ContractKit/packages/contractkit/src/grammar.ts">

<file name="semantics.ts" path="/home/runner/work/ContractKit/ContractKit/packages/contractkit/src/semantics.ts">
<metrics statements="576" coveredstatements="551" conditionals="286" coveredconditionals="227" methods="106" coveredmethods="99"/>
<metrics statements="578" coveredstatements="553" conditionals="286" coveredconditionals="227" methods="108" coveredmethods="101"/>
<line num="36" count="49" type="stmt"/>

@@ -203,3 +203,3 @@ <line num="43" count="662" type="stmt"/>

<line num="45" count="662" type="stmt"/>
<line num="46" count="218891" type="cond" truecount="2" falsecount="0"/>
<line num="46" count="218916" type="cond" truecount="2" falsecount="0"/>
<line num="48" count="662" type="stmt"/>

@@ -721,57 +721,59 @@ <line num="61" count="11" type="stmt"/>

<line num="1104" count="1" type="stmt"/>
<line num="1105" count="1" type="cond" truecount="2" falsecount="2"/>
<line num="1106" count="1" type="stmt"/>
<line num="1112" count="13" type="stmt"/>
<line num="1113" count="13" type="stmt"/>
<line num="1114" count="13" type="stmt"/>
<line num="1115" count="13" type="stmt"/>
<line num="1116" count="17" type="stmt"/>
<line num="1117" count="17" type="cond" truecount="1" falsecount="1"/>
<line num="1118" count="17" type="stmt"/>
<line num="1119" count="17" type="stmt"/>
<line num="1108" count="9" type="stmt"/>
<line num="1112" count="1" type="stmt"/>
<line num="1113" count="1" type="cond" truecount="2" falsecount="2"/>
<line num="1114" count="1" type="stmt"/>
<line num="1120" count="13" type="stmt"/>
<line num="1121" count="13" type="stmt"/>
<line num="1125" count="17" type="stmt"/>
<line num="1122" count="13" type="stmt"/>
<line num="1123" count="13" type="stmt"/>
<line num="1124" count="17" type="stmt"/>
<line num="1125" count="17" type="cond" truecount="1" falsecount="1"/>
<line num="1126" count="17" type="stmt"/>
<line num="1127" count="17" type="stmt"/>
<line num="1131" count="15" type="stmt"/>
<line num="1135" count="2" type="stmt"/>
<line num="1139" count="1" type="stmt"/>
<line num="1143" count="1" type="stmt"/>
<line num="1147" count="6" type="stmt"/>
<line num="1148" count="6" type="stmt"/>
<line num="1149" count="6" type="stmt"/>
<line num="1150" count="6" type="stmt"/>
<line num="1151" count="7" type="stmt"/>
<line num="1152" count="7" type="cond" truecount="1" falsecount="1"/>
<line num="1153" count="7" type="stmt"/>
<line num="1154" count="7" type="stmt"/>
<line num="1129" count="13" type="stmt"/>
<line num="1133" count="17" type="stmt"/>
<line num="1134" count="17" type="stmt"/>
<line num="1135" count="17" type="stmt"/>
<line num="1139" count="15" type="stmt"/>
<line num="1143" count="2" type="stmt"/>
<line num="1147" count="1" type="stmt"/>
<line num="1151" count="1" type="stmt"/>
<line num="1155" count="6" type="stmt"/>
<line num="1156" count="6" type="stmt"/>
<line num="1160" count="1" type="stmt"/>
<line num="1161" count="1" type="stmt"/>
<line num="1162" count="1" type="stmt"/>
<line num="1163" count="1" type="stmt"/>
<line num="1164" count="2" type="stmt"/>
<line num="1165" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="1166" count="2" type="stmt"/>
<line num="1157" count="6" type="stmt"/>
<line num="1158" count="6" type="stmt"/>
<line num="1159" count="7" type="stmt"/>
<line num="1160" count="7" type="cond" truecount="1" falsecount="1"/>
<line num="1161" count="7" type="stmt"/>
<line num="1162" count="7" type="stmt"/>
<line num="1164" count="6" type="stmt"/>
<line num="1168" count="1" type="stmt"/>
<line num="1172" count="7" type="stmt"/>
<line num="1173" count="7" type="stmt"/>
<line num="1174" count="7" type="stmt"/>
<line num="1175" count="7" type="cond" truecount="3" falsecount="1"/>
<line num="1176" count="7" type="stmt"/>
<line num="1177" count="7" type="stmt"/>
<line num="1183" count="50" type="stmt"/>
<line num="1184" count="50" type="stmt"/>
<line num="1185" count="50" type="stmt"/>
<line num="1186" count="50" type="stmt"/>
<line num="1187" count="32" type="stmt"/>
<line num="1189" count="50" type="stmt"/>
<line num="1193" count="0" type="stmt"/>
<line num="1197" count="18" type="stmt"/>
<line num="1201" count="7" type="stmt"/>
<line num="1205" count="4" type="stmt"/>
<line num="1209" count="3" type="stmt"/>
<line num="1213" count="0" type="stmt"/>
<line num="1217" count="0" type="stmt"/>
<line num="1221" count="5" type="stmt"/>
<line num="1169" count="1" type="stmt"/>
<line num="1170" count="1" type="stmt"/>
<line num="1171" count="1" type="stmt"/>
<line num="1172" count="2" type="stmt"/>
<line num="1173" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="1174" count="2" type="stmt"/>
<line num="1176" count="1" type="stmt"/>
<line num="1180" count="7" type="stmt"/>
<line num="1181" count="7" type="stmt"/>
<line num="1182" count="7" type="stmt"/>
<line num="1183" count="7" type="cond" truecount="3" falsecount="1"/>
<line num="1184" count="7" type="stmt"/>
<line num="1185" count="7" type="stmt"/>
<line num="1191" count="50" type="stmt"/>
<line num="1192" count="50" type="stmt"/>
<line num="1193" count="50" type="stmt"/>
<line num="1194" count="50" type="stmt"/>
<line num="1195" count="32" type="stmt"/>
<line num="1197" count="50" type="stmt"/>
<line num="1201" count="0" type="stmt"/>
<line num="1205" count="18" type="stmt"/>
<line num="1209" count="7" type="stmt"/>
<line num="1213" count="4" type="stmt"/>
<line num="1217" count="3" type="stmt"/>
<line num="1221" count="0" type="stmt"/>
<line num="1225" count="0" type="stmt"/>
<line num="1229" count="5" type="stmt"/>
</file>

@@ -944,48 +946,48 @@ <file name="type-builders.ts" path="/home/runner/work/ContractKit/ContractKit/packages/contractkit/src/type-builders.ts">

<line num="134" count="4" type="stmt"/>
<line num="139" count="4" type="stmt"/>
<line num="141" count="2" type="cond" truecount="2" falsecount="0"/>
<line num="142" count="2" type="stmt"/>
<line num="143" count="1" type="stmt"/>
<line num="152" count="15" type="stmt"/>
<line num="153" count="10" type="cond" truecount="2" falsecount="0"/>
<line num="154" count="3" type="cond" truecount="2" falsecount="0"/>
<line num="155" count="1" type="stmt"/>
<line num="164" count="18" type="cond" truecount="2" falsecount="0"/>
<line num="165" count="17" type="cond" truecount="1" falsecount="1"/>
<line num="166" count="17" type="cond" truecount="2" falsecount="0"/>
<line num="167" count="16" type="cond" truecount="5" falsecount="1"/>
<line num="168" count="16" type="cond" truecount="2" falsecount="0"/>
<line num="169" count="15" type="stmt"/>
<line num="173" count="15" type="cond" truecount="1" falsecount="1"/>
<line num="174" count="15" type="cond" truecount="1" falsecount="11"/>
<line num="140" count="4" type="stmt"/>
<line num="142" count="2" type="cond" truecount="2" falsecount="0"/>
<line num="143" count="2" type="stmt"/>
<line num="144" count="1" type="stmt"/>
<line num="154" count="15" type="stmt"/>
<line num="155" count="10" type="cond" truecount="2" falsecount="0"/>
<line num="156" count="3" type="cond" truecount="2" falsecount="0"/>
<line num="157" count="1" type="stmt"/>
<line num="171" count="18" type="cond" truecount="2" falsecount="0"/>
<line num="172" count="17" type="cond" truecount="1" falsecount="1"/>
<line num="173" count="17" type="cond" truecount="2" falsecount="0"/>
<line num="174" count="16" type="cond" truecount="5" falsecount="1"/>
<line num="175" count="16" type="cond" truecount="2" falsecount="0"/>
<line num="176" count="15" type="stmt"/>
<line num="177" count="15" type="cond" truecount="6" falsecount="0"/>
<line num="180" count="0" type="stmt"/>
<line num="181" count="0" type="stmt"/>
<line num="184" count="0" type="stmt"/>
<line num="185" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="180" count="15" type="cond" truecount="1" falsecount="1"/>
<line num="181" count="15" type="cond" truecount="1" falsecount="11"/>
<line num="183" count="15" type="stmt"/>
<line num="184" count="15" type="cond" truecount="6" falsecount="0"/>
<line num="187" count="0" type="stmt"/>
<line num="188" count="0" type="stmt"/>
<line num="189" count="0" type="stmt"/>
<line num="192" count="0" type="stmt"/>
<line num="193" count="0" type="cond" truecount="0" falsecount="4"/>
<line num="194" count="0" type="stmt"/>
<line num="197" count="0" type="stmt"/>
<line num="198" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="191" count="0" type="stmt"/>
<line num="192" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="195" count="0" type="stmt"/>
<line num="196" count="0" type="stmt"/>
<line num="199" count="0" type="stmt"/>
<line num="200" count="0" type="cond" truecount="0" falsecount="4"/>
<line num="201" count="0" type="stmt"/>
<line num="202" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="206" count="0" type="stmt"/>
<line num="207" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="210" count="0" type="stmt"/>
<line num="211" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="212" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="215" count="0" type="stmt"/>
<line num="216" count="0" type="stmt"/>
<line num="219" count="0" type="stmt"/>
<line num="220" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="221" count="0" type="stmt"/>
<line num="204" count="0" type="stmt"/>
<line num="205" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="208" count="0" type="stmt"/>
<line num="209" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="213" count="0" type="stmt"/>
<line num="214" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="217" count="0" type="stmt"/>
<line num="218" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="219" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="222" count="0" type="stmt"/>
<line num="223" count="0" type="stmt"/>
<line num="224" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="225" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="227" count="0" type="stmt"/>
<line num="226" count="0" type="stmt"/>
<line num="227" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="228" count="0" type="stmt"/>
<line num="229" count="0" type="stmt"/>
<line num="230" count="0" type="stmt"/>
<line num="231" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="232" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="234" count="0" type="stmt"/>
</file>

@@ -992,0 +994,0 @@ <file name="validate-refs.ts" path="/home/runner/work/ContractKit/ContractKit/packages/contractkit/src/validate-refs.ts">

@@ -145,3 +145,3 @@

<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2026-05-08T13:02:51.644Z
at 2026-05-13T17:08:44.837Z
</div>

@@ -148,0 +148,0 @@ <script src="prettify.js"></script>

@@ -104,3 +104,5 @@

<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>

@@ -113,2 +115,4 @@ <span class="cline-any cline-neutral">&nbsp;</span>

<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">239x</span>

@@ -149,2 +153,4 @@ <span class="cline-any cline-neutral">&nbsp;</span>

severity: 'error' | 'warning';
/** Optional stable identifier — consumed by editor tooling to dispatch quick-fixes. */
code?: string;
}

@@ -155,8 +161,8 @@ &nbsp;

&nbsp;
error(file: string, line: number, message: string): void {
this.diagnostics.push({ file, line, message, severity: 'error' });
error(file: string, line: number, message: string, code?: string): void {
this.diagnostics.push({ file, line, message, severity: 'error', code });
}
&nbsp;
warn(file: string, line: number, message: string): void {
this.diagnostics.push({ file, line, message, severity: 'warning' });
warn(file: string, line: number, message: string, code?: string): void {
this.diagnostics.push({ file, line, message, severity: 'warning', code });
}

@@ -191,3 +197,3 @@ &nbsp;

<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2026-05-08T13:02:51.644Z
at 2026-05-13T17:08:44.837Z
</div>

@@ -194,0 +200,0 @@ <script src="prettify.js"></script>

@@ -154,3 +154,3 @@

<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2026-05-08T13:02:51.644Z
at 2026-05-13T17:08:44.837Z
</div>

@@ -157,0 +157,0 @@ <script src="prettify.js"></script>

@@ -670,3 +670,3 @@

<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2026-05-08T13:02:51.644Z
at 2026-05-13T17:08:44.837Z
</div>

@@ -673,0 +673,0 @@ <script src="prettify.js"></script>

@@ -26,5 +26,5 @@

<div class='fl pad1y space-right2'>
<span class="strong">84.71% </span>
<span class="strong">84.73% </span>
<span class="quiet">Statements</span>
<span class='fraction'>1053/1243</span>
<span class='fraction'>1055/1245</span>
</div>

@@ -41,5 +41,5 @@

<div class='fl pad1y space-right2'>
<span class="strong">89.34% </span>
<span class="strong">89.44% </span>
<span class="quiet">Functions</span>
<span class='fraction'>176/197</span>
<span class='fraction'>178/199</span>
</div>

@@ -49,5 +49,5 @@

<div class='fl pad1y space-right2'>
<span class="strong">87.13% </span>
<span class="strong">87.15% </span>
<span class="quiet">Lines</span>
<span class='fraction'>921/1057</span>
<span class='fraction'>923/1059</span>
</div>

@@ -206,13 +206,13 @@

<td class="file high" data-value="semantics.ts"><a href="semantics.ts.html">semantics.ts</a></td>
<td data-value="92.66" class="pic high">
<td data-value="92.68" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 92%"></div><div class="cover-empty" style="width: 8%"></div></div>
</td>
<td data-value="92.66" class="pct high">92.66%</td>
<td data-value="654" class="abs high">606/654</td>
<td data-value="92.68" class="pct high">92.68%</td>
<td data-value="656" class="abs high">608/656</td>
<td data-value="79.37" class="pct medium">79.37%</td>
<td data-value="286" class="abs medium">227/286</td>
<td data-value="93.39" class="pct high">93.39%</td>
<td data-value="106" class="abs high">99/106</td>
<td data-value="95.65" class="pct high">95.65%</td>
<td data-value="576" class="abs high">551/576</td>
<td data-value="93.51" class="pct high">93.51%</td>
<td data-value="108" class="abs high">101/108</td>
<td data-value="95.67" class="pct high">95.67%</td>
<td data-value="578" class="abs high">553/578</td>
</tr>

@@ -273,3 +273,3 @@

<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2026-05-08T13:02:51.644Z
at 2026-05-13T17:08:44.837Z
</div>

@@ -276,0 +276,0 @@ <script src="prettify.js"></script>

@@ -169,3 +169,3 @@

<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2026-05-08T13:02:51.644Z
at 2026-05-13T17:08:44.837Z
</div>

@@ -172,0 +172,0 @@ <script src="prettify.js"></script>

@@ -667,3 +667,3 @@

<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2026-05-08T13:02:51.644Z
at 2026-05-13T17:08:44.837Z
</div>

@@ -670,0 +670,0 @@ <script src="prettify.js"></script>

@@ -296,3 +296,10 @@

<a name='L230'></a><a href='#L230'>230</a>
<a name='L231'></a><a href='#L231'>231</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<a name='L231'></a><a href='#L231'>231</a>
<a name='L232'></a><a href='#L232'>232</a>
<a name='L233'></a><a href='#L233'>233</a>
<a name='L234'></a><a href='#L234'>234</a>
<a name='L235'></a><a href='#L235'>235</a>
<a name='L236'></a><a href='#L236'>236</a>
<a name='L237'></a><a href='#L237'>237</a>
<a name='L238'></a><a href='#L238'>238</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>

@@ -435,2 +442,3 @@ <span class="cline-any cline-neutral">&nbsp;</span>

<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4x</span>

@@ -449,2 +457,3 @@ <span class="cline-any cline-neutral">&nbsp;</span>

<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">15x</span>

@@ -462,2 +471,7 @@ <span class="cline-any cline-yes">10x</span>

<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>

@@ -667,2 +681,3 @@ <span class="cline-any cline-yes">17x</span>

`Field '${name}' is declared by ${sources} with different shapes — redeclare in '${model.name}' with 'override'`,
'missing-override',
);

@@ -677,2 +692,3 @@ continue;

`Field '${name}' conflicts across bases ${sources} — mark as 'override'`,
'missing-override',
);

@@ -686,3 +702,8 @@ }

if (!baseFieldsByName.has(f.name)) {
diag.error(f.loc.file, f.loc.line, `Field '${f.name}' has 'override' but is not declared in any base of '${model.name}'`);
diag.error(
f.loc.file,
f.loc.line,
`Field '${f.name}' has 'override' but is not declared in any base of '${model.name}'`,
'spurious-override',
);
}

@@ -770,3 +791,3 @@ }

<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2026-05-08T13:02:51.644Z
at 2026-05-13T17:08:44.837Z
</div>

@@ -773,0 +794,0 @@ <script src="prettify.js"></script>

@@ -521,3 +521,3 @@

<span class="cstat-no" title="statement not covered" > if (!modelNames.has(base)) {</span>
<span class="cstat-no" title="statement not covered" > diag.warn(model.loc.file, model.loc.line, `Base model "${base}" is not defined in any contract file`);</span>
<span class="cstat-no" title="statement not covered" > diag.warn(model.loc.file, model.loc.line, `Base model "${base}" is not defined in any contract file`, 'unknown-model');</span>
}

@@ -565,3 +565,3 @@ }

<span class="missing-if-branch" title="if path not taken" >I</span>if (!models.has(type.name)) {
<span class="cstat-no" title="statement not covered" > diag.warn(file, line, `Referenced model "${type.name}" is not defined in any contract file`);</span>
<span class="cstat-no" title="statement not covered" > diag.warn(file, line, `Referenced model "${type.name}" is not defined in any contract file`, 'unknown-model');</span>
}

@@ -710,3 +710,3 @@ break;

<span class="cstat-no" title="statement not covered" > if (/^[A-Z]/.test(name) &amp;&amp; !models.has(name)) {</span>
<span class="cstat-no" title="statement not covered" > diag.warn(file, line, `Referenced type "${name}" is not defined in any contract file`);</span>
<span class="cstat-no" title="statement not covered" > diag.warn(file, line, `Referenced type "${name}" is not defined in any contract file`, 'unknown-model');</span>
}

@@ -721,3 +721,3 @@ }

<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2026-05-08T13:02:51.644Z
at 2026-05-13T17:08:44.837Z
</div>

@@ -724,0 +724,0 @@ <script src="prettify.js"></script>

@@ -110,6 +110,6 @@ export interface SourceLocation {

export interface SecurityFields {
/** Whether this endpoint requires MFA. */
requireMfa?: boolean;
/** Inline comment attached to the `requireMfa:` line. */
requireMfaDescription?: string;
/** Named policy required for this endpoint, or `false` to explicitly bypass policy enforcement. */
policy?: string | false;
/** Inline comment attached to the `policy:` line. */
policyDescription?: string;
loc: SourceLocation;

@@ -116,0 +116,0 @@ }

@@ -1,1 +0,1 @@

{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../src/ast.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,MAAM,CAmB3C,CAAC;AAIH,MAAM,MAAM,gBAAgB,GACtB,cAAc,GACd,aAAa,GACb,aAAa,GACb,cAAc,GACd,YAAY,GACZ,eAAe,GACf,aAAa,GACb,0BAA0B,GAC1B,oBAAoB,GACpB,gBAAgB,GAChB,oBAAoB,GACpB,YAAY,CAAC;AAEnB,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EACE,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,QAAQ,GACR,SAAS,GACT,MAAM,GACN,MAAM,GACN,UAAU,GACV,UAAU,GACV,UAAU,GACV,OAAO,GACP,KAAK,GACL,MAAM,GACN,SAA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B,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,cAAc,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC1D;AAID,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,yFAAyF;IACzF,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,kIAAkI;IAClI,cAAc,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACxC,uIAAuI;IACvI,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACzC,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CAChB"}

@@ -6,7 +6,9 @@ export interface Diagnostic {

severity: 'error' | 'warning';
/** Optional stable identifier — consumed by editor tooling to dispatch quick-fixes. */
code?: string;
}
export declare class DiagnosticCollector {
private diagnostics;
error(file: string, line: number, message: string): void;
warn(file: string, line: number, message: string): void;
error(file: string, line: number, message: string, code?: string): void;
warn(file: string, line: number, message: string, code?: string): void;
hasErrors(): boolean;

@@ -13,0 +15,0 @@ getAll(): Diagnostic[];

@@ -1,1 +0,1 @@

{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;CACjC;AAED,qBAAa,mBAAmB;IAC5B,OAAO,CAAC,WAAW,CAAoB;IAEvC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAIxD,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAIvD,SAAS,IAAI,OAAO;IAIpB,MAAM,IAAI,UAAU,EAAE;IAItB,MAAM,IAAI,IAAI;CAWjB"}
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,uFAAuF;IACvF,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,mBAAmB;IAC5B,OAAO,CAAC,WAAW,CAAoB;IAEvC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI;IAIvE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI;IAItE,SAAS,IAAI,OAAO;IAIpB,MAAM,IAAI,UAAU,EAAE;IAItB,MAAM,IAAI,IAAI;CAWjB"}

@@ -1,1 +0,1 @@

{"version":3,"file":"semantics.d.ts","sourceRoot":"","sources":["../src/semantics.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAiB,MAAM,QAAQ,CAAC;AAqErD,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,8BA6nC/C"}
{"version":3,"file":"semantics.d.ts","sourceRoot":"","sources":["../src/semantics.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAiB,MAAM,QAAQ,CAAC;AAqErD,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,8BAqoC/C"}

@@ -1,1 +0,1 @@

{"version":3,"file":"validate-inheritance.d.ts","sourceRoot":"","sources":["../src/validate-inheritance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAoB,SAAS,EAAa,MAAM,UAAU,CAAC;AACzF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,gBAAgB,EAAE,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAetG;AA2HD;;oFAEoF;AACpF,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,OAAO,CAOtE"}
{"version":3,"file":"validate-inheritance.d.ts","sourceRoot":"","sources":["../src/validate-inheritance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAoB,SAAS,EAAa,MAAM,UAAU,CAAC;AACzF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,gBAAgB,EAAE,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAetG;AAkID;;oFAEoF;AACpF,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,OAAO,CAOtE"}
{
"name": "@contractkit/core",
"version": "0.17.0",
"version": "0.18.0",
"description": "Core DSL compiler library: grammar-driven parser, codegen, and validation",

@@ -5,0 +5,0 @@ "author": {

@@ -180,6 +180,6 @@ // ─── Shared ────────────────────────────────────────────────────────────────

export interface SecurityFields {
/** Whether this endpoint requires MFA. */
requireMfa?: boolean;
/** Inline comment attached to the `requireMfa:` line. */
requireMfaDescription?: string;
/** Named policy required for this endpoint, or `false` to explicitly bypass policy enforcement. */
policy?: string | false;
/** Inline comment attached to the `policy:` line. */
policyDescription?: string;
loc: SourceLocation;

@@ -186,0 +186,0 @@ }

@@ -6,2 +6,4 @@ export interface Diagnostic {

severity: 'error' | 'warning';
/** Optional stable identifier — consumed by editor tooling to dispatch quick-fixes. */
code?: string;
}

@@ -12,8 +14,8 @@

error(file: string, line: number, message: string): void {
this.diagnostics.push({ file, line, message, severity: 'error' });
error(file: string, line: number, message: string, code?: string): void {
this.diagnostics.push({ file, line, message, severity: 'error', code });
}
warn(file: string, line: number, message: string): void {
this.diagnostics.push({ file, line, message, severity: 'warning' });
warn(file: string, line: number, message: string, code?: string): void {
this.diagnostics.push({ file, line, message, severity: 'warning', code });
}

@@ -20,0 +22,0 @@

@@ -1081,5 +1081,5 @@ /**

const result = child.toAst(file, this.args.diag);
if (result._type === 'requireMfa') {
fields.requireMfa = result.value;
if (result.description) fields.requireMfaDescription = result.description;
if (result._type === 'policy') {
fields.policy = result.value;
if (result.description) fields.policyDescription = result.description;
}

@@ -1095,4 +1095,4 @@ }

SecurityRequireMfaLine(_kw, _colon, valueNode, commentOpt) {
const value = valueNode.sourceString === 'true';
SecurityPolicyLine(_kw, _colon, valueNode, commentOpt) {
const value = valueNode.toAst(this.args.file, this.args.diag) as string | false;
let description: string | undefined;

@@ -1102,5 +1102,13 @@ if ((commentOpt as IterationNode).numChildren > 0) {

}
return { _type: 'requireMfa', value, description };
return { _type: 'policy', value, description };
},
PolicyValue_none(_noneKw) {
return false;
},
PolicyValue_name(identNode) {
return identNode.sourceString;
},
SecuritySignatureLine(_signatureKw, _colon, valueNode, _commentOpt) {

@@ -1107,0 +1115,0 @@ const raw = valueNode.sourceString;

@@ -138,2 +138,3 @@ /**

`Field '${name}' is declared by ${sources} with different shapes — redeclare in '${model.name}' with 'override'`,
'missing-override',
);

@@ -148,2 +149,3 @@ continue;

`Field '${name}' conflicts across bases ${sources} — mark as 'override'`,
'missing-override',
);

@@ -157,3 +159,8 @@ }

if (!baseFieldsByName.has(f.name)) {
diag.error(f.loc.file, f.loc.line, `Field '${f.name}' has 'override' but is not declared in any base of '${model.name}'`);
diag.error(
f.loc.file,
f.loc.line,
`Field '${f.name}' has 'override' but is not declared in any base of '${model.name}'`,
'spurious-override',
);
}

@@ -160,0 +167,0 @@ }

@@ -26,3 +26,3 @@ import type { ContractRootNode, OpRootNode, ContractTypeNode, ModelNode, FieldNode } from './ast.js';

if (!modelNames.has(base)) {
diag.warn(model.loc.file, model.loc.line, `Base model "${base}" is not defined in any contract file`);
diag.warn(model.loc.file, model.loc.line, `Base model "${base}" is not defined in any contract file`, 'unknown-model');
}

@@ -70,3 +70,3 @@ }

if (!models.has(type.name)) {
diag.warn(file, line, `Referenced model "${type.name}" is not defined in any contract file`);
diag.warn(file, line, `Referenced model "${type.name}" is not defined in any contract file`, 'unknown-model');
}

@@ -215,4 +215,4 @@ break;

if (/^[A-Z]/.test(name) && !models.has(name)) {
diag.warn(file, line, `Referenced type "${name}" is not defined in any contract file`);
diag.warn(file, line, `Referenced type "${name}" is not defined in any contract file`, 'unknown-model');
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display