LXC deployment: live config for agentd-01, oregon rollback config, win10 helpers and board protocol in the repo

- config/agentd.yaml is now the agentd-01 live config (state /var/lib/plane-agentd, logs /var/log/plane-agentd);
  config/agentd.oregon.yaml keeps the oregon dispatcher settings for rollback (cron/agentd-tick.sh uses it).
- cron/agentd-tick-lxc.sh: the LXC cron entry.
- tools/win10/: win10-ps.sh / win10-put.sh (vault client dir via AGENT_ACCESS_HOME); relative helpers_dir
  resolves against the repo, default tools/win10.
- config/protocols/gwent-board-protocol.md: copy of gwent/design/board-protocol.md used in prompts.
- agentd.log_dir (default state_dir).
- smoke --watch: create the item and wait for the scheduled dispatcher instead of ticking locally.
This commit is contained in:
jj.wang
2026-10-21 11:56:15 +00:00
parent 4f45d368ad
commit 27ea9119a5
12 changed files with 230 additions and 20 deletions
+4 -3
View File
@@ -17,8 +17,9 @@ class Busy(Exception):
class Store:
def __init__(self, state_dir, echo=True):
def __init__(self, state_dir, echo=True, log_dir=None):
self.dir = Path(state_dir)
self.log_dir = Path(log_dir) if log_dir else self.dir
self.echo = echo
self.path = self.dir / "agentd-state.json"
@@ -59,9 +60,9 @@ class Store:
self._atomic_write(self.dir / "heartbeat.json", info)
def log(self, msg):
self.dir.mkdir(parents=True, exist_ok=True)
self.log_dir.mkdir(parents=True, exist_ok=True)
line = time.strftime("%Y-%m-%dT%H:%M:%S") + " " + msg
if self.echo:
print(line, flush=True)
with open(self.dir / "agentd.log", "a", encoding="utf-8") as fh:
with open(self.log_dir / "agentd.log", "a", encoding="utf-8") as fh:
fh.write(line + "\n")