Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
ff4219d
chore: modularize mcp tools and extension helpers, add sdd spec template
vafreitas Nov 1, 2026
514b39a
docs: establish phase 0A architecture and delivery governance
vafreitas Nov 1, 2026
ab869e7
docs: use project branch prefixes for evolution phases
vafreitas Nov 1, 2026
03f3287
docs: remove evolution planning from published documentation
vafreitas Nov 1, 2026
51cf8e7
chore: remove specification template
vafreitas Nov 1, 2026
345b65b
chore: remove AGENTS.md
vafreitas Nov 1, 2026
c6fb30a
Merge PR #23: modularize MCP tools and extension helpers
vafreitas Nov 1, 2026
5e9ee44
chore: share RPC contracts and decouple tools from bridge
vafreitas Nov 1, 2026
db3b05f
Merge pull request #24 from VLab-Software/feature/phase-0b-contracts
vafreitas Nov 1, 2026
a698cd5
refactor: decouple extension connection, dispatcher and domain handlers
vafreitas Nov 1, 2026
83f76d8
Merge pull request #25 from VLab-Software/feature/phase-0c-extension
vafreitas Nov 1, 2026
9eca0d3
refactor(schematic): decouple analysis into types, normalization, con…
vafreitas Nov 1, 2026
a655207
Merge pull request #26 from VLab-Software/feature/phase-0d-schematic
vafreitas Nov 1, 2026
1b32848
chore(quality): add eslint, prettier, dependency boundary checks and …
vafreitas Nov 1, 2026
e56ae03
Merge pull request #27 from VLab-Software/feature/phase-0e-quality
vafreitas Nov 1, 2026
7a40b4c
feat(mcp): migrate from @modelcontextprotocol/sdk to modern v2 packages
vafreitas Nov 1, 2026
4ab0c0e
Merge pull request #28 from VLab-Software/feature/phase-1-sdk-v2
vafreitas Nov 1, 2026
fe3d3f8
feat(identity): add document identity, method capabilities and target…
vafreitas Nov 1, 2026
3581489
Merge pull request #29 from VLab-Software/feature/phase-1-document-id…
vafreitas Nov 1, 2026
5e32d6f
feat(snapshots): enrich snapshots with document identity, completenes…
vafreitas Nov 1, 2026
4c6b90c
Merge pull request #30 from VLab-Software/feature/phase-1-snapshots
vafreitas Nov 1, 2026
43875b6
feat(mutation): implement generalized mutation lifecycle with preview…
vafreitas Nov 1, 2026
3bd79be
Merge pull request #31 from VLab-Software/feature/phase-1-mutation-li…
vafreitas Nov 1, 2026
042bba1
feat(documents): list and open documents by identity with canvas view…
vafreitas Nov 1, 2026
50a2e27
Merge pull request #32 from VLab-Software/feature/phase-2-documents
vafreitas Nov 1, 2026
377b24b
feat(schematic): component mutation lifecycle with create, move, upda…
vafreitas Nov 1, 2026
b1d1093
Merge pull request #33 from VLab-Software/feature/phase-2-schematic-c…
vafreitas Nov 1, 2026
3f74634
feat(schematic): wire and net label mutation lifecycle with coordinat…
vafreitas Nov 1, 2026
0c90df7
Merge pull request #34 from VLab-Software/feature/phase-2-schematic-w…
vafreitas Nov 1, 2026
8ef5448
feat(schematic): native nets and ERC inspection by page with explicit…
vafreitas Nov 1, 2026
a6d07bc
Merge pull request #35 from VLab-Software/feature/phase-2-native-nets…
vafreitas Nov 1, 2026
d1ae9fc
feat(pcb): inspect pads, nets, coordinates and properties with reconc…
vafreitas Nov 1, 2026
873cc69
Merge pull request #36 from VLab-Software/feature/phase-3-pcb-components
vafreitas Nov 1, 2026
48dd3f8
feat(pcb): component transformation lifecycle with move, rotate, flip…
vafreitas Nov 1, 2026
5e6a6e5
Merge pull request #37 from VLab-Software/feature/phase-3-pcb-transforms
vafreitas Nov 1, 2026
8cd6a7f
feat(pcb): board outline inspection, creation, polygon sizing, cleari…
vafreitas Nov 1, 2026
10880d8
Merge pull request #38 from VLab-Software/feature/phase-3-board-outline
vafreitas Nov 1, 2026
7072707
feat(pcb): native autoroute and autolayout mutations, destructive unr…
vafreitas Nov 1, 2026
a9c7b42
Merge pull request #39 from VLab-Software/feature/phase-3-native-layo…
vafreitas Nov 1, 2026
b92e448
feat(pcb): detailed DRC execution with categorized violations, eviden…
vafreitas Nov 1, 2026
6f09520
Merge pull request #40 from VLab-Software/feature/phase-3-detailed-drc
vafreitas Nov 1, 2026
0dd283d
feat(pcb): inspection, creation, modification and deletion of tracks …
vafreitas Nov 1, 2026
fa65bde
Merge pull request #41 from VLab-Software/feature/phase-4-tracks-vias
vafreitas Nov 1, 2026
ab66e92
feat(pcb): copper zones, rebuild calculations and keepouts with readb…
vafreitas Nov 1, 2026
420a209
Merge pull request #42 from VLab-Software/feature/phase-4-copper-keep…
vafreitas Nov 1, 2026
e8436e3
feat(pcb): airwires and placement/net physical reports with transpare…
vafreitas Nov 1, 2026
3bbe8e3
Merge pull request #43 from VLab-Software/feature/phase-4-board-reports
vafreitas Nov 1, 2026
68345ed
feat(pcb): net classes, differential pairs and length matching constr…
vafreitas Nov 1, 2026
1e6934c
Merge pull request #44 from VLab-Software/feature/phase-4-net-constra…
vafreitas Nov 1, 2026
80502e7
feat(pcb): external routing/layout imports and 3D spatial clearance i…
vafreitas Nov 1, 2026
5aad366
Merge pull request #45 from VLab-Software/feature/phase-4-external-3d
vafreitas Nov 1, 2026
0671891
feat(library): device inspection, pin-to-pad correspondence and alter…
vafreitas Nov 1, 2026
ded1425
Merge pull request #46 from VLab-Software/feature/phase-5-libraries
vafreitas Nov 1, 2026
786cece
feat(schematic): net ports, hierarchical sheet connectors and multi-b…
vafreitas Nov 1, 2026
407fffb
Merge pull request #47 from VLab-Software/feature/phase-5-ports-buses
vafreitas Nov 1, 2026
807eabd
feat(sync): schematic-pcb cross-domain comparison, synchronization an…
vafreitas Nov 1, 2026
2a171fa
Merge pull request #48 from VLab-Software/feature/phase-5-schematic-pcb
vafreitas Nov 1, 2026
3fe364a
feat(export): manufacturing, image rendering, 3D mechanical CAD and p…
vafreitas Nov 1, 2026
60b1ba0
Merge pull request #49 from VLab-Software/feature/phase-5-exports
vafreitas Nov 1, 2026
5bf7318
feat(spice): simulation feasibility assessment, component audit and S…
vafreitas Nov 1, 2026
6f02d2d
Merge pull request #50 from VLab-Software/feature/phase-5-spice-study
vafreitas Nov 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
dist
extension/dist
build
node_modules
docs
*.md
.github/**/*.md
package-lock.json
*.eext
*.mcpb
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"trailingComma": "none",
"singleQuote": false,
"printWidth": 120,
"tabWidth": 2
}
889 changes: 875 additions & 14 deletions docs/tools.md

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import js from "@eslint/js";
import tsPlugin from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import globals from "globals";

export default [
{
ignores: [
"**/dist/**",
"**/build/**",
"**/node_modules/**",
"docs/.vitepress/cache/**",
"docs/.vitepress/dist/**",
"**/*.eext",
"**/*.mcpb"
]
},
js.configs.recommended,
{
files: ["**/*.ts", "**/*.tsx"],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module"
},
globals: {
...globals.node,
...globals.browser
}
},
plugins: {
"@typescript-eslint": tsPlugin
},
rules: {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_"
}
],
"no-undef": "off",
"no-constant-condition": ["error", { checkLoops: false }]
}
},
{
files: ["scripts/**/*.mjs", "scripts/**/*.js", "*.mjs", "*.js"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.node
}
},
rules: {
"no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_"
}
]
}
}
];
6 changes: 1 addition & 5 deletions extension/extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
},
"license": "MIT",
"categories": "Other",
"keywords": [
"MCP",
"automation",
"assistant"
],
"keywords": ["MCP", "automation", "assistant"],
"activationEvents": {},
"entry": "./dist/index",
"dependentExtensions": {},
Expand Down
10 changes: 6 additions & 4 deletions extension/src/bridgeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ const defaultBridgeConfig: ExtensionBridgeConfig = {
};

function resolveOverrides(): BridgeConfigOverride {
const globalOverride = (globalThis as { __EASYEDA_MCP_BRIDGE_CONFIG__?: BridgeConfigOverride }).__EASYEDA_MCP_BRIDGE_CONFIG__;
const globalOverride = (globalThis as { __EASYEDA_MCP_BRIDGE_CONFIG__?: BridgeConfigOverride })
.__EASYEDA_MCP_BRIDGE_CONFIG__;
return globalOverride ?? {};
}

Expand All @@ -26,9 +27,10 @@ export function getBridgeConfig(): ExtensionBridgeConfig {
return {
...defaultBridgeConfig,
...override,
reconnectDelayMs: Array.isArray(override.reconnectDelayMs) && override.reconnectDelayMs.length > 0
? override.reconnectDelayMs.filter((delay) => Number.isFinite(delay) && delay >= 0)
: defaultBridgeConfig.reconnectDelayMs
reconnectDelayMs:
Array.isArray(override.reconnectDelayMs) && override.reconnectDelayMs.length > 0
? override.reconnectDelayMs.filter((delay) => Number.isFinite(delay) && delay >= 0)
: defaultBridgeConfig.reconnectDelayMs
};
}

Expand Down
111 changes: 111 additions & 0 deletions extension/src/connection.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { createBridgeConnection, WS_ID } from "./connection.js";

describe("Extension BridgeConnection", () => {
beforeEach(() => {
vi.useFakeTimers();
});

afterEach(() => {
vi.clearAllTimers();
vi.useRealTimers();
});

it("registers websocket and transitions through connection lifecycle", async () => {
let _registeredOnMessage: ((event: MessageEvent<string>) => Promise<void>) | undefined;
let registeredOnOpen: (() => Promise<void>) | undefined;
const sentMessages: string[] = [];

const mockApi = {
sys_WebSocket: {
register: vi.fn((_id: string, _uri: string, onMsg: any, onOpen: any) => {
_registeredOnMessage = onMsg;
registeredOnOpen = onOpen;
}),
send: vi.fn((_id: string, data: string) => {
sentMessages.push(data);
})
},
sys_Dialog: {
showInformationMessage: vi.fn()
},
dmt_SelectControl: {
getCurrentDocumentInfo: vi.fn(async () => ({ uuid: "doc-1", name: "Board.pcb", documentType: 3 }))
}
};

let connectionChangedCalled = false;
const conn = createBridgeConnection({
api: () => mockApi,
bridgeConfig: {
host: "127.0.0.1",
port: 8765,
openTimeoutMs: 2000,
heartbeatIntervalMs: 10000,
reconnectDelayMs: [0, 1000, 2000]
},
onMessage: async () => {},
getCapabilities: () => ({ drcCheck: true }),
onConnectionChanged: () => {
connectionChangedCalled = true;
}
});

expect(conn.getState().phase).toBe("idle");

await conn.ensureConnected({ reason: "test", manual: false });
expect(conn.getState().phase).toBe("connecting");
expect(mockApi.sys_WebSocket.register).toHaveBeenCalledWith(
WS_ID,
"ws://127.0.0.1:8765",
expect.any(Function),
expect.any(Function)
);

// Trigger onOpen
await registeredOnOpen?.();
expect(conn.getState().phase).toBe("connected");
expect(connectionChangedCalled).toBe(true);
expect(sentMessages.length).toBeGreaterThan(0);

const hello = JSON.parse(sentMessages[0]);
expect(hello.kind).toBe("hello");
expect(hello.capabilities).toEqual({ drcCheck: true });
expect(hello.status.connected).toBe(true);
});

it("handles open timeout and schedules reconnection", async () => {
const mockApi = {
sys_WebSocket: {
register: vi.fn(),
send: vi.fn()
},
sys_Dialog: {
showInformationMessage: vi.fn()
}
};

const conn = createBridgeConnection({
api: () => mockApi,
bridgeConfig: {
host: "127.0.0.1",
port: 8765,
openTimeoutMs: 1500,
heartbeatIntervalMs: 10000,
reconnectDelayMs: [0, 1000]
},
onMessage: async () => {},
getCapabilities: () => ({})
});

await conn.ensureConnected({ reason: "timeout-test", manual: false });
expect(conn.getState().phase).toBe("connecting");

// Advance past timeout
vi.advanceTimersByTime(1600);

// After failure with retry left:
expect(conn.getState().phase).toBe("idle");
expect(conn.getState().lastError?.code).toBe("bridge_open_timeout");
});
});
Loading
Loading