@hedgehog-finance/hedgehog-plugin 1.0.21 → 1.0.23
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/dist/index.d.ts +4 -3
- package/dist/index.js +49 -6
- package/dist/index.js.map +1 -1
- package/dist/setup-api.d.ts +2 -0
- package/dist/setup-api.js +8 -0
- package/dist/setup-api.js.map +1 -0
- package/dist/src/channel.js +25 -23
- package/dist/src/channel.js.map +1 -1
- package/dist/src/core/database.js +449 -39
- package/dist/src/core/database.js.map +1 -1
- package/dist/src/dailyMorningBriefingCron.d.ts +46 -0
- package/dist/src/dailyMorningBriefingCron.js +82 -0
- package/dist/src/dailyMorningBriefingCron.js.map +1 -0
- package/dist/src/features/chartOutput.d.ts +2 -0
- package/dist/src/features/chartOutput.js +35 -0
- package/dist/src/features/chartOutput.js.map +1 -0
- package/dist/src/features/dailyMorningBriefing/schema.d.ts +56 -0
- package/dist/src/features/dailyMorningBriefing/schema.js +22 -0
- package/dist/src/features/dailyMorningBriefing/schema.js.map +1 -0
- package/dist/src/features/dailyMorningBriefing/tools.d.ts +12 -0
- package/dist/src/features/dailyMorningBriefing/tools.js +204 -0
- package/dist/src/features/dailyMorningBriefing/tools.js.map +1 -0
- package/dist/src/features/deepReasoning/schema.d.ts +43 -0
- package/dist/src/features/deepReasoning/schema.js +17 -0
- package/dist/src/features/deepReasoning/schema.js.map +1 -0
- package/dist/src/features/deepReasoning/tools.d.ts +12 -0
- package/dist/src/features/deepReasoning/tools.js +163 -0
- package/dist/src/features/deepReasoning/tools.js.map +1 -0
- package/dist/src/features/index.d.ts +2 -1
- package/dist/src/features/index.js +9 -1
- package/dist/src/features/index.js.map +1 -1
- package/dist/src/features/informationVerification/schema.d.ts +43 -0
- package/dist/src/features/informationVerification/schema.js +17 -0
- package/dist/src/features/informationVerification/schema.js.map +1 -0
- package/dist/src/features/informationVerification/tools.d.ts +12 -0
- package/dist/src/features/informationVerification/tools.js +162 -0
- package/dist/src/features/informationVerification/tools.js.map +1 -0
- package/dist/src/features/notes/schema.d.ts +136 -39
- package/dist/src/features/notes/schema.js +13 -10
- package/dist/src/features/notes/schema.js.map +1 -1
- package/dist/src/features/notes/tools.d.ts +1 -0
- package/dist/src/features/notes/tools.js +47 -14
- package/dist/src/features/notes/tools.js.map +1 -1
- package/dist/src/features/pluginInfo/schema.d.ts +79 -0
- package/dist/src/features/pluginInfo/schema.js +14 -0
- package/dist/src/features/pluginInfo/schema.js.map +1 -0
- package/dist/src/features/pluginInfo/tools.d.ts +1 -0
- package/dist/src/features/pluginInfo/tools.js +157 -2
- package/dist/src/features/pluginInfo/tools.js.map +1 -1
- package/dist/src/features/profileLibrary/schema.d.ts +34 -6
- package/dist/src/features/profileLibrary/schema.js +1 -1
- package/dist/src/features/profileLibrary/schema.js.map +1 -1
- package/dist/src/features/stockAnalysis/schema.d.ts +224 -31
- package/dist/src/features/stockAnalysis/schema.js +76 -12
- package/dist/src/features/stockAnalysis/schema.js.map +1 -1
- package/dist/src/features/stockAnalysis/tools.d.ts +6 -4
- package/dist/src/features/stockAnalysis/tools.js +389 -44
- package/dist/src/features/stockAnalysis/tools.js.map +1 -1
- package/dist/src/features/stockBasic/schema.d.ts +149 -0
- package/dist/src/features/stockBasic/schema.js +26 -0
- package/dist/src/features/stockBasic/schema.js.map +1 -0
- package/dist/src/features/stockBasic/tools.d.ts +12 -0
- package/dist/src/features/stockBasic/tools.js +124 -0
- package/dist/src/features/stockBasic/tools.js.map +1 -0
- package/dist/src/features/watchlist/logic.d.ts +3 -3
- package/dist/src/features/watchlist/logic.js +47 -46
- package/dist/src/features/watchlist/logic.js.map +1 -1
- package/dist/src/features/watchlist/schema.d.ts +89 -54
- package/dist/src/features/watchlist/schema.js +7 -4
- package/dist/src/features/watchlist/schema.js.map +1 -1
- package/dist/src/features/watchlist/tools.d.ts +106 -59
- package/dist/src/features/watchlist/tools.js +182 -104
- package/dist/src/features/watchlist/tools.js.map +1 -1
- package/dist/src/openclawConfig.d.ts +6 -0
- package/dist/src/openclawConfig.js +74 -0
- package/dist/src/openclawConfig.js.map +1 -0
- package/dist/src/openclawConstants.d.ts +4 -0
- package/dist/src/openclawConstants.js +10 -0
- package/dist/src/openclawConstants.js.map +1 -0
- package/dist/src/runtime.js +20 -0
- package/dist/src/runtime.js.map +1 -1
- package/index.ts +52 -5
- package/openclaw.plugin.json +24 -0
- package/package.json +20 -5
- package/setup-api.ts +10 -0
- package/src/channel.ts +26 -25
- package/src/core/database.ts +447 -40
- package/src/dailyMorningBriefingCron.ts +129 -0
- package/src/features/chartOutput.ts +35 -0
- package/src/features/dailyMorningBriefing/schema.ts +38 -0
- package/src/features/dailyMorningBriefing/tools.ts +246 -0
- package/src/features/deepReasoning/schema.ts +22 -0
- package/src/features/deepReasoning/tools.ts +182 -0
- package/src/features/index.ts +11 -2
- package/src/features/informationVerification/schema.ts +22 -0
- package/src/features/informationVerification/tools.ts +181 -0
- package/src/features/notes/schema.ts +17 -12
- package/src/features/notes/tools.ts +54 -17
- package/src/features/pluginInfo/schema.ts +19 -0
- package/src/features/pluginInfo/tools.ts +173 -2
- package/src/features/profileLibrary/schema.ts +1 -1
- package/src/features/stockAnalysis/schema.ts +99 -17
- package/src/features/stockAnalysis/tools.ts +447 -49
- package/src/features/stockBasic/schema.ts +33 -0
- package/src/features/stockBasic/tools.ts +157 -0
- package/src/features/watchlist/logic.ts +56 -53
- package/src/features/watchlist/schema.ts +11 -6
- package/src/features/watchlist/tools.ts +191 -106
- package/src/openclawConfig.ts +101 -0
- package/src/openclawConstants.ts +11 -0
- package/src/runtime.ts +19 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { getDB } from "../../core/database.js";
|
|
2
|
+
import { BuildDeepReasoningMessageParamsSchema, GetDeepReasoningDetailParamsSchema, QueryDeepReasoningHistoryParamsSchema } from "./schema.js";
|
|
3
|
+
const DEEP_REASONING_SKILL = "hedgehog-news-deep-reasoning";
|
|
4
|
+
const BuildDeepReasoningMessageAgentToolSchema = {
|
|
5
|
+
type: "object",
|
|
6
|
+
additionalProperties: false,
|
|
7
|
+
required: ["newsId", "sourceTitle", "sourceContent"],
|
|
8
|
+
properties: {
|
|
9
|
+
newsId: { type: "string", description: "新闻 ID,例如 news-5" },
|
|
10
|
+
sourceTitle: { type: "string", description: "新闻标题" },
|
|
11
|
+
sourceContent: { type: "string", description: "新闻正文" }
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
function buildContent(args) {
|
|
15
|
+
return [
|
|
16
|
+
"对这条新闻进行深度推演",
|
|
17
|
+
"",
|
|
18
|
+
`新闻标题:${args.sourceTitle}`,
|
|
19
|
+
"",
|
|
20
|
+
"新闻正文:",
|
|
21
|
+
args.sourceContent
|
|
22
|
+
].join("\n");
|
|
23
|
+
}
|
|
24
|
+
function buildDeepReasoningMessage(args) {
|
|
25
|
+
const buildGeneratingSaveParams = () => JSON.stringify({
|
|
26
|
+
sourceId: args.newsId,
|
|
27
|
+
sourceTitle: args.sourceTitle,
|
|
28
|
+
status: "generating",
|
|
29
|
+
content: ""
|
|
30
|
+
});
|
|
31
|
+
const buildFinalSaveParams = (status) => JSON.stringify({
|
|
32
|
+
sourceId: args.newsId,
|
|
33
|
+
status,
|
|
34
|
+
content: "..."
|
|
35
|
+
});
|
|
36
|
+
return JSON.stringify({
|
|
37
|
+
cw_system_prompt: [
|
|
38
|
+
`开始分析前必须先调用 save_article_deep_reasoning_analysis,参数为 ${buildGeneratingSaveParams()};如果返回 skipped=true,必须立即停止,不要继续调用 skill 或生成正文。`,
|
|
39
|
+
"仅允许按上述标准参数调用 save_article_deep_reasoning_analysis;如果无法提供标准参数,或参数包含标准参数以外的字段,不要调用 save_article_deep_reasoning_analysis。",
|
|
40
|
+
`必须触发并使用 ${DEEP_REASONING_SKILL} skill 生成新闻事件深度推演报告。`,
|
|
41
|
+
`生成成功后必须调用 save_article_deep_reasoning_analysis,参数为 ${buildFinalSaveParams("completed")},content 传最终完整深度推演报告正文。`,
|
|
42
|
+
`生成失败后必须调用 save_article_deep_reasoning_analysis,参数为 ${buildFinalSaveParams("failed")},content 存放完整错误信息。`
|
|
43
|
+
].join("\n"),
|
|
44
|
+
cw_context: JSON.stringify({
|
|
45
|
+
sourceId: args.newsId,
|
|
46
|
+
sourceTitle: args.sourceTitle
|
|
47
|
+
}),
|
|
48
|
+
cw_content: buildContent(args),
|
|
49
|
+
cw_output: [
|
|
50
|
+
`输出结构以 ${DEEP_REASONING_SKILL} skill 的交付模板为准。`
|
|
51
|
+
].join("\n")
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function selectGeneratingDeepReasoning(userId, sourceId) {
|
|
55
|
+
const db = getDB();
|
|
56
|
+
return db.prepare(`
|
|
57
|
+
SELECT id, sourceId, sourceTitle, status, content, createdAt, updatedAt
|
|
58
|
+
FROM news_deep_reasoning_analysis
|
|
59
|
+
WHERE userId = ? AND sourceId = ? AND status = 'generating'
|
|
60
|
+
ORDER BY updatedAt DESC, createdAt DESC
|
|
61
|
+
LIMIT 1
|
|
62
|
+
`).get(userId, sourceId);
|
|
63
|
+
}
|
|
64
|
+
export const deepReasoningTools = {
|
|
65
|
+
query_deep_reasoning_history: {
|
|
66
|
+
name: "query_deep_reasoning_history",
|
|
67
|
+
label: "查询深度推演列表",
|
|
68
|
+
description: "分页查询深度推演记录列表。返回记录标识、来源 ID、标题、状态和时间字段;列表结果不包含 content,详情请使用 get_deep_reasoning_detail 查询。",
|
|
69
|
+
parameters: QueryDeepReasoningHistoryParamsSchema,
|
|
70
|
+
registerTool: false,
|
|
71
|
+
async execute(params, ctx) {
|
|
72
|
+
const args = QueryDeepReasoningHistoryParamsSchema.parse(params ?? {});
|
|
73
|
+
const db = getDB();
|
|
74
|
+
const userId = ctx?.userId || "default";
|
|
75
|
+
const offset = (args.page - 1) * args.pageSize;
|
|
76
|
+
const rows = db.prepare(`
|
|
77
|
+
SELECT id, sourceId, sourceTitle, status, createdAt, updatedAt
|
|
78
|
+
FROM news_deep_reasoning_analysis
|
|
79
|
+
WHERE userId = ?
|
|
80
|
+
ORDER BY updatedAt DESC, createdAt DESC
|
|
81
|
+
LIMIT ? OFFSET ?
|
|
82
|
+
`).all(userId, args.pageSize, offset);
|
|
83
|
+
const countRow = db.prepare(`
|
|
84
|
+
SELECT COUNT(*) AS total FROM news_deep_reasoning_analysis WHERE userId = ?
|
|
85
|
+
`).get(userId);
|
|
86
|
+
const total = countRow.total || 0;
|
|
87
|
+
return JSON.stringify({
|
|
88
|
+
success: true,
|
|
89
|
+
data: rows,
|
|
90
|
+
pagination: {
|
|
91
|
+
page: args.page,
|
|
92
|
+
pageSize: args.pageSize,
|
|
93
|
+
total,
|
|
94
|
+
totalPages: Math.ceil(total / args.pageSize)
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
get_deep_reasoning_detail: {
|
|
100
|
+
name: "get_deep_reasoning_detail",
|
|
101
|
+
label: "查询深度推演详情",
|
|
102
|
+
description: "根据记录 ID 或 sourceId 查询深度推演完整详情,包含 content 正文及所有元数据。",
|
|
103
|
+
parameters: GetDeepReasoningDetailParamsSchema,
|
|
104
|
+
registerTool: false,
|
|
105
|
+
async execute(params, ctx) {
|
|
106
|
+
const args = GetDeepReasoningDetailParamsSchema.parse(params);
|
|
107
|
+
const db = getDB();
|
|
108
|
+
if (args.sourceId) {
|
|
109
|
+
const row = db.prepare(`
|
|
110
|
+
SELECT id, sourceId, sourceTitle, status, content, createdAt, updatedAt
|
|
111
|
+
FROM news_deep_reasoning_analysis
|
|
112
|
+
WHERE sourceId = ?
|
|
113
|
+
ORDER BY updatedAt DESC, createdAt DESC
|
|
114
|
+
LIMIT 1
|
|
115
|
+
`).get(args.sourceId);
|
|
116
|
+
return JSON.stringify({ success: true, data: row || null });
|
|
117
|
+
}
|
|
118
|
+
const row = db.prepare(`
|
|
119
|
+
SELECT id, sourceId, sourceTitle, status, content, createdAt, updatedAt
|
|
120
|
+
FROM news_deep_reasoning_analysis
|
|
121
|
+
WHERE id = ?
|
|
122
|
+
ORDER BY updatedAt DESC, createdAt DESC
|
|
123
|
+
LIMIT 1
|
|
124
|
+
`).get(args.id);
|
|
125
|
+
return JSON.stringify({ success: true, data: row || null });
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
build_deep_reasoning_message: {
|
|
129
|
+
name: "build_deep_reasoning_message",
|
|
130
|
+
label: "构建深度推演消息",
|
|
131
|
+
description: "根据新闻 ID、标题和正文构建用于主动 RPC 发起 Agent 新闻深度推演任务的标准消息。该工具只返回提示词消息体,不触发定时任务,也不保存分析结果。",
|
|
132
|
+
parameters: BuildDeepReasoningMessageAgentToolSchema,
|
|
133
|
+
registerTool: false,
|
|
134
|
+
async execute(params, ctx) {
|
|
135
|
+
const args = BuildDeepReasoningMessageParamsSchema.parse(params);
|
|
136
|
+
const userId = ctx?.userId || "default";
|
|
137
|
+
const generating = selectGeneratingDeepReasoning(userId, args.newsId);
|
|
138
|
+
if (generating) {
|
|
139
|
+
return JSON.stringify({
|
|
140
|
+
success: true,
|
|
141
|
+
skipped: true,
|
|
142
|
+
reason: "already_generating",
|
|
143
|
+
data: generating
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
const message = buildDeepReasoningMessage(args);
|
|
147
|
+
return JSON.stringify({
|
|
148
|
+
success: true,
|
|
149
|
+
data: {
|
|
150
|
+
message,
|
|
151
|
+
payload: JSON.parse(message),
|
|
152
|
+
sourceId: args.newsId,
|
|
153
|
+
saveParams: {
|
|
154
|
+
sourceId: args.newsId,
|
|
155
|
+
sourceTitle: args.sourceTitle
|
|
156
|
+
},
|
|
157
|
+
skill: DEEP_REASONING_SKILL
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../../src/features/deepReasoning/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BAC3B;aACD,CAAC,CAAC;QACJ,CAAC;KACD;CACD,CAAC"}
|
|
@@ -3,11 +3,19 @@ import { profileLibraryTools } from "./profileLibrary/tools.js";
|
|
|
3
3
|
import { noteTools } from "./notes/tools.js";
|
|
4
4
|
import { stockAnalysisTools } from "./stockAnalysis/tools.js";
|
|
5
5
|
import { pluginInfoTools } from "./pluginInfo/tools.js";
|
|
6
|
+
import { dailyMorningBriefingTools } from "./dailyMorningBriefing/tools.js";
|
|
7
|
+
import { stockBasicTools } from "./stockBasic/tools.js";
|
|
8
|
+
import { informationVerificationTools } from "./informationVerification/tools.js";
|
|
9
|
+
import { deepReasoningTools } from "./deepReasoning/tools.js";
|
|
6
10
|
export const allFeaturesTools = {
|
|
7
11
|
...watchlistTools,
|
|
8
12
|
...profileLibraryTools,
|
|
9
13
|
...noteTools,
|
|
10
14
|
...stockAnalysisTools,
|
|
11
|
-
...pluginInfoTools
|
|
15
|
+
...pluginInfoTools,
|
|
16
|
+
...dailyMorningBriefingTools,
|
|
17
|
+
...stockBasicTools,
|
|
18
|
+
...informationVerificationTools,
|
|
19
|
+
...deepReasoningTools
|
|
12
20
|
};
|
|
13
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAY9D,MAAM,CAAC,MAAM,gBAAgB,GAAgC;IACzD,GAAG,cAAc;IACjB,GAAG,mBAAmB;IACtB,GAAG,SAAS;IACZ,GAAG,kBAAkB;IACrB,GAAG,eAAe;IAClB,GAAG,yBAAyB;IAC5B,GAAG,eAAe;IAClB,GAAG,4BAA4B;IAC/B,GAAG,kBAAkB;CACxB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const BuildInformationVerificationMessageParamsSchema: z.ZodObject<{
|
|
3
|
+
newsId: z.ZodString;
|
|
4
|
+
sourceTitle: z.ZodString;
|
|
5
|
+
sourceContent: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
sourceTitle: string;
|
|
8
|
+
sourceContent: string;
|
|
9
|
+
newsId: string;
|
|
10
|
+
}, {
|
|
11
|
+
sourceTitle: string;
|
|
12
|
+
sourceContent: string;
|
|
13
|
+
newsId: string;
|
|
14
|
+
}>;
|
|
15
|
+
export type BuildInformationVerificationMessageParams = z.infer<typeof BuildInformationVerificationMessageParamsSchema>;
|
|
16
|
+
export declare const QueryInformationVerificationHistoryParamsSchema: z.ZodObject<{
|
|
17
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
18
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
page: number;
|
|
21
|
+
pageSize: number;
|
|
22
|
+
}, {
|
|
23
|
+
page?: number | undefined;
|
|
24
|
+
pageSize?: number | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
export type QueryInformationVerificationHistoryParams = z.infer<typeof QueryInformationVerificationHistoryParamsSchema>;
|
|
27
|
+
export declare const GetInformationVerificationDetailParamsSchema: z.ZodEffects<z.ZodObject<{
|
|
28
|
+
id: z.ZodOptional<z.ZodString>;
|
|
29
|
+
sourceId: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
sourceId?: string | undefined;
|
|
32
|
+
id?: string | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
sourceId?: string | undefined;
|
|
35
|
+
id?: string | undefined;
|
|
36
|
+
}>, {
|
|
37
|
+
sourceId?: string | undefined;
|
|
38
|
+
id?: string | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
sourceId?: string | undefined;
|
|
41
|
+
id?: string | undefined;
|
|
42
|
+
}>;
|
|
43
|
+
export type GetInformationVerificationDetailParams = z.infer<typeof GetInformationVerificationDetailParamsSchema>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const BuildInformationVerificationMessageParamsSchema = z.object({
|
|
3
|
+
newsId: z.string().trim().min(1).describe("新闻 ID,例如 news-5"),
|
|
4
|
+
sourceTitle: z.string().trim().min(1).describe("新闻标题"),
|
|
5
|
+
sourceContent: z.string().trim().min(1).describe("新闻正文")
|
|
6
|
+
});
|
|
7
|
+
export const QueryInformationVerificationHistoryParamsSchema = z.object({
|
|
8
|
+
page: z.number().int().min(1).default(1).describe("页码"),
|
|
9
|
+
pageSize: z.number().int().min(1).max(50).default(10).describe("每页数量,默认 10")
|
|
10
|
+
});
|
|
11
|
+
export const GetInformationVerificationDetailParamsSchema = z.object({
|
|
12
|
+
id: z.string().trim().min(1).optional().describe("记录 ID"),
|
|
13
|
+
sourceId: z.string().trim().min(1).optional().describe("新闻来源 ID,例如 news-5")
|
|
14
|
+
}).refine((value) => value.id || value.sourceId, {
|
|
15
|
+
message: "id 或 sourceId 至少提供一个"
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/features/informationVerification/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,+CAA+C,GAAG,CAAC,CAAC,MAAM,CAAC;IACvE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC;IAC5D,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;IACtD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;CACxD,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,+CAA+C,GAAG,CAAC,CAAC,MAAM,CAAC;IACvE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;IACvD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC;CAC5E,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,4CAA4C,GAAG,CAAC,CAAC,MAAM,CAAC;IACpE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;IACzD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;CAC3E,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,QAAQ,EAAE;IAChD,OAAO,EAAE,sBAAsB;CAC/B,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface RuntimeTool {
|
|
2
|
+
name: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: unknown;
|
|
6
|
+
registerTool?: boolean;
|
|
7
|
+
execute(params: unknown, ctx?: {
|
|
8
|
+
userId: string;
|
|
9
|
+
}): Promise<string>;
|
|
10
|
+
}
|
|
11
|
+
export declare const informationVerificationTools: Record<string, RuntimeTool>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { getDB } from "../../core/database.js";
|
|
2
|
+
import { BuildInformationVerificationMessageParamsSchema, GetInformationVerificationDetailParamsSchema, QueryInformationVerificationHistoryParamsSchema } from "./schema.js";
|
|
3
|
+
const INFORMATION_VERIFICATION_SKILL = "hedgehog-information-verification";
|
|
4
|
+
const BuildInformationVerificationMessageAgentToolSchema = {
|
|
5
|
+
type: "object",
|
|
6
|
+
additionalProperties: false,
|
|
7
|
+
required: ["newsId", "sourceTitle", "sourceContent"],
|
|
8
|
+
properties: {
|
|
9
|
+
newsId: { type: "string", description: "新闻 ID,例如 news-5" },
|
|
10
|
+
sourceTitle: { type: "string", description: "新闻标题" },
|
|
11
|
+
sourceContent: { type: "string", description: "新闻正文" }
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
function buildContent(args) {
|
|
15
|
+
return [
|
|
16
|
+
"对这条新闻进行信息求证",
|
|
17
|
+
"",
|
|
18
|
+
`新闻标题:${args.sourceTitle}`,
|
|
19
|
+
"",
|
|
20
|
+
"新闻正文:",
|
|
21
|
+
args.sourceContent
|
|
22
|
+
].join("\n");
|
|
23
|
+
}
|
|
24
|
+
function buildInformationVerificationMessage(args) {
|
|
25
|
+
const buildGeneratingSaveParams = () => JSON.stringify({
|
|
26
|
+
sourceId: args.newsId,
|
|
27
|
+
sourceTitle: args.sourceTitle,
|
|
28
|
+
status: "generating",
|
|
29
|
+
content: ""
|
|
30
|
+
});
|
|
31
|
+
const buildFinalSaveParams = (status) => JSON.stringify({
|
|
32
|
+
sourceId: args.newsId,
|
|
33
|
+
status,
|
|
34
|
+
content: "..."
|
|
35
|
+
});
|
|
36
|
+
return JSON.stringify({
|
|
37
|
+
cw_system_prompt: [
|
|
38
|
+
`开始分析前必须先调用 save_information_verification,参数为 ${buildGeneratingSaveParams()};如果返回 skipped=true,必须立即停止,不要继续调用 skill 或生成正文。`,
|
|
39
|
+
`必须触发并使用 ${INFORMATION_VERIFICATION_SKILL} skill 生成信息求证与置信度审计报告。`,
|
|
40
|
+
`生成成功后必须调用 save_information_verification,参数为 ${buildFinalSaveParams("completed")},content 传最终完整求证报告正文。`,
|
|
41
|
+
`生成失败后必须调用 save_information_verification,参数为 ${buildFinalSaveParams("failed")},content 存放完整错误信息。`
|
|
42
|
+
].join("\n"),
|
|
43
|
+
cw_context: JSON.stringify({
|
|
44
|
+
sourceId: args.newsId,
|
|
45
|
+
sourceTitle: args.sourceTitle
|
|
46
|
+
}),
|
|
47
|
+
cw_content: buildContent(args),
|
|
48
|
+
cw_output: [
|
|
49
|
+
`输出结构以 ${INFORMATION_VERIFICATION_SKILL} skill 的交付模板为准。`
|
|
50
|
+
].join("\n")
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function selectGeneratingInformationVerification(userId, sourceId) {
|
|
54
|
+
const db = getDB();
|
|
55
|
+
return db.prepare(`
|
|
56
|
+
SELECT id, sourceId, sourceTitle, status, content, createdAt, updatedAt
|
|
57
|
+
FROM news_fact_check_analysis
|
|
58
|
+
WHERE userId = ? AND sourceId = ? AND status = 'generating'
|
|
59
|
+
ORDER BY updatedAt DESC, createdAt DESC
|
|
60
|
+
LIMIT 1
|
|
61
|
+
`).get(userId, sourceId);
|
|
62
|
+
}
|
|
63
|
+
export const informationVerificationTools = {
|
|
64
|
+
query_information_verification_history: {
|
|
65
|
+
name: "query_information_verification_history",
|
|
66
|
+
label: "查询信息求证列表",
|
|
67
|
+
description: "分页查询信息求证记录列表。返回记录标识、来源 ID、标题、状态和时间字段;列表结果不包含 content,详情请使用 get_information_verification_detail 查询。",
|
|
68
|
+
parameters: QueryInformationVerificationHistoryParamsSchema,
|
|
69
|
+
registerTool: false,
|
|
70
|
+
async execute(params, ctx) {
|
|
71
|
+
const args = QueryInformationVerificationHistoryParamsSchema.parse(params ?? {});
|
|
72
|
+
const db = getDB();
|
|
73
|
+
const userId = ctx?.userId || "default";
|
|
74
|
+
const offset = (args.page - 1) * args.pageSize;
|
|
75
|
+
const rows = db.prepare(`
|
|
76
|
+
SELECT id, sourceId, sourceTitle, status, createdAt, updatedAt
|
|
77
|
+
FROM news_fact_check_analysis
|
|
78
|
+
WHERE userId = ?
|
|
79
|
+
ORDER BY updatedAt DESC, createdAt DESC
|
|
80
|
+
LIMIT ? OFFSET ?
|
|
81
|
+
`).all(userId, args.pageSize, offset);
|
|
82
|
+
const countRow = db.prepare(`
|
|
83
|
+
SELECT COUNT(*) AS total FROM news_fact_check_analysis WHERE userId = ?
|
|
84
|
+
`).get(userId);
|
|
85
|
+
const total = countRow.total || 0;
|
|
86
|
+
return JSON.stringify({
|
|
87
|
+
success: true,
|
|
88
|
+
data: rows,
|
|
89
|
+
pagination: {
|
|
90
|
+
page: args.page,
|
|
91
|
+
pageSize: args.pageSize,
|
|
92
|
+
total,
|
|
93
|
+
totalPages: Math.ceil(total / args.pageSize)
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
get_information_verification_detail: {
|
|
99
|
+
name: "get_information_verification_detail",
|
|
100
|
+
label: "查询信息求证详情",
|
|
101
|
+
description: "根据记录 ID 或 sourceId 查询信息求证完整详情,包含 content 正文及所有元数据。",
|
|
102
|
+
parameters: GetInformationVerificationDetailParamsSchema,
|
|
103
|
+
registerTool: false,
|
|
104
|
+
async execute(params, ctx) {
|
|
105
|
+
const args = GetInformationVerificationDetailParamsSchema.parse(params);
|
|
106
|
+
const db = getDB();
|
|
107
|
+
if (args.sourceId) {
|
|
108
|
+
const row = db.prepare(`
|
|
109
|
+
SELECT id, sourceId, sourceTitle, status, content, createdAt, updatedAt
|
|
110
|
+
FROM news_fact_check_analysis
|
|
111
|
+
WHERE sourceId = ?
|
|
112
|
+
ORDER BY updatedAt DESC, createdAt DESC
|
|
113
|
+
LIMIT 1
|
|
114
|
+
`).get(args.sourceId);
|
|
115
|
+
return JSON.stringify({ success: true, data: row || null });
|
|
116
|
+
}
|
|
117
|
+
const row = db.prepare(`
|
|
118
|
+
SELECT id, sourceId, sourceTitle, status, content, createdAt, updatedAt
|
|
119
|
+
FROM news_fact_check_analysis
|
|
120
|
+
WHERE id = ?
|
|
121
|
+
ORDER BY updatedAt DESC, createdAt DESC
|
|
122
|
+
LIMIT 1
|
|
123
|
+
`).get(args.id);
|
|
124
|
+
return JSON.stringify({ success: true, data: row || null });
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
build_information_verification_message: {
|
|
128
|
+
name: "build_information_verification_message",
|
|
129
|
+
label: "构建信息求证消息",
|
|
130
|
+
description: "根据新闻 ID、标题和正文构建用于主动 RPC 发起 Agent 信息求证任务的标准消息。该工具只返回提示词消息体,不触发定时任务,也不保存分析结果。",
|
|
131
|
+
parameters: BuildInformationVerificationMessageAgentToolSchema,
|
|
132
|
+
registerTool: false,
|
|
133
|
+
async execute(params, ctx) {
|
|
134
|
+
const args = BuildInformationVerificationMessageParamsSchema.parse(params);
|
|
135
|
+
const userId = ctx?.userId || "default";
|
|
136
|
+
const generating = selectGeneratingInformationVerification(userId, args.newsId);
|
|
137
|
+
if (generating) {
|
|
138
|
+
return JSON.stringify({
|
|
139
|
+
success: true,
|
|
140
|
+
skipped: true,
|
|
141
|
+
reason: "already_generating",
|
|
142
|
+
data: generating
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
const message = buildInformationVerificationMessage(args);
|
|
146
|
+
return JSON.stringify({
|
|
147
|
+
success: true,
|
|
148
|
+
data: {
|
|
149
|
+
message,
|
|
150
|
+
payload: JSON.parse(message),
|
|
151
|
+
sourceId: args.newsId,
|
|
152
|
+
saveParams: {
|
|
153
|
+
sourceId: args.newsId,
|
|
154
|
+
sourceTitle: args.sourceTitle
|
|
155
|
+
},
|
|
156
|
+
skill: INFORMATION_VERIFICATION_SKILL
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../../src/features/informationVerification/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAEN,+CAA+C,EAC/C,4CAA4C,EAC5C,+CAA+C,EAC/C,MAAM,aAAa,CAAC;AAWrB,MAAM,8BAA8B,GAAG,mCAAmC,CAAC;AAE3E,MAAM,kDAAkD,GAAG;IAC1D,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,eAAe,CAAC;IACpD,UAAU,EAAE;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