@ingcreators/annot-mcp 0.2.0 → 0.3.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.
@@ -0,0 +1,73 @@
1
+ import { BrowserPool } from '../browser/pool.js';
2
+ import { AnnotateToolResult } from './annotate-screenshot.js';
3
+ export declare const ARIA_SNAPSHOT_TOOL_NAME = "annot_aria_snapshot";
4
+ export declare const ariaSnapshotTool: {
5
+ readonly name: "annot_aria_snapshot";
6
+ readonly description: string;
7
+ readonly inputSchema: {
8
+ readonly type: "object";
9
+ readonly required: readonly ["url"];
10
+ readonly additionalProperties: false;
11
+ readonly properties: {
12
+ readonly url: {
13
+ readonly type: "string";
14
+ readonly format: "uri";
15
+ readonly description: "Page URL to snapshot.";
16
+ };
17
+ readonly viewport: {
18
+ readonly type: "object";
19
+ readonly additionalProperties: false;
20
+ readonly properties: {
21
+ readonly width: {
22
+ readonly type: "integer";
23
+ readonly minimum: 1;
24
+ readonly default: 1280;
25
+ };
26
+ readonly height: {
27
+ readonly type: "integer";
28
+ readonly minimum: 1;
29
+ readonly default: 800;
30
+ };
31
+ readonly deviceScaleFactor: {
32
+ readonly type: "number";
33
+ readonly minimum: 0.1;
34
+ readonly default: 1;
35
+ };
36
+ };
37
+ readonly description: "Viewport size. Default 1280×800 at 1× device pixel ratio.";
38
+ };
39
+ readonly waitFor: {
40
+ readonly type: "string";
41
+ readonly enum: readonly ["load", "domcontentloaded", "networkidle"];
42
+ readonly default: "load";
43
+ readonly description: "Page event to await before snapshotting.";
44
+ };
45
+ readonly rootSelector: {
46
+ readonly type: "string";
47
+ readonly default: "body";
48
+ readonly description: string;
49
+ };
50
+ readonly timeout: {
51
+ readonly type: "integer";
52
+ readonly minimum: 0;
53
+ readonly description: string;
54
+ };
55
+ readonly output: {
56
+ readonly type: "string";
57
+ readonly description: string;
58
+ };
59
+ };
60
+ };
61
+ };
62
+ export interface AriaSnapshotToolDeps {
63
+ pool: BrowserPool;
64
+ }
65
+ export interface AriaSnapshotToolInput {
66
+ url?: unknown;
67
+ viewport?: unknown;
68
+ waitFor?: unknown;
69
+ rootSelector?: unknown;
70
+ timeout?: unknown;
71
+ output?: unknown;
72
+ }
73
+ export declare function handleAriaSnapshot(args: AriaSnapshotToolInput, deps: AriaSnapshotToolDeps): Promise<AnnotateToolResult>;
@@ -0,0 +1,75 @@
1
+ import { BrowserPool } from '../browser/pool.js';
2
+ import { AnnotateToolResult } from './annotate-screenshot.js';
3
+ export declare const DRAFT_SCREEN_SPEC_TOOL_NAME = "annot_draft_screen_spec";
4
+ export declare const draftScreenSpecTool: {
5
+ readonly name: "annot_draft_screen_spec";
6
+ readonly description: string;
7
+ readonly inputSchema: {
8
+ readonly type: "object";
9
+ readonly required: readonly ["url", "id"];
10
+ readonly additionalProperties: false;
11
+ readonly properties: {
12
+ readonly url: {
13
+ readonly type: "string";
14
+ readonly format: "uri";
15
+ readonly description: "Page URL to draft from.";
16
+ };
17
+ readonly id: {
18
+ readonly type: "string";
19
+ readonly description: "Screen ID — used as the MDX frontmatter `annot.id` and as the `<Screen id>` prop.";
20
+ };
21
+ readonly title: {
22
+ readonly type: "string";
23
+ readonly description: "Optional screen title (frontmatter `annot.title`).";
24
+ };
25
+ readonly book: {
26
+ readonly type: "string";
27
+ readonly description: "Optional book name (frontmatter `xlsx.book`).";
28
+ };
29
+ readonly screenImageSrc: {
30
+ readonly type: "string";
31
+ readonly default: "./shots/{id}.png";
32
+ readonly description: string;
33
+ };
34
+ readonly viewport: {
35
+ readonly type: "object";
36
+ readonly additionalProperties: false;
37
+ readonly properties: {
38
+ readonly width: {
39
+ readonly type: "integer";
40
+ readonly minimum: 1;
41
+ readonly default: 1280;
42
+ };
43
+ readonly height: {
44
+ readonly type: "integer";
45
+ readonly minimum: 1;
46
+ readonly default: 800;
47
+ };
48
+ readonly deviceScaleFactor: {
49
+ readonly type: "number";
50
+ readonly minimum: 0.1;
51
+ readonly default: 1;
52
+ };
53
+ };
54
+ };
55
+ readonly waitFor: {
56
+ readonly type: "string";
57
+ readonly enum: readonly ["load", "domcontentloaded", "networkidle"];
58
+ readonly default: "load";
59
+ };
60
+ };
61
+ };
62
+ };
63
+ export interface DraftScreenSpecToolDeps {
64
+ pool: BrowserPool;
65
+ }
66
+ export interface DraftScreenSpecToolInput {
67
+ url?: unknown;
68
+ id?: unknown;
69
+ title?: unknown;
70
+ book?: unknown;
71
+ screenImageSrc?: unknown;
72
+ viewport?: unknown;
73
+ waitFor?: unknown;
74
+ }
75
+ export declare function handleDraftScreenSpec(args: DraftScreenSpecToolInput, deps: DraftScreenSpecToolDeps): Promise<AnnotateToolResult>;
@@ -0,0 +1,64 @@
1
+ import { BrowserPool } from '../browser/pool.js';
2
+ import { AnnotateToolResult } from './annotate-screenshot.js';
3
+ export declare const PROPOSE_DRIFT_FIXES_TOOL_NAME = "annot_propose_drift_fixes";
4
+ export declare const proposeDriftFixesTool: {
5
+ readonly name: "annot_propose_drift_fixes";
6
+ readonly description: string;
7
+ readonly inputSchema: {
8
+ readonly type: "object";
9
+ readonly required: readonly ["mdxPath", "url"];
10
+ readonly additionalProperties: false;
11
+ readonly properties: {
12
+ readonly mdxPath: {
13
+ readonly type: "string";
14
+ readonly description: "Absolute or cwd-relative path to the `.mdx` file with `annot:` frontmatter.";
15
+ };
16
+ readonly url: {
17
+ readonly type: "string";
18
+ readonly format: "uri";
19
+ readonly description: "URL to navigate to for the live snapshot.";
20
+ };
21
+ readonly screenId: {
22
+ readonly type: "string";
23
+ readonly description: "Optional `<Screen id>` filter. Default: run drift against every screen in the MDX.";
24
+ };
25
+ readonly viewport: {
26
+ readonly type: "object";
27
+ readonly additionalProperties: false;
28
+ readonly properties: {
29
+ readonly width: {
30
+ readonly type: "integer";
31
+ readonly minimum: 1;
32
+ readonly default: 1280;
33
+ };
34
+ readonly height: {
35
+ readonly type: "integer";
36
+ readonly minimum: 1;
37
+ readonly default: 800;
38
+ };
39
+ readonly deviceScaleFactor: {
40
+ readonly type: "number";
41
+ readonly minimum: 0.1;
42
+ readonly default: 1;
43
+ };
44
+ };
45
+ };
46
+ readonly waitFor: {
47
+ readonly type: "string";
48
+ readonly enum: readonly ["load", "domcontentloaded", "networkidle"];
49
+ readonly default: "load";
50
+ };
51
+ };
52
+ };
53
+ };
54
+ export interface ProposeDriftFixesToolDeps {
55
+ pool: BrowserPool;
56
+ }
57
+ export interface ProposeDriftFixesToolInput {
58
+ mdxPath?: unknown;
59
+ url?: unknown;
60
+ screenId?: unknown;
61
+ viewport?: unknown;
62
+ waitFor?: unknown;
63
+ }
64
+ export declare function handleProposeDriftFixes(args: ProposeDriftFixesToolInput, deps: ProposeDriftFixesToolDeps): Promise<AnnotateToolResult>;
@@ -0,0 +1,31 @@
1
+ import { AnnotateToolResult } from './annotate-screenshot.js';
2
+ export declare const TRANSLATE_SCREEN_SPEC_TOOL_NAME = "annot_translate_screen_spec";
3
+ export declare const translateScreenSpecTool: {
4
+ readonly name: "annot_translate_screen_spec";
5
+ readonly description: string;
6
+ readonly inputSchema: {
7
+ readonly type: "object";
8
+ readonly required: readonly ["mdxPath", "targetLocale"];
9
+ readonly additionalProperties: false;
10
+ readonly properties: {
11
+ readonly mdxPath: {
12
+ readonly type: "string";
13
+ readonly description: "Absolute or cwd-relative path to the source `.mdx`.";
14
+ };
15
+ readonly sourceLocale: {
16
+ readonly type: "string";
17
+ readonly description: string;
18
+ };
19
+ readonly targetLocale: {
20
+ readonly type: "string";
21
+ readonly description: "BCP-47 locale tag of the locale to produce (e.g. `en-US`).";
22
+ };
23
+ };
24
+ };
25
+ };
26
+ export interface TranslateScreenSpecToolInput {
27
+ mdxPath?: unknown;
28
+ sourceLocale?: unknown;
29
+ targetLocale?: unknown;
30
+ }
31
+ export declare function handleTranslateScreenSpec(args: TranslateScreenSpecToolInput): Promise<AnnotateToolResult>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ingcreators/annot-mcp",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "description": "Model Context Protocol server exposing the Annot headless annotator as agent-callable tools. Drop into Claude Desktop / Claude Code / Cursor and let an AI agent compose Annot with @playwright/mcp + GitHub MCP for one-turn bug-report autopilot, visual-diff PR review, and locator-first annotation workflows.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "ingcreators",
@@ -46,17 +46,18 @@
46
46
  "access": "public"
47
47
  },
48
48
  "devDependencies": {
49
- "@types/node": "^25.9.0",
49
+ "@types/node": "^25.9.1",
50
50
  "typescript": "^6.0.3",
51
- "vite": "^6.4.2",
52
- "vite-plugin-dts": "^5.0.0"
51
+ "vite": "^8.0.13",
52
+ "vite-plugin-dts": "^5.0.1"
53
53
  },
54
54
  "dependencies": {
55
55
  "@modelcontextprotocol/sdk": "^1.0.0",
56
- "@napi-rs/canvas": "^0.1.0",
56
+ "@napi-rs/canvas": "^1.0.0",
57
57
  "pixelmatch": "^7.1.0",
58
58
  "playwright-core": "^1.50.0",
59
- "@ingcreators/annot-annotator": "0.3.0"
59
+ "@ingcreators/annot-annotator": "0.5.0",
60
+ "@ingcreators/annot-product-docs": "0.3.0"
60
61
  },
61
62
  "scripts": {
62
63
  "build": "vite build",