Skip to main content
Glama

DSH Plugin Toolkit

5계층 돌파 인프라 + 플러그인 루프 개발 파이프라인. 핵심은 제로 런타임 의존성; Bridge 레이어는 공식 @modelcontextprotocol/sdk 기반.

5계층 아키텍처 (v2)

계층

디렉터리

설명

L1 MCP Bridge

src/bridge/

공식 MCP SDK McpServer.registerTool + StdioServerTransport, Claude/Cursor 등 모든 MCP 클라이언트와 네이티브 호환; server-lite.ts는 의존성 없는 수제 버전 유지

L2 A2A Cards

src/a2a/

Google A2A Protocol v1.0 규격에 정렬; dsh a2a serve는 @a2a-js/sdk 기반으로 실제 A2A Server(JSON-RPC + REST, 스킬 레벨 라우팅)를 시작

L3 Loop Engineering

src/loop/

6개 검증기 + 3차원 휴리스틱 자기비판 + 선형 백오프 재시도 (단위 테스트 커버리지 있음)

L4 Cost Governance

src/cost/

3계층 예산 상태 머신 OK→WARNING→CRITICAL→EXCEEDED, 초과 시 CostExceededError를 던져 차단

L5 Multi-Agent Demo

src/demo/、src/agents/

시드 PRNG 결정적 오케스트레이션, 4단계 병렬 스케줄링

플러그인 발견 3단계 폴백: 전체 cordis.yml → 런타임 수량만(count-only) → 소스 정규식 추출(regex). 모든 도구는 통일된 계약을 공유: MCP 입력 { input_data: string }.

Related MCP server: JMT x402 MCP Server

빠른 시작

npm install
npm run build          # 编译核心 + 全部插件

npx dsh list           # 列出发现的插件与工具
npm test               # 单元测试 (node:test, 9 cases)
npx dsh bridge         # 启动官方 SDK MCP stdio 服务器
npx dsh a2a gen        # 生成 a2a-cards/*.agent-card.json (A2A v1.0)
npx dsh a2a serve      # 启动真实 A2A v1.0 服务器 (:41241)
npx dsh llm models     # 列出本地 Ollama 模型(免费推理)
npx dsh llm ask "..."  # 本地 LLM 生成 + L3 验证循环
npx dsh demo carbon [--llm]  # L5 多Agent Demo(--llm 用本地 Ollama 真实合成)
npx dsh serve [port]   # REST 网关: POST /invoke,API-Key 计费 + 限流 (:8787)
npx dsh registry gen   # 市场目录: registry.json + index.html

내장 플러그인 (20개)

재무: invoice-calc / loan-calc / invest-growth / salary-tax / fx-rates 데이터 및 개발: csv-stats / json-format / regex-lab / codec-kit / text-diff / date-math 콘텐츠 및 마케팅: seo-audit / text-summary / readability / markdown-report 생활 도구: health-metrics / unit-convert / color-kit / pass-forge 수직 산업: carbon-baseline

루프 개발 새 플러그인

npx dsh scaffold my-tool   # 生成 plugins/dsh-tool-my-tool/
npm run build              # 编译后即刻被 Bridge/A2A/Demo 发现
npx dsh list               # 验证

생성된 src/index.ts에서 handler를 구현: 입력 input_data: string, 문자열 반환. 출력 끝에 면책 조항을 포함하면 모든 검증기를 통과할 수 있습니다.

예산 구성

프로젝트 루트에 dsh.budget.json을 배치:

{ "monthly": 5000000, "user": 200000, "plugin": 50000 }

구성하지 않으면 제한 없음 (사용량만 추적).

배포 경로

  • MCP 마켓: npm pack 후 stdio 방식으로 Claude Desktop / Cursor 등 MCP 클라이언트에 연결 (진입점 dist/bridge/server.js, 공식 SDK 구현); npx @modelcontextprotocol/inspector node dist/bridge/server.js로 디버깅 가능

  • Koishi 플러그인 마켓: npx dsh pack <plugin>로 마켓 진입 규격에 맞는 배포 패키지 생성 (koishi-plugin-* 명명, peerDependencies.koishi, koishi 메타데이터 필드), cd publish/<name> && npm publish로 바로 등록

  • A2A 레지스트리: a2a-cards/는 Google A2A v1.0 규격과 직접 호환, 공식 @a2a-js/sdk ClientFactory로 사용 가능

CI

.github/workflows/ci.yml: build → 단위 테스트 → 발견/A2A/pack 스모크 → MCP 프로토콜 스모크 → 결정적 검증.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers