Files
insights/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-schemas-partial-update.json
zeekay 1b367e2b62 chore: rebase the tree onto upstream master
The tree was a debranded snapshot of upstream taken around 2026-02-20, and
upstream has moved about five months since. This replaces it with upstream
master, mechanically re-derived: bin/debrand does the rename, and the
pipeline and squashed migrations are restored from the shipped tree.

Not a merge. The previous import replaced the tree wholesale in a single
commit, so there is no shared content history to merge against. Reproducing
the rename on the new tree is what actually converges.

What survives: .hanzo/workflows, the Dockerfiles and bin/docker* entrypoints,
compose files, LLM.md, and insights/migrations. The squashed initial
migration is load-bearing — the live database records it by name, so
upstream's ~918 individual migrations cannot come back.

Nine products are dropped as unreferenced. Twenty-one more that we do not run
are kept anyway because the core app still imports them; unpicking those is a
refactor and does not belong in a rebase.

This base does not build yet, and the reasons are not in the rename:
upstream now wants Python 3.13.13 against our 3.12.12 and Django 5.2 against
our 4.2, and the dependency manifests still name upstream packages that we
republish under our own names. Those are decisions, not renames.
2026-08-01 15:44:40 -07:00

170 lines
7.2 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"api_version": {
"anyOf": [
{
"maxLength": 128,
"type": "string"
},
{
"type": "null"
}
],
"description": "Vendor API version override for this schema. `null` (default) syncs on the source's pinned version. Must be one of the source type's supported versions. User-managed: version-migration tooling never changes it. Not available for webhook-sync schemas."
},
"cdc_table_mode": {
"anyOf": [
{
"description": "* `consolidated` - consolidated\n* `cdc_only` - cdc_only\n* `both` - both",
"enum": ["consolidated", "cdc_only", "both"],
"type": "string"
},
{
"type": "null"
}
],
"description": "For CDC syncs: consolidated, cdc_only, or both.\n\n* `consolidated` - consolidated\n* `cdc_only` - cdc_only\n* `both` - both"
},
"enabled_columns": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Names of source columns to sync. `null` (default) syncs all columns. Primary-key columns and the active incremental field are always retained, even if not listed here."
},
"id": {
"description": "A UUID string identifying this external data schema.",
"type": "string"
},
"incremental_field": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Column name used to track sync progress."
},
"incremental_field_lookback_seconds": {
"anyOf": [
{
"maximum": 5184000,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"description": "Seconds to subtract from the stored incremental watermark at sync time, so each incremental run re-reads a rolling overlap window and catches late or backdated rows. Applies to timestamp/date incremental fields only. The stored watermark is unchanged. Maximum 5184000 (60 days)."
},
"incremental_field_type": {
"anyOf": [
{
"description": "* `integer` - integer\n* `numeric` - numeric\n* `datetime` - datetime\n* `date` - date\n* `timestamp` - timestamp\n* `objectid` - objectid\n* `xid` - xid",
"enum": ["integer", "numeric", "datetime", "date", "timestamp", "objectid", "xid"],
"type": "string"
},
{
"type": "null"
}
],
"description": "Data type of the incremental field.\n\n* `integer` - integer\n* `numeric` - numeric\n* `datetime` - datetime\n* `date` - date\n* `timestamp` - timestamp\n* `objectid` - objectid\n* `xid` - xid"
},
"primary_key_columns": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Column names for primary key deduplication."
},
"row_filters": {
"anyOf": [
{
"items": {
"properties": {
"column": {
"type": "string"
},
"operator": {
"description": "One of: > >= < <= = != IN \"NOT IN\".",
"type": "string"
},
"value": {
"description": "Comparison value; must match the column's type. For `IN` / `NOT IN`, a comma-separated list (e.g. `1, 2, 3` or `'a','b'`)."
}
},
"required": ["column", "operator", "value"],
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Predicates ANDed onto the source query so only matching rows sync. Each is `{column, operator, value}`; `null`/empty (default) syncs all rows. The operator must be one of `> >= < <= = != IN \"NOT IN\"` and the value must match the column's type (for `IN`/`NOT IN`, a comma-separated list like `1, 2, 3` or `'a','b'`). Applied on the next sync — not retroactive to already-synced rows."
},
"should_sync": {
"type": "boolean"
},
"sync_frequency": {
"anyOf": [
{
"description": "* `never` - never\n* `5min` - 5min\n* `15min` - 15min\n* `30min` - 30min\n* `1hour` - 1hour\n* `6hour` - 6hour\n* `12hour` - 12hour\n* `24hour` - 24hour\n* `7day` - 7day\n* `30day` - 30day",
"enum": ["never", "5min", "15min", "30min", "1hour", "6hour", "12hour", "24hour", "7day", "30day"],
"type": "string"
},
{
"type": "null"
}
],
"description": "How often to sync. The fastest sync frequency is 5 minutes.\n\n* `never` - never\n* `5min` - 5min\n* `15min` - 15min\n* `30min` - 30min\n* `1hour` - 1hour\n* `6hour` - 6hour\n* `12hour` - 12hour\n* `24hour` - 24hour\n* `7day` - 7day\n* `30day` - 30day"
},
"sync_time_of_day": {
"anyOf": [
{
"pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?$",
"type": "string"
},
{
"type": "null"
}
],
"description": "UTC time of day to run the sync (HH:MM:SS)."
},
"sync_type": {
"anyOf": [
{
"description": "* `full_refresh` - full_refresh\n* `incremental` - incremental\n* `append` - append\n* `webhook` - webhook\n* `cdc` - cdc\n* `xmin` - xmin",
"enum": ["full_refresh", "incremental", "append", "webhook", "cdc", "xmin"],
"type": "string"
},
{
"type": "null"
}
],
"description": "Sync strategy: incremental, full_refresh, append, cdc, or xmin.\n\n* `full_refresh` - full_refresh\n* `incremental` - incremental\n* `append` - append\n* `webhook` - webhook\n* `cdc` - cdc\n* `xmin` - xmin"
}
},
"required": ["id"],
"type": "object"
}