HJS Responsibility Protocol · v1.0 Beta
The HJS Responsibility Protocol defines four primitives with defined invariants.
{
"actor": "string",
"intent": "string",
"context": "string",
"timestamp": "ISO-8601"
}
Required Fields:{" "}
actor,{" "}
timestamp
A Judgment records a decision. It MUST include actor and timestamp.
API Example:
POST /judgment
{
"actor": "user_123",
"intent": "loan_approval",
"context": "production",
"timestamp": "2024-03-20T10:30:00Z"
}
Try in Console →
{
"from": "actor_id",
"to": "actor_id",
"scope": "string",
"expires_at": "ISO-8601"
}
Required:{" "}
from,{" "}
to
Delegation defines authority transfer. It MUST reference an existing Judgment.
API Example:
POST /delegation
{
"from": "user_123",
"to": "user_456",
"scope": "loan_approval",
"expires_at": "2024-04-20T10:30:00Z"
}
{
"reference": "judgment_id",
"terminated_at": "ISO-8601"
}
Termination ends responsibility. It MUST reference a valid Judgment or Delegation.
API Example:
POST /termination
{
"reference": "jgd_1771313790343osf2",
"terminated_at": "2024-03-20T11:30:00Z"
}
{
"structural_validity": "VALID|INVALID",
"delegation_depth": 0,
"termination_status": "active|terminated",
"anchor_status": "verified|none"
}
Verification is deterministic. Output is always VALID or INVALID.
Verification Example:
GET /verify/jgd_1771313790343osf2
{
"structural_validity": "VALID",
"delegation_depth": 2,
"termination_status": "active",
"anchor_status": "verified"
}
Verify in Lookup →
400
Bad Request
Missing required fields or invalid JSON format
401
Unauthorized
Invalid or missing API key
402
Payment Required
Insufficient balance for anchoring
404
Not Found
Record ID does not exist
429
Rate Limited
Too many requests, retry after 60s
500
Server Error
Internal server error, contact support
from hjs_client import HJSClient
client = HJSClient(api_key="your-key")
result = client.record_judgment(
entity="user",
action="test"
)
print(result.id)
const { HJSClient } = require('hjs-client');
const client = new HJSClient('your-key');
client.recordJudgment('user', 'test')
.then(record => console.log(record.id));
Verification evaluates:
Verification output is deterministic.