Files
ask262/package.json
bendtherules 627b80008e feat(langfuse): add opt-in Langfuse observability integration
Add Langfuse as an OTel trace transport for MCP request lifecycle tracking.

Changes:
- New src/lib/langfuse-transport.ts: initializes LangfuseSpanProcessor when
  ASK262_LANGFUSE_ENABLED=true with valid credentials
- src/lib/tracing.ts: add metadata to TraceContext, propagate it to child spans,
  use startActiveSpan for proper OTel context, add setupTracing() entry point,
  add getSessionMetadata() for version/transport metadata
- src/lib/logger.ts: include TraceContext.metadata in JSON log mixin
- src/mcp-server-{http,stdio}.ts: call setupTracing() at startup, pass
  version/transport metadata through withSpan/withSpanContext
- src/lib/fireworks-embeddings.ts: wrap API calls in withSpan() with gen_ai
  attributes for Langfuse generation/cost tracking
- .env.example: add LANGFUSE_* configuration variables
- AGENTS.md: document Langfuse integration
- package.json: add @langfuse/tracing, @langfuse/otel, @opentelemetry/sdk-node
2026-04-27 18:31:19 +05:30

83 lines
2.7 KiB
JSON

{
"name": "ask262",
"version": "0.0.15",
"mcpName": "io.github.bendtherules/ask262",
"description": "MCP server for understanding Javascript internals from ECMAScript specification. Provides vector search over the ECMAScript spec, section content retrieval, and JavaScript code execution with spec section tracing via engine262.",
"packageManager": "bun@1.2.8",
"engines": {
"bun": ">=1.0.0"
},
"type": "module",
"main": "src/mcp-server-stdio.ts",
"bin": {
"ask262": "src/mcp-server-stdio.ts",
"ask262-http": "src/mcp-server-http.ts"
},
"scripts": {
"type-check": "tsc --noEmit",
"lint": "biome check .",
"lint:fix": "biome check . --write",
"lint:fix:unsafe": "biome check . --write --unsafe",
"format:fix": "biome format . --write",
"ingest": "bun run src/setup/ingest.ts",
"verify-db": "bun run src/test/manual/verify-db.ts",
"test-evaluate": "bun run src/test/manual/test-evaluate-in-engine262.ts",
"test-evaluate-timeout": "bun run src/test/manual/test-evaluate-timeout.ts",
"test-search-spec-sections": "bun run src/test/manual/test-search-spec-sections.ts",
"test-mcp-server": "bun run src/test/manual/test-mcp-server.ts",
"ask262-stdio": "bun run src/mcp-server-stdio.ts",
"ask262-http": "bun run src/mcp-server-http.ts",
"ask262-inspector": "bunx @modelcontextprotocol/inspector --transport http --server-url http://localhost:$(bun -e 'console.log(process.env.ASK262_PORT || \"8081\")')/mcp",
"test": "ASK262_LOG_CONSOLE=true ASK262_LOG_LEVEL=warn bun test",
"prepublish": "npm run type-check && npm run lint && npm pack --dry-run",
"release": "bash scripts/release.sh --patch"
},
"keywords": [
"mcp",
"mcp-server",
"model-context-protocol",
"ecmascript",
"javascript",
"engine262",
"specification",
"js-engine"
],
"author": "",
"license": "ISC",
"files": [
"src/",
"storage/",
"engine262/lib/engine262.mjs",
"AGENTS.md",
"README.md"
],
"dependencies": {
"@lancedb/lancedb": "^0.5.0",
"@langchain/community": "0.2.0",
"@langchain/core": "^0.2.0",
"@langchain/ollama": "^0.1.0",
"@langchain/openai": "^0.1.0",
"@langfuse/otel": "^5.2.0",
"@langfuse/tracing": "^5.2.0",
"@mcp-use/inspector": "^2.1.0",
"@modelcontextprotocol/sdk": "^1.0.4",
"@opentelemetry/api": "^1.9.1",
"@opentelemetry/sdk-node": "^0.215.0",
"acorn": "^8.16.0",
"cheerio": "^1.2.0",
"commander": "^14.0.3",
"glob": "^13.0.6",
"graphology": "^0.26.0",
"hono": "^4.12.14",
"langchain": "^0.2.0",
"ora": "^9.3.0",
"pino": "^10.3.1",
"pino-pretty": "^13.1.3"
},
"devDependencies": {
"@biomejs/biome": "^2.4.9",
"bun-types": "^1.3.11",
"typescript": "^6.0.2"
}
}