oscar64-mcp-docs 1.1.0 → 1.1.2
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/README.md +2 -2
- package/dist/stdio.js +3 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Local MCP server (Mastra + stdio) exposing Oscar64 documentation and tutorial co
|
|
|
10
10
|
- Anchored manual retrieval (`docs://oscar64/manual#...`)
|
|
11
11
|
- Unified code file URIs (`code://oscar/...`, `code://sample/...`, `code://tutorial/...`) for agent-facing results
|
|
12
12
|
- Tutorial metadata generated from folder structure and source previews
|
|
13
|
-
- Deterministic
|
|
13
|
+
- Deterministic classifier with minimal output contract (`track`, `track_status`)
|
|
14
14
|
- MiniSearch-powered doc/tutorial relevance search
|
|
15
15
|
- Ranked code search across all exposed sources
|
|
16
16
|
- Minimal MCP tool responses (`ok` + `data`/`error`)
|
|
@@ -76,7 +76,7 @@ The executable entry is built to `dist/stdio.js`.
|
|
|
76
76
|
|
|
77
77
|
Primary tools:
|
|
78
78
|
|
|
79
|
-
- `search(query, limit, type, system
|
|
79
|
+
- `search(query, limit, type, system)` -> unified manual/code search with strict hit fields (`result_type`, `uri`, `title`, `preview`, `classification_summary`), optional `referenced_files` as `code://...` URIs readable by `read_uri`; `classification_summary` includes only `track` and `track_status`; `type` defaults to `all`; `system` defaults to `c64` and supports `all` for cross-system results
|
|
80
80
|
- `read_uri(uri, binary_mode, max_base64_bytes)` -> returns `ok + data` where `data.content_type` is `text` or `binary` for `docs://...` and `code://...`
|
|
81
81
|
- `list_indexes(type, system)` -> lists `topics`/`tutorials`/`samples`/`headers` entries; `type` defaults to `headers`, `system` defaults to `c64`, and `system=all` returns cross-system indexes
|
|
82
82
|
|
package/dist/stdio.js
CHANGED
|
@@ -396,8 +396,7 @@ var toolErrorSchema = z.object({
|
|
|
396
396
|
});
|
|
397
397
|
var classificationSummarySchema = z.object({
|
|
398
398
|
track: z.string().describe("Primary track summary value for routing and filtering."),
|
|
399
|
-
track_status: z.enum(["asserted", "neutral_fallback"]).describe("Whether the summary track was asserted or neutralized by fallback policy.")
|
|
400
|
-
confidence_bucket: z.enum(["low", "medium", "high"]).describe("Coarse confidence bucket for this classification summary.")
|
|
399
|
+
track_status: z.enum(["asserted", "neutral_fallback"]).describe("Whether the summary track was asserted or neutralized by fallback policy.")
|
|
401
400
|
});
|
|
402
401
|
var searchPreviewSchema = z.object({
|
|
403
402
|
summary: z.string().describe("Compact preview summary for quick relevance checks."),
|
|
@@ -1963,15 +1962,13 @@ function normalizeSearchResults(raw) {
|
|
|
1963
1962
|
}
|
|
1964
1963
|
function toClassificationSummary(classification) {
|
|
1965
1964
|
const confidence = Number(classification?.confidence ?? 0.25);
|
|
1966
|
-
const confidenceBucket = classification?.confidenceBucket === "high" || classification?.confidenceBucket === "medium" || classification?.confidenceBucket === "low" ? classification.confidenceBucket : confidence >= 0.8 ? "high" : confidence >= 0.55 ? "medium" : "low";
|
|
1967
1965
|
const scope = classification?.facets?.scope === "manual" ? "manual" : "code";
|
|
1968
1966
|
const neutralTrack = scope === "manual" ? "compiler_language" : "fundamentals";
|
|
1969
1967
|
const track = String(classification?.primaryTrack ?? neutralTrack);
|
|
1970
1968
|
const status = classification?.primaryTrackStatus === "asserted" || classification?.primaryTrackStatus === "neutral_fallback" ? classification.primaryTrackStatus : confidence >= 0.62 ? "asserted" : "neutral_fallback";
|
|
1971
1969
|
return {
|
|
1972
1970
|
track,
|
|
1973
|
-
track_status: status
|
|
1974
|
-
confidence_bucket: confidenceBucket
|
|
1971
|
+
track_status: status
|
|
1975
1972
|
};
|
|
1976
1973
|
}
|
|
1977
1974
|
function extractSystems(classification) {
|
|
@@ -2017,7 +2014,7 @@ function computeRankingBoost(hit) {
|
|
|
2017
2014
|
if (signature.includes(symbol)) boost += 42;
|
|
2018
2015
|
if (hit.resultType === "headers" && hit.uri.toLowerCase().includes(`${symbol}.h`)) boost += 18;
|
|
2019
2016
|
}
|
|
2020
|
-
if (hit.classificationSummary.track === "fundamentals" && hit.classificationSummary.
|
|
2017
|
+
if (hit.classificationSummary.track === "fundamentals" && hit.classificationSummary.track_status === "neutral_fallback") {
|
|
2021
2018
|
boost -= 8;
|
|
2022
2019
|
}
|
|
2023
2020
|
return boost;
|