# 服务管理意图(含 WRITE 类,需确认后才会执行) intents: - intent: check_service_status description: 查看服务当前状态 risk_level: READ params: - name: service type: string required: true implementations: linux: command: "systemctl status {{service}} --no-pager || service {{service}} status" windows: command: "Get-Service -Name '{{service}}' | Select-Object Name,Status,StartType | ConvertTo-Json" - intent: restart_service description: 重启指定服务 risk_level: WRITE params: - name: service type: string required: true implementations: linux: command: "sudo systemctl restart {{service}}" windows: command: "Restart-Service -Name '{{service}}' -Force" - intent: stop_service description: 停止指定服务 risk_level: WRITE params: - name: service type: string required: true implementations: linux: command: "sudo systemctl stop {{service}}" windows: command: "Stop-Service -Name '{{service}}' -Force" - intent: start_service description: 启动指定服务 risk_level: WRITE params: - name: service type: string required: true implementations: linux: command: "sudo systemctl start {{service}}" windows: command: "Start-Service -Name '{{service}}'"