Agent Dispatch Delivery Evidence Judge

Agent Dispatch Delivery Evidence Judge

Capture terminal history and watched-file hashes before and after a message. The judge separates screen and file evidence, excludes unsent prompt text, and never treats an already-busy baseline as confirmed delivery.
#工程
評分
需要更多評價
已售出
0
使用方式
下載

A busy terminal is not proof that a message arrived. This read-only utility captures a pane and hashes selected files at two points, then compares transcript history and file contents independently.

The snapshot command can capture a terminal multiplexer pane or read a saved text capture for offline use. Repeat --watch for each relevant file. The judge command checks whether the sent message appears as a new history line, excludes text left in the final prompt, detects a busy baseline as inconclusive, and compares watched files by SHA-256 rather than modification time alone.

It reports DELIVERED only when new screen evidence and a watched-file change are both present. SCREEN_EVIDENCE_ONLY, FILE_EVIDENCE_ONLY, NO_EVIDENCE, and INCONCLUSIVE_BASELINE_BUSY remain separate results with distinct exit codes. JSON output is available for automation.

The tool does not send messages or modify watched files. It classifies supplied observations and cannot prove that a file change was caused by a message. Terminal captures can contain private data and should be stored accordingly.

Example output from the included fixture

Command:

python3 scripts/delivery_evidence_judge.py judge --before examples/before.json --after examples/after.json --message "Prepare the weekly summary now" --json

Output:

{
  "exit_code": 0,
  "files": {
    "added": [],
    "changed": [
      "examples/delivery_record.json"
    ],
    "evidence": true,
    "reason": "content_digest_changed",
    "removed": [],
    "unchanged": []
  },
  "screen": {
    "after_matches": 1,
    "baseline_matches": 0,
    "evidence": true,
    "reason": "message_history_line_increased",
    "state": "SCREEN_EVIDENCE"
  },
  "success_requires": "new screen evidence and changed watched-file evidence",
  "verdict": "DELIVERED"
}

Requirements

Python 3.10+; standard library only. A terminal multiplexer is optional when saved pane text is provided.