1
0
1
0
1
1
1
0
1
0
1
0
0
1
0
1
1
1
0
0
📚

SDK API 文档

v3.1.0

完整的API参考、参数说明和代码示例 · 共 9 个核心接口

🔍
5
Client
2
AI
2
Engines
2
Security
4
Systems
client

KGPClient

new KGPClient(options: KGPClientConfig)

KGP协议核心客户端,管理WebSocket连接、REST API调用、事件订阅

▼
client

connect()

async connect(): Promise<void>

建立WebSocket连接到KGP服务器,初始化心跳机制

▼
client

knockOnLand()

async knockOnLand(coords, intent, options?): Promise<KnockSession>

向目标坐标的土地发起敲门请求,返回会话对象

▼
client

respondToKnock()

async respondToKnock(sessionId, response): Promise<void>

响应收到的敲门请求(接受或拒绝)

▼
client

on()

on(event: string, handler): () => void

订阅KGP事件通知

▼
client

getLandData()

async getLandData(coords): Promise<LandData>

查询指定坐标的土地信息(所有者、主题、建筑等)

▼
AI

AthenaAIThemeEngine

new AthenAIThemeEngine(config?: AthenaConfig)

AI主题引擎,通过GPT-4o将自然语言描述转换为CSS主题配置

▼
Engines

ProceduralMazeGenerator

new ProceduralMazeGenerator(config?)

程序化迷宫生成器,支持6种主题、4种难度、Boss房间

▼
Security

DistributedRateLimiter

new DistributedRateLimiter(redisOptions, config?)

Redis分布式限流器,支持集群环境下的原子操作和本地降级

▼

🔗 相关资源

  • GitHub 仓库
  • npm 包页面
  • 变更日志 (Changelog)
  • 问题反馈 (Issues)

📖 更多文档

  • 开发者控制台 →
  • 主题市场 →
  • 设计规范文档
  • 安全最佳实践

💬 获取帮助

  • Discord 社区
  • Stack Overflow 标签
  • 邮件支持: dev@land-pioneer.com
  • API 状态页