Hypermedia surface diff — git baseline comparison and MCP agent tool.
contracts.surface_diff
| Name | Type | Default | Description |
|---|---|---|---|
type
|
|
— | |
qualified_name
|
|
— | |
element_type
|
|
— | |
description
|
|
— | |
source_file
|
|
— | |
line_number
|
|
— | |
is_autodoc
|
|
— | |
autodoc_element
|
|
— | |
_autodoc_template
|
|
— | |
_autodoc_url_path
|
|
— | |
_autodoc_page_type
|
|
— | |
title
|
|
— | |
doc_content_hash
|
|
— |
Symbols on this page
Run contract validation and return(result, json_payload).
Run contract validation on app and return a stable JSON payload.
Return the git repository root for start (default: cwd).
Runchirp check --jsonagainst app_import at base_ref via a temp worktree.
Diff hypermedia contracts for app against base_ref.
Registerchirp_surface_diffon app for MCP agent consumption (issue #344).
collect_check_json
function
def collect_check_json(app: App, *, deploy: bool = False, include_info: bool = False, include_coverage: bool = False) -> tuple[Any, dict[str, Any]]
Run contract validation and return(result, json_payload).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
app
|
App
|
— | |
deploy
|
bool
|
False
|
|
include_info
|
bool
|
False
|
|
include_coverage
|
bool
|
False
|
collect_check_payload
function
def collect_check_payload(app: App, *, deploy: bool = False, include_info: bool = False, include_coverage: bool = False) -> dict[str, Any]
Run contract validation on app and return a stable JSON payload.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
app
|
App
|
— | |
deploy
|
bool
|
False
|
|
include_info
|
bool
|
False
|
|
include_coverage
|
bool
|
False
|
find_git_root
function
def find_git_root(start: Path | None = None) -> Path
Return the git repository root for start (default: cwd).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
start
|
Path | None
|
None
|
check_at_git_ref
function
def check_at_git_ref(app_import: str, base_ref: str, *, repo_root: Path, deploy: bool = False, include_info: bool = False, include_coverage: bool = False) -> dict[str, Any]
Runchirp check --jsonagainst app_import at base_ref via a temp worktree.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
app_import
|
str
|
— | |
base_ref
|
str
|
— | |
repo_root
|
Path
|
— | |
deploy
|
bool
|
False
|
|
include_info
|
bool
|
False
|
|
include_coverage
|
bool
|
False
|
collect_surface_diff
function
def collect_surface_diff(app: App, app_import: str, base_ref: str, *, repo_root: Path | None = None, deploy: bool = False, include_info: bool = False) -> tuple[ContractDiff, dict[str, Any]]
Diff hypermedia contracts for app against base_ref.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
app
|
App
|
— | |
app_import
|
str
|
— | |
base_ref
|
str
|
— | |
repo_root
|
Path | None
|
None
|
|
deploy
|
bool
|
False
|
|
include_info
|
bool
|
False
|
register_surface_diff_tool
function
def register_surface_diff_tool(app: App, app_import: str, *, default_base_ref: str = 'origin/main') -> None
Registerchirp_surface_diffon app for MCP agent consumption (issue #344).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
app
|
App
|
— | |
app_import
|
str
|
— | |
default_base_ref
|
str
|
'origin/main'
|
View source · /home/runner/work/chirp/chirp/site/../src/chirp/contracts/surface_diff.py:1