Download src/agents/planner/contracts.py from DataEyond/Agentic-Service-Data-Eyond-Catalog: direct link, hf CLI and curl.
- Browser
- Download file 2.02 kB
-
https://huggingface.co/spaces/DataEyond/Agentic-Service-Data-Eyond-Catalog/resolve/refs%2Fpr%2F21/src/agents/planner/contracts.py
- Command line
-
hf download hf://spaces/DataEyond/Agentic-Service-Data-Eyond-Catalog@refs/pr/21/src/agents/planner/contracts.py
-
curl -L -o contracts.py https://huggingface.co/spaces/DataEyond/Agentic-Service-Data-Eyond-Catalog/resolve/refs%2Fpr%2F21/src/agents/planner/contracts.py
2.02 kB
| """Contracts the planner consumes from other teams. | |
| `BusinessContext` (+ KeyTerm / DataTableNote / DataColumnNote) is still a LOCAL | |
| STUB owned by the lead (interview / Business Understanding); shape mirrors | |
| AGENT_ARCHITECTURE_CONTEXT_new.md §7.1 and must be reconciled before integration. | |
| `ToolSpec` / `ToolRegistry` / `ToolOutput` are NO LONGER defined here — the tool | |
| team owns them (KM-465). They now live in `src.tools.contracts` and are | |
| re-exported below so existing importers (`registry.py`, the slow-path | |
| `invoker.py` / `schemas.py`) keep working against one shared definition. | |
| """ | |
| from __future__ import annotations | |
| from typing import Literal | |
| from pydantic import BaseModel, Field | |
| # Canonical tool contracts now owned by the tool team (KM-465). Re-exported here | |
| # for backwards-compatible imports; the definitions live in src.tools.contracts. | |
| from src.tools.contracts import ToolOutput, ToolRegistry, ToolSpec | |
| __all__ = [ | |
| "KeyTerm", | |
| "DataTableNote", | |
| "DataColumnNote", | |
| "BusinessContext", | |
| "ToolSpec", | |
| "ToolRegistry", | |
| "ToolOutput", | |
| ] | |
| # --------------------------------------------------------------------------- # | |
| # BusinessContext (lead's contract — §7.1) | |
| # --------------------------------------------------------------------------- # | |
| class KeyTerm(BaseModel): | |
| term: str | |
| meaning: str | |
| class DataTableNote(BaseModel): | |
| table_name: str | |
| row_represents: str | |
| class DataColumnNote(BaseModel): | |
| column_name: str | |
| meaning: str | |
| class BusinessContext(BaseModel): | |
| project_id: str | |
| industry: str | |
| completeness: Literal["partial", "complete"] | |
| business_description: str | |
| scale_and_scope: str | |
| key_terms: list[KeyTerm] = Field(default_factory=list) | |
| data_overview: list[DataTableNote] = Field(default_factory=list) | |
| data_column_notes: list[DataColumnNote] = Field(default_factory=list) | |
| whats_normal: str = "" | |
| recent_events: str = "" | |
| things_to_watch_for: str = "" | |
| open_questions: list[str] = Field(default_factory=list) | |