@wanji_dsh/dsh-sales 0.11.3 → 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 +1 -1
- package/dist/client.js +148 -30
- package/dist/host.js +154 -75
- package/dist/types/agent-knowledge.d.ts +4 -1
- package/dist/types/knowledge-host.d.ts +1 -1
- package/dist/types/knowledge-http-correlation.d.ts +14 -0
- package/dist/types/sales-model.d.ts +2 -0
- package/dist/types/update/coordinator.d.ts +5 -0
- package/dist/types/update/types.d.ts +2 -0
- package/docs/auto-update.md +3 -3
- package/package.json +1 -1
- package/runtime/wechat-manifest.json +1 -1
package/README.zh.md
CHANGED
|
@@ -18,7 +18,7 @@ DeepSeek Harness 内的销售辅助工作台。插件在左侧菜单注册“销
|
|
|
18
18
|
|
|
19
19
|
公司共享模型开通后,在销售助手页头选择「绑定钉钉」,按页面输入配对码并完成本人授权。经万机企业通讯录验证的成员可直接使用公司 DeepSeek Flash,并在页头查看花名、岗位或解绑。
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
如需使用自有模型,在万机大脑的模型设置选择已授权的 DeepSeek V4.1 Flash。支持 DSH 内置账号的 `deepseek-account/deepseek-flash` 和已有的 `deepseek-v4.1-flash` 路由,调用时使用各自的原始模型 ID。管理员可在 Host 设置销售插件的 `modelProvider` 和 `model`。微信会话可先同步,未绑定 CRM 的会话也可起草。
|
|
22
22
|
|
|
23
23
|
插件启用时会向Harness注册自带的万机销售技能及配套资源,默认工作区可直接使用,无需逐个工作区安装技能。禁用插件时会移除本次注册;工作区内已有的同名技能仍按Harness的优先级规则生效。
|
|
24
24
|
|
package/dist/client.js
CHANGED
|
@@ -7389,42 +7389,107 @@ function updateErrorKey(error) {
|
|
|
7389
7389
|
if (/SERVICE_UNAVAILABLE|offline/i.test(error)) return "updateReconnect";
|
|
7390
7390
|
return "updateUnknown";
|
|
7391
7391
|
}
|
|
7392
|
+
var updateChevronIcon = /* @__PURE__ */ import_react4.default.createElement("svg", { className: "ws-update-chevron", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.25", "aria-hidden": "true" }, /* @__PURE__ */ import_react4.default.createElement("path", { d: "m2.5 4.5 3.5 3.5 3.5-3.5" }));
|
|
7393
|
+
var updateRefreshIcon = /* @__PURE__ */ import_react4.default.createElement("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.6", "aria-hidden": "true" }, /* @__PURE__ */ import_react4.default.createElement("path", { d: "M20 7v5h-5M4 17v-5h5M6 7a7 7 0 0 1 12-1l2 2M18 17a7 7 0 0 1-12 1l-2-2" }));
|
|
7392
7394
|
function UpdatePanel({ client, view, t }) {
|
|
7393
|
-
const [open, setOpen] = (0, import_react4.useState)(false)
|
|
7395
|
+
const [open, setOpen] = (0, import_react4.useState)(false);
|
|
7396
|
+
const id = (0, import_react4.useId)();
|
|
7397
|
+
const trigger = (0, import_react4.useRef)(null);
|
|
7398
|
+
const close = () => {
|
|
7399
|
+
setOpen(false);
|
|
7400
|
+
trigger.current?.focus();
|
|
7401
|
+
};
|
|
7394
7402
|
const company = view.source === "company-market";
|
|
7395
|
-
const
|
|
7396
|
-
const
|
|
7397
|
-
const
|
|
7398
|
-
const
|
|
7399
|
-
const
|
|
7400
|
-
const
|
|
7401
|
-
const
|
|
7402
|
-
const
|
|
7403
|
-
const
|
|
7404
|
-
|
|
7405
|
-
|
|
7403
|
+
const { phase, installedVersion, runningVersion, automatic } = view;
|
|
7404
|
+
const restartRequired = phase === "restart-required";
|
|
7405
|
+
const candidate = company ? view.availableVersion : view.candidate?.version;
|
|
7406
|
+
const available = candidate && candidate !== installedVersion && candidate !== runningVersion ? candidate : void 0;
|
|
7407
|
+
const active = phase === "preparing" || phase === "installing" || phase === "verifying";
|
|
7408
|
+
const disconnected = Boolean(view.reconnecting && (active || view.preparing));
|
|
7409
|
+
const checking = !disconnected && (Boolean(view.checking) && !active || phase === "checking");
|
|
7410
|
+
const busy = view.preparing || checking || active || disconnected;
|
|
7411
|
+
const unavailable = phase === "unsupported" || phase === "migration-required" || phase === "recovery-required" || restartRequired;
|
|
7412
|
+
const needsSetup = phase === "unsupported" || phase === "migration-required";
|
|
7413
|
+
const stages = company || view.reconnecting || checking ? void 0 : view.completedStages;
|
|
7414
|
+
const percent = stages === void 0 ? void 0 : Math.round(stages * 100 / 3);
|
|
7415
|
+
const progressText = stages === void 0 ? void 0 : t("updateProgressCompleted").replace("{count}", String(stages));
|
|
7416
|
+
const deferred = phase === "waiting-idle" && Boolean(view.error);
|
|
7417
|
+
const errorKey = view.error && !disconnected ? updateErrorKey(view.error) : void 0;
|
|
7418
|
+
const status = t(disconnected ? "updateReconnect" : checking ? "updateChecking" : deferred ? "updateDeferred" : phase === "idle" && !view.checkedAt ? "updateInitial" : labels[phase]);
|
|
7419
|
+
const companyStatus = t(restartRequired ? "updateCompanyRestart" : phase === "migration-required" ? "updateCompanyMigration" : available ? "updateAvailable" : checking ? "updateCompanyChecking" : phase === "idle" && view.checkedAt ? "updateIdle" : "updateCompanyUnavailable");
|
|
7420
|
+
const hasUpdate = Boolean(available && (company || phase === "available"));
|
|
7421
|
+
const triggerLabel = disconnected ? t("updateStatePending") : active ? percent === void 0 ? status : `${t("updateBusyTrigger")} ${percent}%` : phase === "waiting-idle" ? t(deferred ? "updateDeferred" : "updateWaitingTrigger") : phase === "recovery-required" || view.retryable ? t(phase === "recovery-required" ? "updateStatePending" : "updateFailed") : hasUpdate ? `${t("updateTitle")} \xB7 ${t("updateHasUpdate")}` : t("updateTitle");
|
|
7422
|
+
return /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-update", onKeyDown: (event) => {
|
|
7423
|
+
if (open && event.key === "Escape") {
|
|
7424
|
+
event.stopPropagation();
|
|
7425
|
+
close();
|
|
7426
|
+
}
|
|
7406
7427
|
} }, /* @__PURE__ */ import_react4.default.createElement(
|
|
7407
7428
|
"button",
|
|
7408
7429
|
{
|
|
7409
|
-
|
|
7430
|
+
ref: trigger,
|
|
7431
|
+
className: `ws-button ws-update-trigger${restartRequired ? " ws-update-trigger-restart" : active || disconnected ? " ws-update-trigger-active" : ""}`,
|
|
7410
7432
|
type: "button",
|
|
7411
7433
|
"aria-expanded": open,
|
|
7412
|
-
"aria-controls": id,
|
|
7413
|
-
"aria-label":
|
|
7434
|
+
"aria-controls": open ? id : void 0,
|
|
7435
|
+
"aria-label": active || disconnected ? `${t("updateTitle")} \xB7 ${triggerLabel}` : void 0,
|
|
7414
7436
|
onClick: () => {
|
|
7415
7437
|
if (!open && company) void client.poll();
|
|
7416
7438
|
setOpen(!open);
|
|
7417
7439
|
}
|
|
7418
7440
|
},
|
|
7419
|
-
/* @__PURE__ */ import_react4.default.createElement("
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
), open && /* @__PURE__ */ import_react4.default.createElement("section", { id, className: "ws-update-card", "aria-label": t("updateTitle") }, /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-update-heading" }, /* @__PURE__ */ import_react4.default.createElement("strong", null, t("updateTitle")), /* @__PURE__ */ import_react4.default.createElement("button", { type: "button", className: "ws-icon-button", "aria-label": t("updateClose"), onClick: () => setOpen(false) }, "\xD7")), /* @__PURE__ */ import_react4.default.createElement("dl", { className: "ws-update-versions" }, /* @__PURE__ */ import_react4.default.createElement("div", null, /* @__PURE__ */ import_react4.default.createElement("dt", null, t("updateCurrent")), /* @__PURE__ */ import_react4.default.createElement("dd", null, view.runningVersion || "\u2014")), view.installedVersion && view.installedVersion !== view.runningVersion && /* @__PURE__ */ import_react4.default.createElement("div", null, /* @__PURE__ */ import_react4.default.createElement("dt", null, t("updateInstalled")), /* @__PURE__ */ import_react4.default.createElement("dd", null, view.installedVersion)), availableVersion && availableVersion !== view.installedVersion && /* @__PURE__ */ import_react4.default.createElement("div", null, /* @__PURE__ */ import_react4.default.createElement("dt", null, t("updateTarget")), /* @__PURE__ */ import_react4.default.createElement("dd", { className: company ? "ws-company-update-version" : void 0 }, availableVersion))), company ? /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-company-update-hint", role: "status" }, availableVersion ? /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement("p", null, t("updateCompanyPathTitle")), /* @__PURE__ */ import_react4.default.createElement("p", null, t("updateCompanyPath"))) : /* @__PURE__ */ import_react4.default.createElement("p", null, t(companyStatus))) : /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement("div", { role: "status", className: "ws-update-status", "aria-live": "polite" }, /* @__PURE__ */ import_react4.default.createElement("span", { className: "ws-dot" }), status), errorKey && /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-error", role: "status" }, t(errorKey)), !needsSetup && /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement("label", { className: "ws-update-toggle" }, /* @__PURE__ */ import_react4.default.createElement("input", { type: "checkbox", checked: view.automatic, disabled: busy || unavailable, onChange: (e) => void client.action("automatic", e.target.checked) }), /* @__PURE__ */ import_react4.default.createElement("span", null, t("updateAutomatic"))), /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-policy" }, t("updatePolicy"))), view.checkedAt && !needsSetup && /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-policy" }, t("updateChecked"), " ", /* @__PURE__ */ import_react4.default.createElement("time", { dateTime: new Date(view.checkedAt).toISOString() }, new Date(view.checkedAt).toLocaleTimeString(void 0, { hour: "2-digit", minute: "2-digit", second: "2-digit" }))), /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-update-actions" }, /* @__PURE__ */ import_react4.default.createElement("button", { type: "button", className: "ws-button", disabled: busy || unavailable, "aria-busy": checking, onClick: () => void client.action("check") }, t(checking ? "updateChecking" : unavailable ? "updateCheckUnavailable" : "updateCheck")), view.candidate && !unavailable && /* @__PURE__ */ import_react4.default.createElement("button", { type: "button", className: "ws-button ws-primary", disabled: busy, onClick: () => void client.action("install") }, t("updateInstall"))))));
|
|
7441
|
+
restartRequired ? /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement("span", { className: "ws-dot ws-update-restart-dot", "aria-hidden": "true" }), /* @__PURE__ */ import_react4.default.createElement("span", { className: "ws-update-restart-copy" }, /* @__PURE__ */ import_react4.default.createElement("span", null, t("updateRestartTrigger")), installedVersion && /* @__PURE__ */ import_react4.default.createElement("span", { className: "ws-update-restart-version" }, t("updateInstalled"), " ", installedVersion))) : /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, hasUpdate ? /* @__PURE__ */ import_react4.default.createElement("span", { className: company ? "ws-dot ws-company-update-dot" : "ws-dot", "aria-hidden": "true" }) : updateRefreshIcon, /* @__PURE__ */ import_react4.default.createElement("span", null, triggerLabel)),
|
|
7442
|
+
updateChevronIcon
|
|
7443
|
+
), open && /* @__PURE__ */ import_react4.default.createElement("section", { id, className: "ws-update-card", "aria-label": t("updateTitle") }, /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-update-heading" }, /* @__PURE__ */ import_react4.default.createElement("strong", null, t("updateTitle")), /* @__PURE__ */ import_react4.default.createElement("button", { type: "button", className: "ws-icon-button", "aria-label": t("updateClose"), onClick: close }, "\xD7")), /* @__PURE__ */ import_react4.default.createElement("dl", { className: "ws-update-versions" }, /* @__PURE__ */ import_react4.default.createElement("div", null, /* @__PURE__ */ import_react4.default.createElement("dt", null, t("updateCurrent")), /* @__PURE__ */ import_react4.default.createElement("dd", null, runningVersion || "\u2014")), installedVersion && installedVersion !== runningVersion && /* @__PURE__ */ import_react4.default.createElement("div", null, /* @__PURE__ */ import_react4.default.createElement("dt", null, t("updateInstalled")), /* @__PURE__ */ import_react4.default.createElement("dd", null, installedVersion)), available && /* @__PURE__ */ import_react4.default.createElement("div", null, /* @__PURE__ */ import_react4.default.createElement("dt", null, t(company ? "updateTarget" : "updateTargetVersion")), /* @__PURE__ */ import_react4.default.createElement("dd", { className: company ? "ws-company-update-version" : void 0 }, available))), company ? /* @__PURE__ */ import_react4.default.createElement("div", { role: "status" }, /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-company-update-hint" }, /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-summary" }, companyStatus), restartRequired && /* @__PURE__ */ import_react4.default.createElement("p", null, t("updateRestartHelp")), available && /* @__PURE__ */ import_react4.default.createElement("p", null, t("updateCompanyNew"))), available && /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-company-update-path" }, /* @__PURE__ */ import_react4.default.createElement("p", null, t("updateCompanyPathTitle")), /* @__PURE__ */ import_react4.default.createElement("strong", null, t("updateCompanyPath")))) : /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement("div", { className: `ws-update-feedback${restartRequired ? " ws-update-feedback-restart" : ""}` }, /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-update-status" }, /* @__PURE__ */ import_react4.default.createElement("span", { role: "status" }, /* @__PURE__ */ import_react4.default.createElement("span", { className: "ws-dot", "aria-hidden": "true" }), status), percent !== void 0 && /* @__PURE__ */ import_react4.default.createElement("strong", { className: "ws-update-percent", "aria-hidden": "true" }, percent, "%")), stages !== void 0 && /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-update-track", role: "progressbar", "aria-label": t("updateProgressTitle"), "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": percent, "aria-valuetext": progressText }, [0, 1, 2].map((step) => /* @__PURE__ */ import_react4.default.createElement("span", { key: step, "data-state": step < stages ? "done" : step === stages ? "current" : "pending" }))), /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-update-track-caption", "aria-hidden": "true" }, /* @__PURE__ */ import_react4.default.createElement("span", null, t("updateProgressSteps")), /* @__PURE__ */ import_react4.default.createElement("span", null, progressText))), restartRequired && /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-note" }, t("updateRestartHelp")), phase === "installing" && !disconnected && /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-note" }, t("updateInstallHelp")), phase === "available" && !checking && view.candidate?.automatic === false && /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-note" }, t("updateConfirmMinor")), phase === "available" && !checking && view.candidate?.automatic && !automatic && /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-note" }, t("updateManualHelp")), errorKey && /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-note", role: "status" }, t(errorKey))), !needsSetup && phase !== "recovery-required" && !disconnected && /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, busy || unavailable ? /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-update-toggle" }, /* @__PURE__ */ import_react4.default.createElement("span", null, t("updateAutomatic")), /* @__PURE__ */ import_react4.default.createElement("span", { className: "ws-update-toggle-state" }, t(automatic ? "updateOn" : "updateOff"))) : /* @__PURE__ */ import_react4.default.createElement("label", { className: "ws-update-toggle" }, /* @__PURE__ */ import_react4.default.createElement("span", null, t("updateAutomatic")), /* @__PURE__ */ import_react4.default.createElement("input", { type: "checkbox", role: "switch", checked: automatic, onChange: (e) => void client.action("automatic", e.target.checked) })), !busy && !restartRequired && /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-policy" }, t("updatePolicy"))), !active && !unavailable && !disconnected && /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-update-actions" }, view.checkedAt && !checking && /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-checked" }, t("updateChecked"), " ", /* @__PURE__ */ import_react4.default.createElement("time", { dateTime: new Date(view.checkedAt).toISOString() }, new Date(view.checkedAt).toLocaleTimeString(void 0, { hour: "2-digit", minute: "2-digit", second: "2-digit" }))), /* @__PURE__ */ import_react4.default.createElement("button", { type: "button", className: "ws-button", disabled: busy, "aria-busy": checking, onClick: () => void client.action("check") }, t(checking ? "updateChecking" : "updateCheck")), available && !checking && /* @__PURE__ */ import_react4.default.createElement("button", { type: "button", className: "ws-button ws-primary", disabled: busy, onClick: () => void client.action("install") }, t(view.retryable ? "updateRetry" : "updateInstall"))))));
|
|
7423
7444
|
}
|
|
7424
7445
|
var updateStyles = `
|
|
7425
|
-
.ws-update{-webkit-app-region:no-drag}
|
|
7446
|
+
.ws-update{-webkit-app-region:no-drag}
|
|
7447
|
+
.ws-update-card{position:absolute;right:24px;top:78px;z-index:15;width:340px;max-width:calc(100% - 24px);max-height:calc(100% - 92px);overflow:auto;padding:16px;background:var(--ws-bg);border:1px solid var(--ws-line);border-radius:12px;box-shadow:0 12px 36px #00000018;text-align:left}
|
|
7448
|
+
.ws-update-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
|
|
7449
|
+
.ws-update-heading strong{font-size:14px}
|
|
7450
|
+
.ws-update-card .ws-update-versions{display:grid;gap:4px;margin-bottom:10px}
|
|
7451
|
+
.ws-update-versions>div{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
|
|
7452
|
+
.ws-update-versions dt{color:var(--ws-muted);font-size:12px}
|
|
7453
|
+
.ws-update-versions dd{font-variant-numeric:tabular-nums;font-family:ui-monospace,monospace;font-size:12px;overflow-wrap:anywhere}
|
|
7454
|
+
.ws-update-feedback,.ws-company-update-hint{padding:9px 10px;border-radius:8px;background:var(--dsw-alias-interactive-bg-hover-solid,var(--ws-soft))}
|
|
7455
|
+
.ws-update-status{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;font-weight:500}
|
|
7456
|
+
.ws-update-status [role=status]{display:flex;align-items:baseline;gap:7px}
|
|
7457
|
+
.ws-update-status .ws-dot{align-self:center}
|
|
7458
|
+
.ws-update-percent{font:600 22px/1.15 ui-monospace,monospace;color:var(--ws-accent)}
|
|
7459
|
+
.ws-update-track{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin-top:7px}
|
|
7460
|
+
.ws-update-track>span{height:5px;border-radius:3px;background:color-mix(in srgb,var(--ws-accent) 18%,var(--ws-bg))}
|
|
7461
|
+
.ws-update-track>span[data-state=current]{background:color-mix(in srgb,var(--ws-accent) 53%,var(--ws-bg))}
|
|
7462
|
+
.ws-update-track>span[data-state=done]{background:var(--ws-accent)}
|
|
7463
|
+
.ws-update-track-caption{display:flex;justify-content:space-between;flex-wrap:wrap;gap:2px 7px;margin-top:4px;font-size:11px}
|
|
7464
|
+
.ws-update-card .ws-update-note{font-size:11px;line-height:1.6;margin-top:4px;overflow-wrap:anywhere}
|
|
7465
|
+
.ws-update-toggle{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;border-top:1px solid var(--ws-line);padding-top:10px;font-size:12px}
|
|
7466
|
+
label.ws-update-toggle{cursor:pointer}
|
|
7467
|
+
.ws-update-toggle input{appearance:none;display:flex;align-items:center;flex:none;width:28px;height:16px;margin:0;padding:2px;border:0;border-radius:10px;background:var(--dsw-alias-button-contrast-fill,var(--ws-muted));cursor:pointer}
|
|
7468
|
+
.ws-update-toggle input:checked{justify-content:flex-end;background:var(--ws-accent)}
|
|
7469
|
+
.ws-update-toggle input::after{content:'';width:12px;height:12px;border-radius:50%;background:var(--dsw-alias-label-primary-foreground,var(--ws-bg))}
|
|
7470
|
+
.ws-update-toggle input:not(:checked)::after{background:var(--dsw-alias-switch-thumb,var(--ws-bg))}
|
|
7471
|
+
.ws-update-toggle-state,.ws-update-card .ws-update-policy,.ws-update-checked{color:var(--ws-muted);font-size:11px}
|
|
7472
|
+
.ws-update-card .ws-update-policy{line-height:1.7;margin-top:4px}
|
|
7473
|
+
.ws-update-actions{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:6px;margin-top:10px}
|
|
7474
|
+
.ws-update-actions .ws-update-checked{margin-inline-end:auto;white-space:nowrap}
|
|
7475
|
+
.ws-update-freeze{padding:8px 28px;border-top:1px solid var(--ws-line);background:var(--ws-soft);font-size:12px;flex:none}
|
|
7476
|
+
.ws-update-trigger .ws-dot{color:var(--ws-accent)}
|
|
7477
|
+
.ws-update-chevron{margin-inline-start:auto;color:var(--ws-muted)}
|
|
7478
|
+
.ws-update-trigger[aria-expanded=true] .ws-update-chevron{transform:rotate(180deg)}
|
|
7479
|
+
.ws-update-trigger-active{font-variant-numeric:tabular-nums;background:var(--dsw-alias-interactive-bg-hover-solid,var(--ws-soft))}
|
|
7480
|
+
.ws-update-trigger-restart{min-width:144px;min-height:44px;justify-content:flex-start;gap:10px}
|
|
7481
|
+
.ws-update-trigger-restart,.ws-update-feedback-restart{background:var(--ws-soft);background:light-dark(#faf9f6,var(--ws-soft))}
|
|
7482
|
+
.ws-update-trigger-restart .ws-update-restart-dot,.ws-update-feedback-restart .ws-dot{width:7px;height:7px;color:#a66a12;color:light-dark(#a66a12,#e2ad54);opacity:1}
|
|
7483
|
+
.ws-update-restart-copy{display:grid;gap:2px;text-align:start;font-size:13px;font-weight:500;line-height:1.25}
|
|
7484
|
+
.ws-update-restart-version{color:var(--ws-muted);font-size:11px;font-weight:400;font-variant-numeric:tabular-nums}
|
|
7485
|
+
.ws-update-trigger .ws-company-update-dot,.ws-company-update-version{color:#237c3d;color:light-dark(#237c3d,#76d68c)}
|
|
7486
|
+
.ws-update-trigger .ws-company-update-dot{width:7px;height:7px;opacity:1}
|
|
7487
|
+
.ws-company-update-hint{font-size:12px;line-height:1.6}
|
|
7488
|
+
.ws-company-update-hint p+p{margin-top:4px}
|
|
7489
|
+
.ws-update-summary{font-weight:500}
|
|
7490
|
+
.ws-company-update-path{margin-top:10px;font-size:12px;overflow-wrap:anywhere}
|
|
7491
|
+
.ws-company-update-path p{margin-bottom:3px;color:var(--ws-muted);font-size:11px}
|
|
7426
7492
|
@container(max-width:540px){.ws-header{flex-wrap:wrap}.ws-header-actions{margin-left:auto;gap:8px}.ws-update-card{top:120px;right:12px;max-height:calc(100% - 132px)}}
|
|
7427
|
-
.ws-update-trigger .ws-company-update-dot,.ws-company-update-version{color:#237c3d;color:light-dark(#237c3d,#76d68c)}.ws-update-trigger .ws-company-update-dot{width:7px;height:7px;opacity:1}.ws-company-update-hint{margin-top:14px;border-top:1px solid var(--ws-line);padding-top:12px;font-size:12px;line-height:1.6;color:var(--ws-muted)}.ws-company-update-hint p+p{margin-top:3px}
|
|
7428
7493
|
`;
|
|
7429
7494
|
|
|
7430
7495
|
// src/company/panel.tsx
|
|
@@ -8686,11 +8751,13 @@ function createUpdateClient(rpc, options) {
|
|
|
8686
8751
|
let view = { phase: "idle", runningVersion: "", automatic: DEFAULT_AUTOMATIC, preparing: false, checking: false };
|
|
8687
8752
|
let prepared, disposed = false, timer, polling;
|
|
8688
8753
|
const listeners = /* @__PURE__ */ new Set(), lifetime = new AbortController();
|
|
8689
|
-
const
|
|
8754
|
+
const replace2 = (next) => {
|
|
8690
8755
|
if (disposed) return;
|
|
8691
|
-
view =
|
|
8756
|
+
view = next;
|
|
8692
8757
|
for (const f of listeners) f();
|
|
8693
8758
|
};
|
|
8759
|
+
const publish = (patch) => replace2({ ...view, ...patch });
|
|
8760
|
+
const publishSnapshot = (snapshot) => replace2({ ...snapshot, preparing: view.preparing, checking: view.checking });
|
|
8694
8761
|
const freeze = (value) => {
|
|
8695
8762
|
options.freeze(value);
|
|
8696
8763
|
publish({ preparing: value });
|
|
@@ -8702,14 +8769,18 @@ function createUpdateClient(rpc, options) {
|
|
|
8702
8769
|
};
|
|
8703
8770
|
const heartbeat = () => call({ operation: "heartbeat", clientId: options.id, readiness: { ...options.readiness(), prepared } });
|
|
8704
8771
|
const poll = () => polling ??= (async () => {
|
|
8772
|
+
let saving = false;
|
|
8705
8773
|
try {
|
|
8706
8774
|
let reply = await heartbeat();
|
|
8707
8775
|
if (disposed) return;
|
|
8708
8776
|
if (reply.prepareRequestId) {
|
|
8709
8777
|
freeze(true);
|
|
8710
8778
|
if (prepared !== reply.prepareRequestId && !options.readiness().busy) {
|
|
8779
|
+
publishSnapshot(reply.snapshot);
|
|
8780
|
+
saving = true;
|
|
8711
8781
|
await options.flush();
|
|
8712
8782
|
if (disposed) return;
|
|
8783
|
+
saving = false;
|
|
8713
8784
|
const ready = options.readiness();
|
|
8714
8785
|
if (!ready.busy && !ready.dirty) {
|
|
8715
8786
|
prepared = reply.prepareRequestId;
|
|
@@ -8722,9 +8793,9 @@ function createUpdateClient(rpc, options) {
|
|
|
8722
8793
|
prepared = void 0;
|
|
8723
8794
|
freeze(false);
|
|
8724
8795
|
}
|
|
8725
|
-
|
|
8796
|
+
publishSnapshot(reply.snapshot);
|
|
8726
8797
|
} catch (error) {
|
|
8727
|
-
|
|
8798
|
+
publish({ reconnecting: !saving, error: saving ? "UPDATE_SAVE_FAILED" : error instanceof Error ? error.message : "UPDATE_SERVICE_UNAVAILABLE" });
|
|
8728
8799
|
}
|
|
8729
8800
|
})().finally(() => {
|
|
8730
8801
|
polling = void 0;
|
|
@@ -8751,7 +8822,7 @@ function createUpdateClient(rpc, options) {
|
|
|
8751
8822
|
if (operation === "check") publish({ checking: true, error: void 0 });
|
|
8752
8823
|
try {
|
|
8753
8824
|
const reply = await call({ operation, ...operation === "automatic" ? { enabled } : {} });
|
|
8754
|
-
|
|
8825
|
+
publishSnapshot(reply.snapshot);
|
|
8755
8826
|
await poll();
|
|
8756
8827
|
} catch (error) {
|
|
8757
8828
|
publish({ error: error instanceof Error ? error.message : "UPDATE_UNAVAILABLE" });
|
|
@@ -9567,6 +9638,27 @@ var updateZh = {
|
|
|
9567
9638
|
updateInstall: "\u7ACB\u5373\u66F4\u65B0",
|
|
9568
9639
|
updateAutomatic: "\u7A7A\u95F2\u65F6\u81EA\u52A8\u5B89\u88C5\u8865\u4E01\u66F4\u65B0",
|
|
9569
9640
|
updatePolicy: "\u9ED8\u8BA4\u81EA\u52A8\u68C0\u67E5\u5E76\u5B89\u88C5\u8865\u4E01\uFF0C\u65E0\u9700\u5F00\u542F\u3002\u8DE8\u5C0F\u7248\u672C\u5347\u7EA7\u9700\u786E\u8BA4\uFF1B\u4E0D\u4F1A\u5F3A\u5236\u91CD\u542F\u3002",
|
|
9641
|
+
updateRestartTrigger: "\u91CD\u542F\u540E\u751F\u6548",
|
|
9642
|
+
updateRestartHelp: "\u53EF\u7EE7\u7EED\u4F7F\u7528\uFF0C\u65B9\u4FBF\u65F6\u91CD\u542F\u5E94\u7528\u3002",
|
|
9643
|
+
updateTargetVersion: "\u66F4\u65B0\u76EE\u6807",
|
|
9644
|
+
updateHasUpdate: "\u6709\u66F4\u65B0",
|
|
9645
|
+
updateProgressTitle: "\u66F4\u65B0\u9636\u6BB5\u5B8C\u6210\u5EA6",
|
|
9646
|
+
updateProgressSteps: "\u51C6\u5907 \xB7 \u5B89\u88C5 \xB7 \u9A8C\u8BC1",
|
|
9647
|
+
updateProgressCompleted: "\u5DF2\u5B8C\u6210 {count}/3 \u9636\u6BB5",
|
|
9648
|
+
updateBusyTrigger: "\u66F4\u65B0\u4E2D",
|
|
9649
|
+
updateWaitingTrigger: "\u7B49\u5F85\u7A7A\u95F2",
|
|
9650
|
+
updateDeferred: "\u66F4\u65B0\u5DF2\u5EF6\u540E",
|
|
9651
|
+
updateRetry: "\u91CD\u8BD5\u66F4\u65B0",
|
|
9652
|
+
updateStatePending: "\u66F4\u65B0\u72B6\u6001\u5F85\u786E\u8BA4",
|
|
9653
|
+
updateCompanyChecking: "\u6B63\u5728\u68C0\u67E5\u516C\u53F8\u5E02\u573A",
|
|
9654
|
+
updateCompanyNew: "\u8BF7\u5728\u4E07\u673A\u63D2\u4EF6\u4E2D\u5FC3\u66F4\u65B0\u3002",
|
|
9655
|
+
updateInstallHelp: "\u5B89\u88C5\u5B8C\u6210\u540E\u5C06\u9A8C\u8BC1\u65B0\u7248\u6216\u63D0\u793A\u91CD\u542F\u3002",
|
|
9656
|
+
updateOn: "\u5DF2\u5F00\u542F",
|
|
9657
|
+
updateOff: "\u5DF2\u5173\u95ED",
|
|
9658
|
+
updateFreezeInstalling: "\u6B63\u5728\u5B89\u88C5\u66F4\u65B0\uFF0C\u6682\u65F6\u65E0\u6CD5\u7F16\u8F91\u3002",
|
|
9659
|
+
updateFreezeVerifying: "\u6B63\u5728\u9A8C\u8BC1\u65B0\u7248\uFF0C\u6682\u65F6\u65E0\u6CD5\u7F16\u8F91\u3002",
|
|
9660
|
+
updateConfirmMinor: "\u8DE8\u5C0F\u7248\u672C\u5347\u7EA7\u9700\u8981\u786E\u8BA4\u3002",
|
|
9661
|
+
updateManualHelp: "\u53EF\u5728\u65B9\u4FBF\u65F6\u624B\u52A8\u5B89\u88C5\u3002",
|
|
9570
9662
|
updateIdle: "\u5DF2\u5B8C\u6210\u68C0\u67E5\uFF0C\u6682\u65E0\u66F4\u65B0",
|
|
9571
9663
|
updateInitial: "\u542F\u52A8\u540E\u81EA\u52A8\u68C0\u67E5\u66F4\u65B0",
|
|
9572
9664
|
updateChecking: "\u6B63\u5728\u68C0\u67E5\u65B0\u7248\u672C",
|
|
@@ -9606,6 +9698,27 @@ var updateEn = {
|
|
|
9606
9698
|
updateInstall: "Update now",
|
|
9607
9699
|
updateAutomatic: "Install patch updates when idle",
|
|
9608
9700
|
updatePolicy: "Checks and installs patches automatically by default; no setup required. Minor upgrades require confirmation. The app never restarts automatically.",
|
|
9701
|
+
updateRestartTrigger: "Restart to apply",
|
|
9702
|
+
updateRestartHelp: "You can continue working and restart when convenient.",
|
|
9703
|
+
updateTargetVersion: "Update target",
|
|
9704
|
+
updateHasUpdate: "Update available",
|
|
9705
|
+
updateProgressTitle: "Update stages completed",
|
|
9706
|
+
updateProgressSteps: "Prepare \xB7 Install \xB7 Verify",
|
|
9707
|
+
updateProgressCompleted: "{count}/3 stages complete",
|
|
9708
|
+
updateBusyTrigger: "Updating",
|
|
9709
|
+
updateWaitingTrigger: "Waiting to install",
|
|
9710
|
+
updateDeferred: "Update deferred",
|
|
9711
|
+
updateRetry: "Retry update",
|
|
9712
|
+
updateStatePending: "Awaiting update status",
|
|
9713
|
+
updateCompanyChecking: "Checking the Company market",
|
|
9714
|
+
updateCompanyNew: "Update from Wanji Plugin Center.",
|
|
9715
|
+
updateInstallHelp: "After installation, the app verifies the new version or asks you to restart.",
|
|
9716
|
+
updateOn: "On",
|
|
9717
|
+
updateOff: "Off",
|
|
9718
|
+
updateFreezeInstalling: "Installing the update. Editing is paused.",
|
|
9719
|
+
updateFreezeVerifying: "Verifying the new version. Editing is paused.",
|
|
9720
|
+
updateConfirmMinor: "Minor upgrades require confirmation.",
|
|
9721
|
+
updateManualHelp: "You can install the update when convenient.",
|
|
9609
9722
|
updateIdle: "No updates available",
|
|
9610
9723
|
updateInitial: "Checks automatically after startup",
|
|
9611
9724
|
updateChecking: "Checking for updates",
|
|
@@ -10607,6 +10720,11 @@ var en = {
|
|
|
10607
10720
|
contextHint: "Based on the sample conversation"
|
|
10608
10721
|
};
|
|
10609
10722
|
|
|
10723
|
+
// src/sales-model.ts
|
|
10724
|
+
function isSalesFlash(provider, model) {
|
|
10725
|
+
return model === "deepseek-v4.1-flash" || provider === "deepseek-account" && model === "deepseek-flash";
|
|
10726
|
+
}
|
|
10727
|
+
|
|
10610
10728
|
// src/plan-projection.ts
|
|
10611
10729
|
var steps = { answer: "\u7B54\u590D\u5F53\u524D\u95EE\u9898\uFF0C\u63A5\u5BA2\u6237\u540E\u7EED\u7591\u95EE\u3002", provide_material: "\u63D0\u4F9B\u5BA2\u6237\u672C\u8F6E\u8981\u7684\u8BF4\u660E\u6216\u6750\u6599\uFF1B\u5DF2\u6536\u5230\u7684\u5185\u5BB9\u4E0D\u91CD\u590D\u51C6\u5907\u3002", prepare_confirmation: "\u6309\u5DF2\u786E\u8BA4\u8303\u56F4\u63D0\u4F9B\u786E\u8BA4\u6750\u6599\uFF1B\u672A\u5B9A\u4ED8\u6B3E\u6216\u5F00\u901A\u7EC6\u8282\u5355\u72EC\u8865\uFF0C\u4E0D\u62D6\u4F4F\u5DF2\u5B9A\u6750\u6599\u3002", clarify: "\u53EA\u8865\u95EE\u5F71\u54CD\u5F53\u524D\u5224\u65AD\u7684\u5FC5\u8981\u4FE1\u606F\uFF0C\u4E0D\u91CD\u95EE\u5DF2\u7ECF\u660E\u786E\u7684\u5185\u5BB9\u3002", verify_company: "\u53EA\u6838\u5B9E\u672C\u8F6E\u672A\u5B9A\u7684\u516C\u53F8\u6761\u4EF6\uFF0C\u4FDD\u7559\u5176\u4ED6\u5DF2\u7ECF\u786E\u8BA4\u7684\u6761\u4EF6\u3002", coordinate_demo: "\u534F\u8C03\u5BA2\u6237\u5DF2\u613F\u610F\u4E86\u89E3\u7684\u6F14\u793A\uFF0C\u4E0D\u627F\u8BFA\u672A\u786E\u8BA4\u6863\u671F\u3002", wait: "\u7B49\u5F85\u5BA2\u6237\u7EA6\u5B9A\u7684\u53CD\u9988\uFF0C\u4E0D\u91CD\u590D\u51C6\u5907\u5DF2\u5B8C\u6210\u7684\u5185\u5BB9\u3002", stop: "\u6682\u505C\u4E3B\u52A8\u8054\u7CFB\uFF1B\u5BA2\u6237\u56DE\u6765\u63D0\u51FA\u65B0\u95EE\u9898\u65F6\u518D\u63A5\u8BE5\u95EE\u9898\u3002" };
|
|
10612
10730
|
function projectInternalPlan(plan, latest) {
|
|
@@ -12356,9 +12474,9 @@ async function generateReply(rpc, workspaceId, contact, latest, signal, options
|
|
|
12356
12474
|
case "GENERATION_COMPANY_MODEL_UNAVAILABLE":
|
|
12357
12475
|
throw Error("\u516C\u53F8\u9500\u552E\u8EAB\u4EFD\u5DF2\u9A8C\u8BC1\uFF0C\u6A21\u578B\u901A\u9053\u6682\u4E0D\u53EF\u7528\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6216\u7A0D\u540E\u91CD\u8BD5\u3002");
|
|
12358
12476
|
case "GENERATION_MODEL_NOT_CONFIGURED":
|
|
12359
|
-
throw Error("\u9500\u552E\u6A21\u578B\u5C1A\u672A\u914D\u7F6E\u3002\u8BF7\u5728\u4E07\u673A\u5927\u8111\u8BBE\u7F6E\u4E2D\u9009\u7528\u5DF2\u6388\u6743\u7684 DeepSeek
|
|
12477
|
+
throw Error("\u9500\u552E\u6A21\u578B\u5C1A\u672A\u914D\u7F6E\u3002\u8BF7\u5728\u4E07\u673A\u5927\u8111\u8BBE\u7F6E\u4E2D\u9009\u7528\u5DF2\u6388\u6743\u7684 DeepSeek V4.1 Flash\uFF0C\u518D\u751F\u6210\u56DE\u590D\u3002");
|
|
12360
12478
|
case "GENERATION_MODEL_INCOMPATIBLE":
|
|
12361
|
-
throw Error("\u5F53\u524D\u9500\u552E\u6A21\u578B\u65E0\u6CD5\u7528\u4E8E\u8D77\u8349\u3002\u8BF7\u5728\u4E07\u673A\u5927\u8111\u8BBE\u7F6E\u4E2D\u9009\u62E9 DeepSeek
|
|
12479
|
+
throw Error("\u5F53\u524D\u9500\u552E\u6A21\u578B\u65E0\u6CD5\u7528\u4E8E\u8D77\u8349\u3002\u8BF7\u5728\u4E07\u673A\u5927\u8111\u8BBE\u7F6E\u4E2D\u9009\u62E9 DeepSeek V4.1 Flash\u3002\u6709\u72EC\u7ACB\u9500\u552E\u6A21\u578B\u914D\u7F6E\u65F6\uFF0C\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5\u8BE5\u914D\u7F6E\u3002");
|
|
12362
12480
|
case "GENERATION_WORKSPACE":
|
|
12363
12481
|
throw Error("\u9500\u552E\u52A9\u624B\u627E\u4E0D\u5230\u672C\u8F6E\u5DE5\u4F5C\u533A\u3002\u8BF7\u91CD\u65B0\u6253\u5F00\u9500\u552E\u52A9\u624B\uFF0C\u7B49\u5F85\u5DE5\u4F5C\u533A\u8F7D\u5165\u540E\u91CD\u8BD5\u3002");
|
|
12364
12482
|
}
|
|
@@ -12411,7 +12529,7 @@ async function generateReply(rpc, workspaceId, contact, latest, signal, options
|
|
|
12411
12529
|
if (!object2(record3) || !object2(record3.event) || !object2(record3.event.data)) return [];
|
|
12412
12530
|
const message = record3.event.data.message;
|
|
12413
12531
|
if (!object2(message) || message.role !== "assistant" || !Array.isArray(message.content)) return [];
|
|
12414
|
-
if (!object2(message.source) || message.source.
|
|
12532
|
+
if (!object2(message.source) || !isSalesFlash(message.source.provider, message.source.model)) throw new Error("\u672C\u6B21\u56DE\u590D\u6CA1\u6709\u4F7F\u7528\u5DF2\u56FA\u5B9A\u7684Flash\uFF0C\u6682\u672A\u91C7\u7528\uFF1B\u8BF7\u68C0\u67E5\u4E07\u673A\u5927\u8111\u5F53\u524D\u6A21\u578B\u3002");
|
|
12415
12533
|
const text5 = message.content.filter((c) => object2(c) && c.type === "text" && typeof c.text === "string").map((c) => c.text).join("\n");
|
|
12416
12534
|
return text5.trim() ? [text5] : [];
|
|
12417
12535
|
});
|
|
@@ -13360,7 +13478,7 @@ function SalesPage({ t, useSales, useWorkspaces, dispatch, generate, loadConvers
|
|
|
13360
13478
|
const syncProgress = presentation.blocked || view.status?.phase === "authorizing" ? void 0 : view.status?.progress;
|
|
13361
13479
|
const syncPercent = wechatProgressPercent({ progress: syncProgress });
|
|
13362
13480
|
const syncLabel = view.error ? "wxProgressUnavailable" : view.status?.phase === "error" ? "wxProgressFailed" : view.status?.phase === "paused" ? "wxPaused" : syncActive ? "wxIncremental" : "wxRoundComplete";
|
|
13363
|
-
return /* @__PURE__ */ import_react12.default.createElement("section", { className: "ws-page", "aria-label": t("title") }, /* @__PURE__ */ import_react12.default.createElement("style", null, styles + updateStyles + companyIdentityStyles), /* @__PURE__ */ import_react12.default.createElement("header", { className: "ws-header" }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-heading" }, /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-brand" }, /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "chat", size: 22 })), /* @__PURE__ */ import_react12.default.createElement("div", null, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-title-line" }, /* @__PURE__ */ import_react12.default.createElement("h1", null, t("title")), /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-demo-label" }, t("wxConnected"))), /* @__PURE__ */ import_react12.default.createElement("p", null, t("subtitle")))), (companyIdentityRpc || updater && update) && /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-header-actions" }, companyIdentityRpc && /* @__PURE__ */ import_react12.default.createElement(CompanyIdentityPanel, { rpc: companyIdentityRpc, t, disabled: frozen }), updater && update && /* @__PURE__ */ import_react12.default.createElement(UpdatePanel, { client: updater, view: update, t }))), frozen && /* @__PURE__ */ import_react12.default.createElement("p", { role: "status", className: "ws-update-freeze" }, t("updateFreeze")), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-inline-sync" }, wechat && /* @__PURE__ */ import_react12.default.createElement(SyncPanel, { client: wechat, t, view, workspaceId: selectedWorkspace }), !contact.id && workspaceState.error && /* @__PURE__ */ import_react12.default.createElement("span", { role: "status" }, workspaceState.error)), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-body", "data-empty": !contact.id, "data-show-chat": showChat, "data-profile": profileVisibility }, /* @__PURE__ */ import_react12.default.createElement("aside", { className: "ws-contacts", "aria-label": t("customers") }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-contacts-head" }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-intent-sortline" }, /* @__PURE__ */ import_react12.default.createElement("h2", null, t("customers")), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-intent-sort-control" }, /* @__PURE__ */ import_react12.default.createElement("select", { className: "ws-intent-sort", "aria-label": t("intentSort"), value: sort, onChange: (event) => setSort(event.currentTarget.value === "intent" ? "intent" : "recent") }, /* @__PURE__ */ import_react12.default.createElement("option", { value: "recent" }, t("intentSortRecent")), /* @__PURE__ */ import_react12.default.createElement("option", { value: "intent" }, t("intentSortHigh"))), /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "chevron", size: 12 }))), /* @__PURE__ */ import_react12.default.createElement("label", { className: "ws-search" }, /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "search", size: 15 }), /* @__PURE__ */ import_react12.default.createElement("input", { name: "sales-search", autoComplete: "off", "aria-label": t("search"), placeholder: t("search"), value: query, onChange: (e) => setQuery(e.target.value) })), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-filters", role: "group", "aria-label": t("customers") }, ["all", "pending", "handled"].map((value) => /* @__PURE__ */ import_react12.default.createElement("button", { key: value, type: "button", "aria-pressed": filter === value, onClick: () => setFilter(value) }, t(value), /* @__PURE__ */ import_react12.default.createElement("span", null, value === "all" ? state.contacts.length : value === "pending" ? pending : state.contacts.length - pending))))), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-contact-list" }, contacts.map((c) => /* @__PURE__ */ import_react12.default.createElement("button", { key: c.id, className: `ws-contact ${c.id === contact.id ? "is-selected" : ""}`, "aria-pressed": c.id === contact.id, onClick: () => select(c.id) }, /* @__PURE__ */ import_react12.default.createElement(WechatAvatar, { client: wechat, scope: JSON.stringify([selectedWorkspace, c.wechat?.accountId]), owner: c.wechat?.chatKey ?? c.id, mediaId: c.wechat?.avatarId, fallback: c.initials }), /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-contact-content" }, /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-contact-line" }, /* @__PURE__ */ import_react12.default.createElement("strong", { title: c.name }, c.name), /* @__PURE__ */ import_react12.default.createElement("time", { dateTime: c.time, title: c.time }, displayTime(c.time))), /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-preview" }, c.wechat && c.preview === "[image]" ? t("wxImageListPreview") : c.preview), c.wechat && /* @__PURE__ */ import_react12.default.createElement(IntentBadge, { intent: c.intent, t })))), !contacts.length && /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-empty" }, /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "search", size: 26 }), /* @__PURE__ */ import_react12.default.createElement("p", null, t(state.contacts.length ? "noResults" : presentation.emptyKey)), state.contacts.length > 0 && /* @__PURE__ */ import_react12.default.createElement("button", { className: "ws-text-button", onClick: () => {
|
|
13481
|
+
return /* @__PURE__ */ import_react12.default.createElement("section", { className: "ws-page", "aria-label": t("title") }, /* @__PURE__ */ import_react12.default.createElement("style", null, styles + updateStyles + companyIdentityStyles), /* @__PURE__ */ import_react12.default.createElement("header", { className: "ws-header" }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-heading" }, /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-brand" }, /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "chat", size: 22 })), /* @__PURE__ */ import_react12.default.createElement("div", null, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-title-line" }, /* @__PURE__ */ import_react12.default.createElement("h1", null, t("title")), /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-demo-label" }, t("wxConnected"))), /* @__PURE__ */ import_react12.default.createElement("p", null, t("subtitle")))), (companyIdentityRpc || updater && update) && /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-header-actions" }, companyIdentityRpc && /* @__PURE__ */ import_react12.default.createElement(CompanyIdentityPanel, { rpc: companyIdentityRpc, t, disabled: frozen }), updater && update && /* @__PURE__ */ import_react12.default.createElement(UpdatePanel, { client: updater, view: update, t }))), frozen && /* @__PURE__ */ import_react12.default.createElement("p", { role: "status", className: "ws-update-freeze" }, t(update?.reconnecting ? "updateReconnect" : update?.phase === "installing" ? "updateFreezeInstalling" : update?.phase === "verifying" ? "updateFreezeVerifying" : "updateFreeze")), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-inline-sync" }, wechat && /* @__PURE__ */ import_react12.default.createElement(SyncPanel, { client: wechat, t, view, workspaceId: selectedWorkspace }), !contact.id && workspaceState.error && /* @__PURE__ */ import_react12.default.createElement("span", { role: "status" }, workspaceState.error)), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-body", "data-empty": !contact.id, "data-show-chat": showChat, "data-profile": profileVisibility }, /* @__PURE__ */ import_react12.default.createElement("aside", { className: "ws-contacts", "aria-label": t("customers") }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-contacts-head" }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-intent-sortline" }, /* @__PURE__ */ import_react12.default.createElement("h2", null, t("customers")), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-intent-sort-control" }, /* @__PURE__ */ import_react12.default.createElement("select", { className: "ws-intent-sort", "aria-label": t("intentSort"), value: sort, onChange: (event) => setSort(event.currentTarget.value === "intent" ? "intent" : "recent") }, /* @__PURE__ */ import_react12.default.createElement("option", { value: "recent" }, t("intentSortRecent")), /* @__PURE__ */ import_react12.default.createElement("option", { value: "intent" }, t("intentSortHigh"))), /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "chevron", size: 12 }))), /* @__PURE__ */ import_react12.default.createElement("label", { className: "ws-search" }, /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "search", size: 15 }), /* @__PURE__ */ import_react12.default.createElement("input", { name: "sales-search", autoComplete: "off", "aria-label": t("search"), placeholder: t("search"), value: query, onChange: (e) => setQuery(e.target.value) })), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-filters", role: "group", "aria-label": t("customers") }, ["all", "pending", "handled"].map((value) => /* @__PURE__ */ import_react12.default.createElement("button", { key: value, type: "button", "aria-pressed": filter === value, onClick: () => setFilter(value) }, t(value), /* @__PURE__ */ import_react12.default.createElement("span", null, value === "all" ? state.contacts.length : value === "pending" ? pending : state.contacts.length - pending))))), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-contact-list" }, contacts.map((c) => /* @__PURE__ */ import_react12.default.createElement("button", { key: c.id, className: `ws-contact ${c.id === contact.id ? "is-selected" : ""}`, "aria-pressed": c.id === contact.id, onClick: () => select(c.id) }, /* @__PURE__ */ import_react12.default.createElement(WechatAvatar, { client: wechat, scope: JSON.stringify([selectedWorkspace, c.wechat?.accountId]), owner: c.wechat?.chatKey ?? c.id, mediaId: c.wechat?.avatarId, fallback: c.initials }), /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-contact-content" }, /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-contact-line" }, /* @__PURE__ */ import_react12.default.createElement("strong", { title: c.name }, c.name), /* @__PURE__ */ import_react12.default.createElement("time", { dateTime: c.time, title: c.time }, displayTime(c.time))), /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-preview" }, c.wechat && c.preview === "[image]" ? t("wxImageListPreview") : c.preview), c.wechat && /* @__PURE__ */ import_react12.default.createElement(IntentBadge, { intent: c.intent, t })))), !contacts.length && /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-empty" }, /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "search", size: 26 }), /* @__PURE__ */ import_react12.default.createElement("p", null, t(state.contacts.length ? "noResults" : presentation.emptyKey)), state.contacts.length > 0 && /* @__PURE__ */ import_react12.default.createElement("button", { className: "ws-text-button", onClick: () => {
|
|
13364
13482
|
setQuery("");
|
|
13365
13483
|
setFilter("all");
|
|
13366
13484
|
} }, t("clearSearch")))), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-sync" }, state.contacts.length > 0 ? /* @__PURE__ */ import_react12.default.createElement(SyncFooter, { view, t }) : /* @__PURE__ */ import_react12.default.createElement("span", null, /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-dot" }), t("wxLocalHistory")))), /* @__PURE__ */ import_react12.default.createElement("main", { className: "ws-conversation" }, !contact.id ? /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-conversation-empty" }, /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "chat", size: 34 }), /* @__PURE__ */ import_react12.default.createElement("h2", null, t("wxRealTitle")), /* @__PURE__ */ import_react12.default.createElement("p", null, syncActive || syncPercent !== void 0 ? /* @__PURE__ */ import_react12.default.createElement(SyncActivity, { active: syncActive, percent: syncPercent }, t(syncActive ? "wxSyncingHint" : syncLabel)) : t(presentation.blocked ? "wxAwaitConnectionHistory" : presentation.hintKey ?? "wxSelectChat")), (syncActive || syncPercent !== void 0) && /* @__PURE__ */ import_react12.default.createElement(SyncProgressTrack, { progress: syncProgress, active: syncActive, t })) : /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-conversation-head" }, /* @__PURE__ */ import_react12.default.createElement("button", { className: "ws-icon-button ws-mobile-back", "aria-label": t("contactsBack"), onClick: () => setShowChat(false) }, /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "arrow" })), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-person-title" }, /* @__PURE__ */ import_react12.default.createElement("h2", null, contact.name, !contact.wechat && /* @__PURE__ */ import_react12.default.createElement("span", null, contact.segment)), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-person-meta" }, /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-person-source" }, /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-dot", "aria-hidden": "true" }), t("wechat"), /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-separator", "aria-hidden": "true" }, "/"), contact.wechat ? contact.crm ? t("wxBound") : t("wxUnbound") : t("sampleContact")), contact.wechat && /* @__PURE__ */ import_react12.default.createElement(IntentDetails, { key: contact.id, intent: contact.intent, t }))), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-conversation-actions" }, /* @__PURE__ */ import_react12.default.createElement("button", { className: "ws-button ws-handle", disabled: frozen || contact.status === "handled", onClick: () => {
|
package/dist/host.js
CHANGED
|
@@ -15819,7 +15819,7 @@ import { homedir, release } from "node:os";
|
|
|
15819
15819
|
import { isAbsolute, join } from "node:path";
|
|
15820
15820
|
|
|
15821
15821
|
// src/update/version.ts
|
|
15822
|
-
var RUNNING_VERSION = true ? "0.11.
|
|
15822
|
+
var RUNNING_VERSION = true ? "0.11.4" : "0.0.0-dev";
|
|
15823
15823
|
|
|
15824
15824
|
// src/diagnostics.ts
|
|
15825
15825
|
var MAX_FILE_BYTES = 512 * 1024;
|
|
@@ -15989,6 +15989,11 @@ async function diagnosticHttp(operation, send, signal) {
|
|
|
15989
15989
|
}
|
|
15990
15990
|
}
|
|
15991
15991
|
|
|
15992
|
+
// src/sales-model.ts
|
|
15993
|
+
function isSalesFlash(provider, model) {
|
|
15994
|
+
return model === "deepseek-v4.1-flash" || provider === "deepseek-account" && model === "deepseek-flash";
|
|
15995
|
+
}
|
|
15996
|
+
|
|
15992
15997
|
// src/wechat/cua-approval.ts
|
|
15993
15998
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
15994
15999
|
var CuaApprovalBroker = class {
|
|
@@ -16559,8 +16564,14 @@ var UpdateCoordinator = class {
|
|
|
16559
16564
|
view;
|
|
16560
16565
|
record = { schema: 1, phase: "idle", automatic: DEFAULT_AUTOMATIC };
|
|
16561
16566
|
initialized;
|
|
16567
|
+
statusInitialized;
|
|
16568
|
+
showVerification;
|
|
16569
|
+
verificationStarted = new Promise((resolve4) => {
|
|
16570
|
+
this.showVerification = resolve4;
|
|
16571
|
+
});
|
|
16562
16572
|
checking;
|
|
16563
16573
|
job;
|
|
16574
|
+
installing = false;
|
|
16564
16575
|
timer;
|
|
16565
16576
|
lifetime = new AbortController();
|
|
16566
16577
|
disposed = false;
|
|
@@ -16572,11 +16583,18 @@ var UpdateCoordinator = class {
|
|
|
16572
16583
|
this.view = { phase: "idle", runningVersion: options.version, automatic: options.companyMarket ? false : DEFAULT_AUTOMATIC, ...options.companyMarket ? { source: "company-market" } : {} };
|
|
16573
16584
|
}
|
|
16574
16585
|
snapshot() {
|
|
16575
|
-
|
|
16586
|
+
const { phase, candidate, installedVersion, runningVersion } = this.view;
|
|
16587
|
+
const targetInstalled = Boolean(this.record.to && this.record.to === installedVersion && installedVersion === runningVersion);
|
|
16588
|
+
const completedStages = phase === "preparing" ? 0 : phase === "installing" && this.installing ? 1 : phase === "verifying" && targetInstalled ? 2 : phase === "updated" ? 3 : void 0;
|
|
16589
|
+
const retryable = phase === "failed" && candidate !== void 0 && candidate.version === this.record.failedTarget;
|
|
16590
|
+
return structuredClone({ ...this.view, ...completedStages !== void 0 && { completedStages }, ...retryable && { retryable } });
|
|
16576
16591
|
}
|
|
16577
16592
|
initialize() {
|
|
16578
16593
|
return this.initialized ??= this.initializeOnce();
|
|
16579
16594
|
}
|
|
16595
|
+
initializeForStatus() {
|
|
16596
|
+
return this.statusInitialized ??= Promise.race([this.initialize(), this.verificationStarted]);
|
|
16597
|
+
}
|
|
16580
16598
|
async initializeOnce() {
|
|
16581
16599
|
if (this.options.companyMarket) {
|
|
16582
16600
|
try {
|
|
@@ -16639,6 +16657,7 @@ var UpdateCoordinator = class {
|
|
|
16639
16657
|
return;
|
|
16640
16658
|
}
|
|
16641
16659
|
this.view.phase = "verifying";
|
|
16660
|
+
this.showVerification();
|
|
16642
16661
|
await this.options.health();
|
|
16643
16662
|
this.record.phase = "updated";
|
|
16644
16663
|
this.record.failedTarget = void 0;
|
|
@@ -16746,6 +16765,7 @@ var UpdateCoordinator = class {
|
|
|
16746
16765
|
this.view.phase = "restart-required";
|
|
16747
16766
|
return;
|
|
16748
16767
|
}
|
|
16768
|
+
const wasUpdated = this.view.phase === "updated";
|
|
16749
16769
|
this.view.phase = "checking";
|
|
16750
16770
|
this.view.error = void 0;
|
|
16751
16771
|
try {
|
|
@@ -16757,7 +16777,7 @@ var UpdateCoordinator = class {
|
|
|
16757
16777
|
if (candidate && candidate.version === this.record.failedTarget) {
|
|
16758
16778
|
this.view.phase = "failed";
|
|
16759
16779
|
this.view.error = this.record.result?.result.error?.code ?? "UPDATE_FAILED";
|
|
16760
|
-
} else this.view.phase = candidate ? "available" : "idle";
|
|
16780
|
+
} else this.view.phase = candidate ? "available" : wasUpdated ? "updated" : "idle";
|
|
16761
16781
|
this.view.checkedAt = Date.now();
|
|
16762
16782
|
this.record.checkedAt = this.view.checkedAt;
|
|
16763
16783
|
this.nextCheck = Date.now() + CHECK_INTERVAL_MS;
|
|
@@ -16766,6 +16786,7 @@ var UpdateCoordinator = class {
|
|
|
16766
16786
|
if (!this.disposed) {
|
|
16767
16787
|
diagnostic("install.update-check", "failed", {}, error);
|
|
16768
16788
|
this.view.phase = "failed";
|
|
16789
|
+
this.view.candidate = void 0;
|
|
16769
16790
|
this.view.error = code(error);
|
|
16770
16791
|
this.nextCheck = Date.now() + CHECK_RETRY_MS[Math.min(this.failures++, CHECK_RETRY_MS.length - 1)];
|
|
16771
16792
|
}
|
|
@@ -16850,6 +16871,7 @@ var UpdateCoordinator = class {
|
|
|
16850
16871
|
preparation.throwIfAborted();
|
|
16851
16872
|
if (!this.options.clients.ready(requestId)) throw Error("UPDATE_WINDOW_NOT_READY");
|
|
16852
16873
|
this.view.phase = "installing";
|
|
16874
|
+
this.installing = true;
|
|
16853
16875
|
handed = true;
|
|
16854
16876
|
const result = resultFacts(await cap.manager.updateBundle(PACKAGE_NAME, version, { registry: checked.registry, requestId }));
|
|
16855
16877
|
if (result.from !== this.record.from || result.to !== version) throw Error("UPDATE_STATE_CHANGED");
|
|
@@ -16871,6 +16893,7 @@ var UpdateCoordinator = class {
|
|
|
16871
16893
|
await this.options.state.write(this.record);
|
|
16872
16894
|
}
|
|
16873
16895
|
} finally {
|
|
16896
|
+
this.installing = false;
|
|
16874
16897
|
releaseActivity?.();
|
|
16875
16898
|
this.options.clients.cancel();
|
|
16876
16899
|
try {
|
|
@@ -17028,7 +17051,8 @@ function registerUpdateRoutes(ctx, coordinator, clients) {
|
|
|
17028
17051
|
try {
|
|
17029
17052
|
const p2 = envelope.payload;
|
|
17030
17053
|
if (!p2 || typeof p2 !== "object" || !Object.hasOwn(fields, p2.operation) || Object.keys(p2).some((k2) => !["operation", ...fields[p2.operation]].includes(k2))) throw Error("UPDATE_INVALID_REQUEST");
|
|
17031
|
-
await coordinator.
|
|
17054
|
+
if (p2.operation === "status" || p2.operation === "heartbeat") await coordinator.initializeForStatus();
|
|
17055
|
+
else await coordinator.initialize();
|
|
17032
17056
|
let prepareRequestId;
|
|
17033
17057
|
if (p2.operation === "automatic") {
|
|
17034
17058
|
if (typeof p2.enabled !== "boolean") throw Error("UPDATE_INVALID_REQUEST");
|
|
@@ -19776,7 +19800,7 @@ defineMethod("transform", [
|
|
|
19776
19800
|
], ({ inner }, isInner) => inner.toString(isInner));
|
|
19777
19801
|
|
|
19778
19802
|
// src/agent-knowledge.ts
|
|
19779
|
-
import { randomUUID as
|
|
19803
|
+
import { randomUUID as randomUUID14 } from "node:crypto";
|
|
19780
19804
|
import { join as join9 } from "node:path";
|
|
19781
19805
|
import { readFile as readFile7 } from "node:fs/promises";
|
|
19782
19806
|
|
|
@@ -19873,6 +19897,61 @@ var KnowledgeTurns = class {
|
|
|
19873
19897
|
}
|
|
19874
19898
|
};
|
|
19875
19899
|
|
|
19900
|
+
// src/knowledge-http-correlation.ts
|
|
19901
|
+
import { AsyncLocalStorage as AsyncLocalStorage4 } from "node:async_hooks";
|
|
19902
|
+
import { randomUUID as randomUUID11 } from "node:crypto";
|
|
19903
|
+
import { channel } from "node:diagnostics_channel";
|
|
19904
|
+
|
|
19905
|
+
// src/production-endpoints.ts
|
|
19906
|
+
var PRODUCTION_WEKNORA_BASE_URL = "https://wanjidazi.com/sales-kb/api/v1";
|
|
19907
|
+
function weknoraEnvironment(value) {
|
|
19908
|
+
if (!value || typeof value !== "object" || !("baseUrl" in value) || typeof value.baseUrl !== "string") return;
|
|
19909
|
+
const url = URL.parse(value.baseUrl.trim());
|
|
19910
|
+
if (!url) return;
|
|
19911
|
+
if (url.hostname === "test-wjdz.wanjisaas.com") return "test";
|
|
19912
|
+
if (["wanjidazi.com", "www.wanjidazi.com"].includes(url.hostname) && /^\/sales-kb(?:\/|$)/.test(url.pathname)) return "production";
|
|
19913
|
+
}
|
|
19914
|
+
var PRODUCTION_LANGFUSE_BASE_URL = "https://wanjidazi.com/langfuse";
|
|
19915
|
+
var PRODUCTION_LANGFUSE_PROJECT_ID = "wanji-sales-test";
|
|
19916
|
+
var PRODUCTION_LANGFUSE_CREDENTIALS_REF = "wanji-langfuse-api-production";
|
|
19917
|
+
function isProductionLangfuse(target) {
|
|
19918
|
+
const host = new URL(target.baseUrl).hostname;
|
|
19919
|
+
return ["wanjidazi.com", "www.wanjidazi.com"].includes(host);
|
|
19920
|
+
}
|
|
19921
|
+
|
|
19922
|
+
// src/knowledge-http-correlation.ts
|
|
19923
|
+
var KnowledgeHttpCorrelation = class {
|
|
19924
|
+
scope = new AsyncLocalStorage4();
|
|
19925
|
+
channel = channel("undici:request:create");
|
|
19926
|
+
base;
|
|
19927
|
+
constructor(baseUrl = PRODUCTION_WEKNORA_BASE_URL) {
|
|
19928
|
+
this.base = new URL(baseUrl);
|
|
19929
|
+
this.channel.subscribe(this.capture);
|
|
19930
|
+
}
|
|
19931
|
+
capture = (message) => {
|
|
19932
|
+
const receipts = this.scope.getStore();
|
|
19933
|
+
if (!receipts) return;
|
|
19934
|
+
try {
|
|
19935
|
+
const request2 = message.request;
|
|
19936
|
+
if (String(request2.origin) !== this.base.origin || receipts.length >= 32) return;
|
|
19937
|
+
const path3 = request2.path.split("?", 1)[0];
|
|
19938
|
+
const route = request2.method === "POST" && path3 === this.base.pathname + "/knowledge-search" ? "/knowledge-search" : request2.method === "GET" && path3 === this.base.pathname + "/knowledge/search" ? "/knowledge/search" : void 0;
|
|
19939
|
+
if (!route) return;
|
|
19940
|
+
const id2 = randomUUID11().replaceAll("-", "");
|
|
19941
|
+
request2.addHeader("x-wanji-kb-request-id", id2);
|
|
19942
|
+
receipts.push({ method: request2.method, route, request_id: id2 });
|
|
19943
|
+
} catch {
|
|
19944
|
+
}
|
|
19945
|
+
};
|
|
19946
|
+
run(receipts, send) {
|
|
19947
|
+
return this.scope.run(receipts, send);
|
|
19948
|
+
}
|
|
19949
|
+
close() {
|
|
19950
|
+
this.channel.unsubscribe(this.capture);
|
|
19951
|
+
this.scope.disable();
|
|
19952
|
+
}
|
|
19953
|
+
};
|
|
19954
|
+
|
|
19876
19955
|
// src/knowledge-privacy.ts
|
|
19877
19956
|
import { createHmac } from "node:crypto";
|
|
19878
19957
|
import { open as open2, lstat as lstat4 } from "node:fs/promises";
|
|
@@ -19914,28 +19993,9 @@ var relevanceFormat = "scoreExplanation\u5FC5\u987B\u662FJSON\u5B57\u7B26\u4E32\
|
|
|
19914
19993
|
|
|
19915
19994
|
// src/langfuse-config.ts
|
|
19916
19995
|
import { readFile as readFile5, writeFile as writeFile4, rename as rename3, unlink as unlink3 } from "node:fs/promises";
|
|
19917
|
-
import { createHash as createHash4, randomUUID as
|
|
19996
|
+
import { createHash as createHash4, randomUUID as randomUUID12 } from "node:crypto";
|
|
19918
19997
|
import { homedir as homedir4 } from "node:os";
|
|
19919
19998
|
import { join as join6 } from "node:path";
|
|
19920
|
-
|
|
19921
|
-
// src/production-endpoints.ts
|
|
19922
|
-
var PRODUCTION_WEKNORA_BASE_URL = "https://wanjidazi.com/sales-kb/api/v1";
|
|
19923
|
-
function weknoraEnvironment(value) {
|
|
19924
|
-
if (!value || typeof value !== "object" || !("baseUrl" in value) || typeof value.baseUrl !== "string") return;
|
|
19925
|
-
const url = URL.parse(value.baseUrl.trim());
|
|
19926
|
-
if (!url) return;
|
|
19927
|
-
if (url.hostname === "test-wjdz.wanjisaas.com") return "test";
|
|
19928
|
-
if (["wanjidazi.com", "www.wanjidazi.com"].includes(url.hostname) && /^\/sales-kb(?:\/|$)/.test(url.pathname)) return "production";
|
|
19929
|
-
}
|
|
19930
|
-
var PRODUCTION_LANGFUSE_BASE_URL = "https://wanjidazi.com/langfuse";
|
|
19931
|
-
var PRODUCTION_LANGFUSE_PROJECT_ID = "wanji-sales-test";
|
|
19932
|
-
var PRODUCTION_LANGFUSE_CREDENTIALS_REF = "wanji-langfuse-api-production";
|
|
19933
|
-
function isProductionLangfuse(target) {
|
|
19934
|
-
const host = new URL(target.baseUrl).hostname;
|
|
19935
|
-
return ["wanjidazi.com", "www.wanjidazi.com"].includes(host);
|
|
19936
|
-
}
|
|
19937
|
-
|
|
19938
|
-
// src/langfuse-config.ts
|
|
19939
19999
|
var defaultConfigFile = join6(homedir4(), ".config", "wanji-sales", "langfuse.json");
|
|
19940
20000
|
function resolveTarget(name2, value) {
|
|
19941
20001
|
const v2 = value;
|
|
@@ -37333,7 +37393,7 @@ async function deliverKnowledgeJudgment(event, request2) {
|
|
|
37333
37393
|
// src/langfuse-outbox.ts
|
|
37334
37394
|
import { mkdir as mkdir5, readdir as readdir4, readFile as readFile6, rename as rename4, stat, unlink as unlink4, writeFile as writeFile5 } from "node:fs/promises";
|
|
37335
37395
|
import { join as join8 } from "node:path";
|
|
37336
|
-
import { randomUUID as
|
|
37396
|
+
import { randomUUID as randomUUID13 } from "node:crypto";
|
|
37337
37397
|
var maxBytes = 2 * 1024 * 1024;
|
|
37338
37398
|
function validEvent(event) {
|
|
37339
37399
|
const validKind = event.kind === "question" ? !!event.question && /^[a-zA-Z0-9_-]{1,160}$/.test(event.question.sessionId) && ["sales-reply", "sales-agent", "knowledge-search"].includes(event.question.source) : !event.question && (event.kind === "tool" ? !!event.knowledgeCall && /^[a-zA-Z][a-zA-Z0-9_]{0,95}$/.test(event.knowledgeCall.name) && typeof event.knowledgeCall.callId === "string" : ["search", "read", "answer"].includes(event.kind));
|
|
@@ -37379,7 +37439,7 @@ var LangfuseOutbox = class {
|
|
|
37379
37439
|
if (e.code !== "ENOENT") throw e;
|
|
37380
37440
|
}
|
|
37381
37441
|
if ((await this.files()).length >= 1e3) throw new Error("queue-full");
|
|
37382
|
-
const tmp = path3 + "." +
|
|
37442
|
+
const tmp = path3 + "." + randomUUID13() + ".tmp";
|
|
37383
37443
|
try {
|
|
37384
37444
|
await writeFile5(tmp, text6, { flag: "wx", mode: 384, flush: true });
|
|
37385
37445
|
await rename4(tmp, path3);
|
|
@@ -37416,7 +37476,7 @@ var LangfuseOutbox = class {
|
|
|
37416
37476
|
const target = resolveTarget(value.target.name, value.target);
|
|
37417
37477
|
if (name2 !== destinationId(target) + "--" + value.id + ".json" || !validEvent(value)) throw new Error();
|
|
37418
37478
|
} catch {
|
|
37419
|
-
await rename4(path3, path3 + "." +
|
|
37479
|
+
await rename4(path3, path3 + "." + randomUUID13() + ".corrupt");
|
|
37420
37480
|
diagnostic("langfuse.outbox.quarantine", "failed", {}, new Error("invalid-event"));
|
|
37421
37481
|
continue;
|
|
37422
37482
|
}
|
|
@@ -37475,12 +37535,13 @@ async function deliverAgentEvent(event) {
|
|
|
37475
37535
|
var AgentKnowledgeObserver = class {
|
|
37476
37536
|
options;
|
|
37477
37537
|
production;
|
|
37538
|
+
http;
|
|
37478
37539
|
started;
|
|
37479
37540
|
outbox;
|
|
37480
37541
|
judgments;
|
|
37481
37542
|
ready;
|
|
37482
37543
|
lifetime = new AbortController();
|
|
37483
|
-
instanceId =
|
|
37544
|
+
instanceId = randomUUID14();
|
|
37484
37545
|
timer;
|
|
37485
37546
|
entries = /* @__PURE__ */ new Map();
|
|
37486
37547
|
finished = /* @__PURE__ */ new Set();
|
|
@@ -37499,6 +37560,7 @@ var AgentKnowledgeObserver = class {
|
|
|
37499
37560
|
sanitize = (value) => value;
|
|
37500
37561
|
constructor(options) {
|
|
37501
37562
|
this.production = options.environment === "production";
|
|
37563
|
+
if (this.production) this.http = new KnowledgeHttpCorrelation();
|
|
37502
37564
|
this.options = options;
|
|
37503
37565
|
this.outbox = new LangfuseOutbox(join9(options.directory, "completed"));
|
|
37504
37566
|
this.started = new LangfuseOutbox(join9(options.directory, "started"));
|
|
@@ -37602,7 +37664,7 @@ var AgentKnowledgeObserver = class {
|
|
|
37602
37664
|
return;
|
|
37603
37665
|
}
|
|
37604
37666
|
const entry = { turn: exec.agent ? this.turns.current(exec.agent.id)?.turn : void 0, since: performance.now(), event: {
|
|
37605
|
-
id:
|
|
37667
|
+
id: randomUUID14(),
|
|
37606
37668
|
target: this.target,
|
|
37607
37669
|
kind,
|
|
37608
37670
|
knowledgeBaseId,
|
|
@@ -37633,11 +37695,12 @@ var AgentKnowledgeObserver = class {
|
|
|
37633
37695
|
return promise;
|
|
37634
37696
|
}
|
|
37635
37697
|
/** At most 20ms local journal wait; no network or model is awaited by the search. */
|
|
37636
|
-
async start(exec) {
|
|
37698
|
+
async start(exec, httpRequests) {
|
|
37637
37699
|
if (this.lifetime.signal.aborted || !this.eligible(exec) && !this.callScope(exec)) return;
|
|
37638
37700
|
try {
|
|
37639
37701
|
const work = this.ready.then(() => {
|
|
37640
37702
|
const entry = this.begin(exec, true);
|
|
37703
|
+
if (entry && httpRequests) entry.httpRequests = httpRequests;
|
|
37641
37704
|
if (entry) return this.queue(() => this.started.put(entry.event));
|
|
37642
37705
|
});
|
|
37643
37706
|
let timer;
|
|
@@ -37651,6 +37714,15 @@ var AgentKnowledgeObserver = class {
|
|
|
37651
37714
|
this.error = "capture-failed";
|
|
37652
37715
|
}
|
|
37653
37716
|
}
|
|
37717
|
+
async run(exec, next) {
|
|
37718
|
+
if (this.http && exec.name.endsWith("_search") && this.callScope(exec)) {
|
|
37719
|
+
const requests = [];
|
|
37720
|
+
await this.start(exec, requests);
|
|
37721
|
+
return this.http.run(requests, next);
|
|
37722
|
+
}
|
|
37723
|
+
await this.start(exec);
|
|
37724
|
+
return next();
|
|
37725
|
+
}
|
|
37654
37726
|
/** Harness emits a frozen final result. Snapshot synchronously, persist asynchronously. */
|
|
37655
37727
|
finish(exec, result) {
|
|
37656
37728
|
if (this.finished.has(exec.token) || this.lifetime.signal.aborted) return;
|
|
@@ -37678,6 +37750,16 @@ var AgentKnowledgeObserver = class {
|
|
|
37678
37750
|
const status2 = result.isError ? code4 === "TOOL_TIMEOUT" ? "timeout" : exec.signal.aborted ? "cancelled" : "error" : empty ? "empty" : "success";
|
|
37679
37751
|
if (!result.isError && exec.name.endsWith("_search")) this.rememberDocumentScopes(value, event.knowledgeBaseId);
|
|
37680
37752
|
event.output = this.production && !result.isError && exec.name.endsWith("_search") ? this.productionSearchOutput(value, event.knowledgeBaseId, status2) : { status: status2 };
|
|
37753
|
+
if (entry.httpRequests?.length) {
|
|
37754
|
+
const target = event.target;
|
|
37755
|
+
event.output.http_requests = entry.httpRequests.map((request2) => {
|
|
37756
|
+
const url = new URL(target.baseUrl + "/project/" + encodeURIComponent(target.projectId) + "/traces");
|
|
37757
|
+
url.searchParams.set("filter", "metadata;stringObject;request_id;=;" + request2.request_id + ",name;string;;starts with;WeKnora%20");
|
|
37758
|
+
const start = Date.parse(event.startedAt);
|
|
37759
|
+
url.searchParams.set("dateRange", start - 3e5 + "-" + (start + event.elapsedMs + 3e5));
|
|
37760
|
+
return { ...request2, langfuse_url: url.href };
|
|
37761
|
+
});
|
|
37762
|
+
}
|
|
37681
37763
|
void this.queue(async () => {
|
|
37682
37764
|
await this.outbox.put(event);
|
|
37683
37765
|
await this.started.remove(event);
|
|
@@ -37730,7 +37812,7 @@ var AgentKnowledgeObserver = class {
|
|
|
37730
37812
|
}
|
|
37731
37813
|
}
|
|
37732
37814
|
recordMaterialMetadata(knowledgeBaseId, startedAt, elapsedMs, status) {
|
|
37733
|
-
const callId =
|
|
37815
|
+
const callId = randomUUID14();
|
|
37734
37816
|
void this.ready.then(() => {
|
|
37735
37817
|
if (!this.target || this.lifetime.signal.aborted || knowledgeBaseId !== this.options.material?.knowledgeBaseId) return;
|
|
37736
37818
|
const event = {
|
|
@@ -37756,7 +37838,7 @@ var AgentKnowledgeObserver = class {
|
|
|
37756
37838
|
try {
|
|
37757
37839
|
const turn = this.turns.accept(sessionId, event);
|
|
37758
37840
|
if (!turn) return;
|
|
37759
|
-
const id2 =
|
|
37841
|
+
const id2 = randomUUID14(), value = { id: id2, target: this.target, kind: "answer", knowledgeBaseId: this.options.knowledgeBaseId, startedAt: turn.startedAt, elapsedMs: Math.max(0, Date.now() - Date.parse(turn.startedAt)), input: { user_question: turn.question }, output: { status: "success", judge_eligible: false, judge_v2_eligible: true, evaluation: { user_question: turn.question, answer: turn.answer, evidence: turn.evidence, observed_at: turn.startedAt } }, agent: { sessionId, callId: "answer-" + turn.turn, rootCallId: "answer-" + turn.turn, nested: false, dispatched: true, instanceId: this.instanceId } };
|
|
37760
37842
|
if (Buffer.byteLength(JSON.stringify(value)) > 15e5 || this.pendingWrites >= 1e3) return;
|
|
37761
37843
|
value.input = this.sanitize(value.input);
|
|
37762
37844
|
value.output = this.sanitize(value.output);
|
|
@@ -37812,6 +37894,7 @@ var AgentKnowledgeObserver = class {
|
|
|
37812
37894
|
return { enabled: !!this.target, ...completed, pending: completed.pending + judgments.pending, otherPending: completed.otherPending + judgments.otherPending, blocked: completed.blocked + starts.blocked + judgments.blocked, unfinished: starts.pending, inFlight: this.entries.size, dropped: this.dropped, errorCode: this.error ?? this.recoveryError };
|
|
37813
37895
|
}
|
|
37814
37896
|
async close() {
|
|
37897
|
+
this.http?.close();
|
|
37815
37898
|
clearInterval(this.timer);
|
|
37816
37899
|
this.lifetime.abort();
|
|
37817
37900
|
await this.drain();
|
|
@@ -38185,7 +38268,7 @@ async function runModel(llm, route, input, signal) {
|
|
|
38185
38268
|
}
|
|
38186
38269
|
|
|
38187
38270
|
// src/server/profile-v2.ts
|
|
38188
|
-
import { randomUUID as
|
|
38271
|
+
import { randomUUID as randomUUID15 } from "node:crypto";
|
|
38189
38272
|
|
|
38190
38273
|
// src/server/analysis.ts
|
|
38191
38274
|
var ANALYSIS_VERSION = "crm-dual-products-roles-timeline-v6-product-context";
|
|
@@ -38376,7 +38459,7 @@ function createProductProfileService(deps) {
|
|
|
38376
38459
|
const system = stage === "extract" ? EXTRACT_SYSTEM : REVIEW_SYSTEM, text6 = JSON.stringify(payload);
|
|
38377
38460
|
modelChars += system.length + text6.length;
|
|
38378
38461
|
if (modelChars > config.maxModelInputChars) throw new ProfileError("MODEL_INPUT_TOO_LARGE", "Aggregate analysis-input budget exceeded");
|
|
38379
|
-
const traceId =
|
|
38462
|
+
const traceId = randomUUID15(), entry = { version: ANALYSIS_VERSION, stage, system, text: text6, model: execution.modelKey, traceId, createdAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
38380
38463
|
await store.write("requests", traceId, entry);
|
|
38381
38464
|
await execution.audit?.("profile-request", entry);
|
|
38382
38465
|
const result = await deps.analyze({ system, text: text6 }, signal);
|
|
@@ -38471,7 +38554,7 @@ function createProductProfileService(deps) {
|
|
|
38471
38554
|
call2.errorCode = e instanceof ProfileError ? e.code : "MODEL_ANALYSIS_FAILED";
|
|
38472
38555
|
limitations.push(call2.errorCode, "ANALYSIS_INCOMPLETE");
|
|
38473
38556
|
}
|
|
38474
|
-
const role2 = (
|
|
38557
|
+
const role2 = (channel2) => analysis?.roles.status === "identified" ? channel2 === analysis.roles.salesChannel ? "sales" : "customer" : "unknown";
|
|
38475
38558
|
const fullText = transcript.segments.map((s3) => `[channel=${s3.channelId} role=${role2(s3.channelId)} time=${s3.startMs ?? "?"}-${s3.endMs ?? "?"}ms] ${s3.text}`).join("\n");
|
|
38476
38559
|
call2.evidenceRef = await store.putEvidence(digest({ transcriptKey, fullText }), { callId: recording.callId, text: fullText, speakerAttribution: analysis?.roles.status === "identified" ? "channel-mapped" : "unknown" });
|
|
38477
38560
|
for (const segment of transcript.segments) {
|
|
@@ -38912,7 +38995,7 @@ async function validateSalesContext(context2, signal) {
|
|
|
38912
38995
|
}
|
|
38913
38996
|
|
|
38914
38997
|
// src/langfuse-collector.ts
|
|
38915
|
-
import { createHash as createHash8, randomUUID as
|
|
38998
|
+
import { createHash as createHash8, randomUUID as randomUUID16 } from "node:crypto";
|
|
38916
38999
|
|
|
38917
39000
|
// src/evaluation-types.ts
|
|
38918
39001
|
function nullable2(v2) {
|
|
@@ -39038,7 +39121,7 @@ var LangfuseCollector = class {
|
|
|
39038
39121
|
async read(value) {
|
|
39039
39122
|
await this.ready;
|
|
39040
39123
|
if (!this.target) return;
|
|
39041
|
-
await this.enqueue({ ...value, id:
|
|
39124
|
+
await this.enqueue({ ...value, id: randomUUID16(), target: this.target, kind: "read", knowledgeBaseId: this.options.knowledgeBaseId });
|
|
39042
39125
|
}
|
|
39043
39126
|
async enqueue(event) {
|
|
39044
39127
|
try {
|
|
@@ -39109,13 +39192,13 @@ var LangfuseCollector = class {
|
|
|
39109
39192
|
};
|
|
39110
39193
|
|
|
39111
39194
|
// src/knowledge-host.ts
|
|
39112
|
-
import { randomUUID as
|
|
39195
|
+
import { randomUUID as randomUUID20 } from "node:crypto";
|
|
39113
39196
|
import { homedir as homedir6 } from "node:os";
|
|
39114
39197
|
import { isAbsolute as isAbsolute6, join as join12 } from "node:path";
|
|
39115
39198
|
|
|
39116
39199
|
// src/evaluation-outbox.ts
|
|
39117
39200
|
import { mkdir as mkdir6, readdir as readdir5, readFile as readFile10, rename as rename5, stat as stat2, unlink as unlink5, writeFile as writeFile6 } from "node:fs/promises";
|
|
39118
|
-
import { randomUUID as
|
|
39201
|
+
import { randomUUID as randomUUID17 } from "node:crypto";
|
|
39119
39202
|
import { join as join11 } from "node:path";
|
|
39120
39203
|
var MAX_EVENT_BYTES = 512 * 1024;
|
|
39121
39204
|
var EvaluationOutbox = class {
|
|
@@ -39166,7 +39249,7 @@ var EvaluationOutbox = class {
|
|
|
39166
39249
|
} catch (error) {
|
|
39167
39250
|
if (error.code !== "ENOENT") throw error;
|
|
39168
39251
|
}
|
|
39169
|
-
const temporary = join11(this.directory, `.${event.event_id}-${
|
|
39252
|
+
const temporary = join11(this.directory, `.${event.event_id}-${randomUUID17()}.tmp`);
|
|
39170
39253
|
try {
|
|
39171
39254
|
await writeFile6(temporary, JSON.stringify(event), { encoding: "utf8", mode: 384, flag: "wx", flush: true });
|
|
39172
39255
|
await rename5(temporary, final);
|
|
@@ -39199,14 +39282,14 @@ var EvaluationOutbox = class {
|
|
|
39199
39282
|
if (!event || filename !== event.event_id + ".json" || typeof event.query !== "string" || event.query.length > 4e3 || typeof event.error_code !== "string" || !statuses.includes(event.status) || typeof event.source !== "string") throw new Error("Invalid stored client evaluation event");
|
|
39200
39283
|
if (event.tool_result && (event.tool_result.event_id !== event.event_id || event.tool_result.query !== event.query || event.tool_result.status !== event.status || !Array.isArray(event.tool_result.hits) || event.tool_result.hits.length > 8)) throw new Error("Invalid stored tool evidence");
|
|
39201
39284
|
} catch {
|
|
39202
|
-
await rename5(path3, join11(this.directory, `${filename.slice(0, -5)}-${
|
|
39285
|
+
await rename5(path3, join11(this.directory, `${filename.slice(0, -5)}-${randomUUID17()}.corrupt`));
|
|
39203
39286
|
continue;
|
|
39204
39287
|
}
|
|
39205
39288
|
try {
|
|
39206
39289
|
await send(event);
|
|
39207
39290
|
} catch (error) {
|
|
39208
39291
|
if (error?.permanent === true) {
|
|
39209
|
-
await rename5(path3, join11(this.directory, `${filename.slice(0, -5)}-${
|
|
39292
|
+
await rename5(path3, join11(this.directory, `${filename.slice(0, -5)}-${randomUUID17()}.rejected`));
|
|
39210
39293
|
continue;
|
|
39211
39294
|
}
|
|
39212
39295
|
throw error;
|
|
@@ -39220,7 +39303,7 @@ var EvaluationOutbox = class {
|
|
|
39220
39303
|
};
|
|
39221
39304
|
|
|
39222
39305
|
// src/tool-evaluation.ts
|
|
39223
|
-
import { randomUUID as
|
|
39306
|
+
import { randomUUID as randomUUID18 } from "node:crypto";
|
|
39224
39307
|
var ToolEvaluation = class {
|
|
39225
39308
|
options;
|
|
39226
39309
|
runs = /* @__PURE__ */ new Map();
|
|
@@ -39256,7 +39339,7 @@ var ToolEvaluation = class {
|
|
|
39256
39339
|
return result;
|
|
39257
39340
|
}
|
|
39258
39341
|
async search(query, maxResults, signal, association) {
|
|
39259
|
-
const started = performance.now(), startedAt = (/* @__PURE__ */ new Date()).toISOString(), eventId =
|
|
39342
|
+
const started = performance.now(), startedAt = (/* @__PURE__ */ new Date()).toISOString(), eventId = randomUUID18();
|
|
39260
39343
|
const meta = { event_id: eventId, query, max_results: maxResults, k: association?.k ?? 3, tool_name: this.options.toolName, tool_version: this.options.toolVersion, ...association ? { run_id: association.run_id, case_key: association.case_key } : {} };
|
|
39261
39344
|
let report;
|
|
39262
39345
|
try {
|
|
@@ -39277,7 +39360,7 @@ var ToolEvaluation = class {
|
|
|
39277
39360
|
if (Object.keys(payload).some((key) => !["dataset_id", "max_results", "k"].includes(key)) || typeof payload.dataset_id !== "string" || !/^[a-zA-Z0-9_-]{1,160}$/.test(payload.dataset_id) || typeof maxResults !== "number" || !Number.isInteger(maxResults) || maxResults < 1 || maxResults > this.options.maxResults || typeof k2 !== "number" || !Number.isInteger(k2) || k2 < 1 || k2 > 8) throw new KnowledgeError("bad-request");
|
|
39278
39361
|
this.starting++;
|
|
39279
39362
|
try {
|
|
39280
|
-
const run = parseRun(await this.options.evaluate({ operation: "create_tool_run", payload: { ...payload, client_run_id:
|
|
39363
|
+
const run = parseRun(await this.options.evaluate({ operation: "create_tool_run", payload: { ...payload, client_run_id: randomUUID18(), tool_name: this.options.toolName, tool_version: this.options.toolVersion } }, signal));
|
|
39281
39364
|
if (run.config.run_mode !== "harness-tool" || run.dataset_id !== payload.dataset_id || run.config.max_results !== maxResults || run.config.k !== k2 || run.items.length < 1 || run.items.length > 200 || new Set(run.items.map((i) => i.case_key)).size !== run.items.length) throw new KnowledgeError("invalid-response");
|
|
39282
39365
|
const controller = new AbortController();
|
|
39283
39366
|
this.runs.set(run.id, controller);
|
|
@@ -39576,7 +39659,7 @@ var knowledgeCases = [
|
|
|
39576
39659
|
];
|
|
39577
39660
|
|
|
39578
39661
|
// src/material-catalog.ts
|
|
39579
|
-
import { randomUUID as
|
|
39662
|
+
import { randomUUID as randomUUID19 } from "node:crypto";
|
|
39580
39663
|
|
|
39581
39664
|
// src/customer-materials.ts
|
|
39582
39665
|
var MATERIAL_KB_ID = "1f93aee2-6d66-42d7-8b7a-b5fe5d094550";
|
|
@@ -39754,7 +39837,7 @@ function createMaterialCatalog(config, maxResults, invoke, readMetadata, head =
|
|
|
39754
39837
|
}
|
|
39755
39838
|
signal.throwIfAborted();
|
|
39756
39839
|
if (!checked.length) return { status: "empty" };
|
|
39757
|
-
const requestId =
|
|
39840
|
+
const requestId = randomUUID19();
|
|
39758
39841
|
if (grants.size >= 128) grants.delete(grants.keys().next().value);
|
|
39759
39842
|
grants.set(requestId, { owner, expires: Date.now() + 12e4, constraints, items: new Map(checked.map((item) => [item.candidate.id, { url: item.url, evidence: item.candidate.evidence }])), remaining: 3 });
|
|
39760
39843
|
return { status: "candidates", requestId, candidates: checked.map((item) => item.candidate) };
|
|
@@ -40312,12 +40395,12 @@ function createKnowledgeHost(tools, config, lifetime = new AbortController().sig
|
|
|
40312
40395
|
const started = performance.now();
|
|
40313
40396
|
let execution;
|
|
40314
40397
|
if (transport && config.environment === "production" && directObserver) {
|
|
40315
|
-
const callId =
|
|
40398
|
+
const callId = randomUUID20();
|
|
40316
40399
|
execution = { token: /* @__PURE__ */ Symbol(), name: prefix + "_" + suffix, callId, rootCallId: callId, arguments: args, signal };
|
|
40317
|
-
await directObserver.start(execution);
|
|
40318
40400
|
}
|
|
40319
40401
|
try {
|
|
40320
|
-
const
|
|
40402
|
+
const send = () => invokeTool(suffix, args, signal, prefix, transport);
|
|
40403
|
+
const result = execution && directObserver ? await directObserver.run(execution, send) : await send();
|
|
40321
40404
|
if (execution) directObserver?.finish(execution, { isError: false, value: result, content: void 0 });
|
|
40322
40405
|
diagnostic(operation, "ok", { elapsedMs: Math.round(performance.now() - started) });
|
|
40323
40406
|
return result;
|
|
@@ -40339,7 +40422,7 @@ function createKnowledgeHost(tools, config, lifetime = new AbortController().sig
|
|
|
40339
40422
|
const timeout = AbortSignal.timeout(config.requestTimeoutMs);
|
|
40340
40423
|
const fused = AbortSignal.any([signal, timeout]);
|
|
40341
40424
|
try {
|
|
40342
|
-
const id2 =
|
|
40425
|
+
const id2 = randomUUID20();
|
|
40343
40426
|
const batch = await tools.execute({ calls: [{ type: "tool-call", id: id2, name: `${prefix}_${suffix}`, arguments: JSON.stringify(args) }], signal: fused });
|
|
40344
40427
|
fused.throwIfAborted();
|
|
40345
40428
|
const result = batch.results[0]?.result;
|
|
@@ -40431,7 +40514,7 @@ function createKnowledgeHost(tools, config, lifetime = new AbortController().sig
|
|
|
40431
40514
|
if (endpoint === "context") {
|
|
40432
40515
|
const context2 = await buildSalesContext(await searchRequest(payload, signal), signal);
|
|
40433
40516
|
signal.throwIfAborted();
|
|
40434
|
-
const contextId =
|
|
40517
|
+
const contextId = randomUUID20();
|
|
40435
40518
|
const owned = contexts.get(peer) ?? /* @__PURE__ */ new Map();
|
|
40436
40519
|
while (owned.size >= 128) owned.delete(owned.keys().next().value);
|
|
40437
40520
|
owned.set(contextId, { ...context2, contextId });
|
|
@@ -40450,7 +40533,7 @@ function createKnowledgeHost(tools, config, lifetime = new AbortController().sig
|
|
|
40450
40533
|
if (!materials) throw new KnowledgeError("disabled");
|
|
40451
40534
|
const p2 = inputFields(payload, ["query", "kind", "edition", "sentUrls", "allowResend"]);
|
|
40452
40535
|
if (typeof p2.query !== "string" || !materialKinds.includes(p2.kind) || !materialEditions2.includes(p2.edition) || !Array.isArray(p2.sentUrls) || p2.sentUrls.length > 100 || p2.sentUrls.some((u2) => typeof u2 !== "string" || u2.length > 2048) || typeof p2.allowResend !== "boolean") throw new KnowledgeError("bad-request");
|
|
40453
|
-
const found = await materials.search(p2, signal), contextId =
|
|
40536
|
+
const found = await materials.search(p2, signal), contextId = randomUUID20(), owned = materialContexts.get(peer) ?? /* @__PURE__ */ new Map();
|
|
40454
40537
|
while (owned.size >= 128) owned.delete(owned.keys().next().value);
|
|
40455
40538
|
const context2 = { ...found, contextId };
|
|
40456
40539
|
owned.set(contextId, context2);
|
|
@@ -40567,7 +40650,7 @@ function apply2(ctx, config, agentStatus, rerank, expandQuery, recordQuestion, r
|
|
|
40567
40650
|
const report = result.ok ? result.value : void 0;
|
|
40568
40651
|
const answer = report?.results.map((hit) => hit.document + "\n" + hit.content.slice(0, 1200)).join("\n\n");
|
|
40569
40652
|
const outcome = result.ok ? answer ? { status: "answered", answer } : { status: "no-reply" } : { status: result.error.code === "cancelled" ? "cancelled" : "error", errorCode: result.error.code };
|
|
40570
|
-
void recordQuestion({ source: "knowledge-search", sessionId: "sales-knowledge-search", requestId:
|
|
40653
|
+
void recordQuestion({ source: "knowledge-search", sessionId: "sales-knowledge-search", requestId: randomUUID20(), question: query, startedAt }, outcome).catch(() => {
|
|
40571
40654
|
});
|
|
40572
40655
|
}
|
|
40573
40656
|
}
|
|
@@ -40610,7 +40693,7 @@ function apply2(ctx, config, agentStatus, rerank, expandQuery, recordQuestion, r
|
|
|
40610
40693
|
}
|
|
40611
40694
|
|
|
40612
40695
|
// src/server/conversation-route.ts
|
|
40613
|
-
import { randomUUID as
|
|
40696
|
+
import { randomUUID as randomUUID21 } from "node:crypto";
|
|
40614
40697
|
var CONVERSATION_ENDPOINT = "wanji-sales-conversation/context";
|
|
40615
40698
|
function registerConversationRoute(ctx) {
|
|
40616
40699
|
const dispose = ctx.connection.fetch.register({ path: "/api/" + CONVERSATION_ENDPOINT, methods: ["POST"], requestBody: "buffered", async fetch(request2) {
|
|
@@ -40625,7 +40708,7 @@ function registerConversationRoute(ctx) {
|
|
|
40625
40708
|
try {
|
|
40626
40709
|
const input = parseConversationInput(envelope.payload);
|
|
40627
40710
|
if (!ctx.workspaceRegistry?.list().some((w2) => w2.id === input.workspaceId)) throw new ProfileError("WORKSPACE_UNAVAILABLE", "Unknown workspace");
|
|
40628
|
-
const id2 =
|
|
40711
|
+
const id2 = randomUUID21(), batch = await ctx.tools.execute({ calls: [{ type: "tool-call", id: id2, name: "crm_get_conversation_context", arguments: JSON.stringify(input) }], signal: request2.signal });
|
|
40629
40712
|
const response = batch.results.find((r) => r.callId === id2)?.result;
|
|
40630
40713
|
if (!response || response.isError) throw new ProfileError("CONVERSATION_CONTEXT_FAILED", "Initial context unavailable");
|
|
40631
40714
|
result = { ok: true, value: response.value };
|
|
@@ -40640,7 +40723,7 @@ function registerConversationRoute(ctx) {
|
|
|
40640
40723
|
}
|
|
40641
40724
|
|
|
40642
40725
|
// src/generation-sessions.ts
|
|
40643
|
-
import { randomUUID as
|
|
40726
|
+
import { randomUUID as randomUUID22 } from "node:crypto";
|
|
40644
40727
|
var GenerationSessions = class {
|
|
40645
40728
|
leases = /* @__PURE__ */ new Map();
|
|
40646
40729
|
closed = false;
|
|
@@ -40659,7 +40742,7 @@ var GenerationSessions = class {
|
|
|
40659
40742
|
if (leaseId && (!lease || lease.workspaceId !== workspaceId || lease.closing)) throw Error("GENERATION_LEASE");
|
|
40660
40743
|
if (!lease) {
|
|
40661
40744
|
if (this.leases.size >= 32) throw Error("GENERATION_BUSY");
|
|
40662
|
-
leaseId =
|
|
40745
|
+
leaseId = randomUUID22();
|
|
40663
40746
|
const id3 = leaseId;
|
|
40664
40747
|
const timer = setTimeout(() => {
|
|
40665
40748
|
void this.release(id3, workspaceId).catch(() => {
|
|
@@ -40678,7 +40761,7 @@ var GenerationSessions = class {
|
|
|
40678
40761
|
current.pending.add(finished);
|
|
40679
40762
|
let handle;
|
|
40680
40763
|
try {
|
|
40681
|
-
handle = await this.services.create(workspace.path, "session-" +
|
|
40764
|
+
handle = await this.services.create(workspace.path, "session-" + randomUUID22(), signal, title);
|
|
40682
40765
|
if (current.closing || signal.aborted) {
|
|
40683
40766
|
await handle.dispose();
|
|
40684
40767
|
handle = void 0;
|
|
@@ -40796,7 +40879,7 @@ function createGenerationRuntime(sdk, configuredModel) {
|
|
|
40796
40879
|
if (closed) throw Error("GENERATION_CLOSED");
|
|
40797
40880
|
const selected = configuredModel ?? sdk.defaults.currentSelection();
|
|
40798
40881
|
if (!selected?.provider?.trim() || !selected.model?.trim()) throw Error("GENERATION_MODEL_NOT_CONFIGURED");
|
|
40799
|
-
if (selected.
|
|
40882
|
+
if (!isSalesFlash(selected.provider, selected.model)) throw Error("GENERATION_MODEL_INCOMPATIBLE");
|
|
40800
40883
|
const agentOptions = { ...selected };
|
|
40801
40884
|
if (!registration) {
|
|
40802
40885
|
const skill = readFileSync4(new URL("../.dsh/skills/wanji-sales-assistant/SKILL.md", import.meta.url), "utf8"), hostSection = skill.match(/## 工作台共享证据与进展\r?\n([\s\S]*?)(?=\r?\n## |$)/)?.[1]?.trim();
|
|
@@ -41097,7 +41180,7 @@ function registerQuestionRoute(ctx, observer) {
|
|
|
41097
41180
|
}
|
|
41098
41181
|
|
|
41099
41182
|
// src/server/intent-host.ts
|
|
41100
|
-
import { randomUUID as
|
|
41183
|
+
import { randomUUID as randomUUID23 } from "node:crypto";
|
|
41101
41184
|
|
|
41102
41185
|
// src/customer-intent.ts
|
|
41103
41186
|
var intentSemanticPolicyVersion = 2;
|
|
@@ -41247,14 +41330,14 @@ function createIntentEvaluator(options) {
|
|
|
41247
41330
|
const grades = /* @__PURE__ */ new Map();
|
|
41248
41331
|
return async (workspace, input, signal) => {
|
|
41249
41332
|
const selected = options.model();
|
|
41250
|
-
const readyModel = selected?.provider && selected.
|
|
41333
|
+
const readyModel = selected?.provider && isSalesFlash(selected.provider, selected.model) ? selected : void 0;
|
|
41251
41334
|
const binding = input.crm;
|
|
41252
41335
|
let snapshot2;
|
|
41253
41336
|
let grade;
|
|
41254
41337
|
let unavailable = false;
|
|
41255
41338
|
if (binding && readyModel) {
|
|
41256
41339
|
try {
|
|
41257
|
-
const id2 =
|
|
41340
|
+
const id2 = randomUUID23();
|
|
41258
41341
|
const batch = await options.tools.execute({
|
|
41259
41342
|
calls: [{ type: "tool-call", id: id2, name: "crm_get_conversation_context", arguments: JSON.stringify({ workspaceId: workspace, ...binding }) }],
|
|
41260
41343
|
signal
|
|
@@ -41324,7 +41407,7 @@ function applySemanticRanking(value, hits, options) {
|
|
|
41324
41407
|
import { existsSync as existsSync3 } from "node:fs";
|
|
41325
41408
|
|
|
41326
41409
|
// src/wechat/runtime.ts
|
|
41327
|
-
import { createHash as createHash10, randomUUID as
|
|
41410
|
+
import { createHash as createHash10, randomUUID as randomUUID24 } from "node:crypto";
|
|
41328
41411
|
import { createReadStream } from "node:fs";
|
|
41329
41412
|
import { mkdir as mkdir7, readFile as readFile13, lstat as lstat5, open as open3, rm as rm3, rename as rename6, mkdtemp, realpath as realpath3, writeFile as writeFile7 } from "node:fs/promises";
|
|
41330
41413
|
import { join as join14, basename as basename2 } from "node:path";
|
|
@@ -44434,7 +44517,7 @@ var WechatRuntime = class {
|
|
|
44434
44517
|
if (await this.cached(root, asset)) return ready();
|
|
44435
44518
|
try {
|
|
44436
44519
|
handle = await open3(lock, "wx", 384);
|
|
44437
|
-
owner = JSON.stringify({ pid: process.pid, token:
|
|
44520
|
+
owner = JSON.stringify({ pid: process.pid, token: randomUUID24() });
|
|
44438
44521
|
await handle.writeFile(owner);
|
|
44439
44522
|
} catch (e) {
|
|
44440
44523
|
if (e.code !== "EEXIST") throw e;
|
|
@@ -44470,7 +44553,7 @@ var WechatRuntime = class {
|
|
|
44470
44553
|
if (await this.cached(root, asset)) return ready();
|
|
44471
44554
|
if (await exists(root)) {
|
|
44472
44555
|
if ((await lstat5(root)).isSymbolicLink()) throw code3("CACHE");
|
|
44473
|
-
await rename6(root, root + "-invalid-" +
|
|
44556
|
+
await rename6(root, root + "-invalid-" + randomUUID24());
|
|
44474
44557
|
}
|
|
44475
44558
|
await this.download(part, asset, signal);
|
|
44476
44559
|
signal.throwIfAborted();
|
|
@@ -44827,7 +44910,7 @@ function safeView(identity, service, ready) {
|
|
|
44827
44910
|
async function readAccountPhone(account) {
|
|
44828
44911
|
if (typeof account?.getProfile !== "function") return;
|
|
44829
44912
|
const result = await account.getProfile({
|
|
44830
|
-
version: true ? "0.11.
|
|
44913
|
+
version: true ? "0.11.4" : "0.0.0",
|
|
44831
44914
|
locale: Intl.DateTimeFormat().resolvedOptions().locale,
|
|
44832
44915
|
timezoneOffsetSeconds: -(/* @__PURE__ */ new Date()).getTimezoneOffset() * 60
|
|
44833
44916
|
});
|
|
@@ -45087,11 +45170,7 @@ function activate(ctx, rawConfig) {
|
|
|
45087
45170
|
...tracedMaterialId ? { material: { knowledgeBaseId: tracedMaterialId, toolPrefix: config.materialToolPrefix ?? config.toolPrefix } } : {}
|
|
45088
45171
|
});
|
|
45089
45172
|
observer = active;
|
|
45090
|
-
const
|
|
45091
|
-
const offExecute = ctx.on("tools/execute", async (exec, next) => {
|
|
45092
|
-
await start(exec);
|
|
45093
|
-
return next();
|
|
45094
|
-
});
|
|
45173
|
+
const offExecute = ctx.on("tools/execute", diagnosticCallback((exec, next) => active.run(exec, next)));
|
|
45095
45174
|
const offResult = ctx.on("tools/result", diagnosticCallback((exec, result) => active.finish(exec, result)));
|
|
45096
45175
|
ctx.effect(() => async () => {
|
|
45097
45176
|
offExecute();
|
|
@@ -45148,12 +45227,12 @@ function activate(ctx, rawConfig) {
|
|
|
45148
45227
|
}
|
|
45149
45228
|
apply2(child, pick2(config, knowledgeKeys), async () => observer ? observer.status() : { enabled: false, pending: 0, otherPending: 0, blocked: 0, unfinished: 0, inFlight: 0, dropped: 0, ...config.agentKnowledgeTracing ? { errorCode: "observer-not-configured" } : {} }, async (query, hits, signal, options) => {
|
|
45150
45229
|
const selected = salesModel();
|
|
45151
|
-
if (!selected?.provider || selected.
|
|
45230
|
+
if (!selected?.provider || !isSalesFlash(selected.provider, selected.model)) throw Error("RERANK_FLASH_UNAVAILABLE");
|
|
45152
45231
|
const value = await runModel(ctx.llm, { ...selected, maxTokens: 600 }, { system: "\u53EA\u4F5C\u53EA\u8BFB\u68C0\u7D22\u6392\u5E8F\uFF1B\u4EC5\u8FD4\u56DE\u6240\u8981\u6C42\u7684\u4E25\u683CJSON\u3002", text: rerankPrompt(query, hits, options) }, signal);
|
|
45153
45232
|
return applySemanticRanking(value, hits, options);
|
|
45154
45233
|
}, async (query, signal) => {
|
|
45155
45234
|
const selected = salesModel();
|
|
45156
|
-
if (!selected?.provider || selected.
|
|
45235
|
+
if (!selected?.provider || !isSalesFlash(selected.provider, selected.model)) throw Error("QUERY_FLASH_UNAVAILABLE");
|
|
45157
45236
|
const value = await runModel(ctx.llm, { ...selected, maxTokens: 240 }, { system: "\u53EA\u63D0\u70BC\u53EA\u8BFB\u68C0\u7D22\u77ED\u8BED\uFF0C\u4E0D\u4F5C\u7B54\u3001\u4E0D\u6279\u51C6\u4E8B\u5B9E\u3002", text: queryExpansionPrompt(query) }, signal);
|
|
45158
45237
|
return parseQueryExpansion(value);
|
|
45159
45238
|
}, questions?.finish.bind(questions), observer && tracedMaterialId ? (startedAt, elapsedMs, status) => observer?.recordMaterialMetadata(tracedMaterialId, startedAt, elapsedMs, status) : void 0, observer);
|
|
@@ -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;
|
|
@@ -40,6 +41,7 @@ export declare function deliverAgentEvent(event: ObservationEvent): Promise<void
|
|
|
40
41
|
export declare class AgentKnowledgeObserver {
|
|
41
42
|
private readonly options;
|
|
42
43
|
private readonly production;
|
|
44
|
+
private readonly http?;
|
|
43
45
|
private readonly started;
|
|
44
46
|
readonly outbox: LangfuseOutbox;
|
|
45
47
|
private readonly judgments;
|
|
@@ -71,7 +73,8 @@ export declare class AgentKnowledgeObserver {
|
|
|
71
73
|
private begin;
|
|
72
74
|
private queue;
|
|
73
75
|
/** At most 20ms local journal wait; no network or model is awaited by the search. */
|
|
74
|
-
start(exec: KnowledgeExecution): Promise<void>;
|
|
76
|
+
start(exec: KnowledgeExecution, httpRequests?: GatewayRequest[]): Promise<void>;
|
|
77
|
+
run<T>(exec: KnowledgeExecution, next: () => Promise<T>): Promise<T>;
|
|
75
78
|
/** Harness emits a frozen final result. Snapshot synchronously, persist asynchronously. */
|
|
76
79
|
finish(exec: KnowledgeExecution, result: KnowledgeOutcome): void;
|
|
77
80
|
recordMaterialMetadata(knowledgeBaseId: string, startedAt: string, elapsedMs: number, status: string): void;
|
|
@@ -114,7 +114,7 @@ export type SemanticRanker = (query: string, hits: import('./knowledge-types.ts'
|
|
|
114
114
|
relevantOnly?: boolean;
|
|
115
115
|
}) => Promise<import('./knowledge-types.ts').KnowledgeHit[]>;
|
|
116
116
|
export type QueryExpander = (query: string, signal: AbortSignal) => Promise<string[]>;
|
|
117
|
-
type DirectKnowledgeObserver = Pick<AgentKnowledgeObserver, '
|
|
117
|
+
type DirectKnowledgeObserver = Pick<AgentKnowledgeObserver, 'run' | 'finish'>;
|
|
118
118
|
export declare function createKnowledgeHost(tools: ToolService, config: KnowledgeConfig, lifetime?: AbortSignal, outbox?: EvaluationOutbox, evaluationOrWorkspaces?: EvaluationService | (() => {
|
|
119
119
|
id: string;
|
|
120
120
|
title: string;
|
|
@@ -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
|
+
}
|
|
@@ -21,8 +21,12 @@ export declare class UpdateCoordinator {
|
|
|
21
21
|
private view;
|
|
22
22
|
private record;
|
|
23
23
|
private initialized?;
|
|
24
|
+
private statusInitialized?;
|
|
25
|
+
private showVerification;
|
|
26
|
+
private readonly verificationStarted;
|
|
24
27
|
private checking?;
|
|
25
28
|
private job?;
|
|
29
|
+
private installing;
|
|
26
30
|
private timer?;
|
|
27
31
|
private lifetime;
|
|
28
32
|
private disposed;
|
|
@@ -32,6 +36,7 @@ export declare class UpdateCoordinator {
|
|
|
32
36
|
constructor(options: UpdateOptions);
|
|
33
37
|
snapshot(): UpdateSnapshot;
|
|
34
38
|
initialize(): Promise<void>;
|
|
39
|
+
initializeForStatus(): Promise<void>;
|
|
35
40
|
private initializeOnce;
|
|
36
41
|
private reconcile;
|
|
37
42
|
private reconcileOwned;
|
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
|
|
package/package.json
CHANGED