OpenClaw / Longju Adapter Note

May 25, 2026 ยท View on GitHub

This is a docs-only adapter note.

It does not change runtime behavior, add SACP as a dependency, or claim that OpenClaw or Longju have official SACP support.

Adapter Summary

Project: OpenClaw-style local workspace / Longju local operator
Native concept: local task dispatch, worklog, evidence brief, and `.sacp/` shadow ledger
SACP target: SACP/0.1 receipt plus optional Receipt Chain extensions
Adapter status: docs-only example

This note maps a local agent task or worklog into a SACP receipt so completion claims can be audited for claims, evidence, next owner, and human approval boundary.

Native Flow

The public-safe Longju adoption case used this local flow:

human dispatch -> handoff -> attempt -> evidence -> receipt -> next owner

In an OpenClaw-style workspace, this can remain file-based:

.sacp/
  handoffs/
  attempts/
  evidence/
  receipts/
  snapshots/
  memory-candidates/
  skill-candidates/

SACP does not require this directory layout. It only needs the final receipt to preserve enough state for audit and handoff.

Field Mapping

Native field or conceptSACP fieldNotes
human dispatch id / task file pathhandoff_idStable idempotency key for the work request.
dispatch body hash / source snapshotsource_fingerprintUsed to distinguish duplicate handoff from changed-source rework.
attempt packetattempt_idNew attempt under the same handoff for retry or reassignment.
local operator nameagent_idExample: Longju, OpenClawAgent, or a specific worker name.
worklog completion claimclaims[]Split summary into auditable claims. The worklog is not evidence by itself.
command output / diff / evidence briefclaims[].source_id + verification.evidence_idTool and command outputs can support tool_result claims.
runtime guard gateverification.methodExample: PostTask receipt gate or public-safe local trial review.
.sacp/receipts/<id>.yamlreceipt file pathStorage location is local convention, not core protocol.
next assigned reviewer / humannext_ownerMust be concrete.
release, memory, or skill approval gatehuman_decision_required + extensions.sacp.chain.decisionsDurable promotion or risky side effects should require approval evidence.
local checkpoint / context snapshotextensions.sacp.chain.checkpointPointer to local snapshot or checkpoint; does not change core fields.

Minimal Receipt

protocol: SACP/0.1
type: receipt
method: COMPLETE
status_code: 200
handoff_id: hf_longju_public_safe_trial
attempt_id: attempt_001
agent_id: Longju
claims:
  - text: "The false-completion trial returned 412 missing_evidence."
    claim_type: tool_result
    source_id: ev_public_safe_core_trials
    support_status: supported
  - text: "The duplicate-handoff trial returned 204 no_action_needed."
    claim_type: tool_result
    source_id: ev_public_safe_core_trials
    support_status: supported
verification:
  status: passed
  method: "public-safe local trial review"
  evidence_id: ev_public_safe_core_trials
residual_risk: "This receipt describes one local setup; it does not prove universal agent safety."
next_owner: Human
human_decision_required: false
extensions:
  vendor.openclaw.workspace: local_workspace_path
  vendor.longju.ledger: .sacp
  sacp.chain.profile: sacp-chain
  sacp.chain.project: longju_public_safe_trials
  sacp.chain.module: runtime_guard
  sacp.chain.checkpoint: snapshot_public_safe_core_trials
  sacp.chain.evidence:
    - ev_public_safe_core_trials
  sacp.chain.stop_rule: "Stop before external action, memory promotion, or skill promotion unless approval evidence exists."

Dirty Cases To Test Before Claiming Support

Dirty caseExpected SACP result
Worklog says "done" but no receipt exists400 invalid_packet
Worklog says "tests passed" with no command output412 missing_evidence
Same handoff and same source are processed twice409 duplicate_handoff or link existing receipt
Same handoff arrives with changed source_fingerprint202 accepted_processing and rework
Attempt expires without a receipt504 lease_expired and new attempt under same handoff
Memory or skill promotion lacks approvalhuman_decision_required: true

Claim Boundary Rules

  • A worklog summary is not evidence by itself.
  • A user instruction remains a user_statement unless external evidence exists.
  • Model reasoning remains inference unless retrieved or tool evidence exists.
  • Command output, diffs, test output, and structured evidence briefs can support tool_result claims.
  • SACP may make a local workflow easier to resume, audit, block, and review; it does not prove the underlying work is correct.

Relationship To The Adoption Case

See ADOPTION_CASE_LONGJU.md for the public-safe adoption case.

This note narrows that case into a reusable adapter mapping. The adoption case reports what one local setup tried; this adapter note shows how similar local records can be represented as SACP receipts.