소스 정보
- 저장소
- lukemcqueen/hermes-cortex
- 최근 소스 활동
- 2026년 8월 18일 19:45
- 감지된 SKILL.md 언어
- 영어
- 스타
- 4
- 포크
- 1
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/lukemcqueen/hermes-cortex --skill bus-archive-diagnostics명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
| name | bus-archive-diagnostics |
| description | Query bus queues and archives reliably for fleet results. |
| version | 1.0.0 |
| author | Hermes Agent |
| license | MIT |
| platforms | ["linux","macos"] |
| metadata | {"hermes":{"tags":["bus","pgmq","archives","diagnostics","sql","fleet","verification"],"related_skills":["fleet-commands","cortex-bus","mcp-health-monitoring"]}} |
Reliable read-side queries against the Agent Bus PGMQ store — the patterns for
peeking queues, extracting result payloads, and verifying fleet command
outcomes without hitting the two silent traps that waste queries: the
double-encoded body column and raw-string rows that crash unguarded casts.
bus.messages / bus.archives via psql (docker exec into
mycortex-postgres)body is double-encoded. The envelope object's body field is a JSON
string, not an object. ->'body' yields a jsonb string node — any
->>'field' on it returns NULL silently. Correct extraction:
((body::jsonb #>> '{}')::jsonb->>'body')::jsonb->>'success'
(unwrap to text with ->>'body', then ::jsonb parses, then read fields).body is a bare string (e.g. a literal PING). The double-parse
(body::jsonb #>> '{}')::jsonb on such a row throws
invalid input syntax for type json: Token "PING" and kills the whole
query. Always put jsonb_typeof(body::jsonb)='object' as the FIRST WHERE
clause — AND short-circuits left-to-right per row, so the guard prevents
the cast from ever evaluating on non-object rows.-- UPDATE_RESULTs from the last N minutes (correct inner-body extraction):
SELECT archived_at::timestamptz(0),
(body::jsonb #>> '{}')::jsonb->>'correlation_id',
COALESCE(((body::jsonb #>> '{}')::jsonb->>'body')::jsonb->>'success',''),
COALESCE(((body::jsonb #>> '{}')::jsonb->>'body')::jsonb->>'git_sha_after','')
FROM bus.archives
WHERE jsonb_typeof(body::jsonb)='object' -- guard FIRST
AND (body::jsonb #>> '{}')::jsonb->>'subject'='UPDATE_RESULT'
AND archived_at > NOW() - INTERVAL '30 minutes'
ORDER BY archived_at;
-- Live queue state for a correlation batch:
SELECT queue_name, state,
(body::jsonb #>> '{}')::jsonb-
bus.messages
jsonb_typeof(body::jsonb)
(body::jsonb # )::jsonb
queue_name;
psql via docker exec on your own host may hit the local mycortex-postgres
(15432), which is a REPORTS MIRROR, never authoritative — queue state there
can be stale or empty while the live bus (CORTEX_BUS_URL, e.g.
https://host:13004) has the real messages. The hc CLI routes over HTTP to
the ACTIVE bus — use hc inbox <agent> (peek), hc status, hc bus --all
for authoritative reads. (Archives do replicate to the mirror, so archive
queries via psql are generally trustworthy.)
Fleet handlers early-archive the request before processing, so a consumed
UPDATE_REQUEST proves only that it was READ — never that the update ran or
that a result was sent. The UPDATE_RESULT response path has failed silently on
fleet hosts while the updates themselves landed (2026-08-18: 5/5 requests
consumed, 0/5 results, joseph fully updated at the target SHA). Ground
truth when results are missing: hc exec <agent> cortex-doctor.py --quiet
(greps: Repo sync, Deploy sync, Checksum: <changed file>) — the EXEC
round-trip uses a different code path and often works when the UPDATE result
send failed. Deploy sync: deployed commit matches HEAD + a passing checksum
for the shipped file = the update landed, response lost.
hc exec polls ~5 min and can time out right before a result lands — for
slow agents, prefer hc send <agent> EXEC '<json>' --self-tested then poll
archives after ~5.5 min (decoupled pattern).success: false with a doctor dump that shows only ✅ lines =
the doctor exited non-zero on WARNINGS (Overall: WARNING), not a failed run.exit=1 with empty stderr from a fleet update is the known
"soft success" (needs_update() returns 1 for unchanged files) — check
git_sha_after == target_sha, not the exit code.bus.messages (live) and bus.archives — results are
consumed+archived by the orchestrator's own handler within minutes.