Godopu
5258b5013c
feat(lib): implement FW-N1~FW-N4 items and pane snapshot guidelines
2026-06-21 09:19:46 +00:00
Godopu
8097df0cbe
feat(lib): SQLite DB normalization (FW-L3) & stop semantics simplification (FW-L2)
2026-06-21 09:05:52 +00:00
Godopu
478be56679
fix(lib): hardening and edge-case bugfixes (FW-12, FW-16 round)
...
- Restored .bak generation to maintain P0-B backup invariants
- Fixed stale NFS warning message to reflect SQLite DELETE fallback
- Replaced vulnerable yaml.replace with os.path.splitext globally
- Ensured YAML dump occurs after conn.commit() to prevent partial syncs
- Re-applied chmod 0600 on SQLite -wal and -shm files
2026-06-21 08:43:06 +00:00
Godopu
9b797a5c8c
feat(lib): migrate to SQLite WAL backend for robust concurrency (FW-L1)
...
- Replaces python fcntl.flock with SQLite BEGIN IMMEDIATE.
- Status/Reconcile read from SQLite SSOT, with YAML fallback.
- Explicitly documented tradeoff: YAML is no longer a real-time view.
- Handles PRAGMA wal_checkpoint(TRUNCATE) safely outside transactions.
2026-06-21 08:35:07 +00:00
Godopu
7d925de00d
fix(monitor): add status enum docs + subscribe security warning (FW-09, FW-15)
...
FW-09: SKILL.md defines valid last_visible_status values (running/stopped/
terminated/archived). reconcile.sh now sets last_visible_status to
'running' and uses last_visible_note for free-form comments.
FW-15: SKILL.md adds Security section for --subscribe on public brokers.
Documents wildcard subscription risks, auto-kill spoofing, HMAC
verification mitigation, and recommends --once/polling for PoC.
2026-06-21 06:37:28 +00:00
Godopu
50b2b201b8
refactor(skills): rename tmux-agent-orchestrate-delete -> stop (step 1)
...
User decision: 2-step approach (Step 1 = simple rename, Step 2 = option
redefinition in a separate round).
Changes (mechanical, history preserved):
- skills/tmux-agent-orchestrate-delete/ -> skills/tmux-agent-orchestrate-stop/ (git mv)
- scripts/delete_session.sh -> scripts/stop_session.sh (git mv)
- sed s/orchestrate-delete/orchestrate-stop/g + delete_session.sh->stop_session.sh
across 7 files (0 residual of either pattern)
- SKILL.md frontmatter 'name' -> tmux-agent-orchestrate-stop
- related_skills / companion refs in create/status/monitor/resume SKILL.md updated
NOT in this commit (deferred to step 2):
- Option redefinition (--purge-conversation, --mode soft clarification)
- Deprecation shim (external consumers = 0, no need)
6-route surface preserved (create/resume/stop/status/monitor + delegate-job).
Verified on isolated server -L claude-rename-step1-test (kill-server after):
- syntax PASS (all .sh + py_compile)
- E2E via renamed stop_session.sh: capture-id records id + status=stopped,
status.sh renders it (DRIFT=-), idempotency exit 0
- 0 stale 'tmux-agent-orchestrate-delete' / 'delete_session' references
- git history preserved (rename detected as R)
- Global skill untouched; real YAML + main canary -L multi-agent-canary untouched
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-20 15:48:27 +00:00
Godopu
a2d4f80608
fix(monitor,resume): honor stopped status + clear stop metadata on resume
...
Implements user choice Option B: the two follow-ups to 0de0f23 , in one patch.
Changes:
- skills/tmux-agent-orchestrate-monitor/scripts/reconcile.sh:
- drift-A skip-set extended: ('terminated', 'archived', 'stopped')
- prevents the monitor from overwriting a tmux-dead 'stopped' row with
'terminated (auto-detected)', which would lose resumable + captured id
- skills/tmux-agent-orchestrate-resume/scripts/update_yaml_resumed.sh:
- pop stopped_at, stopped_at_epoch, stop_reason, resumable on resume
(alongside the existing terminated_at*/termination_mode/archived_at) so a
resumed row has no stale end-of-session metadata
- skills/tmux-agent-orchestrate-monitor/SKILL.md: documented 'stopped' in the
drift class list + a skip-set note on drift class A
- skills/tmux-agent-orchestrate-resume/SKILL.md: documented stopped -> running
transition + tier-1 race-free resume path
5-route surface preserved (no new directory). delete_session.sh untouched.
Verified on isolated server -L claude-followup-test (kill-server after):
- syntax PASS
- E2E A: stop -> tmux dead -> reconcile --once -> status stays 'stopped'
- E2E B: resume -> stopped_at/stopped_at_epoch/stop_reason/resumable all gone
- E2E C: plain delete -> terminated, reconcile leaves it (no regression)
- Real YAML + main canary untouched
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-20 15:32:02 +00:00
Godopu
cd9eec112d
refactor(skills): make skills portable across users/locations via workspace-relative paths + env var overrides
...
Changes:
- skills/lib.sh:
- HOME_DIR default changed from $HOME to <workspace_root> (workspace self-sufficient)
- Added CLAUDE_PROJECT_DIR / LOCAL_BIN env var pattern (default $HOME, overridable)
- skills/tmux-agent-orchestrate-monitor/scripts/reconcile.sh:
- STATE_DIR moved from $HOME/.cache/... to <workspace>/.cache/tmux-agent-orchestrate-monitor
- skills/tmux-agent-orchestrate-create/scripts/create_session.sh:
- WRAPPER uses $LOCAL_BIN env var (default $HOME/.local/bin)
- 6 SKILL.md: examples and explanations updated to mention env var override capability
User/portability contract:
- Workspace-internal data: .hermes/ + .cache/ (moves with workspace)
- User/system data: $HOME/* (overridable via CLAUDE_PROJECT_DIR, LOCAL_BIN)
- All env vars follow: ${VAR:-default} pattern with documented defaults
Verified on isolated server -L agy-homeport-test (kill-server after):
- syntax check PASS
- E2E: defaults resolve to workspace-relative paths
- E2E: env var override correctly changes paths
- 0 leftover direct $HOME references in code
- Global skill non-interference verified
- Main isolated server -L multi-agent-canary untouched
2026-06-20 05:39:27 +00:00
Godopu
ad7be264e7
refactor(skills): convert absolute paths to workspace-relative + relocate agent-sessions.yaml to .hermes/
...
Changes:
- skills/lib.sh: AGENT_SESSIONS_YAML default moved from ~/PuKi/lab/.../agent-sessions.yaml
to <workspace_root>/.hermes/agent-sessions.yaml (relative via BASH_SOURCE)
- 6 SKILL.md: descriptions + 'Single source of truth' lines updated to .hermes/agent-sessions.yaml
- 6 SKILL.md: bash examples (~/PuKi/lab/agent_sessions/skills/...) → relative paths
- SKILL.md file:// links converted from absolute to relative (resolves workspace tool warnings)
- tmux-agent-orchestrate-create/SKILL.md: removed outdated wrapper template reference
- lib.sh internal comments: removed /home/godopu16/PuKi/lab example
- All scripts: internal source/path references use relative resolution
Verified on isolated server -L agy-relative-path-test (kill-server after):
- syntax check PASS
- E2E: create_session.sh auto-creates .hermes/agent-sessions.yaml at new location
- status.sh reads new location correctly
- 0 leftover absolute path references
- Global skill non-interference verified
- Main isolated server -L multi-agent-canary untouched
2026-06-19 23:41:05 +00:00
Godopu
e8eebe5eb1
feat(tmux-agent-orchestrate-monitor): integrate watchdog pattern as skill
...
Moved /tmp/subscriber-watchdog.sh → skills/tmux-agent-orchestrate-monitor/scripts/watchdog.sh
(skill-managed lifecycle, no longer lives outside workspace).
Added lib.sh::start_watchdog() helper:
- Spawns watchdog as background nohup process
- Writes watchdog log to .hermes/jobs/<JID>.watchdog.log
- Returns watchdog PID via stdout
Wired create_session.sh --submit-job to auto-start watchdog after JOB registration.
Fixes:
- Bug: registry.py get first-line parse was fragile (empty status → infinite loop)
→ Now uses python3 json.load for robust parsing
- Bug: old path skills/delegate-job/scripts/job_subscriber.py hardcoded
→ Now uses skills/tmux-agent-orchestrate-delegate-job/scripts/job_subscriber.py
Verified on isolated server -L agy-watchdog-skill-test (kill-server after):
- Syntax check PASS
- E2E: register job → start watchdog → publish completed → watchdog exits
- Global skill non-interference verified
- Main isolated server -L multi-agent-canary untouched
2026-06-19 23:33:46 +00:00
Godopu
e9fc763d31
refactor(skills): rename multi-agent-* + agent-sessions-monitor + delegate-job to tmux-agent-orchestrate-*
...
Renamed 6 skills directories to tmux-agent-orchestrate-* prefix:
- multi-agent-create → tmux-agent-orchestrate-create
- multi-agent-resume → tmux-agent-orchestrate-resume
- multi-agent-delete → tmux-agent-orchestrate-delete
- multi-agent-status → tmux-agent-orchestrate-status
- agent-sessions-monitor → tmux-agent-orchestrate-monitor
- delegate-job → tmux-agent-orchestrate-delegate-job
Updated:
- skills/lib.sh internal paths (delegate_submit_job etc.)
- skills/tmux-agent-orchestrate-status/scripts/status.sh (monitor path)
- skills/tmux-agent-orchestrate-monitor/scripts/reconcile.sh
- .gitignore (HTML ignore patterns)
- 6 SKILL.md frontmatter (name, related_skills, prereq_skills) and body
- All script headers and Korean comments
Notes:
- tmux session naming convention unchanged (<slug>-creator-<agent>) — workspace identifier based, kept for backward compatibility
- Existing 2 sessions in -L multi-agent-canary untouched
- YAML delegate_job_id / agent-session (tmux:canary-...) preserved for log history compatibility
Verified on isolated server -L agy-rename-test (kill-server after).
2026-06-19 23:27:27 +00:00