Derives production receipts and actionable node feedback from durable work-graph outputs, exposing failures and dependencies to the agent. Reuse for agent runtime status reporting.
# Source: https://github.com/agentscope-ai/QwenPaw | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
# -*- coding: utf-8 -*-
"""Production receipts derived from durable outputs, never model prose."""
from __future__ import annotations
from collections import Counter
from typing import Any, Iterable
from services.project_files.models import Project, narrative_timeline_ids
from .work_graph import WorkGraph, WorkNode, WorkNodeStatus
def node_feedback(node: WorkNode, graph: WorkGraph) -> dict[str, Any]:
"""Expose actionable failures and dependencies to the Agent."""
by_id = graph.by_id
return {
"nodeId": node.node_id,
"label": node.label,
"status
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key