freshcontext-mcp 0.3.17 → 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/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/hackernews.js +16 -16
- package/dist/adapters/registry.js +232 -0
- 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/server.js +1 -1
- package/dist/tools/freshnessStamp.js +1 -137
- 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 -59
- package/server.json +27 -28
- package/dist/apify.js +0 -133
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
# FreshContext Operational Demo Runbook
|
|
2
|
+
|
|
3
|
+
This runbook is for a live call, screen share, buyer demo, agent-builder conversation, or handoff where you need to show what FreshContext can do today.
|
|
4
|
+
|
|
5
|
+
It is intentionally practical. It does not describe future Operator mode as if it already exists.
|
|
6
|
+
|
|
7
|
+
## The Short Explanation
|
|
8
|
+
|
|
9
|
+
FreshContext is a context gateway between retrieval and reasoning.
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
Raw candidate context goes in.
|
|
13
|
+
FreshContext evaluates freshness, usefulness, traceability, and uncertainty.
|
|
14
|
+
Decision-ready context comes out.
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Use this sentence when someone asks what it is:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
FreshContext tells an agent or human whether a source should be used, cited, refreshed, verified, watched, treated as background, or excluded.
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Use this sentence when someone asks why it matters:
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
Search and retrieval find matching information; FreshContext decides what context deserves to reach the model first.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Current Operational Shape
|
|
30
|
+
|
|
31
|
+
FreshContext has four working lanes today:
|
|
32
|
+
|
|
33
|
+
| Lane | What It Does Today | Demo Status |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| Core | Normalizes signals, scores freshness, ranks, explains, prepares envelopes/provenance, and interprets decisions | Working |
|
|
36
|
+
| MCP package | Exposes 21 reference tools to MCP clients over stdio | Working |
|
|
37
|
+
| BYOC local demos | Lets a user provide JSON source lists and get decision-first output | Working |
|
|
38
|
+
| arXiv signal proof | Shows extracted adapter signals flowing into Core decisions | Working |
|
|
39
|
+
|
|
40
|
+
Two companion systems support operational trust:
|
|
41
|
+
|
|
42
|
+
| Companion | Role |
|
|
43
|
+
|---|---|
|
|
44
|
+
| Trust Scanner | Checks package, release, public-claim, and integrity risk |
|
|
45
|
+
| Ops Pulse | Checks Cloudflare/runtime/D1/cron/observability health for deployed systems |
|
|
46
|
+
|
|
47
|
+
## What FreshContext Is Not Yet
|
|
48
|
+
|
|
49
|
+
Do not overclaim these in a live talk:
|
|
50
|
+
|
|
51
|
+
- It is not full Operator mode yet.
|
|
52
|
+
- It does not crawl the web by itself in the BYOC demo.
|
|
53
|
+
- It does not silently read local folders.
|
|
54
|
+
- It does not replace legal, medical, tax, employment, academic, or investment review.
|
|
55
|
+
- It does not production-enforce Ha-Pri v2 yet.
|
|
56
|
+
- It does not make `utility.score` replace default ranking.
|
|
57
|
+
- It does not require publishing or deploying to demonstrate the current local flow.
|
|
58
|
+
|
|
59
|
+
## Screen-Share Prep
|
|
60
|
+
|
|
61
|
+
Open two terminals:
|
|
62
|
+
|
|
63
|
+
1. FreshContext MCP repo:
|
|
64
|
+
|
|
65
|
+
```powershell
|
|
66
|
+
cd "C:\Users\Immanuel Gabriel\Downloads\freshcontext-mcp"
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
2. Ops Pulse repo:
|
|
70
|
+
|
|
71
|
+
```powershell
|
|
72
|
+
cd "C:\Users\Immanuel Gabriel\Downloads\freshcontext-ops-pulse"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Optional files to open beside the terminal:
|
|
76
|
+
|
|
77
|
+
- `README.md`
|
|
78
|
+
- `docs/OPERATIONAL_DEMO_RUNBOOK.md`
|
|
79
|
+
- `examples/sources.academic.example.json`
|
|
80
|
+
- `examples/sources.jobs.example.json`
|
|
81
|
+
- `docs/SOURCE_PROFILES.md`
|
|
82
|
+
- `docs/CORE_API.md`
|
|
83
|
+
|
|
84
|
+
## Preflight Before A Call
|
|
85
|
+
|
|
86
|
+
Run this before the call, not during the first minute of the call:
|
|
87
|
+
|
|
88
|
+
```powershell
|
|
89
|
+
cd "C:\Users\Immanuel Gabriel\Downloads\freshcontext-mcp"
|
|
90
|
+
|
|
91
|
+
git status --short --branch
|
|
92
|
+
npm run build
|
|
93
|
+
npm test
|
|
94
|
+
npm run smoke:stdio
|
|
95
|
+
npm run trust:scan:json
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Expected healthy signs:
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
working tree clean
|
|
102
|
+
tests pass
|
|
103
|
+
smoke: 21 tools, v0.3.18
|
|
104
|
+
trust scan: 0 effective fail findings
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
For Ops Pulse:
|
|
108
|
+
|
|
109
|
+
```powershell
|
|
110
|
+
cd "C:\Users\Immanuel Gabriel\Downloads\freshcontext-ops-pulse"
|
|
111
|
+
|
|
112
|
+
git status --short --branch
|
|
113
|
+
npm run check
|
|
114
|
+
npm run build
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Expected healthy signs:
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
working tree clean
|
|
121
|
+
typecheck passes
|
|
122
|
+
build passes
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Best Live Demo Path
|
|
126
|
+
|
|
127
|
+
Use the local demos first. They are deterministic and do not need live network access.
|
|
128
|
+
|
|
129
|
+
### 1. Show Bring Your Own Context
|
|
130
|
+
|
|
131
|
+
Academic/citation example:
|
|
132
|
+
|
|
133
|
+
```powershell
|
|
134
|
+
cd "C:\Users\Immanuel Gabriel\Downloads\freshcontext-mcp"
|
|
135
|
+
npm run demo:evaluate:file -- examples/sources.academic.example.json
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Say:
|
|
139
|
+
|
|
140
|
+
```text
|
|
141
|
+
This is the simple user path. The user gives FreshContext candidate sources. FreshContext does not fetch or crawl here. It evaluates what was provided and returns decision-first context.
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Point out:
|
|
145
|
+
|
|
146
|
+
- `Decision`
|
|
147
|
+
- `Meaning`
|
|
148
|
+
- `Action`
|
|
149
|
+
- `Warnings`
|
|
150
|
+
- `Freshness`
|
|
151
|
+
- `Rank score`
|
|
152
|
+
- `Utility`
|
|
153
|
+
- `Confidence`
|
|
154
|
+
- `Why`
|
|
155
|
+
|
|
156
|
+
The important visible result is not the number. It is the action label:
|
|
157
|
+
|
|
158
|
+
```text
|
|
159
|
+
Cite as primary
|
|
160
|
+
Cite as supporting
|
|
161
|
+
Needs verification
|
|
162
|
+
Exclude
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### 2. Show A Normal-User Example
|
|
166
|
+
|
|
167
|
+
Jobs/opportunities example:
|
|
168
|
+
|
|
169
|
+
```powershell
|
|
170
|
+
npm run demo:evaluate:file -- examples/sources.jobs.example.json
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Say:
|
|
174
|
+
|
|
175
|
+
```text
|
|
176
|
+
The same Core works for a different source profile and intent. Academic sources age slowly; jobs age quickly. FreshContext changes the decision meaning without needing a new product.
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Point out decisions like:
|
|
180
|
+
|
|
181
|
+
```text
|
|
182
|
+
Use first
|
|
183
|
+
Needs refresh
|
|
184
|
+
Exclude
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### 3. Show Adapter-To-Core Proof
|
|
188
|
+
|
|
189
|
+
arXiv fixture-backed adapter proof:
|
|
190
|
+
|
|
191
|
+
```powershell
|
|
192
|
+
npm run demo:arxiv
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Say:
|
|
196
|
+
|
|
197
|
+
```text
|
|
198
|
+
This closes the adapter loop. arXiv-style XML becomes FreshContext signals, then Core evaluates those signals, then the decision helper explains what to do with them.
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Use this exact flow:
|
|
202
|
+
|
|
203
|
+
```text
|
|
204
|
+
arXiv XML
|
|
205
|
+
-> searchArxivSignals(...)
|
|
206
|
+
-> evaluateSignals(...)
|
|
207
|
+
-> interpretEvaluations(...)
|
|
208
|
+
-> decision-ready output
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
This is the bridge from reference MCP tools to source-aware adapter assets.
|
|
212
|
+
|
|
213
|
+
### 4. Show MCP Runtime Health
|
|
214
|
+
|
|
215
|
+
Only run this if network conditions are fine, because representative MCP smoke can touch live source paths:
|
|
216
|
+
|
|
217
|
+
```powershell
|
|
218
|
+
npm run smoke:stdio
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Expected:
|
|
222
|
+
|
|
223
|
+
```json
|
|
224
|
+
{
|
|
225
|
+
"ok": true,
|
|
226
|
+
"package_version": "0.3.18",
|
|
227
|
+
"server_version": "0.3.18",
|
|
228
|
+
"tool_count": 21
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Say:
|
|
233
|
+
|
|
234
|
+
```text
|
|
235
|
+
This proves the MCP package still exposes the reference tool surface. But the product is not the number of tools. The tools are proof surfaces and adapter candidates over the Core judgment layer.
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### 5. Show Trust Scanner
|
|
239
|
+
|
|
240
|
+
```powershell
|
|
241
|
+
npm run trust:scan:json
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Say:
|
|
245
|
+
|
|
246
|
+
```text
|
|
247
|
+
This protects release and public-claim integrity. The line that matters for the gate is effective fail count: zero.
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
You do not need to read every raw finding live. The scanner intentionally reports review items and downgrades known non-blockers.
|
|
251
|
+
|
|
252
|
+
### 6. Show Ops Pulse Health
|
|
253
|
+
|
|
254
|
+
In the Ops Pulse repo:
|
|
255
|
+
|
|
256
|
+
```powershell
|
|
257
|
+
cd "C:\Users\Immanuel Gabriel\Downloads\freshcontext-ops-pulse"
|
|
258
|
+
npm run check
|
|
259
|
+
npm run build
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Say:
|
|
263
|
+
|
|
264
|
+
```text
|
|
265
|
+
Ops Pulse is separate from FreshContext Core. It is the operational health companion for Cloudflare/runtime/D1/cron/observability workflows.
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## Bring Your Own Context File Shape
|
|
269
|
+
|
|
270
|
+
Minimal JSON shape:
|
|
271
|
+
|
|
272
|
+
```json
|
|
273
|
+
{
|
|
274
|
+
"profile": "academic_research",
|
|
275
|
+
"intent": "citation_check",
|
|
276
|
+
"signals": [
|
|
277
|
+
{
|
|
278
|
+
"title": "Example source",
|
|
279
|
+
"content": "Raw retrieved content or notes...",
|
|
280
|
+
"source": "https://example.com/source",
|
|
281
|
+
"source_type": "arxiv",
|
|
282
|
+
"published_at": "2026-05-24T12:00:00.000Z",
|
|
283
|
+
"retrieved_at": "2026-05-24T13:00:00.000Z",
|
|
284
|
+
"semantic_score": 0.92
|
|
285
|
+
}
|
|
286
|
+
]
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Run a custom file:
|
|
291
|
+
|
|
292
|
+
```powershell
|
|
293
|
+
npm run demo:evaluate:file -- path\to\sources.json
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
Important boundary:
|
|
297
|
+
|
|
298
|
+
```text
|
|
299
|
+
The file demo evaluates candidate context you provide. It does not fetch URLs, crawl websites, read folders, or run Operator mode.
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
## How To Explain The Framework
|
|
303
|
+
|
|
304
|
+
Use this architecture:
|
|
305
|
+
|
|
306
|
+
```text
|
|
307
|
+
Adapters / retrievers / databases / agents
|
|
308
|
+
-> FreshContext Signal Contract
|
|
309
|
+
-> Source Profile
|
|
310
|
+
-> Core evaluation
|
|
311
|
+
-> Decision Helper
|
|
312
|
+
-> MCP / REST / SDK / CLI / agent output
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
The deeper system split is:
|
|
316
|
+
|
|
317
|
+
```text
|
|
318
|
+
Core = deterministic context intelligence
|
|
319
|
+
Source Profiles = how source classes age and fail
|
|
320
|
+
Adapters = source intake
|
|
321
|
+
Hosts = MCP, REST, SDK, CLI
|
|
322
|
+
Operator = future retrieval workflow over Core
|
|
323
|
+
Trust Scanner = release/package/public-claim integrity
|
|
324
|
+
Ops Pulse = runtime health diagnostics
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
## How Agents Would Use This
|
|
328
|
+
|
|
329
|
+
For Codex, Claude, multi-agent workflows, or database-backed assistants, FreshContext should sit between retrieval and final reasoning:
|
|
330
|
+
|
|
331
|
+
```text
|
|
332
|
+
Agent retrieves 30 candidate items.
|
|
333
|
+
FreshContext normalizes and evaluates them.
|
|
334
|
+
FreshContext returns ranked decisions and warnings.
|
|
335
|
+
Agent uses the best context first and avoids stale/failed/unknown sources.
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
That means FreshContext is not trying to be another chat agent. It is the layer an agent uses before deciding what to trust.
|
|
339
|
+
|
|
340
|
+
In a multi-agent system:
|
|
341
|
+
|
|
342
|
+
```text
|
|
343
|
+
Research agent finds candidates.
|
|
344
|
+
FreshContext scores and labels candidates.
|
|
345
|
+
Writing agent receives only decision-ready context.
|
|
346
|
+
Review agent sees warnings, provenance, and excluded sources.
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
For database workflows:
|
|
350
|
+
|
|
351
|
+
```text
|
|
352
|
+
Database query returns rows or documents.
|
|
353
|
+
FreshContext evaluates dates, confidence, failure states, and source profile.
|
|
354
|
+
Application stores or displays the ranked decision result.
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
## What To Say If Someone Says "Is This Just Docs?"
|
|
358
|
+
|
|
359
|
+
Say:
|
|
360
|
+
|
|
361
|
+
```text
|
|
362
|
+
No. The docs describe the boundaries, but the local commands run the actual Core pipeline. The BYOC demo reads user-provided source JSON, evaluates it, ranks it, and prints decisions. The arXiv demo proves an adapter signal path reaches Core decisions. The MCP smoke proves the package exposes 21 working tools.
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
Then run:
|
|
366
|
+
|
|
367
|
+
```powershell
|
|
368
|
+
npm run demo:evaluate:file -- examples/sources.jobs.example.json
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
The output is the answer.
|
|
372
|
+
|
|
373
|
+
## Current Demo Script
|
|
374
|
+
|
|
375
|
+
Use this order in a live talk:
|
|
376
|
+
|
|
377
|
+
1. One sentence:
|
|
378
|
+
|
|
379
|
+
```text
|
|
380
|
+
FreshContext decides what context deserves to reach the model.
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
2. Run academic BYOC:
|
|
384
|
+
|
|
385
|
+
```powershell
|
|
386
|
+
npm run demo:evaluate:file -- examples/sources.academic.example.json
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
3. Run jobs BYOC:
|
|
390
|
+
|
|
391
|
+
```powershell
|
|
392
|
+
npm run demo:evaluate:file -- examples/sources.jobs.example.json
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
4. Run arXiv adapter proof:
|
|
396
|
+
|
|
397
|
+
```powershell
|
|
398
|
+
npm run demo:arxiv
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
5. Run MCP smoke if the network is stable:
|
|
402
|
+
|
|
403
|
+
```powershell
|
|
404
|
+
npm run smoke:stdio
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
6. Close with:
|
|
408
|
+
|
|
409
|
+
```text
|
|
410
|
+
The product is the judgment layer. The tools are reference adapters. The next growth path is more adapters, CLI/SDK usability, and eventually Operator mode.
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
## Current Release Boundary
|
|
414
|
+
|
|
415
|
+
Current prepared package version:
|
|
416
|
+
|
|
417
|
+
```text
|
|
418
|
+
freshcontext-mcp@0.3.18
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
Current state:
|
|
422
|
+
|
|
423
|
+
```text
|
|
424
|
+
release prep merged
|
|
425
|
+
package ready for release execution gate
|
|
426
|
+
npm publish not done
|
|
427
|
+
deploy not done
|
|
428
|
+
git tag not created
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
Do not publish, deploy, or tag during a demo.
|
|
432
|
+
|
|
433
|
+
## Troubleshooting
|
|
434
|
+
|
|
435
|
+
If the old ChatGPT handoff chat will not open:
|
|
436
|
+
|
|
437
|
+
```text
|
|
438
|
+
Do not depend on it. Use this runbook plus the local docs and repo state.
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
If `npm run smoke:stdio` fails during a live call:
|
|
442
|
+
|
|
443
|
+
```text
|
|
444
|
+
Switch to the offline demos: demo:evaluate:file and demo:arxiv.
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
If someone asks whether FreshContext gives advice:
|
|
448
|
+
|
|
449
|
+
```text
|
|
450
|
+
No. It gives context judgment: citation readiness, freshness, usefulness, traceability, and uncertainty. Humans and domain systems still own final decisions.
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
If someone asks what is next:
|
|
454
|
+
|
|
455
|
+
```text
|
|
456
|
+
Release execution gate, then CLI/SDK usability, then more adapter extraction, then Operator mode.
|
|
457
|
+
```
|
|
458
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# FreshContext Release Integrity Notes
|
|
2
|
+
|
|
3
|
+
This document describes release hardening practices for future FreshContext package and archive releases. It is a plan and checklist, not an implemented signing or SBOM system.
|
|
4
|
+
|
|
5
|
+
## Before Publishing or Sharing a Package
|
|
6
|
+
|
|
7
|
+
- Start from a clean working tree.
|
|
8
|
+
- Confirm the package version intentionally matches the release plan.
|
|
9
|
+
- Run `npm run build`.
|
|
10
|
+
- Run `npm test`.
|
|
11
|
+
- Run `npm run smoke:stdio`.
|
|
12
|
+
- Run `npm run example:ha-pri-v2`.
|
|
13
|
+
- Run `cd worker && npx tsc --noEmit`.
|
|
14
|
+
- Run `npm audit --omit=dev`.
|
|
15
|
+
- Run `npm audit`.
|
|
16
|
+
- Run `npm pack --dry-run --json`.
|
|
17
|
+
- Smoke-test the packed tarball in a temporary install:
|
|
18
|
+
- Confirm `npm start` works from the installed package.
|
|
19
|
+
- Confirm the `freshcontext-mcp` binary works from the installed package.
|
|
20
|
+
- Confirm repo-only scripts print a source-checkout notice instead of failing when examples, tests, or scripts are intentionally excluded.
|
|
21
|
+
- Confirm `dist/server.js` is present and `dist/apify.js` is absent from the MCP npm package.
|
|
22
|
+
- Confirm fresh consumer `npm audit --omit=dev` is clean.
|
|
23
|
+
- Run a stale-claim scan across public docs and package-facing files.
|
|
24
|
+
- Run a secret scan before sharing archives, diligence folders, or package artifacts.
|
|
25
|
+
|
|
26
|
+
## Package Exclusion Checks
|
|
27
|
+
|
|
28
|
+
Confirm release artifacts do not include:
|
|
29
|
+
|
|
30
|
+
- Local environment files.
|
|
31
|
+
- Tokens or local credential files.
|
|
32
|
+
- MCP registry local credential files.
|
|
33
|
+
- Cloudflare local state.
|
|
34
|
+
- Local database snapshots or SQL dumps.
|
|
35
|
+
- Private sale, buyer, target, outreach, or diligence documents.
|
|
36
|
+
- Private data-room folders.
|
|
37
|
+
- Local logs.
|
|
38
|
+
- Old package tarballs.
|
|
39
|
+
|
|
40
|
+
## Release Notes and Integrity Artifacts
|
|
41
|
+
|
|
42
|
+
- Current prepared release notes: [`RELEASE_NOTES.md`](./RELEASE_NOTES.md).
|
|
43
|
+
|
|
44
|
+
Future release hardening may include:
|
|
45
|
+
|
|
46
|
+
- GitHub release notes for tagged releases.
|
|
47
|
+
- Signed git tags, if signing is configured.
|
|
48
|
+
- `SHA256SUMS` files for release artifacts.
|
|
49
|
+
- SBOM generation for buyer or enterprise diligence.
|
|
50
|
+
- npm provenance and signature review.
|
|
51
|
+
- A documented token-rotation checklist for any maintainer or ownership transfer.
|
|
52
|
+
|
|
53
|
+
Do not publish from a dirty working tree. Do not publish from an environment that exposes secrets in logs or command output.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# FreshContext Release Notes
|
|
2
|
+
|
|
3
|
+
## 0.3.18
|
|
4
|
+
|
|
5
|
+
FreshContext 0.3.18 prepares the next npm package release without changing the deployed Worker or publishing automatically.
|
|
6
|
+
|
|
7
|
+
### Core and Context Evaluation
|
|
8
|
+
|
|
9
|
+
- Added the Core signal evaluation pipeline for normalized, freshness-ranked context results.
|
|
10
|
+
- Added Source Profiles as Core metadata for source-aware policy vocabulary.
|
|
11
|
+
- Added the Context Decision Helper so evaluated context can be interpreted as use, cite, verify, refresh, watch, background, or exclude.
|
|
12
|
+
- Preserved the ranking boundary: `ranked.final_score` controls default ordering, while `utility.score` remains sidecar intelligence.
|
|
13
|
+
|
|
14
|
+
### Bring Your Own Context
|
|
15
|
+
|
|
16
|
+
- Added decision-first local demos for user-provided JSON source lists.
|
|
17
|
+
- Added academic citation and jobs/opportunity sample inputs.
|
|
18
|
+
- Added `npm run demo:evaluate:file` for local source-list evaluation from a cloned source checkout.
|
|
19
|
+
|
|
20
|
+
### Adapter Path
|
|
21
|
+
|
|
22
|
+
- Added adapter registry metadata for the 21 existing MCP tools.
|
|
23
|
+
- Added additive arXiv signal extraction without changing the existing MCP `extract_arxiv` behavior.
|
|
24
|
+
- Added an arXiv signal-to-decision proof using a static fixture, Core evaluation, and decision output.
|
|
25
|
+
|
|
26
|
+
### Package and Release Hygiene
|
|
27
|
+
|
|
28
|
+
- Hardened the npm package file allowlist.
|
|
29
|
+
- Added script guards so repo-only scripts show a source-checkout notice in packed installs.
|
|
30
|
+
- Isolated Apify/Crawlee from the normal MCP npm runtime package while preserving source-checkout Apify Actor support.
|
|
31
|
+
- Confirmed fresh consumer installs no longer install Apify/Crawlee/file-type through the default MCP package path.
|
|
32
|
+
|
|
33
|
+
### Boundaries
|
|
34
|
+
|
|
35
|
+
- No npm publish in this preparation pass.
|
|
36
|
+
- No git tag in this preparation pass.
|
|
37
|
+
- No deployment in this preparation pass.
|
|
38
|
+
- No Worker, REST handler, Core runtime, MCP tool schema, or adapter behavior changes are included in the version bump itself.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# FreshContext Signal Contract v1
|
|
2
|
+
|
|
3
|
+
FreshContext Signal Contract v1 defines the Core shape for a retrieved signal before it is ranked, wrapped, stored, or passed to an agent workflow.
|
|
4
|
+
|
|
5
|
+
It is an additive Core API. It does not change MCP tool schemas, Worker runtime behavior, D1 schema, Store scoring, feeds, or deployment behavior.
|
|
6
|
+
|
|
7
|
+
## Contract Version
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
type SignalContractVersion = "freshcontext.signal.v1";
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Every normalized signal includes:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
contract_version: "freshcontext.signal.v1"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Input Shape
|
|
20
|
+
|
|
21
|
+
`FreshContextSignalInput` accepts the common fields used by adapters, agents, ranking, and future Store wiring:
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
interface FreshContextSignalInput {
|
|
25
|
+
id?: string;
|
|
26
|
+
source: string;
|
|
27
|
+
source_type?: string;
|
|
28
|
+
title?: string;
|
|
29
|
+
content?: string;
|
|
30
|
+
published_at?: string | null;
|
|
31
|
+
content_date?: string | null;
|
|
32
|
+
retrieved_at?: string | null;
|
|
33
|
+
semantic_score?: number;
|
|
34
|
+
date_confidence?: "high" | "medium" | "low" | "unknown";
|
|
35
|
+
freshness_confidence?: "high" | "medium" | "low";
|
|
36
|
+
status?: "success" | "partial" | "stale" | "failed" | "unknown";
|
|
37
|
+
metadata?: Record<string, unknown>;
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`published_at` is the canonical signal timestamp. `content_date` is accepted as an adapter/envelope compatibility alias.
|
|
42
|
+
|
|
43
|
+
## Normalized Output
|
|
44
|
+
|
|
45
|
+
`normalizeSignal(input, options?)` returns a `FreshContextSignal`:
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
interface FreshContextSignal {
|
|
49
|
+
contract_version: "freshcontext.signal.v1";
|
|
50
|
+
id?: string;
|
|
51
|
+
source: string;
|
|
52
|
+
source_type: string;
|
|
53
|
+
title?: string;
|
|
54
|
+
content?: string;
|
|
55
|
+
published_at: string | null;
|
|
56
|
+
retrieved_at: string;
|
|
57
|
+
semantic_score: number;
|
|
58
|
+
date_confidence: "high" | "medium" | "low" | "unknown";
|
|
59
|
+
status: "success" | "partial" | "stale" | "failed" | "unknown";
|
|
60
|
+
metadata: Record<string, unknown>;
|
|
61
|
+
reasons: string[];
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Normalization Rules
|
|
66
|
+
|
|
67
|
+
- Missing or invalid `published_at` / `content_date` becomes `published_at: null`.
|
|
68
|
+
- `content_date` maps to `published_at` when `published_at` is absent.
|
|
69
|
+
- Meaningfully future-dated timestamps are cleared and receive `date_confidence: "unknown"`.
|
|
70
|
+
- Small clock skew is tolerated by the same Core freshness policy used by envelope scoring.
|
|
71
|
+
- Failed, empty, timeout, blocked, or error-looking content becomes `status: "failed"`.
|
|
72
|
+
- Missing, invalid, negative, or oversized `semantic_score` is clamped into `0..1`.
|
|
73
|
+
- `metadata` is shallow-copied so normalization does not mutate caller-owned objects.
|
|
74
|
+
- `reasons` records meaningful normalization changes.
|
|
75
|
+
|
|
76
|
+
## Relationship to Existing Core Types
|
|
77
|
+
|
|
78
|
+
The signal contract does not replace existing Core types:
|
|
79
|
+
|
|
80
|
+
- `AdapterResult` remains the adapter-to-envelope input shape.
|
|
81
|
+
- `FreshContext` remains the envelope output shape.
|
|
82
|
+
- `FreshSignal` and `RankedSignal` remain the ranking input/output shapes.
|
|
83
|
+
- `ContextUtilityInput` remains the pure context-conditioned utility primitive.
|
|
84
|
+
|
|
85
|
+
The contract gives these surfaces a shared signal vocabulary without requiring Store, Worker, or MCP schema changes.
|
|
86
|
+
|
|
87
|
+
## Boundary
|
|
88
|
+
|
|
89
|
+
Signal Contract v1 does not determine truth, certify data, or provide legal, medical, tax, or financial advice. It provides normalized context metadata for freshness, provenance, relevance, and workflow review.
|