dsh-annotator 0.0.0-stage → 0.5.5

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.
@@ -0,0 +1,173 @@
1
+ // PNG 的最小编解码:只做「截整视口 → 裁出元素」这一件事需要的那部分。
2
+ // 为什么不引第三方图像库:host 侧不允许第三方运行时依赖(见 AGENTS.md)。
3
+ // 为什么要在 Node 侧裁:Page.captureScreenshot 带 clip 时 Chrome 会把合成面换成
4
+ // clip 尺寸重渲染一帧再还原(实测约 60ms),肉眼就是一记闪屏;整视口截图不动渲染视口,没有这一帧。
5
+ // 支持的子集:bitDepth 8、colorType 0/2/4/6、非隔行 —— Chrome 的截图全部落在这里,其它形态返回 null 让调用方退回原图。
6
+
7
+ import zlib from 'node:zlib';
8
+
9
+ const SIGNATURE = Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);
10
+ const CHANNELS = { 0: 1, 2: 3, 4: 2, 6: 4 };
11
+
12
+ const CRC_TABLE = (() => {
13
+ const table = new Int32Array(256);
14
+ for (let n = 0; n < 256; n++) {
15
+ let c = n;
16
+ for (let k = 0; k < 8; k++) c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;
17
+ table[n] = c;
18
+ }
19
+ return table;
20
+ })();
21
+
22
+ function crc32(buffer) {
23
+ let c = -1;
24
+ for (let i = 0; i < buffer.length; i++) c = CRC_TABLE[(c ^ buffer[i]) & 0xff] ^ (c >>> 8);
25
+ return (c ^ -1) >>> 0;
26
+ }
27
+
28
+ function chunk(type, data) {
29
+ const head = Buffer.alloc(8);
30
+ head.writeUInt32BE(data.length, 0);
31
+ head.write(type, 4, 'ascii');
32
+ const crc = Buffer.alloc(4);
33
+ crc.writeUInt32BE(crc32(Buffer.concat([head.subarray(4), data])), 0);
34
+ return Buffer.concat([head, data, crc]);
35
+ }
36
+
37
+ function parseChunks(buffer) {
38
+ if (!Buffer.isBuffer(buffer) || buffer.length < 8 || !buffer.subarray(0, 8).equals(SIGNATURE)) return null;
39
+ let offset = 8;
40
+ let header = null;
41
+ const idat = [];
42
+ while (offset + 12 <= buffer.length) {
43
+ const length = buffer.readUInt32BE(offset);
44
+ const type = buffer.subarray(offset + 4, offset + 8).toString('ascii');
45
+ const start = offset + 8;
46
+ const end = start + length;
47
+ if (end + 4 > buffer.length) return null;
48
+ const data = buffer.subarray(start, end);
49
+ if (type === 'IHDR') {
50
+ if (length < 13) return null;
51
+ header = {
52
+ width: data.readUInt32BE(0),
53
+ height: data.readUInt32BE(4),
54
+ bitDepth: data[8],
55
+ colorType: data[9],
56
+ interlace: data[12],
57
+ };
58
+ } else if (type === 'IDAT') idat.push(data);
59
+ else if (type === 'IEND') break;
60
+ offset = end + 4;
61
+ }
62
+ if (!header) return null;
63
+ return { header, idat };
64
+ }
65
+
66
+ /** 只读尺寸,用于把 CSS 像素换算成截图里的设备像素(scale = 图像宽 / 视口宽)。 */
67
+ export function readPngSize(buffer) {
68
+ const parsed = parseChunks(buffer);
69
+ if (!parsed) return null;
70
+ const { width, height } = parsed.header;
71
+ if (!(width > 0) || !(height > 0)) return null;
72
+ return { width, height };
73
+ }
74
+
75
+ /** 解成 {width, height, channels, data}(8 位,非隔行);不支持的形态返回 null。 */
76
+ export function decodePng(buffer) {
77
+ const parsed = parseChunks(buffer);
78
+ if (!parsed) return null;
79
+ const { width, height, bitDepth, colorType, interlace } = parsed.header;
80
+ const channels = CHANNELS[colorType];
81
+ if (bitDepth !== 8 || !channels || interlace !== 0) return null;
82
+ if (!(width > 0) || !(height > 0) || parsed.idat.length === 0) return null;
83
+ let raw;
84
+ try {
85
+ raw = zlib.inflateSync(Buffer.concat(parsed.idat));
86
+ } catch {
87
+ return null;
88
+ }
89
+ const stride = width * channels;
90
+ if (raw.length < (stride + 1) * height) return null;
91
+ const data = Buffer.alloc(stride * height);
92
+ let prev = Buffer.alloc(stride);
93
+ for (let y = 0; y < height; y++) {
94
+ const filter = raw[y * (stride + 1)];
95
+ const line = raw.subarray(y * (stride + 1) + 1, (y + 1) * (stride + 1));
96
+ const out = data.subarray(y * stride, (y + 1) * stride);
97
+ for (let x = 0; x < stride; x++) {
98
+ const left = x >= channels ? out[x - channels] : 0;
99
+ const up = prev[x];
100
+ const upLeft = x >= channels ? prev[x - channels] : 0;
101
+ let value = line[x];
102
+ if (filter === 1) value += left;
103
+ else if (filter === 2) value += up;
104
+ else if (filter === 3) value += (left + up) >> 1;
105
+ else if (filter === 4) {
106
+ const p = left + up - upLeft;
107
+ const pa = Math.abs(p - left);
108
+ const pb = Math.abs(p - up);
109
+ const pc = Math.abs(p - upLeft);
110
+ value += pa <= pb && pa <= pc ? left : pb <= pc ? up : upLeft;
111
+ } else if (filter !== 0) return null;
112
+ out[x] = value & 0xff;
113
+ }
114
+ prev = out;
115
+ }
116
+ return { width, height, channels, data };
117
+ }
118
+
119
+ /** 编码 8 位非隔行 PNG(每行 filter 0:够用,且不需要自适应代价)。 */
120
+ export function encodePng({ width, height, channels, data }) {
121
+ const colorType = channels === 4 ? 6 : channels === 3 ? 2 : channels === 1 ? 0 : channels === 2 ? 4 : null;
122
+ if (colorType === null) return null;
123
+ if (!(width > 0) || !(height > 0) || !Buffer.isBuffer(data)) return null;
124
+ const stride = width * channels;
125
+ if (data.length < stride * height) return null;
126
+ const raw = Buffer.alloc((stride + 1) * height);
127
+ for (let y = 0; y < height; y++) {
128
+ raw[y * (stride + 1)] = 0;
129
+ data.copy(raw, y * (stride + 1) + 1, y * stride, (y + 1) * stride);
130
+ }
131
+ const ihdr = Buffer.alloc(13);
132
+ ihdr.writeUInt32BE(width, 0);
133
+ ihdr.writeUInt32BE(height, 4);
134
+ ihdr[8] = 8;
135
+ ihdr[9] = colorType;
136
+ return Buffer.concat([
137
+ SIGNATURE,
138
+ chunk('IHDR', ihdr),
139
+ chunk('IDAT', zlib.deflateSync(raw)),
140
+ chunk('IEND', Buffer.alloc(0)),
141
+ ]);
142
+ }
143
+
144
+ /**
145
+ * 按像素矩形裁切。rect 超出画面时自动夹进边界;夹完为空返回 null。
146
+ * 解不出来(非 Chrome 形态)也返回 null,调用方可以退回原图。
147
+ */
148
+ export function cropPng(buffer, rect) {
149
+ const image = decodePng(buffer);
150
+ if (!image) return null;
151
+ const rawX = Math.round(rect.x ?? 0);
152
+ const rawY = Math.round(rect.y ?? 0);
153
+ const rawWidth = Math.round(rect.width ?? 0);
154
+ const rawHeight = Math.round(rect.height ?? 0);
155
+ const x = Math.max(0, rawX);
156
+ const y = Math.max(0, rawY);
157
+ const width = Math.min(image.width, rawX + rawWidth) - x;
158
+ const height = Math.min(image.height, rawY + rawHeight) - y;
159
+ // 起点整个落在画面外(rawX >= width)时上面的差会是负数,这里一并挡掉。
160
+ if (width < 1 || height < 1) return null;
161
+ const channels = image.channels;
162
+ const stride = image.width * channels;
163
+ const data = Buffer.alloc(width * height * channels);
164
+ for (let row = 0; row < height; row++) {
165
+ image.data.copy(
166
+ data,
167
+ row * width * channels,
168
+ (y + row) * stride + x * channels,
169
+ (y + row) * stride + (x + width) * channels,
170
+ );
171
+ }
172
+ return encodePng({ width, height, channels, data });
173
+ }
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Where the plugin keeps its scratch files: the browser profile and the element
3
+ * screenshots.
4
+ *
5
+ * These are temp data, not project data. Writing them under the workspace left a
6
+ * `.dsh-visual-annotator/` tree (a full Chrome profile plus shots/) inside the
7
+ * user's repo, which polluted git status, IDE search, file watchers and backups.
8
+ * The default root is the OS temp directory; a per-project subdirectory keeps
9
+ * projects apart so two of them never share a browser profile (cookies/logins)
10
+ * nor overwrite each other's `p1.png`.
11
+ *
12
+ * Pure module: no fs, no env — the caller supplies the root.
13
+ */
14
+
15
+ import { createHash } from 'node:crypto';
16
+ import path from 'node:path';
17
+
18
+ /** Upper bound for the readable part of a scratch directory name. */
19
+ const SLUG_MAX = 32;
20
+
21
+ /** Characters a directory name may not contain on at least one supported OS. */
22
+ const UNSAFE = /[<>:"/\\|?*\u0000-\u001f]+/g;
23
+
24
+ /** Filesystem-safe, human-recognisable label for a project ("my-app", "我的-项目"). */
25
+ export function projectSlug(cwd) {
26
+ const base = path.basename(path.resolve(String(cwd ?? '')));
27
+ const safe = String(base)
28
+ .replace(UNSAFE, '-')
29
+ .replace(/\s+/g, '-')
30
+ // Windows rejects trailing dots; a leading dot would hide the directory.
31
+ .replace(/^[-.]+|[-.]+$/g, '');
32
+ // Slice by code point: a byte/UTF-16 cut could split an emoji or astral char.
33
+ return [...safe].slice(0, SLUG_MAX).join('') || 'project';
34
+ }
35
+
36
+ /**
37
+ * Short stable hash of the absolute cwd, so "same project -> same dir" survives
38
+ * launches while two projects with the same basename stay separate. Windows and
39
+ * macOS default to case-insensitive filesystems, hence the optional fold.
40
+ */
41
+ export function projectHash(cwd, platform = process.platform) {
42
+ const abs = path.resolve(String(cwd ?? ''));
43
+ const key = platform === 'win32' ? abs.toLowerCase() : abs;
44
+ return createHash('sha1').update(key).digest('hex').slice(0, 8);
45
+ }
46
+
47
+ /** Subdirectory name for a project's scratch files; '' when cwd cannot address one. */
48
+ export function scratchSubdir(cwd, platform = process.platform) {
49
+ if (!cwd || !path.isAbsolute(String(cwd))) return '';
50
+ return `${projectSlug(cwd)}-${projectHash(cwd, platform)}`;
51
+ }
52
+
53
+ /** Absolute scratch directory for `cwd` under `root`; `root` itself when cwd is unusable. */
54
+ export function scratchDir(root, cwd, platform = process.platform) {
55
+ const sub = scratchSubdir(cwd, platform);
56
+ return sub ? path.join(path.resolve(String(root)), sub) : path.resolve(String(root));
57
+ }
@@ -0,0 +1,54 @@
1
+ /**
2
+ * 调试空间(space)的纯逻辑:命名、选择与标签归属。
3
+ *
4
+ * 语义对齐 ego lite 的 task space —— 那边同样是 Chromium 的 BrowserContext
5
+ * (`Target.createBrowserContext`),不是另开一个浏览器进程。所以这里只做
6
+ * 「哪个 context 算哪个空间」的判定,进程与 CDP 连接仍由 session.js 管。
7
+ */
8
+
9
+ export const DEFAULT_SPACE_NAME = '默认空间';
10
+
11
+ /**
12
+ * 用户输入的名字 -> 可用的空间名。控制字符与连续空白先压平,超长截断;
13
+ * 空串返回 null,让调用方回落到自动编号,而不是造出一个无名空间。
14
+ */
15
+ export function sanitizeSpaceName(input, { max = 40 } = {}) {
16
+ if (typeof input !== 'string') return null;
17
+ const flat = input
18
+ .replace(/[\u0000-\u001f\u007f]+/g, ' ')
19
+ .replace(/\s+/g, ' ')
20
+ .trim();
21
+ if (!flat) return null;
22
+ return flat.length > max ? flat.slice(0, max).trim() : flat;
23
+ }
24
+
25
+ /** 「空间 2」「空间 3」……避开已占用的名字;没有冲突就不加后缀。 */
26
+ export function nextSpaceName(existing, prefix = '空间') {
27
+ const used = new Set((existing ?? []).map((name) => String(name)));
28
+ if (!used.has(prefix)) return prefix;
29
+ for (let index = 2; index < 1000; index += 1) {
30
+ const candidate = prefix + ' ' + index;
31
+ if (!used.has(candidate)) return candidate;
32
+ }
33
+ return prefix + ' ' + Date.now();
34
+ }
35
+
36
+ /** 空串/undefined/null 都表示默认空间;其余按 context id 原样比较。 */
37
+ export function normalizeSpaceId(value) {
38
+ if (value === undefined || value === null) return '';
39
+ return String(value);
40
+ }
41
+
42
+ /**
43
+ * 标签属于哪个空间。默认空间的 context id 只有连上浏览器后才知道,所以
44
+ * 未识别到('')的标签一律算默认空间,避免早期 attach 的页面凭空消失。
45
+ */
46
+ export function filterTabsBySpace(tabs, spaceId, defaultContextId) {
47
+ const key = normalizeSpaceId(spaceId);
48
+ const fallback = normalizeSpaceId(defaultContextId);
49
+ return (tabs ?? []).filter((tab) => {
50
+ const context = normalizeSpaceId(tab?.contextId);
51
+ const owner = context || fallback;
52
+ return key === '' ? owner === fallback : context === key;
53
+ });
54
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * 面板标签条与浏览器真实标签的合并规则。纯函数:host 侧的事件循环、/state 轮询与
3
+ * 单测共用同一套判断,避免「事件里一套、轮询里一套」对不上。
4
+ */
5
+ import { normalizeSpaceId } from './spaces.js';
6
+
7
+ /**
8
+ * 把一条 CDP targetInfo 合并进 tabs(就地更新,不打乱顺序)。
9
+ *
10
+ * - 新 target:追加到末尾。
11
+ * - 已存在:原地更新。地址变了就认新标题(此刻可能还是空串,随后目标页加载完会补),
12
+ * 地址没变而这次没带标题时保留旧标题——Chrome 的 targetInfoChanged 经常只带
13
+ * url,直接覆盖会把已知标题擦成空,面板就退回显示 URL 了。
14
+ * - contextId 缺失时沿用旧值,别把一个已知空间的页误判回默认空间。
15
+ */
16
+ export function mergeTab(tabs, info) {
17
+ const list = tabs ?? [];
18
+ const targetId = info?.targetId;
19
+ if (!targetId) return list;
20
+ const url = info.url ?? '';
21
+ const contextId = normalizeSpaceId(info.browserContextId);
22
+ const index = list.findIndex((tab) => tab.targetId === targetId);
23
+ if (index < 0) {
24
+ list.push({ targetId, url, title: info.title ?? '', contextId });
25
+ return list;
26
+ }
27
+ const prev = list[index];
28
+ const sameUrl = prev.url === url;
29
+ list[index] = {
30
+ targetId,
31
+ url,
32
+ title: sameUrl ? info.title || prev.title : (info.title ?? ''),
33
+ contextId: contextId || prev.contextId,
34
+ };
35
+ return list;
36
+ }
37
+
38
+ /** 标签条直接给几枚,剩下的收进「更多」。 */
39
+ export const TAB_LIMIT = 10;
40
+
41
+ /** 面板按这个窗口切分:前 10 枚平铺,其余进弹层。 */
42
+ export function splitTabs(tabs, limit = TAB_LIMIT) {
43
+ const list = tabs ?? [];
44
+ return { visible: list.slice(0, limit), extra: list.slice(limit) };
45
+ }
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Model-facing JSON Schema for the `visual_annotator_read` tool.
3
+ *
4
+ * Kept here (rather than inline) so a unit test can guard it: DSH's tool
5
+ * registry only accepts a strict JSON Schema subset where `type` must be a
6
+ * single string and unions must be spelled with `oneOf`. A `type` array makes
7
+ * `tools.register()` throw `JsonSchemaError`, and the plugin used to swallow
8
+ * that error — the tool then existed in the docs but never in an agent's
9
+ * toolset. Do not reintroduce type arrays.
10
+ */
11
+
12
+ /** Union of one JSON type and `null`, the subset-safe way to express "may be null". */
13
+ const nullable = (type) => ({ oneOf: [{ type }, { type: 'null' }] });
14
+
15
+ export const TOOL_PARAMETERS = {
16
+ type: 'object',
17
+ additionalProperties: false,
18
+ properties: {
19
+ ids: {
20
+ type: 'array',
21
+ items: { type: 'string' },
22
+ description: '只返回这些 id 的标注(如 ["p1","p3"]);配合用户消息里的「[标注 #pN]」引用标记使用。缺省返回全部。',
23
+ },
24
+ shots: {
25
+ oneOf: [{ type: 'string' }, { type: 'integer' }],
26
+ description: "内联截图控制:'none' 不带截图;'all' 全部;正整数 n=最近 n 张;缺省最近 3 张。",
27
+ },
28
+ wait_seconds: {
29
+ type: 'integer',
30
+ description: '等待新标注秒数 0-60(默认 0):无新 pick 时轮询等待,出现新 pick 或超时返回。',
31
+ },
32
+ },
33
+ };
34
+
35
+ export const TOOL_OUTPUT_SCHEMA = {
36
+ type: 'object',
37
+ required: ['ok'],
38
+ additionalProperties: false,
39
+ properties: {
40
+ ok: { type: 'boolean' },
41
+ count: { type: 'integer' },
42
+ rev: { type: 'string' },
43
+ markdown: { type: 'string' },
44
+ picks: {
45
+ type: 'array',
46
+ items: {
47
+ type: 'object',
48
+ additionalProperties: false,
49
+ properties: {
50
+ id: { type: 'string' },
51
+ selector: { type: 'string' },
52
+ tag: { type: 'string' },
53
+ text: { type: 'string' },
54
+ comment: { type: 'string' },
55
+ shotPath: nullable('string'),
56
+ url: { type: 'string' },
57
+ pageRect: nullable('object'),
58
+ },
59
+ },
60
+ },
61
+ attachments: {
62
+ type: 'array',
63
+ items: {
64
+ type: 'object',
65
+ properties: {
66
+ pickId: { type: 'string' },
67
+ ref: { type: 'object' },
68
+ },
69
+ },
70
+ },
71
+ },
72
+ };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * 地址栏的归一化:面板里的输入框是「地址」,但用户习惯像浏览器地址栏那样只敲域名。
3
+ * Chromium 的 Target.createTarget 拿到没有协议的 "gitee.com" 会开一页 about:blank,
4
+ * 所以在交给 CDP 之前统一补协议。纯函数,便于单测。
5
+ */
6
+
7
+ const SCHEME = /^([a-zA-Z][a-zA-Z0-9+.-]*):(.*)$/s;
8
+ /** 本机开发服务器基本都是 http,别把 localhost:5173 硬升成 https。 */
9
+ const LOOPBACK = /^(localhost|127(?:\.\d{1,3}){3}|0\.0\.0\.0|\[::1\])(?::\d+)?(?:[/?#]|$)/i;
10
+
11
+ /**
12
+ * 把用户敲的地址补成可打开的 URL。
13
+ *
14
+ * - 空串返回 ''(调用方保持当前页不动)。
15
+ * - 已带协议(http:、https:、file:、chrome:、about:…)原样返回。
16
+ * - 以 // 开头补 https:。
17
+ * - localhost / 127.0.0.1 / [::1] 补 http:。
18
+ * - 含空格的当搜索词,交给默认搜索引擎(和地址栏一致),而不是开一页空白。
19
+ * - 其余当域名补 https:。
20
+ */
21
+ export function normalizeAddress(input) {
22
+ const raw = String(input ?? '').trim();
23
+ if (!raw) return '';
24
+ if (raw === 'about:blank') return raw;
25
+ const matched = SCHEME.exec(raw);
26
+ // "localhost:5173" 长得也像 "协议:值",只有冒号后面不是纯端口才算协议;
27
+ // 否则把本地调试地址当成 localhost 协议,浏览器同样开不出页面。
28
+ if (matched && !/^\d+(?:[/?#].*)?$/.test(matched[2])) return raw;
29
+ if (raw.startsWith('//')) return 'https:' + raw;
30
+ if (LOOPBACK.test(raw)) return 'http://' + raw;
31
+ if (/\s/.test(raw)) return 'https://www.bing.com/search?q=' + encodeURIComponent(raw);
32
+ return 'https://' + raw;
33
+ }
package/package.json CHANGED
@@ -1,6 +1,54 @@
1
1
  {
2
- "name": "dsh-annotator",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "dsh-annotator",
3
+ "version": "0.5.5",
4
+ "description": "Visual element picker for DSH: highlight, annotate, comment and screenshot elements of a real Chrome/Edge page, then hand the selector + comment + shot to the agent.",
5
+ "type": "module",
6
+ "main": "./lib/index.js",
7
+ "exports": {
8
+ ".": "./lib/index.js",
9
+ "./client": "./lib/client.js",
10
+ "./package.json": "./package.json"
11
+ },
12
+ "files": [
13
+ "lib/",
14
+ "cordis.patch.yml"
15
+ ],
16
+ "dsh": {
17
+ "bundle": {
18
+ "patch": "./cordis.patch.yml"
19
+ },
20
+ "client": {
21
+ "platform": "web",
22
+ "immediately": true,
23
+ "inject": []
24
+ }
25
+ },
26
+ "engines": {
27
+ "node": ">=22"
28
+ },
29
+ "license": "MIT",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/ZhongqiXiao/dsh-annotator.git"
33
+ },
34
+ "scripts": {
35
+ "test": "node --test",
36
+ "test:e2e": "DSH_VISUAL_ANNOTATOR_E2E=1 DSH_VISUAL_ANNOTATOR_HEADLESS=1 DSH_VISUAL_ANNOTATOR_ADOPT_RUNNING=0 node --test --test-concurrency=1 --test-force-exit test/e2e-browsers.test.mjs",
37
+ "lint": "eslint .",
38
+ "lint:fix": "eslint . --fix",
39
+ "format": "prettier --write .",
40
+ "format:check": "prettier --check .",
41
+ "check": "node --check lib/index.js && node --check lib/session.js && node --check lib/cdp.js && node --check lib/client.js && node --check lib/overlay.js && node --check lib/shared/gui-page.js && node --check lib/shared/binding-action.js && node --check lib/shared/pick-actions.js && node --check lib/shared/auto-pick.js && node --check lib/shared/scratch-dir.js && node --check lib/shared/tool-schema.js && node --check lib/shared/cdp-endpoint.js && node --check lib/shared/browsers.js && node --check lib/shared/spaces.js && node --check lib/shared/ego.js && node --check lib/shared/tabs.js && node --check lib/shared/url.js && node --check lib/shared/host-rev.js && node --check lib/shared/embedded-runtime.js && node --check scripts/check-build-sync.mjs && node --check scripts/check-embedded-runtime.mjs && node --check scripts/canary-gates.mjs && node --check scripts/assess-ai-native.mjs && node --check scripts/mutation-test.mjs && node --check hooks/verify-before-finish.mjs",
42
+ "gates": "node scripts/check-build-sync.mjs && node scripts/check-embedded-runtime.mjs",
43
+ "canary": "node scripts/canary-gates.mjs",
44
+ "assess": "node scripts/assess-ai-native.mjs",
45
+ "assess:gate": "node scripts/assess-ai-native.mjs --min-score 80",
46
+ "mutate": "node scripts/mutation-test.mjs",
47
+ "verify": "npm run check && npm run lint && npm run format:check && npm test && npm run gates && npm run canary"
48
+ },
49
+ "devDependencies": {
50
+ "eslint": "^9",
51
+ "globals": "^15",
52
+ "prettier": "^3"
53
+ }
54
+ }