Files
operations/package.json
glm-5.1 3e1884cd23 feat: add SchemaAdapter system for typemap integration (Zod/Valibot), fix scanner pathToFileURL
- Add from_typemap.ts with SchemaAdapter interface, defaultAdapter, zodAdapter(), valibotAdapter()
- OperationRegistry now accepts optional { schemaAdapter } config; default is TypeBox passthrough
- Adapters use @alkdev/typemap (optional peer dep) with lazy init; detect schemas via ~standard vendor protocol
- Fix scanner pathToFileURL to encode URI components and normalize Windows backslashes
- Add from-typemap sub-path export in package.json and tsup config
- Add test suite covering defaultAdapter, zodAdapter, valibotAdapter, and registry integration
2026-05-16 09:24:34 +00:00

96 lines
2.1 KiB
JSON

{
"name": "@alkdev/operations",
"version": "0.1.0",
"description": "Typed operations registry, call protocol, and adapters (MCP, OpenAPI)",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"./from-mcp": {
"import": {
"types": "./dist/from-mcp.d.ts",
"default": "./dist/from-mcp.js"
},
"require": {
"types": "./dist/from-mcp.d.cts",
"default": "./dist/from-mcp.cjs"
}
},
"./from-typemap": {
"import": {
"types": "./dist/from-typemap.d.ts",
"default": "./dist/from-typemap.js"
},
"require": {
"types": "./dist/from-typemap.d.cts",
"default": "./dist/from-typemap.cjs"
}
}
},
"publishConfig": {
"access": "public"
},
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"build:tsc": "tsc --noEmit",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"lint": "tsc --noEmit",
"prepublishOnly": "npm run build"
},
"keywords": [
"operations",
"registry",
"call-protocol",
"mcp",
"openapi",
"typebox"
],
"license": "MIT OR Apache-2.0",
"dependencies": {
"@alkdev/pubsub": "^0.1.0",
"@alkdev/typebox": "^0.34.49",
"@logtape/logtape": "^2.0.0"
},
"peerDependencies": {
"@alkdev/typemap": "^0.10.0",
"@modelcontextprotocol/sdk": "^1.0.0"
},
"peerDependenciesMeta": {
"@modelcontextprotocol/sdk": {
"optional": true
},
"@alkdev/typemap": {
"optional": true
}
},
"devDependencies": {
"@alkdev/typemap": "^0.10.1",
"@modelcontextprotocol/sdk": "^1.12.1",
"@types/node": "^22.0.0",
"@vitest/coverage-v8": "^3.2.4",
"tsup": "^8.5.1",
"typescript": "^5.7.0",
"valibot": "^1.4.0",
"vitest": "^3.1.0"
},
"engines": {
"node": ">=18.0.0"
}
}