Skip to content

API Reference parrot.knowledge.wiki.ledger.events

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.knowledge.wiki.ledger.events

View source

Class InsightRecordedPayload

Fields:

Field Type Default Description
fact str
title str
category str 'note'
derived_from str Originating task, review, or spec id
about list[str] Related symbol or file ids

Class IssueAcknowledgedPayload

Explicit acceptance that an open critical issue must not block a merge.

Does NOT change status; the index sets acknowledged=True on the issue page.

Fields:

Field Type Default Description
acknowledged_by str Must be a human actor, e.g. human:jesus
reason str

Class IssueClaimedPayload

Fields:

Field Type Default Description
claimed_by str Agent or task claiming work, e.g. task:TASK-3205

Class IssueClosedPayload

Fields:

Field Type Default Description
reason str
closed_by str
resolved_by str | None None

Attribute IssueKind

Class IssueOpenedPayload

Fields:

Field Type Default Description
title str
body str
kind IssueKind 'bug'
severity IssueSeverity 'minor'
discovered_from str Source task/spec/review, e.g. task:TASK-3200, review:TASK-3200
about list[str] Target code symbols/files, e.g. sym:pkg/mod.py#Func

Attribute IssueSeverity

Attribute IssueStatus

Class IssueUnclaimedPayload

Release a claim so the issue returns to the ready pool (FEAT-572).

Reduces claimed -> open and clears claimed_by; a no-op on any other status. Mirrors :class:IssueClaimedPayload.

Fields:

Field Type Default Description
unclaimed_by str Actor releasing the claim, e.g. agent:sdd-fix
reason str

Class LedgerEvent

Immutable single-line event serialized into events.jsonl.

Fields:

Field Type Default Description
event_id str '' SHA-1 hash hex digest (first 12 chars)
kind LedgerEventKind
subject str Target identifier, e.g. issue:3f8a1c9e, task:TASK-1234, spec:FEAT-566
actor str Author identifier, e.g. agent:codex, human:jesus
ts str
payload dict[str, Any]

Method LedgerEvent.model_post_init

Compute event_id if not provided.

model_post_init(__context: Any) -> None

Parameter Type Default Description
__context Any

Attribute LedgerEventKind

Attribute SEVERITY_ORDER

Canonical severity order, most urgent first (FEAT-572, design research S6).

Defined HERE, beside the Literal it orders, so LedgerService.ready_work(), the fix planner, wikitoolkit ledger ready and the MCP ledger_ready tool all share one key. Never redefine it in a consumer — import it.

Type: Final[dict[IssueSeverity, int]]

Function canonical_json_dumps

Serialize an object to a canonical JSON string with sorted keys and no extra whitespace.

canonical_json_dumps(obj: Any) -> str

Parameter Type Default Description
obj Any

Returns: str

Function compute_event_id

Compute a deterministic SHA-1 hash hex digest (first 12 chars) for an event.

compute_event_id(kind: str, subject: str, actor: str, ts: str, payload: dict[str, Any]) -> str

Parameter Type Default Description
kind str
subject str
actor str
ts str
payload dict[str, Any]

Returns: str

Function compute_issue_id

Compute a deterministic issue ID (first 12 chars of SHA-1) based on kind, title, and discovery source.

compute_issue_id(kind: str, title: str, discovered_from: str) -> str

Parameter Type Default Description
kind str
title str
discovered_from str

Returns: str

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally