feat: 完善 N7 智能座舱交互与控制链路
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
|
||||
namespace cognitive_agent_can_protocol {
|
||||
|
||||
inline constexpr std::string_view kProtocolVersion = "1.0.0";
|
||||
inline constexpr std::string_view kProtocolSourceSha256 = "cfb7a7eb28d14a82da70d44efece7f045a7a87a4cd549d7537dc00438c297e6e";
|
||||
inline constexpr std::string_view kProtocolVersion = "1.0.1";
|
||||
inline constexpr std::string_view kProtocolSourceSha256 = "b597439d69fb292c0aa22c9db383a74f426c945cf0cca8ae492dde3e4d848051";
|
||||
|
||||
struct FrameMetadata {
|
||||
std::string_view rule_id;
|
||||
@@ -88,7 +88,7 @@ inline constexpr std::array<RuleMetadata, 27> kRules{{
|
||||
RuleMetadata{"can1.door.rear_lock", 1, "door", "door.set_rear_lock", "door rear <lock|unlock>", ""},
|
||||
RuleMetadata{"can1.window.motion", 1, "window", "window.set_motion", "window <all|front|rear|front-left|front-right|rear-left|rear-right> <open|close|stop>", ""},
|
||||
RuleMetadata{"can1.window.position", 1, "window", "window.set_position", "window <front-left|front-right|rear-left|rear-right> position <0-100>", "window_position"},
|
||||
RuleMetadata{"can1.climate.power", 1, "climate", "climate.set_power,climate.set_ac", "ac <on|off>", ""},
|
||||
RuleMetadata{"can1.climate.power", 1, "climate", "climate.set_power", "ac <on|off>", ""},
|
||||
RuleMetadata{"can1.climate.fan", 1, "climate", "climate.set_fan_level", "ac fan <1-7>", ""},
|
||||
RuleMetadata{"can1.climate.mode", 1, "climate", "climate.set_outlet_mode", "ac mode <face|face-feet|feet|feet-defrost|defrost|face-feet-defrost|face-defrost>", ""},
|
||||
RuleMetadata{"can1.climate.temperature", 1, "climate", "climate.set_temperature", "ac temp <driver|passenger|rear> <18-32>", ""},
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
"""Run the repository's Node-based checks with a portable runtime lookup."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def find_node() -> str:
|
||||
explicit = os.environ.get("NODE")
|
||||
candidates = [
|
||||
explicit,
|
||||
shutil.which("node"),
|
||||
Path.home() / ".cache" / "codex-runtimes" / "codex-primary-runtime" / "dependencies" / "node" / "bin" / "node.exe",
|
||||
Path.home() / ".cache" / "codex-runtimes" / "codex-primary-runtime" / "dependencies" / "node" / "bin" / "node",
|
||||
Path(os.environ.get("ProgramFiles", "")) / "nodejs" / "node.exe",
|
||||
]
|
||||
for candidate in candidates:
|
||||
if candidate and Path(candidate).is_file():
|
||||
return str(candidate)
|
||||
raise SystemExit(
|
||||
"Node.js was not found. Install Node.js or set NODE to the executable path."
|
||||
)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
if len(sys.argv) < 2:
|
||||
raise SystemExit("usage: python tools/run_node.py <node arguments...>")
|
||||
return subprocess.run([find_node(), *sys.argv[1:]], check=False).returncode
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user