| """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 |
|
|
| |
| |
| from src.tools.contracts import ToolOutput, ToolRegistry, ToolSpec |
|
|
| __all__ = [ |
| "KeyTerm", |
| "DataTableNote", |
| "DataColumnNote", |
| "BusinessContext", |
| "ToolSpec", |
| "ToolRegistry", |
| "ToolOutput", |
| ] |
|
|
| |
| |
| |
|
|
|
|
| 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) |
|
|