@wanji_dsh/dsh-sales 0.11.2 → 0.11.4
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.zh.md +23 -3
- package/config/langfuse.production.example.json +11 -0
- package/config/production.cordis.yml +36 -0
- package/dist/client.js +238 -113
- package/dist/host.js +1581 -988
- package/dist/types/agent-knowledge.d.ts +8 -1
- package/dist/types/company/identity.d.ts +2 -0
- package/dist/types/diagnostics.d.ts +28 -0
- package/dist/types/host.d.ts +6 -1
- package/dist/types/knowledge-host.d.ts +5 -2
- package/dist/types/knowledge-http-correlation.d.ts +14 -0
- package/dist/types/knowledge-privacy.d.ts +3 -1
- package/dist/types/langfuse-config.d.ts +1 -1
- package/dist/types/production-endpoints.d.ts +8 -0
- package/dist/types/question-tracing.d.ts +2 -0
- package/dist/types/sales-model.d.ts +2 -0
- package/dist/types/update/coordinator.d.ts +6 -0
- package/dist/types/update/types.d.ts +2 -0
- package/dist/types/wechat/runtime.d.ts +1 -0
- package/dist/types/wechat/service.d.ts +2 -0
- package/dist/types/weknora-http.d.ts +1 -1
- package/docs/auto-update.md +3 -3
- package/docs/diagnostics.zh.md +43 -0
- package/package.json +4 -1
- package/runtime/wechat-manifest.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type GatewayRequest } from './knowledge-http-correlation.ts';
|
|
1
2
|
import { LangfuseOutbox, type ObservationEvent } from './langfuse-outbox.ts';
|
|
2
3
|
export interface KnowledgeExecution {
|
|
3
4
|
token: symbol;
|
|
@@ -27,6 +28,7 @@ interface Options {
|
|
|
27
28
|
directory: string;
|
|
28
29
|
knowledgeBaseId: string;
|
|
29
30
|
toolPrefix: string;
|
|
31
|
+
environment?: 'test' | 'production';
|
|
30
32
|
material?: {
|
|
31
33
|
knowledgeBaseId: string;
|
|
32
34
|
toolPrefix: string;
|
|
@@ -38,6 +40,8 @@ export declare function agentMetricValues(event: ObservationEvent): Record<strin
|
|
|
38
40
|
export declare function deliverAgentEvent(event: ObservationEvent): Promise<void>;
|
|
39
41
|
export declare class AgentKnowledgeObserver {
|
|
40
42
|
private readonly options;
|
|
43
|
+
private readonly production;
|
|
44
|
+
private readonly http?;
|
|
41
45
|
private readonly started;
|
|
42
46
|
readonly outbox: LangfuseOutbox;
|
|
43
47
|
private readonly judgments;
|
|
@@ -64,10 +68,13 @@ export declare class AgentKnowledgeObserver {
|
|
|
64
68
|
private eligible;
|
|
65
69
|
private callScope;
|
|
66
70
|
private rememberDocumentScopes;
|
|
71
|
+
private productionSearchOutput;
|
|
72
|
+
private ownsDestination;
|
|
67
73
|
private begin;
|
|
68
74
|
private queue;
|
|
69
75
|
/** At most 20ms local journal wait; no network or model is awaited by the search. */
|
|
70
|
-
start(exec: KnowledgeExecution): Promise<void>;
|
|
76
|
+
start(exec: KnowledgeExecution, httpRequests?: GatewayRequest[]): Promise<void>;
|
|
77
|
+
run<T>(exec: KnowledgeExecution, next: () => Promise<T>): Promise<T>;
|
|
71
78
|
/** Harness emits a frozen final result. Snapshot synchronously, persist asynchronously. */
|
|
72
79
|
finish(exec: KnowledgeExecution, result: KnowledgeOutcome): void;
|
|
73
80
|
recordMaterialMetadata(knowledgeBaseId: string, startedAt: string, elapsedMs: number, status: string): void;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const COMPANY_IDENTITY_ENDPOINT = "wanji-sales-company/identity";
|
|
2
|
+
export declare const COMPANY_LOGIN_PATH = "/api/v1/sales-company/device/login";
|
|
3
|
+
export declare function isDingTalkLaunchUrl(url: URL): boolean;
|
|
2
4
|
export declare const COMPANY_FLASH: {
|
|
3
5
|
readonly provider: "wanji-sales-company-flash";
|
|
4
6
|
readonly model: "deepseek-v4.1-flash";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type Outcome = 'started' | 'ok' | 'failed' | 'cancelled' | 'unavailable' | 'pending' | 'skipped';
|
|
2
|
+
type Facts = {
|
|
3
|
+
elapsedMs?: number;
|
|
4
|
+
httpStatus?: number;
|
|
5
|
+
count?: number;
|
|
6
|
+
bytes?: number;
|
|
7
|
+
configured?: boolean;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function diagnosticsDirectory(): string;
|
|
11
|
+
export declare class DiagnosticJournal {
|
|
12
|
+
private readonly hostId;
|
|
13
|
+
private pending;
|
|
14
|
+
private dropped;
|
|
15
|
+
private writes;
|
|
16
|
+
private file?;
|
|
17
|
+
private readonly directory;
|
|
18
|
+
constructor(directory?: string);
|
|
19
|
+
record(operation: string, outcome: Outcome, facts: Facts, error: unknown, operationId?: string): void;
|
|
20
|
+
flush(): Promise<void>;
|
|
21
|
+
private append;
|
|
22
|
+
}
|
|
23
|
+
export declare function withDiagnostics<T>(run: () => T, target?: DiagnosticJournal): T;
|
|
24
|
+
export declare function diagnostic(operation: string, outcome: Outcome, facts?: Facts, error?: unknown): void;
|
|
25
|
+
export declare function diagnosticOperation<T>(run: () => T, operationId?: string): T;
|
|
26
|
+
export declare function diagnosticCallback<A extends unknown[], T>(run: (...args: A) => T): (...args: A) => T;
|
|
27
|
+
export declare function diagnosticHttp(operation: string, send: () => Promise<Response>, signal?: AbortSignal): Promise<Response>;
|
|
28
|
+
export {};
|
package/dist/types/host.d.ts
CHANGED
|
@@ -29,8 +29,13 @@ type KnowledgePostDecision = {
|
|
|
29
29
|
value?: unknown;
|
|
30
30
|
additionalContexts?: unknown[];
|
|
31
31
|
};
|
|
32
|
+
type ConfigInput = Omit<Partial<Config>, 'materialMetadata'> & {
|
|
33
|
+
materialMetadata?: Omit<NonNullable<Config['materialMetadata']>, 'baseUrl'> & {
|
|
34
|
+
baseUrl?: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
32
37
|
/** One standard schema validates both capabilities before either registers. */
|
|
33
|
-
export declare const Config: Schema<
|
|
38
|
+
export declare const Config: Schema<ConfigInput, Config>;
|
|
34
39
|
export declare const name = "wanji-sales";
|
|
35
40
|
export declare const inject: string[];
|
|
36
41
|
/** Knowledge routes activate when the web connection service is available; headless CRM stays usable. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AgentKnowledgeObserver } from './agent-knowledge.ts';
|
|
1
2
|
import { type KnowledgeObserver } from './langfuse-collector.ts';
|
|
2
3
|
import { EvaluationOutbox } from './evaluation-outbox.ts';
|
|
3
4
|
import { type EvaluationConnection, type EvaluationService } from './evaluation-client.ts';
|
|
@@ -113,10 +114,12 @@ export type SemanticRanker = (query: string, hits: import('./knowledge-types.ts'
|
|
|
113
114
|
relevantOnly?: boolean;
|
|
114
115
|
}) => Promise<import('./knowledge-types.ts').KnowledgeHit[]>;
|
|
115
116
|
export type QueryExpander = (query: string, signal: AbortSignal) => Promise<string[]>;
|
|
117
|
+
type DirectKnowledgeObserver = Pick<AgentKnowledgeObserver, 'run' | 'finish'>;
|
|
116
118
|
export declare function createKnowledgeHost(tools: ToolService, config: KnowledgeConfig, lifetime?: AbortSignal, outbox?: EvaluationOutbox, evaluationOrWorkspaces?: EvaluationService | (() => {
|
|
117
119
|
id: string;
|
|
118
120
|
title: string;
|
|
119
121
|
path: string;
|
|
120
|
-
}[]), injectedObserver?: KnowledgeObserver, rerank?: SemanticRanker, materialOverride?: MaterialRetriever, expandQuery?: QueryExpander, recordMaterialMetadata?: RecordMaterialMetadata): KnowledgeHandler;
|
|
122
|
+
}[]), injectedObserver?: KnowledgeObserver, rerank?: SemanticRanker, materialOverride?: MaterialRetriever, expandQuery?: QueryExpander, recordMaterialMetadata?: RecordMaterialMetadata, directObserver?: DirectKnowledgeObserver): KnowledgeHandler;
|
|
121
123
|
export declare const inject: string[];
|
|
122
|
-
export declare function apply(ctx: HostContext, config?: unknown, agentStatus?: () => Promise<import('./knowledge-types.ts').AgentTracingStatus>, rerank?: SemanticRanker, expandQuery?: QueryExpander, recordQuestion?: (input: import('./question-tracing.ts').ObservedQuestion, outcome: import('./question-tracing.ts').QuestionOutcome) => Promise<void>, recordMaterialMetadata?: RecordMaterialMetadata): void;
|
|
124
|
+
export declare function apply(ctx: HostContext, config?: unknown, agentStatus?: () => Promise<import('./knowledge-types.ts').AgentTracingStatus>, rerank?: SemanticRanker, expandQuery?: QueryExpander, recordQuestion?: (input: import('./question-tracing.ts').ObservedQuestion, outcome: import('./question-tracing.ts').QuestionOutcome) => Promise<void>, recordMaterialMetadata?: RecordMaterialMetadata, directObserver?: DirectKnowledgeObserver): void;
|
|
125
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface GatewayRequest {
|
|
2
|
+
method: string;
|
|
3
|
+
route: string;
|
|
4
|
+
request_id: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class KnowledgeHttpCorrelation {
|
|
7
|
+
private readonly scope;
|
|
8
|
+
private readonly channel;
|
|
9
|
+
private readonly base;
|
|
10
|
+
constructor(baseUrl?: string);
|
|
11
|
+
private readonly capture;
|
|
12
|
+
run<T>(receipts: GatewayRequest[], send: () => T): T;
|
|
13
|
+
close(): void;
|
|
14
|
+
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
/** V2 adds original questions/answers, so require a private key and redact before journaling. */
|
|
2
|
-
export declare function readEvaluationPrivacy(path: unknown): Promise<(value: any) => any>;
|
|
2
|
+
export declare function readEvaluationPrivacy(path: unknown, environment?: 'test' | 'production'): Promise<(value: any) => any>;
|
|
3
|
+
export declare function createEvaluationPrivacy(secret: string): (v: any) => any;
|
|
4
|
+
export declare const maskObservationText: (value: string, limit: number) => string;
|
|
@@ -13,7 +13,7 @@ export type SecretReader = (target: Destination) => Promise<Credentials>;
|
|
|
13
13
|
export declare const defaultConfigFile: string;
|
|
14
14
|
export declare function resolveTarget(name: string, value: unknown): Destination;
|
|
15
15
|
export declare function destinationId(target: Destination): string;
|
|
16
|
-
export declare function readTarget(path?: string): Promise<Destination | undefined>;
|
|
16
|
+
export declare function readTarget(path?: string, environment?: 'test' | 'production'): Promise<Destination | undefined>;
|
|
17
17
|
export declare const keychainCredentials: SecretReader;
|
|
18
18
|
export declare function authorization(keys: Credentials): string;
|
|
19
19
|
export declare function api(target: Destination, keys: Credentials, path: string, body?: unknown, request?: typeof fetch): Promise<any>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const PRODUCTION_WEKNORA_BASE_URL = "https://wanjidazi.com/sales-kb/api/v1";
|
|
2
|
+
export declare function weknoraEnvironment(value: unknown): 'test' | 'production' | undefined;
|
|
3
|
+
export declare const PRODUCTION_LANGFUSE_BASE_URL = "https://wanjidazi.com/langfuse";
|
|
4
|
+
export declare const PRODUCTION_LANGFUSE_PROJECT_ID = "wanji-sales-test";
|
|
5
|
+
export declare const PRODUCTION_LANGFUSE_CREDENTIALS_REF = "wanji-langfuse-api-production";
|
|
6
|
+
export declare function isProductionLangfuse(target: {
|
|
7
|
+
baseUrl: string;
|
|
8
|
+
}): boolean;
|
|
@@ -20,10 +20,12 @@ type Options = {
|
|
|
20
20
|
deliver?: (event: ObservationEvent) => Promise<void>;
|
|
21
21
|
} & ({
|
|
22
22
|
configFile: string;
|
|
23
|
+
environment?: 'test' | 'production';
|
|
23
24
|
relay?: never;
|
|
24
25
|
} | {
|
|
25
26
|
relay: (event: ObservationEvent, signal: AbortSignal) => Promise<void>;
|
|
26
27
|
configFile?: never;
|
|
28
|
+
environment?: never;
|
|
27
29
|
});
|
|
28
30
|
type SessionEvent = {
|
|
29
31
|
type: string;
|
|
@@ -16,12 +16,17 @@ export interface UpdateOptions {
|
|
|
16
16
|
}
|
|
17
17
|
/** Scheduling belongs to the plugin; package installation belongs to DSH. */
|
|
18
18
|
export declare class UpdateCoordinator {
|
|
19
|
+
private readonly runDiagnostic;
|
|
19
20
|
private options;
|
|
20
21
|
private view;
|
|
21
22
|
private record;
|
|
22
23
|
private initialized?;
|
|
24
|
+
private statusInitialized?;
|
|
25
|
+
private showVerification;
|
|
26
|
+
private readonly verificationStarted;
|
|
23
27
|
private checking?;
|
|
24
28
|
private job?;
|
|
29
|
+
private installing;
|
|
25
30
|
private timer?;
|
|
26
31
|
private lifetime;
|
|
27
32
|
private disposed;
|
|
@@ -31,6 +36,7 @@ export declare class UpdateCoordinator {
|
|
|
31
36
|
constructor(options: UpdateOptions);
|
|
32
37
|
snapshot(): UpdateSnapshot;
|
|
33
38
|
initialize(): Promise<void>;
|
|
39
|
+
initializeForStatus(): Promise<void>;
|
|
34
40
|
private initializeOnce;
|
|
35
41
|
private reconcile;
|
|
36
42
|
private reconcileOwned;
|
|
@@ -28,6 +28,7 @@ export declare function runtimeBaseUrl(value: string): string;
|
|
|
28
28
|
export declare class WechatRuntime {
|
|
29
29
|
private readonly options;
|
|
30
30
|
private readonly target;
|
|
31
|
+
private readonly runDiagnostic;
|
|
31
32
|
private readonly lifetime;
|
|
32
33
|
private pending?;
|
|
33
34
|
private root?;
|
|
@@ -63,7 +63,9 @@ export declare class WechatSyncService {
|
|
|
63
63
|
start(workspace: string, automatic?: boolean): Promise<SyncStatus>;
|
|
64
64
|
sourceChanged(): void;
|
|
65
65
|
private schedule;
|
|
66
|
+
private readonly runDiagnostic;
|
|
66
67
|
private cycle;
|
|
68
|
+
private syncCycle;
|
|
67
69
|
pause(workspace: string): SyncStatus;
|
|
68
70
|
prepareUpdate(signal: AbortSignal): Promise<ResumeIntent>;
|
|
69
71
|
resumeAfterUpdate(intent: ResumeIntent): Promise<void>;
|
|
@@ -4,6 +4,6 @@ export interface WeKnoraConnection {
|
|
|
4
4
|
tenantId?: string;
|
|
5
5
|
}
|
|
6
6
|
/** Connection values are accepted only from the Host's installation config. */
|
|
7
|
-
export declare function resolveWeKnoraConnection(raw: unknown, label: string): WeKnoraConnection | undefined;
|
|
7
|
+
export declare function resolveWeKnoraConnection(raw: unknown, label: string, defaultBaseUrl?: string): WeKnoraConnection | undefined;
|
|
8
8
|
export declare function readWeKnoraEnvelope(response: Response): Promise<Record<string, unknown>>;
|
|
9
9
|
export declare function readWeKnoraData(response: Response): Promise<Record<string, unknown>>;
|
package/docs/auto-update.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
万机大脑按宿主标识接管安装。销售助手读取插件中心认可的本机安装版本,使用桌面登录态查询公司市场,仅在同一包有更高的正式版本时显示绿点和可用版本。更新路径为「万机插件中心 → 已安装 → 销售助手 → 更新」,面板以文字展示该路径。
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
打开应用、展开面板、安装状态或账号变化后重新查询,运行中定期刷新。查询失败时显示「暂时无法检查更新」并清除绿点。安装完成而旧版仍在运行时,页头显示「重启后生效」和已安装版本,面板展示正在使用和已安装的两个版本。重启后的运行和安装版本应一致。源码链接和旧 npm 安装需通过公司市场安装才可接收公司市场提醒。
|
|
10
10
|
|
|
11
11
|
验收覆盖公司市场有更新、暂无更新、查询失败、账号切换、安装后待重启及重启后版本一致。用标准 DSH 的独立安装回归原 npm 路径,用脱敏样例核对会话和草稿。
|
|
12
12
|
|
|
@@ -28,9 +28,9 @@ Host 启动后约 5 秒内发起首次检查,运行中约每 30 秒检查一
|
|
|
28
28
|
|
|
29
29
|
所有已连接销售窗口停止编辑至少 60 秒、没有未保存内容/任务,才开始自动准备。每个窗口需再次确认保存;Host 等待 CRM、生成相关工具和写入完成,停止下一轮微信同步并排空当前采集、消息及媒体提交。准备 30 秒未完成就延后,保留已有业务任务。正在编辑的 CRM 表单也会阻止自动安装。
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
断开的窗口不能因为心跳过期就被当成已保存。请重新连接该窗口、保存后关闭;无法确认时保守延后。若窗口已异常退出,在确认内容已保存后可重启应用重新建立窗口状态。页头和面板按已确认的准备、安装、验证阶段展示完成度(0%、33%、67%、100%)。等待空闲、待重启或无法确认安装状态时显示对应状态。百分比表示阶段完成度。安装期间新打开的销售窗口同样暂停编辑。
|
|
32
32
|
|
|
33
|
-
当前实测 Windows Desktop 0.2.2-rc.3 与 Mac 开发 SDK 0.2.2-rc.1 的安装器可能返回 `applied
|
|
33
|
+
当前实测 Windows Desktop 0.2.2-rc.3 与 Mac 开发 SDK 0.2.2-rc.1 的安装器可能返回 `applied`,实际仍加载旧模块。因此插件分别显示“正在使用”和“已安装”:不一致时页头持续显示“重启后生效”和已安装版本,收起面板也能看到。用户可继续使用,方便时自行重启。重启后由新 Host 检查版本和本地 SQLite,再报告更新生效。微信组件未就绪则保留同步设置并重试,不能把安装成功当作同步成功。
|
|
34
34
|
|
|
35
35
|
## 数据与失败恢复
|
|
36
36
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# 销售助手日志收集
|
|
2
|
+
|
|
3
|
+
插件启用后默认在本机写诊断日志。复现一次问题,记下本机时间、DSH 版本、销售助手版本以及出问题的操作,再按下面的路径收集文件。
|
|
4
|
+
|
|
5
|
+
| 场景 | Windows 文件 | 查找内容 |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| 首次安装、启用失败,侧栏没有销售助手 | `%APPDATA%\@deepseek-ai\dsh-desktop\plugin-operations\operations.jsonl` | 记下故障时间附近销售助手的安装或启用状态、错误码。仅摘录相关字段,原文件可能包含本机路径和安装来源。 |
|
|
8
|
+
| 插件激活、升级、调用接口、登录和上传 | `%LOCALAPPDATA%\DSHSales\Logs\host-*.jsonl` | 找到故障时间附近的记录。用 `operationId` 串起同一次操作,`hostId` 区分重启前后的记录。 |
|
|
9
|
+
| 微信组件启动、登录、采集、导入 | `%LOCALAPPDATA%\DSHSales\Logs\collector-*.jsonl` | 核对时间、阶段和错误码。有操作 ID 时可和 Host 同步记录对应。 |
|
|
10
|
+
|
|
11
|
+
把目录粘贴到资源管理器地址栏即可打开。macOS 的 Host 和采集器日志都在 `~/Library/Logs/DSHSales/`。诊断目录随系统用户归属,插件自定义 `storageDir` 不改变日志位置。
|
|
12
|
+
|
|
13
|
+
在 Windows PowerShell 中运行以下命令,可把最近一天的销售助手日志打包到桌面。DSH 安装记录按上表单独摘录。
|
|
14
|
+
|
|
15
|
+
```powershell
|
|
16
|
+
$logDir = Join-Path $env:LOCALAPPDATA 'DSHSales\Logs'
|
|
17
|
+
$files = @(Get-ChildItem -LiteralPath $logDir -File -ErrorAction SilentlyContinue |
|
|
18
|
+
Where-Object { $_.Name -match '^(host|collector)-.+\.jsonl$' -and
|
|
19
|
+
$_.LastWriteTime -ge (Get-Date).AddDays(-1) })
|
|
20
|
+
if ($files.Count -gt 0) {
|
|
21
|
+
$desktop = [Environment]::GetFolderPath('Desktop')
|
|
22
|
+
$zip = Join-Path $desktop ('销售助手日志-' + (Get-Date -Format 'yyyyMMdd-HHmmss') + '.zip')
|
|
23
|
+
Compress-Archive -LiteralPath $files.FullName -DestinationPath $zip
|
|
24
|
+
Write-Output $zip
|
|
25
|
+
} else {
|
|
26
|
+
Write-Output '未找到近一天的销售助手日志。首次安装或启用失败时,请查看 DSH 插件操作记录。'
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## 按操作定位
|
|
31
|
+
|
|
32
|
+
| 关键字 | 可定位的问题 |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| `host.config`、`host.activation`、`host.web-services`、`install.update` | 配置校验、插件启用、桌面服务注册、包管理器更新交接 |
|
|
35
|
+
| `wechat.runtime`、`wechat.sync` | 组件下载、解压、校验、自检、登录等待和同步结果 |
|
|
36
|
+
| `dingtalk.http.start`、`dingtalk.oauth-challenge`、`dingtalk.status.*`、`dingtalk.model-route` | 请求登录、生成授权入口、等待确认、绑定结果和模型配置。钉钉浏览器端授权回调发生在服务端,需要按时间对照服务端记录。 |
|
|
37
|
+
| `mcp.knowledge`、`mcp.materials`、`knowledge`、`weknora.http` | 工具缺失、调用超时、HTTP 错误、响应解析、知识库范围和素材文件检查。分别核对 MCP 调用和直连 WeKnora。 |
|
|
38
|
+
| `crm.http`、`tool.crm_` | CRM 请求和工具执行,含网络、HTTP 状态和耗时 |
|
|
39
|
+
| `langfuse` | 配置、凭据、项目检查、上传响应、托管转发、队列待重试或已确认。测试配置可查托管转发。生产直连可通过 Host 环境变量注入 API 和脱敏密钥,Windows 使用同一方式。 |
|
|
40
|
+
|
|
41
|
+
Host 日志只写固定事件名、允许的错误码、HTTP 状态、耗时、计数、版本和系统信息。日志中没有请求或响应正文、聊天、手机号、账号、令牌、授权链接和知识库内容。日志留在本机,提交问题时人工发送压缩包。不要打包销售助手数据目录、DSH Profile 或 Langfuse 待上传队列。
|
|
42
|
+
|
|
43
|
+
每个 Host 文件上限 512 KiB。在新建日志时清理七天前或超出最近八份的 Host 文件。写入异常和积压不会阻断插件操作,后续写入恢复后可从 `dropped` 查看丢弃数。可在启动 DSH 的环境里设置 `WANJI_DIAGNOSTICS_ENABLED=false` 关闭销售助手诊断记录。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wanji_dsh/dsh-sales",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Sales workspace with local Windows/macOS WeChat sync, one-time CRM context, Flash drafts and filtered knowledge.",
|
|
6
6
|
"engines": {
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"dist/wechat-repository-worker.js",
|
|
24
24
|
"dist/types/**/*.d.ts",
|
|
25
25
|
"cordis.patch.yml",
|
|
26
|
+
"config/*.yml",
|
|
27
|
+
"config/*.json",
|
|
26
28
|
"locale/*.json",
|
|
27
29
|
"icon.svg",
|
|
28
30
|
"README.md",
|
|
@@ -33,6 +35,7 @@
|
|
|
33
35
|
"docs/crm-profile-tool.zh.md",
|
|
34
36
|
"docs/agent-knowledge-observation.md",
|
|
35
37
|
"docs/langfuse-local.md",
|
|
38
|
+
"docs/diagnostics.zh.md",
|
|
36
39
|
".dsh/skills/",
|
|
37
40
|
"!.dsh/**/__pycache__/**",
|
|
38
41
|
"runtime/*.py",
|