Skip to content

API Reference parrot.knowledge.manuals.tips

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

parrot.knowledge.manuals.tips

View source

Technician tips: add, retire and re-link across manual revisions (FEAT-601 M9).

Tips live in technician-owned collections the graph loader never reconciles. Re-linking follows R1 strictly: source identity, then exact content-hash equality; text similarity only ever yields curator candidates.

Attribute CANDIDATE_THRESHOLD

Class RelinkOutcome

What happened to one tip during a relink run.

Fields:

Field Type Default Description
tip_id str
previous_step_id str | None
new_step_id str | None
method Literal['source_identity', 'content_hash', 'unchanged', 'candidate', 'orphaned']
candidates list[tuple[str, float]]

Class RelinkReport

Aggregate relink result for one manual; failed lists tip ids that could not be written.

Fields:

Field Type Default Description
manual_id str
relinked list[RelinkOutcome]
orphaned list[RelinkOutcome]
candidates list[RelinkOutcome]
failed list[str]

Alias Step

Re-exported from parrot.knowledge.manuals.models.Step.

Alias TECHNICIAN_COLLECTIONS

Re-exported from parrot.knowledge.manuals.domain.TECHNICIAN_COLLECTIONS.

Alias TenantContext

Re-exported from parrot.knowledge.ontology.schema.TenantContext.

Alias Tip

Re-exported from parrot.knowledge.manuals.models.Tip.

Function add_tip

Write a technician tip + its tech_tip_on edge; author comes from the trusted context, never the model.

add_tip(graph_store: Any, ctx: TenantContext, *, step_id: str, text: str, author_employee_id: str, source_revision: str, now: Callable[[], datetime] = _utcnow) -> Tip

Parameter Type Default Description
graph_store Any
ctx TenantContext
step_id str
text str
author_employee_id str
source_revision str
now Callable[[], datetime] _utcnow

Returns: Tip

Attribute logger

Function relink_tips

Re-attach active tips of manual_id from previous to current steps. Idempotent; never raises per tip.

relink_tips(graph_store: Any, ctx: TenantContext, *, manual_id: str, previous_steps: Sequence[Step], current_steps: Sequence[Step], linked_by: str = 'manuals.relink', now: Callable[[], datetime] = _utcnow) -> RelinkReport

Parameter Type Default Description
graph_store Any
ctx TenantContext
manual_id str
previous_steps Sequence[Step]
current_steps Sequence[Step]
linked_by str 'manuals.relink'
now Callable[[], datetime] _utcnow

Returns: RelinkReport

Function retire_tip

Deactivate a tip (curator action) and append an audit entry to its history.

retire_tip(graph_store: Any, ctx: TenantContext, *, tip_id: str, by: str) -> None

Parameter Type Default Description
graph_store Any
ctx TenantContext
tip_id str
by 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