json config
Windsurf
Add a JSON config block to .windsurf/settings.json. Restart Windsurf and governance is live.
需要 API 密钥
您需要 Neptrix API 密钥才能完成此设置。API 密钥随托管测试版访问权限一同发放,托管平台目前处于封闭测试阶段。 加入等待名单以获取访问权限。
安装
- 1Copy the configuration below
- 2Create or open .windsurf/settings.json in your project root
- 3Replace YOUR_API_KEY with your key
- 4Restart Windsurf to apply
将此配置添加到
.windsurf/settings.json.windsurf/settings.json
1{2 "governance": {3 "preToolUse": {4 "endpoint": "https://qpthort-backend-production.up.railway.app/hooks/claude-code/pre-tool-use",5 "headers": {6 "x-api-key": "YOUR_API_KEY"7 }8 }9 }10}
将 YOUR_API_KEY 替换为您的 API 密钥。 加入等待名单以获取托管访问权限。
工作原理
1
智能体提议操作
在每次工具调用之前,您的智能体将提议的操作发送给 Neptrix 进行评估。
2
Neptrix 进行评估
宪法治理规则评估操作。决策被记录到您的审计追踪中。
3
返回决策
ALLOW、BLOCK、ESCALATE 或 MODIFY。智能体自动发现——无需注册。
