Skip to content

Commit a72ac3e

Browse files
feat(api): api update
1 parent b34463f commit a72ac3e

7 files changed

Lines changed: 100 additions & 74 deletions

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 29
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-b075e5704110b3c03bd81b41f62b836d7624eceed7feb0ac63720dec9a4cbba4.yml
3-
openapi_spec_hash: 5efb926e6e99163e3e42a98986da8335
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-51ebe668b198157ccb18984017dd2fe35f7675220e8b933b03325b3c459ef2a6.yml
3+
openapi_spec_hash: b3ed94bd6b59d4e32fc2c5aa8187d6b2
44
config_hash: ff35e224e809656528c44163aa41bebd

‎src/context/dev/types/monitor_create_params.py‎

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class TargetMonitorsPageTarget(TypedDict, total=False):
107107
class TargetMonitorsSitemapTarget(TypedDict, total=False):
108108
"""Watch a sitemap for URL additions and removals.
109109
110-
Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. A new URL set must be observed on two consecutive runs before a change is reported, suppressing one-run crawl flaps.
110+
Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. On a detected difference the sitemap is re-fetched within the same run and only URLs both observations agree on are reported, suppressing transient crawl flaps.
111111
"""
112112

113113
type: Required[Literal["sitemap"]]
@@ -126,14 +126,15 @@ class TargetMonitorsSitemapTarget(TypedDict, total=False):
126126

127127

128128
class TargetMonitorsExtractTarget(TypedDict, total=False):
129-
"""Watch a site's extracted structured data."""
129+
"""Watch the monitor-relevant pages of a site for meaningful changes.
130130
131-
instructions: Required[str]
132-
"""Natural-language instructions describing what to extract and watch.
131+
A crawl guided by `schema`/`instructions` selects up to `max_pages` relevant pages to track; each run re-checks exactly those pages, and confirmed content changes are judged against the monitor's instructions. The tracked page set is refreshed by a periodic re-discovery crawl.
132+
"""
133133

134-
This single prompt scopes both the extraction and what changes get reported:
135-
only data captured by the schema and these instructions is compared between
136-
runs.
134+
instructions: Required[str]
135+
"""
136+
Natural-language instructions guiding which pages and facts to track and which
137+
changes to report.
137138
"""
138139

139140
type: Required[Literal["extract"]]
@@ -147,12 +148,14 @@ class TargetMonitorsExtractTarget(TypedDict, total=False):
147148
"""Optional maximum link depth from the starting URL (0 = only the starting page)."""
148149

149150
max_pages: int
150-
"""Maximum number of pages to analyze during extraction."""
151+
"""Maximum number of pages to track."""
151152

152153
schema: Dict[str, object]
153-
"""JSON Schema describing the structured data to extract and watch for changes.
154+
"""JSON Schema describing the data you care about.
154155
155-
If omitted, a default summary + key-points schema is used.
156+
It guides which pages are selected for tracking and gives the change judge
157+
context on what matters. If omitted, a default summary + key-points schema is
158+
used.
156159
"""
157160

158161

‎src/context/dev/types/monitor_create_response.py‎

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class TargetMonitorsPageTarget(BaseModel):
8686
class TargetMonitorsSitemapTarget(BaseModel):
8787
"""Watch a sitemap for URL additions and removals.
8888
89-
Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. A new URL set must be observed on two consecutive runs before a change is reported, suppressing one-run crawl flaps.
89+
Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. On a detected difference the sitemap is re-fetched within the same run and only URLs both observations agree on are reported, suppressing transient crawl flaps.
9090
"""
9191

9292
type: Literal["sitemap"]
@@ -105,14 +105,15 @@ class TargetMonitorsSitemapTarget(BaseModel):
105105

106106

107107
class TargetMonitorsExtractTarget(BaseModel):
108-
"""Watch a site's extracted structured data."""
108+
"""Watch the monitor-relevant pages of a site for meaningful changes.
109109
110-
instructions: str
111-
"""Natural-language instructions describing what to extract and watch.
110+
A crawl guided by `schema`/`instructions` selects up to `max_pages` relevant pages to track; each run re-checks exactly those pages, and confirmed content changes are judged against the monitor's instructions. The tracked page set is refreshed by a periodic re-discovery crawl.
111+
"""
112112

113-
This single prompt scopes both the extraction and what changes get reported:
114-
only data captured by the schema and these instructions is compared between
115-
runs.
113+
instructions: str
114+
"""
115+
Natural-language instructions guiding which pages and facts to track and which
116+
changes to report.
116117
"""
117118

118119
type: Literal["extract"]
@@ -126,12 +127,14 @@ class TargetMonitorsExtractTarget(BaseModel):
126127
"""Optional maximum link depth from the starting URL (0 = only the starting page)."""
127128

128129
max_pages: Optional[int] = None
129-
"""Maximum number of pages to analyze during extraction."""
130+
"""Maximum number of pages to track."""
130131

131132
schema_: Optional[Dict[str, object]] = FieldInfo(alias="schema", default=None)
132-
"""JSON Schema describing the structured data to extract and watch for changes.
133+
"""JSON Schema describing the data you care about.
133134
134-
If omitted, a default summary + key-points schema is used.
135+
It guides which pages are selected for tracking and gives the change judge
136+
context on what matters. If omitted, a default summary + key-points schema is
137+
used.
135138
"""
136139

137140

@@ -168,7 +171,7 @@ class BaselineMonitorsSitemapBaseline(BaseModel):
168171

169172
class BaselineMonitorsExtractBaseline(BaseModel):
170173
"""
171-
Current baseline of an `extract` monitor: the structured data as last extracted.
174+
Current baseline of an `extract` monitor: the pages it tracks and the structured data as last extracted.
172175
"""
173176

174177
captured_at: datetime
@@ -177,11 +180,13 @@ class BaselineMonitorsExtractBaseline(BaseModel):
177180
data: object
178181
"""
179182
The extracted structured data, matching the monitor's extraction schema (same
180-
shape as the /web/extract endpoint's `data`).
183+
shape as the /web/extract endpoint's `data`). Refreshed when the monitor
184+
re-discovers its page set (at most about once a day); `null` when no extraction
185+
has been captured yet.
181186
"""
182187

183188
urls_analyzed: List[str]
184-
"""URLs that were analyzed to produce the extracted data."""
189+
"""The page URLs the monitor tracks and analyzes for changes."""
185190

186191

187192
Baseline: TypeAlias = Union[

‎src/context/dev/types/monitor_list_response.py‎

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class DataTargetMonitorsPageTarget(BaseModel):
8787
class DataTargetMonitorsSitemapTarget(BaseModel):
8888
"""Watch a sitemap for URL additions and removals.
8989
90-
Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. A new URL set must be observed on two consecutive runs before a change is reported, suppressing one-run crawl flaps.
90+
Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. On a detected difference the sitemap is re-fetched within the same run and only URLs both observations agree on are reported, suppressing transient crawl flaps.
9191
"""
9292

9393
type: Literal["sitemap"]
@@ -106,14 +106,15 @@ class DataTargetMonitorsSitemapTarget(BaseModel):
106106

107107

108108
class DataTargetMonitorsExtractTarget(BaseModel):
109-
"""Watch a site's extracted structured data."""
109+
"""Watch the monitor-relevant pages of a site for meaningful changes.
110110
111-
instructions: str
112-
"""Natural-language instructions describing what to extract and watch.
111+
A crawl guided by `schema`/`instructions` selects up to `max_pages` relevant pages to track; each run re-checks exactly those pages, and confirmed content changes are judged against the monitor's instructions. The tracked page set is refreshed by a periodic re-discovery crawl.
112+
"""
113113

114-
This single prompt scopes both the extraction and what changes get reported:
115-
only data captured by the schema and these instructions is compared between
116-
runs.
114+
instructions: str
115+
"""
116+
Natural-language instructions guiding which pages and facts to track and which
117+
changes to report.
117118
"""
118119

119120
type: Literal["extract"]
@@ -127,12 +128,14 @@ class DataTargetMonitorsExtractTarget(BaseModel):
127128
"""Optional maximum link depth from the starting URL (0 = only the starting page)."""
128129

129130
max_pages: Optional[int] = None
130-
"""Maximum number of pages to analyze during extraction."""
131+
"""Maximum number of pages to track."""
131132

132133
schema_: Optional[Dict[str, object]] = FieldInfo(alias="schema", default=None)
133-
"""JSON Schema describing the structured data to extract and watch for changes.
134+
"""JSON Schema describing the data you care about.
134135
135-
If omitted, a default summary + key-points schema is used.
136+
It guides which pages are selected for tracking and gives the change judge
137+
context on what matters. If omitted, a default summary + key-points schema is
138+
used.
136139
"""
137140

138141

@@ -169,7 +172,7 @@ class DataBaselineMonitorsSitemapBaseline(BaseModel):
169172

170173
class DataBaselineMonitorsExtractBaseline(BaseModel):
171174
"""
172-
Current baseline of an `extract` monitor: the structured data as last extracted.
175+
Current baseline of an `extract` monitor: the pages it tracks and the structured data as last extracted.
173176
"""
174177

175178
captured_at: datetime
@@ -178,11 +181,13 @@ class DataBaselineMonitorsExtractBaseline(BaseModel):
178181
data: object
179182
"""
180183
The extracted structured data, matching the monitor's extraction schema (same
181-
shape as the /web/extract endpoint's `data`).
184+
shape as the /web/extract endpoint's `data`). Refreshed when the monitor
185+
re-discovers its page set (at most about once a day); `null` when no extraction
186+
has been captured yet.
182187
"""
183188

184189
urls_analyzed: List[str]
185-
"""URLs that were analyzed to produce the extracted data."""
190+
"""The page URLs the monitor tracks and analyzes for changes."""
186191

187192

188193
DataBaseline: TypeAlias = Union[

‎src/context/dev/types/monitor_retrieve_response.py‎

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class TargetMonitorsPageTarget(BaseModel):
8686
class TargetMonitorsSitemapTarget(BaseModel):
8787
"""Watch a sitemap for URL additions and removals.
8888
89-
Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. A new URL set must be observed on two consecutive runs before a change is reported, suppressing one-run crawl flaps.
89+
Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. On a detected difference the sitemap is re-fetched within the same run and only URLs both observations agree on are reported, suppressing transient crawl flaps.
9090
"""
9191

9292
type: Literal["sitemap"]
@@ -105,14 +105,15 @@ class TargetMonitorsSitemapTarget(BaseModel):
105105

106106

107107
class TargetMonitorsExtractTarget(BaseModel):
108-
"""Watch a site's extracted structured data."""
108+
"""Watch the monitor-relevant pages of a site for meaningful changes.
109109
110-
instructions: str
111-
"""Natural-language instructions describing what to extract and watch.
110+
A crawl guided by `schema`/`instructions` selects up to `max_pages` relevant pages to track; each run re-checks exactly those pages, and confirmed content changes are judged against the monitor's instructions. The tracked page set is refreshed by a periodic re-discovery crawl.
111+
"""
112112

113-
This single prompt scopes both the extraction and what changes get reported:
114-
only data captured by the schema and these instructions is compared between
115-
runs.
113+
instructions: str
114+
"""
115+
Natural-language instructions guiding which pages and facts to track and which
116+
changes to report.
116117
"""
117118

118119
type: Literal["extract"]
@@ -126,12 +127,14 @@ class TargetMonitorsExtractTarget(BaseModel):
126127
"""Optional maximum link depth from the starting URL (0 = only the starting page)."""
127128

128129
max_pages: Optional[int] = None
129-
"""Maximum number of pages to analyze during extraction."""
130+
"""Maximum number of pages to track."""
130131

131132
schema_: Optional[Dict[str, object]] = FieldInfo(alias="schema", default=None)
132-
"""JSON Schema describing the structured data to extract and watch for changes.
133+
"""JSON Schema describing the data you care about.
133134
134-
If omitted, a default summary + key-points schema is used.
135+
It guides which pages are selected for tracking and gives the change judge
136+
context on what matters. If omitted, a default summary + key-points schema is
137+
used.
135138
"""
136139

137140

@@ -168,7 +171,7 @@ class BaselineMonitorsSitemapBaseline(BaseModel):
168171

169172
class BaselineMonitorsExtractBaseline(BaseModel):
170173
"""
171-
Current baseline of an `extract` monitor: the structured data as last extracted.
174+
Current baseline of an `extract` monitor: the pages it tracks and the structured data as last extracted.
172175
"""
173176

174177
captured_at: datetime
@@ -177,11 +180,13 @@ class BaselineMonitorsExtractBaseline(BaseModel):
177180
data: object
178181
"""
179182
The extracted structured data, matching the monitor's extraction schema (same
180-
shape as the /web/extract endpoint's `data`).
183+
shape as the /web/extract endpoint's `data`). Refreshed when the monitor
184+
re-discovers its page set (at most about once a day); `null` when no extraction
185+
has been captured yet.
181186
"""
182187

183188
urls_analyzed: List[str]
184-
"""URLs that were analyzed to produce the extracted data."""
189+
"""The page URLs the monitor tracks and analyzes for changes."""
185190

186191

187192
Baseline: TypeAlias = Union[

‎src/context/dev/types/monitor_update_params.py‎

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class TargetMonitorsPageTarget(TypedDict, total=False):
103103
class TargetMonitorsSitemapTarget(TypedDict, total=False):
104104
"""Watch a sitemap for URL additions and removals.
105105
106-
Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. A new URL set must be observed on two consecutive runs before a change is reported, suppressing one-run crawl flaps.
106+
Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. On a detected difference the sitemap is re-fetched within the same run and only URLs both observations agree on are reported, suppressing transient crawl flaps.
107107
"""
108108

109109
type: Required[Literal["sitemap"]]
@@ -122,14 +122,15 @@ class TargetMonitorsSitemapTarget(TypedDict, total=False):
122122

123123

124124
class TargetMonitorsExtractTarget(TypedDict, total=False):
125-
"""Watch a site's extracted structured data."""
125+
"""Watch the monitor-relevant pages of a site for meaningful changes.
126126
127-
instructions: Required[str]
128-
"""Natural-language instructions describing what to extract and watch.
127+
A crawl guided by `schema`/`instructions` selects up to `max_pages` relevant pages to track; each run re-checks exactly those pages, and confirmed content changes are judged against the monitor's instructions. The tracked page set is refreshed by a periodic re-discovery crawl.
128+
"""
129129

130-
This single prompt scopes both the extraction and what changes get reported:
131-
only data captured by the schema and these instructions is compared between
132-
runs.
130+
instructions: Required[str]
131+
"""
132+
Natural-language instructions guiding which pages and facts to track and which
133+
changes to report.
133134
"""
134135

135136
type: Required[Literal["extract"]]
@@ -143,12 +144,14 @@ class TargetMonitorsExtractTarget(TypedDict, total=False):
143144
"""Optional maximum link depth from the starting URL (0 = only the starting page)."""
144145

145146
max_pages: int
146-
"""Maximum number of pages to analyze during extraction."""
147+
"""Maximum number of pages to track."""
147148

148149
schema: Dict[str, object]
149-
"""JSON Schema describing the structured data to extract and watch for changes.
150+
"""JSON Schema describing the data you care about.
150151
151-
If omitted, a default summary + key-points schema is used.
152+
It guides which pages are selected for tracking and gives the change judge
153+
context on what matters. If omitted, a default summary + key-points schema is
154+
used.
152155
"""
153156

154157

0 commit comments

Comments
 (0)