← 返回
未分类 中文

Judgment Event Protocol

Record and verify cryptographically signed, tamper-proof judgment, delegation, termination, and verification events for AI agent decision audits.
记录并验证加密签名、防篡改的判断、授权、终止和验证事件,用于 AI 代理决策审计。
schchit
未分类 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 348
下载
💾 0
安装
1
版本
#accountability#audit#ed25519#jep#judgment#latest#provenance

概述

name: judgment_event_protocol

description: Cryptographic event logging for autonomous agents. Record tamper-proof judgment, delegation, termination, and verification events using the Judgment Event Protocol. Provides verifiable decision trails with JCS canonicalization and Ed25519 signatures.

user-invocable: true

tags:

  • jep
  • judgment
  • delegation
  • provenance
  • audit
  • accountability
  • jcs
  • ed25519

metadata:

openclaw:

requires:

bins: [python3, pip]


Judgment Event Protocol (JEP)

You have a minimal, verifiable event logging system for AI agent decisions. Use it when you need to record judgments, delegate authority, terminate decision lifecycles, or verify existing events with cryptographic integrity.

Setup

pip install jep-protocol

Security Considerations

This skill handles cryptographic keys and external dependencies. Please observe the following practices to ensure safe usage:

  • 🔑 Private Key Management: Private keys should never be hardcoded in agent prompts, source files, or shared in conversations. Always store keys using a secure key manager (e.g., environment variables, secret management services, HSMs, or hardware tokens). The code examples below assume private_key and public_key are securely loaded from such a source.
  • 📦 Package Integrity: The jep-protocol PyPI package is open source. Verify its integrity by checking the source code at https://github.com/hjs-spec/jep. Consider pinning the package to a reviewed version hash in your dependency manager.
  • 🧪 Environment Isolation: Before integrating the library into production systems or granting access to sensitive keys, test it in an isolated environment (e.g., a Python virtual environment or a container).

When to Use This Skill

  • When you need to record an agent's decision for future audit
  • When you delegate a task to another agent and need proof of handoff
  • When you terminate a decision process and want to seal the record
  • When you need to verify the integrity of an existing event chain
  • When building accountability trails for compliance or debugging

Core Verbs

JEP defines four immutable verbs:

VerbNamePurpose
:-----:-----:--------
JJudgeInitiate a new decision or root audit event
DDelegateTransfer decision authority to another agent
TTerminateClose the decision lifecycle
VVerifyVerify authenticity of an existing event

Event Structure (JSON Example)

A minimal JEP event before signing:

{
  "jep": "1",
  "verb": "J",
  "who": "did:example:agent-123",
  "when": 1742345678,
  "what": "sha256:e8878aa9a38f4d123456789abcdef01234",
  "nonce": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "aud": "https://platform.example.com",
  "ref": null
}

Core Operations

Record a Judgment Event (J)

from jep import JEPEvent, Verb

# Assumes private_key is loaded from a secure source
event = JEPEvent(
    verb=Verb.J,
    who="did:example:agent-123",
    what="sha256:hash-of-decision-content",
    aud="https://platform.example.com"
)
receipt = event.sign(private_key)
print(receipt.to_json())

Record a Delegation Event (D)

event = JEPEvent(
    verb=Verb.D,
    who="did:example:agent-123",
    what="sha256:hash-of-delegation-details",
    aud="https://platform.example.com",
    ref="hash-of-parent-event"  # Link to previous event
)

Record a Termination Event (T)

event = JEPEvent(
    verb=Verb.T,
    who="did:example:agent-123",
    what=None,
    aud="https://platform.example.com",
    ref="hash-of-decision-chain-head"
)

Record a Verification Event (V)

event = JEPEvent(
    verb=Verb.V,
    who="did:example:verifier-456",
    what=None,
    aud="https://platform.example.com",
    ref="hash-of-target-event"
)

Verify an Existing Receipt

from jep import verify_receipt

result = verify_receipt(
    receipt_json,
    public_key,
    expected_aud="https://platform.example.com"
)

if result.valid:
    print("Signature valid, chain intact")
else:
    print(f"Verification failed: {result.error}")
    # Possible error codes:
    # - INVALID_SIGNATURE: Signature doesn't match
    # - REPLAY_DETECTED: Nonce already seen
    # - EXPIRED: Timestamp outside allowed window
    # - BROKEN_CHAIN: Parent event hash mismatch
    # - INVALID_AUDIENCE: aud field doesn't match expected value

Optional Privacy Extensions

JEP supports modular extensions for privacy and compliance:

ExtensionPurpose
:----------:--------
digest-onlyAnonymize actor identities with salted hashes
multisigRequire multiple signatures for distributed accountability
ttlAuto-expire events for data retention compliance
storageDecouple event storage from protocol for data sovereignty
subjectExplicitly reference decision subjects for traceability

Relationship to HJS and JAC

JEP is the foundational event format for the broader accountability stack:

LayerProtocolPurpose
:------:---------:--------
BaseJEPTamper-proof event recording (this skill)
ResponsibilityHJSHuman oversight and privacy protection
CausalityJACCross-agent judgment chain tracking

JEP events serve as the immutable data layer that HJS and JAC build upon. All three protocols share the same JSON canonicalization (JCS/RFC 8785) and signature scheme (JWS/RFC 7515).

Links

  • Protocol Documentation: https://github.com/hjs-spec
  • HJS Foundation: https://humanjudgment.org
  • 
    

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-07 17:24 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

JEP Guard

schchit
JEP Guard拦截高风险命令,要求用户确认,发放临时令牌,并记录操作生成可导出的审计凭证。
★ 1 📥 996

Determinability Checker

schchit
因果充分性确定性检查器——基于JEP论文CheckDeterminability算法的元技能守门员
★ 0 📥 336

JEP-Guard Audit

schchit
JEP‑Guard 审计技能 — 严格遵循 JEP‑04/JAC‑01 标准的审计链,配备友好的 API 接口
★ 0 📥 315