@dshtrading/knowledge 0.1.4 → 0.1.6
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/lib/plugin.d.ts +1 -1
- package/lib/plugin.js +3 -3
- package/package.json +3 -2
package/lib/plugin.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ declare const TRADING_KNOWLEDGE_CARDS_KEY = "tradingKnowledgeCards";
|
|
|
12
12
|
interface TradingEventsPublisher {
|
|
13
13
|
emit(store: 'knowledge'): void;
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
15
|
+
/** 默认存储路径:$DSH_HOME/knowledge/cards.json(缺省 ~/.dsh;与 client-ui-trading 同源解析)。 */
|
|
16
16
|
declare function defaultStorePath(): string;
|
|
17
17
|
interface KnowledgeGraphToolOptions {
|
|
18
18
|
store: KnowledgeCardStore;
|
package/lib/plugin.js
CHANGED
|
@@ -4,7 +4,7 @@ import { createKnowledgeDeleteTool, createKnowledgeGetTool, createKnowledgeInges
|
|
|
4
4
|
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { Service } from "@deepseek-ai/cordis";
|
|
7
|
-
import
|
|
7
|
+
import { dshHomeDir } from "@dshtrading/dsh-home";
|
|
8
8
|
//#region src/plugin.ts
|
|
9
9
|
/** Cordis 插件名 = patch 行 id(TEMPLATES §8)。 */
|
|
10
10
|
const name = "dsh-trading-knowledge";
|
|
@@ -12,9 +12,9 @@ const name = "dsh-trading-knowledge";
|
|
|
12
12
|
const inject = [];
|
|
13
13
|
/** SDK 服务键:知识卡片 store 单实例。 */
|
|
14
14
|
const TRADING_KNOWLEDGE_CARDS_KEY = "tradingKnowledgeCards";
|
|
15
|
-
/**
|
|
15
|
+
/** 默认存储路径:$DSH_HOME/knowledge/cards.json(缺省 ~/.dsh;与 client-ui-trading 同源解析)。 */
|
|
16
16
|
function defaultStorePath() {
|
|
17
|
-
return path.join(
|
|
17
|
+
return path.join(dshHomeDir(), "knowledge", "cards.json");
|
|
18
18
|
}
|
|
19
19
|
/** knowledge_graph 工厂(issue #33 新增;只读结构概要,不倾倒全量 label)。 */
|
|
20
20
|
function createKnowledgeGraphTool(options) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dshtrading/knowledge",
|
|
3
3
|
"description": "Knowledge base data plane for dsh-trading: KnowledgeCard data model, validation, graph builder, atomic file store, and knowledge_ingest / knowledge_search agent tools.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@deepseek-ai/dsh-tools": "^0.1.2-alpha.2",
|
|
29
|
-
"@deepseek-ai/schemastery": "^3.18.2"
|
|
29
|
+
"@deepseek-ai/schemastery": "^3.18.2",
|
|
30
|
+
"@dshtrading/dsh-home": "^0.1.6"
|
|
30
31
|
},
|
|
31
32
|
"peerDependencies": {
|
|
32
33
|
"@deepseek-ai/cordis": ">=4.0.0"
|