@mosvera/mcp 0.1.1 → 0.1.2

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 CHANGED
@@ -18,7 +18,7 @@ deterministic provider payloads that other tools can consume.
18
18
 
19
19
  The easiest path for non-command-line users is the Mosvera MCP Bundle:
20
20
 
21
- 1. Download `mosvera-mcp-0.1.1.mcpb` from the latest
21
+ 1. Download `mosvera-mcp-0.1.2.mcpb` from the latest
22
22
  [GitHub release](https://github.com/mosvera/mcp/releases).
23
23
  2. Double-click the file, drag it into Claude Desktop, or install it from
24
24
  Claude Desktop Settings → Extensions → Advanced settings → Install
@@ -144,7 +144,7 @@ npm run mcpb:inspect
144
144
  The MCPB pack step creates:
145
145
 
146
146
  ```text
147
- build/mosvera/mosvera-mcp-0.1.1.mcpb
147
+ build/mosvera/mosvera-mcp-0.1.2.mcpb
148
148
  ```
149
149
 
150
150
  ## Package Boundaries
package/dist/context.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { type LoadedProject, type RegistryDiagnostic, type Validator } from "@mosvera/runtime";
2
2
  import type { ToolContext } from "./types.ts";
3
- export declare const SERVER_VERSION = "0.1.1";
3
+ export declare const SERVER_VERSION = "0.1.2";
4
4
  export interface CliOptions {
5
5
  registryDir?: string;
6
6
  readOnlyMode: boolean;
package/dist/context.js CHANGED
@@ -12,7 +12,7 @@ import { loadProject, RegistryProjectError } from "@mosvera/runtime/node";
12
12
  import { fluxAdapter } from "@mosvera/provider-flux";
13
13
  import { openaiAdapter } from "@mosvera/provider-openai";
14
14
  import { sdxlAdapter } from "@mosvera/provider-sdxl";
15
- export const SERVER_VERSION = "0.1.1";
15
+ export const SERVER_VERSION = "0.1.2";
16
16
  function flagValue(argv, name) {
17
17
  const direct = argv.find((arg) => arg.startsWith(`${name}=`));
18
18
  if (direct !== undefined)
package/dist/server.js CHANGED
@@ -6,6 +6,8 @@
6
6
  // registry.
7
7
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
8
8
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
9
+ import { realpathSync } from "node:fs";
10
+ import { fileURLToPath } from "node:url";
9
11
  import { z } from "zod";
10
12
  import { buildContext, parseCliOptions, SERVER_VERSION } from "./context.js";
11
13
  import { documentKinds, runCompileDesignTokens, runCompileProviderPayload, runDeleteRegistryDocument, runDraftAesthetic, runGetRegistryDocument, runListAesthetics, runResolveAesthetic, runSaveAesthetic, runSaveRegistryDocument, runServerStatus, runValidateDocument, runValidateRegistry, runWriteMergeStrategies, } from "./tools/aesthetic.js";
@@ -164,7 +166,18 @@ async function main() {
164
166
  const server = createServer(ctx);
165
167
  await server.connect(new StdioServerTransport());
166
168
  }
167
- if (import.meta.url === `file://${process.argv[1]}`) {
169
+ function isDirectRun() {
170
+ if (!process.argv[1])
171
+ return false;
172
+ const modulePath = fileURLToPath(import.meta.url);
173
+ try {
174
+ return realpathSync(process.argv[1]) === realpathSync(modulePath);
175
+ }
176
+ catch {
177
+ return process.argv[1] === modulePath;
178
+ }
179
+ }
180
+ if (isDirectRun()) {
168
181
  main().catch((e) => {
169
182
  process.stderr.write(`mosvera-mcp failed to start: ${e instanceof Error ? e.stack : String(e)}\n`);
170
183
  process.exit(1);
@@ -2,7 +2,7 @@
2
2
  "manifest_version": "0.3",
3
3
  "name": "mosvera-mcp",
4
4
  "display_name": "Mosvera",
5
- "version": "0.1.1",
5
+ "version": "0.1.2",
6
6
  "description": "Resolve, compile, and save local Mosvera aesthetics from Claude Desktop.",
7
7
  "long_description": "Mosvera runs locally against your own aesthetic registry. It lets Claude list named aesthetics, resolve them to canonical Mosvera models, compile portable design tokens and CSS variables, and save registry documents without sending provider requests or storing secrets.",
8
8
  "author": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mosvera/mcp",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Run Mosvera as local MCP tools for agents, editors, and Claude Desktop.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -34,15 +34,15 @@
34
34
  }
35
35
  },
36
36
  "bin": {
37
- "mosvera-mcp": "./dist/server.js"
37
+ "mosvera-mcp": "dist/server.js"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "npm run clean && tsc -p tsconfig.build.json && node scripts/copy-example-registry.mjs",
41
41
  "ci": "npm run build && npm run typecheck && npm test",
42
42
  "clean": "rm -rf dist",
43
43
  "mcpb:stage": "npm run build && node scripts/stage-mcpb.mjs",
44
- "mcpb:pack": "npm run mcpb:stage && mcpb pack build/mcpb/mosvera build/mosvera/mosvera-mcp-0.1.1.mcpb",
45
- "mcpb:inspect": "node scripts/inspect-mcpb.mjs build/mosvera/mosvera-mcp-0.1.1.mcpb",
44
+ "mcpb:pack": "npm run mcpb:stage && mcpb pack build/mcpb/mosvera build/mosvera/mosvera-mcp-0.1.2.mcpb",
45
+ "mcpb:inspect": "node scripts/inspect-mcpb.mjs build/mosvera/mosvera-mcp-0.1.2.mcpb",
46
46
  "prepublishOnly": "npm run build && npm run typecheck && npm test",
47
47
  "start": "tsx src/server.ts",
48
48
  "test": "vitest run",