record_safer_pro_mcp 1.0.41 → 1.0.42

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 CHANGED
@@ -273,8 +273,9 @@ npx -y record_safer_pro_mcp@latest --doctor
273
273
  | 录音状态 | 获取通道、混音、健康状态、最小录音状态 |
274
274
  | 通道操作 | 重命名通道、调颜色、音量、声像、solo、mute、反相 |
275
275
  | 录音中管理 | 添加标记、列出轨道、列出标记、重命名标记 |
276
+ | 说明书问答 | 检索内嵌用户手册 RAG,用于安装、模式、格式、位深、警报和 MCP 使用说明 |
276
277
 
277
- 当前仅暴露 24 个高频核心工具,不通过 MCP 暴露以下能力:
278
+ 当前仅暴露 25 个高频核心工具,不通过 MCP 暴露以下能力:
278
279
 
279
280
  - 系统设置
280
281
  - 更新
@@ -673,8 +674,9 @@ The current MCP server is intentionally focused on high-frequency recording task
673
674
  | Recording status | retrieve channels, mix, health, and minimal status |
674
675
  | Channel operations | rename channel, set color, volume, pan, solo, mute, phase invert |
675
676
  | In-session management | add markers, list tracks, list markers, rename markers |
677
+ | Manual Q&A | search the embedded user-manual RAG for install, mode, format, bit-depth, alert, and MCP usage guidance |
676
678
 
677
- Only 24 high-frequency core tools are exposed at this time. The following capabilities are intentionally not exposed through MCP:
679
+ Only 25 high-frequency core tools are exposed at this time. The following capabilities are intentionally not exposed through MCP:
678
680
 
679
681
  - system settings
680
682
  - updates
@@ -0,0 +1,52 @@
1
+ export type ManualRagAudience = "end_user" | "developer_support";
2
+ export type ManualRagChunk = {
3
+ id: string;
4
+ source_path: string;
5
+ source_type: string;
6
+ audience: ManualRagAudience;
7
+ module: string;
8
+ authority?: string;
9
+ retrieval_priority?: number;
10
+ title: string;
11
+ heading_path?: string[];
12
+ start_line: number;
13
+ end_line: number;
14
+ text: string;
15
+ };
16
+ export type ManualRagSearchOptions = {
17
+ query: string;
18
+ top?: number;
19
+ audience?: ManualRagAudience;
20
+ module?: string;
21
+ };
22
+ export type ManualRagSearchResult = {
23
+ rank: number;
24
+ score: number;
25
+ matched: string[];
26
+ audience: ManualRagAudience;
27
+ module: string;
28
+ authority: string;
29
+ sourcePath: string;
30
+ startLine: number;
31
+ endLine: number;
32
+ title: string;
33
+ headingPath: string[];
34
+ text: string;
35
+ };
36
+ export type ManualRagSearchResponse = {
37
+ query: string;
38
+ generatedAt: string;
39
+ corpus: {
40
+ included: Array<"manual_chunks" | "support_chunks">;
41
+ evidenceIncluded: false;
42
+ };
43
+ resultCount: number;
44
+ guidance: string;
45
+ results: ManualRagSearchResult[];
46
+ };
47
+ export declare function getManualRagConfig(): unknown;
48
+ export declare function getManualRagAnswerPolicy(): string;
49
+ export declare function getManualRagPlaybook(): string;
50
+ export declare function getManualRagGeneratedAt(): string;
51
+ export declare function searchManualRag(options: ManualRagSearchOptions): ManualRagSearchResponse;
52
+ //# sourceMappingURL=manual-rag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manual-rag.d.ts","sourceRoot":"","sources":["../src/manual-rag.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,mBAAmB,CAAC;AAEjE,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,E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AG_PLAYBOOK_MD, MANUAL_RAG_SUPPORT_CHUNKS_JSONL, } from "./resources/manual-rag-content.js";
2
+ const STOP_WORDS = new Set([
3
+ "about",
4
+ "after",
5
+ "all",
6
+ "also",
7
+ "and",
8
+ "are",
9
+ "but",
10
+ "can",
11
+ "for",
12
+ "from",
13
+ "get",
14
+ "has",
15
+ "have",
16
+ "into",
17
+ "not",
18
+ "record",
19
+ "recording",
20
+ "return",
21
+ "set",
22
+ "the",
23
+ "this",
24
+ "true",
25
+ "type",
26
+ "use",
27
+ "void",
28
+ "with",
29
+ "用户",
30
+ "使用",
31
+ "系统",
32
+ "软件",
33
+ "录音",
34
+ "功能",
35
+ ]);
36
+ let chunkCache = null;
37
+ let configCache = null;
38
+ export function getManualRagConfig() {
39
+ if (configCache == null) {
40
+ configCache = JSON.parse(MANUAL_RAG_CONFIG_JSON);
41
+ }
42
+ return configCache;
43
+ }
44
+ export function getManualRagAnswerPolicy() {
45
+ return MANUAL_RAG_ANSWER_POLICY_MD;
46
+ }
47
+ export function getManualRagPlaybook() {
48
+ return MANUAL_RAG_PLAYBOOK_MD;
49
+ }
50
+ export function getManualRagGeneratedAt() {
51
+ return MANUAL_RAG_GENERATED_AT;
52
+ }
53
+ function parseJsonl(jsonl) {
54
+ return jsonl
55
+ .split("\n")
56
+ .filter(Boolean)
57
+ .map((line) => JSON.parse(line));
58
+ }
59
+ function getChunks() {
60
+ if (chunkCache == null) {
61
+ chunkCache = [
62
+ ...parseJsonl(MANUAL_RAG_MANUAL_CHUNKS_JSONL),
63
+ ...parseJsonl(MANUAL_RAG_SUPPORT_CHUNKS_JSONL),
64
+ ];
65
+ }
66
+ return chunkCache;
67
+ }
68
+ function tokenize(text) {
69
+ const lower = text.toLowerCase();
70
+ const words = [];
71
+ const latinMatches = lower.match(/[a-z0-9][a-z0-9_-]{1,}/g) || [];
72
+ for (const token of latinMatches) {
73
+ for (const piece of token.split(/[_-]+/)) {
74
+ if (piece.length >= 2 && !STOP_WORDS.has(piece))
75
+ words.push(piece);
76
+ }
77
+ if (token.length >= 2 && !STOP_WORDS.has(token))
78
+ words.push(token);
79
+ }
80
+ const cjkMatches = text.match(/[\u3400-\u9fff]{2,}/g) || [];
81
+ for (const seq of cjkMatches) {
82
+ if (seq.length <= 12 && !STOP_WORDS.has(seq))
83
+ words.push(seq);
84
+ for (let i = 0; i < seq.length - 1; i++) {
85
+ const gram = seq.slice(i, i + 2);
86
+ if (!STOP_WORDS.has(gram))
87
+ words.push(gram);
88
+ }
89
+ for (let i = 0; i < seq.length - 2; i += 2) {
90
+ const gram = seq.slice(i, i + 3);
91
+ if (!STOP_WORDS.has(gram))
92
+ words.push(gram);
93
+ }
94
+ }
95
+ return words;
96
+ }
97
+ function scoreChunk(chunk, query, queryTokens) {
98
+ const haystack = [
99
+ chunk.source_path,
100
+ chunk.title,
101
+ ...(chunk.heading_path || []),
102
+ chunk.module,
103
+ chunk.audience,
104
+ chunk.authority,
105
+ chunk.text,
106
+ ].join("\n").toLowerCase();
107
+ const counts = new Map();
108
+ for (const token of tokenize(haystack)) {
109
+ counts.set(token, (counts.get(token) || 0) + 1);
110
+ }
111
+ let score = 0;
112
+ const matched = [];
113
+ for (const token of queryTokens) {
114
+ const count = counts.get(token) || 0;
115
+ if (count > 0) {
116
+ score += Math.min(8, 1 + Math.log2(count + 1));
117
+ matched.push(token);
118
+ }
119
+ if ((chunk.title || "").toLowerCase().includes(token))
120
+ score += 4;
121
+ if ((chunk.heading_path || []).join(" ").toLowerCase().includes(token))
122
+ score += 3;
123
+ if ((chunk.source_path || "").toLowerCase().includes(token))
124
+ score += 2;
125
+ }
126
+ const normalizedQuery = query.toLowerCase();
127
+ if (normalizedQuery.length >= 4 && haystack.includes(normalizedQuery))
128
+ score += 12;
129
+ const priority = Number(chunk.retrieval_priority || 40);
130
+ score *= 0.8 + Math.max(0, Math.min(priority, 100)) / 100;
131
+ if (chunk.module === "manual_playbook")
132
+ score += 12;
133
+ if (chunk.authority === "canonical_code_checked")
134
+ score += 8;
135
+ if (chunk.audience === "end_user")
136
+ score *= 1.35;
137
+ if (chunk.audience === "developer_support")
138
+ score *= 1.05;
139
+ return { score, matched: [...new Set(matched)] };
140
+ }
141
+ function excerpt(text, queryTokens, length = 1200) {
142
+ const lower = text.toLowerCase();
143
+ let best = 0;
144
+ for (const token of queryTokens) {
145
+ const idx = lower.indexOf(token.toLowerCase());
146
+ if (idx >= 0) {
147
+ best = Math.max(0, idx - 160);
148
+ break;
149
+ }
150
+ }
151
+ const snippet = text.slice(best, best + length).replace(/\s+/g, " ").trim();
152
+ return `${best > 0 ? "..." : ""}${snippet}${best + length < text.length ? "..." : ""}`;
153
+ }
154
+ function normalizeTop(rawTop) {
155
+ if (!Number.isFinite(rawTop))
156
+ return 5;
157
+ return Math.max(1, Math.min(12, Math.trunc(rawTop || 5)));
158
+ }
159
+ export function searchManualRag(options) {
160
+ const query = options.query.trim();
161
+ const queryTokens = [...new Set(tokenize(query))];
162
+ const top = normalizeTop(options.top);
163
+ const filtered = getChunks().filter((chunk) => {
164
+ if (options.audience && chunk.audience !== options.audience)
165
+ return false;
166
+ if (options.module && chunk.module !== options.module)
167
+ return false;
168
+ return true;
169
+ });
170
+ const results = filtered
171
+ .map((chunk) => ({ chunk, ...scoreChunk(chunk, query, queryTokens) }))
172
+ .filter((item) => item.score > 0)
173
+ .sort((a, b) => b.score - a.score)
174
+ .slice(0, top)
175
+ .map((item, index) => ({
176
+ rank: index + 1,
177
+ score: Number(item.score.toFixed(2)),
178
+ matched: item.matched,
179
+ audience: item.chunk.audience,
180
+ module: item.chunk.module,
181
+ authority: item.chunk.authority || "user_manual_source",
182
+ sourcePath: item.chunk.source_path,
183
+ startLine: item.chunk.start_line,
184
+ endLine: item.chunk.end_line,
185
+ title: item.chunk.title,
186
+ headingPath: item.chunk.heading_path || [],
187
+ text: excerpt(item.chunk.text, queryTokens),
188
+ }));
189
+ return {
190
+ query,
191
+ generatedAt: MANUAL_RAG_GENERATED_AT,
192
+ corpus: {
193
+ included: ["manual_chunks", "support_chunks"],
194
+ evidenceIncluded: false,
195
+ },
196
+ resultCount: results.length,
197
+ guidance: "Use manual_playbook/canonical_code_checked results first. This MCP RAG intentionally excludes implementation_evidence chunks by default; do not expose source paths unless the user asks for technical provenance.",
198
+ results,
199
+ };
200
+ }
201
+ //# sourceMappingURL=manual-rag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manual-rag.js","sourceRoot":"","sources":["../src/manual-rag.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,EACtB,uBAAuB,EACvB,8BAA8B,EAC9B,sBAAsB,EACtB,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAqD3C,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACzB,OAAO;IACP,OAAO;IACP,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,QAAQ;IACR,WAAW;IACX,QAAQ;IACR,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;CACL,CAAC,CAAC;AAEH,IAAI,UAAU,GAA4B,IAAI,CAAC;AAC/C,IAAI,WAAW,GAAmB,IAAI,CAAC;AAEvC,MAAM,UAAU,kBAAkB;IAChC,IAAI,WAAW,IAAI,IAAI,EAAE,CAAC;QACxB,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,wBAAwB;IACtC,OAAO,2BAA2B,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,oBAAoB;IAClC,OAAO,sBAAsB,CAAC;AAChC,CAAC;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;QAC3B,QAAQ,EACN,oNAAoN;QACtN,OAAO;KACR,CAAC;AACJ,CAAC"}
@@ -59,13 +59,13 @@ const RECORDING_SETUP_SEQUENCE = `Strict recording-setup order:
59
59
  12. If any setup field changes after preview_record_mcp_setup or after confirm_record_mcp_setup, call preview_record_mcp_setup again, replace the summary, and run confirm_record_mcp_setup again before calling start_record_mcp.
60
60
  13. If the user provided desired channel or track names, apply them only after the app has opened the recording screen. Never rename before initialization.
61
61
  14. After start_record_mcp succeeds, briefly confirm that the recording screen is ready, explicitly state that actual recording has NOT started yet, and ask whether the user wants MCP to start recording now.
62
- 15. If the user explicitly wants the actual start later, such as "start in 5 minutes", use schedule_start_recording instead of treating that as a chat-only reminder, but only after explicit confirmation of that delayed schedule in the current turn.
63
- 16. If the user explicitly wants the recording to stop later after it starts or while it is already recording, use schedule_stop_recording only after explicit confirmation of that delayed stop schedule in the current turn. If the user wants to remove a delayed start/stop, use cancel_scheduled_recording.
62
+ 15. If the user explicitly wants the actual start later, such as "start in 5 minutes", use schedule_start_recording instead of treating that as a chat-only reminder.
63
+ 16. If the user explicitly wants the recording to stop later after it starts or while it is already recording, use schedule_stop_recording. If the user wants to remove a delayed start/stop, use cancel_scheduled_recording.
64
64
  17. Do not repeat another full settings block that duplicates the pre-call confirmation summary after start_record_mcp succeeds.
65
65
  18. Actual recording start is still a separate explicit action after the recording screen is ready, and start_record_mcp itself is the MCP action that opens the recording screen after confirmation. Do not ask the user to navigate GUI pages as a substitute for that step.
66
66
  19. If the user proceeds to the actual start without changing setup, reuse the approved recordingMode from the prepared session unless the user explicitly asks to switch modes. If the user's latest message changes the timing to "start now", "start immediately", "现在开始", or "立即开始", treat that as an immediate actual-start request that overrides any earlier delayed-start plan. In that case, do not keep using schedule_start_recording and do not describe the action as a delayed start.
67
67
  20. If start_record_mcp fails because the backend did not report ready, report that directly. Do not rerun preview_record_mcp_setup or confirm_record_mcp_setup unless the setup changed or the approval expired. Do not claim parameters changed unless the tool error explicitly lists the changed fields.`;
68
- const DADAO_SAFETY_NOTICE = `Always call get_status first. If get_status already reports ready=true, continue from the current prepared session and recording screen instead of restarting setup. Only when ready=false should MCP prepare the session and open the recording screen via start_record_mcp after preview_record_mcp_setup and confirm_record_mcp_setup. That step prepares the session only; it is not the actual recording start. After the recording screen is ready, explicitly tell the user that recording has not started yet and ask whether MCP should start recording now. Only then may start_recording be used, and only after explicit confirmation while the app is on the RECORDING page and all hard start-readiness checks are clear. Power or battery warnings alone should be surfaced to the user but do not block start_recording or schedule_start_recording by themselves. If the user explicitly wants the actual start later, such as "start in 5 minutes", use schedule_start_recording instead of treating it as a reminder, but only after explicit confirmation of that delayed schedule. If the user later changes that timing to "start now", "start immediately", "现在开始", or "立即开始", treat the latest message as overriding the earlier delay and switch back to the immediate start_recording path. If the user wants a delayed stop, use schedule_stop_recording only after explicit confirmation of that delayed stop schedule. If the user wants to remove a delayed start or delayed stop, use cancel_scheduled_recording.`;
68
+ const DADAO_SAFETY_NOTICE = `Always call get_status first. If get_status already reports ready=true, continue from the current prepared session and recording screen instead of restarting setup. Only when ready=false should MCP prepare the session and open the recording screen via start_record_mcp after preview_record_mcp_setup and confirm_record_mcp_setup. That step prepares the session only; it is not the actual recording start. After the recording screen is ready, explicitly tell the user that recording has not started yet and ask whether MCP should start recording now. Only then may start_recording be used, and only after explicit confirmation while the app is on the RECORDING page and all hard start-readiness checks are clear. Power or battery warnings alone should be surfaced to the user but do not block start_recording or schedule_start_recording by themselves. If the user explicitly wants the actual start later, such as "start in 5 minutes", use schedule_start_recording instead of treating it as a reminder. If the user later changes that timing to "start now", "start immediately", "现在开始", or "立即开始", treat the latest message as overriding the earlier delay and switch back to the immediate start_recording path. If the user wants a delayed stop, use schedule_stop_recording. If the user wants to remove a delayed start or delayed stop, use cancel_scheduled_recording.`;
69
69
  export function registerPrompts(server) {
70
70
  server.prompt("recording_setup_orchestrator", "Recording Setup Orchestrator — Professional recording-screen preparation workflow", { request: z.string().describe("User request, imported note, or document summary") }, ({ request }) => ({
71
71
  messages: [{
@@ -143,8 +143,8 @@ ${RECORDING_SETUP_SUMMARY_FIELDS}
143
143
  - After start_record_mcp succeeds, do not print another full settings list. Briefly confirm that the recording screen is ready and move to the next explicit user-requested action.
144
144
  - Do not imply that actual recording has already started.
145
145
  - Actual recording start is a separate explicit step after session preparation. If the user later asks to start, require explicit confirmation and then use start_recording only when the app is on the RECORDING page and all hard start-readiness checks are clear. Power or battery warnings alone should be surfaced, not treated as blockers.
146
- - If the user later asks to start after a delay, use schedule_start_recording for that delayed actual start instead of holding the delay in natural language only, but only after explicit confirmation of the delayed schedule.
147
- - If the user later asks for automatic stop timing, use schedule_stop_recording only after explicit confirmation of the delayed stop schedule, or cancel_scheduled_recording as appropriate.
146
+ - If the user later asks to start after a delay, use schedule_start_recording for that delayed actual start instead of holding the delay in natural language only.
147
+ - If the user later asks for automatic stop timing, use schedule_stop_recording or cancel_scheduled_recording as appropriate.
148
148
  - If the user does not override recordingMode at actual start time, reuse the prepared session's approved recordingMode.
149
149
  - If start_record_mcp is the requested next step and preparation fails, explain that MCP attempted to open the recording screen but the backend did not report ready. Do not turn that into a GUI navigation instruction, and do not rerun preview_record_mcp_setup or confirm_record_mcp_setup unless the setup changed or the approval expired.
150
150
  - Do not claim that parameters changed unless the tool error explicitly lists the changed fields.`,
@@ -178,8 +178,8 @@ ${RECORDING_SETUP_SUMMARY_FIELDS}
178
178
 
179
179
  Step 1: Choose the right query tool based on the request:
180
180
  - Start-recording operations, including latest-turn requests like "start now", "start immediately", "现在开始", or "立即开始" -> verify ready=false/true state with get_status as needed, then use start_recording only after explicit confirmation and only when the app is on the RECORDING page with clear hard start-readiness status. A current-turn immediate-start request overrides any earlier delayed-start request. Power or battery warnings alone should be mentioned to the user but should not block this path by themselves.
181
- - Delayed actual recording starts -> verify ready=false/true state with get_status as needed, then use schedule_start_recording only when the current request is explicitly later, for example "start in 5 minutes", and only after explicit confirmation of that delayed schedule. Power or battery warnings alone should be mentioned to the user but should not block scheduling by themselves.
182
- - Delayed recording stops -> if recording is already active, use schedule_stop_recording only after explicit confirmation of that delayed stop schedule; if the user wants to cancel a delayed start or stop, use cancel_scheduled_recording
181
+ - Delayed actual recording starts -> verify ready=false/true state with get_status as needed, then use schedule_start_recording only when the current request is explicitly later, for example "start in 5 minutes". Power or battery warnings alone should be mentioned to the user but should not block scheduling by themselves.
182
+ - Delayed recording stops -> if recording is already active, use schedule_stop_recording; if the user wants to cancel a delayed start or stop, use cancel_scheduled_recording
183
183
  - Marker rename operations -> list_markers (marker ID, label, timestamp), then rename_marker only after the exact target marker is clear
184
184
  - Rename operations -> get_channels (channel ID, name, device label)
185
185
  - Channel color changes -> get_channels (channel ID, name, device label), then set_channel_color only after the exact target channel is clear
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,wBAAwB,GAAG;;;;;;;;kDAQiB,CAAC;AAEnD,MAAM,2BAA2B,GAAG;;;;2JAIuH,CAAC;AAE5J,MAAM,+BAA+B,GAAG;;;gIAGwF,CAAC;AAEjI,MAAM,8BAA8B,GAAG;;;;;;;;;;;;;;;;;oKAiB6H,CAAC;AAErK,MAAM,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;6SAoB4Q,CAAC;AAE9S,MAAM,mBAAmB,GAAG,k9CAAk9C,CAAC;AAE/+C,MAAM,UAAU,eAAe,CAAC,MAAiB;IAC/C,MAAM,CAAC,MAAM,CACX,8BAA8B,EAC9B,mFAAmF,EACnF,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC,EAAE,EACpF,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;QAChB,QAAQ,EAAE,CAAC;gBACT,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,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B,EAChB,iEAAiE,EACjE;QACE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC;KAC3D,EACD,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;QACf,QAAQ,EAAE,CAAC;gBACT,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EACH,0BAA0B,MAAM;;;;GAIxC,mBAAmB;;;;;;;;;;;;;;;;;gDAiB0B;iBACvC;aACF,CAAC;KACH,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,QAuFlD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AASpE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,QAiIlD"}
@@ -3,6 +3,7 @@
3
3
  * MCP Resources — Read-only data sources
4
4
  */
5
5
  import { RecordSaferClient } from "../api-client.js";
6
+ import { MANUAL_RAG_ANSWER_POLICY_MD, MANUAL_RAG_CONFIG_JSON, MANUAL_RAG_PLAYBOOK_MD, } from "./manual-rag-content.js";
6
7
  import { MIXING_GUIDE_MD } from "./mixing-guide-content.js";
7
8
  export function registerResources(server) {
8
9
  const client = new RecordSaferClient();
@@ -55,5 +56,29 @@ export function registerResources(server) {
55
56
  text: MIXING_GUIDE_MD,
56
57
  }],
57
58
  }));
59
+ // recordsafer://docs/manual-answer-policy — 用户说明书回答规则
60
+ server.resource("manual-answer-policy", "recordsafer://docs/manual-answer-policy", { mimeType: "text/markdown", description: "AI answer policy for user-facing Record Safer Pro manual questions." }, async () => ({
61
+ contents: [{
62
+ uri: "recordsafer://docs/manual-answer-policy",
63
+ mimeType: "text/markdown",
64
+ text: MANUAL_RAG_ANSWER_POLICY_MD,
65
+ }],
66
+ }));
67
+ // recordsafer://docs/manual-playbook — 代码校准后的高优先级用户手册口径
68
+ server.resource("manual-playbook", "recordsafer://docs/manual-playbook", { mimeType: "text/markdown", description: "Code-checked manual answer playbook. Read first for user-facing product manual answers." }, async () => ({
69
+ contents: [{
70
+ uri: "recordsafer://docs/manual-playbook",
71
+ mimeType: "text/markdown",
72
+ text: MANUAL_RAG_PLAYBOOK_MD,
73
+ }],
74
+ }));
75
+ // recordsafer://rag/config — 内嵌 RAG 配置与统计
76
+ server.resource("manual-rag-config", "recordsafer://rag/config", { mimeType: "application/json", description: "Embedded manual RAG config and corpus statistics." }, async () => ({
77
+ contents: [{
78
+ uri: "recordsafer://rag/config",
79
+ mimeType: "application/json",
80
+ text: MANUAL_RAG_CONFIG_JSON,
81
+ }],
82
+ }));
58
83
  }
59
84
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,MAAM,UAAU,iBAAiB,CAAC,MAAiB;IACjD,MAAM,MAAM,GAAG,IAAI,iBAAiB,EAAE,CAAC;IAEvC,mCAAmC;IACnC,MAAM,CAAC,QAAQ,CACb,SAAS,EACT,uBAAuB,EACvB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,WAAW,EAAE,qBAAqB,EAAE,EACpE,KAAK,IAAI,EAAE,CAAC,CAAC;QACX,QAAQ,EAAE,CAAC;gBACT,GAAG,EAAE,uBAAuB;gB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