freshcontext-mcp 0.3.16 → 0.3.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +3 -0
- package/LICENSE +21 -0
- package/NOTICE.md +17 -0
- package/README.md +395 -296
- package/SECURITY.md +34 -0
- package/TRADEMARKS.md +9 -0
- package/dist/adapters/arxiv.js +92 -48
- package/dist/adapters/finance.js +87 -101
- package/dist/adapters/gdelt.js +1 -1
- package/dist/adapters/gebiz.js +1 -1
- package/dist/adapters/hackernews.js +59 -29
- package/dist/adapters/productHunt.js +8 -4
- package/dist/adapters/registry.js +232 -0
- package/dist/adapters/repoSearch.js +1 -1
- package/dist/adapters/secFilings.js +1 -1
- package/dist/core/decay.js +61 -0
- package/dist/core/decision.js +176 -0
- package/dist/core/envelope.js +59 -0
- package/dist/core/explain.js +28 -0
- package/dist/core/guards.js +17 -0
- package/dist/core/index.js +11 -0
- package/dist/core/pipeline.js +101 -0
- package/dist/core/provenance.js +73 -0
- package/dist/core/rank.js +84 -0
- package/dist/core/signal.js +101 -0
- package/dist/core/sourceProfiles.js +126 -0
- package/dist/core/types.js +1 -0
- package/dist/core/utility.js +90 -0
- package/dist/rest/handler.js +126 -0
- package/dist/security.js +1 -1
- package/dist/server.js +10 -10
- package/dist/tools/freshnessStamp.js +1 -117
- package/dist/types.js +0 -1
- package/docs/API_DESIGN.md +434 -0
- package/docs/CODEX_MCP_USAGE.md +116 -0
- package/docs/CORE_API.md +224 -0
- package/docs/DEPENDENCY_DILIGENCE.md +63 -0
- package/docs/HA_PRI_V2_DESIGN.md +279 -0
- package/docs/OPERATIONAL_DEMO_RUNBOOK.md +458 -0
- package/docs/RELEASE_INTEGRITY.md +53 -0
- package/docs/RELEASE_NOTES.md +38 -0
- package/docs/SIGNAL_CONTRACT.md +89 -0
- package/docs/SOURCE_PROFILES.md +427 -0
- package/freshcontext.schema.json +103 -103
- package/package-script-guard.mjs +140 -0
- package/package.json +92 -52
- package/server.json +27 -28
- package/.github/workflows/publish.yml +0 -32
- package/RESEARCH.md +0 -487
- package/RISKS.md +0 -137
- package/cleanup.ps1 +0 -99
- package/demo/README.md +0 -70
- package/demo/data.json +0 -88
- package/demo/generate.mjs +0 -199
- package/demo/index.html +0 -513
- package/demo/logo-export.html +0 -61
- package/demo/logo.svg +0 -23
- package/dist/apify.js +0 -133
- package/freshcontext-validate.js +0 -196
- package/time-check.ps1 +0 -46
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
# FreshContext Source Profiles
|
|
2
|
+
|
|
3
|
+
Status: early Core metadata
|
|
4
|
+
|
|
5
|
+
FreshContext is a context gateway for agents and humans before reasoning. It turns raw candidate context into freshness-ranked, explained, provenance-aware context.
|
|
6
|
+
|
|
7
|
+
The product is not the number of MCP tools. The product is the decision layer that answers:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
What context deserves to reach the model first?
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Core Boundary
|
|
14
|
+
|
|
15
|
+
Core should swallow the intelligence, not the MCP protocol.
|
|
16
|
+
|
|
17
|
+
FreshContext Core owns deterministic context evaluation:
|
|
18
|
+
|
|
19
|
+
- signal normalization
|
|
20
|
+
- timestamp and future-date guards
|
|
21
|
+
- freshness scoring
|
|
22
|
+
- failure honesty
|
|
23
|
+
- context utility as sidecar output
|
|
24
|
+
- rank and explanation primitives
|
|
25
|
+
- optional envelope output
|
|
26
|
+
- optional provenance material
|
|
27
|
+
|
|
28
|
+
MCP, REST, SDK, CLI, and future operator workflows are hosts over Core. They should not redefine freshness, failure, ranking, or provenance behavior unless they are explicitly documenting a compatibility boundary.
|
|
29
|
+
|
|
30
|
+
## Adapter Boundary
|
|
31
|
+
|
|
32
|
+
Adapters provide candidate context. They fetch, search, scrape, read, or receive source data, then turn that data into FreshContext-compatible signals.
|
|
33
|
+
|
|
34
|
+
The 21 MCP tools in this repository are reference adapters, source-profile examples, and proof surfaces. They are useful, but they are not the product identity.
|
|
35
|
+
|
|
36
|
+
They demonstrate that FreshContext can evaluate different information classes:
|
|
37
|
+
|
|
38
|
+
- software activity
|
|
39
|
+
- social pulse
|
|
40
|
+
- academic and research material
|
|
41
|
+
- financial and market signals
|
|
42
|
+
- jobs and opportunities
|
|
43
|
+
- government, regulatory, and procurement data
|
|
44
|
+
- competitive and company intelligence
|
|
45
|
+
- composite multi-source landscapes
|
|
46
|
+
|
|
47
|
+
## Source Profiles
|
|
48
|
+
|
|
49
|
+
Source Profiles describe how a class of information should age, fail, rank, and explain.
|
|
50
|
+
|
|
51
|
+
Different sources age differently. A stock quote may go stale within hours. A legal filing or academic paper may remain useful for months or years. Official documentation may be older than a blog post but still more authoritative.
|
|
52
|
+
|
|
53
|
+
Source Profiles sit above adapters and below hosts:
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
adapter output
|
|
57
|
+
-> source profile policy
|
|
58
|
+
-> Core evaluation
|
|
59
|
+
-> host response
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
As of Pass 8-J, Core exports built-in profile presets and a small metadata contract shaped like:
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
type SourceProfile = {
|
|
66
|
+
profile_id: string;
|
|
67
|
+
source_types: string[];
|
|
68
|
+
purpose: string;
|
|
69
|
+
default_decay_lambda: number;
|
|
70
|
+
half_life_hours: number;
|
|
71
|
+
authority_hint: "high" | "medium" | "low";
|
|
72
|
+
date_policy: "strict" | "balanced" | "lenient";
|
|
73
|
+
failure_policy: "exclude" | "downgrade" | "warn";
|
|
74
|
+
recommended_surfaces: ("mcp" | "rest" | "sdk" | "cli" | "operator")[];
|
|
75
|
+
};
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The existing Core `LAMBDA` table is the current decay-policy reference. Source Profiles make that policy understandable and product-facing without changing Core behavior.
|
|
79
|
+
|
|
80
|
+
Pass 8-J adds:
|
|
81
|
+
|
|
82
|
+
- `BUILT_IN_SOURCE_PROFILES`
|
|
83
|
+
- `getSourceProfile(profileId)`
|
|
84
|
+
- `listSourceProfiles()`
|
|
85
|
+
- public Source Profile types
|
|
86
|
+
|
|
87
|
+
It does not add `retrieve(...)`, Operator mode, adapter selection, local file search, crawling, Worker integration, MCP runtime changes, or REST handler changes.
|
|
88
|
+
|
|
89
|
+
## Adapter Registry Metadata
|
|
90
|
+
|
|
91
|
+
As of Pass 8-S, the 21 MCP tools are also represented as adapter metadata. The registry maps each current tool name to a future adapter identity, Source Profile, output mode, runtime kind, and migration risk.
|
|
92
|
+
|
|
93
|
+
This registry is metadata-only. It does not change MCP behavior, adapter implementation behavior, Worker behavior, REST behavior, Core evaluation behavior, or runtime transport. It exists to make future extraction deliberate instead of ad hoc.
|
|
94
|
+
|
|
95
|
+
The likely first extraction target remains `extract_arxiv`, because it is a low-risk official API style adapter mapped to `academic_research`.
|
|
96
|
+
|
|
97
|
+
## Profile Groups
|
|
98
|
+
|
|
99
|
+
### Official / Canonical Documentation
|
|
100
|
+
|
|
101
|
+
Strategic future profile.
|
|
102
|
+
|
|
103
|
+
Purpose: official product docs, API docs, standards, changelogs, specifications, legal references, and canonical source material.
|
|
104
|
+
|
|
105
|
+
Expected policy:
|
|
106
|
+
|
|
107
|
+
- slower decay than news or social content
|
|
108
|
+
- high authority hint
|
|
109
|
+
- strict source attribution
|
|
110
|
+
- missing dates should warn rather than pretend freshness
|
|
111
|
+
- recommended for agents, SDK, CLI, and research workflows
|
|
112
|
+
|
|
113
|
+
Current related proof surfaces:
|
|
114
|
+
|
|
115
|
+
- `extract_changelog`
|
|
116
|
+
- `package_trends`
|
|
117
|
+
- future official-docs adapter
|
|
118
|
+
|
|
119
|
+
### Code / Software Activity
|
|
120
|
+
|
|
121
|
+
Purpose: repository activity, release cadence, dependency health, and implementation evidence.
|
|
122
|
+
|
|
123
|
+
Current reference adapters:
|
|
124
|
+
|
|
125
|
+
- `extract_github`
|
|
126
|
+
- `search_repos`
|
|
127
|
+
- `extract_changelog`
|
|
128
|
+
- `package_trends`
|
|
129
|
+
|
|
130
|
+
Existing source types:
|
|
131
|
+
|
|
132
|
+
- `github`
|
|
133
|
+
- `reposearch`
|
|
134
|
+
- `changelog`
|
|
135
|
+
- `packagetrends`
|
|
136
|
+
|
|
137
|
+
Policy intent:
|
|
138
|
+
|
|
139
|
+
- repository metadata decays slowly
|
|
140
|
+
- release and changelog data decays moderately
|
|
141
|
+
- source authority is medium to high depending on whether the data is official
|
|
142
|
+
- failed API or blocked output should be downgraded or excluded
|
|
143
|
+
|
|
144
|
+
### Social / Launch / Community Pulse
|
|
145
|
+
|
|
146
|
+
Purpose: community awareness, social proof, launch momentum, and early-market signal.
|
|
147
|
+
|
|
148
|
+
Current reference adapters:
|
|
149
|
+
|
|
150
|
+
- `extract_hackernews`
|
|
151
|
+
- `extract_reddit`
|
|
152
|
+
- `extract_producthunt`
|
|
153
|
+
|
|
154
|
+
Existing source types:
|
|
155
|
+
|
|
156
|
+
- `hackernews`
|
|
157
|
+
- `reddit`
|
|
158
|
+
- `producthunt`
|
|
159
|
+
|
|
160
|
+
Policy intent:
|
|
161
|
+
|
|
162
|
+
- faster decay than canonical docs or academic material
|
|
163
|
+
- authority hint is medium or low unless corroborated
|
|
164
|
+
- recent social signal is useful, but weak content should not dominate verified sources
|
|
165
|
+
- failure-looking or empty output should be excluded or downgraded
|
|
166
|
+
|
|
167
|
+
### Academic / Research
|
|
168
|
+
|
|
169
|
+
Purpose: scholarly material, papers, research abstracts, and citation-oriented context.
|
|
170
|
+
|
|
171
|
+
Current reference adapters:
|
|
172
|
+
|
|
173
|
+
- `extract_scholar`
|
|
174
|
+
- `extract_arxiv`
|
|
175
|
+
|
|
176
|
+
Existing source types:
|
|
177
|
+
|
|
178
|
+
- `google_scholar`
|
|
179
|
+
- `arxiv`
|
|
180
|
+
|
|
181
|
+
Policy intent:
|
|
182
|
+
|
|
183
|
+
- slow decay
|
|
184
|
+
- medium to high authority hint
|
|
185
|
+
- old material can remain useful if canonical or heavily cited
|
|
186
|
+
- date confidence matters, but old does not automatically mean irrelevant
|
|
187
|
+
|
|
188
|
+
### Market / Financial Recency
|
|
189
|
+
|
|
190
|
+
Purpose: market prices, quotes, financial movement, and finance-specific situational awareness.
|
|
191
|
+
|
|
192
|
+
Current reference adapters:
|
|
193
|
+
|
|
194
|
+
- `extract_finance`
|
|
195
|
+
- `extract_finance_landscape`
|
|
196
|
+
|
|
197
|
+
Existing source types:
|
|
198
|
+
|
|
199
|
+
- `finance`
|
|
200
|
+
- `finance_landscape`
|
|
201
|
+
|
|
202
|
+
Policy intent:
|
|
203
|
+
|
|
204
|
+
- strict timestamp handling
|
|
205
|
+
- high recency sensitivity
|
|
206
|
+
- stale financial data should be clearly marked
|
|
207
|
+
- unknown dates should not look fresh
|
|
208
|
+
|
|
209
|
+
### Jobs / Opportunity Freshness
|
|
210
|
+
|
|
211
|
+
Purpose: job listings, openings, hiring signals, and opportunity windows.
|
|
212
|
+
|
|
213
|
+
Current reference adapters:
|
|
214
|
+
|
|
215
|
+
- `search_jobs`
|
|
216
|
+
|
|
217
|
+
Existing source type:
|
|
218
|
+
|
|
219
|
+
- `jobs`
|
|
220
|
+
|
|
221
|
+
Policy intent:
|
|
222
|
+
|
|
223
|
+
- moderate to fast decay
|
|
224
|
+
- deadline and posting recency matter
|
|
225
|
+
- missing dates should warn
|
|
226
|
+
- stale jobs should be ranked below current opportunities
|
|
227
|
+
|
|
228
|
+
### Government / Regulatory / Procurement
|
|
229
|
+
|
|
230
|
+
Purpose: public-sector contracts, official filings, tenders, regulatory disclosures, and global news intelligence.
|
|
231
|
+
|
|
232
|
+
Current reference adapters:
|
|
233
|
+
|
|
234
|
+
- `extract_govcontracts`
|
|
235
|
+
- `extract_sec_filings`
|
|
236
|
+
- `extract_gebiz`
|
|
237
|
+
- `extract_gdelt`
|
|
238
|
+
- `extract_gov_landscape`
|
|
239
|
+
|
|
240
|
+
Existing source types:
|
|
241
|
+
|
|
242
|
+
- `govcontracts`
|
|
243
|
+
- `sec_filings`
|
|
244
|
+
- `gebiz`
|
|
245
|
+
- `gdelt`
|
|
246
|
+
- `gov_landscape`
|
|
247
|
+
|
|
248
|
+
Policy intent:
|
|
249
|
+
|
|
250
|
+
- official records usually have high authority
|
|
251
|
+
- news and global monitoring signals decay faster
|
|
252
|
+
- filing and tender dates should be strict
|
|
253
|
+
- unknown dates should not be treated as fresh
|
|
254
|
+
|
|
255
|
+
### Company / Competitive Intelligence
|
|
256
|
+
|
|
257
|
+
Purpose: company research, product velocity, ecosystem activity, funding/procurement signals, and competitive context.
|
|
258
|
+
|
|
259
|
+
Current reference adapters:
|
|
260
|
+
|
|
261
|
+
- `extract_yc`
|
|
262
|
+
- `extract_company_landscape`
|
|
263
|
+
|
|
264
|
+
Existing source types:
|
|
265
|
+
|
|
266
|
+
- `yc`
|
|
267
|
+
- `company_landscape`
|
|
268
|
+
|
|
269
|
+
Policy intent:
|
|
270
|
+
|
|
271
|
+
- mixed-source profile
|
|
272
|
+
- should preserve per-source timestamps where possible
|
|
273
|
+
- should explain whether signal came from official records, market data, community pulse, or repository activity
|
|
274
|
+
- useful for agents and buyer workflows, but not a replacement for due diligence
|
|
275
|
+
|
|
276
|
+
### Composite Landscape / Validation
|
|
277
|
+
|
|
278
|
+
Purpose: multi-source validation and idea or market landscape checks.
|
|
279
|
+
|
|
280
|
+
Current reference adapters:
|
|
281
|
+
|
|
282
|
+
- `extract_landscape`
|
|
283
|
+
- `extract_idea_landscape`
|
|
284
|
+
- `extract_gov_landscape`
|
|
285
|
+
- `extract_finance_landscape`
|
|
286
|
+
- `extract_company_landscape`
|
|
287
|
+
|
|
288
|
+
Existing source types:
|
|
289
|
+
|
|
290
|
+
- `landscape`
|
|
291
|
+
- `idea_landscape`
|
|
292
|
+
- `gov_landscape`
|
|
293
|
+
- `finance_landscape`
|
|
294
|
+
- `company_landscape`
|
|
295
|
+
|
|
296
|
+
Policy intent:
|
|
297
|
+
|
|
298
|
+
- each section should retain source-specific timestamps
|
|
299
|
+
- composite freshness must not collapse all sections into one fake timestamp
|
|
300
|
+
- partial failures should be visible
|
|
301
|
+
- all-unavailable composites should not be cached or promoted as fresh
|
|
302
|
+
|
|
303
|
+
### Local / Custom Context
|
|
304
|
+
|
|
305
|
+
Strategic future profile.
|
|
306
|
+
|
|
307
|
+
Purpose: user-provided files, PDFs, notes, lecture material, source lists, internal docs, research folders, and custom retrieval results.
|
|
308
|
+
|
|
309
|
+
Expected policy:
|
|
310
|
+
|
|
311
|
+
- user consent is required
|
|
312
|
+
- source boundaries must be explicit
|
|
313
|
+
- local file metadata and extracted document dates should be treated cautiously
|
|
314
|
+
- official/canonical local material may decay slowly
|
|
315
|
+
- notes, drafts, or unknown-date content should warn rather than pretend freshness
|
|
316
|
+
- recommended for CLI, SDK, and future operator workflows
|
|
317
|
+
|
|
318
|
+
This profile is important for students, researchers, developers, and internal agent workflows. It is not implemented as local file search in this pass.
|
|
319
|
+
|
|
320
|
+
## Host Surfaces
|
|
321
|
+
|
|
322
|
+
### MCP
|
|
323
|
+
|
|
324
|
+
MCP remains a first-class host surface for agents and clients that speak MCP.
|
|
325
|
+
|
|
326
|
+
MCP owns:
|
|
327
|
+
|
|
328
|
+
- tool schemas
|
|
329
|
+
- reference adapter invocation
|
|
330
|
+
- MCP response shape
|
|
331
|
+
- client compatibility
|
|
332
|
+
|
|
333
|
+
MCP does not own the FreshContext product identity.
|
|
334
|
+
|
|
335
|
+
### REST
|
|
336
|
+
|
|
337
|
+
REST is a host around Core evaluation.
|
|
338
|
+
|
|
339
|
+
The local REST primitive currently supports:
|
|
340
|
+
|
|
341
|
+
- `GET /v1/health`
|
|
342
|
+
- `POST /v1/evaluate`
|
|
343
|
+
- `POST /v1/evaluate-batch`
|
|
344
|
+
|
|
345
|
+
REST should not become a crawler, cache, dashboard, billing system, or Worker replacement.
|
|
346
|
+
|
|
347
|
+
### SDK
|
|
348
|
+
|
|
349
|
+
Future SDKs should expose Core evaluation and later source-profile helpers.
|
|
350
|
+
|
|
351
|
+
The first SDK shape should prefer explicit inputs:
|
|
352
|
+
|
|
353
|
+
```ts
|
|
354
|
+
evaluateSignal(signal, options);
|
|
355
|
+
evaluateSignals(signals, options);
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
Higher-level retrieval should wait until Source Profiles are stable.
|
|
359
|
+
|
|
360
|
+
### CLI
|
|
361
|
+
|
|
362
|
+
Future CLI workflows should make FreshContext understandable to developers, students, and researchers.
|
|
363
|
+
|
|
364
|
+
Possible future commands:
|
|
365
|
+
|
|
366
|
+
```text
|
|
367
|
+
freshcontext evaluate sources.json
|
|
368
|
+
freshcontext check-sources bibliography.md
|
|
369
|
+
freshcontext rank-notes ./research-folder
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
These commands are not implemented in this pass.
|
|
373
|
+
|
|
374
|
+
## Future Operator Layer
|
|
375
|
+
|
|
376
|
+
The Operator is a future optional workflow over adapters and Core.
|
|
377
|
+
|
|
378
|
+
It may eventually:
|
|
379
|
+
|
|
380
|
+
- accept a task and query
|
|
381
|
+
- choose allowed source profiles
|
|
382
|
+
- call adapters or host-provided retrievers
|
|
383
|
+
- refresh stale sources
|
|
384
|
+
- evaluate candidates through Core
|
|
385
|
+
- return the best context bundle
|
|
386
|
+
|
|
387
|
+
Future concept:
|
|
388
|
+
|
|
389
|
+
```ts
|
|
390
|
+
freshcontext.retrieve({
|
|
391
|
+
task: "agent research",
|
|
392
|
+
query: "latest Cloudflare MCP auth changes",
|
|
393
|
+
sources: ["official_docs", "github", "news"],
|
|
394
|
+
policy: "balanced",
|
|
395
|
+
max_context_items: 8
|
|
396
|
+
});
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
This is not implemented yet.
|
|
400
|
+
|
|
401
|
+
This pass does not add:
|
|
402
|
+
|
|
403
|
+
- retrieval orchestration
|
|
404
|
+
- crawling
|
|
405
|
+
- browsing
|
|
406
|
+
- local file search
|
|
407
|
+
- adapter selection
|
|
408
|
+
- Worker or MCP runtime changes
|
|
409
|
+
- production Ha-Pri enforcement
|
|
410
|
+
- utility-weighted ranking
|
|
411
|
+
|
|
412
|
+
## Product Framing
|
|
413
|
+
|
|
414
|
+
Preferred sentence:
|
|
415
|
+
|
|
416
|
+
```text
|
|
417
|
+
FreshContext is a context gateway for agents and researchers: it turns raw retrieval results into freshness-ranked, provenance-aware context.
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
Sharper agent-facing sentence:
|
|
421
|
+
|
|
422
|
+
```text
|
|
423
|
+
FreshContext decides what context deserves to reach the model.
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
Use the 21 tools as proof of breadth, not as the headline.
|
|
427
|
+
|
package/freshcontext.schema.json
CHANGED
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://freshcontext-site.pages.dev/freshcontext.schema.json",
|
|
4
|
-
"title": "FreshContext",
|
|
5
|
-
"description": "The FreshContext Specification v1.1 — structured envelope for AI-retrieved web data. https://github.com/PrinceGabriel-lgtm/freshcontext-mcp",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["freshcontext"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"freshcontext": {
|
|
10
|
-
"type": "object",
|
|
11
|
-
"description": "The freshness metadata envelope for a single retrieved result.",
|
|
12
|
-
"required": ["source_url", "retrieved_at", "freshness_confidence", "adapter"],
|
|
13
|
-
"properties": {
|
|
14
|
-
"source_url": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"format": "uri",
|
|
17
|
-
"description": "The canonical URL of the original source from which content was retrieved."
|
|
18
|
-
},
|
|
19
|
-
"content_date": {
|
|
20
|
-
"type": ["string", "null"],
|
|
21
|
-
"description": "Best estimate of when the content was originally published. ISO 8601 date (YYYY-MM-DD) or ISO 8601 datetime. Null if unknown.",
|
|
22
|
-
"examples": ["2026-03-05", "2026-03-05T09:19:00.000Z", null]
|
|
23
|
-
},
|
|
24
|
-
"retrieved_at": {
|
|
25
|
-
"type": "string",
|
|
26
|
-
"format": "date-time",
|
|
27
|
-
"description": "Exact ISO 8601 datetime (with timezone) when this data was fetched.",
|
|
28
|
-
"examples": ["2026-04-05T09:19:00.000Z"]
|
|
29
|
-
},
|
|
30
|
-
"freshness_confidence": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"enum": ["high", "medium", "low"],
|
|
33
|
-
"description": "Confidence level of the content_date estimate. 'high' = structured API field. 'medium' = inferred from page signals. 'low' = unknown or estimated."
|
|
34
|
-
},
|
|
35
|
-
"freshness_score": {
|
|
36
|
-
"type": ["number", "null"],
|
|
37
|
-
"minimum": 0,
|
|
38
|
-
"maximum": 100,
|
|
39
|
-
"description": "Optional numeric freshness score 0-100. Calculated
|
|
40
|
-
"examples": [94, 72, 45, null]
|
|
41
|
-
},
|
|
42
|
-
"adapter": {
|
|
43
|
-
"type": "string",
|
|
44
|
-
"description": "Identifier of the adapter (data source) that produced this result.",
|
|
45
|
-
"examples": [
|
|
46
|
-
"github",
|
|
47
|
-
"hackernews",
|
|
48
|
-
"google_scholar",
|
|
49
|
-
"arxiv",
|
|
50
|
-
"reddit",
|
|
51
|
-
"ycombinator",
|
|
52
|
-
"producthunt",
|
|
53
|
-
"github_search",
|
|
54
|
-
"package_registry",
|
|
55
|
-
"finance",
|
|
56
|
-
"jobs",
|
|
57
|
-
"changelog",
|
|
58
|
-
"govcontracts",
|
|
59
|
-
"sec_filings",
|
|
60
|
-
"gdelt",
|
|
61
|
-
"gebiz"
|
|
62
|
-
]
|
|
63
|
-
},
|
|
64
|
-
"decay_rate": {
|
|
65
|
-
"type": ["number", "null"],
|
|
66
|
-
"description": "The decay rate used to calculate freshness_score. Domain-specific. Financial=5.0, jobs=3.0, news=2.0, github=1.0, academic=0.3, default=1.5.",
|
|
67
|
-
"examples": [5.0, 3.0, 2.0, 1.5, 1.0, 0.3, null]
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
"additionalProperties": false
|
|
71
|
-
},
|
|
72
|
-
"content": {
|
|
73
|
-
"type": "string",
|
|
74
|
-
"description": "The retrieved content — raw text, structured data, or formatted output from the adapter."
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
"examples": [
|
|
78
|
-
{
|
|
79
|
-
"freshcontext": {
|
|
80
|
-
"source_url": "https://github.com/PrinceGabriel-lgtm/freshcontext-mcp",
|
|
81
|
-
"content_date": "2026-04-05",
|
|
82
|
-
"retrieved_at": "2026-04-05T09:19:00.000Z",
|
|
83
|
-
"freshness_confidence": "high",
|
|
84
|
-
"freshness_score": 94,
|
|
85
|
-
"adapter": "github",
|
|
86
|
-
"decay_rate": 1.0
|
|
87
|
-
},
|
|
88
|
-
"content": "freshcontext-mcp — Real-time web intelligence for AI agents..."
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"freshcontext": {
|
|
92
|
-
"source_url": "https://efts.sec.gov/LATEST/search-index?q=Palantir&forms=8-K",
|
|
93
|
-
"content_date": "2026-02-03",
|
|
94
|
-
"retrieved_at": "2026-04-05T09:19:00.000Z",
|
|
95
|
-
"freshness_confidence": "high",
|
|
96
|
-
"freshness_score": 38,
|
|
97
|
-
"adapter": "sec_filings",
|
|
98
|
-
"decay_rate": 1.5
|
|
99
|
-
},
|
|
100
|
-
"content": "Palantir Technologies — 8-K filing: Q4 2025 earnings..."
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://freshcontext-site.pages.dev/freshcontext.schema.json",
|
|
4
|
+
"title": "FreshContext",
|
|
5
|
+
"description": "The FreshContext Specification v1.1 — structured envelope for AI-retrieved web data. https://github.com/PrinceGabriel-lgtm/freshcontext-mcp",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["freshcontext"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"freshcontext": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"description": "The freshness metadata envelope for a single retrieved result.",
|
|
12
|
+
"required": ["source_url", "retrieved_at", "freshness_confidence", "adapter"],
|
|
13
|
+
"properties": {
|
|
14
|
+
"source_url": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"format": "uri",
|
|
17
|
+
"description": "The canonical URL of the original source from which content was retrieved."
|
|
18
|
+
},
|
|
19
|
+
"content_date": {
|
|
20
|
+
"type": ["string", "null"],
|
|
21
|
+
"description": "Best estimate of when the content was originally published. ISO 8601 date (YYYY-MM-DD) or ISO 8601 datetime. Null if unknown.",
|
|
22
|
+
"examples": ["2026-03-05", "2026-03-05T09:19:00.000Z", null]
|
|
23
|
+
},
|
|
24
|
+
"retrieved_at": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"format": "date-time",
|
|
27
|
+
"description": "Exact ISO 8601 datetime (with timezone) when this data was fetched.",
|
|
28
|
+
"examples": ["2026-04-05T09:19:00.000Z"]
|
|
29
|
+
},
|
|
30
|
+
"freshness_confidence": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"enum": ["high", "medium", "low"],
|
|
33
|
+
"description": "Confidence level of the content_date estimate. 'high' = structured API field. 'medium' = inferred from page signals. 'low' = unknown or estimated."
|
|
34
|
+
},
|
|
35
|
+
"freshness_score": {
|
|
36
|
+
"type": ["number", "null"],
|
|
37
|
+
"minimum": 0,
|
|
38
|
+
"maximum": 100,
|
|
39
|
+
"description": "Optional numeric freshness score 0-100. Calculated with source-specific exponential temporal decay. Null if content_date is unknown.",
|
|
40
|
+
"examples": [94, 72, 45, null]
|
|
41
|
+
},
|
|
42
|
+
"adapter": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "Identifier of the adapter (data source) that produced this result.",
|
|
45
|
+
"examples": [
|
|
46
|
+
"github",
|
|
47
|
+
"hackernews",
|
|
48
|
+
"google_scholar",
|
|
49
|
+
"arxiv",
|
|
50
|
+
"reddit",
|
|
51
|
+
"ycombinator",
|
|
52
|
+
"producthunt",
|
|
53
|
+
"github_search",
|
|
54
|
+
"package_registry",
|
|
55
|
+
"finance",
|
|
56
|
+
"jobs",
|
|
57
|
+
"changelog",
|
|
58
|
+
"govcontracts",
|
|
59
|
+
"sec_filings",
|
|
60
|
+
"gdelt",
|
|
61
|
+
"gebiz"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"decay_rate": {
|
|
65
|
+
"type": ["number", "null"],
|
|
66
|
+
"description": "The decay rate used to calculate freshness_score. Domain-specific. Financial=5.0, jobs=3.0, news=2.0, github=1.0, academic=0.3, default=1.5.",
|
|
67
|
+
"examples": [5.0, 3.0, 2.0, 1.5, 1.0, 0.3, null]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"additionalProperties": false
|
|
71
|
+
},
|
|
72
|
+
"content": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"description": "The retrieved content — raw text, structured data, or formatted output from the adapter."
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"examples": [
|
|
78
|
+
{
|
|
79
|
+
"freshcontext": {
|
|
80
|
+
"source_url": "https://github.com/PrinceGabriel-lgtm/freshcontext-mcp",
|
|
81
|
+
"content_date": "2026-04-05",
|
|
82
|
+
"retrieved_at": "2026-04-05T09:19:00.000Z",
|
|
83
|
+
"freshness_confidence": "high",
|
|
84
|
+
"freshness_score": 94,
|
|
85
|
+
"adapter": "github",
|
|
86
|
+
"decay_rate": 1.0
|
|
87
|
+
},
|
|
88
|
+
"content": "freshcontext-mcp — Real-time web intelligence for AI agents..."
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"freshcontext": {
|
|
92
|
+
"source_url": "https://efts.sec.gov/LATEST/search-index?q=Palantir&forms=8-K",
|
|
93
|
+
"content_date": "2026-02-03",
|
|
94
|
+
"retrieved_at": "2026-04-05T09:19:00.000Z",
|
|
95
|
+
"freshness_confidence": "high",
|
|
96
|
+
"freshness_score": 38,
|
|
97
|
+
"adapter": "sec_filings",
|
|
98
|
+
"decay_rate": 1.5
|
|
99
|
+
},
|
|
100
|
+
"content": "Palantir Technologies — 8-K filing: Q4 2025 earnings..."
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|